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