@vkontakte/videoplayer-statistics 1.0.80-dev.fba07f4d.0 → 1.0.81-beta.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.
- package/es2015.cjs.js +4 -4
- package/es2015.esm.js +4 -4
- package/es2018.cjs.js +4 -4
- package/es2018.esm.js +4 -4
- package/es2024.cjs.js +4 -4
- package/es2024.esm.js +4 -4
- package/esnext.cjs.js +4 -4
- package/esnext.esm.js +4 -4
- package/evergreen.esm.js +4 -4
- package/package.json +3 -3
package/es2015.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer-statistics v1.0.
|
|
3
|
-
*
|
|
4
|
-
* https://st.mycdn.me/static/vkontakte-videoplayer/1-0-
|
|
2
|
+
* @vkontakte/videoplayer-statistics v1.0.81-beta.0
|
|
3
|
+
* Wed, 25 Jun 2025 16:27:38 GMT
|
|
4
|
+
* https://st.mycdn.me/static/vkontakte-videoplayer/1-0-81/doc/
|
|
5
5
|
*/
|
|
6
|
-
var Jl=Object.create;var Gr=Object.defineProperty,Xl=Object.defineProperties,Zl=Object.getOwnPropertyDescriptor,ef=Object.getOwnPropertyDescriptors,rf=Object.getOwnPropertyNames,io=Object.getOwnPropertySymbols,tf=Object.getPrototypeOf,no=Object.prototype.hasOwnProperty,of=Object.prototype.propertyIsEnumerable;var Wr=Math.pow,oo=(r,e,t)=>e in r?Gr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,G=(r,e)=>{for(var t in e||(e={}))no.call(e,t)&&oo(r,t,e[t]);if(io)for(var t of io(e))of.call(e,t)&&oo(r,t,e[t]);return r},Ye=(r,e)=>Xl(r,ef(e));var n=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var nf=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of rf(e))!no.call(r,o)&&o!==t&&Gr(r,o,{get:()=>e[o],enumerable:!(i=Zl(e,o))||i.enumerable});return r};var j=(r,e,t)=>(t=r!=null?Jl(tf(r)):{},nf(e||!r||!r.__esModule?Gr(t,"default",{value:r,enumerable:!0}):t,r));var D=(r,e,t)=>new Promise((i,o)=>{var a=c=>{try{f(t.next(c))}catch(l){o(l)}},u=c=>{try{f(t.throw(c))}catch(l){o(l)}},f=c=>c.done?i(c.value):Promise.resolve(c.value).then(a,u);f((t=t.apply(r,e)).next())});var I=n((Hr,ao)=>{"use strict";var _e=function(r){return r&&r.Math===Math&&r};ao.exports=_e(typeof globalThis=="object"&&globalThis)||_e(typeof window=="object"&&window)||_e(typeof self=="object"&&self)||_e(typeof global=="object"&&global)||_e(typeof Hr=="object"&&Hr)||function(){return this}()||Function("return this")()});var E=n((Ey,so)=>{"use strict";so.exports=function(r){try{return!!r()}catch(e){return!0}}});var qe=n((_y,uo)=>{"use strict";var af=E();uo.exports=!af(function(){var r=function(){}.bind();return typeof r!="function"||r.hasOwnProperty("prototype")})});var zr=n((qy,po)=>{"use strict";var sf=qe(),fo=Function.prototype,co=fo.apply,lo=fo.call;po.exports=typeof Reflect=="object"&&Reflect.apply||(sf?lo.bind(co):function(){return lo.apply(co,arguments)})});var q=n((Py,go)=>{"use strict";var vo=qe(),ho=Function.prototype,Qr=ho.call,uf=vo&&ho.bind.bind(Qr,Qr);go.exports=vo?uf:function(r){return function(){return Qr.apply(r,arguments)}}});var Pe=n((Ty,bo)=>{"use strict";var mo=q(),cf=mo({}.toString),lf=mo("".slice);bo.exports=function(r){return lf(cf(r),8,-1)}});var Yr=n((Oy,yo)=>{"use strict";var ff=Pe(),df=q();yo.exports=function(r){if(ff(r)==="Function")return df(r)}});var S=n((wy,Io)=>{"use strict";var Jr=typeof document=="object"&&document.all;Io.exports=typeof Jr=="undefined"&&Jr!==void 0?function(r){return typeof r=="function"||r===Jr}:function(r){return typeof r=="function"}});var P=n((xy,So)=>{"use strict";var pf=E();So.exports=!pf(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var R=n((Ry,Eo)=>{"use strict";var vf=qe(),Je=Function.prototype.call;Eo.exports=vf?Je.bind(Je):function(){return Je.apply(Je,arguments)}});var Xr=n(Po=>{"use strict";var _o={}.propertyIsEnumerable,qo=Object.getOwnPropertyDescriptor,hf=qo&&!_o.call({1:2},1);Po.f=hf?function(e){var t=qo(this,e);return!!t&&t.enumerable}:_o});var Te=n((Cy,To)=>{"use strict";To.exports=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}}});var wo=n((Ly,Oo)=>{"use strict";var gf=q(),mf=E(),bf=Pe(),Zr=Object,yf=gf("".split);Oo.exports=mf(function(){return!Zr("z").propertyIsEnumerable(0)})?function(r){return bf(r)==="String"?yf(r,""):Zr(r)}:Zr});var Oe=n((Ny,xo)=>{"use strict";xo.exports=function(r){return r==null}});var ie=n((Dy,Ro)=>{"use strict";var If=Oe(),Sf=TypeError;Ro.exports=function(r){if(If(r))throw new Sf("Can't call method on "+r);return r}});var H=n((ky,Ao)=>{"use strict";var Ef=wo(),_f=ie();Ao.exports=function(r){return Ef(_f(r))}});var A=n(($y,Co)=>{"use strict";var qf=S();Co.exports=function(r){return typeof r=="object"?r!==null:qf(r)}});var oe=n((jy,Lo)=>{"use strict";Lo.exports={}});var M=n((My,Do)=>{"use strict";var et=oe(),rt=I(),Pf=S(),No=function(r){return Pf(r)?r:void 0};Do.exports=function(r,e){return arguments.length<2?No(et[r])||No(rt[r]):et[r]&&et[r][e]||rt[r]&&rt[r][e]}});var Xe=n((Fy,ko)=>{"use strict";var Tf=q();ko.exports=Tf({}.isPrototypeOf)});var z=n((By,Mo)=>{"use strict";var Of=I(),$o=Of.navigator,jo=$o&&$o.userAgent;Mo.exports=jo?String(jo):""});var it=n((Uy,Go)=>{"use strict";var Ko=I(),tt=z(),Fo=Ko.process,Bo=Ko.Deno,Uo=Fo&&Fo.versions||Bo&&Bo.version,Vo=Uo&&Uo.v8,C,Ze;Vo&&(C=Vo.split("."),Ze=C[0]>0&&C[0]<4?1:+(C[0]+C[1]));!Ze&&tt&&(C=tt.match(/Edge\/(\d+)/),(!C||C[1]>=74)&&(C=tt.match(/Chrome\/(\d+)/),C&&(Ze=+C[1])));Go.exports=Ze});var ot=n((Vy,Ho)=>{"use strict";var Wo=it(),wf=E(),xf=I(),Rf=xf.String;Ho.exports=!!Object.getOwnPropertySymbols&&!wf(function(){var r=Symbol("symbol detection");return!Rf(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&Wo&&Wo<41})});var nt=n((Ky,zo)=>{"use strict";var Af=ot();zo.exports=Af&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var at=n((Gy,Qo)=>{"use strict";var Cf=M(),Lf=S(),Nf=Xe(),Df=nt(),kf=Object;Qo.exports=Df?function(r){return typeof r=="symbol"}:function(r){var e=Cf("Symbol");return Lf(e)&&Nf(e.prototype,kf(r))}});var we=n((Wy,Yo)=>{"use strict";var $f=String;Yo.exports=function(r){try{return $f(r)}catch(e){return"Object"}}});var F=n((Hy,Jo)=>{"use strict";var jf=S(),Mf=we(),Ff=TypeError;Jo.exports=function(r){if(jf(r))return r;throw new Ff(Mf(r)+" is not a function")}});var er=n((zy,Xo)=>{"use strict";var Bf=F(),Uf=Oe();Xo.exports=function(r,e){var t=r[e];return Uf(t)?void 0:Bf(t)}});var en=n((Qy,Zo)=>{"use strict";var st=R(),ut=S(),ct=A(),Vf=TypeError;Zo.exports=function(r,e){var t,i;if(e==="string"&&ut(t=r.toString)&&!ct(i=st(t,r))||ut(t=r.valueOf)&&!ct(i=st(t,r))||e!=="string"&&ut(t=r.toString)&&!ct(i=st(t,r)))return i;throw new Vf("Can't convert object to primitive value")}});var k=n((Yy,rn)=>{"use strict";rn.exports=!0});var nn=n((Jy,on)=>{"use strict";var tn=I(),Kf=Object.defineProperty;on.exports=function(r,e){try{Kf(tn,r,{value:e,configurable:!0,writable:!0})}catch(t){tn[r]=e}return e}});var xe=n((Xy,un)=>{"use strict";var Gf=k(),Wf=I(),Hf=nn(),an="__core-js_shared__",sn=un.exports=Wf[an]||Hf(an,{});(sn.versions||(sn.versions=[])).push({version:"3.43.0",mode:Gf?"pure":"global",copyright:"\xA9 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.43.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var lt=n((Zy,ln)=>{"use strict";var cn=xe();ln.exports=function(r,e){return cn[r]||(cn[r]=e||{})}});var ft=n((eI,fn)=>{"use strict";var zf=ie(),Qf=Object;fn.exports=function(r){return Qf(zf(r))}});var $=n((rI,dn)=>{"use strict";var Yf=q(),Jf=ft(),Xf=Yf({}.hasOwnProperty);dn.exports=Object.hasOwn||function(e,t){return Xf(Jf(e),t)}});var dt=n((tI,pn)=>{"use strict";var Zf=q(),ed=0,rd=Math.random(),td=Zf(1.1.toString);pn.exports=function(r){return"Symbol("+(r===void 0?"":r)+")_"+td(++ed+rd,36)}});var T=n((iI,hn)=>{"use strict";var id=I(),od=lt(),vn=$(),nd=dt(),ad=ot(),sd=nt(),ne=id.Symbol,pt=od("wks"),ud=sd?ne.for||ne:ne&&ne.withoutSetter||nd;hn.exports=function(r){return vn(pt,r)||(pt[r]=ad&&vn(ne,r)?ne[r]:ud("Symbol."+r)),pt[r]}});var yn=n((oI,bn)=>{"use strict";var cd=R(),gn=A(),mn=at(),ld=er(),fd=en(),dd=T(),pd=TypeError,vd=dd("toPrimitive");bn.exports=function(r,e){if(!gn(r)||mn(r))return r;var t=ld(r,vd),i;if(t){if(e===void 0&&(e="default"),i=cd(t,r,e),!gn(i)||mn(i))return i;throw new pd("Can't convert object to primitive value")}return e===void 0&&(e="number"),fd(r,e)}});var vt=n((nI,In)=>{"use strict";var hd=yn(),gd=at();In.exports=function(r){var e=hd(r,"string");return gd(e)?e:e+""}});var rr=n((aI,En)=>{"use strict";var md=I(),Sn=A(),ht=md.document,bd=Sn(ht)&&Sn(ht.createElement);En.exports=function(r){return bd?ht.createElement(r):{}}});var gt=n((sI,_n)=>{"use strict";var yd=P(),Id=E(),Sd=rr();_n.exports=!yd&&!Id(function(){return Object.defineProperty(Sd("div"),"a",{get:function(){return 7}}).a!==7})});var Tn=n(Pn=>{"use strict";var Ed=P(),_d=R(),qd=Xr(),Pd=Te(),Td=H(),Od=vt(),wd=$(),xd=gt(),qn=Object.getOwnPropertyDescriptor;Pn.f=Ed?qn:function(e,t){if(e=Td(e),t=Od(t),xd)try{return qn(e,t)}catch(i){}if(wd(e,t))return Pd(!_d(qd.f,e,t),e[t])}});var mt=n((cI,On)=>{"use strict";var Rd=E(),Ad=S(),Cd=/#|\.prototype\./,Re=function(r,e){var t=Nd[Ld(r)];return t===kd?!0:t===Dd?!1:Ad(e)?Rd(e):!!e},Ld=Re.normalize=function(r){return String(r).replace(Cd,".").toLowerCase()},Nd=Re.data={},Dd=Re.NATIVE="N",kd=Re.POLYFILL="P";On.exports=Re});var Ae=n((lI,xn)=>{"use strict";var wn=Yr(),$d=F(),jd=qe(),Md=wn(wn.bind);xn.exports=function(r,e){return $d(r),e===void 0?r:jd?Md(r,e):function(){return r.apply(e,arguments)}}});var bt=n((fI,Rn)=>{"use strict";var Fd=P(),Bd=E();Rn.exports=Fd&&Bd(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var B=n((dI,An)=>{"use strict";var Ud=A(),Vd=String,Kd=TypeError;An.exports=function(r){if(Ud(r))return r;throw new Kd(Vd(r)+" is not an object")}});var Q=n(Ln=>{"use strict";var Gd=P(),Wd=gt(),Hd=bt(),tr=B(),Cn=vt(),zd=TypeError,yt=Object.defineProperty,Qd=Object.getOwnPropertyDescriptor,It="enumerable",St="configurable",Et="writable";Ln.f=Gd?Hd?function(e,t,i){if(tr(e),t=Cn(t),tr(i),typeof e=="function"&&t==="prototype"&&"value"in i&&Et in i&&!i[Et]){var o=Qd(e,t);o&&o[Et]&&(e[t]=i.value,i={configurable:St in i?i[St]:o[St],enumerable:It in i?i[It]:o[It],writable:!1})}return yt(e,t,i)}:yt:function(e,t,i){if(tr(e),t=Cn(t),tr(i),Wd)try{return yt(e,t,i)}catch(o){}if("get"in i||"set"in i)throw new zd("Accessors not supported");return"value"in i&&(e[t]=i.value),e}});var ae=n((vI,Nn)=>{"use strict";var Yd=P(),Jd=Q(),Xd=Te();Nn.exports=Yd?function(r,e,t){return Jd.f(r,e,Xd(1,t))}:function(r,e,t){return r[e]=t,r}});var O=n((hI,kn)=>{"use strict";var Ce=I(),Zd=zr(),ep=Yr(),rp=S(),tp=Tn().f,ip=mt(),se=oe(),op=Ae(),ue=ae(),Dn=$();xe();var np=function(r){var e=function(t,i,o){if(this instanceof e){switch(arguments.length){case 0:return new r;case 1:return new r(t);case 2:return new r(t,i)}return new r(t,i,o)}return Zd(r,this,arguments)};return e.prototype=r.prototype,e};kn.exports=function(r,e){var t=r.target,i=r.global,o=r.stat,a=r.proto,u=i?Ce:o?Ce[t]:Ce[t]&&Ce[t].prototype,f=i?se:se[t]||ue(se,t,{})[t],c=f.prototype,l,p,v,s,d,h,g,b,m;for(s in e)l=ip(i?s:t+(o?".":"#")+s,r.forced),p=!l&&u&&Dn(u,s),h=f[s],p&&(r.dontCallGetSet?(m=tp(u,s),g=m&&m.value):g=u[s]),d=p&&g?g:e[s],!(!l&&!a&&typeof h==typeof d)&&(r.bind&&p?b=op(d,Ce):r.wrap&&p?b=np(d):a&&rp(d)?b=ep(d):b=d,(r.sham||d&&d.sham||h&&h.sham)&&ue(b,"sham",!0),ue(f,s,b),a&&(v=t+"Prototype",Dn(se,v)||ue(se,v,{}),ue(se[v],s,d),r.real&&c&&(l||!c[s])&&ue(c,s,d)))}});var jn=n((gI,$n)=>{"use strict";var ap=Math.ceil,sp=Math.floor;$n.exports=Math.trunc||function(e){var t=+e;return(t>0?sp:ap)(t)}});var ir=n((mI,Mn)=>{"use strict";var up=jn();Mn.exports=function(r){var e=+r;return e!==e||e===0?0:up(e)}});var Bn=n((bI,Fn)=>{"use strict";var cp=ir(),lp=Math.max,fp=Math.min;Fn.exports=function(r,e){var t=cp(r);return t<0?lp(t+e,0):fp(t,e)}});var _t=n((yI,Un)=>{"use strict";var dp=ir(),pp=Math.min;Un.exports=function(r){var e=dp(r);return e>0?pp(e,9007199254740991):0}});var qt=n((II,Vn)=>{"use strict";var vp=_t();Vn.exports=function(r){return vp(r.length)}});var Pt=n((SI,Gn)=>{"use strict";var hp=H(),gp=Bn(),mp=qt(),Kn=function(r){return function(e,t,i){var o=hp(e),a=mp(o);if(a===0)return!r&&-1;var u=gp(i,a),f;if(r&&t!==t){for(;a>u;)if(f=o[u++],f!==f)return!0}else for(;a>u;u++)if((r||u in o)&&o[u]===t)return r||u||0;return!r&&-1}};Gn.exports={includes:Kn(!0),indexOf:Kn(!1)}});var Tt=n((EI,Wn)=>{"use strict";Wn.exports=function(){}});var Hn=n(()=>{"use strict";var bp=O(),yp=Pt().includes,Ip=E(),Sp=Tt(),Ep=Ip(function(){return!Array(1).includes()});bp({target:"Array",proto:!0,forced:Ep},{includes:function(e){return yp(this,e,arguments.length>1?arguments[1]:void 0)}});Sp("includes")});var or=n((PI,zn)=>{"use strict";var _p=M();zn.exports=_p});var Yn=n((TI,Qn)=>{"use strict";Hn();var qp=or();Qn.exports=qp("Array","includes")});var Xn=n((OI,Jn)=>{"use strict";var Pp=Yn();Jn.exports=Pp});var nr=n((wI,Zn)=>{"use strict";var Tp=Xn();Zn.exports=Tp});var sa=n(()=>{"use strict"});var Lt=n((BI,ua)=>{"use strict";var Ne=I(),xp=z(),Rp=Pe(),sr=function(r){return xp.slice(0,r.length)===r};ua.exports=function(){return sr("Bun/")?"BUN":sr("Cloudflare-Workers")?"CLOUDFLARE":sr("Deno/")?"DENO":sr("Node.js/")?"NODE":Ne.Bun&&typeof Bun.version=="string"?"BUN":Ne.Deno&&typeof Deno.version=="object"?"DENO":Rp(Ne.process)==="process"?"NODE":Ne.window&&Ne.document?"BROWSER":"REST"}()});var ur=n((UI,ca)=>{"use strict";var Ap=Lt();ca.exports=Ap==="NODE"});var ce=n((VI,la)=>{"use strict";var Cp=ae();la.exports=function(r,e,t,i){return i&&i.enumerable?r[e]=t:Cp(r,e,t),r}});var da=n((KI,fa)=>{"use strict";var Lp=q(),Np=F();fa.exports=function(r,e,t){try{return Lp(Np(Object.getOwnPropertyDescriptor(r,e)[t]))}catch(i){}}});var va=n((GI,pa)=>{"use strict";var Dp=A();pa.exports=function(r){return Dp(r)||r===null}});var ga=n((WI,ha)=>{"use strict";var kp=va(),$p=String,jp=TypeError;ha.exports=function(r){if(kp(r))return r;throw new jp("Can't set "+$p(r)+" as a prototype")}});var Nt=n((HI,ma)=>{"use strict";var Mp=da(),Fp=A(),Bp=ie(),Up=ga();ma.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var r=!1,e={},t;try{t=Mp(Object.prototype,"__proto__","set"),t(e,[]),r=e instanceof Array}catch(i){}return function(o,a){return Bp(o),Up(a),Fp(o)&&(r?t(o,a):o.__proto__=a),o}}():void 0)});var cr=n((zI,ya)=>{"use strict";var Vp=T(),Kp=Vp("toStringTag"),ba={};ba[Kp]="z";ya.exports=String(ba)==="[object z]"});var De=n((QI,Ia)=>{"use strict";var Gp=cr(),Wp=S(),lr=Pe(),Hp=T(),zp=Hp("toStringTag"),Qp=Object,Yp=lr(function(){return arguments}())==="Arguments",Jp=function(r,e){try{return r[e]}catch(t){}};Ia.exports=Gp?lr:function(r){var e,t,i;return r===void 0?"Undefined":r===null?"Null":typeof(t=Jp(e=Qp(r),zp))=="string"?t:Yp?lr(e):(i=lr(e))==="Object"&&Wp(e.callee)?"Arguments":i}});var Ea=n((YI,Sa)=>{"use strict";var Xp=cr(),Zp=De();Sa.exports=Xp?{}.toString:function(){return"[object "+Zp(this)+"]"}});var ke=n((JI,qa)=>{"use strict";var ev=cr(),rv=Q().f,tv=ae(),iv=$(),ov=Ea(),nv=T(),_a=nv("toStringTag");qa.exports=function(r,e,t,i){var o=t?r:r&&r.prototype;o&&(iv(o,_a)||rv(o,_a,{configurable:!0,value:e}),i&&!ev&&tv(o,"toString",ov))}});var Ta=n((XI,Pa)=>{"use strict";var av=Q();Pa.exports=function(r,e,t){return av.f(r,e,t)}});var xa=n((ZI,wa)=>{"use strict";var sv=M(),uv=Ta(),cv=T(),lv=P(),Oa=cv("species");wa.exports=function(r){var e=sv(r);lv&&e&&!e[Oa]&&uv(e,Oa,{configurable:!0,get:function(){return this}})}});var Aa=n((eS,Ra)=>{"use strict";var fv=Xe(),dv=TypeError;Ra.exports=function(r,e){if(fv(e,r))return r;throw new dv("Incorrect invocation")}});var kt=n((rS,Ca)=>{"use strict";var pv=q(),vv=S(),Dt=xe(),hv=pv(Function.toString);vv(Dt.inspectSource)||(Dt.inspectSource=function(r){return hv(r)});Ca.exports=Dt.inspectSource});var ja=n((tS,$a)=>{"use strict";var gv=q(),mv=E(),La=S(),bv=De(),yv=M(),Iv=kt(),Na=function(){},Da=yv("Reflect","construct"),$t=/^\s*(?:class|function)\b/,Sv=gv($t.exec),Ev=!$t.test(Na),$e=function(e){if(!La(e))return!1;try{return Da(Na,[],e),!0}catch(t){return!1}},ka=function(e){if(!La(e))return!1;switch(bv(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Ev||!!Sv($t,Iv(e))}catch(t){return!0}};ka.sham=!0;$a.exports=!Da||mv(function(){var r;return $e($e.call)||!$e(Object)||!$e(function(){r=!0})||r})?ka:$e});var Fa=n((iS,Ma)=>{"use strict";var _v=ja(),qv=we(),Pv=TypeError;Ma.exports=function(r){if(_v(r))return r;throw new Pv(qv(r)+" is not a constructor")}});var jt=n((oS,Ua)=>{"use strict";var Ba=B(),Tv=Fa(),Ov=Oe(),wv=T(),xv=wv("species");Ua.exports=function(r,e){var t=Ba(r).constructor,i;return t===void 0||Ov(i=Ba(t)[xv])?e:Tv(i)}});var Mt=n((nS,Va)=>{"use strict";var Rv=M();Va.exports=Rv("document","documentElement")});var Ga=n((aS,Ka)=>{"use strict";var Av=q();Ka.exports=Av([].slice)});var Ha=n((sS,Wa)=>{"use strict";var Cv=TypeError;Wa.exports=function(r,e){if(r<e)throw new Cv("Not enough arguments");return r}});var Ft=n((uS,za)=>{"use strict";var Lv=z();za.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(Lv)});var Qt=n((cS,is)=>{"use strict";var w=I(),Nv=zr(),Dv=Ae(),Qa=S(),kv=$(),ts=E(),Ya=Mt(),$v=Ga(),Ja=rr(),jv=Ha(),Mv=Ft(),Fv=ur(),Wt=w.setImmediate,Ht=w.clearImmediate,Bv=w.process,Bt=w.Dispatch,Uv=w.Function,Xa=w.MessageChannel,Vv=w.String,Ut=0,je={},Za="onreadystatechange",Me,Y,Vt,Kt;ts(function(){Me=w.location});var zt=function(r){if(kv(je,r)){var e=je[r];delete je[r],e()}},Gt=function(r){return function(){zt(r)}},es=function(r){zt(r.data)},rs=function(r){w.postMessage(Vv(r),Me.protocol+"//"+Me.host)};(!Wt||!Ht)&&(Wt=function(e){jv(arguments.length,1);var t=Qa(e)?e:Uv(e),i=$v(arguments,1);return je[++Ut]=function(){Nv(t,void 0,i)},Y(Ut),Ut},Ht=function(e){delete je[e]},Fv?Y=function(r){Bv.nextTick(Gt(r))}:Bt&&Bt.now?Y=function(r){Bt.now(Gt(r))}:Xa&&!Mv?(Vt=new Xa,Kt=Vt.port2,Vt.port1.onmessage=es,Y=Dv(Kt.postMessage,Kt)):w.addEventListener&&Qa(w.postMessage)&&!w.importScripts&&Me&&Me.protocol!=="file:"&&!ts(rs)?(Y=rs,w.addEventListener("message",es,!1)):Za in Ja("script")?Y=function(r){Ya.appendChild(Ja("script"))[Za]=function(){Ya.removeChild(this),zt(r)}}:Y=function(r){setTimeout(Gt(r),0)});is.exports={set:Wt,clear:Ht}});var as=n((lS,ns)=>{"use strict";var os=I(),Kv=P(),Gv=Object.getOwnPropertyDescriptor;ns.exports=function(r){if(!Kv)return os[r];var e=Gv(os,r);return e&&e.value}});var Yt=n((fS,us)=>{"use strict";var ss=function(){this.head=null,this.tail=null};ss.prototype={add:function(r){var e={item:r,next:null},t=this.tail;t?t.next=e:this.head=e,this.tail=e},get:function(){var r=this.head;if(r){var e=this.head=r.next;return e===null&&(this.tail=null),r.item}}};us.exports=ss});var ls=n((dS,cs)=>{"use strict";var Wv=z();cs.exports=/ipad|iphone|ipod/i.test(Wv)&&typeof Pebble!="undefined"});var ds=n((pS,fs)=>{"use strict";var Hv=z();fs.exports=/web0s(?!.*chrome)/i.test(Hv)});var ys=n((vS,bs)=>{"use strict";var fe=I(),zv=as(),ps=Ae(),Jt=Qt().set,Qv=Yt(),Yv=Ft(),Jv=ls(),Xv=ds(),Xt=ur(),vs=fe.MutationObserver||fe.WebKitMutationObserver,hs=fe.document,gs=fe.process,fr=fe.Promise,ri=zv("queueMicrotask"),le,Zt,ei,dr,ms;ri||(Fe=new Qv,Be=function(){var r,e;for(Xt&&(r=gs.domain)&&r.exit();e=Fe.get();)try{e()}catch(t){throw Fe.head&&le(),t}r&&r.enter()},!Yv&&!Xt&&!Xv&&vs&&hs?(Zt=!0,ei=hs.createTextNode(""),new vs(Be).observe(ei,{characterData:!0}),le=function(){ei.data=Zt=!Zt}):!Jv&&fr&&fr.resolve?(dr=fr.resolve(void 0),dr.constructor=fr,ms=ps(dr.then,dr),le=function(){ms(Be)}):Xt?le=function(){gs.nextTick(Be)}:(Jt=ps(Jt,fe),le=function(){Jt(Be)}),ri=function(r){Fe.head||le(),Fe.add(r)});var Fe,Be;bs.exports=ri});var Ss=n((hS,Is)=>{"use strict";Is.exports=function(r,e){try{arguments.length===1?console.error(r):console.error(r,e)}catch(t){}}});var pr=n((gS,Es)=>{"use strict";Es.exports=function(r){try{return{error:!1,value:r()}}catch(e){return{error:!0,value:e}}}});var Ps=n((mS,qs)=>{"use strict";var Zv=I(),eh=S(),_s=Zv.WeakMap;qs.exports=eh(_s)&&/native code/.test(String(_s))});var vr=n((bS,Os)=>{"use strict";var rh=lt(),th=dt(),Ts=rh("keys");Os.exports=function(r){return Ts[r]||(Ts[r]=th(r))}});var hr=n((yS,ws)=>{"use strict";ws.exports={}});var ni=n((IS,As)=>{"use strict";var ih=Ps(),Rs=I(),oh=A(),nh=ae(),ti=$(),ii=xe(),ah=vr(),sh=hr(),xs="Object already initialized",oi=Rs.TypeError,uh=Rs.WeakMap,gr,Ue,mr,ch=function(r){return mr(r)?Ue(r):gr(r,{})},lh=function(r){return function(e){var t;if(!oh(e)||(t=Ue(e)).type!==r)throw new oi("Incompatible receiver, "+r+" required");return t}};ih||ii.state?(L=ii.state||(ii.state=new uh),L.get=L.get,L.has=L.has,L.set=L.set,gr=function(r,e){if(L.has(r))throw new oi(xs);return e.facade=r,L.set(r,e),e},Ue=function(r){return L.get(r)||{}},mr=function(r){return L.has(r)}):(J=ah("state"),sh[J]=!0,gr=function(r,e){if(ti(r,J))throw new oi(xs);return e.facade=r,nh(r,J,e),e},Ue=function(r){return ti(r,J)?r[J]:{}},mr=function(r){return ti(r,J)});var L,J;As.exports={set:gr,get:Ue,has:mr,enforce:ch,getterFor:lh}});var X=n((SS,Cs)=>{"use strict";var fh=I();Cs.exports=fh.Promise});var de=n((ES,ks)=>{"use strict";var dh=I(),Ve=X(),ph=S(),vh=mt(),hh=kt(),gh=T(),Ls=Lt(),mh=k(),ai=it(),Ns=Ve&&Ve.prototype,bh=gh("species"),si=!1,Ds=ph(dh.PromiseRejectionEvent),yh=vh("Promise",function(){var r=hh(Ve),e=r!==String(Ve);if(!e&&ai===66||mh&&!(Ns.catch&&Ns.finally))return!0;if(!ai||ai<51||!/native code/.test(r)){var t=new Ve(function(a){a(1)}),i=function(a){a(function(){},function(){})},o=t.constructor={};if(o[bh]=i,si=t.then(function(){})instanceof i,!si)return!0}return!e&&(Ls==="BROWSER"||Ls==="DENO")&&!Ds});ks.exports={CONSTRUCTOR:yh,REJECTION_EVENT:Ds,SUBCLASSING:si}});var pe=n((_S,js)=>{"use strict";var $s=F(),Ih=TypeError,Sh=function(r){var e,t;this.promise=new r(function(i,o){if(e!==void 0||t!==void 0)throw new Ih("Bad Promise constructor");e=i,t=o}),this.resolve=$s(e),this.reject=$s(t)};js.exports.f=function(r){return new Sh(r)}});var ou=n(()=>{"use strict";var Eh=O(),_h=k(),Sr=ur(),W=I(),qh=oe(),me=R(),Ms=ce(),Fs=Nt(),Ph=ke(),Th=xa(),Oh=F(),Ir=S(),wh=A(),xh=Aa(),Rh=jt(),Gs=Qt().set,di=ys(),Ah=Ss(),Ch=pr(),Lh=Yt(),Ws=ni(),Er=X(),pi=de(),Hs=pe(),_r="Promise",zs=pi.CONSTRUCTOR,Nh=pi.REJECTION_EVENT,Dh=pi.SUBCLASSING,ui=Ws.getterFor(_r),kh=Ws.set,ve=Er&&Er.prototype,Z=Er,br=ve,Qs=W.TypeError,ci=W.document,vi=W.process,li=Hs.f,$h=li,jh=!!(ci&&ci.createEvent&&W.dispatchEvent),Ys="unhandledrejection",Mh="rejectionhandled",Bs=0,Js=1,Fh=2,hi=1,Xs=2,yr,Us,Zs,Vs,eu=function(r){var e;return wh(r)&&Ir(e=r.then)?e:!1},ru=function(r,e){var t=e.value,i=e.state===Js,o=i?r.ok:r.fail,a=r.resolve,u=r.reject,f=r.domain,c,l,p;try{o?(i||(e.rejection===Xs&&Uh(e),e.rejection=hi),o===!0?c=t:(f&&f.enter(),c=o(t),f&&(f.exit(),p=!0)),c===r.promise?u(new Qs("Promise-chain cycle")):(l=eu(c))?me(l,c,a,u):a(c)):u(t)}catch(v){f&&!p&&f.exit(),u(v)}},tu=function(r,e){r.notified||(r.notified=!0,di(function(){for(var t=r.reactions,i;i=t.get();)ru(i,r);r.notified=!1,e&&!r.rejection&&Bh(r)}))},iu=function(r,e,t){var i,o;jh?(i=ci.createEvent("Event"),i.promise=e,i.reason=t,i.initEvent(r,!1,!0),W.dispatchEvent(i)):i={promise:e,reason:t},!Nh&&(o=W["on"+r])?o(i):r===Ys&&Ah("Unhandled promise rejection",t)},Bh=function(r){me(Gs,W,function(){var e=r.facade,t=r.value,i=Ks(r),o;if(i&&(o=Ch(function(){Sr?vi.emit("unhandledRejection",t,e):iu(Ys,e,t)}),r.rejection=Sr||Ks(r)?Xs:hi,o.error))throw o.value})},Ks=function(r){return r.rejection!==hi&&!r.parent},Uh=function(r){me(Gs,W,function(){var e=r.facade;Sr?vi.emit("rejectionHandled",e):iu(Mh,e,r.value)})},he=function(r,e,t){return function(i){r(e,i,t)}},ge=function(r,e,t){r.done||(r.done=!0,t&&(r=t),r.value=e,r.state=Fh,tu(r,!0))},fi=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw new Qs("Promise can't be resolved itself");var i=eu(e);i?di(function(){var o={done:!1};try{me(i,e,he(fi,o,r),he(ge,o,r))}catch(a){ge(o,a,r)}}):(r.value=e,r.state=Js,tu(r,!1))}catch(o){ge({done:!1},o,r)}}};if(zs&&(Z=function(e){xh(this,br),Oh(e),me(yr,this);var t=ui(this);try{e(he(fi,t),he(ge,t))}catch(i){ge(t,i)}},br=Z.prototype,yr=function(e){kh(this,{type:_r,done:!1,notified:!1,parent:!1,reactions:new Lh,rejection:!1,state:Bs,value:null})},yr.prototype=Ms(br,"then",function(e,t){var i=ui(this),o=li(Rh(this,Z));return i.parent=!0,o.ok=Ir(e)?e:!0,o.fail=Ir(t)&&t,o.domain=Sr?vi.domain:void 0,i.state===Bs?i.reactions.add(o):di(function(){ru(o,i)}),o.promise}),Us=function(){var r=new yr,e=ui(r);this.promise=r,this.resolve=he(fi,e),this.reject=he(ge,e)},Hs.f=li=function(r){return r===Z||r===Zs?new Us(r):$h(r)},!_h&&Ir(Er)&&ve!==Object.prototype)){Vs=ve.then,Dh||Ms(ve,"then",function(e,t){var i=this;return new Z(function(o,a){me(Vs,i,o,a)}).then(e,t)},{unsafe:!0});try{delete ve.constructor}catch(r){}Fs&&Fs(ve,br)}Eh({global:!0,constructor:!0,wrap:!0,forced:zs},{Promise:Z});Zs=qh.Promise;Ph(Z,_r,!1,!0);Th(_r)});var ee=n((TS,nu)=>{"use strict";nu.exports={}});var su=n((OS,au)=>{"use strict";var Vh=T(),Kh=ee(),Gh=Vh("iterator"),Wh=Array.prototype;au.exports=function(r){return r!==void 0&&(Kh.Array===r||Wh[Gh]===r)}});var gi=n((wS,cu)=>{"use strict";var Hh=De(),uu=er(),zh=Oe(),Qh=ee(),Yh=T(),Jh=Yh("iterator");cu.exports=function(r){if(!zh(r))return uu(r,Jh)||uu(r,"@@iterator")||Qh[Hh(r)]}});var fu=n((xS,lu)=>{"use strict";var Xh=R(),Zh=F(),eg=B(),rg=we(),tg=gi(),ig=TypeError;lu.exports=function(r,e){var t=arguments.length<2?tg(r):e;if(Zh(t))return eg(Xh(t,r));throw new ig(rg(r)+" is not iterable")}});var vu=n((RS,pu)=>{"use strict";var og=R(),du=B(),ng=er();pu.exports=function(r,e,t){var i,o;du(r);try{if(i=ng(r,"return"),!i){if(e==="throw")throw t;return t}i=og(i,r)}catch(a){o=!0,i=a}if(e==="throw")throw t;if(o)throw i;return du(i),t}});var Pr=n((AS,bu)=>{"use strict";var ag=Ae(),sg=R(),ug=B(),cg=we(),lg=su(),fg=qt(),hu=Xe(),dg=fu(),pg=gi(),gu=vu(),vg=TypeError,qr=function(r,e){this.stopped=r,this.result=e},mu=qr.prototype;bu.exports=function(r,e,t){var i=t&&t.that,o=!!(t&&t.AS_ENTRIES),a=!!(t&&t.IS_RECORD),u=!!(t&&t.IS_ITERATOR),f=!!(t&&t.INTERRUPTED),c=ag(e,i),l,p,v,s,d,h,g,b=function(y){return l&&gu(l,"normal"),new qr(!0,y)},m=function(y){return o?(ug(y),f?c(y[0],y[1],b):c(y[0],y[1])):f?c(y,b):c(y)};if(a)l=r.iterator;else if(u)l=r;else{if(p=pg(r),!p)throw new vg(cg(r)+" is not iterable");if(lg(p)){for(v=0,s=fg(r);s>v;v++)if(d=m(r[v]),d&&hu(mu,d))return d;return new qr(!1)}l=dg(r,p)}for(h=a?r.next:l.next;!(g=sg(h,l)).done;){try{d=m(g.value)}catch(y){gu(l,"throw",y)}if(typeof d=="object"&&d&&hu(mu,d))return d}return new qr(!1)}});var _u=n((CS,Eu)=>{"use strict";var hg=T(),Iu=hg("iterator"),Su=!1;try{yu=0,mi={next:function(){return{done:!!yu++}},return:function(){Su=!0}},mi[Iu]=function(){return this},Array.from(mi,function(){throw 2})}catch(r){}var yu,mi;Eu.exports=function(r,e){try{if(!e&&!Su)return!1}catch(o){return!1}var t=!1;try{var i={};i[Iu]=function(){return{next:function(){return{done:t=!0}}}},r(i)}catch(o){}return t}});var bi=n((LS,qu)=>{"use strict";var gg=X(),mg=_u(),bg=de().CONSTRUCTOR;qu.exports=bg||!mg(function(r){gg.all(r).then(void 0,function(){})})});var Pu=n(()=>{"use strict";var yg=O(),Ig=R(),Sg=F(),Eg=pe(),_g=pr(),qg=Pr(),Pg=bi();yg({target:"Promise",stat:!0,forced:Pg},{all:function(e){var t=this,i=Eg.f(t),o=i.resolve,a=i.reject,u=_g(function(){var f=Sg(t.resolve),c=[],l=0,p=1;qg(e,function(v){var s=l++,d=!1;p++,Ig(f,t,v).then(function(h){d||(d=!0,c[s]=h,--p||o(c))},a)}),--p||o(c)});return u.error&&a(u.value),i.promise}})});var Ou=n(()=>{"use strict";var Tg=O(),Og=k(),wg=de().CONSTRUCTOR,Ii=X(),xg=M(),Rg=S(),Ag=ce(),Tu=Ii&&Ii.prototype;Tg({target:"Promise",proto:!0,forced:wg,real:!0},{catch:function(r){return this.then(void 0,r)}});!Og&&Rg(Ii)&&(yi=xg("Promise").prototype.catch,Tu.catch!==yi&&Ag(Tu,"catch",yi,{unsafe:!0}));var yi});var wu=n(()=>{"use strict";var Cg=O(),Lg=R(),Ng=F(),Dg=pe(),kg=pr(),$g=Pr(),jg=bi();Cg({target:"Promise",stat:!0,forced:jg},{race:function(e){var t=this,i=Dg.f(t),o=i.reject,a=kg(function(){var u=Ng(t.resolve);$g(e,function(f){Lg(u,t,f).then(i.resolve,o)})});return a.error&&o(a.value),i.promise}})});var xu=n(()=>{"use strict";var Mg=O(),Fg=pe(),Bg=de().CONSTRUCTOR;Mg({target:"Promise",stat:!0,forced:Bg},{reject:function(e){var t=Fg.f(this),i=t.reject;return i(e),t.promise}})});var Si=n((US,Ru)=>{"use strict";var Ug=B(),Vg=A(),Kg=pe();Ru.exports=function(r,e){if(Ug(r),Vg(e)&&e.constructor===r)return e;var t=Kg.f(r),i=t.resolve;return i(e),t.promise}});var Lu=n(()=>{"use strict";var Gg=O(),Wg=M(),Au=k(),Hg=X(),Cu=de().CONSTRUCTOR,zg=Si(),Qg=Wg("Promise"),Yg=Au&&!Cu;Gg({target:"Promise",stat:!0,forced:Au||Cu},{resolve:function(e){return zg(Yg&&this===Qg?Hg:this,e)}})});var Nu=n(()=>{"use strict";ou();Pu();Ou();wu();xu();Lu()});var ju=n(()=>{"use strict";var Jg=O(),Xg=k(),Tr=X(),Zg=E(),ku=M(),$u=S(),em=jt(),Du=Si(),rm=ce(),_i=Tr&&Tr.prototype,tm=!!Tr&&Zg(function(){_i.finally.call({then:function(){}},function(){})});Jg({target:"Promise",proto:!0,real:!0,forced:tm},{finally:function(r){var e=em(this,ku("Promise")),t=$u(r);return this.then(t?function(i){return Du(e,r()).then(function(){return i})}:r,t?function(i){return Du(e,r()).then(function(){throw i})}:r)}});!Xg&&$u(Tr)&&(Ei=ku("Promise").prototype.finally,_i.finally!==Ei&&rm(_i,"finally",Ei,{unsafe:!0}));var Ei});var Fu=n((QS,Mu)=>{"use strict";sa();Nu();ju();var im=or();Mu.exports=im("Promise","finally")});var Uu=n((YS,Bu)=>{"use strict";var om=Fu();Bu.exports=om});var Ku=n((JS,Vu)=>{"use strict";var nm=Uu();Vu.exports=nm});var Wu=n((XS,Gu)=>{"use strict";var am=E();Gu.exports=!am(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype})});var Or=n((ZS,zu)=>{"use strict";var sm=$(),um=S(),cm=ft(),lm=vr(),fm=Wu(),Hu=lm("IE_PROTO"),qi=Object,dm=qi.prototype;zu.exports=fm?qi.getPrototypeOf:function(r){var e=cm(r);if(sm(e,Hu))return e[Hu];var t=e.constructor;return um(t)&&e instanceof t?t.prototype:e instanceof qi?dm:null}});var Ju=n((eE,Yu)=>{"use strict";var pm=q(),Pi=$(),vm=H(),hm=Pt().indexOf,gm=hr(),Qu=pm([].push);Yu.exports=function(r,e){var t=vm(r),i=0,o=[],a;for(a in t)!Pi(gm,a)&&Pi(t,a)&&Qu(o,a);for(;e.length>i;)Pi(t,a=e[i++])&&(~hm(o,a)||Qu(o,a));return o}});var Ti=n((rE,Xu)=>{"use strict";Xu.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var Oi=n((tE,Zu)=>{"use strict";var mm=Ju(),bm=Ti();Zu.exports=Object.keys||function(e){return mm(e,bm)}});var nc=n((iE,oc)=>{"use strict";var rc=P(),ym=E(),tc=q(),Im=Or(),Sm=Oi(),Em=H(),_m=Xr().f,ic=tc(_m),qm=tc([].push),Pm=rc&&ym(function(){var r=Object.create(null);return r[2]=2,!ic(r,2)}),ec=function(r){return function(e){for(var t=Em(e),i=Sm(t),o=Pm&&Im(t)===null,a=i.length,u=0,f=[],c;a>u;)c=i[u++],(!rc||(o?c in t:ic(t,c)))&&qm(f,r?[c,t[c]]:t[c]);return f}};oc.exports={entries:ec(!0),values:ec(!1)}});var ac=n(()=>{"use strict";var Tm=O(),Om=nc().entries;Tm({target:"Object",stat:!0},{entries:function(e){return Om(e)}})});var uc=n((aE,sc)=>{"use strict";ac();var wm=oe();sc.exports=wm.Object.entries});var lc=n((sE,cc)=>{"use strict";var xm=uc();cc.exports=xm});var wr=n((uE,fc)=>{"use strict";var Rm=lc();fc.exports=Rm});var vc=n((cE,pc)=>{"use strict";var wi=P(),Am=$(),dc=Function.prototype,Cm=wi&&Object.getOwnPropertyDescriptor,xi=Am(dc,"name"),Lm=xi&&function(){}.name==="something",Nm=xi&&(!wi||wi&&Cm(dc,"name").configurable);pc.exports={EXISTS:xi,PROPER:Lm,CONFIGURABLE:Nm}});var gc=n(hc=>{"use strict";var Dm=P(),km=bt(),$m=Q(),jm=B(),Mm=H(),Fm=Oi();hc.f=Dm&&!km?Object.defineProperties:function(e,t){jm(e);for(var i=Mm(t),o=Fm(t),a=o.length,u=0,f;a>u;)$m.f(e,f=o[u++],i[f]);return e}});var Li=n((fE,_c)=>{"use strict";var Bm=B(),Um=gc(),mc=Ti(),Vm=hr(),Km=Mt(),Gm=rr(),Wm=vr(),bc=">",yc="<",Ai="prototype",Ci="script",Sc=Wm("IE_PROTO"),Ri=function(){},Ec=function(r){return yc+Ci+bc+r+yc+"/"+Ci+bc},Ic=function(r){r.write(Ec("")),r.close();var e=r.parentWindow.Object;return r=null,e},Hm=function(){var r=Gm("iframe"),e="java"+Ci+":",t;return r.style.display="none",Km.appendChild(r),r.src=String(e),t=r.contentWindow.document,t.open(),t.write(Ec("document.F=Object")),t.close(),t.F},xr,Rr=function(){try{xr=new ActiveXObject("htmlfile")}catch(e){}Rr=typeof document!="undefined"?document.domain&&xr?Ic(xr):Hm():Ic(xr);for(var r=mc.length;r--;)delete Rr[Ai][mc[r]];return Rr()};Vm[Sc]=!0;_c.exports=Object.create||function(e,t){var i;return e!==null?(Ri[Ai]=Bm(e),i=new Ri,Ri[Ai]=null,i[Sc]=e):i=Rr(),t===void 0?i:Um.f(i,t)}});var $i=n((dE,Tc)=>{"use strict";var zm=E(),Qm=S(),Ym=A(),Jm=Li(),qc=Or(),Xm=ce(),Zm=T(),eb=k(),ki=Zm("iterator"),Pc=!1,U,Ni,Di;[].keys&&(Di=[].keys(),"next"in Di?(Ni=qc(qc(Di)),Ni!==Object.prototype&&(U=Ni)):Pc=!0);var rb=!Ym(U)||zm(function(){var r={};return U[ki].call(r)!==r});rb?U={}:eb&&(U=Jm(U));Qm(U[ki])||Xm(U,ki,function(){return this});Tc.exports={IteratorPrototype:U,BUGGY_SAFARI_ITERATORS:Pc}});var wc=n((pE,Oc)=>{"use strict";var tb=$i().IteratorPrototype,ib=Li(),ob=Te(),nb=ke(),ab=ee(),sb=function(){return this};Oc.exports=function(r,e,t,i){var o=e+" Iterator";return r.prototype=ib(tb,{next:ob(+!i,t)}),nb(r,o,!1,!0),ab[o]=sb,r}});var Mc=n((vE,jc)=>{"use strict";var ub=O(),cb=R(),Ar=k(),kc=vc(),lb=S(),fb=wc(),xc=Or(),Rc=Nt(),db=ke(),pb=ae(),ji=ce(),vb=T(),Ac=ee(),$c=$i(),hb=kc.PROPER,gb=kc.CONFIGURABLE,Cc=$c.IteratorPrototype,Cr=$c.BUGGY_SAFARI_ITERATORS,Ke=vb("iterator"),Lc="keys",Ge="values",Nc="entries",Dc=function(){return this};jc.exports=function(r,e,t,i,o,a,u){fb(t,e,i);var f=function(m){if(m===o&&s)return s;if(!Cr&&m&&m in p)return p[m];switch(m){case Lc:return function(){return new t(this,m)};case Ge:return function(){return new t(this,m)};case Nc:return function(){return new t(this,m)}}return function(){return new t(this)}},c=e+" Iterator",l=!1,p=r.prototype,v=p[Ke]||p["@@iterator"]||o&&p[o],s=!Cr&&v||f(o),d=e==="Array"&&p.entries||v,h,g,b;if(d&&(h=xc(d.call(new r)),h!==Object.prototype&&h.next&&(!Ar&&xc(h)!==Cc&&(Rc?Rc(h,Cc):lb(h[Ke])||ji(h,Ke,Dc)),db(h,c,!0,!0),Ar&&(Ac[c]=Dc))),hb&&o===Ge&&v&&v.name!==Ge&&(!Ar&&gb?pb(p,"name",Ge):(l=!0,s=function(){return cb(v,this)})),o)if(g={values:f(Ge),keys:a?s:f(Lc),entries:f(Nc)},u)for(b in g)(Cr||l||!(b in p))&&ji(p,b,g[b]);else ub({target:e,proto:!0,forced:Cr||l},g);return(!Ar||u)&&p[Ke]!==s&&ji(p,Ke,s,{name:o}),Ac[e]=s,g}});var Bc=n((hE,Fc)=>{"use strict";Fc.exports=function(r,e){return{value:r,done:e}}});var Fi=n((gE,Wc)=>{"use strict";var mb=H(),Mi=Tt(),Uc=ee(),Kc=ni(),bb=Q().f,yb=Mc(),Lr=Bc(),Ib=k(),Sb=P(),Gc="Array Iterator",Eb=Kc.set,_b=Kc.getterFor(Gc);Wc.exports=yb(Array,"Array",function(r,e){Eb(this,{type:Gc,target:mb(r),index:0,kind:e})},function(){var r=_b(this),e=r.target,t=r.index++;if(!e||t>=e.length)return r.target=null,Lr(void 0,!0);switch(r.kind){case"keys":return Lr(t,!1);case"values":return Lr(e[t],!1)}return Lr([t,e[t]],!1)},"values");var Vc=Uc.Arguments=Uc.Array;Mi("keys");Mi("values");Mi("entries");if(!Ib&&Sb&&Vc.name!=="values")try{bb(Vc,"name",{value:"values"})}catch(r){}});var zc=n((mE,Hc)=>{"use strict";var qb=P(),Pb=Q(),Tb=Te();Hc.exports=function(r,e,t){qb?Pb.f(r,e,Tb(0,t)):r[e]=t}});var Qc=n(()=>{"use strict";var Ob=O(),wb=Pr(),xb=zc();Ob({target:"Object",stat:!0},{fromEntries:function(e){var t={};return wb(e,function(i,o){xb(t,i,o)},{AS_ENTRIES:!0}),t}})});var Jc=n((IE,Yc)=>{"use strict";Fi();Qc();var Rb=oe();Yc.exports=Rb.Object.fromEntries});var Zc=n((SE,Xc)=>{"use strict";Xc.exports={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}});var rl=n(()=>{"use strict";Fi();var Ab=Zc(),Cb=I(),Lb=ke(),el=ee();for(Nr in Ab)Lb(Cb[Nr],Nr),el[Nr]=el.Array;var Nr});var il=n((qE,tl)=>{"use strict";var Nb=Jc();rl();tl.exports=Nb});var nl=n((PE,ol)=>{"use strict";var Db=il();ol.exports=Db});var Hi=n((__,Sl)=>{"use strict";var Vb=De(),Kb=String;Sl.exports=function(r){if(Vb(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return Kb(r)}});var _l=n((q_,El)=>{"use strict";var Gb=ir(),Wb=Hi(),Hb=ie(),zb=RangeError;El.exports=function(e){var t=Wb(Hb(this)),i="",o=Gb(e);if(o<0||o===1/0)throw new zb("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(t+=t))o&1&&(i+=t);return i}});var wl=n((P_,Ol)=>{"use strict";var Tl=q(),Qb=_t(),ql=Hi(),Yb=_l(),Jb=ie(),Xb=Tl(Yb),Zb=Tl("".slice),ey=Math.ceil,Pl=function(r){return function(e,t,i){var o=ql(Jb(e)),a=Qb(t),u=o.length,f=i===void 0?" ":ql(i),c,l;return a<=u||f===""?o:(c=a-u,l=Xb(f,ey(c/f.length)),l.length>c&&(l=Zb(l,0,c)),r?o+l:l+o)}};Ol.exports={start:Pl(!1),end:Pl(!0)}});var Rl=n((T_,xl)=>{"use strict";var ry=z();xl.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(ry)});var Al=n(()=>{"use strict";var ty=O(),iy=wl().start,oy=Rl();ty({target:"String",proto:!0,forced:oy},{padStart:function(e){return iy(this,e,arguments.length>1?arguments[1]:void 0)}})});var Ll=n((x_,Cl)=>{"use strict";Al();var ny=or();Cl.exports=ny("String","padStart")});var Dl=n((R_,Nl)=>{"use strict";var ay=Ll();Nl.exports=ay});var $l=n((A_,kl)=>{"use strict";var sy=Dl();kl.exports=sy});var Xi=j(nr(),1);var Le=(u=>(u.PROD="prod",u.VK_ALIAS="vk_alias",u.VIDEOTEST="videotest",u.TEST="test",u.OKCDN="okcdn",u.AUTO="auto",u))(Le||{}),Ot=(l=>(l.Q144P="mobile",l.Q240P="lowest",l.Q360P="low",l.Q480P="medium",l.Q720P="high",l.Q1080P="fullhd",l.Q1440P="quadhd",l.Q2160P="ultrahd",l.UNKNOWN="unknown",l))(Ot||{}),wt=(d=>(d.MP4="mp4",d.DASH="dash",d.DASH_SEP="dash_sep",d.ONDEMAND_DASH="ondemand_dash",d.HLS="hls",d.ONDEMAND_HLS="ondemand_hls",d.WEBM="webm",d.AV1="av1",d.ONDEMAND_DASH_LIVE="ondemand_dash_live",d.ONDEMAND_HLS_LIVE="ondemand_hls_live",d.WEBRTC="webrtc",d.UNKNOWN="unknown",d.RTMP="rtmp",d))(wt||{});var xt=(i=>(i.HTTP1="http1",i.HTTP2="http2",i.HTTP3="http3",i))(xt||{});var Rt=(f=>(f.SLIDER="slider",f.DOUBLE_TAP="double_tap",f.TIME_CODE="time_code",f.EPISODE="episode",f.REWIND="rewind",f.LIVE="live",f.UNKNOWN="unknown",f))(Rt||{}),ea=(a=>(a.GRAPH_SHOW="iGraphShow",a.GRAPH_HIDE="iGraphHide",a.NEXT_AREA="iNextChapterArea",a.NEXT_BUTTON="iNextChapterBtn",a.WATCH_AGAIN="iWatchAgainBtn",a))(ea||{}),ra={action_play:"ap",action_play_interactive:"api",first_bytes:"fb",player_ready:"pr",first_frame:"ff",seek:"sk",watch_coverage_record:"wr",watch_coverage_live:"wl",empty_buffer:"eb",action_stop:"as",close_at_empty_buffer:"cb",content_error:"er",player_interface_click:"pc",next_movie:"nm",track_switch:"ts",failover:"fo",quality:"qt"},ta={vsid:"si",isid:"is",vid:"vi",place:"pl",quality:"qt",cdn_host:"ch",stat_type:"st",param:"pm",vk_app_id:"va",track_code:"tc",connection_type:"cnt",connection_reused:"cr",cached_data:"cd",live:"lv",muted:"mu",mode:"mo",subtitles:"sb",failover:"fo",download_speed:"ds",manual_quality:"mq",ref_domain:"rd",direct_url:"du"},ia={unknown:"un",mobile:"m",lowest:"ls",low:"l",medium:"md",high:"h",fullhd:"f",quadhd:"q",ultrahd:"u"},oa={pip:"pi",fullscreen:"fs",external:"ex",prefetch:"pr",airplay:"ap",chromecast:"cc",invisible:"iv"};import{fillWithDefault as Op}from"@vkontakte/videoplayer-shared/es2015";var ar="1.0.80-dev.fba07f4d.0",na="CIOPGQJGDIHBABABA",At={prod:"https://api.ok.ru",vk_alias:"https://api.mycdn.me",videotest:"https://videotestapi.ok.ru/api",test:"https://apitest.ok.ru",okcdn:"https://api.okcdn.ru",auto:""};var wp={apiEnv:"vk_alias",apiKey:na,requestRetryCount:1,firstFlushTime:5e3,flushDebounceTime:1e4,flushMaxWait:6e4,storageExpiration:36*60*60*1e3,watchCoverageInterval:15e3,disabledOperations:["quality"],disabledCustomFields:[],shorten:!0,maxLoops:100,embedUrlParams:[],useBeacon:!0,synchronizeTime:!0,debugLog:!1,clearStorageAtUnload:!0,useVKComIsMobileLogic:!1,backoff:{start:1e3,factor:1.5,max:5*60*1e3,random:.1}},aa=r=>Op(r,wp);function Ct(){let r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),e=new Array(36),t=0,i,o;for(o=0;o<36;o++)o===8||o===13||o===18||o===23?e[o]="-":o===14?e[o]="4":(t<=2&&(t=33554432+Math.random()*16777216|0),i=t&15,t=t>>4,e[o]=r[o===19?i&3|8:i]);return e.join("")}import{assertNonNullable as vy,combine as Kl,fromEvent as Gl,isNonNullable as Se,isNullable as Wl,merge as hy,now as V,observableFrom as gy,once as my,safeStorage as Vr,Subject as by,Subscription as Zi,ValueSubject as Kr,createURL as Hl}from"@vkontakte/videoplayer-shared/es2015";import{Logger as yy,detectEmbed as Iy}from"@vkontakte/videoplayer-shared/es2015";var Dr=j(Ku(),1);var al=j(wr(),1),sl=j(nl(),1);var ul=r=>{var o;let{operation:e,custom:t}=r,i=(0,sl.default)((0,al.default)(t).map(([a,u])=>{var l,p,v;let f=(l=ta[a])!=null?l:a,c=u;return u&&(a==="mode"?c=(p=oa[u])!=null?p:u:a==="quality"&&(c=(v=ia[u])!=null?v:u)),[f,c]}));return Ye(G({},r),{operation:(o=ra[e])!=null?o:e,custom:i})};import{ValueSubject as kb,getExponentialDelay as $b,ErrorCategory as be}from"@vkontakte/videoplayer-shared/es2015";var jb=/Mobile|mini|Fennec|Android|iP(ad|od|hone)|opera (mini|mobi)/i,We=class{constructor(e){this.consequentAuthErrors=0;this.authorized$=new kb(!1);this.params=e}authorize(e){return D(this,null,function*(){return this.authToken=e!=null?e:yield this.refreshAuthToken(),this._authorizeWithBackoff()})}logBeacon(e){let t="log.externalLog",i=this.createLogParams(e),o=this.sessionKey;if(!o)return;this.params.apiTransport.sendBeacon(t,i,o)||this.logRequest(e).catch(()=>{})}logRequest(e){return D(this,null,function*(){var u;let t="log.externalLog",i=this.createLogParams(e),o=(u=this.sessionKey)!=null?u:yield this._authorizeWithBackoff();if(!o)return;let a=(l,...p)=>D(this,[l,...p],function*(f,c=this.params.config.requestRetryCount){try{return yield this.params.apiTransport.sendRequest(t,i,o)}catch(v){if(!v||!("error_code"in v)){this.params.error$.next({id:"logRequestUnknown",category:be.NETWORK,message:`Unknown ${t} error`,thrown:v});return}let s=v==null?void 0:v.error_code;switch(s){case 102:case 103:case 104:return this.authorized$.next(!1),this.sessionKey=yield this._authorizeWithBackoff(),c>0?a(f,c-1):void 0;case 401:return this.authorized$.next(!1),this.authToken=yield this.refreshAuthToken(),this.sessionKey=yield this._authorizeWithBackoff(),c>0?a(f,c-1):void 0;default:{this.params.error$.next({id:`LogRequest#${s}`,category:be.EXTERNAL_API,message:`${t} error`,data:v});return}}}});return a(e)})}destroy(){window.clearTimeout(this.backoffTimeoutId),this.backoffTimeoutId=0}refreshAuthToken(){return D(this,null,function*(){if(this.params.refreshAuthToken)return this.refreshAuthTokenPromise||(this.refreshAuthTokenPromise=(0,Dr.default)(this.params.refreshAuthToken(),()=>{this.refreshAuthTokenPromise=void 0})),this.refreshAuthTokenPromise})}createLogParams(e){let t="WEB",i=!1,o=`@vkontakte/videoplayer-statistics:${ar}`;if(this.params.config.useVKComIsMobileLogic){let{appVersion:a}=window.navigator;i=jb.test(a)}else this.params.mobile&&(i=!0);return i&&(t="M_WEB"),this.params.vktvVersion&&(t="SMART_TV",o=this.params.vktvVersion),{collector:"ok.mobile.apps.video",data:JSON.stringify({application:o,platform:t,items:this.params.config.shorten?e.map(ul):e})}}_authorizeWithBackoff(){if(!this.consequentAuthErrors)return this._authorize();let e=$b(this.consequentAuthErrors,this.params.config.backoff);return new Promise(t=>{this.backoffTimeoutId||(this.backoffTimeoutId=window.setTimeout(()=>{(0,Dr.default)(this._authorize().then(t).catch(i=>this.params.error$.next({id:"AuthorizeBackoff",category:be.NETWORK,message:"Otherwise unhandled error in authorization",thrown:i})),()=>this.backoffTimeoutId=0)},e))})}_authorize(){return D(this,null,function*(){if(this.authorizePromise)return this.authorizePromise;this.sessionKey=void 0,this.authorized$.next(!1);let e="auth.anonymLogin",t={session_data:{version:2,device_id:this.params.deviceId,client_version:ar.split("-")[0],client_type:"SDK_JS"}};return this.authToken!==void 0&&(t.session_data.auth_token=this.authToken,t.session_data.version=3),this.authorizePromise=(0,Dr.default)(this.params.apiTransport.sendRequest(e,t).then(i=>{var o;return(!i||!i.session_key)&&this.params.error$.next({id:"AuthorizeFailed",category:be.EXTERNAL_API,message:"No session key",data:i}),this.sessionKey=(o=i==null?void 0:i.session_key)!=null?o:void 0,this.sessionKey}).catch(i=>D(this,null,function*(){this.sessionKey=void 0;let o=i==null?void 0:i.error_code;switch(o){case 401:return this.authToken=yield this.refreshAuthToken(),this._authorizeWithBackoff()}o?this.params.error$.next({id:`Authorize#${o}`,category:be.EXTERNAL_API,message:"authorize error",data:i}):this.params.error$.next({id:"AuthorizeUnknown",category:be.NETWORK,message:"authorize error",thrown:i})})),()=>{this.authorizePromise=void 0,this.consequentAuthErrors=this.sessionKey?0:this.consequentAuthErrors+1,this.authorized$.next(this.sessionKey!==void 0)}),this.authorizePromise})}};var{NativeAbortSignal:ME,NativeAbortController:FE}=function(r){return{NativeAbortSignal:r.AbortSignal,NativeAbortController:r.AbortController}}(typeof self!="undefined"?self:global);function cl(r){let e;try{e=new Event("abort")}catch(t){typeof document!="undefined"?document.createEvent?(e=document.createEvent("Event"),e.initEvent("abort",!1,!1)):(e=document.createEventObject(),e.type="abort"):e={type:"abort",bubbles:!1,cancelable:!1}}return e.reason=r,e}function ll(r){if(r===void 0)if(typeof document=="undefined")r=new Error("This operation was aborted"),r.name="AbortError";else try{r=new DOMException("signal is aborted without reason"),Object.defineProperty(r,"name",{value:"AbortError"})}catch(e){r=new Error("This operation was aborted"),r.name="AbortError"}return r}var kr=class{constructor(){Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}addEventListener(e,t,i){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push({callback:t,options:i})}removeEventListener(e,t){if(!(e in this.listeners))return;let i=this.listeners[e];for(let o=0,a=i.length;o<a;o++)if(i[o].callback===t){i.splice(o,1);return}}dispatchEvent(e){if(!(e.type in this.listeners))return;let i=this.listeners[e.type].slice();for(let o=0,a=i.length;o<a;o++){let u=i[o];try{u.callback.call(this,e)}catch(f){Promise.resolve().then(()=>{throw f})}u.options&&u.options.once&&this.removeEventListener(e.type,u.callback)}return!e.defaultPrevented}},ye=class extends kr{constructor(){super(),this.listeners||kr.call(this),Object.defineProperty(this,"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(this,"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(this,"reason",{value:void 0,writable:!0,configurable:!0})}toString(){return"[object AbortSignal]"}dispatchEvent(e){e.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,e)),super.dispatchEvent(e)}throwIfAborted(){let{aborted:e,reason:t="Aborted"}=this;if(e)throw t}static timeout(e){let t=new re;return setTimeout(()=>t.abort(new DOMException(`This signal is timeout in ${e}ms`,"TimeoutError")),e),t.signal}static any(e){let t=new re;function i(){t.abort(this.reason),o()}function o(){for(let a of e)a.removeEventListener("abort",i)}for(let a of e)if(a.aborted){t.abort(a.reason);break}else a.addEventListener("abort",i);return t.signal}},re=class{constructor(){Object.defineProperty(this,"signal",{value:new ye,writable:!0,configurable:!0})}abort(e){let t=ll(e),i=cl(t);this.signal.reason=t,this.signal.dispatchEvent(i)}toString(){return"[object AbortController]"}};typeof Symbol!="undefined"&&Symbol.toStringTag&&(re.prototype[Symbol.toStringTag]="AbortController",ye.prototype[Symbol.toStringTag]="AbortSignal");function $r(r){return r.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof r.Request=="function"&&!r.Request.prototype.hasOwnProperty("signal")||!r.AbortController}function Bi(r){typeof r=="function"&&(r={fetch:r});let{fetch:e,Request:t=e.Request,AbortController:i,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:o=!1}=r;if(!$r({fetch:e,Request:t,AbortController:i,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:o}))return{fetch:e,Request:a};let a=t;(a&&!a.prototype.hasOwnProperty("signal")||o)&&(a=function(l,p){let v;p&&p.signal&&(v=p.signal,delete p.signal);let s=new t(l,p);return v&&Object.defineProperty(s,"signal",{writable:!1,enumerable:!1,configurable:!0,value:v}),s},a.prototype=t.prototype);let u=e;return{fetch:(c,l)=>{let p=a&&a.prototype.isPrototypeOf(c)?c.signal:l?l.signal:void 0;if(p){let v;try{v=new DOMException("Aborted","AbortError")}catch(d){v=new Error("Aborted"),v.name="AbortError"}if(p.aborted)return Promise.reject(v);let s=new Promise((d,h)=>{p.addEventListener("abort",()=>h(v),{once:!0})});return l&&l.signal&&delete l.signal,Promise.race([s,u(c,l)])}return u(c,l)},Request:a}}var Mb=()=>"fetch"in window,He=Mb()&&$r({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}),fl=He?Bi({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}):void 0,Ui=He?fl.fetch:window.fetch,YE=He?fl.Request:window.Request,JE=He?re:window.AbortController,XE=He?ye:window.AbortSignal;var dl=j(nr(),1),pl=j(wr(),1);import{ErrorCategory as jr,now as Vi}from"@vkontakte/videoplayer-shared/es2015";var ze=class{constructor(e){this.params=e,this.apiKey=e.config.apiKey,this.apiEnv=e.config.apiEnv,this.apiBaseUrl=At[this.apiEnv],this.timeSynchronisation=e.timeSynchronisation,this.isApiBaseUrlFetched=!1}resolveApiBaseUrl(){return D(this,null,function*(){var e;if(this.apiEnv!=="auto"||this.isApiBaseUrlFetched)return this.apiBaseUrl;try{let t=atob("aHR0cHM6Ly9kbnMuZ29vZ2xlL3Jlc29sdmU/bmFtZT12aWRlby5fZW5kcG9pbnQub2sucnUmdHlwZT1UWFQ="),o=yield(yield Ui(t,{method:"GET",mode:"cors",cache:"no-cache"})).json(),a=(e=o==null?void 0:o.Answer[0])==null?void 0:e.data;if(!a)throw new Error("Wrong DNS response");return a}catch(t){return this.params.error$.next({id:"OneStat:ApiTransport:resolveApiBaseUrl",category:jr.NETWORK,message:"Unhandled resolve api base url error",thrown:t}),At.vk_alias}finally{this.isApiBaseUrlFetched=!0}})}sendBeacon(e,t,i){if(!window.Blob||!window.navigator.sendBeacon)return!1;let o=this._prepareQueryParams({method:e,queryParams:t,sessionKey:i}),a=new window.Blob([o.toString()],{type:"application/x-www-form-urlencoded"});try{return window.navigator.sendBeacon(`${this.apiBaseUrl}/fb.do`,a)}catch(u){this.params.error$.next({id:"OneStat:ApiTransport:sendBeacon",category:jr.NETWORK,message:"Unhandled beacon error",thrown:u,data:{method:e,params:t}})}return!1}sendRequest(e,t,i){return D(this,null,function*(){let o=Vi(),a=u=>{if(u instanceof TypeError&&(0,dl.default)(["Failed to fetch","NetworkError when attempting to fetch resource."],u.message)){this.params.error$.next({id:"Network",category:jr.NETWORK,message:"Request failed",thrown:u});return}this.params.error$.next({id:"OneStat:ApiTransport:sendRequest",category:jr.NETWORK,message:"Unhandled request error",thrown:u,data:{method:e,params:t,sessionKey:i,time:Vi()-o}})};return this.apiBaseUrl=yield this.resolveApiBaseUrl(),Ui(`${this.apiBaseUrl}/fb.do`,{method:"post",headers:{"Content-type":"application/x-www-form-urlencoded"},body:this._prepareQueryParams({method:e,queryParams:t,sessionKey:i})}).then(u=>{var p,v;let f=Number(u.headers.get("content-length"))===0,c=new Date((p=u.headers.get("date"))!=null?p:"").getTime(),l=Vi()-o;if(isFinite(c)&&((v=this.timeSynchronisation)==null||v.addServerTime(c,l)),!f)return u.json().then(s=>Object.prototype.hasOwnProperty.call(s,"error_msg")?Promise.reject(s):s,a)},a)})}_prepareQueryParams(e){let t=new URLSearchParams({format:"JSON",method:e.method,application_key:this.apiKey});return e.sessionKey!==void 0&&t.append("session_key",e.sessionKey),(0,pl.default)(e.queryParams).forEach(([i,o])=>t.append(i,typeof o=="string"?o:JSON.stringify(o))),t}};var hl=j(nr(),1),gl=j(wr(),1);import{ErrorCategory as Fb,now as Bb,safeStorage as Qe,debounceFn as vl}from"@vkontakte/videoplayer-shared/es2015";var Mr="onestat_events",Ki=r=>e=>e.timestamp+r>=Bb(),Fr=class{constructor(e){this.unsaltedStorage=[];this.isPaused=!1;this.isUrgent=e=>{let{operation:t}=e;return(0,hl.default)(["action_play","watch_coverage_record","watch_coverage_live"],t)};this.params=e,this.api=e.api,this.error$=e.error$,this.userSalt=e.userSalt,this.loggerDebugLog=e.debugLogger.createComponentLog("stat logger"),this.firstFlush=vl(()=>this.safeFlush(),this.params.config.firstFlushTime,{maxWait:this.params.config.firstFlushTime});let t=Qe.isPersistent()?this.params.config.flushMaxWait:0;this.debouncedFlush=vl(()=>this.safeFlush(),this.params.config.flushDebounceTime,{maxWait:t}),this.subscription=this.api.authorized$.subscribe(i=>{i&&this.debouncedFlush()}),this.housekeepStorage()}safeFlush(){try{this.flush()}catch(e){this.error$.next({id:"LoggerError",category:Fb.WTF,message:e?String(e):"Unknown logger error",thrown:e})}}readFromStorage(){let e=Qe.get(Mr);try{return e?JSON.parse(e):{}}catch(t){}return{}}addToStorage(e){var a;if(!this.userSalt){this.unsaltedStorage.push(e);return}let t=this.readFromStorage(),o=((a=t[this.userSalt])!=null?a:[]).filter(Ki(this.params.config.storageExpiration));Qe.set(Mr,JSON.stringify(Ye(G({},t),{[this.userSalt]:[...o,e]})))}getFromStorage(){var i;return this.userSalt?((i=this.readFromStorage()[this.userSalt])!=null?i:[]).filter(Ki(this.params.config.storageExpiration)):this.unsaltedStorage}markStorageSent(){if(!this.userSalt){this.unsaltedStorage=[];return}let e=this.readFromStorage();delete e[this.userSalt],Qe.set(Mr,JSON.stringify(e))}housekeepStorage(){let e=this.readFromStorage();for(let[t,i]of(0,gl.default)(e)){let o=i.filter(Ki(this.params.config.storageExpiration));o.length?e[t]=o:delete e[t],this.loggerDebugLog({message:`${i.length} retrieved from storage, ${o.length} of them actual`})}Qe.set(Mr,JSON.stringify(e))}log(e){this.addToStorage(e),!this.isPaused&&(this.isUrgent(e)?this.flush():this.lastVsid!==e.custom.vsid?this.firstFlush():this.debouncedFlush(),this.lastVsid=e.custom.vsid)}flush({wantBeacon:e,clearStorage:t}={wantBeacon:!1,clearStorage:!0}){let i=this.getFromStorage();i.length!==0&&(this.api.authorized$.getValue()?(e&&this.params.config.useBeacon?(this.loggerDebugLog({message:`Flushing ${i.length} events through beacon`}),this.api.logBeacon(i)):(this.loggerDebugLog({message:`Flushing ${i.length} events`}),this.api.logRequest(i)),t&&this.markStorageSent()):this.api.authorize(),this.firstFlush.cancel(),this.debouncedFlush.cancel())}pause(){this.isPaused=!0,this.debouncedFlush.cancel()}resume(){this.isPaused=!1,this.debouncedFlush()}destroy(){this.subscription.unsubscribe(),this.firstFlush.cancel(),this.debouncedFlush.cancel()}};import{HttpConnectionType as Gi,Surface as Ie,VideoFormat as _,VideoQuality as N}from"@vkontakte/videoplayer-core/es2015";import{assertNever as ml}from"@vkontakte/videoplayer-shared/es2015";var bl=r=>r&&{[N.INVARIANT]:"unknown",[N.Q_144P]:"mobile",[N.Q_240P]:"lowest",[N.Q_360P]:"low",[N.Q_480P]:"medium",[N.Q_576P]:"unknown",[N.Q_720P]:"high",[N.Q_1080P]:"fullhd",[N.Q_1440P]:"quadhd",[N.Q_2160P]:"ultrahd",[N.Q_4320P]:"unknown"}[r],Wi=r=>r&&{[Gi.HTTP1]:"http1",[Gi.HTTP2]:"http2",[Gi.QUIC]:"http3"}[r],yl=r=>{if(r!==void 0)switch(r){case _.MPEG:return"mp4";case _.DASH:case _.DASH_LIVE:case _.DASH_STREAMS:return"dash";case _.DASH_SEP:return"dash_sep";case _.DASH_ONDEMAND:return"ondemand_dash";case _.DASH_WEBM:case _.DASH_LIVE_WEBM:return"webm";case _.DASH_WEBM_AV1:return"av1";case _.DASH_LIVE_CMAF:return"ondemand_dash_live";case _.HLS:case _.HLS_LIVE:return"hls";case _.HLS_ONDEMAND:return"ondemand_hls";case _.HLS_LIVE_CMAF:return"ondemand_hls_live";case _.WEB_RTC_LIVE:return"webrtc";default:return ml(r)}},Br=r=>{if(r!==void 0)switch(r){case Ie.NONE:case Ie.INLINE:return;case Ie.FULLSCREEN:return"fullscreen";case Ie.SECOND_SCREEN:return"chromecast";case Ie.PIP:return"pip";case Ie.INVISIBLE:return"invisible";default:return ml(r)}},Il=r=>{switch(r){case"slow-2g":return"poor";case"2g":return"poor";case"3g":return"good";case"4g":return"excellent"}};var Ur=class{constructor(e){this.offset=void 0;this.offset=e}getOffset(){var e;return(e=this.offset)!=null?e:0}setOffset(e){this.offset=e}now(){var e;return Date.now()+((e=this.offset)!=null?e:0)}date(e=new Date){var t;return e.setTime(e.getTime()+((t=this.offset)!=null?t:0)),e}addServerTime(e,t){let i=Date.now(),o=e-i-t/2;if(Math.abs(o)<1e3){this.offset=0;return}this.offset===void 0?this.offset=Math.round(o):this.offset=Math.round(.2*o+(1-.2)*this.offset)}};var zi=j($l(),1);var jl=()=>(0,zi.default)(Math.floor(Math.random()*Wr(2,32)).toString(36),7,"0"),Ml=()=>(0,zi.default)(Math.floor(Math.random()*Wr(2,64)).toString(36),13,"0");import{PlaybackState as Fl}from"@vkontakte/videoplayer-core/es2015";import{filter as Bl,filterChanged as uy,fromEvent as cy,isNullable as Ul,map as ly,merge as Qi,Observable as fy,Subject as Yi,Subscription as dy,ValueSubject as py}from"@vkontakte/videoplayer-shared/es2015";var Vl=(r,e)=>new fy(t=>{let i=new dy,o=Qi(cy(window,"beforeunload"),r.events.willDestruct$),a=new py(void 0),u;i.add(r.info.isLive$.pipe(uy()).subscribe(x=>{u&&(u.unsubscribe(),a.next(void 0)),x?u=r.info.liveTime$.pipe(ly(Ee=>Ee&&Ee/1e3)).subscribe(a):u=r.info.position$.subscribe(a),i.add(u)}));let{playing$:f,paused$:c}=r.events,l=r.events.willSeek$.pipe(Bl(()=>r.info.playbackState$.getValue()===Fl.PLAYING)),p=r.events.seeked$.pipe(Bl(()=>r.info.playbackState$.getValue()===Fl.PLAYING)),v=!1,s=new Yi;i.add(l.subscribe(()=>{v||s.next(),v=!0})),i.add(p.subscribe(()=>v=!1));let d=new Yi,h=new Yi,g=Qi(f,p,d),b=Qi(c,s,o,r.events.looped$,h),m,y=()=>m=a.getValue(),K=()=>{let x=a.getValue();Ul(m)||m===x||Ul(x)||(t.next({from:m,to:x}),m=void 0)},te=()=>{h.next(),d.next()};if(i.add(g.subscribe(y)),i.add(b.subscribe(K)),e.forceInterval&&isFinite(e.forceInterval)){let x=0;i.add(g.subscribe(()=>x=window.setTimeout(te,e.forceInterval))),i.add(b.subscribe(()=>window.clearTimeout(x)))}return i});var Yl="_one-stat_",zl=`${Yl}uuid`,Ql=`${Yl}deviceId`,Ji=()=>{let r=new Zi;return{subscription:r,subscribe:(e,t)=>{e&&r.add(e.subscribe(t))}}},eo=class{constructor(e,t){this.subscription=new Zi;this.debugLogger=new yy;this.oneStatDebugLog=this.debugLogger.createComponentLog("onestat");this.loopCounter=0;this.disabled=!1;this.vsid$=new Kr(void 0);this.isid$=new Kr(void 0);this.zenUid$=new Kr(void 0);this.seekAction$=new Kr("unknown");var l,p,v;this.statContext=e,this.config=aa((l=t.config)!=null?l:{}),Se(t.apiEnv)&&(this.config.apiEnv=t.apiEnv),this.config.synchronizeTime&&(this.timeSynchronisation=new Ur);let i=new by;this.experimental={error$:i},Vr.get(zl)&&Vr.remove(zl);let a=Vr.get(Ql);this.statContext.deviceId?this.deviceId=this.statContext.deviceId:a?this.deviceId=a:(this.deviceId=Ct(),Vr.set(Ql,this.deviceId)),this.resetViewSession(),t.useIsid&&this.isid$.next((p=t.isid)!=null?p:Ml()),this.zenUid$.next(t.zenUid);let u=new ze({config:this.config,error$:i,timeSynchronisation:this.timeSynchronisation});this.api=new We({config:this.config,apiTransport:u,refreshAuthToken:t.refreshAuthToken,mobile:(v=this.statContext.mobile)!=null?v:!1,deviceId:this.deviceId,error$:i,vktvVersion:t.vktvVersion}),this.logger=new Fr({config:this.config,debugLogger:this.debugLogger,api:this.api,error$:i,userSalt:t.userSalt});let{isEmbed:f,topOrigin:c}=Iy();this.isEmbed=f,this.embedParent=c?new URL(c).hostname:void 0,this.subscribe()}updateContext(e){this.statContext=G(G({},this.statContext),e)}attachTo(e){let t=new Zi,i=(s,d)=>t.add(s.subscribe(d));i(e.events.willStart$,()=>{let s=e.info.position$.getValue();this.logActionPlay({position:s}),this.statContext.projectId&&this.logActionPlayInteractive()}),i(e.events.looped$,()=>{this.resetViewSession(),++this.loopCounter>this.config.maxLoops&&(this.disabled=!0),this.logActionPlay({position:e.info.position$.getValue()})}),i(e.events.seeked$,()=>{this.logSeek({action:this.seekAction$.getValue(),time:e.info.position$.getValue()}),this.seekAction$.next("unknown")}),i(e.events.paused$,()=>{this.logPause({position:e.info.position$.getValue()})}),i(e.events.willResume$,()=>{this.logPlay()}),i(e.events.started$,()=>{this.statContext.clip&&this.logWatchCoverageRecord({start:0,end:0})}),i(e.events.playing$,()=>{this.logPlaying()}),i(Vl(e,{forceInterval:this.config.watchCoverageInterval}),s=>{var b,m,y,K;let d=e.info.isLive$.getValue(),h=e.info.atLiveEdge$.getValue(),g={start:parseFloat(s.from.toFixed(3)),end:parseFloat(s.to.toFixed(3))};if(h){let te=(b=e.info.liveLatency$.getValue())!=null?b:0,x=(y=(m=e.info.currentBuffer$.getValue())==null?void 0:m.end)!=null?y:0,Ee=(K=e.info.liveBufferTime$.getValue())!=null?K:0,ro=Math.round((te-(x-Ee))*1e3),to=Math.round(te*1e3);ro&&to&&(g.latency=ro,g.bufferLatency=to)}d?this.logWatchCoverageLive(g):this.logWatchCoverageRecord(g)});let o;i(e.info.isStalled$,s=>{s?o=V():(Se(o)&&this.logEmptyBuffer({duration:V()-o}),o=void 0)});let a=!1;t.add(e.events.fatalError$.pipe(my()).subscribe(()=>a=!0)),i(e.events.willStop$,()=>{if(e.info.isStalled$.getValue()){let d=Se(o)?V()-o:void 0;this.logCloseAtEmptyBuffer({duration:d!=null?d:0}),o=void 0}else a||this.logActionStop()}),i(e.events.managedError$,({id:s})=>{this.logError({fatal:!1,errorType:s})}),i(e.events.fatalError$,({id:s})=>{this.logError({fatal:!0,errorType:s})});let u,f,c=!1;i(e.events.firstBytes$,s=>{u=V(),this.logFirstBytes({time:s})}),i(e.events.willStart$,()=>f=V()),i(e.info.currentBuffer$,s=>{!c&&s&&s.end-s.start>0&&Se(u)&&(this.logPlayerReady({duration:V()-u}),c=!0)}),i(e.events.firstFrame$,()=>{Se(u)&&!c&&(this.logPlayerReady({duration:V()-u}),c=!0),Se(f)&&this.logFirstFrame({time:V()-f})});let l;i(e.info.currentVideoStream$,s=>{s&&(l&&s.id!==l&&this.logTrackSwitch(s),l=s.id)});let p;i(e.info.currentAudioStream$,s=>{s&&(p&&s.id!==p&&this.logTrackSwitch(s),p=s.id)}),i(e.info.atLiveEdge$,s=>this.updateContext({liveEdge:s})),i(Kl({muted:e.info.muted$,volume:e.info.volume$}),({muted:s,volume:d})=>this.updateContext({audible:!s&&d>0})),i(e.info.currentQuality$,s=>{let d=bl(s);this.updateContext({quality:d}),d&&this.logQuality(d)}),i(e.info.isAutoQualityEnabled$,s=>this.updateContext({autoQuality:s})),i(e.info.currentFormat$,s=>this.updateContext({contentType:yl(s)})),i(e.info.currentPlaybackRate$,s=>this.updateContext({rate:s})),i(e.info.is3DVideo$,s=>this.updateContext({is3d:s}));let v;return i(e.info.hostname$,s=>{let d=v!==void 0&&v!==s;this.updateContext({cdnHostname:s,failover:d}),d&&this.logFailover(s),v=s}),i(e.info.throughputEstimation$,s=>this.updateContext({downloadSpeed:s})),i(e.info.httpConnectionType$,s=>{this.statContext.firstConnectionType||this.updateContext({firstConnectionType:Wi(s)}),this.updateContext({connectionType:Wi(s)})}),i(e.info.httpConnectionReused$,s=>{Wl(this.statContext.firstConnectionReused)&&this.updateContext({firstConnectionReused:s}),this.updateContext({connectionReused:s})}),i(e.info.surface$,s=>this.updateContext({mode:Br(s)})),i(Kl({current:e.info.currentTextTrack$,available:e.info.availableTextTracks$}),({current:s,available:d})=>{let h=d.find(({id:b})=>b===s),g=h&&(h.isAuto?`${h.language}_auto`:h.language);this.updateContext({subtitles:g==null?void 0:g.split(".")[0]})}),this.player=e,this.uiEvents&&this.attachToUi(this.uiEvents),this.resubscribeBeforeunload(),this.subscription.add(t),t}attachToUi(e){this.uiEvents=e;let{subscription:t,subscribe:i}=Ji();return this.player&&(i(e.actionRewind$,()=>{this.player&&(this.resetViewSession(),this.logActionPlay({position:this.player.info.position$.getValue()}))}),i(e.actionSeek$,this.seekAction$),i(e.inPiP$,o=>{var u;let a=o?"pip":Br((u=this.player)==null?void 0:u.info.surface$.getValue());this.updateContext({mode:a})}),i(e.inFullscreen$,o=>{var u;let a=o?"fullscreen":Br((u=this.player)==null?void 0:u.info.surface$.getValue());this.updateContext({mode:a})}),i(e.actionSetSubtitle$,o=>this.updateContext({subtitles:o.split(".")[0]})),i(e.nextMovie$,o=>this.logNextMovie(o)),this.resubscribeBeforeunload(),this.subscription.add(t)),t}attachToAds(e){let{subscription:t,subscribe:i}=Ji();return i(e.slotRequested$,()=>this.logAdSlotRequest()),i(e.started$,o=>this.logAdStarted(o)),i(e.paused$,()=>this.logAdPaused()),i(e.resumed$,()=>this.logAdResumed()),i(e.ended$,()=>this.logAdEnded()),i(e.skipped$,()=>this.logAdSkipped()),i(e.clicked$,()=>this.logAdClicked()),i(e.error$,o=>this.logError({errorType:o,fatal:!1})),this.resubscribeBeforeunload(),this.subscription.add(t),t}attachToInteractive(e){let{subscription:t,subscribe:i}=Ji();return i(e.click$,o=>this.logInterfaceClick(o)),i(e.nextMovie$,o=>this.logNextMovie(o)),this.resubscribeBeforeunload(),this.subscription.add(t),t}authorize(e){return this.api.authorize(e)}pause(){this.logger.pause(),this.oneStatDebugLog({message:"paused"})}resume(){this.logger.resume(),this.oneStatDebugLog({message:"resumed"})}destroy(){this.logger.flush(),this.subscription.unsubscribe(),this.api.destroy(),this.logger.destroy()}resetViewSession(){this.oneStatDebugLog({message:"VSID reset"}),this.vsid$.next(jl())}getDeviceId(){return this.deviceId}setFieldBlacklist(){}logInited(){}logReady(e){this.log({operation:"player_ready",param:String(e.time)})}logStarted(...e){this.logActionPlay(...e)}logPlay(){this.log({operation:"play_toggle"})}logPlaying(){this.log({operation:"playing"})}logPause(e){this.log({operation:"pause",param:String(Math.round(e.position))})}logSeek(e){this.log({operation:"seek",param:e.action,time:e.time})}logFirstBytes(e){this.log({operation:"first_bytes",param:String(e.time)})}logFirstFrame(e){this.log({operation:"first_frame",param:String(e.time)})}logError(e){this.log({operation:"content_error",param:`${e.fatal?"fatal":"recoverable"}_${e.errorType}`})}logWatchCoverageRecord(e){this.log({operation:"watch_coverage_record",param:`${e.start}-${e.end}`},{in_history:this.statContext.inHistory?1:void 0})}logWatchCoverageLive(e){var a,u;let t=(u=(a=this.timeSynchronisation)==null?void 0:a.getOffset())!=null?u:0,i=e.start+t,o=e.end+t;this.log({operation:"watch_coverage_live",param:`${i}-${o}`},{in_history:this.statContext.inHistory?1:void 0,latency:e.latency,buffer_latency:e.bufferLatency})}logEmptyBuffer(e){this.log({operation:"empty_buffer",param:String(e.duration)})}logDownloadSpeed(){}logAdSlotRequest(){this.log({operation:"adv",param:"slot_request"})}logAdStarted(e){this.log({operation:"adv",param:e})}logAdPaused(){this.log({operation:"adv",param:"pause"})}logAdResumed(){this.log({operation:"adv",param:"resume"})}logAdEnded(){this.log({operation:"adv",param:"ended"})}logAdSkipped(){this.log({operation:"adv",param:"skip"})}logAdClicked(){this.log({operation:"adv",param:"click"})}logInterfaceClick(e){this.log({operation:"player_interface_click",param:e})}logNextMovie(e){this.log({operation:"next_movie",param:String(e)})}subscribe(){this.resubscribeBeforeunload();let e=window.navigator.connection;e&&"onchange"in e&&"effectiveType"in e&&this.subscription.add(hy(Gl(e,"change"),gy(["init"])).subscribe(()=>this.updateContext({network:Il(e.effectiveType)}))),this.config.debugLog&&this.debugLogger.log$.subscribe(t=>{console.debug("%c stat ","background:#fa6470;",`component: ${t.component}.`,t.message)})}resubscribeBeforeunload(){var e;(e=this.beforeunloadSubscription)==null||e.unsubscribe(),this.beforeunloadSubscription=Gl(window,"beforeunload").subscribe(()=>this.logger.flush({wantBeacon:!0,clearStorage:this.config.clearStorageAtUnload})),this.subscription.add(this.beforeunloadSubscription)}logPlayerReady(e){this.log({operation:"player_ready",param:String(Math.round(e.duration))})}logActionPlay(e){this.log({operation:"action_play",param:String(Math.round(e.position))})}logActionPlayInteractive(){this.statContext.projectId&&this.log({operation:"action_play_interactive",param:String(this.statContext.movieId)},{vid:this.statContext.projectId})}logFailover(e){this.log({operation:"failover",param:e})}logCloseAtEmptyBuffer(e){this.log({operation:"close_at_empty_buffer",param:String(Math.round(e.duration))})}logActionStop(){this.log({operation:"action_stop"})}logTrackSwitch(e){this.log({operation:"track_switch",param:e.id})}logQuality(e){this.log({operation:"quality",param:e})}log(e,t={}){if(this.disabled){this.oneStatDebugLog({message:`operation ${e.operation} but statistics is disabled`});return}if((0,Xi.default)(this.config.disabledOperations,e.operation)){this.oneStatDebugLog({message:`operation ${e.operation} but it is disabled`});return}this.oneStatDebugLog({message:`operation ${e.operation} ${e.param}`});let i=this.createLogItem(e,t);this.logger.log(i)}createLogItem({operation:e,param:t,time:i},o={}){var d,h,g,b,m,y;let a=(h=(d=this.timeSynchronisation)==null?void 0:d.now())!=null?h:V(),u=this.vsid$.getValue();vy(u);let f=this.isid$.getValue(),c=e==="empty_buffer"||e==="close_at_empty_buffer"?this.statContext.connectionType:this.statContext.firstConnectionType,l=this.statContext.firstConnectionReused,p,v;if(this.isEmbed||this.statContext.place==="embed"){p=this.embedParent;let K=[...new URLSearchParams(location.search).entries()].filter(([te,x])=>(0,Xi.default)(this.config.embedUrlParams,te));v=new URLSearchParams(K).toString()}else this.statContext.place==="direct"&&(this.statContext.refDomain?p=(b=(g=Hl(this.statContext.refDomain))==null?void 0:g.hostname)!=null?b:this.statContext.refDomain:document.referrer&&(p=(y=(m=Hl(document.referrer))==null?void 0:m.hostname)!=null?y:document.referrer),v=location.href.substring(0,1024));let s=G({vsid:u,isid:f,vid:this.statContext.movieId,uid:this.zenUid$.getValue(),ct:this.statContext.contentType,place:this.isEmbed?"embed":this.statContext.place,quality:this.statContext.quality,cdn_host:this.statContext.cdnHostname,stat_type:this.statContext.autoplay===!0?"auto":this.statContext.autoplay===!1?"":void 0,param:t,vk_app_id:this.statContext.vkAppId,track_code:this.statContext.trackCode,connection_type:c,connection_reused:l===!0?1:l===!1?0:void 0,cached_data:this.statContext.cached===!0?1:this.statContext.cached===!1?0:void 0,live:this.statContext.liveEdge?1:void 0,muted:this.statContext.audible===!1?1:void 0,mode:this.statContext.mode,subtitles:this.statContext.subtitles,download_speed:this.statContext.downloadSpeed,manual_quality:this.statContext.autoQuality?void 0:1,ref_domain:p,direct_url:v,rate:this.statContext.rate===1||Wl(this.statContext.rate)?void 0:this.statContext.rate.toFixed(2),view_360:this.statContext.is3d?1:void 0,aid:this.statContext.albumId,vk_playlist_id:this.statContext.vkPlaylistId},o);for(let K of this.config.disabledCustomFields)delete s[K];return{operation:e,type:1,time:i,network:this.statContext.network,timestamp:a,custom:s}}};export{Le as ApiEnv,xt as ConnectionType,wt as ContentType,ea as InteractiveInterfaceClick,eo as OneStat,Ot as Quality,Rt as SeekAction,ar as VERSION};
|
|
6
|
+
var zl=Object.create;var Gr=Object.defineProperty,Ql=Object.defineProperties,Yl=Object.getOwnPropertyDescriptor,Jl=Object.getOwnPropertyDescriptors,Xl=Object.getOwnPropertyNames,io=Object.getOwnPropertySymbols,Zl=Object.getPrototypeOf,no=Object.prototype.hasOwnProperty,ef=Object.prototype.propertyIsEnumerable;var Wr=Math.pow,oo=(r,e,t)=>e in r?Gr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,G=(r,e)=>{for(var t in e||(e={}))no.call(e,t)&&oo(r,t,e[t]);if(io)for(var t of io(e))ef.call(e,t)&&oo(r,t,e[t]);return r},Ye=(r,e)=>Ql(r,Jl(e));var n=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var rf=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Xl(e))!no.call(r,o)&&o!==t&&Gr(r,o,{get:()=>e[o],enumerable:!(i=Yl(e,o))||i.enumerable});return r};var M=(r,e,t)=>(t=r!=null?zl(Zl(r)):{},rf(e||!r||!r.__esModule?Gr(t,"default",{value:r,enumerable:!0}):t,r));var k=(r,e,t)=>new Promise((i,o)=>{var a=c=>{try{f(t.next(c))}catch(l){o(l)}},u=c=>{try{f(t.throw(c))}catch(l){o(l)}},f=c=>c.done?i(c.value):Promise.resolve(c.value).then(a,u);f((t=t.apply(r,e)).next())});var I=n((Hr,ao)=>{"use strict";var Se=function(r){return r&&r.Math===Math&&r};ao.exports=Se(typeof globalThis=="object"&&globalThis)||Se(typeof window=="object"&&window)||Se(typeof self=="object"&&self)||Se(typeof global=="object"&&global)||Se(typeof Hr=="object"&&Hr)||function(){return this}()||Function("return this")()});var E=n((yy,so)=>{"use strict";so.exports=function(r){try{return!!r()}catch(e){return!0}}});var Ee=n((Iy,uo)=>{"use strict";var tf=E();uo.exports=!tf(function(){var r=function(){}.bind();return typeof r!="function"||r.hasOwnProperty("prototype")})});var zr=n((Sy,po)=>{"use strict";var of=Ee(),fo=Function.prototype,co=fo.apply,lo=fo.call;po.exports=typeof Reflect=="object"&&Reflect.apply||(of?lo.bind(co):function(){return lo.apply(co,arguments)})});var P=n((Ey,go)=>{"use strict";var vo=Ee(),ho=Function.prototype,Qr=ho.call,nf=vo&&ho.bind.bind(Qr,Qr);go.exports=vo?nf:function(r){return function(){return Qr.apply(r,arguments)}}});var qe=n((qy,bo)=>{"use strict";var mo=P(),af=mo({}.toString),sf=mo("".slice);bo.exports=function(r){return sf(af(r),8,-1)}});var Yr=n((Py,yo)=>{"use strict";var uf=qe(),cf=P();yo.exports=function(r){if(uf(r)==="Function")return cf(r)}});var S=n((Ty,Io)=>{"use strict";var Jr=typeof document=="object"&&document.all;Io.exports=typeof Jr=="undefined"&&Jr!==void 0?function(r){return typeof r=="function"||r===Jr}:function(r){return typeof r=="function"}});var T=n((Oy,So)=>{"use strict";var lf=E();So.exports=!lf(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var R=n((_y,Eo)=>{"use strict";var ff=Ee(),Je=Function.prototype.call;Eo.exports=ff?Je.bind(Je):function(){return Je.apply(Je,arguments)}});var Xr=n(To=>{"use strict";var qo={}.propertyIsEnumerable,Po=Object.getOwnPropertyDescriptor,df=Po&&!qo.call({1:2},1);To.f=df?function(e){var t=Po(this,e);return!!t&&t.enumerable}:qo});var Pe=n((xy,Oo)=>{"use strict";Oo.exports=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}}});var wo=n((Ry,_o)=>{"use strict";var pf=P(),vf=E(),hf=qe(),Zr=Object,gf=pf("".split);_o.exports=vf(function(){return!Zr("z").propertyIsEnumerable(0)})?function(r){return hf(r)==="String"?gf(r,""):Zr(r)}:Zr});var Te=n((Cy,xo)=>{"use strict";xo.exports=function(r){return r==null}});var te=n((Ay,Ro)=>{"use strict";var mf=Te(),bf=TypeError;Ro.exports=function(r){if(mf(r))throw new bf("Can't call method on "+r);return r}});var H=n((Ny,Co)=>{"use strict";var yf=wo(),If=te();Co.exports=function(r){return yf(If(r))}});var C=n((Ly,Ao)=>{"use strict";var Sf=S();Ao.exports=function(r){return typeof r=="object"?r!==null:Sf(r)}});var Oe=n((ky,No)=>{"use strict";No.exports={}});var j=n((Dy,ko)=>{"use strict";var et=Oe(),rt=I(),Ef=S(),Lo=function(r){return Ef(r)?r:void 0};ko.exports=function(r,e){return arguments.length<2?Lo(et[r])||Lo(rt[r]):et[r]&&et[r][e]||rt[r]&&rt[r][e]}});var Xe=n(($y,Do)=>{"use strict";var qf=P();Do.exports=qf({}.isPrototypeOf)});var z=n((My,jo)=>{"use strict";var Pf=I(),$o=Pf.navigator,Mo=$o&&$o.userAgent;jo.exports=Mo?String(Mo):""});var it=n((jy,Go)=>{"use strict";var Ko=I(),tt=z(),Fo=Ko.process,Bo=Ko.Deno,Uo=Fo&&Fo.versions||Bo&&Bo.version,Vo=Uo&&Uo.v8,A,Ze;Vo&&(A=Vo.split("."),Ze=A[0]>0&&A[0]<4?1:+(A[0]+A[1]));!Ze&&tt&&(A=tt.match(/Edge\/(\d+)/),(!A||A[1]>=74)&&(A=tt.match(/Chrome\/(\d+)/),A&&(Ze=+A[1])));Go.exports=Ze});var ot=n((Fy,Ho)=>{"use strict";var Wo=it(),Tf=E(),Of=I(),_f=Of.String;Ho.exports=!!Object.getOwnPropertySymbols&&!Tf(function(){var r=Symbol("symbol detection");return!_f(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&Wo&&Wo<41})});var nt=n((By,zo)=>{"use strict";var wf=ot();zo.exports=wf&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var at=n((Uy,Qo)=>{"use strict";var xf=j(),Rf=S(),Cf=Xe(),Af=nt(),Nf=Object;Qo.exports=Af?function(r){return typeof r=="symbol"}:function(r){var e=xf("Symbol");return Rf(e)&&Cf(e.prototype,Nf(r))}});var _e=n((Vy,Yo)=>{"use strict";var Lf=String;Yo.exports=function(r){try{return Lf(r)}catch(e){return"Object"}}});var F=n((Ky,Jo)=>{"use strict";var kf=S(),Df=_e(),$f=TypeError;Jo.exports=function(r){if(kf(r))return r;throw new $f(Df(r)+" is not a function")}});var er=n((Gy,Xo)=>{"use strict";var Mf=F(),jf=Te();Xo.exports=function(r,e){var t=r[e];return jf(t)?void 0:Mf(t)}});var en=n((Wy,Zo)=>{"use strict";var st=R(),ut=S(),ct=C(),Ff=TypeError;Zo.exports=function(r,e){var t,i;if(e==="string"&&ut(t=r.toString)&&!ct(i=st(t,r))||ut(t=r.valueOf)&&!ct(i=st(t,r))||e!=="string"&&ut(t=r.toString)&&!ct(i=st(t,r)))return i;throw new Ff("Can't convert object to primitive value")}});var D=n((Hy,rn)=>{"use strict";rn.exports=!0});var nn=n((zy,on)=>{"use strict";var tn=I(),Bf=Object.defineProperty;on.exports=function(r,e){try{Bf(tn,r,{value:e,configurable:!0,writable:!0})}catch(t){tn[r]=e}return e}});var we=n((Qy,un)=>{"use strict";var Uf=D(),Vf=I(),Kf=nn(),an="__core-js_shared__",sn=un.exports=Vf[an]||Kf(an,{});(sn.versions||(sn.versions=[])).push({version:"3.38.0",mode:Uf?"pure":"global",copyright:"\xA9 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var lt=n((Yy,ln)=>{"use strict";var cn=we();ln.exports=function(r,e){return cn[r]||(cn[r]=e||{})}});var ft=n((Jy,fn)=>{"use strict";var Gf=te(),Wf=Object;fn.exports=function(r){return Wf(Gf(r))}});var $=n((Xy,dn)=>{"use strict";var Hf=P(),zf=ft(),Qf=Hf({}.hasOwnProperty);dn.exports=Object.hasOwn||function(e,t){return Qf(zf(e),t)}});var dt=n((Zy,pn)=>{"use strict";var Yf=P(),Jf=0,Xf=Math.random(),Zf=Yf(1 .toString);pn.exports=function(r){return"Symbol("+(r===void 0?"":r)+")_"+Zf(++Jf+Xf,36)}});var O=n((eI,hn)=>{"use strict";var ed=I(),rd=lt(),vn=$(),td=dt(),id=ot(),od=nt(),ie=ed.Symbol,pt=rd("wks"),nd=od?ie.for||ie:ie&&ie.withoutSetter||td;hn.exports=function(r){return vn(pt,r)||(pt[r]=id&&vn(ie,r)?ie[r]:nd("Symbol."+r)),pt[r]}});var yn=n((rI,bn)=>{"use strict";var ad=R(),gn=C(),mn=at(),sd=er(),ud=en(),cd=O(),ld=TypeError,fd=cd("toPrimitive");bn.exports=function(r,e){if(!gn(r)||mn(r))return r;var t=sd(r,fd),i;if(t){if(e===void 0&&(e="default"),i=ad(t,r,e),!gn(i)||mn(i))return i;throw new ld("Can't convert object to primitive value")}return e===void 0&&(e="number"),ud(r,e)}});var vt=n((tI,In)=>{"use strict";var dd=yn(),pd=at();In.exports=function(r){var e=dd(r,"string");return pd(e)?e:e+""}});var rr=n((iI,En)=>{"use strict";var vd=I(),Sn=C(),ht=vd.document,hd=Sn(ht)&&Sn(ht.createElement);En.exports=function(r){return hd?ht.createElement(r):{}}});var gt=n((oI,qn)=>{"use strict";var gd=T(),md=E(),bd=rr();qn.exports=!gd&&!md(function(){return Object.defineProperty(bd("div"),"a",{get:function(){return 7}}).a!==7})});var On=n(Tn=>{"use strict";var yd=T(),Id=R(),Sd=Xr(),Ed=Pe(),qd=H(),Pd=vt(),Td=$(),Od=gt(),Pn=Object.getOwnPropertyDescriptor;Tn.f=yd?Pn:function(e,t){if(e=qd(e),t=Pd(t),Od)try{return Pn(e,t)}catch(i){}if(Td(e,t))return Ed(!Id(Sd.f,e,t),e[t])}});var mt=n((aI,_n)=>{"use strict";var _d=E(),wd=S(),xd=/#|\.prototype\./,xe=function(r,e){var t=Cd[Rd(r)];return t===Nd?!0:t===Ad?!1:wd(e)?_d(e):!!e},Rd=xe.normalize=function(r){return String(r).replace(xd,".").toLowerCase()},Cd=xe.data={},Ad=xe.NATIVE="N",Nd=xe.POLYFILL="P";_n.exports=xe});var Re=n((sI,xn)=>{"use strict";var wn=Yr(),Ld=F(),kd=Ee(),Dd=wn(wn.bind);xn.exports=function(r,e){return Ld(r),e===void 0?r:kd?Dd(r,e):function(){return r.apply(e,arguments)}}});var bt=n((uI,Rn)=>{"use strict";var $d=T(),Md=E();Rn.exports=$d&&Md(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var B=n((cI,Cn)=>{"use strict";var jd=C(),Fd=String,Bd=TypeError;Cn.exports=function(r){if(jd(r))return r;throw new Bd(Fd(r)+" is not an object")}});var Q=n(Nn=>{"use strict";var Ud=T(),Vd=gt(),Kd=bt(),tr=B(),An=vt(),Gd=TypeError,yt=Object.defineProperty,Wd=Object.getOwnPropertyDescriptor,It="enumerable",St="configurable",Et="writable";Nn.f=Ud?Kd?function(e,t,i){if(tr(e),t=An(t),tr(i),typeof e=="function"&&t==="prototype"&&"value"in i&&Et in i&&!i[Et]){var o=Wd(e,t);o&&o[Et]&&(e[t]=i.value,i={configurable:St in i?i[St]:o[St],enumerable:It in i?i[It]:o[It],writable:!1})}return yt(e,t,i)}:yt:function(e,t,i){if(tr(e),t=An(t),tr(i),Vd)try{return yt(e,t,i)}catch(o){}if("get"in i||"set"in i)throw new Gd("Accessors not supported");return"value"in i&&(e[t]=i.value),e}});var oe=n((fI,Ln)=>{"use strict";var Hd=T(),zd=Q(),Qd=Pe();Ln.exports=Hd?function(r,e,t){return zd.f(r,e,Qd(1,t))}:function(r,e,t){return r[e]=t,r}});var _=n((dI,Dn)=>{"use strict";var Ce=I(),Yd=zr(),Jd=Yr(),Xd=S(),Zd=On().f,ep=mt(),ne=Oe(),rp=Re(),ae=oe(),kn=$();we();var tp=function(r){var e=function(t,i,o){if(this instanceof e){switch(arguments.length){case 0:return new r;case 1:return new r(t);case 2:return new r(t,i)}return new r(t,i,o)}return Yd(r,this,arguments)};return e.prototype=r.prototype,e};Dn.exports=function(r,e){var t=r.target,i=r.global,o=r.stat,a=r.proto,u=i?Ce:o?Ce[t]:Ce[t]&&Ce[t].prototype,f=i?ne:ne[t]||ae(ne,t,{})[t],c=f.prototype,l,p,v,s,d,h,g,b,m;for(s in e)l=ep(i?s:t+(o?".":"#")+s,r.forced),p=!l&&u&&kn(u,s),h=f[s],p&&(r.dontCallGetSet?(m=Zd(u,s),g=m&&m.value):g=u[s]),d=p&&g?g:e[s],!(!l&&!a&&typeof h==typeof d)&&(r.bind&&p?b=rp(d,Ce):r.wrap&&p?b=tp(d):a&&Xd(d)?b=Jd(d):b=d,(r.sham||d&&d.sham||h&&h.sham)&&ae(b,"sham",!0),ae(f,s,b),a&&(v=t+"Prototype",kn(ne,v)||ae(ne,v,{}),ae(ne[v],s,d),r.real&&c&&(l||!c[s])&&ae(c,s,d)))}});var Mn=n((pI,$n)=>{"use strict";var ip=Math.ceil,op=Math.floor;$n.exports=Math.trunc||function(e){var t=+e;return(t>0?op:ip)(t)}});var ir=n((vI,jn)=>{"use strict";var np=Mn();jn.exports=function(r){var e=+r;return e!==e||e===0?0:np(e)}});var Bn=n((hI,Fn)=>{"use strict";var ap=ir(),sp=Math.max,up=Math.min;Fn.exports=function(r,e){var t=ap(r);return t<0?sp(t+e,0):up(t,e)}});var qt=n((gI,Un)=>{"use strict";var cp=ir(),lp=Math.min;Un.exports=function(r){var e=cp(r);return e>0?lp(e,9007199254740991):0}});var Pt=n((mI,Vn)=>{"use strict";var fp=qt();Vn.exports=function(r){return fp(r.length)}});var Tt=n((bI,Gn)=>{"use strict";var dp=H(),pp=Bn(),vp=Pt(),Kn=function(r){return function(e,t,i){var o=dp(e),a=vp(o);if(a===0)return!r&&-1;var u=pp(i,a),f;if(r&&t!==t){for(;a>u;)if(f=o[u++],f!==f)return!0}else for(;a>u;u++)if((r||u in o)&&o[u]===t)return r||u||0;return!r&&-1}};Gn.exports={includes:Kn(!0),indexOf:Kn(!1)}});var Ot=n((yI,Wn)=>{"use strict";Wn.exports=function(){}});var Hn=n(()=>{"use strict";var hp=_(),gp=Tt().includes,mp=E(),bp=Ot(),yp=mp(function(){return!Array(1).includes()});hp({target:"Array",proto:!0,forced:yp},{includes:function(e){return gp(this,e,arguments.length>1?arguments[1]:void 0)}});bp("includes")});var or=n((EI,zn)=>{"use strict";var Ip=j();zn.exports=Ip});var Yn=n((qI,Qn)=>{"use strict";Hn();var Sp=or();Qn.exports=Sp("Array","includes")});var Xn=n((PI,Jn)=>{"use strict";var Ep=Yn();Jn.exports=Ep});var nr=n((TI,Zn)=>{"use strict";var qp=Xn();Zn.exports=qp});var sa=n(()=>{"use strict"});var Nt=n((MI,ua)=>{"use strict";var Ne=I(),Op=z(),_p=qe(),sr=function(r){return Op.slice(0,r.length)===r};ua.exports=function(){return sr("Bun/")?"BUN":sr("Cloudflare-Workers")?"CLOUDFLARE":sr("Deno/")?"DENO":sr("Node.js/")?"NODE":Ne.Bun&&typeof Bun.version=="string"?"BUN":Ne.Deno&&typeof Deno.version=="object"?"DENO":_p(Ne.process)==="process"?"NODE":Ne.window&&Ne.document?"BROWSER":"REST"}()});var ur=n((jI,ca)=>{"use strict";var wp=Nt();ca.exports=wp==="NODE"});var se=n((FI,la)=>{"use strict";var xp=oe();la.exports=function(r,e,t,i){return i&&i.enumerable?r[e]=t:xp(r,e,t),r}});var da=n((BI,fa)=>{"use strict";var Rp=P(),Cp=F();fa.exports=function(r,e,t){try{return Rp(Cp(Object.getOwnPropertyDescriptor(r,e)[t]))}catch(i){}}});var va=n((UI,pa)=>{"use strict";var Ap=C();pa.exports=function(r){return Ap(r)||r===null}});var ga=n((VI,ha)=>{"use strict";var Np=va(),Lp=String,kp=TypeError;ha.exports=function(r){if(Np(r))return r;throw new kp("Can't set "+Lp(r)+" as a prototype")}});var Lt=n((KI,ma)=>{"use strict";var Dp=da(),$p=C(),Mp=te(),jp=ga();ma.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var r=!1,e={},t;try{t=Dp(Object.prototype,"__proto__","set"),t(e,[]),r=e instanceof Array}catch(i){}return function(o,a){return Mp(o),jp(a),$p(o)&&(r?t(o,a):o.__proto__=a),o}}():void 0)});var cr=n((GI,ya)=>{"use strict";var Fp=O(),Bp=Fp("toStringTag"),ba={};ba[Bp]="z";ya.exports=String(ba)==="[object z]"});var Le=n((WI,Ia)=>{"use strict";var Up=cr(),Vp=S(),lr=qe(),Kp=O(),Gp=Kp("toStringTag"),Wp=Object,Hp=lr(function(){return arguments}())==="Arguments",zp=function(r,e){try{return r[e]}catch(t){}};Ia.exports=Up?lr:function(r){var e,t,i;return r===void 0?"Undefined":r===null?"Null":typeof(t=zp(e=Wp(r),Gp))=="string"?t:Hp?lr(e):(i=lr(e))==="Object"&&Vp(e.callee)?"Arguments":i}});var Ea=n((HI,Sa)=>{"use strict";var Qp=cr(),Yp=Le();Sa.exports=Qp?{}.toString:function(){return"[object "+Yp(this)+"]"}});var ke=n((zI,Pa)=>{"use strict";var Jp=cr(),Xp=Q().f,Zp=oe(),ev=$(),rv=Ea(),tv=O(),qa=tv("toStringTag");Pa.exports=function(r,e,t,i){var o=t?r:r&&r.prototype;o&&(ev(o,qa)||Xp(o,qa,{configurable:!0,value:e}),i&&!Jp&&Zp(o,"toString",rv))}});var Oa=n((QI,Ta)=>{"use strict";var iv=Q();Ta.exports=function(r,e,t){return iv.f(r,e,t)}});var xa=n((YI,wa)=>{"use strict";var ov=j(),nv=Oa(),av=O(),sv=T(),_a=av("species");wa.exports=function(r){var e=ov(r);sv&&e&&!e[_a]&&nv(e,_a,{configurable:!0,get:function(){return this}})}});var Ca=n((JI,Ra)=>{"use strict";var uv=Xe(),cv=TypeError;Ra.exports=function(r,e){if(uv(e,r))return r;throw new cv("Incorrect invocation")}});var Dt=n((XI,Aa)=>{"use strict";var lv=P(),fv=S(),kt=we(),dv=lv(Function.toString);fv(kt.inspectSource)||(kt.inspectSource=function(r){return dv(r)});Aa.exports=kt.inspectSource});var Ma=n((ZI,$a)=>{"use strict";var pv=P(),vv=E(),Na=S(),hv=Le(),gv=j(),mv=Dt(),La=function(){},ka=gv("Reflect","construct"),$t=/^\s*(?:class|function)\b/,bv=pv($t.exec),yv=!$t.test(La),De=function(e){if(!Na(e))return!1;try{return ka(La,[],e),!0}catch(t){return!1}},Da=function(e){if(!Na(e))return!1;switch(hv(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return yv||!!bv($t,mv(e))}catch(t){return!0}};Da.sham=!0;$a.exports=!ka||vv(function(){var r;return De(De.call)||!De(Object)||!De(function(){r=!0})||r})?Da:De});var Fa=n((eS,ja)=>{"use strict";var Iv=Ma(),Sv=_e(),Ev=TypeError;ja.exports=function(r){if(Iv(r))return r;throw new Ev(Sv(r)+" is not a constructor")}});var Mt=n((rS,Ua)=>{"use strict";var Ba=B(),qv=Fa(),Pv=Te(),Tv=O(),Ov=Tv("species");Ua.exports=function(r,e){var t=Ba(r).constructor,i;return t===void 0||Pv(i=Ba(t)[Ov])?e:qv(i)}});var jt=n((tS,Va)=>{"use strict";var _v=j();Va.exports=_v("document","documentElement")});var Ga=n((iS,Ka)=>{"use strict";var wv=P();Ka.exports=wv([].slice)});var Ha=n((oS,Wa)=>{"use strict";var xv=TypeError;Wa.exports=function(r,e){if(r<e)throw new xv("Not enough arguments");return r}});var Ft=n((nS,za)=>{"use strict";var Rv=z();za.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(Rv)});var Qt=n((aS,is)=>{"use strict";var w=I(),Cv=zr(),Av=Re(),Qa=S(),Nv=$(),ts=E(),Ya=jt(),Lv=Ga(),Ja=rr(),kv=Ha(),Dv=Ft(),$v=ur(),Wt=w.setImmediate,Ht=w.clearImmediate,Mv=w.process,Bt=w.Dispatch,jv=w.Function,Xa=w.MessageChannel,Fv=w.String,Ut=0,$e={},Za="onreadystatechange",Me,Y,Vt,Kt;ts(function(){Me=w.location});var zt=function(r){if(Nv($e,r)){var e=$e[r];delete $e[r],e()}},Gt=function(r){return function(){zt(r)}},es=function(r){zt(r.data)},rs=function(r){w.postMessage(Fv(r),Me.protocol+"//"+Me.host)};(!Wt||!Ht)&&(Wt=function(e){kv(arguments.length,1);var t=Qa(e)?e:jv(e),i=Lv(arguments,1);return $e[++Ut]=function(){Cv(t,void 0,i)},Y(Ut),Ut},Ht=function(e){delete $e[e]},$v?Y=function(r){Mv.nextTick(Gt(r))}:Bt&&Bt.now?Y=function(r){Bt.now(Gt(r))}:Xa&&!Dv?(Vt=new Xa,Kt=Vt.port2,Vt.port1.onmessage=es,Y=Av(Kt.postMessage,Kt)):w.addEventListener&&Qa(w.postMessage)&&!w.importScripts&&Me&&Me.protocol!=="file:"&&!ts(rs)?(Y=rs,w.addEventListener("message",es,!1)):Za in Ja("script")?Y=function(r){Ya.appendChild(Ja("script"))[Za]=function(){Ya.removeChild(this),zt(r)}}:Y=function(r){setTimeout(Gt(r),0)});is.exports={set:Wt,clear:Ht}});var as=n((sS,ns)=>{"use strict";var os=I(),Bv=T(),Uv=Object.getOwnPropertyDescriptor;ns.exports=function(r){if(!Bv)return os[r];var e=Uv(os,r);return e&&e.value}});var Yt=n((uS,us)=>{"use strict";var ss=function(){this.head=null,this.tail=null};ss.prototype={add:function(r){var e={item:r,next:null},t=this.tail;t?t.next=e:this.head=e,this.tail=e},get:function(){var r=this.head;if(r){var e=this.head=r.next;return e===null&&(this.tail=null),r.item}}};us.exports=ss});var ls=n((cS,cs)=>{"use strict";var Vv=z();cs.exports=/ipad|iphone|ipod/i.test(Vv)&&typeof Pebble!="undefined"});var ds=n((lS,fs)=>{"use strict";var Kv=z();fs.exports=/web0s(?!.*chrome)/i.test(Kv)});var ys=n((fS,bs)=>{"use strict";var ce=I(),Gv=as(),ps=Re(),Jt=Qt().set,Wv=Yt(),Hv=Ft(),zv=ls(),Qv=ds(),Xt=ur(),vs=ce.MutationObserver||ce.WebKitMutationObserver,hs=ce.document,gs=ce.process,fr=ce.Promise,ri=Gv("queueMicrotask"),ue,Zt,ei,dr,ms;ri||(je=new Wv,Fe=function(){var r,e;for(Xt&&(r=gs.domain)&&r.exit();e=je.get();)try{e()}catch(t){throw je.head&&ue(),t}r&&r.enter()},!Hv&&!Xt&&!Qv&&vs&&hs?(Zt=!0,ei=hs.createTextNode(""),new vs(Fe).observe(ei,{characterData:!0}),ue=function(){ei.data=Zt=!Zt}):!zv&&fr&&fr.resolve?(dr=fr.resolve(void 0),dr.constructor=fr,ms=ps(dr.then,dr),ue=function(){ms(Fe)}):Xt?ue=function(){gs.nextTick(Fe)}:(Jt=ps(Jt,ce),ue=function(){Jt(Fe)}),ri=function(r){je.head||ue(),je.add(r)});var je,Fe;bs.exports=ri});var Ss=n((dS,Is)=>{"use strict";Is.exports=function(r,e){try{arguments.length===1?console.error(r):console.error(r,e)}catch(t){}}});var pr=n((pS,Es)=>{"use strict";Es.exports=function(r){try{return{error:!1,value:r()}}catch(e){return{error:!0,value:e}}}});var Ts=n((vS,Ps)=>{"use strict";var Yv=I(),Jv=S(),qs=Yv.WeakMap;Ps.exports=Jv(qs)&&/native code/.test(String(qs))});var vr=n((hS,_s)=>{"use strict";var Xv=lt(),Zv=dt(),Os=Xv("keys");_s.exports=function(r){return Os[r]||(Os[r]=Zv(r))}});var hr=n((gS,ws)=>{"use strict";ws.exports={}});var ni=n((mS,Cs)=>{"use strict";var eh=Ts(),Rs=I(),rh=C(),th=oe(),ti=$(),ii=we(),ih=vr(),oh=hr(),xs="Object already initialized",oi=Rs.TypeError,nh=Rs.WeakMap,gr,Be,mr,ah=function(r){return mr(r)?Be(r):gr(r,{})},sh=function(r){return function(e){var t;if(!rh(e)||(t=Be(e)).type!==r)throw new oi("Incompatible receiver, "+r+" required");return t}};eh||ii.state?(N=ii.state||(ii.state=new nh),N.get=N.get,N.has=N.has,N.set=N.set,gr=function(r,e){if(N.has(r))throw new oi(xs);return e.facade=r,N.set(r,e),e},Be=function(r){return N.get(r)||{}},mr=function(r){return N.has(r)}):(J=ih("state"),oh[J]=!0,gr=function(r,e){if(ti(r,J))throw new oi(xs);return e.facade=r,th(r,J,e),e},Be=function(r){return ti(r,J)?r[J]:{}},mr=function(r){return ti(r,J)});var N,J;Cs.exports={set:gr,get:Be,has:mr,enforce:ah,getterFor:sh}});var X=n((bS,As)=>{"use strict";var uh=I();As.exports=uh.Promise});var le=n((yS,Ds)=>{"use strict";var ch=I(),Ue=X(),lh=S(),fh=mt(),dh=Dt(),ph=O(),Ns=Nt(),vh=D(),ai=it(),Ls=Ue&&Ue.prototype,hh=ph("species"),si=!1,ks=lh(ch.PromiseRejectionEvent),gh=fh("Promise",function(){var r=dh(Ue),e=r!==String(Ue);if(!e&&ai===66||vh&&!(Ls.catch&&Ls.finally))return!0;if(!ai||ai<51||!/native code/.test(r)){var t=new Ue(function(a){a(1)}),i=function(a){a(function(){},function(){})},o=t.constructor={};if(o[hh]=i,si=t.then(function(){})instanceof i,!si)return!0}return!e&&(Ns==="BROWSER"||Ns==="DENO")&&!ks});Ds.exports={CONSTRUCTOR:gh,REJECTION_EVENT:ks,SUBCLASSING:si}});var fe=n((IS,Ms)=>{"use strict";var $s=F(),mh=TypeError,bh=function(r){var e,t;this.promise=new r(function(i,o){if(e!==void 0||t!==void 0)throw new mh("Bad Promise constructor");e=i,t=o}),this.resolve=$s(e),this.reject=$s(t)};Ms.exports.f=function(r){return new bh(r)}});var iu=n(()=>{"use strict";var yh=_(),Ih=D(),Sr=ur(),W=I(),he=R(),js=se(),Fs=Lt(),Sh=ke(),Eh=xa(),qh=F(),Ir=S(),Ph=C(),Th=Ca(),Oh=Mt(),Gs=Qt().set,di=ys(),_h=Ss(),wh=pr(),xh=Yt(),Ws=ni(),Er=X(),pi=le(),Hs=fe(),qr="Promise",zs=pi.CONSTRUCTOR,Rh=pi.REJECTION_EVENT,Ch=pi.SUBCLASSING,ui=Ws.getterFor(qr),Ah=Ws.set,de=Er&&Er.prototype,Z=Er,br=de,Qs=W.TypeError,ci=W.document,vi=W.process,li=Hs.f,Nh=li,Lh=!!(ci&&ci.createEvent&&W.dispatchEvent),Ys="unhandledrejection",kh="rejectionhandled",Bs=0,Js=1,Dh=2,hi=1,Xs=2,yr,Us,$h,Vs,Zs=function(r){var e;return Ph(r)&&Ir(e=r.then)?e:!1},eu=function(r,e){var t=e.value,i=e.state===Js,o=i?r.ok:r.fail,a=r.resolve,u=r.reject,f=r.domain,c,l,p;try{o?(i||(e.rejection===Xs&&jh(e),e.rejection=hi),o===!0?c=t:(f&&f.enter(),c=o(t),f&&(f.exit(),p=!0)),c===r.promise?u(new Qs("Promise-chain cycle")):(l=Zs(c))?he(l,c,a,u):a(c)):u(t)}catch(v){f&&!p&&f.exit(),u(v)}},ru=function(r,e){r.notified||(r.notified=!0,di(function(){for(var t=r.reactions,i;i=t.get();)eu(i,r);r.notified=!1,e&&!r.rejection&&Mh(r)}))},tu=function(r,e,t){var i,o;Lh?(i=ci.createEvent("Event"),i.promise=e,i.reason=t,i.initEvent(r,!1,!0),W.dispatchEvent(i)):i={promise:e,reason:t},!Rh&&(o=W["on"+r])?o(i):r===Ys&&_h("Unhandled promise rejection",t)},Mh=function(r){he(Gs,W,function(){var e=r.facade,t=r.value,i=Ks(r),o;if(i&&(o=wh(function(){Sr?vi.emit("unhandledRejection",t,e):tu(Ys,e,t)}),r.rejection=Sr||Ks(r)?Xs:hi,o.error))throw o.value})},Ks=function(r){return r.rejection!==hi&&!r.parent},jh=function(r){he(Gs,W,function(){var e=r.facade;Sr?vi.emit("rejectionHandled",e):tu(kh,e,r.value)})},pe=function(r,e,t){return function(i){r(e,i,t)}},ve=function(r,e,t){r.done||(r.done=!0,t&&(r=t),r.value=e,r.state=Dh,ru(r,!0))},fi=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw new Qs("Promise can't be resolved itself");var i=Zs(e);i?di(function(){var o={done:!1};try{he(i,e,pe(fi,o,r),pe(ve,o,r))}catch(a){ve(o,a,r)}}):(r.value=e,r.state=Js,ru(r,!1))}catch(o){ve({done:!1},o,r)}}};if(zs&&(Z=function(e){Th(this,br),qh(e),he(yr,this);var t=ui(this);try{e(pe(fi,t),pe(ve,t))}catch(i){ve(t,i)}},br=Z.prototype,yr=function(e){Ah(this,{type:qr,done:!1,notified:!1,parent:!1,reactions:new xh,rejection:!1,state:Bs,value:void 0})},yr.prototype=js(br,"then",function(e,t){var i=ui(this),o=li(Oh(this,Z));return i.parent=!0,o.ok=Ir(e)?e:!0,o.fail=Ir(t)&&t,o.domain=Sr?vi.domain:void 0,i.state===Bs?i.reactions.add(o):di(function(){eu(o,i)}),o.promise}),Us=function(){var r=new yr,e=ui(r);this.promise=r,this.resolve=pe(fi,e),this.reject=pe(ve,e)},Hs.f=li=function(r){return r===Z||r===$h?new Us(r):Nh(r)},!Ih&&Ir(Er)&&de!==Object.prototype)){Vs=de.then,Ch||js(de,"then",function(e,t){var i=this;return new Z(function(o,a){he(Vs,i,o,a)}).then(e,t)},{unsafe:!0});try{delete de.constructor}catch(r){}Fs&&Fs(de,br)}yh({global:!0,constructor:!0,wrap:!0,forced:zs},{Promise:Z});Sh(Z,qr,!1,!0);Eh(qr)});var ee=n((qS,ou)=>{"use strict";ou.exports={}});var au=n((PS,nu)=>{"use strict";var Fh=O(),Bh=ee(),Uh=Fh("iterator"),Vh=Array.prototype;nu.exports=function(r){return r!==void 0&&(Bh.Array===r||Vh[Uh]===r)}});var gi=n((TS,uu)=>{"use strict";var Kh=Le(),su=er(),Gh=Te(),Wh=ee(),Hh=O(),zh=Hh("iterator");uu.exports=function(r){if(!Gh(r))return su(r,zh)||su(r,"@@iterator")||Wh[Kh(r)]}});var lu=n((OS,cu)=>{"use strict";var Qh=R(),Yh=F(),Jh=B(),Xh=_e(),Zh=gi(),eg=TypeError;cu.exports=function(r,e){var t=arguments.length<2?Zh(r):e;if(Yh(t))return Jh(Qh(t,r));throw new eg(Xh(r)+" is not iterable")}});var pu=n((_S,du)=>{"use strict";var rg=R(),fu=B(),tg=er();du.exports=function(r,e,t){var i,o;fu(r);try{if(i=tg(r,"return"),!i){if(e==="throw")throw t;return t}i=rg(i,r)}catch(a){o=!0,i=a}if(e==="throw")throw t;if(o)throw i;return fu(i),t}});var Tr=n((wS,mu)=>{"use strict";var ig=Re(),og=R(),ng=B(),ag=_e(),sg=au(),ug=Pt(),vu=Xe(),cg=lu(),lg=gi(),hu=pu(),fg=TypeError,Pr=function(r,e){this.stopped=r,this.result=e},gu=Pr.prototype;mu.exports=function(r,e,t){var i=t&&t.that,o=!!(t&&t.AS_ENTRIES),a=!!(t&&t.IS_RECORD),u=!!(t&&t.IS_ITERATOR),f=!!(t&&t.INTERRUPTED),c=ig(e,i),l,p,v,s,d,h,g,b=function(y){return l&&hu(l,"normal",y),new Pr(!0,y)},m=function(y){return o?(ng(y),f?c(y[0],y[1],b):c(y[0],y[1])):f?c(y,b):c(y)};if(a)l=r.iterator;else if(u)l=r;else{if(p=lg(r),!p)throw new fg(ag(r)+" is not iterable");if(sg(p)){for(v=0,s=ug(r);s>v;v++)if(d=m(r[v]),d&&vu(gu,d))return d;return new Pr(!1)}l=cg(r,p)}for(h=a?r.next:l.next;!(g=og(h,l)).done;){try{d=m(g.value)}catch(y){hu(l,"throw",y)}if(typeof d=="object"&&d&&vu(gu,d))return d}return new Pr(!1)}});var Eu=n((xS,Su)=>{"use strict";var dg=O(),yu=dg("iterator"),Iu=!1;try{bu=0,mi={next:function(){return{done:!!bu++}},return:function(){Iu=!0}},mi[yu]=function(){return this},Array.from(mi,function(){throw 2})}catch(r){}var bu,mi;Su.exports=function(r,e){try{if(!e&&!Iu)return!1}catch(o){return!1}var t=!1;try{var i={};i[yu]=function(){return{next:function(){return{done:t=!0}}}},r(i)}catch(o){}return t}});var bi=n((RS,qu)=>{"use strict";var pg=X(),vg=Eu(),hg=le().CONSTRUCTOR;qu.exports=hg||!vg(function(r){pg.all(r).then(void 0,function(){})})});var Pu=n(()=>{"use strict";var gg=_(),mg=R(),bg=F(),yg=fe(),Ig=pr(),Sg=Tr(),Eg=bi();gg({target:"Promise",stat:!0,forced:Eg},{all:function(e){var t=this,i=yg.f(t),o=i.resolve,a=i.reject,u=Ig(function(){var f=bg(t.resolve),c=[],l=0,p=1;Sg(e,function(v){var s=l++,d=!1;p++,mg(f,t,v).then(function(h){d||(d=!0,c[s]=h,--p||o(c))},a)}),--p||o(c)});return u.error&&a(u.value),i.promise}})});var Ou=n(()=>{"use strict";var qg=_(),Pg=D(),Tg=le().CONSTRUCTOR,Ii=X(),Og=j(),_g=S(),wg=se(),Tu=Ii&&Ii.prototype;qg({target:"Promise",proto:!0,forced:Tg,real:!0},{catch:function(r){return this.then(void 0,r)}});!Pg&&_g(Ii)&&(yi=Og("Promise").prototype.catch,Tu.catch!==yi&&wg(Tu,"catch",yi,{unsafe:!0}));var yi});var _u=n(()=>{"use strict";var xg=_(),Rg=R(),Cg=F(),Ag=fe(),Ng=pr(),Lg=Tr(),kg=bi();xg({target:"Promise",stat:!0,forced:kg},{race:function(e){var t=this,i=Ag.f(t),o=i.reject,a=Ng(function(){var u=Cg(t.resolve);Lg(e,function(f){Rg(u,t,f).then(i.resolve,o)})});return a.error&&o(a.value),i.promise}})});var wu=n(()=>{"use strict";var Dg=_(),$g=fe(),Mg=le().CONSTRUCTOR;Dg({target:"Promise",stat:!0,forced:Mg},{reject:function(e){var t=$g.f(this),i=t.reject;return i(e),t.promise}})});var Si=n((jS,xu)=>{"use strict";var jg=B(),Fg=C(),Bg=fe();xu.exports=function(r,e){if(jg(r),Fg(e)&&e.constructor===r)return e;var t=Bg.f(r),i=t.resolve;return i(e),t.promise}});var Au=n(()=>{"use strict";var Ug=_(),Vg=j(),Ru=D(),Kg=X(),Cu=le().CONSTRUCTOR,Gg=Si(),Wg=Vg("Promise"),Hg=Ru&&!Cu;Ug({target:"Promise",stat:!0,forced:Ru||Cu},{resolve:function(e){return Gg(Hg&&this===Wg?Kg:this,e)}})});var Nu=n(()=>{"use strict";iu();Pu();Ou();_u();wu();Au()});var $u=n(()=>{"use strict";var zg=_(),Qg=D(),Or=X(),Yg=E(),ku=j(),Du=S(),Jg=Mt(),Lu=Si(),Xg=se(),qi=Or&&Or.prototype,Zg=!!Or&&Yg(function(){qi.finally.call({then:function(){}},function(){})});zg({target:"Promise",proto:!0,real:!0,forced:Zg},{finally:function(r){var e=Jg(this,ku("Promise")),t=Du(r);return this.then(t?function(i){return Lu(e,r()).then(function(){return i})}:r,t?function(i){return Lu(e,r()).then(function(){throw i})}:r)}});!Qg&&Du(Or)&&(Ei=ku("Promise").prototype.finally,qi.finally!==Ei&&Xg(qi,"finally",Ei,{unsafe:!0}));var Ei});var ju=n((WS,Mu)=>{"use strict";sa();Nu();$u();var em=or();Mu.exports=em("Promise","finally")});var Bu=n((HS,Fu)=>{"use strict";var rm=ju();Fu.exports=rm});var Vu=n((zS,Uu)=>{"use strict";var tm=Bu();Uu.exports=tm});var Gu=n((QS,Ku)=>{"use strict";var im=E();Ku.exports=!im(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype})});var _r=n((YS,Hu)=>{"use strict";var om=$(),nm=S(),am=ft(),sm=vr(),um=Gu(),Wu=sm("IE_PROTO"),Pi=Object,cm=Pi.prototype;Hu.exports=um?Pi.getPrototypeOf:function(r){var e=am(r);if(om(e,Wu))return e[Wu];var t=e.constructor;return nm(t)&&e instanceof t?t.prototype:e instanceof Pi?cm:null}});var Yu=n((JS,Qu)=>{"use strict";var lm=P(),Ti=$(),fm=H(),dm=Tt().indexOf,pm=hr(),zu=lm([].push);Qu.exports=function(r,e){var t=fm(r),i=0,o=[],a;for(a in t)!Ti(pm,a)&&Ti(t,a)&&zu(o,a);for(;e.length>i;)Ti(t,a=e[i++])&&(~dm(o,a)||zu(o,a));return o}});var Oi=n((XS,Ju)=>{"use strict";Ju.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var _i=n((ZS,Xu)=>{"use strict";var vm=Yu(),hm=Oi();Xu.exports=Object.keys||function(e){return vm(e,hm)}});var oc=n((eE,ic)=>{"use strict";var ec=T(),gm=E(),rc=P(),mm=_r(),bm=_i(),ym=H(),Im=Xr().f,tc=rc(Im),Sm=rc([].push),Em=ec&&gm(function(){var r=Object.create(null);return r[2]=2,!tc(r,2)}),Zu=function(r){return function(e){for(var t=ym(e),i=bm(t),o=Em&&mm(t)===null,a=i.length,u=0,f=[],c;a>u;)c=i[u++],(!ec||(o?c in t:tc(t,c)))&&Sm(f,r?[c,t[c]]:t[c]);return f}};ic.exports={entries:Zu(!0),values:Zu(!1)}});var nc=n(()=>{"use strict";var qm=_(),Pm=oc().entries;qm({target:"Object",stat:!0},{entries:function(e){return Pm(e)}})});var sc=n((iE,ac)=>{"use strict";nc();var Tm=Oe();ac.exports=Tm.Object.entries});var cc=n((oE,uc)=>{"use strict";var Om=sc();uc.exports=Om});var wr=n((nE,lc)=>{"use strict";var _m=cc();lc.exports=_m});var pc=n((aE,dc)=>{"use strict";var wi=T(),wm=$(),fc=Function.prototype,xm=wi&&Object.getOwnPropertyDescriptor,xi=wm(fc,"name"),Rm=xi&&function(){}.name==="something",Cm=xi&&(!wi||wi&&xm(fc,"name").configurable);dc.exports={EXISTS:xi,PROPER:Rm,CONFIGURABLE:Cm}});var hc=n(vc=>{"use strict";var Am=T(),Nm=bt(),Lm=Q(),km=B(),Dm=H(),$m=_i();vc.f=Am&&!Nm?Object.defineProperties:function(e,t){km(e);for(var i=Dm(t),o=$m(t),a=o.length,u=0,f;a>u;)Lm.f(e,f=o[u++],i[f]);return e}});var Ni=n((uE,Ec)=>{"use strict";var Mm=B(),jm=hc(),gc=Oi(),Fm=hr(),Bm=jt(),Um=rr(),Vm=vr(),mc=">",bc="<",Ci="prototype",Ai="script",Ic=Vm("IE_PROTO"),Ri=function(){},Sc=function(r){return bc+Ai+mc+r+bc+"/"+Ai+mc},yc=function(r){r.write(Sc("")),r.close();var e=r.parentWindow.Object;return r=null,e},Km=function(){var r=Um("iframe"),e="java"+Ai+":",t;return r.style.display="none",Bm.appendChild(r),r.src=String(e),t=r.contentWindow.document,t.open(),t.write(Sc("document.F=Object")),t.close(),t.F},xr,Rr=function(){try{xr=new ActiveXObject("htmlfile")}catch(e){}Rr=typeof document!="undefined"?document.domain&&xr?yc(xr):Km():yc(xr);for(var r=gc.length;r--;)delete Rr[Ci][gc[r]];return Rr()};Fm[Ic]=!0;Ec.exports=Object.create||function(e,t){var i;return e!==null?(Ri[Ci]=Mm(e),i=new Ri,Ri[Ci]=null,i[Ic]=e):i=Rr(),t===void 0?i:jm.f(i,t)}});var $i=n((cE,Tc)=>{"use strict";var Gm=E(),Wm=S(),Hm=C(),zm=Ni(),qc=_r(),Qm=se(),Ym=O(),Jm=D(),Di=Ym("iterator"),Pc=!1,U,Li,ki;[].keys&&(ki=[].keys(),"next"in ki?(Li=qc(qc(ki)),Li!==Object.prototype&&(U=Li)):Pc=!0);var Xm=!Hm(U)||Gm(function(){var r={};return U[Di].call(r)!==r});Xm?U={}:Jm&&(U=zm(U));Wm(U[Di])||Qm(U,Di,function(){return this});Tc.exports={IteratorPrototype:U,BUGGY_SAFARI_ITERATORS:Pc}});var _c=n((lE,Oc)=>{"use strict";var Zm=$i().IteratorPrototype,eb=Ni(),rb=Pe(),tb=ke(),ib=ee(),ob=function(){return this};Oc.exports=function(r,e,t,i){var o=e+" Iterator";return r.prototype=eb(Zm,{next:rb(+!i,t)}),tb(r,o,!1,!0),ib[o]=ob,r}});var Mc=n((fE,$c)=>{"use strict";var nb=_(),ab=R(),Cr=D(),kc=pc(),sb=S(),ub=_c(),wc=_r(),xc=Lt(),cb=ke(),lb=oe(),Mi=se(),fb=O(),Rc=ee(),Dc=$i(),db=kc.PROPER,pb=kc.CONFIGURABLE,Cc=Dc.IteratorPrototype,Ar=Dc.BUGGY_SAFARI_ITERATORS,Ve=fb("iterator"),Ac="keys",Ke="values",Nc="entries",Lc=function(){return this};$c.exports=function(r,e,t,i,o,a,u){ub(t,e,i);var f=function(m){if(m===o&&s)return s;if(!Ar&&m&&m in p)return p[m];switch(m){case Ac:return function(){return new t(this,m)};case Ke:return function(){return new t(this,m)};case Nc:return function(){return new t(this,m)}}return function(){return new t(this)}},c=e+" Iterator",l=!1,p=r.prototype,v=p[Ve]||p["@@iterator"]||o&&p[o],s=!Ar&&v||f(o),d=e==="Array"&&p.entries||v,h,g,b;if(d&&(h=wc(d.call(new r)),h!==Object.prototype&&h.next&&(!Cr&&wc(h)!==Cc&&(xc?xc(h,Cc):sb(h[Ve])||Mi(h,Ve,Lc)),cb(h,c,!0,!0),Cr&&(Rc[c]=Lc))),db&&o===Ke&&v&&v.name!==Ke&&(!Cr&&pb?lb(p,"name",Ke):(l=!0,s=function(){return ab(v,this)})),o)if(g={values:f(Ke),keys:a?s:f(Ac),entries:f(Nc)},u)for(b in g)(Ar||l||!(b in p))&&Mi(p,b,g[b]);else nb({target:e,proto:!0,forced:Ar||l},g);return(!Cr||u)&&p[Ve]!==s&&Mi(p,Ve,s,{name:o}),Rc[e]=s,g}});var Fc=n((dE,jc)=>{"use strict";jc.exports=function(r,e){return{value:r,done:e}}});var Fi=n((pE,Gc)=>{"use strict";var vb=H(),ji=Ot(),Bc=ee(),Vc=ni(),hb=Q().f,gb=Mc(),Nr=Fc(),mb=D(),bb=T(),Kc="Array Iterator",yb=Vc.set,Ib=Vc.getterFor(Kc);Gc.exports=gb(Array,"Array",function(r,e){yb(this,{type:Kc,target:vb(r),index:0,kind:e})},function(){var r=Ib(this),e=r.target,t=r.index++;if(!e||t>=e.length)return r.target=void 0,Nr(void 0,!0);switch(r.kind){case"keys":return Nr(t,!1);case"values":return Nr(e[t],!1)}return Nr([t,e[t]],!1)},"values");var Uc=Bc.Arguments=Bc.Array;ji("keys");ji("values");ji("entries");if(!mb&&bb&&Uc.name!=="values")try{hb(Uc,"name",{value:"values"})}catch(r){}});var Hc=n((vE,Wc)=>{"use strict";var Sb=T(),Eb=Q(),qb=Pe();Wc.exports=function(r,e,t){Sb?Eb.f(r,e,qb(0,t)):r[e]=t}});var zc=n(()=>{"use strict";var Pb=_(),Tb=Tr(),Ob=Hc();Pb({target:"Object",stat:!0},{fromEntries:function(e){var t={};return Tb(e,function(i,o){Ob(t,i,o)},{AS_ENTRIES:!0}),t}})});var Yc=n((mE,Qc)=>{"use strict";Fi();zc();var _b=Oe();Qc.exports=_b.Object.fromEntries});var Xc=n((bE,Jc)=>{"use strict";Jc.exports={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}});var el=n(()=>{"use strict";Fi();var wb=Xc(),xb=I(),Rb=ke(),Zc=ee();for(Lr in wb)Rb(xb[Lr],Lr),Zc[Lr]=Zc.Array;var Lr});var tl=n((SE,rl)=>{"use strict";var Cb=Yc();el();rl.exports=Cb});var ol=n((EE,il)=>{"use strict";var Ab=tl();il.exports=Ab});var Hi=n((gq,bl)=>{"use strict";var Fb=Le(),Bb=String;bl.exports=function(r){if(Fb(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return Bb(r)}});var Il=n((mq,yl)=>{"use strict";var Ub=ir(),Vb=Hi(),Kb=te(),Gb=RangeError;yl.exports=function(e){var t=Vb(Kb(this)),i="",o=Ub(e);if(o<0||o===1/0)throw new Gb("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(t+=t))o&1&&(i+=t);return i}});var Tl=n((bq,Pl)=>{"use strict";var ql=P(),Wb=qt(),Sl=Hi(),Hb=Il(),zb=te(),Qb=ql(Hb),Yb=ql("".slice),Jb=Math.ceil,El=function(r){return function(e,t,i){var o=Sl(zb(e)),a=Wb(t),u=o.length,f=i===void 0?" ":Sl(i),c,l;return a<=u||f===""?o:(c=a-u,l=Qb(f,Jb(c/f.length)),l.length>c&&(l=Yb(l,0,c)),r?o+l:l+o)}};Pl.exports={start:El(!1),end:El(!0)}});var _l=n((yq,Ol)=>{"use strict";var Xb=z();Ol.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(Xb)});var wl=n(()=>{"use strict";var Zb=_(),ey=Tl().start,ry=_l();Zb({target:"String",proto:!0,forced:ry},{padStart:function(e){return ey(this,e,arguments.length>1?arguments[1]:void 0)}})});var Rl=n((Eq,xl)=>{"use strict";wl();var ty=or();xl.exports=ty("String","padStart")});var Al=n((qq,Cl)=>{"use strict";var iy=Rl();Cl.exports=iy});var Ll=n((Pq,Nl)=>{"use strict";var oy=Al();Nl.exports=oy});var Xi=M(nr(),1);var Ae=(u=>(u.PROD="prod",u.VK_ALIAS="vk_alias",u.VIDEOTEST="videotest",u.TEST="test",u.OKCDN="okcdn",u.AUTO="auto",u))(Ae||{}),_t=(l=>(l.Q144P="mobile",l.Q240P="lowest",l.Q360P="low",l.Q480P="medium",l.Q720P="high",l.Q1080P="fullhd",l.Q1440P="quadhd",l.Q2160P="ultrahd",l.UNKNOWN="unknown",l))(_t||{}),wt=(d=>(d.MP4="mp4",d.DASH="dash",d.DASH_SEP="dash_sep",d.ONDEMAND_DASH="ondemand_dash",d.HLS="hls",d.ONDEMAND_HLS="ondemand_hls",d.WEBM="webm",d.AV1="av1",d.ONDEMAND_DASH_LIVE="ondemand_dash_live",d.ONDEMAND_HLS_LIVE="ondemand_hls_live",d.WEBRTC="webrtc",d.UNKNOWN="unknown",d.RTMP="rtmp",d))(wt||{});var xt=(i=>(i.HTTP1="http1",i.HTTP2="http2",i.HTTP3="http3",i))(xt||{});var Rt=(f=>(f.SLIDER="slider",f.DOUBLE_TAP="double_tap",f.TIME_CODE="time_code",f.EPISODE="episode",f.REWIND="rewind",f.LIVE="live",f.UNKNOWN="unknown",f))(Rt||{}),ea=(a=>(a.GRAPH_SHOW="iGraphShow",a.GRAPH_HIDE="iGraphHide",a.NEXT_AREA="iNextChapterArea",a.NEXT_BUTTON="iNextChapterBtn",a.WATCH_AGAIN="iWatchAgainBtn",a))(ea||{}),ra={action_play:"ap",action_play_interactive:"api",first_bytes:"fb",player_ready:"pr",first_frame:"ff",seek:"sk",watch_coverage_record:"wr",watch_coverage_live:"wl",empty_buffer:"eb",action_stop:"as",close_at_empty_buffer:"cb",content_error:"er",player_interface_click:"pc",next_movie:"nm",track_switch:"ts",failover:"fo",quality:"qt"},ta={vsid:"si",isid:"is",vid:"vi",place:"pl",quality:"qt",cdn_host:"ch",stat_type:"st",param:"pm",vk_app_id:"va",track_code:"tc",connection_type:"cnt",connection_reused:"cr",cached_data:"cd",live:"lv",muted:"mu",mode:"mo",subtitles:"sb",failover:"fo",download_speed:"ds",manual_quality:"mq",ref_domain:"rd",direct_url:"du"},ia={unknown:"un",mobile:"m",lowest:"ls",low:"l",medium:"md",high:"h",fullhd:"f",quadhd:"q",ultrahd:"u"},oa={pip:"pi",fullscreen:"fs",external:"ex",prefetch:"pr",airplay:"ap",chromecast:"cc",invisible:"iv"};import{fillWithDefault as Pp}from"@vkontakte/videoplayer-shared/es2015";var ar="1.0.81-beta.0",na="CIOPGQJGDIHBABABA",Ct={prod:"https://api.ok.ru",vk_alias:"https://api.mycdn.me",videotest:"https://videotestapi.ok.ru/api",test:"https://apitest.ok.ru",okcdn:"https://api.okcdn.ru",auto:""};var Tp={apiEnv:"vk_alias",apiKey:na,requestRetryCount:1,firstFlushTime:5e3,flushDebounceTime:1e4,flushMaxWait:6e4,storageExpiration:36*60*60*1e3,watchCoverageInterval:15e3,disabledOperations:["quality"],disabledCustomFields:[],shorten:!0,maxLoops:100,embedUrlParams:[],useBeacon:!0,synchronizeTime:!0,debugLog:!1,clearStorageAtUnload:!0,useVKComIsMobileLogic:!1,backoff:{start:1e3,factor:1.5,max:5*60*1e3,random:.1}},aa=r=>Pp(r,Tp);function At(){let r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),e=new Array(36),t=0,i,o;for(o=0;o<36;o++)o===8||o===13||o===18||o===23?e[o]="-":o===14?e[o]="4":(t<=2&&(t=33554432+Math.random()*16777216|0),i=t&15,t=t>>4,e[o]=r[o===19?i&3|8:i]);return e.join("")}import{assertNonNullable as fy,combine as Bl,fromEvent as Ul,isNonNullable as ye,isNullable as Vl,merge as dy,now as V,observableFrom as py,once as vy,safeStorage as Vr,Subject as hy,Subscription as Zi,ValueSubject as Kr,createURL as Kl}from"@vkontakte/videoplayer-shared/es2015";import{Logger as gy,detectEmbed as my}from"@vkontakte/videoplayer-shared/es2015";var kr=M(Vu(),1);var nl=M(wr(),1),al=M(ol(),1);var sl=r=>{var o;let{operation:e,custom:t}=r,i=(0,al.default)((0,nl.default)(t).map(([a,u])=>{var l,p,v;let f=(l=ta[a])!=null?l:a,c=u;return u&&(a==="mode"?c=(p=oa[u])!=null?p:u:a==="quality"&&(c=(v=ia[u])!=null?v:u)),[f,c]}));return Ye(G({},r),{operation:(o=ra[e])!=null?o:e,custom:i})};import{ValueSubject as Nb,getExponentialDelay as Lb,ErrorCategory as ge}from"@vkontakte/videoplayer-shared/es2015";var kb=/Mobile|mini|Fennec|Android|iP(ad|od|hone)|opera (mini|mobi)/i,Ge=class{constructor(e){this.consequentAuthErrors=0;this.authorized$=new Nb(!1);this.params=e}authorize(e){return k(this,null,function*(){return this.authToken=e!=null?e:yield this.refreshAuthToken(),this._authorizeWithBackoff()})}logBeacon(e){let t="log.externalLog",i=this.createLogParams(e),o=this.sessionKey;if(!o)return;this.params.apiTransport.sendBeacon(t,i,o)||this.logRequest(e).catch(()=>{})}logRequest(e){return k(this,null,function*(){var u;let t="log.externalLog",i=this.createLogParams(e),o=(u=this.sessionKey)!=null?u:yield this._authorizeWithBackoff();if(!o)return;let a=(l,...p)=>k(this,[l,...p],function*(f,c=this.params.config.requestRetryCount){try{return yield this.params.apiTransport.sendRequest(t,i,o)}catch(v){if(!v||!("error_code"in v)){this.params.error$.next({id:"logRequestUnknown",category:ge.NETWORK,message:`Unknown ${t} error`,thrown:v});return}let s=v==null?void 0:v.error_code;switch(s){case 102:case 103:case 104:return this.authorized$.next(!1),this.sessionKey=yield this._authorizeWithBackoff(),c>0?a(f,c-1):void 0;case 401:return this.authorized$.next(!1),this.authToken=yield this.refreshAuthToken(),this.sessionKey=yield this._authorizeWithBackoff(),c>0?a(f,c-1):void 0;default:{this.params.error$.next({id:`LogRequest#${s}`,category:ge.EXTERNAL_API,message:`${t} error`,data:v});return}}}});return a(e)})}destroy(){window.clearTimeout(this.backoffTimeoutId),this.backoffTimeoutId=0}refreshAuthToken(){return k(this,null,function*(){if(this.params.refreshAuthToken)return this.refreshAuthTokenPromise||(this.refreshAuthTokenPromise=(0,kr.default)(this.params.refreshAuthToken(),()=>{this.refreshAuthTokenPromise=void 0})),this.refreshAuthTokenPromise})}createLogParams(e){let t="WEB",i=!1,o=`@vkontakte/videoplayer-statistics:${ar}`;if(this.params.config.useVKComIsMobileLogic){let{appVersion:a}=window.navigator;i=kb.test(a)}else this.params.mobile&&(i=!0);return i&&(t="M_WEB"),this.params.vktvVersion&&(t="SMART_TV",o=this.params.vktvVersion),{collector:"ok.mobile.apps.video",data:JSON.stringify({application:o,platform:t,items:this.params.config.shorten?e.map(sl):e})}}_authorizeWithBackoff(){if(!this.consequentAuthErrors)return this._authorize();let e=Lb(this.consequentAuthErrors,this.params.config.backoff);return new Promise(t=>{this.backoffTimeoutId||(this.backoffTimeoutId=window.setTimeout(()=>{(0,kr.default)(this._authorize().then(t).catch(i=>this.params.error$.next({id:"AuthorizeBackoff",category:ge.NETWORK,message:"Otherwise unhandled error in authorization",thrown:i})),()=>this.backoffTimeoutId=0)},e))})}_authorize(){return k(this,null,function*(){if(this.authorizePromise)return this.authorizePromise;this.sessionKey=void 0,this.authorized$.next(!1);let e="auth.anonymLogin",t={session_data:{version:2,device_id:this.params.deviceId,client_version:ar.split("-")[0],client_type:"SDK_JS"}};return this.authToken!==void 0&&(t.session_data.auth_token=this.authToken,t.session_data.version=3),this.authorizePromise=(0,kr.default)(this.params.apiTransport.sendRequest(e,t).then(i=>{var o;return(!i||!i.session_key)&&this.params.error$.next({id:"AuthorizeFailed",category:ge.EXTERNAL_API,message:"No session key",data:i}),this.sessionKey=(o=i==null?void 0:i.session_key)!=null?o:void 0,this.sessionKey}).catch(i=>k(this,null,function*(){this.sessionKey=void 0;let o=i==null?void 0:i.error_code;switch(o){case 401:return this.authToken=yield this.refreshAuthToken(),this._authorizeWithBackoff()}o?this.params.error$.next({id:`Authorize#${o}`,category:ge.EXTERNAL_API,message:"authorize error",data:i}):this.params.error$.next({id:"AuthorizeUnknown",category:ge.NETWORK,message:"authorize error",thrown:i})})),()=>{this.authorizePromise=void 0,this.consequentAuthErrors=this.sessionKey?0:this.consequentAuthErrors+1,this.authorized$.next(this.sessionKey!==void 0)}),this.authorizePromise})}};var Dr=class{constructor(){Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}addEventListener(e,t,i){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push({callback:t,options:i})}removeEventListener(e,t){if(!(e in this.listeners))return;let i=this.listeners[e];for(let o=0,a=i.length;o<a;o++)if(i[o].callback===t){i.splice(o,1);return}}dispatchEvent(e){if(!(e.type in this.listeners))return;let i=this.listeners[e.type].slice();for(let o=0,a=i.length;o<a;o++){let u=i[o];try{u.callback.call(this,e)}catch(f){Promise.resolve().then(()=>{throw f})}u.options&&u.options.once&&this.removeEventListener(e.type,u.callback)}return!e.defaultPrevented}},me=class extends Dr{constructor(){super(),this.listeners||Dr.call(this),Object.defineProperty(this,"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(this,"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(this,"reason",{value:void 0,writable:!0,configurable:!0})}toString(){return"[object AbortSignal]"}dispatchEvent(e){e.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,e)),super.dispatchEvent(e)}},We=class{constructor(){Object.defineProperty(this,"signal",{value:new me,writable:!0,configurable:!0})}abort(e){let t;try{t=new Event("abort")}catch(o){typeof document!="undefined"?document.createEvent?(t=document.createEvent("Event"),t.initEvent("abort",!1,!1)):(t=document.createEventObject(),t.type="abort"):t={type:"abort",bubbles:!1,cancelable:!1}}let i=e;if(i===void 0)if(typeof document=="undefined")i=new Error("This operation was aborted"),i.name="AbortError";else try{i=new DOMException("signal is aborted without reason")}catch(o){i=new Error("This operation was aborted"),i.name="AbortError"}this.signal.reason=i,this.signal.dispatchEvent(t)}toString(){return"[object AbortController]"}};typeof Symbol!="undefined"&&Symbol.toStringTag&&(We.prototype[Symbol.toStringTag]="AbortController",me.prototype[Symbol.toStringTag]="AbortSignal");function $r(r){return r.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof r.Request=="function"&&!r.Request.prototype.hasOwnProperty("signal")||!r.AbortController}function Bi(r){typeof r=="function"&&(r={fetch:r});let{fetch:e,Request:t=e.Request,AbortController:i,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:o=!1}=r;if(!$r({fetch:e,Request:t,AbortController:i,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:o}))return{fetch:e,Request:a};let a=t;(a&&!a.prototype.hasOwnProperty("signal")||o)&&(a=function(l,p){let v;p&&p.signal&&(v=p.signal,delete p.signal);let s=new t(l,p);return v&&Object.defineProperty(s,"signal",{writable:!1,enumerable:!1,configurable:!0,value:v}),s},a.prototype=t.prototype);let u=e;return{fetch:(c,l)=>{let p=a&&a.prototype.isPrototypeOf(c)?c.signal:l?l.signal:void 0;if(p){let v;try{v=new DOMException("Aborted","AbortError")}catch(d){v=new Error("Aborted"),v.name="AbortError"}if(p.aborted)return Promise.reject(v);let s=new Promise((d,h)=>{p.addEventListener("abort",()=>h(v),{once:!0})});return l&&l.signal&&delete l.signal,Promise.race([s,u(c,l)])}return u(c,l)},Request:a}}var Db=()=>"fetch"in window,He=Db()&&$r({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}),ul=He?Bi({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}):void 0,Ui=He?ul.fetch:window.fetch,VE=He?ul.Request:window.Request,KE=He?We:window.AbortController,GE=He?me:window.AbortSignal;var cl=M(nr(),1),ll=M(wr(),1);import{ErrorCategory as Mr,now as Vi}from"@vkontakte/videoplayer-shared/es2015";var ze=class{constructor(e){this.params=e,this.apiKey=e.config.apiKey,this.apiEnv=e.config.apiEnv,this.apiBaseUrl=Ct[this.apiEnv],this.timeSynchronisation=e.timeSynchronisation,this.isApiBaseUrlFetched=!1}resolveApiBaseUrl(){return k(this,null,function*(){var e;if(this.apiEnv!=="auto"||this.isApiBaseUrlFetched)return this.apiBaseUrl;try{let t=atob("aHR0cHM6Ly9kbnMuZ29vZ2xlL3Jlc29sdmU/bmFtZT12aWRlby5fZW5kcG9pbnQub2sucnUmdHlwZT1UWFQ="),o=yield(yield Ui(t,{method:"GET",mode:"cors",cache:"no-cache"})).json(),a=(e=o==null?void 0:o.Answer[0])==null?void 0:e.data;if(!a)throw new Error("Wrong DNS response");return a}catch(t){return this.params.error$.next({id:"OneStat:ApiTransport:resolveApiBaseUrl",category:Mr.NETWORK,message:"Unhandled resolve api base url error",thrown:t}),Ct.vk_alias}finally{this.isApiBaseUrlFetched=!0}})}sendBeacon(e,t,i){if(!window.Blob||!window.navigator.sendBeacon)return!1;let o=this._prepareQueryParams({method:e,queryParams:t,sessionKey:i}),a=new window.Blob([o.toString()],{type:"application/x-www-form-urlencoded"});try{return window.navigator.sendBeacon(`${this.apiBaseUrl}/fb.do`,a)}catch(u){this.params.error$.next({id:"OneStat:ApiTransport:sendBeacon",category:Mr.NETWORK,message:"Unhandled beacon error",thrown:u,data:{method:e,params:t}})}return!1}sendRequest(e,t,i){return k(this,null,function*(){let o=Vi(),a=u=>{if(u instanceof TypeError&&(0,cl.default)(["Failed to fetch","NetworkError when attempting to fetch resource."],u.message)){this.params.error$.next({id:"Network",category:Mr.NETWORK,message:"Request failed",thrown:u});return}this.params.error$.next({id:"OneStat:ApiTransport:sendRequest",category:Mr.NETWORK,message:"Unhandled request error",thrown:u,data:{method:e,params:t,sessionKey:i,time:Vi()-o}})};return this.apiBaseUrl=yield this.resolveApiBaseUrl(),Ui(`${this.apiBaseUrl}/fb.do`,{method:"post",headers:{"Content-type":"application/x-www-form-urlencoded"},body:this._prepareQueryParams({method:e,queryParams:t,sessionKey:i})}).then(u=>{var p,v;let f=Number(u.headers.get("content-length"))===0,c=new Date((p=u.headers.get("date"))!=null?p:"").getTime(),l=Vi()-o;if(isFinite(c)&&((v=this.timeSynchronisation)==null||v.addServerTime(c,l)),!f)return u.json().then(s=>Object.prototype.hasOwnProperty.call(s,"error_msg")?Promise.reject(s):s,a)},a)})}_prepareQueryParams(e){let t=new URLSearchParams({format:"JSON",method:e.method,application_key:this.apiKey});return e.sessionKey!==void 0&&t.append("session_key",e.sessionKey),(0,ll.default)(e.queryParams).forEach(([i,o])=>t.append(i,typeof o=="string"?o:JSON.stringify(o))),t}};var dl=M(nr(),1),pl=M(wr(),1);import{ErrorCategory as $b,now as Mb,safeStorage as Qe,debounceFn as fl}from"@vkontakte/videoplayer-shared/es2015";var jr="onestat_events",Ki=r=>e=>e.timestamp+r>=Mb(),Fr=class{constructor(e){this.unsaltedStorage=[];this.isPaused=!1;this.isUrgent=e=>{let{operation:t}=e;return(0,dl.default)(["action_play","watch_coverage_record","watch_coverage_live"],t)};this.params=e,this.api=e.api,this.error$=e.error$,this.userSalt=e.userSalt,this.loggerDebugLog=e.debugLogger.createComponentLog("stat logger"),this.firstFlush=fl(()=>this.safeFlush(),this.params.config.firstFlushTime,{maxWait:this.params.config.firstFlushTime});let t=Qe.isPersistent()?this.params.config.flushMaxWait:0;this.debouncedFlush=fl(()=>this.safeFlush(),this.params.config.flushDebounceTime,{maxWait:t}),this.subscription=this.api.authorized$.subscribe(i=>{i&&this.debouncedFlush()}),this.housekeepStorage()}safeFlush(){try{this.flush()}catch(e){this.error$.next({id:"LoggerError",category:$b.WTF,message:e?String(e):"Unknown logger error",thrown:e})}}readFromStorage(){let e=Qe.get(jr);try{return e?JSON.parse(e):{}}catch(t){}return{}}addToStorage(e){var a;if(!this.userSalt){this.unsaltedStorage.push(e);return}let t=this.readFromStorage(),o=((a=t[this.userSalt])!=null?a:[]).filter(Ki(this.params.config.storageExpiration));Qe.set(jr,JSON.stringify(Ye(G({},t),{[this.userSalt]:[...o,e]})))}getFromStorage(){var i;return this.userSalt?((i=this.readFromStorage()[this.userSalt])!=null?i:[]).filter(Ki(this.params.config.storageExpiration)):this.unsaltedStorage}markStorageSent(){if(!this.userSalt){this.unsaltedStorage=[];return}let e=this.readFromStorage();delete e[this.userSalt],Qe.set(jr,JSON.stringify(e))}housekeepStorage(){let e=this.readFromStorage();for(let[t,i]of(0,pl.default)(e)){let o=i.filter(Ki(this.params.config.storageExpiration));o.length?e[t]=o:delete e[t],this.loggerDebugLog({message:`${i.length} retrieved from storage, ${o.length} of them actual`})}Qe.set(jr,JSON.stringify(e))}log(e){this.addToStorage(e),!this.isPaused&&(this.isUrgent(e)?this.flush():this.lastVsid!==e.custom.vsid?this.firstFlush():this.debouncedFlush(),this.lastVsid=e.custom.vsid)}flush({wantBeacon:e,clearStorage:t}={wantBeacon:!1,clearStorage:!0}){let i=this.getFromStorage();i.length!==0&&(this.api.authorized$.getValue()?(e&&this.params.config.useBeacon?(this.loggerDebugLog({message:`Flushing ${i.length} events through beacon`}),this.api.logBeacon(i)):(this.loggerDebugLog({message:`Flushing ${i.length} events`}),this.api.logRequest(i)),t&&this.markStorageSent()):this.api.authorize(),this.firstFlush.cancel(),this.debouncedFlush.cancel())}pause(){this.isPaused=!0,this.debouncedFlush.cancel()}resume(){this.isPaused=!1,this.debouncedFlush()}destroy(){this.subscription.unsubscribe(),this.firstFlush.cancel(),this.debouncedFlush.cancel()}};import{HttpConnectionType as Gi,Surface as be,VideoFormat as q,VideoQuality as L}from"@vkontakte/videoplayer-core/es2015";import{assertNever as vl}from"@vkontakte/videoplayer-shared/es2015";var hl=r=>r&&{[L.INVARIANT]:"unknown",[L.Q_144P]:"mobile",[L.Q_240P]:"lowest",[L.Q_360P]:"low",[L.Q_480P]:"medium",[L.Q_576P]:"unknown",[L.Q_720P]:"high",[L.Q_1080P]:"fullhd",[L.Q_1440P]:"quadhd",[L.Q_2160P]:"ultrahd",[L.Q_4320P]:"unknown"}[r],Wi=r=>r&&{[Gi.HTTP1]:"http1",[Gi.HTTP2]:"http2",[Gi.QUIC]:"http3"}[r],gl=r=>{if(r!==void 0)switch(r){case q.MPEG:return"mp4";case q.DASH:case q.DASH_LIVE:case q.DASH_STREAMS:return"dash";case q.DASH_SEP:return"dash_sep";case q.DASH_ONDEMAND:return"ondemand_dash";case q.DASH_WEBM:case q.DASH_LIVE_WEBM:return"webm";case q.DASH_WEBM_AV1:return"av1";case q.DASH_LIVE_CMAF:return"ondemand_dash_live";case q.HLS:case q.HLS_LIVE:return"hls";case q.HLS_ONDEMAND:return"ondemand_hls";case q.HLS_LIVE_CMAF:return"ondemand_hls_live";case q.WEB_RTC_LIVE:return"webrtc";default:return vl(r)}},Br=r=>{if(r!==void 0)switch(r){case be.NONE:case be.INLINE:return;case be.FULLSCREEN:return"fullscreen";case be.SECOND_SCREEN:return"chromecast";case be.PIP:return"pip";case be.INVISIBLE:return"invisible";default:return vl(r)}},ml=r=>{switch(r){case"slow-2g":return"poor";case"2g":return"poor";case"3g":return"good";case"4g":return"excellent"}};var Ur=class{constructor(e){this.offset=void 0;this.offset=e}getOffset(){var e;return(e=this.offset)!=null?e:0}setOffset(e){this.offset=e}now(){var e;return Date.now()+((e=this.offset)!=null?e:0)}date(e=new Date){var t;return e.setTime(e.getTime()+((t=this.offset)!=null?t:0)),e}addServerTime(e,t){let i=Date.now(),o=e-i-t/2;if(Math.abs(o)<1e3){this.offset=0;return}this.offset===void 0?this.offset=Math.round(o):this.offset=Math.round(.2*o+(1-.2)*this.offset)}};var zi=M(Ll(),1);var kl=()=>(0,zi.default)(Math.floor(Math.random()*Wr(2,32)).toString(36),7,"0"),Dl=()=>(0,zi.default)(Math.floor(Math.random()*Wr(2,64)).toString(36),13,"0");import{PlaybackState as $l}from"@vkontakte/videoplayer-core/es2015";import{filter as Ml,filterChanged as ny,fromEvent as ay,isNullable as jl,map as sy,merge as Qi,Observable as uy,Subject as Yi,Subscription as cy,ValueSubject as ly}from"@vkontakte/videoplayer-shared/es2015";var Fl=(r,e)=>new uy(t=>{let i=new cy,o=Qi(ay(window,"beforeunload"),r.events.willDestruct$),a=new ly(void 0),u;i.add(r.info.isLive$.pipe(ny()).subscribe(x=>{u&&(u.unsubscribe(),a.next(void 0)),x?u=r.info.liveTime$.pipe(sy(Ie=>Ie&&Ie/1e3)).subscribe(a):u=r.info.position$.subscribe(a),i.add(u)}));let{playing$:f,paused$:c}=r.events,l=r.events.willSeek$.pipe(Ml(()=>r.info.playbackState$.getValue()===$l.PLAYING)),p=r.events.seeked$.pipe(Ml(()=>r.info.playbackState$.getValue()===$l.PLAYING)),v=!1,s=new Yi;i.add(l.subscribe(()=>{v||s.next(),v=!0})),i.add(p.subscribe(()=>v=!1));let d=new Yi,h=new Yi,g=Qi(f,p,d),b=Qi(c,s,o,r.events.looped$,h),m,y=()=>m=a.getValue(),K=()=>{let x=a.getValue();jl(m)||m===x||jl(x)||(t.next({from:m,to:x}),m=void 0)},re=()=>{h.next(),d.next()};if(i.add(g.subscribe(y)),i.add(b.subscribe(K)),e.forceInterval&&isFinite(e.forceInterval)){let x=0;i.add(g.subscribe(()=>x=window.setTimeout(re,e.forceInterval))),i.add(b.subscribe(()=>window.clearTimeout(x)))}return i});var Hl="_one-stat_",Gl=`${Hl}uuid`,Wl=`${Hl}deviceId`,Ji=()=>{let r=new Zi;return{subscription:r,subscribe:(e,t)=>{e&&r.add(e.subscribe(t))}}},eo=class{constructor(e,t){this.subscription=new Zi;this.debugLogger=new gy;this.oneStatDebugLog=this.debugLogger.createComponentLog("onestat");this.loopCounter=0;this.disabled=!1;this.vsid$=new Kr(void 0);this.isid$=new Kr(void 0);this.zenUid$=new Kr(void 0);this.seekAction$=new Kr("unknown");var l,p,v;this.statContext=e,this.config=aa((l=t.config)!=null?l:{}),ye(t.apiEnv)&&(this.config.apiEnv=t.apiEnv),this.config.synchronizeTime&&(this.timeSynchronisation=new Ur);let i=new hy;this.experimental={error$:i},Vr.get(Gl)&&Vr.remove(Gl);let a=Vr.get(Wl);this.statContext.deviceId?this.deviceId=this.statContext.deviceId:a?this.deviceId=a:(this.deviceId=At(),Vr.set(Wl,this.deviceId)),this.resetViewSession(),t.useIsid&&this.isid$.next((p=t.isid)!=null?p:Dl()),this.zenUid$.next(t.zenUid);let u=new ze({config:this.config,error$:i,timeSynchronisation:this.timeSynchronisation});this.api=new Ge({config:this.config,apiTransport:u,refreshAuthToken:t.refreshAuthToken,mobile:(v=this.statContext.mobile)!=null?v:!1,deviceId:this.deviceId,error$:i,vktvVersion:t.vktvVersion}),this.logger=new Fr({config:this.config,debugLogger:this.debugLogger,api:this.api,error$:i,userSalt:t.userSalt});let{isEmbed:f,topOrigin:c}=my();this.isEmbed=f,this.embedParent=c?new URL(c).hostname:void 0,this.subscribe()}updateContext(e){this.statContext=G(G({},this.statContext),e)}attachTo(e){let t=new Zi,i=(s,d)=>t.add(s.subscribe(d));i(e.events.willStart$,()=>{let s=e.info.position$.getValue();this.logActionPlay({position:s}),this.statContext.projectId&&this.logActionPlayInteractive()}),i(e.events.looped$,()=>{this.resetViewSession(),++this.loopCounter>this.config.maxLoops&&(this.disabled=!0),this.logActionPlay({position:e.info.position$.getValue()})}),i(e.events.seeked$,()=>{this.logSeek({action:this.seekAction$.getValue(),time:e.info.position$.getValue()}),this.seekAction$.next("unknown")}),i(e.events.paused$,()=>{this.logPause({position:e.info.position$.getValue()})}),i(e.events.willResume$,()=>{this.logPlay()}),i(e.events.started$,()=>{this.statContext.clip&&this.logWatchCoverageRecord({start:0,end:0})}),i(e.events.playing$,()=>{this.logPlaying()}),i(Fl(e,{forceInterval:this.config.watchCoverageInterval}),s=>{var b,m,y,K;let d=e.info.isLive$.getValue(),h=e.info.atLiveEdge$.getValue(),g={start:parseFloat(s.from.toFixed(3)),end:parseFloat(s.to.toFixed(3))};if(h){let re=(b=e.info.liveLatency$.getValue())!=null?b:0,x=(y=(m=e.info.currentBuffer$.getValue())==null?void 0:m.end)!=null?y:0,Ie=(K=e.info.liveBufferTime$.getValue())!=null?K:0,ro=Math.round((re-(x-Ie))*1e3),to=Math.round(re*1e3);ro&&to&&(g.latency=ro,g.bufferLatency=to)}d?this.logWatchCoverageLive(g):this.logWatchCoverageRecord(g)});let o;i(e.info.isStalled$,s=>{s?o=V():(ye(o)&&this.logEmptyBuffer({duration:V()-o}),o=void 0)});let a=!1;t.add(e.events.fatalError$.pipe(vy()).subscribe(()=>a=!0)),i(e.events.willStop$,()=>{if(e.info.isStalled$.getValue()){let d=ye(o)?V()-o:void 0;this.logCloseAtEmptyBuffer({duration:d!=null?d:0}),o=void 0}else a||this.logActionStop()}),i(e.events.managedError$,({id:s})=>{this.logError({fatal:!1,errorType:s})}),i(e.events.fatalError$,({id:s})=>{this.logError({fatal:!0,errorType:s})});let u,f,c=!1;i(e.events.firstBytes$,s=>{u=V(),this.logFirstBytes({time:s})}),i(e.events.willStart$,()=>f=V()),i(e.info.currentBuffer$,s=>{!c&&s&&s.end-s.start>0&&ye(u)&&(this.logPlayerReady({duration:V()-u}),c=!0)}),i(e.events.firstFrame$,()=>{ye(u)&&!c&&(this.logPlayerReady({duration:V()-u}),c=!0),ye(f)&&this.logFirstFrame({time:V()-f})});let l;i(e.info.currentVideoStream$,s=>{s&&(l&&s.id!==l&&this.logTrackSwitch(s),l=s.id)});let p;i(e.info.currentAudioStream$,s=>{s&&(p&&s.id!==p&&this.logTrackSwitch(s),p=s.id)}),i(e.info.atLiveEdge$,s=>this.updateContext({liveEdge:s})),i(Bl({muted:e.info.muted$,volume:e.info.volume$}),({muted:s,volume:d})=>this.updateContext({audible:!s&&d>0})),i(e.info.currentQuality$,s=>{let d=hl(s);this.updateContext({quality:d}),d&&this.logQuality(d)}),i(e.info.isAutoQualityEnabled$,s=>this.updateContext({autoQuality:s})),i(e.info.currentFormat$,s=>this.updateContext({contentType:gl(s)})),i(e.info.currentPlaybackRate$,s=>this.updateContext({rate:s})),i(e.info.is3DVideo$,s=>this.updateContext({is3d:s}));let v;return i(e.info.hostname$,s=>{let d=v!==void 0&&v!==s;this.updateContext({cdnHostname:s,failover:d}),d&&this.logFailover(s),v=s}),i(e.info.throughputEstimation$,s=>this.updateContext({downloadSpeed:s})),i(e.info.httpConnectionType$,s=>{this.statContext.firstConnectionType||this.updateContext({firstConnectionType:Wi(s)}),this.updateContext({connectionType:Wi(s)})}),i(e.info.httpConnectionReused$,s=>{Vl(this.statContext.firstConnectionReused)&&this.updateContext({firstConnectionReused:s}),this.updateContext({connectionReused:s})}),i(e.info.surface$,s=>this.updateContext({mode:Br(s)})),i(Bl({current:e.info.currentTextTrack$,available:e.info.availableTextTracks$}),({current:s,available:d})=>{let h=d.find(({id:b})=>b===s),g=h&&(h.isAuto?`${h.language}_auto`:h.language);this.updateContext({subtitles:g==null?void 0:g.split(".")[0]})}),this.player=e,this.uiEvents&&this.attachToUi(this.uiEvents),this.resubscribeBeforeunload(),this.subscription.add(t),t}attachToUi(e){this.uiEvents=e;let{subscription:t,subscribe:i}=Ji();return this.player&&(i(e.actionRewind$,()=>{this.player&&(this.resetViewSession(),this.logActionPlay({position:this.player.info.position$.getValue()}))}),i(e.actionSeek$,this.seekAction$),i(e.inPiP$,o=>{var u;let a=o?"pip":Br((u=this.player)==null?void 0:u.info.surface$.getValue());this.updateContext({mode:a})}),i(e.inFullscreen$,o=>{var u;let a=o?"fullscreen":Br((u=this.player)==null?void 0:u.info.surface$.getValue());this.updateContext({mode:a})}),i(e.actionSetSubtitle$,o=>this.updateContext({subtitles:o.split(".")[0]})),i(e.nextMovie$,o=>this.logNextMovie(o)),this.resubscribeBeforeunload(),this.subscription.add(t)),t}attachToAds(e){let{subscription:t,subscribe:i}=Ji();return i(e.slotRequested$,()=>this.logAdSlotRequest()),i(e.started$,o=>this.logAdStarted(o)),i(e.paused$,()=>this.logAdPaused()),i(e.resumed$,()=>this.logAdResumed()),i(e.ended$,()=>this.logAdEnded()),i(e.skipped$,()=>this.logAdSkipped()),i(e.clicked$,()=>this.logAdClicked()),i(e.error$,o=>this.logError({errorType:o,fatal:!1})),this.resubscribeBeforeunload(),this.subscription.add(t),t}attachToInteractive(e){let{subscription:t,subscribe:i}=Ji();return i(e.click$,o=>this.logInterfaceClick(o)),i(e.nextMovie$,o=>this.logNextMovie(o)),this.resubscribeBeforeunload(),this.subscription.add(t),t}authorize(e){return this.api.authorize(e)}pause(){this.logger.pause(),this.oneStatDebugLog({message:"paused"})}resume(){this.logger.resume(),this.oneStatDebugLog({message:"resumed"})}destroy(){this.logger.flush(),this.subscription.unsubscribe(),this.api.destroy(),this.logger.destroy()}resetViewSession(){this.oneStatDebugLog({message:"VSID reset"}),this.vsid$.next(kl())}getDeviceId(){return this.deviceId}setFieldBlacklist(){}logInited(){}logReady(e){this.log({operation:"player_ready",param:String(e.time)})}logStarted(...e){this.logActionPlay(...e)}logPlay(){this.log({operation:"play_toggle"})}logPlaying(){this.log({operation:"playing"})}logPause(e){this.log({operation:"pause",param:String(Math.round(e.position))})}logSeek(e){this.log({operation:"seek",param:e.action,time:e.time})}logFirstBytes(e){this.log({operation:"first_bytes",param:String(e.time)})}logFirstFrame(e){this.log({operation:"first_frame",param:String(e.time)})}logError(e){this.log({operation:"content_error",param:`${e.fatal?"fatal":"recoverable"}_${e.errorType}`})}logWatchCoverageRecord(e){this.log({operation:"watch_coverage_record",param:`${e.start}-${e.end}`},{in_history:this.statContext.inHistory?1:void 0})}logWatchCoverageLive(e){var a,u;let t=(u=(a=this.timeSynchronisation)==null?void 0:a.getOffset())!=null?u:0,i=e.start+t,o=e.end+t;this.log({operation:"watch_coverage_live",param:`${i}-${o}`},{in_history:this.statContext.inHistory?1:void 0,latency:e.latency,buffer_latency:e.bufferLatency})}logEmptyBuffer(e){this.log({operation:"empty_buffer",param:String(e.duration)})}logDownloadSpeed(){}logAdSlotRequest(){this.log({operation:"adv",param:"slot_request"})}logAdStarted(e){this.log({operation:"adv",param:e})}logAdPaused(){this.log({operation:"adv",param:"pause"})}logAdResumed(){this.log({operation:"adv",param:"resume"})}logAdEnded(){this.log({operation:"adv",param:"ended"})}logAdSkipped(){this.log({operation:"adv",param:"skip"})}logAdClicked(){this.log({operation:"adv",param:"click"})}logInterfaceClick(e){this.log({operation:"player_interface_click",param:e})}logNextMovie(e){this.log({operation:"next_movie",param:String(e)})}subscribe(){this.resubscribeBeforeunload();let e=window.navigator.connection;e&&"onchange"in e&&"effectiveType"in e&&this.subscription.add(dy(Ul(e,"change"),py(["init"])).subscribe(()=>this.updateContext({network:ml(e.effectiveType)}))),this.config.debugLog&&this.debugLogger.log$.subscribe(t=>{console.debug("%c stat ","background:#fa6470;",`component: ${t.component}.`,t.message)})}resubscribeBeforeunload(){var e;(e=this.beforeunloadSubscription)==null||e.unsubscribe(),this.beforeunloadSubscription=Ul(window,"beforeunload").subscribe(()=>this.logger.flush({wantBeacon:!0,clearStorage:this.config.clearStorageAtUnload})),this.subscription.add(this.beforeunloadSubscription)}logPlayerReady(e){this.log({operation:"player_ready",param:String(Math.round(e.duration))})}logActionPlay(e){this.log({operation:"action_play",param:String(Math.round(e.position))})}logActionPlayInteractive(){this.statContext.projectId&&this.log({operation:"action_play_interactive",param:String(this.statContext.movieId)},{vid:this.statContext.projectId})}logFailover(e){this.log({operation:"failover",param:e})}logCloseAtEmptyBuffer(e){this.log({operation:"close_at_empty_buffer",param:String(Math.round(e.duration))})}logActionStop(){this.log({operation:"action_stop"})}logTrackSwitch(e){this.log({operation:"track_switch",param:e.id})}logQuality(e){this.log({operation:"quality",param:e})}log(e,t={}){if(this.disabled){this.oneStatDebugLog({message:`operation ${e.operation} but statistics is disabled`});return}if((0,Xi.default)(this.config.disabledOperations,e.operation)){this.oneStatDebugLog({message:`operation ${e.operation} but it is disabled`});return}this.oneStatDebugLog({message:`operation ${e.operation} ${e.param}`});let i=this.createLogItem(e,t);this.logger.log(i)}createLogItem({operation:e,param:t,time:i},o={}){var d,h,g,b,m,y;let a=(h=(d=this.timeSynchronisation)==null?void 0:d.now())!=null?h:V(),u=this.vsid$.getValue();fy(u);let f=this.isid$.getValue(),c=e==="empty_buffer"||e==="close_at_empty_buffer"?this.statContext.connectionType:this.statContext.firstConnectionType,l=this.statContext.firstConnectionReused,p,v;if(this.isEmbed||this.statContext.place==="embed"){p=this.embedParent;let K=[...new URLSearchParams(location.search).entries()].filter(([re,x])=>(0,Xi.default)(this.config.embedUrlParams,re));v=new URLSearchParams(K).toString()}else this.statContext.place==="direct"&&(this.statContext.refDomain?p=(b=(g=Kl(this.statContext.refDomain))==null?void 0:g.hostname)!=null?b:this.statContext.refDomain:document.referrer&&(p=(y=(m=Kl(document.referrer))==null?void 0:m.hostname)!=null?y:document.referrer),v=location.href.substring(0,1024));let s=G({vsid:u,isid:f,vid:this.statContext.movieId,uid:this.zenUid$.getValue(),ct:this.statContext.contentType,place:this.isEmbed?"embed":this.statContext.place,quality:this.statContext.quality,cdn_host:this.statContext.cdnHostname,stat_type:this.statContext.autoplay===!0?"auto":this.statContext.autoplay===!1?"":void 0,param:t,vk_app_id:this.statContext.vkAppId,track_code:this.statContext.trackCode,connection_type:c,connection_reused:l===!0?1:l===!1?0:void 0,cached_data:this.statContext.cached===!0?1:this.statContext.cached===!1?0:void 0,live:this.statContext.liveEdge?1:void 0,muted:this.statContext.audible===!1?1:void 0,mode:this.statContext.mode,subtitles:this.statContext.subtitles,download_speed:this.statContext.downloadSpeed,manual_quality:this.statContext.autoQuality?void 0:1,ref_domain:p,direct_url:v,rate:this.statContext.rate===1||Vl(this.statContext.rate)?void 0:this.statContext.rate.toFixed(2),view_360:this.statContext.is3d?1:void 0,aid:this.statContext.albumId,vk_playlist_id:this.statContext.vkPlaylistId},o);for(let K of this.config.disabledCustomFields)delete s[K];return{operation:e,type:1,time:i,network:this.statContext.network,timestamp:a,custom:s}}};export{Ae as ApiEnv,xt as ConnectionType,wt as ContentType,ea as InteractiveInterfaceClick,eo as OneStat,_t as Quality,Rt as SeekAction,ar as VERSION};
|