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