@volcengine/veplayer 2.0.0-rc.0 → 2.0.0-rc.2
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.d.ts +2042 -278
- package/esm/veplayer.biz.live.development.js +26 -5
- package/esm/veplayer.biz.live.production.js +1 -1
- package/esm/veplayer.d.ts +4488 -836
- package/esm/veplayer.development.js +288 -58
- package/esm/veplayer.live.d.ts +4494 -843
- package/esm/veplayer.live.development.js +288 -58
- package/esm/veplayer.live.production.js +4 -4
- package/esm/veplayer.production.js +4 -4
- package/esm/veplayer.vod.d.ts +2042 -278
- package/esm/veplayer.vod.development.js +251 -40
- package/esm/veplayer.vod.production.js +3 -3
- package/package.json +1 -1
- package/umd/index.d.ts +2042 -278
- package/umd/veplayer.biz.live.development.js +26 -5
- package/umd/veplayer.biz.live.production.js +1 -1
- package/umd/veplayer.d.ts +4488 -836
- package/umd/veplayer.development.js +288 -58
- package/umd/veplayer.live.d.ts +4494 -843
- package/umd/veplayer.live.development.js +288 -58
- package/umd/veplayer.live.production.js +1 -1
- package/umd/veplayer.production.js +1 -1
- package/umd/veplayer.vod.d.ts +2042 -278
- package/umd/veplayer.vod.development.js +251 -40
- package/umd/veplayer.vod.production.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).VePlayer={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var i=function(e){return e&&e.Math==Math&&e},r=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof t&&t)||function(){return this}()||t||Function("return this")(),o=function(e){try{return!!e()}catch(t){return!0}},a=!o((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),s=a,l=Function.prototype,u=l.apply,c=l.call,h="object"==typeof Reflect&&Reflect.apply||(s?c.bind(u):function(){return c.apply(u,arguments)}),f=a,d=Function.prototype,p=d.call,v=f&&d.bind.bind(p,p),g=f?v:function(e){return function(){return p.apply(e,arguments)}},y=g,m=y({}.toString),_=y("".slice),b=function(e){return _(m(e),8,-1)},k=b,w=g,E=function(e){if("Function"===k(e))return w(e)},C="object"==typeof document&&document.all,x={all:C,IS_HTMLDDA:void 0===C&&void 0!==C},T=x.all,S=x.IS_HTMLDDA?function(e){return"function"==typeof e||e===T}:function(e){return"function"==typeof e},A={},P=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),O=a,I=Function.prototype.call,R=O?I.bind(I):function(){return I.apply(I,arguments)},M={},L={}.propertyIsEnumerable,D=Object.getOwnPropertyDescriptor,N=D&&!L.call({1:2},1);M.f=N?function(e){var t=D(this,e);return!!t&&t.enumerable}:L;var F,H,U=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},j=o,B=b,V=Object,G=g("".split),z=j((function(){return!V("z").propertyIsEnumerable(0)}))?function(e){return"String"==B(e)?G(e,""):V(e)}:V,K=function(e){return null==e},W=K,Y=TypeError,X=function(e){if(W(e))throw Y("Can't call method on "+e);return e},q=z,Z=X,$=function(e){return q(Z(e))},J=S,Q=x.all,ee=x.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:J(e)||e===Q}:function(e){return"object"==typeof e?null!==e:J(e)},te={},ne=te,ie=r,re=S,oe=function(e){return re(e)?e:void 0},ae=function(e,t){return arguments.length<2?oe(ne[e])||oe(ie[e]):ne[e]&&ne[e][t]||ie[e]&&ie[e][t]},se=g({}.isPrototypeOf),le="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ue=r,ce=le,he=ue.process,fe=ue.Deno,de=he&&he.versions||fe&&fe.version,pe=de&&de.v8;pe&&(H=(F=pe.split("."))[0]>0&&F[0]<4?1:+(F[0]+F[1])),!H&&ce&&(!(F=ce.match(/Edge\/(\d+)/))||F[1]>=74)&&(F=ce.match(/Chrome\/(\d+)/))&&(H=+F[1]);var ve=H,ge=ve,ye=o,me=r.String,_e=!!Object.getOwnPropertySymbols&&!ye((function(){var e=Symbol();return!me(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ge&&ge<41})),be=_e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ke=ae,we=S,Ee=se,Ce=Object,xe=be?function(e){return"symbol"==typeof e}:function(e){var t=ke("Symbol");return we(t)&&Ee(t.prototype,Ce(e))},Te=String,Se=function(e){try{return Te(e)}catch(t){return"Object"}},Ae=S,Pe=Se,Oe=TypeError,Ie=function(e){if(Ae(e))return e;throw Oe(Pe(e)+" is not a function")},Re=Ie,Me=K,Le=function(e,t){var n=e[t];return Me(n)?void 0:Re(n)},De=R,Ne=S,Fe=ee,He=TypeError,Ue={exports:{}},je=r,Be=Object.defineProperty,Ve=function(e,t){try{Be(je,e,{value:t,configurable:!0,writable:!0})}catch(n){je[e]=t}return t},Ge="__core-js_shared__",ze=r[Ge]||Ve(Ge,{}),Ke=ze;(Ue.exports=function(e,t){return Ke[e]||(Ke[e]=void 0!==t?t:{})})("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 We=Ue.exports,Ye=X,Xe=Object,qe=function(e){return Xe(Ye(e))},Ze=qe,$e=g({}.hasOwnProperty),Je=Object.hasOwn||function(e,t){return $e(Ze(e),t)},Qe=g,et=0,tt=Math.random(),nt=Qe(1..toString),it=function(e){return"Symbol("+(void 0===e?"":e)+")_"+nt(++et+tt,36)},rt=We,ot=Je,at=it,st=_e,lt=be,ut=r.Symbol,ct=rt("wks"),ht=lt?ut.for||ut:ut&&ut.withoutSetter||at,ft=function(e){return ot(ct,e)||(ct[e]=st&&ot(ut,e)?ut[e]:ht("Symbol."+e)),ct[e]},dt=R,pt=ee,vt=xe,gt=Le,yt=function(e,t){var n,i;if("string"===t&&Ne(n=e.toString)&&!Fe(i=De(n,e)))return i;if(Ne(n=e.valueOf)&&!Fe(i=De(n,e)))return i;if("string"!==t&&Ne(n=e.toString)&&!Fe(i=De(n,e)))return i;throw He("Can't convert object to primitive value")},mt=TypeError,_t=ft("toPrimitive"),bt=function(e,t){if(!pt(e)||vt(e))return e;var n,i=gt(e,_t);if(i){if(void 0===t&&(t="default"),n=dt(i,e,t),!pt(n)||vt(n))return n;throw mt("Can't convert object to primitive value")}return void 0===t&&(t="number"),yt(e,t)},kt=xe,wt=function(e){var t=bt(e,"string");return kt(t)?t:t+""},Et=ee,Ct=r.document,xt=Et(Ct)&&Et(Ct.createElement),Tt=function(e){return xt?Ct.createElement(e):{}},St=Tt,At=!P&&!o((function(){return 7!=Object.defineProperty(St("div"),"a",{get:function(){return 7}}).a})),Pt=P,Ot=R,It=M,Rt=U,Mt=$,Lt=wt,Dt=Je,Nt=At,Ft=Object.getOwnPropertyDescriptor;A.f=Pt?Ft:function(e,t){if(e=Mt(e),t=Lt(t),Nt)try{return Ft(e,t)}catch(n){}if(Dt(e,t))return Rt(!Ot(It.f,e,t),e[t])};var Ht=o,Ut=S,jt=/#|\.prototype\./,Bt=function(e,t){var n=Gt[Vt(e)];return n==Kt||n!=zt&&(Ut(t)?Ht(t):!!t)},Vt=Bt.normalize=function(e){return String(e).replace(jt,".").toLowerCase()},Gt=Bt.data={},zt=Bt.NATIVE="N",Kt=Bt.POLYFILL="P",Wt=Bt,Yt=Ie,Xt=a,qt=E(E.bind),Zt=function(e,t){return Yt(e),void 0===t?e:Xt?qt(e,t):function(){return e.apply(t,arguments)}},$t={},Jt=P&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Qt=ee,en=String,tn=TypeError,nn=function(e){if(Qt(e))return e;throw tn(en(e)+" is not an object")},rn=P,on=At,an=Jt,sn=nn,ln=wt,un=TypeError,cn=Object.defineProperty,hn=Object.getOwnPropertyDescriptor,fn="enumerable",dn="configurable",pn="writable";$t.f=rn?an?function(e,t,n){if(sn(e),t=ln(t),sn(n),"function"==typeof e&&"prototype"===t&&"value"in n&&pn in n&&!n[pn]){var i=hn(e,t);i&&i[pn]&&(e[t]=n.value,n={configurable:dn in n?n[dn]:i[dn],enumerable:fn in n?n[fn]:i[fn],writable:!1})}return cn(e,t,n)}:cn:function(e,t,n){if(sn(e),t=ln(t),sn(n),on)try{return cn(e,t,n)}catch(i){}if("get"in n||"set"in n)throw un("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var vn=$t,gn=U,yn=P?function(e,t,n){return vn.f(e,t,gn(1,n))}:function(e,t,n){return e[t]=n,e},mn=r,_n=h,bn=E,kn=S,wn=A.f,En=Wt,Cn=te,xn=Zt,Tn=yn,Sn=Je,An=function(e){var t=function(n,i,r){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,i)}return new e(n,i,r)}return _n(e,this,arguments)};return t.prototype=e.prototype,t},Pn=function(e,t){var n,i,r,o,a,s,l,u,c,h=e.target,f=e.global,d=e.stat,p=e.proto,v=f?mn:d?mn[h]:(mn[h]||{}).prototype,g=f?Cn:Cn[h]||Tn(Cn,h,{})[h],y=g.prototype;for(o in t)i=!(n=En(f?o:h+(d?".":"#")+o,e.forced))&&v&&Sn(v,o),s=g[o],i&&(l=e.dontCallGetSet?(c=wn(v,o))&&c.value:v[o]),a=i&&l?l:t[o],i&&typeof s==typeof a||(u=e.bind&&i?xn(a,mn):e.wrap&&i?An(a):p&&kn(a)?bn(a):a,(e.sham||a&&a.sham||s&&s.sham)&&Tn(u,"sham",!0),Tn(g,o,u),p&&(Sn(Cn,r=h+"Prototype")||Tn(Cn,r,{}),Tn(Cn[r],o,a),e.real&&y&&(n||!y[o])&&Tn(y,o,a)))},On=b,In=Array.isArray||function(e){return"Array"==On(e)},Rn=Math.ceil,Mn=Math.floor,Ln=Math.trunc||function(e){var t=+e;return(t>0?Mn:Rn)(t)},Dn=function(e){var t=+e;return t!=t||0===t?0:Ln(t)},Nn=Dn,Fn=Math.min,Hn=function(e){return e>0?Fn(Nn(e),9007199254740991):0},Un=Hn,jn=function(e){return Un(e.length)},Bn=TypeError,Vn=function(e){if(e>9007199254740991)throw Bn("Maximum allowed index exceeded");return e},Gn=wt,zn=$t,Kn=U,Wn=function(e,t,n){var i=Gn(t);i in e?zn.f(e,i,Kn(0,n)):e[i]=n},Yn={};Yn[ft("toStringTag")]="z";var Xn="[object z]"===String(Yn),qn=Xn,Zn=S,$n=b,Jn=ft("toStringTag"),Qn=Object,ei="Arguments"==$n(function(){return arguments}()),ti=qn?$n:function(e){var t,n,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=Qn(e),Jn))?n:ei?$n(t):"Object"==(i=$n(t))&&Zn(t.callee)?"Arguments":i},ni=S,ii=ze,ri=g(Function.toString);ni(ii.inspectSource)||(ii.inspectSource=function(e){return ri(e)});var oi=ii.inspectSource,ai=g,si=o,li=S,ui=ti,ci=oi,hi=function(){},fi=[],di=ae("Reflect","construct"),pi=/^\s*(?:class|function)\b/,vi=ai(pi.exec),gi=!pi.exec(hi),yi=function(e){if(!li(e))return!1;try{return di(hi,fi,e),!0}catch(t){return!1}},mi=function(e){if(!li(e))return!1;switch(ui(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return gi||!!vi(pi,ci(e))}catch(t){return!0}};mi.sham=!0;var _i=!di||si((function(){var e;return yi(yi.call)||!yi(Object)||!yi((function(){e=!0}))||e}))?mi:yi,bi=In,ki=_i,wi=ee,Ei=ft("species"),Ci=Array,xi=function(e){var t;return bi(e)&&(t=e.constructor,(ki(t)&&(t===Ci||bi(t.prototype))||wi(t)&&null===(t=t[Ei]))&&(t=void 0)),void 0===t?Ci:t},Ti=function(e,t){return new(xi(e))(0===t?0:t)},Si=o,Ai=ve,Pi=ft("species"),Oi=function(e){return Ai>=51||!Si((function(){var t=[];return(t.constructor={})[Pi]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Ii=Pn,Ri=o,Mi=In,Li=ee,Di=qe,Ni=jn,Fi=Vn,Hi=Wn,Ui=Ti,ji=Oi,Bi=ve,Vi=ft("isConcatSpreadable"),Gi=Bi>=51||!Ri((function(){var e=[];return e[Vi]=!1,e.concat()[0]!==e})),zi=function(e){if(!Li(e))return!1;var t=e[Vi];return void 0!==t?!!t:Mi(e)};Ii({target:"Array",proto:!0,arity:1,forced:!Gi||!ji("concat")},{concat:function(e){var t,n,i,r,o,a=Di(this),s=Ui(a,0),l=0;for(t=-1,i=arguments.length;t<i;t++)if(zi(o=-1===t?a:arguments[t]))for(r=Ni(o),Fi(l+r),n=0;n<r;n++,l++)n in o&&Hi(s,l,o[n]);else Fi(l+1),Hi(s,l++,o);return s.length=l,s}});var Ki=ti,Wi=String,Yi=function(e){if("Symbol"===Ki(e))throw TypeError("Cannot convert a Symbol value to a string");return Wi(e)},Xi={},qi=Dn,Zi=Math.max,$i=Math.min,Ji=function(e,t){var n=qi(e);return n<0?Zi(n+t,0):$i(n,t)},Qi=$,er=Ji,tr=jn,nr=function(e){return function(t,n,i){var r,o=Qi(t),a=tr(o),s=er(i,a);if(e&&n!=n){for(;a>s;)if((r=o[s++])!=r)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}},ir={includes:nr(!0),indexOf:nr(!1)},rr={},or=Je,ar=$,sr=ir.indexOf,lr=rr,ur=g([].push),cr=function(e,t){var n,i=ar(e),r=0,o=[];for(n in i)!or(lr,n)&&or(i,n)&&ur(o,n);for(;t.length>r;)or(i,n=t[r++])&&(~sr(o,n)||ur(o,n));return o},hr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],fr=cr,dr=hr,pr=Object.keys||function(e){return fr(e,dr)},vr=P,gr=Jt,yr=$t,mr=nn,_r=$,br=pr;Xi.f=vr&&!gr?Object.defineProperties:function(e,t){mr(e);for(var n,i=_r(t),r=br(t),o=r.length,a=0;o>a;)yr.f(e,n=r[a++],i[n]);return e};var kr,wr=ae("document","documentElement"),Er=it,Cr=We("keys"),xr=function(e){return Cr[e]||(Cr[e]=Er(e))},Tr=nn,Sr=Xi,Ar=hr,Pr=rr,Or=wr,Ir=Tt,Rr="prototype",Mr="script",Lr=xr("IE_PROTO"),Dr=function(){},Nr=function(e){return"<"+Mr+">"+e+"</"+Mr+">"},Fr=function(e){e.write(Nr("")),e.close();var t=e.parentWindow.Object;return e=null,t},Hr=function(){try{kr=new ActiveXObject("htmlfile")}catch(r){}var e,t,n;Hr="undefined"!=typeof document?document.domain&&kr?Fr(kr):(t=Ir("iframe"),n="java"+Mr+":",t.style.display="none",Or.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Nr("document.F=Object")),e.close(),e.F):Fr(kr);for(var i=Ar.length;i--;)delete Hr[Rr][Ar[i]];return Hr()};Pr[Lr]=!0;var Ur=Object.create||function(e,t){var n;return null!==e?(Dr[Rr]=Tr(e),n=new Dr,Dr[Rr]=null,n[Lr]=e):n=Hr(),void 0===t?n:Sr.f(n,t)},jr={},Br=cr,Vr=hr.concat("length","prototype");jr.f=Object.getOwnPropertyNames||function(e){return Br(e,Vr)};var Gr={},zr=Ji,Kr=jn,Wr=Wn,Yr=Array,Xr=Math.max,qr=function(e,t,n){for(var i=Kr(e),r=zr(t,i),o=zr(void 0===n?i:n,i),a=Yr(Xr(o-r,0)),s=0;r<o;r++,s++)Wr(a,s,e[r]);return a.length=s,a},Zr=b,$r=$,Jr=jr.f,Qr=qr,eo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Gr.f=function(e){return eo&&"Window"==Zr(e)?function(e){try{return Jr(e)}catch(t){return Qr(eo)}}(e):Jr($r(e))};var to={};to.f=Object.getOwnPropertySymbols;var no=yn,io=function(e,t,n,i){return i&&i.enumerable?e[t]=n:no(e,t,n),e},ro=$t,oo=function(e,t,n){return ro.f(e,t,n)},ao={},so=ft;ao.f=so;var lo,uo,co,ho=te,fo=Je,po=ao,vo=$t.f,go=function(e){var t=ho.Symbol||(ho.Symbol={});fo(t,e)||vo(t,e,{value:po.f(e)})},yo=R,mo=ae,_o=ft,bo=io,ko=function(){var e=mo("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,i=_o("toPrimitive");t&&!t[i]&&bo(t,i,(function(e){return yo(n,this)}),{arity:1})},wo=ti,Eo=Xn?{}.toString:function(){return"[object "+wo(this)+"]"},Co=Xn,xo=$t.f,To=yn,So=Je,Ao=Eo,Po=ft("toStringTag"),Oo=function(e,t,n,i){if(e){var r=n?e:e.prototype;So(r,Po)||xo(r,Po,{configurable:!0,value:t}),i&&!Co&&To(r,"toString",Ao)}},Io=S,Ro=r.WeakMap,Mo=Io(Ro)&&/native code/.test(String(Ro)),Lo=r,Do=ee,No=yn,Fo=Je,Ho=ze,Uo=xr,jo=rr,Bo="Object already initialized",Vo=Lo.TypeError,Go=Lo.WeakMap;if(Mo||Ho.state){var zo=Ho.state||(Ho.state=new Go);zo.get=zo.get,zo.has=zo.has,zo.set=zo.set,lo=function(e,t){if(zo.has(e))throw Vo(Bo);return t.facade=e,zo.set(e,t),t},uo=function(e){return zo.get(e)||{}},co=function(e){return zo.has(e)}}else{var Ko=Uo("state");jo[Ko]=!0,lo=function(e,t){if(Fo(e,Ko))throw Vo(Bo);return t.facade=e,No(e,Ko,t),t},uo=function(e){return Fo(e,Ko)?e[Ko]:{}},co=function(e){return Fo(e,Ko)}}var Wo={set:lo,get:uo,has:co,enforce:function(e){return co(e)?uo(e):lo(e,{})},getterFor:function(e){return function(t){var n;if(!Do(t)||(n=uo(t)).type!==e)throw Vo("Incompatible receiver, "+e+" required");return n}}},Yo=Zt,Xo=z,qo=qe,Zo=jn,$o=Ti,Jo=g([].push),Qo=function(e){var t=1==e,n=2==e,i=3==e,r=4==e,o=6==e,a=7==e,s=5==e||o;return function(l,u,c,h){for(var f,d,p=qo(l),v=Xo(p),g=Yo(u,c),y=Zo(v),m=0,_=h||$o,b=t?_(l,y):n||a?_(l,0):void 0;y>m;m++)if((s||m in v)&&(d=g(f=v[m],m,p),e))if(t)b[m]=d;else if(d)switch(e){case 3:return!0;case 5:return f;case 6:return m;case 2:Jo(b,f)}else switch(e){case 4:return!1;case 7:Jo(b,f)}return o?-1:i||r?r:b}},ea={forEach:Qo(0),map:Qo(1),filter:Qo(2),some:Qo(3),every:Qo(4),find:Qo(5),findIndex:Qo(6),filterReject:Qo(7)},ta=Pn,na=r,ia=R,ra=g,oa=P,aa=_e,sa=o,la=Je,ua=se,ca=nn,ha=$,fa=wt,da=Yi,pa=U,va=Ur,ga=pr,ya=jr,ma=Gr,_a=to,ba=A,ka=$t,wa=Xi,Ea=M,Ca=io,xa=oo,Ta=We,Sa=rr,Aa=it,Pa=ft,Oa=ao,Ia=go,Ra=ko,Ma=Oo,La=Wo,Da=ea.forEach,Na=xr("hidden"),Fa="Symbol",Ha="prototype",Ua=La.set,ja=La.getterFor(Fa),Ba=Object[Ha],Va=na.Symbol,Ga=Va&&Va[Ha],za=na.TypeError,Ka=na.QObject,Wa=ba.f,Ya=ka.f,Xa=ma.f,qa=Ea.f,Za=ra([].push),$a=Ta("symbols"),Ja=Ta("op-symbols"),Qa=Ta("wks"),es=!Ka||!Ka[Ha]||!Ka[Ha].findChild,ts=oa&&sa((function(){return 7!=va(Ya({},"a",{get:function(){return Ya(this,"a",{value:7}).a}})).a}))?function(e,t,n){var i=Wa(Ba,t);i&&delete Ba[t],Ya(e,t,n),i&&e!==Ba&&Ya(Ba,t,i)}:Ya,ns=function(e,t){var n=$a[e]=va(Ga);return Ua(n,{type:Fa,tag:e,description:t}),oa||(n.description=t),n},is=function(e,t,n){e===Ba&&is(Ja,t,n),ca(e);var i=fa(t);return ca(n),la($a,i)?(n.enumerable?(la(e,Na)&&e[Na][i]&&(e[Na][i]=!1),n=va(n,{enumerable:pa(0,!1)})):(la(e,Na)||Ya(e,Na,pa(1,{})),e[Na][i]=!0),ts(e,i,n)):Ya(e,i,n)},rs=function(e,t){ca(e);var n=ha(t),i=ga(n).concat(ls(n));return Da(i,(function(t){oa&&!ia(os,n,t)||is(e,t,n[t])})),e},os=function(e){var t=fa(e),n=ia(qa,this,t);return!(this===Ba&&la($a,t)&&!la(Ja,t))&&(!(n||!la(this,t)||!la($a,t)||la(this,Na)&&this[Na][t])||n)},as=function(e,t){var n=ha(e),i=fa(t);if(n!==Ba||!la($a,i)||la(Ja,i)){var r=Wa(n,i);return!r||!la($a,i)||la(n,Na)&&n[Na][i]||(r.enumerable=!0),r}},ss=function(e){var t=Xa(ha(e)),n=[];return Da(t,(function(e){la($a,e)||la(Sa,e)||Za(n,e)})),n},ls=function(e){var t=e===Ba,n=Xa(t?Ja:ha(e)),i=[];return Da(n,(function(e){!la($a,e)||t&&!la(Ba,e)||Za(i,$a[e])})),i};aa||(Va=function(){if(ua(Ga,this))throw za("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?da(arguments[0]):void 0,t=Aa(e),n=function(e){this===Ba&&ia(n,Ja,e),la(this,Na)&&la(this[Na],t)&&(this[Na][t]=!1),ts(this,t,pa(1,e))};return oa&&es&&ts(Ba,t,{configurable:!0,set:n}),ns(t,e)},Ca(Ga=Va[Ha],"toString",(function(){return ja(this).tag})),Ca(Va,"withoutSetter",(function(e){return ns(Aa(e),e)})),Ea.f=os,ka.f=is,wa.f=rs,ba.f=as,ya.f=ma.f=ss,_a.f=ls,Oa.f=function(e){return ns(Pa(e),e)},oa&&xa(Ga,"description",{configurable:!0,get:function(){return ja(this).description}})),ta({global:!0,constructor:!0,wrap:!0,forced:!aa,sham:!aa},{Symbol:Va}),Da(ga(Qa),(function(e){Ia(e)})),ta({target:Fa,stat:!0,forced:!aa},{useSetter:function(){es=!0},useSimple:function(){es=!1}}),ta({target:"Object",stat:!0,forced:!aa,sham:!oa},{create:function(e,t){return void 0===t?va(e):rs(va(e),t)},defineProperty:is,defineProperties:rs,getOwnPropertyDescriptor:as}),ta({target:"Object",stat:!0,forced:!aa},{getOwnPropertyNames:ss}),Ra(),Ma(Va,Fa),Sa[Na]=!0;var us=_e&&!!Symbol.for&&!!Symbol.keyFor,cs=Pn,hs=ae,fs=Je,ds=Yi,ps=We,vs=us,gs=ps("string-to-symbol-registry"),ys=ps("symbol-to-string-registry");cs({target:"Symbol",stat:!0,forced:!vs},{for:function(e){var t=ds(e);if(fs(gs,t))return gs[t];var n=hs("Symbol")(t);return gs[t]=n,ys[n]=t,n}});var ms=Pn,_s=Je,bs=xe,ks=Se,ws=us,Es=We("symbol-to-string-registry");ms({target:"Symbol",stat:!0,forced:!ws},{keyFor:function(e){if(!bs(e))throw TypeError(ks(e)+" is not a symbol");if(_s(Es,e))return Es[e]}});var Cs=g([].slice),xs=In,Ts=S,Ss=b,As=Yi,Ps=g([].push),Os=Pn,Is=ae,Rs=h,Ms=R,Ls=g,Ds=o,Ns=S,Fs=xe,Hs=Cs,Us=function(e){if(Ts(e))return e;if(xs(e)){for(var t=e.length,n=[],i=0;i<t;i++){var r=e[i];"string"==typeof r?Ps(n,r):"number"!=typeof r&&"Number"!=Ss(r)&&"String"!=Ss(r)||Ps(n,As(r))}var o=n.length,a=!0;return function(e,t){if(a)return a=!1,t;if(xs(this))return t;for(var i=0;i<o;i++)if(n[i]===e)return t}}},js=_e,Bs=String,Vs=Is("JSON","stringify"),Gs=Ls(/./.exec),zs=Ls("".charAt),Ks=Ls("".charCodeAt),Ws=Ls("".replace),Ys=Ls(1..toString),Xs=/[\uD800-\uDFFF]/g,qs=/^[\uD800-\uDBFF]$/,Zs=/^[\uDC00-\uDFFF]$/,$s=!js||Ds((function(){var e=Is("Symbol")();return"[null]"!=Vs([e])||"{}"!=Vs({a:e})||"{}"!=Vs(Object(e))})),Js=Ds((function(){return'"\\udf06\\ud834"'!==Vs("\udf06\ud834")||'"\\udead"'!==Vs("\udead")})),Qs=function(e,t){var n=Hs(arguments),i=Us(t);if(Ns(i)||void 0!==e&&!Fs(e))return n[1]=function(e,t){if(Ns(i)&&(t=Ms(i,this,Bs(e),t)),!Fs(t))return t},Rs(Vs,null,n)},el=function(e,t,n){var i=zs(n,t-1),r=zs(n,t+1);return Gs(qs,e)&&!Gs(Zs,r)||Gs(Zs,e)&&!Gs(qs,i)?"\\u"+Ys(Ks(e,0),16):e};Vs&&Os({target:"JSON",stat:!0,arity:3,forced:$s||Js},{stringify:function(e,t,n){var i=Hs(arguments),r=Rs($s?Qs:Vs,null,i);return Js&&"string"==typeof r?Ws(r,Xs,el):r}});var tl=to,nl=qe;Pn({target:"Object",stat:!0,forced:!_e||o((function(){tl.f(1)}))},{getOwnPropertySymbols:function(e){var t=tl.f;return t?t(nl(e)):[]}}),go("asyncIterator"),go("hasInstance"),go("isConcatSpreadable"),go("iterator"),go("match"),go("matchAll"),go("replace"),go("search"),go("species"),go("split");var il=ko;go("toPrimitive"),il();var rl=ae,ol=Oo;go("toStringTag"),ol(rl("Symbol"),"Symbol"),go("unscopables"),Oo(r.JSON,"JSON",!0);var al,sl,ll,ul=te.Symbol,cl={},hl=P,fl=Je,dl=Function.prototype,pl=hl&&Object.getOwnPropertyDescriptor,vl=fl(dl,"name"),gl={EXISTS:vl,PROPER:vl&&"something"===function(){}.name,CONFIGURABLE:vl&&(!hl||hl&&pl(dl,"name").configurable)},yl=!o((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),ml=Je,_l=S,bl=qe,kl=yl,wl=xr("IE_PROTO"),El=Object,Cl=El.prototype,xl=kl?El.getPrototypeOf:function(e){var t=bl(e);if(ml(t,wl))return t[wl];var n=t.constructor;return _l(n)&&t instanceof n?n.prototype:t instanceof El?Cl:null},Tl=o,Sl=S,Al=ee,Pl=Ur,Ol=xl,Il=io,Rl=ft("iterator"),Ml=!1;[].keys&&("next"in(ll=[].keys())?(sl=Ol(Ol(ll)))!==Object.prototype&&(al=sl):Ml=!0);var Ll=!Al(al)||Tl((function(){var e={};return al[Rl].call(e)!==e}));Sl((al=Ll?{}:Pl(al))[Rl])||Il(al,Rl,(function(){return this}));var Dl={IteratorPrototype:al,BUGGY_SAFARI_ITERATORS:Ml},Nl=Dl.IteratorPrototype,Fl=Ur,Hl=U,Ul=Oo,jl=cl,Bl=function(){return this},Vl=g,Gl=Ie,zl=S,Kl=String,Wl=TypeError,Yl=function(e,t,n){try{return Vl(Gl(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(i){}},Xl=nn,ql=function(e){if("object"==typeof e||zl(e))return e;throw Wl("Can't set "+Kl(e)+" as a prototype")},Zl=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Yl(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(i){}return function(n,i){return Xl(n),ql(i),t?e(n,i):n.__proto__=i,n}}():void 0),$l=Pn,Jl=R,Ql=gl,eu=function(e,t,n,i){var r=t+" Iterator";return e.prototype=Fl(Nl,{next:Hl(+!i,n)}),Ul(e,r,!1,!0),jl[r]=Bl,e},tu=xl,nu=Oo,iu=io,ru=cl,ou=Dl,au=Ql.PROPER,su=ou.BUGGY_SAFARI_ITERATORS,lu=ft("iterator"),uu="keys",cu="values",hu="entries",fu=function(){return this},du=function(e,t,n,i,r,o,a){eu(n,t,i);var s,l,u,c=function(e){if(e===r&&v)return v;if(!su&&e in d)return d[e];switch(e){case uu:case cu:case hu:return function(){return new n(this,e)}}return function(){return new n(this)}},h=t+" Iterator",f=!1,d=e.prototype,p=d[lu]||d["@@iterator"]||r&&d[r],v=!su&&p||c(r),g="Array"==t&&d.entries||p;if(g&&(s=tu(g.call(new e)))!==Object.prototype&&s.next&&(nu(s,h,!0,!0),ru[h]=fu),au&&r==cu&&p&&p.name!==cu&&(f=!0,v=function(){return Jl(p,this)}),r)if(l={values:c(cu),keys:o?v:c(uu),entries:c(hu)},a)for(u in l)(su||f||!(u in d))&&iu(d,u,l[u]);else $l({target:t,proto:!0,forced:su||f},l);return a&&d[lu]!==v&&iu(d,lu,v,{name:r}),ru[t]=v,l},pu=function(e,t){return{value:e,done:t}},vu=$,gu=cl,yu=Wo;$t.f;var mu=du,_u=pu,bu="Array Iterator",ku=yu.set,wu=yu.getterFor(bu);mu(Array,"Array",(function(e,t){ku(this,{type:bu,target:vu(e),index:0,kind:t})}),(function(){var e=wu(this),t=e.target,n=e.kind,i=e.index++;return!t||i>=t.length?(e.target=void 0,_u(void 0,!0)):_u("keys"==n?i:"values"==n?t[i]:[i,t[i]],!1)}),"values"),gu.Arguments=gu.Array;var Eu={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},Cu=r,xu=ti,Tu=yn,Su=cl,Au=ft("toStringTag");for(var Pu in Eu){var Ou=Cu[Pu],Iu=Ou&&Ou.prototype;Iu&&xu(Iu)!==Au&&Tu(Iu,Au,Pu),Su[Pu]=Su.Array}var Ru=ul;go("dispose");var Mu=Ru;go("asyncDispose");var Lu=Pn,Du=g,Nu=ae("Symbol"),Fu=Nu.keyFor,Hu=Du(Nu.prototype.valueOf);Lu({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==Fu(Hu(e))}catch(t){return!1}}});for(var Uu=Pn,ju=We,Bu=ae,Vu=g,Gu=xe,zu=ft,Ku=Bu("Symbol"),Wu=Ku.isWellKnown,Yu=Bu("Object","getOwnPropertyNames"),Xu=Vu(Ku.prototype.valueOf),qu=ju("wks"),Zu=0,$u=Yu(Ku),Ju=$u.length;Zu<Ju;Zu++)try{var Qu=$u[Zu];Gu(Ku[Qu])&&zu(Qu)}catch(CR){}Uu({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if(Wu&&Wu(e))return!0;try{for(var t=Xu(e),n=0,i=Yu(qu),r=i.length;n<r;n++)if(qu[i[n]]==t)return!0}catch(CR){}return!1}}),go("matcher"),go("metadataKey"),go("observable"),go("metadata"),go("patternMatch"),go("replaceAll");var ec=Mu,tc=n(ec),nc=g,ic=Dn,rc=Yi,oc=X,ac=nc("".charAt),sc=nc("".charCodeAt),lc=nc("".slice),uc=function(e){return function(t,n){var i,r,o=rc(oc(t)),a=ic(n),s=o.length;return a<0||a>=s?e?"":void 0:(i=sc(o,a))<55296||i>56319||a+1===s||(r=sc(o,a+1))<56320||r>57343?e?ac(o,a):i:e?lc(o,a,a+2):r-56320+(i-55296<<10)+65536}},cc={codeAt:uc(!1),charAt:uc(!0)}.charAt,hc=Yi,fc=Wo,dc=du,pc=pu,vc="String Iterator",gc=fc.set,yc=fc.getterFor(vc);dc(String,"String",(function(e){gc(this,{type:vc,string:hc(e),index:0})}),(function(){var e,t=yc(this),n=t.string,i=t.index;return i>=n.length?pc(void 0,!0):(e=cc(n,i),t.index+=e.length,pc(e,!1))}));var mc=ao.f("iterator"),_c=n(mc);function bc(e){return(bc="function"==typeof tc&&"symbol"==typeof _c?function(e){return typeof e}:function(e){return e&&"function"==typeof tc&&e.constructor===tc&&e!==tc.prototype?"symbol":typeof e})(e)}var kc={exports:{}},wc=Pn,Ec=P,Cc=$t.f;wc({target:"Object",stat:!0,forced:Object.defineProperty!==Cc,sham:!Ec},{defineProperty:Cc});var xc=te.Object,Tc=kc.exports=function(e,t,n){return xc.defineProperty(e,t,n)};xc.defineProperty.sham&&(Tc.sham=!0);var Sc=kc.exports,Ac=n(Sc);Pn({target:"Object",stat:!0,sham:!P},{create:Ur});var Pc=te.Object,Oc=n((function(e,t){return Pc.create(e,t)})),Ic=qe,Rc=xl,Mc=yl;Pn({target:"Object",stat:!0,forced:o((function(){Rc(1)})),sham:!Mc},{getPrototypeOf:function(e){return Rc(Ic(e))}});var Lc=te.Object.getPrototypeOf,Dc=n(Lc),Nc=o,Fc=function(e,t){var n=[][e];return!!n&&Nc((function(){n.call(null,t||function(){return 1},1)}))},Hc=ea.forEach,Uc=Fc("forEach")?[].forEach:function(e){return Hc(this,e,arguments.length>1?arguments[1]:void 0)};Pn({target:"Array",proto:!0,forced:[].forEach!=Uc},{forEach:Uc});var jc=te,Bc=function(e){return jc[e+"Prototype"]},Vc=Bc("Array").forEach,Gc=ti,zc=Je,Kc=se,Wc=Vc,Yc=Array.prototype,Xc={DOMTokenList:!0,NodeList:!0},qc=n((function(e){var t=e.forEach;return e===Yc||Kc(Yc,e)&&t===Yc.forEach||zc(Xc,Gc(e))?Wc:t})),Zc=P,$c=In,Jc=TypeError,Qc=Object.getOwnPropertyDescriptor,eh=Zc&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(CR){return CR instanceof TypeError}}()?function(e,t){if($c(e)&&!Qc(e,"length").writable)throw Jc("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},th=qe,nh=jn,ih=eh,rh=Vn;Pn({target:"Array",proto:!0,arity:1,forced:o((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(CR){return CR instanceof TypeError}}()},{push:function(e){var t=th(this),n=nh(t),i=arguments.length;rh(n+i);for(var r=0;r<i;r++)t[n]=arguments[r],n++;return ih(t,n),n}});var oh=Bc("Array").push,ah=se,sh=oh,lh=Array.prototype,uh=n((function(e){var t=e.push;return e===lh||ah(lh,e)&&t===lh.push?sh:t}));Pn({target:"Object",stat:!0},{setPrototypeOf:Zl});var ch=te.Object.setPrototypeOf,hh=n(ch),fh=ae,dh=jr,ph=to,vh=nn,gh=g([].concat),yh=fh("Reflect","ownKeys")||function(e){var t=dh.f(vh(e)),n=ph.f;return n?gh(t,n(e)):t},mh=Je,_h=yh,bh=A,kh=$t,wh=ee,Eh=yn,Ch=Error,xh=g("".replace),Th=String(Ch("zxcasd").stack),Sh=/\n\s*at [^:]*:[^\n]*/,Ah=Sh.test(Th),Ph=U,Oh=!o((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Ph(1,7)),7!==e.stack)})),Ih=yn,Rh=function(e,t){if(Ah&&"string"==typeof e&&!Ch.prepareStackTrace)for(;t--;)e=xh(e,Sh,"");return e},Mh=Oh,Lh=Error.captureStackTrace,Dh=cl,Nh=ft("iterator"),Fh=Array.prototype,Hh=function(e){return void 0!==e&&(Dh.Array===e||Fh[Nh]===e)},Uh=ti,jh=Le,Bh=K,Vh=cl,Gh=ft("iterator"),zh=function(e){if(!Bh(e))return jh(e,Gh)||jh(e,"@@iterator")||Vh[Uh(e)]},Kh=R,Wh=Ie,Yh=nn,Xh=Se,qh=zh,Zh=TypeError,$h=function(e,t){var n=arguments.length<2?qh(e):t;if(Wh(n))return Yh(Kh(n,e));throw Zh(Xh(e)+" is not iterable")},Jh=R,Qh=nn,ef=Le,tf=function(e,t,n){var i,r;Qh(e);try{if(!(i=ef(e,"return"))){if("throw"===t)throw n;return n}i=Jh(i,e)}catch(CR){r=!0,i=CR}if("throw"===t)throw n;if(r)throw i;return Qh(i),n},nf=Zt,rf=R,of=nn,af=Se,sf=Hh,lf=jn,uf=se,cf=$h,hf=zh,ff=tf,df=TypeError,pf=function(e,t){this.stopped=e,this.result=t},vf=pf.prototype,gf=function(e,t,n){var i,r,o,a,s,l,u,c=n&&n.that,h=!(!n||!n.AS_ENTRIES),f=!(!n||!n.IS_RECORD),d=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),v=nf(t,c),g=function(e){return i&&ff(i,"normal",e),new pf(!0,e)},y=function(e){return h?(of(e),p?v(e[0],e[1],g):v(e[0],e[1])):p?v(e,g):v(e)};if(f)i=e.iterator;else if(d)i=e;else{if(!(r=hf(e)))throw df(af(e)+" is not iterable");if(sf(r)){for(o=0,a=lf(e);a>o;o++)if((s=y(e[o]))&&uf(vf,s))return s;return new pf(!1)}i=cf(e,r)}for(l=f?e.next:i.next;!(u=rf(l,i)).done;){try{s=y(u.value)}catch(CR){ff(i,"throw",CR)}if("object"==typeof s&&s&&uf(vf,s))return s}return new pf(!1)},yf=Yi,mf=Pn,_f=se,bf=xl,kf=Zl,wf=function(e,t,n){for(var i=_h(t),r=kh.f,o=bh.f,a=0;a<i.length;a++){var s=i[a];mh(e,s)||n&&mh(n,s)||r(e,s,o(t,s))}},Ef=Ur,Cf=yn,xf=U,Tf=function(e,t){wh(t)&&"cause"in t&&Eh(e,"cause",t.cause)},Sf=function(e,t,n,i){Mh&&(Lh?Lh(e,t):Ih(e,"stack",Rh(n,i)))},Af=gf,Pf=function(e,t){return void 0===e?arguments.length<2?"":t:yf(e)},Of=ft("toStringTag"),If=Error,Rf=[].push,Mf=function(e,t){var n,i=_f(Lf,this);kf?n=kf(If(),i?bf(this):Lf):(n=i?this:Ef(Lf),Cf(n,Of,"Error")),void 0!==t&&Cf(n,"message",Pf(t)),Sf(n,Mf,n.stack,1),arguments.length>2&&Tf(n,arguments[2]);var r=[];return Af(e,Rf,{that:r}),Cf(n,"errors",r),n};kf?kf(Mf,If):wf(Mf,If,{name:!0});var Lf=Mf.prototype=Ef(If.prototype,{constructor:xf(1,Mf),message:xf(1,""),name:xf(1,"AggregateError")});mf({global:!0,constructor:!0,arity:2},{AggregateError:Mf});var Df,Nf,Ff,Hf,Uf="undefined"!=typeof process&&"process"==b(process),jf=ae,Bf=oo,Vf=P,Gf=ft("species"),zf=function(e){var t=jf(e);Vf&&t&&!t[Gf]&&Bf(t,Gf,{configurable:!0,get:function(){return this}})},Kf=se,Wf=TypeError,Yf=function(e,t){if(Kf(t,e))return e;throw Wf("Incorrect invocation")},Xf=_i,qf=Se,Zf=TypeError,$f=function(e){if(Xf(e))return e;throw Zf(qf(e)+" is not a constructor")},Jf=nn,Qf=$f,ed=K,td=ft("species"),nd=function(e,t){var n,i=Jf(e).constructor;return void 0===i||ed(n=Jf(i)[td])?t:Qf(n)},id=TypeError,rd=/(?:ipad|iphone|ipod).*applewebkit/i.test(le),od=r,ad=h,sd=Zt,ld=S,ud=Je,cd=o,hd=wr,fd=Cs,dd=Tt,pd=function(e,t){if(e<t)throw id("Not enough arguments");return e},vd=rd,gd=Uf,yd=od.setImmediate,md=od.clearImmediate,_d=od.process,bd=od.Dispatch,kd=od.Function,wd=od.MessageChannel,Ed=od.String,Cd=0,xd={},Td="onreadystatechange";cd((function(){Df=od.location}));var Sd=function(e){if(ud(xd,e)){var t=xd[e];delete xd[e],t()}},Ad=function(e){return function(){Sd(e)}},Pd=function(e){Sd(e.data)},Od=function(e){od.postMessage(Ed(e),Df.protocol+"//"+Df.host)};yd&&md||(yd=function(e){pd(arguments.length,1);var t=ld(e)?e:kd(e),n=fd(arguments,1);return xd[++Cd]=function(){ad(t,void 0,n)},Nf(Cd),Cd},md=function(e){delete xd[e]},gd?Nf=function(e){_d.nextTick(Ad(e))}:bd&&bd.now?Nf=function(e){bd.now(Ad(e))}:wd&&!vd?(Hf=(Ff=new wd).port2,Ff.port1.onmessage=Pd,Nf=sd(Hf.postMessage,Hf)):od.addEventListener&&ld(od.postMessage)&&!od.importScripts&&Df&&"file:"!==Df.protocol&&!cd(Od)?(Nf=Od,od.addEventListener("message",Pd,!1)):Nf=Td in dd("script")?function(e){hd.appendChild(dd("script"))[Td]=function(){hd.removeChild(this),Sd(e)}}:function(e){setTimeout(Ad(e),0)});var Id={set:yd,clear:md},Rd=function(){this.head=null,this.tail=null};Rd.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var Md,Ld,Dd,Nd,Fd,Hd=Rd,Ud=/ipad|iphone|ipod/i.test(le)&&"undefined"!=typeof Pebble,jd=/web0s(?!.*chrome)/i.test(le),Bd=r,Vd=Zt,Gd=A.f,zd=Id.set,Kd=Hd,Wd=rd,Yd=Ud,Xd=jd,qd=Uf,Zd=Bd.MutationObserver||Bd.WebKitMutationObserver,$d=Bd.document,Jd=Bd.process,Qd=Bd.Promise,ep=Gd(Bd,"queueMicrotask"),tp=ep&&ep.value;if(!tp){var np=new Kd,ip=function(){var e,t;for(qd&&(e=Jd.domain)&&e.exit();t=np.get();)try{t()}catch(CR){throw np.head&&Md(),CR}e&&e.enter()};Wd||qd||Xd||!Zd||!$d?!Yd&&Qd&&Qd.resolve?((Nd=Qd.resolve(void 0)).constructor=Qd,Fd=Vd(Nd.then,Nd),Md=function(){Fd(ip)}):qd?Md=function(){Jd.nextTick(ip)}:(zd=Vd(zd,Bd),Md=function(){zd(ip)}):(Ld=!0,Dd=$d.createTextNode(""),new Zd(ip).observe(Dd,{characterData:!0}),Md=function(){Dd.data=Ld=!Ld}),tp=function(e){np.head||Md(),np.add(e)}}var rp=tp,op=function(e){try{return{error:!1,value:e()}}catch(CR){return{error:!0,value:CR}}},ap=r.Promise,sp="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,lp=!sp&&!Uf&&"object"==typeof window&&"object"==typeof document,up=r,cp=ap,hp=S,fp=Wt,dp=oi,pp=ft,vp=lp,gp=sp,yp=ve,mp=cp&&cp.prototype,_p=pp("species"),bp=!1,kp=hp(up.PromiseRejectionEvent),wp={CONSTRUCTOR:fp("Promise",(function(){var e=dp(cp),t=e!==String(cp);if(!t&&66===yp)return!0;if(!mp.catch||!mp.finally)return!0;if(!yp||yp<51||!/native code/.test(e)){var n=new cp((function(e){e(1)})),i=function(e){e((function(){}),(function(){}))};if((n.constructor={})[_p]=i,!(bp=n.then((function(){}))instanceof i))return!0}return!t&&(vp||gp)&&!kp})),REJECTION_EVENT:kp,SUBCLASSING:bp},Ep={},Cp=Ie,xp=TypeError,Tp=function(e){var t,n;this.promise=new e((function(e,i){if(void 0!==t||void 0!==n)throw xp("Bad Promise constructor");t=e,n=i})),this.resolve=Cp(t),this.reject=Cp(n)};Ep.f=function(e){return new Tp(e)};var Sp,Ap,Pp=Pn,Op=Uf,Ip=r,Rp=R,Mp=io,Lp=Oo,Dp=zf,Np=Ie,Fp=S,Hp=ee,Up=Yf,jp=nd,Bp=Id.set,Vp=rp,Gp=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(CR){}},zp=op,Kp=Hd,Wp=Wo,Yp=ap,Xp=wp,qp=Ep,Zp="Promise",$p=Xp.CONSTRUCTOR,Jp=Xp.REJECTION_EVENT,Qp=Wp.getterFor(Zp),ev=Wp.set,tv=Yp&&Yp.prototype,nv=Yp,iv=tv,rv=Ip.TypeError,ov=Ip.document,av=Ip.process,sv=qp.f,lv=sv,uv=!!(ov&&ov.createEvent&&Ip.dispatchEvent),cv="unhandledrejection",hv=function(e){var t;return!(!Hp(e)||!Fp(t=e.then))&&t},fv=function(e,t){var n,i,r,o=t.value,a=1==t.state,s=a?e.ok:e.fail,l=e.resolve,u=e.reject,c=e.domain;try{s?(a||(2===t.rejection&&yv(t),t.rejection=1),!0===s?n=o:(c&&c.enter(),n=s(o),c&&(c.exit(),r=!0)),n===e.promise?u(rv("Promise-chain cycle")):(i=hv(n))?Rp(i,n,l,u):l(n)):u(o)}catch(CR){c&&!r&&c.exit(),u(CR)}},dv=function(e,t){e.notified||(e.notified=!0,Vp((function(){for(var n,i=e.reactions;n=i.get();)fv(n,e);e.notified=!1,t&&!e.rejection&&vv(e)})))},pv=function(e,t,n){var i,r;uv?((i=ov.createEvent("Event")).promise=t,i.reason=n,i.initEvent(e,!1,!0),Ip.dispatchEvent(i)):i={promise:t,reason:n},!Jp&&(r=Ip["on"+e])?r(i):e===cv&&Gp("Unhandled promise rejection",n)},vv=function(e){Rp(Bp,Ip,(function(){var t,n=e.facade,i=e.value;if(gv(e)&&(t=zp((function(){Op?av.emit("unhandledRejection",i,n):pv(cv,n,i)})),e.rejection=Op||gv(e)?2:1,t.error))throw t.value}))},gv=function(e){return 1!==e.rejection&&!e.parent},yv=function(e){Rp(Bp,Ip,(function(){var t=e.facade;Op?av.emit("rejectionHandled",t):pv("rejectionhandled",t,e.value)}))},mv=function(e,t,n){return function(i){e(t,i,n)}},_v=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,dv(e,!0))},bv=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw rv("Promise can't be resolved itself");var i=hv(t);i?Vp((function(){var n={done:!1};try{Rp(i,t,mv(bv,n,e),mv(_v,n,e))}catch(CR){_v(n,CR,e)}})):(e.value=t,e.state=1,dv(e,!1))}catch(CR){_v({done:!1},CR,e)}}};$p&&(iv=(nv=function(e){Up(this,iv),Np(e),Rp(Sp,this);var t=Qp(this);try{e(mv(bv,t),mv(_v,t))}catch(CR){_v(t,CR)}}).prototype,(Sp=function(e){ev(this,{type:Zp,done:!1,notified:!1,parent:!1,reactions:new Kp,rejection:!1,state:0,value:void 0})}).prototype=Mp(iv,"then",(function(e,t){var n=Qp(this),i=sv(jp(this,nv));return n.parent=!0,i.ok=!Fp(e)||e,i.fail=Fp(t)&&t,i.domain=Op?av.domain:void 0,0==n.state?n.reactions.add(i):Vp((function(){fv(i,n)})),i.promise})),Ap=function(){var e=new Sp,t=Qp(e);this.promise=e,this.resolve=mv(bv,t),this.reject=mv(_v,t)},qp.f=sv=function(e){return e===nv||undefined===e?new Ap(e):lv(e)}),Pp({global:!0,constructor:!0,wrap:!0,forced:$p},{Promise:nv}),Lp(nv,Zp,!1,!0),Dp(Zp);var kv=ft("iterator"),wv=!1;try{var Ev=0,Cv={next:function(){return{done:!!Ev++}},return:function(){wv=!0}};Cv[kv]=function(){return this},Array.from(Cv,(function(){throw 2}))}catch(CR){}var xv=function(e,t){if(!t&&!wv)return!1;var n=!1;try{var i={};i[kv]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(CR){}return n},Tv=ap,Sv=wp.CONSTRUCTOR||!xv((function(e){Tv.all(e).then(void 0,(function(){}))})),Av=R,Pv=Ie,Ov=Ep,Iv=op,Rv=gf;Pn({target:"Promise",stat:!0,forced:Sv},{all:function(e){var t=this,n=Ov.f(t),i=n.resolve,r=n.reject,o=Iv((function(){var n=Pv(t.resolve),o=[],a=0,s=1;Rv(e,(function(e){var l=a++,u=!1;s++,Av(n,t,e).then((function(e){u||(u=!0,o[l]=e,--s||i(o))}),r)})),--s||i(o)}));return o.error&&r(o.value),n.promise}});var Mv=Pn,Lv=wp.CONSTRUCTOR;ap&&ap.prototype,Mv({target:"Promise",proto:!0,forced:Lv,real:!0},{catch:function(e){return this.then(void 0,e)}});var Dv=R,Nv=Ie,Fv=Ep,Hv=op,Uv=gf;Pn({target:"Promise",stat:!0,forced:Sv},{race:function(e){var t=this,n=Fv.f(t),i=n.reject,r=Hv((function(){var r=Nv(t.resolve);Uv(e,(function(e){Dv(r,t,e).then(n.resolve,i)}))}));return r.error&&i(r.value),n.promise}});var jv=R,Bv=Ep;Pn({target:"Promise",stat:!0,forced:wp.CONSTRUCTOR},{reject:function(e){var t=Bv.f(this);return jv(t.reject,void 0,e),t.promise}});var Vv=nn,Gv=ee,zv=Ep,Kv=function(e,t){if(Vv(e),Gv(t)&&t.constructor===e)return t;var n=zv.f(e);return(0,n.resolve)(t),n.promise},Wv=Pn,Yv=ap,Xv=wp.CONSTRUCTOR,qv=Kv,Zv=ae("Promise"),$v=!Xv;Wv({target:"Promise",stat:!0,forced:true},{resolve:function(e){return qv($v&&this===Zv?Yv:this,e)}});var Jv=R,Qv=Ie,eg=Ep,tg=op,ng=gf;Pn({target:"Promise",stat:!0,forced:Sv},{allSettled:function(e){var t=this,n=eg.f(t),i=n.resolve,r=n.reject,o=tg((function(){var n=Qv(t.resolve),r=[],o=0,a=1;ng(e,(function(e){var s=o++,l=!1;a++,Jv(n,t,e).then((function(e){l||(l=!0,r[s]={status:"fulfilled",value:e},--a||i(r))}),(function(e){l||(l=!0,r[s]={status:"rejected",reason:e},--a||i(r))}))})),--a||i(r)}));return o.error&&r(o.value),n.promise}});var ig=R,rg=Ie,og=ae,ag=Ep,sg=op,lg=gf,ug="No one promise resolved";Pn({target:"Promise",stat:!0,forced:Sv},{any:function(e){var t=this,n=og("AggregateError"),i=ag.f(t),r=i.resolve,o=i.reject,a=sg((function(){var i=rg(t.resolve),a=[],s=0,l=1,u=!1;lg(e,(function(e){var c=s++,h=!1;l++,ig(i,t,e).then((function(e){h||u||(u=!0,r(e))}),(function(e){h||u||(h=!0,a[c]=e,--l||o(new n(a,ug)))}))})),--l||o(new n(a,ug))}));return a.error&&o(a.value),i.promise}});var cg=Pn,hg=ap,fg=o,dg=ae,pg=S,vg=nd,gg=Kv,yg=hg&&hg.prototype;cg({target:"Promise",proto:!0,real:!0,forced:!!hg&&fg((function(){yg.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=vg(this,dg("Promise")),n=pg(e);return this.then(n?function(n){return gg(t,e()).then((function(){return n}))}:e,n?function(n){return gg(t,e()).then((function(){throw n}))}:e)}});var mg=te.Promise,_g=Ep,bg=op;Pn({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=_g.f(this),n=bg(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}});var kg=mg,wg=n(kg),Eg=Pn,Cg=In,xg=g([].reverse),Tg=[1,2];Eg({target:"Array",proto:!0,forced:String(Tg)===String(Tg.reverse())},{reverse:function(){return Cg(this)&&(this.length=this.length),xg(this)}});var Sg=Bc("Array").reverse,Ag=se,Pg=Sg,Og=Array.prototype,Ig=n((function(e){var t=e.reverse;return e===Og||Ag(Og,e)&&t===Og.reverse?Pg:t})),Rg=Pn,Mg=In,Lg=_i,Dg=ee,Ng=Ji,Fg=jn,Hg=$,Ug=Wn,jg=ft,Bg=Cs,Vg=Oi("slice"),Gg=jg("species"),zg=Array,Kg=Math.max;Rg({target:"Array",proto:!0,forced:!Vg},{slice:function(e,t){var n,i,r,o=Hg(this),a=Fg(o),s=Ng(e,a),l=Ng(void 0===t?a:t,a);if(Mg(o)&&(n=o.constructor,(Lg(n)&&(n===zg||Mg(n.prototype))||Dg(n)&&null===(n=n[Gg]))&&(n=void 0),n===zg||void 0===n))return Bg(o,s,l);for(i=new(void 0===n?zg:n)(Kg(l-s,0)),r=0;s<l;s++,r++)s in o&&Ug(i,r,o[s]);return i.length=r,i}});var Wg=Bc("Array").slice,Yg=se,Xg=Wg,qg=Array.prototype,Zg=function(e){var t=e.slice;return e===qg||Yg(qg,e)&&t===qg.slice?Xg:t},$g=n(Zg);function Jg(){Jg=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,i=Ac||function(e,t,n){e[t]=n.value},r="function"==typeof tc?tc:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function l(e,t,n){return Ac(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(S){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof f?t:f,a=Oc(o.prototype),s=new C(r||[]);return i(a,"_invoke",{value:b(e,n,s)}),a}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(S){return{type:"throw",arg:S}}}e.wrap=u;var h={};function f(){}function d(){}function p(){}var v={};l(v,o,(function(){return this}));var g=Dc&&Dc(Dc(x([])));g&&g!==t&&n.call(g,o)&&(v=g);var y=p.prototype=f.prototype=Oc(v);function m(e){var t;qc(t=["next","throw","return"]).call(t,(function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function r(i,o,a,s){var l=c(e[i],e,o);if("throw"!==l.type){var u=l.arg,h=u.value;return h&&"object"==bc(h)&&n.call(h,"__await")?t.resolve(h.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(h).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return o=o?o.then(i,i):i()}})}function b(e,t,n){var i="suspendedStart";return function(r,o){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===r)throw o;return{value:void 0,done:!0}}for(n.method=r,n.arg=o;;){var a=n.delegate;if(a){var s=k(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var l=c(e,t,n);if("normal"===l.type){if(i=n.done?"completed":"suspendedYield",l.arg===h)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i="completed",n.method="throw",n.arg=l.arg)}}}function k(e,t){var n=t.method,i=e.iterator[n];if(void 0===i)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var r=c(i,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,h;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function w(e){var t,n={tryLoc:e[0]};1 in e&&(n.catchLoc=e[1]),2 in e&&(n.finallyLoc=e[2],n.afterLoc=e[3]),uh(t=this.tryEntries).call(t,n)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],qc(e).call(e,w,this),this.reset(!0)}function x(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,r=function t(){for(;++i<e.length;)if(n.call(e,i))return t.value=e[i],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:T}}function T(){return{value:void 0,done:!0}}return d.prototype=p,i(y,"constructor",{value:p,configurable:!0}),i(p,"constructor",{value:d,configurable:!0}),d.displayName=l(p,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return hh?hh(e,p):(e.__proto__=p,l(e,s,"GeneratorFunction")),e.prototype=Oc(y),e},e.awrap=function(e){return{__await:e}},m(_.prototype),l(_.prototype,a,(function(){return this})),e.AsyncIterator=_,e.async=function(t,n,i,r,o){void 0===o&&(o=wg);var a=new _(u(t,n,i,r),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},m(y),l(y,s,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var i in t)uh(n).call(n,i);return Ig(n).call(n),function e(){for(;n.length;){var i=n.pop();if(i in t)return e.value=i,e.done=!1,e}return e.done=!0,e}},e.values=x,C.prototype={constructor:C,reset:function(e){var t;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,qc(t=this.tryEntries).call(t,E),!e)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+$g(i).call(i,1))&&(this[i]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function i(n,i){return a.type="throw",a.arg=e,t.next=n,i&&(t.method="next",t.arg=void 0),!!i}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var r=i.arg;E(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:x(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},e}var Qg=qe,ey=pr;Pn({target:"Object",stat:!0,forced:o((function(){ey(1)}))},{keys:function(e){return ey(Qg(e))}});var ty=te.Object.keys,ny=n(ty),iy=te.Object.getOwnPropertySymbols,ry=n(iy),oy=ea.filter;Pn({target:"Array",proto:!0,forced:!Oi("filter")},{filter:function(e){return oy(this,e,arguments.length>1?arguments[1]:void 0)}});var ay=Bc("Array").filter,sy=se,ly=ay,uy=Array.prototype,cy=function(e){var t=e.filter;return e===uy||sy(uy,e)&&t===uy.filter?ly:t},hy=n(cy),fy={exports:{}},dy=Pn,py=o,vy=$,gy=A.f,yy=P;dy({target:"Object",stat:!0,forced:!yy||py((function(){gy(1)})),sham:!yy},{getOwnPropertyDescriptor:function(e,t){return gy(vy(e),t)}});var my=te.Object,_y=fy.exports=function(e,t){return my.getOwnPropertyDescriptor(e,t)};my.getOwnPropertyDescriptor.sham&&(_y.sham=!0);var by=fy.exports,ky=n(by),wy=yh,Ey=$,Cy=A,xy=Wn;Pn({target:"Object",stat:!0,sham:!P},{getOwnPropertyDescriptors:function(e){for(var t,n,i=Ey(e),r=Cy.f,o=wy(i),a={},s=0;o.length>s;)void 0!==(n=r(i,t=o[s++]))&&xy(a,t,n);return a}});var Ty=te.Object.getOwnPropertyDescriptors,Sy=n(Ty),Ay={exports:{}},Py=Pn,Oy=P,Iy=Xi.f;Py({target:"Object",stat:!0,forced:Object.defineProperties!==Iy,sham:!Oy},{defineProperties:Iy});var Ry=te.Object,My=Ay.exports=function(e,t){return Ry.defineProperties(e,t)};Ry.defineProperties.sham&&(My.sham=!0);var Ly=Ay.exports,Dy=n(Ly),Ny=ao.f("toPrimitive"),Fy=n(Ny);function Hy(e){var t=function(e,t){if("object"!==bc(e)||null===e)return e;var n=e[Fy];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==bc(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===bc(t)?t:String(t)}function Uy(e,t,n){return(t=Hy(t))in e?Ac(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jy(e,t){var n=ny(e);if(ry){var i=ry(e);t&&(i=hy(i).call(i,(function(t){return ky(e,t).enumerable}))),uh(n).apply(n,i)}return n}function By(e){for(var t=1;t<arguments.length;t++){var n,i,r=null!=arguments[t]?arguments[t]:{};t%2?qc(n=jy(Object(r),!0)).call(n,(function(t){Uy(e,t,r[t])})):Sy?Dy(e,Sy(r)):qc(i=jy(Object(r))).call(i,(function(t){Ac(e,t,ky(r,t))}))}return e}function Vy(e,t,n,i,r,o,a){try{var s=e[o](a),l=s.value}catch(CR){return void n(CR)}s.done?t(l):wg.resolve(l).then(i,r)}function Gy(e){return function(){var t=this,n=arguments;return new wg((function(i,r){var o=e.apply(t,n);function a(e){Vy(o,i,r,a,s,"next",e)}function s(e){Vy(o,i,r,a,s,"throw",e)}a(void 0)}))}}Pn({target:"Array",stat:!0},{isArray:In});var zy=n(te.Array.isArray);function Ky(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var Wy=zh,Yy=n(Wy),Xy=nn,qy=tf,Zy=Zt,$y=R,Jy=qe,Qy=function(e,t,n,i){try{return i?t(Xy(n)[0],n[1]):t(n)}catch(CR){qy(e,"throw",CR)}},em=Hh,tm=_i,nm=jn,im=Wn,rm=$h,om=zh,am=Array,sm=function(e){var t=Jy(e),n=tm(this),i=arguments.length,r=i>1?arguments[1]:void 0,o=void 0!==r;o&&(r=Zy(r,i>2?arguments[2]:void 0));var a,s,l,u,c,h,f=om(t),d=0;if(!f||this===am&&em(f))for(a=nm(t),s=n?new this(a):am(a);a>d;d++)h=o?r(t[d],d):t[d],im(s,d,h);else for(c=(u=rm(t,f)).next,s=n?new this:[];!(l=$y(c,u)).done;d++)h=o?Qy(u,r,[l.value,d],!0):l.value,im(s,d,h);return s.length=d,s};Pn({target:"Array",stat:!0,forced:!xv((function(e){Array.from(e)}))},{from:sm});var lm=te.Array.from,um=n(lm);function cm(e,t){var n;if(e){if("string"==typeof e)return Ky(e,t);var i=$g(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?um(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Ky(e,t):void 0}}function hm(e){return function(e){if(zy(e))return Ky(e)}(e)||function(e){if(void 0!==tc&&null!=Yy(e)||null!=e["@@iterator"])return um(e)}(e)||cm(e)||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 fm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dm(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Ac(e,Hy(i.key),i)}}function pm(e,t,n){return t&&dm(e.prototype,t),n&&dm(e,n),Ac(e,"prototype",{writable:!1}),e}var vm=Pn,gm=ir.indexOf,ym=Fc,mm=E([].indexOf),_m=!!mm&&1/mm([1],1,-0)<0;vm({target:"Array",proto:!0,forced:_m||!ym("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return _m?mm(this,e,t)||0:gm(this,e,t)}});var bm=Bc("Array").indexOf,km=se,wm=bm,Em=Array.prototype,Cm=function(e){var t=e.indexOf;return e===Em||km(Em,e)&&t===Em.indexOf?wm:t},xm=n(Cm);function Tm(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},o=ny(e);for(i=0;i<o.length;i++)n=o[i],xm(t).call(t,n)>=0||(r[n]=e[n]);return r}(e,t);if(ry){var o=ry(e);for(i=0;i<o.length;i++)n=o[i],xm(t).call(t,n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Sm=Bc("Array").concat,Am=se,Pm=Sm,Om=Array.prototype,Im=n((function(e){var t=e.concat;return e===Om||Am(Om,e)&&t===Om.concat?Pm:t})),Rm=Pn,Mm=ea.find,Lm="find",Dm=!0;Lm in[]&&Array(1)[Lm]((function(){Dm=!1})),Rm({target:"Array",proto:!0,forced:Dm},{find:function(e){return Mm(this,e,arguments.length>1?arguments[1]:void 0)}});var Nm=Bc("Array").find,Fm=se,Hm=Nm,Um=Array.prototype,jm=n((function(e){var t=e.find;return e===Um||Fm(Um,e)&&t===Um.find?Hm:t})),Bm={exports:{}},Vm=o((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),Gm=o,zm=ee,Km=b,Wm=Vm,Ym=Object.isExtensible,Xm=Gm((function(){Ym(1)}))||Wm?function(e){return!!zm(e)&&((!Wm||"ArrayBuffer"!=Km(e))&&(!Ym||Ym(e)))}:Ym,qm=!o((function(){return Object.isExtensible(Object.preventExtensions({}))})),Zm=Pn,$m=g,Jm=rr,Qm=ee,e_=Je,t_=$t.f,n_=jr,i_=Gr,r_=Xm,o_=qm,a_=!1,s_=it("meta"),l_=0,u_=function(e){t_(e,s_,{value:{objectID:"O"+l_++,weakData:{}}})},c_=Bm.exports={enable:function(){c_.enable=function(){},a_=!0;var e=n_.f,t=$m([].splice),n={};n[s_]=1,e(n).length&&(n_.f=function(n){for(var i=e(n),r=0,o=i.length;r<o;r++)if(i[r]===s_){t(i,r,1);break}return i},Zm({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:i_.f}))},fastKey:function(e,t){if(!Qm(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!e_(e,s_)){if(!r_(e))return"F";if(!t)return"E";u_(e)}return e[s_].objectID},getWeakData:function(e,t){if(!e_(e,s_)){if(!r_(e))return!0;if(!t)return!1;u_(e)}return e[s_].weakData},onFreeze:function(e){return o_&&a_&&r_(e)&&!e_(e,s_)&&u_(e),e}};Jm[s_]=!0;var h_=Bm.exports,f_=Pn,d_=r,p_=h_,v_=o,g_=yn,y_=gf,m_=Yf,__=S,b_=ee,k_=Oo,w_=$t.f,E_=ea.forEach,C_=P,x_=Wo.set,T_=Wo.getterFor,S_=io,A_=Ur,P_=oo,O_=function(e,t,n){for(var i in t)n&&n.unsafe&&e[i]?e[i]=t[i]:S_(e,i,t[i],n);return e},I_=Zt,R_=Yf,M_=K,L_=gf,D_=du,N_=pu,F_=zf,H_=P,U_=h_.fastKey,j_=Wo.set,B_=Wo.getterFor,V_={getConstructor:function(e,t,n,i){var r=e((function(e,r){R_(e,o),j_(e,{type:t,index:A_(null),first:void 0,last:void 0,size:0}),H_||(e.size=0),M_(r)||L_(r,e[i],{that:e,AS_ENTRIES:n})})),o=r.prototype,a=B_(t),s=function(e,t,n){var i,r,o=a(e),s=l(e,t);return s?s.value=n:(o.last=s={index:r=U_(t,!0),key:t,value:n,previous:i=o.last,next:void 0,removed:!1},o.first||(o.first=s),i&&(i.next=s),H_?o.size++:e.size++,"F"!==r&&(o.index[r]=s)),e},l=function(e,t){var n,i=a(e),r=U_(t);if("F"!==r)return i.index[r];for(n=i.first;n;n=n.next)if(n.key==t)return n};return O_(o,{clear:function(){for(var e=a(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,H_?e.size=0:this.size=0},delete:function(e){var t=this,n=a(t),i=l(t,e);if(i){var r=i.next,o=i.previous;delete n.index[i.index],i.removed=!0,o&&(o.next=r),r&&(r.previous=o),n.first==i&&(n.first=r),n.last==i&&(n.last=o),H_?n.size--:t.size--}return!!i},forEach:function(e){for(var t,n=a(this),i=I_(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(i(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!l(this,e)}}),O_(o,n?{get:function(e){var t=l(this,e);return t&&t.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),H_&&P_(o,"size",{configurable:!0,get:function(){return a(this).size}}),r},setStrong:function(e,t,n){var i=t+" Iterator",r=B_(t),o=B_(i);D_(e,t,(function(e,t){j_(this,{type:i,target:e,state:r(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?N_("keys"==t?n.key:"values"==t?n.value:[n.key,n.value],!1):(e.target=void 0,N_(void 0,!0))}),n?"entries":"values",!n,!0),F_(t)}};(function(e,t,n){var i,r=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),a=r?"set":"add",s=d_[e],l=s&&s.prototype,u={};if(C_&&__(s)&&(o||l.forEach&&!v_((function(){(new s).entries().next()})))){var c=(i=t((function(t,n){x_(m_(t,c),{type:e,collection:new s}),null!=n&&y_(n,t[a],{that:t,AS_ENTRIES:r})}))).prototype,h=T_(e);E_(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in l)||o&&"clear"==e||g_(c,e,(function(n,i){var r=h(this).collection;if(!t&&o&&!b_(n))return"get"==e&&void 0;var a=r[e](0===n?0:n,i);return t?this:a}))})),o||w_(c,"size",{configurable:!0,get:function(){return h(this).collection.size}})}else i=n.getConstructor(t,e,r,a),p_.enable();k_(i,e,!1,!0),u[e]=i,f_({global:!0,forced:!0},u),o||n.setStrong(i,e,r)})("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),V_);var G_=te.Map,z_=Zt,K_=R,W_=Ie,Y_=$f,X_=K,q_=gf,Z_=[].push,$_=function(e){var t,n,i,r,o=arguments.length,a=o>1?arguments[1]:void 0;return Y_(this),(t=void 0!==a)&&W_(a),X_(e)?new this:(n=[],t?(i=0,r=z_(a,o>2?arguments[2]:void 0),q_(e,(function(e){K_(Z_,n,r(e,i++))}))):q_(e,Z_,{that:n}),new this(n))};Pn({target:"Map",stat:!0,forced:!0},{from:$_});var J_=Cs,Q_=function(){return new this(J_(arguments))};Pn({target:"Map",stat:!0,forced:!0},{of:Q_});var eb=Se,tb=function(e){if("object"==typeof e&&"size"in e&&"has"in e&&"get"in e&&"set"in e&&"delete"in e&&"entries"in e)return e;throw TypeError(eb(e)+" is not a map")},nb=function(e,t){return 1==t?function(t,n){return t[e](n)}:function(t,n,i){return t[e](n,i)}},ib=ae("Map"),rb={Map:ib,set:nb("set",2),get:nb("get",1),has:nb("has",1),remove:nb("delete",1),proto:ib.prototype},ob=tb,ab=rb.remove;Pn({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=ob(this),n=!0,i=0,r=arguments.length;i<r;i++)e=ab(t,arguments[i]),n=n&&e;return!!n}});var sb=tb,lb=rb.get,ub=rb.has,cb=rb.set;Pn({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var n,i,r=sb(this);return ub(r,e)?(n=lb(r,e),"update"in t&&(n=t.update(n,e,r),cb(r,e,n)),n):(i=t.insert(e,r),cb(r,e,i),i)}});var hb=R,fb=function(e,t,n){for(var i,r,o=n||e.next;!(i=hb(o,e)).done;)if(void 0!==(r=t(i.value)))return r},db=function(e,t,n){return n?fb(e.entries(),(function(e){return t(e[1],e[0])})):e.forEach(t)},pb=Zt,vb=tb,gb=db;Pn({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=vb(this),n=pb(e,arguments.length>1?arguments[1]:void 0);return!1!==gb(t,(function(e,i){if(!n(e,i,t))return!1}),!0)}});var yb=Zt,mb=tb,_b=db,bb=rb.Map,kb=rb.set;Pn({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=mb(this),n=yb(e,arguments.length>1?arguments[1]:void 0),i=new bb;return _b(t,(function(e,r){n(e,r,t)&&kb(i,r,e)})),i}});var wb=Zt,Eb=tb,Cb=db;Pn({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=Eb(this),n=wb(e,arguments.length>1?arguments[1]:void 0),i=Cb(t,(function(e,i){if(n(e,i,t))return{value:e}}),!0);return i&&i.value}});var xb=Zt,Tb=tb,Sb=db;Pn({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=Tb(this),n=xb(e,arguments.length>1?arguments[1]:void 0),i=Sb(t,(function(e,i){if(n(e,i,t))return{key:i}}),!0);return i&&i.key}});var Ab=Pn,Pb=R,Ob=S,Ib=Ie,Rb=gf,Mb=rb.Map,Lb=g([].push);Ab({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){var n=new(Ob(this)?this:Mb);Ib(t);var i=Ib(n.has),r=Ib(n.get),o=Ib(n.set);return Rb(e,(function(e){var a=t(e);Pb(i,n,a)?Lb(Pb(r,n,a),e):Pb(o,n,a,[e])})),n}});var Db=function(e,t){return e===t||e!=e&&t!=t},Nb=tb,Fb=db;Pn({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===Fb(Nb(this),(function(t){if(Db(t,e))return!0}),!0)}});var Hb=R,Ub=gf,jb=S,Bb=Ie,Vb=rb.Map;Pn({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var n=new(jb(this)?this:Vb);Bb(t);var i=Bb(n.set);return Ub(e,(function(e){Hb(i,n,t(e),e)})),n}});var Gb=tb,zb=db;Pn({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=zb(Gb(this),(function(t,n){if(t===e)return{key:n}}),!0);return t&&t.key}});var Kb=Zt,Wb=tb,Yb=db,Xb=rb.Map,qb=rb.set;Pn({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=Wb(this),n=Kb(e,arguments.length>1?arguments[1]:void 0),i=new Xb;return Yb(t,(function(e,r){qb(i,n(e,r,t),e)})),i}});var Zb=Zt,$b=tb,Jb=db,Qb=rb.Map,ek=rb.set;Pn({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=$b(this),n=Zb(e,arguments.length>1?arguments[1]:void 0),i=new Qb;return Jb(t,(function(e,r){ek(i,r,n(e,r,t))})),i}});var tk=tb,nk=gf,ik=rb.set;Pn({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=tk(this),n=arguments.length,i=0;i<n;)nk(arguments[i++],(function(e,n){ik(t,e,n)}),{AS_ENTRIES:!0});return t}});var rk=Ie,ok=tb,ak=db,sk=TypeError;Pn({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=ok(this),n=arguments.length<2,i=n?void 0:arguments[1];if(rk(e),ak(t,(function(r,o){n?(n=!1,i=r):i=e(i,r,o,t)})),n)throw sk("Reduce of empty map with no initial value");return i}});var lk=Zt,uk=tb,ck=db;Pn({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=uk(this),n=lk(e,arguments.length>1?arguments[1]:void 0);return!0===ck(t,(function(e,i){if(n(e,i,t))return!0}),!0)}});var hk=Ie,fk=tb,dk=TypeError,pk=rb.get,vk=rb.has,gk=rb.set;Pn({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var n=fk(this),i=arguments.length;hk(t);var r=vk(n,e);if(!r&&i<3)throw dk("Updating absent value");var o=r?pk(n,e):hk(i>2?arguments[2]:void 0)(e,n);return gk(n,e,t(o,e,n)),n}});var yk=R,mk=Ie,_k=S,bk=nn,kk=TypeError,wk=function(e,t){var n,i=bk(this),r=mk(i.get),o=mk(i.has),a=mk(i.set),s=arguments.length>2?arguments[2]:void 0;if(!_k(t)&&!_k(s))throw kk("At least one callback required");return yk(o,i,e)?(n=yk(r,i,e),_k(t)&&(n=t(n),yk(a,i,e,n))):_k(s)&&(n=s(),yk(a,i,e,n)),n};Pn({target:"Map",proto:!0,real:!0,forced:!0},{upsert:wk}),Pn({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:wk});var Ek=G_,Ck=n(Ek),xk=n(Ek),Tk=ea.map;Pn({target:"Array",proto:!0,forced:!Oi("map")},{map:function(e){return Tk(this,e,arguments.length>1?arguments[1]:void 0)}});var Sk=Bc("Array").map,Ak=se,Pk=Sk,Ok=Array.prototype,Ik=n((function(e){var t=e.map;return e===Ok||Ak(Ok,e)&&t===Ok.map?Pk:t})),Rk=n(kg),Mk=n(cy),Lk=ir.includes;Pn({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(e){return Lk(this,e,arguments.length>1?arguments[1]:void 0)}});var Dk=Bc("Array").includes,Nk=ee,Fk=b,Hk=ft("match"),Uk=function(e){var t;return Nk(e)&&(void 0!==(t=e[Hk])?!!t:"RegExp"==Fk(e))},jk=TypeError,Bk=ft("match"),Vk=Pn,Gk=function(e){if(Uk(e))throw jk("The method doesn't accept regular expressions");return e},zk=X,Kk=Yi,Wk=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[Bk]=!1,"/./"[e](t)}catch(CR){}}return!1},Yk=g("".indexOf);Vk({target:"String",proto:!0,forced:!Wk("includes")},{includes:function(e){return!!~Yk(Kk(zk(this)),Kk(Gk(e)),arguments.length>1?arguments[1]:void 0)}});var Xk=Bc("String").includes,qk=se,Zk=Dk,$k=Xk,Jk=Array.prototype,Qk=String.prototype,ew=n((function(e){var t=e.includes;return e===Jk||qk(Jk,e)&&t===Jk.includes?Zk:"string"==typeof e||e===Qk||qk(Qk,e)&&t===Qk.includes?$k:t})),tw=n(Cm),nw=n(ty),iw=n(Zg),rw=Se,ow=TypeError,aw=function(e,t){if(!delete e[t])throw ow("Cannot delete property "+rw(t)+" of "+rw(e))},sw=Pn,lw=qe,uw=Ji,cw=Dn,hw=jn,fw=eh,dw=Vn,pw=Ti,vw=Wn,gw=aw,yw=Oi("splice"),mw=Math.max,_w=Math.min;sw({target:"Array",proto:!0,forced:!yw},{splice:function(e,t){var n,i,r,o,a,s,l=lw(this),u=hw(l),c=uw(e,u),h=arguments.length;for(0===h?n=i=0:1===h?(n=0,i=u-c):(n=h-2,i=_w(mw(cw(t),0),u-c)),dw(u+n-i),r=pw(l,i),o=0;o<i;o++)(a=c+o)in l&&vw(r,o,l[a]);if(r.length=i,n<i){for(o=c;o<u-i;o++)s=o+n,(a=o+i)in l?l[s]=l[a]:gw(l,s);for(o=u;o>u-i+n;o--)gw(l,o-1)}else if(n>i)for(o=u-i;o>c;o--)s=o+n-1,(a=o+i-1)in l?l[s]=l[a]:gw(l,s);for(o=0;o<n;o++)l[o+c]=arguments[o+2];return fw(l,u-i+n),r}});var bw=Bc("Array").splice,kw=se,ww=bw,Ew=Array.prototype,Cw=n((function(e){var t=e.splice;return e===Ew||kw(Ew,e)&&t===Ew.splice?ww:t}));Pn({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var xw=n(te.Number.isNaN),Tw="\t\n\v\f\r \u2028\u2029\ufeff",Sw=X,Aw=Yi,Pw=Tw,Ow=g("".replace),Iw=RegExp("^["+Pw+"]+"),Rw=RegExp("(^|[^"+Pw+"])["+Pw+"]+$"),Mw=function(e){return function(t){var n=Aw(Sw(t));return 1&e&&(n=Ow(n,Iw,"")),2&e&&(n=Ow(n,Rw,"$1")),n}},Lw={start:Mw(1),end:Mw(2),trim:Mw(3)},Dw=r,Nw=o,Fw=g,Hw=Yi,Uw=Lw.trim,jw=Tw,Bw=Dw.parseInt,Vw=Dw.Symbol,Gw=Vw&&Vw.iterator,zw=/^[+-]?0x/i,Kw=Fw(zw.exec),Ww=8!==Bw(jw+"08")||22!==Bw(jw+"0x16")||Gw&&!Nw((function(){Bw(Object(Gw))}))?function(e,t){var n=Uw(Hw(e));return Bw(n,t>>>0||(Kw(zw,n)?16:10))}:Bw;Pn({global:!0,forced:parseInt!=Ww},{parseInt:Ww});var Yw=n(te.parseInt),Xw=Bc("Array").keys,qw=ti,Zw=Je,$w=se,Jw=Xw,Qw=Array.prototype,eE={DOMTokenList:!0,NodeList:!0},tE=n((function(e){var t=e.keys;return e===Qw||$w(Qw,e)&&t===Qw.keys||Zw(eE,qw(e))?Jw:t})),nE=n(iy),iE=n(by),rE=n(Ty),oE=n(Ly),aE=n(Sc),sE=n(ec),lE=n(mc),uE=n(ch),cE=n(Lc),hE=g,fE=Ie,dE=ee,pE=Je,vE=Cs,gE=a,yE=Function,mE=hE([].concat),_E=hE([].join),bE={},kE=gE?yE.bind:function(e){var t=fE(this),n=t.prototype,i=vE(arguments,1),r=function(){var n=mE(i,vE(arguments));return this instanceof r?function(e,t,n){if(!pE(bE,t)){for(var i=[],r=0;r<t;r++)i[r]="a["+r+"]";bE[t]=yE("C,a","return new C("+_E(i,",")+")")}return bE[t](e,n)}(t,n.length,n):t.apply(e,n)};return dE(n)&&(r.prototype=n),r},wE=Pn,EE=h,CE=kE,xE=$f,TE=nn,SE=ee,AE=Ur,PE=o,OE=ae("Reflect","construct"),IE=Object.prototype,RE=[].push,ME=PE((function(){function e(){}return!(OE((function(){}),[],e)instanceof e)})),LE=!PE((function(){OE((function(){}))})),DE=ME||LE;wE({target:"Reflect",stat:!0,forced:DE,sham:DE},{construct:function(e,t){xE(e),TE(t);var n=arguments.length<3?e:xE(arguments[2]);if(LE&&!ME)return OE(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var i=[null];return EE(RE,i,t),new(EE(CE,e,i))}var r=n.prototype,o=AE(SE(r)?r:IE),a=EE(e,o,t);return SE(a)?a:o}});var NE=te.Reflect.construct,FE=n(NE),HE=n(NE),UE=Je,jE=R,BE=ee,VE=nn,GE=function(e){return void 0!==e&&(UE(e,"value")||UE(e,"writable"))},zE=A,KE=xl;Pn({target:"Reflect",stat:!0},{get:function e(t,n){var i,r,o=arguments.length<3?t:arguments[2];return VE(t)===o?t[n]:(i=zE.f(t,n))?GE(i)?i.value:void 0===i.get?void 0:jE(i.get,o):BE(r=KE(t))?e(r,n,o):void 0}});var WE=te.Reflect.get,YE=n(WE),XE=n(WE),qE=n(Wy),ZE=n(lm),$E=n(Ny);function JE(e,t){var n=nw(e);if(nE){var i=nE(e);t&&(i=Mk(i).call(i,(function(t){return iE(e,t).enumerable}))),n.push.apply(n,i)}return n}function QE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?JE(Object(n),!0).forEach((function(t){rC(e,t,n[t])})):rE?oE(e,rE(n)):JE(Object(n)).forEach((function(t){aE(e,t,iE(n,t))}))}return e}function eC(e){return(eC="function"==typeof sE&&"symbol"==typeof lE?function(e){return typeof e}:function(e){return e&&"function"==typeof sE&&e.constructor===sE&&e!==sE.prototype?"symbol":typeof e})(e)}function tC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nC(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),aE(e,pC(i.key),i)}}function iC(e,t,n){return t&&nC(e.prototype,t),n&&nC(e,n),aE(e,"prototype",{writable:!1}),e}function rC(e,t,n){return(t=pC(t))in e?aE(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oC(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),aE(e,"prototype",{writable:!1}),t&&sC(e,t)}function aC(e){return(aC=uE?cE.bind():function(e){return e.__proto__||cE(e)})(e)}function sC(e,t){return(sC=uE?uE.bind():function(e,t){return e.__proto__=t,e})(e,t)}function lC(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uC(e,t){if(t&&("object"===bc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return lC(e)}function cC(e){var t=function(){if("undefined"==typeof Reflect||!HE)return!1;if(HE.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(HE(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=aC(e);if(t){var r=aC(this).constructor;n=HE(i,arguments,r)}else n=i.apply(this,arguments);return uC(this,n)}}function hC(){return hC="undefined"!=typeof Reflect&&XE?XE.bind():function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=aC(e)););return e}(e,t);if(i){var r=iE(i,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},hC.apply(this,arguments)}function fC(e){return function(e){if(Array.isArray(e))return dC(e)}(e)||function(e){if(void 0!==sE&&null!=qE(e)||null!=e["@@iterator"])return ZE(e)}(e)||function(e,t){var n;if(!e)return;if("string"==typeof e)return dC(e,t);var i=iw(n=Object.prototype.toString.call(e)).call(n,8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return ZE(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return dC(e,t)}(e)||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 dC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function pC(e){var t=function(e,t){if("object"!==bc(e)||null===e)return e;var n=e[$E];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==bc(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===bc(t)?t:String(t)}var vC=P,gC=g,yC=R,mC=o,_C=pr,bC=to,kC=M,wC=qe,EC=z,CC=Object.assign,xC=Object.defineProperty,TC=gC([].concat),SC=!CC||mC((function(){if(vC&&1!==CC({b:1},CC(xC({},"a",{enumerable:!0,get:function(){xC(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach((function(e){t[e]=e})),7!=CC({},e)[n]||_C(CC({},t)).join("")!=i}))?function(e,t){for(var n=wC(e),i=arguments.length,r=1,o=bC.f,a=kC.f;i>r;)for(var s,l=EC(arguments[r++]),u=o?TC(_C(l),o(l)):_C(l),c=u.length,h=0;c>h;)s=u[h++],vC&&!yC(a,l,s)||(n[s]=l[s]);return n}:CC,AC=SC;Pn({target:"Object",stat:!0,arity:2,forced:Object.assign!==AC},{assign:AC});var PC=n(te.Object.assign),OC={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function i(){}function r(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,i,o,a){if("function"!=typeof i)throw new TypeError("The listener must be a function");var s=new r(i,o||e,a),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new i:delete e._events[t]}function s(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,i,r=[];if(0===this._eventsCount)return r;for(i in e=this._events)t.call(e,i)&&r.push(n?iw(i).call(i,1):i);return nE?Im(r).call(r,nE(e)):r},s.prototype.listeners=function(e){var t=n?n+e:e,i=this._events[t];if(!i)return[];if(i.fn)return[i.fn];for(var r=0,o=i.length,a=new Array(o);r<o;r++)a[r]=i[r].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,i=this._events[t];return i?i.fn?1:i.length:0},s.prototype.emit=function(e,t,i,r,o,a){var s=n?n+e:e;if(!this._events[s])return!1;var l,u,c=this._events[s],h=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),h){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,i),!0;case 4:return c.fn.call(c.context,t,i,r),!0;case 5:return c.fn.call(c.context,t,i,r,o),!0;case 6:return c.fn.call(c.context,t,i,r,o,a),!0}for(u=1,l=new Array(h-1);u<h;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var f,d=c.length;for(u=0;u<d;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),h){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,i);break;case 4:c[u].fn.call(c[u].context,t,i,r);break;default:if(!l)for(f=1,l=new Array(h-1);f<h;f++)l[f-1]=arguments[f];c[u].fn.apply(c[u].context,l)}}return!0},s.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,i,r){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==t||r&&!s.once||i&&s.context!==i||a(this,o);else{for(var l=0,u=[],c=s.length;l<c;l++)(s[l].fn!==t||r&&!s[l].once||i&&s[l].context!==i)&&u.push(s[l]);u.length?this._events[o]=1===u.length?u[0]:u:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new i,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}(OC);var IC=n(OC.exports),RC=Dn,MC=Yi,LC=X,DC=RangeError,NC=g,FC=Hn,HC=Yi,UC=X,jC=NC((function(e){var t=MC(LC(this)),n="",i=RC(e);if(i<0||i==1/0)throw DC("Wrong number of repetitions");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(n+=t);return n})),BC=NC("".slice),VC=Math.ceil,GC=function(e){return function(t,n,i){var r,o,a=HC(UC(t)),s=FC(n),l=a.length,u=void 0===i?" ":HC(i);return s<=l||""==u?a:((o=jC(u,VC((r=s-l)/u.length))).length>r&&(o=BC(o,0,r)),e?a+o:o+a)}},zC={start:GC(!1),end:GC(!0)},KC=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(le),WC=zC.start;Pn({target:"String",proto:!0,forced:KC},{padStart:function(e){return WC(this,e,arguments.length>1?arguments[1]:void 0)}});var YC=Bc("String").padStart,XC=se,qC=YC,ZC=String.prototype,$C=n((function(e){var t=e.padStart;return"string"==typeof e||e===ZC||XC(ZC,e)&&t===ZC.padStart?qC:t})),JC=r,QC=o,ex=Yi,tx=Lw.trim,nx=Tw,ix=g("".charAt),rx=JC.parseFloat,ox=JC.Symbol,ax=ox&&ox.iterator,sx=1/rx(nx+"-0")!=-1/0||ax&&!QC((function(){rx(Object(ax))}))?function(e){var t=tx(ex(e)),n=rx(t);return 0===n&&"-"==ix(t,0)?-0:n}:rx;Pn({global:!0,forced:parseFloat!=sx},{parseFloat:sx});var lx=n(te.parseFloat),ux=gl.PROPER,cx=o,hx=Tw,fx=Lw.trim;Pn({target:"String",proto:!0,forced:function(e){return cx((function(){return!!hx[e]()||"
"!=="
"[e]()||ux&&hx[e].name!==e}))}("trim")},{trim:function(){return fx(this)}});var dx=Bc("String").trim,px=se,vx=dx,gx=String.prototype,yx=n((function(e){var t=e.trim;return"string"==typeof e||e===gx||px(gx,e)&&t===gx.trim?vx:t})),mx=qr,_x=Math.floor,bx=function(e,t){var n=e.length,i=_x(n/2);return n<8?kx(e,t):wx(e,bx(mx(e,0,i),t),bx(mx(e,i),t),t)},kx=function(e,t){for(var n,i,r=e.length,o=1;o<r;){for(i=o,n=e[o];i&&t(e[i-1],n)>0;)e[i]=e[--i];i!==o++&&(e[i]=n)}return e},wx=function(e,t,n,i){for(var r=t.length,o=n.length,a=0,s=0;a<r||s<o;)e[a+s]=a<r&&s<o?i(t[a],n[s])<=0?t[a++]:n[s++]:a<r?t[a++]:n[s++];return e},Ex=bx,Cx=le.match(/firefox\/(\d+)/i),xx=!!Cx&&+Cx[1],Tx=/MSIE|Trident/.test(le),Sx=le.match(/AppleWebKit\/(\d+)\./),Ax=!!Sx&&+Sx[1],Px=Pn,Ox=g,Ix=Ie,Rx=qe,Mx=jn,Lx=aw,Dx=Yi,Nx=o,Fx=Ex,Hx=Fc,Ux=xx,jx=Tx,Bx=ve,Vx=Ax,Gx=[],zx=Ox(Gx.sort),Kx=Ox(Gx.push),Wx=Nx((function(){Gx.sort(void 0)})),Yx=Nx((function(){Gx.sort(null)})),Xx=Hx("sort"),qx=!Nx((function(){if(Bx)return Bx<70;if(!(Ux&&Ux>3)){if(jx)return!0;if(Vx)return Vx<603;var e,t,n,i,r="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(i=0;i<47;i++)Gx.push({k:t+i,v:n})}for(Gx.sort((function(e,t){return t.v-e.v})),i=0;i<Gx.length;i++)t=Gx[i].k.charAt(0),r.charAt(r.length-1)!==t&&(r+=t);return"DGBEFHACIJK"!==r}}));Px({target:"Array",proto:!0,forced:Wx||!Yx||!Xx||!qx},{sort:function(e){void 0!==e&&Ix(e);var t=Rx(this);if(qx)return void 0===e?zx(t):zx(t,e);var n,i,r=[],o=Mx(t);for(i=0;i<o;i++)i in t&&Kx(r,t[i]);for(Fx(r,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:Dx(t)>Dx(n)?1:-1}}(e)),n=Mx(r),i=0;i<n;)t[i]=r[i++];for(;i<o;)Lx(t,i++);return t}});var Zx,$x=Bc("Array").sort,Jx=se,Qx=$x,eT=Array.prototype,tT=n((function(e){var t=e.sort;return e===eT||Jx(eT,e)&&t===eT.sort?Qx:t})),nT="undefined"!=typeof window&&window.location&&tw(Zx=window.location.href).call(Zx,"xgplayerdebugger=1")>-1,iT="color: #525252; background-color: #90ee90;",rT="color: #525252; background-color: red;",oT="color: #525252; background-color: yellow; ",aT="%c[xgplayer]",sT={config:{debug:nT?3:0},logInfo:function(e){for(var t,n,i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];this.config.debug>=3&&(n=console).log.apply(n,Im(t=[aT,iT,e]).call(t,r))},logWarn:function(e){for(var t,n,i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];this.config.debug>=1&&(n=console).warn.apply(n,Im(t=[aT,oT,e]).call(t,r))},logError:function(e){var t,n;if(!(this.config.debug<1)){for(var i=this.config.debug>=2?"trace":"error",r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];(n=console)[i].apply(n,Im(t=[aT,rT,e]).call(t,o))}}};var lT=function(){function e(t){tC(this,e),this.bufferedList=t}return iC(e,[{key:"start",value:function(e){return this.bufferedList[e].start}},{key:"end",value:function(e){return this.bufferedList[e].end}},{key:"length",get:function(){return this.bufferedList.length}}]),e}(),uT={};function cT(e){var t=eC(e);return null!==e&&("object"===t||"function"===t)}function hT(e,t,n){var i,r,o,a,s,l,u=0,c=!1,h=!1,f=!0,d=!t&&0!==t&&"function"==typeof window.requestAnimationFrame;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=i,o=r;return i=r=void 0,u=t,a=e.apply(o,n)}function v(e,t){return d?(window.cancelAnimationFrame(s),window.requestAnimationFrame(e)):setTimeout(e,t)}function g(e){var n=e-l;return void 0===l||n>=t||n<0||h&&e-u>=o}function y(){var e=Date.now();if(g(e))return m(e);s=v(y,function(e){var n=e-u,i=t-(e-l);return h?Math.min(i,o-n):i}(e))}function m(e){return s=void 0,f&&i?p(e):(i=r=void 0,a)}function _(){for(var e=Date.now(),n=g(e),o=arguments.length,f=new Array(o),d=0;d<o;d++)f[d]=arguments[d];if(i=f,r=this,l=e,n){if(void 0===s)return function(e){return u=e,s=v(y,t),c?p(e):a}(l);if(h)return s=v(y,t),p(l)}return void 0===s&&(s=v(y,t)),a}return t=+t||0,cT(n)&&(c=!!n.leading,o=(h="maxWait"in n)?Math.max(+n.maxWait||0,t):o,f="trailing"in n?!!n.trailing:f),_.cancel=function(){void 0!==s&&function(e){if(d)return window.cancelAnimationFrame(e);clearTimeout(e)}(s),u=0,i=l=r=s=void 0},_.flush=function(){return void 0===s?a:m(Date.now())},_.pending=function(){return void 0!==s},_}function fT(){var e=(document.documentElement.getAttribute("lang")||navigator.language||"zh-cn").toLocaleLowerCase();return"zh-cn"===e&&(e="zh"),e}uT.createDom=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=document.createElement(e);return r.className=i,r.innerHTML=t,nw(n).forEach((function(t){var i=t,o=n[t];"video"===e||"audio"===e||"live-video"===e?o&&r.setAttribute(i,o):r.setAttribute(i,o)})),r},uT.createDomFromHtml=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";try{var i=document.createElement("div");i.innerHTML=e;var r=i.children;return i=null,r.length>0?(r=r[0],n&&uT.addClass(r,n),t&&nw(t).forEach((function(e){r.setAttribute(e,t[e])})),r):null}catch(o){return sT.logError("util.createDomFromHtml",o),null}},uT.hasClass=function(e,t){if(!e||!t)return!1;try{return Array.prototype.some.call(e.classList,(function(e){return e===t}))}catch(i){var n=e.className&&"object"===eC(e.className)?e.getAttribute("class"):e.className;return n&&!!n.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}},uT.addClass=function(e,t){if(e&&t)try{t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach((function(t){t&&e.classList.add(t)}))}catch(n){uT.hasClass(e,t)||(e.className&&"object"===eC(e.className)?e.setAttribute("class",e.getAttribute("class")+" "+t):e.className+=" "+t)}},uT.removeClass=function(e,t){if(e&&t)try{t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach((function(t){t&&e.classList.remove(t)}))}catch(n){uT.hasClass(e,t)&&t.split(/\s+/g).forEach((function(t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className&&"object"===eC(e.className)?e.setAttribute("class",e.getAttribute("class").replace(n," ")):e.className=e.className.replace(n," ")}))}},uT.toggleClass=function(e,t){e&&t.split(/\s+/g).forEach((function(t){uT.hasClass(e,t)?uT.removeClass(e,t):uT.addClass(e,t)}))},uT.classNames=function(){for(var e=arguments,t=[],n=function(n){if("String"===uT.typeOf(e[n]))t.push(e[n]);else if("Object"===uT.typeOf(e[n])){var i;Ik(i=nw(e[n])).call(i,(function(i){e[n][i]&&t.push(i)}))}},i=0;i<arguments.length;i++)n(i);return t.join(" ")},uT.findDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1?arguments[1]:void 0;try{e=t.querySelector(n)}catch(i){sT.logError("util.findDom",i),0===tw(n).call(n,"#")&&(e=t.getElementById(iw(n).call(n,1)))}return e},uT.getCss=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,!1)[t]},uT.padStart=function(e,t,n){for(var i=String(n),r=t>>0,o=Math.ceil(r/i.length),a=[],s=String(e);o--;)a.push(i);return a.join("").substring(0,r-s.length)+s},uT.format=function(e){if(window.isNaN(e))return"";e=Math.round(e);var t=$C(uT).call(uT,Math.floor(e/3600),2,0),n=$C(uT).call(uT,Math.floor((e-3600*t)/60),2,0),i=$C(uT).call(uT,Math.floor(e-3600*t-60*n),2,0);return("00"===t?[n,i]:[t,n,i]).join(":")},uT.event=function(e){if(e.touches){var t=e.touches[0]||e.changedTouches[0];e.clientX=t.clientX||0,e.clientY=t.clientY||0,e.offsetX=t.pageX-t.target.offsetLeft,e.offsetY=t.pageY-t.target.offsetTop}e._target=e.target||e.srcElement},uT.typeOf=function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},uT.deepCopy=function(e,t){if("Object"===uT.typeOf(t)&&"Object"===uT.typeOf(e))return nw(t).forEach((function(n){if("Object"!==uT.typeOf(t[n])||t[n]instanceof Node)if("Array"===uT.typeOf(t[n])){var i;e[n]="Array"===uT.typeOf(e[n])?Im(i=e[n]).call(i,t[n]):t[n]}else e[n]=t[n];else void 0===e[n]||void 0===e[n]?e[n]=t[n]:uT.deepCopy(e[n],t[n])})),e},uT.deepMerge=function(e,t){var n;return Ik(n=nw(t)).call(n,(function(n){var i;"Array"===uT.typeOf(t[n])&&"Array"===uT.typeOf(e[n])?"Array"===uT.typeOf(e[n])&&(i=e[n]).push.apply(i,fC(t[n])):uT.typeOf(e[n])!==uT.typeOf(t[n])||null===e[n]||"Object"!==uT.typeOf(e[n])||t[n]instanceof window.Node?null!==t[n]&&(e[n]=t[n]):uT.deepMerge(e[n],t[n])})),e},uT.getBgImage=function(e){var t=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;if(!t||"none"===t)return"";var n=document.createElement("a");return n.href=t.replace(/url\("|"\)/g,""),n.href},uT.copyDom=function(e){if(e&&1===e.nodeType){var t=document.createElement(e.tagName);return Array.prototype.forEach.call(e.attributes,(function(e){t.setAttribute(e.name,e.value)})),e.innerHTML&&(t.innerHTML=e.innerHTML),t}return""},uT.setInterval=function(e,t,n,i){e._interval[t]||(e._interval[t]=window.setInterval(n.bind(e),i))},uT.clearInterval=function(e,t){clearInterval(e._interval[t]),e._interval[t]=null},uT.setTimeout=function(e,t,n){e._timers||(e._timers=[]);var i=setTimeout((function(){t(),uT.clearTimeout(e,i)}),n);return e._timers.push(i),i},uT.clearTimeout=function(e,t){var n=e._timers;if("Array"===uT.typeOf(n)){for(var i=0;i<n.length;i++)if(n[i]===t){Cw(n).call(n,i,1),clearTimeout(t);break}}else clearTimeout(t)},uT.clearAllTimers=function(e){var t=e._timers;"Array"===uT.typeOf(t)&&(Ik(t).call(t,(function(e){clearTimeout(e)})),e._timerIds=[])},uT.createImgBtn=function(e,t,n,i){var r,o,a,s,l,u,c,h,f,d,p,v=uT.createDom("xg-".concat(e),"",{},"xgplayer-".concat(e,"-img"));(v.style.backgroundImage='url("'.concat(t,'")'),n&&i)&&(["px","rem","em","pt","dp","vw","vh","vm","%"].every((function(e){var t,r;return!(tw(n).call(n,e)>-1&&tw(i).call(i,e)>-1)||(u=lx(yx(t=iw(n).call(n,0,tw(n).call(n,e))).call(t)),c=lx(yx(r=iw(i).call(i,0,tw(i).call(i,e))).call(r)),h=e,!1)})),v.style.width=Im(r="".concat(u)).call(r,h),v.style.height=Im(o="".concat(c)).call(o,h),v.style.backgroundSize=Im(a=Im(s=Im(l="".concat(u)).call(l,h," ")).call(s,c)).call(a,h),v.style.margin="start"===e?Im(f=Im(d=Im(p="-".concat(c/2)).call(p,h," auto auto -")).call(d,u/2)).call(f,h):"auto 5px auto 5px");return v},uT.Hex2RGBA=function(e,t){var n,i=[];if(/^\#[0-9A-F]{3}$/i.test(e)){var r="#";e.replace(/[0-9A-F]/gi,(function(e){r+=e+e})),e=r}return/^#[0-9A-F]{6}$/i.test(e)?(e.replace(/[0-9A-F]{2}/gi,(function(e){i.push(Yw(e,16))})),Im(n="rgba(".concat(i.join(","),", ")).call(n,t,")")):"rgba(255, 255, 255, 0.1)"},uT.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},uT.checkIsFunction=function(e){return e&&"function"==typeof e},uT.checkIsObject=function(e){return null!==e&&"object"===eC(e)},uT.hide=function(e){e.style.display="none"},uT.show=function(e,t){e.style.display=t||"block"},uT.isUndefined=function(e){if(null==e)return!0},uT.isNotNull=function(e){return!(null==e)},uT.setStyleFromCsstext=function(e,t){if(t)if("String"===uT.typeOf(t)){var n=t.replace(/\s+/g,"").split(";");Ik(n).call(n,(function(t){if(t){var n=t.split(":");n.length>1&&(e.style[n[0]]=n[1])}}))}else{var i;Ik(i=nw(t)).call(i,(function(n){e.style[n]=t[n]}))}},uT.filterStyleFromText=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["width","height","top","left","bottom","right","position","z-index","padding","margin","transform"],i=e.style.cssText;if(!i)return{};var r=i.replace(/\s+/g,"").split(";"),o={},a={};return Ik(r).call(r,(function(e){if(e){var t=e.split(":");t.length>1&&(!function(e,t){for(var n=0,i=t.length;n<i;n++)if(tw(e).call(e,t[n])>-1)return!0;return!1}(t[0],n)?a[t[0]]=t[1]:o[t[0]]=t[1])}})),e.setAttribute("style",""),Ik(t=nw(a)).call(t,(function(t){e.style[t]=a[t]})),o},uT.getStyleFromCsstext=function(e){var t=e.style.cssText;if(!t)return{};var n=t.replace(/\s+/g,"").split(";"),i={};return Ik(n).call(n,(function(e){if(e){var t=e.split(":");t.length>1&&(i[t[0]]=t[1])}})),i},uT.preloadImg=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(e){var i=new window.Image;i.onload=function(e){i=null,t&&t(e)},i.onerror=function(e){i=null,n&&n(e)},i.src=e}},uT.stopPropagation=function(e){e&&e.stopPropagation()},uT.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},uT.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},uT.checkTouchSupport=function(){return"ontouchstart"in window},uT.getBuffered2=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=[],i=0;i<e.length;i++)n.push({start:e.start(i)<.5?0:e.start(i),end:e.end(i)});tT(n).call(n,(function(e,t){var n=e.start-t.start;return n||t.end-e.end}));var r=[];if(t)for(var o=0;o<n.length;o++){var a=r.length;if(a){var s=r[a-1].end;n[o].start-s<t?n[o].end>s&&(r[a-1].end=n[o].end):r.push(n[o])}else r.push(n[o])}else r=n;return new lT(r)},uT.getEventPos=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.touches&&e.touches.length>0&&(e=e.touches[0]),{x:e.x/t,y:e.y/t,clientX:e.clientX/t,clientY:e.clientY/t,offsetX:e.offsetX/t,offsetY:e.offsetY/t,pageX:e.pageX/t,pageY:e.pageY/t}},uT.requestAnimationFrame=function(e){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(t)return t(e)},uT.getHostFromUrl=function(e){if("String"!==uT.typeOf(e))return"";var t=e.split("/"),n="";return t.length>3&&t[2]&&(n=t[2]),n},uT.cancelAnimationFrame=function(e){var t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;t&&t(e)},uT.isMSE=function(e){return!!(e&&e instanceof HTMLMediaElement)&&(/^blob/.test(e.currentSrc)||/^blob/.test(e.src))},uT.generateSessionId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(new Date).getTime();try{e=Yw(e)}catch(n){e=0}return t+=e,window.performance&&"function"==typeof window.performance.now&&(t+=Yw(window.performance.now())),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?n:3&n|8).toString(16)}))},uT.createEvent=function(e){var t;return"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},uT.adjustTimeByDuration=function(e,t,n){return t&&e&&(e>t||n&&e<t)?t:e},uT.createPositionBar=function(e,t){var n=uT.createDom("xg-bar","",{"data-index":-1},e);return t.appendChild(n),n},uT.getTransformStyle=function(){var e,t,n,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0,scale:1,rotate:0};return Im(e=Im(t=Im(n="scale(".concat(i.scale||1,") translate(")).call(n,i.x||0,"%, ")).call(t,i.y||0,"%) rotate(")).call(e,i.rotate||0,"deg)")},uT.convertDeg=function(e){return Math.abs(e)<=1?360*e:e%360};var dT=/(Android)\s([\d.]+)/,pT=/(Version)\/([\d.]+)/,vT=["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","avc1.42E01E, mp4a.40.2","avc1.58A01E, mp4a.40.2","avc1.4D401E, mp4a.40.2","avc1.64001E, mp4a.40.2","mp4v.20.8, mp4a.40.2","mp4v.20.240, mp4a.40.2"],gT={get device(){return gT.os.isPc?"pc":"mobile"},get browser(){var e,t;if("undefined"==typeof navigator)return"";var n=navigator.userAgent.toLowerCase(),i={ie:/rv:([\d.]+)\) like gecko/,firefox:/firefox\/([\d.]+)/,chrome:/chrome\/([\d.]+)/,opera:/opera.([\d.]+)/,safari:/version\/([\d.]+).*safari/};return Im(e=[]).call(e,Mk(t=nw(i)).call(t,(function(e){return i[e].test(n)})))[0]},get os(){if("undefined"==typeof navigator)return{};var e=navigator.userAgent,t=/(?:Windows Phone)/.test(e),n=/(?:SymbianOS)/.test(e)||t,i=/(?:Android)/.test(e),r=/(?:Firefox)/.test(e),o=/(?:iPad|PlayBook)/.test(e)||i&&!/(?:Mobile)/.test(e)||r&&/(?:Tablet)/.test(e),a=/(?:iPhone)/.test(e)&&!o,s=!(a||i||n||o),l=/(?:iPad|PlayBook)/.test(e);return{isTablet:o,isPhone:a,isIpad:l,isIos:a||l,isAndroid:i,isPc:s,isSymbian:n,isWindowsPhone:t,isFireFox:r}},get osVersion(){if("undefined"==typeof navigator)return 0;var e=navigator.userAgent,t="",n=(t=/(?:iPhone)|(?:iPad|PlayBook)/.test(e)?pT:dT)?t.exec(e):[];if(n&&n.length>=3){var i=n[2].split(".");return i.length>0?Yw(i[0]):0}return 0},get isWeixin(){if("undefined"==typeof navigator)return!1;return!!/(micromessenger)\/([\d.]+)/.exec(navigator.userAgent.toLocaleLowerCase())},isSupportMP4:function(){var e={isSupport:!1,mime:""};if("undefined"==typeof document)return e;if(this.supportResult)return this.supportResult;var t=document.createElement("video");return"function"==typeof t.canPlayType&&Ik(vT).call(vT,(function(n){"probably"===t.canPlayType('video/mp4; codecs="'.concat(n,'"'))&&(e.isSupport=!0,e.mime+="||".concat(n))})),this.supportResult=e,t=null,e},isMSESupport:function(){var e=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(e)}catch(CR){return this._logger.error(e,CR),!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(e){var t={supported:!1,smooth:!1,powerEfficient:!1};if(!e||"undefined"==typeof navigator)return Rk.resolve(t);if(navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo)return navigator.mediaCapabilities.decodingInfo(e);var n=e.video||{},i=e.audio||{};try{var r=MediaSource.isTypeSupported(n.contentType),o=MediaSource.isTypeSupported(i.contentType);return Rk.resolve({supported:r&&o,smooth:!1,powerEfficient:!1})}catch(a){return Rk.resolve(t)}}},yT="3.0.7",mT={1:"media",2:"media",3:"media",4:"media",5:"media",6:"media"},_T={1:5101,2:5102,3:5103,4:5104,5:5105,6:5106},bT=iC((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{errorType:"",errorCode:0,errorMessage:"",originError:"",ext:{},mediaError:null};tC(this,e);var i=t&&t.i18n?t.i18n.ERROR_TYPES:null;if(t.media){var r,o=n.mediaError?n.mediaError:t.media.error||{},a=t.duration,s=t.currentTime,l=t.ended,u=t.src,c=t.currentSrc,h=t.media,f=h.readyState,d=h.networkState,p=n.errorCode||o.code;_T[p]&&(p=_T[p]);var v={playerVersion:yT,currentTime:s,duration:a,ended:l,readyState:f,networkState:d,src:u||c,errorType:n.errorType,errorCode:p,message:n.errorMessage||o.message,mediaError:o,originError:n.originError?n.originError.stack:"",host:uT.getHostFromUrl(u||c)};return n.ext&&Ik(r=nw(n.ext)).call(r,(function(e){v[e]=n.ext[e]})),v}if(arguments.length>1){for(var g={playerVersion:yT,domain:document.domain},y=["errorType","currentTime","duration","networkState","readyState","src","currentSrc","ended","errd","errorCode","mediaError"],m=0;m<arguments.length;m++)g[y[m]]=arguments[m];return g.ex=i?(i[arguments[0]]||{}).msg:"",g}})),kT="play",wT="ended",ET="pause",CT="error",xT="seeked",TT="timeupdate",ST="waiting",AT="canplay",PT="durationchange",OT="volumechange",IT="loadeddata",RT="emptied",MT="focus",LT="blur",DT="ready",NT="urlNull",FT="autoplay_started",HT="autoplay_was_prevented",UT="complete",jT="replay",BT="destroy",VT="urlchange",GT="download_speed_change",zT="fullscreen_change",KT="cssFullscreen_change",WT="mini_state_change",YT="definition_change",XT="before_definition_change",qT="after_definition_change",ZT="retry",$T="video_resize",JT="pip_change",QT="playnext",eS="shortcut",tS="user_action",nS="reset",iS="source_error",rS="source_success",oS=["play","playing","ended","pause","error","seeking","seeked","timeupdate","waiting","canplay","canplaythrough","durationchange","volumechange","loadeddata","ratechange","progress","loadstart","emptied","stalled","suspend","abort","lowdecode"],aS=Object.freeze({__proto__:null,ABORT:"abort",AFTER_DEFINITION_CHANGE:qT,AUTOPLAY_PREVENTED:HT,AUTOPLAY_STARTED:FT,BEFORE_DEFINITION_CHANGE:XT,BUFFER_CHANGE:"bufferedChange",CANPLAY:AT,CANPLAY_THROUGH:"canplaythrough",COMPLETE:UT,CSS_FULLSCREEN_CHANGE:KT,DEFINITION_CHANGE:YT,DESTROY:BT,DOWNLOAD_SPEED_CHANGE:GT,DURATION_CHANGE:PT,EMPTIED:RT,ENDED:wT,ERROR:CT,FPS_STUCK:"fps_stuck",FULLSCREEN_CHANGE:zT,LOADED_DATA:IT,LOAD_START:"loadstart",MINI_STATE_CHANGE:WT,PAUSE:ET,PIP_CHANGE:JT,PLAY:kT,PLAYER_BLUR:LT,PLAYER_FOCUS:MT,PLAYING:"playing",PLAYNEXT:QT,PROGRESS:"progress",RATE_CHANGE:"ratechange",READY:DT,REPLAY:jT,RESET:nS,RETRY:ZT,ROTATE:"rotate",SCREEN_SHOT:"screenShot",SEEKED:xT,SEEKING:"seeking",SEI_PARSED:"SEI_PARSED",SHORTCUT:eS,SOURCE_ERROR:iS,SOURCE_SUCCESS:rS,STALLED:"stalled",STATS_EVENTS:{STATS_INFO:"stats_info",STATS_DOWNLOAD:"stats_download",STATS_RESET:"stats_reset"},SUSPEND:"suspend",SWITCH_SUBTITLE:"switch_subtitle",TIME_UPDATE:TT,URL_CHANGE:VT,URL_NULL:NT,USER_ACTION:tS,VIDEO_EVENTS:oS,VIDEO_RESIZE:$T,VOLUME_CHANGE:OT,WAITING:ST,XGLOG:"xglog"});function sS(e,t){this&&this.emit&&("error"===e?this.errorHandler(e,t.error):this.emit(e,t))}var lS=function(e){oC(n,e);var t=cC(n);function n(e){var i;tC(this,n),(i=t.call(this,e))._hasStart=!1,i._currentTime=0,i._duration=0,i._internalOp={},i._lastMuted=!1,i.vtype="MP4",i._rate=-1,i.mediaConfig=PC({},{controls:!1,autoplay:e.autoplay,playsinline:e.playsinline,"x5-playsinline":e.playsinline,"webkit-playsinline":e.playsinline,"x5-video-player-fullscreen":e["x5-video-player-fullscreen"]||e.x5VideoPlayerFullscreen,"x5-video-orientation":e["x5-video-orientation"]||e.x5VideoOrientation,airplay:e.airplay,"webkit-airplay":e.airplay,tabindex:0|e.tabindex,mediaType:e.mediaType||"video","data-index":-1},e.videoConfig,e.videoAttributes);var r=e["x5-video-player-type"]||e.x5VideoPlayerType;return gT.isWeixin&&gT.os.isAndroid&&r&&(i.mediaConfig["x5-video-player-type"]=r,delete i.mediaConfig.playsinline,delete i.mediaConfig["webkit-playsinline"],delete i.mediaConfig["x5-playsinline"]),e.loop&&(i.mediaConfig.loop="loop"),i.media=uT.createDom(i.mediaConfig.mediaType,"",i.mediaConfig,""),e.defaultPlaybackRate&&(i.media.defaultPlaybackRate=i.media.playbackRate=e.defaultPlaybackRate),"Number"===uT.typeOf(e.volume)&&(i.volume=e.volume),e.autoplayMuted&&(i.media.muted=!0,i._lastMuted=!0),e.autoplay&&(i.media.autoplay=!0),i._interval={},i.mediaEventMiddleware={},i.attachVideoEvents(),i}return iC(n,[{key:"setEventsMiddleware",value:function(e){var t,n=this;Ik(t=nw(e)).call(t,(function(t){n.mediaEventMiddleware[t]=e[t]}))}},{key:"removeEventsMiddleware",value:function(e){var t,n=this;Ik(t=nw(e)).call(t,(function(e){delete n.mediaEventMiddleware[e]}))}},{key:"attachVideoEvents",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.media;this._evHandlers||(this._evHandlers=Ik(oS).call(oS,(function(t){var n,i=Im(n="on".concat(t.charAt(0).toUpperCase())).call(n,iw(t).call(t,1));return"function"==typeof e[i]&&e.on(t,e[i]),rC({},t,function(e,t){return function(n,i){var r={player:t,eventName:e,originalEvent:n,detail:n.detail||{},timeStamp:n.timeStamp,currentTime:t.currentTime,duration:t.duration,paused:t.paused,ended:t.ended,isInternalOp:!!t._internalOp[n.type],muted:t.muted,volume:t.volume,host:uT.getHostFromUrl(t.currentSrc),vtype:t.vtype};if(t.removeInnerOP(n.type),"timeupdate"===e&&(t._currentTime=t.media&&t.media.currentTime),"ratechange"===e){var o=t.media?t.media.playbackRate:0;if(o&&t._rate===o)return;t._rate=t.media&&t.media.playbackRate}if("durationchange"===e&&(t._duration=t.media.duration),"volumechange"===e&&(r.isMutedChange=t._lastMuted!==t.muted,t._lastMuted=t.muted),"error"===e&&(r.error=i||t.video.error),t.mediaEventMiddleware[e]){var a=sS.bind(t,e,r);try{t.mediaEventMiddleware[e].call(t,r,a)}catch(s){throw sS.call(t,e,r),s}}else sS.call(t,e,r)}}(t,e))}))),this._evHandlers.forEach((function(e){var n=nw(e)[0];t.addEventListener(n,e[n],!1)}))}},{key:"detachVideoEvents",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.media;this._evHandlers.forEach((function(e){var n=nw(e)[0];t.removeEventListener(n,e[n],!1)})),this._evHandlers.forEach((function(t){var n,i=nw(t)[0],r=Im(n="on".concat(i.charAt(0).toUpperCase())).call(n,iw(i).call(i,1));"function"==typeof e[r]&&e.off(i,e[r])})),this._evHandlers=null}},{key:"_attachSourceEvents",value:function(e,t){var n=this;e.removeAttribute("src"),e.load(),t.forEach((function(e){n.media.appendChild(uT.createDom("source","",{src:"".concat(e.src),type:"".concat(e.type||"")}))}));var i=e.children;if(i){this._videoSourceCount=i.length,this._vLoadeddata=function(e){n.emit(rS,{src:e.target.currentSrc,host:uT.getHostFromUrl(e.target.currentSrc)})};for(var r=null,o=0;o<this._evHandlers.length;o++)if("error"===nw(this._evHandlers[o])[0]){r=this._evHandlers[o];break}!this._sourceError&&(this._sourceError=function(e){if(n._videoSourceCount--,0===n._videoSourceCount){var t={code:4,message:"sources_load_error"};r?r.error(e,t):n.errorHandler("error",t)}var i=mT[4];n.emit(iS,new bT(n,{errorType:i,errorCode:4,errorMessage:"sources_load_error",mediaError:{code:4,message:"sources_load_error"},src:e.target.src}))});for(var a=0;a<i.length;a++)i[a].addEventListener("error",this._sourceError);e.addEventListener("loadeddata",this._vLoadeddata)}}},{key:"_detachSourceEvents",value:function(e){var t=e.children;if(t&&0!==t.length&&this._sourceError){for(var n=0;n<t.length;n++)t[n].removeEventListener("error",this._sourceError);for(;t.length>0;)e.removeChild(t[0]);this._vLoadeddata&&e.removeEventListener("loadeddata",this._vLoadeddata)}}},{key:"errorHandler",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.media&&(this.media.error||t)){var n=this.media.error||t,i=n.code?mT[n.code]:"other";n.message;this.media.currentSrc||(n={code:6,message:"empty_src"}),this.emit(e,new bT(this,{errorType:i,errorCode:n.code,errorMessage:n.message||"",mediaError:n}))}}},{key:"destroy",value:function(){for(var e in this.media&&(this.media.pause&&(this.media.pause(),this.media.muted=!0),this.media.removeAttribute("src"),this.media.load()),this._currentTime=0,this._duration=0,this.mediaConfig=null,this._interval)Object.prototype.hasOwnProperty.call(this._interval,e)&&(clearInterval(this._interval[e]),this._interval[e]=null);this.detachVideoEvents(),this.media=null,this.mediaEventMiddleware={},this.removeAllListeners()}},{key:"video",get:function(){return this.media},set:function(e){this.media=e}},{key:"play",value:function(){return this.media?this.media.play():null}},{key:"pause",value:function(){this.media&&this.media.pause()}},{key:"load",value:function(){this.media&&this.media.load()}},{key:"canPlayType",value:function(e){return!!this.media&&this.media.canPlayType(e)}},{key:"getBufferedRange",value:function(e){var t=[0,0];if(!this.media)return t;e||(e=this.media.buffered);var n=this.media.currentTime;if(e)for(var i=0,r=e.length;i<r&&(t[0]=e.start(i),t[1]=e.end(i),!(t[0]<=n&&n<=t[1]));i++);return t[0]-n<=0&&n-t[1]<=0?t:[0,0]}},{key:"autoplay",get:function(){return!!this.media&&this.media.autoplay},set:function(e){this.media&&(this.media.autoplay=e)}},{key:"buffered",get:function(){return this.media?this.media.buffered:null}},{key:"buffered2",get:function(){return this.media&&this.media.buffered?uT.getBuffered2(this.media.buffered):null}},{key:"bufferedPoint",get:function(){var e={start:0,end:0};if(!this.media)return e;var t=this.media.buffered;if(!t||0===t.length)return e;for(var n=0;n<t.length;n++)if((t.start(n)<=this.currentTime||t.start(n)<.1)&&t.end(n)>=this.currentTime)return{start:t.start(n),end:t.end(n)};return e}},{key:"crossOrigin",get:function(){return this.media?this.media.crossOrigin:""},set:function(e){this.media&&(this.media.crossOrigin=e)}},{key:"currentSrc",get:function(){return this.media?this.media.currentSrc:""},set:function(e){this.media&&(this.media.currentSrc=e)}},{key:"currentTime",get:function(){return this.media?void 0!==this.media.currentTime?this.media.currentTime:this._currentTime:0},set:function(e){this.media&&(this.media.currentTime=e)}},{key:"defaultMuted",get:function(){return!!this.media&&this.media.defaultMuted},set:function(e){this.media&&(this.media.defaultMuted=e)}},{key:"duration",get:function(){return this._duration}},{key:"ended",get:function(){return!!this.media&&this.media.ended}},{key:"error",get:function(){return this.media.error}},{key:"errorNote",get:function(){if(!this.media.error)return"";return["MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED"][this.media.error.code-1]}},{key:"loop",get:function(){return!!this.media&&this.media.loop},set:function(e){this.media&&(this.media.loop=e)}},{key:"muted",get:function(){return!!this.media&&this.media.muted},set:function(e){this.media&&this.media.muted!==e&&(this._lastMuted=this.media.muted,this.media.muted=e)}},{key:"networkState",get:function(){return this.media.networkState}},{key:"paused",get:function(){return!this.media||this.media.paused}},{key:"playbackRate",get:function(){return this.media?this.media.playbackRate:0},set:function(e){this.media&&e!==1/0&&(this.media.defaultPlaybackRate=e,this.media.playbackRate=e)}},{key:"played",get:function(){return this.media?this.media.played:null}},{key:"preload",get:function(){return!!this.media&&this.media.preload},set:function(e){this.media&&(this.media.preload=e)}},{key:"readyState",get:function(){return this.media.readyState}},{key:"seekable",get:function(){return!!this.media&&this.media.seekable}},{key:"seeking",get:function(){return!!this.media&&this.media.seeking}},{key:"src",get:function(){return this.media?this.media.src:""},set:function(e){this.media&&(this.emit(VT,e),this.emit(ST),this._currentTime=0,this._duration=0,/^blob/.test(this.media.currentSrc)||/^blob/.test(this.media.src)?this.onWaiting():(this._detachSourceEvents(this.media),"Array"===uT.typeOf(e)?this._attachSourceEvents(this.media,e):e?this.media.src=e:this.media.removeAttribute("src"),this.load()))}},{key:"volume",get:function(){return this.media?this.media.volume:0},set:function(e){e!==1/0&&this.media&&(this.media.volume=e)}},{key:"addInnerOP",value:function(e){this._internalOp[e]=!0}},{key:"removeInnerOP",value:function(e){delete this._internalOp[e]}},{key:"emit",value:function(e,t){for(var i,r,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(r=hC(aC(n.prototype),"emit",this)).call.apply(r,Im(i=[this,e,t]).call(i,a))}},{key:"on",value:function(e,t){for(var i,r,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(r=hC(aC(n.prototype),"on",this)).call.apply(r,Im(i=[this,e,t]).call(i,a))}},{key:"once",value:function(e,t){for(var i,r,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(r=hC(aC(n.prototype),"once",this)).call.apply(r,Im(i=[this,e,t]).call(i,a))}},{key:"off",value:function(e,t){for(var i,r,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(r=hC(aC(n.prototype),"off",this)).call.apply(r,Im(i=[this,e,t]).call(i,a))}},{key:"offAll",value:function(){hC(aC(n.prototype),"removeAllListeners",this).call(this)}}]),n}(IC),uS=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{name:"xgplayer",version:1,db:null,ojstore:{name:"xg-m4a",keypath:"vid"}};tC(this,e),this.indexedDB=window.indexedDB||window.webkitindexedDB,this.IDBKeyRange=window.IDBKeyRange||window.webkitIDBKeyRange,this.myDB=t}return iC(e,[{key:"openDB",value:function(e){var t=this,n=this,i=this.myDB.version||1,r=n.indexedDB.open(n.myDB.name,i);r.onerror=function(e){},r.onsuccess=function(i){t.myDB.db=i.target.result,e.call(n)},r.onupgradeneeded=function(e){var t=e.target.result;e.target.transaction,t.objectStoreNames.contains(n.myDB.ojstore.name)||t.createObjectStore(n.myDB.ojstore.name,{keyPath:n.myDB.ojstore.keypath})}}},{key:"deletedb",value:function(){this.indexedDB.deleteDatabase(this.myDB.name)}},{key:"closeDB",value:function(){this.myDB.db.close()}},{key:"addData",value:function(e,t){for(var n,i=this.myDB.db.transaction(e,"readwrite").objectStore(e),r=0;r<t.length;r++)(n=i.add(t[r])).onerror=function(){},n.onsuccess=function(){}}},{key:"putData",value:function(e,t){for(var n,i=this.myDB.db.transaction(e,"readwrite").objectStore(e),r=0;r<t.length;r++)(n=i.put(t[r])).onerror=function(){},n.onsuccess=function(){}}},{key:"getDataByKey",value:function(e,t,n){var i=this,r=this.myDB.db.transaction(e,"readwrite").objectStore(e).get(t);r.onerror=function(){n.call(i,null)},r.onsuccess=function(e){var t=e.target.result;n.call(i,t)}}},{key:"deleteData",value:function(e,t){this.myDB.db.transaction(e,"readwrite").objectStore(e).delete(t)}},{key:"clearData",value:function(e){this.myDB.db.transaction(e,"readwrite").objectStore(e).clear()}}]),e}(),cS=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],hS=["requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen"],fS=["exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen"],dS="data-xgplayerid";function pS(e,t,n){for(var i,r=arguments.length,o=new Array(r>3?r-3:0),a=3;a<r;a++)o[a-3]=arguments[a];var s,l=t.call.apply(t,Im(i=[e]).call(i,o));n&&"function"==typeof n&&(l&&l.then?l.then((function(){for(var t,i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];n.call.apply(n,Im(t=[e]).call(t,r))})):n.call.apply(n,Im(s=[e]).call(s,o)))}function vS(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{pre:null,next:null};return this.__hooks||(this.__hooks={}),!this.__hooks[e]&&(this.__hooks[e]=null),function(){var i,r=arguments,o=this;if(n.pre)try{var a,s;(s=n.pre).call.apply(s,Im(a=[this]).call(a,iw(Array.prototype).call(arguments)))}catch(y){var l,u;throw y.message=Im(l=Im(u="[pluginName: ".concat(this.pluginName,":")).call(u,e,":pre error] >> ")).call(l,y.message),y}if(this.__hooks&&this.__hooks[e])try{var c,h,f,d=(h=this.__hooks[e]).call.apply(h,Im(c=[this,this]).call(c,iw(Array.prototype).call(arguments)));if(d)if(d.then)d.then((function(e){var i;!1!==e&&pS.apply(void 0,Im(i=[o,t,n.next]).call(i,fC(r)))})).catch((function(e){throw e}));else pS.apply(void 0,Im(f=[this,t,n.next]).call(f,iw(Array.prototype).call(arguments)));else if(void 0===d){var p;pS.apply(void 0,Im(p=[this,t,n.next]).call(p,iw(Array.prototype).call(arguments)))}}catch(y){var v,g;throw y.message=Im(v=Im(g="[pluginName: ".concat(this.pluginName,":")).call(g,e,"] >> ")).call(v,y.message),y}else pS.apply(void 0,Im(i=[this,t,n.next]).call(i,iw(Array.prototype).call(arguments)))}.bind(this)}function gS(e,t){var n=this.__hooks;if(n)return n.hasOwnProperty(e)?(n&&(n[e]=t),!0):(console.warn("has no supported hook which name [".concat(e,"]")),!1)}function yS(e,t){var n=this.__hooks;n&&delete n[e]}function mS(e){if(this.plugins&&this.plugins[e.toLowerCase()]){for(var t=this.plugins[e.toLowerCase()],n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return t.useHooks&&t.useHooks.apply(t,i)}}function _S(e){if(this.plugins&&this.plugins[e.toLowerCase()]){var t=this.plugins[e.toLowerCase()];if(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return t.removeHooks&&t.removeHooks.apply(t,i)}}}function bS(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.__hooks={},t&&Ik(t).call(t,(function(t){e.__hooks[t]=null})),aE(e,"hooks",{get:function(){var t;return e.__hooks&&Ik(t=nw(e.__hooks)).call(t,(function(t){if(e.__hooks[t])return t}))}})}function kS(e){e.__hooks=null}function wS(e,t,n){for(var i=arguments.length,r=new Array(i>3?i-3:0),o=3;o<i;o++)r[o-3]=arguments[o];var a;if(!e.__hooks||!e.__hooks[t])return n.call.apply(n,Im(a=[e,e]).call(a,r));var s,l,u=(l=e.__hooks[t]).call.apply(l,Im(s=[e,e]).call(s,r));if(u&&u.then)u.then((function(t){var i;return!1===t?null:n.call.apply(n,Im(i=[e,e]).call(i,r))})).catch((function(e){console.warn("[runHooks]".concat(t," reject"),e.message)}));else if(!1!==u){var c;return n.call.apply(n,Im(c=[e,e]).call(c,r))}}function ES(e,t){var n;sT.logError(Im(n="[".concat(e,"] event or callback cant be undefined or null when call ")).call(n,t))}var CS=function(){function e(t){tC(this,e),uT.checkIsFunction(this.beforeCreate)&&this.beforeCreate(t),bS(this),this.__args=t,this.__events={},this.__onceEvents={},this.config=t.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(t)}return iC(e,[{key:"beforeCreate",value:function(e){}},{key:"afterCreate",value:function(){}},{key:"beforePlayerInit",value:function(){}},{key:"onPluginsReady",value:function(){}},{key:"afterPlayerInit",value:function(){}},{key:"destroy",value:function(){}},{key:"__init",value:function(e){this.player=e.player,this.playerConfig=e.player&&e.player.config,this.pluginName=e.pluginName?e.pluginName.toLowerCase():this.constructor.pluginName.toLowerCase(),this.logger=e.player&&e.player.logger}},{key:"updateLang",value:function(e){e||(e=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 e=uT.checkTouchSupport()?"touch":"mouse";return!this.playerConfig||"touch"!==this.playerConfig.domEventType&&"mouse"!==this.playerConfig.domEventType||(e=this.playerConfig.domEventType),e}},{key:"on",value:function(e,t){var n=this;e&&t&&this.player?"string"==typeof e?(this.__events[e]=t,this.player.on(e,t)):Array.isArray(e)&&e.forEach((function(e){n.__events[e]=t,n.player.on(e,t)})):ES(this.pluginName,"plugin.on(event, callback)")}},{key:"once",value:function(e,t){var n=this;e&&t&&this.player?"string"==typeof e?(this.__onceEvents[e]=t,this.player.once(e,t)):Array.isArray(e)&&e.forEach((function(i){n.__onceEvents[i]=t,n.player.once(e,t)})):ES(this.pluginName,"plugin.once(event, callback)")}},{key:"off",value:function(e,t){var n=this;e&&t&&this.player?"string"==typeof e?(delete this.__events[e],this.player.off(e,t)):Array.isArray(e)&&e.forEach((function(i){delete n.__events[e],n.player.off(i,t)})):ES(this.pluginName,"plugin.off(event, callback)")}},{key:"offAll",value:function(){var e=this;["__events","__onceEvents"].forEach((function(t){nw(e[t]).forEach((function(n){e[t][n]&&e.off(n,e[t][n]),n&&delete e[t][n]}))})),this.__events={},this.__onceEvents={}}},{key:"emit",value:function(e){var t,n;if(this.player){for(var i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];(n=this.player).emit.apply(n,Im(t=[e]).call(t,r))}}},{key:"emitUserAction",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.player){var i=QE(QE({},n),{},{pluginName:this.pluginName});this.player.emitUserAction(e,t,i)}}},{key:"hook",value:function(e,t){var n;return vS.call.apply(vS,Im(n=[this]).call(n,iw(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){for(var n,i=arguments.length,r=new Array(i>2?i-2:0),o=2;o<i;o++)r[o-2]=arguments[o];return gS.call.apply(gS,Im(n=[this]).call(n,iw(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){for(var n,i=arguments.length,r=new Array(i>2?i-2:0),o=2;o<i;o++)r[o-2]=arguments[o];return yS.call.apply(yS,Im(n=[this]).call(n,iw(Array.prototype).call(arguments)))}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(this.player)return n&&(t.pluginName=n),this.player.registerPlugin({plugin:e,options:t})}},{key:"getPlugin",value:function(e){return this.player?this.player.getPlugin(e):null}},{key:"__destroy",value:function(){var e,t=this,n=this.player,i=this.pluginName;this.offAll(),uT.clearAllTimers(this),uT.checkIsFunction(this.destroy)&&this.destroy(),Ik(e=["player","playerConfig","pluginName","logger","__args","__hooks"]).call(e,(function(e){t[e]=null})),n.unRegisterPlugin(i),kS(this)}}],[{key:"defineGetterOrSetter",value:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&aE(e,n,t[n])}},{key:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),e}();if("undefined"!=typeof Element&&!Element.prototype.matches){var xS=Element.prototype;xS.matches=xS.matchesSelector||xS.mozMatchesSelector||xS.msMatchesSelector||xS.oMatchesSelector||xS.webkitMatchesSelector}var TS=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}};function SS(e,t,n,i,r){var o=AS.apply(this,arguments);return e.addEventListener(n,o,r),{destroy:function(){e.removeEventListener(n,o,r)}}}function AS(e,t,n,i){return function(n){n.delegateTarget=TS(n.target,t),n.delegateTarget&&i.call(e,n)}}var PS=function(e,t,n,i,r){return"function"==typeof e.addEventListener?SS.apply(null,arguments):"function"==typeof n?SS.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Ik(Array.prototype).call(e,(function(e){return SS(e,t,n,i,r)})))},OS=n(PS),IS={CONTROLS:"controls",ROOT:"root"},RS={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"};function MS(e){return!!e&&(tw(e)&&/^(?:http|data:|\/)/.test(e))}function LS(e,t){var n,i,r=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(e instanceof window.Element)return uT.addClass(e,r),Ik(i=nw(o)).call(i,(function(t){e.setAttribute(t,o[t])})),e;if(MS(e)||MS(e.url))return o.src=MS(e)?e:e.url||"",s=uT.createDom(e.tag||"img","",o,"xg-img ".concat(r));if("function"==typeof e)try{var l,u;return(s=e())instanceof window.Element?(uT.addClass(s,r),Ik(l=nw(o)).call(l,(function(e){s.setAttribute(e,o[e])})),s):(sT.logWarn(Im(u="warn>>icons.".concat(t," in config of plugin named [")).call(u,a,"] is a function mast return an Element Object")),null)}catch(c){return sT.logError("Plugin named [".concat(a,"]:createIcon"),c),null}return"string"==typeof e?uT.createDomFromHtml(e,o,r):(sT.logWarn(Im(n="warn>>icons.".concat(t," in config of plugin named [")).call(n,a,"] is invalid")),null)}function DS(e,t){var n,i=t.config.icons||t.playerConfig.icons;Ik(n=nw(e)).call(n,(function(n){var r=e[n],o=r&&r.class?r.class:"",a=r&&r.attr?r.attr:{},s=null;i&&i[n]&&(o=function(e,t){var n;return"object"===eC(e)&&e.class&&"string"==typeof e.class?Im(n="".concat(t," ")).call(n,e.class):t}(i[n],o),a=function(e,t){var n;return"object"===eC(e)&&e.attr&&"object"===eC(e.attr)&&Ik(n=nw(e.attr)).call(n,(function(n){t[n]=e.attr[n]})),t}(i[n],a),s=LS(i[n],n,o,a,t.pluginName)),!s&&r&&(s=LS(r.icon?r.icon:r,a,o,{},t.pluginName)),t.icons[n]=s}))}var NS=function(e){oC(n,e);var t=cC(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return tC(this,n),(e=t.call(this,i)).__delegates=[],e}return iC(n,[{key:"__init",value:function(e){if(hC(aC(n.prototype),"__init",this).call(this,e),e.root){var t=e.root,i=null;this.icons={},this.root=null,this.parent=null,DS(this.registerIcons()||{},this),this.langText={};var r,o,a,s=this.registerLanguageTexts()||{};o=this,Ik(a=nw(r=s)).call(a,(function(e){aE(o.langText,e,{get:function(){var t=o.lang,n=o.i18n;return n[e]?n[e]:r[e]&&r[e][t]||""}})}));var l="";try{l=this.render()}catch(f){var u;throw sT.logError("Plugin:".concat(this.pluginName,":render"),f),new Error(Im(u="Plugin:".concat(this.pluginName,":render:")).call(u,f.message))}if(l)(i=n.insert(l,t,e.index)).setAttribute("data-index",e.index);else{if(!e.tag)return;(i=uT.createDom(e.tag,"",e.attr,e.name)).setAttribute("data-index",e.index),t.appendChild(i)}this.root=i,this.parent=t;var c=this.config.attr||{},h=this.config.style||{};this.setAttr(c),this.setStyle(h),this.config.index&&this.root.setAttribute("data-index",this.config.index),this.__registerChildren()}}},{key:"__registerChildren",value:function(){var e=this;if(this.root){this._children=[];var t,n=this.children();if(n&&"object"===eC(n))if(nw(n).length>0)Ik(t=nw(n)).call(t,(function(t){var i,r,o=t,a=n[o],s={root:e.root};"function"==typeof a?(i=e.config[o]||{},r=a):"object"===eC(a)&&"function"==typeof a.plugin&&(i=a.options?uT.deepCopy(e.config[o]||{},a.options):e.config[o]||{},r=a.plugin),s.config=i,void 0!==i.index&&(s.index=i.index),i.root&&(s.root=i.root),e.registerPlugin(r,s,o)}))}}},{key:"updateLang",value:function(e){e||(e=this.lang);var t=this.root,n=this.i18n,i=this.langText;t&&function e(t,n){for(var i=0;i<t.children.length;i++)t.children[i].children.length>0?e(t.children[i],n):n(t.children[i])}(t,(function(t){var r=t.getAttribute&&t.getAttribute("lang-key");if(r){var o=n[r.toUpperCase()]||i[r];o&&(t.innerHTML="function"==typeof o?o(e):o)}}))}},{key:"lang",get:function(){return this.player.lang}},{key:"changeLangTextKey",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.i18n||{},i=this.langText;e.setAttribute&&e.setAttribute("lang-key",t);var r=n[t]||i[t]||"";r&&(e.innerHTML=r)}},{key:"plugins",value:function(){return this._children}},{key:"children",value:function(){return{}}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";t.root=t.root||this.root;var r=hC(aC(n.prototype),"registerPlugin",this).call(this,e,t,i);return this._children.push(r),r}},{key:"registerIcons",value:function(){return{}}},{key:"registerLanguageTexts",value:function(){return{}}},{key:"find",value:function(e){if(this.root)return this.root.querySelector(e)}},{key:"bind",value:function(e,t,i){var r=this;if(arguments.length<3&&"function"==typeof t)Array.isArray(e)?e.forEach((function(e){r.bindEL(e,t)})):this.bindEL(e,t);else{var o,a=n.delegate.call(this,this.root,e,t,i);this.__delegates=Im(o=this.__delegates).call(o,a)}}},{key:"unbind",value:function(e,t){var n=this;if(arguments.length<3&&"function"==typeof t)Array.isArray(e)?e.forEach((function(e){n.unbindEL(e,t)})):this.unbindEL(e,t);else for(var i,r=Im(i="".concat(e,"_")).call(i,t),o=0;o<this.__delegates.length;o++)if(this.__delegates[o].key===r){var a;this.__delegates[o].destroy(),Cw(a=this.__delegates).call(a,o,1);break}}},{key:"setStyle",value:function(e,t){var n,i=this;if(this.root)return"String"===uT.typeOf(e)?this.root.style[e]=t:void("Object"===uT.typeOf(e)&&Ik(n=nw(e)).call(n,(function(t){i.root.style[t]=e[t]})))}},{key:"setAttr",value:function(e,t){var n,i=this;if(this.root)return"String"===uT.typeOf(e)?this.root.setAttribute(e,t):void("Object"===uT.typeOf(e)&&Ik(n=nw(e)).call(n,(function(t){i.root.setAttribute(t,e[t])})))}},{key:"setHtml",value:function(e,t){this.root&&(this.root.innerHTML=e,"function"==typeof t&&t())}},{key:"bindEL",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.root&&"on".concat(e)in this.root&&"function"==typeof t&&this.root.addEventListener(e,t,n)}},{key:"unbindEL",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.root&&"on".concat(e)in this.root&&"function"==typeof t&&this.root.removeEventListener(e,t,n)}},{key:"show",value:function(e){if(this.root)return this.root.style.display=void 0!==e?e:"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(e,t){if(!this.root)return null;if(arguments.length<2&&arguments[0]instanceof window.Element)return this.root.appendChild(arguments[0]);if(!(t&&t instanceof window.Element))return null;try{return"string"==typeof e?jm(this).call(this,e).appendChild(t):e.appendChild(t)}catch(n){return sT.logError("Plugin:appendChild",n),null}}},{key:"render",value:function(){return""}},{key:"destroy",value:function(){}},{key:"__destroy",value:function(){var e,t,i,r=this,o=this.player;(Ik(e=this.__delegates).call(e,(function(e){e.destroy()})),this.__delegates=[],this._children instanceof Array)&&(Ik(i=this._children).call(i,(function(e){o.unRegisterPlugin(e.pluginName)})),this._children=null);this.root&&(this.root.hasOwnProperty("remove")?this.root.remove():this.root.parentNode&&this.root.parentNode.removeChild(this.root)),hC(aC(n.prototype),"__destroy",this).call(this),this.icons={},Ik(t=["root","parent"]).call(t,(function(e){r[e]=null}))}}],[{key:"insert",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=t.children.length,r=Number(n),o=e instanceof window.Node;if(i){for(var a=0,s=null,l="";a<i;a++){s=t.children[a];var u=Number(s.getAttribute("data-index"));if(u>=r){l="beforebegin";break}u<r&&(l="afterend")}return o?"afterend"===l?t.appendChild(e):t.insertBefore(e,s):s.insertAdjacentHTML(l,e),"afterend"===l?t.children[t.children.length-1]:t.children[a]}return o?t.appendChild(e):t.insertAdjacentHTML("beforeend",e),t.children[t.children.length-1]}},{key:"defaultConfig",get:function(){return{}}},{key:"delegate",value:function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=[];if(e instanceof window.Node&&"function"==typeof i)if(Array.isArray(n))n.forEach((function(n){var a,s=OS(e,t,n,i,r);s.key=Im(a="".concat(t,"_")).call(a,n),o.push(s)}));else{var a,s=OS(e,t,n,i,r);s.key=Im(a="".concat(t,"_")).call(a,n),o.push(s)}return o}},{key:"ROOT_TYPES",get:function(){return IS}},{key:"POSITIONS",get:function(){return RS}}]),n}(CS),FS=function(){function e(){var t=this;if(tC(this,e),rC(this,"__trigger",(function(e){var n=(new Date).getTime();t.timeStamp=n;for(var i=0;i<e.length;i++)t.__runHandler(e[i].target)})),this.__handlers=[],this.timeStamp=0,this.observer=null,window.ResizeObserver)try{this.observer=new window.ResizeObserver(function(e,t,n){var i=!0,r=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return cT(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),hT(e,t,{leading:i,trailing:r,maxWait:t})}(this.__trigger,100,{trailing:!0})),this.timeStamp=(new Date).getTime()}catch(n){console.error(n)}}return iC(e,[{key:"addObserver",value:function(e,t){if(this.observer){this.observer&&this.observer.observe(e);for(var n=e.getAttribute(dS),i=this.__handlers,r=-1,o=0;o<i.length;o++)i[o]&&e===i[o].target&&(r=o);r>-1?this.__handlers[r].handler=t:this.__handlers.push({target:e,handler:t,playerId:n})}}},{key:"unObserver",value:function(e){var t,n,i=-1;Ik(t=this.__handlers).call(t,(function(t,n){e===t.target&&(i=n)}));try{this.observer&&this.observer.unobserve(e)}catch(r){}this.observer&&this.observer.unobserve(e),i>-1&&Cw(n=this.__handlers).call(n,i,1)}},{key:"destroyObserver",value:function(){this.observer&&this.observer.disconnect(),this.observer=null,this.__handlers=null}},{key:"__runHandler",value:function(e){for(var t=this.__handlers,n=0;n<t.length;n++)if(t[n]&&e===t[n].target){try{t[n].handler(e)}catch(CR){console.error(CR)}return!0}return!1}}]),e}(),HS=null;var US={pluginGroup:{},init:function(e){var t,n,i=e._pluginInfoId;i||(i=(new Date).getTime(),e._pluginInfoId=i),!e.config.closeResizeObserver&&(t=e.root,n=function(){e.resize()},HS||(HS=new FS),HS.addObserver(t,n)),0===nw(this.pluginGroup).length&&(e.isUserActive=!0),this.pluginGroup[i]={_player:e,_originalOptions:e.config||{},_plugins:{}}},checkPlayerRoot:function(e){if(this.pluginGroup){for(var t=nw(this.pluginGroup),n=0;n<t.length;n++){var i=this.pluginGroup[t[n]]._player;if(i.root===e)return i}return null}return null},formatPluginInfo:function(e,t){var n=null,i=null;return e.plugin&&"function"==typeof e.plugin?(n=e.plugin,i=e.options):(n=e,i={}),t&&(i.config=t||{}),{PLUFGIN:n,options:i}},checkPluginIfExits:function(e,t){for(var n=0;n<t.length;n++)if(e.toLowerCase()===t[n].pluginName.toLowerCase())return!0;return!1},getRootByConfig:function(e,t){for(var n=nw(t),i=null,r=0;r<n.length;r++)if(e.toLowerCase()===n[r].toLowerCase()){i=t[n[r]];break}return"Object"===uT.typeOf(i)?{root:i.root,position:i.position}:{}},lazyRegister:function(e,t){var n=this,i=t.timeout||1500;return Rk.race([t.loader().then((function(t){var i;i=t&&t.__esModule?t.default:t,n.register(e,i,t.options)})),new Rk((function(e,t){setTimeout((function(){t(new Error("timeout"))}),i)}))])},register:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e&&t&&"function"==typeof t&&void 0!==t.prototype){var i=e._pluginInfoId;if(i&&this.pluginGroup[i]){this.pluginGroup[i]._plugins||(this.pluginGroup[i]._plugins={});var r=this.pluginGroup[i]._plugins,o=this.pluginGroup[i]._originalOptions;n.player=this.pluginGroup[i]._player;var a=n.pluginName||t.pluginName;if(!a)throw new Error("The property pluginName is necessary");if(!t.isSupported||t.isSupported(e.config.mediaType,e.config.codecType)){n.config||(n.config={});for(var s=nw(o),l=0;l<s.length;l++)if(a.toLowerCase()===s[l].toLowerCase()){var u=o[s[l]];"Object"===uT.typeOf(u)?n.config=PC({},n.config,o[s[l]]):"Boolean"===uT.typeOf(u)&&(n.config.disable=!u);break}t.defaultConfig&&nw(t.defaultConfig).forEach((function(e){void 0===n.config[e]&&(n.config[e]=t.defaultConfig[e])})),n.root?"string"==typeof n.root&&(n.root=e[n.root]):n.root=e.root,n.index=n.config.index||0;try{r[a.toLowerCase()]&&(this.unRegister(i,a.toLowerCase()),console.warn("the is one plugin with same pluginName [".concat(a,"] exist, destroy the old instance")));var c=new t(n);return r[a.toLowerCase()]=c,r[a.toLowerCase()].func=t,c&&"function"==typeof c.afterCreate&&c.afterCreate(),c}catch(h){throw console.error(h),h}}else console.warn("not supported plugin [".concat(a,"]"))}}},unRegister:function(e,t){e._pluginInfoId&&(e=e._pluginInfoId),t=t.toLowerCase();try{var n=this.pluginGroup[e]._plugins[t];n&&(n.pluginName&&n.__destroy(),delete this.pluginGroup[e]._plugins[t])}catch(r){var i;console.error(Im(i="[unRegister:".concat(t,"] cgid:[")).call(i,e,"] error"),r)}},deletePlugin:function(e,t){var n=e._pluginInfoId;n&&this.pluginGroup[n]&&this.pluginGroup[n]._plugins&&delete this.pluginGroup[n]._plugins[t]},getPlugins:function(e){var t=e._pluginInfoId;return t&&this.pluginGroup[t]?this.pluginGroup[t]._plugins:{}},findPlugin:function(e,t){var n=e._pluginInfoId;if(!n||!this.pluginGroup[n])return null;var i=t.toLowerCase();return this.pluginGroup[n]._plugins[i]},beforeInit:function(e){var t=this;function n(e){return e&&e.then?e:new Rk((function(e){e()}))}return new Rk((function(i){if(t.pluginGroup)return(e._loadingPlugins&&e._loadingPlugins.length?Rk.all(e._loadingPlugins):Rk.resolve()).then((function(){var r,o=e._pluginInfoId;if(t.pluginGroup[o]){var a=t.pluginGroup[o]._plugins,s=[];nw(a).forEach((function(e){if(a[e]&&a[e].beforePlayerInit)try{var t=a[e].beforePlayerInit();s.push(n(t))}catch(i){throw s.push(n(null)),i}})),Rk.all(Im(r=[]).call(r,s)).then((function(){i()})).catch((function(e){console.error(e),i()}))}else i()}))}))},afterInit:function(e){var t=e._pluginInfoId;if(t&&this.pluginGroup[t]){var n=this.pluginGroup[t]._plugins;nw(n).forEach((function(e){n[e]&&n[e].afterPlayerInit&&n[e].afterPlayerInit()}))}},setLang:function(e,t){var n=t._pluginInfoId;if(n&&this.pluginGroup[n]){var i=this.pluginGroup[n]._plugins;nw(i).forEach((function(t){if(i[t].updateLang)i[t].updateLang(e);else try{i[t].lang=e}catch(CR){console.warn("".concat(t," setLang"))}}))}},reRender:function(e){var t=this,n=e._pluginInfoId;if(n&&this.pluginGroup[n]){var i=[],r=this.pluginGroup[n]._plugins;nw(r).forEach((function(e){"controls"!==e&&r[e]&&(i.push({plugin:r[e].func,options:r[e].__args}),t.unRegister(n,e))})),i.forEach((function(n){t.register(e,n.plugin,n.options)}))}},onPluginsReady:function(e){var t=e._pluginInfoId;if(t&&this.pluginGroup[t]){var n=this.pluginGroup[t]._plugins||{};nw(n).forEach((function(e){n[e].onPluginsReady&&"function"==typeof n[e].onPluginsReady&&n[e].onPluginsReady()}))}},setCurrentUserActive:function(e,t){if(this.pluginGroup[e]){if(!t)return this.pluginGroup[e]._player.isUserActive=t,e;for(var n=nw(this.pluginGroup),i=0;i<n.length;i++){var r=this.pluginGroup[n[i]];r&&r._player&&(this.pluginGroup[n[i]]._player.isUserActive=!1)}return this.pluginGroup[e]._player.isUserActive=t,e}},getCurrentUseActiveId:function(){if(this.pluginGroup){for(var e=nw(this.pluginGroup),t=0;t<e.length;t++){var n=this.pluginGroup[e[t]];if(n&&n._player&&n._player.isUserActive)return e[t]}return null}},destroy:function(e){var t=e._pluginInfoId;if(this.pluginGroup[t]){var n,i;n=e.root,HS.unObserver(n,i);for(var r=this.pluginGroup[t]._plugins,o=0,a=nw(r);o<a.length;o++){var s=a[o];this.unRegister(t,s)}var l=e.isUseActive;if(delete this.pluginGroup[t],delete e._pluginInfoId,l){var u=nw(this.pluginGroup);u.length>0&&this.setCurrentUserActive(u[u.length-1],!0)}}}},jS="xgplayer",BS="xgplayer-is-enter",VS="xgplayer-pause",GS="xgplayer-playing",zS="xgplayer-ended",KS="xgplayer-isloading",WS="xgplayer-is-error",YS="xgplayer-replay",XS="xgplayer-nostart",qS="xgplayer-inactive",ZS="xgplayer-is-fullscreen",$S="xgplayer-is-cssfullscreen",JS="xgplayer-rotate-fullscreen",QS="xgplayer-rotate-parent",eA="xgplayer-fullscreen-parent",tA="xgplayer-fullscreen-inner",nA="no-controls",iA="flex-controls",rA="controls-autohide",oA="top-bar-autohide",aA="not-allow-autoplay",sA="seeking";function lA(){return{id:"",el:null,url:"",domEventType:"default",nullUrlStart:!1,width:600,height:337.5,fluid:!1,fitVideoSize:"fixed",videoFillMode:"auto",volume:.6,autoplay:!1,autoplayMuted:!1,loop:!1,isLive:!1,zoom:1,videoInit:!0,poster:"",isMobileSimulateMode:!1,defaultPlaybackRate:1,execBeforePluginsCall:null,allowSeekAfterEnded:!0,enableContextmenu:!0,closeVideoClick:!1,closeVideoDblclick:!1,closePlayerBlur:!1,closeDelayBlur:!1,leavePlayerTime:3e3,closePlayVideoFocus:!1,closePauseVideoFocus:!1,closeFocusVideoFocus:!0,closeControlsBlur:!0,topBarAutoHide:!0,videoAttributes:{},startTime:0,seekedStatus:"play",miniprogress:!1,disableSwipeHandler:function(){},enableSwipeHandler:function(){},ignores:[],whitelist:[],inactive:3e3,lang:fT(),controls:!0,marginControls:!1,fullscreenTarget:null,screenShot:!1,rotate:!1,pip:!1,download:!1,mini:!1,cssFullscreen:!0,keyShortcut:!0,presets:[],plugins:[],playbackRate:1,definition:{list:[]},playsinline:!0,customDuration:0,timeOffset:0,icons:{},i18n:[],tabindex:0,thumbnail:null,videoConfig:{},isHideTips:!1,minWaitDelay:200,commonStyle:{progressColor:"",playedColor:"",cachedColor:"",sliderBtnStyle:{},volumeColor:""}}}var uA=function(e){oC(n,e);var t=cC(n);function n(){var e,i;tC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return rC(lC(i=t.call.apply(t,Im(e=[this]).call(e,o))),"onMouseEnter",(function(e){var t=lC(i),n=t.player;t.playerConfig.closeControlsBlur&&n.focus({autoHide:!1})})),rC(lC(i),"onMouseLeave",(function(){lC(i).player.focus()})),i}return iC(n,[{key:"beforeCreate",value:function(e){e.config.mode||"mobile"!==gT.device||(e.config.mode="flex"),e.player.config.marginControls&&(e.config.autoHide=!1)}},{key:"afterCreate",value:function(){var e,t=this,n=this.config,i=n.disable,r=n.height,o=n.mode;if(!i){"flex"===o&&this.player.addClass(iA);var a={height:"".concat(r,"px")};Ik(e=nw(a)).call(e,(function(e){t.root.style[e]=a[e]})),this.left=jm(this).call(this,"xg-left-grid"),this.center=jm(this).call(this,"xg-center-grid"),this.right=jm(this).call(this,"xg-right-grid"),this.innerRoot=jm(this).call(this,"xg-inner-controls"),this.on(WT,(function(e){e?uT.addClass(t.root,"mini-controls"):uT.removeClass(t.root,"mini-controls")}));var s=this.playerConfig.isMobileSimulateMode;"mobile"!==gT.device&&"mobile"!==s&&(this.bind("mouseenter",this.onMouseEnter),this.bind("mouseleave",this.onMouseLeave))}}},{key:"focus",value:function(){this.player.focus({autoHide:!1})}},{key:"focusAwhile",value:function(){this.player.focus({autoHide:!0})}},{key:"blur",value:function(){this.player.blur({ignorePaused:!0})}},{key:"recoverAutoHide",value:function(){this.config.autoHide&&uT.addClass(this.root,rA)}},{key:"pauseAutoHide",value:function(){uT.removeClass(this.root,rA)}},{key:"show",value:function(){uT.addClass(this.root,"show")}},{key:"hide",value:function(){uT.removeClass(this.root,"show")}},{key:"mode",get:function(){return this.config.mode}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;if(this.root){var r=e.defaultConfig||{};if(!t.root){switch(t.position?t.position:t.config&&t.config.position?t.config.position:r.position){case RS.CONTROLS_LEFT:t.root=this.left;break;case RS.CONTROLS_RIGHT:t.root=this.right;break;case RS.CONTROLS_CENTER:t.root=this.center;break;case RS.CONTROLS:t.root=this.root;break;default:t.root=this.left}return hC(aC(n.prototype),"registerPlugin",this).call(this,e,t,i)}}}},{key:"destroy",value:function(){"mobile"!==gT.device&&(this.unbind("mouseenter",this.onMouseEnter),this.unbind("mouseleave",this.onMouseLeave))}},{key:"render",value:function(){var e=this.config,t=e.mode,n=e.autoHide,i=e.initShow;if(!e.disable){var r=uT.classNames({"xgplayer-controls":!0},{"flex-controls":"flex"===t},{"bottom-controls":"bottom"===t},rC({},rA,n),{"xgplayer-controls-initshow":i||!n});return'<xg-controls class="'.concat(r,'" unselectable="on">\n <xg-inner-controls class="xg-inner-controls xg-pos">\n <xg-left-grid class="xg-left-grid">\n </xg-left-grid>\n <xg-center-grid class="xg-center-grid"></xg-center-grid>\n <xg-right-grid class="xg-right-grid">\n </xg-right-grid>\n </xg-inner-controls>\n </xg-controls>')}}}],[{key:"pluginName",get:function(){return"controls"}},{key:"defaultConfig",get:function(){return{disable:!1,autoHide:!0,mode:"",initShow:!1}}}]),n}(NS),cA={lang:{},langKeys:[],textKeys:[]};function hA(e,t){return nw(t).forEach((function(n){var i,r=uT.typeOf(t[n]),o=uT.typeOf(e[n]);"Array"===r?("Array"!==o&&(e[n]=[]),(i=e[n]).push.apply(i,fC(t[n]))):"Object"===r?("Object"!==o&&(e[n]={}),hA(e[n],t[n])):e[n]=t[n]})),e}function fA(){var e;Ik(e=nw(cA.lang.en)).call(e,(function(e){cA.textKeys[e]=e}))}function dA(e,t){var n=e.LANG;if(t||(t=cA),t.lang){var i=e.TEXT||{};"zh"===n&&(n="zh-cn"),t.lang[n]?hA(t.lang[n],i):(t.langKeys.push(n),t.lang[n]=i),fA()}}dA({LANG:"en",TEXT:{ERROR_TYPES:{network:{code:1,msg:"video download error"},mse:{code:2,msg:"stream append error"},parse:{code:3,msg:"parsing error"},format:{code:4,msg:"wrong format"},decoder:{code:5,msg:"decoding error"},runtime:{code:6,msg:"grammatical errors"},timeout:{code:7,msg:"play timeout"},other:{code:8,msg:"other errors"}},HAVE_NOTHING:"There is no information on whether audio/video is ready",HAVE_METADATA:"Audio/video metadata is ready ",HAVE_CURRENT_DATA:"Data about the current play location is available, but there is not enough data to play the next frame/millisecond",HAVE_FUTURE_DATA:"Current and at least one frame of data is available",HAVE_ENOUGH_DATA:"The available data is sufficient to start playing",NETWORK_EMPTY:"Audio/video has not been initialized",NETWORK_IDLE:"Audio/video is active and has been selected for resources, but no network is used",NETWORK_LOADING:"The browser is downloading the data",NETWORK_NO_SOURCE:"No audio/video source was found",MEDIA_ERR_ABORTED:"The fetch process is aborted by the user",MEDIA_ERR_NETWORK:"An error occurred while downloading",MEDIA_ERR_DECODE:"An error occurred while decoding",MEDIA_ERR_SRC_NOT_SUPPORTED:"Audio/video is not supported",REPLAY:"Replay",ERROR:"Network is offline",PLAY_TIPS:"Play",PAUSE_TIPS:"Pause",PLAYNEXT_TIPS:"Play next",DOWNLOAD_TIPS:"Download",ROTATE_TIPS:"Rotate",RELOAD_TIPS:"Reload",FULLSCREEN_TIPS:"Fullscreen",EXITFULLSCREEN_TIPS:"Exit fullscreen",CSSFULLSCREEN_TIPS:"Cssfullscreen",EXITCSSFULLSCREEN_TIPS:"Exit cssfullscreen",TEXTTRACK:"Caption",PIP:"PIP",SCREENSHOT:"Screenshot",LIVE:"LIVE",OFF:"Off",OPEN:"Open",MINI_DRAG:"Click and hold to drag",MINISCREEN:"Miniscreen",REFRESH_TIPS:"Please Try",REFRESH:"Refresh",FORWARD:"forward",LIVE_TIP:"Live"}});var pA={get textKeys(){return cA.textKeys},get langKeys(){return cA.langKeys},get lang(){var e,t={};return Ik(e=cA.langKeys).call(e,(function(e){t[e]=cA.lang[e]})),cA.lang["zh-cn"]&&(t.zh=cA.lang["zh-cn"]||{}),t},extend:function(e,t){var n=[];if(t||(t=cA),t.lang){var i;if("Array"!==uT.typeOf(e))n=Ik(i=nw(e)).call(i,(function(t){return{LANG:"zh"===t?"zh-cn":t,TEXT:e[t]}}));else n=e;var r=t.lang;Ik(n).call(n,(function(e){"zh"===e.LANG&&(e.LANG="zh-cn"),r[e.LANG]?hA(r[e.LANG]||{},e.TEXT||{}):dA(e,t)})),fA()}},use:dA,init:function(e){var t,n={lang:{},langKeys:[],textKeys:{},pId:e};return hA(n.lang,cA.lang),(t=n.langKeys).push.apply(t,fC(cA.langKeys)),hA(n.textKeys,cA.textKeys),n}},vA=1,gA=2,yA=3,mA=4,_A=5,bA=6,kA=7,wA=["ERROR","INITIAL","READY","ATTACHING","ATTACHED","NOTALLOW","RUNNING","ENDED","DESTROYED"],EA=["play","pause","replay","retry"],CA=0,xA=0,TA=function(e){oC(n,e);var t=cC(n);function n(e){var i;tC(this,n);var r,o=uT.deepMerge(lA(),e);rC(lC(i=t.call(this,o)),"canPlayFunc",(function(){if(i.config){var e=i.config,t=e.autoplay,n=e.startTime,r=e.defaultPlaybackRate;sT.logInfo("player","canPlayFunc, startTime",n),n&&(i.currentTime=n>i.duration?i.duration:n,i.config.startTime=0),i.playbackRate=r,(t||i._useAutoplay)&&i.mediaPlay(),i.off(AT,i.canPlayFunc),i.removeClass(BS)}})),rC(lC(i),"onFullscreenChange",(function(e,t){var n=function(){uT.setTimeout(lC(i),(function(){i.resize()}),100)},r=uT.getFullScreenEl();i._fullActionFrom?i._fullActionFrom="":i.emit(tS,{eventType:"system",action:"switch_fullscreen",pluginName:"player",currentTime:i.currentTime,duration:i.duration,props:[{prop:"fullscreen",from:!0,to:!1}]});var o=function(e,t,n){if(e){var i=e.getAttribute(n);return!(!i||i!==t||"VIDEO"!==e.tagName&&"AUDIO"!==e.tagName)}}(r,i.playerId,dS);if(t||r&&(r===i._fullscreenEl||o))n(),!i.config.closeFocusVideoFocus&&i.media.focus(),i.fullscreen=!0,i.changeFullStyle(i.root,r,ZS),i.emit(zT,!0,i._fullScreenOffset),i.cssfullscreen&&i.exitCssFullscreen();else if(i.fullscreen){n();var a=lC(i),s=a._fullScreenOffset;a.config.needFullscreenScroll?(window.scrollTo(s.left,s.top),uT.setTimeout(lC(i),(function(){i.fullscreen=!1,i._fullScreenOffset=null}),100)):(!i.config.closeFocusVideoFocus&&i.media.focus(),i.fullscreen=!1,i._fullScreenOffset=null),i.cssfullscreen?i.removeClass(ZS):i.recoverFullStyle(i.root,i._fullscreenEl,ZS),i._fullscreenEl=null,i.emit(zT,!1)}})),rC(lC(i),"_onWebkitbeginfullscreen",(function(e){i._fullscreenEl=i.media,i.onFullscreenChange(e,!0)})),rC(lC(i),"_onWebkitendfullscreen",(function(e){i.onFullscreenChange(e,!1)})),bS(lC(i),EA),i.config=o,i._pluginInfoId=uT.generateSessionId(),(r=lC(i)).logInfo=sT.logInfo.bind(r),r.logWarn=sT.logWarn.bind(r),r.logError=sT.logError.bind(r);var a=i.constructor.defaultPreset;if(i.config.presets.length){var s,l=tw(s=i.config.presets).call(s,"default");l>=0&&a&&(i.config.presets[l]=a)}else a&&i.config.presets.push(a);if(i.userTimer=null,i.waitTimer=null,i._state=vA,i.isError=!1,i._hasStart=!1,i.isSeeking=!1,i.isCanplay=!1,i._useAutoplay=!1,i.rotateDeg=0,i.isActive=!1,i.fullscreen=!1,i.cssfullscreen=!1,i.isRotateFullscreen=!1,i._fullscreenEl=null,i._cssfullscreenEl=null,i.curDefinition=null,i._orgCss="",i._fullScreenOffset=null,i._videoHeight=0,i._videoWidth=0,i.videoPos={pi:1,scale:0,rotate:0,x:0,y:0,h:-1,w:-1,vy:0,vx:0},i._accPlayed={t:0,acc:0,loopAcc:0},i.innerContainer=null,i.controls=null,i.topBar=null,i.root=null,i.__i18n=pA.init(i._pluginInfoId),gT.os.isAndroid&&gT.osVersion>0&&gT.osVersion<6&&(i.config.autoplay=!1),i.database=new uS,i.isUserActive=!1,i._onceSeekCanplay=null,i._isPauseBeforeSeek=0,!i._initDOM())return console.error(new Error("can't find the dom which id is ".concat(i.config.id," or this.config.el does not exist"))),uC(i);var u=i.config,c=u.definition,h=void 0===c?{}:c;if(!u.url&&h.list&&h.list.length>0){var f,d=jm(f=h.list).call(f,(function(e){return e.definition&&e.definition===h.defaultDefinition}));d||(h.defaultDefinition=h.list[0].definition,d=h.list[0]),i.config.url=d.url,i.curDefinition=d}return i._bindEvents(),i._registerPresets(),i._registerPlugins(),US.onPluginsReady(lC(i)),i.getInitDefinition(),i.setState(gA),uT.setTimeout(lC(i),(function(){i.emit(DT)}),0),i.onReady&&i.onReady(),(i.config.videoInit||i.config.autoplay)&&(!i.hasStart||i.state<mA)&&i.start(),i}return iC(n,[{key:"_initDOM",value:function(){var e,t,n,i=this;if(this.root=this.config.id?document.getElementById(this.config.id):null,!this.root){var r=this.config.el;if(!r||1!==r.nodeType)return this.emit(CT,new bT("use",this.config.vid,{line:32,handle:"Constructor",msg:"container id can't be empty"})),console.error("this.confg.id or this.config.el can't be empty"),!1;this.root=r}var o=US.checkPlayerRoot(this.root);o&&(sT.logWarn("The is an Player instance already exists in this.root, destroy it and reinitialize"),o.destroy()),this.root.setAttribute(dS,this.playerId),US.init(this),this._initBaseDoms();var a=this.constructor.XgVideoProxy;if(a&&this.mediaConfig.mediaType===a.mediaType){var s=this.innerContainer||this.root;this.detachVideoEvents(this.media);var l=new a(s,this.config,this.mediaConfig);this.attachVideoEvents(l),this.media=l}if(this.media.setAttribute(dS,this.playerId),this.config.controls){var u=this.config.controls.root||null,c=US.register(this,uA,{root:u});this.controls=c}var h="mobile"===this.config.isMobileSimulateMode?"mobile":gT.device;if(this.addClass(Im(e=Im(t=Im(n="".concat(jS," ")).call(n,qS," xgplayer-")).call(t,h," ")).call(e,this.config.controls?"":nA)),this.config.autoplay?this.addClass(BS):this.addClass(XS),this.config.fluid){var f=this.config,d=f.width,p=f.height;"number"==typeof d&&"number"==typeof p||(d=600,p=337.5);var v={width:"100%",height:"0","max-width":"100%","padding-top":"".concat(100*p/d,"%")};nw(v).forEach((function(e){i.root.style[e]=v[e]}))}else["width","height"].forEach((function(e){i.config[e]&&("number"!=typeof i.config[e]?i.root.style[e]=i.config[e]:i.root.style[e]="".concat(i.config[e],"px"))}));return!0}},{key:"_initBaseDoms",value:function(){this.topBar=null,this.leftBar=null,this.rightBar=null,this.config.marginControls&&(this.innerContainer=uT.createDom("xg-video-container","",{"data-index":-1},"xg-video-container"),this.root.appendChild(this.innerContainer))}},{key:"_bindEvents",value:function(){var e=this;["focus","blur"].forEach((function(t){e.on(t,e["on"+t.charAt(0).toUpperCase()+iw(t).call(t,1)])})),cS.forEach((function(t){document&&document.addEventListener(t,e.onFullscreenChange)})),gT.os.isIos&&(this.media.addEventListener("webkitbeginfullscreen",this._onWebkitbeginfullscreen),this.media.addEventListener("webkitendfullscreen",this._onWebkitendfullscreen)),this.once(IT,this.resize),this.playFunc=function(){e.config.closeFocusVideoFocus||e.media.focus()},this.once(kT,this.playFunc)}},{key:"_unbindEvents",value:function(){var e=this;this.root.removeEventListener("mousemove",this.mousemoveFunc),cS.forEach((function(t){document.removeEventListener(t,e.onFullscreenChange)})),this.playFunc&&this.off(kT,this.playFunc),this.off(AT,this.canPlayFunc),this.media.removeEventListener("webkitbeginfullscreen",this._onWebkitbeginfullscreen),this.media.removeEventListener("webkitendfullscreen",this._onWebkitendfullscreen)}},{key:"_startInit",value:function(e){var t=this;if(this.media&&(e&&""!==e&&("Array"!==uT.typeOf(e)||0!==e.length)||(e="",this.emit(NT),sT.logWarn("config.url is null, please get url and run player._startInit(url)"),!this.config.nullUrlStart))){this._detachSourceEvents(this.media),"Array"===uT.typeOf(e)&&e.length>0?this._attachSourceEvents(this.media,e):this.media.src&&this.media.src===e?e||this.media.removeAttribute("src"):this.media.src=e,"Number"===uT.typeOf(this.config.volume)&&(this.volume=this.config.volume);var n=this.innerContainer?this.innerContainer:this.root;this.media instanceof window.Element&&!n.contains(this.media)&&n.insertBefore(this.media,n.firstChild);var i=this.media.readyState;sT.logInfo("_startInit readyState",i),this.config.autoplay&&(!/^blob/.test(this.media.currentSrc)&&!/^blob/.test(this.media.src)&&this.load(),(gT.os.isIpad||gT.os.isPhone)&&this.mediaPlay()),i>=2?this.canPlayFunc():this.once(AT,this.canPlayFunc),(!this.hasStart||this.state<mA)&&US.afterInit(this),this.hasStart=!0,this.setState(mA),uT.setTimeout(this,(function(){t.emit(UT)}),0)}}},{key:"_registerPlugins",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._loadingPlugins=[];var n=this.config.ignores||[],i=this.config.plugins||[],r=this.config.i18n||[];t&&pA.extend(r,this.__i18n);var o=n.join("||").toLowerCase().split("||"),a=this.plugins;i.forEach((function(n){try{var i=n.plugin?n.plugin.pluginName:n.pluginName;if(i&&tw(o).call(o,i.toLowerCase())>-1)return null;if(!t&&a[i.toLowerCase()])return;if(n.lazy&&n.loader){var r=US.lazyRegister(e,n);return void(n.forceBeforeInit&&(r.then((function(){var t,n;Cw(t=e._loadingPlugins).call(t,tw(n=e._loadingPlugins).call(n,r),1)})).catch((function(t){var n,i;sT.logError("_registerPlugins:loadingPlugin",t),Cw(n=e._loadingPlugins).call(n,tw(i=e._loadingPlugins).call(i,r),1)})),e._loadingPlugins.push(r)))}return e.registerPlugin(n)}catch(s){sT.logError("_registerPlugins:",s)}}))}},{key:"_registerPresets",value:function(){var e=this;this.config.presets.forEach((function(t){!function(e,t){var n,i,r,o=t.preset&&t.options?new t.preset(t.options,e.config):new t({},e.config),a=o.plugins,s=void 0===a?[]:a,l=o.ignores,u=void 0===l?[]:l,c=o.icons,h=void 0===c?{}:c,f=o.i18n,d=void 0===f?[]:f;e.config.plugins||(e.config.plugins=[]),e.config.ignores||(e.config.ignores=[]),(i=e.config.plugins).push.apply(i,fC(s)),(r=e.config.ignores).push.apply(r,fC(u)),Ik(n=nw(h)).call(n,(function(t){e.config.icons[t]||(e.config.icons[t]=h[t])}));var p=e.config.i18n||[];d.push.apply(d,fC(p)),e.config.i18n=d}(e,t)}))}},{key:"_getRootByPosition",value:function(e){var t=null;switch(e){case RS.ROOT_RIGHT:this.rightBar||(this.rightBar=uT.createPositionBar("xg-right-bar",this.root)),t=this.rightBar;break;case RS.ROOT_LEFT:this.leftBar||(this.leftBar=uT.createPositionBar("xg-left-bar",this.root)),t=this.leftBar;break;case RS.ROOT_TOP:this.topBar||(this.topBar=uT.createPositionBar("xg-top-bar",this.root),this.config.topBarAutoHide&&uT.addClass(this.topBar,oA)),t=this.topBar;break;default:t=this.innerContainer||this.root}return t}},{key:"registerPlugin",value:function(e,t){var n=US.formatPluginInfo(e,t),i=n.PLUFGIN,r=n.options,o=this.config.plugins;!US.checkPluginIfExits(i.pluginName,o)&&o.push(i);var a=US.getRootByConfig(i.pluginName,this.config);a.root&&(r.root=a.root),a.position&&(r.position=a.position);var s=r.position?r.position:r.config&&r.config.position||i.defaultConfig&&i.defaultConfig.position;return!r.root&&"string"==typeof s&&tw(s).call(s,"controls")>-1?this.controls&&this.controls.registerPlugin(i,r,i.pluginName):(r.root||(r.root=this._getRootByPosition(s)),US.register(this,i,r))}},{key:"deregister",value:function(e){"string"==typeof e?US.unRegister(this,e):e instanceof CS&&US.unRegister(this,e.pluginName)}},{key:"unRegisterPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.deregister(e),t&&this.removePluginFromConfig(e)}},{key:"removePluginFromConfig",value:function(e){var t;if("string"==typeof e?t=e:e instanceof CS&&(t=e.pluginName),t)for(var n=this.config.plugins.length-1;n>-1;n--){if(this.config.plugins[n].pluginName.toLowerCase()===t.toLowerCase()){var i;Cw(i=this.config.plugins).call(i,n,1);break}}}},{key:"plugins",get:function(){return US.getPlugins(this)}},{key:"getPlugin",value:function(e){var t=US.findPlugin(this,e);return t&&t.pluginName?t:null}},{key:"addClass",value:function(e){this.root&&(uT.hasClass(this.root,e)||uT.addClass(this.root,e))}},{key:"removeClass",value:function(e){this.root&&uT.removeClass(this.root,e)}},{key:"hasClass",value:function(e){if(this.root)return uT.hasClass(this.root,e)}},{key:"setAttribute",value:function(e,t){this.root&&this.root.setAttribute(e,t)}},{key:"removeAttribute",value:function(e,t){this.root&&this.root.removeAttribute(e,t)}},{key:"start",value:function(e){var t=this;if(!(this.state>yA))return e||this.config.url||this.getInitDefinition(),this.hasStart=!0,this.setState(yA),this._registerPlugins(!1),US.beforeInit(this).then((function(){if(t.config)return e||(e=t.url||t.config.url),t._startInit(e)})).catch((function(e){throw e.fileName="player",e.lineNumber="236",sT.logError("start:beforeInit:",e),e}))}},{key:"switchURL",value:function(e,t){var n=this,i=e;"Object"===uT.typeOf(e)&&(i=e.url);var r=this.currentTime,o=this.paused&&!this.isError;return this.src=i,new Rk((function(e,t){var a=function(e){n.off("timeupdate",s),n.off("canplay",s),t(e)},s=function(){n.currentTime=r,o&&n.pause(),n.off("error",a),e(!0)};n.once("error",a),i?(gT.os.isAndroid?n.once("timeupdate",s):n.once("canplay",s),n.play()):n.errorHandler("error",{code:6,message:"empty_src"})}))}},{key:"videoPlay",value:function(){this.mediaPlay()}},{key:"mediaPlay",value:function(){var e=this;if(!this.hasStart&&this.state<mA)return this.removeClass(XS),this.addClass(BS),this.start(),void(this._useAutoplay=!0);this.state<bA&&(this.removeClass(XS),!this.isCanplay&&this.addClass(BS));var t=hC(aC(n.prototype),"play",this).call(this);return void 0!==t&&t&&t.then?t.then((function(){e.removeClass(aA),e.addClass(GS),e.state<bA&&(sT.logInfo(">>>>playPromise.then"),e.setState(bA),e.emit(FT))})).catch((function(t){if(sT.logWarn(">>>>playPromise.catch",t.name),e.media&&e.media.error)return e.onError(),void e.removeClass(BS);"NotAllowedError"===t.name&&(e._errorTimer=uT.setTimeout(e,(function(){e._errorTimer=null,e.emit(HT),e.addClass(aA),e.removeClass(BS),e.pause(),e.setState(_A)}),0))})):(sT.logWarn("video.play not return promise"),this.state<bA&&(this.setState(bA),this.removeClass(aA),this.removeClass(XS),this.removeClass(BS),this.addClass(GS),this.emit(FT))),t}},{key:"mediaPause",value:function(){hC(aC(n.prototype),"pause",this).call(this)}},{key:"videoPause",value:function(){hC(aC(n.prototype),"pause",this).call(this)}},{key:"play",value:function(){var e=this;return this.removeClass(VS),wS(this,"play",(function(){return e.mediaPlay()}))}},{key:"pause",value:function(){var e=this;wS(this,"pause",(function(){hC(aC(n.prototype),"pause",e).call(e)}))}},{key:"seek",value:function(e,t){var n=this;if(this.media&&!xw(Number(e))&&this.hasStart){var i=this.config,r=i.isSeekedPlay,o=i.seekedStatus,a=t||(r?"play":o);e=e<0?0:e>this.duration?Yw(this.duration,10):e,!this._isPauseBeforeSeek&&(this._isPauseBeforeSeek=this.paused?2:1),this._onceSeekCanplay&&this.off(xT,this._onceSeekCanplay),this._onceSeekCanplay=function(){switch(n.removeClass(BS),n.isSeeking=!1,a){case"play":n.play();break;case"pause":n.pause();break;default:n._isPauseBeforeSeek>1||n.paused?n.pause():n.play()}n._isPauseBeforeSeek=0,n._onceSeekCanplay=null},this.once(xT,this._onceSeekCanplay),this.state<bA?(this.removeClass(XS),this.currentTime=e,this.play()):this.currentTime=e}}},{key:"getInitDefinition",value:function(){var e,t=this,n=this.config,i=n.definition;!n.url&&i&&i.list&&i.list.length>0&&i.defaultDefinition&&Ik(e=i.list).call(e,(function(e){e.definition===i.defaultDefinition&&(t.config.url=e.url,t.curDefinition=e)}))}},{key:"changeDefinition",value:function(e,t){var n=this,i=this.config.definition;if(Array.isArray(null==i?void 0:i.list)&&i.list.forEach((function(t){(null==e?void 0:e.definition)===t.definition&&(n.curDefinition=t)})),null!=e&&e.bitrate&&"number"!=typeof e.bitrate&&(e.bitrate=Yw(e.bitrate,10)||0),this.emit(YT,{from:t,to:e}),this.hasStart){var r=this.switchURL(e.url,QE({seamless:!1!==i.seamless&&"undefined"!=typeof MediaSource&&"function"==typeof MediaSource.isTypeSupported},e));r&&r.then?r.then((function(){n.emit(qT,{from:t,to:e})})):this.emit(qT,{from:t,to:e})}else this.config.url=e.url}},{key:"reload",value:function(){this.load(),this.reloadFunc=function(){this.play()},this.once(IT,this.reloadFunc)}},{key:"resetState",value:function(){var e=this,t=[aA,GS,XS,VS,YS,BS,zS,WS,KS];this.hasStart=!1,this.isError=!1,this._useAutoplay=!1,this.mediaPause(),this._accPlayed.acc=0,this._accPlayed.t=0,this._accPlayed.loopAcc=0,t.forEach((function(t){e.removeClass(t)})),this.addClass(BS),this.emit(nS)}},{key:"reset",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;if(this.resetState(),this.plugins&&(Ik(t).call(t,(function(t){e.deregister(t)})),n)){var i,r=lA();tE(i=nw(this.config)).call(i,(function(t){"undefined"===e.config[t]||"plugins"!==t&&"presets"!==t&&"el"!==t&&"id"!==t||(e.config[t]=r[t])}))}}},{key:"destroy",value:function(){var e,t=this,i=this.innerContainer,r=this.root,o=this.media;if(r&&o){if(this.hasStart=!1,this._useAutoplay=!1,r.removeAttribute(dS),this.updateAcc("destroy"),this._unbindEvents(),this._detachSourceEvents(this.media),uT.clearAllTimers(this),this.emit(BT),US.destroy(this),kS(this),hC(aC(n.prototype),"destroy",this).call(this),this.fullscreen&&this._fullscreenEl===this.root&&this.exitFullscreen(),i)for(var a=i.children,s=0;s<a.length;s++)i.removeChild(a[s]);!i&&o instanceof window.Node&&r.contains(o)&&r.removeChild(o),Ik(e=["topBar","leftBar","rightBar","innerContainer"]).call(e,(function(e){t[e]&&r.removeChild(t[e]),t[e]=null}));var l=r.className.split(" ");l.length>0?r.className=Mk(l).call(l,(function(e){return tw(e).call(e,"xgplayer")<0})).join(" "):r.className="",this.removeAttribute("data-xgfill"),["isSeeking","isCanplay","isActive","cssfullscreen","fullscreen"].forEach((function(e){t[e]=!1}))}}},{key:"replay",value:function(){var e=this;this.removeClass(zS),this.currentTime=0,this.isSeeking=!1,wS(this,"replay",(function(){e.once(xT,(function(){var t=e.mediaPlay();t&&t.catch&&t.catch((function(e){console.log(e)}))})),e.play(),e.emit(jT),e.onPlay()}))}},{key:"retry",value:function(){var e=this;this.removeClass(WS),this.addClass(KS),wS(this,"retry",(function(){var t=e.currentTime;e.src=e.config.url,!e.config.isLive&&(e.currentTime=t),e.once(AT,(function(){e.mediaPlay()}))}))}},{key:"changeFullStyle",value:function(e,t,n,i){e&&(i||(i=eA),this._orgCss||(this._orgCss=uT.filterStyleFromText(e)),uT.addClass(e,n),t&&t!==e&&!this._orgPCss&&(this._orgPCss=uT.filterStyleFromText(t),uT.addClass(t,i),t.setAttribute(dS,this.playerId)))}},{key:"recoverFullStyle",value:function(e,t,n,i){i||(i=eA),this._orgCss&&(uT.setStyleFromCsstext(e,this._orgCss),this._orgCss=""),uT.removeClass(e,n),t&&t!==e&&this._orgPCss&&(uT.setStyleFromCsstext(t,this._orgPCss),this._orgPCss="",uT.removeClass(t,i),t.removeAttribute(dS))}},{key:"getFullscreen",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.fullscreenTarget,t=this.root,n=this.media;if(e||(e=t),this._fullScreenOffset={top:uT.scrollTop(),left:uT.scrollLeft()},this._fullscreenEl=e,this._fullActionFrom="get",uT.getFullScreenEl()!==this._fullscreenEl)try{for(var i=0;i<hS.length;i++){var r=hS[i];if(e[r]){var o="webkitRequestFullscreen"===r?e.webkitRequestFullscreen(window.Element.ALLOW_KEYBOARD_INPUT):e[r]();return o&&o.then?o:Rk.resolve()}}return n.fullscreenEnabled||n.webkitSupportsFullscreen?(n.webkitEnterFullscreen(),Rk.resolve()):Rk.reject(new Error("call getFullscreen fail"))}catch(a){return Rk.reject(new Error("call getFullscreen fail"))}else this.onFullscreenChange()}},{key:"exitFullscreen",value:function(e){if(this.isRotateFullscreen&&this.exitRotateFullscreen(),this._fullscreenEl||uT.getFullScreenEl()){this.root;var t=this.media;this._fullActionFrom="exit";try{for(var n=0;n<fS.length;n++){var i=fS[n];if(document[i]){var r=document[i]();return r&&r.then?r:Rk.resolve()}}return t&&t.webkitSupportsFullscreen?(t.webkitExitFullScreen(),Rk.resolve()):Rk.reject(new Error("call exitFullscreen fail"))}catch(o){return Rk.reject(new Error("call exitFullscreen fail"))}}}},{key:"getCssFullscreen",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.fullscreenTarget;this.isRotateFullscreen?this.exitRotateFullscreen():this.fullscreen&&this.exitFullscreen();var n=t?Im(e="".concat(tA," ")).call(e,$S):$S;this.changeFullStyle(this.root,t,n);var i=this.config.fullscreen,r=void 0===i?{}:i;(!0===r.useCssFullscreen||"function"==typeof r.useCssFullscreen&&r.useCssFullscreen())&&(this.fullscreen=!0,this.emit(zT,!0)),this._cssfullscreenEl=t,this.cssfullscreen=!0,this.emit(KT,!0)}},{key:"exitCssFullscreen",value:function(){var e,t=this._cssfullscreenEl?Im(e="".concat(tA," ")).call(e,$S):$S;if(this.fullscreen){var n=this.config.fullscreen,i=void 0===n?{}:n;!0===i.useCssFullscreen||"function"==typeof i.useCssFullscreen&&i.useCssFullscreen()?(this.recoverFullStyle(this.root,this._cssfullscreenEl,t),this.fullscreen=!1,this.emit(zT,!1)):this.removeClass(t)}else this.recoverFullStyle(this.root,this._cssfullscreenEl,t);this._cssfullscreenEl=null,this.cssfullscreen=!1,this.emit(KT,!1)}},{key:"getRotateFullscreen",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.fullscreenTarget;this.cssfullscreen&&this.exitCssFullscreen(t);var n=t?Im(e="".concat(tA," ")).call(e,JS):JS;this._fullscreenEl=t||this.root,this.changeFullStyle(this.root,t,n,QS),this.isRotateFullscreen=!0,this.fullscreen=!0,this.setRotateDeg(90),this._rootStyle=this.root.getAttribute("style"),this.root.style.width="".concat(window.innerHeight,"px"),this.emit(zT,!0)}},{key:"exitRotateFullscreen",value:function(e){var t,n=this._fullscreenEl!==this.root?Im(t="".concat(tA," ")).call(t,JS):JS;this.recoverFullStyle(this.root,this._fullscreenEl,n,QS),this.isRotateFullscreen=!1,this.fullscreen=!1,this.setRotateDeg(0),this.emit(zT,!1),this._rootStyle&&(this.root.style.style=this._rootStyle,this._rootStyle=!1)}},{key:"setRotateDeg",value:function(e){90===window.orientation||-90===window.orientation?this.rotateDeg=0:this.rotateDeg=e}},{key:"focus",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{autoHide:!this.config.closeDelayBlur,delay:this.config.inactive};this.isActive?this.onFocus(e):this.emit(MT,QE({paused:this.paused,ended:this.ended},e))}},{key:"blur",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{ignorePaused:!1};this.isActive?this.emit(LT,QE({paused:this.paused,ended:this.ended},e)):this.onBlur(e)}},{key:"onFocus",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.autoHide,i=void 0===n?!this.config.closePlayerBlur:n,r=t.delay,o=void 0===r?this.config.inactive:r;this.isActive=!0,this.removeClass(qS),this.userTimer&&(uT.clearTimeout(this,this.userTimer),this.userTimer=null),i?this.userTimer=uT.setTimeout(this,(function(){e.userTimer=null,e.blur()}),o):this.userTimer&&(uT.clearTimeout(this,this.userTimer),this.userTimer=null)}},{key:"onBlur",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).ignorePaused,t=void 0!==e&&e;if(this.isActive){var n=this.config.closePauseVideoFocus;this.isActive=!1,(t||n||!this.paused&&!this.ended)&&this.addClass(qS)}}},{key:"onEmptied",value:function(){this.updateAcc("emptied")}},{key:"onCanplay",value:function(){this.removeClass(BS),this.removeClass(WS),this.removeClass(KS),this.isCanplay=!0,this.waitTimer&&uT.clearTimeout(this,this.waitTimer)}},{key:"onLoadeddata",value:function(){this.isError=!1,this.isSeeking=!1}},{key:"onLoadstart",value:function(){this.removeClass(WS),this.isCanplay=!1}},{key:"onPlay",value:function(){this.state===kA&&this.setState(bA),this.removeClass(VS),this.ended&&this.removeClass(zS),!this.config.closePlayVideoFocus&&this.focus()}},{key:"onPause",value:function(){this.addClass(VS),this.updateAcc("pause"),this.config.closePauseVideoFocus||(this.userTimer&&(uT.clearTimeout(this,this.userTimer),this.userTimer=null),this.focus())}},{key:"onEnded",value:function(){this.updateAcc("ended"),this.addClass(zS),this.setState(kA)}},{key:"onError",value:function(){this.isError=!0,this.updateAcc("error"),this.removeClass(aA),this.removeClass(XS),this.removeClass(BS),this.removeClass(KS),this.addClass(WS)}},{key:"onSeeking",value:function(){this.isSeeking||this.updateAcc("seeking"),this.isSeeking=!0,this.addClass(sA)}},{key:"onSeeked",value:function(){this.isSeeking=!1,this.waitTimer&&uT.clearTimeout(this,this.waitTimer),this.removeClass(KS),this.removeClass(sA)}},{key:"onWaiting",value:function(){var e=this;this.waitTimer&&uT.clearTimeout(this,this.waitTimer),this.updateAcc("waiting"),this.waitTimer=uT.setTimeout(this,(function(){e.addClass(KS),uT.clearTimeout(e,e.waitTimer),e.waitTimer=null}),this.config.minWaitDelay)}},{key:"onPlaying",value:function(){var e=this;this.isError=!1,[XS,VS,zS,WS,YS,KS].forEach((function(t){e.removeClass(t)}))}},{key:"onTimeupdate",value:function(){!this._videoHeight&&this.resize(),(this.waitTimer||this.hasClass(KS))&&this.media.readyState>2&&(this.removeClass(KS),uT.clearTimeout(this,this.waitTimer),this.waitTimer=null),!this.paused&&this.state<bA&&this.duration&&(this.setState(bA),this.emit(FT)),this._accPlayed.t||this.paused||this.ended||(this._accPlayed.t=(new Date).getTime())}},{key:"onVolumechange",value:function(){"Number"===uT.typeOf(this.config.volume)&&(this.config.volume=this.volume)}},{key:"onRatechange",value:function(){this.config.defaultPlaybackRate=this.playbackRate}},{key:"emitUserAction",value:function(e,t,n){if(this.media&&t&&e){var i="String"===uT.typeOf(e)?e:e.type||"";n.props&&"Array"!==uT.typeOf(n.props)&&(n.props=[n.props]),this.emit(tS,QE({eventType:i,action:t,currentTime:this.currentTime,duration:this.duration,ended:this.ended,event:e},n))}}},{key:"updateAcc",value:function(e){if(this._accPlayed.t){var t=(new Date).getTime()-this._accPlayed.t;this._accPlayed.acc+=t,this._accPlayed.t=0,("ended"===e||this.ended)&&(this._accPlayed.loopAcc=this._accPlayed.acc)}}},{key:"checkBuffer",value:function(e){var t=this.media.buffered;if(!t||0===t.length||!this.duration)return!0;for(var n=e||this.media.currentTime||.2,i=t.length,r=0;r<i;r++)if(t.start(r)<=n&&t.end(r)>n)return!0;return!1}},{key:"resizePosition",value:function(){var e=this.videoPos,t=e.rotate,n=e.vy,i=e.vx,r=e.h,o=e.w,a=this.videoPos._pi;if(a||(a=this.media.videoWidth/this.media.videoHeight*100),a){this.videoPos.pi=a;var s={rotate:t},l=0,u=0,c=1,h=Math.abs(t/90),f=this.root,d=this.innerContainer,p=f.offsetWidth,v=d?d.offsetHeight:f.offsetHeight,g=v,y=p;if(h%2==0)c=r>0?100/r:o>0?100/o:1,s.scale=c,l=n>0?(100-r)/2-n:0,s.y=2===h?0-l:l,u=i>0?(100-o)/2-i:0,s.x=2===h?0-u:u,this.media.style.width="".concat(y,"px"),this.media.style.height="".concat(g,"px");else if(h%2==1){g=p;var m=v-p;u=-m/2/(y=v)*100,s.x=3===h?u+n/2:u-n/2,l=m/2/g*100,s.y=3===h?l+i/2:l-i/2,s.scale=c,this.media.style.width="".concat(y,"px"),this.media.style.height="".concat(g,"px")}var _=uT.getTransformStyle(s);this.media.style.transform=_,this.media.style.webkitTransform=_}}},{key:"position",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{h:0,y:0,x:0,w:0};if(this.media&&e&&e.h){var t=this.videoPos;t.h=100*e.h||0,t.w=100*e.w||0,t.vx=100*e.x||0,t.vy=100*e.y||0,this.resizePosition()}}},{key:"setConfig",value:function(e){var t,n=this;e&&Ik(t=nw(e)).call(t,(function(t){if("plugins"!==t){n.config[t]=e[t];var i=n.plugins[t.toLowerCase()];i&&"Function"===uT.typeOf(i.setConfig)&&i.setConfig(e[t])}}))}},{key:"playNext",value:function(e){var t=this;this.resetState(),this.setConfig(e),this._currentTime=0,this._duration=0,wS(this,"playnext",(function(){t.start(),t.emit(QT,e)}))}},{key:"resize",value:function(){var e=this;if(this.media){var t=this.media,n=t.videoWidth,i=t.videoHeight,r=this.config,o=r.fitVideoSize,a=r.videoFillMode;if("fill"!==a&&"cover"!==a||this.setAttribute("data-xgfill",a),i&&n){this._videoHeight=i,this._videoWidth=n;var s=this.root.getBoundingClientRect(),l=this.controls&&this.innerContainer?this.controls.root.getBoundingClientRect().height:0,u=s.width,c=s.height-l,h=Yw(n/i*1e3,10),f=Yw(u/c*1e3,10),d=u,p=c,v={};"auto"===o&&f>h||"fixWidth"===o?(p=u/h*1e3,this.config.fluid?v.paddingTop="".concat(100*p/d,"%"):v.height="".concat(p+l,"px")):("auto"===o&&f<h||"fixHeight"===o)&&(d=h*c/1e3,v.width="".concat(d,"px")),this.fullscreen||this.cssfullscreen||nw(v).forEach((function(t){e.root.style[t]=v[t]})),("fillHeight"===a&&f<h||"fillWidth"===a&&f>h)&&this.setAttribute("data-xgfill","cover");var g={videoScale:h,vWidth:d,vHeight:p,cWidth:d,cHeight:p+l};this.resizePosition(),this.emit($T,g)}}}},{key:"updateObjectPosition",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.media.updateObjectPosition?this.media.updateObjectPosition(t,n):this.media.style.objectPosition=Im(e="".concat(100*t,"% ")).call(e,100*n,"%")}},{key:"setState",value:function(e){var t;sT.logInfo("setState",Im(t="state from:".concat(wA[this.state]," to:")).call(t,wA[e])),this._state=e}},{key:"state",get:function(){return this._state}},{key:"isFullscreen",get:function(){return this.fullscreen}},{key:"isCssfullScreen",get:function(){return this.cssfullscreen}},{key:"hasStart",get:function(){return this._hasStart},set:function(e){"boolean"==typeof e&&(this._hasStart=e,!1===e&&this.setState(gA),this.emit("hasstart"))}},{key:"isPlaying",get:function(){return this._state===bA||this._state===kA},set:function(e){e?this.setState(bA):this._state>=bA&&this.setState(mA)}},{key:"definitionList",get:function(){return this.config&&this.config.definition&&this.config.definition.list||[]},set:function(e){var t=this,n=this.config.definition,i=null,r=null;n.list=e,this.emit("resourceReady",e),e.forEach((function(e){var o;(null===(o=t.curDefinition)||void 0===o?void 0:o.definition)===e.definition&&(i=e),n.defaultDefinition===e.definition&&(r=e)})),!r&&e.length>0&&(r=e[0]),i?this.changeDefinition(i):r&&this.changeDefinition(r)}},{key:"videoFrameInfo",get:function(){var e={total:0,dropped:0,corrupted:0,droppedRate:0,droppedDuration:0};if(!this.media||!this.media.getVideoPlaybackQuality)return e;var t=this.media.getVideoPlaybackQuality();return e.dropped=t.droppedVideoFrames||0,e.total=t.totalVideoFrames||0,e.corrupted=t.corruptedVideoFrames||0,e.total>0&&(e.droppedRate=e.dropped/e.total*100,e.droppedDuration=Yw(this.cumulateTime/e.total*e.dropped,0)),e}},{key:"lang",get:function(){return this.config.lang},set:function(e){var t,n;0!==Mk(t=pA.langKeys).call(t,(function(t){return t===e})).length||"zh"===e?(this.config.lang=e,US.setLang(e,this)):console.error(Im(n="Sorry, set lang fail, because the language [".concat(e,"] is not supported now, list of all supported languages is [")).call(n,pA.langKeys.join(),"] "))}},{key:"i18n",get:function(){var e=this.config.lang;return"zh"===e&&(e="zh-cn"),this.__i18n.lang[e]||this.__i18n.lang.en}},{key:"i18nKeys",get:function(){return this.__i18n.textKeys||{}}},{key:"version",get:function(){return yT}},{key:"playerId",get:function(){return this._pluginInfoId}},{key:"url",get:function(){return this.__url||this.config.url},set:function(e){this.__url=e}},{key:"poster",get:function(){return this.plugins.poster?this.plugins.poster.config.poster:this.config.poster},set:function(e){this.plugins.poster&&this.plugins.poster.update(e)}},{key:"readyState",get:function(){return hC(aC(n.prototype),"readyState",this)}},{key:"error",get:function(){var e=hC(aC(n.prototype),"error",this);return this.i18n[e]||e}},{key:"networkState",get:function(){return hC(aC(n.prototype),"networkState",this)}},{key:"fullscreenChanging",get:function(){return!(null===this._fullScreenOffset)}},{key:"cumulateTime",get:function(){var e=this._accPlayed;return this.updateAcc("get"),e.acc}},{key:"zoom",get:function(){return this.config.zoom},set:function(e){this.config.zoom=e}},{key:"videoRotateDeg",get:function(){return this.videoPos.rotate},set:function(e){(e=uT.convertDeg(e))%90==0&&e!==this.videoPos.rotate&&(this.videoPos.rotate=e,this.resizePosition())}},{key:"avgSpeed",get:function(){return xA},set:function(e){xA=e}},{key:"realTimeSpeed",get:function(){return CA},set:function(e){CA=e}},{key:"hook",value:function(e,t){var n;return vS.call.apply(vS,Im(n=[this]).call(n,iw(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){var n;return gS.call.apply(gS,Im(n=[this]).call(n,iw(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){var n;return yS.call.apply(yS,Im(n=[this]).call(n,iw(Array.prototype).call(arguments)))}},{key:"usePluginHooks",value:function(e,t,n){for(var i,r=arguments.length,o=new Array(r>3?r-3:0),a=3;a<r;a++)o[a-3]=arguments[a];return mS.call.apply(mS,Im(i=[this]).call(i,iw(Array.prototype).call(arguments)))}},{key:"removePluginHooks",value:function(e,t,n){for(var i,r=arguments.length,o=new Array(r>3?r-3:0),a=3;a<r;a++)o[a-3]=arguments[a];return _S.call.apply(_S,Im(i=[this]).call(i,iw(Array.prototype).call(arguments)))}},{key:"setUserActive",value:function(e,t){"boolean"==typeof t&&t!==this.muted&&(this.addInnerOP("volumechange"),this.muted=t),US.setCurrentUserActive(this.playerId,e)}}],[{key:"debugger",get:function(){return sT.config.debug},set:function(e){sT.config.debug=e}},{key:"getCurrentUserActivePlayerId",value:function(){return US.getCurrentUseActiveId()}},{key:"setCurrentUserActive",value:function(e,t){US.setCurrentUserActive(e,t)}},{key:"isHevcSupported",value:function(){return gT.isHevcSupported()}},{key:"probeConfigSupported",value:function(e){return gT.probeConfigSupported(e)}},{key:"install",value:function(e,t){n.plugins||(n.plugins={}),n.plugins[e]||(n.plugins[e]=t)}},{key:"use",value:function(e,t){n.plugins||(n.plugins={}),n.plugins[e]=t}}]),n}(lS);rC(TA,"defaultPreset",null),rC(TA,"XgVideoProxy",null);function SA(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var AA=kE;Pn({target:"Function",proto:!0,forced:Function.bind!==AA},{bind:AA});var PA,OA,IA=Bc("Function").bind,RA=se,MA=IA,LA=Function.prototype,DA=n((function(e){var t=e.bind;return e===LA||RA(LA,e)&&t===LA.bind?MA:t}));function NA(e,t){var n;return(NA=hh?DA(n=hh).call(n):function(e,t){return e.__proto__=t,e})(e,t)}function FA(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Oc(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Ac(e,"prototype",{writable:!1}),t&&NA(e,t)}function HA(e){var t;return(HA=hh?DA(t=Dc).call(t):function(e){return e.__proto__||Dc(e)})(e)}function UA(){if("undefined"==typeof Reflect||!FE)return!1;if(FE.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(FE(Boolean,[],(function(){}))),!0}catch(e){return!1}}function jA(e){var t=UA();return function(){var n,i=HA(e);if(t){var r=HA(this).constructor;n=FE(i,arguments,r)}else n=i.apply(this,arguments);return function(e,t){if(t&&("object"===bc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return SA(e)}(this,n)}}function BA(e,t,n){var i;UA()?BA=DA(i=FE).call(i):BA=function(e,t,n){var i=[null];uh(i).apply(i,t);var r=new(DA(Function).apply(e,i));return n&&NA(r,n.prototype),r};return BA.apply(null,arguments)}function VA(e){var t="function"==typeof Ck?new Ck:void 0;return VA=function(e){if(null===e||(n=e,-1===xm(i=Function.toString.call(n)).call(i,"[native code]")))return e;var n,i;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return BA(e,arguments,HA(this).constructor)}return r.prototype=Oc(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),NA(r,e)},VA(e)}var GA=function(e){return e[e.MANIFEST_HLS_ERROR=1100]="MANIFEST_HLS_ERROR",e[e.MANIFEST_DASH_ERROR=1200]="MANIFEST_DASH_ERROR",e[e.NETWORK=2100]="NETWORK",e[e.NETWORK_TIMEOUT=2101]="NETWORK_TIMEOUT",e[e.NETWORK_FORBIDDEN=2103]="NETWORK_FORBIDDEN",e[e.NETWORK_NOTFOUND=2104]="NETWORK_NOTFOUND",e[e.NETWORK_RANGE_NOT_SATISFIABLE=2116]="NETWORK_RANGE_NOT_SATISFIABLE",e[e.DEMUX_FLV_ERROR=3100]="DEMUX_FLV_ERROR",e[e.DEMUX_HLS_ERROR=3200]="DEMUX_HLS_ERROR",e[e.DEMUX_MP4_ERROR=3300]="DEMUX_MP4_ERROR",e[e.DEMUX_FMP4_ERROR=3400]="DEMUX_FMP4_ERROR",e[e.DEMUX_SIDX_ERROR=3410]="DEMUX_SIDX_ERROR",e[e.REMUX_FMP4_ERROR=4100]="REMUX_FMP4_ERROR",e[e.REMUX_MP4_ERROR=4200]="REMUX_MP4_ERROR",e[e.MEDIA_ERR_ABORTED=5101]="MEDIA_ERR_ABORTED",e[e.MEDIA_ERR_NETWORK=5102]="MEDIA_ERR_NETWORK",e[e.MEDIA_ERR_DECODE=5103]="MEDIA_ERR_DECODE",e[e.MEDIA_ERR_SRC_NOT_SUPPORTED=5104]="MEDIA_ERR_SRC_NOT_SUPPORTED",e[e.MEDIA_ERR_CODEC_NOT_SUPPORTED=5105]="MEDIA_ERR_CODEC_NOT_SUPPORTED",e[e.MEDIA_ERR_URL_EMPTY=5106]="MEDIA_ERR_URL_EMPTY",e[e.MEDIA_MSE_ADD_SB=5200]="MEDIA_MSE_ADD_SB",e[e.MEDIA_MSE_APPEND_BUFFER=5201]="MEDIA_MSE_APPEND_BUFFER",e[e.MEDIA_MSE_OTHER=5202]="MEDIA_MSE_OTHER",e[e.MEDIA_MSE_FULL=5203]="MEDIA_MSE_FULL",e[e.MEDIA_MSE_HIJACK=5204]="MEDIA_MSE_HIJACK",e[e.MEDIA_EME_HIJACK=5301]="MEDIA_EME_HIJACK",e[e.DRM_LICENSE=7100]="DRM_LICENSE",e[e.DRM_CUSTOM_LICENSE=7200]="DRM_CUSTOM_LICENSE",e[e.OTHER=8e3]="OTHER",e[e.RUNTIME_NO_CANPLAY_ERROR=9001]="RUNTIME_NO_CANPLAY_ERROR",e[e.RUNTIME_BUFFERBREAK_ERROR=9002]="RUNTIME_BUFFERBREAK_ERROR",e[e.RUNTIME_BWAITING_TIMEOUT_ERROR=9002]="RUNTIME_BWAITING_TIMEOUT_ERROR",e[e.MODULE_LOAD_ERROR=100]="MODULE_LOAD_ERROR",e.UNKNOWN="UNKNOWN",e}(GA||{}),zA=(Uy(PA={},2100,{messageTextKey:"NETWORK",level:"Error"}),Uy(PA,2101,{messageTextKey:"NETWORK_TIMEOUT",level:"Error"}),Uy(PA,2103,{messageTextKey:"NETWORK_FORBIDDEN",level:"Error"}),Uy(PA,2104,{messageTextKey:"NETWORK_NOTFOUND",level:"Error"}),Uy(PA,5101,{messageTextKey:"MEDIA_ERR_ABORTED",level:"Error"}),Uy(PA,5102,{messageTextKey:"MEDIA_ERR_NETWORK",level:"Error"}),Uy(PA,5103,{messageTextKey:"MEDIA_ERR_DECODE",level:"Error"}),Uy(PA,5104,{messageTextKey:"MEDIA_ERR_SRC_NOT_SUPPORTED",level:"Error"}),Uy(PA,5105,{messageTextKey:"MEDIA_ERR_CODEC_NOT_SUPPORTED",level:"Error"}),Uy(PA,5106,{messageTextKey:"MEDIA_ERR_URL_EMPTY",level:"Error"}),Uy(PA,100,{messageTextKey:"MODULE_LOAD_ERROR",level:"Fatal"}),PA),KA=(Uy(OA={},"manifest",{messageTextKey:"MANIFEST",level:"Error"}),Uy(OA,"network",{messageTextKey:"NETWORK",level:"Error"}),Uy(OA,"demux",{messageTextKey:"DEMUX",level:"Error"}),Uy(OA,"remux",{messageTextKey:"REMUX",level:"Error"}),Uy(OA,"media",{messageTextKey:"MEDIA",level:"Error"}),Uy(OA,"drm",{messageTextKey:"DRM",level:"Error"}),Uy(OA,"other",{messageTextKey:"OTHER",level:"Error"}),Uy(OA,"runtime",{messageTextKey:"RUNTIME",level:"Error"}),OA),WA=function(e){FA(n,e);var t=jA(n);function n(e,i){var r,o,a,s,l,u,c;fm(this,n);var h="string"==typeof e?{message:e}:e,f=null!==(r=null!==(o=null!==(a=null==i?void 0:i.getText(null==h?void 0:h.messageTextKey))&&void 0!==a?a:null==h?void 0:h.message)&&void 0!==o?o:null==h||null===(s=h.error)||void 0===s?void 0:s.message)&&void 0!==r?r:null==i?void 0:i.getText("UNKNOWN");return Uy(SA(c=t.call(this,f)),"errorCode",void 0),Uy(SA(c),"level",void 0),Uy(SA(c),"ext",void 0),c.errorCode=null!==(l=null==h?void 0:h.errorCode)&&void 0!==l?l:"UNKNOWN",c.level=null!==(u=null==h?void 0:h.level)&&void 0!==u?u:"Error",c.ext=null==h?void 0:h.ext,c}return pm(n)}(VA(Error));function YA(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return new WA(By(By({errorCode:e},zA[e]),t),n)}function XA(e,t){var n,i,r=zA[e.errorCode]||KA[e.errorType],o=e.errorCode;return new WA({messageTextKey:null==r?void 0:r.messageTextKey,message:null!==(n=null==e?void 0:e.message)&&void 0!==n?n:o,errorCode:o,level:null!==(i=null==r?void 0:r.level)&&void 0!==i?i:"Error",ext:e},t)}var qA=function(e){oC(n,e);var t=cC(n);function n(){return tC(this,n),t.apply(this,arguments)}return iC(n,[{key:"isEndedShow",get:function(){return this.config.isEndedShow},set:function(e){this.config.isEndedShow=e}},{key:"hide",value:function(){uT.addClass(this.root,"hide")}},{key:"show",value:function(){uT.removeClass(this.root,"hide")}},{key:"beforeCreate",value:function(e){"string"==typeof e.player.config.poster&&(e.config.poster=e.player.config.poster)}},{key:"afterCreate",value:function(){var e=this;this.on(wT,(function(){e.isEndedShow&&uT.removeClass(e.root,"hide")})),this.config.hideCanplay?(this.once(TT,(function(){e.onTimeUpdate()})),this.on(VT,(function(){uT.removeClass(e.root,"hide"),uT.addClass(e.root,"xg-showplay"),e.once(TT,(function(){e.onTimeUpdate()}))}))):this.on(kT,(function(){uT.addClass(e.root,"hide")}))}},{key:"onTimeUpdate",value:function(){var e=this;this.player.currentTime?uT.removeClass(this.root,"xg-showplay"):this.once(TT,(function(){e.onTimeUpdate()}))}},{key:"update",value:function(e){e&&(this.config.poster=e,this.root.style.backgroundImage="url(".concat(e,")"))}},{key:"render",value:function(){var e,t=this.config,n=t.poster,i=t.hideCanplay,r=n?"background-image:url(".concat(n,");"):"";return Im(e='<xg-poster class="xgplayer-poster '.concat(i?"xg-showplay":"",'" style="')).call(e,r,'">\n </xg-poster>')}}],[{key:"pluginName",get:function(){return"poster"}},{key:"defaultConfig",get:function(){return{isEndedShow:!0,hideCanplay:!1,poster:""}}}]),n}(NS);function ZA(){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 $A(){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}var JA={};function QA(e){var t;e?window.clearTimeout(e):Ik(t=nw(JA)).call(t,(function(e){window.clearTimeout(JA[e].id),delete JA[e]}))}var eP=function(e){oC(n,e);var t=cC(n);function n(e){var i;return tC(this,n),rC(lC(i=t.call(this,e)),"onPlayerReset",(function(){i.autoPlayStart=!1;var e="auto"===i.config.mode?"auto-hide":"hide";i.setAttr("data-state","play"),uT.removeClass(i.root,e),i.show()})),rC(lC(i),"onAutoplayStart",(function(){if(!i.autoPlayStart){var e="auto"===i.config.mode?"auto-hide":"hide";uT.addClass(i.root,e),i.autoPlayStart=!0,i.onPlayPause("play")}})),i.autoPlayStart=!1,i}return iC(n,[{key:"afterCreate",value:function(){var e=this,t=this.player,n=this.playerConfig;this.initIcons(),this.once(DT,(function(){n&&(n.lang&&"en"===n.lang?uT.addClass(t.root,"lang-is-en"):"jp"===n.lang&&uT.addClass(t.root,"lang-is-jp"))})),this.on(FT,this.onAutoplayStart),n.autoplay||this.show(),this.on(HT,(function(){var t="auto"===e.config.mode?"auto-hide":"hide";e.setAttr("data-state","play"),uT.removeClass(e.root,t),e.show()})),this.on(kT,(function(){e.onPlayPause("play")})),this.on(ET,(function(){e.onPlayPause("pause")})),this.on(nS,(function(){e.onPlayerReset()})),this.clickHandler=this.hook("startClick",this.switchPausePlay,{pre:function(t){t.cancelable&&t.preventDefault(),t.stopPropagation();var n=e.player.paused;e.emitUserAction(t,"switch_play_pause",{props:"paused",from:n,to:!n})}}),this.bind(["click","touchend"],this.clickHandler)}},{key:"registerIcons",value:function(){return{startPlay:{icon:ZA,class:"xg-icon-play"},startPause:{icon:$A,class:"xg-icon-pause"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild("xg-start-inner",e.startPlay),this.appendChild("xg-start-inner",e.startPause)}},{key:"hide",value:function(){uT.addClass(this.root,"hide")}},{key:"show",value:function(){uT.removeClass(this.root,"hide")}},{key:"focusHide",value:function(){uT.addClass(this.root,"focus-hide")}},{key:"recover",value:function(){uT.removeClass(this.root,"focus-hide")}},{key:"switchStatus",value:function(e){e?this.setAttr("data-state",this.player.paused?"pause":"play"):this.setAttr("data-state",this.player.paused?"play":"pause")}},{key:"animate",value:function(e){var t=this;this._animateId=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{start:null,end:null};return JA[e]&&window.clearTimeout(JA[e].id),JA[e]={},n.start&&n.start(),JA[e].id=window.setTimeout((function(){n.end&&n.end(),window.clearTimeout(JA[e].id),delete JA[e]}),t),JA[e].id}("pauseplay",400,{start:function(){uT.addClass(t.root,"interact"),t.show(),t.switchStatus(!0)},end:function(){uT.removeClass(t.root,"interact"),!e&&t.hide(),t._animateId=null}})}},{key:"endAnimate",value:function(){uT.removeClass(this.root,"interact"),QA(this._animateId),this._animateId=null}},{key:"switchPausePlay",value:function(e){var t=this.player;(e.cancelable&&e.preventDefault(),e.stopPropagation(),t.state<gA)||(this.player.paused||t.state!==bA?t.play():t.pause())}},{key:"onPlayPause",value:function(e){var t=this.config,n=this.player;if(n&&!(n.state<bA)&&this.autoPlayStart){if("show"===t.mode)return this.switchStatus(),void this.show();if("auto"!==t.mode){if(t.isShowPause&&n.paused&&!n.ended||t.isShowEnd&&n.ended)return this.switchStatus(),this.show(),void this.endAnimate();if(t.disableAnimate)return this.switchStatus(),void this.hide();if("play"===e)this.autoPlayStart?this.animate():this.hide();else{if(!this.autoPlayStart||n.ended)return;this.animate()}}else this.switchStatus()}}},{key:"destroy",value:function(){this.unbind(["click","touchend"],this.clickHandler),QA(this._animateId)}},{key:"render",value:function(){var e=this.playerConfig.autoplay?"auto"===this.config.mode?"auto-hide":"hide":"";return'\n <xg-start class="xgplayer-start '.concat(e,'">\n <xg-start-inner></xg-start-inner>\n </xg-start>')}}],[{key:"pluginName",get:function(){return"start"}},{key:"defaultConfig",get:function(){return{isShowPause:!1,isShowEnd:!1,disableAnimate:!1,mode:"hide"}}}]),n}(NS),tP=function(e){oC(n,e);var t=cC(n);function n(){return tC(this,n),t.apply(this,arguments)}return iC(n,[{key:"render",value:function(){var e=this.config.innerHtml,t=uT.createDom("xg-enter","",{},"xgplayer-enter");if(e&&e instanceof window.HTMLElement)t.appendChild(e);else if(e&&"string"==typeof e)t.innerHTML=e;else{for(var n="",i=1;i<=12;i++)n+='<div class="xgplayer-enter-bar'.concat(i,'"></div>');t.innerHTML='<div class="xgplayer-enter-spinner">'.concat(n,"</div>")}return t}}],[{key:"pluginName",get:function(){return"enter"}},{key:"defaultConfig",get:function(){return{innerHtml:"",logo:""}}}]),n}(NS);function nP(e,t,n){try{var i,r;return Im(i=Im(r=' <div class="xg-tips '.concat(n?"hide":" ",'" lang-key="')).call(r,e.i18nKeys[t],'">\n ')).call(i,e.i18n[t],"\n </div>")}catch(o){return'<div class="xg-tips hide"></div>'}}var iP=function(e){oC(n,e);var t=cC(n);function n(){return tC(this,n),t.apply(this,arguments)}return iC(n,[{key:"afterCreate",value:function(){this.getMini=this.getMini.bind(this),this.exitMini=this.exitMini.bind(this),this.bind("click",this.getMini)}},{key:"getMini",value:function(){this.config.onClick&&this.config.onClick()}},{key:"exitMini",value:function(){this.config.onClick&&this.config.onClick()}},{key:"destroy",value:function(){this.unbind(["click","touchend"],this.getMini)}},{key:"render",value:function(){var e,t="MINISCREEN";return Im(e='\n <xg-icon class="xgplayer-miniicon">\n <div class="xgplayer-icon btn-text"><span class="icon-text" lang-key="'.concat(this.i18nKeys[t],'">')).call(e,this.i18n[t],"</span></div>\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"miniscreenIcon"}},{key:"defaultConfig",get:function(){return{position:RS.CONTROLS_RIGHT,index:10}}}]),n}(NS);function rP(e){var t=lx(e);return-1===tw(e).call(e,"%")&&!xw(t)&&t}var oP=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],aP=oP.length;function sP(e){if("string"==typeof e&&(e=document.querySelector(e)),e&&"object"===eC(e)&&e.nodeType){var t=function(e){return window.getComputedStyle(e)}(e);if("none"===t.display)return function(){for(var e={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},t=0;t<aP;t++)e[oP[t]]=0;return e}();var n={};n.width=e.offsetWidth,n.height=e.offsetHeight;for(var i=n.isBorderBox="border-box"===t.boxSizing,r=0;r<aP;r++){var o=oP[r],a=t[o],s=lx(a);n[o]=xw(s)?0:s}var l=n.paddingLeft+n.paddingRight,u=n.paddingTop+n.paddingBottom,c=n.marginLeft+n.marginRight,h=n.marginTop+n.marginBottom,f=n.borderLeftWidth+n.borderRightWidth,d=n.borderTopWidth+n.borderBottomWidth,p=i,v=rP(t.width);!1!==v&&(n.width=v+(p?0:l+f));var g=rP(t.height);return!1!==g&&(n.height=g+(p?0:u+d)),n.innerWidth=n.width-(l+f),n.innerHeight=n.height-(u+d),n.outerWidth=n.width+c,n.outerHeight=n.height+h,n}}function lP(e,t){for(var n=0;n<e.length;n++){var i=e[n];if(i.identifier===t)return i}}var uP="dragStart",cP="dragMove",hP="dragEnded",fP={mousedown:["mousemove","mouseup"],touchstart:["touchmove","touchend","touchcancel"],pointerdown:["pointermove","pointerup","pointercancel"]},dP=function(e){oC(n,e);var t=cC(n);function n(e){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return tC(this,n),(i=t.call(this)).isEnabled=!0,i.isDragging=!1,i.isDown=!1,i.position={},i.downPoint={},i.dragPoint={x:0,y:0},i.startPos={x:0,y:0},i._root=e instanceof Element?e:document.querySelector(e),i._handlerDom=r.handle instanceof Element?r.handle:document.querySelector(r.handle),i._root&&i._handlerDom?(i._bindStartEvent(),i):uC(i)}return iC(n,[{key:"_bindStartEvent",value:function(){var e,t=this;"ontouchstart"in window?this._startKey="touchstart":this._startKey="mousedown",this["on".concat(this._startKey)]=this["on".concat(this._startKey)].bind(this),this._handlerDom.addEventListener(this._startKey,this["on".concat(this._startKey)]),Ik(e=fP[this._startKey]).call(e,(function(e){t["on".concat(e)]=t["on".concat(e)].bind(t)}))}},{key:"_unbindStartEvent",value:function(){this._handlerDom.removeEventListener(this._startKey,this["on".concat(this._startKey)])}},{key:"_bindPostStartEvents",value:function(e){var t=this;if(e){var n=fP[this._startKey];Ik(n).call(n,(function(e){window.addEventListener(e,t["on".concat(e)])})),this._boundPointerEvents=n}}},{key:"_unbindPostStartEvents",value:function(){var e,t=this;this._boundPointerEvents&&(Ik(e=this._boundPointerEvents).call(e,(function(e){window.removeEventListener(e,t["on".concat(e)])})),delete this._boundPointerEvents)}},{key:"enable",value:function(){this.isEnabled=!0}},{key:"disable",value:function(){this.isEnabled=!1,this.isDragging&&this.onUp()}},{key:"onDocUp",value:function(e){this.onUp()}},{key:"animate",value:function(){var e=this;this.isDragging&&(this.positionDrag(),window.requestAnimationFrame((function(){e.animate()})))}},{key:"positionDrag",value:function(){var e,t=Im(e="translate3d(".concat(this.dragPoint.x,"px, ")).call(e,this.dragPoint.y,"px, 0)");this._root.style.transform=t,this._root.style.webKitTransform=t}},{key:"setLeftTop",value:function(){this._root.style.left=this.position.x+"px",this._root.style.top=this.position.y+"px"}},{key:"onmousedown",value:function(e){this.dragStart(e,e)}},{key:"onmousemove",value:function(e){this.dragMove(e,e)}},{key:"onmouseup",value:function(e){this.dragEnd(e,e)}},{key:"ontouchstart",value:function(e){var t=e.changedTouches[0];this.dragStart(e,t),this.touchIdentifier=void 0!==t.pointerId?t.pointerId:t.identifier,e.preventDefault()}},{key:"ontouchmove",value:function(e){var t=lP(e.changedTouches,this.touchIdentifier);t&&this.dragMove(e,t)}},{key:"ontouchend",value:function(e){var t=lP(e.changedTouches,this.touchIdentifier);t&&this.dragEnd(e,t),e.preventDefault()}},{key:"ontouchcancel",value:function(e){var t=lP(e.changedTouches,this.touchIdentifier);t&&this.dragCancel(e,t)}},{key:"dragStart",value:function(e,t){if(this._root&&!this.isDown&&this.isEnabled){this.downPoint=t,this.dragPoint.x=0,this.dragPoint.y=0,this._getPosition();var n=sP(this._root);this.startPos.x=this.position.x,this.startPos.y=this.position.y,this.startPos.maxY=window.innerHeight-n.height,this.startPos.maxX=window.innerWidth-n.width,this.setLeftTop(),this.isDown=!0,this._bindPostStartEvents(e)}}},{key:"dragRealStart",value:function(e,t){this.isDragging=!0,this.animate(),this.emit(uP,this.startPos)}},{key:"dragEnd",value:function(e,t){this._root&&(this._unbindPostStartEvents(),this.isDragging&&(this._root.style.transform="",this.setLeftTop(),this.emit(hP)),this.presetInfo())}},{key:"_dragPointerMove",value:function(e,t){var n={x:t.pageX-this.downPoint.pageX,y:t.pageY-this.downPoint.pageY};return!this.isDragging&&this.hasDragStarted(n)&&this.dragRealStart(e,t),n}},{key:"dragMove",value:function(e,t){if(e=e||window.event,this.isDown){var n=this.startPos,i=n.x,r=n.y,o=this._dragPointerMove(e,t),a=o.x,s=o.y;a=this.checkContain("x",a,i),s=this.checkContain("y",s,r),this.position.x=i+a,this.position.y=r+s,this.dragPoint.x=a,this.dragPoint.y=s,this.emit(cP,this.position)}}},{key:"dragCancel",value:function(e,t){this.dragEnd(e,t)}},{key:"presetInfo",value:function(){this.isDragging=!1,this.startPos={x:0,y:0},this.dragPoint={x:0,y:0},this.isDown=!1}},{key:"destroy",value:function(){this._unbindStartEvent(),this._unbindPostStartEvents(),this.isDragging&&this.dragEnd(),this.removeAllListeners(),this._handlerDom=null}},{key:"hasDragStarted",value:function(e){return Math.abs(e.x)>3||Math.abs(e.y)>3}},{key:"checkContain",value:function(e,t,n){return t+n<0?0-n:"x"===e&&t+n>this.startPos.maxX?this.startPos.maxX-n:"y"===e&&t+n>this.startPos.maxY?this.startPos.maxY-n:t}},{key:"_getPosition",value:function(){var e=window.getComputedStyle(this._root),t=this._getPositionCoord(e.left,"width"),n=this._getPositionCoord(e.top,"height");this.position.x=xw(t)?0:t,this.position.y=xw(n)?0:n,this._addTransformPosition(e)}},{key:"_addTransformPosition",value:function(e){var t=e.transform;if(0===tw(t).call(t,"matrix")){var n=t.split(","),i=0===tw(t).call(t,"matrix3d")?12:4,r=Yw(n[i],10),o=Yw(n[i+1],10);this.position.x+=r,this.position.y+=o}}},{key:"_getPositionCoord",value:function(e,t){if(-1!==tw(e).call(e,"%")){var n=sP(this._root.parentNode);return n?lx(e)/100*n[t]:0}return Yw(e,10)}}]),n}(IC),pP=function(e){oC(n,e);var t=cC(n);function n(e){var i;tC(this,n),rC(lC(i=t.call(this,e)),"onCancelClick",(function(e){i.exitMini(),i.isClose=!0})),rC(lC(i),"onCenterClick",(function(e){var t=lC(i).player;t.paused?t.play():t.pause()})),rC(lC(i),"onScroll",(function(e){if(!(!window.scrollY&&0!==window.scrollY||Math.abs(window.scrollY-i.pos.scrollY)<50)){var t=Yw(uT.getCss(i.player.root,"height"));t+=i.config.scrollTop,i.pos.scrollY=window.scrollY,window.scrollY>t+5?!i.isMini&&!i.isClose&&i.getMini():window.scrollY<=t&&(i.isMini&&i.exitMini(),i.isClose=!1)}})),i.isMini=!1,i.isClose=!1;var r=lC(i).config;return i.pos={left:r.left<0?window.innerWidth-r.width-20:r.left,top:r.top<0?window.innerHeight-r.height-20:r.top,height:i.config.height,width:i.config.width,scrollY:window.scrollY||0},i.lastStyle=null,i}return iC(n,[{key:"beforeCreate",value:function(e){"boolean"==typeof e.player.config.mini&&(e.config.isShowIcon=e.player.config.mini)}},{key:"afterCreate",value:function(){var e=this;this.initIcons(),this.on(ET,(function(){e.setAttr("data-state","pause")})),this.on(kT,(function(){e.setAttr("data-state","play")}))}},{key:"onPluginsReady",value:function(){var e=this,t=this.player;if(!this.config.disable){if(this.config.isShowIcon){var n={config:{onClick:function(){e.getMini()}}};t.controls.registerPlugin(iP,n,iP.pluginName)}var i=uT.checkTouchSupport()?"touchend":"click";this.bind(".mini-cancel-btn",i,this.onCancelClick),this.bind(".play-icon",i,this.onCenterClick),this.config.disableDrag||(this._draggabilly=new dP(this.player.root,{handle:this.root})),this.config.isScrollSwitch&&window.addEventListener("scroll",this.onScroll)}}},{key:"registerIcons",value:function(){return{play:{icon:ZA,class:"xg-icon-play"},pause:{icon:$A,class:"xg-icon-pause"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".play-icon",e.play),this.appendChild(".play-icon",e.pause)}},{key:"getMini",value:function(){var e,t=this;if(!this.isMini){var n=this.player,i=this.playerConfig,r=this.config.target||this.player.root;this.lastStyle={},uT.addClass(n.root,"xgplayer-mini"),Ik(e=["width","height","top","left"]).call(e,(function(e){t.lastStyle[e]=r.style[e],r.style[e]="".concat(t.pos[e],"px")})),i.fluid&&(r.style["padding-top"]=""),this.emit(WT,!0),n.isMini=this.isMini=!0}}},{key:"exitMini",value:function(){var e=this;if(!this.isMini)return!1;var t,n=this.player,i=this.playerConfig,r=this.config.target||this.player.root;(uT.removeClass(n.root,"xgplayer-mini"),this.lastStyle)&&Ik(t=nw(this.lastStyle)).call(t,(function(t){r.style[t]=e.lastStyle[t]}));this.lastStyle=null,i.fluid&&(n.root.style.width="100%",n.root.style.height="0",n.root.style["padding-top"]="".concat(100*i.height/i.width,"%")),this.emit(WT,!1),this.isMini=n.isMini=!1}},{key:"destroy",value:function(){window.removeEventListener("scroll",this.onScroll);var e=uT.checkTouchSupport()?"touchend":"click";this.unbind(".mini-cancel-btn",e,this.onCancelClick),this.unbind(".play-icon",e,this.onCenterClick),this._draggabilly&&this._draggabilly.destroy(),this._draggabilly=null,this.exitMini()}},{key:"render",value:function(){if(!this.config.disable)return'\n <xg-mini-layer class="xg-mini-layer">\n <xg-mini-header class="xgplayer-mini-header">\n '.concat(nP(this,"MINI_DRAG",this.playerConfig.isHideTips),'\n </xg-mini-header>\n <div class="mini-cancel-btn">\n <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">\n <path fill="#fff" fill-rule="evenodd" d="M3.99 3.49a1 1 0 0 1 1.414 0L10 8.085l4.596-4.595a1 1 0 1 1 1.414 1.414L11.414 9.5l4.596 4.596a1 1 0 0 1 .084 1.32l-.084.094a1 1 0 0 1-1.414 0L10 10.914 5.404 15.51a1 1 0 0 1-1.414-1.414L8.585 9.5 3.99 4.904a1 1 0 0 1-.084-1.32z"></path>\n </svg>\n </div>\n <div class="play-icon">\n </div>\n </xg-mini-layer>')}}],[{key:"pluginName",get:function(){return"miniscreen"}},{key:"defaultConfig",get:function(){return{index:10,disable:!1,width:320,height:180,left:-1,top:-1,isShowIcon:!1,isScrollSwitch:!1,scrollTop:0,disableDrag:!1}}}]),n}(NS),vP={mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mousemove:"onMouseMove"},gP=["videoClick","videoDbClick"],yP=function(e){oC(n,e);var t=cC(n);function n(){var e,i;tC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return rC(lC(i=t.call.apply(t,Im(e=[this]).call(e,o))),"onMouseMove",(function(e){var t=lC(i),n=t.player,r=t.playerConfig;n.isActive||(n.focus({autoHide:!r.closeDelayBlur}),!r.closeFocusVideoFocus&&n.media.focus())})),rC(lC(i),"onMouseEnter",(function(e){var t=lC(i),n=t.playerConfig,r=t.player;!n.closeFocusVideoFocus&&r.media.focus(),n.closeDelayBlur?r.focus({autoHide:!1}):r.focus()})),rC(lC(i),"onMouseLeave",(function(e){var t=i.playerConfig,n=t.closePlayerBlur,r=t.leavePlayerTime,o=t.closeDelayBlur;n||o||(r?i.player.focus({autoHide:!0,delay:r}):i.player.blur())})),rC(lC(i),"onVideoClick",(function(e){var t=lC(i),n=t.player,r=t.playerConfig;e.target&&r.closeVideoClick||e.target!==n.root&&e.target!==n.media&&e.target!==n.innerContainer&&e.target!==n.media.__canvas||(e.preventDefault(),r.closeVideoStopPropagation||e.stopPropagation(),i._clickCount++,i.clickTimer&&(clearTimeout(i.clickTimer),i.clickTimer=null),i.clickTimer=setTimeout((function(){i._clickCount&&(i._clickCount--,wS(lC(i),gP[0],(function(e,t){i.switchPlayPause(t.e)}),{e:e,paused:n.paused}),clearTimeout(i.clickTimer),i.clickTimer=null)}),300))})),rC(lC(i),"onVideoDblClick",(function(e){var t=lC(i),n=t.player,r=t.playerConfig;r.closeVideoDblclick||!e.target||e.target!==n.media&&e.target!==n.media.__canvas||(!r.closeVideoClick&&i._clickCount<2?i._clickCount=0:(i._clickCount=0,i.clickTimer&&(clearTimeout(i.clickTimer),i.clickTimer=null),e.preventDefault(),e.stopPropagation(),wS(lC(i),gP[1],(function(e,t){i.emitUserAction(t.e,"switch_fullscreen",{props:"fullscreen",from:n.fullscreen,to:!n.fullscreen}),n.fullscreen?n.exitFullscreen():n.getFullscreen()}),{e:e,fullscreen:n.fullscreen})))})),i}return iC(n,[{key:"afterCreate",value:function(){var e=this;this._clickCount=0,Ik(gP).call(gP,(function(t){e.__hooks[t]=null})),"mobile"===this.playerConfig.isMobileSimulateMode||"mobile"===gT.device&&!gT.os.isIpad||this.initEvents()}},{key:"initEvents",value:function(){var e,t=this,n=this.player,i=n.video,r=n.root,o=this.playerConfig.enableContextmenu;r&&r.addEventListener("click",this.onVideoClick,!1),r&&r.addEventListener("dblclick",this.onVideoDblClick,!1),Ik(e=nw(vP)).call(e,(function(e){r.addEventListener(e,t[vP[e]],!1)})),o&&i&&i.addEventListener("contextmenu",this.onContextmenu,!1)}},{key:"switchPlayPause",value:function(e){var t=this.player;this.emitUserAction(e,"switch_play_pause",{props:"paused",from:t.paused,to:!t.paused}),t.ended?t.duration!==1/0&&t.duration>0&&t.replay():t.paused?t.play():t.pause()}},{key:"onContextmenu",value:function(e){(e=e||window.event).preventDefault&&e.preventDefault(),e.stopPropagation?e.stopPropagation():(e.returnValue=!1,e.cancelBubble=!0)}},{key:"destroy",value:function(){var e,t=this,n=this.player,i=n.video,r=n.root;this.clickTimer&&clearTimeout(this.clickTimer),r.removeEventListener("click",this.onVideoClick,!1),r.removeEventListener("dblclick",this.onVideoDblClick,!1),i.removeEventListener("contextmenu",this.onContextmenu,!1),Ik(e=nw(vP)).call(e,(function(e){r.removeEventListener(e,t[vP[e]],!1)}))}}],[{key:"pluginName",get:function(){return"pc"}},{key:"defaultConfig",get:function(){return{}}}]),n}(CS),mP="press",_P="pressend",bP="doubleclick",kP="click",wP="touchmove",EP="touchstart",CP="touchend",xP={start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},TP={start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseleave"};function SP(e){return e&&e.length>0?e[e.length-1]:null}var AP=function(){function e(t){var n,i=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{eventType:"touch"};tC(this,e),this._pos={moving:!1,start:!1,x:0,y:0},this.config={pressDelay:600,dbClickDelay:200,disablePress:!1,disableDbClick:!1,miniStep:2,needPreventDefault:!0},Ik(n=nw(r)).call(n,(function(e){i.config[e]=r[e]})),this.root=t,this.events="mouse"===r.eventType?TP:xP,this.pressIntrvalId=null,this.dbIntrvalId=null,this.__handlers={},this._initEvent()}return iC(e,[{key:"_initEvent",value:function(){this.onTouchStart=this.onTouchStart.bind(this),this.onTouchMove=this.onTouchMove.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.onTouchCancel=this.onTouchCancel.bind(this),this.root.addEventListener(this.events.start,this.onTouchStart)}},{key:"__setPress",value:function(e){var t=this,n=this.config;this.pressIntrvalId&&this.__clearPress(),this.pressIntrvalId=setTimeout((function(){t.trigger(mP,e),t._pos.press=!0,t.__clearPress()}),n.pressDelay)}},{key:"__clearPress",value:function(){window.clearTimeout(this.pressIntrvalId),this.pressIntrvalId=null}},{key:"__setDb",value:function(e){var t=this,n=this.config;if(this.dbIntrvalId)return this.__clearDb(),void this.trigger(bP,e);this.dbIntrvalId=setTimeout((function(){t.__clearDb(),t._pos.start||t._pos.press||t._pos.moving||t.trigger(kP,e)}),n.dbClickDelay)}},{key:"__clearDb",value:function(){clearTimeout(this.dbIntrvalId),this.dbIntrvalId=null}},{key:"on",value:function(e,t){this.__handlers[e]||(this.__handlers[e]=[]),this.__handlers[e].push(t)}},{key:"off",value:function(e,t){if(this.__handlers[e]){for(var n,i=this.__handlers[e],r=-1,o=0;o<i.length;o++)if(i[o]===t){r=o;break}if(r>=0)Cw(n=this.__handlers[e]).call(n,r,1)}}},{key:"trigger",value:function(e,t){var n;this.__handlers[e]&&Ik(n=this.__handlers[e]).call(n,(function(n){try{n(t)}catch(CR){console.error("trigger>>:".concat(e),CR)}}))}},{key:"onTouchStart",value:function(e){var t=this._pos,n=this.root,i=SP(e.touches);t.x=i?Yw(i.pageX,10):e.pageX,t.y=i?Yw(i.pageX,10):e.pageX,t.start=!0,this.__setPress(e),n.addEventListener(this.events.end,this.onTouchEnd),n.addEventListener(this.events.cancel,this.onTouchCancel),n.addEventListener(this.events.move,this.onTouchMove),this.trigger(EP,e)}},{key:"onTouchCancel",value:function(e){this.onTouchEnd(e)}},{key:"onTouchEnd",value:function(e){var t=this._pos,n=this.root;this.__clearPress(),n.removeEventListener(this.events.cancel,this.onTouchCancel),n.removeEventListener(this.events.end,this.onTouchEnd),n.removeEventListener(this.events.move,this.onTouchMove),e.moving=t.moving,e.press=t.press,t.press&&this.trigger(_P,e),this.trigger(CP,e),!t.press&&!t.moving&&this.__setDb(e),t.press=!1,t.start=!1,t.moving=!1}},{key:"onTouchMove",value:function(e){var t=this._pos,n=this.config,i=SP(e.touches),r=i?Yw(i.pageX,10):e.pageX,o=i?Yw(i.pageY,10):e.pageX,a=r-t.x,s=o-t.y;Math.abs(s)<n.miniStep&&Math.abs(a)<n.miniStep||(this.__clearPress(),t.press&&this.trigger(_P,e),t.press=!1,t.moving=!0,this.trigger(wP,e))}},{key:"destroy",value:function(){var e,t=this,n={touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"};Ik(e=nw(n)).call(e,(function(e){t.root.removeEventListener("touchend",t[n[e]])}))}}]),e}();function PP(){return(new DOMParser).parseFromString('<svg width="20" height="9" viewBox="0 0 8 9" fill="none" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <path opacity="0.54"\n d="M7.5 3.63397C8.16667 4.01887 8.16667 4.98113 7.5 5.36603L1.5 8.83013C0.833334 9.21503 0 8.7339 0 7.9641L0 1.0359C0 0.266098 0.833333 -0.215027 1.5 0.169873L7.5 3.63397Z"\n fill="white" />\n <path transform="translate(5 0)" d="M7.5 3.63397C8.16667 4.01887 8.16667 4.98113 7.5 5.36603L1.5 8.83013C0.833334 9.21503 0 8.7339 0 7.9641L0 1.0359C0 0.266098 0.833333 -0.215027 1.5 0.169873L7.5 3.63397Z" fill="white"/>\n</svg>',"image/svg+xml").firstChild}var OP="auto",IP="seeking",RP="playbackrate",MP=["videoClick","videoDbClick"],LP=function(e){oC(n,e);var t=cC(n);function n(e){var i;return tC(this,n),rC(lC(i=t.call(this,e)),"onTouchStart",(function(e){var t=lC(i),n=t.player,r=t.config,o=t.pos,a=t.playerConfig,s=i.getTouche(e);if(s&&!r.disableGesture&&i.duration>0&&!n.ended){o.isStart=!0,uT.checkIsFunction(a.disableSwipeHandler)&&a.disableSwipeHandler(),jm(i).call(i,".xg-dur").innerHTML=uT.format(i.duration);var l=i.root.getBoundingClientRect();90===n.rotateDeg?(o.top=l.left,o.left=l.top,o.width=l.height,o.height=l.width):(o.top=l.top,o.left=l.left,o.width=l.width,o.height=l.height);var u=Yw(s.pageX-o.left,10),c=Yw(s.pageY-o.top,10);o.x=90===n.rotateDeg?c:u,o.y=90===n.rotateDeg?u:c,o.scopeL=r.scopeL*o.width,o.scopeR=(1-r.scopeR)*o.width,o.scopeM1=o.width*(1-r.scopeM)/2,o.scopeM2=o.width-o.scopeM1}})),rC(lC(i),"onTouchMove",(function(e){var t=i.getTouche(e),n=lC(i),r=n.pos,o=n.config,a=n.player;if(t&&!o.disableGesture&&i.duration&&r.isStart){var s=o.miniMoveStep,l=o.hideControlsActive,u=Yw(t.pageX-r.left,10),c=Yw(t.pageY-r.top,10),h=90===a.rotateDeg?c:u,f=90===a.rotateDeg?u:c;if(Math.abs(h-r.x)>s||Math.abs(f-r.y)>s){var d=h-r.x,p=f-r.y,v=r.scope;if(-1===v&&(0===(v=i.checkScope(h,f,d,p,r))&&(l?a.blur():a.focus({autoHide:!1}),!r.time&&(r.time=Yw(1e3*a.currentTime,10)+1e3*i.timeOffset)),r.scope=v),-1===v||v>0&&!o.gestureY||0===v&&!o.gestureX)return;e.cancelable&&e.preventDefault(),i.executeMove(d,p,v,r.width,r.height),r.x=h,r.y=f}}})),rC(lC(i),"onTouchEnd",(function(e){var t=lC(i),n=t.player,r=t.pos,o=t.playerConfig;if(r.isStart){r.scope>-1&&e.cancelable&&e.preventDefault();var a=i.config,s=a.disableGesture,l=a.gestureX;!s&&l?(i.endLastMove(r.scope),setTimeout((function(){n.getPlugin("progress")&&n.getPlugin("progress").resetSeekState()}),10)):r.time=0,r.scope=-1,i.resetPos(),uT.checkIsFunction(o.enableSwipeHandler)&&o.enableSwipeHandler(),i.changeAction(OP)}})),rC(lC(i),"onRootTouchMove",(function(e){!i.config.disableGesture&&i.config.gestureX&&i.checkIsRootTarget(e)&&(e.stopPropagation(),i.pos.isStart?i.onTouchMove(e):i.onTouchStart(e))})),rC(lC(i),"onRootTouchEnd",(function(e){i.pos.isStart&&i.checkIsRootTarget(e)&&(e.stopPropagation(),i.onTouchEnd(e))})),i.pos={isStart:!1,x:0,y:0,time:0,volume:0,rate:1,light:0,width:0,height:0,scopeL:0,scopeR:0,scopeM1:0,scopeM2:0,scope:-1},i.timer=null,i}return iC(n,[{key:"duration",get:function(){return this.playerConfig.customDuration||this.player.duration}},{key:"timeOffset",get:function(){return this.playerConfig.timeOffset||0}},{key:"registerIcons",value:function(){return{seekTipIcon:{icon:PP,class:"xg-seek-pre"}}}},{key:"afterCreate",value:function(){var e,t=this;Ik(MP).call(MP,(function(e){t.__hooks[e]=null}));var n=this.playerConfig,i=this.config,r=this.player;!0===n.closeVideoDblclick&&(i.closedbClick=!0),this.resetPos(),uT.isUndefined(n.disableGesture)||(i.disableGesture=!!n.disableGesture),this.appendChild(".xg-seek-icon",this.icons.seekTipIcon),this.xgMask=uT.createDom("xg-mask","",{},"xgmask"),r.root.appendChild(this.xgMask),this.initCustomStyle(),this.registerThumbnail();var o="mouse"===this.domEventType?"mouse":"touch";this.touch=new AP(this.root,{eventType:o,needPreventDefault:!this.config.disableGesture}),this.root.addEventListener("contextmenu",(function(e){e.preventDefault()})),r.root.addEventListener("touchmove",this.onRootTouchMove,!0),r.root.addEventListener("touchend",this.onRootTouchEnd,!0),this.on(PT,(function(){var e=t.player,n=t.config;1e3*e.duration<n.moveDuration&&(n.moveDuration=1e3*e.duration)})),this.on([AT,wT],(function(){var e=t.pos,n=e.time;!e.isStart&&n>0&&(t.pos.time=0)}));var a={touchstart:"onTouchStart",touchmove:"onTouchMove",touchend:"onTouchEnd",press:"onPress",pressend:"onPressEnd",click:"onClick",doubleclick:"onDbClick"};if(Ik(e=nw(a)).call(e,(function(e){t.touch.on(e,(function(n){t[a[e]](n)}))})),!i.disableActive){var s=r.plugins.progress;s&&(s.addCallBack("dragmove",(function(e){t.activeSeekNote(e.currentTime,e.forward)})),s.addCallBack("dragend",(function(){t.changeAction(OP)})))}}},{key:"registerThumbnail",value:function(){var e=this.player.plugins.thumbnail;if(e&&e.usable){this.thumbnail=e.createThumbnail(null,"mobile-thumbnail");var t=jm(this).call(this,".time-preview");t.insertBefore(this.thumbnail,t.children[0])}}},{key:"initCustomStyle",value:function(){var e=(this.playerConfig||{}).commonStyle,t=e.playedColor,n=e.progressColor;t&&(jm(this).call(this,".xg-curbar").style.backgroundColor=t,jm(this).call(this,".xg-cur").style.color=t);n&&(jm(this).call(this,".xg-bar").style.backgroundColor=n,jm(this).call(this,".time-preview").style.color=n);this.config.disableTimeProgress&&uT.addClass(jm(this).call(this,".xg-timebar"),"hide")}},{key:"resetPos",value:function(){var e,t=this;this.pos?(this.pos.isStart=!1,this.pos.scope=-1,Ik(e=["x","y","width","height","scopeL","scopeR","scopeM1","scopeM2"]).call(e,(function(e){t.pos[e]=0}))):this.pos={isStart:!1,x:0,y:0,volume:0,rate:1,light:0,width:0,height:0,scopeL:0,scopeR:0,scopeM1:0,scopeM2:0,scope:-1,time:0}}},{key:"changeAction",value:function(e){var t=this.player;this.root.setAttribute("data-xg-action",e);var n=t.plugins.start;n&&n.recover()}},{key:"getTouche",value:function(e){this.player.rotateDeg;var t=e.touches&&e.touches.length>0?e.touches[e.touches.length-1]:e;return{pageX:t.pageX,pageY:t.pageY}}},{key:"checkScope",value:function(e,t,n,i,r){var o=r.width,a=-1;if(e<0||e>o)return a;var s=0===i?Math.abs(n):Math.abs(n/i);return Math.abs(n)>0&&s>=1.73&&e>r.scopeM1&&e<r.scopeM2?a=0:(0===Math.abs(n)||s<=.57)&&(a=e<r.scopeL?1:e>r.scopeR?2:3),a}},{key:"executeMove",value:function(e,t,n,i,r){switch(n){case 0:this.updateTime(e/i*this.config.scopeM);break;case 1:this.updateBrightness(t/r);break;case 2:gT.os.isIos||this.updateVolume(t/r)}}},{key:"endLastMove",value:function(e){var t=this,n=this.pos,i=this.player,r=this.config,o=(n.time-this.timeOffset)/1e3;if(0===e)i.seek(Number(o).toFixed(1)),r.hideControlsEnd?i.blur():i.focus(),this.timer=setTimeout((function(){t.pos.time=0}),500);this.changeAction(OP)}},{key:"checkIsRootTarget",value:function(e){var t=this.player.plugins||{};return(!t.progress||!t.progress.root.contains(e.target))&&(t.start&&t.start.root.contains(e.target)||t.controls&&t.controls.root.contains(e.target))}},{key:"sendUseAction",value:function(e){var t=this.player.paused;this.emitUserAction(e,"switch_play_pause",{prop:"paused",from:t,to:!t})}},{key:"clickHandler",value:function(e){var t=this.player,n=this.config,i=this.playerConfig;t.state<bA?i.closeVideoClick||(this.sendUseAction(uT.createEvent("click")),t.play()):!n.closedbClick||i.closeVideoClick?t.isActive?t.blur():t.focus():i.closeVideoClick||((t.isActive||n.focusVideoClick)&&(this.sendUseAction(uT.createEvent("click")),this.switchPlayPause()),t.focus())}},{key:"dbClickHandler",value:function(e){var t=this.config,n=this.player;!t.closedbClick&&n.state>=bA&&(this.sendUseAction(uT.createEvent("dblclick")),this.switchPlayPause())}},{key:"onClick",value:function(e){var t=this,n=this.player;wS(this,MP[0],(function(e,n){t.clickHandler(n.e)}),{e:e,paused:n.paused})}},{key:"onDbClick",value:function(e){var t=this,n=this.player;wS(this,MP[1],(function(e,n){t.dbClickHandler(n.e)}),{e:e,paused:n.paused})}},{key:"onPress",value:function(e){var t=this.pos,n=this.config,i=this.player;n.disablePress||(t.rate=this.player.playbackRate,this.emitUserAction("press","change_rate",{prop:"playbackRate",from:i.playbackRate,to:n.pressRate}),i.playbackRate=n.pressRate,this.changeAction(RP))}},{key:"onPressEnd",value:function(e){var t=this.pos,n=this.config,i=this.player;n.disablePress||(this.emitUserAction("pressend","change_rate",{prop:"playbackRate",from:i.playbackRate,to:t.rate}),i.playbackRate=t.rate,t.rate=1,this.changeAction(OP))}},{key:"updateTime",value:function(e){var t=this.player,n=this.config,i=this.player.duration;e=Number(e.toFixed(4));var r=Yw(e*n.moveDuration,10)+this.timeOffset;r=(r+=this.pos.time)<0?0:r>1e3*i?1e3*i-200:r,t.getPlugin("time")&&t.getPlugin("time").updateTime(r/1e3),t.getPlugin("progress")&&t.getPlugin("progress").updatePercent(r/1e3/this.duration,!0),this.activeSeekNote(r/1e3,e>0),n.isTouchingSeek&&t.seek(Number((r-this.timeOffset)/1e3).toFixed(1)),this.pos.time=r}},{key:"updateVolume",value:function(e){this.player.rotateDeg&&(e=-e);var t=this.player,n=this.pos;if(e=Yw(100*e,10),n.volume+=e,!(Math.abs(n.volume)<10)){var i=Yw(10*t.volume,10)-Yw(n.volume/10,10);i=i>10?10:i<1?0:i,t.volume=i/10,n.volume=0}}},{key:"updateBrightness",value:function(e){this.player.rotateDeg&&(e=-e);var t=this.pos,n=this.config,i=this.xgMask,r=t.light+.8*e;r=r>n.maxDarkness?n.maxDarkness:r<0?0:r,i&&(i.style.backgroundColor="rgba(0,0,0,".concat(r,")")),t.light=r}},{key:"activeSeekNote",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.player,i=this.config,r=!(this.duration!==1/0&&this.duration>0);if(e&&"number"==typeof e&&!r&&!i.disableActive){e<0?e=0:e>n.duration&&(e=n.duration-.2),this.changeAction(IP);var o=n.plugins.start;if(o&&o.focusHide(),jm(this).call(this,".xg-dur").innerHTML=uT.format(this.duration),jm(this).call(this,".xg-cur").innerHTML=uT.format(e),jm(this).call(this,".xg-curbar").style.width="".concat(e/this.duration*100,"%"),t)uT.removeClass(jm(this).call(this,".xg-seek-show"),"xg-back");else uT.addClass(jm(this).call(this,".xg-seek-show"),"xg-back");this.updateThumbnails(e)}}},{key:"updateThumbnails",value:function(e){var t=this.player.plugins.thumbnail;t&&t.usable&&this.thumbnail&&t.update(this.thumbnail,e,160,90)}},{key:"switchPlayPause",value:function(){var e=this.player;if(e.state<mA)return!1;e.ended||(e.paused?e.play():e.pause())}},{key:"disableGesture",value:function(){this.config.disableGesture=!1}},{key:"enableGesture",value:function(){this.config.disableGesture=!0}},{key:"destroy",value:function(){var e=this.player;this.timer&&clearTimeout(this.timer),this.thumbnail=null,e.root.removeChild(this.xgMask),this.xgMask=null,this.touch&&this.touch.destroy(),this.touch=null,e.root.removeEventListener("touchmove",this.onRootTouchMove,!0),e.root.removeEventListener("touchend",this.onRootTouchEnd,!0)}},{key:"render",value:function(){var e,t,n,i="normal"!==this.config.gradient?"gradient ".concat(this.config.gradient):"gradient";return Im(e=Im(t=Im(n='\n <xg-trigger class="trigger">\n <div class="'.concat(i,'"></div>\n <div class="time-preview">\n <div class="xg-seek-show ')).call(n,this.config.disableSeekIcon?" hide-seek-icon":"",'">\n <i class="xg-seek-icon"></i>\n <span class="xg-cur">00:00</span>\n <span>/</span>\n <span class="xg-dur">00:00</span>\n </div>\n <div class="xg-bar xg-timebar">\n <div class="xg-curbar"></div>\n </div>\n </div>\n <div class="xg-playbackrate xg-top-note">\n <span><i>')).call(t,this.config.pressRate,"X</i>")).call(e,this.i18n.FORWARD,"</span>\n </div>\n </xg-trigger>\n ")}}],[{key:"pluginName",get:function(){return"mobile"}},{key:"defaultConfig",get:function(){return{index:0,disableGesture:!1,gestureX:!0,gestureY:!0,gradient:"normal",isTouchingSeek:!1,miniMoveStep:5,miniYPer:5,scopeL:.25,scopeR:.25,scopeM:.9,pressRate:2,darkness:!0,maxDarkness:.8,disableActive:!1,disableTimeProgress:!1,hideControlsActive:!1,hideControlsEnd:!1,moveDuration:36e4,closedbClick:!1,disablePress:!0,disableSeekIcon:!1,focusVideoClick:!1}}}]),n}(NS);function DP(e){e.preventDefault(),e.returnValue=!1}var NP=function(e){oC(n,e);var t=cC(n);function n(){var e,i;tC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return rC(lC(i=t.call.apply(t,Im(e=[this]).call(e,o))),"onBodyKeyDown",(function(e){var t=e||window.event;if(i.player&&(i.player.isUserActive||i.config.isIgnoreUserActive)&&!(i.config.disable||i.config.disableBodyTrigger||!i.checkIsVisible()||t.metaKey||t.altKey||t.ctrlKey)){var n,r,o=t.keyCode;return!(t.target!==document.body&&(!i.config.isGlobalTrigger||(n=t.target,r=n.tagName,"INPUT"===r||"TEXTAREA"===r||n.isContentEditable))||!i.checkCode(o,!0))&&(DP(t),i.handleKeyCode(o,e),!1)}})),rC(lC(i),"onKeydown",(function(e){var t=e||window.event;if(!(i.config.disable||i.config.disableRootTrigger||t.metaKey||t.altKey||t.ctrlKey)&&(i.player.isUserActive||i.config.isIgnoreUserActive)&&(i.player.isUserActive||i.config.isIgnoreUserActive)){if(!t||37!==t.keyCode&&!i.checkCode(t.keyCode)||t.target!==i.player.root&&t.target!==i.player.video&&t.target!==i.player.controls.el)return!0;DP(t),i.handleKeyCode(t.keyCode,e)}})),i}return iC(n,[{key:"mergekeyCodeMap",value:function(){var e,t=this,n=this.config.keyCodeMap;n&&Ik(e=nw(n)).call(e,(function(e){var i;t.keyCodeMap[e]?Ik(i=["keyCode","action","disable","isBodyTarget"]).call(i,(function(i){n[e][i]&&(t.keyCodeMap[e][i]=n[e][i])})):t.keyCodeMap[e]=n[e]}))}},{key:"afterCreate",value:function(){this.config.disable=!this.playerConfig.keyShortcut;var e="function"==typeof this.config.seekStep?this.config.seekStep(this.player):this.config.seekStep;e&&"number"==typeof e&&(this.seekStep=e),this.keyCodeMap={space:{keyCode:32,action:"playPause",disable:!1,noBodyTarget:!1},up:{keyCode:38,action:"upVolume",disable:!1,noBodyTarget:!0},down:{keyCode:40,action:"downVolume",disable:!1,noBodyTarget:!0},left:{keyCode:37,action:"seekBack",disable:!1},right:{keyCode:39,action:"seek",disable:!1},esc:{keyCode:27,action:"exitFullscreen",disable:!1}},this.mergekeyCodeMap(),this.player.root.addEventListener("keydown",this.onKeydown),document.addEventListener("keydown",this.onBodyKeyDown)}},{key:"checkIsVisible",value:function(){if(!this.config.checkVisible)return!0;var e=this.player.root.getBoundingClientRect(),t=e.height,n=e.top,i=e.bottom,r=window.innerHeight;return!(n<0&&n<0-.9*t||i>0&&i-r>.9*t)}},{key:"checkCode",value:function(e,t){var n,i=this,r=!1;return Ik(n=nw(this.keyCodeMap)).call(n,(function(n){i.keyCodeMap[n]&&e===i.keyCodeMap[n].keyCode&&!i.keyCodeMap[n].disable&&(r=!t||t&&!i.keyCodeMap[n].noBodyTarget)})),r}},{key:"downVolume",value:function(e){var t=this.player,n=lx((t.volume-.1).toFixed(1)),i={volume:{from:t.volume,to:n}};this.emitUserAction(e,"change_volume",{props:i}),t.volume=n>=0?n:0}},{key:"upVolume",value:function(e){var t=this.player,n=lx((t.volume+.1).toFixed(1)),i={volume:{from:t.volume,to:n}};this.emitUserAction(e,"change_volume",{props:i}),t.volume=n<=1?n:1}},{key:"seek",value:function(e){var t=this.player,n=t.currentTime,i=t.duration,r=n,o={currentTime:{from:n,to:r=n+this.seekStep<=i?n+this.seekStep:i}};this.emitUserAction(e,"seek",{props:o}),this.player.currentTime=r}},{key:"seekBack",value:function(e){var t=this.player.currentTime,n=0;t-this.seekStep>=0&&(n=t-this.seekStep);var i={currentTime:{from:t,to:n}};this.emitUserAction(e,"seek",{props:i}),this.player.currentTime=n}},{key:"playPause",value:function(e){var t=this.player;t&&(this.emitUserAction(e,"switch_play_pause"),t.paused?t.play():t.pause())}},{key:"exitFullscreen",value:function(e){var t=this.player,n=t.fullscreen,i=t.cssfullscreen;n&&(this.emitUserAction("keyup","switch_fullscreen",{prop:"fullscreen",from:n,to:!n}),t.exitFullscreen()),i&&(this.emitUserAction("keyup","switch_css_fullscreen",{prop:"cssfullscreen",from:i,to:!i}),t.exitCssFullscreen())}},{key:"handleKeyCode",value:function(e,t){var n,i=this;Ik(n=nw(this.keyCodeMap)).call(n,(function(n){var r=i.keyCodeMap[n],o=r.action,a=r.keyCode,s=r.disable;a!==e||s||("function"==typeof o?o(t,i.player):"string"==typeof o&&"function"==typeof i[o]&&i[o](t,i.player),i.emit(eS,QE({key:n,target:t.target},i.keyCodeMap[n])))}))}},{key:"destroy",value:function(){this.player.root.removeEventListener("keydown",this.onKeydown),document.removeEventListener("keydown",this.onBodyKeyDown)}},{key:"disable",value:function(){this.config.disable=!0}},{key:"enable",value:function(){this.config.disable=!1}}],[{key:"pluginName",get:function(){return"keyboard"}},{key:"defaultConfig",get:function(){return{seekStep:10,checkVisible:!0,disableBodyTrigger:!1,disableRootTrigger:!1,isGlobalTrigger:!1,keyCodeMap:{},disable:!1,isIgnoreUserActive:!1}}}]),n}(CS);function FP(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="-5 -5 110 110">\n <path d="M100,50A50,50,0,1,1,50,0" stroke-width="5" stroke="#ddd" stroke-dasharray="236" fill="none"></path>\n</svg>\n',"image/svg+xml").firstChild}var HP=function(e){oC(n,e);var t=cC(n);function n(){return tC(this,n),t.apply(this,arguments)}return iC(n,[{key:"registerIcons",value:function(){return{loadingIcon:FP}}},{key:"afterCreate",value:function(){this.appendChild("xg-loading-inner",this.icons.loadingIcon)}},{key:"render",value:function(){return'\n <xg-loading class="xgplayer-loading">\n <xg-loading-inner></xg-loading-inner>\n </xg-loading>'}}],[{key:"pluginName",get:function(){return"loading"}},{key:"defaultConfig",get:function(){return{position:RS.ROOT}}}]),n}(NS),UP=Pn,jP=ea.findIndex,BP="findIndex",VP=!0;BP in[]&&Array(1)[BP]((function(){VP=!1})),UP({target:"Array",proto:!0,forced:VP},{findIndex:function(e){return jP(this,e,arguments.length>1?arguments[1]:void 0)}});var GP=Bc("Array").findIndex,zP=se,KP=GP,WP=Array.prototype,YP=n((function(e){var t=e.findIndex;return e===WP||zP(WP,e)&&t===WP.findIndex?KP:t})),XP=function(e){oC(n,e);var t=cC(n);function n(){var e,i;tC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return rC(lC(i=t.call.apply(t,Im(e=[this]).call(e,o))),"_onMouseenter",(function(e){i.emit("icon_mouseenter",{pluginName:i.pluginName})})),rC(lC(i),"_onMouseLeave",(function(e){i.emit("icon_mouseleave",{pluginName:i.pluginName})})),i}return iC(n,[{key:"afterCreate",value:function(){this.bind("mouseenter",this._onMouseenter),this.bind("mouseleave",this._onMouseLeave)}},{key:"destroy",value:function(){this.unbind("mouseenter",this._onMouseenter),this.unbind("mouseleave",this._onMouseLeave)}}]),n}(NS),qP=function(e){oC(n,e);var t=cC(n);function n(){return tC(this,n),t.apply(this,arguments)}return iC(n,[{key:"afterCreate",value:function(){var e=this;hC(aC(n.prototype),"afterCreate",this).call(this);var t=this.player;this.config.disable||(this.initIcons(),this.btnClick=this.btnClick.bind(this),this.bind(["touchend","click"],this.btnClick),this.on([ET,CT,RT],(function(){e.animate(t.paused)})),this.on(kT,(function(){e.animate(t.paused)})),this.animate(!0))}},{key:"registerIcons",value:function(){return{play:{icon:ZA,class:"xg-icon-play"},pause:{icon:$A,class:"xg-icon-pause"}}}},{key:"btnClick",value:function(e){e.preventDefault(),e.stopPropagation();var t=this.player;return this.emitUserAction(e,"switch_play_pause",{prop:"paused",from:t.paused,to:!t.paused}),t.ended?t.replay():t.paused?(t.play(),this.animate(!1)):(t.pause(),this.animate(!0)),!1}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.play),this.appendChild(".xgplayer-icon",e.pause)}},{key:"animate",value:function(e){if(this.player){var t=this.i18nKeys,n=jm(this).call(this,".xg-tips");e?(this.setAttr("data-state","pause"),n&&this.changeLangTextKey(n,t.PLAY_TIPS)):(this.setAttr("data-state","play"),n&&this.changeLangTextKey(n,t.PAUSE_TIPS))}}},{key:"destroy",value:function(){hC(aC(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(nP(this,"PLAY_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"play"}},{key:"defaultConfig",get:function(){return{position:RS.CONTROLS_LEFT,index:0,disable:!1}}}]),n}(XP);function ZP(){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 $P=function(e){oC(n,e);var t=cC(n);function n(){return tC(this,n),t.apply(this,arguments)}return iC(n,[{key:"afterCreate",value:function(){var e=this;this.initIcons(),this.onClick=function(t){t.preventDefault(),t.stopPropagation(),e.config.onClick(t)},this.bind(["click","touchend"],this.onClick)}},{key:"registerIcons",value:function(){return{screenBack:{icon:ZP,class:"xg-fullscreen-back"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(this.root,e.screenBack)}},{key:"show",value:function(){uT.addClass(this.root,"show")}},{key:"hide",value:function(){uT.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:RS.ROOT_TOP,index:0}}}]),n}(NS);function JP(){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 QP(){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 eO=function(e){oC(n,e);var t=cC(n);function n(){var e,i;tC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return rC(lC(i=t.call.apply(t,Im(e=[this]).call(e,o))),"_onOrientationChange",(function(e){i.player.fullscreen&&i.config.rotateFullscreen&&(90===window.orientation||-90===window.orientation?i.player.setRotateDeg(0):i.player.setRotateDeg(90))})),i}return iC(n,[{key:"afterCreate",value:function(){var e=this;hC(aC(n.prototype),"afterCreate",this).call(this);var t=this.config,i=this.playerConfig;if(!t.disable){t.target&&(this.playerConfig.fullscreenTarget=this.config.target);var r=uT.getFullScreenEl();i.fullscreenTarget===r&&this.player.getFullscreen().catch((function(e){})),this.initIcons(),this.handleFullscreen=this.hook("fullscreenChange",this.toggleFullScreen,{pre:function(t){var n=e.player.fullscreen;e.emitUserAction(t,"switch_fullscreen",{prop:"fullscreen",from:n,to:!n})}}),this.bind(".xgplayer-fullscreen",["touchend","click"],this.handleFullscreen),this.on(zT,(function(t){var n=jm(e).call(e,".xg-tips");n&&e.changeLangTextKey(n,t?e.i18nKeys.EXITFULLSCREEN_TIPS:e.i18nKeys.FULLSCREEN_TIPS),e.animate(t)})),this.config.needBackIcon&&(this.topBackIcon=this.player.registerPlugin({plugin:$P,options:{config:{onClick:function(t){e.handleFullscreen(t)}}}})),"mobile"===gT.device&&window.addEventListener("orientationchange",this._onOrientationChange)}}},{key:"registerIcons",value:function(){return{fullscreen:{icon:JP,class:"xg-get-fullscreen"},exitFullscreen:{icon:QP,class:"xg-exit-fullscreen"}}}},{key:"destroy",value:function(){hC(aC(n.prototype),"destroy",this).call(this),this.unbind(".xgplayer-icon","mobile"===gT.device?"touchend":"click",this.handleFullscreen),"mobile"===gT.device&&window.removeEventListener("orientationchange",this._onOrientationChange)}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.fullscreen),this.appendChild(".xgplayer-icon",e.exitFullscreen)}},{key:"toggleFullScreen",value:function(e){e&&(e.preventDefault(),e.stopPropagation());var t=this.player,n=this.config;!0===n.useCssFullscreen||"function"==typeof n.useCssFullscreen&&n.useCssFullscreen()?(t.fullscreen?t.exitCssFullscreen():t.getCssFullscreen(),this.animate(t.fullscreen)):n.rotateFullscreen?(t.fullscreen?t.exitRotateFullscreen():t.getRotateFullscreen(),this.animate(t.fullscreen)):n.switchCallback&&"function"==typeof n.switchCallback?n.switchCallback(t.fullscreen):t.fullscreen?t.exitFullscreen():t.getFullscreen().catch((function(e){}))}},{key:"animate",value:function(e){e?this.setAttr("data-state","full"):this.setAttr("data-state","normal"),this.topBackIcon&&(e?(this.topBackIcon.show(),this.hide()):(this.topBackIcon.hide(),this.show()))}},{key:"show",value:function(){hC(aC(n.prototype),"show",this).call(this)}},{key:"hide",value:function(){hC(aC(n.prototype),"hide",this).call(this)}},{key:"render",value:function(){if(!this.config.disable){return'<xg-icon class="xgplayer-fullscreen">\n <div class="xgplayer-icon">\n </div>\n '.concat(nP(this,"FULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}}],[{key:"pluginName",get:function(){return"fullscreen"}},{key:"defaultConfig",get:function(){return{position:RS.CONTROLS_RIGHT,index:0,useCssFullscreen:!1,rotateFullscreen:!1,switchCallback:null,target:null,disable:!1,needBackIcon:!1}}}]),n}(XP);function tO(){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 nO(){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 iO(){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 rO=function(e){oC(n,e);var t=cC(n);function n(){var e,i;tC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return rC(lC(i=t.call.apply(t,Im(e=[this]).call(e,o))),"onBarMousedown",(function(e){var t=lC(i).player,n=jm(i).call(i,".xgplayer-bar");uT.event(e);var r=n.getBoundingClientRect(),o=uT.getEventPos(e,t.zoom),a=r.height-(o.clientY-r.top);if(o.h=a,o.barH=r.height,i.pos=o,!(a<-2))return i.updateVolumePos(a,e),document.addEventListener("mouseup",i.onBarMouseUp),i._d.isStart=!0,!1})),rC(lC(i),"onBarMouseMove",(function(e){var t=lC(i)._d;if(t.isStart){var n=lC(i),r=n.pos,o=n.player;e.preventDefault(),e.stopPropagation(),uT.event(e);var a=uT.getEventPos(e,o.zoom);t.isMoving=!0;var s=r.h-a.clientY+r.clientY;s>r.barH||i.updateVolumePos(s,e)}})),rC(lC(i),"onBarMouseUp",(function(e){uT.event(e),document.removeEventListener("mouseup",i.onBarMouseUp);var t=lC(i)._d;t.isStart=!1,t.isMoving=!1})),rC(lC(i),"onMouseenter",(function(e){i._d.isActive=!0,i.focus(),i.emit("icon_mouseenter",{pluginName:i.pluginName})})),rC(lC(i),"onMouseleave",(function(e){i._d.isActive=!1,i.unFocus(100,!1,e),i.emit("icon_mouseleave",{pluginName:i.pluginName})})),rC(lC(i),"onVolumeChange",(function(e){if(i.player){var t=i.player,n=t.muted,r=t.volume;i._d.isMoving||(jm(i).call(i,".xgplayer-drag").style.height=n||0===r?"4px":"".concat(100*r,"%"),i.config.showValueLabel&&i.updateVolumeValue()),i.animate(n,r)}})),i}return iC(n,[{key:"registerIcons",value:function(){return{volumeSmall:{icon:nO,class:"xg-volume-small"},volumeLarge:{icon:tO,class:"xg-volume"},volumeMuted:{icon:iO,class:"xg-volume-mute"}}}},{key:"afterCreate",value:function(){var e=this;if(this._timerId=null,this._d={isStart:!1,isMoving:!1,isActive:!1},!this.config.disable){this.initIcons();var t=this.playerConfig,n=t.commonStyle,i=t.volume;if(n.volumeColor)jm(this).call(this,".xgplayer-drag").style.backgroundColor=n.volumeColor;this.changeMutedHandler=this.hook("mutedChange",(function(t){e.changeMuted(t)}),{pre:function(e){e.preventDefault(),e.stopPropagation()}}),this._onMouseenterHandler=this.hook("mouseenter",this.onMouseenter),this._onMouseleaveHandler=this.hook("mouseleave",this.onMouseleave),"mobile"!==gT.device&&"mobile"!==this.playerConfig.isMobileSimulateMode&&(this.bind("mouseenter",this._onMouseenterHandler),this.bind(["blur","mouseleave"],this._onMouseleaveHandler),this.bind(".xgplayer-slider","mousedown",this.onBarMousedown),this.bind(".xgplayer-slider","mousemove",this.onBarMouseMove),this.bind(".xgplayer-slider","mouseup",this.onBarMouseUp)),this.bind(".xgplayer-icon",["touchend","click"],this.changeMutedHandler),this.on(OT,this.onVolumeChange),this.once(IT,this.onVolumeChange),"Number"!==uT.typeOf(i)&&(this.player.volume=this.config.default),this.onVolumeChange()}}},{key:"updateVolumePos",value:function(e,t){var n=this.player,i=jm(this).call(this,".xgplayer-drag"),r=jm(this).call(this,".xgplayer-bar");if(r&&i){var o=Yw(e/r.getBoundingClientRect().height*1e3,10);i.style.height="".concat(e,"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(t,"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 e=this.player,t=e.volume,n=e.muted,i=jm(this).call(this,".xgplayer-value-label"),r=Math.max(Math.min(t,1),0);i.innerText=n?0:Math.ceil(100*r)}},{key:"focus",value:function(){this.player.focus({autoHide:!1}),this._timerId&&(uT.clearTimeout(this,this._timerId),this._timerId=null),uT.addClass(this.root,"slide-show")}},{key:"unFocus",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0,r=this._d,o=this.player;r.isActive||(this._timerId&&(uT.clearTimeout(this,this._timerId),this._timerId=null),this._timerId=uT.setTimeout(this,(function(){r.isActive||(n?o.blur():o.focus(),uT.removeClass(e.root,"slide-show"),r.isStart&&e.onBarMouseUp(i)),e._timerId=null}),t))}},{key:"changeMuted",value:function(e){e&&e.stopPropagation();var t=this.player;this._d.isStart&&this.onBarMouseUp(e),this.emitUserAction(e,"change_muted",{muted:t.muted,volume:t.volume,props:{muted:{from:t.muted,to:!t.muted}}}),t.volume>0&&(t.muted=!t.muted),t.volume<.01&&(t.volume=this.config.miniVolume)}},{key:"animate",value:function(e,t){e||0===t?this.setAttr("data-state","mute"):t<.5&&this.icons.volumeSmall?this.setAttr("data-state","small"):this.setAttr("data-state","normal")}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.volumeSmall),this.appendChild(".xgplayer-icon",e.volumeLarge),this.appendChild(".xgplayer-icon",e.volumeMuted)}},{key:"destroy",value:function(){this._timerId&&(uT.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"===gT.device?"touchend":"click",this.changeMutedHandler)}},{key:"render",value:function(){var e;if(!this.config.disable){var t=this.config.default||this.player.volume,n=this.config.showValueLabel;return Im(e='\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*t,"</div>"):"",'\n <div class="xgplayer-bar">\n <xg-drag class="xgplayer-drag" style="height: ')).call(e,100*t,'%"></xg-drag>\n </div>\n </xg-slider>\n </xg-icon>')}}}],[{key:"pluginName",get:function(){return"volume"}},{key:"defaultConfig",get:function(){return{position:RS.CONTROLS_RIGHT,index:1,disable:!1,showValueLabel:!1,default:.6,miniVolume:.2}}}]),n}(NS);function oO(){return(new DOMParser).parseFromString('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M16.5 4.3H3.5C3.38954 4.3 3.3 4.38954 3.3 4.5V15.5C3.3 15.6105 3.38954 15.7 3.5 15.7H8.50005L8.50006 17.5H3.5C2.39543 17.5 1.5 16.6046 1.5 15.5V4.5C1.5 3.39543 2.39543 2.5 3.5 2.5H16.5C17.6046 2.5 18.5 3.39543 18.5 4.5V8.5H16.7V4.5C16.7 4.38954 16.6105 4.3 16.5 4.3ZM12 11.5C11.4477 11.5 11 11.9477 11 12.5L11 16.5C11 17.0523 11.4478 17.5 12 17.5H17.5C18.0523 17.5 18.5 17.0523 18.5 16.5L18.5 12.5C18.5 11.9477 18.0523 11.5 17.5 11.5H12Z"\n fill="white" />\n</svg>',"image/svg+xml").firstChild}function aO(){return(new DOMParser).parseFromString('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M16.5 4.3H3.5C3.38954 4.3 3.3 4.38954 3.3 4.5V15.5C3.3 15.6105 3.38954 15.7 3.5 15.7H8.50005L8.50006 17.5H3.5C2.39543 17.5 1.5 16.6046 1.5 15.5V4.5C1.5 3.39543 2.39543 2.5 3.5 2.5H16.5C17.6046 2.5 18.5 3.39543 18.5 4.5V8.5H16.7V4.5C16.7 4.38954 16.6105 4.3 16.5 4.3ZM12 11.5C11.4477 11.5 11 11.9477 11 12.5L11 16.5C11 17.0523 11.4478 17.5 12 17.5H17.5C18.0523 17.5 18.5 17.0523 18.5 16.5L18.5 12.5C18.5 11.9477 18.0523 11.5 17.5 11.5H12Z"\n fill="white" />\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M9.4998 7.7C9.77595 7.7 9.9998 7.47614 9.9998 7.2V6.5C9.9998 6.22386 9.77595 6 9.4998 6H5.5402L5.52754 6.00016H5.5C5.22386 6.00016 5 6.22401 5 6.50016V10.4598C5 10.7359 5.22386 10.9598 5.5 10.9598H6.2C6.47614 10.9598 6.7 10.7359 6.7 10.4598V8.83005L8.76983 10.9386C8.96327 11.1357 9.27984 11.1386 9.47691 10.9451L9.97645 10.4548C10.1735 10.2613 10.1764 9.94476 9.983 9.7477L7.97289 7.7H9.4998Z"\n fill="white" />\n</svg>',"image/svg+xml").firstChild}var sO,lO="picture-in-picture",uO="inline",cO="fullscreen",hO=function(e){oC(n,e);var t=cC(n);function n(){var e,i;tC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return rC(lC(i=t.call.apply(t,Im(e=[this]).call(e,o))),"switchPIP",(function(e){if(!i.isPIPAvailable())return!1;e.stopPropagation&&e.stopPropagation(),i.isPip?(i.exitPIP(),i.emitUserAction(e,"change_pip",{props:"pip",from:!0,to:!1}),i.setAttr("data-state","normal")):4===i.player.media.readyState&&(i.requestPIP(),i.emitUserAction(e,"change_pip",{props:"pip",from:!1,to:!0}),i.setAttr("data-state","pip"))})),i}return iC(n,[{key:"beforeCreate",value:function(e){"boolean"==typeof e.player.config.pip&&(e.config.showIcon=e.player.config.pip)}},{key:"afterCreate",value:function(){var e=this;this.isPIPAvailable()&&(hC(aC(n.prototype),"afterCreate",this).call(this),this.pMode=uO,this.initPipEvents(),this.config.showIcon&&this.initIcons(),this.once(UT,(function(){e.config.showIcon&&(uT.removeClass(jm(e).call(e,".xgplayer-icon"),"xg-icon-disable"),e.bind("click",e.switchPIP))})))}},{key:"registerIcons",value:function(){return{pipIcon:{icon:oO,class:"xg-get-pip"},pipIconExit:{icon:aO,class:"xg-exit-pip"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.pipIcon),this.appendChild(".xgplayer-icon",e.pipIconExit)}},{key:"initPipEvents",value:function(){var e=this,t=this.player;this.leavePIPCallback=function(){var n=t.paused;uT.setTimeout(e,(function(){!n&&t.mediaPlay()}),0),!n&&t.mediaPlay(),e.setAttr("data-state","normal"),t.emit(JT,!1)},this.enterPIPCallback=function(n){t.emit(JT,!0),e.pipWindow=n.pictureInPictureWindow,e.setAttr("data-state","pip")},this.onWebkitpresentationmodechanged=function(n){var i=t.media.webkitPresentationMode;e.pMode===cO&&i!==cO&&t.onFullscreenChange(null,!1),e.pMode=i,i===lO?e.enterPIPCallback(n):i===uO&&e.leavePIPCallback(n)},t.media&&(t.media.addEventListener("enterpictureinpicture",this.enterPIPCallback),t.media.addEventListener("leavepictureinpicture",this.leavePIPCallback),n.checkWebkitSetPresentationMode(t.media)&&t.media.addEventListener("webkitpresentationmodechanged",this.onWebkitpresentationmodechanged))}},{key:"requestPIP",value:function(){var e=this.player,t=this.playerConfig;if(this.isPIPAvailable()&&!this.isPip)try{var i=t.poster;return i&&(e.media.poster="String"===uT.typeOf(i)?i:i.poster),n.checkWebkitSetPresentationMode(e.media)?e.media.webkitSetPresentationMode("picture-in-picture"):e.media.requestPictureInPicture(),!0}catch(r){return console.error("requestPiP",r),!1}}},{key:"exitPIP",value:function(){var e=this.player;try{return this.isPIPAvailable()&&this.isPip&&(n.checkWebkitSetPresentationMode(e.media)?e.media.webkitSetPresentationMode("inline"):document.exitPictureInPicture()),!0}catch(t){return console.error("exitPIP",t),!1}}},{key:"isPip",get:function(){var e=this.player;return document.pictureInPictureElement&&document.pictureInPictureElement===e.media||e.media.webkitPresentationMode===lO}},{key:"isPIPAvailable",value:function(){var e=this.player.media;return("Boolean"!==uT.typeOf(document.pictureInPictureEnabled)||document.pictureInPictureEnabled)&&("Boolean"===uT.typeOf(e.disablePictureInPicture)&&!e.disablePictureInPicture||e.webkitSupportsPresentationMode&&"Function"===uT.typeOf(e.webkitSetPresentationMode))}},{key:"destroy",value:function(){hC(aC(n.prototype),"destroy",this).call(this);var e=this.player;e.media.removeEventListener("enterpictureinpicture",this.enterPIPCallback),e.media.removeEventListener("leavepictureinpicture",this.leavePIPCallback),n.checkWebkitSetPresentationMode(e.media)&&e.media.removeEventListener("webkitpresentationmodechanged",this.onWebkitpresentationmodechanged),this.exitPIP(),this.unbind("click",this.btnClick)}},{key:"render",value:function(){if(this.config.showIcon&&this.isPIPAvailable())return'<xg-icon class="xgplayer-pip">\n <div class="xgplayer-icon xg-icon-disable">\n </div>\n '.concat(nP(this,"PIP",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"pip"}},{key:"defaultConfig",get:function(){return{position:RS.CONTROLS_RIGHT,index:6,showIcon:!1}}},{key:"checkWebkitSetPresentationMode",value:function(e){return"function"==typeof e.webkitSetPresentationMode}}]),n}(XP),fO=function(){function e(t){tC(this,e),this.config=t.config,this.parent=t.root,this.root=uT.createDom("ul","",{},"xg-options-list xg-list-slide-scroll ".concat(this.config.className)),t.root.appendChild(this.root);var n=this.config.maxHeight;n&&this.setStyle({maxHeight:n}),this.onItemClick=this.onItemClick.bind(this),this.renderItemList();var i="mobile"===gT.device?"touchend":"click";this._delegates=NS.delegate.call(this,this.root,"li",i,this.onItemClick)}return iC(e,[{key:"renderItemList",value:function(e){var t,n=this,i=this.config,r=this.root;(e?i.data=e:e=i.data,i.style)&&Ik(t=nw(i.style)).call(t,(function(e){r.style[e]=i[e]}));e.length>0&&(this.attrKeys=nw(e[0])),this.root.innerHTML="",Ik(e).call(e,(function(e,t){var i=e.selected?"option-item selected":"option-item";e["data-index"]=t,n.root.appendChild(uT.createDom("li","<span>".concat(e.showText,"</span>"),e,i))}))}},{key:"onItemClick",value:function(e){e.delegateTarget||(e.delegateTarget=e.target);var t=e.delegateTarget;if(t&&uT.hasClass(t,"selected"))return!1;var n="function"==typeof this.config.onItemClick?this.config.onItemClick:null,i=this.root.querySelector(".selected");uT.addClass(t,"selected"),i&&uT.removeClass(i,"selected"),n(e,{from:i?this.getAttrObj(i,this.attrKeys):null,to:this.getAttrObj(t,this.attrKeys)})}},{key:"getAttrObj",value:function(e,t){if(!e||!t)return{};var n={};Ik(t).call(t,(function(t){n[t]=e.getAttribute(t)}));var i=e.getAttribute("data-index");return i&&(n.index=Number(i)),n}},{key:"show",value:function(){uT.removeClass(this.root,"hide"),uT.addClass(this.root,"active")}},{key:"hide",value:function(){uT.removeClass(this.root,"active"),uT.addClass(this.root,"hide")}},{key:"setStyle",value:function(e){var t=this;nw(e).forEach((function(n){t.root.style[n]=e[n]}))}},{key:"destroy",value:function(){var e;this._delegates&&(Ik(e=this._delegates).call(e,(function(e){e.destroy&&e.destroy()})),this._delegates=null);this.root.innerHTML=null,this.parent.removeChild(this.root),this.root=null}}]),e}(),dO={SEI:"sei",PLAYER_CREATE_FINISH:"playerCreateFinish",FALLBACK_ERROR:"fallbackError",FALLBACK:"fallback",AUTOPLAY_STARTED:"autoplayStarted",AUTOPLAY_PREVENTED:"autoplayWasPrevented",DOWNLOAD_SPEED_CHANGE:"downloadSpeedChange",FULLSCREEN_CHANGE:"fullscreenChange",CSS_FULLSCREEN_CHANGE:"cssFullscreenChange",MINI_STATE_CHANGE:"miniStateChange",DEFINITION_CHANGE:"definitionChange",BEFORE_DEFINITION_CHANGE:"beforeDefinitionChange",AFTER_DEFINITION_CHANGE:"afterDefinitionChange",VIDEO_RESIZE:"videoResize",PIP_CHANGE:"pipChange",USER_ACTION:"userAction",AUTOPLAY_UNMUTE:"autoplayUnmute",LONG_WAITING:"longWaiting",DEFINITION_FALLBACK:"definitionFallback",AUTOPLAY_FAIL:"autoplayFail",AUTOPLAY_SUCCESS:"autoplaySuccess",ERROR_REFRESH_CLICK:"errorRefreshClick",SOURCE_CHANGE:"sourceChange"},pO=By(By({},aS),dO),vO=(Uy(sO={},dO.SEI,{event:"core_event",shouldCallback:function(e){return"core.sei"===(null==e?void 0:e.eventName)}}),Uy(sO,dO.AUTOPLAY_STARTED,{event:FT}),Uy(sO,dO.AUTOPLAY_PREVENTED,{event:HT}),Uy(sO,dO.FULLSCREEN_CHANGE,{event:zT}),Uy(sO,dO.CSS_FULLSCREEN_CHANGE,{event:KT}),Uy(sO,dO.MINI_STATE_CHANGE,{event:WT}),Uy(sO,dO.DEFINITION_CHANGE,{event:YT}),Uy(sO,dO.BEFORE_DEFINITION_CHANGE,{event:XT}),Uy(sO,dO.AFTER_DEFINITION_CHANGE,{event:qT}),Uy(sO,dO.VIDEO_RESIZE,{event:$T}),Uy(sO,dO.PIP_CHANGE,{event:JT}),Uy(sO,dO.USER_ACTION,{event:tS}),Uy(sO,dO.DOWNLOAD_SPEED_CHANGE,{event:GT}),sO);var gO=/["'&<>]/;function yO(e,t){return function(e){if(zy(e))return e}(e)||function(e,t){var n=null==e?null:void 0!==tc&&Yy(e)||e["@@iterator"];if(null!=n){var i,r,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(uh(s).call(s,i.value),s.length!==t);l=!0);}catch(c){u=!0,r=c}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return s}}(e,t)||cm(e,t)||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.")}()}var mO=P,_O=g,bO=pr,kO=$,wO=_O(M.f),EO=_O([].push),CO=function(e){return function(t){for(var n,i=kO(t),r=bO(i),o=r.length,a=0,s=[];o>a;)n=r[a++],mO&&!wO(i,n)||EO(s,e?[n,i[n]]:i[n]);return s}},xO={entries:CO(!0),values:CO(!1)},TO=xO.entries;Pn({target:"Object",stat:!0},{entries:function(e){return TO(e)}});var SO=n(te.Object.entries);function AO(e,t){var n=void 0!==tc&&Yy(e)||e["@@iterator"];if(!n){if(zy(e)||(n=cm(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}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(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}var PO=Ie,OO=qe,IO=z,RO=jn,MO=TypeError,LO=function(e){return function(t,n,i,r){PO(n);var o=OO(t),a=IO(o),s=RO(o),l=e?s-1:0,u=e?-1:1;if(i<2)for(;;){if(l in a){r=a[l],l+=u;break}if(l+=u,e?l<0:s<=l)throw MO("Reduce of empty array with no initial value")}for(;e?l>=0:s>l;l+=u)l in a&&(r=n(r,a[l],l,o));return r}},DO={left:LO(!1),right:LO(!0)}.left;Pn({target:"Array",proto:!0,forced:!Uf&&ve>79&&ve<83||!Fc("reduce")},{reduce:function(e){var t=arguments.length;return DO(this,e,t,t>1?arguments[1]:void 0)}});var NO=Bc("Array").reduce,FO=se,HO=NO,UO=Array.prototype,jO=n((function(e){var t=e.reduce;return e===UO||FO(UO,e)&&t===UO.reduce?HO:t}));var BO=function(){function e(t){var n;fm(this,e),Uy(this,"definition",void 0),Uy(this,"source",void 0),Uy(this,"text",void 0),Uy(this,"fallbackUrl",void 0),Uy(this,"urls",void 0),Uy(this,"_currentUrlRef",void 0);var i=t.url,r=t.definition,o=t.text,a=t.source,s=t.fallbackUrls;this.definition=r,this.text=o,this.source=a,this.urls=Im(n=[i]).call(n,hm(null!=s?s:[])),this.fallbackUrl=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t={url:e[0],next:null},n=t,i=1;i<e.length;i++){var r=i===e.length-1?t:null,o={url:e[i],next:r};n.next=o,n=o}return t}(this.urls),this._currentUrlRef=this.fallbackUrl}return pm(e,[{key:"url",get:function(){return this._currentUrlRef.url}},{key:"next",value:function(){var e=this._currentUrlRef.next;return e&&(this._currentUrlRef=e),this._currentUrlRef}}]),e}(),VO=function(){function e(t,n,i){var r=this;fm(this,e),Uy(this,"name",void 0),Uy(this,"text",void 0),Uy(this,"definitions",void 0),this.definitions=Ik(t).call(t,(function(e){return new BO(PC({},e,{source:r}))})),this.name=n,this.text=i}return pm(e,[{key:"defaultDefinition",get:function(){return this.definitions[0]}},{key:"add",value:function(e){this.definitions.push(e)}}],[{key:"normalize",value:function(t){if(void 0===t)throw new Error('"input" cannot be undefined');var n=void 0,i=void 0,r=void 0;if("string"==typeof t?n=t:Array.isArray(t)?r=t:(n=t.url,i=t.fallbackUrls,r=t.sources),"string"==typeof n)return e.normalizeUrl(n,i);if(Array.isArray(r)){if(0===r.length)throw new Error('"sources" cannot be an empty array');return Ik(r).call(r,(function(t){var n;return new e(Ik(n=t.definitions).call(n,(function(e){return"string"==typeof e?{url:e,definition:"unknown"}:e})),t.name,t.text)}))}return[]}},{key:"normalizeUrl",value:function(t,n){var i=new e([],"unknown");return i.add(new BO({definition:"unknown",url:t,source:i,fallbackUrls:n})),[i]}}]),e}(),GO=function(){function e(t){var n,i,r,o;fm(this,e),Uy(this,"defaultSource",void 0),Uy(this,"defaultDefinition",void 0),Uy(this,"maxFallbackRound",void 0),Uy(this,"_prepareList",[]),Uy(this,"_currentDefinition",void 0),Uy(this,"_sources",void 0),Uy(this,"_fallbackCount",0);var a=t.url,s=t.defaultDefinition,l=t.defaultSource,u=t.sources,c=t.maxFallbackRound;this.defaultDefinition=s,this.defaultSource=l,this.maxFallbackRound=null!=c?c:1,this._sources=u;var h=a?jm(this).call(this,a):null===(n=jm(i=this.sources).call(i,(function(e){return void 0===l||e.name===l})))||void 0===n?void 0:jm(r=n.definitions).call(r,(function(e){return void 0===s||e.definition===s}));this._currentDefinition=null!=h?h:null===(o=this._sources)||void 0===o||null===(o=o[0])||void 0===o||null===(o=o.definitions)||void 0===o?void 0:o[0]}var t;return pm(e,[{key:"sources",get:function(){return this._sources}},{key:"definition",get:function(){return this._currentDefinition}},{key:"source",get:function(){var e;return null===(e=this.definition)||void 0===e?void 0:e.source}},{key:"url",get:function(){var e;return null===(e=this.definition)||void 0===e?void 0:e.url}},{key:"find",value:function(e,t){var n,i,r,o,a,s=this;if("string"==typeof e)return jm(o=jO(a=this.sources).call(a,(function(e,t){return Im(e).call(e,t.definitions)}),[])).call(o,(function(t){return t.url===e}));var l=jm(n=this.sources).call(n,(function(t){var n,i;return t.name===(null!==(n=null==e?void 0:e.source)&&void 0!==n?n:null===(i=s.source)||void 0===i?void 0:i.name)})),u=null==l?void 0:jm(i=l.definitions).call(i,(function(t){var n,i;return t.definition===(null!==(n=null==e?void 0:e.definition)&&void 0!==n?n:null===(i=s.definition)||void 0===i?void 0:i.definition)}));return u||(null!=t&&t.fallbackToFirstDefinition&&null!=l&&null!==(r=l.definitions)&&void 0!==r&&r.length?null==l?void 0:l.definitions[0]:void 0)}},{key:"fallback",value:function(){var e;if(this._fallbackCount++,!(this._fallbackCount>=this.maxFallbackRound*this.definition.urls.length)){var t=null===(e=this._currentDefinition)||void 0===e?void 0:e.next();return null==t?void 0:t.url}this.resetFallback()}},{key:"switch",value:function(e){return this._currentDefinition=e,this.resetFallback(),e}},{key:"updateSources",value:function(e,t){var n,i,r,o,a;return this._sources=VO.normalize(e),this._currentDefinition=null!==(n=jm(this).call(this,null!=t?t:{source:null!==(i=this.defaultSource)&&void 0!==i?i:null===(r=this._currentDefinition)||void 0===r?void 0:r.source.name,definition:null!==(o=this.defaultDefinition)&&void 0!==o?o:null===(a=this._currentDefinition)||void 0===a?void 0:a.definition}))&&void 0!==n?n:this._sources[0].definitions[0],this.resetFallback(),this}},{key:"registerPrepare",value:function(e){this._prepareList.push(e)}},{key:"prepare",value:(t=Gy(Jg().mark((function e(t){var n,i,r;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=AO(this._prepareList),e.prev=1,n.s();case 3:if((i=n.n()).done){e.next=9;break}return r=i.value,e.next=7,r(t);case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),n.e(e.t0);case 14:return e.prev=14,n.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))),function(e){return t.apply(this,arguments)})},{key:"resetFallback",value:function(){this._fallbackCount=0}}]),e}();function zO(){var e;"undefined"!=typeof Reflect&&YE?zO=DA(e=YE).call(e):zO=function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=HA(e)););return e}(e,t);if(i){var r=ky(i,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}};return zO.apply(this,arguments)}function KO(){return(new DOMParser).parseFromString('<svg width="150" height="162" viewBox="0 0 150 162" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M127.718 112.831H6.13675C4.19663 112.831 2.25651 108.974 2.90322 104.475C3.54993 99.9761 8.07687 99.9761 13.8972 99.9761C11.9571 97.4052 9.37028 88.4069 15.8373 81.3369C22.3044 74.2668 25.5379 74.2668 34.5918 75.5526C33.9451 63.9837 47.526 34.4178 77.2744 35.0605C107.023 35.7032 116.077 54.3421 119.957 63.3404C129.011 62.6976 147.765 66.554 149.706 87.1214C151.258 103.575 135.694 111.117 127.718 112.831Z" fill="#F1F4F8"/>\n<path d="M44.9346 91.6022L43.6782 99.8032" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n<path d="M47.3545 125.695L48.6109 117.494" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n<path d="M31.5347 97.7378L38.7295 101.869" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n<path d="M60.7544 119.559L53.5595 115.428" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n<path d="M69.6755 44.5318L138.35 26.0209C139.115 25.8148 139.804 26.5367 139.563 27.2909L121.081 85.1146C120.982 85.4243 120.739 85.6665 120.429 85.7641L52.0645 107.28C51.2996 107.521 50.5766 106.809 50.8062 106.04L68.9776 45.2111C69.0768 44.879 69.3409 44.622 69.6755 44.5318Z" fill="#D0D6E0" stroke="#D0D6E0" stroke-width="4" stroke-linecap="round"/>\n<path d="M83.1285 52.7415C91.6454 54.3438 107.322 62.0019 101.894 79.8155" stroke="white" stroke-width="3" stroke-linecap="round"/>\n<path d="M84.138 62.3385C88.3894 63.1384 96.2148 66.9611 93.5053 75.8531" stroke="white" stroke-width="3" stroke-linecap="round"/>\n<ellipse cx="83.6417" cy="71.98" rx="3.08443" ry="3.07025" transform="rotate(12.6375 83.6417 71.98)" fill="white"/>\n<path d="M43.4699 110.358C39.5425 109.114 30.6316 108.203 26.4077 114.511C21.1278 122.397 36.5031 152.755 2.11053 160.141" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n</svg>\n',"image/svg+xml").firstChild}var WO=function(e){FA(n,e);var t=jA(n);function n(){var e,i;fm(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Uy(SA(i=t.call.apply(t,Im(e=[this]).call(e,o))),"_error",void 0),i}return pm(n,[{key:"_errorTip",get:function(){var e,t,n,i=this.player.config.i18nManager,r=null===(e=this._error)||void 0===e?void 0:e.errorCode;return this.config.errorTipsText?i.normalize(this.config.errorTipsText):Im(t="".concat(r?"[".concat(r,"] "):"")).call(t,null===(n=this._error)||void 0===n?void 0:n.message)}},{key:"afterCreate",value:function(){this._handleRefresh=this._handleRefresh.bind(this),this._focus=this._focus.bind(this),this._initEvents(),this._initIcons(),"mobile"===gT.device&&this.bind("touchend",this._focus),this.bind(".veplayer-error-refresh","click",this._handleRefresh)}},{key:"registerIcons",value:function(){return{error:{icon:KO,class:"veplayer-error-svg"}}}},{key:"updateLang",value:function(){this.config.showRefresh&&this._renderRefresh(),this._renderExtraTips()}},{key:"showError",value:function(e){this._error=e instanceof WA?e:XA(e),this.config.showErrorTip&&this._renderText(this._errorTip),this._renderExtraTips(),zO(HA(n.prototype),"show",this).call(this)}},{key:"hideError",value:function(){zO(HA(n.prototype),"hide",this).call(this)}},{key:"destroy",value:function(){"mobile"===gT.device&&this.unbind("touchend",this._focus),this.unbind(".veplayer-error-refresh","click",this._handleRefresh),this.off(pO.FALLBACK_ERROR,this.showError.bind(this)),this.off(AT,this.hideError.bind(this))}},{key:"render",value:function(){var e,t=this.player.config.i18nManager;return Im(e='<veplayer-error class="veplayer-error">\n <div class="veplayer-error-cover">\n '.concat(this.config.showErrorImg?'<div class="veplayer-error-img"></div>':"",'\n <div class="veplayer-error-tips"></div>\n ')).call(e,this.config.showRefresh?'<div class="veplayer-error-refresh">'.concat(t.getText("ERROR_REFRESH"),"</div>"):"",'\n <div class="veplayer-error-extra"></div>\n </div>\n </veplayer-error>')}},{key:"_focus",value:function(){this.player.focus({autoHide:!0})}},{key:"_initIcons",value:function(){this.config.showErrorImg&&this.appendChild(".veplayer-error-img",this.icons.error)}},{key:"_initEvents",value:function(){this.on(pO.FALLBACK_ERROR,this.showError.bind(this)),this.on(AT,this.hideError.bind(this)),this.on(kT,this.hideError.bind(this)),this.on(ZT,this.hideError.bind(this))}},{key:"_renderText",value:function(e){var t=jm(this).call(this,".veplayer-error-tips");t&&(t.innerText=e)}},{key:"_renderExtraTips",value:function(){var e,t=this,n=jm(this).call(this,".veplayer-error-extra");n&&(n.innerHTML="");var i=this.player.config.i18nManager;null===(e=this.config.extraTips)||void 0===e||e.forEach((function(e){if(e){var n,r=uT.createDom("div",Im(n="".concat(i.normalize(e.label),": ")).call(n,i.normalize(e.value)),void 0,"veplayer-error-detail-info");t.appendChild(".veplayer-error-extra",r)}}))}},{key:"_handleRefresh",value:function(){var e,t;null===(e=this.player)||void 0===e||e.emit(pO.ERROR_REFRESH_CLICK),null===(t=this.player)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.veplayer)||void 0===t||t.retry(),this.hideError()}},{key:"_renderRefresh",value:function(){var e,t=this.player.config.i18nManager,n=jm(this).call(this,".veplayer-error-refresh");n&&(n.innerHTML=null!==(e=t.getText("ERROR_REFRESH"))&&void 0!==e?e:"")}}],[{key:"pluginName",get:function(){return"error"}},{key:"defaultConfig",get:function(){return{showErrorImg:!0,showErrorTip:!0,showRefresh:!0,errorTipsText:"",extraTips:[],position:NS.POSITIONS.ROOT}}}]),n}(NS),YO=function(e){FA(n,e);var t=jA(n);function n(){var e,i;fm(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Uy(SA(i=t.call.apply(t,Im(e=[this]).call(e,o))),"_toastNumber",0),Uy(SA(i),"_toastMap",{}),i}return pm(n,[{key:"toast",value:function(e,t){var n=this,i=t||{},r=i.duration,o=void 0===r?2e3:r,a=i.closable,s=void 0!==a&&a,l=this._toastNumber+1;this._toastNumber=l;var u=this._renderToast(e,s,l);return this.root.appendChild(u),this._toastMap[l]=u,setTimeout((function(){n.remove(l)}),o),l}},{key:"remove",value:function(e){var t=this._toastMap[e];t&&(this.root.contains(t)&&this.root.removeChild(t),delete this._toastMap[e])}},{key:"render",value:function(){return'<veplayer-toast class="veplayer-toast"></veplayer-toast>'}},{key:"_renderToast",value:function(e,t,n){var i=this,r=uT.createDom("div","",void 0,"veplayer-toast-container"),o=uT.checkIsObject(e)?e:uT.createDom("div",e,void 0,"veplayer-toast-txt");if(r.appendChild(o),t){var a=uT.createDom("span","×",void 0,"veplayer-toast-close");a.addEventListener("click",(function(){i.remove(n)})),r.appendChild(a)}return r}}],[{key:"pluginName",get:function(){return"toast"}},{key:"defaultConfig",get:function(){return{index:5}}}]),n}(NS);function XO(){return(new DOMParser).parseFromString('<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M12.7123 1C11.85 1 11.1173 1.55472 10.8516 2.32675L4.94973 2.32675C3.16413 2.32675 1.71662 3.77427 1.71662 5.55987C1.71662 7.34547 3.16413 8.79298 4.94973 8.79298L11.0483 8.79298L11.1134 8.79418C11.9936 8.82748 12.697 9.55166 12.697 10.44C12.697 11.3497 11.9596 12.0871 11.05 12.0871H5.01323C4.67882 11.4781 4.03143 11.0654 3.28763 11.0654C2.20111 11.0654 1.32031 11.9462 1.32031 13.0327C1.32031 14.1192 2.20111 15 3.28763 15C4.14992 15 4.88264 14.4452 5.14834 13.6732H11.05C12.8356 13.6732 14.2831 12.2256 14.2831 10.44C14.2831 8.65444 12.8356 7.20693 11.05 7.20693L4.94973 7.20693C4.04009 7.20693 3.30267 6.46951 3.30267 5.55987C3.30267 4.65022 4.04009 3.91281 4.94973 3.91281L10.9866 3.91281C11.321 4.52183 11.9685 4.93464 12.7123 4.93464C13.7988 4.93464 14.6796 4.05384 14.6796 2.96732C14.6796 1.8808 13.7988 1 12.7123 1ZM12.7123 2.18954C12.2827 2.18954 11.9345 2.53777 11.9345 2.96732C11.9345 3.39688 12.2827 3.7451 12.7123 3.7451C13.1418 3.7451 13.4901 3.39688 13.4901 2.96732C13.4901 2.53777 13.1418 2.18954 12.7123 2.18954ZM2.50986 13.0327C2.50986 12.6031 2.85808 12.2549 3.28763 12.2549C3.71719 12.2549 4.06541 12.6031 4.06541 13.0327C4.06541 13.4622 3.71719 13.8105 3.28763 13.8105C2.85808 13.8105 2.50986 13.4622 2.50986 13.0327Z" fill="#FFFFFF"/>\n</svg>',"image/svg+xml").firstChild}var qO=function(){function e(t){fm(this,e),Uy(this,"_root",void 0),Uy(this,"_config",void 0),Uy(this,"_parent",void 0),Uy(this,"_listDom",void 0),Uy(this,"_container",void 0),Uy(this,"_titleDom",void 0),Uy(this,"_player",void 0),Uy(this,"_delegates",void 0),Uy(this,"_listType",void 0);var n=t.config,i=t.root,r=t.player;this._config=n,this._parent=i,this._player=r,this._listType=n.listType,this.renderPanel(),this._initEvents(),this._bindDomEvent()}return pm(e,[{key:"changeMode",value:function(e){this.updatePanel(e),this._listType=e}},{key:"renderItemList",value:function(e){var t,n=this,i=this._config;return e&&(i.list=e),this._listDom||(this._listDom=uT.createDom("div","",{},"item-list-panel-content")),this._listDom.innerHTML="",null===(t=i.list)||void 0===t||Ik(t).call(t,(function(e,t){var i,r,o=e.selected?"panel-item select-in":"panel-item ".concat(null!==(i=e.className)&&void 0!==i?i:"");e["data-index"]=t;var a=uT.createDom("div","",e,o);e.showText&&("string"==typeof e.showText?a.innerHTML=e.showText:a.appendChild(e.showText)),null===(r=n._listDom)||void 0===r||r.appendChild(a)})),this._listDom}},{key:"renderTitle",value:function(){var e,t,n=this._player.config.i18nManager;if(null!==(e=this._config.panel)&&void 0!==e&&e.title&&this._listType!==ZO.Inner)return this._titleDom||(this._titleDom=uT.createDom("div","",{},"xg-mobile-panel-title")),this._titleDom.innerHTML=n.normalize(null===(t=this._config.panel)||void 0===t?void 0:t.title),this._titleDom}},{key:"updatePanel",value:function(e){this._root&&uT.removeClass(this._root,"panel-".concat(this._listType)),this._root&&uT.addClass(this._root,"panel-".concat(e));var t="mobile"===gT.device?"touchend":"click";e===ZO.Inner?this._container&&this._bind(this._container,t,this._handleHide.bind(this)):this._container&&this._unbind(this._container,t,this._handleHide.bind(this))}},{key:"renderPanel",value:function(){var e,t,n,i=Im(e="xg-mobile-panel panel-".concat(this._config.listType," ")).call(e,null!==(t=null===(n=this._config)||void 0===n||null===(n=n.panel)||void 0===n?void 0:n.className)&&void 0!==t?t:"");this._root=uT.createDom("div","",{},i),this._parent&&this._parent.appendChild(this._root);var r=this.renderTitle(),o=this.renderItemList();this._container=uT.createDom("div","",{},"xg-mobile-panel-content"),this._root.appendChild(this._container),r&&this._container.appendChild(r),o&&this._container.appendChild(o)}},{key:"show",value:function(){this._root&&(uT.removeClass(this._root,"hide"),uT.addClass(this._root,"active"))}},{key:"hide",value:function(){this._root&&(uT.removeClass(this._root,"active"),uT.addClass(this._root,"hide"))}},{key:"destroy",value:function(){this._parent&&this._root&&this._parent.removeChild(this._root),this._unbindDomEvent(),this._unbindEvents()}},{key:"_bind",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e&&"on".concat(t)in e&&"function"==typeof n&&e.addEventListener(t,n,i)}},{key:"_unbind",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e&&"on".concat(t)in e&&"function"==typeof n&&e.removeEventListener(t,n,i)}},{key:"_initEvents",value:function(){var e;this._config.isAutoChange&&(window.addEventListener("orientationchange",this._handleOrientationChange.bind(this)),null===(e=this._player)||void 0===e||e.on(zT,this._handleOrientationChange.bind(this)))}},{key:"_unbindEvents",value:function(){var e;window.removeEventListener("orientationchange",this._handleOrientationChange.bind(this)),null===(e=this._player)||void 0===e||e.off(zT,this._handleOrientationChange.bind(this))}},{key:"_handleOrientationChange",value:function(){var e,t,n,i=ew(e=[90,-90,"90","-90"]).call(e,window.orientation);if(null!==(t=this._player)&&void 0!==t&&t.fullscreen&&i)this.changeMode(ZO.Fullscreen);else if(this._listType!==(null===(n=this._config)||void 0===n?void 0:n.listType)){var r;this.changeMode(null===(r=this._config)||void 0===r?void 0:r.listType)}}},{key:"_bindDomEvent",value:function(){var e="mobile"===gT.device?"touchend":"click";this._listType===ZO.Inner&&this._container&&this._bind(this._container,e,this._handleHide.bind(this)),this._root&&this._bind(this._root,e,this._handleHide.bind(this)),this._container&&this._bind(this._container,e,this._stopPropagation),this._listDom&&(this._delegates=NS.delegate.call(this,this._listDom,".panel-item",e,this._onItemClick.bind(this),!0))}},{key:"_unbindDomEvent",value:function(){var e,t="mobile"===gT.device?"touchend":"click";(this._root&&this._unbind(this._root,t,this._handleHide.bind(this)),this._container&&this._unbind(this._container,t,this._handleHide.bind(this)),this._container&&this._unbind(this._container,t,this._stopPropagation),this._delegates)&&(Ik(e=this._delegates).call(e,(function(e){e.destroy&&e.destroy()})),this._delegates=null)}},{key:"_stopPropagation",value:function(e){e.stopPropagation(),e.preventDefault()}},{key:"_onItemClick",value:function(e){var t,n,i,r,o=e.delegateTarget,a="function"==typeof this._config.onOptionClick?this._config.onOptionClick:null,s="function"==typeof this._config.onItemClick?this._config.onItemClick:null,l=null===(t=this._root)||void 0===t?void 0:t.querySelector(".selected");uT.addClass(o,"selected"),l&&(uT.removeClass(l,"selected"),r=Number(l.getAttribute("data-index")));var u=Number(o.getAttribute("data-index")),c={from:void 0!==bc(r)?null===(n=this._config.list)||void 0===n?void 0:n[r]:void 0,to:null===(i=this._config.list)||void 0===i?void 0:i[u]};null==a||a(e,c),o&&r===u||null==s||s(e,c)}},{key:"_handleHide",value:function(e){var t,n;e.stopPropagation(),e.preventDefault(),null===(t=(n=this._config).hide)||void 0===t||t.call(n)}}]),e}(),ZO={Middle:"middle",Bottom:"bottom",Fullscreen:"fullscreen",Inner:"inner"},$O=function(e){return e.Icon="Icon",e.Text="Text",e}($O||{}),JO="mobile"===gT.device,QO=[ZO.Bottom,ZO.Fullscreen,ZO.Inner],eI=[ZO.Middle],tI=[ZO.Bottom,ZO.Inner,ZO.Fullscreen],nI=[ZO.Bottom,ZO.Inner,ZO.Fullscreen],iI=function(e){FA(n,e);var t=jA(n);function n(e){var i;return fm(this,n),Uy(SA(i=t.call(this,e)),"optionsList",void 0),Uy(SA(i),"_isIcon",void 0),Uy(SA(i),"_isActive",void 0),Uy(SA(i),"_curIndex",void 0),Uy(SA(i),"activeEvent",void 0),Uy(SA(i),"onEnter",(function(e){e.preventDefault(),e.stopPropagation(),i.emit("icon_mouseenter",{pluginName:i.pluginName}),i.toggle(!0)})),Uy(SA(i),"onLeave",(function(e){e.preventDefault(),e.stopPropagation(),i.emit("icon_mouseleave",{pluginName:i.pluginName}),i._isActive&&i.toggle(!1)})),i._isIcon=!1,i._isActive=!1,i._curIndex=0,i}return pm(n,[{key:"updateLang",value:function(){this.config.list&&this.renderItemList(this.config.list,this._curIndex)}},{key:"afterCreate",value:function(){var e=this,t=this.config;this.config.listType=this._getListType(),this.initIcons(),t.hidePortrait&&uT.addClass(this.root,"portrait"),JO&&this.on(MT,(function(){e._isActive&&(e.optionsList&&e.optionsList.hide(),e._isActive=!1)})),t.list&&this.renderItemList(t.list),this.activeEvent=JO?"touchend":"mouseenter",this.bind(this.activeEvent,this.onEnter),this.bind("mouseleave",this.onLeave)}},{key:"initIcons",value:function(){var e=this,t=this.icons,n=nw(t);if(n.length>0&&"Icon"===this.config.renderType)return n.forEach((function(n){e.appendChild(".xgplayer-icon",t[n])})),void(this._isIcon=!0);var i=this.appendChild(".xgplayer-icon",uT.createDom("span","",{},"icon-text"));i&&uT.addClass(i,"btn-text")}},{key:"show",value:function(){!this.config.list||this.config.list.length<1||this.config.hideOnSingleOption&&1===this.config.list.length||uT.addClass(this.root,"show")}},{key:"hide",value:function(){uT.removeClass(this.root,"show")}},{key:"toggle",value:function(e){if(e!==this._isActive){var t=this.player.controls,n=this.config.listType;e?(n&&ew(tI).call(tI,n)?t.blur():t.focus(),this.optionsList&&this.optionsList.show()):(n&&ew(tI).call(tI,n)?t.focus():t.focusAwhile(),this.optionsList&&this.optionsList.hide()),this._isActive=e}}},{key:"onItemClick",value:function(e,t){var n;e.preventDefault(),e.stopPropagation();var i=this.config.listType;this._curIndex=null===(n=t.to)||void 0===n?void 0:n.index,this.changeCurrentText(),(this.config.isItemClickHide||i&&ew(tI).call(tI,i))&&this.toggle(!1)}},{key:"onOptionClick",value:function(e,t){e.preventDefault(),e.stopPropagation()}},{key:"changeCurrentText",value:function(){if(!this._isIcon){var e=this.config.list,t=e&&this._curIndex<e.length?this._curIndex:0,n=null==e?void 0:e[t];if(n){var i,r=jm(this).call(this,".icon-text"),o=this.player.config.i18nManager;if(r)r.innerHTML=o.normalize(null!==(i=null==n?void 0:n.iconText)&&void 0!==i?i:null==n?void 0:n.text)}}}},{key:"renderItemList",value:function(e,t){var i,r=this,o=this.config,a=this.optionsList,s=this.player;if("number"==typeof t&&(this._curIndex=t),a)return a.renderItemList(e),this.changeCurrentText(),void(a instanceof qO&&a.renderTitle());this.config.isShowIcon&&(this.optionsList=o.listType&&ew(nI).call(nI,o.listType)?new qO({config:{list:e||[],onItemClick:function(e,t){r.onItemClick(e,t)},onOptionClick:function(e,t){r.onOptionClick(e,t)},panel:this.config.panel,listType:null!==(i=o.listType)&&void 0!==i?i:n.defaultConfig.listType,isAutoChange:o.isAutoChange,hide:function(){return r.toggle(!1)}},root:s.root,player:s}):new fO({config:{data:e||[],onItemClick:function(e,t){r.onItemClick(e,t)}},root:this.root}),this.changeCurrentText(),this.show())}},{key:"destroy",value:function(){this.activeEvent&&this.unbind(this.activeEvent,this.onEnter),this.unbind("mouseleave",this.onLeave),this.optionsList&&(this.optionsList.destroy(),this.optionsList=void 0)}},{key:"render",value:function(){return this.config.isShowIcon?'<xg-icon class="xg-options-icon '.concat(this.config.className||"",'">\n <div class="xgplayer-icon">\n </div>\n </xg-icon>'):""}},{key:"_getListType",value:function(){var e,t=this.config.listType;return null!==(e=this.player)&&void 0!==e&&null!==(e=e.config)&&void 0!==e&&e.listType&&(t=this.player.config.listType),JO||t&&ew(QO).call(QO,t)||(t=ZO.Bottom),JO||t&&ew(eI).call(eI,t)||(t=ZO.Middle),t}}],[{key:"pluginName",get:function(){return"optionsIcon"}},{key:"defaultConfig",get:function(){return{position:JO?mR.ROOT_TOP_RIGHT:mR.CONTROLS_RIGHT,listType:JO?ZO.Bottom:ZO.Middle,index:100,list:[],listStyle:{},hidePortrait:!0,isShowIcon:!1,renderType:JO?"Icon":"Text",isItemClickHide:!0,hideOnSingleOption:!0,isAutoChange:!0}}}]),n}(NS),rI=function(e){FA(n,e);var t=jA(n);function n(){return fm(this,n),t.apply(this,arguments)}return pm(n,[{key:"updateLang",value:function(){this.renderItemList()}},{key:"beforeCreate",value:function(e){var t=e.player.config.sources.sourceManager;e.config.list=t.sources}},{key:"afterCreate",value:function(){zO(HA(n.prototype),"afterCreate",this).call(this),this.config.sourceManager.sources.length<2?this.hide():this.renderItemList()}},{key:"registerIcons",value:function(){return{source:{icon:XO}}}},{key:"renderItemList",value:function(){var e=this.config.sourceManager,t=e.sources,i=e.source,r=this.player.config.i18nManager,o=Ik(t).call(t,(function(e){var t;return By(By({},e),{},{showText:null!==(t=r.normalize(e.text))&&void 0!==t?t:e.name,selected:!1})})),a=YP(o).call(o,(function(e){return e.name===(null==i?void 0:i.name)}));this.config.list=t,a>-1&&(o[a].selected=!0),zO(HA(n.prototype),"renderItemList",this).call(this,o,a)}},{key:"onItemClick",value:function(e,t){var i,r=this;zO(HA(n.prototype),"onItemClick",this).call(this,e,t),null===(i=this.player.config)||void 0===i||i.veplayer.switch({source:t.to.name},{fallbackToFirstDefinition:!0}).catch((function(){r.renderItemList()}))}}],[{key:"pluginName",get:function(){return"sources"}},{key:"defaultConfig",get:function(){return By(By({},iI.defaultConfig),{},{index:4,panel:{title:{jp:"ライン選ぶ",en:"Line Choose","zh-cn":"线路选择","zh-hk":"線路選擇"}},list:[],className:"xgplayer-sources",hidePortrait:!1,isShowIcon:!0})}},{key:"textTips",get:function(){return{jp:"ライン",en:"Line","zh-cn":"线路","zh-hk":"線路"}}}]),n}(iI);function oI(){return(new DOMParser).parseFromString('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M16 3.8001H4C3.55817 3.8001 3.2 4.15827 3.2 4.6001V12.6001C3.2 13.0419 3.55817 13.4001 4 13.4001H16C16.4418 13.4001 16.8 13.0419 16.8 12.6001V4.6001C16.8 4.15827 16.4418 3.8001 16 3.8001ZM4 2.6001C2.89543 2.6001 2 3.49553 2 4.6001V12.6001C2 13.7047 2.89543 14.6001 4 14.6001H16C17.1046 14.6001 18 13.7047 18 12.6001V4.6001C18 3.49553 17.1046 2.6001 16 2.6001H4ZM5.0249 6.24509V11.6001H5.9024V9.23009H8.6174V11.6001H9.4949V6.24509H8.6174V8.48009H5.9024V6.24509H5.0249ZM10.5474 6.24509V11.6001H12.5049C13.3749 11.6001 14.0274 11.3601 14.4774 10.8801C14.9049 10.4226 15.1224 9.77009 15.1224 8.92259C15.1224 8.06759 14.9049 7.41509 14.4774 6.96509C14.0274 6.48509 13.3749 6.24509 12.5049 6.24509H10.5474ZM11.4249 6.99509H12.3399C13.0074 6.99509 13.4949 7.14509 13.8024 7.45259C14.1024 7.75259 14.2524 8.24759 14.2524 8.92259C14.2524 9.58259 14.1024 10.0701 13.8024 10.3851C13.4949 10.6926 13.0074 10.8501 12.3399 10.8501H11.4249V6.99509ZM4.15 16.1001C3.79101 16.1001 3.5 16.3911 3.5 16.7501C3.5 17.1091 3.79101 17.4001 4.15 17.4001H15.85C16.209 17.4001 16.5 17.1091 16.5 16.7501C16.5 16.3911 16.209 16.1001 15.85 16.1001H4.15Z" fill="#ffffff"/>\n</svg>',"image/svg+xml").firstChild}var aI={exports:{}};!function(e,n){var i="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",a="[object Boolean]",s="[object Date]",l="[object Function]",u="[object GeneratorFunction]",c="[object Map]",h="[object Number]",f="[object Object]",d="[object Promise]",p="[object RegExp]",v="[object Set]",g="[object String]",y="[object Symbol]",m="[object WeakMap]",_="[object ArrayBuffer]",b="[object DataView]",k="[object Float32Array]",w="[object Float64Array]",E="[object Int8Array]",C="[object Int16Array]",x="[object Int32Array]",T="[object Uint8Array]",S="[object Uint8ClampedArray]",A="[object Uint16Array]",P="[object Uint32Array]",O=/\w*$/,I=/^\[object .+?Constructor\]$/,R=/^(?:0|[1-9]\d*)$/,M={};M[o]=M["[object Array]"]=M[_]=M[b]=M[a]=M[s]=M[k]=M[w]=M[E]=M[C]=M[x]=M[c]=M[h]=M[f]=M[p]=M[v]=M[g]=M[y]=M[T]=M[S]=M[A]=M[P]=!0,M["[object Error]"]=M[l]=M[m]=!1;var L="object"==bc(t)&&t&&t.Object===Object&&t,D="object"==("undefined"==typeof self?"undefined":bc(self))&&self&&self.Object===Object&&self,N=L||D||Function("return this")(),F=n&&!n.nodeType&&n,H=F&&e&&!e.nodeType&&e,U=H&&H.exports===F;function j(e,t){return e.set(t[0],t[1]),e}function B(e,t){return e.add(t),e}function V(e,t,n,i){var r=-1,o=e?e.length:0;for(i&&o&&(n=e[++r]);++r<o;)n=t(n,e[r],r,e);return n}function G(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}function z(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function K(e,t){return function(n){return e(t(n))}}function W(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var Y,X=Array.prototype,q=Function.prototype,Z=Object.prototype,$=N["__core-js_shared__"],J=(Y=/[^.]+$/.exec($&&tE($)&&tE($).IE_PROTO||""))?"Symbol(src)_1."+Y:"",Q=q.toString,ee=Z.hasOwnProperty,te=Z.toString,ne=RegExp("^"+Q.call(ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ie=U?N.Buffer:void 0,re=N.Symbol,oe=N.Uint8Array,ae=K(cE,Object),se=Object.create,le=Z.propertyIsEnumerable,ue=Cw(X),ce=nE,he=ie?ie.isBuffer:void 0,fe=K(nw,Object),de=He(N,"DataView"),pe=He(N,"Map"),ve=He(N,"Promise"),ge=He(N,"Set"),ye=He(N,"WeakMap"),me=He(Object,"create"),_e=Ge(de),be=Ge(pe),ke=Ge(ve),we=Ge(ge),Ee=Ge(ye),Ce=re?re.prototype:void 0,xe=Ce?Ce.valueOf:void 0;function Te(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Se(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Ae(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Pe(e){this.__data__=new Se(e)}function Oe(e,t){var n=Ke(e)||function(e){return function(e){return function(e){return!!e&&"object"==bc(e)}(e)&&We(e)}(e)&&ee.call(e,"callee")&&(!le.call(e,"callee")||te.call(e)==o)}(e)?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],i=n.length,r=!!i;for(var a in e)!t&&!ee.call(e,a)||r&&("length"==a||Be(a,i))||n.push(a);return n}function Ie(e,t,n){var i=e[t];ee.call(e,t)&&ze(i,n)&&(void 0!==n||t in e)||(e[t]=n)}function Re(e,t){for(var n=e.length;n--;)if(ze(e[n][0],t))return n;return-1}function Me(e,t,n,i,r,d,m){var I;if(i&&(I=d?i(e,r,d,m):i(e)),void 0!==I)return I;if(!qe(e))return e;var R=Ke(e);if(R){if(I=function(e){var t=e.length,n=e.constructor(t);t&&"string"==typeof e[0]&&ee.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!t)return function(e,t){var n=-1,i=e.length;t||(t=Array(i));for(;++n<i;)t[n]=e[n];return t}(e,I)}else{var L=je(e),D=L==l||L==u;if(Ye(e))return function(e,t){if(t)return iw(e).call(e);var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(L==f||L==o||D&&!d){if(G(e))return d?e:{};if(I=function(e){return"function"!=typeof e.constructor||Ve(e)?{}:(t=ae(e),qe(t)?se(t):{});var t}(D?{}:e),!t)return function(e,t){return Ne(e,Ue(e),t)}(e,function(e,t){return e&&Ne(t,Ze(t),e)}(I,e))}else{if(!M[L])return d?e:{};I=function(e,t,n,i){var r=e.constructor;switch(t){case _:return De(e);case a:case s:return new r(+e);case b:return function(e,t){var n=t?De(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,i);case k:case w:case E:case C:case x:case T:case S:case A:case P:return function(e,t){var n=t?De(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,i);case c:return function(e,t,n){var i=t?n(z(e),!0):z(e);return V(i,j,new e.constructor)}(e,i,n);case h:case g:return new r(e);case p:return function(e){var t=new e.constructor(e.source,O.exec(e));return t.lastIndex=e.lastIndex,t}(e);case v:return function(e,t,n){var i=t?n(W(e),!0):W(e);return V(i,B,new e.constructor)}(e,i,n);case y:return o=e,xe?Object(xe.call(o)):{}}var o}(e,L,Me,t)}}m||(m=new Pe);var N=m.get(e);if(N)return N;if(m.set(e,I),!R)var F=n?function(e){return function(e,t,n){var i=t(e);return Ke(e)?i:function(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}(i,n(e))}(e,Ze,Ue)}(e):Ze(e);return function(e,t){for(var n=-1,i=e?e.length:0;++n<i&&!1!==t(e[n],n,e););}(F||e,(function(r,o){F&&(r=e[o=r]),Ie(I,o,Me(r,t,n,i,o,e,m))})),I}function Le(e){return!(!qe(e)||(t=e,J&&J in t))&&(Xe(e)||G(e)?ne:I).test(Ge(e));var t}function De(e){var t=new e.constructor(e.byteLength);return new oe(t).set(new oe(e)),t}function Ne(e,t,n,i){n||(n={});for(var r=-1,o=t.length;++r<o;){var a=t[r],s=i?i(n[a],e[a],a,n,e):void 0;Ie(n,a,void 0===s?e[a]:s)}return n}function Fe(e,t){var n,i,r=e.__data__;return("string"==(i=bc(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof t?"string":"hash"]:Ik(r)}function He(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Le(n)?n:void 0}Te.prototype.clear=function(){this.__data__=me?me(null):{}},Te.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Te.prototype.get=function(e){var t=this.__data__;if(me){var n=t[e];return n===i?void 0:n}return ee.call(t,e)?t[e]:void 0},Te.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:ee.call(t,e)},Te.prototype.set=function(e,t){return this.__data__[e]=me&&void 0===t?i:t,this},Se.prototype.clear=function(){this.__data__=[]},Se.prototype.delete=function(e){var t=this.__data__,n=Re(t,e);return!(n<0)&&(n==t.length-1?t.pop():ue.call(t,n,1),!0)},Se.prototype.get=function(e){var t=this.__data__,n=Re(t,e);return n<0?void 0:t[n][1]},Se.prototype.has=function(e){return Re(this.__data__,e)>-1},Se.prototype.set=function(e,t){var n=this.__data__,i=Re(n,e);return i<0?n.push([e,t]):n[i][1]=t,this},Ae.prototype.clear=function(){this.__data__={hash:new Te,map:new(pe||Se),string:new Te}},Ae.prototype.delete=function(e){return Fe(this,e).delete(e)},Ae.prototype.get=function(e){return Fe(this,e).get(e)},Ae.prototype.has=function(e){return Fe(this,e).has(e)},Ae.prototype.set=function(e,t){return Fe(this,e).set(e,t),this},Pe.prototype.clear=function(){this.__data__=new Se},Pe.prototype.delete=function(e){return this.__data__.delete(e)},Pe.prototype.get=function(e){return this.__data__.get(e)},Pe.prototype.has=function(e){return this.__data__.has(e)},Pe.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Se){var i=n.__data__;if(!pe||i.length<199)return i.push([e,t]),this;n=this.__data__=new Ae(i)}return n.set(e,t),this};var Ue=ce?K(ce,Object):function(){return[]},je=function(e){return te.call(e)};function Be(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||R.test(e))&&e>-1&&e%1==0&&e<t}function Ve(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Z)}function Ge(e){if(null!=e){try{return Q.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function ze(e,t){return e===t||e!=e&&t!=t}(de&&je(new de(new ArrayBuffer(1)))!=b||pe&&je(new pe)!=c||ve&&je(ve.resolve())!=d||ge&&je(new ge)!=v||ye&&je(new ye)!=m)&&(je=function(e){var t=te.call(e),n=t==f?e.constructor:void 0,i=n?Ge(n):void 0;if(i)switch(i){case _e:return b;case be:return c;case ke:return d;case we:return v;case Ee:return m}return t});var Ke=Array.isArray;function We(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!Xe(e)}var Ye=he||function(){return!1};function Xe(e){var t=qe(e)?te.call(e):"";return t==l||t==u}function qe(e){var t=bc(e);return!!e&&("object"==t||"function"==t)}function Ze(e){return We(e)?Oe(e):function(e){if(!Ve(e))return fe(e);var t=[];for(var n in Object(e))ee.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return Me(e,!0,!0)}}(aI,aI.exports);var sI=n(aI.exports),lI=function(e){FA(i,e);var t,n=jA(i);function i(){var e,t;fm(this,i);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Uy(SA(t=n.call.apply(n,Im(e=[this]).call(e,o))),"_waitingStartTime",0),Uy(SA(t),"_timer",void 0),Uy(SA(t),"_toastId",void 0),t}return pm(i,[{key:"updateLang",value:function(){this.renderItemList()}},{key:"beforeCreate",value:function(e){var t,n=e.player.config.sources.sourceManager;e.config.list=null===(t=n.source)||void 0===t?void 0:t.definitions}},{key:"afterCreate",value:function(){var e,t;zO(HA(i.prototype),"afterCreate",this).call(this),(null!==(e=null===(t=this.player.config.sourceManager.source)||void 0===t?void 0:t.definitions)&&void 0!==e?e:[]).length<2?this.hide():(this.renderItemList(),this.on(pO.WAITING,this._waiting.bind(this)),this.on(pO.PLAYING,this._clearTimer.bind(this)),this.on(pO.PAUSE,this._clearTimer.bind(this)),this.on(pO.PLAY,this._clearTimer.bind(this)),this._initTimeUpdateEvent())}},{key:"registerIcons",value:function(){return{source:{icon:oI}}}},{key:"renderItemList",value:function(){var e,t,n,r=this,o=this.player.config.sourceManager,a=null!==(e=null===(t=o.source)||void 0===t?void 0:t.definitions)&&void 0!==e?e:[],s=Ik(a).call(a,(function(e){var t;return{url:e.url,definition:e.definition||"",showText:null!==(t=r.player.config.i18nManager.normalize(e.text))&&void 0!==t?t:e.definition,selected:!1}})),l=YP(a).call(a,(function(e){var t;return e.definition===(null===(t=o.definition)||void 0===t?void 0:t.definition)}));this.config.list=null===(n=o.source)||void 0===n?void 0:n.definitions,l>-1&&(s[l].selected=!0),zO(HA(i.prototype),"renderItemList",this).call(this,s,l)}},{key:"onItemClick",value:function(e,t){var n,r=this;this._showToast(t.to),zO(HA(i.prototype),"onItemClick",this).call(this,e,t),null===(n=this.player.config)||void 0===n||n.veplayer.switch({definition:t.to.definition}).catch((function(){r.renderItemList()}))}},{key:"fallback",value:(t=Gy(Jg().mark((function e(){var t,n,i,r,o,a,s,l=arguments;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=l.length>0&&void 0!==l[0]?l[0]:{toast:!0},r=this.player.config.sourceManager,!((o=YP(t=this.config.demotePriority).call(t,(function(e){var t;return e===(null===(t=r.definition)||void 0===t?void 0:t.definition)})))<0)){e.next=5;break}return e.abrupt("return");case 5:if(a=sI(r.definition),s=this._getNextDefinition(o)){e.next=9;break}return e.abrupt("return");case 9:if(!i.toast){e.next=15;break}return e.next=12,this._toast(s);case 12:if(e.sent){e.next=15;break}return e.abrupt("return");case 15:this.player.emit(pO.DEFINITION_FALLBACK,{from:a,to:s}),null===(n=this.player.config)||void 0===n||n.veplayer.switch({definition:s.definition}).catch((function(){}));case 17:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"_waiting",value:function(){var e=this;if(!this._timer){this._waitingStartTime=Date.now();var t=this.player.currentTime;this._timer=setTimeout((function(){e.player&&e.player.currentTime<=t+.1&&(e.player.emit(pO.LONG_WAITING),e.config.needFallback&&e.fallback({toast:!0}),e._clearTimer())}),this.config.longWaitingTime)}}},{key:"_clearTimer",value:function(){this._timer&&(clearTimeout(this._timer),this._timer=void 0),this._waitingStartTime&&(this._waitingStartTime=0)}},{key:"_toast",value:function(e){var t=this,n=this.player.config.i18nManager;return new Rk((function(i){var r,o,a=null===(r=t.player)||void 0===r?void 0:r.getPlugin("toast");if(a){var s=uT.createDom("div",n.getText("DEFINITION_FALLBACK_TOAST"),void 0,"veplayer-toast-txt"),l=null!==(o=t.player.config.i18nManager.normalize(e.text))&&void 0!==o?o:e.definition,u=uT.createDom("span",l,void 0,"veplayer-toast-txt-bt");s.appendChild(u);var c=a.toast(s,{duration:5e3,closable:!0});u.addEventListener("click",(function(){a.remove(c),i(!0)}))}else i(!1)}))}},{key:"_getNextDefinition",value:function(e){var t,n=this.player.config.sourceManager;if(null!==(t=n.source)&&void 0!==t&&t.definitions.length&&!(e+1>=this.config.demotePriority.length)){var i=e+1,r=jm(n).call(n,{definition:this.config.demotePriority[i]});return r||this._getNextDefinition(i)}}},{key:"_initTimeUpdateEvent",value:function(){var e=this,t=this.player.currentTime;this.on(pO.TIME_UPDATE,(function(){var n=e.player.currentTime;n!==t?(t=n,e._clearTimer()):t=n}))}},{key:"_showToast",value:function(e){var t,n,i,r=this,o=null===(t=this.player)||void 0===t?void 0:t.getPlugin("toast"),a=this.player.config.i18nManager;o&&(this._toastId&&o.remove(this._toastId),this._toastId=o.toast(Im(n="".concat(a.getText("DEFINITION_SWITCHING")," ")).call(n,null!==(i=e.text&&this.player.config.i18nManager.normalize(e.text))&&void 0!==i?i:e.definition," ..."),{duration:2e3,closable:!0}),this.player.once(pO.AFTER_DEFINITION_CHANGE,(function(){void 0!==r._toastId&&o.remove(r._toastId)})))}}],[{key:"pluginName",get:function(){return"definition"}},{key:"defaultConfig",get:function(){return By(By({},iI.defaultConfig),{},{index:3,list:[],panel:{title:{jp:"クラリティセレクション",en:"Definition Choose","zh-cn":"清晰度选择","zh-hk":"清晰度選擇"}},className:"xgplayer-definition",hidePortrait:!1,isShowIcon:!0,longWaitingTime:5e3,needFallback:!1,demotePriority:["uhd","hd","sd","ld","ao"]})}},{key:"textTips",get:function(){return{jp:"明快さ",en:"Definition","zh-cn":"清晰度","zh-hk":"清晰度"}}}]),i}(iI),uI={"biz:vod":"veplayer.biz.vod.[env].[ext]","biz:live":"veplayer.biz.live.[env].[ext]","plugin:flv":"veplayer.plugin.flv.[env].[ext]","plugin:mp4":"veplayer.plugin.mp4.[env].[ext]","plugin:hls":"veplayer.plugin.hls.[env].[ext]","plugin:shaka":"veplayer.plugin.shaka.[env].[ext]","plugin:rtm":"veplayer.plugin.rtm.[env].[ext]","plugin:xgvideo":"veplayer.plugin.xgvideo.[env].[ext]"},cI=function(e){return e.BizVod="biz:vod",e.BizLive="biz:live",e.PluginFlv="plugin:flv",e.PluginMp4="plugin:mp4",e.PluginHls="plugin:hls",e.PluginShaka="plugin:shaka",e.PluginRtm="plugin:rtm",e.PluginXgvideo="plugin:xgvideo",e}(cI||{}),hI=function(){function e(t){var n=this;fm(this,e),Uy(this,"modules",{}),Uy(this,"mountPromiseMap",{}),Uy(this,"_baseUrl",void 0),Uy(this,"_moduleSystem",void 0),Uy(this,"load",function(){var e=Gy(Jg().mark((function e(t,i){var r,o,a,s,l;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n._moduleSystem){e.next=2;break}throw new Error('You have to specify moduleSystem first, call "setModuleSystem(moduleSystem)" to set module system');case 2:if(uI[t]){e.next=4;break}throw new Error('Invalid module name: "'.concat(t,'"'));case 4:if("esm"!==n._moduleSystem){e.next=11;break}if(n.modules[t]){e.next=9;break}throw new Error('Dynamic module "'.concat(t,'" not found, you have to register it first under ESM'));case 9:return o=n.modules[t].exports,e.abrupt("return",null!==(r=o.default)&&void 0!==r?r:o);case 11:if(!n.modules[t]){e.next=21;break}if(1!==n.modules[t].state){e.next=16;break}return e.abrupt("return",n.modules[t].exports);case 16:if(0!==n.modules[t].state){e.next=20;break}return e.abrupt("return",n.mountPromiseMap[t].then((function(e){var t;return null!==(t=e.default)&&void 0!==t?t:e})));case 20:throw null!==(a=n.modules[t].error)&&void 0!==a?a:new Error('Dynamic module "'.concat(t,'" load failed.'));case 21:return s=[n._baseUrl,uI[t]].join("/").replace("[env]","production").replace("[ext]","js"),l={src:null!=i?i:s,name:t,state:0,exports:{}},n.modules[t]=l,n.mountPromiseMap[t]=n._mount(l),e.abrupt("return",n.mountPromiseMap[t]);case 26:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()),Uy(this,"register",(function(e,t){if(!n._moduleSystem)throw new Error("You have to specify moduleSystem first, call setModuleSystem(moduleSystem) to set module system");return"esm"===n._moduleSystem?(n.modules[e]={src:"esm:".concat(e),name:e,state:1,exports:t},n.modules[e].exports):(n.modules[e]?n.modules[e].exports=t:n.modules[e]={src:"umd:".concat(e),name:e,state:1,exports:t},n.modules[e].exports)})),this._baseUrl=t.baseUrl}return pm(e,[{key:"baseUrl",get:function(){return this._baseUrl}},{key:"moduleSystem",get:function(){return this._moduleSystem}},{key:"setModuleSystem",value:function(e){this._moduleSystem=e}},{key:"setBaseUrl",value:function(e){this._baseUrl=e}},{key:"_mount",value:function(e){var t=this.modules;return new Rk((function(n,i){var r=document.createElement("script");r.src=e.src,r.onload=function(){e.state=1,n(t[e.name].exports),r.onload=null},r.onerror=function(t){e.state=2,e.error=t,i(t),r.onerror=null},document.body.appendChild(r)}))}}]),e}(),fI=h,dI=$,pI=Dn,vI=jn,gI=Fc,yI=Math.min,mI=[].lastIndexOf,_I=!!mI&&1/[1].lastIndexOf(1,-0)<0,bI=gI("lastIndexOf"),kI=_I||!bI?function(e){if(_I)return fI(mI,this,arguments)||0;var t=dI(this),n=vI(t),i=n-1;for(arguments.length>1&&(i=yI(i,pI(arguments[1]))),i<0&&(i=n+i);i>=0;i--)if(i in t&&t[i]===e)return i||0;return-1}:mI;Pn({target:"Array",proto:!0,forced:kI!==[].lastIndexOf},{lastIndexOf:kI});var wI,EI,CI=Bc("Array").lastIndexOf,xI=se,TI=CI,SI=Array.prototype,AI=n((function(e){var t=e.lastIndexOf;return e===SI||xI(SI,e)&&t===SI.lastIndexOf?TI:t})),PI=null!==(wI=null===(EI=document.currentScript)||void 0===EI?void 0:EI.src)&&void 0!==wI?wI:"https://tosv.byted.org/obj/lux/sdk/@byted/veplayer/".concat("2.0.0-rc.0","/object/umd/"),OI=new hI({baseUrl:iw(PI).call(PI,0,AI(PI).call(PI,"/"))}),II=OI.register;function RI(e,t){return MI.apply(this,arguments)}function MI(){return(MI=Gy(Jg().mark((function e(t,n){var i;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,OI.load(t,n);case 3:return e.abrupt("return",e.sent);case 6:throw e.prev=6,e.t0=e.catch(0),YA(GA.MODULE_LOAD_ERROR,{ext:{name:t,cdn:null===e.t0||void 0===e.t0||null===(i=e.t0.target)||void 0===i?void 0:i.src},error:e.t0});case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))).apply(this,arguments)}function LI(e){return function(t){var n;return null==t?void 0:ew(n=t.split("?")[0].toLowerCase()).call(n,e)}}var DI=LI(".m3u8"),NI=LI(".mp4"),FI=LI(".flv"),HI=LI(".sdp"),UI=LI(".mpd");function jI(){return(jI=Gy(Jg().mark((function e(){var t;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,RI(cI.PluginXgvideo);case 2:return t=e.sent,e.abrupt("return",null==t?void 0:t.isSupported());case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}By(By({},uT),{},{getStreamType:function(e){return DI(e)?"hls":FI(e)?"flv":HI(e)?"rtm":NI(e)?"mp4":UI(e)?"dash":"unknown"},isMseSupported:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:yR.H264)===yR.H265?gT.isHevcSupported():gT.isMSESupport()},isSoftDecodeSupported:function(){return jI.apply(this,arguments)}});var BI=gT.isWeixin,VI=gT.os,GI=gT.device,zI=VI.isAndroid,KI=VI.isIos,WI="mobile"===GI,YI=0,XI=!1,qI=function(e){FA(n,e);var t=jA(n);function n(e){var i;return fm(this,n),Uy(SA(i=t.call(this,e)),"_hasSetUserAutoplay",void 0),Uy(SA(i),"_timer",void 0),Uy(SA(i),"_wxTimer",void 0),Uy(SA(i),"_state",{mode:0,showUnmuteBt:!1}),Uy(SA(i),"userClickPlay",(function(){if(!XI){var e=i.player.play();e&&e.then?e.then((function(){console.log("user action autoplay success"),XI=!0})).catch((function(e){console.warn("user action autoplay fail:",e)})):(console.warn("no play promise"),XI=!0)}})),i}return pm(n,[{key:"afterCreate",value:function(){this.initState(),this.initEvents(),this.setWXAutoPlay()}},{key:"updateLang",value:function(){this.renderUnmuteBt()}},{key:"initState",value:function(){this._state.mode=this.player.muted?1:0}},{key:"initEvents",value:function(){this.player.on(HT,this.handleAutoplayPrevented.bind(this)),this.player.on(FT,this.handleAutoplayStart.bind(this)),this.player.on(OT,this.handleVolumechange.bind(this)),this.setUserActionAutoPlay()}},{key:"setWXAutoPlay",value:function(){BI&&this.player.config.autoplay&&this.config.enableWxJsBridgeAutoplay&&(window.WeixinJSBridge?this.wxPlay():document.addEventListener("WeixinJSBridgeReady",this.wxPlay.bind(this),!1))}},{key:"wxCanPlayFn",value:function(){var e=this;window.WeixinJSBridge&&window.WeixinJSBridge.invoke("getNetworkType",{},(function(){e._wxTimer=setTimeout((function(){e._wxTimer&&clearTimeout(e._wxTimer);var t=e.player.play();t&&t.then?t.then((function(){console.log("wechat autoplay success")})).catch((function(t){console.warn("wechat autoplay fail:",t),e._state.showUnmuteBt=!1,e.renderUnmuteBt()})):console.warn("wechat browser no play promise")}))}))}},{key:"wxPlay",value:function(){this.player.readyState>=2?this.wxCanPlayFn():zI?this.player.once(AT,this.wxCanPlayFn.bind(this)):KI&&this.player.once(UT,this.wxCanPlayFn.bind(this))}},{key:"setUserActionAutoPlay",value:function(){var e=this;this.config.enableUserActionAutoplay&&this.player.once(dO.AUTOPLAY_FAIL,(function(){e._hasSetUserAutoplay=!0,(e.config.userActionDom instanceof window.Node?e.config.userActionDom:window.document.body).addEventListener("click",e.userClickPlay,!1)}))}},{key:"handleAutoplayPrevented",value:function(){return 0===this._state.mode?(console.warn("unmute autoplay fail"),this.player.emit(dO.AUTOPLAY_FAIL,{mode:"unmute"}),zI&&BI?void(this._state.mode=2):void(this.config.enableDegradeMuteAutoplay&&this.changeMuteMode())):1===this._state.mode?(console.warn("mute autoplay fail"),this.player.emit(dO.AUTOPLAY_FAIL,{mode:"mute"}),void(this._state.mode=2)):2===this._state.mode?(this.player.emit(dO.AUTOPLAY_FAIL,{mode:"noSupport"}),void console.warn("not support autoplay")):void 0}},{key:"changeMuteMode",value:function(){var e=this;this.player.muted=!0,this._state.showUnmuteBt=!0,this._state.mode=1,this.renderUnmuteBt(),this._timer=setTimeout((function(){e._timer&&clearTimeout(e._timer);var t=e.player.play();t&&t.then?t.then((function(){console.log("degrade mute autoplay success")})).catch((function(t){console.warn("degrade mute autoplay fail:",t),e.player.muted=!1,e._state.showUnmuteBt=!1,e.renderUnmuteBt()})):console.warn("no play promise")}))}},{key:"handleAutoplayStart",value:function(){if(0!==this._state.mode)return 1===this._state.mode?(this.player.emit(dO.AUTOPLAY_SUCCESS,{mode:"mute"}),this._state.showUnmuteBt=!0,void this.renderUnmuteBt()):2===this._state.mode?(this.player.emit(dO.AUTOPLAY_SUCCESS,{mode:"click"}),this.player.muted=!1,this._state.showUnmuteBt=!1,void this.renderUnmuteBt()):void 0;this.player.emit(dO.AUTOPLAY_SUCCESS,{mode:"unmute"})}},{key:"handleVolumechange",value:function(){this._state.showUnmuteBt&&(this._state.showUnmuteBt=!1,this.renderUnmuteBt(),this.player.paused&&this.player.readyState>=1&&this.player.play())}},{key:"renderUnmuteBt",value:function(){var e=this.root,t=this.player.config.i18nManager;if(e&&(e.innerHTML="",this._state.showUnmuteBt)){var n=t.getText("UNMUTE"),i=uT.createDom("div",n,void 0,"veplayer-unmute-bt");e.appendChild(i),this.bind(".veplayer-unmute-bt","click",this.cancelUnmute.bind(this)),this.bind(".veplayer-unmute-bt","touchend",this.cancelUnmute.bind(this))}}},{key:"cancelUnmute",value:function(){var e=Date.now();if(e-YI>200){YI=e,this.player.muted=!1,this._state.showUnmuteBt=!1,this.renderUnmuteBt(),this.emit(dO.AUTOPLAY_UNMUTE);var t="mobile"===gT.device,n=HI(this.player.config.url);t&&n&&(this.player.volume>.5?this.player.volume=this.player.volume-.1:this.player.volume=this.player.volume+.1)}}},{key:"destroy",value:function(){if(this.player.off(HT,this.handleAutoplayPrevented.bind(this)),this.player.off(FT,this.handleAutoplayStart.bind(this)),this.player.off(OT,this.handleVolumechange.bind(this)),this._timer&&window.clearTimeout(this._timer),this._wxTimer&&window.clearTimeout(this._wxTimer),document.removeEventListener("WeixinJSBridgeReady",this.wxPlay.bind(this),!1),this._hasSetUserAutoplay){var e=WI?"touch":"click";(this.config.userActionDom instanceof window.Node?this.config.userActionDom:window.document.body).removeEventListener(e,this.userClickPlay,!1)}}},{key:"render",value:function(){return'<div class="veplayer-unmute"></div>'}}],[{key:"pluginName",get:function(){return"autoplayPlugin"}},{key:"defaultConfig",get:function(){return{position:NS.POSITIONS.ROOT,enableDegradeMuteAutoplay:!1,enableWxJsBridgeAutoplay:!1,userActionDom:window.document.body,enableUserActionAutoplay:!1}}}]),n}(NS),ZI=xO.values;Pn({target:"Object",stat:!0},{values:function(e){return ZI(e)}});var $I=n(te.Object.values);function JI(){return(new DOMParser).parseFromString('<svg width="18" height="18" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M5.75 11C5.75 11.9665 4.9665 12.75 4 12.75C3.0335 12.75 2.25 11.9665 2.25 11C2.25 10.0335 3.0335 9.25 4 9.25C4.9665 9.25 5.75 10.0335 5.75 11ZM13.25 11C13.25 11.9665 12.4665 12.75 11.5 12.75C10.5335 12.75 9.75 11.9665 9.75 11C9.75 10.0335 10.5335 9.25 11.5 9.25C12.4665 9.25 13.25 10.0335 13.25 11ZM19 12.75C19.9665 12.75 20.75 11.9665 20.75 11C20.75 10.0335 19.9665 9.25 19 9.25C18.0335 9.25 17.25 10.0335 17.25 11C17.25 11.9665 18.0335 12.75 19 12.75Z" fill="white"/>\n</svg>\n',"image/svg+xml").firstChild}var QI,eR,tR=function(e){FA(n,e);var t=jA(n);function n(){return fm(this,n),t.apply(this,arguments)}return pm(n,[{key:"onItemClick",value:function(){}},{key:"onOptionClick",value:function(){this.toggle(!1)}},{key:"updateLang",value:function(){var e,t=this,n=this.player.config.i18nManager;null===(e=this.config.plugins)||void 0===e||e.forEach((function(e){var i,r=null!==(i=n.normalize(e.textTips))&&void 0!==i?i:e.pluginName;if(t.player.root){var o=uT.findDom(t.player.root,".panel-plugin-".concat(e.pluginName," .panel-icon-bt-text"));o&&(o.innerHTML=r)}}))}},{key:"beforeCreate",value:function(e){var t,n=e.player.config.i18nManager;e.config.list=null===(t=e.config.plugins)||void 0===t?void 0:Ik(t).call(t,(function(t,i){var r,o=uT.createDom("div","",{},"panel-icon-bt panel-plugin-".concat(t.pluginName)),a=uT.createDom("div","",{},"panel-icon-svg"),s=null!==(r=n.normalize(t.textTips))&&void 0!==r?r:t.pluginName;return o.appendChild(a),o.appendChild(uT.createDom("span",s,{"plugin-index":i},"panel-icon-bt-text")),{showText:o,plugin:e.player.registerPlugin({plugin:t,options:{root:a}})}}))}},{key:"hideChild",value:function(e){if(e){var t;null===(t=e.hide)||void 0===t||t.call(e);var n=document.querySelector(".panel-plugin-".concat(e.pluginName));n&&uT.addClass(n,"hide")}}},{key:"showChild",value:function(e){if(e){var t;null===(t=e.show)||void 0===t||t.call(e);var n=document.querySelector(".panel-plugin-".concat(e.pluginName));n&&uT.removeClass(n,"hide")}}},{key:"registerIcons",value:function(){return{more:{icon:JI}}}}],[{key:"pluginName",get:function(){return"more"}},{key:"defaultConfig",get:function(){return By(By({},iI.defaultConfig),{},{index:1,plugins:[],list:[],hideOnSingleOption:!1,isShowIcon:!0,hidePortrait:!1,renderType:$O.Icon,panel:{className:"more-panel-content"}})}}]),n}(iI),nR=function(e){return e.ROOT_TOP_RIGHT="rootTopRight",e.ROOT_TOP_RIGHT_COLLAPSE="rootTopRightCollapse",e}(nR||{}),iR=function(e){FA(n,e);var t=jA(n);function n(){return fm(this,n),t.apply(this,arguments)}return pm(n,[{key:"registerIcons",value:function(){return{more:{icon:JI,class:"xgplayer-more-svg"}}}},{key:"children",value:function(){var e=this,t=this._getPlugins(),n=t.plugins,i=t.collapsePlugins,r={};return n.forEach((function(t){r[t.pluginName]={plugin:t,options:{root:e.root}}})),i.length&&(r[tR.pluginName]={plugin:tR,options:{root:this.root,plugins:i}}),r}},{key:"render",value:function(){return'<xg-right-grid class="xg-right-grid xgplayer-rightTop-iconList"></xg-right-grid>'}},{key:"_getPlugins",value:function(){var e,t=this,n=[],i=[],r=null===(e=this.player.config.ignores)||void 0===e?void 0:Ik(e).call(e,(function(e){return e.toLowerCase()}));return this.config.plugins.forEach((function(e){var o,a=e.pluginName.toLowerCase();null!=r&&ew(r).call(r,a)||("rootTopRight"===(null!==(o=t.player.config[a].position)&&void 0!==o?o:e.defaultConfig.position)?n.push(e):i.push(e))})),{plugins:null!=n?n:[],collapsePlugins:null!=i?i:[]}}}],[{key:"pluginName",get:function(){return"topRightBar"}},{key:"defaultConfig",get:function(){return{position:NS.POSITIONS.ROOT_TOP,plugins:[]}}},{key:"isTopRightPlugin",value:function(e,t){var n,i,r,o,a,s=null!==(i=null===(r=t[null==e||null===(n=e.pluginName)||void 0===n?void 0:n.toLowerCase()])||void 0===r?void 0:r.position)&&void 0!==i?i:null==e||null===(o=e.defaultConfig)||void 0===o?void 0:o.position;return!!ew(a=$I(nR)).call(a,s)}}]),n}(NS),rR=[qP,eO,rO,pP,hO,qA,eP,HP,tP,WO,YO,rI,lI,qI],oR=Im(QI=[]).call(QI,rR,[NP,yP,iR]),aR=Im(eR=[]).call(eR,rR,[LP,iR]),sR="pc"===gT.device?oR:aR;function lR(){return(new DOMParser).parseFromString('<svg width="21" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.892 2h4.445v1.778H3.892v4.444H2.114V3.778C2.114 2.796 2.91 2 3.892 2zm4.445 16v-4.444c0-.982-.796-1.778-1.778-1.778H2.114v1.778h2.944L2.264 16.35a.9.9 0 001.272 1.273l2.988-2.987a.918.918 0 00.035-.037V18h1.778zm8-6.222v4.444h-4.445V18h4.445c.981 0 1.777-.796 1.777-1.778v-4.444h-1.777zM11.892 2v4.445c0 .981.796 1.777 1.778 1.777h4.444V6.445H15.17l2.568-2.568a.9.9 0 10-1.273-1.273L13.67 5.4V2h-1.778z" fill="#fff"/></svg>',"image/svg+xml").firstChild}function uR(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.778 2h4.444v1.778H3.778v4.444H2V3.778C2 2.796 2.796 2 3.778 2zM2 11.778v4.444C2 17.204 2.796 18 3.778 18h4.444v-1.778H4.823l2.313-2.313a.9.9 0 00-1.272-1.273l-2.086 2.086v-2.944H2zm14.222 0v4.444h-4.444V18h4.444c.982 0 1.778-.796 1.778-1.778v-4.444h-1.778zM18 8.222V3.778C18 2.796 17.204 2 16.222 2h-4.444v1.778h2.945l-2.587 2.586a.9.9 0 101.273 1.273l2.813-2.813v3.398H18z" fill="#fff"/></svg>',"image/svg+xml").firstChild}var cR,hR={startPlay:function(){return(new DOMParser).parseFromString('<svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="60" height="60" rx="30" fill="#000" fill-opacity=".4"/><path d="M40.243 28.3a2 2 0 010 3.401L24.06 41.712c-1.332.825-3.052-.134-3.052-1.7V19.988c0-1.566 1.72-2.525 3.052-1.7l16.184 10.01z" fill="#fff"/></svg>',"image/svg+xml").firstChild},play:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.121 8.299a2 2 0 010 3.402l-7.94 4.91c-1.332.825-3.051-.133-3.051-1.7V5.09c0-1.567 1.72-2.525 3.052-1.701l7.939 4.911z" fill="#fff"/></svg>',"image/svg+xml").firstChild},pause:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="5.313" y="3.75" width="3.125" height="12.5" rx=".625" fill="#fff"/><rect x="11.563" y="3.75" width="3.125" height="12.5" rx=".625" fill="#fff"/></svg>',"image/svg+xml").firstChild},fullscreen:uR,exitFullscreen:lR,replay:function(){return(new DOMParser).parseFromString('<svg width="72" height="72" viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg"><g fill="#FFF" fill-rule="evenodd"><circle fill-opacity=".3" cx="36" cy="36" r="36"/><path d="M40.167 32.667a.833.833 0 01-.834-.834v-1.666c0-.46.373-.834.834-.834h5.409a11.653 11.653 0 00-9.576-5c-6.443 0-11.667 5.224-11.667 11.667S29.557 47.667 36 47.667c5.285 0 9.749-3.514 11.183-8.333h3.445C49.112 46.014 43.138 51 36 51c-8.284 0-15-6.716-15-15 0-8.284 6.716-15 15-15 4.713 0 8.918 2.173 11.668 5.572l-.001-4.739c0-.46.373-.833.833-.833h1.667c.46 0 .833.373.833.833V31c0 .879-.68 1.598-1.542 1.662l-.125.005h-9.166z"/></g></svg>',"image/svg+xml").firstChild},volumeLarge:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.867 2.5h.55c.44 0 .799.34.83.771l.003.062v13.334c0 .44-.34.799-.771.83l-.062.003h-.55a.833.833 0 01-.444-.128l-.064-.045-4.867-3.744a.831.831 0 01-.322-.59l-.003-.07V7.077c0-.235.099-.458.271-.615l.054-.045L9.36 2.673a.832.832 0 01.43-.17l.078-.003h.55-.55zm6.767 2.278A7.474 7.474 0 0118.75 10a7.477 7.477 0 01-2.128 5.234.4.4 0 01-.57-.004l-.587-.586a.442.442 0 01.005-.617A5.812 5.812 0 0017.083 10c0-1.557-.61-2.97-1.603-4.017a.442.442 0 01-.003-.615l.586-.586a.4.4 0 01.57-.004zM2.5 6.667c.23 0 .417.186.417.416v5.834c0 .23-.187.416-.417.416h-.833a.417.417 0 01-.417-.416V7.083c0-.23.187-.416.417-.416H2.5zm11.768.46A4.153 4.153 0 0115.417 10c0 1.12-.442 2.137-1.162 2.886a.388.388 0 01-.555-.007l-.577-.578c-.176-.176-.156-.467.009-.655A2.49 2.49 0 0013.75 10a2.49 2.49 0 00-.61-1.636c-.163-.188-.182-.477-.006-.653l.578-.578a.388.388 0 01.556-.006z" fill="#fff"/></svg>',"image/svg+xml").firstChild},volumeMuted:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.045 2.5h.55c.44 0 .8.34.831.771l.003.062v13.334c0 .44-.34.799-.771.83l-.063.003h-.55a.833.833 0 01-.443-.128l-.065-.045-4.866-3.744a.831.831 0 01-.323-.59l-.003-.07V7.077c0-.235.1-.458.272-.615l.054-.045 4.866-3.744a.832.832 0 01.43-.17l.078-.003h.55-.55zM2.68 6.667c.23 0 .416.186.416.416v5.834c0 .23-.186.416-.416.416h-.834a.417.417 0 01-.416-.416V7.083c0-.23.186-.416.416-.416h.834zm10.467.294a.417.417 0 01.59 0l1.767 1.768L17.27 6.96a.417.417 0 01.589 0l.59.59a.417.417 0 010 .589L16.68 9.908l1.768 1.767c.15.15.162.387.035.55l-.035.04-.589.589a.417.417 0 01-.59 0l-1.767-1.768-1.768 1.768a.417.417 0 01-.59 0l-.588-.59a.417.417 0 010-.589l1.767-1.768-1.767-1.767a.417.417 0 01-.035-.55l.035-.04.589-.589z" fill="#fff"/></svg>',"image/svg+xml").firstChild},volumeSmall:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.867 2.5h.55c.44 0 .799.34.83.771l.003.062v13.334c0 .44-.34.799-.771.83l-.062.003h-.55a.833.833 0 01-.444-.128l-.064-.045-4.867-3.744a.831.831 0 01-.322-.59l-.003-.07V7.077c0-.235.099-.458.271-.615l.054-.045L9.36 2.673a.832.832 0 01.43-.17l.078-.003h.55-.55zM2.5 6.667c.23 0 .417.186.417.416v5.834c0 .23-.187.416-.417.416h-.833a.417.417 0 01-.417-.416V7.083c0-.23.187-.416.417-.416H2.5zm11.768.46A4.153 4.153 0 0115.417 10c0 1.12-.442 2.137-1.162 2.886a.388.388 0 01-.555-.007l-.577-.578c-.176-.176-.156-.467.009-.655A2.49 2.49 0 0013.75 10a2.49 2.49 0 00-.61-1.636c-.163-.188-.182-.477-.006-.653l.578-.578a.388.388 0 01.556-.006z" fill="#fff"/></svg>',"image/svg+xml").firstChild}},fR=By(By({},hR),{},{fullscreen:uR,exitFullscreen:lR}),dR=By(By({},hR),{},{fullscreen:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.125 3a.375.375 0 00-.375.375v.75c0 .207.168.375.375.375H15.5v3.375c0 .207.168.375.375.375h.75A.375.375 0 0017 7.875v-4.5A.375.375 0 0016.625 3h-4.5zm0 12.5a.375.375 0 00-.375.375v.75c0 .207.168.375.375.375h4.5a.375.375 0 00.375-.375v-4.5a.375.375 0 00-.375-.375h-.75a.375.375 0 00-.375.375V15.5h-3.375zM3 3.375C3 3.168 3.168 3 3.375 3h4.5c.207 0 .375.168.375.375v.75a.375.375 0 01-.375.375H4.5v3.375a.375.375 0 01-.375.375h-.75A.375.375 0 013 7.875v-4.5zM7.875 15.5H4.5v-3.375a.375.375 0 00-.375-.375h-.75a.375.375 0 00-.375.375v4.5c0 .207.168.375.375.375h4.5a.375.375 0 00.375-.375v-.75a.375.375 0 00-.375-.375z" fill="#fff"/></svg>',"image/svg+xml").firstChild},exitFullscreen:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M17.5 8.333h-4.167c-.92 0-1.666-.746-1.666-1.666V2.5h1.666v4.167H17.5v1.666zM2.5 6.667v1.666h4.167c.92 0 1.666-.746 1.666-1.666V2.5H6.667v4.167H2.5zM2.5 13.333h4.167V17.5h1.666v-4.167c0-.92-.746-1.666-1.666-1.666H2.5v1.666zM13.333 17.5v-4.167H17.5v-1.666h-4.167c-.92 0-1.666.746-1.666 1.666V17.5h1.666z" fill="#fff"/></svg>',"image/svg+xml").firstChild}}),pR="pc"===gT.device?fR:dR,vR=function(){function e(t){var n;if(fm(this,e),Uy(this,"_lang",void 0),this._lang=(null==t?void 0:t.lang)||fT()||"en","zh"===this._lang&&(this._lang="zh-cn"),null!=t&&null!==(n=t.i18n)&&void 0!==n&&n.texts){var i,r,o=Ik(i=SO(null==t||null===(r=t.i18n)||void 0===r?void 0:r.texts)).call(i,(function(e){var t=yO(e,2);return{LANG:t[0],TEXT:t[1]}}));e.extend(o)}}return pm(e,[{key:"setLang",value:function(e){this._lang=e}},{key:"getLang",value:function(){return this._lang}},{key:"normalize",value:function(e){return e?"string"==typeof e?e:e[this._lang]:""}},{key:"getText",value:function(e){var t,n,i;if(e){var r=null==pA?void 0:pA.lang;return null!==(t=null==r||null===(n=r[this._lang])||void 0===n?void 0:n[e])&&void 0!==t?t:null==r||null===(i=r.en)||void 0===i?void 0:i[e]}}}],[{key:"langKeys",get:function(){return pA.langKeys}},{key:"isLangValid",value:function(e){var t;return ew(t=pA.langKeys).call(t,e)||"zh"===e}},{key:"extend",value:function(e,t){pA.extend(e,t)}}]),e}(),gR=["autoplay"],yR=function(e){return e.H265="h265",e.H264="h264",e}(yR||{}),mR=By(By({},NS.POSITIONS),nR),_R={id:"veplayer",width:"100%",height:"100%",decodeType:"hardware",fullscreen:{useCssFullscreen:!1}},bR=function(e){var t,n,i,r=e.autoplay,o=Tm(e,gR);(o.poster&&(o.poster=function(e){var t,n=""+e,i=gO.exec(n);if(!i)return n;var r,o="",a=0;for(r=i.index;r<n.length;r++){switch(n.charCodeAt(r)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}a!==r&&(o+=n.substring(a,r)),a=r+1,o+=t}return a!==r?o+n.substring(a,r):o}(o.poster)),o.icons=By(By({},pR),o.icons?(t=o.icons,n={},SO(null!=t?t:{}).forEach((function(e){var t=yO(e,2),i=t[0],r=t[1];"string"==typeof r?console.warn("icons.".concat(i," has been removed")):n[i]=r})),n):{}),o.autoplay=Boolean(r),r&&"boolean"!=typeof r)&&(o.autoplayMuted=null==r?void 0:r.muted,o.videoAttributes=By(By({},null!==(i=o.videoAttributes)&&void 0!==i?i:{}),{},{muted:null==r?void 0:r.muted}),o.autoplayPlugin=r);return delete o.i18n,o},kR=function(){function e(){var t,n,i,r,o,a,s,l,u,c,h,f,d=this,p=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};fm(this,e),Uy(this,"_player",void 0),Uy(this,"_sourceManager",void 0),Uy(this,"_preparePlugins",void 0),Uy(this,"_previousPrepareResult",void 0),Uy(this,"_i18nManager",void 0),Uy(this,"_events",{}),Uy(this,"_errorCallback",void 0),this._sourceManager=p.sourceManager,this._preparePlugins=p.preparePlugins,this._previousPrepareResult=p.prepareResult,this._i18nManager=null!==(t=p.i18nManager)&&void 0!==t?t:new vR({i18n:p.i18n});var v=bR(By(By({},p),null===(n=this._previousPrepareResult)||void 0===n?void 0:n.options)),g=Im(i=[]).call(i,hm(null!==(r=null===(o=this._previousPrepareResult)||void 0===o?void 0:o.plugins)&&void 0!==r?r:[]),hm(null!==(a=p.plugins)&&void 0!==a?a:sR)),y=[],m=[];g.forEach((function(e){iR.isTopRightPlugin(e,p)?y.push(e):m.push(e)})),this._player=new TA(By(By(By({},_R),v),{},{definition:By({list:null!==(s=null===(l=this._sourceManager.source)||void 0===l?void 0:l.definitions)&&void 0!==s?s:[],defaultDefinition:null===(u=this._sourceManager.definition)||void 0===u?void 0:u.definition},null!==(c=p.definition)&&void 0!==c?c:{}),url:null===(h=this._sourceManager.definition)||void 0===h?void 0:h.url,sources:By(By({},null!==(f=p.sources)&&void 0!==f?f:{}),{},{sourceManager:this._sourceManager}),topRightBar:{plugins:y},plugins:m,i18nManager:this._i18nManager,veplayer:this})),this.emit(pO.PLAYER_CREATE_FINISH,this._player),this._sourceManager.registerPrepare((function(e){return d.prepare(e)})),this._errorCallback=function(e){return d._handleFallback(e)},this._player.on(CT,this._errorCallback)}var t,n,i,r,o,a;return pm(e,[{key:"readyState",get:function(){return this._player.readyState}},{key:"buffered",get:function(){return this._player.buffered}},{key:"played",get:function(){return this._player.played}},{key:"cumulateTime",get:function(){return this._player.cumulateTime}},{key:"isFocused",get:function(){return this._player.isActive}},{key:"isFullscreen",get:function(){return this._player.isFullscreen}},{key:"isCssFullscreen",get:function(){return this._player.isCssfullScreen}},{key:"networkState",get:function(){return this._player.networkState}},{key:"paused",get:function(){return this._player.paused}},{key:"ended",get:function(){return this._player.ended}},{key:"state",get:function(){return this._player.state}},{key:"url",get:function(){return this._player.config.url}},{key:"source",get:function(){var e;return null===(e=this._sourceManager.source)||void 0===e?void 0:e.name}},{key:"definition",get:function(){var e;return null===(e=this._sourceManager.definition)||void 0===e?void 0:e.definition}},{key:"crossOrigin",get:function(){return this._player.crossOrigin},set:function(e){this._player.crossOrigin=e}},{key:"volume",get:function(){return this._player.volume},set:function(e){this._player.volume=e}},{key:"muted",get:function(){return this._player.muted},set:function(e){this._player.muted=e}},{key:"lang",get:function(){return this._i18nManager.getLang()},set:function(e){if(this._player.lang!==e)if(vR.isLangValid(e))this._i18nManager.setLang(e),this._player.lang=e;else{var t,n,i,r,o=vR.langKeys().join(","),a={en:Im(t="Sorry, we couldn't set the language to ".concat(e," because it's not currently supported. The list of supported languages includes ")).call(t,o,"."),"zh-cn":Im(n="不支持当前设置的语言".concat(e,", 支持的语言有")).call(n,o,", 请重新设置")};console.error((null===(i=this._i18nManager)||void 0===i||null===(r=i.normalize)||void 0===r?void 0:r.call(i,a))||a.en)}}},{key:"_src",get:function(){return this._player.currentSrc}},{key:"switch",value:(a=Gy(Jg().mark((function e(t,n){var i,r,o,a;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"!=typeof t||1!==this._sourceManager.sources.length||1!==(null===(i=this._sourceManager.sources)||void 0===i||null===(i=i[0].definitions)||void 0===i?void 0:i.length)){e.next=5;break}return this._sourceManager.updateSources(t),e.next=4,this._switchUrl(t);case 4:return e.abrupt("return",this._sourceManager.definition);case 5:if(o=jm(r=this._sourceManager).call(r,t,n)){e.next=8;break}throw new Error("string"==typeof t?"No definition found for url: ".concat(t):Im(a="No definition found for source: ".concat(t.source,", definition: ")).call(a,t.definition));case 8:return e.next=10,this._switch(o);case 10:return e.abrupt("return",o);case 11:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updatePlaylist",value:function(e,t){var n=this._sourceManager.updateSources(e,t);return this._switch(n.definition)}},{key:"once",value:function(e,t){var n=this._transformEvent(e,t),i=n.xgCallback,r=n.xgEventName;if(i){var o,a,s;null!==(o=this._events)&&void 0!==o&&o[e]||(this._events[e]=new xk),this._events[e].set(t,i);for(var l=arguments.length,u=new Array(l>2?l-2:0),c=2;c<l;c++)u[c-2]=arguments[c];(a=this._player).once.apply(a,Im(s=[r,i]).call(s,u))}}},{key:"off",value:function(e,t){var n,i=null===(n=this._events[e])||void 0===n?void 0:n.get(t),r=this._transformEvent(e).xgEventName;if(i){for(var o,a,s=arguments.length,l=new Array(s>2?s-2:0),u=2;u<s;u++)l[u-2]=arguments[u];(o=this._player).off.apply(o,Im(a=[r,i]).call(a,l)),this._events[e].delete(t)}}},{key:"emit",value:function(e,t){for(var n,i,r=this._transformEvent(e).xgEventName,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(n=this._player).emit.apply(n,Im(i=[r,t]).call(i,a))}},{key:"offAll",value:function(){this._events={},this._player.offAll()}},{key:"on",value:function(e,t){var n=this._transformEvent(e,t),i=n.xgCallback,r=n.xgEventName;if(i){var o,a,s;null!==(o=this._events)&&void 0!==o&&o[e]||(this._events[e]=new xk),this._events[e].set(t,i);for(var l=arguments.length,u=new Array(l>2?l-2:0),c=2;c<l;c++)u[c-2]=arguments[c];(a=this._player).on.apply(a,Im(s=[r,i]).call(s,u))}}},{key:"play",value:function(){return this._player.play()}},{key:"pause",value:function(){return this._player.pause()}},{key:"requestPIP",value:function(){var e;null===(e=this._player.plugins.pip)||void 0===e||e.requestPIP()}},{key:"exitPIP",value:function(){var e;null===(e=this._player.plugins.pip)||void 0===e||e.exitPIP()}},{key:"retry",value:function(){return this._player.emit(pO.RETRY),this._player.retry()}},{key:"focus",value:function(e){return this._player.focus(e)}},{key:"blur",value:function(e){return this._player.blur(e)}},{key:"getFullscreen",value:function(e){return this._player.getFullscreen(e)}},{key:"exitFullscreen",value:function(e){return this._player.exitFullscreen(e)}},{key:"getCssFullscreen",value:function(e){return this._player.getCssFullscreen(e)}},{key:"exitCssFullscreen",value:function(){return this._player.exitCssFullscreen()}},{key:"registerPlugin",value:function(e,t){return this._player.registerPlugin(e,t)}},{key:"unRegisterPlugin",value:function(e,t){return this._player.unRegisterPlugin(e,t)}},{key:"showIcon",value:function(e){var t=this,n=this._player.getPlugin("more");e.forEach((function(e){var i=t._player.getPlugin(e);i&&null!=i&&i.root&&(i.config.position===mR.ROOT_TOP_RIGHT_COLLAPSE?null==n||n.showChild(i):i.show())}))}},{key:"hideIcon",value:function(e){var t=this,n=this._player.getPlugin("more");e.forEach((function(e){var i=t._player.getPlugin(e);i&&null!=i&&i.root&&(i.config.position===mR.ROOT_TOP_RIGHT_COLLAPSE?null==n||n.hideChild(i):i.hide())}))}},{key:"destroy",value:function(){this._player.off(CT,this._errorCallback),this._player.destroy()}},{key:"prepare",value:(o=Gy(Jg().mark((function e(t){var n,i,r,o,a,s,l,u,c=this;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===(n=this._preparePlugins)||void 0===n?void 0:n.call(this,t);case 2:return a=e.sent,s=this._diffPlugins(null!==(i=null===(r=this._previousPrepareResult)||void 0===r?void 0:r.plugins)&&void 0!==i?i:[],null!==(o=null==a?void 0:a.plugins)&&void 0!==o?o:[]),l=s.removedPlugins,u=s.addedPlugins,null==l||l.forEach((function(e){c._player.unRegisterPlugin(e)})),this._previousPrepareResult=a,null!=a&&a.options&&this._player.setConfig(a.options),e.abrupt("return",Ik(u).call(u,(function(e){return c._player.registerPlugin(e)})));case 8:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"_handleFallback",value:(r=Gy(Jg().mark((function e(t){var n,i,r=this;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._player.addClass(BS),n=this._sourceManager.url,i=this._sourceManager.fallback()){e.next=7;break}return this._player.removeClass(BS),this.emit(pO.FALLBACK_ERROR,XA(t,this._i18nManager)),e.abrupt("return");case 7:this._player.once("canplay",(function(){r._sourceManager.resetFallback()})),this.emit(pO.FALLBACK,{from:{url:n},to:{url:i}}),this._switchUrl(i);case 10:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"_transformEvent",value:function(e,t){var n=this;return e===CT?{xgCallback:t?function(e){t(XA(e,n._i18nManager))}:void 0,xgEventName:e}:function(e,t){var n=vO[e];if(n)return{xgEventName:n.event,xgCallback:t?n.shouldCallback?function(){for(var e,i,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];null!==(e=n.shouldCallback)&&void 0!==e&&e.call.apply(e,Im(i=[n]).call(i,o))&&(null==t||t.apply(void 0,o))}:t:void 0};return{xgEventName:e,xgCallback:t}}(e,t)}},{key:"_switch",value:(i=Gy(Jg().mark((function e(t){var n,i,r,o,a,s;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=sI(this._sourceManager.definition),e.next=3,this.prepare(t.url);case 3:if(s=e.sent,this._sourceManager.switch(t),null===(n=this._player)||void 0===n||null===(n=n.plugins)||void 0===n||n.sources.renderItemList(),null===(i=this._player)||void 0===i||null===(i=i.plugins)||void 0===i||i.definition.renderItemList(),(null==t||null===(r=t.source)||void 0===r?void 0:r.name)!==(null==a||null===(o=a.source)||void 0===o?void 0:o.name)&&this.emit(pO.SOURCE_CHANGE),null==s||!s.length){e.next=15;break}return this.emit(pO.DEFINITION_CHANGE),e.next=12,this._callBeforePlayerInitForUrl(s,t.url);case 12:this.emit(pO.AFTER_DEFINITION_CHANGE),e.next=16;break;case 15:this._player.changeDefinition(t,a);case 16:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"_switchUrl",value:(n=Gy(Jg().mark((function e(t){var n,i,r,o=this;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.prepare(t);case 2:if(null==(n=e.sent)||!n.length){e.next=7;break}this._callBeforePlayerInitForUrl(n,t),e.next=14;break;case 7:if(i=this._player.switchURL(t,!1),r=this._player.currentTime,!i||!i.then){e.next=13;break}return e.abrupt("return",i);case 13:return e.abrupt("return",new Rk((function(e){var t=o._player.paused&&!o._player.isError,n=function(){o._player.currentTime=r,t&&o._player.once(AT,(function(){o._player.pause()})),e()};gT.os.isAndroid?o.once(TT,(function(){n()})):o.once(AT,(function(){n()})),o._player.play()})));case 14:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"_diffPlugins",value:function(e,t){var n=Ik(e).call(e,(function(e){return e.pluginName})),i=Ik(t).call(t,(function(e){return e.pluginName}));return{removedPlugins:Mk(n).call(n,(function(e){return!ew(i).call(i,e)})),addedPlugins:Mk(t).call(t,(function(e){return!ew(n).call(n,e.pluginName)}))}}},{key:"_callBeforePlayerInitForUrl",value:function(e,t){var n=this;return new Rk((function(i){n._player.config.url=t,null==e||e.forEach((function(e){e.beforePlayerInit()})),n._player.on(pO.CANPLAY,(function(){i(void 0)}))}))}}],[{key:"create",value:(t=Gy(Jg().mark((function t(){var n,i,r,o,a,s,l=arguments;return Jg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=l.length>0&&void 0!==l[0]?l[0]:{},o=l.length>1?l[1]:void 0,a=new GO({sources:VO.normalize({url:r.url,fallbackUrls:r.fallbackUrls,sources:r.playlist}),url:r.url,defaultSource:r.defaultSource,defaultDefinition:r.defaultDefinition,maxFallbackRound:r.maxFallbackRound}),r.url=a.url,t.next=6,null==r||null===(n=r.preparePlugins)||void 0===n?void 0:n.call(r,null!==(i=r.url)&&void 0!==i?i:"");case 6:return s=t.sent,t.abrupt("return",new(null!=o?o:e)(By(By({},r),{},{prepareResult:s,sourceManager:a})));case 8:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)})}]),e}();function wR(e){return ER.apply(this,arguments)}function ER(){return(ER=Gy(Jg().mark((function e(t){return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,kR.create(By({url:"//sf1-cdn-tos.huoshanstatic.com/obj/media-fe/xgplayer_doc_video/mp4/xgplayer-demo-360p.mp4"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}cR="umd",OI.setModuleSystem(cR),void 0!==VePlayer.register?VePlayer.register(cI.BizVod,{createVodPlayer:wR}):II(cI.BizVod,{createVodPlayer:wR}),e.createVodPlayer=wR,e.load=RI,e.register=II}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).VePlayer={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var i=function(e){return e&&e.Math==Math&&e},r=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof t&&t)||function(){return this}()||t||Function("return this")(),o=function(e){try{return!!e()}catch(t){return!0}},a=!o((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),s=a,l=Function.prototype,u=l.apply,c=l.call,h="object"==typeof Reflect&&Reflect.apply||(s?c.bind(u):function(){return c.apply(u,arguments)}),f=a,d=Function.prototype,p=d.call,v=f&&d.bind.bind(p,p),g=f?v:function(e){return function(){return p.apply(e,arguments)}},y=g,m=y({}.toString),_=y("".slice),b=function(e){return _(m(e),8,-1)},k=b,w=g,E=function(e){if("Function"===k(e))return w(e)},C="object"==typeof document&&document.all,x={all:C,IS_HTMLDDA:void 0===C&&void 0!==C},T=x.all,S=x.IS_HTMLDDA?function(e){return"function"==typeof e||e===T}:function(e){return"function"==typeof e},A={},P=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),O=a,I=Function.prototype.call,R=O?I.bind(I):function(){return I.apply(I,arguments)},M={},L={}.propertyIsEnumerable,D=Object.getOwnPropertyDescriptor,N=D&&!L.call({1:2},1);M.f=N?function(e){var t=D(this,e);return!!t&&t.enumerable}:L;var F,H,U=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},j=o,B=b,V=Object,G=g("".split),z=j((function(){return!V("z").propertyIsEnumerable(0)}))?function(e){return"String"==B(e)?G(e,""):V(e)}:V,K=function(e){return null==e},W=K,Y=TypeError,X=function(e){if(W(e))throw Y("Can't call method on "+e);return e},q=z,Z=X,$=function(e){return q(Z(e))},J=S,Q=x.all,ee=x.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:J(e)||e===Q}:function(e){return"object"==typeof e?null!==e:J(e)},te={},ne=te,ie=r,re=S,oe=function(e){return re(e)?e:void 0},ae=function(e,t){return arguments.length<2?oe(ne[e])||oe(ie[e]):ne[e]&&ne[e][t]||ie[e]&&ie[e][t]},se=g({}.isPrototypeOf),le="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ue=r,ce=le,he=ue.process,fe=ue.Deno,de=he&&he.versions||fe&&fe.version,pe=de&&de.v8;pe&&(H=(F=pe.split("."))[0]>0&&F[0]<4?1:+(F[0]+F[1])),!H&&ce&&(!(F=ce.match(/Edge\/(\d+)/))||F[1]>=74)&&(F=ce.match(/Chrome\/(\d+)/))&&(H=+F[1]);var ve=H,ge=ve,ye=o,me=r.String,_e=!!Object.getOwnPropertySymbols&&!ye((function(){var e=Symbol();return!me(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ge&&ge<41})),be=_e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ke=ae,we=S,Ee=se,Ce=Object,xe=be?function(e){return"symbol"==typeof e}:function(e){var t=ke("Symbol");return we(t)&&Ee(t.prototype,Ce(e))},Te=String,Se=function(e){try{return Te(e)}catch(t){return"Object"}},Ae=S,Pe=Se,Oe=TypeError,Ie=function(e){if(Ae(e))return e;throw Oe(Pe(e)+" is not a function")},Re=Ie,Me=K,Le=function(e,t){var n=e[t];return Me(n)?void 0:Re(n)},De=R,Ne=S,Fe=ee,He=TypeError,Ue={exports:{}},je=r,Be=Object.defineProperty,Ve=function(e,t){try{Be(je,e,{value:t,configurable:!0,writable:!0})}catch(n){je[e]=t}return t},Ge="__core-js_shared__",ze=r[Ge]||Ve(Ge,{}),Ke=ze;(Ue.exports=function(e,t){return Ke[e]||(Ke[e]=void 0!==t?t:{})})("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 We=Ue.exports,Ye=X,Xe=Object,qe=function(e){return Xe(Ye(e))},Ze=qe,$e=g({}.hasOwnProperty),Je=Object.hasOwn||function(e,t){return $e(Ze(e),t)},Qe=g,et=0,tt=Math.random(),nt=Qe(1..toString),it=function(e){return"Symbol("+(void 0===e?"":e)+")_"+nt(++et+tt,36)},rt=We,ot=Je,at=it,st=_e,lt=be,ut=r.Symbol,ct=rt("wks"),ht=lt?ut.for||ut:ut&&ut.withoutSetter||at,ft=function(e){return ot(ct,e)||(ct[e]=st&&ot(ut,e)?ut[e]:ht("Symbol."+e)),ct[e]},dt=R,pt=ee,vt=xe,gt=Le,yt=function(e,t){var n,i;if("string"===t&&Ne(n=e.toString)&&!Fe(i=De(n,e)))return i;if(Ne(n=e.valueOf)&&!Fe(i=De(n,e)))return i;if("string"!==t&&Ne(n=e.toString)&&!Fe(i=De(n,e)))return i;throw He("Can't convert object to primitive value")},mt=TypeError,_t=ft("toPrimitive"),bt=function(e,t){if(!pt(e)||vt(e))return e;var n,i=gt(e,_t);if(i){if(void 0===t&&(t="default"),n=dt(i,e,t),!pt(n)||vt(n))return n;throw mt("Can't convert object to primitive value")}return void 0===t&&(t="number"),yt(e,t)},kt=xe,wt=function(e){var t=bt(e,"string");return kt(t)?t:t+""},Et=ee,Ct=r.document,xt=Et(Ct)&&Et(Ct.createElement),Tt=function(e){return xt?Ct.createElement(e):{}},St=Tt,At=!P&&!o((function(){return 7!=Object.defineProperty(St("div"),"a",{get:function(){return 7}}).a})),Pt=P,Ot=R,It=M,Rt=U,Mt=$,Lt=wt,Dt=Je,Nt=At,Ft=Object.getOwnPropertyDescriptor;A.f=Pt?Ft:function(e,t){if(e=Mt(e),t=Lt(t),Nt)try{return Ft(e,t)}catch(n){}if(Dt(e,t))return Rt(!Ot(It.f,e,t),e[t])};var Ht=o,Ut=S,jt=/#|\.prototype\./,Bt=function(e,t){var n=Gt[Vt(e)];return n==Kt||n!=zt&&(Ut(t)?Ht(t):!!t)},Vt=Bt.normalize=function(e){return String(e).replace(jt,".").toLowerCase()},Gt=Bt.data={},zt=Bt.NATIVE="N",Kt=Bt.POLYFILL="P",Wt=Bt,Yt=Ie,Xt=a,qt=E(E.bind),Zt=function(e,t){return Yt(e),void 0===t?e:Xt?qt(e,t):function(){return e.apply(t,arguments)}},$t={},Jt=P&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Qt=ee,en=String,tn=TypeError,nn=function(e){if(Qt(e))return e;throw tn(en(e)+" is not an object")},rn=P,on=At,an=Jt,sn=nn,ln=wt,un=TypeError,cn=Object.defineProperty,hn=Object.getOwnPropertyDescriptor,fn="enumerable",dn="configurable",pn="writable";$t.f=rn?an?function(e,t,n){if(sn(e),t=ln(t),sn(n),"function"==typeof e&&"prototype"===t&&"value"in n&&pn in n&&!n[pn]){var i=hn(e,t);i&&i[pn]&&(e[t]=n.value,n={configurable:dn in n?n[dn]:i[dn],enumerable:fn in n?n[fn]:i[fn],writable:!1})}return cn(e,t,n)}:cn:function(e,t,n){if(sn(e),t=ln(t),sn(n),on)try{return cn(e,t,n)}catch(i){}if("get"in n||"set"in n)throw un("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var vn=$t,gn=U,yn=P?function(e,t,n){return vn.f(e,t,gn(1,n))}:function(e,t,n){return e[t]=n,e},mn=r,_n=h,bn=E,kn=S,wn=A.f,En=Wt,Cn=te,xn=Zt,Tn=yn,Sn=Je,An=function(e){var t=function(n,i,r){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,i)}return new e(n,i,r)}return _n(e,this,arguments)};return t.prototype=e.prototype,t},Pn=function(e,t){var n,i,r,o,a,s,l,u,c,h=e.target,f=e.global,d=e.stat,p=e.proto,v=f?mn:d?mn[h]:(mn[h]||{}).prototype,g=f?Cn:Cn[h]||Tn(Cn,h,{})[h],y=g.prototype;for(o in t)i=!(n=En(f?o:h+(d?".":"#")+o,e.forced))&&v&&Sn(v,o),s=g[o],i&&(l=e.dontCallGetSet?(c=wn(v,o))&&c.value:v[o]),a=i&&l?l:t[o],i&&typeof s==typeof a||(u=e.bind&&i?xn(a,mn):e.wrap&&i?An(a):p&&kn(a)?bn(a):a,(e.sham||a&&a.sham||s&&s.sham)&&Tn(u,"sham",!0),Tn(g,o,u),p&&(Sn(Cn,r=h+"Prototype")||Tn(Cn,r,{}),Tn(Cn[r],o,a),e.real&&y&&(n||!y[o])&&Tn(y,o,a)))},On=b,In=Array.isArray||function(e){return"Array"==On(e)},Rn=Math.ceil,Mn=Math.floor,Ln=Math.trunc||function(e){var t=+e;return(t>0?Mn:Rn)(t)},Dn=function(e){var t=+e;return t!=t||0===t?0:Ln(t)},Nn=Dn,Fn=Math.min,Hn=function(e){return e>0?Fn(Nn(e),9007199254740991):0},Un=Hn,jn=function(e){return Un(e.length)},Bn=TypeError,Vn=function(e){if(e>9007199254740991)throw Bn("Maximum allowed index exceeded");return e},Gn=wt,zn=$t,Kn=U,Wn=function(e,t,n){var i=Gn(t);i in e?zn.f(e,i,Kn(0,n)):e[i]=n},Yn={};Yn[ft("toStringTag")]="z";var Xn="[object z]"===String(Yn),qn=Xn,Zn=S,$n=b,Jn=ft("toStringTag"),Qn=Object,ei="Arguments"==$n(function(){return arguments}()),ti=qn?$n:function(e){var t,n,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=Qn(e),Jn))?n:ei?$n(t):"Object"==(i=$n(t))&&Zn(t.callee)?"Arguments":i},ni=S,ii=ze,ri=g(Function.toString);ni(ii.inspectSource)||(ii.inspectSource=function(e){return ri(e)});var oi=ii.inspectSource,ai=g,si=o,li=S,ui=ti,ci=oi,hi=function(){},fi=[],di=ae("Reflect","construct"),pi=/^\s*(?:class|function)\b/,vi=ai(pi.exec),gi=!pi.exec(hi),yi=function(e){if(!li(e))return!1;try{return di(hi,fi,e),!0}catch(t){return!1}},mi=function(e){if(!li(e))return!1;switch(ui(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return gi||!!vi(pi,ci(e))}catch(t){return!0}};mi.sham=!0;var _i=!di||si((function(){var e;return yi(yi.call)||!yi(Object)||!yi((function(){e=!0}))||e}))?mi:yi,bi=In,ki=_i,wi=ee,Ei=ft("species"),Ci=Array,xi=function(e){var t;return bi(e)&&(t=e.constructor,(ki(t)&&(t===Ci||bi(t.prototype))||wi(t)&&null===(t=t[Ei]))&&(t=void 0)),void 0===t?Ci:t},Ti=function(e,t){return new(xi(e))(0===t?0:t)},Si=o,Ai=ve,Pi=ft("species"),Oi=function(e){return Ai>=51||!Si((function(){var t=[];return(t.constructor={})[Pi]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Ii=Pn,Ri=o,Mi=In,Li=ee,Di=qe,Ni=jn,Fi=Vn,Hi=Wn,Ui=Ti,ji=Oi,Bi=ve,Vi=ft("isConcatSpreadable"),Gi=Bi>=51||!Ri((function(){var e=[];return e[Vi]=!1,e.concat()[0]!==e})),zi=function(e){if(!Li(e))return!1;var t=e[Vi];return void 0!==t?!!t:Mi(e)};Ii({target:"Array",proto:!0,arity:1,forced:!Gi||!ji("concat")},{concat:function(e){var t,n,i,r,o,a=Di(this),s=Ui(a,0),l=0;for(t=-1,i=arguments.length;t<i;t++)if(zi(o=-1===t?a:arguments[t]))for(r=Ni(o),Fi(l+r),n=0;n<r;n++,l++)n in o&&Hi(s,l,o[n]);else Fi(l+1),Hi(s,l++,o);return s.length=l,s}});var Ki=ti,Wi=String,Yi=function(e){if("Symbol"===Ki(e))throw TypeError("Cannot convert a Symbol value to a string");return Wi(e)},Xi={},qi=Dn,Zi=Math.max,$i=Math.min,Ji=function(e,t){var n=qi(e);return n<0?Zi(n+t,0):$i(n,t)},Qi=$,er=Ji,tr=jn,nr=function(e){return function(t,n,i){var r,o=Qi(t),a=tr(o),s=er(i,a);if(e&&n!=n){for(;a>s;)if((r=o[s++])!=r)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}},ir={includes:nr(!0),indexOf:nr(!1)},rr={},or=Je,ar=$,sr=ir.indexOf,lr=rr,ur=g([].push),cr=function(e,t){var n,i=ar(e),r=0,o=[];for(n in i)!or(lr,n)&&or(i,n)&&ur(o,n);for(;t.length>r;)or(i,n=t[r++])&&(~sr(o,n)||ur(o,n));return o},hr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],fr=cr,dr=hr,pr=Object.keys||function(e){return fr(e,dr)},vr=P,gr=Jt,yr=$t,mr=nn,_r=$,br=pr;Xi.f=vr&&!gr?Object.defineProperties:function(e,t){mr(e);for(var n,i=_r(t),r=br(t),o=r.length,a=0;o>a;)yr.f(e,n=r[a++],i[n]);return e};var kr,wr=ae("document","documentElement"),Er=it,Cr=We("keys"),xr=function(e){return Cr[e]||(Cr[e]=Er(e))},Tr=nn,Sr=Xi,Ar=hr,Pr=rr,Or=wr,Ir=Tt,Rr="prototype",Mr="script",Lr=xr("IE_PROTO"),Dr=function(){},Nr=function(e){return"<"+Mr+">"+e+"</"+Mr+">"},Fr=function(e){e.write(Nr("")),e.close();var t=e.parentWindow.Object;return e=null,t},Hr=function(){try{kr=new ActiveXObject("htmlfile")}catch(r){}var e,t,n;Hr="undefined"!=typeof document?document.domain&&kr?Fr(kr):(t=Ir("iframe"),n="java"+Mr+":",t.style.display="none",Or.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Nr("document.F=Object")),e.close(),e.F):Fr(kr);for(var i=Ar.length;i--;)delete Hr[Rr][Ar[i]];return Hr()};Pr[Lr]=!0;var Ur=Object.create||function(e,t){var n;return null!==e?(Dr[Rr]=Tr(e),n=new Dr,Dr[Rr]=null,n[Lr]=e):n=Hr(),void 0===t?n:Sr.f(n,t)},jr={},Br=cr,Vr=hr.concat("length","prototype");jr.f=Object.getOwnPropertyNames||function(e){return Br(e,Vr)};var Gr={},zr=Ji,Kr=jn,Wr=Wn,Yr=Array,Xr=Math.max,qr=function(e,t,n){for(var i=Kr(e),r=zr(t,i),o=zr(void 0===n?i:n,i),a=Yr(Xr(o-r,0)),s=0;r<o;r++,s++)Wr(a,s,e[r]);return a.length=s,a},Zr=b,$r=$,Jr=jr.f,Qr=qr,eo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Gr.f=function(e){return eo&&"Window"==Zr(e)?function(e){try{return Jr(e)}catch(t){return Qr(eo)}}(e):Jr($r(e))};var to={};to.f=Object.getOwnPropertySymbols;var no=yn,io=function(e,t,n,i){return i&&i.enumerable?e[t]=n:no(e,t,n),e},ro=$t,oo=function(e,t,n){return ro.f(e,t,n)},ao={},so=ft;ao.f=so;var lo,uo,co,ho=te,fo=Je,po=ao,vo=$t.f,go=function(e){var t=ho.Symbol||(ho.Symbol={});fo(t,e)||vo(t,e,{value:po.f(e)})},yo=R,mo=ae,_o=ft,bo=io,ko=function(){var e=mo("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,i=_o("toPrimitive");t&&!t[i]&&bo(t,i,(function(e){return yo(n,this)}),{arity:1})},wo=ti,Eo=Xn?{}.toString:function(){return"[object "+wo(this)+"]"},Co=Xn,xo=$t.f,To=yn,So=Je,Ao=Eo,Po=ft("toStringTag"),Oo=function(e,t,n,i){if(e){var r=n?e:e.prototype;So(r,Po)||xo(r,Po,{configurable:!0,value:t}),i&&!Co&&To(r,"toString",Ao)}},Io=S,Ro=r.WeakMap,Mo=Io(Ro)&&/native code/.test(String(Ro)),Lo=r,Do=ee,No=yn,Fo=Je,Ho=ze,Uo=xr,jo=rr,Bo="Object already initialized",Vo=Lo.TypeError,Go=Lo.WeakMap;if(Mo||Ho.state){var zo=Ho.state||(Ho.state=new Go);zo.get=zo.get,zo.has=zo.has,zo.set=zo.set,lo=function(e,t){if(zo.has(e))throw Vo(Bo);return t.facade=e,zo.set(e,t),t},uo=function(e){return zo.get(e)||{}},co=function(e){return zo.has(e)}}else{var Ko=Uo("state");jo[Ko]=!0,lo=function(e,t){if(Fo(e,Ko))throw Vo(Bo);return t.facade=e,No(e,Ko,t),t},uo=function(e){return Fo(e,Ko)?e[Ko]:{}},co=function(e){return Fo(e,Ko)}}var Wo={set:lo,get:uo,has:co,enforce:function(e){return co(e)?uo(e):lo(e,{})},getterFor:function(e){return function(t){var n;if(!Do(t)||(n=uo(t)).type!==e)throw Vo("Incompatible receiver, "+e+" required");return n}}},Yo=Zt,Xo=z,qo=qe,Zo=jn,$o=Ti,Jo=g([].push),Qo=function(e){var t=1==e,n=2==e,i=3==e,r=4==e,o=6==e,a=7==e,s=5==e||o;return function(l,u,c,h){for(var f,d,p=qo(l),v=Xo(p),g=Yo(u,c),y=Zo(v),m=0,_=h||$o,b=t?_(l,y):n||a?_(l,0):void 0;y>m;m++)if((s||m in v)&&(d=g(f=v[m],m,p),e))if(t)b[m]=d;else if(d)switch(e){case 3:return!0;case 5:return f;case 6:return m;case 2:Jo(b,f)}else switch(e){case 4:return!1;case 7:Jo(b,f)}return o?-1:i||r?r:b}},ea={forEach:Qo(0),map:Qo(1),filter:Qo(2),some:Qo(3),every:Qo(4),find:Qo(5),findIndex:Qo(6),filterReject:Qo(7)},ta=Pn,na=r,ia=R,ra=g,oa=P,aa=_e,sa=o,la=Je,ua=se,ca=nn,ha=$,fa=wt,da=Yi,pa=U,va=Ur,ga=pr,ya=jr,ma=Gr,_a=to,ba=A,ka=$t,wa=Xi,Ea=M,Ca=io,xa=oo,Ta=We,Sa=rr,Aa=it,Pa=ft,Oa=ao,Ia=go,Ra=ko,Ma=Oo,La=Wo,Da=ea.forEach,Na=xr("hidden"),Fa="Symbol",Ha="prototype",Ua=La.set,ja=La.getterFor(Fa),Ba=Object[Ha],Va=na.Symbol,Ga=Va&&Va[Ha],za=na.TypeError,Ka=na.QObject,Wa=ba.f,Ya=ka.f,Xa=ma.f,qa=Ea.f,Za=ra([].push),$a=Ta("symbols"),Ja=Ta("op-symbols"),Qa=Ta("wks"),es=!Ka||!Ka[Ha]||!Ka[Ha].findChild,ts=oa&&sa((function(){return 7!=va(Ya({},"a",{get:function(){return Ya(this,"a",{value:7}).a}})).a}))?function(e,t,n){var i=Wa(Ba,t);i&&delete Ba[t],Ya(e,t,n),i&&e!==Ba&&Ya(Ba,t,i)}:Ya,ns=function(e,t){var n=$a[e]=va(Ga);return Ua(n,{type:Fa,tag:e,description:t}),oa||(n.description=t),n},is=function(e,t,n){e===Ba&&is(Ja,t,n),ca(e);var i=fa(t);return ca(n),la($a,i)?(n.enumerable?(la(e,Na)&&e[Na][i]&&(e[Na][i]=!1),n=va(n,{enumerable:pa(0,!1)})):(la(e,Na)||Ya(e,Na,pa(1,{})),e[Na][i]=!0),ts(e,i,n)):Ya(e,i,n)},rs=function(e,t){ca(e);var n=ha(t),i=ga(n).concat(ls(n));return Da(i,(function(t){oa&&!ia(os,n,t)||is(e,t,n[t])})),e},os=function(e){var t=fa(e),n=ia(qa,this,t);return!(this===Ba&&la($a,t)&&!la(Ja,t))&&(!(n||!la(this,t)||!la($a,t)||la(this,Na)&&this[Na][t])||n)},as=function(e,t){var n=ha(e),i=fa(t);if(n!==Ba||!la($a,i)||la(Ja,i)){var r=Wa(n,i);return!r||!la($a,i)||la(n,Na)&&n[Na][i]||(r.enumerable=!0),r}},ss=function(e){var t=Xa(ha(e)),n=[];return Da(t,(function(e){la($a,e)||la(Sa,e)||Za(n,e)})),n},ls=function(e){var t=e===Ba,n=Xa(t?Ja:ha(e)),i=[];return Da(n,(function(e){!la($a,e)||t&&!la(Ba,e)||Za(i,$a[e])})),i};aa||(Va=function(){if(ua(Ga,this))throw za("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?da(arguments[0]):void 0,t=Aa(e),n=function(e){this===Ba&&ia(n,Ja,e),la(this,Na)&&la(this[Na],t)&&(this[Na][t]=!1),ts(this,t,pa(1,e))};return oa&&es&&ts(Ba,t,{configurable:!0,set:n}),ns(t,e)},Ca(Ga=Va[Ha],"toString",(function(){return ja(this).tag})),Ca(Va,"withoutSetter",(function(e){return ns(Aa(e),e)})),Ea.f=os,ka.f=is,wa.f=rs,ba.f=as,ya.f=ma.f=ss,_a.f=ls,Oa.f=function(e){return ns(Pa(e),e)},oa&&xa(Ga,"description",{configurable:!0,get:function(){return ja(this).description}})),ta({global:!0,constructor:!0,wrap:!0,forced:!aa,sham:!aa},{Symbol:Va}),Da(ga(Qa),(function(e){Ia(e)})),ta({target:Fa,stat:!0,forced:!aa},{useSetter:function(){es=!0},useSimple:function(){es=!1}}),ta({target:"Object",stat:!0,forced:!aa,sham:!oa},{create:function(e,t){return void 0===t?va(e):rs(va(e),t)},defineProperty:is,defineProperties:rs,getOwnPropertyDescriptor:as}),ta({target:"Object",stat:!0,forced:!aa},{getOwnPropertyNames:ss}),Ra(),Ma(Va,Fa),Sa[Na]=!0;var us=_e&&!!Symbol.for&&!!Symbol.keyFor,cs=Pn,hs=ae,fs=Je,ds=Yi,ps=We,vs=us,gs=ps("string-to-symbol-registry"),ys=ps("symbol-to-string-registry");cs({target:"Symbol",stat:!0,forced:!vs},{for:function(e){var t=ds(e);if(fs(gs,t))return gs[t];var n=hs("Symbol")(t);return gs[t]=n,ys[n]=t,n}});var ms=Pn,_s=Je,bs=xe,ks=Se,ws=us,Es=We("symbol-to-string-registry");ms({target:"Symbol",stat:!0,forced:!ws},{keyFor:function(e){if(!bs(e))throw TypeError(ks(e)+" is not a symbol");if(_s(Es,e))return Es[e]}});var Cs=g([].slice),xs=In,Ts=S,Ss=b,As=Yi,Ps=g([].push),Os=Pn,Is=ae,Rs=h,Ms=R,Ls=g,Ds=o,Ns=S,Fs=xe,Hs=Cs,Us=function(e){if(Ts(e))return e;if(xs(e)){for(var t=e.length,n=[],i=0;i<t;i++){var r=e[i];"string"==typeof r?Ps(n,r):"number"!=typeof r&&"Number"!=Ss(r)&&"String"!=Ss(r)||Ps(n,As(r))}var o=n.length,a=!0;return function(e,t){if(a)return a=!1,t;if(xs(this))return t;for(var i=0;i<o;i++)if(n[i]===e)return t}}},js=_e,Bs=String,Vs=Is("JSON","stringify"),Gs=Ls(/./.exec),zs=Ls("".charAt),Ks=Ls("".charCodeAt),Ws=Ls("".replace),Ys=Ls(1..toString),Xs=/[\uD800-\uDFFF]/g,qs=/^[\uD800-\uDBFF]$/,Zs=/^[\uDC00-\uDFFF]$/,$s=!js||Ds((function(){var e=Is("Symbol")();return"[null]"!=Vs([e])||"{}"!=Vs({a:e})||"{}"!=Vs(Object(e))})),Js=Ds((function(){return'"\\udf06\\ud834"'!==Vs("\udf06\ud834")||'"\\udead"'!==Vs("\udead")})),Qs=function(e,t){var n=Hs(arguments),i=Us(t);if(Ns(i)||void 0!==e&&!Fs(e))return n[1]=function(e,t){if(Ns(i)&&(t=Ms(i,this,Bs(e),t)),!Fs(t))return t},Rs(Vs,null,n)},el=function(e,t,n){var i=zs(n,t-1),r=zs(n,t+1);return Gs(qs,e)&&!Gs(Zs,r)||Gs(Zs,e)&&!Gs(qs,i)?"\\u"+Ys(Ks(e,0),16):e};Vs&&Os({target:"JSON",stat:!0,arity:3,forced:$s||Js},{stringify:function(e,t,n){var i=Hs(arguments),r=Rs($s?Qs:Vs,null,i);return Js&&"string"==typeof r?Ws(r,Xs,el):r}});var tl=to,nl=qe;Pn({target:"Object",stat:!0,forced:!_e||o((function(){tl.f(1)}))},{getOwnPropertySymbols:function(e){var t=tl.f;return t?t(nl(e)):[]}}),go("asyncIterator"),go("hasInstance"),go("isConcatSpreadable"),go("iterator"),go("match"),go("matchAll"),go("replace"),go("search"),go("species"),go("split");var il=ko;go("toPrimitive"),il();var rl=ae,ol=Oo;go("toStringTag"),ol(rl("Symbol"),"Symbol"),go("unscopables"),Oo(r.JSON,"JSON",!0);var al,sl,ll,ul=te.Symbol,cl={},hl=P,fl=Je,dl=Function.prototype,pl=hl&&Object.getOwnPropertyDescriptor,vl=fl(dl,"name"),gl={EXISTS:vl,PROPER:vl&&"something"===function(){}.name,CONFIGURABLE:vl&&(!hl||hl&&pl(dl,"name").configurable)},yl=!o((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),ml=Je,_l=S,bl=qe,kl=yl,wl=xr("IE_PROTO"),El=Object,Cl=El.prototype,xl=kl?El.getPrototypeOf:function(e){var t=bl(e);if(ml(t,wl))return t[wl];var n=t.constructor;return _l(n)&&t instanceof n?n.prototype:t instanceof El?Cl:null},Tl=o,Sl=S,Al=ee,Pl=Ur,Ol=xl,Il=io,Rl=ft("iterator"),Ml=!1;[].keys&&("next"in(ll=[].keys())?(sl=Ol(Ol(ll)))!==Object.prototype&&(al=sl):Ml=!0);var Ll=!Al(al)||Tl((function(){var e={};return al[Rl].call(e)!==e}));Sl((al=Ll?{}:Pl(al))[Rl])||Il(al,Rl,(function(){return this}));var Dl={IteratorPrototype:al,BUGGY_SAFARI_ITERATORS:Ml},Nl=Dl.IteratorPrototype,Fl=Ur,Hl=U,Ul=Oo,jl=cl,Bl=function(){return this},Vl=g,Gl=Ie,zl=S,Kl=String,Wl=TypeError,Yl=function(e,t,n){try{return Vl(Gl(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(i){}},Xl=nn,ql=function(e){if("object"==typeof e||zl(e))return e;throw Wl("Can't set "+Kl(e)+" as a prototype")},Zl=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Yl(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(i){}return function(n,i){return Xl(n),ql(i),t?e(n,i):n.__proto__=i,n}}():void 0),$l=Pn,Jl=R,Ql=gl,eu=function(e,t,n,i){var r=t+" Iterator";return e.prototype=Fl(Nl,{next:Hl(+!i,n)}),Ul(e,r,!1,!0),jl[r]=Bl,e},tu=xl,nu=Oo,iu=io,ru=cl,ou=Dl,au=Ql.PROPER,su=ou.BUGGY_SAFARI_ITERATORS,lu=ft("iterator"),uu="keys",cu="values",hu="entries",fu=function(){return this},du=function(e,t,n,i,r,o,a){eu(n,t,i);var s,l,u,c=function(e){if(e===r&&v)return v;if(!su&&e in d)return d[e];switch(e){case uu:case cu:case hu:return function(){return new n(this,e)}}return function(){return new n(this)}},h=t+" Iterator",f=!1,d=e.prototype,p=d[lu]||d["@@iterator"]||r&&d[r],v=!su&&p||c(r),g="Array"==t&&d.entries||p;if(g&&(s=tu(g.call(new e)))!==Object.prototype&&s.next&&(nu(s,h,!0,!0),ru[h]=fu),au&&r==cu&&p&&p.name!==cu&&(f=!0,v=function(){return Jl(p,this)}),r)if(l={values:c(cu),keys:o?v:c(uu),entries:c(hu)},a)for(u in l)(su||f||!(u in d))&&iu(d,u,l[u]);else $l({target:t,proto:!0,forced:su||f},l);return a&&d[lu]!==v&&iu(d,lu,v,{name:r}),ru[t]=v,l},pu=function(e,t){return{value:e,done:t}},vu=$,gu=cl,yu=Wo;$t.f;var mu=du,_u=pu,bu="Array Iterator",ku=yu.set,wu=yu.getterFor(bu);mu(Array,"Array",(function(e,t){ku(this,{type:bu,target:vu(e),index:0,kind:t})}),(function(){var e=wu(this),t=e.target,n=e.kind,i=e.index++;return!t||i>=t.length?(e.target=void 0,_u(void 0,!0)):_u("keys"==n?i:"values"==n?t[i]:[i,t[i]],!1)}),"values"),gu.Arguments=gu.Array;var Eu={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},Cu=r,xu=ti,Tu=yn,Su=cl,Au=ft("toStringTag");for(var Pu in Eu){var Ou=Cu[Pu],Iu=Ou&&Ou.prototype;Iu&&xu(Iu)!==Au&&Tu(Iu,Au,Pu),Su[Pu]=Su.Array}var Ru=ul;go("dispose");var Mu=Ru;go("asyncDispose");var Lu=Pn,Du=g,Nu=ae("Symbol"),Fu=Nu.keyFor,Hu=Du(Nu.prototype.valueOf);Lu({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==Fu(Hu(e))}catch(t){return!1}}});for(var Uu=Pn,ju=We,Bu=ae,Vu=g,Gu=xe,zu=ft,Ku=Bu("Symbol"),Wu=Ku.isWellKnown,Yu=Bu("Object","getOwnPropertyNames"),Xu=Vu(Ku.prototype.valueOf),qu=ju("wks"),Zu=0,$u=Yu(Ku),Ju=$u.length;Zu<Ju;Zu++)try{var Qu=$u[Zu];Gu(Ku[Qu])&&zu(Qu)}catch(xR){}Uu({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if(Wu&&Wu(e))return!0;try{for(var t=Xu(e),n=0,i=Yu(qu),r=i.length;n<r;n++)if(qu[i[n]]==t)return!0}catch(xR){}return!1}}),go("matcher"),go("metadataKey"),go("observable"),go("metadata"),go("patternMatch"),go("replaceAll");var ec=Mu,tc=n(ec),nc=g,ic=Dn,rc=Yi,oc=X,ac=nc("".charAt),sc=nc("".charCodeAt),lc=nc("".slice),uc=function(e){return function(t,n){var i,r,o=rc(oc(t)),a=ic(n),s=o.length;return a<0||a>=s?e?"":void 0:(i=sc(o,a))<55296||i>56319||a+1===s||(r=sc(o,a+1))<56320||r>57343?e?ac(o,a):i:e?lc(o,a,a+2):r-56320+(i-55296<<10)+65536}},cc={codeAt:uc(!1),charAt:uc(!0)}.charAt,hc=Yi,fc=Wo,dc=du,pc=pu,vc="String Iterator",gc=fc.set,yc=fc.getterFor(vc);dc(String,"String",(function(e){gc(this,{type:vc,string:hc(e),index:0})}),(function(){var e,t=yc(this),n=t.string,i=t.index;return i>=n.length?pc(void 0,!0):(e=cc(n,i),t.index+=e.length,pc(e,!1))}));var mc=ao.f("iterator"),_c=n(mc);function bc(e){return(bc="function"==typeof tc&&"symbol"==typeof _c?function(e){return typeof e}:function(e){return e&&"function"==typeof tc&&e.constructor===tc&&e!==tc.prototype?"symbol":typeof e})(e)}var kc={exports:{}},wc=Pn,Ec=P,Cc=$t.f;wc({target:"Object",stat:!0,forced:Object.defineProperty!==Cc,sham:!Ec},{defineProperty:Cc});var xc=te.Object,Tc=kc.exports=function(e,t,n){return xc.defineProperty(e,t,n)};xc.defineProperty.sham&&(Tc.sham=!0);var Sc=kc.exports,Ac=n(Sc);Pn({target:"Object",stat:!0,sham:!P},{create:Ur});var Pc=te.Object,Oc=n((function(e,t){return Pc.create(e,t)})),Ic=qe,Rc=xl,Mc=yl;Pn({target:"Object",stat:!0,forced:o((function(){Rc(1)})),sham:!Mc},{getPrototypeOf:function(e){return Rc(Ic(e))}});var Lc=te.Object.getPrototypeOf,Dc=n(Lc),Nc=o,Fc=function(e,t){var n=[][e];return!!n&&Nc((function(){n.call(null,t||function(){return 1},1)}))},Hc=ea.forEach,Uc=Fc("forEach")?[].forEach:function(e){return Hc(this,e,arguments.length>1?arguments[1]:void 0)};Pn({target:"Array",proto:!0,forced:[].forEach!=Uc},{forEach:Uc});var jc=te,Bc=function(e){return jc[e+"Prototype"]},Vc=Bc("Array").forEach,Gc=ti,zc=Je,Kc=se,Wc=Vc,Yc=Array.prototype,Xc={DOMTokenList:!0,NodeList:!0},qc=n((function(e){var t=e.forEach;return e===Yc||Kc(Yc,e)&&t===Yc.forEach||zc(Xc,Gc(e))?Wc:t})),Zc=P,$c=In,Jc=TypeError,Qc=Object.getOwnPropertyDescriptor,eh=Zc&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(xR){return xR instanceof TypeError}}()?function(e,t){if($c(e)&&!Qc(e,"length").writable)throw Jc("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},th=qe,nh=jn,ih=eh,rh=Vn;Pn({target:"Array",proto:!0,arity:1,forced:o((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(xR){return xR instanceof TypeError}}()},{push:function(e){var t=th(this),n=nh(t),i=arguments.length;rh(n+i);for(var r=0;r<i;r++)t[n]=arguments[r],n++;return ih(t,n),n}});var oh=Bc("Array").push,ah=se,sh=oh,lh=Array.prototype,uh=n((function(e){var t=e.push;return e===lh||ah(lh,e)&&t===lh.push?sh:t}));Pn({target:"Object",stat:!0},{setPrototypeOf:Zl});var ch=te.Object.setPrototypeOf,hh=n(ch),fh=ae,dh=jr,ph=to,vh=nn,gh=g([].concat),yh=fh("Reflect","ownKeys")||function(e){var t=dh.f(vh(e)),n=ph.f;return n?gh(t,n(e)):t},mh=Je,_h=yh,bh=A,kh=$t,wh=ee,Eh=yn,Ch=Error,xh=g("".replace),Th=String(Ch("zxcasd").stack),Sh=/\n\s*at [^:]*:[^\n]*/,Ah=Sh.test(Th),Ph=U,Oh=!o((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Ph(1,7)),7!==e.stack)})),Ih=yn,Rh=function(e,t){if(Ah&&"string"==typeof e&&!Ch.prepareStackTrace)for(;t--;)e=xh(e,Sh,"");return e},Mh=Oh,Lh=Error.captureStackTrace,Dh=cl,Nh=ft("iterator"),Fh=Array.prototype,Hh=function(e){return void 0!==e&&(Dh.Array===e||Fh[Nh]===e)},Uh=ti,jh=Le,Bh=K,Vh=cl,Gh=ft("iterator"),zh=function(e){if(!Bh(e))return jh(e,Gh)||jh(e,"@@iterator")||Vh[Uh(e)]},Kh=R,Wh=Ie,Yh=nn,Xh=Se,qh=zh,Zh=TypeError,$h=function(e,t){var n=arguments.length<2?qh(e):t;if(Wh(n))return Yh(Kh(n,e));throw Zh(Xh(e)+" is not iterable")},Jh=R,Qh=nn,ef=Le,tf=function(e,t,n){var i,r;Qh(e);try{if(!(i=ef(e,"return"))){if("throw"===t)throw n;return n}i=Jh(i,e)}catch(xR){r=!0,i=xR}if("throw"===t)throw n;if(r)throw i;return Qh(i),n},nf=Zt,rf=R,of=nn,af=Se,sf=Hh,lf=jn,uf=se,cf=$h,hf=zh,ff=tf,df=TypeError,pf=function(e,t){this.stopped=e,this.result=t},vf=pf.prototype,gf=function(e,t,n){var i,r,o,a,s,l,u,c=n&&n.that,h=!(!n||!n.AS_ENTRIES),f=!(!n||!n.IS_RECORD),d=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),v=nf(t,c),g=function(e){return i&&ff(i,"normal",e),new pf(!0,e)},y=function(e){return h?(of(e),p?v(e[0],e[1],g):v(e[0],e[1])):p?v(e,g):v(e)};if(f)i=e.iterator;else if(d)i=e;else{if(!(r=hf(e)))throw df(af(e)+" is not iterable");if(sf(r)){for(o=0,a=lf(e);a>o;o++)if((s=y(e[o]))&&uf(vf,s))return s;return new pf(!1)}i=cf(e,r)}for(l=f?e.next:i.next;!(u=rf(l,i)).done;){try{s=y(u.value)}catch(xR){ff(i,"throw",xR)}if("object"==typeof s&&s&&uf(vf,s))return s}return new pf(!1)},yf=Yi,mf=Pn,_f=se,bf=xl,kf=Zl,wf=function(e,t,n){for(var i=_h(t),r=kh.f,o=bh.f,a=0;a<i.length;a++){var s=i[a];mh(e,s)||n&&mh(n,s)||r(e,s,o(t,s))}},Ef=Ur,Cf=yn,xf=U,Tf=function(e,t){wh(t)&&"cause"in t&&Eh(e,"cause",t.cause)},Sf=function(e,t,n,i){Mh&&(Lh?Lh(e,t):Ih(e,"stack",Rh(n,i)))},Af=gf,Pf=function(e,t){return void 0===e?arguments.length<2?"":t:yf(e)},Of=ft("toStringTag"),If=Error,Rf=[].push,Mf=function(e,t){var n,i=_f(Lf,this);kf?n=kf(If(),i?bf(this):Lf):(n=i?this:Ef(Lf),Cf(n,Of,"Error")),void 0!==t&&Cf(n,"message",Pf(t)),Sf(n,Mf,n.stack,1),arguments.length>2&&Tf(n,arguments[2]);var r=[];return Af(e,Rf,{that:r}),Cf(n,"errors",r),n};kf?kf(Mf,If):wf(Mf,If,{name:!0});var Lf=Mf.prototype=Ef(If.prototype,{constructor:xf(1,Mf),message:xf(1,""),name:xf(1,"AggregateError")});mf({global:!0,constructor:!0,arity:2},{AggregateError:Mf});var Df,Nf,Ff,Hf,Uf="undefined"!=typeof process&&"process"==b(process),jf=ae,Bf=oo,Vf=P,Gf=ft("species"),zf=function(e){var t=jf(e);Vf&&t&&!t[Gf]&&Bf(t,Gf,{configurable:!0,get:function(){return this}})},Kf=se,Wf=TypeError,Yf=function(e,t){if(Kf(t,e))return e;throw Wf("Incorrect invocation")},Xf=_i,qf=Se,Zf=TypeError,$f=function(e){if(Xf(e))return e;throw Zf(qf(e)+" is not a constructor")},Jf=nn,Qf=$f,ed=K,td=ft("species"),nd=function(e,t){var n,i=Jf(e).constructor;return void 0===i||ed(n=Jf(i)[td])?t:Qf(n)},id=TypeError,rd=/(?:ipad|iphone|ipod).*applewebkit/i.test(le),od=r,ad=h,sd=Zt,ld=S,ud=Je,cd=o,hd=wr,fd=Cs,dd=Tt,pd=function(e,t){if(e<t)throw id("Not enough arguments");return e},vd=rd,gd=Uf,yd=od.setImmediate,md=od.clearImmediate,_d=od.process,bd=od.Dispatch,kd=od.Function,wd=od.MessageChannel,Ed=od.String,Cd=0,xd={},Td="onreadystatechange";cd((function(){Df=od.location}));var Sd=function(e){if(ud(xd,e)){var t=xd[e];delete xd[e],t()}},Ad=function(e){return function(){Sd(e)}},Pd=function(e){Sd(e.data)},Od=function(e){od.postMessage(Ed(e),Df.protocol+"//"+Df.host)};yd&&md||(yd=function(e){pd(arguments.length,1);var t=ld(e)?e:kd(e),n=fd(arguments,1);return xd[++Cd]=function(){ad(t,void 0,n)},Nf(Cd),Cd},md=function(e){delete xd[e]},gd?Nf=function(e){_d.nextTick(Ad(e))}:bd&&bd.now?Nf=function(e){bd.now(Ad(e))}:wd&&!vd?(Hf=(Ff=new wd).port2,Ff.port1.onmessage=Pd,Nf=sd(Hf.postMessage,Hf)):od.addEventListener&&ld(od.postMessage)&&!od.importScripts&&Df&&"file:"!==Df.protocol&&!cd(Od)?(Nf=Od,od.addEventListener("message",Pd,!1)):Nf=Td in dd("script")?function(e){hd.appendChild(dd("script"))[Td]=function(){hd.removeChild(this),Sd(e)}}:function(e){setTimeout(Ad(e),0)});var Id={set:yd,clear:md},Rd=function(){this.head=null,this.tail=null};Rd.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var Md,Ld,Dd,Nd,Fd,Hd=Rd,Ud=/ipad|iphone|ipod/i.test(le)&&"undefined"!=typeof Pebble,jd=/web0s(?!.*chrome)/i.test(le),Bd=r,Vd=Zt,Gd=A.f,zd=Id.set,Kd=Hd,Wd=rd,Yd=Ud,Xd=jd,qd=Uf,Zd=Bd.MutationObserver||Bd.WebKitMutationObserver,$d=Bd.document,Jd=Bd.process,Qd=Bd.Promise,ep=Gd(Bd,"queueMicrotask"),tp=ep&&ep.value;if(!tp){var np=new Kd,ip=function(){var e,t;for(qd&&(e=Jd.domain)&&e.exit();t=np.get();)try{t()}catch(xR){throw np.head&&Md(),xR}e&&e.enter()};Wd||qd||Xd||!Zd||!$d?!Yd&&Qd&&Qd.resolve?((Nd=Qd.resolve(void 0)).constructor=Qd,Fd=Vd(Nd.then,Nd),Md=function(){Fd(ip)}):qd?Md=function(){Jd.nextTick(ip)}:(zd=Vd(zd,Bd),Md=function(){zd(ip)}):(Ld=!0,Dd=$d.createTextNode(""),new Zd(ip).observe(Dd,{characterData:!0}),Md=function(){Dd.data=Ld=!Ld}),tp=function(e){np.head||Md(),np.add(e)}}var rp=tp,op=function(e){try{return{error:!1,value:e()}}catch(xR){return{error:!0,value:xR}}},ap=r.Promise,sp="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,lp=!sp&&!Uf&&"object"==typeof window&&"object"==typeof document,up=r,cp=ap,hp=S,fp=Wt,dp=oi,pp=ft,vp=lp,gp=sp,yp=ve,mp=cp&&cp.prototype,_p=pp("species"),bp=!1,kp=hp(up.PromiseRejectionEvent),wp={CONSTRUCTOR:fp("Promise",(function(){var e=dp(cp),t=e!==String(cp);if(!t&&66===yp)return!0;if(!mp.catch||!mp.finally)return!0;if(!yp||yp<51||!/native code/.test(e)){var n=new cp((function(e){e(1)})),i=function(e){e((function(){}),(function(){}))};if((n.constructor={})[_p]=i,!(bp=n.then((function(){}))instanceof i))return!0}return!t&&(vp||gp)&&!kp})),REJECTION_EVENT:kp,SUBCLASSING:bp},Ep={},Cp=Ie,xp=TypeError,Tp=function(e){var t,n;this.promise=new e((function(e,i){if(void 0!==t||void 0!==n)throw xp("Bad Promise constructor");t=e,n=i})),this.resolve=Cp(t),this.reject=Cp(n)};Ep.f=function(e){return new Tp(e)};var Sp,Ap,Pp=Pn,Op=Uf,Ip=r,Rp=R,Mp=io,Lp=Oo,Dp=zf,Np=Ie,Fp=S,Hp=ee,Up=Yf,jp=nd,Bp=Id.set,Vp=rp,Gp=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(xR){}},zp=op,Kp=Hd,Wp=Wo,Yp=ap,Xp=wp,qp=Ep,Zp="Promise",$p=Xp.CONSTRUCTOR,Jp=Xp.REJECTION_EVENT,Qp=Wp.getterFor(Zp),ev=Wp.set,tv=Yp&&Yp.prototype,nv=Yp,iv=tv,rv=Ip.TypeError,ov=Ip.document,av=Ip.process,sv=qp.f,lv=sv,uv=!!(ov&&ov.createEvent&&Ip.dispatchEvent),cv="unhandledrejection",hv=function(e){var t;return!(!Hp(e)||!Fp(t=e.then))&&t},fv=function(e,t){var n,i,r,o=t.value,a=1==t.state,s=a?e.ok:e.fail,l=e.resolve,u=e.reject,c=e.domain;try{s?(a||(2===t.rejection&&yv(t),t.rejection=1),!0===s?n=o:(c&&c.enter(),n=s(o),c&&(c.exit(),r=!0)),n===e.promise?u(rv("Promise-chain cycle")):(i=hv(n))?Rp(i,n,l,u):l(n)):u(o)}catch(xR){c&&!r&&c.exit(),u(xR)}},dv=function(e,t){e.notified||(e.notified=!0,Vp((function(){for(var n,i=e.reactions;n=i.get();)fv(n,e);e.notified=!1,t&&!e.rejection&&vv(e)})))},pv=function(e,t,n){var i,r;uv?((i=ov.createEvent("Event")).promise=t,i.reason=n,i.initEvent(e,!1,!0),Ip.dispatchEvent(i)):i={promise:t,reason:n},!Jp&&(r=Ip["on"+e])?r(i):e===cv&&Gp("Unhandled promise rejection",n)},vv=function(e){Rp(Bp,Ip,(function(){var t,n=e.facade,i=e.value;if(gv(e)&&(t=zp((function(){Op?av.emit("unhandledRejection",i,n):pv(cv,n,i)})),e.rejection=Op||gv(e)?2:1,t.error))throw t.value}))},gv=function(e){return 1!==e.rejection&&!e.parent},yv=function(e){Rp(Bp,Ip,(function(){var t=e.facade;Op?av.emit("rejectionHandled",t):pv("rejectionhandled",t,e.value)}))},mv=function(e,t,n){return function(i){e(t,i,n)}},_v=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,dv(e,!0))},bv=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw rv("Promise can't be resolved itself");var i=hv(t);i?Vp((function(){var n={done:!1};try{Rp(i,t,mv(bv,n,e),mv(_v,n,e))}catch(xR){_v(n,xR,e)}})):(e.value=t,e.state=1,dv(e,!1))}catch(xR){_v({done:!1},xR,e)}}};$p&&(iv=(nv=function(e){Up(this,iv),Np(e),Rp(Sp,this);var t=Qp(this);try{e(mv(bv,t),mv(_v,t))}catch(xR){_v(t,xR)}}).prototype,(Sp=function(e){ev(this,{type:Zp,done:!1,notified:!1,parent:!1,reactions:new Kp,rejection:!1,state:0,value:void 0})}).prototype=Mp(iv,"then",(function(e,t){var n=Qp(this),i=sv(jp(this,nv));return n.parent=!0,i.ok=!Fp(e)||e,i.fail=Fp(t)&&t,i.domain=Op?av.domain:void 0,0==n.state?n.reactions.add(i):Vp((function(){fv(i,n)})),i.promise})),Ap=function(){var e=new Sp,t=Qp(e);this.promise=e,this.resolve=mv(bv,t),this.reject=mv(_v,t)},qp.f=sv=function(e){return e===nv||undefined===e?new Ap(e):lv(e)}),Pp({global:!0,constructor:!0,wrap:!0,forced:$p},{Promise:nv}),Lp(nv,Zp,!1,!0),Dp(Zp);var kv=ft("iterator"),wv=!1;try{var Ev=0,Cv={next:function(){return{done:!!Ev++}},return:function(){wv=!0}};Cv[kv]=function(){return this},Array.from(Cv,(function(){throw 2}))}catch(xR){}var xv=function(e,t){if(!t&&!wv)return!1;var n=!1;try{var i={};i[kv]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(xR){}return n},Tv=ap,Sv=wp.CONSTRUCTOR||!xv((function(e){Tv.all(e).then(void 0,(function(){}))})),Av=R,Pv=Ie,Ov=Ep,Iv=op,Rv=gf;Pn({target:"Promise",stat:!0,forced:Sv},{all:function(e){var t=this,n=Ov.f(t),i=n.resolve,r=n.reject,o=Iv((function(){var n=Pv(t.resolve),o=[],a=0,s=1;Rv(e,(function(e){var l=a++,u=!1;s++,Av(n,t,e).then((function(e){u||(u=!0,o[l]=e,--s||i(o))}),r)})),--s||i(o)}));return o.error&&r(o.value),n.promise}});var Mv=Pn,Lv=wp.CONSTRUCTOR;ap&&ap.prototype,Mv({target:"Promise",proto:!0,forced:Lv,real:!0},{catch:function(e){return this.then(void 0,e)}});var Dv=R,Nv=Ie,Fv=Ep,Hv=op,Uv=gf;Pn({target:"Promise",stat:!0,forced:Sv},{race:function(e){var t=this,n=Fv.f(t),i=n.reject,r=Hv((function(){var r=Nv(t.resolve);Uv(e,(function(e){Dv(r,t,e).then(n.resolve,i)}))}));return r.error&&i(r.value),n.promise}});var jv=R,Bv=Ep;Pn({target:"Promise",stat:!0,forced:wp.CONSTRUCTOR},{reject:function(e){var t=Bv.f(this);return jv(t.reject,void 0,e),t.promise}});var Vv=nn,Gv=ee,zv=Ep,Kv=function(e,t){if(Vv(e),Gv(t)&&t.constructor===e)return t;var n=zv.f(e);return(0,n.resolve)(t),n.promise},Wv=Pn,Yv=ap,Xv=wp.CONSTRUCTOR,qv=Kv,Zv=ae("Promise"),$v=!Xv;Wv({target:"Promise",stat:!0,forced:true},{resolve:function(e){return qv($v&&this===Zv?Yv:this,e)}});var Jv=R,Qv=Ie,eg=Ep,tg=op,ng=gf;Pn({target:"Promise",stat:!0,forced:Sv},{allSettled:function(e){var t=this,n=eg.f(t),i=n.resolve,r=n.reject,o=tg((function(){var n=Qv(t.resolve),r=[],o=0,a=1;ng(e,(function(e){var s=o++,l=!1;a++,Jv(n,t,e).then((function(e){l||(l=!0,r[s]={status:"fulfilled",value:e},--a||i(r))}),(function(e){l||(l=!0,r[s]={status:"rejected",reason:e},--a||i(r))}))})),--a||i(r)}));return o.error&&r(o.value),n.promise}});var ig=R,rg=Ie,og=ae,ag=Ep,sg=op,lg=gf,ug="No one promise resolved";Pn({target:"Promise",stat:!0,forced:Sv},{any:function(e){var t=this,n=og("AggregateError"),i=ag.f(t),r=i.resolve,o=i.reject,a=sg((function(){var i=rg(t.resolve),a=[],s=0,l=1,u=!1;lg(e,(function(e){var c=s++,h=!1;l++,ig(i,t,e).then((function(e){h||u||(u=!0,r(e))}),(function(e){h||u||(h=!0,a[c]=e,--l||o(new n(a,ug)))}))})),--l||o(new n(a,ug))}));return a.error&&o(a.value),i.promise}});var cg=Pn,hg=ap,fg=o,dg=ae,pg=S,vg=nd,gg=Kv,yg=hg&&hg.prototype;cg({target:"Promise",proto:!0,real:!0,forced:!!hg&&fg((function(){yg.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=vg(this,dg("Promise")),n=pg(e);return this.then(n?function(n){return gg(t,e()).then((function(){return n}))}:e,n?function(n){return gg(t,e()).then((function(){throw n}))}:e)}});var mg=te.Promise,_g=Ep,bg=op;Pn({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=_g.f(this),n=bg(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}});var kg=mg,wg=n(kg),Eg=Pn,Cg=In,xg=g([].reverse),Tg=[1,2];Eg({target:"Array",proto:!0,forced:String(Tg)===String(Tg.reverse())},{reverse:function(){return Cg(this)&&(this.length=this.length),xg(this)}});var Sg=Bc("Array").reverse,Ag=se,Pg=Sg,Og=Array.prototype,Ig=n((function(e){var t=e.reverse;return e===Og||Ag(Og,e)&&t===Og.reverse?Pg:t})),Rg=Pn,Mg=In,Lg=_i,Dg=ee,Ng=Ji,Fg=jn,Hg=$,Ug=Wn,jg=ft,Bg=Cs,Vg=Oi("slice"),Gg=jg("species"),zg=Array,Kg=Math.max;Rg({target:"Array",proto:!0,forced:!Vg},{slice:function(e,t){var n,i,r,o=Hg(this),a=Fg(o),s=Ng(e,a),l=Ng(void 0===t?a:t,a);if(Mg(o)&&(n=o.constructor,(Lg(n)&&(n===zg||Mg(n.prototype))||Dg(n)&&null===(n=n[Gg]))&&(n=void 0),n===zg||void 0===n))return Bg(o,s,l);for(i=new(void 0===n?zg:n)(Kg(l-s,0)),r=0;s<l;s++,r++)s in o&&Ug(i,r,o[s]);return i.length=r,i}});var Wg=Bc("Array").slice,Yg=se,Xg=Wg,qg=Array.prototype,Zg=function(e){var t=e.slice;return e===qg||Yg(qg,e)&&t===qg.slice?Xg:t},$g=n(Zg);function Jg(){Jg=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,i=Ac||function(e,t,n){e[t]=n.value},r="function"==typeof tc?tc:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function l(e,t,n){return Ac(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(S){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof f?t:f,a=Oc(o.prototype),s=new C(r||[]);return i(a,"_invoke",{value:b(e,n,s)}),a}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(S){return{type:"throw",arg:S}}}e.wrap=u;var h={};function f(){}function d(){}function p(){}var v={};l(v,o,(function(){return this}));var g=Dc&&Dc(Dc(x([])));g&&g!==t&&n.call(g,o)&&(v=g);var y=p.prototype=f.prototype=Oc(v);function m(e){var t;qc(t=["next","throw","return"]).call(t,(function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function r(i,o,a,s){var l=c(e[i],e,o);if("throw"!==l.type){var u=l.arg,h=u.value;return h&&"object"==bc(h)&&n.call(h,"__await")?t.resolve(h.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(h).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return o=o?o.then(i,i):i()}})}function b(e,t,n){var i="suspendedStart";return function(r,o){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===r)throw o;return{value:void 0,done:!0}}for(n.method=r,n.arg=o;;){var a=n.delegate;if(a){var s=k(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var l=c(e,t,n);if("normal"===l.type){if(i=n.done?"completed":"suspendedYield",l.arg===h)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i="completed",n.method="throw",n.arg=l.arg)}}}function k(e,t){var n=t.method,i=e.iterator[n];if(void 0===i)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var r=c(i,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,h;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function w(e){var t,n={tryLoc:e[0]};1 in e&&(n.catchLoc=e[1]),2 in e&&(n.finallyLoc=e[2],n.afterLoc=e[3]),uh(t=this.tryEntries).call(t,n)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],qc(e).call(e,w,this),this.reset(!0)}function x(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,r=function t(){for(;++i<e.length;)if(n.call(e,i))return t.value=e[i],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:T}}function T(){return{value:void 0,done:!0}}return d.prototype=p,i(y,"constructor",{value:p,configurable:!0}),i(p,"constructor",{value:d,configurable:!0}),d.displayName=l(p,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return hh?hh(e,p):(e.__proto__=p,l(e,s,"GeneratorFunction")),e.prototype=Oc(y),e},e.awrap=function(e){return{__await:e}},m(_.prototype),l(_.prototype,a,(function(){return this})),e.AsyncIterator=_,e.async=function(t,n,i,r,o){void 0===o&&(o=wg);var a=new _(u(t,n,i,r),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},m(y),l(y,s,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var i in t)uh(n).call(n,i);return Ig(n).call(n),function e(){for(;n.length;){var i=n.pop();if(i in t)return e.value=i,e.done=!1,e}return e.done=!0,e}},e.values=x,C.prototype={constructor:C,reset:function(e){var t;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,qc(t=this.tryEntries).call(t,E),!e)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+$g(i).call(i,1))&&(this[i]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function i(n,i){return a.type="throw",a.arg=e,t.next=n,i&&(t.method="next",t.arg=void 0),!!i}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var r=i.arg;E(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:x(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},e}var Qg=qe,ey=pr;Pn({target:"Object",stat:!0,forced:o((function(){ey(1)}))},{keys:function(e){return ey(Qg(e))}});var ty=te.Object.keys,ny=n(ty),iy=te.Object.getOwnPropertySymbols,ry=n(iy),oy=ea.filter;Pn({target:"Array",proto:!0,forced:!Oi("filter")},{filter:function(e){return oy(this,e,arguments.length>1?arguments[1]:void 0)}});var ay=Bc("Array").filter,sy=se,ly=ay,uy=Array.prototype,cy=function(e){var t=e.filter;return e===uy||sy(uy,e)&&t===uy.filter?ly:t},hy=n(cy),fy={exports:{}},dy=Pn,py=o,vy=$,gy=A.f,yy=P;dy({target:"Object",stat:!0,forced:!yy||py((function(){gy(1)})),sham:!yy},{getOwnPropertyDescriptor:function(e,t){return gy(vy(e),t)}});var my=te.Object,_y=fy.exports=function(e,t){return my.getOwnPropertyDescriptor(e,t)};my.getOwnPropertyDescriptor.sham&&(_y.sham=!0);var by=fy.exports,ky=n(by),wy=yh,Ey=$,Cy=A,xy=Wn;Pn({target:"Object",stat:!0,sham:!P},{getOwnPropertyDescriptors:function(e){for(var t,n,i=Ey(e),r=Cy.f,o=wy(i),a={},s=0;o.length>s;)void 0!==(n=r(i,t=o[s++]))&&xy(a,t,n);return a}});var Ty=te.Object.getOwnPropertyDescriptors,Sy=n(Ty),Ay={exports:{}},Py=Pn,Oy=P,Iy=Xi.f;Py({target:"Object",stat:!0,forced:Object.defineProperties!==Iy,sham:!Oy},{defineProperties:Iy});var Ry=te.Object,My=Ay.exports=function(e,t){return Ry.defineProperties(e,t)};Ry.defineProperties.sham&&(My.sham=!0);var Ly=Ay.exports,Dy=n(Ly),Ny=ao.f("toPrimitive"),Fy=n(Ny);function Hy(e){var t=function(e,t){if("object"!==bc(e)||null===e)return e;var n=e[Fy];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==bc(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===bc(t)?t:String(t)}function Uy(e,t,n){return(t=Hy(t))in e?Ac(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jy(e,t){var n=ny(e);if(ry){var i=ry(e);t&&(i=hy(i).call(i,(function(t){return ky(e,t).enumerable}))),uh(n).apply(n,i)}return n}function By(e){for(var t=1;t<arguments.length;t++){var n,i,r=null!=arguments[t]?arguments[t]:{};t%2?qc(n=jy(Object(r),!0)).call(n,(function(t){Uy(e,t,r[t])})):Sy?Dy(e,Sy(r)):qc(i=jy(Object(r))).call(i,(function(t){Ac(e,t,ky(r,t))}))}return e}function Vy(e,t,n,i,r,o,a){try{var s=e[o](a),l=s.value}catch(xR){return void n(xR)}s.done?t(l):wg.resolve(l).then(i,r)}function Gy(e){return function(){var t=this,n=arguments;return new wg((function(i,r){var o=e.apply(t,n);function a(e){Vy(o,i,r,a,s,"next",e)}function s(e){Vy(o,i,r,a,s,"throw",e)}a(void 0)}))}}var zy=function(e){return e.H265="h265",e.H264="h264",e}(zy||{}),Ky=function(e){return e.Software="software",e.Hardware="hardware",e}(Ky||{});Pn({target:"Array",stat:!0},{isArray:In});var Wy=n(te.Array.isArray);function Yy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var Xy=zh,qy=n(Xy),Zy=nn,$y=tf,Jy=Zt,Qy=R,em=qe,tm=function(e,t,n,i){try{return i?t(Zy(n)[0],n[1]):t(n)}catch(xR){$y(e,"throw",xR)}},nm=Hh,im=_i,rm=jn,om=Wn,am=$h,sm=zh,lm=Array,um=function(e){var t=em(e),n=im(this),i=arguments.length,r=i>1?arguments[1]:void 0,o=void 0!==r;o&&(r=Jy(r,i>2?arguments[2]:void 0));var a,s,l,u,c,h,f=sm(t),d=0;if(!f||this===lm&&nm(f))for(a=rm(t),s=n?new this(a):lm(a);a>d;d++)h=o?r(t[d],d):t[d],om(s,d,h);else for(c=(u=am(t,f)).next,s=n?new this:[];!(l=Qy(c,u)).done;d++)h=o?tm(u,r,[l.value,d],!0):l.value,om(s,d,h);return s.length=d,s};Pn({target:"Array",stat:!0,forced:!xv((function(e){Array.from(e)}))},{from:um});var cm=te.Array.from,hm=n(cm);function fm(e,t){var n;if(e){if("string"==typeof e)return Yy(e,t);var i=$g(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?hm(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Yy(e,t):void 0}}function dm(e){return function(e){if(Wy(e))return Yy(e)}(e)||function(e){if(void 0!==tc&&null!=qy(e)||null!=e["@@iterator"])return hm(e)}(e)||fm(e)||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 pm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vm(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Ac(e,Hy(i.key),i)}}function gm(e,t,n){return t&&vm(e.prototype,t),n&&vm(e,n),Ac(e,"prototype",{writable:!1}),e}var ym=Pn,mm=ir.indexOf,_m=Fc,bm=E([].indexOf),km=!!bm&&1/bm([1],1,-0)<0;ym({target:"Array",proto:!0,forced:km||!_m("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return km?bm(this,e,t)||0:mm(this,e,t)}});var wm=Bc("Array").indexOf,Em=se,Cm=wm,xm=Array.prototype,Tm=function(e){var t=e.indexOf;return e===xm||Em(xm,e)&&t===xm.indexOf?Cm:t},Sm=n(Tm);function Am(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},o=ny(e);for(i=0;i<o.length;i++)n=o[i],Sm(t).call(t,n)>=0||(r[n]=e[n]);return r}(e,t);if(ry){var o=ry(e);for(i=0;i<o.length;i++)n=o[i],Sm(t).call(t,n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Pm=Bc("Array").concat,Om=se,Im=Pm,Rm=Array.prototype,Mm=n((function(e){var t=e.concat;return e===Rm||Om(Rm,e)&&t===Rm.concat?Im:t})),Lm=Pn,Dm=ea.find,Nm="find",Fm=!0;Nm in[]&&Array(1)[Nm]((function(){Fm=!1})),Lm({target:"Array",proto:!0,forced:Fm},{find:function(e){return Dm(this,e,arguments.length>1?arguments[1]:void 0)}});var Hm=Bc("Array").find,Um=se,jm=Hm,Bm=Array.prototype,Vm=n((function(e){var t=e.find;return e===Bm||Um(Bm,e)&&t===Bm.find?jm:t})),Gm={exports:{}},zm=o((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),Km=o,Wm=ee,Ym=b,Xm=zm,qm=Object.isExtensible,Zm=Km((function(){qm(1)}))||Xm?function(e){return!!Wm(e)&&((!Xm||"ArrayBuffer"!=Ym(e))&&(!qm||qm(e)))}:qm,$m=!o((function(){return Object.isExtensible(Object.preventExtensions({}))})),Jm=Pn,Qm=g,e_=rr,t_=ee,n_=Je,i_=$t.f,r_=jr,o_=Gr,a_=Zm,s_=$m,l_=!1,u_=it("meta"),c_=0,h_=function(e){i_(e,u_,{value:{objectID:"O"+c_++,weakData:{}}})},f_=Gm.exports={enable:function(){f_.enable=function(){},l_=!0;var e=r_.f,t=Qm([].splice),n={};n[u_]=1,e(n).length&&(r_.f=function(n){for(var i=e(n),r=0,o=i.length;r<o;r++)if(i[r]===u_){t(i,r,1);break}return i},Jm({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:o_.f}))},fastKey:function(e,t){if(!t_(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!n_(e,u_)){if(!a_(e))return"F";if(!t)return"E";h_(e)}return e[u_].objectID},getWeakData:function(e,t){if(!n_(e,u_)){if(!a_(e))return!0;if(!t)return!1;h_(e)}return e[u_].weakData},onFreeze:function(e){return s_&&l_&&a_(e)&&!n_(e,u_)&&h_(e),e}};e_[u_]=!0;var d_=Gm.exports,p_=Pn,v_=r,g_=d_,y_=o,m_=yn,__=gf,b_=Yf,k_=S,w_=ee,E_=Oo,C_=$t.f,x_=ea.forEach,T_=P,S_=Wo.set,A_=Wo.getterFor,P_=io,O_=Ur,I_=oo,R_=function(e,t,n){for(var i in t)n&&n.unsafe&&e[i]?e[i]=t[i]:P_(e,i,t[i],n);return e},M_=Zt,L_=Yf,D_=K,N_=gf,F_=du,H_=pu,U_=zf,j_=P,B_=d_.fastKey,V_=Wo.set,G_=Wo.getterFor,z_={getConstructor:function(e,t,n,i){var r=e((function(e,r){L_(e,o),V_(e,{type:t,index:O_(null),first:void 0,last:void 0,size:0}),j_||(e.size=0),D_(r)||N_(r,e[i],{that:e,AS_ENTRIES:n})})),o=r.prototype,a=G_(t),s=function(e,t,n){var i,r,o=a(e),s=l(e,t);return s?s.value=n:(o.last=s={index:r=B_(t,!0),key:t,value:n,previous:i=o.last,next:void 0,removed:!1},o.first||(o.first=s),i&&(i.next=s),j_?o.size++:e.size++,"F"!==r&&(o.index[r]=s)),e},l=function(e,t){var n,i=a(e),r=B_(t);if("F"!==r)return i.index[r];for(n=i.first;n;n=n.next)if(n.key==t)return n};return R_(o,{clear:function(){for(var e=a(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,j_?e.size=0:this.size=0},delete:function(e){var t=this,n=a(t),i=l(t,e);if(i){var r=i.next,o=i.previous;delete n.index[i.index],i.removed=!0,o&&(o.next=r),r&&(r.previous=o),n.first==i&&(n.first=r),n.last==i&&(n.last=o),j_?n.size--:t.size--}return!!i},forEach:function(e){for(var t,n=a(this),i=M_(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(i(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!l(this,e)}}),R_(o,n?{get:function(e){var t=l(this,e);return t&&t.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),j_&&I_(o,"size",{configurable:!0,get:function(){return a(this).size}}),r},setStrong:function(e,t,n){var i=t+" Iterator",r=G_(t),o=G_(i);F_(e,t,(function(e,t){V_(this,{type:i,target:e,state:r(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?H_("keys"==t?n.key:"values"==t?n.value:[n.key,n.value],!1):(e.target=void 0,H_(void 0,!0))}),n?"entries":"values",!n,!0),U_(t)}};(function(e,t,n){var i,r=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),a=r?"set":"add",s=v_[e],l=s&&s.prototype,u={};if(T_&&k_(s)&&(o||l.forEach&&!y_((function(){(new s).entries().next()})))){var c=(i=t((function(t,n){S_(b_(t,c),{type:e,collection:new s}),null!=n&&__(n,t[a],{that:t,AS_ENTRIES:r})}))).prototype,h=A_(e);x_(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in l)||o&&"clear"==e||m_(c,e,(function(n,i){var r=h(this).collection;if(!t&&o&&!w_(n))return"get"==e&&void 0;var a=r[e](0===n?0:n,i);return t?this:a}))})),o||C_(c,"size",{configurable:!0,get:function(){return h(this).collection.size}})}else i=n.getConstructor(t,e,r,a),g_.enable();E_(i,e,!1,!0),u[e]=i,p_({global:!0,forced:!0},u),o||n.setStrong(i,e,r)})("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),z_);var K_=te.Map,W_=Zt,Y_=R,X_=Ie,q_=$f,Z_=K,$_=gf,J_=[].push,Q_=function(e){var t,n,i,r,o=arguments.length,a=o>1?arguments[1]:void 0;return q_(this),(t=void 0!==a)&&X_(a),Z_(e)?new this:(n=[],t?(i=0,r=W_(a,o>2?arguments[2]:void 0),$_(e,(function(e){Y_(J_,n,r(e,i++))}))):$_(e,J_,{that:n}),new this(n))};Pn({target:"Map",stat:!0,forced:!0},{from:Q_});var eb=Cs,tb=function(){return new this(eb(arguments))};Pn({target:"Map",stat:!0,forced:!0},{of:tb});var nb=Se,ib=function(e){if("object"==typeof e&&"size"in e&&"has"in e&&"get"in e&&"set"in e&&"delete"in e&&"entries"in e)return e;throw TypeError(nb(e)+" is not a map")},rb=function(e,t){return 1==t?function(t,n){return t[e](n)}:function(t,n,i){return t[e](n,i)}},ob=ae("Map"),ab={Map:ob,set:rb("set",2),get:rb("get",1),has:rb("has",1),remove:rb("delete",1),proto:ob.prototype},sb=ib,lb=ab.remove;Pn({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=sb(this),n=!0,i=0,r=arguments.length;i<r;i++)e=lb(t,arguments[i]),n=n&&e;return!!n}});var ub=ib,cb=ab.get,hb=ab.has,fb=ab.set;Pn({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var n,i,r=ub(this);return hb(r,e)?(n=cb(r,e),"update"in t&&(n=t.update(n,e,r),fb(r,e,n)),n):(i=t.insert(e,r),fb(r,e,i),i)}});var db=R,pb=function(e,t,n){for(var i,r,o=n||e.next;!(i=db(o,e)).done;)if(void 0!==(r=t(i.value)))return r},vb=function(e,t,n){return n?pb(e.entries(),(function(e){return t(e[1],e[0])})):e.forEach(t)},gb=Zt,yb=ib,mb=vb;Pn({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=yb(this),n=gb(e,arguments.length>1?arguments[1]:void 0);return!1!==mb(t,(function(e,i){if(!n(e,i,t))return!1}),!0)}});var _b=Zt,bb=ib,kb=vb,wb=ab.Map,Eb=ab.set;Pn({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=bb(this),n=_b(e,arguments.length>1?arguments[1]:void 0),i=new wb;return kb(t,(function(e,r){n(e,r,t)&&Eb(i,r,e)})),i}});var Cb=Zt,xb=ib,Tb=vb;Pn({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=xb(this),n=Cb(e,arguments.length>1?arguments[1]:void 0),i=Tb(t,(function(e,i){if(n(e,i,t))return{value:e}}),!0);return i&&i.value}});var Sb=Zt,Ab=ib,Pb=vb;Pn({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=Ab(this),n=Sb(e,arguments.length>1?arguments[1]:void 0),i=Pb(t,(function(e,i){if(n(e,i,t))return{key:i}}),!0);return i&&i.key}});var Ob=Pn,Ib=R,Rb=S,Mb=Ie,Lb=gf,Db=ab.Map,Nb=g([].push);Ob({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){var n=new(Rb(this)?this:Db);Mb(t);var i=Mb(n.has),r=Mb(n.get),o=Mb(n.set);return Lb(e,(function(e){var a=t(e);Ib(i,n,a)?Nb(Ib(r,n,a),e):Ib(o,n,a,[e])})),n}});var Fb=function(e,t){return e===t||e!=e&&t!=t},Hb=ib,Ub=vb;Pn({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===Ub(Hb(this),(function(t){if(Fb(t,e))return!0}),!0)}});var jb=R,Bb=gf,Vb=S,Gb=Ie,zb=ab.Map;Pn({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var n=new(Vb(this)?this:zb);Gb(t);var i=Gb(n.set);return Bb(e,(function(e){jb(i,n,t(e),e)})),n}});var Kb=ib,Wb=vb;Pn({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=Wb(Kb(this),(function(t,n){if(t===e)return{key:n}}),!0);return t&&t.key}});var Yb=Zt,Xb=ib,qb=vb,Zb=ab.Map,$b=ab.set;Pn({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=Xb(this),n=Yb(e,arguments.length>1?arguments[1]:void 0),i=new Zb;return qb(t,(function(e,r){$b(i,n(e,r,t),e)})),i}});var Jb=Zt,Qb=ib,ek=vb,tk=ab.Map,nk=ab.set;Pn({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=Qb(this),n=Jb(e,arguments.length>1?arguments[1]:void 0),i=new tk;return ek(t,(function(e,r){nk(i,r,n(e,r,t))})),i}});var ik=ib,rk=gf,ok=ab.set;Pn({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=ik(this),n=arguments.length,i=0;i<n;)rk(arguments[i++],(function(e,n){ok(t,e,n)}),{AS_ENTRIES:!0});return t}});var ak=Ie,sk=ib,lk=vb,uk=TypeError;Pn({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=sk(this),n=arguments.length<2,i=n?void 0:arguments[1];if(ak(e),lk(t,(function(r,o){n?(n=!1,i=r):i=e(i,r,o,t)})),n)throw uk("Reduce of empty map with no initial value");return i}});var ck=Zt,hk=ib,fk=vb;Pn({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=hk(this),n=ck(e,arguments.length>1?arguments[1]:void 0);return!0===fk(t,(function(e,i){if(n(e,i,t))return!0}),!0)}});var dk=Ie,pk=ib,vk=TypeError,gk=ab.get,yk=ab.has,mk=ab.set;Pn({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var n=pk(this),i=arguments.length;dk(t);var r=yk(n,e);if(!r&&i<3)throw vk("Updating absent value");var o=r?gk(n,e):dk(i>2?arguments[2]:void 0)(e,n);return mk(n,e,t(o,e,n)),n}});var _k=R,bk=Ie,kk=S,wk=nn,Ek=TypeError,Ck=function(e,t){var n,i=wk(this),r=bk(i.get),o=bk(i.has),a=bk(i.set),s=arguments.length>2?arguments[2]:void 0;if(!kk(t)&&!kk(s))throw Ek("At least one callback required");return _k(o,i,e)?(n=_k(r,i,e),kk(t)&&(n=t(n),_k(a,i,e,n))):kk(s)&&(n=s(),_k(a,i,e,n)),n};Pn({target:"Map",proto:!0,real:!0,forced:!0},{upsert:Ck}),Pn({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:Ck});var xk=K_,Tk=n(xk),Sk=n(xk),Ak=ea.map;Pn({target:"Array",proto:!0,forced:!Oi("map")},{map:function(e){return Ak(this,e,arguments.length>1?arguments[1]:void 0)}});var Pk=Bc("Array").map,Ok=se,Ik=Pk,Rk=Array.prototype,Mk=n((function(e){var t=e.map;return e===Rk||Ok(Rk,e)&&t===Rk.map?Ik:t})),Lk=n(kg),Dk=n(cy),Nk=ir.includes;Pn({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(e){return Nk(this,e,arguments.length>1?arguments[1]:void 0)}});var Fk=Bc("Array").includes,Hk=ee,Uk=b,jk=ft("match"),Bk=function(e){var t;return Hk(e)&&(void 0!==(t=e[jk])?!!t:"RegExp"==Uk(e))},Vk=TypeError,Gk=ft("match"),zk=Pn,Kk=function(e){if(Bk(e))throw Vk("The method doesn't accept regular expressions");return e},Wk=X,Yk=Yi,Xk=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[Gk]=!1,"/./"[e](t)}catch(xR){}}return!1},qk=g("".indexOf);zk({target:"String",proto:!0,forced:!Xk("includes")},{includes:function(e){return!!~qk(Yk(Wk(this)),Yk(Kk(e)),arguments.length>1?arguments[1]:void 0)}});var Zk=Bc("String").includes,$k=se,Jk=Fk,Qk=Zk,ew=Array.prototype,tw=String.prototype,nw=n((function(e){var t=e.includes;return e===ew||$k(ew,e)&&t===ew.includes?Jk:"string"==typeof e||e===tw||$k(tw,e)&&t===tw.includes?Qk:t})),iw=n(Tm),rw=n(ty),ow=n(Zg),aw=Se,sw=TypeError,lw=function(e,t){if(!delete e[t])throw sw("Cannot delete property "+aw(t)+" of "+aw(e))},uw=Pn,cw=qe,hw=Ji,fw=Dn,dw=jn,pw=eh,vw=Vn,gw=Ti,yw=Wn,mw=lw,_w=Oi("splice"),bw=Math.max,kw=Math.min;uw({target:"Array",proto:!0,forced:!_w},{splice:function(e,t){var n,i,r,o,a,s,l=cw(this),u=dw(l),c=hw(e,u),h=arguments.length;for(0===h?n=i=0:1===h?(n=0,i=u-c):(n=h-2,i=kw(bw(fw(t),0),u-c)),vw(u+n-i),r=gw(l,i),o=0;o<i;o++)(a=c+o)in l&&yw(r,o,l[a]);if(r.length=i,n<i){for(o=c;o<u-i;o++)s=o+n,(a=o+i)in l?l[s]=l[a]:mw(l,s);for(o=u;o>u-i+n;o--)mw(l,o-1)}else if(n>i)for(o=u-i;o>c;o--)s=o+n-1,(a=o+i-1)in l?l[s]=l[a]:mw(l,s);for(o=0;o<n;o++)l[o+c]=arguments[o+2];return pw(l,u-i+n),r}});var ww=Bc("Array").splice,Ew=se,Cw=ww,xw=Array.prototype,Tw=n((function(e){var t=e.splice;return e===xw||Ew(xw,e)&&t===xw.splice?Cw:t}));Pn({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var Sw=n(te.Number.isNaN),Aw="\t\n\v\f\r \u2028\u2029\ufeff",Pw=X,Ow=Yi,Iw=Aw,Rw=g("".replace),Mw=RegExp("^["+Iw+"]+"),Lw=RegExp("(^|[^"+Iw+"])["+Iw+"]+$"),Dw=function(e){return function(t){var n=Ow(Pw(t));return 1&e&&(n=Rw(n,Mw,"")),2&e&&(n=Rw(n,Lw,"$1")),n}},Nw={start:Dw(1),end:Dw(2),trim:Dw(3)},Fw=r,Hw=o,Uw=g,jw=Yi,Bw=Nw.trim,Vw=Aw,Gw=Fw.parseInt,zw=Fw.Symbol,Kw=zw&&zw.iterator,Ww=/^[+-]?0x/i,Yw=Uw(Ww.exec),Xw=8!==Gw(Vw+"08")||22!==Gw(Vw+"0x16")||Kw&&!Hw((function(){Gw(Object(Kw))}))?function(e,t){var n=Bw(jw(e));return Gw(n,t>>>0||(Yw(Ww,n)?16:10))}:Gw;Pn({global:!0,forced:parseInt!=Xw},{parseInt:Xw});var qw=n(te.parseInt),Zw=Bc("Array").keys,$w=ti,Jw=Je,Qw=se,eE=Zw,tE=Array.prototype,nE={DOMTokenList:!0,NodeList:!0},iE=n((function(e){var t=e.keys;return e===tE||Qw(tE,e)&&t===tE.keys||Jw(nE,$w(e))?eE:t})),rE=n(iy),oE=n(by),aE=n(Ty),sE=n(Ly),lE=n(Sc),uE=n(ec),cE=n(mc),hE=n(ch),fE=n(Lc),dE=g,pE=Ie,vE=ee,gE=Je,yE=Cs,mE=a,_E=Function,bE=dE([].concat),kE=dE([].join),wE={},EE=mE?_E.bind:function(e){var t=pE(this),n=t.prototype,i=yE(arguments,1),r=function(){var n=bE(i,yE(arguments));return this instanceof r?function(e,t,n){if(!gE(wE,t)){for(var i=[],r=0;r<t;r++)i[r]="a["+r+"]";wE[t]=_E("C,a","return new C("+kE(i,",")+")")}return wE[t](e,n)}(t,n.length,n):t.apply(e,n)};return vE(n)&&(r.prototype=n),r},CE=Pn,xE=h,TE=EE,SE=$f,AE=nn,PE=ee,OE=Ur,IE=o,RE=ae("Reflect","construct"),ME=Object.prototype,LE=[].push,DE=IE((function(){function e(){}return!(RE((function(){}),[],e)instanceof e)})),NE=!IE((function(){RE((function(){}))})),FE=DE||NE;CE({target:"Reflect",stat:!0,forced:FE,sham:FE},{construct:function(e,t){SE(e),AE(t);var n=arguments.length<3?e:SE(arguments[2]);if(NE&&!DE)return RE(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var i=[null];return xE(LE,i,t),new(xE(TE,e,i))}var r=n.prototype,o=OE(PE(r)?r:ME),a=xE(e,o,t);return PE(a)?a:o}});var HE=te.Reflect.construct,UE=n(HE),jE=n(HE),BE=Je,VE=R,GE=ee,zE=nn,KE=function(e){return void 0!==e&&(BE(e,"value")||BE(e,"writable"))},WE=A,YE=xl;Pn({target:"Reflect",stat:!0},{get:function e(t,n){var i,r,o=arguments.length<3?t:arguments[2];return zE(t)===o?t[n]:(i=WE.f(t,n))?KE(i)?i.value:void 0===i.get?void 0:VE(i.get,o):GE(r=YE(t))?e(r,n,o):void 0}});var XE=te.Reflect.get,qE=n(XE),ZE=n(XE),$E=n(Xy),JE=n(cm),QE=n(Ny);function eC(e,t){var n=rw(e);if(rE){var i=rE(e);t&&(i=Dk(i).call(i,(function(t){return oE(e,t).enumerable}))),n.push.apply(n,i)}return n}function tC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eC(Object(n),!0).forEach((function(t){aC(e,t,n[t])})):aE?sE(e,aE(n)):eC(Object(n)).forEach((function(t){lE(e,t,oE(n,t))}))}return e}function nC(e){return(nC="function"==typeof uE&&"symbol"==typeof cE?function(e){return typeof e}:function(e){return e&&"function"==typeof uE&&e.constructor===uE&&e!==uE.prototype?"symbol":typeof e})(e)}function iC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rC(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),lE(e,gC(i.key),i)}}function oC(e,t,n){return t&&rC(e.prototype,t),n&&rC(e,n),lE(e,"prototype",{writable:!1}),e}function aC(e,t,n){return(t=gC(t))in e?lE(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sC(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),lE(e,"prototype",{writable:!1}),t&&uC(e,t)}function lC(e){return(lC=hE?fE.bind():function(e){return e.__proto__||fE(e)})(e)}function uC(e,t){return(uC=hE?hE.bind():function(e,t){return e.__proto__=t,e})(e,t)}function cC(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hC(e,t){if(t&&("object"===bc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return cC(e)}function fC(e){var t=function(){if("undefined"==typeof Reflect||!jE)return!1;if(jE.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(jE(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=lC(e);if(t){var r=lC(this).constructor;n=jE(i,arguments,r)}else n=i.apply(this,arguments);return hC(this,n)}}function dC(){return dC="undefined"!=typeof Reflect&&ZE?ZE.bind():function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=lC(e)););return e}(e,t);if(i){var r=oE(i,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},dC.apply(this,arguments)}function pC(e){return function(e){if(Array.isArray(e))return vC(e)}(e)||function(e){if(void 0!==uE&&null!=$E(e)||null!=e["@@iterator"])return JE(e)}(e)||function(e,t){var n;if(!e)return;if("string"==typeof e)return vC(e,t);var i=ow(n=Object.prototype.toString.call(e)).call(n,8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return JE(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return vC(e,t)}(e)||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 vC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function gC(e){var t=function(e,t){if("object"!==bc(e)||null===e)return e;var n=e[QE];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==bc(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===bc(t)?t:String(t)}var yC=P,mC=g,_C=R,bC=o,kC=pr,wC=to,EC=M,CC=qe,xC=z,TC=Object.assign,SC=Object.defineProperty,AC=mC([].concat),PC=!TC||bC((function(){if(yC&&1!==TC({b:1},TC(SC({},"a",{enumerable:!0,get:function(){SC(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach((function(e){t[e]=e})),7!=TC({},e)[n]||kC(TC({},t)).join("")!=i}))?function(e,t){for(var n=CC(e),i=arguments.length,r=1,o=wC.f,a=EC.f;i>r;)for(var s,l=xC(arguments[r++]),u=o?AC(kC(l),o(l)):kC(l),c=u.length,h=0;c>h;)s=u[h++],yC&&!_C(a,l,s)||(n[s]=l[s]);return n}:TC,OC=PC;Pn({target:"Object",stat:!0,arity:2,forced:Object.assign!==OC},{assign:OC});var IC=n(te.Object.assign),RC={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function i(){}function r(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,i,o,a){if("function"!=typeof i)throw new TypeError("The listener must be a function");var s=new r(i,o||e,a),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new i:delete e._events[t]}function s(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,i,r=[];if(0===this._eventsCount)return r;for(i in e=this._events)t.call(e,i)&&r.push(n?ow(i).call(i,1):i);return rE?Mm(r).call(r,rE(e)):r},s.prototype.listeners=function(e){var t=n?n+e:e,i=this._events[t];if(!i)return[];if(i.fn)return[i.fn];for(var r=0,o=i.length,a=new Array(o);r<o;r++)a[r]=i[r].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,i=this._events[t];return i?i.fn?1:i.length:0},s.prototype.emit=function(e,t,i,r,o,a){var s=n?n+e:e;if(!this._events[s])return!1;var l,u,c=this._events[s],h=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),h){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,i),!0;case 4:return c.fn.call(c.context,t,i,r),!0;case 5:return c.fn.call(c.context,t,i,r,o),!0;case 6:return c.fn.call(c.context,t,i,r,o,a),!0}for(u=1,l=new Array(h-1);u<h;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var f,d=c.length;for(u=0;u<d;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),h){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,i);break;case 4:c[u].fn.call(c[u].context,t,i,r);break;default:if(!l)for(f=1,l=new Array(h-1);f<h;f++)l[f-1]=arguments[f];c[u].fn.apply(c[u].context,l)}}return!0},s.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,i,r){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==t||r&&!s.once||i&&s.context!==i||a(this,o);else{for(var l=0,u=[],c=s.length;l<c;l++)(s[l].fn!==t||r&&!s[l].once||i&&s[l].context!==i)&&u.push(s[l]);u.length?this._events[o]=1===u.length?u[0]:u:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new i,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}(RC);var MC=n(RC.exports),LC=Dn,DC=Yi,NC=X,FC=RangeError,HC=g,UC=Hn,jC=Yi,BC=X,VC=HC((function(e){var t=DC(NC(this)),n="",i=LC(e);if(i<0||i==1/0)throw FC("Wrong number of repetitions");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(n+=t);return n})),GC=HC("".slice),zC=Math.ceil,KC=function(e){return function(t,n,i){var r,o,a=jC(BC(t)),s=UC(n),l=a.length,u=void 0===i?" ":jC(i);return s<=l||""==u?a:((o=VC(u,zC((r=s-l)/u.length))).length>r&&(o=GC(o,0,r)),e?a+o:o+a)}},WC={start:KC(!1),end:KC(!0)},YC=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(le),XC=WC.start;Pn({target:"String",proto:!0,forced:YC},{padStart:function(e){return XC(this,e,arguments.length>1?arguments[1]:void 0)}});var qC=Bc("String").padStart,ZC=se,$C=qC,JC=String.prototype,QC=n((function(e){var t=e.padStart;return"string"==typeof e||e===JC||ZC(JC,e)&&t===JC.padStart?$C:t})),ex=r,tx=o,nx=Yi,ix=Nw.trim,rx=Aw,ox=g("".charAt),ax=ex.parseFloat,sx=ex.Symbol,lx=sx&&sx.iterator,ux=1/ax(rx+"-0")!=-1/0||lx&&!tx((function(){ax(Object(lx))}))?function(e){var t=ix(nx(e)),n=ax(t);return 0===n&&"-"==ox(t,0)?-0:n}:ax;Pn({global:!0,forced:parseFloat!=ux},{parseFloat:ux});var cx=n(te.parseFloat),hx=gl.PROPER,fx=o,dx=Aw,px=Nw.trim;Pn({target:"String",proto:!0,forced:function(e){return fx((function(){return!!dx[e]()||"
"!=="
"[e]()||hx&&dx[e].name!==e}))}("trim")},{trim:function(){return px(this)}});var vx=Bc("String").trim,gx=se,yx=vx,mx=String.prototype,_x=n((function(e){var t=e.trim;return"string"==typeof e||e===mx||gx(mx,e)&&t===mx.trim?yx:t})),bx=qr,kx=Math.floor,wx=function(e,t){var n=e.length,i=kx(n/2);return n<8?Ex(e,t):Cx(e,wx(bx(e,0,i),t),wx(bx(e,i),t),t)},Ex=function(e,t){for(var n,i,r=e.length,o=1;o<r;){for(i=o,n=e[o];i&&t(e[i-1],n)>0;)e[i]=e[--i];i!==o++&&(e[i]=n)}return e},Cx=function(e,t,n,i){for(var r=t.length,o=n.length,a=0,s=0;a<r||s<o;)e[a+s]=a<r&&s<o?i(t[a],n[s])<=0?t[a++]:n[s++]:a<r?t[a++]:n[s++];return e},xx=wx,Tx=le.match(/firefox\/(\d+)/i),Sx=!!Tx&&+Tx[1],Ax=/MSIE|Trident/.test(le),Px=le.match(/AppleWebKit\/(\d+)\./),Ox=!!Px&&+Px[1],Ix=Pn,Rx=g,Mx=Ie,Lx=qe,Dx=jn,Nx=lw,Fx=Yi,Hx=o,Ux=xx,jx=Fc,Bx=Sx,Vx=Ax,Gx=ve,zx=Ox,Kx=[],Wx=Rx(Kx.sort),Yx=Rx(Kx.push),Xx=Hx((function(){Kx.sort(void 0)})),qx=Hx((function(){Kx.sort(null)})),Zx=jx("sort"),$x=!Hx((function(){if(Gx)return Gx<70;if(!(Bx&&Bx>3)){if(Vx)return!0;if(zx)return zx<603;var e,t,n,i,r="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(i=0;i<47;i++)Kx.push({k:t+i,v:n})}for(Kx.sort((function(e,t){return t.v-e.v})),i=0;i<Kx.length;i++)t=Kx[i].k.charAt(0),r.charAt(r.length-1)!==t&&(r+=t);return"DGBEFHACIJK"!==r}}));Ix({target:"Array",proto:!0,forced:Xx||!qx||!Zx||!$x},{sort:function(e){void 0!==e&&Mx(e);var t=Lx(this);if($x)return void 0===e?Wx(t):Wx(t,e);var n,i,r=[],o=Dx(t);for(i=0;i<o;i++)i in t&&Yx(r,t[i]);for(Ux(r,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:Fx(t)>Fx(n)?1:-1}}(e)),n=Dx(r),i=0;i<n;)t[i]=r[i++];for(;i<o;)Nx(t,i++);return t}});var Jx,Qx=Bc("Array").sort,eT=se,tT=Qx,nT=Array.prototype,iT=n((function(e){var t=e.sort;return e===nT||eT(nT,e)&&t===nT.sort?tT:t})),rT="undefined"!=typeof window&&window.location&&iw(Jx=window.location.href).call(Jx,"xgplayerdebugger=1")>-1,oT="color: #525252; background-color: #90ee90;",aT="color: #525252; background-color: red;",sT="color: #525252; background-color: yellow; ",lT="%c[xgplayer]",uT={config:{debug:rT?3:0},logInfo:function(e){for(var t,n,i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];this.config.debug>=3&&(n=console).log.apply(n,Mm(t=[lT,oT,e]).call(t,r))},logWarn:function(e){for(var t,n,i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];this.config.debug>=1&&(n=console).warn.apply(n,Mm(t=[lT,sT,e]).call(t,r))},logError:function(e){var t,n;if(!(this.config.debug<1)){for(var i=this.config.debug>=2?"trace":"error",r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];(n=console)[i].apply(n,Mm(t=[lT,aT,e]).call(t,o))}}};var cT=function(){function e(t){iC(this,e),this.bufferedList=t}return oC(e,[{key:"start",value:function(e){return this.bufferedList[e].start}},{key:"end",value:function(e){return this.bufferedList[e].end}},{key:"length",get:function(){return this.bufferedList.length}}]),e}(),hT={};function fT(e){var t=nC(e);return null!==e&&("object"===t||"function"===t)}function dT(e,t,n){var i,r,o,a,s,l,u=0,c=!1,h=!1,f=!0,d=!t&&0!==t&&"function"==typeof window.requestAnimationFrame;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=i,o=r;return i=r=void 0,u=t,a=e.apply(o,n)}function v(e,t){return d?(window.cancelAnimationFrame(s),window.requestAnimationFrame(e)):setTimeout(e,t)}function g(e){var n=e-l;return void 0===l||n>=t||n<0||h&&e-u>=o}function y(){var e=Date.now();if(g(e))return m(e);s=v(y,function(e){var n=e-u,i=t-(e-l);return h?Math.min(i,o-n):i}(e))}function m(e){return s=void 0,f&&i?p(e):(i=r=void 0,a)}function _(){for(var e=Date.now(),n=g(e),o=arguments.length,f=new Array(o),d=0;d<o;d++)f[d]=arguments[d];if(i=f,r=this,l=e,n){if(void 0===s)return function(e){return u=e,s=v(y,t),c?p(e):a}(l);if(h)return s=v(y,t),p(l)}return void 0===s&&(s=v(y,t)),a}return t=+t||0,fT(n)&&(c=!!n.leading,o=(h="maxWait"in n)?Math.max(+n.maxWait||0,t):o,f="trailing"in n?!!n.trailing:f),_.cancel=function(){void 0!==s&&function(e){if(d)return window.cancelAnimationFrame(e);clearTimeout(e)}(s),u=0,i=l=r=s=void 0},_.flush=function(){return void 0===s?a:m(Date.now())},_.pending=function(){return void 0!==s},_}function pT(){var e=(document.documentElement.getAttribute("lang")||navigator.language||"zh-cn").toLocaleLowerCase();return"zh-cn"===e&&(e="zh"),e}hT.createDom=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=document.createElement(e);return r.className=i,r.innerHTML=t,rw(n).forEach((function(t){var i=t,o=n[t];"video"===e||"audio"===e||"live-video"===e?o&&r.setAttribute(i,o):r.setAttribute(i,o)})),r},hT.createDomFromHtml=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";try{var i=document.createElement("div");i.innerHTML=e;var r=i.children;return i=null,r.length>0?(r=r[0],n&&hT.addClass(r,n),t&&rw(t).forEach((function(e){r.setAttribute(e,t[e])})),r):null}catch(o){return uT.logError("util.createDomFromHtml",o),null}},hT.hasClass=function(e,t){if(!e||!t)return!1;try{return Array.prototype.some.call(e.classList,(function(e){return e===t}))}catch(i){var n=e.className&&"object"===nC(e.className)?e.getAttribute("class"):e.className;return n&&!!n.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}},hT.addClass=function(e,t){if(e&&t)try{t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach((function(t){t&&e.classList.add(t)}))}catch(n){hT.hasClass(e,t)||(e.className&&"object"===nC(e.className)?e.setAttribute("class",e.getAttribute("class")+" "+t):e.className+=" "+t)}},hT.removeClass=function(e,t){if(e&&t)try{t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach((function(t){t&&e.classList.remove(t)}))}catch(n){hT.hasClass(e,t)&&t.split(/\s+/g).forEach((function(t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className&&"object"===nC(e.className)?e.setAttribute("class",e.getAttribute("class").replace(n," ")):e.className=e.className.replace(n," ")}))}},hT.toggleClass=function(e,t){e&&t.split(/\s+/g).forEach((function(t){hT.hasClass(e,t)?hT.removeClass(e,t):hT.addClass(e,t)}))},hT.classNames=function(){for(var e=arguments,t=[],n=function(n){if("String"===hT.typeOf(e[n]))t.push(e[n]);else if("Object"===hT.typeOf(e[n])){var i;Mk(i=rw(e[n])).call(i,(function(i){e[n][i]&&t.push(i)}))}},i=0;i<arguments.length;i++)n(i);return t.join(" ")},hT.findDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1?arguments[1]:void 0;try{e=t.querySelector(n)}catch(i){uT.logError("util.findDom",i),0===iw(n).call(n,"#")&&(e=t.getElementById(ow(n).call(n,1)))}return e},hT.getCss=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,!1)[t]},hT.padStart=function(e,t,n){for(var i=String(n),r=t>>0,o=Math.ceil(r/i.length),a=[],s=String(e);o--;)a.push(i);return a.join("").substring(0,r-s.length)+s},hT.format=function(e){if(window.isNaN(e))return"";e=Math.round(e);var t=QC(hT).call(hT,Math.floor(e/3600),2,0),n=QC(hT).call(hT,Math.floor((e-3600*t)/60),2,0),i=QC(hT).call(hT,Math.floor(e-3600*t-60*n),2,0);return("00"===t?[n,i]:[t,n,i]).join(":")},hT.event=function(e){if(e.touches){var t=e.touches[0]||e.changedTouches[0];e.clientX=t.clientX||0,e.clientY=t.clientY||0,e.offsetX=t.pageX-t.target.offsetLeft,e.offsetY=t.pageY-t.target.offsetTop}e._target=e.target||e.srcElement},hT.typeOf=function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},hT.deepCopy=function(e,t){if("Object"===hT.typeOf(t)&&"Object"===hT.typeOf(e))return rw(t).forEach((function(n){if("Object"!==hT.typeOf(t[n])||t[n]instanceof Node)if("Array"===hT.typeOf(t[n])){var i;e[n]="Array"===hT.typeOf(e[n])?Mm(i=e[n]).call(i,t[n]):t[n]}else e[n]=t[n];else void 0===e[n]||void 0===e[n]?e[n]=t[n]:hT.deepCopy(e[n],t[n])})),e},hT.deepMerge=function(e,t){var n;return Mk(n=rw(t)).call(n,(function(n){var i;"Array"===hT.typeOf(t[n])&&"Array"===hT.typeOf(e[n])?"Array"===hT.typeOf(e[n])&&(i=e[n]).push.apply(i,pC(t[n])):hT.typeOf(e[n])!==hT.typeOf(t[n])||null===e[n]||"Object"!==hT.typeOf(e[n])||t[n]instanceof window.Node?null!==t[n]&&(e[n]=t[n]):hT.deepMerge(e[n],t[n])})),e},hT.getBgImage=function(e){var t=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;if(!t||"none"===t)return"";var n=document.createElement("a");return n.href=t.replace(/url\("|"\)/g,""),n.href},hT.copyDom=function(e){if(e&&1===e.nodeType){var t=document.createElement(e.tagName);return Array.prototype.forEach.call(e.attributes,(function(e){t.setAttribute(e.name,e.value)})),e.innerHTML&&(t.innerHTML=e.innerHTML),t}return""},hT.setInterval=function(e,t,n,i){e._interval[t]||(e._interval[t]=window.setInterval(n.bind(e),i))},hT.clearInterval=function(e,t){clearInterval(e._interval[t]),e._interval[t]=null},hT.setTimeout=function(e,t,n){e._timers||(e._timers=[]);var i=setTimeout((function(){t(),hT.clearTimeout(e,i)}),n);return e._timers.push(i),i},hT.clearTimeout=function(e,t){var n=e._timers;if("Array"===hT.typeOf(n)){for(var i=0;i<n.length;i++)if(n[i]===t){Tw(n).call(n,i,1),clearTimeout(t);break}}else clearTimeout(t)},hT.clearAllTimers=function(e){var t=e._timers;"Array"===hT.typeOf(t)&&(Mk(t).call(t,(function(e){clearTimeout(e)})),e._timerIds=[])},hT.createImgBtn=function(e,t,n,i){var r,o,a,s,l,u,c,h,f,d,p,v=hT.createDom("xg-".concat(e),"",{},"xgplayer-".concat(e,"-img"));(v.style.backgroundImage='url("'.concat(t,'")'),n&&i)&&(["px","rem","em","pt","dp","vw","vh","vm","%"].every((function(e){var t,r;return!(iw(n).call(n,e)>-1&&iw(i).call(i,e)>-1)||(u=cx(_x(t=ow(n).call(n,0,iw(n).call(n,e))).call(t)),c=cx(_x(r=ow(i).call(i,0,iw(i).call(i,e))).call(r)),h=e,!1)})),v.style.width=Mm(r="".concat(u)).call(r,h),v.style.height=Mm(o="".concat(c)).call(o,h),v.style.backgroundSize=Mm(a=Mm(s=Mm(l="".concat(u)).call(l,h," ")).call(s,c)).call(a,h),v.style.margin="start"===e?Mm(f=Mm(d=Mm(p="-".concat(c/2)).call(p,h," auto auto -")).call(d,u/2)).call(f,h):"auto 5px auto 5px");return v},hT.Hex2RGBA=function(e,t){var n,i=[];if(/^\#[0-9A-F]{3}$/i.test(e)){var r="#";e.replace(/[0-9A-F]/gi,(function(e){r+=e+e})),e=r}return/^#[0-9A-F]{6}$/i.test(e)?(e.replace(/[0-9A-F]{2}/gi,(function(e){i.push(qw(e,16))})),Mm(n="rgba(".concat(i.join(","),", ")).call(n,t,")")):"rgba(255, 255, 255, 0.1)"},hT.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},hT.checkIsFunction=function(e){return e&&"function"==typeof e},hT.checkIsObject=function(e){return null!==e&&"object"===nC(e)},hT.hide=function(e){e.style.display="none"},hT.show=function(e,t){e.style.display=t||"block"},hT.isUndefined=function(e){if(null==e)return!0},hT.isNotNull=function(e){return!(null==e)},hT.setStyleFromCsstext=function(e,t){if(t)if("String"===hT.typeOf(t)){var n=t.replace(/\s+/g,"").split(";");Mk(n).call(n,(function(t){if(t){var n=t.split(":");n.length>1&&(e.style[n[0]]=n[1])}}))}else{var i;Mk(i=rw(t)).call(i,(function(n){e.style[n]=t[n]}))}},hT.filterStyleFromText=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["width","height","top","left","bottom","right","position","z-index","padding","margin","transform"],i=e.style.cssText;if(!i)return{};var r=i.replace(/\s+/g,"").split(";"),o={},a={};return Mk(r).call(r,(function(e){if(e){var t=e.split(":");t.length>1&&(!function(e,t){for(var n=0,i=t.length;n<i;n++)if(iw(e).call(e,t[n])>-1)return!0;return!1}(t[0],n)?a[t[0]]=t[1]:o[t[0]]=t[1])}})),e.setAttribute("style",""),Mk(t=rw(a)).call(t,(function(t){e.style[t]=a[t]})),o},hT.getStyleFromCsstext=function(e){var t=e.style.cssText;if(!t)return{};var n=t.replace(/\s+/g,"").split(";"),i={};return Mk(n).call(n,(function(e){if(e){var t=e.split(":");t.length>1&&(i[t[0]]=t[1])}})),i},hT.preloadImg=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(e){var i=new window.Image;i.onload=function(e){i=null,t&&t(e)},i.onerror=function(e){i=null,n&&n(e)},i.src=e}},hT.stopPropagation=function(e){e&&e.stopPropagation()},hT.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},hT.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},hT.checkTouchSupport=function(){return"ontouchstart"in window},hT.getBuffered2=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=[],i=0;i<e.length;i++)n.push({start:e.start(i)<.5?0:e.start(i),end:e.end(i)});iT(n).call(n,(function(e,t){var n=e.start-t.start;return n||t.end-e.end}));var r=[];if(t)for(var o=0;o<n.length;o++){var a=r.length;if(a){var s=r[a-1].end;n[o].start-s<t?n[o].end>s&&(r[a-1].end=n[o].end):r.push(n[o])}else r.push(n[o])}else r=n;return new cT(r)},hT.getEventPos=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.touches&&e.touches.length>0&&(e=e.touches[0]),{x:e.x/t,y:e.y/t,clientX:e.clientX/t,clientY:e.clientY/t,offsetX:e.offsetX/t,offsetY:e.offsetY/t,pageX:e.pageX/t,pageY:e.pageY/t}},hT.requestAnimationFrame=function(e){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(t)return t(e)},hT.getHostFromUrl=function(e){if("String"!==hT.typeOf(e))return"";var t=e.split("/"),n="";return t.length>3&&t[2]&&(n=t[2]),n},hT.cancelAnimationFrame=function(e){var t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;t&&t(e)},hT.isMSE=function(e){return!!(e&&e instanceof HTMLMediaElement)&&(/^blob/.test(e.currentSrc)||/^blob/.test(e.src))},hT.generateSessionId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(new Date).getTime();try{e=qw(e)}catch(n){e=0}return t+=e,window.performance&&"function"==typeof window.performance.now&&(t+=qw(window.performance.now())),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?n:3&n|8).toString(16)}))},hT.createEvent=function(e){var t;return"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},hT.adjustTimeByDuration=function(e,t,n){return t&&e&&(e>t||n&&e<t)?t:e},hT.createPositionBar=function(e,t){var n=hT.createDom("xg-bar","",{"data-index":-1},e);return t.appendChild(n),n},hT.getTransformStyle=function(){var e,t,n,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0,scale:1,rotate:0};return Mm(e=Mm(t=Mm(n="scale(".concat(i.scale||1,") translate(")).call(n,i.x||0,"%, ")).call(t,i.y||0,"%) rotate(")).call(e,i.rotate||0,"deg)")},hT.convertDeg=function(e){return Math.abs(e)<=1?360*e:e%360};var vT=/(Android)\s([\d.]+)/,gT=/(Version)\/([\d.]+)/,yT=["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","avc1.42E01E, mp4a.40.2","avc1.58A01E, mp4a.40.2","avc1.4D401E, mp4a.40.2","avc1.64001E, mp4a.40.2","mp4v.20.8, mp4a.40.2","mp4v.20.240, mp4a.40.2"],mT={get device(){return mT.os.isPc?"pc":"mobile"},get browser(){var e,t;if("undefined"==typeof navigator)return"";var n=navigator.userAgent.toLowerCase(),i={ie:/rv:([\d.]+)\) like gecko/,firefox:/firefox\/([\d.]+)/,chrome:/chrome\/([\d.]+)/,opera:/opera.([\d.]+)/,safari:/version\/([\d.]+).*safari/};return Mm(e=[]).call(e,Dk(t=rw(i)).call(t,(function(e){return i[e].test(n)})))[0]},get os(){if("undefined"==typeof navigator)return{};var e=navigator.userAgent,t=/(?:Windows Phone)/.test(e),n=/(?:SymbianOS)/.test(e)||t,i=/(?:Android)/.test(e),r=/(?:Firefox)/.test(e),o=/(?:iPad|PlayBook)/.test(e)||i&&!/(?:Mobile)/.test(e)||r&&/(?:Tablet)/.test(e),a=/(?:iPhone)/.test(e)&&!o,s=!(a||i||n||o),l=/(?:iPad|PlayBook)/.test(e);return{isTablet:o,isPhone:a,isIpad:l,isIos:a||l,isAndroid:i,isPc:s,isSymbian:n,isWindowsPhone:t,isFireFox:r}},get osVersion(){if("undefined"==typeof navigator)return 0;var e=navigator.userAgent,t="",n=(t=/(?:iPhone)|(?:iPad|PlayBook)/.test(e)?gT:vT)?t.exec(e):[];if(n&&n.length>=3){var i=n[2].split(".");return i.length>0?qw(i[0]):0}return 0},get isWeixin(){if("undefined"==typeof navigator)return!1;return!!/(micromessenger)\/([\d.]+)/.exec(navigator.userAgent.toLocaleLowerCase())},isSupportMP4:function(){var e={isSupport:!1,mime:""};if("undefined"==typeof document)return e;if(this.supportResult)return this.supportResult;var t=document.createElement("video");return"function"==typeof t.canPlayType&&Mk(yT).call(yT,(function(n){"probably"===t.canPlayType('video/mp4; codecs="'.concat(n,'"'))&&(e.isSupport=!0,e.mime+="||".concat(n))})),this.supportResult=e,t=null,e},isMSESupport:function(){var e=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(e)}catch(xR){return this._logger.error(e,xR),!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(e){var t={supported:!1,smooth:!1,powerEfficient:!1};if(!e||"undefined"==typeof navigator)return Lk.resolve(t);if(navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo)return navigator.mediaCapabilities.decodingInfo(e);var n=e.video||{},i=e.audio||{};try{var r=MediaSource.isTypeSupported(n.contentType),o=MediaSource.isTypeSupported(i.contentType);return Lk.resolve({supported:r&&o,smooth:!1,powerEfficient:!1})}catch(a){return Lk.resolve(t)}}},_T="3.0.7",bT={1:"media",2:"media",3:"media",4:"media",5:"media",6:"media"},kT={1:5101,2:5102,3:5103,4:5104,5:5105,6:5106},wT=oC((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{errorType:"",errorCode:0,errorMessage:"",originError:"",ext:{},mediaError:null};iC(this,e);var i=t&&t.i18n?t.i18n.ERROR_TYPES:null;if(t.media){var r,o=n.mediaError?n.mediaError:t.media.error||{},a=t.duration,s=t.currentTime,l=t.ended,u=t.src,c=t.currentSrc,h=t.media,f=h.readyState,d=h.networkState,p=n.errorCode||o.code;kT[p]&&(p=kT[p]);var v={playerVersion:_T,currentTime:s,duration:a,ended:l,readyState:f,networkState:d,src:u||c,errorType:n.errorType,errorCode:p,message:n.errorMessage||o.message,mediaError:o,originError:n.originError?n.originError.stack:"",host:hT.getHostFromUrl(u||c)};return n.ext&&Mk(r=rw(n.ext)).call(r,(function(e){v[e]=n.ext[e]})),v}if(arguments.length>1){for(var g={playerVersion:_T,domain:document.domain},y=["errorType","currentTime","duration","networkState","readyState","src","currentSrc","ended","errd","errorCode","mediaError"],m=0;m<arguments.length;m++)g[y[m]]=arguments[m];return g.ex=i?(i[arguments[0]]||{}).msg:"",g}})),ET="play",CT="ended",xT="pause",TT="error",ST="seeked",AT="timeupdate",PT="waiting",OT="canplay",IT="durationchange",RT="volumechange",MT="loadeddata",LT="emptied",DT="focus",NT="blur",FT="ready",HT="urlNull",UT="autoplay_started",jT="autoplay_was_prevented",BT="complete",VT="replay",GT="destroy",zT="urlchange",KT="download_speed_change",WT="fullscreen_change",YT="cssFullscreen_change",XT="mini_state_change",qT="definition_change",ZT="before_definition_change",$T="after_definition_change",JT="retry",QT="video_resize",eS="pip_change",tS="playnext",nS="shortcut",iS="user_action",rS="reset",oS="source_error",aS="source_success",sS=["play","playing","ended","pause","error","seeking","seeked","timeupdate","waiting","canplay","canplaythrough","durationchange","volumechange","loadeddata","ratechange","progress","loadstart","emptied","stalled","suspend","abort","lowdecode"],lS=Object.freeze({__proto__:null,ABORT:"abort",AFTER_DEFINITION_CHANGE:$T,AUTOPLAY_PREVENTED:jT,AUTOPLAY_STARTED:UT,BEFORE_DEFINITION_CHANGE:ZT,BUFFER_CHANGE:"bufferedChange",CANPLAY:OT,CANPLAY_THROUGH:"canplaythrough",COMPLETE:BT,CSS_FULLSCREEN_CHANGE:YT,DEFINITION_CHANGE:qT,DESTROY:GT,DOWNLOAD_SPEED_CHANGE:KT,DURATION_CHANGE:IT,EMPTIED:LT,ENDED:CT,ERROR:TT,FPS_STUCK:"fps_stuck",FULLSCREEN_CHANGE:WT,LOADED_DATA:MT,LOAD_START:"loadstart",MINI_STATE_CHANGE:XT,PAUSE:xT,PIP_CHANGE:eS,PLAY:ET,PLAYER_BLUR:NT,PLAYER_FOCUS:DT,PLAYING:"playing",PLAYNEXT:tS,PROGRESS:"progress",RATE_CHANGE:"ratechange",READY:FT,REPLAY:VT,RESET:rS,RETRY:JT,ROTATE:"rotate",SCREEN_SHOT:"screenShot",SEEKED:ST,SEEKING:"seeking",SEI_PARSED:"SEI_PARSED",SHORTCUT:nS,SOURCE_ERROR:oS,SOURCE_SUCCESS:aS,STALLED:"stalled",STATS_EVENTS:{STATS_INFO:"stats_info",STATS_DOWNLOAD:"stats_download",STATS_RESET:"stats_reset"},SUSPEND:"suspend",SWITCH_SUBTITLE:"switch_subtitle",TIME_UPDATE:AT,URL_CHANGE:zT,URL_NULL:HT,USER_ACTION:iS,VIDEO_EVENTS:sS,VIDEO_RESIZE:QT,VOLUME_CHANGE:RT,WAITING:PT,XGLOG:"xglog"});function uS(e,t){this&&this.emit&&("error"===e?this.errorHandler(e,t.error):this.emit(e,t))}var cS=function(e){sC(n,e);var t=fC(n);function n(e){var i;iC(this,n),(i=t.call(this,e))._hasStart=!1,i._currentTime=0,i._duration=0,i._internalOp={},i._lastMuted=!1,i.vtype="MP4",i._rate=-1,i.mediaConfig=IC({},{controls:!1,autoplay:e.autoplay,playsinline:e.playsinline,"x5-playsinline":e.playsinline,"webkit-playsinline":e.playsinline,"x5-video-player-fullscreen":e["x5-video-player-fullscreen"]||e.x5VideoPlayerFullscreen,"x5-video-orientation":e["x5-video-orientation"]||e.x5VideoOrientation,airplay:e.airplay,"webkit-airplay":e.airplay,tabindex:0|e.tabindex,mediaType:e.mediaType||"video","data-index":-1},e.videoConfig,e.videoAttributes);var r=e["x5-video-player-type"]||e.x5VideoPlayerType;return mT.isWeixin&&mT.os.isAndroid&&r&&(i.mediaConfig["x5-video-player-type"]=r,delete i.mediaConfig.playsinline,delete i.mediaConfig["webkit-playsinline"],delete i.mediaConfig["x5-playsinline"]),e.loop&&(i.mediaConfig.loop="loop"),i.media=hT.createDom(i.mediaConfig.mediaType,"",i.mediaConfig,""),e.defaultPlaybackRate&&(i.media.defaultPlaybackRate=i.media.playbackRate=e.defaultPlaybackRate),"Number"===hT.typeOf(e.volume)&&(i.volume=e.volume),e.autoplayMuted&&(i.media.muted=!0,i._lastMuted=!0),e.autoplay&&(i.media.autoplay=!0),i._interval={},i.mediaEventMiddleware={},i.attachVideoEvents(),i}return oC(n,[{key:"setEventsMiddleware",value:function(e){var t,n=this;Mk(t=rw(e)).call(t,(function(t){n.mediaEventMiddleware[t]=e[t]}))}},{key:"removeEventsMiddleware",value:function(e){var t,n=this;Mk(t=rw(e)).call(t,(function(e){delete n.mediaEventMiddleware[e]}))}},{key:"attachVideoEvents",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.media;this._evHandlers||(this._evHandlers=Mk(sS).call(sS,(function(t){var n,i=Mm(n="on".concat(t.charAt(0).toUpperCase())).call(n,ow(t).call(t,1));return"function"==typeof e[i]&&e.on(t,e[i]),aC({},t,function(e,t){return function(n,i){var r={player:t,eventName:e,originalEvent:n,detail:n.detail||{},timeStamp:n.timeStamp,currentTime:t.currentTime,duration:t.duration,paused:t.paused,ended:t.ended,isInternalOp:!!t._internalOp[n.type],muted:t.muted,volume:t.volume,host:hT.getHostFromUrl(t.currentSrc),vtype:t.vtype};if(t.removeInnerOP(n.type),"timeupdate"===e&&(t._currentTime=t.media&&t.media.currentTime),"ratechange"===e){var o=t.media?t.media.playbackRate:0;if(o&&t._rate===o)return;t._rate=t.media&&t.media.playbackRate}if("durationchange"===e&&(t._duration=t.media.duration),"volumechange"===e&&(r.isMutedChange=t._lastMuted!==t.muted,t._lastMuted=t.muted),"error"===e&&(r.error=i||t.video.error),t.mediaEventMiddleware[e]){var a=uS.bind(t,e,r);try{t.mediaEventMiddleware[e].call(t,r,a)}catch(s){throw uS.call(t,e,r),s}}else uS.call(t,e,r)}}(t,e))}))),this._evHandlers.forEach((function(e){var n=rw(e)[0];t.addEventListener(n,e[n],!1)}))}},{key:"detachVideoEvents",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.media;this._evHandlers.forEach((function(e){var n=rw(e)[0];t.removeEventListener(n,e[n],!1)})),this._evHandlers.forEach((function(t){var n,i=rw(t)[0],r=Mm(n="on".concat(i.charAt(0).toUpperCase())).call(n,ow(i).call(i,1));"function"==typeof e[r]&&e.off(i,e[r])})),this._evHandlers=null}},{key:"_attachSourceEvents",value:function(e,t){var n=this;e.removeAttribute("src"),e.load(),t.forEach((function(e){n.media.appendChild(hT.createDom("source","",{src:"".concat(e.src),type:"".concat(e.type||"")}))}));var i=e.children;if(i){this._videoSourceCount=i.length,this._vLoadeddata=function(e){n.emit(aS,{src:e.target.currentSrc,host:hT.getHostFromUrl(e.target.currentSrc)})};for(var r=null,o=0;o<this._evHandlers.length;o++)if("error"===rw(this._evHandlers[o])[0]){r=this._evHandlers[o];break}!this._sourceError&&(this._sourceError=function(e){if(n._videoSourceCount--,0===n._videoSourceCount){var t={code:4,message:"sources_load_error"};r?r.error(e,t):n.errorHandler("error",t)}var i=bT[4];n.emit(oS,new wT(n,{errorType:i,errorCode:4,errorMessage:"sources_load_error",mediaError:{code:4,message:"sources_load_error"},src:e.target.src}))});for(var a=0;a<i.length;a++)i[a].addEventListener("error",this._sourceError);e.addEventListener("loadeddata",this._vLoadeddata)}}},{key:"_detachSourceEvents",value:function(e){var t=e.children;if(t&&0!==t.length&&this._sourceError){for(var n=0;n<t.length;n++)t[n].removeEventListener("error",this._sourceError);for(;t.length>0;)e.removeChild(t[0]);this._vLoadeddata&&e.removeEventListener("loadeddata",this._vLoadeddata)}}},{key:"errorHandler",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.media&&(this.media.error||t)){var n=this.media.error||t,i=n.code?bT[n.code]:"other";n.message;this.media.currentSrc||(n={code:6,message:"empty_src"}),this.emit(e,new wT(this,{errorType:i,errorCode:n.code,errorMessage:n.message||"",mediaError:n}))}}},{key:"destroy",value:function(){for(var e in this.media&&(this.media.pause&&(this.media.pause(),this.media.muted=!0),this.media.removeAttribute("src"),this.media.load()),this._currentTime=0,this._duration=0,this.mediaConfig=null,this._interval)Object.prototype.hasOwnProperty.call(this._interval,e)&&(clearInterval(this._interval[e]),this._interval[e]=null);this.detachVideoEvents(),this.media=null,this.mediaEventMiddleware={},this.removeAllListeners()}},{key:"video",get:function(){return this.media},set:function(e){this.media=e}},{key:"play",value:function(){return this.media?this.media.play():null}},{key:"pause",value:function(){this.media&&this.media.pause()}},{key:"load",value:function(){this.media&&this.media.load()}},{key:"canPlayType",value:function(e){return!!this.media&&this.media.canPlayType(e)}},{key:"getBufferedRange",value:function(e){var t=[0,0];if(!this.media)return t;e||(e=this.media.buffered);var n=this.media.currentTime;if(e)for(var i=0,r=e.length;i<r&&(t[0]=e.start(i),t[1]=e.end(i),!(t[0]<=n&&n<=t[1]));i++);return t[0]-n<=0&&n-t[1]<=0?t:[0,0]}},{key:"autoplay",get:function(){return!!this.media&&this.media.autoplay},set:function(e){this.media&&(this.media.autoplay=e)}},{key:"buffered",get:function(){return this.media?this.media.buffered:null}},{key:"buffered2",get:function(){return this.media&&this.media.buffered?hT.getBuffered2(this.media.buffered):null}},{key:"bufferedPoint",get:function(){var e={start:0,end:0};if(!this.media)return e;var t=this.media.buffered;if(!t||0===t.length)return e;for(var n=0;n<t.length;n++)if((t.start(n)<=this.currentTime||t.start(n)<.1)&&t.end(n)>=this.currentTime)return{start:t.start(n),end:t.end(n)};return e}},{key:"crossOrigin",get:function(){return this.media?this.media.crossOrigin:""},set:function(e){this.media&&(this.media.crossOrigin=e)}},{key:"currentSrc",get:function(){return this.media?this.media.currentSrc:""},set:function(e){this.media&&(this.media.currentSrc=e)}},{key:"currentTime",get:function(){return this.media?void 0!==this.media.currentTime?this.media.currentTime:this._currentTime:0},set:function(e){this.media&&(this.media.currentTime=e)}},{key:"defaultMuted",get:function(){return!!this.media&&this.media.defaultMuted},set:function(e){this.media&&(this.media.defaultMuted=e)}},{key:"duration",get:function(){return this._duration}},{key:"ended",get:function(){return!!this.media&&this.media.ended}},{key:"error",get:function(){return this.media.error}},{key:"errorNote",get:function(){if(!this.media.error)return"";return["MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED"][this.media.error.code-1]}},{key:"loop",get:function(){return!!this.media&&this.media.loop},set:function(e){this.media&&(this.media.loop=e)}},{key:"muted",get:function(){return!!this.media&&this.media.muted},set:function(e){this.media&&this.media.muted!==e&&(this._lastMuted=this.media.muted,this.media.muted=e)}},{key:"networkState",get:function(){return this.media.networkState}},{key:"paused",get:function(){return!this.media||this.media.paused}},{key:"playbackRate",get:function(){return this.media?this.media.playbackRate:0},set:function(e){this.media&&e!==1/0&&(this.media.defaultPlaybackRate=e,this.media.playbackRate=e)}},{key:"played",get:function(){return this.media?this.media.played:null}},{key:"preload",get:function(){return!!this.media&&this.media.preload},set:function(e){this.media&&(this.media.preload=e)}},{key:"readyState",get:function(){return this.media.readyState}},{key:"seekable",get:function(){return!!this.media&&this.media.seekable}},{key:"seeking",get:function(){return!!this.media&&this.media.seeking}},{key:"src",get:function(){return this.media?this.media.src:""},set:function(e){this.media&&(this.emit(zT,e),this.emit(PT),this._currentTime=0,this._duration=0,/^blob/.test(this.media.currentSrc)||/^blob/.test(this.media.src)?this.onWaiting():(this._detachSourceEvents(this.media),"Array"===hT.typeOf(e)?this._attachSourceEvents(this.media,e):e?this.media.src=e:this.media.removeAttribute("src"),this.load()))}},{key:"volume",get:function(){return this.media?this.media.volume:0},set:function(e){e!==1/0&&this.media&&(this.media.volume=e)}},{key:"addInnerOP",value:function(e){this._internalOp[e]=!0}},{key:"removeInnerOP",value:function(e){delete this._internalOp[e]}},{key:"emit",value:function(e,t){for(var i,r,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(r=dC(lC(n.prototype),"emit",this)).call.apply(r,Mm(i=[this,e,t]).call(i,a))}},{key:"on",value:function(e,t){for(var i,r,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(r=dC(lC(n.prototype),"on",this)).call.apply(r,Mm(i=[this,e,t]).call(i,a))}},{key:"once",value:function(e,t){for(var i,r,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(r=dC(lC(n.prototype),"once",this)).call.apply(r,Mm(i=[this,e,t]).call(i,a))}},{key:"off",value:function(e,t){for(var i,r,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(r=dC(lC(n.prototype),"off",this)).call.apply(r,Mm(i=[this,e,t]).call(i,a))}},{key:"offAll",value:function(){dC(lC(n.prototype),"removeAllListeners",this).call(this)}}]),n}(MC),hS=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{name:"xgplayer",version:1,db:null,ojstore:{name:"xg-m4a",keypath:"vid"}};iC(this,e),this.indexedDB=window.indexedDB||window.webkitindexedDB,this.IDBKeyRange=window.IDBKeyRange||window.webkitIDBKeyRange,this.myDB=t}return oC(e,[{key:"openDB",value:function(e){var t=this,n=this,i=this.myDB.version||1,r=n.indexedDB.open(n.myDB.name,i);r.onerror=function(e){},r.onsuccess=function(i){t.myDB.db=i.target.result,e.call(n)},r.onupgradeneeded=function(e){var t=e.target.result;e.target.transaction,t.objectStoreNames.contains(n.myDB.ojstore.name)||t.createObjectStore(n.myDB.ojstore.name,{keyPath:n.myDB.ojstore.keypath})}}},{key:"deletedb",value:function(){this.indexedDB.deleteDatabase(this.myDB.name)}},{key:"closeDB",value:function(){this.myDB.db.close()}},{key:"addData",value:function(e,t){for(var n,i=this.myDB.db.transaction(e,"readwrite").objectStore(e),r=0;r<t.length;r++)(n=i.add(t[r])).onerror=function(){},n.onsuccess=function(){}}},{key:"putData",value:function(e,t){for(var n,i=this.myDB.db.transaction(e,"readwrite").objectStore(e),r=0;r<t.length;r++)(n=i.put(t[r])).onerror=function(){},n.onsuccess=function(){}}},{key:"getDataByKey",value:function(e,t,n){var i=this,r=this.myDB.db.transaction(e,"readwrite").objectStore(e).get(t);r.onerror=function(){n.call(i,null)},r.onsuccess=function(e){var t=e.target.result;n.call(i,t)}}},{key:"deleteData",value:function(e,t){this.myDB.db.transaction(e,"readwrite").objectStore(e).delete(t)}},{key:"clearData",value:function(e){this.myDB.db.transaction(e,"readwrite").objectStore(e).clear()}}]),e}(),fS=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],dS=["requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen"],pS=["exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen"],vS="data-xgplayerid";function gS(e,t,n){for(var i,r=arguments.length,o=new Array(r>3?r-3:0),a=3;a<r;a++)o[a-3]=arguments[a];var s,l=t.call.apply(t,Mm(i=[e]).call(i,o));n&&"function"==typeof n&&(l&&l.then?l.then((function(){for(var t,i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];n.call.apply(n,Mm(t=[e]).call(t,r))})):n.call.apply(n,Mm(s=[e]).call(s,o)))}function yS(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{pre:null,next:null};return this.__hooks||(this.__hooks={}),!this.__hooks[e]&&(this.__hooks[e]=null),function(){var i,r=arguments,o=this;if(n.pre)try{var a,s;(s=n.pre).call.apply(s,Mm(a=[this]).call(a,ow(Array.prototype).call(arguments)))}catch(y){var l,u;throw y.message=Mm(l=Mm(u="[pluginName: ".concat(this.pluginName,":")).call(u,e,":pre error] >> ")).call(l,y.message),y}if(this.__hooks&&this.__hooks[e])try{var c,h,f,d=(h=this.__hooks[e]).call.apply(h,Mm(c=[this,this]).call(c,ow(Array.prototype).call(arguments)));if(d)if(d.then)d.then((function(e){var i;!1!==e&&gS.apply(void 0,Mm(i=[o,t,n.next]).call(i,pC(r)))})).catch((function(e){throw e}));else gS.apply(void 0,Mm(f=[this,t,n.next]).call(f,ow(Array.prototype).call(arguments)));else if(void 0===d){var p;gS.apply(void 0,Mm(p=[this,t,n.next]).call(p,ow(Array.prototype).call(arguments)))}}catch(y){var v,g;throw y.message=Mm(v=Mm(g="[pluginName: ".concat(this.pluginName,":")).call(g,e,"] >> ")).call(v,y.message),y}else gS.apply(void 0,Mm(i=[this,t,n.next]).call(i,ow(Array.prototype).call(arguments)))}.bind(this)}function mS(e,t){var n=this.__hooks;if(n)return n.hasOwnProperty(e)?(n&&(n[e]=t),!0):(console.warn("has no supported hook which name [".concat(e,"]")),!1)}function _S(e,t){var n=this.__hooks;n&&delete n[e]}function bS(e){if(this.plugins&&this.plugins[e.toLowerCase()]){for(var t=this.plugins[e.toLowerCase()],n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return t.useHooks&&t.useHooks.apply(t,i)}}function kS(e){if(this.plugins&&this.plugins[e.toLowerCase()]){var t=this.plugins[e.toLowerCase()];if(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return t.removeHooks&&t.removeHooks.apply(t,i)}}}function wS(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.__hooks={},t&&Mk(t).call(t,(function(t){e.__hooks[t]=null})),lE(e,"hooks",{get:function(){var t;return e.__hooks&&Mk(t=rw(e.__hooks)).call(t,(function(t){if(e.__hooks[t])return t}))}})}function ES(e){e.__hooks=null}function CS(e,t,n){for(var i=arguments.length,r=new Array(i>3?i-3:0),o=3;o<i;o++)r[o-3]=arguments[o];var a;if(!e.__hooks||!e.__hooks[t])return n.call.apply(n,Mm(a=[e,e]).call(a,r));var s,l,u=(l=e.__hooks[t]).call.apply(l,Mm(s=[e,e]).call(s,r));if(u&&u.then)u.then((function(t){var i;return!1===t?null:n.call.apply(n,Mm(i=[e,e]).call(i,r))})).catch((function(e){console.warn("[runHooks]".concat(t," reject"),e.message)}));else if(!1!==u){var c;return n.call.apply(n,Mm(c=[e,e]).call(c,r))}}function xS(e,t){var n;uT.logError(Mm(n="[".concat(e,"] event or callback cant be undefined or null when call ")).call(n,t))}var TS=function(){function e(t){iC(this,e),hT.checkIsFunction(this.beforeCreate)&&this.beforeCreate(t),wS(this),this.__args=t,this.__events={},this.__onceEvents={},this.config=t.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(t)}return oC(e,[{key:"beforeCreate",value:function(e){}},{key:"afterCreate",value:function(){}},{key:"beforePlayerInit",value:function(){}},{key:"onPluginsReady",value:function(){}},{key:"afterPlayerInit",value:function(){}},{key:"destroy",value:function(){}},{key:"__init",value:function(e){this.player=e.player,this.playerConfig=e.player&&e.player.config,this.pluginName=e.pluginName?e.pluginName.toLowerCase():this.constructor.pluginName.toLowerCase(),this.logger=e.player&&e.player.logger}},{key:"updateLang",value:function(e){e||(e=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 e=hT.checkTouchSupport()?"touch":"mouse";return!this.playerConfig||"touch"!==this.playerConfig.domEventType&&"mouse"!==this.playerConfig.domEventType||(e=this.playerConfig.domEventType),e}},{key:"on",value:function(e,t){var n=this;e&&t&&this.player?"string"==typeof e?(this.__events[e]=t,this.player.on(e,t)):Array.isArray(e)&&e.forEach((function(e){n.__events[e]=t,n.player.on(e,t)})):xS(this.pluginName,"plugin.on(event, callback)")}},{key:"once",value:function(e,t){var n=this;e&&t&&this.player?"string"==typeof e?(this.__onceEvents[e]=t,this.player.once(e,t)):Array.isArray(e)&&e.forEach((function(i){n.__onceEvents[i]=t,n.player.once(e,t)})):xS(this.pluginName,"plugin.once(event, callback)")}},{key:"off",value:function(e,t){var n=this;e&&t&&this.player?"string"==typeof e?(delete this.__events[e],this.player.off(e,t)):Array.isArray(e)&&e.forEach((function(i){delete n.__events[e],n.player.off(i,t)})):xS(this.pluginName,"plugin.off(event, callback)")}},{key:"offAll",value:function(){var e=this;["__events","__onceEvents"].forEach((function(t){rw(e[t]).forEach((function(n){e[t][n]&&e.off(n,e[t][n]),n&&delete e[t][n]}))})),this.__events={},this.__onceEvents={}}},{key:"emit",value:function(e){var t,n;if(this.player){for(var i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];(n=this.player).emit.apply(n,Mm(t=[e]).call(t,r))}}},{key:"emitUserAction",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.player){var i=tC(tC({},n),{},{pluginName:this.pluginName});this.player.emitUserAction(e,t,i)}}},{key:"hook",value:function(e,t){var n;return yS.call.apply(yS,Mm(n=[this]).call(n,ow(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){for(var n,i=arguments.length,r=new Array(i>2?i-2:0),o=2;o<i;o++)r[o-2]=arguments[o];return mS.call.apply(mS,Mm(n=[this]).call(n,ow(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){for(var n,i=arguments.length,r=new Array(i>2?i-2:0),o=2;o<i;o++)r[o-2]=arguments[o];return _S.call.apply(_S,Mm(n=[this]).call(n,ow(Array.prototype).call(arguments)))}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(this.player)return n&&(t.pluginName=n),this.player.registerPlugin({plugin:e,options:t})}},{key:"getPlugin",value:function(e){return this.player?this.player.getPlugin(e):null}},{key:"__destroy",value:function(){var e,t=this,n=this.player,i=this.pluginName;this.offAll(),hT.clearAllTimers(this),hT.checkIsFunction(this.destroy)&&this.destroy(),Mk(e=["player","playerConfig","pluginName","logger","__args","__hooks"]).call(e,(function(e){t[e]=null})),n.unRegisterPlugin(i),ES(this)}}],[{key:"defineGetterOrSetter",value:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&lE(e,n,t[n])}},{key:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),e}();if("undefined"!=typeof Element&&!Element.prototype.matches){var SS=Element.prototype;SS.matches=SS.matchesSelector||SS.mozMatchesSelector||SS.msMatchesSelector||SS.oMatchesSelector||SS.webkitMatchesSelector}var AS=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}};function PS(e,t,n,i,r){var o=OS.apply(this,arguments);return e.addEventListener(n,o,r),{destroy:function(){e.removeEventListener(n,o,r)}}}function OS(e,t,n,i){return function(n){n.delegateTarget=AS(n.target,t),n.delegateTarget&&i.call(e,n)}}var IS=function(e,t,n,i,r){return"function"==typeof e.addEventListener?PS.apply(null,arguments):"function"==typeof n?PS.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Mk(Array.prototype).call(e,(function(e){return PS(e,t,n,i,r)})))},RS=n(IS),MS={CONTROLS:"controls",ROOT:"root"},LS={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"};function DS(e){return!!e&&(iw(e)&&/^(?:http|data:|\/)/.test(e))}function NS(e,t){var n,i,r=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(e instanceof window.Element)return hT.addClass(e,r),Mk(i=rw(o)).call(i,(function(t){e.setAttribute(t,o[t])})),e;if(DS(e)||DS(e.url))return o.src=DS(e)?e:e.url||"",s=hT.createDom(e.tag||"img","",o,"xg-img ".concat(r));if("function"==typeof e)try{var l,u;return(s=e())instanceof window.Element?(hT.addClass(s,r),Mk(l=rw(o)).call(l,(function(e){s.setAttribute(e,o[e])})),s):(uT.logWarn(Mm(u="warn>>icons.".concat(t," in config of plugin named [")).call(u,a,"] is a function mast return an Element Object")),null)}catch(c){return uT.logError("Plugin named [".concat(a,"]:createIcon"),c),null}return"string"==typeof e?hT.createDomFromHtml(e,o,r):(uT.logWarn(Mm(n="warn>>icons.".concat(t," in config of plugin named [")).call(n,a,"] is invalid")),null)}function FS(e,t){var n,i=t.config.icons||t.playerConfig.icons;Mk(n=rw(e)).call(n,(function(n){var r=e[n],o=r&&r.class?r.class:"",a=r&&r.attr?r.attr:{},s=null;i&&i[n]&&(o=function(e,t){var n;return"object"===nC(e)&&e.class&&"string"==typeof e.class?Mm(n="".concat(t," ")).call(n,e.class):t}(i[n],o),a=function(e,t){var n;return"object"===nC(e)&&e.attr&&"object"===nC(e.attr)&&Mk(n=rw(e.attr)).call(n,(function(n){t[n]=e.attr[n]})),t}(i[n],a),s=NS(i[n],n,o,a,t.pluginName)),!s&&r&&(s=NS(r.icon?r.icon:r,a,o,{},t.pluginName)),t.icons[n]=s}))}var HS=function(e){sC(n,e);var t=fC(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return iC(this,n),(e=t.call(this,i)).__delegates=[],e}return oC(n,[{key:"__init",value:function(e){if(dC(lC(n.prototype),"__init",this).call(this,e),e.root){var t=e.root,i=null;this.icons={},this.root=null,this.parent=null,FS(this.registerIcons()||{},this),this.langText={};var r,o,a,s=this.registerLanguageTexts()||{};o=this,Mk(a=rw(r=s)).call(a,(function(e){lE(o.langText,e,{get:function(){var t=o.lang,n=o.i18n;return n[e]?n[e]:r[e]&&r[e][t]||""}})}));var l="";try{l=this.render()}catch(f){var u;throw uT.logError("Plugin:".concat(this.pluginName,":render"),f),new Error(Mm(u="Plugin:".concat(this.pluginName,":render:")).call(u,f.message))}if(l)(i=n.insert(l,t,e.index)).setAttribute("data-index",e.index);else{if(!e.tag)return;(i=hT.createDom(e.tag,"",e.attr,e.name)).setAttribute("data-index",e.index),t.appendChild(i)}this.root=i,this.parent=t;var c=this.config.attr||{},h=this.config.style||{};this.setAttr(c),this.setStyle(h),this.config.index&&this.root.setAttribute("data-index",this.config.index),this.__registerChildren()}}},{key:"__registerChildren",value:function(){var e=this;if(this.root){this._children=[];var t,n=this.children();if(n&&"object"===nC(n))if(rw(n).length>0)Mk(t=rw(n)).call(t,(function(t){var i,r,o=t,a=n[o],s={root:e.root};"function"==typeof a?(i=e.config[o]||{},r=a):"object"===nC(a)&&"function"==typeof a.plugin&&(i=a.options?hT.deepCopy(e.config[o]||{},a.options):e.config[o]||{},r=a.plugin),s.config=i,void 0!==i.index&&(s.index=i.index),i.root&&(s.root=i.root),e.registerPlugin(r,s,o)}))}}},{key:"updateLang",value:function(e){e||(e=this.lang);var t=this.root,n=this.i18n,i=this.langText;t&&function e(t,n){for(var i=0;i<t.children.length;i++)t.children[i].children.length>0?e(t.children[i],n):n(t.children[i])}(t,(function(t){var r=t.getAttribute&&t.getAttribute("lang-key");if(r){var o=n[r.toUpperCase()]||i[r];o&&(t.innerHTML="function"==typeof o?o(e):o)}}))}},{key:"lang",get:function(){return this.player.lang}},{key:"changeLangTextKey",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.i18n||{},i=this.langText;e.setAttribute&&e.setAttribute("lang-key",t);var r=n[t]||i[t]||"";r&&(e.innerHTML=r)}},{key:"plugins",value:function(){return this._children}},{key:"children",value:function(){return{}}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";t.root=t.root||this.root;var r=dC(lC(n.prototype),"registerPlugin",this).call(this,e,t,i);return this._children.push(r),r}},{key:"registerIcons",value:function(){return{}}},{key:"registerLanguageTexts",value:function(){return{}}},{key:"find",value:function(e){if(this.root)return this.root.querySelector(e)}},{key:"bind",value:function(e,t,i){var r=this;if(arguments.length<3&&"function"==typeof t)Array.isArray(e)?e.forEach((function(e){r.bindEL(e,t)})):this.bindEL(e,t);else{var o,a=n.delegate.call(this,this.root,e,t,i);this.__delegates=Mm(o=this.__delegates).call(o,a)}}},{key:"unbind",value:function(e,t){var n=this;if(arguments.length<3&&"function"==typeof t)Array.isArray(e)?e.forEach((function(e){n.unbindEL(e,t)})):this.unbindEL(e,t);else for(var i,r=Mm(i="".concat(e,"_")).call(i,t),o=0;o<this.__delegates.length;o++)if(this.__delegates[o].key===r){var a;this.__delegates[o].destroy(),Tw(a=this.__delegates).call(a,o,1);break}}},{key:"setStyle",value:function(e,t){var n,i=this;if(this.root)return"String"===hT.typeOf(e)?this.root.style[e]=t:void("Object"===hT.typeOf(e)&&Mk(n=rw(e)).call(n,(function(t){i.root.style[t]=e[t]})))}},{key:"setAttr",value:function(e,t){var n,i=this;if(this.root)return"String"===hT.typeOf(e)?this.root.setAttribute(e,t):void("Object"===hT.typeOf(e)&&Mk(n=rw(e)).call(n,(function(t){i.root.setAttribute(t,e[t])})))}},{key:"setHtml",value:function(e,t){this.root&&(this.root.innerHTML=e,"function"==typeof t&&t())}},{key:"bindEL",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.root&&"on".concat(e)in this.root&&"function"==typeof t&&this.root.addEventListener(e,t,n)}},{key:"unbindEL",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.root&&"on".concat(e)in this.root&&"function"==typeof t&&this.root.removeEventListener(e,t,n)}},{key:"show",value:function(e){if(this.root)return this.root.style.display=void 0!==e?e:"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(e,t){if(!this.root)return null;if(arguments.length<2&&arguments[0]instanceof window.Element)return this.root.appendChild(arguments[0]);if(!(t&&t instanceof window.Element))return null;try{return"string"==typeof e?Vm(this).call(this,e).appendChild(t):e.appendChild(t)}catch(n){return uT.logError("Plugin:appendChild",n),null}}},{key:"render",value:function(){return""}},{key:"destroy",value:function(){}},{key:"__destroy",value:function(){var e,t,i,r=this,o=this.player;(Mk(e=this.__delegates).call(e,(function(e){e.destroy()})),this.__delegates=[],this._children instanceof Array)&&(Mk(i=this._children).call(i,(function(e){o.unRegisterPlugin(e.pluginName)})),this._children=null);this.root&&(this.root.hasOwnProperty("remove")?this.root.remove():this.root.parentNode&&this.root.parentNode.removeChild(this.root)),dC(lC(n.prototype),"__destroy",this).call(this),this.icons={},Mk(t=["root","parent"]).call(t,(function(e){r[e]=null}))}}],[{key:"insert",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=t.children.length,r=Number(n),o=e instanceof window.Node;if(i){for(var a=0,s=null,l="";a<i;a++){s=t.children[a];var u=Number(s.getAttribute("data-index"));if(u>=r){l="beforebegin";break}u<r&&(l="afterend")}return o?"afterend"===l?t.appendChild(e):t.insertBefore(e,s):s.insertAdjacentHTML(l,e),"afterend"===l?t.children[t.children.length-1]:t.children[a]}return o?t.appendChild(e):t.insertAdjacentHTML("beforeend",e),t.children[t.children.length-1]}},{key:"defaultConfig",get:function(){return{}}},{key:"delegate",value:function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=[];if(e instanceof window.Node&&"function"==typeof i)if(Array.isArray(n))n.forEach((function(n){var a,s=RS(e,t,n,i,r);s.key=Mm(a="".concat(t,"_")).call(a,n),o.push(s)}));else{var a,s=RS(e,t,n,i,r);s.key=Mm(a="".concat(t,"_")).call(a,n),o.push(s)}return o}},{key:"ROOT_TYPES",get:function(){return MS}},{key:"POSITIONS",get:function(){return LS}}]),n}(TS),US=function(){function e(){var t=this;if(iC(this,e),aC(this,"__trigger",(function(e){var n=(new Date).getTime();t.timeStamp=n;for(var i=0;i<e.length;i++)t.__runHandler(e[i].target)})),this.__handlers=[],this.timeStamp=0,this.observer=null,window.ResizeObserver)try{this.observer=new window.ResizeObserver(function(e,t,n){var i=!0,r=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return fT(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),dT(e,t,{leading:i,trailing:r,maxWait:t})}(this.__trigger,100,{trailing:!0})),this.timeStamp=(new Date).getTime()}catch(n){console.error(n)}}return oC(e,[{key:"addObserver",value:function(e,t){if(this.observer){this.observer&&this.observer.observe(e);for(var n=e.getAttribute(vS),i=this.__handlers,r=-1,o=0;o<i.length;o++)i[o]&&e===i[o].target&&(r=o);r>-1?this.__handlers[r].handler=t:this.__handlers.push({target:e,handler:t,playerId:n})}}},{key:"unObserver",value:function(e){var t,n,i=-1;Mk(t=this.__handlers).call(t,(function(t,n){e===t.target&&(i=n)}));try{this.observer&&this.observer.unobserve(e)}catch(r){}this.observer&&this.observer.unobserve(e),i>-1&&Tw(n=this.__handlers).call(n,i,1)}},{key:"destroyObserver",value:function(){this.observer&&this.observer.disconnect(),this.observer=null,this.__handlers=null}},{key:"__runHandler",value:function(e){for(var t=this.__handlers,n=0;n<t.length;n++)if(t[n]&&e===t[n].target){try{t[n].handler(e)}catch(xR){console.error(xR)}return!0}return!1}}]),e}(),jS=null;var BS={pluginGroup:{},init:function(e){var t,n,i=e._pluginInfoId;i||(i=(new Date).getTime(),e._pluginInfoId=i),!e.config.closeResizeObserver&&(t=e.root,n=function(){e.resize()},jS||(jS=new US),jS.addObserver(t,n)),0===rw(this.pluginGroup).length&&(e.isUserActive=!0),this.pluginGroup[i]={_player:e,_originalOptions:e.config||{},_plugins:{}}},checkPlayerRoot:function(e){if(this.pluginGroup){for(var t=rw(this.pluginGroup),n=0;n<t.length;n++){var i=this.pluginGroup[t[n]]._player;if(i.root===e)return i}return null}return null},formatPluginInfo:function(e,t){var n=null,i=null;return e.plugin&&"function"==typeof e.plugin?(n=e.plugin,i=e.options):(n=e,i={}),t&&(i.config=t||{}),{PLUFGIN:n,options:i}},checkPluginIfExits:function(e,t){for(var n=0;n<t.length;n++)if(e.toLowerCase()===t[n].pluginName.toLowerCase())return!0;return!1},getRootByConfig:function(e,t){for(var n=rw(t),i=null,r=0;r<n.length;r++)if(e.toLowerCase()===n[r].toLowerCase()){i=t[n[r]];break}return"Object"===hT.typeOf(i)?{root:i.root,position:i.position}:{}},lazyRegister:function(e,t){var n=this,i=t.timeout||1500;return Lk.race([t.loader().then((function(t){var i;i=t&&t.__esModule?t.default:t,n.register(e,i,t.options)})),new Lk((function(e,t){setTimeout((function(){t(new Error("timeout"))}),i)}))])},register:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e&&t&&"function"==typeof t&&void 0!==t.prototype){var i=e._pluginInfoId;if(i&&this.pluginGroup[i]){this.pluginGroup[i]._plugins||(this.pluginGroup[i]._plugins={});var r=this.pluginGroup[i]._plugins,o=this.pluginGroup[i]._originalOptions;n.player=this.pluginGroup[i]._player;var a=n.pluginName||t.pluginName;if(!a)throw new Error("The property pluginName is necessary");if(!t.isSupported||t.isSupported(e.config.mediaType,e.config.codecType)){n.config||(n.config={});for(var s=rw(o),l=0;l<s.length;l++)if(a.toLowerCase()===s[l].toLowerCase()){var u=o[s[l]];"Object"===hT.typeOf(u)?n.config=IC({},n.config,o[s[l]]):"Boolean"===hT.typeOf(u)&&(n.config.disable=!u);break}t.defaultConfig&&rw(t.defaultConfig).forEach((function(e){void 0===n.config[e]&&(n.config[e]=t.defaultConfig[e])})),n.root?"string"==typeof n.root&&(n.root=e[n.root]):n.root=e.root,n.index=n.config.index||0;try{r[a.toLowerCase()]&&(this.unRegister(i,a.toLowerCase()),console.warn("the is one plugin with same pluginName [".concat(a,"] exist, destroy the old instance")));var c=new t(n);return r[a.toLowerCase()]=c,r[a.toLowerCase()].func=t,c&&"function"==typeof c.afterCreate&&c.afterCreate(),c}catch(h){throw console.error(h),h}}else console.warn("not supported plugin [".concat(a,"]"))}}},unRegister:function(e,t){e._pluginInfoId&&(e=e._pluginInfoId),t=t.toLowerCase();try{var n=this.pluginGroup[e]._plugins[t];n&&(n.pluginName&&n.__destroy(),delete this.pluginGroup[e]._plugins[t])}catch(r){var i;console.error(Mm(i="[unRegister:".concat(t,"] cgid:[")).call(i,e,"] error"),r)}},deletePlugin:function(e,t){var n=e._pluginInfoId;n&&this.pluginGroup[n]&&this.pluginGroup[n]._plugins&&delete this.pluginGroup[n]._plugins[t]},getPlugins:function(e){var t=e._pluginInfoId;return t&&this.pluginGroup[t]?this.pluginGroup[t]._plugins:{}},findPlugin:function(e,t){var n=e._pluginInfoId;if(!n||!this.pluginGroup[n])return null;var i=t.toLowerCase();return this.pluginGroup[n]._plugins[i]},beforeInit:function(e){var t=this;function n(e){return e&&e.then?e:new Lk((function(e){e()}))}return new Lk((function(i){if(t.pluginGroup)return(e._loadingPlugins&&e._loadingPlugins.length?Lk.all(e._loadingPlugins):Lk.resolve()).then((function(){var r,o=e._pluginInfoId;if(t.pluginGroup[o]){var a=t.pluginGroup[o]._plugins,s=[];rw(a).forEach((function(e){if(a[e]&&a[e].beforePlayerInit)try{var t=a[e].beforePlayerInit();s.push(n(t))}catch(i){throw s.push(n(null)),i}})),Lk.all(Mm(r=[]).call(r,s)).then((function(){i()})).catch((function(e){console.error(e),i()}))}else i()}))}))},afterInit:function(e){var t=e._pluginInfoId;if(t&&this.pluginGroup[t]){var n=this.pluginGroup[t]._plugins;rw(n).forEach((function(e){n[e]&&n[e].afterPlayerInit&&n[e].afterPlayerInit()}))}},setLang:function(e,t){var n=t._pluginInfoId;if(n&&this.pluginGroup[n]){var i=this.pluginGroup[n]._plugins;rw(i).forEach((function(t){if(i[t].updateLang)i[t].updateLang(e);else try{i[t].lang=e}catch(xR){console.warn("".concat(t," setLang"))}}))}},reRender:function(e){var t=this,n=e._pluginInfoId;if(n&&this.pluginGroup[n]){var i=[],r=this.pluginGroup[n]._plugins;rw(r).forEach((function(e){"controls"!==e&&r[e]&&(i.push({plugin:r[e].func,options:r[e].__args}),t.unRegister(n,e))})),i.forEach((function(n){t.register(e,n.plugin,n.options)}))}},onPluginsReady:function(e){var t=e._pluginInfoId;if(t&&this.pluginGroup[t]){var n=this.pluginGroup[t]._plugins||{};rw(n).forEach((function(e){n[e].onPluginsReady&&"function"==typeof n[e].onPluginsReady&&n[e].onPluginsReady()}))}},setCurrentUserActive:function(e,t){if(this.pluginGroup[e]){if(!t)return this.pluginGroup[e]._player.isUserActive=t,e;for(var n=rw(this.pluginGroup),i=0;i<n.length;i++){var r=this.pluginGroup[n[i]];r&&r._player&&(this.pluginGroup[n[i]]._player.isUserActive=!1)}return this.pluginGroup[e]._player.isUserActive=t,e}},getCurrentUseActiveId:function(){if(this.pluginGroup){for(var e=rw(this.pluginGroup),t=0;t<e.length;t++){var n=this.pluginGroup[e[t]];if(n&&n._player&&n._player.isUserActive)return e[t]}return null}},destroy:function(e){var t=e._pluginInfoId;if(this.pluginGroup[t]){var n,i;n=e.root,jS.unObserver(n,i);for(var r=this.pluginGroup[t]._plugins,o=0,a=rw(r);o<a.length;o++){var s=a[o];this.unRegister(t,s)}var l=e.isUseActive;if(delete this.pluginGroup[t],delete e._pluginInfoId,l){var u=rw(this.pluginGroup);u.length>0&&this.setCurrentUserActive(u[u.length-1],!0)}}}},VS="xgplayer",GS="xgplayer-is-enter",zS="xgplayer-pause",KS="xgplayer-playing",WS="xgplayer-ended",YS="xgplayer-isloading",XS="xgplayer-is-error",qS="xgplayer-replay",ZS="xgplayer-nostart",$S="xgplayer-inactive",JS="xgplayer-is-fullscreen",QS="xgplayer-is-cssfullscreen",eA="xgplayer-rotate-fullscreen",tA="xgplayer-rotate-parent",nA="xgplayer-fullscreen-parent",iA="xgplayer-fullscreen-inner",rA="no-controls",oA="flex-controls",aA="controls-autohide",sA="top-bar-autohide",lA="not-allow-autoplay",uA="seeking";function cA(){return{id:"",el:null,url:"",domEventType:"default",nullUrlStart:!1,width:600,height:337.5,fluid:!1,fitVideoSize:"fixed",videoFillMode:"auto",volume:.6,autoplay:!1,autoplayMuted:!1,loop:!1,isLive:!1,zoom:1,videoInit:!0,poster:"",isMobileSimulateMode:!1,defaultPlaybackRate:1,execBeforePluginsCall:null,allowSeekAfterEnded:!0,enableContextmenu:!0,closeVideoClick:!1,closeVideoDblclick:!1,closePlayerBlur:!1,closeDelayBlur:!1,leavePlayerTime:3e3,closePlayVideoFocus:!1,closePauseVideoFocus:!1,closeFocusVideoFocus:!0,closeControlsBlur:!0,topBarAutoHide:!0,videoAttributes:{},startTime:0,seekedStatus:"play",miniprogress:!1,disableSwipeHandler:function(){},enableSwipeHandler:function(){},ignores:[],whitelist:[],inactive:3e3,lang:pT(),controls:!0,marginControls:!1,fullscreenTarget:null,screenShot:!1,rotate:!1,pip:!1,download:!1,mini:!1,cssFullscreen:!0,keyShortcut:!0,presets:[],plugins:[],playbackRate:1,definition:{list:[]},playsinline:!0,customDuration:0,timeOffset:0,icons:{},i18n:[],tabindex:0,thumbnail:null,videoConfig:{},isHideTips:!1,minWaitDelay:200,commonStyle:{progressColor:"",playedColor:"",cachedColor:"",sliderBtnStyle:{},volumeColor:""}}}var hA=function(e){sC(n,e);var t=fC(n);function n(){var e,i;iC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return aC(cC(i=t.call.apply(t,Mm(e=[this]).call(e,o))),"onMouseEnter",(function(e){var t=cC(i),n=t.player;t.playerConfig.closeControlsBlur&&n.focus({autoHide:!1})})),aC(cC(i),"onMouseLeave",(function(){cC(i).player.focus()})),i}return oC(n,[{key:"beforeCreate",value:function(e){e.config.mode||"mobile"!==mT.device||(e.config.mode="flex"),e.player.config.marginControls&&(e.config.autoHide=!1)}},{key:"afterCreate",value:function(){var e,t=this,n=this.config,i=n.disable,r=n.height,o=n.mode;if(!i){"flex"===o&&this.player.addClass(oA);var a={height:"".concat(r,"px")};Mk(e=rw(a)).call(e,(function(e){t.root.style[e]=a[e]})),this.left=Vm(this).call(this,"xg-left-grid"),this.center=Vm(this).call(this,"xg-center-grid"),this.right=Vm(this).call(this,"xg-right-grid"),this.innerRoot=Vm(this).call(this,"xg-inner-controls"),this.on(XT,(function(e){e?hT.addClass(t.root,"mini-controls"):hT.removeClass(t.root,"mini-controls")}));var s=this.playerConfig.isMobileSimulateMode;"mobile"!==mT.device&&"mobile"!==s&&(this.bind("mouseenter",this.onMouseEnter),this.bind("mouseleave",this.onMouseLeave))}}},{key:"focus",value:function(){this.player.focus({autoHide:!1})}},{key:"focusAwhile",value:function(){this.player.focus({autoHide:!0})}},{key:"blur",value:function(){this.player.blur({ignorePaused:!0})}},{key:"recoverAutoHide",value:function(){this.config.autoHide&&hT.addClass(this.root,aA)}},{key:"pauseAutoHide",value:function(){hT.removeClass(this.root,aA)}},{key:"show",value:function(){hT.addClass(this.root,"show")}},{key:"hide",value:function(){hT.removeClass(this.root,"show")}},{key:"mode",get:function(){return this.config.mode}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;if(this.root){var r=e.defaultConfig||{};if(!t.root){switch(t.position?t.position:t.config&&t.config.position?t.config.position:r.position){case LS.CONTROLS_LEFT:t.root=this.left;break;case LS.CONTROLS_RIGHT:t.root=this.right;break;case LS.CONTROLS_CENTER:t.root=this.center;break;case LS.CONTROLS:t.root=this.root;break;default:t.root=this.left}return dC(lC(n.prototype),"registerPlugin",this).call(this,e,t,i)}}}},{key:"destroy",value:function(){"mobile"!==mT.device&&(this.unbind("mouseenter",this.onMouseEnter),this.unbind("mouseleave",this.onMouseLeave))}},{key:"render",value:function(){var e=this.config,t=e.mode,n=e.autoHide,i=e.initShow;if(!e.disable){var r=hT.classNames({"xgplayer-controls":!0},{"flex-controls":"flex"===t},{"bottom-controls":"bottom"===t},aC({},aA,n),{"xgplayer-controls-initshow":i||!n});return'<xg-controls class="'.concat(r,'" unselectable="on">\n <xg-inner-controls class="xg-inner-controls xg-pos">\n <xg-left-grid class="xg-left-grid">\n </xg-left-grid>\n <xg-center-grid class="xg-center-grid"></xg-center-grid>\n <xg-right-grid class="xg-right-grid">\n </xg-right-grid>\n </xg-inner-controls>\n </xg-controls>')}}}],[{key:"pluginName",get:function(){return"controls"}},{key:"defaultConfig",get:function(){return{disable:!1,autoHide:!0,mode:"",initShow:!1}}}]),n}(HS),fA={lang:{},langKeys:[],textKeys:[]};function dA(e,t){return rw(t).forEach((function(n){var i,r=hT.typeOf(t[n]),o=hT.typeOf(e[n]);"Array"===r?("Array"!==o&&(e[n]=[]),(i=e[n]).push.apply(i,pC(t[n]))):"Object"===r?("Object"!==o&&(e[n]={}),dA(e[n],t[n])):e[n]=t[n]})),e}function pA(){var e;Mk(e=rw(fA.lang.en)).call(e,(function(e){fA.textKeys[e]=e}))}function vA(e,t){var n=e.LANG;if(t||(t=fA),t.lang){var i=e.TEXT||{};"zh"===n&&(n="zh-cn"),t.lang[n]?dA(t.lang[n],i):(t.langKeys.push(n),t.lang[n]=i),pA()}}vA({LANG:"en",TEXT:{ERROR_TYPES:{network:{code:1,msg:"video download error"},mse:{code:2,msg:"stream append error"},parse:{code:3,msg:"parsing error"},format:{code:4,msg:"wrong format"},decoder:{code:5,msg:"decoding error"},runtime:{code:6,msg:"grammatical errors"},timeout:{code:7,msg:"play timeout"},other:{code:8,msg:"other errors"}},HAVE_NOTHING:"There is no information on whether audio/video is ready",HAVE_METADATA:"Audio/video metadata is ready ",HAVE_CURRENT_DATA:"Data about the current play location is available, but there is not enough data to play the next frame/millisecond",HAVE_FUTURE_DATA:"Current and at least one frame of data is available",HAVE_ENOUGH_DATA:"The available data is sufficient to start playing",NETWORK_EMPTY:"Audio/video has not been initialized",NETWORK_IDLE:"Audio/video is active and has been selected for resources, but no network is used",NETWORK_LOADING:"The browser is downloading the data",NETWORK_NO_SOURCE:"No audio/video source was found",MEDIA_ERR_ABORTED:"The fetch process is aborted by the user",MEDIA_ERR_NETWORK:"An error occurred while downloading",MEDIA_ERR_DECODE:"An error occurred while decoding",MEDIA_ERR_SRC_NOT_SUPPORTED:"Audio/video is not supported",REPLAY:"Replay",ERROR:"Network is offline",PLAY_TIPS:"Play",PAUSE_TIPS:"Pause",PLAYNEXT_TIPS:"Play next",DOWNLOAD_TIPS:"Download",ROTATE_TIPS:"Rotate",RELOAD_TIPS:"Reload",FULLSCREEN_TIPS:"Fullscreen",EXITFULLSCREEN_TIPS:"Exit fullscreen",CSSFULLSCREEN_TIPS:"Cssfullscreen",EXITCSSFULLSCREEN_TIPS:"Exit cssfullscreen",TEXTTRACK:"Caption",PIP:"PIP",SCREENSHOT:"Screenshot",LIVE:"LIVE",OFF:"Off",OPEN:"Open",MINI_DRAG:"Click and hold to drag",MINISCREEN:"Miniscreen",REFRESH_TIPS:"Please Try",REFRESH:"Refresh",FORWARD:"forward",LIVE_TIP:"Live"}});var gA={get textKeys(){return fA.textKeys},get langKeys(){return fA.langKeys},get lang(){var e,t={};return Mk(e=fA.langKeys).call(e,(function(e){t[e]=fA.lang[e]})),fA.lang["zh-cn"]&&(t.zh=fA.lang["zh-cn"]||{}),t},extend:function(e,t){var n=[];if(t||(t=fA),t.lang){var i;if("Array"!==hT.typeOf(e))n=Mk(i=rw(e)).call(i,(function(t){return{LANG:"zh"===t?"zh-cn":t,TEXT:e[t]}}));else n=e;var r=t.lang;Mk(n).call(n,(function(e){"zh"===e.LANG&&(e.LANG="zh-cn"),r[e.LANG]?dA(r[e.LANG]||{},e.TEXT||{}):vA(e,t)})),pA()}},use:vA,init:function(e){var t,n={lang:{},langKeys:[],textKeys:{},pId:e};return dA(n.lang,fA.lang),(t=n.langKeys).push.apply(t,pC(fA.langKeys)),dA(n.textKeys,fA.textKeys),n}},yA=1,mA=2,_A=3,bA=4,kA=5,wA=6,EA=7,CA=["ERROR","INITIAL","READY","ATTACHING","ATTACHED","NOTALLOW","RUNNING","ENDED","DESTROYED"],xA=["play","pause","replay","retry"],TA=0,SA=0,AA=function(e){sC(n,e);var t=fC(n);function n(e){var i;iC(this,n);var r,o=hT.deepMerge(cA(),e);aC(cC(i=t.call(this,o)),"canPlayFunc",(function(){if(i.config){var e=i.config,t=e.autoplay,n=e.startTime,r=e.defaultPlaybackRate;uT.logInfo("player","canPlayFunc, startTime",n),n&&(i.currentTime=n>i.duration?i.duration:n,i.config.startTime=0),i.playbackRate=r,(t||i._useAutoplay)&&i.mediaPlay(),i.off(OT,i.canPlayFunc),i.removeClass(GS)}})),aC(cC(i),"onFullscreenChange",(function(e,t){var n=function(){hT.setTimeout(cC(i),(function(){i.resize()}),100)},r=hT.getFullScreenEl();i._fullActionFrom?i._fullActionFrom="":i.emit(iS,{eventType:"system",action:"switch_fullscreen",pluginName:"player",currentTime:i.currentTime,duration:i.duration,props:[{prop:"fullscreen",from:!0,to:!1}]});var o=function(e,t,n){if(e){var i=e.getAttribute(n);return!(!i||i!==t||"VIDEO"!==e.tagName&&"AUDIO"!==e.tagName)}}(r,i.playerId,vS);if(t||r&&(r===i._fullscreenEl||o))n(),!i.config.closeFocusVideoFocus&&i.media.focus(),i.fullscreen=!0,i.changeFullStyle(i.root,r,JS),i.emit(WT,!0,i._fullScreenOffset),i.cssfullscreen&&i.exitCssFullscreen();else if(i.fullscreen){n();var a=cC(i),s=a._fullScreenOffset;a.config.needFullscreenScroll?(window.scrollTo(s.left,s.top),hT.setTimeout(cC(i),(function(){i.fullscreen=!1,i._fullScreenOffset=null}),100)):(!i.config.closeFocusVideoFocus&&i.media.focus(),i.fullscreen=!1,i._fullScreenOffset=null),i.cssfullscreen?i.removeClass(JS):i.recoverFullStyle(i.root,i._fullscreenEl,JS),i._fullscreenEl=null,i.emit(WT,!1)}})),aC(cC(i),"_onWebkitbeginfullscreen",(function(e){i._fullscreenEl=i.media,i.onFullscreenChange(e,!0)})),aC(cC(i),"_onWebkitendfullscreen",(function(e){i.onFullscreenChange(e,!1)})),wS(cC(i),xA),i.config=o,i._pluginInfoId=hT.generateSessionId(),(r=cC(i)).logInfo=uT.logInfo.bind(r),r.logWarn=uT.logWarn.bind(r),r.logError=uT.logError.bind(r);var a=i.constructor.defaultPreset;if(i.config.presets.length){var s,l=iw(s=i.config.presets).call(s,"default");l>=0&&a&&(i.config.presets[l]=a)}else a&&i.config.presets.push(a);if(i.userTimer=null,i.waitTimer=null,i._state=yA,i.isError=!1,i._hasStart=!1,i.isSeeking=!1,i.isCanplay=!1,i._useAutoplay=!1,i.rotateDeg=0,i.isActive=!1,i.fullscreen=!1,i.cssfullscreen=!1,i.isRotateFullscreen=!1,i._fullscreenEl=null,i._cssfullscreenEl=null,i.curDefinition=null,i._orgCss="",i._fullScreenOffset=null,i._videoHeight=0,i._videoWidth=0,i.videoPos={pi:1,scale:0,rotate:0,x:0,y:0,h:-1,w:-1,vy:0,vx:0},i._accPlayed={t:0,acc:0,loopAcc:0},i.innerContainer=null,i.controls=null,i.topBar=null,i.root=null,i.__i18n=gA.init(i._pluginInfoId),mT.os.isAndroid&&mT.osVersion>0&&mT.osVersion<6&&(i.config.autoplay=!1),i.database=new hS,i.isUserActive=!1,i._onceSeekCanplay=null,i._isPauseBeforeSeek=0,!i._initDOM())return console.error(new Error("can't find the dom which id is ".concat(i.config.id," or this.config.el does not exist"))),hC(i);var u=i.config,c=u.definition,h=void 0===c?{}:c;if(!u.url&&h.list&&h.list.length>0){var f,d=Vm(f=h.list).call(f,(function(e){return e.definition&&e.definition===h.defaultDefinition}));d||(h.defaultDefinition=h.list[0].definition,d=h.list[0]),i.config.url=d.url,i.curDefinition=d}return i._bindEvents(),i._registerPresets(),i._registerPlugins(),BS.onPluginsReady(cC(i)),i.getInitDefinition(),i.setState(mA),hT.setTimeout(cC(i),(function(){i.emit(FT)}),0),i.onReady&&i.onReady(),(i.config.videoInit||i.config.autoplay)&&(!i.hasStart||i.state<bA)&&i.start(),i}return oC(n,[{key:"_initDOM",value:function(){var e,t,n,i=this;if(this.root=this.config.id?document.getElementById(this.config.id):null,!this.root){var r=this.config.el;if(!r||1!==r.nodeType)return this.emit(TT,new wT("use",this.config.vid,{line:32,handle:"Constructor",msg:"container id can't be empty"})),console.error("this.confg.id or this.config.el can't be empty"),!1;this.root=r}var o=BS.checkPlayerRoot(this.root);o&&(uT.logWarn("The is an Player instance already exists in this.root, destroy it and reinitialize"),o.destroy()),this.root.setAttribute(vS,this.playerId),BS.init(this),this._initBaseDoms();var a=this.constructor.XgVideoProxy;if(a&&this.mediaConfig.mediaType===a.mediaType){var s=this.innerContainer||this.root;this.detachVideoEvents(this.media);var l=new a(s,this.config,this.mediaConfig);this.attachVideoEvents(l),this.media=l}if(this.media.setAttribute(vS,this.playerId),this.config.controls){var u=this.config.controls.root||null,c=BS.register(this,hA,{root:u});this.controls=c}var h="mobile"===this.config.isMobileSimulateMode?"mobile":mT.device;if(this.addClass(Mm(e=Mm(t=Mm(n="".concat(VS," ")).call(n,$S," xgplayer-")).call(t,h," ")).call(e,this.config.controls?"":rA)),this.config.autoplay?this.addClass(GS):this.addClass(ZS),this.config.fluid){var f=this.config,d=f.width,p=f.height;"number"==typeof d&&"number"==typeof p||(d=600,p=337.5);var v={width:"100%",height:"0","max-width":"100%","padding-top":"".concat(100*p/d,"%")};rw(v).forEach((function(e){i.root.style[e]=v[e]}))}else["width","height"].forEach((function(e){i.config[e]&&("number"!=typeof i.config[e]?i.root.style[e]=i.config[e]:i.root.style[e]="".concat(i.config[e],"px"))}));return!0}},{key:"_initBaseDoms",value:function(){this.topBar=null,this.leftBar=null,this.rightBar=null,this.config.marginControls&&(this.innerContainer=hT.createDom("xg-video-container","",{"data-index":-1},"xg-video-container"),this.root.appendChild(this.innerContainer))}},{key:"_bindEvents",value:function(){var e=this;["focus","blur"].forEach((function(t){e.on(t,e["on"+t.charAt(0).toUpperCase()+ow(t).call(t,1)])})),fS.forEach((function(t){document&&document.addEventListener(t,e.onFullscreenChange)})),mT.os.isIos&&(this.media.addEventListener("webkitbeginfullscreen",this._onWebkitbeginfullscreen),this.media.addEventListener("webkitendfullscreen",this._onWebkitendfullscreen)),this.once(MT,this.resize),this.playFunc=function(){e.config.closeFocusVideoFocus||e.media.focus()},this.once(ET,this.playFunc)}},{key:"_unbindEvents",value:function(){var e=this;this.root.removeEventListener("mousemove",this.mousemoveFunc),fS.forEach((function(t){document.removeEventListener(t,e.onFullscreenChange)})),this.playFunc&&this.off(ET,this.playFunc),this.off(OT,this.canPlayFunc),this.media.removeEventListener("webkitbeginfullscreen",this._onWebkitbeginfullscreen),this.media.removeEventListener("webkitendfullscreen",this._onWebkitendfullscreen)}},{key:"_startInit",value:function(e){var t=this;if(this.media&&(e&&""!==e&&("Array"!==hT.typeOf(e)||0!==e.length)||(e="",this.emit(HT),uT.logWarn("config.url is null, please get url and run player._startInit(url)"),!this.config.nullUrlStart))){this._detachSourceEvents(this.media),"Array"===hT.typeOf(e)&&e.length>0?this._attachSourceEvents(this.media,e):this.media.src&&this.media.src===e?e||this.media.removeAttribute("src"):this.media.src=e,"Number"===hT.typeOf(this.config.volume)&&(this.volume=this.config.volume);var n=this.innerContainer?this.innerContainer:this.root;this.media instanceof window.Element&&!n.contains(this.media)&&n.insertBefore(this.media,n.firstChild);var i=this.media.readyState;uT.logInfo("_startInit readyState",i),this.config.autoplay&&(!/^blob/.test(this.media.currentSrc)&&!/^blob/.test(this.media.src)&&this.load(),(mT.os.isIpad||mT.os.isPhone)&&this.mediaPlay()),i>=2?this.canPlayFunc():this.once(OT,this.canPlayFunc),(!this.hasStart||this.state<bA)&&BS.afterInit(this),this.hasStart=!0,this.setState(bA),hT.setTimeout(this,(function(){t.emit(BT)}),0)}}},{key:"_registerPlugins",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._loadingPlugins=[];var n=this.config.ignores||[],i=this.config.plugins||[],r=this.config.i18n||[];t&&gA.extend(r,this.__i18n);var o=n.join("||").toLowerCase().split("||"),a=this.plugins;i.forEach((function(n){try{var i=n.plugin?n.plugin.pluginName:n.pluginName;if(i&&iw(o).call(o,i.toLowerCase())>-1)return null;if(!t&&a[i.toLowerCase()])return;if(n.lazy&&n.loader){var r=BS.lazyRegister(e,n);return void(n.forceBeforeInit&&(r.then((function(){var t,n;Tw(t=e._loadingPlugins).call(t,iw(n=e._loadingPlugins).call(n,r),1)})).catch((function(t){var n,i;uT.logError("_registerPlugins:loadingPlugin",t),Tw(n=e._loadingPlugins).call(n,iw(i=e._loadingPlugins).call(i,r),1)})),e._loadingPlugins.push(r)))}return e.registerPlugin(n)}catch(s){uT.logError("_registerPlugins:",s)}}))}},{key:"_registerPresets",value:function(){var e=this;this.config.presets.forEach((function(t){!function(e,t){var n,i,r,o=t.preset&&t.options?new t.preset(t.options,e.config):new t({},e.config),a=o.plugins,s=void 0===a?[]:a,l=o.ignores,u=void 0===l?[]:l,c=o.icons,h=void 0===c?{}:c,f=o.i18n,d=void 0===f?[]:f;e.config.plugins||(e.config.plugins=[]),e.config.ignores||(e.config.ignores=[]),(i=e.config.plugins).push.apply(i,pC(s)),(r=e.config.ignores).push.apply(r,pC(u)),Mk(n=rw(h)).call(n,(function(t){e.config.icons[t]||(e.config.icons[t]=h[t])}));var p=e.config.i18n||[];d.push.apply(d,pC(p)),e.config.i18n=d}(e,t)}))}},{key:"_getRootByPosition",value:function(e){var t=null;switch(e){case LS.ROOT_RIGHT:this.rightBar||(this.rightBar=hT.createPositionBar("xg-right-bar",this.root)),t=this.rightBar;break;case LS.ROOT_LEFT:this.leftBar||(this.leftBar=hT.createPositionBar("xg-left-bar",this.root)),t=this.leftBar;break;case LS.ROOT_TOP:this.topBar||(this.topBar=hT.createPositionBar("xg-top-bar",this.root),this.config.topBarAutoHide&&hT.addClass(this.topBar,sA)),t=this.topBar;break;default:t=this.innerContainer||this.root}return t}},{key:"registerPlugin",value:function(e,t){var n=BS.formatPluginInfo(e,t),i=n.PLUFGIN,r=n.options,o=this.config.plugins;!BS.checkPluginIfExits(i.pluginName,o)&&o.push(i);var a=BS.getRootByConfig(i.pluginName,this.config);a.root&&(r.root=a.root),a.position&&(r.position=a.position);var s=r.position?r.position:r.config&&r.config.position||i.defaultConfig&&i.defaultConfig.position;return!r.root&&"string"==typeof s&&iw(s).call(s,"controls")>-1?this.controls&&this.controls.registerPlugin(i,r,i.pluginName):(r.root||(r.root=this._getRootByPosition(s)),BS.register(this,i,r))}},{key:"deregister",value:function(e){"string"==typeof e?BS.unRegister(this,e):e instanceof TS&&BS.unRegister(this,e.pluginName)}},{key:"unRegisterPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.deregister(e),t&&this.removePluginFromConfig(e)}},{key:"removePluginFromConfig",value:function(e){var t;if("string"==typeof e?t=e:e instanceof TS&&(t=e.pluginName),t)for(var n=this.config.plugins.length-1;n>-1;n--){if(this.config.plugins[n].pluginName.toLowerCase()===t.toLowerCase()){var i;Tw(i=this.config.plugins).call(i,n,1);break}}}},{key:"plugins",get:function(){return BS.getPlugins(this)}},{key:"getPlugin",value:function(e){var t=BS.findPlugin(this,e);return t&&t.pluginName?t:null}},{key:"addClass",value:function(e){this.root&&(hT.hasClass(this.root,e)||hT.addClass(this.root,e))}},{key:"removeClass",value:function(e){this.root&&hT.removeClass(this.root,e)}},{key:"hasClass",value:function(e){if(this.root)return hT.hasClass(this.root,e)}},{key:"setAttribute",value:function(e,t){this.root&&this.root.setAttribute(e,t)}},{key:"removeAttribute",value:function(e,t){this.root&&this.root.removeAttribute(e,t)}},{key:"start",value:function(e){var t=this;if(!(this.state>_A))return e||this.config.url||this.getInitDefinition(),this.hasStart=!0,this.setState(_A),this._registerPlugins(!1),BS.beforeInit(this).then((function(){if(t.config)return e||(e=t.url||t.config.url),t._startInit(e)})).catch((function(e){throw e.fileName="player",e.lineNumber="236",uT.logError("start:beforeInit:",e),e}))}},{key:"switchURL",value:function(e,t){var n=this,i=e;"Object"===hT.typeOf(e)&&(i=e.url);var r=this.currentTime,o=this.paused&&!this.isError;return this.src=i,new Lk((function(e,t){var a=function(e){n.off("timeupdate",s),n.off("canplay",s),t(e)},s=function(){n.currentTime=r,o&&n.pause(),n.off("error",a),e(!0)};n.once("error",a),i?(mT.os.isAndroid?n.once("timeupdate",s):n.once("canplay",s),n.play()):n.errorHandler("error",{code:6,message:"empty_src"})}))}},{key:"videoPlay",value:function(){this.mediaPlay()}},{key:"mediaPlay",value:function(){var e=this;if(!this.hasStart&&this.state<bA)return this.removeClass(ZS),this.addClass(GS),this.start(),void(this._useAutoplay=!0);this.state<wA&&(this.removeClass(ZS),!this.isCanplay&&this.addClass(GS));var t=dC(lC(n.prototype),"play",this).call(this);return void 0!==t&&t&&t.then?t.then((function(){e.removeClass(lA),e.addClass(KS),e.state<wA&&(uT.logInfo(">>>>playPromise.then"),e.setState(wA),e.emit(UT))})).catch((function(t){if(uT.logWarn(">>>>playPromise.catch",t.name),e.media&&e.media.error)return e.onError(),void e.removeClass(GS);"NotAllowedError"===t.name&&(e._errorTimer=hT.setTimeout(e,(function(){e._errorTimer=null,e.emit(jT),e.addClass(lA),e.removeClass(GS),e.pause(),e.setState(kA)}),0))})):(uT.logWarn("video.play not return promise"),this.state<wA&&(this.setState(wA),this.removeClass(lA),this.removeClass(ZS),this.removeClass(GS),this.addClass(KS),this.emit(UT))),t}},{key:"mediaPause",value:function(){dC(lC(n.prototype),"pause",this).call(this)}},{key:"videoPause",value:function(){dC(lC(n.prototype),"pause",this).call(this)}},{key:"play",value:function(){var e=this;return this.removeClass(zS),CS(this,"play",(function(){return e.mediaPlay()}))}},{key:"pause",value:function(){var e=this;CS(this,"pause",(function(){dC(lC(n.prototype),"pause",e).call(e)}))}},{key:"seek",value:function(e,t){var n=this;if(this.media&&!Sw(Number(e))&&this.hasStart){var i=this.config,r=i.isSeekedPlay,o=i.seekedStatus,a=t||(r?"play":o);e=e<0?0:e>this.duration?qw(this.duration,10):e,!this._isPauseBeforeSeek&&(this._isPauseBeforeSeek=this.paused?2:1),this._onceSeekCanplay&&this.off(ST,this._onceSeekCanplay),this._onceSeekCanplay=function(){switch(n.removeClass(GS),n.isSeeking=!1,a){case"play":n.play();break;case"pause":n.pause();break;default:n._isPauseBeforeSeek>1||n.paused?n.pause():n.play()}n._isPauseBeforeSeek=0,n._onceSeekCanplay=null},this.once(ST,this._onceSeekCanplay),this.state<wA?(this.removeClass(ZS),this.currentTime=e,this.play()):this.currentTime=e}}},{key:"getInitDefinition",value:function(){var e,t=this,n=this.config,i=n.definition;!n.url&&i&&i.list&&i.list.length>0&&i.defaultDefinition&&Mk(e=i.list).call(e,(function(e){e.definition===i.defaultDefinition&&(t.config.url=e.url,t.curDefinition=e)}))}},{key:"changeDefinition",value:function(e,t){var n=this,i=this.config.definition;if(Array.isArray(null==i?void 0:i.list)&&i.list.forEach((function(t){(null==e?void 0:e.definition)===t.definition&&(n.curDefinition=t)})),null!=e&&e.bitrate&&"number"!=typeof e.bitrate&&(e.bitrate=qw(e.bitrate,10)||0),this.emit(qT,{from:t,to:e}),this.hasStart){var r=this.switchURL(e.url,tC({seamless:!1!==i.seamless&&"undefined"!=typeof MediaSource&&"function"==typeof MediaSource.isTypeSupported},e));r&&r.then?r.then((function(){n.emit($T,{from:t,to:e})})):this.emit($T,{from:t,to:e})}else this.config.url=e.url}},{key:"reload",value:function(){this.load(),this.reloadFunc=function(){this.play()},this.once(MT,this.reloadFunc)}},{key:"resetState",value:function(){var e=this,t=[lA,KS,ZS,zS,qS,GS,WS,XS,YS];this.hasStart=!1,this.isError=!1,this._useAutoplay=!1,this.mediaPause(),this._accPlayed.acc=0,this._accPlayed.t=0,this._accPlayed.loopAcc=0,t.forEach((function(t){e.removeClass(t)})),this.addClass(GS),this.emit(rS)}},{key:"reset",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;if(this.resetState(),this.plugins&&(Mk(t).call(t,(function(t){e.deregister(t)})),n)){var i,r=cA();iE(i=rw(this.config)).call(i,(function(t){"undefined"===e.config[t]||"plugins"!==t&&"presets"!==t&&"el"!==t&&"id"!==t||(e.config[t]=r[t])}))}}},{key:"destroy",value:function(){var e,t=this,i=this.innerContainer,r=this.root,o=this.media;if(r&&o){if(this.hasStart=!1,this._useAutoplay=!1,r.removeAttribute(vS),this.updateAcc("destroy"),this._unbindEvents(),this._detachSourceEvents(this.media),hT.clearAllTimers(this),this.emit(GT),BS.destroy(this),ES(this),dC(lC(n.prototype),"destroy",this).call(this),this.fullscreen&&this._fullscreenEl===this.root&&this.exitFullscreen(),i)for(var a=i.children,s=0;s<a.length;s++)i.removeChild(a[s]);!i&&o instanceof window.Node&&r.contains(o)&&r.removeChild(o),Mk(e=["topBar","leftBar","rightBar","innerContainer"]).call(e,(function(e){t[e]&&r.removeChild(t[e]),t[e]=null}));var l=r.className.split(" ");l.length>0?r.className=Dk(l).call(l,(function(e){return iw(e).call(e,"xgplayer")<0})).join(" "):r.className="",this.removeAttribute("data-xgfill"),["isSeeking","isCanplay","isActive","cssfullscreen","fullscreen"].forEach((function(e){t[e]=!1}))}}},{key:"replay",value:function(){var e=this;this.removeClass(WS),this.currentTime=0,this.isSeeking=!1,CS(this,"replay",(function(){e.once(ST,(function(){var t=e.mediaPlay();t&&t.catch&&t.catch((function(e){console.log(e)}))})),e.play(),e.emit(VT),e.onPlay()}))}},{key:"retry",value:function(){var e=this;this.removeClass(XS),this.addClass(YS),CS(this,"retry",(function(){var t=e.currentTime;e.src=e.config.url,!e.config.isLive&&(e.currentTime=t),e.once(OT,(function(){e.mediaPlay()}))}))}},{key:"changeFullStyle",value:function(e,t,n,i){e&&(i||(i=nA),this._orgCss||(this._orgCss=hT.filterStyleFromText(e)),hT.addClass(e,n),t&&t!==e&&!this._orgPCss&&(this._orgPCss=hT.filterStyleFromText(t),hT.addClass(t,i),t.setAttribute(vS,this.playerId)))}},{key:"recoverFullStyle",value:function(e,t,n,i){i||(i=nA),this._orgCss&&(hT.setStyleFromCsstext(e,this._orgCss),this._orgCss=""),hT.removeClass(e,n),t&&t!==e&&this._orgPCss&&(hT.setStyleFromCsstext(t,this._orgPCss),this._orgPCss="",hT.removeClass(t,i),t.removeAttribute(vS))}},{key:"getFullscreen",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.fullscreenTarget,t=this.root,n=this.media;if(e||(e=t),this._fullScreenOffset={top:hT.scrollTop(),left:hT.scrollLeft()},this._fullscreenEl=e,this._fullActionFrom="get",hT.getFullScreenEl()!==this._fullscreenEl)try{for(var i=0;i<dS.length;i++){var r=dS[i];if(e[r]){var o="webkitRequestFullscreen"===r?e.webkitRequestFullscreen(window.Element.ALLOW_KEYBOARD_INPUT):e[r]();return o&&o.then?o:Lk.resolve()}}return n.fullscreenEnabled||n.webkitSupportsFullscreen?(n.webkitEnterFullscreen(),Lk.resolve()):Lk.reject(new Error("call getFullscreen fail"))}catch(a){return Lk.reject(new Error("call getFullscreen fail"))}else this.onFullscreenChange()}},{key:"exitFullscreen",value:function(e){if(this.isRotateFullscreen&&this.exitRotateFullscreen(),this._fullscreenEl||hT.getFullScreenEl()){this.root;var t=this.media;this._fullActionFrom="exit";try{for(var n=0;n<pS.length;n++){var i=pS[n];if(document[i]){var r=document[i]();return r&&r.then?r:Lk.resolve()}}return t&&t.webkitSupportsFullscreen?(t.webkitExitFullScreen(),Lk.resolve()):Lk.reject(new Error("call exitFullscreen fail"))}catch(o){return Lk.reject(new Error("call exitFullscreen fail"))}}}},{key:"getCssFullscreen",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.fullscreenTarget;this.isRotateFullscreen?this.exitRotateFullscreen():this.fullscreen&&this.exitFullscreen();var n=t?Mm(e="".concat(iA," ")).call(e,QS):QS;this.changeFullStyle(this.root,t,n);var i=this.config.fullscreen,r=void 0===i?{}:i;(!0===r.useCssFullscreen||"function"==typeof r.useCssFullscreen&&r.useCssFullscreen())&&(this.fullscreen=!0,this.emit(WT,!0)),this._cssfullscreenEl=t,this.cssfullscreen=!0,this.emit(YT,!0)}},{key:"exitCssFullscreen",value:function(){var e,t=this._cssfullscreenEl?Mm(e="".concat(iA," ")).call(e,QS):QS;if(this.fullscreen){var n=this.config.fullscreen,i=void 0===n?{}:n;!0===i.useCssFullscreen||"function"==typeof i.useCssFullscreen&&i.useCssFullscreen()?(this.recoverFullStyle(this.root,this._cssfullscreenEl,t),this.fullscreen=!1,this.emit(WT,!1)):this.removeClass(t)}else this.recoverFullStyle(this.root,this._cssfullscreenEl,t);this._cssfullscreenEl=null,this.cssfullscreen=!1,this.emit(YT,!1)}},{key:"getRotateFullscreen",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.fullscreenTarget;this.cssfullscreen&&this.exitCssFullscreen(t);var n=t?Mm(e="".concat(iA," ")).call(e,eA):eA;this._fullscreenEl=t||this.root,this.changeFullStyle(this.root,t,n,tA),this.isRotateFullscreen=!0,this.fullscreen=!0,this.setRotateDeg(90),this._rootStyle=this.root.getAttribute("style"),this.root.style.width="".concat(window.innerHeight,"px"),this.emit(WT,!0)}},{key:"exitRotateFullscreen",value:function(e){var t,n=this._fullscreenEl!==this.root?Mm(t="".concat(iA," ")).call(t,eA):eA;this.recoverFullStyle(this.root,this._fullscreenEl,n,tA),this.isRotateFullscreen=!1,this.fullscreen=!1,this.setRotateDeg(0),this.emit(WT,!1),this._rootStyle&&(this.root.style.style=this._rootStyle,this._rootStyle=!1)}},{key:"setRotateDeg",value:function(e){90===window.orientation||-90===window.orientation?this.rotateDeg=0:this.rotateDeg=e}},{key:"focus",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{autoHide:!this.config.closeDelayBlur,delay:this.config.inactive};this.isActive?this.onFocus(e):this.emit(DT,tC({paused:this.paused,ended:this.ended},e))}},{key:"blur",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{ignorePaused:!1};this.isActive?this.emit(NT,tC({paused:this.paused,ended:this.ended},e)):this.onBlur(e)}},{key:"onFocus",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.autoHide,i=void 0===n?!this.config.closePlayerBlur:n,r=t.delay,o=void 0===r?this.config.inactive:r;this.isActive=!0,this.removeClass($S),this.userTimer&&(hT.clearTimeout(this,this.userTimer),this.userTimer=null),i?this.userTimer=hT.setTimeout(this,(function(){e.userTimer=null,e.blur()}),o):this.userTimer&&(hT.clearTimeout(this,this.userTimer),this.userTimer=null)}},{key:"onBlur",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).ignorePaused,t=void 0!==e&&e;if(this.isActive){var n=this.config.closePauseVideoFocus;this.isActive=!1,(t||n||!this.paused&&!this.ended)&&this.addClass($S)}}},{key:"onEmptied",value:function(){this.updateAcc("emptied")}},{key:"onCanplay",value:function(){this.removeClass(GS),this.removeClass(XS),this.removeClass(YS),this.isCanplay=!0,this.waitTimer&&hT.clearTimeout(this,this.waitTimer)}},{key:"onLoadeddata",value:function(){this.isError=!1,this.isSeeking=!1}},{key:"onLoadstart",value:function(){this.removeClass(XS),this.isCanplay=!1}},{key:"onPlay",value:function(){this.state===EA&&this.setState(wA),this.removeClass(zS),this.ended&&this.removeClass(WS),!this.config.closePlayVideoFocus&&this.focus()}},{key:"onPause",value:function(){this.addClass(zS),this.updateAcc("pause"),this.config.closePauseVideoFocus||(this.userTimer&&(hT.clearTimeout(this,this.userTimer),this.userTimer=null),this.focus())}},{key:"onEnded",value:function(){this.updateAcc("ended"),this.addClass(WS),this.setState(EA)}},{key:"onError",value:function(){this.isError=!0,this.updateAcc("error"),this.removeClass(lA),this.removeClass(ZS),this.removeClass(GS),this.removeClass(YS),this.addClass(XS)}},{key:"onSeeking",value:function(){this.isSeeking||this.updateAcc("seeking"),this.isSeeking=!0,this.addClass(uA)}},{key:"onSeeked",value:function(){this.isSeeking=!1,this.waitTimer&&hT.clearTimeout(this,this.waitTimer),this.removeClass(YS),this.removeClass(uA)}},{key:"onWaiting",value:function(){var e=this;this.waitTimer&&hT.clearTimeout(this,this.waitTimer),this.updateAcc("waiting"),this.waitTimer=hT.setTimeout(this,(function(){e.addClass(YS),hT.clearTimeout(e,e.waitTimer),e.waitTimer=null}),this.config.minWaitDelay)}},{key:"onPlaying",value:function(){var e=this;this.isError=!1,[ZS,zS,WS,XS,qS,YS].forEach((function(t){e.removeClass(t)}))}},{key:"onTimeupdate",value:function(){!this._videoHeight&&this.resize(),(this.waitTimer||this.hasClass(YS))&&this.media.readyState>2&&(this.removeClass(YS),hT.clearTimeout(this,this.waitTimer),this.waitTimer=null),!this.paused&&this.state<wA&&this.duration&&(this.setState(wA),this.emit(UT)),this._accPlayed.t||this.paused||this.ended||(this._accPlayed.t=(new Date).getTime())}},{key:"onVolumechange",value:function(){"Number"===hT.typeOf(this.config.volume)&&(this.config.volume=this.volume)}},{key:"onRatechange",value:function(){this.config.defaultPlaybackRate=this.playbackRate}},{key:"emitUserAction",value:function(e,t,n){if(this.media&&t&&e){var i="String"===hT.typeOf(e)?e:e.type||"";n.props&&"Array"!==hT.typeOf(n.props)&&(n.props=[n.props]),this.emit(iS,tC({eventType:i,action:t,currentTime:this.currentTime,duration:this.duration,ended:this.ended,event:e},n))}}},{key:"updateAcc",value:function(e){if(this._accPlayed.t){var t=(new Date).getTime()-this._accPlayed.t;this._accPlayed.acc+=t,this._accPlayed.t=0,("ended"===e||this.ended)&&(this._accPlayed.loopAcc=this._accPlayed.acc)}}},{key:"checkBuffer",value:function(e){var t=this.media.buffered;if(!t||0===t.length||!this.duration)return!0;for(var n=e||this.media.currentTime||.2,i=t.length,r=0;r<i;r++)if(t.start(r)<=n&&t.end(r)>n)return!0;return!1}},{key:"resizePosition",value:function(){var e=this.videoPos,t=e.rotate,n=e.vy,i=e.vx,r=e.h,o=e.w,a=this.videoPos._pi;if(a||(a=this.media.videoWidth/this.media.videoHeight*100),a){this.videoPos.pi=a;var s={rotate:t},l=0,u=0,c=1,h=Math.abs(t/90),f=this.root,d=this.innerContainer,p=f.offsetWidth,v=d?d.offsetHeight:f.offsetHeight,g=v,y=p;if(h%2==0)c=r>0?100/r:o>0?100/o:1,s.scale=c,l=n>0?(100-r)/2-n:0,s.y=2===h?0-l:l,u=i>0?(100-o)/2-i:0,s.x=2===h?0-u:u,this.media.style.width="".concat(y,"px"),this.media.style.height="".concat(g,"px");else if(h%2==1){g=p;var m=v-p;u=-m/2/(y=v)*100,s.x=3===h?u+n/2:u-n/2,l=m/2/g*100,s.y=3===h?l+i/2:l-i/2,s.scale=c,this.media.style.width="".concat(y,"px"),this.media.style.height="".concat(g,"px")}var _=hT.getTransformStyle(s);this.media.style.transform=_,this.media.style.webkitTransform=_}}},{key:"position",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{h:0,y:0,x:0,w:0};if(this.media&&e&&e.h){var t=this.videoPos;t.h=100*e.h||0,t.w=100*e.w||0,t.vx=100*e.x||0,t.vy=100*e.y||0,this.resizePosition()}}},{key:"setConfig",value:function(e){var t,n=this;e&&Mk(t=rw(e)).call(t,(function(t){if("plugins"!==t){n.config[t]=e[t];var i=n.plugins[t.toLowerCase()];i&&"Function"===hT.typeOf(i.setConfig)&&i.setConfig(e[t])}}))}},{key:"playNext",value:function(e){var t=this;this.resetState(),this.setConfig(e),this._currentTime=0,this._duration=0,CS(this,"playnext",(function(){t.start(),t.emit(tS,e)}))}},{key:"resize",value:function(){var e=this;if(this.media){var t=this.media,n=t.videoWidth,i=t.videoHeight,r=this.config,o=r.fitVideoSize,a=r.videoFillMode;if("fill"!==a&&"cover"!==a||this.setAttribute("data-xgfill",a),i&&n){this._videoHeight=i,this._videoWidth=n;var s=this.root.getBoundingClientRect(),l=this.controls&&this.innerContainer?this.controls.root.getBoundingClientRect().height:0,u=s.width,c=s.height-l,h=qw(n/i*1e3,10),f=qw(u/c*1e3,10),d=u,p=c,v={};"auto"===o&&f>h||"fixWidth"===o?(p=u/h*1e3,this.config.fluid?v.paddingTop="".concat(100*p/d,"%"):v.height="".concat(p+l,"px")):("auto"===o&&f<h||"fixHeight"===o)&&(d=h*c/1e3,v.width="".concat(d,"px")),this.fullscreen||this.cssfullscreen||rw(v).forEach((function(t){e.root.style[t]=v[t]})),("fillHeight"===a&&f<h||"fillWidth"===a&&f>h)&&this.setAttribute("data-xgfill","cover");var g={videoScale:h,vWidth:d,vHeight:p,cWidth:d,cHeight:p+l};this.resizePosition(),this.emit(QT,g)}}}},{key:"updateObjectPosition",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.media.updateObjectPosition?this.media.updateObjectPosition(t,n):this.media.style.objectPosition=Mm(e="".concat(100*t,"% ")).call(e,100*n,"%")}},{key:"setState",value:function(e){var t;uT.logInfo("setState",Mm(t="state from:".concat(CA[this.state]," to:")).call(t,CA[e])),this._state=e}},{key:"state",get:function(){return this._state}},{key:"isFullscreen",get:function(){return this.fullscreen}},{key:"isCssfullScreen",get:function(){return this.cssfullscreen}},{key:"hasStart",get:function(){return this._hasStart},set:function(e){"boolean"==typeof e&&(this._hasStart=e,!1===e&&this.setState(mA),this.emit("hasstart"))}},{key:"isPlaying",get:function(){return this._state===wA||this._state===EA},set:function(e){e?this.setState(wA):this._state>=wA&&this.setState(bA)}},{key:"definitionList",get:function(){return this.config&&this.config.definition&&this.config.definition.list||[]},set:function(e){var t=this,n=this.config.definition,i=null,r=null;n.list=e,this.emit("resourceReady",e),e.forEach((function(e){var o;(null===(o=t.curDefinition)||void 0===o?void 0:o.definition)===e.definition&&(i=e),n.defaultDefinition===e.definition&&(r=e)})),!r&&e.length>0&&(r=e[0]),i?this.changeDefinition(i):r&&this.changeDefinition(r)}},{key:"videoFrameInfo",get:function(){var e={total:0,dropped:0,corrupted:0,droppedRate:0,droppedDuration:0};if(!this.media||!this.media.getVideoPlaybackQuality)return e;var t=this.media.getVideoPlaybackQuality();return e.dropped=t.droppedVideoFrames||0,e.total=t.totalVideoFrames||0,e.corrupted=t.corruptedVideoFrames||0,e.total>0&&(e.droppedRate=e.dropped/e.total*100,e.droppedDuration=qw(this.cumulateTime/e.total*e.dropped,0)),e}},{key:"lang",get:function(){return this.config.lang},set:function(e){var t,n;0!==Dk(t=gA.langKeys).call(t,(function(t){return t===e})).length||"zh"===e?(this.config.lang=e,BS.setLang(e,this)):console.error(Mm(n="Sorry, set lang fail, because the language [".concat(e,"] is not supported now, list of all supported languages is [")).call(n,gA.langKeys.join(),"] "))}},{key:"i18n",get:function(){var e=this.config.lang;return"zh"===e&&(e="zh-cn"),this.__i18n.lang[e]||this.__i18n.lang.en}},{key:"i18nKeys",get:function(){return this.__i18n.textKeys||{}}},{key:"version",get:function(){return _T}},{key:"playerId",get:function(){return this._pluginInfoId}},{key:"url",get:function(){return this.__url||this.config.url},set:function(e){this.__url=e}},{key:"poster",get:function(){return this.plugins.poster?this.plugins.poster.config.poster:this.config.poster},set:function(e){this.plugins.poster&&this.plugins.poster.update(e)}},{key:"readyState",get:function(){return dC(lC(n.prototype),"readyState",this)}},{key:"error",get:function(){var e=dC(lC(n.prototype),"error",this);return this.i18n[e]||e}},{key:"networkState",get:function(){return dC(lC(n.prototype),"networkState",this)}},{key:"fullscreenChanging",get:function(){return!(null===this._fullScreenOffset)}},{key:"cumulateTime",get:function(){var e=this._accPlayed;return this.updateAcc("get"),e.acc}},{key:"zoom",get:function(){return this.config.zoom},set:function(e){this.config.zoom=e}},{key:"videoRotateDeg",get:function(){return this.videoPos.rotate},set:function(e){(e=hT.convertDeg(e))%90==0&&e!==this.videoPos.rotate&&(this.videoPos.rotate=e,this.resizePosition())}},{key:"avgSpeed",get:function(){return SA},set:function(e){SA=e}},{key:"realTimeSpeed",get:function(){return TA},set:function(e){TA=e}},{key:"hook",value:function(e,t){var n;return yS.call.apply(yS,Mm(n=[this]).call(n,ow(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){var n;return mS.call.apply(mS,Mm(n=[this]).call(n,ow(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){var n;return _S.call.apply(_S,Mm(n=[this]).call(n,ow(Array.prototype).call(arguments)))}},{key:"usePluginHooks",value:function(e,t,n){for(var i,r=arguments.length,o=new Array(r>3?r-3:0),a=3;a<r;a++)o[a-3]=arguments[a];return bS.call.apply(bS,Mm(i=[this]).call(i,ow(Array.prototype).call(arguments)))}},{key:"removePluginHooks",value:function(e,t,n){for(var i,r=arguments.length,o=new Array(r>3?r-3:0),a=3;a<r;a++)o[a-3]=arguments[a];return kS.call.apply(kS,Mm(i=[this]).call(i,ow(Array.prototype).call(arguments)))}},{key:"setUserActive",value:function(e,t){"boolean"==typeof t&&t!==this.muted&&(this.addInnerOP("volumechange"),this.muted=t),BS.setCurrentUserActive(this.playerId,e)}}],[{key:"debugger",get:function(){return uT.config.debug},set:function(e){uT.config.debug=e}},{key:"getCurrentUserActivePlayerId",value:function(){return BS.getCurrentUseActiveId()}},{key:"setCurrentUserActive",value:function(e,t){BS.setCurrentUserActive(e,t)}},{key:"isHevcSupported",value:function(){return mT.isHevcSupported()}},{key:"probeConfigSupported",value:function(e){return mT.probeConfigSupported(e)}},{key:"install",value:function(e,t){n.plugins||(n.plugins={}),n.plugins[e]||(n.plugins[e]=t)}},{key:"use",value:function(e,t){n.plugins||(n.plugins={}),n.plugins[e]=t}}]),n}(cS);aC(AA,"defaultPreset",null),aC(AA,"XgVideoProxy",null);function PA(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var OA=EE;Pn({target:"Function",proto:!0,forced:Function.bind!==OA},{bind:OA});var IA,RA,MA=Bc("Function").bind,LA=se,DA=MA,NA=Function.prototype,FA=n((function(e){var t=e.bind;return e===NA||LA(NA,e)&&t===NA.bind?DA:t}));function HA(e,t){var n;return(HA=hh?FA(n=hh).call(n):function(e,t){return e.__proto__=t,e})(e,t)}function UA(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Oc(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Ac(e,"prototype",{writable:!1}),t&&HA(e,t)}function jA(e){var t;return(jA=hh?FA(t=Dc).call(t):function(e){return e.__proto__||Dc(e)})(e)}function BA(){if("undefined"==typeof Reflect||!UE)return!1;if(UE.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(UE(Boolean,[],(function(){}))),!0}catch(e){return!1}}function VA(e){var t=BA();return function(){var n,i=jA(e);if(t){var r=jA(this).constructor;n=UE(i,arguments,r)}else n=i.apply(this,arguments);return function(e,t){if(t&&("object"===bc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return PA(e)}(this,n)}}function GA(e,t,n){var i;BA()?GA=FA(i=UE).call(i):GA=function(e,t,n){var i=[null];uh(i).apply(i,t);var r=new(FA(Function).apply(e,i));return n&&HA(r,n.prototype),r};return GA.apply(null,arguments)}function zA(e){var t="function"==typeof Tk?new Tk:void 0;return zA=function(e){if(null===e||(n=e,-1===Sm(i=Function.toString.call(n)).call(i,"[native code]")))return e;var n,i;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return GA(e,arguments,jA(this).constructor)}return r.prototype=Oc(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),HA(r,e)},zA(e)}var KA=function(e){return e[e.MANIFEST_HLS_ERROR=1100]="MANIFEST_HLS_ERROR",e[e.MANIFEST_DASH_ERROR=1200]="MANIFEST_DASH_ERROR",e[e.NETWORK=2100]="NETWORK",e[e.NETWORK_TIMEOUT=2101]="NETWORK_TIMEOUT",e[e.NETWORK_FORBIDDEN=2103]="NETWORK_FORBIDDEN",e[e.NETWORK_NOTFOUND=2104]="NETWORK_NOTFOUND",e[e.NETWORK_RANGE_NOT_SATISFIABLE=2116]="NETWORK_RANGE_NOT_SATISFIABLE",e[e.DEMUX_FLV_ERROR=3100]="DEMUX_FLV_ERROR",e[e.DEMUX_HLS_ERROR=3200]="DEMUX_HLS_ERROR",e[e.DEMUX_MP4_ERROR=3300]="DEMUX_MP4_ERROR",e[e.DEMUX_FMP4_ERROR=3400]="DEMUX_FMP4_ERROR",e[e.DEMUX_SIDX_ERROR=3410]="DEMUX_SIDX_ERROR",e[e.REMUX_FMP4_ERROR=4100]="REMUX_FMP4_ERROR",e[e.REMUX_MP4_ERROR=4200]="REMUX_MP4_ERROR",e[e.MEDIA_ERR_ABORTED=5101]="MEDIA_ERR_ABORTED",e[e.MEDIA_ERR_NETWORK=5102]="MEDIA_ERR_NETWORK",e[e.MEDIA_ERR_DECODE=5103]="MEDIA_ERR_DECODE",e[e.MEDIA_ERR_SRC_NOT_SUPPORTED=5104]="MEDIA_ERR_SRC_NOT_SUPPORTED",e[e.MEDIA_ERR_CODEC_NOT_SUPPORTED=5105]="MEDIA_ERR_CODEC_NOT_SUPPORTED",e[e.MEDIA_ERR_URL_EMPTY=5106]="MEDIA_ERR_URL_EMPTY",e[e.MEDIA_MSE_ADD_SB=5200]="MEDIA_MSE_ADD_SB",e[e.MEDIA_MSE_APPEND_BUFFER=5201]="MEDIA_MSE_APPEND_BUFFER",e[e.MEDIA_MSE_OTHER=5202]="MEDIA_MSE_OTHER",e[e.MEDIA_MSE_FULL=5203]="MEDIA_MSE_FULL",e[e.MEDIA_MSE_HIJACK=5204]="MEDIA_MSE_HIJACK",e[e.MEDIA_EME_HIJACK=5301]="MEDIA_EME_HIJACK",e[e.DRM_LICENSE=7100]="DRM_LICENSE",e[e.DRM_CUSTOM_LICENSE=7200]="DRM_CUSTOM_LICENSE",e[e.OTHER=8e3]="OTHER",e[e.RUNTIME_NO_CANPLAY_ERROR=9001]="RUNTIME_NO_CANPLAY_ERROR",e[e.RUNTIME_BUFFERBREAK_ERROR=9002]="RUNTIME_BUFFERBREAK_ERROR",e[e.RUNTIME_BWAITING_TIMEOUT_ERROR=9002]="RUNTIME_BWAITING_TIMEOUT_ERROR",e[e.MODULE_LOAD_ERROR=110]="MODULE_LOAD_ERROR",e.UNKNOWN="UNKNOWN",e}(KA||{}),WA=(Uy(IA={},2100,{messageTextKey:"NETWORK",level:"Error"}),Uy(IA,2101,{messageTextKey:"NETWORK_TIMEOUT",level:"Error"}),Uy(IA,2103,{messageTextKey:"NETWORK_FORBIDDEN",level:"Error"}),Uy(IA,2104,{messageTextKey:"NETWORK_NOTFOUND",level:"Error"}),Uy(IA,5101,{messageTextKey:"MEDIA_ERR_ABORTED",level:"Error"}),Uy(IA,5102,{messageTextKey:"MEDIA_ERR_NETWORK",level:"Error"}),Uy(IA,5103,{messageTextKey:"MEDIA_ERR_DECODE",level:"Error"}),Uy(IA,5104,{messageTextKey:"MEDIA_ERR_SRC_NOT_SUPPORTED",level:"Error"}),Uy(IA,5105,{messageTextKey:"MEDIA_ERR_CODEC_NOT_SUPPORTED",level:"Error"}),Uy(IA,5106,{messageTextKey:"MEDIA_ERR_URL_EMPTY",level:"Error"}),Uy(IA,110,{messageTextKey:"MODULE_LOAD_ERROR",level:"Fatal"}),IA),YA=(Uy(RA={},"manifest",{messageTextKey:"MANIFEST",level:"Error"}),Uy(RA,"network",{messageTextKey:"NETWORK",level:"Error"}),Uy(RA,"demux",{messageTextKey:"DEMUX",level:"Error"}),Uy(RA,"remux",{messageTextKey:"REMUX",level:"Error"}),Uy(RA,"media",{messageTextKey:"MEDIA",level:"Error"}),Uy(RA,"drm",{messageTextKey:"DRM",level:"Error"}),Uy(RA,"other",{messageTextKey:"OTHER",level:"Error"}),Uy(RA,"runtime",{messageTextKey:"RUNTIME",level:"Error"}),RA),XA=function(e){UA(n,e);var t=VA(n);function n(e,i){var r,o,a,s,l,u,c;pm(this,n);var h="string"==typeof e?{message:e}:e,f=null!==(r=null!==(o=null!==(a=null==i?void 0:i.getText(null==h?void 0:h.messageTextKey))&&void 0!==a?a:null==h?void 0:h.message)&&void 0!==o?o:null==h||null===(s=h.error)||void 0===s?void 0:s.message)&&void 0!==r?r:null==i?void 0:i.getText("UNKNOWN");return Uy(PA(c=t.call(this,f)),"errorCode",void 0),Uy(PA(c),"level",void 0),Uy(PA(c),"ext",void 0),c.errorCode=null!==(l=null==h?void 0:h.errorCode)&&void 0!==l?l:"UNKNOWN",c.level=null!==(u=null==h?void 0:h.level)&&void 0!==u?u:"Error",c.ext=null==h?void 0:h.ext,c}return gm(n)}(zA(Error));function qA(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return new XA(By(By({errorCode:e},WA[e]),t),n)}function ZA(e,t){var n,i,r=WA[e.errorCode]||YA[e.errorType],o=e.errorCode;return new XA({messageTextKey:null==r?void 0:r.messageTextKey,message:null!==(n=null==e?void 0:e.message)&&void 0!==n?n:o,errorCode:o,level:null!==(i=null==r?void 0:r.level)&&void 0!==i?i:"Error",ext:e},t)}var $A=function(e){sC(n,e);var t=fC(n);function n(){return iC(this,n),t.apply(this,arguments)}return oC(n,[{key:"isEndedShow",get:function(){return this.config.isEndedShow},set:function(e){this.config.isEndedShow=e}},{key:"hide",value:function(){hT.addClass(this.root,"hide")}},{key:"show",value:function(){hT.removeClass(this.root,"hide")}},{key:"beforeCreate",value:function(e){"string"==typeof e.player.config.poster&&(e.config.poster=e.player.config.poster)}},{key:"afterCreate",value:function(){var e=this;this.on(CT,(function(){e.isEndedShow&&hT.removeClass(e.root,"hide")})),this.config.hideCanplay?(this.once(AT,(function(){e.onTimeUpdate()})),this.on(zT,(function(){hT.removeClass(e.root,"hide"),hT.addClass(e.root,"xg-showplay"),e.once(AT,(function(){e.onTimeUpdate()}))}))):this.on(ET,(function(){hT.addClass(e.root,"hide")}))}},{key:"onTimeUpdate",value:function(){var e=this;this.player.currentTime?hT.removeClass(this.root,"xg-showplay"):this.once(AT,(function(){e.onTimeUpdate()}))}},{key:"update",value:function(e){e&&(this.config.poster=e,this.root.style.backgroundImage="url(".concat(e,")"))}},{key:"render",value:function(){var e,t=this.config,n=t.poster,i=t.hideCanplay,r=n?"background-image:url(".concat(n,");"):"";return Mm(e='<xg-poster class="xgplayer-poster '.concat(i?"xg-showplay":"",'" style="')).call(e,r,'">\n </xg-poster>')}}],[{key:"pluginName",get:function(){return"poster"}},{key:"defaultConfig",get:function(){return{isEndedShow:!0,hideCanplay:!1,poster:""}}}]),n}(HS);function JA(){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 QA(){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}var eP={};function tP(e){var t;e?window.clearTimeout(e):Mk(t=rw(eP)).call(t,(function(e){window.clearTimeout(eP[e].id),delete eP[e]}))}var nP=function(e){sC(n,e);var t=fC(n);function n(e){var i;return iC(this,n),aC(cC(i=t.call(this,e)),"onPlayerReset",(function(){i.autoPlayStart=!1;var e="auto"===i.config.mode?"auto-hide":"hide";i.setAttr("data-state","play"),hT.removeClass(i.root,e),i.show()})),aC(cC(i),"onAutoplayStart",(function(){if(!i.autoPlayStart){var e="auto"===i.config.mode?"auto-hide":"hide";hT.addClass(i.root,e),i.autoPlayStart=!0,i.onPlayPause("play")}})),i.autoPlayStart=!1,i}return oC(n,[{key:"afterCreate",value:function(){var e=this,t=this.player,n=this.playerConfig;this.initIcons(),this.once(FT,(function(){n&&(n.lang&&"en"===n.lang?hT.addClass(t.root,"lang-is-en"):"jp"===n.lang&&hT.addClass(t.root,"lang-is-jp"))})),this.on(UT,this.onAutoplayStart),n.autoplay||this.show(),this.on(jT,(function(){var t="auto"===e.config.mode?"auto-hide":"hide";e.setAttr("data-state","play"),hT.removeClass(e.root,t),e.show()})),this.on(ET,(function(){e.onPlayPause("play")})),this.on(xT,(function(){e.onPlayPause("pause")})),this.on(rS,(function(){e.onPlayerReset()})),this.clickHandler=this.hook("startClick",this.switchPausePlay,{pre:function(t){t.cancelable&&t.preventDefault(),t.stopPropagation();var n=e.player.paused;e.emitUserAction(t,"switch_play_pause",{props:"paused",from:n,to:!n})}}),this.bind(["click","touchend"],this.clickHandler)}},{key:"registerIcons",value:function(){return{startPlay:{icon:JA,class:"xg-icon-play"},startPause:{icon:QA,class:"xg-icon-pause"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild("xg-start-inner",e.startPlay),this.appendChild("xg-start-inner",e.startPause)}},{key:"hide",value:function(){hT.addClass(this.root,"hide")}},{key:"show",value:function(){hT.removeClass(this.root,"hide")}},{key:"focusHide",value:function(){hT.addClass(this.root,"focus-hide")}},{key:"recover",value:function(){hT.removeClass(this.root,"focus-hide")}},{key:"switchStatus",value:function(e){e?this.setAttr("data-state",this.player.paused?"pause":"play"):this.setAttr("data-state",this.player.paused?"play":"pause")}},{key:"animate",value:function(e){var t=this;this._animateId=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{start:null,end:null};return eP[e]&&window.clearTimeout(eP[e].id),eP[e]={},n.start&&n.start(),eP[e].id=window.setTimeout((function(){n.end&&n.end(),window.clearTimeout(eP[e].id),delete eP[e]}),t),eP[e].id}("pauseplay",400,{start:function(){hT.addClass(t.root,"interact"),t.show(),t.switchStatus(!0)},end:function(){hT.removeClass(t.root,"interact"),!e&&t.hide(),t._animateId=null}})}},{key:"endAnimate",value:function(){hT.removeClass(this.root,"interact"),tP(this._animateId),this._animateId=null}},{key:"switchPausePlay",value:function(e){var t=this.player;(e.cancelable&&e.preventDefault(),e.stopPropagation(),t.state<mA)||(this.player.paused||t.state!==wA?t.play():t.pause())}},{key:"onPlayPause",value:function(e){var t=this.config,n=this.player;if(n&&!(n.state<wA)&&this.autoPlayStart){if("show"===t.mode)return this.switchStatus(),void this.show();if("auto"!==t.mode){if(t.isShowPause&&n.paused&&!n.ended||t.isShowEnd&&n.ended)return this.switchStatus(),this.show(),void this.endAnimate();if(t.disableAnimate)return this.switchStatus(),void this.hide();if("play"===e)this.autoPlayStart?this.animate():this.hide();else{if(!this.autoPlayStart||n.ended)return;this.animate()}}else this.switchStatus()}}},{key:"destroy",value:function(){this.unbind(["click","touchend"],this.clickHandler),tP(this._animateId)}},{key:"render",value:function(){var e=this.playerConfig.autoplay?"auto"===this.config.mode?"auto-hide":"hide":"";return'\n <xg-start class="xgplayer-start '.concat(e,'">\n <xg-start-inner></xg-start-inner>\n </xg-start>')}}],[{key:"pluginName",get:function(){return"start"}},{key:"defaultConfig",get:function(){return{isShowPause:!1,isShowEnd:!1,disableAnimate:!1,mode:"hide"}}}]),n}(HS),iP=function(e){sC(n,e);var t=fC(n);function n(){return iC(this,n),t.apply(this,arguments)}return oC(n,[{key:"render",value:function(){var e=this.config.innerHtml,t=hT.createDom("xg-enter","",{},"xgplayer-enter");if(e&&e instanceof window.HTMLElement)t.appendChild(e);else if(e&&"string"==typeof e)t.innerHTML=e;else{for(var n="",i=1;i<=12;i++)n+='<div class="xgplayer-enter-bar'.concat(i,'"></div>');t.innerHTML='<div class="xgplayer-enter-spinner">'.concat(n,"</div>")}return t}}],[{key:"pluginName",get:function(){return"enter"}},{key:"defaultConfig",get:function(){return{innerHtml:"",logo:""}}}]),n}(HS);function rP(e,t,n){try{var i,r;return Mm(i=Mm(r=' <div class="xg-tips '.concat(n?"hide":" ",'" lang-key="')).call(r,e.i18nKeys[t],'">\n ')).call(i,e.i18n[t],"\n </div>")}catch(o){return'<div class="xg-tips hide"></div>'}}var oP=function(e){sC(n,e);var t=fC(n);function n(){return iC(this,n),t.apply(this,arguments)}return oC(n,[{key:"afterCreate",value:function(){this.getMini=this.getMini.bind(this),this.exitMini=this.exitMini.bind(this),this.bind("click",this.getMini)}},{key:"getMini",value:function(){this.config.onClick&&this.config.onClick()}},{key:"exitMini",value:function(){this.config.onClick&&this.config.onClick()}},{key:"destroy",value:function(){this.unbind(["click","touchend"],this.getMini)}},{key:"render",value:function(){var e,t="MINISCREEN";return Mm(e='\n <xg-icon class="xgplayer-miniicon">\n <div class="xgplayer-icon btn-text"><span class="icon-text" lang-key="'.concat(this.i18nKeys[t],'">')).call(e,this.i18n[t],"</span></div>\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"miniscreenIcon"}},{key:"defaultConfig",get:function(){return{position:LS.CONTROLS_RIGHT,index:10}}}]),n}(HS);function aP(e){var t=cx(e);return-1===iw(e).call(e,"%")&&!Sw(t)&&t}var sP=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],lP=sP.length;function uP(e){if("string"==typeof e&&(e=document.querySelector(e)),e&&"object"===nC(e)&&e.nodeType){var t=function(e){return window.getComputedStyle(e)}(e);if("none"===t.display)return function(){for(var e={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},t=0;t<lP;t++)e[sP[t]]=0;return e}();var n={};n.width=e.offsetWidth,n.height=e.offsetHeight;for(var i=n.isBorderBox="border-box"===t.boxSizing,r=0;r<lP;r++){var o=sP[r],a=t[o],s=cx(a);n[o]=Sw(s)?0:s}var l=n.paddingLeft+n.paddingRight,u=n.paddingTop+n.paddingBottom,c=n.marginLeft+n.marginRight,h=n.marginTop+n.marginBottom,f=n.borderLeftWidth+n.borderRightWidth,d=n.borderTopWidth+n.borderBottomWidth,p=i,v=aP(t.width);!1!==v&&(n.width=v+(p?0:l+f));var g=aP(t.height);return!1!==g&&(n.height=g+(p?0:u+d)),n.innerWidth=n.width-(l+f),n.innerHeight=n.height-(u+d),n.outerWidth=n.width+c,n.outerHeight=n.height+h,n}}function cP(e,t){for(var n=0;n<e.length;n++){var i=e[n];if(i.identifier===t)return i}}var hP="dragStart",fP="dragMove",dP="dragEnded",pP={mousedown:["mousemove","mouseup"],touchstart:["touchmove","touchend","touchcancel"],pointerdown:["pointermove","pointerup","pointercancel"]},vP=function(e){sC(n,e);var t=fC(n);function n(e){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return iC(this,n),(i=t.call(this)).isEnabled=!0,i.isDragging=!1,i.isDown=!1,i.position={},i.downPoint={},i.dragPoint={x:0,y:0},i.startPos={x:0,y:0},i._root=e instanceof Element?e:document.querySelector(e),i._handlerDom=r.handle instanceof Element?r.handle:document.querySelector(r.handle),i._root&&i._handlerDom?(i._bindStartEvent(),i):hC(i)}return oC(n,[{key:"_bindStartEvent",value:function(){var e,t=this;"ontouchstart"in window?this._startKey="touchstart":this._startKey="mousedown",this["on".concat(this._startKey)]=this["on".concat(this._startKey)].bind(this),this._handlerDom.addEventListener(this._startKey,this["on".concat(this._startKey)]),Mk(e=pP[this._startKey]).call(e,(function(e){t["on".concat(e)]=t["on".concat(e)].bind(t)}))}},{key:"_unbindStartEvent",value:function(){this._handlerDom.removeEventListener(this._startKey,this["on".concat(this._startKey)])}},{key:"_bindPostStartEvents",value:function(e){var t=this;if(e){var n=pP[this._startKey];Mk(n).call(n,(function(e){window.addEventListener(e,t["on".concat(e)])})),this._boundPointerEvents=n}}},{key:"_unbindPostStartEvents",value:function(){var e,t=this;this._boundPointerEvents&&(Mk(e=this._boundPointerEvents).call(e,(function(e){window.removeEventListener(e,t["on".concat(e)])})),delete this._boundPointerEvents)}},{key:"enable",value:function(){this.isEnabled=!0}},{key:"disable",value:function(){this.isEnabled=!1,this.isDragging&&this.onUp()}},{key:"onDocUp",value:function(e){this.onUp()}},{key:"animate",value:function(){var e=this;this.isDragging&&(this.positionDrag(),window.requestAnimationFrame((function(){e.animate()})))}},{key:"positionDrag",value:function(){var e,t=Mm(e="translate3d(".concat(this.dragPoint.x,"px, ")).call(e,this.dragPoint.y,"px, 0)");this._root.style.transform=t,this._root.style.webKitTransform=t}},{key:"setLeftTop",value:function(){this._root.style.left=this.position.x+"px",this._root.style.top=this.position.y+"px"}},{key:"onmousedown",value:function(e){this.dragStart(e,e)}},{key:"onmousemove",value:function(e){this.dragMove(e,e)}},{key:"onmouseup",value:function(e){this.dragEnd(e,e)}},{key:"ontouchstart",value:function(e){var t=e.changedTouches[0];this.dragStart(e,t),this.touchIdentifier=void 0!==t.pointerId?t.pointerId:t.identifier,e.preventDefault()}},{key:"ontouchmove",value:function(e){var t=cP(e.changedTouches,this.touchIdentifier);t&&this.dragMove(e,t)}},{key:"ontouchend",value:function(e){var t=cP(e.changedTouches,this.touchIdentifier);t&&this.dragEnd(e,t),e.preventDefault()}},{key:"ontouchcancel",value:function(e){var t=cP(e.changedTouches,this.touchIdentifier);t&&this.dragCancel(e,t)}},{key:"dragStart",value:function(e,t){if(this._root&&!this.isDown&&this.isEnabled){this.downPoint=t,this.dragPoint.x=0,this.dragPoint.y=0,this._getPosition();var n=uP(this._root);this.startPos.x=this.position.x,this.startPos.y=this.position.y,this.startPos.maxY=window.innerHeight-n.height,this.startPos.maxX=window.innerWidth-n.width,this.setLeftTop(),this.isDown=!0,this._bindPostStartEvents(e)}}},{key:"dragRealStart",value:function(e,t){this.isDragging=!0,this.animate(),this.emit(hP,this.startPos)}},{key:"dragEnd",value:function(e,t){this._root&&(this._unbindPostStartEvents(),this.isDragging&&(this._root.style.transform="",this.setLeftTop(),this.emit(dP)),this.presetInfo())}},{key:"_dragPointerMove",value:function(e,t){var n={x:t.pageX-this.downPoint.pageX,y:t.pageY-this.downPoint.pageY};return!this.isDragging&&this.hasDragStarted(n)&&this.dragRealStart(e,t),n}},{key:"dragMove",value:function(e,t){if(e=e||window.event,this.isDown){var n=this.startPos,i=n.x,r=n.y,o=this._dragPointerMove(e,t),a=o.x,s=o.y;a=this.checkContain("x",a,i),s=this.checkContain("y",s,r),this.position.x=i+a,this.position.y=r+s,this.dragPoint.x=a,this.dragPoint.y=s,this.emit(fP,this.position)}}},{key:"dragCancel",value:function(e,t){this.dragEnd(e,t)}},{key:"presetInfo",value:function(){this.isDragging=!1,this.startPos={x:0,y:0},this.dragPoint={x:0,y:0},this.isDown=!1}},{key:"destroy",value:function(){this._unbindStartEvent(),this._unbindPostStartEvents(),this.isDragging&&this.dragEnd(),this.removeAllListeners(),this._handlerDom=null}},{key:"hasDragStarted",value:function(e){return Math.abs(e.x)>3||Math.abs(e.y)>3}},{key:"checkContain",value:function(e,t,n){return t+n<0?0-n:"x"===e&&t+n>this.startPos.maxX?this.startPos.maxX-n:"y"===e&&t+n>this.startPos.maxY?this.startPos.maxY-n:t}},{key:"_getPosition",value:function(){var e=window.getComputedStyle(this._root),t=this._getPositionCoord(e.left,"width"),n=this._getPositionCoord(e.top,"height");this.position.x=Sw(t)?0:t,this.position.y=Sw(n)?0:n,this._addTransformPosition(e)}},{key:"_addTransformPosition",value:function(e){var t=e.transform;if(0===iw(t).call(t,"matrix")){var n=t.split(","),i=0===iw(t).call(t,"matrix3d")?12:4,r=qw(n[i],10),o=qw(n[i+1],10);this.position.x+=r,this.position.y+=o}}},{key:"_getPositionCoord",value:function(e,t){if(-1!==iw(e).call(e,"%")){var n=uP(this._root.parentNode);return n?cx(e)/100*n[t]:0}return qw(e,10)}}]),n}(MC),gP=function(e){sC(n,e);var t=fC(n);function n(e){var i;iC(this,n),aC(cC(i=t.call(this,e)),"onCancelClick",(function(e){i.exitMini(),i.isClose=!0})),aC(cC(i),"onCenterClick",(function(e){var t=cC(i).player;t.paused?t.play():t.pause()})),aC(cC(i),"onScroll",(function(e){if(!(!window.scrollY&&0!==window.scrollY||Math.abs(window.scrollY-i.pos.scrollY)<50)){var t=qw(hT.getCss(i.player.root,"height"));t+=i.config.scrollTop,i.pos.scrollY=window.scrollY,window.scrollY>t+5?!i.isMini&&!i.isClose&&i.getMini():window.scrollY<=t&&(i.isMini&&i.exitMini(),i.isClose=!1)}})),i.isMini=!1,i.isClose=!1;var r=cC(i).config;return i.pos={left:r.left<0?window.innerWidth-r.width-20:r.left,top:r.top<0?window.innerHeight-r.height-20:r.top,height:i.config.height,width:i.config.width,scrollY:window.scrollY||0},i.lastStyle=null,i}return oC(n,[{key:"beforeCreate",value:function(e){"boolean"==typeof e.player.config.mini&&(e.config.isShowIcon=e.player.config.mini)}},{key:"afterCreate",value:function(){var e=this;this.initIcons(),this.on(xT,(function(){e.setAttr("data-state","pause")})),this.on(ET,(function(){e.setAttr("data-state","play")}))}},{key:"onPluginsReady",value:function(){var e=this,t=this.player;if(!this.config.disable){if(this.config.isShowIcon){var n={config:{onClick:function(){e.getMini()}}};t.controls.registerPlugin(oP,n,oP.pluginName)}var i=hT.checkTouchSupport()?"touchend":"click";this.bind(".mini-cancel-btn",i,this.onCancelClick),this.bind(".play-icon",i,this.onCenterClick),this.config.disableDrag||(this._draggabilly=new vP(this.player.root,{handle:this.root})),this.config.isScrollSwitch&&window.addEventListener("scroll",this.onScroll)}}},{key:"registerIcons",value:function(){return{play:{icon:JA,class:"xg-icon-play"},pause:{icon:QA,class:"xg-icon-pause"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".play-icon",e.play),this.appendChild(".play-icon",e.pause)}},{key:"getMini",value:function(){var e,t=this;if(!this.isMini){var n=this.player,i=this.playerConfig,r=this.config.target||this.player.root;this.lastStyle={},hT.addClass(n.root,"xgplayer-mini"),Mk(e=["width","height","top","left"]).call(e,(function(e){t.lastStyle[e]=r.style[e],r.style[e]="".concat(t.pos[e],"px")})),i.fluid&&(r.style["padding-top"]=""),this.emit(XT,!0),n.isMini=this.isMini=!0}}},{key:"exitMini",value:function(){var e=this;if(!this.isMini)return!1;var t,n=this.player,i=this.playerConfig,r=this.config.target||this.player.root;(hT.removeClass(n.root,"xgplayer-mini"),this.lastStyle)&&Mk(t=rw(this.lastStyle)).call(t,(function(t){r.style[t]=e.lastStyle[t]}));this.lastStyle=null,i.fluid&&(n.root.style.width="100%",n.root.style.height="0",n.root.style["padding-top"]="".concat(100*i.height/i.width,"%")),this.emit(XT,!1),this.isMini=n.isMini=!1}},{key:"destroy",value:function(){window.removeEventListener("scroll",this.onScroll);var e=hT.checkTouchSupport()?"touchend":"click";this.unbind(".mini-cancel-btn",e,this.onCancelClick),this.unbind(".play-icon",e,this.onCenterClick),this._draggabilly&&this._draggabilly.destroy(),this._draggabilly=null,this.exitMini()}},{key:"render",value:function(){if(!this.config.disable)return'\n <xg-mini-layer class="xg-mini-layer">\n <xg-mini-header class="xgplayer-mini-header">\n '.concat(rP(this,"MINI_DRAG",this.playerConfig.isHideTips),'\n </xg-mini-header>\n <div class="mini-cancel-btn">\n <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">\n <path fill="#fff" fill-rule="evenodd" d="M3.99 3.49a1 1 0 0 1 1.414 0L10 8.085l4.596-4.595a1 1 0 1 1 1.414 1.414L11.414 9.5l4.596 4.596a1 1 0 0 1 .084 1.32l-.084.094a1 1 0 0 1-1.414 0L10 10.914 5.404 15.51a1 1 0 0 1-1.414-1.414L8.585 9.5 3.99 4.904a1 1 0 0 1-.084-1.32z"></path>\n </svg>\n </div>\n <div class="play-icon">\n </div>\n </xg-mini-layer>')}}],[{key:"pluginName",get:function(){return"miniscreen"}},{key:"defaultConfig",get:function(){return{index:10,disable:!1,width:320,height:180,left:-1,top:-1,isShowIcon:!1,isScrollSwitch:!1,scrollTop:0,disableDrag:!1}}}]),n}(HS),yP={mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mousemove:"onMouseMove"},mP=["videoClick","videoDbClick"],_P=function(e){sC(n,e);var t=fC(n);function n(){var e,i;iC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return aC(cC(i=t.call.apply(t,Mm(e=[this]).call(e,o))),"onMouseMove",(function(e){var t=cC(i),n=t.player,r=t.playerConfig;n.isActive||(n.focus({autoHide:!r.closeDelayBlur}),!r.closeFocusVideoFocus&&n.media.focus())})),aC(cC(i),"onMouseEnter",(function(e){var t=cC(i),n=t.playerConfig,r=t.player;!n.closeFocusVideoFocus&&r.media.focus(),n.closeDelayBlur?r.focus({autoHide:!1}):r.focus()})),aC(cC(i),"onMouseLeave",(function(e){var t=i.playerConfig,n=t.closePlayerBlur,r=t.leavePlayerTime,o=t.closeDelayBlur;n||o||(r?i.player.focus({autoHide:!0,delay:r}):i.player.blur())})),aC(cC(i),"onVideoClick",(function(e){var t=cC(i),n=t.player,r=t.playerConfig;e.target&&r.closeVideoClick||e.target!==n.root&&e.target!==n.media&&e.target!==n.innerContainer&&e.target!==n.media.__canvas||(e.preventDefault(),r.closeVideoStopPropagation||e.stopPropagation(),i._clickCount++,i.clickTimer&&(clearTimeout(i.clickTimer),i.clickTimer=null),i.clickTimer=setTimeout((function(){i._clickCount&&(i._clickCount--,CS(cC(i),mP[0],(function(e,t){i.switchPlayPause(t.e)}),{e:e,paused:n.paused}),clearTimeout(i.clickTimer),i.clickTimer=null)}),300))})),aC(cC(i),"onVideoDblClick",(function(e){var t=cC(i),n=t.player,r=t.playerConfig;r.closeVideoDblclick||!e.target||e.target!==n.media&&e.target!==n.media.__canvas||(!r.closeVideoClick&&i._clickCount<2?i._clickCount=0:(i._clickCount=0,i.clickTimer&&(clearTimeout(i.clickTimer),i.clickTimer=null),e.preventDefault(),e.stopPropagation(),CS(cC(i),mP[1],(function(e,t){i.emitUserAction(t.e,"switch_fullscreen",{props:"fullscreen",from:n.fullscreen,to:!n.fullscreen}),n.fullscreen?n.exitFullscreen():n.getFullscreen()}),{e:e,fullscreen:n.fullscreen})))})),i}return oC(n,[{key:"afterCreate",value:function(){var e=this;this._clickCount=0,Mk(mP).call(mP,(function(t){e.__hooks[t]=null})),"mobile"===this.playerConfig.isMobileSimulateMode||"mobile"===mT.device&&!mT.os.isIpad||this.initEvents()}},{key:"initEvents",value:function(){var e,t=this,n=this.player,i=n.video,r=n.root,o=this.playerConfig.enableContextmenu;r&&r.addEventListener("click",this.onVideoClick,!1),r&&r.addEventListener("dblclick",this.onVideoDblClick,!1),Mk(e=rw(yP)).call(e,(function(e){r.addEventListener(e,t[yP[e]],!1)})),o&&i&&i.addEventListener("contextmenu",this.onContextmenu,!1)}},{key:"switchPlayPause",value:function(e){var t=this.player;this.emitUserAction(e,"switch_play_pause",{props:"paused",from:t.paused,to:!t.paused}),t.ended?t.duration!==1/0&&t.duration>0&&t.replay():t.paused?t.play():t.pause()}},{key:"onContextmenu",value:function(e){(e=e||window.event).preventDefault&&e.preventDefault(),e.stopPropagation?e.stopPropagation():(e.returnValue=!1,e.cancelBubble=!0)}},{key:"destroy",value:function(){var e,t=this,n=this.player,i=n.video,r=n.root;this.clickTimer&&clearTimeout(this.clickTimer),r.removeEventListener("click",this.onVideoClick,!1),r.removeEventListener("dblclick",this.onVideoDblClick,!1),i.removeEventListener("contextmenu",this.onContextmenu,!1),Mk(e=rw(yP)).call(e,(function(e){r.removeEventListener(e,t[yP[e]],!1)}))}}],[{key:"pluginName",get:function(){return"pc"}},{key:"defaultConfig",get:function(){return{}}}]),n}(TS),bP="press",kP="pressend",wP="doubleclick",EP="click",CP="touchmove",xP="touchstart",TP="touchend",SP={start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},AP={start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseleave"};function PP(e){return e&&e.length>0?e[e.length-1]:null}var OP=function(){function e(t){var n,i=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{eventType:"touch"};iC(this,e),this._pos={moving:!1,start:!1,x:0,y:0},this.config={pressDelay:600,dbClickDelay:200,disablePress:!1,disableDbClick:!1,miniStep:2,needPreventDefault:!0},Mk(n=rw(r)).call(n,(function(e){i.config[e]=r[e]})),this.root=t,this.events="mouse"===r.eventType?AP:SP,this.pressIntrvalId=null,this.dbIntrvalId=null,this.__handlers={},this._initEvent()}return oC(e,[{key:"_initEvent",value:function(){this.onTouchStart=this.onTouchStart.bind(this),this.onTouchMove=this.onTouchMove.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.onTouchCancel=this.onTouchCancel.bind(this),this.root.addEventListener(this.events.start,this.onTouchStart)}},{key:"__setPress",value:function(e){var t=this,n=this.config;this.pressIntrvalId&&this.__clearPress(),this.pressIntrvalId=setTimeout((function(){t.trigger(bP,e),t._pos.press=!0,t.__clearPress()}),n.pressDelay)}},{key:"__clearPress",value:function(){window.clearTimeout(this.pressIntrvalId),this.pressIntrvalId=null}},{key:"__setDb",value:function(e){var t=this,n=this.config;if(this.dbIntrvalId)return this.__clearDb(),void this.trigger(wP,e);this.dbIntrvalId=setTimeout((function(){t.__clearDb(),t._pos.start||t._pos.press||t._pos.moving||t.trigger(EP,e)}),n.dbClickDelay)}},{key:"__clearDb",value:function(){clearTimeout(this.dbIntrvalId),this.dbIntrvalId=null}},{key:"on",value:function(e,t){this.__handlers[e]||(this.__handlers[e]=[]),this.__handlers[e].push(t)}},{key:"off",value:function(e,t){if(this.__handlers[e]){for(var n,i=this.__handlers[e],r=-1,o=0;o<i.length;o++)if(i[o]===t){r=o;break}if(r>=0)Tw(n=this.__handlers[e]).call(n,r,1)}}},{key:"trigger",value:function(e,t){var n;this.__handlers[e]&&Mk(n=this.__handlers[e]).call(n,(function(n){try{n(t)}catch(xR){console.error("trigger>>:".concat(e),xR)}}))}},{key:"onTouchStart",value:function(e){var t=this._pos,n=this.root,i=PP(e.touches);t.x=i?qw(i.pageX,10):e.pageX,t.y=i?qw(i.pageX,10):e.pageX,t.start=!0,this.__setPress(e),n.addEventListener(this.events.end,this.onTouchEnd),n.addEventListener(this.events.cancel,this.onTouchCancel),n.addEventListener(this.events.move,this.onTouchMove),this.trigger(xP,e)}},{key:"onTouchCancel",value:function(e){this.onTouchEnd(e)}},{key:"onTouchEnd",value:function(e){var t=this._pos,n=this.root;this.__clearPress(),n.removeEventListener(this.events.cancel,this.onTouchCancel),n.removeEventListener(this.events.end,this.onTouchEnd),n.removeEventListener(this.events.move,this.onTouchMove),e.moving=t.moving,e.press=t.press,t.press&&this.trigger(kP,e),this.trigger(TP,e),!t.press&&!t.moving&&this.__setDb(e),t.press=!1,t.start=!1,t.moving=!1}},{key:"onTouchMove",value:function(e){var t=this._pos,n=this.config,i=PP(e.touches),r=i?qw(i.pageX,10):e.pageX,o=i?qw(i.pageY,10):e.pageX,a=r-t.x,s=o-t.y;Math.abs(s)<n.miniStep&&Math.abs(a)<n.miniStep||(this.__clearPress(),t.press&&this.trigger(kP,e),t.press=!1,t.moving=!0,this.trigger(CP,e))}},{key:"destroy",value:function(){var e,t=this,n={touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"};Mk(e=rw(n)).call(e,(function(e){t.root.removeEventListener("touchend",t[n[e]])}))}}]),e}();function IP(){return(new DOMParser).parseFromString('<svg width="20" height="9" viewBox="0 0 8 9" fill="none" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <path opacity="0.54"\n d="M7.5 3.63397C8.16667 4.01887 8.16667 4.98113 7.5 5.36603L1.5 8.83013C0.833334 9.21503 0 8.7339 0 7.9641L0 1.0359C0 0.266098 0.833333 -0.215027 1.5 0.169873L7.5 3.63397Z"\n fill="white" />\n <path transform="translate(5 0)" d="M7.5 3.63397C8.16667 4.01887 8.16667 4.98113 7.5 5.36603L1.5 8.83013C0.833334 9.21503 0 8.7339 0 7.9641L0 1.0359C0 0.266098 0.833333 -0.215027 1.5 0.169873L7.5 3.63397Z" fill="white"/>\n</svg>',"image/svg+xml").firstChild}var RP="auto",MP="seeking",LP="playbackrate",DP=["videoClick","videoDbClick"],NP=function(e){sC(n,e);var t=fC(n);function n(e){var i;return iC(this,n),aC(cC(i=t.call(this,e)),"onTouchStart",(function(e){var t=cC(i),n=t.player,r=t.config,o=t.pos,a=t.playerConfig,s=i.getTouche(e);if(s&&!r.disableGesture&&i.duration>0&&!n.ended){o.isStart=!0,hT.checkIsFunction(a.disableSwipeHandler)&&a.disableSwipeHandler(),Vm(i).call(i,".xg-dur").innerHTML=hT.format(i.duration);var l=i.root.getBoundingClientRect();90===n.rotateDeg?(o.top=l.left,o.left=l.top,o.width=l.height,o.height=l.width):(o.top=l.top,o.left=l.left,o.width=l.width,o.height=l.height);var u=qw(s.pageX-o.left,10),c=qw(s.pageY-o.top,10);o.x=90===n.rotateDeg?c:u,o.y=90===n.rotateDeg?u:c,o.scopeL=r.scopeL*o.width,o.scopeR=(1-r.scopeR)*o.width,o.scopeM1=o.width*(1-r.scopeM)/2,o.scopeM2=o.width-o.scopeM1}})),aC(cC(i),"onTouchMove",(function(e){var t=i.getTouche(e),n=cC(i),r=n.pos,o=n.config,a=n.player;if(t&&!o.disableGesture&&i.duration&&r.isStart){var s=o.miniMoveStep,l=o.hideControlsActive,u=qw(t.pageX-r.left,10),c=qw(t.pageY-r.top,10),h=90===a.rotateDeg?c:u,f=90===a.rotateDeg?u:c;if(Math.abs(h-r.x)>s||Math.abs(f-r.y)>s){var d=h-r.x,p=f-r.y,v=r.scope;if(-1===v&&(0===(v=i.checkScope(h,f,d,p,r))&&(l?a.blur():a.focus({autoHide:!1}),!r.time&&(r.time=qw(1e3*a.currentTime,10)+1e3*i.timeOffset)),r.scope=v),-1===v||v>0&&!o.gestureY||0===v&&!o.gestureX)return;e.cancelable&&e.preventDefault(),i.executeMove(d,p,v,r.width,r.height),r.x=h,r.y=f}}})),aC(cC(i),"onTouchEnd",(function(e){var t=cC(i),n=t.player,r=t.pos,o=t.playerConfig;if(r.isStart){r.scope>-1&&e.cancelable&&e.preventDefault();var a=i.config,s=a.disableGesture,l=a.gestureX;!s&&l?(i.endLastMove(r.scope),setTimeout((function(){n.getPlugin("progress")&&n.getPlugin("progress").resetSeekState()}),10)):r.time=0,r.scope=-1,i.resetPos(),hT.checkIsFunction(o.enableSwipeHandler)&&o.enableSwipeHandler(),i.changeAction(RP)}})),aC(cC(i),"onRootTouchMove",(function(e){!i.config.disableGesture&&i.config.gestureX&&i.checkIsRootTarget(e)&&(e.stopPropagation(),i.pos.isStart?i.onTouchMove(e):i.onTouchStart(e))})),aC(cC(i),"onRootTouchEnd",(function(e){i.pos.isStart&&i.checkIsRootTarget(e)&&(e.stopPropagation(),i.onTouchEnd(e))})),i.pos={isStart:!1,x:0,y:0,time:0,volume:0,rate:1,light:0,width:0,height:0,scopeL:0,scopeR:0,scopeM1:0,scopeM2:0,scope:-1},i.timer=null,i}return oC(n,[{key:"duration",get:function(){return this.playerConfig.customDuration||this.player.duration}},{key:"timeOffset",get:function(){return this.playerConfig.timeOffset||0}},{key:"registerIcons",value:function(){return{seekTipIcon:{icon:IP,class:"xg-seek-pre"}}}},{key:"afterCreate",value:function(){var e,t=this;Mk(DP).call(DP,(function(e){t.__hooks[e]=null}));var n=this.playerConfig,i=this.config,r=this.player;!0===n.closeVideoDblclick&&(i.closedbClick=!0),this.resetPos(),hT.isUndefined(n.disableGesture)||(i.disableGesture=!!n.disableGesture),this.appendChild(".xg-seek-icon",this.icons.seekTipIcon),this.xgMask=hT.createDom("xg-mask","",{},"xgmask"),r.root.appendChild(this.xgMask),this.initCustomStyle(),this.registerThumbnail();var o="mouse"===this.domEventType?"mouse":"touch";this.touch=new OP(this.root,{eventType:o,needPreventDefault:!this.config.disableGesture}),this.root.addEventListener("contextmenu",(function(e){e.preventDefault()})),r.root.addEventListener("touchmove",this.onRootTouchMove,!0),r.root.addEventListener("touchend",this.onRootTouchEnd,!0),this.on(IT,(function(){var e=t.player,n=t.config;1e3*e.duration<n.moveDuration&&(n.moveDuration=1e3*e.duration)})),this.on([OT,CT],(function(){var e=t.pos,n=e.time;!e.isStart&&n>0&&(t.pos.time=0)}));var a={touchstart:"onTouchStart",touchmove:"onTouchMove",touchend:"onTouchEnd",press:"onPress",pressend:"onPressEnd",click:"onClick",doubleclick:"onDbClick"};if(Mk(e=rw(a)).call(e,(function(e){t.touch.on(e,(function(n){t[a[e]](n)}))})),!i.disableActive){var s=r.plugins.progress;s&&(s.addCallBack("dragmove",(function(e){t.activeSeekNote(e.currentTime,e.forward)})),s.addCallBack("dragend",(function(){t.changeAction(RP)})))}}},{key:"registerThumbnail",value:function(){var e=this.player.plugins.thumbnail;if(e&&e.usable){this.thumbnail=e.createThumbnail(null,"mobile-thumbnail");var t=Vm(this).call(this,".time-preview");t.insertBefore(this.thumbnail,t.children[0])}}},{key:"initCustomStyle",value:function(){var e=(this.playerConfig||{}).commonStyle,t=e.playedColor,n=e.progressColor;t&&(Vm(this).call(this,".xg-curbar").style.backgroundColor=t,Vm(this).call(this,".xg-cur").style.color=t);n&&(Vm(this).call(this,".xg-bar").style.backgroundColor=n,Vm(this).call(this,".time-preview").style.color=n);this.config.disableTimeProgress&&hT.addClass(Vm(this).call(this,".xg-timebar"),"hide")}},{key:"resetPos",value:function(){var e,t=this;this.pos?(this.pos.isStart=!1,this.pos.scope=-1,Mk(e=["x","y","width","height","scopeL","scopeR","scopeM1","scopeM2"]).call(e,(function(e){t.pos[e]=0}))):this.pos={isStart:!1,x:0,y:0,volume:0,rate:1,light:0,width:0,height:0,scopeL:0,scopeR:0,scopeM1:0,scopeM2:0,scope:-1,time:0}}},{key:"changeAction",value:function(e){var t=this.player;this.root.setAttribute("data-xg-action",e);var n=t.plugins.start;n&&n.recover()}},{key:"getTouche",value:function(e){this.player.rotateDeg;var t=e.touches&&e.touches.length>0?e.touches[e.touches.length-1]:e;return{pageX:t.pageX,pageY:t.pageY}}},{key:"checkScope",value:function(e,t,n,i,r){var o=r.width,a=-1;if(e<0||e>o)return a;var s=0===i?Math.abs(n):Math.abs(n/i);return Math.abs(n)>0&&s>=1.73&&e>r.scopeM1&&e<r.scopeM2?a=0:(0===Math.abs(n)||s<=.57)&&(a=e<r.scopeL?1:e>r.scopeR?2:3),a}},{key:"executeMove",value:function(e,t,n,i,r){switch(n){case 0:this.updateTime(e/i*this.config.scopeM);break;case 1:this.updateBrightness(t/r);break;case 2:mT.os.isIos||this.updateVolume(t/r)}}},{key:"endLastMove",value:function(e){var t=this,n=this.pos,i=this.player,r=this.config,o=(n.time-this.timeOffset)/1e3;if(0===e)i.seek(Number(o).toFixed(1)),r.hideControlsEnd?i.blur():i.focus(),this.timer=setTimeout((function(){t.pos.time=0}),500);this.changeAction(RP)}},{key:"checkIsRootTarget",value:function(e){var t=this.player.plugins||{};return(!t.progress||!t.progress.root.contains(e.target))&&(t.start&&t.start.root.contains(e.target)||t.controls&&t.controls.root.contains(e.target))}},{key:"sendUseAction",value:function(e){var t=this.player.paused;this.emitUserAction(e,"switch_play_pause",{prop:"paused",from:t,to:!t})}},{key:"clickHandler",value:function(e){var t=this.player,n=this.config,i=this.playerConfig;t.state<wA?i.closeVideoClick||(this.sendUseAction(hT.createEvent("click")),t.play()):!n.closedbClick||i.closeVideoClick?t.isActive?t.blur():t.focus():i.closeVideoClick||((t.isActive||n.focusVideoClick)&&(this.sendUseAction(hT.createEvent("click")),this.switchPlayPause()),t.focus())}},{key:"dbClickHandler",value:function(e){var t=this.config,n=this.player;!t.closedbClick&&n.state>=wA&&(this.sendUseAction(hT.createEvent("dblclick")),this.switchPlayPause())}},{key:"onClick",value:function(e){var t=this,n=this.player;CS(this,DP[0],(function(e,n){t.clickHandler(n.e)}),{e:e,paused:n.paused})}},{key:"onDbClick",value:function(e){var t=this,n=this.player;CS(this,DP[1],(function(e,n){t.dbClickHandler(n.e)}),{e:e,paused:n.paused})}},{key:"onPress",value:function(e){var t=this.pos,n=this.config,i=this.player;n.disablePress||(t.rate=this.player.playbackRate,this.emitUserAction("press","change_rate",{prop:"playbackRate",from:i.playbackRate,to:n.pressRate}),i.playbackRate=n.pressRate,this.changeAction(LP))}},{key:"onPressEnd",value:function(e){var t=this.pos,n=this.config,i=this.player;n.disablePress||(this.emitUserAction("pressend","change_rate",{prop:"playbackRate",from:i.playbackRate,to:t.rate}),i.playbackRate=t.rate,t.rate=1,this.changeAction(RP))}},{key:"updateTime",value:function(e){var t=this.player,n=this.config,i=this.player.duration;e=Number(e.toFixed(4));var r=qw(e*n.moveDuration,10)+this.timeOffset;r=(r+=this.pos.time)<0?0:r>1e3*i?1e3*i-200:r,t.getPlugin("time")&&t.getPlugin("time").updateTime(r/1e3),t.getPlugin("progress")&&t.getPlugin("progress").updatePercent(r/1e3/this.duration,!0),this.activeSeekNote(r/1e3,e>0),n.isTouchingSeek&&t.seek(Number((r-this.timeOffset)/1e3).toFixed(1)),this.pos.time=r}},{key:"updateVolume",value:function(e){this.player.rotateDeg&&(e=-e);var t=this.player,n=this.pos;if(e=qw(100*e,10),n.volume+=e,!(Math.abs(n.volume)<10)){var i=qw(10*t.volume,10)-qw(n.volume/10,10);i=i>10?10:i<1?0:i,t.volume=i/10,n.volume=0}}},{key:"updateBrightness",value:function(e){this.player.rotateDeg&&(e=-e);var t=this.pos,n=this.config,i=this.xgMask,r=t.light+.8*e;r=r>n.maxDarkness?n.maxDarkness:r<0?0:r,i&&(i.style.backgroundColor="rgba(0,0,0,".concat(r,")")),t.light=r}},{key:"activeSeekNote",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.player,i=this.config,r=!(this.duration!==1/0&&this.duration>0);if(e&&"number"==typeof e&&!r&&!i.disableActive){e<0?e=0:e>n.duration&&(e=n.duration-.2),this.changeAction(MP);var o=n.plugins.start;if(o&&o.focusHide(),Vm(this).call(this,".xg-dur").innerHTML=hT.format(this.duration),Vm(this).call(this,".xg-cur").innerHTML=hT.format(e),Vm(this).call(this,".xg-curbar").style.width="".concat(e/this.duration*100,"%"),t)hT.removeClass(Vm(this).call(this,".xg-seek-show"),"xg-back");else hT.addClass(Vm(this).call(this,".xg-seek-show"),"xg-back");this.updateThumbnails(e)}}},{key:"updateThumbnails",value:function(e){var t=this.player.plugins.thumbnail;t&&t.usable&&this.thumbnail&&t.update(this.thumbnail,e,160,90)}},{key:"switchPlayPause",value:function(){var e=this.player;if(e.state<bA)return!1;e.ended||(e.paused?e.play():e.pause())}},{key:"disableGesture",value:function(){this.config.disableGesture=!1}},{key:"enableGesture",value:function(){this.config.disableGesture=!0}},{key:"destroy",value:function(){var e=this.player;this.timer&&clearTimeout(this.timer),this.thumbnail=null,e.root.removeChild(this.xgMask),this.xgMask=null,this.touch&&this.touch.destroy(),this.touch=null,e.root.removeEventListener("touchmove",this.onRootTouchMove,!0),e.root.removeEventListener("touchend",this.onRootTouchEnd,!0)}},{key:"render",value:function(){var e,t,n,i="normal"!==this.config.gradient?"gradient ".concat(this.config.gradient):"gradient";return Mm(e=Mm(t=Mm(n='\n <xg-trigger class="trigger">\n <div class="'.concat(i,'"></div>\n <div class="time-preview">\n <div class="xg-seek-show ')).call(n,this.config.disableSeekIcon?" hide-seek-icon":"",'">\n <i class="xg-seek-icon"></i>\n <span class="xg-cur">00:00</span>\n <span>/</span>\n <span class="xg-dur">00:00</span>\n </div>\n <div class="xg-bar xg-timebar">\n <div class="xg-curbar"></div>\n </div>\n </div>\n <div class="xg-playbackrate xg-top-note">\n <span><i>')).call(t,this.config.pressRate,"X</i>")).call(e,this.i18n.FORWARD,"</span>\n </div>\n </xg-trigger>\n ")}}],[{key:"pluginName",get:function(){return"mobile"}},{key:"defaultConfig",get:function(){return{index:0,disableGesture:!1,gestureX:!0,gestureY:!0,gradient:"normal",isTouchingSeek:!1,miniMoveStep:5,miniYPer:5,scopeL:.25,scopeR:.25,scopeM:.9,pressRate:2,darkness:!0,maxDarkness:.8,disableActive:!1,disableTimeProgress:!1,hideControlsActive:!1,hideControlsEnd:!1,moveDuration:36e4,closedbClick:!1,disablePress:!0,disableSeekIcon:!1,focusVideoClick:!1}}}]),n}(HS);function FP(e){e.preventDefault(),e.returnValue=!1}var HP=function(e){sC(n,e);var t=fC(n);function n(){var e,i;iC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return aC(cC(i=t.call.apply(t,Mm(e=[this]).call(e,o))),"onBodyKeyDown",(function(e){var t=e||window.event;if(i.player&&(i.player.isUserActive||i.config.isIgnoreUserActive)&&!(i.config.disable||i.config.disableBodyTrigger||!i.checkIsVisible()||t.metaKey||t.altKey||t.ctrlKey)){var n,r,o=t.keyCode;return!(t.target!==document.body&&(!i.config.isGlobalTrigger||(n=t.target,r=n.tagName,"INPUT"===r||"TEXTAREA"===r||n.isContentEditable))||!i.checkCode(o,!0))&&(FP(t),i.handleKeyCode(o,e),!1)}})),aC(cC(i),"onKeydown",(function(e){var t=e||window.event;if(!(i.config.disable||i.config.disableRootTrigger||t.metaKey||t.altKey||t.ctrlKey)&&(i.player.isUserActive||i.config.isIgnoreUserActive)&&(i.player.isUserActive||i.config.isIgnoreUserActive)){if(!t||37!==t.keyCode&&!i.checkCode(t.keyCode)||t.target!==i.player.root&&t.target!==i.player.video&&t.target!==i.player.controls.el)return!0;FP(t),i.handleKeyCode(t.keyCode,e)}})),i}return oC(n,[{key:"mergekeyCodeMap",value:function(){var e,t=this,n=this.config.keyCodeMap;n&&Mk(e=rw(n)).call(e,(function(e){var i;t.keyCodeMap[e]?Mk(i=["keyCode","action","disable","isBodyTarget"]).call(i,(function(i){n[e][i]&&(t.keyCodeMap[e][i]=n[e][i])})):t.keyCodeMap[e]=n[e]}))}},{key:"afterCreate",value:function(){this.config.disable=!this.playerConfig.keyShortcut;var e="function"==typeof this.config.seekStep?this.config.seekStep(this.player):this.config.seekStep;e&&"number"==typeof e&&(this.seekStep=e),this.keyCodeMap={space:{keyCode:32,action:"playPause",disable:!1,noBodyTarget:!1},up:{keyCode:38,action:"upVolume",disable:!1,noBodyTarget:!0},down:{keyCode:40,action:"downVolume",disable:!1,noBodyTarget:!0},left:{keyCode:37,action:"seekBack",disable:!1},right:{keyCode:39,action:"seek",disable:!1},esc:{keyCode:27,action:"exitFullscreen",disable:!1}},this.mergekeyCodeMap(),this.player.root.addEventListener("keydown",this.onKeydown),document.addEventListener("keydown",this.onBodyKeyDown)}},{key:"checkIsVisible",value:function(){if(!this.config.checkVisible)return!0;var e=this.player.root.getBoundingClientRect(),t=e.height,n=e.top,i=e.bottom,r=window.innerHeight;return!(n<0&&n<0-.9*t||i>0&&i-r>.9*t)}},{key:"checkCode",value:function(e,t){var n,i=this,r=!1;return Mk(n=rw(this.keyCodeMap)).call(n,(function(n){i.keyCodeMap[n]&&e===i.keyCodeMap[n].keyCode&&!i.keyCodeMap[n].disable&&(r=!t||t&&!i.keyCodeMap[n].noBodyTarget)})),r}},{key:"downVolume",value:function(e){var t=this.player,n=cx((t.volume-.1).toFixed(1)),i={volume:{from:t.volume,to:n}};this.emitUserAction(e,"change_volume",{props:i}),t.volume=n>=0?n:0}},{key:"upVolume",value:function(e){var t=this.player,n=cx((t.volume+.1).toFixed(1)),i={volume:{from:t.volume,to:n}};this.emitUserAction(e,"change_volume",{props:i}),t.volume=n<=1?n:1}},{key:"seek",value:function(e){var t=this.player,n=t.currentTime,i=t.duration,r=n,o={currentTime:{from:n,to:r=n+this.seekStep<=i?n+this.seekStep:i}};this.emitUserAction(e,"seek",{props:o}),this.player.currentTime=r}},{key:"seekBack",value:function(e){var t=this.player.currentTime,n=0;t-this.seekStep>=0&&(n=t-this.seekStep);var i={currentTime:{from:t,to:n}};this.emitUserAction(e,"seek",{props:i}),this.player.currentTime=n}},{key:"playPause",value:function(e){var t=this.player;t&&(this.emitUserAction(e,"switch_play_pause"),t.paused?t.play():t.pause())}},{key:"exitFullscreen",value:function(e){var t=this.player,n=t.fullscreen,i=t.cssfullscreen;n&&(this.emitUserAction("keyup","switch_fullscreen",{prop:"fullscreen",from:n,to:!n}),t.exitFullscreen()),i&&(this.emitUserAction("keyup","switch_css_fullscreen",{prop:"cssfullscreen",from:i,to:!i}),t.exitCssFullscreen())}},{key:"handleKeyCode",value:function(e,t){var n,i=this;Mk(n=rw(this.keyCodeMap)).call(n,(function(n){var r=i.keyCodeMap[n],o=r.action,a=r.keyCode,s=r.disable;a!==e||s||("function"==typeof o?o(t,i.player):"string"==typeof o&&"function"==typeof i[o]&&i[o](t,i.player),i.emit(nS,tC({key:n,target:t.target},i.keyCodeMap[n])))}))}},{key:"destroy",value:function(){this.player.root.removeEventListener("keydown",this.onKeydown),document.removeEventListener("keydown",this.onBodyKeyDown)}},{key:"disable",value:function(){this.config.disable=!0}},{key:"enable",value:function(){this.config.disable=!1}}],[{key:"pluginName",get:function(){return"keyboard"}},{key:"defaultConfig",get:function(){return{seekStep:10,checkVisible:!0,disableBodyTrigger:!1,disableRootTrigger:!1,isGlobalTrigger:!1,keyCodeMap:{},disable:!1,isIgnoreUserActive:!1}}}]),n}(TS);function UP(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="-5 -5 110 110">\n <path d="M100,50A50,50,0,1,1,50,0" stroke-width="5" stroke="#ddd" stroke-dasharray="236" fill="none"></path>\n</svg>\n',"image/svg+xml").firstChild}var jP=function(e){sC(n,e);var t=fC(n);function n(){return iC(this,n),t.apply(this,arguments)}return oC(n,[{key:"registerIcons",value:function(){return{loadingIcon:UP}}},{key:"afterCreate",value:function(){this.appendChild("xg-loading-inner",this.icons.loadingIcon)}},{key:"render",value:function(){return'\n <xg-loading class="xgplayer-loading">\n <xg-loading-inner></xg-loading-inner>\n </xg-loading>'}}],[{key:"pluginName",get:function(){return"loading"}},{key:"defaultConfig",get:function(){return{position:LS.ROOT}}}]),n}(HS),BP=Pn,VP=ea.findIndex,GP="findIndex",zP=!0;GP in[]&&Array(1)[GP]((function(){zP=!1})),BP({target:"Array",proto:!0,forced:zP},{findIndex:function(e){return VP(this,e,arguments.length>1?arguments[1]:void 0)}});var KP=Bc("Array").findIndex,WP=se,YP=KP,XP=Array.prototype,qP=n((function(e){var t=e.findIndex;return e===XP||WP(XP,e)&&t===XP.findIndex?YP:t})),ZP=function(e){sC(n,e);var t=fC(n);function n(){var e,i;iC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return aC(cC(i=t.call.apply(t,Mm(e=[this]).call(e,o))),"_onMouseenter",(function(e){i.emit("icon_mouseenter",{pluginName:i.pluginName})})),aC(cC(i),"_onMouseLeave",(function(e){i.emit("icon_mouseleave",{pluginName:i.pluginName})})),i}return oC(n,[{key:"afterCreate",value:function(){this.bind("mouseenter",this._onMouseenter),this.bind("mouseleave",this._onMouseLeave)}},{key:"destroy",value:function(){this.unbind("mouseenter",this._onMouseenter),this.unbind("mouseleave",this._onMouseLeave)}}]),n}(HS),$P=function(e){sC(n,e);var t=fC(n);function n(){return iC(this,n),t.apply(this,arguments)}return oC(n,[{key:"afterCreate",value:function(){var e=this;dC(lC(n.prototype),"afterCreate",this).call(this);var t=this.player;this.config.disable||(this.initIcons(),this.btnClick=this.btnClick.bind(this),this.bind(["touchend","click"],this.btnClick),this.on([xT,TT,LT],(function(){e.animate(t.paused)})),this.on(ET,(function(){e.animate(t.paused)})),this.animate(!0))}},{key:"registerIcons",value:function(){return{play:{icon:JA,class:"xg-icon-play"},pause:{icon:QA,class:"xg-icon-pause"}}}},{key:"btnClick",value:function(e){e.preventDefault(),e.stopPropagation();var t=this.player;return this.emitUserAction(e,"switch_play_pause",{prop:"paused",from:t.paused,to:!t.paused}),t.ended?t.replay():t.paused?(t.play(),this.animate(!1)):(t.pause(),this.animate(!0)),!1}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.play),this.appendChild(".xgplayer-icon",e.pause)}},{key:"animate",value:function(e){if(this.player){var t=this.i18nKeys,n=Vm(this).call(this,".xg-tips");e?(this.setAttr("data-state","pause"),n&&this.changeLangTextKey(n,t.PLAY_TIPS)):(this.setAttr("data-state","play"),n&&this.changeLangTextKey(n,t.PAUSE_TIPS))}}},{key:"destroy",value:function(){dC(lC(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(rP(this,"PLAY_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"play"}},{key:"defaultConfig",get:function(){return{position:LS.CONTROLS_LEFT,index:0,disable:!1}}}]),n}(ZP);function JP(){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 QP=function(e){sC(n,e);var t=fC(n);function n(){return iC(this,n),t.apply(this,arguments)}return oC(n,[{key:"afterCreate",value:function(){var e=this;this.initIcons(),this.onClick=function(t){t.preventDefault(),t.stopPropagation(),e.config.onClick(t)},this.bind(["click","touchend"],this.onClick)}},{key:"registerIcons",value:function(){return{screenBack:{icon:JP,class:"xg-fullscreen-back"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(this.root,e.screenBack)}},{key:"show",value:function(){hT.addClass(this.root,"show")}},{key:"hide",value:function(){hT.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:LS.ROOT_TOP,index:0}}}]),n}(HS);function eO(){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 tO(){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 nO=function(e){sC(n,e);var t=fC(n);function n(){var e,i;iC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return aC(cC(i=t.call.apply(t,Mm(e=[this]).call(e,o))),"_onOrientationChange",(function(e){i.player.fullscreen&&i.config.rotateFullscreen&&(90===window.orientation||-90===window.orientation?i.player.setRotateDeg(0):i.player.setRotateDeg(90))})),i}return oC(n,[{key:"afterCreate",value:function(){var e=this;dC(lC(n.prototype),"afterCreate",this).call(this);var t=this.config,i=this.playerConfig;if(!t.disable){t.target&&(this.playerConfig.fullscreenTarget=this.config.target);var r=hT.getFullScreenEl();i.fullscreenTarget===r&&this.player.getFullscreen().catch((function(e){})),this.initIcons(),this.handleFullscreen=this.hook("fullscreenChange",this.toggleFullScreen,{pre:function(t){var n=e.player.fullscreen;e.emitUserAction(t,"switch_fullscreen",{prop:"fullscreen",from:n,to:!n})}}),this.bind(".xgplayer-fullscreen",["touchend","click"],this.handleFullscreen),this.on(WT,(function(t){var n=Vm(e).call(e,".xg-tips");n&&e.changeLangTextKey(n,t?e.i18nKeys.EXITFULLSCREEN_TIPS:e.i18nKeys.FULLSCREEN_TIPS),e.animate(t)})),this.config.needBackIcon&&(this.topBackIcon=this.player.registerPlugin({plugin:QP,options:{config:{onClick:function(t){e.handleFullscreen(t)}}}})),"mobile"===mT.device&&window.addEventListener("orientationchange",this._onOrientationChange)}}},{key:"registerIcons",value:function(){return{fullscreen:{icon:eO,class:"xg-get-fullscreen"},exitFullscreen:{icon:tO,class:"xg-exit-fullscreen"}}}},{key:"destroy",value:function(){dC(lC(n.prototype),"destroy",this).call(this),this.unbind(".xgplayer-icon","mobile"===mT.device?"touchend":"click",this.handleFullscreen),"mobile"===mT.device&&window.removeEventListener("orientationchange",this._onOrientationChange)}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.fullscreen),this.appendChild(".xgplayer-icon",e.exitFullscreen)}},{key:"toggleFullScreen",value:function(e){e&&(e.preventDefault(),e.stopPropagation());var t=this.player,n=this.config;!0===n.useCssFullscreen||"function"==typeof n.useCssFullscreen&&n.useCssFullscreen()?(t.fullscreen?t.exitCssFullscreen():t.getCssFullscreen(),this.animate(t.fullscreen)):n.rotateFullscreen?(t.fullscreen?t.exitRotateFullscreen():t.getRotateFullscreen(),this.animate(t.fullscreen)):n.switchCallback&&"function"==typeof n.switchCallback?n.switchCallback(t.fullscreen):t.fullscreen?t.exitFullscreen():t.getFullscreen().catch((function(e){}))}},{key:"animate",value:function(e){e?this.setAttr("data-state","full"):this.setAttr("data-state","normal"),this.topBackIcon&&(e?(this.topBackIcon.show(),this.hide()):(this.topBackIcon.hide(),this.show()))}},{key:"show",value:function(){dC(lC(n.prototype),"show",this).call(this)}},{key:"hide",value:function(){dC(lC(n.prototype),"hide",this).call(this)}},{key:"render",value:function(){if(!this.config.disable){return'<xg-icon class="xgplayer-fullscreen">\n <div class="xgplayer-icon">\n </div>\n '.concat(rP(this,"FULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}}],[{key:"pluginName",get:function(){return"fullscreen"}},{key:"defaultConfig",get:function(){return{position:LS.CONTROLS_RIGHT,index:0,useCssFullscreen:!1,rotateFullscreen:!1,switchCallback:null,target:null,disable:!1,needBackIcon:!1}}}]),n}(ZP);function iO(){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 rO(){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 oO(){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 aO=function(e){sC(n,e);var t=fC(n);function n(){var e,i;iC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return aC(cC(i=t.call.apply(t,Mm(e=[this]).call(e,o))),"onBarMousedown",(function(e){var t=cC(i).player,n=Vm(i).call(i,".xgplayer-bar");hT.event(e);var r=n.getBoundingClientRect(),o=hT.getEventPos(e,t.zoom),a=r.height-(o.clientY-r.top);if(o.h=a,o.barH=r.height,i.pos=o,!(a<-2))return i.updateVolumePos(a,e),document.addEventListener("mouseup",i.onBarMouseUp),i._d.isStart=!0,!1})),aC(cC(i),"onBarMouseMove",(function(e){var t=cC(i)._d;if(t.isStart){var n=cC(i),r=n.pos,o=n.player;e.preventDefault(),e.stopPropagation(),hT.event(e);var a=hT.getEventPos(e,o.zoom);t.isMoving=!0;var s=r.h-a.clientY+r.clientY;s>r.barH||i.updateVolumePos(s,e)}})),aC(cC(i),"onBarMouseUp",(function(e){hT.event(e),document.removeEventListener("mouseup",i.onBarMouseUp);var t=cC(i)._d;t.isStart=!1,t.isMoving=!1})),aC(cC(i),"onMouseenter",(function(e){i._d.isActive=!0,i.focus(),i.emit("icon_mouseenter",{pluginName:i.pluginName})})),aC(cC(i),"onMouseleave",(function(e){i._d.isActive=!1,i.unFocus(100,!1,e),i.emit("icon_mouseleave",{pluginName:i.pluginName})})),aC(cC(i),"onVolumeChange",(function(e){if(i.player){var t=i.player,n=t.muted,r=t.volume;i._d.isMoving||(Vm(i).call(i,".xgplayer-drag").style.height=n||0===r?"4px":"".concat(100*r,"%"),i.config.showValueLabel&&i.updateVolumeValue()),i.animate(n,r)}})),i}return oC(n,[{key:"registerIcons",value:function(){return{volumeSmall:{icon:rO,class:"xg-volume-small"},volumeLarge:{icon:iO,class:"xg-volume"},volumeMuted:{icon:oO,class:"xg-volume-mute"}}}},{key:"afterCreate",value:function(){var e=this;if(this._timerId=null,this._d={isStart:!1,isMoving:!1,isActive:!1},!this.config.disable){this.initIcons();var t=this.playerConfig,n=t.commonStyle,i=t.volume;if(n.volumeColor)Vm(this).call(this,".xgplayer-drag").style.backgroundColor=n.volumeColor;this.changeMutedHandler=this.hook("mutedChange",(function(t){e.changeMuted(t)}),{pre:function(e){e.preventDefault(),e.stopPropagation()}}),this._onMouseenterHandler=this.hook("mouseenter",this.onMouseenter),this._onMouseleaveHandler=this.hook("mouseleave",this.onMouseleave),"mobile"!==mT.device&&"mobile"!==this.playerConfig.isMobileSimulateMode&&(this.bind("mouseenter",this._onMouseenterHandler),this.bind(["blur","mouseleave"],this._onMouseleaveHandler),this.bind(".xgplayer-slider","mousedown",this.onBarMousedown),this.bind(".xgplayer-slider","mousemove",this.onBarMouseMove),this.bind(".xgplayer-slider","mouseup",this.onBarMouseUp)),this.bind(".xgplayer-icon",["touchend","click"],this.changeMutedHandler),this.on(RT,this.onVolumeChange),this.once(MT,this.onVolumeChange),"Number"!==hT.typeOf(i)&&(this.player.volume=this.config.default),this.onVolumeChange()}}},{key:"updateVolumePos",value:function(e,t){var n=this.player,i=Vm(this).call(this,".xgplayer-drag"),r=Vm(this).call(this,".xgplayer-bar");if(r&&i){var o=qw(e/r.getBoundingClientRect().height*1e3,10);i.style.height="".concat(e,"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(t,"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 e=this.player,t=e.volume,n=e.muted,i=Vm(this).call(this,".xgplayer-value-label"),r=Math.max(Math.min(t,1),0);i.innerText=n?0:Math.ceil(100*r)}},{key:"focus",value:function(){this.player.focus({autoHide:!1}),this._timerId&&(hT.clearTimeout(this,this._timerId),this._timerId=null),hT.addClass(this.root,"slide-show")}},{key:"unFocus",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0,r=this._d,o=this.player;r.isActive||(this._timerId&&(hT.clearTimeout(this,this._timerId),this._timerId=null),this._timerId=hT.setTimeout(this,(function(){r.isActive||(n?o.blur():o.focus(),hT.removeClass(e.root,"slide-show"),r.isStart&&e.onBarMouseUp(i)),e._timerId=null}),t))}},{key:"changeMuted",value:function(e){e&&e.stopPropagation();var t=this.player;this._d.isStart&&this.onBarMouseUp(e),this.emitUserAction(e,"change_muted",{muted:t.muted,volume:t.volume,props:{muted:{from:t.muted,to:!t.muted}}}),t.volume>0&&(t.muted=!t.muted),t.volume<.01&&(t.volume=this.config.miniVolume)}},{key:"animate",value:function(e,t){e||0===t?this.setAttr("data-state","mute"):t<.5&&this.icons.volumeSmall?this.setAttr("data-state","small"):this.setAttr("data-state","normal")}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.volumeSmall),this.appendChild(".xgplayer-icon",e.volumeLarge),this.appendChild(".xgplayer-icon",e.volumeMuted)}},{key:"destroy",value:function(){this._timerId&&(hT.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"===mT.device?"touchend":"click",this.changeMutedHandler)}},{key:"render",value:function(){var e;if(!this.config.disable){var t=this.config.default||this.player.volume,n=this.config.showValueLabel;return Mm(e='\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*t,"</div>"):"",'\n <div class="xgplayer-bar">\n <xg-drag class="xgplayer-drag" style="height: ')).call(e,100*t,'%"></xg-drag>\n </div>\n </xg-slider>\n </xg-icon>')}}}],[{key:"pluginName",get:function(){return"volume"}},{key:"defaultConfig",get:function(){return{position:LS.CONTROLS_RIGHT,index:1,disable:!1,showValueLabel:!1,default:.6,miniVolume:.2}}}]),n}(HS);function sO(){return(new DOMParser).parseFromString('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M16.5 4.3H3.5C3.38954 4.3 3.3 4.38954 3.3 4.5V15.5C3.3 15.6105 3.38954 15.7 3.5 15.7H8.50005L8.50006 17.5H3.5C2.39543 17.5 1.5 16.6046 1.5 15.5V4.5C1.5 3.39543 2.39543 2.5 3.5 2.5H16.5C17.6046 2.5 18.5 3.39543 18.5 4.5V8.5H16.7V4.5C16.7 4.38954 16.6105 4.3 16.5 4.3ZM12 11.5C11.4477 11.5 11 11.9477 11 12.5L11 16.5C11 17.0523 11.4478 17.5 12 17.5H17.5C18.0523 17.5 18.5 17.0523 18.5 16.5L18.5 12.5C18.5 11.9477 18.0523 11.5 17.5 11.5H12Z"\n fill="white" />\n</svg>',"image/svg+xml").firstChild}function lO(){return(new DOMParser).parseFromString('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M16.5 4.3H3.5C3.38954 4.3 3.3 4.38954 3.3 4.5V15.5C3.3 15.6105 3.38954 15.7 3.5 15.7H8.50005L8.50006 17.5H3.5C2.39543 17.5 1.5 16.6046 1.5 15.5V4.5C1.5 3.39543 2.39543 2.5 3.5 2.5H16.5C17.6046 2.5 18.5 3.39543 18.5 4.5V8.5H16.7V4.5C16.7 4.38954 16.6105 4.3 16.5 4.3ZM12 11.5C11.4477 11.5 11 11.9477 11 12.5L11 16.5C11 17.0523 11.4478 17.5 12 17.5H17.5C18.0523 17.5 18.5 17.0523 18.5 16.5L18.5 12.5C18.5 11.9477 18.0523 11.5 17.5 11.5H12Z"\n fill="white" />\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M9.4998 7.7C9.77595 7.7 9.9998 7.47614 9.9998 7.2V6.5C9.9998 6.22386 9.77595 6 9.4998 6H5.5402L5.52754 6.00016H5.5C5.22386 6.00016 5 6.22401 5 6.50016V10.4598C5 10.7359 5.22386 10.9598 5.5 10.9598H6.2C6.47614 10.9598 6.7 10.7359 6.7 10.4598V8.83005L8.76983 10.9386C8.96327 11.1357 9.27984 11.1386 9.47691 10.9451L9.97645 10.4548C10.1735 10.2613 10.1764 9.94476 9.983 9.7477L7.97289 7.7H9.4998Z"\n fill="white" />\n</svg>',"image/svg+xml").firstChild}var uO,cO="picture-in-picture",hO="inline",fO="fullscreen",dO=function(e){sC(n,e);var t=fC(n);function n(){var e,i;iC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return aC(cC(i=t.call.apply(t,Mm(e=[this]).call(e,o))),"switchPIP",(function(e){if(!i.isPIPAvailable())return!1;e.stopPropagation&&e.stopPropagation(),i.isPip?(i.exitPIP(),i.emitUserAction(e,"change_pip",{props:"pip",from:!0,to:!1}),i.setAttr("data-state","normal")):4===i.player.media.readyState&&(i.requestPIP(),i.emitUserAction(e,"change_pip",{props:"pip",from:!1,to:!0}),i.setAttr("data-state","pip"))})),i}return oC(n,[{key:"beforeCreate",value:function(e){"boolean"==typeof e.player.config.pip&&(e.config.showIcon=e.player.config.pip)}},{key:"afterCreate",value:function(){var e=this;this.isPIPAvailable()&&(dC(lC(n.prototype),"afterCreate",this).call(this),this.pMode=hO,this.initPipEvents(),this.config.showIcon&&this.initIcons(),this.once(BT,(function(){e.config.showIcon&&(hT.removeClass(Vm(e).call(e,".xgplayer-icon"),"xg-icon-disable"),e.bind("click",e.switchPIP))})))}},{key:"registerIcons",value:function(){return{pipIcon:{icon:sO,class:"xg-get-pip"},pipIconExit:{icon:lO,class:"xg-exit-pip"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.pipIcon),this.appendChild(".xgplayer-icon",e.pipIconExit)}},{key:"initPipEvents",value:function(){var e=this,t=this.player;this.leavePIPCallback=function(){var n=t.paused;hT.setTimeout(e,(function(){!n&&t.mediaPlay()}),0),!n&&t.mediaPlay(),e.setAttr("data-state","normal"),t.emit(eS,!1)},this.enterPIPCallback=function(n){t.emit(eS,!0),e.pipWindow=n.pictureInPictureWindow,e.setAttr("data-state","pip")},this.onWebkitpresentationmodechanged=function(n){var i=t.media.webkitPresentationMode;e.pMode===fO&&i!==fO&&t.onFullscreenChange(null,!1),e.pMode=i,i===cO?e.enterPIPCallback(n):i===hO&&e.leavePIPCallback(n)},t.media&&(t.media.addEventListener("enterpictureinpicture",this.enterPIPCallback),t.media.addEventListener("leavepictureinpicture",this.leavePIPCallback),n.checkWebkitSetPresentationMode(t.media)&&t.media.addEventListener("webkitpresentationmodechanged",this.onWebkitpresentationmodechanged))}},{key:"requestPIP",value:function(){var e=this.player,t=this.playerConfig;if(this.isPIPAvailable()&&!this.isPip)try{var i=t.poster;return i&&(e.media.poster="String"===hT.typeOf(i)?i:i.poster),n.checkWebkitSetPresentationMode(e.media)?e.media.webkitSetPresentationMode("picture-in-picture"):e.media.requestPictureInPicture(),!0}catch(r){return console.error("requestPiP",r),!1}}},{key:"exitPIP",value:function(){var e=this.player;try{return this.isPIPAvailable()&&this.isPip&&(n.checkWebkitSetPresentationMode(e.media)?e.media.webkitSetPresentationMode("inline"):document.exitPictureInPicture()),!0}catch(t){return console.error("exitPIP",t),!1}}},{key:"isPip",get:function(){var e=this.player;return document.pictureInPictureElement&&document.pictureInPictureElement===e.media||e.media.webkitPresentationMode===cO}},{key:"isPIPAvailable",value:function(){var e=this.player.media;return("Boolean"!==hT.typeOf(document.pictureInPictureEnabled)||document.pictureInPictureEnabled)&&("Boolean"===hT.typeOf(e.disablePictureInPicture)&&!e.disablePictureInPicture||e.webkitSupportsPresentationMode&&"Function"===hT.typeOf(e.webkitSetPresentationMode))}},{key:"destroy",value:function(){dC(lC(n.prototype),"destroy",this).call(this);var e=this.player;e.media.removeEventListener("enterpictureinpicture",this.enterPIPCallback),e.media.removeEventListener("leavepictureinpicture",this.leavePIPCallback),n.checkWebkitSetPresentationMode(e.media)&&e.media.removeEventListener("webkitpresentationmodechanged",this.onWebkitpresentationmodechanged),this.exitPIP(),this.unbind("click",this.btnClick)}},{key:"render",value:function(){if(this.config.showIcon&&this.isPIPAvailable())return'<xg-icon class="xgplayer-pip">\n <div class="xgplayer-icon xg-icon-disable">\n </div>\n '.concat(rP(this,"PIP",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"pip"}},{key:"defaultConfig",get:function(){return{position:LS.CONTROLS_RIGHT,index:6,showIcon:!1}}},{key:"checkWebkitSetPresentationMode",value:function(e){return"function"==typeof e.webkitSetPresentationMode}}]),n}(ZP),pO=function(){function e(t){iC(this,e),this.config=t.config,this.parent=t.root,this.root=hT.createDom("ul","",{},"xg-options-list xg-list-slide-scroll ".concat(this.config.className)),t.root.appendChild(this.root);var n=this.config.maxHeight;n&&this.setStyle({maxHeight:n}),this.onItemClick=this.onItemClick.bind(this),this.renderItemList();var i="mobile"===mT.device?"touchend":"click";this._delegates=HS.delegate.call(this,this.root,"li",i,this.onItemClick)}return oC(e,[{key:"renderItemList",value:function(e){var t,n=this,i=this.config,r=this.root;(e?i.data=e:e=i.data,i.style)&&Mk(t=rw(i.style)).call(t,(function(e){r.style[e]=i[e]}));e.length>0&&(this.attrKeys=rw(e[0])),this.root.innerHTML="",Mk(e).call(e,(function(e,t){var i=e.selected?"option-item selected":"option-item";e["data-index"]=t,n.root.appendChild(hT.createDom("li","<span>".concat(e.showText,"</span>"),e,i))}))}},{key:"onItemClick",value:function(e){e.delegateTarget||(e.delegateTarget=e.target);var t=e.delegateTarget;if(t&&hT.hasClass(t,"selected"))return!1;var n="function"==typeof this.config.onItemClick?this.config.onItemClick:null,i=this.root.querySelector(".selected");hT.addClass(t,"selected"),i&&hT.removeClass(i,"selected"),n(e,{from:i?this.getAttrObj(i,this.attrKeys):null,to:this.getAttrObj(t,this.attrKeys)})}},{key:"getAttrObj",value:function(e,t){if(!e||!t)return{};var n={};Mk(t).call(t,(function(t){n[t]=e.getAttribute(t)}));var i=e.getAttribute("data-index");return i&&(n.index=Number(i)),n}},{key:"show",value:function(){hT.removeClass(this.root,"hide"),hT.addClass(this.root,"active")}},{key:"hide",value:function(){hT.removeClass(this.root,"active"),hT.addClass(this.root,"hide")}},{key:"setStyle",value:function(e){var t=this;rw(e).forEach((function(n){t.root.style[n]=e[n]}))}},{key:"destroy",value:function(){var e;this._delegates&&(Mk(e=this._delegates).call(e,(function(e){e.destroy&&e.destroy()})),this._delegates=null);this.root.innerHTML=null,this.parent.removeChild(this.root),this.root=null}}]),e}(),vO={SEI:"sei",PLAYER_CREATE_FINISH:"playerCreateFinish",FALLBACK_ERROR:"fallbackError",FALLBACK:"fallback",AUTOPLAY_STARTED:"autoplayStarted",AUTOPLAY_PREVENTED:"autoplayWasPrevented",DOWNLOAD_SPEED_CHANGE:"downloadSpeedChange",FULLSCREEN_CHANGE:"fullscreenChange",CSS_FULLSCREEN_CHANGE:"cssFullscreenChange",MINI_STATE_CHANGE:"miniStateChange",DEFINITION_CHANGE:"definitionChange",BEFORE_DEFINITION_CHANGE:"beforeDefinitionChange",AFTER_DEFINITION_CHANGE:"afterDefinitionChange",VIDEO_RESIZE:"videoResize",PIP_CHANGE:"pipChange",USER_ACTION:"userAction",AUTOPLAY_UNMUTE:"autoplayUnmute",LONG_WAITING:"longWaiting",DEFINITION_FALLBACK:"definitionFallback",AUTOPLAY_FAIL:"autoplayFail",AUTOPLAY_SUCCESS:"autoplaySuccess",ERROR_REFRESH_CLICK:"errorRefreshClick",SOURCE_CHANGE:"sourceChange"},gO=By(By({},lS),vO),yO=(Uy(uO={},vO.SEI,{event:"core_event",shouldCallback:function(e){return"core.sei"===(null==e?void 0:e.eventName)}}),Uy(uO,vO.AUTOPLAY_STARTED,{event:UT}),Uy(uO,vO.AUTOPLAY_PREVENTED,{event:jT}),Uy(uO,vO.FULLSCREEN_CHANGE,{event:WT}),Uy(uO,vO.CSS_FULLSCREEN_CHANGE,{event:YT}),Uy(uO,vO.MINI_STATE_CHANGE,{event:XT}),Uy(uO,vO.DEFINITION_CHANGE,{event:qT}),Uy(uO,vO.BEFORE_DEFINITION_CHANGE,{event:ZT}),Uy(uO,vO.AFTER_DEFINITION_CHANGE,{event:$T}),Uy(uO,vO.VIDEO_RESIZE,{event:QT}),Uy(uO,vO.PIP_CHANGE,{event:eS}),Uy(uO,vO.USER_ACTION,{event:iS}),Uy(uO,vO.DOWNLOAD_SPEED_CHANGE,{event:KT}),uO);var mO=/["'&<>]/;function _O(e,t){return function(e){if(Wy(e))return e}(e)||function(e,t){var n=null==e?null:void 0!==tc&&qy(e)||e["@@iterator"];if(null!=n){var i,r,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(uh(s).call(s,i.value),s.length!==t);l=!0);}catch(c){u=!0,r=c}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return s}}(e,t)||fm(e,t)||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.")}()}var bO=P,kO=g,wO=pr,EO=$,CO=kO(M.f),xO=kO([].push),TO=function(e){return function(t){for(var n,i=EO(t),r=wO(i),o=r.length,a=0,s=[];o>a;)n=r[a++],bO&&!CO(i,n)||xO(s,e?[n,i[n]]:i[n]);return s}},SO={entries:TO(!0),values:TO(!1)},AO=SO.entries;Pn({target:"Object",stat:!0},{entries:function(e){return AO(e)}});var PO=n(te.Object.entries);function OO(e,t){var n=void 0!==tc&&qy(e)||e["@@iterator"];if(!n){if(Wy(e)||(n=fm(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}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(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}var IO=Ie,RO=qe,MO=z,LO=jn,DO=TypeError,NO=function(e){return function(t,n,i,r){IO(n);var o=RO(t),a=MO(o),s=LO(o),l=e?s-1:0,u=e?-1:1;if(i<2)for(;;){if(l in a){r=a[l],l+=u;break}if(l+=u,e?l<0:s<=l)throw DO("Reduce of empty array with no initial value")}for(;e?l>=0:s>l;l+=u)l in a&&(r=n(r,a[l],l,o));return r}},FO={left:NO(!1),right:NO(!0)}.left;Pn({target:"Array",proto:!0,forced:!Uf&&ve>79&&ve<83||!Fc("reduce")},{reduce:function(e){var t=arguments.length;return FO(this,e,t,t>1?arguments[1]:void 0)}});var HO=Bc("Array").reduce,UO=se,jO=HO,BO=Array.prototype,VO=n((function(e){var t=e.reduce;return e===BO||UO(BO,e)&&t===BO.reduce?jO:t}));var GO=function(){function e(t){var n;pm(this,e),Uy(this,"definition",void 0),Uy(this,"source",void 0),Uy(this,"text",void 0),Uy(this,"fallbackUrl",void 0),Uy(this,"urls",void 0),Uy(this,"_currentUrlRef",void 0);var i=t.url,r=t.definition,o=t.text,a=t.source,s=t.fallbackUrls;this.definition=r,this.text=o,this.source=a,this.urls=Mm(n=[i]).call(n,dm(null!=s?s:[])),this.fallbackUrl=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t={url:e[0],next:null},n=t,i=1;i<e.length;i++){var r=i===e.length-1?t:null,o={url:e[i],next:r};n.next=o,n=o}return t}(this.urls),this._currentUrlRef=this.fallbackUrl}return gm(e,[{key:"url",get:function(){return this._currentUrlRef.url}},{key:"next",value:function(){var e=this._currentUrlRef.next;return e&&(this._currentUrlRef=e),this._currentUrlRef}}]),e}(),zO=function(){function e(t,n,i){var r=this;pm(this,e),Uy(this,"name",void 0),Uy(this,"text",void 0),Uy(this,"definitions",void 0),this.definitions=Mk(t).call(t,(function(e){return new GO(IC({},e,{source:r}))})),this.name=n,this.text=i}return gm(e,[{key:"defaultDefinition",get:function(){return this.definitions[0]}},{key:"add",value:function(e){this.definitions.push(e)}}],[{key:"normalize",value:function(t){if(void 0===t)throw new Error('"input" cannot be undefined');var n=void 0,i=void 0,r=void 0;if("string"==typeof t?n=t:Array.isArray(t)?r=t:(n=t.url,i=t.fallbackUrls,r=t.sources),"string"==typeof n)return e.normalizeUrl(n,i);if(Array.isArray(r)){if(0===r.length)throw new Error('"sources" cannot be an empty array');return Mk(r).call(r,(function(t){var n;return new e(Mk(n=t.definitions).call(n,(function(e){return"string"==typeof e?{url:e,definition:"unknown"}:e})),t.name,t.text)}))}return[]}},{key:"normalizeUrl",value:function(t,n){var i=new e([],"unknown");return i.add(new GO({definition:"unknown",url:t,source:i,fallbackUrls:n})),[i]}}]),e}(),KO=function(){function e(t){var n,i,r,o;pm(this,e),Uy(this,"defaultSource",void 0),Uy(this,"defaultDefinition",void 0),Uy(this,"maxFallbackRound",void 0),Uy(this,"_prepareList",[]),Uy(this,"_currentDefinition",void 0),Uy(this,"_sources",void 0),Uy(this,"_fallbackCount",0);var a=t.url,s=t.defaultDefinition,l=t.defaultSource,u=t.sources,c=t.maxFallbackRound;this.defaultDefinition=s,this.defaultSource=l,this.maxFallbackRound=null!=c?c:1,this._sources=u;var h=a?Vm(this).call(this,a):null===(n=Vm(i=this.sources).call(i,(function(e){return void 0===l||e.name===l})))||void 0===n?void 0:Vm(r=n.definitions).call(r,(function(e){return void 0===s||e.definition===s}));this._currentDefinition=null!=h?h:null===(o=this._sources)||void 0===o||null===(o=o[0])||void 0===o||null===(o=o.definitions)||void 0===o?void 0:o[0]}var t;return gm(e,[{key:"sources",get:function(){return this._sources}},{key:"definition",get:function(){return this._currentDefinition}},{key:"source",get:function(){var e;return null===(e=this.definition)||void 0===e?void 0:e.source}},{key:"url",get:function(){var e;return null===(e=this.definition)||void 0===e?void 0:e.url}},{key:"find",value:function(e,t){var n,i,r,o,a,s=this;if("string"==typeof e)return Vm(o=VO(a=this.sources).call(a,(function(e,t){return Mm(e).call(e,t.definitions)}),[])).call(o,(function(t){return t.url===e}));var l=Vm(n=this.sources).call(n,(function(t){var n,i;return t.name===(null!==(n=null==e?void 0:e.source)&&void 0!==n?n:null===(i=s.source)||void 0===i?void 0:i.name)})),u=null==l?void 0:Vm(i=l.definitions).call(i,(function(t){var n,i;return t.definition===(null!==(n=null==e?void 0:e.definition)&&void 0!==n?n:null===(i=s.definition)||void 0===i?void 0:i.definition)}));return u||(null!=t&&t.fallbackToFirstDefinition&&null!=l&&null!==(r=l.definitions)&&void 0!==r&&r.length?null==l?void 0:l.definitions[0]:void 0)}},{key:"fallback",value:function(){var e;if(this._fallbackCount++,!(this._fallbackCount>=this.maxFallbackRound*this.definition.urls.length)){var t=null===(e=this._currentDefinition)||void 0===e?void 0:e.next();return null==t?void 0:t.url}this.resetFallback()}},{key:"switch",value:function(e){return this._currentDefinition=e,this.resetFallback(),e}},{key:"updateSources",value:function(e,t){var n,i,r,o,a;return this._sources=zO.normalize(e),this._currentDefinition=null!==(n=Vm(this).call(this,null!=t?t:{source:null!==(i=this.defaultSource)&&void 0!==i?i:null===(r=this._currentDefinition)||void 0===r?void 0:r.source.name,definition:null!==(o=this.defaultDefinition)&&void 0!==o?o:null===(a=this._currentDefinition)||void 0===a?void 0:a.definition}))&&void 0!==n?n:this._sources[0].definitions[0],this.resetFallback(),this}},{key:"registerPrepare",value:function(e){this._prepareList.push(e)}},{key:"prepare",value:(t=Gy(Jg().mark((function e(t){var n,i,r;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=OO(this._prepareList),e.prev=1,n.s();case 3:if((i=n.n()).done){e.next=9;break}return r=i.value,e.next=7,r(t);case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),n.e(e.t0);case 14:return e.prev=14,n.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))),function(e){return t.apply(this,arguments)})},{key:"resetFallback",value:function(){this._fallbackCount=0}}]),e}();function WO(){var e;"undefined"!=typeof Reflect&&qE?WO=FA(e=qE).call(e):WO=function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=jA(e)););return e}(e,t);if(i){var r=ky(i,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}};return WO.apply(this,arguments)}function YO(){return(new DOMParser).parseFromString('<svg width="150" height="162" viewBox="0 0 150 162" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M127.718 112.831H6.13675C4.19663 112.831 2.25651 108.974 2.90322 104.475C3.54993 99.9761 8.07687 99.9761 13.8972 99.9761C11.9571 97.4052 9.37028 88.4069 15.8373 81.3369C22.3044 74.2668 25.5379 74.2668 34.5918 75.5526C33.9451 63.9837 47.526 34.4178 77.2744 35.0605C107.023 35.7032 116.077 54.3421 119.957 63.3404C129.011 62.6976 147.765 66.554 149.706 87.1214C151.258 103.575 135.694 111.117 127.718 112.831Z" fill="#F1F4F8"/>\n<path d="M44.9346 91.6022L43.6782 99.8032" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n<path d="M47.3545 125.695L48.6109 117.494" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n<path d="M31.5347 97.7378L38.7295 101.869" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n<path d="M60.7544 119.559L53.5595 115.428" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n<path d="M69.6755 44.5318L138.35 26.0209C139.115 25.8148 139.804 26.5367 139.563 27.2909L121.081 85.1146C120.982 85.4243 120.739 85.6665 120.429 85.7641L52.0645 107.28C51.2996 107.521 50.5766 106.809 50.8062 106.04L68.9776 45.2111C69.0768 44.879 69.3409 44.622 69.6755 44.5318Z" fill="#D0D6E0" stroke="#D0D6E0" stroke-width="4" stroke-linecap="round"/>\n<path d="M83.1285 52.7415C91.6454 54.3438 107.322 62.0019 101.894 79.8155" stroke="white" stroke-width="3" stroke-linecap="round"/>\n<path d="M84.138 62.3385C88.3894 63.1384 96.2148 66.9611 93.5053 75.8531" stroke="white" stroke-width="3" stroke-linecap="round"/>\n<ellipse cx="83.6417" cy="71.98" rx="3.08443" ry="3.07025" transform="rotate(12.6375 83.6417 71.98)" fill="white"/>\n<path d="M43.4699 110.358C39.5425 109.114 30.6316 108.203 26.4077 114.511C21.1278 122.397 36.5031 152.755 2.11053 160.141" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n</svg>\n',"image/svg+xml").firstChild}var XO=function(e){UA(n,e);var t=VA(n);function n(){var e,i;pm(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Uy(PA(i=t.call.apply(t,Mm(e=[this]).call(e,o))),"_error",void 0),i}return gm(n,[{key:"_errorTip",get:function(){var e,t,n,i=this.player.config.i18nManager,r=null===(e=this._error)||void 0===e?void 0:e.errorCode;return this.config.errorTipsText?i.normalize(this.config.errorTipsText):Mm(t="".concat(r?"[".concat(r,"] "):"")).call(t,null===(n=this._error)||void 0===n?void 0:n.message)}},{key:"afterCreate",value:function(){this._handleRefresh=this._handleRefresh.bind(this),this._focus=this._focus.bind(this),this._initEvents(),this._initIcons(),"mobile"===mT.device&&this.bind("touchend",this._focus),this.bind(".veplayer-error-refresh","click",this._handleRefresh)}},{key:"registerIcons",value:function(){return{error:{icon:YO,class:"veplayer-error-svg"}}}},{key:"updateLang",value:function(){this.config.showRefresh&&this._renderRefresh(),this._renderExtraTips()}},{key:"showError",value:function(e){this._error=e instanceof XA?e:ZA(e),this.config.showErrorTip&&this._renderText(this._errorTip),this._renderExtraTips(),WO(jA(n.prototype),"show",this).call(this)}},{key:"hideError",value:function(){WO(jA(n.prototype),"hide",this).call(this)}},{key:"destroy",value:function(){"mobile"===mT.device&&this.unbind("touchend",this._focus),this.unbind(".veplayer-error-refresh","click",this._handleRefresh),this.off(gO.FALLBACK_ERROR,this.showError.bind(this)),this.off(OT,this.hideError.bind(this))}},{key:"render",value:function(){var e,t=this.player.config.i18nManager;return Mm(e='<veplayer-error class="veplayer-error">\n <div class="veplayer-error-cover">\n '.concat(this.config.showErrorImg?'<div class="veplayer-error-img"></div>':"",'\n <div class="veplayer-error-tips"></div>\n ')).call(e,this.config.showRefresh?'<div class="veplayer-error-refresh">'.concat(t.getText("ERROR_REFRESH"),"</div>"):"",'\n <div class="veplayer-error-extra"></div>\n </div>\n </veplayer-error>')}},{key:"_focus",value:function(){this.player.focus({autoHide:!0})}},{key:"_initIcons",value:function(){this.config.showErrorImg&&this.appendChild(".veplayer-error-img",this.icons.error)}},{key:"_initEvents",value:function(){this.on(gO.FALLBACK_ERROR,this.showError.bind(this)),this.on(OT,this.hideError.bind(this)),this.on(ET,this.hideError.bind(this)),this.on(JT,this.hideError.bind(this))}},{key:"_renderText",value:function(e){var t=Vm(this).call(this,".veplayer-error-tips");t&&(t.innerText=e)}},{key:"_renderExtraTips",value:function(){var e,t=this,n=Vm(this).call(this,".veplayer-error-extra");n&&(n.innerHTML="");var i=this.player.config.i18nManager;null===(e=this.config.extraTips)||void 0===e||e.forEach((function(e){if(e){var n,r=hT.createDom("div",Mm(n="".concat(i.normalize(e.label),": ")).call(n,i.normalize(e.value)),void 0,"veplayer-error-detail-info");t.appendChild(".veplayer-error-extra",r)}}))}},{key:"_handleRefresh",value:function(){var e,t;null===(e=this.player)||void 0===e||e.emit(gO.ERROR_REFRESH_CLICK),null===(t=this.player)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.veplayer)||void 0===t||t.retry(),this.hideError()}},{key:"_renderRefresh",value:function(){var e,t=this.player.config.i18nManager,n=Vm(this).call(this,".veplayer-error-refresh");n&&(n.innerHTML=null!==(e=t.getText("ERROR_REFRESH"))&&void 0!==e?e:"")}}],[{key:"pluginName",get:function(){return"error"}},{key:"defaultConfig",get:function(){return{showErrorImg:!0,showErrorTip:!0,showRefresh:!0,errorTipsText:"",extraTips:[],position:HS.POSITIONS.ROOT}}}]),n}(HS),qO=function(e){UA(n,e);var t=VA(n);function n(){var e,i;pm(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Uy(PA(i=t.call.apply(t,Mm(e=[this]).call(e,o))),"_toastNumber",0),Uy(PA(i),"_toastMap",{}),i}return gm(n,[{key:"toast",value:function(e,t){var n=this,i=t||{},r=i.duration,o=void 0===r?2e3:r,a=i.closable,s=void 0!==a&&a,l=this._toastNumber+1;this._toastNumber=l;var u=this._renderToast(e,s,l);return this.root.appendChild(u),this._toastMap[l]=u,setTimeout((function(){n.remove(l)}),o),l}},{key:"remove",value:function(e){var t=this._toastMap[e];t&&(this.root.contains(t)&&this.root.removeChild(t),delete this._toastMap[e])}},{key:"render",value:function(){return'<veplayer-toast class="veplayer-toast"></veplayer-toast>'}},{key:"_renderToast",value:function(e,t,n){var i=this,r=hT.createDom("div","",void 0,"veplayer-toast-container"),o=hT.checkIsObject(e)?e:hT.createDom("div",e,void 0,"veplayer-toast-txt");if(r.appendChild(o),t){var a=hT.createDom("span","×",void 0,"veplayer-toast-close");a.addEventListener("click",(function(){i.remove(n)})),r.appendChild(a)}return r}}],[{key:"pluginName",get:function(){return"toast"}},{key:"defaultConfig",get:function(){return{index:5}}}]),n}(HS);function ZO(){return(new DOMParser).parseFromString('<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M12.7123 1C11.85 1 11.1173 1.55472 10.8516 2.32675L4.94973 2.32675C3.16413 2.32675 1.71662 3.77427 1.71662 5.55987C1.71662 7.34547 3.16413 8.79298 4.94973 8.79298L11.0483 8.79298L11.1134 8.79418C11.9936 8.82748 12.697 9.55166 12.697 10.44C12.697 11.3497 11.9596 12.0871 11.05 12.0871H5.01323C4.67882 11.4781 4.03143 11.0654 3.28763 11.0654C2.20111 11.0654 1.32031 11.9462 1.32031 13.0327C1.32031 14.1192 2.20111 15 3.28763 15C4.14992 15 4.88264 14.4452 5.14834 13.6732H11.05C12.8356 13.6732 14.2831 12.2256 14.2831 10.44C14.2831 8.65444 12.8356 7.20693 11.05 7.20693L4.94973 7.20693C4.04009 7.20693 3.30267 6.46951 3.30267 5.55987C3.30267 4.65022 4.04009 3.91281 4.94973 3.91281L10.9866 3.91281C11.321 4.52183 11.9685 4.93464 12.7123 4.93464C13.7988 4.93464 14.6796 4.05384 14.6796 2.96732C14.6796 1.8808 13.7988 1 12.7123 1ZM12.7123 2.18954C12.2827 2.18954 11.9345 2.53777 11.9345 2.96732C11.9345 3.39688 12.2827 3.7451 12.7123 3.7451C13.1418 3.7451 13.4901 3.39688 13.4901 2.96732C13.4901 2.53777 13.1418 2.18954 12.7123 2.18954ZM2.50986 13.0327C2.50986 12.6031 2.85808 12.2549 3.28763 12.2549C3.71719 12.2549 4.06541 12.6031 4.06541 13.0327C4.06541 13.4622 3.71719 13.8105 3.28763 13.8105C2.85808 13.8105 2.50986 13.4622 2.50986 13.0327Z" fill="#FFFFFF"/>\n</svg>',"image/svg+xml").firstChild}var $O=function(){function e(t){pm(this,e),Uy(this,"_root",void 0),Uy(this,"_config",void 0),Uy(this,"_parent",void 0),Uy(this,"_listDom",void 0),Uy(this,"_container",void 0),Uy(this,"_titleDom",void 0),Uy(this,"_player",void 0),Uy(this,"_delegates",void 0),Uy(this,"_listType",void 0);var n=t.config,i=t.root,r=t.player;this._config=n,this._parent=i,this._player=r,this._listType=n.listType,this.renderPanel(),this._initEvents(),this._bindDomEvent()}return gm(e,[{key:"changeMode",value:function(e){this.updatePanel(e),this._listType=e}},{key:"renderItemList",value:function(e){var t,n=this,i=this._config;return e&&(i.list=e),this._listDom||(this._listDom=hT.createDom("div","",{},"item-list-panel-content")),this._listDom.innerHTML="",null===(t=i.list)||void 0===t||Mk(t).call(t,(function(e,t){var i,r,o=e.selected?"panel-item select-in":"panel-item ".concat(null!==(i=e.className)&&void 0!==i?i:"");e["data-index"]=t;var a=hT.createDom("div","",e,o);e.showText&&("string"==typeof e.showText?a.innerHTML=e.showText:a.appendChild(e.showText)),null===(r=n._listDom)||void 0===r||r.appendChild(a)})),this._listDom}},{key:"renderTitle",value:function(){var e,t,n=this._player.config.i18nManager;if(null!==(e=this._config.panel)&&void 0!==e&&e.title&&this._listType!==JO.Inner)return this._titleDom||(this._titleDom=hT.createDom("div","",{},"xg-mobile-panel-title")),this._titleDom.innerHTML=n.normalize(null===(t=this._config.panel)||void 0===t?void 0:t.title),this._titleDom}},{key:"updatePanel",value:function(e){this._root&&hT.removeClass(this._root,"panel-".concat(this._listType)),this._root&&hT.addClass(this._root,"panel-".concat(e));var t="mobile"===mT.device?"touchend":"click";e===JO.Inner?this._container&&this._bind(this._container,t,this._handleHide.bind(this)):this._container&&this._unbind(this._container,t,this._handleHide.bind(this))}},{key:"renderPanel",value:function(){var e,t,n,i=Mm(e="xg-mobile-panel panel-".concat(this._config.listType," ")).call(e,null!==(t=null===(n=this._config)||void 0===n||null===(n=n.panel)||void 0===n?void 0:n.className)&&void 0!==t?t:"");this._root=hT.createDom("div","",{},i),this._parent&&this._parent.appendChild(this._root);var r=this.renderTitle(),o=this.renderItemList();this._container=hT.createDom("div","",{},"xg-mobile-panel-content"),this._root.appendChild(this._container),r&&this._container.appendChild(r),o&&this._container.appendChild(o)}},{key:"show",value:function(){this._root&&(hT.removeClass(this._root,"hide"),hT.addClass(this._root,"active"))}},{key:"hide",value:function(){this._root&&(hT.removeClass(this._root,"active"),hT.addClass(this._root,"hide"))}},{key:"destroy",value:function(){this._parent&&this._root&&this._parent.removeChild(this._root),this._unbindDomEvent(),this._unbindEvents()}},{key:"_bind",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e&&"on".concat(t)in e&&"function"==typeof n&&e.addEventListener(t,n,i)}},{key:"_unbind",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e&&"on".concat(t)in e&&"function"==typeof n&&e.removeEventListener(t,n,i)}},{key:"_initEvents",value:function(){var e;this._config.isAutoChange&&(window.addEventListener("orientationchange",this._handleOrientationChange.bind(this)),null===(e=this._player)||void 0===e||e.on(WT,this._handleOrientationChange.bind(this)))}},{key:"_unbindEvents",value:function(){var e;window.removeEventListener("orientationchange",this._handleOrientationChange.bind(this)),null===(e=this._player)||void 0===e||e.off(WT,this._handleOrientationChange.bind(this))}},{key:"_handleOrientationChange",value:function(){var e,t,n,i=nw(e=[90,-90,"90","-90"]).call(e,window.orientation);if(null!==(t=this._player)&&void 0!==t&&t.fullscreen&&i)this.changeMode(JO.Fullscreen);else if(this._listType!==(null===(n=this._config)||void 0===n?void 0:n.listType)){var r;this.changeMode(null===(r=this._config)||void 0===r?void 0:r.listType)}}},{key:"_bindDomEvent",value:function(){var e="mobile"===mT.device?"touchend":"click";this._listType===JO.Inner&&this._container&&this._bind(this._container,e,this._handleHide.bind(this)),this._root&&this._bind(this._root,e,this._handleHide.bind(this)),this._container&&this._bind(this._container,e,this._stopPropagation),this._listDom&&(this._delegates=HS.delegate.call(this,this._listDom,".panel-item",e,this._onItemClick.bind(this),!0))}},{key:"_unbindDomEvent",value:function(){var e,t="mobile"===mT.device?"touchend":"click";(this._root&&this._unbind(this._root,t,this._handleHide.bind(this)),this._container&&this._unbind(this._container,t,this._handleHide.bind(this)),this._container&&this._unbind(this._container,t,this._stopPropagation),this._delegates)&&(Mk(e=this._delegates).call(e,(function(e){e.destroy&&e.destroy()})),this._delegates=null)}},{key:"_stopPropagation",value:function(e){e.stopPropagation(),e.preventDefault()}},{key:"_onItemClick",value:function(e){var t,n,i,r,o=e.delegateTarget,a="function"==typeof this._config.onOptionClick?this._config.onOptionClick:null,s="function"==typeof this._config.onItemClick?this._config.onItemClick:null,l=null===(t=this._root)||void 0===t?void 0:t.querySelector(".selected");hT.addClass(o,"selected"),l&&(hT.removeClass(l,"selected"),r=Number(l.getAttribute("data-index")));var u=Number(o.getAttribute("data-index")),c={from:void 0!==bc(r)?null===(n=this._config.list)||void 0===n?void 0:n[r]:void 0,to:null===(i=this._config.list)||void 0===i?void 0:i[u]};null==a||a(e,c),o&&r===u||null==s||s(e,c)}},{key:"_handleHide",value:function(e){var t,n;e.stopPropagation(),e.preventDefault(),null===(t=(n=this._config).hide)||void 0===t||t.call(n)}}]),e}(),JO=function(e){return e.Middle="middle",e.Bottom="bottom",e.Fullscreen="fullscreen",e.Inner="inner",e}(JO||{}),QO=function(e){return e.Icon="Icon",e.Text="Text",e}(QO||{}),eI="mobile"===mT.device,tI=["bottom","fullscreen","inner"],nI=["middle"],iI=["bottom","inner","fullscreen"],rI=["bottom","inner","fullscreen"],oI=function(e){UA(n,e);var t=VA(n);function n(e){var i;return pm(this,n),Uy(PA(i=t.call(this,e)),"optionsList",void 0),Uy(PA(i),"_isIcon",void 0),Uy(PA(i),"_isActive",void 0),Uy(PA(i),"_curIndex",void 0),Uy(PA(i),"activeEvent",void 0),Uy(PA(i),"onEnter",(function(e){e.preventDefault(),e.stopPropagation(),i.emit("icon_mouseenter",{pluginName:i.pluginName}),i.toggle(!0)})),Uy(PA(i),"onLeave",(function(e){e.preventDefault(),e.stopPropagation(),i.emit("icon_mouseleave",{pluginName:i.pluginName}),i._isActive&&i.toggle(!1)})),i._isIcon=!1,i._isActive=!1,i._curIndex=0,i}return gm(n,[{key:"updateLang",value:function(){this.config.list&&this.renderItemList(this.config.list,this._curIndex)}},{key:"afterCreate",value:function(){var e=this,t=this.config;this.config.listType=this._getListType(),this.initIcons(),t.hidePortrait&&hT.addClass(this.root,"portrait"),eI&&this.on(DT,(function(){e._isActive&&(e.optionsList&&e.optionsList.hide(),e._isActive=!1)})),t.list&&this.renderItemList(t.list),this.activeEvent=eI?"touchend":"mouseenter",this.bind(this.activeEvent,this.onEnter),this.bind("mouseleave",this.onLeave)}},{key:"initIcons",value:function(){var e=this,t=this.icons,n=rw(t);if(n.length>0&&"Icon"===this.config.renderType)return n.forEach((function(n){e.appendChild(".xgplayer-icon",t[n])})),void(this._isIcon=!0);var i=this.appendChild(".xgplayer-icon",hT.createDom("span","",{},"icon-text"));i&&hT.addClass(i,"btn-text")}},{key:"show",value:function(){!this.config.list||this.config.list.length<1||this.config.hideOnSingleOption&&1===this.config.list.length||hT.addClass(this.root,"show")}},{key:"hide",value:function(){hT.removeClass(this.root,"show")}},{key:"toggle",value:function(e){if(e!==this._isActive){var t=this.player.controls,n=this.config.listType;e?(n&&nw(iI).call(iI,n)?t.blur():t.focus(),this.optionsList&&this.optionsList.show()):(n&&nw(iI).call(iI,n)?t.focus():t.focusAwhile(),this.optionsList&&this.optionsList.hide()),this._isActive=e}}},{key:"onItemClick",value:function(e,t){var n;e.preventDefault(),e.stopPropagation();var i=this.config.listType;this._curIndex=null===(n=t.to)||void 0===n?void 0:n.index,this.changeCurrentText(),(this.config.isItemClickHide||i&&nw(iI).call(iI,i))&&this.toggle(!1)}},{key:"onOptionClick",value:function(e,t){e.preventDefault(),e.stopPropagation()}},{key:"changeCurrentText",value:function(){if(!this._isIcon){var e=this.config.list,t=e&&this._curIndex<e.length?this._curIndex:0,n=null==e?void 0:e[t];if(n){var i,r=Vm(this).call(this,".icon-text"),o=this.player.config.i18nManager;if(r)r.innerHTML=o.normalize(null!==(i=null==n?void 0:n.iconText)&&void 0!==i?i:null==n?void 0:n.text)}}}},{key:"renderItemList",value:function(e,t){var i,r=this,o=this.config,a=this.optionsList,s=this.player;if("number"==typeof t&&(this._curIndex=t),a)return a.renderItemList(e),this.changeCurrentText(),void(a instanceof $O&&a.renderTitle());this.config.isShowIcon&&(this.optionsList=o.listType&&nw(rI).call(rI,o.listType)?new $O({config:{list:e||[],onItemClick:function(e,t){r.onItemClick(e,t)},onOptionClick:function(e,t){r.onOptionClick(e,t)},panel:this.config.panel,listType:null!==(i=o.listType)&&void 0!==i?i:n.defaultConfig.listType,isAutoChange:o.isAutoChange,hide:function(){return r.toggle(!1)}},root:s.root,player:s}):new pO({config:{data:e||[],onItemClick:function(e,t){r.onItemClick(e,t)}},root:this.root}),this.changeCurrentText(),this.show())}},{key:"destroy",value:function(){this.activeEvent&&this.unbind(this.activeEvent,this.onEnter),this.unbind("mouseleave",this.onLeave),this.optionsList&&(this.optionsList.destroy(),this.optionsList=void 0)}},{key:"render",value:function(){return this.config.isShowIcon?'<xg-icon class="xg-options-icon '.concat(this.config.className||"",'">\n <div class="xgplayer-icon">\n </div>\n </xg-icon>'):""}},{key:"_getListType",value:function(){var e,t=this.config.listType;return null!==(e=this.player)&&void 0!==e&&null!==(e=e.config)&&void 0!==e&&e.listType&&(t=this.player.config.listType),eI||t&&nw(tI).call(tI,t)||(t="bottom"),eI||t&&nw(nI).call(nI,t)||(t="middle"),t}}],[{key:"pluginName",get:function(){return"optionsIcon"}},{key:"defaultConfig",get:function(){return{position:eI?_R.ROOT_TOP_RIGHT:_R.CONTROLS_RIGHT,listType:eI?"bottom":"middle",index:100,list:[],listStyle:{},hidePortrait:!0,isShowIcon:!1,renderType:eI?"Icon":"Text",isItemClickHide:!0,hideOnSingleOption:!0,isAutoChange:!0}}}]),n}(HS),aI=function(e){UA(n,e);var t=VA(n);function n(){return pm(this,n),t.apply(this,arguments)}return gm(n,[{key:"updateLang",value:function(){this.renderItemList()}},{key:"beforeCreate",value:function(e){var t=e.player.config.sources.sourceManager;e.config.list=t.sources}},{key:"afterCreate",value:function(){WO(jA(n.prototype),"afterCreate",this).call(this),this.config.sourceManager.sources.length<2?this.hide():this.renderItemList()}},{key:"registerIcons",value:function(){return{source:{icon:ZO}}}},{key:"renderItemList",value:function(){var e=this.config.sourceManager,t=e.sources,i=e.source,r=this.player.config.i18nManager,o=Mk(t).call(t,(function(e){var t;return By(By({},e),{},{showText:null!==(t=r.normalize(e.text))&&void 0!==t?t:e.name,selected:!1})})),a=qP(o).call(o,(function(e){return e.name===(null==i?void 0:i.name)}));this.config.list=t,a>-1&&(o[a].selected=!0),WO(jA(n.prototype),"renderItemList",this).call(this,o,a)}},{key:"onItemClick",value:function(e,t){var i,r=this;WO(jA(n.prototype),"onItemClick",this).call(this,e,t),null===(i=this.player.config)||void 0===i||i.veplayer.switch({source:t.to.name},{fallbackToFirstDefinition:!0}).catch((function(){r.renderItemList()}))}}],[{key:"pluginName",get:function(){return"sources"}},{key:"defaultConfig",get:function(){return By(By({},oI.defaultConfig),{},{index:4,panel:{title:{jp:"ライン選ぶ",en:"Line Choose","zh-cn":"线路选择","zh-hk":"線路選擇"}},list:[],className:"xgplayer-sources",hidePortrait:!1,isShowIcon:!0})}},{key:"textTips",get:function(){return{jp:"ライン",en:"Line","zh-cn":"线路","zh-hk":"線路"}}}]),n}(oI);function sI(){return(new DOMParser).parseFromString('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M16 3.8001H4C3.55817 3.8001 3.2 4.15827 3.2 4.6001V12.6001C3.2 13.0419 3.55817 13.4001 4 13.4001H16C16.4418 13.4001 16.8 13.0419 16.8 12.6001V4.6001C16.8 4.15827 16.4418 3.8001 16 3.8001ZM4 2.6001C2.89543 2.6001 2 3.49553 2 4.6001V12.6001C2 13.7047 2.89543 14.6001 4 14.6001H16C17.1046 14.6001 18 13.7047 18 12.6001V4.6001C18 3.49553 17.1046 2.6001 16 2.6001H4ZM5.0249 6.24509V11.6001H5.9024V9.23009H8.6174V11.6001H9.4949V6.24509H8.6174V8.48009H5.9024V6.24509H5.0249ZM10.5474 6.24509V11.6001H12.5049C13.3749 11.6001 14.0274 11.3601 14.4774 10.8801C14.9049 10.4226 15.1224 9.77009 15.1224 8.92259C15.1224 8.06759 14.9049 7.41509 14.4774 6.96509C14.0274 6.48509 13.3749 6.24509 12.5049 6.24509H10.5474ZM11.4249 6.99509H12.3399C13.0074 6.99509 13.4949 7.14509 13.8024 7.45259C14.1024 7.75259 14.2524 8.24759 14.2524 8.92259C14.2524 9.58259 14.1024 10.0701 13.8024 10.3851C13.4949 10.6926 13.0074 10.8501 12.3399 10.8501H11.4249V6.99509ZM4.15 16.1001C3.79101 16.1001 3.5 16.3911 3.5 16.7501C3.5 17.1091 3.79101 17.4001 4.15 17.4001H15.85C16.209 17.4001 16.5 17.1091 16.5 16.7501C16.5 16.3911 16.209 16.1001 15.85 16.1001H4.15Z" fill="#ffffff"/>\n</svg>',"image/svg+xml").firstChild}var lI={exports:{}};!function(e,n){var i="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",a="[object Boolean]",s="[object Date]",l="[object Function]",u="[object GeneratorFunction]",c="[object Map]",h="[object Number]",f="[object Object]",d="[object Promise]",p="[object RegExp]",v="[object Set]",g="[object String]",y="[object Symbol]",m="[object WeakMap]",_="[object ArrayBuffer]",b="[object DataView]",k="[object Float32Array]",w="[object Float64Array]",E="[object Int8Array]",C="[object Int16Array]",x="[object Int32Array]",T="[object Uint8Array]",S="[object Uint8ClampedArray]",A="[object Uint16Array]",P="[object Uint32Array]",O=/\w*$/,I=/^\[object .+?Constructor\]$/,R=/^(?:0|[1-9]\d*)$/,M={};M[o]=M["[object Array]"]=M[_]=M[b]=M[a]=M[s]=M[k]=M[w]=M[E]=M[C]=M[x]=M[c]=M[h]=M[f]=M[p]=M[v]=M[g]=M[y]=M[T]=M[S]=M[A]=M[P]=!0,M["[object Error]"]=M[l]=M[m]=!1;var L="object"==bc(t)&&t&&t.Object===Object&&t,D="object"==("undefined"==typeof self?"undefined":bc(self))&&self&&self.Object===Object&&self,N=L||D||Function("return this")(),F=n&&!n.nodeType&&n,H=F&&e&&!e.nodeType&&e,U=H&&H.exports===F;function j(e,t){return e.set(t[0],t[1]),e}function B(e,t){return e.add(t),e}function V(e,t,n,i){var r=-1,o=e?e.length:0;for(i&&o&&(n=e[++r]);++r<o;)n=t(n,e[r],r,e);return n}function G(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}function z(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function K(e,t){return function(n){return e(t(n))}}function W(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var Y,X=Array.prototype,q=Function.prototype,Z=Object.prototype,$=N["__core-js_shared__"],J=(Y=/[^.]+$/.exec($&&iE($)&&iE($).IE_PROTO||""))?"Symbol(src)_1."+Y:"",Q=q.toString,ee=Z.hasOwnProperty,te=Z.toString,ne=RegExp("^"+Q.call(ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ie=U?N.Buffer:void 0,re=N.Symbol,oe=N.Uint8Array,ae=K(fE,Object),se=Object.create,le=Z.propertyIsEnumerable,ue=Tw(X),ce=rE,he=ie?ie.isBuffer:void 0,fe=K(rw,Object),de=He(N,"DataView"),pe=He(N,"Map"),ve=He(N,"Promise"),ge=He(N,"Set"),ye=He(N,"WeakMap"),me=He(Object,"create"),_e=Ge(de),be=Ge(pe),ke=Ge(ve),we=Ge(ge),Ee=Ge(ye),Ce=re?re.prototype:void 0,xe=Ce?Ce.valueOf:void 0;function Te(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Se(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Ae(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Pe(e){this.__data__=new Se(e)}function Oe(e,t){var n=Ke(e)||function(e){return function(e){return function(e){return!!e&&"object"==bc(e)}(e)&&We(e)}(e)&&ee.call(e,"callee")&&(!le.call(e,"callee")||te.call(e)==o)}(e)?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],i=n.length,r=!!i;for(var a in e)!t&&!ee.call(e,a)||r&&("length"==a||Be(a,i))||n.push(a);return n}function Ie(e,t,n){var i=e[t];ee.call(e,t)&&ze(i,n)&&(void 0!==n||t in e)||(e[t]=n)}function Re(e,t){for(var n=e.length;n--;)if(ze(e[n][0],t))return n;return-1}function Me(e,t,n,i,r,d,m){var I;if(i&&(I=d?i(e,r,d,m):i(e)),void 0!==I)return I;if(!qe(e))return e;var R=Ke(e);if(R){if(I=function(e){var t=e.length,n=e.constructor(t);t&&"string"==typeof e[0]&&ee.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!t)return function(e,t){var n=-1,i=e.length;t||(t=Array(i));for(;++n<i;)t[n]=e[n];return t}(e,I)}else{var L=je(e),D=L==l||L==u;if(Ye(e))return function(e,t){if(t)return ow(e).call(e);var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(L==f||L==o||D&&!d){if(G(e))return d?e:{};if(I=function(e){return"function"!=typeof e.constructor||Ve(e)?{}:(t=ae(e),qe(t)?se(t):{});var t}(D?{}:e),!t)return function(e,t){return Ne(e,Ue(e),t)}(e,function(e,t){return e&&Ne(t,Ze(t),e)}(I,e))}else{if(!M[L])return d?e:{};I=function(e,t,n,i){var r=e.constructor;switch(t){case _:return De(e);case a:case s:return new r(+e);case b:return function(e,t){var n=t?De(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,i);case k:case w:case E:case C:case x:case T:case S:case A:case P:return function(e,t){var n=t?De(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,i);case c:return function(e,t,n){var i=t?n(z(e),!0):z(e);return V(i,j,new e.constructor)}(e,i,n);case h:case g:return new r(e);case p:return function(e){var t=new e.constructor(e.source,O.exec(e));return t.lastIndex=e.lastIndex,t}(e);case v:return function(e,t,n){var i=t?n(W(e),!0):W(e);return V(i,B,new e.constructor)}(e,i,n);case y:return o=e,xe?Object(xe.call(o)):{}}var o}(e,L,Me,t)}}m||(m=new Pe);var N=m.get(e);if(N)return N;if(m.set(e,I),!R)var F=n?function(e){return function(e,t,n){var i=t(e);return Ke(e)?i:function(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}(i,n(e))}(e,Ze,Ue)}(e):Ze(e);return function(e,t){for(var n=-1,i=e?e.length:0;++n<i&&!1!==t(e[n],n,e););}(F||e,(function(r,o){F&&(r=e[o=r]),Ie(I,o,Me(r,t,n,i,o,e,m))})),I}function Le(e){return!(!qe(e)||(t=e,J&&J in t))&&(Xe(e)||G(e)?ne:I).test(Ge(e));var t}function De(e){var t=new e.constructor(e.byteLength);return new oe(t).set(new oe(e)),t}function Ne(e,t,n,i){n||(n={});for(var r=-1,o=t.length;++r<o;){var a=t[r],s=i?i(n[a],e[a],a,n,e):void 0;Ie(n,a,void 0===s?e[a]:s)}return n}function Fe(e,t){var n,i,r=e.__data__;return("string"==(i=bc(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof t?"string":"hash"]:Mk(r)}function He(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Le(n)?n:void 0}Te.prototype.clear=function(){this.__data__=me?me(null):{}},Te.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Te.prototype.get=function(e){var t=this.__data__;if(me){var n=t[e];return n===i?void 0:n}return ee.call(t,e)?t[e]:void 0},Te.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:ee.call(t,e)},Te.prototype.set=function(e,t){return this.__data__[e]=me&&void 0===t?i:t,this},Se.prototype.clear=function(){this.__data__=[]},Se.prototype.delete=function(e){var t=this.__data__,n=Re(t,e);return!(n<0)&&(n==t.length-1?t.pop():ue.call(t,n,1),!0)},Se.prototype.get=function(e){var t=this.__data__,n=Re(t,e);return n<0?void 0:t[n][1]},Se.prototype.has=function(e){return Re(this.__data__,e)>-1},Se.prototype.set=function(e,t){var n=this.__data__,i=Re(n,e);return i<0?n.push([e,t]):n[i][1]=t,this},Ae.prototype.clear=function(){this.__data__={hash:new Te,map:new(pe||Se),string:new Te}},Ae.prototype.delete=function(e){return Fe(this,e).delete(e)},Ae.prototype.get=function(e){return Fe(this,e).get(e)},Ae.prototype.has=function(e){return Fe(this,e).has(e)},Ae.prototype.set=function(e,t){return Fe(this,e).set(e,t),this},Pe.prototype.clear=function(){this.__data__=new Se},Pe.prototype.delete=function(e){return this.__data__.delete(e)},Pe.prototype.get=function(e){return this.__data__.get(e)},Pe.prototype.has=function(e){return this.__data__.has(e)},Pe.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Se){var i=n.__data__;if(!pe||i.length<199)return i.push([e,t]),this;n=this.__data__=new Ae(i)}return n.set(e,t),this};var Ue=ce?K(ce,Object):function(){return[]},je=function(e){return te.call(e)};function Be(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||R.test(e))&&e>-1&&e%1==0&&e<t}function Ve(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Z)}function Ge(e){if(null!=e){try{return Q.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function ze(e,t){return e===t||e!=e&&t!=t}(de&&je(new de(new ArrayBuffer(1)))!=b||pe&&je(new pe)!=c||ve&&je(ve.resolve())!=d||ge&&je(new ge)!=v||ye&&je(new ye)!=m)&&(je=function(e){var t=te.call(e),n=t==f?e.constructor:void 0,i=n?Ge(n):void 0;if(i)switch(i){case _e:return b;case be:return c;case ke:return d;case we:return v;case Ee:return m}return t});var Ke=Array.isArray;function We(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!Xe(e)}var Ye=he||function(){return!1};function Xe(e){var t=qe(e)?te.call(e):"";return t==l||t==u}function qe(e){var t=bc(e);return!!e&&("object"==t||"function"==t)}function Ze(e){return We(e)?Oe(e):function(e){if(!Ve(e))return fe(e);var t=[];for(var n in Object(e))ee.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return Me(e,!0,!0)}}(lI,lI.exports);var uI=n(lI.exports),cI=function(e){UA(i,e);var t,n=VA(i);function i(){var e,t;pm(this,i);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Uy(PA(t=n.call.apply(n,Mm(e=[this]).call(e,o))),"_waitingStartTime",0),Uy(PA(t),"_timer",void 0),Uy(PA(t),"_toastId",void 0),t}return gm(i,[{key:"updateLang",value:function(){this.renderItemList()}},{key:"beforeCreate",value:function(e){var t,n=e.player.config.sources.sourceManager;e.config.list=null===(t=n.source)||void 0===t?void 0:t.definitions}},{key:"afterCreate",value:function(){var e,t;WO(jA(i.prototype),"afterCreate",this).call(this),(null!==(e=null===(t=this.player.config.sourceManager.source)||void 0===t?void 0:t.definitions)&&void 0!==e?e:[]).length<2?this.hide():(this.renderItemList(),this.on(gO.WAITING,this._waiting.bind(this)),this.on(gO.PLAYING,this._clearTimer.bind(this)),this.on(gO.PAUSE,this._clearTimer.bind(this)),this.on(gO.PLAY,this._clearTimer.bind(this)),this._initTimeUpdateEvent())}},{key:"registerIcons",value:function(){return{source:{icon:sI}}}},{key:"renderItemList",value:function(){var e,t,n,r=this,o=this.player.config.sourceManager,a=null!==(e=null===(t=o.source)||void 0===t?void 0:t.definitions)&&void 0!==e?e:[],s=Mk(a).call(a,(function(e){var t;return{url:e.url,definition:e.definition||"",showText:null!==(t=r.player.config.i18nManager.normalize(e.text))&&void 0!==t?t:e.definition,selected:!1}})),l=qP(a).call(a,(function(e){var t;return e.definition===(null===(t=o.definition)||void 0===t?void 0:t.definition)}));this.config.list=null===(n=o.source)||void 0===n?void 0:n.definitions,l>-1&&(s[l].selected=!0),WO(jA(i.prototype),"renderItemList",this).call(this,s,l)}},{key:"onItemClick",value:function(e,t){var n,r=this;this._showToast(t.to),WO(jA(i.prototype),"onItemClick",this).call(this,e,t),null===(n=this.player.config)||void 0===n||n.veplayer.switch({definition:t.to.definition}).catch((function(){r.renderItemList()}))}},{key:"fallback",value:(t=Gy(Jg().mark((function e(){var t,n,i,r,o,a,s,l=arguments;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=l.length>0&&void 0!==l[0]?l[0]:{toast:!0},r=this.player.config.sourceManager,!((o=qP(t=this.config.demotePriority).call(t,(function(e){var t;return e===(null===(t=r.definition)||void 0===t?void 0:t.definition)})))<0)){e.next=5;break}return e.abrupt("return");case 5:if(a=uI(r.definition),s=this._getNextDefinition(o)){e.next=9;break}return e.abrupt("return");case 9:if(!i.toast){e.next=15;break}return e.next=12,this._toast(s);case 12:if(e.sent){e.next=15;break}return e.abrupt("return");case 15:this.player.emit(gO.DEFINITION_FALLBACK,{from:a,to:s}),null===(n=this.player.config)||void 0===n||n.veplayer.switch({definition:s.definition}).catch((function(){}));case 17:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"_waiting",value:function(){var e=this;if(!this._timer){this._waitingStartTime=Date.now();var t=this.player.currentTime;this._timer=setTimeout((function(){e.player&&e.player.currentTime<=t+.1&&(e.player.emit(gO.LONG_WAITING),e.config.needFallback&&e.fallback({toast:!0}),e._clearTimer())}),this.config.longWaitingTime)}}},{key:"_clearTimer",value:function(){this._timer&&(clearTimeout(this._timer),this._timer=void 0),this._waitingStartTime&&(this._waitingStartTime=0)}},{key:"_toast",value:function(e){var t=this,n=this.player.config.i18nManager;return new Lk((function(i){var r,o,a=null===(r=t.player)||void 0===r?void 0:r.getPlugin("toast");if(a){var s=hT.createDom("div",n.getText("DEFINITION_FALLBACK_TOAST"),void 0,"veplayer-toast-txt"),l=null!==(o=t.player.config.i18nManager.normalize(e.text))&&void 0!==o?o:e.definition,u=hT.createDom("span",l,void 0,"veplayer-toast-txt-bt");s.appendChild(u);var c=a.toast(s,{duration:5e3,closable:!0});u.addEventListener("click",(function(){a.remove(c),i(!0)}))}else i(!1)}))}},{key:"_getNextDefinition",value:function(e){var t,n=this.player.config.sourceManager;if(null!==(t=n.source)&&void 0!==t&&t.definitions.length&&!(e+1>=this.config.demotePriority.length)){var i=e+1,r=Vm(n).call(n,{definition:this.config.demotePriority[i]});return r||this._getNextDefinition(i)}}},{key:"_initTimeUpdateEvent",value:function(){var e=this,t=this.player.currentTime;this.on(gO.TIME_UPDATE,(function(){var n=e.player.currentTime;n!==t?(t=n,e._clearTimer()):t=n}))}},{key:"_showToast",value:function(e){var t,n,i,r=this,o=null===(t=this.player)||void 0===t?void 0:t.getPlugin("toast"),a=this.player.config.i18nManager;o&&(this._toastId&&o.remove(this._toastId),this._toastId=o.toast(Mm(n="".concat(a.getText("DEFINITION_SWITCHING")," ")).call(n,null!==(i=e.text&&this.player.config.i18nManager.normalize(e.text))&&void 0!==i?i:e.definition," ..."),{duration:2e3,closable:!0}),this.player.once(gO.AFTER_DEFINITION_CHANGE,(function(){void 0!==r._toastId&&o.remove(r._toastId)})))}}],[{key:"pluginName",get:function(){return"definition"}},{key:"defaultConfig",get:function(){return By(By({},oI.defaultConfig),{},{index:3,list:[],panel:{title:{jp:"クラリティセレクション",en:"Definition Choose","zh-cn":"清晰度选择","zh-hk":"清晰度選擇"}},className:"xgplayer-definition",hidePortrait:!1,isShowIcon:!0,longWaitingTime:5e3,needFallback:!1,demotePriority:["uhd","hd","sd","ld","ao"]})}},{key:"textTips",get:function(){return{jp:"明快さ",en:"Definition","zh-cn":"清晰度","zh-hk":"清晰度"}}}]),i}(oI),hI={"biz:vod":"veplayer.biz.vod.[env].[ext]","biz:live":"veplayer.biz.live.[env].[ext]","plugin:flv":"veplayer.plugin.flv.[env].[ext]","plugin:mp4":"veplayer.plugin.mp4.[env].[ext]","plugin:hls":"veplayer.plugin.hls.[env].[ext]","plugin:shaka":"veplayer.plugin.shaka.[env].[ext]","plugin:rtm":"veplayer.plugin.rtm.[env].[ext]","plugin:xgvideo":"veplayer.plugin.xgvideo.[env].[ext]"},fI=function(e){return e.BizVod="biz:vod",e.BizLive="biz:live",e.PluginFlv="plugin:flv",e.PluginMp4="plugin:mp4",e.PluginHls="plugin:hls",e.PluginShaka="plugin:shaka",e.PluginRtm="plugin:rtm",e.PluginXgvideo="plugin:xgvideo",e}(fI||{}),dI=function(){function e(t){var n=this;pm(this,e),Uy(this,"modules",{}),Uy(this,"mountPromiseMap",{}),Uy(this,"_baseUrl",void 0),Uy(this,"_moduleSystem",void 0),Uy(this,"load",function(){var e=Gy(Jg().mark((function e(t,i){var r,o,a,s,l;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n._moduleSystem){e.next=2;break}throw new Error('You have to specify moduleSystem first, call "setModuleSystem(moduleSystem)" to set module system');case 2:if(hI[t]){e.next=4;break}throw new Error('Invalid module name: "'.concat(t,'"'));case 4:if("esm"!==n._moduleSystem){e.next=11;break}if(n.modules[t]){e.next=9;break}throw new Error('Dynamic module "'.concat(t,'" not found, you have to register it first under ESM'));case 9:return o=n.modules[t].exports,e.abrupt("return",null!==(r=o.default)&&void 0!==r?r:o);case 11:if(!n.modules[t]){e.next=21;break}if(1!==n.modules[t].state){e.next=16;break}return e.abrupt("return",n.modules[t].exports);case 16:if(0!==n.modules[t].state){e.next=20;break}return e.abrupt("return",n.mountPromiseMap[t].then((function(e){var t;return null!==(t=e.default)&&void 0!==t?t:e})));case 20:throw null!==(a=n.modules[t].error)&&void 0!==a?a:new Error('Dynamic module "'.concat(t,'" load failed.'));case 21:return s=[n._baseUrl,hI[t]].join("/").replace("[env]","production").replace("[ext]","js"),l={src:null!=i?i:s,name:t,state:0,exports:{}},n.modules[t]=l,n.mountPromiseMap[t]=n._mount(l),e.abrupt("return",n.mountPromiseMap[t]);case 26:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()),Uy(this,"register",(function(e,t){if(!n._moduleSystem)throw new Error("You have to specify moduleSystem first, call setModuleSystem(moduleSystem) to set module system");return"esm"===n._moduleSystem?(n.modules[e]={src:"esm:".concat(e),name:e,state:1,exports:t},n.modules[e].exports):(n.modules[e]?n.modules[e].exports=t:n.modules[e]={src:"umd:".concat(e),name:e,state:1,exports:t},n.modules[e].exports)})),this._baseUrl=t.baseUrl}return gm(e,[{key:"baseUrl",get:function(){return this._baseUrl}},{key:"moduleSystem",get:function(){return this._moduleSystem}},{key:"setModuleSystem",value:function(e){this._moduleSystem=e}},{key:"setBaseUrl",value:function(e){this._baseUrl=e}},{key:"_mount",value:function(e){var t=this.modules;return new Lk((function(n,i){var r=document.createElement("script");r.src=e.src,r.onload=function(){e.state=1,n(t[e.name].exports),r.onload=null},r.onerror=function(t){e.state=2,e.error=t,i(t),r.onerror=null},document.body.appendChild(r)}))}}]),e}(),pI=h,vI=$,gI=Dn,yI=jn,mI=Fc,_I=Math.min,bI=[].lastIndexOf,kI=!!bI&&1/[1].lastIndexOf(1,-0)<0,wI=mI("lastIndexOf"),EI=kI||!wI?function(e){if(kI)return pI(bI,this,arguments)||0;var t=vI(this),n=yI(t),i=n-1;for(arguments.length>1&&(i=_I(i,gI(arguments[1]))),i<0&&(i=n+i);i>=0;i--)if(i in t&&t[i]===e)return i||0;return-1}:bI;Pn({target:"Array",proto:!0,forced:EI!==[].lastIndexOf},{lastIndexOf:EI});var CI,xI,TI=Bc("Array").lastIndexOf,SI=se,AI=TI,PI=Array.prototype,OI=n((function(e){var t=e.lastIndexOf;return e===PI||SI(PI,e)&&t===PI.lastIndexOf?AI:t})),II=null!==(CI=null===(xI=document.currentScript)||void 0===xI?void 0:xI.src)&&void 0!==CI?CI:"https://tosv.byted.org/obj/lux/sdk/@byted/veplayer/".concat("2.0.0-rc.2","/object/umd/"),RI=new dI({baseUrl:ow(II).call(II,0,OI(II).call(II,"/"))}),MI=RI.register;function LI(e,t){return DI.apply(this,arguments)}function DI(){return(DI=Gy(Jg().mark((function e(t,n){var i;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,RI.load(t,n);case 3:return e.abrupt("return",e.sent);case 6:throw e.prev=6,e.t0=e.catch(0),qA(KA.MODULE_LOAD_ERROR,{ext:{name:t,cdn:null===e.t0||void 0===e.t0||null===(i=e.t0.target)||void 0===i?void 0:i.src},error:e.t0});case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))).apply(this,arguments)}function NI(e){return function(t){var n;return null==t?void 0:nw(n=t.split("?")[0].toLowerCase()).call(n,e)}}var FI=NI(".m3u8"),HI=NI(".mp4"),UI=NI(".flv"),jI=NI(".sdp"),BI=NI(".mpd");function VI(){return(VI=Gy(Jg().mark((function e(){var t;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,LI(fI.PluginXgvideo);case 2:return t=e.sent,e.abrupt("return",null==t?void 0:t.isSupported());case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}By(By({},hT),{},{getStreamType:function(e){return FI(e)?"hls":UI(e)?"flv":jI(e)?"rtm":HI(e)?"mp4":BI(e)?"dash":"unknown"},isMseSupported:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:zy.H264)===zy.H265?mT.isHevcSupported():mT.isMSESupport()},isSoftDecodeSupported:function(){return VI.apply(this,arguments)}});var GI=mT.isWeixin,zI=mT.os,KI=mT.device,WI=zI.isAndroid,YI=zI.isIos,XI="mobile"===KI,qI=0,ZI=!1,$I=function(e){UA(n,e);var t=VA(n);function n(e){var i;return pm(this,n),Uy(PA(i=t.call(this,e)),"_hasSetUserAutoplay",void 0),Uy(PA(i),"_timer",void 0),Uy(PA(i),"_wxTimer",void 0),Uy(PA(i),"_state",{mode:0,showUnmuteBt:!1}),Uy(PA(i),"userClickPlay",(function(){if(!ZI){var e=i.player.play();e&&e.then?e.then((function(){console.log("user action autoplay success"),ZI=!0})).catch((function(e){console.warn("user action autoplay fail:",e)})):(console.warn("no play promise"),ZI=!0)}})),i}return gm(n,[{key:"afterCreate",value:function(){this.initState(),this.initEvents(),this.setWXAutoPlay()}},{key:"updateLang",value:function(){this.renderUnmuteBt()}},{key:"initState",value:function(){this._state.mode=this.player.muted?1:0}},{key:"initEvents",value:function(){this.player.on(jT,this.handleAutoplayPrevented.bind(this)),this.player.on(UT,this.handleAutoplayStart.bind(this)),this.player.on(RT,this.handleVolumechange.bind(this)),this.setUserActionAutoPlay()}},{key:"setWXAutoPlay",value:function(){GI&&this.player.config.autoplay&&this.config.enableWxJsBridgeAutoplay&&(window.WeixinJSBridge?this.wxPlay():document.addEventListener("WeixinJSBridgeReady",this.wxPlay.bind(this),!1))}},{key:"wxCanPlayFn",value:function(){var e=this;window.WeixinJSBridge&&window.WeixinJSBridge.invoke("getNetworkType",{},(function(){e._wxTimer=setTimeout((function(){e._wxTimer&&clearTimeout(e._wxTimer);var t=e.player.play();t&&t.then?t.then((function(){console.log("wechat autoplay success")})).catch((function(t){console.warn("wechat autoplay fail:",t),e._state.showUnmuteBt=!1,e.renderUnmuteBt()})):console.warn("wechat browser no play promise")}))}))}},{key:"wxPlay",value:function(){this.player.readyState>=2?this.wxCanPlayFn():WI?this.player.once(OT,this.wxCanPlayFn.bind(this)):YI&&this.player.once(BT,this.wxCanPlayFn.bind(this))}},{key:"setUserActionAutoPlay",value:function(){var e=this;this.config.enableUserActionAutoplay&&this.player.once(vO.AUTOPLAY_FAIL,(function(){e._hasSetUserAutoplay=!0,(e.config.userActionDom instanceof window.Node?e.config.userActionDom:window.document.body).addEventListener("click",e.userClickPlay,!1)}))}},{key:"handleAutoplayPrevented",value:function(){return 0===this._state.mode?(console.warn("unmute autoplay fail"),this.player.emit(vO.AUTOPLAY_FAIL,{mode:"unmute"}),WI&&GI?void(this._state.mode=2):void(this.config.enableDegradeMuteAutoplay&&this.changeMuteMode())):1===this._state.mode?(console.warn("mute autoplay fail"),this.player.emit(vO.AUTOPLAY_FAIL,{mode:"mute"}),void(this._state.mode=2)):2===this._state.mode?(this.player.emit(vO.AUTOPLAY_FAIL,{mode:"noSupport"}),void console.warn("not support autoplay")):void 0}},{key:"changeMuteMode",value:function(){var e=this;this.player.muted=!0,this._state.showUnmuteBt=!0,this._state.mode=1,this.renderUnmuteBt(),this._timer=setTimeout((function(){e._timer&&clearTimeout(e._timer);var t=e.player.play();t&&t.then?t.then((function(){console.log("degrade mute autoplay success")})).catch((function(t){console.warn("degrade mute autoplay fail:",t),e.player.muted=!1,e._state.showUnmuteBt=!1,e.renderUnmuteBt()})):console.warn("no play promise")}))}},{key:"handleAutoplayStart",value:function(){if(0!==this._state.mode)return 1===this._state.mode?(this.player.emit(vO.AUTOPLAY_SUCCESS,{mode:"mute"}),this._state.showUnmuteBt=!0,void this.renderUnmuteBt()):2===this._state.mode?(this.player.emit(vO.AUTOPLAY_SUCCESS,{mode:"click"}),this.player.muted=!1,this._state.showUnmuteBt=!1,void this.renderUnmuteBt()):void 0;this.player.emit(vO.AUTOPLAY_SUCCESS,{mode:"unmute"})}},{key:"handleVolumechange",value:function(){this._state.showUnmuteBt&&(this._state.showUnmuteBt=!1,this.renderUnmuteBt(),this.player.paused&&this.player.readyState>=1&&this.player.play())}},{key:"renderUnmuteBt",value:function(){var e=this.root,t=this.player.config.i18nManager;if(e&&(e.innerHTML="",this._state.showUnmuteBt)){var n=t.getText("UNMUTE"),i=hT.createDom("div",n,void 0,"veplayer-unmute-bt");e.appendChild(i),this.bind(".veplayer-unmute-bt","click",this.cancelUnmute.bind(this)),this.bind(".veplayer-unmute-bt","touchend",this.cancelUnmute.bind(this))}}},{key:"cancelUnmute",value:function(){var e=Date.now();if(e-qI>200){qI=e,this.player.muted=!1,this._state.showUnmuteBt=!1,this.renderUnmuteBt(),this.emit(vO.AUTOPLAY_UNMUTE);var t="mobile"===mT.device,n=jI(this.player.config.url);t&&n&&(this.player.volume>.5?this.player.volume=this.player.volume-.1:this.player.volume=this.player.volume+.1)}}},{key:"destroy",value:function(){if(this.player.off(jT,this.handleAutoplayPrevented.bind(this)),this.player.off(UT,this.handleAutoplayStart.bind(this)),this.player.off(RT,this.handleVolumechange.bind(this)),this._timer&&window.clearTimeout(this._timer),this._wxTimer&&window.clearTimeout(this._wxTimer),document.removeEventListener("WeixinJSBridgeReady",this.wxPlay.bind(this),!1),this._hasSetUserAutoplay){var e=XI?"touch":"click";(this.config.userActionDom instanceof window.Node?this.config.userActionDom:window.document.body).removeEventListener(e,this.userClickPlay,!1)}}},{key:"render",value:function(){return'<div class="veplayer-unmute"></div>'}}],[{key:"pluginName",get:function(){return"autoplayPlugin"}},{key:"defaultConfig",get:function(){return{position:HS.POSITIONS.ROOT,enableDegradeMuteAutoplay:!1,enableWxJsBridgeAutoplay:!1,userActionDom:window.document.body,enableUserActionAutoplay:!1}}}]),n}(HS),JI=SO.values;Pn({target:"Object",stat:!0},{values:function(e){return JI(e)}});var QI=n(te.Object.values);function eR(){return(new DOMParser).parseFromString('<svg width="18" height="18" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M5.75 11C5.75 11.9665 4.9665 12.75 4 12.75C3.0335 12.75 2.25 11.9665 2.25 11C2.25 10.0335 3.0335 9.25 4 9.25C4.9665 9.25 5.75 10.0335 5.75 11ZM13.25 11C13.25 11.9665 12.4665 12.75 11.5 12.75C10.5335 12.75 9.75 11.9665 9.75 11C9.75 10.0335 10.5335 9.25 11.5 9.25C12.4665 9.25 13.25 10.0335 13.25 11ZM19 12.75C19.9665 12.75 20.75 11.9665 20.75 11C20.75 10.0335 19.9665 9.25 19 9.25C18.0335 9.25 17.25 10.0335 17.25 11C17.25 11.9665 18.0335 12.75 19 12.75Z" fill="white"/>\n</svg>\n',"image/svg+xml").firstChild}var tR,nR,iR=function(e){UA(n,e);var t=VA(n);function n(){return pm(this,n),t.apply(this,arguments)}return gm(n,[{key:"onItemClick",value:function(){}},{key:"onOptionClick",value:function(){this.toggle(!1)}},{key:"updateLang",value:function(){var e,t=this,n=this.player.config.i18nManager;null===(e=this.config.plugins)||void 0===e||e.forEach((function(e){var i,r=null!==(i=n.normalize(e.textTips))&&void 0!==i?i:e.pluginName;if(t.player.root){var o=hT.findDom(t.player.root,".panel-plugin-".concat(e.pluginName," .panel-icon-bt-text"));o&&(o.innerHTML=r)}}))}},{key:"beforeCreate",value:function(e){var t,n=e.player.config.i18nManager;e.config.list=null===(t=e.config.plugins)||void 0===t?void 0:Mk(t).call(t,(function(t,i){var r,o=hT.createDom("div","",{},"panel-icon-bt panel-plugin-".concat(t.pluginName)),a=hT.createDom("div","",{},"panel-icon-svg"),s=null!==(r=n.normalize(t.textTips))&&void 0!==r?r:t.pluginName;return o.appendChild(a),o.appendChild(hT.createDom("span",s,{"plugin-index":i},"panel-icon-bt-text")),{showText:o,plugin:e.player.registerPlugin({plugin:t,options:{root:a}})}}))}},{key:"hideChild",value:function(e){if(e){var t;null===(t=e.hide)||void 0===t||t.call(e);var n=document.querySelector(".panel-plugin-".concat(e.pluginName));n&&hT.addClass(n,"hide")}}},{key:"showChild",value:function(e){if(e){var t;null===(t=e.show)||void 0===t||t.call(e);var n=document.querySelector(".panel-plugin-".concat(e.pluginName));n&&hT.removeClass(n,"hide")}}},{key:"registerIcons",value:function(){return{more:{icon:eR}}}}],[{key:"pluginName",get:function(){return"more"}},{key:"defaultConfig",get:function(){return By(By({},oI.defaultConfig),{},{index:1,plugins:[],list:[],hideOnSingleOption:!1,isShowIcon:!0,hidePortrait:!1,renderType:QO.Icon,panel:{className:"more-panel-content"}})}}]),n}(oI),rR=function(e){return e.ROOT_TOP_RIGHT="rootTopRight",e.ROOT_TOP_RIGHT_COLLAPSE="rootTopRightCollapse",e}(rR||{}),oR=function(e){UA(n,e);var t=VA(n);function n(){return pm(this,n),t.apply(this,arguments)}return gm(n,[{key:"registerIcons",value:function(){return{more:{icon:eR,class:"xgplayer-more-svg"}}}},{key:"children",value:function(){var e=this,t=this._getPlugins(),n=t.plugins,i=t.collapsePlugins,r={};return n.forEach((function(t){r[t.pluginName]={plugin:t,options:{root:e.root}}})),i.length&&(r[iR.pluginName]={plugin:iR,options:{root:this.root,plugins:i}}),r}},{key:"render",value:function(){return'<xg-right-grid class="xg-right-grid xgplayer-rightTop-iconList"></xg-right-grid>'}},{key:"_getPlugins",value:function(){var e,t=this,n=[],i=[],r=null===(e=this.player.config.ignores)||void 0===e?void 0:Mk(e).call(e,(function(e){return e.toLowerCase()}));return this.config.plugins.forEach((function(e){var o,a=e.pluginName.toLowerCase();null!=r&&nw(r).call(r,a)||("rootTopRight"===(null!==(o=t.player.config[a].position)&&void 0!==o?o:e.defaultConfig.position)?n.push(e):i.push(e))})),{plugins:null!=n?n:[],collapsePlugins:null!=i?i:[]}}}],[{key:"pluginName",get:function(){return"topRightBar"}},{key:"defaultConfig",get:function(){return{position:HS.POSITIONS.ROOT_TOP,plugins:[]}}},{key:"isTopRightPlugin",value:function(e,t){var n,i,r,o,a,s=null!==(i=null===(r=t[null==e||null===(n=e.pluginName)||void 0===n?void 0:n.toLowerCase()])||void 0===r?void 0:r.position)&&void 0!==i?i:null==e||null===(o=e.defaultConfig)||void 0===o?void 0:o.position;return!!nw(a=QI(rR)).call(a,s)}}]),n}(HS),aR=[$P,nO,aO,gP,dO,$A,nP,jP,iP,XO,qO,aI,cI,$I],sR=Mm(tR=[]).call(tR,aR,[HP,_P,oR]),lR=Mm(nR=[]).call(nR,aR,[NP,oR]),uR="pc"===mT.device?sR:lR;function cR(){return(new DOMParser).parseFromString('<svg width="21" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.892 2h4.445v1.778H3.892v4.444H2.114V3.778C2.114 2.796 2.91 2 3.892 2zm4.445 16v-4.444c0-.982-.796-1.778-1.778-1.778H2.114v1.778h2.944L2.264 16.35a.9.9 0 001.272 1.273l2.988-2.987a.918.918 0 00.035-.037V18h1.778zm8-6.222v4.444h-4.445V18h4.445c.981 0 1.777-.796 1.777-1.778v-4.444h-1.777zM11.892 2v4.445c0 .981.796 1.777 1.778 1.777h4.444V6.445H15.17l2.568-2.568a.9.9 0 10-1.273-1.273L13.67 5.4V2h-1.778z" fill="#fff"/></svg>',"image/svg+xml").firstChild}function hR(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.778 2h4.444v1.778H3.778v4.444H2V3.778C2 2.796 2.796 2 3.778 2zM2 11.778v4.444C2 17.204 2.796 18 3.778 18h4.444v-1.778H4.823l2.313-2.313a.9.9 0 00-1.272-1.273l-2.086 2.086v-2.944H2zm14.222 0v4.444h-4.444V18h4.444c.982 0 1.778-.796 1.778-1.778v-4.444h-1.778zM18 8.222V3.778C18 2.796 17.204 2 16.222 2h-4.444v1.778h2.945l-2.587 2.586a.9.9 0 101.273 1.273l2.813-2.813v3.398H18z" fill="#fff"/></svg>',"image/svg+xml").firstChild}var fR,dR={startPlay:function(){return(new DOMParser).parseFromString('<svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="60" height="60" rx="30" fill="#000" fill-opacity=".4"/><path d="M40.243 28.3a2 2 0 010 3.401L24.06 41.712c-1.332.825-3.052-.134-3.052-1.7V19.988c0-1.566 1.72-2.525 3.052-1.7l16.184 10.01z" fill="#fff"/></svg>',"image/svg+xml").firstChild},play:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.121 8.299a2 2 0 010 3.402l-7.94 4.91c-1.332.825-3.051-.133-3.051-1.7V5.09c0-1.567 1.72-2.525 3.052-1.701l7.939 4.911z" fill="#fff"/></svg>',"image/svg+xml").firstChild},pause:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="5.313" y="3.75" width="3.125" height="12.5" rx=".625" fill="#fff"/><rect x="11.563" y="3.75" width="3.125" height="12.5" rx=".625" fill="#fff"/></svg>',"image/svg+xml").firstChild},fullscreen:hR,exitFullscreen:cR,replay:function(){return(new DOMParser).parseFromString('<svg width="72" height="72" viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg"><g fill="#FFF" fill-rule="evenodd"><circle fill-opacity=".3" cx="36" cy="36" r="36"/><path d="M40.167 32.667a.833.833 0 01-.834-.834v-1.666c0-.46.373-.834.834-.834h5.409a11.653 11.653 0 00-9.576-5c-6.443 0-11.667 5.224-11.667 11.667S29.557 47.667 36 47.667c5.285 0 9.749-3.514 11.183-8.333h3.445C49.112 46.014 43.138 51 36 51c-8.284 0-15-6.716-15-15 0-8.284 6.716-15 15-15 4.713 0 8.918 2.173 11.668 5.572l-.001-4.739c0-.46.373-.833.833-.833h1.667c.46 0 .833.373.833.833V31c0 .879-.68 1.598-1.542 1.662l-.125.005h-9.166z"/></g></svg>',"image/svg+xml").firstChild},volumeLarge:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.867 2.5h.55c.44 0 .799.34.83.771l.003.062v13.334c0 .44-.34.799-.771.83l-.062.003h-.55a.833.833 0 01-.444-.128l-.064-.045-4.867-3.744a.831.831 0 01-.322-.59l-.003-.07V7.077c0-.235.099-.458.271-.615l.054-.045L9.36 2.673a.832.832 0 01.43-.17l.078-.003h.55-.55zm6.767 2.278A7.474 7.474 0 0118.75 10a7.477 7.477 0 01-2.128 5.234.4.4 0 01-.57-.004l-.587-.586a.442.442 0 01.005-.617A5.812 5.812 0 0017.083 10c0-1.557-.61-2.97-1.603-4.017a.442.442 0 01-.003-.615l.586-.586a.4.4 0 01.57-.004zM2.5 6.667c.23 0 .417.186.417.416v5.834c0 .23-.187.416-.417.416h-.833a.417.417 0 01-.417-.416V7.083c0-.23.187-.416.417-.416H2.5zm11.768.46A4.153 4.153 0 0115.417 10c0 1.12-.442 2.137-1.162 2.886a.388.388 0 01-.555-.007l-.577-.578c-.176-.176-.156-.467.009-.655A2.49 2.49 0 0013.75 10a2.49 2.49 0 00-.61-1.636c-.163-.188-.182-.477-.006-.653l.578-.578a.388.388 0 01.556-.006z" fill="#fff"/></svg>',"image/svg+xml").firstChild},volumeMuted:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.045 2.5h.55c.44 0 .8.34.831.771l.003.062v13.334c0 .44-.34.799-.771.83l-.063.003h-.55a.833.833 0 01-.443-.128l-.065-.045-4.866-3.744a.831.831 0 01-.323-.59l-.003-.07V7.077c0-.235.1-.458.272-.615l.054-.045 4.866-3.744a.832.832 0 01.43-.17l.078-.003h.55-.55zM2.68 6.667c.23 0 .416.186.416.416v5.834c0 .23-.186.416-.416.416h-.834a.417.417 0 01-.416-.416V7.083c0-.23.186-.416.416-.416h.834zm10.467.294a.417.417 0 01.59 0l1.767 1.768L17.27 6.96a.417.417 0 01.589 0l.59.59a.417.417 0 010 .589L16.68 9.908l1.768 1.767c.15.15.162.387.035.55l-.035.04-.589.589a.417.417 0 01-.59 0l-1.767-1.768-1.768 1.768a.417.417 0 01-.59 0l-.588-.59a.417.417 0 010-.589l1.767-1.768-1.767-1.767a.417.417 0 01-.035-.55l.035-.04.589-.589z" fill="#fff"/></svg>',"image/svg+xml").firstChild},volumeSmall:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.867 2.5h.55c.44 0 .799.34.83.771l.003.062v13.334c0 .44-.34.799-.771.83l-.062.003h-.55a.833.833 0 01-.444-.128l-.064-.045-4.867-3.744a.831.831 0 01-.322-.59l-.003-.07V7.077c0-.235.099-.458.271-.615l.054-.045L9.36 2.673a.832.832 0 01.43-.17l.078-.003h.55-.55zM2.5 6.667c.23 0 .417.186.417.416v5.834c0 .23-.187.416-.417.416h-.833a.417.417 0 01-.417-.416V7.083c0-.23.187-.416.417-.416H2.5zm11.768.46A4.153 4.153 0 0115.417 10c0 1.12-.442 2.137-1.162 2.886a.388.388 0 01-.555-.007l-.577-.578c-.176-.176-.156-.467.009-.655A2.49 2.49 0 0013.75 10a2.49 2.49 0 00-.61-1.636c-.163-.188-.182-.477-.006-.653l.578-.578a.388.388 0 01.556-.006z" fill="#fff"/></svg>',"image/svg+xml").firstChild}},pR=By(By({},dR),{},{fullscreen:hR,exitFullscreen:cR}),vR=By(By({},dR),{},{fullscreen:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.125 3a.375.375 0 00-.375.375v.75c0 .207.168.375.375.375H15.5v3.375c0 .207.168.375.375.375h.75A.375.375 0 0017 7.875v-4.5A.375.375 0 0016.625 3h-4.5zm0 12.5a.375.375 0 00-.375.375v.75c0 .207.168.375.375.375h4.5a.375.375 0 00.375-.375v-4.5a.375.375 0 00-.375-.375h-.75a.375.375 0 00-.375.375V15.5h-3.375zM3 3.375C3 3.168 3.168 3 3.375 3h4.5c.207 0 .375.168.375.375v.75a.375.375 0 01-.375.375H4.5v3.375a.375.375 0 01-.375.375h-.75A.375.375 0 013 7.875v-4.5zM7.875 15.5H4.5v-3.375a.375.375 0 00-.375-.375h-.75a.375.375 0 00-.375.375v4.5c0 .207.168.375.375.375h4.5a.375.375 0 00.375-.375v-.75a.375.375 0 00-.375-.375z" fill="#fff"/></svg>',"image/svg+xml").firstChild},exitFullscreen:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M17.5 8.333h-4.167c-.92 0-1.666-.746-1.666-1.666V2.5h1.666v4.167H17.5v1.666zM2.5 6.667v1.666h4.167c.92 0 1.666-.746 1.666-1.666V2.5H6.667v4.167H2.5zM2.5 13.333h4.167V17.5h1.666v-4.167c0-.92-.746-1.666-1.666-1.666H2.5v1.666zM13.333 17.5v-4.167H17.5v-1.666h-4.167c-.92 0-1.666.746-1.666 1.666V17.5h1.666z" fill="#fff"/></svg>',"image/svg+xml").firstChild}}),gR="pc"===mT.device?pR:vR,yR=function(){function e(t){var n;if(pm(this,e),Uy(this,"_lang",void 0),this._lang=(null==t?void 0:t.lang)||pT()||"en","zh"===this._lang&&(this._lang="zh-cn"),null!=t&&null!==(n=t.i18n)&&void 0!==n&&n.texts){var i,r,o=Mk(i=PO(null==t||null===(r=t.i18n)||void 0===r?void 0:r.texts)).call(i,(function(e){var t=_O(e,2);return{LANG:t[0],TEXT:t[1]}}));e.extend(o)}}return gm(e,[{key:"setLang",value:function(e){this._lang=e}},{key:"getLang",value:function(){return this._lang}},{key:"normalize",value:function(e){return e?"string"==typeof e?e:e[this._lang]:""}},{key:"getText",value:function(e){var t,n,i;if(e){var r=null==gA?void 0:gA.lang;return null!==(t=null==r||null===(n=r[this._lang])||void 0===n?void 0:n[e])&&void 0!==t?t:null==r||null===(i=r.en)||void 0===i?void 0:i[e]}}}],[{key:"langKeys",get:function(){return gA.langKeys}},{key:"isLangValid",value:function(e){var t;return nw(t=gA.langKeys).call(t,e)||"zh"===e}},{key:"extend",value:function(e,t){gA.extend(e,t)}}]),e}(),mR=["autoplay"],_R=By(By({},HS.POSITIONS),rR),bR={id:"veplayer",width:"100%",height:"100%",decodeType:Ky.Hardware,fullscreen:{useCssFullscreen:!1}},kR=function(e){var t,n,i,r=e.autoplay,o=Am(e,mR);(o.poster&&(o.poster=function(e){var t,n=""+e,i=mO.exec(n);if(!i)return n;var r,o="",a=0;for(r=i.index;r<n.length;r++){switch(n.charCodeAt(r)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}a!==r&&(o+=n.substring(a,r)),a=r+1,o+=t}return a!==r?o+n.substring(a,r):o}(o.poster)),o.icons=By(By({},gR),o.icons?(t=o.icons,n={},PO(null!=t?t:{}).forEach((function(e){var t=_O(e,2),i=t[0],r=t[1];"string"==typeof r?console.warn("icons.".concat(i," has been removed")):n[i]=r})),n):{}),o.autoplay=Boolean(r),r&&"boolean"!=typeof r)&&(o.autoplayMuted=null==r?void 0:r.muted,o.videoAttributes=By(By({},null!==(i=o.videoAttributes)&&void 0!==i?i:{}),{},{muted:null==r?void 0:r.muted}),o.autoplayPlugin=r);return delete o.i18n,o},wR=function(){function e(){var t,n,i,r,o,a,s,l,u,c,h,f,d=this,p=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};pm(this,e),Uy(this,"_player",void 0),Uy(this,"_sourceManager",void 0),Uy(this,"_preparePlugins",void 0),Uy(this,"_previousPrepareResult",void 0),Uy(this,"_i18nManager",void 0),Uy(this,"_events",{}),Uy(this,"_errorCallback",void 0),this._sourceManager=p.sourceManager,this._preparePlugins=p.preparePlugins,this._previousPrepareResult=p.prepareResult,this._i18nManager=null!==(t=p.i18nManager)&&void 0!==t?t:new yR({i18n:p.i18n});var v=kR(By(By({},p),null===(n=this._previousPrepareResult)||void 0===n?void 0:n.options)),g=Mm(i=[]).call(i,dm(null!==(r=null===(o=this._previousPrepareResult)||void 0===o?void 0:o.plugins)&&void 0!==r?r:[]),dm(null!==(a=p.plugins)&&void 0!==a?a:uR)),y=[],m=[];g.forEach((function(e){oR.isTopRightPlugin(e,p)?y.push(e):m.push(e)})),this._player=new AA(By(By(By({},bR),v),{},{definition:By({list:null!==(s=null===(l=this._sourceManager.source)||void 0===l?void 0:l.definitions)&&void 0!==s?s:[],defaultDefinition:null===(u=this._sourceManager.definition)||void 0===u?void 0:u.definition},null!==(c=p.definition)&&void 0!==c?c:{}),url:null===(h=this._sourceManager.definition)||void 0===h?void 0:h.url,sources:By(By({},null!==(f=p.sources)&&void 0!==f?f:{}),{},{sourceManager:this._sourceManager}),topRightBar:{plugins:y},plugins:m,i18nManager:this._i18nManager,veplayer:this})),this.emit(gO.PLAYER_CREATE_FINISH,this._player),this._sourceManager.registerPrepare((function(e){return d.prepare(e)})),this._errorCallback=function(e){return d._handleFallback(e)},this._player.on(TT,this._errorCallback)}var t,n,i,r,o,a;return gm(e,[{key:"readyState",get:function(){return this._player.readyState}},{key:"buffered",get:function(){return this._player.buffered}},{key:"played",get:function(){return this._player.played}},{key:"cumulateTime",get:function(){return this._player.cumulateTime}},{key:"isFocused",get:function(){return this._player.isActive}},{key:"isFullscreen",get:function(){return this._player.isFullscreen}},{key:"isCssFullscreen",get:function(){return this._player.isCssfullScreen}},{key:"networkState",get:function(){return this._player.networkState}},{key:"paused",get:function(){return this._player.paused}},{key:"ended",get:function(){return this._player.ended}},{key:"state",get:function(){return this._player.state}},{key:"url",get:function(){return this._player.config.url}},{key:"source",get:function(){var e;return null===(e=this._sourceManager.source)||void 0===e?void 0:e.name}},{key:"definition",get:function(){var e;return null===(e=this._sourceManager.definition)||void 0===e?void 0:e.definition}},{key:"crossOrigin",get:function(){return this._player.crossOrigin},set:function(e){this._player.crossOrigin=e}},{key:"volume",get:function(){return this._player.volume},set:function(e){this._player.volume=e}},{key:"muted",get:function(){return this._player.muted},set:function(e){this._player.muted=e}},{key:"lang",get:function(){return this._i18nManager.getLang()},set:function(e){if(this._player.lang!==e)if(yR.isLangValid(e))this._i18nManager.setLang(e),this._player.lang=e;else{var t,n,i,r,o=yR.langKeys().join(","),a={en:Mm(t="Sorry, we couldn't set the language to ".concat(e," because it's not currently supported. The list of supported languages includes ")).call(t,o,"."),"zh-cn":Mm(n="不支持当前设置的语言".concat(e,", 支持的语言有")).call(n,o,", 请重新设置")};console.error((null===(i=this._i18nManager)||void 0===i||null===(r=i.normalize)||void 0===r?void 0:r.call(i,a))||a.en)}}},{key:"_src",get:function(){return this._player.currentSrc}},{key:"switch",value:(a=Gy(Jg().mark((function e(t,n){var i,r,o,a;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"!=typeof t||1!==this._sourceManager.sources.length||1!==(null===(i=this._sourceManager.sources)||void 0===i||null===(i=i[0].definitions)||void 0===i?void 0:i.length)){e.next=5;break}return this._sourceManager.updateSources(t),e.next=4,this._switchUrl(t);case 4:return e.abrupt("return",this._sourceManager.definition);case 5:if(o=Vm(r=this._sourceManager).call(r,t,n)){e.next=8;break}throw new Error("string"==typeof t?"No definition found for url: ".concat(t):Mm(a="No definition found for source: ".concat(t.source,", definition: ")).call(a,t.definition));case 8:return e.next=10,this._switch(o);case 10:return e.abrupt("return",o);case 11:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updatePlaylist",value:function(e,t){var n=this._sourceManager.updateSources(e,t);return this._switch(n.definition)}},{key:"once",value:function(e,t){var n,i=this._transformEvent(e,t),r=i.xgCallback,o=i.xgEventName;r&&(null!==(n=this._events)&&void 0!==n&&n[e]||(this._events[e]=new Sk),this._events[e].set(t,r),this._player.once(o,r))}},{key:"off",value:function(e,t){var n,i=null===(n=this._events[e])||void 0===n?void 0:n.get(t),r=this._transformEvent(e).xgEventName;i&&(this._player.off(r,i),this._events[e].delete(t))}},{key:"emit",value:function(e,t){var n=this._transformEvent(e).xgEventName;this._player.emit(n,t)}},{key:"offAll",value:function(){this._events={},this._player.offAll()}},{key:"on",value:function(e,t){var n,i=this._transformEvent(e,t),r=i.xgCallback,o=i.xgEventName;r&&(null!==(n=this._events)&&void 0!==n&&n[e]||(this._events[e]=new Sk),this._events[e].set(t,r),this._player.on(o,r))}},{key:"play",value:function(){return this._player.play()}},{key:"pause",value:function(){return this._player.pause()}},{key:"requestPIP",value:function(){var e;null===(e=this._player.plugins.pip)||void 0===e||e.requestPIP()}},{key:"exitPIP",value:function(){var e;null===(e=this._player.plugins.pip)||void 0===e||e.exitPIP()}},{key:"retry",value:function(){return this._player.retry()}},{key:"focus",value:function(e){return this._player.focus(e)}},{key:"blur",value:function(e){return this._player.blur(e)}},{key:"getFullscreen",value:function(e){return this._player.getFullscreen(e)}},{key:"exitFullscreen",value:function(e){return this._player.exitFullscreen(e)}},{key:"getCssFullscreen",value:function(e){return this._player.getCssFullscreen(e)}},{key:"exitCssFullscreen",value:function(){return this._player.exitCssFullscreen()}},{key:"registerPlugin",value:function(e,t){return this._player.registerPlugin(e,t)}},{key:"unRegisterPlugin",value:function(e){return this._player.unRegisterPlugin(e)}},{key:"showIcon",value:function(e){var t=this,n=this._player.getPlugin("more");e.forEach((function(e){var i=t._player.getPlugin(e);i&&null!=i&&i.root&&(i.config.position===_R.ROOT_TOP_RIGHT_COLLAPSE?null==n||n.showChild(i):i.show())}))}},{key:"hideIcon",value:function(e){var t=this,n=this._player.getPlugin("more");e.forEach((function(e){var i=t._player.getPlugin(e);i&&null!=i&&i.root&&(i.config.position===_R.ROOT_TOP_RIGHT_COLLAPSE?null==n||n.hideChild(i):i.hide())}))}},{key:"destroy",value:function(){this._player.off(TT,this._errorCallback),this._player.destroy()}},{key:"prepare",value:(o=Gy(Jg().mark((function e(t){var n,i,r,o,a,s,l,u,c=this;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===(n=this._preparePlugins)||void 0===n?void 0:n.call(this,t);case 2:return a=e.sent,s=this._diffPlugins(null!==(i=null===(r=this._previousPrepareResult)||void 0===r?void 0:r.plugins)&&void 0!==i?i:[],null!==(o=null==a?void 0:a.plugins)&&void 0!==o?o:[]),l=s.removedPlugins,u=s.addedPlugins,null==l||l.forEach((function(e){c._player.unRegisterPlugin(e)})),this._previousPrepareResult=a,null!=a&&a.options&&this._player.setConfig(a.options),e.abrupt("return",Mk(u).call(u,(function(e){return c._player.registerPlugin(e)})));case 8:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"_handleFallback",value:(r=Gy(Jg().mark((function e(t){var n,i,r=this;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._player.addClass(GS),n=this._sourceManager.url,i=this._sourceManager.fallback()){e.next=7;break}return this._player.removeClass(GS),this.emit(gO.FALLBACK_ERROR,ZA(t,this._i18nManager)),e.abrupt("return");case 7:this._player.once("canplay",(function(){r._sourceManager.resetFallback()})),this.emit(gO.FALLBACK,{from:{url:n},to:{url:i}}),this._switchUrl(i);case 10:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"_transformEvent",value:function(e,t){var n=this;return e===TT?{xgCallback:t?function(e){t(ZA(e,n._i18nManager))}:void 0,xgEventName:e}:function(e,t){var n=yO[e];if(n)return{xgEventName:n.event,xgCallback:t?n.shouldCallback?function(){for(var e,i,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];null!==(e=n.shouldCallback)&&void 0!==e&&e.call.apply(e,Mm(i=[n]).call(i,o))&&(null==t||t.apply(void 0,o))}:t:void 0};return{xgEventName:e,xgCallback:t}}(e,t)}},{key:"_switch",value:(i=Gy(Jg().mark((function e(t){var n,i,r,o,a,s;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=uI(this._sourceManager.definition),e.next=3,this.prepare(t.url);case 3:if(s=e.sent,this._sourceManager.switch(t),null===(n=this._player)||void 0===n||null===(n=n.plugins)||void 0===n||n.sources.renderItemList(),null===(i=this._player)||void 0===i||null===(i=i.plugins)||void 0===i||i.definition.renderItemList(),(null==t||null===(r=t.source)||void 0===r?void 0:r.name)!==(null==a||null===(o=a.source)||void 0===o?void 0:o.name)&&this.emit(gO.SOURCE_CHANGE),null==s||!s.length){e.next=15;break}return this.emit(gO.DEFINITION_CHANGE),e.next=12,this._callBeforePlayerInitForUrl(s,t.url);case 12:this.emit(gO.AFTER_DEFINITION_CHANGE),e.next=16;break;case 15:this._player.changeDefinition(t,a);case 16:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"_switchUrl",value:(n=Gy(Jg().mark((function e(t){var n,i,r,o=this;return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.prepare(t);case 2:if(null==(n=e.sent)||!n.length){e.next=7;break}this._callBeforePlayerInitForUrl(n,t),e.next=14;break;case 7:if(i=this._player.switchURL(t,!1),r=this._player.currentTime,!i||!i.then){e.next=13;break}return e.abrupt("return",i);case 13:return e.abrupt("return",new Lk((function(e){var t=o._player.paused&&!o._player.isError,n=function(){o._player.currentTime=r,t&&o._player.once(OT,(function(){o._player.pause()})),e()};mT.os.isAndroid?o.once(AT,(function(){n()})):o.once(OT,(function(){n()})),o._player.play()})));case 14:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"_diffPlugins",value:function(e,t){var n=Mk(e).call(e,(function(e){return e.pluginName})),i=Mk(t).call(t,(function(e){return e.pluginName}));return{removedPlugins:Dk(n).call(n,(function(e){return!nw(i).call(i,e)})),addedPlugins:Dk(t).call(t,(function(e){return!nw(n).call(n,e.pluginName)}))}}},{key:"_callBeforePlayerInitForUrl",value:function(e,t){var n=this;return new Lk((function(i){n._player.config.url=t,null==e||e.forEach((function(e){e.beforePlayerInit()})),n._player.on(gO.CANPLAY,(function(){i(void 0)}))}))}}],[{key:"create",value:(t=Gy(Jg().mark((function t(){var n,i,r,o,a,s,l=arguments;return Jg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=l.length>0&&void 0!==l[0]?l[0]:{},o=l.length>1?l[1]:void 0,a=new KO({sources:zO.normalize({url:r.url,fallbackUrls:r.fallbackUrls,sources:r.playlist}),url:r.url,defaultSource:r.defaultSource,defaultDefinition:r.defaultDefinition,maxFallbackRound:r.maxFallbackRound}),r.url=a.url,t.next=6,null==r||null===(n=r.preparePlugins)||void 0===n?void 0:n.call(r,null!==(i=r.url)&&void 0!==i?i:"");case 6:return s=t.sent,t.abrupt("return",new(null!=o?o:e)(By(By({},r),{},{prepareResult:s,sourceManager:a})));case 8:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)})}]),e}();function ER(e){return CR.apply(this,arguments)}function CR(){return(CR=Gy(Jg().mark((function e(t){return Jg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,wR.create(By({url:"//sf1-cdn-tos.huoshanstatic.com/obj/media-fe/xgplayer_doc_video/mp4/xgplayer-demo-360p.mp4"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}fR="umd",RI.setModuleSystem(fR),void 0!==VePlayer.register?VePlayer.register(fI.BizVod,{createVodPlayer:ER}):MI(fI.BizVod,{createVodPlayer:ER}),e.createVodPlayer=ER,e.load=LI,e.register=MI}));
|