xgplayer-subtitles
Advanced tools
Comparing version 1.0.23-alpha.0 to 1.0.23
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self,t.XgSubtitle=e())}(this,function(){"use strict";function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function e(t,e){return e={exports:{}},t(e,e.exports),e.exports}function n(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=F(e),this.reject=F(n)}function r(t){var e=t.length;return 3===e?(60*(60*Number(t[0])+Number(t[1]))*1e3+1e3*Number(t[2]))/1e3:2===e?(60*Number(t[0])*1e3+1e3*Number(t[1]))/1e3:Number(t[0])}function i(t){return/^(\-|\+)?\d+(\.\d+)?$/.test(t)}function o(t){return t}function s(t,e){return t>=0&&t<e.length?e[t]:""}function a(t,e){if(!t)return!1;if(t.classList)return Array.prototype.some.call(t.classList,function(t){return t===e});var n=t.className&&"object"===Ye(t.className)?t.getAttribute("class"):t.className;return n&&!!n.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))}function u(t,e){t&&(t.classList?e.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach(function(e){e&&t.classList.add(e)}):a(t,e)||(t.className&&"object"===Ye(t.className)?t.setAttribute("class",t.getAttribute("class")+" "+e):t.className+=" "+e))}function c(t,e){t&&(t.classList?e.split(/\s+/g).forEach(function(e){t.classList.remove(e)}):a(t,e)&&e.split(/\s+/g).forEach(function(e){var n=new RegExp("(\\s|^)"+e+"(\\s|$)");t.className&&"object"===Ye(t.className)?t.setAttribute("class",t.getAttribute("class").replace(n," ")):t.className=t.className.replace(n," ")}))}function l(t,e,n){var r=e.length;if(r<1)return-1;if(n=n<0?0:n>=r?r-1:n,e[n].start<=t&&t<e[n].end)return n;for(var i=e[n].end<=t?n+1:0;i<r;i++){if(e[i].start<=t&&t<e[i].end)return i;if(t>e[i].end&&i+1<r&&t<e[i+1].start)return-1;if(t>e[i].end&&i+1>=r)return-1}return-1}function f(t,e,n){var r=e.length;if(r<1)return[];var i=[];if((n=n<0?0:n>=r?r-1:n)<r)for(var o=e[n].end<=t?n:0;o<r&&(e[o].start<=t&&t<e[o].end&&i.push(o),!(t<e[o].start));o++);return i}function h(t){return Object.prototype.toString.call(t).match(/([^\s.*]+)(?=]$)/g)[0]}function d(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=document.createElement(t);return i.className=r,i.innerHTML=e,Pr(n).forEach(function(e){var r=e,o=n[e];"video"===t||"audio"===t||"live-video"===t?o&&i.setAttribute(r,o):i.setAttribute(r,o)}),i}function p(){var t=navigator.userAgent,e=/(?:Windows Phone)/.test(t),n=/(?:SymbianOS)/.test(t)||e,r=/(?:Android)/.test(t),i=/(?:Firefox)/.test(t),o=/(?:iPad|PlayBook)/.test(t)||r&&!/(?:Mobile)/.test(t)||i&&/(?:Tablet)/.test(t);return/(?:iPhone)/.test(t)&&!o||r||n||o}function v(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n="";t.map(function(t){n+=" "+e+" "+t.key+" {"+t.style+"}"});var r=document.createElement("style"),i=document.head||document.getElementsByTagName("head")[0];if(r.type="text/css",r.id="ssss",r.styleSheet){var o=function(){try{r.styleSheet.cssText=n}catch(t){}};r.styleSheet.disabled?setTimeout(o,10):o()}else{var s=document.createTextNode(n);r.appendChild(s)}i.appendChild(r)}function y(t,e){Vr||(Vr=new Hr),Vr.addObserver(t,e)}function g(t,e){Vr&&Vr.unObserver(t,e)}function _(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={code:Wr[t].code,msg:Wr[t].msg};return Pr(e).map(function(t){n[t]=e[t]}),n}function m(t,e,n,r,i){i?n(_(2,i),{format:r.format}):r.format?(t.list=r.list,t.format=r.format,t.styles=r.styles,e(t)):n(_(3))}function x(t){return new Sr(function(e,n){if(t.list)return void e(t);if(t.json){var r=Br.parseJson(t.json);return t.list=r,t.format="json",void e(t)}if(t.stringContent&&!t.url)Br.parse(t.stringContent,function(r,i){m(t,e,n,r,i)});else if(t.url)new Mr({url:t.url,type:"text"}).then(function(r){Br.parse(r.res.response,function(r,i){m(t,e,n,r,i)})}).catch(function(e){var r=_(1,{statusText:e.statusText,status:e.status,type:e.type,message:"http load error",url:t.url});n(r)});else{var i=_(8);n(i)}})}function b(t,e){return!!(t.id&&t.id===e.id||t.language&&t.language===e.language)}var k=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t},w=function(t){return Object(k(t))},T={}.hasOwnProperty,O=function(t,e){return T.call(t,e)},S=e(function(t){var e=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=e)}),E=(S.version,e(function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)})),P=e(function(t){var e=E["__core-js_shared__"]||(E["__core-js_shared__"]={});(t.exports=function(t,n){return e[t]||(e[t]=void 0!==n?n:{})})("versions",[]).push({version:S.version,mode:"pure",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})}),j=0,M=Math.random(),R=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++j+M).toString(36))},A=P("keys"),C=function(t){return A[t]||(A[t]=R(t))},L=C("IE_PROTO"),N=Object.prototype,I=Object.getPrototypeOf||function(t){return t=w(t),O(t,L)?t[L]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?N:null},F=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t},z=function(t,e,n){if(F(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}},D=function(t){return"object"==typeof t?null!==t:"function"==typeof t},B=function(t){if(!D(t))throw TypeError(t+" is not an object!");return t},H=function(t){try{return!!t()}catch(t){return!0}},V=!H(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),W=E.document,G=D(W)&&D(W.createElement),U=function(t){return G?W.createElement(t):{}},$=!V&&!H(function(){return 7!=Object.defineProperty(U("div"),"a",{get:function(){return 7}}).a}),K=function(t,e){if(!D(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!D(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!D(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!D(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},J=Object.defineProperty,Y={f:V?Object.defineProperty:function(t,e,n){if(B(t),e=K(e,!0),B(n),$)try{return J(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},X=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},q=V?function(t,e,n){return Y.f(t,e,X(1,n))}:function(t,e,n){return t[e]=n,t},Z=function(t,e,n){var r,i,o,s=t&Z.F,a=t&Z.G,u=t&Z.S,c=t&Z.P,l=t&Z.B,f=t&Z.W,h=a?S:S[e]||(S[e]={}),d=h.prototype,p=a?E:u?E[e]:(E[e]||{}).prototype;a&&(n=e);for(r in n)(i=!s&&p&&void 0!==p[r])&&O(h,r)||(o=i?p[r]:n[r],h[r]=a&&"function"!=typeof p[r]?n[r]:l&&i?z(o,E):f&&p[r]==o?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(o):c&&"function"==typeof o?z(Function.call,o):o,c&&((h.virtual||(h.virtual={}))[r]=o,t&Z.R&&d&&!d[r]&&q(d,r,o)))};Z.F=1,Z.G=2,Z.S=4,Z.P=8,Z.B=16,Z.W=32,Z.U=64,Z.R=128;var Q=Z,tt=function(t,e){var n=(S.Object||{})[t]||Object[t],r={};r[t]=e(n),Q(Q.S+Q.F*H(function(){n(1)}),"Object",r)};tt("getPrototypeOf",function(){return function(t){return I(w(t))}});var et=S.Object.getPrototypeOf,nt=e(function(t){t.exports={default:et,__esModule:!0}}),rt=t(nt),it=t(e(function(t,e){e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}})),ot=Math.ceil,st=Math.floor,at=function(t){return isNaN(t=+t)?0:(t>0?st:ot)(t)},ut=q,ct={},lt={}.toString,ft=function(t){return lt.call(t).slice(8,-1)},ht=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==ft(t)?t.split(""):Object(t)},dt=function(t){return ht(k(t))},pt=Math.min,vt=function(t){return t>0?pt(at(t),9007199254740991):0},yt=Math.max,gt=Math.min,_t=function(t,e){return t=at(t),t<0?yt(t+e,0):gt(t,e)},mt=function(t){return function(e,n,r){var i,o=dt(e),s=vt(o.length),a=_t(r,s);if(t&&n!=n){for(;s>a;)if((i=o[a++])!=i)return!0}else for(;s>a;a++)if((t||a in o)&&o[a]===n)return t||a||0;return!t&&-1}}(!1),xt=C("IE_PROTO"),bt=function(t,e){var n,r=dt(t),i=0,o=[];for(n in r)n!=xt&&O(r,n)&&o.push(n);for(;e.length>i;)O(r,n=e[i++])&&(~mt(o,n)||o.push(n));return o},kt="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),wt=Object.keys||function(t){return bt(t,kt)},Tt=V?Object.defineProperties:function(t,e){B(t);for(var n,r=wt(e),i=r.length,o=0;i>o;)Y.f(t,n=r[o++],e[n]);return t},Ot=E.document,St=Ot&&Ot.documentElement,Et=C("IE_PROTO"),Pt=function(){},jt=function(){var t,e=U("iframe"),n=kt.length;for(e.style.display="none",St.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),jt=t.F;n--;)delete jt.prototype[kt[n]];return jt()},Mt=Object.create||function(t,e){var n;return null!==t?(Pt.prototype=B(t),n=new Pt,Pt.prototype=null,n[Et]=t):n=jt(),void 0===e?n:Tt(n,e)},Rt=e(function(t){var e=P("wks"),n=E.Symbol,r="function"==typeof n;(t.exports=function(t){return e[t]||(e[t]=r&&n[t]||(r?n:R)("Symbol."+t))}).store=e}),At=Y.f,Ct=Rt("toStringTag"),Lt=function(t,e,n){t&&!O(t=n?t:t.prototype,Ct)&&At(t,Ct,{configurable:!0,value:e})},Nt={};q(Nt,Rt("iterator"),function(){return this});var It=function(t,e,n){t.prototype=Mt(Nt,{next:X(1,n)}),Lt(t,e+" Iterator")},Ft=Rt("iterator"),zt=!([].keys&&"next"in[].keys()),Dt=function(){return this},Bt=function(t,e,n,r,i,o,s){It(n,e,r);var a,u,c,l=function(t){if(!zt&&t in p)return p[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},f=e+" Iterator",h="values"==i,d=!1,p=t.prototype,v=p[Ft]||p["@@iterator"]||i&&p[i],y=v||l(i),g=i?h?l("entries"):y:void 0,_="Array"==e?p.entries||v:v;if(_&&(c=I(_.call(new t)))!==Object.prototype&&c.next&&Lt(c,f,!0),h&&v&&"values"!==v.name&&(d=!0,y=function(){return v.call(this)}),s&&(zt||d||!p[Ft])&&q(p,Ft,y),ct[e]=y,ct[f]=Dt,i)if(a={values:h?y:l("values"),keys:o?y:l("keys"),entries:g},s)for(u in a)u in p||ut(p,u,a[u]);else Q(Q.P+Q.F*(zt||d),e,a);return a},Ht=function(t){return function(e,n){var r,i,o=String(k(e)),s=at(n),a=o.length;return s<0||s>=a?t?"":void 0:(r=o.charCodeAt(s),r<55296||r>56319||s+1===a||(i=o.charCodeAt(s+1))<56320||i>57343?t?o.charAt(s):r:t?o.slice(s,s+2):i-56320+(r-55296<<10)+65536)}}(!0);Bt(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=Ht(e,n),this._i+=t.length,{value:t,done:!1})});var Vt=function(t,e){return{value:e,done:!!t}};Bt(Array,"Array",function(t,e){this._t=dt(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,Vt(1)):"keys"==e?Vt(0,n):"values"==e?Vt(0,t[n]):Vt(0,[n,t[n]])},"values");ct.Arguments=ct.Array;for(var Wt=Rt("toStringTag"),Gt="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),Ut=0;Ut<Gt.length;Ut++){var $t=Gt[Ut],Kt=E[$t],Jt=Kt&&Kt.prototype;Jt&&!Jt[Wt]&&q(Jt,Wt,$t),ct[$t]=ct.Array}var Yt={f:Rt},Xt=Yt.f("iterator"),qt=e(function(t){t.exports={default:Xt,__esModule:!0}});t(qt);var Zt=e(function(t){var e=R("meta"),n=Y.f,r=0,i=Object.isExtensible||function(){return!0},o=!H(function(){return i(Object.preventExtensions({}))}),s=function(t){n(t,e,{value:{i:"O"+ ++r,w:{}}})},a=function(t,n){if(!D(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!O(t,e)){if(!i(t))return"F";if(!n)return"E";s(t)}return t[e].i},u=function(t,n){if(!O(t,e)){if(!i(t))return!0;if(!n)return!1;s(t)}return t[e].w},c=function(t){return o&&l.NEED&&i(t)&&!O(t,e)&&s(t),t},l=t.exports={KEY:e,NEED:!1,fastKey:a,getWeak:u,onFreeze:c}}),Qt=(Zt.KEY,Zt.NEED,Zt.fastKey,Zt.getWeak,Zt.onFreeze,Y.f),te=function(t){var e=S.Symbol||(S.Symbol={});"_"==t.charAt(0)||t in e||Qt(e,t,{value:Yt.f(t)})},ee={f:Object.getOwnPropertySymbols},ne={f:{}.propertyIsEnumerable},re=function(t){var e=wt(t),n=ee.f;if(n)for(var r,i=n(t),o=ne.f,s=0;i.length>s;)o.call(t,r=i[s++])&&e.push(r);return e},ie=Array.isArray||function(t){return"Array"==ft(t)},oe=kt.concat("length","prototype"),se={f:Object.getOwnPropertyNames||function(t){return bt(t,oe)}},ae=se.f,ue={}.toString,ce="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],le=function(t){try{return ae(t)}catch(t){return ce.slice()}},fe={f:function(t){return ce&&"[object Window]"==ue.call(t)?le(t):ae(dt(t))}},he=Object.getOwnPropertyDescriptor,de={f:V?he:function(t,e){if(t=dt(t),e=K(e,!0),$)try{return he(t,e)}catch(t){}if(O(t,e))return X(!ne.f.call(t,e),t[e])}},pe=Zt.KEY,ve=de.f,ye=Y.f,ge=fe.f,_e=E.Symbol,me=E.JSON,xe=me&&me.stringify,be=Rt("_hidden"),ke=Rt("toPrimitive"),we={}.propertyIsEnumerable,Te=P("symbol-registry"),Oe=P("symbols"),Se=P("op-symbols"),Ee=Object.prototype,Pe="function"==typeof _e&&!!ee.f,je=E.QObject,Me=!je||!je.prototype||!je.prototype.findChild,Re=V&&H(function(){return 7!=Mt(ye({},"a",{get:function(){return ye(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=ve(Ee,e);r&&delete Ee[e],ye(t,e,n),r&&t!==Ee&&ye(Ee,e,r)}:ye,Ae=function(t){var e=Oe[t]=Mt(_e.prototype);return e._k=t,e},Ce=Pe&&"symbol"==typeof _e.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof _e},Le=function(t,e,n){return t===Ee&&Le(Se,e,n),B(t),e=K(e,!0),B(n),O(Oe,e)?(n.enumerable?(O(t,be)&&t[be][e]&&(t[be][e]=!1),n=Mt(n,{enumerable:X(0,!1)})):(O(t,be)||ye(t,be,X(1,{})),t[be][e]=!0),Re(t,e,n)):ye(t,e,n)},Ne=function(t,e){B(t);for(var n,r=re(e=dt(e)),i=0,o=r.length;o>i;)Le(t,n=r[i++],e[n]);return t},Ie=function(t,e){return void 0===e?Mt(t):Ne(Mt(t),e)},Fe=function(t){var e=we.call(this,t=K(t,!0));return!(this===Ee&&O(Oe,t)&&!O(Se,t))&&(!(e||!O(this,t)||!O(Oe,t)||O(this,be)&&this[be][t])||e)},ze=function(t,e){if(t=dt(t),e=K(e,!0),t!==Ee||!O(Oe,e)||O(Se,e)){var n=ve(t,e);return!n||!O(Oe,e)||O(t,be)&&t[be][e]||(n.enumerable=!0),n}},De=function(t){for(var e,n=ge(dt(t)),r=[],i=0;n.length>i;)O(Oe,e=n[i++])||e==be||e==pe||r.push(e);return r},Be=function(t){for(var e,n=t===Ee,r=ge(n?Se:dt(t)),i=[],o=0;r.length>o;)!O(Oe,e=r[o++])||n&&!O(Ee,e)||i.push(Oe[e]);return i};Pe||(ut((_e=function(){if(this instanceof _e)throw TypeError("Symbol is not a constructor!");var t=R(arguments.length>0?arguments[0]:void 0),e=function(n){this===Ee&&e.call(Se,n),O(this,be)&&O(this[be],t)&&(this[be][t]=!1),Re(this,t,X(1,n))};return V&&Me&&Re(Ee,t,{configurable:!0,set:e}),Ae(t)}).prototype,"toString",function(){return this._k}),de.f=ze,Y.f=Le,se.f=fe.f=De,ne.f=Fe,ee.f=Be,Yt.f=function(t){return Ae(Rt(t))}),Q(Q.G+Q.W+Q.F*!Pe,{Symbol:_e});for(var He="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Ve=0;He.length>Ve;)Rt(He[Ve++]);for(var We=wt(Rt.store),Ge=0;We.length>Ge;)te(We[Ge++]);Q(Q.S+Q.F*!Pe,"Symbol",{for:function(t){return O(Te,t+="")?Te[t]:Te[t]=_e(t)},keyFor:function(t){if(!Ce(t))throw TypeError(t+" is not a symbol!");for(var e in Te)if(Te[e]===t)return e},useSetter:function(){Me=!0},useSimple:function(){Me=!1}}),Q(Q.S+Q.F*!Pe,"Object",{create:Ie,defineProperty:Le,defineProperties:Ne,getOwnPropertyDescriptor:ze,getOwnPropertyNames:De,getOwnPropertySymbols:Be});var Ue=H(function(){ee.f(1)});Q(Q.S+Q.F*Ue,"Object",{getOwnPropertySymbols:function(t){return ee.f(w(t))}}),me&&Q(Q.S+Q.F*(!Pe||H(function(){var t=_e();return"[null]"!=xe([t])||"{}"!=xe({a:t})||"{}"!=xe(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(D(e)||void 0!==t)&&!Ce(t))return ie(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!Ce(e))return e}),r[1]=e,xe.apply(me,r)}}),_e.prototype[ke]||q(_e.prototype,ke,_e.prototype.valueOf),Lt(_e,"Symbol"),Lt(Math,"Math",!0),Lt(E.JSON,"JSON",!0),te("asyncIterator"),te("observable");var $e=S.Symbol,Ke=e(function(t){t.exports={default:$e,__esModule:!0}});t(Ke);var Je=e(function(t,e){function n(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var r=n(qt),i=n(Ke),o="function"==typeof i.default&&"symbol"==typeof r.default?function(t){return typeof t}:function(t){return t&&"function"==typeof i.default&&t.constructor===i.default&&t!==i.default.prototype?"symbol":typeof t};e.default="function"==typeof i.default&&"symbol"===o(r.default)?function(t){return void 0===t?"undefined":o(t)}:function(t){return t&&"function"==typeof i.default&&t.constructor===i.default&&t!==i.default.prototype?"symbol":void 0===t?"undefined":o(t)}}),Ye=t(Je),Xe=t(e(function(t,e){e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{default:t}}(Je);e.default=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":(0,n.default)(e))&&"function"!=typeof e?t:e}})),qe=de.f;tt("getOwnPropertyDescriptor",function(){return function(t,e){return qe(dt(t),e)}});var Ze=S.Object,Qe=function(t,e){return Ze.getOwnPropertyDescriptor(t,e)},tn=e(function(t){t.exports={default:Qe,__esModule:!0}});t(tn);var en=t(e(function(t,e){function n(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var r=n(nt),i=n(tn);e.default=function t(e,n,o){null===e&&(e=Function.prototype);var s=(0,i.default)(e,n);if(void 0===s){var a=(0,r.default)(e);return null===a?void 0:t(a,n,o)}if("value"in s)return s.value;var u=s.get;if(void 0!==u)return u.call(o)}}));Q(Q.S+Q.F*!V,"Object",{defineProperty:Y.f});var nn=S.Object,rn=function(t,e,n){return nn.defineProperty(t,e,n)},on=e(function(t){t.exports={default:rn,__esModule:!0}});t(on);var sn=t(e(function(t,e){e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{default:t}}(on);e.default=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),(0,n.default)(t,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}()})),an=function(t,e){if(B(t),!D(e)&&null!==e)throw TypeError(e+": can't set as prototype!")},un={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,n){try{(n=z(Function.call,de.f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,r){return an(t,r),e?t.__proto__=r:n(t,r),t}}({},!1):void 0),check:an};Q(Q.S,"Object",{setPrototypeOf:un.set});var cn=S.Object.setPrototypeOf,ln=e(function(t){t.exports={default:cn,__esModule:!0}});t(ln),Q(Q.S,"Object",{create:Mt});var fn=S.Object,hn=function(t,e){return fn.create(t,e)},dn=e(function(t){t.exports={default:hn,__esModule:!0}});t(dn);var pn,vn,yn,gn=t(e(function(t,e){function n(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var r=n(ln),i=n(dn),o=n(Je);e.default=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":(0,o.default)(e)));t.prototype=(0,i.default)(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(r.default?(0,r.default)(t,e):t.__proto__=e)}})),_n=Rt("toStringTag"),mn="Arguments"==ft(function(){return arguments}()),xn=function(t,e){try{return t[e]}catch(t){}},bn=function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=xn(e=Object(t),_n))?n:mn?ft(e):"Object"==(r=ft(e))&&"function"==typeof e.callee?"Arguments":r},kn=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t},wn=function(t,e,n,r){try{return r?e(B(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&B(i.call(t)),e}},Tn=Rt("iterator"),On=Array.prototype,Sn=function(t){return void 0!==t&&(ct.Array===t||On[Tn]===t)},En=Rt("iterator"),Pn=S.getIteratorMethod=function(t){if(void 0!=t)return t[En]||t["@@iterator"]||ct[bn(t)]},jn=e(function(t){var e={},n={},r=t.exports=function(t,r,i,o,s){var a,u,c,l,f=s?function(){return t}:Pn(t),h=z(i,o,r?2:1),d=0;if("function"!=typeof f)throw TypeError(t+" is not iterable!");if(Sn(f)){for(a=vt(t.length);a>d;d++)if((l=r?h(B(u=t[d])[0],u[1]):h(t[d]))===e||l===n)return l}else for(c=f.call(t);!(u=c.next()).done;)if((l=wn(c,h,u.value,r))===e||l===n)return l};r.BREAK=e,r.RETURN=n}),Mn=Rt("species"),Rn=function(t,e){var n,r=B(t).constructor;return void 0===r||void 0==(n=B(r)[Mn])?e:F(n)},An=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)},Cn=E.process,Ln=E.setImmediate,Nn=E.clearImmediate,In=E.MessageChannel,Fn=E.Dispatch,zn=0,Dn={},Bn=function(){var t=+this;if(Dn.hasOwnProperty(t)){var e=Dn[t];delete Dn[t],e()}},Hn=function(t){Bn.call(t.data)};Ln&&Nn||(Ln=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return Dn[++zn]=function(){An("function"==typeof t?t:Function(t),e)},pn(zn),zn},Nn=function(t){delete Dn[t]},"process"==ft(Cn)?pn=function(t){Cn.nextTick(z(Bn,t,1))}:Fn&&Fn.now?pn=function(t){Fn.now(z(Bn,t,1))}:In?(yn=(vn=new In).port2,vn.port1.onmessage=Hn,pn=z(yn.postMessage,yn,1)):E.addEventListener&&"function"==typeof postMessage&&!E.importScripts?(pn=function(t){E.postMessage(t+"","*")},E.addEventListener("message",Hn,!1)):pn="onreadystatechange"in U("script")?function(t){St.appendChild(U("script")).onreadystatechange=function(){St.removeChild(this),Bn.call(t)}}:function(t){setTimeout(z(Bn,t,1),0)});var Vn={set:Ln,clear:Nn},Wn=Vn.set,Gn=E.MutationObserver||E.WebKitMutationObserver,Un=E.process,$n=E.Promise,Kn="process"==ft(Un),Jn={f:function(t){return new n(t)}},Yn=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}},Xn=E.navigator,qn=Xn&&Xn.userAgent||"",Zn=function(t,e){if(B(t),D(e)&&e.constructor===t)return e;var n=Jn.f(t);return(0,n.resolve)(e),n.promise},Qn=Rt("species"),tr=Rt("iterator"),er=!1;try{var nr=[7][tr]();nr.return=function(){er=!0},Array.from(nr,function(){throw 2})}catch(t){}var rr,ir,or,sr,ar=Vn.set,ur=function(){var t,e,n,r=function(){var r,i;for(Kn&&(r=Un.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(Kn)n=function(){Un.nextTick(r)};else if(!Gn||E.navigator&&E.navigator.standalone)if($n&&$n.resolve){var i=$n.resolve(void 0);n=function(){i.then(r)}}else n=function(){Wn.call(E,r)};else{var o=!0,s=document.createTextNode("");new Gn(r).observe(s,{characterData:!0}),n=function(){s.data=o=!o}}return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}}(),cr=E.TypeError,lr=E.process,fr=lr&&lr.versions,hr=fr&&fr.v8||"",dr=E.Promise,pr="process"==bn(lr),vr=function(){},yr=ir=Jn.f,gr=!!function(){try{var t=dr.resolve(1),e=(t.constructor={})[Rt("species")]=function(t){t(vr,vr)};return(pr||"function"==typeof PromiseRejectionEvent)&&t.then(vr)instanceof e&&0!==hr.indexOf("6.6")&&-1===qn.indexOf("Chrome/66")}catch(t){}}(),_r=function(t){var e;return!(!D(t)||"function"!=typeof(e=t.then))&&e},mr=function(t,e){if(!t._n){t._n=!0;var n=t._c;ur(function(){for(var r=t._v,i=1==t._s,o=0;n.length>o;)!function(e){var n,o,s,a=i?e.ok:e.fail,u=e.resolve,c=e.reject,l=e.domain;try{a?(i||(2==t._h&&kr(t),t._h=1),!0===a?n=r:(l&&l.enter(),n=a(r),l&&(l.exit(),s=!0)),n===e.promise?c(cr("Promise-chain cycle")):(o=_r(n))?o.call(n,u,c):u(n)):c(r)}catch(t){l&&!s&&l.exit(),c(t)}}(n[o++]);t._c=[],t._n=!1,e&&!t._h&&xr(t)})}},xr=function(t){ar.call(E,function(){var e,n,r,i=t._v,o=br(t);if(o&&(e=Yn(function(){pr?lr.emit("unhandledRejection",i,t):(n=E.onunhandledrejection)?n({promise:t,reason:i}):(r=E.console)&&r.error&&r.error("Unhandled promise rejection",i)}),t._h=pr||br(t)?2:1),t._a=void 0,o&&e.e)throw e.v})},br=function(t){return 1!==t._h&&0===(t._a||t._c).length},kr=function(t){ar.call(E,function(){var e;pr?lr.emit("rejectionHandled",t):(e=E.onrejectionhandled)&&e({promise:t,reason:t._v})})},wr=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),mr(e,!0))},Tr=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw cr("Promise can't be resolved itself");(e=_r(t))?ur(function(){var r={_w:n,_d:!1};try{e.call(t,z(Tr,r,1),z(wr,r,1))}catch(t){wr.call(r,t)}}):(n._v=t,n._s=1,mr(n,!1))}catch(t){wr.call({_w:n,_d:!1},t)}}};gr||(dr=function(t){kn(this,dr,"Promise","_h"),F(t),rr.call(this);try{t(z(Tr,this,1),z(wr,this,1))}catch(t){wr.call(this,t)}},(rr=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=function(t,e,n){for(var r in e)n&&t[r]?t[r]=e[r]:q(t,r,e[r]);return t}(dr.prototype,{then:function(t,e){var n=yr(Rn(this,dr));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=pr?lr.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&mr(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),or=function(){var t=new rr;this.promise=t,this.resolve=z(Tr,t,1),this.reject=z(wr,t,1)},Jn.f=yr=function(t){return t===dr||t===sr?new or(t):ir(t)}),Q(Q.G+Q.W+Q.F*!gr,{Promise:dr}),Lt(dr,"Promise"),function(t){var e="function"==typeof S[t]?S[t]:E[t];V&&e&&!e[Qn]&&Y.f(e,Qn,{configurable:!0,get:function(){return this}})}("Promise"),sr=S.Promise,Q(Q.S+Q.F*!gr,"Promise",{reject:function(t){var e=yr(this);return(0,e.reject)(t),e.promise}}),Q(Q.S+!0*Q.F,"Promise",{resolve:function(t){return Zn(this===sr?dr:this,t)}}),Q(Q.S+Q.F*!(gr&&function(t,e){if(!e&&!er)return!1;var n=!1;try{var r=[7],i=r[tr]();i.next=function(){return{done:n=!0}},r[tr]=function(){return i},t(r)}catch(t){}return n}(function(t){dr.all(t).catch(vr)})),"Promise",{all:function(t){var e=this,n=yr(e),r=n.resolve,i=n.reject,o=Yn(function(){var n=[],o=0,s=1;jn(t,!1,function(t){var a=o++,u=!1;n.push(void 0),s++,e.resolve(t).then(function(t){u||(u=!0,n[a]=t,--s||r(n))},i)}),--s||r(n)});return o.e&&i(o.v),n.promise},race:function(t){var e=this,n=yr(e),r=n.reject,i=Yn(function(){jn(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}}),Q(Q.P+Q.R,"Promise",{finally:function(t){var e=Rn(this,S.Promise||E.Promise),n="function"==typeof t;return this.then(n?function(n){return Zn(e,t()).then(function(){return n})}:t,n?function(n){return Zn(e,t()).then(function(){throw n})}:t)}}),Q(Q.S,"Promise",{try:function(t){var e=Jn.f(this),n=Yn(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}});var Or=S.Promise,Sr=t(e(function(t){t.exports={default:Or,__esModule:!0}}));tt("keys",function(){return function(t){return wt(w(t))}});var Er=S.Object.keys,Pr=t(e(function(t){t.exports={default:Er,__esModule:!0}})),jr=e(function(t){function e(){}function n(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function r(t,e,r,i,o){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new n(r,i||t,o),u=a?a+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],s]:t._events[u].push(s):(t._events[u]=s,t._eventsCount++),t}function i(t,n){0==--t._eventsCount?t._events=new e:delete t._events[n]}function o(){this._events=new e,this._eventsCount=0}var s=Object.prototype.hasOwnProperty,a="~";Object.create&&(e.prototype=Object.create(null),(new e).__proto__||(a=!1)),o.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)s.call(t,e)&&n.push(a?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},o.prototype.listeners=function(t){var e=a?a+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,i=n.length,o=new Array(i);r<i;r++)o[r]=n[r].fn;return o},o.prototype.listenerCount=function(t){var e=a?a+t:t,n=this._events[e];return n?n.fn?1:n.length:0},o.prototype.emit=function(t,e,n,r,i,o){var s=a?a+t:t;if(!this._events[s])return!1;var u,c,l=this._events[s],f=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,n),!0;case 4:return l.fn.call(l.context,e,n,r),!0;case 5:return l.fn.call(l.context,e,n,r,i),!0;case 6:return l.fn.call(l.context,e,n,r,i,o),!0}for(c=1,u=new Array(f-1);c<f;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var h,d=l.length;for(c=0;c<d;c++)switch(l[c].once&&this.removeListener(t,l[c].fn,void 0,!0),f){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,e);break;case 3:l[c].fn.call(l[c].context,e,n);break;case 4:l[c].fn.call(l[c].context,e,n,r);break;default:if(!u)for(h=1,u=new Array(f-1);h<f;h++)u[h-1]=arguments[h];l[c].fn.apply(l[c].context,u)}}return!0},o.prototype.on=function(t,e,n){return r(this,t,e,n,!1)},o.prototype.once=function(t,e,n){return r(this,t,e,n,!0)},o.prototype.removeListener=function(t,e,n,r){var o=a?a+t:t;if(!this._events[o])return this;if(!e)return i(this,o),this;var s=this._events[o];if(s.fn)s.fn!==e||r&&!s.once||n&&s.context!==n||i(this,o);else{for(var u=0,c=[],l=s.length;u<l;u++)(s[u].fn!==e||r&&!s[u].once||n&&s[u].context!==n)&&c.push(s[u]);c.length?this._events[o]=1===c.length?c[0]:c:i(this,o)}return this},o.prototype.removeAllListeners=function(t){var n;return t?(n=a?a+t:t,this._events[n]&&i(this,n)):(this._events=new e,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=a,o.EventEmitter=o,t.exports=o}),Mr=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url,r=e.method,i=void 0===r?"GET":r,o=e.type,s=void 0===o?"arraybuffer":o,a=e.timeout,u=void 0===a?1e4:a,c=e.data,l=void 0===c?{}:c,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return it(this,t),new Sr(function(t,e){var r=new window.XMLHttpRequest,o=i.toUpperCase(),a=[];s&&(r.responseType=s),u&&(r.timeout=u);for(var c in l)a.push("k="+l[c]);if(r.onload=function(){200===r.status||206===r.status?t({context:f,res:r}):e(new Error({context:f,res:r,type:"error"}))},r.onerror=function(t){e(new Error({context:f,res:r,type:"error"}))},r.ontimeout=function(t){e(new Error({context:f,res:r,type:"error"}))},r.onabort=function(){e(new Error({context:f,res:r,type:"error"}))},"GET"===o)r.open(o,""+n),r.send();else{if("post"!==o)throw new Error("xhr "+o+" is not supported");r.open(o,n),r.setRequestHeader("Content-type","application/x-www-form-urlencoded"),r.send(a.join("&"))}})},Rr=/^WEBVTT/,Ar=/^STYLE+$/,Cr=/^\:\:cue/,Lr=/^}+$/,Nr=/^\[Script Info\].*/,Ir=[/[0-9]{1,3}:[0-9]{2}:[0-9]{2}\.[0-9]{1,3}-->[0-9]{1,3}:[0-9]{2}:[0-9]{2}\.[0-9]{1,3}/,/[0-9]{1,2}:[0-9]{2}\.[0-9]{1,3}-->[0-9]{1,2}:[0-9]{2}\.[0-9]{1,3}/,/[0-9]{1,2}\.[0-9]{1,3}-->[0-9]{1,2}\.[0-9]{1,3}/],Fr=/^Format:\s/,zr=/^Style:\s/,Dr=/^Dialogue:\s/,Br=function(){function t(){it(this,t)}return sn(t,null,[{key:"parseJson",value:function(t){for(var e=[],n=0,r=0;r<t.length;r++){if(n>=50&&(n=0),0===n){var i={start:t[r].start,list:[t[r]],end:t[r].end};e.push(i)}else e[e.length-1].list.push(t[r]),e[e.length-1].end=t[r].end;n++}return e}},{key:"parse",value:function(e,n){var r=t.checkFormat(e);r||n({format:r});try{var i=[];"ass"===r?i=t.parseASS(e):"vtt"===r&&(i=t.parseVTT(e)),n({format:r,list:i.list,styles:i.styles})}catch(t){console.error(t),n({format:r},t)}}},{key:"parseASSItem",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=t.split(","),i={},s="";try{var a=n.length-e.length;return s=a>0?n.splice(e.length-1,a+1).join(",")+"":n[n.length-1]+"",s=s.replace(/\\n+/g,""),s=o(s),n[e.length-1]=s,e.map(function(t,e){"end"===t||"start"===t?i[t]=r(n[e].split(":")):"text"===t?i[t]=[n[e]]:"layer"===t?(i[t]=[n[e]],i.textTag=[n[e]]):i[t]="style"===t?[n[e]]:Number(n[e])?Number(n[e]):n[e]}),i}catch(t){return console.error(t),{}}}},{key:"parseASS",value:function(e){for(var n=e.split("\n"),r=[],i=0,o=0,s=[],a=[],u=null;i<n.length;){if(Fr.test(n[i]))a=(a=n[i].replace(Fr,"").replace(/\s+/g,"").split(",")).map(function(t){return t.toLocaleLowerCase()});else if(zr.test(n[i]))s.push(n[i].replace(zr,"").replace(/\s+/g,""));else if(Dr.test(n[i])){var c=t.parseASSItem(n[i].replace(Dr,""),a);if(u&&c.start===u.start&&c.end===u.end)try{var l=u,f=l.text,h=l.textTag,d=l.style;f.push(c.text[0]),h.push(c.textTag[0]),d.push(c.style[0])}catch(t){console.error(t)}else{u=c;var p=null;o%50==0?((p={start:u.start,end:u.end,list:[]}).list.push(u),r.push(p)):((p=r[r.length-1]).end=u.end,p.list.push(u)),o++}}i++}return{list:r,style:{}}}},{key:"parseVTTStyle",value:function(t,e){var n=t.split(":");if(n.length>1){var r=n[0].trim().split("-"),i="";r.length>1?r.map(function(t,e){i+=0===e?t:t.charAt(0).toUpperCase()+t.slice(1)}):i=r[0],e[i]=n[1].trim().replace(/;$/,"")}return e}},{key:"parseVTT",value:function(t){for(var e=(t=t.replace(Rr,"")).split("\n"),n=[],r=0,o=0,a=null,u=!1,c=!1,l=null,f=null,h=[];r<e.length;){var d=s(r,e).trim();if(!d||u&&i(d))u=!d;else if(Cr.test(d)&&Ar.test(s(r-1,e).trim())){c=!0;var p=/\((.+?)\)/g.exec(d);f=p?p[1]:"",l=""}else if(c)Lr.test(d)?(h.push({key:f,style:l}),l=null,f=null,c=!1):l+=d;else if(d){u=!1;var v=this.checkIsTime(e[r]);if(v){var y=this.parseVttTime(v);if(!a||y.start!==a.start||y.end!==a.end){(a=y).text=[],a.textTag=[];var g=null;o%50==0?((g={start:a.start,end:a.end,list:[]}).list.push(a),n.push(g)):((g=n[n.length-1]).end=a.end,g.list.push(a)),o++}}else if(a){var _=a,m=_.text,x=_.textTag,b=this.parseVttText(e[r]);m.push(b.text),x.push(b.tag)}u=!1}r++}return{list:n,styles:h}}},{key:"checkIsTime",value:function(t){t=t.replace(/\s+/g,"");for(var e=0,n=null;e<Ir.length&&!(n=Ir[e].exec(t));)e++;return n?n[0]:null}},{key:"parseVttText",value:function(t){var e=/^(<?.+?>)/g.exec(t),n="",r="default";if(e){r=e[0].replace(/\<|\>|\&/g,"");var i=RegExp("^<"+r+">(([\\s\\S])*?)</"+r+">$").exec(t);i?n=i[1]:(n=t,r="")}else n=t;for(var s=/<(\w+).(\w+)>/g,a=s.exec(n);a&&a.length>2;)n=n.replace(a[0],"<"+a[1]+' class="'+a[2]+'">'),a=s.exec(n);return{tag:r,text:o(n.replace(/\\n+/g,"<br/>"))}}},{key:"parseVttTime",value:function(t){var e=t.split("--\x3e"),n=void 0,i=0;if(2===e.length){var o=e[0].split(":"),s=e[1].split(":");n=r(o),i=r(s)}return{start:n,end:i,time:t}}},{key:"isVTT",value:function(t){return Rr.test(t)}},{key:"isASS",value:function(t){return Nr.test(t)}},{key:"checkFormat",value:function(t){return t?Rr.test(t)?"vtt":Nr.test(t)?"ass":null:null}}]),t}(),Hr=function(){function t(){var e=this;it(this,t),this.__handlers=[],window.ResizeObserver&&(this.observer=new window.ResizeObserver(function(t){e.__trigger(t)}))}return sn(t,[{key:"addObserver",value:function(t,e){if(this.observer){this.observer&&this.observer.observe(t);for(var n=this.__handlers,r=-1,i=0;i<n.length;i++)n[i]&&t===n[i].target&&(r=i);r>-1?this.__handlers[r].handler.push(e):this.__handlers.push({target:t,handler:[e]})}}},{key:"unObserver",value:function(t){var e=-1;this.__handlers.map(function(n,r){t===n.target&&(e=r)}),this.observer&&this.observer.unobserve(t),e>-1&&this.__handlers.splice(e,1)}},{key:"destroyObserver",value:function(){this.observer&&this.observer.disconnect(),this.observer=null,this.__handlers=null}},{key:"__runHandler",value:function(t,e){for(var n=this.__handlers,r=0;r<n.length;r++)if(n[r]&&t===n[r].target){n[r].handler&&n[r].handler.map(function(n){try{n(t,e)}catch(t){console.error(t)}});break}}},{key:"__trigger",value:function(t){var e=this;t.map(function(t){var n=t.contentRect;e.__runHandler(t.target,n)})}}]),t}(),Vr=null;!function(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}}('xg-text-track.xg-text-track {\n font-family: "PingFang SC","SF Pro SC","SF Pro Text","SF Pro Icons","Helvetica Neue","Helvetica","Arial",sans-serif;\n -webkit-font-smoothing: antialiased;\n position: absolute;\n bottom: 0;\n color: #fff;\n left: 0;\n right: 0;\n pointer-events: none;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center; }\n xg-text-track.xg-text-track.text-track-no-fitvideo {\n margin-bottom: 2%; }\n xg-text-track.xg-text-track.text-track-hide {\n opacity: 0;\n visibility: hidden; }\n xg-text-track.xg-text-track.text-track-show {\n opacity: 1;\n visibility: visible; }\n xg-text-track.xg-text-track xg-text-track-inner {\n display: block;\n max-width: 92%; }\n xg-text-track.xg-text-track xg-text-track-span {\n display: -webkit-box;\n text-align: center;\n text-overflow: ellipsis;\n -webkit-box-orient: vertical;\n overflow: hidden;\n padding: 1px 4px;\n -webkit-line-clamp: 1;\n line-height: 120%;\n word-break: break-word; }\n xg-text-track.xg-text-track xg-text-track-span.text-track-deputy {\n font-size: 75%; }\n xg-text-track.xg-text-track xg-text-track-span.text-track-single {\n -webkit-line-clamp: 1; }\n xg-text-track.xg-text-track xg-text-track-span.text-track-double {\n -webkit-line-clamp: 2; }\n xg-text-track.xg-text-track xg-text-track-span.text-track-three {\n -webkit-line-clamp: 3; }\n xg-text-track.xg-text-track.text-track-bg xg-text-track-inner {\n background-color: rgba(0, 0, 0, .54);\n border-radius: 2px; }\n xg-text-track.xg-text-track.text-track-stroke xg-text-track-inner {\n background-color: none;\n border-radius: 0;\n text-shadow: -1px 1px 0 rgba(0, 0, 0, .7), 1px 1px 0 rgba(0, 0, 0, .7), 1px -1px 0 rgba(0, 0, 0, .7), -1px -1px 0 rgba(0, 0, 0, .7); }\n');var Wr=[{code:0,msg:"SUCCESS"},{code:1,msg:"LOAD_ERROR"},{code:2,msg:"PARSER_ERROR"},{code:3,msg:"FORMAT_NOT_SUPPORTED"},{code:4,msg:"ID_OR_LANGUAGE_NOT_EXIST"},{code:5,msg:"PARAMETERS_ERROR"},{code:6,msg:"ABORT"},{code:7,msg:"UNKNOWN"},{code:8,msg:"DATA_ERROR:subtitle.url is null"}],Gr={RESIZE:"resize"},Ur=!1;return function(t){function e(t){it(this,e);var n=Xe(this,(e.__proto__||rt(e)).call(this));return Ur=p(),n.currentText=null,n.currentExtText=null,n.textTrack=[],n._cid=-1,n._gid=-1,n._cids=[],n._iId=null,n._iC=0,n.player=null,n.root=null,n.config={line:"double",bottom:0,mode:"stroke",defaultOpen:!1,baseSizeX:49,baseSizeY:28,minSize:16,minMobileSize:13,fitVideo:!0,offsetBottom:2,fontColor:"#fff",domRender:!0},n._ctime=0,n._loadingTrack={},Pr(n.config).map(function(e){void 0!==t[e]&&null!==t[e]&&(n.config[e]=t[e])}),n._isOpen=!1,n._videoMeta={scale:0,videoHeight:0,videoWidth:0,lwidth:0,lheight:0,vWidth:0,vHeight:0,vBottom:0,vLeft:0,marginBottom:0},t.subTitles&&"Array"===h(t.subTitles)?(t.player&&n.attachPlayer(t.player),n.setSubTitles(t.subTitles,n.config.defaultOpen),n):Xe(n)}return gn(e,t),sn(e,[{key:"version",get:function(){return"1.0.12"}}]),sn(e,[{key:"setSubTitles",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=this._isOpen||n;r&&this.innerRoot&&this.switchOff(),this.currentText=null,this.textTrack=[],t.map(function(t){var n={};Pr(t).map(function(e){n[e]=t[e]}),n.isDefault&&(e.currentText=n),e.textTrack.push(n)}),this.currentText&&x(this.currentText).then(function(t){e.addStyles(t),i&&e.switch()})}},{key:"addStyles",value:function(t){var e=t.styles,n=t.format;e&&"vtt"===n&&(e.map(function(t){t.key||(t.key="xg-text-track-span")}),v(e,"xg-text-track"))}},{key:"attachPlayer",value:function(t){var e=this;if(t){this.player&&this.detachPlayer();var n=this.config,r=n.fontColor,i=n.mode,o=n.fitVideo,s=n.domRender;this.player=t,s&&(this.root=document.createElement("xg-text-track"),this.root.className="xg-text-track",!this._isOpen&&u(this.root,"text-track-hide"),!o&&u(this.root,"text-track-no-fitvideo"),i&&u(this.root,"text-track-"+i),this.innerRoot=document.createElement("xg-text-track-inner"),this.root.appendChild(this.innerRoot),r&&(this.root.style.color=r),this.currentText&&["language","id","label"].map(function(t){e.root.setAttribute("data-"+t,e.currentText[t]||"")}),this.player.root.appendChild(this.root),y(t.root,this._onResize)),["destroy","__onTimeupdate","_onResize"].map(function(t){e[t]=e[t].bind(e)}),this.player.on("destroy",this.destroy),this.player.on("timeupdate",this.__onTimeupdate),this._isOpen&&this.switch()}}},{key:"detachPlayer",value:function(){var t=this.player,e=this.config;t&&(t.off("destroy",this.destroy),t.off("timeupdate",this.__onTimeupdate),e.domRender&&(t.root&&(g(t.root,this._onResize),t.root.removeChild(this.root)),this.innerRoot=null,this.root=null),this.player=null)}},{key:"switch",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:"",language:""};return this._loadingTrack=e,new Sr(function(n,r){if(!e.id&&!e.language){if(t.currentText){t._loadingTrack={},t._updateCurrent(t.currentText),t._isOpen=!0,t.show();var i=_(0,{message:"switch default subtitle success"});return void n(i)}var o=_(5,{message:"no default subtitle"});return void r(o)}if(t.currentText&&b(e,t.currentText))t._loadingTrack={},t._updateCurrent(t.currentText),t._isOpen=!0,t.show(),n(_(0));else{for(var s=null,a=0;a<t.textTrack.length;a++)if(b(e,t.textTrack[a])){s=t.textTrack[a];break}if(s)s.list?(t._loadingTrack={},t._updateCurrent(s),t._isOpen=!0,t.show(),n(_(0))):x(s).then(function(e){if(t.addStyles(e),t._loadingTrack.id===s.id||t._loadingTrack.language===e.language)t._loadingTrack={},t._updateCurrent(e),t._isOpen=!0,t.show(),n(_(0));else{var i=_(6,{message:"check _loadingTrack fail id: "+t._loadingTrack.id+" nextSubtitle:"+e.id});console.trace(i),r(i)}}).catch(function(t){r(t)});else{var u=_(4,new Error("The is no subtitle with id:[{"+e.id+"}] or language:["+e.language+"]"));console.trace(u),r(u)}}})}},{key:"switchExt",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:"",language:""};return new Sr(function(n,r){if(e.id||e.language){for(var i=null,o=0;o<t.textTrack.length;o++)if(b(e,t.textTrack[o])){i=t.textTrack[o];break}i&&!b(i,t.currentText)&&x(i).then(function(e){t.currentExtText=e,n(_(0))})}else t.currentExtText=null,n(_(0))})}},{key:"switchOff",value:function(){this._isOpen=!1,this.hide()}},{key:"_updateCurrent",value:function(t){var e=this;this.currentText=t,this.config.domRender&&this.root&&(["language","id","label"].map(function(t){e.root.setAttribute("data-"+t,e.currentText[t]||"")}),this.__remove(this._cids));var n=this.player.currentTime;this._cids=[],this._gid=-1,this._cid=-1,this._update(n)}},{key:"__loadAll",value:function(){this.textTrack.map(function(t){x(t)})}},{key:"getDelCid",value:function(t,e){for(var n=[],r=0;r<t.length;r++)e.includes(t[r])||n.push(t[r]);return n}},{key:"getNewCid",value:function(t,e){for(var n=[],r=0;r<e.length;r++)t.includes(e[r])||n.push(e[r]);return n}},{key:"_update",value:function(t){var e=this,n=l(t,this.currentText.list,this._gid),r=[];if(n>-1&&(r=f(t,this.currentText.list[n].list,this._cid)),r.length<1)return this._cids.length>0&&this.config.domRender&&this.__remove(this._cids),void(this._cids=[]);if(this._cids!==r||n!==this._gid){this._gid=n,this._cid=r[0];var i=this.getDelCid(this._cids,r),o=this.getNewCid(this._cids,r);this._cids=r,this.config.domRender&&this.__remove(i);var s=[];o.map(function(t){var r=e.currentText.list[n].list[t];r.index=t,s.push(r)}),this.currentExtText&&o.map(function(t){var r=e.currentText.list[n].list[t];r.index=t,s.push(r)}),s.length>0&&console.log("_update",s,t),this.emit("update",s),this.__render(s,t)}}},{key:"__onTimeupdate",value:function(){if(this._isOpen){var t=this.player.video,e=t.videoWidth,n=t.videoHeight;!this._videoMeta.scale&&e&&n&&this._onResize(this.player.root);var r=this.player.currentTime;Math.round(Math.abs(1e3*r-this._ctime))<200||(this._ctime=1e3*r,this.currentText&&this.currentText.list&&this._update(r))}}},{key:"_onResize",value:function(t){var e=this._videoMeta;if(this.config.domRender){if(t&&t instanceof window.Element||(t=this.player.root),this._iId&&(clearTimeout(this._iId),this._iId=null),!e.scale){if(!this.player.video)return;var n=this.player.video,r=n.videoWidth,i=n.videoHeight;if(!r||!i)return;e.videoWidth=r,e.videoHeight=i,e.scale=parseInt(i/r*100,10)}this.__startResize(t)}}},{key:"resize",value:function(t,e){var n=this,r=this.config,i=r.baseSizeX,o=r.baseSizeY,s=r.minMobileSize,a=r.minSize,u=r.fitVideo,c=r.offsetBottom,l=this._videoMeta.scale;this._videoMeta.lwidth=t,this._videoMeta.lheight=e;var f=void 0,h=0;e/t*100>=l?(h=parseInt(l*t,10)/100,f=t):(h=e,f=parseInt(e/l*100,10)),this._videoMeta.vWidth=f,this._videoMeta.vHeight=h;var d=0,p=0;l>120?(d=o,p=parseInt(d*h/1080,10)):(d=i,p=parseInt(d*f/1920,10));var v=Ur?s:a,y={fontSize:p=p<v?v:p>d?d:p},g=parseInt((e-h)/2,10),_=parseInt((t-f)/2,10),m=parseInt(h*c,10)/100;this._videoMeta.vBottom=g,this._videoMeta.vLeft=_,this._videoMeta.marginBottom=m,u&&(y.bottom=g+m,y.left=y.right=_),Pr(y).map(function(t){n.root.style[t]=y[t]+"px"}),this.emit(Gr.RESIZE,{vLeft:_,vBottom:g,marginBottom:m,vWidth:f,vHeight:h,fontSize:p,scale:l})}},{key:"__startResize",value:function(t){var e=this,n=t.getBoundingClientRect(),r=this._videoMeta,i=n.width,o=n.height;if(this._iId&&(clearTimeout(this._iId),this._iId=null),i>0&&o>0&&(i!==r.lwidth||o!==r.lheight))this._iC=0,this.resize(i,o);else{if(this._iC>=5)return void(this._iC=0);this._iC++,this._iId=setTimeout(function(){e.__startResize(t)},50)}}},{key:"__remove",value:function(t){var e=this;if(t&&!(t.length<1)){for(var n=this.innerRoot.children,r=[],i=0;i<n.length;i++){var o=Number(n[i].getAttribute("data-index"));t.includes(o)&&r.push(n[i])}r.map(function(t){e.innerRoot.removeChild(t)})}}},{key:"__render",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e.length>0&&this.config.domRender&&e.map(function(e){var n="text-track-"+t.config.line;e.text.map(function(r,i){i>0&&(n+=" text-track-deputy");var o={"data-start":e.start,"data-end":e.end,"data-index":e.index};t.innerRoot.appendChild(d("xg-text-track-span",r,o,n))})})}},{key:"show",value:function(){this.config.domRender&&c(this.root,"text-track-hide")}},{key:"hide",value:function(){this.config.domRender&&(u(this.root,"text-track-hide"),this.innerRoot.innerHTML="")}},{key:"destroy",value:function(){this.detachPlayer(),this.removeAllListeners(),this.player=null,this.textTrack=null}},{key:"emit",value:function(t,n){for(var r,i=arguments.length,o=Array(i>2?i-2:0),s=2;s<i;s++)o[s-2]=arguments[s];(r=en(e.prototype.__proto__||rt(e.prototype),"emit",this)).call.apply(r,[this,t,n].concat(o))}},{key:"on",value:function(t,n){for(var r,i=arguments.length,o=Array(i>2?i-2:0),s=2;s<i;s++)o[s-2]=arguments[s];(r=en(e.prototype.__proto__||rt(e.prototype),"on",this)).call.apply(r,[this,t,n].concat(o))}},{key:"once",value:function(t,n){for(var r,i=arguments.length,o=Array(i>2?i-2:0),s=2;s<i;s++)o[s-2]=arguments[s];(r=en(e.prototype.__proto__||rt(e.prototype),"once",this)).call.apply(r,[this,t,n].concat(o))}},{key:"off",value:function(t,n){for(var r,i=arguments.length,o=Array(i>2?i-2:0),s=2;s<i;s++)o[s-2]=arguments[s];(r=en(e.prototype.__proto__||rt(e.prototype),"off",this)).call.apply(r,[this,t,n].concat(o))}},{key:"offAll",value:function(){en(e.prototype.__proto__||rt(e.prototype),"removeAllListeners",this).call(this)}},{key:"marginBottom",get:function(){var t=this._videoMeta,e=t.bottom,n=t.marginBottom;return this.config.fitVideo?e+n:n}}]),e}(jr)}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self,t.XgSubtitle=e())}(this,function(){"use strict";function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function e(t,e){return e={exports:{}},t(e,e.exports),e.exports}function n(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=F(e),this.reject=F(n)}function r(t){var e=t.length;return 3===e?(60*(60*Number(t[0])+Number(t[1]))*1e3+1e3*Number(t[2]))/1e3:2===e?(60*Number(t[0])*1e3+1e3*Number(t[1]))/1e3:Number(t[0])}function i(t){return/^(\-|\+)?\d+(\.\d+)?$/.test(t)}function o(t){return t}function s(t,e){return t>=0&&t<e.length?e[t]:""}function a(t,e){if(!t)return!1;if(t.classList)return Array.prototype.some.call(t.classList,function(t){return t===e});var n=t.className&&"object"===Ye(t.className)?t.getAttribute("class"):t.className;return n&&!!n.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))}function u(t,e){t&&(t.classList?e.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach(function(e){e&&t.classList.add(e)}):a(t,e)||(t.className&&"object"===Ye(t.className)?t.setAttribute("class",t.getAttribute("class")+" "+e):t.className+=" "+e))}function c(t,e){t&&(t.classList?e.split(/\s+/g).forEach(function(e){t.classList.remove(e)}):a(t,e)&&e.split(/\s+/g).forEach(function(e){var n=new RegExp("(\\s|^)"+e+"(\\s|$)");t.className&&"object"===Ye(t.className)?t.setAttribute("class",t.getAttribute("class").replace(n," ")):t.className=t.className.replace(n," ")}))}function l(t,e,n){var r=e.length;if(r<1)return-1;if(n=n<0?0:n>=r?r-1:n,e[n].start<=t&&t<e[n].end)return n;for(var i=e[n].end<=t?n+1:0;i<r;i++){if(e[i].start<=t&&t<e[i].end)return i;if(t>e[i].end&&i+1<r&&t<e[i+1].start)return-1;if(t>e[i].end&&i+1>=r)return-1}return-1}function f(t,e,n){var r=e.length;if(r<1)return[];var i=[];if((n=n<0?0:n>=r?r-1:n)<r)for(var o=e[n].end<=t?n:0;o<r&&(e[o].start<=t&&t<e[o].end&&i.push(o),!(t<e[o].start));o++);return i}function h(t){return Object.prototype.toString.call(t).match(/([^\s.*]+)(?=]$)/g)[0]}function d(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=document.createElement(t);return i.className=r,i.innerHTML=e,Pr(n).forEach(function(e){var r=e,o=n[e];"video"===t||"audio"===t||"live-video"===t?o&&i.setAttribute(r,o):i.setAttribute(r,o)}),i}function p(){var t=navigator.userAgent,e=/(?:Windows Phone)/.test(t),n=/(?:SymbianOS)/.test(t)||e,r=/(?:Android)/.test(t),i=/(?:Firefox)/.test(t),o=/(?:iPad|PlayBook)/.test(t)||r&&!/(?:Mobile)/.test(t)||i&&/(?:Tablet)/.test(t);return/(?:iPhone)/.test(t)&&!o||r||n||o}function v(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n="";t.map(function(t){n+=" "+e+" "+t.key+" {"+t.style+"}"});var r=document.createElement("style"),i=document.head||document.getElementsByTagName("head")[0];if(r.type="text/css",r.id="ssss",r.styleSheet){var o=function(){try{r.styleSheet.cssText=n}catch(t){}};r.styleSheet.disabled?setTimeout(o,10):o()}else{var s=document.createTextNode(n);r.appendChild(s)}i.appendChild(r)}function y(t,e){Vr||(Vr=new Hr),Vr.addObserver(t,e)}function g(t,e){Vr&&Vr.unObserver(t,e)}function _(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={code:Wr[t].code,msg:Wr[t].msg};return Pr(e).map(function(t){n[t]=e[t]}),n}function m(t,e,n,r,i){i?n(_(2,i),{format:r.format}):r.format?(t.list=r.list,t.format=r.format,t.styles=r.styles,e(t)):n(_(3))}function x(t){return new Sr(function(e,n){if(t.list)return void e(t);if(t.json){var r=Br.parseJson(t.json);return t.list=r,t.format="json",void e(t)}if(t.stringContent&&!t.url)Br.parse(t.stringContent,function(r,i){m(t,e,n,r,i)});else if(t.url)new Mr({url:t.url,type:"text"}).then(function(r){Br.parse(r.res.response,function(r,i){m(t,e,n,r,i)})}).catch(function(e){var r=_(1,{statusText:e.statusText,status:e.status,type:e.type,message:"http load error",url:t.url});n(r)});else{var i=_(8);n(i)}})}function b(t,e){return!!(t.id&&t.id===e.id||t.language&&t.language===e.language)}var k=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t},w=function(t){return Object(k(t))},T={}.hasOwnProperty,O=function(t,e){return T.call(t,e)},S=e(function(t){var e=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=e)}),E=(S.version,e(function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)})),P=e(function(t){var e=E["__core-js_shared__"]||(E["__core-js_shared__"]={});(t.exports=function(t,n){return e[t]||(e[t]=void 0!==n?n:{})})("versions",[]).push({version:S.version,mode:"pure",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})}),j=0,M=Math.random(),R=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++j+M).toString(36))},A=P("keys"),C=function(t){return A[t]||(A[t]=R(t))},L=C("IE_PROTO"),N=Object.prototype,I=Object.getPrototypeOf||function(t){return t=w(t),O(t,L)?t[L]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?N:null},F=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t},z=function(t,e,n){if(F(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}},D=function(t){return"object"==typeof t?null!==t:"function"==typeof t},B=function(t){if(!D(t))throw TypeError(t+" is not an object!");return t},H=function(t){try{return!!t()}catch(t){return!0}},V=!H(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),W=E.document,G=D(W)&&D(W.createElement),U=function(t){return G?W.createElement(t):{}},$=!V&&!H(function(){return 7!=Object.defineProperty(U("div"),"a",{get:function(){return 7}}).a}),K=function(t,e){if(!D(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!D(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!D(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!D(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},J=Object.defineProperty,Y={f:V?Object.defineProperty:function(t,e,n){if(B(t),e=K(e,!0),B(n),$)try{return J(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},X=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},q=V?function(t,e,n){return Y.f(t,e,X(1,n))}:function(t,e,n){return t[e]=n,t},Z=function(t,e,n){var r,i,o,s=t&Z.F,a=t&Z.G,u=t&Z.S,c=t&Z.P,l=t&Z.B,f=t&Z.W,h=a?S:S[e]||(S[e]={}),d=h.prototype,p=a?E:u?E[e]:(E[e]||{}).prototype;a&&(n=e);for(r in n)(i=!s&&p&&void 0!==p[r])&&O(h,r)||(o=i?p[r]:n[r],h[r]=a&&"function"!=typeof p[r]?n[r]:l&&i?z(o,E):f&&p[r]==o?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(o):c&&"function"==typeof o?z(Function.call,o):o,c&&((h.virtual||(h.virtual={}))[r]=o,t&Z.R&&d&&!d[r]&&q(d,r,o)))};Z.F=1,Z.G=2,Z.S=4,Z.P=8,Z.B=16,Z.W=32,Z.U=64,Z.R=128;var Q=Z,tt=function(t,e){var n=(S.Object||{})[t]||Object[t],r={};r[t]=e(n),Q(Q.S+Q.F*H(function(){n(1)}),"Object",r)};tt("getPrototypeOf",function(){return function(t){return I(w(t))}});var et=S.Object.getPrototypeOf,nt=e(function(t){t.exports={default:et,__esModule:!0}}),rt=t(nt),it=t(e(function(t,e){e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}})),ot=Math.ceil,st=Math.floor,at=function(t){return isNaN(t=+t)?0:(t>0?st:ot)(t)},ut=q,ct={},lt={}.toString,ft=function(t){return lt.call(t).slice(8,-1)},ht=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==ft(t)?t.split(""):Object(t)},dt=function(t){return ht(k(t))},pt=Math.min,vt=function(t){return t>0?pt(at(t),9007199254740991):0},yt=Math.max,gt=Math.min,_t=function(t,e){return t=at(t),t<0?yt(t+e,0):gt(t,e)},mt=function(t){return function(e,n,r){var i,o=dt(e),s=vt(o.length),a=_t(r,s);if(t&&n!=n){for(;s>a;)if((i=o[a++])!=i)return!0}else for(;s>a;a++)if((t||a in o)&&o[a]===n)return t||a||0;return!t&&-1}}(!1),xt=C("IE_PROTO"),bt=function(t,e){var n,r=dt(t),i=0,o=[];for(n in r)n!=xt&&O(r,n)&&o.push(n);for(;e.length>i;)O(r,n=e[i++])&&(~mt(o,n)||o.push(n));return o},kt="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),wt=Object.keys||function(t){return bt(t,kt)},Tt=V?Object.defineProperties:function(t,e){B(t);for(var n,r=wt(e),i=r.length,o=0;i>o;)Y.f(t,n=r[o++],e[n]);return t},Ot=E.document,St=Ot&&Ot.documentElement,Et=C("IE_PROTO"),Pt=function(){},jt=function(){var t,e=U("iframe"),n=kt.length;for(e.style.display="none",St.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),jt=t.F;n--;)delete jt.prototype[kt[n]];return jt()},Mt=Object.create||function(t,e){var n;return null!==t?(Pt.prototype=B(t),n=new Pt,Pt.prototype=null,n[Et]=t):n=jt(),void 0===e?n:Tt(n,e)},Rt=e(function(t){var e=P("wks"),n=E.Symbol,r="function"==typeof n;(t.exports=function(t){return e[t]||(e[t]=r&&n[t]||(r?n:R)("Symbol."+t))}).store=e}),At=Y.f,Ct=Rt("toStringTag"),Lt=function(t,e,n){t&&!O(t=n?t:t.prototype,Ct)&&At(t,Ct,{configurable:!0,value:e})},Nt={};q(Nt,Rt("iterator"),function(){return this});var It=function(t,e,n){t.prototype=Mt(Nt,{next:X(1,n)}),Lt(t,e+" Iterator")},Ft=Rt("iterator"),zt=!([].keys&&"next"in[].keys()),Dt=function(){return this},Bt=function(t,e,n,r,i,o,s){It(n,e,r);var a,u,c,l=function(t){if(!zt&&t in p)return p[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},f=e+" Iterator",h="values"==i,d=!1,p=t.prototype,v=p[Ft]||p["@@iterator"]||i&&p[i],y=v||l(i),g=i?h?l("entries"):y:void 0,_="Array"==e?p.entries||v:v;if(_&&(c=I(_.call(new t)))!==Object.prototype&&c.next&&Lt(c,f,!0),h&&v&&"values"!==v.name&&(d=!0,y=function(){return v.call(this)}),s&&(zt||d||!p[Ft])&&q(p,Ft,y),ct[e]=y,ct[f]=Dt,i)if(a={values:h?y:l("values"),keys:o?y:l("keys"),entries:g},s)for(u in a)u in p||ut(p,u,a[u]);else Q(Q.P+Q.F*(zt||d),e,a);return a},Ht=function(t){return function(e,n){var r,i,o=String(k(e)),s=at(n),a=o.length;return s<0||s>=a?t?"":void 0:(r=o.charCodeAt(s),r<55296||r>56319||s+1===a||(i=o.charCodeAt(s+1))<56320||i>57343?t?o.charAt(s):r:t?o.slice(s,s+2):i-56320+(r-55296<<10)+65536)}}(!0);Bt(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=Ht(e,n),this._i+=t.length,{value:t,done:!1})});var Vt=function(t,e){return{value:e,done:!!t}};Bt(Array,"Array",function(t,e){this._t=dt(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,Vt(1)):"keys"==e?Vt(0,n):"values"==e?Vt(0,t[n]):Vt(0,[n,t[n]])},"values");ct.Arguments=ct.Array;for(var Wt=Rt("toStringTag"),Gt="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),Ut=0;Ut<Gt.length;Ut++){var $t=Gt[Ut],Kt=E[$t],Jt=Kt&&Kt.prototype;Jt&&!Jt[Wt]&&q(Jt,Wt,$t),ct[$t]=ct.Array}var Yt={f:Rt},Xt=Yt.f("iterator"),qt=e(function(t){t.exports={default:Xt,__esModule:!0}});t(qt);var Zt=e(function(t){var e=R("meta"),n=Y.f,r=0,i=Object.isExtensible||function(){return!0},o=!H(function(){return i(Object.preventExtensions({}))}),s=function(t){n(t,e,{value:{i:"O"+ ++r,w:{}}})},a=function(t,n){if(!D(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!O(t,e)){if(!i(t))return"F";if(!n)return"E";s(t)}return t[e].i},u=function(t,n){if(!O(t,e)){if(!i(t))return!0;if(!n)return!1;s(t)}return t[e].w},c=function(t){return o&&l.NEED&&i(t)&&!O(t,e)&&s(t),t},l=t.exports={KEY:e,NEED:!1,fastKey:a,getWeak:u,onFreeze:c}}),Qt=(Zt.KEY,Zt.NEED,Zt.fastKey,Zt.getWeak,Zt.onFreeze,Y.f),te=function(t){var e=S.Symbol||(S.Symbol={});"_"==t.charAt(0)||t in e||Qt(e,t,{value:Yt.f(t)})},ee={f:Object.getOwnPropertySymbols},ne={f:{}.propertyIsEnumerable},re=function(t){var e=wt(t),n=ee.f;if(n)for(var r,i=n(t),o=ne.f,s=0;i.length>s;)o.call(t,r=i[s++])&&e.push(r);return e},ie=Array.isArray||function(t){return"Array"==ft(t)},oe=kt.concat("length","prototype"),se={f:Object.getOwnPropertyNames||function(t){return bt(t,oe)}},ae=se.f,ue={}.toString,ce="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],le=function(t){try{return ae(t)}catch(t){return ce.slice()}},fe={f:function(t){return ce&&"[object Window]"==ue.call(t)?le(t):ae(dt(t))}},he=Object.getOwnPropertyDescriptor,de={f:V?he:function(t,e){if(t=dt(t),e=K(e,!0),$)try{return he(t,e)}catch(t){}if(O(t,e))return X(!ne.f.call(t,e),t[e])}},pe=Zt.KEY,ve=de.f,ye=Y.f,ge=fe.f,_e=E.Symbol,me=E.JSON,xe=me&&me.stringify,be=Rt("_hidden"),ke=Rt("toPrimitive"),we={}.propertyIsEnumerable,Te=P("symbol-registry"),Oe=P("symbols"),Se=P("op-symbols"),Ee=Object.prototype,Pe="function"==typeof _e&&!!ee.f,je=E.QObject,Me=!je||!je.prototype||!je.prototype.findChild,Re=V&&H(function(){return 7!=Mt(ye({},"a",{get:function(){return ye(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=ve(Ee,e);r&&delete Ee[e],ye(t,e,n),r&&t!==Ee&&ye(Ee,e,r)}:ye,Ae=function(t){var e=Oe[t]=Mt(_e.prototype);return e._k=t,e},Ce=Pe&&"symbol"==typeof _e.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof _e},Le=function(t,e,n){return t===Ee&&Le(Se,e,n),B(t),e=K(e,!0),B(n),O(Oe,e)?(n.enumerable?(O(t,be)&&t[be][e]&&(t[be][e]=!1),n=Mt(n,{enumerable:X(0,!1)})):(O(t,be)||ye(t,be,X(1,{})),t[be][e]=!0),Re(t,e,n)):ye(t,e,n)},Ne=function(t,e){B(t);for(var n,r=re(e=dt(e)),i=0,o=r.length;o>i;)Le(t,n=r[i++],e[n]);return t},Ie=function(t,e){return void 0===e?Mt(t):Ne(Mt(t),e)},Fe=function(t){var e=we.call(this,t=K(t,!0));return!(this===Ee&&O(Oe,t)&&!O(Se,t))&&(!(e||!O(this,t)||!O(Oe,t)||O(this,be)&&this[be][t])||e)},ze=function(t,e){if(t=dt(t),e=K(e,!0),t!==Ee||!O(Oe,e)||O(Se,e)){var n=ve(t,e);return!n||!O(Oe,e)||O(t,be)&&t[be][e]||(n.enumerable=!0),n}},De=function(t){for(var e,n=ge(dt(t)),r=[],i=0;n.length>i;)O(Oe,e=n[i++])||e==be||e==pe||r.push(e);return r},Be=function(t){for(var e,n=t===Ee,r=ge(n?Se:dt(t)),i=[],o=0;r.length>o;)!O(Oe,e=r[o++])||n&&!O(Ee,e)||i.push(Oe[e]);return i};Pe||(ut((_e=function(){if(this instanceof _e)throw TypeError("Symbol is not a constructor!");var t=R(arguments.length>0?arguments[0]:void 0),e=function(n){this===Ee&&e.call(Se,n),O(this,be)&&O(this[be],t)&&(this[be][t]=!1),Re(this,t,X(1,n))};return V&&Me&&Re(Ee,t,{configurable:!0,set:e}),Ae(t)}).prototype,"toString",function(){return this._k}),de.f=ze,Y.f=Le,se.f=fe.f=De,ne.f=Fe,ee.f=Be,Yt.f=function(t){return Ae(Rt(t))}),Q(Q.G+Q.W+Q.F*!Pe,{Symbol:_e});for(var He="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Ve=0;He.length>Ve;)Rt(He[Ve++]);for(var We=wt(Rt.store),Ge=0;We.length>Ge;)te(We[Ge++]);Q(Q.S+Q.F*!Pe,"Symbol",{for:function(t){return O(Te,t+="")?Te[t]:Te[t]=_e(t)},keyFor:function(t){if(!Ce(t))throw TypeError(t+" is not a symbol!");for(var e in Te)if(Te[e]===t)return e},useSetter:function(){Me=!0},useSimple:function(){Me=!1}}),Q(Q.S+Q.F*!Pe,"Object",{create:Ie,defineProperty:Le,defineProperties:Ne,getOwnPropertyDescriptor:ze,getOwnPropertyNames:De,getOwnPropertySymbols:Be});var Ue=H(function(){ee.f(1)});Q(Q.S+Q.F*Ue,"Object",{getOwnPropertySymbols:function(t){return ee.f(w(t))}}),me&&Q(Q.S+Q.F*(!Pe||H(function(){var t=_e();return"[null]"!=xe([t])||"{}"!=xe({a:t})||"{}"!=xe(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(D(e)||void 0!==t)&&!Ce(t))return ie(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!Ce(e))return e}),r[1]=e,xe.apply(me,r)}}),_e.prototype[ke]||q(_e.prototype,ke,_e.prototype.valueOf),Lt(_e,"Symbol"),Lt(Math,"Math",!0),Lt(E.JSON,"JSON",!0),te("asyncIterator"),te("observable");var $e=S.Symbol,Ke=e(function(t){t.exports={default:$e,__esModule:!0}});t(Ke);var Je=e(function(t,e){function n(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var r=n(qt),i=n(Ke),o="function"==typeof i.default&&"symbol"==typeof r.default?function(t){return typeof t}:function(t){return t&&"function"==typeof i.default&&t.constructor===i.default&&t!==i.default.prototype?"symbol":typeof t};e.default="function"==typeof i.default&&"symbol"===o(r.default)?function(t){return void 0===t?"undefined":o(t)}:function(t){return t&&"function"==typeof i.default&&t.constructor===i.default&&t!==i.default.prototype?"symbol":void 0===t?"undefined":o(t)}}),Ye=t(Je),Xe=t(e(function(t,e){e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{default:t}}(Je);e.default=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":(0,n.default)(e))&&"function"!=typeof e?t:e}})),qe=de.f;tt("getOwnPropertyDescriptor",function(){return function(t,e){return qe(dt(t),e)}});var Ze=S.Object,Qe=function(t,e){return Ze.getOwnPropertyDescriptor(t,e)},tn=e(function(t){t.exports={default:Qe,__esModule:!0}});t(tn);var en=t(e(function(t,e){function n(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var r=n(nt),i=n(tn);e.default=function t(e,n,o){null===e&&(e=Function.prototype);var s=(0,i.default)(e,n);if(void 0===s){var a=(0,r.default)(e);return null===a?void 0:t(a,n,o)}if("value"in s)return s.value;var u=s.get;if(void 0!==u)return u.call(o)}}));Q(Q.S+Q.F*!V,"Object",{defineProperty:Y.f});var nn=S.Object,rn=function(t,e,n){return nn.defineProperty(t,e,n)},on=e(function(t){t.exports={default:rn,__esModule:!0}});t(on);var sn=t(e(function(t,e){e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{default:t}}(on);e.default=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),(0,n.default)(t,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}()})),an=function(t,e){if(B(t),!D(e)&&null!==e)throw TypeError(e+": can't set as prototype!")},un={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,n){try{(n=z(Function.call,de.f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,r){return an(t,r),e?t.__proto__=r:n(t,r),t}}({},!1):void 0),check:an};Q(Q.S,"Object",{setPrototypeOf:un.set});var cn=S.Object.setPrototypeOf,ln=e(function(t){t.exports={default:cn,__esModule:!0}});t(ln),Q(Q.S,"Object",{create:Mt});var fn=S.Object,hn=function(t,e){return fn.create(t,e)},dn=e(function(t){t.exports={default:hn,__esModule:!0}});t(dn);var pn,vn,yn,gn=t(e(function(t,e){function n(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var r=n(ln),i=n(dn),o=n(Je);e.default=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":(0,o.default)(e)));t.prototype=(0,i.default)(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(r.default?(0,r.default)(t,e):t.__proto__=e)}})),_n=Rt("toStringTag"),mn="Arguments"==ft(function(){return arguments}()),xn=function(t,e){try{return t[e]}catch(t){}},bn=function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=xn(e=Object(t),_n))?n:mn?ft(e):"Object"==(r=ft(e))&&"function"==typeof e.callee?"Arguments":r},kn=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t},wn=function(t,e,n,r){try{return r?e(B(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&B(i.call(t)),e}},Tn=Rt("iterator"),On=Array.prototype,Sn=function(t){return void 0!==t&&(ct.Array===t||On[Tn]===t)},En=Rt("iterator"),Pn=S.getIteratorMethod=function(t){if(void 0!=t)return t[En]||t["@@iterator"]||ct[bn(t)]},jn=e(function(t){var e={},n={},r=t.exports=function(t,r,i,o,s){var a,u,c,l,f=s?function(){return t}:Pn(t),h=z(i,o,r?2:1),d=0;if("function"!=typeof f)throw TypeError(t+" is not iterable!");if(Sn(f)){for(a=vt(t.length);a>d;d++)if((l=r?h(B(u=t[d])[0],u[1]):h(t[d]))===e||l===n)return l}else for(c=f.call(t);!(u=c.next()).done;)if((l=wn(c,h,u.value,r))===e||l===n)return l};r.BREAK=e,r.RETURN=n}),Mn=Rt("species"),Rn=function(t,e){var n,r=B(t).constructor;return void 0===r||void 0==(n=B(r)[Mn])?e:F(n)},An=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)},Cn=E.process,Ln=E.setImmediate,Nn=E.clearImmediate,In=E.MessageChannel,Fn=E.Dispatch,zn=0,Dn={},Bn=function(){var t=+this;if(Dn.hasOwnProperty(t)){var e=Dn[t];delete Dn[t],e()}},Hn=function(t){Bn.call(t.data)};Ln&&Nn||(Ln=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return Dn[++zn]=function(){An("function"==typeof t?t:Function(t),e)},pn(zn),zn},Nn=function(t){delete Dn[t]},"process"==ft(Cn)?pn=function(t){Cn.nextTick(z(Bn,t,1))}:Fn&&Fn.now?pn=function(t){Fn.now(z(Bn,t,1))}:In?(yn=(vn=new In).port2,vn.port1.onmessage=Hn,pn=z(yn.postMessage,yn,1)):E.addEventListener&&"function"==typeof postMessage&&!E.importScripts?(pn=function(t){E.postMessage(t+"","*")},E.addEventListener("message",Hn,!1)):pn="onreadystatechange"in U("script")?function(t){St.appendChild(U("script")).onreadystatechange=function(){St.removeChild(this),Bn.call(t)}}:function(t){setTimeout(z(Bn,t,1),0)});var Vn={set:Ln,clear:Nn},Wn=Vn.set,Gn=E.MutationObserver||E.WebKitMutationObserver,Un=E.process,$n=E.Promise,Kn="process"==ft(Un),Jn={f:function(t){return new n(t)}},Yn=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}},Xn=E.navigator,qn=Xn&&Xn.userAgent||"",Zn=function(t,e){if(B(t),D(e)&&e.constructor===t)return e;var n=Jn.f(t);return(0,n.resolve)(e),n.promise},Qn=Rt("species"),tr=Rt("iterator"),er=!1;try{var nr=[7][tr]();nr.return=function(){er=!0},Array.from(nr,function(){throw 2})}catch(t){}var rr,ir,or,sr,ar=Vn.set,ur=function(){var t,e,n,r=function(){var r,i;for(Kn&&(r=Un.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(Kn)n=function(){Un.nextTick(r)};else if(!Gn||E.navigator&&E.navigator.standalone)if($n&&$n.resolve){var i=$n.resolve(void 0);n=function(){i.then(r)}}else n=function(){Wn.call(E,r)};else{var o=!0,s=document.createTextNode("");new Gn(r).observe(s,{characterData:!0}),n=function(){s.data=o=!o}}return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}}(),cr=E.TypeError,lr=E.process,fr=lr&&lr.versions,hr=fr&&fr.v8||"",dr=E.Promise,pr="process"==bn(lr),vr=function(){},yr=ir=Jn.f,gr=!!function(){try{var t=dr.resolve(1),e=(t.constructor={})[Rt("species")]=function(t){t(vr,vr)};return(pr||"function"==typeof PromiseRejectionEvent)&&t.then(vr)instanceof e&&0!==hr.indexOf("6.6")&&-1===qn.indexOf("Chrome/66")}catch(t){}}(),_r=function(t){var e;return!(!D(t)||"function"!=typeof(e=t.then))&&e},mr=function(t,e){if(!t._n){t._n=!0;var n=t._c;ur(function(){for(var r=t._v,i=1==t._s,o=0;n.length>o;)!function(e){var n,o,s,a=i?e.ok:e.fail,u=e.resolve,c=e.reject,l=e.domain;try{a?(i||(2==t._h&&kr(t),t._h=1),!0===a?n=r:(l&&l.enter(),n=a(r),l&&(l.exit(),s=!0)),n===e.promise?c(cr("Promise-chain cycle")):(o=_r(n))?o.call(n,u,c):u(n)):c(r)}catch(t){l&&!s&&l.exit(),c(t)}}(n[o++]);t._c=[],t._n=!1,e&&!t._h&&xr(t)})}},xr=function(t){ar.call(E,function(){var e,n,r,i=t._v,o=br(t);if(o&&(e=Yn(function(){pr?lr.emit("unhandledRejection",i,t):(n=E.onunhandledrejection)?n({promise:t,reason:i}):(r=E.console)&&r.error&&r.error("Unhandled promise rejection",i)}),t._h=pr||br(t)?2:1),t._a=void 0,o&&e.e)throw e.v})},br=function(t){return 1!==t._h&&0===(t._a||t._c).length},kr=function(t){ar.call(E,function(){var e;pr?lr.emit("rejectionHandled",t):(e=E.onrejectionhandled)&&e({promise:t,reason:t._v})})},wr=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),mr(e,!0))},Tr=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw cr("Promise can't be resolved itself");(e=_r(t))?ur(function(){var r={_w:n,_d:!1};try{e.call(t,z(Tr,r,1),z(wr,r,1))}catch(t){wr.call(r,t)}}):(n._v=t,n._s=1,mr(n,!1))}catch(t){wr.call({_w:n,_d:!1},t)}}};gr||(dr=function(t){kn(this,dr,"Promise","_h"),F(t),rr.call(this);try{t(z(Tr,this,1),z(wr,this,1))}catch(t){wr.call(this,t)}},(rr=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=function(t,e,n){for(var r in e)n&&t[r]?t[r]=e[r]:q(t,r,e[r]);return t}(dr.prototype,{then:function(t,e){var n=yr(Rn(this,dr));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=pr?lr.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&mr(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),or=function(){var t=new rr;this.promise=t,this.resolve=z(Tr,t,1),this.reject=z(wr,t,1)},Jn.f=yr=function(t){return t===dr||t===sr?new or(t):ir(t)}),Q(Q.G+Q.W+Q.F*!gr,{Promise:dr}),Lt(dr,"Promise"),function(t){var e="function"==typeof S[t]?S[t]:E[t];V&&e&&!e[Qn]&&Y.f(e,Qn,{configurable:!0,get:function(){return this}})}("Promise"),sr=S.Promise,Q(Q.S+Q.F*!gr,"Promise",{reject:function(t){var e=yr(this);return(0,e.reject)(t),e.promise}}),Q(Q.S+!0*Q.F,"Promise",{resolve:function(t){return Zn(this===sr?dr:this,t)}}),Q(Q.S+Q.F*!(gr&&function(t,e){if(!e&&!er)return!1;var n=!1;try{var r=[7],i=r[tr]();i.next=function(){return{done:n=!0}},r[tr]=function(){return i},t(r)}catch(t){}return n}(function(t){dr.all(t).catch(vr)})),"Promise",{all:function(t){var e=this,n=yr(e),r=n.resolve,i=n.reject,o=Yn(function(){var n=[],o=0,s=1;jn(t,!1,function(t){var a=o++,u=!1;n.push(void 0),s++,e.resolve(t).then(function(t){u||(u=!0,n[a]=t,--s||r(n))},i)}),--s||r(n)});return o.e&&i(o.v),n.promise},race:function(t){var e=this,n=yr(e),r=n.reject,i=Yn(function(){jn(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}}),Q(Q.P+Q.R,"Promise",{finally:function(t){var e=Rn(this,S.Promise||E.Promise),n="function"==typeof t;return this.then(n?function(n){return Zn(e,t()).then(function(){return n})}:t,n?function(n){return Zn(e,t()).then(function(){throw n})}:t)}}),Q(Q.S,"Promise",{try:function(t){var e=Jn.f(this),n=Yn(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}});var Or=S.Promise,Sr=t(e(function(t){t.exports={default:Or,__esModule:!0}}));tt("keys",function(){return function(t){return wt(w(t))}});var Er=S.Object.keys,Pr=t(e(function(t){t.exports={default:Er,__esModule:!0}})),jr=e(function(t){function e(){}function n(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function r(t,e,r,i,o){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new n(r,i||t,o),u=a?a+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],s]:t._events[u].push(s):(t._events[u]=s,t._eventsCount++),t}function i(t,n){0==--t._eventsCount?t._events=new e:delete t._events[n]}function o(){this._events=new e,this._eventsCount=0}var s=Object.prototype.hasOwnProperty,a="~";Object.create&&(e.prototype=Object.create(null),(new e).__proto__||(a=!1)),o.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)s.call(t,e)&&n.push(a?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},o.prototype.listeners=function(t){var e=a?a+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,i=n.length,o=new Array(i);r<i;r++)o[r]=n[r].fn;return o},o.prototype.listenerCount=function(t){var e=a?a+t:t,n=this._events[e];return n?n.fn?1:n.length:0},o.prototype.emit=function(t,e,n,r,i,o){var s=a?a+t:t;if(!this._events[s])return!1;var u,c,l=this._events[s],f=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,n),!0;case 4:return l.fn.call(l.context,e,n,r),!0;case 5:return l.fn.call(l.context,e,n,r,i),!0;case 6:return l.fn.call(l.context,e,n,r,i,o),!0}for(c=1,u=new Array(f-1);c<f;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var h,d=l.length;for(c=0;c<d;c++)switch(l[c].once&&this.removeListener(t,l[c].fn,void 0,!0),f){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,e);break;case 3:l[c].fn.call(l[c].context,e,n);break;case 4:l[c].fn.call(l[c].context,e,n,r);break;default:if(!u)for(h=1,u=new Array(f-1);h<f;h++)u[h-1]=arguments[h];l[c].fn.apply(l[c].context,u)}}return!0},o.prototype.on=function(t,e,n){return r(this,t,e,n,!1)},o.prototype.once=function(t,e,n){return r(this,t,e,n,!0)},o.prototype.removeListener=function(t,e,n,r){var o=a?a+t:t;if(!this._events[o])return this;if(!e)return i(this,o),this;var s=this._events[o];if(s.fn)s.fn!==e||r&&!s.once||n&&s.context!==n||i(this,o);else{for(var u=0,c=[],l=s.length;u<l;u++)(s[u].fn!==e||r&&!s[u].once||n&&s[u].context!==n)&&c.push(s[u]);c.length?this._events[o]=1===c.length?c[0]:c:i(this,o)}return this},o.prototype.removeAllListeners=function(t){var n;return t?(n=a?a+t:t,this._events[n]&&i(this,n)):(this._events=new e,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=a,o.EventEmitter=o,t.exports=o}),Mr=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url,r=e.method,i=void 0===r?"GET":r,o=e.type,s=void 0===o?"arraybuffer":o,a=e.timeout,u=void 0===a?1e4:a,c=e.data,l=void 0===c?{}:c,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return it(this,t),new Sr(function(t,e){var r=new window.XMLHttpRequest,o=i.toUpperCase(),a=[];s&&(r.responseType=s),u&&(r.timeout=u);for(var c in l)a.push("k="+l[c]);if(r.onload=function(){200===r.status||206===r.status?t({context:f,res:r}):e(new Error({context:f,res:r,type:"error"}))},r.onerror=function(t){e(new Error({context:f,res:r,type:"error"}))},r.ontimeout=function(t){e(new Error({context:f,res:r,type:"error"}))},r.onabort=function(){e(new Error({context:f,res:r,type:"error"}))},"GET"===o)r.open(o,""+n),r.send();else{if("post"!==o)throw new Error("xhr "+o+" is not supported");r.open(o,n),r.setRequestHeader("Content-type","application/x-www-form-urlencoded"),r.send(a.join("&"))}})},Rr=/^WEBVTT/,Ar=/^STYLE+$/,Cr=/^\:\:cue/,Lr=/^}+$/,Nr=/^\[Script Info\].*/,Ir=[/[0-9]{1,3}:[0-9]{2}:[0-9]{2}\.[0-9]{1,3}-->[0-9]{1,3}:[0-9]{2}:[0-9]{2}\.[0-9]{1,3}/,/[0-9]{1,2}:[0-9]{2}\.[0-9]{1,3}-->[0-9]{1,2}:[0-9]{2}\.[0-9]{1,3}/,/[0-9]{1,2}\.[0-9]{1,3}-->[0-9]{1,2}\.[0-9]{1,3}/],Fr=/^Format:\s/,zr=/^Style:\s/,Dr=/^Dialogue:\s/,Br=function(){function t(){it(this,t)}return sn(t,null,[{key:"parseJson",value:function(t){for(var e=[],n=0,r=0;r<t.length;r++){if(n>=50&&(n=0),0===n){var i={start:t[r].start,list:[t[r]],end:t[r].end};e.push(i)}else e[e.length-1].list.push(t[r]),e[e.length-1].end=t[r].end;n++}return e}},{key:"parse",value:function(e,n){var r=t.checkFormat(e);r||n({format:r});try{var i=[];"ass"===r?i=t.parseASS(e):"vtt"===r&&(i=t.parseVTT(e)),n({format:r,list:i.list,styles:i.styles})}catch(t){console.error(t),n({format:r},t)}}},{key:"parseASSItem",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=t.split(","),i={},s="";try{var a=n.length-e.length;return s=a>0?n.splice(e.length-1,a+1).join(",")+"":n[n.length-1]+"",s=s.replace(/\\n+/g,""),s=o(s),n[e.length-1]=s,e.map(function(t,e){"end"===t||"start"===t?i[t]=r(n[e].split(":")):"text"===t?i[t]=[n[e]]:"layer"===t?(i[t]=[n[e]],i.textTag=[n[e]]):i[t]="style"===t?[n[e]]:Number(n[e])?Number(n[e]):n[e]}),i}catch(t){return console.error(t),{}}}},{key:"parseASS",value:function(e){for(var n=e.split("\n"),r=[],i=0,o=0,s=[],a=[],u=null;i<n.length;){if(Fr.test(n[i]))a=(a=n[i].replace(Fr,"").replace(/\s+/g,"").split(",")).map(function(t){return t.toLocaleLowerCase()});else if(zr.test(n[i]))s.push(n[i].replace(zr,"").replace(/\s+/g,""));else if(Dr.test(n[i])){var c=t.parseASSItem(n[i].replace(Dr,""),a);if(u&&c.start===u.start&&c.end===u.end)try{var l=u,f=l.text,h=l.textTag,d=l.style;f.push(c.text[0]),h.push(c.textTag[0]),d.push(c.style[0])}catch(t){console.error(t)}else{u=c;var p=null;o%50==0?((p={start:u.start,end:u.end,list:[]}).list.push(u),r.push(p)):((p=r[r.length-1]).end=u.end,p.list.push(u)),o++}}i++}return{list:r,style:{}}}},{key:"parseVTTStyle",value:function(t,e){var n=t.split(":");if(n.length>1){var r=n[0].trim().split("-"),i="";r.length>1?r.map(function(t,e){i+=0===e?t:t.charAt(0).toUpperCase()+t.slice(1)}):i=r[0],e[i]=n[1].trim().replace(/;$/,"")}return e}},{key:"parseVTT",value:function(t){for(var e=(t=t.replace(Rr,"")).split("\n"),n=[],r=0,o=0,a=null,u=!1,c=!1,l=null,f=null,h=[];r<e.length;){var d=s(r,e).trim();if(!d||u&&i(d))u=!d;else if(Cr.test(d)&&Ar.test(s(r-1,e).trim())){c=!0;var p=/\((.+?)\)/g.exec(d);f=p?p[1]:"",l=""}else if(c)Lr.test(d)?(h.push({key:f,style:l}),l=null,f=null,c=!1):l+=d;else if(d){u=!1;var v=this.checkIsTime(e[r]);if(v){var y=this.parseVttTime(v);if(!a||y.start!==a.start||y.end!==a.end){(a=y).text=[],a.textTag=[];var g=null;o%50==0?((g={start:a.start,end:a.end,list:[]}).list.push(a),n.push(g)):((g=n[n.length-1]).end=a.end,g.list.push(a)),o++}}else if(a){var _=a,m=_.text,x=_.textTag,b=this.parseVttText(e[r]);m.push(b.text),x.push(b.tag)}u=!1}r++}return{list:n,styles:h}}},{key:"checkIsTime",value:function(t){t=t.replace(/\s+/g,"");for(var e=0,n=null;e<Ir.length&&!(n=Ir[e].exec(t));)e++;return n?n[0]:null}},{key:"parseVttText",value:function(t){var e=/^(<?.+?>)/g.exec(t),n="",r="default";if(e){r=e[0].replace(/\<|\>|\&/g,"");var i=RegExp("^<"+r+">(([\\s\\S])*?)</"+r+">$").exec(t);i?n=i[1]:(n=t,r="")}else n=t;for(var s=/<(\w+).(\w+)>/g,a=s.exec(n);a&&a.length>2;)n=n.replace(a[0],"<"+a[1]+' class="'+a[2]+'">'),a=s.exec(n);return{tag:r,text:o(n.replace(/\\n+/g,"<br/>"))}}},{key:"parseVttTime",value:function(t){var e=t.split("--\x3e"),n=void 0,i=0;if(2===e.length){var o=e[0].split(":"),s=e[1].split(":");n=r(o),i=r(s)}return{start:n,end:i,time:t}}},{key:"isVTT",value:function(t){return Rr.test(t)}},{key:"isASS",value:function(t){return Nr.test(t)}},{key:"checkFormat",value:function(t){return t?Rr.test(t)?"vtt":Nr.test(t)?"ass":null:null}}]),t}(),Hr=function(){function t(){var e=this;it(this,t),this.__handlers=[],window.ResizeObserver&&(this.observer=new window.ResizeObserver(function(t){e.__trigger(t)}))}return sn(t,[{key:"addObserver",value:function(t,e){if(this.observer){this.observer&&this.observer.observe(t);for(var n=this.__handlers,r=-1,i=0;i<n.length;i++)n[i]&&t===n[i].target&&(r=i);r>-1?this.__handlers[r].handler.push(e):this.__handlers.push({target:t,handler:[e]})}}},{key:"unObserver",value:function(t){var e=-1;this.__handlers.map(function(n,r){t===n.target&&(e=r)}),this.observer&&this.observer.unobserve(t),e>-1&&this.__handlers.splice(e,1)}},{key:"destroyObserver",value:function(){this.observer&&this.observer.disconnect(),this.observer=null,this.__handlers=null}},{key:"__runHandler",value:function(t,e){for(var n=this.__handlers,r=0;r<n.length;r++)if(n[r]&&t===n[r].target){n[r].handler&&n[r].handler.map(function(n){try{n(t,e)}catch(t){console.error(t)}});break}}},{key:"__trigger",value:function(t){var e=this;t.map(function(t){var n=t.contentRect;e.__runHandler(t.target,n)})}}]),t}(),Vr=null;!function(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}}('xg-text-track.xg-text-track {\n font-family: "PingFang SC","SF Pro SC","SF Pro Text","SF Pro Icons","Helvetica Neue","Helvetica","Arial",sans-serif;\n -webkit-font-smoothing: antialiased;\n position: absolute;\n bottom: 0;\n color: #fff;\n left: 0;\n right: 0;\n pointer-events: none;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center; }\n xg-text-track.xg-text-track.text-track-no-fitvideo {\n margin-bottom: 2%; }\n xg-text-track.xg-text-track.text-track-hide {\n opacity: 0;\n visibility: hidden; }\n xg-text-track.xg-text-track.text-track-show {\n opacity: 1;\n visibility: visible; }\n xg-text-track.xg-text-track xg-text-track-inner {\n display: block;\n max-width: 92%; }\n xg-text-track.xg-text-track xg-text-track-span {\n display: -webkit-box;\n text-align: center;\n text-overflow: ellipsis;\n -webkit-box-orient: vertical;\n overflow: hidden;\n padding: 1px 4px;\n -webkit-line-clamp: 1;\n line-height: 120%;\n word-break: break-word; }\n xg-text-track.xg-text-track xg-text-track-span.text-track-deputy {\n font-size: 75%; }\n xg-text-track.xg-text-track xg-text-track-span.text-track-single {\n -webkit-line-clamp: 1; }\n xg-text-track.xg-text-track xg-text-track-span.text-track-double {\n -webkit-line-clamp: 2; }\n xg-text-track.xg-text-track xg-text-track-span.text-track-three {\n -webkit-line-clamp: 3; }\n xg-text-track.xg-text-track.text-track-bg xg-text-track-inner {\n background-color: rgba(0, 0, 0, .54);\n border-radius: 2px; }\n xg-text-track.xg-text-track.text-track-stroke xg-text-track-inner {\n background-color: none;\n border-radius: 0;\n text-shadow: -1px 1px 0 rgba(0, 0, 0, .7), 1px 1px 0 rgba(0, 0, 0, .7), 1px -1px 0 rgba(0, 0, 0, .7), -1px -1px 0 rgba(0, 0, 0, .7); }\n');var Wr=[{code:0,msg:"SUCCESS"},{code:1,msg:"LOAD_ERROR"},{code:2,msg:"PARSER_ERROR"},{code:3,msg:"FORMAT_NOT_SUPPORTED"},{code:4,msg:"ID_OR_LANGUAGE_NOT_EXIST"},{code:5,msg:"PARAMETERS_ERROR"},{code:6,msg:"ABORT"},{code:7,msg:"UNKNOWN"},{code:8,msg:"DATA_ERROR:subtitle.url is null"}],Gr={RESIZE:"resize"},Ur=!1;return function(t){function e(t){it(this,e);var n=Xe(this,(e.__proto__||rt(e)).call(this));return Ur=p(),n.currentText=null,n.currentExtText=null,n.textTrack=[],n._cid=-1,n._gid=-1,n._cids=[],n._iId=null,n._iC=0,n.player=null,n.root=null,n.config={line:"double",bottom:0,mode:"stroke",defaultOpen:!1,baseSizeX:49,baseSizeY:28,minSize:16,minMobileSize:13,fitVideo:!0,offsetBottom:2,fontColor:"#fff",domRender:!0},n._ctime=0,n._loadingTrack={},Pr(n.config).map(function(e){void 0!==t[e]&&null!==t[e]&&(n.config[e]=t[e])}),n._isOpen=!1,n._videoMeta={scale:0,videoHeight:0,videoWidth:0,lwidth:0,lheight:0,vWidth:0,vHeight:0,vBottom:0,vLeft:0,marginBottom:0},t.subTitles&&"Array"===h(t.subTitles)?(t.player&&n.attachPlayer(t.player),n.setSubTitles(t.subTitles,n.config.defaultOpen),n):Xe(n)}return gn(e,t),sn(e,[{key:"version",get:function(){return"1.0.23"}}]),sn(e,[{key:"setSubTitles",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=this._isOpen||n;r&&this.innerRoot&&this.switchOff(),this.currentText=null,this.textTrack=[],t.map(function(t){var n={};Pr(t).map(function(e){n[e]=t[e]}),n.isDefault&&(e.currentText=n),e.textTrack.push(n)}),this.currentText&&x(this.currentText).then(function(t){e.addStyles(t),i&&e.switch()})}},{key:"addStyles",value:function(t){var e=t.styles,n=t.format;e&&"vtt"===n&&(e.map(function(t){t.key||(t.key="xg-text-track-span")}),v(e,"xg-text-track"))}},{key:"attachPlayer",value:function(t){var e=this;if(t){this.player&&this.detachPlayer();var n=this.config,r=n.fontColor,i=n.mode,o=n.fitVideo,s=n.domRender;this.player=t,s&&(this.root=document.createElement("xg-text-track"),this.root.className="xg-text-track",!this._isOpen&&u(this.root,"text-track-hide"),!o&&u(this.root,"text-track-no-fitvideo"),i&&u(this.root,"text-track-"+i),this.innerRoot=document.createElement("xg-text-track-inner"),this.root.appendChild(this.innerRoot),r&&(this.root.style.color=r),this.currentText&&["language","id","label"].map(function(t){e.root.setAttribute("data-"+t,e.currentText[t]||"")}),this.player.root.appendChild(this.root),y(t.root,this._onResize)),["destroy","__onTimeupdate","_onResize"].map(function(t){e[t]=e[t].bind(e)}),this.player.on("destroy",this.destroy),this.player.on("timeupdate",this.__onTimeupdate),this._isOpen&&this.switch()}}},{key:"detachPlayer",value:function(){var t=this.player,e=this.config;t&&(t.off("destroy",this.destroy),t.off("timeupdate",this.__onTimeupdate),e.domRender&&(t.root&&(g(t.root,this._onResize),t.root.removeChild(this.root)),this.innerRoot=null,this.root=null),this.player=null)}},{key:"switch",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:"",language:""};return this._loadingTrack=e,new Sr(function(n,r){if(!e.id&&!e.language){if(t.currentText){t._loadingTrack={},t._updateCurrent(t.currentText),t.switchOn();var i=_(0,{message:"switch default subtitle success"});return void n(i)}var o=_(5,{message:"no default subtitle"});return void r(o)}if(t.currentText&&b(e,t.currentText))t._loadingTrack={},t._updateCurrent(t.currentText),t.switchOn(),n(_(0));else{for(var s=null,a=0;a<t.textTrack.length;a++)if(b(e,t.textTrack[a])){s=t.textTrack[a];break}if(s)s.list?(t._loadingTrack={},t._updateCurrent(s),t.switchOn(),n(_(0))):x(s).then(function(e){if(t.addStyles(e),t._loadingTrack.id===s.id||t._loadingTrack.language===e.language)t._loadingTrack={},t._updateCurrent(e),t.switchOn(),n(_(0));else{var i=_(6,{message:"check _loadingTrack fail id: "+t._loadingTrack.id+" nextSubtitle:"+e.id});console.trace(i),r(i)}}).catch(function(t){r(t)});else{var u=_(4,new Error("The is no subtitle with id:[{"+e.id+"}] or language:["+e.language+"]"));console.trace(u),r(u)}}})}},{key:"switchExt",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:"",language:""};return new Sr(function(n,r){if(e.id||e.language){for(var i=null,o=0;o<t.textTrack.length;o++)if(b(e,t.textTrack[o])){i=t.textTrack[o];break}i&&!b(i,t.currentText)&&x(i).then(function(e){t.currentExtText=e,n(_(0))})}else t.currentExtText=null,n(_(0))})}},{key:"switchOn",value:function(){this._isOpen=!0,this.show(),this.emit("on",this.currentText)}},{key:"switchOff",value:function(){this._isOpen=!1,this.hide(),this.emit("off")}},{key:"_updateCurrent",value:function(t){var e=this;this.currentText=t,this.config.domRender&&this.root&&(["language","id","label"].map(function(t){e.root.setAttribute("data-"+t,e.currentText[t]||"")}),this.__remove(this._cids));var n=this.player.currentTime;this._cids=[],this._gid=-1,this._cid=-1,this._update(n)}},{key:"__loadAll",value:function(){this.textTrack.map(function(t){x(t)})}},{key:"getDelCid",value:function(t,e){for(var n=[],r=0;r<t.length;r++)e.includes(t[r])||n.push(t[r]);return n}},{key:"getNewCid",value:function(t,e){for(var n=[],r=0;r<e.length;r++)t.includes(e[r])||n.push(e[r]);return n}},{key:"_update",value:function(t){var e=this,n=l(t,this.currentText.list,this._gid),r=[];if(n>-1&&(r=f(t,this.currentText.list[n].list,this._cid)),r.length<1)return this._cids.length>0&&this.config.domRender&&this.__remove(this._cids),void(this._cids=[]);if(this._cids!==r||n!==this._gid){this._gid=n,this._cid=r[0];var i=this.getDelCid(this._cids,r),o=this.getNewCid(this._cids,r);this._cids=r,this.config.domRender&&this.__remove(i);var s=[];o.map(function(t){var r=e.currentText.list[n].list[t];r.index=t,s.push(r)}),this.currentExtText&&o.map(function(t){var r=e.currentText.list[n].list[t];r.index=t,s.push(r)}),s.length>0&&console.log("_update",s,t),this.emit("update",s),this.__render(s,t)}}},{key:"__onTimeupdate",value:function(){if(this._isOpen){var t=this.player.video,e=t.videoWidth,n=t.videoHeight;!this._videoMeta.scale&&e&&n&&this._onResize(this.player.root);var r=this.player.currentTime;Math.round(Math.abs(1e3*r-this._ctime))<200||(this._ctime=1e3*r,this.currentText&&this.currentText.list&&this._update(r))}}},{key:"_onResize",value:function(t){var e=this._videoMeta;if(this.config.domRender){if(t&&t instanceof window.Element||(t=this.player.root),this._iId&&(clearTimeout(this._iId),this._iId=null),!e.scale){if(!this.player.video)return;var n=this.player.video,r=n.videoWidth,i=n.videoHeight;if(!r||!i)return;e.videoWidth=r,e.videoHeight=i,e.scale=parseInt(i/r*100,10)}this.__startResize(t)}}},{key:"resize",value:function(t,e){var n=this,r=this.config,i=r.baseSizeX,o=r.baseSizeY,s=r.minMobileSize,a=r.minSize,u=r.fitVideo,c=r.offsetBottom,l=this._videoMeta.scale;this._videoMeta.lwidth=t,this._videoMeta.lheight=e;var f=void 0,h=0;e/t*100>=l?(h=parseInt(l*t,10)/100,f=t):(h=e,f=parseInt(e/l*100,10)),this._videoMeta.vWidth=f,this._videoMeta.vHeight=h;var d=0,p=0;l>120?(d=o,p=parseInt(d*h/1080,10)):(d=i,p=parseInt(d*f/1920,10));var v=Ur?s:a,y={fontSize:p=p<v?v:p>d?d:p},g=parseInt((e-h)/2,10),_=parseInt((t-f)/2,10),m=parseInt(h*c,10)/100;this._videoMeta.vBottom=g,this._videoMeta.vLeft=_,this._videoMeta.marginBottom=m,u&&(y.bottom=g+m,y.left=y.right=_),Pr(y).map(function(t){n.root.style[t]=y[t]+"px"}),this.emit(Gr.RESIZE,{vLeft:_,vBottom:g,marginBottom:m,vWidth:f,vHeight:h,fontSize:p,scale:l})}},{key:"__startResize",value:function(t){var e=this,n=t.getBoundingClientRect(),r=this._videoMeta,i=n.width,o=n.height;if(this._iId&&(clearTimeout(this._iId),this._iId=null),i>0&&o>0&&(i!==r.lwidth||o!==r.lheight))this._iC=0,this.resize(i,o);else{if(this._iC>=5)return void(this._iC=0);this._iC++,this._iId=setTimeout(function(){e.__startResize(t)},50)}}},{key:"__remove",value:function(t){var e=this;if(t&&!(t.length<1)){for(var n=this.innerRoot.children,r=[],i=0;i<n.length;i++){var o=Number(n[i].getAttribute("data-index"));t.includes(o)&&r.push(n[i])}r.map(function(t){e.innerRoot.removeChild(t)})}}},{key:"__render",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e.length>0&&this.config.domRender&&e.map(function(e){var n="text-track-"+t.config.line;e.text.map(function(r,i){i>0&&(n+=" text-track-deputy");var o={"data-start":e.start,"data-end":e.end,"data-index":e.index};t.innerRoot.appendChild(d("xg-text-track-span",r,o,n))})})}},{key:"show",value:function(){this.config.domRender&&c(this.root,"text-track-hide")}},{key:"hide",value:function(){this.config.domRender&&(u(this.root,"text-track-hide"),this.innerRoot.innerHTML="")}},{key:"destroy",value:function(){this.detachPlayer(),this.removeAllListeners(),this.player=null,this.textTrack=null}},{key:"emit",value:function(t,n){for(var r,i=arguments.length,o=Array(i>2?i-2:0),s=2;s<i;s++)o[s-2]=arguments[s];(r=en(e.prototype.__proto__||rt(e.prototype),"emit",this)).call.apply(r,[this,t,n].concat(o))}},{key:"on",value:function(t,n){for(var r,i=arguments.length,o=Array(i>2?i-2:0),s=2;s<i;s++)o[s-2]=arguments[s];(r=en(e.prototype.__proto__||rt(e.prototype),"on",this)).call.apply(r,[this,t,n].concat(o))}},{key:"once",value:function(t,n){for(var r,i=arguments.length,o=Array(i>2?i-2:0),s=2;s<i;s++)o[s-2]=arguments[s];(r=en(e.prototype.__proto__||rt(e.prototype),"once",this)).call.apply(r,[this,t,n].concat(o))}},{key:"off",value:function(t,n){for(var r,i=arguments.length,o=Array(i>2?i-2:0),s=2;s<i;s++)o[s-2]=arguments[s];(r=en(e.prototype.__proto__||rt(e.prototype),"off",this)).call.apply(r,[this,t,n].concat(o))}},{key:"offAll",value:function(){en(e.prototype.__proto__||rt(e.prototype),"removeAllListeners",this).call(this)}},{key:"marginBottom",get:function(){var t=this._videoMeta,e=t.bottom,n=t.marginBottom;return this.config.fitVideo?e+n:n}}]),e}(jr)}); | ||
//# sourceMappingURL=index.min.js.map |
{ | ||
"name": "xgplayer-subtitles", | ||
"version": "1.0.23-alpha.0", | ||
"version": "1.0.23", | ||
"description": "", | ||
@@ -36,2 +36,3 @@ "main": "./dist/index.min.js", | ||
"eslint-plugin-import": "^2.24.2", | ||
"eslint-plugin-no-lookahead-lookbehind-regexp": "^0.1.0", | ||
"eslint-plugin-node": "^11.1.0", | ||
@@ -38,0 +39,0 @@ "eslint-plugin-promise": "^5.1.0", |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
242461
1
35