@volcengine/veplayer-plugin 2.11.0-rc.0 → 2.11.1-rc.0

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.
Files changed (33) hide show
  1. package/esm/ad.d.ts +3 -0
  2. package/esm/hlsjs.d.ts +3 -0
  3. package/esm/index.development.js +531 -244
  4. package/esm/index.production.js +1 -1
  5. package/esm/time-shift.d.ts +3 -0
  6. package/esm/veplayer.plugin.abr.development.js +1 -1
  7. package/esm/veplayer.plugin.abr.production.js +1 -1
  8. package/esm/veplayer.plugin.drm.development.js +1 -1
  9. package/esm/veplayer.plugin.drm.production.js +1 -1
  10. package/esm/veplayer.plugin.flv.development.js +1 -1
  11. package/esm/veplayer.plugin.flv.production.js +1 -1
  12. package/esm/veplayer.plugin.hls.development.js +1 -1
  13. package/esm/veplayer.plugin.hls.production.js +1 -1
  14. package/esm/veplayer.plugin.hlsjs.development.js +496 -218
  15. package/esm/veplayer.plugin.hlsjs.production.js +1 -1
  16. package/esm/veplayer.plugin.rtm.development.js +37 -28
  17. package/esm/veplayer.plugin.rtm.production.js +1 -1
  18. package/esm/veplayer.plugin.time.shift.development.js +13 -16
  19. package/esm/veplayer.plugin.time.shift.production.js +1 -1
  20. package/esm/veplayer.plugin.xgvideo.development.js +1 -1
  21. package/esm/veplayer.plugin.xgvideo.production.js +1 -1
  22. package/esm/veplayer.strategy.base.development.js +1 -1
  23. package/esm/veplayer.strategy.base.production.js +1 -1
  24. package/esm/veplayer.strategy.rtm.adaptive.buffer.development.js +1 -1
  25. package/esm/veplayer.strategy.rtm.adaptive.buffer.production.js +1 -1
  26. package/package.json +106 -2
  27. package/umd/ad.d.ts +3 -0
  28. package/umd/hlsjs.d.ts +3 -0
  29. package/umd/time-shift.d.ts +3 -0
  30. package/umd/veplayer.plugin.hlsjs.development.js +495 -217
  31. package/umd/veplayer.plugin.hlsjs.production.js +1 -1
  32. package/umd/veplayer.plugin.rtm.development.js +36 -27
  33. package/umd/veplayer.plugin.rtm.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_PLUGIN_RTM__={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n=function(e){return e&&e.Math==Math&&e},i=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("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,d="object"==typeof Reflect&&Reflect.apply||(s?c.bind(u):function(){return c.apply(u,arguments)}),f=a,h=Function.prototype,p=h.call,v=f&&h.bind.bind(p,p),m=f?v:function(e){return function(){return p.apply(e,arguments)}},y=m,g=y({}.toString),_=y("".slice),b=function(e){return _(g(e),8,-1)},w=b,S=m,k=function(e){if("Function"===w(e))return S(e)},R="object"==typeof document&&document.all,T={all:R,IS_HTMLDDA:void 0===R&&void 0!==R},E=T.all,x=T.IS_HTMLDDA?function(e){return"function"==typeof e||e===E}:function(e){return"function"==typeof e},L={},C=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),O=a,I=Function.prototype.call,P=O?I.bind(I):function(){return I.apply(I,arguments)},D={},A={}.propertyIsEnumerable,F=Object.getOwnPropertyDescriptor,Z=F&&!A.call({1:2},1);D.f=Z?function(e){var t=F(this,e);return!!t&&t.enumerable}:A;var j,V,W=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},M=o,N=b,G=Object,H=m("".split),U=M((function(){return!G("z").propertyIsEnumerable(0)}))?function(e){return"String"==N(e)?H(e,""):G(e)}:G,X=function(e){return null==e},B=X,K=TypeError,Y=function(e){if(B(e))throw K("Can't call method on "+e);return e},J=U,z=Y,Q=function(e){return J(z(e))},q=x,$=T.all,ee=T.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:q(e)||e===$}:function(e){return"object"==typeof e?null!==e:q(e)},te={},re=te,ne=i,ie=x,oe=function(e){return ie(e)?e:void 0},ae=function(e,t){return arguments.length<2?oe(re[e])||oe(ne[e]):re[e]&&re[e][t]||ne[e]&&ne[e][t]},se=m({}.isPrototypeOf),le="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ue=i,ce=le,de=ue.process,fe=ue.Deno,he=de&&de.versions||fe&&fe.version,pe=he&&he.v8;pe&&(V=(j=pe.split("."))[0]>0&&j[0]<4?1:+(j[0]+j[1])),!V&&ce&&(!(j=ce.match(/Edge\/(\d+)/))||j[1]>=74)&&(j=ce.match(/Chrome\/(\d+)/))&&(V=+j[1]);var ve=V,me=ve,ye=o,ge=i.String,_e=!!Object.getOwnPropertySymbols&&!ye((function(){var e=Symbol();return!ge(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&me&&me<41})),be=_e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,we=ae,Se=x,ke=se,Re=Object,Te=be?function(e){return"symbol"==typeof e}:function(e){var t=we("Symbol");return Se(t)&&ke(t.prototype,Re(e))},Ee=String,xe=function(e){try{return Ee(e)}catch(t){return"Object"}},Le=x,Ce=xe,Oe=TypeError,Ie=function(e){if(Le(e))return e;throw Oe(Ce(e)+" is not a function")},Pe=Ie,De=X,Ae=function(e,t){var r=e[t];return De(r)?void 0:Pe(r)},Fe=P,Ze=x,je=ee,Ve=TypeError,We={exports:{}},Me=i,Ne=Object.defineProperty,Ge=function(e,t){try{Ne(Me,e,{value:t,configurable:!0,writable:!0})}catch(r){Me[e]=t}return t},He="__core-js_shared__",Ue=i[He]||Ge(He,{}),Xe=Ue;(We.exports=function(e,t){return Xe[e]||(Xe[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 Be=We.exports,Ke=Y,Ye=Object,Je=function(e){return Ye(Ke(e))},ze=Je,Qe=m({}.hasOwnProperty),qe=Object.hasOwn||function(e,t){return Qe(ze(e),t)},$e=m,et=0,tt=Math.random(),rt=$e(1..toString),nt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+rt(++et+tt,36)},it=Be,ot=qe,at=nt,st=_e,lt=be,ut=i.Symbol,ct=it("wks"),dt=lt?ut.for||ut:ut&&ut.withoutSetter||at,ft=function(e){return ot(ct,e)||(ct[e]=st&&ot(ut,e)?ut[e]:dt("Symbol."+e)),ct[e]},ht=P,pt=ee,vt=Te,mt=Ae,yt=function(e,t){var r,n;if("string"===t&&Ze(r=e.toString)&&!je(n=Fe(r,e)))return n;if(Ze(r=e.valueOf)&&!je(n=Fe(r,e)))return n;if("string"!==t&&Ze(r=e.toString)&&!je(n=Fe(r,e)))return n;throw Ve("Can't convert object to primitive value")},gt=TypeError,_t=ft("toPrimitive"),bt=function(e,t){if(!pt(e)||vt(e))return e;var r,n=mt(e,_t);if(n){if(void 0===t&&(t="default"),r=ht(n,e,t),!pt(r)||vt(r))return r;throw gt("Can't convert object to primitive value")}return void 0===t&&(t="number"),yt(e,t)},wt=Te,St=function(e){var t=bt(e,"string");return wt(t)?t:t+""},kt=ee,Rt=i.document,Tt=kt(Rt)&&kt(Rt.createElement),Et=function(e){return Tt?Rt.createElement(e):{}},xt=Et,Lt=!C&&!o((function(){return 7!=Object.defineProperty(xt("div"),"a",{get:function(){return 7}}).a})),Ct=C,Ot=P,It=D,Pt=W,Dt=Q,At=St,Ft=qe,Zt=Lt,jt=Object.getOwnPropertyDescriptor;L.f=Ct?jt:function(e,t){if(e=Dt(e),t=At(t),Zt)try{return jt(e,t)}catch(r){}if(Ft(e,t))return Pt(!Ot(It.f,e,t),e[t])};var Vt=o,Wt=x,Mt=/#|\.prototype\./,Nt=function(e,t){var r=Ht[Gt(e)];return r==Xt||r!=Ut&&(Wt(t)?Vt(t):!!t)},Gt=Nt.normalize=function(e){return String(e).replace(Mt,".").toLowerCase()},Ht=Nt.data={},Ut=Nt.NATIVE="N",Xt=Nt.POLYFILL="P",Bt=Nt,Kt=Ie,Yt=a,Jt=k(k.bind),zt=function(e,t){return Kt(e),void 0===t?e:Yt?Jt(e,t):function(){return e.apply(t,arguments)}},Qt={},qt=C&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),$t=ee,er=String,tr=TypeError,rr=function(e){if($t(e))return e;throw tr(er(e)+" is not an object")},nr=C,ir=Lt,or=qt,ar=rr,sr=St,lr=TypeError,ur=Object.defineProperty,cr=Object.getOwnPropertyDescriptor,dr="enumerable",fr="configurable",hr="writable";Qt.f=nr?or?function(e,t,r){if(ar(e),t=sr(t),ar(r),"function"==typeof e&&"prototype"===t&&"value"in r&&hr in r&&!r[hr]){var n=cr(e,t);n&&n[hr]&&(e[t]=r.value,r={configurable:fr in r?r[fr]:n[fr],enumerable:dr in r?r[dr]:n[dr],writable:!1})}return ur(e,t,r)}:ur:function(e,t,r){if(ar(e),t=sr(t),ar(r),ir)try{return ur(e,t,r)}catch(n){}if("get"in r||"set"in r)throw lr("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var pr=Qt,vr=W,mr=C?function(e,t,r){return pr.f(e,t,vr(1,r))}:function(e,t,r){return e[t]=r,e},yr=i,gr=d,_r=k,br=x,wr=L.f,Sr=Bt,kr=te,Rr=zt,Tr=mr,Er=qe,xr=function(e){var t=function(r,n,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,n)}return new e(r,n,i)}return gr(e,this,arguments)};return t.prototype=e.prototype,t},Lr=function(e,t){var r,n,i,o,a,s,l,u,c,d=e.target,f=e.global,h=e.stat,p=e.proto,v=f?yr:h?yr[d]:(yr[d]||{}).prototype,m=f?kr:kr[d]||Tr(kr,d,{})[d],y=m.prototype;for(o in t)n=!(r=Sr(f?o:d+(h?".":"#")+o,e.forced))&&v&&Er(v,o),s=m[o],n&&(l=e.dontCallGetSet?(c=wr(v,o))&&c.value:v[o]),a=n&&l?l:t[o],n&&typeof s==typeof a||(u=e.bind&&n?Rr(a,yr):e.wrap&&n?xr(a):p&&br(a)?_r(a):a,(e.sham||a&&a.sham||s&&s.sham)&&Tr(u,"sham",!0),Tr(m,o,u),p&&(Er(kr,i=d+"Prototype")||Tr(kr,i,{}),Tr(kr[i],o,a),e.real&&y&&(r||!y[o])&&Tr(y,o,a)))},Cr=b,Or=Array.isArray||function(e){return"Array"==Cr(e)},Ir=Math.ceil,Pr=Math.floor,Dr=Math.trunc||function(e){var t=+e;return(t>0?Pr:Ir)(t)},Ar=function(e){var t=+e;return t!=t||0===t?0:Dr(t)},Fr=Ar,Zr=Math.min,jr=function(e){return e>0?Zr(Fr(e),9007199254740991):0},Vr=jr,Wr=function(e){return Vr(e.length)},Mr=TypeError,Nr=function(e){if(e>9007199254740991)throw Mr("Maximum allowed index exceeded");return e},Gr=St,Hr=Qt,Ur=W,Xr=function(e,t,r){var n=Gr(t);n in e?Hr.f(e,n,Ur(0,r)):e[n]=r},Br={};Br[ft("toStringTag")]="z";var Kr="[object z]"===String(Br),Yr=Kr,Jr=x,zr=b,Qr=ft("toStringTag"),qr=Object,$r="Arguments"==zr(function(){return arguments}()),en=Yr?zr:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(r){}}(t=qr(e),Qr))?r:$r?zr(t):"Object"==(n=zr(t))&&Jr(t.callee)?"Arguments":n},tn=x,rn=Ue,nn=m(Function.toString);tn(rn.inspectSource)||(rn.inspectSource=function(e){return nn(e)});var on=rn.inspectSource,an=m,sn=o,ln=x,un=en,cn=on,dn=function(){},fn=[],hn=ae("Reflect","construct"),pn=/^\s*(?:class|function)\b/,vn=an(pn.exec),mn=!pn.exec(dn),yn=function(e){if(!ln(e))return!1;try{return hn(dn,fn,e),!0}catch(t){return!1}},gn=function(e){if(!ln(e))return!1;switch(un(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return mn||!!vn(pn,cn(e))}catch(t){return!0}};gn.sham=!0;var _n=!hn||sn((function(){var e;return yn(yn.call)||!yn(Object)||!yn((function(){e=!0}))||e}))?gn:yn,bn=Or,wn=_n,Sn=ee,kn=ft("species"),Rn=Array,Tn=function(e){var t;return bn(e)&&(t=e.constructor,(wn(t)&&(t===Rn||bn(t.prototype))||Sn(t)&&null===(t=t[kn]))&&(t=void 0)),void 0===t?Rn:t},En=function(e,t){return new(Tn(e))(0===t?0:t)},xn=o,Ln=ve,Cn=ft("species"),On=function(e){return Ln>=51||!xn((function(){var t=[];return(t.constructor={})[Cn]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},In=Lr,Pn=o,Dn=Or,An=ee,Fn=Je,Zn=Wr,jn=Nr,Vn=Xr,Wn=En,Mn=On,Nn=ve,Gn=ft("isConcatSpreadable"),Hn=Nn>=51||!Pn((function(){var e=[];return e[Gn]=!1,e.concat()[0]!==e})),Un=function(e){if(!An(e))return!1;var t=e[Gn];return void 0!==t?!!t:Dn(e)};In({target:"Array",proto:!0,arity:1,forced:!Hn||!Mn("concat")},{concat:function(e){var t,r,n,i,o,a=Fn(this),s=Wn(a,0),l=0;for(t=-1,n=arguments.length;t<n;t++)if(Un(o=-1===t?a:arguments[t]))for(i=Zn(o),jn(l+i),r=0;r<i;r++,l++)r in o&&Vn(s,l,o[r]);else jn(l+1),Vn(s,l++,o);return s.length=l,s}});var Xn=en,Bn=String,Kn=function(e){if("Symbol"===Xn(e))throw TypeError("Cannot convert a Symbol value to a string");return Bn(e)},Yn={},Jn=Ar,zn=Math.max,Qn=Math.min,qn=function(e,t){var r=Jn(e);return r<0?zn(r+t,0):Qn(r,t)},$n=Q,ei=qn,ti=Wr,ri=function(e){return function(t,r,n){var i,o=$n(t),a=ti(o),s=ei(n,a);if(e&&r!=r){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===r)return e||s||0;return!e&&-1}},ni={includes:ri(!0),indexOf:ri(!1)},ii={},oi=qe,ai=Q,si=ni.indexOf,li=ii,ui=m([].push),ci=function(e,t){var r,n=ai(e),i=0,o=[];for(r in n)!oi(li,r)&&oi(n,r)&&ui(o,r);for(;t.length>i;)oi(n,r=t[i++])&&(~si(o,r)||ui(o,r));return o},di=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],fi=ci,hi=di,pi=Object.keys||function(e){return fi(e,hi)},vi=C,mi=qt,yi=Qt,gi=rr,_i=Q,bi=pi;Yn.f=vi&&!mi?Object.defineProperties:function(e,t){gi(e);for(var r,n=_i(t),i=bi(t),o=i.length,a=0;o>a;)yi.f(e,r=i[a++],n[r]);return e};var wi,Si=ae("document","documentElement"),ki=nt,Ri=Be("keys"),Ti=function(e){return Ri[e]||(Ri[e]=ki(e))},Ei=rr,xi=Yn,Li=di,Ci=ii,Oi=Si,Ii=Et,Pi="prototype",Di="script",Ai=Ti("IE_PROTO"),Fi=function(){},Zi=function(e){return"<"+Di+">"+e+"</"+Di+">"},ji=function(e){e.write(Zi("")),e.close();var t=e.parentWindow.Object;return e=null,t},Vi=function(){try{wi=new ActiveXObject("htmlfile")}catch(i){}var e,t,r;Vi="undefined"!=typeof document?document.domain&&wi?ji(wi):(t=Ii("iframe"),r="java"+Di+":",t.style.display="none",Oi.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(Zi("document.F=Object")),e.close(),e.F):ji(wi);for(var n=Li.length;n--;)delete Vi[Pi][Li[n]];return Vi()};Ci[Ai]=!0;var Wi=Object.create||function(e,t){var r;return null!==e?(Fi[Pi]=Ei(e),r=new Fi,Fi[Pi]=null,r[Ai]=e):r=Vi(),void 0===t?r:xi.f(r,t)},Mi={},Ni=ci,Gi=di.concat("length","prototype");Mi.f=Object.getOwnPropertyNames||function(e){return Ni(e,Gi)};var Hi={},Ui=qn,Xi=Wr,Bi=Xr,Ki=Array,Yi=Math.max,Ji=function(e,t,r){for(var n=Xi(e),i=Ui(t,n),o=Ui(void 0===r?n:r,n),a=Ki(Yi(o-i,0)),s=0;i<o;i++,s++)Bi(a,s,e[i]);return a.length=s,a},zi=b,Qi=Q,qi=Mi.f,$i=Ji,eo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Hi.f=function(e){return eo&&"Window"==zi(e)?function(e){try{return qi(e)}catch(t){return $i(eo)}}(e):qi(Qi(e))};var to={};to.f=Object.getOwnPropertySymbols;var ro=mr,no=function(e,t,r,n){return n&&n.enumerable?e[t]=r:ro(e,t,r),e},io=Qt,oo=function(e,t,r){return io.f(e,t,r)},ao={},so=ft;ao.f=so;var lo,uo,co,fo=te,ho=qe,po=ao,vo=Qt.f,mo=function(e){var t=fo.Symbol||(fo.Symbol={});ho(t,e)||vo(t,e,{value:po.f(e)})},yo=P,go=ae,_o=ft,bo=no,wo=function(){var e=go("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=_o("toPrimitive");t&&!t[n]&&bo(t,n,(function(e){return yo(r,this)}),{arity:1})},So=en,ko=Kr?{}.toString:function(){return"[object "+So(this)+"]"},Ro=Kr,To=Qt.f,Eo=mr,xo=qe,Lo=ko,Co=ft("toStringTag"),Oo=function(e,t,r,n){if(e){var i=r?e:e.prototype;xo(i,Co)||To(i,Co,{configurable:!0,value:t}),n&&!Ro&&Eo(i,"toString",Lo)}},Io=x,Po=i.WeakMap,Do=Io(Po)&&/native code/.test(String(Po)),Ao=i,Fo=ee,Zo=mr,jo=qe,Vo=Ue,Wo=Ti,Mo=ii,No="Object already initialized",Go=Ao.TypeError,Ho=Ao.WeakMap;if(Do||Vo.state){var Uo=Vo.state||(Vo.state=new Ho);Uo.get=Uo.get,Uo.has=Uo.has,Uo.set=Uo.set,lo=function(e,t){if(Uo.has(e))throw Go(No);return t.facade=e,Uo.set(e,t),t},uo=function(e){return Uo.get(e)||{}},co=function(e){return Uo.has(e)}}else{var Xo=Wo("state");Mo[Xo]=!0,lo=function(e,t){if(jo(e,Xo))throw Go(No);return t.facade=e,Zo(e,Xo,t),t},uo=function(e){return jo(e,Xo)?e[Xo]:{}},co=function(e){return jo(e,Xo)}}var Bo={set:lo,get:uo,has:co,enforce:function(e){return co(e)?uo(e):lo(e,{})},getterFor:function(e){return function(t){var r;if(!Fo(t)||(r=uo(t)).type!==e)throw Go("Incompatible receiver, "+e+" required");return r}}},Ko=zt,Yo=U,Jo=Je,zo=Wr,Qo=En,qo=m([].push),$o=function(e){var t=1==e,r=2==e,n=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(l,u,c,d){for(var f,h,p=Jo(l),v=Yo(p),m=Ko(u,c),y=zo(v),g=0,_=d||Qo,b=t?_(l,y):r||a?_(l,0):void 0;y>g;g++)if((s||g in v)&&(h=m(f=v[g],g,p),e))if(t)b[g]=h;else if(h)switch(e){case 3:return!0;case 5:return f;case 6:return g;case 2:qo(b,f)}else switch(e){case 4:return!1;case 7:qo(b,f)}return o?-1:n||i?i:b}},ea={forEach:$o(0),map:$o(1),filter:$o(2),some:$o(3),every:$o(4),find:$o(5),findIndex:$o(6),filterReject:$o(7)},ta=Lr,ra=i,na=P,ia=m,oa=C,aa=_e,sa=o,la=qe,ua=se,ca=rr,da=Q,fa=St,ha=Kn,pa=W,va=Wi,ma=pi,ya=Mi,ga=Hi,_a=to,ba=L,wa=Qt,Sa=Yn,ka=D,Ra=no,Ta=oo,Ea=Be,xa=ii,La=nt,Ca=ft,Oa=ao,Ia=mo,Pa=wo,Da=Oo,Aa=Bo,Fa=ea.forEach,Za=Ti("hidden"),ja="Symbol",Va="prototype",Wa=Aa.set,Ma=Aa.getterFor(ja),Na=Object[Va],Ga=ra.Symbol,Ha=Ga&&Ga[Va],Ua=ra.TypeError,Xa=ra.QObject,Ba=ba.f,Ka=wa.f,Ya=ga.f,Ja=ka.f,za=ia([].push),Qa=Ea("symbols"),qa=Ea("op-symbols"),$a=Ea("wks"),es=!Xa||!Xa[Va]||!Xa[Va].findChild,ts=oa&&sa((function(){return 7!=va(Ka({},"a",{get:function(){return Ka(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=Ba(Na,t);n&&delete Na[t],Ka(e,t,r),n&&e!==Na&&Ka(Na,t,n)}:Ka,rs=function(e,t){var r=Qa[e]=va(Ha);return Wa(r,{type:ja,tag:e,description:t}),oa||(r.description=t),r},ns=function(e,t,r){e===Na&&ns(qa,t,r),ca(e);var n=fa(t);return ca(r),la(Qa,n)?(r.enumerable?(la(e,Za)&&e[Za][n]&&(e[Za][n]=!1),r=va(r,{enumerable:pa(0,!1)})):(la(e,Za)||Ka(e,Za,pa(1,{})),e[Za][n]=!0),ts(e,n,r)):Ka(e,n,r)},is=function(e,t){ca(e);var r=da(t),n=ma(r).concat(ls(r));return Fa(n,(function(t){oa&&!na(os,r,t)||ns(e,t,r[t])})),e},os=function(e){var t=fa(e),r=na(Ja,this,t);return!(this===Na&&la(Qa,t)&&!la(qa,t))&&(!(r||!la(this,t)||!la(Qa,t)||la(this,Za)&&this[Za][t])||r)},as=function(e,t){var r=da(e),n=fa(t);if(r!==Na||!la(Qa,n)||la(qa,n)){var i=Ba(r,n);return!i||!la(Qa,n)||la(r,Za)&&r[Za][n]||(i.enumerable=!0),i}},ss=function(e){var t=Ya(da(e)),r=[];return Fa(t,(function(e){la(Qa,e)||la(xa,e)||za(r,e)})),r},ls=function(e){var t=e===Na,r=Ya(t?qa:da(e)),n=[];return Fa(r,(function(e){!la(Qa,e)||t&&!la(Na,e)||za(n,Qa[e])})),n};aa||(Ga=function(){if(ua(Ha,this))throw Ua("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?ha(arguments[0]):void 0,t=La(e),r=function(e){this===Na&&na(r,qa,e),la(this,Za)&&la(this[Za],t)&&(this[Za][t]=!1),ts(this,t,pa(1,e))};return oa&&es&&ts(Na,t,{configurable:!0,set:r}),rs(t,e)},Ra(Ha=Ga[Va],"toString",(function(){return Ma(this).tag})),Ra(Ga,"withoutSetter",(function(e){return rs(La(e),e)})),ka.f=os,wa.f=ns,Sa.f=is,ba.f=as,ya.f=ga.f=ss,_a.f=ls,Oa.f=function(e){return rs(Ca(e),e)},oa&&Ta(Ha,"description",{configurable:!0,get:function(){return Ma(this).description}})),ta({global:!0,constructor:!0,wrap:!0,forced:!aa,sham:!aa},{Symbol:Ga}),Fa(ma($a),(function(e){Ia(e)})),ta({target:ja,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):is(va(e),t)},defineProperty:ns,defineProperties:is,getOwnPropertyDescriptor:as}),ta({target:"Object",stat:!0,forced:!aa},{getOwnPropertyNames:ss}),Pa(),Da(Ga,ja),xa[Za]=!0;var us=_e&&!!Symbol.for&&!!Symbol.keyFor,cs=Lr,ds=ae,fs=qe,hs=Kn,ps=Be,vs=us,ms=ps("string-to-symbol-registry"),ys=ps("symbol-to-string-registry");cs({target:"Symbol",stat:!0,forced:!vs},{for:function(e){var t=hs(e);if(fs(ms,t))return ms[t];var r=ds("Symbol")(t);return ms[t]=r,ys[r]=t,r}});var gs=Lr,_s=qe,bs=Te,ws=xe,Ss=us,ks=Be("symbol-to-string-registry");gs({target:"Symbol",stat:!0,forced:!Ss},{keyFor:function(e){if(!bs(e))throw TypeError(ws(e)+" is not a symbol");if(_s(ks,e))return ks[e]}});var Rs=m([].slice),Ts=Or,Es=x,xs=b,Ls=Kn,Cs=m([].push),Os=Lr,Is=ae,Ps=d,Ds=P,As=m,Fs=o,Zs=x,js=Te,Vs=Rs,Ws=function(e){if(Es(e))return e;if(Ts(e)){for(var t=e.length,r=[],n=0;n<t;n++){var i=e[n];"string"==typeof i?Cs(r,i):"number"!=typeof i&&"Number"!=xs(i)&&"String"!=xs(i)||Cs(r,Ls(i))}var o=r.length,a=!0;return function(e,t){if(a)return a=!1,t;if(Ts(this))return t;for(var n=0;n<o;n++)if(r[n]===e)return t}}},Ms=_e,Ns=String,Gs=Is("JSON","stringify"),Hs=As(/./.exec),Us=As("".charAt),Xs=As("".charCodeAt),Bs=As("".replace),Ks=As(1..toString),Ys=/[\uD800-\uDFFF]/g,Js=/^[\uD800-\uDBFF]$/,zs=/^[\uDC00-\uDFFF]$/,Qs=!Ms||Fs((function(){var e=Is("Symbol")();return"[null]"!=Gs([e])||"{}"!=Gs({a:e})||"{}"!=Gs(Object(e))})),qs=Fs((function(){return'"\\udf06\\ud834"'!==Gs("\udf06\ud834")||'"\\udead"'!==Gs("\udead")})),$s=function(e,t){var r=Vs(arguments),n=Ws(t);if(Zs(n)||void 0!==e&&!js(e))return r[1]=function(e,t){if(Zs(n)&&(t=Ds(n,this,Ns(e),t)),!js(t))return t},Ps(Gs,null,r)},el=function(e,t,r){var n=Us(r,t-1),i=Us(r,t+1);return Hs(Js,e)&&!Hs(zs,i)||Hs(zs,e)&&!Hs(Js,n)?"\\u"+Ks(Xs(e,0),16):e};Gs&&Os({target:"JSON",stat:!0,arity:3,forced:Qs||qs},{stringify:function(e,t,r){var n=Vs(arguments),i=Ps(Qs?$s:Gs,null,n);return qs&&"string"==typeof i?Bs(i,Ys,el):i}});var tl=to,rl=Je;Lr({target:"Object",stat:!0,forced:!_e||o((function(){tl.f(1)}))},{getOwnPropertySymbols:function(e){var t=tl.f;return t?t(rl(e)):[]}}),mo("asyncIterator"),mo("hasInstance"),mo("isConcatSpreadable"),mo("iterator"),mo("match"),mo("matchAll"),mo("replace"),mo("search"),mo("species"),mo("split");var nl=wo;mo("toPrimitive"),nl();var il=ae,ol=Oo;mo("toStringTag"),ol(il("Symbol"),"Symbol"),mo("unscopables"),Oo(i.JSON,"JSON",!0);var al,sl,ll,ul=te.Symbol,cl={},dl=C,fl=qe,hl=Function.prototype,pl=dl&&Object.getOwnPropertyDescriptor,vl=fl(hl,"name"),ml={EXISTS:vl,PROPER:vl&&"something"===function(){}.name,CONFIGURABLE:vl&&(!dl||dl&&pl(hl,"name").configurable)},yl=!o((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),gl=qe,_l=x,bl=Je,wl=yl,Sl=Ti("IE_PROTO"),kl=Object,Rl=kl.prototype,Tl=wl?kl.getPrototypeOf:function(e){var t=bl(e);if(gl(t,Sl))return t[Sl];var r=t.constructor;return _l(r)&&t instanceof r?r.prototype:t instanceof kl?Rl:null},El=o,xl=x,Ll=ee,Cl=Wi,Ol=Tl,Il=no,Pl=ft("iterator"),Dl=!1;[].keys&&("next"in(ll=[].keys())?(sl=Ol(Ol(ll)))!==Object.prototype&&(al=sl):Dl=!0);var Al=!Ll(al)||El((function(){var e={};return al[Pl].call(e)!==e}));xl((al=Al?{}:Cl(al))[Pl])||Il(al,Pl,(function(){return this}));var Fl={IteratorPrototype:al,BUGGY_SAFARI_ITERATORS:Dl},Zl=Fl.IteratorPrototype,jl=Wi,Vl=W,Wl=Oo,Ml=cl,Nl=function(){return this},Gl=function(e,t,r,n){var i=t+" Iterator";return e.prototype=jl(Zl,{next:Vl(+!n,r)}),Wl(e,i,!1,!0),Ml[i]=Nl,e},Hl=m,Ul=Ie,Xl=x,Bl=String,Kl=TypeError,Yl=function(e,t,r){try{return Hl(Ul(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(n){}},Jl=rr,zl=function(e){if("object"==typeof e||Xl(e))return e;throw Kl("Can't set "+Bl(e)+" as a prototype")},Ql=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=Yl(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(n){}return function(r,n){return Jl(r),zl(n),t?e(r,n):r.__proto__=n,r}}():void 0),ql=Lr,$l=P,eu=ml,tu=Gl,ru=Tl,nu=Oo,iu=no,ou=cl,au=Fl,su=eu.PROPER,lu=au.BUGGY_SAFARI_ITERATORS,uu=ft("iterator"),cu="keys",du="values",fu="entries",hu=function(){return this},pu=function(e,t,r,n,i,o,a){tu(r,t,n);var s,l,u,c=function(e){if(e===i&&v)return v;if(!lu&&e in h)return h[e];switch(e){case cu:case du:case fu:return function(){return new r(this,e)}}return function(){return new r(this)}},d=t+" Iterator",f=!1,h=e.prototype,p=h[uu]||h["@@iterator"]||i&&h[i],v=!lu&&p||c(i),m="Array"==t&&h.entries||p;if(m&&(s=ru(m.call(new e)))!==Object.prototype&&s.next&&(nu(s,d,!0,!0),ou[d]=hu),su&&i==du&&p&&p.name!==du&&(f=!0,v=function(){return $l(p,this)}),i)if(l={values:c(du),keys:o?v:c(cu),entries:c(fu)},a)for(u in l)(lu||f||!(u in h))&&iu(h,u,l[u]);else ql({target:t,proto:!0,forced:lu||f},l);return a&&h[uu]!==v&&iu(h,uu,v,{name:i}),ou[t]=v,l},vu=function(e,t){return{value:e,done:t}},mu=Q,yu=cl,gu=Bo;Qt.f;var _u=pu,bu=vu,wu="Array Iterator",Su=gu.set,ku=gu.getterFor(wu);_u(Array,"Array",(function(e,t){Su(this,{type:wu,target:mu(e),index:0,kind:t})}),(function(){var e=ku(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,bu(void 0,!0)):bu("keys"==r?n:"values"==r?t[n]:[n,t[n]],!1)}),"values"),yu.Arguments=yu.Array;var Ru={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},Tu=i,Eu=en,xu=mr,Lu=cl,Cu=ft("toStringTag");for(var Ou in Ru){var Iu=Tu[Ou],Pu=Iu&&Iu.prototype;Pu&&Eu(Pu)!==Cu&&xu(Pu,Cu,Ou),Lu[Ou]=Lu.Array}var Du=ul;mo("dispose");var Au=Du;mo("asyncDispose");var Fu=Lr,Zu=m,ju=ae("Symbol"),Vu=ju.keyFor,Wu=Zu(ju.prototype.valueOf);Fu({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==Vu(Wu(e))}catch(t){return!1}}});for(var Mu=Lr,Nu=Be,Gu=ae,Hu=m,Uu=Te,Xu=ft,Bu=Gu("Symbol"),Ku=Bu.isWellKnown,Yu=Gu("Object","getOwnPropertyNames"),Ju=Hu(Bu.prototype.valueOf),zu=Nu("wks"),Qu=0,qu=Yu(Bu),$u=qu.length;Qu<$u;Qu++)try{var ec=qu[Qu];Uu(Bu[ec])&&Xu(ec)}catch(oD){}Mu({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if(Ku&&Ku(e))return!0;try{for(var t=Ju(e),r=0,n=Yu(zu),i=n.length;r<i;r++)if(zu[n[r]]==t)return!0}catch(oD){}return!1}}),mo("matcher"),mo("metadataKey"),mo("observable"),mo("metadata"),mo("patternMatch"),mo("replaceAll");var tc=Au,rc=r(tc),nc=m,ic=Ar,oc=Kn,ac=Y,sc=nc("".charAt),lc=nc("".charCodeAt),uc=nc("".slice),cc=function(e){return function(t,r){var n,i,o=oc(ac(t)),a=ic(r),s=o.length;return a<0||a>=s?e?"":void 0:(n=lc(o,a))<55296||n>56319||a+1===s||(i=lc(o,a+1))<56320||i>57343?e?sc(o,a):n:e?uc(o,a,a+2):i-56320+(n-55296<<10)+65536}},dc={codeAt:cc(!1),charAt:cc(!0)},fc=dc.charAt,hc=Kn,pc=Bo,vc=pu,mc=vu,yc="String Iterator",gc=pc.set,_c=pc.getterFor(yc);vc(String,"String",(function(e){gc(this,{type:yc,string:hc(e),index:0})}),(function(){var e,t=_c(this),r=t.string,n=t.index;return n>=r.length?mc(void 0,!0):(e=fc(r,n),t.index+=e.length,mc(e,!1))}));var bc=ao.f("iterator"),wc=r(bc);function Sc(e){return(Sc="function"==typeof rc&&"symbol"==typeof wc?function(e){return typeof e}:function(e){return e&&"function"==typeof rc&&e.constructor===rc&&e!==rc.prototype?"symbol":typeof e})(e)}var kc=r(tc),Rc=en,Tc=Ae,Ec=X,xc=cl,Lc=ft("iterator"),Cc=function(e){if(!Ec(e))return Tc(e,Lc)||Tc(e,"@@iterator")||xc[Rc(e)]},Oc=r(Cc),Ic=Je,Pc=pi;Lr({target:"Object",stat:!0,forced:o((function(){Pc(1)}))},{keys:function(e){return Pc(Ic(e))}});var Dc=r(te.Object.keys),Ac=r(te.Object.getOwnPropertySymbols),Fc=ea.filter;Lr({target:"Array",proto:!0,forced:!On("filter")},{filter:function(e){return Fc(this,e,arguments.length>1?arguments[1]:void 0)}});var Zc=te,jc=function(e){return Zc[e+"Prototype"]},Vc=jc("Array").filter,Wc=se,Mc=Vc,Nc=Array.prototype,Gc=r((function(e){var t=e.filter;return e===Nc||Wc(Nc,e)&&t===Nc.filter?Mc:t})),Hc={exports:{}},Uc=Lr,Xc=o,Bc=Q,Kc=L.f,Yc=C;Uc({target:"Object",stat:!0,forced:!Yc||Xc((function(){Kc(1)})),sham:!Yc},{getOwnPropertyDescriptor:function(e,t){return Kc(Bc(e),t)}});var Jc=te.Object,zc=Hc.exports=function(e,t){return Jc.getOwnPropertyDescriptor(e,t)};Jc.getOwnPropertyDescriptor.sham&&(zc.sham=!0);var Qc=r(Hc.exports),qc=o,$c=function(e,t){var r=[][e];return!!r&&qc((function(){r.call(null,t||function(){return 1},1)}))},ed=ea.forEach,td=$c("forEach")?[].forEach:function(e){return ed(this,e,arguments.length>1?arguments[1]:void 0)};Lr({target:"Array",proto:!0,forced:[].forEach!=td},{forEach:td});var rd=jc("Array").forEach,nd=en,id=qe,od=se,ad=rd,sd=Array.prototype,ld={DOMTokenList:!0,NodeList:!0},ud=r((function(e){var t=e.forEach;return e===sd||od(sd,e)&&t===sd.forEach||id(ld,nd(e))?ad:t})),cd=ae,dd=Mi,fd=to,hd=rr,pd=m([].concat),vd=cd("Reflect","ownKeys")||function(e){var t=dd.f(hd(e)),r=fd.f;return r?pd(t,r(e)):t},md=vd,yd=Q,gd=L,_d=Xr;Lr({target:"Object",stat:!0,sham:!C},{getOwnPropertyDescriptors:function(e){for(var t,r,n=yd(e),i=gd.f,o=md(n),a={},s=0;o.length>s;)void 0!==(r=i(n,t=o[s++]))&&_d(a,t,r);return a}});var bd=r(te.Object.getOwnPropertyDescriptors),wd={exports:{}},Sd=Lr,kd=C,Rd=Yn.f;Sd({target:"Object",stat:!0,forced:Object.defineProperties!==Rd,sham:!kd},{defineProperties:Rd});var Td=te.Object,Ed=wd.exports=function(e,t){return Td.defineProperties(e,t)};Td.defineProperties.sham&&(Ed.sham=!0);var xd=r(wd.exports),Ld={exports:{}},Cd=Lr,Od=C,Id=Qt.f;Cd({target:"Object",stat:!0,forced:Object.defineProperty!==Id,sham:!Od},{defineProperty:Id});var Pd=te.Object,Dd=Ld.exports=function(e,t,r){return Pd.defineProperty(e,t,r)};Pd.defineProperty.sham&&(Dd.sham=!0);var Ad=r(Ld.exports);Lr({target:"Object",stat:!0,sham:!C},{create:Wi});var Fd=te.Object,Zd=r((function(e,t){return Fd.create(e,t)})),jd=Je,Vd=Tl,Wd=yl;Lr({target:"Object",stat:!0,forced:o((function(){Vd(1)})),sham:!Wd},{getPrototypeOf:function(e){return Vd(jd(e))}});var Md=r(te.Object.getPrototypeOf);Lr({target:"Object",stat:!0},{setPrototypeOf:Ql});var Nd=r(te.Object.setPrototypeOf),Gd=qe,Hd=vd,Ud=L,Xd=Qt,Bd=ee,Kd=mr,Yd=Error,Jd=m("".replace),zd=String(Yd("zxcasd").stack),Qd=/\n\s*at [^:]*:[^\n]*/,qd=Qd.test(zd),$d=W,ef=!o((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",$d(1,7)),7!==e.stack)})),tf=mr,rf=function(e,t){if(qd&&"string"==typeof e&&!Yd.prepareStackTrace)for(;t--;)e=Jd(e,Qd,"");return e},nf=ef,of=Error.captureStackTrace,af=cl,sf=ft("iterator"),lf=Array.prototype,uf=function(e){return void 0!==e&&(af.Array===e||lf[sf]===e)},cf=P,df=Ie,ff=rr,hf=xe,pf=Cc,vf=TypeError,mf=function(e,t){var r=arguments.length<2?pf(e):t;if(df(r))return ff(cf(r,e));throw vf(hf(e)+" is not iterable")},yf=P,gf=rr,_f=Ae,bf=function(e,t,r){var n,i;gf(e);try{if(!(n=_f(e,"return"))){if("throw"===t)throw r;return r}n=yf(n,e)}catch(oD){i=!0,n=oD}if("throw"===t)throw r;if(i)throw n;return gf(n),r},wf=zt,Sf=P,kf=rr,Rf=xe,Tf=uf,Ef=Wr,xf=se,Lf=mf,Cf=Cc,Of=bf,If=TypeError,Pf=function(e,t){this.stopped=e,this.result=t},Df=Pf.prototype,Af=function(e,t,r){var n,i,o,a,s,l,u,c=r&&r.that,d=!(!r||!r.AS_ENTRIES),f=!(!r||!r.IS_RECORD),h=!(!r||!r.IS_ITERATOR),p=!(!r||!r.INTERRUPTED),v=wf(t,c),m=function(e){return n&&Of(n,"normal",e),new Pf(!0,e)},y=function(e){return d?(kf(e),p?v(e[0],e[1],m):v(e[0],e[1])):p?v(e,m):v(e)};if(f)n=e.iterator;else if(h)n=e;else{if(!(i=Cf(e)))throw If(Rf(e)+" is not iterable");if(Tf(i)){for(o=0,a=Ef(e);a>o;o++)if((s=y(e[o]))&&xf(Df,s))return s;return new Pf(!1)}n=Lf(e,i)}for(l=f?e.next:n.next;!(u=Sf(l,n)).done;){try{s=y(u.value)}catch(oD){Of(n,"throw",oD)}if("object"==typeof s&&s&&xf(Df,s))return s}return new Pf(!1)},Ff=Kn,Zf=Lr,jf=se,Vf=Tl,Wf=Ql,Mf=function(e,t,r){for(var n=Hd(t),i=Xd.f,o=Ud.f,a=0;a<n.length;a++){var s=n[a];Gd(e,s)||r&&Gd(r,s)||i(e,s,o(t,s))}},Nf=Wi,Gf=mr,Hf=W,Uf=function(e,t){Bd(t)&&"cause"in t&&Kd(e,"cause",t.cause)},Xf=function(e,t,r,n){nf&&(of?of(e,t):tf(e,"stack",rf(r,n)))},Bf=Af,Kf=function(e,t){return void 0===e?arguments.length<2?"":t:Ff(e)},Yf=ft("toStringTag"),Jf=Error,zf=[].push,Qf=function(e,t){var r,n=jf(qf,this);Wf?r=Wf(Jf(),n?Vf(this):qf):(r=n?this:Nf(qf),Gf(r,Yf,"Error")),void 0!==t&&Gf(r,"message",Kf(t)),Xf(r,Qf,r.stack,1),arguments.length>2&&Uf(r,arguments[2]);var i=[];return Bf(e,zf,{that:i}),Gf(r,"errors",i),r};Wf?Wf(Qf,Jf):Mf(Qf,Jf,{name:!0});var qf=Qf.prototype=Nf(Jf.prototype,{constructor:Hf(1,Qf),message:Hf(1,""),name:Hf(1,"AggregateError")});Zf({global:!0,constructor:!0,arity:2},{AggregateError:Qf});var $f,eh,th,rh,nh="undefined"!=typeof process&&"process"==b(process),ih=ae,oh=oo,ah=C,sh=ft("species"),lh=function(e){var t=ih(e);ah&&t&&!t[sh]&&oh(t,sh,{configurable:!0,get:function(){return this}})},uh=se,ch=TypeError,dh=function(e,t){if(uh(t,e))return e;throw ch("Incorrect invocation")},fh=_n,hh=xe,ph=TypeError,vh=function(e){if(fh(e))return e;throw ph(hh(e)+" is not a constructor")},mh=rr,yh=vh,gh=X,_h=ft("species"),bh=function(e,t){var r,n=mh(e).constructor;return void 0===n||gh(r=mh(n)[_h])?t:yh(r)},wh=TypeError,Sh=function(e,t){if(e<t)throw wh("Not enough arguments");return e},kh=/(?:ipad|iphone|ipod).*applewebkit/i.test(le),Rh=i,Th=d,Eh=zt,xh=x,Lh=qe,Ch=o,Oh=Si,Ih=Rs,Ph=Et,Dh=Sh,Ah=kh,Fh=nh,Zh=Rh.setImmediate,jh=Rh.clearImmediate,Vh=Rh.process,Wh=Rh.Dispatch,Mh=Rh.Function,Nh=Rh.MessageChannel,Gh=Rh.String,Hh=0,Uh={},Xh="onreadystatechange";Ch((function(){$f=Rh.location}));var Bh=function(e){if(Lh(Uh,e)){var t=Uh[e];delete Uh[e],t()}},Kh=function(e){return function(){Bh(e)}},Yh=function(e){Bh(e.data)},Jh=function(e){Rh.postMessage(Gh(e),$f.protocol+"//"+$f.host)};Zh&&jh||(Zh=function(e){Dh(arguments.length,1);var t=xh(e)?e:Mh(e),r=Ih(arguments,1);return Uh[++Hh]=function(){Th(t,void 0,r)},eh(Hh),Hh},jh=function(e){delete Uh[e]},Fh?eh=function(e){Vh.nextTick(Kh(e))}:Wh&&Wh.now?eh=function(e){Wh.now(Kh(e))}:Nh&&!Ah?(rh=(th=new Nh).port2,th.port1.onmessage=Yh,eh=Eh(rh.postMessage,rh)):Rh.addEventListener&&xh(Rh.postMessage)&&!Rh.importScripts&&$f&&"file:"!==$f.protocol&&!Ch(Jh)?(eh=Jh,Rh.addEventListener("message",Yh,!1)):eh=Xh in Ph("script")?function(e){Oh.appendChild(Ph("script"))[Xh]=function(){Oh.removeChild(this),Bh(e)}}:function(e){setTimeout(Kh(e),0)});var zh={set:Zh,clear:jh},Qh=function(){this.head=null,this.tail=null};Qh.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.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 qh,$h,ep,tp,rp,np=Qh,ip=/ipad|iphone|ipod/i.test(le)&&"undefined"!=typeof Pebble,op=/web0s(?!.*chrome)/i.test(le),ap=i,sp=zt,lp=L.f,up=zh.set,cp=np,dp=kh,fp=ip,hp=op,pp=nh,vp=ap.MutationObserver||ap.WebKitMutationObserver,mp=ap.document,yp=ap.process,gp=ap.Promise,_p=lp(ap,"queueMicrotask"),bp=_p&&_p.value;if(!bp){var wp=new cp,Sp=function(){var e,t;for(pp&&(e=yp.domain)&&e.exit();t=wp.get();)try{t()}catch(oD){throw wp.head&&qh(),oD}e&&e.enter()};dp||pp||hp||!vp||!mp?!fp&&gp&&gp.resolve?((tp=gp.resolve(void 0)).constructor=gp,rp=sp(tp.then,tp),qh=function(){rp(Sp)}):pp?qh=function(){yp.nextTick(Sp)}:(up=sp(up,ap),qh=function(){up(Sp)}):($h=!0,ep=mp.createTextNode(""),new vp(Sp).observe(ep,{characterData:!0}),qh=function(){ep.data=$h=!$h}),bp=function(e){wp.head||qh(),wp.add(e)}}var kp=bp,Rp=function(e){try{return{error:!1,value:e()}}catch(oD){return{error:!0,value:oD}}},Tp=i.Promise,Ep="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,xp=!Ep&&!nh&&"object"==typeof window&&"object"==typeof document,Lp=i,Cp=Tp,Op=x,Ip=Bt,Pp=on,Dp=ft,Ap=xp,Fp=Ep,Zp=ve,jp=Cp&&Cp.prototype,Vp=Dp("species"),Wp=!1,Mp=Op(Lp.PromiseRejectionEvent),Np={CONSTRUCTOR:Ip("Promise",(function(){var e=Pp(Cp),t=e!==String(Cp);if(!t&&66===Zp)return!0;if(!jp.catch||!jp.finally)return!0;if(!Zp||Zp<51||!/native code/.test(e)){var r=new Cp((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[Vp]=n,!(Wp=r.then((function(){}))instanceof n))return!0}return!t&&(Ap||Fp)&&!Mp})),REJECTION_EVENT:Mp,SUBCLASSING:Wp},Gp={},Hp=Ie,Up=TypeError,Xp=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw Up("Bad Promise constructor");t=e,r=n})),this.resolve=Hp(t),this.reject=Hp(r)};Gp.f=function(e){return new Xp(e)};var Bp,Kp,Yp=Lr,Jp=nh,zp=i,Qp=P,qp=no,$p=Oo,ev=lh,tv=Ie,rv=x,nv=ee,iv=dh,ov=bh,av=zh.set,sv=kp,lv=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(oD){}},uv=Rp,cv=np,dv=Bo,fv=Tp,hv=Np,pv=Gp,vv="Promise",mv=hv.CONSTRUCTOR,yv=hv.REJECTION_EVENT,gv=dv.getterFor(vv),_v=dv.set,bv=fv&&fv.prototype,wv=fv,Sv=bv,kv=zp.TypeError,Rv=zp.document,Tv=zp.process,Ev=pv.f,xv=Ev,Lv=!!(Rv&&Rv.createEvent&&zp.dispatchEvent),Cv="unhandledrejection",Ov=function(e){var t;return!(!nv(e)||!rv(t=e.then))&&t},Iv=function(e,t){var r,n,i,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&&Zv(t),t.rejection=1),!0===s?r=o:(c&&c.enter(),r=s(o),c&&(c.exit(),i=!0)),r===e.promise?u(kv("Promise-chain cycle")):(n=Ov(r))?Qp(n,r,l,u):l(r)):u(o)}catch(oD){c&&!i&&c.exit(),u(oD)}},Pv=function(e,t){e.notified||(e.notified=!0,sv((function(){for(var r,n=e.reactions;r=n.get();)Iv(r,e);e.notified=!1,t&&!e.rejection&&Av(e)})))},Dv=function(e,t,r){var n,i;Lv?((n=Rv.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),zp.dispatchEvent(n)):n={promise:t,reason:r},!yv&&(i=zp["on"+e])?i(n):e===Cv&&lv("Unhandled promise rejection",r)},Av=function(e){Qp(av,zp,(function(){var t,r=e.facade,n=e.value;if(Fv(e)&&(t=uv((function(){Jp?Tv.emit("unhandledRejection",n,r):Dv(Cv,r,n)})),e.rejection=Jp||Fv(e)?2:1,t.error))throw t.value}))},Fv=function(e){return 1!==e.rejection&&!e.parent},Zv=function(e){Qp(av,zp,(function(){var t=e.facade;Jp?Tv.emit("rejectionHandled",t):Dv("rejectionhandled",t,e.value)}))},jv=function(e,t,r){return function(n){e(t,n,r)}},Vv=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Pv(e,!0))},Wv=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw kv("Promise can't be resolved itself");var n=Ov(t);n?sv((function(){var r={done:!1};try{Qp(n,t,jv(Wv,r,e),jv(Vv,r,e))}catch(oD){Vv(r,oD,e)}})):(e.value=t,e.state=1,Pv(e,!1))}catch(oD){Vv({done:!1},oD,e)}}};mv&&(Sv=(wv=function(e){iv(this,Sv),tv(e),Qp(Bp,this);var t=gv(this);try{e(jv(Wv,t),jv(Vv,t))}catch(oD){Vv(t,oD)}}).prototype,(Bp=function(e){_v(this,{type:vv,done:!1,notified:!1,parent:!1,reactions:new cv,rejection:!1,state:0,value:void 0})}).prototype=qp(Sv,"then",(function(e,t){var r=gv(this),n=Ev(ov(this,wv));return r.parent=!0,n.ok=!rv(e)||e,n.fail=rv(t)&&t,n.domain=Jp?Tv.domain:void 0,0==r.state?r.reactions.add(n):sv((function(){Iv(n,r)})),n.promise})),Kp=function(){var e=new Bp,t=gv(e);this.promise=e,this.resolve=jv(Wv,t),this.reject=jv(Vv,t)},pv.f=Ev=function(e){return e===wv||undefined===e?new Kp(e):xv(e)}),Yp({global:!0,constructor:!0,wrap:!0,forced:mv},{Promise:wv}),$p(wv,vv,!1,!0),ev(vv);var Mv=ft("iterator"),Nv=!1;try{var Gv=0,Hv={next:function(){return{done:!!Gv++}},return:function(){Nv=!0}};Hv[Mv]=function(){return this},Array.from(Hv,(function(){throw 2}))}catch(oD){}var Uv=function(e,t){if(!t&&!Nv)return!1;var r=!1;try{var n={};n[Mv]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(oD){}return r},Xv=Tp,Bv=Np.CONSTRUCTOR||!Uv((function(e){Xv.all(e).then(void 0,(function(){}))})),Kv=P,Yv=Ie,Jv=Gp,zv=Rp,Qv=Af;Lr({target:"Promise",stat:!0,forced:Bv},{all:function(e){var t=this,r=Jv.f(t),n=r.resolve,i=r.reject,o=zv((function(){var r=Yv(t.resolve),o=[],a=0,s=1;Qv(e,(function(e){var l=a++,u=!1;s++,Kv(r,t,e).then((function(e){u||(u=!0,o[l]=e,--s||n(o))}),i)})),--s||n(o)}));return o.error&&i(o.value),r.promise}});var qv=Lr,$v=Np.CONSTRUCTOR;Tp&&Tp.prototype,qv({target:"Promise",proto:!0,forced:$v,real:!0},{catch:function(e){return this.then(void 0,e)}});var em=P,tm=Ie,rm=Gp,nm=Rp,im=Af;Lr({target:"Promise",stat:!0,forced:Bv},{race:function(e){var t=this,r=rm.f(t),n=r.reject,i=nm((function(){var i=tm(t.resolve);im(e,(function(e){em(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}});var om=P,am=Gp;Lr({target:"Promise",stat:!0,forced:Np.CONSTRUCTOR},{reject:function(e){var t=am.f(this);return om(t.reject,void 0,e),t.promise}});var sm=rr,lm=ee,um=Gp,cm=function(e,t){if(sm(e),lm(t)&&t.constructor===e)return t;var r=um.f(e);return(0,r.resolve)(t),r.promise},dm=Lr,fm=Tp,hm=Np.CONSTRUCTOR,pm=cm,vm=ae("Promise"),mm=!hm;dm({target:"Promise",stat:!0,forced:true},{resolve:function(e){return pm(mm&&this===vm?fm:this,e)}});var ym=P,gm=Ie,_m=Gp,bm=Rp,wm=Af;Lr({target:"Promise",stat:!0,forced:Bv},{allSettled:function(e){var t=this,r=_m.f(t),n=r.resolve,i=r.reject,o=bm((function(){var r=gm(t.resolve),i=[],o=0,a=1;wm(e,(function(e){var s=o++,l=!1;a++,ym(r,t,e).then((function(e){l||(l=!0,i[s]={status:"fulfilled",value:e},--a||n(i))}),(function(e){l||(l=!0,i[s]={status:"rejected",reason:e},--a||n(i))}))})),--a||n(i)}));return o.error&&i(o.value),r.promise}});var Sm=P,km=Ie,Rm=ae,Tm=Gp,Em=Rp,xm=Af,Lm="No one promise resolved";Lr({target:"Promise",stat:!0,forced:Bv},{any:function(e){var t=this,r=Rm("AggregateError"),n=Tm.f(t),i=n.resolve,o=n.reject,a=Em((function(){var n=km(t.resolve),a=[],s=0,l=1,u=!1;xm(e,(function(e){var c=s++,d=!1;l++,Sm(n,t,e).then((function(e){d||u||(u=!0,i(e))}),(function(e){d||u||(d=!0,a[c]=e,--l||o(new r(a,Lm)))}))})),--l||o(new r(a,Lm))}));return a.error&&o(a.value),n.promise}});var Cm=Lr,Om=Tp,Im=o,Pm=ae,Dm=x,Am=bh,Fm=cm,Zm=Om&&Om.prototype;Cm({target:"Promise",proto:!0,real:!0,forced:!!Om&&Im((function(){Zm.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Am(this,Pm("Promise")),r=Dm(e);return this.then(r?function(r){return Fm(t,e()).then((function(){return r}))}:e,r?function(r){return Fm(t,e()).then((function(){throw r}))}:e)}});var jm=te.Promise,Vm=Gp,Wm=Rp;Lr({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=Vm.f(this),r=Wm(e);return(r.error?t.reject:t.resolve)(r.value),t.promise}});var Mm=r(jm),Nm=Lr,Gm=Or,Hm=m([].reverse),Um=[1,2];Nm({target:"Array",proto:!0,forced:String(Um)===String(Um.reverse())},{reverse:function(){return Gm(this)&&(this.length=this.length),Hm(this)}});var Xm=jc("Array").reverse,Bm=se,Km=Xm,Ym=Array.prototype,Jm=r((function(e){var t=e.reverse;return e===Ym||Bm(Ym,e)&&t===Ym.reverse?Km:t})),zm=Lr,Qm=Or,qm=_n,$m=ee,ey=qn,ty=Wr,ry=Q,ny=Xr,iy=ft,oy=Rs,ay=On("slice"),sy=iy("species"),ly=Array,uy=Math.max;zm({target:"Array",proto:!0,forced:!ay},{slice:function(e,t){var r,n,i,o=ry(this),a=ty(o),s=ey(e,a),l=ey(void 0===t?a:t,a);if(Qm(o)&&(r=o.constructor,(qm(r)&&(r===ly||Qm(r.prototype))||$m(r)&&null===(r=r[sy]))&&(r=void 0),r===ly||void 0===r))return oy(o,s,l);for(n=new(void 0===r?ly:r)(uy(l-s,0)),i=0;s<l;s++,i++)s in o&&ny(n,i,o[s]);return n.length=i,n}});var cy=jc("Array").slice,dy=se,fy=cy,hy=Array.prototype,py=r((function(e){var t=e.slice;return e===hy||dy(hy,e)&&t===hy.slice?fy:t})),vy=m,my=Ie,yy=ee,gy=qe,_y=Rs,by=a,wy=Function,Sy=vy([].concat),ky=vy([].join),Ry={},Ty=by?wy.bind:function(e){var t=my(this),r=t.prototype,n=_y(arguments,1),i=function(){var r=Sy(n,_y(arguments));return this instanceof i?function(e,t,r){if(!gy(Ry,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";Ry[t]=wy("C,a","return new C("+ky(n,",")+")")}return Ry[t](e,r)}(t,r.length,r):t.apply(e,r)};return yy(r)&&(i.prototype=r),i},Ey=Ty;Lr({target:"Function",proto:!0,forced:Function.bind!==Ey},{bind:Ey});var xy=jc("Function").bind,Ly=se,Cy=xy,Oy=Function.prototype,Iy=r((function(e){var t=e.bind;return e===Oy||Ly(Oy,e)&&t===Oy.bind?Cy:t})),Py=Lr,Dy=d,Ay=Ty,Fy=vh,Zy=rr,jy=ee,Vy=Wi,Wy=o,My=ae("Reflect","construct"),Ny=Object.prototype,Gy=[].push,Hy=Wy((function(){function e(){}return!(My((function(){}),[],e)instanceof e)})),Uy=!Wy((function(){My((function(){}))})),Xy=Hy||Uy;Py({target:"Reflect",stat:!0,forced:Xy,sham:Xy},{construct:function(e,t){Fy(e),Zy(t);var r=arguments.length<3?e:Fy(arguments[2]);if(Uy&&!Hy)return My(e,t,r);if(e==r){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 n=[null];return Dy(Gy,n,t),new(Dy(Ay,e,n))}var i=r.prototype,o=Vy(jy(i)?i:Ny),a=Dy(e,o,t);return jy(a)?a:o}});var By=r(te.Reflect.construct),Ky=Lr,Yy=ni.indexOf,Jy=$c,zy=k([].indexOf),Qy=!!zy&&1/zy([1],1,-0)<0;Ky({target:"Array",proto:!0,forced:Qy||!Jy("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return Qy?zy(this,e,t)||0:Yy(this,e,t)}});var qy=jc("Array").indexOf,$y=se,eg=qy,tg=Array.prototype,rg=r((function(e){var t=e.indexOf;return e===tg||$y(tg,e)&&t===tg.indexOf?eg:t}));Lr({target:"Array",stat:!0},{isArray:Or});var ng=r(te.Array.isArray),ig=rr,og=bf,ag=zt,sg=P,lg=Je,ug=function(e,t,r,n){try{return n?t(ig(r)[0],r[1]):t(r)}catch(oD){og(e,"throw",oD)}},cg=uf,dg=_n,fg=Wr,hg=Xr,pg=mf,vg=Cc,mg=Array,yg=function(e){var t=lg(e),r=dg(this),n=arguments.length,i=n>1?arguments[1]:void 0,o=void 0!==i;o&&(i=ag(i,n>2?arguments[2]:void 0));var a,s,l,u,c,d,f=vg(t),h=0;if(!f||this===mg&&cg(f))for(a=fg(t),s=r?new this(a):mg(a);a>h;h++)d=o?i(t[h],h):t[h],hg(s,h,d);else for(c=(u=pg(t,f)).next,s=r?new this:[];!(l=sg(c,u)).done;h++)d=o?ug(u,i,[l.value,h],!0):l.value,hg(s,h,d);return s.length=h,s},gg=yg;Lr({target:"Array",stat:!0,forced:!Uv((function(e){Array.from(e)}))},{from:gg});var _g=r(te.Array.from),bg=r(ao.f("toPrimitive"));function wg(e,t){var r=Dc(e);if(Ac){var n=Ac(e);t&&(n=Gc(n).call(n,(function(t){return Qc(e,t).enumerable}))),r.push.apply(r,n)}return r}function Sg(e){for(var t=1;t<arguments.length;t++){var r,n,i=null!=arguments[t]?arguments[t]:{};t%2?ud(r=wg(Object(i),!0)).call(r,(function(t){Cg(e,t,i[t])})):bd?xd(e,bd(i)):ud(n=wg(Object(i))).call(n,(function(t){Ad(e,t,Qc(i,t))}))}return e}function kg(){kg=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Ad||function(e,t,r){e[t]=r.value},i="function"==typeof kc?kc:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,r){return Ad(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(x){l=function(e,t,r){return e[t]=r}}function u(e,t,r,i){var o=t&&t.prototype instanceof f?t:f,a=Zd(o.prototype),s=new R(i||[]);return n(a,"_invoke",{value:b(e,r,s)}),a}function c(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(x){return{type:"throw",arg:x}}}e.wrap=u;var d={};function f(){}function h(){}function p(){}var v={};l(v,o,(function(){return this}));var m=Md&&Md(Md(T([])));m&&m!==t&&r.call(m,o)&&(v=m);var y=p.prototype=f.prototype=Zd(v);function g(e){var t;ud(t=["next","throw","return"]).call(t,(function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(n,o,a,s){var l=c(e[n],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==Sc(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(d).then((function(e){u.value=e,a(u)}),(function(e){return i("throw",e,a,s)}))}s(l.arg)}var o;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return o=o?o.then(n,n):n()}})}function b(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=w(a,r);if(s){if(s===d)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=c(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=c(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,d;var o=i.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,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],ud(e).call(e,S,this),this.reset(!0)}function T(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 n=-1,i=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:E}}function E(){return{value:void 0,done:!0}}return h.prototype=p,n(y,"constructor",{value:p,configurable:!0}),n(p,"constructor",{value:h,configurable:!0}),h.displayName=l(p,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Nd?Nd(e,p):(e.__proto__=p,l(e,s,"GeneratorFunction")),e.prototype=Zd(y),e},e.awrap=function(e){return{__await:e}},g(_.prototype),l(_.prototype,a,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,i,o){void 0===o&&(o=Mm);var a=new _(u(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(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),r=[];for(var n in t)r.push(n);return Jm(r).call(r),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=T,R.prototype={constructor:R,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,ud(t=this.tryEntries).call(t,k),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+py(n).call(n,1))&&(this[n]=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 n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;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,d):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),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),k(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;k(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:T(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function Rg(e,t,r,n,i,o,a){try{var s=e[o](a),l=s.value}catch(oD){return void r(oD)}s.done?t(l):Mm.resolve(l).then(n,i)}function Tg(e){return function(){var t=this,r=arguments;return new Mm((function(n,i){var o=e.apply(t,r);function a(e){Rg(o,n,i,a,s,"next",e)}function s(e){Rg(o,n,i,a,s,"throw",e)}a(void 0)}))}}function Eg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Ad(e,Mg(n.key),n)}}function Lg(e,t,r){return t&&xg(e.prototype,t),r&&xg(e,r),Ad(e,"prototype",{writable:!1}),e}function Cg(e,t,r){return(t=Mg(t))in e?Ad(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Og(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Zd(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Ad(e,"prototype",{writable:!1}),t&&Pg(e,t)}function Ig(e){var t;return(Ig=Nd?Iy(t=Md).call(t):function(e){return e.__proto__||Md(e)})(e)}function Pg(e,t){var r;return(Pg=Nd?Iy(r=Nd).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function Dg(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Dc(e);for(n=0;n<o.length;n++)r=o[n],rg(t).call(t,r)>=0||(i[r]=e[r]);return i}(e,t);if(Ac){var o=Ac(e);for(n=0;n<o.length;n++)r=o[n],rg(t).call(t,r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Ag(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fg(e){var t=function(){if("undefined"==typeof Reflect||!By)return!1;if(By.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(By(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ig(e);if(t){var i=Ig(this).constructor;r=By(n,arguments,i)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===Sc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ag(e)}(this,r)}}function Zg(e,t){return function(e){if(ng(e))return e}(e)||function(e,t){var r=null==e?null:void 0!==kc&&Oc(e)||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||Vg(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.")}()}function jg(e){return function(e){if(ng(e))return Wg(e)}(e)||function(e){if(void 0!==kc&&null!=Oc(e)||null!=e["@@iterator"])return _g(e)}(e)||Vg(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 Vg(e,t){var r;if(e){if("string"==typeof e)return Wg(e,t);var n=py(r=Object.prototype.toString.call(e)).call(r,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?_g(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wg(e,t):void 0}}function Wg(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Mg(e){var t=function(e,t){if("object"!==Sc(e)||null===e)return e;var r=e[bg];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Sc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Sc(t)?t:String(t)}var Ng,Gg="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,Hg=i,Ug=d,Xg=x,Bg=Gg,Kg=le,Yg=Rs,Jg=Sh,zg=Hg.Function,Qg=/MSIE .\./.test(Kg)||Bg&&((Ng=Hg.Bun.version.split(".")).length<3||0==Ng[0]&&(Ng[1]<3||3==Ng[1]&&0==Ng[2])),qg=function(e,t){var r=t?2:1;return Qg?function(n,i){var o=Jg(arguments.length,1)>r,a=Xg(n)?n:zg(n),s=o?Yg(arguments,r):[],l=o?function(){Ug(a,this,s)}:a;return t?e(l,i):e(l)}:e},$g=Lr,e_=i,t_=qg(e_.setInterval,!0);$g({global:!0,bind:!0,forced:e_.setInterval!==t_},{setInterval:t_});var r_=Lr,n_=i,i_=qg(n_.setTimeout,!0);r_({global:!0,bind:!0,forced:n_.setTimeout!==i_},{setTimeout:i_});var o_=r(te.setTimeout),a_=ee,s_=b,l_=ft("match"),u_=function(e){var t;return a_(e)&&(void 0!==(t=e[l_])?!!t:"RegExp"==s_(e))},c_=TypeError,d_=function(e){if(u_(e))throw c_("The method doesn't accept regular expressions");return e},f_=ft("match"),h_=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[f_]=!1,"/./"[e](t)}catch(n){}}return!1},p_=Lr,v_=k;L.f;var m_=jr,y_=Kn,g_=d_,__=Y,b_=h_,w_=v_("".startsWith),S_=v_("".slice),k_=Math.min;p_({target:"String",proto:!0,forced:!b_("startsWith")},{startsWith:function(e){var t=y_(__(this));g_(e);var r=m_(k_(arguments.length>1?arguments[1]:void 0,t.length)),n=y_(e);return w_?w_(t,n,r):S_(t,r,r+n.length)===n}});var R_=jc("String").startsWith,T_=se,E_=R_,x_=String.prototype,L_=r((function(e){var t=e.startsWith;return"string"==typeof e||e===x_||T_(x_,e)&&t===x_.startsWith?E_:t})),C_=o,O_=ft("iterator"),I_=!C_((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),!e.toJSON||!t.size&&true||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[O_]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),P_=C,D_=m,A_=P,F_=o,Z_=pi,j_=to,V_=D,W_=Je,M_=U,N_=Object.assign,G_=Object.defineProperty,H_=D_([].concat),U_=!N_||F_((function(){if(P_&&1!==N_({b:1},N_(G_({},"a",{enumerable:!0,get:function(){G_(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!=N_({},e)[r]||Z_(N_({},t)).join("")!=n}))?function(e,t){for(var r=W_(e),n=arguments.length,i=1,o=j_.f,a=V_.f;n>i;)for(var s,l=M_(arguments[i++]),u=o?H_(Z_(l),o(l)):Z_(l),c=u.length,d=0;c>d;)s=u[d++],P_&&!A_(a,l,s)||(r[s]=l[s]);return r}:N_,X_=m,B_=2147483647,K_=/[^\0-\u007E]/,Y_=/[.\u3002\uFF0E\uFF61]/g,J_="Overflow: input needs wider integers to process",z_=RangeError,Q_=X_(Y_.exec),q_=Math.floor,$_=String.fromCharCode,eb=X_("".charCodeAt),tb=X_([].join),rb=X_([].push),nb=X_("".replace),ib=X_("".split),ob=X_("".toLowerCase),ab=function(e){return e+22+75*(e<26)},sb=function(e,t,r){var n=0;for(e=r?q_(e/700):e>>1,e+=q_(e/t);e>455;)e=q_(e/35),n+=36;return q_(n+36*e/(e+38))},lb=function(e){var t=[];e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=eb(e,r++);if(i>=55296&&i<=56319&&r<n){var o=eb(e,r++);56320==(64512&o)?rb(t,((1023&i)<<10)+(1023&o)+65536):(rb(t,i),r--)}else rb(t,i)}return t}(e);var r,n,i=e.length,o=128,a=0,s=72;for(r=0;r<e.length;r++)(n=e[r])<128&&rb(t,$_(n));var l=t.length,u=l;for(l&&rb(t,"-");u<i;){var c=B_;for(r=0;r<e.length;r++)(n=e[r])>=o&&n<c&&(c=n);var d=u+1;if(c-o>q_((B_-a)/d))throw z_(J_);for(a+=(c-o)*d,o=c,r=0;r<e.length;r++){if((n=e[r])<o&&++a>B_)throw z_(J_);if(n==o){for(var f=a,h=36;;){var p=h<=s?1:h>=s+26?26:h-s;if(f<p)break;var v=f-p,m=36-p;rb(t,$_(ab(p+v%m))),f=q_(v/m),h+=36}rb(t,$_(ab(f))),s=sb(a,d,u==l),a=0,u++}}a++,o++}return tb(t,"")},ub=no,cb=function(e,t,r){for(var n in t)r&&r.unsafe&&e[n]?e[n]=t[n]:ub(e,n,t[n],r);return e},db=Ji,fb=Math.floor,hb=function(e,t){var r=e.length,n=fb(r/2);return r<8?pb(e,t):vb(e,hb(db(e,0,n),t),hb(db(e,n),t),t)},pb=function(e,t){for(var r,n,i=e.length,o=1;o<i;){for(n=o,r=e[o];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==o++&&(e[n]=r)}return e},vb=function(e,t,r,n){for(var i=t.length,o=r.length,a=0,s=0;a<i||s<o;)e[a+s]=a<i&&s<o?n(t[a],r[s])<=0?t[a++]:r[s++]:a<i?t[a++]:r[s++];return e},mb=hb,yb=Lr,gb=i,_b=P,bb=m,wb=C,Sb=I_,kb=no,Rb=oo,Tb=cb,Eb=Oo,xb=Gl,Lb=Bo,Cb=dh,Ob=x,Ib=qe,Pb=zt,Db=en,Ab=rr,Fb=ee,Zb=Kn,jb=Wi,Vb=W,Wb=mf,Mb=Cc,Nb=Sh,Gb=mb,Hb=ft("iterator"),Ub="URLSearchParams",Xb=Ub+"Iterator",Bb=Lb.set,Kb=Lb.getterFor(Ub),Yb=Lb.getterFor(Xb),Jb=Object.getOwnPropertyDescriptor,zb=function(e){if(!wb)return gb[e];var t=Jb(gb,e);return t&&t.value},Qb=zb("fetch"),qb=zb("Request"),$b=zb("Headers"),ew=qb&&qb.prototype,tw=$b&&$b.prototype,rw=gb.RegExp,nw=gb.TypeError,iw=gb.decodeURIComponent,ow=gb.encodeURIComponent,aw=bb("".charAt),sw=bb([].join),lw=bb([].push),uw=bb("".replace),cw=bb([].shift),dw=bb([].splice),fw=bb("".split),hw=bb("".slice),pw=/\+/g,vw=Array(4),mw=function(e){return vw[e-1]||(vw[e-1]=rw("((?:%[\\da-f]{2}){"+e+"})","gi"))},yw=function(e){try{return iw(e)}catch(oD){return e}},gw=function(e){var t=uw(e,pw," "),r=4;try{return iw(t)}catch(oD){for(;r;)t=uw(t,mw(r--),yw);return t}},_w=/[!'()~]|%20/g,bw={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ww=function(e){return bw[e]},Sw=function(e){return uw(ow(e),_w,ww)},kw=xb((function(e,t){Bb(this,{type:Xb,iterator:Wb(Kb(e).entries),kind:t})}),"Iterator",(function(){var e=Yb(this),t=e.kind,r=e.iterator.next(),n=r.value;return r.done||(r.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),r}),!0),Rw=function(e){this.entries=[],this.url=null,void 0!==e&&(Fb(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===aw(e,0)?hw(e,1):e:Zb(e)))};Rw.prototype={type:Ub,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,o,a,s,l=Mb(e);if(l)for(r=(t=Wb(e,l)).next;!(n=_b(r,t)).done;){if(o=(i=Wb(Ab(n.value))).next,(a=_b(o,i)).done||(s=_b(o,i)).done||!_b(o,i).done)throw nw("Expected sequence with length 2");lw(this.entries,{key:Zb(a.value),value:Zb(s.value)})}else for(var u in e)Ib(e,u)&&lw(this.entries,{key:u,value:Zb(e[u])})},parseQuery:function(e){if(e)for(var t,r,n=fw(e,"&"),i=0;i<n.length;)(t=n[i++]).length&&(r=fw(t,"="),lw(this.entries,{key:gw(cw(r)),value:gw(sw(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],lw(r,Sw(e.key)+"="+Sw(e.value));return sw(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Tw=function(){Cb(this,Ew);var e=Bb(this,new Rw(arguments.length>0?arguments[0]:void 0));wb||(this.length=e.entries.length)},Ew=Tw.prototype;if(Tb(Ew,{append:function(e,t){Nb(arguments.length,2);var r=Kb(this);lw(r.entries,{key:Zb(e),value:Zb(t)}),wb||this.length++,r.updateURL()},delete:function(e){Nb(arguments.length,1);for(var t=Kb(this),r=t.entries,n=Zb(e),i=0;i<r.length;)r[i].key===n?dw(r,i,1):i++;wb||(this.length=r.length),t.updateURL()},get:function(e){Nb(arguments.length,1);for(var t=Kb(this).entries,r=Zb(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){Nb(arguments.length,1);for(var t=Kb(this).entries,r=Zb(e),n=[],i=0;i<t.length;i++)t[i].key===r&&lw(n,t[i].value);return n},has:function(e){Nb(arguments.length,1);for(var t=Kb(this).entries,r=Zb(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){Nb(arguments.length,1);for(var r,n=Kb(this),i=n.entries,o=!1,a=Zb(e),s=Zb(t),l=0;l<i.length;l++)(r=i[l]).key===a&&(o?dw(i,l--,1):(o=!0,r.value=s));o||lw(i,{key:a,value:s}),wb||(this.length=i.length),n.updateURL()},sort:function(){var e=Kb(this);Gb(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=Kb(this).entries,n=Pb(e,arguments.length>1?arguments[1]:void 0),i=0;i<r.length;)n((t=r[i++]).value,t.key,this)},keys:function(){return new kw(this,"keys")},values:function(){return new kw(this,"values")},entries:function(){return new kw(this,"entries")}},{enumerable:!0}),kb(Ew,Hb,Ew.entries,{name:"entries"}),kb(Ew,"toString",(function(){return Kb(this).serialize()}),{enumerable:!0}),wb&&Rb(Ew,"size",{get:function(){return Kb(this).entries.length},configurable:!0,enumerable:!0}),Eb(Tw,Ub),yb({global:!0,constructor:!0,forced:!Sb},{URLSearchParams:Tw}),!Sb&&Ob($b)){var xw=bb(tw.has),Lw=bb(tw.set),Cw=function(e){if(Fb(e)){var t,r=e.body;if(Db(r)===Ub)return t=e.headers?new $b(e.headers):new $b,xw(t,"content-type")||Lw(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),jb(e,{body:Vb(0,Zb(r)),headers:Vb(0,t)})}return e};if(Ob(Qb)&&yb({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return Qb(e,arguments.length>1?Cw(arguments[1]):{})}}),Ob(qb)){var Ow=function(e){return Cb(this,ew),new qb(e,arguments.length>1?Cw(arguments[1]):{})};ew.constructor=Ow,Ow.prototype=ew,yb({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Ow})}}var Iw,Pw=Lr,Dw=C,Aw=I_,Fw=i,Zw=zt,jw=m,Vw=no,Ww=oo,Mw=dh,Nw=qe,Gw=U_,Hw=yg,Uw=Ji,Xw=dc.codeAt,Bw=function(e){var t,r,n=[],i=ib(nb(ob(e),Y_,"."),".");for(t=0;t<i.length;t++)r=i[t],rb(n,Q_(K_,r)?"xn--"+lb(r):r);return tb(n,".")},Kw=Kn,Yw=Oo,Jw=Sh,zw={URLSearchParams:Tw,getState:Kb},Qw=Bo,qw=Qw.set,$w=Qw.getterFor("URL"),eS=zw.URLSearchParams,tS=zw.getState,rS=Fw.URL,nS=Fw.TypeError,iS=Fw.parseInt,oS=Math.floor,aS=Math.pow,sS=jw("".charAt),lS=jw(/./.exec),uS=jw([].join),cS=jw(1..toString),dS=jw([].pop),fS=jw([].push),hS=jw("".replace),pS=jw([].shift),vS=jw("".split),mS=jw("".slice),yS=jw("".toLowerCase),gS=jw([].unshift),_S="Invalid scheme",bS="Invalid host",wS="Invalid port",SS=/[a-z]/i,kS=/[\d+-.a-z]/i,RS=/\d/,TS=/^0x/i,ES=/^[0-7]+$/,xS=/^\d+$/,LS=/^[\da-f]+$/i,CS=/[\0\t\n\r #%/:<>?@[\\\]^|]/,OS=/[\0\t\n\r #/:<>?@[\\\]^|]/,IS=/^[\u0000-\u0020]+/,PS=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,DS=/[\t\n\r]/g,AS=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)gS(t,e%256),e=oS(e/256);return uS(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,i=0,o=0;o<8;o++)0!==e[o]?(i>r&&(t=n,r=i),n=null,i=0):(null===n&&(n=o),++i);return i>r&&(t=n,r=i),t}(e),r=0;r<8;r++)i&&0===e[r]||(i&&(i=!1),n===r?(t+=r?":":"::",i=!0):(t+=cS(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},FS={},ZS=Gw({},FS,{" ":1,'"':1,"<":1,">":1,"`":1}),jS=Gw({},ZS,{"#":1,"?":1,"{":1,"}":1}),VS=Gw({},jS,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),WS=function(e,t){var r=Xw(e,0);return r>32&&r<127&&!Nw(t,e)?e:encodeURIComponent(e)},MS={ftp:21,file:null,http:80,https:443,ws:80,wss:443},NS=function(e,t){var r;return 2==e.length&&lS(SS,sS(e,0))&&(":"==(r=sS(e,1))||!t&&"|"==r)},GS=function(e){var t;return e.length>1&&NS(mS(e,0,2))&&(2==e.length||"/"===(t=sS(e,2))||"\\"===t||"?"===t||"#"===t)},HS=function(e){return"."===e||"%2e"===yS(e)},US={},XS={},BS={},KS={},YS={},JS={},zS={},QS={},qS={},$S={},ek={},tk={},rk={},nk={},ik={},ok={},ak={},sk={},lk={},uk={},ck={},dk=function(e,t,r){var n,i,o,a=Kw(e);if(t){if(i=this.parse(a))throw nS(i);this.searchParams=null}else{if(void 0!==r&&(n=new dk(r,!0)),i=this.parse(a,null,n))throw nS(i);(o=tS(new eS)).bindURL(this),this.searchParams=o}};dk.prototype={type:"URL",parse:function(e,t,r){var n,i,o,a,s,l=this,u=t||US,c=0,d="",f=!1,h=!1,p=!1;for(e=Kw(e),t||(l.scheme="",l.username="",l.password="",l.host=null,l.port=null,l.path=[],l.query=null,l.fragment=null,l.cannotBeABaseURL=!1,e=hS(e,IS,""),e=hS(e,PS,"$1")),e=hS(e,DS,""),n=Hw(e);c<=n.length;){switch(i=n[c],u){case US:if(!i||!lS(SS,i)){if(t)return _S;u=BS;continue}d+=yS(i),u=XS;break;case XS:if(i&&(lS(kS,i)||"+"==i||"-"==i||"."==i))d+=yS(i);else{if(":"!=i){if(t)return _S;d="",u=BS,c=0;continue}if(t&&(l.isSpecial()!=Nw(MS,d)||"file"==d&&(l.includesCredentials()||null!==l.port)||"file"==l.scheme&&!l.host))return;if(l.scheme=d,t)return void(l.isSpecial()&&MS[l.scheme]==l.port&&(l.port=null));d="","file"==l.scheme?u=nk:l.isSpecial()&&r&&r.scheme==l.scheme?u=KS:l.isSpecial()?u=QS:"/"==n[c+1]?(u=YS,c++):(l.cannotBeABaseURL=!0,fS(l.path,""),u=lk)}break;case BS:if(!r||r.cannotBeABaseURL&&"#"!=i)return _S;if(r.cannotBeABaseURL&&"#"==i){l.scheme=r.scheme,l.path=Uw(r.path),l.query=r.query,l.fragment="",l.cannotBeABaseURL=!0,u=ck;break}u="file"==r.scheme?nk:JS;continue;case KS:if("/"!=i||"/"!=n[c+1]){u=JS;continue}u=qS,c++;break;case YS:if("/"==i){u=$S;break}u=sk;continue;case JS:if(l.scheme=r.scheme,i==Iw)l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,l.path=Uw(r.path),l.query=r.query;else if("/"==i||"\\"==i&&l.isSpecial())u=zS;else if("?"==i)l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,l.path=Uw(r.path),l.query="",u=uk;else{if("#"!=i){l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,l.path=Uw(r.path),l.path.length--,u=sk;continue}l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,l.path=Uw(r.path),l.query=r.query,l.fragment="",u=ck}break;case zS:if(!l.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,u=sk;continue}u=$S}else u=qS;break;case QS:if(u=qS,"/"!=i||"/"!=sS(d,c+1))continue;c++;break;case qS:if("/"!=i&&"\\"!=i){u=$S;continue}break;case $S:if("@"==i){f&&(d="%40"+d),f=!0,o=Hw(d);for(var v=0;v<o.length;v++){var m=o[v];if(":"!=m||p){var y=WS(m,VS);p?l.password+=y:l.username+=y}else p=!0}d=""}else if(i==Iw||"/"==i||"?"==i||"#"==i||"\\"==i&&l.isSpecial()){if(f&&""==d)return"Invalid authority";c-=Hw(d).length+1,d="",u=ek}else d+=i;break;case ek:case tk:if(t&&"file"==l.scheme){u=ok;continue}if(":"!=i||h){if(i==Iw||"/"==i||"?"==i||"#"==i||"\\"==i&&l.isSpecial()){if(l.isSpecial()&&""==d)return bS;if(t&&""==d&&(l.includesCredentials()||null!==l.port))return;if(a=l.parseHost(d))return a;if(d="",u=ak,t)return;continue}"["==i?h=!0:"]"==i&&(h=!1),d+=i}else{if(""==d)return bS;if(a=l.parseHost(d))return a;if(d="",u=rk,t==tk)return}break;case rk:if(!lS(RS,i)){if(i==Iw||"/"==i||"?"==i||"#"==i||"\\"==i&&l.isSpecial()||t){if(""!=d){var g=iS(d,10);if(g>65535)return wS;l.port=l.isSpecial()&&g===MS[l.scheme]?null:g,d=""}if(t)return;u=ak;continue}return wS}d+=i;break;case nk:if(l.scheme="file","/"==i||"\\"==i)u=ik;else{if(!r||"file"!=r.scheme){u=sk;continue}if(i==Iw)l.host=r.host,l.path=Uw(r.path),l.query=r.query;else if("?"==i)l.host=r.host,l.path=Uw(r.path),l.query="",u=uk;else{if("#"!=i){GS(uS(Uw(n,c),""))||(l.host=r.host,l.path=Uw(r.path),l.shortenPath()),u=sk;continue}l.host=r.host,l.path=Uw(r.path),l.query=r.query,l.fragment="",u=ck}}break;case ik:if("/"==i||"\\"==i){u=ok;break}r&&"file"==r.scheme&&!GS(uS(Uw(n,c),""))&&(NS(r.path[0],!0)?fS(l.path,r.path[0]):l.host=r.host),u=sk;continue;case ok:if(i==Iw||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&NS(d))u=sk;else if(""==d){if(l.host="",t)return;u=ak}else{if(a=l.parseHost(d))return a;if("localhost"==l.host&&(l.host=""),t)return;d="",u=ak}continue}d+=i;break;case ak:if(l.isSpecial()){if(u=sk,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=Iw&&(u=sk,"/"!=i))continue}else l.fragment="",u=ck;else l.query="",u=uk;break;case sk:if(i==Iw||"/"==i||"\\"==i&&l.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=yS(s=d))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(l.shortenPath(),"/"==i||"\\"==i&&l.isSpecial()||fS(l.path,"")):HS(d)?"/"==i||"\\"==i&&l.isSpecial()||fS(l.path,""):("file"==l.scheme&&!l.path.length&&NS(d)&&(l.host&&(l.host=""),d=sS(d,0)+":"),fS(l.path,d)),d="","file"==l.scheme&&(i==Iw||"?"==i||"#"==i))for(;l.path.length>1&&""===l.path[0];)pS(l.path);"?"==i?(l.query="",u=uk):"#"==i&&(l.fragment="",u=ck)}else d+=WS(i,jS);break;case lk:"?"==i?(l.query="",u=uk):"#"==i?(l.fragment="",u=ck):i!=Iw&&(l.path[0]+=WS(i,FS));break;case uk:t||"#"!=i?i!=Iw&&("'"==i&&l.isSpecial()?l.query+="%27":l.query+="#"==i?"%23":WS(i,FS)):(l.fragment="",u=ck);break;case ck:i!=Iw&&(l.fragment+=WS(i,ZS))}c++}},parseHost:function(e){var t,r,n;if("["==sS(e,0)){if("]"!=sS(e,e.length-1))return bS;if(t=function(e){var t,r,n,i,o,a,s,l=[0,0,0,0,0,0,0,0],u=0,c=null,d=0,f=function(){return sS(e,d)};if(":"==f()){if(":"!=sS(e,1))return;d+=2,c=++u}for(;f();){if(8==u)return;if(":"!=f()){for(t=r=0;r<4&&lS(LS,f());)t=16*t+iS(f(),16),d++,r++;if("."==f()){if(0==r)return;if(d-=r,u>6)return;for(n=0;f();){if(i=null,n>0){if(!("."==f()&&n<4))return;d++}if(!lS(RS,f()))return;for(;lS(RS,f());){if(o=iS(f(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;d++}l[u]=256*l[u]+i,2!=++n&&4!=n||u++}if(4!=n)return;break}if(":"==f()){if(d++,!f())return}else if(f())return;l[u++]=t}else{if(null!==c)return;d++,c=++u}}if(null!==c)for(a=u-c,u=7;0!=u&&a>0;)s=l[u],l[u--]=l[c+a-1],l[c+--a]=s;else if(8!=u)return;return l}(mS(e,1,-1)),!t)return bS;this.host=t}else if(this.isSpecial()){if(e=Bw(e),lS(CS,e))return bS;if(t=function(e){var t,r,n,i,o,a,s,l=vS(e,".");if(l.length&&""==l[l.length-1]&&l.length--,(t=l.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(i=l[n]))return e;if(o=10,i.length>1&&"0"==sS(i,0)&&(o=lS(TS,i)?16:8,i=mS(i,8==o?1:2)),""===i)a=0;else{if(!lS(10==o?xS:8==o?ES:LS,i))return e;a=iS(i,o)}fS(r,a)}for(n=0;n<t;n++)if(a=r[n],n==t-1){if(a>=aS(256,5-t))return null}else if(a>255)return null;for(s=dS(r),n=0;n<r.length;n++)s+=r[n]*aS(256,3-n);return s}(e),null===t)return bS;this.host=t}else{if(lS(OS,e))return bS;for(t="",r=Hw(e),n=0;n<r.length;n++)t+=WS(r[n],FS);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return Nw(MS,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&NS(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,i=e.host,o=e.port,a=e.path,s=e.query,l=e.fragment,u=t+":";return null!==i?(u+="//",e.includesCredentials()&&(u+=r+(n?":"+n:"")+"@"),u+=AS(i),null!==o&&(u+=":"+o)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?a[0]:a.length?"/"+uS(a,"/"):"",null!==s&&(u+="?"+s),null!==l&&(u+="#"+l),u},setHref:function(e){var t=this.parse(e);if(t)throw nS(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new fk(e.path[0]).origin}catch(oD){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+AS(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Kw(e)+":",US)},getUsername:function(){return this.username},setUsername:function(e){var t=Hw(Kw(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=WS(t[r],VS)}},getPassword:function(){return this.password},setPassword:function(e){var t=Hw(Kw(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=WS(t[r],VS)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?AS(e):AS(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,ek)},getHostname:function(){var e=this.host;return null===e?"":AS(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,tk)},getPort:function(){var e=this.port;return null===e?"":Kw(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=Kw(e))?this.port=null:this.parse(e,rk))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+uS(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,ak))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Kw(e))?this.query=null:("?"==sS(e,0)&&(e=mS(e,1)),this.query="",this.parse(e,uk)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=Kw(e))?("#"==sS(e,0)&&(e=mS(e,1)),this.fragment="",this.parse(e,ck)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var fk=function(e){var t=Mw(this,hk),r=Jw(arguments.length,1)>1?arguments[1]:void 0,n=qw(t,new dk(e,!1,r));Dw||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},hk=fk.prototype,pk=function(e,t){return{get:function(){return $w(this)[e]()},set:t&&function(e){return $w(this)[t](e)},configurable:!0,enumerable:!0}};if(Dw&&(Ww(hk,"href",pk("serialize","setHref")),Ww(hk,"origin",pk("getOrigin")),Ww(hk,"protocol",pk("getProtocol","setProtocol")),Ww(hk,"username",pk("getUsername","setUsername")),Ww(hk,"password",pk("getPassword","setPassword")),Ww(hk,"host",pk("getHost","setHost")),Ww(hk,"hostname",pk("getHostname","setHostname")),Ww(hk,"port",pk("getPort","setPort")),Ww(hk,"pathname",pk("getPathname","setPathname")),Ww(hk,"search",pk("getSearch","setSearch")),Ww(hk,"searchParams",pk("getSearchParams")),Ww(hk,"hash",pk("getHash","setHash"))),Vw(hk,"toJSON",(function(){return $w(this).serialize()}),{enumerable:!0}),Vw(hk,"toString",(function(){return $w(this).serialize()}),{enumerable:!0}),rS){var vk=rS.createObjectURL,mk=rS.revokeObjectURL;vk&&Vw(fk,"createObjectURL",Zw(vk,rS)),mk&&Vw(fk,"revokeObjectURL",Zw(mk,rS))}Yw(fk,"URL"),Pw({global:!0,constructor:!0,forced:!Aw,sham:!Dw},{URL:fk});var yk=Lr,gk=o,_k=Sh,bk=Kn,wk=I_,Sk=ae("URL");yk({target:"URL",stat:!0,forced:!(wk&&gk((function(){Sk.canParse()})))},{canParse:function(e){var t=_k(arguments.length,1),r=bk(e),n=t<2||void 0===arguments[1]?void 0:bk(arguments[1]);try{return!!new Sk(r,n)}catch(oD){return!1}}});var kk=r(te.URL),Rk=Lr,Tk=ea.find,Ek="find",xk=!0;Ek in[]&&Array(1)[Ek]((function(){xk=!1})),Rk({target:"Array",proto:!0,forced:xk},{find:function(e){return Tk(this,e,arguments.length>1?arguments[1]:void 0)}});var Lk=jc("Array").find,Ck=se,Ok=Lk,Ik=Array.prototype,Pk=r((function(e){var t=e.find;return e===Ik||Ck(Ik,e)&&t===Ik.find?Ok:t})),Dk=jc("Array").concat,Ak=se,Fk=Dk,Zk=Array.prototype,jk=r((function(e){var t=e.concat;return e===Zk||Ak(Zk,e)&&t===Zk.concat?Fk:t})),Vk=C,Wk=Or,Mk=TypeError,Nk=Object.getOwnPropertyDescriptor,Gk=Vk&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(oD){return oD instanceof TypeError}}(),Hk=xe,Uk=TypeError,Xk=function(e,t){if(!delete e[t])throw Uk("Cannot delete property "+Hk(t)+" of "+Hk(e))},Bk=Lr,Kk=Je,Yk=qn,Jk=Ar,zk=Wr,Qk=Gk?function(e,t){if(Wk(e)&&!Nk(e,"length").writable)throw Mk("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},qk=Nr,$k=En,eR=Xr,tR=Xk,rR=On("splice"),nR=Math.max,iR=Math.min;Bk({target:"Array",proto:!0,forced:!rR},{splice:function(e,t){var r,n,i,o,a,s,l=Kk(this),u=zk(l),c=Yk(e,u),d=arguments.length;for(0===d?r=n=0:1===d?(r=0,n=u-c):(r=d-2,n=iR(nR(Jk(t),0),u-c)),qk(u+r-n),i=$k(l,n),o=0;o<n;o++)(a=c+o)in l&&eR(i,o,l[a]);if(i.length=n,r<n){for(o=c;o<u-n;o++)s=o+r,(a=o+n)in l?l[s]=l[a]:tR(l,s);for(o=u;o>u-n+r;o--)tR(l,o-1)}else if(r>n)for(o=u-n;o>c;o--)s=o+r-1,(a=o+n-1)in l?l[s]=l[a]:tR(l,s);for(o=0;o<r;o++)l[o+c]=arguments[o+2];return Qk(l,u-n+r),i}});var oR=jc("Array").splice,aR=se,sR=oR,lR=Array.prototype,uR=r((function(e){var t=e.splice;return e===lR||aR(lR,e)&&t===lR.splice?sR:t}));Lr({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var cR=r(te.Number.isNaN),dR="\t\n\v\f\r                 \u2028\u2029\ufeff",fR=Y,hR=Kn,pR=dR,vR=m("".replace),mR=RegExp("^["+pR+"]+"),yR=RegExp("(^|[^"+pR+"])["+pR+"]+$"),gR=function(e){return function(t){var r=hR(fR(t));return 1&e&&(r=vR(r,mR,"")),2&e&&(r=vR(r,yR,"$1")),r}},_R={start:gR(1),end:gR(2),trim:gR(3)},bR=i,wR=o,SR=m,kR=Kn,RR=_R.trim,TR=dR,ER=bR.parseInt,xR=bR.Symbol,LR=xR&&xR.iterator,CR=/^[+-]?0x/i,OR=SR(CR.exec),IR=8!==ER(TR+"08")||22!==ER(TR+"0x16")||LR&&!wR((function(){ER(Object(LR))}))?function(e,t){var r=RR(kR(e));return ER(r,t>>>0||(OR(CR,r)?16:10))}:ER;Lr({global:!0,forced:parseInt!=IR},{parseInt:IR});var PR=r(te.parseInt),DR=ea.map;Lr({target:"Array",proto:!0,forced:!On("map")},{map:function(e){return DR(this,e,arguments.length>1?arguments[1]:void 0)}});var AR=jc("Array").map,FR=se,ZR=AR,jR=Array.prototype,VR=r((function(e){var t=e.map;return e===jR||FR(jR,e)&&t===jR.map?ZR:t})),WR=U_;Lr({target:"Object",stat:!0,arity:2,forced:Object.assign!==WR},{assign:WR});var MR=r(te.Object.assign),NR=r(bc),GR=qe,HR=P,UR=ee,XR=rr,BR=function(e){return void 0!==e&&(GR(e,"value")||GR(e,"writable"))},KR=L,YR=Tl;Lr({target:"Reflect",stat:!0},{get:function e(t,r){var n,i,o=arguments.length<3?t:arguments[2];return XR(t)===o?t[r]:(n=KR.f(t,r))?BR(n)?n.value:void 0===n.get?void 0:HR(n.get,o):UR(i=YR(t))?e(i,r,o):void 0}});var JR=r(te.Reflect.get);function zR(e,t){var r=Dc(e);if(Ac){var n=Ac(e);t&&(n=Gc(n).call(n,(function(t){return Qc(e,t).enumerable}))),r.push.apply(r,n)}return r}function QR(e){for(var t=1;t<arguments.length;t++){var r,n,i=null!=arguments[t]?arguments[t]:{};t%2?ud(r=zR(Object(i),!0)).call(r,(function(t){rT(e,t,i[t])})):bd?xd(e,bd(i)):ud(n=zR(Object(i))).call(n,(function(t){Ad(e,t,Qc(i,t))}))}return e}function qR(e){return(qR="function"==typeof kc&&"symbol"==typeof NR?function(e){return typeof e}:function(e){return e&&"function"==typeof kc&&e.constructor===kc&&e!==kc.prototype?"symbol":typeof e})(e)}function $R(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eT(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Ad(e,oT(n.key),n)}}function tT(e,t,r){return t&&eT(e.prototype,t),r&&eT(e,r),Ad(e,"prototype",{writable:!1}),e}function rT(e,t,r){return(t=oT(t))in e?Ad(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nT(e){return function(e){if(ng(e))return iT(e)}(e)||function(e){if(void 0!==kc&&null!=Oc(e)||null!=e["@@iterator"])return _g(e)}(e)||function(e,t){var r;if(!e)return;if("string"==typeof e)return iT(e,t);var n=py(r=Object.prototype.toString.call(e)).call(r,8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return _g(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iT(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 iT(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function oT(e){var t=function(e,t){if("object"!==Sc(e)||null===e)return e;var r=e[bg];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Sc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Sc(t)?t:String(t)}var aT={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,n,o,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new i(n,o||e,a),l=r?r+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 n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}Zd&&(n.prototype=Zd(null),(new n).__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?py(n).call(n,1):n);return Ac?jk(i).call(i,Ac(e)):i},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,a=new Array(o);i<o;i++)a[i]=n[i].fn;return a},s.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},s.prototype.emit=function(e,t,n,i,o,a){var s=r?r+e:e;if(!this._events[s])return!1;var l,u,c=this._events[s],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){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,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,o),!0;case 6:return c.fn.call(c.context,t,n,i,o,a),!0}for(u=1,l=new Array(d-1);u<d;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var f,h=c.length;for(u=0;u<h;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),d){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,n);break;case 4:c[u].fn.call(c[u].context,t,n,i);break;default:if(!l)for(f=1,l=new Array(d-1);f<d;f++)l[f-1]=arguments[f];c[u].fn.apply(c[u].context,l)}}return!0},s.prototype.on=function(e,t,r){return o(this,e,t,r,!1)},s.prototype.once=function(e,t,r){return o(this,e,t,r,!0)},s.prototype.removeListener=function(e,t,n,i){var o=r?r+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||i&&!s.once||n&&s.context!==n||a(this,o);else{for(var l=0,u=[],c=s.length;l<c;l++)(s[l].fn!==t||i&&!s[l].once||n&&s[l].context!==n)&&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=r?r+e:e,this._events[t]&&a(this,t)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s}(aT);var sT=r(aT.exports),lT=ea.some;Lr({target:"Array",proto:!0,forced:!$c("some")},{some:function(e){return lT(this,e,arguments.length>1?arguments[1]:void 0)}});var uT=jc("Array").some,cT=se,dT=uT,fT=Array.prototype,hT=r((function(e){var t=e.some;return e===fT||cT(fT,e)&&t===fT.some?dT:t})),pT=Ar,vT=Kn,mT=Y,yT=RangeError,gT=m,_T=jr,bT=Kn,wT=Y,ST=gT((function(e){var t=vT(mT(this)),r="",n=pT(e);if(n<0||n==1/0)throw yT("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(t+=t))1&n&&(r+=t);return r})),kT=gT("".slice),RT=Math.ceil,TT=function(e){return function(t,r,n){var i,o,a=bT(wT(t)),s=_T(r),l=a.length,u=void 0===n?" ":bT(n);return s<=l||""==u?a:((o=ST(u,RT((i=s-l)/u.length))).length>i&&(o=kT(o,0,i)),e?a+o:o+a)}},ET={start:TT(!1),end:TT(!0)},xT=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(le),LT=ET.start;Lr({target:"String",proto:!0,forced:xT},{padStart:function(e){return LT(this,e,arguments.length>1?arguments[1]:void 0)}});var CT=jc("String").padStart,OT=se,IT=CT,PT=String.prototype,DT=r((function(e){var t=e.padStart;return"string"==typeof e||e===PT||OT(PT,e)&&t===PT.padStart?IT:t})),AT=r(te.setInterval),FT=ea.every;Lr({target:"Array",proto:!0,forced:!$c("every")},{every:function(e){return FT(this,e,arguments.length>1?arguments[1]:void 0)}});var ZT=jc("Array").every,jT=se,VT=ZT,WT=Array.prototype,MT=r((function(e){var t=e.every;return e===WT||jT(WT,e)&&t===WT.every?VT:t})),NT=i,GT=o,HT=Kn,UT=_R.trim,XT=dR,BT=m("".charAt),KT=NT.parseFloat,YT=NT.Symbol,JT=YT&&YT.iterator,zT=1/KT(XT+"-0")!=-1/0||JT&&!GT((function(){KT(Object(JT))}))?function(e){var t=UT(HT(e)),r=KT(t);return 0===r&&"-"==BT(t,0)?-0:r}:KT;Lr({global:!0,forced:parseFloat!=zT},{parseFloat:zT});var QT=r(te.parseFloat),qT=ml.PROPER,$T=o,eE=dR,tE=_R.trim;Lr({target:"String",proto:!0,forced:function(e){return $T((function(){return!!eE[e]()||"​…᠎"!=="​…᠎"[e]()||qT&&eE[e].name!==e}))}("trim")},{trim:function(){return tE(this)}});var rE=jc("String").trim,nE=se,iE=rE,oE=String.prototype,aE=r((function(e){var t=e.trim;return"string"==typeof e||e===oE||nE(oE,e)&&t===oE.trim?iE:t})),sE=le.match(/firefox\/(\d+)/i),lE=!!sE&&+sE[1],uE=/MSIE|Trident/.test(le),cE=le.match(/AppleWebKit\/(\d+)\./),dE=!!cE&&+cE[1],fE=Lr,hE=m,pE=Ie,vE=Je,mE=Wr,yE=Xk,gE=Kn,_E=o,bE=mb,wE=$c,SE=lE,kE=uE,RE=ve,TE=dE,EE=[],xE=hE(EE.sort),LE=hE(EE.push),CE=_E((function(){EE.sort(void 0)})),OE=_E((function(){EE.sort(null)})),IE=wE("sort"),PE=!_E((function(){if(RE)return RE<70;if(!(SE&&SE>3)){if(kE)return!0;if(TE)return TE<603;var e,t,r,n,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)EE.push({k:t+n,v:r})}for(EE.sort((function(e,t){return t.v-e.v})),n=0;n<EE.length;n++)t=EE[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));fE({target:"Array",proto:!0,forced:CE||!OE||!IE||!PE},{sort:function(e){void 0!==e&&pE(e);var t=vE(this);if(PE)return void 0===e?xE(t):xE(t,e);var r,n,i=[],o=mE(t);for(n=0;n<o;n++)n in t&&LE(i,t[n]);for(bE(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:gE(t)>gE(r)?1:-1}}(e)),r=mE(i),n=0;n<r;)t[n]=i[n++];for(;n<o;)yE(t,n++);return t}});var DE=jc("Array").sort,AE=se,FE=DE,ZE=Array.prototype,jE=r((function(e){var t=e.sort;return e===ZE||AE(ZE,e)&&t===ZE.sort?FE:t})),VE=Lr,WE=Date,ME=m(WE.prototype.getTime);VE({target:"Date",stat:!0},{now:function(){return ME(new WE)}});var NE,GE=r(te.Date.now),HE="undefined"!=typeof window&&window.location&&rg(NE=window.location.href).call(NE,"xgplayerdebugger=1")>-1,UE="color: #525252; background-color: #90ee90;",XE="color: #525252; background-color: red;",BE="color: #525252; background-color: yellow; ",KE="%c[xgplayer]",YE={config:{debug:HE?3:0},logInfo:function(e){for(var t,r,n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];this.config.debug>=3&&(r=console).log.apply(r,jk(t=[KE,UE,e]).call(t,i))},logWarn:function(e){for(var t,r,n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];this.config.debug>=1&&(r=console).warn.apply(r,jk(t=[KE,BE,e]).call(t,i))},logError:function(e){var t,r;if(!(this.config.debug<1)){for(var n=this.config.debug>=2?"trace":"error",i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];(r=console)[n].apply(r,jk(t=[KE,XE,e]).call(t,o))}}},JE=function(){function e(t){$R(this,e),this.bufferedList=t}return tT(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}(),zE={};zE.createDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",r=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]:"",o=document.createElement(t);return o.className=i,o.innerHTML=r,ud(e=Dc(n)).call(e,(function(e){var r=e,i=n[e];"video"===t||"audio"===t||"live-video"===t?i&&o.setAttribute(r,i):o.setAttribute(r,i)})),o},zE.createDomFromHtml=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";try{var n=document.createElement("div");n.innerHTML=e;var i=n.children;if(n=null,i.length>0){var o;if(i=i[0],r&&zE.addClass(i,r),t)ud(o=Dc(t)).call(o,(function(e){i.setAttribute(e,t[e])}));return i}return null}catch(a){return YE.logError("util.createDomFromHtml",a),null}},zE.hasClass=function(e,t){if(!e||!t)return!1;try{return hT(Array.prototype).call(e.classList,(function(e){return e===t}))}catch(n){var r=e.className&&"object"===qR(e.className)?e.getAttribute("class"):e.className;return r&&!!r.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}},zE.addClass=function(e,t){if(e&&t)try{var r;ud(r=t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(r,(function(t){t&&e.classList.add(t)}))}catch(n){zE.hasClass(e,t)||(e.className&&"object"===qR(e.className)?e.setAttribute("class",e.getAttribute("class")+" "+t):e.className+=" "+t)}},zE.removeClass=function(e,t){if(e&&t)try{var r;ud(r=t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(r,(function(t){t&&e.classList.remove(t)}))}catch(i){var n;if(zE.hasClass(e,t))ud(n=t.split(/\s+/g)).call(n,(function(t){var r=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className&&"object"===qR(e.className)?e.setAttribute("class",e.getAttribute("class").replace(r," ")):e.className=e.className.replace(r," ")}))}},zE.toggleClass=function(e,t){var r;e&&ud(r=t.split(/\s+/g)).call(r,(function(t){zE.hasClass(e,t)?zE.removeClass(e,t):zE.addClass(e,t)}))},zE.classNames=function(){for(var e=arguments,t=[],r=function(r){if("String"===zE.typeOf(e[r]))t.push(e[r]);else if("Object"===zE.typeOf(e[r])){var n;VR(n=Dc(e[r])).call(n,(function(n){e[r][n]&&t.push(n)}))}},n=0;n<arguments.length;n++)r(n);return t.join(" ")},zE.findDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,r=arguments.length>1?arguments[1]:void 0;try{e=t.querySelector(r)}catch(n){YE.logError("util.findDom",n),0===rg(r).call(r,"#")&&(e=t.getElementById(py(r).call(r,1)))}return e},zE.getCss=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,!1)[t]},zE.padStart=function(e,t,r){for(var n=String(r),i=t>>0,o=Math.ceil(i/n.length),a=[],s=String(e);o--;)a.push(n);return a.join("").substring(0,i-s.length)+s},zE.format=function(e){if(window.isNaN(e))return"";e=Math.round(e);var t=DT(zE).call(zE,Math.floor(e/3600),2,0),r=DT(zE).call(zE,Math.floor((e-3600*t)/60),2,0),n=DT(zE).call(zE,Math.floor(e-3600*t-60*r),2,0);return("00"===t?[r,n]:[t,r,n]).join(":")},zE.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},zE.typeOf=function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},zE.deepCopy=function(e,t){var r;if("Object"===zE.typeOf(t)&&"Object"===zE.typeOf(e))return ud(r=Dc(t)).call(r,(function(r){if("Object"!==zE.typeOf(t[r])||t[r]instanceof Node)if("Array"===zE.typeOf(t[r])){var n;e[r]="Array"===zE.typeOf(e[r])?jk(n=e[r]).call(n,t[r]):t[r]}else e[r]=t[r];else void 0===e[r]||void 0===e[r]?e[r]=t[r]:zE.deepCopy(e[r],t[r])})),e},zE.deepMerge=function(e,t){var r;return VR(r=Dc(t)).call(r,(function(r){var n;"Array"===zE.typeOf(t[r])&&"Array"===zE.typeOf(e[r])?"Array"===zE.typeOf(e[r])&&(n=e[r]).push.apply(n,nT(t[r])):zE.typeOf(e[r])!==zE.typeOf(t[r])||null===e[r]||"Object"!==zE.typeOf(e[r])||t[r]instanceof window.Node?null!==t[r]&&(e[r]=t[r]):zE.deepMerge(e[r],t[r])})),e},zE.getBgImage=function(e){var t=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;if(!t||"none"===t)return"";var r=document.createElement("a");return r.href=t.replace(/url\("|"\)/g,""),r.href},zE.copyDom=function(e){if(e&&1===e.nodeType){var t=document.createElement(e.tagName);return ud(Array.prototype).call(e.attributes,(function(e){t.setAttribute(e.name,e.value)})),e.innerHTML&&(t.innerHTML=e.innerHTML),t}return""},zE.setInterval=function(e,t,r,n){e._interval[t]||(e._interval[t]=AT(Iy(r).call(r,e),n))},zE.clearInterval=function(e,t){clearInterval(e._interval[t]),e._interval[t]=null},zE.setTimeout=function(e,t,r){e._timers||(e._timers=[]);var n=o_((function(){t(),zE.clearTimeout(e,n)}),r);return e._timers.push(n),n},zE.clearTimeout=function(e,t){var r=e._timers;if("Array"===zE.typeOf(r)){for(var n=0;n<r.length;n++)if(r[n]===t){uR(r).call(r,n,1),clearTimeout(t);break}}else clearTimeout(t)},zE.clearAllTimers=function(e){var t=e._timers;"Array"===zE.typeOf(t)&&(VR(t).call(t,(function(e){clearTimeout(e)})),e._timerIds=[])},zE.createImgBtn=function(e,t,r,n){var i,o,a,s,l,u,c,d,f,h,p,v,m=zE.createDom("xg-".concat(e),"",{},"xgplayer-".concat(e,"-img"));(m.style.backgroundImage='url("'.concat(t,'")'),r&&n)&&(MT(i=["px","rem","em","pt","dp","vw","vh","vm","%"]).call(i,(function(e){var t,i;return!(rg(r).call(r,e)>-1&&rg(n).call(n,e)>-1)||(c=QT(aE(t=py(r).call(r,0,rg(r).call(r,e))).call(t)),d=QT(aE(i=py(n).call(n,0,rg(n).call(n,e))).call(i)),f=e,!1)})),m.style.width=jk(o="".concat(c)).call(o,f),m.style.height=jk(a="".concat(d)).call(a,f),m.style.backgroundSize=jk(s=jk(l=jk(u="".concat(c)).call(u,f," ")).call(l,d)).call(s,f),m.style.margin="start"===e?jk(h=jk(p=jk(v="-".concat(d/2)).call(v,f," auto auto -")).call(p,c/2)).call(h,f):"auto 5px auto 5px");return m},zE.Hex2RGBA=function(e,t){var r,n=[];if(/^\#[0-9A-F]{3}$/i.test(e)){var i="#";e.replace(/[0-9A-F]/gi,(function(e){i+=e+e})),e=i}return/^#[0-9A-F]{6}$/i.test(e)?(e.replace(/[0-9A-F]{2}/gi,(function(e){n.push(PR(e,16))})),jk(r="rgba(".concat(n.join(","),", ")).call(r,t,")")):"rgba(255, 255, 255, 0.1)"},zE.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},zE.checkIsFunction=function(e){return e&&"function"==typeof e},zE.checkIsObject=function(e){return null!==e&&"object"===qR(e)},zE.hide=function(e){e.style.display="none"},zE.show=function(e,t){e.style.display=t||"block"},zE.isUndefined=function(e){if(null==e)return!0},zE.isNotNull=function(e){return!(null==e)},zE.setStyleFromCsstext=function(e,t){if(t)if("String"===zE.typeOf(t)){var r=t.replace(/\s+/g,"").split(";");VR(r).call(r,(function(t){if(t){var r=t.split(":");r.length>1&&(e.style[r[0]]=r[1])}}))}else{var n;VR(n=Dc(t)).call(n,(function(r){e.style[r]=t[r]}))}},zE.filterStyleFromText=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["width","height","top","left","bottom","right","position","z-index","padding","margin","transform"],n=e.style.cssText;if(!n)return{};var i=n.replace(/\s+/g,"").split(";"),o={},a={};return VR(i).call(i,(function(e){if(e){var t=e.split(":");t.length>1&&(!function(e,t){for(var r=0,n=t.length;r<n;r++)if(rg(e).call(e,t[r])>-1)return!0;return!1}(t[0],r)?a[t[0]]=t[1]:o[t[0]]=t[1])}})),e.setAttribute("style",""),VR(t=Dc(a)).call(t,(function(t){e.style[t]=a[t]})),o},zE.getStyleFromCsstext=function(e){var t=e.style.cssText;if(!t)return{};var r=t.replace(/\s+/g,"").split(";"),n={};return VR(r).call(r,(function(e){if(e){var t=e.split(":");t.length>1&&(n[t[0]]=t[1])}})),n},zE.preloadImg=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(e){var n=new window.Image;n.onload=function(e){n=null,t&&t(e)},n.onerror=function(e){n=null,r&&r(e)},n.src=e}},zE.stopPropagation=function(e){e&&e.stopPropagation()},zE.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},zE.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},zE.checkTouchSupport=function(){return"ontouchstart"in window},zE.getBuffered2=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,r=[],n=0;n<e.length;n++)r.push({start:e.start(n)<.5?0:e.start(n),end:e.end(n)});jE(r).call(r,(function(e,t){var r=e.start-t.start;return r||t.end-e.end}));var i=[];if(t)for(var o=0;o<r.length;o++){var a=i.length;if(a){var s=i[a-1].end;r[o].start-s<t?r[o].end>s&&(i[a-1].end=r[o].end):i.push(r[o])}else i.push(r[o])}else i=r;return new JE(i)},zE.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}},zE.requestAnimationFrame=function(e){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(t)return t(e)},zE.getHostFromUrl=function(e){if("String"!==zE.typeOf(e))return"";var t=e.split("/"),r="";return t.length>3&&t[2]&&(r=t[2]),r},zE.cancelAnimationFrame=function(e){var t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;t&&t(e)},zE.isMSE=function(e){return e.media&&(e=e.media),!!(e&&e instanceof HTMLMediaElement)&&(/^blob/.test(e.currentSrc)||/^blob/.test(e.src))},zE.isBlob=function(e){return"string"==typeof e&&/^blob/.test(e)},zE.generateSessionId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(new Date).getTime();try{e=PR(e)}catch(r){e=0}return t+=e,window.performance&&"function"==typeof window.performance.now&&(t+=PR(window.performance.now())),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:3&r|8).toString(16)}))},zE.createEvent=function(e){var t;return"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},zE.adjustTimeByDuration=function(e,t,r){return t&&e&&(e>t||r&&e<t)?t:e},zE.createPositionBar=function(e,t){var r=zE.createDom("xg-bar","",{"data-index":-1},e);return t.appendChild(r),r},zE.getTransformStyle=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0,scale:1,rotate:0},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n={scale:"".concat(t.scale||1),translate:jk(e="".concat(t.x||0,"%, ")).call(e,t.y||0,"%"),rotate:"".concat(t.rotate||0,"deg")},i=Dc(n);return ud(i).call(i,(function(e){var t,i=new RegExp("".concat(e,"\\([^\\(]+\\)"),"g"),o=jk(t="".concat(e,"(")).call(t,n[e],")");i.test(r)?(i.lastIndex=-1,r=r.replace(i,o)):r+="".concat(o," ")})),r},zE.convertDeg=function(e){return Math.abs(e)<=1?360*e:e%360},zE.getIndexByTime=function(e,t){var r=t.length,n=-1;if(r<1)return n;if(e<=t[0].end||r<2)n=0;else if(e>t[r-1].end)n=r-1;else for(var i=1;i<r;i++)if(e>t[i-1].end&&e<=t[i].end){n=i;break}return n},zE.getOffsetCurrentTime=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,n=-1;if((n=r>=0&&r<t.length?r:zE.getIndexByTime(e,t))<0)return-1;var i=t.length,o=t[n],a=o.start,s=o.end,l=o.cTime,u=o.offset;return e<a?l:e>=a&&e<=s?e-u:e>s&&n>=i-1?s:-1},zE.getCurrentTimeByOffset=function(e,t){var r=-1;if(!t||t.length<0)return e;for(var n=0;n<t.length;n++)if(e<=t[n].duration){r=n;break}if(-1!==r){var i=t[r].start;return r-1<0?i+e:i+(e-t[r-1].duration)}return e};var QE="3.0.21-rc.21",qE={1:5101,2:5102,3:5103,4:5104,5:5105,6:5106},$E=tT((function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{errorType:"",errorCode:0,errorMessage:"",originError:"",ext:{},mediaError:null};$R(this,e);var n=t&&t.i18n?t.i18n.ERROR_TYPES:null;if(t.media){var i,o=r.mediaError?r.mediaError:t.media.error||{},a=t.duration,s=t.currentTime,l=t.ended,u=t.src,c=t.currentSrc,d=t.media,f=d.readyState,h=d.networkState,p=r.errorCode||o.code;qE[p]&&(p=qE[p]);var v={playerVersion:QE,currentTime:s,duration:a,ended:l,readyState:f,networkState:h,src:u||c,errorType:r.errorType,errorCode:p,message:r.errorMessage||o.message,mediaError:o,originError:r.originError?r.originError.stack:"",host:zE.getHostFromUrl(u||c)};return r.ext&&VR(i=Dc(r.ext)).call(i,(function(e){v[e]=r.ext[e]})),v}if(arguments.length>1){for(var m={playerVersion:QE,domain:document.domain},y=["errorType","currentTime","duration","networkState","readyState","src","currentSrc","ended","errd","errorCode","mediaError"],g=0;g<arguments.length;g++)m[y[g]]=arguments[g];return m.ex=n?(n[arguments[0]]||{}).msg:"",m}}));function ex(e,t,r){for(var n,i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];var s,l=t.call.apply(t,jk(n=[e]).call(n,o));r&&"function"==typeof r&&(l&&l.then?l.then((function(){for(var t,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];r.call.apply(r,jk(t=[e]).call(t,i))})):r.call.apply(r,jk(s=[e]).call(s,o)))}function tx(e,t){var r,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),Iy(r=function(){var r,i=arguments,o=this;if(n.pre)try{var a,s;(s=n.pre).call.apply(s,jk(a=[this]).call(a,py(Array.prototype).call(arguments)))}catch(v){var l,u;throw v.message=jk(l=jk(u="[pluginName: ".concat(this.pluginName,":")).call(u,e,":pre error] >> ")).call(l,v.message),v}if(this.__hooks&&this.__hooks[e])try{var c,d=ox(this,e,t);if(d)if(d.then)d.then((function(e){var r;!1!==e&&ex.apply(void 0,jk(r=[o,t,n.next]).call(r,nT(i)))})).catch((function(e){throw e}));else ex.apply(void 0,jk(c=[this,t,n.next]).call(c,py(Array.prototype).call(arguments)));else if(void 0===d){var f;ex.apply(void 0,jk(f=[this,t,n.next]).call(f,py(Array.prototype).call(arguments)))}}catch(v){var h,p;throw v.message=jk(h=jk(p="[pluginName: ".concat(this.pluginName,":")).call(p,e,"] >> ")).call(h,v.message),v}else ex.apply(void 0,jk(r=[this,t,n.next]).call(r,py(Array.prototype).call(arguments)))}).call(r,this)}function rx(e,t){var r=this.__hooks;if(!r||!ng(r[e]))return-1;for(var n=r[e],i=0;i<n.length;i++)if(n[i]===t)return i;return-1}function nx(e,t){var r=this.__hooks;if(r)return r.hasOwnProperty(e)?(ng(r[e])||(r[e]=[]),-1===rx.call(this,e,t)&&r[e].push(t),!0):(console.warn("has no supported hook which name [".concat(e,"]")),!1)}function ix(e,t){var r=this.__hooks;if(r)if(ng(r[e])){var n=r[e],i=rx.call(this,e,t);-1!==i&&uR(n).call(n,i,1)}else r[e]&&(r[e]=null)}function ox(e,t,r){for(var n=arguments.length,i=new Array(n>3?n-3:0),o=3;o<n;o++)i[o-3]=arguments[o];if(e.__hooks&&ng(e.__hooks[t])){var a,s=e.__hooks[t],l=-1;return function e(t,r,n){for(var i,o,a=arguments.length,u=new Array(a>3?a-3:0),c=3;c<a;c++)u[c-3]=arguments[c];if(l++,0===s.length||l===s.length)return n.call.apply(n,jk(o=[t,t]).call(o,u));var d,f=s[l],h=f.call.apply(f,jk(i=[t,t]).call(i,u));return h&&h.then?h.then((function(i){var o;return!1===i?null:e.apply(void 0,jk(o=[t,r,n]).call(o,u))})).catch((function(e){console.warn("[runHooks]".concat(r," reject"),e.message)})):!1!==h?e.apply(void 0,jk(d=[t,r,n]).call(d,u)):void 0}.apply(void 0,jk(a=[e,t,r]).call(a,i))}var u;return r.call.apply(r,jk(u=[e,e]).call(u,i))}function ax(e,t){var r;YE.logError(jk(r="[".concat(e,"] event or callback cant be undefined or null when call ")).call(r,t))}var sx=function(){function e(t){$R(this,e),zE.checkIsFunction(this.beforeCreate)&&this.beforeCreate(t),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.__hooks={},t&&VR(t).call(t,(function(t){e.__hooks[t]=null})),Ad(e,"hooks",{get:function(){var t;return e.__hooks&&VR(t=Dc(e.__hooks)).call(t,(function(t){if(e.__hooks[t])return t}))}})}(this),this.__args=t,this.__events={},this.__onceEvents={},this.config=t.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(t)}return tT(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=zE.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 r=this;e&&t&&this.player?"string"==typeof e?(this.__events[e]=t,this.player.on(e,t)):ng(e)&&ud(e).call(e,(function(e){r.__events[e]=t,r.player.on(e,t)})):ax(this.pluginName,"plugin.on(event, callback)")}},{key:"once",value:function(e,t){var r=this;e&&t&&this.player?"string"==typeof e?(this.__onceEvents[e]=t,this.player.once(e,t)):ng(e)&&ud(e).call(e,(function(n){r.__onceEvents[n]=t,r.player.once(e,t)})):ax(this.pluginName,"plugin.once(event, callback)")}},{key:"off",value:function(e,t){var r=this;e&&t&&this.player?"string"==typeof e?(delete this.__events[e],this.player.off(e,t)):ng(e)&&ud(e).call(e,(function(n){delete r.__events[e],r.player.off(n,t)})):ax(this.pluginName,"plugin.off(event, callback)")}},{key:"offAll",value:function(){var e,t=this;ud(e=["__events","__onceEvents"]).call(e,(function(e){var r;ud(r=Dc(t[e])).call(r,(function(r){t[e][r]&&t.off(r,t[e][r]),r&&delete t[e][r]}))})),this.__events={},this.__onceEvents={}}},{key:"emit",value:function(e){var t,r;if(this.player){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];(r=this.player).emit.apply(r,jk(t=[e]).call(t,i))}}},{key:"emitUserAction",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.player){var n=QR(QR({},r),{},{pluginName:this.pluginName});this.player.emitUserAction(e,t,n)}}},{key:"hook",value:function(e,t){var r;return tx.call.apply(tx,jk(r=[this]).call(r,py(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){for(var r,n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return nx.call.apply(nx,jk(r=[this]).call(r,py(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){for(var r,n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return ix.call.apply(ix,jk(r=[this]).call(r,py(Array.prototype).call(arguments)))}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(this.player)return r&&(t.pluginName=r),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,r=this.player,n=this.pluginName;this.offAll(),zE.clearAllTimers(this),zE.checkIsFunction(this.destroy)&&this.destroy(),VR(e=["player","playerConfig","pluginName","logger","__args","__hooks"]).call(e,(function(e){t[e]=null})),r.unRegisterPlugin(n),this.__hooks=null}}],[{key:"defineGetterOrSetter",value:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&Ad(e,r,t[r])}},{key:"defineMethod",value:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&"function"==typeof t[r]&&Ad(e,r,{configurable:!0,value:t[r]})}},{key:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),e}(),lx="xgplayer-isloading",ux="xgplayer-is-error",cx=te,dx=d;cx.JSON||(cx.JSON={stringify:JSON.stringify});var fx=function(e,t,r){return dx(cx.JSON.stringify,null,arguments)},hx=r(fx),px=ni.includes;Lr({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(e){return px(this,e,arguments.length>1?arguments[1]:void 0)}});var vx=jc("Array").includes,mx=Lr,yx=d_,gx=Y,_x=Kn,bx=h_,wx=m("".indexOf);mx({target:"String",proto:!0,forced:!bx("includes")},{includes:function(e){return!!~wx(_x(gx(this)),_x(yx(e)),arguments.length>1?arguments[1]:void 0)}});var Sx=jc("String").includes,kx=se,Rx=vx,Tx=Sx,Ex=Array.prototype,xx=String.prototype,Lx=r((function(e){var t=e.includes;return e===Ex||kx(Ex,e)&&t===Ex.includes?Rx:"string"==typeof e||e===xx||kx(xx,e)&&t===xx.includes?Tx:t})),Cx={exports:{}},Ox=o((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),Ix=o,Px=ee,Dx=b,Ax=Ox,Fx=Object.isExtensible,Zx=Ix((function(){Fx(1)}))||Ax?function(e){return!!Px(e)&&((!Ax||"ArrayBuffer"!=Dx(e))&&(!Fx||Fx(e)))}:Fx,jx=!o((function(){return Object.isExtensible(Object.preventExtensions({}))})),Vx=Lr,Wx=m,Mx=ii,Nx=ee,Gx=qe,Hx=Qt.f,Ux=Mi,Xx=Hi,Bx=Zx,Kx=jx,Yx=!1,Jx=nt("meta"),zx=0,Qx=function(e){Hx(e,Jx,{value:{objectID:"O"+zx++,weakData:{}}})},qx=Cx.exports={enable:function(){qx.enable=function(){},Yx=!0;var e=Ux.f,t=Wx([].splice),r={};r[Jx]=1,e(r).length&&(Ux.f=function(r){for(var n=e(r),i=0,o=n.length;i<o;i++)if(n[i]===Jx){t(n,i,1);break}return n},Vx({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Xx.f}))},fastKey:function(e,t){if(!Nx(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!Gx(e,Jx)){if(!Bx(e))return"F";if(!t)return"E";Qx(e)}return e[Jx].objectID},getWeakData:function(e,t){if(!Gx(e,Jx)){if(!Bx(e))return!0;if(!t)return!1;Qx(e)}return e[Jx].weakData},onFreeze:function(e){return Kx&&Yx&&Bx(e)&&!Gx(e,Jx)&&Qx(e),e}};Mx[Jx]=!0;var $x=Cx.exports,eL=Lr,tL=i,rL=$x,nL=o,iL=mr,oL=Af,aL=dh,sL=x,lL=ee,uL=Oo,cL=Qt.f,dL=ea.forEach,fL=C,hL=Bo.set,pL=Bo.getterFor,vL=Wi,mL=oo,yL=cb,gL=zt,_L=dh,bL=X,wL=Af,SL=pu,kL=vu,RL=lh,TL=C,EL=$x.fastKey,xL=Bo.set,LL=Bo.getterFor,CL={getConstructor:function(e,t,r,n){var i=e((function(e,i){_L(e,o),xL(e,{type:t,index:vL(null),first:void 0,last:void 0,size:0}),TL||(e.size=0),bL(i)||wL(i,e[n],{that:e,AS_ENTRIES:r})})),o=i.prototype,a=LL(t),s=function(e,t,r){var n,i,o=a(e),s=l(e,t);return s?s.value=r:(o.last=s={index:i=EL(t,!0),key:t,value:r,previous:n=o.last,next:void 0,removed:!1},o.first||(o.first=s),n&&(n.next=s),TL?o.size++:e.size++,"F"!==i&&(o.index[i]=s)),e},l=function(e,t){var r,n=a(e),i=EL(t);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key==t)return r};return yL(o,{clear:function(){for(var e=a(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,TL?e.size=0:this.size=0},delete:function(e){var t=this,r=a(t),n=l(t,e);if(n){var i=n.next,o=n.previous;delete r.index[n.index],n.removed=!0,o&&(o.next=i),i&&(i.previous=o),r.first==n&&(r.first=i),r.last==n&&(r.last=o),TL?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=a(this),n=gL(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!l(this,e)}}),yL(o,r?{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)}}),TL&&mL(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(e,t,r){var n=t+" Iterator",i=LL(t),o=LL(n);SL(e,t,(function(e,t){xL(this,{type:n,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?kL("keys"==t?r.key:"values"==t?r.value:[r.key,r.value],!1):(e.target=void 0,kL(void 0,!0))}),r?"entries":"values",!r,!0),RL(t)}};(function(e,t,r){var n,i=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),a=i?"set":"add",s=tL[e],l=s&&s.prototype,u={};if(fL&&sL(s)&&(o||l.forEach&&!nL((function(){(new s).entries().next()})))){var c=(n=t((function(t,r){hL(aL(t,c),{type:e,collection:new s}),null!=r&&oL(r,t[a],{that:t,AS_ENTRIES:i})}))).prototype,d=pL(e);dL(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in l)||o&&"clear"==e||iL(c,e,(function(r,n){var i=d(this).collection;if(!t&&o&&!lL(r))return"get"==e&&void 0;var a=i[e](0===r?0:r,n);return t?this:a}))})),o||cL(c,"size",{configurable:!0,get:function(){return d(this).collection.size}})}else n=r.getConstructor(t,e,i,a),rL.enable();uL(n,e,!1,!0),u[e]=n,eL({global:!0,forced:!0},u),o||r.setStrong(n,e,i)})("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),CL);var OL=te.Map,IL=zt,PL=P,DL=Ie,AL=vh,FL=X,ZL=Af,jL=[].push,VL=function(e){var t,r,n,i,o=arguments.length,a=o>1?arguments[1]:void 0;return AL(this),(t=void 0!==a)&&DL(a),FL(e)?new this:(r=[],t?(n=0,i=IL(a,o>2?arguments[2]:void 0),ZL(e,(function(e){PL(jL,r,i(e,n++))}))):ZL(e,jL,{that:r}),new this(r))};Lr({target:"Map",stat:!0,forced:!0},{from:VL});var WL=Rs,ML=function(){return new this(WL(arguments))};Lr({target:"Map",stat:!0,forced:!0},{of:ML});var NL=xe,GL=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(NL(e)+" is not a map")},HL=function(e,t){return 1==t?function(t,r){return t[e](r)}:function(t,r,n){return t[e](r,n)}},UL=ae("Map"),XL={Map:UL,set:HL("set",2),get:HL("get",1),has:HL("has",1),remove:HL("delete",1),proto:UL.prototype},BL=GL,KL=XL.remove;Lr({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=BL(this),r=!0,n=0,i=arguments.length;n<i;n++)e=KL(t,arguments[n]),r=r&&e;return!!r}});var YL=GL,JL=XL.get,zL=XL.has,QL=XL.set;Lr({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var r,n,i=YL(this);return zL(i,e)?(r=JL(i,e),"update"in t&&(r=t.update(r,e,i),QL(i,e,r)),r):(n=t.insert(e,i),QL(i,e,n),n)}});var qL=P,$L=function(e,t,r){for(var n,i,o=r||e.next;!(n=qL(o,e)).done;)if(void 0!==(i=t(n.value)))return i},eC=function(e,t,r){return r?$L(e.entries(),(function(e){return t(e[1],e[0])})):e.forEach(t)},tC=zt,rC=GL,nC=eC;Lr({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=rC(this),r=tC(e,arguments.length>1?arguments[1]:void 0);return!1!==nC(t,(function(e,n){if(!r(e,n,t))return!1}),!0)}});var iC=zt,oC=GL,aC=eC,sC=XL.Map,lC=XL.set;Lr({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=oC(this),r=iC(e,arguments.length>1?arguments[1]:void 0),n=new sC;return aC(t,(function(e,i){r(e,i,t)&&lC(n,i,e)})),n}});var uC=zt,cC=GL,dC=eC;Lr({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=cC(this),r=uC(e,arguments.length>1?arguments[1]:void 0),n=dC(t,(function(e,n){if(r(e,n,t))return{value:e}}),!0);return n&&n.value}});var fC=zt,hC=GL,pC=eC;Lr({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=hC(this),r=fC(e,arguments.length>1?arguments[1]:void 0),n=pC(t,(function(e,n){if(r(e,n,t))return{key:n}}),!0);return n&&n.key}});var vC=Lr,mC=P,yC=x,gC=Ie,_C=Af,bC=XL.Map,wC=m([].push);vC({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){var r=new(yC(this)?this:bC);gC(t);var n=gC(r.has),i=gC(r.get),o=gC(r.set);return _C(e,(function(e){var a=t(e);mC(n,r,a)?wC(mC(i,r,a),e):mC(o,r,a,[e])})),r}});var SC=function(e,t){return e===t||e!=e&&t!=t},kC=GL,RC=eC;Lr({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===RC(kC(this),(function(t){if(SC(t,e))return!0}),!0)}});var TC=P,EC=Af,xC=x,LC=Ie,CC=XL.Map;Lr({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var r=new(xC(this)?this:CC);LC(t);var n=LC(r.set);return EC(e,(function(e){TC(n,r,t(e),e)})),r}});var OC=GL,IC=eC;Lr({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=IC(OC(this),(function(t,r){if(t===e)return{key:r}}),!0);return t&&t.key}});var PC=zt,DC=GL,AC=eC,FC=XL.Map,ZC=XL.set;Lr({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=DC(this),r=PC(e,arguments.length>1?arguments[1]:void 0),n=new FC;return AC(t,(function(e,i){ZC(n,r(e,i,t),e)})),n}});var jC=zt,VC=GL,WC=eC,MC=XL.Map,NC=XL.set;Lr({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=VC(this),r=jC(e,arguments.length>1?arguments[1]:void 0),n=new MC;return WC(t,(function(e,i){NC(n,i,r(e,i,t))})),n}});var GC=GL,HC=Af,UC=XL.set;Lr({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=GC(this),r=arguments.length,n=0;n<r;)HC(arguments[n++],(function(e,r){UC(t,e,r)}),{AS_ENTRIES:!0});return t}});var XC=Ie,BC=GL,KC=eC,YC=TypeError;Lr({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=BC(this),r=arguments.length<2,n=r?void 0:arguments[1];if(XC(e),KC(t,(function(i,o){r?(r=!1,n=i):n=e(n,i,o,t)})),r)throw YC("Reduce of empty map with no initial value");return n}});var JC=zt,zC=GL,QC=eC;Lr({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=zC(this),r=JC(e,arguments.length>1?arguments[1]:void 0);return!0===QC(t,(function(e,n){if(r(e,n,t))return!0}),!0)}});var qC=Ie,$C=GL,eO=TypeError,tO=XL.get,rO=XL.has,nO=XL.set;Lr({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var r=$C(this),n=arguments.length;qC(t);var i=rO(r,e);if(!i&&n<3)throw eO("Updating absent value");var o=i?tO(r,e):qC(n>2?arguments[2]:void 0)(e,r);return nO(r,e,t(o,e,r)),r}});var iO=P,oO=Ie,aO=x,sO=rr,lO=TypeError,uO=function(e,t){var r,n=sO(this),i=oO(n.get),o=oO(n.has),a=oO(n.set),s=arguments.length>2?arguments[2]:void 0;if(!aO(t)&&!aO(s))throw lO("At least one callback required");return iO(o,n,e)?(r=iO(i,n,e),aO(t)&&(r=t(r),iO(a,n,e,r))):aO(s)&&(r=s(),iO(a,n,e,r)),r};Lr({target:"Map",proto:!0,real:!0,forced:!0},{upsert:uO}),Lr({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:uO});var cO=r(OL);function dO(e,t){var r=Dc(e);if(Ac){var n=Ac(e);t&&(n=Gc(n).call(n,(function(t){return Qc(e,t).enumerable}))),r.push.apply(r,n)}return r}function fO(e){for(var t=1;t<arguments.length;t++){var r,n,i=null!=arguments[t]?arguments[t]:{};t%2?ud(r=dO(Object(i),!0)).call(r,(function(t){bO(e,t,i[t])})):bd?xd(e,bd(i)):ud(n=dO(Object(i))).call(n,(function(t){Ad(e,t,Qc(i,t))}))}return e}function hO(){hO=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Ad||function(e,t,r){e[t]=r.value},i="function"==typeof kc?kc:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,r){return Ad(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(x){l=function(e,t,r){return e[t]=r}}function u(e,t,r,i){var o=t&&t.prototype instanceof f?t:f,a=Zd(o.prototype),s=new R(i||[]);return n(a,"_invoke",{value:b(e,r,s)}),a}function c(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(x){return{type:"throw",arg:x}}}e.wrap=u;var d={};function f(){}function h(){}function p(){}var v={};l(v,o,(function(){return this}));var m=Md&&Md(Md(T([])));m&&m!==t&&r.call(m,o)&&(v=m);var y=p.prototype=f.prototype=Zd(v);function g(e){var t;ud(t=["next","throw","return"]).call(t,(function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(n,o,a,s){var l=c(e[n],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==Sc(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(d).then((function(e){u.value=e,a(u)}),(function(e){return i("throw",e,a,s)}))}s(l.arg)}var o;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return o=o?o.then(n,n):n()}})}function b(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=w(a,r);if(s){if(s===d)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=c(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=c(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,d;var o=i.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,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],ud(e).call(e,S,this),this.reset(!0)}function T(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 n=-1,i=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:E}}function E(){return{value:void 0,done:!0}}return h.prototype=p,n(y,"constructor",{value:p,configurable:!0}),n(p,"constructor",{value:h,configurable:!0}),h.displayName=l(p,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Nd?Nd(e,p):(e.__proto__=p,l(e,s,"GeneratorFunction")),e.prototype=Zd(y),e},e.awrap=function(e){return{__await:e}},g(_.prototype),l(_.prototype,a,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,i,o){void 0===o&&(o=Mm);var a=new _(u(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(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),r=[];for(var n in t)r.push(n);return Jm(r).call(r),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=T,R.prototype={constructor:R,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,ud(t=this.tryEntries).call(t,k),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+py(n).call(n,1))&&(this[n]=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 n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;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,d):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),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),k(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;k(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:T(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function pO(e){return(pO="function"==typeof kc&&"symbol"==typeof NR?function(e){return typeof e}:function(e){return e&&"function"==typeof kc&&e.constructor===kc&&e!==kc.prototype?"symbol":typeof e})(e)}function vO(e,t,r,n,i,o,a){try{var s=e[o](a),l=s.value}catch(oD){return void r(oD)}s.done?t(l):Mm.resolve(l).then(n,i)}function mO(e){return function(){var t=this,r=arguments;return new Mm((function(n,i){var o=e.apply(t,r);function a(e){vO(o,n,i,a,s,"next",e)}function s(e){vO(o,n,i,a,s,"throw",e)}a(void 0)}))}}function yO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gO(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Ad(e,DO(n.key),n)}}function _O(e,t,r){return t&&gO(e.prototype,t),r&&gO(e,r),Ad(e,"prototype",{writable:!1}),e}function bO(e,t,r){return(t=DO(t))in e?Ad(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wO(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Zd(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Ad(e,"prototype",{writable:!1}),t&&kO(e,t)}function SO(e){var t;return(SO=Nd?Iy(t=Md).call(t):function(e){return e.__proto__||Md(e)})(e)}function kO(e,t){var r;return(kO=Nd?Iy(r=Nd).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function RO(){if("undefined"==typeof Reflect||!By)return!1;if(By.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(By(Boolean,[],(function(){}))),!0}catch(e){return!1}}function TO(e,t,r){var n;RO()?TO=Iy(n=By).call(n):TO=function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Iy(Function).apply(e,n));return r&&kO(i,r.prototype),i};return TO.apply(null,arguments)}function EO(e){var t="function"==typeof cO?new cO:void 0;return EO=function(e){if(null===e||(r=e,-1===rg(n=Function.toString.call(r)).call(n,"[native code]")))return e;var r,n;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,i)}function i(){return TO(e,arguments,SO(this).constructor)}return i.prototype=Zd(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),kO(i,e)},EO(e)}function xO(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Dc(e);for(n=0;n<o.length;n++)r=o[n],rg(t).call(t,r)>=0||(i[r]=e[r]);return i}(e,t);if(Ac){var o=Ac(e);for(n=0;n<o.length;n++)r=o[n],rg(t).call(t,r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function LO(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CO(e){var t=RO();return function(){var r,n=SO(e);if(t){var i=SO(this).constructor;r=By(n,arguments,i)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===Sc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return LO(e)}(this,r)}}function OO(){var e;"undefined"!=typeof Reflect&&JR?OO=Iy(e=JR).call(e):OO=function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=SO(e)););return e}(e,t);if(n){var i=Qc(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}};return OO.apply(this,arguments)}function IO(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function PO(e,t){var r=void 0!==kc&&Oc(e)||e["@@iterator"];if(!r){if(ng(e)||(r=function(e,t){var r;if(e){if("string"==typeof e)return IO(e,t);var n=py(r=Object.prototype.toString.call(e)).call(r,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?_g(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?IO(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function DO(e){var t=function(e,t){if("object"!==Sc(e)||null===e)return e;var r=e[bg];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Sc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Sc(t)?t:String(t)}var AO=Ie,FO=Je,ZO=U,jO=Wr,VO=TypeError,WO=function(e){return function(t,r,n,i){AO(r);var o=FO(t),a=ZO(o),s=jO(o),l=e?s-1:0,u=e?-1:1;if(n<2)for(;;){if(l in a){i=a[l],l+=u;break}if(l+=u,e?l<0:s<=l)throw VO("Reduce of empty array with no initial value")}for(;e?l>=0:s>l;l+=u)l in a&&(i=r(i,a[l],l,o));return i}},MO={left:WO(!1),right:WO(!0)}.left;Lr({target:"Array",proto:!0,forced:!nh&&ve>79&&ve<83||!$c("reduce")},{reduce:function(e){var t=arguments.length;return MO(this,e,t,t>1?arguments[1]:void 0)}});var NO,GO=jc("Array").reduce,HO=se,UO=GO,XO=Array.prototype,BO=r((function(e){var t=e.reduce;return e===XO||HO(XO,e)&&t===XO.reduce?UO:t})),KO="network",YO="network_timeout",JO="network_forbidden",zO="network_notfound",QO="network_range_not_satisfiable",qO="demux",$O="remux",eI="media",tI="drm",rI="other",nI="runtime",iI={FLV:"FLV",HLS:"HLS",MP4:"MP4",FMP4:"FMP4",MSE_ADD_SB:"MSE_ADD_SB",MSE_APPEND_BUFFER:"MSE_APPEND_BUFFER",MSE_OTHER:"MSE_OTHER",MSE_FULL:"MSE_FULL",OPTION:"OPTION",DASH:"DASH",LICENSE:"LICENSE",CUSTOM_LICENSE:"CUSTOM_LICENSE",MSE_HIJACK:"MSE_HIJACK",EME_HIJACK:"EME_HIJACK",SIDX:"SIDX",NO_CANPLAY_ERROR:"NO_CANPLAY_ERROR",BUFFERBREAK_ERROR:"BUFFERBREAK_ERROR",WAITING_TIMEOUT_ERROR:"WAITING_TIMEOUT_ERROR",MEDIA_ERR_ABORTED:"MEDIA_ERR_ABORTED",MEDIA_ERR_NETWORK:"MEDIA_ERR_NETWORK",MEDIA_ERR_DECODE:"MEDIA_ERR_DECODE",MEDIA_ERR_SRC_NOT_SUPPORTED:"MEDIA_ERR_SRC_NOT_SUPPORTED",MEDIA_ERR_CODEC_NOT_SUPPORTED:"MEDIA_ERR_CODEC_NOT_SUPPORTED",MEDIA_ERR_URL_EMPTY:"MEDIA_ERR_URL_EMPTY"},oI=(bO(NO={},"manifest",{HLS:1100,DASH:1200}),bO(NO,KO,2100),bO(NO,YO,2101),bO(NO,JO,2103),bO(NO,zO,2104),bO(NO,QO,2116),bO(NO,qO,{FLV:3100,HLS:3200,MP4:3300,FMP4:3400,SIDX:3410}),bO(NO,$O,{FMP4:4100,MP4:4200}),bO(NO,eI,{MEDIA_ERR_ABORTED:5101,MEDIA_ERR_NETWORK:5102,MEDIA_ERR_DECODE:5103,MEDIA_ERR_SRC_NOT_SUPPORTED:5104,MEDIA_ERR_CODEC_NOT_SUPPORTED:5105,MEDIA_ERR_URL_EMPTY:5106,MSE_ADD_SB:5200,MSE_APPEND_BUFFER:5201,MSE_OTHER:5202,MSE_FULL:5203,MSE_HIJACK:5204,EME_HIJACK:5301}),bO(NO,tI,{LICENSE:7100,CUSTOM_LICENSE:7200}),bO(NO,rI,8e3),bO(NO,nI,{NO_CANPLAY_ERROR:9001,BUFFERBREAK_ERROR:9002,WAITING_TIMEOUT_ERROR:9003}),NO),aI=function(e){wO(r,e);var t=CO(r);function r(e,n,i,o,a){var s;return yO(this,r),(s=t.call(this,a||(null==i?void 0:i.message))).errorType=e===YO?KO:e,s.originError=i,s.ext=o,s.errorCode=oI[e][n]||oI[e],s.errorMessage=s.message,s.errorCode||(s.errorType=rI,s.errorCode=oI[s.errorType]),s}return _O(r,null,[{key:"create",value:function(e,t,n,i,o){return e instanceof r?e:(e instanceof Error&&(n=e,e=""),e||(e=rI),new r(e,t,n,i,o))}},{key:"network",value:function(e){var t;return new r(null!=e&&e.isTimeout?YO:KO,null,e instanceof Error?e:null,{url:null==e?void 0:e.url,response:null==e?void 0:e.response,httpCode:null==e||null===(t=e.response)||void 0===t?void 0:t.status})}}]),r}(EO(Error)),sI=1,lI=2,uI=3,cI=4,dI=["Boolean","Number","String","Undefined","Null","Date","Object"],fI=function(){function e(t,r){yO(this,e),this.name=t||"",this._prefix="[".concat(this.name,"]"),this.logCacheLevel=(null==r?void 0:r.logCacheLevel)||3,this.logMaxSize=(null==r?void 0:r.logMaxSize)||204800,this.logSize=0,this.logTextArray=[]}return _O(e,[{key:"debug",value:function(){for(var t,r,n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,jk(t=[sI]).call(t,o)),e.disabled||(n=console).debug.apply(n,jk(r=[this._prefix,hI()]).call(r,o))}},{key:"log",value:function(){for(var t,r,n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,jk(t=[lI]).call(t,o)),e.disabled||(n=console).log.apply(n,jk(r=[this._prefix,hI()]).call(r,o))}},{key:"warn",value:function(){for(var t,r,n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,jk(t=[uI]).call(t,o)),e.disabled||(n=console).warn.apply(n,jk(r=[this._prefix,hI()]).call(r,o))}},{key:"error",value:function(){for(var t,r,n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,jk(t=[cI]).call(t,o)),e.disabled||(n=console).error.apply(n,jk(r=[this._prefix,hI()]).call(r,o))}},{key:"logCache",value:function(e){if(!(e<this.logCacheLevel)){var t="";try{for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];var o=VR(n).call(n,(function(e){return vI(e)}));t=this._prefix+hI()+hx(o)}catch(s){return}if(e>=this.logCacheLevel&&(this.logSize+=t.length,this.logTextArray.push(t)),this.logSize>this.logMaxSize){var a=this.logTextArray.shift();this.logSize-=a.length}}}},{key:"getLogCache",value:function(){var e=this.logTextArray.join("\n");return this.reset(),e}},{key:"reset",value:function(){this.logTextArray=[],this.logSize=0}},{key:"table",value:function(){var t;e.disabled||(console.group(this._prefix),(t=console).table.apply(t,arguments),console.groupEnd())}},{key:"setLogLevel",value:function(e){this.logCacheLevel=e}}],[{key:"enable",value:function(){e.disabled=!1}},{key:"disable",value:function(){e.disabled=!0}}]),e}();function hI(){return(new Date).toLocaleString()}function pI(e){var t;if("object"!==pO(e))return e;var r=py(t=Object.prototype.toString.call(e)).call(t,8,-1);switch(r){case"Array":case"Uint8Array":case"ArrayBuffer":return r+"["+e.length+"]";case"Object":return"{}";default:return r}}function vI(e,t,r){var n;r||(r=1),t||(t=2);var i={};if(!e||"object"!==pO(e))return e;var o=py(n=Object.prototype.toString.call(e)).call(n,8,-1);if(!Lx(dI).call(dI,o))return o;if(!(r>t)){for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r===t?i[a]=pI(e[a]):"object"===pO(e[a])?i[a]=vI(e[a],t,r+1):i[a]=e[a]);return i}}bO(fI,"disabled",!0);var mI="fetch",yI="xhr",gI="arraybuffer",_I="text",bI="json",wI=function(e){wO(r,e);var t=CO(r);function r(e,n,i,o){var a;return yO(this,r),bO(LO(a=t.call(this,o)),"retryCount",0),bO(LO(a),"isTimeout",!1),bO(LO(a),"loaderType",mI),bO(LO(a),"startTime",0),bO(LO(a),"endTime",0),bO(LO(a),"options",{}),a.url=e,a.request=n,a.response=i,a}return _O(r)}(EO(Error)),SI=Object.prototype.toString;function kI(e){if("[object Object]"!==SI.call(e))return!1;var t=Md(e);return null===t||t===Object.prototype}function RI(e){if(e&&null!==e[0]&&void 0!==e[0]&&(0!==e[0]||null!==e[1]&&void 0!==e[1])){var t="bytes="+e[0]+"-";return e[1]&&(t+=e[1]),t}}function TI(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function EI(e,t){var r,n;if(e){if(!t)return e;var i,o=Gc(r=VR(n=Dc(t)).call(n,(function(e){if(null!=(i=t[e]))return ng(i)?e+="[]":i=[i],VR(i).call(i,(function(t){var r,n;return n=t,"[object Date]"===SI.call(n)?t=t.toISOString():function(e){return null!==e&&"object"===pO(e)}(t)&&(t=hx(t)),jk(r="".concat(TI(e),"=")).call(r,TI(t))})).join("&")}))).call(r,Boolean).join("&");if(o){var a=rg(e).call(e,"#");-1!==a&&(e=py(e).call(e,0,a)),e+=(-1===rg(e).call(e,"?")?"?":"&")+o}return e}}function xI(e,t,r,n,i,o,a,s,l,u,c){return i=null!=i?QT(i):null,n=PR(n||"0",10),cR(n)&&(n=0),{data:e,done:t,options:{range:l,vid:u,index:s,contentLength:n,age:i,startTime:o,firstByteTime:a,endTime:GE(),priOptions:c},response:r}}function LI(e,t){return Math.round(8*e*1e3/t/1024)}var CI="error",OI="core.ttfb",II="core.loadstart",PI="core.loadresponseheaders",DI="core.loadcomplete",AI="core.loadretry",FI="core.metadataparsed",ZI="core.sei",jI="real_time_speed",VI=2097152,WI=function(e){wO(n,e);var t,r=CO(n);function n(){var e;return yO(this,n),bO(LO(e=r.call(this)),"_abortController",null),bO(LO(e),"_timeoutTimer",null),bO(LO(e),"_reader",null),bO(LO(e),"_response",null),bO(LO(e),"_aborted",!1),bO(LO(e),"_index",-1),bO(LO(e),"_range",null),bO(LO(e),"_receivedLength",0),bO(LO(e),"_running",!1),bO(LO(e),"_logger",null),bO(LO(e),"_vid",""),bO(LO(e),"_onProcessMinLen",0),bO(LO(e),"_onCancel",null),bO(LO(e),"_priOptions",null),e}return _O(n,[{key:"load",value:function(e){var t,r=this,n=e.url,i=e.vid,o=e.timeout,a=e.responseType,s=e.onProgress,l=e.index,u=e.onTimeout,c=e.onCancel,d=e.range,f=e.transformResponse,h=e.request,p=e.params,v=e.logger,m=e.method,y=e.headers,g=e.body,_=e.mode,b=e.credentials,w=e.cache,S=e.redirect,k=e.referrer,R=e.referrerPolicy,T=e.onProcessMinLen,E=e.priOptions;this._logger=v,this._aborted=!1,this._onProcessMinLen=T,this._onCancel=c,this._abortController="undefined"!=typeof AbortController&&new AbortController,this._running=!0,this._index=l,this._range=d||[0,0],this._vid=i||n,this._priOptions=E||{};var x={method:m,headers:y,body:g,mode:_,credentials:b,cache:w,redirect:S,referrer:k,referrerPolicy:R,signal:null===(t=this._abortController)||void 0===t?void 0:t.signal},L=!1;clearTimeout(this._timeoutTimer),n=EI(n,p);var C=RI(d);C&&(y=h?h.headers:x.headers=x.headers||(Headers?new Headers:{}),Headers&&y instanceof Headers?y.append("Range",C):y.Range=C),o&&(this._timeoutTimer=o_((function(){if(L=!0,r.cancel(),u){var e=new wI(n,x,null,"timeout");e.isTimeout=!0,u(e,{index:r._index,range:r._range,vid:r._vid,priOptions:r._priOptions})}}),o));var O=GE();return this._logger.debug("[fetch load start], index,",l,",range,",d),new Mm((function(e,t){fetch(h||n,h?void 0:x).then(function(){var i=mO(hO().mark((function i(o){var u,c,h,p;return hO().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(clearTimeout(r._timeoutTimer),r._response=o,!r._aborted&&r._running){i.next=4;break}return i.abrupt("return");case 4:if(f&&(o=f(o,n)||o),o.ok){i.next=7;break}throw new wI(n,x,o,"bad network response");case 7:if(u=GE(),a!==_I){i.next=15;break}return i.next=11,o.text();case 11:c=i.sent,r._running=!1,i.next=37;break;case 15:if(a!==bI){i.next=22;break}return i.next=18,o.json();case 18:c=i.sent,r._running=!1,i.next=37;break;case 22:if(!s){i.next=29;break}return r.resolve=e,r.reject=t,r._loadChunk(o,s,O,u),i.abrupt("return");case 29:return i.next=31,o.arrayBuffer();case 31:c=i.sent,c=new Uint8Array(c),r._running=!1,h=GE()-O,p=LI(c.byteLength,h),r.emit(jI,{speed:p,len:c.byteLength,time:h,vid:r._vid,index:r._index,range:r._range,priOptions:r._priOptions});case 37:r._logger.debug("[fetch load end], index,",l,",range,",d),e(xI(c,!0,o,o.headers.get("Content-Length"),o.headers.get("age"),O,u,l,d,r._vid,r._priOptions));case 39:case"end":return i.stop()}}),i)})));return function(e){return i.apply(this,arguments)}}()).catch((function(e){var i;clearTimeout(r._timeoutTimer),r._running=!1,r._aborted&&!L||((e=e instanceof wI?e:new wI(n,x,null,null===(i=e)||void 0===i?void 0:i.message)).startTime=O,e.endTime=GE(),e.isTimeout=L,e.options={index:r._index,range:r._range,vid:r._vid,priOptions:r._priOptions},t(e))}))}))}},{key:"cancel",value:(t=mO(hO().mark((function e(){return hO().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._aborted){e.next=2;break}return e.abrupt("return");case 2:if(this._aborted=!0,this._running=!1,!this._response){e.next=14;break}if(e.prev=5,!this._reader){e.next=9;break}return e.next=9,this._reader.cancel();case 9:e.next=13;break;case 11:e.prev=11,e.t0=e.catch(5);case 13:this._response=this._reader=null;case 14:if(this._abortController){try{this._abortController.abort()}catch(oD){}this._abortController=null}this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions});case 16:case"end":return e.stop()}}),e,this,[[5,11]])}))),function(){return t.apply(this,arguments)})},{key:"_loadChunk",value:function(e,t,r,n){var i=this;if(!e.body||!e.body.getReader){this._running=!1;var o=new wI(e.url,"",e,"onProgress of bad response.body.getReader");return o.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},void this.reject(o)}this._onProcessMinLen>0&&(this._cache=new Uint8Array(VI),this._writeIdx=0);var a,s,l,u=this._reader=e.body.getReader(),c=function(){var o=mO(hO().mark((function o(){var d,f,h,p,v,m,y,g;return hO().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return s=GE(),o.prev=1,o.next=4,u.read();case 4:a=o.sent,l=GE(),o.next=13;break;case 8:return o.prev=8,o.t0=o.catch(1),l=GE(),i._aborted||(i._running=!1,o.t0.options={index:i._index,range:i._range,vid:i._vid,priOptions:i._priOptions},i.reject(o.t0)),o.abrupt("return");case 13:if(f=(null===(d=i._range)||void 0===d?void 0:d.length)>0?i._range[0]:0,h=f+i._receivedLength,!i._aborted){o.next=19;break}return i._running=!1,t(void 0,!1,{range:[h,h],vid:i._vid,index:i._index,startTime:s,endTime:l,st:r,firstByteTime:n,priOptions:i._priOptions},e),o.abrupt("return");case 19:var _;if(p=a.value?a.value.byteLength:0,i._receivedLength+=p,i._logger.debug("【fetchLoader,onProgress call】,task,",i._range,", start,",h,", end,",f+i._receivedLength,", done,",a.done),i._onProcessMinLen>0){if(i._writeIdx+p>=i._onProcessMinLen||a.done)(v=new Uint8Array(i._writeIdx+p)).set(py(_=i._cache).call(_,0,i._writeIdx),0),p>0&&v.set(a.value,i._writeIdx),i._writeIdx=0,i._logger.debug("【fetchLoader,onProgress enough】,done,",a.done,",len,",v.byteLength,", writeIdx,",i._writeIdx);else if(p>0&&i._writeIdx+p<VI)i._cache.set(a.value,i._writeIdx),i._writeIdx+=p,i._logger.debug("【fetchLoader,onProgress cache】,len,",p,", writeIdx,",i._writeIdx);else if(p>0){var b;m=new Uint8Array(i._writeIdx+p+2048),i._logger.debug("【fetchLoader,onProgress extra start】,size,",i._writeIdx+p+2048,", datalen,",p,", writeIdx,",i._writeIdx),m.set(py(b=i._cache).call(b,0,i._writeIdx),0),p>0&&m.set(a.value,i._writeIdx),i._writeIdx+=p,delete i._cache,i._cache=m,i._logger.debug("【fetchLoader,onProgress extra end】,len,",p,", writeIdx,",i._writeIdx)}}else v=a.value;(v&&v.byteLength>0||a.done)&&t(v,a.done,{range:[i._range[0]+i._receivedLength-(v?v.byteLength:0),i._range[0]+i._receivedLength],vid:i._vid,index:i._index,startTime:s,endTime:l,st:r,firstByteTime:n,priOptions:i._priOptions},e),a.done?(y=GE()-r,g=LI(i._receivedLength,y),i.emit(jI,{speed:g,len:i._receivedLength,time:y,vid:i._vid,index:i._index,range:i._range,priOptions:i._priOptions}),i._running=!1,i._logger.debug("[fetchLoader onProgress end],task,",i._range,",done,",a.done),i.resolve(xI(a,!0,e,e.headers.get("Content-Length"),e.headers.get("age"),r,n,i._index,i._range,i._vid,i._priOptions))):c();case 25:case"end":return o.stop()}}),o,null,[[1,8]])})));return function(){return o.apply(this,arguments)}}();c()}},{key:"receiveLen",get:function(){return this._receivedLength}},{key:"running",get:function(){return this._running},set:function(e){this._running=e}}],[{key:"isSupported",value:function(){return!("undefined"==typeof fetch)}}]),n}(sT);var MI=function(e){wO(r,e);var t=CO(r);function r(){var e;return yO(this,r),bO(LO(e=t.call(this)),"_xhr",null),bO(LO(e),"_aborted",!1),bO(LO(e),"_timeoutTimer",null),bO(LO(e),"_range",null),bO(LO(e),"_receivedLength",0),bO(LO(e),"_url",null),bO(LO(e),"_onProgress",null),bO(LO(e),"_index",-1),bO(LO(e),"_headers",null),bO(LO(e),"_currentChunkSizeKB",384),bO(LO(e),"_timeout",null),bO(LO(e),"_xhr",null),bO(LO(e),"_withCredentials",null),bO(LO(e),"_startTime",-1),bO(LO(e),"_loadCompleteResolve",null),bO(LO(e),"_loadCompleteReject",null),bO(LO(e),"_runing",!1),bO(LO(e),"_logger",!1),bO(LO(e),"_vid",""),bO(LO(e),"_responseType",void 0),bO(LO(e),"_credentials",void 0),bO(LO(e),"_method",void 0),bO(LO(e),"_transformResponse",void 0),bO(LO(e),"_firstRtt",void 0),bO(LO(e),"_onCancel",null),bO(LO(e),"_priOptions",null),e}return _O(r,[{key:"load",value:function(e){var t=this;clearTimeout(this._timeoutTimer),this._logger=e.logger,this._range=e.range,this._onProgress=e.onProgress,this._index=e.index,this._headers=e.headers,this._withCredentials="include"===e.credentials||"same-origin"===e.credentials,this._body=e.body||null,e.method&&(this._method=e.method),this._timeout=e.timeout||null,this._runing=!0,this._vid=e.vid||e.url,this._responseType=e.responseType,this._firstRtt=-1,this._onTimeout=e.onTimeout,this._onCancel=e.onCancel,this._request=e.request,this._priOptions=e.priOptions||{},this._logger.debug("【xhrLoader task】, range",this._range),this._url=EI(e.url,e.params);var r=GE();return new Mm((function(e,r){t._loadCompleteResolve=e,t._loadCompleteReject=r,t._startLoad()})).catch((function(e){if(clearTimeout(t._timeoutTimer),t._runing=!1,!t._aborted)throw(e=e instanceof wI?e:new wI(t._url,t._request)).startTime=r,e.endTime=GE(),e.options={index:t._index,vid:t._vid,priOptions:t._priOptions},e}))}},{key:"_startLoad",value:function(){var e=null;if(this._responseType===gI&&this._range&&this._range.length>1)if(this._onProgress){this._firstRtt=-1;var t=1024*this._currentChunkSizeKB,r=this._range[0]+this._receivedLength,n=this._range[1];t<this._range[1]-r&&(n=r+t),e=[r,n],this._logger.debug("[xhr_loader->],tast :",this._range,", SubRange, ",e)}else e=this._range,this._logger.debug("[xhr_loader->],tast :",this._range,", allRange, ",e);this._internalOpen(e)}},{key:"_internalOpen",value:function(e){var t=this;try{var r,n;this._startTime=GE();var i=this._xhr=new XMLHttpRequest;i.open(this._method||"GET",this._url,!0),i.responseType=this._responseType,this._timeout&&(i.timeout=this._timeout),i.withCredentials=this._withCredentials,i.onload=Iy(r=this._onLoad).call(r,this),i.onreadystatechange=Iy(n=this._onReadyStatechange).call(n,this),i.onerror=function(e){var r,n,i;t._running=!1;var o=new wI(t._url,t._request,null==e||null===(r=e.currentTarget)||void 0===r?void 0:r.response,"xhr.onerror.status:"+(null==e||null===(n=e.currentTarget)||void 0===n?void 0:n.status)+",statusText,"+(null==e||null===(i=e.currentTarget)||void 0===i?void 0:i.statusText));o.options={index:t._index,range:t._range,vid:t._vid,priOptions:t._priOptions},t._loadCompleteReject(o)},i.ontimeout=function(e){t.cancel();var r=new wI(t._url,t._request,{status:408},"timeout");t._onTimeout&&(r.isTimeout=!0,t._onTimeout(r,{index:t._index,range:t._range,vid:t._vid,priOptions:t._priOptions})),r.options={index:t._index,range:t._range,vid:t._vid,priOptions:t._priOptions},t._loadCompleteReject(r)};var o,a=this._headers||{},s=RI(e);if(s&&(a.Range=s),a)ud(o=Dc(a)).call(o,(function(e){i.setRequestHeader(e,a[e])}));this._logger.debug("[xhr.send->] tast,",this._range,",load sub range, ",e),i.send(this._body)}catch(l){l.options={index:this._index,range:e,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(l)}}},{key:"_onReadyStatechange",value:function(e){2===e.target.readyState&&this._firstRtt<0&&(this._firstRtt=GE())}},{key:"_onLoad",value:function(e){var t,r=e.target.status;if(r<200||r>299){var n=new wI(this._url,null,fO(fO({},e.target.response),{},{status:r}),"bad response,status:"+r);return n.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(n)}var i,o=null,a=!1,s=(null===(t=this._range)||void 0===t?void 0:t.length)>0?this._range[0]:0;if(this._responseType===gI){var l,u=new Uint8Array(e.target.response);if(i=s+this._receivedLength,u&&u.byteLength>0){this._receivedLength+=u.byteLength;var c=GE()-this._startTime,d=LI(this._receivedLength,c);this.emit(jI,{speed:d,len:this._receivedLength,time:c,vid:this._vid,index:this._index,range:[i,s+this._receivedLength],priOptions:this._priOptions})}o=u,a=!((null===(l=this._range)||void 0===l?void 0:l.length)>1&&this._range[1]&&this._receivedLength<this._range[1]-this._range[0]),this._logger.debug("[xhr load done->], tast :",this._range,", start",i,"end ",s+this._receivedLength,",dataLen,",u?u.byteLength:0,",receivedLength",this._receivedLength,",index,",this._index,", done,",a)}else a=!0,o=e.target.response;var f={ok:r>=200&&r<300,status:r,statusText:this._xhr.statusText,url:this._xhr.responseURL,headers:this._getHeaders(this._xhr),body:this._xhr.response};this._transformResponse&&(f=this._transformResponse(f,this._url)||f),this._onProgress&&this._onProgress(o,a,{index:this._index,vid:this._vid,range:[i,s+this._receivedLength],startTime:this._startTime,endTime:GE(),priOptions:this._priOptions},f),a?(this._runing=!1,this._loadCompleteResolve&&this._loadCompleteResolve(xI(this._onProgress?null:o,a,f,f.headers["content-length"],f.headers.age,this._startTime,this._firstRtt,this._index,this._range,this._vid,this._priOptions))):this._startLoad()}},{key:"cancel",value:function(){if(!this._aborted)return this._aborted=!0,this._runing=!1,OO(SO(r.prototype),"removeAllListeners",this).call(this),this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions}),this._xhr?this._xhr.abort():void 0}},{key:"receiveLen",get:function(){return this._receivedLength}},{key:"running",get:function(){return this._running},set:function(e){this._running=e}},{key:"_getHeaders",value:function(e){var t,r,n={},i=PO(aE(t=e.getAllResponseHeaders()).call(t).split("\r\n"));try{for(i.s();!(r=i.n()).done;){var o=r.value.split(": ");n[o[0].toLowerCase()]=py(o).call(o,1).join(": ")}}catch(a){i.e(a)}finally{i.f()}return n}}],[{key:"isSupported",value:function(){return"undefined"!=typeof XMLHttpRequest}}]),r}(sT),NI=["retry","retryDelay","onRetryError","transformError"],GI=function(){function e(t,r){var n,i,o;yO(this,e),this.promise=((o=new Mm((function(e,t){n=e,i=t}))).used=!1,o.resolve=function(){return o.used=!0,n.apply(void 0,arguments)},o.reject=function(){return o.used=!0,i.apply(void 0,arguments)},o),this.alive=!!r.onProgress,!r.logger&&(r.logger=new fI("Loader")),this._loaderType=t,this._loader=t===mI&&"undefined"!=typeof fetch?new WI:new MI,this._config=r,this._retryCount=0,this._retryTimer=null,this._canceled=!1,this._retryCheckFunc=r.retryCheckFunc,this._logger=r.logger}var t;return _O(e,[{key:"exec",value:function(){var e=this,t=this._config,r=t.retry,n=t.retryDelay,i=t.onRetryError,o=t.transformError,a=xO(t,NI),s=function(){var t=mO(hO().mark((function t(){var l,u,c;return hO().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e._loader.load(a);case 3:l=t.sent,e.promise.resolve(l),t.next=27;break;case 7:if(t.prev=7,t.t0=t.catch(0),e._loader.running=!1,e._logger.debug("[task request catch err]",t.t0),!e._canceled){t.next=13;break}return t.abrupt("return");case 13:if(t.t0.loaderType=e._loaderType,t.t0.retryCount=e._retryCount,u=t.t0,o&&(u=o(u)||u),i&&e._retryCount>0&&i(u,e._retryCount,{index:a.index,vid:a.vid,range:a.range,priOptions:a.priOptions}),e._retryCount++,c=!0,e._retryCheckFunc&&(c=e._retryCheckFunc(t.t0)),!(c&&e._retryCount<=r)){t.next=26;break}return clearTimeout(e._retryTimer),e._logger.debug("[task request setTimeout],retry",e._retryCount,",retry range,",a.range),e._retryTimer=o_(s,n),t.abrupt("return");case 26:e.promise.reject(u);case 27:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}();return s(),this.promise}},{key:"cancel",value:(t=mO(hO().mark((function e(){return hO().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return clearTimeout(this._retryTimer),this._canceled=!0,this._loader.running=!1,e.abrupt("return",this._loader.cancel());case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"running",get:function(){return this._loader&&this._loader.running}},{key:"loader",get:function(){return this._loader}}]),e}();function HI(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Mm((function(t){return o_(t,e)}))}var UI,XI=function(e){wO(n,e);var t,r=CO(n);function n(e){var t;return yO(this,n),bO(LO(t=r.call(this,e)),"type",mI),bO(LO(t),"_queue",[]),bO(LO(t),"_alive",[]),bO(LO(t),"_currentTask",null),bO(LO(t),"_finnalUrl",""),bO(LO(t),"_config",void 0),t._config=function(e){return fO({loaderType:mI,retry:0,retryDelay:0,timeout:0,request:null,onTimeout:void 0,onProgress:void 0,onRetryError:void 0,transformRequest:void 0,transformResponse:void 0,transformError:void 0,responseType:_I,range:void 0,url:"",params:void 0,method:"GET",headers:{},body:void 0,mode:void 0,credentials:void 0,cache:void 0,redirect:void 0,referrer:void 0,referrerPolicy:void 0,integrity:void 0,onProcessMinLen:0},e)}(e),t._config.loaderType!==yI&&WI.isSupported()||(t.type=yI),t.log=e.logger,t}return _O(n,[{key:"isFetch",value:function(){return this.type===mI}},{key:"load",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"!=typeof e&&e?r=e:r.url=e||r.url||this._config.url,(r=MR({},this._config,r)).params&&(r.params=MR({},r.params)),r.headers&&kI(r.headers)&&(r.headers=MR({},r.headers)),r.body&&kI(r.body)&&(r.body=MR({},r.body)),r.transformRequest&&(r=r.transformRequest(r)||r),r.logger=this.log;var n=new GI(this.type,r);return n.loader.on(jI,(function(e){t.emit(jI,e)})),this._queue.push(n),1!==this._queue.length||this._currentTask&&this._currentTask.running||this._processTask(),n.promise}},{key:"cancel",value:(t=mO(hO().mark((function e(){var t;return hO().wrap((function(e){for(var r,n,i;;)switch(e.prev=e.next){case 0:return t=jk(r=VR(n=this._queue).call(n,(function(e){return e.cancel()}))).call(r,VR(i=this._alive).call(i,(function(e){return e.cancel()}))),this._currentTask&&t.push(this._currentTask.cancel()),this._queue=[],this._alive=[],e.next=6,Mm.all(t);case 6:return e.next=8,HI();case 8:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"_processTask",value:function(){var e=this;if(this._currentTask=this._queue.shift(),this._currentTask){this._currentTask.alive&&this._alive.push(this._currentTask);var t=this._currentTask.exec().catch((function(e){}));t&&"function"==typeof t.finally&&t.finally((function(){var t,r,n;null!==(t=e._currentTask)&&void 0!==t&&t.alive&&(null===(r=e._alive)||void 0===r?void 0:r.length)>0&&(e._alive=Gc(n=e._alive).call(n,(function(t){return t&&t!==e._currentTask})));e._processTask()}))}}}],[{key:"isFetchSupport",value:function(){return WI.isSupported()}}]),n}(sT),BI=function(e){return e.RTC_STATE_CHANGE="core.rtcstatechange",e.RTC_NETWORK="core.rtcnetwork",e.RTC_FIRST_FRAME="core.rtcfirstframe",e}(BI||{}),KI=function(e){return e.LOAD_START="start_load",e.OFFER_SDP_READY="offer_sdp_ready",e.ANSWER_SDP_RECV="answer_sdp_recv",e.ANSWER_SDP_READY="answer_sdp_ready",e.ICE_CONNECTED="ice_connected",e.DTLS_CONNECTED="dtls_connected",e.PEER_CONNECTED="peer_connected",e.FIRST_PACKET_RECV="first_packet_recv",e.FIRST_FRAME_RECV="first_frame_recv",e.FIRST_FRAME_DECODED="first_frame_decoded",e.VIDEO_PLAYING="video_playing",e.VIDEO_CANPLAY="video_canplay",e.VIDEO_LOADEDDATA="video_loadeddata",e}(KI||{}),YI={},JI={},zI={exports:{}},QI=zI.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(e){return e.encoding?"rtpmap:%d %s/%s/%s":e.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(e){return null!=e.address?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%s trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(e){return null!=e.subtype?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))?(?: (urn:ietf:params:rtp-hdrext:encrypt))? (\S*)(?: (\S*))?/,names:["value","direction","encrypt-uri","uri","config"],format:function(e){return"extmap:%d"+(e.direction?"/%s":"%v")+(e["encrypt-uri"]?" %s":"%v")+" %s"+(e.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(e){return null!=e.sessionConfig?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"connectionType",reg:/^connection:(new|existing)/,format:"connection:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*(?:\.\d*)*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*(?:\.\d*)*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(e){var t="candidate:%s %d %s %d %s %d typ %s";return t+=null!=e.raddr?" raddr %s rport %d":"%v%v",t+=null!=e.tcptype?" tcptype %s":"%v",null!=e.generation&&(t+=" generation %d"),t+=null!=e["network-id"]?" network-id %d":"%v",t+=null!=e["network-cost"]?" network-cost %d":"%v"}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_-]*)(?::(.*))?/,names:["id","attribute","value"],format:function(e){var t="ssrc:%d";return null!=e.attribute&&(t+=" %s",null!=e.value&&(t+=":%s")),t}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(e){return null!=e.maxMessageSize?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(e){return e.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(e){return"imageattr:%s %s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"),names:["dir1","list1","dir2","list2"],format:function(e){return"simulcast:%s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{name:"sourceFilter",reg:/^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,names:["filterMode","netType","addressTypes","destAddress","srcList"],format:"source-filter: %s %s %s %s %s"},{name:"bundleOnly",reg:/^(bundle-only)/},{name:"label",reg:/^label:(.+)/,format:"label:%s"},{name:"sctpPort",reg:/^sctp-port:(\d+)$/,format:"sctp-port:%s"},{name:"maxMessageSize",reg:/^max-message-size:(\d+)$/,format:"max-message-size:%s"},{push:"tsRefClocks",reg:/^ts-refclk:([^\s=]*)(?:=(\S*))?/,names:["clksrc","clksrcExt"],format:function(e){return"ts-refclk:%s"+(null!=e.clksrcExt?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(e){var t="mediaclk:";return t+=null!=e.id?"id=%s %s":"%v%s",t+=null!=e.mediaClockValue?"=%s":"",t+=null!=e.rateNumerator?" rate=%s":"",t+=null!=e.rateDenominator?"/%s":""}},{name:"keywords",reg:/^keywds:(.+)$/,format:"keywds:%s"},{name:"content",reg:/^content:(.+)/,format:"content:%s"},{name:"bfcpFloorCtrl",reg:/^floorctrl:(c-only|s-only|c-s)/,format:"floorctrl:%s"},{name:"bfcpConfId",reg:/^confid:(\d+)/,format:"confid:%s"},{name:"bfcpUserId",reg:/^userid:(\d+)/,format:"userid:%s"},{name:"bfcpFloorId",reg:/^floorid:(.+) (?:m-stream|mstrm):(.+)/,names:["id","mStream"],format:"floorid:%s mstrm:%s"},{push:"invalid",names:["value"]}]};ud(UI=Dc(QI)).call(UI,(function(e){var t=QI[e];ud(t).call(t,(function(e){e.reg||(e.reg=/(.*)/),e.format||(e.format="%s")}))}));var qI=zI.exports;!function(e,t){var r=function(e){return String(Number(e))===e?Number(e):e},n=function(e,t,n){var i=e.name&&e.names;e.push&&!t[e.push]?t[e.push]=[]:i&&!t[e.name]&&(t[e.name]={});var o=e.push?{}:i?t[e.name]:t;!function(e,t,n,i){if(i&&!n)t[i]=r(e[1]);else for(var o=0;o<n.length;o+=1)null!=e[o+1]&&(t[n[o]]=r(e[o+1]))}(n.match(e.reg),o,e.names,e.name),e.push&&t[e.push].push(o)},i=qI,o=Iy(t=RegExp.prototype.test).call(t,/^([a-z])=(.*)/);e.parse=function(e){var t,r,a={},s=[],l=a;return ud(t=Gc(r=e.split(/(\r\n|\r|\n)/)).call(r,o)).call(t,(function(e){var t=e[0],r=py(e).call(e,2);"m"===t&&(s.push({rtp:[],fmtp:[]}),l=s[s.length-1]);for(var o=0;o<(i[t]||[]).length;o+=1){var a=i[t][o];if(a.reg.test(r))return n(a,l,r)}})),a.media=s,a};var a=function(e,t){var n=t.split(/=(.+)/,2);return 2===n.length?e[n[0]]=r(n[1]):1===n.length&&t.length>1&&(e[n[0]]=void 0),e};e.parseParams=function(e){var t;return BO(t=e.split(/;\s?/)).call(t,a,{})},e.parseFmtpConfig=e.parseParams,e.parsePayloads=function(e){var t;return VR(t=e.toString().split(" ")).call(t,Number)},e.parseRemoteCandidates=function(e){for(var t,n=[],i=VR(t=e.split(" ")).call(t,r),o=0;o<i.length;o+=3)n.push({component:i[o],ip:i[o+1],port:i[o+2]});return n},e.parseImageAttributes=function(e){var t;return VR(t=e.split(" ")).call(t,(function(e){var t;return BO(t=e.substring(1,e.length-1).split(",")).call(t,a,{})}))},e.parseSimulcastStreamList=function(e){var t;return VR(t=e.split(";")).call(t,(function(e){var t;return VR(t=e.split(",")).call(t,(function(e){var t,n=!1;return"~"!==e[0]?t=r(e):(t=r(e.substring(1,e.length)),n=!0),{scid:t,paused:n}}))}))}}(JI);var $I=qI,eP=/%[sdv%]/g,tP=function(e){var t=1,r=arguments,n=r.length;return e.replace(eP,(function(e){if(t>=n)return e;var i=r[t];switch(t+=1,e){case"%%":return"%";case"%s":return String(i);case"%d":return Number(i);case"%v":return""}}))},rP=function(e,t,r){var n=[e+"="+(t.format instanceof Function?t.format(t.push?r:r[t.name]):t.format)];if(t.names)for(var i=0;i<t.names.length;i+=1){var o=t.names[i];t.name?n.push(r[t.name][o]):n.push(r[t.names[i]])}else n.push(r[t.name]);return tP.apply(null,n)},nP=["v","o","s","i","u","e","p","c","b","t","r","z","a"],iP=["i","c","b","a"],oP=JI,aP=function(e,t){var r,n;t=t||{},null==e.version&&(e.version=0),null==e.name&&(e.name=" "),ud(r=e.media).call(r,(function(e){null==e.payloads&&(e.payloads="")}));var i=t.outerOrder||nP,o=t.innerOrder||iP,a=[];return ud(i).call(i,(function(t){var r;ud(r=$I[t]).call(r,(function(r){if(r.name in e&&null!=e[r.name])a.push(rP(t,r,e));else if(r.push in e&&null!=e[r.push]){var n;ud(n=e[r.push]).call(n,(function(e){a.push(rP(t,r,e))}))}}))})),ud(n=e.media).call(n,(function(e){a.push(rP("m",$I.m[0],e)),ud(o).call(o,(function(t){var r;ud(r=$I[t]).call(r,(function(r){if(r.name in e&&null!=e[r.name])a.push(rP(t,r,e));else if(r.push in e&&null!=e[r.push]){var n;ud(n=e[r.push]).call(n,(function(e){a.push(rP(t,r,e))}))}}))}))})),a.join("\r\n")+"\r\n"};YI.write=aP,YI.parse=oP.parse,YI.parseParams=oP.parseParams,YI.parseFmtpConfig=oP.parseFmtpConfig,YI.parsePayloads=oP.parsePayloads,YI.parseRemoteCandidates=oP.parseRemoteCandidates,YI.parseImageAttributes=oP.parseImageAttributes,YI.parseSimulcastStreamList=oP.parseSimulcastStreamList;var sP=["adaptiveJitterBuffer"];function lP(e){return uP.apply(this,arguments)}function uP(){return(uP=Tg(kg().mark((function e(t){return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return",[]);case 2:return e.abrupt("return",new Mm((function(e){var r;null===(r=t.getStats(null))||void 0===r||r.then((function(t){var r,n,i;e((n=[],i=[],ud(r=t).call(r,(function(e){"inbound-rtp"===e.type&&n.push(e),"remote-outbound-rtp"===e.type&&i.push(e)})),VR(n).call(n,(function(e){var t,n=r.get(e.codecId),o=r.get(e.trackId);return{type:null!==(t=e.mediaType)&&void 0!==t?t:e.kind,inboundRtp:e,remoteOutBoundRtp:Pk(i).call(i,(function(t){return t.mediaType===e.mediaType})),codec:n,track:o}}))))}))})).catch((function(){return[]})));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function cP(e){var t,r,n,i,o,a,s,l,u,c,d,f,h,p,v,m,y,g,_,b,w,S,k,R,T,E,x,L,C,O,I,P,D,A,F,Z,j,V=null==e?void 0:Gc(e).call(e,(function(e){return"video"===e.type}))[0],W=null==e?void 0:Gc(e).call(e,(function(e){return"audio"===e.type}))[0];(V&&V.remoteOutBoundRtp&&(D={bytesSent:V.remoteOutBoundRtp.bytesSent,packetsSent:V.remoteOutBoundRtp.packetsSent}),W&&W.remoteOutBoundRtp&&(A={bytesSent:W.remoteOutBoundRtp.bytesSent,packetsSent:W.remoteOutBoundRtp.packetsSent}),void 0!==(null==V||null===(t=V.inboundRtp)||void 0===t?void 0:t.jitterBufferDelay))&&(F=(null===(Z=V.inboundRtp)||void 0===Z?void 0:Z.jitterBufferDelay)/(null===(j=V.inboundRtp)||void 0===j?void 0:j.jitterBufferEmittedCount)*1e3);return{video:V?{codec:null===(r=V.codec)||void 0===r?void 0:r.mimeType,payloadType:null===(n=V.codec)||void 0===n?void 0:n.payloadType,sdpFmtpLine:null===(i=V.codec)||void 0===i?void 0:i.sdpFmtpLine,bytesReceived:(null===(o=V.inboundRtp)||void 0===o?void 0:o.bytesReceived)||0,firCount:null===(a=V.inboundRtp)||void 0===a?void 0:a.firCount,pliCount:null===(s=V.inboundRtp)||void 0===s?void 0:s.pliCount,frameHeight:null===(l=V.inboundRtp)||void 0===l?void 0:l.frameHeight,frameWidth:null===(u=V.inboundRtp)||void 0===u?void 0:u.frameWidth,framesDecoded:null===(c=V.inboundRtp)||void 0===c?void 0:c.framesDecoded,framesDropped:null===(d=V.inboundRtp)||void 0===d?void 0:d.framesDropped,framesPerSecond:null===(f=V.inboundRtp)||void 0===f?void 0:f.framesPerSecond,framesReceived:null!==(h=null===(p=V.inboundRtp)||void 0===p?void 0:p.framesReceived)&&void 0!==h?h:null===(v=V.track)||void 0===v?void 0:v.framesReceived,jitter:null===(m=V.inboundRtp)||void 0===m?void 0:m.jitter,jitterBufferDelay:null===(y=V.inboundRtp)||void 0===y?void 0:y.jitterBufferDelay,keyFramesDecoded:null===(g=V.inboundRtp)||void 0===g?void 0:g.keyFramesDecoded,nackCount:null===(_=V.inboundRtp)||void 0===_?void 0:_.nackCount,packetsLost:(null===(b=V.inboundRtp)||void 0===b?void 0:b.packetsLost)||0,packetsReceived:(null===(w=V.inboundRtp)||void 0===w?void 0:w.packetsReceived)||0,averageJitterBufferDelay:F}:void 0,audio:W?{codec:null===(S=W.codec)||void 0===S?void 0:S.mimeType,payloadType:null===(k=W.codec)||void 0===k?void 0:k.payloadType,sdpFmtpLine:null===(R=W.codec)||void 0===R?void 0:R.sdpFmtpLine,bytesReceived:(null===(T=W.inboundRtp)||void 0===T?void 0:T.bytesReceived)||0,audioLevel:null===(E=W.inboundRtp)||void 0===E?void 0:E.audioLevel,jitter:null===(x=W.inboundRtp)||void 0===x?void 0:x.jitter,jitterBufferDelay:null===(L=W.inboundRtp)||void 0===L?void 0:L.jitterBufferDelay,packetsLost:(null===(C=W.inboundRtp)||void 0===C?void 0:C.packetsLost)||0,packetsReceived:(null===(O=W.inboundRtp)||void 0===O?void 0:O.packetsReceived)||0,totalSamplesDuration:null===(I=W.inboundRtp)||void 0===I?void 0:I.totalSamplesDuration,totalSamplesReceived:null===(P=W.inboundRtp)||void 0===P?void 0:P.totalSamplesReceived}:void 0,videoRemote:D,audioRemote:A}}var dP=function(){function e(t){var r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;Eg(this,e),this._pc=null,this._lastVideoStats=null,this._lastRemoteVideoStats=null,this._timer=0,this._timerInterval=0,this._speedQueue=[],this._lostRateQueue=[],this._receivedRateQueue=[],this._currentSpeed=-1,this._currentLostRate=-1,this._currentReceivedRate=-1,this._evaluate=Tg(kg().mark((function e(){var t,n,i,o,a,s,l,u,c,d,f,h,p,v,m,y,g,_,b,w;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,lP(r._pc).then((function(e){return cP(e)}));case 3:t=e.sent,r._lastVideoStats&&null!=t&&t.video&&(n=t.video,i=n.bytesReceived,o=n.packetsLost,a=n.packetsReceived,s=r._lastVideoStats,l=s.bytesReceived,u=s.packetsLost,c=s.packetsReceived,l&&r._cacheSpeed(8e3*(i-l)/r._timerInterval),d=o-u,(f=a-c)&&d>=0&&r._cacheLostRate(d/(d+f)*1e3/r._timerInterval)),r._lastRemoteVideoStats&&null!=t&&t.videoRemote&&(h=t.video||{},p=h.bytesReceived,v=void 0===p?0:p,m=r._lastVideoStats||{},y=m.bytesReceived,g=void 0===y?0:y,_=null==t?void 0:t.videoRemote,b=_.bytesSent,(w=r._lastRemoteVideoStats.bytesSent)&&b&&b-w>0&&r._cacheReceivedRate((v-g)/(b-w))),r._lastVideoStats=null==t?void 0:t.video,r._lastRemoteVideoStats=null==t?void 0:t.videoRemote,e.next=12;break;case 10:e.prev=10,e.t0=e.catch(0);case 12:case"end":return e.stop()}}),e,null,[[0,10]])}))),this._pc=t,this._timerInterval=n,this.start(n)}return Lg(e,[{key:"start",value:function(e){clearInterval(this._timer),this._pc&&(this._timer=AT(this._evaluate,e))}},{key:"getStats",value:function(){return this._speedQueue.length?{speed:QT(this._currentSpeed.toFixed(2)),avgSpeed:QT(this._getAvgSpeed().toFixed(2)),lostRate:QT(this._currentLostRate.toFixed(2)),avgLostRate:QT(this._getAvgLostRate().toFixed(2)),receivedRate:QT(this._currentReceivedRate.toFixed(2)),avgReceivedRate:QT(this._getAvgReceivedRate().toFixed(2))}:{}}},{key:"destroy",value:function(){clearInterval(this._timer),this._pc=null,this._lastVideoStats=null}},{key:"_cacheSpeed",value:function(e){var t;(this._currentSpeed=e,this._speedQueue.length>5)&&(this._speedQueue=py(t=this._speedQueue).call(t,5));this._speedQueue.push(e)}},{key:"_cacheLostRate",value:function(e){var t;(this._currentLostRate=e,this._lostRateQueue.length>5)&&(this._lostRateQueue=py(t=this._lostRateQueue).call(t,5));this._lostRateQueue.push(e)}},{key:"_cacheReceivedRate",value:function(e){var t;(this._currentReceivedRate=e,this._receivedRateQueue.length>5)&&(this._receivedRateQueue=py(t=this._receivedRateQueue).call(t,5));this._receivedRateQueue.push(e)}},{key:"_getAvgSpeed",value:function(){var e;return-1===this._currentSpeed?-1:BO(e=this._speedQueue).call(e,(function(e,t){return e+t}),0)/this._speedQueue.length}},{key:"_getAvgLostRate",value:function(){var e;return-1===this._currentLostRate?-1:BO(e=this._lostRateQueue).call(e,(function(e,t){return e+t}),0)/this._lostRateQueue.length}},{key:"_getAvgReceivedRate",value:function(){var e;return-1===this._currentReceivedRate?-1:BO(e=this._receivedRateQueue).call(e,(function(e,t){return e+t}),0)/this._receivedRateQueue.length}}]),e}();function fP(){return!(!window.RTCPeerConnection||!window.RTCPeerConnection.prototype.addTransceiver)}var hP=function(){return"undefined"!=typeof window&&window.Worker},pP=function(){return"undefined"!=typeof MessageChannel},vP=function(){return"undefined"!=typeof TransformStream&&"undefined"!=typeof RTCRtpSender&&"undefined"!=typeof RTCRtpReceiver&&void 0!==RTCRtpSender.prototype.createEncodedStreams&&void 0!==RTCRtpReceiver.prototype.createEncodedStreams},mP={getNALUnits:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.length-e.position<4)return[];var r=e.position;return 1===e.getInt32(r)||0===e.getInt16(r)&&1===e.getInt8(r+2)?mP.getAnnexbNals(e,t):mP.getAvccNals(e,t)},getAnnexbNals:function(e,t){for(var r=[],n=mP.getHeaderPositionAnnexB(e),i=n.pos,o=i;i<e.length-4;){var a,s,l=new Uint8Array(py(a=e.buffer).call(a,i,i+n.headerLength));n.pos===e.position&&e.skip(n.headerLength),o=(n=mP.getHeaderPositionAnnexB(e)).pos;var u={header:l,body:new Uint8Array(py(s=e.buffer).call(s,i+l.byteLength,o)),type:-1};t?mP.analyseH265Nal(u):mP.analyseNal(u),(u.type<=9||t&&u.type<=40)&&0!==u.type&&r.push(u),e.skip(o-e.position),i=o}return r},getAvccNals:function(e,t){for(var r=[];e.position<e.length-4;){var n=e.getInt32(e.position);if(!(e.length-e.position>=n))break;var i,o,a=new Uint8Array(py(i=e.buffer).call(i,e.position,e.position+4));e.skip(4);var s=new Uint8Array(py(o=e.buffer).call(o,e.position,e.position+n));e.skip(n);var l={header:a,body:s,type:-1};t?mP.analyseH265Nal(l):mP.analyseNal(l),l.type<=9&&0!==l.type&&r.push(l)}return r},analyseNal:function(e){var t=31&e.body[0];switch(e.type=t,t){case 1:e.ndr=!0;break;case 5:e.idr=!0;break;case 6:e.sei=!0;break;case 7:e.sps=!0;break;case 8:e.pps=!0}},analyseH265Nal:function(e){var t=(126&e.body[0])>>1;switch(e.type=t,t){case 39:case 40:e.sei=!0}},getHeaderPositionAnnexB:function(e){for(var t=e.position,r=0,n=e.length;3!==r&&4!==r&&t<n-4;)0===e.getInt16(t)?1===e.getInt16(t+2)?r=4:1===e.getInt8(t+2)?r=3:t++:t++;return t===n-4&&(0===e.getInt16(t)?1===e.getInt16(t+2)?r=4:t=n:(t++,0===e.getInt16(t)&&1===e.getInt8(t)?r=3:t=n)),{pos:t,headerLength:r}},isH265VideoFrame:function(e){var t,r,n;return Lx(t=((null===(r=e.getMetadata)||void 0===r||null===(n=r.call(e))||void 0===n?void 0:n.mimeType)||"").toLowerCase()).call(t,"h265")}},yP=function(){function e(t){Eg(this,e),this._position=0,this._dataview=new DataView(t)}return Lg(e,[{key:"length",get:function(){return this.buffer.byteLength}},{key:"buffer",get:function(){return this._dataview.buffer}},{key:"position",get:function(){return this._position},set:function(e){this._position=e}},{key:"back",value:function(e){this.position-=e}},{key:"getUint8",value:function(e){return this._dataview.getUint8(e)}},{key:"getInt8",value:function(e){return this._dataview.getInt8(e)}},{key:"getInt16",value:function(e){return this._dataview.getInt16(e)}},{key:"getUint16",value:function(e){return this._dataview.getUint16(e)}},{key:"getUint32",value:function(e){return this._dataview.getUint32(e)}},{key:"getInt32",value:function(e){return this._dataview.getInt32(e)}},{key:"skip",value:function(t){for(var r=Math.floor(t/4),n=t%4,i=0;i<r;i++)e.readByte(this,4);n>0&&e.readByte(this,n)}},{key:"readUint8",value:function(){return e.readByte(this,1)}},{key:"readUint16",value:function(){return e.readByte(this,2)}},{key:"readUint24",value:function(){return e.readByte(this,3)}},{key:"readUint32",value:function(){return e.readByte(this,4)}},{key:"readUint64",value:function(){return e.readByte(this,8)}},{key:"readInt8",value:function(){return e.readByte(this,1,!0)}},{key:"readInt16",value:function(){return e.readByte(this,2,!0)}},{key:"readInt32",value:function(){return e.readByte(this,4,!0)}},{key:"writeUint32",value:function(e){return new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e])}}],[{key:"readByte",value:function(e,t,r){var n;switch(t){case 1:n=r?e.getInt8(e.position):e.getUint8(e.position);break;case 2:n=r?e.getInt16(e.position):e.getUint16(e.position);break;case 3:if(r)throw new Error("not supported for readByte 3");n=e.getUint8(e.position)<<16,n|=e.getUint8(e.position+1)<<8,n|=e.getUint8(e.position+2);break;case 4:n=r?e.getInt32(e.position):e.getUint32(e.position);break;case 8:if(r)throw new Error("not supported for readBody 8");n=e.getUint32(e.position)<<32,n|=e.getUint32(e.position+4);break;default:n=""}return e.position+=t,n}}]),e}();function gP(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Ad(e,(i=n.key,o=void 0,o=function(e,t){if("object"!==Sc(e)||null===e)return e;var r=e[bg];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Sc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"===Sc(o)?o:String(o)),n)}var i,o}function _P(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<24>>>0)+(e[t+1]<<16)+(e[t+2]<<8)+(e[t+3]||0)}var bP=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,n=[{key:"parseAnnexB",value:function(e){var t=e.byteLength-1,r=0;do{if(0!==e[t])break;r++,t--}while(t>0);r>=3&&(e=e.subarray(0,t+1));for(var n=e.length,i=2,o=0;null!==e[i]&&void 0!==e[i]&&1!==e[i];)i++;if((o=2+ ++i)>=n)return[];for(var a=[];o<n;)switch(e[o]){case 0:if(0!==e[o-1]){o+=2;break}if(0!==e[o-2]){o++;break}if(o<n-1&&1!==e[o+1]){o++;break}i!==o-2&&a.push(e.subarray(i,o-2));do{o++}while(1!==e[o]&&o<n);o=(i=o+1)+2;break;case 1:if(0!==e[o-1]||0!==e[o-2]){o+=3;break}i!==o-2&&a.push(e.subarray(i,o-2)),o=(i=o+1)+2;break;default:o+=3}return i<n&&a.push(e.subarray(i)),a}},{key:"parseAvcC",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;if(!(e.length<4)){for(var r,n=e.length,i=[],o=0;o+t<n;)if(r=_P(e,o),3===t&&(r>>>=8),o+=t,r){if(o+r>n)break;i.push(e.subarray(o,o+r)),o+=r}return i}}},{key:"parseSEI",value:function(e,t){for(var r=e.length,n=t?2:1,i=0,o=0,a="";255===e[n];)i+=255,n++;for(i+=e[n++];255===e[n];)o+=255,n++;if(o+=e[n++],5===i&&r>n+16)for(var s=0;s<16;s++)a+=e[n].toString(16),n++;return{payload:e.subarray(n,n+o),type:i,size:o,uuid:a}}},{key:"removeEPB",value:function(e){for(var t=e.byteLength,r=[],n=1;n<t-2;)0===e[n]&&0===e[n+1]&&3===e[n+2]?(r.push(n+2),n+=2):n++;if(!r.length)return e;var i=t-r.length,o=new Uint8Array(i),a=0;for(n=0;n<i;a++,n++)a===r[0]&&(a++,r.shift()),o[n]=e[a];return o}}],(r=null)&&gP(t.prototype,r),n&&gP(t,n),Ad(t,"prototype",{writable:!1}),e}();function wP(e){return new TransformStream({transform:function(t,r){var n=mP.isH265VideoFrame(t),i=mP.getNALUnits(new yP(t.data),n);ud(i).call(i,(function(t){if(t.sei){var r=bP.parseSEI(bP.removeEPB(t.body),!1);r&&e({data:r,sei:{code:r.type,content:r.payload}})}})),r.enqueue(t)}})}"undefined"!=typeof self&&"DedicatedWorkerGlobalScope"===self.constructor.name&&self.addEventListener("rtctransform",(function(e){var t=e.transformer,r=t.options.port,n=wP((function(e){r.postMessage(e)}));t.readable.pipeThrough(n).pipeTo(e.transformer.writable)}));var SP="IWZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO3ZhciBlPXtnZXROQUxVbml0czpmdW5jdGlvbih0KXt2YXIgbj1hcmd1bWVudHMubGVuZ3RoPjEmJnZvaWQgMCE9PWFyZ3VtZW50c1sxXSYmYXJndW1lbnRzWzFdO2lmKHQubGVuZ3RoLXQucG9zaXRpb248NClyZXR1cm5bXTt2YXIgcj10LnBvc2l0aW9uO3JldHVybiAxPT09dC5nZXRJbnQzMihyKXx8MD09PXQuZ2V0SW50MTYocikmJjE9PT10LmdldEludDgocisyKT9lLmdldEFubmV4Yk5hbHModCxuKTplLmdldEF2Y2NOYWxzKHQsbil9LGdldEFubmV4Yk5hbHM6ZnVuY3Rpb24odCxuKXtmb3IodmFyIHI9W10saT1lLmdldEhlYWRlclBvc2l0aW9uQW5uZXhCKHQpLGE9aS5wb3Msbz1hO2E8dC5sZW5ndGgtNDspe3ZhciB1PW5ldyBVaW50OEFycmF5KHQuYnVmZmVyLnNsaWNlKGEsYStpLmhlYWRlckxlbmd0aCkpO2kucG9zPT09dC5wb3NpdGlvbiYmdC5za2lwKGkuaGVhZGVyTGVuZ3RoKSxvPShpPWUuZ2V0SGVhZGVyUG9zaXRpb25Bbm5leEIodCkpLnBvczt2YXIgcz17aGVhZGVyOnUsYm9keTpuZXcgVWludDhBcnJheSh0LmJ1ZmZlci5zbGljZShhK3UuYnl0ZUxlbmd0aCxvKSksdHlwZTotMX07bj9lLmFuYWx5c2VIMjY1TmFsKHMpOmUuYW5hbHlzZU5hbChzKSwocy50eXBlPD05fHxuJiZzLnR5cGU8PTQwKSYmMCE9PXMudHlwZSYmci5wdXNoKHMpLHQuc2tpcChvLXQucG9zaXRpb24pLGE9b31yZXR1cm4gcn0sZ2V0QXZjY05hbHM6ZnVuY3Rpb24odCxuKXtmb3IodmFyIHI9W107dC5wb3NpdGlvbjx0Lmxlbmd0aC00Oyl7dmFyIGk9dC5nZXRJbnQzMih0LnBvc2l0aW9uKTtpZighKHQubGVuZ3RoLXQucG9zaXRpb24+PWkpKWJyZWFrO3ZhciBhPW5ldyBVaW50OEFycmF5KHQuYnVmZmVyLnNsaWNlKHQucG9zaXRpb24sdC5wb3NpdGlvbis0KSk7dC5za2lwKDQpO3ZhciBvPW5ldyBVaW50OEFycmF5KHQuYnVmZmVyLnNsaWNlKHQucG9zaXRpb24sdC5wb3NpdGlvbitpKSk7dC5za2lwKGkpO3ZhciB1PXtoZWFkZXI6YSxib2R5Om8sdHlwZTotMX07bj9lLmFuYWx5c2VIMjY1TmFsKHUpOmUuYW5hbHlzZU5hbCh1KSx1LnR5cGU8PTkmJjAhPT11LnR5cGUmJnIucHVzaCh1KX1yZXR1cm4gcn0sYW5hbHlzZU5hbDpmdW5jdGlvbihlKXt2YXIgdD0zMSZlLmJvZHlbMF07c3dpdGNoKGUudHlwZT10LHQpe2Nhc2UgMTplLm5kcj0hMDticmVhaztjYXNlIDU6ZS5pZHI9ITA7YnJlYWs7Y2FzZSA2OmUuc2VpPSEwO2JyZWFrO2Nhc2UgNzplLnNwcz0hMDticmVhaztjYXNlIDg6ZS5wcHM9ITB9fSxhbmFseXNlSDI2NU5hbDpmdW5jdGlvbihlKXt2YXIgdD0oMTI2JmUuYm9keVswXSk+PjE7c3dpdGNoKGUudHlwZT10LHQpe2Nhc2UgMzk6Y2FzZSA0MDplLnNlaT0hMH19LGdldEhlYWRlclBvc2l0aW9uQW5uZXhCOmZ1bmN0aW9uKGUpe2Zvcih2YXIgdD1lLnBvc2l0aW9uLG49MCxyPWUubGVuZ3RoOzMhPT1uJiY0IT09biYmdDxyLTQ7KTA9PT1lLmdldEludDE2KHQpPzE9PT1lLmdldEludDE2KHQrMik/bj00OjE9PT1lLmdldEludDgodCsyKT9uPTM6dCsrOnQrKztyZXR1cm4gdD09PXItNCYmKDA9PT1lLmdldEludDE2KHQpPzE9PT1lLmdldEludDE2KHQrMik/bj00OnQ9cjoodCsrLDA9PT1lLmdldEludDE2KHQpJiYxPT09ZS5nZXRJbnQ4KHQpP249Mzp0PXIpKSx7cG9zOnQsaGVhZGVyTGVuZ3RoOm59fSxpc0gyNjVWaWRlb0ZyYW1lOmZ1bmN0aW9uKGUpe3ZhciB0LG47cmV0dXJuKChudWxsPT09KHQ9ZS5nZXRNZXRhZGF0YSl8fHZvaWQgMD09PXR8fG51bGw9PT0obj10LmNhbGwoZSkpfHx2b2lkIDA9PT1uP3ZvaWQgMDpuLm1pbWVUeXBlKXx8IiIpLnRvTG93ZXJDYXNlKCkuaW5jbHVkZXMoImgyNjUiKX19O2Z1bmN0aW9uIHQoZSl7cmV0dXJuKHQ9ImZ1bmN0aW9uIj09dHlwZW9mIFN5bWJvbCYmInN5bWJvbCI9PXR5cGVvZiBTeW1ib2wuaXRlcmF0b3I/ZnVuY3Rpb24oZSl7cmV0dXJuIHR5cGVvZiBlfTpmdW5jdGlvbihlKXtyZXR1cm4gZSYmImZ1bmN0aW9uIj09dHlwZW9mIFN5bWJvbCYmZS5jb25zdHJ1Y3Rvcj09PVN5bWJvbCYmZSE9PVN5bWJvbC5wcm90b3R5cGU/InN5bWJvbCI6dHlwZW9mIGV9KShlKX1mdW5jdGlvbiBuKGUsdCl7Zm9yKHZhciBuPTA7bjx0Lmxlbmd0aDtuKyspe3ZhciByPXRbbl07ci5lbnVtZXJhYmxlPXIuZW51bWVyYWJsZXx8ITEsci5jb25maWd1cmFibGU9ITAsInZhbHVlImluIHImJihyLndyaXRhYmxlPSEwKSxPYmplY3QuZGVmaW5lUHJvcGVydHkoZSwoaT1yLmtleSxhPXZvaWQgMCwic3ltYm9sIj09dHlwZW9mKGE9ZnVuY3Rpb24oZSx0KXtpZigib2JqZWN0IiE9dHlwZW9mIGV8fG51bGw9PT1lKXJldHVybiBlO3ZhciBuPWVbU3ltYm9sLnRvUHJpbWl0aXZlXTtpZih2b2lkIDAhPT1uKXt2YXIgcj1uLmNhbGwoZSx0fHwiZGVmYXVsdCIpO2lmKCJvYmplY3QiIT10eXBlb2YgcilyZXR1cm4gcjt0aHJvdyBuZXcgVHlwZUVycm9yKCJAQHRvUHJpbWl0aXZlIG11c3QgcmV0dXJuIGEgcHJpbWl0aXZlIHZhbHVlLiIpfXJldHVybigic3RyaW5nIj09PXQ/U3RyaW5nOk51bWJlcikoZSl9KGksInN0cmluZyIpKT9hOlN0cmluZyhhKSkscil9dmFyIGksYX12YXIgcj1mdW5jdGlvbigpe2Z1bmN0aW9uIGUodCl7IWZ1bmN0aW9uKGUsdCl7aWYoIShlIGluc3RhbmNlb2YgdCkpdGhyb3cgbmV3IFR5cGVFcnJvcigiQ2Fubm90IGNhbGwgYSBjbGFzcyBhcyBhIGZ1bmN0aW9uIil9KHRoaXMsZSksdGhpcy5fcG9zaXRpb249MCx0aGlzLl9kYXRhdmlldz1uZXcgRGF0YVZpZXcodCl9dmFyIHQscixpO3JldHVybiB0PWUsaT1be2tleToicmVhZEJ5dGUiLHZhbHVlOmZ1bmN0aW9uKGUsdCxuKXt2YXIgcjtzd2l0Y2godCl7Y2FzZSAxOnI9bj9lLmdldEludDgoZS5wb3NpdGlvbik6ZS5nZXRVaW50OChlLnBvc2l0aW9uKTticmVhaztjYXNlIDI6cj1uP2UuZ2V0SW50MTYoZS5wb3NpdGlvbik6ZS5nZXRVaW50MTYoZS5wb3NpdGlvbik7YnJlYWs7Y2FzZSAzOmlmKG4pdGhyb3cgbmV3IEVycm9yKCJub3Qgc3VwcG9ydGVkIGZvciByZWFkQnl0ZSAzIik7cj1lLmdldFVpbnQ4KGUucG9zaXRpb24pPDwxNixyfD1lLmdldFVpbnQ4KGUucG9zaXRpb24rMSk8PDgscnw9ZS5nZXRVaW50OChlLnBvc2l0aW9uKzIpO2JyZWFrO2Nhc2UgNDpyPW4/ZS5nZXRJbnQzMihlLnBvc2l0aW9uKTplLmdldFVpbnQzMihlLnBvc2l0aW9uKTticmVhaztjYXNlIDg6aWYobil0aHJvdyBuZXcgRXJyb3IoIm5vdCBzdXBwb3J0ZWQgZm9yIHJlYWRCb2R5IDgiKTtyPWUuZ2V0VWludDMyKGUucG9zaXRpb24pPDwzMixyfD1lLmdldFVpbnQzMihlLnBvc2l0aW9uKzQpO2JyZWFrO2RlZmF1bHQ6cj0iIn1yZXR1cm4gZS5wb3NpdGlvbis9dCxyfX1dLChyPVt7a2V5OiJsZW5ndGgiLGdldDpmdW5jdGlvbigpe3JldHVybiB0aGlzLmJ1ZmZlci5ieXRlTGVuZ3RofX0se2tleToiYnVmZmVyIixnZXQ6ZnVuY3Rpb24oKXtyZXR1cm4gdGhpcy5fZGF0YXZpZXcuYnVmZmVyfX0se2tleToicG9zaXRpb24iLGdldDpmdW5jdGlvbigpe3JldHVybiB0aGlzLl9wb3NpdGlvbn0sc2V0OmZ1bmN0aW9uKGUpe3RoaXMuX3Bvc2l0aW9uPWV9fSx7a2V5OiJiYWNrIix2YWx1ZTpmdW5jdGlvbihlKXt0aGlzLnBvc2l0aW9uLT1lfX0se2tleToiZ2V0VWludDgiLHZhbHVlOmZ1bmN0aW9uKGUpe3JldHVybiB0aGlzLl9kYXRhdmlldy5nZXRVaW50OChlKX19LHtrZXk6ImdldEludDgiLHZhbHVlOmZ1bmN0aW9uKGUpe3JldHVybiB0aGlzLl9kYXRhdmlldy5nZXRJbnQ4KGUpfX0se2tleToiZ2V0SW50MTYiLHZhbHVlOmZ1bmN0aW9uKGUpe3JldHVybiB0aGlzLl9kYXRhdmlldy5nZXRJbnQxNihlKX19LHtrZXk6ImdldFVpbnQxNiIsdmFsdWU6ZnVuY3Rpb24oZSl7cmV0dXJuIHRoaXMuX2RhdGF2aWV3LmdldFVpbnQxNihlKX19LHtrZXk6ImdldFVpbnQzMiIsdmFsdWU6ZnVuY3Rpb24oZSl7cmV0dXJuIHRoaXMuX2RhdGF2aWV3LmdldFVpbnQzMihlKX19LHtrZXk6ImdldEludDMyIix2YWx1ZTpmdW5jdGlvbihlKXtyZXR1cm4gdGhpcy5fZGF0YXZpZXcuZ2V0SW50MzIoZSl9fSx7a2V5OiJza2lwIix2YWx1ZTpmdW5jdGlvbih0KXtmb3IodmFyIG49TWF0aC5mbG9vcih0LzQpLHI9dCU0LGk9MDtpPG47aSsrKWUucmVhZEJ5dGUodGhpcyw0KTtyPjAmJmUucmVhZEJ5dGUodGhpcyxyKX19LHtrZXk6InJlYWRVaW50OCIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDEpfX0se2tleToicmVhZFVpbnQxNiIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDIpfX0se2tleToicmVhZFVpbnQyNCIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDMpfX0se2tleToicmVhZFVpbnQzMiIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDQpfX0se2tleToicmVhZFVpbnQ2NCIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDgpfX0se2tleToicmVhZEludDgiLHZhbHVlOmZ1bmN0aW9uKCl7cmV0dXJuIGUucmVhZEJ5dGUodGhpcywxLCEwKX19LHtrZXk6InJlYWRJbnQxNiIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDIsITApfX0se2tleToicmVhZEludDMyIix2YWx1ZTpmdW5jdGlvbigpe3JldHVybiBlLnJlYWRCeXRlKHRoaXMsNCwhMCl9fSx7a2V5OiJ3cml0ZVVpbnQzMiIsdmFsdWU6ZnVuY3Rpb24oZSl7cmV0dXJuIG5ldyBVaW50OEFycmF5KFtlPj4+MjQmMjU1LGU+Pj4xNiYyNTUsZT4+PjgmMjU1LDI1NSZlXSl9fV0pJiZuKHQucHJvdG90eXBlLHIpLGkmJm4odCxpKSxPYmplY3QuZGVmaW5lUHJvcGVydHkodCwicHJvdG90eXBlIix7d3JpdGFibGU6ITF9KSxlfSgpO2Z1bmN0aW9uIGkoZSxuKXtmb3IodmFyIHI9MDtyPG4ubGVuZ3RoO3IrKyl7dmFyIGk9bltyXTtpLmVudW1lcmFibGU9aS5lbnVtZXJhYmxlfHwhMSxpLmNvbmZpZ3VyYWJsZT0hMCwidmFsdWUiaW4gaSYmKGkud3JpdGFibGU9ITApLE9iamVjdC5kZWZpbmVQcm9wZXJ0eShlLChhPWkua2V5LG89dm9pZCAwLG89ZnVuY3Rpb24oZSxuKXtpZigib2JqZWN0IiE9PXQoZSl8fG51bGw9PT1lKXJldHVybiBlO3ZhciByPWVbU3ltYm9sLnRvUHJpbWl0aXZlXTtpZih2b2lkIDAhPT1yKXt2YXIgaT1yLmNhbGwoZSxufHwiZGVmYXVsdCIpO2lmKCJvYmplY3QiIT09dChpKSlyZXR1cm4gaTt0aHJvdyBuZXcgVHlwZUVycm9yKCJAQHRvUHJpbWl0aXZlIG11c3QgcmV0dXJuIGEgcHJpbWl0aXZlIHZhbHVlLiIpfXJldHVybigic3RyaW5nIj09PW4/U3RyaW5nOk51bWJlcikoZSl9KGEsInN0cmluZyIpLCJzeW1ib2wiPT09dChvKT9vOlN0cmluZyhvKSksaSl9dmFyIGEsb31mdW5jdGlvbiBhKGUpe3ZhciB0PWFyZ3VtZW50cy5sZW5ndGg+MSYmdm9pZCAwIT09YXJndW1lbnRzWzFdP2FyZ3VtZW50c1sxXTowO3JldHVybihlW3RdPDwyND4+PjApKyhlW3QrMV08PDE2KSsoZVt0KzJdPDw4KSsoZVt0KzNdfHwwKX12YXIgbz1mdW5jdGlvbigpe2Z1bmN0aW9uIGUoKXshZnVuY3Rpb24oZSx0KXtpZighKGUgaW5zdGFuY2VvZiB0KSl0aHJvdyBuZXcgVHlwZUVycm9yKCJDYW5ub3QgY2FsbCBhIGNsYXNzIGFzIGEgZnVuY3Rpb24iKX0odGhpcyxlKX12YXIgdCxuLHI7cmV0dXJuIHQ9ZSxyPVt7a2V5OiJwYXJzZUFubmV4QiIsdmFsdWU6ZnVuY3Rpb24oZSl7dmFyIHQ9ZS5ieXRlTGVuZ3RoLTEsbj0wO2Rve2lmKDAhPT1lW3RdKWJyZWFrO24rKyx0LS19d2hpbGUodD4wKTtuPj0zJiYoZT1lLnN1YmFycmF5KDAsdCsxKSk7Zm9yKHZhciByPWUubGVuZ3RoLGk9MixhPTA7bnVsbCE9PWVbaV0mJnZvaWQgMCE9PWVbaV0mJjEhPT1lW2ldOylpKys7aWYoKGE9MisgKytpKT49cilyZXR1cm5bXTtmb3IodmFyIG89W107YTxyOylzd2l0Y2goZVthXSl7Y2FzZSAwOmlmKDAhPT1lW2EtMV0pe2ErPTI7YnJlYWt9aWYoMCE9PWVbYS0yXSl7YSsrO2JyZWFrfWlmKGE8ci0xJiYxIT09ZVthKzFdKXthKys7YnJlYWt9aSE9PWEtMiYmby5wdXNoKGUuc3ViYXJyYXkoaSxhLTIpKTtkb3thKyt9d2hpbGUoMSE9PWVbYV0mJmE8cik7YT0oaT1hKzEpKzI7YnJlYWs7Y2FzZSAxOmlmKDAhPT1lW2EtMV18fDAhPT1lW2EtMl0pe2ErPTM7YnJlYWt9aSE9PWEtMiYmby5wdXNoKGUuc3ViYXJyYXkoaSxhLTIpKSxhPShpPWErMSkrMjticmVhaztkZWZhdWx0OmErPTN9cmV0dXJuIGk8ciYmby5wdXNoKGUuc3ViYXJyYXkoaSkpLG99fSx7a2V5OiJwYXJzZUF2Y0MiLHZhbHVlOmZ1bmN0aW9uKGUpe3ZhciB0PWFyZ3VtZW50cy5sZW5ndGg+MSYmdm9pZCAwIT09YXJndW1lbnRzWzFdP2FyZ3VtZW50c1sxXTo0O2lmKCEoZS5sZW5ndGg8NCkpe2Zvcih2YXIgbixyPWUubGVuZ3RoLGk9W10sbz0wO28rdDxyOylpZihuPWEoZSxvKSwzPT09dCYmKG4+Pj49OCksbys9dCxuKXtpZihvK24+cilicmVhaztpLnB1c2goZS5zdWJhcnJheShvLG8rbikpLG8rPW59cmV0dXJuIGl9fX0se2tleToicGFyc2VTRUkiLHZhbHVlOmZ1bmN0aW9uKGUsdCl7Zm9yKHZhciBuPWUubGVuZ3RoLHI9dD8yOjEsaT0wLGE9MCxvPSIiOzI1NT09PWVbcl07KWkrPTI1NSxyKys7Zm9yKGkrPWVbcisrXTsyNTU9PT1lW3JdOylhKz0yNTUscisrO2lmKGErPWVbcisrXSw1PT09aSYmbj5yKzE2KWZvcih2YXIgdT0wO3U8MTY7dSsrKW8rPWVbcl0udG9TdHJpbmcoMTYpLHIrKztyZXR1cm57cGF5bG9hZDplLnN1YmFycmF5KHIscithKSx0eXBlOmksc2l6ZTphLHV1aWQ6b319fSx7a2V5OiJyZW1vdmVFUEIiLHZhbHVlOmZ1bmN0aW9uKGUpe2Zvcih2YXIgdD1lLmJ5dGVMZW5ndGgsbj1bXSxyPTE7cjx0LTI7KTA9PT1lW3JdJiYwPT09ZVtyKzFdJiYzPT09ZVtyKzJdPyhuLnB1c2gocisyKSxyKz0yKTpyKys7aWYoIW4ubGVuZ3RoKXJldHVybiBlO3ZhciBpPXQtbi5sZW5ndGgsYT1uZXcgVWludDhBcnJheShpKSxvPTA7Zm9yKHI9MDtyPGk7bysrLHIrKylvPT09blswXSYmKG8rKyxuLnNoaWZ0KCkpLGFbcl09ZVtvXTtyZXR1cm4gYX19XSwobj1udWxsKSYmaSh0LnByb3RvdHlwZSxuKSxyJiZpKHQsciksT2JqZWN0LmRlZmluZVByb3BlcnR5KHQsInByb3RvdHlwZSIse3dyaXRhYmxlOiExfSksZX0oKTsidW5kZWZpbmVkIiE9dHlwZW9mIHNlbGYmJiJEZWRpY2F0ZWRXb3JrZXJHbG9iYWxTY29wZSI9PT1zZWxmLmNvbnN0cnVjdG9yLm5hbWUmJnNlbGYuYWRkRXZlbnRMaXN0ZW5lcigicnRjdHJhbnNmb3JtIiwoZnVuY3Rpb24odCl7dmFyIG4saT10LnRyYW5zZm9ybWVyLGE9aS5vcHRpb25zLnBvcnQsdT0obj1mdW5jdGlvbihlKXthLnBvc3RNZXNzYWdlKGUpfSxuZXcgVHJhbnNmb3JtU3RyZWFtKHt0cmFuc2Zvcm06ZnVuY3Rpb24odCxpKXt2YXIgYT1lLmlzSDI2NVZpZGVvRnJhbWUodCk7ZS5nZXROQUxVbml0cyhuZXcgcih0LmRhdGEpLGEpLmZvckVhY2goKGZ1bmN0aW9uKGUpe2lmKGUuc2VpKXt2YXIgdD1vLnBhcnNlU0VJKG8ucmVtb3ZlRVBCKGUuYm9keSksITEpO3QmJm4oe2RhdGE6dCxzZWk6e2NvZGU6dC50eXBlLGNvbnRlbnQ6dC5wYXlsb2FkfX0pfX0pKSxpLmVucXVldWUodCl9fSkpO2kucmVhZGFibGUucGlwZVRocm91Z2godSkucGlwZVRvKHQudHJhbnNmb3JtZXIud3JpdGFibGUpfSkpfSgpOwo=",kP="undefined"!=typeof window&&window.Blob&&new Blob([atob(SP)],{type:"text/javascript;charset=utf-8"});function RP(){var e=kP&&(kk||window.webkitURL).createObjectURL(kP);try{return e?new Worker(e,{}):new Worker("data:application/javascript;base64,"+SP,{type:"module"})}finally{e&&(kk||window.webkitURL).revokeObjectURL(e)}}var TP=function(){function e(){Eg(this,e),this._isStallInPreReportEnd=!1,this._stallList=[],this._audioTransceiver=null}var t,r;return Lg(e,[{key:"start",value:function(t){this.stop(),this._audioTransceiver=t,e.interval>=100&&this._startStallCountInterval()}},{key:"stop",value:function(){this._stallList=[],this._audioStallTimer&&(clearTimeout(this._audioStallTimer),delete this._audioStallTimer)}},{key:"destroy",value:function(){this.stop(),this._audioTransceiver=null}},{key:"getAudioStallInfo",value:(r=Tg(kg().mark((function e(){var t,r;return kg().wrap((function(e){for(var n;;)switch(e.prev=e.next){case 0:return t={stats_count:Gc(n=this._stallList).call(n,(function(e){return e.get_stats_cost})).length,stall_list:jg(this._stallList)},e.prev=1,e.next=4,this._audioStallCount();case 4:e.next=8;break;case 6:e.prev=6,e.t0=e.catch(1);case 8:return r=xP(this._stallList,2,this._isStallInPreReportEnd),this._isStallInPreReportEnd=r.isStallInEnd,this.stop(),this._startStallCountInterval(),e.abrupt("return",{stallCount:r.stall_count,stallDuration:r.stall_duration,list:r.list,extra:t});case 13:case"end":return e.stop()}}),e,this,[[1,6]])}))),function(){return r.apply(this,arguments)})},{key:"_startStallCountInterval",value:function(){var t=this,r=function(){var n=Tg(kg().mark((function n(){return kg().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return clearTimeout(t._audioStallTimer),delete t._audioStallTimer,n.next=4,t._audioStallCount();case 4:t._audioStallTimer||(t._audioStallTimer=o_(r,e.interval));case 5:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}();this._audioStallTimer=o_(r,e.interval)}},{key:"_audioStallCount",value:(t=Tg(kg().mark((function t(){var r,n,i,o,a,s,l,u,c,d,f,h,p,v,m,y,g;return kg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(this._preSample&&GE()-this._preSample.ts<.5*e.interval)){t.next=2;break}return t.abrupt("return");case 2:return r=GE(),o=0,t.prev=4,t.next=7,null===(a=this._audioTransceiver)||void 0===a?void 0:a.receiver.getStats();case 7:null==(s=t.sent)||ud(s).call(s,(function(e){"inbound-rtp"===e.type&&(n=e),o++})),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(4),i=t.t0.message||hx(t.t0);case 14:if(this._preSample){t.next=17;break}return this._preSample={ts:GE(),concealedSamples:(null===(l=n)||void 0===l?void 0:l.concealedSamples)||0,totalSamplesReceived:(null===(u=n)||void 0===u?void 0:u.totalSamplesReceived)||0},t.abrupt("return");case 17:c=GE(),d=GE(),f=d-this._preSample.ts,n?(p=(h=n).concealedSamples,v=h.totalSamplesReceived,m=p-this._preSample.concealedSamples,y=v-this._preSample.totalSamplesReceived,g=m>=0&&y>=0&&m>=e.ratio*y,this._stallList.push({concealed:m,received:y,diff:f,start:this._preSample.ts,end:d,get_stats_cost:c-r,get_stats_start:r,get_stats_end:c,is_stall:g}),this._preSample.concealedSamples=p,this._preSample.totalSamplesReceived=v,this._preSample.ts=d):this._stallList.push({diff:f,start:this._preSample.ts,end:d,get_stats_cost:c-r,get_stats_start:r,get_stats_end:c,reason:o?i||"no inbound-rtp":"no report"});case 21:case"end":return t.stop()}}),t,this,[[4,11]])}))),function(){return t.apply(this,arguments)})}]),e}(),EP=TP;EP.interval=100,EP.ratio=.6;var xP=function(e,t,r){for(var n,i={stall_count:0,stall_duration:0,isStallInEnd:!1,list:[]},o=0,a=0,s=function(r){var n=e[r];n.is_stall&&(o++,a+=n.diff||0);var s=r===e.length-1;if(!n.is_stall||s){var u=o>=t,c=r+t-o-1;if(!u&&o>2){var d,f=0;ud(d=py(e).call(e,r+1,c+1)).call(d,(function(e){e.is_stall&&(f+=e.diff||0)})),(u=a+f>EP.interval*t*EP.ratio)&&(r=c,a+=f)}u&&(i.stall_count++,i.stall_duration+=a,i.list.push(a)),s&&(i.isStallInEnd=u),o=a=0}l=r},l=0;l<e.length;l++)s(l);return!0===(null===(n=e[0])||void 0===n?void 0:n.is_stall)&&r&&i.stall_count>0&&i.stall_count--,i};function LP(){var e=navigator.userAgent;return null!==e.match("Safari")&&null===e.match("Chrome")}function CP(){return null!==navigator.userAgent.match("Firefox")}var OP=function(){function e(){var t=this;Eg(this,e),this._videoInWaiting100ms=!1,this._videoInWaiting500ms=!1,this._pauseStart=0,this._pauseDuration=0,this._stallTimeThreshold={stall500ms:LP()||CP()?550:500,stall100ms:100},this._support100msStall="undefined"!=typeof window&&"function"==typeof HTMLVideoElement.prototype.requestVideoFrameCallback,this._handleVisibilityChange=function(){"hidden"===document.visibilityState&&t._framePause()},this._framePause=function(){if(t._prePts&&t._stallList){var e=performance.now(),r=e-t._prePts;t._stallList.push({playTime:e,timeUpdateInterval:Math.round(r)}),t._prePts=void 0}}}return Lg(e,[{key:"start",value:function(e){var t=this;if(this._player=e,this._support100msStall){var r;if(e)this._requestVideoFrameCallbackTimer=e.requestVideoFrameCallback(Iy(r=this._onVideoRefresh).call(r,this)),this._removeHandler=function(){t._requestVideoFrameCallbackTimer&&e.cancelVideoFrameCallback(t._requestVideoFrameCallbackTimer)}}else{var n=function(){return t._onVideoTimeupdate(e)};e.addEventListener("timeupdate",n),this._removeHandler=function(){return e.removeEventListener("timeupdate",n)}}var i=function(){return t._onVideoPause()};e.addEventListener("pause",i);var o=function(){return t._onVideoPlay()};e.addEventListener("play",o),this._remotePlayPauseHandler=function(){e.removeEventListener("pause",i),e.removeEventListener("play",o)},document.addEventListener("visibilitychange",this._handleVisibilityChange),window.addEventListener("pagehide",this._framePause)}},{key:"stop",value:function(){delete this._player,this._removeHandler&&this._removeHandler(),delete this._removeHandler,this._remotePlayPauseHandler&&this._remotePlayPauseHandler(),delete this._remotePlayPauseHandler,delete this._stallList,delete this._prePts,this._videoInWaiting100ms=!1,this._videoInWaiting500ms=!1,document.removeEventListener("visibilitychange",this._handleVisibilityChange),window.removeEventListener("pagehide",this._framePause)}},{key:"destroy",value:function(){this.stop()}},{key:"getStallInfo",value:function(e){var t=this,r=e.interval,n=e.frameRateReceived,i=e.frameRateDecoded,o=e.bitrate,a={pts:0,stall:{stallCount500ms:0,stallDuration500ms:0,stallRate500ms:0,stallCount100ms:0,stallDuration100ms:0,stallRate100ms:0},pauseDuration:this._getPauseDuration()};if(this._stallList&&"visible"===document.visibilityState&&!this._isPaused){var s;if((LP()||CP())&&(0===o||(i||1/0)<=1||(n||1/0)<=1)||0===this._stallList.length)a.stall.stallDuration500ms=r,a.stall.stallCount500ms=this._videoInWaiting500ms?0:1,a.stall.stallRate500ms=1,this._videoInWaiting500ms=!0,this._support100msStall&&(a.stall.stallDuration100ms=r,a.stall.stallCount100ms=this._videoInWaiting100ms?0:1,a.stall.stallRate100ms=1,this._videoInWaiting100ms=!0);else ud(s=this._stallList).call(s,(function(e,n){var i=e.timeUpdateInterval,o=e.playTime,s=i;0===n&&(t._videoInWaiting100ms||t._videoInWaiting500ms)&&(s=Math.round(i%r)),i>t._stallTimeThreshold.stall500ms?(a.stall.stallDuration500ms+=s,t._videoInWaiting500ms||a.stall.stallCount500ms++,t._videoInWaiting500ms=!0):t._videoInWaiting500ms=!1,t._support100msStall&&(i>t._stallTimeThreshold.stall100ms?(a.stall.stallDuration100ms+=s,t._videoInWaiting100ms||a.stall.stallCount100ms++,t._videoInWaiting100ms=!0):t._videoInWaiting100ms=!1),a.pts=o}));var l=a.stall,u=l.stallDuration500ms,c=l.stallDuration100ms;a.stall.stallRate500ms=Math.min(Number((u/r).toFixed(4)),1),this._support100msStall&&c?a.stall.stallRate100ms=Math.min(Number((c/r).toFixed(4)),1):(delete a.stall.stallRate100ms,delete a.stall.stallCount100ms,delete a.stall.stallDuration100ms),this._stallList=[]}return a}},{key:"_getPauseDuration",value:function(){var e=this._pauseDuration;if(this._pauseDuration=0,this._isPaused){var t=GE(),r=t-(this._pauseStart||0);r>500&&(this._pauseStart=t,e+=r)}return e}},{key:"_onVideoPause",value:function(){this._isPaused=!0,this._pauseStart=GE(),this._framePause()}},{key:"_onVideoPlay",value:function(){this._isPaused=!1;var e=GE()-this._pauseStart;e>500&&(this._pauseDuration+=e)}},{key:"_onVideoTimeupdate",value:function(e){if(e&&0!==e.currentTime)if(void 0!==this._prePts){if(this._stallList||(this._stallList=[]),e.currentTime>this._prePts){var t=e.currentTime-this._prePts;this._stallList.push({playTime:e.currentTime,timeUpdateInterval:Math.round(1e3*t)})}this._prePts=e.currentTime}else this._prePts=e.currentTime}},{key:"_onVideoRefresh",value:function(e,t){if(this._stallList||(this._stallList=[]),this._prePts){var r=t.presentationTime-this._prePts;this._stallList.push({playTime:t.presentationTime,timeUpdateInterval:Math.round(r)})}var n;(this._prePts=t.presentationTime,this._player)&&this._player.requestVideoFrameCallback(Iy(n=this._onVideoRefresh).call(n,this))}}]),e}();function IP(e){return PP.apply(this,arguments)}function PP(){return(PP=Tg(kg().mark((function e(t){var r,n;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={},e.next=3,t;case 3:return n=e.sent,r.timestamp=GE(),null==n||ud(n).call(n,(function(e){"inbound-rtp"===e.type?(r.packetsLost=e.packetsLost,r.packetsReceived=e.packetsReceived,r.bytesReceived=e.bytesReceived,void 0!==e.jitterBufferDelay&&(r.jitterBufferDelay=e.jitterBufferDelay,r.jitterBufferEmittedCount=e.jitterBufferEmittedCount),void 0!==e.totalSamplesReceived&&(r.totalSamplesReceived=e.totalSamplesReceived,r.concealedSamples=e.concealedSamples,r.silentConcealedSamples=e.silentConcealedSamples,r.concealmentEvents=e.concealmentEvents),void 0!==e.fecPacketsReceived&&(r.fecPacketsReceived=e.fecPacketsReceived),void 0!==e.estimatedPlayoutTimestamp&&(r.estimatedPlayoutTimestamp=e.estimatedPlayoutTimestamp),void 0!==e.totalSamplesDuration&&(r.totalSamplesDuration=e.totalSamplesDuration)):"codec"===e.type?(r.recordSampleRate=e.clockRate,e.channels&&(r.numChannels=e.channels),r.codecType=e.mimeType):"candidate-pair"===e.type?(r.rtt=1e3*e.currentRoundTripTime,r.total_rtt=1e3*e.totalRoundTripTime):"track"===e.type&&void 0!==e.audioLevel||e.type})),e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function DP(e,t){var r=jP(e,t,"timestamp"),n=jP(e,t,"packetsLost"),i=Math.round(jP(e,t,"jitterBufferDelay")/jP(e,t,"jitterBufferEmittedCount")*1e3),o=jP(e,t,"packetsReceived");return{audioLossRate:+(n/(o+n)).toFixed(2),receivedKBitrate:+(8*jP(e,t,"bytesReceived")/r).toFixed(2),statsInterval:r,rtt:t.rtt||0,jitterBufferDelay:i,packetsReceived:o,numChannels:t.numChannels||1,estimatedPlayoutTimestamp:t.estimatedPlayoutTimestamp,samplesDuration:Math.round(1e3*jP(e,t,"totalSamplesDuration")),receivedSampleRate:jP(e,t,"totalSamplesReceived")/r,concealedSamples:Math.round(jP(e,t,"concealedSamples")),concealmentEvent:Math.round(jP(e,t,"concealmentEvents")),e2eDelay:Math.round((t.rtt||0)+i)}}function AP(e){return FP.apply(this,arguments)}function FP(){return(FP=Tg(kg().mark((function e(t){var r,n;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={},e.next=3,t;case 3:return n=e.sent,r.timestamp=GE(),null==n||ud(n).call(n,(function(e){"inbound-rtp"===e.type?(r.packetsLost=e.packetsLost,r.packetsReceived=e.packetsReceived,r.bytesReceived=e.bytesReceived,r.framesDecoded=e.framesDecoded,r.totalDecodeTime=e.totalDecodeTime,r.framesReceived=e.framesReceived,r.keyFramesDecoded=e.keyFramesDecoded,r.framesDropped=e.framesDropped,r.firCount=e.firCount,r.nackCount=e.nackCount,r.pliCount=e.pliCount,void 0!==e.jitterBufferDelay&&(r.jitterBufferEmittedCount=e.jitterBufferEmittedCount,r.jitterBufferDelay=e.jitterBufferDelay),void 0!==e.frameWidth&&(r.width=e.frameWidth,r.height=e.frameHeight),void 0!==e.estimatedPlayoutTimestamp&&(r.estimatedPlayoutTimestamp=e.estimatedPlayoutTimestamp)):"track"===e.type&&void 0!==e.frameWidth?(r.width=e.frameWidth,r.height=e.frameHeight,void 0!==e.framesReceived&&(r.framesReceived=e.framesReceived)):"codec"===e.type?r.codecType=e.mimeType:"candidate-pair"===e.type&&(r.rtt=1e3*e.currentRoundTripTime,r.totalRtt=1e3*e.totalRoundTripTime)})),e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ZP(e,t){var r=jP(e,t,"timestamp"),n=jP(e,t,"packetsLost"),i=jP(e,t,"nackCount"),o=jP(e,t,"packetsReceived"),a=Math.round(jP(e,t,"jitterBufferDelay")/jP(e,t,"jitterBufferEmittedCount")*1e3),s=(t.width||0)*(t.height||0),l=(e.width||0)*(e.height||0);return{statsInterval:r,abrState:0===s||0===l?"none":s>l?"upgrade":s<l?"degrade":"none",width:t.width||0,height:t.height||0,estimatedPlayoutTimestamp:t.estimatedPlayoutTimestamp,videoLossRate:+(n/(jP(e,t,"packetsReceived")+n)).toFixed(2),receivedKBitrate:+(8*jP(e,t,"bytesReceived")/r).toFixed(2),decoderOutputFrameRate:Math.round(1e3*jP(e,t,"framesDecoded")/r),receivedFrameRate:Math.round(1e3*jP(e,t,"framesReceived")/r),rtt:t.rtt||0,totalRtt:Math.round(t.totalRtt||0),jitterBufferDelay:a,codecType:t.codecType,packetsReceived:o,avgDecodeDelay:Math.round(1e3*jP(e,t,"totalDecodeTime")/jP(e,t,"framesDecoded")),keyFramesDecoded:jP(e,t,"keyFramesDecoded"),framesDropped:jP(e,t,"framesDropped"),firCount:jP(e,t,"firCount"),nackCount:i,pliCount:jP(e,t,"pliCount"),e2eDelay:Math.round((t.rtt||0)+a),retransmittedRate:+(i/(o+n)).toFixed(2)}}function jP(e,t,r){var n=cR(e[r])?0:+e[r],i=cR(t[r])?0:+t[r];return Math.max(0,i-n)}var VP=1,WP=2,MP=3,NP=1,GP=2,HP=3,UP=4,XP=5,BP=6,KP=function(){function e(t,r){Eg(this,e),this._peer=t,this._networkQualityParams=r,this._preDownlinkStats=[]}return Lg(e,[{key:"getDownlinkQuality",value:function(e,t){if(0!==e.receivedKBitrate||0!==t.receivedKBitrate){if("connected"!==this._peer.connectionState&&"connecting"!==this._peer.connectionState||!navigator.onLine)return[BP,{}];var r,n,i,o=this._getQosLevel(e.rtt,e.audioLossRate,t.retransmittedRate),a=this._getDownlinkQoE("audio",e.stallDuration/e.statsInterval,e.e2eDelay),s=this._getNetworkQuality(o,a),l=this._getQosLevel(t.rtt,t.videoLossRate,t.retransmittedRate),u=this._getDownlinkQoE("video",t.stallDuration/t.statsInterval,t.e2eDelay),c=this._getNetworkQuality(l,u),d=s&&c?Math.ceil((s+c)/2):s||c,f=o&&l?Math.ceil((o+l)/2):o||l;if(d)return this._preDownlinkStats=py(r=jk(n=[]).call(n,jg(this._preDownlinkStats),[d])).call(r,-2),[Math.floor(BO(i=this._preDownlinkStats).call(i,(function(e,t){return t+e}),0)/this._preDownlinkStats.length),{qualityQos:f,audioLevel:s,videoLevel:c,audioQos:o,audioQoe:a,videoQos:l,videoQoe:u}]}}},{key:"destroy",value:function(){this._preDownlinkStats=[]}},{key:"_getQosLevel",value:function(e,t,r){var n,i=this._networkQualityParams.networkQos;return n=(!e||e<=i[NP].maxRtt)&&t<=i[NP].maxLoss?NP:(!e||e<=i[GP].maxRtt)&&t<=i[GP].maxLoss?GP:(!e||e<=i[HP].maxRtt)&&t<=i[HP].maxLoss?HP:(!e||e<=i[UP].maxRtt)&&t<=i[UP].maxLoss?UP:XP,r>(i[UP].minRetransmittedRate||.5)?n=Math.max(n,UP):r>(i[HP].minRetransmittedRate||.35)?n=Math.max(n,HP):r>(i[GP].minRetransmittedRate||.2)&&(n=Math.max(n,GP)),n}},{key:"_getDownlinkQoE",value:function(e,t,r){var n=this._networkQualityParams.networkQoe,i={audio:{delay:n.audioDelay,stallRadio:n.audioStallRadio},video:{delay:n.videoDelay,stallRadio:n.videoStallRadio}}[e];return t>i.stallRadio||r>i.delay||t>i.stallRadio/2&&r>i.delay/2?MP:(t>i.stallRadio/2||i.delay,WP)}},{key:"_getNetworkQuality",value:function(e,t){return t===VP?Math.max(e-2,1):t===WP?e:Math.min(e+1,5)}}]),e}(),YP=[KI.LOAD_START,KI.OFFER_SDP_READY,KI.ANSWER_SDP_RECV,KI.ANSWER_SDP_READY,KI.ICE_CONNECTED,KI.DTLS_CONNECTED,KI.PEER_CONNECTED,KI.FIRST_PACKET_RECV,KI.FIRST_FRAME_RECV,KI.FIRST_FRAME_DECODED,KI.VIDEO_LOADEDDATA,KI.VIDEO_CANPLAY,KI.VIDEO_PLAYING],JP=function(){function e(t){var r=this;Eg(this,e),this._emitFirstFrameState=t,this._startConnectTs=0,this._firstVideoFrameInterval=null,this._preState=null,this._state={},this._pc=null,this._video=null,this._videoTransceiver=null,this._extraInfo={is_preload:!1},this._handleConnectionStateChange=function(){var e;"connected"===(null===(e=r._pc)||void 0===e?void 0:e.connectionState)&&r._videoTransceiver&&(r.changeFirstFrameState(KI.PEER_CONNECTED),r._watchForFirstVideoFrameRecv(r._videoTransceiver))},this._handleICEConnectionStateChange=function(){var e;"connected"===(null===(e=r._pc)||void 0===e?void 0:e.iceConnectionState)&&r.changeFirstFrameState(KI.ICE_CONNECTED)},this._handlePlaying=function(){r._state[KI.PEER_CONNECTED]&&(r.changeFirstFrameState(KI.VIDEO_PLAYING),r.reset())},this._handleCanplay=function(){r._state[KI.PEER_CONNECTED]&&r.changeFirstFrameState(KI.VIDEO_CANPLAY)},this._handleLoadeddata=function(){r._state[KI.PEER_CONNECTED]&&r.changeFirstFrameState(KI.VIDEO_LOADEDDATA)},this._handleError=function(){r.reset()}}return Lg(e,[{key:"start",value:function(){this.reset(),this._startConnectTs=GE(),this.changeFirstFrameState(KI.LOAD_START)}},{key:"changeFirstFrameState",value:function(e){var t,r,n=this,i=null!==(t=this._preState&&rg(YP).call(YP,this._preState))&&void 0!==t?t:-1,o=rg(YP).call(YP,e),a=GE()-this._startConnectTs;o>i&&(ud(r=py(YP).call(YP,i+1,o+1)).call(r,(function(e){n._state[e]=a})),this._preState=e)}},{key:"setIsPreload",value:function(e){this._extraInfo.is_preload=e}},{key:"setFailureReason",value:function(e){this._extraInfo.failure_reason=e}},{key:"bindEvents",value:function(e,t,r){var n=this;this._pc=e,this._video=r,this._videoTransceiver=t,e.addEventListener("connectionstatechange",this._handleConnectionStateChange),e.addEventListener("iceconnectionstatechange",this._handleICEConnectionStateChange);var i=((null==t?void 0:t.receiver)||{}).transport;i&&(i.onstatechange=function(){"connected"===i.state&&n.changeFirstFrameState(KI.DTLS_CONNECTED)}),null==r||r.addEventListener("playing",this._handlePlaying),null==r||r.addEventListener("canplay",this._handleCanplay),null==r||r.addEventListener("loadeddata",this._handleLoadeddata),null==r||r.addEventListener("error",this._handleError)}},{key:"_watchForFirstVideoFrameRecv",value:function(e){var t=this,r=!1,n=!1,i=!1;this._cancelWatchForFirstVideoFrameRecv(),this._firstVideoFrameInterval=AT(Tg(kg().mark((function o(){var a,s,l,u,c,d;return kg().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return u=e.receiver,o.next=3,u.getStats();case 3:c=o.sent,ud(c).call(c,(function(e){"inbound-rtp"===e.type&&(d=e)})),!r&&null!==(a=d)&&void 0!==a&&a.packetsReceived&&d.packetsReceived>0&&(r=!0,t.changeFirstFrameState(KI.FIRST_PACKET_RECV)),!n&&null!==(s=d)&&void 0!==s&&s.framesReceived&&d.framesReceived>0&&(n=!0,t.changeFirstFrameState(KI.FIRST_FRAME_RECV)),!i&&null!==(l=d)&&void 0!==l&&l.framesDecoded&&d.framesDecoded>0&&(i=!0,t.changeFirstFrameState(KI.FIRST_FRAME_DECODED),t._cancelWatchForFirstVideoFrameRecv());case 8:case"end":return o.stop()}}),o)}))),200)}},{key:"_cancelWatchForFirstVideoFrameRecv",value:function(){this._firstVideoFrameInterval&&(window.clearInterval(this._firstVideoFrameInterval),this._firstVideoFrameInterval=null)}},{key:"reset",value:function(){var e,t,r,n,i,o,a=this;if(Dc(this._state).length>0){var s=Sg({},this._state),l=Sg({},this._extraInfo);zP(this._videoTransceiver,l).then((function(){a._emitFirstFrameState(s,l)}))}this._preState=null,this._extraInfo={is_preload:!1},this._state={},null===(e=this._video)||void 0===e||e.removeEventListener("playing",this._handlePlaying),null===(t=this._video)||void 0===t||t.removeEventListener("canplay",this._handleCanplay),null===(r=this._video)||void 0===r||r.removeEventListener("loadeddata",this._handleLoadeddata),null===(n=this._video)||void 0===n||n.removeEventListener("error",this._handleError),null===(i=this._pc)||void 0===i||i.removeEventListener("connectionstatechange",this._handleConnectionStateChange),null===(o=this._pc)||void 0===o||o.removeEventListener("iceconnectionstatechange",this._handleICEConnectionStateChange),this._cancelWatchForFirstVideoFrameRecv(),this._pc=null,this._video=null,this._videoTransceiver=null}}]),e}(),zP=function(){var e=Tg(kg().mark((function e(t,r){var n,i,o,a,s;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null==t||null===(n=t.receiver)||void 0===n?void 0:n.getStats().catch((function(){}));case 2:null==(i=e.sent)||ud(i).call(i,(function(e){"candidate-pair"===e.type&&(o=e,a=i.get(e.localCandidateId),s=i.get(e.remoteCandidateId))})),s&&(r.remote_ip=s.ip||s.address,r.remote_port=s.port,r.remote_candidate_type=s.candidateType,r.protocol=s.protocol),a&&(r.local_ip=a.ip||a.address,r.local_port=a.port,r.local_candidate_type=a.candidateType),o&&(r.rtt=o.currentRoundTripTime,r.stun_requests_sent=o.requestsSent,r.stun_requests_received=o.requestsReceived,r.stun_responses_sent=o.responsesSent,r.stun_responses_received=o.responsesReceived);case 7:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),QP=r(te.URLSearchParams);function qP(e,t){var r,n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if("string"!=typeof e||"string"!=typeof t)return!1;Lx(e).call(e,"://")||(e=window.location.protocol+"//"+e),Lx(t).call(t,"://")||(t=window.location.protocol+"//"+t);try{r=new kk(e),n=new kk(t)}catch(l){return!1}if(r.host+r.pathname!==n.host+n.pathname)return!1;var o,a=function(e,t){var r=void 0!==kc&&Oc(e)||e["@@iterator"];if(!r){if(ng(e)||(r=Vg(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(i);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(r.searchParams.get(s)!==n.searchParams.get(s))return!1}}catch(u){a.e(u)}finally{a.f()}return!0}function $P(e,t){var r;if(!t||0===Dc(t).length)return e;var n=Lx(e).call(e,"?")?new QP(e.split("?")[1]):new QP;return ud(r=Dc(t)).call(r,(function(e){n.set(e,t[e])})),e.split("?")[0]+"?"+n.toString()}var eD=function(){function e(){var t=this;Eg(this,e),this._onVideoRefresh=function(e,r){var n;t._recentVideoInfo=r,t._requestVideoFrameCallbackTimer=null===(n=t._domElement)||void 0===n?void 0:n.requestVideoFrameCallback(t._onVideoRefresh)}}return Lg(e,[{key:"start",value:function(e){var t,r=this;(this._domElement=e,"function"==typeof HTMLVideoElement.prototype.requestVideoFrameCallback)&&(e&&(this._requestVideoFrameCallbackTimer=e.requestVideoFrameCallback(Iy(t=this._onVideoRefresh).call(t,this)),this._removeHandler=function(){r._requestVideoFrameCallbackTimer&&(null==e||e.cancelVideoFrameCallback(r._requestVideoFrameCallbackTimer))}))}},{key:"stop",value:function(){var e;delete this._recentVideoInfo,delete this._domElement,null===(e=this._removeHandler)||void 0===e||e.call(this),delete this._removeHandler}},{key:"getRecentRenderInfo4Report",value:function(){var e,t=this,r={};this._recentVideoInfo&&ud(e=Dc(this._recentVideoInfo)).call(e,(function(e){var n,i=e.replace(/[a-z]{1}[A-Z]{1}/g,(function(e){var t;return jk(t="".concat(e[0],"_")).call(t,e[1].toLowerCase())}));r["video_".concat(i)]=null===(n=t._recentVideoInfo)||void 0===n?void 0:n[e]}));return r}}]),e}(),tD=new fI("rts"),rD=function(e){Og(s,e);var t,r,n,i,o,a=Fg(s);function s(e){var t,r;return Eg(this,s),(r=a.call(this))._url="",r._pc=null,r._audioTransceicer=null,r._videoTransceicer=null,r._mediaStream=null,r._lastMediaStream=null,r._loader=null,r._networkEvaluate=null,r._retry=0,r._player=null,r._waitingTimer=0,r._rctConnectStartTs=0,r._isReplacing=!1,r._firstFrameObserver=new JP(Iy(t=r._emitFirstFrameState).call(t,Ag(r))),r._audio=null,r._video=null,r._preAudioStats=null,r._preVideoStats=null,r._rtcReportTimer=null,r._networkQualityResult=[],r._videoJitterBufferDelay=0,r._checkStatsError=Tg(kg().mark((function e(){return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r._checkStatsErrorTimer&&clearTimeout(r._checkStatsErrorTimer),r._checkStatsErrorTimer=o_(Tg(kg().mark((function e(){var t,n,i;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.getStatsSnapshoot();case 2:(t=e.sent).video&&(n=t.video,i=n.framesDecoded,n.bytesReceived?i||r._emitError(aI.create(eI,iI.MEDIA_ERR_DECODE,{message:"rts decode error"})):r._emitError(aI.create(eI,iI.MEDIA_ERR_DECODE,{message:"rts receive empty"})));case 4:case"end":return e.stop()}}),e)}))),r._opts.checkStatsErrorDelay);case 2:case"end":return e.stop()}}),e)}))),r._onTrack=function(e){tD.log("addTrack: ",e.track,e.streams),"audio"===e.track.kind?r._audio=e.track:r._video=e.track},r._mockWaitingByTimeupdate=function(){var e,t;"connected"!==(null===(e=r._pc)||void 0===e?void 0:e.connectionState)&&"connected"!==(null===(t=r._pc)||void 0===t?void 0:t.iceConnectionState)||(clearTimeout(r._waitingTimer),r._waitingTimer=o_((function(){var e;null!==(e=r._player)&&void 0!==e&&e.paused||r.emit("waiting")}),r._opts.stallInterval))},r._onLoadedData=function(){tD.log("loadeddata emit"),r.getStatsSnapshoot().then((function(e){r.emit(FI,{type:"video",elapsed:GE()-r._rctConnectStartTs,meta:e.video}),r.emit(FI,{type:"audio",elapsed:GE()-r._rctConnectStartTs,meta:e.audio})}))},r._setDelay=function(e){if(r._opts.progressiveSetDelay)r._startSetDelayLoop(e);else{var t,n,i=Pk(t=["playoutDelayHint","jitterBufferDelayHint","jitterBufferTarget"]).call(t,(function(e){var t,n;return e in((null===(t=r._audioTransceicer)||void 0===t?void 0:t.receiver)||{})&&e in((null===(n=r._videoTransceicer)||void 0===n?void 0:n.receiver)||{})}));if(!i)return;if(e="number"==typeof e&&e>0?e:null,(null===(n=r._audioTransceicer)||void 0===n?void 0:n.receiver[i])===e)return;r._audioTransceicer.receiver[i]=e,r._videoTransceicer.receiver[i]=e}},r._targetDelayHint=null,r._setDelayError=null,r._startSetDelayLoop=function(){var e=Tg(kg().mark((function e(t){var n,i,o,a,s,l,u,c,d;return kg().wrap((function(e){for(var f;;)switch(e.prev=e.next){case 0:if(n=Pk(f=["playoutDelayHint","jitterBufferDelayHint","jitterBufferTarget"]).call(f,(function(e){var t,n;return e in((null===(t=r._audioTransceicer)||void 0===t?void 0:t.receiver)||{})&&e in((null===(n=r._videoTransceicer)||void 0===n?void 0:n.receiver)||{})}))){e.next=3;break}return e.abrupt("return");case 3:if(t="number"==typeof t&&t>0?t:null,r._targetDelayHint!==t){e.next=6;break}return e.abrupt("return");case 6:if(tD.log("_startSetDelayLoop()","invoked, delayHint: ".concat(t)),r._targetDelayHint=t,!r._setDelayTimer){e.next=10;break}return e.abrupt("return");case 10:i=null,o=null,a=r._opts.adaptiveJitterBuffer,s=a.loopInterval,l=a.maxAvSyncDelay,u=a.maxJitterBufferDiff,c=a.maxStep,d=0,r._setDelayTimer=AT(Tg(kg().mark((function e(){var t,a,s,f,h,p,v,m,y,g,_,b,w,S,k,R;return kg().wrap((function(e){for(var T,E,x,L,C;;)switch(e.prev=e.next){case 0:if(e.prev=0,null!==(t=r._audioTransceicer)&&void 0!==t&&t.receiver&&null!==(a=r._videoTransceicer)&&void 0!==a&&a.receiver){e.next=5;break}return i=null,o=null,e.abrupt("return");case 5:if((s=r._audioTransceicer.receiver[n])!==r._targetDelayHint){e.next=8;break}return e.abrupt("return");case 8:return f=1e3*(r._targetDelayHint||0),h=1e3*s,e.next=12,Mm.all([IP(r._audioTransceicer.receiver.getStats()),AP(r._videoTransceicer.receiver.getStats())]);case 12:if(p=e.sent,v=Zg(p,2),m=v[0],y=v[1],!i||!o){e.next=36;break}if(g=DP(i,m),(_=ZP(o,y)).estimatedPlayoutTimestamp&&g.estimatedPlayoutTimestamp&&(b=_.estimatedPlayoutTimestamp-g.estimatedPlayoutTimestamp),w=g.jitterBufferDelay,S=_.jitterBufferDelay,!w||!S){e.next=36;break}if(!(Math.abs(w-S)>l||b&&Math.abs(b)>l)){e.next=27;break}return d++>8&&S>w&&(r._audioTransceicer.receiver[n]=Math.min(S/1e3,r._targetDelayHint||0),d=0),tD.log(jk(T=jk(E=jk(x="av_jb_diff(".concat(w-S,"=")).call(x,w,"-")).call(E,S,") or av_sync_diff(")).call(T,b,") too much, skip setting")),e.abrupt("return");case 27:if(d=0,null===s||!(Math.abs(w-h)>u||Math.abs(S-h)>u)){e.next=31;break}return tD.log(jk(L="audio(".concat(w-h,"),video(")).call(L,S-h,"). current_target_diff too much, skip setting")),e.abrupt("return");case 31:k=f>(h||w)?1:-1,R=(R=(Math.abs(f-(h||w))>c?(h||w)+k*c:f)/1e3)>.2?R:null,tD.log(jk(C="set receiver.".concat(n," = ")).call(C,R)),r._audioTransceicer.receiver[n]=R;case 36:i=m,o=y,e.next=44;break;case 40:e.prev=40,e.t0=e.catch(0),tD.error("set delay loop error:",e.t0),r._setDelayError=e.t0.message||e.t0.toString()||"unknown error";case 44:case"end":return e.stop()}}),e,null,[[0,40]])}))),s);case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),r._getDelay=function(){try{var e,t,n=Pk(e=["playoutDelayHint","jitterBufferDelayHint","jitterBufferTarget"]).call(e,(function(e){var t,n;return e in((null===(t=r._videoTransceicer)||void 0===t?void 0:t.receiver)||{})&&e in((null===(n=r._audioTransceicer)||void 0===n?void 0:n.receiver)||{})}));if(!n)return;return null===(t=r._audioTransceicer)||void 0===t?void 0:t.receiver[n]}catch(oD){tD.error("get delay error")}},r._onLoaderRetry=function(e,t){console.log(e,"retryTime",t),r.emit(AI,{error:aI.network(e),retryTime:t})},r._opts=function(e){var t=e||{},r=t.adaptiveJitterBuffer,n=void 0===r?{}:r,i=Dg(t,sP);return Sg({retryCount:0,retryDelay:1e3,loadTimeout:5e3,stallInterval:400,networkEvaluateInterval:1e3,delayHint:0,videoDelaySync:!1,seamlesslyReload:!1,enableSei:!1,enableOriginSdpLogger:!1,checkStatsErrorDelay:5e3,connectionStateChangeTimeout:5e3,enableNetworkQuality:!0,hackCreateOfferIssue:!1,progressiveSetDelay:!1,networkQuality:{networkQos:{1:{maxRtt:250,maxLoss:.15},2:{maxRtt:500,maxLoss:.3,minRetransmittedRate:.2},3:{maxRtt:750,maxLoss:.45,minRetransmittedRate:.35},4:{maxRtt:1e3,maxLoss:.6,minRetransmittedRate:.5}},networkQoe:{audioDelay:2e3,audioStallRadio:.3,videoDelay:2e3,videoStallRadio:.6}},enableAdaptiveJitterBuffer:!1,adaptiveJitterBuffer:Sg({networkWindow:3,windowMethod:"max",loopInterval:500,maxAvSyncDelay:400,maxJitterBufferDiff:500,maxStep:500},n),networkStrategy:{1:{jitterBuffer:null},2:{jitterBuffer:1.5},3:{jitterBuffer:2},4:{jitterBuffer:3},5:{jitterBuffer:3}}},i)}(e),r._media=r._opts.media,r._player=r._opts.player||null,r._loader=new XI(Sg(Sg({},e.fetchOptions),{},{responseType:"json",method:"POST",retry:r._opts.retryCount,retryDelay:r._opts.retryDelay,timeout:r._opts.loadTimeout,onRetryError:r._onLoaderRetry,logger:tD})),r._retry=r._opts.retryCount||0,r._preloadPromise=r._opts.preloadPromise,r._bindMediaEvent(),tD.log("constructor()",e),r._changeVolumeInHarmonyWorkaround(),r._mutedBeforePlayingWorkaround(),r._opts.mediaStream&&r._opts.seamlesslyReload&&(r._lastMediaStream=r._opts.mediaStream),r}return Lg(s,[{key:"pc",get:function(){return this._pc}},{key:"audioTrack",get:function(){return this._audio}},{key:"videoTack",get:function(){return this._video}},{key:"getJitterBufferDelay",value:function(){return this._videoJitterBufferDelay}},{key:"loader",get:function(){return this._loader}},{key:"networkStats",get:function(){var e;return null===(e=this._networkEvaluate)||void 0===e?void 0:e.getStats()}},{key:"getStats",value:(o=Tg(kg().mark((function e(){return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",lP(this._pc));case 1:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"getStatsSnapshoot",value:function(){return this.getStats().then((function(e){return cP(e)}))}},{key:"load",value:(i=Tg(kg().mark((function e(t,r){var n,i,o,a,s,l,u=this;return kg().wrap((function(e){for(var c;;)switch(e.prev=e.next){case 0:if(tD.log("load()",'invoked, url: "'.concat(t,'"')),this._disconnect(r||"invoke load"),this._url=t,n=this._pc,!this._opts.hackCreateOfferIssue){e.next=7;break}return e.next=7,this._createEmptyPeer();case 7:if(e.prev=7,this._firstFrameObserver.start(),!this._preloadPromise){e.next=38;break}if(tD.log("load()","in preload process..."),e.prev=11,this._firstFrameObserver.setIsPreload(!0),qP(this._url,this._preloadPromise.url,["tabr_start_bitrate"])){e.next=17;break}throw o=jk(c="preload url not match, current url: ".concat(this._url,", preload url: ")).call(c,this._preloadPromise.url),delete this._preloadPromise,new Error(o);case 17:return a=this._preloadPromise.promise,delete this._preloadPromise,e.next=21,a;case 21:if("have-local-offer"===(s=e.sent).pc.signalingState){e.next=24;break}throw new Error('pc.signalingState not equal "have-local-offer", current state is '.concat(s.pc.signalingState));case 24:this._pc=s.pc,i=s.answerSdp,this._videoTransceicer=s.videoTransceiver,this._audioTransceicer=s.audioTransceiver,this._opts.enableSei&&(this.initVideoEncodedTransform(),this.initAudioEncodedTransform()),e.next=36;break;case 31:return e.prev=31,e.t0=e.catch(11),tD.warn("load()","preload failed, ".concat(e.t0.message||e.t0.toString())),this.load(t,e.t0.message||e.t0.toString()),e.abrupt("return");case 36:e.next=44;break;case 38:return l=vP(),tD.log("load()","isLegacyEncodedTransformSupported: ".concat(l)),this._pc=new RTCPeerConnection({encodedInsertableStreams:!(!l||!this._opts.enableSei)||void 0}),e.next=43,this._getAnswerSdp(this._pc);case 43:i=e.sent;case 44:return this._bindRTCEvents(this._pc),e.next=47,this._handleAnswerSdp(this._pc,i);case 47:n&&n.close(),e.next=53;break;case 50:e.prev=50,e.t1=e.catch(7),o_((function(){return u._emitError(aI.create(rI,null,e.t1))}));case 53:case"end":return e.stop()}}),e,this,[[7,50],[11,31]])}))),function(e,t){return i.apply(this,arguments)})},{key:"switchURL",value:function(e){tD.log("switchURL()",'invoked, url: "'.concat(e,'"')),this.load(e||this._url,"invoke switchURL")}},{key:"_bindRTCEvents",value:function(e){var t=this;e.addEventListener("track",this._onTrack),e.addEventListener("connectionstatechange",(function(){if(tD.warn("onconnectionstatechange:",e.connectionState),t._clearPeerStateTimeout(),t.emit(BI.RTC_STATE_CHANGE,{state:e.connectionState,url:t._url}),"disconnected"!==e.connectionState&&"failed"!==e.connectionState||(t.emit("waiting"),t._stopRtcReport()),"failed"===e.connectionState){if(0===t._retry)return void t._emitError(aI.network(new Error("rtc connect failed")));t._retry--,t.load(t._url,"rtc connect failed")}"connected"===e.connectionState&&(t._handleMediaStream(),t.emit(OI,{url:t._url,responseUrl:t._url,elapsed:GE()-t._rctConnectStartTs}),t._checkStatsError(),t._startRtcReport())}))}},{key:"_handleMediaStream",value:function(){var e=this;if(this._lastMediaStream){var t,r,n,i=this._lastMediaStream.getVideoTracks()[0],o=this._lastMediaStream.getAudioTracks()[0];i&&this._lastMediaStream.removeTrack(i),o&&this._lastMediaStream.removeTrack(o),this._mediaStream=this._lastMediaStream,this._audio&&this._mediaStream.addTrack(this._audio),this._video&&this._mediaStream.addTrack(this._video),this._isReplacing=!0,null===(t=this._player)||void 0===t||t.pause(),null===(r=this._player)||void 0===r||null===(n=r.play())||void 0===n||n.finally((function(){e._isReplacing=!1}))}else this._mediaStream=new MediaStream,this._audio&&this._mediaStream.addTrack(this._audio),this._video&&this._mediaStream.addTrack(this._video),this._media&&(this._media.srcObject=this._mediaStream)}},{key:"initVideoEncodedTransform",value:function(){var e=this;if(this._videoTransceicer&&this._videoTransceicer.receiver){var t=this._videoTransceicer.receiver;if(vP()){var r=t.createEncodedStreams(),n=r.readable,i=r.writable;n.pipeThrough(wP((function(t){e.emit(ZI,t)}))).pipeTo(i)}else if("undefined"!=typeof TransformStream&&"undefined"!=typeof RTCRtpSender&&"undefined"!=typeof RTCRtpReceiver&&"undefined"!=typeof RTCRtpScriptTransform&&"transform"in RTCRtpSender.prototype&&"transform"in RTCRtpReceiver.prototype&&hP()&&pP()){var o=new RP,a=new MessageChannel;this._videoTransceicer.receiver.transform=new RTCRtpScriptTransform(o,{port:a.port2},[a.port2]),a.port1.onmessage=function(t){e.emit(ZI,t.data)}}}else console.log("no receiver found when trying to bind encodedTransform")}},{key:"initAudioEncodedTransform",value:function(){if(this._audioTransceicer&&this._audioTransceicer.receiver)if(vP()){var e=this._audioTransceicer.receiver.createEncodedStreams(),t=e.readable,r=e.writable;t.pipeThrough(new TransformStream({transform:function(e,t){e.data.byteLength<=1e3?t.enqueue(e):tD.log("too large audio frame",e.data.byteLength)}})).pipeTo(r)}else tD.warn("legacy EncodedTransform is not supported");else tD.warn("no receiver found when trying to bind encodedTransform")}},{key:"_bindMediaEvent",value:function(){var e,t;null===(e=this._media)||void 0===e||e.addEventListener("timeupdate",this._mockWaitingByTimeupdate),null===(t=this._media)||void 0===t||t.addEventListener("loadeddata",this._onLoadedData)}},{key:"_getAnswerSdp",value:(n=Tg(kg().mark((function e(t){var r,n,i,o,a,s,l,u,c,d,f,h,p,v;return kg().wrap((function(e){for(var m,y,g,_,b;;)switch(e.prev=e.next){case 0:if(tD.log("_getAnswerSdp()"),!t.addTransceiver){e.next=11;break}return this._audioTransceicer=t.addTransceiver("audio",{direction:"recvonly"}),this._videoTransceicer=t.addTransceiver("video",{direction:"recvonly"}),this._setDelay(this._opts.delayHint||null),this._opts.enableSei&&(this.initVideoEncodedTransform(),this.initAudioEncodedTransform()),e.next=8,t.createOffer();case 8:r=e.sent,e.next=14;break;case 11:return e.next=13,t.createOffer({iceRestart:!0,offerToReceiveAudio:!0,offerToReceiveVideo:!0});case 13:r=e.sent;case 14:if(this._opts.hackCreateOfferIssue&&this._createEmptyPeer(),tD.log("local offer",r),r.sdp){e.next=18;break}throw new Error("create offer failed");case 18:return i=YI.parse(r.sdp),ud(m=Gc(y=i.media).call(y,(function(e){return"audio"===e.type}))).call(m,(function(e){var t,r,n,i,o=null===(n=Gc(t=e.rtp).call(t,(function(e){return"opus"===e.codec}))[0])||void 0===n?void 0:n.payload;o&&(ud(r=e.fmtp).call(r,(function(e){e.payload===o&&(e.config="minptime=10;stereo=1;useinbandfec=1")})),null===(i=e.rtcpFb)||void 0===i||i.push({payload:o,type:"nack"}))})),ud(g=Gc(_=i.media).call(_,(function(e){return"video"===e.type}))).call(g,(function(e){var t;ud(t=e.fmtp).call(t,(function(e){var t;-1!==rg(t=e.config).call(t,"profile-level-id")&&(e.config="".concat(e.config,";sps-pps-idr-in-keyframe=1"))}))})),r.sdp=YI.write(i),tD.log("local offer modified:\n",r),e.next=25,t.setLocalDescription(r);case 25:return o=this._url,e.prev=26,this._opts.preProcessUrl&&(o=this._opts.preProcessUrl(o).url),o=$P(o,this._opts.urlParams),this._loader&&(this._loader.finnalUrl=o),c=/_?session_id=([^&$]+)/.exec(o),d=c?c[1]:GE()+"666",this._firstFrameObserver.changeFirstFrameState(KI.OFFER_SDP_READY),this.emit(II,{url:o,offersdp:null!==(a=this._opts)&&void 0!==a&&a.enableOriginSdpLogger?r.sdp:void 0,sessionId:d}),f=GE(),e.next=37,null===(s=this._loader)||void 0===s?void 0:s.load(o,{body:hx({sessionId:d,version:"1.0-html",localSdp:r})});case 37:if(h=e.sent,this.emit(PI,{headers:h.response.headers}),404!==(null==(p=null==h?void 0:h.data)?void 0:p.code)&&403!==(null==p?void 0:p.code)){e.next=45;break}return(v=aI.create(404===p.code?zO:JO,null,p)).errorType=KO,this._emitError(v),e.abrupt("return");case 45:if(200===(null==p?void 0:p.code)){e.next=47;break}throw new Error(jk(b="code: ".concat(null==p?void 0:p.code,", message:")).call(b,null==p?void 0:p.message));case 47:n=h.data.remoteSdp.sdp,this.emit(DI,{url:o,elapsed:GE()-f,answersdp:null!==(l=this._opts)&&void 0!==l&&l.enableOriginSdpLogger?n:void 0,parsedSdp:null==i||null===(u=i.media)||void 0===u?void 0:VR(u).call(u,(function(e){return{candidates:e.candidates,rtp:e.rtp,type:e.type}}))}),e.next=54;break;case 51:e.prev=51,e.t0=e.catch(26),this._emitError(aI.network(e.t0));case 54:return e.abrupt("return",n);case 55:case"end":return e.stop()}}),e,this,[[26,51]])}))),function(e){return n.apply(this,arguments)})},{key:"_handleAnswerSdp",value:(r=Tg(kg().mark((function e(t,r){var n,i;return kg().wrap((function(e){for(var o;;)switch(e.prev=e.next){case 0:if(tD.log("_handleAnswerSdp()","invoked, answerSdp:",{answerSdp:r}),r){e.next=3;break}return e.abrupt("return");case 3:if(this._firstFrameObserver.changeFirstFrameState(KI.ANSWER_SDP_RECV),n=YI.parse(r),ud(o=n.media).call(o,(function(e){var t,r;e.fingerprint&&(e.fingerprint.hash=e.fingerprint.hash.toUpperCase());var n=null===(t=e.ssrcs)||void 0===t||null===(r=Pk(t).call(t,(function(e){return"msid"===e.attribute})))||void 0===r?void 0:r.value;n&&!e.msid&&(e.msid=n)})),i=YI.write(n),tD.log("answer modified:\n",{answer:i}),this._rctConnectStartTs=GE(),"closed"!==t.signalingState){e.next=11;break}return e.abrupt("return");case 11:return e.next=13,t.setRemoteDescription({type:"answer",sdp:i});case 13:this._firstFrameObserver.changeFirstFrameState(KI.ANSWER_SDP_READY),this._networkEvaluate=new dP(t,this._opts.networkEvaluateInterval),this._listenPeerStateTimeout(),this._firstFrameObserver.bindEvents(t,this._videoTransceicer,this._media);case 17:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"_listenPeerStateTimeout",value:function(){var e=this;this._clearPeerStateTimeout(),this._opts.connectionStateChangeTimeout&&(this._peerStateTimer=o_((function(){e._emitError(aI.create(eI,iI.MEDIA_ERR_SRC_NOT_SUPPORTED,{message:"listen connectionstatechange timeout"}))}),this._opts.connectionStateChangeTimeout))}},{key:"_clearPeerStateTimeout",value:function(){this._peerStateTimer&&(clearTimeout(this._peerStateTimer),delete this._peerStateTimer)}},{key:"_startRtcReport",value:function(){var e=this;this._stopRtcReport();var t=function(){var t=Tg(kg().mark((function t(){var r,n,i,o,a,s,l,u,c,d,f,h,p,v,m,y,g,_,b,w,S,k,R,T,E,x,L;return kg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!==(r=e._audioTransceicer)&&void 0!==r&&r.receiver&&null!==(n=e._videoTransceicer)&&void 0!==n&&n.receiver){t.next=4;break}return e._preAudioStats=null,e._preVideoStats=null,t.abrupt("return");case 4:return!e._audioStallObserver&&e._audioTransceicer&&(e._audioStallObserver=new EP,e._audioStallObserver.start(e._audioTransceicer)),!e._videoStallObserver&&e._video&&e._media&&(e._videoStallObserver=new OP,e._videoStallObserver.start(e._media)),!e._frameRecvCallback&&e._media&&(e._frameRecvCallback=new eD,null===(i=e._frameRecvCallback)||void 0===i||i.start(e._media)),e._pc&&!e._networkQuality&&e._opts.enableNetworkQuality&&e._opts.networkQuality&&(e._networkQuality=new KP(e._pc,e._opts.networkQuality)),t.next=10,Mm.all([IP(e._audioTransceicer.receiver.getStats()),AP(e._videoTransceicer.receiver.getStats())]);case 10:if(o=t.sent,a=Zg(o,2),s=a[0],l=a[1],!e._preAudioStats||!e._preVideoStats){t.next=28;break}return b=DP(e._preAudioStats,s),w=ZP(e._preVideoStats,l),e._videoJitterBufferDelay=w.jitterBufferDelay,t.next=20,null===(u=e._audioStallObserver)||void 0===u?void 0:u.getAudioStallInfo();case 20:return S=t.sent,t.next=23,null===(c=e._videoStallObserver)||void 0===c?void 0:c.getStallInfo({interval:w.statsInterval,frameRateReceived:w.receivedFrameRate,frameRateDecoded:w.decoderOutputFrameRate,bitrate:w.receivedKBitrate});case 23:k=t.sent,R=null!==(d=null===(f=e._networkQuality)||void 0===f?void 0:f.getDownlinkQuality(Sg(Sg({},b),{},{stallDuration:(null==S?void 0:S.stallDuration)||0}),Sg(Sg({},w),{},{stallDuration:(null==k?void 0:k.stall.stallDuration100ms)||(null==k?void 0:k.stall.stallDuration500ms)||0})))&&void 0!==d?d:[],T=Zg(R,2),E=T[0],x=T[1],e._opts.enableAdaptiveJitterBuffer&&e._handleJitterBuffer(null==x?void 0:x.qualityQos,e._opts.adaptiveJitterBuffer,e._opts.networkStrategy),w.estimatedPlayoutTimestamp&&b.estimatedPlayoutTimestamp&&(L=w.estimatedPlayoutTimestamp-b.estimatedPlayoutTimestamp),e.emit(BI.RTC_NETWORK,Sg({interval:w.statsInterval,network_quality:E,audio_stall_duration:null==S?void 0:S.stallDuration,audio_stall_count:null==S?void 0:S.stallCount,audio_stall_time_per_100sec:((null==S?void 0:S.stallDuration)||0)/b.statsInterval*100,audio_stall_count_per_100sec:((null==S?void 0:S.stallCount)||0)/b.statsInterval*100*1e3,video_stall_duration:null==k?void 0:k.stall.stallDuration500ms,video_stall_count:null==k?void 0:k.stall.stallCount500ms,video_stall_duration_100ms:null==k?void 0:k.stall.stallDuration100ms,video_stall_count_100ms:null==k?void 0:k.stall.stallCount100ms,video_stall_time_per_100sec:((null==k?void 0:k.stall.stallDuration500ms)||0)/w.statsInterval*100,video_stall_count_per_100sec:((null==k?void 0:k.stall.stallCount500ms)||0)/w.statsInterval*100*1e3,rtt:w.rtt,video_jb_delay:w.jitterBufferDelay,audio_jb_delay:b.jitterBufferDelay,audio_lost_rate:b.audioLossRate,video_lost_rate:w.videoLossRate,video_retransmitted_rate:w.retransmittedRate,quality_audio_level:null==x?void 0:x.audioLevel,quality_video_level:null==x?void 0:x.videoLevel,quality_audio_qos:null==x?void 0:x.audioQos,quality_video_qos:null==x?void 0:x.videoQos,quality_qos:null==x?void 0:x.qualityQos,quality_audio_qoe:null==x?void 0:x.audioQoe,quality_video_qoe:null==x?void 0:x.videoQoe,current_delay:e._getDelay(),visibility_state:document.visibilityState,target_delay:e._targetDelayHint,av_sync_diff:L,set_delay_error:e._setDelayError||null,video_width:(null===(h=e._media)||void 0===h?void 0:h.videoWidth)||0,video_height:(null===(p=e._media)||void 0===p?void 0:p.videoHeight)||0,abr_state:w.abrState||"none",recv_frame_rate:w.receivedFrameRate,decode_frame_rate:w.decoderOutputFrameRate,pli:w.pliCount,drop_frame_rate:w.framesDropped,audio_packets_received:b.packetsReceived,video_packets_received:w.packetsReceived,video_muted:null===(v=e._media)||void 0===v?void 0:v.muted,video_paused:null===(m=e._media)||void 0===m?void 0:m.paused,video_volume:null===(y=e._media)||void 0===y?void 0:y.volume,video_current_time:null===(g=e._media)||void 0===g?void 0:g.currentTime},(null===(_=e._frameRecvCallback)||void 0===_?void 0:_.getRecentRenderInfo4Report())||{}));case 28:e._preAudioStats=s,e._preVideoStats=l,e._setDelayError=null;case 31:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();this._rtcReportTimer=AT((function(){return t()}),2e3),t()}},{key:"_handleJitterBuffer",value:function(e,t,r){var n;if(t&&r){this._networkQualityResult.push(e),this._networkQualityResult.length>t.networkWindow&&this._networkQualityResult.shift();var i=Gc(n=this._networkQualityResult).call(n,(function(e){return"number"==typeof e}));if(i.length===t.networkWindow){var o,a,s;if("min"===t.windowMethod)a=Math.min.apply(Math,jg(i));else if("max"===t.windowMethod)a=Math.max.apply(Math,jg(i));else{var l,u=jE(l=jg(i)).call(l,(function(e,t){return e-t})),c=Math.floor(u.length/2);a=u.length%2!=0?u[c]:(u[c-1]+u[c])/2}if(a&&void 0!==(null===(o=r[a])||void 0===o?void 0:o.jitterBuffer))this._startSetDelayLoop(null===(s=r[a])||void 0===s?void 0:s.jitterBuffer)}}}},{key:"_stopRtcReport",value:function(){var e,t,r,n;null===(e=this._audioStallObserver)||void 0===e||e.destroy(),null===(t=this._videoStallObserver)||void 0===t||t.destroy(),null===(r=this._frameRecvCallback)||void 0===r||r.stop(),delete this._frameRecvCallback,null===(n=this._networkQuality)||void 0===n||n.destroy(),delete this._audioStallObserver,delete this._videoStallObserver,delete this._networkQuality,this._preAudioStats=null,this._preVideoStats=null,this._rtcReportTimer&&(clearInterval(this._rtcReportTimer),this._rtcReportTimer=0)}},{key:"_clearDelay",value:function(){this._setDelayTimer&&(clearInterval(this._setDelayTimer),delete this._setDelayTimer),this._targetDelayHint=null,this._setDelayError=null}},{key:"_disconnect",value:function(e){var t,r;this._clearDelay(),this._clearMediaSrc(),null===(t=this._loader)||void 0===t||t.cancel(),null===(r=this._networkEvaluate)||void 0===r||r.destroy(),this._stopRtcReport(),clearTimeout(this._checkStatsErrorTimer),this._clearPeerStateTimeout(),this._firstFrameObserver.setFailureReason(e),this._firstFrameObserver.reset(),this._audioTransceicer=null,this._videoTransceicer=null,this._mediaStream=null}},{key:"_clearMediaSrc",value:function(){this._media&&(this._media.srcObject=null,this._media.removeAttribute("src"))}},{key:"_emitError",value:function(e){var t;tD.warn(e),this._clearDelay(),this._firstFrameObserver.setFailureReason((null==e||null===(t=e.originError)||void 0===t?void 0:t.message)||(null==e?void 0:e.originError)||e),this._firstFrameObserver.reset(),this.emit(CI,e),clearTimeout(this._checkStatsErrorTimer),this._clearPeerStateTimeout(),this._pc&&(this._pc.close(),this._clearMediaSrc())}},{key:"_createEmptyPeer",value:(t=Tg(kg().mark((function e(){var t;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new RTCPeerConnection,e.next=3,t.createOffer();case 3:t.close();case 4:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})},{key:"_emitFirstFrameState",value:function(e,t){this.emit(BI.RTC_FIRST_FRAME,Sg(Sg(Sg({},e),t),{},{initOptionsIncludePreload:!!this._opts.preloadPromise}))}},{key:"_changeVolumeInHarmonyWorkaround",value:function(){var e=this;if(/(HarmonyOS|OpenHarmony|ArkWeb)/i.test(navigator.userAgent)){var t=Qc(HTMLMediaElement.prototype,"muted");this._media&&t&&(tD.log("apply HarmonyOS muted workaround"),Ad(this._media,"muted",{configurable:!0,enumerable:!0,get:t.get,set:function(e){var r;null===(r=t.set)||void 0===r||r.call(this,e);var n,i,o,a=Zg((n=this.volume,(o=n+(i=.01))>1&&(o=n-i),[n,o]),2),s=a[0],l=a[1];this.volume=l,this.volume=s,tD.log("HarmonyOS muted workaround. set muted =",e,"volume:",l,"->",s)}}),this._revertVolumeWorkaround=function(){tD.log("revert HarmonyOS muted workaround. video dom:",e._media),e._media&&Ad(e._media,"muted",t)})}}},{key:"_mutedBeforePlayingWorkaround",value:function(){var e=this;if(/(HeyTapBrowser)/i.test(navigator.userAgent)||/(VivoBrowser)/i.test(navigator.userAgent)){var t=Qc(HTMLMediaElement.prototype,"muted");if(this._media&&t){tD.log("apply muted workaround for vivo & oppo");var r=this._media.muted;this._media.muted=!0,Ad(this._media,"muted",{configurable:!0,enumerable:!0,get:function(){return r},set:function(e){tD.log("muted workaround. set muted =",e),r=e}});this._media.addEventListener("playing",(function n(){tD.log("revert muted workaround. muted:",r),e._media&&(Ad(e._media,"muted",t),e._media.muted=r,e._media.removeEventListener("playing",n))}))}}}},{key:"destroy",value:function(e){var t,r;this._disconnect("invoke destroy"),null===(t=this._revertVolumeWorkaround)||void 0===t||t.call(this),delete this._revertVolumeWorkaround,null===(r=this._media)||void 0===r||r.removeEventListener("timeupdate",this._mockWaitingByTimeupdate),this._media&&!e&&(this._media.srcObject=null),this._pc&&this._pc.close(),this._loader=null,this._media=null,this._player=null,this._pc=null}}],[{key:"enableLogger",value:function(){fI.enable()}},{key:"disableLogger",value:function(){fI.disable()}}]),s}(sT);try{localStorage.getItem("xgd")?rD.enableLogger():rD.disableLogger()}catch(oD){}var nD=function(e){Og(n,e);var t,r=Fg(n);function n(){var e;return Eg(this,n),(e=r.apply(this,arguments))._rts=null,e._rtsOpts=null,e._mediaStream=null,e._onPause=function(){e._disconnectTimer||(e._disconnectTimer=o_((function(){e._closeAfterPause(),e._clearDisconnectTimer()}),1e3*e.config.disconnectTime))},e._reInit=function(){var t;e._clearDisconnectTimer(),null!==(t=e._rts)&&void 0!==t&&t._pc||(e._init(),e._bindRtsEvents())},e._init=function(){var t;null===(t=e._rts)||void 0===t||t.destroy();var r=e.player.config,n=r.rts||{};e._rtsOpts=n,e._rts=new rD(Sg({media:e.player.video,player:e.player,mediaStream:e._mediaStream,preProcessUrl:function(t,r){var n,i;return(null===(n=(i=e.player).preProcessUrl)||void 0===n?void 0:n.call(i,t,r))||{url:t,ext:r}}},n)),e._rts.load(r.url)},e._onSwitchURL=function(t){L_(t).call(t,"blob:")||""===t?t=e.player.config.url:t&&(e.player.config.url=t),e._rts?e._rts.switchURL(t):e._reInit()},e.__retry=function(){e.player.removeClass(ux),e.player.addClass(lx),ox(Ag(e),"retry",(function(){e.player.src="",e.player.once("canplay",(function(){e.player.mediaPlay()}))}))},e.destroy=function(){var t;e.player.switchURL=e._originSwitchFn,e.player.retry=e._originRetry,e._clearDisconnectTimer(),null===(t=e._rts)||void 0===t||t.destroy(),e._rts=null},e}return Lg(n,[{key:"pc",get:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.pc}},{key:"jitterBufferDelay",get:function(){var e;return(null===(e=this._rts)||void 0===e?void 0:e.getJitterBufferDelay())||0}},{key:"loader",get:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.loader}},{key:"videoTrack",get:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.videoTack}},{key:"audioTrack",get:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.audioTrack}},{key:"core",get:function(){return this._rts}},{key:"version",get:function(){return"0.2.1-alpha.53"}},{key:"beforePlayerInit",value:function(){var e,t,r,n,i,o=this;(this._init(),this._originSwitchFn)||(this._originSwitchFn=null===(n=this.player.switchURL)||void 0===n?void 0:Iy(n).call(n,this.player));this._originRetry||(this._originRetry=null===(i=this.player.retry)||void 0===i?void 0:Iy(i).call(i,this.player));this.player.switchURL=this._onSwitchURL,this.player.retry=this.__retry,null===(e=this.player)||void 0===e||e.useHooks("replay",this._onSwitchURL),this.on("urlchange",this._onSwitchURL),this.on("destroy",this.destroy),void 0!==(null===(t=this.player.config)||void 0===t||null===(r=t.rts)||void 0===r?void 0:r.disconnectTime)&&(this.on("pause",(function(){var e;null!==(e=o._rts)&&void 0!==e&&e._isReplacing||o._onPause()})),this.on("play",(function(){var e;null!==(e=o._rts)&&void 0!==e&&e._isReplacing||o._reInit()}))),this._bindRtsEvents();try{sx.defineGetterOrSetter(this.player,{__url:{get:function(){try{return kk.createObjectURL(new MediaSource)}catch(r){var e,t;return null!==(e=o.player)&&void 0!==e&&null!==(t=e.video)&&void 0!==t&&t.srcObject||(o.player.video.srcObject=new MediaStream),""}}}})}catch(a){}}},{key:"getStats",value:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.getStats()}},{key:"getStatsSnapshoot",value:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.getStatsSnapshoot()}},{key:"getNetWorkInfo",value:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.networkStats}},{key:"setDelay",value:function(e){var t;null===(t=this._rts)||void 0===t||t._setDelay(e)}},{key:"_clearDisconnectTimer",value:function(){clearTimeout(this._disconnectTimer),this._disconnectTimer=void 0}},{key:"_closeAfterPause",value:function(){var e,t,r;if(null!==(e=this._rts)&&void 0!==e&&e._pc){var n;if(null!==(t=this.config)&&void 0!==t&&t.seamlesslyReload)this._mediaStream=null===(n=this._rts)||void 0===n?void 0:n._mediaStream;null===(r=this._rts)||void 0===r||r.destroy(!0),this._rts=null}}},{key:"_bindRtsEvents",value:function(){this._transErrorEvent(),this._transCoreEvent(II),this._transCoreEvent(DI),this._transCoreEvent(OI),this._transCoreEvent(PI),this._transCoreEvent(AI),this._transCoreEvent(FI),this._transCoreEvent(ZI),this._transCoreEvent(BI.RTC_STATE_CHANGE),this._transCoreEvent(BI.RTC_NETWORK),this._transCoreEvent(BI.RTC_FIRST_FRAME)}},{key:"_transErrorEvent",value:function(){var e,t,r=this;null===(e=this._rts)||void 0===e||e.on(CI,(function(e){if(r.player){var t=new $E(r.player,e),n=r._rtsOpts||{},i=n.backupConstruct,o=n.backupURL;if(o){var a,s=r.player;s.emit("core_event",Sg(Sg({},{url:s.config.url,code:t.errorCode,message:t.message,httpCode:t.httpCode}),{},{eventName:"core.degrade"})),s.emit("degrade",{url:s.config.url,code:t.errorCode,message:t.message,httpCode:t.httpCode}),s.unRegisterPlugin("rts"),s.switchURL=r._originSwitchFn,s.retry=r._originRetry,r._rts=null,s.rts=null,null!==(a=s.video)&&void 0!==a&&a.srcObject&&(s.video.srcObject=null),s.config.url=o,i?s.registerPlugin(i).beforePlayerInit():s.video.src=o}else r.player.emit("error",t)}})),null===(t=this._rts)||void 0===t||t.on("waiting",(function(){var e;null===(e=r.player)||void 0===e||e.emit("waiting")}))}},{key:"_transCoreEvent",value:function(e){var t,r=this;null===(t=this._rts)||void 0===t||t.on(e,(function(t){r.player&&r.player.emit("core_event",Sg(Sg({},t),{},{eventName:e}))}))}}],[{key:"pluginName",get:function(){return"rts"}},{key:"isSupported",value:function(){return fP()}},{key:"getCapacity",value:function(){return function(){if(!fP())return Mm.reject("RTCPeerConnection no support");var e;try{(e=new RTCPeerConnection).addTransceiver("video",{direction:"recvonly"}),e.addTransceiver("audio",{direction:"recvonly"})}catch(t){return Mm.reject(null==t?void 0:t.message)}return e.createOffer().then((function(t){var r,n,i,o;if(tD.log(t.sdp),!t.sdp)return Mm.reject("createOffer no sdp");var a=YI.parse(t.sdp),s=null===(r=a.media)||void 0===r?void 0:Gc(r).call(r,(function(e){return"video"===e.type}))[0],l=null===(n=a.media)||void 0===n?void 0:Gc(n).call(n,(function(e){return"audio"===e.type}))[0],u=null==s||null===(i=s.rtp)||void 0===i?void 0:Gc(i).call(i,(function(e){return"VP8"===e.codec||"VP9"===e.codec||"H264"===e.codec})),c=null==l||null===(o=l.rtp)||void 0===o?void 0:Gc(o).call(o,(function(e){return"opus"===e.codec})),d=null==s?void 0:s.fmtp,f=null==l?void 0:l.fmtp;return d&&VR(u).call(u,(function(e){var t;e.config=null===(t=Gc(d).call(d,(function(t){return t.payload===e.payload}))[0])||void 0===t?void 0:t.config})),f&&VR(c).call(c,(function(e){var t;e.config=null===(t=Gc(f).call(f,(function(t){return t.payload===e.payload}))[0])||void 0===t?void 0:t.config})),e.close(),{video:u,audio:c}}))}()}},{key:"isSupportedH264",value:(t=Tg(kg().mark((function e(t){var r,i,o,a,s;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.getCapacity();case 3:if(i=e.sent,o=null===(r=i.video)||void 0===r?void 0:Gc(r).call(r,(function(e){var r;return"H264"===e.codec&&(!t||-1!==(null===(r=e.config)||void 0===r?void 0:rg(r).call(r,t)))})).length){e.next=10;break}return e.next=8,n.getCapacity();case 8:s=e.sent,o=null===(a=s.video)||void 0===a?void 0:Gc(a).call(a,(function(e){var r;return"H264"===e.codec&&(!t||-1!==(null===(r=e.config)||void 0===r?void 0:rg(r).call(r,t)))})).length;case 10:return e.abrupt("return",!!o);case 13:return e.prev=13,e.t0=e.catch(0),e.abrupt("return",!1);case 16:case"end":return e.stop()}}),e,null,[[0,13]])}))),function(e){return t.apply(this,arguments)})}]),n}(sx),iD=window.VePlayer.DynamicModule;VePlayer.registerPlugin(iD.PluginRtm,{RtmPlugin:nD}),e.RtmPlugin=nD}));
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_PLUGIN_RTM__={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n=function(e){return e&&e.Math==Math&&e},i=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("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,d="object"==typeof Reflect&&Reflect.apply||(s?c.bind(u):function(){return c.apply(u,arguments)}),f=a,p=Function.prototype,h=p.call,v=f&&p.bind.bind(h,h),m=f?v:function(e){return function(){return h.apply(e,arguments)}},y=m,g=y({}.toString),_=y("".slice),b=function(e){return _(g(e),8,-1)},w=b,S=m,R=function(e){if("Function"===w(e))return S(e)},k="object"==typeof document&&document.all,T={all:k,IS_HTMLDDA:void 0===k&&void 0!==k},E=T.all,x=T.IS_HTMLDDA?function(e){return"function"==typeof e||e===E}:function(e){return"function"==typeof e},L={},C=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),O=a,I=Function.prototype.call,P=O?I.bind(I):function(){return I.apply(I,arguments)},D={},A={}.propertyIsEnumerable,F=Object.getOwnPropertyDescriptor,Z=F&&!A.call({1:2},1);D.f=Z?function(e){var t=F(this,e);return!!t&&t.enumerable}:A;var j,V,W=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},M=o,N=b,G=Object,H=m("".split),U=M((function(){return!G("z").propertyIsEnumerable(0)}))?function(e){return"String"==N(e)?H(e,""):G(e)}:G,X=function(e){return null==e},B=X,K=TypeError,Y=function(e){if(B(e))throw K("Can't call method on "+e);return e},J=U,z=Y,Q=function(e){return J(z(e))},q=x,$=T.all,ee=T.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:q(e)||e===$}:function(e){return"object"==typeof e?null!==e:q(e)},te={},re=te,ne=i,ie=x,oe=function(e){return ie(e)?e:void 0},ae=function(e,t){return arguments.length<2?oe(re[e])||oe(ne[e]):re[e]&&re[e][t]||ne[e]&&ne[e][t]},se=m({}.isPrototypeOf),le="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ue=i,ce=le,de=ue.process,fe=ue.Deno,pe=de&&de.versions||fe&&fe.version,he=pe&&pe.v8;he&&(V=(j=he.split("."))[0]>0&&j[0]<4?1:+(j[0]+j[1])),!V&&ce&&(!(j=ce.match(/Edge\/(\d+)/))||j[1]>=74)&&(j=ce.match(/Chrome\/(\d+)/))&&(V=+j[1]);var ve=V,me=ve,ye=o,ge=i.String,_e=!!Object.getOwnPropertySymbols&&!ye((function(){var e=Symbol();return!ge(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&me&&me<41})),be=_e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,we=ae,Se=x,Re=se,ke=Object,Te=be?function(e){return"symbol"==typeof e}:function(e){var t=we("Symbol");return Se(t)&&Re(t.prototype,ke(e))},Ee=String,xe=function(e){try{return Ee(e)}catch(t){return"Object"}},Le=x,Ce=xe,Oe=TypeError,Ie=function(e){if(Le(e))return e;throw Oe(Ce(e)+" is not a function")},Pe=Ie,De=X,Ae=function(e,t){var r=e[t];return De(r)?void 0:Pe(r)},Fe=P,Ze=x,je=ee,Ve=TypeError,We={exports:{}},Me=i,Ne=Object.defineProperty,Ge=function(e,t){try{Ne(Me,e,{value:t,configurable:!0,writable:!0})}catch(r){Me[e]=t}return t},He="__core-js_shared__",Ue=i[He]||Ge(He,{}),Xe=Ue;(We.exports=function(e,t){return Xe[e]||(Xe[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 Be=We.exports,Ke=Y,Ye=Object,Je=function(e){return Ye(Ke(e))},ze=Je,Qe=m({}.hasOwnProperty),qe=Object.hasOwn||function(e,t){return Qe(ze(e),t)},$e=m,et=0,tt=Math.random(),rt=$e(1..toString),nt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+rt(++et+tt,36)},it=Be,ot=qe,at=nt,st=_e,lt=be,ut=i.Symbol,ct=it("wks"),dt=lt?ut.for||ut:ut&&ut.withoutSetter||at,ft=function(e){return ot(ct,e)||(ct[e]=st&&ot(ut,e)?ut[e]:dt("Symbol."+e)),ct[e]},pt=P,ht=ee,vt=Te,mt=Ae,yt=function(e,t){var r,n;if("string"===t&&Ze(r=e.toString)&&!je(n=Fe(r,e)))return n;if(Ze(r=e.valueOf)&&!je(n=Fe(r,e)))return n;if("string"!==t&&Ze(r=e.toString)&&!je(n=Fe(r,e)))return n;throw Ve("Can't convert object to primitive value")},gt=TypeError,_t=ft("toPrimitive"),bt=function(e,t){if(!ht(e)||vt(e))return e;var r,n=mt(e,_t);if(n){if(void 0===t&&(t="default"),r=pt(n,e,t),!ht(r)||vt(r))return r;throw gt("Can't convert object to primitive value")}return void 0===t&&(t="number"),yt(e,t)},wt=Te,St=function(e){var t=bt(e,"string");return wt(t)?t:t+""},Rt=ee,kt=i.document,Tt=Rt(kt)&&Rt(kt.createElement),Et=function(e){return Tt?kt.createElement(e):{}},xt=Et,Lt=!C&&!o((function(){return 7!=Object.defineProperty(xt("div"),"a",{get:function(){return 7}}).a})),Ct=C,Ot=P,It=D,Pt=W,Dt=Q,At=St,Ft=qe,Zt=Lt,jt=Object.getOwnPropertyDescriptor;L.f=Ct?jt:function(e,t){if(e=Dt(e),t=At(t),Zt)try{return jt(e,t)}catch(r){}if(Ft(e,t))return Pt(!Ot(It.f,e,t),e[t])};var Vt=o,Wt=x,Mt=/#|\.prototype\./,Nt=function(e,t){var r=Ht[Gt(e)];return r==Xt||r!=Ut&&(Wt(t)?Vt(t):!!t)},Gt=Nt.normalize=function(e){return String(e).replace(Mt,".").toLowerCase()},Ht=Nt.data={},Ut=Nt.NATIVE="N",Xt=Nt.POLYFILL="P",Bt=Nt,Kt=Ie,Yt=a,Jt=R(R.bind),zt=function(e,t){return Kt(e),void 0===t?e:Yt?Jt(e,t):function(){return e.apply(t,arguments)}},Qt={},qt=C&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),$t=ee,er=String,tr=TypeError,rr=function(e){if($t(e))return e;throw tr(er(e)+" is not an object")},nr=C,ir=Lt,or=qt,ar=rr,sr=St,lr=TypeError,ur=Object.defineProperty,cr=Object.getOwnPropertyDescriptor,dr="enumerable",fr="configurable",pr="writable";Qt.f=nr?or?function(e,t,r){if(ar(e),t=sr(t),ar(r),"function"==typeof e&&"prototype"===t&&"value"in r&&pr in r&&!r[pr]){var n=cr(e,t);n&&n[pr]&&(e[t]=r.value,r={configurable:fr in r?r[fr]:n[fr],enumerable:dr in r?r[dr]:n[dr],writable:!1})}return ur(e,t,r)}:ur:function(e,t,r){if(ar(e),t=sr(t),ar(r),ir)try{return ur(e,t,r)}catch(n){}if("get"in r||"set"in r)throw lr("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var hr=Qt,vr=W,mr=C?function(e,t,r){return hr.f(e,t,vr(1,r))}:function(e,t,r){return e[t]=r,e},yr=i,gr=d,_r=R,br=x,wr=L.f,Sr=Bt,Rr=te,kr=zt,Tr=mr,Er=qe,xr=function(e){var t=function(r,n,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,n)}return new e(r,n,i)}return gr(e,this,arguments)};return t.prototype=e.prototype,t},Lr=function(e,t){var r,n,i,o,a,s,l,u,c,d=e.target,f=e.global,p=e.stat,h=e.proto,v=f?yr:p?yr[d]:(yr[d]||{}).prototype,m=f?Rr:Rr[d]||Tr(Rr,d,{})[d],y=m.prototype;for(o in t)n=!(r=Sr(f?o:d+(p?".":"#")+o,e.forced))&&v&&Er(v,o),s=m[o],n&&(l=e.dontCallGetSet?(c=wr(v,o))&&c.value:v[o]),a=n&&l?l:t[o],n&&typeof s==typeof a||(u=e.bind&&n?kr(a,yr):e.wrap&&n?xr(a):h&&br(a)?_r(a):a,(e.sham||a&&a.sham||s&&s.sham)&&Tr(u,"sham",!0),Tr(m,o,u),h&&(Er(Rr,i=d+"Prototype")||Tr(Rr,i,{}),Tr(Rr[i],o,a),e.real&&y&&(r||!y[o])&&Tr(y,o,a)))},Cr=b,Or=Array.isArray||function(e){return"Array"==Cr(e)},Ir=Math.ceil,Pr=Math.floor,Dr=Math.trunc||function(e){var t=+e;return(t>0?Pr:Ir)(t)},Ar=function(e){var t=+e;return t!=t||0===t?0:Dr(t)},Fr=Ar,Zr=Math.min,jr=function(e){return e>0?Zr(Fr(e),9007199254740991):0},Vr=jr,Wr=function(e){return Vr(e.length)},Mr=TypeError,Nr=function(e){if(e>9007199254740991)throw Mr("Maximum allowed index exceeded");return e},Gr=St,Hr=Qt,Ur=W,Xr=function(e,t,r){var n=Gr(t);n in e?Hr.f(e,n,Ur(0,r)):e[n]=r},Br={};Br[ft("toStringTag")]="z";var Kr="[object z]"===String(Br),Yr=Kr,Jr=x,zr=b,Qr=ft("toStringTag"),qr=Object,$r="Arguments"==zr(function(){return arguments}()),en=Yr?zr:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(r){}}(t=qr(e),Qr))?r:$r?zr(t):"Object"==(n=zr(t))&&Jr(t.callee)?"Arguments":n},tn=x,rn=Ue,nn=m(Function.toString);tn(rn.inspectSource)||(rn.inspectSource=function(e){return nn(e)});var on=rn.inspectSource,an=m,sn=o,ln=x,un=en,cn=on,dn=function(){},fn=[],pn=ae("Reflect","construct"),hn=/^\s*(?:class|function)\b/,vn=an(hn.exec),mn=!hn.exec(dn),yn=function(e){if(!ln(e))return!1;try{return pn(dn,fn,e),!0}catch(t){return!1}},gn=function(e){if(!ln(e))return!1;switch(un(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return mn||!!vn(hn,cn(e))}catch(t){return!0}};gn.sham=!0;var _n=!pn||sn((function(){var e;return yn(yn.call)||!yn(Object)||!yn((function(){e=!0}))||e}))?gn:yn,bn=Or,wn=_n,Sn=ee,Rn=ft("species"),kn=Array,Tn=function(e){var t;return bn(e)&&(t=e.constructor,(wn(t)&&(t===kn||bn(t.prototype))||Sn(t)&&null===(t=t[Rn]))&&(t=void 0)),void 0===t?kn:t},En=function(e,t){return new(Tn(e))(0===t?0:t)},xn=o,Ln=ve,Cn=ft("species"),On=function(e){return Ln>=51||!xn((function(){var t=[];return(t.constructor={})[Cn]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},In=Lr,Pn=o,Dn=Or,An=ee,Fn=Je,Zn=Wr,jn=Nr,Vn=Xr,Wn=En,Mn=On,Nn=ve,Gn=ft("isConcatSpreadable"),Hn=Nn>=51||!Pn((function(){var e=[];return e[Gn]=!1,e.concat()[0]!==e})),Un=function(e){if(!An(e))return!1;var t=e[Gn];return void 0!==t?!!t:Dn(e)};In({target:"Array",proto:!0,arity:1,forced:!Hn||!Mn("concat")},{concat:function(e){var t,r,n,i,o,a=Fn(this),s=Wn(a,0),l=0;for(t=-1,n=arguments.length;t<n;t++)if(Un(o=-1===t?a:arguments[t]))for(i=Zn(o),jn(l+i),r=0;r<i;r++,l++)r in o&&Vn(s,l,o[r]);else jn(l+1),Vn(s,l++,o);return s.length=l,s}});var Xn=en,Bn=String,Kn=function(e){if("Symbol"===Xn(e))throw TypeError("Cannot convert a Symbol value to a string");return Bn(e)},Yn={},Jn=Ar,zn=Math.max,Qn=Math.min,qn=function(e,t){var r=Jn(e);return r<0?zn(r+t,0):Qn(r,t)},$n=Q,ei=qn,ti=Wr,ri=function(e){return function(t,r,n){var i,o=$n(t),a=ti(o),s=ei(n,a);if(e&&r!=r){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===r)return e||s||0;return!e&&-1}},ni={includes:ri(!0),indexOf:ri(!1)},ii={},oi=qe,ai=Q,si=ni.indexOf,li=ii,ui=m([].push),ci=function(e,t){var r,n=ai(e),i=0,o=[];for(r in n)!oi(li,r)&&oi(n,r)&&ui(o,r);for(;t.length>i;)oi(n,r=t[i++])&&(~si(o,r)||ui(o,r));return o},di=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],fi=ci,pi=di,hi=Object.keys||function(e){return fi(e,pi)},vi=C,mi=qt,yi=Qt,gi=rr,_i=Q,bi=hi;Yn.f=vi&&!mi?Object.defineProperties:function(e,t){gi(e);for(var r,n=_i(t),i=bi(t),o=i.length,a=0;o>a;)yi.f(e,r=i[a++],n[r]);return e};var wi,Si=ae("document","documentElement"),Ri=nt,ki=Be("keys"),Ti=function(e){return ki[e]||(ki[e]=Ri(e))},Ei=rr,xi=Yn,Li=di,Ci=ii,Oi=Si,Ii=Et,Pi="prototype",Di="script",Ai=Ti("IE_PROTO"),Fi=function(){},Zi=function(e){return"<"+Di+">"+e+"</"+Di+">"},ji=function(e){e.write(Zi("")),e.close();var t=e.parentWindow.Object;return e=null,t},Vi=function(){try{wi=new ActiveXObject("htmlfile")}catch(i){}var e,t,r;Vi="undefined"!=typeof document?document.domain&&wi?ji(wi):(t=Ii("iframe"),r="java"+Di+":",t.style.display="none",Oi.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(Zi("document.F=Object")),e.close(),e.F):ji(wi);for(var n=Li.length;n--;)delete Vi[Pi][Li[n]];return Vi()};Ci[Ai]=!0;var Wi=Object.create||function(e,t){var r;return null!==e?(Fi[Pi]=Ei(e),r=new Fi,Fi[Pi]=null,r[Ai]=e):r=Vi(),void 0===t?r:xi.f(r,t)},Mi={},Ni=ci,Gi=di.concat("length","prototype");Mi.f=Object.getOwnPropertyNames||function(e){return Ni(e,Gi)};var Hi={},Ui=qn,Xi=Wr,Bi=Xr,Ki=Array,Yi=Math.max,Ji=function(e,t,r){for(var n=Xi(e),i=Ui(t,n),o=Ui(void 0===r?n:r,n),a=Ki(Yi(o-i,0)),s=0;i<o;i++,s++)Bi(a,s,e[i]);return a.length=s,a},zi=b,Qi=Q,qi=Mi.f,$i=Ji,eo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Hi.f=function(e){return eo&&"Window"==zi(e)?function(e){try{return qi(e)}catch(t){return $i(eo)}}(e):qi(Qi(e))};var to={};to.f=Object.getOwnPropertySymbols;var ro=mr,no=function(e,t,r,n){return n&&n.enumerable?e[t]=r:ro(e,t,r),e},io=Qt,oo=function(e,t,r){return io.f(e,t,r)},ao={},so=ft;ao.f=so;var lo,uo,co,fo=te,po=qe,ho=ao,vo=Qt.f,mo=function(e){var t=fo.Symbol||(fo.Symbol={});po(t,e)||vo(t,e,{value:ho.f(e)})},yo=P,go=ae,_o=ft,bo=no,wo=function(){var e=go("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=_o("toPrimitive");t&&!t[n]&&bo(t,n,(function(e){return yo(r,this)}),{arity:1})},So=en,Ro=Kr?{}.toString:function(){return"[object "+So(this)+"]"},ko=Kr,To=Qt.f,Eo=mr,xo=qe,Lo=Ro,Co=ft("toStringTag"),Oo=function(e,t,r,n){if(e){var i=r?e:e.prototype;xo(i,Co)||To(i,Co,{configurable:!0,value:t}),n&&!ko&&Eo(i,"toString",Lo)}},Io=x,Po=i.WeakMap,Do=Io(Po)&&/native code/.test(String(Po)),Ao=i,Fo=ee,Zo=mr,jo=qe,Vo=Ue,Wo=Ti,Mo=ii,No="Object already initialized",Go=Ao.TypeError,Ho=Ao.WeakMap;if(Do||Vo.state){var Uo=Vo.state||(Vo.state=new Ho);Uo.get=Uo.get,Uo.has=Uo.has,Uo.set=Uo.set,lo=function(e,t){if(Uo.has(e))throw Go(No);return t.facade=e,Uo.set(e,t),t},uo=function(e){return Uo.get(e)||{}},co=function(e){return Uo.has(e)}}else{var Xo=Wo("state");Mo[Xo]=!0,lo=function(e,t){if(jo(e,Xo))throw Go(No);return t.facade=e,Zo(e,Xo,t),t},uo=function(e){return jo(e,Xo)?e[Xo]:{}},co=function(e){return jo(e,Xo)}}var Bo={set:lo,get:uo,has:co,enforce:function(e){return co(e)?uo(e):lo(e,{})},getterFor:function(e){return function(t){var r;if(!Fo(t)||(r=uo(t)).type!==e)throw Go("Incompatible receiver, "+e+" required");return r}}},Ko=zt,Yo=U,Jo=Je,zo=Wr,Qo=En,qo=m([].push),$o=function(e){var t=1==e,r=2==e,n=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(l,u,c,d){for(var f,p,h=Jo(l),v=Yo(h),m=Ko(u,c),y=zo(v),g=0,_=d||Qo,b=t?_(l,y):r||a?_(l,0):void 0;y>g;g++)if((s||g in v)&&(p=m(f=v[g],g,h),e))if(t)b[g]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return g;case 2:qo(b,f)}else switch(e){case 4:return!1;case 7:qo(b,f)}return o?-1:n||i?i:b}},ea={forEach:$o(0),map:$o(1),filter:$o(2),some:$o(3),every:$o(4),find:$o(5),findIndex:$o(6),filterReject:$o(7)},ta=Lr,ra=i,na=P,ia=m,oa=C,aa=_e,sa=o,la=qe,ua=se,ca=rr,da=Q,fa=St,pa=Kn,ha=W,va=Wi,ma=hi,ya=Mi,ga=Hi,_a=to,ba=L,wa=Qt,Sa=Yn,Ra=D,ka=no,Ta=oo,Ea=Be,xa=ii,La=nt,Ca=ft,Oa=ao,Ia=mo,Pa=wo,Da=Oo,Aa=Bo,Fa=ea.forEach,Za=Ti("hidden"),ja="Symbol",Va="prototype",Wa=Aa.set,Ma=Aa.getterFor(ja),Na=Object[Va],Ga=ra.Symbol,Ha=Ga&&Ga[Va],Ua=ra.TypeError,Xa=ra.QObject,Ba=ba.f,Ka=wa.f,Ya=ga.f,Ja=Ra.f,za=ia([].push),Qa=Ea("symbols"),qa=Ea("op-symbols"),$a=Ea("wks"),es=!Xa||!Xa[Va]||!Xa[Va].findChild,ts=oa&&sa((function(){return 7!=va(Ka({},"a",{get:function(){return Ka(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=Ba(Na,t);n&&delete Na[t],Ka(e,t,r),n&&e!==Na&&Ka(Na,t,n)}:Ka,rs=function(e,t){var r=Qa[e]=va(Ha);return Wa(r,{type:ja,tag:e,description:t}),oa||(r.description=t),r},ns=function(e,t,r){e===Na&&ns(qa,t,r),ca(e);var n=fa(t);return ca(r),la(Qa,n)?(r.enumerable?(la(e,Za)&&e[Za][n]&&(e[Za][n]=!1),r=va(r,{enumerable:ha(0,!1)})):(la(e,Za)||Ka(e,Za,ha(1,{})),e[Za][n]=!0),ts(e,n,r)):Ka(e,n,r)},is=function(e,t){ca(e);var r=da(t),n=ma(r).concat(ls(r));return Fa(n,(function(t){oa&&!na(os,r,t)||ns(e,t,r[t])})),e},os=function(e){var t=fa(e),r=na(Ja,this,t);return!(this===Na&&la(Qa,t)&&!la(qa,t))&&(!(r||!la(this,t)||!la(Qa,t)||la(this,Za)&&this[Za][t])||r)},as=function(e,t){var r=da(e),n=fa(t);if(r!==Na||!la(Qa,n)||la(qa,n)){var i=Ba(r,n);return!i||!la(Qa,n)||la(r,Za)&&r[Za][n]||(i.enumerable=!0),i}},ss=function(e){var t=Ya(da(e)),r=[];return Fa(t,(function(e){la(Qa,e)||la(xa,e)||za(r,e)})),r},ls=function(e){var t=e===Na,r=Ya(t?qa:da(e)),n=[];return Fa(r,(function(e){!la(Qa,e)||t&&!la(Na,e)||za(n,Qa[e])})),n};aa||(Ga=function(){if(ua(Ha,this))throw Ua("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?pa(arguments[0]):void 0,t=La(e),r=function(e){this===Na&&na(r,qa,e),la(this,Za)&&la(this[Za],t)&&(this[Za][t]=!1),ts(this,t,ha(1,e))};return oa&&es&&ts(Na,t,{configurable:!0,set:r}),rs(t,e)},ka(Ha=Ga[Va],"toString",(function(){return Ma(this).tag})),ka(Ga,"withoutSetter",(function(e){return rs(La(e),e)})),Ra.f=os,wa.f=ns,Sa.f=is,ba.f=as,ya.f=ga.f=ss,_a.f=ls,Oa.f=function(e){return rs(Ca(e),e)},oa&&Ta(Ha,"description",{configurable:!0,get:function(){return Ma(this).description}})),ta({global:!0,constructor:!0,wrap:!0,forced:!aa,sham:!aa},{Symbol:Ga}),Fa(ma($a),(function(e){Ia(e)})),ta({target:ja,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):is(va(e),t)},defineProperty:ns,defineProperties:is,getOwnPropertyDescriptor:as}),ta({target:"Object",stat:!0,forced:!aa},{getOwnPropertyNames:ss}),Pa(),Da(Ga,ja),xa[Za]=!0;var us=_e&&!!Symbol.for&&!!Symbol.keyFor,cs=Lr,ds=ae,fs=qe,ps=Kn,hs=Be,vs=us,ms=hs("string-to-symbol-registry"),ys=hs("symbol-to-string-registry");cs({target:"Symbol",stat:!0,forced:!vs},{for:function(e){var t=ps(e);if(fs(ms,t))return ms[t];var r=ds("Symbol")(t);return ms[t]=r,ys[r]=t,r}});var gs=Lr,_s=qe,bs=Te,ws=xe,Ss=us,Rs=Be("symbol-to-string-registry");gs({target:"Symbol",stat:!0,forced:!Ss},{keyFor:function(e){if(!bs(e))throw TypeError(ws(e)+" is not a symbol");if(_s(Rs,e))return Rs[e]}});var ks=m([].slice),Ts=Or,Es=x,xs=b,Ls=Kn,Cs=m([].push),Os=Lr,Is=ae,Ps=d,Ds=P,As=m,Fs=o,Zs=x,js=Te,Vs=ks,Ws=function(e){if(Es(e))return e;if(Ts(e)){for(var t=e.length,r=[],n=0;n<t;n++){var i=e[n];"string"==typeof i?Cs(r,i):"number"!=typeof i&&"Number"!=xs(i)&&"String"!=xs(i)||Cs(r,Ls(i))}var o=r.length,a=!0;return function(e,t){if(a)return a=!1,t;if(Ts(this))return t;for(var n=0;n<o;n++)if(r[n]===e)return t}}},Ms=_e,Ns=String,Gs=Is("JSON","stringify"),Hs=As(/./.exec),Us=As("".charAt),Xs=As("".charCodeAt),Bs=As("".replace),Ks=As(1..toString),Ys=/[\uD800-\uDFFF]/g,Js=/^[\uD800-\uDBFF]$/,zs=/^[\uDC00-\uDFFF]$/,Qs=!Ms||Fs((function(){var e=Is("Symbol")();return"[null]"!=Gs([e])||"{}"!=Gs({a:e})||"{}"!=Gs(Object(e))})),qs=Fs((function(){return'"\\udf06\\ud834"'!==Gs("\udf06\ud834")||'"\\udead"'!==Gs("\udead")})),$s=function(e,t){var r=Vs(arguments),n=Ws(t);if(Zs(n)||void 0!==e&&!js(e))return r[1]=function(e,t){if(Zs(n)&&(t=Ds(n,this,Ns(e),t)),!js(t))return t},Ps(Gs,null,r)},el=function(e,t,r){var n=Us(r,t-1),i=Us(r,t+1);return Hs(Js,e)&&!Hs(zs,i)||Hs(zs,e)&&!Hs(Js,n)?"\\u"+Ks(Xs(e,0),16):e};Gs&&Os({target:"JSON",stat:!0,arity:3,forced:Qs||qs},{stringify:function(e,t,r){var n=Vs(arguments),i=Ps(Qs?$s:Gs,null,n);return qs&&"string"==typeof i?Bs(i,Ys,el):i}});var tl=to,rl=Je;Lr({target:"Object",stat:!0,forced:!_e||o((function(){tl.f(1)}))},{getOwnPropertySymbols:function(e){var t=tl.f;return t?t(rl(e)):[]}}),mo("asyncIterator"),mo("hasInstance"),mo("isConcatSpreadable"),mo("iterator"),mo("match"),mo("matchAll"),mo("replace"),mo("search"),mo("species"),mo("split");var nl=wo;mo("toPrimitive"),nl();var il=ae,ol=Oo;mo("toStringTag"),ol(il("Symbol"),"Symbol"),mo("unscopables"),Oo(i.JSON,"JSON",!0);var al,sl,ll,ul=te.Symbol,cl={},dl=C,fl=qe,pl=Function.prototype,hl=dl&&Object.getOwnPropertyDescriptor,vl=fl(pl,"name"),ml={EXISTS:vl,PROPER:vl&&"something"===function(){}.name,CONFIGURABLE:vl&&(!dl||dl&&hl(pl,"name").configurable)},yl=!o((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),gl=qe,_l=x,bl=Je,wl=yl,Sl=Ti("IE_PROTO"),Rl=Object,kl=Rl.prototype,Tl=wl?Rl.getPrototypeOf:function(e){var t=bl(e);if(gl(t,Sl))return t[Sl];var r=t.constructor;return _l(r)&&t instanceof r?r.prototype:t instanceof Rl?kl:null},El=o,xl=x,Ll=ee,Cl=Wi,Ol=Tl,Il=no,Pl=ft("iterator"),Dl=!1;[].keys&&("next"in(ll=[].keys())?(sl=Ol(Ol(ll)))!==Object.prototype&&(al=sl):Dl=!0);var Al=!Ll(al)||El((function(){var e={};return al[Pl].call(e)!==e}));xl((al=Al?{}:Cl(al))[Pl])||Il(al,Pl,(function(){return this}));var Fl={IteratorPrototype:al,BUGGY_SAFARI_ITERATORS:Dl},Zl=Fl.IteratorPrototype,jl=Wi,Vl=W,Wl=Oo,Ml=cl,Nl=function(){return this},Gl=function(e,t,r,n){var i=t+" Iterator";return e.prototype=jl(Zl,{next:Vl(+!n,r)}),Wl(e,i,!1,!0),Ml[i]=Nl,e},Hl=m,Ul=Ie,Xl=x,Bl=String,Kl=TypeError,Yl=function(e,t,r){try{return Hl(Ul(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(n){}},Jl=rr,zl=function(e){if("object"==typeof e||Xl(e))return e;throw Kl("Can't set "+Bl(e)+" as a prototype")},Ql=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=Yl(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(n){}return function(r,n){return Jl(r),zl(n),t?e(r,n):r.__proto__=n,r}}():void 0),ql=Lr,$l=P,eu=ml,tu=Gl,ru=Tl,nu=Oo,iu=no,ou=cl,au=Fl,su=eu.PROPER,lu=au.BUGGY_SAFARI_ITERATORS,uu=ft("iterator"),cu="keys",du="values",fu="entries",pu=function(){return this},hu=function(e,t,r,n,i,o,a){tu(r,t,n);var s,l,u,c=function(e){if(e===i&&v)return v;if(!lu&&e in p)return p[e];switch(e){case cu:case du:case fu:return function(){return new r(this,e)}}return function(){return new r(this)}},d=t+" Iterator",f=!1,p=e.prototype,h=p[uu]||p["@@iterator"]||i&&p[i],v=!lu&&h||c(i),m="Array"==t&&p.entries||h;if(m&&(s=ru(m.call(new e)))!==Object.prototype&&s.next&&(nu(s,d,!0,!0),ou[d]=pu),su&&i==du&&h&&h.name!==du&&(f=!0,v=function(){return $l(h,this)}),i)if(l={values:c(du),keys:o?v:c(cu),entries:c(fu)},a)for(u in l)(lu||f||!(u in p))&&iu(p,u,l[u]);else ql({target:t,proto:!0,forced:lu||f},l);return a&&p[uu]!==v&&iu(p,uu,v,{name:i}),ou[t]=v,l},vu=function(e,t){return{value:e,done:t}},mu=Q,yu=cl,gu=Bo;Qt.f;var _u=hu,bu=vu,wu="Array Iterator",Su=gu.set,Ru=gu.getterFor(wu);_u(Array,"Array",(function(e,t){Su(this,{type:wu,target:mu(e),index:0,kind:t})}),(function(){var e=Ru(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,bu(void 0,!0)):bu("keys"==r?n:"values"==r?t[n]:[n,t[n]],!1)}),"values"),yu.Arguments=yu.Array;var ku={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},Tu=i,Eu=en,xu=mr,Lu=cl,Cu=ft("toStringTag");for(var Ou in ku){var Iu=Tu[Ou],Pu=Iu&&Iu.prototype;Pu&&Eu(Pu)!==Cu&&xu(Pu,Cu,Ou),Lu[Ou]=Lu.Array}var Du=ul;mo("dispose");var Au=Du;mo("asyncDispose");var Fu=Lr,Zu=m,ju=ae("Symbol"),Vu=ju.keyFor,Wu=Zu(ju.prototype.valueOf);Fu({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==Vu(Wu(e))}catch(t){return!1}}});for(var Mu=Lr,Nu=Be,Gu=ae,Hu=m,Uu=Te,Xu=ft,Bu=Gu("Symbol"),Ku=Bu.isWellKnown,Yu=Gu("Object","getOwnPropertyNames"),Ju=Hu(Bu.prototype.valueOf),zu=Nu("wks"),Qu=0,qu=Yu(Bu),$u=qu.length;Qu<$u;Qu++)try{var ec=qu[Qu];Uu(Bu[ec])&&Xu(ec)}catch(aD){}Mu({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if(Ku&&Ku(e))return!0;try{for(var t=Ju(e),r=0,n=Yu(zu),i=n.length;r<i;r++)if(zu[n[r]]==t)return!0}catch(aD){}return!1}}),mo("matcher"),mo("metadataKey"),mo("observable"),mo("metadata"),mo("patternMatch"),mo("replaceAll");var tc=Au,rc=r(tc),nc=m,ic=Ar,oc=Kn,ac=Y,sc=nc("".charAt),lc=nc("".charCodeAt),uc=nc("".slice),cc=function(e){return function(t,r){var n,i,o=oc(ac(t)),a=ic(r),s=o.length;return a<0||a>=s?e?"":void 0:(n=lc(o,a))<55296||n>56319||a+1===s||(i=lc(o,a+1))<56320||i>57343?e?sc(o,a):n:e?uc(o,a,a+2):i-56320+(n-55296<<10)+65536}},dc={codeAt:cc(!1),charAt:cc(!0)},fc=dc.charAt,pc=Kn,hc=Bo,vc=hu,mc=vu,yc="String Iterator",gc=hc.set,_c=hc.getterFor(yc);vc(String,"String",(function(e){gc(this,{type:yc,string:pc(e),index:0})}),(function(){var e,t=_c(this),r=t.string,n=t.index;return n>=r.length?mc(void 0,!0):(e=fc(r,n),t.index+=e.length,mc(e,!1))}));var bc=ao.f("iterator"),wc=r(bc);function Sc(e){return(Sc="function"==typeof rc&&"symbol"==typeof wc?function(e){return typeof e}:function(e){return e&&"function"==typeof rc&&e.constructor===rc&&e!==rc.prototype?"symbol":typeof e})(e)}var Rc=r(tc),kc=en,Tc=Ae,Ec=X,xc=cl,Lc=ft("iterator"),Cc=function(e){if(!Ec(e))return Tc(e,Lc)||Tc(e,"@@iterator")||xc[kc(e)]},Oc=r(Cc),Ic=Je,Pc=hi;Lr({target:"Object",stat:!0,forced:o((function(){Pc(1)}))},{keys:function(e){return Pc(Ic(e))}});var Dc=r(te.Object.keys),Ac=r(te.Object.getOwnPropertySymbols),Fc=ea.filter;Lr({target:"Array",proto:!0,forced:!On("filter")},{filter:function(e){return Fc(this,e,arguments.length>1?arguments[1]:void 0)}});var Zc=te,jc=function(e){return Zc[e+"Prototype"]},Vc=jc("Array").filter,Wc=se,Mc=Vc,Nc=Array.prototype,Gc=r((function(e){var t=e.filter;return e===Nc||Wc(Nc,e)&&t===Nc.filter?Mc:t})),Hc={exports:{}},Uc=Lr,Xc=o,Bc=Q,Kc=L.f,Yc=C;Uc({target:"Object",stat:!0,forced:!Yc||Xc((function(){Kc(1)})),sham:!Yc},{getOwnPropertyDescriptor:function(e,t){return Kc(Bc(e),t)}});var Jc=te.Object,zc=Hc.exports=function(e,t){return Jc.getOwnPropertyDescriptor(e,t)};Jc.getOwnPropertyDescriptor.sham&&(zc.sham=!0);var Qc=r(Hc.exports),qc=o,$c=function(e,t){var r=[][e];return!!r&&qc((function(){r.call(null,t||function(){return 1},1)}))},ed=ea.forEach,td=$c("forEach")?[].forEach:function(e){return ed(this,e,arguments.length>1?arguments[1]:void 0)};Lr({target:"Array",proto:!0,forced:[].forEach!=td},{forEach:td});var rd=jc("Array").forEach,nd=en,id=qe,od=se,ad=rd,sd=Array.prototype,ld={DOMTokenList:!0,NodeList:!0},ud=r((function(e){var t=e.forEach;return e===sd||od(sd,e)&&t===sd.forEach||id(ld,nd(e))?ad:t})),cd=ae,dd=Mi,fd=to,pd=rr,hd=m([].concat),vd=cd("Reflect","ownKeys")||function(e){var t=dd.f(pd(e)),r=fd.f;return r?hd(t,r(e)):t},md=vd,yd=Q,gd=L,_d=Xr;Lr({target:"Object",stat:!0,sham:!C},{getOwnPropertyDescriptors:function(e){for(var t,r,n=yd(e),i=gd.f,o=md(n),a={},s=0;o.length>s;)void 0!==(r=i(n,t=o[s++]))&&_d(a,t,r);return a}});var bd=r(te.Object.getOwnPropertyDescriptors),wd={exports:{}},Sd=Lr,Rd=C,kd=Yn.f;Sd({target:"Object",stat:!0,forced:Object.defineProperties!==kd,sham:!Rd},{defineProperties:kd});var Td=te.Object,Ed=wd.exports=function(e,t){return Td.defineProperties(e,t)};Td.defineProperties.sham&&(Ed.sham=!0);var xd=r(wd.exports),Ld={exports:{}},Cd=Lr,Od=C,Id=Qt.f;Cd({target:"Object",stat:!0,forced:Object.defineProperty!==Id,sham:!Od},{defineProperty:Id});var Pd=te.Object,Dd=Ld.exports=function(e,t,r){return Pd.defineProperty(e,t,r)};Pd.defineProperty.sham&&(Dd.sham=!0);var Ad=r(Ld.exports);Lr({target:"Object",stat:!0,sham:!C},{create:Wi});var Fd=te.Object,Zd=r((function(e,t){return Fd.create(e,t)})),jd=Je,Vd=Tl,Wd=yl;Lr({target:"Object",stat:!0,forced:o((function(){Vd(1)})),sham:!Wd},{getPrototypeOf:function(e){return Vd(jd(e))}});var Md=r(te.Object.getPrototypeOf);Lr({target:"Object",stat:!0},{setPrototypeOf:Ql});var Nd=r(te.Object.setPrototypeOf),Gd=qe,Hd=vd,Ud=L,Xd=Qt,Bd=ee,Kd=mr,Yd=Error,Jd=m("".replace),zd=String(Yd("zxcasd").stack),Qd=/\n\s*at [^:]*:[^\n]*/,qd=Qd.test(zd),$d=W,ef=!o((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",$d(1,7)),7!==e.stack)})),tf=mr,rf=function(e,t){if(qd&&"string"==typeof e&&!Yd.prepareStackTrace)for(;t--;)e=Jd(e,Qd,"");return e},nf=ef,of=Error.captureStackTrace,af=cl,sf=ft("iterator"),lf=Array.prototype,uf=function(e){return void 0!==e&&(af.Array===e||lf[sf]===e)},cf=P,df=Ie,ff=rr,pf=xe,hf=Cc,vf=TypeError,mf=function(e,t){var r=arguments.length<2?hf(e):t;if(df(r))return ff(cf(r,e));throw vf(pf(e)+" is not iterable")},yf=P,gf=rr,_f=Ae,bf=function(e,t,r){var n,i;gf(e);try{if(!(n=_f(e,"return"))){if("throw"===t)throw r;return r}n=yf(n,e)}catch(aD){i=!0,n=aD}if("throw"===t)throw r;if(i)throw n;return gf(n),r},wf=zt,Sf=P,Rf=rr,kf=xe,Tf=uf,Ef=Wr,xf=se,Lf=mf,Cf=Cc,Of=bf,If=TypeError,Pf=function(e,t){this.stopped=e,this.result=t},Df=Pf.prototype,Af=function(e,t,r){var n,i,o,a,s,l,u,c=r&&r.that,d=!(!r||!r.AS_ENTRIES),f=!(!r||!r.IS_RECORD),p=!(!r||!r.IS_ITERATOR),h=!(!r||!r.INTERRUPTED),v=wf(t,c),m=function(e){return n&&Of(n,"normal",e),new Pf(!0,e)},y=function(e){return d?(Rf(e),h?v(e[0],e[1],m):v(e[0],e[1])):h?v(e,m):v(e)};if(f)n=e.iterator;else if(p)n=e;else{if(!(i=Cf(e)))throw If(kf(e)+" is not iterable");if(Tf(i)){for(o=0,a=Ef(e);a>o;o++)if((s=y(e[o]))&&xf(Df,s))return s;return new Pf(!1)}n=Lf(e,i)}for(l=f?e.next:n.next;!(u=Sf(l,n)).done;){try{s=y(u.value)}catch(aD){Of(n,"throw",aD)}if("object"==typeof s&&s&&xf(Df,s))return s}return new Pf(!1)},Ff=Kn,Zf=Lr,jf=se,Vf=Tl,Wf=Ql,Mf=function(e,t,r){for(var n=Hd(t),i=Xd.f,o=Ud.f,a=0;a<n.length;a++){var s=n[a];Gd(e,s)||r&&Gd(r,s)||i(e,s,o(t,s))}},Nf=Wi,Gf=mr,Hf=W,Uf=function(e,t){Bd(t)&&"cause"in t&&Kd(e,"cause",t.cause)},Xf=function(e,t,r,n){nf&&(of?of(e,t):tf(e,"stack",rf(r,n)))},Bf=Af,Kf=function(e,t){return void 0===e?arguments.length<2?"":t:Ff(e)},Yf=ft("toStringTag"),Jf=Error,zf=[].push,Qf=function(e,t){var r,n=jf(qf,this);Wf?r=Wf(Jf(),n?Vf(this):qf):(r=n?this:Nf(qf),Gf(r,Yf,"Error")),void 0!==t&&Gf(r,"message",Kf(t)),Xf(r,Qf,r.stack,1),arguments.length>2&&Uf(r,arguments[2]);var i=[];return Bf(e,zf,{that:i}),Gf(r,"errors",i),r};Wf?Wf(Qf,Jf):Mf(Qf,Jf,{name:!0});var qf=Qf.prototype=Nf(Jf.prototype,{constructor:Hf(1,Qf),message:Hf(1,""),name:Hf(1,"AggregateError")});Zf({global:!0,constructor:!0,arity:2},{AggregateError:Qf});var $f,ep,tp,rp,np="undefined"!=typeof process&&"process"==b(process),ip=ae,op=oo,ap=C,sp=ft("species"),lp=function(e){var t=ip(e);ap&&t&&!t[sp]&&op(t,sp,{configurable:!0,get:function(){return this}})},up=se,cp=TypeError,dp=function(e,t){if(up(t,e))return e;throw cp("Incorrect invocation")},fp=_n,pp=xe,hp=TypeError,vp=function(e){if(fp(e))return e;throw hp(pp(e)+" is not a constructor")},mp=rr,yp=vp,gp=X,_p=ft("species"),bp=function(e,t){var r,n=mp(e).constructor;return void 0===n||gp(r=mp(n)[_p])?t:yp(r)},wp=TypeError,Sp=function(e,t){if(e<t)throw wp("Not enough arguments");return e},Rp=/(?:ipad|iphone|ipod).*applewebkit/i.test(le),kp=i,Tp=d,Ep=zt,xp=x,Lp=qe,Cp=o,Op=Si,Ip=ks,Pp=Et,Dp=Sp,Ap=Rp,Fp=np,Zp=kp.setImmediate,jp=kp.clearImmediate,Vp=kp.process,Wp=kp.Dispatch,Mp=kp.Function,Np=kp.MessageChannel,Gp=kp.String,Hp=0,Up={},Xp="onreadystatechange";Cp((function(){$f=kp.location}));var Bp=function(e){if(Lp(Up,e)){var t=Up[e];delete Up[e],t()}},Kp=function(e){return function(){Bp(e)}},Yp=function(e){Bp(e.data)},Jp=function(e){kp.postMessage(Gp(e),$f.protocol+"//"+$f.host)};Zp&&jp||(Zp=function(e){Dp(arguments.length,1);var t=xp(e)?e:Mp(e),r=Ip(arguments,1);return Up[++Hp]=function(){Tp(t,void 0,r)},ep(Hp),Hp},jp=function(e){delete Up[e]},Fp?ep=function(e){Vp.nextTick(Kp(e))}:Wp&&Wp.now?ep=function(e){Wp.now(Kp(e))}:Np&&!Ap?(rp=(tp=new Np).port2,tp.port1.onmessage=Yp,ep=Ep(rp.postMessage,rp)):kp.addEventListener&&xp(kp.postMessage)&&!kp.importScripts&&$f&&"file:"!==$f.protocol&&!Cp(Jp)?(ep=Jp,kp.addEventListener("message",Yp,!1)):ep=Xp in Pp("script")?function(e){Op.appendChild(Pp("script"))[Xp]=function(){Op.removeChild(this),Bp(e)}}:function(e){setTimeout(Kp(e),0)});var zp={set:Zp,clear:jp},Qp=function(){this.head=null,this.tail=null};Qp.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.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 qp,$p,eh,th,rh,nh=Qp,ih=/ipad|iphone|ipod/i.test(le)&&"undefined"!=typeof Pebble,oh=/web0s(?!.*chrome)/i.test(le),ah=i,sh=zt,lh=L.f,uh=zp.set,ch=nh,dh=Rp,fh=ih,ph=oh,hh=np,vh=ah.MutationObserver||ah.WebKitMutationObserver,mh=ah.document,yh=ah.process,gh=ah.Promise,_h=lh(ah,"queueMicrotask"),bh=_h&&_h.value;if(!bh){var wh=new ch,Sh=function(){var e,t;for(hh&&(e=yh.domain)&&e.exit();t=wh.get();)try{t()}catch(aD){throw wh.head&&qp(),aD}e&&e.enter()};dh||hh||ph||!vh||!mh?!fh&&gh&&gh.resolve?((th=gh.resolve(void 0)).constructor=gh,rh=sh(th.then,th),qp=function(){rh(Sh)}):hh?qp=function(){yh.nextTick(Sh)}:(uh=sh(uh,ah),qp=function(){uh(Sh)}):($p=!0,eh=mh.createTextNode(""),new vh(Sh).observe(eh,{characterData:!0}),qp=function(){eh.data=$p=!$p}),bh=function(e){wh.head||qp(),wh.add(e)}}var Rh=bh,kh=function(e){try{return{error:!1,value:e()}}catch(aD){return{error:!0,value:aD}}},Th=i.Promise,Eh="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,xh=!Eh&&!np&&"object"==typeof window&&"object"==typeof document,Lh=i,Ch=Th,Oh=x,Ih=Bt,Ph=on,Dh=ft,Ah=xh,Fh=Eh,Zh=ve,jh=Ch&&Ch.prototype,Vh=Dh("species"),Wh=!1,Mh=Oh(Lh.PromiseRejectionEvent),Nh={CONSTRUCTOR:Ih("Promise",(function(){var e=Ph(Ch),t=e!==String(Ch);if(!t&&66===Zh)return!0;if(!jh.catch||!jh.finally)return!0;if(!Zh||Zh<51||!/native code/.test(e)){var r=new Ch((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[Vh]=n,!(Wh=r.then((function(){}))instanceof n))return!0}return!t&&(Ah||Fh)&&!Mh})),REJECTION_EVENT:Mh,SUBCLASSING:Wh},Gh={},Hh=Ie,Uh=TypeError,Xh=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw Uh("Bad Promise constructor");t=e,r=n})),this.resolve=Hh(t),this.reject=Hh(r)};Gh.f=function(e){return new Xh(e)};var Bh,Kh,Yh=Lr,Jh=np,zh=i,Qh=P,qh=no,$h=Oo,ev=lp,tv=Ie,rv=x,nv=ee,iv=dp,ov=bp,av=zp.set,sv=Rh,lv=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(aD){}},uv=kh,cv=nh,dv=Bo,fv=Th,pv=Nh,hv=Gh,vv="Promise",mv=pv.CONSTRUCTOR,yv=pv.REJECTION_EVENT,gv=dv.getterFor(vv),_v=dv.set,bv=fv&&fv.prototype,wv=fv,Sv=bv,Rv=zh.TypeError,kv=zh.document,Tv=zh.process,Ev=hv.f,xv=Ev,Lv=!!(kv&&kv.createEvent&&zh.dispatchEvent),Cv="unhandledrejection",Ov=function(e){var t;return!(!nv(e)||!rv(t=e.then))&&t},Iv=function(e,t){var r,n,i,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&&Zv(t),t.rejection=1),!0===s?r=o:(c&&c.enter(),r=s(o),c&&(c.exit(),i=!0)),r===e.promise?u(Rv("Promise-chain cycle")):(n=Ov(r))?Qh(n,r,l,u):l(r)):u(o)}catch(aD){c&&!i&&c.exit(),u(aD)}},Pv=function(e,t){e.notified||(e.notified=!0,sv((function(){for(var r,n=e.reactions;r=n.get();)Iv(r,e);e.notified=!1,t&&!e.rejection&&Av(e)})))},Dv=function(e,t,r){var n,i;Lv?((n=kv.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),zh.dispatchEvent(n)):n={promise:t,reason:r},!yv&&(i=zh["on"+e])?i(n):e===Cv&&lv("Unhandled promise rejection",r)},Av=function(e){Qh(av,zh,(function(){var t,r=e.facade,n=e.value;if(Fv(e)&&(t=uv((function(){Jh?Tv.emit("unhandledRejection",n,r):Dv(Cv,r,n)})),e.rejection=Jh||Fv(e)?2:1,t.error))throw t.value}))},Fv=function(e){return 1!==e.rejection&&!e.parent},Zv=function(e){Qh(av,zh,(function(){var t=e.facade;Jh?Tv.emit("rejectionHandled",t):Dv("rejectionhandled",t,e.value)}))},jv=function(e,t,r){return function(n){e(t,n,r)}},Vv=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Pv(e,!0))},Wv=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw Rv("Promise can't be resolved itself");var n=Ov(t);n?sv((function(){var r={done:!1};try{Qh(n,t,jv(Wv,r,e),jv(Vv,r,e))}catch(aD){Vv(r,aD,e)}})):(e.value=t,e.state=1,Pv(e,!1))}catch(aD){Vv({done:!1},aD,e)}}};mv&&(Sv=(wv=function(e){iv(this,Sv),tv(e),Qh(Bh,this);var t=gv(this);try{e(jv(Wv,t),jv(Vv,t))}catch(aD){Vv(t,aD)}}).prototype,(Bh=function(e){_v(this,{type:vv,done:!1,notified:!1,parent:!1,reactions:new cv,rejection:!1,state:0,value:void 0})}).prototype=qh(Sv,"then",(function(e,t){var r=gv(this),n=Ev(ov(this,wv));return r.parent=!0,n.ok=!rv(e)||e,n.fail=rv(t)&&t,n.domain=Jh?Tv.domain:void 0,0==r.state?r.reactions.add(n):sv((function(){Iv(n,r)})),n.promise})),Kh=function(){var e=new Bh,t=gv(e);this.promise=e,this.resolve=jv(Wv,t),this.reject=jv(Vv,t)},hv.f=Ev=function(e){return e===wv||undefined===e?new Kh(e):xv(e)}),Yh({global:!0,constructor:!0,wrap:!0,forced:mv},{Promise:wv}),$h(wv,vv,!1,!0),ev(vv);var Mv=ft("iterator"),Nv=!1;try{var Gv=0,Hv={next:function(){return{done:!!Gv++}},return:function(){Nv=!0}};Hv[Mv]=function(){return this},Array.from(Hv,(function(){throw 2}))}catch(aD){}var Uv=function(e,t){if(!t&&!Nv)return!1;var r=!1;try{var n={};n[Mv]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(aD){}return r},Xv=Th,Bv=Nh.CONSTRUCTOR||!Uv((function(e){Xv.all(e).then(void 0,(function(){}))})),Kv=P,Yv=Ie,Jv=Gh,zv=kh,Qv=Af;Lr({target:"Promise",stat:!0,forced:Bv},{all:function(e){var t=this,r=Jv.f(t),n=r.resolve,i=r.reject,o=zv((function(){var r=Yv(t.resolve),o=[],a=0,s=1;Qv(e,(function(e){var l=a++,u=!1;s++,Kv(r,t,e).then((function(e){u||(u=!0,o[l]=e,--s||n(o))}),i)})),--s||n(o)}));return o.error&&i(o.value),r.promise}});var qv=Lr,$v=Nh.CONSTRUCTOR;Th&&Th.prototype,qv({target:"Promise",proto:!0,forced:$v,real:!0},{catch:function(e){return this.then(void 0,e)}});var em=P,tm=Ie,rm=Gh,nm=kh,im=Af;Lr({target:"Promise",stat:!0,forced:Bv},{race:function(e){var t=this,r=rm.f(t),n=r.reject,i=nm((function(){var i=tm(t.resolve);im(e,(function(e){em(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}});var om=P,am=Gh;Lr({target:"Promise",stat:!0,forced:Nh.CONSTRUCTOR},{reject:function(e){var t=am.f(this);return om(t.reject,void 0,e),t.promise}});var sm=rr,lm=ee,um=Gh,cm=function(e,t){if(sm(e),lm(t)&&t.constructor===e)return t;var r=um.f(e);return(0,r.resolve)(t),r.promise},dm=Lr,fm=Th,pm=Nh.CONSTRUCTOR,hm=cm,vm=ae("Promise"),mm=!pm;dm({target:"Promise",stat:!0,forced:true},{resolve:function(e){return hm(mm&&this===vm?fm:this,e)}});var ym=P,gm=Ie,_m=Gh,bm=kh,wm=Af;Lr({target:"Promise",stat:!0,forced:Bv},{allSettled:function(e){var t=this,r=_m.f(t),n=r.resolve,i=r.reject,o=bm((function(){var r=gm(t.resolve),i=[],o=0,a=1;wm(e,(function(e){var s=o++,l=!1;a++,ym(r,t,e).then((function(e){l||(l=!0,i[s]={status:"fulfilled",value:e},--a||n(i))}),(function(e){l||(l=!0,i[s]={status:"rejected",reason:e},--a||n(i))}))})),--a||n(i)}));return o.error&&i(o.value),r.promise}});var Sm=P,Rm=Ie,km=ae,Tm=Gh,Em=kh,xm=Af,Lm="No one promise resolved";Lr({target:"Promise",stat:!0,forced:Bv},{any:function(e){var t=this,r=km("AggregateError"),n=Tm.f(t),i=n.resolve,o=n.reject,a=Em((function(){var n=Rm(t.resolve),a=[],s=0,l=1,u=!1;xm(e,(function(e){var c=s++,d=!1;l++,Sm(n,t,e).then((function(e){d||u||(u=!0,i(e))}),(function(e){d||u||(d=!0,a[c]=e,--l||o(new r(a,Lm)))}))})),--l||o(new r(a,Lm))}));return a.error&&o(a.value),n.promise}});var Cm=Lr,Om=Th,Im=o,Pm=ae,Dm=x,Am=bp,Fm=cm,Zm=Om&&Om.prototype;Cm({target:"Promise",proto:!0,real:!0,forced:!!Om&&Im((function(){Zm.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Am(this,Pm("Promise")),r=Dm(e);return this.then(r?function(r){return Fm(t,e()).then((function(){return r}))}:e,r?function(r){return Fm(t,e()).then((function(){throw r}))}:e)}});var jm=te.Promise,Vm=Gh,Wm=kh;Lr({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=Vm.f(this),r=Wm(e);return(r.error?t.reject:t.resolve)(r.value),t.promise}});var Mm=r(jm),Nm=Lr,Gm=Or,Hm=m([].reverse),Um=[1,2];Nm({target:"Array",proto:!0,forced:String(Um)===String(Um.reverse())},{reverse:function(){return Gm(this)&&(this.length=this.length),Hm(this)}});var Xm=jc("Array").reverse,Bm=se,Km=Xm,Ym=Array.prototype,Jm=r((function(e){var t=e.reverse;return e===Ym||Bm(Ym,e)&&t===Ym.reverse?Km:t})),zm=Lr,Qm=Or,qm=_n,$m=ee,ey=qn,ty=Wr,ry=Q,ny=Xr,iy=ft,oy=ks,ay=On("slice"),sy=iy("species"),ly=Array,uy=Math.max;zm({target:"Array",proto:!0,forced:!ay},{slice:function(e,t){var r,n,i,o=ry(this),a=ty(o),s=ey(e,a),l=ey(void 0===t?a:t,a);if(Qm(o)&&(r=o.constructor,(qm(r)&&(r===ly||Qm(r.prototype))||$m(r)&&null===(r=r[sy]))&&(r=void 0),r===ly||void 0===r))return oy(o,s,l);for(n=new(void 0===r?ly:r)(uy(l-s,0)),i=0;s<l;s++,i++)s in o&&ny(n,i,o[s]);return n.length=i,n}});var cy=jc("Array").slice,dy=se,fy=cy,py=Array.prototype,hy=r((function(e){var t=e.slice;return e===py||dy(py,e)&&t===py.slice?fy:t})),vy=m,my=Ie,yy=ee,gy=qe,_y=ks,by=a,wy=Function,Sy=vy([].concat),Ry=vy([].join),ky={},Ty=by?wy.bind:function(e){var t=my(this),r=t.prototype,n=_y(arguments,1),i=function(){var r=Sy(n,_y(arguments));return this instanceof i?function(e,t,r){if(!gy(ky,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";ky[t]=wy("C,a","return new C("+Ry(n,",")+")")}return ky[t](e,r)}(t,r.length,r):t.apply(e,r)};return yy(r)&&(i.prototype=r),i},Ey=Ty;Lr({target:"Function",proto:!0,forced:Function.bind!==Ey},{bind:Ey});var xy=jc("Function").bind,Ly=se,Cy=xy,Oy=Function.prototype,Iy=r((function(e){var t=e.bind;return e===Oy||Ly(Oy,e)&&t===Oy.bind?Cy:t})),Py=Lr,Dy=d,Ay=Ty,Fy=vp,Zy=rr,jy=ee,Vy=Wi,Wy=o,My=ae("Reflect","construct"),Ny=Object.prototype,Gy=[].push,Hy=Wy((function(){function e(){}return!(My((function(){}),[],e)instanceof e)})),Uy=!Wy((function(){My((function(){}))})),Xy=Hy||Uy;Py({target:"Reflect",stat:!0,forced:Xy,sham:Xy},{construct:function(e,t){Fy(e),Zy(t);var r=arguments.length<3?e:Fy(arguments[2]);if(Uy&&!Hy)return My(e,t,r);if(e==r){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 n=[null];return Dy(Gy,n,t),new(Dy(Ay,e,n))}var i=r.prototype,o=Vy(jy(i)?i:Ny),a=Dy(e,o,t);return jy(a)?a:o}});var By=r(te.Reflect.construct),Ky=Lr,Yy=ni.indexOf,Jy=$c,zy=R([].indexOf),Qy=!!zy&&1/zy([1],1,-0)<0;Ky({target:"Array",proto:!0,forced:Qy||!Jy("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return Qy?zy(this,e,t)||0:Yy(this,e,t)}});var qy=jc("Array").indexOf,$y=se,eg=qy,tg=Array.prototype,rg=r((function(e){var t=e.indexOf;return e===tg||$y(tg,e)&&t===tg.indexOf?eg:t}));Lr({target:"Array",stat:!0},{isArray:Or});var ng=r(te.Array.isArray),ig=rr,og=bf,ag=zt,sg=P,lg=Je,ug=function(e,t,r,n){try{return n?t(ig(r)[0],r[1]):t(r)}catch(aD){og(e,"throw",aD)}},cg=uf,dg=_n,fg=Wr,pg=Xr,hg=mf,vg=Cc,mg=Array,yg=function(e){var t=lg(e),r=dg(this),n=arguments.length,i=n>1?arguments[1]:void 0,o=void 0!==i;o&&(i=ag(i,n>2?arguments[2]:void 0));var a,s,l,u,c,d,f=vg(t),p=0;if(!f||this===mg&&cg(f))for(a=fg(t),s=r?new this(a):mg(a);a>p;p++)d=o?i(t[p],p):t[p],pg(s,p,d);else for(c=(u=hg(t,f)).next,s=r?new this:[];!(l=sg(c,u)).done;p++)d=o?ug(u,i,[l.value,p],!0):l.value,pg(s,p,d);return s.length=p,s},gg=yg;Lr({target:"Array",stat:!0,forced:!Uv((function(e){Array.from(e)}))},{from:gg});var _g=r(te.Array.from),bg=r(ao.f("toPrimitive"));function wg(e,t){var r=Dc(e);if(Ac){var n=Ac(e);t&&(n=Gc(n).call(n,(function(t){return Qc(e,t).enumerable}))),r.push.apply(r,n)}return r}function Sg(e){for(var t=1;t<arguments.length;t++){var r,n,i=null!=arguments[t]?arguments[t]:{};t%2?ud(r=wg(Object(i),!0)).call(r,(function(t){Cg(e,t,i[t])})):bd?xd(e,bd(i)):ud(n=wg(Object(i))).call(n,(function(t){Ad(e,t,Qc(i,t))}))}return e}function Rg(){Rg=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Ad||function(e,t,r){e[t]=r.value},i="function"==typeof Rc?Rc:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,r){return Ad(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(x){l=function(e,t,r){return e[t]=r}}function u(e,t,r,i){var o=t&&t.prototype instanceof f?t:f,a=Zd(o.prototype),s=new k(i||[]);return n(a,"_invoke",{value:b(e,r,s)}),a}function c(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(x){return{type:"throw",arg:x}}}e.wrap=u;var d={};function f(){}function p(){}function h(){}var v={};l(v,o,(function(){return this}));var m=Md&&Md(Md(T([])));m&&m!==t&&r.call(m,o)&&(v=m);var y=h.prototype=f.prototype=Zd(v);function g(e){var t;ud(t=["next","throw","return"]).call(t,(function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(n,o,a,s){var l=c(e[n],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==Sc(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(d).then((function(e){u.value=e,a(u)}),(function(e){return i("throw",e,a,s)}))}s(l.arg)}var o;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return o=o?o.then(n,n):n()}})}function b(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=w(a,r);if(s){if(s===d)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=c(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=c(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,d;var o=i.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,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],ud(e).call(e,S,this),this.reset(!0)}function T(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 n=-1,i=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:E}}function E(){return{value:void 0,done:!0}}return p.prototype=h,n(y,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:p,configurable:!0}),p.displayName=l(h,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Nd?Nd(e,h):(e.__proto__=h,l(e,s,"GeneratorFunction")),e.prototype=Zd(y),e},e.awrap=function(e){return{__await:e}},g(_.prototype),l(_.prototype,a,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,i,o){void 0===o&&(o=Mm);var a=new _(u(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(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),r=[];for(var n in t)r.push(n);return Jm(r).call(r),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=T,k.prototype={constructor:k,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,ud(t=this.tryEntries).call(t,R),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+hy(n).call(n,1))&&(this[n]=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 n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;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,d):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),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),R(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;R(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:T(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function kg(e,t,r,n,i,o,a){try{var s=e[o](a),l=s.value}catch(aD){return void r(aD)}s.done?t(l):Mm.resolve(l).then(n,i)}function Tg(e){return function(){var t=this,r=arguments;return new Mm((function(n,i){var o=e.apply(t,r);function a(e){kg(o,n,i,a,s,"next",e)}function s(e){kg(o,n,i,a,s,"throw",e)}a(void 0)}))}}function Eg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Ad(e,Mg(n.key),n)}}function Lg(e,t,r){return t&&xg(e.prototype,t),r&&xg(e,r),Ad(e,"prototype",{writable:!1}),e}function Cg(e,t,r){return(t=Mg(t))in e?Ad(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Og(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Zd(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Ad(e,"prototype",{writable:!1}),t&&Pg(e,t)}function Ig(e){var t;return(Ig=Nd?Iy(t=Md).call(t):function(e){return e.__proto__||Md(e)})(e)}function Pg(e,t){var r;return(Pg=Nd?Iy(r=Nd).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function Dg(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Dc(e);for(n=0;n<o.length;n++)r=o[n],rg(t).call(t,r)>=0||(i[r]=e[r]);return i}(e,t);if(Ac){var o=Ac(e);for(n=0;n<o.length;n++)r=o[n],rg(t).call(t,r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Ag(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fg(e){var t=function(){if("undefined"==typeof Reflect||!By)return!1;if(By.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(By(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ig(e);if(t){var i=Ig(this).constructor;r=By(n,arguments,i)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===Sc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ag(e)}(this,r)}}function Zg(e,t){return function(e){if(ng(e))return e}(e)||function(e,t){var r=null==e?null:void 0!==Rc&&Oc(e)||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||Vg(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.")}()}function jg(e){return function(e){if(ng(e))return Wg(e)}(e)||function(e){if(void 0!==Rc&&null!=Oc(e)||null!=e["@@iterator"])return _g(e)}(e)||Vg(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 Vg(e,t){var r;if(e){if("string"==typeof e)return Wg(e,t);var n=hy(r=Object.prototype.toString.call(e)).call(r,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?_g(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wg(e,t):void 0}}function Wg(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Mg(e){var t=function(e,t){if("object"!==Sc(e)||null===e)return e;var r=e[bg];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Sc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Sc(t)?t:String(t)}var Ng,Gg="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,Hg=i,Ug=d,Xg=x,Bg=Gg,Kg=le,Yg=ks,Jg=Sp,zg=Hg.Function,Qg=/MSIE .\./.test(Kg)||Bg&&((Ng=Hg.Bun.version.split(".")).length<3||0==Ng[0]&&(Ng[1]<3||3==Ng[1]&&0==Ng[2])),qg=function(e,t){var r=t?2:1;return Qg?function(n,i){var o=Jg(arguments.length,1)>r,a=Xg(n)?n:zg(n),s=o?Yg(arguments,r):[],l=o?function(){Ug(a,this,s)}:a;return t?e(l,i):e(l)}:e},$g=Lr,e_=i,t_=qg(e_.setInterval,!0);$g({global:!0,bind:!0,forced:e_.setInterval!==t_},{setInterval:t_});var r_=Lr,n_=i,i_=qg(n_.setTimeout,!0);r_({global:!0,bind:!0,forced:n_.setTimeout!==i_},{setTimeout:i_});var o_=r(te.setTimeout),a_=ee,s_=b,l_=ft("match"),u_=function(e){var t;return a_(e)&&(void 0!==(t=e[l_])?!!t:"RegExp"==s_(e))},c_=TypeError,d_=function(e){if(u_(e))throw c_("The method doesn't accept regular expressions");return e},f_=ft("match"),p_=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[f_]=!1,"/./"[e](t)}catch(n){}}return!1},h_=Lr,v_=R;L.f;var m_=jr,y_=Kn,g_=d_,__=Y,b_=p_,w_=v_("".startsWith),S_=v_("".slice),R_=Math.min;h_({target:"String",proto:!0,forced:!b_("startsWith")},{startsWith:function(e){var t=y_(__(this));g_(e);var r=m_(R_(arguments.length>1?arguments[1]:void 0,t.length)),n=y_(e);return w_?w_(t,n,r):S_(t,r,r+n.length)===n}});var k_=jc("String").startsWith,T_=se,E_=k_,x_=String.prototype,L_=r((function(e){var t=e.startsWith;return"string"==typeof e||e===x_||T_(x_,e)&&t===x_.startsWith?E_:t})),C_=o,O_=ft("iterator"),I_=!C_((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),!e.toJSON||!t.size&&true||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[O_]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),P_=C,D_=m,A_=P,F_=o,Z_=hi,j_=to,V_=D,W_=Je,M_=U,N_=Object.assign,G_=Object.defineProperty,H_=D_([].concat),U_=!N_||F_((function(){if(P_&&1!==N_({b:1},N_(G_({},"a",{enumerable:!0,get:function(){G_(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!=N_({},e)[r]||Z_(N_({},t)).join("")!=n}))?function(e,t){for(var r=W_(e),n=arguments.length,i=1,o=j_.f,a=V_.f;n>i;)for(var s,l=M_(arguments[i++]),u=o?H_(Z_(l),o(l)):Z_(l),c=u.length,d=0;c>d;)s=u[d++],P_&&!A_(a,l,s)||(r[s]=l[s]);return r}:N_,X_=m,B_=2147483647,K_=/[^\0-\u007E]/,Y_=/[.\u3002\uFF0E\uFF61]/g,J_="Overflow: input needs wider integers to process",z_=RangeError,Q_=X_(Y_.exec),q_=Math.floor,$_=String.fromCharCode,eb=X_("".charCodeAt),tb=X_([].join),rb=X_([].push),nb=X_("".replace),ib=X_("".split),ob=X_("".toLowerCase),ab=function(e){return e+22+75*(e<26)},sb=function(e,t,r){var n=0;for(e=r?q_(e/700):e>>1,e+=q_(e/t);e>455;)e=q_(e/35),n+=36;return q_(n+36*e/(e+38))},lb=function(e){var t=[];e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=eb(e,r++);if(i>=55296&&i<=56319&&r<n){var o=eb(e,r++);56320==(64512&o)?rb(t,((1023&i)<<10)+(1023&o)+65536):(rb(t,i),r--)}else rb(t,i)}return t}(e);var r,n,i=e.length,o=128,a=0,s=72;for(r=0;r<e.length;r++)(n=e[r])<128&&rb(t,$_(n));var l=t.length,u=l;for(l&&rb(t,"-");u<i;){var c=B_;for(r=0;r<e.length;r++)(n=e[r])>=o&&n<c&&(c=n);var d=u+1;if(c-o>q_((B_-a)/d))throw z_(J_);for(a+=(c-o)*d,o=c,r=0;r<e.length;r++){if((n=e[r])<o&&++a>B_)throw z_(J_);if(n==o){for(var f=a,p=36;;){var h=p<=s?1:p>=s+26?26:p-s;if(f<h)break;var v=f-h,m=36-h;rb(t,$_(ab(h+v%m))),f=q_(v/m),p+=36}rb(t,$_(ab(f))),s=sb(a,d,u==l),a=0,u++}}a++,o++}return tb(t,"")},ub=no,cb=function(e,t,r){for(var n in t)r&&r.unsafe&&e[n]?e[n]=t[n]:ub(e,n,t[n],r);return e},db=Ji,fb=Math.floor,pb=function(e,t){var r=e.length,n=fb(r/2);return r<8?hb(e,t):vb(e,pb(db(e,0,n),t),pb(db(e,n),t),t)},hb=function(e,t){for(var r,n,i=e.length,o=1;o<i;){for(n=o,r=e[o];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==o++&&(e[n]=r)}return e},vb=function(e,t,r,n){for(var i=t.length,o=r.length,a=0,s=0;a<i||s<o;)e[a+s]=a<i&&s<o?n(t[a],r[s])<=0?t[a++]:r[s++]:a<i?t[a++]:r[s++];return e},mb=pb,yb=Lr,gb=i,_b=P,bb=m,wb=C,Sb=I_,Rb=no,kb=oo,Tb=cb,Eb=Oo,xb=Gl,Lb=Bo,Cb=dp,Ob=x,Ib=qe,Pb=zt,Db=en,Ab=rr,Fb=ee,Zb=Kn,jb=Wi,Vb=W,Wb=mf,Mb=Cc,Nb=Sp,Gb=mb,Hb=ft("iterator"),Ub="URLSearchParams",Xb=Ub+"Iterator",Bb=Lb.set,Kb=Lb.getterFor(Ub),Yb=Lb.getterFor(Xb),Jb=Object.getOwnPropertyDescriptor,zb=function(e){if(!wb)return gb[e];var t=Jb(gb,e);return t&&t.value},Qb=zb("fetch"),qb=zb("Request"),$b=zb("Headers"),ew=qb&&qb.prototype,tw=$b&&$b.prototype,rw=gb.RegExp,nw=gb.TypeError,iw=gb.decodeURIComponent,ow=gb.encodeURIComponent,aw=bb("".charAt),sw=bb([].join),lw=bb([].push),uw=bb("".replace),cw=bb([].shift),dw=bb([].splice),fw=bb("".split),pw=bb("".slice),hw=/\+/g,vw=Array(4),mw=function(e){return vw[e-1]||(vw[e-1]=rw("((?:%[\\da-f]{2}){"+e+"})","gi"))},yw=function(e){try{return iw(e)}catch(aD){return e}},gw=function(e){var t=uw(e,hw," "),r=4;try{return iw(t)}catch(aD){for(;r;)t=uw(t,mw(r--),yw);return t}},_w=/[!'()~]|%20/g,bw={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ww=function(e){return bw[e]},Sw=function(e){return uw(ow(e),_w,ww)},Rw=xb((function(e,t){Bb(this,{type:Xb,iterator:Wb(Kb(e).entries),kind:t})}),"Iterator",(function(){var e=Yb(this),t=e.kind,r=e.iterator.next(),n=r.value;return r.done||(r.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),r}),!0),kw=function(e){this.entries=[],this.url=null,void 0!==e&&(Fb(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===aw(e,0)?pw(e,1):e:Zb(e)))};kw.prototype={type:Ub,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,o,a,s,l=Mb(e);if(l)for(r=(t=Wb(e,l)).next;!(n=_b(r,t)).done;){if(o=(i=Wb(Ab(n.value))).next,(a=_b(o,i)).done||(s=_b(o,i)).done||!_b(o,i).done)throw nw("Expected sequence with length 2");lw(this.entries,{key:Zb(a.value),value:Zb(s.value)})}else for(var u in e)Ib(e,u)&&lw(this.entries,{key:u,value:Zb(e[u])})},parseQuery:function(e){if(e)for(var t,r,n=fw(e,"&"),i=0;i<n.length;)(t=n[i++]).length&&(r=fw(t,"="),lw(this.entries,{key:gw(cw(r)),value:gw(sw(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],lw(r,Sw(e.key)+"="+Sw(e.value));return sw(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Tw=function(){Cb(this,Ew);var e=Bb(this,new kw(arguments.length>0?arguments[0]:void 0));wb||(this.length=e.entries.length)},Ew=Tw.prototype;if(Tb(Ew,{append:function(e,t){Nb(arguments.length,2);var r=Kb(this);lw(r.entries,{key:Zb(e),value:Zb(t)}),wb||this.length++,r.updateURL()},delete:function(e){Nb(arguments.length,1);for(var t=Kb(this),r=t.entries,n=Zb(e),i=0;i<r.length;)r[i].key===n?dw(r,i,1):i++;wb||(this.length=r.length),t.updateURL()},get:function(e){Nb(arguments.length,1);for(var t=Kb(this).entries,r=Zb(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){Nb(arguments.length,1);for(var t=Kb(this).entries,r=Zb(e),n=[],i=0;i<t.length;i++)t[i].key===r&&lw(n,t[i].value);return n},has:function(e){Nb(arguments.length,1);for(var t=Kb(this).entries,r=Zb(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){Nb(arguments.length,1);for(var r,n=Kb(this),i=n.entries,o=!1,a=Zb(e),s=Zb(t),l=0;l<i.length;l++)(r=i[l]).key===a&&(o?dw(i,l--,1):(o=!0,r.value=s));o||lw(i,{key:a,value:s}),wb||(this.length=i.length),n.updateURL()},sort:function(){var e=Kb(this);Gb(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=Kb(this).entries,n=Pb(e,arguments.length>1?arguments[1]:void 0),i=0;i<r.length;)n((t=r[i++]).value,t.key,this)},keys:function(){return new Rw(this,"keys")},values:function(){return new Rw(this,"values")},entries:function(){return new Rw(this,"entries")}},{enumerable:!0}),Rb(Ew,Hb,Ew.entries,{name:"entries"}),Rb(Ew,"toString",(function(){return Kb(this).serialize()}),{enumerable:!0}),wb&&kb(Ew,"size",{get:function(){return Kb(this).entries.length},configurable:!0,enumerable:!0}),Eb(Tw,Ub),yb({global:!0,constructor:!0,forced:!Sb},{URLSearchParams:Tw}),!Sb&&Ob($b)){var xw=bb(tw.has),Lw=bb(tw.set),Cw=function(e){if(Fb(e)){var t,r=e.body;if(Db(r)===Ub)return t=e.headers?new $b(e.headers):new $b,xw(t,"content-type")||Lw(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),jb(e,{body:Vb(0,Zb(r)),headers:Vb(0,t)})}return e};if(Ob(Qb)&&yb({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return Qb(e,arguments.length>1?Cw(arguments[1]):{})}}),Ob(qb)){var Ow=function(e){return Cb(this,ew),new qb(e,arguments.length>1?Cw(arguments[1]):{})};ew.constructor=Ow,Ow.prototype=ew,yb({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Ow})}}var Iw,Pw=Lr,Dw=C,Aw=I_,Fw=i,Zw=zt,jw=m,Vw=no,Ww=oo,Mw=dp,Nw=qe,Gw=U_,Hw=yg,Uw=Ji,Xw=dc.codeAt,Bw=function(e){var t,r,n=[],i=ib(nb(ob(e),Y_,"."),".");for(t=0;t<i.length;t++)r=i[t],rb(n,Q_(K_,r)?"xn--"+lb(r):r);return tb(n,".")},Kw=Kn,Yw=Oo,Jw=Sp,zw={URLSearchParams:Tw,getState:Kb},Qw=Bo,qw=Qw.set,$w=Qw.getterFor("URL"),eS=zw.URLSearchParams,tS=zw.getState,rS=Fw.URL,nS=Fw.TypeError,iS=Fw.parseInt,oS=Math.floor,aS=Math.pow,sS=jw("".charAt),lS=jw(/./.exec),uS=jw([].join),cS=jw(1..toString),dS=jw([].pop),fS=jw([].push),pS=jw("".replace),hS=jw([].shift),vS=jw("".split),mS=jw("".slice),yS=jw("".toLowerCase),gS=jw([].unshift),_S="Invalid scheme",bS="Invalid host",wS="Invalid port",SS=/[a-z]/i,RS=/[\d+-.a-z]/i,kS=/\d/,TS=/^0x/i,ES=/^[0-7]+$/,xS=/^\d+$/,LS=/^[\da-f]+$/i,CS=/[\0\t\n\r #%/:<>?@[\\\]^|]/,OS=/[\0\t\n\r #/:<>?@[\\\]^|]/,IS=/^[\u0000-\u0020]+/,PS=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,DS=/[\t\n\r]/g,AS=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)gS(t,e%256),e=oS(e/256);return uS(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,i=0,o=0;o<8;o++)0!==e[o]?(i>r&&(t=n,r=i),n=null,i=0):(null===n&&(n=o),++i);return i>r&&(t=n,r=i),t}(e),r=0;r<8;r++)i&&0===e[r]||(i&&(i=!1),n===r?(t+=r?":":"::",i=!0):(t+=cS(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},FS={},ZS=Gw({},FS,{" ":1,'"':1,"<":1,">":1,"`":1}),jS=Gw({},ZS,{"#":1,"?":1,"{":1,"}":1}),VS=Gw({},jS,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),WS=function(e,t){var r=Xw(e,0);return r>32&&r<127&&!Nw(t,e)?e:encodeURIComponent(e)},MS={ftp:21,file:null,http:80,https:443,ws:80,wss:443},NS=function(e,t){var r;return 2==e.length&&lS(SS,sS(e,0))&&(":"==(r=sS(e,1))||!t&&"|"==r)},GS=function(e){var t;return e.length>1&&NS(mS(e,0,2))&&(2==e.length||"/"===(t=sS(e,2))||"\\"===t||"?"===t||"#"===t)},HS=function(e){return"."===e||"%2e"===yS(e)},US={},XS={},BS={},KS={},YS={},JS={},zS={},QS={},qS={},$S={},eR={},tR={},rR={},nR={},iR={},oR={},aR={},sR={},lR={},uR={},cR={},dR=function(e,t,r){var n,i,o,a=Kw(e);if(t){if(i=this.parse(a))throw nS(i);this.searchParams=null}else{if(void 0!==r&&(n=new dR(r,!0)),i=this.parse(a,null,n))throw nS(i);(o=tS(new eS)).bindURL(this),this.searchParams=o}};dR.prototype={type:"URL",parse:function(e,t,r){var n,i,o,a,s,l=this,u=t||US,c=0,d="",f=!1,p=!1,h=!1;for(e=Kw(e),t||(l.scheme="",l.username="",l.password="",l.host=null,l.port=null,l.path=[],l.query=null,l.fragment=null,l.cannotBeABaseURL=!1,e=pS(e,IS,""),e=pS(e,PS,"$1")),e=pS(e,DS,""),n=Hw(e);c<=n.length;){switch(i=n[c],u){case US:if(!i||!lS(SS,i)){if(t)return _S;u=BS;continue}d+=yS(i),u=XS;break;case XS:if(i&&(lS(RS,i)||"+"==i||"-"==i||"."==i))d+=yS(i);else{if(":"!=i){if(t)return _S;d="",u=BS,c=0;continue}if(t&&(l.isSpecial()!=Nw(MS,d)||"file"==d&&(l.includesCredentials()||null!==l.port)||"file"==l.scheme&&!l.host))return;if(l.scheme=d,t)return void(l.isSpecial()&&MS[l.scheme]==l.port&&(l.port=null));d="","file"==l.scheme?u=nR:l.isSpecial()&&r&&r.scheme==l.scheme?u=KS:l.isSpecial()?u=QS:"/"==n[c+1]?(u=YS,c++):(l.cannotBeABaseURL=!0,fS(l.path,""),u=lR)}break;case BS:if(!r||r.cannotBeABaseURL&&"#"!=i)return _S;if(r.cannotBeABaseURL&&"#"==i){l.scheme=r.scheme,l.path=Uw(r.path),l.query=r.query,l.fragment="",l.cannotBeABaseURL=!0,u=cR;break}u="file"==r.scheme?nR:JS;continue;case KS:if("/"!=i||"/"!=n[c+1]){u=JS;continue}u=qS,c++;break;case YS:if("/"==i){u=$S;break}u=sR;continue;case JS:if(l.scheme=r.scheme,i==Iw)l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,l.path=Uw(r.path),l.query=r.query;else if("/"==i||"\\"==i&&l.isSpecial())u=zS;else if("?"==i)l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,l.path=Uw(r.path),l.query="",u=uR;else{if("#"!=i){l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,l.path=Uw(r.path),l.path.length--,u=sR;continue}l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,l.path=Uw(r.path),l.query=r.query,l.fragment="",u=cR}break;case zS:if(!l.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,u=sR;continue}u=$S}else u=qS;break;case QS:if(u=qS,"/"!=i||"/"!=sS(d,c+1))continue;c++;break;case qS:if("/"!=i&&"\\"!=i){u=$S;continue}break;case $S:if("@"==i){f&&(d="%40"+d),f=!0,o=Hw(d);for(var v=0;v<o.length;v++){var m=o[v];if(":"!=m||h){var y=WS(m,VS);h?l.password+=y:l.username+=y}else h=!0}d=""}else if(i==Iw||"/"==i||"?"==i||"#"==i||"\\"==i&&l.isSpecial()){if(f&&""==d)return"Invalid authority";c-=Hw(d).length+1,d="",u=eR}else d+=i;break;case eR:case tR:if(t&&"file"==l.scheme){u=oR;continue}if(":"!=i||p){if(i==Iw||"/"==i||"?"==i||"#"==i||"\\"==i&&l.isSpecial()){if(l.isSpecial()&&""==d)return bS;if(t&&""==d&&(l.includesCredentials()||null!==l.port))return;if(a=l.parseHost(d))return a;if(d="",u=aR,t)return;continue}"["==i?p=!0:"]"==i&&(p=!1),d+=i}else{if(""==d)return bS;if(a=l.parseHost(d))return a;if(d="",u=rR,t==tR)return}break;case rR:if(!lS(kS,i)){if(i==Iw||"/"==i||"?"==i||"#"==i||"\\"==i&&l.isSpecial()||t){if(""!=d){var g=iS(d,10);if(g>65535)return wS;l.port=l.isSpecial()&&g===MS[l.scheme]?null:g,d=""}if(t)return;u=aR;continue}return wS}d+=i;break;case nR:if(l.scheme="file","/"==i||"\\"==i)u=iR;else{if(!r||"file"!=r.scheme){u=sR;continue}if(i==Iw)l.host=r.host,l.path=Uw(r.path),l.query=r.query;else if("?"==i)l.host=r.host,l.path=Uw(r.path),l.query="",u=uR;else{if("#"!=i){GS(uS(Uw(n,c),""))||(l.host=r.host,l.path=Uw(r.path),l.shortenPath()),u=sR;continue}l.host=r.host,l.path=Uw(r.path),l.query=r.query,l.fragment="",u=cR}}break;case iR:if("/"==i||"\\"==i){u=oR;break}r&&"file"==r.scheme&&!GS(uS(Uw(n,c),""))&&(NS(r.path[0],!0)?fS(l.path,r.path[0]):l.host=r.host),u=sR;continue;case oR:if(i==Iw||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&NS(d))u=sR;else if(""==d){if(l.host="",t)return;u=aR}else{if(a=l.parseHost(d))return a;if("localhost"==l.host&&(l.host=""),t)return;d="",u=aR}continue}d+=i;break;case aR:if(l.isSpecial()){if(u=sR,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=Iw&&(u=sR,"/"!=i))continue}else l.fragment="",u=cR;else l.query="",u=uR;break;case sR:if(i==Iw||"/"==i||"\\"==i&&l.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=yS(s=d))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(l.shortenPath(),"/"==i||"\\"==i&&l.isSpecial()||fS(l.path,"")):HS(d)?"/"==i||"\\"==i&&l.isSpecial()||fS(l.path,""):("file"==l.scheme&&!l.path.length&&NS(d)&&(l.host&&(l.host=""),d=sS(d,0)+":"),fS(l.path,d)),d="","file"==l.scheme&&(i==Iw||"?"==i||"#"==i))for(;l.path.length>1&&""===l.path[0];)hS(l.path);"?"==i?(l.query="",u=uR):"#"==i&&(l.fragment="",u=cR)}else d+=WS(i,jS);break;case lR:"?"==i?(l.query="",u=uR):"#"==i?(l.fragment="",u=cR):i!=Iw&&(l.path[0]+=WS(i,FS));break;case uR:t||"#"!=i?i!=Iw&&("'"==i&&l.isSpecial()?l.query+="%27":l.query+="#"==i?"%23":WS(i,FS)):(l.fragment="",u=cR);break;case cR:i!=Iw&&(l.fragment+=WS(i,ZS))}c++}},parseHost:function(e){var t,r,n;if("["==sS(e,0)){if("]"!=sS(e,e.length-1))return bS;if(t=function(e){var t,r,n,i,o,a,s,l=[0,0,0,0,0,0,0,0],u=0,c=null,d=0,f=function(){return sS(e,d)};if(":"==f()){if(":"!=sS(e,1))return;d+=2,c=++u}for(;f();){if(8==u)return;if(":"!=f()){for(t=r=0;r<4&&lS(LS,f());)t=16*t+iS(f(),16),d++,r++;if("."==f()){if(0==r)return;if(d-=r,u>6)return;for(n=0;f();){if(i=null,n>0){if(!("."==f()&&n<4))return;d++}if(!lS(kS,f()))return;for(;lS(kS,f());){if(o=iS(f(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;d++}l[u]=256*l[u]+i,2!=++n&&4!=n||u++}if(4!=n)return;break}if(":"==f()){if(d++,!f())return}else if(f())return;l[u++]=t}else{if(null!==c)return;d++,c=++u}}if(null!==c)for(a=u-c,u=7;0!=u&&a>0;)s=l[u],l[u--]=l[c+a-1],l[c+--a]=s;else if(8!=u)return;return l}(mS(e,1,-1)),!t)return bS;this.host=t}else if(this.isSpecial()){if(e=Bw(e),lS(CS,e))return bS;if(t=function(e){var t,r,n,i,o,a,s,l=vS(e,".");if(l.length&&""==l[l.length-1]&&l.length--,(t=l.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(i=l[n]))return e;if(o=10,i.length>1&&"0"==sS(i,0)&&(o=lS(TS,i)?16:8,i=mS(i,8==o?1:2)),""===i)a=0;else{if(!lS(10==o?xS:8==o?ES:LS,i))return e;a=iS(i,o)}fS(r,a)}for(n=0;n<t;n++)if(a=r[n],n==t-1){if(a>=aS(256,5-t))return null}else if(a>255)return null;for(s=dS(r),n=0;n<r.length;n++)s+=r[n]*aS(256,3-n);return s}(e),null===t)return bS;this.host=t}else{if(lS(OS,e))return bS;for(t="",r=Hw(e),n=0;n<r.length;n++)t+=WS(r[n],FS);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return Nw(MS,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&NS(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,i=e.host,o=e.port,a=e.path,s=e.query,l=e.fragment,u=t+":";return null!==i?(u+="//",e.includesCredentials()&&(u+=r+(n?":"+n:"")+"@"),u+=AS(i),null!==o&&(u+=":"+o)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?a[0]:a.length?"/"+uS(a,"/"):"",null!==s&&(u+="?"+s),null!==l&&(u+="#"+l),u},setHref:function(e){var t=this.parse(e);if(t)throw nS(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new fR(e.path[0]).origin}catch(aD){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+AS(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Kw(e)+":",US)},getUsername:function(){return this.username},setUsername:function(e){var t=Hw(Kw(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=WS(t[r],VS)}},getPassword:function(){return this.password},setPassword:function(e){var t=Hw(Kw(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=WS(t[r],VS)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?AS(e):AS(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,eR)},getHostname:function(){var e=this.host;return null===e?"":AS(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,tR)},getPort:function(){var e=this.port;return null===e?"":Kw(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=Kw(e))?this.port=null:this.parse(e,rR))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+uS(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,aR))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Kw(e))?this.query=null:("?"==sS(e,0)&&(e=mS(e,1)),this.query="",this.parse(e,uR)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=Kw(e))?("#"==sS(e,0)&&(e=mS(e,1)),this.fragment="",this.parse(e,cR)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var fR=function(e){var t=Mw(this,pR),r=Jw(arguments.length,1)>1?arguments[1]:void 0,n=qw(t,new dR(e,!1,r));Dw||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},pR=fR.prototype,hR=function(e,t){return{get:function(){return $w(this)[e]()},set:t&&function(e){return $w(this)[t](e)},configurable:!0,enumerable:!0}};if(Dw&&(Ww(pR,"href",hR("serialize","setHref")),Ww(pR,"origin",hR("getOrigin")),Ww(pR,"protocol",hR("getProtocol","setProtocol")),Ww(pR,"username",hR("getUsername","setUsername")),Ww(pR,"password",hR("getPassword","setPassword")),Ww(pR,"host",hR("getHost","setHost")),Ww(pR,"hostname",hR("getHostname","setHostname")),Ww(pR,"port",hR("getPort","setPort")),Ww(pR,"pathname",hR("getPathname","setPathname")),Ww(pR,"search",hR("getSearch","setSearch")),Ww(pR,"searchParams",hR("getSearchParams")),Ww(pR,"hash",hR("getHash","setHash"))),Vw(pR,"toJSON",(function(){return $w(this).serialize()}),{enumerable:!0}),Vw(pR,"toString",(function(){return $w(this).serialize()}),{enumerable:!0}),rS){var vR=rS.createObjectURL,mR=rS.revokeObjectURL;vR&&Vw(fR,"createObjectURL",Zw(vR,rS)),mR&&Vw(fR,"revokeObjectURL",Zw(mR,rS))}Yw(fR,"URL"),Pw({global:!0,constructor:!0,forced:!Aw,sham:!Dw},{URL:fR});var yR=Lr,gR=o,_R=Sp,bR=Kn,wR=I_,SR=ae("URL");yR({target:"URL",stat:!0,forced:!(wR&&gR((function(){SR.canParse()})))},{canParse:function(e){var t=_R(arguments.length,1),r=bR(e),n=t<2||void 0===arguments[1]?void 0:bR(arguments[1]);try{return!!new SR(r,n)}catch(aD){return!1}}});var RR=r(te.URL),kR=Lr,TR=ea.find,ER="find",xR=!0;ER in[]&&Array(1)[ER]((function(){xR=!1})),kR({target:"Array",proto:!0,forced:xR},{find:function(e){return TR(this,e,arguments.length>1?arguments[1]:void 0)}});var LR=jc("Array").find,CR=se,OR=LR,IR=Array.prototype,PR=r((function(e){var t=e.find;return e===IR||CR(IR,e)&&t===IR.find?OR:t})),DR=jc("Array").concat,AR=se,FR=DR,ZR=Array.prototype,jR=r((function(e){var t=e.concat;return e===ZR||AR(ZR,e)&&t===ZR.concat?FR:t})),VR=C,WR=Or,MR=TypeError,NR=Object.getOwnPropertyDescriptor,GR=VR&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(aD){return aD instanceof TypeError}}(),HR=xe,UR=TypeError,XR=function(e,t){if(!delete e[t])throw UR("Cannot delete property "+HR(t)+" of "+HR(e))},BR=Lr,KR=Je,YR=qn,JR=Ar,zR=Wr,QR=GR?function(e,t){if(WR(e)&&!NR(e,"length").writable)throw MR("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},qR=Nr,$R=En,ek=Xr,tk=XR,rk=On("splice"),nk=Math.max,ik=Math.min;BR({target:"Array",proto:!0,forced:!rk},{splice:function(e,t){var r,n,i,o,a,s,l=KR(this),u=zR(l),c=YR(e,u),d=arguments.length;for(0===d?r=n=0:1===d?(r=0,n=u-c):(r=d-2,n=ik(nk(JR(t),0),u-c)),qR(u+r-n),i=$R(l,n),o=0;o<n;o++)(a=c+o)in l&&ek(i,o,l[a]);if(i.length=n,r<n){for(o=c;o<u-n;o++)s=o+r,(a=o+n)in l?l[s]=l[a]:tk(l,s);for(o=u;o>u-n+r;o--)tk(l,o-1)}else if(r>n)for(o=u-n;o>c;o--)s=o+r-1,(a=o+n-1)in l?l[s]=l[a]:tk(l,s);for(o=0;o<r;o++)l[o+c]=arguments[o+2];return QR(l,u-n+r),i}});var ok=jc("Array").splice,ak=se,sk=ok,lk=Array.prototype,uk=r((function(e){var t=e.splice;return e===lk||ak(lk,e)&&t===lk.splice?sk:t}));Lr({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var ck=r(te.Number.isNaN),dk="\t\n\v\f\r                 \u2028\u2029\ufeff",fk=Y,pk=Kn,hk=dk,vk=m("".replace),mk=RegExp("^["+hk+"]+"),yk=RegExp("(^|[^"+hk+"])["+hk+"]+$"),gk=function(e){return function(t){var r=pk(fk(t));return 1&e&&(r=vk(r,mk,"")),2&e&&(r=vk(r,yk,"$1")),r}},_k={start:gk(1),end:gk(2),trim:gk(3)},bk=i,wk=o,Sk=m,Rk=Kn,kk=_k.trim,Tk=dk,Ek=bk.parseInt,xk=bk.Symbol,Lk=xk&&xk.iterator,Ck=/^[+-]?0x/i,Ok=Sk(Ck.exec),Ik=8!==Ek(Tk+"08")||22!==Ek(Tk+"0x16")||Lk&&!wk((function(){Ek(Object(Lk))}))?function(e,t){var r=kk(Rk(e));return Ek(r,t>>>0||(Ok(Ck,r)?16:10))}:Ek;Lr({global:!0,forced:parseInt!=Ik},{parseInt:Ik});var Pk=r(te.parseInt),Dk=ea.map;Lr({target:"Array",proto:!0,forced:!On("map")},{map:function(e){return Dk(this,e,arguments.length>1?arguments[1]:void 0)}});var Ak=jc("Array").map,Fk=se,Zk=Ak,jk=Array.prototype,Vk=r((function(e){var t=e.map;return e===jk||Fk(jk,e)&&t===jk.map?Zk:t})),Wk=U_;Lr({target:"Object",stat:!0,arity:2,forced:Object.assign!==Wk},{assign:Wk});var Mk=r(te.Object.assign),Nk=r(bc),Gk=qe,Hk=P,Uk=ee,Xk=rr,Bk=function(e){return void 0!==e&&(Gk(e,"value")||Gk(e,"writable"))},Kk=L,Yk=Tl;Lr({target:"Reflect",stat:!0},{get:function e(t,r){var n,i,o=arguments.length<3?t:arguments[2];return Xk(t)===o?t[r]:(n=Kk.f(t,r))?Bk(n)?n.value:void 0===n.get?void 0:Hk(n.get,o):Uk(i=Yk(t))?e(i,r,o):void 0}});var Jk=r(te.Reflect.get);function zk(e,t){var r=Dc(e);if(Ac){var n=Ac(e);t&&(n=Gc(n).call(n,(function(t){return Qc(e,t).enumerable}))),r.push.apply(r,n)}return r}function Qk(e){for(var t=1;t<arguments.length;t++){var r,n,i=null!=arguments[t]?arguments[t]:{};t%2?ud(r=zk(Object(i),!0)).call(r,(function(t){rT(e,t,i[t])})):bd?xd(e,bd(i)):ud(n=zk(Object(i))).call(n,(function(t){Ad(e,t,Qc(i,t))}))}return e}function qk(e){return(qk="function"==typeof Rc&&"symbol"==typeof Nk?function(e){return typeof e}:function(e){return e&&"function"==typeof Rc&&e.constructor===Rc&&e!==Rc.prototype?"symbol":typeof e})(e)}function $k(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eT(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Ad(e,oT(n.key),n)}}function tT(e,t,r){return t&&eT(e.prototype,t),r&&eT(e,r),Ad(e,"prototype",{writable:!1}),e}function rT(e,t,r){return(t=oT(t))in e?Ad(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nT(e){return function(e){if(ng(e))return iT(e)}(e)||function(e){if(void 0!==Rc&&null!=Oc(e)||null!=e["@@iterator"])return _g(e)}(e)||function(e,t){var r;if(!e)return;if("string"==typeof e)return iT(e,t);var n=hy(r=Object.prototype.toString.call(e)).call(r,8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return _g(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iT(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 iT(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function oT(e){var t=function(e,t){if("object"!==Sc(e)||null===e)return e;var r=e[bg];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Sc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Sc(t)?t:String(t)}var aT={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,n,o,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new i(n,o||e,a),l=r?r+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 n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}Zd&&(n.prototype=Zd(null),(new n).__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?hy(n).call(n,1):n);return Ac?jR(i).call(i,Ac(e)):i},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,a=new Array(o);i<o;i++)a[i]=n[i].fn;return a},s.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},s.prototype.emit=function(e,t,n,i,o,a){var s=r?r+e:e;if(!this._events[s])return!1;var l,u,c=this._events[s],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){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,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,o),!0;case 6:return c.fn.call(c.context,t,n,i,o,a),!0}for(u=1,l=new Array(d-1);u<d;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var f,p=c.length;for(u=0;u<p;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),d){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,n);break;case 4:c[u].fn.call(c[u].context,t,n,i);break;default:if(!l)for(f=1,l=new Array(d-1);f<d;f++)l[f-1]=arguments[f];c[u].fn.apply(c[u].context,l)}}return!0},s.prototype.on=function(e,t,r){return o(this,e,t,r,!1)},s.prototype.once=function(e,t,r){return o(this,e,t,r,!0)},s.prototype.removeListener=function(e,t,n,i){var o=r?r+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||i&&!s.once||n&&s.context!==n||a(this,o);else{for(var l=0,u=[],c=s.length;l<c;l++)(s[l].fn!==t||i&&!s[l].once||n&&s[l].context!==n)&&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=r?r+e:e,this._events[t]&&a(this,t)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s}(aT);var sT=r(aT.exports),lT=ea.some;Lr({target:"Array",proto:!0,forced:!$c("some")},{some:function(e){return lT(this,e,arguments.length>1?arguments[1]:void 0)}});var uT=jc("Array").some,cT=se,dT=uT,fT=Array.prototype,pT=r((function(e){var t=e.some;return e===fT||cT(fT,e)&&t===fT.some?dT:t})),hT=Ar,vT=Kn,mT=Y,yT=RangeError,gT=m,_T=jr,bT=Kn,wT=Y,ST=gT((function(e){var t=vT(mT(this)),r="",n=hT(e);if(n<0||n==1/0)throw yT("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(t+=t))1&n&&(r+=t);return r})),RT=gT("".slice),kT=Math.ceil,TT=function(e){return function(t,r,n){var i,o,a=bT(wT(t)),s=_T(r),l=a.length,u=void 0===n?" ":bT(n);return s<=l||""==u?a:((o=ST(u,kT((i=s-l)/u.length))).length>i&&(o=RT(o,0,i)),e?a+o:o+a)}},ET={start:TT(!1),end:TT(!0)},xT=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(le),LT=ET.start;Lr({target:"String",proto:!0,forced:xT},{padStart:function(e){return LT(this,e,arguments.length>1?arguments[1]:void 0)}});var CT=jc("String").padStart,OT=se,IT=CT,PT=String.prototype,DT=r((function(e){var t=e.padStart;return"string"==typeof e||e===PT||OT(PT,e)&&t===PT.padStart?IT:t})),AT=r(te.setInterval),FT=ea.every;Lr({target:"Array",proto:!0,forced:!$c("every")},{every:function(e){return FT(this,e,arguments.length>1?arguments[1]:void 0)}});var ZT=jc("Array").every,jT=se,VT=ZT,WT=Array.prototype,MT=r((function(e){var t=e.every;return e===WT||jT(WT,e)&&t===WT.every?VT:t})),NT=i,GT=o,HT=Kn,UT=_k.trim,XT=dk,BT=m("".charAt),KT=NT.parseFloat,YT=NT.Symbol,JT=YT&&YT.iterator,zT=1/KT(XT+"-0")!=-1/0||JT&&!GT((function(){KT(Object(JT))}))?function(e){var t=UT(HT(e)),r=KT(t);return 0===r&&"-"==BT(t,0)?-0:r}:KT;Lr({global:!0,forced:parseFloat!=zT},{parseFloat:zT});var QT=r(te.parseFloat),qT=ml.PROPER,$T=o,eE=dk,tE=_k.trim;Lr({target:"String",proto:!0,forced:function(e){return $T((function(){return!!eE[e]()||"​…᠎"!=="​…᠎"[e]()||qT&&eE[e].name!==e}))}("trim")},{trim:function(){return tE(this)}});var rE=jc("String").trim,nE=se,iE=rE,oE=String.prototype,aE=r((function(e){var t=e.trim;return"string"==typeof e||e===oE||nE(oE,e)&&t===oE.trim?iE:t})),sE=le.match(/firefox\/(\d+)/i),lE=!!sE&&+sE[1],uE=/MSIE|Trident/.test(le),cE=le.match(/AppleWebKit\/(\d+)\./),dE=!!cE&&+cE[1],fE=Lr,pE=m,hE=Ie,vE=Je,mE=Wr,yE=XR,gE=Kn,_E=o,bE=mb,wE=$c,SE=lE,RE=uE,kE=ve,TE=dE,EE=[],xE=pE(EE.sort),LE=pE(EE.push),CE=_E((function(){EE.sort(void 0)})),OE=_E((function(){EE.sort(null)})),IE=wE("sort"),PE=!_E((function(){if(kE)return kE<70;if(!(SE&&SE>3)){if(RE)return!0;if(TE)return TE<603;var e,t,r,n,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)EE.push({k:t+n,v:r})}for(EE.sort((function(e,t){return t.v-e.v})),n=0;n<EE.length;n++)t=EE[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));fE({target:"Array",proto:!0,forced:CE||!OE||!IE||!PE},{sort:function(e){void 0!==e&&hE(e);var t=vE(this);if(PE)return void 0===e?xE(t):xE(t,e);var r,n,i=[],o=mE(t);for(n=0;n<o;n++)n in t&&LE(i,t[n]);for(bE(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:gE(t)>gE(r)?1:-1}}(e)),r=mE(i),n=0;n<r;)t[n]=i[n++];for(;n<o;)yE(t,n++);return t}});var DE=jc("Array").sort,AE=se,FE=DE,ZE=Array.prototype,jE=r((function(e){var t=e.sort;return e===ZE||AE(ZE,e)&&t===ZE.sort?FE:t})),VE=Lr,WE=Date,ME=m(WE.prototype.getTime);VE({target:"Date",stat:!0},{now:function(){return ME(new WE)}});var NE,GE=r(te.Date.now),HE="undefined"!=typeof window&&window.location&&rg(NE=window.location.href).call(NE,"xgplayerdebugger=1")>-1,UE="color: #525252; background-color: #90ee90;",XE="color: #525252; background-color: red;",BE="color: #525252; background-color: yellow; ",KE="%c[xgplayer]",YE={config:{debug:HE?3:0},logInfo:function(e){for(var t,r,n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];this.config.debug>=3&&(r=console).log.apply(r,jR(t=[KE,UE,e]).call(t,i))},logWarn:function(e){for(var t,r,n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];this.config.debug>=1&&(r=console).warn.apply(r,jR(t=[KE,BE,e]).call(t,i))},logError:function(e){var t,r;if(!(this.config.debug<1)){for(var n=this.config.debug>=2?"trace":"error",i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];(r=console)[n].apply(r,jR(t=[KE,XE,e]).call(t,o))}}},JE=function(){function e(t){$k(this,e),this.bufferedList=t}return tT(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}(),zE={};zE.createDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",r=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]:"",o=document.createElement(t);return o.className=i,o.innerHTML=r,ud(e=Dc(n)).call(e,(function(e){var r=e,i=n[e];"video"===t||"audio"===t||"live-video"===t?i&&o.setAttribute(r,i):o.setAttribute(r,i)})),o},zE.createDomFromHtml=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";try{var n=document.createElement("div");n.innerHTML=e;var i=n.children;if(n=null,i.length>0){var o;if(i=i[0],r&&zE.addClass(i,r),t)ud(o=Dc(t)).call(o,(function(e){i.setAttribute(e,t[e])}));return i}return null}catch(a){return YE.logError("util.createDomFromHtml",a),null}},zE.hasClass=function(e,t){if(!e||!t)return!1;try{return pT(Array.prototype).call(e.classList,(function(e){return e===t}))}catch(n){var r=e.className&&"object"===qk(e.className)?e.getAttribute("class"):e.className;return r&&!!r.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}},zE.addClass=function(e,t){if(e&&t)try{var r;ud(r=t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(r,(function(t){t&&e.classList.add(t)}))}catch(n){zE.hasClass(e,t)||(e.className&&"object"===qk(e.className)?e.setAttribute("class",e.getAttribute("class")+" "+t):e.className+=" "+t)}},zE.removeClass=function(e,t){if(e&&t)try{var r;ud(r=t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(r,(function(t){t&&e.classList.remove(t)}))}catch(i){var n;if(zE.hasClass(e,t))ud(n=t.split(/\s+/g)).call(n,(function(t){var r=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className&&"object"===qk(e.className)?e.setAttribute("class",e.getAttribute("class").replace(r," ")):e.className=e.className.replace(r," ")}))}},zE.toggleClass=function(e,t){var r;e&&ud(r=t.split(/\s+/g)).call(r,(function(t){zE.hasClass(e,t)?zE.removeClass(e,t):zE.addClass(e,t)}))},zE.classNames=function(){for(var e=arguments,t=[],r=function(r){if("String"===zE.typeOf(e[r]))t.push(e[r]);else if("Object"===zE.typeOf(e[r])){var n;Vk(n=Dc(e[r])).call(n,(function(n){e[r][n]&&t.push(n)}))}},n=0;n<arguments.length;n++)r(n);return t.join(" ")},zE.findDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,r=arguments.length>1?arguments[1]:void 0;try{e=t.querySelector(r)}catch(n){YE.logError("util.findDom",n),0===rg(r).call(r,"#")&&(e=t.getElementById(hy(r).call(r,1)))}return e},zE.getCss=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,!1)[t]},zE.padStart=function(e,t,r){for(var n=String(r),i=t>>0,o=Math.ceil(i/n.length),a=[],s=String(e);o--;)a.push(n);return a.join("").substring(0,i-s.length)+s},zE.format=function(e){if(window.isNaN(e))return"";e=Math.round(e);var t=DT(zE).call(zE,Math.floor(e/3600),2,0),r=DT(zE).call(zE,Math.floor((e-3600*t)/60),2,0),n=DT(zE).call(zE,Math.floor(e-3600*t-60*r),2,0);return("00"===t?[r,n]:[t,r,n]).join(":")},zE.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},zE.typeOf=function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},zE.deepCopy=function(e,t){var r;if("Object"===zE.typeOf(t)&&"Object"===zE.typeOf(e))return ud(r=Dc(t)).call(r,(function(r){if("Object"!==zE.typeOf(t[r])||t[r]instanceof Node)if("Array"===zE.typeOf(t[r])){var n;e[r]="Array"===zE.typeOf(e[r])?jR(n=e[r]).call(n,t[r]):t[r]}else e[r]=t[r];else void 0===e[r]||void 0===e[r]?e[r]=t[r]:zE.deepCopy(e[r],t[r])})),e},zE.deepMerge=function(e,t){var r;return Vk(r=Dc(t)).call(r,(function(r){var n;"Array"===zE.typeOf(t[r])&&"Array"===zE.typeOf(e[r])?"Array"===zE.typeOf(e[r])&&(n=e[r]).push.apply(n,nT(t[r])):zE.typeOf(e[r])!==zE.typeOf(t[r])||null===e[r]||"Object"!==zE.typeOf(e[r])||t[r]instanceof window.Node?null!==t[r]&&(e[r]=t[r]):zE.deepMerge(e[r],t[r])})),e},zE.getBgImage=function(e){var t=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;if(!t||"none"===t)return"";var r=document.createElement("a");return r.href=t.replace(/url\("|"\)/g,""),r.href},zE.copyDom=function(e){if(e&&1===e.nodeType){var t=document.createElement(e.tagName);return ud(Array.prototype).call(e.attributes,(function(e){t.setAttribute(e.name,e.value)})),e.innerHTML&&(t.innerHTML=e.innerHTML),t}return""},zE.setInterval=function(e,t,r,n){e._interval[t]||(e._interval[t]=AT(Iy(r).call(r,e),n))},zE.clearInterval=function(e,t){clearInterval(e._interval[t]),e._interval[t]=null},zE.setTimeout=function(e,t,r){e._timers||(e._timers=[]);var n=o_((function(){t(),zE.clearTimeout(e,n)}),r);return e._timers.push(n),n},zE.clearTimeout=function(e,t){var r=e._timers;if("Array"===zE.typeOf(r)){for(var n=0;n<r.length;n++)if(r[n]===t){uk(r).call(r,n,1),clearTimeout(t);break}}else clearTimeout(t)},zE.clearAllTimers=function(e){var t=e._timers;"Array"===zE.typeOf(t)&&(Vk(t).call(t,(function(e){clearTimeout(e)})),e._timerIds=[])},zE.createImgBtn=function(e,t,r,n){var i,o,a,s,l,u,c,d,f,p,h,v,m=zE.createDom("xg-".concat(e),"",{},"xgplayer-".concat(e,"-img"));(m.style.backgroundImage='url("'.concat(t,'")'),r&&n)&&(MT(i=["px","rem","em","pt","dp","vw","vh","vm","%"]).call(i,(function(e){var t,i;return!(rg(r).call(r,e)>-1&&rg(n).call(n,e)>-1)||(c=QT(aE(t=hy(r).call(r,0,rg(r).call(r,e))).call(t)),d=QT(aE(i=hy(n).call(n,0,rg(n).call(n,e))).call(i)),f=e,!1)})),m.style.width=jR(o="".concat(c)).call(o,f),m.style.height=jR(a="".concat(d)).call(a,f),m.style.backgroundSize=jR(s=jR(l=jR(u="".concat(c)).call(u,f," ")).call(l,d)).call(s,f),m.style.margin="start"===e?jR(p=jR(h=jR(v="-".concat(d/2)).call(v,f," auto auto -")).call(h,c/2)).call(p,f):"auto 5px auto 5px");return m},zE.Hex2RGBA=function(e,t){var r,n=[];if(/^\#[0-9A-F]{3}$/i.test(e)){var i="#";e.replace(/[0-9A-F]/gi,(function(e){i+=e+e})),e=i}return/^#[0-9A-F]{6}$/i.test(e)?(e.replace(/[0-9A-F]{2}/gi,(function(e){n.push(Pk(e,16))})),jR(r="rgba(".concat(n.join(","),", ")).call(r,t,")")):"rgba(255, 255, 255, 0.1)"},zE.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},zE.checkIsFunction=function(e){return e&&"function"==typeof e},zE.checkIsObject=function(e){return null!==e&&"object"===qk(e)},zE.hide=function(e){e.style.display="none"},zE.show=function(e,t){e.style.display=t||"block"},zE.isUndefined=function(e){if(null==e)return!0},zE.isNotNull=function(e){return!(null==e)},zE.setStyleFromCsstext=function(e,t){if(t)if("String"===zE.typeOf(t)){var r=t.replace(/\s+/g,"").split(";");Vk(r).call(r,(function(t){if(t){var r=t.split(":");r.length>1&&(e.style[r[0]]=r[1])}}))}else{var n;Vk(n=Dc(t)).call(n,(function(r){e.style[r]=t[r]}))}},zE.filterStyleFromText=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["width","height","top","left","bottom","right","position","z-index","padding","margin","transform"],n=e.style.cssText;if(!n)return{};var i=n.replace(/\s+/g,"").split(";"),o={},a={};return Vk(i).call(i,(function(e){if(e){var t=e.split(":");t.length>1&&(!function(e,t){for(var r=0,n=t.length;r<n;r++)if(rg(e).call(e,t[r])>-1)return!0;return!1}(t[0],r)?a[t[0]]=t[1]:o[t[0]]=t[1])}})),e.setAttribute("style",""),Vk(t=Dc(a)).call(t,(function(t){e.style[t]=a[t]})),o},zE.getStyleFromCsstext=function(e){var t=e.style.cssText;if(!t)return{};var r=t.replace(/\s+/g,"").split(";"),n={};return Vk(r).call(r,(function(e){if(e){var t=e.split(":");t.length>1&&(n[t[0]]=t[1])}})),n},zE.preloadImg=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(e){var n=new window.Image;n.onload=function(e){n=null,t&&t(e)},n.onerror=function(e){n=null,r&&r(e)},n.src=e}},zE.stopPropagation=function(e){e&&e.stopPropagation()},zE.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},zE.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},zE.checkTouchSupport=function(){return"ontouchstart"in window},zE.getBuffered2=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,r=[],n=0;n<e.length;n++)r.push({start:e.start(n)<.5?0:e.start(n),end:e.end(n)});jE(r).call(r,(function(e,t){var r=e.start-t.start;return r||t.end-e.end}));var i=[];if(t)for(var o=0;o<r.length;o++){var a=i.length;if(a){var s=i[a-1].end;r[o].start-s<t?r[o].end>s&&(i[a-1].end=r[o].end):i.push(r[o])}else i.push(r[o])}else i=r;return new JE(i)},zE.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}},zE.requestAnimationFrame=function(e){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(t)return t(e)},zE.getHostFromUrl=function(e){if("String"!==zE.typeOf(e))return"";var t=e.split("/"),r="";return t.length>3&&t[2]&&(r=t[2]),r},zE.cancelAnimationFrame=function(e){var t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;t&&t(e)},zE.isMSE=function(e){return e.media&&(e=e.media),!!(e&&e instanceof HTMLMediaElement)&&(/^blob/.test(e.currentSrc)||/^blob/.test(e.src))},zE.isBlob=function(e){return"string"==typeof e&&/^blob/.test(e)},zE.generateSessionId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(new Date).getTime();try{e=Pk(e)}catch(r){e=0}return t+=e,window.performance&&"function"==typeof window.performance.now&&(t+=Pk(window.performance.now())),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:3&r|8).toString(16)}))},zE.createEvent=function(e){var t;return"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},zE.adjustTimeByDuration=function(e,t,r){return t&&e&&(e>t||r&&e<t)?t:e},zE.createPositionBar=function(e,t){var r=zE.createDom("xg-bar","",{"data-index":-1},e);return t.appendChild(r),r},zE.getTransformStyle=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0,scale:1,rotate:0},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n={scale:"".concat(t.scale||1),translate:jR(e="".concat(t.x||0,"%, ")).call(e,t.y||0,"%"),rotate:"".concat(t.rotate||0,"deg")},i=Dc(n);return ud(i).call(i,(function(e){var t,i=new RegExp("".concat(e,"\\([^\\(]+\\)"),"g"),o=jR(t="".concat(e,"(")).call(t,n[e],")");i.test(r)?(i.lastIndex=-1,r=r.replace(i,o)):r+="".concat(o," ")})),r},zE.convertDeg=function(e){return Math.abs(e)<=1?360*e:e%360},zE.getIndexByTime=function(e,t){var r=t.length,n=-1;if(r<1)return n;if(e<=t[0].end||r<2)n=0;else if(e>t[r-1].end)n=r-1;else for(var i=1;i<r;i++)if(e>t[i-1].end&&e<=t[i].end){n=i;break}return n},zE.getOffsetCurrentTime=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,n=-1;if((n=r>=0&&r<t.length?r:zE.getIndexByTime(e,t))<0)return-1;var i=t.length,o=t[n],a=o.start,s=o.end,l=o.cTime,u=o.offset;return e<a?l:e>=a&&e<=s?e-u:e>s&&n>=i-1?s:-1},zE.getCurrentTimeByOffset=function(e,t){var r=-1;if(!t||t.length<0)return e;for(var n=0;n<t.length;n++)if(e<=t[n].duration){r=n;break}if(-1!==r){var i=t[r].start;return r-1<0?i+e:i+(e-t[r-1].duration)}return e};var QE="3.0.21-rc.21",qE={1:5101,2:5102,3:5103,4:5104,5:5105,6:5106},$E=tT((function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{errorType:"",errorCode:0,errorMessage:"",originError:"",ext:{},mediaError:null};$k(this,e);var n=t&&t.i18n?t.i18n.ERROR_TYPES:null;if(t.media){var i,o=r.mediaError?r.mediaError:t.media.error||{},a=t.duration,s=t.currentTime,l=t.ended,u=t.src,c=t.currentSrc,d=t.media,f=d.readyState,p=d.networkState,h=r.errorCode||o.code;qE[h]&&(h=qE[h]);var v={playerVersion:QE,currentTime:s,duration:a,ended:l,readyState:f,networkState:p,src:u||c,errorType:r.errorType,errorCode:h,message:r.errorMessage||o.message,mediaError:o,originError:r.originError?r.originError.stack:"",host:zE.getHostFromUrl(u||c)};return r.ext&&Vk(i=Dc(r.ext)).call(i,(function(e){v[e]=r.ext[e]})),v}if(arguments.length>1){for(var m={playerVersion:QE,domain:document.domain},y=["errorType","currentTime","duration","networkState","readyState","src","currentSrc","ended","errd","errorCode","mediaError"],g=0;g<arguments.length;g++)m[y[g]]=arguments[g];return m.ex=n?(n[arguments[0]]||{}).msg:"",m}}));function ex(e,t,r){for(var n,i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];var s,l=t.call.apply(t,jR(n=[e]).call(n,o));r&&"function"==typeof r&&(l&&l.then?l.then((function(){for(var t,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];r.call.apply(r,jR(t=[e]).call(t,i))})):r.call.apply(r,jR(s=[e]).call(s,o)))}function tx(e,t){var r,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),Iy(r=function(){var r,i=arguments,o=this;if(n.pre)try{var a,s;(s=n.pre).call.apply(s,jR(a=[this]).call(a,hy(Array.prototype).call(arguments)))}catch(v){var l,u;throw v.message=jR(l=jR(u="[pluginName: ".concat(this.pluginName,":")).call(u,e,":pre error] >> ")).call(l,v.message),v}if(this.__hooks&&this.__hooks[e])try{var c,d=ox(this,e,t);if(d)if(d.then)d.then((function(e){var r;!1!==e&&ex.apply(void 0,jR(r=[o,t,n.next]).call(r,nT(i)))})).catch((function(e){throw e}));else ex.apply(void 0,jR(c=[this,t,n.next]).call(c,hy(Array.prototype).call(arguments)));else if(void 0===d){var f;ex.apply(void 0,jR(f=[this,t,n.next]).call(f,hy(Array.prototype).call(arguments)))}}catch(v){var p,h;throw v.message=jR(p=jR(h="[pluginName: ".concat(this.pluginName,":")).call(h,e,"] >> ")).call(p,v.message),v}else ex.apply(void 0,jR(r=[this,t,n.next]).call(r,hy(Array.prototype).call(arguments)))}).call(r,this)}function rx(e,t){var r=this.__hooks;if(!r||!ng(r[e]))return-1;for(var n=r[e],i=0;i<n.length;i++)if(n[i]===t)return i;return-1}function nx(e,t){var r=this.__hooks;if(r)return r.hasOwnProperty(e)?(ng(r[e])||(r[e]=[]),-1===rx.call(this,e,t)&&r[e].push(t),!0):(console.warn("has no supported hook which name [".concat(e,"]")),!1)}function ix(e,t){var r=this.__hooks;if(r)if(ng(r[e])){var n=r[e],i=rx.call(this,e,t);-1!==i&&uk(n).call(n,i,1)}else r[e]&&(r[e]=null)}function ox(e,t,r){for(var n=arguments.length,i=new Array(n>3?n-3:0),o=3;o<n;o++)i[o-3]=arguments[o];if(e.__hooks&&ng(e.__hooks[t])){var a,s=e.__hooks[t],l=-1;return function e(t,r,n){for(var i,o,a=arguments.length,u=new Array(a>3?a-3:0),c=3;c<a;c++)u[c-3]=arguments[c];if(l++,0===s.length||l===s.length)return n.call.apply(n,jR(o=[t,t]).call(o,u));var d,f=s[l],p=f.call.apply(f,jR(i=[t,t]).call(i,u));return p&&p.then?p.then((function(i){var o;return!1===i?null:e.apply(void 0,jR(o=[t,r,n]).call(o,u))})).catch((function(e){console.warn("[runHooks]".concat(r," reject"),e.message)})):!1!==p?e.apply(void 0,jR(d=[t,r,n]).call(d,u)):void 0}.apply(void 0,jR(a=[e,t,r]).call(a,i))}var u;return r.call.apply(r,jR(u=[e,e]).call(u,i))}function ax(e,t){var r;YE.logError(jR(r="[".concat(e,"] event or callback cant be undefined or null when call ")).call(r,t))}var sx=function(){function e(t){$k(this,e),zE.checkIsFunction(this.beforeCreate)&&this.beforeCreate(t),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.__hooks={},t&&Vk(t).call(t,(function(t){e.__hooks[t]=null})),Ad(e,"hooks",{get:function(){var t;return e.__hooks&&Vk(t=Dc(e.__hooks)).call(t,(function(t){if(e.__hooks[t])return t}))}})}(this),this.__args=t,this.__events={},this.__onceEvents={},this.config=t.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(t)}return tT(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=zE.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 r=this;e&&t&&this.player?"string"==typeof e?(this.__events[e]=t,this.player.on(e,t)):ng(e)&&ud(e).call(e,(function(e){r.__events[e]=t,r.player.on(e,t)})):ax(this.pluginName,"plugin.on(event, callback)")}},{key:"once",value:function(e,t){var r=this;e&&t&&this.player?"string"==typeof e?(this.__onceEvents[e]=t,this.player.once(e,t)):ng(e)&&ud(e).call(e,(function(n){r.__onceEvents[n]=t,r.player.once(e,t)})):ax(this.pluginName,"plugin.once(event, callback)")}},{key:"off",value:function(e,t){var r=this;e&&t&&this.player?"string"==typeof e?(delete this.__events[e],this.player.off(e,t)):ng(e)&&ud(e).call(e,(function(n){delete r.__events[e],r.player.off(n,t)})):ax(this.pluginName,"plugin.off(event, callback)")}},{key:"offAll",value:function(){var e,t=this;ud(e=["__events","__onceEvents"]).call(e,(function(e){var r;ud(r=Dc(t[e])).call(r,(function(r){t[e][r]&&t.off(r,t[e][r]),r&&delete t[e][r]}))})),this.__events={},this.__onceEvents={}}},{key:"emit",value:function(e){var t,r;if(this.player){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];(r=this.player).emit.apply(r,jR(t=[e]).call(t,i))}}},{key:"emitUserAction",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.player){var n=Qk(Qk({},r),{},{pluginName:this.pluginName});this.player.emitUserAction(e,t,n)}}},{key:"hook",value:function(e,t){var r;return tx.call.apply(tx,jR(r=[this]).call(r,hy(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){for(var r,n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return nx.call.apply(nx,jR(r=[this]).call(r,hy(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){for(var r,n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return ix.call.apply(ix,jR(r=[this]).call(r,hy(Array.prototype).call(arguments)))}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(this.player)return r&&(t.pluginName=r),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,r=this.player,n=this.pluginName;this.offAll(),zE.clearAllTimers(this),zE.checkIsFunction(this.destroy)&&this.destroy(),Vk(e=["player","playerConfig","pluginName","logger","__args","__hooks"]).call(e,(function(e){t[e]=null})),r.unRegisterPlugin(n),this.__hooks=null}}],[{key:"defineGetterOrSetter",value:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&Ad(e,r,t[r])}},{key:"defineMethod",value:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&"function"==typeof t[r]&&Ad(e,r,{configurable:!0,value:t[r]})}},{key:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),e}(),lx="xgplayer-isloading",ux="xgplayer-is-error",cx=te,dx=d;cx.JSON||(cx.JSON={stringify:JSON.stringify});var fx=function(e,t,r){return dx(cx.JSON.stringify,null,arguments)},px=r(fx),hx=ni.includes;Lr({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(e){return hx(this,e,arguments.length>1?arguments[1]:void 0)}});var vx=jc("Array").includes,mx=Lr,yx=d_,gx=Y,_x=Kn,bx=p_,wx=m("".indexOf);mx({target:"String",proto:!0,forced:!bx("includes")},{includes:function(e){return!!~wx(_x(gx(this)),_x(yx(e)),arguments.length>1?arguments[1]:void 0)}});var Sx=jc("String").includes,Rx=se,kx=vx,Tx=Sx,Ex=Array.prototype,xx=String.prototype,Lx=r((function(e){var t=e.includes;return e===Ex||Rx(Ex,e)&&t===Ex.includes?kx:"string"==typeof e||e===xx||Rx(xx,e)&&t===xx.includes?Tx:t})),Cx={exports:{}},Ox=o((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),Ix=o,Px=ee,Dx=b,Ax=Ox,Fx=Object.isExtensible,Zx=Ix((function(){Fx(1)}))||Ax?function(e){return!!Px(e)&&((!Ax||"ArrayBuffer"!=Dx(e))&&(!Fx||Fx(e)))}:Fx,jx=!o((function(){return Object.isExtensible(Object.preventExtensions({}))})),Vx=Lr,Wx=m,Mx=ii,Nx=ee,Gx=qe,Hx=Qt.f,Ux=Mi,Xx=Hi,Bx=Zx,Kx=jx,Yx=!1,Jx=nt("meta"),zx=0,Qx=function(e){Hx(e,Jx,{value:{objectID:"O"+zx++,weakData:{}}})},qx=Cx.exports={enable:function(){qx.enable=function(){},Yx=!0;var e=Ux.f,t=Wx([].splice),r={};r[Jx]=1,e(r).length&&(Ux.f=function(r){for(var n=e(r),i=0,o=n.length;i<o;i++)if(n[i]===Jx){t(n,i,1);break}return n},Vx({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Xx.f}))},fastKey:function(e,t){if(!Nx(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!Gx(e,Jx)){if(!Bx(e))return"F";if(!t)return"E";Qx(e)}return e[Jx].objectID},getWeakData:function(e,t){if(!Gx(e,Jx)){if(!Bx(e))return!0;if(!t)return!1;Qx(e)}return e[Jx].weakData},onFreeze:function(e){return Kx&&Yx&&Bx(e)&&!Gx(e,Jx)&&Qx(e),e}};Mx[Jx]=!0;var $x=Cx.exports,eL=Lr,tL=i,rL=$x,nL=o,iL=mr,oL=Af,aL=dp,sL=x,lL=ee,uL=Oo,cL=Qt.f,dL=ea.forEach,fL=C,pL=Bo.set,hL=Bo.getterFor,vL=Wi,mL=oo,yL=cb,gL=zt,_L=dp,bL=X,wL=Af,SL=hu,RL=vu,kL=lp,TL=C,EL=$x.fastKey,xL=Bo.set,LL=Bo.getterFor,CL={getConstructor:function(e,t,r,n){var i=e((function(e,i){_L(e,o),xL(e,{type:t,index:vL(null),first:void 0,last:void 0,size:0}),TL||(e.size=0),bL(i)||wL(i,e[n],{that:e,AS_ENTRIES:r})})),o=i.prototype,a=LL(t),s=function(e,t,r){var n,i,o=a(e),s=l(e,t);return s?s.value=r:(o.last=s={index:i=EL(t,!0),key:t,value:r,previous:n=o.last,next:void 0,removed:!1},o.first||(o.first=s),n&&(n.next=s),TL?o.size++:e.size++,"F"!==i&&(o.index[i]=s)),e},l=function(e,t){var r,n=a(e),i=EL(t);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key==t)return r};return yL(o,{clear:function(){for(var e=a(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,TL?e.size=0:this.size=0},delete:function(e){var t=this,r=a(t),n=l(t,e);if(n){var i=n.next,o=n.previous;delete r.index[n.index],n.removed=!0,o&&(o.next=i),i&&(i.previous=o),r.first==n&&(r.first=i),r.last==n&&(r.last=o),TL?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=a(this),n=gL(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!l(this,e)}}),yL(o,r?{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)}}),TL&&mL(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(e,t,r){var n=t+" Iterator",i=LL(t),o=LL(n);SL(e,t,(function(e,t){xL(this,{type:n,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?RL("keys"==t?r.key:"values"==t?r.value:[r.key,r.value],!1):(e.target=void 0,RL(void 0,!0))}),r?"entries":"values",!r,!0),kL(t)}};(function(e,t,r){var n,i=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),a=i?"set":"add",s=tL[e],l=s&&s.prototype,u={};if(fL&&sL(s)&&(o||l.forEach&&!nL((function(){(new s).entries().next()})))){var c=(n=t((function(t,r){pL(aL(t,c),{type:e,collection:new s}),null!=r&&oL(r,t[a],{that:t,AS_ENTRIES:i})}))).prototype,d=hL(e);dL(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in l)||o&&"clear"==e||iL(c,e,(function(r,n){var i=d(this).collection;if(!t&&o&&!lL(r))return"get"==e&&void 0;var a=i[e](0===r?0:r,n);return t?this:a}))})),o||cL(c,"size",{configurable:!0,get:function(){return d(this).collection.size}})}else n=r.getConstructor(t,e,i,a),rL.enable();uL(n,e,!1,!0),u[e]=n,eL({global:!0,forced:!0},u),o||r.setStrong(n,e,i)})("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),CL);var OL=te.Map,IL=zt,PL=P,DL=Ie,AL=vp,FL=X,ZL=Af,jL=[].push,VL=function(e){var t,r,n,i,o=arguments.length,a=o>1?arguments[1]:void 0;return AL(this),(t=void 0!==a)&&DL(a),FL(e)?new this:(r=[],t?(n=0,i=IL(a,o>2?arguments[2]:void 0),ZL(e,(function(e){PL(jL,r,i(e,n++))}))):ZL(e,jL,{that:r}),new this(r))};Lr({target:"Map",stat:!0,forced:!0},{from:VL});var WL=ks,ML=function(){return new this(WL(arguments))};Lr({target:"Map",stat:!0,forced:!0},{of:ML});var NL=xe,GL=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(NL(e)+" is not a map")},HL=function(e,t){return 1==t?function(t,r){return t[e](r)}:function(t,r,n){return t[e](r,n)}},UL=ae("Map"),XL={Map:UL,set:HL("set",2),get:HL("get",1),has:HL("has",1),remove:HL("delete",1),proto:UL.prototype},BL=GL,KL=XL.remove;Lr({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=BL(this),r=!0,n=0,i=arguments.length;n<i;n++)e=KL(t,arguments[n]),r=r&&e;return!!r}});var YL=GL,JL=XL.get,zL=XL.has,QL=XL.set;Lr({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var r,n,i=YL(this);return zL(i,e)?(r=JL(i,e),"update"in t&&(r=t.update(r,e,i),QL(i,e,r)),r):(n=t.insert(e,i),QL(i,e,n),n)}});var qL=P,$L=function(e,t,r){for(var n,i,o=r||e.next;!(n=qL(o,e)).done;)if(void 0!==(i=t(n.value)))return i},eC=function(e,t,r){return r?$L(e.entries(),(function(e){return t(e[1],e[0])})):e.forEach(t)},tC=zt,rC=GL,nC=eC;Lr({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=rC(this),r=tC(e,arguments.length>1?arguments[1]:void 0);return!1!==nC(t,(function(e,n){if(!r(e,n,t))return!1}),!0)}});var iC=zt,oC=GL,aC=eC,sC=XL.Map,lC=XL.set;Lr({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=oC(this),r=iC(e,arguments.length>1?arguments[1]:void 0),n=new sC;return aC(t,(function(e,i){r(e,i,t)&&lC(n,i,e)})),n}});var uC=zt,cC=GL,dC=eC;Lr({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=cC(this),r=uC(e,arguments.length>1?arguments[1]:void 0),n=dC(t,(function(e,n){if(r(e,n,t))return{value:e}}),!0);return n&&n.value}});var fC=zt,pC=GL,hC=eC;Lr({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=pC(this),r=fC(e,arguments.length>1?arguments[1]:void 0),n=hC(t,(function(e,n){if(r(e,n,t))return{key:n}}),!0);return n&&n.key}});var vC=Lr,mC=P,yC=x,gC=Ie,_C=Af,bC=XL.Map,wC=m([].push);vC({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){var r=new(yC(this)?this:bC);gC(t);var n=gC(r.has),i=gC(r.get),o=gC(r.set);return _C(e,(function(e){var a=t(e);mC(n,r,a)?wC(mC(i,r,a),e):mC(o,r,a,[e])})),r}});var SC=function(e,t){return e===t||e!=e&&t!=t},RC=GL,kC=eC;Lr({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===kC(RC(this),(function(t){if(SC(t,e))return!0}),!0)}});var TC=P,EC=Af,xC=x,LC=Ie,CC=XL.Map;Lr({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var r=new(xC(this)?this:CC);LC(t);var n=LC(r.set);return EC(e,(function(e){TC(n,r,t(e),e)})),r}});var OC=GL,IC=eC;Lr({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=IC(OC(this),(function(t,r){if(t===e)return{key:r}}),!0);return t&&t.key}});var PC=zt,DC=GL,AC=eC,FC=XL.Map,ZC=XL.set;Lr({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=DC(this),r=PC(e,arguments.length>1?arguments[1]:void 0),n=new FC;return AC(t,(function(e,i){ZC(n,r(e,i,t),e)})),n}});var jC=zt,VC=GL,WC=eC,MC=XL.Map,NC=XL.set;Lr({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=VC(this),r=jC(e,arguments.length>1?arguments[1]:void 0),n=new MC;return WC(t,(function(e,i){NC(n,i,r(e,i,t))})),n}});var GC=GL,HC=Af,UC=XL.set;Lr({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=GC(this),r=arguments.length,n=0;n<r;)HC(arguments[n++],(function(e,r){UC(t,e,r)}),{AS_ENTRIES:!0});return t}});var XC=Ie,BC=GL,KC=eC,YC=TypeError;Lr({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=BC(this),r=arguments.length<2,n=r?void 0:arguments[1];if(XC(e),KC(t,(function(i,o){r?(r=!1,n=i):n=e(n,i,o,t)})),r)throw YC("Reduce of empty map with no initial value");return n}});var JC=zt,zC=GL,QC=eC;Lr({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=zC(this),r=JC(e,arguments.length>1?arguments[1]:void 0);return!0===QC(t,(function(e,n){if(r(e,n,t))return!0}),!0)}});var qC=Ie,$C=GL,eO=TypeError,tO=XL.get,rO=XL.has,nO=XL.set;Lr({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var r=$C(this),n=arguments.length;qC(t);var i=rO(r,e);if(!i&&n<3)throw eO("Updating absent value");var o=i?tO(r,e):qC(n>2?arguments[2]:void 0)(e,r);return nO(r,e,t(o,e,r)),r}});var iO=P,oO=Ie,aO=x,sO=rr,lO=TypeError,uO=function(e,t){var r,n=sO(this),i=oO(n.get),o=oO(n.has),a=oO(n.set),s=arguments.length>2?arguments[2]:void 0;if(!aO(t)&&!aO(s))throw lO("At least one callback required");return iO(o,n,e)?(r=iO(i,n,e),aO(t)&&(r=t(r),iO(a,n,e,r))):aO(s)&&(r=s(),iO(a,n,e,r)),r};Lr({target:"Map",proto:!0,real:!0,forced:!0},{upsert:uO}),Lr({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:uO});var cO=r(OL);function dO(e,t){var r=Dc(e);if(Ac){var n=Ac(e);t&&(n=Gc(n).call(n,(function(t){return Qc(e,t).enumerable}))),r.push.apply(r,n)}return r}function fO(e){for(var t=1;t<arguments.length;t++){var r,n,i=null!=arguments[t]?arguments[t]:{};t%2?ud(r=dO(Object(i),!0)).call(r,(function(t){bO(e,t,i[t])})):bd?xd(e,bd(i)):ud(n=dO(Object(i))).call(n,(function(t){Ad(e,t,Qc(i,t))}))}return e}function pO(){pO=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Ad||function(e,t,r){e[t]=r.value},i="function"==typeof Rc?Rc:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,r){return Ad(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(x){l=function(e,t,r){return e[t]=r}}function u(e,t,r,i){var o=t&&t.prototype instanceof f?t:f,a=Zd(o.prototype),s=new k(i||[]);return n(a,"_invoke",{value:b(e,r,s)}),a}function c(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(x){return{type:"throw",arg:x}}}e.wrap=u;var d={};function f(){}function p(){}function h(){}var v={};l(v,o,(function(){return this}));var m=Md&&Md(Md(T([])));m&&m!==t&&r.call(m,o)&&(v=m);var y=h.prototype=f.prototype=Zd(v);function g(e){var t;ud(t=["next","throw","return"]).call(t,(function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(n,o,a,s){var l=c(e[n],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==Sc(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(d).then((function(e){u.value=e,a(u)}),(function(e){return i("throw",e,a,s)}))}s(l.arg)}var o;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return o=o?o.then(n,n):n()}})}function b(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=w(a,r);if(s){if(s===d)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=c(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=c(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,d;var o=i.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,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],ud(e).call(e,S,this),this.reset(!0)}function T(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 n=-1,i=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:E}}function E(){return{value:void 0,done:!0}}return p.prototype=h,n(y,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:p,configurable:!0}),p.displayName=l(h,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Nd?Nd(e,h):(e.__proto__=h,l(e,s,"GeneratorFunction")),e.prototype=Zd(y),e},e.awrap=function(e){return{__await:e}},g(_.prototype),l(_.prototype,a,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,i,o){void 0===o&&(o=Mm);var a=new _(u(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(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),r=[];for(var n in t)r.push(n);return Jm(r).call(r),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=T,k.prototype={constructor:k,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,ud(t=this.tryEntries).call(t,R),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+hy(n).call(n,1))&&(this[n]=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 n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;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,d):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),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),R(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;R(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:T(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function hO(e){return(hO="function"==typeof Rc&&"symbol"==typeof Nk?function(e){return typeof e}:function(e){return e&&"function"==typeof Rc&&e.constructor===Rc&&e!==Rc.prototype?"symbol":typeof e})(e)}function vO(e,t,r,n,i,o,a){try{var s=e[o](a),l=s.value}catch(aD){return void r(aD)}s.done?t(l):Mm.resolve(l).then(n,i)}function mO(e){return function(){var t=this,r=arguments;return new Mm((function(n,i){var o=e.apply(t,r);function a(e){vO(o,n,i,a,s,"next",e)}function s(e){vO(o,n,i,a,s,"throw",e)}a(void 0)}))}}function yO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gO(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Ad(e,DO(n.key),n)}}function _O(e,t,r){return t&&gO(e.prototype,t),r&&gO(e,r),Ad(e,"prototype",{writable:!1}),e}function bO(e,t,r){return(t=DO(t))in e?Ad(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wO(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Zd(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Ad(e,"prototype",{writable:!1}),t&&RO(e,t)}function SO(e){var t;return(SO=Nd?Iy(t=Md).call(t):function(e){return e.__proto__||Md(e)})(e)}function RO(e,t){var r;return(RO=Nd?Iy(r=Nd).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function kO(){if("undefined"==typeof Reflect||!By)return!1;if(By.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(By(Boolean,[],(function(){}))),!0}catch(e){return!1}}function TO(e,t,r){var n;kO()?TO=Iy(n=By).call(n):TO=function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Iy(Function).apply(e,n));return r&&RO(i,r.prototype),i};return TO.apply(null,arguments)}function EO(e){var t="function"==typeof cO?new cO:void 0;return EO=function(e){if(null===e||(r=e,-1===rg(n=Function.toString.call(r)).call(n,"[native code]")))return e;var r,n;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,i)}function i(){return TO(e,arguments,SO(this).constructor)}return i.prototype=Zd(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),RO(i,e)},EO(e)}function xO(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Dc(e);for(n=0;n<o.length;n++)r=o[n],rg(t).call(t,r)>=0||(i[r]=e[r]);return i}(e,t);if(Ac){var o=Ac(e);for(n=0;n<o.length;n++)r=o[n],rg(t).call(t,r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function LO(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CO(e){var t=kO();return function(){var r,n=SO(e);if(t){var i=SO(this).constructor;r=By(n,arguments,i)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===Sc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return LO(e)}(this,r)}}function OO(){var e;"undefined"!=typeof Reflect&&Jk?OO=Iy(e=Jk).call(e):OO=function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=SO(e)););return e}(e,t);if(n){var i=Qc(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}};return OO.apply(this,arguments)}function IO(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function PO(e,t){var r=void 0!==Rc&&Oc(e)||e["@@iterator"];if(!r){if(ng(e)||(r=function(e,t){var r;if(e){if("string"==typeof e)return IO(e,t);var n=hy(r=Object.prototype.toString.call(e)).call(r,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?_g(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?IO(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function DO(e){var t=function(e,t){if("object"!==Sc(e)||null===e)return e;var r=e[bg];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Sc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Sc(t)?t:String(t)}var AO=Ie,FO=Je,ZO=U,jO=Wr,VO=TypeError,WO=function(e){return function(t,r,n,i){AO(r);var o=FO(t),a=ZO(o),s=jO(o),l=e?s-1:0,u=e?-1:1;if(n<2)for(;;){if(l in a){i=a[l],l+=u;break}if(l+=u,e?l<0:s<=l)throw VO("Reduce of empty array with no initial value")}for(;e?l>=0:s>l;l+=u)l in a&&(i=r(i,a[l],l,o));return i}},MO={left:WO(!1),right:WO(!0)}.left;Lr({target:"Array",proto:!0,forced:!np&&ve>79&&ve<83||!$c("reduce")},{reduce:function(e){var t=arguments.length;return MO(this,e,t,t>1?arguments[1]:void 0)}});var NO,GO=jc("Array").reduce,HO=se,UO=GO,XO=Array.prototype,BO=r((function(e){var t=e.reduce;return e===XO||HO(XO,e)&&t===XO.reduce?UO:t})),KO="network",YO="network_timeout",JO="network_forbidden",zO="network_notfound",QO="network_range_not_satisfiable",qO="demux",$O="remux",eI="media",tI="drm",rI="other",nI="runtime",iI={FLV:"FLV",HLS:"HLS",MP4:"MP4",FMP4:"FMP4",MSE_ADD_SB:"MSE_ADD_SB",MSE_APPEND_BUFFER:"MSE_APPEND_BUFFER",MSE_OTHER:"MSE_OTHER",MSE_FULL:"MSE_FULL",OPTION:"OPTION",DASH:"DASH",LICENSE:"LICENSE",CUSTOM_LICENSE:"CUSTOM_LICENSE",MSE_HIJACK:"MSE_HIJACK",EME_HIJACK:"EME_HIJACK",SIDX:"SIDX",NO_CANPLAY_ERROR:"NO_CANPLAY_ERROR",BUFFERBREAK_ERROR:"BUFFERBREAK_ERROR",WAITING_TIMEOUT_ERROR:"WAITING_TIMEOUT_ERROR",MEDIA_ERR_ABORTED:"MEDIA_ERR_ABORTED",MEDIA_ERR_NETWORK:"MEDIA_ERR_NETWORK",MEDIA_ERR_DECODE:"MEDIA_ERR_DECODE",MEDIA_ERR_SRC_NOT_SUPPORTED:"MEDIA_ERR_SRC_NOT_SUPPORTED",MEDIA_ERR_CODEC_NOT_SUPPORTED:"MEDIA_ERR_CODEC_NOT_SUPPORTED",MEDIA_ERR_URL_EMPTY:"MEDIA_ERR_URL_EMPTY"},oI=(bO(NO={},"manifest",{HLS:1100,DASH:1200}),bO(NO,KO,2100),bO(NO,YO,2101),bO(NO,JO,2103),bO(NO,zO,2104),bO(NO,QO,2116),bO(NO,qO,{FLV:3100,HLS:3200,MP4:3300,FMP4:3400,SIDX:3410}),bO(NO,$O,{FMP4:4100,MP4:4200}),bO(NO,eI,{MEDIA_ERR_ABORTED:5101,MEDIA_ERR_NETWORK:5102,MEDIA_ERR_DECODE:5103,MEDIA_ERR_SRC_NOT_SUPPORTED:5104,MEDIA_ERR_CODEC_NOT_SUPPORTED:5105,MEDIA_ERR_URL_EMPTY:5106,MSE_ADD_SB:5200,MSE_APPEND_BUFFER:5201,MSE_OTHER:5202,MSE_FULL:5203,MSE_HIJACK:5204,EME_HIJACK:5301}),bO(NO,tI,{LICENSE:7100,CUSTOM_LICENSE:7200}),bO(NO,rI,8e3),bO(NO,nI,{NO_CANPLAY_ERROR:9001,BUFFERBREAK_ERROR:9002,WAITING_TIMEOUT_ERROR:9003}),NO),aI=function(e){wO(r,e);var t=CO(r);function r(e,n,i,o,a){var s;return yO(this,r),(s=t.call(this,a||(null==i?void 0:i.message))).errorType=e===YO?KO:e,s.originError=i,s.ext=o,s.errorCode=oI[e][n]||oI[e],s.errorMessage=s.message,s.errorCode||(s.errorType=rI,s.errorCode=oI[s.errorType]),s}return _O(r,null,[{key:"create",value:function(e,t,n,i,o){return e instanceof r?e:(e instanceof Error&&(n=e,e=""),e||(e=rI),new r(e,t,n,i,o))}},{key:"network",value:function(e){var t;return new r(null!=e&&e.isTimeout?YO:KO,null,e instanceof Error?e:null,{url:null==e?void 0:e.url,response:null==e?void 0:e.response,httpCode:null==e||null===(t=e.response)||void 0===t?void 0:t.status})}}]),r}(EO(Error)),sI=1,lI=2,uI=3,cI=4,dI=["Boolean","Number","String","Undefined","Null","Date","Object"],fI=function(){function e(t,r){yO(this,e),this.name=t||"",this._prefix="[".concat(this.name,"]"),this.logCacheLevel=(null==r?void 0:r.logCacheLevel)||3,this.logMaxSize=(null==r?void 0:r.logMaxSize)||204800,this.logSize=0,this.logTextArray=[]}return _O(e,[{key:"debug",value:function(){for(var t,r,n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,jR(t=[sI]).call(t,o)),e.disabled||(n=console).debug.apply(n,jR(r=[this._prefix,pI()]).call(r,o))}},{key:"log",value:function(){for(var t,r,n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,jR(t=[lI]).call(t,o)),e.disabled||(n=console).log.apply(n,jR(r=[this._prefix,pI()]).call(r,o))}},{key:"warn",value:function(){for(var t,r,n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,jR(t=[uI]).call(t,o)),e.disabled||(n=console).warn.apply(n,jR(r=[this._prefix,pI()]).call(r,o))}},{key:"error",value:function(){for(var t,r,n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,jR(t=[cI]).call(t,o)),e.disabled||(n=console).error.apply(n,jR(r=[this._prefix,pI()]).call(r,o))}},{key:"logCache",value:function(e){if(!(e<this.logCacheLevel)){var t="";try{for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];var o=Vk(n).call(n,(function(e){return vI(e)}));t=this._prefix+pI()+px(o)}catch(s){return}if(e>=this.logCacheLevel&&(this.logSize+=t.length,this.logTextArray.push(t)),this.logSize>this.logMaxSize){var a=this.logTextArray.shift();this.logSize-=a.length}}}},{key:"getLogCache",value:function(){var e=this.logTextArray.join("\n");return this.reset(),e}},{key:"reset",value:function(){this.logTextArray=[],this.logSize=0}},{key:"table",value:function(){var t;e.disabled||(console.group(this._prefix),(t=console).table.apply(t,arguments),console.groupEnd())}},{key:"setLogLevel",value:function(e){this.logCacheLevel=e}}],[{key:"enable",value:function(){e.disabled=!1}},{key:"disable",value:function(){e.disabled=!0}}]),e}();function pI(){return(new Date).toLocaleString()}function hI(e){var t;if("object"!==hO(e))return e;var r=hy(t=Object.prototype.toString.call(e)).call(t,8,-1);switch(r){case"Array":case"Uint8Array":case"ArrayBuffer":return r+"["+e.length+"]";case"Object":return"{}";default:return r}}function vI(e,t,r){var n;r||(r=1),t||(t=2);var i={};if(!e||"object"!==hO(e))return e;var o=hy(n=Object.prototype.toString.call(e)).call(n,8,-1);if(!Lx(dI).call(dI,o))return o;if(!(r>t)){for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r===t?i[a]=hI(e[a]):"object"===hO(e[a])?i[a]=vI(e[a],t,r+1):i[a]=e[a]);return i}}bO(fI,"disabled",!0);var mI="fetch",yI="xhr",gI="arraybuffer",_I="text",bI="json",wI=function(e){wO(r,e);var t=CO(r);function r(e,n,i,o){var a;return yO(this,r),bO(LO(a=t.call(this,o)),"retryCount",0),bO(LO(a),"isTimeout",!1),bO(LO(a),"loaderType",mI),bO(LO(a),"startTime",0),bO(LO(a),"endTime",0),bO(LO(a),"options",{}),a.url=e,a.request=n,a.response=i,a}return _O(r)}(EO(Error)),SI=Object.prototype.toString;function RI(e){if("[object Object]"!==SI.call(e))return!1;var t=Md(e);return null===t||t===Object.prototype}function kI(e){if(e&&null!==e[0]&&void 0!==e[0]&&(0!==e[0]||null!==e[1]&&void 0!==e[1])){var t="bytes="+e[0]+"-";return e[1]&&(t+=e[1]),t}}function TI(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function EI(e,t){var r,n;if(e){if(!t)return e;var i,o=Gc(r=Vk(n=Dc(t)).call(n,(function(e){if(null!=(i=t[e]))return ng(i)?e+="[]":i=[i],Vk(i).call(i,(function(t){var r,n;return n=t,"[object Date]"===SI.call(n)?t=t.toISOString():function(e){return null!==e&&"object"===hO(e)}(t)&&(t=px(t)),jR(r="".concat(TI(e),"=")).call(r,TI(t))})).join("&")}))).call(r,Boolean).join("&");if(o){var a=rg(e).call(e,"#");-1!==a&&(e=hy(e).call(e,0,a)),e+=(-1===rg(e).call(e,"?")?"?":"&")+o}return e}}function xI(e,t,r,n,i,o,a,s,l,u,c){return i=null!=i?QT(i):null,n=Pk(n||"0",10),ck(n)&&(n=0),{data:e,done:t,options:{range:l,vid:u,index:s,contentLength:n,age:i,startTime:o,firstByteTime:a,endTime:GE(),priOptions:c},response:r}}function LI(e,t){return Math.round(8*e*1e3/t/1024)}var CI="error",OI="core.ttfb",II="core.loadstart",PI="core.loadresponseheaders",DI="core.loadcomplete",AI="core.loadretry",FI="core.metadataparsed",ZI="core.sei",jI="real_time_speed",VI=2097152,WI=function(e){wO(n,e);var t,r=CO(n);function n(){var e;return yO(this,n),bO(LO(e=r.call(this)),"_abortController",null),bO(LO(e),"_timeoutTimer",null),bO(LO(e),"_reader",null),bO(LO(e),"_response",null),bO(LO(e),"_aborted",!1),bO(LO(e),"_index",-1),bO(LO(e),"_range",null),bO(LO(e),"_receivedLength",0),bO(LO(e),"_running",!1),bO(LO(e),"_logger",null),bO(LO(e),"_vid",""),bO(LO(e),"_onProcessMinLen",0),bO(LO(e),"_onCancel",null),bO(LO(e),"_priOptions",null),e}return _O(n,[{key:"load",value:function(e){var t,r=this,n=e.url,i=e.vid,o=e.timeout,a=e.responseType,s=e.onProgress,l=e.index,u=e.onTimeout,c=e.onCancel,d=e.range,f=e.transformResponse,p=e.request,h=e.params,v=e.logger,m=e.method,y=e.headers,g=e.body,_=e.mode,b=e.credentials,w=e.cache,S=e.redirect,R=e.referrer,k=e.referrerPolicy,T=e.onProcessMinLen,E=e.priOptions;this._logger=v,this._aborted=!1,this._onProcessMinLen=T,this._onCancel=c,this._abortController="undefined"!=typeof AbortController&&new AbortController,this._running=!0,this._index=l,this._range=d||[0,0],this._vid=i||n,this._priOptions=E||{};var x={method:m,headers:y,body:g,mode:_,credentials:b,cache:w,redirect:S,referrer:R,referrerPolicy:k,signal:null===(t=this._abortController)||void 0===t?void 0:t.signal},L=!1;clearTimeout(this._timeoutTimer),n=EI(n,h);var C=kI(d);C&&(y=p?p.headers:x.headers=x.headers||(Headers?new Headers:{}),Headers&&y instanceof Headers?y.append("Range",C):y.Range=C),o&&(this._timeoutTimer=o_((function(){if(L=!0,r.cancel(),u){var e=new wI(n,x,null,"timeout");e.isTimeout=!0,u(e,{index:r._index,range:r._range,vid:r._vid,priOptions:r._priOptions})}}),o));var O=GE();return this._logger.debug("[fetch load start], index,",l,",range,",d),new Mm((function(e,t){fetch(p||n,p?void 0:x).then(function(){var i=mO(pO().mark((function i(o){var u,c,p,h;return pO().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(clearTimeout(r._timeoutTimer),r._response=o,!r._aborted&&r._running){i.next=4;break}return i.abrupt("return");case 4:if(f&&(o=f(o,n)||o),o.ok){i.next=7;break}throw new wI(n,x,o,"bad network response");case 7:if(u=GE(),a!==_I){i.next=15;break}return i.next=11,o.text();case 11:c=i.sent,r._running=!1,i.next=37;break;case 15:if(a!==bI){i.next=22;break}return i.next=18,o.json();case 18:c=i.sent,r._running=!1,i.next=37;break;case 22:if(!s){i.next=29;break}return r.resolve=e,r.reject=t,r._loadChunk(o,s,O,u),i.abrupt("return");case 29:return i.next=31,o.arrayBuffer();case 31:c=i.sent,c=new Uint8Array(c),r._running=!1,p=GE()-O,h=LI(c.byteLength,p),r.emit(jI,{speed:h,len:c.byteLength,time:p,vid:r._vid,index:r._index,range:r._range,priOptions:r._priOptions});case 37:r._logger.debug("[fetch load end], index,",l,",range,",d),e(xI(c,!0,o,o.headers.get("Content-Length"),o.headers.get("age"),O,u,l,d,r._vid,r._priOptions));case 39:case"end":return i.stop()}}),i)})));return function(e){return i.apply(this,arguments)}}()).catch((function(e){var i;clearTimeout(r._timeoutTimer),r._running=!1,r._aborted&&!L||((e=e instanceof wI?e:new wI(n,x,null,null===(i=e)||void 0===i?void 0:i.message)).startTime=O,e.endTime=GE(),e.isTimeout=L,e.options={index:r._index,range:r._range,vid:r._vid,priOptions:r._priOptions},t(e))}))}))}},{key:"cancel",value:(t=mO(pO().mark((function e(){return pO().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._aborted){e.next=2;break}return e.abrupt("return");case 2:if(this._aborted=!0,this._running=!1,!this._response){e.next=14;break}if(e.prev=5,!this._reader){e.next=9;break}return e.next=9,this._reader.cancel();case 9:e.next=13;break;case 11:e.prev=11,e.t0=e.catch(5);case 13:this._response=this._reader=null;case 14:if(this._abortController){try{this._abortController.abort()}catch(aD){}this._abortController=null}this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions});case 16:case"end":return e.stop()}}),e,this,[[5,11]])}))),function(){return t.apply(this,arguments)})},{key:"_loadChunk",value:function(e,t,r,n){var i=this;if(!e.body||!e.body.getReader){this._running=!1;var o=new wI(e.url,"",e,"onProgress of bad response.body.getReader");return o.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},void this.reject(o)}this._onProcessMinLen>0&&(this._cache=new Uint8Array(VI),this._writeIdx=0);var a,s,l,u=this._reader=e.body.getReader(),c=function(){var o=mO(pO().mark((function o(){var d,f,p,h,v,m,y,g;return pO().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return s=GE(),o.prev=1,o.next=4,u.read();case 4:a=o.sent,l=GE(),o.next=13;break;case 8:return o.prev=8,o.t0=o.catch(1),l=GE(),i._aborted||(i._running=!1,o.t0.options={index:i._index,range:i._range,vid:i._vid,priOptions:i._priOptions},i.reject(o.t0)),o.abrupt("return");case 13:if(f=(null===(d=i._range)||void 0===d?void 0:d.length)>0?i._range[0]:0,p=f+i._receivedLength,!i._aborted){o.next=19;break}return i._running=!1,t(void 0,!1,{range:[p,p],vid:i._vid,index:i._index,startTime:s,endTime:l,st:r,firstByteTime:n,priOptions:i._priOptions},e),o.abrupt("return");case 19:var _;if(h=a.value?a.value.byteLength:0,i._receivedLength+=h,i._logger.debug("【fetchLoader,onProgress call】,task,",i._range,", start,",p,", end,",f+i._receivedLength,", done,",a.done),i._onProcessMinLen>0){if(i._writeIdx+h>=i._onProcessMinLen||a.done)(v=new Uint8Array(i._writeIdx+h)).set(hy(_=i._cache).call(_,0,i._writeIdx),0),h>0&&v.set(a.value,i._writeIdx),i._writeIdx=0,i._logger.debug("【fetchLoader,onProgress enough】,done,",a.done,",len,",v.byteLength,", writeIdx,",i._writeIdx);else if(h>0&&i._writeIdx+h<VI)i._cache.set(a.value,i._writeIdx),i._writeIdx+=h,i._logger.debug("【fetchLoader,onProgress cache】,len,",h,", writeIdx,",i._writeIdx);else if(h>0){var b;m=new Uint8Array(i._writeIdx+h+2048),i._logger.debug("【fetchLoader,onProgress extra start】,size,",i._writeIdx+h+2048,", datalen,",h,", writeIdx,",i._writeIdx),m.set(hy(b=i._cache).call(b,0,i._writeIdx),0),h>0&&m.set(a.value,i._writeIdx),i._writeIdx+=h,delete i._cache,i._cache=m,i._logger.debug("【fetchLoader,onProgress extra end】,len,",h,", writeIdx,",i._writeIdx)}}else v=a.value;(v&&v.byteLength>0||a.done)&&t(v,a.done,{range:[i._range[0]+i._receivedLength-(v?v.byteLength:0),i._range[0]+i._receivedLength],vid:i._vid,index:i._index,startTime:s,endTime:l,st:r,firstByteTime:n,priOptions:i._priOptions},e),a.done?(y=GE()-r,g=LI(i._receivedLength,y),i.emit(jI,{speed:g,len:i._receivedLength,time:y,vid:i._vid,index:i._index,range:i._range,priOptions:i._priOptions}),i._running=!1,i._logger.debug("[fetchLoader onProgress end],task,",i._range,",done,",a.done),i.resolve(xI(a,!0,e,e.headers.get("Content-Length"),e.headers.get("age"),r,n,i._index,i._range,i._vid,i._priOptions))):c();case 25:case"end":return o.stop()}}),o,null,[[1,8]])})));return function(){return o.apply(this,arguments)}}();c()}},{key:"receiveLen",get:function(){return this._receivedLength}},{key:"running",get:function(){return this._running},set:function(e){this._running=e}}],[{key:"isSupported",value:function(){return!("undefined"==typeof fetch)}}]),n}(sT);var MI=function(e){wO(r,e);var t=CO(r);function r(){var e;return yO(this,r),bO(LO(e=t.call(this)),"_xhr",null),bO(LO(e),"_aborted",!1),bO(LO(e),"_timeoutTimer",null),bO(LO(e),"_range",null),bO(LO(e),"_receivedLength",0),bO(LO(e),"_url",null),bO(LO(e),"_onProgress",null),bO(LO(e),"_index",-1),bO(LO(e),"_headers",null),bO(LO(e),"_currentChunkSizeKB",384),bO(LO(e),"_timeout",null),bO(LO(e),"_xhr",null),bO(LO(e),"_withCredentials",null),bO(LO(e),"_startTime",-1),bO(LO(e),"_loadCompleteResolve",null),bO(LO(e),"_loadCompleteReject",null),bO(LO(e),"_runing",!1),bO(LO(e),"_logger",!1),bO(LO(e),"_vid",""),bO(LO(e),"_responseType",void 0),bO(LO(e),"_credentials",void 0),bO(LO(e),"_method",void 0),bO(LO(e),"_transformResponse",void 0),bO(LO(e),"_firstRtt",void 0),bO(LO(e),"_onCancel",null),bO(LO(e),"_priOptions",null),e}return _O(r,[{key:"load",value:function(e){var t=this;clearTimeout(this._timeoutTimer),this._logger=e.logger,this._range=e.range,this._onProgress=e.onProgress,this._index=e.index,this._headers=e.headers,this._withCredentials="include"===e.credentials||"same-origin"===e.credentials,this._body=e.body||null,e.method&&(this._method=e.method),this._timeout=e.timeout||null,this._runing=!0,this._vid=e.vid||e.url,this._responseType=e.responseType,this._firstRtt=-1,this._onTimeout=e.onTimeout,this._onCancel=e.onCancel,this._request=e.request,this._priOptions=e.priOptions||{},this._logger.debug("【xhrLoader task】, range",this._range),this._url=EI(e.url,e.params);var r=GE();return new Mm((function(e,r){t._loadCompleteResolve=e,t._loadCompleteReject=r,t._startLoad()})).catch((function(e){if(clearTimeout(t._timeoutTimer),t._runing=!1,!t._aborted)throw(e=e instanceof wI?e:new wI(t._url,t._request)).startTime=r,e.endTime=GE(),e.options={index:t._index,vid:t._vid,priOptions:t._priOptions},e}))}},{key:"_startLoad",value:function(){var e=null;if(this._responseType===gI&&this._range&&this._range.length>1)if(this._onProgress){this._firstRtt=-1;var t=1024*this._currentChunkSizeKB,r=this._range[0]+this._receivedLength,n=this._range[1];t<this._range[1]-r&&(n=r+t),e=[r,n],this._logger.debug("[xhr_loader->],tast :",this._range,", SubRange, ",e)}else e=this._range,this._logger.debug("[xhr_loader->],tast :",this._range,", allRange, ",e);this._internalOpen(e)}},{key:"_internalOpen",value:function(e){var t=this;try{var r,n;this._startTime=GE();var i=this._xhr=new XMLHttpRequest;i.open(this._method||"GET",this._url,!0),i.responseType=this._responseType,this._timeout&&(i.timeout=this._timeout),i.withCredentials=this._withCredentials,i.onload=Iy(r=this._onLoad).call(r,this),i.onreadystatechange=Iy(n=this._onReadyStatechange).call(n,this),i.onerror=function(e){var r,n,i;t._running=!1;var o=new wI(t._url,t._request,null==e||null===(r=e.currentTarget)||void 0===r?void 0:r.response,"xhr.onerror.status:"+(null==e||null===(n=e.currentTarget)||void 0===n?void 0:n.status)+",statusText,"+(null==e||null===(i=e.currentTarget)||void 0===i?void 0:i.statusText));o.options={index:t._index,range:t._range,vid:t._vid,priOptions:t._priOptions},t._loadCompleteReject(o)},i.ontimeout=function(e){t.cancel();var r=new wI(t._url,t._request,{status:408},"timeout");t._onTimeout&&(r.isTimeout=!0,t._onTimeout(r,{index:t._index,range:t._range,vid:t._vid,priOptions:t._priOptions})),r.options={index:t._index,range:t._range,vid:t._vid,priOptions:t._priOptions},t._loadCompleteReject(r)};var o,a=this._headers||{},s=kI(e);if(s&&(a.Range=s),a)ud(o=Dc(a)).call(o,(function(e){i.setRequestHeader(e,a[e])}));this._logger.debug("[xhr.send->] tast,",this._range,",load sub range, ",e),i.send(this._body)}catch(l){l.options={index:this._index,range:e,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(l)}}},{key:"_onReadyStatechange",value:function(e){2===e.target.readyState&&this._firstRtt<0&&(this._firstRtt=GE())}},{key:"_onLoad",value:function(e){var t,r=e.target.status;if(r<200||r>299){var n=new wI(this._url,null,fO(fO({},e.target.response),{},{status:r}),"bad response,status:"+r);return n.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(n)}var i,o=null,a=!1,s=(null===(t=this._range)||void 0===t?void 0:t.length)>0?this._range[0]:0;if(this._responseType===gI){var l,u=new Uint8Array(e.target.response);if(i=s+this._receivedLength,u&&u.byteLength>0){this._receivedLength+=u.byteLength;var c=GE()-this._startTime,d=LI(this._receivedLength,c);this.emit(jI,{speed:d,len:this._receivedLength,time:c,vid:this._vid,index:this._index,range:[i,s+this._receivedLength],priOptions:this._priOptions})}o=u,a=!((null===(l=this._range)||void 0===l?void 0:l.length)>1&&this._range[1]&&this._receivedLength<this._range[1]-this._range[0]),this._logger.debug("[xhr load done->], tast :",this._range,", start",i,"end ",s+this._receivedLength,",dataLen,",u?u.byteLength:0,",receivedLength",this._receivedLength,",index,",this._index,", done,",a)}else a=!0,o=e.target.response;var f={ok:r>=200&&r<300,status:r,statusText:this._xhr.statusText,url:this._xhr.responseURL,headers:this._getHeaders(this._xhr),body:this._xhr.response};this._transformResponse&&(f=this._transformResponse(f,this._url)||f),this._onProgress&&this._onProgress(o,a,{index:this._index,vid:this._vid,range:[i,s+this._receivedLength],startTime:this._startTime,endTime:GE(),priOptions:this._priOptions},f),a?(this._runing=!1,this._loadCompleteResolve&&this._loadCompleteResolve(xI(this._onProgress?null:o,a,f,f.headers["content-length"],f.headers.age,this._startTime,this._firstRtt,this._index,this._range,this._vid,this._priOptions))):this._startLoad()}},{key:"cancel",value:function(){if(!this._aborted)return this._aborted=!0,this._runing=!1,OO(SO(r.prototype),"removeAllListeners",this).call(this),this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions}),this._xhr?this._xhr.abort():void 0}},{key:"receiveLen",get:function(){return this._receivedLength}},{key:"running",get:function(){return this._running},set:function(e){this._running=e}},{key:"_getHeaders",value:function(e){var t,r,n={},i=PO(aE(t=e.getAllResponseHeaders()).call(t).split("\r\n"));try{for(i.s();!(r=i.n()).done;){var o=r.value.split(": ");n[o[0].toLowerCase()]=hy(o).call(o,1).join(": ")}}catch(a){i.e(a)}finally{i.f()}return n}}],[{key:"isSupported",value:function(){return"undefined"!=typeof XMLHttpRequest}}]),r}(sT),NI=["retry","retryDelay","onRetryError","transformError"],GI=function(){function e(t,r){var n,i,o;yO(this,e),this.promise=((o=new Mm((function(e,t){n=e,i=t}))).used=!1,o.resolve=function(){return o.used=!0,n.apply(void 0,arguments)},o.reject=function(){return o.used=!0,i.apply(void 0,arguments)},o),this.alive=!!r.onProgress,!r.logger&&(r.logger=new fI("Loader")),this._loaderType=t,this._loader=t===mI&&"undefined"!=typeof fetch?new WI:new MI,this._config=r,this._retryCount=0,this._retryTimer=null,this._canceled=!1,this._retryCheckFunc=r.retryCheckFunc,this._logger=r.logger}var t;return _O(e,[{key:"exec",value:function(){var e=this,t=this._config,r=t.retry,n=t.retryDelay,i=t.onRetryError,o=t.transformError,a=xO(t,NI),s=function(){var t=mO(pO().mark((function t(){var l,u,c;return pO().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e._loader.load(a);case 3:l=t.sent,e.promise.resolve(l),t.next=27;break;case 7:if(t.prev=7,t.t0=t.catch(0),e._loader.running=!1,e._logger.debug("[task request catch err]",t.t0),!e._canceled){t.next=13;break}return t.abrupt("return");case 13:if(t.t0.loaderType=e._loaderType,t.t0.retryCount=e._retryCount,u=t.t0,o&&(u=o(u)||u),i&&e._retryCount>0&&i(u,e._retryCount,{index:a.index,vid:a.vid,range:a.range,priOptions:a.priOptions}),e._retryCount++,c=!0,e._retryCheckFunc&&(c=e._retryCheckFunc(t.t0)),!(c&&e._retryCount<=r)){t.next=26;break}return clearTimeout(e._retryTimer),e._logger.debug("[task request setTimeout],retry",e._retryCount,",retry range,",a.range),e._retryTimer=o_(s,n),t.abrupt("return");case 26:e.promise.reject(u);case 27:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}();return s(),this.promise}},{key:"cancel",value:(t=mO(pO().mark((function e(){return pO().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return clearTimeout(this._retryTimer),this._canceled=!0,this._loader.running=!1,e.abrupt("return",this._loader.cancel());case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"running",get:function(){return this._loader&&this._loader.running}},{key:"loader",get:function(){return this._loader}}]),e}();function HI(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Mm((function(t){return o_(t,e)}))}var UI,XI=function(e){wO(n,e);var t,r=CO(n);function n(e){var t;return yO(this,n),bO(LO(t=r.call(this,e)),"type",mI),bO(LO(t),"_queue",[]),bO(LO(t),"_alive",[]),bO(LO(t),"_currentTask",null),bO(LO(t),"_finnalUrl",""),bO(LO(t),"_config",void 0),t._config=function(e){return fO({loaderType:mI,retry:0,retryDelay:0,timeout:0,request:null,onTimeout:void 0,onProgress:void 0,onRetryError:void 0,transformRequest:void 0,transformResponse:void 0,transformError:void 0,responseType:_I,range:void 0,url:"",params:void 0,method:"GET",headers:{},body:void 0,mode:void 0,credentials:void 0,cache:void 0,redirect:void 0,referrer:void 0,referrerPolicy:void 0,integrity:void 0,onProcessMinLen:0},e)}(e),t._config.loaderType!==yI&&WI.isSupported()||(t.type=yI),t.log=e.logger,t}return _O(n,[{key:"isFetch",value:function(){return this.type===mI}},{key:"load",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"!=typeof e&&e?r=e:r.url=e||r.url||this._config.url,(r=Mk({},this._config,r)).params&&(r.params=Mk({},r.params)),r.headers&&RI(r.headers)&&(r.headers=Mk({},r.headers)),r.body&&RI(r.body)&&(r.body=Mk({},r.body)),r.transformRequest&&(r=r.transformRequest(r)||r),r.logger=this.log;var n=new GI(this.type,r);return n.loader.on(jI,(function(e){t.emit(jI,e)})),this._queue.push(n),1!==this._queue.length||this._currentTask&&this._currentTask.running||this._processTask(),n.promise}},{key:"cancel",value:(t=mO(pO().mark((function e(){var t;return pO().wrap((function(e){for(var r,n,i;;)switch(e.prev=e.next){case 0:return t=jR(r=Vk(n=this._queue).call(n,(function(e){return e.cancel()}))).call(r,Vk(i=this._alive).call(i,(function(e){return e.cancel()}))),this._currentTask&&t.push(this._currentTask.cancel()),this._queue=[],this._alive=[],e.next=6,Mm.all(t);case 6:return e.next=8,HI();case 8:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"_processTask",value:function(){var e=this;if(this._currentTask=this._queue.shift(),this._currentTask){this._currentTask.alive&&this._alive.push(this._currentTask);var t=this._currentTask.exec().catch((function(e){}));t&&"function"==typeof t.finally&&t.finally((function(){var t,r,n;null!==(t=e._currentTask)&&void 0!==t&&t.alive&&(null===(r=e._alive)||void 0===r?void 0:r.length)>0&&(e._alive=Gc(n=e._alive).call(n,(function(t){return t&&t!==e._currentTask})));e._processTask()}))}}}],[{key:"isFetchSupport",value:function(){return WI.isSupported()}}]),n}(sT),BI=function(e){return e.RTC_STATE_CHANGE="core.rtcstatechange",e.RTC_NETWORK="core.rtcnetwork",e.RTC_FIRST_FRAME="core.rtcfirstframe",e}(BI||{}),KI=function(e){return e.LOAD_START="start_load",e.OFFER_SDP_READY="offer_sdp_ready",e.ANSWER_SDP_RECV="answer_sdp_recv",e.ANSWER_SDP_READY="answer_sdp_ready",e.ICE_CONNECTED="ice_connected",e.DTLS_CONNECTED="dtls_connected",e.PEER_CONNECTED="peer_connected",e.FIRST_PACKET_RECV="first_packet_recv",e.FIRST_FRAME_RECV="first_frame_recv",e.FIRST_FRAME_DECODED="first_frame_decoded",e.VIDEO_PLAYING="video_playing",e.VIDEO_CANPLAY="video_canplay",e.VIDEO_LOADEDDATA="video_loadeddata",e}(KI||{}),YI={},JI={},zI={exports:{}},QI=zI.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(e){return e.encoding?"rtpmap:%d %s/%s/%s":e.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(e){return null!=e.address?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%s trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(e){return null!=e.subtype?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))?(?: (urn:ietf:params:rtp-hdrext:encrypt))? (\S*)(?: (\S*))?/,names:["value","direction","encrypt-uri","uri","config"],format:function(e){return"extmap:%d"+(e.direction?"/%s":"%v")+(e["encrypt-uri"]?" %s":"%v")+" %s"+(e.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(e){return null!=e.sessionConfig?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"connectionType",reg:/^connection:(new|existing)/,format:"connection:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*(?:\.\d*)*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*(?:\.\d*)*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(e){var t="candidate:%s %d %s %d %s %d typ %s";return t+=null!=e.raddr?" raddr %s rport %d":"%v%v",t+=null!=e.tcptype?" tcptype %s":"%v",null!=e.generation&&(t+=" generation %d"),t+=null!=e["network-id"]?" network-id %d":"%v",t+=null!=e["network-cost"]?" network-cost %d":"%v"}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_-]*)(?::(.*))?/,names:["id","attribute","value"],format:function(e){var t="ssrc:%d";return null!=e.attribute&&(t+=" %s",null!=e.value&&(t+=":%s")),t}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(e){return null!=e.maxMessageSize?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(e){return e.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(e){return"imageattr:%s %s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"),names:["dir1","list1","dir2","list2"],format:function(e){return"simulcast:%s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{name:"sourceFilter",reg:/^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,names:["filterMode","netType","addressTypes","destAddress","srcList"],format:"source-filter: %s %s %s %s %s"},{name:"bundleOnly",reg:/^(bundle-only)/},{name:"label",reg:/^label:(.+)/,format:"label:%s"},{name:"sctpPort",reg:/^sctp-port:(\d+)$/,format:"sctp-port:%s"},{name:"maxMessageSize",reg:/^max-message-size:(\d+)$/,format:"max-message-size:%s"},{push:"tsRefClocks",reg:/^ts-refclk:([^\s=]*)(?:=(\S*))?/,names:["clksrc","clksrcExt"],format:function(e){return"ts-refclk:%s"+(null!=e.clksrcExt?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(e){var t="mediaclk:";return t+=null!=e.id?"id=%s %s":"%v%s",t+=null!=e.mediaClockValue?"=%s":"",t+=null!=e.rateNumerator?" rate=%s":"",t+=null!=e.rateDenominator?"/%s":""}},{name:"keywords",reg:/^keywds:(.+)$/,format:"keywds:%s"},{name:"content",reg:/^content:(.+)/,format:"content:%s"},{name:"bfcpFloorCtrl",reg:/^floorctrl:(c-only|s-only|c-s)/,format:"floorctrl:%s"},{name:"bfcpConfId",reg:/^confid:(\d+)/,format:"confid:%s"},{name:"bfcpUserId",reg:/^userid:(\d+)/,format:"userid:%s"},{name:"bfcpFloorId",reg:/^floorid:(.+) (?:m-stream|mstrm):(.+)/,names:["id","mStream"],format:"floorid:%s mstrm:%s"},{push:"invalid",names:["value"]}]};ud(UI=Dc(QI)).call(UI,(function(e){var t=QI[e];ud(t).call(t,(function(e){e.reg||(e.reg=/(.*)/),e.format||(e.format="%s")}))}));var qI=zI.exports;!function(e,t){var r=function(e){return String(Number(e))===e?Number(e):e},n=function(e,t,n){var i=e.name&&e.names;e.push&&!t[e.push]?t[e.push]=[]:i&&!t[e.name]&&(t[e.name]={});var o=e.push?{}:i?t[e.name]:t;!function(e,t,n,i){if(i&&!n)t[i]=r(e[1]);else for(var o=0;o<n.length;o+=1)null!=e[o+1]&&(t[n[o]]=r(e[o+1]))}(n.match(e.reg),o,e.names,e.name),e.push&&t[e.push].push(o)},i=qI,o=Iy(t=RegExp.prototype.test).call(t,/^([a-z])=(.*)/);e.parse=function(e){var t,r,a={},s=[],l=a;return ud(t=Gc(r=e.split(/(\r\n|\r|\n)/)).call(r,o)).call(t,(function(e){var t=e[0],r=hy(e).call(e,2);"m"===t&&(s.push({rtp:[],fmtp:[]}),l=s[s.length-1]);for(var o=0;o<(i[t]||[]).length;o+=1){var a=i[t][o];if(a.reg.test(r))return n(a,l,r)}})),a.media=s,a};var a=function(e,t){var n=t.split(/=(.+)/,2);return 2===n.length?e[n[0]]=r(n[1]):1===n.length&&t.length>1&&(e[n[0]]=void 0),e};e.parseParams=function(e){var t;return BO(t=e.split(/;\s?/)).call(t,a,{})},e.parseFmtpConfig=e.parseParams,e.parsePayloads=function(e){var t;return Vk(t=e.toString().split(" ")).call(t,Number)},e.parseRemoteCandidates=function(e){for(var t,n=[],i=Vk(t=e.split(" ")).call(t,r),o=0;o<i.length;o+=3)n.push({component:i[o],ip:i[o+1],port:i[o+2]});return n},e.parseImageAttributes=function(e){var t;return Vk(t=e.split(" ")).call(t,(function(e){var t;return BO(t=e.substring(1,e.length-1).split(",")).call(t,a,{})}))},e.parseSimulcastStreamList=function(e){var t;return Vk(t=e.split(";")).call(t,(function(e){var t;return Vk(t=e.split(",")).call(t,(function(e){var t,n=!1;return"~"!==e[0]?t=r(e):(t=r(e.substring(1,e.length)),n=!0),{scid:t,paused:n}}))}))}}(JI);var $I=qI,eP=/%[sdv%]/g,tP=function(e){var t=1,r=arguments,n=r.length;return e.replace(eP,(function(e){if(t>=n)return e;var i=r[t];switch(t+=1,e){case"%%":return"%";case"%s":return String(i);case"%d":return Number(i);case"%v":return""}}))},rP=function(e,t,r){var n=[e+"="+(t.format instanceof Function?t.format(t.push?r:r[t.name]):t.format)];if(t.names)for(var i=0;i<t.names.length;i+=1){var o=t.names[i];t.name?n.push(r[t.name][o]):n.push(r[t.names[i]])}else n.push(r[t.name]);return tP.apply(null,n)},nP=["v","o","s","i","u","e","p","c","b","t","r","z","a"],iP=["i","c","b","a"],oP=JI,aP=function(e,t){var r,n;t=t||{},null==e.version&&(e.version=0),null==e.name&&(e.name=" "),ud(r=e.media).call(r,(function(e){null==e.payloads&&(e.payloads="")}));var i=t.outerOrder||nP,o=t.innerOrder||iP,a=[];return ud(i).call(i,(function(t){var r;ud(r=$I[t]).call(r,(function(r){if(r.name in e&&null!=e[r.name])a.push(rP(t,r,e));else if(r.push in e&&null!=e[r.push]){var n;ud(n=e[r.push]).call(n,(function(e){a.push(rP(t,r,e))}))}}))})),ud(n=e.media).call(n,(function(e){a.push(rP("m",$I.m[0],e)),ud(o).call(o,(function(t){var r;ud(r=$I[t]).call(r,(function(r){if(r.name in e&&null!=e[r.name])a.push(rP(t,r,e));else if(r.push in e&&null!=e[r.push]){var n;ud(n=e[r.push]).call(n,(function(e){a.push(rP(t,r,e))}))}}))}))})),a.join("\r\n")+"\r\n"};YI.write=aP,YI.parse=oP.parse,YI.parseParams=oP.parseParams,YI.parseFmtpConfig=oP.parseFmtpConfig,YI.parsePayloads=oP.parsePayloads,YI.parseRemoteCandidates=oP.parseRemoteCandidates,YI.parseImageAttributes=oP.parseImageAttributes,YI.parseSimulcastStreamList=oP.parseSimulcastStreamList;var sP=["adaptiveJitterBuffer"];function lP(e){return uP.apply(this,arguments)}function uP(){return(uP=Tg(Rg().mark((function e(t){return Rg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return",[]);case 2:return e.abrupt("return",new Mm((function(e){var r;null===(r=t.getStats(null))||void 0===r||r.then((function(t){var r,n,i;e((n=[],i=[],ud(r=t).call(r,(function(e){"inbound-rtp"===e.type&&n.push(e),"remote-outbound-rtp"===e.type&&i.push(e)})),Vk(n).call(n,(function(e){var t,n=r.get(e.codecId),o=r.get(e.trackId);return{type:null!==(t=e.mediaType)&&void 0!==t?t:e.kind,inboundRtp:e,remoteOutBoundRtp:PR(i).call(i,(function(t){return t.mediaType===e.mediaType})),codec:n,track:o}}))))}))})).catch((function(){return[]})));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function cP(e){var t,r,n,i,o,a,s,l,u,c,d,f,p,h,v,m,y,g,_,b,w,S,R,k,T,E,x,L,C,O,I,P,D,A,F,Z,j,V=null==e?void 0:Gc(e).call(e,(function(e){return"video"===e.type}))[0],W=null==e?void 0:Gc(e).call(e,(function(e){return"audio"===e.type}))[0];(V&&V.remoteOutBoundRtp&&(D={bytesSent:V.remoteOutBoundRtp.bytesSent,packetsSent:V.remoteOutBoundRtp.packetsSent}),W&&W.remoteOutBoundRtp&&(A={bytesSent:W.remoteOutBoundRtp.bytesSent,packetsSent:W.remoteOutBoundRtp.packetsSent}),void 0!==(null==V||null===(t=V.inboundRtp)||void 0===t?void 0:t.jitterBufferDelay))&&(F=(null===(Z=V.inboundRtp)||void 0===Z?void 0:Z.jitterBufferDelay)/(null===(j=V.inboundRtp)||void 0===j?void 0:j.jitterBufferEmittedCount)*1e3);return{video:V?{codec:null===(r=V.codec)||void 0===r?void 0:r.mimeType,payloadType:null===(n=V.codec)||void 0===n?void 0:n.payloadType,sdpFmtpLine:null===(i=V.codec)||void 0===i?void 0:i.sdpFmtpLine,bytesReceived:(null===(o=V.inboundRtp)||void 0===o?void 0:o.bytesReceived)||0,firCount:null===(a=V.inboundRtp)||void 0===a?void 0:a.firCount,pliCount:null===(s=V.inboundRtp)||void 0===s?void 0:s.pliCount,frameHeight:null===(l=V.inboundRtp)||void 0===l?void 0:l.frameHeight,frameWidth:null===(u=V.inboundRtp)||void 0===u?void 0:u.frameWidth,framesDecoded:null===(c=V.inboundRtp)||void 0===c?void 0:c.framesDecoded,framesDropped:null===(d=V.inboundRtp)||void 0===d?void 0:d.framesDropped,framesPerSecond:null===(f=V.inboundRtp)||void 0===f?void 0:f.framesPerSecond,framesReceived:null!==(p=null===(h=V.inboundRtp)||void 0===h?void 0:h.framesReceived)&&void 0!==p?p:null===(v=V.track)||void 0===v?void 0:v.framesReceived,jitter:null===(m=V.inboundRtp)||void 0===m?void 0:m.jitter,jitterBufferDelay:null===(y=V.inboundRtp)||void 0===y?void 0:y.jitterBufferDelay,keyFramesDecoded:null===(g=V.inboundRtp)||void 0===g?void 0:g.keyFramesDecoded,nackCount:null===(_=V.inboundRtp)||void 0===_?void 0:_.nackCount,packetsLost:(null===(b=V.inboundRtp)||void 0===b?void 0:b.packetsLost)||0,packetsReceived:(null===(w=V.inboundRtp)||void 0===w?void 0:w.packetsReceived)||0,averageJitterBufferDelay:F}:void 0,audio:W?{codec:null===(S=W.codec)||void 0===S?void 0:S.mimeType,payloadType:null===(R=W.codec)||void 0===R?void 0:R.payloadType,sdpFmtpLine:null===(k=W.codec)||void 0===k?void 0:k.sdpFmtpLine,bytesReceived:(null===(T=W.inboundRtp)||void 0===T?void 0:T.bytesReceived)||0,audioLevel:null===(E=W.inboundRtp)||void 0===E?void 0:E.audioLevel,jitter:null===(x=W.inboundRtp)||void 0===x?void 0:x.jitter,jitterBufferDelay:null===(L=W.inboundRtp)||void 0===L?void 0:L.jitterBufferDelay,packetsLost:(null===(C=W.inboundRtp)||void 0===C?void 0:C.packetsLost)||0,packetsReceived:(null===(O=W.inboundRtp)||void 0===O?void 0:O.packetsReceived)||0,totalSamplesDuration:null===(I=W.inboundRtp)||void 0===I?void 0:I.totalSamplesDuration,totalSamplesReceived:null===(P=W.inboundRtp)||void 0===P?void 0:P.totalSamplesReceived}:void 0,videoRemote:D,audioRemote:A}}var dP=function(){function e(t){var r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;Eg(this,e),this._pc=null,this._lastVideoStats=null,this._lastRemoteVideoStats=null,this._timer=0,this._timerInterval=0,this._speedQueue=[],this._lostRateQueue=[],this._receivedRateQueue=[],this._currentSpeed=-1,this._currentLostRate=-1,this._currentReceivedRate=-1,this._evaluate=Tg(Rg().mark((function e(){var t,n,i,o,a,s,l,u,c,d,f,p,h,v,m,y,g,_,b,w;return Rg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,lP(r._pc).then((function(e){return cP(e)}));case 3:t=e.sent,r._lastVideoStats&&null!=t&&t.video&&(n=t.video,i=n.bytesReceived,o=n.packetsLost,a=n.packetsReceived,s=r._lastVideoStats,l=s.bytesReceived,u=s.packetsLost,c=s.packetsReceived,l&&r._cacheSpeed(8e3*(i-l)/r._timerInterval),d=o-u,(f=a-c)&&d>=0&&r._cacheLostRate(d/(d+f)*1e3/r._timerInterval)),r._lastRemoteVideoStats&&null!=t&&t.videoRemote&&(p=t.video||{},h=p.bytesReceived,v=void 0===h?0:h,m=r._lastVideoStats||{},y=m.bytesReceived,g=void 0===y?0:y,_=null==t?void 0:t.videoRemote,b=_.bytesSent,(w=r._lastRemoteVideoStats.bytesSent)&&b&&b-w>0&&r._cacheReceivedRate((v-g)/(b-w))),r._lastVideoStats=null==t?void 0:t.video,r._lastRemoteVideoStats=null==t?void 0:t.videoRemote,e.next=12;break;case 10:e.prev=10,e.t0=e.catch(0);case 12:case"end":return e.stop()}}),e,null,[[0,10]])}))),this._pc=t,this._timerInterval=n,this.start(n)}return Lg(e,[{key:"start",value:function(e){clearInterval(this._timer),this._pc&&(this._timer=AT(this._evaluate,e))}},{key:"getStats",value:function(){return this._speedQueue.length?{speed:QT(this._currentSpeed.toFixed(2)),avgSpeed:QT(this._getAvgSpeed().toFixed(2)),lostRate:QT(this._currentLostRate.toFixed(2)),avgLostRate:QT(this._getAvgLostRate().toFixed(2)),receivedRate:QT(this._currentReceivedRate.toFixed(2)),avgReceivedRate:QT(this._getAvgReceivedRate().toFixed(2))}:{}}},{key:"destroy",value:function(){clearInterval(this._timer),this._pc=null,this._lastVideoStats=null}},{key:"_cacheSpeed",value:function(e){var t;(this._currentSpeed=e,this._speedQueue.length>5)&&(this._speedQueue=hy(t=this._speedQueue).call(t,5));this._speedQueue.push(e)}},{key:"_cacheLostRate",value:function(e){var t;(this._currentLostRate=e,this._lostRateQueue.length>5)&&(this._lostRateQueue=hy(t=this._lostRateQueue).call(t,5));this._lostRateQueue.push(e)}},{key:"_cacheReceivedRate",value:function(e){var t;(this._currentReceivedRate=e,this._receivedRateQueue.length>5)&&(this._receivedRateQueue=hy(t=this._receivedRateQueue).call(t,5));this._receivedRateQueue.push(e)}},{key:"_getAvgSpeed",value:function(){var e;return-1===this._currentSpeed?-1:BO(e=this._speedQueue).call(e,(function(e,t){return e+t}),0)/this._speedQueue.length}},{key:"_getAvgLostRate",value:function(){var e;return-1===this._currentLostRate?-1:BO(e=this._lostRateQueue).call(e,(function(e,t){return e+t}),0)/this._lostRateQueue.length}},{key:"_getAvgReceivedRate",value:function(){var e;return-1===this._currentReceivedRate?-1:BO(e=this._receivedRateQueue).call(e,(function(e,t){return e+t}),0)/this._receivedRateQueue.length}}]),e}();function fP(){return!(!window.RTCPeerConnection||!window.RTCPeerConnection.prototype.addTransceiver)}var pP=function(){return"undefined"!=typeof window&&window.Worker},hP=function(){return"undefined"!=typeof MessageChannel},vP=function(){return"undefined"!=typeof TransformStream&&"undefined"!=typeof RTCRtpSender&&"undefined"!=typeof RTCRtpReceiver&&void 0!==RTCRtpSender.prototype.createEncodedStreams&&void 0!==RTCRtpReceiver.prototype.createEncodedStreams},mP={getNALUnits:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.length-e.position<4)return[];var r=e.position;return 1===e.getInt32(r)||0===e.getInt16(r)&&1===e.getInt8(r+2)?mP.getAnnexbNals(e,t):mP.getAvccNals(e,t)},getAnnexbNals:function(e,t){for(var r=[],n=mP.getHeaderPositionAnnexB(e),i=n.pos,o=i;i<e.length-4;){var a,s,l=new Uint8Array(hy(a=e.buffer).call(a,i,i+n.headerLength));n.pos===e.position&&e.skip(n.headerLength),o=(n=mP.getHeaderPositionAnnexB(e)).pos;var u={header:l,body:new Uint8Array(hy(s=e.buffer).call(s,i+l.byteLength,o)),type:-1};t?mP.analyseH265Nal(u):mP.analyseNal(u),(u.type<=9||t&&u.type<=40)&&0!==u.type&&r.push(u),e.skip(o-e.position),i=o}return r},getAvccNals:function(e,t){for(var r=[];e.position<e.length-4;){var n=e.getInt32(e.position);if(!(e.length-e.position>=n))break;var i,o,a=new Uint8Array(hy(i=e.buffer).call(i,e.position,e.position+4));e.skip(4);var s=new Uint8Array(hy(o=e.buffer).call(o,e.position,e.position+n));e.skip(n);var l={header:a,body:s,type:-1};t?mP.analyseH265Nal(l):mP.analyseNal(l),l.type<=9&&0!==l.type&&r.push(l)}return r},analyseNal:function(e){var t=31&e.body[0];switch(e.type=t,t){case 1:e.ndr=!0;break;case 5:e.idr=!0;break;case 6:e.sei=!0;break;case 7:e.sps=!0;break;case 8:e.pps=!0}},analyseH265Nal:function(e){var t=(126&e.body[0])>>1;switch(e.type=t,t){case 39:case 40:e.sei=!0}},getHeaderPositionAnnexB:function(e){for(var t=e.position,r=0,n=e.length;3!==r&&4!==r&&t<n-4;)0===e.getInt16(t)?1===e.getInt16(t+2)?r=4:1===e.getInt8(t+2)?r=3:t++:t++;return t===n-4&&(0===e.getInt16(t)?1===e.getInt16(t+2)?r=4:t=n:(t++,0===e.getInt16(t)&&1===e.getInt8(t)?r=3:t=n)),{pos:t,headerLength:r}},isH265VideoFrame:function(e){var t,r,n;return Lx(t=((null===(r=e.getMetadata)||void 0===r||null===(n=r.call(e))||void 0===n?void 0:n.mimeType)||"").toLowerCase()).call(t,"h265")}},yP=function(){function e(t){Eg(this,e),this._position=0,this._dataview=new DataView(t)}return Lg(e,[{key:"length",get:function(){return this.buffer.byteLength}},{key:"buffer",get:function(){return this._dataview.buffer}},{key:"position",get:function(){return this._position},set:function(e){this._position=e}},{key:"back",value:function(e){this.position-=e}},{key:"getUint8",value:function(e){return this._dataview.getUint8(e)}},{key:"getInt8",value:function(e){return this._dataview.getInt8(e)}},{key:"getInt16",value:function(e){return this._dataview.getInt16(e)}},{key:"getUint16",value:function(e){return this._dataview.getUint16(e)}},{key:"getUint32",value:function(e){return this._dataview.getUint32(e)}},{key:"getInt32",value:function(e){return this._dataview.getInt32(e)}},{key:"skip",value:function(t){for(var r=Math.floor(t/4),n=t%4,i=0;i<r;i++)e.readByte(this,4);n>0&&e.readByte(this,n)}},{key:"readUint8",value:function(){return e.readByte(this,1)}},{key:"readUint16",value:function(){return e.readByte(this,2)}},{key:"readUint24",value:function(){return e.readByte(this,3)}},{key:"readUint32",value:function(){return e.readByte(this,4)}},{key:"readUint64",value:function(){return e.readByte(this,8)}},{key:"readInt8",value:function(){return e.readByte(this,1,!0)}},{key:"readInt16",value:function(){return e.readByte(this,2,!0)}},{key:"readInt32",value:function(){return e.readByte(this,4,!0)}},{key:"writeUint32",value:function(e){return new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e])}}],[{key:"readByte",value:function(e,t,r){var n;switch(t){case 1:n=r?e.getInt8(e.position):e.getUint8(e.position);break;case 2:n=r?e.getInt16(e.position):e.getUint16(e.position);break;case 3:if(r)throw new Error("not supported for readByte 3");n=e.getUint8(e.position)<<16,n|=e.getUint8(e.position+1)<<8,n|=e.getUint8(e.position+2);break;case 4:n=r?e.getInt32(e.position):e.getUint32(e.position);break;case 8:if(r)throw new Error("not supported for readBody 8");n=e.getUint32(e.position)<<32,n|=e.getUint32(e.position+4);break;default:n=""}return e.position+=t,n}}]),e}();function gP(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Ad(e,(i=n.key,o=void 0,o=function(e,t){if("object"!==Sc(e)||null===e)return e;var r=e[bg];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Sc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"===Sc(o)?o:String(o)),n)}var i,o}function _P(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<24>>>0)+(e[t+1]<<16)+(e[t+2]<<8)+(e[t+3]||0)}var bP=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,n=[{key:"parseAnnexB",value:function(e){var t=e.byteLength-1,r=0;do{if(0!==e[t])break;r++,t--}while(t>0);r>=3&&(e=e.subarray(0,t+1));for(var n=e.length,i=2,o=0;null!==e[i]&&void 0!==e[i]&&1!==e[i];)i++;if((o=2+ ++i)>=n)return[];for(var a=[];o<n;)switch(e[o]){case 0:if(0!==e[o-1]){o+=2;break}if(0!==e[o-2]){o++;break}if(o<n-1&&1!==e[o+1]){o++;break}i!==o-2&&a.push(e.subarray(i,o-2));do{o++}while(1!==e[o]&&o<n);o=(i=o+1)+2;break;case 1:if(0!==e[o-1]||0!==e[o-2]){o+=3;break}i!==o-2&&a.push(e.subarray(i,o-2)),o=(i=o+1)+2;break;default:o+=3}return i<n&&a.push(e.subarray(i)),a}},{key:"parseAvcC",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;if(!(e.length<4)){for(var r,n=e.length,i=[],o=0;o+t<n;)if(r=_P(e,o),3===t&&(r>>>=8),o+=t,r){if(o+r>n)break;i.push(e.subarray(o,o+r)),o+=r}return i}}},{key:"parseSEI",value:function(e,t){for(var r=e.length,n=t?2:1,i=0,o=0,a="";255===e[n];)i+=255,n++;for(i+=e[n++];255===e[n];)o+=255,n++;if(o+=e[n++],5===i&&r>n+16)for(var s=0;s<16;s++)a+=e[n].toString(16),n++;return{payload:e.subarray(n,n+o),type:i,size:o,uuid:a}}},{key:"removeEPB",value:function(e){for(var t=e.byteLength,r=[],n=1;n<t-2;)0===e[n]&&0===e[n+1]&&3===e[n+2]?(r.push(n+2),n+=2):n++;if(!r.length)return e;var i=t-r.length,o=new Uint8Array(i),a=0;for(n=0;n<i;a++,n++)a===r[0]&&(a++,r.shift()),o[n]=e[a];return o}}],(r=null)&&gP(t.prototype,r),n&&gP(t,n),Ad(t,"prototype",{writable:!1}),e}();function wP(e){return new TransformStream({transform:function(t,r){var n=mP.isH265VideoFrame(t),i=mP.getNALUnits(new yP(t.data),n);ud(i).call(i,(function(t){if(t.sei){var r=bP.parseSEI(bP.removeEPB(t.body),!1);r&&e({data:r,sei:{code:r.type,content:r.payload}})}})),r.enqueue(t)}})}"undefined"!=typeof self&&"DedicatedWorkerGlobalScope"===self.constructor.name&&self.addEventListener("rtctransform",(function(e){var t=e.transformer,r=t.options.port,n=wP((function(e){r.postMessage(e)}));t.readable.pipeThrough(n).pipeTo(e.transformer.writable)}));var SP="IWZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO3ZhciBlPXtnZXROQUxVbml0czpmdW5jdGlvbih0KXt2YXIgbj1hcmd1bWVudHMubGVuZ3RoPjEmJnZvaWQgMCE9PWFyZ3VtZW50c1sxXSYmYXJndW1lbnRzWzFdO2lmKHQubGVuZ3RoLXQucG9zaXRpb248NClyZXR1cm5bXTt2YXIgcj10LnBvc2l0aW9uO3JldHVybiAxPT09dC5nZXRJbnQzMihyKXx8MD09PXQuZ2V0SW50MTYocikmJjE9PT10LmdldEludDgocisyKT9lLmdldEFubmV4Yk5hbHModCxuKTplLmdldEF2Y2NOYWxzKHQsbil9LGdldEFubmV4Yk5hbHM6ZnVuY3Rpb24odCxuKXtmb3IodmFyIHI9W10saT1lLmdldEhlYWRlclBvc2l0aW9uQW5uZXhCKHQpLGE9aS5wb3Msbz1hO2E8dC5sZW5ndGgtNDspe3ZhciB1PW5ldyBVaW50OEFycmF5KHQuYnVmZmVyLnNsaWNlKGEsYStpLmhlYWRlckxlbmd0aCkpO2kucG9zPT09dC5wb3NpdGlvbiYmdC5za2lwKGkuaGVhZGVyTGVuZ3RoKSxvPShpPWUuZ2V0SGVhZGVyUG9zaXRpb25Bbm5leEIodCkpLnBvczt2YXIgcz17aGVhZGVyOnUsYm9keTpuZXcgVWludDhBcnJheSh0LmJ1ZmZlci5zbGljZShhK3UuYnl0ZUxlbmd0aCxvKSksdHlwZTotMX07bj9lLmFuYWx5c2VIMjY1TmFsKHMpOmUuYW5hbHlzZU5hbChzKSwocy50eXBlPD05fHxuJiZzLnR5cGU8PTQwKSYmMCE9PXMudHlwZSYmci5wdXNoKHMpLHQuc2tpcChvLXQucG9zaXRpb24pLGE9b31yZXR1cm4gcn0sZ2V0QXZjY05hbHM6ZnVuY3Rpb24odCxuKXtmb3IodmFyIHI9W107dC5wb3NpdGlvbjx0Lmxlbmd0aC00Oyl7dmFyIGk9dC5nZXRJbnQzMih0LnBvc2l0aW9uKTtpZighKHQubGVuZ3RoLXQucG9zaXRpb24+PWkpKWJyZWFrO3ZhciBhPW5ldyBVaW50OEFycmF5KHQuYnVmZmVyLnNsaWNlKHQucG9zaXRpb24sdC5wb3NpdGlvbis0KSk7dC5za2lwKDQpO3ZhciBvPW5ldyBVaW50OEFycmF5KHQuYnVmZmVyLnNsaWNlKHQucG9zaXRpb24sdC5wb3NpdGlvbitpKSk7dC5za2lwKGkpO3ZhciB1PXtoZWFkZXI6YSxib2R5Om8sdHlwZTotMX07bj9lLmFuYWx5c2VIMjY1TmFsKHUpOmUuYW5hbHlzZU5hbCh1KSx1LnR5cGU8PTkmJjAhPT11LnR5cGUmJnIucHVzaCh1KX1yZXR1cm4gcn0sYW5hbHlzZU5hbDpmdW5jdGlvbihlKXt2YXIgdD0zMSZlLmJvZHlbMF07c3dpdGNoKGUudHlwZT10LHQpe2Nhc2UgMTplLm5kcj0hMDticmVhaztjYXNlIDU6ZS5pZHI9ITA7YnJlYWs7Y2FzZSA2OmUuc2VpPSEwO2JyZWFrO2Nhc2UgNzplLnNwcz0hMDticmVhaztjYXNlIDg6ZS5wcHM9ITB9fSxhbmFseXNlSDI2NU5hbDpmdW5jdGlvbihlKXt2YXIgdD0oMTI2JmUuYm9keVswXSk+PjE7c3dpdGNoKGUudHlwZT10LHQpe2Nhc2UgMzk6Y2FzZSA0MDplLnNlaT0hMH19LGdldEhlYWRlclBvc2l0aW9uQW5uZXhCOmZ1bmN0aW9uKGUpe2Zvcih2YXIgdD1lLnBvc2l0aW9uLG49MCxyPWUubGVuZ3RoOzMhPT1uJiY0IT09biYmdDxyLTQ7KTA9PT1lLmdldEludDE2KHQpPzE9PT1lLmdldEludDE2KHQrMik/bj00OjE9PT1lLmdldEludDgodCsyKT9uPTM6dCsrOnQrKztyZXR1cm4gdD09PXItNCYmKDA9PT1lLmdldEludDE2KHQpPzE9PT1lLmdldEludDE2KHQrMik/bj00OnQ9cjoodCsrLDA9PT1lLmdldEludDE2KHQpJiYxPT09ZS5nZXRJbnQ4KHQpP249Mzp0PXIpKSx7cG9zOnQsaGVhZGVyTGVuZ3RoOm59fSxpc0gyNjVWaWRlb0ZyYW1lOmZ1bmN0aW9uKGUpe3ZhciB0LG47cmV0dXJuKChudWxsPT09KHQ9ZS5nZXRNZXRhZGF0YSl8fHZvaWQgMD09PXR8fG51bGw9PT0obj10LmNhbGwoZSkpfHx2b2lkIDA9PT1uP3ZvaWQgMDpuLm1pbWVUeXBlKXx8IiIpLnRvTG93ZXJDYXNlKCkuaW5jbHVkZXMoImgyNjUiKX19O2Z1bmN0aW9uIHQoZSl7cmV0dXJuKHQ9ImZ1bmN0aW9uIj09dHlwZW9mIFN5bWJvbCYmInN5bWJvbCI9PXR5cGVvZiBTeW1ib2wuaXRlcmF0b3I/ZnVuY3Rpb24oZSl7cmV0dXJuIHR5cGVvZiBlfTpmdW5jdGlvbihlKXtyZXR1cm4gZSYmImZ1bmN0aW9uIj09dHlwZW9mIFN5bWJvbCYmZS5jb25zdHJ1Y3Rvcj09PVN5bWJvbCYmZSE9PVN5bWJvbC5wcm90b3R5cGU/InN5bWJvbCI6dHlwZW9mIGV9KShlKX1mdW5jdGlvbiBuKGUsdCl7Zm9yKHZhciBuPTA7bjx0Lmxlbmd0aDtuKyspe3ZhciByPXRbbl07ci5lbnVtZXJhYmxlPXIuZW51bWVyYWJsZXx8ITEsci5jb25maWd1cmFibGU9ITAsInZhbHVlImluIHImJihyLndyaXRhYmxlPSEwKSxPYmplY3QuZGVmaW5lUHJvcGVydHkoZSwoaT1yLmtleSxhPXZvaWQgMCwic3ltYm9sIj09dHlwZW9mKGE9ZnVuY3Rpb24oZSx0KXtpZigib2JqZWN0IiE9dHlwZW9mIGV8fG51bGw9PT1lKXJldHVybiBlO3ZhciBuPWVbU3ltYm9sLnRvUHJpbWl0aXZlXTtpZih2b2lkIDAhPT1uKXt2YXIgcj1uLmNhbGwoZSx0fHwiZGVmYXVsdCIpO2lmKCJvYmplY3QiIT10eXBlb2YgcilyZXR1cm4gcjt0aHJvdyBuZXcgVHlwZUVycm9yKCJAQHRvUHJpbWl0aXZlIG11c3QgcmV0dXJuIGEgcHJpbWl0aXZlIHZhbHVlLiIpfXJldHVybigic3RyaW5nIj09PXQ/U3RyaW5nOk51bWJlcikoZSl9KGksInN0cmluZyIpKT9hOlN0cmluZyhhKSkscil9dmFyIGksYX12YXIgcj1mdW5jdGlvbigpe2Z1bmN0aW9uIGUodCl7IWZ1bmN0aW9uKGUsdCl7aWYoIShlIGluc3RhbmNlb2YgdCkpdGhyb3cgbmV3IFR5cGVFcnJvcigiQ2Fubm90IGNhbGwgYSBjbGFzcyBhcyBhIGZ1bmN0aW9uIil9KHRoaXMsZSksdGhpcy5fcG9zaXRpb249MCx0aGlzLl9kYXRhdmlldz1uZXcgRGF0YVZpZXcodCl9dmFyIHQscixpO3JldHVybiB0PWUsaT1be2tleToicmVhZEJ5dGUiLHZhbHVlOmZ1bmN0aW9uKGUsdCxuKXt2YXIgcjtzd2l0Y2godCl7Y2FzZSAxOnI9bj9lLmdldEludDgoZS5wb3NpdGlvbik6ZS5nZXRVaW50OChlLnBvc2l0aW9uKTticmVhaztjYXNlIDI6cj1uP2UuZ2V0SW50MTYoZS5wb3NpdGlvbik6ZS5nZXRVaW50MTYoZS5wb3NpdGlvbik7YnJlYWs7Y2FzZSAzOmlmKG4pdGhyb3cgbmV3IEVycm9yKCJub3Qgc3VwcG9ydGVkIGZvciByZWFkQnl0ZSAzIik7cj1lLmdldFVpbnQ4KGUucG9zaXRpb24pPDwxNixyfD1lLmdldFVpbnQ4KGUucG9zaXRpb24rMSk8PDgscnw9ZS5nZXRVaW50OChlLnBvc2l0aW9uKzIpO2JyZWFrO2Nhc2UgNDpyPW4/ZS5nZXRJbnQzMihlLnBvc2l0aW9uKTplLmdldFVpbnQzMihlLnBvc2l0aW9uKTticmVhaztjYXNlIDg6aWYobil0aHJvdyBuZXcgRXJyb3IoIm5vdCBzdXBwb3J0ZWQgZm9yIHJlYWRCb2R5IDgiKTtyPWUuZ2V0VWludDMyKGUucG9zaXRpb24pPDwzMixyfD1lLmdldFVpbnQzMihlLnBvc2l0aW9uKzQpO2JyZWFrO2RlZmF1bHQ6cj0iIn1yZXR1cm4gZS5wb3NpdGlvbis9dCxyfX1dLChyPVt7a2V5OiJsZW5ndGgiLGdldDpmdW5jdGlvbigpe3JldHVybiB0aGlzLmJ1ZmZlci5ieXRlTGVuZ3RofX0se2tleToiYnVmZmVyIixnZXQ6ZnVuY3Rpb24oKXtyZXR1cm4gdGhpcy5fZGF0YXZpZXcuYnVmZmVyfX0se2tleToicG9zaXRpb24iLGdldDpmdW5jdGlvbigpe3JldHVybiB0aGlzLl9wb3NpdGlvbn0sc2V0OmZ1bmN0aW9uKGUpe3RoaXMuX3Bvc2l0aW9uPWV9fSx7a2V5OiJiYWNrIix2YWx1ZTpmdW5jdGlvbihlKXt0aGlzLnBvc2l0aW9uLT1lfX0se2tleToiZ2V0VWludDgiLHZhbHVlOmZ1bmN0aW9uKGUpe3JldHVybiB0aGlzLl9kYXRhdmlldy5nZXRVaW50OChlKX19LHtrZXk6ImdldEludDgiLHZhbHVlOmZ1bmN0aW9uKGUpe3JldHVybiB0aGlzLl9kYXRhdmlldy5nZXRJbnQ4KGUpfX0se2tleToiZ2V0SW50MTYiLHZhbHVlOmZ1bmN0aW9uKGUpe3JldHVybiB0aGlzLl9kYXRhdmlldy5nZXRJbnQxNihlKX19LHtrZXk6ImdldFVpbnQxNiIsdmFsdWU6ZnVuY3Rpb24oZSl7cmV0dXJuIHRoaXMuX2RhdGF2aWV3LmdldFVpbnQxNihlKX19LHtrZXk6ImdldFVpbnQzMiIsdmFsdWU6ZnVuY3Rpb24oZSl7cmV0dXJuIHRoaXMuX2RhdGF2aWV3LmdldFVpbnQzMihlKX19LHtrZXk6ImdldEludDMyIix2YWx1ZTpmdW5jdGlvbihlKXtyZXR1cm4gdGhpcy5fZGF0YXZpZXcuZ2V0SW50MzIoZSl9fSx7a2V5OiJza2lwIix2YWx1ZTpmdW5jdGlvbih0KXtmb3IodmFyIG49TWF0aC5mbG9vcih0LzQpLHI9dCU0LGk9MDtpPG47aSsrKWUucmVhZEJ5dGUodGhpcyw0KTtyPjAmJmUucmVhZEJ5dGUodGhpcyxyKX19LHtrZXk6InJlYWRVaW50OCIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDEpfX0se2tleToicmVhZFVpbnQxNiIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDIpfX0se2tleToicmVhZFVpbnQyNCIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDMpfX0se2tleToicmVhZFVpbnQzMiIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDQpfX0se2tleToicmVhZFVpbnQ2NCIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDgpfX0se2tleToicmVhZEludDgiLHZhbHVlOmZ1bmN0aW9uKCl7cmV0dXJuIGUucmVhZEJ5dGUodGhpcywxLCEwKX19LHtrZXk6InJlYWRJbnQxNiIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDIsITApfX0se2tleToicmVhZEludDMyIix2YWx1ZTpmdW5jdGlvbigpe3JldHVybiBlLnJlYWRCeXRlKHRoaXMsNCwhMCl9fSx7a2V5OiJ3cml0ZVVpbnQzMiIsdmFsdWU6ZnVuY3Rpb24oZSl7cmV0dXJuIG5ldyBVaW50OEFycmF5KFtlPj4+MjQmMjU1LGU+Pj4xNiYyNTUsZT4+PjgmMjU1LDI1NSZlXSl9fV0pJiZuKHQucHJvdG90eXBlLHIpLGkmJm4odCxpKSxPYmplY3QuZGVmaW5lUHJvcGVydHkodCwicHJvdG90eXBlIix7d3JpdGFibGU6ITF9KSxlfSgpO2Z1bmN0aW9uIGkoZSxuKXtmb3IodmFyIHI9MDtyPG4ubGVuZ3RoO3IrKyl7dmFyIGk9bltyXTtpLmVudW1lcmFibGU9aS5lbnVtZXJhYmxlfHwhMSxpLmNvbmZpZ3VyYWJsZT0hMCwidmFsdWUiaW4gaSYmKGkud3JpdGFibGU9ITApLE9iamVjdC5kZWZpbmVQcm9wZXJ0eShlLChhPWkua2V5LG89dm9pZCAwLG89ZnVuY3Rpb24oZSxuKXtpZigib2JqZWN0IiE9PXQoZSl8fG51bGw9PT1lKXJldHVybiBlO3ZhciByPWVbU3ltYm9sLnRvUHJpbWl0aXZlXTtpZih2b2lkIDAhPT1yKXt2YXIgaT1yLmNhbGwoZSxufHwiZGVmYXVsdCIpO2lmKCJvYmplY3QiIT09dChpKSlyZXR1cm4gaTt0aHJvdyBuZXcgVHlwZUVycm9yKCJAQHRvUHJpbWl0aXZlIG11c3QgcmV0dXJuIGEgcHJpbWl0aXZlIHZhbHVlLiIpfXJldHVybigic3RyaW5nIj09PW4/U3RyaW5nOk51bWJlcikoZSl9KGEsInN0cmluZyIpLCJzeW1ib2wiPT09dChvKT9vOlN0cmluZyhvKSksaSl9dmFyIGEsb31mdW5jdGlvbiBhKGUpe3ZhciB0PWFyZ3VtZW50cy5sZW5ndGg+MSYmdm9pZCAwIT09YXJndW1lbnRzWzFdP2FyZ3VtZW50c1sxXTowO3JldHVybihlW3RdPDwyND4+PjApKyhlW3QrMV08PDE2KSsoZVt0KzJdPDw4KSsoZVt0KzNdfHwwKX12YXIgbz1mdW5jdGlvbigpe2Z1bmN0aW9uIGUoKXshZnVuY3Rpb24oZSx0KXtpZighKGUgaW5zdGFuY2VvZiB0KSl0aHJvdyBuZXcgVHlwZUVycm9yKCJDYW5ub3QgY2FsbCBhIGNsYXNzIGFzIGEgZnVuY3Rpb24iKX0odGhpcyxlKX12YXIgdCxuLHI7cmV0dXJuIHQ9ZSxyPVt7a2V5OiJwYXJzZUFubmV4QiIsdmFsdWU6ZnVuY3Rpb24oZSl7dmFyIHQ9ZS5ieXRlTGVuZ3RoLTEsbj0wO2Rve2lmKDAhPT1lW3RdKWJyZWFrO24rKyx0LS19d2hpbGUodD4wKTtuPj0zJiYoZT1lLnN1YmFycmF5KDAsdCsxKSk7Zm9yKHZhciByPWUubGVuZ3RoLGk9MixhPTA7bnVsbCE9PWVbaV0mJnZvaWQgMCE9PWVbaV0mJjEhPT1lW2ldOylpKys7aWYoKGE9MisgKytpKT49cilyZXR1cm5bXTtmb3IodmFyIG89W107YTxyOylzd2l0Y2goZVthXSl7Y2FzZSAwOmlmKDAhPT1lW2EtMV0pe2ErPTI7YnJlYWt9aWYoMCE9PWVbYS0yXSl7YSsrO2JyZWFrfWlmKGE8ci0xJiYxIT09ZVthKzFdKXthKys7YnJlYWt9aSE9PWEtMiYmby5wdXNoKGUuc3ViYXJyYXkoaSxhLTIpKTtkb3thKyt9d2hpbGUoMSE9PWVbYV0mJmE8cik7YT0oaT1hKzEpKzI7YnJlYWs7Y2FzZSAxOmlmKDAhPT1lW2EtMV18fDAhPT1lW2EtMl0pe2ErPTM7YnJlYWt9aSE9PWEtMiYmby5wdXNoKGUuc3ViYXJyYXkoaSxhLTIpKSxhPShpPWErMSkrMjticmVhaztkZWZhdWx0OmErPTN9cmV0dXJuIGk8ciYmby5wdXNoKGUuc3ViYXJyYXkoaSkpLG99fSx7a2V5OiJwYXJzZUF2Y0MiLHZhbHVlOmZ1bmN0aW9uKGUpe3ZhciB0PWFyZ3VtZW50cy5sZW5ndGg+MSYmdm9pZCAwIT09YXJndW1lbnRzWzFdP2FyZ3VtZW50c1sxXTo0O2lmKCEoZS5sZW5ndGg8NCkpe2Zvcih2YXIgbixyPWUubGVuZ3RoLGk9W10sbz0wO28rdDxyOylpZihuPWEoZSxvKSwzPT09dCYmKG4+Pj49OCksbys9dCxuKXtpZihvK24+cilicmVhaztpLnB1c2goZS5zdWJhcnJheShvLG8rbikpLG8rPW59cmV0dXJuIGl9fX0se2tleToicGFyc2VTRUkiLHZhbHVlOmZ1bmN0aW9uKGUsdCl7Zm9yKHZhciBuPWUubGVuZ3RoLHI9dD8yOjEsaT0wLGE9MCxvPSIiOzI1NT09PWVbcl07KWkrPTI1NSxyKys7Zm9yKGkrPWVbcisrXTsyNTU9PT1lW3JdOylhKz0yNTUscisrO2lmKGErPWVbcisrXSw1PT09aSYmbj5yKzE2KWZvcih2YXIgdT0wO3U8MTY7dSsrKW8rPWVbcl0udG9TdHJpbmcoMTYpLHIrKztyZXR1cm57cGF5bG9hZDplLnN1YmFycmF5KHIscithKSx0eXBlOmksc2l6ZTphLHV1aWQ6b319fSx7a2V5OiJyZW1vdmVFUEIiLHZhbHVlOmZ1bmN0aW9uKGUpe2Zvcih2YXIgdD1lLmJ5dGVMZW5ndGgsbj1bXSxyPTE7cjx0LTI7KTA9PT1lW3JdJiYwPT09ZVtyKzFdJiYzPT09ZVtyKzJdPyhuLnB1c2gocisyKSxyKz0yKTpyKys7aWYoIW4ubGVuZ3RoKXJldHVybiBlO3ZhciBpPXQtbi5sZW5ndGgsYT1uZXcgVWludDhBcnJheShpKSxvPTA7Zm9yKHI9MDtyPGk7bysrLHIrKylvPT09blswXSYmKG8rKyxuLnNoaWZ0KCkpLGFbcl09ZVtvXTtyZXR1cm4gYX19XSwobj1udWxsKSYmaSh0LnByb3RvdHlwZSxuKSxyJiZpKHQsciksT2JqZWN0LmRlZmluZVByb3BlcnR5KHQsInByb3RvdHlwZSIse3dyaXRhYmxlOiExfSksZX0oKTsidW5kZWZpbmVkIiE9dHlwZW9mIHNlbGYmJiJEZWRpY2F0ZWRXb3JrZXJHbG9iYWxTY29wZSI9PT1zZWxmLmNvbnN0cnVjdG9yLm5hbWUmJnNlbGYuYWRkRXZlbnRMaXN0ZW5lcigicnRjdHJhbnNmb3JtIiwoZnVuY3Rpb24odCl7dmFyIG4saT10LnRyYW5zZm9ybWVyLGE9aS5vcHRpb25zLnBvcnQsdT0obj1mdW5jdGlvbihlKXthLnBvc3RNZXNzYWdlKGUpfSxuZXcgVHJhbnNmb3JtU3RyZWFtKHt0cmFuc2Zvcm06ZnVuY3Rpb24odCxpKXt2YXIgYT1lLmlzSDI2NVZpZGVvRnJhbWUodCk7ZS5nZXROQUxVbml0cyhuZXcgcih0LmRhdGEpLGEpLmZvckVhY2goKGZ1bmN0aW9uKGUpe2lmKGUuc2VpKXt2YXIgdD1vLnBhcnNlU0VJKG8ucmVtb3ZlRVBCKGUuYm9keSksITEpO3QmJm4oe2RhdGE6dCxzZWk6e2NvZGU6dC50eXBlLGNvbnRlbnQ6dC5wYXlsb2FkfX0pfX0pKSxpLmVucXVldWUodCl9fSkpO2kucmVhZGFibGUucGlwZVRocm91Z2godSkucGlwZVRvKHQudHJhbnNmb3JtZXIud3JpdGFibGUpfSkpfSgpOwo=",RP="undefined"!=typeof window&&window.Blob&&new Blob([atob(SP)],{type:"text/javascript;charset=utf-8"});function kP(){var e=RP&&(RR||window.webkitURL).createObjectURL(RP);try{return e?new Worker(e,{}):new Worker("data:application/javascript;base64,"+SP,{type:"module"})}finally{e&&(RR||window.webkitURL).revokeObjectURL(e)}}var TP=function(){function e(){Eg(this,e),this._isStallInPreReportEnd=!1,this._stallList=[],this._audioTransceiver=null}var t,r;return Lg(e,[{key:"start",value:function(t){this.stop(),this._audioTransceiver=t,e.interval>=100&&this._startStallCountInterval()}},{key:"stop",value:function(){this._stallList=[],this._audioStallTimer&&(clearTimeout(this._audioStallTimer),delete this._audioStallTimer)}},{key:"destroy",value:function(){this.stop(),this._audioTransceiver=null}},{key:"getAudioStallInfo",value:(r=Tg(Rg().mark((function e(){var t,r;return Rg().wrap((function(e){for(var n;;)switch(e.prev=e.next){case 0:return t={stats_count:Gc(n=this._stallList).call(n,(function(e){return e.get_stats_cost})).length,stall_list:jg(this._stallList)},e.prev=1,e.next=4,this._audioStallCount();case 4:e.next=8;break;case 6:e.prev=6,e.t0=e.catch(1);case 8:return r=xP(this._stallList,2,this._isStallInPreReportEnd),this._isStallInPreReportEnd=r.isStallInEnd,this.stop(),this._startStallCountInterval(),e.abrupt("return",{stallCount:r.stall_count,stallDuration:r.stall_duration,list:r.list,extra:t});case 13:case"end":return e.stop()}}),e,this,[[1,6]])}))),function(){return r.apply(this,arguments)})},{key:"_startStallCountInterval",value:function(){var t=this,r=function(){var n=Tg(Rg().mark((function n(){return Rg().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return clearTimeout(t._audioStallTimer),delete t._audioStallTimer,n.next=4,t._audioStallCount();case 4:t._audioStallTimer||(t._audioStallTimer=o_(r,e.interval));case 5:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}();this._audioStallTimer=o_(r,e.interval)}},{key:"_audioStallCount",value:(t=Tg(Rg().mark((function t(){var r,n,i,o,a,s,l,u,c,d,f,p,h,v,m,y,g;return Rg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(this._preSample&&GE()-this._preSample.ts<.5*e.interval)){t.next=2;break}return t.abrupt("return");case 2:return r=GE(),o=0,t.prev=4,t.next=7,null===(a=this._audioTransceiver)||void 0===a?void 0:a.receiver.getStats();case 7:null==(s=t.sent)||ud(s).call(s,(function(e){"inbound-rtp"===e.type&&(n=e),o++})),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(4),i=t.t0.message||px(t.t0);case 14:if(this._preSample){t.next=17;break}return this._preSample={ts:GE(),concealedSamples:(null===(l=n)||void 0===l?void 0:l.concealedSamples)||0,totalSamplesReceived:(null===(u=n)||void 0===u?void 0:u.totalSamplesReceived)||0},t.abrupt("return");case 17:c=GE(),d=GE(),f=d-this._preSample.ts,n?(h=(p=n).concealedSamples,v=p.totalSamplesReceived,m=h-this._preSample.concealedSamples,y=v-this._preSample.totalSamplesReceived,g=m>=0&&y>=0&&m>=e.ratio*y,this._stallList.push({concealed:m,received:y,diff:f,start:this._preSample.ts,end:d,get_stats_cost:c-r,get_stats_start:r,get_stats_end:c,is_stall:g}),this._preSample.concealedSamples=h,this._preSample.totalSamplesReceived=v,this._preSample.ts=d):this._stallList.push({diff:f,start:this._preSample.ts,end:d,get_stats_cost:c-r,get_stats_start:r,get_stats_end:c,reason:o?i||"no inbound-rtp":"no report"});case 21:case"end":return t.stop()}}),t,this,[[4,11]])}))),function(){return t.apply(this,arguments)})}]),e}(),EP=TP;EP.interval=100,EP.ratio=.6;var xP=function(e,t,r){for(var n,i={stall_count:0,stall_duration:0,isStallInEnd:!1,list:[]},o=0,a=0,s=function(r){var n=e[r];n.is_stall&&(o++,a+=n.diff||0);var s=r===e.length-1;if(!n.is_stall||s){var u=o>=t,c=r+t-o-1;if(!u&&o>2){var d,f=0;ud(d=hy(e).call(e,r+1,c+1)).call(d,(function(e){e.is_stall&&(f+=e.diff||0)})),(u=a+f>EP.interval*t*EP.ratio)&&(r=c,a+=f)}u&&(i.stall_count++,i.stall_duration+=a,i.list.push(a)),s&&(i.isStallInEnd=u),o=a=0}l=r},l=0;l<e.length;l++)s(l);return!0===(null===(n=e[0])||void 0===n?void 0:n.is_stall)&&r&&i.stall_count>0&&i.stall_count--,i};function LP(){var e=navigator.userAgent;return null!==e.match("Safari")&&null===e.match("Chrome")}function CP(){return null!==navigator.userAgent.match("Firefox")}var OP=function(){function e(){var t=this;Eg(this,e),this._videoInWaiting100ms=!1,this._videoInWaiting500ms=!1,this._pauseStart=0,this._pauseDuration=0,this._stallTimeThreshold={stall500ms:LP()||CP()?550:500,stall100ms:100},this._support100msStall="undefined"!=typeof window&&"function"==typeof HTMLVideoElement.prototype.requestVideoFrameCallback,this._handleVisibilityChange=function(){"hidden"===document.visibilityState&&t._framePause()},this._framePause=function(){if(t._prePts&&t._stallList){var e=performance.now(),r=e-t._prePts;t._stallList.push({playTime:e,timeUpdateInterval:Math.round(r)}),t._prePts=void 0}}}return Lg(e,[{key:"start",value:function(e){var t=this;if(this._player=e,this._support100msStall){var r;if(e)this._requestVideoFrameCallbackTimer=e.requestVideoFrameCallback(Iy(r=this._onVideoRefresh).call(r,this)),this._removeHandler=function(){t._requestVideoFrameCallbackTimer&&e.cancelVideoFrameCallback(t._requestVideoFrameCallbackTimer)}}else{var n=function(){return t._onVideoTimeupdate(e)};e.addEventListener("timeupdate",n),this._removeHandler=function(){return e.removeEventListener("timeupdate",n)}}var i=function(){return t._onVideoPause()};e.addEventListener("pause",i);var o=function(){return t._onVideoPlay()};e.addEventListener("play",o),this._remotePlayPauseHandler=function(){e.removeEventListener("pause",i),e.removeEventListener("play",o)},document.addEventListener("visibilitychange",this._handleVisibilityChange),window.addEventListener("pagehide",this._framePause)}},{key:"stop",value:function(){delete this._player,this._removeHandler&&this._removeHandler(),delete this._removeHandler,this._remotePlayPauseHandler&&this._remotePlayPauseHandler(),delete this._remotePlayPauseHandler,delete this._stallList,delete this._prePts,this._videoInWaiting100ms=!1,this._videoInWaiting500ms=!1,document.removeEventListener("visibilitychange",this._handleVisibilityChange),window.removeEventListener("pagehide",this._framePause)}},{key:"destroy",value:function(){this.stop()}},{key:"getStallInfo",value:function(e){var t=this,r=e.interval,n=e.frameRateReceived,i=e.frameRateDecoded,o=e.bitrate,a={pts:0,stall:{stallCount500ms:0,stallDuration500ms:0,stallRate500ms:0,stallCount100ms:0,stallDuration100ms:0,stallRate100ms:0},pauseDuration:this._getPauseDuration()};if(this._stallList&&"visible"===document.visibilityState&&!this._isPaused){var s;if((LP()||CP())&&(0===o||(i||1/0)<=1||(n||1/0)<=1)||0===this._stallList.length)a.stall.stallDuration500ms=r,a.stall.stallCount500ms=this._videoInWaiting500ms?0:1,a.stall.stallRate500ms=1,this._videoInWaiting500ms=!0,this._support100msStall&&(a.stall.stallDuration100ms=r,a.stall.stallCount100ms=this._videoInWaiting100ms?0:1,a.stall.stallRate100ms=1,this._videoInWaiting100ms=!0);else ud(s=this._stallList).call(s,(function(e,n){var i=e.timeUpdateInterval,o=e.playTime,s=i;0===n&&(t._videoInWaiting100ms||t._videoInWaiting500ms)&&(s=Math.round(i%r)),i>t._stallTimeThreshold.stall500ms?(a.stall.stallDuration500ms+=s,t._videoInWaiting500ms||a.stall.stallCount500ms++,t._videoInWaiting500ms=!0):t._videoInWaiting500ms=!1,t._support100msStall&&(i>t._stallTimeThreshold.stall100ms?(a.stall.stallDuration100ms+=s,t._videoInWaiting100ms||a.stall.stallCount100ms++,t._videoInWaiting100ms=!0):t._videoInWaiting100ms=!1),a.pts=o}));var l=a.stall,u=l.stallDuration500ms,c=l.stallDuration100ms;a.stall.stallRate500ms=Math.min(Number((u/r).toFixed(4)),1),this._support100msStall&&c?a.stall.stallRate100ms=Math.min(Number((c/r).toFixed(4)),1):(delete a.stall.stallRate100ms,delete a.stall.stallCount100ms,delete a.stall.stallDuration100ms),this._stallList=[]}return a}},{key:"_getPauseDuration",value:function(){var e=this._pauseDuration;if(this._pauseDuration=0,this._isPaused){var t=GE(),r=t-(this._pauseStart||0);r>500&&(this._pauseStart=t,e+=r)}return e}},{key:"_onVideoPause",value:function(){this._isPaused=!0,this._pauseStart=GE(),this._framePause()}},{key:"_onVideoPlay",value:function(){this._isPaused=!1;var e=GE()-this._pauseStart;e>500&&(this._pauseDuration+=e)}},{key:"_onVideoTimeupdate",value:function(e){if(e&&0!==e.currentTime)if(void 0!==this._prePts){if(this._stallList||(this._stallList=[]),e.currentTime>this._prePts){var t=e.currentTime-this._prePts;this._stallList.push({playTime:e.currentTime,timeUpdateInterval:Math.round(1e3*t)})}this._prePts=e.currentTime}else this._prePts=e.currentTime}},{key:"_onVideoRefresh",value:function(e,t){if(this._stallList||(this._stallList=[]),this._prePts){var r=t.presentationTime-this._prePts;this._stallList.push({playTime:t.presentationTime,timeUpdateInterval:Math.round(r)})}var n;(this._prePts=t.presentationTime,this._player)&&this._player.requestVideoFrameCallback(Iy(n=this._onVideoRefresh).call(n,this))}}]),e}();function IP(e){return PP.apply(this,arguments)}function PP(){return(PP=Tg(Rg().mark((function e(t){var r,n;return Rg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={},e.next=3,t;case 3:return n=e.sent,r.timestamp=GE(),null==n||ud(n).call(n,(function(e){"inbound-rtp"===e.type?(r.packetsLost=e.packetsLost,r.packetsReceived=e.packetsReceived,r.bytesReceived=e.bytesReceived,void 0!==e.jitterBufferDelay&&(r.jitterBufferDelay=e.jitterBufferDelay,r.jitterBufferEmittedCount=e.jitterBufferEmittedCount),void 0!==e.totalSamplesReceived&&(r.totalSamplesReceived=e.totalSamplesReceived,r.concealedSamples=e.concealedSamples,r.silentConcealedSamples=e.silentConcealedSamples,r.concealmentEvents=e.concealmentEvents),void 0!==e.fecPacketsReceived&&(r.fecPacketsReceived=e.fecPacketsReceived),void 0!==e.estimatedPlayoutTimestamp&&(r.estimatedPlayoutTimestamp=e.estimatedPlayoutTimestamp),void 0!==e.totalSamplesDuration&&(r.totalSamplesDuration=e.totalSamplesDuration)):"codec"===e.type?(r.recordSampleRate=e.clockRate,e.channels&&(r.numChannels=e.channels),r.codecType=e.mimeType):"candidate-pair"===e.type?(r.rtt=1e3*e.currentRoundTripTime,r.total_rtt=1e3*e.totalRoundTripTime):"track"===e.type&&void 0!==e.audioLevel||e.type})),e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function DP(e,t){var r=jP(e,t,"timestamp"),n=jP(e,t,"packetsLost"),i=Math.round(jP(e,t,"jitterBufferDelay")/jP(e,t,"jitterBufferEmittedCount")*1e3),o=jP(e,t,"packetsReceived");return{audioLossRate:+(n/(o+n)).toFixed(2),receivedKBitrate:+(8*jP(e,t,"bytesReceived")/r).toFixed(2),statsInterval:r,rtt:t.rtt||0,jitterBufferDelay:i,packetsReceived:o,numChannels:t.numChannels||1,estimatedPlayoutTimestamp:t.estimatedPlayoutTimestamp,samplesDuration:Math.round(1e3*jP(e,t,"totalSamplesDuration")),receivedSampleRate:jP(e,t,"totalSamplesReceived")/r,concealedSamples:Math.round(jP(e,t,"concealedSamples")),concealmentEvent:Math.round(jP(e,t,"concealmentEvents")),e2eDelay:Math.round((t.rtt||0)+i)}}function AP(e){return FP.apply(this,arguments)}function FP(){return(FP=Tg(Rg().mark((function e(t){var r,n;return Rg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={},e.next=3,t;case 3:return n=e.sent,r.timestamp=GE(),null==n||ud(n).call(n,(function(e){"inbound-rtp"===e.type?(r.packetsLost=e.packetsLost,r.packetsReceived=e.packetsReceived,r.bytesReceived=e.bytesReceived,r.framesDecoded=e.framesDecoded,r.totalDecodeTime=e.totalDecodeTime,r.framesReceived=e.framesReceived,r.keyFramesDecoded=e.keyFramesDecoded,r.framesDropped=e.framesDropped,r.firCount=e.firCount,r.nackCount=e.nackCount,r.pliCount=e.pliCount,void 0!==e.jitterBufferDelay&&(r.jitterBufferEmittedCount=e.jitterBufferEmittedCount,r.jitterBufferDelay=e.jitterBufferDelay),void 0!==e.frameWidth&&(r.width=e.frameWidth,r.height=e.frameHeight),void 0!==e.estimatedPlayoutTimestamp&&(r.estimatedPlayoutTimestamp=e.estimatedPlayoutTimestamp)):"track"===e.type&&void 0!==e.frameWidth?(r.width=e.frameWidth,r.height=e.frameHeight,void 0!==e.framesReceived&&(r.framesReceived=e.framesReceived)):"codec"===e.type?r.codecType=e.mimeType:"candidate-pair"===e.type&&(r.rtt=1e3*e.currentRoundTripTime,r.totalRtt=1e3*e.totalRoundTripTime)})),e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ZP(e,t){var r=jP(e,t,"timestamp"),n=jP(e,t,"packetsLost"),i=jP(e,t,"nackCount"),o=jP(e,t,"packetsReceived"),a=Math.round(jP(e,t,"jitterBufferDelay")/jP(e,t,"jitterBufferEmittedCount")*1e3),s=(t.width||0)*(t.height||0),l=(e.width||0)*(e.height||0);return{statsInterval:r,abrState:0===s||0===l?"none":s>l?"upgrade":s<l?"degrade":"none",width:t.width||0,height:t.height||0,estimatedPlayoutTimestamp:t.estimatedPlayoutTimestamp,videoLossRate:+(n/(jP(e,t,"packetsReceived")+n)).toFixed(2),receivedKBitrate:+(8*jP(e,t,"bytesReceived")/r).toFixed(2),decoderOutputFrameRate:Math.round(1e3*jP(e,t,"framesDecoded")/r),receivedFrameRate:Math.round(1e3*jP(e,t,"framesReceived")/r),rtt:t.rtt||0,totalRtt:Math.round(t.totalRtt||0),jitterBufferDelay:a,codecType:t.codecType,packetsReceived:o,avgDecodeDelay:Math.round(1e3*jP(e,t,"totalDecodeTime")/jP(e,t,"framesDecoded")),keyFramesDecoded:jP(e,t,"keyFramesDecoded"),framesDropped:jP(e,t,"framesDropped"),firCount:jP(e,t,"firCount"),nackCount:i,pliCount:jP(e,t,"pliCount"),e2eDelay:Math.round((t.rtt||0)+a),retransmittedRate:+(i/(o+n)).toFixed(2)}}function jP(e,t,r){var n=ck(e[r])?0:+e[r],i=ck(t[r])?0:+t[r];return Math.max(0,i-n)}var VP=1,WP=2,MP=3,NP=1,GP=2,HP=3,UP=4,XP=5,BP=6,KP=function(){function e(t,r){Eg(this,e),this._peer=t,this._networkQualityParams=r,this._preDownlinkStats=[]}return Lg(e,[{key:"getDownlinkQuality",value:function(e,t){if(0!==e.receivedKBitrate||0!==t.receivedKBitrate){if("connected"!==this._peer.connectionState&&"connecting"!==this._peer.connectionState||!navigator.onLine)return[BP,{}];var r,n,i,o=this._getQosLevel(e.rtt,e.audioLossRate,t.retransmittedRate),a=this._getDownlinkQoE("audio",e.stallDuration/e.statsInterval,e.e2eDelay),s=this._getNetworkQuality(o,a),l=this._getQosLevel(t.rtt,t.videoLossRate,t.retransmittedRate),u=this._getDownlinkQoE("video",t.stallDuration/t.statsInterval,t.e2eDelay),c=this._getNetworkQuality(l,u),d=s&&c?Math.ceil((s+c)/2):s||c,f=o&&l?Math.ceil((o+l)/2):o||l;if(d)return this._preDownlinkStats=hy(r=jR(n=[]).call(n,jg(this._preDownlinkStats),[d])).call(r,-2),[Math.floor(BO(i=this._preDownlinkStats).call(i,(function(e,t){return t+e}),0)/this._preDownlinkStats.length),{qualityQos:f,audioLevel:s,videoLevel:c,audioQos:o,audioQoe:a,videoQos:l,videoQoe:u}]}}},{key:"destroy",value:function(){this._preDownlinkStats=[]}},{key:"_getQosLevel",value:function(e,t,r){var n,i=this._networkQualityParams.networkQos;return n=(!e||e<=i[NP].maxRtt)&&t<=i[NP].maxLoss?NP:(!e||e<=i[GP].maxRtt)&&t<=i[GP].maxLoss?GP:(!e||e<=i[HP].maxRtt)&&t<=i[HP].maxLoss?HP:(!e||e<=i[UP].maxRtt)&&t<=i[UP].maxLoss?UP:XP,r>(i[UP].minRetransmittedRate||.5)?n=Math.max(n,UP):r>(i[HP].minRetransmittedRate||.35)?n=Math.max(n,HP):r>(i[GP].minRetransmittedRate||.2)&&(n=Math.max(n,GP)),n}},{key:"_getDownlinkQoE",value:function(e,t,r){var n=this._networkQualityParams.networkQoe,i={audio:{delay:n.audioDelay,stallRadio:n.audioStallRadio},video:{delay:n.videoDelay,stallRadio:n.videoStallRadio}}[e];return t>i.stallRadio||r>i.delay||t>i.stallRadio/2&&r>i.delay/2?MP:(t>i.stallRadio/2||i.delay,WP)}},{key:"_getNetworkQuality",value:function(e,t){return t===VP?Math.max(e-2,1):t===WP?e:Math.min(e+1,5)}}]),e}(),YP=[KI.LOAD_START,KI.OFFER_SDP_READY,KI.ANSWER_SDP_RECV,KI.ANSWER_SDP_READY,KI.ICE_CONNECTED,KI.DTLS_CONNECTED,KI.PEER_CONNECTED,KI.FIRST_PACKET_RECV,KI.FIRST_FRAME_RECV,KI.FIRST_FRAME_DECODED,KI.VIDEO_LOADEDDATA,KI.VIDEO_CANPLAY,KI.VIDEO_PLAYING],JP=function(){function e(t){var r=this;Eg(this,e),this._emitFirstFrameState=t,this._startConnectTs=0,this._firstVideoFrameInterval=null,this._preState=null,this._state={},this._pc=null,this._video=null,this._videoTransceiver=null,this._extraInfo={is_preload:!1},this._handleConnectionStateChange=function(){var e;"connected"===(null===(e=r._pc)||void 0===e?void 0:e.connectionState)&&r._videoTransceiver&&(r.changeFirstFrameState(KI.PEER_CONNECTED),r._watchForFirstVideoFrameRecv(r._videoTransceiver))},this._handleICEConnectionStateChange=function(){var e;"connected"===(null===(e=r._pc)||void 0===e?void 0:e.iceConnectionState)&&r.changeFirstFrameState(KI.ICE_CONNECTED)},this._handlePlaying=function(){r._state[KI.PEER_CONNECTED]&&(r.changeFirstFrameState(KI.VIDEO_PLAYING),r.reset())},this._handleCanplay=function(){r._state[KI.PEER_CONNECTED]&&r.changeFirstFrameState(KI.VIDEO_CANPLAY)},this._handleLoadeddata=function(){r._state[KI.PEER_CONNECTED]&&r.changeFirstFrameState(KI.VIDEO_LOADEDDATA)},this._handleError=function(){r.reset()}}return Lg(e,[{key:"start",value:function(){this.reset(),this._startConnectTs=GE(),this.changeFirstFrameState(KI.LOAD_START)}},{key:"changeFirstFrameState",value:function(e){var t,r,n=this,i=null!==(t=this._preState&&rg(YP).call(YP,this._preState))&&void 0!==t?t:-1,o=rg(YP).call(YP,e),a=GE()-this._startConnectTs;o>i&&(ud(r=hy(YP).call(YP,i+1,o+1)).call(r,(function(e){n._state[e]=a})),this._preState=e)}},{key:"setIsPreload",value:function(e){this._extraInfo.is_preload=e}},{key:"setFailureReason",value:function(e){this._extraInfo.failure_reason=e}},{key:"bindEvents",value:function(e,t,r){var n=this;this._pc=e,this._video=r,this._videoTransceiver=t,e.addEventListener("connectionstatechange",this._handleConnectionStateChange),e.addEventListener("iceconnectionstatechange",this._handleICEConnectionStateChange);var i=((null==t?void 0:t.receiver)||{}).transport;i&&(i.onstatechange=function(){"connected"===i.state&&n.changeFirstFrameState(KI.DTLS_CONNECTED)}),null==r||r.addEventListener("playing",this._handlePlaying),null==r||r.addEventListener("canplay",this._handleCanplay),null==r||r.addEventListener("loadeddata",this._handleLoadeddata),null==r||r.addEventListener("error",this._handleError)}},{key:"_watchForFirstVideoFrameRecv",value:function(e){var t=this,r=!1,n=!1,i=!1;this._cancelWatchForFirstVideoFrameRecv(),this._firstVideoFrameInterval=AT(Tg(Rg().mark((function o(){var a,s,l,u,c,d;return Rg().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return u=e.receiver,o.next=3,u.getStats();case 3:c=o.sent,ud(c).call(c,(function(e){"inbound-rtp"===e.type&&(d=e)})),!r&&null!==(a=d)&&void 0!==a&&a.packetsReceived&&d.packetsReceived>0&&(r=!0,t.changeFirstFrameState(KI.FIRST_PACKET_RECV)),!n&&null!==(s=d)&&void 0!==s&&s.framesReceived&&d.framesReceived>0&&(n=!0,t.changeFirstFrameState(KI.FIRST_FRAME_RECV)),!i&&null!==(l=d)&&void 0!==l&&l.framesDecoded&&d.framesDecoded>0&&(i=!0,t.changeFirstFrameState(KI.FIRST_FRAME_DECODED),t._cancelWatchForFirstVideoFrameRecv());case 8:case"end":return o.stop()}}),o)}))),200)}},{key:"_cancelWatchForFirstVideoFrameRecv",value:function(){this._firstVideoFrameInterval&&(window.clearInterval(this._firstVideoFrameInterval),this._firstVideoFrameInterval=null)}},{key:"reset",value:function(){var e,t,r,n,i,o,a=this;if(Dc(this._state).length>0){var s=Sg({},this._state),l=Sg({},this._extraInfo);zP(this._videoTransceiver,l).then((function(){a._emitFirstFrameState(s,l)}))}this._preState=null,this._extraInfo={is_preload:!1},this._state={},null===(e=this._video)||void 0===e||e.removeEventListener("playing",this._handlePlaying),null===(t=this._video)||void 0===t||t.removeEventListener("canplay",this._handleCanplay),null===(r=this._video)||void 0===r||r.removeEventListener("loadeddata",this._handleLoadeddata),null===(n=this._video)||void 0===n||n.removeEventListener("error",this._handleError),null===(i=this._pc)||void 0===i||i.removeEventListener("connectionstatechange",this._handleConnectionStateChange),null===(o=this._pc)||void 0===o||o.removeEventListener("iceconnectionstatechange",this._handleICEConnectionStateChange),this._cancelWatchForFirstVideoFrameRecv(),this._pc=null,this._video=null,this._videoTransceiver=null}}]),e}(),zP=function(){var e=Tg(Rg().mark((function e(t,r){var n,i,o,a,s;return Rg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null==t||null===(n=t.receiver)||void 0===n?void 0:n.getStats().catch((function(){}));case 2:null==(i=e.sent)||ud(i).call(i,(function(e){"candidate-pair"===e.type&&(o=e,a=i.get(e.localCandidateId),s=i.get(e.remoteCandidateId))})),s&&(r.remote_ip=s.ip||s.address,r.remote_port=s.port,r.remote_candidate_type=s.candidateType,r.protocol=s.protocol),a&&(r.local_ip=a.ip||a.address,r.local_port=a.port,r.local_candidate_type=a.candidateType),o&&(r.rtt=o.currentRoundTripTime,r.stun_requests_sent=o.requestsSent,r.stun_requests_received=o.requestsReceived,r.stun_responses_sent=o.responsesSent,r.stun_responses_received=o.responsesReceived);case 7:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),QP=r(te.URLSearchParams);function qP(e,t){var r,n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if("string"!=typeof e||"string"!=typeof t)return!1;Lx(e).call(e,"://")||(e=window.location.protocol+"//"+e),Lx(t).call(t,"://")||(t=window.location.protocol+"//"+t);try{r=new RR(e),n=new RR(t)}catch(l){return!1}if(r.host+r.pathname!==n.host+n.pathname)return!1;var o,a=function(e,t){var r=void 0!==Rc&&Oc(e)||e["@@iterator"];if(!r){if(ng(e)||(r=Vg(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(i);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(r.searchParams.get(s)!==n.searchParams.get(s))return!1}}catch(u){a.e(u)}finally{a.f()}return!0}function $P(e,t){var r;if(!t||0===Dc(t).length)return e;var n=Lx(e).call(e,"?")?new QP(e.split("?")[1]):new QP;return ud(r=Dc(t)).call(r,(function(e){n.set(e,t[e])})),e.split("?")[0]+"?"+n.toString()}function eD(e){return"number"==typeof e&&e>0}var tD=function(){function e(){var t=this;Eg(this,e),this._onVideoRefresh=function(e,r){var n;t._recentVideoInfo=r,t._requestVideoFrameCallbackTimer=null===(n=t._domElement)||void 0===n?void 0:n.requestVideoFrameCallback(t._onVideoRefresh)}}return Lg(e,[{key:"start",value:function(e){var t,r=this;(this._domElement=e,"function"==typeof HTMLVideoElement.prototype.requestVideoFrameCallback)&&(e&&(this._requestVideoFrameCallbackTimer=e.requestVideoFrameCallback(Iy(t=this._onVideoRefresh).call(t,this)),this._removeHandler=function(){r._requestVideoFrameCallbackTimer&&(null==e||e.cancelVideoFrameCallback(r._requestVideoFrameCallbackTimer))}))}},{key:"stop",value:function(){var e;delete this._recentVideoInfo,delete this._domElement,null===(e=this._removeHandler)||void 0===e||e.call(this),delete this._removeHandler}},{key:"getRecentRenderInfo4Report",value:function(){var e,t=this,r={};this._recentVideoInfo&&ud(e=Dc(this._recentVideoInfo)).call(e,(function(e){var n,i=e.replace(/[a-z]{1}[A-Z]{1}/g,(function(e){var t;return jR(t="".concat(e[0],"_")).call(t,e[1].toLowerCase())}));r["video_".concat(i)]=null===(n=t._recentVideoInfo)||void 0===n?void 0:n[e]}));return r}}]),e}(),rD=new fI("rts"),nD=function(e){Og(s,e);var t,r,n,i,o,a=Fg(s);function s(e){var t,r;return Eg(this,s),(r=a.call(this))._url="",r._pc=null,r._audioTransceicer=null,r._videoTransceicer=null,r._mediaStream=null,r._lastMediaStream=null,r._loader=null,r._networkEvaluate=null,r._retry=0,r._player=null,r._waitingTimer=0,r._rctConnectStartTs=0,r._isReplacing=!1,r._firstFrameObserver=new JP(Iy(t=r._emitFirstFrameState).call(t,Ag(r))),r._audio=null,r._video=null,r._preAudioStats=null,r._preVideoStats=null,r._rtcReportTimer=null,r._networkQualityResult=[],r._videoJitterBufferDelay=0,r._checkStatsError=Tg(Rg().mark((function e(){return Rg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r._checkStatsErrorTimer&&clearTimeout(r._checkStatsErrorTimer),r._checkStatsErrorTimer=o_(Tg(Rg().mark((function e(){var t,n,i,o,a;return Rg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.getStatsSnapshoot();case 2:a=e.sent,eD(null===(t=a.video)||void 0===t?void 0:t.bytesReceived)||eD(null===(n=a.audio)||void 0===n?void 0:n.bytesReceived)||r._emitError(aI.create(eI,iI.MEDIA_ERR_DECODE,{message:"rts receive empty"})),eD(null===(i=a.video)||void 0===i?void 0:i.bytesReceived)&&!eD(null===(o=a.video)||void 0===o?void 0:o.framesDecoded)&&r._emitError(aI.create(eI,iI.MEDIA_ERR_DECODE,{message:"rts decode error"}));case 5:case"end":return e.stop()}}),e)}))),r._opts.checkStatsErrorDelay);case 2:case"end":return e.stop()}}),e)}))),r._onTrack=function(e){rD.log("addTrack: ",e.track,e.streams),"audio"===e.track.kind?r._audio=e.track:r._video=e.track},r._mockWaitingByTimeupdate=function(){var e,t;"connected"!==(null===(e=r._pc)||void 0===e?void 0:e.connectionState)&&"connected"!==(null===(t=r._pc)||void 0===t?void 0:t.iceConnectionState)||(clearTimeout(r._waitingTimer),r._waitingTimer=o_((function(){var e;null!==(e=r._player)&&void 0!==e&&e.paused||r.emit("waiting")}),r._opts.stallInterval))},r._onLoadedData=function(){rD.log("loadeddata emit"),r.getStatsSnapshoot().then((function(e){r.emit(FI,{type:"video",elapsed:GE()-r._rctConnectStartTs,meta:e.video}),r.emit(FI,{type:"audio",elapsed:GE()-r._rctConnectStartTs,meta:e.audio})}))},r._setDelay=function(e){if(r._opts.progressiveSetDelay)r._startSetDelayLoop(e);else{var t,n,i=PR(t=["playoutDelayHint","jitterBufferDelayHint","jitterBufferTarget"]).call(t,(function(e){var t,n;return e in((null===(t=r._audioTransceicer)||void 0===t?void 0:t.receiver)||{})&&e in((null===(n=r._videoTransceicer)||void 0===n?void 0:n.receiver)||{})}));if(!i)return;if(e="number"==typeof e&&e>0?e:null,(null===(n=r._audioTransceicer)||void 0===n?void 0:n.receiver[i])===e)return;r._audioTransceicer.receiver[i]=e,r._videoTransceicer.receiver[i]=e}},r._targetDelayHint=null,r._setDelayError=null,r._startSetDelayLoop=function(){var e=Tg(Rg().mark((function e(t){var n,i,o,a,s,l,u,c,d;return Rg().wrap((function(e){for(var f;;)switch(e.prev=e.next){case 0:if(n=PR(f=["playoutDelayHint","jitterBufferDelayHint","jitterBufferTarget"]).call(f,(function(e){var t,n;return e in((null===(t=r._audioTransceicer)||void 0===t?void 0:t.receiver)||{})&&e in((null===(n=r._videoTransceicer)||void 0===n?void 0:n.receiver)||{})}))){e.next=3;break}return e.abrupt("return");case 3:if(t="number"==typeof t&&t>0?t:null,r._targetDelayHint!==t){e.next=6;break}return e.abrupt("return");case 6:if(rD.log("_startSetDelayLoop()","invoked, delayHint: ".concat(t)),r._targetDelayHint=t,!r._setDelayTimer){e.next=10;break}return e.abrupt("return");case 10:i=null,o=null,a=r._opts.adaptiveJitterBuffer,s=a.loopInterval,l=a.maxAvSyncDelay,u=a.maxJitterBufferDiff,c=a.maxStep,d=0,r._setDelayTimer=AT(Tg(Rg().mark((function e(){var t,a,s,f,p,h,v,m,y,g,_,b,w,S,R,k;return Rg().wrap((function(e){for(var T,E,x,L,C;;)switch(e.prev=e.next){case 0:if(e.prev=0,null!==(t=r._audioTransceicer)&&void 0!==t&&t.receiver&&null!==(a=r._videoTransceicer)&&void 0!==a&&a.receiver){e.next=5;break}return i=null,o=null,e.abrupt("return");case 5:if((s=r._audioTransceicer.receiver[n])!==r._targetDelayHint){e.next=8;break}return e.abrupt("return");case 8:return f=1e3*(r._targetDelayHint||0),p=1e3*s,e.next=12,Mm.all([IP(r._audioTransceicer.receiver.getStats()),AP(r._videoTransceicer.receiver.getStats())]);case 12:if(h=e.sent,v=Zg(h,2),m=v[0],y=v[1],!i||!o){e.next=36;break}if(g=DP(i,m),(_=ZP(o,y)).estimatedPlayoutTimestamp&&g.estimatedPlayoutTimestamp&&(b=_.estimatedPlayoutTimestamp-g.estimatedPlayoutTimestamp),w=g.jitterBufferDelay,S=_.jitterBufferDelay,!w||!S){e.next=36;break}if(!(Math.abs(w-S)>l||b&&Math.abs(b)>l)){e.next=27;break}return d++>8&&S>w&&(r._audioTransceicer.receiver[n]=Math.min(S/1e3,r._targetDelayHint||0),d=0),rD.log(jR(T=jR(E=jR(x="av_jb_diff(".concat(w-S,"=")).call(x,w,"-")).call(E,S,") or av_sync_diff(")).call(T,b,") too much, skip setting")),e.abrupt("return");case 27:if(d=0,null===s||!(Math.abs(w-p)>u||Math.abs(S-p)>u)){e.next=31;break}return rD.log(jR(L="audio(".concat(w-p,"),video(")).call(L,S-p,"). current_target_diff too much, skip setting")),e.abrupt("return");case 31:R=f>(p||w)?1:-1,k=(k=(Math.abs(f-(p||w))>c?(p||w)+R*c:f)/1e3)>.2?k:null,rD.log(jR(C="set receiver.".concat(n," = ")).call(C,k)),r._audioTransceicer.receiver[n]=k;case 36:i=m,o=y,e.next=44;break;case 40:e.prev=40,e.t0=e.catch(0),rD.error("set delay loop error:",e.t0),r._setDelayError=e.t0.message||e.t0.toString()||"unknown error";case 44:case"end":return e.stop()}}),e,null,[[0,40]])}))),s);case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),r._getDelay=function(){try{var e,t,n=PR(e=["playoutDelayHint","jitterBufferDelayHint","jitterBufferTarget"]).call(e,(function(e){var t,n;return e in((null===(t=r._videoTransceicer)||void 0===t?void 0:t.receiver)||{})&&e in((null===(n=r._audioTransceicer)||void 0===n?void 0:n.receiver)||{})}));if(!n)return;return null===(t=r._audioTransceicer)||void 0===t?void 0:t.receiver[n]}catch(aD){rD.error("get delay error")}},r._onLoaderRetry=function(e,t){console.log(e,"retryTime",t),r.emit(AI,{error:aI.network(e),retryTime:t})},r._opts=function(e){var t=e||{},r=t.adaptiveJitterBuffer,n=void 0===r?{}:r,i=Dg(t,sP);return Sg({retryCount:0,retryDelay:1e3,loadTimeout:5e3,stallInterval:400,networkEvaluateInterval:1e3,delayHint:0,videoDelaySync:!1,seamlesslyReload:!1,enableSei:!1,enableOriginSdpLogger:!1,checkStatsErrorDelay:5e3,connectionStateChangeTimeout:5e3,enableNetworkQuality:!0,hackCreateOfferIssue:!1,progressiveSetDelay:!1,networkQuality:{networkQos:{1:{maxRtt:250,maxLoss:.15},2:{maxRtt:500,maxLoss:.3,minRetransmittedRate:.2},3:{maxRtt:750,maxLoss:.45,minRetransmittedRate:.35},4:{maxRtt:1e3,maxLoss:.6,minRetransmittedRate:.5}},networkQoe:{audioDelay:2e3,audioStallRadio:.3,videoDelay:2e3,videoStallRadio:.6}},enableAdaptiveJitterBuffer:!1,adaptiveJitterBuffer:Sg({networkWindow:3,windowMethod:"max",loopInterval:500,maxAvSyncDelay:400,maxJitterBufferDiff:500,maxStep:500},n),networkStrategy:{1:{jitterBuffer:null},2:{jitterBuffer:1.5},3:{jitterBuffer:2},4:{jitterBuffer:3},5:{jitterBuffer:3}}},i)}(e),r._media=r._opts.media,r._player=r._opts.player||null,r._loader=new XI(Sg(Sg({},e.fetchOptions),{},{responseType:"json",method:"POST",retry:r._opts.retryCount,retryDelay:r._opts.retryDelay,timeout:r._opts.loadTimeout,onRetryError:r._onLoaderRetry,logger:rD})),r._retry=r._opts.retryCount||0,r._preloadPromise=r._opts.preloadPromise,r._bindMediaEvent(),rD.log("constructor()",e),r._changeVolumeInHarmonyWorkaround(),r._mutedBeforePlayingWorkaround(),r._opts.mediaStream&&r._opts.seamlesslyReload&&(r._lastMediaStream=r._opts.mediaStream),r}return Lg(s,[{key:"pc",get:function(){return this._pc}},{key:"audioTrack",get:function(){return this._audio}},{key:"videoTack",get:function(){return this._video}},{key:"getJitterBufferDelay",value:function(){return this._videoJitterBufferDelay}},{key:"loader",get:function(){return this._loader}},{key:"networkStats",get:function(){var e;return null===(e=this._networkEvaluate)||void 0===e?void 0:e.getStats()}},{key:"getStats",value:(o=Tg(Rg().mark((function e(){return Rg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",lP(this._pc));case 1:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"getStatsSnapshoot",value:function(){return this.getStats().then((function(e){return cP(e)}))}},{key:"load",value:(i=Tg(Rg().mark((function e(t,r){var n,i,o,a,s,l,u=this;return Rg().wrap((function(e){for(var c;;)switch(e.prev=e.next){case 0:if(rD.log("load()",'invoked, url: "'.concat(t,'"')),this._disconnect(r||"invoke load"),this._url=t,n=this._pc,!this._opts.hackCreateOfferIssue){e.next=7;break}return e.next=7,this._createEmptyPeer();case 7:if(e.prev=7,this._firstFrameObserver.start(),!this._preloadPromise){e.next=38;break}if(rD.log("load()","in preload process..."),e.prev=11,this._firstFrameObserver.setIsPreload(!0),qP(this._url,this._preloadPromise.url,["tabr_start_bitrate"])){e.next=17;break}throw o=jR(c="preload url not match, current url: ".concat(this._url,", preload url: ")).call(c,this._preloadPromise.url),delete this._preloadPromise,new Error(o);case 17:return a=this._preloadPromise.promise,delete this._preloadPromise,e.next=21,a;case 21:if("have-local-offer"===(s=e.sent).pc.signalingState){e.next=24;break}throw new Error('pc.signalingState not equal "have-local-offer", current state is '.concat(s.pc.signalingState));case 24:this._pc=s.pc,i=s.answerSdp,this._videoTransceicer=s.videoTransceiver,this._audioTransceicer=s.audioTransceiver,this._opts.enableSei&&(this.initVideoEncodedTransform(),this.initAudioEncodedTransform()),e.next=36;break;case 31:return e.prev=31,e.t0=e.catch(11),rD.warn("load()","preload failed, ".concat(e.t0.message||e.t0.toString())),this.load(t,e.t0.message||e.t0.toString()),e.abrupt("return");case 36:e.next=44;break;case 38:return l=vP(),rD.log("load()","isLegacyEncodedTransformSupported: ".concat(l)),this._pc=new RTCPeerConnection({encodedInsertableStreams:!(!l||!this._opts.enableSei)||void 0}),e.next=43,this._getAnswerSdp(this._pc);case 43:i=e.sent;case 44:return this._bindRTCEvents(this._pc),e.next=47,this._handleAnswerSdp(this._pc,i);case 47:n&&n.close(),e.next=53;break;case 50:e.prev=50,e.t1=e.catch(7),o_((function(){return u._emitError(aI.create(rI,null,e.t1))}));case 53:case"end":return e.stop()}}),e,this,[[7,50],[11,31]])}))),function(e,t){return i.apply(this,arguments)})},{key:"switchURL",value:function(e){rD.log("switchURL()",'invoked, url: "'.concat(e,'"')),this.load(e||this._url,"invoke switchURL")}},{key:"_bindRTCEvents",value:function(e){var t=this;e.addEventListener("track",this._onTrack);var r=!0;e.addEventListener("connectionstatechange",(function(){if(rD.warn("onconnectionstatechange:",e.connectionState),t._clearPeerStateTimeout(),t.emit(BI.RTC_STATE_CHANGE,{state:e.connectionState,url:t._url}),"failed"===e.connectionState){var n,i,o=eD(null===(n=t._preAudioStats)||void 0===n?void 0:n.bytesReceived)&&!eD(null===(i=t._preVideoStats)||void 0===i?void 0:i.bytesReceived)?"rtc connect failed(only audio)":"rtc connect failed";if(0===t._retry)return void t._emitError(aI.network(new Error(o)));t._retry--,t.load(t._url,o)}"disconnected"!==e.connectionState&&"failed"!==e.connectionState||(t.emit("waiting"),t._stopRtcReport()),"connected"===e.connectionState&&(r&&(r=!1,t._handleMediaStream(),t.emit(OI,{url:t._url,responseUrl:t._url,elapsed:GE()-t._rctConnectStartTs}),t._checkStatsError()),t._startRtcReport())}))}},{key:"_handleMediaStream",value:function(){var e=this;if(this._lastMediaStream){var t,r,n,i=this._lastMediaStream.getVideoTracks()[0],o=this._lastMediaStream.getAudioTracks()[0];i&&this._lastMediaStream.removeTrack(i),o&&this._lastMediaStream.removeTrack(o),this._mediaStream=this._lastMediaStream,this._audio&&this._mediaStream.addTrack(this._audio),this._video&&this._mediaStream.addTrack(this._video),this._isReplacing=!0,null===(t=this._player)||void 0===t||t.pause(),null===(r=this._player)||void 0===r||null===(n=r.play())||void 0===n||n.finally((function(){e._isReplacing=!1}))}else this._mediaStream=new MediaStream,this._audio&&this._mediaStream.addTrack(this._audio),this._video&&this._mediaStream.addTrack(this._video),this._media&&(this._media.srcObject=this._mediaStream)}},{key:"initVideoEncodedTransform",value:function(){var e=this;if(this._videoTransceicer&&this._videoTransceicer.receiver){var t=this._videoTransceicer.receiver;if(vP()){var r=t.createEncodedStreams(),n=r.readable,i=r.writable;n.pipeThrough(wP((function(t){e.emit(ZI,t)}))).pipeTo(i)}else if("undefined"!=typeof TransformStream&&"undefined"!=typeof RTCRtpSender&&"undefined"!=typeof RTCRtpReceiver&&"undefined"!=typeof RTCRtpScriptTransform&&"transform"in RTCRtpSender.prototype&&"transform"in RTCRtpReceiver.prototype&&pP()&&hP()){var o=new kP,a=new MessageChannel;this._videoTransceicer.receiver.transform=new RTCRtpScriptTransform(o,{port:a.port2},[a.port2]),a.port1.onmessage=function(t){e.emit(ZI,t.data)}}}else console.log("no receiver found when trying to bind encodedTransform")}},{key:"initAudioEncodedTransform",value:function(){if(this._audioTransceicer&&this._audioTransceicer.receiver)if(vP()){var e=this._audioTransceicer.receiver.createEncodedStreams(),t=e.readable,r=e.writable;t.pipeThrough(new TransformStream({transform:function(e,t){e.data.byteLength<=1e3?t.enqueue(e):rD.log("too large audio frame",e.data.byteLength)}})).pipeTo(r)}else rD.warn("legacy EncodedTransform is not supported");else rD.warn("no receiver found when trying to bind encodedTransform")}},{key:"_bindMediaEvent",value:function(){var e,t;null===(e=this._media)||void 0===e||e.addEventListener("timeupdate",this._mockWaitingByTimeupdate),null===(t=this._media)||void 0===t||t.addEventListener("loadeddata",this._onLoadedData)}},{key:"_getAnswerSdp",value:(n=Tg(Rg().mark((function e(t){var r,n,i,o,a,s,l,u,c,d,f,p,h,v;return Rg().wrap((function(e){for(var m,y,g,_,b;;)switch(e.prev=e.next){case 0:if(rD.log("_getAnswerSdp()"),!t.addTransceiver){e.next=11;break}return this._audioTransceicer=t.addTransceiver("audio",{direction:"recvonly"}),this._videoTransceicer=t.addTransceiver("video",{direction:"recvonly"}),this._setDelay(this._opts.delayHint||null),this._opts.enableSei&&(this.initVideoEncodedTransform(),this.initAudioEncodedTransform()),e.next=8,t.createOffer();case 8:r=e.sent,e.next=14;break;case 11:return e.next=13,t.createOffer({iceRestart:!0,offerToReceiveAudio:!0,offerToReceiveVideo:!0});case 13:r=e.sent;case 14:if(this._opts.hackCreateOfferIssue&&this._createEmptyPeer(),rD.log("local offer",r),r.sdp){e.next=18;break}throw new Error("create offer failed");case 18:return i=YI.parse(r.sdp),ud(m=Gc(y=i.media).call(y,(function(e){return"audio"===e.type}))).call(m,(function(e){var t,r,n,i,o=null===(n=Gc(t=e.rtp).call(t,(function(e){return"opus"===e.codec}))[0])||void 0===n?void 0:n.payload;o&&(ud(r=e.fmtp).call(r,(function(e){e.payload===o&&(e.config="minptime=10;stereo=1;useinbandfec=1")})),null===(i=e.rtcpFb)||void 0===i||i.push({payload:o,type:"nack"}))})),ud(g=Gc(_=i.media).call(_,(function(e){return"video"===e.type}))).call(g,(function(e){var t;ud(t=e.fmtp).call(t,(function(e){var t;-1!==rg(t=e.config).call(t,"profile-level-id")&&(e.config="".concat(e.config,";sps-pps-idr-in-keyframe=1"))}))})),r.sdp=YI.write(i),rD.log("local offer modified:\n",r),e.next=25,t.setLocalDescription(r);case 25:return o=this._url,e.prev=26,this._opts.preProcessUrl&&(o=this._opts.preProcessUrl(o).url),o=$P(o,this._opts.urlParams),this._loader&&(this._loader.finnalUrl=o),c=/_?session_id=([^&$]+)/.exec(o),d=c?c[1]:GE()+"666",this._firstFrameObserver.changeFirstFrameState(KI.OFFER_SDP_READY),this.emit(II,{url:o,offersdp:null!==(a=this._opts)&&void 0!==a&&a.enableOriginSdpLogger?r.sdp:void 0,sessionId:d}),f=GE(),e.next=37,null===(s=this._loader)||void 0===s?void 0:s.load(o,{body:px({sessionId:d,version:"1.0-html",localSdp:r})});case 37:if(p=e.sent,this.emit(PI,{headers:p.response.headers}),404!==(null==(h=null==p?void 0:p.data)?void 0:h.code)&&403!==(null==h?void 0:h.code)){e.next=45;break}return(v=aI.create(404===h.code?zO:JO,null,h)).errorType=KO,this._emitError(v),e.abrupt("return");case 45:if(200===(null==h?void 0:h.code)){e.next=47;break}throw new Error(jR(b="code: ".concat(null==h?void 0:h.code,", message:")).call(b,null==h?void 0:h.message));case 47:n=p.data.remoteSdp.sdp,this.emit(DI,{url:o,elapsed:GE()-f,answersdp:null!==(l=this._opts)&&void 0!==l&&l.enableOriginSdpLogger?n:void 0,parsedSdp:null==i||null===(u=i.media)||void 0===u?void 0:Vk(u).call(u,(function(e){return{candidates:e.candidates,rtp:e.rtp,type:e.type}}))}),e.next=54;break;case 51:e.prev=51,e.t0=e.catch(26),this._emitError(aI.network(e.t0));case 54:return e.abrupt("return",n);case 55:case"end":return e.stop()}}),e,this,[[26,51]])}))),function(e){return n.apply(this,arguments)})},{key:"_handleAnswerSdp",value:(r=Tg(Rg().mark((function e(t,r){var n,i;return Rg().wrap((function(e){for(var o;;)switch(e.prev=e.next){case 0:if(rD.log("_handleAnswerSdp()","invoked, answerSdp:",{answerSdp:r}),r){e.next=3;break}return e.abrupt("return");case 3:if(this._firstFrameObserver.changeFirstFrameState(KI.ANSWER_SDP_RECV),n=YI.parse(r),ud(o=n.media).call(o,(function(e){var t,r;e.fingerprint&&(e.fingerprint.hash=e.fingerprint.hash.toUpperCase());var n=null===(t=e.ssrcs)||void 0===t||null===(r=PR(t).call(t,(function(e){return"msid"===e.attribute})))||void 0===r?void 0:r.value;n&&!e.msid&&(e.msid=n)})),i=YI.write(n),rD.log("answer modified:\n",{answer:i}),this._rctConnectStartTs=GE(),"closed"!==t.signalingState){e.next=11;break}return e.abrupt("return");case 11:return e.next=13,t.setRemoteDescription({type:"answer",sdp:i});case 13:this._firstFrameObserver.changeFirstFrameState(KI.ANSWER_SDP_READY),this._networkEvaluate=new dP(t,this._opts.networkEvaluateInterval),this._listenPeerStateTimeout(),this._firstFrameObserver.bindEvents(t,this._videoTransceicer,this._media);case 17:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"_listenPeerStateTimeout",value:function(){var e=this;this._clearPeerStateTimeout(),this._opts.connectionStateChangeTimeout&&(this._peerStateTimer=o_((function(){e._emitError(aI.create(eI,iI.MEDIA_ERR_SRC_NOT_SUPPORTED,{message:"listen connectionstatechange timeout"}))}),this._opts.connectionStateChangeTimeout))}},{key:"_clearPeerStateTimeout",value:function(){this._peerStateTimer&&(clearTimeout(this._peerStateTimer),delete this._peerStateTimer)}},{key:"_startRtcReport",value:function(){var e=this;this._stopRtcReport();var t=function(){var t=Tg(Rg().mark((function t(){var r,n,i,o,a,s,l,u,c,d,f,p,h,v,m,y,g,_,b,w,S,R,k,T,E,x,L;return Rg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!==(r=e._audioTransceicer)&&void 0!==r&&r.receiver&&null!==(n=e._videoTransceicer)&&void 0!==n&&n.receiver){t.next=4;break}return e._preAudioStats=null,e._preVideoStats=null,t.abrupt("return");case 4:return!e._audioStallObserver&&e._audioTransceicer&&(e._audioStallObserver=new EP,e._audioStallObserver.start(e._audioTransceicer)),!e._videoStallObserver&&e._video&&e._media&&(e._videoStallObserver=new OP,e._videoStallObserver.start(e._media)),!e._frameRecvCallback&&e._media&&(e._frameRecvCallback=new tD,null===(i=e._frameRecvCallback)||void 0===i||i.start(e._media)),e._pc&&!e._networkQuality&&e._opts.enableNetworkQuality&&e._opts.networkQuality&&(e._networkQuality=new KP(e._pc,e._opts.networkQuality)),t.next=10,Mm.all([IP(e._audioTransceicer.receiver.getStats()),AP(e._videoTransceicer.receiver.getStats())]);case 10:if(o=t.sent,a=Zg(o,2),s=a[0],l=a[1],!e._preAudioStats||!e._preVideoStats){t.next=28;break}return b=DP(e._preAudioStats,s),w=ZP(e._preVideoStats,l),e._videoJitterBufferDelay=w.jitterBufferDelay,t.next=20,null===(u=e._audioStallObserver)||void 0===u?void 0:u.getAudioStallInfo();case 20:return S=t.sent,t.next=23,null===(c=e._videoStallObserver)||void 0===c?void 0:c.getStallInfo({interval:w.statsInterval,frameRateReceived:w.receivedFrameRate,frameRateDecoded:w.decoderOutputFrameRate,bitrate:w.receivedKBitrate});case 23:R=t.sent,k=null!==(d=null===(f=e._networkQuality)||void 0===f?void 0:f.getDownlinkQuality(Sg(Sg({},b),{},{stallDuration:(null==S?void 0:S.stallDuration)||0}),Sg(Sg({},w),{},{stallDuration:(null==R?void 0:R.stall.stallDuration100ms)||(null==R?void 0:R.stall.stallDuration500ms)||0})))&&void 0!==d?d:[],T=Zg(k,2),E=T[0],x=T[1],e._opts.enableAdaptiveJitterBuffer&&e._handleJitterBuffer(null==x?void 0:x.qualityQos,e._opts.adaptiveJitterBuffer,e._opts.networkStrategy),w.estimatedPlayoutTimestamp&&b.estimatedPlayoutTimestamp&&(L=w.estimatedPlayoutTimestamp-b.estimatedPlayoutTimestamp),e.emit(BI.RTC_NETWORK,Sg({interval:w.statsInterval,network_quality:E,audio_stall_duration:null==S?void 0:S.stallDuration,audio_stall_count:null==S?void 0:S.stallCount,audio_stall_time_per_100sec:((null==S?void 0:S.stallDuration)||0)/b.statsInterval*100,audio_stall_count_per_100sec:((null==S?void 0:S.stallCount)||0)/b.statsInterval*100*1e3,video_stall_duration:null==R?void 0:R.stall.stallDuration500ms,video_stall_count:null==R?void 0:R.stall.stallCount500ms,video_stall_duration_100ms:null==R?void 0:R.stall.stallDuration100ms,video_stall_count_100ms:null==R?void 0:R.stall.stallCount100ms,video_stall_time_per_100sec:((null==R?void 0:R.stall.stallDuration500ms)||0)/w.statsInterval*100,video_stall_count_per_100sec:((null==R?void 0:R.stall.stallCount500ms)||0)/w.statsInterval*100*1e3,rtt:w.rtt,video_jb_delay:w.jitterBufferDelay,audio_jb_delay:b.jitterBufferDelay,audio_lost_rate:b.audioLossRate,video_lost_rate:w.videoLossRate,video_retransmitted_rate:w.retransmittedRate,quality_audio_level:null==x?void 0:x.audioLevel,quality_video_level:null==x?void 0:x.videoLevel,quality_audio_qos:null==x?void 0:x.audioQos,quality_video_qos:null==x?void 0:x.videoQos,quality_qos:null==x?void 0:x.qualityQos,quality_audio_qoe:null==x?void 0:x.audioQoe,quality_video_qoe:null==x?void 0:x.videoQoe,current_delay:e._getDelay(),visibility_state:document.visibilityState,target_delay:e._targetDelayHint,av_sync_diff:L,set_delay_error:e._setDelayError||null,video_width:(null===(p=e._media)||void 0===p?void 0:p.videoWidth)||0,video_height:(null===(h=e._media)||void 0===h?void 0:h.videoHeight)||0,abr_state:w.abrState||"none",recv_frame_rate:w.receivedFrameRate,decode_frame_rate:w.decoderOutputFrameRate,pli:w.pliCount,drop_frame_rate:w.framesDropped,audio_packets_received:b.packetsReceived,video_packets_received:w.packetsReceived,video_muted:null===(v=e._media)||void 0===v?void 0:v.muted,video_paused:null===(m=e._media)||void 0===m?void 0:m.paused,video_volume:null===(y=e._media)||void 0===y?void 0:y.volume,video_current_time:null===(g=e._media)||void 0===g?void 0:g.currentTime},(null===(_=e._frameRecvCallback)||void 0===_?void 0:_.getRecentRenderInfo4Report())||{}));case 28:e._preAudioStats=s,e._preVideoStats=l,e._setDelayError=null;case 31:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();this._rtcReportTimer=AT((function(){return t()}),2e3),t()}},{key:"_handleJitterBuffer",value:function(e,t,r){var n;if(t&&r){this._networkQualityResult.push(e),this._networkQualityResult.length>t.networkWindow&&this._networkQualityResult.shift();var i=Gc(n=this._networkQualityResult).call(n,(function(e){return"number"==typeof e}));if(i.length===t.networkWindow){var o,a,s;if("min"===t.windowMethod)a=Math.min.apply(Math,jg(i));else if("max"===t.windowMethod)a=Math.max.apply(Math,jg(i));else{var l,u=jE(l=jg(i)).call(l,(function(e,t){return e-t})),c=Math.floor(u.length/2);a=u.length%2!=0?u[c]:(u[c-1]+u[c])/2}if(a&&void 0!==(null===(o=r[a])||void 0===o?void 0:o.jitterBuffer))this._startSetDelayLoop(null===(s=r[a])||void 0===s?void 0:s.jitterBuffer)}}}},{key:"_stopRtcReport",value:function(){var e,t,r,n;null===(e=this._audioStallObserver)||void 0===e||e.destroy(),null===(t=this._videoStallObserver)||void 0===t||t.destroy(),null===(r=this._frameRecvCallback)||void 0===r||r.stop(),delete this._frameRecvCallback,null===(n=this._networkQuality)||void 0===n||n.destroy(),delete this._audioStallObserver,delete this._videoStallObserver,delete this._networkQuality,this._preAudioStats=null,this._preVideoStats=null,this._rtcReportTimer&&(clearInterval(this._rtcReportTimer),this._rtcReportTimer=0)}},{key:"_clearDelay",value:function(){this._setDelayTimer&&(clearInterval(this._setDelayTimer),delete this._setDelayTimer),this._targetDelayHint=null,this._setDelayError=null}},{key:"_disconnect",value:function(e){var t,r;this._clearDelay(),this._clearMediaSrc(),null===(t=this._loader)||void 0===t||t.cancel(),null===(r=this._networkEvaluate)||void 0===r||r.destroy(),this._stopRtcReport(),clearTimeout(this._checkStatsErrorTimer),this._clearPeerStateTimeout(),this._firstFrameObserver.setFailureReason(e),this._firstFrameObserver.reset(),this._audioTransceicer=null,this._videoTransceicer=null,this._mediaStream=null}},{key:"_clearMediaSrc",value:function(){this._media&&(this._media.srcObject=null,this._media.removeAttribute("src"))}},{key:"_emitError",value:function(e){var t;rD.warn(e),this._clearDelay(),this._firstFrameObserver.setFailureReason((null==e||null===(t=e.originError)||void 0===t?void 0:t.message)||(null==e?void 0:e.originError)||e),this._firstFrameObserver.reset(),this.emit(CI,e),clearTimeout(this._checkStatsErrorTimer),this._stopRtcReport(),this._clearPeerStateTimeout(),this._pc&&(this._pc.close(),this._clearMediaSrc())}},{key:"_createEmptyPeer",value:(t=Tg(Rg().mark((function e(){var t;return Rg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new RTCPeerConnection,e.next=3,t.createOffer();case 3:t.close();case 4:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})},{key:"_emitFirstFrameState",value:function(e,t){this.emit(BI.RTC_FIRST_FRAME,Sg(Sg(Sg({},e),t),{},{initOptionsIncludePreload:!!this._opts.preloadPromise}))}},{key:"_changeVolumeInHarmonyWorkaround",value:function(){var e=this;if(/(HarmonyOS|OpenHarmony|ArkWeb)/i.test(navigator.userAgent)){var t=Qc(HTMLMediaElement.prototype,"muted");this._media&&t&&(rD.log("apply HarmonyOS muted workaround"),Ad(this._media,"muted",{configurable:!0,enumerable:!0,get:t.get,set:function(e){var r;null===(r=t.set)||void 0===r||r.call(this,e);var n,i,o,a=Zg((n=this.volume,(o=n+(i=.01))>1&&(o=n-i),[n,o]),2),s=a[0],l=a[1];this.volume=l,this.volume=s,rD.log("HarmonyOS muted workaround. set muted =",e,"volume:",l,"->",s)}}),this._revertVolumeWorkaround=function(){rD.log("revert HarmonyOS muted workaround. video dom:",e._media),e._media&&Ad(e._media,"muted",t)})}}},{key:"_mutedBeforePlayingWorkaround",value:function(){var e=this;if(/(HeyTapBrowser)/i.test(navigator.userAgent)||/(VivoBrowser)/i.test(navigator.userAgent)){var t=Qc(HTMLMediaElement.prototype,"muted");if(this._media&&t){rD.log("apply muted workaround for vivo & oppo");var r=this._media.muted;this._media.muted=!0,Ad(this._media,"muted",{configurable:!0,enumerable:!0,get:function(){return r},set:function(e){rD.log("muted workaround. set muted =",e),r=e}});this._media.addEventListener("playing",(function n(){rD.log("revert muted workaround. muted:",r),e._media&&(Ad(e._media,"muted",t),e._media.muted=r,e._media.removeEventListener("playing",n))}))}}}},{key:"destroy",value:function(e){var t,r;this._disconnect("invoke destroy"),null===(t=this._revertVolumeWorkaround)||void 0===t||t.call(this),delete this._revertVolumeWorkaround,null===(r=this._media)||void 0===r||r.removeEventListener("timeupdate",this._mockWaitingByTimeupdate),this._media&&!e&&(this._media.srcObject=null),this._pc&&this._pc.close(),this._loader=null,this._media=null,this._player=null,this._pc=null}}],[{key:"enableLogger",value:function(){fI.enable()}},{key:"disableLogger",value:function(){fI.disable()}}]),s}(sT);try{localStorage.getItem("xgd")?nD.enableLogger():nD.disableLogger()}catch(aD){}var iD=function(e){Og(n,e);var t,r=Fg(n);function n(){var e;return Eg(this,n),(e=r.apply(this,arguments))._rts=null,e._rtsOpts=null,e._mediaStream=null,e._onPause=function(){e._disconnectTimer||(e._disconnectTimer=o_((function(){e._closeAfterPause(),e._clearDisconnectTimer()}),1e3*e.config.disconnectTime))},e._reInit=function(){var t;e._clearDisconnectTimer(),null!==(t=e._rts)&&void 0!==t&&t._pc||(e._init(),e._bindRtsEvents())},e._init=function(){var t;null===(t=e._rts)||void 0===t||t.destroy();var r=e.player.config,n=r.rts||{};e._rtsOpts=n,e._rts=new nD(Sg({media:e.player.video,player:e.player,mediaStream:e._mediaStream,preProcessUrl:function(t,r){var n,i;return(null===(n=(i=e.player).preProcessUrl)||void 0===n?void 0:n.call(i,t,r))||{url:t,ext:r}}},n)),e._rts.load(r.url)},e._onSwitchURL=function(t){L_(t).call(t,"blob:")||""===t?t=e.player.config.url:t&&(e.player.config.url=t),e._rts?e._rts.switchURL(t):e._reInit()},e.__retry=function(){e.player.removeClass(ux),e.player.addClass(lx),ox(Ag(e),"retry",(function(){e.player.src="",e.player.once("canplay",(function(){e.player.mediaPlay()}))}))},e.destroy=function(){var t;e.player.switchURL=e._originSwitchFn,e.player.retry=e._originRetry,e._clearDisconnectTimer(),null===(t=e._rts)||void 0===t||t.destroy(),e._rts=null},e}return Lg(n,[{key:"pc",get:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.pc}},{key:"jitterBufferDelay",get:function(){var e;return(null===(e=this._rts)||void 0===e?void 0:e.getJitterBufferDelay())||0}},{key:"loader",get:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.loader}},{key:"videoTrack",get:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.videoTack}},{key:"audioTrack",get:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.audioTrack}},{key:"core",get:function(){return this._rts}},{key:"version",get:function(){return"0.2.1-alpha.57"}},{key:"beforePlayerInit",value:function(){var e,t,r,n,i,o=this;(this._init(),this._originSwitchFn)||(this._originSwitchFn=null===(n=this.player.switchURL)||void 0===n?void 0:Iy(n).call(n,this.player));this._originRetry||(this._originRetry=null===(i=this.player.retry)||void 0===i?void 0:Iy(i).call(i,this.player));this.player.switchURL=this._onSwitchURL,this.player.retry=this.__retry,null===(e=this.player)||void 0===e||e.useHooks("replay",this._onSwitchURL),this.on("urlchange",this._onSwitchURL),this.on("destroy",this.destroy),void 0!==(null===(t=this.player.config)||void 0===t||null===(r=t.rts)||void 0===r?void 0:r.disconnectTime)&&(this.on("pause",(function(){var e;null!==(e=o._rts)&&void 0!==e&&e._isReplacing||o._onPause()})),this.on("play",(function(){var e;null!==(e=o._rts)&&void 0!==e&&e._isReplacing||o._reInit()}))),this._bindRtsEvents();try{sx.defineGetterOrSetter(this.player,{__url:{get:function(){try{return RR.createObjectURL(new MediaSource)}catch(r){var e,t;return null!==(e=o.player)&&void 0!==e&&null!==(t=e.video)&&void 0!==t&&t.srcObject||(o.player.video.srcObject=new MediaStream),""}}}})}catch(a){}}},{key:"getStats",value:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.getStats()}},{key:"getStatsSnapshoot",value:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.getStatsSnapshoot()}},{key:"getNetWorkInfo",value:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.networkStats}},{key:"setDelay",value:function(e){var t;null===(t=this._rts)||void 0===t||t._setDelay(e)}},{key:"_clearDisconnectTimer",value:function(){clearTimeout(this._disconnectTimer),this._disconnectTimer=void 0}},{key:"_closeAfterPause",value:function(){var e,t,r;if(null!==(e=this._rts)&&void 0!==e&&e._pc){var n;if(null!==(t=this.config)&&void 0!==t&&t.seamlesslyReload)this._mediaStream=null===(n=this._rts)||void 0===n?void 0:n._mediaStream;null===(r=this._rts)||void 0===r||r.destroy(!0),this._rts=null}}},{key:"_bindRtsEvents",value:function(){this._transErrorEvent(),this._transCoreEvent(II),this._transCoreEvent(DI),this._transCoreEvent(OI),this._transCoreEvent(PI),this._transCoreEvent(AI),this._transCoreEvent(FI),this._transCoreEvent(ZI),this._transCoreEvent(BI.RTC_STATE_CHANGE),this._transCoreEvent(BI.RTC_NETWORK),this._transCoreEvent(BI.RTC_FIRST_FRAME)}},{key:"_transErrorEvent",value:function(){var e,t,r=this;null===(e=this._rts)||void 0===e||e.on(CI,(function(e){if(r.player){var t=new $E(r.player,e),n=r._rtsOpts||{},i=n.backupConstruct,o=n.backupURL;if(o){var a,s=r.player;s.emit("core_event",Sg(Sg({},{url:s.config.url,code:t.errorCode,message:t.message,httpCode:t.httpCode}),{},{eventName:"core.degrade"})),s.emit("degrade",{url:s.config.url,code:t.errorCode,message:t.message,httpCode:t.httpCode}),s.unRegisterPlugin("rts"),s.switchURL=r._originSwitchFn,s.retry=r._originRetry,r._rts=null,s.rts=null,null!==(a=s.video)&&void 0!==a&&a.srcObject&&(s.video.srcObject=null),s.config.url=o,i?s.registerPlugin(i).beforePlayerInit():s.video.src=o}else r.player.emit("error",t)}})),null===(t=this._rts)||void 0===t||t.on("waiting",(function(){var e;null===(e=r.player)||void 0===e||e.emit("waiting")}))}},{key:"_transCoreEvent",value:function(e){var t,r=this;null===(t=this._rts)||void 0===t||t.on(e,(function(t){r.player&&r.player.emit("core_event",Sg(Sg({},t),{},{eventName:e}))}))}}],[{key:"pluginName",get:function(){return"rts"}},{key:"isSupported",value:function(){return fP()}},{key:"getCapacity",value:function(){return function(){if(!fP())return Mm.reject("RTCPeerConnection no support");var e;try{(e=new RTCPeerConnection).addTransceiver("video",{direction:"recvonly"}),e.addTransceiver("audio",{direction:"recvonly"})}catch(t){return Mm.reject(null==t?void 0:t.message)}return e.createOffer().then((function(t){var r,n,i,o;if(rD.log(t.sdp),!t.sdp)return Mm.reject("createOffer no sdp");var a=YI.parse(t.sdp),s=null===(r=a.media)||void 0===r?void 0:Gc(r).call(r,(function(e){return"video"===e.type}))[0],l=null===(n=a.media)||void 0===n?void 0:Gc(n).call(n,(function(e){return"audio"===e.type}))[0],u=null==s||null===(i=s.rtp)||void 0===i?void 0:Gc(i).call(i,(function(e){return"VP8"===e.codec||"VP9"===e.codec||"H264"===e.codec})),c=null==l||null===(o=l.rtp)||void 0===o?void 0:Gc(o).call(o,(function(e){return"opus"===e.codec})),d=null==s?void 0:s.fmtp,f=null==l?void 0:l.fmtp;return d&&Vk(u).call(u,(function(e){var t;e.config=null===(t=Gc(d).call(d,(function(t){return t.payload===e.payload}))[0])||void 0===t?void 0:t.config})),f&&Vk(c).call(c,(function(e){var t;e.config=null===(t=Gc(f).call(f,(function(t){return t.payload===e.payload}))[0])||void 0===t?void 0:t.config})),e.close(),{video:u,audio:c}}))}()}},{key:"isSupportedH264",value:(t=Tg(Rg().mark((function e(t){var r,i,o,a,s;return Rg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.getCapacity();case 3:if(i=e.sent,o=null===(r=i.video)||void 0===r?void 0:Gc(r).call(r,(function(e){var r;return"H264"===e.codec&&(!t||-1!==(null===(r=e.config)||void 0===r?void 0:rg(r).call(r,t)))})).length){e.next=10;break}return e.next=8,n.getCapacity();case 8:s=e.sent,o=null===(a=s.video)||void 0===a?void 0:Gc(a).call(a,(function(e){var r;return"H264"===e.codec&&(!t||-1!==(null===(r=e.config)||void 0===r?void 0:rg(r).call(r,t)))})).length;case 10:return e.abrupt("return",!!o);case 13:return e.prev=13,e.t0=e.catch(0),e.abrupt("return",!1);case 16:case"end":return e.stop()}}),e,null,[[0,13]])}))),function(e){return t.apply(this,arguments)})}]),n}(sx),oD=window.VePlayer.DynamicModule;VePlayer.registerPlugin(oD.PluginRtm,{RtmPlugin:iD}),e.RtmPlugin=iD}));