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