@vkontakte/videoplayer-statistics 1.0.64-dev.ee5c7ce8.0 → 1.0.65-dev.3ff824b3.0

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