@vkontakte/videoplayer-statistics 1.0.77-dev.38c1ddaf.0 → 1.0.77-dev.4c6dbe21.0

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