@vkontakte/videoplayer-statistics 1.0.77-dev.1a25dcbd.0 → 1.0.77-dev.217ff82b.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 +3 -3
- package/es2015.esm.js +3 -3
- package/es2018.cjs.js +3 -3
- package/es2018.esm.js +3 -3
- package/es2024.cjs.js +3 -3
- package/es2024.esm.js +3 -3
- package/esnext.cjs.js +3 -3
- package/esnext.esm.js +3 -3
- package/evergreen.esm.js +3 -3
- package/package.json +3 -3
- package/types/MediascopePixel/MediascopePixel.d.ts +38 -0
- package/types/MediascopePixel/Stopwatch.d.ts +12 -0
- package/types/MediascopePixel/types.d.ts +12 -0
- package/types/MediascopePixel/utils/image.d.ts +1 -0
- package/types/index.d.ts +7 -5
- /package/types/{Api.d.ts → OneStat/Api.d.ts} +0 -0
- /package/types/{ApiTransport.d.ts → OneStat/ApiTransport.d.ts} +0 -0
- /package/types/{Logger.d.ts → OneStat/Logger.d.ts} +0 -0
- /package/types/{OneStat.d.ts → OneStat/OneStat.d.ts} +0 -0
- /package/types/{config.d.ts → OneStat/config.d.ts} +0 -0
- /package/types/{env.d.ts → OneStat/env.d.ts} +0 -0
- /package/types/{types.d.ts → OneStat/types.d.ts} +0 -0
- /package/types/{uiEvents.d.ts → OneStat/uiEvents.d.ts} +0 -0
- /package/types/{utils → OneStat/utils}/mappers.d.ts +0 -0
- /package/types/{utils → OneStat/utils}/shorten.d.ts +0 -0
- /package/types/{utils → OneStat/utils}/timeSynchronisation.d.ts +0 -0
- /package/types/{utils → OneStat/utils}/uuid.d.ts +0 -0
- /package/types/{utils → OneStat/utils}/vsid.d.ts +0 -0
- /package/types/{utils → OneStat/utils}/watchCoverage.d.ts +0 -0
- /package/types/{values.d.ts → OneStat/values.d.ts} +0 -0
package/es2015.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer-statistics v1.0.77-dev.
|
|
3
|
-
* Thu, 15 May 2025
|
|
2
|
+
* @vkontakte/videoplayer-statistics v1.0.77-dev.217ff82b.0
|
|
3
|
+
* Thu, 15 May 2025 15:02:01 GMT
|
|
4
4
|
* https://st.mycdn.me/static/vkontakte-videoplayer/1-0-77/doc/
|
|
5
5
|
*/
|
|
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 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 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((by,so)=>{"use strict";so.exports=function(r){try{return!!r()}catch(e){return!0}}});var Ee=n((yy,uo)=>{"use strict";var tf=E();uo.exports=!tf(function(){var r=function(){}.bind();return typeof r!="function"||r.hasOwnProperty("prototype")})});var zr=n((Iy,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((Sy,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((Ey,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((qy,yo)=>{"use strict";var uf=qe(),cf=P();yo.exports=function(r){if(uf(r)==="Function")return cf(r)}});var S=n((Py,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((Ty,So)=>{"use strict";var lf=E();So.exports=!lf(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var R=n((Oy,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 xo=n((wy,_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((Ry,wo)=>{"use strict";wo.exports=function(r){return r==null}});var te=n((Cy,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((Ay,Co)=>{"use strict";var yf=xo(),If=te();Co.exports=function(r){return yf(If(r))}});var C=n((Ny,Ao)=>{"use strict";var Sf=S();Ao.exports=function(r){return typeof r=="object"?r!==null:Sf(r)}});var Oe=n((Ly,No)=>{"use strict";No.exports={}});var j=n((Dy,Do)=>{"use strict";var et=Oe(),rt=I(),Ef=S(),Lo=function(r){return Ef(r)?r:void 0};Do.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((ky,ko)=>{"use strict";var qf=P();ko.exports=qf({}.isPrototypeOf)});var z=n(($y,jo)=>{"use strict";var Pf=I(),$o=Pf.navigator,Mo=$o&&$o.userAgent;jo.exports=Mo?String(Mo):""});var it=n((My,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((jy,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((Fy,zo)=>{"use strict";var xf=ot();zo.exports=xf&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var at=n((By,Qo)=>{"use strict";var wf=j(),Rf=S(),Cf=Xe(),Af=nt(),Nf=Object;Qo.exports=Af?function(r){return typeof r=="symbol"}:function(r){var e=wf("Symbol");return Rf(e)&&Cf(e.prototype,Nf(r))}});var _e=n((Uy,Yo)=>{"use strict";var Lf=String;Yo.exports=function(r){try{return Lf(r)}catch(e){return"Object"}}});var F=n((Vy,Jo)=>{"use strict";var Df=S(),kf=_e(),$f=TypeError;Jo.exports=function(r){if(Df(r))return r;throw new $f(kf(r)+" is not a function")}});var er=n((Ky,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((Gy,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 k=n((Wy,rn)=>{"use strict";rn.exports=!0});var nn=n((Hy,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 xe=n((zy,un)=>{"use strict";var Uf=k(),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((Qy,ln)=>{"use strict";var cn=xe();ln.exports=function(r,e){return cn[r]||(cn[r]=e||{})}});var ft=n((Yy,fn)=>{"use strict";var Gf=te(),Wf=Object;fn.exports=function(r){return Wf(Gf(r))}});var $=n((Jy,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((Xy,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((Zy,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((eI,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((rI,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((tI,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((iI,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((nI,_n)=>{"use strict";var _d=E(),xd=S(),wd=/#|\.prototype\./,we=function(r,e){var t=Cd[Rd(r)];return t===Nd?!0:t===Ad?!1:xd(e)?_d(e):!!e},Rd=we.normalize=function(r){return String(r).replace(wd,".").toLowerCase()},Cd=we.data={},Ad=we.NATIVE="N",Nd=we.POLYFILL="P";_n.exports=we});var Re=n((aI,wn)=>{"use strict";var xn=Yr(),Ld=F(),Dd=Ee(),kd=xn(xn.bind);wn.exports=function(r,e){return Ld(r),e===void 0?r:Dd?kd(r,e):function(){return r.apply(e,arguments)}}});var bt=n((sI,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((uI,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((lI,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((fI,kn)=>{"use strict";var Ce=I(),Yd=zr(),Jd=Yr(),Xd=S(),Zd=On().f,ep=mt(),ne=Oe(),rp=Re(),ae=oe(),Dn=$();xe();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};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?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&&Dn(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",Dn(ne,v)||ae(ne,v,{}),ae(ne[v],s,d),r.real&&c&&(l||!c[s])&&ae(c,s,d)))}});var Mn=n((dI,$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((pI,jn)=>{"use strict";var np=Mn();jn.exports=function(r){var e=+r;return e!==e||e===0?0:np(e)}});var Bn=n((vI,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((hI,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((gI,Vn)=>{"use strict";var fp=qt();Vn.exports=function(r){return fp(r.length)}});var Tt=n((mI,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((bI,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((SI,zn)=>{"use strict";var Ip=j();zn.exports=Ip});var Yn=n((EI,Qn)=>{"use strict";Hn();var Sp=or();Qn.exports=Sp("Array","includes")});var Xn=n((qI,Jn)=>{"use strict";var Ep=Yn();Jn.exports=Ep});var nr=n((PI,Zn)=>{"use strict";var qp=Xn();Zn.exports=qp});var sa=n(()=>{"use strict"});var Nt=n(($I,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((MI,ca)=>{"use strict";var xp=Nt();ca.exports=xp==="NODE"});var se=n((jI,la)=>{"use strict";var wp=oe();la.exports=function(r,e,t,i){return i&&i.enumerable?r[e]=t:wp(r,e,t),r}});var da=n((FI,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((BI,pa)=>{"use strict";var Ap=C();pa.exports=function(r){return Ap(r)||r===null}});var ga=n((UI,ha)=>{"use strict";var Np=va(),Lp=String,Dp=TypeError;ha.exports=function(r){if(Np(r))return r;throw new Dp("Can't set "+Lp(r)+" as a prototype")}});var Lt=n((VI,ma)=>{"use strict";var kp=da(),$p=C(),Mp=te(),jp=ga();ma.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var r=!1,e={},t;try{t=kp(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((KI,ya)=>{"use strict";var Fp=O(),Bp=Fp("toStringTag"),ba={};ba[Bp]="z";ya.exports=String(ba)==="[object z]"});var Le=n((GI,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((WI,Sa)=>{"use strict";var Qp=cr(),Yp=Le();Sa.exports=Qp?{}.toString:function(){return"[object "+Yp(this)+"]"}});var De=n((HI,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((zI,Ta)=>{"use strict";var iv=Q();Ta.exports=function(r,e,t){return iv.f(r,e,t)}});var wa=n((QI,xa)=>{"use strict";var ov=j(),nv=Oa(),av=O(),sv=T(),_a=av("species");xa.exports=function(r){var e=ov(r);sv&&e&&!e[_a]&&nv(e,_a,{configurable:!0,get:function(){return this}})}});var Ca=n((YI,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 kt=n((JI,Aa)=>{"use strict";var lv=P(),fv=S(),Dt=xe(),dv=lv(Function.toString);fv(Dt.inspectSource)||(Dt.inspectSource=function(r){return dv(r)});Aa.exports=Dt.inspectSource});var Ma=n((XI,$a)=>{"use strict";var pv=P(),vv=E(),Na=S(),hv=Le(),gv=j(),mv=kt(),La=function(){},Da=gv("Reflect","construct"),$t=/^\s*(?:class|function)\b/,bv=pv($t.exec),yv=!$t.test(La),ke=function(e){if(!Na(e))return!1;try{return Da(La,[],e),!0}catch(t){return!1}},ka=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}};ka.sham=!0;$a.exports=!Da||vv(function(){var r;return ke(ke.call)||!ke(Object)||!ke(function(){r=!0})||r})?ka:ke});var Fa=n((ZI,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((eS,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((rS,Va)=>{"use strict";var _v=j();Va.exports=_v("document","documentElement")});var Ga=n((tS,Ka)=>{"use strict";var xv=P();Ka.exports=xv([].slice)});var Ha=n((iS,Wa)=>{"use strict";var wv=TypeError;Wa.exports=function(r,e){if(r<e)throw new wv("Not enough arguments");return r}});var Ft=n((oS,za)=>{"use strict";var Rv=z();za.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(Rv)});var Qt=n((nS,is)=>{"use strict";var x=I(),Cv=zr(),Av=Re(),Qa=S(),Nv=$(),ts=E(),Ya=jt(),Lv=Ga(),Ja=rr(),Dv=Ha(),kv=Ft(),$v=ur(),Wt=x.setImmediate,Ht=x.clearImmediate,Mv=x.process,Bt=x.Dispatch,jv=x.Function,Xa=x.MessageChannel,Fv=x.String,Ut=0,$e={},Za="onreadystatechange",Me,Y,Vt,Kt;ts(function(){Me=x.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){x.postMessage(Fv(r),Me.protocol+"//"+Me.host)};(!Wt||!Ht)&&(Wt=function(e){Dv(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&&!kv?(Vt=new Xa,Kt=Vt.port2,Vt.port1.onmessage=es,Y=Av(Kt.postMessage,Kt)):x.addEventListener&&Qa(x.postMessage)&&!x.importScripts&&Me&&Me.protocol!=="file:"&&!ts(rs)?(Y=rs,x.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((aS,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((sS,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((uS,cs)=>{"use strict";var Vv=z();cs.exports=/ipad|iphone|ipod/i.test(Vv)&&typeof Pebble!="undefined"});var ds=n((cS,fs)=>{"use strict";var Kv=z();fs.exports=/web0s(?!.*chrome)/i.test(Kv)});var ys=n((lS,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((fS,Is)=>{"use strict";Is.exports=function(r,e){try{arguments.length===1?console.error(r):console.error(r,e)}catch(t){}}});var pr=n((dS,Es)=>{"use strict";Es.exports=function(r){try{return{error:!1,value:r()}}catch(e){return{error:!0,value:e}}}});var Ts=n((pS,Ps)=>{"use strict";var Yv=I(),Jv=S(),qs=Yv.WeakMap;Ps.exports=Jv(qs)&&/native code/.test(String(qs))});var vr=n((vS,_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((hS,xs)=>{"use strict";xs.exports={}});var ni=n((gS,Cs)=>{"use strict";var eh=Ts(),Rs=I(),rh=C(),th=oe(),ti=$(),ii=xe(),ih=vr(),oh=hr(),ws="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(ws);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(ws);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((mS,As)=>{"use strict";var uh=I();As.exports=uh.Promise});var le=n((bS,ks)=>{"use strict";var ch=I(),Ue=X(),lh=S(),fh=mt(),dh=kt(),ph=O(),Ns=Nt(),vh=k(),ai=it(),Ls=Ue&&Ue.prototype,hh=ph("species"),si=!1,Ds=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")&&!Ds});ks.exports={CONSTRUCTOR:gh,REJECTION_EVENT:Ds,SUBCLASSING:si}});var fe=n((yS,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=k(),Sr=ur(),W=I(),he=R(),js=se(),Fs=Lt(),Sh=De(),Eh=wa(),qh=F(),Ir=S(),Ph=C(),Th=Ca(),Oh=Mt(),Gs=Qt().set,di=ys(),_h=Ss(),xh=pr(),wh=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",Dh="rejectionhandled",Bs=0,Js=1,kh=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=xh(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(Dh,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=kh,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 wh,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((ES,ou)=>{"use strict";ou.exports={}});var au=n((qS,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((PS,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((TS,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((OS,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((_S,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((wS,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=k(),Tg=le().CONSTRUCTOR,Ii=X(),Og=j(),_g=S(),xg=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&&xg(Tu,"catch",yi,{unsafe:!0}));var yi});var _u=n(()=>{"use strict";var wg=_(),Rg=R(),Cg=F(),Ag=fe(),Ng=pr(),Lg=Tr(),Dg=bi();wg({target:"Promise",stat:!0,forced:Dg},{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 xu=n(()=>{"use strict";var kg=_(),$g=fe(),Mg=le().CONSTRUCTOR;kg({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((MS,wu)=>{"use strict";var jg=B(),Fg=C(),Bg=fe();wu.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=k(),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();xu();Au()});var $u=n(()=>{"use strict";var zg=_(),Qg=k(),Or=X(),Yg=E(),Du=j(),ku=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,Du("Promise")),t=ku(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&&ku(Or)&&(Ei=Du("Promise").prototype.finally,qi.finally!==Ei&&Xg(qi,"finally",Ei,{unsafe:!0}));var Ei});var ju=n((GS,Mu)=>{"use strict";sa();Nu();$u();var em=or();Mu.exports=em("Promise","finally")});var Bu=n((WS,Fu)=>{"use strict";var rm=ju();Fu.exports=rm});var Vu=n((HS,Uu)=>{"use strict";var tm=Bu();Uu.exports=tm});var Gu=n((zS,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((QS,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((YS,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((JS,Ju)=>{"use strict";Ju.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var _i=n((XS,Xu)=>{"use strict";var vm=Yu(),hm=Oi();Xu.exports=Object.keys||function(e){return vm(e,hm)}});var oc=n((ZS,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((tE,ac)=>{"use strict";nc();var Tm=Oe();ac.exports=Tm.Object.entries});var cc=n((iE,uc)=>{"use strict";var Om=sc();uc.exports=Om});var xr=n((oE,lc)=>{"use strict";var _m=cc();lc.exports=_m});var pc=n((nE,dc)=>{"use strict";var xi=T(),xm=$(),fc=Function.prototype,wm=xi&&Object.getOwnPropertyDescriptor,wi=xm(fc,"name"),Rm=wi&&function(){}.name==="something",Cm=wi&&(!xi||xi&&wm(fc,"name").configurable);dc.exports={EXISTS:wi,PROPER:Rm,CONFIGURABLE:Cm}});var hc=n(vc=>{"use strict";var Am=T(),Nm=bt(),Lm=Q(),Dm=B(),km=H(),$m=_i();vc.f=Am&&!Nm?Object.defineProperties:function(e,t){Dm(e);for(var i=km(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((sE,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},wr,Rr=function(){try{wr=new ActiveXObject("htmlfile")}catch(e){}Rr=typeof document!="undefined"?document.domain&&wr?yc(wr):Km():yc(wr);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((uE,Tc)=>{"use strict";var Gm=E(),Wm=S(),Hm=C(),zm=Ni(),qc=_r(),Qm=se(),Ym=O(),Jm=k(),ki=Ym("iterator"),Pc=!1,U,Li,Di;[].keys&&(Di=[].keys(),"next"in Di?(Li=qc(qc(Di)),Li!==Object.prototype&&(U=Li)):Pc=!0);var Xm=!Hm(U)||Gm(function(){var r={};return U[ki].call(r)!==r});Xm?U={}:Jm&&(U=zm(U));Wm(U[ki])||Qm(U,ki,function(){return this});Tc.exports={IteratorPrototype:U,BUGGY_SAFARI_ITERATORS:Pc}});var _c=n((cE,Oc)=>{"use strict";var Zm=$i().IteratorPrototype,eb=Ni(),rb=Pe(),tb=De(),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((lE,$c)=>{"use strict";var nb=_(),ab=R(),Cr=k(),Dc=pc(),sb=S(),ub=_c(),xc=_r(),wc=Lt(),cb=De(),lb=oe(),Mi=se(),fb=O(),Rc=ee(),kc=$i(),db=Dc.PROPER,pb=Dc.CONFIGURABLE,Cc=kc.IteratorPrototype,Ar=kc.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=xc(d.call(new r)),h!==Object.prototype&&h.next&&(!Cr&&xc(h)!==Cc&&(wc?wc(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((fE,jc)=>{"use strict";jc.exports=function(r,e){return{value:r,done:e}}});var Fi=n((dE,Gc)=>{"use strict";var vb=H(),ji=Ot(),Bc=ee(),Vc=ni(),hb=Q().f,gb=Mc(),Nr=Fc(),mb=k(),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((pE,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((gE,Qc)=>{"use strict";Fi();zc();var _b=Oe();Qc.exports=_b.Object.fromEntries});var Xc=n((mE,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 xb=Xc(),wb=I(),Rb=De(),Zc=ee();for(Lr in xb)Rb(wb[Lr],Lr),Zc[Lr]=Zc.Array;var Lr});var tl=n((IE,rl)=>{"use strict";var Cb=Yc();el();rl.exports=Cb});var ol=n((SE,il)=>{"use strict";var Ab=tl();il.exports=Ab});var Hi=n((hq,bl)=>{"use strict";var jb=Le(),Fb=String;bl.exports=function(r){if(jb(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return Fb(r)}});var Il=n((gq,yl)=>{"use strict";var Bb=ir(),Ub=Hi(),Vb=te(),Kb=RangeError;yl.exports=function(e){var t=Ub(Vb(this)),i="",o=Bb(e);if(o<0||o===1/0)throw new Kb("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(t+=t))o&1&&(i+=t);return i}});var Tl=n((mq,Pl)=>{"use strict";var ql=P(),Gb=qt(),Sl=Hi(),Wb=Il(),Hb=te(),zb=ql(Wb),Qb=ql("".slice),Yb=Math.ceil,El=function(r){return function(e,t,i){var o=Sl(Hb(e)),a=Gb(t),u=o.length,f=i===void 0?" ":Sl(i),c,l;return a<=u||f===""?o:(c=a-u,l=zb(f,Yb(c/f.length)),l.length>c&&(l=Qb(l,0,c)),r?o+l:l+o)}};Pl.exports={start:El(!1),end:El(!0)}});var _l=n((bq,Ol)=>{"use strict";var Jb=z();Ol.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(Jb)});var xl=n(()=>{"use strict";var Xb=_(),Zb=Tl().start,ey=_l();Xb({target:"String",proto:!0,forced:ey},{padStart:function(e){return Zb(this,e,arguments.length>1?arguments[1]:void 0)}})});var Rl=n((Sq,wl)=>{"use strict";xl();var ry=or();wl.exports=ry("String","padStart")});var Al=n((Eq,Cl)=>{"use strict";var ty=Rl();Cl.exports=ty});var Ll=n((qq,Nl)=>{"use strict";var iy=Al();Nl.exports=iy});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||{}),xt=(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))(xt||{});var wt=(i=>(i.HTTP1="http1",i.HTTP2="http2",i.HTTP3="http3",i))(wt||{});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.77-dev.1a25dcbd.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 ly,combine as Bl,fromEvent as Ul,isNonNullable as ye,isNullable as Vl,merge as fy,now as V,observableFrom as dy,once as py,safeStorage as Vr,Subject as vy,Subscription as Zi,ValueSubject as Kr,createURL as Kl}from"@vkontakte/videoplayer-shared/es2015";import{Logger as hy,detectEmbed as gy}from"@vkontakte/videoplayer-shared/es2015";var Dr=M(Vu(),1);var nl=M(xr(),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 Db=/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 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: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 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;if(this.params.config.useVKComIsMobileLogic){let{appVersion:o}=window.navigator;i=Db.test(o)}else this.params.mobile&&(i=!0);return i&&(t="M_WEB"),{collector:"ok.mobile.apps.video",data:JSON.stringify({application:`@vkontakte/videoplayer-statistics:${ar}`,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,Dr.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 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: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=>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: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 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}},me=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)}},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 He=$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,UE=He?ul.Request:window.Request,VE=He?We:window.AbortController,KE=He?me:window.AbortSignal;var cl=M(nr(),1),ll=M(xr(),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 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: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 D(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(xr(),1);import{ErrorCategory as kb,now as $b,safeStorage as Qe,debounceFn as fl}from"@vkontakte/videoplayer-shared/es2015";var jr="onestat_events",Ki=r=>e=>e.timestamp+r>=$b(),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:kb.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 Dl=()=>(0,zi.default)(Math.floor(Math.random()*Wr(2,32)).toString(36),7,"0"),kl=()=>(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 oy,fromEvent as ny,isNullable as jl,map as ay,merge as Qi,Observable as sy,Subject as Yi,Subscription as uy,ValueSubject as cy}from"@vkontakte/videoplayer-shared/es2015";var Fl=(r,e)=>new sy(t=>{let i=new uy,o=Qi(ny(window,"beforeunload"),r.events.willDestruct$),a=new cy(void 0),u;i.add(r.info.isLive$.pipe(oy()).subscribe(w=>{u&&(u.unsubscribe(),a.next(void 0)),w?u=r.info.liveTime$.pipe(ay(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 w=a.getValue();jl(m)||m===w||jl(w)||(t.next({from:m,to:w}),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 w=0;i.add(g.subscribe(()=>w=window.setTimeout(re,e.forceInterval))),i.add(b.subscribe(()=>window.clearTimeout(w)))}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 hy;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 vy;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:kl()),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}),this.logger=new Fr({config:this.config,debugLogger:this.debugLogger,api:this.api,error$:i,userSalt:t.userSalt});let{isEmbed:f,topOrigin:c}=gy();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,w=(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-(w-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(py()).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(Dl())}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(fy(Ul(e,"change"),dy(["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();ly(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,w])=>(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,wt as ConnectionType,xt as ContentType,ea as InteractiveInterfaceClick,eo as OneStat,_t as Quality,Rt as SeekAction,ar as VERSION};
|
|
6
|
+
var of=Object.create;var Gr=Object.defineProperty,nf=Object.defineProperties,af=Object.getOwnPropertyDescriptor,sf=Object.getOwnPropertyDescriptors,uf=Object.getOwnPropertyNames,no=Object.getOwnPropertySymbols,cf=Object.getPrototypeOf,so=Object.prototype.hasOwnProperty,lf=Object.prototype.propertyIsEnumerable;var Hr=Math.pow,ao=(r,e,t)=>e in r?Gr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,W=(r,e)=>{for(var t in e||(e={}))so.call(e,t)&&ao(r,t,e[t]);if(no)for(var t of no(e))lf.call(e,t)&&ao(r,t,e[t]);return r},Ye=(r,e)=>nf(r,sf(e));var n=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var ff=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of uf(e))!so.call(r,o)&&o!==t&&Gr(r,o,{get:()=>e[o],enumerable:!(i=af(e,o))||i.enumerable});return r};var M=(r,e,t)=>(t=r!=null?of(cf(r)):{},ff(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{l(t.next(c))}catch(f){o(f)}},u=c=>{try{l(t.throw(c))}catch(f){o(f)}},l=c=>c.done?i(c.value):Promise.resolve(c.value).then(a,u);l((t=t.apply(r,e)).next())});var I=n((zr,uo)=>{"use strict";var Se=function(r){return r&&r.Math===Math&&r};uo.exports=Se(typeof globalThis=="object"&&globalThis)||Se(typeof window=="object"&&window)||Se(typeof self=="object"&&self)||Se(typeof global=="object"&&global)||Se(typeof zr=="object"&&zr)||function(){return this}()||Function("return this")()});var P=n((xy,co)=>{"use strict";co.exports=function(r){try{return!!r()}catch(e){return!0}}});var Pe=n((Ry,lo)=>{"use strict";var df=P();lo.exports=!df(function(){var r=function(){}.bind();return typeof r!="function"||r.hasOwnProperty("prototype")})});var Qr=n((Cy,ho)=>{"use strict";var pf=Pe(),vo=Function.prototype,fo=vo.apply,po=vo.call;ho.exports=typeof Reflect=="object"&&Reflect.apply||(pf?po.bind(fo):function(){return po.apply(fo,arguments)})});var T=n((Ay,bo)=>{"use strict";var go=Pe(),mo=Function.prototype,Yr=mo.call,vf=go&&mo.bind.bind(Yr,Yr);bo.exports=go?vf:function(r){return function(){return Yr.apply(r,arguments)}}});var Ee=n((Ly,Io)=>{"use strict";var yo=T(),hf=yo({}.toString),gf=yo("".slice);Io.exports=function(r){return gf(hf(r),8,-1)}});var Jr=n((Ny,So)=>{"use strict";var mf=Ee(),bf=T();So.exports=function(r){if(mf(r)==="Function")return bf(r)}});var S=n((ky,Po)=>{"use strict";var Xr=typeof document=="object"&&document.all;Po.exports=typeof Xr=="undefined"&&Xr!==void 0?function(r){return typeof r=="function"||r===Xr}:function(r){return typeof r=="function"}});var q=n((Dy,Eo)=>{"use strict";var yf=P();Eo.exports=!yf(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var R=n(($y,To)=>{"use strict";var If=Pe(),Je=Function.prototype.call;To.exports=If?Je.bind(Je):function(){return Je.apply(Je,arguments)}});var Zr=n(Oo=>{"use strict";var qo={}.propertyIsEnumerable,_o=Object.getOwnPropertyDescriptor,Sf=_o&&!qo.call({1:2},1);Oo.f=Sf?function(e){var t=_o(this,e);return!!t&&t.enumerable}:qo});var Te=n((jy,wo)=>{"use strict";wo.exports=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}}});var Ro=n((Fy,xo)=>{"use strict";var Pf=T(),Ef=P(),Tf=Ee(),et=Object,qf=Pf("".split);xo.exports=Ef(function(){return!et("z").propertyIsEnumerable(0)})?function(r){return Tf(r)==="String"?qf(r,""):et(r)}:et});var qe=n((By,Co)=>{"use strict";Co.exports=function(r){return r==null}});var te=n((Uy,Ao)=>{"use strict";var _f=qe(),Of=TypeError;Ao.exports=function(r){if(_f(r))throw new Of("Can't call method on "+r);return r}});var H=n((Vy,Lo)=>{"use strict";var wf=Ro(),xf=te();Lo.exports=function(r){return wf(xf(r))}});var C=n((Ky,No)=>{"use strict";var Rf=S();No.exports=function(r){return typeof r=="object"?r!==null:Rf(r)}});var _e=n((Wy,ko)=>{"use strict";ko.exports={}});var j=n((Gy,$o)=>{"use strict";var rt=_e(),tt=I(),Cf=S(),Do=function(r){return Cf(r)?r:void 0};$o.exports=function(r,e){return arguments.length<2?Do(rt[r])||Do(tt[r]):rt[r]&&rt[r][e]||tt[r]&&tt[r][e]}});var Xe=n((Hy,Mo)=>{"use strict";var Af=T();Mo.exports=Af({}.isPrototypeOf)});var z=n((zy,Bo)=>{"use strict";var Lf=I(),jo=Lf.navigator,Fo=jo&&jo.userAgent;Bo.exports=Fo?String(Fo):""});var ot=n((Qy,Ho)=>{"use strict";var Go=I(),it=z(),Uo=Go.process,Vo=Go.Deno,Ko=Uo&&Uo.versions||Vo&&Vo.version,Wo=Ko&&Ko.v8,A,Ze;Wo&&(A=Wo.split("."),Ze=A[0]>0&&A[0]<4?1:+(A[0]+A[1]));!Ze&&it&&(A=it.match(/Edge\/(\d+)/),(!A||A[1]>=74)&&(A=it.match(/Chrome\/(\d+)/),A&&(Ze=+A[1])));Ho.exports=Ze});var nt=n((Yy,Qo)=>{"use strict";var zo=ot(),Nf=P(),kf=I(),Df=kf.String;Qo.exports=!!Object.getOwnPropertySymbols&&!Nf(function(){var r=Symbol("symbol detection");return!Df(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&zo&&zo<41})});var at=n((Jy,Yo)=>{"use strict";var $f=nt();Yo.exports=$f&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var st=n((Xy,Jo)=>{"use strict";var Mf=j(),jf=S(),Ff=Xe(),Bf=at(),Uf=Object;Jo.exports=Bf?function(r){return typeof r=="symbol"}:function(r){var e=Mf("Symbol");return jf(e)&&Ff(e.prototype,Uf(r))}});var Oe=n((Zy,Xo)=>{"use strict";var Vf=String;Xo.exports=function(r){try{return Vf(r)}catch(e){return"Object"}}});var F=n((eI,Zo)=>{"use strict";var Kf=S(),Wf=Oe(),Gf=TypeError;Zo.exports=function(r){if(Kf(r))return r;throw new Gf(Wf(r)+" is not a function")}});var er=n((rI,en)=>{"use strict";var Hf=F(),zf=qe();en.exports=function(r,e){var t=r[e];return zf(t)?void 0:Hf(t)}});var tn=n((tI,rn)=>{"use strict";var ut=R(),ct=S(),lt=C(),Qf=TypeError;rn.exports=function(r,e){var t,i;if(e==="string"&&ct(t=r.toString)&&!lt(i=ut(t,r))||ct(t=r.valueOf)&&!lt(i=ut(t,r))||e!=="string"&&ct(t=r.toString)&&!lt(i=ut(t,r)))return i;throw new Qf("Can't convert object to primitive value")}});var D=n((iI,on)=>{"use strict";on.exports=!0});var sn=n((oI,an)=>{"use strict";var nn=I(),Yf=Object.defineProperty;an.exports=function(r,e){try{Yf(nn,r,{value:e,configurable:!0,writable:!0})}catch(t){nn[r]=e}return e}});var we=n((nI,ln)=>{"use strict";var Jf=D(),Xf=I(),Zf=sn(),un="__core-js_shared__",cn=ln.exports=Xf[un]||Zf(un,{});(cn.versions||(cn.versions=[])).push({version:"3.38.0",mode:Jf?"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 ft=n((aI,dn)=>{"use strict";var fn=we();dn.exports=function(r,e){return fn[r]||(fn[r]=e||{})}});var dt=n((sI,pn)=>{"use strict";var ed=te(),rd=Object;pn.exports=function(r){return rd(ed(r))}});var $=n((uI,vn)=>{"use strict";var td=T(),id=dt(),od=td({}.hasOwnProperty);vn.exports=Object.hasOwn||function(e,t){return od(id(e),t)}});var pt=n((cI,hn)=>{"use strict";var nd=T(),ad=0,sd=Math.random(),ud=nd(1 .toString);hn.exports=function(r){return"Symbol("+(r===void 0?"":r)+")_"+ud(++ad+sd,36)}});var _=n((lI,mn)=>{"use strict";var cd=I(),ld=ft(),gn=$(),fd=pt(),dd=nt(),pd=at(),ie=cd.Symbol,vt=ld("wks"),vd=pd?ie.for||ie:ie&&ie.withoutSetter||fd;mn.exports=function(r){return gn(vt,r)||(vt[r]=dd&&gn(ie,r)?ie[r]:vd("Symbol."+r)),vt[r]}});var Sn=n((fI,In)=>{"use strict";var hd=R(),bn=C(),yn=st(),gd=er(),md=tn(),bd=_(),yd=TypeError,Id=bd("toPrimitive");In.exports=function(r,e){if(!bn(r)||yn(r))return r;var t=gd(r,Id),i;if(t){if(e===void 0&&(e="default"),i=hd(t,r,e),!bn(i)||yn(i))return i;throw new yd("Can't convert object to primitive value")}return e===void 0&&(e="number"),md(r,e)}});var ht=n((dI,Pn)=>{"use strict";var Sd=Sn(),Pd=st();Pn.exports=function(r){var e=Sd(r,"string");return Pd(e)?e:e+""}});var rr=n((pI,Tn)=>{"use strict";var Ed=I(),En=C(),gt=Ed.document,Td=En(gt)&&En(gt.createElement);Tn.exports=function(r){return Td?gt.createElement(r):{}}});var mt=n((vI,qn)=>{"use strict";var qd=q(),_d=P(),Od=rr();qn.exports=!qd&&!_d(function(){return Object.defineProperty(Od("div"),"a",{get:function(){return 7}}).a!==7})});var wn=n(On=>{"use strict";var wd=q(),xd=R(),Rd=Zr(),Cd=Te(),Ad=H(),Ld=ht(),Nd=$(),kd=mt(),_n=Object.getOwnPropertyDescriptor;On.f=wd?_n:function(e,t){if(e=Ad(e),t=Ld(t),kd)try{return _n(e,t)}catch(i){}if(Nd(e,t))return Cd(!xd(Rd.f,e,t),e[t])}});var bt=n((gI,xn)=>{"use strict";var Dd=P(),$d=S(),Md=/#|\.prototype\./,xe=function(r,e){var t=Fd[jd(r)];return t===Ud?!0:t===Bd?!1:$d(e)?Dd(e):!!e},jd=xe.normalize=function(r){return String(r).replace(Md,".").toLowerCase()},Fd=xe.data={},Bd=xe.NATIVE="N",Ud=xe.POLYFILL="P";xn.exports=xe});var Re=n((mI,Cn)=>{"use strict";var Rn=Jr(),Vd=F(),Kd=Pe(),Wd=Rn(Rn.bind);Cn.exports=function(r,e){return Vd(r),e===void 0?r:Kd?Wd(r,e):function(){return r.apply(e,arguments)}}});var yt=n((bI,An)=>{"use strict";var Gd=q(),Hd=P();An.exports=Gd&&Hd(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var B=n((yI,Ln)=>{"use strict";var zd=C(),Qd=String,Yd=TypeError;Ln.exports=function(r){if(zd(r))return r;throw new Yd(Qd(r)+" is not an object")}});var Q=n(kn=>{"use strict";var Jd=q(),Xd=mt(),Zd=yt(),tr=B(),Nn=ht(),ep=TypeError,It=Object.defineProperty,rp=Object.getOwnPropertyDescriptor,St="enumerable",Pt="configurable",Et="writable";kn.f=Jd?Zd?function(e,t,i){if(tr(e),t=Nn(t),tr(i),typeof e=="function"&&t==="prototype"&&"value"in i&&Et in i&&!i[Et]){var o=rp(e,t);o&&o[Et]&&(e[t]=i.value,i={configurable:Pt in i?i[Pt]:o[Pt],enumerable:St in i?i[St]:o[St],writable:!1})}return It(e,t,i)}:It:function(e,t,i){if(tr(e),t=Nn(t),tr(i),Xd)try{return It(e,t,i)}catch(o){}if("get"in i||"set"in i)throw new ep("Accessors not supported");return"value"in i&&(e[t]=i.value),e}});var oe=n((SI,Dn)=>{"use strict";var tp=q(),ip=Q(),op=Te();Dn.exports=tp?function(r,e,t){return ip.f(r,e,op(1,t))}:function(r,e,t){return r[e]=t,r}});var O=n((PI,Mn)=>{"use strict";var Ce=I(),np=Qr(),ap=Jr(),sp=S(),up=wn().f,cp=bt(),ne=_e(),lp=Re(),ae=oe(),$n=$();we();var fp=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 np(r,this,arguments)};return e.prototype=r.prototype,e};Mn.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,l=i?ne:ne[t]||ae(ne,t,{})[t],c=l.prototype,f,p,v,s,d,h,g,b,m;for(s in e)f=cp(i?s:t+(o?".":"#")+s,r.forced),p=!f&&u&&$n(u,s),h=l[s],p&&(r.dontCallGetSet?(m=up(u,s),g=m&&m.value):g=u[s]),d=p&&g?g:e[s],!(!f&&!a&&typeof h==typeof d)&&(r.bind&&p?b=lp(d,Ce):r.wrap&&p?b=fp(d):a&&sp(d)?b=ap(d):b=d,(r.sham||d&&d.sham||h&&h.sham)&&ae(b,"sham",!0),ae(l,s,b),a&&(v=t+"Prototype",$n(ne,v)||ae(ne,v,{}),ae(ne[v],s,d),r.real&&c&&(f||!c[s])&&ae(c,s,d)))}});var Fn=n((EI,jn)=>{"use strict";var dp=Math.ceil,pp=Math.floor;jn.exports=Math.trunc||function(e){var t=+e;return(t>0?pp:dp)(t)}});var ir=n((TI,Bn)=>{"use strict";var vp=Fn();Bn.exports=function(r){var e=+r;return e!==e||e===0?0:vp(e)}});var Vn=n((qI,Un)=>{"use strict";var hp=ir(),gp=Math.max,mp=Math.min;Un.exports=function(r,e){var t=hp(r);return t<0?gp(t+e,0):mp(t,e)}});var Tt=n((_I,Kn)=>{"use strict";var bp=ir(),yp=Math.min;Kn.exports=function(r){var e=bp(r);return e>0?yp(e,9007199254740991):0}});var qt=n((OI,Wn)=>{"use strict";var Ip=Tt();Wn.exports=function(r){return Ip(r.length)}});var _t=n((wI,Hn)=>{"use strict";var Sp=H(),Pp=Vn(),Ep=qt(),Gn=function(r){return function(e,t,i){var o=Sp(e),a=Ep(o);if(a===0)return!r&&-1;var u=Pp(i,a),l;if(r&&t!==t){for(;a>u;)if(l=o[u++],l!==l)return!0}else for(;a>u;u++)if((r||u in o)&&o[u]===t)return r||u||0;return!r&&-1}};Hn.exports={includes:Gn(!0),indexOf:Gn(!1)}});var Ot=n((xI,zn)=>{"use strict";zn.exports=function(){}});var Qn=n(()=>{"use strict";var Tp=O(),qp=_t().includes,_p=P(),Op=Ot(),wp=_p(function(){return!Array(1).includes()});Tp({target:"Array",proto:!0,forced:wp},{includes:function(e){return qp(this,e,arguments.length>1?arguments[1]:void 0)}});Op("includes")});var or=n((AI,Yn)=>{"use strict";var xp=j();Yn.exports=xp});var Xn=n((LI,Jn)=>{"use strict";Qn();var Rp=or();Jn.exports=Rp("Array","includes")});var ea=n((NI,Zn)=>{"use strict";var Cp=Xn();Zn.exports=Cp});var nr=n((kI,ra)=>{"use strict";var Ap=ea();ra.exports=Ap});var ca=n(()=>{"use strict"});var Nt=n((zI,la)=>{"use strict";var Le=I(),kp=z(),Dp=Ee(),sr=function(r){return kp.slice(0,r.length)===r};la.exports=function(){return sr("Bun/")?"BUN":sr("Cloudflare-Workers")?"CLOUDFLARE":sr("Deno/")?"DENO":sr("Node.js/")?"NODE":Le.Bun&&typeof Bun.version=="string"?"BUN":Le.Deno&&typeof Deno.version=="object"?"DENO":Dp(Le.process)==="process"?"NODE":Le.window&&Le.document?"BROWSER":"REST"}()});var ur=n((QI,fa)=>{"use strict";var $p=Nt();fa.exports=$p==="NODE"});var se=n((YI,da)=>{"use strict";var Mp=oe();da.exports=function(r,e,t,i){return i&&i.enumerable?r[e]=t:Mp(r,e,t),r}});var va=n((JI,pa)=>{"use strict";var jp=T(),Fp=F();pa.exports=function(r,e,t){try{return jp(Fp(Object.getOwnPropertyDescriptor(r,e)[t]))}catch(i){}}});var ga=n((XI,ha)=>{"use strict";var Bp=C();ha.exports=function(r){return Bp(r)||r===null}});var ba=n((ZI,ma)=>{"use strict";var Up=ga(),Vp=String,Kp=TypeError;ma.exports=function(r){if(Up(r))return r;throw new Kp("Can't set "+Vp(r)+" as a prototype")}});var kt=n((eS,ya)=>{"use strict";var Wp=va(),Gp=C(),Hp=te(),zp=ba();ya.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var r=!1,e={},t;try{t=Wp(Object.prototype,"__proto__","set"),t(e,[]),r=e instanceof Array}catch(i){}return function(o,a){return Hp(o),zp(a),Gp(o)&&(r?t(o,a):o.__proto__=a),o}}():void 0)});var cr=n((rS,Sa)=>{"use strict";var Qp=_(),Yp=Qp("toStringTag"),Ia={};Ia[Yp]="z";Sa.exports=String(Ia)==="[object z]"});var Ne=n((tS,Pa)=>{"use strict";var Jp=cr(),Xp=S(),lr=Ee(),Zp=_(),ev=Zp("toStringTag"),rv=Object,tv=lr(function(){return arguments}())==="Arguments",iv=function(r,e){try{return r[e]}catch(t){}};Pa.exports=Jp?lr:function(r){var e,t,i;return r===void 0?"Undefined":r===null?"Null":typeof(t=iv(e=rv(r),ev))=="string"?t:tv?lr(e):(i=lr(e))==="Object"&&Xp(e.callee)?"Arguments":i}});var Ta=n((iS,Ea)=>{"use strict";var ov=cr(),nv=Ne();Ea.exports=ov?{}.toString:function(){return"[object "+nv(this)+"]"}});var ke=n((oS,_a)=>{"use strict";var av=cr(),sv=Q().f,uv=oe(),cv=$(),lv=Ta(),fv=_(),qa=fv("toStringTag");_a.exports=function(r,e,t,i){var o=t?r:r&&r.prototype;o&&(cv(o,qa)||sv(o,qa,{configurable:!0,value:e}),i&&!av&&uv(o,"toString",lv))}});var wa=n((nS,Oa)=>{"use strict";var dv=Q();Oa.exports=function(r,e,t){return dv.f(r,e,t)}});var Ca=n((aS,Ra)=>{"use strict";var pv=j(),vv=wa(),hv=_(),gv=q(),xa=hv("species");Ra.exports=function(r){var e=pv(r);gv&&e&&!e[xa]&&vv(e,xa,{configurable:!0,get:function(){return this}})}});var La=n((sS,Aa)=>{"use strict";var mv=Xe(),bv=TypeError;Aa.exports=function(r,e){if(mv(e,r))return r;throw new bv("Incorrect invocation")}});var $t=n((uS,Na)=>{"use strict";var yv=T(),Iv=S(),Dt=we(),Sv=yv(Function.toString);Iv(Dt.inspectSource)||(Dt.inspectSource=function(r){return Sv(r)});Na.exports=Dt.inspectSource});var Fa=n((cS,ja)=>{"use strict";var Pv=T(),Ev=P(),ka=S(),Tv=Ne(),qv=j(),_v=$t(),Da=function(){},$a=qv("Reflect","construct"),Mt=/^\s*(?:class|function)\b/,Ov=Pv(Mt.exec),wv=!Mt.test(Da),De=function(e){if(!ka(e))return!1;try{return $a(Da,[],e),!0}catch(t){return!1}},Ma=function(e){if(!ka(e))return!1;switch(Tv(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return wv||!!Ov(Mt,_v(e))}catch(t){return!0}};Ma.sham=!0;ja.exports=!$a||Ev(function(){var r;return De(De.call)||!De(Object)||!De(function(){r=!0})||r})?Ma:De});var Ua=n((lS,Ba)=>{"use strict";var xv=Fa(),Rv=Oe(),Cv=TypeError;Ba.exports=function(r){if(xv(r))return r;throw new Cv(Rv(r)+" is not a constructor")}});var jt=n((fS,Ka)=>{"use strict";var Va=B(),Av=Ua(),Lv=qe(),Nv=_(),kv=Nv("species");Ka.exports=function(r,e){var t=Va(r).constructor,i;return t===void 0||Lv(i=Va(t)[kv])?e:Av(i)}});var Ft=n((dS,Wa)=>{"use strict";var Dv=j();Wa.exports=Dv("document","documentElement")});var Ha=n((pS,Ga)=>{"use strict";var $v=T();Ga.exports=$v([].slice)});var Qa=n((vS,za)=>{"use strict";var Mv=TypeError;za.exports=function(r,e){if(r<e)throw new Mv("Not enough arguments");return r}});var Bt=n((hS,Ya)=>{"use strict";var jv=z();Ya.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(jv)});var Yt=n((gS,ns)=>{"use strict";var w=I(),Fv=Qr(),Bv=Re(),Ja=S(),Uv=$(),os=P(),Xa=Ft(),Vv=Ha(),Za=rr(),Kv=Qa(),Wv=Bt(),Gv=ur(),Ht=w.setImmediate,zt=w.clearImmediate,Hv=w.process,Ut=w.Dispatch,zv=w.Function,es=w.MessageChannel,Qv=w.String,Vt=0,$e={},rs="onreadystatechange",Me,Y,Kt,Wt;os(function(){Me=w.location});var Qt=function(r){if(Uv($e,r)){var e=$e[r];delete $e[r],e()}},Gt=function(r){return function(){Qt(r)}},ts=function(r){Qt(r.data)},is=function(r){w.postMessage(Qv(r),Me.protocol+"//"+Me.host)};(!Ht||!zt)&&(Ht=function(e){Kv(arguments.length,1);var t=Ja(e)?e:zv(e),i=Vv(arguments,1);return $e[++Vt]=function(){Fv(t,void 0,i)},Y(Vt),Vt},zt=function(e){delete $e[e]},Gv?Y=function(r){Hv.nextTick(Gt(r))}:Ut&&Ut.now?Y=function(r){Ut.now(Gt(r))}:es&&!Wv?(Kt=new es,Wt=Kt.port2,Kt.port1.onmessage=ts,Y=Bv(Wt.postMessage,Wt)):w.addEventListener&&Ja(w.postMessage)&&!w.importScripts&&Me&&Me.protocol!=="file:"&&!os(is)?(Y=is,w.addEventListener("message",ts,!1)):rs in Za("script")?Y=function(r){Xa.appendChild(Za("script"))[rs]=function(){Xa.removeChild(this),Qt(r)}}:Y=function(r){setTimeout(Gt(r),0)});ns.exports={set:Ht,clear:zt}});var us=n((mS,ss)=>{"use strict";var as=I(),Yv=q(),Jv=Object.getOwnPropertyDescriptor;ss.exports=function(r){if(!Yv)return as[r];var e=Jv(as,r);return e&&e.value}});var Jt=n((bS,ls)=>{"use strict";var cs=function(){this.head=null,this.tail=null};cs.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}}};ls.exports=cs});var ds=n((yS,fs)=>{"use strict";var Xv=z();fs.exports=/ipad|iphone|ipod/i.test(Xv)&&typeof Pebble!="undefined"});var vs=n((IS,ps)=>{"use strict";var Zv=z();ps.exports=/web0s(?!.*chrome)/i.test(Zv)});var Ss=n((SS,Is)=>{"use strict";var ce=I(),eh=us(),hs=Re(),Xt=Yt().set,rh=Jt(),th=Bt(),ih=ds(),oh=vs(),Zt=ur(),gs=ce.MutationObserver||ce.WebKitMutationObserver,ms=ce.document,bs=ce.process,fr=ce.Promise,ti=eh("queueMicrotask"),ue,ei,ri,dr,ys;ti||(je=new rh,Fe=function(){var r,e;for(Zt&&(r=bs.domain)&&r.exit();e=je.get();)try{e()}catch(t){throw je.head&&ue(),t}r&&r.enter()},!th&&!Zt&&!oh&&gs&&ms?(ei=!0,ri=ms.createTextNode(""),new gs(Fe).observe(ri,{characterData:!0}),ue=function(){ri.data=ei=!ei}):!ih&&fr&&fr.resolve?(dr=fr.resolve(void 0),dr.constructor=fr,ys=hs(dr.then,dr),ue=function(){ys(Fe)}):Zt?ue=function(){bs.nextTick(Fe)}:(Xt=hs(Xt,ce),ue=function(){Xt(Fe)}),ti=function(r){je.head||ue(),je.add(r)});var je,Fe;Is.exports=ti});var Es=n((PS,Ps)=>{"use strict";Ps.exports=function(r,e){try{arguments.length===1?console.error(r):console.error(r,e)}catch(t){}}});var pr=n((ES,Ts)=>{"use strict";Ts.exports=function(r){try{return{error:!1,value:r()}}catch(e){return{error:!0,value:e}}}});var Os=n((TS,_s)=>{"use strict";var nh=I(),ah=S(),qs=nh.WeakMap;_s.exports=ah(qs)&&/native code/.test(String(qs))});var vr=n((qS,xs)=>{"use strict";var sh=ft(),uh=pt(),ws=sh("keys");xs.exports=function(r){return ws[r]||(ws[r]=uh(r))}});var hr=n((_S,Rs)=>{"use strict";Rs.exports={}});var ai=n((OS,Ls)=>{"use strict";var ch=Os(),As=I(),lh=C(),fh=oe(),ii=$(),oi=we(),dh=vr(),ph=hr(),Cs="Object already initialized",ni=As.TypeError,vh=As.WeakMap,gr,Be,mr,hh=function(r){return mr(r)?Be(r):gr(r,{})},gh=function(r){return function(e){var t;if(!lh(e)||(t=Be(e)).type!==r)throw new ni("Incompatible receiver, "+r+" required");return t}};ch||oi.state?(L=oi.state||(oi.state=new vh),L.get=L.get,L.has=L.has,L.set=L.set,gr=function(r,e){if(L.has(r))throw new ni(Cs);return e.facade=r,L.set(r,e),e},Be=function(r){return L.get(r)||{}},mr=function(r){return L.has(r)}):(J=dh("state"),ph[J]=!0,gr=function(r,e){if(ii(r,J))throw new ni(Cs);return e.facade=r,fh(r,J,e),e},Be=function(r){return ii(r,J)?r[J]:{}},mr=function(r){return ii(r,J)});var L,J;Ls.exports={set:gr,get:Be,has:mr,enforce:hh,getterFor:gh}});var X=n((wS,Ns)=>{"use strict";var mh=I();Ns.exports=mh.Promise});var le=n((xS,Ms)=>{"use strict";var bh=I(),Ue=X(),yh=S(),Ih=bt(),Sh=$t(),Ph=_(),ks=Nt(),Eh=D(),si=ot(),Ds=Ue&&Ue.prototype,Th=Ph("species"),ui=!1,$s=yh(bh.PromiseRejectionEvent),qh=Ih("Promise",function(){var r=Sh(Ue),e=r!==String(Ue);if(!e&&si===66||Eh&&!(Ds.catch&&Ds.finally))return!0;if(!si||si<51||!/native code/.test(r)){var t=new Ue(function(a){a(1)}),i=function(a){a(function(){},function(){})},o=t.constructor={};if(o[Th]=i,ui=t.then(function(){})instanceof i,!ui)return!0}return!e&&(ks==="BROWSER"||ks==="DENO")&&!$s});Ms.exports={CONSTRUCTOR:qh,REJECTION_EVENT:$s,SUBCLASSING:ui}});var fe=n((RS,Fs)=>{"use strict";var js=F(),_h=TypeError,Oh=function(r){var e,t;this.promise=new r(function(i,o){if(e!==void 0||t!==void 0)throw new _h("Bad Promise constructor");e=i,t=o}),this.resolve=js(e),this.reject=js(t)};Fs.exports.f=function(r){return new Oh(r)}});var nu=n(()=>{"use strict";var wh=O(),xh=D(),Sr=ur(),G=I(),he=R(),Bs=se(),Us=kt(),Rh=ke(),Ch=Ca(),Ah=F(),Ir=S(),Lh=C(),Nh=La(),kh=jt(),Hs=Yt().set,pi=Ss(),Dh=Es(),$h=pr(),Mh=Jt(),zs=ai(),Pr=X(),vi=le(),Qs=fe(),Er="Promise",Ys=vi.CONSTRUCTOR,jh=vi.REJECTION_EVENT,Fh=vi.SUBCLASSING,ci=zs.getterFor(Er),Bh=zs.set,de=Pr&&Pr.prototype,Z=Pr,br=de,Js=G.TypeError,li=G.document,hi=G.process,fi=Qs.f,Uh=fi,Vh=!!(li&&li.createEvent&&G.dispatchEvent),Xs="unhandledrejection",Kh="rejectionhandled",Vs=0,Zs=1,Wh=2,gi=1,eu=2,yr,Ks,Gh,Ws,ru=function(r){var e;return Lh(r)&&Ir(e=r.then)?e:!1},tu=function(r,e){var t=e.value,i=e.state===Zs,o=i?r.ok:r.fail,a=r.resolve,u=r.reject,l=r.domain,c,f,p;try{o?(i||(e.rejection===eu&&zh(e),e.rejection=gi),o===!0?c=t:(l&&l.enter(),c=o(t),l&&(l.exit(),p=!0)),c===r.promise?u(new Js("Promise-chain cycle")):(f=ru(c))?he(f,c,a,u):a(c)):u(t)}catch(v){l&&!p&&l.exit(),u(v)}},iu=function(r,e){r.notified||(r.notified=!0,pi(function(){for(var t=r.reactions,i;i=t.get();)tu(i,r);r.notified=!1,e&&!r.rejection&&Hh(r)}))},ou=function(r,e,t){var i,o;Vh?(i=li.createEvent("Event"),i.promise=e,i.reason=t,i.initEvent(r,!1,!0),G.dispatchEvent(i)):i={promise:e,reason:t},!jh&&(o=G["on"+r])?o(i):r===Xs&&Dh("Unhandled promise rejection",t)},Hh=function(r){he(Hs,G,function(){var e=r.facade,t=r.value,i=Gs(r),o;if(i&&(o=$h(function(){Sr?hi.emit("unhandledRejection",t,e):ou(Xs,e,t)}),r.rejection=Sr||Gs(r)?eu:gi,o.error))throw o.value})},Gs=function(r){return r.rejection!==gi&&!r.parent},zh=function(r){he(Hs,G,function(){var e=r.facade;Sr?hi.emit("rejectionHandled",e):ou(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=Wh,iu(r,!0))},di=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw new Js("Promise can't be resolved itself");var i=ru(e);i?pi(function(){var o={done:!1};try{he(i,e,pe(di,o,r),pe(ve,o,r))}catch(a){ve(o,a,r)}}):(r.value=e,r.state=Zs,iu(r,!1))}catch(o){ve({done:!1},o,r)}}};if(Ys&&(Z=function(e){Nh(this,br),Ah(e),he(yr,this);var t=ci(this);try{e(pe(di,t),pe(ve,t))}catch(i){ve(t,i)}},br=Z.prototype,yr=function(e){Bh(this,{type:Er,done:!1,notified:!1,parent:!1,reactions:new Mh,rejection:!1,state:Vs,value:void 0})},yr.prototype=Bs(br,"then",function(e,t){var i=ci(this),o=fi(kh(this,Z));return i.parent=!0,o.ok=Ir(e)?e:!0,o.fail=Ir(t)&&t,o.domain=Sr?hi.domain:void 0,i.state===Vs?i.reactions.add(o):pi(function(){tu(o,i)}),o.promise}),Ks=function(){var r=new yr,e=ci(r);this.promise=r,this.resolve=pe(di,e),this.reject=pe(ve,e)},Qs.f=fi=function(r){return r===Z||r===Gh?new Ks(r):Uh(r)},!xh&&Ir(Pr)&&de!==Object.prototype)){Ws=de.then,Fh||Bs(de,"then",function(e,t){var i=this;return new Z(function(o,a){he(Ws,i,o,a)}).then(e,t)},{unsafe:!0});try{delete de.constructor}catch(r){}Us&&Us(de,br)}wh({global:!0,constructor:!0,wrap:!0,forced:Ys},{Promise:Z});Rh(Z,Er,!1,!0);Ch(Er)});var ee=n((LS,au)=>{"use strict";au.exports={}});var uu=n((NS,su)=>{"use strict";var Qh=_(),Yh=ee(),Jh=Qh("iterator"),Xh=Array.prototype;su.exports=function(r){return r!==void 0&&(Yh.Array===r||Xh[Jh]===r)}});var mi=n((kS,lu)=>{"use strict";var Zh=Ne(),cu=er(),eg=qe(),rg=ee(),tg=_(),ig=tg("iterator");lu.exports=function(r){if(!eg(r))return cu(r,ig)||cu(r,"@@iterator")||rg[Zh(r)]}});var du=n((DS,fu)=>{"use strict";var og=R(),ng=F(),ag=B(),sg=Oe(),ug=mi(),cg=TypeError;fu.exports=function(r,e){var t=arguments.length<2?ug(r):e;if(ng(t))return ag(og(t,r));throw new cg(sg(r)+" is not iterable")}});var hu=n(($S,vu)=>{"use strict";var lg=R(),pu=B(),fg=er();vu.exports=function(r,e,t){var i,o;pu(r);try{if(i=fg(r,"return"),!i){if(e==="throw")throw t;return t}i=lg(i,r)}catch(a){o=!0,i=a}if(e==="throw")throw t;if(o)throw i;return pu(i),t}});var qr=n((MS,yu)=>{"use strict";var dg=Re(),pg=R(),vg=B(),hg=Oe(),gg=uu(),mg=qt(),gu=Xe(),bg=du(),yg=mi(),mu=hu(),Ig=TypeError,Tr=function(r,e){this.stopped=r,this.result=e},bu=Tr.prototype;yu.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),l=!!(t&&t.INTERRUPTED),c=dg(e,i),f,p,v,s,d,h,g,b=function(y){return f&&mu(f,"normal",y),new Tr(!0,y)},m=function(y){return o?(vg(y),l?c(y[0],y[1],b):c(y[0],y[1])):l?c(y,b):c(y)};if(a)f=r.iterator;else if(u)f=r;else{if(p=yg(r),!p)throw new Ig(hg(r)+" is not iterable");if(gg(p)){for(v=0,s=mg(r);s>v;v++)if(d=m(r[v]),d&&gu(bu,d))return d;return new Tr(!1)}f=bg(r,p)}for(h=a?r.next:f.next;!(g=pg(h,f)).done;){try{d=m(g.value)}catch(y){mu(f,"throw",y)}if(typeof d=="object"&&d&&gu(bu,d))return d}return new Tr(!1)}});var Tu=n((jS,Eu)=>{"use strict";var Sg=_(),Su=Sg("iterator"),Pu=!1;try{Iu=0,bi={next:function(){return{done:!!Iu++}},return:function(){Pu=!0}},bi[Su]=function(){return this},Array.from(bi,function(){throw 2})}catch(r){}var Iu,bi;Eu.exports=function(r,e){try{if(!e&&!Pu)return!1}catch(o){return!1}var t=!1;try{var i={};i[Su]=function(){return{next:function(){return{done:t=!0}}}},r(i)}catch(o){}return t}});var yi=n((FS,qu)=>{"use strict";var Pg=X(),Eg=Tu(),Tg=le().CONSTRUCTOR;qu.exports=Tg||!Eg(function(r){Pg.all(r).then(void 0,function(){})})});var _u=n(()=>{"use strict";var qg=O(),_g=R(),Og=F(),wg=fe(),xg=pr(),Rg=qr(),Cg=yi();qg({target:"Promise",stat:!0,forced:Cg},{all:function(e){var t=this,i=wg.f(t),o=i.resolve,a=i.reject,u=xg(function(){var l=Og(t.resolve),c=[],f=0,p=1;Rg(e,function(v){var s=f++,d=!1;p++,_g(l,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 wu=n(()=>{"use strict";var Ag=O(),Lg=D(),Ng=le().CONSTRUCTOR,Si=X(),kg=j(),Dg=S(),$g=se(),Ou=Si&&Si.prototype;Ag({target:"Promise",proto:!0,forced:Ng,real:!0},{catch:function(r){return this.then(void 0,r)}});!Lg&&Dg(Si)&&(Ii=kg("Promise").prototype.catch,Ou.catch!==Ii&&$g(Ou,"catch",Ii,{unsafe:!0}));var Ii});var xu=n(()=>{"use strict";var Mg=O(),jg=R(),Fg=F(),Bg=fe(),Ug=pr(),Vg=qr(),Kg=yi();Mg({target:"Promise",stat:!0,forced:Kg},{race:function(e){var t=this,i=Bg.f(t),o=i.reject,a=Ug(function(){var u=Fg(t.resolve);Vg(e,function(l){jg(u,t,l).then(i.resolve,o)})});return a.error&&o(a.value),i.promise}})});var Ru=n(()=>{"use strict";var Wg=O(),Gg=fe(),Hg=le().CONSTRUCTOR;Wg({target:"Promise",stat:!0,forced:Hg},{reject:function(e){var t=Gg.f(this),i=t.reject;return i(e),t.promise}})});var Pi=n((QS,Cu)=>{"use strict";var zg=B(),Qg=C(),Yg=fe();Cu.exports=function(r,e){if(zg(r),Qg(e)&&e.constructor===r)return e;var t=Yg.f(r),i=t.resolve;return i(e),t.promise}});var Nu=n(()=>{"use strict";var Jg=O(),Xg=j(),Au=D(),Zg=X(),Lu=le().CONSTRUCTOR,em=Pi(),rm=Xg("Promise"),tm=Au&&!Lu;Jg({target:"Promise",stat:!0,forced:Au||Lu},{resolve:function(e){return em(tm&&this===rm?Zg:this,e)}})});var ku=n(()=>{"use strict";nu();_u();wu();xu();Ru();Nu()});var ju=n(()=>{"use strict";var im=O(),om=D(),_r=X(),nm=P(),$u=j(),Mu=S(),am=jt(),Du=Pi(),sm=se(),Ti=_r&&_r.prototype,um=!!_r&&nm(function(){Ti.finally.call({then:function(){}},function(){})});im({target:"Promise",proto:!0,real:!0,forced:um},{finally:function(r){var e=am(this,$u("Promise")),t=Mu(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)}});!om&&Mu(_r)&&(Ei=$u("Promise").prototype.finally,Ti.finally!==Ei&&sm(Ti,"finally",Ei,{unsafe:!0}));var Ei});var Bu=n((tP,Fu)=>{"use strict";ca();ku();ju();var cm=or();Fu.exports=cm("Promise","finally")});var Vu=n((iP,Uu)=>{"use strict";var lm=Bu();Uu.exports=lm});var Wu=n((oP,Ku)=>{"use strict";var fm=Vu();Ku.exports=fm});var Hu=n((nP,Gu)=>{"use strict";var dm=P();Gu.exports=!dm(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype})});var Or=n((aP,Qu)=>{"use strict";var pm=$(),vm=S(),hm=dt(),gm=vr(),mm=Hu(),zu=gm("IE_PROTO"),qi=Object,bm=qi.prototype;Qu.exports=mm?qi.getPrototypeOf:function(r){var e=hm(r);if(pm(e,zu))return e[zu];var t=e.constructor;return vm(t)&&e instanceof t?t.prototype:e instanceof qi?bm:null}});var Xu=n((sP,Ju)=>{"use strict";var ym=T(),_i=$(),Im=H(),Sm=_t().indexOf,Pm=hr(),Yu=ym([].push);Ju.exports=function(r,e){var t=Im(r),i=0,o=[],a;for(a in t)!_i(Pm,a)&&_i(t,a)&&Yu(o,a);for(;e.length>i;)_i(t,a=e[i++])&&(~Sm(o,a)||Yu(o,a));return o}});var Oi=n((uP,Zu)=>{"use strict";Zu.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var wi=n((cP,ec)=>{"use strict";var Em=Xu(),Tm=Oi();ec.exports=Object.keys||function(e){return Em(e,Tm)}});var ac=n((lP,nc)=>{"use strict";var tc=q(),qm=P(),ic=T(),_m=Or(),Om=wi(),wm=H(),xm=Zr().f,oc=ic(xm),Rm=ic([].push),Cm=tc&&qm(function(){var r=Object.create(null);return r[2]=2,!oc(r,2)}),rc=function(r){return function(e){for(var t=wm(e),i=Om(t),o=Cm&&_m(t)===null,a=i.length,u=0,l=[],c;a>u;)c=i[u++],(!tc||(o?c in t:oc(t,c)))&&Rm(l,r?[c,t[c]]:t[c]);return l}};nc.exports={entries:rc(!0),values:rc(!1)}});var sc=n(()=>{"use strict";var Am=O(),Lm=ac().entries;Am({target:"Object",stat:!0},{entries:function(e){return Lm(e)}})});var cc=n((pP,uc)=>{"use strict";sc();var Nm=_e();uc.exports=Nm.Object.entries});var fc=n((vP,lc)=>{"use strict";var km=cc();lc.exports=km});var wr=n((hP,dc)=>{"use strict";var Dm=fc();dc.exports=Dm});var hc=n((gP,vc)=>{"use strict";var xi=q(),$m=$(),pc=Function.prototype,Mm=xi&&Object.getOwnPropertyDescriptor,Ri=$m(pc,"name"),jm=Ri&&function(){}.name==="something",Fm=Ri&&(!xi||xi&&Mm(pc,"name").configurable);vc.exports={EXISTS:Ri,PROPER:jm,CONFIGURABLE:Fm}});var mc=n(gc=>{"use strict";var Bm=q(),Um=yt(),Vm=Q(),Km=B(),Wm=H(),Gm=wi();gc.f=Bm&&!Um?Object.defineProperties:function(e,t){Km(e);for(var i=Wm(t),o=Gm(t),a=o.length,u=0,l;a>u;)Vm.f(e,l=o[u++],i[l]);return e}});var Ni=n((bP,Tc)=>{"use strict";var Hm=B(),zm=mc(),bc=Oi(),Qm=hr(),Ym=Ft(),Jm=rr(),Xm=vr(),yc=">",Ic="<",Ai="prototype",Li="script",Pc=Xm("IE_PROTO"),Ci=function(){},Ec=function(r){return Ic+Li+yc+r+Ic+"/"+Li+yc},Sc=function(r){r.write(Ec("")),r.close();var e=r.parentWindow.Object;return r=null,e},Zm=function(){var r=Jm("iframe"),e="java"+Li+":",t;return r.style.display="none",Ym.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?Sc(xr):Zm():Sc(xr);for(var r=bc.length;r--;)delete Rr[Ai][bc[r]];return Rr()};Qm[Pc]=!0;Tc.exports=Object.create||function(e,t){var i;return e!==null?(Ci[Ai]=Hm(e),i=new Ci,Ci[Ai]=null,i[Pc]=e):i=Rr(),t===void 0?i:zm.f(i,t)}});var Mi=n((yP,Oc)=>{"use strict";var eb=P(),rb=S(),tb=C(),ib=Ni(),qc=Or(),ob=se(),nb=_(),ab=D(),$i=nb("iterator"),_c=!1,U,ki,Di;[].keys&&(Di=[].keys(),"next"in Di?(ki=qc(qc(Di)),ki!==Object.prototype&&(U=ki)):_c=!0);var sb=!tb(U)||eb(function(){var r={};return U[$i].call(r)!==r});sb?U={}:ab&&(U=ib(U));rb(U[$i])||ob(U,$i,function(){return this});Oc.exports={IteratorPrototype:U,BUGGY_SAFARI_ITERATORS:_c}});var xc=n((IP,wc)=>{"use strict";var ub=Mi().IteratorPrototype,cb=Ni(),lb=Te(),fb=ke(),db=ee(),pb=function(){return this};wc.exports=function(r,e,t,i){var o=e+" Iterator";return r.prototype=cb(ub,{next:lb(+!i,t)}),fb(r,o,!1,!0),db[o]=pb,r}});var Fc=n((SP,jc)=>{"use strict";var vb=O(),hb=R(),Cr=D(),$c=hc(),gb=S(),mb=xc(),Rc=Or(),Cc=kt(),bb=ke(),yb=oe(),ji=se(),Ib=_(),Ac=ee(),Mc=Mi(),Sb=$c.PROPER,Pb=$c.CONFIGURABLE,Lc=Mc.IteratorPrototype,Ar=Mc.BUGGY_SAFARI_ITERATORS,Ve=Ib("iterator"),Nc="keys",Ke="values",kc="entries",Dc=function(){return this};jc.exports=function(r,e,t,i,o,a,u){mb(t,e,i);var l=function(m){if(m===o&&s)return s;if(!Ar&&m&&m in p)return p[m];switch(m){case Nc:return function(){return new t(this,m)};case Ke:return function(){return new t(this,m)};case kc:return function(){return new t(this,m)}}return function(){return new t(this)}},c=e+" Iterator",f=!1,p=r.prototype,v=p[Ve]||p["@@iterator"]||o&&p[o],s=!Ar&&v||l(o),d=e==="Array"&&p.entries||v,h,g,b;if(d&&(h=Rc(d.call(new r)),h!==Object.prototype&&h.next&&(!Cr&&Rc(h)!==Lc&&(Cc?Cc(h,Lc):gb(h[Ve])||ji(h,Ve,Dc)),bb(h,c,!0,!0),Cr&&(Ac[c]=Dc))),Sb&&o===Ke&&v&&v.name!==Ke&&(!Cr&&Pb?yb(p,"name",Ke):(f=!0,s=function(){return hb(v,this)})),o)if(g={values:l(Ke),keys:a?s:l(Nc),entries:l(kc)},u)for(b in g)(Ar||f||!(b in p))&&ji(p,b,g[b]);else vb({target:e,proto:!0,forced:Ar||f},g);return(!Cr||u)&&p[Ve]!==s&&ji(p,Ve,s,{name:o}),Ac[e]=s,g}});var Uc=n((PP,Bc)=>{"use strict";Bc.exports=function(r,e){return{value:r,done:e}}});var Bi=n((EP,Hc)=>{"use strict";var Eb=H(),Fi=Ot(),Vc=ee(),Wc=ai(),Tb=Q().f,qb=Fc(),Lr=Uc(),_b=D(),Ob=q(),Gc="Array Iterator",wb=Wc.set,xb=Wc.getterFor(Gc);Hc.exports=qb(Array,"Array",function(r,e){wb(this,{type:Gc,target:Eb(r),index:0,kind:e})},function(){var r=xb(this),e=r.target,t=r.index++;if(!e||t>=e.length)return r.target=void 0,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 Kc=Vc.Arguments=Vc.Array;Fi("keys");Fi("values");Fi("entries");if(!_b&&Ob&&Kc.name!=="values")try{Tb(Kc,"name",{value:"values"})}catch(r){}});var Qc=n((TP,zc)=>{"use strict";var Rb=q(),Cb=Q(),Ab=Te();zc.exports=function(r,e,t){Rb?Cb.f(r,e,Ab(0,t)):r[e]=t}});var Yc=n(()=>{"use strict";var Lb=O(),Nb=qr(),kb=Qc();Lb({target:"Object",stat:!0},{fromEntries:function(e){var t={};return Nb(e,function(i,o){kb(t,i,o)},{AS_ENTRIES:!0}),t}})});var Xc=n((OP,Jc)=>{"use strict";Bi();Yc();var Db=_e();Jc.exports=Db.Object.fromEntries});var el=n((wP,Zc)=>{"use strict";Zc.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 tl=n(()=>{"use strict";Bi();var $b=el(),Mb=I(),jb=ke(),rl=ee();for(Nr in $b)jb(Mb[Nr],Nr),rl[Nr]=rl.Array;var Nr});var ol=n((CP,il)=>{"use strict";var Fb=Xc();tl();il.exports=Fb});var al=n((AP,nl)=>{"use strict";var Bb=ol();nl.exports=Bb});var zi=n((_E,Il)=>{"use strict";var zb=Ne(),Qb=String;Il.exports=function(r){if(zb(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return Qb(r)}});var Pl=n((OE,Sl)=>{"use strict";var Yb=ir(),Jb=zi(),Xb=te(),Zb=RangeError;Sl.exports=function(e){var t=Jb(Xb(this)),i="",o=Yb(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 Ol=n((wE,_l)=>{"use strict";var ql=T(),ey=Tt(),El=zi(),ry=Pl(),ty=te(),iy=ql(ry),oy=ql("".slice),ny=Math.ceil,Tl=function(r){return function(e,t,i){var o=El(ty(e)),a=ey(t),u=o.length,l=i===void 0?" ":El(i),c,f;return a<=u||l===""?o:(c=a-u,f=iy(l,ny(c/l.length)),f.length>c&&(f=oy(f,0,c)),r?o+f:f+o)}};_l.exports={start:Tl(!1),end:Tl(!0)}});var xl=n((xE,wl)=>{"use strict";var ay=z();wl.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(ay)});var Rl=n(()=>{"use strict";var sy=O(),uy=Ol().start,cy=xl();sy({target:"String",proto:!0,forced:cy},{padStart:function(e){return uy(this,e,arguments.length>1?arguments[1]:void 0)}})});var Al=n((AE,Cl)=>{"use strict";Rl();var ly=or();Cl.exports=ly("String","padStart")});var Nl=n((LE,Ll)=>{"use strict";var fy=Al();Ll.exports=fy});var Dl=n((NE,kl)=>{"use strict";var dy=Nl();kl.exports=dy});var Zi=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||{}),wt=(f=>(f.Q144P="mobile",f.Q240P="lowest",f.Q360P="low",f.Q480P="medium",f.Q720P="high",f.Q1080P="fullhd",f.Q1440P="quadhd",f.Q2160P="ultrahd",f.UNKNOWN="unknown",f))(wt||{}),xt=(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))(xt||{});var Rt=(i=>(i.HTTP1="http1",i.HTTP2="http2",i.HTTP3="http3",i))(Rt||{});var Ct=(l=>(l.SLIDER="slider",l.DOUBLE_TAP="double_tap",l.TIME_CODE="time_code",l.EPISODE="episode",l.REWIND="rewind",l.LIVE="live",l.UNKNOWN="unknown",l))(Ct||{}),ta=(a=>(a.GRAPH_SHOW="iGraphShow",a.GRAPH_HIDE="iGraphHide",a.NEXT_AREA="iNextChapterArea",a.NEXT_BUTTON="iNextChapterBtn",a.WATCH_AGAIN="iWatchAgainBtn",a))(ta||{}),ia={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"},oa={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"},na={unknown:"un",mobile:"m",lowest:"ls",low:"l",medium:"md",high:"h",fullhd:"f",quadhd:"q",ultrahd:"u"},aa={pip:"pi",fullscreen:"fs",external:"ex",prefetch:"pr",airplay:"ap",chromecast:"cc",invisible:"iv"};import{fillWithDefault as Lp}from"@vkontakte/videoplayer-shared/es2015";var ar="__VERSION__",sa="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 Np={apiEnv:"vk_alias",apiKey:sa,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}},ua=r=>Lp(r,Np);function Lt(){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 yy,combine as Vl,fromEvent as Kl,isNonNullable as ye,isNullable as Wl,merge as Iy,now as V,observableFrom as Sy,once as Py,safeStorage as Vr,Subject as Ey,Subscription as eo,ValueSubject as Kr,createURL as Gl}from"@vkontakte/videoplayer-shared/es2015";import{Logger as Ty,detectEmbed as qy}from"@vkontakte/videoplayer-shared/es2015";var kr=M(Wu(),1);var sl=M(wr(),1),ul=M(al(),1);var cl=r=>{var o;let{operation:e,custom:t}=r,i=(0,ul.default)((0,sl.default)(t).map(([a,u])=>{var f,p,v;let l=(f=oa[a])!=null?f:a,c=u;return u&&(a==="mode"?c=(p=aa[u])!=null?p:u:a==="quality"&&(c=(v=na[u])!=null?v:u)),[l,c]}));return Ye(W({},r),{operation:(o=ia[e])!=null?o:e,custom:i})};import{ValueSubject as Ub,getExponentialDelay as Vb,ErrorCategory as ge}from"@vkontakte/videoplayer-shared/es2015";var Kb=/Mobile|mini|Fennec|Android|iP(ad|od|hone)|opera (mini|mobi)/i,We=class{constructor(e){this.consequentAuthErrors=0;this.authorized$=new Ub(!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=(f,...p)=>k(this,[f,...p],function*(l,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(l,c-1):void 0;case 401:return this.authorized$.next(!1),this.authToken=yield this.refreshAuthToken(),this.sessionKey=yield this._authorizeWithBackoff(),c>0?a(l,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;if(this.params.config.useVKComIsMobileLogic){let{appVersion:o}=window.navigator;i=Kb.test(o)}else this.params.mobile&&(i=!0);return i&&(t="M_WEB"),{collector:"ok.mobile.apps.video",data:JSON.stringify({application:`@vkontakte/videoplayer-statistics:${ar}`,platform:t,items:this.params.config.shorten?e.map(cl):e})}}_authorizeWithBackoff(){if(!this.consequentAuthErrors)return this._authorize();let e=Vb(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(l){Promise.resolve().then(()=>{throw l})}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)}},Ge=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&&(Ge.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 Ui(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(f,p){let v;p&&p.signal&&(v=p.signal,delete p.signal);let s=new t(f,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,f)=>{let p=a&&a.prototype.isPrototypeOf(c)?c.signal:f?f.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 f&&f.signal&&delete f.signal,Promise.race([s,u(c,f)])}return u(c,f)},Request:a}}var He=$r({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}),ll=He?Ui({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}):void 0,Vi=He?ll.fetch:window.fetch,ZP=He?ll.Request:window.Request,eE=He?Ge:window.AbortController,rE=He?me:window.AbortSignal;var fl=M(nr(),1),dl=M(wr(),1);import{ErrorCategory as Mr,now as Ki}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 k(this,null,function*(){var e;if(this.apiEnv!=="auto"||this.isApiBaseUrlFetched)return this.apiBaseUrl;try{let t=atob("aHR0cHM6Ly9kbnMuZ29vZ2xlL3Jlc29sdmU/bmFtZT12aWRlby5fZW5kcG9pbnQub2sucnUmdHlwZT1UWFQ="),o=yield(yield Vi(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}),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: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=Ki(),a=u=>{if(u instanceof TypeError&&(0,fl.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:Ki()-o}})};return this.apiBaseUrl=yield this.resolveApiBaseUrl(),Vi(`${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 l=Number(u.headers.get("content-length"))===0,c=new Date((p=u.headers.get("date"))!=null?p:"").getTime(),f=Ki()-o;if(isFinite(c)&&((v=this.timeSynchronisation)==null||v.addServerTime(c,f)),!l)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,dl.default)(e.queryParams).forEach(([i,o])=>t.append(i,typeof o=="string"?o:JSON.stringify(o))),t}};var vl=M(nr(),1),hl=M(wr(),1);import{ErrorCategory as Wb,now as Gb,safeStorage as Qe,debounceFn as pl}from"@vkontakte/videoplayer-shared/es2015";var jr="onestat_events",Wi=r=>e=>e.timestamp+r>=Gb(),Fr=class{constructor(e){this.unsaltedStorage=[];this.isPaused=!1;this.isUrgent=e=>{let{operation:t}=e;return(0,vl.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=pl(()=>this.safeFlush(),this.params.config.firstFlushTime,{maxWait:this.params.config.firstFlushTime});let t=Qe.isPersistent()?this.params.config.flushMaxWait:0;this.debouncedFlush=pl(()=>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:Wb.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(Wi(this.params.config.storageExpiration));Qe.set(jr,JSON.stringify(Ye(W({},t),{[this.userSalt]:[...o,e]})))}getFromStorage(){var i;return this.userSalt?((i=this.readFromStorage()[this.userSalt])!=null?i:[]).filter(Wi(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,hl.default)(e)){let o=i.filter(Wi(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 E,VideoQuality as N}from"@vkontakte/videoplayer-core/es2015";import{assertNever as gl}from"@vkontakte/videoplayer-shared/es2015";var ml=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],Hi=r=>r&&{[Gi.HTTP1]:"http1",[Gi.HTTP2]:"http2",[Gi.QUIC]:"http3"}[r],bl=r=>{if(r!==void 0)switch(r){case E.MPEG:return"mp4";case E.DASH:case E.DASH_LIVE:case E.DASH_STREAMS:return"dash";case E.DASH_SEP:return"dash_sep";case E.DASH_ONDEMAND:return"ondemand_dash";case E.DASH_WEBM:case E.DASH_LIVE_WEBM:return"webm";case E.DASH_WEBM_AV1:return"av1";case E.DASH_LIVE_CMAF:return"ondemand_dash_live";case E.HLS:case E.HLS_LIVE:return"hls";case E.HLS_ONDEMAND:return"ondemand_hls";case E.HLS_LIVE_CMAF:return"ondemand_hls_live";case E.WEB_RTC_LIVE:return"webrtc";default:return gl(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 gl(r)}},yl=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 Qi=M(Dl(),1);var $l=()=>(0,Qi.default)(Math.floor(Math.random()*Hr(2,32)).toString(36),7,"0"),Ml=()=>(0,Qi.default)(Math.floor(Math.random()*Hr(2,64)).toString(36),13,"0");import{PlaybackState as jl}from"@vkontakte/videoplayer-core/es2015";import{filter as Fl,filterChanged as py,fromEvent as vy,isNullable as Bl,map as hy,merge as Yi,Observable as gy,Subject as Ji,Subscription as my,ValueSubject as by}from"@vkontakte/videoplayer-shared/es2015";var Ul=(r,e)=>new gy(t=>{let i=new my,o=Yi(vy(window,"beforeunload"),r.events.willDestruct$),a=new by(void 0),u;i.add(r.info.isLive$.pipe(py()).subscribe(x=>{u&&(u.unsubscribe(),a.next(void 0)),x?u=r.info.liveTime$.pipe(hy(Ie=>Ie&&Ie/1e3)).subscribe(a):u=r.info.position$.subscribe(a),i.add(u)}));let{playing$:l,paused$:c}=r.events,f=r.events.willSeek$.pipe(Fl(()=>r.info.playbackState$.getValue()===jl.PLAYING)),p=r.events.seeked$.pipe(Fl(()=>r.info.playbackState$.getValue()===jl.PLAYING)),v=!1,s=new Ji;i.add(f.subscribe(()=>{v||s.next(),v=!0})),i.add(p.subscribe(()=>v=!1));let d=new Ji,h=new Ji,g=Yi(l,p,d),b=Yi(c,s,o,r.events.looped$,h),m,y=()=>m=a.getValue(),K=()=>{let x=a.getValue();Bl(m)||m===x||Bl(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 Ql="_one-stat_",Hl=`${Ql}uuid`,zl=`${Ql}deviceId`,Xi=()=>{let r=new eo;return{subscription:r,subscribe:(e,t)=>{e&&r.add(e.subscribe(t))}}},ro=class{constructor(e,t){this.subscription=new eo;this.debugLogger=new Ty;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 f,p,v;this.statContext=e,this.config=ua((f=t.config)!=null?f:{}),ye(t.apiEnv)&&(this.config.apiEnv=t.apiEnv),this.config.synchronizeTime&&(this.timeSynchronisation=new Ur);let i=new Ey;this.experimental={error$:i},Vr.get(Hl)&&Vr.remove(Hl);let a=Vr.get(zl);this.statContext.deviceId?this.deviceId=this.statContext.deviceId:a?this.deviceId=a:(this.deviceId=Lt(),Vr.set(zl,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}),this.logger=new Fr({config:this.config,debugLogger:this.debugLogger,api:this.api,error$:i,userSalt:t.userSalt});let{isEmbed:l,topOrigin:c}=qy();this.isEmbed=l,this.embedParent=c?new URL(c).hostname:void 0,this.subscribe()}updateContext(e){this.statContext=W(W({},this.statContext),e)}attachTo(e){let t=new eo,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(Ul(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,io=Math.round((re-(x-Ie))*1e3),oo=Math.round(re*1e3);io&&oo&&(g.latency=io,g.bufferLatency=oo)}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(Py()).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,l,c=!1;i(e.events.firstBytes$,s=>{u=V(),this.logFirstBytes({time:s})}),i(e.events.willStart$,()=>l=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(l)&&this.logFirstFrame({time:V()-l})});let f;i(e.info.currentVideoStream$,s=>{s&&(f&&s.id!==f&&this.logTrackSwitch(s),f=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(Vl({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=ml(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:bl(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:Hi(s)}),this.updateContext({connectionType:Hi(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(Vl({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}=Xi();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}=Xi();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}=Xi();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($l())}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(Iy(Kl(e,"change"),Sy(["init"])).subscribe(()=>this.updateContext({network:yl(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=Kl(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,Zi.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();yy(u);let l=this.isid$.getValue(),c=e==="empty_buffer"||e==="close_at_empty_buffer"?this.statContext.connectionType:this.statContext.firstConnectionType,f=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,Zi.default)(this.config.embedUrlParams,re));v=new URLSearchParams(K).toString()}else this.statContext.place==="direct"&&(this.statContext.refDomain?p=(b=(g=Gl(this.statContext.refDomain))==null?void 0:g.hostname)!=null?b:this.statContext.refDomain:document.referrer&&(p=(y=(m=Gl(document.referrer))==null?void 0:m.hostname)!=null?y:document.referrer),v=location.href.substring(0,1024));let s=W({vsid:u,isid:l,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:f===!0?1:f===!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}}};var Yl={};var _y=(r,e={})=>{let i=e.timeout||1,o=performance.now();return window.setTimeout(()=>{r({get didTimeout(){return e.timeout?!1:performance.now()-o-1>i},timeRemaining(){return Math.max(0,1+(performance.now()-o))}})},1)},Oy=r=>window.clearTimeout(r),Jl=r=>typeof r=="function"&&(r==null?void 0:r.toString().endsWith("{ [native code] }")),Xl=!Jl(window.requestIdleCallback)||!Jl(window.cancelIdleCallback),Zl=Xl?_y:window.requestIdleCallback,OT=Xl?Oy:window.cancelIdleCallback;import{PlaybackState as rf,Subscription as tf}from"@vkontakte/videoplayer-core/es2015";var Wr=class{constructor(){this.startTime=null;this.stopTime=null;this.accumulatedTime=0}get time(){return Math.floor(this.timeMs/1e3)}get timeMs(){var t;return this.startTime===null?0:((t=this.stopTime)!=null?t:this.now())-this.startTime-this.accumulatedTime}get isRunning(){return this.startTime!==null&&this.stopTime===null}start(){this.isRunning||(this.stopTime!==null?(this.accumulatedTime+=this.now()-this.stopTime,this.stopTime=null):this.startTime=this.now())}stop(){this.isRunning&&(this.stopTime=this.now())}reset(){this.startTime=null,this.stopTime=null,this.accumulatedTime=0}now(){return Date.now()}};var ef=()=>window.Image?new Image:document.createElement("img");var to=class{constructor(e){this.position=0;this.started=!1;this.heartbeatPixels=[];this.heartbeatLastTimeSent={};this.stopwatch=new Wr;this.subscription=new tf;this.params=e}attachTo(e){let t=new tf,i=(o,a)=>t.add(o.subscribe(a));return i(e.info.playbackState$,this.onPlaybackState),i(e.info.position$,this.onPosition),i(e.info.atLiveEdge$,o=>this.isActiveLive=o),i(e.events.willSeek$,this.onWillSeek),i(e.events.seeked$,this.onSeeked),i(e.events.ended$,this.onEnded),this.subscription.add(t),t}destroy(){this.stopwatch.reset(),this.subscription.unsubscribe(),window.clearTimeout(this.heartbeatFirstTimeoutId),this.send("stop")}onPlaybackState(e){e===rf.PLAYING?this.started?this.play():this.start():e===rf.PAUSED&&this.pause()}start(){var i,o,a,u,l;this.started=!0,this.stopwatch.start(),this.send("start"),this.heartbeatPixels=this.prepareHeartbeatPixels(),this.heartbeatInterval=(o=(i=this.heartbeatPixels[0])==null?void 0:i.params)==null?void 0:o.interval;let e=(a=this.heartbeatPixels[0])==null?void 0:a.url,t=(l=(u=this.heartbeatPixels[0])==null?void 0:u.params)==null?void 0:l.delay;t!==void 0&&e&&(this.heartbeatFirstTimeoutId=window.setTimeout(()=>{this.sendHeartbeat(e)},t))}play(){this.stopwatch.start(),this.send("resume")}pause(){this.stopwatch.stop(),this.send("pause")}onPosition(e){if(this.position=e,this.heartbeatInterval&&this.stopwatch.time!==0&&this.stopwatch.time%this.heartbeatInterval===0)for(let[t,{url:i}]of this.heartbeatPixels.entries())this.heartbeatLastTimeSent[t]!==this.stopwatch.time&&(this.heartbeatLastTimeSent[t]=this.stopwatch.time,this.sendHeartbeat(i))}onWillSeek(){this.started&&this.send("stop")}onSeeked(){this.started&&this.send("start")}onEnded(){this.stopwatch.stop(),this.send("stop")}validatePixels(e,t){return e==null?void 0:e.filter(i=>i.event===t.event&&t.keys.every(o=>!!i[o]))}getFrameTimestamp(){let e;if(this.isActiveLive){let t=Math.floor(Math.random()*25)+5;e=Date.now()/1e3-t}else e=this.position||0;return Math.floor(e)}getUTC(){return Math.floor(Date.now()/1e3)}prepareUrl(e){return e.replace("{@fts_fake_sec}",String(this.getFrameTimestamp())).replace("{@utc_sec}",String(this.getUTC())).split("&").filter(t=>!/={@[a-zA-Z_]+}/.test(t)).join("&")}preparePixels(e){return this.validatePixels(this.params.pixels,{event:e,keys:["url"]})}prepareHeartbeatPixels(){return this.validatePixels(this.params.pixels,{event:"heartbeat",keys:["url","params"]})}call(e){Zl(()=>ef().src=this.prepareUrl(e))}send(e){let t=this.preparePixels(e);for(let{url:i}of t)this.call(i)}sendHeartbeat(e){this.call(e)}};export{Ae as ApiEnv,Rt as ConnectionType,xt as ContentType,ta as InteractiveInterfaceClick,to as MediascopePixel,Yl as MediascopePixelTypes,ro as OneStat,wt as Quality,Ct as SeekAction,ar as VERSION};
|