@volcengine/veplayer-plugin 2.6.0-rc.3 → 2.6.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/index.development.js +5572 -3971
- package/esm/index.production.js +5 -5
- package/esm/veplayer.plugin.ad.development.js +3002 -1401
- package/esm/veplayer.plugin.ad.production.js +2 -2
- package/package.json +1 -1
- package/umd/veplayer.plugin.ad.development.js +2980 -1379
- package/umd/veplayer.plugin.ad.production.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).VePlayerAd=e()}(this,(function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var r={exports:{}},i=function(t){return t&&t.Math==Math&&t},o=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof e&&e)||function(){return this}()||e||Function("return this")(),a=function(t){try{return!!t()}catch(e){return!0}},s=!a((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),u=s,l=Function.prototype,c=l.apply,f=l.call,h="object"==typeof Reflect&&Reflect.apply||(u?f.bind(c):function(){return f.apply(c,arguments)}),p=s,d=Function.prototype,v=d.call,g=p&&d.bind.bind(v,v),y=p?g:function(t){return function(){return v.apply(t,arguments)}},m=y,b=m({}.toString),w=m("".slice),k=function(t){return w(b(t),8,-1)},_=k,A=y,E=function(t){if("Function"===_(t))return A(t)},T="object"==typeof document&&document.all,C={all:T,IS_HTMLDDA:void 0===T&&void 0!==T},S=C.all,x=C.IS_HTMLDDA?function(t){return"function"==typeof t||t===S}:function(t){return"function"==typeof t},M={},L=!a((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),O=s,I=Function.prototype.call,P=O?I.bind(I):function(){return I.apply(I,arguments)},R={},B={}.propertyIsEnumerable,U=Object.getOwnPropertyDescriptor,D=U&&!B.call({1:2},1);R.f=D?function(t){var e=U(this,t);return!!e&&e.enumerable}:B;var j,F,N=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},H=a,z=k,V=Object,q=y("".split),G=H((function(){return!V("z").propertyIsEnumerable(0)}))?function(t){return"String"==z(t)?q(t,""):V(t)}:V,Y=function(t){return null==t},W=Y,K=TypeError,X=function(t){if(W(t))throw K("Can't call method on "+t);return t},$=G,J=X,Q=function(t){return $(J(t))},Z=x,tt=C.all,et=C.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:Z(t)||t===tt}:function(t){return"object"==typeof t?null!==t:Z(t)},nt={},rt=nt,it=o,ot=x,at=function(t){return ot(t)?t:void 0},st=function(t,e){return arguments.length<2?at(rt[t])||at(it[t]):rt[t]&&rt[t][e]||it[t]&&it[t][e]},ut=y({}.isPrototypeOf),lt="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ct=o,ft=lt,ht=ct.process,pt=ct.Deno,dt=ht&&ht.versions||pt&&pt.version,vt=dt&&dt.v8;vt&&(F=(j=vt.split("."))[0]>0&&j[0]<4?1:+(j[0]+j[1])),!F&&ft&&(!(j=ft.match(/Edge\/(\d+)/))||j[1]>=74)&&(j=ft.match(/Chrome\/(\d+)/))&&(F=+j[1]);var gt=F,yt=gt,mt=a,bt=o.String,wt=!!Object.getOwnPropertySymbols&&!mt((function(){var t=Symbol();return!bt(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&yt&&yt<41})),kt=wt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,_t=st,At=x,Et=ut,Tt=Object,Ct=kt?function(t){return"symbol"==typeof t}:function(t){var e=_t("Symbol");return At(e)&&Et(e.prototype,Tt(t))},St=String,xt=function(t){try{return St(t)}catch(e){return"Object"}},Mt=x,Lt=xt,Ot=TypeError,It=function(t){if(Mt(t))return t;throw Ot(Lt(t)+" is not a function")},Pt=It,Rt=Y,Bt=function(t,e){var n=t[e];return Rt(n)?void 0:Pt(n)},Ut=P,Dt=x,jt=et,Ft=TypeError,Nt={exports:{}},Ht=o,zt=Object.defineProperty,Vt=function(t,e){try{zt(Ht,t,{value:e,configurable:!0,writable:!0})}catch(n){Ht[t]=e}return e},qt="__core-js_shared__",Gt=o[qt]||Vt(qt,{}),Yt=Gt;(Nt.exports=function(t,e){return Yt[t]||(Yt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.30.2",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"});var Wt=Nt.exports,Kt=X,Xt=Object,$t=function(t){return Xt(Kt(t))},Jt=$t,Qt=y({}.hasOwnProperty),Zt=Object.hasOwn||function(t,e){return Qt(Jt(t),e)},te=y,ee=0,ne=Math.random(),re=te(1..toString),ie=function(t){return"Symbol("+(void 0===t?"":t)+")_"+re(++ee+ne,36)},oe=Wt,ae=Zt,se=ie,ue=wt,le=kt,ce=o.Symbol,fe=oe("wks"),he=le?ce.for||ce:ce&&ce.withoutSetter||se,pe=function(t){return ae(fe,t)||(fe[t]=ue&&ae(ce,t)?ce[t]:he("Symbol."+t)),fe[t]},de=P,ve=et,ge=Ct,ye=Bt,me=function(t,e){var n,r;if("string"===e&&Dt(n=t.toString)&&!jt(r=Ut(n,t)))return r;if(Dt(n=t.valueOf)&&!jt(r=Ut(n,t)))return r;if("string"!==e&&Dt(n=t.toString)&&!jt(r=Ut(n,t)))return r;throw Ft("Can't convert object to primitive value")},be=TypeError,we=pe("toPrimitive"),ke=function(t,e){if(!ve(t)||ge(t))return t;var n,r=ye(t,we);if(r){if(void 0===e&&(e="default"),n=de(r,t,e),!ve(n)||ge(n))return n;throw be("Can't convert object to primitive value")}return void 0===e&&(e="number"),me(t,e)},_e=Ct,Ae=function(t){var e=ke(t,"string");return _e(e)?e:e+""},Ee=et,Te=o.document,Ce=Ee(Te)&&Ee(Te.createElement),Se=function(t){return Ce?Te.createElement(t):{}},xe=Se,Me=!L&&!a((function(){return 7!=Object.defineProperty(xe("div"),"a",{get:function(){return 7}}).a})),Le=L,Oe=P,Ie=R,Pe=N,Re=Q,Be=Ae,Ue=Zt,De=Me,je=Object.getOwnPropertyDescriptor;M.f=Le?je:function(t,e){if(t=Re(t),e=Be(e),De)try{return je(t,e)}catch(n){}if(Ue(t,e))return Pe(!Oe(Ie.f,t,e),t[e])};var Fe=a,Ne=x,He=/#|\.prototype\./,ze=function(t,e){var n=qe[Ve(t)];return n==Ye||n!=Ge&&(Ne(e)?Fe(e):!!e)},Ve=ze.normalize=function(t){return String(t).replace(He,".").toLowerCase()},qe=ze.data={},Ge=ze.NATIVE="N",Ye=ze.POLYFILL="P",We=ze,Ke=It,Xe=s,$e=E(E.bind),Je=function(t,e){return Ke(t),void 0===e?t:Xe?$e(t,e):function(){return t.apply(e,arguments)}},Qe={},Ze=L&&a((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),tn=et,en=String,nn=TypeError,rn=function(t){if(tn(t))return t;throw nn(en(t)+" is not an object")},on=L,an=Me,sn=Ze,un=rn,ln=Ae,cn=TypeError,fn=Object.defineProperty,hn=Object.getOwnPropertyDescriptor,pn="enumerable",dn="configurable",vn="writable";Qe.f=on?sn?function(t,e,n){if(un(t),e=ln(e),un(n),"function"==typeof t&&"prototype"===e&&"value"in n&&vn in n&&!n[vn]){var r=hn(t,e);r&&r[vn]&&(t[e]=n.value,n={configurable:dn in n?n[dn]:r[dn],enumerable:pn in n?n[pn]:r[pn],writable:!1})}return fn(t,e,n)}:fn:function(t,e,n){if(un(t),e=ln(e),un(n),an)try{return fn(t,e,n)}catch(r){}if("get"in n||"set"in n)throw cn("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var gn=Qe,yn=N,mn=L?function(t,e,n){return gn.f(t,e,yn(1,n))}:function(t,e,n){return t[e]=n,t},bn=o,wn=h,kn=E,_n=x,An=M.f,En=We,Tn=nt,Cn=Je,Sn=mn,xn=Zt,Mn=function(t){var e=function(n,r,i){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,r)}return new t(n,r,i)}return wn(t,this,arguments)};return e.prototype=t.prototype,e},Ln=function(t,e){var n,r,i,o,a,s,u,l,c,f=t.target,h=t.global,p=t.stat,d=t.proto,v=h?bn:p?bn[f]:(bn[f]||{}).prototype,g=h?Tn:Tn[f]||Sn(Tn,f,{})[f],y=g.prototype;for(o in e)r=!(n=En(h?o:f+(p?".":"#")+o,t.forced))&&v&&xn(v,o),s=g[o],r&&(u=t.dontCallGetSet?(c=An(v,o))&&c.value:v[o]),a=r&&u?u:e[o],r&&typeof s==typeof a||(l=t.bind&&r?Cn(a,bn):t.wrap&&r?Mn(a):d&&_n(a)?kn(a):a,(t.sham||a&&a.sham||s&&s.sham)&&Sn(l,"sham",!0),Sn(g,o,l),d&&(xn(Tn,i=f+"Prototype")||Sn(Tn,i,{}),Sn(Tn[i],o,a),t.real&&y&&(n||!y[o])&&Sn(y,o,a)))},On=Ln,In=L,Pn=Qe.f;On({target:"Object",stat:!0,forced:Object.defineProperty!==Pn,sham:!In},{defineProperty:Pn});var Rn=nt.Object,Bn=r.exports=function(t,e,n){return Rn.defineProperty(t,e,n)};Rn.defineProperty.sham&&(Bn.sham=!0);var Un=r.exports,Dn=n(Un),jn=k,Fn=Array.isArray||function(t){return"Array"==jn(t)},Nn=Math.ceil,Hn=Math.floor,zn=Math.trunc||function(t){var e=+t;return(e>0?Hn:Nn)(e)},Vn=function(t){var e=+t;return e!=e||0===e?0:zn(e)},qn=Vn,Gn=Math.min,Yn=function(t){return t>0?Gn(qn(t),9007199254740991):0},Wn=Yn,Kn=function(t){return Wn(t.length)},Xn=TypeError,$n=function(t){if(t>9007199254740991)throw Xn("Maximum allowed index exceeded");return t},Jn=Ae,Qn=Qe,Zn=N,tr=function(t,e,n){var r=Jn(e);r in t?Qn.f(t,r,Zn(0,n)):t[r]=n},er={};er[pe("toStringTag")]="z";var nr="[object z]"===String(er),rr=nr,ir=x,or=k,ar=pe("toStringTag"),sr=Object,ur="Arguments"==or(function(){return arguments}()),lr=rr?or:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(n){}}(e=sr(t),ar))?n:ur?or(e):"Object"==(r=or(e))&&ir(e.callee)?"Arguments":r},cr=x,fr=Gt,hr=y(Function.toString);cr(fr.inspectSource)||(fr.inspectSource=function(t){return hr(t)});var pr=fr.inspectSource,dr=y,vr=a,gr=x,yr=lr,mr=pr,br=function(){},wr=[],kr=st("Reflect","construct"),_r=/^\s*(?:class|function)\b/,Ar=dr(_r.exec),Er=!_r.exec(br),Tr=function(t){if(!gr(t))return!1;try{return kr(br,wr,t),!0}catch(e){return!1}},Cr=function(t){if(!gr(t))return!1;switch(yr(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Er||!!Ar(_r,mr(t))}catch(e){return!0}};Cr.sham=!0;var Sr=!kr||vr((function(){var t;return Tr(Tr.call)||!Tr(Object)||!Tr((function(){t=!0}))||t}))?Cr:Tr,xr=Fn,Mr=Sr,Lr=et,Or=pe("species"),Ir=Array,Pr=function(t){var e;return xr(t)&&(e=t.constructor,(Mr(e)&&(e===Ir||xr(e.prototype))||Lr(e)&&null===(e=e[Or]))&&(e=void 0)),void 0===e?Ir:e},Rr=function(t,e){return new(Pr(t))(0===e?0:e)},Br=a,Ur=gt,Dr=pe("species"),jr=function(t){return Ur>=51||!Br((function(){var e=[];return(e.constructor={})[Dr]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Fr=Ln,Nr=a,Hr=Fn,zr=et,Vr=$t,qr=Kn,Gr=$n,Yr=tr,Wr=Rr,Kr=jr,Xr=gt,$r=pe("isConcatSpreadable"),Jr=Xr>=51||!Nr((function(){var t=[];return t[$r]=!1,t.concat()[0]!==t})),Qr=function(t){if(!zr(t))return!1;var e=t[$r];return void 0!==e?!!e:Hr(t)};Fr({target:"Array",proto:!0,arity:1,forced:!Jr||!Kr("concat")},{concat:function(t){var e,n,r,i,o,a=Vr(this),s=Wr(a,0),u=0;for(e=-1,r=arguments.length;e<r;e++)if(Qr(o=-1===e?a:arguments[e]))for(i=qr(o),Gr(u+i),n=0;n<i;n++,u++)n in o&&Yr(s,u,o[n]);else Gr(u+1),Yr(s,u++,o);return s.length=u,s}});var Zr=lr,ti=String,ei=function(t){if("Symbol"===Zr(t))throw TypeError("Cannot convert a Symbol value to a string");return ti(t)},ni={},ri=Vn,ii=Math.max,oi=Math.min,ai=function(t,e){var n=ri(t);return n<0?ii(n+e,0):oi(n,e)},si=Q,ui=ai,li=Kn,ci=function(t){return function(e,n,r){var i,o=si(e),a=li(o),s=ui(r,a);if(t&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((t||s in o)&&o[s]===n)return t||s||0;return!t&&-1}},fi={includes:ci(!0),indexOf:ci(!1)},hi={},pi=Zt,di=Q,vi=fi.indexOf,gi=hi,yi=y([].push),mi=function(t,e){var n,r=di(t),i=0,o=[];for(n in r)!pi(gi,n)&&pi(r,n)&&yi(o,n);for(;e.length>i;)pi(r,n=e[i++])&&(~vi(o,n)||yi(o,n));return o},bi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],wi=mi,ki=bi,_i=Object.keys||function(t){return wi(t,ki)},Ai=L,Ei=Ze,Ti=Qe,Ci=rn,Si=Q,xi=_i;ni.f=Ai&&!Ei?Object.defineProperties:function(t,e){Ci(t);for(var n,r=Si(e),i=xi(e),o=i.length,a=0;o>a;)Ti.f(t,n=i[a++],r[n]);return t};var Mi,Li=st("document","documentElement"),Oi=ie,Ii=Wt("keys"),Pi=function(t){return Ii[t]||(Ii[t]=Oi(t))},Ri=rn,Bi=ni,Ui=bi,Di=hi,ji=Li,Fi=Se,Ni="prototype",Hi="script",zi=Pi("IE_PROTO"),Vi=function(){},qi=function(t){return"<"+Hi+">"+t+"</"+Hi+">"},Gi=function(t){t.write(qi("")),t.close();var e=t.parentWindow.Object;return t=null,e},Yi=function(){try{Mi=new ActiveXObject("htmlfile")}catch(i){}var t,e,n;Yi="undefined"!=typeof document?document.domain&&Mi?Gi(Mi):(e=Fi("iframe"),n="java"+Hi+":",e.style.display="none",ji.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(qi("document.F=Object")),t.close(),t.F):Gi(Mi);for(var r=Ui.length;r--;)delete Yi[Ni][Ui[r]];return Yi()};Di[zi]=!0;var Wi=Object.create||function(t,e){var n;return null!==t?(Vi[Ni]=Ri(t),n=new Vi,Vi[Ni]=null,n[zi]=t):n=Yi(),void 0===e?n:Bi.f(n,e)},Ki={},Xi=mi,$i=bi.concat("length","prototype");Ki.f=Object.getOwnPropertyNames||function(t){return Xi(t,$i)};var Ji={},Qi=ai,Zi=Kn,to=tr,eo=Array,no=Math.max,ro=function(t,e,n){for(var r=Zi(t),i=Qi(e,r),o=Qi(void 0===n?r:n,r),a=eo(no(o-i,0)),s=0;i<o;i++,s++)to(a,s,t[i]);return a.length=s,a},io=k,oo=Q,ao=Ki.f,so=ro,uo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Ji.f=function(t){return uo&&"Window"==io(t)?function(t){try{return ao(t)}catch(e){return so(uo)}}(t):ao(oo(t))};var lo={};lo.f=Object.getOwnPropertySymbols;var co=mn,fo=function(t,e,n,r){return r&&r.enumerable?t[e]=n:co(t,e,n),t},ho=Qe,po=function(t,e,n){return ho.f(t,e,n)},vo={},go=pe;vo.f=go;var yo,mo,bo,wo=nt,ko=Zt,_o=vo,Ao=Qe.f,Eo=function(t){var e=wo.Symbol||(wo.Symbol={});ko(e,t)||Ao(e,t,{value:_o.f(t)})},To=P,Co=st,So=pe,xo=fo,Mo=function(){var t=Co("Symbol"),e=t&&t.prototype,n=e&&e.valueOf,r=So("toPrimitive");e&&!e[r]&&xo(e,r,(function(t){return To(n,this)}),{arity:1})},Lo=lr,Oo=nr?{}.toString:function(){return"[object "+Lo(this)+"]"},Io=nr,Po=Qe.f,Ro=mn,Bo=Zt,Uo=Oo,Do=pe("toStringTag"),jo=function(t,e,n,r){if(t){var i=n?t:t.prototype;Bo(i,Do)||Po(i,Do,{configurable:!0,value:e}),r&&!Io&&Ro(i,"toString",Uo)}},Fo=x,No=o.WeakMap,Ho=Fo(No)&&/native code/.test(String(No)),zo=o,Vo=et,qo=mn,Go=Zt,Yo=Gt,Wo=Pi,Ko=hi,Xo="Object already initialized",$o=zo.TypeError,Jo=zo.WeakMap;if(Ho||Yo.state){var Qo=Yo.state||(Yo.state=new Jo);Qo.get=Qo.get,Qo.has=Qo.has,Qo.set=Qo.set,yo=function(t,e){if(Qo.has(t))throw $o(Xo);return e.facade=t,Qo.set(t,e),e},mo=function(t){return Qo.get(t)||{}},bo=function(t){return Qo.has(t)}}else{var Zo=Wo("state");Ko[Zo]=!0,yo=function(t,e){if(Go(t,Zo))throw $o(Xo);return e.facade=t,qo(t,Zo,e),e},mo=function(t){return Go(t,Zo)?t[Zo]:{}},bo=function(t){return Go(t,Zo)}}var ta={set:yo,get:mo,has:bo,enforce:function(t){return bo(t)?mo(t):yo(t,{})},getterFor:function(t){return function(e){var n;if(!Vo(e)||(n=mo(e)).type!==t)throw $o("Incompatible receiver, "+t+" required");return n}}},ea=Je,na=G,ra=$t,ia=Kn,oa=Rr,aa=y([].push),sa=function(t){var e=1==t,n=2==t,r=3==t,i=4==t,o=6==t,a=7==t,s=5==t||o;return function(u,l,c,f){for(var h,p,d=ra(u),v=na(d),g=ea(l,c),y=ia(v),m=0,b=f||oa,w=e?b(u,y):n||a?b(u,0):void 0;y>m;m++)if((s||m in v)&&(p=g(h=v[m],m,d),t))if(e)w[m]=p;else if(p)switch(t){case 3:return!0;case 5:return h;case 6:return m;case 2:aa(w,h)}else switch(t){case 4:return!1;case 7:aa(w,h)}return o?-1:r||i?i:w}},ua={forEach:sa(0),map:sa(1),filter:sa(2),some:sa(3),every:sa(4),find:sa(5),findIndex:sa(6),filterReject:sa(7)},la=Ln,ca=o,fa=P,ha=y,pa=L,da=wt,va=a,ga=Zt,ya=ut,ma=rn,ba=Q,wa=Ae,ka=ei,_a=N,Aa=Wi,Ea=_i,Ta=Ki,Ca=Ji,Sa=lo,xa=M,Ma=Qe,La=ni,Oa=R,Ia=fo,Pa=po,Ra=Wt,Ba=hi,Ua=ie,Da=pe,ja=vo,Fa=Eo,Na=Mo,Ha=jo,za=ta,Va=ua.forEach,qa=Pi("hidden"),Ga="Symbol",Ya="prototype",Wa=za.set,Ka=za.getterFor(Ga),Xa=Object[Ya],$a=ca.Symbol,Ja=$a&&$a[Ya],Qa=ca.TypeError,Za=ca.QObject,ts=xa.f,es=Ma.f,ns=Ca.f,rs=Oa.f,is=ha([].push),os=Ra("symbols"),as=Ra("op-symbols"),ss=Ra("wks"),us=!Za||!Za[Ya]||!Za[Ya].findChild,ls=pa&&va((function(){return 7!=Aa(es({},"a",{get:function(){return es(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=ts(Xa,e);r&&delete Xa[e],es(t,e,n),r&&t!==Xa&&es(Xa,e,r)}:es,cs=function(t,e){var n=os[t]=Aa(Ja);return Wa(n,{type:Ga,tag:t,description:e}),pa||(n.description=e),n},fs=function(t,e,n){t===Xa&&fs(as,e,n),ma(t);var r=wa(e);return ma(n),ga(os,r)?(n.enumerable?(ga(t,qa)&&t[qa][r]&&(t[qa][r]=!1),n=Aa(n,{enumerable:_a(0,!1)})):(ga(t,qa)||es(t,qa,_a(1,{})),t[qa][r]=!0),ls(t,r,n)):es(t,r,n)},hs=function(t,e){ma(t);var n=ba(e),r=Ea(n).concat(gs(n));return Va(r,(function(e){pa&&!fa(ps,n,e)||fs(t,e,n[e])})),t},ps=function(t){var e=wa(t),n=fa(rs,this,e);return!(this===Xa&&ga(os,e)&&!ga(as,e))&&(!(n||!ga(this,e)||!ga(os,e)||ga(this,qa)&&this[qa][e])||n)},ds=function(t,e){var n=ba(t),r=wa(e);if(n!==Xa||!ga(os,r)||ga(as,r)){var i=ts(n,r);return!i||!ga(os,r)||ga(n,qa)&&n[qa][r]||(i.enumerable=!0),i}},vs=function(t){var e=ns(ba(t)),n=[];return Va(e,(function(t){ga(os,t)||ga(Ba,t)||is(n,t)})),n},gs=function(t){var e=t===Xa,n=ns(e?as:ba(t)),r=[];return Va(n,(function(t){!ga(os,t)||e&&!ga(Xa,t)||is(r,os[t])})),r};da||($a=function(){if(ya(Ja,this))throw Qa("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?ka(arguments[0]):void 0,e=Ua(t),n=function(t){this===Xa&&fa(n,as,t),ga(this,qa)&&ga(this[qa],e)&&(this[qa][e]=!1),ls(this,e,_a(1,t))};return pa&&us&&ls(Xa,e,{configurable:!0,set:n}),cs(e,t)},Ia(Ja=$a[Ya],"toString",(function(){return Ka(this).tag})),Ia($a,"withoutSetter",(function(t){return cs(Ua(t),t)})),Oa.f=ps,Ma.f=fs,La.f=hs,xa.f=ds,Ta.f=Ca.f=vs,Sa.f=gs,ja.f=function(t){return cs(Da(t),t)},pa&&Pa(Ja,"description",{configurable:!0,get:function(){return Ka(this).description}})),la({global:!0,constructor:!0,wrap:!0,forced:!da,sham:!da},{Symbol:$a}),Va(Ea(ss),(function(t){Fa(t)})),la({target:Ga,stat:!0,forced:!da},{useSetter:function(){us=!0},useSimple:function(){us=!1}}),la({target:"Object",stat:!0,forced:!da,sham:!pa},{create:function(t,e){return void 0===e?Aa(t):hs(Aa(t),e)},defineProperty:fs,defineProperties:hs,getOwnPropertyDescriptor:ds}),la({target:"Object",stat:!0,forced:!da},{getOwnPropertyNames:vs}),Na(),Ha($a,Ga),Ba[qa]=!0;var ys=wt&&!!Symbol.for&&!!Symbol.keyFor,ms=Ln,bs=st,ws=Zt,ks=ei,_s=Wt,As=ys,Es=_s("string-to-symbol-registry"),Ts=_s("symbol-to-string-registry");ms({target:"Symbol",stat:!0,forced:!As},{for:function(t){var e=ks(t);if(ws(Es,e))return Es[e];var n=bs("Symbol")(e);return Es[e]=n,Ts[n]=e,n}});var Cs=Ln,Ss=Zt,xs=Ct,Ms=xt,Ls=ys,Os=Wt("symbol-to-string-registry");Cs({target:"Symbol",stat:!0,forced:!Ls},{keyFor:function(t){if(!xs(t))throw TypeError(Ms(t)+" is not a symbol");if(Ss(Os,t))return Os[t]}});var Is=y([].slice),Ps=Fn,Rs=x,Bs=k,Us=ei,Ds=y([].push),js=Ln,Fs=st,Ns=h,Hs=P,zs=y,Vs=a,qs=x,Gs=Ct,Ys=Is,Ws=function(t){if(Rs(t))return t;if(Ps(t)){for(var e=t.length,n=[],r=0;r<e;r++){var i=t[r];"string"==typeof i?Ds(n,i):"number"!=typeof i&&"Number"!=Bs(i)&&"String"!=Bs(i)||Ds(n,Us(i))}var o=n.length,a=!0;return function(t,e){if(a)return a=!1,e;if(Ps(this))return e;for(var r=0;r<o;r++)if(n[r]===t)return e}}},Ks=wt,Xs=String,$s=Fs("JSON","stringify"),Js=zs(/./.exec),Qs=zs("".charAt),Zs=zs("".charCodeAt),tu=zs("".replace),eu=zs(1..toString),nu=/[\uD800-\uDFFF]/g,ru=/^[\uD800-\uDBFF]$/,iu=/^[\uDC00-\uDFFF]$/,ou=!Ks||Vs((function(){var t=Fs("Symbol")();return"[null]"!=$s([t])||"{}"!=$s({a:t})||"{}"!=$s(Object(t))})),au=Vs((function(){return'"\\udf06\\ud834"'!==$s("\udf06\ud834")||'"\\udead"'!==$s("\udead")})),su=function(t,e){var n=Ys(arguments),r=Ws(e);if(qs(r)||void 0!==t&&!Gs(t))return n[1]=function(t,e){if(qs(r)&&(e=Hs(r,this,Xs(t),e)),!Gs(e))return e},Ns($s,null,n)},uu=function(t,e,n){var r=Qs(n,e-1),i=Qs(n,e+1);return Js(ru,t)&&!Js(iu,i)||Js(iu,t)&&!Js(ru,r)?"\\u"+eu(Zs(t,0),16):t};$s&&js({target:"JSON",stat:!0,arity:3,forced:ou||au},{stringify:function(t,e,n){var r=Ys(arguments),i=Ns(ou?su:$s,null,r);return au&&"string"==typeof i?tu(i,nu,uu):i}});var lu=lo,cu=$t;Ln({target:"Object",stat:!0,forced:!wt||a((function(){lu.f(1)}))},{getOwnPropertySymbols:function(t){var e=lu.f;return e?e(cu(t)):[]}}),Eo("asyncIterator"),Eo("hasInstance"),Eo("isConcatSpreadable"),Eo("iterator"),Eo("match"),Eo("matchAll"),Eo("replace"),Eo("search"),Eo("species"),Eo("split");var fu=Mo;Eo("toPrimitive"),fu();var hu=st,pu=jo;Eo("toStringTag"),pu(hu("Symbol"),"Symbol"),Eo("unscopables"),jo(o.JSON,"JSON",!0);var du,vu,gu,yu=nt.Symbol,mu={},bu=L,wu=Zt,ku=Function.prototype,_u=bu&&Object.getOwnPropertyDescriptor,Au=wu(ku,"name"),Eu={EXISTS:Au,PROPER:Au&&"something"===function(){}.name,CONFIGURABLE:Au&&(!bu||bu&&_u(ku,"name").configurable)},Tu=!a((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Cu=Zt,Su=x,xu=$t,Mu=Tu,Lu=Pi("IE_PROTO"),Ou=Object,Iu=Ou.prototype,Pu=Mu?Ou.getPrototypeOf:function(t){var e=xu(t);if(Cu(e,Lu))return e[Lu];var n=e.constructor;return Su(n)&&e instanceof n?n.prototype:e instanceof Ou?Iu:null},Ru=a,Bu=x,Uu=et,Du=Wi,ju=Pu,Fu=fo,Nu=pe("iterator"),Hu=!1;[].keys&&("next"in(gu=[].keys())?(vu=ju(ju(gu)))!==Object.prototype&&(du=vu):Hu=!0);var zu=!Uu(du)||Ru((function(){var t={};return du[Nu].call(t)!==t}));Bu((du=zu?{}:Du(du))[Nu])||Fu(du,Nu,(function(){return this}));var Vu={IteratorPrototype:du,BUGGY_SAFARI_ITERATORS:Hu},qu=Vu.IteratorPrototype,Gu=Wi,Yu=N,Wu=jo,Ku=mu,Xu=function(){return this},$u=function(t,e,n,r){var i=e+" Iterator";return t.prototype=Gu(qu,{next:Yu(+!r,n)}),Wu(t,i,!1,!0),Ku[i]=Xu,t},Ju=y,Qu=It,Zu=x,tl=String,el=TypeError,nl=function(t,e,n){try{return Ju(Qu(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(r){}},rl=rn,il=function(t){if("object"==typeof t||Zu(t))return t;throw el("Can't set "+tl(t)+" as a prototype")},ol=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=nl(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(r){}return function(n,r){return rl(n),il(r),e?t(n,r):n.__proto__=r,n}}():void 0),al=Ln,sl=P,ul=Eu,ll=$u,cl=Pu,fl=jo,hl=fo,pl=mu,dl=Vu,vl=ul.PROPER,gl=dl.BUGGY_SAFARI_ITERATORS,yl=pe("iterator"),ml="keys",bl="values",wl="entries",kl=function(){return this},_l=function(t,e,n,r,i,o,a){ll(n,e,r);var s,u,l,c=function(t){if(t===i&&v)return v;if(!gl&&t in p)return p[t];switch(t){case ml:case bl:case wl:return function(){return new n(this,t)}}return function(){return new n(this)}},f=e+" Iterator",h=!1,p=t.prototype,d=p[yl]||p["@@iterator"]||i&&p[i],v=!gl&&d||c(i),g="Array"==e&&p.entries||d;if(g&&(s=cl(g.call(new t)))!==Object.prototype&&s.next&&(fl(s,f,!0,!0),pl[f]=kl),vl&&i==bl&&d&&d.name!==bl&&(h=!0,v=function(){return sl(d,this)}),i)if(u={values:c(bl),keys:o?v:c(ml),entries:c(wl)},a)for(l in u)(gl||h||!(l in p))&&hl(p,l,u[l]);else al({target:e,proto:!0,forced:gl||h},u);return a&&p[yl]!==v&&hl(p,yl,v,{name:i}),pl[e]=v,u},Al=function(t,e){return{value:t,done:e}},El=Q,Tl=mu,Cl=ta;Qe.f;var Sl=_l,xl=Al,Ml="Array Iterator",Ll=Cl.set,Ol=Cl.getterFor(Ml);Sl(Array,"Array",(function(t,e){Ll(this,{type:Ml,target:El(t),index:0,kind:e})}),(function(){var t=Ol(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,xl(void 0,!0)):xl("keys"==n?r:"values"==n?e[r]:[r,e[r]],!1)}),"values"),Tl.Arguments=Tl.Array;var Il={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Pl=o,Rl=lr,Bl=mn,Ul=mu,Dl=pe("toStringTag");for(var jl in Il){var Fl=Pl[jl],Nl=Fl&&Fl.prototype;Nl&&Rl(Nl)!==Dl&&Bl(Nl,Dl,jl),Ul[jl]=Ul.Array}var Hl=yu;Eo("dispose");var zl=Hl;Eo("asyncDispose");var Vl=Ln,ql=y,Gl=st("Symbol"),Yl=Gl.keyFor,Wl=ql(Gl.prototype.valueOf);Vl({target:"Symbol",stat:!0},{isRegistered:function(t){try{return void 0!==Yl(Wl(t))}catch(e){return!1}}});for(var Kl=Ln,Xl=Wt,$l=st,Jl=y,Ql=Ct,Zl=pe,tc=$l("Symbol"),ec=tc.isWellKnown,nc=$l("Object","getOwnPropertyNames"),rc=Jl(tc.prototype.valueOf),ic=Xl("wks"),oc=0,ac=nc(tc),sc=ac.length;oc<sc;oc++)try{var uc=ac[oc];Ql(tc[uc])&&Zl(uc)}catch(aR){}Kl({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(t){if(ec&&ec(t))return!0;try{for(var e=rc(t),n=0,r=nc(ic),i=r.length;n<i;n++)if(ic[r[n]]==e)return!0}catch(aR){}return!1}}),Eo("matcher"),Eo("metadataKey"),Eo("observable"),Eo("metadata"),Eo("patternMatch"),Eo("replaceAll");var lc=zl,cc=n(lc),fc=y,hc=Vn,pc=ei,dc=X,vc=fc("".charAt),gc=fc("".charCodeAt),yc=fc("".slice),mc=function(t){return function(e,n){var r,i,o=pc(dc(e)),a=hc(n),s=o.length;return a<0||a>=s?t?"":void 0:(r=gc(o,a))<55296||r>56319||a+1===s||(i=gc(o,a+1))<56320||i>57343?t?vc(o,a):r:t?yc(o,a,a+2):i-56320+(r-55296<<10)+65536}},bc={codeAt:mc(!1),charAt:mc(!0)},wc=bc.charAt,kc=ei,_c=ta,Ac=_l,Ec=Al,Tc="String Iterator",Cc=_c.set,Sc=_c.getterFor(Tc);Ac(String,"String",(function(t){Cc(this,{type:Tc,string:kc(t),index:0})}),(function(){var t,e=Sc(this),n=e.string,r=e.index;return r>=n.length?Ec(void 0,!0):(t=wc(n,r),e.index+=t.length,Ec(t,!1))}));var xc=vo.f("iterator"),Mc=n(xc);function Lc(t){return(Lc="function"==typeof cc&&"symbol"==typeof Mc?function(t){return typeof t}:function(t){return t&&"function"==typeof cc&&t.constructor===cc&&t!==cc.prototype?"symbol":typeof t})(t)}var Oc=vo.f("toPrimitive"),Ic=n(Oc);function Pc(t){var e=function(t,e){if("object"!==Lc(t)||null===t)return t;var n=t[Ic];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Lc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Lc(e)?e:String(e)}function Rc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Dn(t,Pc(r.key),r)}}function Bc(t,e,n){return e&&Rc(t.prototype,e),n&&Rc(t,n),Dn(t,"prototype",{writable:!1}),t}function Uc(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var Dc=Zt,jc=P,Fc=et,Nc=rn,Hc=function(t){return void 0!==t&&(Dc(t,"value")||Dc(t,"writable"))},zc=M,Vc=Pu;Ln({target:"Reflect",stat:!0},{get:function t(e,n){var r,i,o=arguments.length<3?e:arguments[2];return Nc(e)===o?e[n]:(r=zc.f(e,n))?Hc(r)?r.value:void 0===r.get?void 0:jc(r.get,o):Fc(i=Vc(e))?t(i,n,o):void 0}});var qc=nt.Reflect.get,Gc=n(qc),Yc=y,Wc=It,Kc=et,Xc=Zt,$c=Is,Jc=s,Qc=Function,Zc=Yc([].concat),tf=Yc([].join),ef={},nf=Jc?Qc.bind:function(t){var e=Wc(this),n=e.prototype,r=$c(arguments,1),i=function(){var n=Zc(r,$c(arguments));return this instanceof i?function(t,e,n){if(!Xc(ef,e)){for(var r=[],i=0;i<e;i++)r[i]="a["+i+"]";ef[e]=Qc("C,a","return new C("+tf(r,",")+")")}return ef[e](t,n)}(e,n.length,n):e.apply(t,n)};return Kc(n)&&(i.prototype=n),i},rf=nf;Ln({target:"Function",proto:!0,forced:Function.bind!==rf},{bind:rf});var of=nt,af=function(t){return of[t+"Prototype"]},sf=af("Function").bind,uf=ut,lf=sf,cf=Function.prototype,ff=function(t){var e=t.bind;return t===cf||uf(cf,t)&&e===cf.bind?lf:e},hf=n(ff),pf={exports:{}},df=Ln,vf=a,gf=Q,yf=M.f,mf=L;df({target:"Object",stat:!0,forced:!mf||vf((function(){yf(1)})),sham:!mf},{getOwnPropertyDescriptor:function(t,e){return yf(gf(t),e)}});var bf=nt.Object,wf=pf.exports=function(t,e){return bf.getOwnPropertyDescriptor(t,e)};bf.getOwnPropertyDescriptor.sham&&(wf.sham=!0);var kf=pf.exports,_f=n(kf);Ln({target:"Object",stat:!0},{setPrototypeOf:ol});var Af=nt.Object.setPrototypeOf,Ef=n(Af),Tf=$t,Cf=Pu,Sf=Tu;Ln({target:"Object",stat:!0,forced:a((function(){Cf(1)})),sham:!Sf},{getPrototypeOf:function(t){return Cf(Tf(t))}});var xf=nt.Object.getPrototypeOf,Mf=n(xf);function Lf(t){var e;return(Lf=Ef?hf(e=Mf).call(e):function(t){return t.__proto__||Mf(t)})(t)}function Of(){var t;"undefined"!=typeof Reflect&&Gc?Of=hf(t=Gc).call(t):Of=function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Lf(t)););return t}(t,e);if(r){var i=_f(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}};return Of.apply(this,arguments)}Ln({target:"Object",stat:!0,sham:!L},{create:Wi});var If=nt.Object,Pf=function(t,e){return If.create(t,e)},Rf=n(Pf);function Bf(t,e){var n;return(Bf=Ef?hf(n=Ef).call(n):function(t,e){return t.__proto__=e,t})(t,e)}function Uf(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Rf(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Dn(t,"prototype",{writable:!1}),e&&Bf(t,e)}var Df=Sr,jf=xt,Ff=TypeError,Nf=function(t){if(Df(t))return t;throw Ff(jf(t)+" is not a constructor")},Hf=Ln,zf=h,Vf=nf,qf=Nf,Gf=rn,Yf=et,Wf=Wi,Kf=a,Xf=st("Reflect","construct"),$f=Object.prototype,Jf=[].push,Qf=Kf((function(){function t(){}return!(Xf((function(){}),[],t)instanceof t)})),Zf=!Kf((function(){Xf((function(){}))})),th=Qf||Zf;Hf({target:"Reflect",stat:!0,forced:th,sham:th},{construct:function(t,e){qf(t),Gf(e);var n=arguments.length<3?t:qf(arguments[2]);if(Zf&&!Qf)return Xf(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return zf(Jf,r,e),new(zf(Vf,t,r))}var i=n.prototype,o=Wf(Yf(i)?i:$f),a=zf(t,o,e);return Yf(a)?a:o}});var eh=nt.Reflect.construct,nh=n(eh);function rh(t){var e=function(){if("undefined"==typeof Reflect||!nh)return!1;if(nh.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(nh(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Lf(t);if(e){var i=Lf(this).constructor;n=nh(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===Lc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Uc(t)}(this,n)}}function ih(t,e,n){return(e=Pc(e))in t?Dn(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var oh=af("Array").concat,ah=ut,sh=oh,uh=Array.prototype,lh=n((function(t){var e=t.concat;return t===uh||ah(uh,t)&&e===uh.concat?sh:e})),ch="ad_start",fh="ad_play",hh="ad_pause",ph="ad_time_update",dh="ad_skipped",vh="ad_error",gh="ad_complete",yh="ad_all_completed",mh="ima_sdk_load_start",bh="ima_sdk_load_success",wh="ima_sdk_load_error",kh="ima_ad_manager_ready",_h="ima_ad_complete",Ah="ima_ad_error",Eh="ima_ad_loaded",Th="ima_content_pause_requested",Ch="ima_content_resume_requested",Sh="ima_ready_to_play",xh=nt,Mh=h;xh.JSON||(xh.JSON={stringify:JSON.stringify});var Lh=function(t,e,n){return Mh(xh.JSON.stringify,null,arguments)},Oh=n(Lh),Ih=n(lc),Ph=lr,Rh=Bt,Bh=Y,Uh=mu,Dh=pe("iterator"),jh=function(t){if(!Bh(t))return Rh(t,Dh)||Rh(t,"@@iterator")||Uh[Ph(t)]},Fh=jh,Nh=n(Fh),Hh=n(Fh),zh=$t,Vh=_i;Ln({target:"Object",stat:!0,forced:a((function(){Vh(1)}))},{keys:function(t){return Vh(zh(t))}});var qh=n(nt.Object.keys),Gh=n(nt.Object.getOwnPropertySymbols),Yh=ua.filter;Ln({target:"Array",proto:!0,forced:!jr("filter")},{filter:function(t){return Yh(this,t,arguments.length>1?arguments[1]:void 0)}});var Wh=af("Array").filter,Kh=ut,Xh=Wh,$h=Array.prototype,Jh=n((function(t){var e=t.filter;return t===$h||Kh($h,t)&&e===$h.filter?Xh:e})),Qh=n(kf),Zh=a,tp=function(t,e){var n=[][t];return!!n&&Zh((function(){n.call(null,e||function(){return 1},1)}))},ep=ua.forEach,np=tp("forEach")?[].forEach:function(t){return ep(this,t,arguments.length>1?arguments[1]:void 0)};Ln({target:"Array",proto:!0,forced:[].forEach!=np},{forEach:np});var rp=af("Array").forEach,ip=lr,op=Zt,ap=ut,sp=rp,up=Array.prototype,lp={DOMTokenList:!0,NodeList:!0},cp=n((function(t){var e=t.forEach;return t===up||ap(up,t)&&e===up.forEach||op(lp,ip(t))?sp:e})),fp=st,hp=Ki,pp=lo,dp=rn,vp=y([].concat),gp=fp("Reflect","ownKeys")||function(t){var e=hp.f(dp(t)),n=pp.f;return n?vp(e,n(t)):e},yp=gp,mp=Q,bp=M,wp=tr;Ln({target:"Object",stat:!0,sham:!L},{getOwnPropertyDescriptors:function(t){for(var e,n,r=mp(t),i=bp.f,o=yp(r),a={},s=0;o.length>s;)void 0!==(n=i(r,e=o[s++]))&&wp(a,e,n);return a}});var kp=n(nt.Object.getOwnPropertyDescriptors),_p={exports:{}},Ap=Ln,Ep=L,Tp=ni.f;Ap({target:"Object",stat:!0,forced:Object.defineProperties!==Tp,sham:!Ep},{defineProperties:Tp});var Cp=nt.Object,Sp=_p.exports=function(t,e){return Cp.defineProperties(t,e)};Cp.defineProperties.sham&&(Sp.sham=!0);var xp=n(_p.exports),Mp=n(Un),Lp=n(Pf),Op=n(xf),Ip=n(Af),Pp=Zt,Rp=gp,Bp=M,Up=Qe,Dp=et,jp=mn,Fp=Error,Np=y("".replace),Hp=String(Fp("zxcasd").stack),zp=/\n\s*at [^:]*:[^\n]*/,Vp=zp.test(Hp),qp=N,Gp=!a((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",qp(1,7)),7!==t.stack)})),Yp=mn,Wp=function(t,e){if(Vp&&"string"==typeof t&&!Fp.prepareStackTrace)for(;e--;)t=Np(t,zp,"");return t},Kp=Gp,Xp=Error.captureStackTrace,$p=mu,Jp=pe("iterator"),Qp=Array.prototype,Zp=function(t){return void 0!==t&&($p.Array===t||Qp[Jp]===t)},td=P,ed=It,nd=rn,rd=xt,id=jh,od=TypeError,ad=function(t,e){var n=arguments.length<2?id(t):e;if(ed(n))return nd(td(n,t));throw od(rd(t)+" is not iterable")},sd=P,ud=rn,ld=Bt,cd=function(t,e,n){var r,i;ud(t);try{if(!(r=ld(t,"return"))){if("throw"===e)throw n;return n}r=sd(r,t)}catch(aR){i=!0,r=aR}if("throw"===e)throw n;if(i)throw r;return ud(r),n},fd=Je,hd=P,pd=rn,dd=xt,vd=Zp,gd=Kn,yd=ut,md=ad,bd=jh,wd=cd,kd=TypeError,_d=function(t,e){this.stopped=t,this.result=e},Ad=_d.prototype,Ed=function(t,e,n){var r,i,o,a,s,u,l,c=n&&n.that,f=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),p=!(!n||!n.IS_ITERATOR),d=!(!n||!n.INTERRUPTED),v=fd(e,c),g=function(t){return r&&wd(r,"normal",t),new _d(!0,t)},y=function(t){return f?(pd(t),d?v(t[0],t[1],g):v(t[0],t[1])):d?v(t,g):v(t)};if(h)r=t.iterator;else if(p)r=t;else{if(!(i=bd(t)))throw kd(dd(t)+" is not iterable");if(vd(i)){for(o=0,a=gd(t);a>o;o++)if((s=y(t[o]))&&yd(Ad,s))return s;return new _d(!1)}r=md(t,i)}for(u=h?t.next:r.next;!(l=hd(u,r)).done;){try{s=y(l.value)}catch(aR){wd(r,"throw",aR)}if("object"==typeof s&&s&&yd(Ad,s))return s}return new _d(!1)},Td=ei,Cd=Ln,Sd=ut,xd=Pu,Md=ol,Ld=function(t,e,n){for(var r=Rp(e),i=Up.f,o=Bp.f,a=0;a<r.length;a++){var s=r[a];Pp(t,s)||n&&Pp(n,s)||i(t,s,o(e,s))}},Od=Wi,Id=mn,Pd=N,Rd=function(t,e){Dp(e)&&"cause"in e&&jp(t,"cause",e.cause)},Bd=function(t,e,n,r){Kp&&(Xp?Xp(t,e):Yp(t,"stack",Wp(n,r)))},Ud=Ed,Dd=function(t,e){return void 0===t?arguments.length<2?"":e:Td(t)},jd=pe("toStringTag"),Fd=Error,Nd=[].push,Hd=function(t,e){var n,r=Sd(zd,this);Md?n=Md(Fd(),r?xd(this):zd):(n=r?this:Od(zd),Id(n,jd,"Error")),void 0!==e&&Id(n,"message",Dd(e)),Bd(n,Hd,n.stack,1),arguments.length>2&&Rd(n,arguments[2]);var i=[];return Ud(t,Nd,{that:i}),Id(n,"errors",i),n};Md?Md(Hd,Fd):Ld(Hd,Fd,{name:!0});var zd=Hd.prototype=Od(Fd.prototype,{constructor:Pd(1,Hd),message:Pd(1,""),name:Pd(1,"AggregateError")});Cd({global:!0,constructor:!0,arity:2},{AggregateError:Hd});var Vd,qd,Gd,Yd,Wd="undefined"!=typeof process&&"process"==k(process),Kd=st,Xd=po,$d=L,Jd=pe("species"),Qd=function(t){var e=Kd(t);$d&&e&&!e[Jd]&&Xd(e,Jd,{configurable:!0,get:function(){return this}})},Zd=ut,tv=TypeError,ev=function(t,e){if(Zd(e,t))return t;throw tv("Incorrect invocation")},nv=rn,rv=Nf,iv=Y,ov=pe("species"),av=function(t,e){var n,r=nv(t).constructor;return void 0===r||iv(n=nv(r)[ov])?e:rv(n)},sv=TypeError,uv=function(t,e){if(t<e)throw sv("Not enough arguments");return t},lv=/(?:ipad|iphone|ipod).*applewebkit/i.test(lt),cv=o,fv=h,hv=Je,pv=x,dv=Zt,vv=a,gv=Li,yv=Is,mv=Se,bv=uv,wv=lv,kv=Wd,_v=cv.setImmediate,Av=cv.clearImmediate,Ev=cv.process,Tv=cv.Dispatch,Cv=cv.Function,Sv=cv.MessageChannel,xv=cv.String,Mv=0,Lv={},Ov="onreadystatechange";vv((function(){Vd=cv.location}));var Iv=function(t){if(dv(Lv,t)){var e=Lv[t];delete Lv[t],e()}},Pv=function(t){return function(){Iv(t)}},Rv=function(t){Iv(t.data)},Bv=function(t){cv.postMessage(xv(t),Vd.protocol+"//"+Vd.host)};_v&&Av||(_v=function(t){bv(arguments.length,1);var e=pv(t)?t:Cv(t),n=yv(arguments,1);return Lv[++Mv]=function(){fv(e,void 0,n)},qd(Mv),Mv},Av=function(t){delete Lv[t]},kv?qd=function(t){Ev.nextTick(Pv(t))}:Tv&&Tv.now?qd=function(t){Tv.now(Pv(t))}:Sv&&!wv?(Yd=(Gd=new Sv).port2,Gd.port1.onmessage=Rv,qd=hv(Yd.postMessage,Yd)):cv.addEventListener&&pv(cv.postMessage)&&!cv.importScripts&&Vd&&"file:"!==Vd.protocol&&!vv(Bv)?(qd=Bv,cv.addEventListener("message",Rv,!1)):qd=Ov in mv("script")?function(t){gv.appendChild(mv("script"))[Ov]=function(){gv.removeChild(this),Iv(t)}}:function(t){setTimeout(Pv(t),0)});var Uv={set:_v,clear:Av},Dv=function(){this.head=null,this.tail=null};Dv.prototype={add:function(t){var e={item:t,next:null},n=this.tail;n?n.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var jv,Fv,Nv,Hv,zv,Vv=Dv,qv=/ipad|iphone|ipod/i.test(lt)&&"undefined"!=typeof Pebble,Gv=/web0s(?!.*chrome)/i.test(lt),Yv=o,Wv=Je,Kv=M.f,Xv=Uv.set,$v=Vv,Jv=lv,Qv=qv,Zv=Gv,tg=Wd,eg=Yv.MutationObserver||Yv.WebKitMutationObserver,ng=Yv.document,rg=Yv.process,ig=Yv.Promise,og=Kv(Yv,"queueMicrotask"),ag=og&&og.value;if(!ag){var sg=new $v,ug=function(){var t,e;for(tg&&(t=rg.domain)&&t.exit();e=sg.get();)try{e()}catch(aR){throw sg.head&&jv(),aR}t&&t.enter()};Jv||tg||Zv||!eg||!ng?!Qv&&ig&&ig.resolve?((Hv=ig.resolve(void 0)).constructor=ig,zv=Wv(Hv.then,Hv),jv=function(){zv(ug)}):tg?jv=function(){rg.nextTick(ug)}:(Xv=Wv(Xv,Yv),jv=function(){Xv(ug)}):(Fv=!0,Nv=ng.createTextNode(""),new eg(ug).observe(Nv,{characterData:!0}),jv=function(){Nv.data=Fv=!Fv}),ag=function(t){sg.head||jv(),sg.add(t)}}var lg=ag,cg=function(t){try{return{error:!1,value:t()}}catch(aR){return{error:!0,value:aR}}},fg=o.Promise,hg="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,pg=!hg&&!Wd&&"object"==typeof window&&"object"==typeof document,dg=o,vg=fg,gg=x,yg=We,mg=pr,bg=pe,wg=pg,kg=hg,_g=gt,Ag=vg&&vg.prototype,Eg=bg("species"),Tg=!1,Cg=gg(dg.PromiseRejectionEvent),Sg={CONSTRUCTOR:yg("Promise",(function(){var t=mg(vg),e=t!==String(vg);if(!e&&66===_g)return!0;if(!Ag.catch||!Ag.finally)return!0;if(!_g||_g<51||!/native code/.test(t)){var n=new vg((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[Eg]=r,!(Tg=n.then((function(){}))instanceof r))return!0}return!e&&(wg||kg)&&!Cg})),REJECTION_EVENT:Cg,SUBCLASSING:Tg},xg={},Mg=It,Lg=TypeError,Og=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw Lg("Bad Promise constructor");e=t,n=r})),this.resolve=Mg(e),this.reject=Mg(n)};xg.f=function(t){return new Og(t)};var Ig,Pg,Rg=Ln,Bg=Wd,Ug=o,Dg=P,jg=fo,Fg=jo,Ng=Qd,Hg=It,zg=x,Vg=et,qg=ev,Gg=av,Yg=Uv.set,Wg=lg,Kg=function(t,e){try{1==arguments.length?console.error(t):console.error(t,e)}catch(aR){}},Xg=cg,$g=Vv,Jg=ta,Qg=fg,Zg=Sg,ty=xg,ey="Promise",ny=Zg.CONSTRUCTOR,ry=Zg.REJECTION_EVENT,iy=Jg.getterFor(ey),oy=Jg.set,ay=Qg&&Qg.prototype,sy=Qg,uy=ay,ly=Ug.TypeError,cy=Ug.document,fy=Ug.process,hy=ty.f,py=hy,dy=!!(cy&&cy.createEvent&&Ug.dispatchEvent),vy="unhandledrejection",gy=function(t){var e;return!(!Vg(t)||!zg(e=t.then))&&e},yy=function(t,e){var n,r,i,o=e.value,a=1==e.state,s=a?t.ok:t.fail,u=t.resolve,l=t.reject,c=t.domain;try{s?(a||(2===e.rejection&&_y(e),e.rejection=1),!0===s?n=o:(c&&c.enter(),n=s(o),c&&(c.exit(),i=!0)),n===t.promise?l(ly("Promise-chain cycle")):(r=gy(n))?Dg(r,n,u,l):u(n)):l(o)}catch(aR){c&&!i&&c.exit(),l(aR)}},my=function(t,e){t.notified||(t.notified=!0,Wg((function(){for(var n,r=t.reactions;n=r.get();)yy(n,t);t.notified=!1,e&&!t.rejection&&wy(t)})))},by=function(t,e,n){var r,i;dy?((r=cy.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),Ug.dispatchEvent(r)):r={promise:e,reason:n},!ry&&(i=Ug["on"+t])?i(r):t===vy&&Kg("Unhandled promise rejection",n)},wy=function(t){Dg(Yg,Ug,(function(){var e,n=t.facade,r=t.value;if(ky(t)&&(e=Xg((function(){Bg?fy.emit("unhandledRejection",r,n):by(vy,n,r)})),t.rejection=Bg||ky(t)?2:1,e.error))throw e.value}))},ky=function(t){return 1!==t.rejection&&!t.parent},_y=function(t){Dg(Yg,Ug,(function(){var e=t.facade;Bg?fy.emit("rejectionHandled",e):by("rejectionhandled",e,t.value)}))},Ay=function(t,e,n){return function(r){t(e,r,n)}},Ey=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,my(t,!0))},Ty=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw ly("Promise can't be resolved itself");var r=gy(e);r?Wg((function(){var n={done:!1};try{Dg(r,e,Ay(Ty,n,t),Ay(Ey,n,t))}catch(aR){Ey(n,aR,t)}})):(t.value=e,t.state=1,my(t,!1))}catch(aR){Ey({done:!1},aR,t)}}};ny&&(uy=(sy=function(t){qg(this,uy),Hg(t),Dg(Ig,this);var e=iy(this);try{t(Ay(Ty,e),Ay(Ey,e))}catch(aR){Ey(e,aR)}}).prototype,(Ig=function(t){oy(this,{type:ey,done:!1,notified:!1,parent:!1,reactions:new $g,rejection:!1,state:0,value:void 0})}).prototype=jg(uy,"then",(function(t,e){var n=iy(this),r=hy(Gg(this,sy));return n.parent=!0,r.ok=!zg(t)||t,r.fail=zg(e)&&e,r.domain=Bg?fy.domain:void 0,0==n.state?n.reactions.add(r):Wg((function(){yy(r,n)})),r.promise})),Pg=function(){var t=new Ig,e=iy(t);this.promise=t,this.resolve=Ay(Ty,e),this.reject=Ay(Ey,e)},ty.f=hy=function(t){return t===sy||undefined===t?new Pg(t):py(t)}),Rg({global:!0,constructor:!0,wrap:!0,forced:ny},{Promise:sy}),Fg(sy,ey,!1,!0),Ng(ey);var Cy=pe("iterator"),Sy=!1;try{var xy=0,My={next:function(){return{done:!!xy++}},return:function(){Sy=!0}};My[Cy]=function(){return this},Array.from(My,(function(){throw 2}))}catch(aR){}var Ly=function(t,e){if(!e&&!Sy)return!1;var n=!1;try{var r={};r[Cy]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(aR){}return n},Oy=fg,Iy=Sg.CONSTRUCTOR||!Ly((function(t){Oy.all(t).then(void 0,(function(){}))})),Py=P,Ry=It,By=xg,Uy=cg,Dy=Ed;Ln({target:"Promise",stat:!0,forced:Iy},{all:function(t){var e=this,n=By.f(e),r=n.resolve,i=n.reject,o=Uy((function(){var n=Ry(e.resolve),o=[],a=0,s=1;Dy(t,(function(t){var u=a++,l=!1;s++,Py(n,e,t).then((function(t){l||(l=!0,o[u]=t,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise}});var jy=Ln,Fy=Sg.CONSTRUCTOR;fg&&fg.prototype,jy({target:"Promise",proto:!0,forced:Fy,real:!0},{catch:function(t){return this.then(void 0,t)}});var Ny=P,Hy=It,zy=xg,Vy=cg,qy=Ed;Ln({target:"Promise",stat:!0,forced:Iy},{race:function(t){var e=this,n=zy.f(e),r=n.reject,i=Vy((function(){var i=Hy(e.resolve);qy(t,(function(t){Ny(i,e,t).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var Gy=P,Yy=xg;Ln({target:"Promise",stat:!0,forced:Sg.CONSTRUCTOR},{reject:function(t){var e=Yy.f(this);return Gy(e.reject,void 0,t),e.promise}});var Wy=rn,Ky=et,Xy=xg,$y=function(t,e){if(Wy(t),Ky(e)&&e.constructor===t)return e;var n=Xy.f(t);return(0,n.resolve)(e),n.promise},Jy=Ln,Qy=fg,Zy=Sg.CONSTRUCTOR,tm=$y,em=st("Promise"),nm=!Zy;Jy({target:"Promise",stat:!0,forced:true},{resolve:function(t){return tm(nm&&this===em?Qy:this,t)}});var rm=P,im=It,om=xg,am=cg,sm=Ed;Ln({target:"Promise",stat:!0,forced:Iy},{allSettled:function(t){var e=this,n=om.f(e),r=n.resolve,i=n.reject,o=am((function(){var n=im(e.resolve),i=[],o=0,a=1;sm(t,(function(t){var s=o++,u=!1;a++,rm(n,e,t).then((function(t){u||(u=!0,i[s]={status:"fulfilled",value:t},--a||r(i))}),(function(t){u||(u=!0,i[s]={status:"rejected",reason:t},--a||r(i))}))})),--a||r(i)}));return o.error&&i(o.value),n.promise}});var um=P,lm=It,cm=st,fm=xg,hm=cg,pm=Ed,dm="No one promise resolved";Ln({target:"Promise",stat:!0,forced:Iy},{any:function(t){var e=this,n=cm("AggregateError"),r=fm.f(e),i=r.resolve,o=r.reject,a=hm((function(){var r=lm(e.resolve),a=[],s=0,u=1,l=!1;pm(t,(function(t){var c=s++,f=!1;u++,um(r,e,t).then((function(t){f||l||(l=!0,i(t))}),(function(t){f||l||(f=!0,a[c]=t,--u||o(new n(a,dm)))}))})),--u||o(new n(a,dm))}));return a.error&&o(a.value),r.promise}});var vm=Ln,gm=fg,ym=a,mm=st,bm=x,wm=av,km=$y,_m=gm&&gm.prototype;vm({target:"Promise",proto:!0,real:!0,forced:!!gm&&ym((function(){_m.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=wm(this,mm("Promise")),n=bm(t);return this.then(n?function(n){return km(e,t()).then((function(){return n}))}:t,n?function(n){return km(e,t()).then((function(){throw n}))}:t)}});var Am=nt.Promise,Em=xg,Tm=cg;Ln({target:"Promise",stat:!0,forced:!0},{try:function(t){var e=Em.f(this),n=Tm(t);return(n.error?e.reject:e.resolve)(n.value),e.promise}});var Cm=n(Am),Sm=Ln,xm=Fn,Mm=y([].reverse),Lm=[1,2];Sm({target:"Array",proto:!0,forced:String(Lm)===String(Lm.reverse())},{reverse:function(){return xm(this)&&(this.length=this.length),Mm(this)}});var Om=af("Array").reverse,Im=ut,Pm=Om,Rm=Array.prototype,Bm=n((function(t){var e=t.reverse;return t===Rm||Im(Rm,t)&&e===Rm.reverse?Pm:e})),Um=Ln,Dm=Fn,jm=Sr,Fm=et,Nm=ai,Hm=Kn,zm=Q,Vm=tr,qm=pe,Gm=Is,Ym=jr("slice"),Wm=qm("species"),Km=Array,Xm=Math.max;Um({target:"Array",proto:!0,forced:!Ym},{slice:function(t,e){var n,r,i,o=zm(this),a=Hm(o),s=Nm(t,a),u=Nm(void 0===e?a:e,a);if(Dm(o)&&(n=o.constructor,(jm(n)&&(n===Km||Dm(n.prototype))||Fm(n)&&null===(n=n[Wm]))&&(n=void 0),n===Km||void 0===n))return Gm(o,s,u);for(r=new(void 0===n?Km:n)(Xm(u-s,0)),i=0;s<u;s++,i++)s in o&&Vm(r,i,o[s]);return r.length=i,r}});var $m=af("Array").slice,Jm=ut,Qm=$m,Zm=Array.prototype,tb=function(t){var e=t.slice;return t===Zm||Jm(Zm,t)&&e===Zm.slice?Qm:e},eb=n(tb),nb=n(tb),rb=n(xc),ib=n(ff),ob=n(eh),ab=n(qc);Ln({target:"Array",stat:!0},{isArray:Fn});var sb=nt.Array.isArray,ub=n(sb),lb=n(sb),cb=rn,fb=cd,hb=Je,pb=P,db=$t,vb=function(t,e,n,r){try{return r?e(cb(n)[0],n[1]):e(n)}catch(aR){fb(t,"throw",aR)}},gb=Zp,yb=Sr,mb=Kn,bb=tr,wb=ad,kb=jh,_b=Array,Ab=function(t){var e=db(t),n=yb(this),r=arguments.length,i=r>1?arguments[1]:void 0,o=void 0!==i;o&&(i=hb(i,r>2?arguments[2]:void 0));var a,s,u,l,c,f,h=kb(e),p=0;if(!h||this===_b&&gb(h))for(a=mb(e),s=n?new this(a):_b(a);a>p;p++)f=o?i(e[p],p):e[p],bb(s,p,f);else for(c=(l=wb(e,h)).next,s=n?new this:[];!(u=pb(c,l)).done;p++)f=o?vb(l,i,[u.value,p],!0):u.value,bb(s,p,f);return s.length=p,s},Eb=Ab;Ln({target:"Array",stat:!0,forced:!Ly((function(t){Array.from(t)}))},{from:Eb});var Tb=nt.Array.from,Cb=n(Tb),Sb=n(Tb),xb=n(Oc);function Mb(t,e){var n=qh(t);if(Gh){var r=Gh(t);e&&(r=Jh(r).call(r,(function(e){return Qh(t,e).enumerable}))),n.push.apply(n,r)}return n}function Lb(t){for(var e=1;e<arguments.length;e++){var n,r,i=null!=arguments[e]?arguments[e]:{};e%2?cp(n=Mb(Object(i),!0)).call(n,(function(e){jb(t,e,i[e])})):kp?xp(t,kp(i)):cp(r=Mb(Object(i))).call(r,(function(e){Mp(t,e,Qh(i,e))}))}return t}function Ob(){Ob=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Mp||function(t,e,n){t[e]=n.value},i="function"==typeof Ih?Ih:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Mp(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(S){u=function(t,e,n){return t[e]=n}}function l(t,e,n,i){var o=e&&e.prototype instanceof h?e:h,a=Lp(o.prototype),s=new E(i||[]);return r(a,"_invoke",{value:w(t,n,s)}),a}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=l;var f={};function h(){}function p(){}function d(){}var v={};u(v,o,(function(){return this}));var g=Op&&Op(Op(T([])));g&&g!==e&&n.call(g,o)&&(v=g);var y=d.prototype=h.prototype=Lp(v);function m(t){var e;cp(e=["next","throw","return"]).call(e,(function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(r,o,a,s){var u=c(t[r],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==Lc(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,s)}),(function(t){i("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return i("throw",t,a,s)}))}s(u.arg)}var o;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){i(t,n,e,r)}))}return o=o?o.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=k(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function k(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=c(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],cp(t).call(t,_,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return p.prototype=d,r(y,"constructor",{value:d,configurable:!0}),r(d,"constructor",{value:p,configurable:!0}),p.displayName=u(d,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Ip?Ip(t,d):(t.__proto__=d,u(t,s,"GeneratorFunction")),t.prototype=Lp(y),t},t.awrap=function(t){return{__await:t}},m(b.prototype),u(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Cm);var a=new b(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(y),u(y,s,"Generator"),u(y,o,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return Bm(n).call(n),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=T,E.prototype={constructor:E,reset:function(t){var e;if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,cp(e=this.tryEntries).call(e,A),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+nb(r).call(r,1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:T(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function Ib(t){return(Ib="function"==typeof Ih&&"symbol"==typeof rb?function(t){return typeof t}:function(t){return t&&"function"==typeof Ih&&t.constructor===Ih&&t!==Ih.prototype?"symbol":typeof t})(t)}function Pb(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(aR){return void n(aR)}s.done?e(u):Cm.resolve(u).then(r,i)}function Rb(t){return function(){var e=this,n=arguments;return new Cm((function(r,i){var o=t.apply(e,n);function a(t){Pb(o,r,i,a,s,"next",t)}function s(t){Pb(o,r,i,a,s,"throw",t)}a(void 0)}))}}function Bb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ub(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Mp(t,Wb(r.key),r)}}function Db(t,e,n){return e&&Ub(t.prototype,e),n&&Ub(t,n),Mp(t,"prototype",{writable:!1}),t}function jb(t,e,n){return(e=Wb(e))in t?Mp(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Fb(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Lp(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Mp(t,"prototype",{writable:!1}),e&&Hb(t,e)}function Nb(t){var e;return(Nb=Ip?ib(e=Op).call(e):function(t){return t.__proto__||Op(t)})(t)}function Hb(t,e){var n;return(Hb=Ip?ib(n=Ip).call(n):function(t,e){return t.__proto__=e,t})(t,e)}function zb(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Vb(t){var e=function(){if("undefined"==typeof Reflect||!ob)return!1;if(ob.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ob(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Nb(t);if(e){var i=Nb(this).constructor;n=ob(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===Lc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return zb(t)}(this,n)}}function qb(){var t;"undefined"!=typeof Reflect&&ab?qb=ib(t=ab).call(t):qb=function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Nb(t)););return t}(t,e);if(r){var i=Qh(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}};return qb.apply(this,arguments)}function Gb(t,e){return function(t){if(lb(t))return t}(t)||function(t,e){var n=null==t?null:void 0!==Ih&&Hh(t)||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(t,e)||function(t,e){var n;if(!t)return;if("string"==typeof t)return Yb(t,e);var r=nb(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Sb(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Yb(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yb(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Wb(t){var e=function(t,e){if("object"!==Lc(t)||null===t)return t;var n=t[xb];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Lc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Lc(e)?e:String(e)}var Kb=Ln,Xb=fi.indexOf,$b=tp,Jb=E([].indexOf),Qb=!!Jb&&1/Jb([1],1,-0)<0;Kb({target:"Array",proto:!0,forced:Qb||!$b("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return Qb?Jb(this,t,e)||0:Xb(this,t,e)}});var Zb=af("Array").indexOf,tw=ut,ew=Zb,nw=Array.prototype,rw=n((function(t){var e=t.indexOf;return t===nw||tw(nw,t)&&e===nw.indexOf?ew:e})),iw=Ln,ow=ua.find,aw="find",sw=!0;aw in[]&&Array(1)[aw]((function(){sw=!1})),iw({target:"Array",proto:!0,forced:sw},{find:function(t){return ow(this,t,arguments.length>1?arguments[1]:void 0)}});var uw=af("Array").find,lw=ut,cw=uw,fw=Array.prototype,hw=n((function(t){var e=t.find;return t===fw||lw(fw,t)&&e===fw.find?cw:e})),pw=L,dw=Fn,vw=TypeError,gw=Object.getOwnPropertyDescriptor,yw=pw&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(aR){return aR instanceof TypeError}}(),mw=xt,bw=TypeError,ww=function(t,e){if(!delete t[e])throw bw("Cannot delete property "+mw(e)+" of "+mw(t))},kw=Ln,_w=$t,Aw=ai,Ew=Vn,Tw=Kn,Cw=yw?function(t,e){if(dw(t)&&!gw(t,"length").writable)throw vw("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e},Sw=$n,xw=Rr,Mw=tr,Lw=ww,Ow=jr("splice"),Iw=Math.max,Pw=Math.min;kw({target:"Array",proto:!0,forced:!Ow},{splice:function(t,e){var n,r,i,o,a,s,u=_w(this),l=Tw(u),c=Aw(t,l),f=arguments.length;for(0===f?n=r=0:1===f?(n=0,r=l-c):(n=f-2,r=Pw(Iw(Ew(e),0),l-c)),Sw(l+n-r),i=xw(u,r),o=0;o<r;o++)(a=c+o)in u&&Mw(i,o,u[a]);if(i.length=r,n<r){for(o=c;o<l-r;o++)s=o+n,(a=o+r)in u?u[s]=u[a]:Lw(u,s);for(o=l;o>l-r+n;o--)Lw(u,o-1)}else if(n>r)for(o=l-r;o>c;o--)s=o+n-1,(a=o+r-1)in u?u[s]=u[a]:Lw(u,s);for(o=0;o<n;o++)u[o+c]=arguments[o+2];return Cw(u,l-r+n),i}});var Rw=af("Array").splice,Bw=ut,Uw=Rw,Dw=Array.prototype,jw=n((function(t){var e=t.splice;return t===Dw||Bw(Dw,t)&&e===Dw.splice?Uw:e})),Fw="\t\n\v\f\r \u2028\u2029\ufeff",Nw=X,Hw=ei,zw=Fw,Vw=y("".replace),qw=RegExp("^["+zw+"]+"),Gw=RegExp("(^|[^"+zw+"])["+zw+"]+$"),Yw=function(t){return function(e){var n=Hw(Nw(e));return 1&t&&(n=Vw(n,qw,"")),2&t&&(n=Vw(n,Gw,"$1")),n}},Ww={start:Yw(1),end:Yw(2),trim:Yw(3)},Kw=o,Xw=a,$w=y,Jw=ei,Qw=Ww.trim,Zw=Fw,tk=Kw.parseInt,ek=Kw.Symbol,nk=ek&&ek.iterator,rk=/^[+-]?0x/i,ik=$w(rk.exec),ok=8!==tk(Zw+"08")||22!==tk(Zw+"0x16")||nk&&!Xw((function(){tk(Object(nk))}))?function(t,e){var n=Qw(Jw(t));return tk(n,e>>>0||(ik(rk,n)?16:10))}:tk;Ln({global:!0,forced:parseInt!=ok},{parseInt:ok});var ak=n(nt.parseInt),sk=ua.map;Ln({target:"Array",proto:!0,forced:!jr("map")},{map:function(t){return sk(this,t,arguments.length>1?arguments[1]:void 0)}});var uk=af("Array").map,lk=ut,ck=uk,fk=Array.prototype,hk=n((function(t){var e=t.map;return t===fk||lk(fk,t)&&e===fk.map?ck:e})),pk=L,dk=y,vk=P,gk=a,yk=_i,mk=lo,bk=R,wk=$t,kk=G,_k=Object.assign,Ak=Object.defineProperty,Ek=dk([].concat),Tk=!_k||gk((function(){if(pk&&1!==_k({b:1},_k(Ak({},"a",{enumerable:!0,get:function(){Ak(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=_k({},t)[n]||yk(_k({},e)).join("")!=r}))?function(t,e){for(var n=wk(t),r=arguments.length,i=1,o=mk.f,a=bk.f;r>i;)for(var s,u=kk(arguments[i++]),l=o?Ek(yk(u),o(u)):yk(u),c=l.length,f=0;c>f;)s=l[f++],pk&&!vk(a,u,s)||(n[s]=u[s]);return n}:_k,Ck=Tk;Ln({target:"Object",stat:!0,arity:2,forced:Object.assign!==Ck},{assign:Ck});var Sk=n(nt.Object.assign);function xk(t,e){var n=qh(t);if(Gh){var r=Gh(t);e&&(r=Jh(r).call(r,(function(e){return Qh(t,e).enumerable}))),n.push.apply(n,r)}return n}function Mk(t){for(var e=1;e<arguments.length;e++){var n,r,i=null!=arguments[e]?arguments[e]:{};e%2?cp(n=xk(Object(i),!0)).call(n,(function(e){Rk(t,e,i[e])})):kp?xp(t,kp(i)):cp(r=xk(Object(i))).call(r,(function(e){Mp(t,e,Qh(i,e))}))}return t}function Lk(t){return(Lk="function"==typeof Ih&&"symbol"==typeof rb?function(t){return typeof t}:function(t){return t&&"function"==typeof Ih&&t.constructor===Ih&&t!==Ih.prototype?"symbol":typeof t})(t)}function Ok(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ik(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Mp(t,Vk(r.key),r)}}function Pk(t,e,n){return e&&Ik(t.prototype,e),n&&Ik(t,n),Mp(t,"prototype",{writable:!1}),t}function Rk(t,e,n){return(e=Vk(e))in t?Mp(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Bk(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Lp(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Mp(t,"prototype",{writable:!1}),e&&Dk(t,e)}function Uk(t){var e;return(Uk=Ip?ib(e=Op).call(e):function(t){return t.__proto__||Op(t)})(t)}function Dk(t,e){var n;return(Dk=Ip?ib(n=Ip).call(n):function(t,e){return t.__proto__=e,t})(t,e)}function jk(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Fk(t){var e=function(){if("undefined"==typeof Reflect||!ob)return!1;if(ob.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ob(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Uk(t);if(e){var i=Uk(this).constructor;n=ob(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===Lc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return jk(t)}(this,n)}}function Nk(){var t;"undefined"!=typeof Reflect&&ab?Nk=ib(t=ab).call(t):Nk=function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Uk(t)););return t}(t,e);if(r){var i=Qh(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}};return Nk.apply(this,arguments)}function Hk(t){return function(t){if(lb(t))return zk(t)}(t)||function(t){if(void 0!==Ih&&null!=Hh(t)||null!=t["@@iterator"])return Sb(t)}(t)||function(t,e){var n;if(!t)return;if("string"==typeof t)return zk(t,e);var r=nb(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Sb(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zk(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zk(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Vk(t){var e=function(t,e){if("object"!==Lc(t)||null===t)return t;var n=t[xb];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Lc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Lc(e)?e:String(e)}var qk={exports:{}};!function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}function i(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function o(t,e,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||t,a),u=n?n+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 a(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function s(){this._events=new r,this._eventsCount=0}Lp&&(r.prototype=Lp(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var t,r,i=[];if(0===this._eventsCount)return i;for(r in t=this._events)e.call(t,r)&&i.push(n?nb(r).call(r,1):r);return Gh?lh(i).call(i,Gh(t)):i},s.prototype.listeners=function(t){var e=n?n+t:t,r=this._events[e];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},s.prototype.listenerCount=function(t){var e=n?n+t:t,r=this._events[e];return r?r.fn?1:r.length:0},s.prototype.emit=function(t,e,r,i,o,a){var s=n?n+t:t;if(!this._events[s])return!1;var u,l,c=this._events[s],f=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),f){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,r),!0;case 4:return c.fn.call(c.context,e,r,i),!0;case 5:return c.fn.call(c.context,e,r,i,o),!0;case 6:return c.fn.call(c.context,e,r,i,o,a),!0}for(l=1,u=new Array(f-1);l<f;l++)u[l-1]=arguments[l];c.fn.apply(c.context,u)}else{var h,p=c.length;for(l=0;l<p;l++)switch(c[l].once&&this.removeListener(t,c[l].fn,void 0,!0),f){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,e);break;case 3:c[l].fn.call(c[l].context,e,r);break;case 4:c[l].fn.call(c[l].context,e,r,i);break;default:if(!u)for(h=1,u=new Array(f-1);h<f;h++)u[h-1]=arguments[h];c[l].fn.apply(c[l].context,u)}}return!0},s.prototype.on=function(t,e,n){return o(this,t,e,n,!1)},s.prototype.once=function(t,e,n){return o(this,t,e,n,!0)},s.prototype.removeListener=function(t,e,r,i){var o=n?n+t:t;if(!this._events[o])return this;if(!e)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==e||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var u=0,l=[],c=s.length;u<c;u++)(s[u].fn!==e||i&&!s[u].once||r&&s[u].context!==r)&&l.push(s[u]);l.length?this._events[o]=1===l.length?l[0]:l:a(this,o)}return this},s.prototype.removeAllListeners=function(t){var e;return t?(e=n?n+t:t,this._events[e]&&a(this,e)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,t.exports=s}(qk);var Gk=qk.exports,Yk=ua.some;Ln({target:"Array",proto:!0,forced:!tp("some")},{some:function(t){return Yk(this,t,arguments.length>1?arguments[1]:void 0)}});var Wk=af("Array").some,Kk=ut,Xk=Wk,$k=Array.prototype,Jk=n((function(t){var e=t.some;return t===$k||Kk($k,t)&&e===$k.some?Xk:e})),Qk=Vn,Zk=ei,t_=X,e_=RangeError,n_=y,r_=Yn,i_=ei,o_=X,a_=n_((function(t){var e=Zk(t_(this)),n="",r=Qk(t);if(r<0||r==1/0)throw e_("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(e+=e))1&r&&(n+=e);return n})),s_=n_("".slice),u_=Math.ceil,l_=function(t){return function(e,n,r){var i,o,a=i_(o_(e)),s=r_(n),u=a.length,l=void 0===r?" ":i_(r);return s<=u||""==l?a:((o=a_(l,u_((i=s-u)/l.length))).length>i&&(o=s_(o,0,i)),t?a+o:o+a)}},c_={start:l_(!1),end:l_(!0)},f_=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(lt),h_=c_.start;Ln({target:"String",proto:!0,forced:f_},{padStart:function(t){return h_(this,t,arguments.length>1?arguments[1]:void 0)}});var p_,d_=af("String").padStart,v_=ut,g_=d_,y_=String.prototype,m_=n((function(t){var e=t.padStart;return"string"==typeof t||t===y_||v_(y_,t)&&e===y_.padStart?g_:e})),b_="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,w_=o,k_=h,__=x,A_=b_,E_=lt,T_=Is,C_=uv,S_=w_.Function,x_=/MSIE .\./.test(E_)||A_&&((p_=w_.Bun.version.split(".")).length<3||0==p_[0]&&(p_[1]<3||3==p_[1]&&0==p_[2])),M_=function(t,e){var n=e?2:1;return x_?function(r,i){var o=C_(arguments.length,1)>n,a=__(r)?r:S_(r),s=o?T_(arguments,n):[],u=o?function(){k_(a,this,s)}:a;return e?t(u,i):t(u)}:t},L_=Ln,O_=o,I_=M_(O_.setInterval,!0);L_({global:!0,bind:!0,forced:O_.setInterval!==I_},{setInterval:I_});var P_=Ln,R_=o,B_=M_(R_.setTimeout,!0);P_({global:!0,bind:!0,forced:R_.setTimeout!==B_},{setTimeout:B_});var U_=n(nt.setInterval),D_=n(nt.setTimeout),j_=ua.every;Ln({target:"Array",proto:!0,forced:!tp("every")},{every:function(t){return j_(this,t,arguments.length>1?arguments[1]:void 0)}});var F_=af("Array").every,N_=ut,H_=F_,z_=Array.prototype,V_=n((function(t){var e=t.every;return t===z_||N_(z_,t)&&e===z_.every?H_:e})),q_=o,G_=a,Y_=ei,W_=Ww.trim,K_=Fw,X_=y("".charAt),$_=q_.parseFloat,J_=q_.Symbol,Q_=J_&&J_.iterator,Z_=1/$_(K_+"-0")!=-1/0||Q_&&!G_((function(){$_(Object(Q_))}))?function(t){var e=W_(Y_(t)),n=$_(e);return 0===n&&"-"==X_(e,0)?-0:n}:$_;Ln({global:!0,forced:parseFloat!=Z_},{parseFloat:Z_});var tA=n(nt.parseFloat),eA=Eu.PROPER,nA=a,rA=Fw,iA=Ww.trim;Ln({target:"String",proto:!0,forced:function(t){return nA((function(){return!!rA[t]()||"
"!=="
"[t]()||eA&&rA[t].name!==t}))}("trim")},{trim:function(){return iA(this)}});var oA=af("String").trim,aA=ut,sA=oA,uA=String.prototype,lA=n((function(t){var e=t.trim;return"string"==typeof t||t===uA||aA(uA,t)&&e===uA.trim?sA:e})),cA=ro,fA=Math.floor,hA=function(t,e){var n=t.length,r=fA(n/2);return n<8?pA(t,e):dA(t,hA(cA(t,0,r),e),hA(cA(t,r),e),e)},pA=function(t,e){for(var n,r,i=t.length,o=1;o<i;){for(r=o,n=t[o];r&&e(t[r-1],n)>0;)t[r]=t[--r];r!==o++&&(t[r]=n)}return t},dA=function(t,e,n,r){for(var i=e.length,o=n.length,a=0,s=0;a<i||s<o;)t[a+s]=a<i&&s<o?r(e[a],n[s])<=0?e[a++]:n[s++]:a<i?e[a++]:n[s++];return t},vA=hA,gA=lt.match(/firefox\/(\d+)/i),yA=!!gA&&+gA[1],mA=/MSIE|Trident/.test(lt),bA=lt.match(/AppleWebKit\/(\d+)\./),wA=!!bA&&+bA[1],kA=Ln,_A=y,AA=It,EA=$t,TA=Kn,CA=ww,SA=ei,xA=a,MA=vA,LA=tp,OA=yA,IA=mA,PA=gt,RA=wA,BA=[],UA=_A(BA.sort),DA=_A(BA.push),jA=xA((function(){BA.sort(void 0)})),FA=xA((function(){BA.sort(null)})),NA=LA("sort"),HA=!xA((function(){if(PA)return PA<70;if(!(OA&&OA>3)){if(IA)return!0;if(RA)return RA<603;var t,e,n,r,i="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)BA.push({k:e+r,v:n})}for(BA.sort((function(t,e){return e.v-t.v})),r=0;r<BA.length;r++)e=BA[r].k.charAt(0),i.charAt(i.length-1)!==e&&(i+=e);return"DGBEFHACIJK"!==i}}));kA({target:"Array",proto:!0,forced:jA||!FA||!NA||!HA},{sort:function(t){void 0!==t&&AA(t);var e=EA(this);if(HA)return void 0===t?UA(e):UA(e,t);var n,r,i=[],o=TA(e);for(r=0;r<o;r++)r in e&&DA(i,e[r]);for(MA(i,function(t){return function(e,n){return void 0===n?-1:void 0===e?1:void 0!==t?+t(e,n)||0:SA(e)>SA(n)?1:-1}}(t)),n=TA(i),r=0;r<n;)e[r]=i[r++];for(;r<o;)CA(e,r++);return e}});var zA,VA=af("Array").sort,qA=ut,GA=VA,YA=Array.prototype,WA=n((function(t){var e=t.sort;return t===YA||qA(YA,t)&&e===YA.sort?GA:e})),KA="undefined"!=typeof window&&window.location&&rw(zA=window.location.href).call(zA,"xgplayerdebugger=1")>-1,XA="color: #525252; background-color: #90ee90;",$A="color: #525252; background-color: red;",JA="color: #525252; background-color: yellow; ",QA="%c[xgplayer]",ZA={config:{debug:KA?3:0},logInfo:function(t){for(var e,n,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];this.config.debug>=3&&(n=console).log.apply(n,lh(e=[QA,XA,t]).call(e,i))},logWarn:function(t){for(var e,n,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];this.config.debug>=1&&(n=console).warn.apply(n,lh(e=[QA,JA,t]).call(e,i))},logError:function(t){var e,n;if(!(this.config.debug<1)){for(var r=this.config.debug>=2?"trace":"error",i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];(n=console)[r].apply(n,lh(e=[QA,$A,t]).call(e,o))}}},tE=function(){function t(e){Ok(this,t),this.bufferedList=e}return Pk(t,[{key:"start",value:function(t){return this.bufferedList[t].start}},{key:"end",value:function(t){return this.bufferedList[t].end}},{key:"length",get:function(){return this.bufferedList.length}}]),t}(),eE={};eE.createDom=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=document.createElement(e);return o.className=i,o.innerHTML=n,cp(t=qh(r)).call(t,(function(t){var n=t,i=r[t];"video"===e||"audio"===e||"live-video"===e?i&&o.setAttribute(n,i):o.setAttribute(n,i)})),o},eE.createDomFromHtml=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";try{var r=document.createElement("div");r.innerHTML=t;var i=r.children;if(r=null,i.length>0){var o;if(i=i[0],n&&eE.addClass(i,n),e)cp(o=qh(e)).call(o,(function(t){i.setAttribute(t,e[t])}));return i}return null}catch(a){return ZA.logError("util.createDomFromHtml",a),null}},eE.hasClass=function(t,e){if(!t||!e)return!1;try{return Jk(Array.prototype).call(t.classList,(function(t){return t===e}))}catch(r){var n=t.className&&"object"===Lk(t.className)?t.getAttribute("class"):t.className;return n&&!!n.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))}},eE.addClass=function(t,e){if(t&&e)try{var n;cp(n=e.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(n,(function(e){e&&t.classList.add(e)}))}catch(r){eE.hasClass(t,e)||(t.className&&"object"===Lk(t.className)?t.setAttribute("class",t.getAttribute("class")+" "+e):t.className+=" "+e)}},eE.removeClass=function(t,e){if(t&&e)try{var n;cp(n=e.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(n,(function(e){e&&t.classList.remove(e)}))}catch(i){var r;if(eE.hasClass(t,e))cp(r=e.split(/\s+/g)).call(r,(function(e){var n=new RegExp("(\\s|^)"+e+"(\\s|$)");t.className&&"object"===Lk(t.className)?t.setAttribute("class",t.getAttribute("class").replace(n," ")):t.className=t.className.replace(n," ")}))}},eE.toggleClass=function(t,e){var n;t&&cp(n=e.split(/\s+/g)).call(n,(function(e){eE.hasClass(t,e)?eE.removeClass(t,e):eE.addClass(t,e)}))},eE.classNames=function(){for(var t=arguments,e=[],n=function(n){if("String"===eE.typeOf(t[n]))e.push(t[n]);else if("Object"===eE.typeOf(t[n])){var r;hk(r=qh(t[n])).call(r,(function(r){t[n][r]&&e.push(r)}))}},r=0;r<arguments.length;r++)n(r);return e.join(" ")},eE.findDom=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1?arguments[1]:void 0;try{t=e.querySelector(n)}catch(r){ZA.logError("util.findDom",r),0===rw(n).call(n,"#")&&(t=e.getElementById(nb(n).call(n,1)))}return t},eE.getCss=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,!1)[e]},eE.padStart=function(t,e,n){for(var r=String(n),i=e>>0,o=Math.ceil(i/r.length),a=[],s=String(t);o--;)a.push(r);return a.join("").substring(0,i-s.length)+s},eE.format=function(t){if(window.isNaN(t))return"";t=Math.round(t);var e=m_(eE).call(eE,Math.floor(t/3600),2,0),n=m_(eE).call(eE,Math.floor((t-3600*e)/60),2,0),r=m_(eE).call(eE,Math.floor(t-3600*e-60*n),2,0);return("00"===e?[n,r]:[e,n,r]).join(":")},eE.event=function(t){if(t.touches){var e=t.touches[0]||t.changedTouches[0];t.clientX=e.clientX||0,t.clientY=e.clientY||0,t.offsetX=e.pageX-e.target.offsetLeft,t.offsetY=e.pageY-e.target.offsetTop}t._target=t.target||t.srcElement},eE.typeOf=function(t){return Object.prototype.toString.call(t).match(/([^\s.*]+)(?=]$)/g)[0]},eE.deepCopy=function(t,e){var n;if("Object"===eE.typeOf(e)&&"Object"===eE.typeOf(t))return cp(n=qh(e)).call(n,(function(n){if("Object"!==eE.typeOf(e[n])||e[n]instanceof Node)if("Array"===eE.typeOf(e[n])){var r;t[n]="Array"===eE.typeOf(t[n])?lh(r=t[n]).call(r,e[n]):e[n]}else t[n]=e[n];else void 0===t[n]||void 0===t[n]?t[n]=e[n]:eE.deepCopy(t[n],e[n])})),t},eE.deepMerge=function(t,e){var n;return hk(n=qh(e)).call(n,(function(n){var r;"Array"===eE.typeOf(e[n])&&"Array"===eE.typeOf(t[n])?"Array"===eE.typeOf(t[n])&&(r=t[n]).push.apply(r,Hk(e[n])):eE.typeOf(t[n])!==eE.typeOf(e[n])||null===t[n]||"Object"!==eE.typeOf(t[n])||e[n]instanceof window.Node?null!==e[n]&&(t[n]=e[n]):eE.deepMerge(t[n],e[n])})),t},eE.getBgImage=function(t){var e=(t.currentStyle||window.getComputedStyle(t,null)).backgroundImage;if(!e||"none"===e)return"";var n=document.createElement("a");return n.href=e.replace(/url\("|"\)/g,""),n.href},eE.copyDom=function(t){if(t&&1===t.nodeType){var e=document.createElement(t.tagName);return cp(Array.prototype).call(t.attributes,(function(t){e.setAttribute(t.name,t.value)})),t.innerHTML&&(e.innerHTML=t.innerHTML),e}return""},eE.setInterval=function(t,e,n,r){t._interval[e]||(t._interval[e]=U_(ib(n).call(n,t),r))},eE.clearInterval=function(t,e){clearInterval(t._interval[e]),t._interval[e]=null},eE.setTimeout=function(t,e,n){t._timers||(t._timers=[]);var r=D_((function(){e(),eE.clearTimeout(t,r)}),n);return t._timers.push(r),r},eE.clearTimeout=function(t,e){var n=t._timers;if("Array"===eE.typeOf(n)){for(var r=0;r<n.length;r++)if(n[r]===e){jw(n).call(n,r,1),clearTimeout(e);break}}else clearTimeout(e)},eE.clearAllTimers=function(t){var e=t._timers;"Array"===eE.typeOf(e)&&(hk(e).call(e,(function(t){clearTimeout(t)})),t._timerIds=[])},eE.createImgBtn=function(t,e,n,r){var i,o,a,s,u,l,c,f,h,p,d,v,g=eE.createDom("xg-".concat(t),"",{},"xgplayer-".concat(t,"-img"));(g.style.backgroundImage='url("'.concat(e,'")'),n&&r)&&(V_(i=["px","rem","em","pt","dp","vw","vh","vm","%"]).call(i,(function(t){var e,i;return!(rw(n).call(n,t)>-1&&rw(r).call(r,t)>-1)||(c=tA(lA(e=nb(n).call(n,0,rw(n).call(n,t))).call(e)),f=tA(lA(i=nb(r).call(r,0,rw(r).call(r,t))).call(i)),h=t,!1)})),g.style.width=lh(o="".concat(c)).call(o,h),g.style.height=lh(a="".concat(f)).call(a,h),g.style.backgroundSize=lh(s=lh(u=lh(l="".concat(c)).call(l,h," ")).call(u,f)).call(s,h),g.style.margin="start"===t?lh(p=lh(d=lh(v="-".concat(f/2)).call(v,h," auto auto -")).call(d,c/2)).call(p,h):"auto 5px auto 5px");return g},eE.Hex2RGBA=function(t,e){var n,r=[];if(/^\#[0-9A-F]{3}$/i.test(t)){var i="#";t.replace(/[0-9A-F]/gi,(function(t){i+=t+t})),t=i}return/^#[0-9A-F]{6}$/i.test(t)?(t.replace(/[0-9A-F]{2}/gi,(function(t){r.push(ak(t,16))})),lh(n="rgba(".concat(r.join(","),", ")).call(n,e,")")):"rgba(255, 255, 255, 0.1)"},eE.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},eE.checkIsFunction=function(t){return t&&"function"==typeof t},eE.checkIsObject=function(t){return null!==t&&"object"===Lk(t)},eE.hide=function(t){t.style.display="none"},eE.show=function(t,e){t.style.display=e||"block"},eE.isUndefined=function(t){if(null==t)return!0},eE.isNotNull=function(t){return!(null==t)},eE.setStyleFromCsstext=function(t,e){if(e)if("String"===eE.typeOf(e)){var n=e.replace(/\s+/g,"").split(";");hk(n).call(n,(function(e){if(e){var n=e.split(":");n.length>1&&(t.style[n[0]]=n[1])}}))}else{var r;hk(r=qh(e)).call(r,(function(n){t.style[n]=e[n]}))}},eE.filterStyleFromText=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["width","height","top","left","bottom","right","position","z-index","padding","margin","transform"],r=t.style.cssText;if(!r)return{};var i=r.replace(/\s+/g,"").split(";"),o={},a={};return hk(i).call(i,(function(t){if(t){var e=t.split(":");e.length>1&&(!function(t,e){for(var n=0,r=e.length;n<r;n++)if(rw(t).call(t,e[n])>-1)return!0;return!1}(e[0],n)?a[e[0]]=e[1]:o[e[0]]=e[1])}})),t.setAttribute("style",""),hk(e=qh(a)).call(e,(function(e){t.style[e]=a[e]})),o},eE.getStyleFromCsstext=function(t){var e=t.style.cssText;if(!e)return{};var n=e.replace(/\s+/g,"").split(";"),r={};return hk(n).call(n,(function(t){if(t){var e=t.split(":");e.length>1&&(r[e[0]]=e[1])}})),r},eE.preloadImg=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(t){var r=new window.Image;r.onload=function(t){r=null,e&&e(t)},r.onerror=function(t){r=null,n&&n(t)},r.src=t}},eE.stopPropagation=function(t){t&&t.stopPropagation()},eE.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},eE.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},eE.checkTouchSupport=function(){return"ontouchstart"in window},eE.getBuffered2=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=[],r=0;r<t.length;r++)n.push({start:t.start(r)<.5?0:t.start(r),end:t.end(r)});WA(n).call(n,(function(t,e){var n=t.start-e.start;return n||e.end-t.end}));var i=[];if(e)for(var o=0;o<n.length;o++){var a=i.length;if(a){var s=i[a-1].end;n[o].start-s<e?n[o].end>s&&(i[a-1].end=n[o].end):i.push(n[o])}else i.push(n[o])}else i=n;return new tE(i)},eE.getEventPos=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return t.touches&&t.touches.length>0&&(t=t.touches[0]),{x:t.x/e,y:t.y/e,clientX:t.clientX/e,clientY:t.clientY/e,offsetX:t.offsetX/e,offsetY:t.offsetY/e,pageX:t.pageX/e,pageY:t.pageY/e}},eE.requestAnimationFrame=function(t){var e=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(e)return e(t)},eE.getHostFromUrl=function(t){if("String"!==eE.typeOf(t))return"";var e=t.split("/"),n="";return e.length>3&&e[2]&&(n=e[2]),n},eE.cancelAnimationFrame=function(t){var e=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;e&&e(t)},eE.isMSE=function(t){return t.media&&(t=t.media),!!(t&&t instanceof HTMLMediaElement)&&(/^blob/.test(t.currentSrc)||/^blob/.test(t.src))},eE.isBlob=function(t){return"string"==typeof t&&/^blob/.test(t)},eE.generateSessionId=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=(new Date).getTime();try{t=ak(t)}catch(n){t=0}return e+=t,window.performance&&"function"==typeof window.performance.now&&(e+=ak(window.performance.now())),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:3&n|8).toString(16)}))},eE.createEvent=function(t){var e;return"function"==typeof window.Event?e=new Event(t):(e=document.createEvent("Event")).initEvent(t,!0,!0),e},eE.adjustTimeByDuration=function(t,e,n){return e&&t&&(t>e||n&&t<e)?e:t},eE.createPositionBar=function(t,e){var n=eE.createDom("xg-bar","",{"data-index":-1},t);return e.appendChild(n),n},eE.getTransformStyle=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0,scale:1,rotate:0},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r={scale:"".concat(e.scale||1),translate:lh(t="".concat(e.x||0,"%, ")).call(t,e.y||0,"%"),rotate:"".concat(e.rotate||0,"deg")},i=qh(r);return cp(i).call(i,(function(t){var e,i=new RegExp("".concat(t,"\\([^\\(]+\\)"),"g"),o=lh(e="".concat(t,"(")).call(e,r[t],")");i.test(n)?(i.lastIndex=-1,n=n.replace(i,o)):n+="".concat(o," ")})),n},eE.convertDeg=function(t){return Math.abs(t)<=1?360*t:t%360},eE.getIndexByTime=function(t,e){var n=e.length,r=-1;if(n<1)return r;if(t<=e[0].end||n<2)r=0;else if(t>e[n-1].end)r=n-1;else for(var i=1;i<n;i++)if(t>e[i-1].end&&t<=e[i].end){r=i;break}return r},eE.getOffsetCurrentTime=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=-1;if((r=n>=0&&n<e.length?n:eE.getIndexByTime(t,e))<0)return-1;var i=e.length,o=e[r],a=o.start,s=o.end,u=o.cTime,l=o.offset;return t<a?u:t>=a&&t<=s?t-l:t>s&&r>=i-1?s:-1},eE.getCurrentTimeByOffset=function(t,e){var n=-1;if(!e||e.length<0)return t;for(var r=0;r<e.length;r++)if(t<=e[r].duration){n=r;break}if(-1!==n){var i=e[n].start;return n-1<0?i+t:i+(t-e[n-1].duration)}return t};var nE=/(Android)\s([\d.]+)/,rE=/(Version)\/([\d.]+)/,iE=["avc1.42E01E, mp4a.40.2","avc1.58A01E, mp4a.40.2","avc1.4D401E, mp4a.40.2","avc1.64001E, mp4a.40.2","avc1.42E01E","mp4v.20.8","mp4v.20.8, mp4a.40.2","mp4v.20.240, mp4a.40.2"],oE={get device(){return oE.os.isPc?"pc":"mobile"},get browser(){var t,e;if("undefined"==typeof navigator)return"";var n=navigator.userAgent.toLowerCase(),r={ie:/rv:([\d.]+)\) like gecko/,firefox:/firefox\/([\d.]+)/,chrome:/chrome\/([\d.]+)/,opera:/opera.([\d.]+)/,safari:/version\/([\d.]+).*safari/};return lh(t=[]).call(t,Jh(e=qh(r)).call(e,(function(t){return r[t].test(n)})))[0]},get os(){if("undefined"==typeof navigator)return{};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)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,a=o||r&&!/(?:Mobile)/.test(t)||i&&/(?:Tablet)/.test(t),s=/(?:iPhone)/.test(t)&&!a;return{isTablet:a,isPhone:s,isIpad:o,isIos:s||o,isAndroid:r,isPc:!(s||r||n||a),isSymbian:n,isWindowsPhone:e,isFireFox:i}},get osVersion(){if("undefined"==typeof navigator)return 0;var t=navigator.userAgent,e="",n=(e=/(?:iPhone)|(?:iPad|PlayBook)/.test(t)?rE:nE)?e.exec(t):[];if(n&&n.length>=3){var r=n[2].split(".");return r.length>0?ak(r[0]):0}return 0},get isWeixin(){if("undefined"==typeof navigator)return!1;return!!/(micromessenger)\/([\d.]+)/.exec(navigator.userAgent.toLocaleLowerCase())},isSupportMP4:function(){var t={isSupport:!1,mime:""};if("undefined"==typeof document)return t;if(this.supportResult)return this.supportResult;var e=document.createElement("video");return"function"==typeof e.canPlayType&&hk(iE).call(iE,(function(n){"probably"===e.canPlayType('video/mp4; codecs="'.concat(n,'"'))&&(t.isSupport=!0,t.mime+="||".concat(n))})),this.supportResult=t,e=null,t},isMSESupport:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'video/mp4; codecs="avc1.42E01E,mp4a.40.2"';if("undefined"==typeof MediaSource||!MediaSource)return!1;try{return MediaSource.isTypeSupported(t)}catch(aR){return this._logger.error(t,aR),!1}},isHevcSupported:function(){return!("undefined"==typeof MediaSource||!MediaSource.isTypeSupported)&&(MediaSource.isTypeSupported('video/mp4;codecs="hev1.1.6.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.2.4.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.3.E.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.4.10.L120.90"'))},probeConfigSupported:function(t){var e={supported:!1,smooth:!1,powerEfficient:!1};if(!t||"undefined"==typeof navigator)return Cm.resolve(e);if(navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo)return navigator.mediaCapabilities.decodingInfo(t);var n=t.video||{},r=t.audio||{};try{var i=MediaSource.isTypeSupported(n.contentType),o=MediaSource.isTypeSupported(r.contentType);return Cm.resolve({supported:i&&o,smooth:!1,powerEfficient:!1})}catch(a){return Cm.resolve(e)}}},aE="play",sE="ended",uE="pause",lE="seeked",cE="timeupdate",fE="durationchange",hE="volumechange",pE="emptied",dE="autoplay_started",vE="video_resize";function gE(t,e,n){for(var r,i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];var s,u=e.call.apply(e,lh(r=[t]).call(r,o));n&&"function"==typeof n&&(u&&u.then?u.then((function(){for(var e,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];n.call.apply(n,lh(e=[t]).call(e,i))})):n.call.apply(n,lh(s=[t]).call(s,o)))}function yE(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{pre:null,next:null};return this.__hooks||(this.__hooks={}),!this.__hooks[t]&&(this.__hooks[t]=null),ib(n=function(){var n,i=arguments,o=this;if(r.pre)try{var a,s;(s=r.pre).call.apply(s,lh(a=[this]).call(a,nb(Array.prototype).call(arguments)))}catch(v){var u,l;throw v.message=lh(u=lh(l="[pluginName: ".concat(this.pluginName,":")).call(l,t,":pre error] >> ")).call(u,v.message),v}if(this.__hooks&&this.__hooks[t])try{var c,f=function(t,e,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];if(t.__hooks&&lb(t.__hooks[e])){var a,s=t.__hooks[e],u=-1,l=function t(e,n,r){for(var i,o,a=arguments.length,l=new Array(a>3?a-3:0),c=3;c<a;c++)l[c-3]=arguments[c];if(u++,0===s.length||u===s.length)return r.call.apply(r,lh(o=[e,e]).call(o,l));var f,h=s[u],p=h.call.apply(h,lh(i=[e,e]).call(i,l));return p&&p.then?p.then((function(i){var o;return!1===i?null:t.apply(void 0,lh(o=[e,n,r]).call(o,l))})).catch((function(t){console.warn("[runHooks]".concat(n," reject"),t.message)})):!1!==p?t.apply(void 0,lh(f=[e,n,r]).call(f,l)):void 0};return l.apply(void 0,lh(a=[t,e,n]).call(a,i))}var c;return n.call.apply(n,lh(c=[t,t]).call(c,i))}(this,t,e);if(f)if(f.then)f.then((function(t){var n;!1!==t&&gE.apply(void 0,lh(n=[o,e,r.next]).call(n,Hk(i)))})).catch((function(t){throw t}));else gE.apply(void 0,lh(c=[this,e,r.next]).call(c,nb(Array.prototype).call(arguments)));else if(void 0===f){var h;gE.apply(void 0,lh(h=[this,e,r.next]).call(h,nb(Array.prototype).call(arguments)))}}catch(v){var p,d;throw v.message=lh(p=lh(d="[pluginName: ".concat(this.pluginName,":")).call(d,t,"] >> ")).call(p,v.message),v}else gE.apply(void 0,lh(n=[this,e,r.next]).call(n,nb(Array.prototype).call(arguments)))}).call(n,this)}function mE(t,e){var n=this.__hooks;if(!n||!lb(n[t]))return-1;for(var r=n[t],i=0;i<r.length;i++)if(r[i]===e)return i;return-1}function bE(t,e){var n=this.__hooks;if(n)return n.hasOwnProperty(t)?(lb(n[t])||(n[t]=[]),-1===mE.call(this,t,e)&&n[t].push(e),!0):(console.warn("has no supported hook which name [".concat(t,"]")),!1)}function wE(t,e){var n=this.__hooks;if(n){if(lb(n[t])){var r=n[t],i=mE.call(this,t,e);-1!==i&&jw(r).call(r,i,1)}delete n[t]}}function kE(t,e){var n;ZA.logError(lh(n="[".concat(t,"] event or callback cant be undefined or null when call ")).call(n,e))}var _E=function(){function t(e){Ok(this,t),eE.checkIsFunction(this.beforeCreate)&&this.beforeCreate(e),function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];t.__hooks={},e&&hk(e).call(e,(function(e){t.__hooks[e]=null})),Mp(t,"hooks",{get:function(){var e;return t.__hooks&&hk(e=qh(t.__hooks)).call(e,(function(e){if(t.__hooks[e])return e}))}})}(this),this.__args=e,this.__events={},this.__onceEvents={},this.config=e.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(e)}return Pk(t,[{key:"beforeCreate",value:function(t){}},{key:"afterCreate",value:function(){}},{key:"beforePlayerInit",value:function(){}},{key:"onPluginsReady",value:function(){}},{key:"afterPlayerInit",value:function(){}},{key:"destroy",value:function(){}},{key:"__init",value:function(t){this.player=t.player,this.playerConfig=t.player&&t.player.config,this.pluginName=t.pluginName?t.pluginName.toLowerCase():this.constructor.pluginName.toLowerCase(),this.logger=t.player&&t.player.logger}},{key:"updateLang",value:function(t){t||(t=this.lang)}},{key:"lang",get:function(){return this.player.lang}},{key:"i18n",get:function(){return this.player.i18n}},{key:"i18nKeys",get:function(){return this.player.i18nKeys}},{key:"domEventType",get:function(){var t=eE.checkTouchSupport()?"touch":"mouse";return!this.playerConfig||"touch"!==this.playerConfig.domEventType&&"mouse"!==this.playerConfig.domEventType||(t=this.playerConfig.domEventType),t}},{key:"on",value:function(t,e){var n=this;t&&e&&this.player?"string"==typeof t?(this.__events[t]=e,this.player.on(t,e)):lb(t)&&cp(t).call(t,(function(t){n.__events[t]=e,n.player.on(t,e)})):kE(this.pluginName,"plugin.on(event, callback)")}},{key:"once",value:function(t,e){var n=this;t&&e&&this.player?"string"==typeof t?(this.__onceEvents[t]=e,this.player.once(t,e)):lb(t)&&cp(t).call(t,(function(r){n.__onceEvents[r]=e,n.player.once(t,e)})):kE(this.pluginName,"plugin.once(event, callback)")}},{key:"off",value:function(t,e){var n=this;t&&e&&this.player?"string"==typeof t?(delete this.__events[t],this.player.off(t,e)):lb(t)&&cp(t).call(t,(function(r){delete n.__events[t],n.player.off(r,e)})):kE(this.pluginName,"plugin.off(event, callback)")}},{key:"offAll",value:function(){var t,e=this;cp(t=["__events","__onceEvents"]).call(t,(function(t){var n;cp(n=qh(e[t])).call(n,(function(n){e[t][n]&&e.off(n,e[t][n]),n&&delete e[t][n]}))})),this.__events={},this.__onceEvents={}}},{key:"emit",value:function(t){var e,n;if(this.player){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];(n=this.player).emit.apply(n,lh(e=[t]).call(e,i))}}},{key:"emitUserAction",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.player){var r=Mk(Mk({},n),{},{pluginName:this.pluginName});this.player.emitUserAction(t,e,r)}}},{key:"hook",value:function(t,e){var n;return yE.call.apply(yE,lh(n=[this]).call(n,nb(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(t,e){for(var n,r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return bE.call.apply(bE,lh(n=[this]).call(n,nb(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(t,e){for(var n,r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return wE.call.apply(wE,lh(n=[this]).call(n,nb(Array.prototype).call(arguments)))}},{key:"registerPlugin",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(this.player)return n&&(e.pluginName=n),this.player.registerPlugin({plugin:t,options:e})}},{key:"getPlugin",value:function(t){return this.player?this.player.getPlugin(t):null}},{key:"__destroy",value:function(){var t,e=this,n=this.player,r=this.pluginName;this.offAll(),eE.clearAllTimers(this),eE.checkIsFunction(this.destroy)&&this.destroy(),hk(t=["player","playerConfig","pluginName","logger","__args","__hooks"]).call(t,(function(t){e[t]=null})),n.unRegisterPlugin(r),this.__hooks=null}}],[{key:"defineGetterOrSetter",value:function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&Mp(t,n,e[n])}},{key:"defineMethod",value:function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&"function"==typeof e[n]&&Mp(t,n,{configurable:!0,value:e[n]})}},{key:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),t}();if("undefined"!=typeof Element&&!Element.prototype.matches){var AE=Element.prototype;AE.matches=AE.matchesSelector||AE.mozMatchesSelector||AE.msMatchesSelector||AE.oMatchesSelector||AE.webkitMatchesSelector}var EE=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}};function TE(t,e,n,r,i){var o=CE.apply(this,arguments);return t.addEventListener(n,o,i),{destroy:function(){t.removeEventListener(n,o,i)}}}function CE(t,e,n,r){return function(n){n.delegateTarget=EE(n.target,e),n.delegateTarget&&r.call(t,n)}}var SE=function(t,e,n,r,i){return"function"==typeof t.addEventListener?TE.apply(null,arguments):"function"==typeof n?ib(TE).call(TE,null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),hk(Array.prototype).call(t,(function(t){return TE(t,e,n,r,i)})))},xE=n(SE),ME={CONTROLS:"controls",ROOT:"root"},LE={ROOT:"root",ROOT_LEFT:"rootLeft",ROOT_RIGHT:"rootRight",ROOT_TOP:"rootTop",CONTROLS_LEFT:"controlsLeft",CONTROLS_RIGTH:"controlsRight",CONTROLS_RIGHT:"controlsRight",CONTROLS_CENTER:"controlsCenter",CONTROLS:"controls"},OE="xg-icon-disable";function IE(t){return!!t&&(rw(t)&&/^(?:http|data:|\/)/.test(t))}function PE(t,e){var n,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",s=null;if(t instanceof window.Element)return eE.addClass(t,i),hk(r=qh(o)).call(r,(function(e){t.setAttribute(e,o[e])})),t;if(IE(t)||IE(t.url))return o.src=IE(t)?t:t.url||"",s=eE.createDom(t.tag||"img","",o,"xg-img ".concat(i));if("function"==typeof t)try{var u,l;return(s=t())instanceof window.Element?(eE.addClass(s,i),hk(u=qh(o)).call(u,(function(t){s.setAttribute(t,o[t])})),s):(ZA.logWarn(lh(l="warn>>icons.".concat(e," in config of plugin named [")).call(l,a,"] is a function mast return an Element Object")),null)}catch(c){return ZA.logError("Plugin named [".concat(a,"]:createIcon"),c),null}return"string"==typeof t?eE.createDomFromHtml(t,o,i):(ZA.logWarn(lh(n="warn>>icons.".concat(e," in config of plugin named [")).call(n,a,"] is invalid")),null)}function RE(t,e){var n,r=e.config.icons||e.playerConfig.icons;hk(n=qh(t)).call(n,(function(n){var i=t[n],o=i&&i.class?i.class:"",a=i&&i.attr?i.attr:{},s=null;r&&r[n]&&(o=function(t,e){var n;return"object"===Lk(t)&&t.class&&"string"==typeof t.class?lh(n="".concat(e," ")).call(n,t.class):e}(r[n],o),a=function(t,e){var n;return"object"===Lk(t)&&t.attr&&"object"===Lk(t.attr)&&hk(n=qh(t.attr)).call(n,(function(n){e[n]=t.attr[n]})),e}(r[n],a),s=PE(r[n],n,o,a,e.pluginName)),!s&&i&&(s=PE(i.icon?i.icon:i,a,o,{},e.pluginName)),e.icons[n]=s}))}var BE=function(t){Bk(n,t);var e=Fk(n);function n(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Ok(this,n),(t=e.call(this,r)).__delegates=[],t}return Pk(n,[{key:"__init",value:function(t){if(Nk(Uk(n.prototype),"__init",this).call(this,t),t.root){var e=t.root,r=null;this.icons={},this.root=null,this.parent=null,RE(this.registerIcons()||{},this),this.langText={};var i,o,a,s=this.registerLanguageTexts()||{};o=this,hk(a=qh(i=s)).call(a,(function(t){Mp(o.langText,t,{get:function(){var e=o.lang,n=o.i18n;return n[t]?n[t]:i[t]&&i[t][e]||""}})}));var u="";try{u=this.render()}catch(h){var l;throw ZA.logError("Plugin:".concat(this.pluginName,":render"),h),new Error(lh(l="Plugin:".concat(this.pluginName,":render:")).call(l,h.message))}if(u)(r=n.insert(u,e,t.index)).setAttribute("data-index",t.index);else{if(!t.tag)return;(r=eE.createDom(t.tag,"",t.attr,t.name)).setAttribute("data-index",t.index),e.appendChild(r)}this.root=r,this.parent=e;var c=this.config.attr||{},f=this.config.style||{};this.setAttr(c),this.setStyle(f),this.config.index&&this.root.setAttribute("data-index",this.config.index),this.__registerChildren()}}},{key:"__registerChildren",value:function(){var t=this;if(this.root){this._children=[];var e,n=this.children();if(n&&"object"===Lk(n))if(qh(n).length>0)hk(e=qh(n)).call(e,(function(e){var r,i,o=e,a=n[o],s={root:t.root};"function"==typeof a?(r=t.config[o]||{},i=a):"object"===Lk(a)&&"function"==typeof a.plugin&&(r=a.options?eE.deepCopy(t.config[o]||{},a.options):t.config[o]||{},i=a.plugin),s.config=r,void 0!==r.index&&(s.index=r.index),r.root&&(s.root=r.root),t.registerPlugin(i,s,o)}))}}},{key:"updateLang",value:function(t){t||(t=this.lang);var e=this.root,n=this.i18n,r=this.langText;e&&function t(e,n){for(var r=0;r<e.children.length;r++)e.children[r].children.length>0?t(e.children[r],n):n(e.children[r])}(e,(function(e){var i=e.getAttribute&&e.getAttribute("lang-key");if(i){var o=n[i.toUpperCase()]||r[i];o&&(e.innerHTML="function"==typeof o?o(t):o)}}))}},{key:"lang",get:function(){return this.player.lang}},{key:"changeLangTextKey",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.i18n||{},r=this.langText;t.setAttribute&&t.setAttribute("lang-key",e);var i=n[e]||r[e]||"";i&&(t.innerHTML=i)}},{key:"plugins",value:function(){return this._children}},{key:"disable",value:function(){this.config.disable=!0,eE.addClass(hw(this).call(this,".xgplayer-icon"),OE)}},{key:"enable",value:function(){this.config.disable=!1,eE.removeClass(hw(this).call(this,".xgplayer-icon"),OE)}},{key:"children",value:function(){return{}}},{key:"registerPlugin",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e.root=e.root||this.root;var i=Nk(Uk(n.prototype),"registerPlugin",this).call(this,t,e,r);return this._children.push(i),i}},{key:"registerIcons",value:function(){return{}}},{key:"registerLanguageTexts",value:function(){return{}}},{key:"find",value:function(t){if(this.root)return this.root.querySelector(t)}},{key:"bind",value:function(t,e,r){var i=this;if(arguments.length<3&&"function"==typeof e)lb(t)?cp(t).call(t,(function(t){i.bindEL(t,e)})):this.bindEL(t,e);else{var o,a=n.delegate.call(this,this.root,t,e,r);this.__delegates=lh(o=this.__delegates).call(o,a)}}},{key:"unbind",value:function(t,e){var n=this;if(arguments.length<3&&"function"==typeof e)lb(t)?cp(t).call(t,(function(t){n.unbindEL(t,e)})):this.unbindEL(t,e);else for(var r,i=lh(r="".concat(t,"_")).call(r,e),o=0;o<this.__delegates.length;o++)if(this.__delegates[o].key===i){var a;this.__delegates[o].destroy(),jw(a=this.__delegates).call(a,o,1);break}}},{key:"setStyle",value:function(t,e){var n,r=this;if(this.root)return"String"===eE.typeOf(t)?this.root.style[t]=e:void("Object"===eE.typeOf(t)&&hk(n=qh(t)).call(n,(function(e){r.root.style[e]=t[e]})))}},{key:"setAttr",value:function(t,e){var n,r=this;if(this.root)return"String"===eE.typeOf(t)?this.root.setAttribute(t,e):void("Object"===eE.typeOf(t)&&hk(n=qh(t)).call(n,(function(e){r.root.setAttribute(e,t[e])})))}},{key:"setHtml",value:function(t,e){this.root&&(this.root.innerHTML=t,"function"==typeof e&&e())}},{key:"bindEL",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.root&&"on".concat(t)in this.root&&"function"==typeof e&&this.root.addEventListener(t,e,n)}},{key:"unbindEL",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.root&&"on".concat(t)in this.root&&"function"==typeof e&&this.root.removeEventListener(t,e,n)}},{key:"show",value:function(t){if(this.root)return this.root.style.display=void 0!==t?t:"block","none"===window.getComputedStyle(this.root,null).getPropertyValue("display")?this.root.style.display="block":void 0}},{key:"hide",value:function(){this.root&&(this.root.style.display="none")}},{key:"appendChild",value:function(t,e){if(!this.root)return null;if(arguments.length<2&&arguments[0]instanceof window.Element)return this.root.appendChild(arguments[0]);if(!(e&&e instanceof window.Element))return null;try{return"string"==typeof t?hw(this).call(this,t).appendChild(e):t.appendChild(e)}catch(n){return ZA.logError("Plugin:appendChild",n),null}}},{key:"render",value:function(){return""}},{key:"destroy",value:function(){}},{key:"__destroy",value:function(){var t,e,r,i=this,o=this.player;(hk(t=this.__delegates).call(t,(function(t){t.destroy()})),this.__delegates=[],this._children instanceof Array)&&(hk(r=this._children).call(r,(function(t){o.unRegisterPlugin(t.pluginName)})),this._children=null);this.root&&(this.root.hasOwnProperty("remove")?this.root.remove():this.root.parentNode&&this.root.parentNode.removeChild(this.root)),Nk(Uk(n.prototype),"__destroy",this).call(this),this.icons={},hk(e=["root","parent"]).call(e,(function(t){i[t]=null}))}}],[{key:"insert",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=e.children.length,i=Number(n),o=t instanceof window.Node;if(r){for(var a=0,s=null,u="";a<r;a++){s=e.children[a];var l=Number(s.getAttribute("data-index"));if(l>=i){u="beforebegin";break}l<i&&(u="afterend")}return o?"afterend"===u?e.appendChild(t):e.insertBefore(t,s):s.insertAdjacentHTML(u,t),"afterend"===u?e.children[e.children.length-1]:e.children[a]}return o?e.appendChild(t):e.insertAdjacentHTML("beforeend",t),e.children[e.children.length-1]}},{key:"defaultConfig",get:function(){return{}}},{key:"delegate",value:function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=[];if(t instanceof window.Node&&"function"==typeof r)if(lb(n))cp(n).call(n,(function(n){var a,s=xE(t,e,n,r,i);s.key=lh(a="".concat(e,"_")).call(a,n),o.push(s)}));else{var a,s=xE(t,e,n,r,i);s.key=lh(a="".concat(e,"_")).call(a,n),o.push(s)}return o}},{key:"ROOT_TYPES",get:function(){return ME}},{key:"POSITIONS",get:function(){return LE}}]),n}(_E),UE="xgplayer-is-enter",DE="xgplayer-pause",jE="xgplayer-playing",FE="xgplayer-ended",NE="xgplayer-isloading",HE="xgplayer-is-error",zE="xgplayer-replay",VE="xgplayer-nostart",qE="not-allow-autoplay",GE=6;function YE(){return(new DOMParser).parseFromString('<svg class="play" xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="3 -4 28 40">\n <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M576,363L810,512L576,661zM342,214L576,363L576,661L342,810z"></path>\n</svg>\n',"image/svg+xml").firstChild}function WE(){return(new DOMParser).parseFromString('<svg class="pause" xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="3 -4 28 40">\n <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M598,214h170v596h-170v-596zM256 810v-596h170v596h-170z"></path>\n</svg>\n',"image/svg+xml").firstChild}function KE(t,e,n){try{var r,i;return lh(r=lh(i=' <div class="xg-tips '.concat(n?"hide":" ",'" lang-key="')).call(i,t.i18nKeys[e],'">\n ')).call(r,t.i18n[e],"\n </div>")}catch(o){return'<div class="xg-tips hide"></div>'}}var XE=Ln,$E=ua.findIndex,JE="findIndex",QE=!0;JE in[]&&Array(1)[JE]((function(){QE=!1})),XE({target:"Array",proto:!0,forced:QE},{findIndex:function(t){return $E(this,t,arguments.length>1?arguments[1]:void 0)}});var ZE=af("Array").findIndex,tT=ut,eT=ZE,nT=Array.prototype,rT=n((function(t){var e=t.findIndex;return t===nT||tT(nT,t)&&e===nT.findIndex?eT:e})),iT=[{tag:"xg-cache",className:"xgplayer-progress-cache",styleKey:"cachedColor"},{tag:"xg-played",className:"xgplayer-progress-played",styleKey:"playedColor"}],oT=function(){function t(e){Ok(this,t),this.fragments=e.fragments||[],0===this.fragments.length&&this.fragments.push({percent:1}),this._callBack=e.actionCallback,this.fragConfig={fragFocusClass:e.fragFocusClass||"inner-focus-point",fragAutoFocus:!!e.fragAutoFocus,fragClass:e.fragClass||""},this.style=e.style||{playedColor:"",cachedColor:"",progressColor:""},this.duration=0,this.cachedIndex=0,this.playedIndex=0,this.focusIndex=-1}return Pk(t,[{key:"updateDuration",value:function(t){var e=this;this.duration=t;var n=0,r=this.fragments;this.fragments=hk(r).call(r,(function(t){return t.start=ak(n,10),t.end=ak(n+t.percent*e.duration,10),t.duration=ak(t.percent*e.duration,10),n+=t.percent*e.duration,t}))}},{key:"updateProgress",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"played",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{newIndex:0,curIndex:0,millisecond:0},n=this.progressList,r=this.fragments;if(!(n.length<1)){var i=e.newIndex,o=e.curIndex,a=e.millisecond;i!==o&&hk(n).call(n,(function(e,n){n<i?e[t].style.width="100%":n>i&&(e[t].style.width=0)}));var s=r[i],u=0===a?0:(a-s.start)/s.duration;n[i][t].style.width=u<0?0:"".concat(100*u,"%")}}},{key:"updateFocus",value:function(t){if(this.fragConfig.fragAutoFocus&&!(this.fragments.length<2))if(t){var e=rT(this).call(this,1e3*t.currentTime,this.focusIndex);if(e>=0&&e!==this.focusIndex){this.focusIndex>-1&&this.unHightLight(this.focusIndex),this.setHightLight(e);var n={index:e,preIndex:this.focusIndex,fragment:this.fragments[this.focusIndex]};this.focusIndex=e,this._callBack&&this._callBack(n)}}else if(this.focusIndex>-1){this.unHightLight(this.focusIndex);var r={index:-1,preIndex:this.focusIndex,fragment:null};this._callBack&&this._callBack(r),this.focusIndex=-1}}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{cached:0,played:0},e=arguments.length>1?arguments[1]:void 0;if(!this.duration||ak(1e3*e,10)!==this.duration){if(!e&&0!==e)return;this.updateDuration(ak(1e3*e,10))}var n=this.playedIndex,r=this.cachedIndex;if("Undefined"!==eE.typeOf(t.played)){var i=rT(this).call(this,1e3*t.played,n);if(i<0)return;this.updateProgress("played",{newIndex:i,curIndex:n,millisecond:ak(1e3*t.played,10)}),this.playedIndex=i}if("Undefined"!==eE.typeOf(t.cached)){var o=rT(this).call(this,1e3*t.cached,r);if(o<0)return;this.updateProgress("cached",{newIndex:o,curIndex:r,millisecond:ak(1e3*t.cached,10)}),this.cachedIndex=o}}},{key:"findIndex",value:function(t,e){var n=this.fragments;if(!n||0===n.length)return-1;if(1===n.length)return 0;if(e>-1&&e<n.length&&t>n[e].start&&t<n[e].end)return e;if(t>n[n.length-1].start)return n.length-1;for(var r=0;r<n.length;r++)if(t>n[r].start&&t<=n[r].end){e=r;break}return e}},{key:"findHightLight",value:function(){for(var t=this.root.children,e=0;e<t.length;e++)if(eE.hasClass(t[e],this.fragConfig.fragFocusClass))return{dom:t[e],pos:t[e].getBoundingClientRect()}}},{key:"findFragment",value:function(t){var e=this.root.children;return t<0||t>=e.length?null:{dom:e[t],pos:e[t].getBoundingClientRect()}}},{key:"unHightLight",value:function(){for(var t=this.root.children,e=0;e<t.length;e++)eE.removeClass(t[e],this.fragConfig.fragFocusClass)}},{key:"setHightLight",value:function(t){var e=this.root.children;if(t<e.length)return eE.addClass(e[t],this.fragConfig.fragFocusClass),{dom:e[t],pos:e[t].getBoundingClientRect()}}},{key:"destroy",value:function(){this.progressList=null,this.fragments=null,this.root.innerHTML=""}},{key:"reset",value:function(t){var e,n=this;if(cp(e=qh(this.fragConfig)).call(e,(function(e){void 0!==t[e]&&(n.fragConfig[e]=t[e])})),t.fragments){if(this.fragments=0===t.fragments.length?[{percent:1}]:t.fragments,this.updateDuration(this.duration),this.playedIndex=0,this.cachedIndex=0,this.root)for(var r=this.root.children;r.length>0;)this.root.removeChild(r[0]);this.render()}}},{key:"render",value:function(){var t=this,e=this.style.progressColor;if(this.root||(this.root=eE.createDom("xg-inners","",{},"progress-list")),this.fragments){var n,r=this.fragConfig,i=r.fragClass,o=r.fragFocusClass;this.progressList=hk(n=this.fragments).call(n,(function(n){var r,a,s=eE.createDom("xg-inner","",{style:e?lh(r="background:".concat(e,"; flex: ")).call(r,n.percent):"flex: ".concat(n.percent)},lh(a="".concat(n.isFocus?o:""," xgplayer-progress-inner ")).call(a,i));return t.root.appendChild(s),cp(iT).call(iT,(function(e){s.appendChild(eE.createDom(e.tag,"",{style:e.styleKey?"background: ".concat(t.style[e.styleKey],"; width:0;"):"width:0;"},e.className))})),{cached:s.children[0],played:s.children[1]}}))}return this.root}}]),t}(),aT={POINT:"inner-focus-point",HIGHLIGHT:"inner-focus-highlight"},sT=function(t){Bk(n,t);var e=Fk(n);function n(t){var r;return Ok(this,n),Rk(jk(r=e.call(this,t)),"onMoveOnly",(function(t,e){var n=jk(r),i=n.pos,o=n.config,a=n.player,s=e;if(t){eE.event(t);var u=eE.getEventPos(t,a.zoom),l=90===a.rotateDeg?u.clientY:u.clientX;if(i.moving&&Math.abs(i.x-l)<o.miniMoveStep)return;i.moving=!0,i.x=l,s=r.computeTime(t,l)}r.triggerCallbacks("dragmove",s,t),r._updateInnerFocus(s)})),Rk(jk(r),"onBodyClick",(function(t){r.pos.isLocked&&(r.pos.isLocked=!1,t.preventDefault(),t.stopPropagation())})),Rk(jk(r),"_mouseDownHandler",(function(t,e){r._state.time=e.currentTime,r.updateWidth(e.currentTime,e.seekTime,e.percent,0),r._updateInnerFocus(e)})),Rk(jk(r),"_mouseUpHandler",(function(t,e){jk(r).pos.moving&&r.updateWidth(e.currentTime,e.seekTime,e.percent,2)})),Rk(jk(r),"_mouseMoveHandler",(function(t,e){var n=jk(r),i=n._state,o=n.pos,a=n.config,s=n.player;i.time<e.currentTime?e.forward=!0:e.forward=!1,i.time=e.currentTime,o.isDown&&!o.moving&&(o.moving=!0,a.isPauseMoving&&s.pause(),r.triggerCallbacks("dragstart",e,t),r.emitUserAction("drag","dragstart",e)),r.updateWidth(e.currentTime,e.seekTime,e.percent,1),r.triggerCallbacks("dragmove",e,t),r._updateInnerFocus(e)})),Rk(jk(r),"onMouseDown",(function(t){var e=jk(r),n=e._state,i=e.player,o=e.pos,a=e.config,s=e.playerConfig,u=eE.getEventPos(t,i.zoom),l=90===i.rotateDeg?u.clientY:u.clientX;if(!(i.isMini||a.closeMoveSeek||!s.allowSeekAfterEnded&&i.ended)){if(i.duration||i.isPlaying){t.stopPropagation(),r.focus(),eE.checkIsFunction(s.disableSwipeHandler)&&s.disableSwipeHandler(),eE.checkIsFunction(a.onMoveStart)&&a.onMoveStart(),eE.event(t),o.x=l,o.isDown=!0,o.moving=!1,n.prePlayTime=i.currentTime,i.focus({autoHide:!1}),r.isProgressMoving=!0,eE.addClass(r.progressBtn,"active");var c=r.computeTime(t,l);return c.prePlayTime=n.prePlayTime,r._mouseDownHandlerHook(t,c),"touchstart"===t.type?(r.root.addEventListener("touchmove",r.onMouseMove),r.root.addEventListener("touchend",r.onMouseUp),r.root.addEventListener("touchcancel",r.onMouseUp)):(r.unbind("mousemove",r.onMoveOnly),document.addEventListener("mousemove",r.onMouseMove,!1),document.addEventListener("mouseup",r.onMouseUp,!1)),!0}i.play()}})),Rk(jk(r),"onMouseUp",(function(t){var e=jk(r),n=e.player,i=e.config,o=e.pos,a=e.playerConfig,s=e._state;t.stopPropagation(),t.preventDefault(),eE.checkIsFunction(a.enableSwipeHandler)&&a.enableSwipeHandler(),eE.checkIsFunction(i.onMoveEnd)&&i.onMoveEnd(),eE.event(t),eE.removeClass(r.progressBtn,"active");var u=r.computeTime(t,o.x);u.prePlayTime=s.prePlayTime,o.moving?(r.triggerCallbacks("dragend",u,t),r.emitUserAction("drag","dragend",u)):(r.triggerCallbacks("click",u,t),r.emitUserAction("click","click",u)),r._mouseUpHandlerHook(t,u),o.moving=!1,o.isDown=!1,o.x=0,o.y=0,o.isLocked=!0,s.prePlayTime=0,s.time=0;var l=t.type;"touchend"===l||"touchcancel"===l?(r.root.removeEventListener("touchmove",r.onMouseMove),r.root.removeEventListener("touchend",r.onMouseUp),r.root.removeEventListener("touchcancel",r.onMouseUp),r.blur()):(document.removeEventListener("mousemove",r.onMouseMove,!1),document.removeEventListener("mouseup",r.onMouseUp,!1),o.isEnter?"mobile"!==a.isMobileSimulateMode&&ib(r).call(r,"mousemove",r.onMoveOnly):r.onMouseLeave(t)),eE.setTimeout(jk(r),(function(){r.resetSeekState()}),1),n.focus()})),Rk(jk(r),"onMouseMove",(function(t){var e=jk(r),n=e._state,i=e.pos,o=e.player,a=e.config;eE.checkTouchSupport()&&t.preventDefault(),eE.event(t);var s=eE.getEventPos(t,o.zoom),u=90===o.rotateDeg?s.clientY:s.clientX,l=Math.abs(i.x-u);if(!(i.moving&&l<a.miniMoveStep||!i.moving&&l<a.miniStartStep)){i.x=u;var c=r.computeTime(t,u);c.prePlayTime=n.prePlayTime,r._mouseMoveHandlerHook(t,c)}})),Rk(jk(r),"onMouseOut",(function(t){r.triggerCallbacks("mouseout",null,t)})),Rk(jk(r),"onMouseOver",(function(t){r.triggerCallbacks("mouseover",null,t)})),Rk(jk(r),"onMouseEnter",(function(t){var e=jk(r),n=e.player,i=e.pos;if(!(i.isDown||i.isEnter||n.isMini||!n.config.allowSeekAfterEnded&&n.ended)){i.isEnter=!0,ib(r).call(r,"mousemove",r.onMoveOnly),ib(r).call(r,"mouseleave",r.onMouseLeave),eE.event(t);var o=eE.getEventPos(t,n.zoom),a=90===n.rotateDeg?o.clientY:o.clientX,s=r.computeTime(t,a);r.triggerCallbacks("mouseenter",s,t),r.focus()}})),Rk(jk(r),"onMouseLeave",(function(t){r.triggerCallbacks("mouseleave",null,t),r.unlock(),r._updateInnerFocus(null)})),Rk(jk(r),"onVideoResize",(function(){var t=r.pos,e=t.x,n=t.isDown;if(t.isEnter&&!n){var i=r.computeTime(null,e);r.onMoveOnly(null,i)}})),r.useable=!1,r.isProgressMoving=!1,r.__dragCallBacks=[],r._state={now:-1,direc:0,time:0,prePlayTime:-1},r._disableBlur=!1,"boolean"==typeof r.config.isDragingSeek&&(console.warn("[XGPLAYER] 'isDragingSeek' is deprecated, please use 'isDraggingSeek' instead"),r.config.isDraggingSeek=r.config.isDragingSeek),r}return Pk(n,[{key:"offsetDuration",get:function(){return this.playerConfig.customDuration||this.player.offsetDuration||this.player.duration}},{key:"duration",get:function(){return this.playerConfig.customDuration||this.player.duration}},{key:"timeOffset",get:function(){return this.playerConfig.timeOffset||0}},{key:"currentTime",get:function(){var t=this.player,e=t.offsetCurrentTime,n=t.currentTime;return e>=0?e:n+this.timeOffset}},{key:"changeState",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.useable=t}},{key:"show",value:function(t){this.root&&(this.root.style.display="flex")}},{key:"_initInner",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e&&0!==e.length||(e=[{percent:1}]);var r,i=Mk(Mk({fragments:e},n),{},{actionCallback:function(e){t.emitUserAction("fragment_focus","fragment_focus",e)}});this.innerList?this.innerList.reset(i):(this.innerList=new oT(i),this.outer.insertBefore(this.innerList.render(),this.outer.children[0]),hk(r=["findHightLight","unHightLight","setHightLight","findFragment"]).call(r,(function(e){var n;t[e]=ib(n=t.innerList[e]).call(n,t.innerList)})))}},{key:"_updateInnerFocus",value:function(t){this.innerList&&this.innerList.updateFocus(t)}},{key:"afterCreate",value:function(){if(!this.config.disable&&!this.playerConfig.isLive){this.pos={x:0,y:0,moving:!1,isDown:!1,isEnter:!1,isLocked:!1},this.outer=hw(this).call(this,"xg-outer");var t=this.config,e=t.fragFocusClass,n=t.fragAutoFocus,r=t.fragClass;this._initInner(this.config.fragments,{fragFocusClass:e,fragAutoFocus:n,fragClass:r,style:this.playerConfig.commonStyle||{}}),"mobile"===oE.device&&(this.config.isDraggingSeek=!1,this.isMobile=!0),this.progressBtn=hw(this).call(this,".xgplayer-progress-btn"),this.listenEvents(),this.bindDomEvents(),this.initCustomStyle()}}},{key:"listenEvents",value:function(){var t=this;this.on(fE,(function(){t.onMouseLeave()})),this.on(cE,(function(){t.onTimeupdate()})),this.on(lE,(function(){t.onTimeupdate(),t.onCacheUpdate()})),this.on("progress",(function(){t.onCacheUpdate()})),this.on(sE,(function(){t.onCacheUpdate(!0),t.onTimeupdate(!0),t._state.now=0})),this.on(pE,(function(){t.onReset()})),this.on(vE,(function(){t.onVideoResize()}))}},{key:"setConfig",value:function(t){var e,n=this,r=null;cp(e=qh(t)).call(e,(function(e){n.config[e]=t[e],"fragments"===e&&(r=t[e])})),r&&this._initInner(r,t)}},{key:"initCustomStyle",value:function(){var t=(this.playerConfig||{}).commonStyle.sliderBtnStyle,e=this.progressBtn;if(t)if("string"==typeof t)e.style.boxShadow=t;else if("object"===Lk(t)){var n;hk(n=qh(t)).call(n,(function(n){e.style[n]=t[n]}))}}},{key:"triggerCallbacks",value:function(t,e,n){var r;this.__dragCallBacks.length>0&&hk(r=this.__dragCallBacks).call(r,(function(r){if(r&&r.handler&&r.type===t)try{r.handler(e,n)}catch(aR){console.error("[XGPLAYER][triggerCallbacks] ".concat(r," error"),aR)}}))}},{key:"addCallBack",value:function(t,e){e&&"function"==typeof e&&this.__dragCallBacks.push({type:t,handler:e})}},{key:"removeCallBack",value:function(t,e){var n=this.__dragCallBacks,r=-1;hk(n).call(n,(function(n,i){n&&n.type===t&&n.handler===e&&(r=i)})),r>-1&&jw(n).call(n,r,1)}},{key:"unlock",value:function(){var t=this.player,e=this.pos;e.isEnter=!1,e.isLocked=!1,t.isMini||(this.unbind("mousemove",this.onMoveOnly),e.isDown?this.unbind("mouseleave",this.onMouseLeave):this.blur())}},{key:"bindDomEvents",value:function(){var t=this.player.config;(this._mouseDownHandlerHook=this.hook("dragstart",this._mouseDownHandler),this._mouseUpHandlerHook=this.hook("dragend",this._mouseUpHandler),this._mouseMoveHandlerHook=this.hook("drag",this._mouseMoveHandler),"touch"!==this.domEventType&&"compatible"!==this.domEventType||this.root.addEventListener("touchstart",this.onMouseDown),"mouse"===this.domEventType||"compatible"===this.domEventType)&&(ib(this).call(this,"mousedown",this.onMouseDown),"mobile"!==t.isMobileSimulateMode&&ib(this).call(this,"mouseenter",this.onMouseEnter),ib(this).call(this,"mouseover",this.onMouseOver),ib(this).call(this,"mouseout",this.onMouseOut),this.player.root.addEventListener("click",this.onBodyClick,!0))}},{key:"focus",value:function(){this.player.controls.pauseAutoHide(),eE.addClass(this.root,"active")}},{key:"blur",value:function(){this._disableBlur||(this.player.controls.recoverAutoHide(),eE.removeClass(this.root,"active"))}},{key:"disableBlur",value:function(){this._disableBlur=!0}},{key:"enableBlur",value:function(){this._disableBlur=!1}},{key:"updateWidth",value:function(t,e,n,r){var i=this.config,o=this.player;if(!i.isCloseClickSeek||0!==r){var a=e=e>=o.duration?o.duration-i.endedDiff:Number(e).toFixed(1);this.updatePercent(n),this.updateTime(t),(1!==r||i.isDraggingSeek&&"audio"!==o.config.mediaType)&&(this._state.now=a,this._state.direc=a>o.currentTime?0:1,o.seek(a))}}},{key:"computeTime",value:function(t,e){var n,r,i=this.player,o=this.root.getBoundingClientRect(),a=o.width,s=o.height,u=o.top,l=o.left,c=e;90===i.rotateDeg?(n=s,r=u):(n=a,r=l);var f=c-r,h=(f=f>n?n:f<0?0:f)/n,p=ak((h=h<0?0:h>1?1:h)*this.offsetDuration*1e3,10)/1e3;return{percent:h,currentTime:p,seekTime:eE.getCurrentTimeByOffset(p,i.timeSegments),offset:f,width:n,left:r,e:t}}},{key:"updateTime",value:function(t){var e=this.player,n=this.duration;t>n?t=n:t<0&&(t=0);var r=e.plugins.time;r&&r.updateTime(t)}},{key:"resetSeekState",value:function(){this.isProgressMoving=!1;var t=this.player.plugins.time;t&&t.resetActive()}},{key:"updatePercent",value:function(t,e){if(this.isProgressMoving=!0,!this.config.disable){t=t>1?1:t<0?0:t,this.progressBtn.style.left="".concat(100*t,"%"),this.innerList.update({played:t*this.offsetDuration},this.offsetDuration);var n=this.player.plugins.miniprogress;n&&n.update({played:t*this.offsetDuration},this.offsetDuration)}}},{key:"onTimeupdate",value:function(t){var e=this.player,n=this._state,r=this.offsetDuration;if(!(e.isSeeking&&e.media.seeking||this.isProgressMoving)&&e.hasStart){if(n.now>-1){var i=ak(1e3*n.now,10)-ak(1e3*e.currentTime,10);if(0===n.direc&&i>300||1===n.direc&&i>-300)return void(n.now=-1);n.now=-1}var o=this.currentTime;o=eE.adjustTimeByDuration(o,r,t),this.innerList.update({played:o},r),this.progressBtn.style.left="".concat(o/r*100,"%")}}},{key:"onCacheUpdate",value:function(t){var e=this.player,n=this.duration;if(e){var r=e.bufferedPoint.end;r=eE.adjustTimeByDuration(r,n,t),this.innerList.update({cached:r},n)}}},{key:"onReset",value:function(){this.innerList.update({played:0,cached:0},0),this.progressBtn.style.left="0%"}},{key:"destroy",value:function(){var t=this.player;this.thumbnailPlugin=null,this.innerList.destroy(),this.innerList=null;var e=this.domEventType;"touch"!==e&&"compatible"!==e||(this.root.removeEventListener("touchstart",this.onMouseDown),this.root.removeEventListener("touchmove",this.onMouseMove),this.root.removeEventListener("touchend",this.onMouseUp),this.root.removeEventListener("touchcancel",this.onMouseUp)),"mouse"!==e&&"compatible"!==e||(this.unbind("mousedown",this.onMouseDown),this.unbind("mouseenter",this.onMouseEnter),this.unbind("mousemove",this.onMoveOnly),this.unbind("mouseleave",this.onMouseLeave),document.removeEventListener("mousemove",this.onMouseMove,!1),document.removeEventListener("mouseup",this.onMouseUp,!1),t.root.removeEventListener("click",this.onBodyClick,!0))}},{key:"render",value:function(){if(!this.config.disable&&!this.playerConfig.isLive){var t=this.player.controls?this.player.controls.config.mode:"";return'\n <xg-progress class="xgplayer-progress '.concat("bottom"===t?"xgplayer-progress-bottom":"",'">\n <xg-outer class="xgplayer-progress-outer">\n <xg-progress-btn class="xgplayer-progress-btn"></xg-progress-btn>\n </xg-outer>\n </xg-progress>\n ')}}}],[{key:"pluginName",get:function(){return"progress"}},{key:"defaultConfig",get:function(){return{position:LE.CONTROLS_CENTER,index:0,disable:!1,isDraggingSeek:!0,closeMoveSeek:!1,isPauseMoving:!1,isCloseClickSeek:!1,fragments:[{percent:1}],fragFocusClass:aT.POINT,fragClass:"",fragAutoFocus:!1,miniMoveStep:5,miniStartStep:2,onMoveStart:function(){},onMoveEnd:function(){},endedDiff:.2}}},{key:"FRAGMENT_FOCUS_CLASS",get:function(){return aT}}]),n}(BE),uT=function(t){Bk(n,t);var e=Fk(n);function n(){var t,r;Ok(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Rk(jk(r=e.call.apply(e,lh(t=[this]).call(t,o))),"_onMouseenter",(function(t){r.emit("icon_mouseenter",{pluginName:r.pluginName})})),Rk(jk(r),"_onMouseLeave",(function(t){r.emit("icon_mouseleave",{pluginName:r.pluginName})})),r}return Pk(n,[{key:"afterCreate",value:function(){ib(this).call(this,"mouseenter",this._onMouseenter),ib(this).call(this,"mouseleave",this._onMouseLeave),this.config.disable&&this.disable()}},{key:"destroy",value:function(){this.unbind("mouseenter",this._onMouseenter),this.unbind("mouseleave",this._onMouseLeave)}}]),n}(BE),lT=function(t){Bk(n,t);var e=Fk(n);function n(){var t,r;Ok(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Rk(jk(r=e.call.apply(e,lh(t=[this]).call(t,o))),"btnClick",(function(t){t.preventDefault(),t.stopPropagation();var e=jk(r).player;return r.emitUserAction(t,"switch_play_pause",{prop:"paused",from:e.paused,to:!e.paused}),e.ended?e.replay():e.paused?(e.play(),r.animate(!1)):(e.pause(),r.animate(!0)),!1})),r}return Pk(n,[{key:"afterCreate",value:function(){Nk(Uk(n.prototype),"afterCreate",this).call(this),this.config.disable||(this.initIcons(),ib(this).call(this,["touchend","click"],this.btnClick),this.listenEvents(),this.animate(!0))}},{key:"listenEvents",value:function(){var t=this,e=this.player;this.on([aE,uE,"error",pE],(function(){t.animate(e.paused)}))}},{key:"registerIcons",value:function(){return{play:{icon:YE,class:"xg-icon-play"},pause:{icon:WE,class:"xg-icon-pause"}}}},{key:"initIcons",value:function(){var t=this.icons;this.appendChild(".xgplayer-icon",t.play),this.appendChild(".xgplayer-icon",t.pause)}},{key:"animate",value:function(t){if(this.player){var e=this.i18nKeys,n=hw(this).call(this,".xg-tips");t?(this.setAttr("data-state","pause"),n&&this.changeLangTextKey(n,e.PLAY_TIPS)):(this.setAttr("data-state","play"),n&&this.changeLangTextKey(n,e.PAUSE_TIPS))}}},{key:"destroy",value:function(){Nk(Uk(n.prototype),"destroy",this).call(this),this.unbind(["touchend","click"],this.btnClick)}},{key:"render",value:function(){if(!this.config.disable)return'<xg-icon class="xgplayer-play">\n <div class="xgplayer-icon">\n </div>\n '.concat(KE(this,"PLAY_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"play"}},{key:"defaultConfig",get:function(){return{position:LE.CONTROLS_LEFT,index:0,disable:!1}}}]),n}(uT);function cT(){return(new DOMParser).parseFromString('<svg width="32px" height="40px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <path d="M11.2374369,14 L17.6187184,7.61871843 C17.9604272,7.27700968 17.9604272,6.72299032 17.6187184,6.38128157 C17.2770097,6.03957281 16.7229903,6.03957281 16.3812816,6.38128157 L9.38128157,13.3812816 C9.03957281,13.7229903 9.03957281,14.2770097 9.38128157,14.6187184 L16.3812816,21.6187184 C16.7229903,21.9604272 17.2770097,21.9604272 17.6187184,21.6187184 C17.9604272,21.2770097 17.9604272,20.7229903 17.6187184,20.3812816 L11.2374369,14 L11.2374369,14 Z" fill="#FFFFFF"></path>\n </g>\n</svg>',"image/svg+xml").firstChild}var fT=function(t){Bk(n,t);var e=Fk(n);function n(){return Ok(this,n),e.apply(this,arguments)}return Pk(n,[{key:"afterCreate",value:function(){var t=this;this.initIcons(),this.onClick=function(e){e.preventDefault(),e.stopPropagation(),t.config.onClick(e)},ib(this).call(this,["click","touchend"],this.onClick)}},{key:"registerIcons",value:function(){return{screenBack:{icon:cT,class:"xg-fullscreen-back"}}}},{key:"initIcons",value:function(){var t=this.icons;this.appendChild(this.root,t.screenBack)}},{key:"show",value:function(){eE.addClass(this.root,"show")}},{key:"hide",value:function(){eE.removeClass(this.root,"show")}},{key:"render",value:function(){return'<xg-icon class="xgplayer-back">\n </xg-icon>'}}],[{key:"pluginName",get:function(){return"topbackicon"}},{key:"defaultConfig",get:function(){return{position:LE.ROOT_TOP,index:0}}}]),n}(BE);function hT(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="2 -4 28 40">\n <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M598 214h212v212h-84v-128h-128v-84zM726 726v-128h84v212h-212v-84h128zM214 426v-212h212v84h-128v128h-84zM298 598v128h128v84h-212v-212h84z"></path>\n</svg>\n',"image/svg+xml").firstChild}function pT(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="2 -4 28 40">\n <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M682 342h128v84h-212v-212h84v128zM598 810v-212h212v84h-128v128h-84zM342 342v-128h84v212h-212v-84h128zM214 682v-84h212v212h-84v-128h-128z"></path>\n</svg>\n',"image/svg+xml").firstChild}var dT=function(t){Bk(n,t);var e=Fk(n);function n(){var t,r;Ok(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Rk(jk(r=e.call.apply(e,lh(t=[this]).call(t,o))),"_onOrientationChange",(function(t){r.player.fullscreen&&r.config.rotateFullscreen&&(90===window.orientation||-90===window.orientation?r.player.setRotateDeg(0):r.player.setRotateDeg(90))})),r}return Pk(n,[{key:"afterCreate",value:function(){var t=this;Nk(Uk(n.prototype),"afterCreate",this).call(this);var e=this.config,r=this.playerConfig;if(!e.disable){e.target&&(this.playerConfig.fullscreenTarget=this.config.target);var i=eE.getFullScreenEl();r.fullscreenTarget===i&&this.player.getFullscreen().catch((function(t){})),this.initIcons(),this.handleFullscreen=this.hook("fullscreenChange",this.toggleFullScreen,{pre:function(e){var n=t.player.fullscreen;t.emitUserAction(e,"switch_fullscreen",{prop:"fullscreen",from:n,to:!n})}}),ib(this).call(this,".xgplayer-fullscreen",["touchend","click"],this.handleFullscreen),this.on("fullscreen_change",(function(e){var n=hw(t).call(t,".xg-tips");n&&t.changeLangTextKey(n,e?t.i18nKeys.EXITFULLSCREEN_TIPS:t.i18nKeys.FULLSCREEN_TIPS),t.animate(e)})),this.config.needBackIcon&&(this.topBackIcon=this.player.registerPlugin({plugin:fT,options:{config:{onClick:function(e){t.handleFullscreen(e)}}}})),"mobile"===oE.device&&window.addEventListener("orientationchange",this._onOrientationChange)}}},{key:"registerIcons",value:function(){return{fullscreen:{icon:hT,class:"xg-get-fullscreen"},exitFullscreen:{icon:pT,class:"xg-exit-fullscreen"}}}},{key:"destroy",value:function(){Nk(Uk(n.prototype),"destroy",this).call(this),this.unbind(".xgplayer-icon","mobile"===oE.device?"touchend":"click",this.handleFullscreen),"mobile"===oE.device&&window.removeEventListener("orientationchange",this._onOrientationChange)}},{key:"initIcons",value:function(){var t=this.icons;this.appendChild(".xgplayer-icon",t.fullscreen),this.appendChild(".xgplayer-icon",t.exitFullscreen)}},{key:"toggleFullScreen",value:function(t){t instanceof Event&&(t.preventDefault(),t.stopPropagation());var e=this.player,n=this.config;!0===n.useCssFullscreen||"function"==typeof n.useCssFullscreen&&n.useCssFullscreen()?(e.fullscreen?e.exitCssFullscreen():e.getCssFullscreen(),this.animate(e.fullscreen)):n.rotateFullscreen?(e.fullscreen?e.exitRotateFullscreen():e.getRotateFullscreen(),this.animate(e.fullscreen)):n.switchCallback&&"function"==typeof n.switchCallback?n.switchCallback(e.fullscreen):e.fullscreen?(e.exitFullscreen(),n.useScreenOrientation&&this.unlockScreen()):(e.getFullscreen().catch((function(t){})),n.useScreenOrientation&&e.aspectRatio>1&&this.lockScreen(n.lockOrientationType))}},{key:"animate",value:function(t){t?this.setAttr("data-state","full"):this.setAttr("data-state","normal"),this.topBackIcon&&(t?(this.topBackIcon.show(),this.hide()):(this.topBackIcon.hide(),this.show()))}},{key:"render",value:function(){if(!this.config.disable){return'<xg-icon class="xgplayer-fullscreen">\n <div class="xgplayer-icon">\n </div>\n '.concat(KE(this,"FULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}},{key:"lockScreen",value:function(t){try{screen.orientation.lock(t).catch((function(t){}))}catch(e){}}},{key:"unlockScreen",value:function(){try{screen.orientation.unlock().catch((function(t){}))}catch(t){}}}],[{key:"pluginName",get:function(){return"fullscreen"}},{key:"defaultConfig",get:function(){return{position:LE.CONTROLS_RIGHT,index:0,useCssFullscreen:!1,rotateFullscreen:!1,useScreenOrientation:!1,lockOrientationType:"landscape",switchCallback:null,target:null,disable:!1,needBackIcon:!1}}}]),n}(uT),vT=function(t){Bk(n,t);var e=Fk(n);function n(t){var r;return Ok(this,n),(r=e.call(this,t)).isActiving=!1,r}return Pk(n,[{key:"duration",get:function(){var t=this.player,e=t.offsetDuration,n=t.duration;return this.playerConfig.customDuration||e||n}},{key:"currentTime",get:function(){var t=this.player,e=t.offsetCurrentTime,n=t.currentTime;return e>=0?e:n}},{key:"timeOffset",get:function(){return this.playerConfig.timeOffset||0}},{key:"afterCreate",value:function(){var t=this.player.controls.config.mode;this.mode="flex"===t?"flex":"normal",this.config.disable||("flex"===this.mode&&(this.createCenterTime(),this.root.style.display="none"),this.durationDom=hw(this).call(this,".time-duration"),this.timeDom=hw(this).call(this,".time-current"),this.listenEvents())}},{key:"listenEvents",value:function(){var t=this;this.on([fE,lE,cE],(function(e){"durationchange"===e.eventName&&(t.isActiving=!1),t.onTimeUpdate()})),this.on(sE,(function(){t.onTimeUpdate(!0)})),this.on(pE,(function(){t.onReset()}))}},{key:"show",value:function(t){if("flex"===this.mode)return this.centerCurDom&&(this.centerCurDom.style.display="block"),void(this.centerDurDom&&(this.centerDurDom.style.display="block"));this.root.style.display="block"}},{key:"hide",value:function(){if("flex"===this.mode)return this.centerCurDom&&(this.centerCurDom.style.display="none"),void(this.centerDurDom&&(this.centerDurDom.style.display="none"));this.root.style.display="none"}},{key:"onTimeUpdate",value:function(t){var e=this.player,n=this.config,r=this.duration;if(!n.disable&&!this.isActiving&&e.hasStart){var i=this.currentTime+this.timeOffset;i=eE.adjustTimeByDuration(i,r,t),"flex"===this.mode?(this.centerCurDom.innerHTML=this.minWidthTime(eE.format(i)),r!==1/0&&r>0&&(this.centerDurDom.innerHTML=eE.format(r))):(this.timeDom.innerHTML=this.minWidthTime(eE.format(i)),r!==1/0&&r>0&&(this.durationDom.innerHTML=eE.format(r)))}}},{key:"onReset",value:function(){"flex"===this.mode?(this.centerCurDom.innerHTML=this.minWidthTime(eE.format(0)),this.centerDurDom.innerHTML=eE.format(0)):(this.timeDom.innerHTML=this.minWidthTime(eE.format(0)),this.durationDom.innerHTML=eE.format(0))}},{key:"createCenterTime",value:function(){var t=this.player;if(t.controls&&t.controls.center){var e=t.controls.center;this.centerCurDom=eE.createDom("xg-icon","00:00",{},"xgplayer-time xg-time-left"),this.centerDurDom=eE.createDom("xg-icon","00:00",{},"xgplayer-time xg-time-right"),e.children.length>0?e.insertBefore(this.centerCurDom,e.children[0]):e.appendChild(this.centerCurDom),e.appendChild(this.centerDurDom)}}},{key:"afterPlayerInit",value:function(){var t=this.config;this.duration===1/0||this.playerConfig.isLive?(eE.hide(this.durationDom),eE.hide(this.timeDom),eE.hide(hw(this).call(this,".time-separator")),eE.show(hw(this).call(this,".time-live-tag"))):eE.hide(hw(this).call(this,".time-live-tag"));t.hide?this.hide():this.show()}},{key:"changeLiveState",value:function(t){t?(eE.hide(this.durationDom),eE.hide(this.timeDom),eE.hide(hw(this).call(this,".time-separator")),eE.show(hw(this).call(this,".time-live-tag"))):(eE.hide(hw(this).call(this,".time-live-tag")),eE.show(hw(this).call(this,".time-separator")),eE.show(this.durationDom),eE.show(this.timeDom))}},{key:"updateTime",value:function(t){this.isActiving=!0,!t&&0!==t||t>this.duration||("flex"!==this.mode?this.timeDom.innerHTML=this.minWidthTime(eE.format(t)):this.centerCurDom.innerHTML=this.minWidthTime(eE.format(t)))}},{key:"minWidthTime",value:function(t){var e;return hk(e=t.split(":")).call(e,(function(t){return'<span class="time-min-width">'.concat(t,"</span>")})).join(":")}},{key:"resetActive",value:function(){var t=this,e=this.player,n=function(){t.isActiving=!1};this.off(lE,n),e.isSeeking&&e.media.seeking?this.once(lE,n):this.isActiving=!1}},{key:"destroy",value:function(){var t=this.player.controls.center;this.centerCurDom&&t.removeChild(this.centerCurDom),this.centerCurDom=null,this.centerDurDom&&t.removeChild(this.centerDurDom),this.centerDurDom=null}},{key:"render",value:function(){if(!this.config.disable)return'<xg-icon class="xgplayer-time">\n <span class="time-current">00:00</span>\n <span class="time-separator">/</span>\n <span class="time-duration">00:00</span>\n <span class="time-live-tag">'.concat(this.i18n.LIVE_TIP,"</span>\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"time"}},{key:"defaultConfig",get:function(){return{position:LE.CONTROLS_LEFT,index:2,disable:!1}}}]),n}(BE);function gT(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="0 -10 28 40">\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M358.4 358.4h-204.8v307.2h204.8l256 256v-819.2l-256 256z"></path>\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M940.632 837.632l-72.192-72.192c65.114-64.745 105.412-154.386 105.412-253.44s-40.299-188.695-105.396-253.424l-0.016-0.016 72.192-72.192c83.639 83.197 135.401 198.37 135.401 325.632s-51.762 242.434-135.381 325.612l-0.020 0.020zM795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021z"></path>\n</svg>\n',"image/svg+xml").firstChild}function yT(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="0 -10 28 40">\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M358.4 358.4h-204.8v307.2h204.8l256 256v-819.2l-256 256z"></path>\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021zM795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021z"></path>\n</svg>\n',"image/svg+xml").firstChild}function mT(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="0 -10 28 40">\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M358.4 358.4h-204.8v307.2h204.8l256 256v-819.2l-256 256z"></path>\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M920.4 439.808l-108.544-109.056-72.704 72.704 109.568 108.544-109.056 108.544 72.704 72.704 108.032-109.568 108.544 109.056 72.704-72.704-109.568-108.032 109.056-108.544-72.704-72.704-108.032 109.568z"></path>\n</svg>\n',"image/svg+xml").firstChild}var bT=function(t){Bk(n,t);var e=Fk(n);function n(){var t,r;Ok(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Rk(jk(r=e.call.apply(e,lh(t=[this]).call(t,o))),"onBarMousedown",(function(t){var e=jk(r).player,n=hw(r).call(r,".xgplayer-bar");eE.event(t);var i=n.getBoundingClientRect(),o=eE.getEventPos(t,e.zoom),a=i.height-(o.clientY-i.top);if(o.h=a,o.barH=i.height,r.pos=o,!(a<-2))return r.updateVolumePos(a,t),document.addEventListener("mouseup",r.onBarMouseUp),r._d.isStart=!0,!1})),Rk(jk(r),"onBarMouseMove",(function(t){var e=jk(r)._d;if(e.isStart){var n=jk(r),i=n.pos,o=n.player;t.preventDefault(),t.stopPropagation(),eE.event(t);var a=eE.getEventPos(t,o.zoom);e.isMoving=!0;var s=i.h-a.clientY+i.clientY;s>i.barH||r.updateVolumePos(s,t)}})),Rk(jk(r),"onBarMouseUp",(function(t){eE.event(t),document.removeEventListener("mouseup",r.onBarMouseUp);var e=jk(r)._d;e.isStart=!1,e.isMoving=!1})),Rk(jk(r),"onMouseenter",(function(t){r._d.isActive=!0,r.focus(),r.emit("icon_mouseenter",{pluginName:r.pluginName})})),Rk(jk(r),"onMouseleave",(function(t){r._d.isActive=!1,r.unFocus(100,!1,t),r.emit("icon_mouseleave",{pluginName:r.pluginName})})),Rk(jk(r),"onVolumeChange",(function(t){if(r.player){var e=r.player,n=e.muted,i=e.volume;r._d.isMoving||(hw(r).call(r,".xgplayer-drag").style.height=n||0===i?"4px":"".concat(100*i,"%"),r.config.showValueLabel&&r.updateVolumeValue()),r.animate(n,i)}})),r}return Pk(n,[{key:"registerIcons",value:function(){return{volumeSmall:{icon:yT,class:"xg-volume-small"},volumeLarge:{icon:gT,class:"xg-volume"},volumeMuted:{icon:mT,class:"xg-volume-mute"}}}},{key:"afterCreate",value:function(){var t=this;if(this._timerId=null,this._d={isStart:!1,isMoving:!1,isActive:!1},!this.config.disable){this.initIcons();var e=this.playerConfig,n=e.commonStyle,r=e.volume;if(n.volumeColor)hw(this).call(this,".xgplayer-drag").style.backgroundColor=n.volumeColor;if(this.changeMutedHandler=this.hook("mutedChange",(function(e){t.changeMuted(e)}),{pre:function(t){t.preventDefault(),t.stopPropagation()}}),this._onMouseenterHandler=this.hook("mouseenter",this.onMouseenter),this._onMouseleaveHandler=this.hook("mouseleave",this.onMouseleave),"mobile"!==oE.device&&"mobile"!==this.playerConfig.isMobileSimulateMode)ib(this).call(this,"mouseenter",this._onMouseenterHandler),ib(this).call(this,["blur","mouseleave"],this._onMouseleaveHandler),ib(this).call(this,".xgplayer-slider","mousedown",this.onBarMousedown),ib(this).call(this,".xgplayer-slider","mousemove",this.onBarMouseMove),ib(this).call(this,".xgplayer-slider","mouseup",this.onBarMouseUp);ib(this).call(this,".xgplayer-icon",["touchend","click"],this.changeMutedHandler),this.on(hE,this.onVolumeChange),this.once("loadeddata",this.onVolumeChange),"Number"!==eE.typeOf(r)&&(this.player.volume=this.config.default),this.onVolumeChange()}}},{key:"updateVolumePos",value:function(t,e){var n=this.player,r=hw(this).call(this,".xgplayer-drag"),i=hw(this).call(this,".xgplayer-bar");if(i&&r){var o=ak(t/i.getBoundingClientRect().height*1e3,10);r.style.height="".concat(t,"px");var a=Math.max(Math.min(o/1e3,1),0),s={volume:{from:n.volume,to:a}};n.muted&&(s.muted={from:!0,to:!1}),this.emitUserAction(e,"change_volume",{muted:n.muted,volume:n.volume,props:s}),n.volume=Math.max(Math.min(o/1e3,1),0),n.muted&&(n.muted=!1),this.config.showValueLabel&&this.updateVolumeValue()}}},{key:"updateVolumeValue",value:function(){var t=this.player,e=t.volume,n=t.muted,r=hw(this).call(this,".xgplayer-value-label"),i=Math.max(Math.min(e,1),0);r.innerText=n?0:Math.round(100*i)}},{key:"focus",value:function(){this.player.focus({autoHide:!1}),this._timerId&&(eE.clearTimeout(this,this._timerId),this._timerId=null),eE.addClass(this.root,"slide-show")}},{key:"unFocus",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2?arguments[2]:void 0,i=this._d,o=this.player;i.isActive||(this._timerId&&(eE.clearTimeout(this,this._timerId),this._timerId=null),this._timerId=eE.setTimeout(this,(function(){i.isActive||(n?o.blur():o.focus(),eE.removeClass(t.root,"slide-show"),i.isStart&&t.onBarMouseUp(r)),t._timerId=null}),e))}},{key:"changeMuted",value:function(t){t&&t.stopPropagation();var e=this.player;this._d.isStart&&this.onBarMouseUp(t),this.emitUserAction(t,"change_muted",{muted:e.muted,volume:e.volume,props:{muted:{from:e.muted,to:!e.muted}}}),e.volume>0&&(e.muted=!e.muted),e.volume<.01&&(e.volume=this.config.miniVolume)}},{key:"animate",value:function(t,e){t||0===e?this.setAttr("data-state","mute"):e<.5&&this.icons.volumeSmall?this.setAttr("data-state","small"):this.setAttr("data-state","normal")}},{key:"initIcons",value:function(){var t=this.icons;this.appendChild(".xgplayer-icon",t.volumeSmall),this.appendChild(".xgplayer-icon",t.volumeLarge),this.appendChild(".xgplayer-icon",t.volumeMuted)}},{key:"destroy",value:function(){this._timerId&&(eE.clearTimeout(this,this._timerId),this._timerId=null),this.unbind("mouseenter",this.onMouseenter),this.unbind(["blur","mouseleave"],this.onMouseleave),this.unbind(".xgplayer-slider","mousedown",this.onBarMousedown),this.unbind(".xgplayer-slider","mousemove",this.onBarMouseMove),this.unbind(".xgplayer-slider","mouseup",this.onBarMouseUp),document.removeEventListener("mouseup",this.onBarMouseUp),this.unbind(".xgplayer-icon","mobile"===oE.device?"touchend":"click",this.changeMutedHandler)}},{key:"render",value:function(){var t;if(!this.config.disable){var e=this.config.default||this.player.volume,n=this.config.showValueLabel;return lh(t='\n <xg-icon class="xgplayer-volume" data-state="normal">\n <div class="xgplayer-icon">\n </div>\n <xg-slider class="xgplayer-slider">\n '.concat(n?'<div class="xgplayer-value-label">'.concat(100*e,"</div>"):"",'\n <div class="xgplayer-bar">\n <xg-drag class="xgplayer-drag" style="height: ')).call(t,100*e,'%"></xg-drag>\n </div>\n </xg-slider>\n </xg-icon>')}}}],[{key:"pluginName",get:function(){return"volume"}},{key:"defaultConfig",get:function(){return{position:LE.CONTROLS_RIGHT,index:1,disable:!1,showValueLabel:!1,default:.6,miniVolume:.2}}}]),n}(BE),wT=a,kT=pe("iterator"),_T=!wT((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,n="";return t.pathname="c%20d",e.forEach((function(t,r){e.delete("b"),n+=r+t})),!t.toJSON||!e.size&&true||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[kT]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host})),AT=y,ET=2147483647,TT=/[^\0-\u007E]/,CT=/[.\u3002\uFF0E\uFF61]/g,ST="Overflow: input needs wider integers to process",xT=RangeError,MT=AT(CT.exec),LT=Math.floor,OT=String.fromCharCode,IT=AT("".charCodeAt),PT=AT([].join),RT=AT([].push),BT=AT("".replace),UT=AT("".split),DT=AT("".toLowerCase),jT=function(t){return t+22+75*(t<26)},FT=function(t,e,n){var r=0;for(t=n?LT(t/700):t>>1,t+=LT(t/e);t>455;)t=LT(t/35),r+=36;return LT(r+36*t/(t+38))},NT=function(t){var e=[];t=function(t){for(var e=[],n=0,r=t.length;n<r;){var i=IT(t,n++);if(i>=55296&&i<=56319&&n<r){var o=IT(t,n++);56320==(64512&o)?RT(e,((1023&i)<<10)+(1023&o)+65536):(RT(e,i),n--)}else RT(e,i)}return e}(t);var n,r,i=t.length,o=128,a=0,s=72;for(n=0;n<t.length;n++)(r=t[n])<128&&RT(e,OT(r));var u=e.length,l=u;for(u&&RT(e,"-");l<i;){var c=ET;for(n=0;n<t.length;n++)(r=t[n])>=o&&r<c&&(c=r);var f=l+1;if(c-o>LT((ET-a)/f))throw xT(ST);for(a+=(c-o)*f,o=c,n=0;n<t.length;n++){if((r=t[n])<o&&++a>ET)throw xT(ST);if(r==o){for(var h=a,p=36;;){var d=p<=s?1:p>=s+26?26:p-s;if(h<d)break;var v=h-d,g=36-d;RT(e,OT(jT(d+v%g))),h=LT(v/g),p+=36}RT(e,OT(jT(h))),s=FT(a,f,l==u),a=0,l++}}a++,o++}return PT(e,"")},HT=fo,zT=function(t,e,n){for(var r in e)n&&n.unsafe&&t[r]?t[r]=e[r]:HT(t,r,e[r],n);return t},VT=Ln,qT=o,GT=P,YT=y,WT=L,KT=_T,XT=fo,$T=po,JT=zT,QT=jo,ZT=$u,tC=ta,eC=ev,nC=x,rC=Zt,iC=Je,oC=lr,aC=rn,sC=et,uC=ei,lC=Wi,cC=N,fC=ad,hC=jh,pC=uv,dC=vA,vC=pe("iterator"),gC="URLSearchParams",yC=gC+"Iterator",mC=tC.set,bC=tC.getterFor(gC),wC=tC.getterFor(yC),kC=Object.getOwnPropertyDescriptor,_C=function(t){if(!WT)return qT[t];var e=kC(qT,t);return e&&e.value},AC=_C("fetch"),EC=_C("Request"),TC=_C("Headers"),CC=EC&&EC.prototype,SC=TC&&TC.prototype,xC=qT.RegExp,MC=qT.TypeError,LC=qT.decodeURIComponent,OC=qT.encodeURIComponent,IC=YT("".charAt),PC=YT([].join),RC=YT([].push),BC=YT("".replace),UC=YT([].shift),DC=YT([].splice),jC=YT("".split),FC=YT("".slice),NC=/\+/g,HC=Array(4),zC=function(t){return HC[t-1]||(HC[t-1]=xC("((?:%[\\da-f]{2}){"+t+"})","gi"))},VC=function(t){try{return LC(t)}catch(aR){return t}},qC=function(t){var e=BC(t,NC," "),n=4;try{return LC(e)}catch(aR){for(;n;)e=BC(e,zC(n--),VC);return e}},GC=/[!'()~]|%20/g,YC={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},WC=function(t){return YC[t]},KC=function(t){return BC(OC(t),GC,WC)},XC=ZT((function(t,e){mC(this,{type:yC,iterator:fC(bC(t).entries),kind:e})}),"Iterator",(function(){var t=wC(this),e=t.kind,n=t.iterator.next(),r=n.value;return n.done||(n.value="keys"===e?r.key:"values"===e?r.value:[r.key,r.value]),n}),!0),$C=function(t){this.entries=[],this.url=null,void 0!==t&&(sC(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===IC(t,0)?FC(t,1):t:uC(t)))};$C.prototype={type:gC,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,n,r,i,o,a,s,u=hC(t);if(u)for(n=(e=fC(t,u)).next;!(r=GT(n,e)).done;){if(o=(i=fC(aC(r.value))).next,(a=GT(o,i)).done||(s=GT(o,i)).done||!GT(o,i).done)throw MC("Expected sequence with length 2");RC(this.entries,{key:uC(a.value),value:uC(s.value)})}else for(var l in t)rC(t,l)&&RC(this.entries,{key:l,value:uC(t[l])})},parseQuery:function(t){if(t)for(var e,n,r=jC(t,"&"),i=0;i<r.length;)(e=r[i++]).length&&(n=jC(e,"="),RC(this.entries,{key:qC(UC(n)),value:qC(PC(n,"="))}))},serialize:function(){for(var t,e=this.entries,n=[],r=0;r<e.length;)t=e[r++],RC(n,KC(t.key)+"="+KC(t.value));return PC(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var JC=function(){eC(this,QC);var t=mC(this,new $C(arguments.length>0?arguments[0]:void 0));WT||(this.length=t.entries.length)},QC=JC.prototype;if(JT(QC,{append:function(t,e){pC(arguments.length,2);var n=bC(this);RC(n.entries,{key:uC(t),value:uC(e)}),WT||this.length++,n.updateURL()},delete:function(t){pC(arguments.length,1);for(var e=bC(this),n=e.entries,r=uC(t),i=0;i<n.length;)n[i].key===r?DC(n,i,1):i++;WT||(this.length=n.length),e.updateURL()},get:function(t){pC(arguments.length,1);for(var e=bC(this).entries,n=uC(t),r=0;r<e.length;r++)if(e[r].key===n)return e[r].value;return null},getAll:function(t){pC(arguments.length,1);for(var e=bC(this).entries,n=uC(t),r=[],i=0;i<e.length;i++)e[i].key===n&&RC(r,e[i].value);return r},has:function(t){pC(arguments.length,1);for(var e=bC(this).entries,n=uC(t),r=0;r<e.length;)if(e[r++].key===n)return!0;return!1},set:function(t,e){pC(arguments.length,1);for(var n,r=bC(this),i=r.entries,o=!1,a=uC(t),s=uC(e),u=0;u<i.length;u++)(n=i[u]).key===a&&(o?DC(i,u--,1):(o=!0,n.value=s));o||RC(i,{key:a,value:s}),WT||(this.length=i.length),r.updateURL()},sort:function(){var t=bC(this);dC(t.entries,(function(t,e){return t.key>e.key?1:-1})),t.updateURL()},forEach:function(t){for(var e,n=bC(this).entries,r=iC(t,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)r((e=n[i++]).value,e.key,this)},keys:function(){return new XC(this,"keys")},values:function(){return new XC(this,"values")},entries:function(){return new XC(this,"entries")}},{enumerable:!0}),XT(QC,vC,QC.entries,{name:"entries"}),XT(QC,"toString",(function(){return bC(this).serialize()}),{enumerable:!0}),WT&&$T(QC,"size",{get:function(){return bC(this).entries.length},configurable:!0,enumerable:!0}),QT(JC,gC),VT({global:!0,constructor:!0,forced:!KT},{URLSearchParams:JC}),!KT&&nC(TC)){var ZC=YT(SC.has),tS=YT(SC.set),eS=function(t){if(sC(t)){var e,n=t.body;if(oC(n)===gC)return e=t.headers?new TC(t.headers):new TC,ZC(e,"content-type")||tS(e,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),lC(t,{body:cC(0,uC(n)),headers:cC(0,e)})}return t};if(nC(AC)&&VT({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(t){return AC(t,arguments.length>1?eS(arguments[1]):{})}}),nC(EC)){var nS=function(t){return eC(this,CC),new EC(t,arguments.length>1?eS(arguments[1]):{})};CC.constructor=nS,nS.prototype=CC,VT({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:nS})}}var rS,iS=Ln,oS=L,aS=_T,sS=o,uS=Je,lS=y,cS=fo,fS=po,hS=ev,pS=Zt,dS=Tk,vS=Ab,gS=ro,yS=bc.codeAt,mS=function(t){var e,n,r=[],i=UT(BT(DT(t),CT,"."),".");for(e=0;e<i.length;e++)n=i[e],RT(r,MT(TT,n)?"xn--"+NT(n):n);return PT(r,".")},bS=ei,wS=jo,kS=uv,_S={URLSearchParams:JC,getState:bC},AS=ta,ES=AS.set,TS=AS.getterFor("URL"),CS=_S.URLSearchParams,SS=_S.getState,xS=sS.URL,MS=sS.TypeError,LS=sS.parseInt,OS=Math.floor,IS=Math.pow,PS=lS("".charAt),RS=lS(/./.exec),BS=lS([].join),US=lS(1..toString),DS=lS([].pop),jS=lS([].push),FS=lS("".replace),NS=lS([].shift),HS=lS("".split),zS=lS("".slice),VS=lS("".toLowerCase),qS=lS([].unshift),GS="Invalid scheme",YS="Invalid host",WS="Invalid port",KS=/[a-z]/i,XS=/[\d+-.a-z]/i,$S=/\d/,JS=/^0x/i,QS=/^[0-7]+$/,ZS=/^\d+$/,tx=/^[\da-f]+$/i,ex=/[\0\t\n\r #%/:<>?@[\\\]^|]/,nx=/[\0\t\n\r #/:<>?@[\\\]^|]/,rx=/^[\u0000-\u0020]+/,ix=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,ox=/[\t\n\r]/g,ax=function(t){var e,n,r,i;if("number"==typeof t){for(e=[],n=0;n<4;n++)qS(e,t%256),t=OS(t/256);return BS(e,".")}if("object"==typeof t){for(e="",r=function(t){for(var e=null,n=1,r=null,i=0,o=0;o<8;o++)0!==t[o]?(i>n&&(e=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(e=r,n=i),e}(t),n=0;n<8;n++)i&&0===t[n]||(i&&(i=!1),r===n?(e+=n?":":"::",i=!0):(e+=US(t[n],16),n<7&&(e+=":")));return"["+e+"]"}return t},sx={},ux=dS({},sx,{" ":1,'"':1,"<":1,">":1,"`":1}),lx=dS({},ux,{"#":1,"?":1,"{":1,"}":1}),cx=dS({},lx,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),fx=function(t,e){var n=yS(t,0);return n>32&&n<127&&!pS(e,t)?t:encodeURIComponent(t)},hx={ftp:21,file:null,http:80,https:443,ws:80,wss:443},px=function(t,e){var n;return 2==t.length&&RS(KS,PS(t,0))&&(":"==(n=PS(t,1))||!e&&"|"==n)},dx=function(t){var e;return t.length>1&&px(zS(t,0,2))&&(2==t.length||"/"===(e=PS(t,2))||"\\"===e||"?"===e||"#"===e)},vx=function(t){return"."===t||"%2e"===VS(t)},gx={},yx={},mx={},bx={},wx={},kx={},_x={},Ax={},Ex={},Tx={},Cx={},Sx={},xx={},Mx={},Lx={},Ox={},Ix={},Px={},Rx={},Bx={},Ux={},Dx=function(t,e,n){var r,i,o,a=bS(t);if(e){if(i=this.parse(a))throw MS(i);this.searchParams=null}else{if(void 0!==n&&(r=new Dx(n,!0)),i=this.parse(a,null,r))throw MS(i);(o=SS(new CS)).bindURL(this),this.searchParams=o}};Dx.prototype={type:"URL",parse:function(t,e,n){var r,i,o,a,s,u=this,l=e||gx,c=0,f="",h=!1,p=!1,d=!1;for(t=bS(t),e||(u.scheme="",u.username="",u.password="",u.host=null,u.port=null,u.path=[],u.query=null,u.fragment=null,u.cannotBeABaseURL=!1,t=FS(t,rx,""),t=FS(t,ix,"$1")),t=FS(t,ox,""),r=vS(t);c<=r.length;){switch(i=r[c],l){case gx:if(!i||!RS(KS,i)){if(e)return GS;l=mx;continue}f+=VS(i),l=yx;break;case yx:if(i&&(RS(XS,i)||"+"==i||"-"==i||"."==i))f+=VS(i);else{if(":"!=i){if(e)return GS;f="",l=mx,c=0;continue}if(e&&(u.isSpecial()!=pS(hx,f)||"file"==f&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=f,e)return void(u.isSpecial()&&hx[u.scheme]==u.port&&(u.port=null));f="","file"==u.scheme?l=Mx:u.isSpecial()&&n&&n.scheme==u.scheme?l=bx:u.isSpecial()?l=Ax:"/"==r[c+1]?(l=wx,c++):(u.cannotBeABaseURL=!0,jS(u.path,""),l=Rx)}break;case mx:if(!n||n.cannotBeABaseURL&&"#"!=i)return GS;if(n.cannotBeABaseURL&&"#"==i){u.scheme=n.scheme,u.path=gS(n.path),u.query=n.query,u.fragment="",u.cannotBeABaseURL=!0,l=Ux;break}l="file"==n.scheme?Mx:kx;continue;case bx:if("/"!=i||"/"!=r[c+1]){l=kx;continue}l=Ex,c++;break;case wx:if("/"==i){l=Tx;break}l=Px;continue;case kx:if(u.scheme=n.scheme,i==rS)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=gS(n.path),u.query=n.query;else if("/"==i||"\\"==i&&u.isSpecial())l=_x;else if("?"==i)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=gS(n.path),u.query="",l=Bx;else{if("#"!=i){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=gS(n.path),u.path.length--,l=Px;continue}u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=gS(n.path),u.query=n.query,u.fragment="",l=Ux}break;case _x:if(!u.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,l=Px;continue}l=Tx}else l=Ex;break;case Ax:if(l=Ex,"/"!=i||"/"!=PS(f,c+1))continue;c++;break;case Ex:if("/"!=i&&"\\"!=i){l=Tx;continue}break;case Tx:if("@"==i){h&&(f="%40"+f),h=!0,o=vS(f);for(var v=0;v<o.length;v++){var g=o[v];if(":"!=g||d){var y=fx(g,cx);d?u.password+=y:u.username+=y}else d=!0}f=""}else if(i==rS||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(h&&""==f)return"Invalid authority";c-=vS(f).length+1,f="",l=Cx}else f+=i;break;case Cx:case Sx:if(e&&"file"==u.scheme){l=Ox;continue}if(":"!=i||p){if(i==rS||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(u.isSpecial()&&""==f)return YS;if(e&&""==f&&(u.includesCredentials()||null!==u.port))return;if(a=u.parseHost(f))return a;if(f="",l=Ix,e)return;continue}"["==i?p=!0:"]"==i&&(p=!1),f+=i}else{if(""==f)return YS;if(a=u.parseHost(f))return a;if(f="",l=xx,e==Sx)return}break;case xx:if(!RS($S,i)){if(i==rS||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()||e){if(""!=f){var m=LS(f,10);if(m>65535)return WS;u.port=u.isSpecial()&&m===hx[u.scheme]?null:m,f=""}if(e)return;l=Ix;continue}return WS}f+=i;break;case Mx:if(u.scheme="file","/"==i||"\\"==i)l=Lx;else{if(!n||"file"!=n.scheme){l=Px;continue}if(i==rS)u.host=n.host,u.path=gS(n.path),u.query=n.query;else if("?"==i)u.host=n.host,u.path=gS(n.path),u.query="",l=Bx;else{if("#"!=i){dx(BS(gS(r,c),""))||(u.host=n.host,u.path=gS(n.path),u.shortenPath()),l=Px;continue}u.host=n.host,u.path=gS(n.path),u.query=n.query,u.fragment="",l=Ux}}break;case Lx:if("/"==i||"\\"==i){l=Ox;break}n&&"file"==n.scheme&&!dx(BS(gS(r,c),""))&&(px(n.path[0],!0)?jS(u.path,n.path[0]):u.host=n.host),l=Px;continue;case Ox:if(i==rS||"/"==i||"\\"==i||"?"==i||"#"==i){if(!e&&px(f))l=Px;else if(""==f){if(u.host="",e)return;l=Ix}else{if(a=u.parseHost(f))return a;if("localhost"==u.host&&(u.host=""),e)return;f="",l=Ix}continue}f+=i;break;case Ix:if(u.isSpecial()){if(l=Px,"/"!=i&&"\\"!=i)continue}else if(e||"?"!=i)if(e||"#"!=i){if(i!=rS&&(l=Px,"/"!=i))continue}else u.fragment="",l=Ux;else u.query="",l=Bx;break;case Px:if(i==rS||"/"==i||"\\"==i&&u.isSpecial()||!e&&("?"==i||"#"==i)){if(".."===(s=VS(s=f))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(u.shortenPath(),"/"==i||"\\"==i&&u.isSpecial()||jS(u.path,"")):vx(f)?"/"==i||"\\"==i&&u.isSpecial()||jS(u.path,""):("file"==u.scheme&&!u.path.length&&px(f)&&(u.host&&(u.host=""),f=PS(f,0)+":"),jS(u.path,f)),f="","file"==u.scheme&&(i==rS||"?"==i||"#"==i))for(;u.path.length>1&&""===u.path[0];)NS(u.path);"?"==i?(u.query="",l=Bx):"#"==i&&(u.fragment="",l=Ux)}else f+=fx(i,lx);break;case Rx:"?"==i?(u.query="",l=Bx):"#"==i?(u.fragment="",l=Ux):i!=rS&&(u.path[0]+=fx(i,sx));break;case Bx:e||"#"!=i?i!=rS&&("'"==i&&u.isSpecial()?u.query+="%27":u.query+="#"==i?"%23":fx(i,sx)):(u.fragment="",l=Ux);break;case Ux:i!=rS&&(u.fragment+=fx(i,ux))}c++}},parseHost:function(t){var e,n,r;if("["==PS(t,0)){if("]"!=PS(t,t.length-1))return YS;if(e=function(t){var e,n,r,i,o,a,s,u=[0,0,0,0,0,0,0,0],l=0,c=null,f=0,h=function(){return PS(t,f)};if(":"==h()){if(":"!=PS(t,1))return;f+=2,c=++l}for(;h();){if(8==l)return;if(":"!=h()){for(e=n=0;n<4&&RS(tx,h());)e=16*e+LS(h(),16),f++,n++;if("."==h()){if(0==n)return;if(f-=n,l>6)return;for(r=0;h();){if(i=null,r>0){if(!("."==h()&&r<4))return;f++}if(!RS($S,h()))return;for(;RS($S,h());){if(o=LS(h(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;f++}u[l]=256*u[l]+i,2!=++r&&4!=r||l++}if(4!=r)return;break}if(":"==h()){if(f++,!h())return}else if(h())return;u[l++]=e}else{if(null!==c)return;f++,c=++l}}if(null!==c)for(a=l-c,l=7;0!=l&&a>0;)s=u[l],u[l--]=u[c+a-1],u[c+--a]=s;else if(8!=l)return;return u}(zS(t,1,-1)),!e)return YS;this.host=e}else if(this.isSpecial()){if(t=mS(t),RS(ex,t))return YS;if(e=function(t){var e,n,r,i,o,a,s,u=HS(t,".");if(u.length&&""==u[u.length-1]&&u.length--,(e=u.length)>4)return t;for(n=[],r=0;r<e;r++){if(""==(i=u[r]))return t;if(o=10,i.length>1&&"0"==PS(i,0)&&(o=RS(JS,i)?16:8,i=zS(i,8==o?1:2)),""===i)a=0;else{if(!RS(10==o?ZS:8==o?QS:tx,i))return t;a=LS(i,o)}jS(n,a)}for(r=0;r<e;r++)if(a=n[r],r==e-1){if(a>=IS(256,5-e))return null}else if(a>255)return null;for(s=DS(n),r=0;r<n.length;r++)s+=n[r]*IS(256,3-r);return s}(t),null===e)return YS;this.host=e}else{if(RS(nx,t))return YS;for(e="",n=vS(t),r=0;r<n.length;r++)e+=fx(n[r],sx);this.host=e}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return pS(hx,this.scheme)},shortenPath:function(){var t=this.path,e=t.length;!e||"file"==this.scheme&&1==e&&px(t[0],!0)||t.length--},serialize:function(){var t=this,e=t.scheme,n=t.username,r=t.password,i=t.host,o=t.port,a=t.path,s=t.query,u=t.fragment,l=e+":";return null!==i?(l+="//",t.includesCredentials()&&(l+=n+(r?":"+r:"")+"@"),l+=ax(i),null!==o&&(l+=":"+o)):"file"==e&&(l+="//"),l+=t.cannotBeABaseURL?a[0]:a.length?"/"+BS(a,"/"):"",null!==s&&(l+="?"+s),null!==u&&(l+="#"+u),l},setHref:function(t){var e=this.parse(t);if(e)throw MS(e);this.searchParams.update()},getOrigin:function(){var t=this.scheme,e=this.port;if("blob"==t)try{return new jx(t.path[0]).origin}catch(aR){return"null"}return"file"!=t&&this.isSpecial()?t+"://"+ax(this.host)+(null!==e?":"+e:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(t){this.parse(bS(t)+":",gx)},getUsername:function(){return this.username},setUsername:function(t){var e=vS(bS(t));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<e.length;n++)this.username+=fx(e[n],cx)}},getPassword:function(){return this.password},setPassword:function(t){var e=vS(bS(t));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<e.length;n++)this.password+=fx(e[n],cx)}},getHost:function(){var t=this.host,e=this.port;return null===t?"":null===e?ax(t):ax(t)+":"+e},setHost:function(t){this.cannotBeABaseURL||this.parse(t,Cx)},getHostname:function(){var t=this.host;return null===t?"":ax(t)},setHostname:function(t){this.cannotBeABaseURL||this.parse(t,Sx)},getPort:function(){var t=this.port;return null===t?"":bS(t)},setPort:function(t){this.cannotHaveUsernamePasswordPort()||(""==(t=bS(t))?this.port=null:this.parse(t,xx))},getPathname:function(){var t=this.path;return this.cannotBeABaseURL?t[0]:t.length?"/"+BS(t,"/"):""},setPathname:function(t){this.cannotBeABaseURL||(this.path=[],this.parse(t,Ix))},getSearch:function(){var t=this.query;return t?"?"+t:""},setSearch:function(t){""==(t=bS(t))?this.query=null:("?"==PS(t,0)&&(t=zS(t,1)),this.query="",this.parse(t,Bx)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var t=this.fragment;return t?"#"+t:""},setHash:function(t){""!=(t=bS(t))?("#"==PS(t,0)&&(t=zS(t,1)),this.fragment="",this.parse(t,Ux)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var jx=function(t){var e=hS(this,Fx),n=kS(arguments.length,1)>1?arguments[1]:void 0,r=ES(e,new Dx(t,!1,n));oS||(e.href=r.serialize(),e.origin=r.getOrigin(),e.protocol=r.getProtocol(),e.username=r.getUsername(),e.password=r.getPassword(),e.host=r.getHost(),e.hostname=r.getHostname(),e.port=r.getPort(),e.pathname=r.getPathname(),e.search=r.getSearch(),e.searchParams=r.getSearchParams(),e.hash=r.getHash())},Fx=jx.prototype,Nx=function(t,e){return{get:function(){return TS(this)[t]()},set:e&&function(t){return TS(this)[e](t)},configurable:!0,enumerable:!0}};if(oS&&(fS(Fx,"href",Nx("serialize","setHref")),fS(Fx,"origin",Nx("getOrigin")),fS(Fx,"protocol",Nx("getProtocol","setProtocol")),fS(Fx,"username",Nx("getUsername","setUsername")),fS(Fx,"password",Nx("getPassword","setPassword")),fS(Fx,"host",Nx("getHost","setHost")),fS(Fx,"hostname",Nx("getHostname","setHostname")),fS(Fx,"port",Nx("getPort","setPort")),fS(Fx,"pathname",Nx("getPathname","setPathname")),fS(Fx,"search",Nx("getSearch","setSearch")),fS(Fx,"searchParams",Nx("getSearchParams")),fS(Fx,"hash",Nx("getHash","setHash"))),cS(Fx,"toJSON",(function(){return TS(this).serialize()}),{enumerable:!0}),cS(Fx,"toString",(function(){return TS(this).serialize()}),{enumerable:!0}),xS){var Hx=xS.createObjectURL,zx=xS.revokeObjectURL;Hx&&cS(jx,"createObjectURL",uS(Hx,xS)),zx&&cS(jx,"revokeObjectURL",uS(zx,xS))}wS(jx,"URL"),iS({global:!0,constructor:!0,forced:!aS,sham:!oS},{URL:jx});var Vx=Ln,qx=a,Gx=uv,Yx=ei,Wx=_T,Kx=st("URL");Vx({target:"URL",stat:!0,forced:!(Wx&&qx((function(){Kx.canParse()})))},{canParse:function(t){var e=Gx(arguments.length,1),n=Yx(t),r=e<2||void 0===arguments[1]?void 0:Yx(arguments[1]);try{return!!new Kx(n,r)}catch(aR){return!1}}});var Xx=n(nt.URL);function $x(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="31" height="40" viewBox="0 -5 31 40">\n <path fill="#fff" transform="scale(1.3, 1.3)" class=\'path_full\' d="M9,10v1a.9.9,0,0,1-1,1,.9.9,0,0,1-1-1V9A.9.9,0,0,1,8,8h2a.9.9,0,0,1,1,1,.9.9,0,0,1-1,1Zm6,4V13a1,1,0,0,1,2,0v2a.9.9,0,0,1-1,1H14a1,1,0,0,1,0-2Zm3-7H6V17H18Zm2,0V17a2,2,0,0,1-2,2H6a2,2,0,0,1-2-2V7A2,2,0,0,1,6,5H18A2,2,0,0,1,20,7Z"></path>\n</svg>\n',"image/svg+xml").firstChild}function Jx(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="31" height="40" viewBox="0 -5 31 40">\n <path fill="#fff" transform="scale(1.3, 1.3)" d="M9,10V9a.9.9,0,0,1,1-1,.9.9,0,0,1,1,1v2a.9.9,0,0,1-1,1H8a.9.9,0,0,1-1-1,.9.9,0,0,1,1-1Zm6,4v1a1,1,0,0,1-2,0V13a.9.9,0,0,1,1-1h2a1,1,0,0,1,0,2Zm3-7H6V17H18Zm2,0V17a2,2,0,0,1-2,2H6a2,2,0,0,1-2-2V7A2,2,0,0,1,6,5H18A2,2,0,0,1,20,7Z"></path>\n</svg>\n',"image/svg+xml").firstChild}var Qx=function(t){Bk(n,t);var e=Fk(n);function n(){return Ok(this,n),e.apply(this,arguments)}return Pk(n,[{key:"beforeCreate",value:function(t){"boolean"==typeof t.player.config.cssFullscreen&&(t.config.disable=!t.player.config.cssFullscreen)}},{key:"afterCreate",value:function(){var t,e=this;Nk(Uk(n.prototype),"afterCreate",this).call(this),this.config.disable||(this.config.target&&(this.playerConfig.fullscreenTarget=this.config.target),this.initIcons(),this.on("cssFullscreen_change",(function(t){e.animate(t)})),this.btnClick=ib(t=this.btnClick).call(t,this),this.handleCssFullscreen=this.hook("cssFullscreen_change",this.btnClick,{pre:function(t){t.preventDefault(),t.stopPropagation()}}),ib(this).call(this,["click","touchend"],this.handleCssFullscreen))}},{key:"initIcons",value:function(){var t=this.icons,e=hw(this).call(this,".xgplayer-icon");e.appendChild(t.cssFullscreen),e.appendChild(t.exitCssFullscreen)}},{key:"btnClick",value:function(t){t.preventDefault(),t.stopPropagation();var e=this.player.isCssfullScreen;this.emitUserAction(t,"switch_cssfullscreen",{cssfullscreen:e}),e?this.player.exitCssFullscreen():this.player.getCssFullscreen()}},{key:"animate",value:function(t){this.root&&(t?this.setAttr("data-state","full"):this.setAttr("data-state","normal"),this.switchTips(t))}},{key:"switchTips",value:function(t){var e=this.i18nKeys,n=hw(this).call(this,".xg-tips");n&&this.changeLangTextKey(n,t?e.EXITCSSFULLSCREEN_TIPS:e.CSSFULLSCREEN_TIPS)}},{key:"registerIcons",value:function(){return{cssFullscreen:{icon:$x,class:"xg-get-cssfull"},exitCssFullscreen:{icon:Jx,class:"xg-exit-cssfull"}}}},{key:"destroy",value:function(){Nk(Uk(n.prototype),"destroy",this).call(this),this.unbind(["click","touchend"],this.btnClick)}},{key:"render",value:function(){if(!this.config.disable)return"<xg-icon class='xgplayer-cssfullscreen'>\n <div class=\"xgplayer-icon\">\n </div>\n ".concat(KE(this,"CSSFULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"cssFullscreen"}},{key:"defaultConfig",get:function(){return{position:LE.CONTROLS_RIGHT,index:1,disable:!1,target:null}}}]),n}(uT),Zx=et,tM=k,eM=pe("match"),nM=function(t){var e;return Zx(t)&&(void 0!==(e=t[eM])?!!e:"RegExp"==tM(t))},rM=TypeError,iM=pe("match"),oM=et,aM=Math.floor;Ln({target:"Number",stat:!0},{isInteger:Number.isInteger||function(t){return!oM(t)&&isFinite(t)&&aM(t)===t}});var sM=n(nt.Number.isInteger),uM=fi.includes;Ln({target:"Array",proto:!0,forced:a((function(){return!Array(1).includes()}))},{includes:function(t){return uM(this,t,arguments.length>1?arguments[1]:void 0)}});var lM=af("Array").includes,cM=Ln,fM=function(t){if(nM(t))throw rM("The method doesn't accept regular expressions");return t},hM=X,pM=ei,dM=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[iM]=!1,"/./"[t](e)}catch(r){}}return!1},vM=y("".indexOf);cM({target:"String",proto:!0,forced:!dM("includes")},{includes:function(t){return!!~vM(pM(hM(this)),pM(fM(t)),arguments.length>1?arguments[1]:void 0)}});var gM=af("String").includes,yM=ut,mM=lM,bM=gM,wM=Array.prototype,kM=String.prototype,_M=n((function(t){var e=t.includes;return t===wM||yM(wM,t)&&e===wM.includes?mM:"string"==typeof t||t===kM||yM(kM,t)&&e===kM.includes?bM:e})),AM=$t,EM=ai,TM=Kn,CM=function(t){for(var e=AM(this),n=TM(e),r=arguments.length,i=EM(r>1?arguments[1]:void 0,n),o=r>2?arguments[2]:void 0,a=void 0===o?n:EM(o,n);a>i;)e[i++]=t;return e};Ln({target:"Array",proto:!0},{fill:CM});var SM=af("Array").fill,xM=ut,MM=SM,LM=Array.prototype,OM=n((function(t){var e=t.fill;return t===LM||xM(LM,t)&&e===LM.fill?MM:e})),IM={exports:{}},PM=a((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),RM=a,BM=et,UM=k,DM=PM,jM=Object.isExtensible,FM=RM((function(){jM(1)}))||DM?function(t){return!!BM(t)&&((!DM||"ArrayBuffer"!=UM(t))&&(!jM||jM(t)))}:jM,NM=!a((function(){return Object.isExtensible(Object.preventExtensions({}))})),HM=Ln,zM=y,VM=hi,qM=et,GM=Zt,YM=Qe.f,WM=Ki,KM=Ji,XM=FM,$M=NM,JM=!1,QM=ie("meta"),ZM=0,tL=function(t){YM(t,QM,{value:{objectID:"O"+ZM++,weakData:{}}})},eL=IM.exports={enable:function(){eL.enable=function(){},JM=!0;var t=WM.f,e=zM([].splice),n={};n[QM]=1,t(n).length&&(WM.f=function(n){for(var r=t(n),i=0,o=r.length;i<o;i++)if(r[i]===QM){e(r,i,1);break}return r},HM({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:KM.f}))},fastKey:function(t,e){if(!qM(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!GM(t,QM)){if(!XM(t))return"F";if(!e)return"E";tL(t)}return t[QM].objectID},getWeakData:function(t,e){if(!GM(t,QM)){if(!XM(t))return!0;if(!e)return!1;tL(t)}return t[QM].weakData},onFreeze:function(t){return $M&&JM&&XM(t)&&!GM(t,QM)&&tL(t),t}};VM[QM]=!0;var nL=IM.exports,rL=Ln,iL=o,oL=nL,aL=a,sL=mn,uL=Ed,lL=ev,cL=x,fL=et,hL=jo,pL=Qe.f,dL=ua.forEach,vL=L,gL=ta.set,yL=ta.getterFor,mL=Wi,bL=po,wL=zT,kL=Je,_L=ev,AL=Y,EL=Ed,TL=_l,CL=Al,SL=Qd,xL=L,ML=nL.fastKey,LL=ta.set,OL=ta.getterFor,IL={getConstructor:function(t,e,n,r){var i=t((function(t,i){_L(t,o),LL(t,{type:e,index:mL(null),first:void 0,last:void 0,size:0}),xL||(t.size=0),AL(i)||EL(i,t[r],{that:t,AS_ENTRIES:n})})),o=i.prototype,a=OL(e),s=function(t,e,n){var r,i,o=a(t),s=u(t,e);return s?s.value=n:(o.last=s={index:i=ML(e,!0),key:e,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=s),r&&(r.next=s),xL?o.size++:t.size++,"F"!==i&&(o.index[i]=s)),t},u=function(t,e){var n,r=a(t),i=ML(e);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==e)return n};return wL(o,{clear:function(){for(var t=a(this),e=t.index,n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete e[n.index],n=n.next;t.first=t.last=void 0,xL?t.size=0:this.size=0},delete:function(t){var e=this,n=a(e),r=u(e,t);if(r){var i=r.next,o=r.previous;delete n.index[r.index],r.removed=!0,o&&(o.next=i),i&&(i.previous=o),n.first==r&&(n.first=i),n.last==r&&(n.last=o),xL?n.size--:e.size--}return!!r},forEach:function(t){for(var e,n=a(this),r=kL(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!u(this,t)}}),wL(o,n?{get:function(t){var e=u(this,t);return e&&e.value},set:function(t,e){return s(this,0===t?0:t,e)}}:{add:function(t){return s(this,t=0===t?0:t,t)}}),xL&&bL(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(t,e,n){var r=e+" Iterator",i=OL(e),o=OL(r);TL(t,e,(function(t,e){LL(this,{type:r,target:t,state:i(t),kind:e,last:void 0})}),(function(){for(var t=o(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?CL("keys"==e?n.key:"values"==e?n.value:[n.key,n.value],!1):(t.target=void 0,CL(void 0,!0))}),n?"entries":"values",!n,!0),SL(e)}};(function(t,e,n){var r,i=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),a=i?"set":"add",s=iL[t],u=s&&s.prototype,l={};if(vL&&cL(s)&&(o||u.forEach&&!aL((function(){(new s).entries().next()})))){var c=(r=e((function(e,n){gL(lL(e,c),{type:t,collection:new s}),null!=n&&uL(n,e[a],{that:e,AS_ENTRIES:i})}))).prototype,f=yL(t);dL(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(t){var e="add"==t||"set"==t;!(t in u)||o&&"clear"==t||sL(c,t,(function(n,r){var i=f(this).collection;if(!e&&o&&!fL(n))return"get"==t&&void 0;var a=i[t](0===n?0:n,r);return e?this:a}))})),o||pL(c,"size",{configurable:!0,get:function(){return f(this).collection.size}})}else r=n.getConstructor(e,t,i,a),oL.enable();hL(r,t,!1,!0),l[t]=r,rL({global:!0,forced:!0},l),o||n.setStrong(r,t,i)})("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),IL);var PL=nt.Map,RL=Je,BL=P,UL=It,DL=Nf,jL=Y,FL=Ed,NL=[].push,HL=function(t){var e,n,r,i,o=arguments.length,a=o>1?arguments[1]:void 0;return DL(this),(e=void 0!==a)&&UL(a),jL(t)?new this:(n=[],e?(r=0,i=RL(a,o>2?arguments[2]:void 0),FL(t,(function(t){BL(NL,n,i(t,r++))}))):FL(t,NL,{that:n}),new this(n))};Ln({target:"Map",stat:!0,forced:!0},{from:HL});var zL=Is,VL=function(){return new this(zL(arguments))};Ln({target:"Map",stat:!0,forced:!0},{of:VL});var qL=xt,GL=function(t){if("object"==typeof t&&"size"in t&&"has"in t&&"get"in t&&"set"in t&&"delete"in t&&"entries"in t)return t;throw TypeError(qL(t)+" is not a map")},YL=function(t,e){return 1==e?function(e,n){return e[t](n)}:function(e,n,r){return e[t](n,r)}},WL=st("Map"),KL={Map:WL,set:YL("set",2),get:YL("get",1),has:YL("has",1),remove:YL("delete",1),proto:WL.prototype},XL=GL,$L=KL.remove;Ln({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=XL(this),n=!0,r=0,i=arguments.length;r<i;r++)t=$L(e,arguments[r]),n=n&&t;return!!n}});var JL=GL,QL=KL.get,ZL=KL.has,tO=KL.set;Ln({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(t,e){var n,r,i=JL(this);return ZL(i,t)?(n=QL(i,t),"update"in e&&(n=e.update(n,t,i),tO(i,t,n)),n):(r=e.insert(t,i),tO(i,t,r),r)}});var eO=P,nO=function(t,e,n){for(var r,i,o=n||t.next;!(r=eO(o,t)).done;)if(void 0!==(i=e(r.value)))return i},rO=function(t,e,n){return n?nO(t.entries(),(function(t){return e(t[1],t[0])})):t.forEach(e)},iO=Je,oO=GL,aO=rO;Ln({target:"Map",proto:!0,real:!0,forced:!0},{every:function(t){var e=oO(this),n=iO(t,arguments.length>1?arguments[1]:void 0);return!1!==aO(e,(function(t,r){if(!n(t,r,e))return!1}),!0)}});var sO=Je,uO=GL,lO=rO,cO=KL.Map,fO=KL.set;Ln({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(t){var e=uO(this),n=sO(t,arguments.length>1?arguments[1]:void 0),r=new cO;return lO(e,(function(t,i){n(t,i,e)&&fO(r,i,t)})),r}});var hO=Je,pO=GL,dO=rO;Ln({target:"Map",proto:!0,real:!0,forced:!0},{find:function(t){var e=pO(this),n=hO(t,arguments.length>1?arguments[1]:void 0),r=dO(e,(function(t,r){if(n(t,r,e))return{value:t}}),!0);return r&&r.value}});var vO=Je,gO=GL,yO=rO;Ln({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(t){var e=gO(this),n=vO(t,arguments.length>1?arguments[1]:void 0),r=yO(e,(function(t,r){if(n(t,r,e))return{key:r}}),!0);return r&&r.key}});var mO=Ln,bO=P,wO=x,kO=It,_O=Ed,AO=KL.Map,EO=y([].push);mO({target:"Map",stat:!0,forced:!0},{groupBy:function(t,e){var n=new(wO(this)?this:AO);kO(e);var r=kO(n.has),i=kO(n.get),o=kO(n.set);return _O(t,(function(t){var a=e(t);bO(r,n,a)?EO(bO(i,n,a),t):bO(o,n,a,[t])})),n}});var TO=function(t,e){return t===e||t!=t&&e!=e},CO=GL,SO=rO;Ln({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(t){return!0===SO(CO(this),(function(e){if(TO(e,t))return!0}),!0)}});var xO=P,MO=Ed,LO=x,OO=It,IO=KL.Map;Ln({target:"Map",stat:!0,forced:!0},{keyBy:function(t,e){var n=new(LO(this)?this:IO);OO(e);var r=OO(n.set);return MO(t,(function(t){xO(r,n,e(t),t)})),n}});var PO=GL,RO=rO;Ln({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(t){var e=RO(PO(this),(function(e,n){if(e===t)return{key:n}}),!0);return e&&e.key}});var BO=Je,UO=GL,DO=rO,jO=KL.Map,FO=KL.set;Ln({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(t){var e=UO(this),n=BO(t,arguments.length>1?arguments[1]:void 0),r=new jO;return DO(e,(function(t,i){FO(r,n(t,i,e),t)})),r}});var NO=Je,HO=GL,zO=rO,VO=KL.Map,qO=KL.set;Ln({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(t){var e=HO(this),n=NO(t,arguments.length>1?arguments[1]:void 0),r=new VO;return zO(e,(function(t,i){qO(r,i,n(t,i,e))})),r}});var GO=GL,YO=Ed,WO=KL.set;Ln({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(t){for(var e=GO(this),n=arguments.length,r=0;r<n;)YO(arguments[r++],(function(t,n){WO(e,t,n)}),{AS_ENTRIES:!0});return e}});var KO=It,XO=GL,$O=rO,JO=TypeError;Ln({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(t){var e=XO(this),n=arguments.length<2,r=n?void 0:arguments[1];if(KO(t),$O(e,(function(i,o){n?(n=!1,r=i):r=t(r,i,o,e)})),n)throw JO("Reduce of empty map with no initial value");return r}});var QO=Je,ZO=GL,tI=rO;Ln({target:"Map",proto:!0,real:!0,forced:!0},{some:function(t){var e=ZO(this),n=QO(t,arguments.length>1?arguments[1]:void 0);return!0===tI(e,(function(t,r){if(n(t,r,e))return!0}),!0)}});var eI=It,nI=GL,rI=TypeError,iI=KL.get,oI=KL.has,aI=KL.set;Ln({target:"Map",proto:!0,real:!0,forced:!0},{update:function(t,e){var n=nI(this),r=arguments.length;eI(e);var i=oI(n,t);if(!i&&r<3)throw rI("Updating absent value");var o=i?iI(n,t):eI(r>2?arguments[2]:void 0)(t,n);return aI(n,t,e(o,t,n)),n}});var sI=P,uI=It,lI=x,cI=rn,fI=TypeError,hI=function(t,e){var n,r=cI(this),i=uI(r.get),o=uI(r.has),a=uI(r.set),s=arguments.length>2?arguments[2]:void 0;if(!lI(e)&&!lI(s))throw fI("At least one callback required");return sI(o,r,t)?(n=sI(i,r,t),lI(e)&&(n=e(n),sI(a,r,t,n))):lI(s)&&(n=s(),sI(a,r,t,n)),n};Ln({target:"Map",proto:!0,real:!0,forced:!0},{upsert:hI}),Ln({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:hI});var pI=n(PL);function dI(t){return(dI="function"==typeof Ih&&"symbol"==typeof rb?function(t){return typeof t}:function(t){return t&&"function"==typeof Ih&&t.constructor===Ih&&t!==Ih.prototype?"symbol":typeof t})(t)}function vI(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Mp(t,gI(r.key),r)}}function gI(t){var e=function(t,e){if("object"!==Lc(t)||null===t)return t;var n=t[xb];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Lc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Lc(e)?e:String(e)}var yI=It,mI=$t,bI=G,wI=Kn,kI=TypeError,_I=function(t){return function(e,n,r,i){yI(n);var o=mI(e),a=bI(o),s=wI(o),u=t?s-1:0,l=t?-1:1;if(r<2)for(;;){if(u in a){i=a[u],u+=l;break}if(u+=l,t?u<0:s<=u)throw kI("Reduce of empty array with no initial value")}for(;t?u>=0:s>u;u+=l)u in a&&(i=n(i,a[u],u,o));return i}},AI={left:_I(!1),right:_I(!0)}.left;Ln({target:"Array",proto:!0,forced:!Wd&>>79&><83||!tp("reduce")},{reduce:function(t){var e=arguments.length;return AI(this,t,e,e>1?arguments[1]:void 0)}});var EI,TI,CI,SI=af("Array").reduce,xI=ut,MI=SI,LI=Array.prototype,OI=n((function(t){var e=t.reduce;return t===LI||xI(LI,t)&&e===LI.reduce?MI:e})),II=1,PI=2,RI=3,BI=4,UI=["Boolean","Number","String","Undefined","Null","Date","Object"],DI=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.name=e||"",this._prefix="[".concat(this.name,"]"),this.logCacheLevel=(null==n?void 0:n.logCacheLevel)||3,this.logMaxSize=(null==n?void 0:n.logMaxSize)||204800,this.logSize=0,this.logTextArray=[]}var e,n,r;return e=t,n=[{key:"debug",value:function(){for(var e,n,r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,lh(e=[II]).call(e,o)),t.disabled||(r=console).debug.apply(r,lh(n=[this._prefix,jI()]).call(n,o))}},{key:"log",value:function(){for(var e,n,r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,lh(e=[PI]).call(e,o)),t.disabled||(r=console).log.apply(r,lh(n=[this._prefix,jI()]).call(n,o))}},{key:"warn",value:function(){for(var e,n,r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,lh(e=[RI]).call(e,o)),t.disabled||(r=console).warn.apply(r,lh(n=[this._prefix,jI()]).call(n,o))}},{key:"error",value:function(){for(var e,n,r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,lh(e=[BI]).call(e,o)),t.disabled||(r=console).error.apply(r,lh(n=[this._prefix,jI()]).call(n,o))}},{key:"logCache",value:function(t){if(!(t<this.logCacheLevel)){var e="";try{for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=hk(r).call(r,(function(t){return NI(t)}));e=this._prefix+jI()+Oh(o)}catch(s){return}if(t>=this.logCacheLevel&&(this.logSize+=e.length,this.logTextArray.push(e)),this.logSize>this.logMaxSize){var a=this.logTextArray.shift();this.logSize-=a.length}}}},{key:"getLogCache",value:function(){var t=this.logTextArray.join("\n");return this.reset(),t}},{key:"reset",value:function(){this.logTextArray=[],this.logSize=0}},{key:"table",value:function(){var e;t.disabled||(console.group(this._prefix),(e=console).table.apply(e,arguments),console.groupEnd())}},{key:"setLogLevel",value:function(t){this.logCacheLevel=t}}],r=[{key:"enable",value:function(){t.disabled=!1}},{key:"disable",value:function(){t.disabled=!0}}],n&&vI(e.prototype,n),r&&vI(e,r),Mp(e,"prototype",{writable:!1}),t}();function jI(){return(new Date).toLocaleString()}function FI(t){var e;if("object"!==dI(t))return t;var n=nb(e=Object.prototype.toString.call(t)).call(e,8,-1);switch(n){case"Array":case"Uint8Array":case"ArrayBuffer":return n+"["+t.length+"]";case"Object":return"{}";default:return n}}function NI(t,e,n){var r;n||(n=1),e||(e=2);var i={};if(!t||"object"!==dI(t))return t;var o=nb(r=Object.prototype.toString.call(t)).call(r,8,-1);if(!_M(UI).call(UI,o))return o;if(!(n>e)){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(n===e?i[a]=FI(t[a]):"object"===dI(t[a])?i[a]=NI(t[a],e,n+1):i[a]=t[a]);return i}}EI=DI,CI=!0,(TI=gI(TI="disabled"))in EI?Mp(EI,TI,{value:CI,enumerable:!0,configurable:!0,writable:!0}):EI[TI]=CI;var HI=new Blob([new Uint8Array([255,227,24,196,0,0,0,3,72,1,64,0,0,4,132,16,31,227,192,225,76,255,67,12,255,221,27,255,228,97,73,63,255,195,131,69,192,232,223,255,255,207,102,239,255,255,255,101,158,206,70,20,59,255,254,95,70,149,66,4,16,128,0,2,2,32,240,138,255,36,106,183,255,227,24,196,59,11,34,62,80,49,135,40,0,253,29,191,209,200,141,71,7,255,252,152,74,15,130,33,185,6,63,255,252,195,70,203,86,53,15,255,255,247,103,76,121,64,32,47,255,34,227,194,209,138,76,65,77,69,51,46,57,55,170,170,170,170,170,170,170,170,170,170,255,227,24,196,73,13,153,210,100,81,135,56,0,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170])],{type:"audio/mpeg"}),zI=new Blob([new Uint8Array([0,0,0,28,102,116,121,112,105,115,111,109,0,0,2,0,105,115,111,109,105,115,111,50,109,112,52,49,0,0,0,8,102,114,101,101,0,0,2,239,109,100,97,116,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,0,0,2,194,109,111,111,118,0,0,0,108,109,118,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,232,0,0,0,47,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,1,236,116,114,97,107,0,0,0,92,116,107,104,100,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,47,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,101,100,116,115,0,0,0,28,101,108,115,116,0,0,0,0,0,0,0,1,0,0,0,47,0,0,0,0,0,1,0,0,0,0,1,100,109,100,105,97,0,0,0,32,109,100,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,68,0,0,8,0,85,196,0,0,0,0,0,45,104,100,108,114,0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0,0,0,1,15,109,105,110,102,0,0,0,16,115,109,104,100,0,0,0,0,0,0,0,0,0,0,0,36,100,105,110,102,0,0,0,28,100,114,101,102,0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1,0,0,0,211,115,116,98,108,0,0,0,103,115,116,115,100,0,0,0,0,0,0,0,1,0,0,0,87,109,112,52,97,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,16,0,0,0,0,172,68,0,0,0,0,0,51,101,115,100,115,0,0,0,0,3,128,128,128,34,0,2,0,4,128,128,128,20,64,21,0,0,0,0,1,244,0,0,1,243,249,5,128,128,128,2,18,16,6,128,128,128,1,2,0,0,0,24,115,116,116,115,0,0,0,0,0,0,0,1,0,0,0,2,0,0,4,0,0,0,0,28,115,116,115,99,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,28,115,116,115,122,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,115,0,0,1,116,0,0,0,20,115,116,99,111,0,0,0,0,0,0,0,1,0,0,0,44,0,0,0,98,117,100,116,97,0,0,0,90,109,101,116,97,0,0,0,0,0,0,0,33,104,100,108,114,0,0,0,0,0,0,0,0,109,100,105,114,97,112,112,108,0,0,0,0,0,0,0,0,0,0,0,0,45,105,108,115,116,0,0,0,37,169,116,111,111,0,0,0,29,100,97,116,97,0,0,0,1,0,0,0,0,76,97,118,102,53,54,46,52,48,46,49,48,49])],{type:"video/mp4"});function VI(t){return Sk({muted:!1,timeout:250,inline:!1},t)}function qI(t,e){var n=t.muted,r=t.timeout,i=t.inline,o=e(),a=o.element,s=o.source,u=void 0,l=void 0,c=void 0;return a.muted=n,!0===n&&a.setAttribute("muted","muted"),!0===i&&a.setAttribute("playsinline","playsinline"),a.src=s,new Cm((function(t){u=a.play(),l=D_((function(){c(!1,new Error("Timeout "+r+" ms has been reached"))}),r),c=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;a.remove(),a.srcObject=null,clearTimeout(l),t({result:e,error:n})},void 0!==u?u.then((function(){return c(!0)})).catch((function(t){return c(!1,t)})):c(!0)}))}var GI={audio:function(t){return qI(t=VI(t),(function(){return{element:document.createElement("audio"),source:Xx.createObjectURL(HI)}}))},video:function(t){return qI(t=VI(t),(function(){return{element:document.createElement("video"),source:Xx.createObjectURL(zI)}}))}},YI=new DI("AdsPluginBaseAdManager"),WI=function(t){Fb(n,t);var e=Vb(n);function n(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Bb(this,n),(t=e.call(this)).options=r,t.config=r.config||{},t.plugin=r.plugin,t.player=r.plugin.player,t.mediaElement=t.player.media||t.player.video,t.isLinearAdRunning=!1,t._shouldBlockVideoContent=!1,t._isAdPaused=!0,t._isMediaEnded=!1,t.context={currentTime:0,duration:0},t}return Db(n,[{key:"currentTime",get:function(){return this.context.currentTime}},{key:"duration",get:function(){return this.context.duration}},{key:"paused",get:function(){return this._isAdPaused}},{key:"shouldBlockVideoContent",get:function(){return this.isLinearAdRunning||this._shouldBlockVideoContent},set:function(t){this._shouldBlockVideoContent=t}},{key:"updateConfig",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t?this.config=Lb(Lb({},this.config),t):YI.warn("config is empty")}},{key:"isFullScreen",value:function(){return!!this.player.fullscreen}},{key:"destroy",value:function(){this.removeAllListeners()}},{key:"tryContentPlay",value:function(){var t=this.player,e=t.play();void 0!==e&&e&&e.then?e.then((function(){YI.log("content play"),t.removeClass(qE),t.addClass(jE),t.state<GE&&(t.setState(GE),t.emit(dE))})).catch((function(e){if(YI.error("content play error",e),t.media&&t.media.error)return t.onError(),void t.removeClass(UE)})):t.state<GE&&(t.setState(GE),t.removeClass(qE),t.removeClass(VE),t.removeClass(UE),t.addClass(jE),t.emit(dE))}}]),n}(Gk.EventEmitter),KI=new DI("AdsPluginImaAdManager"),XI="xgplayer-ads-playing",$I=function(t){Fb(o,t);var e,n,r,i=Vb(o);function o(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Bb(this,o),jb(zb(t=i.call(this,e)),"_onMediaEnded",(function(){var e;t.isLinearAdRunning||(t._isMediaEnded=!0,null===(e=t.adsLoader)||void 0===e||e.contentComplete())})),jb(zb(t),"_onMediaResize",(function(){var e,n=zb(t).player,r=t.isFullScreen()?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL;null===(e=t.adsManager)||void 0===e||e.resize(n.sizeInfo.width,n.sizeInfo.height,r)})),jb(zb(t),"_onMediaPlay",(function(){t._mediaPlayed=!0})),jb(zb(t),"_onMediaPause",(function(){t._mediaPlayed=!1})),jb(zb(t),"_onMediaVolumeChange",(function(){var e;null===(e=t.adsManager)||void 0===e||e.setVolume(t.player.muted?0:t.player.volume)})),jb(zb(t),"_onAdsManagerLoaded",(function(e){var n=new google.ima.AdsRenderingSettings;n.restoreCustomPlaybackStateOnAdBreakComplete=!0,n.enablePreloading=!0;var r=t.adsManager=e.getAdsManager(t.mediaElement,n);KI.log("AdManager Loaded",r);var i=r.getCuePoints();i.length&&KI.log("cuePoints",i),t._initAdsManagerEventListeners(),t.player.emit(kh,{adsManager:r})})),jb(zb(t),"_onAdsManagerAdError",(function(e){t._handleAdError(e.getError()),t._resumeContent()})),jb(zb(t),"_onAdsLoaderAdError",(function(e){t._handleAdError(e.getError())})),jb(zb(t),"_handleAdError",(function(e){var n,r,i;KI.log("AdError",e),t.shouldBlockVideoContent=!1,t.isLinearAdRunning=!1,null===(n=t.adsManager)||void 0===n||n.destroy(),null===(r=t.plugin)||void 0===r||r.emit(Ah,e),null===(i=t.plugin)||void 0===i||i.emit(vh,e)})),jb(zb(t),"onAdEvent",(function(e){var n,r=zb(t).player,i=null==e?void 0:e.getAd(),o=(null==e?void 0:e.getAdData())||(null==i?void 0:i.data),a=!1;switch(null==e?void 0:e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:t.player.emit("ima_ad_break_ready",{ad:i});break;case google.ima.AdEvent.Type.LOADED:var s=(o||{}).adPodInfo,u=0===(null==s?void 0:s.podIndex);a=!0,u&&(i.isLinear()?t.shouldBlockVideoContent=!0:(t.shouldBlockVideoContent=!1,t.tryContentPlay())),t.emit(Eh,{ad:i,isPreroll:u}),t.plugin.emit(Eh,{ad:i,isPreroll:u});break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:t._resumeContent(),t.emit(Ch,{ad:i});break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:t.isLinearAdRunning=!0,t.shouldBlockVideoContent=!0,eE.addClass(t.player.root,XI),null==r||r.pause(),t.emit(Th,{ad:i});break;case google.ima.AdEvent.Type.STARTED:t.plugin.emit(ch,{ad:i}),i.isLinear()&&(t._isAdPaused=!1,t.plugin.emit(fh,{ad:i}),n=U_((function(){}),300));break;case google.ima.AdEvent.Type.RESUMED:t._isAdPaused=!1,t.plugin.emit(fh,{ad:i});break;case google.ima.AdEvent.Type.PAUSED:t._isAdPaused=!0,t.plugin.emit(hh,{ad:i});break;case google.ima.AdEvent.Type.SKIPPED:t.plugin.emit(dh,{ad:i});break;case google.ima.AdEvent.Type.AD_PROGRESS:var l=e.getAdData(),c=l.currentTime,f=l.duration;Sk(t.context,{currentTime:c,duration:f}),t.plugin.emit(ph,{ad:i});break;case google.ima.AdEvent.Type.COMPLETE:var h=(o||{}).adPodInfo,p=!1;null!=i&&i.isLinear()&&(h&&(p=h.adPosition<h.totalAds),clearInterval(n)),t.plugin.emit(_h,{ad:i,hasNextInPod:p}),t.plugin.emit(gh,{ad:i,hasNextInPod:p});break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:null!=i&&i.isLinear()&&clearInterval(n),t.plugin.emit("ima_all_ads_completed",{ad:i}),t.player.emit(yh,{ad:i});break;default:null!=i&&i.isLinear()&&clearInterval(n)}KI.log("AdEvent",null==e?void 0:e.type,a?Oh((null==e?void 0:e.getAdData())||{}):null==e?void 0:e.getAd())})),t.displayContainer=null,t.adsLoader=null,t.adsManager=null,t}return Db(o,[{key:"init",value:(r=Rb(Ob().mark((function t(){return Ob().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.shouldBlockVideoContent=!!(this.config.adTagUrl||this.config.adsResponse||this.config.adsRequest),t.prev=1,this.emit(mh),t.next=5,this._loadIMASdk();case 5:this.emit(bh),t.next=14;break;case 8:return t.prev=8,t.t0=t.catch(1),KI.error("google.ima sdk is not loaded, due to error",(null===t.t0||void 0===t.t0?void 0:t.t0.message)||t.t0),this.emit(wh),this.shouldBlockVideoContent=!1,t.abrupt("return");case 14:this._initConfig(),this._initMediaEvents(),this._initContainer(),this._initLoader(),this._initAdsRequest();case 19:case"end":return t.stop()}}),t,this,[[1,8]])}))),function(){return r.apply(this,arguments)})},{key:"destroy",value:function(){qb(Nb(o.prototype),"destroy",this).call(this),this.reset(),this._removeMediaEvents(),this._destroyLoader()}},{key:"_initConfig",value:function(){var t=this.config.locale;t&&google.ima.settings.setLocale(t)}},{key:"_loadIMASdk",value:function(){var t=this;return new Cm((function(e,n){if("undefined"!=typeof google&&google.ima)e();else{var r=document.createElement("script"),i=D_((function(){n(new Error("google.ima sdk load timeout"))}),t.config.loadSdkTimeout||3e3);r.src="https://imasdk.googleapis.com/js/sdkloader/ima3".concat(t.config.debug?"_debug":"",".js"),r.onload=function(){clearTimeout(i),e()},r.onerror=function(t){clearTimeout(i),n(null==t?void 0:t.message)},document.head.appendChild(r)}}))}},{key:"_initMediaEvents",value:function(){var t=this.player;t.on(vE,this._onMediaResize),t.on(sE,this._onMediaEnded),t.on(aE,this._onMediaPlay),t.on(uE,this._onMediaPause),t.on(hE,this._onMediaVolumeChange)}},{key:"_removeMediaEvents",value:function(){var t=this.player;t.off(vE,this._onMediaResize),t.off(sE,this._onMediaEnded),t.off(aE,this._onMediaPlay),t.off(uE,this._onMediaPause),t.off(hE,this._onMediaVolumeChange)}},{key:"_initContainer",value:function(){var t=this.options.displayContainer;this.displayContainer=new google.ima.AdDisplayContainer(t,this.mediaElement)}},{key:"_initLoader",value:function(){var t=this.adsLoader=new google.ima.AdsLoader(this.displayContainer);t.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this._onAdsManagerLoaded,!1),t.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdsLoaderAdError,!1),this.player.emit("ima_ad_loader_ready",{adsLoader:t})}},{key:"_destroyLoader",value:function(){var t=this.adsLoader;t||(t.removeEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this._onAdsManagerLoaded,!1),t.removeEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdsLoaderAdError,!1))}},{key:"_initAdsRequest",value:(n=Rb(Ob().mark((function t(){var e,n,r,i,o=this;return Ob().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.config,n=e.adsRequest,r=e.adsResponse,i=e.adTagUrl,!(n||r||i)){t.next=9;break}return t.next=4,this._checkAutoplaySupport();case 4:this.requestAds(),this.player.once(kh,(function(){o.autoplayAllowed?o.playAds():o.player.useHooks("play",(function t(){return o.playAds(),o.player.removeHooks("play",t),!1})),o.emit(Sh)})),this.player.once(Ah,(function(){o.emit(Sh)})),t.next=10;break;case 9:this.emit(Sh);case 10:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"playAds",value:function(){try{this._onMediaVolumeChange(),this.displayContainerInitialized||(this.displayContainer.initialize(),this.displayContainerInitialized=!0);var t=this.player,e=this.isFullScreen()?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL;this.adsManager.init(t.sizeInfo.width,t.sizeInfo.height,e),this.adsManager.start()}catch(n){this._handleAdError(n),this._resumeContent()}}},{key:"_initAdsManagerEventListeners",value:function(){var t=this,e=this.adsManager;e.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdsManagerAdError);var n=["LOADED","STARTED","RESUMED","PAUSED","COMPLETE","ALL_ADS_COMPLETED","CONTENT_PAUSE_REQUESTED","CONTENT_RESUME_REQUESTED","VOLUME_CHANGED","VOLUME_MUTED","AD_METADATA","AD_CAN_PLAY","AD_PROGRESS","AD_BUFFERING","CLICK","VIDEO_CLICKED","VIDEO_ICON_CLICKED","FIRST_QUARTILE","MIDPOINT","THIRD_QUARTILE","SKIPPED","USER_CLOSE","AD_BREAK_READY","AD_BREAK_FETCH_ERROR"];cp(n).call(n,(function(n){e.addEventListener(google.ima.AdEvent.Type[n],t.onAdEvent)}))}},{key:"_resumeContent",value:function(){var t;(this.isLinearAdRunning=!1,this.shouldBlockVideoContent=!1,eE.removeClass(this.player.root,XI),this._isMediaEnded)||(null===(t=this.player)||void 0===t||t.play())}},{key:"reset",value:function(){var t,e;this.isLinearAdRunning=!1,null===(t=this.adsManager)||void 0===t||t.destroy(),this.adsManager=null,null===(e=this.adsLoader)||void 0===e||e.contentComplete(),eE.removeClass(this.player.root,XI)}},{key:"requestAds",value:function(){var t,e=this.config,n=e.adsRequest,r=e.adsResponse,i=e.adTagUrl,o=this.player,a=new google.ima.AdsRequest;if(a.linearAdSlotWidth=o.sizeInfo.width,a.linearAdSlotHeight=o.sizeInfo.height,a.nonLinearAdSlotWidth=o.sizeInfo.width,a.nonLinearAdSlotHeight=o.sizeInfo.height,a.setAdWillAutoPlay(this.autoplayAllowed),a.setAdWillPlayMuted(this.autoplayRequiresMuted),i)a.adTagUrl=i;else if(r)a.adsResponse=r;else if(n&&"object"===Ib(n)){var s;cp(s=qh(n)).call(s,(function(t){a[t]=n[t]}))}KI.log("requestAds",Oh(a)),null===(t=this.adsLoader)||void 0===t||t.requestAds(a)}},{key:"pause",value:function(){var t;return null===(t=this.adsManager)||void 0===t?void 0:t.pause()}},{key:"play",value:function(){var t;return null===(t=this.adsManager)||void 0===t?void 0:t.resume()}},{key:"skip",value:function(){var t;return null===(t=this.adsManager)||void 0===t?void 0:t.skip()}},{key:"updateConfig",value:function(t){qb(Nb(o.prototype),"updateConfig",this).call(this,t),this._initConfig()}},{key:"_checkAutoplaySupport",value:(e=Rb(Ob().mark((function t(){var e,n,r,i,o;return Ob().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.player.config.autoplay,t.next=4,Cm.all([e?GI.video({timeout:800}).then((function(t){return t.result})):Cm.resolve(!1),e&&this.player.config.autoplayMuted?GI.video({timeout:800,muted:!0}).then((function(t){return t.result})):Cm.resolve(!1)]);case 4:n=t.sent,r=Gb(n,2),i=r[0],o=r[1],this.autoplayAllowed=i||o,this.autoplayRequiresMuted=!i&&o,KI.log("checkAutoplaySupport",this.autoplayAllowed,this.autoplayRequiresMuted);case 11:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})}]),o}(WI),JI="xgplayer-ad-start",QI="xgplayer-ad-show-ui",ZI=function(t){Fb(n,t);var e=Vb(n);function n(){var t,r;Bb(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return jb(zb(r=e.call.apply(e,lh(t=[this]).call(t,o))),"btnClick",(function(t){t.preventDefault(),t.stopPropagation();var e=r.getAdPlugin();return e.paused?(e.play(),r.animate(!1)):(e.pause(),r.animate(!0)),!1})),r}return Db(n,[{key:"getAdPlugin",value:function(){return this.player.getPlugin("ad")}},{key:"listenEvents",value:function(){var t=this;this.on([hh],(function(){t.animate(!0)})),this.on(fh,(function(){t.animate(!1)}))}}],[{key:"pluginName",get:function(){return"adPlay"}}]),n}(lT),tP=function(t){Fb(n,t);var e=Vb(n);function n(){return Bb(this,n),e.apply(this,arguments)}return Db(n,[{key:"getAdPlugin",value:function(){return this.player.getPlugin("ad")}},{key:"duration",get:function(){var t=this.getAdPlugin();return(null==t?void 0:t.duration)||0}},{key:"offsetDuration",get:function(){return this.duration}},{key:"timeOffset",get:function(){return 0}},{key:"currentTime",get:function(){var t=this.getAdPlugin();return(null==t?void 0:t.currentTime)||0}},{key:"afterCreate",value:function(){Sk(this.config,{isCloseClickSeek:!0,isDraggingSeek:!0,closeMoveSeek:!0}),qb(Nb(n.prototype),"afterCreate",this).call(this)}},{key:"listenEvents",value:function(){var t=this;this.on(ph,(function(){t.onTimeupdate()}))}}],[{key:"pluginName",get:function(){return"adProgress"}}]),n}(sT),eP=function(t){Fb(n,t);var e=Vb(n);function n(){return Bb(this,n),e.apply(this,arguments)}return Db(n,[{key:"getAdPlugin",value:function(){return this.player.getPlugin("ad")}},{key:"duration",get:function(){var t=this.getAdPlugin();return(null==t?void 0:t.duration)||0}},{key:"currentTime",get:function(){var t=this.getAdPlugin();return(null==t?void 0:t.currentTime)||0}},{key:"listenEvents",value:function(){var t=this;this.on([ph],(function(e){t.onTimeUpdate()}))}}],[{key:"pluginName",get:function(){return"adTime"}}]),n}(vT),nP=function(){function t(e,n){Bb(this,t);var r=n.player,i=n.plugin;this.player=r,this.config=e,this.adPlugin=i,this.adUIPlugins=[],this.fragment=document.createDocumentFragment(),this.controlsPos=null,this.decoratedAdPluginList=[[lT,ZI],[vT,eP],[sT,tP],[bT,null],[Qx,null],[dT,null]],this.init(),this.initEvents()}return Db(t,[{key:"init",value:function(){var t=this.player,e=this.adUIPlugins,n=this.fragment,r=this.decoratedAdPluginList;cp(r).call(r,(function(r){var i=Gb(r,2),o=i[0],a=i[1],s=t.getPlugin(o.pluginName);if(s){var u=null;a&&!t.getPlugin(a.pluginName)&&(t.registerPlugin(a),u=t.getPlugin(a.pluginName),n.appendChild(u.root)),e.push([s,u])}}))}},{key:"destroy",value:function(){this.fragment=null,this.adUIPlugins=[],this.decoratedAdPluginList=[],this.adPlugin=null,this.player=null}},{key:"initEvents",value:function(){var t=this,e=this.adPlugin,n=this.player;e.on(fh,(function(){var t=[VE,DE,FE,HE,zE,NE];cp(t).call(t,(function(t){n.removeClass(t)}))})),e.on(ch,(function(){t.showAdContainer()})),e.on(gh,(function(e){e.hasNextInPod||t.hideAdContainer()})),e.on(dh,(function(){t.hideAdContainer()})),e.on(vh,(function(){t.hideAdContainer()}))}},{key:"showAdContainer",value:function(){var t=this.player;eE.hasClass(t.root,JI)||eE.addClass(t.root,JI)}},{key:"hideAdContainer",value:function(){var t=this.player;eE.hasClass(t.root,JI)&&eE.removeClass(t.root,JI)}},{key:"showAdUI",value:function(){var t,e=this.player,n=this.config,r=this.adUIPlugins,i=this.fragment;cp(r).call(r,(function(t){var e=Gb(t,2),n=e[0],r=e[1];if(r){var o=r.root,a=n.root;i.contains(o)&&i.removeChild(o),a.parentNode.insertBefore(o,a),i.appendChild(a)}}));var o=this._getNonAdPlugin();cp(t=Jh(o).call(o,(function(t){return!!t.root}))).call(t,(function(t){var e=t.root;t.__adStub__||(t.__adStub__=eE.createDom("xg-ad-stub","",{})),e.parentNode.insertBefore(t.__adStub__,e),i.appendChild(e)}));var a=e.getPlugin("start");a&&a.hide(),!1===n.controls&&e.controls&&this.hideControls(),this.showAdContainer(),e.addClass(QI)}},{key:"hideAdUI",value:function(){var t,e,n=this.player,r=this.config,i=this.adUIPlugins,o=this.fragment;cp(i).call(i,(function(t){var e=Gb(t,2),n=e[0],r=e[1];if(r){var i=r.root,a=n.root;o.contains(a)&&o.removeChild(a),o.contains(i)||(i.parentNode.insertBefore(a,i),o.appendChild(i))}}));var a=this._getNonAdPlugin();cp(t=Jh(a).call(a,(function(t){return!!t.root}))).call(t,(function(t){var e,n,r=t.root;o.contains(r)&&o.removeChild(r),null===(e=t.__adStub__)||void 0===e||null===(n=e.parentNode)||void 0===n||n.insertBefore(r,t.__adStub__)})),!1===r.controls&&o.contains(null===(e=n.controls)||void 0===e?void 0:e.root)&&this.showControls();var s=n.getPlugin("start");if(s){var u=s.config.disableAnimate,l=s.config.isShowPause;u||(s.config.disableAnimate=!0,s.config.isShowPause=!1),n.once("play",(function(){D_((function(){s.config.disableAnimate=u,s.config.disableAnimate=l}),10)}))}n.removeClass(QI)}},{key:"hideControls",value:function(){var t=this.player,e=this.config,n=this.fragment;if(!1===e.controls&&t.controls){var r=t.controls.root,i=r.parentElement,o=r.previousSibling,a=r.nextSibling;this.controlsPos={parentNode:i,previousSibling:o,nextSibling:a},n.appendChild(t.controls.root)}}},{key:"showControls",value:function(){var t=this.player,e=this.config,n=this.fragment;if(!1===e.controls&&t.controls){if(!this.controlsPos)return;var r=t.controls.root;n.contains(r)&&n.removeChild(r);var i=this.controlsPos,o=i.parentNode,a=i.previousSibling,s=i.nextSibling;o&&(s?o.insertBefore(r,s):a?o.insertBefore(r,a.nextSibling):o.appendChild(r)),this.controlsPos=null}}},{key:"_getNonAdPlugin",value:function(){var t,e=this.player,n=this.decoratedAdPluginList,r=[];cp(n).call(n,(function(t){var e=Gb(t,2),n=e[0],i=e[1];r.push(n.pluginName.toLowerCase()),i&&r.push(i.pluginName.toLowerCase())}));var i=(null===(t=e.controls)||void 0===t?void 0:t.plugins())||[];return Jh(i).call(i,(function(t){return-1===rw(r).call(r,t.pluginName.toLowerCase())}))}}]),t}(),rP=new DI("AdsPlugin"),iP=function(t){Fb(n,t);var e=Vb(n);function n(){return Bb(this,n),e.apply(this,arguments)}return Db(n,[{key:"version",get:function(){return"3.0.20-alpha.8"}},{key:"paused",get:function(){var t,e;return!(null===(t=this.csManager)||void 0===t||!t.isLinearAdRunning||null===(e=this.csManager)||void 0===e||!e.paused)}},{key:"currentTime",get:function(){var t;return(null===(t=this.csManager)||void 0===t?void 0:t.currentTime)||0}},{key:"duration",get:function(){var t;return(null===(t=this.csManager)||void 0===t?void 0:t.duration)||0}},{key:"afterCreate",value:function(){var t=this.config;rP.log("plugin afterCreate, config: ".concat(Oh(t||{}))),this.csManager=void 0,this._blockContentPlay()}},{key:"beforePlayerInit",value:function(){var t,e,n;switch(rP.log("plugin beforePlayerInit"),this.initPromise=((n=new Cm((function(n,r){t=n,e=r}))).used=!1,n.resolve=function(){return n.used=!0,t.apply(void 0,arguments)},n.reject=function(){return n.used=!0,e.apply(void 0,arguments)},n),this.uiManager=new nP(this.config,{plugin:this,player:this.player}),this.config.adType){case"ima":case"google-ima":this._initClientSideAd()}return this.initPromise}},{key:"render",value:function(){return eE.createDom("xg-ad","",{},"xgplayer-ads")}},{key:"_initClientSideAd",value:function(){switch(this.config.adType){case"ima":case"google-ima":this._initImaAd()}}},{key:"_initImaAd",value:function(){var t=this;this.csManager=new $I({plugin:this,config:this.config.ima,displayContainer:this.root}),this.csManager.once(mh,(function(){t.uiManager.showAdContainer()})),this.csManager.on(wh,(function(){t.uiManager.hideAdContainer()})),this.csManager.once(Eh,(function(e){e.isPreroll||t.uiManager.hideAdContainer()})),this.csManager.once(Sh,(function(){var e;null===(e=t.initPromise)||void 0===e||e.resolve()})),this.csManager.on(Th,(function(){t.uiManager.showAdUI()})),this.csManager.on(Ch,(function(){t.uiManager.hideAdUI()})),this.csManager.init()}},{key:"requestAds",value:function(){var t;null===(t=this.csManager)||void 0===t||t.requestAds()}},{key:"playAds",value:function(){var t;null===(t=this.csManager)||void 0===t||t.playAds()}},{key:"pause",value:function(){var t;null===(t=this.csManager)||void 0===t||t.pause()}},{key:"play",value:function(){var t;null===(t=this.csManager)||void 0===t||t.play()}},{key:"destroy",value:function(){var t,e;this.offAll(),null===(t=this.csManager)||void 0===t||t.destroy(),null===(e=this.uiManager)||void 0===e||e.destroy()}},{key:"reset",value:function(){var t;null===(t=this.csManager)||void 0===t||t.reset()}},{key:"updateConfig",value:function(t){var e;null===(e=this.csManager)||void 0===e||e.updateConfig(t)}},{key:"_blockContentPlay",value:function(){var t=this,e=this.player;e.on("play",(function(){var n;null!==(n=t.csManager)&&void 0!==n&&n.shouldBlockVideoContent&&(rP.log("block content play"),e.pause())}))}}],[{key:"pluginName",get:function(){return"ad"}}]),n}(BE);function oP(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function aP(t,e){var n=void 0!==cc&&Nh(t)||t["@@iterator"];if(!n){if(ub(t)||(n=function(t,e){var n;if(t){if("string"==typeof t)return oP(t,e);var r=eb(n=Object.prototype.toString.call(t)).call(n,8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Cb(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?oP(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}var sP={},uP={},lP={};!function(t){Mp(t,"__esModule",{value:!0}),t.shiftThirtyTwoBits=t.THIRTY_TWO_BIT_MULTIPLIER=t.bytesToUUID=void 0;t.bytesToUUID=function(t){if(16!==t.length)throw new Error("scte35-js Uint8Array uuid bad size: ".concat(t.length));return hk([]).call(t,(function(t,e){var n=(t<=15?"0":"")+t.toString(16);return e>=4&&e<=10&&e%2==0?"-"+n:n})).join("")},t.THIRTY_TWO_BIT_MULTIPLIER=Math.pow(2,32);t.shiftThirtyTwoBits=function(e){return e*t.THIRTY_TWO_BIT_MULTIPLIER}}(lP),Mp(uP,"__esModule",{value:!0}),uP.parseDescriptor=uP.SegmentationMessage=void 0;var cP,fP,hP=lP;(fP=cP||(uP.SegmentationMessage=cP={}))[fP.RESTRICT_GROUP_0=0]="RESTRICT_GROUP_0",fP[fP.RESTRICT_GROUP_1=1]="RESTRICT_GROUP_1",fP[fP.RESTRICT_GROUP_2=2]="RESTRICT_GROUP_2",fP[fP.NONE=3]="NONE";uP.parseDescriptor=function(t){var e,n=function(t){var e={},n=0;for(e.spliceDescriptorTag=t.getUint8(n++),e.descriptorLength=t.getUint8(n++),e.identifier="";e.identifier.length<4;)e.identifier+=String.fromCharCode(t.getUint8(n++));return e}(t),r=6;if(0===n.spliceDescriptorTag)r=n.descriptorLength+2,console.warn("scte35-js TODO: support spliceDescriptorTag: SpliceDescriptorTag.AVAIL_DESCRIPTOR");else if(1===n.spliceDescriptorTag)r=n.descriptorLength+2,console.warn("scte35-js TODO: support spliceDescriptorTag: SpliceDescriptorTag.DTMF_DESCRIPTOR");else if(2===n.spliceDescriptorTag){var i=n;if(i.segmentationEventId=t.getUint32(r),r+=4,i.segmentationEventCancelIndicator=!!(128&t.getUint8(r++)),!i.segmentationEventCancelIndicator){var o=t.getUint8(r++);i.programSegmentationFlag=!!(128&o),i.segmentationDurationFlag=!!(64&o),i.deliveryNotRestrictedFlag=!!(32&o),i.deliveryNotRestrictedFlag||(i.webDeliveryAllowedFlag=!!(16&o),i.noRegionalBlackoutFlag=!!(8&o),i.archiveAllowedFlag=!!(4&o),i.deviceRestrictions=3&o),i.programSegmentationFlag||(i.componentCount=t.getUint8(r++),console.warn("scte35-js TODO: segmentationDescriptor.componentCount: "+i.componentCount),r+=6*i.componentCount),i.segmentationDurationFlag&&(i.segmentationDuration=hP.shiftThirtyTwoBits(t.getUint8(r++)),i.segmentationDuration+=t.getUint32(r),r+=4),i.segmentationUpidType=t.getUint8(r++),i.segmentationUpidLength=t.getUint8(r++);var a=i.segmentationUpidLength;for(i.segmentationUpid=new Uint8Array(a);a>=0;)a--,i.segmentationUpid[a]=t.getUint8(r+a);r+=i.segmentationUpidLength,i.segmentationTypeId=t.getUint8(r++),i.segmentNum=t.getUint8(r++),i.segmentsExpected=t.getUint8(r++),r<n.descriptorLength+2&&(52===i.segmentationTypeId||54===i.segmentationTypeId)&&(i.subSegmentNum=t.getUint8(r++),i.subSegmentsExpected=t.getUint8(r++))}}else 3===n.spliceDescriptorTag?(r=n.descriptorLength+2,console.warn("scte35-js TODO: support spliceDescriptorTag: SpliceDescriptorTag.TIME_DESCRIPTOR")):(console.error("scte35-js Unrecognized spliceDescriptorTag ".concat(n.spliceDescriptorTag)),r=n.descriptorLength+2);r!==n.descriptorLength+2&&console.error(lh(e="scte35-js Error reading descriptor offset @".concat(r," of ")).call(e,n.descriptorLength+2));return n};var pP=n(nt.Symbol.for),dP=h,vP=Q,gP=Vn,yP=Kn,mP=tp,bP=Math.min,wP=[].lastIndexOf,kP=!!wP&&1/[1].lastIndexOf(1,-0)<0,_P=mP("lastIndexOf"),AP=kP||!_P?function(t){if(kP)return dP(wP,this,arguments)||0;var e=vP(this),n=yP(e),r=n-1;for(arguments.length>1&&(r=bP(r,gP(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}:wP;Ln({target:"Array",proto:!0,forced:AP!==[].lastIndexOf},{lastIndexOf:AP});var EP=af("Array").lastIndexOf,TP=ut,CP=EP,SP=Array.prototype,xP=n((function(t){var e=t.lastIndexOf;return t===SP||TP(SP,t)&&e===SP.lastIndexOf?CP:e})),MP=$t,LP=ai,OP=Kn,IP=ww,PP=Math.min,RP=[].copyWithin||function(t,e){var n=MP(this),r=OP(n),i=LP(t,r),o=LP(e,r),a=arguments.length>2?arguments[2]:void 0,s=PP((void 0===a?r:LP(a,r))-o,r-i),u=1;for(o<i&&i<o+s&&(u=-1,o+=s-1,i+=s-1);s-- >0;)o in n?n[i]=n[o]:IP(n,i),i+=u,o+=u;return n};Ln({target:"Array",proto:!0},{copyWithin:RP});for(var BP=af("Array").copyWithin,UP=ut,DP=BP,jP=Array.prototype,FP=n((function(t){var e=t.copyWithin;return t===jP||UP(jP,t)&&e===jP.copyWithin?DP:e})),NP={},HP={byteLength:function(t){var e=WP(t),n=e[0],r=e[1];return 3*(n+r)/4-r},toByteArray:function(t){var e,n,r=WP(t),i=r[0],o=r[1],a=new qP(function(t,e,n){return 3*(e+n)/4-n}(0,i,o)),s=0,u=o>0?i-4:i;for(n=0;n<u;n+=4)e=VP[t.charCodeAt(n)]<<18|VP[t.charCodeAt(n+1)]<<12|VP[t.charCodeAt(n+2)]<<6|VP[t.charCodeAt(n+3)],a[s++]=e>>16&255,a[s++]=e>>8&255,a[s++]=255&e;2===o&&(e=VP[t.charCodeAt(n)]<<2|VP[t.charCodeAt(n+1)]>>4,a[s++]=255&e);1===o&&(e=VP[t.charCodeAt(n)]<<10|VP[t.charCodeAt(n+1)]<<4|VP[t.charCodeAt(n+2)]>>2,a[s++]=e>>8&255,a[s++]=255&e);return a},fromByteArray:function(t){for(var e,n=t.length,r=n%3,i=[],o=16383,a=0,s=n-r;a<s;a+=o)i.push(KP(t,a,a+o>s?s:a+o));1===r?(e=t[n-1],i.push(zP[e>>2]+zP[e<<4&63]+"==")):2===r&&(e=(t[n-2]<<8)+t[n-1],i.push(zP[e>>10]+zP[e>>4&63]+zP[e<<2&63]+"="));return i.join("")}},zP=[],VP=[],qP="undefined"!=typeof Uint8Array?Uint8Array:Array,GP="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",YP=0;YP<64;++YP)zP[YP]=GP[YP],VP[GP.charCodeAt(YP)]=YP;function WP(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=rw(t).call(t,"=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function KP(t,e,n){for(var r,i,o=[],a=e;a<n;a+=3)r=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),o.push(zP[(i=r)>>18&63]+zP[i>>12&63]+zP[i>>6&63]+zP[63&i]);return o.join("")}VP["-".charCodeAt(0)]=62,VP["_".charCodeAt(0)]=63;var XP={read:function(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,l=u>>1,c=-7,f=n?i-1:0,h=n?-1:1,p=t[e+f];for(f+=h,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+t[e+f],f+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+t[e+f],f+=h,c-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=l}return(p?-1:1)*a*Math.pow(2,o-r)},write:function(t,e,n,r,i,o){var a,s,u,l=8*o-i-1,c=(1<<l)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(e*u-1)*Math.pow(2,i),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[n+p]=255&s,p+=d,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;t[n+p]=255&a,p+=d,a/=256,l-=8);t[n+p-d]|=128*v}};(function(e){var n=HP,r=XP,i="function"==typeof Ih&&"function"==typeof pP?pP("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=function(t){+t!=t&&(t=0);return s.alloc(+t)},e.INSPECT_MAX_BYTES=50;var o=2147483647;function a(t){if(t>o)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Ip(e,s.prototype),e}function s(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return c(t)}return u(t,e,n)}function u(t,e,n){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!s.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var n=0|d(t,e),r=a(n),i=r.write(t,e);i!==n&&(r=nb(r).call(r,0,i));return r}(t,e);if(ArrayBuffer.isView(t))return function(t){if(K(t,Uint8Array)){var e=new Uint8Array(t);return h(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+Lc(t));if(K(t,ArrayBuffer)||t&&K(t.buffer,ArrayBuffer))return h(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(K(t,SharedArrayBuffer)||t&&K(t.buffer,SharedArrayBuffer)))return h(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return s.from(r,e,n);var i=function(t){if(s.isBuffer(t)){var e=0|p(t.length),n=a(e);return 0===n.length||t.copy(n,0,0,e),n}if(void 0!==t.length)return"number"!=typeof t.length||X(t.length)?a(0):f(t);if("Buffer"===t.type&&lb(t.data))return f(t.data)}(t);if(i)return i;if(void 0!==Ih&&null!=xb&&"function"==typeof t[xb])return s.from(t[xb]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+Lc(t))}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function c(t){return l(t),a(t<0?0:0|p(t))}function f(t){for(var e=t.length<0?0:0|p(t.length),n=a(e),r=0;r<e;r+=1)n[r]=255&t[r];return n}function h(t,e,n){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;return r=void 0===e&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,e):new Uint8Array(t,e,n),Ip(r,s.prototype),r}function p(t){if(t>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function d(t,e){if(s.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||K(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+Lc(t));var n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return G(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Y(t).length;default:if(i)return r?-1:G(t).length;e=(""+e).toLowerCase(),i=!0}}function v(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return M(this,e,n);case"utf8":case"utf-8":return T(this,e,n);case"ascii":return S(this,e,n);case"latin1":case"binary":return x(this,e,n);case"base64":return E(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function g(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function y(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),X(n=+n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=s.from(e,r)),s.isBuffer(e))return 0===e.length?-1:m(t,e,n,r,i);if("number"==typeof e)return e&=255,"function"==typeof rw(Uint8Array.prototype)?i?rw(Uint8Array.prototype).call(t,e,n):xP(Uint8Array.prototype).call(t,e,n):m(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,n,r,i){var o,a=1,s=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,n/=2}function l(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var c=-1;for(o=n;o<s;o++)if(l(t,o)===l(e,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*a}else-1!==c&&(o-=o-c),c=-1}else for(n+u>s&&(n=s-u),o=n;o>=0;o--){for(var f=!0,h=0;h<u;h++)if(l(t,o+h)!==l(e,h)){f=!1;break}if(f)return o}return-1}function b(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o,a=e.length;for(r>a/2&&(r=a/2),o=0;o<r;++o){var s=ak(e.substr(2*o,2),16);if(X(s))return o;t[n+o]=s}return o}function w(t,e,n,r){return W(G(e,t.length-n),t,n,r)}function k(t,e,n,r){return W(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function _(t,e,n,r){return W(Y(e),t,n,r)}function A(t,e,n,r){return W(function(t,e){for(var n,r,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)r=(n=t.charCodeAt(a))>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function E(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(nb(t).call(t,e,r))}function T(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o=t[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(i+s<=n){var u=void 0,l=void 0,c=void 0,f=void 0;switch(s){case 1:o<128&&(a=o);break;case 2:128==(192&(u=t[i+1]))&&(f=(31&o)<<6|63&u)>127&&(a=f);break;case 3:u=t[i+1],l=t[i+2],128==(192&u)&&128==(192&l)&&(f=(15&o)<<12|(63&u)<<6|63&l)>2047&&(f<55296||f>57343)&&(a=f);break;case 4:u=t[i+1],l=t[i+2],c=t[i+3],128==(192&u)&&128==(192&l)&&128==(192&c)&&(f=(15&o)<<18|(63&u)<<12|(63&l)<<6|63&c)>65535&&f<1114112&&(a=f)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return function(t){var e=t.length;if(e<=C)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,nb(t).call(t,r,r+=C));return n}(r)}e.kMaxLength=o,s.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Ip(e,Uint8Array.prototype),Ip(t,e),42===t.foo()}catch(n){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Mp(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Mp(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(t,e,n){return u(t,e,n)},Ip(s.prototype,Uint8Array.prototype),Ip(s,Uint8Array),s.alloc=function(t,e,n){return function(t,e,n){return l(t),t<=0?a(t):void 0!==e?"string"==typeof n?OM(r=a(t)).call(r,e,n):OM(i=a(t)).call(i,e):a(t);var r,i}(t,e,n)},s.allocUnsafe=function(t){return c(t)},s.allocUnsafeSlow=function(t){return c(t)},s.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==s.prototype},s.compare=function(t,e){if(K(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),K(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,e){if(!lb(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=s.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var o=t[n];if(K(o,Uint8Array))i+o.length>r.length?(s.isBuffer(o)||(o=s.from(o)),o.copy(r,i)):Uint8Array.prototype.set.call(r,o,i);else{if(!s.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i)}i+=o.length}return r},s.byteLength=d,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)g(this,e,e+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},s.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?T(this,0,t):v.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t,n="",r=e.INSPECT_MAX_BYTES;return n=lA(t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ")).call(t),this.length>r&&(n+=" ... "),"<Buffer "+n+">"},i&&(s.prototype[i]=s.prototype.inspect),s.prototype.compare=function(t,e,n,r,i){if(K(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+Lc(t));if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),u=Math.min(o,a),l=nb(this).call(this,r,i),c=nb(t).call(t,e,n),f=0;f<u;++f)if(l[f]!==c[f]){o=l[f],a=c[f];break}return o<a?-1:a<o?1:0},s.prototype.includes=function(t,e,n){return-1!==rw(this).call(this,t,e,n)},s.prototype.indexOf=function(t,e,n){return y(this,t,e,n,!0)},s.prototype.lastIndexOf=function(t,e,n){return y(this,t,e,n,!1)},s.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":case"latin1":case"binary":return k(this,t,e,n);case"base64":return _(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:nb(Array.prototype).call(this._arr||this,0)}};var C=4096;function S(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function x(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function M(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=$[t[o]];return i}function L(t,e,n){for(var r=nb(t).call(t,e,n),i="",o=0;o<r.length-1;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function O(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function I(t,e,n,r,i,o){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function P(t,e,n,r,i){H(e,r,i,t,n,7);var o=Number(e&BigInt(4294967295));t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o;var a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,n}function R(t,e,n,r,i){H(e,r,i,t,n,7);var o=Number(e&BigInt(4294967295));t[n+7]=o,o>>=8,t[n+6]=o,o>>=8,t[n+5]=o,o>>=8,t[n+4]=o;var a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n+3]=a,a>>=8,t[n+2]=a,a>>=8,t[n+1]=a,a>>=8,t[n]=a,n+8}function B(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function U(t,e,n,i,o){return e=+e,n>>>=0,o||B(t,0,n,4),r.write(t,e,n,i,23,4),n+4}function D(t,e,n,i,o){return e=+e,n>>>=0,o||B(t,0,n,8),r.write(t,e,n,i,52,8),n+8}s.prototype.slice=function(t,e){var n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);var r=this.subarray(t,e);return Ip(r,s.prototype),r},s.prototype.readUintLE=s.prototype.readUIntLE=function(t,e,n){t>>>=0,e>>>=0,n||O(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},s.prototype.readUintBE=s.prototype.readUIntBE=function(t,e,n){t>>>=0,e>>>=0,n||O(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},s.prototype.readUint8=s.prototype.readUInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),this[t]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readBigUInt64LE=J((function(t){z(t>>>=0,"offset");var e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);var r=e+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,24),i=this[++t]+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+n*Math.pow(2,24);return BigInt(r)+(BigInt(i)<<BigInt(32))})),s.prototype.readBigUInt64BE=J((function(t){z(t>>>=0,"offset");var e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);var r=e*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+this[++t],i=this[++t]*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+n;return(BigInt(r)<<BigInt(32))+BigInt(i)})),s.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||O(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},s.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||O(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},s.prototype.readInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){t>>>=0,e||O(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(t,e){t>>>=0,e||O(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readBigInt64LE=J((function(t){z(t>>>=0,"offset");var e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);var r=this[t+4]+this[t+5]*Math.pow(2,8)+this[t+6]*Math.pow(2,16)+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(e+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,24))})),s.prototype.readBigInt64BE=J((function(t){z(t>>>=0,"offset");var e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);var r=(e<<24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+this[++t];return(BigInt(r)<<BigInt(32))+BigInt(this[++t]*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+n)})),s.prototype.readFloatLE=function(t,e){return t>>>=0,e||O(t,4,this.length),r.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return t>>>=0,e||O(t,4,this.length),r.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return t>>>=0,e||O(t,8,this.length),r.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return t>>>=0,e||O(t,8,this.length),r.read(this,t,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e>>>=0,n>>>=0,r)||I(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e>>>=0,n>>>=0,r)||I(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,1,255,0),this[e]=255&t,e+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeBigUInt64LE=J((function(t){return P(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeBigUInt64BE=J((function(t){return R(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){var i=Math.pow(2,8*n-1);I(this,t,e,n,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<n&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},s.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){var i=Math.pow(2,8*n-1);I(this,t,e,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},s.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},s.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeBigInt64LE=J((function(t){return P(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeBigInt64BE=J((function(t){return R(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeFloatLE=function(t,e,n){return U(this,t,e,!0,n)},s.prototype.writeFloatBE=function(t,e,n){return U(this,t,e,!1,n)},s.prototype.writeDoubleLE=function(t,e,n){return D(this,t,e,!0,n)},s.prototype.writeDoubleBE=function(t,e,n){return D(this,t,e,!1,n)},s.prototype.copy=function(t,e,n,r){if(!s.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i=r-n;this===t&&"function"==typeof FP(Uint8Array.prototype)?FP(this).call(this,e,n,r):Uint8Array.prototype.set.call(t,this.subarray(n,r),e);return i},s.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===t.length){var i=t.charCodeAt(0);("utf8"===r&&i<128||"latin1"===r)&&(t=i)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else{var a=s.isBuffer(t)?t:s.from(t,r),u=a.length;if(0===u)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<n-e;++o)this[o+e]=a[o%u]}return this};var j={};function F(e,n,r){j[e]=function(r){Uf(o,r);var i=rh(o);function o(){var r,a;return t(this,o),a=i.call(this),Mp(Uc(a),"message",{value:n.apply(Uc(a),arguments),writable:!0,configurable:!0}),a.name=lh(r="".concat(a.name," [")).call(r,e,"]"),a.stack,delete a.name,a}return Bc(o,[{key:"code",get:function(){return e},set:function(t){Mp(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}},{key:"toString",value:function(){var t,n;return lh(t=lh(n="".concat(this.name," [")).call(n,e,"]: ")).call(t,this.message)}}]),o}(r)}function N(t){for(var e,n="",r=t.length,i="-"===t[0]?1:0;r>=i+4;r-=3){var o;n=lh(o="_".concat(nb(t).call(t,r-3,r))).call(o,n)}return lh(e="".concat(nb(t).call(t,0,r))).call(e,n)}function H(t,e,n,r,i,o){if(t>n||t<e){var a,s,u,l,c,f,h,p,d,v,g="bigint"==typeof e?"n":"";if(o>3)if(0===e||e===BigInt(0))a=lh(s=lh(u=lh(l=">= 0".concat(g," and < 2")).call(l,g," ** ")).call(u,8*(o+1))).call(s,g);else a=lh(c=lh(f=">= -(2".concat(g," ** ")).call(f,8*(o+1)-1)).call(c,g,") and < 2 ** ")+lh(h="".concat(8*(o+1)-1)).call(h,g);else a=lh(p=lh(d=lh(v=">= ".concat(e)).call(v,g," and <= ")).call(d,n)).call(p,g);throw new j.ERR_OUT_OF_RANGE("value",a,t)}!function(t,e,n){z(e,"offset"),void 0!==t[e]&&void 0!==t[e+n]||V(e,t.length-(n+1))}(r,i,o)}function z(t,e){if("number"!=typeof t)throw new j.ERR_INVALID_ARG_TYPE(e,"number",t)}function V(t,e,n){var r;if(Math.floor(t)!==t)throw z(t,n),new j.ERR_OUT_OF_RANGE(n||"offset","an integer",t);if(e<0)throw new j.ERR_BUFFER_OUT_OF_BOUNDS;throw new j.ERR_OUT_OF_RANGE(n||"offset",lh(r=">= ".concat(n?1:0," and <= ")).call(r,e),t)}F("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?"".concat(t," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),F("ERR_INVALID_ARG_TYPE",(function(t,e){var n;return lh(n='The "'.concat(t,'" argument must be of type number. Received type ')).call(n,Lc(e))}),TypeError),F("ERR_OUT_OF_RANGE",(function(t,e,n){var r,i='The value of "'.concat(t,'" is out of range.'),o=n;return sM(n)&&Math.abs(n)>Math.pow(2,32)?o=N(String(n)):"bigint"==typeof n&&(o=String(n),(n>Math.pow(BigInt(2),BigInt(32))||n<-Math.pow(BigInt(2),BigInt(32)))&&(o=N(o)),o+="n"),i+=lh(r=" It must be ".concat(e,". Received ")).call(r,o)}),RangeError);var q=/[^+/0-9A-Za-z-_]/g;function G(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function Y(t){return n.toByteArray(function(t){if(t=t.split("=")[0],(t=lA(t).call(t).replace(q,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function W(t,e,n,r){var i;for(i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function K(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function X(t){return t!=t}var $=function(){for(var t="0123456789abcdef",e=new Array(256),n=0;n<16;++n)for(var r=16*n,i=0;i<16;++i)e[r+i]=t[n]+t[i];return e}();function J(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}})(NP),Mp(sP,"__esModule",{value:!0});var $P=sP.SCTE35=void 0,JP=uP,QP=lP,ZP=NP,tR=function(){function e(){t(this,e),this.buffer=ZP.Buffer}return Bc(e,[{key:"parseFromB64",value:function(t){var e,n=Uint8Array.from(hk(e=this.parseBase64(t).split("")).call(e,(function(t){return t.charCodeAt(0)})));return this.parseSCTE35Data(n)}},{key:"parseFromHex",value:function(t){var e=t.match(/[a-f\d]{2}/gi)||[],n=Uint8Array.from(hk(e).call(e,(function(t){return ak(t,16)})));return this.parseSCTE35Data(n)}},{key:"parseBase64",value:function(t){return this.buffer.from(t,"base64").toString("binary")}},{key:"spliceEvent",value:function(t,e,n){var r=0;if(t.spliceEventId=e.getUint32(r),r+=4,t.spliceEventCancelIndicator=!!(128&e.getUint8(r++)),t.spliceEventCancelIndicator)return r;var i=e.getUint8(r++);if(t.outOfNetworkIndicator=!!(128&i),t.programSpliceFlag=!!(64&i),t.durationFlag=!!(32&i),5===n&&(t.spliceImmediateFlag=!!(16&i)),t.programSpliceFlag)if(5!==n||t.spliceImmediateFlag)4===n&&(t.utcSpliceTime=e.getUint32(r),r+=4);else{var o=this.timeSignal(new DataView(e.buffer,e.byteOffset+r,5));t.spliceTime=o,r++,o.specified&&(r+=4)}else if(t.componentCount=e.getUint8(r++),4===n){for(var a=[];a.length!==t.componentCount;)a.push({componentTag:e.getUint8(r++),utcSpliceTime:e.getUint32(r)}),r+=4;t.utcSpliceComponents=a}else console.warn("scte35-js TODO: support splice_insert");return t.durationFlag&&(i=e.getUint8(r++),t.breakDuration={autoReturn:!!(128&i),duration:(1&i?QP.THIRTY_TWO_BIT_MULTIPLIER:0)+e.getUint32(r)},r+=4),t.uniqueProgramId=e.getUint16(r),r+=2,t.available=e.getUint8(r++),t.expected=e.getUint8(r++),r}},{key:"spliceSchedule",value:function(t){var e={};e.spliceCount=t.getUint8(0),e.spliceEvents=[];for(var n,r=1;e.spliceEvents.length!==e.spliceCount;){var i={};r+=this.spliceEvent(i,new DataView(t.buffer,t.byteOffset+r),4),e.spliceEvents.push(i)}r!==t.byteLength&&console.error(lh(n="scte35-js Bad read splice_schedule actual: ".concat(r," expected: ")).call(n,t.byteLength));return e}},{key:"spliceInsert",value:function(t){var e,n={},r=this.spliceEvent(n,t,5);r!==t.byteLength&&console.error(lh(e="scte35-js Bad read splice_insert actual: ".concat(r," expected: ")).call(e,t.byteLength));return n}},{key:"timeSignal",value:function(t){var e={},n=t.getUint8(0);return e.specified=!!(128&n),e.specified&&(e.pts=1&n?QP.THIRTY_TWO_BIT_MULTIPLIER:0,e.pts+=t.getUint32(1)),e}},{key:"privateCommand",value:function(t){var e={},n=t.getUint32(0),r=new Uint8Array(t.buffer,t.byteOffset+4,t.byteLength-4);return e.identifier=n,e.identifier&&(e.rawData=r),e}},{key:"parseSCTE35Data",value:function(t){var e={},n=new DataView(t.buffer),r=0;e.tableId=n.getUint8(r++);var i,o=n.getUint8(r++);if(e.selectionSyntaxIndicator=!!(128&o),e.privateIndicator=!!(64&o),e.sectionLength=((15&o)<<8)+n.getUint8(r++),e.sectionLength+3!==t.byteLength)throw new Error(lh(i="Binary read error sectionLength: ".concat(e.sectionLength," + 3 !== data.length: ")).call(i,t.byteLength));if(e.protocolVersion=n.getUint8(r++),o=n.getUint8(r++),e.encryptedPacket=!!(128&o),e.encryptedAlgorithm=(126&o)>>1,e.encryptedPacket&&console.error("scte35-js splice_info_section encrypted_packet ".concat(e.encryptedAlgorithm," not supported")),e.ptsAdjustment=1&o?QP.THIRTY_TWO_BIT_MULTIPLIER:0,e.ptsAdjustment+=n.getUint32(r),r+=4,e.cwIndex=n.getUint8(r++),e.tier=n.getUint8(r++)<<4,o=n.getUint8(r++),e.tier+=(240&o)>>4,e.spliceCommandLength=((15&o)<<8)+n.getUint8(r++),e.spliceCommandType=n.getUint8(r++),4095===e.spliceCommandLength)if(6===e.spliceCommandType){var a=128&n.getUint8(r);e.spliceCommandLength=a?5:1}else if(0===e.spliceCommandType)e.spliceCommandLength=0;else if(5===e.spliceCommandType){var s=r;if(s+=4,!(128&n.getUint8(s++))){var u=n.getUint8(s++),l=16&u,c=32&u,f=64&u;if(f&&!l&&(s+=5),!f){var h=n.getUint8(s++);s+=h,s+=l?0:5*h}c&&(s+=5),s+=4,e.spliceCommandLength=s-r}}else console.error("scte35-js Unspecified length not supported in this context");if(0!==e.spliceCommandType){var p=new DataView(t.buffer,r,e.spliceCommandLength);4===e.spliceCommandType?e.spliceCommand=this.spliceSchedule(p):5===e.spliceCommandType?e.spliceCommand=this.spliceInsert(p):6===e.spliceCommandType?e.spliceCommand=this.timeSignal(p):255===e.spliceCommandType&&(e.spliceCommand=this.privateCommand(p))}if(r+=e.spliceCommandLength,e.descriptorLoopLength=n.getUint16(r),r+=2,e.descriptorLoopLength){var d=e.descriptorLoopLength;e.descriptors=[];try{for(;d;){var v=new DataView(t.buffer,r,d),g=JP.parseDescriptor(v);d-=g.descriptorLength+2,r+=g.descriptorLength+2,e.descriptors.push(g)}}catch(aR){var y;console.error(lh(y="scte35-js Error reading descriptor @ ".concat(r,", ignoring remaining bytes: ")).call(y,d," in loop.")),console.error(aR),r+=d,d=0}}return e.crc=n.getUint32(r),(r+=4)!==n.byteLength&&console.error("scte35-js Bad SCTE35 read - remaining data: ".concat(nb(t).call(t,r).join(", "))),e}}]),e}();$P=sP.SCTE35=tR;var eR="SCTE35-OUT",nR="START-DATE",rR="PLANNED-DURATION";var iR=function(){function e(n){var r=this;t(this,e),ih(this,"_options",void 0),ih(this,"_track",void 0),ih(this,"_startTime",void 0),ih(this,"_adBreakCues",void 0),ih(this,"_activeAdBreak",null),ih(this,"_activeAdBreakStatus","WAITING_PREROLL"),ih(this,"_scte35",new $P),ih(this,"_scte35ResultMap",new pI),ih(this,"_handleTimeUpdate",(function(){var t,e,n,i,o;if(null!==(t=r._adBreakCues)&&void 0!==t&&t.length)for(var a=0;a<r._adBreakCues.length;a++){var s=r._adBreakCues[a];if(s.startTime>=r._player.currentTime){n=s;break}}if(n&&(null===(e=r._activeAdBreak)||void 0===e?void 0:e.id)===n.id)if((null===(i=r._activeAdBreak)||void 0===i?void 0:i.startDate)!==n.startDate)switch(r._activeAdBreakStatus){case"REQUESTED":r._changeActiveAdBreakStatus("REQUESTED",n);break;case"ERROR":case"COMPLETE":r._changeActiveAdBreakStatus("READY",null)}else(null===(o=r._activeAdBreak)||void 0===o?void 0:o.startTime)!==n.startTime&&r._changeActiveAdBreakStatus(r._activeAdBreakStatus,n);r._tryToPlayAd(),r._tryToRequestAd(n)})),ih(this,"_onReady",(function(){r._changeActiveAdBreakStatus("READY",null),r._player.off(vh,r._onReady),r._player.off(yh,r._onReady),r._player.on(cE,r._handleTimeUpdate),r._player.on(yh,r._onAdComplete),r._player.on(vh,r._onAdError),r._handleTimeUpdate()})),ih(this,"_onAdComplete",(function(){r._changeActiveAdBreakStatus("COMPLETE",r._activeAdBreak)})),ih(this,"_onAdError",(function(){r._changeActiveAdBreakStatus("ERROR",r._activeAdBreak)})),ih(this,"_handleHlsCoreEvent",(function(t){var e=t.eventName,n=t.playlist;if("core.hlslevelloaded"===e){var i;if(null!=n&&null!==(i=n.segments)&&void 0!==i&&i.length&&0===r._player.currentTime){var o,a=aP(n.segments);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(0===s.start){r._startTime=new Date(s.dataTime).getTime();break}}}catch(u){a.e(u)}finally{a.f()}}null!=n&&n.dateRanges&&r._startTime&&r._updateAdBreakCues(n.dateRanges)}})),ih(this,"_onAddTrack",(function(t){var e=t.track;"metadata"===(null==e?void 0:e.kind)&&(e.mode="hidden",r._track=e,r._track.addEventListener("cuechange",r._onCuechange))})),ih(this,"_onCuechange",(function(){for(var t,e={},n=(null===(t=r._track)||void 0===t?void 0:t.cues)||[],i=0;i<n.length;){var o,a=n[i];if((null===(o=a.value)||void 0===o?void 0:o.key)===rR){var s,u=i+1<n.length?n[i+1]:null;if((null==u||null===(s=u.value)||void 0===s?void 0:s.key)===eR&&(null==u?void 0:u.startTime)===a.startTime){var l,c,f=r._getScte35Result(null===(l=u.value)||void 0===l?void 0:l.data),h=String((null==f?void 0:f.spliceCommand).spliceEventId);e[h]=ih({ID:h,startTime:u.startTime,message:f},rR,null===(c=a.value)||void 0===c?void 0:c.data),i+=2}else i++}else i++}r._updateAdBreakCues(e)})),this._options=n,this._init()}return Bc(e,[{key:"_player",get:function(){return this._options.player}},{key:"_adManager",get:function(){return this._options.adManager}},{key:"_adTagUrl",get:function(){return this._options.adTagUrl}},{key:"_mediaElement",get:function(){return this._player.media}},{key:"destroy",value:function(){var t,e;null===(t=this._track)||void 0===t||t.removeEventListener("cuechange",this._onCuechange),this._track=void 0,null===(e=this._mediaElement)||void 0===e||null===(e=e.textTracks)||void 0===e||e.removeEventListener("addtrack",this._onAddTrack),this._player.off("core_event",this._handleHlsCoreEvent),this._player.off(cE,this._handleTimeUpdate),this._player.off(_h,this._onAdComplete),this._player.off(Ah,this._onAdError)}},{key:"_init",value:function(){var t;null===(t=this._mediaElement)||void 0===t||null===(t=t.textTracks)||void 0===t||t.addEventListener("addtrack",this._onAddTrack),this._player.on("core_event",this._handleHlsCoreEvent);var e=this._adManager.config,n=e.adsRequest,r=e.adsResponse,i=e.adTagUrl;n||r||i?(this._player.once(vh,this._onReady),this._player.once(yh,this._onReady)):this._onReady()}},{key:"_changeActiveAdBreakStatus",value:function(t,e){var n,r;this._activeAdBreakStatus=t,this._activeAdBreak=e,console.log(lh(n=lh(r="Update adbreak status, status: ".concat(this._activeAdBreakStatus,", player start time: ")).call(r,this._startTime,", player current time: ")).call(n,this._player.currentTime),this._activeAdBreak)}},{key:"_tryToRequestAd",value:function(t){var e;t&&"WAITING_PREROLL"!==this._activeAdBreakStatus&&"STARTED"!==this._activeAdBreakStatus&&t.id!==(null===(e=this._activeAdBreak)||void 0===e?void 0:e.id)&&(this._changeActiveAdBreakStatus("REQUESTED",t),this._adManager.reset(),this._adManager.updateConfig({adTagUrl:this._adTagUrl}),this._adManager.requestAds())}},{key:"_tryToPlayAd",value:function(){!this._activeAdBreak||this._activeAdBreak.startTime>this._player.currentTime||("ERROR"!==this._activeAdBreakStatus?"REQUESTED"===this._activeAdBreakStatus&&(this._changeActiveAdBreakStatus("STARTED",this._activeAdBreak),this._adManager.playAds()):this._changeActiveAdBreakStatus("READY",null))}},{key:"_getScte35Result",value:function(t){if(!this._scte35ResultMap.has(t))try{this._scte35ResultMap.set(t,this._scte35.parseFromHex(t))}catch(e){}if(!this._scte35ResultMap.has(t))try{this._scte35ResultMap.set(t,this._scte35.parseFromB64(t))}catch(e){}return this._scte35ResultMap.get(t)}},{key:"_updateAdBreakCues",value:function(t){var e,n,r=this;this._adBreakCues=WA(e=OI(n=qh(t)).call(n,(function(e,n){var i=t[n];if(function(t){return!(!t[rR]||!t.message&&!t[eR]||void 0===t.startTime&&!t[nR])}(i)){var o=i.message||r._getScte35Result(i[eR]);5===(null==o?void 0:o.spliceCommandType)&&e.push({data:o,id:i.ID,startTime:i.startTime||(new Date(i[nR]).getTime()-r._startTime)/1e3,duration:tA(i[rR]||"0"),startDate:i[nR]})}return e}),[])).call(e,(function(t,e){return t.startTime-e.startTime}))}}]),e}();var oR=function(e){Uf(r,e);var n=rh(r);function r(){var e,i;t(this,r);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return ih(Uc(i=n.call.apply(n,lh(e=[this]).call(e,a))),"_scte35Manager",void 0),ih(Uc(i),"_handlePrerollMuted",(function(t){var e,n;(function(t){var e;return 0===(null==t||null===(e=t.getAdPodInfo())||void 0===e?void 0:e.getTimeOffset())})(t.ad)&&(null===(e=i.player.plugins.autoplayplugin)||void 0===e||null===(n=e.handleAutoplayStart)||void 0===n||n.call(e),i.player.once(hE,(function(){var t,e;null===(t=i.player.plugins.autoplayplugin)||void 0===t||null===(e=t.initState)||void 0===e||e.call(t)})))})),i}return Bc(r,[{key:"afterCreate",value:function(){Of(Lf(r.prototype),"afterCreate",this).call(this),this._init()}},{key:"beforePlayerInit",value:function(){var t,e,n=Of(Lf(r.prototype),"beforePlayerInit",this).call(this);return null===(t=this.csManager)||void 0===t||t.once(bh,(function(){google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0)})),this.config.enableSCTE35&&null!==(e=this.config.ima)&&void 0!==e&&e.adTagUrlForSCTE35&&(this._scte35Manager=new iR({player:this.player,adTagUrl:this.config.ima.adTagUrlForSCTE35,adManager:this.csManager})),n}},{key:"destroy",value:function(){var t;Of(Lf(r.prototype),"destroy",this).call(this),null===(t=this._scte35Manager)||void 0===t||t.destroy(),this._scte35Manager=void 0}},{key:"_init",value:function(){var t,e;null!==(t=this.config.ima)&&void 0!==t&&t.adTagUrl||null===(e=this.config.ima)||void 0===e||null===(e=e.schedule)||void 0===e||!e.length||(this.config.ima.adsResponse=function(t){var e,n;if(t&&t.length){var r=document.implementation.createDocument("http://www.iab.net/videosuite/vmap","vmap:VMAP"),i=r.getElementsByTagName("vmap:VMAP");i[0].setAttribute("version","1.0");var o,a=0,s=0;return cp(e=WA(n=Jh(t).call(t,(function(t){var e=t.offset;return"pre"===e||"post"===e||/^(\d\d):([0-5]\d):([0-5]\d)(.\d\d\d)?$/.test(e)}))).call(n,(function(t,e){return"pre"===t.offset||"post"===e.offset?-1:"post"===t.offset||"pre"===e.offset?1:Date.parse("2024-01-01T".concat(t.offset))<Date.parse("2024-01-01T".concat(e.offset))?-1:1}))).call(e,(function(t){var e,n,u,l=t.offset,c=t.type,f=t.tag;switch(l){case"pre":n="start",u="preroll";break;case"post":n="end",u="postroll";break;default:n=l,o!==l?(o=l,s=1,u="midroll-".concat(++a)):(s++,u="midroll-".concat(a))}var h=r.createElement("vmap:AdBreak");h.setAttribute("timeOffset",n),h.setAttribute("breakId",u),h.setAttribute("breakType",c||"linear"),i[0].appendChild(h);var p=r.createElement("vmap:AdSource");p.setAttribute("id",lh(e="".concat(u,"-ad-")).call(e,s)),p.setAttribute("allowMultipleAds","true"),p.setAttribute("followRedirects","true"),h.appendChild(p);var d=r.createElement("vmap:AdTagURI");d.setAttribute("templateType","vast3"),p.appendChild(d),d.innerHTML="<![CDATA[ ".concat(f," ]]>")})),(new XMLSerializer).serializeToString(r)}}(this.config.ima.schedule)),this.player.once(fh,this._handlePrerollMuted)}}],[{key:"pluginName",get:function(){return"ad"}}]),r}(iP);return oR}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).VePlayerAd=e()}(this,(function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var r={exports:{}},i=function(t){return t&&t.Math==Math&&t},o=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof e&&e)||function(){return this}()||e||Function("return this")(),a=function(t){try{return!!t()}catch(e){return!0}},s=!a((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),u=s,l=Function.prototype,c=l.apply,f=l.call,h="object"==typeof Reflect&&Reflect.apply||(u?f.bind(c):function(){return f.apply(c,arguments)}),p=s,d=Function.prototype,v=d.call,g=p&&d.bind.bind(v,v),y=p?g:function(t){return function(){return v.apply(t,arguments)}},m=y,w=m({}.toString),b=m("".slice),_=function(t){return b(w(t),8,-1)},k=_,E=y,A=function(t){if("Function"===k(t))return E(t)},T="object"==typeof document&&document.all,C={all:T,IS_HTMLDDA:void 0===T&&void 0!==T},S=C.all,x=C.IS_HTMLDDA?function(t){return"function"==typeof t||t===S}:function(t){return"function"==typeof t},L={},M=!a((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),O=s,I=Function.prototype.call,P=O?I.bind(I):function(){return I.apply(I,arguments)},R={},B={}.propertyIsEnumerable,U=Object.getOwnPropertyDescriptor,D=U&&!B.call({1:2},1);R.f=D?function(t){var e=U(this,t);return!!e&&e.enumerable}:B;var j,F,N=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},H=a,z=_,V=Object,q=y("".split),G=H((function(){return!V("z").propertyIsEnumerable(0)}))?function(t){return"String"==z(t)?q(t,""):V(t)}:V,Y=function(t){return null==t},W=Y,K=TypeError,X=function(t){if(W(t))throw K("Can't call method on "+t);return t},$=G,J=X,Q=function(t){return $(J(t))},Z=x,tt=C.all,et=C.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:Z(t)||t===tt}:function(t){return"object"==typeof t?null!==t:Z(t)},nt={},rt=nt,it=o,ot=x,at=function(t){return ot(t)?t:void 0},st=function(t,e){return arguments.length<2?at(rt[t])||at(it[t]):rt[t]&&rt[t][e]||it[t]&&it[t][e]},ut=y({}.isPrototypeOf),lt="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ct=o,ft=lt,ht=ct.process,pt=ct.Deno,dt=ht&&ht.versions||pt&&pt.version,vt=dt&&dt.v8;vt&&(F=(j=vt.split("."))[0]>0&&j[0]<4?1:+(j[0]+j[1])),!F&&ft&&(!(j=ft.match(/Edge\/(\d+)/))||j[1]>=74)&&(j=ft.match(/Chrome\/(\d+)/))&&(F=+j[1]);var gt=F,yt=gt,mt=a,wt=o.String,bt=!!Object.getOwnPropertySymbols&&!mt((function(){var t=Symbol();return!wt(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&yt&&yt<41})),_t=bt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,kt=st,Et=x,At=ut,Tt=Object,Ct=_t?function(t){return"symbol"==typeof t}:function(t){var e=kt("Symbol");return Et(e)&&At(e.prototype,Tt(t))},St=String,xt=function(t){try{return St(t)}catch(e){return"Object"}},Lt=x,Mt=xt,Ot=TypeError,It=function(t){if(Lt(t))return t;throw Ot(Mt(t)+" is not a function")},Pt=It,Rt=Y,Bt=function(t,e){var n=t[e];return Rt(n)?void 0:Pt(n)},Ut=P,Dt=x,jt=et,Ft=TypeError,Nt={exports:{}},Ht=o,zt=Object.defineProperty,Vt=function(t,e){try{zt(Ht,t,{value:e,configurable:!0,writable:!0})}catch(n){Ht[t]=e}return e},qt="__core-js_shared__",Gt=o[qt]||Vt(qt,{}),Yt=Gt;(Nt.exports=function(t,e){return Yt[t]||(Yt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.30.2",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"});var Wt=Nt.exports,Kt=X,Xt=Object,$t=function(t){return Xt(Kt(t))},Jt=$t,Qt=y({}.hasOwnProperty),Zt=Object.hasOwn||function(t,e){return Qt(Jt(t),e)},te=y,ee=0,ne=Math.random(),re=te(1..toString),ie=function(t){return"Symbol("+(void 0===t?"":t)+")_"+re(++ee+ne,36)},oe=Wt,ae=Zt,se=ie,ue=bt,le=_t,ce=o.Symbol,fe=oe("wks"),he=le?ce.for||ce:ce&&ce.withoutSetter||se,pe=function(t){return ae(fe,t)||(fe[t]=ue&&ae(ce,t)?ce[t]:he("Symbol."+t)),fe[t]},de=P,ve=et,ge=Ct,ye=Bt,me=function(t,e){var n,r;if("string"===e&&Dt(n=t.toString)&&!jt(r=Ut(n,t)))return r;if(Dt(n=t.valueOf)&&!jt(r=Ut(n,t)))return r;if("string"!==e&&Dt(n=t.toString)&&!jt(r=Ut(n,t)))return r;throw Ft("Can't convert object to primitive value")},we=TypeError,be=pe("toPrimitive"),_e=function(t,e){if(!ve(t)||ge(t))return t;var n,r=ye(t,be);if(r){if(void 0===e&&(e="default"),n=de(r,t,e),!ve(n)||ge(n))return n;throw we("Can't convert object to primitive value")}return void 0===e&&(e="number"),me(t,e)},ke=Ct,Ee=function(t){var e=_e(t,"string");return ke(e)?e:e+""},Ae=et,Te=o.document,Ce=Ae(Te)&&Ae(Te.createElement),Se=function(t){return Ce?Te.createElement(t):{}},xe=Se,Le=!M&&!a((function(){return 7!=Object.defineProperty(xe("div"),"a",{get:function(){return 7}}).a})),Me=M,Oe=P,Ie=R,Pe=N,Re=Q,Be=Ee,Ue=Zt,De=Le,je=Object.getOwnPropertyDescriptor;L.f=Me?je:function(t,e){if(t=Re(t),e=Be(e),De)try{return je(t,e)}catch(n){}if(Ue(t,e))return Pe(!Oe(Ie.f,t,e),t[e])};var Fe=a,Ne=x,He=/#|\.prototype\./,ze=function(t,e){var n=qe[Ve(t)];return n==Ye||n!=Ge&&(Ne(e)?Fe(e):!!e)},Ve=ze.normalize=function(t){return String(t).replace(He,".").toLowerCase()},qe=ze.data={},Ge=ze.NATIVE="N",Ye=ze.POLYFILL="P",We=ze,Ke=It,Xe=s,$e=A(A.bind),Je=function(t,e){return Ke(t),void 0===e?t:Xe?$e(t,e):function(){return t.apply(e,arguments)}},Qe={},Ze=M&&a((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),tn=et,en=String,nn=TypeError,rn=function(t){if(tn(t))return t;throw nn(en(t)+" is not an object")},on=M,an=Le,sn=Ze,un=rn,ln=Ee,cn=TypeError,fn=Object.defineProperty,hn=Object.getOwnPropertyDescriptor,pn="enumerable",dn="configurable",vn="writable";Qe.f=on?sn?function(t,e,n){if(un(t),e=ln(e),un(n),"function"==typeof t&&"prototype"===e&&"value"in n&&vn in n&&!n[vn]){var r=hn(t,e);r&&r[vn]&&(t[e]=n.value,n={configurable:dn in n?n[dn]:r[dn],enumerable:pn in n?n[pn]:r[pn],writable:!1})}return fn(t,e,n)}:fn:function(t,e,n){if(un(t),e=ln(e),un(n),an)try{return fn(t,e,n)}catch(r){}if("get"in n||"set"in n)throw cn("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var gn=Qe,yn=N,mn=M?function(t,e,n){return gn.f(t,e,yn(1,n))}:function(t,e,n){return t[e]=n,t},wn=o,bn=h,_n=A,kn=x,En=L.f,An=We,Tn=nt,Cn=Je,Sn=mn,xn=Zt,Ln=function(t){var e=function(n,r,i){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,r)}return new t(n,r,i)}return bn(t,this,arguments)};return e.prototype=t.prototype,e},Mn=function(t,e){var n,r,i,o,a,s,u,l,c,f=t.target,h=t.global,p=t.stat,d=t.proto,v=h?wn:p?wn[f]:(wn[f]||{}).prototype,g=h?Tn:Tn[f]||Sn(Tn,f,{})[f],y=g.prototype;for(o in e)r=!(n=An(h?o:f+(p?".":"#")+o,t.forced))&&v&&xn(v,o),s=g[o],r&&(u=t.dontCallGetSet?(c=En(v,o))&&c.value:v[o]),a=r&&u?u:e[o],r&&typeof s==typeof a||(l=t.bind&&r?Cn(a,wn):t.wrap&&r?Ln(a):d&&kn(a)?_n(a):a,(t.sham||a&&a.sham||s&&s.sham)&&Sn(l,"sham",!0),Sn(g,o,l),d&&(xn(Tn,i=f+"Prototype")||Sn(Tn,i,{}),Sn(Tn[i],o,a),t.real&&y&&(n||!y[o])&&Sn(y,o,a)))},On=Mn,In=M,Pn=Qe.f;On({target:"Object",stat:!0,forced:Object.defineProperty!==Pn,sham:!In},{defineProperty:Pn});var Rn=nt.Object,Bn=r.exports=function(t,e,n){return Rn.defineProperty(t,e,n)};Rn.defineProperty.sham&&(Bn.sham=!0);var Un=r.exports,Dn=n(Un),jn=_,Fn=Array.isArray||function(t){return"Array"==jn(t)},Nn=Math.ceil,Hn=Math.floor,zn=Math.trunc||function(t){var e=+t;return(e>0?Hn:Nn)(e)},Vn=function(t){var e=+t;return e!=e||0===e?0:zn(e)},qn=Vn,Gn=Math.min,Yn=function(t){return t>0?Gn(qn(t),9007199254740991):0},Wn=Yn,Kn=function(t){return Wn(t.length)},Xn=TypeError,$n=function(t){if(t>9007199254740991)throw Xn("Maximum allowed index exceeded");return t},Jn=Ee,Qn=Qe,Zn=N,tr=function(t,e,n){var r=Jn(e);r in t?Qn.f(t,r,Zn(0,n)):t[r]=n},er={};er[pe("toStringTag")]="z";var nr="[object z]"===String(er),rr=nr,ir=x,or=_,ar=pe("toStringTag"),sr=Object,ur="Arguments"==or(function(){return arguments}()),lr=rr?or:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(n){}}(e=sr(t),ar))?n:ur?or(e):"Object"==(r=or(e))&&ir(e.callee)?"Arguments":r},cr=x,fr=Gt,hr=y(Function.toString);cr(fr.inspectSource)||(fr.inspectSource=function(t){return hr(t)});var pr=fr.inspectSource,dr=y,vr=a,gr=x,yr=lr,mr=pr,wr=function(){},br=[],_r=st("Reflect","construct"),kr=/^\s*(?:class|function)\b/,Er=dr(kr.exec),Ar=!kr.exec(wr),Tr=function(t){if(!gr(t))return!1;try{return _r(wr,br,t),!0}catch(e){return!1}},Cr=function(t){if(!gr(t))return!1;switch(yr(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Ar||!!Er(kr,mr(t))}catch(e){return!0}};Cr.sham=!0;var Sr=!_r||vr((function(){var t;return Tr(Tr.call)||!Tr(Object)||!Tr((function(){t=!0}))||t}))?Cr:Tr,xr=Fn,Lr=Sr,Mr=et,Or=pe("species"),Ir=Array,Pr=function(t){var e;return xr(t)&&(e=t.constructor,(Lr(e)&&(e===Ir||xr(e.prototype))||Mr(e)&&null===(e=e[Or]))&&(e=void 0)),void 0===e?Ir:e},Rr=function(t,e){return new(Pr(t))(0===e?0:e)},Br=a,Ur=gt,Dr=pe("species"),jr=function(t){return Ur>=51||!Br((function(){var e=[];return(e.constructor={})[Dr]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Fr=Mn,Nr=a,Hr=Fn,zr=et,Vr=$t,qr=Kn,Gr=$n,Yr=tr,Wr=Rr,Kr=jr,Xr=gt,$r=pe("isConcatSpreadable"),Jr=Xr>=51||!Nr((function(){var t=[];return t[$r]=!1,t.concat()[0]!==t})),Qr=function(t){if(!zr(t))return!1;var e=t[$r];return void 0!==e?!!e:Hr(t)};Fr({target:"Array",proto:!0,arity:1,forced:!Jr||!Kr("concat")},{concat:function(t){var e,n,r,i,o,a=Vr(this),s=Wr(a,0),u=0;for(e=-1,r=arguments.length;e<r;e++)if(Qr(o=-1===e?a:arguments[e]))for(i=qr(o),Gr(u+i),n=0;n<i;n++,u++)n in o&&Yr(s,u,o[n]);else Gr(u+1),Yr(s,u++,o);return s.length=u,s}});var Zr=lr,ti=String,ei=function(t){if("Symbol"===Zr(t))throw TypeError("Cannot convert a Symbol value to a string");return ti(t)},ni={},ri=Vn,ii=Math.max,oi=Math.min,ai=function(t,e){var n=ri(t);return n<0?ii(n+e,0):oi(n,e)},si=Q,ui=ai,li=Kn,ci=function(t){return function(e,n,r){var i,o=si(e),a=li(o),s=ui(r,a);if(t&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((t||s in o)&&o[s]===n)return t||s||0;return!t&&-1}},fi={includes:ci(!0),indexOf:ci(!1)},hi={},pi=Zt,di=Q,vi=fi.indexOf,gi=hi,yi=y([].push),mi=function(t,e){var n,r=di(t),i=0,o=[];for(n in r)!pi(gi,n)&&pi(r,n)&&yi(o,n);for(;e.length>i;)pi(r,n=e[i++])&&(~vi(o,n)||yi(o,n));return o},wi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],bi=mi,_i=wi,ki=Object.keys||function(t){return bi(t,_i)},Ei=M,Ai=Ze,Ti=Qe,Ci=rn,Si=Q,xi=ki;ni.f=Ei&&!Ai?Object.defineProperties:function(t,e){Ci(t);for(var n,r=Si(e),i=xi(e),o=i.length,a=0;o>a;)Ti.f(t,n=i[a++],r[n]);return t};var Li,Mi=st("document","documentElement"),Oi=ie,Ii=Wt("keys"),Pi=function(t){return Ii[t]||(Ii[t]=Oi(t))},Ri=rn,Bi=ni,Ui=wi,Di=hi,ji=Mi,Fi=Se,Ni="prototype",Hi="script",zi=Pi("IE_PROTO"),Vi=function(){},qi=function(t){return"<"+Hi+">"+t+"</"+Hi+">"},Gi=function(t){t.write(qi("")),t.close();var e=t.parentWindow.Object;return t=null,e},Yi=function(){try{Li=new ActiveXObject("htmlfile")}catch(i){}var t,e,n;Yi="undefined"!=typeof document?document.domain&&Li?Gi(Li):(e=Fi("iframe"),n="java"+Hi+":",e.style.display="none",ji.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(qi("document.F=Object")),t.close(),t.F):Gi(Li);for(var r=Ui.length;r--;)delete Yi[Ni][Ui[r]];return Yi()};Di[zi]=!0;var Wi=Object.create||function(t,e){var n;return null!==t?(Vi[Ni]=Ri(t),n=new Vi,Vi[Ni]=null,n[zi]=t):n=Yi(),void 0===e?n:Bi.f(n,e)},Ki={},Xi=mi,$i=wi.concat("length","prototype");Ki.f=Object.getOwnPropertyNames||function(t){return Xi(t,$i)};var Ji={},Qi=ai,Zi=Kn,to=tr,eo=Array,no=Math.max,ro=function(t,e,n){for(var r=Zi(t),i=Qi(e,r),o=Qi(void 0===n?r:n,r),a=eo(no(o-i,0)),s=0;i<o;i++,s++)to(a,s,t[i]);return a.length=s,a},io=_,oo=Q,ao=Ki.f,so=ro,uo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Ji.f=function(t){return uo&&"Window"==io(t)?function(t){try{return ao(t)}catch(e){return so(uo)}}(t):ao(oo(t))};var lo={};lo.f=Object.getOwnPropertySymbols;var co=mn,fo=function(t,e,n,r){return r&&r.enumerable?t[e]=n:co(t,e,n),t},ho=Qe,po=function(t,e,n){return ho.f(t,e,n)},vo={},go=pe;vo.f=go;var yo,mo,wo,bo=nt,_o=Zt,ko=vo,Eo=Qe.f,Ao=function(t){var e=bo.Symbol||(bo.Symbol={});_o(e,t)||Eo(e,t,{value:ko.f(t)})},To=P,Co=st,So=pe,xo=fo,Lo=function(){var t=Co("Symbol"),e=t&&t.prototype,n=e&&e.valueOf,r=So("toPrimitive");e&&!e[r]&&xo(e,r,(function(t){return To(n,this)}),{arity:1})},Mo=lr,Oo=nr?{}.toString:function(){return"[object "+Mo(this)+"]"},Io=nr,Po=Qe.f,Ro=mn,Bo=Zt,Uo=Oo,Do=pe("toStringTag"),jo=function(t,e,n,r){if(t){var i=n?t:t.prototype;Bo(i,Do)||Po(i,Do,{configurable:!0,value:e}),r&&!Io&&Ro(i,"toString",Uo)}},Fo=x,No=o.WeakMap,Ho=Fo(No)&&/native code/.test(String(No)),zo=o,Vo=et,qo=mn,Go=Zt,Yo=Gt,Wo=Pi,Ko=hi,Xo="Object already initialized",$o=zo.TypeError,Jo=zo.WeakMap;if(Ho||Yo.state){var Qo=Yo.state||(Yo.state=new Jo);Qo.get=Qo.get,Qo.has=Qo.has,Qo.set=Qo.set,yo=function(t,e){if(Qo.has(t))throw $o(Xo);return e.facade=t,Qo.set(t,e),e},mo=function(t){return Qo.get(t)||{}},wo=function(t){return Qo.has(t)}}else{var Zo=Wo("state");Ko[Zo]=!0,yo=function(t,e){if(Go(t,Zo))throw $o(Xo);return e.facade=t,qo(t,Zo,e),e},mo=function(t){return Go(t,Zo)?t[Zo]:{}},wo=function(t){return Go(t,Zo)}}var ta={set:yo,get:mo,has:wo,enforce:function(t){return wo(t)?mo(t):yo(t,{})},getterFor:function(t){return function(e){var n;if(!Vo(e)||(n=mo(e)).type!==t)throw $o("Incompatible receiver, "+t+" required");return n}}},ea=Je,na=G,ra=$t,ia=Kn,oa=Rr,aa=y([].push),sa=function(t){var e=1==t,n=2==t,r=3==t,i=4==t,o=6==t,a=7==t,s=5==t||o;return function(u,l,c,f){for(var h,p,d=ra(u),v=na(d),g=ea(l,c),y=ia(v),m=0,w=f||oa,b=e?w(u,y):n||a?w(u,0):void 0;y>m;m++)if((s||m in v)&&(p=g(h=v[m],m,d),t))if(e)b[m]=p;else if(p)switch(t){case 3:return!0;case 5:return h;case 6:return m;case 2:aa(b,h)}else switch(t){case 4:return!1;case 7:aa(b,h)}return o?-1:r||i?i:b}},ua={forEach:sa(0),map:sa(1),filter:sa(2),some:sa(3),every:sa(4),find:sa(5),findIndex:sa(6),filterReject:sa(7)},la=Mn,ca=o,fa=P,ha=y,pa=M,da=bt,va=a,ga=Zt,ya=ut,ma=rn,wa=Q,ba=Ee,_a=ei,ka=N,Ea=Wi,Aa=ki,Ta=Ki,Ca=Ji,Sa=lo,xa=L,La=Qe,Ma=ni,Oa=R,Ia=fo,Pa=po,Ra=Wt,Ba=hi,Ua=ie,Da=pe,ja=vo,Fa=Ao,Na=Lo,Ha=jo,za=ta,Va=ua.forEach,qa=Pi("hidden"),Ga="Symbol",Ya="prototype",Wa=za.set,Ka=za.getterFor(Ga),Xa=Object[Ya],$a=ca.Symbol,Ja=$a&&$a[Ya],Qa=ca.TypeError,Za=ca.QObject,ts=xa.f,es=La.f,ns=Ca.f,rs=Oa.f,is=ha([].push),os=Ra("symbols"),as=Ra("op-symbols"),ss=Ra("wks"),us=!Za||!Za[Ya]||!Za[Ya].findChild,ls=pa&&va((function(){return 7!=Ea(es({},"a",{get:function(){return es(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=ts(Xa,e);r&&delete Xa[e],es(t,e,n),r&&t!==Xa&&es(Xa,e,r)}:es,cs=function(t,e){var n=os[t]=Ea(Ja);return Wa(n,{type:Ga,tag:t,description:e}),pa||(n.description=e),n},fs=function(t,e,n){t===Xa&&fs(as,e,n),ma(t);var r=ba(e);return ma(n),ga(os,r)?(n.enumerable?(ga(t,qa)&&t[qa][r]&&(t[qa][r]=!1),n=Ea(n,{enumerable:ka(0,!1)})):(ga(t,qa)||es(t,qa,ka(1,{})),t[qa][r]=!0),ls(t,r,n)):es(t,r,n)},hs=function(t,e){ma(t);var n=wa(e),r=Aa(n).concat(gs(n));return Va(r,(function(e){pa&&!fa(ps,n,e)||fs(t,e,n[e])})),t},ps=function(t){var e=ba(t),n=fa(rs,this,e);return!(this===Xa&&ga(os,e)&&!ga(as,e))&&(!(n||!ga(this,e)||!ga(os,e)||ga(this,qa)&&this[qa][e])||n)},ds=function(t,e){var n=wa(t),r=ba(e);if(n!==Xa||!ga(os,r)||ga(as,r)){var i=ts(n,r);return!i||!ga(os,r)||ga(n,qa)&&n[qa][r]||(i.enumerable=!0),i}},vs=function(t){var e=ns(wa(t)),n=[];return Va(e,(function(t){ga(os,t)||ga(Ba,t)||is(n,t)})),n},gs=function(t){var e=t===Xa,n=ns(e?as:wa(t)),r=[];return Va(n,(function(t){!ga(os,t)||e&&!ga(Xa,t)||is(r,os[t])})),r};da||($a=function(){if(ya(Ja,this))throw Qa("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?_a(arguments[0]):void 0,e=Ua(t),n=function(t){this===Xa&&fa(n,as,t),ga(this,qa)&&ga(this[qa],e)&&(this[qa][e]=!1),ls(this,e,ka(1,t))};return pa&&us&&ls(Xa,e,{configurable:!0,set:n}),cs(e,t)},Ia(Ja=$a[Ya],"toString",(function(){return Ka(this).tag})),Ia($a,"withoutSetter",(function(t){return cs(Ua(t),t)})),Oa.f=ps,La.f=fs,Ma.f=hs,xa.f=ds,Ta.f=Ca.f=vs,Sa.f=gs,ja.f=function(t){return cs(Da(t),t)},pa&&Pa(Ja,"description",{configurable:!0,get:function(){return Ka(this).description}})),la({global:!0,constructor:!0,wrap:!0,forced:!da,sham:!da},{Symbol:$a}),Va(Aa(ss),(function(t){Fa(t)})),la({target:Ga,stat:!0,forced:!da},{useSetter:function(){us=!0},useSimple:function(){us=!1}}),la({target:"Object",stat:!0,forced:!da,sham:!pa},{create:function(t,e){return void 0===e?Ea(t):hs(Ea(t),e)},defineProperty:fs,defineProperties:hs,getOwnPropertyDescriptor:ds}),la({target:"Object",stat:!0,forced:!da},{getOwnPropertyNames:vs}),Na(),Ha($a,Ga),Ba[qa]=!0;var ys=bt&&!!Symbol.for&&!!Symbol.keyFor,ms=Mn,ws=st,bs=Zt,_s=ei,ks=Wt,Es=ys,As=ks("string-to-symbol-registry"),Ts=ks("symbol-to-string-registry");ms({target:"Symbol",stat:!0,forced:!Es},{for:function(t){var e=_s(t);if(bs(As,e))return As[e];var n=ws("Symbol")(e);return As[e]=n,Ts[n]=e,n}});var Cs=Mn,Ss=Zt,xs=Ct,Ls=xt,Ms=ys,Os=Wt("symbol-to-string-registry");Cs({target:"Symbol",stat:!0,forced:!Ms},{keyFor:function(t){if(!xs(t))throw TypeError(Ls(t)+" is not a symbol");if(Ss(Os,t))return Os[t]}});var Is=y([].slice),Ps=Fn,Rs=x,Bs=_,Us=ei,Ds=y([].push),js=Mn,Fs=st,Ns=h,Hs=P,zs=y,Vs=a,qs=x,Gs=Ct,Ys=Is,Ws=function(t){if(Rs(t))return t;if(Ps(t)){for(var e=t.length,n=[],r=0;r<e;r++){var i=t[r];"string"==typeof i?Ds(n,i):"number"!=typeof i&&"Number"!=Bs(i)&&"String"!=Bs(i)||Ds(n,Us(i))}var o=n.length,a=!0;return function(t,e){if(a)return a=!1,e;if(Ps(this))return e;for(var r=0;r<o;r++)if(n[r]===t)return e}}},Ks=bt,Xs=String,$s=Fs("JSON","stringify"),Js=zs(/./.exec),Qs=zs("".charAt),Zs=zs("".charCodeAt),tu=zs("".replace),eu=zs(1..toString),nu=/[\uD800-\uDFFF]/g,ru=/^[\uD800-\uDBFF]$/,iu=/^[\uDC00-\uDFFF]$/,ou=!Ks||Vs((function(){var t=Fs("Symbol")();return"[null]"!=$s([t])||"{}"!=$s({a:t})||"{}"!=$s(Object(t))})),au=Vs((function(){return'"\\udf06\\ud834"'!==$s("\udf06\ud834")||'"\\udead"'!==$s("\udead")})),su=function(t,e){var n=Ys(arguments),r=Ws(e);if(qs(r)||void 0!==t&&!Gs(t))return n[1]=function(t,e){if(qs(r)&&(e=Hs(r,this,Xs(t),e)),!Gs(e))return e},Ns($s,null,n)},uu=function(t,e,n){var r=Qs(n,e-1),i=Qs(n,e+1);return Js(ru,t)&&!Js(iu,i)||Js(iu,t)&&!Js(ru,r)?"\\u"+eu(Zs(t,0),16):t};$s&&js({target:"JSON",stat:!0,arity:3,forced:ou||au},{stringify:function(t,e,n){var r=Ys(arguments),i=Ns(ou?su:$s,null,r);return au&&"string"==typeof i?tu(i,nu,uu):i}});var lu=lo,cu=$t;Mn({target:"Object",stat:!0,forced:!bt||a((function(){lu.f(1)}))},{getOwnPropertySymbols:function(t){var e=lu.f;return e?e(cu(t)):[]}}),Ao("asyncIterator"),Ao("hasInstance"),Ao("isConcatSpreadable"),Ao("iterator"),Ao("match"),Ao("matchAll"),Ao("replace"),Ao("search"),Ao("species"),Ao("split");var fu=Lo;Ao("toPrimitive"),fu();var hu=st,pu=jo;Ao("toStringTag"),pu(hu("Symbol"),"Symbol"),Ao("unscopables"),jo(o.JSON,"JSON",!0);var du,vu,gu,yu=nt.Symbol,mu={},wu=M,bu=Zt,_u=Function.prototype,ku=wu&&Object.getOwnPropertyDescriptor,Eu=bu(_u,"name"),Au={EXISTS:Eu,PROPER:Eu&&"something"===function(){}.name,CONFIGURABLE:Eu&&(!wu||wu&&ku(_u,"name").configurable)},Tu=!a((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Cu=Zt,Su=x,xu=$t,Lu=Tu,Mu=Pi("IE_PROTO"),Ou=Object,Iu=Ou.prototype,Pu=Lu?Ou.getPrototypeOf:function(t){var e=xu(t);if(Cu(e,Mu))return e[Mu];var n=e.constructor;return Su(n)&&e instanceof n?n.prototype:e instanceof Ou?Iu:null},Ru=a,Bu=x,Uu=et,Du=Wi,ju=Pu,Fu=fo,Nu=pe("iterator"),Hu=!1;[].keys&&("next"in(gu=[].keys())?(vu=ju(ju(gu)))!==Object.prototype&&(du=vu):Hu=!0);var zu=!Uu(du)||Ru((function(){var t={};return du[Nu].call(t)!==t}));Bu((du=zu?{}:Du(du))[Nu])||Fu(du,Nu,(function(){return this}));var Vu={IteratorPrototype:du,BUGGY_SAFARI_ITERATORS:Hu},qu=Vu.IteratorPrototype,Gu=Wi,Yu=N,Wu=jo,Ku=mu,Xu=function(){return this},$u=function(t,e,n,r){var i=e+" Iterator";return t.prototype=Gu(qu,{next:Yu(+!r,n)}),Wu(t,i,!1,!0),Ku[i]=Xu,t},Ju=y,Qu=It,Zu=x,tl=String,el=TypeError,nl=function(t,e,n){try{return Ju(Qu(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(r){}},rl=rn,il=function(t){if("object"==typeof t||Zu(t))return t;throw el("Can't set "+tl(t)+" as a prototype")},ol=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=nl(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(r){}return function(n,r){return rl(n),il(r),e?t(n,r):n.__proto__=r,n}}():void 0),al=Mn,sl=P,ul=Au,ll=$u,cl=Pu,fl=jo,hl=fo,pl=mu,dl=Vu,vl=ul.PROPER,gl=dl.BUGGY_SAFARI_ITERATORS,yl=pe("iterator"),ml="keys",wl="values",bl="entries",_l=function(){return this},kl=function(t,e,n,r,i,o,a){ll(n,e,r);var s,u,l,c=function(t){if(t===i&&v)return v;if(!gl&&t in p)return p[t];switch(t){case ml:case wl:case bl:return function(){return new n(this,t)}}return function(){return new n(this)}},f=e+" Iterator",h=!1,p=t.prototype,d=p[yl]||p["@@iterator"]||i&&p[i],v=!gl&&d||c(i),g="Array"==e&&p.entries||d;if(g&&(s=cl(g.call(new t)))!==Object.prototype&&s.next&&(fl(s,f,!0,!0),pl[f]=_l),vl&&i==wl&&d&&d.name!==wl&&(h=!0,v=function(){return sl(d,this)}),i)if(u={values:c(wl),keys:o?v:c(ml),entries:c(bl)},a)for(l in u)(gl||h||!(l in p))&&hl(p,l,u[l]);else al({target:e,proto:!0,forced:gl||h},u);return a&&p[yl]!==v&&hl(p,yl,v,{name:i}),pl[e]=v,u},El=function(t,e){return{value:t,done:e}},Al=Q,Tl=mu,Cl=ta;Qe.f;var Sl=kl,xl=El,Ll="Array Iterator",Ml=Cl.set,Ol=Cl.getterFor(Ll);Sl(Array,"Array",(function(t,e){Ml(this,{type:Ll,target:Al(t),index:0,kind:e})}),(function(){var t=Ol(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,xl(void 0,!0)):xl("keys"==n?r:"values"==n?e[r]:[r,e[r]],!1)}),"values"),Tl.Arguments=Tl.Array;var Il={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Pl=o,Rl=lr,Bl=mn,Ul=mu,Dl=pe("toStringTag");for(var jl in Il){var Fl=Pl[jl],Nl=Fl&&Fl.prototype;Nl&&Rl(Nl)!==Dl&&Bl(Nl,Dl,jl),Ul[jl]=Ul.Array}var Hl=yu;Ao("dispose");var zl=Hl;Ao("asyncDispose");var Vl=Mn,ql=y,Gl=st("Symbol"),Yl=Gl.keyFor,Wl=ql(Gl.prototype.valueOf);Vl({target:"Symbol",stat:!0},{isRegistered:function(t){try{return void 0!==Yl(Wl(t))}catch(e){return!1}}});for(var Kl=Mn,Xl=Wt,$l=st,Jl=y,Ql=Ct,Zl=pe,tc=$l("Symbol"),ec=tc.isWellKnown,nc=$l("Object","getOwnPropertyNames"),rc=Jl(tc.prototype.valueOf),ic=Xl("wks"),oc=0,ac=nc(tc),sc=ac.length;oc<sc;oc++)try{var uc=ac[oc];Ql(tc[uc])&&Zl(uc)}catch(AR){}Kl({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(t){if(ec&&ec(t))return!0;try{for(var e=rc(t),n=0,r=nc(ic),i=r.length;n<i;n++)if(ic[r[n]]==e)return!0}catch(AR){}return!1}}),Ao("matcher"),Ao("metadataKey"),Ao("observable"),Ao("metadata"),Ao("patternMatch"),Ao("replaceAll");var lc=zl,cc=n(lc),fc=y,hc=Vn,pc=ei,dc=X,vc=fc("".charAt),gc=fc("".charCodeAt),yc=fc("".slice),mc=function(t){return function(e,n){var r,i,o=pc(dc(e)),a=hc(n),s=o.length;return a<0||a>=s?t?"":void 0:(r=gc(o,a))<55296||r>56319||a+1===s||(i=gc(o,a+1))<56320||i>57343?t?vc(o,a):r:t?yc(o,a,a+2):i-56320+(r-55296<<10)+65536}},wc={codeAt:mc(!1),charAt:mc(!0)},bc=wc.charAt,_c=ei,kc=ta,Ec=kl,Ac=El,Tc="String Iterator",Cc=kc.set,Sc=kc.getterFor(Tc);Ec(String,"String",(function(t){Cc(this,{type:Tc,string:_c(t),index:0})}),(function(){var t,e=Sc(this),n=e.string,r=e.index;return r>=n.length?Ac(void 0,!0):(t=bc(n,r),e.index+=t.length,Ac(t,!1))}));var xc=vo.f("iterator"),Lc=n(xc);function Mc(t){return(Mc="function"==typeof cc&&"symbol"==typeof Lc?function(t){return typeof t}:function(t){return t&&"function"==typeof cc&&t.constructor===cc&&t!==cc.prototype?"symbol":typeof t})(t)}var Oc=vo.f("toPrimitive"),Ic=n(Oc);function Pc(t){var e=function(t,e){if("object"!==Mc(t)||null===t)return t;var n=t[Ic];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Mc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Mc(e)?e:String(e)}function Rc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Dn(t,Pc(r.key),r)}}function Bc(t,e,n){return e&&Rc(t.prototype,e),n&&Rc(t,n),Dn(t,"prototype",{writable:!1}),t}function Uc(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var Dc=Zt,jc=P,Fc=et,Nc=rn,Hc=function(t){return void 0!==t&&(Dc(t,"value")||Dc(t,"writable"))},zc=L,Vc=Pu;Mn({target:"Reflect",stat:!0},{get:function t(e,n){var r,i,o=arguments.length<3?e:arguments[2];return Nc(e)===o?e[n]:(r=zc.f(e,n))?Hc(r)?r.value:void 0===r.get?void 0:jc(r.get,o):Fc(i=Vc(e))?t(i,n,o):void 0}});var qc=nt.Reflect.get,Gc=n(qc),Yc=y,Wc=It,Kc=et,Xc=Zt,$c=Is,Jc=s,Qc=Function,Zc=Yc([].concat),tf=Yc([].join),ef={},nf=Jc?Qc.bind:function(t){var e=Wc(this),n=e.prototype,r=$c(arguments,1),i=function(){var n=Zc(r,$c(arguments));return this instanceof i?function(t,e,n){if(!Xc(ef,e)){for(var r=[],i=0;i<e;i++)r[i]="a["+i+"]";ef[e]=Qc("C,a","return new C("+tf(r,",")+")")}return ef[e](t,n)}(e,n.length,n):e.apply(t,n)};return Kc(n)&&(i.prototype=n),i},rf=nf;Mn({target:"Function",proto:!0,forced:Function.bind!==rf},{bind:rf});var of=nt,af=function(t){return of[t+"Prototype"]},sf=af("Function").bind,uf=ut,lf=sf,cf=Function.prototype,ff=function(t){var e=t.bind;return t===cf||uf(cf,t)&&e===cf.bind?lf:e},hf=n(ff),pf={exports:{}},df=Mn,vf=a,gf=Q,yf=L.f,mf=M;df({target:"Object",stat:!0,forced:!mf||vf((function(){yf(1)})),sham:!mf},{getOwnPropertyDescriptor:function(t,e){return yf(gf(t),e)}});var wf=nt.Object,bf=pf.exports=function(t,e){return wf.getOwnPropertyDescriptor(t,e)};wf.getOwnPropertyDescriptor.sham&&(bf.sham=!0);var _f=pf.exports,kf=n(_f);Mn({target:"Object",stat:!0},{setPrototypeOf:ol});var Ef=nt.Object.setPrototypeOf,Af=n(Ef),Tf=$t,Cf=Pu,Sf=Tu;Mn({target:"Object",stat:!0,forced:a((function(){Cf(1)})),sham:!Sf},{getPrototypeOf:function(t){return Cf(Tf(t))}});var xf=nt.Object.getPrototypeOf,Lf=n(xf);function Mf(t){var e;return(Mf=Af?hf(e=Lf).call(e):function(t){return t.__proto__||Lf(t)})(t)}function Of(){var t;"undefined"!=typeof Reflect&&Gc?Of=hf(t=Gc).call(t):Of=function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Mf(t)););return t}(t,e);if(r){var i=kf(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}};return Of.apply(this,arguments)}Mn({target:"Object",stat:!0,sham:!M},{create:Wi});var If=nt.Object,Pf=function(t,e){return If.create(t,e)},Rf=n(Pf);function Bf(t,e){var n;return(Bf=Af?hf(n=Af).call(n):function(t,e){return t.__proto__=e,t})(t,e)}function Uf(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Rf(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Dn(t,"prototype",{writable:!1}),e&&Bf(t,e)}var Df=Sr,jf=xt,Ff=TypeError,Nf=function(t){if(Df(t))return t;throw Ff(jf(t)+" is not a constructor")},Hf=Mn,zf=h,Vf=nf,qf=Nf,Gf=rn,Yf=et,Wf=Wi,Kf=a,Xf=st("Reflect","construct"),$f=Object.prototype,Jf=[].push,Qf=Kf((function(){function t(){}return!(Xf((function(){}),[],t)instanceof t)})),Zf=!Kf((function(){Xf((function(){}))})),th=Qf||Zf;Hf({target:"Reflect",stat:!0,forced:th,sham:th},{construct:function(t,e){qf(t),Gf(e);var n=arguments.length<3?t:qf(arguments[2]);if(Zf&&!Qf)return Xf(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return zf(Jf,r,e),new(zf(Vf,t,r))}var i=n.prototype,o=Wf(Yf(i)?i:$f),a=zf(t,o,e);return Yf(a)?a:o}});var eh=nt.Reflect.construct,nh=n(eh);function rh(t){var e=function(){if("undefined"==typeof Reflect||!nh)return!1;if(nh.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(nh(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Mf(t);if(e){var i=Mf(this).constructor;n=nh(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===Mc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Uc(t)}(this,n)}}function ih(t,e,n){return(e=Pc(e))in t?Dn(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var oh=af("Array").concat,ah=ut,sh=oh,uh=Array.prototype,lh=n((function(t){var e=t.concat;return t===uh||ah(uh,t)&&e===uh.concat?sh:e})),ch="ad_start",fh="ad_play",hh="ad_pause",ph="ad_time_update",dh="ad_skipped",vh="ad_error",gh="ad_complete",yh="ad_all_completed",mh="ima_sdk_load_start",wh="ima_sdk_load_success",bh="ima_sdk_load_error",_h="ima_ad_manager_ready",kh="ima_ad_complete",Eh="ima_ad_error",Ah="ima_ad_loaded",Th="ima_content_pause_requested",Ch="ima_content_resume_requested",Sh="ima_ready_to_play",xh=nt,Lh=h;xh.JSON||(xh.JSON={stringify:JSON.stringify});var Mh=function(t,e,n){return Lh(xh.JSON.stringify,null,arguments)},Oh=n(Mh),Ih=n(lc),Ph=lr,Rh=Bt,Bh=Y,Uh=mu,Dh=pe("iterator"),jh=function(t){if(!Bh(t))return Rh(t,Dh)||Rh(t,"@@iterator")||Uh[Ph(t)]},Fh=jh,Nh=n(Fh),Hh=n(Fh),zh=$t,Vh=ki;Mn({target:"Object",stat:!0,forced:a((function(){Vh(1)}))},{keys:function(t){return Vh(zh(t))}});var qh=n(nt.Object.keys),Gh=n(nt.Object.getOwnPropertySymbols),Yh=ua.filter;Mn({target:"Array",proto:!0,forced:!jr("filter")},{filter:function(t){return Yh(this,t,arguments.length>1?arguments[1]:void 0)}});var Wh=af("Array").filter,Kh=ut,Xh=Wh,$h=Array.prototype,Jh=n((function(t){var e=t.filter;return t===$h||Kh($h,t)&&e===$h.filter?Xh:e})),Qh=n(_f),Zh=a,tp=function(t,e){var n=[][t];return!!n&&Zh((function(){n.call(null,e||function(){return 1},1)}))},ep=ua.forEach,np=tp("forEach")?[].forEach:function(t){return ep(this,t,arguments.length>1?arguments[1]:void 0)};Mn({target:"Array",proto:!0,forced:[].forEach!=np},{forEach:np});var rp=af("Array").forEach,ip=lr,op=Zt,ap=ut,sp=rp,up=Array.prototype,lp={DOMTokenList:!0,NodeList:!0},cp=function(t){var e=t.forEach;return t===up||ap(up,t)&&e===up.forEach||op(lp,ip(t))?sp:e},fp=n(cp),hp=n(cp),pp=st,dp=Ki,vp=lo,gp=rn,yp=y([].concat),mp=pp("Reflect","ownKeys")||function(t){var e=dp.f(gp(t)),n=vp.f;return n?yp(e,n(t)):e},wp=mp,bp=Q,_p=L,kp=tr;Mn({target:"Object",stat:!0,sham:!M},{getOwnPropertyDescriptors:function(t){for(var e,n,r=bp(t),i=_p.f,o=wp(r),a={},s=0;o.length>s;)void 0!==(n=i(r,e=o[s++]))&&kp(a,e,n);return a}});var Ep=n(nt.Object.getOwnPropertyDescriptors),Ap={exports:{}},Tp=Mn,Cp=M,Sp=ni.f;Tp({target:"Object",stat:!0,forced:Object.defineProperties!==Sp,sham:!Cp},{defineProperties:Sp});var xp=nt.Object,Lp=Ap.exports=function(t,e){return xp.defineProperties(t,e)};xp.defineProperties.sham&&(Lp.sham=!0);var Mp=n(Ap.exports),Op=n(Un),Ip=n(Pf),Pp=n(xf),Rp=n(Ef),Bp=Zt,Up=mp,Dp=L,jp=Qe,Fp=et,Np=mn,Hp=Error,zp=y("".replace),Vp=String(Hp("zxcasd").stack),qp=/\n\s*at [^:]*:[^\n]*/,Gp=qp.test(Vp),Yp=N,Wp=!a((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",Yp(1,7)),7!==t.stack)})),Kp=mn,Xp=function(t,e){if(Gp&&"string"==typeof t&&!Hp.prepareStackTrace)for(;e--;)t=zp(t,qp,"");return t},$p=Wp,Jp=Error.captureStackTrace,Qp=mu,Zp=pe("iterator"),td=Array.prototype,ed=function(t){return void 0!==t&&(Qp.Array===t||td[Zp]===t)},nd=P,rd=It,id=rn,od=xt,ad=jh,sd=TypeError,ud=function(t,e){var n=arguments.length<2?ad(t):e;if(rd(n))return id(nd(n,t));throw sd(od(t)+" is not iterable")},ld=P,cd=rn,fd=Bt,hd=function(t,e,n){var r,i;cd(t);try{if(!(r=fd(t,"return"))){if("throw"===e)throw n;return n}r=ld(r,t)}catch(AR){i=!0,r=AR}if("throw"===e)throw n;if(i)throw r;return cd(r),n},pd=Je,dd=P,vd=rn,gd=xt,yd=ed,md=Kn,wd=ut,bd=ud,_d=jh,kd=hd,Ed=TypeError,Ad=function(t,e){this.stopped=t,this.result=e},Td=Ad.prototype,Cd=function(t,e,n){var r,i,o,a,s,u,l,c=n&&n.that,f=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),p=!(!n||!n.IS_ITERATOR),d=!(!n||!n.INTERRUPTED),v=pd(e,c),g=function(t){return r&&kd(r,"normal",t),new Ad(!0,t)},y=function(t){return f?(vd(t),d?v(t[0],t[1],g):v(t[0],t[1])):d?v(t,g):v(t)};if(h)r=t.iterator;else if(p)r=t;else{if(!(i=_d(t)))throw Ed(gd(t)+" is not iterable");if(yd(i)){for(o=0,a=md(t);a>o;o++)if((s=y(t[o]))&&wd(Td,s))return s;return new Ad(!1)}r=bd(t,i)}for(u=h?t.next:r.next;!(l=dd(u,r)).done;){try{s=y(l.value)}catch(AR){kd(r,"throw",AR)}if("object"==typeof s&&s&&wd(Td,s))return s}return new Ad(!1)},Sd=ei,xd=Mn,Ld=ut,Md=Pu,Od=ol,Id=function(t,e,n){for(var r=Up(e),i=jp.f,o=Dp.f,a=0;a<r.length;a++){var s=r[a];Bp(t,s)||n&&Bp(n,s)||i(t,s,o(e,s))}},Pd=Wi,Rd=mn,Bd=N,Ud=function(t,e){Fp(e)&&"cause"in e&&Np(t,"cause",e.cause)},Dd=function(t,e,n,r){$p&&(Jp?Jp(t,e):Kp(t,"stack",Xp(n,r)))},jd=Cd,Fd=function(t,e){return void 0===t?arguments.length<2?"":e:Sd(t)},Nd=pe("toStringTag"),Hd=Error,zd=[].push,Vd=function(t,e){var n,r=Ld(qd,this);Od?n=Od(Hd(),r?Md(this):qd):(n=r?this:Pd(qd),Rd(n,Nd,"Error")),void 0!==e&&Rd(n,"message",Fd(e)),Dd(n,Vd,n.stack,1),arguments.length>2&&Ud(n,arguments[2]);var i=[];return jd(t,zd,{that:i}),Rd(n,"errors",i),n};Od?Od(Vd,Hd):Id(Vd,Hd,{name:!0});var qd=Vd.prototype=Pd(Hd.prototype,{constructor:Bd(1,Vd),message:Bd(1,""),name:Bd(1,"AggregateError")});xd({global:!0,constructor:!0,arity:2},{AggregateError:Vd});var Gd,Yd,Wd,Kd,Xd="undefined"!=typeof process&&"process"==_(process),$d=st,Jd=po,Qd=M,Zd=pe("species"),tv=function(t){var e=$d(t);Qd&&e&&!e[Zd]&&Jd(e,Zd,{configurable:!0,get:function(){return this}})},ev=ut,nv=TypeError,rv=function(t,e){if(ev(e,t))return t;throw nv("Incorrect invocation")},iv=rn,ov=Nf,av=Y,sv=pe("species"),uv=function(t,e){var n,r=iv(t).constructor;return void 0===r||av(n=iv(r)[sv])?e:ov(n)},lv=TypeError,cv=function(t,e){if(t<e)throw lv("Not enough arguments");return t},fv=/(?:ipad|iphone|ipod).*applewebkit/i.test(lt),hv=o,pv=h,dv=Je,vv=x,gv=Zt,yv=a,mv=Mi,wv=Is,bv=Se,_v=cv,kv=fv,Ev=Xd,Av=hv.setImmediate,Tv=hv.clearImmediate,Cv=hv.process,Sv=hv.Dispatch,xv=hv.Function,Lv=hv.MessageChannel,Mv=hv.String,Ov=0,Iv={},Pv="onreadystatechange";yv((function(){Gd=hv.location}));var Rv=function(t){if(gv(Iv,t)){var e=Iv[t];delete Iv[t],e()}},Bv=function(t){return function(){Rv(t)}},Uv=function(t){Rv(t.data)},Dv=function(t){hv.postMessage(Mv(t),Gd.protocol+"//"+Gd.host)};Av&&Tv||(Av=function(t){_v(arguments.length,1);var e=vv(t)?t:xv(t),n=wv(arguments,1);return Iv[++Ov]=function(){pv(e,void 0,n)},Yd(Ov),Ov},Tv=function(t){delete Iv[t]},Ev?Yd=function(t){Cv.nextTick(Bv(t))}:Sv&&Sv.now?Yd=function(t){Sv.now(Bv(t))}:Lv&&!kv?(Kd=(Wd=new Lv).port2,Wd.port1.onmessage=Uv,Yd=dv(Kd.postMessage,Kd)):hv.addEventListener&&vv(hv.postMessage)&&!hv.importScripts&&Gd&&"file:"!==Gd.protocol&&!yv(Dv)?(Yd=Dv,hv.addEventListener("message",Uv,!1)):Yd=Pv in bv("script")?function(t){mv.appendChild(bv("script"))[Pv]=function(){mv.removeChild(this),Rv(t)}}:function(t){setTimeout(Bv(t),0)});var jv={set:Av,clear:Tv},Fv=function(){this.head=null,this.tail=null};Fv.prototype={add:function(t){var e={item:t,next:null},n=this.tail;n?n.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var Nv,Hv,zv,Vv,qv,Gv=Fv,Yv=/ipad|iphone|ipod/i.test(lt)&&"undefined"!=typeof Pebble,Wv=/web0s(?!.*chrome)/i.test(lt),Kv=o,Xv=Je,$v=L.f,Jv=jv.set,Qv=Gv,Zv=fv,tg=Yv,eg=Wv,ng=Xd,rg=Kv.MutationObserver||Kv.WebKitMutationObserver,ig=Kv.document,og=Kv.process,ag=Kv.Promise,sg=$v(Kv,"queueMicrotask"),ug=sg&&sg.value;if(!ug){var lg=new Qv,cg=function(){var t,e;for(ng&&(t=og.domain)&&t.exit();e=lg.get();)try{e()}catch(AR){throw lg.head&&Nv(),AR}t&&t.enter()};Zv||ng||eg||!rg||!ig?!tg&&ag&&ag.resolve?((Vv=ag.resolve(void 0)).constructor=ag,qv=Xv(Vv.then,Vv),Nv=function(){qv(cg)}):ng?Nv=function(){og.nextTick(cg)}:(Jv=Xv(Jv,Kv),Nv=function(){Jv(cg)}):(Hv=!0,zv=ig.createTextNode(""),new rg(cg).observe(zv,{characterData:!0}),Nv=function(){zv.data=Hv=!Hv}),ug=function(t){lg.head||Nv(),lg.add(t)}}var fg=ug,hg=function(t){try{return{error:!1,value:t()}}catch(AR){return{error:!0,value:AR}}},pg=o.Promise,dg="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,vg=!dg&&!Xd&&"object"==typeof window&&"object"==typeof document,gg=o,yg=pg,mg=x,wg=We,bg=pr,_g=pe,kg=vg,Eg=dg,Ag=gt,Tg=yg&&yg.prototype,Cg=_g("species"),Sg=!1,xg=mg(gg.PromiseRejectionEvent),Lg={CONSTRUCTOR:wg("Promise",(function(){var t=bg(yg),e=t!==String(yg);if(!e&&66===Ag)return!0;if(!Tg.catch||!Tg.finally)return!0;if(!Ag||Ag<51||!/native code/.test(t)){var n=new yg((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[Cg]=r,!(Sg=n.then((function(){}))instanceof r))return!0}return!e&&(kg||Eg)&&!xg})),REJECTION_EVENT:xg,SUBCLASSING:Sg},Mg={},Og=It,Ig=TypeError,Pg=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw Ig("Bad Promise constructor");e=t,n=r})),this.resolve=Og(e),this.reject=Og(n)};Mg.f=function(t){return new Pg(t)};var Rg,Bg,Ug=Mn,Dg=Xd,jg=o,Fg=P,Ng=fo,Hg=jo,zg=tv,Vg=It,qg=x,Gg=et,Yg=rv,Wg=uv,Kg=jv.set,Xg=fg,$g=function(t,e){try{1==arguments.length?console.error(t):console.error(t,e)}catch(AR){}},Jg=hg,Qg=Gv,Zg=ta,ty=pg,ey=Lg,ny=Mg,ry="Promise",iy=ey.CONSTRUCTOR,oy=ey.REJECTION_EVENT,ay=Zg.getterFor(ry),sy=Zg.set,uy=ty&&ty.prototype,ly=ty,cy=uy,fy=jg.TypeError,hy=jg.document,py=jg.process,dy=ny.f,vy=dy,gy=!!(hy&&hy.createEvent&&jg.dispatchEvent),yy="unhandledrejection",my=function(t){var e;return!(!Gg(t)||!qg(e=t.then))&&e},wy=function(t,e){var n,r,i,o=e.value,a=1==e.state,s=a?t.ok:t.fail,u=t.resolve,l=t.reject,c=t.domain;try{s?(a||(2===e.rejection&&Ay(e),e.rejection=1),!0===s?n=o:(c&&c.enter(),n=s(o),c&&(c.exit(),i=!0)),n===t.promise?l(fy("Promise-chain cycle")):(r=my(n))?Fg(r,n,u,l):u(n)):l(o)}catch(AR){c&&!i&&c.exit(),l(AR)}},by=function(t,e){t.notified||(t.notified=!0,Xg((function(){for(var n,r=t.reactions;n=r.get();)wy(n,t);t.notified=!1,e&&!t.rejection&&ky(t)})))},_y=function(t,e,n){var r,i;gy?((r=hy.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),jg.dispatchEvent(r)):r={promise:e,reason:n},!oy&&(i=jg["on"+t])?i(r):t===yy&&$g("Unhandled promise rejection",n)},ky=function(t){Fg(Kg,jg,(function(){var e,n=t.facade,r=t.value;if(Ey(t)&&(e=Jg((function(){Dg?py.emit("unhandledRejection",r,n):_y(yy,n,r)})),t.rejection=Dg||Ey(t)?2:1,e.error))throw e.value}))},Ey=function(t){return 1!==t.rejection&&!t.parent},Ay=function(t){Fg(Kg,jg,(function(){var e=t.facade;Dg?py.emit("rejectionHandled",e):_y("rejectionhandled",e,t.value)}))},Ty=function(t,e,n){return function(r){t(e,r,n)}},Cy=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,by(t,!0))},Sy=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw fy("Promise can't be resolved itself");var r=my(e);r?Xg((function(){var n={done:!1};try{Fg(r,e,Ty(Sy,n,t),Ty(Cy,n,t))}catch(AR){Cy(n,AR,t)}})):(t.value=e,t.state=1,by(t,!1))}catch(AR){Cy({done:!1},AR,t)}}};iy&&(cy=(ly=function(t){Yg(this,cy),Vg(t),Fg(Rg,this);var e=ay(this);try{t(Ty(Sy,e),Ty(Cy,e))}catch(AR){Cy(e,AR)}}).prototype,(Rg=function(t){sy(this,{type:ry,done:!1,notified:!1,parent:!1,reactions:new Qg,rejection:!1,state:0,value:void 0})}).prototype=Ng(cy,"then",(function(t,e){var n=ay(this),r=dy(Wg(this,ly));return n.parent=!0,r.ok=!qg(t)||t,r.fail=qg(e)&&e,r.domain=Dg?py.domain:void 0,0==n.state?n.reactions.add(r):Xg((function(){wy(r,n)})),r.promise})),Bg=function(){var t=new Rg,e=ay(t);this.promise=t,this.resolve=Ty(Sy,e),this.reject=Ty(Cy,e)},ny.f=dy=function(t){return t===ly||undefined===t?new Bg(t):vy(t)}),Ug({global:!0,constructor:!0,wrap:!0,forced:iy},{Promise:ly}),Hg(ly,ry,!1,!0),zg(ry);var xy=pe("iterator"),Ly=!1;try{var My=0,Oy={next:function(){return{done:!!My++}},return:function(){Ly=!0}};Oy[xy]=function(){return this},Array.from(Oy,(function(){throw 2}))}catch(AR){}var Iy=function(t,e){if(!e&&!Ly)return!1;var n=!1;try{var r={};r[xy]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(AR){}return n},Py=pg,Ry=Lg.CONSTRUCTOR||!Iy((function(t){Py.all(t).then(void 0,(function(){}))})),By=P,Uy=It,Dy=Mg,jy=hg,Fy=Cd;Mn({target:"Promise",stat:!0,forced:Ry},{all:function(t){var e=this,n=Dy.f(e),r=n.resolve,i=n.reject,o=jy((function(){var n=Uy(e.resolve),o=[],a=0,s=1;Fy(t,(function(t){var u=a++,l=!1;s++,By(n,e,t).then((function(t){l||(l=!0,o[u]=t,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise}});var Ny=Mn,Hy=Lg.CONSTRUCTOR;pg&&pg.prototype,Ny({target:"Promise",proto:!0,forced:Hy,real:!0},{catch:function(t){return this.then(void 0,t)}});var zy=P,Vy=It,qy=Mg,Gy=hg,Yy=Cd;Mn({target:"Promise",stat:!0,forced:Ry},{race:function(t){var e=this,n=qy.f(e),r=n.reject,i=Gy((function(){var i=Vy(e.resolve);Yy(t,(function(t){zy(i,e,t).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var Wy=P,Ky=Mg;Mn({target:"Promise",stat:!0,forced:Lg.CONSTRUCTOR},{reject:function(t){var e=Ky.f(this);return Wy(e.reject,void 0,t),e.promise}});var Xy=rn,$y=et,Jy=Mg,Qy=function(t,e){if(Xy(t),$y(e)&&e.constructor===t)return e;var n=Jy.f(t);return(0,n.resolve)(e),n.promise},Zy=Mn,tm=pg,em=Lg.CONSTRUCTOR,nm=Qy,rm=st("Promise"),im=!em;Zy({target:"Promise",stat:!0,forced:true},{resolve:function(t){return nm(im&&this===rm?tm:this,t)}});var om=P,am=It,sm=Mg,um=hg,lm=Cd;Mn({target:"Promise",stat:!0,forced:Ry},{allSettled:function(t){var e=this,n=sm.f(e),r=n.resolve,i=n.reject,o=um((function(){var n=am(e.resolve),i=[],o=0,a=1;lm(t,(function(t){var s=o++,u=!1;a++,om(n,e,t).then((function(t){u||(u=!0,i[s]={status:"fulfilled",value:t},--a||r(i))}),(function(t){u||(u=!0,i[s]={status:"rejected",reason:t},--a||r(i))}))})),--a||r(i)}));return o.error&&i(o.value),n.promise}});var cm=P,fm=It,hm=st,pm=Mg,dm=hg,vm=Cd,gm="No one promise resolved";Mn({target:"Promise",stat:!0,forced:Ry},{any:function(t){var e=this,n=hm("AggregateError"),r=pm.f(e),i=r.resolve,o=r.reject,a=dm((function(){var r=fm(e.resolve),a=[],s=0,u=1,l=!1;vm(t,(function(t){var c=s++,f=!1;u++,cm(r,e,t).then((function(t){f||l||(l=!0,i(t))}),(function(t){f||l||(f=!0,a[c]=t,--u||o(new n(a,gm)))}))})),--u||o(new n(a,gm))}));return a.error&&o(a.value),r.promise}});var ym=Mn,mm=pg,wm=a,bm=st,_m=x,km=uv,Em=Qy,Am=mm&&mm.prototype;ym({target:"Promise",proto:!0,real:!0,forced:!!mm&&wm((function(){Am.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=km(this,bm("Promise")),n=_m(t);return this.then(n?function(n){return Em(e,t()).then((function(){return n}))}:t,n?function(n){return Em(e,t()).then((function(){throw n}))}:t)}});var Tm=nt.Promise,Cm=Mg,Sm=hg;Mn({target:"Promise",stat:!0,forced:!0},{try:function(t){var e=Cm.f(this),n=Sm(t);return(n.error?e.reject:e.resolve)(n.value),e.promise}});var xm=Tm,Lm=n(xm),Mm=n(xm),Om=Mn,Im=Fn,Pm=y([].reverse),Rm=[1,2];Om({target:"Array",proto:!0,forced:String(Rm)===String(Rm.reverse())},{reverse:function(){return Im(this)&&(this.length=this.length),Pm(this)}});var Bm=af("Array").reverse,Um=ut,Dm=Bm,jm=Array.prototype,Fm=function(t){var e=t.reverse;return t===jm||Um(jm,t)&&e===jm.reverse?Dm:e},Nm=n(Fm),Hm=n(Fm),zm=Mn,Vm=Fn,qm=Sr,Gm=et,Ym=ai,Wm=Kn,Km=Q,Xm=tr,$m=pe,Jm=Is,Qm=jr("slice"),Zm=$m("species"),tw=Array,ew=Math.max;zm({target:"Array",proto:!0,forced:!Qm},{slice:function(t,e){var n,r,i,o=Km(this),a=Wm(o),s=Ym(t,a),u=Ym(void 0===e?a:e,a);if(Vm(o)&&(n=o.constructor,(qm(n)&&(n===tw||Vm(n.prototype))||Gm(n)&&null===(n=n[Zm]))&&(n=void 0),n===tw||void 0===n))return Jm(o,s,u);for(r=new(void 0===n?tw:n)(ew(u-s,0)),i=0;s<u;s++,i++)s in o&&Xm(r,i,o[s]);return r.length=i,r}});var nw=af("Array").slice,rw=ut,iw=nw,ow=Array.prototype,aw=function(t){var e=t.slice;return t===ow||rw(ow,t)&&e===ow.slice?iw:e},sw=n(aw),uw=n(aw),lw=n(xc),cw=n(ff),fw=n(eh),hw=n(qc);Mn({target:"Array",stat:!0},{isArray:Fn});var pw=nt.Array.isArray,dw=n(pw),vw=n(pw),gw=rn,yw=hd,mw=Je,ww=P,bw=$t,_w=function(t,e,n,r){try{return r?e(gw(n)[0],n[1]):e(n)}catch(AR){yw(t,"throw",AR)}},kw=ed,Ew=Sr,Aw=Kn,Tw=tr,Cw=ud,Sw=jh,xw=Array,Lw=function(t){var e=bw(t),n=Ew(this),r=arguments.length,i=r>1?arguments[1]:void 0,o=void 0!==i;o&&(i=mw(i,r>2?arguments[2]:void 0));var a,s,u,l,c,f,h=Sw(e),p=0;if(!h||this===xw&&kw(h))for(a=Aw(e),s=n?new this(a):xw(a);a>p;p++)f=o?i(e[p],p):e[p],Tw(s,p,f);else for(c=(l=Cw(e,h)).next,s=n?new this:[];!(u=ww(c,l)).done;p++)f=o?_w(l,i,[u.value,p],!0):u.value,Tw(s,p,f);return s.length=p,s},Mw=Lw;Mn({target:"Array",stat:!0,forced:!Iy((function(t){Array.from(t)}))},{from:Mw});var Ow=nt.Array.from,Iw=n(Ow),Pw=n(Ow),Rw=n(Oc);function Bw(t,e){var n=qh(t);if(Gh){var r=Gh(t);e&&(r=Jh(r).call(r,(function(e){return Qh(t,e).enumerable}))),n.push.apply(n,r)}return n}function Uw(t){for(var e=1;e<arguments.length;e++){var n,r,i=null!=arguments[e]?arguments[e]:{};e%2?hp(n=Bw(Object(i),!0)).call(n,(function(e){qw(t,e,i[e])})):Ep?Mp(t,Ep(i)):hp(r=Bw(Object(i))).call(r,(function(e){Op(t,e,Qh(i,e))}))}return t}function Dw(){Dw=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Op||function(t,e,n){t[e]=n.value},i="function"==typeof Ih?Ih:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Op(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(S){u=function(t,e,n){return t[e]=n}}function l(t,e,n,i){var o=e&&e.prototype instanceof h?e:h,a=Ip(o.prototype),s=new A(i||[]);return r(a,"_invoke",{value:b(t,n,s)}),a}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=l;var f={};function h(){}function p(){}function d(){}var v={};u(v,o,(function(){return this}));var g=Pp&&Pp(Pp(T([])));g&&g!==e&&n.call(g,o)&&(v=g);var y=d.prototype=h.prototype=Ip(v);function m(t){var e;hp(e=["next","throw","return"]).call(e,(function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function i(r,o,a,s){var u=c(t[r],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==Mc(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,s)}),(function(t){i("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return i("throw",t,a,s)}))}s(u.arg)}var o;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){i(t,n,e,r)}))}return o=o?o.then(r,r):r()}})}function b(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function _(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=c(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],hp(t).call(t,k,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return p.prototype=d,r(y,"constructor",{value:d,configurable:!0}),r(d,"constructor",{value:p,configurable:!0}),p.displayName=u(d,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Rp?Rp(t,d):(t.__proto__=d,u(t,s,"GeneratorFunction")),t.prototype=Ip(y),t},t.awrap=function(t){return{__await:t}},m(w.prototype),u(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,i,o){void 0===o&&(o=Mm);var a=new w(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(y),u(y,s,"Generator"),u(y,o,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return Hm(n).call(n),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=T,A.prototype={constructor:A,reset:function(t){var e;if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,hp(e=this.tryEntries).call(e,E),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+uw(r).call(r,1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:T(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function jw(t){return(jw="function"==typeof Ih&&"symbol"==typeof lw?function(t){return typeof t}:function(t){return t&&"function"==typeof Ih&&t.constructor===Ih&&t!==Ih.prototype?"symbol":typeof t})(t)}function Fw(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(AR){return void n(AR)}s.done?e(u):Mm.resolve(u).then(r,i)}function Nw(t){return function(){var e=this,n=arguments;return new Mm((function(r,i){var o=t.apply(e,n);function a(t){Fw(o,r,i,a,s,"next",t)}function s(t){Fw(o,r,i,a,s,"throw",t)}a(void 0)}))}}function Hw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zw(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Op(t,Zw(r.key),r)}}function Vw(t,e,n){return e&&zw(t.prototype,e),n&&zw(t,n),Op(t,"prototype",{writable:!1}),t}function qw(t,e,n){return(e=Zw(e))in t?Op(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Gw(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Ip(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Op(t,"prototype",{writable:!1}),e&&Ww(t,e)}function Yw(t){var e;return(Yw=Rp?cw(e=Pp).call(e):function(t){return t.__proto__||Pp(t)})(t)}function Ww(t,e){var n;return(Ww=Rp?cw(n=Rp).call(n):function(t,e){return t.__proto__=e,t})(t,e)}function Kw(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Xw(t){var e=function(){if("undefined"==typeof Reflect||!fw)return!1;if(fw.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(fw(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Yw(t);if(e){var i=Yw(this).constructor;n=fw(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===Mc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Kw(t)}(this,n)}}function $w(){var t;"undefined"!=typeof Reflect&&hw?$w=cw(t=hw).call(t):$w=function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Yw(t)););return t}(t,e);if(r){var i=Qh(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}};return $w.apply(this,arguments)}function Jw(t,e){return function(t){if(vw(t))return t}(t)||function(t,e){var n=null==t?null:void 0!==Ih&&Hh(t)||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(t,e)||function(t,e){var n;if(!t)return;if("string"==typeof t)return Qw(t,e);var r=uw(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Pw(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Qw(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qw(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Zw(t){var e=function(t,e){if("object"!==Mc(t)||null===t)return t;var n=t[Rw];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Mc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Mc(e)?e:String(e)}var tb=Mn,eb=fi.indexOf,nb=tp,rb=A([].indexOf),ib=!!rb&&1/rb([1],1,-0)<0;tb({target:"Array",proto:!0,forced:ib||!nb("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return ib?rb(this,t,e)||0:eb(this,t,e)}});var ob=af("Array").indexOf,ab=ut,sb=ob,ub=Array.prototype,lb=n((function(t){var e=t.indexOf;return t===ub||ab(ub,t)&&e===ub.indexOf?sb:e})),cb=Mn,fb=ua.find,hb="find",pb=!0;hb in[]&&Array(1)[hb]((function(){pb=!1})),cb({target:"Array",proto:!0,forced:pb},{find:function(t){return fb(this,t,arguments.length>1?arguments[1]:void 0)}});var db=af("Array").find,vb=ut,gb=db,yb=Array.prototype,mb=n((function(t){var e=t.find;return t===yb||vb(yb,t)&&e===yb.find?gb:e})),wb=M,bb=Fn,_b=TypeError,kb=Object.getOwnPropertyDescriptor,Eb=wb&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(AR){return AR instanceof TypeError}}()?function(t,e){if(bb(t)&&!kb(t,"length").writable)throw _b("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e},Ab=xt,Tb=TypeError,Cb=function(t,e){if(!delete t[e])throw Tb("Cannot delete property "+Ab(e)+" of "+Ab(t))},Sb=Mn,xb=$t,Lb=ai,Mb=Vn,Ob=Kn,Ib=Eb,Pb=$n,Rb=Rr,Bb=tr,Ub=Cb,Db=jr("splice"),jb=Math.max,Fb=Math.min;Sb({target:"Array",proto:!0,forced:!Db},{splice:function(t,e){var n,r,i,o,a,s,u=xb(this),l=Ob(u),c=Lb(t,l),f=arguments.length;for(0===f?n=r=0:1===f?(n=0,r=l-c):(n=f-2,r=Fb(jb(Mb(e),0),l-c)),Pb(l+n-r),i=Rb(u,r),o=0;o<r;o++)(a=c+o)in u&&Bb(i,o,u[a]);if(i.length=r,n<r){for(o=c;o<l-r;o++)s=o+n,(a=o+r)in u?u[s]=u[a]:Ub(u,s);for(o=l;o>l-r+n;o--)Ub(u,o-1)}else if(n>r)for(o=l-r;o>c;o--)s=o+n-1,(a=o+r-1)in u?u[s]=u[a]:Ub(u,s);for(o=0;o<n;o++)u[o+c]=arguments[o+2];return Ib(u,l-r+n),i}});var Nb=af("Array").splice,Hb=ut,zb=Nb,Vb=Array.prototype,qb=n((function(t){var e=t.splice;return t===Vb||Hb(Vb,t)&&e===Vb.splice?zb:e})),Gb="\t\n\v\f\r \u2028\u2029\ufeff",Yb=X,Wb=ei,Kb=Gb,Xb=y("".replace),$b=RegExp("^["+Kb+"]+"),Jb=RegExp("(^|[^"+Kb+"])["+Kb+"]+$"),Qb=function(t){return function(e){var n=Wb(Yb(e));return 1&t&&(n=Xb(n,$b,"")),2&t&&(n=Xb(n,Jb,"$1")),n}},Zb={start:Qb(1),end:Qb(2),trim:Qb(3)},t_=o,e_=a,n_=y,r_=ei,i_=Zb.trim,o_=Gb,a_=t_.parseInt,s_=t_.Symbol,u_=s_&&s_.iterator,l_=/^[+-]?0x/i,c_=n_(l_.exec),f_=8!==a_(o_+"08")||22!==a_(o_+"0x16")||u_&&!e_((function(){a_(Object(u_))}))?function(t,e){var n=i_(r_(t));return a_(n,e>>>0||(c_(l_,n)?16:10))}:a_;Mn({global:!0,forced:parseInt!=f_},{parseInt:f_});var h_=n(nt.parseInt),p_=ua.map;Mn({target:"Array",proto:!0,forced:!jr("map")},{map:function(t){return p_(this,t,arguments.length>1?arguments[1]:void 0)}});var d_=af("Array").map,v_=ut,g_=d_,y_=Array.prototype,m_=n((function(t){var e=t.map;return t===y_||v_(y_,t)&&e===y_.map?g_:e})),w_=M,b_=y,__=P,k_=a,E_=ki,A_=lo,T_=R,C_=$t,S_=G,x_=Object.assign,L_=Object.defineProperty,M_=b_([].concat),O_=!x_||k_((function(){if(w_&&1!==x_({b:1},x_(L_({},"a",{enumerable:!0,get:function(){L_(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=x_({},t)[n]||E_(x_({},e)).join("")!=r}))?function(t,e){for(var n=C_(t),r=arguments.length,i=1,o=A_.f,a=T_.f;r>i;)for(var s,u=S_(arguments[i++]),l=o?M_(E_(u),o(u)):E_(u),c=l.length,f=0;c>f;)s=l[f++],w_&&!__(a,u,s)||(n[s]=u[s]);return n}:x_,I_=O_;Mn({target:"Object",stat:!0,arity:2,forced:Object.assign!==I_},{assign:I_});var P_=n(nt.Object.assign);function R_(t,e){var n=qh(t);if(Gh){var r=Gh(t);e&&(r=Jh(r).call(r,(function(e){return Qh(t,e).enumerable}))),n.push.apply(n,r)}return n}function B_(t){for(var e=1;e<arguments.length;e++){var n,r,i=null!=arguments[e]?arguments[e]:{};e%2?hp(n=R_(Object(i),!0)).call(n,(function(e){N_(t,e,i[e])})):Ep?Mp(t,Ep(i)):hp(r=R_(Object(i))).call(r,(function(e){Op(t,e,Qh(i,e))}))}return t}function U_(t){return(U_="function"==typeof Ih&&"symbol"==typeof lw?function(t){return typeof t}:function(t){return t&&"function"==typeof Ih&&t.constructor===Ih&&t!==Ih.prototype?"symbol":typeof t})(t)}function D_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function j_(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Op(t,X_(r.key),r)}}function F_(t,e,n){return e&&j_(t.prototype,e),n&&j_(t,n),Op(t,"prototype",{writable:!1}),t}function N_(t,e,n){return(e=X_(e))in t?Op(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function H_(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Ip(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Op(t,"prototype",{writable:!1}),e&&V_(t,e)}function z_(t){var e;return(z_=Rp?cw(e=Pp).call(e):function(t){return t.__proto__||Pp(t)})(t)}function V_(t,e){var n;return(V_=Rp?cw(n=Rp).call(n):function(t,e){return t.__proto__=e,t})(t,e)}function q_(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function G_(t){var e=function(){if("undefined"==typeof Reflect||!fw)return!1;if(fw.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(fw(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=z_(t);if(e){var i=z_(this).constructor;n=fw(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===Mc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return q_(t)}(this,n)}}function Y_(){var t;"undefined"!=typeof Reflect&&hw?Y_=cw(t=hw).call(t):Y_=function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=z_(t)););return t}(t,e);if(r){var i=Qh(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}};return Y_.apply(this,arguments)}function W_(t){return function(t){if(vw(t))return K_(t)}(t)||function(t){if(void 0!==Ih&&null!=Hh(t)||null!=t["@@iterator"])return Pw(t)}(t)||function(t,e){var n;if(!t)return;if("string"==typeof t)return K_(t,e);var r=uw(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Pw(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return K_(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function K_(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function X_(t){var e=function(t,e){if("object"!==Mc(t)||null===t)return t;var n=t[Rw];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Mc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Mc(e)?e:String(e)}var $_={exports:{}};!function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}function i(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function o(t,e,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||t,a),u=n?n+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 a(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function s(){this._events=new r,this._eventsCount=0}Ip&&(r.prototype=Ip(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var t,r,i=[];if(0===this._eventsCount)return i;for(r in t=this._events)e.call(t,r)&&i.push(n?uw(r).call(r,1):r);return Gh?lh(i).call(i,Gh(t)):i},s.prototype.listeners=function(t){var e=n?n+t:t,r=this._events[e];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},s.prototype.listenerCount=function(t){var e=n?n+t:t,r=this._events[e];return r?r.fn?1:r.length:0},s.prototype.emit=function(t,e,r,i,o,a){var s=n?n+t:t;if(!this._events[s])return!1;var u,l,c=this._events[s],f=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),f){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,r),!0;case 4:return c.fn.call(c.context,e,r,i),!0;case 5:return c.fn.call(c.context,e,r,i,o),!0;case 6:return c.fn.call(c.context,e,r,i,o,a),!0}for(l=1,u=new Array(f-1);l<f;l++)u[l-1]=arguments[l];c.fn.apply(c.context,u)}else{var h,p=c.length;for(l=0;l<p;l++)switch(c[l].once&&this.removeListener(t,c[l].fn,void 0,!0),f){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,e);break;case 3:c[l].fn.call(c[l].context,e,r);break;case 4:c[l].fn.call(c[l].context,e,r,i);break;default:if(!u)for(h=1,u=new Array(f-1);h<f;h++)u[h-1]=arguments[h];c[l].fn.apply(c[l].context,u)}}return!0},s.prototype.on=function(t,e,n){return o(this,t,e,n,!1)},s.prototype.once=function(t,e,n){return o(this,t,e,n,!0)},s.prototype.removeListener=function(t,e,r,i){var o=n?n+t:t;if(!this._events[o])return this;if(!e)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==e||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var u=0,l=[],c=s.length;u<c;u++)(s[u].fn!==e||i&&!s[u].once||r&&s[u].context!==r)&&l.push(s[u]);l.length?this._events[o]=1===l.length?l[0]:l:a(this,o)}return this},s.prototype.removeAllListeners=function(t){var e;return t?(e=n?n+t:t,this._events[e]&&a(this,e)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,t.exports=s}($_);var J_=$_.exports,Q_=ua.some;Mn({target:"Array",proto:!0,forced:!tp("some")},{some:function(t){return Q_(this,t,arguments.length>1?arguments[1]:void 0)}});var Z_=af("Array").some,tk=ut,ek=Z_,nk=Array.prototype,rk=n((function(t){var e=t.some;return t===nk||tk(nk,t)&&e===nk.some?ek:e})),ik=Vn,ok=ei,ak=X,sk=RangeError,uk=y,lk=Yn,ck=ei,fk=X,hk=uk((function(t){var e=ok(ak(this)),n="",r=ik(t);if(r<0||r==1/0)throw sk("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(e+=e))1&r&&(n+=e);return n})),pk=uk("".slice),dk=Math.ceil,vk=function(t){return function(e,n,r){var i,o,a=ck(fk(e)),s=lk(n),u=a.length,l=void 0===r?" ":ck(r);return s<=u||""==l?a:((o=hk(l,dk((i=s-u)/l.length))).length>i&&(o=pk(o,0,i)),t?a+o:o+a)}},gk={start:vk(!1),end:vk(!0)},yk=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(lt),mk=gk.start;Mn({target:"String",proto:!0,forced:yk},{padStart:function(t){return mk(this,t,arguments.length>1?arguments[1]:void 0)}});var wk,bk=af("String").padStart,_k=ut,kk=bk,Ek=String.prototype,Ak=n((function(t){var e=t.padStart;return"string"==typeof t||t===Ek||_k(Ek,t)&&e===Ek.padStart?kk:e})),Tk="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,Ck=o,Sk=h,xk=x,Lk=Tk,Mk=lt,Ok=Is,Ik=cv,Pk=Ck.Function,Rk=/MSIE .\./.test(Mk)||Lk&&((wk=Ck.Bun.version.split(".")).length<3||0==wk[0]&&(wk[1]<3||3==wk[1]&&0==wk[2])),Bk=function(t,e){var n=e?2:1;return Rk?function(r,i){var o=Ik(arguments.length,1)>n,a=xk(r)?r:Pk(r),s=o?Ok(arguments,n):[],u=o?function(){Sk(a,this,s)}:a;return e?t(u,i):t(u)}:t},Uk=Mn,Dk=o,jk=Bk(Dk.setInterval,!0);Uk({global:!0,bind:!0,forced:Dk.setInterval!==jk},{setInterval:jk});var Fk=Mn,Nk=o,Hk=Bk(Nk.setTimeout,!0);Fk({global:!0,bind:!0,forced:Nk.setTimeout!==Hk},{setTimeout:Hk});var zk=n(nt.setInterval),Vk=n(nt.setTimeout),qk=ua.every;Mn({target:"Array",proto:!0,forced:!tp("every")},{every:function(t){return qk(this,t,arguments.length>1?arguments[1]:void 0)}});var Gk=af("Array").every,Yk=ut,Wk=Gk,Kk=Array.prototype,Xk=n((function(t){var e=t.every;return t===Kk||Yk(Kk,t)&&e===Kk.every?Wk:e})),$k=o,Jk=a,Qk=ei,Zk=Zb.trim,tE=Gb,eE=y("".charAt),nE=$k.parseFloat,rE=$k.Symbol,iE=rE&&rE.iterator,oE=1/nE(tE+"-0")!=-1/0||iE&&!Jk((function(){nE(Object(iE))}))?function(t){var e=Zk(Qk(t)),n=nE(e);return 0===n&&"-"==eE(e,0)?-0:n}:nE;Mn({global:!0,forced:parseFloat!=oE},{parseFloat:oE});var aE=n(nt.parseFloat),sE=Au.PROPER,uE=a,lE=Gb,cE=Zb.trim;Mn({target:"String",proto:!0,forced:function(t){return uE((function(){return!!lE[t]()||"
"!=="
"[t]()||sE&&lE[t].name!==t}))}("trim")},{trim:function(){return cE(this)}});var fE=af("String").trim,hE=ut,pE=fE,dE=String.prototype,vE=n((function(t){var e=t.trim;return"string"==typeof t||t===dE||hE(dE,t)&&e===dE.trim?pE:e})),gE=ro,yE=Math.floor,mE=function(t,e){var n=t.length,r=yE(n/2);return n<8?wE(t,e):bE(t,mE(gE(t,0,r),e),mE(gE(t,r),e),e)},wE=function(t,e){for(var n,r,i=t.length,o=1;o<i;){for(r=o,n=t[o];r&&e(t[r-1],n)>0;)t[r]=t[--r];r!==o++&&(t[r]=n)}return t},bE=function(t,e,n,r){for(var i=e.length,o=n.length,a=0,s=0;a<i||s<o;)t[a+s]=a<i&&s<o?r(e[a],n[s])<=0?e[a++]:n[s++]:a<i?e[a++]:n[s++];return t},_E=mE,kE=lt.match(/firefox\/(\d+)/i),EE=!!kE&&+kE[1],AE=/MSIE|Trident/.test(lt),TE=lt.match(/AppleWebKit\/(\d+)\./),CE=!!TE&&+TE[1],SE=Mn,xE=y,LE=It,ME=$t,OE=Kn,IE=Cb,PE=ei,RE=a,BE=_E,UE=tp,DE=EE,jE=AE,FE=gt,NE=CE,HE=[],zE=xE(HE.sort),VE=xE(HE.push),qE=RE((function(){HE.sort(void 0)})),GE=RE((function(){HE.sort(null)})),YE=UE("sort"),WE=!RE((function(){if(FE)return FE<70;if(!(DE&&DE>3)){if(jE)return!0;if(NE)return NE<603;var t,e,n,r,i="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)HE.push({k:e+r,v:n})}for(HE.sort((function(t,e){return e.v-t.v})),r=0;r<HE.length;r++)e=HE[r].k.charAt(0),i.charAt(i.length-1)!==e&&(i+=e);return"DGBEFHACIJK"!==i}}));SE({target:"Array",proto:!0,forced:qE||!GE||!YE||!WE},{sort:function(t){void 0!==t&&LE(t);var e=ME(this);if(WE)return void 0===t?zE(e):zE(e,t);var n,r,i=[],o=OE(e);for(r=0;r<o;r++)r in e&&VE(i,e[r]);for(BE(i,function(t){return function(e,n){return void 0===n?-1:void 0===e?1:void 0!==t?+t(e,n)||0:PE(e)>PE(n)?1:-1}}(t)),n=OE(i),r=0;r<n;)e[r]=i[r++];for(;r<o;)IE(e,r++);return e}});var KE,XE=af("Array").sort,$E=ut,JE=XE,QE=Array.prototype,ZE=n((function(t){var e=t.sort;return t===QE||$E(QE,t)&&e===QE.sort?JE:e})),tA="undefined"!=typeof window&&window.location&&lb(KE=window.location.href).call(KE,"xgplayerdebugger=1")>-1,eA="color: #525252; background-color: #90ee90;",nA="color: #525252; background-color: red;",rA="color: #525252; background-color: yellow; ",iA="%c[xgplayer]",oA={config:{debug:tA?3:0},logInfo:function(t){for(var e,n,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];this.config.debug>=3&&(n=console).log.apply(n,lh(e=[iA,eA,t]).call(e,i))},logWarn:function(t){for(var e,n,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];this.config.debug>=1&&(n=console).warn.apply(n,lh(e=[iA,rA,t]).call(e,i))},logError:function(t){var e,n;if(!(this.config.debug<1)){for(var r=this.config.debug>=2?"trace":"error",i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];(n=console)[r].apply(n,lh(e=[iA,nA,t]).call(e,o))}}},aA=function(){function t(e){D_(this,t),this.bufferedList=e}return F_(t,[{key:"start",value:function(t){return this.bufferedList[t].start}},{key:"end",value:function(t){return this.bufferedList[t].end}},{key:"length",get:function(){return this.bufferedList.length}}]),t}(),sA={};sA.createDom=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=document.createElement(e);return o.className=i,o.innerHTML=n,hp(t=qh(r)).call(t,(function(t){var n=t,i=r[t];"video"===e||"audio"===e||"live-video"===e?i&&o.setAttribute(n,i):o.setAttribute(n,i)})),o},sA.createDomFromHtml=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";try{var r=document.createElement("div");r.innerHTML=t;var i=r.children;if(r=null,i.length>0){var o;if(i=i[0],n&&sA.addClass(i,n),e)hp(o=qh(e)).call(o,(function(t){i.setAttribute(t,e[t])}));return i}return null}catch(a){return oA.logError("util.createDomFromHtml",a),null}},sA.hasClass=function(t,e){if(!t||!e)return!1;try{return rk(Array.prototype).call(t.classList,(function(t){return t===e}))}catch(r){var n=t.className&&"object"===U_(t.className)?t.getAttribute("class"):t.className;return n&&!!n.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))}},sA.addClass=function(t,e){if(t&&e)try{var n;hp(n=e.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(n,(function(e){e&&t.classList.add(e)}))}catch(r){sA.hasClass(t,e)||(t.className&&"object"===U_(t.className)?t.setAttribute("class",t.getAttribute("class")+" "+e):t.className+=" "+e)}},sA.removeClass=function(t,e){if(t&&e)try{var n;hp(n=e.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(n,(function(e){e&&t.classList.remove(e)}))}catch(i){var r;if(sA.hasClass(t,e))hp(r=e.split(/\s+/g)).call(r,(function(e){var n=new RegExp("(\\s|^)"+e+"(\\s|$)");t.className&&"object"===U_(t.className)?t.setAttribute("class",t.getAttribute("class").replace(n," ")):t.className=t.className.replace(n," ")}))}},sA.toggleClass=function(t,e){var n;t&&hp(n=e.split(/\s+/g)).call(n,(function(e){sA.hasClass(t,e)?sA.removeClass(t,e):sA.addClass(t,e)}))},sA.classNames=function(){for(var t=arguments,e=[],n=function(n){if("String"===sA.typeOf(t[n]))e.push(t[n]);else if("Object"===sA.typeOf(t[n])){var r;m_(r=qh(t[n])).call(r,(function(r){t[n][r]&&e.push(r)}))}},r=0;r<arguments.length;r++)n(r);return e.join(" ")},sA.findDom=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1?arguments[1]:void 0;try{t=e.querySelector(n)}catch(r){oA.logError("util.findDom",r),0===lb(n).call(n,"#")&&(t=e.getElementById(uw(n).call(n,1)))}return t},sA.getCss=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,!1)[e]},sA.padStart=function(t,e,n){for(var r=String(n),i=e>>0,o=Math.ceil(i/r.length),a=[],s=String(t);o--;)a.push(r);return a.join("").substring(0,i-s.length)+s},sA.format=function(t){if(window.isNaN(t))return"";t=Math.round(t);var e=Ak(sA).call(sA,Math.floor(t/3600),2,0),n=Ak(sA).call(sA,Math.floor((t-3600*e)/60),2,0),r=Ak(sA).call(sA,Math.floor(t-3600*e-60*n),2,0);return("00"===e?[n,r]:[e,n,r]).join(":")},sA.event=function(t){if(t.touches){var e=t.touches[0]||t.changedTouches[0];t.clientX=e.clientX||0,t.clientY=e.clientY||0,t.offsetX=e.pageX-e.target.offsetLeft,t.offsetY=e.pageY-e.target.offsetTop}t._target=t.target||t.srcElement},sA.typeOf=function(t){return Object.prototype.toString.call(t).match(/([^\s.*]+)(?=]$)/g)[0]},sA.deepCopy=function(t,e){var n;if("Object"===sA.typeOf(e)&&"Object"===sA.typeOf(t))return hp(n=qh(e)).call(n,(function(n){if("Object"!==sA.typeOf(e[n])||e[n]instanceof Node)if("Array"===sA.typeOf(e[n])){var r;t[n]="Array"===sA.typeOf(t[n])?lh(r=t[n]).call(r,e[n]):e[n]}else t[n]=e[n];else void 0===t[n]||void 0===t[n]?t[n]=e[n]:sA.deepCopy(t[n],e[n])})),t},sA.deepMerge=function(t,e){var n;return m_(n=qh(e)).call(n,(function(n){var r;"Array"===sA.typeOf(e[n])&&"Array"===sA.typeOf(t[n])?"Array"===sA.typeOf(t[n])&&(r=t[n]).push.apply(r,W_(e[n])):sA.typeOf(t[n])!==sA.typeOf(e[n])||null===t[n]||"Object"!==sA.typeOf(t[n])||e[n]instanceof window.Node?null!==e[n]&&(t[n]=e[n]):sA.deepMerge(t[n],e[n])})),t},sA.getBgImage=function(t){var e=(t.currentStyle||window.getComputedStyle(t,null)).backgroundImage;if(!e||"none"===e)return"";var n=document.createElement("a");return n.href=e.replace(/url\("|"\)/g,""),n.href},sA.copyDom=function(t){if(t&&1===t.nodeType){var e=document.createElement(t.tagName);return hp(Array.prototype).call(t.attributes,(function(t){e.setAttribute(t.name,t.value)})),t.innerHTML&&(e.innerHTML=t.innerHTML),e}return""},sA.setInterval=function(t,e,n,r){t._interval[e]||(t._interval[e]=zk(cw(n).call(n,t),r))},sA.clearInterval=function(t,e){clearInterval(t._interval[e]),t._interval[e]=null},sA.setTimeout=function(t,e,n){t._timers||(t._timers=[]);var r=Vk((function(){e(),sA.clearTimeout(t,r)}),n);return t._timers.push(r),r},sA.clearTimeout=function(t,e){var n=t._timers;if("Array"===sA.typeOf(n)){for(var r=0;r<n.length;r++)if(n[r]===e){qb(n).call(n,r,1),clearTimeout(e);break}}else clearTimeout(e)},sA.clearAllTimers=function(t){var e=t._timers;"Array"===sA.typeOf(e)&&(m_(e).call(e,(function(t){clearTimeout(t)})),t._timerIds=[])},sA.createImgBtn=function(t,e,n,r){var i,o,a,s,u,l,c,f,h,p,d,v,g=sA.createDom("xg-".concat(t),"",{},"xgplayer-".concat(t,"-img"));(g.style.backgroundImage='url("'.concat(e,'")'),n&&r)&&(Xk(i=["px","rem","em","pt","dp","vw","vh","vm","%"]).call(i,(function(t){var e,i;return!(lb(n).call(n,t)>-1&&lb(r).call(r,t)>-1)||(c=aE(vE(e=uw(n).call(n,0,lb(n).call(n,t))).call(e)),f=aE(vE(i=uw(r).call(r,0,lb(r).call(r,t))).call(i)),h=t,!1)})),g.style.width=lh(o="".concat(c)).call(o,h),g.style.height=lh(a="".concat(f)).call(a,h),g.style.backgroundSize=lh(s=lh(u=lh(l="".concat(c)).call(l,h," ")).call(u,f)).call(s,h),g.style.margin="start"===t?lh(p=lh(d=lh(v="-".concat(f/2)).call(v,h," auto auto -")).call(d,c/2)).call(p,h):"auto 5px auto 5px");return g},sA.Hex2RGBA=function(t,e){var n,r=[];if(/^\#[0-9A-F]{3}$/i.test(t)){var i="#";t.replace(/[0-9A-F]/gi,(function(t){i+=t+t})),t=i}return/^#[0-9A-F]{6}$/i.test(t)?(t.replace(/[0-9A-F]{2}/gi,(function(t){r.push(h_(t,16))})),lh(n="rgba(".concat(r.join(","),", ")).call(n,e,")")):"rgba(255, 255, 255, 0.1)"},sA.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},sA.checkIsFunction=function(t){return t&&"function"==typeof t},sA.checkIsObject=function(t){return null!==t&&"object"===U_(t)},sA.hide=function(t){t.style.display="none"},sA.show=function(t,e){t.style.display=e||"block"},sA.isUndefined=function(t){if(null==t)return!0},sA.isNotNull=function(t){return!(null==t)},sA.setStyleFromCsstext=function(t,e){if(e)if("String"===sA.typeOf(e)){var n=e.replace(/\s+/g,"").split(";");m_(n).call(n,(function(e){if(e){var n=e.split(":");n.length>1&&(t.style[n[0]]=n[1])}}))}else{var r;m_(r=qh(e)).call(r,(function(n){t.style[n]=e[n]}))}},sA.filterStyleFromText=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["width","height","top","left","bottom","right","position","z-index","padding","margin","transform"],r=t.style.cssText;if(!r)return{};var i=r.replace(/\s+/g,"").split(";"),o={},a={};return m_(i).call(i,(function(t){if(t){var e=t.split(":");e.length>1&&(!function(t,e){for(var n=0,r=e.length;n<r;n++)if(lb(t).call(t,e[n])>-1)return!0;return!1}(e[0],n)?a[e[0]]=e[1]:o[e[0]]=e[1])}})),t.setAttribute("style",""),m_(e=qh(a)).call(e,(function(e){t.style[e]=a[e]})),o},sA.getStyleFromCsstext=function(t){var e=t.style.cssText;if(!e)return{};var n=e.replace(/\s+/g,"").split(";"),r={};return m_(n).call(n,(function(t){if(t){var e=t.split(":");e.length>1&&(r[e[0]]=e[1])}})),r},sA.preloadImg=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(t){var r=new window.Image;r.onload=function(t){r=null,e&&e(t)},r.onerror=function(t){r=null,n&&n(t)},r.src=t}},sA.stopPropagation=function(t){t&&t.stopPropagation()},sA.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},sA.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},sA.checkTouchSupport=function(){return"ontouchstart"in window},sA.getBuffered2=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=[],r=0;r<t.length;r++)n.push({start:t.start(r)<.5?0:t.start(r),end:t.end(r)});ZE(n).call(n,(function(t,e){var n=t.start-e.start;return n||e.end-t.end}));var i=[];if(e)for(var o=0;o<n.length;o++){var a=i.length;if(a){var s=i[a-1].end;n[o].start-s<e?n[o].end>s&&(i[a-1].end=n[o].end):i.push(n[o])}else i.push(n[o])}else i=n;return new aA(i)},sA.getEventPos=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return t.touches&&t.touches.length>0&&(t=t.touches[0]),{x:t.x/e,y:t.y/e,clientX:t.clientX/e,clientY:t.clientY/e,offsetX:t.offsetX/e,offsetY:t.offsetY/e,pageX:t.pageX/e,pageY:t.pageY/e}},sA.requestAnimationFrame=function(t){var e=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(e)return e(t)},sA.getHostFromUrl=function(t){if("String"!==sA.typeOf(t))return"";var e=t.split("/"),n="";return e.length>3&&e[2]&&(n=e[2]),n},sA.cancelAnimationFrame=function(t){var e=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;e&&e(t)},sA.isMSE=function(t){return t.media&&(t=t.media),!!(t&&t instanceof HTMLMediaElement)&&(/^blob/.test(t.currentSrc)||/^blob/.test(t.src))},sA.isBlob=function(t){return"string"==typeof t&&/^blob/.test(t)},sA.generateSessionId=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=(new Date).getTime();try{t=h_(t)}catch(n){t=0}return e+=t,window.performance&&"function"==typeof window.performance.now&&(e+=h_(window.performance.now())),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:3&n|8).toString(16)}))},sA.createEvent=function(t){var e;return"function"==typeof window.Event?e=new Event(t):(e=document.createEvent("Event")).initEvent(t,!0,!0),e},sA.adjustTimeByDuration=function(t,e,n){return e&&t&&(t>e||n&&t<e)?e:t},sA.createPositionBar=function(t,e){var n=sA.createDom("xg-bar","",{"data-index":-1},t);return e.appendChild(n),n},sA.getTransformStyle=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0,scale:1,rotate:0},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r={scale:"".concat(e.scale||1),translate:lh(t="".concat(e.x||0,"%, ")).call(t,e.y||0,"%"),rotate:"".concat(e.rotate||0,"deg")},i=qh(r);return hp(i).call(i,(function(t){var e,i=new RegExp("".concat(t,"\\([^\\(]+\\)"),"g"),o=lh(e="".concat(t,"(")).call(e,r[t],")");i.test(n)?(i.lastIndex=-1,n=n.replace(i,o)):n+="".concat(o," ")})),n},sA.convertDeg=function(t){return Math.abs(t)<=1?360*t:t%360},sA.getIndexByTime=function(t,e){var n=e.length,r=-1;if(n<1)return r;if(t<=e[0].end||n<2)r=0;else if(t>e[n-1].end)r=n-1;else for(var i=1;i<n;i++)if(t>e[i-1].end&&t<=e[i].end){r=i;break}return r},sA.getOffsetCurrentTime=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=-1;if((r=n>=0&&n<e.length?n:sA.getIndexByTime(t,e))<0)return-1;var i=e.length,o=e[r],a=o.start,s=o.end,u=o.cTime,l=o.offset;return t<a?u:t>=a&&t<=s?t-l:t>s&&r>=i-1?s:-1},sA.getCurrentTimeByOffset=function(t,e){var n=-1;if(!e||e.length<0)return t;for(var r=0;r<e.length;r++)if(t<=e[r].duration){n=r;break}if(-1!==n){var i=e[n].start;return n-1<0?i+t:i+(t-e[n-1].duration)}return t};var uA=/(Android)\s([\d.]+)/,lA=/(Version)\/([\d.]+)/,cA=["avc1.42E01E, mp4a.40.2","avc1.58A01E, mp4a.40.2","avc1.4D401E, mp4a.40.2","avc1.64001E, mp4a.40.2","avc1.42E01E","mp4v.20.8","mp4v.20.8, mp4a.40.2","mp4v.20.240, mp4a.40.2"],fA={get device(){return fA.os.isPc?"pc":"mobile"},get browser(){var t,e;if("undefined"==typeof navigator)return"";var n=navigator.userAgent.toLowerCase(),r={ie:/rv:([\d.]+)\) like gecko/,firefox:/firefox\/([\d.]+)/,chrome:/chrome\/([\d.]+)/,opera:/opera.([\d.]+)/,safari:/version\/([\d.]+).*safari/};return lh(t=[]).call(t,Jh(e=qh(r)).call(e,(function(t){return r[t].test(n)})))[0]},get os(){if("undefined"==typeof navigator)return{};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)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,a=o||r&&!/(?:Mobile)/.test(t)||i&&/(?:Tablet)/.test(t),s=/(?:iPhone)/.test(t)&&!a;return{isTablet:a,isPhone:s,isIpad:o,isIos:s||o,isAndroid:r,isPc:!(s||r||n||a),isSymbian:n,isWindowsPhone:e,isFireFox:i}},get osVersion(){if("undefined"==typeof navigator)return 0;var t=navigator.userAgent,e="",n=(e=/(?:iPhone)|(?:iPad|PlayBook)/.test(t)?lA:uA)?e.exec(t):[];if(n&&n.length>=3){var r=n[2].split(".");return r.length>0?h_(r[0]):0}return 0},get isWeixin(){if("undefined"==typeof navigator)return!1;return!!/(micromessenger)\/([\d.]+)/.exec(navigator.userAgent.toLocaleLowerCase())},isSupportMP4:function(){var t={isSupport:!1,mime:""};if("undefined"==typeof document)return t;if(this.supportResult)return this.supportResult;var e=document.createElement("video");return"function"==typeof e.canPlayType&&m_(cA).call(cA,(function(n){"probably"===e.canPlayType('video/mp4; codecs="'.concat(n,'"'))&&(t.isSupport=!0,t.mime+="||".concat(n))})),this.supportResult=t,e=null,t},isMSESupport:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'video/mp4; codecs="avc1.42E01E,mp4a.40.2"';if("undefined"==typeof MediaSource||!MediaSource)return!1;try{return MediaSource.isTypeSupported(t)}catch(AR){return this._logger.error(t,AR),!1}},isHevcSupported:function(){return!("undefined"==typeof MediaSource||!MediaSource.isTypeSupported)&&(MediaSource.isTypeSupported('video/mp4;codecs="hev1.1.6.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.2.4.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.3.E.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.4.10.L120.90"'))},probeConfigSupported:function(t){var e={supported:!1,smooth:!1,powerEfficient:!1};if(!t||"undefined"==typeof navigator)return Mm.resolve(e);if(navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo)return navigator.mediaCapabilities.decodingInfo(t);var n=t.video||{},r=t.audio||{};try{var i=MediaSource.isTypeSupported(n.contentType),o=MediaSource.isTypeSupported(r.contentType);return Mm.resolve({supported:i&&o,smooth:!1,powerEfficient:!1})}catch(a){return Mm.resolve(e)}}},hA="play",pA="ended",dA="pause",vA="seeked",gA="timeupdate",yA="durationchange",mA="volumechange",wA="emptied",bA="autoplay_started",_A="video_resize";function kA(t,e,n){for(var r,i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];var s,u=e.call.apply(e,lh(r=[t]).call(r,o));n&&"function"==typeof n&&(u&&u.then?u.then((function(){for(var e,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];n.call.apply(n,lh(e=[t]).call(e,i))})):n.call.apply(n,lh(s=[t]).call(s,o)))}function EA(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{pre:null,next:null};return this.__hooks||(this.__hooks={}),!this.__hooks[t]&&(this.__hooks[t]=null),cw(n=function(){var n,i=arguments,o=this;if(r.pre)try{var a,s;(s=r.pre).call.apply(s,lh(a=[this]).call(a,uw(Array.prototype).call(arguments)))}catch(v){var u,l;throw v.message=lh(u=lh(l="[pluginName: ".concat(this.pluginName,":")).call(l,t,":pre error] >> ")).call(u,v.message),v}if(this.__hooks&&this.__hooks[t])try{var c,f=function(t,e,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];if(t.__hooks&&vw(t.__hooks[e])){var a,s=t.__hooks[e],u=-1,l=function t(e,n,r){for(var i,o,a=arguments.length,l=new Array(a>3?a-3:0),c=3;c<a;c++)l[c-3]=arguments[c];if(u++,0===s.length||u===s.length)return r.call.apply(r,lh(o=[e,e]).call(o,l));var f,h=s[u],p=h.call.apply(h,lh(i=[e,e]).call(i,l));return p&&p.then?p.then((function(i){var o;return!1===i?null:t.apply(void 0,lh(o=[e,n,r]).call(o,l))})).catch((function(t){console.warn("[runHooks]".concat(n," reject"),t.message)})):!1!==p?t.apply(void 0,lh(f=[e,n,r]).call(f,l)):void 0};return l.apply(void 0,lh(a=[t,e,n]).call(a,i))}var c;return n.call.apply(n,lh(c=[t,t]).call(c,i))}(this,t,e);if(f)if(f.then)f.then((function(t){var n;!1!==t&&kA.apply(void 0,lh(n=[o,e,r.next]).call(n,W_(i)))})).catch((function(t){throw t}));else kA.apply(void 0,lh(c=[this,e,r.next]).call(c,uw(Array.prototype).call(arguments)));else if(void 0===f){var h;kA.apply(void 0,lh(h=[this,e,r.next]).call(h,uw(Array.prototype).call(arguments)))}}catch(v){var p,d;throw v.message=lh(p=lh(d="[pluginName: ".concat(this.pluginName,":")).call(d,t,"] >> ")).call(p,v.message),v}else kA.apply(void 0,lh(n=[this,e,r.next]).call(n,uw(Array.prototype).call(arguments)))}).call(n,this)}function AA(t,e){var n=this.__hooks;if(!n||!vw(n[t]))return-1;for(var r=n[t],i=0;i<r.length;i++)if(r[i]===e)return i;return-1}function TA(t,e){var n=this.__hooks;if(n)return n.hasOwnProperty(t)?(vw(n[t])||(n[t]=[]),-1===AA.call(this,t,e)&&n[t].push(e),!0):(console.warn("has no supported hook which name [".concat(t,"]")),!1)}function CA(t,e){var n=this.__hooks;if(n){if(vw(n[t])){var r=n[t],i=AA.call(this,t,e);-1!==i&&qb(r).call(r,i,1)}delete n[t]}}function SA(t,e){var n;oA.logError(lh(n="[".concat(t,"] event or callback cant be undefined or null when call ")).call(n,e))}var xA=function(){function t(e){D_(this,t),sA.checkIsFunction(this.beforeCreate)&&this.beforeCreate(e),function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];t.__hooks={},e&&m_(e).call(e,(function(e){t.__hooks[e]=null})),Op(t,"hooks",{get:function(){var e;return t.__hooks&&m_(e=qh(t.__hooks)).call(e,(function(e){if(t.__hooks[e])return e}))}})}(this),this.__args=e,this.__events={},this.__onceEvents={},this.config=e.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(e)}return F_(t,[{key:"beforeCreate",value:function(t){}},{key:"afterCreate",value:function(){}},{key:"beforePlayerInit",value:function(){}},{key:"onPluginsReady",value:function(){}},{key:"afterPlayerInit",value:function(){}},{key:"destroy",value:function(){}},{key:"__init",value:function(t){this.player=t.player,this.playerConfig=t.player&&t.player.config,this.pluginName=t.pluginName?t.pluginName.toLowerCase():this.constructor.pluginName.toLowerCase(),this.logger=t.player&&t.player.logger}},{key:"updateLang",value:function(t){t||(t=this.lang)}},{key:"lang",get:function(){return this.player.lang}},{key:"i18n",get:function(){return this.player.i18n}},{key:"i18nKeys",get:function(){return this.player.i18nKeys}},{key:"domEventType",get:function(){var t=sA.checkTouchSupport()?"touch":"mouse";return!this.playerConfig||"touch"!==this.playerConfig.domEventType&&"mouse"!==this.playerConfig.domEventType||(t=this.playerConfig.domEventType),t}},{key:"on",value:function(t,e){var n=this;t&&e&&this.player?"string"==typeof t?(this.__events[t]=e,this.player.on(t,e)):vw(t)&&hp(t).call(t,(function(t){n.__events[t]=e,n.player.on(t,e)})):SA(this.pluginName,"plugin.on(event, callback)")}},{key:"once",value:function(t,e){var n=this;t&&e&&this.player?"string"==typeof t?(this.__onceEvents[t]=e,this.player.once(t,e)):vw(t)&&hp(t).call(t,(function(r){n.__onceEvents[r]=e,n.player.once(t,e)})):SA(this.pluginName,"plugin.once(event, callback)")}},{key:"off",value:function(t,e){var n=this;t&&e&&this.player?"string"==typeof t?(delete this.__events[t],this.player.off(t,e)):vw(t)&&hp(t).call(t,(function(r){delete n.__events[t],n.player.off(r,e)})):SA(this.pluginName,"plugin.off(event, callback)")}},{key:"offAll",value:function(){var t,e=this;hp(t=["__events","__onceEvents"]).call(t,(function(t){var n;hp(n=qh(e[t])).call(n,(function(n){e[t][n]&&e.off(n,e[t][n]),n&&delete e[t][n]}))})),this.__events={},this.__onceEvents={}}},{key:"emit",value:function(t){var e,n;if(this.player){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];(n=this.player).emit.apply(n,lh(e=[t]).call(e,i))}}},{key:"emitUserAction",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.player){var r=B_(B_({},n),{},{pluginName:this.pluginName});this.player.emitUserAction(t,e,r)}}},{key:"hook",value:function(t,e){var n;return EA.call.apply(EA,lh(n=[this]).call(n,uw(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(t,e){for(var n,r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return TA.call.apply(TA,lh(n=[this]).call(n,uw(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(t,e){for(var n,r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return CA.call.apply(CA,lh(n=[this]).call(n,uw(Array.prototype).call(arguments)))}},{key:"registerPlugin",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(this.player)return n&&(e.pluginName=n),this.player.registerPlugin({plugin:t,options:e})}},{key:"getPlugin",value:function(t){return this.player?this.player.getPlugin(t):null}},{key:"__destroy",value:function(){var t,e=this,n=this.player,r=this.pluginName;this.offAll(),sA.clearAllTimers(this),sA.checkIsFunction(this.destroy)&&this.destroy(),m_(t=["player","playerConfig","pluginName","logger","__args","__hooks"]).call(t,(function(t){e[t]=null})),n.unRegisterPlugin(r),this.__hooks=null}}],[{key:"defineGetterOrSetter",value:function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&Op(t,n,e[n])}},{key:"defineMethod",value:function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&"function"==typeof e[n]&&Op(t,n,{configurable:!0,value:e[n]})}},{key:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),t}();if("undefined"!=typeof Element&&!Element.prototype.matches){var LA=Element.prototype;LA.matches=LA.matchesSelector||LA.mozMatchesSelector||LA.msMatchesSelector||LA.oMatchesSelector||LA.webkitMatchesSelector}var MA=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}};function OA(t,e,n,r,i){var o=IA.apply(this,arguments);return t.addEventListener(n,o,i),{destroy:function(){t.removeEventListener(n,o,i)}}}function IA(t,e,n,r){return function(n){n.delegateTarget=MA(n.target,e),n.delegateTarget&&r.call(t,n)}}var PA=function(t,e,n,r,i){return"function"==typeof t.addEventListener?OA.apply(null,arguments):"function"==typeof n?cw(OA).call(OA,null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),m_(Array.prototype).call(t,(function(t){return OA(t,e,n,r,i)})))},RA=n(PA),BA={CONTROLS:"controls",ROOT:"root"},UA={ROOT:"root",ROOT_LEFT:"rootLeft",ROOT_RIGHT:"rootRight",ROOT_TOP:"rootTop",CONTROLS_LEFT:"controlsLeft",CONTROLS_RIGTH:"controlsRight",CONTROLS_RIGHT:"controlsRight",CONTROLS_CENTER:"controlsCenter",CONTROLS:"controls"},DA="xg-icon-disable";function jA(t){return!!t&&(lb(t)&&/^(?:http|data:|\/)/.test(t))}function FA(t,e){var n,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",s=null;if(t instanceof window.Element)return sA.addClass(t,i),m_(r=qh(o)).call(r,(function(e){t.setAttribute(e,o[e])})),t;if(jA(t)||jA(t.url))return o.src=jA(t)?t:t.url||"",s=sA.createDom(t.tag||"img","",o,"xg-img ".concat(i));if("function"==typeof t)try{var u,l;return(s=t())instanceof window.Element?(sA.addClass(s,i),m_(u=qh(o)).call(u,(function(t){s.setAttribute(t,o[t])})),s):(oA.logWarn(lh(l="warn>>icons.".concat(e," in config of plugin named [")).call(l,a,"] is a function mast return an Element Object")),null)}catch(c){return oA.logError("Plugin named [".concat(a,"]:createIcon"),c),null}return"string"==typeof t?sA.createDomFromHtml(t,o,i):(oA.logWarn(lh(n="warn>>icons.".concat(e," in config of plugin named [")).call(n,a,"] is invalid")),null)}function NA(t,e){var n,r=e.config.icons||e.playerConfig.icons;m_(n=qh(t)).call(n,(function(n){var i=t[n],o=i&&i.class?i.class:"",a=i&&i.attr?i.attr:{},s=null;r&&r[n]&&(o=function(t,e){var n;return"object"===U_(t)&&t.class&&"string"==typeof t.class?lh(n="".concat(e," ")).call(n,t.class):e}(r[n],o),a=function(t,e){var n;return"object"===U_(t)&&t.attr&&"object"===U_(t.attr)&&m_(n=qh(t.attr)).call(n,(function(n){e[n]=t.attr[n]})),e}(r[n],a),s=FA(r[n],n,o,a,e.pluginName)),!s&&i&&(s=FA(i.icon?i.icon:i,a,o,{},e.pluginName)),e.icons[n]=s}))}var HA=function(t){H_(n,t);var e=G_(n);function n(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return D_(this,n),(t=e.call(this,r)).__delegates=[],t}return F_(n,[{key:"__init",value:function(t){if(Y_(z_(n.prototype),"__init",this).call(this,t),t.root){var e=t.root,r=null;this.icons={},this.root=null,this.parent=null,NA(this.registerIcons()||{},this),this.langText={};var i,o,a,s=this.registerLanguageTexts()||{};o=this,m_(a=qh(i=s)).call(a,(function(t){Op(o.langText,t,{get:function(){var e=o.lang,n=o.i18n;return n[t]?n[t]:i[t]&&i[t][e]||""}})}));var u="";try{u=this.render()}catch(h){var l;throw oA.logError("Plugin:".concat(this.pluginName,":render"),h),new Error(lh(l="Plugin:".concat(this.pluginName,":render:")).call(l,h.message))}if(u)(r=n.insert(u,e,t.index)).setAttribute("data-index",t.index);else{if(!t.tag)return;(r=sA.createDom(t.tag,"",t.attr,t.name)).setAttribute("data-index",t.index),e.appendChild(r)}this.root=r,this.parent=e;var c=this.config.attr||{},f=this.config.style||{};this.setAttr(c),this.setStyle(f),this.config.index&&this.root.setAttribute("data-index",this.config.index),this.__registerChildren()}}},{key:"__registerChildren",value:function(){var t=this;if(this.root){this._children=[];var e,n=this.children();if(n&&"object"===U_(n))if(qh(n).length>0)m_(e=qh(n)).call(e,(function(e){var r,i,o=e,a=n[o],s={root:t.root};"function"==typeof a?(r=t.config[o]||{},i=a):"object"===U_(a)&&"function"==typeof a.plugin&&(r=a.options?sA.deepCopy(t.config[o]||{},a.options):t.config[o]||{},i=a.plugin),s.config=r,void 0!==r.index&&(s.index=r.index),r.root&&(s.root=r.root),t.registerPlugin(i,s,o)}))}}},{key:"updateLang",value:function(t){t||(t=this.lang);var e=this.root,n=this.i18n,r=this.langText;e&&function t(e,n){for(var r=0;r<e.children.length;r++)e.children[r].children.length>0?t(e.children[r],n):n(e.children[r])}(e,(function(e){var i=e.getAttribute&&e.getAttribute("lang-key");if(i){var o=n[i.toUpperCase()]||r[i];o&&(e.innerHTML="function"==typeof o?o(t):o)}}))}},{key:"lang",get:function(){return this.player.lang}},{key:"changeLangTextKey",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.i18n||{},r=this.langText;t.setAttribute&&t.setAttribute("lang-key",e);var i=n[e]||r[e]||"";i&&(t.innerHTML=i)}},{key:"plugins",value:function(){return this._children}},{key:"disable",value:function(){this.config.disable=!0,sA.addClass(mb(this).call(this,".xgplayer-icon"),DA)}},{key:"enable",value:function(){this.config.disable=!1,sA.removeClass(mb(this).call(this,".xgplayer-icon"),DA)}},{key:"children",value:function(){return{}}},{key:"registerPlugin",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e.root=e.root||this.root;var i=Y_(z_(n.prototype),"registerPlugin",this).call(this,t,e,r);return this._children.push(i),i}},{key:"registerIcons",value:function(){return{}}},{key:"registerLanguageTexts",value:function(){return{}}},{key:"find",value:function(t){if(this.root)return this.root.querySelector(t)}},{key:"bind",value:function(t,e,r){var i=this;if(arguments.length<3&&"function"==typeof e)vw(t)?hp(t).call(t,(function(t){i.bindEL(t,e)})):this.bindEL(t,e);else{var o,a=n.delegate.call(this,this.root,t,e,r);this.__delegates=lh(o=this.__delegates).call(o,a)}}},{key:"unbind",value:function(t,e){var n=this;if(arguments.length<3&&"function"==typeof e)vw(t)?hp(t).call(t,(function(t){n.unbindEL(t,e)})):this.unbindEL(t,e);else for(var r,i=lh(r="".concat(t,"_")).call(r,e),o=0;o<this.__delegates.length;o++)if(this.__delegates[o].key===i){var a;this.__delegates[o].destroy(),qb(a=this.__delegates).call(a,o,1);break}}},{key:"setStyle",value:function(t,e){var n,r=this;if(this.root)return"String"===sA.typeOf(t)?this.root.style[t]=e:void("Object"===sA.typeOf(t)&&m_(n=qh(t)).call(n,(function(e){r.root.style[e]=t[e]})))}},{key:"setAttr",value:function(t,e){var n,r=this;if(this.root)return"String"===sA.typeOf(t)?this.root.setAttribute(t,e):void("Object"===sA.typeOf(t)&&m_(n=qh(t)).call(n,(function(e){r.root.setAttribute(e,t[e])})))}},{key:"setHtml",value:function(t,e){this.root&&(this.root.innerHTML=t,"function"==typeof e&&e())}},{key:"bindEL",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.root&&"on".concat(t)in this.root&&"function"==typeof e&&this.root.addEventListener(t,e,n)}},{key:"unbindEL",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.root&&"on".concat(t)in this.root&&"function"==typeof e&&this.root.removeEventListener(t,e,n)}},{key:"show",value:function(t){if(this.root)return this.root.style.display=void 0!==t?t:"block","none"===window.getComputedStyle(this.root,null).getPropertyValue("display")?this.root.style.display="block":void 0}},{key:"hide",value:function(){this.root&&(this.root.style.display="none")}},{key:"appendChild",value:function(t,e){if(!this.root)return null;if(arguments.length<2&&arguments[0]instanceof window.Element)return this.root.appendChild(arguments[0]);if(!(e&&e instanceof window.Element))return null;try{return"string"==typeof t?mb(this).call(this,t).appendChild(e):t.appendChild(e)}catch(n){return oA.logError("Plugin:appendChild",n),null}}},{key:"render",value:function(){return""}},{key:"destroy",value:function(){}},{key:"__destroy",value:function(){var t,e,r,i=this,o=this.player;(m_(t=this.__delegates).call(t,(function(t){t.destroy()})),this.__delegates=[],this._children instanceof Array)&&(m_(r=this._children).call(r,(function(t){o.unRegisterPlugin(t.pluginName)})),this._children=null);this.root&&(this.root.hasOwnProperty("remove")?this.root.remove():this.root.parentNode&&this.root.parentNode.removeChild(this.root)),Y_(z_(n.prototype),"__destroy",this).call(this),this.icons={},m_(e=["root","parent"]).call(e,(function(t){i[t]=null}))}}],[{key:"insert",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=e.children.length,i=Number(n),o=t instanceof window.Node;if(r){for(var a=0,s=null,u="";a<r;a++){s=e.children[a];var l=Number(s.getAttribute("data-index"));if(l>=i){u="beforebegin";break}l<i&&(u="afterend")}return o?"afterend"===u?e.appendChild(t):e.insertBefore(t,s):s.insertAdjacentHTML(u,t),"afterend"===u?e.children[e.children.length-1]:e.children[a]}return o?e.appendChild(t):e.insertAdjacentHTML("beforeend",t),e.children[e.children.length-1]}},{key:"defaultConfig",get:function(){return{}}},{key:"delegate",value:function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=[];if(t instanceof window.Node&&"function"==typeof r)if(vw(n))hp(n).call(n,(function(n){var a,s=RA(t,e,n,r,i);s.key=lh(a="".concat(e,"_")).call(a,n),o.push(s)}));else{var a,s=RA(t,e,n,r,i);s.key=lh(a="".concat(e,"_")).call(a,n),o.push(s)}return o}},{key:"ROOT_TYPES",get:function(){return BA}},{key:"POSITIONS",get:function(){return UA}}]),n}(xA),zA="xgplayer-is-enter",VA="xgplayer-pause",qA="xgplayer-playing",GA="xgplayer-ended",YA="xgplayer-isloading",WA="xgplayer-is-error",KA="xgplayer-replay",XA="xgplayer-nostart",$A="not-allow-autoplay",JA=6;function QA(){return(new DOMParser).parseFromString('<svg class="play" xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="3 -4 28 40">\n <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M576,363L810,512L576,661zM342,214L576,363L576,661L342,810z"></path>\n</svg>\n',"image/svg+xml").firstChild}function ZA(){return(new DOMParser).parseFromString('<svg class="pause" xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="3 -4 28 40">\n <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M598,214h170v596h-170v-596zM256 810v-596h170v596h-170z"></path>\n</svg>\n',"image/svg+xml").firstChild}function tT(t,e,n){try{var r,i;return lh(r=lh(i=' <div class="xg-tips '.concat(n?"hide":" ",'" lang-key="')).call(i,t.i18nKeys[e],'">\n ')).call(r,t.i18n[e],"\n </div>")}catch(o){return'<div class="xg-tips hide"></div>'}}var eT=Mn,nT=ua.findIndex,rT="findIndex",iT=!0;rT in[]&&Array(1)[rT]((function(){iT=!1})),eT({target:"Array",proto:!0,forced:iT},{findIndex:function(t){return nT(this,t,arguments.length>1?arguments[1]:void 0)}});var oT=af("Array").findIndex,aT=ut,sT=oT,uT=Array.prototype,lT=n((function(t){var e=t.findIndex;return t===uT||aT(uT,t)&&e===uT.findIndex?sT:e})),cT=[{tag:"xg-cache",className:"xgplayer-progress-cache",styleKey:"cachedColor"},{tag:"xg-played",className:"xgplayer-progress-played",styleKey:"playedColor"}],fT=function(){function t(e){D_(this,t),this.fragments=e.fragments||[],0===this.fragments.length&&this.fragments.push({percent:1}),this._callBack=e.actionCallback,this.fragConfig={fragFocusClass:e.fragFocusClass||"inner-focus-point",fragAutoFocus:!!e.fragAutoFocus,fragClass:e.fragClass||""},this.style=e.style||{playedColor:"",cachedColor:"",progressColor:""},this.duration=0,this.cachedIndex=0,this.playedIndex=0,this.focusIndex=-1}return F_(t,[{key:"updateDuration",value:function(t){var e=this;this.duration=t;var n=0,r=this.fragments;this.fragments=m_(r).call(r,(function(t){return t.start=h_(n,10),t.end=h_(n+t.percent*e.duration,10),t.duration=h_(t.percent*e.duration,10),n+=t.percent*e.duration,t}))}},{key:"updateProgress",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"played",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{newIndex:0,curIndex:0,millisecond:0},n=this.progressList,r=this.fragments;if(!(n.length<1)){var i=e.newIndex,o=e.curIndex,a=e.millisecond;i!==o&&m_(n).call(n,(function(e,n){n<i?e[t].style.width="100%":n>i&&(e[t].style.width=0)}));var s=r[i],u=0===a?0:(a-s.start)/s.duration;n[i][t].style.width=u<0?0:"".concat(100*u,"%")}}},{key:"updateFocus",value:function(t){if(this.fragConfig.fragAutoFocus&&!(this.fragments.length<2))if(t){var e=lT(this).call(this,1e3*t.currentTime,this.focusIndex);if(e>=0&&e!==this.focusIndex){this.focusIndex>-1&&this.unHightLight(this.focusIndex),this.setHightLight(e);var n={index:e,preIndex:this.focusIndex,fragment:this.fragments[this.focusIndex]};this.focusIndex=e,this._callBack&&this._callBack(n)}}else if(this.focusIndex>-1){this.unHightLight(this.focusIndex);var r={index:-1,preIndex:this.focusIndex,fragment:null};this._callBack&&this._callBack(r),this.focusIndex=-1}}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{cached:0,played:0},e=arguments.length>1?arguments[1]:void 0;if(!this.duration||h_(1e3*e,10)!==this.duration){if(!e&&0!==e)return;this.updateDuration(h_(1e3*e,10))}var n=this.playedIndex,r=this.cachedIndex;if("Undefined"!==sA.typeOf(t.played)){var i=lT(this).call(this,1e3*t.played,n);if(i<0)return;this.updateProgress("played",{newIndex:i,curIndex:n,millisecond:h_(1e3*t.played,10)}),this.playedIndex=i}if("Undefined"!==sA.typeOf(t.cached)){var o=lT(this).call(this,1e3*t.cached,r);if(o<0)return;this.updateProgress("cached",{newIndex:o,curIndex:r,millisecond:h_(1e3*t.cached,10)}),this.cachedIndex=o}}},{key:"findIndex",value:function(t,e){var n=this.fragments;if(!n||0===n.length)return-1;if(1===n.length)return 0;if(e>-1&&e<n.length&&t>n[e].start&&t<n[e].end)return e;if(t>n[n.length-1].start)return n.length-1;for(var r=0;r<n.length;r++)if(t>n[r].start&&t<=n[r].end){e=r;break}return e}},{key:"findHightLight",value:function(){for(var t=this.root.children,e=0;e<t.length;e++)if(sA.hasClass(t[e],this.fragConfig.fragFocusClass))return{dom:t[e],pos:t[e].getBoundingClientRect()}}},{key:"findFragment",value:function(t){var e=this.root.children;return t<0||t>=e.length?null:{dom:e[t],pos:e[t].getBoundingClientRect()}}},{key:"unHightLight",value:function(){for(var t=this.root.children,e=0;e<t.length;e++)sA.removeClass(t[e],this.fragConfig.fragFocusClass)}},{key:"setHightLight",value:function(t){var e=this.root.children;if(t<e.length)return sA.addClass(e[t],this.fragConfig.fragFocusClass),{dom:e[t],pos:e[t].getBoundingClientRect()}}},{key:"destroy",value:function(){this.progressList=null,this.fragments=null,this.root.innerHTML=""}},{key:"reset",value:function(t){var e,n=this;if(hp(e=qh(this.fragConfig)).call(e,(function(e){void 0!==t[e]&&(n.fragConfig[e]=t[e])})),t.fragments){if(this.fragments=0===t.fragments.length?[{percent:1}]:t.fragments,this.updateDuration(this.duration),this.playedIndex=0,this.cachedIndex=0,this.root)for(var r=this.root.children;r.length>0;)this.root.removeChild(r[0]);this.render()}}},{key:"render",value:function(){var t=this,e=this.style.progressColor;if(this.root||(this.root=sA.createDom("xg-inners","",{},"progress-list")),this.fragments){var n,r=this.fragConfig,i=r.fragClass,o=r.fragFocusClass;this.progressList=m_(n=this.fragments).call(n,(function(n){var r,a,s=sA.createDom("xg-inner","",{style:e?lh(r="background:".concat(e,"; flex: ")).call(r,n.percent):"flex: ".concat(n.percent)},lh(a="".concat(n.isFocus?o:""," xgplayer-progress-inner ")).call(a,i));return t.root.appendChild(s),hp(cT).call(cT,(function(e){s.appendChild(sA.createDom(e.tag,"",{style:e.styleKey?"background: ".concat(t.style[e.styleKey],"; width:0;"):"width:0;"},e.className))})),{cached:s.children[0],played:s.children[1]}}))}return this.root}}]),t}(),hT={POINT:"inner-focus-point",HIGHLIGHT:"inner-focus-highlight"},pT=function(t){H_(n,t);var e=G_(n);function n(t){var r;return D_(this,n),N_(q_(r=e.call(this,t)),"onMoveOnly",(function(t,e){var n=q_(r),i=n.pos,o=n.config,a=n.player,s=e;if(t){sA.event(t);var u=sA.getEventPos(t,a.zoom),l=90===a.rotateDeg?u.clientY:u.clientX;if(i.moving&&Math.abs(i.x-l)<o.miniMoveStep)return;i.moving=!0,i.x=l,s=r.computeTime(t,l)}r.triggerCallbacks("dragmove",s,t),r._updateInnerFocus(s)})),N_(q_(r),"onBodyClick",(function(t){r.pos.isLocked&&(r.pos.isLocked=!1,t.preventDefault(),t.stopPropagation())})),N_(q_(r),"_mouseDownHandler",(function(t,e){r._state.time=e.currentTime,r.updateWidth(e.currentTime,e.seekTime,e.percent,0),r._updateInnerFocus(e)})),N_(q_(r),"_mouseUpHandler",(function(t,e){q_(r).pos.moving&&r.updateWidth(e.currentTime,e.seekTime,e.percent,2)})),N_(q_(r),"_mouseMoveHandler",(function(t,e){var n=q_(r),i=n._state,o=n.pos,a=n.config,s=n.player;i.time<e.currentTime?e.forward=!0:e.forward=!1,i.time=e.currentTime,o.isDown&&!o.moving&&(o.moving=!0,a.isPauseMoving&&s.pause(),r.triggerCallbacks("dragstart",e,t),r.emitUserAction("drag","dragstart",e)),r.updateWidth(e.currentTime,e.seekTime,e.percent,1),r.triggerCallbacks("dragmove",e,t),r._updateInnerFocus(e)})),N_(q_(r),"onMouseDown",(function(t){var e=q_(r),n=e._state,i=e.player,o=e.pos,a=e.config,s=e.playerConfig,u=sA.getEventPos(t,i.zoom),l=90===i.rotateDeg?u.clientY:u.clientX;if(!(i.isMini||a.closeMoveSeek||!s.allowSeekAfterEnded&&i.ended)){if(i.duration||i.isPlaying){t.stopPropagation(),r.focus(),sA.checkIsFunction(s.disableSwipeHandler)&&s.disableSwipeHandler(),sA.checkIsFunction(a.onMoveStart)&&a.onMoveStart(),sA.event(t),o.x=l,o.isDown=!0,o.moving=!1,n.prePlayTime=i.currentTime,i.focus({autoHide:!1}),r.isProgressMoving=!0,sA.addClass(r.progressBtn,"active");var c=r.computeTime(t,l);return c.prePlayTime=n.prePlayTime,r._mouseDownHandlerHook(t,c),"touchstart"===t.type?(r.root.addEventListener("touchmove",r.onMouseMove),r.root.addEventListener("touchend",r.onMouseUp),r.root.addEventListener("touchcancel",r.onMouseUp)):(r.unbind("mousemove",r.onMoveOnly),document.addEventListener("mousemove",r.onMouseMove,!1),document.addEventListener("mouseup",r.onMouseUp,!1)),!0}i.play()}})),N_(q_(r),"onMouseUp",(function(t){var e=q_(r),n=e.player,i=e.config,o=e.pos,a=e.playerConfig,s=e._state;t.stopPropagation(),t.preventDefault(),sA.checkIsFunction(a.enableSwipeHandler)&&a.enableSwipeHandler(),sA.checkIsFunction(i.onMoveEnd)&&i.onMoveEnd(),sA.event(t),sA.removeClass(r.progressBtn,"active");var u=r.computeTime(t,o.x);u.prePlayTime=s.prePlayTime,o.moving?(r.triggerCallbacks("dragend",u,t),r.emitUserAction("drag","dragend",u)):(r.triggerCallbacks("click",u,t),r.emitUserAction("click","click",u)),r._mouseUpHandlerHook(t,u),o.moving=!1,o.isDown=!1,o.x=0,o.y=0,o.isLocked=!0,s.prePlayTime=0,s.time=0;var l=t.type;"touchend"===l||"touchcancel"===l?(r.root.removeEventListener("touchmove",r.onMouseMove),r.root.removeEventListener("touchend",r.onMouseUp),r.root.removeEventListener("touchcancel",r.onMouseUp),r.blur()):(document.removeEventListener("mousemove",r.onMouseMove,!1),document.removeEventListener("mouseup",r.onMouseUp,!1),o.isEnter?"mobile"!==a.isMobileSimulateMode&&cw(r).call(r,"mousemove",r.onMoveOnly):r.onMouseLeave(t)),sA.setTimeout(q_(r),(function(){r.resetSeekState()}),1),n.focus()})),N_(q_(r),"onMouseMove",(function(t){var e=q_(r),n=e._state,i=e.pos,o=e.player,a=e.config;sA.checkTouchSupport()&&t.preventDefault(),sA.event(t);var s=sA.getEventPos(t,o.zoom),u=90===o.rotateDeg?s.clientY:s.clientX,l=Math.abs(i.x-u);if(!(i.moving&&l<a.miniMoveStep||!i.moving&&l<a.miniStartStep)){i.x=u;var c=r.computeTime(t,u);c.prePlayTime=n.prePlayTime,r._mouseMoveHandlerHook(t,c)}})),N_(q_(r),"onMouseOut",(function(t){r.triggerCallbacks("mouseout",null,t)})),N_(q_(r),"onMouseOver",(function(t){r.triggerCallbacks("mouseover",null,t)})),N_(q_(r),"onMouseEnter",(function(t){var e=q_(r),n=e.player,i=e.pos;if(!(i.isDown||i.isEnter||n.isMini||!n.config.allowSeekAfterEnded&&n.ended)){i.isEnter=!0,cw(r).call(r,"mousemove",r.onMoveOnly),cw(r).call(r,"mouseleave",r.onMouseLeave),sA.event(t);var o=sA.getEventPos(t,n.zoom),a=90===n.rotateDeg?o.clientY:o.clientX,s=r.computeTime(t,a);r.triggerCallbacks("mouseenter",s,t),r.focus()}})),N_(q_(r),"onMouseLeave",(function(t){r.triggerCallbacks("mouseleave",null,t),r.unlock(),r._updateInnerFocus(null)})),N_(q_(r),"onVideoResize",(function(){var t=r.pos,e=t.x,n=t.isDown;if(t.isEnter&&!n){var i=r.computeTime(null,e);r.onMoveOnly(null,i)}})),r.useable=!1,r.isProgressMoving=!1,r.__dragCallBacks=[],r._state={now:-1,direc:0,time:0,prePlayTime:-1},r._disableBlur=!1,"boolean"==typeof r.config.isDragingSeek&&(console.warn("[XGPLAYER] 'isDragingSeek' is deprecated, please use 'isDraggingSeek' instead"),r.config.isDraggingSeek=r.config.isDragingSeek),r}return F_(n,[{key:"offsetDuration",get:function(){return this.playerConfig.customDuration||this.player.offsetDuration||this.player.duration}},{key:"duration",get:function(){return this.playerConfig.customDuration||this.player.duration}},{key:"timeOffset",get:function(){return this.playerConfig.timeOffset||0}},{key:"currentTime",get:function(){var t=this.player,e=t.offsetCurrentTime,n=t.currentTime;return e>=0?e:n+this.timeOffset}},{key:"changeState",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.useable=t}},{key:"show",value:function(t){this.root&&(this.root.style.display="flex")}},{key:"_initInner",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e&&0!==e.length||(e=[{percent:1}]);var r,i=B_(B_({fragments:e},n),{},{actionCallback:function(e){t.emitUserAction("fragment_focus","fragment_focus",e)}});this.innerList?this.innerList.reset(i):(this.innerList=new fT(i),this.outer.insertBefore(this.innerList.render(),this.outer.children[0]),m_(r=["findHightLight","unHightLight","setHightLight","findFragment"]).call(r,(function(e){var n;t[e]=cw(n=t.innerList[e]).call(n,t.innerList)})))}},{key:"_updateInnerFocus",value:function(t){this.innerList&&this.innerList.updateFocus(t)}},{key:"afterCreate",value:function(){if(!this.config.disable&&!this.playerConfig.isLive){this.pos={x:0,y:0,moving:!1,isDown:!1,isEnter:!1,isLocked:!1},this.outer=mb(this).call(this,"xg-outer");var t=this.config,e=t.fragFocusClass,n=t.fragAutoFocus,r=t.fragClass;this._initInner(this.config.fragments,{fragFocusClass:e,fragAutoFocus:n,fragClass:r,style:this.playerConfig.commonStyle||{}}),"mobile"===fA.device&&(this.config.isDraggingSeek=!1,this.isMobile=!0),this.progressBtn=mb(this).call(this,".xgplayer-progress-btn"),this.listenEvents(),this.bindDomEvents(),this.initCustomStyle()}}},{key:"listenEvents",value:function(){var t=this;this.on(yA,(function(){t.onMouseLeave()})),this.on(gA,(function(){t.onTimeupdate()})),this.on(vA,(function(){t.onTimeupdate(),t.onCacheUpdate()})),this.on("progress",(function(){t.onCacheUpdate()})),this.on(pA,(function(){t.onCacheUpdate(!0),t.onTimeupdate(!0),t._state.now=0})),this.on(wA,(function(){t.onReset()})),this.on(_A,(function(){t.onVideoResize()}))}},{key:"setConfig",value:function(t){var e,n=this,r=null;hp(e=qh(t)).call(e,(function(e){n.config[e]=t[e],"fragments"===e&&(r=t[e])})),r&&this._initInner(r,t)}},{key:"initCustomStyle",value:function(){var t=(this.playerConfig||{}).commonStyle.sliderBtnStyle,e=this.progressBtn;if(t)if("string"==typeof t)e.style.boxShadow=t;else if("object"===U_(t)){var n;m_(n=qh(t)).call(n,(function(n){e.style[n]=t[n]}))}}},{key:"triggerCallbacks",value:function(t,e,n){var r;this.__dragCallBacks.length>0&&m_(r=this.__dragCallBacks).call(r,(function(r){if(r&&r.handler&&r.type===t)try{r.handler(e,n)}catch(AR){console.error("[XGPLAYER][triggerCallbacks] ".concat(r," error"),AR)}}))}},{key:"addCallBack",value:function(t,e){e&&"function"==typeof e&&this.__dragCallBacks.push({type:t,handler:e})}},{key:"removeCallBack",value:function(t,e){var n=this.__dragCallBacks,r=-1;m_(n).call(n,(function(n,i){n&&n.type===t&&n.handler===e&&(r=i)})),r>-1&&qb(n).call(n,r,1)}},{key:"unlock",value:function(){var t=this.player,e=this.pos;e.isEnter=!1,e.isLocked=!1,t.isMini||(this.unbind("mousemove",this.onMoveOnly),e.isDown?this.unbind("mouseleave",this.onMouseLeave):this.blur())}},{key:"bindDomEvents",value:function(){var t=this.player.config;(this._mouseDownHandlerHook=this.hook("dragstart",this._mouseDownHandler),this._mouseUpHandlerHook=this.hook("dragend",this._mouseUpHandler),this._mouseMoveHandlerHook=this.hook("drag",this._mouseMoveHandler),"touch"!==this.domEventType&&"compatible"!==this.domEventType||this.root.addEventListener("touchstart",this.onMouseDown),"mouse"===this.domEventType||"compatible"===this.domEventType)&&(cw(this).call(this,"mousedown",this.onMouseDown),"mobile"!==t.isMobileSimulateMode&&cw(this).call(this,"mouseenter",this.onMouseEnter),cw(this).call(this,"mouseover",this.onMouseOver),cw(this).call(this,"mouseout",this.onMouseOut),this.player.root.addEventListener("click",this.onBodyClick,!0))}},{key:"focus",value:function(){this.player.controls.pauseAutoHide(),sA.addClass(this.root,"active")}},{key:"blur",value:function(){this._disableBlur||(this.player.controls.recoverAutoHide(),sA.removeClass(this.root,"active"))}},{key:"disableBlur",value:function(){this._disableBlur=!0}},{key:"enableBlur",value:function(){this._disableBlur=!1}},{key:"updateWidth",value:function(t,e,n,r){var i=this.config,o=this.player;if(!i.isCloseClickSeek||0!==r){var a=e=e>=o.duration?o.duration-i.endedDiff:Number(e).toFixed(1);this.updatePercent(n),this.updateTime(t),(1!==r||i.isDraggingSeek&&"audio"!==o.config.mediaType)&&(this._state.now=a,this._state.direc=a>o.currentTime?0:1,o.seek(a))}}},{key:"computeTime",value:function(t,e){var n,r,i=this.player,o=this.root.getBoundingClientRect(),a=o.width,s=o.height,u=o.top,l=o.left,c=e;90===i.rotateDeg?(n=s,r=u):(n=a,r=l);var f=c-r,h=(f=f>n?n:f<0?0:f)/n,p=h_((h=h<0?0:h>1?1:h)*this.offsetDuration*1e3,10)/1e3;return{percent:h,currentTime:p,seekTime:sA.getCurrentTimeByOffset(p,i.timeSegments),offset:f,width:n,left:r,e:t}}},{key:"updateTime",value:function(t){var e=this.player,n=this.duration;t>n?t=n:t<0&&(t=0);var r=e.plugins.time;r&&r.updateTime(t)}},{key:"resetSeekState",value:function(){this.isProgressMoving=!1;var t=this.player.plugins.time;t&&t.resetActive()}},{key:"updatePercent",value:function(t,e){if(this.isProgressMoving=!0,!this.config.disable){t=t>1?1:t<0?0:t,this.progressBtn.style.left="".concat(100*t,"%"),this.innerList.update({played:t*this.offsetDuration},this.offsetDuration);var n=this.player.plugins.miniprogress;n&&n.update({played:t*this.offsetDuration},this.offsetDuration)}}},{key:"onTimeupdate",value:function(t){var e=this.player,n=this._state,r=this.offsetDuration;if(!(e.isSeeking&&e.media.seeking||this.isProgressMoving)&&e.hasStart){if(n.now>-1){var i=h_(1e3*n.now,10)-h_(1e3*e.currentTime,10);if(0===n.direc&&i>300||1===n.direc&&i>-300)return void(n.now=-1);n.now=-1}var o=this.currentTime;o=sA.adjustTimeByDuration(o,r,t),this.innerList.update({played:o},r),this.progressBtn.style.left="".concat(o/r*100,"%")}}},{key:"onCacheUpdate",value:function(t){var e=this.player,n=this.duration;if(e){var r=e.bufferedPoint.end;r=sA.adjustTimeByDuration(r,n,t),this.innerList.update({cached:r},n)}}},{key:"onReset",value:function(){this.innerList.update({played:0,cached:0},0),this.progressBtn.style.left="0%"}},{key:"destroy",value:function(){var t=this.player;this.thumbnailPlugin=null,this.innerList.destroy(),this.innerList=null;var e=this.domEventType;"touch"!==e&&"compatible"!==e||(this.root.removeEventListener("touchstart",this.onMouseDown),this.root.removeEventListener("touchmove",this.onMouseMove),this.root.removeEventListener("touchend",this.onMouseUp),this.root.removeEventListener("touchcancel",this.onMouseUp)),"mouse"!==e&&"compatible"!==e||(this.unbind("mousedown",this.onMouseDown),this.unbind("mouseenter",this.onMouseEnter),this.unbind("mousemove",this.onMoveOnly),this.unbind("mouseleave",this.onMouseLeave),document.removeEventListener("mousemove",this.onMouseMove,!1),document.removeEventListener("mouseup",this.onMouseUp,!1),t.root.removeEventListener("click",this.onBodyClick,!0))}},{key:"render",value:function(){if(!this.config.disable&&!this.playerConfig.isLive){var t=this.player.controls?this.player.controls.config.mode:"";return'\n <xg-progress class="xgplayer-progress '.concat("bottom"===t?"xgplayer-progress-bottom":"",'">\n <xg-outer class="xgplayer-progress-outer">\n <xg-progress-btn class="xgplayer-progress-btn"></xg-progress-btn>\n </xg-outer>\n </xg-progress>\n ')}}}],[{key:"pluginName",get:function(){return"progress"}},{key:"defaultConfig",get:function(){return{position:UA.CONTROLS_CENTER,index:0,disable:!1,isDraggingSeek:!0,closeMoveSeek:!1,isPauseMoving:!1,isCloseClickSeek:!1,fragments:[{percent:1}],fragFocusClass:hT.POINT,fragClass:"",fragAutoFocus:!1,miniMoveStep:5,miniStartStep:2,onMoveStart:function(){},onMoveEnd:function(){},endedDiff:.2}}},{key:"FRAGMENT_FOCUS_CLASS",get:function(){return hT}}]),n}(HA),dT=function(t){H_(n,t);var e=G_(n);function n(){var t,r;D_(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return N_(q_(r=e.call.apply(e,lh(t=[this]).call(t,o))),"_onMouseenter",(function(t){r.emit("icon_mouseenter",{pluginName:r.pluginName})})),N_(q_(r),"_onMouseLeave",(function(t){r.emit("icon_mouseleave",{pluginName:r.pluginName})})),r}return F_(n,[{key:"afterCreate",value:function(){cw(this).call(this,"mouseenter",this._onMouseenter),cw(this).call(this,"mouseleave",this._onMouseLeave),this.config.disable&&this.disable()}},{key:"destroy",value:function(){this.unbind("mouseenter",this._onMouseenter),this.unbind("mouseleave",this._onMouseLeave)}}]),n}(HA),vT=function(t){H_(n,t);var e=G_(n);function n(){var t,r;D_(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return N_(q_(r=e.call.apply(e,lh(t=[this]).call(t,o))),"btnClick",(function(t){t.preventDefault(),t.stopPropagation();var e=q_(r).player;return r.emitUserAction(t,"switch_play_pause",{prop:"paused",from:e.paused,to:!e.paused}),e.ended?e.replay():e.paused?(e.play(),r.animate(!1)):(e.pause(),r.animate(!0)),!1})),r}return F_(n,[{key:"afterCreate",value:function(){Y_(z_(n.prototype),"afterCreate",this).call(this),this.config.disable||(this.initIcons(),cw(this).call(this,["touchend","click"],this.btnClick),this.listenEvents(),this.animate(!0))}},{key:"listenEvents",value:function(){var t=this,e=this.player;this.on([hA,dA,"error",wA],(function(){t.animate(e.paused)}))}},{key:"registerIcons",value:function(){return{play:{icon:QA,class:"xg-icon-play"},pause:{icon:ZA,class:"xg-icon-pause"}}}},{key:"initIcons",value:function(){var t=this.icons;this.appendChild(".xgplayer-icon",t.play),this.appendChild(".xgplayer-icon",t.pause)}},{key:"animate",value:function(t){if(this.player){var e=this.i18nKeys,n=mb(this).call(this,".xg-tips");t?(this.setAttr("data-state","pause"),n&&this.changeLangTextKey(n,e.PLAY_TIPS)):(this.setAttr("data-state","play"),n&&this.changeLangTextKey(n,e.PAUSE_TIPS))}}},{key:"destroy",value:function(){Y_(z_(n.prototype),"destroy",this).call(this),this.unbind(["touchend","click"],this.btnClick)}},{key:"render",value:function(){if(!this.config.disable)return'<xg-icon class="xgplayer-play">\n <div class="xgplayer-icon">\n </div>\n '.concat(tT(this,"PLAY_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"play"}},{key:"defaultConfig",get:function(){return{position:UA.CONTROLS_LEFT,index:0,disable:!1}}}]),n}(dT);function gT(){return(new DOMParser).parseFromString('<svg width="32px" height="40px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <path d="M11.2374369,14 L17.6187184,7.61871843 C17.9604272,7.27700968 17.9604272,6.72299032 17.6187184,6.38128157 C17.2770097,6.03957281 16.7229903,6.03957281 16.3812816,6.38128157 L9.38128157,13.3812816 C9.03957281,13.7229903 9.03957281,14.2770097 9.38128157,14.6187184 L16.3812816,21.6187184 C16.7229903,21.9604272 17.2770097,21.9604272 17.6187184,21.6187184 C17.9604272,21.2770097 17.9604272,20.7229903 17.6187184,20.3812816 L11.2374369,14 L11.2374369,14 Z" fill="#FFFFFF"></path>\n </g>\n</svg>',"image/svg+xml").firstChild}var yT=function(t){H_(n,t);var e=G_(n);function n(){return D_(this,n),e.apply(this,arguments)}return F_(n,[{key:"afterCreate",value:function(){var t=this;this.initIcons(),this.onClick=function(e){e.preventDefault(),e.stopPropagation(),t.config.onClick(e)},cw(this).call(this,["click","touchend"],this.onClick)}},{key:"registerIcons",value:function(){return{screenBack:{icon:gT,class:"xg-fullscreen-back"}}}},{key:"initIcons",value:function(){var t=this.icons;this.appendChild(this.root,t.screenBack)}},{key:"show",value:function(){sA.addClass(this.root,"show")}},{key:"hide",value:function(){sA.removeClass(this.root,"show")}},{key:"render",value:function(){return'<xg-icon class="xgplayer-back">\n </xg-icon>'}}],[{key:"pluginName",get:function(){return"topbackicon"}},{key:"defaultConfig",get:function(){return{position:UA.ROOT_TOP,index:0}}}]),n}(HA);function mT(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="2 -4 28 40">\n <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M598 214h212v212h-84v-128h-128v-84zM726 726v-128h84v212h-212v-84h128zM214 426v-212h212v84h-128v128h-84zM298 598v128h128v84h-212v-212h84z"></path>\n</svg>\n',"image/svg+xml").firstChild}function wT(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="2 -4 28 40">\n <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M682 342h128v84h-212v-212h84v128zM598 810v-212h212v84h-128v128h-84zM342 342v-128h84v212h-212v-84h128zM214 682v-84h212v212h-84v-128h-128z"></path>\n</svg>\n',"image/svg+xml").firstChild}var bT=function(t){H_(n,t);var e=G_(n);function n(){var t,r;D_(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return N_(q_(r=e.call.apply(e,lh(t=[this]).call(t,o))),"_onOrientationChange",(function(t){r.player.fullscreen&&r.config.rotateFullscreen&&(90===window.orientation||-90===window.orientation?r.player.setRotateDeg(0):r.player.setRotateDeg(90))})),r}return F_(n,[{key:"afterCreate",value:function(){var t=this;Y_(z_(n.prototype),"afterCreate",this).call(this);var e=this.config,r=this.playerConfig;if(!e.disable){e.target&&(this.playerConfig.fullscreenTarget=this.config.target);var i=sA.getFullScreenEl();r.fullscreenTarget===i&&this.player.getFullscreen().catch((function(t){})),this.initIcons(),this.handleFullscreen=this.hook("fullscreenChange",this.toggleFullScreen,{pre:function(e){var n=t.player.fullscreen;t.emitUserAction(e,"switch_fullscreen",{prop:"fullscreen",from:n,to:!n})}}),cw(this).call(this,".xgplayer-fullscreen",["touchend","click"],this.handleFullscreen),this.on("fullscreen_change",(function(e){var n=mb(t).call(t,".xg-tips");n&&t.changeLangTextKey(n,e?t.i18nKeys.EXITFULLSCREEN_TIPS:t.i18nKeys.FULLSCREEN_TIPS),t.animate(e)})),this.config.needBackIcon&&(this.topBackIcon=this.player.registerPlugin({plugin:yT,options:{config:{onClick:function(e){t.handleFullscreen(e)}}}})),"mobile"===fA.device&&window.addEventListener("orientationchange",this._onOrientationChange)}}},{key:"registerIcons",value:function(){return{fullscreen:{icon:mT,class:"xg-get-fullscreen"},exitFullscreen:{icon:wT,class:"xg-exit-fullscreen"}}}},{key:"destroy",value:function(){Y_(z_(n.prototype),"destroy",this).call(this),this.unbind(".xgplayer-icon","mobile"===fA.device?"touchend":"click",this.handleFullscreen),"mobile"===fA.device&&window.removeEventListener("orientationchange",this._onOrientationChange)}},{key:"initIcons",value:function(){var t=this.icons;this.appendChild(".xgplayer-icon",t.fullscreen),this.appendChild(".xgplayer-icon",t.exitFullscreen)}},{key:"toggleFullScreen",value:function(t){t instanceof Event&&(t.preventDefault(),t.stopPropagation());var e=this.player,n=this.config;!0===n.useCssFullscreen||"function"==typeof n.useCssFullscreen&&n.useCssFullscreen()?(e.fullscreen?e.exitCssFullscreen():e.getCssFullscreen(),this.animate(e.fullscreen)):n.rotateFullscreen?(e.fullscreen?e.exitRotateFullscreen():e.getRotateFullscreen(),this.animate(e.fullscreen)):n.switchCallback&&"function"==typeof n.switchCallback?n.switchCallback(e.fullscreen):e.fullscreen?(e.exitFullscreen(),n.useScreenOrientation&&this.unlockScreen()):(e.getFullscreen().catch((function(t){})),n.useScreenOrientation&&e.aspectRatio>1&&this.lockScreen(n.lockOrientationType))}},{key:"animate",value:function(t){t?this.setAttr("data-state","full"):this.setAttr("data-state","normal"),this.topBackIcon&&(t?(this.topBackIcon.show(),this.hide()):(this.topBackIcon.hide(),this.show()))}},{key:"render",value:function(){if(!this.config.disable){return'<xg-icon class="xgplayer-fullscreen">\n <div class="xgplayer-icon">\n </div>\n '.concat(tT(this,"FULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}},{key:"lockScreen",value:function(t){try{screen.orientation.lock(t).catch((function(t){}))}catch(e){}}},{key:"unlockScreen",value:function(){try{screen.orientation.unlock().catch((function(t){}))}catch(t){}}}],[{key:"pluginName",get:function(){return"fullscreen"}},{key:"defaultConfig",get:function(){return{position:UA.CONTROLS_RIGHT,index:0,useCssFullscreen:!1,rotateFullscreen:!1,useScreenOrientation:!1,lockOrientationType:"landscape",switchCallback:null,target:null,disable:!1,needBackIcon:!1}}}]),n}(dT),_T=function(t){H_(n,t);var e=G_(n);function n(t){var r;return D_(this,n),(r=e.call(this,t)).isActiving=!1,r}return F_(n,[{key:"duration",get:function(){var t=this.player,e=t.offsetDuration,n=t.duration;return this.playerConfig.customDuration||e||n}},{key:"currentTime",get:function(){var t=this.player,e=t.offsetCurrentTime,n=t.currentTime;return e>=0?e:n}},{key:"timeOffset",get:function(){return this.playerConfig.timeOffset||0}},{key:"afterCreate",value:function(){var t=this.player.controls.config.mode;this.mode="flex"===t?"flex":"normal",this.config.disable||("flex"===this.mode&&(this.createCenterTime(),this.root.style.display="none"),this.durationDom=mb(this).call(this,".time-duration"),this.timeDom=mb(this).call(this,".time-current"),this.listenEvents())}},{key:"listenEvents",value:function(){var t=this;this.on([yA,vA,gA],(function(e){"durationchange"===e.eventName&&(t.isActiving=!1),t.onTimeUpdate()})),this.on(pA,(function(){t.onTimeUpdate(!0)})),this.on(wA,(function(){t.onReset()}))}},{key:"show",value:function(t){if("flex"===this.mode)return this.centerCurDom&&(this.centerCurDom.style.display="block"),void(this.centerDurDom&&(this.centerDurDom.style.display="block"));this.root.style.display="block"}},{key:"hide",value:function(){if("flex"===this.mode)return this.centerCurDom&&(this.centerCurDom.style.display="none"),void(this.centerDurDom&&(this.centerDurDom.style.display="none"));this.root.style.display="none"}},{key:"onTimeUpdate",value:function(t){var e=this.player,n=this.config,r=this.duration;if(!n.disable&&!this.isActiving&&e.hasStart){var i=this.currentTime+this.timeOffset;i=sA.adjustTimeByDuration(i,r,t),"flex"===this.mode?(this.centerCurDom.innerHTML=this.minWidthTime(sA.format(i)),r!==1/0&&r>0&&(this.centerDurDom.innerHTML=sA.format(r))):(this.timeDom.innerHTML=this.minWidthTime(sA.format(i)),r!==1/0&&r>0&&(this.durationDom.innerHTML=sA.format(r)))}}},{key:"onReset",value:function(){"flex"===this.mode?(this.centerCurDom.innerHTML=this.minWidthTime(sA.format(0)),this.centerDurDom.innerHTML=sA.format(0)):(this.timeDom.innerHTML=this.minWidthTime(sA.format(0)),this.durationDom.innerHTML=sA.format(0))}},{key:"createCenterTime",value:function(){var t=this.player;if(t.controls&&t.controls.center){var e=t.controls.center;this.centerCurDom=sA.createDom("xg-icon","00:00",{},"xgplayer-time xg-time-left"),this.centerDurDom=sA.createDom("xg-icon","00:00",{},"xgplayer-time xg-time-right"),e.children.length>0?e.insertBefore(this.centerCurDom,e.children[0]):e.appendChild(this.centerCurDom),e.appendChild(this.centerDurDom)}}},{key:"afterPlayerInit",value:function(){var t=this.config;this.duration===1/0||this.playerConfig.isLive?(sA.hide(this.durationDom),sA.hide(this.timeDom),sA.hide(mb(this).call(this,".time-separator")),sA.show(mb(this).call(this,".time-live-tag"))):sA.hide(mb(this).call(this,".time-live-tag"));t.hide?this.hide():this.show()}},{key:"changeLiveState",value:function(t){t?(sA.hide(this.durationDom),sA.hide(this.timeDom),sA.hide(mb(this).call(this,".time-separator")),sA.show(mb(this).call(this,".time-live-tag"))):(sA.hide(mb(this).call(this,".time-live-tag")),sA.show(mb(this).call(this,".time-separator")),sA.show(this.durationDom),sA.show(this.timeDom))}},{key:"updateTime",value:function(t){this.isActiving=!0,!t&&0!==t||t>this.duration||("flex"!==this.mode?this.timeDom.innerHTML=this.minWidthTime(sA.format(t)):this.centerCurDom.innerHTML=this.minWidthTime(sA.format(t)))}},{key:"minWidthTime",value:function(t){var e;return m_(e=t.split(":")).call(e,(function(t){return'<span class="time-min-width">'.concat(t,"</span>")})).join(":")}},{key:"resetActive",value:function(){var t=this,e=this.player,n=function(){t.isActiving=!1};this.off(vA,n),e.isSeeking&&e.media.seeking?this.once(vA,n):this.isActiving=!1}},{key:"destroy",value:function(){var t=this.player.controls.center;this.centerCurDom&&t.removeChild(this.centerCurDom),this.centerCurDom=null,this.centerDurDom&&t.removeChild(this.centerDurDom),this.centerDurDom=null}},{key:"render",value:function(){if(!this.config.disable)return'<xg-icon class="xgplayer-time">\n <span class="time-current">00:00</span>\n <span class="time-separator">/</span>\n <span class="time-duration">00:00</span>\n <span class="time-live-tag">'.concat(this.i18n.LIVE_TIP,"</span>\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"time"}},{key:"defaultConfig",get:function(){return{position:UA.CONTROLS_LEFT,index:2,disable:!1}}}]),n}(HA);function kT(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="0 -10 28 40">\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M358.4 358.4h-204.8v307.2h204.8l256 256v-819.2l-256 256z"></path>\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M940.632 837.632l-72.192-72.192c65.114-64.745 105.412-154.386 105.412-253.44s-40.299-188.695-105.396-253.424l-0.016-0.016 72.192-72.192c83.639 83.197 135.401 198.37 135.401 325.632s-51.762 242.434-135.381 325.612l-0.020 0.020zM795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021z"></path>\n</svg>\n',"image/svg+xml").firstChild}function ET(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="0 -10 28 40">\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M358.4 358.4h-204.8v307.2h204.8l256 256v-819.2l-256 256z"></path>\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021zM795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021z"></path>\n</svg>\n',"image/svg+xml").firstChild}function AT(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="0 -10 28 40">\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M358.4 358.4h-204.8v307.2h204.8l256 256v-819.2l-256 256z"></path>\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M920.4 439.808l-108.544-109.056-72.704 72.704 109.568 108.544-109.056 108.544 72.704 72.704 108.032-109.568 108.544 109.056 72.704-72.704-109.568-108.032 109.056-108.544-72.704-72.704-108.032 109.568z"></path>\n</svg>\n',"image/svg+xml").firstChild}var TT=function(t){H_(n,t);var e=G_(n);function n(){var t,r;D_(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return N_(q_(r=e.call.apply(e,lh(t=[this]).call(t,o))),"onBarMousedown",(function(t){var e=q_(r).player,n=mb(r).call(r,".xgplayer-bar");sA.event(t);var i=n.getBoundingClientRect(),o=sA.getEventPos(t,e.zoom),a=i.height-(o.clientY-i.top);if(o.h=a,o.barH=i.height,r.pos=o,!(a<-2))return r.updateVolumePos(a,t),document.addEventListener("mouseup",r.onBarMouseUp),r._d.isStart=!0,!1})),N_(q_(r),"onBarMouseMove",(function(t){var e=q_(r)._d;if(e.isStart){var n=q_(r),i=n.pos,o=n.player;t.preventDefault(),t.stopPropagation(),sA.event(t);var a=sA.getEventPos(t,o.zoom);e.isMoving=!0;var s=i.h-a.clientY+i.clientY;s>i.barH||r.updateVolumePos(s,t)}})),N_(q_(r),"onBarMouseUp",(function(t){sA.event(t),document.removeEventListener("mouseup",r.onBarMouseUp);var e=q_(r)._d;e.isStart=!1,e.isMoving=!1})),N_(q_(r),"onMouseenter",(function(t){r._d.isActive=!0,r.focus(),r.emit("icon_mouseenter",{pluginName:r.pluginName})})),N_(q_(r),"onMouseleave",(function(t){r._d.isActive=!1,r.unFocus(100,!1,t),r.emit("icon_mouseleave",{pluginName:r.pluginName})})),N_(q_(r),"onVolumeChange",(function(t){if(r.player){var e=r.player,n=e.muted,i=e.volume;r._d.isMoving||(mb(r).call(r,".xgplayer-drag").style.height=n||0===i?"4px":"".concat(100*i,"%"),r.config.showValueLabel&&r.updateVolumeValue()),r.animate(n,i)}})),r}return F_(n,[{key:"registerIcons",value:function(){return{volumeSmall:{icon:ET,class:"xg-volume-small"},volumeLarge:{icon:kT,class:"xg-volume"},volumeMuted:{icon:AT,class:"xg-volume-mute"}}}},{key:"afterCreate",value:function(){var t=this;if(this._timerId=null,this._d={isStart:!1,isMoving:!1,isActive:!1},!this.config.disable){this.initIcons();var e=this.playerConfig,n=e.commonStyle,r=e.volume;if(n.volumeColor)mb(this).call(this,".xgplayer-drag").style.backgroundColor=n.volumeColor;if(this.changeMutedHandler=this.hook("mutedChange",(function(e){t.changeMuted(e)}),{pre:function(t){t.preventDefault(),t.stopPropagation()}}),this._onMouseenterHandler=this.hook("mouseenter",this.onMouseenter),this._onMouseleaveHandler=this.hook("mouseleave",this.onMouseleave),"mobile"!==fA.device&&"mobile"!==this.playerConfig.isMobileSimulateMode)cw(this).call(this,"mouseenter",this._onMouseenterHandler),cw(this).call(this,["blur","mouseleave"],this._onMouseleaveHandler),cw(this).call(this,".xgplayer-slider","mousedown",this.onBarMousedown),cw(this).call(this,".xgplayer-slider","mousemove",this.onBarMouseMove),cw(this).call(this,".xgplayer-slider","mouseup",this.onBarMouseUp);cw(this).call(this,".xgplayer-icon",["touchend","click"],this.changeMutedHandler),this.on(mA,this.onVolumeChange),this.once("loadeddata",this.onVolumeChange),"Number"!==sA.typeOf(r)&&(this.player.volume=this.config.default),this.onVolumeChange()}}},{key:"updateVolumePos",value:function(t,e){var n=this.player,r=mb(this).call(this,".xgplayer-drag"),i=mb(this).call(this,".xgplayer-bar");if(i&&r){var o=h_(t/i.getBoundingClientRect().height*1e3,10);r.style.height="".concat(t,"px");var a=Math.max(Math.min(o/1e3,1),0),s={volume:{from:n.volume,to:a}};n.muted&&(s.muted={from:!0,to:!1}),this.emitUserAction(e,"change_volume",{muted:n.muted,volume:n.volume,props:s}),n.volume=Math.max(Math.min(o/1e3,1),0),n.muted&&(n.muted=!1),this.config.showValueLabel&&this.updateVolumeValue()}}},{key:"updateVolumeValue",value:function(){var t=this.player,e=t.volume,n=t.muted,r=mb(this).call(this,".xgplayer-value-label"),i=Math.max(Math.min(e,1),0);r.innerText=n?0:Math.round(100*i)}},{key:"focus",value:function(){this.player.focus({autoHide:!1}),this._timerId&&(sA.clearTimeout(this,this._timerId),this._timerId=null),sA.addClass(this.root,"slide-show")}},{key:"unFocus",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2?arguments[2]:void 0,i=this._d,o=this.player;i.isActive||(this._timerId&&(sA.clearTimeout(this,this._timerId),this._timerId=null),this._timerId=sA.setTimeout(this,(function(){i.isActive||(n?o.blur():o.focus(),sA.removeClass(t.root,"slide-show"),i.isStart&&t.onBarMouseUp(r)),t._timerId=null}),e))}},{key:"changeMuted",value:function(t){t&&t.stopPropagation();var e=this.player;this._d.isStart&&this.onBarMouseUp(t),this.emitUserAction(t,"change_muted",{muted:e.muted,volume:e.volume,props:{muted:{from:e.muted,to:!e.muted}}}),e.volume>0&&(e.muted=!e.muted),e.volume<.01&&(e.volume=this.config.miniVolume)}},{key:"animate",value:function(t,e){t||0===e?this.setAttr("data-state","mute"):e<.5&&this.icons.volumeSmall?this.setAttr("data-state","small"):this.setAttr("data-state","normal")}},{key:"initIcons",value:function(){var t=this.icons;this.appendChild(".xgplayer-icon",t.volumeSmall),this.appendChild(".xgplayer-icon",t.volumeLarge),this.appendChild(".xgplayer-icon",t.volumeMuted)}},{key:"destroy",value:function(){this._timerId&&(sA.clearTimeout(this,this._timerId),this._timerId=null),this.unbind("mouseenter",this.onMouseenter),this.unbind(["blur","mouseleave"],this.onMouseleave),this.unbind(".xgplayer-slider","mousedown",this.onBarMousedown),this.unbind(".xgplayer-slider","mousemove",this.onBarMouseMove),this.unbind(".xgplayer-slider","mouseup",this.onBarMouseUp),document.removeEventListener("mouseup",this.onBarMouseUp),this.unbind(".xgplayer-icon","mobile"===fA.device?"touchend":"click",this.changeMutedHandler)}},{key:"render",value:function(){var t;if(!this.config.disable){var e=this.config.default||this.player.volume,n=this.config.showValueLabel;return lh(t='\n <xg-icon class="xgplayer-volume" data-state="normal">\n <div class="xgplayer-icon">\n </div>\n <xg-slider class="xgplayer-slider">\n '.concat(n?'<div class="xgplayer-value-label">'.concat(100*e,"</div>"):"",'\n <div class="xgplayer-bar">\n <xg-drag class="xgplayer-drag" style="height: ')).call(t,100*e,'%"></xg-drag>\n </div>\n </xg-slider>\n </xg-icon>')}}}],[{key:"pluginName",get:function(){return"volume"}},{key:"defaultConfig",get:function(){return{position:UA.CONTROLS_RIGHT,index:1,disable:!1,showValueLabel:!1,default:.6,miniVolume:.2}}}]),n}(HA),CT=a,ST=pe("iterator"),xT=!CT((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,n="";return t.pathname="c%20d",e.forEach((function(t,r){e.delete("b"),n+=r+t})),!t.toJSON||!e.size&&true||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[ST]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host})),LT=y,MT=2147483647,OT=/[^\0-\u007E]/,IT=/[.\u3002\uFF0E\uFF61]/g,PT="Overflow: input needs wider integers to process",RT=RangeError,BT=LT(IT.exec),UT=Math.floor,DT=String.fromCharCode,jT=LT("".charCodeAt),FT=LT([].join),NT=LT([].push),HT=LT("".replace),zT=LT("".split),VT=LT("".toLowerCase),qT=function(t){return t+22+75*(t<26)},GT=function(t,e,n){var r=0;for(t=n?UT(t/700):t>>1,t+=UT(t/e);t>455;)t=UT(t/35),r+=36;return UT(r+36*t/(t+38))},YT=function(t){var e=[];t=function(t){for(var e=[],n=0,r=t.length;n<r;){var i=jT(t,n++);if(i>=55296&&i<=56319&&n<r){var o=jT(t,n++);56320==(64512&o)?NT(e,((1023&i)<<10)+(1023&o)+65536):(NT(e,i),n--)}else NT(e,i)}return e}(t);var n,r,i=t.length,o=128,a=0,s=72;for(n=0;n<t.length;n++)(r=t[n])<128&&NT(e,DT(r));var u=e.length,l=u;for(u&&NT(e,"-");l<i;){var c=MT;for(n=0;n<t.length;n++)(r=t[n])>=o&&r<c&&(c=r);var f=l+1;if(c-o>UT((MT-a)/f))throw RT(PT);for(a+=(c-o)*f,o=c,n=0;n<t.length;n++){if((r=t[n])<o&&++a>MT)throw RT(PT);if(r==o){for(var h=a,p=36;;){var d=p<=s?1:p>=s+26?26:p-s;if(h<d)break;var v=h-d,g=36-d;NT(e,DT(qT(d+v%g))),h=UT(v/g),p+=36}NT(e,DT(qT(h))),s=GT(a,f,l==u),a=0,l++}}a++,o++}return FT(e,"")},WT=fo,KT=function(t,e,n){for(var r in e)n&&n.unsafe&&t[r]?t[r]=e[r]:WT(t,r,e[r],n);return t},XT=Mn,$T=o,JT=P,QT=y,ZT=M,tC=xT,eC=fo,nC=po,rC=KT,iC=jo,oC=$u,aC=ta,sC=rv,uC=x,lC=Zt,cC=Je,fC=lr,hC=rn,pC=et,dC=ei,vC=Wi,gC=N,yC=ud,mC=jh,wC=cv,bC=_E,_C=pe("iterator"),kC="URLSearchParams",EC=kC+"Iterator",AC=aC.set,TC=aC.getterFor(kC),CC=aC.getterFor(EC),SC=Object.getOwnPropertyDescriptor,xC=function(t){if(!ZT)return $T[t];var e=SC($T,t);return e&&e.value},LC=xC("fetch"),MC=xC("Request"),OC=xC("Headers"),IC=MC&&MC.prototype,PC=OC&&OC.prototype,RC=$T.RegExp,BC=$T.TypeError,UC=$T.decodeURIComponent,DC=$T.encodeURIComponent,jC=QT("".charAt),FC=QT([].join),NC=QT([].push),HC=QT("".replace),zC=QT([].shift),VC=QT([].splice),qC=QT("".split),GC=QT("".slice),YC=/\+/g,WC=Array(4),KC=function(t){return WC[t-1]||(WC[t-1]=RC("((?:%[\\da-f]{2}){"+t+"})","gi"))},XC=function(t){try{return UC(t)}catch(AR){return t}},$C=function(t){var e=HC(t,YC," "),n=4;try{return UC(e)}catch(AR){for(;n;)e=HC(e,KC(n--),XC);return e}},JC=/[!'()~]|%20/g,QC={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ZC=function(t){return QC[t]},tS=function(t){return HC(DC(t),JC,ZC)},eS=oC((function(t,e){AC(this,{type:EC,iterator:yC(TC(t).entries),kind:e})}),"Iterator",(function(){var t=CC(this),e=t.kind,n=t.iterator.next(),r=n.value;return n.done||(n.value="keys"===e?r.key:"values"===e?r.value:[r.key,r.value]),n}),!0),nS=function(t){this.entries=[],this.url=null,void 0!==t&&(pC(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===jC(t,0)?GC(t,1):t:dC(t)))};nS.prototype={type:kC,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,n,r,i,o,a,s,u=mC(t);if(u)for(n=(e=yC(t,u)).next;!(r=JT(n,e)).done;){if(o=(i=yC(hC(r.value))).next,(a=JT(o,i)).done||(s=JT(o,i)).done||!JT(o,i).done)throw BC("Expected sequence with length 2");NC(this.entries,{key:dC(a.value),value:dC(s.value)})}else for(var l in t)lC(t,l)&&NC(this.entries,{key:l,value:dC(t[l])})},parseQuery:function(t){if(t)for(var e,n,r=qC(t,"&"),i=0;i<r.length;)(e=r[i++]).length&&(n=qC(e,"="),NC(this.entries,{key:$C(zC(n)),value:$C(FC(n,"="))}))},serialize:function(){for(var t,e=this.entries,n=[],r=0;r<e.length;)t=e[r++],NC(n,tS(t.key)+"="+tS(t.value));return FC(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var rS=function(){sC(this,iS);var t=AC(this,new nS(arguments.length>0?arguments[0]:void 0));ZT||(this.length=t.entries.length)},iS=rS.prototype;if(rC(iS,{append:function(t,e){wC(arguments.length,2);var n=TC(this);NC(n.entries,{key:dC(t),value:dC(e)}),ZT||this.length++,n.updateURL()},delete:function(t){wC(arguments.length,1);for(var e=TC(this),n=e.entries,r=dC(t),i=0;i<n.length;)n[i].key===r?VC(n,i,1):i++;ZT||(this.length=n.length),e.updateURL()},get:function(t){wC(arguments.length,1);for(var e=TC(this).entries,n=dC(t),r=0;r<e.length;r++)if(e[r].key===n)return e[r].value;return null},getAll:function(t){wC(arguments.length,1);for(var e=TC(this).entries,n=dC(t),r=[],i=0;i<e.length;i++)e[i].key===n&&NC(r,e[i].value);return r},has:function(t){wC(arguments.length,1);for(var e=TC(this).entries,n=dC(t),r=0;r<e.length;)if(e[r++].key===n)return!0;return!1},set:function(t,e){wC(arguments.length,1);for(var n,r=TC(this),i=r.entries,o=!1,a=dC(t),s=dC(e),u=0;u<i.length;u++)(n=i[u]).key===a&&(o?VC(i,u--,1):(o=!0,n.value=s));o||NC(i,{key:a,value:s}),ZT||(this.length=i.length),r.updateURL()},sort:function(){var t=TC(this);bC(t.entries,(function(t,e){return t.key>e.key?1:-1})),t.updateURL()},forEach:function(t){for(var e,n=TC(this).entries,r=cC(t,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)r((e=n[i++]).value,e.key,this)},keys:function(){return new eS(this,"keys")},values:function(){return new eS(this,"values")},entries:function(){return new eS(this,"entries")}},{enumerable:!0}),eC(iS,_C,iS.entries,{name:"entries"}),eC(iS,"toString",(function(){return TC(this).serialize()}),{enumerable:!0}),ZT&&nC(iS,"size",{get:function(){return TC(this).entries.length},configurable:!0,enumerable:!0}),iC(rS,kC),XT({global:!0,constructor:!0,forced:!tC},{URLSearchParams:rS}),!tC&&uC(OC)){var oS=QT(PC.has),aS=QT(PC.set),sS=function(t){if(pC(t)){var e,n=t.body;if(fC(n)===kC)return e=t.headers?new OC(t.headers):new OC,oS(e,"content-type")||aS(e,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),vC(t,{body:gC(0,dC(n)),headers:gC(0,e)})}return t};if(uC(LC)&&XT({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(t){return LC(t,arguments.length>1?sS(arguments[1]):{})}}),uC(MC)){var uS=function(t){return sC(this,IC),new MC(t,arguments.length>1?sS(arguments[1]):{})};IC.constructor=uS,uS.prototype=IC,XT({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:uS})}}var lS,cS=Mn,fS=M,hS=xT,pS=o,dS=Je,vS=y,gS=fo,yS=po,mS=rv,wS=Zt,bS=O_,_S=Lw,kS=ro,ES=wc.codeAt,AS=function(t){var e,n,r=[],i=zT(HT(VT(t),IT,"."),".");for(e=0;e<i.length;e++)n=i[e],NT(r,BT(OT,n)?"xn--"+YT(n):n);return FT(r,".")},TS=ei,CS=jo,SS=cv,xS={URLSearchParams:rS,getState:TC},LS=ta,MS=LS.set,OS=LS.getterFor("URL"),IS=xS.URLSearchParams,PS=xS.getState,RS=pS.URL,BS=pS.TypeError,US=pS.parseInt,DS=Math.floor,jS=Math.pow,FS=vS("".charAt),NS=vS(/./.exec),HS=vS([].join),zS=vS(1..toString),VS=vS([].pop),qS=vS([].push),GS=vS("".replace),YS=vS([].shift),WS=vS("".split),KS=vS("".slice),XS=vS("".toLowerCase),$S=vS([].unshift),JS="Invalid scheme",QS="Invalid host",ZS="Invalid port",tx=/[a-z]/i,ex=/[\d+-.a-z]/i,nx=/\d/,rx=/^0x/i,ix=/^[0-7]+$/,ox=/^\d+$/,ax=/^[\da-f]+$/i,sx=/[\0\t\n\r #%/:<>?@[\\\]^|]/,ux=/[\0\t\n\r #/:<>?@[\\\]^|]/,lx=/^[\u0000-\u0020]+/,cx=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,fx=/[\t\n\r]/g,hx=function(t){var e,n,r,i;if("number"==typeof t){for(e=[],n=0;n<4;n++)$S(e,t%256),t=DS(t/256);return HS(e,".")}if("object"==typeof t){for(e="",r=function(t){for(var e=null,n=1,r=null,i=0,o=0;o<8;o++)0!==t[o]?(i>n&&(e=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(e=r,n=i),e}(t),n=0;n<8;n++)i&&0===t[n]||(i&&(i=!1),r===n?(e+=n?":":"::",i=!0):(e+=zS(t[n],16),n<7&&(e+=":")));return"["+e+"]"}return t},px={},dx=bS({},px,{" ":1,'"':1,"<":1,">":1,"`":1}),vx=bS({},dx,{"#":1,"?":1,"{":1,"}":1}),gx=bS({},vx,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),yx=function(t,e){var n=ES(t,0);return n>32&&n<127&&!wS(e,t)?t:encodeURIComponent(t)},mx={ftp:21,file:null,http:80,https:443,ws:80,wss:443},wx=function(t,e){var n;return 2==t.length&&NS(tx,FS(t,0))&&(":"==(n=FS(t,1))||!e&&"|"==n)},bx=function(t){var e;return t.length>1&&wx(KS(t,0,2))&&(2==t.length||"/"===(e=FS(t,2))||"\\"===e||"?"===e||"#"===e)},_x=function(t){return"."===t||"%2e"===XS(t)},kx={},Ex={},Ax={},Tx={},Cx={},Sx={},xx={},Lx={},Mx={},Ox={},Ix={},Px={},Rx={},Bx={},Ux={},Dx={},jx={},Fx={},Nx={},Hx={},zx={},Vx=function(t,e,n){var r,i,o,a=TS(t);if(e){if(i=this.parse(a))throw BS(i);this.searchParams=null}else{if(void 0!==n&&(r=new Vx(n,!0)),i=this.parse(a,null,r))throw BS(i);(o=PS(new IS)).bindURL(this),this.searchParams=o}};Vx.prototype={type:"URL",parse:function(t,e,n){var r,i,o,a,s,u=this,l=e||kx,c=0,f="",h=!1,p=!1,d=!1;for(t=TS(t),e||(u.scheme="",u.username="",u.password="",u.host=null,u.port=null,u.path=[],u.query=null,u.fragment=null,u.cannotBeABaseURL=!1,t=GS(t,lx,""),t=GS(t,cx,"$1")),t=GS(t,fx,""),r=_S(t);c<=r.length;){switch(i=r[c],l){case kx:if(!i||!NS(tx,i)){if(e)return JS;l=Ax;continue}f+=XS(i),l=Ex;break;case Ex:if(i&&(NS(ex,i)||"+"==i||"-"==i||"."==i))f+=XS(i);else{if(":"!=i){if(e)return JS;f="",l=Ax,c=0;continue}if(e&&(u.isSpecial()!=wS(mx,f)||"file"==f&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=f,e)return void(u.isSpecial()&&mx[u.scheme]==u.port&&(u.port=null));f="","file"==u.scheme?l=Bx:u.isSpecial()&&n&&n.scheme==u.scheme?l=Tx:u.isSpecial()?l=Lx:"/"==r[c+1]?(l=Cx,c++):(u.cannotBeABaseURL=!0,qS(u.path,""),l=Nx)}break;case Ax:if(!n||n.cannotBeABaseURL&&"#"!=i)return JS;if(n.cannotBeABaseURL&&"#"==i){u.scheme=n.scheme,u.path=kS(n.path),u.query=n.query,u.fragment="",u.cannotBeABaseURL=!0,l=zx;break}l="file"==n.scheme?Bx:Sx;continue;case Tx:if("/"!=i||"/"!=r[c+1]){l=Sx;continue}l=Mx,c++;break;case Cx:if("/"==i){l=Ox;break}l=Fx;continue;case Sx:if(u.scheme=n.scheme,i==lS)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=kS(n.path),u.query=n.query;else if("/"==i||"\\"==i&&u.isSpecial())l=xx;else if("?"==i)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=kS(n.path),u.query="",l=Hx;else{if("#"!=i){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=kS(n.path),u.path.length--,l=Fx;continue}u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=kS(n.path),u.query=n.query,u.fragment="",l=zx}break;case xx:if(!u.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,l=Fx;continue}l=Ox}else l=Mx;break;case Lx:if(l=Mx,"/"!=i||"/"!=FS(f,c+1))continue;c++;break;case Mx:if("/"!=i&&"\\"!=i){l=Ox;continue}break;case Ox:if("@"==i){h&&(f="%40"+f),h=!0,o=_S(f);for(var v=0;v<o.length;v++){var g=o[v];if(":"!=g||d){var y=yx(g,gx);d?u.password+=y:u.username+=y}else d=!0}f=""}else if(i==lS||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(h&&""==f)return"Invalid authority";c-=_S(f).length+1,f="",l=Ix}else f+=i;break;case Ix:case Px:if(e&&"file"==u.scheme){l=Dx;continue}if(":"!=i||p){if(i==lS||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(u.isSpecial()&&""==f)return QS;if(e&&""==f&&(u.includesCredentials()||null!==u.port))return;if(a=u.parseHost(f))return a;if(f="",l=jx,e)return;continue}"["==i?p=!0:"]"==i&&(p=!1),f+=i}else{if(""==f)return QS;if(a=u.parseHost(f))return a;if(f="",l=Rx,e==Px)return}break;case Rx:if(!NS(nx,i)){if(i==lS||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()||e){if(""!=f){var m=US(f,10);if(m>65535)return ZS;u.port=u.isSpecial()&&m===mx[u.scheme]?null:m,f=""}if(e)return;l=jx;continue}return ZS}f+=i;break;case Bx:if(u.scheme="file","/"==i||"\\"==i)l=Ux;else{if(!n||"file"!=n.scheme){l=Fx;continue}if(i==lS)u.host=n.host,u.path=kS(n.path),u.query=n.query;else if("?"==i)u.host=n.host,u.path=kS(n.path),u.query="",l=Hx;else{if("#"!=i){bx(HS(kS(r,c),""))||(u.host=n.host,u.path=kS(n.path),u.shortenPath()),l=Fx;continue}u.host=n.host,u.path=kS(n.path),u.query=n.query,u.fragment="",l=zx}}break;case Ux:if("/"==i||"\\"==i){l=Dx;break}n&&"file"==n.scheme&&!bx(HS(kS(r,c),""))&&(wx(n.path[0],!0)?qS(u.path,n.path[0]):u.host=n.host),l=Fx;continue;case Dx:if(i==lS||"/"==i||"\\"==i||"?"==i||"#"==i){if(!e&&wx(f))l=Fx;else if(""==f){if(u.host="",e)return;l=jx}else{if(a=u.parseHost(f))return a;if("localhost"==u.host&&(u.host=""),e)return;f="",l=jx}continue}f+=i;break;case jx:if(u.isSpecial()){if(l=Fx,"/"!=i&&"\\"!=i)continue}else if(e||"?"!=i)if(e||"#"!=i){if(i!=lS&&(l=Fx,"/"!=i))continue}else u.fragment="",l=zx;else u.query="",l=Hx;break;case Fx:if(i==lS||"/"==i||"\\"==i&&u.isSpecial()||!e&&("?"==i||"#"==i)){if(".."===(s=XS(s=f))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(u.shortenPath(),"/"==i||"\\"==i&&u.isSpecial()||qS(u.path,"")):_x(f)?"/"==i||"\\"==i&&u.isSpecial()||qS(u.path,""):("file"==u.scheme&&!u.path.length&&wx(f)&&(u.host&&(u.host=""),f=FS(f,0)+":"),qS(u.path,f)),f="","file"==u.scheme&&(i==lS||"?"==i||"#"==i))for(;u.path.length>1&&""===u.path[0];)YS(u.path);"?"==i?(u.query="",l=Hx):"#"==i&&(u.fragment="",l=zx)}else f+=yx(i,vx);break;case Nx:"?"==i?(u.query="",l=Hx):"#"==i?(u.fragment="",l=zx):i!=lS&&(u.path[0]+=yx(i,px));break;case Hx:e||"#"!=i?i!=lS&&("'"==i&&u.isSpecial()?u.query+="%27":u.query+="#"==i?"%23":yx(i,px)):(u.fragment="",l=zx);break;case zx:i!=lS&&(u.fragment+=yx(i,dx))}c++}},parseHost:function(t){var e,n,r;if("["==FS(t,0)){if("]"!=FS(t,t.length-1))return QS;if(e=function(t){var e,n,r,i,o,a,s,u=[0,0,0,0,0,0,0,0],l=0,c=null,f=0,h=function(){return FS(t,f)};if(":"==h()){if(":"!=FS(t,1))return;f+=2,c=++l}for(;h();){if(8==l)return;if(":"!=h()){for(e=n=0;n<4&&NS(ax,h());)e=16*e+US(h(),16),f++,n++;if("."==h()){if(0==n)return;if(f-=n,l>6)return;for(r=0;h();){if(i=null,r>0){if(!("."==h()&&r<4))return;f++}if(!NS(nx,h()))return;for(;NS(nx,h());){if(o=US(h(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;f++}u[l]=256*u[l]+i,2!=++r&&4!=r||l++}if(4!=r)return;break}if(":"==h()){if(f++,!h())return}else if(h())return;u[l++]=e}else{if(null!==c)return;f++,c=++l}}if(null!==c)for(a=l-c,l=7;0!=l&&a>0;)s=u[l],u[l--]=u[c+a-1],u[c+--a]=s;else if(8!=l)return;return u}(KS(t,1,-1)),!e)return QS;this.host=e}else if(this.isSpecial()){if(t=AS(t),NS(sx,t))return QS;if(e=function(t){var e,n,r,i,o,a,s,u=WS(t,".");if(u.length&&""==u[u.length-1]&&u.length--,(e=u.length)>4)return t;for(n=[],r=0;r<e;r++){if(""==(i=u[r]))return t;if(o=10,i.length>1&&"0"==FS(i,0)&&(o=NS(rx,i)?16:8,i=KS(i,8==o?1:2)),""===i)a=0;else{if(!NS(10==o?ox:8==o?ix:ax,i))return t;a=US(i,o)}qS(n,a)}for(r=0;r<e;r++)if(a=n[r],r==e-1){if(a>=jS(256,5-e))return null}else if(a>255)return null;for(s=VS(n),r=0;r<n.length;r++)s+=n[r]*jS(256,3-r);return s}(t),null===e)return QS;this.host=e}else{if(NS(ux,t))return QS;for(e="",n=_S(t),r=0;r<n.length;r++)e+=yx(n[r],px);this.host=e}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return wS(mx,this.scheme)},shortenPath:function(){var t=this.path,e=t.length;!e||"file"==this.scheme&&1==e&&wx(t[0],!0)||t.length--},serialize:function(){var t=this,e=t.scheme,n=t.username,r=t.password,i=t.host,o=t.port,a=t.path,s=t.query,u=t.fragment,l=e+":";return null!==i?(l+="//",t.includesCredentials()&&(l+=n+(r?":"+r:"")+"@"),l+=hx(i),null!==o&&(l+=":"+o)):"file"==e&&(l+="//"),l+=t.cannotBeABaseURL?a[0]:a.length?"/"+HS(a,"/"):"",null!==s&&(l+="?"+s),null!==u&&(l+="#"+u),l},setHref:function(t){var e=this.parse(t);if(e)throw BS(e);this.searchParams.update()},getOrigin:function(){var t=this.scheme,e=this.port;if("blob"==t)try{return new qx(t.path[0]).origin}catch(AR){return"null"}return"file"!=t&&this.isSpecial()?t+"://"+hx(this.host)+(null!==e?":"+e:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(t){this.parse(TS(t)+":",kx)},getUsername:function(){return this.username},setUsername:function(t){var e=_S(TS(t));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<e.length;n++)this.username+=yx(e[n],gx)}},getPassword:function(){return this.password},setPassword:function(t){var e=_S(TS(t));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<e.length;n++)this.password+=yx(e[n],gx)}},getHost:function(){var t=this.host,e=this.port;return null===t?"":null===e?hx(t):hx(t)+":"+e},setHost:function(t){this.cannotBeABaseURL||this.parse(t,Ix)},getHostname:function(){var t=this.host;return null===t?"":hx(t)},setHostname:function(t){this.cannotBeABaseURL||this.parse(t,Px)},getPort:function(){var t=this.port;return null===t?"":TS(t)},setPort:function(t){this.cannotHaveUsernamePasswordPort()||(""==(t=TS(t))?this.port=null:this.parse(t,Rx))},getPathname:function(){var t=this.path;return this.cannotBeABaseURL?t[0]:t.length?"/"+HS(t,"/"):""},setPathname:function(t){this.cannotBeABaseURL||(this.path=[],this.parse(t,jx))},getSearch:function(){var t=this.query;return t?"?"+t:""},setSearch:function(t){""==(t=TS(t))?this.query=null:("?"==FS(t,0)&&(t=KS(t,1)),this.query="",this.parse(t,Hx)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var t=this.fragment;return t?"#"+t:""},setHash:function(t){""!=(t=TS(t))?("#"==FS(t,0)&&(t=KS(t,1)),this.fragment="",this.parse(t,zx)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var qx=function(t){var e=mS(this,Gx),n=SS(arguments.length,1)>1?arguments[1]:void 0,r=MS(e,new Vx(t,!1,n));fS||(e.href=r.serialize(),e.origin=r.getOrigin(),e.protocol=r.getProtocol(),e.username=r.getUsername(),e.password=r.getPassword(),e.host=r.getHost(),e.hostname=r.getHostname(),e.port=r.getPort(),e.pathname=r.getPathname(),e.search=r.getSearch(),e.searchParams=r.getSearchParams(),e.hash=r.getHash())},Gx=qx.prototype,Yx=function(t,e){return{get:function(){return OS(this)[t]()},set:e&&function(t){return OS(this)[e](t)},configurable:!0,enumerable:!0}};if(fS&&(yS(Gx,"href",Yx("serialize","setHref")),yS(Gx,"origin",Yx("getOrigin")),yS(Gx,"protocol",Yx("getProtocol","setProtocol")),yS(Gx,"username",Yx("getUsername","setUsername")),yS(Gx,"password",Yx("getPassword","setPassword")),yS(Gx,"host",Yx("getHost","setHost")),yS(Gx,"hostname",Yx("getHostname","setHostname")),yS(Gx,"port",Yx("getPort","setPort")),yS(Gx,"pathname",Yx("getPathname","setPathname")),yS(Gx,"search",Yx("getSearch","setSearch")),yS(Gx,"searchParams",Yx("getSearchParams")),yS(Gx,"hash",Yx("getHash","setHash"))),gS(Gx,"toJSON",(function(){return OS(this).serialize()}),{enumerable:!0}),gS(Gx,"toString",(function(){return OS(this).serialize()}),{enumerable:!0}),RS){var Wx=RS.createObjectURL,Kx=RS.revokeObjectURL;Wx&&gS(qx,"createObjectURL",dS(Wx,RS)),Kx&&gS(qx,"revokeObjectURL",dS(Kx,RS))}CS(qx,"URL"),cS({global:!0,constructor:!0,forced:!hS,sham:!fS},{URL:qx});var Xx=Mn,$x=a,Jx=cv,Qx=ei,Zx=xT,tL=st("URL");Xx({target:"URL",stat:!0,forced:!(Zx&&$x((function(){tL.canParse()})))},{canParse:function(t){var e=Jx(arguments.length,1),n=Qx(t),r=e<2||void 0===arguments[1]?void 0:Qx(arguments[1]);try{return!!new tL(n,r)}catch(AR){return!1}}});var eL=n(nt.URL);function nL(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="31" height="40" viewBox="0 -5 31 40">\n <path fill="#fff" transform="scale(1.3, 1.3)" class=\'path_full\' d="M9,10v1a.9.9,0,0,1-1,1,.9.9,0,0,1-1-1V9A.9.9,0,0,1,8,8h2a.9.9,0,0,1,1,1,.9.9,0,0,1-1,1Zm6,4V13a1,1,0,0,1,2,0v2a.9.9,0,0,1-1,1H14a1,1,0,0,1,0-2Zm3-7H6V17H18Zm2,0V17a2,2,0,0,1-2,2H6a2,2,0,0,1-2-2V7A2,2,0,0,1,6,5H18A2,2,0,0,1,20,7Z"></path>\n</svg>\n',"image/svg+xml").firstChild}function rL(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="31" height="40" viewBox="0 -5 31 40">\n <path fill="#fff" transform="scale(1.3, 1.3)" d="M9,10V9a.9.9,0,0,1,1-1,.9.9,0,0,1,1,1v2a.9.9,0,0,1-1,1H8a.9.9,0,0,1-1-1,.9.9,0,0,1,1-1Zm6,4v1a1,1,0,0,1-2,0V13a.9.9,0,0,1,1-1h2a1,1,0,0,1,0,2Zm3-7H6V17H18Zm2,0V17a2,2,0,0,1-2,2H6a2,2,0,0,1-2-2V7A2,2,0,0,1,6,5H18A2,2,0,0,1,20,7Z"></path>\n</svg>\n',"image/svg+xml").firstChild}var iL=function(t){H_(n,t);var e=G_(n);function n(){return D_(this,n),e.apply(this,arguments)}return F_(n,[{key:"beforeCreate",value:function(t){"boolean"==typeof t.player.config.cssFullscreen&&(t.config.disable=!t.player.config.cssFullscreen)}},{key:"afterCreate",value:function(){var t,e=this;Y_(z_(n.prototype),"afterCreate",this).call(this),this.config.disable||(this.config.target&&(this.playerConfig.fullscreenTarget=this.config.target),this.initIcons(),this.on("cssFullscreen_change",(function(t){e.animate(t)})),this.btnClick=cw(t=this.btnClick).call(t,this),this.handleCssFullscreen=this.hook("cssFullscreen_change",this.btnClick,{pre:function(t){t.preventDefault(),t.stopPropagation()}}),cw(this).call(this,["click","touchend"],this.handleCssFullscreen))}},{key:"initIcons",value:function(){var t=this.icons,e=mb(this).call(this,".xgplayer-icon");e.appendChild(t.cssFullscreen),e.appendChild(t.exitCssFullscreen)}},{key:"btnClick",value:function(t){t.preventDefault(),t.stopPropagation();var e=this.player.isCssfullScreen;this.emitUserAction(t,"switch_cssfullscreen",{cssfullscreen:e}),e?this.player.exitCssFullscreen():this.player.getCssFullscreen()}},{key:"animate",value:function(t){this.root&&(t?this.setAttr("data-state","full"):this.setAttr("data-state","normal"),this.switchTips(t))}},{key:"switchTips",value:function(t){var e=this.i18nKeys,n=mb(this).call(this,".xg-tips");n&&this.changeLangTextKey(n,t?e.EXITCSSFULLSCREEN_TIPS:e.CSSFULLSCREEN_TIPS)}},{key:"registerIcons",value:function(){return{cssFullscreen:{icon:nL,class:"xg-get-cssfull"},exitCssFullscreen:{icon:rL,class:"xg-exit-cssfull"}}}},{key:"destroy",value:function(){Y_(z_(n.prototype),"destroy",this).call(this),this.unbind(["click","touchend"],this.btnClick)}},{key:"render",value:function(){if(!this.config.disable)return"<xg-icon class='xgplayer-cssfullscreen'>\n <div class=\"xgplayer-icon\">\n </div>\n ".concat(tT(this,"CSSFULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"cssFullscreen"}},{key:"defaultConfig",get:function(){return{position:UA.CONTROLS_RIGHT,index:1,disable:!1,target:null}}}]),n}(dT),oL=et,aL=_,sL=pe("match"),uL=function(t){var e;return oL(t)&&(void 0!==(e=t[sL])?!!e:"RegExp"==aL(t))},lL=TypeError,cL=pe("match"),fL=et,hL=Math.floor;Mn({target:"Number",stat:!0},{isInteger:Number.isInteger||function(t){return!fL(t)&&isFinite(t)&&hL(t)===t}});var pL=n(nt.Number.isInteger),dL=fi.includes;Mn({target:"Array",proto:!0,forced:a((function(){return!Array(1).includes()}))},{includes:function(t){return dL(this,t,arguments.length>1?arguments[1]:void 0)}});var vL=af("Array").includes,gL=Mn,yL=function(t){if(uL(t))throw lL("The method doesn't accept regular expressions");return t},mL=X,wL=ei,bL=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[cL]=!1,"/./"[t](e)}catch(r){}}return!1},_L=y("".indexOf);gL({target:"String",proto:!0,forced:!bL("includes")},{includes:function(t){return!!~_L(wL(mL(this)),wL(yL(t)),arguments.length>1?arguments[1]:void 0)}});var kL=af("String").includes,EL=ut,AL=vL,TL=kL,CL=Array.prototype,SL=String.prototype,xL=n((function(t){var e=t.includes;return t===CL||EL(CL,t)&&e===CL.includes?AL:"string"==typeof t||t===SL||EL(SL,t)&&e===SL.includes?TL:e})),LL=$t,ML=ai,OL=Kn,IL=function(t){for(var e=LL(this),n=OL(e),r=arguments.length,i=ML(r>1?arguments[1]:void 0,n),o=r>2?arguments[2]:void 0,a=void 0===o?n:ML(o,n);a>i;)e[i++]=t;return e};Mn({target:"Array",proto:!0},{fill:IL});var PL=af("Array").fill,RL=ut,BL=PL,UL=Array.prototype,DL=n((function(t){var e=t.fill;return t===UL||RL(UL,t)&&e===UL.fill?BL:e})),jL={exports:{}},FL=a((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),NL=a,HL=et,zL=_,VL=FL,qL=Object.isExtensible,GL=NL((function(){qL(1)}))||VL?function(t){return!!HL(t)&&((!VL||"ArrayBuffer"!=zL(t))&&(!qL||qL(t)))}:qL,YL=!a((function(){return Object.isExtensible(Object.preventExtensions({}))})),WL=Mn,KL=y,XL=hi,$L=et,JL=Zt,QL=Qe.f,ZL=Ki,tM=Ji,eM=GL,nM=YL,rM=!1,iM=ie("meta"),oM=0,aM=function(t){QL(t,iM,{value:{objectID:"O"+oM++,weakData:{}}})},sM=jL.exports={enable:function(){sM.enable=function(){},rM=!0;var t=ZL.f,e=KL([].splice),n={};n[iM]=1,t(n).length&&(ZL.f=function(n){for(var r=t(n),i=0,o=r.length;i<o;i++)if(r[i]===iM){e(r,i,1);break}return r},WL({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:tM.f}))},fastKey:function(t,e){if(!$L(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!JL(t,iM)){if(!eM(t))return"F";if(!e)return"E";aM(t)}return t[iM].objectID},getWeakData:function(t,e){if(!JL(t,iM)){if(!eM(t))return!0;if(!e)return!1;aM(t)}return t[iM].weakData},onFreeze:function(t){return nM&&rM&&eM(t)&&!JL(t,iM)&&aM(t),t}};XL[iM]=!0;var uM=jL.exports,lM=Mn,cM=o,fM=uM,hM=a,pM=mn,dM=Cd,vM=rv,gM=x,yM=et,mM=jo,wM=Qe.f,bM=ua.forEach,_M=M,kM=ta.set,EM=ta.getterFor,AM=Wi,TM=po,CM=KT,SM=Je,xM=rv,LM=Y,MM=Cd,OM=kl,IM=El,PM=tv,RM=M,BM=uM.fastKey,UM=ta.set,DM=ta.getterFor,jM={getConstructor:function(t,e,n,r){var i=t((function(t,i){xM(t,o),UM(t,{type:e,index:AM(null),first:void 0,last:void 0,size:0}),RM||(t.size=0),LM(i)||MM(i,t[r],{that:t,AS_ENTRIES:n})})),o=i.prototype,a=DM(e),s=function(t,e,n){var r,i,o=a(t),s=u(t,e);return s?s.value=n:(o.last=s={index:i=BM(e,!0),key:e,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=s),r&&(r.next=s),RM?o.size++:t.size++,"F"!==i&&(o.index[i]=s)),t},u=function(t,e){var n,r=a(t),i=BM(e);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==e)return n};return CM(o,{clear:function(){for(var t=a(this),e=t.index,n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete e[n.index],n=n.next;t.first=t.last=void 0,RM?t.size=0:this.size=0},delete:function(t){var e=this,n=a(e),r=u(e,t);if(r){var i=r.next,o=r.previous;delete n.index[r.index],r.removed=!0,o&&(o.next=i),i&&(i.previous=o),n.first==r&&(n.first=i),n.last==r&&(n.last=o),RM?n.size--:e.size--}return!!r},forEach:function(t){for(var e,n=a(this),r=SM(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!u(this,t)}}),CM(o,n?{get:function(t){var e=u(this,t);return e&&e.value},set:function(t,e){return s(this,0===t?0:t,e)}}:{add:function(t){return s(this,t=0===t?0:t,t)}}),RM&&TM(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(t,e,n){var r=e+" Iterator",i=DM(e),o=DM(r);OM(t,e,(function(t,e){UM(this,{type:r,target:t,state:i(t),kind:e,last:void 0})}),(function(){for(var t=o(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?IM("keys"==e?n.key:"values"==e?n.value:[n.key,n.value],!1):(t.target=void 0,IM(void 0,!0))}),n?"entries":"values",!n,!0),PM(e)}};(function(t,e,n){var r,i=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),a=i?"set":"add",s=cM[t],u=s&&s.prototype,l={};if(_M&&gM(s)&&(o||u.forEach&&!hM((function(){(new s).entries().next()})))){var c=(r=e((function(e,n){kM(vM(e,c),{type:t,collection:new s}),null!=n&&dM(n,e[a],{that:e,AS_ENTRIES:i})}))).prototype,f=EM(t);bM(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(t){var e="add"==t||"set"==t;!(t in u)||o&&"clear"==t||pM(c,t,(function(n,r){var i=f(this).collection;if(!e&&o&&!yM(n))return"get"==t&&void 0;var a=i[t](0===n?0:n,r);return e?this:a}))})),o||wM(c,"size",{configurable:!0,get:function(){return f(this).collection.size}})}else r=n.getConstructor(e,t,i,a),fM.enable();mM(r,t,!1,!0),l[t]=r,lM({global:!0,forced:!0},l),o||n.setStrong(r,t,i)})("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),jM);var FM=nt.Map,NM=Je,HM=P,zM=It,VM=Nf,qM=Y,GM=Cd,YM=[].push,WM=function(t){var e,n,r,i,o=arguments.length,a=o>1?arguments[1]:void 0;return VM(this),(e=void 0!==a)&&zM(a),qM(t)?new this:(n=[],e?(r=0,i=NM(a,o>2?arguments[2]:void 0),GM(t,(function(t){HM(YM,n,i(t,r++))}))):GM(t,YM,{that:n}),new this(n))};Mn({target:"Map",stat:!0,forced:!0},{from:WM});var KM=Is,XM=function(){return new this(KM(arguments))};Mn({target:"Map",stat:!0,forced:!0},{of:XM});var $M=xt,JM=function(t){if("object"==typeof t&&"size"in t&&"has"in t&&"get"in t&&"set"in t&&"delete"in t&&"entries"in t)return t;throw TypeError($M(t)+" is not a map")},QM=function(t,e){return 1==e?function(e,n){return e[t](n)}:function(e,n,r){return e[t](n,r)}},ZM=st("Map"),tO={Map:ZM,set:QM("set",2),get:QM("get",1),has:QM("has",1),remove:QM("delete",1),proto:ZM.prototype},eO=JM,nO=tO.remove;Mn({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=eO(this),n=!0,r=0,i=arguments.length;r<i;r++)t=nO(e,arguments[r]),n=n&&t;return!!n}});var rO=JM,iO=tO.get,oO=tO.has,aO=tO.set;Mn({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(t,e){var n,r,i=rO(this);return oO(i,t)?(n=iO(i,t),"update"in e&&(n=e.update(n,t,i),aO(i,t,n)),n):(r=e.insert(t,i),aO(i,t,r),r)}});var sO=P,uO=function(t,e,n){for(var r,i,o=n||t.next;!(r=sO(o,t)).done;)if(void 0!==(i=e(r.value)))return i},lO=function(t,e,n){return n?uO(t.entries(),(function(t){return e(t[1],t[0])})):t.forEach(e)},cO=Je,fO=JM,hO=lO;Mn({target:"Map",proto:!0,real:!0,forced:!0},{every:function(t){var e=fO(this),n=cO(t,arguments.length>1?arguments[1]:void 0);return!1!==hO(e,(function(t,r){if(!n(t,r,e))return!1}),!0)}});var pO=Je,dO=JM,vO=lO,gO=tO.Map,yO=tO.set;Mn({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(t){var e=dO(this),n=pO(t,arguments.length>1?arguments[1]:void 0),r=new gO;return vO(e,(function(t,i){n(t,i,e)&&yO(r,i,t)})),r}});var mO=Je,wO=JM,bO=lO;Mn({target:"Map",proto:!0,real:!0,forced:!0},{find:function(t){var e=wO(this),n=mO(t,arguments.length>1?arguments[1]:void 0),r=bO(e,(function(t,r){if(n(t,r,e))return{value:t}}),!0);return r&&r.value}});var _O=Je,kO=JM,EO=lO;Mn({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(t){var e=kO(this),n=_O(t,arguments.length>1?arguments[1]:void 0),r=EO(e,(function(t,r){if(n(t,r,e))return{key:r}}),!0);return r&&r.key}});var AO=Mn,TO=P,CO=x,SO=It,xO=Cd,LO=tO.Map,MO=y([].push);AO({target:"Map",stat:!0,forced:!0},{groupBy:function(t,e){var n=new(CO(this)?this:LO);SO(e);var r=SO(n.has),i=SO(n.get),o=SO(n.set);return xO(t,(function(t){var a=e(t);TO(r,n,a)?MO(TO(i,n,a),t):TO(o,n,a,[t])})),n}});var OO=function(t,e){return t===e||t!=t&&e!=e},IO=JM,PO=lO;Mn({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(t){return!0===PO(IO(this),(function(e){if(OO(e,t))return!0}),!0)}});var RO=P,BO=Cd,UO=x,DO=It,jO=tO.Map;Mn({target:"Map",stat:!0,forced:!0},{keyBy:function(t,e){var n=new(UO(this)?this:jO);DO(e);var r=DO(n.set);return BO(t,(function(t){RO(r,n,e(t),t)})),n}});var FO=JM,NO=lO;Mn({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(t){var e=NO(FO(this),(function(e,n){if(e===t)return{key:n}}),!0);return e&&e.key}});var HO=Je,zO=JM,VO=lO,qO=tO.Map,GO=tO.set;Mn({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(t){var e=zO(this),n=HO(t,arguments.length>1?arguments[1]:void 0),r=new qO;return VO(e,(function(t,i){GO(r,n(t,i,e),t)})),r}});var YO=Je,WO=JM,KO=lO,XO=tO.Map,$O=tO.set;Mn({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(t){var e=WO(this),n=YO(t,arguments.length>1?arguments[1]:void 0),r=new XO;return KO(e,(function(t,i){$O(r,i,n(t,i,e))})),r}});var JO=JM,QO=Cd,ZO=tO.set;Mn({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(t){for(var e=JO(this),n=arguments.length,r=0;r<n;)QO(arguments[r++],(function(t,n){ZO(e,t,n)}),{AS_ENTRIES:!0});return e}});var tI=It,eI=JM,nI=lO,rI=TypeError;Mn({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(t){var e=eI(this),n=arguments.length<2,r=n?void 0:arguments[1];if(tI(t),nI(e,(function(i,o){n?(n=!1,r=i):r=t(r,i,o,e)})),n)throw rI("Reduce of empty map with no initial value");return r}});var iI=Je,oI=JM,aI=lO;Mn({target:"Map",proto:!0,real:!0,forced:!0},{some:function(t){var e=oI(this),n=iI(t,arguments.length>1?arguments[1]:void 0);return!0===aI(e,(function(t,r){if(n(t,r,e))return!0}),!0)}});var sI=It,uI=JM,lI=TypeError,cI=tO.get,fI=tO.has,hI=tO.set;Mn({target:"Map",proto:!0,real:!0,forced:!0},{update:function(t,e){var n=uI(this),r=arguments.length;sI(e);var i=fI(n,t);if(!i&&r<3)throw lI("Updating absent value");var o=i?cI(n,t):sI(r>2?arguments[2]:void 0)(t,n);return hI(n,t,e(o,t,n)),n}});var pI=P,dI=It,vI=x,gI=rn,yI=TypeError,mI=function(t,e){var n,r=gI(this),i=dI(r.get),o=dI(r.has),a=dI(r.set),s=arguments.length>2?arguments[2]:void 0;if(!vI(e)&&!vI(s))throw yI("At least one callback required");return pI(o,r,t)?(n=pI(i,r,t),vI(e)&&(n=e(n),pI(a,r,t,n))):vI(s)&&(n=s(),pI(a,r,t,n)),n};Mn({target:"Map",proto:!0,real:!0,forced:!0},{upsert:mI}),Mn({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:mI});var wI=n(FM);function bI(t){return(bI="function"==typeof Ih&&"symbol"==typeof lw?function(t){return typeof t}:function(t){return t&&"function"==typeof Ih&&t.constructor===Ih&&t!==Ih.prototype?"symbol":typeof t})(t)}function _I(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Op(t,kI(r.key),r)}}function kI(t){var e=function(t,e){if("object"!==Mc(t)||null===t)return t;var n=t[Rw];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Mc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Mc(e)?e:String(e)}var EI=It,AI=$t,TI=G,CI=Kn,SI=TypeError,xI=function(t){return function(e,n,r,i){EI(n);var o=AI(e),a=TI(o),s=CI(o),u=t?s-1:0,l=t?-1:1;if(r<2)for(;;){if(u in a){i=a[u],u+=l;break}if(u+=l,t?u<0:s<=u)throw SI("Reduce of empty array with no initial value")}for(;t?u>=0:s>u;u+=l)u in a&&(i=n(i,a[u],u,o));return i}},LI={left:xI(!1),right:xI(!0)}.left;Mn({target:"Array",proto:!0,forced:!Xd&>>79&><83||!tp("reduce")},{reduce:function(t){var e=arguments.length;return LI(this,t,e,e>1?arguments[1]:void 0)}});var MI,OI,II,PI=af("Array").reduce,RI=ut,BI=PI,UI=Array.prototype,DI=n((function(t){var e=t.reduce;return t===UI||RI(UI,t)&&e===UI.reduce?BI:e})),jI=1,FI=2,NI=3,HI=4,zI=["Boolean","Number","String","Undefined","Null","Date","Object"],VI=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.name=e||"",this._prefix="[".concat(this.name,"]"),this.logCacheLevel=(null==n?void 0:n.logCacheLevel)||3,this.logMaxSize=(null==n?void 0:n.logMaxSize)||204800,this.logSize=0,this.logTextArray=[]}var e,n,r;return e=t,n=[{key:"debug",value:function(){for(var e,n,r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,lh(e=[jI]).call(e,o)),t.disabled||(r=console).debug.apply(r,lh(n=["[".concat(qI(),"]"),this._prefix]).call(n,o))}},{key:"log",value:function(){for(var e,n,r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,lh(e=[FI]).call(e,o)),t.disabled||(r=console).log.apply(r,lh(n=["[".concat(qI(),"]"),this._prefix]).call(n,o))}},{key:"warn",value:function(){for(var e,n,r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,lh(e=[NI]).call(e,o)),t.disabled||(r=console).warn.apply(r,lh(n=["[".concat(qI(),"]"),this._prefix]).call(n,o))}},{key:"error",value:function(){for(var e,n,r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,lh(e=[HI]).call(e,o)),t.disabled||(r=console).error.apply(r,lh(n=["[".concat(qI(),"]"),this._prefix]).call(n,o))}},{key:"logCache",value:function(t){if(!(t<this.logCacheLevel)){var e="";try{for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=m_(r).call(r,(function(t){return YI(t)}));e="[".concat(qI(),"]")+this._prefix+Oh(o)}catch(s){return}if(t>=this.logCacheLevel&&(this.logSize+=e.length,this.logTextArray.push(e)),this.logSize>this.logMaxSize){var a=this.logTextArray.shift();this.logSize-=a.length}}}},{key:"getLogCache",value:function(){var t=this.logTextArray.join("\n");return this.reset(),t}},{key:"reset",value:function(){this.logTextArray=[],this.logSize=0}},{key:"table",value:function(){var e;t.disabled||(console.group(this._prefix),(e=console).table.apply(e,arguments),console.groupEnd())}},{key:"setLogLevel",value:function(t){this.logCacheLevel=t}}],r=[{key:"enable",value:function(){t.disabled=!1}},{key:"disable",value:function(){t.disabled=!0}}],n&&_I(e.prototype,n),r&&_I(e,r),Op(e,"prototype",{writable:!1}),t}();function qI(){return(new Date).toLocaleString()}function GI(t){var e;if("object"!==bI(t))return t;var n=uw(e=Object.prototype.toString.call(t)).call(e,8,-1);switch(n){case"Array":case"Uint8Array":case"ArrayBuffer":return n+"["+t.length+"]";case"Object":return"{}";default:return n}}function YI(t,e,n){var r;n||(n=1),e||(e=2);var i={};if(!t||"object"!==bI(t))return t;var o=uw(r=Object.prototype.toString.call(t)).call(r,8,-1);if(!xL(zI).call(zI,o))return o;if(!(n>e)){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(n===e?i[a]=GI(t[a]):"object"===bI(t[a])?i[a]=YI(t[a],e,n+1):i[a]=t[a]);return i}}MI=VI,II=!0,(OI=kI(OI="disabled"))in MI?Op(MI,OI,{value:II,enumerable:!0,configurable:!0,writable:!0}):MI[OI]=II;var WI=new Blob([new Uint8Array([255,227,24,196,0,0,0,3,72,1,64,0,0,4,132,16,31,227,192,225,76,255,67,12,255,221,27,255,228,97,73,63,255,195,131,69,192,232,223,255,255,207,102,239,255,255,255,101,158,206,70,20,59,255,254,95,70,149,66,4,16,128,0,2,2,32,240,138,255,36,106,183,255,227,24,196,59,11,34,62,80,49,135,40,0,253,29,191,209,200,141,71,7,255,252,152,74,15,130,33,185,6,63,255,252,195,70,203,86,53,15,255,255,247,103,76,121,64,32,47,255,34,227,194,209,138,76,65,77,69,51,46,57,55,170,170,170,170,170,170,170,170,170,170,255,227,24,196,73,13,153,210,100,81,135,56,0,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170])],{type:"audio/mpeg"}),KI=new Blob([new Uint8Array([0,0,0,28,102,116,121,112,105,115,111,109,0,0,2,0,105,115,111,109,105,115,111,50,109,112,52,49,0,0,0,8,102,114,101,101,0,0,2,239,109,100,97,116,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,0,0,2,194,109,111,111,118,0,0,0,108,109,118,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,232,0,0,0,47,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,1,236,116,114,97,107,0,0,0,92,116,107,104,100,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,47,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,101,100,116,115,0,0,0,28,101,108,115,116,0,0,0,0,0,0,0,1,0,0,0,47,0,0,0,0,0,1,0,0,0,0,1,100,109,100,105,97,0,0,0,32,109,100,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,68,0,0,8,0,85,196,0,0,0,0,0,45,104,100,108,114,0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0,0,0,1,15,109,105,110,102,0,0,0,16,115,109,104,100,0,0,0,0,0,0,0,0,0,0,0,36,100,105,110,102,0,0,0,28,100,114,101,102,0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1,0,0,0,211,115,116,98,108,0,0,0,103,115,116,115,100,0,0,0,0,0,0,0,1,0,0,0,87,109,112,52,97,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,16,0,0,0,0,172,68,0,0,0,0,0,51,101,115,100,115,0,0,0,0,3,128,128,128,34,0,2,0,4,128,128,128,20,64,21,0,0,0,0,1,244,0,0,1,243,249,5,128,128,128,2,18,16,6,128,128,128,1,2,0,0,0,24,115,116,116,115,0,0,0,0,0,0,0,1,0,0,0,2,0,0,4,0,0,0,0,28,115,116,115,99,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,28,115,116,115,122,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,115,0,0,1,116,0,0,0,20,115,116,99,111,0,0,0,0,0,0,0,1,0,0,0,44,0,0,0,98,117,100,116,97,0,0,0,90,109,101,116,97,0,0,0,0,0,0,0,33,104,100,108,114,0,0,0,0,0,0,0,0,109,100,105,114,97,112,112,108,0,0,0,0,0,0,0,0,0,0,0,0,45,105,108,115,116,0,0,0,37,169,116,111,111,0,0,0,29,100,97,116,97,0,0,0,1,0,0,0,0,76,97,118,102,53,54,46,52,48,46,49,48,49])],{type:"video/mp4"});function XI(t){return P_({muted:!1,timeout:250,inline:!1},t)}function $I(t,e){var n=t.muted,r=t.timeout,i=t.inline,o=e(),a=o.element,s=o.source,u=void 0,l=void 0,c=void 0;return a.muted=n,!0===n&&a.setAttribute("muted","muted"),!0===i&&a.setAttribute("playsinline","playsinline"),a.src=s,new Mm((function(t){u=a.play(),l=Vk((function(){c(!1,new Error("Timeout "+r+" ms has been reached"))}),r),c=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;a.remove(),a.srcObject=null,clearTimeout(l),t({result:e,error:n})},void 0!==u?u.then((function(){return c(!0)})).catch((function(t){return c(!1,t)})):c(!0)}))}var JI={audio:function(t){return $I(t=XI(t),(function(){return{element:document.createElement("audio"),source:eL.createObjectURL(WI)}}))},video:function(t){return $I(t=XI(t),(function(){return{element:document.createElement("video"),source:eL.createObjectURL(KI)}}))}},QI=new VI("AdsPluginBaseAdManager"),ZI=function(t){Gw(n,t);var e=Xw(n);function n(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Hw(this,n),(t=e.call(this)).options=r,t.config=r.config||{},t.plugin=r.plugin,t.player=r.plugin.player,t.mediaElement=t.player.media||t.player.video,t.isLinearAdRunning=!1,t._shouldBlockVideoContent=!1,t._isAdPaused=!0,t._isMediaEnded=!1,t.context={currentTime:0,duration:0},t}return Vw(n,[{key:"currentTime",get:function(){return this.context.currentTime}},{key:"duration",get:function(){return this.context.duration}},{key:"paused",get:function(){return this._isAdPaused}},{key:"shouldBlockVideoContent",get:function(){return this.isLinearAdRunning||this._shouldBlockVideoContent},set:function(t){this._shouldBlockVideoContent=t}},{key:"updateConfig",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t?this.config=Uw(Uw({},this.config),t):QI.warn("config is empty")}},{key:"isFullScreen",value:function(){return!!this.player.fullscreen}},{key:"destroy",value:function(){this.removeAllListeners()}},{key:"tryContentPlay",value:function(){var t=this.player,e=t.play();void 0!==e&&e&&e.then?e.then((function(){QI.log("content play"),t.removeClass($A),t.addClass(qA),t.state<JA&&(t.setState(JA),t.emit(bA))})).catch((function(e){if(QI.error("content play error",e),t.media&&t.media.error)return t.onError(),void t.removeClass(zA)})):t.state<JA&&(t.setState(JA),t.removeClass($A),t.removeClass(XA),t.removeClass(zA),t.addClass(qA),t.emit(bA))}}]),n}(J_.EventEmitter),tP=new VI("AdsPluginImaAdManager"),eP="xgplayer-ads-playing",nP=function(t){Gw(o,t);var e,n,r,i=Xw(o);function o(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Hw(this,o),qw(Kw(t=i.call(this,e)),"_onMediaEnded",(function(){var e;t.isLinearAdRunning||(t._isMediaEnded=!0,null===(e=t.adsLoader)||void 0===e||e.contentComplete())})),qw(Kw(t),"_onMediaResize",(function(){var e,n=Kw(t).player,r=t.isFullScreen()?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL;null===(e=t.adsManager)||void 0===e||e.resize(n.sizeInfo.width,n.sizeInfo.height,r)})),qw(Kw(t),"_onMediaPlay",(function(){t._mediaPlayed=!0})),qw(Kw(t),"_onMediaPause",(function(){t._mediaPlayed=!1})),qw(Kw(t),"_onMediaVolumeChange",(function(){var e;null===(e=t.adsManager)||void 0===e||e.setVolume(t.player.muted?0:t.player.volume)})),qw(Kw(t),"_onAdsManagerLoaded",(function(e){var n=new google.ima.AdsRenderingSettings;n.restoreCustomPlaybackStateOnAdBreakComplete=!0,n.enablePreloading=!0;var r=t.adsManager=e.getAdsManager(t.mediaElement,n);tP.log("AdManager Loaded",r);var i=r.getCuePoints();i.length&&tP.log("cuePoints",i),t._initAdsManagerEventListeners(),t.player.emit(_h,{adsManager:r})})),qw(Kw(t),"_onAdsManagerAdError",(function(e){t._handleAdError(e.getError()),t._resumeContent()})),qw(Kw(t),"_onAdsLoaderAdError",(function(e){t._handleAdError(e.getError())})),qw(Kw(t),"_handleAdError",(function(e){var n,r,i;tP.log("AdError",e),t.shouldBlockVideoContent=!1,t.isLinearAdRunning=!1,null===(n=t.adsManager)||void 0===n||n.destroy(),null===(r=t.plugin)||void 0===r||r.emit(Eh,e),null===(i=t.plugin)||void 0===i||i.emit(vh,e)})),qw(Kw(t),"onAdEvent",(function(e){var n,r=Kw(t).player,i=null==e?void 0:e.getAd(),o=(null==e?void 0:e.getAdData())||(null==i?void 0:i.data),a=!1;switch(null==e?void 0:e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:t.player.emit("ima_ad_break_ready",{ad:i});break;case google.ima.AdEvent.Type.LOADED:var s=(o||{}).adPodInfo,u=0===(null==s?void 0:s.podIndex);a=!0,u&&(i.isLinear()?t.shouldBlockVideoContent=!0:(t.shouldBlockVideoContent=!1,t.tryContentPlay())),t.emit(Ah,{ad:i,isPreroll:u}),t.plugin.emit(Ah,{ad:i,isPreroll:u});break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:if(t._resumeCallback)if(!t._resumeCallback().canResume)break;t._resumeContent(),t.emit(Ch,{ad:i});break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:t.isLinearAdRunning=!0,t.shouldBlockVideoContent=!0,sA.addClass(t.player.root,eP),null==r||r.pause(),t.emit(Th,{ad:i});break;case google.ima.AdEvent.Type.STARTED:t.plugin.emit(ch,{ad:i}),i.isLinear()&&(t._isAdPaused=!1,t.plugin.emit(fh,{ad:i}),n=zk((function(){}),300));break;case google.ima.AdEvent.Type.RESUMED:t._isAdPaused=!1,t.plugin.emit(fh,{ad:i});break;case google.ima.AdEvent.Type.PAUSED:t._isAdPaused=!0,t.plugin.emit(hh,{ad:i});break;case google.ima.AdEvent.Type.SKIPPED:t.plugin.emit(dh,{ad:i});break;case google.ima.AdEvent.Type.AD_PROGRESS:var l=e.getAdData(),c=l.currentTime,f=l.duration;P_(t.context,{currentTime:c,duration:f}),t.plugin.emit(ph,{ad:i});break;case google.ima.AdEvent.Type.COMPLETE:var h=(o||{}).adPodInfo,p=!1;null!=i&&i.isLinear()&&(h&&(p=h.adPosition<h.totalAds),clearInterval(n)),t.plugin.emit(kh,{ad:i,hasNextInPod:p}),t.plugin.emit(gh,{ad:i,hasNextInPod:p});break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:null!=i&&i.isLinear()&&clearInterval(n),t.plugin.emit("ima_all_ads_completed",{ad:i}),t.player.emit(yh,{ad:i});break;default:null!=i&&i.isLinear()&&clearInterval(n)}tP.log("AdEvent",null==e?void 0:e.type,a?Oh((null==e?void 0:e.getAdData())||{}):null==e?void 0:e.getAd())})),t.displayContainer=null,t.adsLoader=null,t.adsManager=null,t._resumeCallback=null,t}return Vw(o,[{key:"init",value:(r=Nw(Dw().mark((function t(){return Dw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.shouldBlockVideoContent=!!(this.config.adTagUrl||this.config.adsResponse||this.config.adsRequest),t.prev=1,this.emit(mh),t.next=5,this._loadIMASdk();case 5:this.emit(wh),t.next=14;break;case 8:return t.prev=8,t.t0=t.catch(1),tP.error("google.ima sdk is not loaded, due to error",(null===t.t0||void 0===t.t0?void 0:t.t0.message)||t.t0),this.emit(bh),this.shouldBlockVideoContent=!1,t.abrupt("return");case 14:this._initConfig(),this._initMediaEvents(),this._initContainer(),this._initLoader(),this._initAdsRequest();case 19:case"end":return t.stop()}}),t,this,[[1,8]])}))),function(){return r.apply(this,arguments)})},{key:"destroy",value:function(){$w(Yw(o.prototype),"destroy",this).call(this),this.reset(),this.displayContainer.destroy(),this._removeMediaEvents(),this._destroyLoader()}},{key:"resumeCallback",set:function(t){this._resumeCallback=t}},{key:"_initConfig",value:function(){var t=this.config.locale;t&&google.ima.settings.setLocale(t)}},{key:"_loadIMASdk",value:function(){var t=this;return new Mm((function(e,n){if("undefined"!=typeof google&&google.ima)e();else{var r=document.createElement("script"),i=Vk((function(){n(new Error("google.ima sdk load timeout"))}),t.config.loadSdkTimeout||3e3);r.src="https://imasdk.googleapis.com/js/sdkloader/ima3".concat(t.config.debug?"_debug":"",".js"),r.onload=function(){clearTimeout(i),e()},r.onerror=function(t){clearTimeout(i),n(null==t?void 0:t.message)},document.head.appendChild(r)}}))}},{key:"_initMediaEvents",value:function(){var t=this.player;t.on(_A,this._onMediaResize),t.on(pA,this._onMediaEnded),t.on(hA,this._onMediaPlay),t.on(dA,this._onMediaPause),t.on(mA,this._onMediaVolumeChange)}},{key:"_removeMediaEvents",value:function(){var t=this.player;t.off(_A,this._onMediaResize),t.off(pA,this._onMediaEnded),t.off(hA,this._onMediaPlay),t.off(dA,this._onMediaPause),t.off(mA,this._onMediaVolumeChange)}},{key:"_initContainer",value:function(){var t=this.options.displayContainer;this.displayContainer=new google.ima.AdDisplayContainer(t,this.mediaElement)}},{key:"_initLoader",value:function(){var t=this.adsLoader=new google.ima.AdsLoader(this.displayContainer);t.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this._onAdsManagerLoaded,!1),t.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdsLoaderAdError,!1),this.player.emit("ima_ad_loader_ready",{adsLoader:t})}},{key:"_destroyLoader",value:function(){var t=this.adsLoader;t||(t.removeEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this._onAdsManagerLoaded,!1),t.removeEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdsLoaderAdError,!1))}},{key:"_initAdsRequest",value:(n=Nw(Dw().mark((function t(){var e,n,r,i,o=this;return Dw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.config,n=e.adsRequest,r=e.adsResponse,i=e.adTagUrl,!(n||r||i)){t.next=9;break}return t.next=4,this._checkAutoplaySupport();case 4:this.requestAds(),this.player.once(_h,(function(){o.autoplayAllowed?o.playAds():o.player.useHooks("play",(function t(){return o.playAds(),o.player.removeHooks("play",t),!1})),o.emit(Sh)})),this.player.once(Eh,(function(){o.emit(Sh)})),t.next=10;break;case 9:this.emit(Sh);case 10:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"playAds",value:function(){try{this._onMediaVolumeChange(),this.displayContainerInitialized||(this.displayContainer.initialize(),this.displayContainerInitialized=!0);var t=this.player,e=this.isFullScreen()?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL;this.adsManager.init(t.sizeInfo.width,t.sizeInfo.height,e),this.adsManager.start()}catch(n){this._handleAdError(n),this._resumeContent()}}},{key:"_initAdsManagerEventListeners",value:function(){var t=this,e=this.adsManager;e.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdsManagerAdError);var n=["LOADED","STARTED","RESUMED","PAUSED","COMPLETE","ALL_ADS_COMPLETED","CONTENT_PAUSE_REQUESTED","CONTENT_RESUME_REQUESTED","VOLUME_CHANGED","VOLUME_MUTED","AD_METADATA","AD_CAN_PLAY","AD_PROGRESS","AD_BUFFERING","CLICK","VIDEO_CLICKED","VIDEO_ICON_CLICKED","FIRST_QUARTILE","MIDPOINT","THIRD_QUARTILE","SKIPPED","USER_CLOSE","AD_BREAK_READY","AD_BREAK_FETCH_ERROR"];hp(n).call(n,(function(n){e.addEventListener(google.ima.AdEvent.Type[n],t.onAdEvent)}))}},{key:"_resumeContent",value:function(){var t;(this.isLinearAdRunning=!1,this.shouldBlockVideoContent=!1,sA.removeClass(this.player.root,eP),this._isMediaEnded)||(null===(t=this.player)||void 0===t||t.play())}},{key:"reset",value:function(){var t,e;this.isLinearAdRunning=!1,null===(t=this.adsManager)||void 0===t||t.destroy(),this.adsManager=null,null===(e=this.adsLoader)||void 0===e||e.contentComplete(),sA.removeClass(this.player.root,eP)}},{key:"requestAds",value:function(){var t,e=this.config,n=e.adsRequest,r=e.adsResponse,i=e.adTagUrl,o=this.player,a=new google.ima.AdsRequest;if(a.linearAdSlotWidth=o.sizeInfo.width,a.linearAdSlotHeight=o.sizeInfo.height,a.nonLinearAdSlotWidth=o.sizeInfo.width,a.nonLinearAdSlotHeight=o.sizeInfo.height,a.setAdWillAutoPlay(this.autoplayAllowed),a.setAdWillPlayMuted(this.autoplayRequiresMuted),i)a.adTagUrl=i;else if(r)a.adsResponse=r;else if(n&&"object"===jw(n)){var s;hp(s=qh(n)).call(s,(function(t){a[t]=n[t]}))}tP.log("requestAds",Oh(a)),null===(t=this.adsLoader)||void 0===t||t.requestAds(a)}},{key:"pause",value:function(){var t;return null===(t=this.adsManager)||void 0===t?void 0:t.pause()}},{key:"play",value:function(){var t;return null===(t=this.adsManager)||void 0===t?void 0:t.resume()}},{key:"skip",value:function(){var t;return null===(t=this.adsManager)||void 0===t?void 0:t.skip()}},{key:"updateConfig",value:function(t){$w(Yw(o.prototype),"updateConfig",this).call(this,t),this._initConfig()}},{key:"_checkAutoplaySupport",value:(e=Nw(Dw().mark((function t(){var e,n,r,i,o;return Dw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.player.config.autoplay,t.next=4,Mm.all([e?JI.video({timeout:800}).then((function(t){return t.result})):Mm.resolve(!1),e&&this.player.config.autoplayMuted?JI.video({timeout:800,muted:!0}).then((function(t){return t.result})):Mm.resolve(!1)]);case 4:n=t.sent,r=Jw(n,2),i=r[0],o=r[1],this.autoplayAllowed=i||o,this.autoplayRequiresMuted=!i&&o,tP.log("checkAutoplaySupport",this.autoplayAllowed,this.autoplayRequiresMuted);case 11:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})}]),o}(ZI),rP="xgplayer-ad-start",iP="xgplayer-ad-show-ui",oP=function(t){Gw(n,t);var e=Xw(n);function n(){var t,r;Hw(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return qw(Kw(r=e.call.apply(e,lh(t=[this]).call(t,o))),"btnClick",(function(t){t.preventDefault(),t.stopPropagation();var e=r.getAdPlugin();return e.paused?(e.play(),r.animate(!1)):(e.pause(),r.animate(!0)),!1})),r}return Vw(n,[{key:"getAdPlugin",value:function(){return this.player.getPlugin("ad")}},{key:"listenEvents",value:function(){var t=this;this.on([hh],(function(){t.animate(!0)})),this.on(fh,(function(){t.animate(!1)}))}}],[{key:"pluginName",get:function(){return"adPlay"}}]),n}(vT),aP=function(t){Gw(n,t);var e=Xw(n);function n(){return Hw(this,n),e.apply(this,arguments)}return Vw(n,[{key:"getAdPlugin",value:function(){return this.player.getPlugin("ad")}},{key:"duration",get:function(){var t=this.getAdPlugin();return(null==t?void 0:t.duration)||0}},{key:"offsetDuration",get:function(){return this.duration}},{key:"timeOffset",get:function(){return 0}},{key:"currentTime",get:function(){var t=this.getAdPlugin();return(null==t?void 0:t.currentTime)||0}},{key:"afterCreate",value:function(){P_(this.config,{isCloseClickSeek:!0,isDraggingSeek:!0,closeMoveSeek:!0}),$w(Yw(n.prototype),"afterCreate",this).call(this)}},{key:"listenEvents",value:function(){var t=this;this.on(ph,(function(){t.onTimeupdate()}))}}],[{key:"pluginName",get:function(){return"adProgress"}}]),n}(pT),sP=function(t){Gw(n,t);var e=Xw(n);function n(){return Hw(this,n),e.apply(this,arguments)}return Vw(n,[{key:"getAdPlugin",value:function(){return this.player.getPlugin("ad")}},{key:"duration",get:function(){var t=this.getAdPlugin();return(null==t?void 0:t.duration)||0}},{key:"currentTime",get:function(){var t=this.getAdPlugin();return(null==t?void 0:t.currentTime)||0}},{key:"listenEvents",value:function(){var t=this;this.on([ph],(function(e){t.onTimeUpdate()}))}}],[{key:"pluginName",get:function(){return"adTime"}}]),n}(_T),uP=function(){function t(e,n){Hw(this,t);var r=n.player,i=n.plugin;this.player=r,this.config=e,this.adPlugin=i,this.adUIPlugins=[],this.fragment=document.createDocumentFragment(),this.controlsPos=null,this.decoratedAdPluginList=[[vT,oP],[_T,sP],[pT,aP],[TT,null],[iL,null],[bT,null]],this.init(),this.initEvents()}return Vw(t,[{key:"init",value:function(){var t=this.player,e=this.adUIPlugins,n=this.fragment,r=this.decoratedAdPluginList;hp(r).call(r,(function(r){var i=Jw(r,2),o=i[0],a=i[1],s=t.getPlugin(o.pluginName);if(s){var u=null;a&&!t.getPlugin(a.pluginName)&&(t.registerPlugin(a),u=t.getPlugin(a.pluginName),n.appendChild(u.root)),e.push([s,u])}}))}},{key:"destroy",value:function(){this.fragment=null,this.adUIPlugins=[],this.decoratedAdPluginList=[],this.adPlugin=null,this.player=null}},{key:"initEvents",value:function(){var t=this,e=this.adPlugin,n=this.player;e.on(fh,(function(){var t=[XA,VA,GA,WA,KA,YA];hp(t).call(t,(function(t){n.removeClass(t)}))})),e.on(ch,(function(){t.showAdContainer()})),e.on(gh,(function(e){e.hasNextInPod||t.hideAdContainer()})),e.on(dh,(function(){t.hideAdContainer()})),e.on(vh,(function(){t.hideAdContainer()}))}},{key:"showAdContainer",value:function(){var t=this.player;sA.hasClass(t.root,rP)||sA.addClass(t.root,rP)}},{key:"hideAdContainer",value:function(){var t=this.player;sA.hasClass(t.root,rP)&&sA.removeClass(t.root,rP)}},{key:"showAdUI",value:function(){var t,e=this.player,n=this.config,r=this.adUIPlugins,i=this.fragment;hp(r).call(r,(function(t){var e=Jw(t,2),n=e[0],r=e[1];if(r){var o=r.root,a=n.root;i.contains(o)&&i.removeChild(o),a.parentNode.insertBefore(o,a),i.appendChild(a)}}));var o=this._getNonAdPlugin();hp(t=Jh(o).call(o,(function(t){return!!t.root}))).call(t,(function(t){var e=t.root;t.__adStub__||(t.__adStub__=sA.createDom("xg-ad-stub","",{})),e.parentNode.insertBefore(t.__adStub__,e),i.appendChild(e)}));var a=e.getPlugin("start");a&&a.hide(),!1===n.controls&&e.controls&&this.hideControls(),this.showAdContainer(),e.addClass(iP)}},{key:"hideAdUI",value:function(){var t,e,n=this.player,r=this.config,i=this.adUIPlugins,o=this.fragment;hp(i).call(i,(function(t){var e=Jw(t,2),n=e[0],r=e[1];if(r){var i=r.root,a=n.root;o.contains(a)&&o.removeChild(a),o.contains(i)||(i.parentNode.insertBefore(a,i),o.appendChild(i))}}));var a=this._getNonAdPlugin();hp(t=Jh(a).call(a,(function(t){return!!t.root}))).call(t,(function(t){var e,n,r=t.root;o.contains(r)&&o.removeChild(r),null===(e=t.__adStub__)||void 0===e||null===(n=e.parentNode)||void 0===n||n.insertBefore(r,t.__adStub__)})),!1===r.controls&&o.contains(null===(e=n.controls)||void 0===e?void 0:e.root)&&this.showControls();var s=n.getPlugin("start");if(s){var u=s.config.disableAnimate,l=s.config.isShowPause;u||(s.config.disableAnimate=!0,s.config.isShowPause=!1),n.once("play",(function(){Vk((function(){s.config.disableAnimate=u,s.config.disableAnimate=l}),10)}))}n.removeClass(iP)}},{key:"hideControls",value:function(){var t=this.player,e=this.config,n=this.fragment;if(!1===e.controls&&t.controls){var r=t.controls.root,i=r.parentElement,o=r.previousSibling,a=r.nextSibling;this.controlsPos={parentNode:i,previousSibling:o,nextSibling:a},n.appendChild(t.controls.root)}}},{key:"showControls",value:function(){var t=this.player,e=this.config,n=this.fragment;if(!1===e.controls&&t.controls){if(!this.controlsPos)return;var r=t.controls.root;n.contains(r)&&n.removeChild(r);var i=this.controlsPos,o=i.parentNode,a=i.previousSibling,s=i.nextSibling;o&&(s?o.insertBefore(r,s):a?o.insertBefore(r,a.nextSibling):o.appendChild(r)),this.controlsPos=null}}},{key:"_getNonAdPlugin",value:function(){var t,e=this.player,n=this.decoratedAdPluginList,r=[];hp(n).call(n,(function(t){var e=Jw(t,2),n=e[0],i=e[1];r.push(n.pluginName.toLowerCase()),i&&r.push(i.pluginName.toLowerCase())}));var i=(null===(t=e.controls)||void 0===t?void 0:t.plugins())||[];return Jh(i).call(i,(function(t){return-1===lb(r).call(r,t.pluginName.toLowerCase())}))}}]),t}(),lP=new VI("AdsPlugin"),cP=function(t){Gw(r,t);var e,n=Xw(r);function r(){return Hw(this,r),n.apply(this,arguments)}return Vw(r,[{key:"version",get:function(){return"3.0.21-rc.4"}},{key:"paused",get:function(){var t,e;return!(null===(t=this.csManager)||void 0===t||!t.isLinearAdRunning||null===(e=this.csManager)||void 0===e||!e.paused)}},{key:"currentTime",get:function(){var t;return(null===(t=this.csManager)||void 0===t?void 0:t.currentTime)||0}},{key:"duration",get:function(){var t;return(null===(t=this.csManager)||void 0===t?void 0:t.duration)||0}},{key:"afterCreate",value:function(){var t=this.config;lP.log("plugin afterCreate, config: ".concat(Oh(t||{}))),this.csManager=void 0,this._blockContentPlay()}},{key:"beforePlayerInit",value:function(){var t,e,n;switch(lP.log("plugin beforePlayerInit"),this.initPromise=((n=new Mm((function(n,r){t=n,e=r}))).used=!1,n.resolve=function(){return n.used=!0,t.apply(void 0,arguments)},n.reject=function(){return n.used=!0,e.apply(void 0,arguments)},n),this.uiManager=new uP(this.config,{plugin:this,player:this.player}),this.config.adType){case"ima":case"google-ima":this._initClientSideAd()}return this.initPromise}},{key:"render",value:function(){return sA.createDom("xg-ad","",{},"xgplayer-ads")}},{key:"_initClientSideAd",value:function(){switch(this.config.adType){case"ima":case"google-ima":this._initImaAd()}}},{key:"_initImaAd",value:(e=Nw(Dw().mark((function t(){var e=this;return Dw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.csManager=new nP({plugin:this,config:this.config.ima,displayContainer:this.root}),this.csManager.once(mh,(function(){e.uiManager.showAdContainer()})),this.csManager.on(bh,(function(){e.uiManager.hideAdContainer()})),this.csManager.once(Ah,(function(t){t.isPreroll||e.uiManager.hideAdContainer()})),this.csManager.once(Sh,(function(){var t;null===(t=e.initPromise)||void 0===t||t.resolve()})),this.csManager.on(Th,(function(){e.uiManager.showAdUI()})),this.csManager.on(Ch,(function(){e.uiManager.hideAdUI()})),t.next=9,this.csManager.init();case 9:return t.abrupt("return",this.csManager);case 10:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"requestAds",value:function(){var t;null===(t=this.csManager)||void 0===t||t.requestAds()}},{key:"playAds",value:function(){var t;null===(t=this.csManager)||void 0===t||t.playAds()}},{key:"pause",value:function(){var t;null===(t=this.csManager)||void 0===t||t.pause()}},{key:"play",value:function(){var t;null===(t=this.csManager)||void 0===t||t.play()}},{key:"destroy",value:function(){var t,e;this.offAll(),null===(t=this.csManager)||void 0===t||t.destroy(),null===(e=this.uiManager)||void 0===e||e.destroy()}},{key:"reset",value:function(){var t;null===(t=this.csManager)||void 0===t||t.reset()}},{key:"updateConfig",value:function(t){var e;null===(e=this.csManager)||void 0===e||e.updateConfig(t)}},{key:"_blockContentPlay",value:function(){var t=this,e=this.player;e.on("play",(function(){var n;null!==(n=t.csManager)&&void 0!==n&&n.shouldBlockVideoContent&&(lP.log("block content play"),e.pause())}))}}],[{key:"pluginName",get:function(){return"ad"}}]),r}(HA),fP=$t,hP=Kn,pP=Eb,dP=$n;Mn({target:"Array",proto:!0,arity:1,forced:a((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(AR){return AR instanceof TypeError}}()},{push:function(t){var e=fP(this),n=hP(e),r=arguments.length;dP(n+r);for(var i=0;i<r;i++)e[n]=arguments[i],n++;return pP(e,n),n}});var vP=af("Array").push,gP=ut,yP=vP,mP=Array.prototype,wP=n((function(t){var e=t.push;return t===mP||gP(mP,t)&&e===mP.push?yP:e}));function bP(){bP=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Dn||function(t,e,n){t[e]=n.value},i="function"==typeof cc?cc:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Dn(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(S){u=function(t,e,n){return t[e]=n}}function l(t,e,n,i){var o=e&&e.prototype instanceof h?e:h,a=Rf(o.prototype),s=new A(i||[]);return r(a,"_invoke",{value:b(t,n,s)}),a}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=l;var f={};function h(){}function p(){}function d(){}var v={};u(v,o,(function(){return this}));var g=Lf&&Lf(Lf(T([])));g&&g!==e&&n.call(g,o)&&(v=g);var y=d.prototype=h.prototype=Rf(v);function m(t){var e;fp(e=["next","throw","return"]).call(e,(function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function i(r,o,a,s){var u=c(t[r],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==Mc(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,s)}),(function(t){i("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return i("throw",t,a,s)}))}s(u.arg)}var o;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){i(t,n,e,r)}))}return o=o?o.then(r,r):r()}})}function b(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function _(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=c(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function k(t){var e,n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),wP(e=this.tryEntries).call(e,n)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],fp(t).call(t,k,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return p.prototype=d,r(y,"constructor",{value:d,configurable:!0}),r(d,"constructor",{value:p,configurable:!0}),p.displayName=u(d,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Af?Af(t,d):(t.__proto__=d,u(t,s,"GeneratorFunction")),t.prototype=Rf(y),t},t.awrap=function(t){return{__await:t}},m(w.prototype),u(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,i,o){void 0===o&&(o=Lm);var a=new w(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(y),u(y,s,"Generator"),u(y,o,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)wP(n).call(n,r);return Nm(n).call(n),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=T,A.prototype={constructor:A,reset:function(t){var e;if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,fp(e=this.tryEntries).call(e,E),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+sw(r).call(r,1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:T(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function _P(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(AR){return void n(AR)}s.done?e(u):Lm.resolve(u).then(r,i)}function kP(t){return function(){var e=this,n=arguments;return new Lm((function(r,i){var o=t.apply(e,n);function a(t){_P(o,r,i,a,s,"next",t)}function s(t){_P(o,r,i,a,s,"throw",t)}a(void 0)}))}}function EP(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function AP(t,e){var n=void 0!==cc&&Nh(t)||t["@@iterator"];if(!n){if(dw(t)||(n=function(t,e){var n;if(t){if("string"==typeof t)return EP(t,e);var r=sw(n=Object.prototype.toString.call(t)).call(n,8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Iw(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?EP(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}var TP={},CP={},SP={};!function(t){Op(t,"__esModule",{value:!0}),t.shiftThirtyTwoBits=t.THIRTY_TWO_BIT_MULTIPLIER=t.bytesToUUID=void 0;t.bytesToUUID=function(t){if(16!==t.length)throw new Error("scte35-js Uint8Array uuid bad size: ".concat(t.length));return m_([]).call(t,(function(t,e){var n=(t<=15?"0":"")+t.toString(16);return e>=4&&e<=10&&e%2==0?"-"+n:n})).join("")},t.THIRTY_TWO_BIT_MULTIPLIER=Math.pow(2,32);t.shiftThirtyTwoBits=function(e){return e*t.THIRTY_TWO_BIT_MULTIPLIER}}(SP),Op(CP,"__esModule",{value:!0}),CP.parseDescriptor=CP.SegmentationMessage=void 0;var xP,LP,MP=SP;(LP=xP||(CP.SegmentationMessage=xP={}))[LP.RESTRICT_GROUP_0=0]="RESTRICT_GROUP_0",LP[LP.RESTRICT_GROUP_1=1]="RESTRICT_GROUP_1",LP[LP.RESTRICT_GROUP_2=2]="RESTRICT_GROUP_2",LP[LP.NONE=3]="NONE";CP.parseDescriptor=function(t){var e,n=function(t){var e={},n=0;for(e.spliceDescriptorTag=t.getUint8(n++),e.descriptorLength=t.getUint8(n++),e.identifier="";e.identifier.length<4;)e.identifier+=String.fromCharCode(t.getUint8(n++));return e}(t),r=6;if(0===n.spliceDescriptorTag)r=n.descriptorLength+2,console.warn("scte35-js TODO: support spliceDescriptorTag: SpliceDescriptorTag.AVAIL_DESCRIPTOR");else if(1===n.spliceDescriptorTag)r=n.descriptorLength+2,console.warn("scte35-js TODO: support spliceDescriptorTag: SpliceDescriptorTag.DTMF_DESCRIPTOR");else if(2===n.spliceDescriptorTag){var i=n;if(i.segmentationEventId=t.getUint32(r),r+=4,i.segmentationEventCancelIndicator=!!(128&t.getUint8(r++)),!i.segmentationEventCancelIndicator){var o=t.getUint8(r++);i.programSegmentationFlag=!!(128&o),i.segmentationDurationFlag=!!(64&o),i.deliveryNotRestrictedFlag=!!(32&o),i.deliveryNotRestrictedFlag||(i.webDeliveryAllowedFlag=!!(16&o),i.noRegionalBlackoutFlag=!!(8&o),i.archiveAllowedFlag=!!(4&o),i.deviceRestrictions=3&o),i.programSegmentationFlag||(i.componentCount=t.getUint8(r++),console.warn("scte35-js TODO: segmentationDescriptor.componentCount: "+i.componentCount),r+=6*i.componentCount),i.segmentationDurationFlag&&(i.segmentationDuration=MP.shiftThirtyTwoBits(t.getUint8(r++)),i.segmentationDuration+=t.getUint32(r),r+=4),i.segmentationUpidType=t.getUint8(r++),i.segmentationUpidLength=t.getUint8(r++);var a=i.segmentationUpidLength;for(i.segmentationUpid=new Uint8Array(a);a>=0;)a--,i.segmentationUpid[a]=t.getUint8(r+a);r+=i.segmentationUpidLength,i.segmentationTypeId=t.getUint8(r++),i.segmentNum=t.getUint8(r++),i.segmentsExpected=t.getUint8(r++),r<n.descriptorLength+2&&(52===i.segmentationTypeId||54===i.segmentationTypeId)&&(i.subSegmentNum=t.getUint8(r++),i.subSegmentsExpected=t.getUint8(r++))}}else 3===n.spliceDescriptorTag?(r=n.descriptorLength+2,console.warn("scte35-js TODO: support spliceDescriptorTag: SpliceDescriptorTag.TIME_DESCRIPTOR")):(console.error("scte35-js Unrecognized spliceDescriptorTag ".concat(n.spliceDescriptorTag)),r=n.descriptorLength+2);r!==n.descriptorLength+2&&console.error(lh(e="scte35-js Error reading descriptor offset @".concat(r," of ")).call(e,n.descriptorLength+2));return n};var OP=n(nt.Symbol.for),IP=h,PP=Q,RP=Vn,BP=Kn,UP=tp,DP=Math.min,jP=[].lastIndexOf,FP=!!jP&&1/[1].lastIndexOf(1,-0)<0,NP=UP("lastIndexOf"),HP=FP||!NP?function(t){if(FP)return IP(jP,this,arguments)||0;var e=PP(this),n=BP(e),r=n-1;for(arguments.length>1&&(r=DP(r,RP(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}:jP;Mn({target:"Array",proto:!0,forced:HP!==[].lastIndexOf},{lastIndexOf:HP});var zP=af("Array").lastIndexOf,VP=ut,qP=zP,GP=Array.prototype,YP=n((function(t){var e=t.lastIndexOf;return t===GP||VP(GP,t)&&e===GP.lastIndexOf?qP:e})),WP=$t,KP=ai,XP=Kn,$P=Cb,JP=Math.min,QP=[].copyWithin||function(t,e){var n=WP(this),r=XP(n),i=KP(t,r),o=KP(e,r),a=arguments.length>2?arguments[2]:void 0,s=JP((void 0===a?r:KP(a,r))-o,r-i),u=1;for(o<i&&i<o+s&&(u=-1,o+=s-1,i+=s-1);s-- >0;)o in n?n[i]=n[o]:$P(n,i),i+=u,o+=u;return n};Mn({target:"Array",proto:!0},{copyWithin:QP});for(var ZP=af("Array").copyWithin,tR=ut,eR=ZP,nR=Array.prototype,rR=n((function(t){var e=t.copyWithin;return t===nR||tR(nR,t)&&e===nR.copyWithin?eR:e})),iR={},oR={byteLength:function(t){var e=fR(t),n=e[0],r=e[1];return 3*(n+r)/4-r},toByteArray:function(t){var e,n,r=fR(t),i=r[0],o=r[1],a=new uR(function(t,e,n){return 3*(e+n)/4-n}(0,i,o)),s=0,u=o>0?i-4:i;for(n=0;n<u;n+=4)e=sR[t.charCodeAt(n)]<<18|sR[t.charCodeAt(n+1)]<<12|sR[t.charCodeAt(n+2)]<<6|sR[t.charCodeAt(n+3)],a[s++]=e>>16&255,a[s++]=e>>8&255,a[s++]=255&e;2===o&&(e=sR[t.charCodeAt(n)]<<2|sR[t.charCodeAt(n+1)]>>4,a[s++]=255&e);1===o&&(e=sR[t.charCodeAt(n)]<<10|sR[t.charCodeAt(n+1)]<<4|sR[t.charCodeAt(n+2)]>>2,a[s++]=e>>8&255,a[s++]=255&e);return a},fromByteArray:function(t){for(var e,n=t.length,r=n%3,i=[],o=16383,a=0,s=n-r;a<s;a+=o)i.push(hR(t,a,a+o>s?s:a+o));1===r?(e=t[n-1],i.push(aR[e>>2]+aR[e<<4&63]+"==")):2===r&&(e=(t[n-2]<<8)+t[n-1],i.push(aR[e>>10]+aR[e>>4&63]+aR[e<<2&63]+"="));return i.join("")}},aR=[],sR=[],uR="undefined"!=typeof Uint8Array?Uint8Array:Array,lR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",cR=0;cR<64;++cR)aR[cR]=lR[cR],sR[lR.charCodeAt(cR)]=cR;function fR(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=lb(t).call(t,"=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function hR(t,e,n){for(var r,i,o=[],a=e;a<n;a+=3)r=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),o.push(aR[(i=r)>>18&63]+aR[i>>12&63]+aR[i>>6&63]+aR[63&i]);return o.join("")}sR["-".charCodeAt(0)]=62,sR["_".charCodeAt(0)]=63;var pR={read:function(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,l=u>>1,c=-7,f=n?i-1:0,h=n?-1:1,p=t[e+f];for(f+=h,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+t[e+f],f+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+t[e+f],f+=h,c-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=l}return(p?-1:1)*a*Math.pow(2,o-r)},write:function(t,e,n,r,i,o){var a,s,u,l=8*o-i-1,c=(1<<l)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(e*u-1)*Math.pow(2,i),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[n+p]=255&s,p+=d,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;t[n+p]=255&a,p+=d,a/=256,l-=8);t[n+p-d]|=128*v}};(function(e){var n=oR,r=pR,i="function"==typeof Ih&&"function"==typeof OP?OP("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=function(t){+t!=t&&(t=0);return s.alloc(+t)},e.INSPECT_MAX_BYTES=50;var o=2147483647;function a(t){if(t>o)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Rp(e,s.prototype),e}function s(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return c(t)}return u(t,e,n)}function u(t,e,n){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!s.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var n=0|d(t,e),r=a(n),i=r.write(t,e);i!==n&&(r=uw(r).call(r,0,i));return r}(t,e);if(ArrayBuffer.isView(t))return function(t){if(K(t,Uint8Array)){var e=new Uint8Array(t);return h(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+Mc(t));if(K(t,ArrayBuffer)||t&&K(t.buffer,ArrayBuffer))return h(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(K(t,SharedArrayBuffer)||t&&K(t.buffer,SharedArrayBuffer)))return h(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return s.from(r,e,n);var i=function(t){if(s.isBuffer(t)){var e=0|p(t.length),n=a(e);return 0===n.length||t.copy(n,0,0,e),n}if(void 0!==t.length)return"number"!=typeof t.length||X(t.length)?a(0):f(t);if("Buffer"===t.type&&vw(t.data))return f(t.data)}(t);if(i)return i;if(void 0!==Ih&&null!=Rw&&"function"==typeof t[Rw])return s.from(t[Rw]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+Mc(t))}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function c(t){return l(t),a(t<0?0:0|p(t))}function f(t){for(var e=t.length<0?0:0|p(t.length),n=a(e),r=0;r<e;r+=1)n[r]=255&t[r];return n}function h(t,e,n){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;return r=void 0===e&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,e):new Uint8Array(t,e,n),Rp(r,s.prototype),r}function p(t){if(t>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function d(t,e){if(s.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||K(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+Mc(t));var n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return G(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Y(t).length;default:if(i)return r?-1:G(t).length;e=(""+e).toLowerCase(),i=!0}}function v(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return L(this,e,n);case"utf8":case"utf-8":return T(this,e,n);case"ascii":return S(this,e,n);case"latin1":case"binary":return x(this,e,n);case"base64":return A(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function g(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function y(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),X(n=+n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=s.from(e,r)),s.isBuffer(e))return 0===e.length?-1:m(t,e,n,r,i);if("number"==typeof e)return e&=255,"function"==typeof lb(Uint8Array.prototype)?i?lb(Uint8Array.prototype).call(t,e,n):YP(Uint8Array.prototype).call(t,e,n):m(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,n,r,i){var o,a=1,s=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,n/=2}function l(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var c=-1;for(o=n;o<s;o++)if(l(t,o)===l(e,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*a}else-1!==c&&(o-=o-c),c=-1}else for(n+u>s&&(n=s-u),o=n;o>=0;o--){for(var f=!0,h=0;h<u;h++)if(l(t,o+h)!==l(e,h)){f=!1;break}if(f)return o}return-1}function w(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o,a=e.length;for(r>a/2&&(r=a/2),o=0;o<r;++o){var s=h_(e.substr(2*o,2),16);if(X(s))return o;t[n+o]=s}return o}function b(t,e,n,r){return W(G(e,t.length-n),t,n,r)}function _(t,e,n,r){return W(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function k(t,e,n,r){return W(Y(e),t,n,r)}function E(t,e,n,r){return W(function(t,e){for(var n,r,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)r=(n=t.charCodeAt(a))>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function A(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(uw(t).call(t,e,r))}function T(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o=t[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(i+s<=n){var u=void 0,l=void 0,c=void 0,f=void 0;switch(s){case 1:o<128&&(a=o);break;case 2:128==(192&(u=t[i+1]))&&(f=(31&o)<<6|63&u)>127&&(a=f);break;case 3:u=t[i+1],l=t[i+2],128==(192&u)&&128==(192&l)&&(f=(15&o)<<12|(63&u)<<6|63&l)>2047&&(f<55296||f>57343)&&(a=f);break;case 4:u=t[i+1],l=t[i+2],c=t[i+3],128==(192&u)&&128==(192&l)&&128==(192&c)&&(f=(15&o)<<18|(63&u)<<12|(63&l)<<6|63&c)>65535&&f<1114112&&(a=f)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return function(t){var e=t.length;if(e<=C)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,uw(t).call(t,r,r+=C));return n}(r)}e.kMaxLength=o,s.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Rp(e,Uint8Array.prototype),Rp(t,e),42===t.foo()}catch(n){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Op(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Op(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(t,e,n){return u(t,e,n)},Rp(s.prototype,Uint8Array.prototype),Rp(s,Uint8Array),s.alloc=function(t,e,n){return function(t,e,n){return l(t),t<=0?a(t):void 0!==e?"string"==typeof n?DL(r=a(t)).call(r,e,n):DL(i=a(t)).call(i,e):a(t);var r,i}(t,e,n)},s.allocUnsafe=function(t){return c(t)},s.allocUnsafeSlow=function(t){return c(t)},s.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==s.prototype},s.compare=function(t,e){if(K(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),K(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,e){if(!vw(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=s.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var o=t[n];if(K(o,Uint8Array))i+o.length>r.length?(s.isBuffer(o)||(o=s.from(o)),o.copy(r,i)):Uint8Array.prototype.set.call(r,o,i);else{if(!s.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i)}i+=o.length}return r},s.byteLength=d,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)g(this,e,e+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},s.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?T(this,0,t):v.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t,n="",r=e.INSPECT_MAX_BYTES;return n=vE(t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ")).call(t),this.length>r&&(n+=" ... "),"<Buffer "+n+">"},i&&(s.prototype[i]=s.prototype.inspect),s.prototype.compare=function(t,e,n,r,i){if(K(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+Mc(t));if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),u=Math.min(o,a),l=uw(this).call(this,r,i),c=uw(t).call(t,e,n),f=0;f<u;++f)if(l[f]!==c[f]){o=l[f],a=c[f];break}return o<a?-1:a<o?1:0},s.prototype.includes=function(t,e,n){return-1!==lb(this).call(this,t,e,n)},s.prototype.indexOf=function(t,e,n){return y(this,t,e,n,!0)},s.prototype.lastIndexOf=function(t,e,n){return y(this,t,e,n,!1)},s.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return w(this,t,e,n);case"utf8":case"utf-8":return b(this,t,e,n);case"ascii":case"latin1":case"binary":return _(this,t,e,n);case"base64":return k(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:uw(Array.prototype).call(this._arr||this,0)}};var C=4096;function S(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function x(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function L(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=$[t[o]];return i}function M(t,e,n){for(var r=uw(t).call(t,e,n),i="",o=0;o<r.length-1;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function O(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function I(t,e,n,r,i,o){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function P(t,e,n,r,i){H(e,r,i,t,n,7);var o=Number(e&BigInt(4294967295));t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o;var a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,n}function R(t,e,n,r,i){H(e,r,i,t,n,7);var o=Number(e&BigInt(4294967295));t[n+7]=o,o>>=8,t[n+6]=o,o>>=8,t[n+5]=o,o>>=8,t[n+4]=o;var a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n+3]=a,a>>=8,t[n+2]=a,a>>=8,t[n+1]=a,a>>=8,t[n]=a,n+8}function B(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function U(t,e,n,i,o){return e=+e,n>>>=0,o||B(t,0,n,4),r.write(t,e,n,i,23,4),n+4}function D(t,e,n,i,o){return e=+e,n>>>=0,o||B(t,0,n,8),r.write(t,e,n,i,52,8),n+8}s.prototype.slice=function(t,e){var n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);var r=this.subarray(t,e);return Rp(r,s.prototype),r},s.prototype.readUintLE=s.prototype.readUIntLE=function(t,e,n){t>>>=0,e>>>=0,n||O(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},s.prototype.readUintBE=s.prototype.readUIntBE=function(t,e,n){t>>>=0,e>>>=0,n||O(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},s.prototype.readUint8=s.prototype.readUInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),this[t]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readBigUInt64LE=J((function(t){z(t>>>=0,"offset");var e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);var r=e+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,24),i=this[++t]+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+n*Math.pow(2,24);return BigInt(r)+(BigInt(i)<<BigInt(32))})),s.prototype.readBigUInt64BE=J((function(t){z(t>>>=0,"offset");var e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);var r=e*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+this[++t],i=this[++t]*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+n;return(BigInt(r)<<BigInt(32))+BigInt(i)})),s.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||O(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},s.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||O(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},s.prototype.readInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){t>>>=0,e||O(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(t,e){t>>>=0,e||O(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readBigInt64LE=J((function(t){z(t>>>=0,"offset");var e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);var r=this[t+4]+this[t+5]*Math.pow(2,8)+this[t+6]*Math.pow(2,16)+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(e+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,24))})),s.prototype.readBigInt64BE=J((function(t){z(t>>>=0,"offset");var e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);var r=(e<<24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+this[++t];return(BigInt(r)<<BigInt(32))+BigInt(this[++t]*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+n)})),s.prototype.readFloatLE=function(t,e){return t>>>=0,e||O(t,4,this.length),r.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return t>>>=0,e||O(t,4,this.length),r.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return t>>>=0,e||O(t,8,this.length),r.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return t>>>=0,e||O(t,8,this.length),r.read(this,t,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e>>>=0,n>>>=0,r)||I(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e>>>=0,n>>>=0,r)||I(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,1,255,0),this[e]=255&t,e+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeBigUInt64LE=J((function(t){return P(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeBigUInt64BE=J((function(t){return R(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){var i=Math.pow(2,8*n-1);I(this,t,e,n,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<n&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},s.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){var i=Math.pow(2,8*n-1);I(this,t,e,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},s.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},s.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeBigInt64LE=J((function(t){return P(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeBigInt64BE=J((function(t){return R(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeFloatLE=function(t,e,n){return U(this,t,e,!0,n)},s.prototype.writeFloatBE=function(t,e,n){return U(this,t,e,!1,n)},s.prototype.writeDoubleLE=function(t,e,n){return D(this,t,e,!0,n)},s.prototype.writeDoubleBE=function(t,e,n){return D(this,t,e,!1,n)},s.prototype.copy=function(t,e,n,r){if(!s.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i=r-n;this===t&&"function"==typeof rR(Uint8Array.prototype)?rR(this).call(this,e,n,r):Uint8Array.prototype.set.call(t,this.subarray(n,r),e);return i},s.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===t.length){var i=t.charCodeAt(0);("utf8"===r&&i<128||"latin1"===r)&&(t=i)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else{var a=s.isBuffer(t)?t:s.from(t,r),u=a.length;if(0===u)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<n-e;++o)this[o+e]=a[o%u]}return this};var j={};function F(e,n,r){j[e]=function(r){Uf(o,r);var i=rh(o);function o(){var r,a;return t(this,o),a=i.call(this),Op(Uc(a),"message",{value:n.apply(Uc(a),arguments),writable:!0,configurable:!0}),a.name=lh(r="".concat(a.name," [")).call(r,e,"]"),a.stack,delete a.name,a}return Bc(o,[{key:"code",get:function(){return e},set:function(t){Op(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}},{key:"toString",value:function(){var t,n;return lh(t=lh(n="".concat(this.name," [")).call(n,e,"]: ")).call(t,this.message)}}]),o}(r)}function N(t){for(var e,n="",r=t.length,i="-"===t[0]?1:0;r>=i+4;r-=3){var o;n=lh(o="_".concat(uw(t).call(t,r-3,r))).call(o,n)}return lh(e="".concat(uw(t).call(t,0,r))).call(e,n)}function H(t,e,n,r,i,o){if(t>n||t<e){var a,s,u,l,c,f,h,p,d,v,g="bigint"==typeof e?"n":"";if(o>3)if(0===e||e===BigInt(0))a=lh(s=lh(u=lh(l=">= 0".concat(g," and < 2")).call(l,g," ** ")).call(u,8*(o+1))).call(s,g);else a=lh(c=lh(f=">= -(2".concat(g," ** ")).call(f,8*(o+1)-1)).call(c,g,") and < 2 ** ")+lh(h="".concat(8*(o+1)-1)).call(h,g);else a=lh(p=lh(d=lh(v=">= ".concat(e)).call(v,g," and <= ")).call(d,n)).call(p,g);throw new j.ERR_OUT_OF_RANGE("value",a,t)}!function(t,e,n){z(e,"offset"),void 0!==t[e]&&void 0!==t[e+n]||V(e,t.length-(n+1))}(r,i,o)}function z(t,e){if("number"!=typeof t)throw new j.ERR_INVALID_ARG_TYPE(e,"number",t)}function V(t,e,n){var r;if(Math.floor(t)!==t)throw z(t,n),new j.ERR_OUT_OF_RANGE(n||"offset","an integer",t);if(e<0)throw new j.ERR_BUFFER_OUT_OF_BOUNDS;throw new j.ERR_OUT_OF_RANGE(n||"offset",lh(r=">= ".concat(n?1:0," and <= ")).call(r,e),t)}F("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?"".concat(t," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),F("ERR_INVALID_ARG_TYPE",(function(t,e){var n;return lh(n='The "'.concat(t,'" argument must be of type number. Received type ')).call(n,Mc(e))}),TypeError),F("ERR_OUT_OF_RANGE",(function(t,e,n){var r,i='The value of "'.concat(t,'" is out of range.'),o=n;return pL(n)&&Math.abs(n)>Math.pow(2,32)?o=N(String(n)):"bigint"==typeof n&&(o=String(n),(n>Math.pow(BigInt(2),BigInt(32))||n<-Math.pow(BigInt(2),BigInt(32)))&&(o=N(o)),o+="n"),i+=lh(r=" It must be ".concat(e,". Received ")).call(r,o)}),RangeError);var q=/[^+/0-9A-Za-z-_]/g;function G(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function Y(t){return n.toByteArray(function(t){if(t=t.split("=")[0],(t=vE(t).call(t).replace(q,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function W(t,e,n,r){var i;for(i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function K(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function X(t){return t!=t}var $=function(){for(var t="0123456789abcdef",e=new Array(256),n=0;n<16;++n)for(var r=16*n,i=0;i<16;++i)e[r+i]=t[n]+t[i];return e}();function J(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}})(iR),Op(TP,"__esModule",{value:!0});var dR=TP.SCTE35=void 0,vR=CP,gR=SP,yR=iR,mR=function(){function e(){t(this,e),this.buffer=yR.Buffer}return Bc(e,[{key:"parseFromB64",value:function(t){var e,n=Uint8Array.from(m_(e=this.parseBase64(t).split("")).call(e,(function(t){return t.charCodeAt(0)})));return this.parseSCTE35Data(n)}},{key:"parseFromHex",value:function(t){var e=t.match(/[a-f\d]{2}/gi)||[],n=Uint8Array.from(m_(e).call(e,(function(t){return h_(t,16)})));return this.parseSCTE35Data(n)}},{key:"parseBase64",value:function(t){return this.buffer.from(t,"base64").toString("binary")}},{key:"spliceEvent",value:function(t,e,n){var r=0;if(t.spliceEventId=e.getUint32(r),r+=4,t.spliceEventCancelIndicator=!!(128&e.getUint8(r++)),t.spliceEventCancelIndicator)return r;var i=e.getUint8(r++);if(t.outOfNetworkIndicator=!!(128&i),t.programSpliceFlag=!!(64&i),t.durationFlag=!!(32&i),5===n&&(t.spliceImmediateFlag=!!(16&i)),t.programSpliceFlag)if(5!==n||t.spliceImmediateFlag)4===n&&(t.utcSpliceTime=e.getUint32(r),r+=4);else{var o=this.timeSignal(new DataView(e.buffer,e.byteOffset+r,5));t.spliceTime=o,r++,o.specified&&(r+=4)}else if(t.componentCount=e.getUint8(r++),4===n){for(var a=[];a.length!==t.componentCount;)a.push({componentTag:e.getUint8(r++),utcSpliceTime:e.getUint32(r)}),r+=4;t.utcSpliceComponents=a}else console.warn("scte35-js TODO: support splice_insert");return t.durationFlag&&(i=e.getUint8(r++),t.breakDuration={autoReturn:!!(128&i),duration:(1&i?gR.THIRTY_TWO_BIT_MULTIPLIER:0)+e.getUint32(r)},r+=4),t.uniqueProgramId=e.getUint16(r),r+=2,t.available=e.getUint8(r++),t.expected=e.getUint8(r++),r}},{key:"spliceSchedule",value:function(t){var e={};e.spliceCount=t.getUint8(0),e.spliceEvents=[];for(var n,r=1;e.spliceEvents.length!==e.spliceCount;){var i={};r+=this.spliceEvent(i,new DataView(t.buffer,t.byteOffset+r),4),e.spliceEvents.push(i)}r!==t.byteLength&&console.error(lh(n="scte35-js Bad read splice_schedule actual: ".concat(r," expected: ")).call(n,t.byteLength));return e}},{key:"spliceInsert",value:function(t){var e,n={},r=this.spliceEvent(n,t,5);r!==t.byteLength&&console.error(lh(e="scte35-js Bad read splice_insert actual: ".concat(r," expected: ")).call(e,t.byteLength));return n}},{key:"timeSignal",value:function(t){var e={},n=t.getUint8(0);return e.specified=!!(128&n),e.specified&&(e.pts=1&n?gR.THIRTY_TWO_BIT_MULTIPLIER:0,e.pts+=t.getUint32(1)),e}},{key:"privateCommand",value:function(t){var e={},n=t.getUint32(0),r=new Uint8Array(t.buffer,t.byteOffset+4,t.byteLength-4);return e.identifier=n,e.identifier&&(e.rawData=r),e}},{key:"parseSCTE35Data",value:function(t){var e={},n=new DataView(t.buffer),r=0;e.tableId=n.getUint8(r++);var i,o=n.getUint8(r++);if(e.selectionSyntaxIndicator=!!(128&o),e.privateIndicator=!!(64&o),e.sectionLength=((15&o)<<8)+n.getUint8(r++),e.sectionLength+3!==t.byteLength)throw new Error(lh(i="Binary read error sectionLength: ".concat(e.sectionLength," + 3 !== data.length: ")).call(i,t.byteLength));if(e.protocolVersion=n.getUint8(r++),o=n.getUint8(r++),e.encryptedPacket=!!(128&o),e.encryptedAlgorithm=(126&o)>>1,e.encryptedPacket&&console.error("scte35-js splice_info_section encrypted_packet ".concat(e.encryptedAlgorithm," not supported")),e.ptsAdjustment=1&o?gR.THIRTY_TWO_BIT_MULTIPLIER:0,e.ptsAdjustment+=n.getUint32(r),r+=4,e.cwIndex=n.getUint8(r++),e.tier=n.getUint8(r++)<<4,o=n.getUint8(r++),e.tier+=(240&o)>>4,e.spliceCommandLength=((15&o)<<8)+n.getUint8(r++),e.spliceCommandType=n.getUint8(r++),4095===e.spliceCommandLength)if(6===e.spliceCommandType){var a=128&n.getUint8(r);e.spliceCommandLength=a?5:1}else if(0===e.spliceCommandType)e.spliceCommandLength=0;else if(5===e.spliceCommandType){var s=r;if(s+=4,!(128&n.getUint8(s++))){var u=n.getUint8(s++),l=16&u,c=32&u,f=64&u;if(f&&!l&&(s+=5),!f){var h=n.getUint8(s++);s+=h,s+=l?0:5*h}c&&(s+=5),s+=4,e.spliceCommandLength=s-r}}else console.error("scte35-js Unspecified length not supported in this context");if(0!==e.spliceCommandType){var p=new DataView(t.buffer,r,e.spliceCommandLength);4===e.spliceCommandType?e.spliceCommand=this.spliceSchedule(p):5===e.spliceCommandType?e.spliceCommand=this.spliceInsert(p):6===e.spliceCommandType?e.spliceCommand=this.timeSignal(p):255===e.spliceCommandType&&(e.spliceCommand=this.privateCommand(p))}if(r+=e.spliceCommandLength,e.descriptorLoopLength=n.getUint16(r),r+=2,e.descriptorLoopLength){var d=e.descriptorLoopLength;e.descriptors=[];try{for(;d;){var v=new DataView(t.buffer,r,d),g=vR.parseDescriptor(v);d-=g.descriptorLength+2,r+=g.descriptorLength+2,e.descriptors.push(g)}}catch(AR){var y;console.error(lh(y="scte35-js Error reading descriptor @ ".concat(r,", ignoring remaining bytes: ")).call(y,d," in loop.")),console.error(AR),r+=d,d=0}}return e.crc=n.getUint32(r),(r+=4)!==n.byteLength&&console.error("scte35-js Bad SCTE35 read - remaining data: ".concat(uw(t).call(t,r).join(", "))),e}}]),e}();dR=TP.SCTE35=mR;var wR="SCTE35-OUT",bR="START-DATE",_R="PLANNED-DURATION";var kR=function(){function e(n){var r=this;t(this,e),ih(this,"_options",void 0),ih(this,"_track",void 0),ih(this,"_startTime",void 0),ih(this,"_adBreakCues",void 0),ih(this,"_activeAdBreak",null),ih(this,"_activeAdBreakStatus","WAITING_PREROLL"),ih(this,"_scte35",new dR),ih(this,"_scte35ResultMap",new wI),ih(this,"_adManager",void 0),ih(this,"_timer",void 0),ih(this,"_handleTimeUpdate",(function(){var t,e,n,i,o;if(null!==(t=r._adBreakCues)&&void 0!==t&&t.length)for(var a=0;a<r._adBreakCues.length;a++){var s=r._adBreakCues[a];if(s.startTime>=r._player.currentTime){n=s;break}}if(n&&(null===(e=r._activeAdBreak)||void 0===e?void 0:e.id)===n.id)if((null===(i=r._activeAdBreak)||void 0===i?void 0:i.startDate)!==n.startDate)switch(r._activeAdBreakStatus){case"REQUESTED":r._changeActiveAdBreakStatus("REQUESTED",n);break;case"ERROR":case"COMPLETE":r._changeActiveAdBreakStatus("READY",null)}else(null===(o=r._activeAdBreak)||void 0===o?void 0:o.startTime)!==n.startTime&&r._changeActiveAdBreakStatus(r._activeAdBreakStatus,n);r._tryToPlayAd(),r._tryToRequestAd(n)})),ih(this,"_onReady",(function(){r._changeActiveAdBreakStatus("READY",null),r._player.off(vh,r._onReady),r._player.off(yh,r._onReady),r._player.on(gA,r._handleTimeUpdate),r._player.on(yh,r._onAdComplete),r._player.on(vh,r._onAdError),r._handleTimeUpdate()})),ih(this,"_onAdComplete",(function(){r._changeActiveAdBreakStatus("COMPLETE",r._activeAdBreak)})),ih(this,"_onAdError",(function(){var t,e;null===(t=r._player)||void 0===t||null===(t=t.media)||void 0===t||null===(t=t.style)||void 0===t||t.setProperty("visibility",""),null===(e=r._adManager)||void 0===e||e.destroy(),r._adManager=null,r._changeActiveAdBreakStatus("ERROR",r._activeAdBreak)})),ih(this,"_handleHlsCoreEvent",(function(t){var e=t.eventName,n=t.playlist;if("core.hlslevelloaded"===e){var i;if(null!=n&&null!==(i=n.segments)&&void 0!==i&&i.length&&0===r._player.currentTime){var o,a=AP(n.segments);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(0===s.start){r._startTime=new Date(s.dataTime).getTime();break}}}catch(u){a.e(u)}finally{a.f()}}null!=n&&n.dateRanges&&r._startTime&&r._updateAdBreakCues(n.dateRanges)}})),ih(this,"_onAddTrack",(function(t){var e=t.track;"metadata"===(null==e?void 0:e.kind)&&(e.mode="hidden",r._track=e,fA.os.isIos?r.loopCues():(r._onCuechange(),r._track.addEventListener("cuechange",r._onCuechange)))})),ih(this,"loopCues",(function(){r._onCuechange(),r._timer=Vk(r.loopCues,2e3)})),ih(this,"_onCuechange",(function(){for(var t,e={},n=(null===(t=r._track)||void 0===t?void 0:t.cues)||[],i=0;i<n.length;){var o,a=n[i];if((null===(o=a.value)||void 0===o?void 0:o.key)===_R){var s,u=i+1<n.length?n[i+1]:null;if((null==u||null===(s=u.value)||void 0===s?void 0:s.key)===wR&&(null==u?void 0:u.startTime)===a.startTime){var l,c,f=r._getScte35Result(null===(l=u.value)||void 0===l?void 0:l.data),h=String((null==f?void 0:f.spliceCommand).spliceEventId);e[h]=ih({ID:h,startTime:u.startTime,message:f},_R,null===(c=a.value)||void 0===c?void 0:c.data),i+=2}else i++}else i++}r._updateAdBreakCues(e)})),this._options=n,this._adManager=this._options.adManager,this._init()}var n,r,i;return Bc(e,[{key:"_player",get:function(){return this._options.player}},{key:"_adTagUrl",get:function(){return this._options.adTagUrl}},{key:"_mediaElement",get:function(){return this._player.media}},{key:"destroy",value:function(){var t,e;null===(t=this._track)||void 0===t||t.removeEventListener("cuechange",this._onCuechange),this._track=void 0,clearTimeout(this._timer),this._timer=null,null===(e=this._mediaElement)||void 0===e||null===(e=e.textTracks)||void 0===e||e.removeEventListener("addtrack",this._onAddTrack),this._player.off("core_event",this._handleHlsCoreEvent),this._player.off(gA,this._handleTimeUpdate),this._player.off(kh,this._onAdComplete),this._player.off(Eh,this._onAdError)}},{key:"_init",value:function(){var t;null===(t=this._mediaElement)||void 0===t||null===(t=t.textTracks)||void 0===t||t.addEventListener("addtrack",this._onAddTrack),this._player.on("core_event",this._handleHlsCoreEvent);var e=this._adManager.config,n=e.adsRequest,r=e.adsResponse,i=e.adTagUrl;n||r||i?(this._player.once(vh,this._onReady),this._player.once(yh,this._onReady)):this._onReady()}},{key:"_changeActiveAdBreakStatus",value:function(t,e){var n,r;this._activeAdBreakStatus=t,this._activeAdBreak=e,console.log(lh(n=lh(r="Update adbreak status, status: ".concat(this._activeAdBreakStatus,", player start time: ")).call(r,this._startTime,", player current time: ")).call(n,this._player.currentTime),this._activeAdBreak)}},{key:"_tryToRequestAd",value:(i=kP(bP().mark((function t(e){var n;return bP().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}return t.abrupt("return");case 2:if("WAITING_PREROLL"!==this._activeAdBreakStatus){t.next=4;break}return t.abrupt("return");case 4:if("STARTED"!==this._activeAdBreakStatus){t.next=6;break}return t.abrupt("return");case 6:if(e.id!==(null===(n=this._activeAdBreak)||void 0===n?void 0:n.id)){t.next=8;break}return t.abrupt("return");case 8:return this._changeActiveAdBreakStatus("REQUESTED",e),t.next=11,this._generateOrUpdateManager(this._adManager);case 11:this._adManager=t.sent;case 12:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"_tryToPlayAd",value:function(){!this._activeAdBreak||this._activeAdBreak.startTime>this._player.currentTime||("ERROR"!==this._activeAdBreakStatus?"REQUESTED"===this._activeAdBreakStatus&&(this._changeActiveAdBreakStatus("STARTED",this._activeAdBreak),this._playLoopAds(this._adManager,this._activeAdBreak.duration)):this._changeActiveAdBreakStatus("READY",null))}},{key:"_generateOrUpdateManager",value:(r=kP(bP().mark((function t(e){var n;return bP().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=6;break}return t.next=3,this._player.plugins.ad._initImaAd();case 3:n=t.sent,t.next=8;break;case 6:(n=e).reset();case 8:return n.updateConfig({adTagUrl:this._adTagUrl}),n.requestAds(),t.abrupt("return",n);case 11:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"_playLoopAds",value:(n=kP(bP().mark((function t(e,n){var r,i=this,o=arguments;return bP().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=o.length>2&&void 0!==o[2]&&o[2],console.log("开始播放广告"),e.playAds(),e.once(Ch,(function(){i._player.media.style.setProperty("visibility","")})),e.adsManager.addEventListener(google.ima.AdEvent.Type.STARTED,(function(t){var i,o=null==t||null===(i=t.getAd().data)||void 0===i?void 0:i.duration;r&&n&&n<o&&(console.log(n+"后中断广告"),Vk((function(){var t;console.log("在 duration 时间中断广告"),null===(t=e)||void 0===t||null===(t=t.adsManager)||void 0===t||t.stop()}),1e3*n))})),e.adsManager.addEventListener(google.ima.AdEvent.Type.MIDPOINT,function(){var t=kP(bP().mark((function t(r){var o,a,s,u,l,c,f,h,p;return bP().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(f=null==r||null===(o=r.getAd().data)||void 0===o?void 0:o.duration,h=n-f,console.log("currentRemianDuration:",n,"adDuration:",f,"nextRemainDuration:",h,"minDurationOffset:",null!==(a=null===(s=i._options.replayForSCTE35)||void 0===s?void 0:s.minDurationOffset)&&void 0!==a?a:5),!(f&&null!==(u=i._options.replayForSCTE35)&&void 0!==u&&u.enable&&h>0&&h>(null!==(l=null===(c=i._options.replayForSCTE35)||void 0===c?void 0:c.minDurationOffset)&&void 0!==l?l:5))){t.next=10;break}return console.log("创建下一个 manager"),t.next=7,i._generateOrUpdateManager();case 7:return(p=t.sent)&&(e.resumeCallback=function(){var t;return console.log("当前广告播放结束"),i._player.plugins.ad.uiManager.hideAdUI(),i._player.media.style.setProperty("visibility","hidden"),null===(t=e)||void 0===t||t.destroy(),e=null,i._playLoopAds(p,h,!0),{canResume:!1}}),t.abrupt("return");case 10:i._adManager=e;case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 6:case"end":return t.stop()}}),t)}))),function(t,e){return n.apply(this,arguments)})},{key:"_getScte35Result",value:function(t){if(!this._scte35ResultMap.has(t))try{this._scte35ResultMap.set(t,this._scte35.parseFromHex(t))}catch(e){}if(!this._scte35ResultMap.has(t))try{this._scte35ResultMap.set(t,this._scte35.parseFromB64(t))}catch(e){}return this._scte35ResultMap.get(t)}},{key:"_updateAdBreakCues",value:function(t){var e,n,r=this;this._adBreakCues=ZE(e=DI(n=qh(t)).call(n,(function(e,n){var i=t[n];if(function(t){return!(!t[_R]||!t.message&&!t[wR]||void 0===t.startTime&&!t[bR])}(i)){var o=i.message||r._getScte35Result(i[wR]);5===(null==o?void 0:o.spliceCommandType)&&e.push({data:o,id:i.ID,startTime:i.startTime||(new Date(i[bR]).getTime()-r._startTime)/1e3,duration:aE(i[_R]||"0"),startDate:i[bR]})}return e}),[])).call(e,(function(t,e){return t.startTime-e.startTime}))}}]),e}();var ER=function(e){Uf(r,e);var n=rh(r);function r(){var e,i;t(this,r);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return ih(Uc(i=n.call.apply(n,lh(e=[this]).call(e,a))),"_scte35Manager",void 0),ih(Uc(i),"_handlePrerollMuted",(function(t){var e,n;(function(t){var e;return 0===(null==t||null===(e=t.getAdPodInfo())||void 0===e?void 0:e.getTimeOffset())})(t.ad)&&(null===(e=i.player.plugins.autoplayplugin)||void 0===e||null===(n=e.handleAutoplayStart)||void 0===n||n.call(e),i.player.once(mA,(function(){var t,e;null===(t=i.player.plugins.autoplayplugin)||void 0===t||null===(e=t.initState)||void 0===e||e.call(t)})))})),i}return Bc(r,[{key:"afterCreate",value:function(){Of(Mf(r.prototype),"afterCreate",this).call(this),this._init()}},{key:"beforePlayerInit",value:function(){var t,e,n=Of(Mf(r.prototype),"beforePlayerInit",this).call(this);return null===(t=this.csManager)||void 0===t||t.once(wh,(function(){google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0)})),this.config.enableSCTE35&&null!==(e=this.config.ima)&&void 0!==e&&e.adTagUrlForSCTE35&&(this._scte35Manager=new kR({player:this.player,adTagUrl:this.config.ima.adTagUrlForSCTE35,adManager:this.csManager,replayForSCTE35:this.config.replayForSCTE35})),n}},{key:"destroy",value:function(){var t;Of(Mf(r.prototype),"destroy",this).call(this),null===(t=this._scte35Manager)||void 0===t||t.destroy(),this._scte35Manager=void 0}},{key:"_init",value:function(){var t,e;null!==(t=this.config.ima)&&void 0!==t&&t.adTagUrl||null===(e=this.config.ima)||void 0===e||null===(e=e.schedule)||void 0===e||!e.length||(this.config.ima.adsResponse=function(t){var e,n;if(t&&t.length){var r=document.implementation.createDocument("http://www.iab.net/videosuite/vmap","vmap:VMAP"),i=r.getElementsByTagName("vmap:VMAP");i[0].setAttribute("version","1.0");var o,a=0,s=0;return hp(e=ZE(n=Jh(t).call(t,(function(t){var e=t.offset;return"pre"===e||"post"===e||/^(\d\d):([0-5]\d):([0-5]\d)(.\d\d\d)?$/.test(e)}))).call(n,(function(t,e){return"pre"===t.offset||"post"===e.offset?-1:"post"===t.offset||"pre"===e.offset?1:Date.parse("2024-01-01T".concat(t.offset))<Date.parse("2024-01-01T".concat(e.offset))?-1:1}))).call(e,(function(t){var e,n,u,l=t.offset,c=t.type,f=t.tag;switch(l){case"pre":n="start",u="preroll";break;case"post":n="end",u="postroll";break;default:n=l,o!==l?(o=l,s=1,u="midroll-".concat(++a)):(s++,u="midroll-".concat(a))}var h=r.createElement("vmap:AdBreak");h.setAttribute("timeOffset",n),h.setAttribute("breakId",u),h.setAttribute("breakType",c||"linear"),i[0].appendChild(h);var p=r.createElement("vmap:AdSource");p.setAttribute("id",lh(e="".concat(u,"-ad-")).call(e,s)),p.setAttribute("allowMultipleAds","true"),p.setAttribute("followRedirects","true"),h.appendChild(p);var d=r.createElement("vmap:AdTagURI");d.setAttribute("templateType","vast3"),p.appendChild(d),d.innerHTML="<![CDATA[ ".concat(f," ]]>")})),(new XMLSerializer).serializeToString(r)}}(this.config.ima.schedule)),this.player.once(fh,this._handlePrerollMuted)}}],[{key:"pluginName",get:function(){return"ad"}}]),r}(cP);return ER}));
|