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