@vkontakte/videoplayer-shared 1.0.37-dev.2e9cb822.0 → 1.0.37-dev.511f8223.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es2015.cjs.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @vkontakte/videoplayer-shared v1.0.37-dev.2e9cb822.0
3
- * Fri, 05 Jul 2024 08:48:33 GMT
2
+ * @vkontakte/videoplayer-shared v1.0.37-dev.511f8223.0
3
+ * Wed, 17 Jul 2024 10:03:53 GMT
4
4
  * https://st.mycdn.me/static/vkontakte-videoplayer/1-0-37/doc/
5
5
  */
6
- "use strict";var ys=Object.create;var te=Object.defineProperty,hs=Object.defineProperties,Is=Object.getOwnPropertyDescriptor,gs=Object.getOwnPropertyDescriptors,Os=Object.getOwnPropertyNames,Ct=Object.getOwnPropertySymbols,xs=Object.getPrototypeOf,jt=Object.prototype.hasOwnProperty,Es=Object.prototype.propertyIsEnumerable;var Mt=Math.pow,Nt=(e,r,t)=>r in e?te(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,K=(e,r)=>{for(var t in r||(r={}))jt.call(r,t)&&Nt(e,t,r[t]);if(Ct)for(var t of Ct(r))Es.call(r,t)&&Nt(e,t,r[t]);return e},he=(e,r)=>hs(e,gs(r));var i=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),kt=(e,r)=>{for(var t in r)te(e,t,{get:r[t],enumerable:!0})},Dt=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of Os(r))!jt.call(e,o)&&o!==t&&te(e,o,{get:()=>r[o],enumerable:!(n=Is(r,o))||n.enumerable});return e};var ws=(e,r,t)=>(t=e!=null?ys(xs(e)):{},Dt(r||!e||!e.__esModule?te(t,"default",{value:e,enumerable:!0}):t,e)),Ss=e=>Dt(te({},"__esModule",{value:!0}),e);var Ie=(e,r,t)=>new Promise((n,o)=>{var a=c=>{try{s(t.next(c))}catch(l){o(l)}},u=c=>{try{s(t.throw(c))}catch(l){o(l)}},s=c=>c.done?n(c.value):Promise.resolve(c.value).then(a,u);s((t=t.apply(e,r)).next())});var _=i((fd,En)=>{"use strict";En.exports=function(e){try{return!!e()}catch(r){return!0}}});var le=i((pd,wn)=>{"use strict";var ks=_();wn.exports=!ks(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var N=i((vd,Rn)=>{"use strict";var Sn=le(),qn=Function.prototype,Sr=qn.call,Ds=Sn&&qn.bind.bind(Sr,Sr);Rn.exports=Sn?Ds:function(e){return function(){return Sr.apply(e,arguments)}}});var _e=i((bd,An)=>{"use strict";var Pn=N(),Vs=Pn({}.toString),Fs=Pn("".slice);An.exports=function(e){return Fs(Vs(e),8,-1)}});var Ln=i((dd,_n)=>{"use strict";var Us=N(),Gs=_(),Qs=_e(),qr=Object,Bs=Us("".split);_n.exports=Gs(function(){return!qr("z").propertyIsEnumerable(0)})?function(e){return Qs(e)=="String"?Bs(e,""):qr(e)}:qr});var Le=i((Td,Cn)=>{"use strict";Cn.exports=function(e){return e==null}});var Rr=i((md,Nn)=>{"use strict";var $s=Le(),Ws=TypeError;Nn.exports=function(e){if($s(e))throw Ws("Can't call method on "+e);return e}});var X=i((yd,jn)=>{"use strict";var zs=Ln(),Ks=Rr();jn.exports=function(e){return zs(Ks(e))}});var kn=i((hd,Mn)=>{"use strict";Mn.exports=function(){}});var B=i((Id,Dn)=>{"use strict";Dn.exports={}});var S=i((Vn,Fn)=>{"use strict";var Ce=function(e){return e&&e.Math==Math&&e};Fn.exports=Ce(typeof globalThis=="object"&&globalThis)||Ce(typeof window=="object"&&window)||Ce(typeof self=="object"&&self)||Ce(typeof global=="object"&&global)||function(){return this}()||Vn||Function("return this")()});var Ar=i((gd,Un)=>{"use strict";var Pr=typeof document=="object"&&document.all,Ys=typeof Pr=="undefined"&&Pr!==void 0;Un.exports={all:Pr,IS_HTMLDDA:Ys}});var x=i((Od,Qn)=>{"use strict";var Gn=Ar(),Hs=Gn.all;Qn.exports=Gn.IS_HTMLDDA?function(e){return typeof e=="function"||e===Hs}:function(e){return typeof e=="function"}});var Wn=i((xd,$n)=>{"use strict";var Xs=S(),Js=x(),Bn=Xs.WeakMap;$n.exports=Js(Bn)&&/native code/.test(String(Bn))});var $=i((Ed,Yn)=>{"use strict";var zn=x(),Kn=Ar(),Zs=Kn.all;Yn.exports=Kn.IS_HTMLDDA?function(e){return typeof e=="object"?e!==null:zn(e)||e===Zs}:function(e){return typeof e=="object"?e!==null:zn(e)}});var j=i((wd,Hn)=>{"use strict";var eu=_();Hn.exports=!eu(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var Lr=i((Sd,Jn)=>{"use strict";var ru=S(),Xn=$(),_r=ru.document,tu=Xn(_r)&&Xn(_r.createElement);Jn.exports=function(e){return tu?_r.createElement(e):{}}});var Cr=i((qd,Zn)=>{"use strict";var nu=j(),ou=_(),iu=Lr();Zn.exports=!nu&&!ou(function(){return Object.defineProperty(iu("div"),"a",{get:function(){return 7}}).a!=7})});var Nr=i((Rd,eo)=>{"use strict";var au=j(),su=_();eo.exports=au&&su(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})});var V=i((Pd,ro)=>{"use strict";var uu=$(),lu=String,cu=TypeError;ro.exports=function(e){if(uu(e))return e;throw cu(lu(e)+" is not an object")}});var F=i((Ad,to)=>{"use strict";var fu=le(),Ne=Function.prototype.call;to.exports=fu?Ne.bind(Ne):function(){return Ne.apply(Ne,arguments)}});var je=i((_d,no)=>{"use strict";no.exports={}});var kr=i((Ld,io)=>{"use strict";var jr=je(),Mr=S(),pu=x(),oo=function(e){return pu(e)?e:void 0};io.exports=function(e,r){return arguments.length<2?oo(jr[e])||oo(Mr[e]):jr[e]&&jr[e][r]||Mr[e]&&Mr[e][r]}});var Dr=i((Cd,ao)=>{"use strict";var vu=N();ao.exports=vu({}.isPrototypeOf)});var uo=i((Nd,so)=>{"use strict";so.exports=typeof navigator!="undefined"&&String(navigator.userAgent)||""});var To=i((jd,bo)=>{"use strict";var vo=S(),Vr=uo(),lo=vo.process,co=vo.Deno,fo=lo&&lo.versions||co&&co.version,po=fo&&fo.v8,R,Me;po&&(R=po.split("."),Me=R[0]>0&&R[0]<4?1:+(R[0]+R[1]));!Me&&Vr&&(R=Vr.match(/Edge\/(\d+)/),(!R||R[1]>=74)&&(R=Vr.match(/Chrome\/(\d+)/),R&&(Me=+R[1])));bo.exports=Me});var Fr=i((Md,yo)=>{"use strict";var mo=To(),bu=_(),du=S(),Tu=du.String;yo.exports=!!Object.getOwnPropertySymbols&&!bu(function(){var e=Symbol();return!Tu(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&mo&&mo<41})});var Ur=i((kd,ho)=>{"use strict";var mu=Fr();ho.exports=mu&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Gr=i((Dd,Io)=>{"use strict";var yu=kr(),hu=x(),Iu=Dr(),gu=Ur(),Ou=Object;Io.exports=gu?function(e){return typeof e=="symbol"}:function(e){var r=yu("Symbol");return hu(r)&&Iu(r.prototype,Ou(e))}});var ke=i((Vd,go)=>{"use strict";var xu=String;go.exports=function(e){try{return xu(e)}catch(r){return"Object"}}});var ce=i((Fd,Oo)=>{"use strict";var Eu=x(),wu=ke(),Su=TypeError;Oo.exports=function(e){if(Eu(e))return e;throw Su(wu(e)+" is not a function")}});var De=i((Ud,xo)=>{"use strict";var qu=ce(),Ru=Le();xo.exports=function(e,r){var t=e[r];return Ru(t)?void 0:qu(t)}});var wo=i((Gd,Eo)=>{"use strict";var Qr=F(),Br=x(),$r=$(),Pu=TypeError;Eo.exports=function(e,r){var t,n;if(r==="string"&&Br(t=e.toString)&&!$r(n=Qr(t,e))||Br(t=e.valueOf)&&!$r(n=Qr(t,e))||r!=="string"&&Br(t=e.toString)&&!$r(n=Qr(t,e)))return n;throw Pu("Can't convert object to primitive value")}});var fe=i((Qd,So)=>{"use strict";So.exports=!0});var Po=i((Bd,Ro)=>{"use strict";var qo=S(),Au=Object.defineProperty;Ro.exports=function(e,r){try{Au(qo,e,{value:r,configurable:!0,writable:!0})}catch(t){qo[e]=r}return r}});var Wr=i(($d,_o)=>{"use strict";var _u=S(),Lu=Po(),Ao="__core-js_shared__",Cu=_u[Ao]||Lu(Ao,{});_o.exports=Cu});var zr=i((Wd,Co)=>{"use strict";var Nu=fe(),Lo=Wr();(Co.exports=function(e,r){return Lo[e]||(Lo[e]=r!==void 0?r:{})})("versions",[]).push({version:"3.31.0",mode:Nu?"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 Kr=i((zd,No)=>{"use strict";var ju=Rr(),Mu=Object;No.exports=function(e){return Mu(ju(e))}});var M=i((Kd,jo)=>{"use strict";var ku=N(),Du=Kr(),Vu=ku({}.hasOwnProperty);jo.exports=Object.hasOwn||function(r,t){return Vu(Du(r),t)}});var Yr=i((Yd,Mo)=>{"use strict";var Fu=N(),Uu=0,Gu=Math.random(),Qu=Fu(1 .toString);Mo.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Qu(++Uu+Gu,36)}});var L=i((Hd,Do)=>{"use strict";var Bu=S(),$u=zr(),ko=M(),Wu=Yr(),zu=Fr(),Ku=Ur(),J=Bu.Symbol,Hr=$u("wks"),Yu=Ku?J.for||J:J&&J.withoutSetter||Wu;Do.exports=function(e){return ko(Hr,e)||(Hr[e]=zu&&ko(J,e)?J[e]:Yu("Symbol."+e)),Hr[e]}});var Go=i((Xd,Uo)=>{"use strict";var Hu=F(),Vo=$(),Fo=Gr(),Xu=De(),Ju=wo(),Zu=L(),el=TypeError,rl=Zu("toPrimitive");Uo.exports=function(e,r){if(!Vo(e)||Fo(e))return e;var t=Xu(e,rl),n;if(t){if(r===void 0&&(r="default"),n=Hu(t,e,r),!Vo(n)||Fo(n))return n;throw el("Can't convert object to primitive value")}return r===void 0&&(r="number"),Ju(e,r)}});var Ve=i((Jd,Qo)=>{"use strict";var tl=Go(),nl=Gr();Qo.exports=function(e){var r=tl(e,"string");return nl(r)?r:r+""}});var Z=i($o=>{"use strict";var ol=j(),il=Cr(),al=Nr(),Fe=V(),Bo=Ve(),sl=TypeError,Xr=Object.defineProperty,ul=Object.getOwnPropertyDescriptor,Jr="enumerable",Zr="configurable",et="writable";$o.f=ol?al?function(r,t,n){if(Fe(r),t=Bo(t),Fe(n),typeof r=="function"&&t==="prototype"&&"value"in n&&et in n&&!n[et]){var o=ul(r,t);o&&o[et]&&(r[t]=n.value,n={configurable:Zr in n?n[Zr]:o[Zr],enumerable:Jr in n?n[Jr]:o[Jr],writable:!1})}return Xr(r,t,n)}:Xr:function(r,t,n){if(Fe(r),t=Bo(t),Fe(n),il)try{return Xr(r,t,n)}catch(o){}if("get"in n||"set"in n)throw sl("Accessors not supported");return"value"in n&&(r[t]=n.value),r}});var pe=i((eT,Wo)=>{"use strict";Wo.exports=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}});var W=i((rT,zo)=>{"use strict";var ll=j(),cl=Z(),fl=pe();zo.exports=ll?function(e,r,t){return cl.f(e,r,fl(1,t))}:function(e,r,t){return e[r]=t,e}});var Ue=i((tT,Yo)=>{"use strict";var pl=zr(),vl=Yr(),Ko=pl("keys");Yo.exports=function(e){return Ko[e]||(Ko[e]=vl(e))}});var Ge=i((nT,Ho)=>{"use strict";Ho.exports={}});var ei=i((oT,Zo)=>{"use strict";var bl=Wn(),Jo=S(),dl=$(),Tl=W(),rt=M(),tt=Wr(),ml=Ue(),yl=Ge(),Xo="Object already initialized",nt=Jo.TypeError,hl=Jo.WeakMap,Qe,ve,Be,Il=function(e){return Be(e)?ve(e):Qe(e,{})},gl=function(e){return function(r){var t;if(!dl(r)||(t=ve(r)).type!==e)throw nt("Incompatible receiver, "+e+" required");return t}};bl||tt.state?(P=tt.state||(tt.state=new hl),P.get=P.get,P.has=P.has,P.set=P.set,Qe=function(e,r){if(P.has(e))throw nt(Xo);return r.facade=e,P.set(e,r),r},ve=function(e){return P.get(e)||{}},Be=function(e){return P.has(e)}):(z=ml("state"),yl[z]=!0,Qe=function(e,r){if(rt(e,z))throw nt(Xo);return r.facade=e,Tl(e,z,r),r},ve=function(e){return rt(e,z)?e[z]:{}},Be=function(e){return rt(e,z)});var P,z;Zo.exports={set:Qe,get:ve,has:Be,enforce:Il,getterFor:gl}});var ii=i((iT,oi)=>{"use strict";var Ol=le(),ni=Function.prototype,ri=ni.apply,ti=ni.call;oi.exports=typeof Reflect=="object"&&Reflect.apply||(Ol?ti.bind(ri):function(){return ti.apply(ri,arguments)})});var ot=i((aT,ai)=>{"use strict";var xl=_e(),El=N();ai.exports=function(e){if(xl(e)==="Function")return El(e)}});var ci=i(li=>{"use strict";var si={}.propertyIsEnumerable,ui=Object.getOwnPropertyDescriptor,wl=ui&&!si.call({1:2},1);li.f=wl?function(r){var t=ui(this,r);return!!t&&t.enumerable}:si});var vi=i(pi=>{"use strict";var Sl=j(),ql=F(),Rl=ci(),Pl=pe(),Al=X(),_l=Ve(),Ll=M(),Cl=Cr(),fi=Object.getOwnPropertyDescriptor;pi.f=Sl?fi:function(r,t){if(r=Al(r),t=_l(t),Cl)try{return fi(r,t)}catch(n){}if(Ll(r,t))return Pl(!ql(Rl.f,r,t),r[t])}});var di=i((lT,bi)=>{"use strict";var Nl=_(),jl=x(),Ml=/#|\.prototype\./,be=function(e,r){var t=Dl[kl(e)];return t==Fl?!0:t==Vl?!1:jl(r)?Nl(r):!!r},kl=be.normalize=function(e){return String(e).replace(Ml,".").toLowerCase()},Dl=be.data={},Vl=be.NATIVE="N",Fl=be.POLYFILL="P";bi.exports=be});var it=i((cT,mi)=>{"use strict";var Ti=ot(),Ul=ce(),Gl=le(),Ql=Ti(Ti.bind);mi.exports=function(e,r){return Ul(e),r===void 0?e:Gl?Ql(e,r):function(){return e.apply(r,arguments)}}});var at=i((fT,hi)=>{"use strict";var $e=S(),Bl=ii(),$l=ot(),Wl=x(),zl=vi().f,Kl=di(),ee=je(),Yl=it(),re=W(),yi=M(),Hl=function(e){var r=function(t,n,o){if(this instanceof r){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,o)}return Bl(e,this,arguments)};return r.prototype=e.prototype,r};hi.exports=function(e,r){var t=e.target,n=e.global,o=e.stat,a=e.proto,u=n?$e:o?$e[t]:($e[t]||{}).prototype,s=n?ee:ee[t]||re(ee,t,{})[t],c=s.prototype,l,f,p,b,d,m,y,g,h;for(b in r)l=Kl(n?b:t+(o?".":"#")+b,e.forced),f=!l&&u&&yi(u,b),m=s[b],f&&(e.dontCallGetSet?(h=zl(u,b),y=h&&h.value):y=u[b]),d=f&&y?y:r[b],!(f&&typeof m==typeof d)&&(e.bind&&f?g=Yl(d,$e):e.wrap&&f?g=Hl(d):a&&Wl(d)?g=$l(d):g=d,(e.sham||d&&d.sham||m&&m.sham)&&re(g,"sham",!0),re(s,b,g),a&&(p=t+"Prototype",yi(ee,p)||re(ee,p,{}),re(ee[p],b,d),e.real&&c&&(l||!c[b])&&re(c,b,d)))}});var Oi=i((pT,gi)=>{"use strict";var st=j(),Xl=M(),Ii=Function.prototype,Jl=st&&Object.getOwnPropertyDescriptor,ut=Xl(Ii,"name"),Zl=ut&&function(){}.name==="something",ec=ut&&(!st||st&&Jl(Ii,"name").configurable);gi.exports={EXISTS:ut,PROPER:Zl,CONFIGURABLE:ec}});var Ei=i((vT,xi)=>{"use strict";var rc=Math.ceil,tc=Math.floor;xi.exports=Math.trunc||function(r){var t=+r;return(t>0?tc:rc)(t)}});var lt=i((bT,wi)=>{"use strict";var nc=Ei();wi.exports=function(e){var r=+e;return r!==r||r===0?0:nc(r)}});var qi=i((dT,Si)=>{"use strict";var oc=lt(),ic=Math.max,ac=Math.min;Si.exports=function(e,r){var t=oc(e);return t<0?ic(t+r,0):ac(t,r)}});var Pi=i((TT,Ri)=>{"use strict";var sc=lt(),uc=Math.min;Ri.exports=function(e){return e>0?uc(sc(e),9007199254740991):0}});var ct=i((mT,Ai)=>{"use strict";var lc=Pi();Ai.exports=function(e){return lc(e.length)}});var Ci=i((yT,Li)=>{"use strict";var cc=X(),fc=qi(),pc=ct(),_i=function(e){return function(r,t,n){var o=cc(r),a=pc(o),u=fc(n,a),s;if(e&&t!=t){for(;a>u;)if(s=o[u++],s!=s)return!0}else for(;a>u;u++)if((e||u in o)&&o[u]===t)return e||u||0;return!e&&-1}};Li.exports={includes:_i(!0),indexOf:_i(!1)}});var Mi=i((hT,ji)=>{"use strict";var vc=N(),ft=M(),bc=X(),dc=Ci().indexOf,Tc=Ge(),Ni=vc([].push);ji.exports=function(e,r){var t=bc(e),n=0,o=[],a;for(a in t)!ft(Tc,a)&&ft(t,a)&&Ni(o,a);for(;r.length>n;)ft(t,a=r[n++])&&(~dc(o,a)||Ni(o,a));return o}});var pt=i((IT,ki)=>{"use strict";ki.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var Vi=i((gT,Di)=>{"use strict";var mc=Mi(),yc=pt();Di.exports=Object.keys||function(r){return mc(r,yc)}});var Ui=i(Fi=>{"use strict";var hc=j(),Ic=Nr(),gc=Z(),Oc=V(),xc=X(),Ec=Vi();Fi.f=hc&&!Ic?Object.defineProperties:function(r,t){Oc(r);for(var n=xc(t),o=Ec(t),a=o.length,u=0,s;a>u;)gc.f(r,s=o[u++],n[s]);return r}});var Qi=i((xT,Gi)=>{"use strict";var wc=kr();Gi.exports=wc("document","documentElement")});var Tt=i((ET,Hi)=>{"use strict";var Sc=V(),qc=Ui(),Bi=pt(),Rc=Ge(),Pc=Qi(),Ac=Lr(),_c=Ue(),$i=">",Wi="<",bt="prototype",dt="script",Ki=_c("IE_PROTO"),vt=function(){},Yi=function(e){return Wi+dt+$i+e+Wi+"/"+dt+$i},zi=function(e){e.write(Yi("")),e.close();var r=e.parentWindow.Object;return e=null,r},Lc=function(){var e=Ac("iframe"),r="java"+dt+":",t;return e.style.display="none",Pc.appendChild(e),e.src=String(r),t=e.contentWindow.document,t.open(),t.write(Yi("document.F=Object")),t.close(),t.F},We,ze=function(){try{We=new ActiveXObject("htmlfile")}catch(r){}ze=typeof document!="undefined"?document.domain&&We?zi(We):Lc():zi(We);for(var e=Bi.length;e--;)delete ze[bt][Bi[e]];return ze()};Rc[Ki]=!0;Hi.exports=Object.create||function(r,t){var n;return r!==null?(vt[bt]=Sc(r),n=new vt,vt[bt]=null,n[Ki]=r):n=ze(),t===void 0?n:qc.f(n,t)}});var Ji=i((wT,Xi)=>{"use strict";var Cc=_();Xi.exports=!Cc(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})});var yt=i((ST,ea)=>{"use strict";var Nc=M(),jc=x(),Mc=Kr(),kc=Ue(),Dc=Ji(),Zi=kc("IE_PROTO"),mt=Object,Vc=mt.prototype;ea.exports=Dc?mt.getPrototypeOf:function(e){var r=Mc(e);if(Nc(r,Zi))return r[Zi];var t=r.constructor;return jc(t)&&r instanceof t?t.prototype:r instanceof mt?Vc:null}});var ht=i((qT,ra)=>{"use strict";var Fc=W();ra.exports=function(e,r,t,n){return n&&n.enumerable?e[r]=t:Fc(e,r,t),e}});var xt=i((RT,oa)=>{"use strict";var Uc=_(),Gc=x(),Qc=$(),Bc=Tt(),ta=yt(),$c=ht(),Wc=L(),zc=fe(),Ot=Wc("iterator"),na=!1,k,It,gt;[].keys&&(gt=[].keys(),"next"in gt?(It=ta(ta(gt)),It!==Object.prototype&&(k=It)):na=!0);var Kc=!Qc(k)||Uc(function(){var e={};return k[Ot].call(e)!==e});Kc?k={}:zc&&(k=Bc(k));Gc(k[Ot])||$c(k,Ot,function(){return this});oa.exports={IteratorPrototype:k,BUGGY_SAFARI_ITERATORS:na}});var Ke=i((PT,aa)=>{"use strict";var Yc=L(),Hc=Yc("toStringTag"),ia={};ia[Hc]="z";aa.exports=String(ia)==="[object z]"});var He=i((AT,sa)=>{"use strict";var Xc=Ke(),Jc=x(),Ye=_e(),Zc=L(),ef=Zc("toStringTag"),rf=Object,tf=Ye(function(){return arguments}())=="Arguments",nf=function(e,r){try{return e[r]}catch(t){}};sa.exports=Xc?Ye:function(e){var r,t,n;return e===void 0?"Undefined":e===null?"Null":typeof(t=nf(r=rf(e),ef))=="string"?t:tf?Ye(r):(n=Ye(r))=="Object"&&Jc(r.callee)?"Arguments":n}});var la=i((_T,ua)=>{"use strict";var of=Ke(),af=He();ua.exports=of?{}.toString:function(){return"[object "+af(this)+"]"}});var Et=i((LT,fa)=>{"use strict";var sf=Ke(),uf=Z().f,lf=W(),cf=M(),ff=la(),pf=L(),ca=pf("toStringTag");fa.exports=function(e,r,t,n){if(e){var o=t?e:e.prototype;cf(o,ca)||uf(o,ca,{configurable:!0,value:r}),n&&!sf&&lf(o,"toString",ff)}}});var va=i((CT,pa)=>{"use strict";var vf=xt().IteratorPrototype,bf=Tt(),df=pe(),Tf=Et(),mf=B(),yf=function(){return this};pa.exports=function(e,r,t,n){var o=r+" Iterator";return e.prototype=bf(vf,{next:df(+!n,t)}),Tf(e,o,!1,!0),mf[o]=yf,e}});var da=i((NT,ba)=>{"use strict";var hf=N(),If=ce();ba.exports=function(e,r,t){try{return hf(If(Object.getOwnPropertyDescriptor(e,r)[t]))}catch(n){}}});var ma=i((jT,Ta)=>{"use strict";var gf=x(),Of=String,xf=TypeError;Ta.exports=function(e){if(typeof e=="object"||gf(e))return e;throw xf("Can't set "+Of(e)+" as a prototype")}});var ha=i((MT,ya)=>{"use strict";var Ef=da(),wf=V(),Sf=ma();ya.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,r={},t;try{t=Ef(Object.prototype,"__proto__","set"),t(r,[]),e=r instanceof Array}catch(n){}return function(o,a){return wf(o),Sf(a),e?t(o,a):o.__proto__=a,o}}():void 0)});var Aa=i((kT,Pa)=>{"use strict";var qf=at(),Rf=F(),Xe=fe(),qa=Oi(),Pf=x(),Af=va(),Ia=yt(),ga=ha(),_f=Et(),Lf=W(),wt=ht(),Cf=L(),Oa=B(),Ra=xt(),Nf=qa.PROPER,jf=qa.CONFIGURABLE,xa=Ra.IteratorPrototype,Je=Ra.BUGGY_SAFARI_ITERATORS,de=Cf("iterator"),Ea="keys",Te="values",wa="entries",Sa=function(){return this};Pa.exports=function(e,r,t,n,o,a,u){Af(t,r,n);var s=function(h){if(h===o&&b)return b;if(!Je&&h in f)return f[h];switch(h){case Ea:return function(){return new t(this,h)};case Te:return function(){return new t(this,h)};case wa:return function(){return new t(this,h)}}return function(){return new t(this)}},c=r+" Iterator",l=!1,f=e.prototype,p=f[de]||f["@@iterator"]||o&&f[o],b=!Je&&p||s(o),d=r=="Array"&&f.entries||p,m,y,g;if(d&&(m=Ia(d.call(new e)),m!==Object.prototype&&m.next&&(!Xe&&Ia(m)!==xa&&(ga?ga(m,xa):Pf(m[de])||wt(m,de,Sa)),_f(m,c,!0,!0),Xe&&(Oa[c]=Sa))),Nf&&o==Te&&p&&p.name!==Te&&(!Xe&&jf?Lf(f,"name",Te):(l=!0,b=function(){return Rf(p,this)})),o)if(y={values:s(Te),keys:a?b:s(Ea),entries:s(wa)},u)for(g in y)(Je||l||!(g in f))&&wt(f,g,y[g]);else qf({target:r,proto:!0,forced:Je||l},y);return(!Xe||u)&&f[de]!==b&&wt(f,de,b,{name:o}),Oa[r]=b,y}});var La=i((DT,_a)=>{"use strict";_a.exports=function(e,r){return{value:e,done:r}}});var qt=i((VT,ka)=>{"use strict";var Mf=X(),St=kn(),Ca=B(),ja=ei(),kf=Z().f,Df=Aa(),Ze=La(),Vf=fe(),Ff=j(),Ma="Array Iterator",Uf=ja.set,Gf=ja.getterFor(Ma);ka.exports=Df(Array,"Array",function(e,r){Uf(this,{type:Ma,target:Mf(e),index:0,kind:r})},function(){var e=Gf(this),r=e.target,t=e.kind,n=e.index++;return!r||n>=r.length?(e.target=void 0,Ze(void 0,!0)):t=="keys"?Ze(n,!1):t=="values"?Ze(r[n],!1):Ze([n,r[n]],!1)},"values");var Na=Ca.Arguments=Ca.Array;St("keys");St("values");St("entries");if(!Vf&&Ff&&Na.name!=="values")try{kf(Na,"name",{value:"values"})}catch(e){}});var Va=i((FT,Da)=>{"use strict";var Qf=L(),Bf=B(),$f=Qf("iterator"),Wf=Array.prototype;Da.exports=function(e){return e!==void 0&&(Bf.Array===e||Wf[$f]===e)}});var Rt=i((UT,Ua)=>{"use strict";var zf=He(),Fa=De(),Kf=Le(),Yf=B(),Hf=L(),Xf=Hf("iterator");Ua.exports=function(e){if(!Kf(e))return Fa(e,Xf)||Fa(e,"@@iterator")||Yf[zf(e)]}});var Qa=i((GT,Ga)=>{"use strict";var Jf=F(),Zf=ce(),ep=V(),rp=ke(),tp=Rt(),np=TypeError;Ga.exports=function(e,r){var t=arguments.length<2?tp(e):r;if(Zf(t))return ep(Jf(t,e));throw np(rp(e)+" is not iterable")}});var Wa=i((QT,$a)=>{"use strict";var op=F(),Ba=V(),ip=De();$a.exports=function(e,r,t){var n,o;Ba(e);try{if(n=ip(e,"return"),!n){if(r==="throw")throw t;return t}n=op(n,e)}catch(a){o=!0,n=a}if(r==="throw")throw t;if(o)throw n;return Ba(n),t}});var Xa=i((BT,Ha)=>{"use strict";var ap=it(),sp=F(),up=V(),lp=ke(),cp=Va(),fp=ct(),za=Dr(),pp=Qa(),vp=Rt(),Ka=Wa(),bp=TypeError,er=function(e,r){this.stopped=e,this.result=r},Ya=er.prototype;Ha.exports=function(e,r,t){var n=t&&t.that,o=!!(t&&t.AS_ENTRIES),a=!!(t&&t.IS_RECORD),u=!!(t&&t.IS_ITERATOR),s=!!(t&&t.INTERRUPTED),c=ap(r,n),l,f,p,b,d,m,y,g=function(I){return l&&Ka(l,"normal",I),new er(!0,I)},h=function(I){return o?(up(I),s?c(I[0],I[1],g):c(I[0],I[1])):s?c(I,g):c(I)};if(a)l=e.iterator;else if(u)l=e;else{if(f=vp(e),!f)throw bp(lp(e)+" is not iterable");if(cp(f)){for(p=0,b=fp(e);b>p;p++)if(d=h(e[p]),d&&za(Ya,d))return d;return new er(!1)}l=pp(e,f)}for(m=a?e.next:l.next;!(y=sp(m,l)).done;){try{d=h(y.value)}catch(I){Ka(l,"throw",I)}if(typeof d=="object"&&d&&za(Ya,d))return d}return new er(!1)}});var Za=i(($T,Ja)=>{"use strict";var dp=Ve(),Tp=Z(),mp=pe();Ja.exports=function(e,r,t){var n=dp(r);n in e?Tp.f(e,n,mp(0,t)):e[n]=t}});var es=i(()=>{"use strict";var yp=at(),hp=Xa(),Ip=Za();yp({target:"Object",stat:!0},{fromEntries:function(r){var t={};return hp(r,function(n,o){Ip(t,n,o)},{AS_ENTRIES:!0}),t}})});var ts=i((KT,rs)=>{"use strict";qt();es();var gp=je();rs.exports=gp.Object.fromEntries});var os=i((YT,ns)=>{"use strict";ns.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 ss=i(()=>{"use strict";qt();var Op=os(),xp=S(),Ep=He(),wp=W(),is=B(),Sp=L(),as=Sp("toStringTag");for(rr in Op)Pt=xp[rr],tr=Pt&&Pt.prototype,tr&&Ep(tr)!==as&&wp(tr,as,rr),is[rr]=is.Array;var Pt,tr,rr});var ls=i((JT,us)=>{"use strict";var qp=ts();ss();us.exports=qp});var fs=i((ZT,cs)=>{"use strict";var Rp=ls();cs.exports=Rp});var Cp={};kt(Cp,{CurrentClientBrowser:()=>nr,CurrentClientDevice:()=>or,ErrorCategory:()=>gn,InterfaceLanguage:()=>bs,Logger:()=>ge,Observable:()=>v,Subject:()=>C,Subscription:()=>E,VERSION:()=>Vt,VKNumericLanguage:()=>vs,ValueSubject:()=>ie,VideoQuality:()=>Ee,abortable:()=>Kt,addScript:()=>$t,areQualitiesExact:()=>fn,assertEmptyArray:()=>Bt,assertNever:()=>A,assertNonNullable:()=>Ut,assertNotEmptyArray:()=>Qt,assertNullable:()=>Gt,assertQualityIsExact:()=>pn,buffer:()=>lr,checkNever:()=>Ft,cloneDeep:()=>bn,cloneDeepWith:()=>oe,combine:()=>ar,debounce:()=>fr,debounceFn:()=>qe,detectEmbed:()=>rn,fillWithDefault:()=>vn,filter:()=>dr,filterChanged:()=>mr,fromEvent:()=>hn,getCurrentBrowser:()=>ne,getExponentialDelay:()=>en,getHighestQuality:()=>an,getIOSVersion:()=>Ht,interval:()=>mn,isAndroid:()=>Xt,isHigher:()=>tn,isHigherOrEqual:()=>nn,isIOS:()=>Yt,isInvariantQuality:()=>Se,isLower:()=>we,isLowerOrEqual:()=>on,isMacLike:()=>Jt,isMobile:()=>Zt,isNonNullable:()=>G,isNullable:()=>Oe,loadVKLangPack:()=>Ap,map:()=>ae,mapTo:()=>hr,merge:()=>sr,noop:()=>D,now:()=>zt,observableFrom:()=>yn,observeElementSize:()=>dn,once:()=>Ir,pairwise:()=>Or,safeStorage:()=>xe,tap:()=>Er,throttle:()=>vr,throttleFn:()=>Re,timeCodeToString:()=>Cs,timeout:()=>Tn,videoHeightToQuality:()=>un,videoQualityToHeight:()=>cn,videoSizeToQuality:()=>ln});module.exports=Ss(Cp);var Vt="__VERSION__";var E=class{constructor(){this.subscriptions=[]}unsubscribe(){let r=this.subscriptions;this.subscriptions=[],r.forEach(t=>typeof t=="function"?t():t.unsubscribe())}add(r){return this.subscriptions.push(r),this}};var A=e=>{throw new Error(`${e} is value of unexpected type`)},Ft=e=>{};var D=()=>{};var v=class{constructor(r){r&&(this._subscribe=r)}subscribe(r,t){var u;let n;t?typeof t=="function"?n={next:t,error:D}:n={next:s=>t.next(s),error:s=>{var c;return(c=t.error)==null?void 0:c.call(t,s)}}:n={next:D,error:D};let o=typeof r=="function"?{next:s=>{try{r(s)}catch(c){n.next(c)}},error:s=>n.next(s)}:{next:s=>r.next(s),error:s=>r.error?r.error(s):n.next(s)},a;try{a=this._subscribe(o)}catch(s){(u=o.error)==null||u.call(o,s)}return new E().add(()=>{switch(o.next=D,o.error=D,typeof a){case"function":a();return;case"object":a.unsubscribe();return;case"undefined":return;default:return A(a)}})}pipe(...r){return r.reduce((t,n)=>n(t),this)}_subscribe(r){}};var C=class extends v{constructor(){super();this.keyCounter=0;this.subscribers=new Map}next(t){this.subscribers.forEach(n=>n.next(t))}error(t){this.subscribers.forEach(n=>{var o;return(o=n.error)==null?void 0:o.call(n,t)})}_subscribe(t){let n=this.keyCounter++;return this.subscribers.set(n,t),new E().add(()=>this.subscribers.delete(n))}};var ge=class{constructor(){this.log$=new C;this.logs=[];this.log=r=>{let t=he(K({},r),{timestamp:Date.now()});this.logs.push(t),this.log$.next(t)};this.getAllLogs=()=>this.logs}createCustomLog(r){return(...t)=>{let n;try{n=r(...t)}catch(o){n={message:"error in `createCustomLog`",component:"Logger"}}this.log(n)}}createComponentLog(r){return this.createCustomLog(t=>K({component:r},t))}};function Ut(e,r='Assertion "value is not nullable" failed'){if(e==null)throw new Error(r)}function Gt(e,r='Assertion "value is nullable" failed'){if(e!=null)throw new Error(r)}function G(e){return typeof e!="undefined"&&e!==null}function Oe(e){return e==null}function Qt(e,r){if(!(e!=null&&e.length))throw new Error(r)}function Bt(e,r){if(e!=null&&e.length)throw new Error(r)}var $t=(e,r,t)=>new Promise((n,o)=>{r.addEventListener("abort",()=>{s(),l.remove()});let a=()=>{s(),o()},u=()=>{s(),n()},s=()=>{c&&clearTimeout(c),l.removeEventListener("load",u),l.removeEventListener("error",a)},c;t&&(c=window.setTimeout(a,t));let l=document.createElement("script");l.addEventListener("load",u),l.addEventListener("error",a),l.src=e,document.head.appendChild(l)});var Wt,zt=typeof((Wt=window.performance)==null?void 0:Wt.now)=="function"?()=>window.performance.now():()=>Date.now();var Kt=(e,r)=>(...t)=>Ie(void 0,null,function*(){var u;let n=r(...t),o=e.aborted,a;for(;!o&&!e.aborted;)try{let s=yield n.next(a);o=(u=s.done)!=null?u:!1,a=s.value}catch(s){yield n.throw(s)}return a});var nr=(l=>(l.Unknown="Unknown",l.Yandex="Yandex",l.Chrome="Chrome",l.Chromium="Chromium",l.Firefox="Firefox",l.Safari="Safari",l.Opera="Opera",l.Edge="Edge",l.Rest="Rest",l))(nr||{}),or=(c=>(c.Unknown="Unknown",c.Android="Android",c.iPhone="iPhone",c.iPad="iPad",c.iPod="iPod",c.RestMobile="RestMobile",c.Mac="Mac",c.Desktop="Desktop",c))(or||{}),ne=()=>{let{userAgent:e}=window.navigator,r=/yabrowser/i.test(e)?"Yandex":void 0,t=/chrome|crios/i.test(e)?"Chrome":void 0,n=/chromium/i.test(e)?"Chromium":void 0,o=/firefox|fxios/i.test(e)?"Firefox":void 0,a=/webkit|safari|khtml/i.test(e)?"Safari":void 0,u=/opr\//i.test(e)?"Opera":void 0,s=/edg/i.test(e)?"Edge":void 0,c=/android/i.test(e)?"Android":void 0,l=/iphone/i.test(e)?"iPhone":void 0,f=/ipad/i.test(e)?"iPad":void 0,p=/ipod/i.test(e)?"iPod":void 0,b=/mac/i.test(e)?"Mac":void 0,d=/webOS|BlackBerry|IEMobile|Opera Mini/i.test(e)?"RestMobile":void 0;return{browser:r||o||u||s||t||n||a||"Rest",device:c||l||f||p||d||b||"Desktop"}},Yt=(e=!1)=>{let t=["iPhone","iPad","iPod"].includes(ne().device);if(!e)return t;let{userAgent:n,maxTouchPoints:o}=window.navigator;return!!(t||/macintosh/i.test(n)&&o>0)},Ht=()=>{let{userAgent:e}=window.navigator,r=e.match(/Version\/(\d+(\.\d+)?)/i);if(!r)return null;let t=r[1],n=parseFloat(t);return isNaN(n)?null:n},Xt=()=>ne().device==="Android",Jt=()=>["Mac","iPhone","iPad","iPod"].includes(ne().device),Zt=()=>{var e,r;return/Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test((e=navigator.appVersion)!=null?e:navigator.userAgent)||((r=navigator==null?void 0:navigator.userAgentData)==null?void 0:r.mobile)};var en=(e,{start:r=0,factor:t=2,max:n=1/0,min:o=r,random:a=0}={})=>{let u=r;return u*=Mt(t,e),u*=1+(Math.random()*a*2-a),u=Math.round(u),u=Math.min(u,n),u=Math.max(u,o),u};var xe={};kt(xe,{clear:()=>Ls,get:()=>Rs,has:()=>As,isPersistent:()=>qs,remove:()=>_s,set:()=>Ps});var O,Q,ir=`vk-videoplayer-dummy-key-${Math.random()}`,Y=()=>{if(Q!==void 0)return Q;try{localStorage.setItem(ir,"test"),localStorage.removeItem(ir),Q=0}catch(e){if(e instanceof DOMException||e instanceof TypeError)try{sessionStorage.getItem(ir),Q=1}catch(r){if(r instanceof DOMException||r instanceof TypeError)Q=2;else throw r}else throw e}return Q===2&&(O=new Map),Q},qs=()=>Y()===0,Rs=e=>{var t,n;let r=Y();switch(r){case 0:return(t=localStorage.getItem(e))!=null?t:void 0;case 1:return(n=sessionStorage.getItem(e))!=null?n:void 0;case 2:return O==null?void 0:O.get(e);default:A(r)}},Ps=(e,r)=>{let t=Y();switch(t){case 0:try{localStorage.setItem(e,r)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 1:try{sessionStorage.setItem(e,r)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 2:return void(O==null?void 0:O.set(e,r));default:A(t)}},As=e=>{var t;let r=Y();switch(r){case 0:return e in localStorage;case 1:return e in sessionStorage;case 2:return(t=O==null?void 0:O.has(e))!=null?t:!1;default:return A(r),!1}},_s=e=>{let r=Y();switch(r){case 0:return localStorage.removeItem(e);case 1:return sessionStorage.removeItem(e);case 2:return void(O==null?void 0:O.delete(e));default:A(r)}},Ls=()=>{let e=Y();switch(e){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return O==null?void 0:O.clear();default:A(e)}};var rn=()=>{let e,r;try{e=window.self!==window.top}catch(n){n instanceof DOMException&&n.name==="SecurityError"?e=!0:(e=!1,console.error(n))}try{window.location.ancestorOrigins&&(r=window.location.ancestorOrigins[window.location.ancestorOrigins.length-1])}catch(n){console.error(n)}try{!r&&document.referrer&&(r=document.referrer)}catch(n){console.error(n)}let t=r?new URL(r).hostname:void 0;return{isEmbed:e,host:t}};var Ee=(f=>(f.INVARIANT="Invariant quality",f.Q_144P="144p",f.Q_240P="240p",f.Q_360P="360p",f.Q_480P="480p",f.Q_720P="720p",f.Q_1080P="1080p",f.Q_1440P="1440p",f.Q_2160P="2160p",f.Q_4320P="4320p",f))(Ee||{});var w={"144p":{width:256,height:144},"240p":{width:428,height:240},"360p":{width:640,height:360},"480p":{width:856,height:480},"720p":{width:1280,height:720},"1080p":{width:1920,height:1080},"1440p":{width:2560,height:1440},"2160p":{width:3840,height:2160},"4320p":{width:7680,height:4320}},tn=(e,r)=>w[e].height>w[r].height,nn=(e,r)=>w[e].height>=w[r].height,we=(e,r)=>w[e].height<w[r].height,on=(e,r)=>w[e].height<=w[r].height,an=e=>e.sort((r,t)=>r===t?0:r==="Invariant quality"?1:t==="Invariant quality"?-1:we(r,t)?1:-1)[0],sn=Object.keys(w).sort((e,r)=>we(e,r)?-1:1),un=(e,r=.02)=>[...sn].find(n=>w[n].height*(1+r)>=e),ln=({width:e,height:r})=>{let t=Math.min(e,r),n=Math.max(e,r);return sn.find(o=>{let a=w[o];return a.width>=n&&a.height>=t})},cn=e=>w[e].height,Se=e=>e==="Invariant quality",fn=e=>e.every(r=>!Se(r));function pn(e){if(Se(e))throw new Error("Expected exact quality")}var vn=(e,r)=>{let t={};for(let n of Object.keys(r)){let o=r[n],a=e[n];Array.isArray(o)&&Array.isArray(a)?t[n]=a:typeof o=="object"&&typeof a=="object"?t[n]=vn(a,o):t[n]=n in e?a:o}return t};var Cs=e=>{let r="";return e>=3600&&(r+=Math.floor(e/3600)+"h",e=e%3600),e>=60&&(r+=Math.floor(e/60)+"m",e=e%60),e>0&&(r+=Math.floor(e)+"s"),r};function qe(e,r=0,t){let n,o,a,u,s,c,l=0,f=!1,p=!1,b=!0,d=!r&&r!==0&&typeof window.requestAnimationFrame=="function";t&&(f=!!t.leading,p="maxWait"in t,a=t!=null&&t.maxWait?Math.max(+(t==null?void 0:t.maxWait)||0,r):a,b="trailing"in t?!!t.trailing:b);function m(T){let q=n,U=o;return n=o=void 0,l=T,u=e.apply(U,q),u}function y(T,q){return d?(s&&window.cancelAnimationFrame(s),window.requestAnimationFrame(T)):setTimeout(T,q)}function g(T){if(d){window.cancelAnimationFrame(T);return}clearTimeout(T)}function h(T){return l=T,s=y(me,r),f?m(T):u}function I(T){let q=T-c,U=T-l,Lt=r-q;return p?Math.min(Lt,a-U):Lt}function At(T){let q=T-c,U=T-l;return c===void 0||q>=r||q<0||p&&U>=a}function me(){let T=Date.now();if(At(T))return _t(T);s=y(me,I(T))}function _t(T){return s=void 0,b&&n?m(T):(n=o=void 0,u)}function ds(){s!==void 0&&g(s),l=0,n=c=o=s=void 0}function Ts(){return s===void 0?u:_t(Date.now())}function ms(){return s!==void 0}function ye(...T){let q=Date.now(),U=At(q);if(n=T,o=this,c=q,U){if(s===void 0)return h(c);if(p)return s=y(me,r),m(c)}return s===void 0&&(s=y(me,r)),u}return ye.cancel=ds,ye.flush=Ts,ye.pending=ms,ye}var Re=(e,r=0,t)=>qe(e,r,he(K(K({},{leading:!0,trailing:!0}),t),{maxWait:r}));var oe=(e,r)=>{if(e===null||typeof e!="object")return e;let t=Array.isArray(e)?[]:{};for(let n in e){if(typeof r=="function"){let o=r(e[n],n,e,t);if(o!==void 0){t[n]=o;continue}}typeof e[n]=="object"?t[n]=oe(e[n],r):t[n]=e[n]}return t};var bn=e=>oe(e);var Ns=300,dn=(e,r=Ns)=>new v(t=>{let{width:n,height:o}=e.getBoundingClientRect();if(t.next({width:n,height:o}),!window.ResizeObserver)return;let a=new ResizeObserver(Re(u=>{let s=u[0];if(!s)return;let c,l;s.contentBoxSize&&s.contentBoxSize[0]?(l=s.contentBoxSize[0].blockSize,c=s.contentBoxSize[0].inlineSize):s.contentRect&&(c=s.contentRect.width,l=s.contentRect.height),G(c)&&G(l)&&t.next({width:c,height:l})},r));return a.observe(e),()=>a.disconnect()});var ie=class extends C{constructor(t){super();this.value=t}next(t){super.next(this.value=t)}error(t){super.error(this.value=t)}getValue(){return this.value}_subscribe(t){let n=super._subscribe(t);return t.next(this.value),n}};function ar(e){return new v(r=>{let t={},n=Object.keys(e).length,o=a=>u=>{a in t||n--,t[a]=u,n===0&&r.next(t)};return Object.entries(e).reduce((a,[u,s])=>a.add(s.subscribe(o(u))),new E)})}function sr(...e){return new v(r=>e.reduce((t,n)=>t.add(n.subscribe(r)),new E))}var Tn=e=>new v(r=>{let t=window.setTimeout(()=>{try{r.next()}catch(n){if(r.error)r.error(n);else throw n}},e);return()=>window.clearTimeout(t)});var mn=e=>new v(r=>{let t=window.setInterval(()=>r.next(),e);return()=>{t&&(window.clearInterval(t),t=void 0)}});var yn=e=>new v(r=>{e.forEach(t=>r.next(t))});var hn=(e,r)=>new v(t=>{let n=o=>t.next(o);return e.addEventListener(r,n),()=>e.removeEventListener(r,n)});function lr(e){return r=>new v(t=>r.subscribe(new ur(t,e)))}var ur=class{constructor(r,t){this.destination=r;this.size=t;this.lastValues=[]}next(r){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(r),this.destination.next(this.lastValues)}error(r){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};var js={leading:!1,trailing:!0};function fr(e,r=js){return t=>new v(n=>t.subscribe(new cr(n,e,r)))}var cr=class{constructor(r,t,n){this.destination=r;this.time=t;this.config=n}next(r){this.lastValue=r,G(this.timeout)?window.clearTimeout(this.timeout):this.config.leading&&this.destination.next(r),this.timeout=window.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(t){if(this.destination.error)this.destination.error(t);else throw t}this.timeout=void 0},this.time)}error(r){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};var Ms={leading:!0,trailing:!1};function vr(e,r=Ms){return t=>new v(n=>t.subscribe(new pr(n,e,r)))}var pr=class{constructor(r,t,n){this.destination=r;this.time=t;this.config=n}next(r){this.lastValue=r,Oe(this.timeout)&&(this.config.leading&&this.destination.next(r),this.timeout=window.setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(r){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};function dr(e){return r=>new v(t=>r.subscribe(new br(t,e)))}var br=class{constructor(r,t){this.destination=r;this.predicate=t}next(r){let t;try{t=this.predicate(r)}catch(n){throw this.error(n),n}t&&this.destination.next(r)}error(r){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};function mr(e=(r,t)=>r===t){return r=>new v(t=>r.subscribe(new Tr(t,e)))}var In={},Tr=class{constructor(r,t){this.destination=r;this.predicate=t;this.lastValue=In}next(r){let t;try{t=this.lastValue===In||!this.predicate(this.lastValue,r),this.lastValue=r}catch(n){throw this.error(n),n}t&&this.destination.next(r)}error(r){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};function ae(e){return r=>new v(t=>r.subscribe(new yr(t,e)))}var yr=class{constructor(r,t){this.destination=r;this.mapper=t}next(r){let t;try{t=this.mapper(r)}catch(n){throw this.error(n),n}this.destination.next(t)}error(r){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};function hr(e){return ae(()=>e)}function Ir(){return e=>new v(r=>{let t=!1,n=!1,o=e.subscribe(a=>{t||(t=!0,r.next(a)),n&&o.unsubscribe()},a=>{var u;t=!0,(u=r.error)==null||u.call(r,a),n&&o.unsubscribe()});return n=!0,t&&o.unsubscribe(),o})}function Or(){return e=>new v(r=>e.subscribe(new gr(r)))}var gr=class{constructor(r){this.destination=r;this.hasLast=!1}next(r){let t=this.last;if(this.last=r,!this.hasLast){this.hasLast=!0;return}this.destination.next([t,r])}error(r){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};function Er(e){return r=>new v(t=>r.subscribe(new xr(t,e)))}var xr=class{constructor(r,t){this.destination=r;this.effect=t}next(r){try{this.effect(r)}catch(t){throw this.error(t),t}this.destination.next(r)}error(r){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};var gn=(s=>(s.NETWORK="network",s.VIDEO_PIPELINE="video_pipeline",s.EXTERNAL_API="external_api",s.PARSER="parser",s.DOM="dom",s.WTF="wtf",s.FATAL="fatal",s))(gn||{});var Pe=class{constructor(){Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}addEventListener(r,t,n){r in this.listeners||(this.listeners[r]=[]),this.listeners[r].push({callback:t,options:n})}removeEventListener(r,t){if(!(r in this.listeners))return;let n=this.listeners[r];for(let o=0,a=n.length;o<a;o++)if(n[o].callback===t){n.splice(o,1);return}}dispatchEvent(r){if(!(r.type in this.listeners))return;let n=this.listeners[r.type].slice();for(let o=0,a=n.length;o<a;o++){let u=n[o];try{u.callback.call(this,r)}catch(s){Promise.resolve().then(()=>{throw s})}u.options&&u.options.once&&this.removeEventListener(r.type,u.callback)}return!r.defaultPrevented}},H=class extends Pe{constructor(){super(),this.listeners||Pe.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(r){r.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,r)),super.dispatchEvent(r)}},se=class{constructor(){Object.defineProperty(this,"signal",{value:new H,writable:!0,configurable:!0})}abort(r){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 n=r;if(n===void 0)if(typeof document=="undefined")n=new Error("This operation was aborted"),n.name="AbortError";else try{n=new DOMException("signal is aborted without reason")}catch(o){n=new Error("This operation was aborted"),n.name="AbortError"}this.signal.reason=n,this.signal.dispatchEvent(t)}toString(){return"[object AbortController]"}};typeof Symbol!="undefined"&&Symbol.toStringTag&&(se.prototype[Symbol.toStringTag]="AbortController",H.prototype[Symbol.toStringTag]="AbortSignal");function Ae(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof e.Request=="function"&&!e.Request.prototype.hasOwnProperty("signal")||!e.AbortController}function wr(e){typeof e=="function"&&(e={fetch:e});let{fetch:r,Request:t=r.Request,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:o=!1}=e;if(!Ae({fetch:r,Request:t,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:o}))return{fetch:r,Request:a};let a=t;(a&&!a.prototype.hasOwnProperty("signal")||o)&&(a=function(l,f){let p;f&&f.signal&&(p=f.signal,delete f.signal);let b=new t(l,f);return p&&Object.defineProperty(b,"signal",{writable:!1,enumerable:!1,configurable:!0,value:p}),b},a.prototype=t.prototype);let u=r;return{fetch:(c,l)=>{let f=a&&a.prototype.isPrototypeOf(c)?c.signal:l?l.signal:void 0;if(f){let p;try{p=new DOMException("Aborted","AbortError")}catch(d){p=new Error("Aborted"),p.name="AbortError"}if(f.aborted)return Promise.reject(p);let b=new Promise((d,m)=>{f.addEventListener("abort",()=>m(p),{once:!0})});return l&&l.signal&&delete l.signal,Promise.race([b,u(c,l)])}return u(c,l)},Request:a}}var ue=Ae({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}),On=ue?wr({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}):void 0,xn=ue?On.fetch:window.fetch,sd=ue?On.Request:window.Request,ud=ue?se:window.AbortController,ld=ue?H:window.AbortSignal;var ps=ws(fs(),1);var vs=(p=>(p.Armenian="58",p.Azerbaijani="57",p.Belarusian="114",p.English="3",p.Kazakh="97",p.Portuguese="73",p.Russian="0",p.Spanish="4",p.Ukrainian="1",p.Uzbek="65",p.Vietnamese="75",p))(vs||{}),Pp="vk.com",Ap=(e,r,t)=>Ie(void 0,null,function*(){let n=new URL(`https://${Pp}/js/lang-pack.js`);n.searchParams.set("format","json"),n.searchParams.set("name",r),e!==void 0&&n.searchParams.set("lang",e);let a=yield(yield xn(n.toString())).json();return _p(a,t)}),_p=(e,r)=>(0,ps.default)(Object.entries(e.keys).map(([t,n])=>[t.substring(`${r}_`.length),Lp(n)])),Lp=e=>Array.isArray(e)?e[0]:e;var bs=(t=>(t.RU="ru",t.EN="en",t))(bs||{});
6
+ "use strict";var Q=Object.defineProperty,dt=Object.defineProperties,ft=Object.getOwnPropertyDescriptor,mt=Object.getOwnPropertyDescriptors,Tt=Object.getOwnPropertyNames,Ie=Object.getOwnPropertySymbols;var he=Object.prototype.hasOwnProperty,vt=Object.prototype.propertyIsEnumerable;var ge=Math.pow,xe=(t,e,r)=>e in t?Q(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,w=(t,e)=>{for(var r in e||(e={}))he.call(e,r)&&xe(t,r,e[r]);if(Ie)for(var r of Ie(e))vt.call(e,r)&&xe(t,r,e[r]);return t},_=(t,e)=>dt(t,mt(e));var ye=(t,e)=>{for(var r in e)Q(t,r,{get:e[r],enumerable:!0})},It=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Tt(e))!he.call(t,i)&&i!==r&&Q(t,i,{get:()=>e[i],enumerable:!(n=ft(e,i))||n.enumerable});return t};var xt=t=>It(Q({},"__esModule",{value:!0}),t);var D=(t,e,r)=>new Promise((n,i)=>{var s=a=>{try{o(r.next(a))}catch(p){i(p)}},u=a=>{try{o(r.throw(a))}catch(p){i(p)}},o=a=>a.done?n(a.value):Promise.resolve(a.value).then(s,u);o((r=r.apply(t,e)).next())});var Nt={};ye(Nt,{CurrentClientBrowser:()=>H,CurrentClientDevice:()=>K,ErrorCategory:()=>ot,InterfaceLanguage:()=>st,Logger:()=>U,Observable:()=>l,Subject:()=>x,Subscription:()=>m,VERSION:()=>Oe,VKNumericLanguage:()=>it,ValueSubject:()=>k,VideoQuality:()=>z,abortable:()=>Pe,addScript:()=>Ce,areQualitiesExact:()=>Ke,assertEmptyArray:()=>Re,assertNever:()=>I,assertNonNullable:()=>Ee,assertNotEmptyArray:()=>Ae,assertNullable:()=>Se,assertQualityIsExact:()=>$e,buffer:()=>Z,checkNever:()=>we,cloneDeep:()=>Xe,cloneDeepWith:()=>C,combine:()=>Y,debounce:()=>te,debounceFn:()=>G,detectEmbed:()=>Ue,fillWithDefault:()=>Ye,filter:()=>ie,filterChanged:()=>ae,fromEvent:()=>rt,getCurrentBrowser:()=>R,getExponentialDelay:()=>De,getHighestQuality:()=>je,getIOSVersion:()=>Ne,interval:()=>et,isAndroid:()=>Ve,isHigher:()=>Be,isHigherOrEqual:()=>Fe,isIOS:()=>Me,isInvariantQuality:()=>W,isLower:()=>j,isLowerOrEqual:()=>ze,isMacLike:()=>Qe,isMobile:()=>_e,isNonNullable:()=>y,isNullable:()=>B,loadVKLangPack:()=>Lt,map:()=>L,mapTo:()=>ue,merge:()=>X,noop:()=>h,now:()=>Le,observableFrom:()=>tt,observeElementSize:()=>Je,once:()=>ce,pairwise:()=>be,safeStorage:()=>F,tap:()=>fe,throttle:()=>ne,throttleFn:()=>q,timeCodeToString:()=>St,timeout:()=>Ze,videoHeightToQuality:()=>Ge,videoQualityToHeight:()=>He,videoSizeToQuality:()=>qe});module.exports=xt(Nt);var Oe="1.0.37-dev.511f8223.0";var m=class{constructor(){this.subscriptions=[]}unsubscribe(){let e=this.subscriptions;this.subscriptions=[],e.forEach(r=>typeof r=="function"?r():r.unsubscribe())}add(e){return this.subscriptions.push(e),this}};var I=t=>{throw new Error(`${t} is value of unexpected type`)},we=t=>{};var h=()=>{};var l=class{constructor(e){e&&(this._subscribe=e)}subscribe(e,r){var u;let n;r?typeof r=="function"?n={next:r,error:h}:n={next:o=>r.next(o),error:o=>{var a;return(a=r.error)==null?void 0:a.call(r,o)}}:n={next:h,error:h};let i=typeof e=="function"?{next:o=>{try{e(o)}catch(a){n.next(a)}},error:o=>n.next(o)}:{next:o=>e.next(o),error:o=>e.error?e.error(o):n.next(o)},s;try{s=this._subscribe(i)}catch(o){(u=i.error)==null||u.call(i,o)}return new m().add(()=>{switch(i.next=h,i.error=h,typeof s){case"function":s();return;case"object":s.unsubscribe();return;case"undefined":return;default:return I(s)}})}pipe(...e){return e.reduce((r,n)=>n(r),this)}_subscribe(e){}};var x=class extends l{constructor(){super();this.keyCounter=0;this.subscribers=new Map}next(r){this.subscribers.forEach(n=>n.next(r))}error(r){this.subscribers.forEach(n=>{var i;return(i=n.error)==null?void 0:i.call(n,r)})}_subscribe(r){let n=this.keyCounter++;return this.subscribers.set(n,r),new m().add(()=>this.subscribers.delete(n))}};var U=class{constructor(){this.log$=new x;this.logs=[];this.log=e=>{let r=_(w({},e),{timestamp:Date.now()});this.logs.push(r),this.log$.next(r)};this.getAllLogs=()=>this.logs}createCustomLog(e){return(...r)=>{let n;try{n=e(...r)}catch(i){n={message:"error in `createCustomLog`",component:"Logger"}}this.log(n)}}createComponentLog(e){return this.createCustomLog(r=>w({component:e},r))}};function Ee(t,e='Assertion "value is not nullable" failed'){if(t==null)throw new Error(e)}function Se(t,e='Assertion "value is nullable" failed'){if(t!=null)throw new Error(e)}function y(t){return typeof t!="undefined"&&t!==null}function B(t){return t==null}function Ae(t,e){if(!(t!=null&&t.length))throw new Error(e)}function Re(t,e){if(t!=null&&t.length)throw new Error(e)}var Ce=(t,e,r)=>new Promise((n,i)=>{e.addEventListener("abort",()=>{o(),p.remove()});let s=()=>{o(),i()},u=()=>{o(),n()},o=()=>{a&&clearTimeout(a),p.removeEventListener("load",u),p.removeEventListener("error",s)},a;r&&(a=window.setTimeout(s,r));let p=document.createElement("script");p.addEventListener("load",u),p.addEventListener("error",s),p.src=t,document.head.appendChild(p)});var ke,Le=typeof((ke=window.performance)==null?void 0:ke.now)=="function"?()=>window.performance.now():()=>Date.now();var Pe=(t,e)=>(...r)=>D(void 0,null,function*(){var u;let n=e(...r),i=t.aborted,s;for(;!i&&!t.aborted;)try{let o=yield n.next(s);i=(u=o.done)!=null?u:!1,s=o.value}catch(o){yield n.throw(o)}return s});var H=(c=>(c.Unknown="Unknown",c.Yandex="Yandex",c.Chrome="Chrome",c.Chromium="Chromium",c.Firefox="Firefox",c.Safari="Safari",c.Opera="Opera",c.Edge="Edge",c.SamsungBrowser="SamsungBrowser",c.Rest="Rest",c))(H||{}),K=(a=>(a.Unknown="Unknown",a.Android="Android",a.iPhone="iPhone",a.iPad="iPad",a.iPod="iPod",a.RestMobile="RestMobile",a.Mac="Mac",a.Desktop="Desktop",a))(K||{}),R=()=>{let{userAgent:t}=window.navigator,e=/yabrowser/i.test(t)?"Yandex":void 0,r=/samsungbrowser/i.test(t)?"SamsungBrowser":void 0,n=/chrome|crios/i.test(t)?"Chrome":void 0,i=/chromium/i.test(t)?"Chromium":void 0,s=/firefox|fxios/i.test(t)?"Firefox":void 0,u=/webkit|safari|khtml/i.test(t)?"Safari":void 0,o=/opr\//i.test(t)?"Opera":void 0,a=/edg/i.test(t)?"Edge":void 0,p=/android/i.test(t)?"Android":void 0,c=/iphone/i.test(t)?"iPhone":void 0,d=/ipad/i.test(t)?"iPad":void 0,S=/ipod/i.test(t)?"iPod":void 0,P=/mac/i.test(t)?"Mac":void 0,A=/webOS|BlackBerry|IEMobile|Opera Mini/i.test(t)?"RestMobile":void 0;return{browser:e||r||s||o||a||n||i||u||"Rest",device:p||c||d||S||A||P||"Desktop"}},Me=(t=!1)=>{let r=["iPhone","iPad","iPod"].includes(R().device);if(!t)return r;let{userAgent:n,maxTouchPoints:i}=window.navigator;return!!(r||/macintosh/i.test(n)&&i>0)},Ne=()=>{let{userAgent:t}=window.navigator,e=t.match(/Version\/(\d+(\.\d+)?)/i);if(!e)return null;let r=e[1],n=parseFloat(r);return isNaN(n)?null:n},Ve=()=>R().device==="Android",Qe=()=>["Mac","iPhone","iPad","iPod"].includes(R().device),_e=()=>{var t,e;return/Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test((t=navigator.appVersion)!=null?t:navigator.userAgent)||((e=navigator==null?void 0:navigator.userAgentData)==null?void 0:e.mobile)};var De=(t,{start:e=0,factor:r=2,max:n=1/0,min:i=e,random:s=0}={})=>{let u=e;return u*=ge(r,t),u*=1+(Math.random()*s*2-s),u=Math.round(u),u=Math.min(u,n),u=Math.max(u,i),u};var F={};ye(F,{clear:()=>Et,get:()=>gt,has:()=>Ot,isPersistent:()=>ht,remove:()=>wt,set:()=>yt});var f,O,$=`vk-videoplayer-dummy-key-${Math.random()}`,E=()=>{if(O!==void 0)return O;try{localStorage.setItem($,"test"),localStorage.removeItem($),O=0}catch(t){if(t instanceof DOMException||t instanceof TypeError)try{sessionStorage.getItem($),O=1}catch(e){if(e instanceof DOMException||e instanceof TypeError)O=2;else throw e}else throw t}return O===2&&(f=new Map),O},ht=()=>E()===0,gt=t=>{var r,n;let e=E();switch(e){case 0:return(r=localStorage.getItem(t))!=null?r:void 0;case 1:return(n=sessionStorage.getItem(t))!=null?n:void 0;case 2:return f==null?void 0:f.get(t);default:I(e)}},yt=(t,e)=>{let r=E();switch(r){case 0:try{localStorage.setItem(t,e)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 1:try{sessionStorage.setItem(t,e)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 2:return void(f==null?void 0:f.set(t,e));default:I(r)}},Ot=t=>{var r;let e=E();switch(e){case 0:return t in localStorage;case 1:return t in sessionStorage;case 2:return(r=f==null?void 0:f.has(t))!=null?r:!1;default:return I(e),!1}},wt=t=>{let e=E();switch(e){case 0:return localStorage.removeItem(t);case 1:return sessionStorage.removeItem(t);case 2:return void(f==null?void 0:f.delete(t));default:I(e)}},Et=()=>{let t=E();switch(t){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return f==null?void 0:f.clear();default:I(t)}};var Ue=()=>{let t,e;try{t=window.self!==window.top}catch(n){n instanceof DOMException&&n.name==="SecurityError"?t=!0:(t=!1,console.error(n))}try{window.location.ancestorOrigins&&(e=window.location.ancestorOrigins[window.location.ancestorOrigins.length-1])}catch(n){console.error(n)}try{!e&&document.referrer&&(e=document.referrer)}catch(n){console.error(n)}let r=e?new URL(e).hostname:void 0;return{isEmbed:t,host:r}};var z=(c=>(c.INVARIANT="Invariant quality",c.Q_144P="144p",c.Q_240P="240p",c.Q_360P="360p",c.Q_480P="480p",c.Q_720P="720p",c.Q_1080P="1080p",c.Q_1440P="1440p",c.Q_2160P="2160p",c.Q_4320P="4320p",c))(z||{});var T={"144p":{width:256,height:144},"240p":{width:428,height:240},"360p":{width:640,height:360},"480p":{width:856,height:480},"720p":{width:1280,height:720},"1080p":{width:1920,height:1080},"1440p":{width:2560,height:1440},"2160p":{width:3840,height:2160},"4320p":{width:7680,height:4320}},Be=(t,e)=>T[t].height>T[e].height,Fe=(t,e)=>T[t].height>=T[e].height,j=(t,e)=>T[t].height<T[e].height,ze=(t,e)=>T[t].height<=T[e].height,je=t=>t.sort((e,r)=>e===r?0:e==="Invariant quality"?1:r==="Invariant quality"?-1:j(e,r)?1:-1)[0],We=Object.keys(T).sort((t,e)=>j(t,e)?-1:1),Ge=(t,e=.02)=>[...We].find(n=>T[n].height*(1+e)>=t),qe=({width:t,height:e})=>{let r=Math.min(t,e),n=Math.max(t,e);return We.find(i=>{let s=T[i];return s.width>=n&&s.height>=r})},He=t=>T[t].height,W=t=>t==="Invariant quality",Ke=t=>t.every(e=>!W(e));function $e(t){if(W(t))throw new Error("Expected exact quality")}var Ye=(t,e)=>{let r={};for(let n of Object.keys(e)){let i=e[n],s=t[n];Array.isArray(i)&&Array.isArray(s)?r[n]=s:typeof i=="object"&&typeof s=="object"?r[n]=Ye(s,i):r[n]=n in t?s:i}return r};var St=t=>{let e="";return t>=3600&&(e+=Math.floor(t/3600)+"h",t=t%3600),t>=60&&(e+=Math.floor(t/60)+"m",t=t%60),t>0&&(e+=Math.floor(t)+"s"),e};function G(t,e=0,r){let n,i,s,u,o,a,p=0,c=!1,d=!1,S=!0,P=!e&&e!==0&&typeof window.requestAnimationFrame=="function";r&&(c=!!r.leading,d="maxWait"in r,s=r!=null&&r.maxWait?Math.max(+(r==null?void 0:r.maxWait)||0,e):s,S="trailing"in r?!!r.trailing:S);function A(b){let v=n,g=i;return n=i=void 0,p=b,u=t.apply(g,v),u}function M(b,v){return P?(o&&window.cancelAnimationFrame(o),window.requestAnimationFrame(b)):setTimeout(b,v)}function at(b){if(P){window.cancelAnimationFrame(b);return}clearTimeout(b)}function lt(b){return p=b,o=M(N,e),c?A(b):u}function ut(b){let v=b-a,g=b-p,ve=e-v;return d?Math.min(ve,s-g):ve}function me(b){let v=b-a,g=b-p;return a===void 0||v>=e||v<0||d&&g>=s}function N(){let b=Date.now();if(me(b))return Te(b);o=M(N,ut(b))}function Te(b){return o=void 0,S&&n?A(b):(n=i=void 0,u)}function ct(){o!==void 0&&at(o),p=0,n=a=i=o=void 0}function pt(){return o===void 0?u:Te(Date.now())}function bt(){return o!==void 0}function V(...b){let v=Date.now(),g=me(v);if(n=b,i=this,a=v,g){if(o===void 0)return lt(a);if(d)return o=M(N,e),A(a)}return o===void 0&&(o=M(N,e)),u}return V.cancel=ct,V.flush=pt,V.pending=bt,V}var q=(t,e=0,r)=>G(t,e,_(w(w({},{leading:!0,trailing:!0}),r),{maxWait:e}));var C=(t,e)=>{if(t===null||typeof t!="object")return t;let r=Array.isArray(t)?[]:{};for(let n in t){if(typeof e=="function"){let i=e(t[n],n,t,r);if(i!==void 0){r[n]=i;continue}}typeof t[n]=="object"?r[n]=C(t[n],e):r[n]=t[n]}return r};var Xe=t=>C(t);var At=300,Je=(t,e=At)=>new l(r=>{let{width:n,height:i}=t.getBoundingClientRect();if(r.next({width:n,height:i}),!window.ResizeObserver)return;let s=new ResizeObserver(q(u=>{let o=u[0];if(!o)return;let a,p;o.contentBoxSize&&o.contentBoxSize[0]?(p=o.contentBoxSize[0].blockSize,a=o.contentBoxSize[0].inlineSize):o.contentRect&&(a=o.contentRect.width,p=o.contentRect.height),y(a)&&y(p)&&r.next({width:a,height:p})},e));return s.observe(t),()=>s.disconnect()});var k=class extends x{constructor(r){super();this.value=r}next(r){super.next(this.value=r)}error(r){super.error(this.value=r)}getValue(){return this.value}_subscribe(r){let n=super._subscribe(r);return r.next(this.value),n}};function Y(t){return new l(e=>{let r={},n=Object.keys(t).length,i=s=>u=>{s in r||n--,r[s]=u,n===0&&e.next(r)};return Object.entries(t).reduce((s,[u,o])=>s.add(o.subscribe(i(u))),new m)})}function X(...t){return new l(e=>t.reduce((r,n)=>r.add(n.subscribe(e)),new m))}var Ze=t=>new l(e=>{let r=window.setTimeout(()=>{try{e.next()}catch(n){if(e.error)e.error(n);else throw n}},t);return()=>window.clearTimeout(r)});var et=t=>new l(e=>{let r=window.setInterval(()=>e.next(),t);return()=>{r&&(window.clearInterval(r),r=void 0)}});var tt=t=>new l(e=>{t.forEach(r=>e.next(r))});var rt=(t,e)=>new l(r=>{let n=i=>r.next(i);return t.addEventListener(e,n),()=>t.removeEventListener(e,n)});function Z(t){return e=>new l(r=>e.subscribe(new J(r,t)))}var J=class{constructor(e,r){this.destination=e;this.size=r;this.lastValues=[]}next(e){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(e),this.destination.next(this.lastValues)}error(e){var r,n;(n=(r=this.destination).error)==null||n.call(r,e)}};var Rt={leading:!1,trailing:!0};function te(t,e=Rt){return r=>new l(n=>r.subscribe(new ee(n,t,e)))}var ee=class{constructor(e,r,n){this.destination=e;this.time=r;this.config=n}next(e){this.lastValue=e,y(this.timeout)?window.clearTimeout(this.timeout):this.config.leading&&this.destination.next(e),this.timeout=window.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(r){if(this.destination.error)this.destination.error(r);else throw r}this.timeout=void 0},this.time)}error(e){var r,n;(n=(r=this.destination).error)==null||n.call(r,e)}};var Ct={leading:!0,trailing:!1};function ne(t,e=Ct){return r=>new l(n=>r.subscribe(new re(n,t,e)))}var re=class{constructor(e,r,n){this.destination=e;this.time=r;this.config=n}next(e){this.lastValue=e,B(this.timeout)&&(this.config.leading&&this.destination.next(e),this.timeout=window.setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(e){var r,n;(n=(r=this.destination).error)==null||n.call(r,e)}};function ie(t){return e=>new l(r=>e.subscribe(new oe(r,t)))}var oe=class{constructor(e,r){this.destination=e;this.predicate=r}next(e){let r;try{r=this.predicate(e)}catch(n){throw this.error(n),n}r&&this.destination.next(e)}error(e){var r,n;(n=(r=this.destination).error)==null||n.call(r,e)}};function ae(t=(e,r)=>e===r){return e=>new l(r=>e.subscribe(new se(r,t)))}var nt={},se=class{constructor(e,r){this.destination=e;this.predicate=r;this.lastValue=nt}next(e){let r;try{r=this.lastValue===nt||!this.predicate(this.lastValue,e),this.lastValue=e}catch(n){throw this.error(n),n}r&&this.destination.next(e)}error(e){var r,n;(n=(r=this.destination).error)==null||n.call(r,e)}};function L(t){return e=>new l(r=>e.subscribe(new le(r,t)))}var le=class{constructor(e,r){this.destination=e;this.mapper=r}next(e){let r;try{r=this.mapper(e)}catch(n){throw this.error(n),n}this.destination.next(r)}error(e){var r,n;(n=(r=this.destination).error)==null||n.call(r,e)}};function ue(t){return L(()=>t)}function ce(){return t=>new l(e=>{let r=!1,n=!1,i=t.subscribe(s=>{r||(r=!0,e.next(s)),n&&i.unsubscribe()},s=>{var u;r=!0,(u=e.error)==null||u.call(e,s),n&&i.unsubscribe()});return n=!0,r&&i.unsubscribe(),i})}function be(){return t=>new l(e=>t.subscribe(new pe(e)))}var pe=class{constructor(e){this.destination=e;this.hasLast=!1}next(e){let r=this.last;if(this.last=e,!this.hasLast){this.hasLast=!0;return}this.destination.next([r,e])}error(e){var r,n;(n=(r=this.destination).error)==null||n.call(r,e)}};function fe(t){return e=>new l(r=>e.subscribe(new de(r,t)))}var de=class{constructor(e,r){this.destination=e;this.effect=r}next(e){try{this.effect(e)}catch(r){throw this.error(r),r}this.destination.next(e)}error(e){var r,n;(n=(r=this.destination).error)==null||n.call(r,e)}};var ot=(o=>(o.NETWORK="network",o.VIDEO_PIPELINE="video_pipeline",o.EXTERNAL_API="external_api",o.PARSER="parser",o.DOM="dom",o.WTF="wtf",o.FATAL="fatal",o))(ot||{});var it=(d=>(d.Armenian="58",d.Azerbaijani="57",d.Belarusian="114",d.English="3",d.Kazakh="97",d.Portuguese="73",d.Russian="0",d.Spanish="4",d.Ukrainian="1",d.Uzbek="65",d.Vietnamese="75",d))(it||{}),kt="vk.com",Lt=(t,e,r)=>D(void 0,null,function*(){let n=new URL(`https://${kt}/js/lang-pack.js`);n.searchParams.set("format","json"),n.searchParams.set("name",e),t!==void 0&&n.searchParams.set("lang",t);let s=yield(yield fetch(n.toString())).json();return Pt(s,r)}),Pt=(t,e)=>Object.fromEntries(Object.entries(t.keys).map(([r,n])=>[r.substring(`${e}_`.length),Mt(n)])),Mt=t=>Array.isArray(t)?t[0]:t;var st=(r=>(r.RU="ru",r.EN="en",r))(st||{});
package/es2015.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @vkontakte/videoplayer-shared v1.0.37-dev.2e9cb822.0
3
- * Fri, 05 Jul 2024 08:48:33 GMT
2
+ * @vkontakte/videoplayer-shared v1.0.37-dev.511f8223.0
3
+ * Wed, 17 Jul 2024 10:03:53 GMT
4
4
  * https://st.mycdn.me/static/vkontakte-videoplayer/1-0-37/doc/
5
5
  */
6
- var ja=Object.create;var be=Object.defineProperty,Ma=Object.defineProperties,ka=Object.getOwnPropertyDescriptor,Da=Object.getOwnPropertyDescriptors,Va=Object.getOwnPropertyNames,It=Object.getOwnPropertySymbols,Fa=Object.getPrototypeOf,Ot=Object.prototype.hasOwnProperty,Ua=Object.prototype.propertyIsEnumerable;var xt=Math.pow,gt=(e,r,t)=>r in e?be(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,z=(e,r)=>{for(var t in r||(r={}))Ot.call(r,t)&&gt(e,t,r[t]);if(It)for(var t of It(r))Ua.call(r,t)&&gt(e,t,r[t]);return e},de=(e,r)=>Ma(e,Da(r));var i=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Ga=(e,r)=>{for(var t in r)be(e,t,{get:r[t],enumerable:!0})},Qa=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of Va(r))!Ot.call(e,o)&&o!==t&&be(e,o,{get:()=>r[o],enumerable:!(n=ka(r,o))||n.enumerable});return e};var Ba=(e,r,t)=>(t=e!=null?ja(Fa(e)):{},Qa(r||!e||!e.__esModule?be(t,"default",{value:e,enumerable:!0}):t,e));var Te=(e,r,t)=>new Promise((n,o)=>{var a=c=>{try{s(t.next(c))}catch(l){o(l)}},u=c=>{try{s(t.throw(c))}catch(l){o(l)}},s=c=>c.done?n(c.value):Promise.resolve(c.value).then(a,u);s((t=t.apply(e,r)).next())});var A=i((ud,Gt)=>{"use strict";Gt.exports=function(e){try{return!!e()}catch(r){return!0}}});var oe=i((ld,Qt)=>{"use strict";var Cs=A();Qt.exports=!Cs(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var C=i((cd,Wt)=>{"use strict";var Bt=oe(),$t=Function.prototype,vr=$t.call,Ns=Bt&&$t.bind.bind(vr,vr);Wt.exports=Bt?Ns:function(e){return function(){return vr.apply(e,arguments)}}});var xe=i((fd,Kt)=>{"use strict";var zt=C(),js=zt({}.toString),Ms=zt("".slice);Kt.exports=function(e){return Ms(js(e),8,-1)}});var Ht=i((pd,Yt)=>{"use strict";var ks=C(),Ds=A(),Vs=xe(),br=Object,Fs=ks("".split);Yt.exports=Ds(function(){return!br("z").propertyIsEnumerable(0)})?function(e){return Vs(e)=="String"?Fs(e,""):br(e)}:br});var Ee=i((vd,Xt)=>{"use strict";Xt.exports=function(e){return e==null}});var dr=i((bd,Jt)=>{"use strict";var Us=Ee(),Gs=TypeError;Jt.exports=function(e){if(Us(e))throw Gs("Can't call method on "+e);return e}});var X=i((dd,Zt)=>{"use strict";var Qs=Ht(),Bs=dr();Zt.exports=function(e){return Qs(Bs(e))}});var rn=i((Td,en)=>{"use strict";en.exports=function(){}});var Q=i((md,tn)=>{"use strict";tn.exports={}});var S=i((nn,on)=>{"use strict";var we=function(e){return e&&e.Math==Math&&e};on.exports=we(typeof globalThis=="object"&&globalThis)||we(typeof window=="object"&&window)||we(typeof self=="object"&&self)||we(typeof global=="object"&&global)||function(){return this}()||nn||Function("return this")()});var mr=i((yd,an)=>{"use strict";var Tr=typeof document=="object"&&document.all,$s=typeof Tr=="undefined"&&Tr!==void 0;an.exports={all:Tr,IS_HTMLDDA:$s}});var x=i((hd,un)=>{"use strict";var sn=mr(),Ws=sn.all;un.exports=sn.IS_HTMLDDA?function(e){return typeof e=="function"||e===Ws}:function(e){return typeof e=="function"}});var fn=i((Id,cn)=>{"use strict";var zs=S(),Ks=x(),ln=zs.WeakMap;cn.exports=Ks(ln)&&/native code/.test(String(ln))});var B=i((gd,bn)=>{"use strict";var pn=x(),vn=mr(),Ys=vn.all;bn.exports=vn.IS_HTMLDDA?function(e){return typeof e=="object"?e!==null:pn(e)||e===Ys}:function(e){return typeof e=="object"?e!==null:pn(e)}});var N=i((Od,dn)=>{"use strict";var Hs=A();dn.exports=!Hs(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var hr=i((xd,mn)=>{"use strict";var Xs=S(),Tn=B(),yr=Xs.document,Js=Tn(yr)&&Tn(yr.createElement);mn.exports=function(e){return Js?yr.createElement(e):{}}});var Ir=i((Ed,yn)=>{"use strict";var Zs=N(),eu=A(),ru=hr();yn.exports=!Zs&&!eu(function(){return Object.defineProperty(ru("div"),"a",{get:function(){return 7}}).a!=7})});var gr=i((wd,hn)=>{"use strict";var tu=N(),nu=A();hn.exports=tu&&nu(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})});var D=i((Sd,In)=>{"use strict";var ou=B(),iu=String,au=TypeError;In.exports=function(e){if(ou(e))return e;throw au(iu(e)+" is not an object")}});var V=i((qd,gn)=>{"use strict";var su=oe(),Se=Function.prototype.call;gn.exports=su?Se.bind(Se):function(){return Se.apply(Se,arguments)}});var qe=i((Rd,On)=>{"use strict";On.exports={}});var Er=i((Pd,En)=>{"use strict";var Or=qe(),xr=S(),uu=x(),xn=function(e){return uu(e)?e:void 0};En.exports=function(e,r){return arguments.length<2?xn(Or[e])||xn(xr[e]):Or[e]&&Or[e][r]||xr[e]&&xr[e][r]}});var wr=i((Ad,wn)=>{"use strict";var lu=C();wn.exports=lu({}.isPrototypeOf)});var qn=i((_d,Sn)=>{"use strict";Sn.exports=typeof navigator!="undefined"&&String(navigator.userAgent)||""});var Nn=i((Ld,Cn)=>{"use strict";var Ln=S(),Sr=qn(),Rn=Ln.process,Pn=Ln.Deno,An=Rn&&Rn.versions||Pn&&Pn.version,_n=An&&An.v8,R,Re;_n&&(R=_n.split("."),Re=R[0]>0&&R[0]<4?1:+(R[0]+R[1]));!Re&&Sr&&(R=Sr.match(/Edge\/(\d+)/),(!R||R[1]>=74)&&(R=Sr.match(/Chrome\/(\d+)/),R&&(Re=+R[1])));Cn.exports=Re});var qr=i((Cd,Mn)=>{"use strict";var jn=Nn(),cu=A(),fu=S(),pu=fu.String;Mn.exports=!!Object.getOwnPropertySymbols&&!cu(function(){var e=Symbol();return!pu(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&jn&&jn<41})});var Rr=i((Nd,kn)=>{"use strict";var vu=qr();kn.exports=vu&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Pr=i((jd,Dn)=>{"use strict";var bu=Er(),du=x(),Tu=wr(),mu=Rr(),yu=Object;Dn.exports=mu?function(e){return typeof e=="symbol"}:function(e){var r=bu("Symbol");return du(r)&&Tu(r.prototype,yu(e))}});var Pe=i((Md,Vn)=>{"use strict";var hu=String;Vn.exports=function(e){try{return hu(e)}catch(r){return"Object"}}});var ie=i((kd,Fn)=>{"use strict";var Iu=x(),gu=Pe(),Ou=TypeError;Fn.exports=function(e){if(Iu(e))return e;throw Ou(gu(e)+" is not a function")}});var Ae=i((Dd,Un)=>{"use strict";var xu=ie(),Eu=Ee();Un.exports=function(e,r){var t=e[r];return Eu(t)?void 0:xu(t)}});var Qn=i((Vd,Gn)=>{"use strict";var Ar=V(),_r=x(),Lr=B(),wu=TypeError;Gn.exports=function(e,r){var t,n;if(r==="string"&&_r(t=e.toString)&&!Lr(n=Ar(t,e))||_r(t=e.valueOf)&&!Lr(n=Ar(t,e))||r!=="string"&&_r(t=e.toString)&&!Lr(n=Ar(t,e)))return n;throw wu("Can't convert object to primitive value")}});var ae=i((Fd,Bn)=>{"use strict";Bn.exports=!0});var zn=i((Ud,Wn)=>{"use strict";var $n=S(),Su=Object.defineProperty;Wn.exports=function(e,r){try{Su($n,e,{value:r,configurable:!0,writable:!0})}catch(t){$n[e]=r}return r}});var Cr=i((Gd,Yn)=>{"use strict";var qu=S(),Ru=zn(),Kn="__core-js_shared__",Pu=qu[Kn]||Ru(Kn,{});Yn.exports=Pu});var Nr=i((Qd,Xn)=>{"use strict";var Au=ae(),Hn=Cr();(Xn.exports=function(e,r){return Hn[e]||(Hn[e]=r!==void 0?r:{})})("versions",[]).push({version:"3.31.0",mode:Au?"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 jr=i((Bd,Jn)=>{"use strict";var _u=dr(),Lu=Object;Jn.exports=function(e){return Lu(_u(e))}});var j=i(($d,Zn)=>{"use strict";var Cu=C(),Nu=jr(),ju=Cu({}.hasOwnProperty);Zn.exports=Object.hasOwn||function(r,t){return ju(Nu(r),t)}});var Mr=i((Wd,eo)=>{"use strict";var Mu=C(),ku=0,Du=Math.random(),Vu=Mu(1 .toString);eo.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Vu(++ku+Du,36)}});var _=i((zd,to)=>{"use strict";var Fu=S(),Uu=Nr(),ro=j(),Gu=Mr(),Qu=qr(),Bu=Rr(),J=Fu.Symbol,kr=Uu("wks"),$u=Bu?J.for||J:J&&J.withoutSetter||Gu;to.exports=function(e){return ro(kr,e)||(kr[e]=Qu&&ro(J,e)?J[e]:$u("Symbol."+e)),kr[e]}});var ao=i((Kd,io)=>{"use strict";var Wu=V(),no=B(),oo=Pr(),zu=Ae(),Ku=Qn(),Yu=_(),Hu=TypeError,Xu=Yu("toPrimitive");io.exports=function(e,r){if(!no(e)||oo(e))return e;var t=zu(e,Xu),n;if(t){if(r===void 0&&(r="default"),n=Wu(t,e,r),!no(n)||oo(n))return n;throw Hu("Can't convert object to primitive value")}return r===void 0&&(r="number"),Ku(e,r)}});var _e=i((Yd,so)=>{"use strict";var Ju=ao(),Zu=Pr();so.exports=function(e){var r=Ju(e,"string");return Zu(r)?r:r+""}});var Z=i(lo=>{"use strict";var el=N(),rl=Ir(),tl=gr(),Le=D(),uo=_e(),nl=TypeError,Dr=Object.defineProperty,ol=Object.getOwnPropertyDescriptor,Vr="enumerable",Fr="configurable",Ur="writable";lo.f=el?tl?function(r,t,n){if(Le(r),t=uo(t),Le(n),typeof r=="function"&&t==="prototype"&&"value"in n&&Ur in n&&!n[Ur]){var o=ol(r,t);o&&o[Ur]&&(r[t]=n.value,n={configurable:Fr in n?n[Fr]:o[Fr],enumerable:Vr in n?n[Vr]:o[Vr],writable:!1})}return Dr(r,t,n)}:Dr:function(r,t,n){if(Le(r),t=uo(t),Le(n),rl)try{return Dr(r,t,n)}catch(o){}if("get"in n||"set"in n)throw nl("Accessors not supported");return"value"in n&&(r[t]=n.value),r}});var se=i((Xd,co)=>{"use strict";co.exports=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}});var $=i((Jd,fo)=>{"use strict";var il=N(),al=Z(),sl=se();fo.exports=il?function(e,r,t){return al.f(e,r,sl(1,t))}:function(e,r,t){return e[r]=t,e}});var Ce=i((Zd,vo)=>{"use strict";var ul=Nr(),ll=Mr(),po=ul("keys");vo.exports=function(e){return po[e]||(po[e]=ll(e))}});var Ne=i((eT,bo)=>{"use strict";bo.exports={}});var ho=i((rT,yo)=>{"use strict";var cl=fn(),mo=S(),fl=B(),pl=$(),Gr=j(),Qr=Cr(),vl=Ce(),bl=Ne(),To="Object already initialized",Br=mo.TypeError,dl=mo.WeakMap,je,ue,Me,Tl=function(e){return Me(e)?ue(e):je(e,{})},ml=function(e){return function(r){var t;if(!fl(r)||(t=ue(r)).type!==e)throw Br("Incompatible receiver, "+e+" required");return t}};cl||Qr.state?(P=Qr.state||(Qr.state=new dl),P.get=P.get,P.has=P.has,P.set=P.set,je=function(e,r){if(P.has(e))throw Br(To);return r.facade=e,P.set(e,r),r},ue=function(e){return P.get(e)||{}},Me=function(e){return P.has(e)}):(W=vl("state"),bl[W]=!0,je=function(e,r){if(Gr(e,W))throw Br(To);return r.facade=e,pl(e,W,r),r},ue=function(e){return Gr(e,W)?e[W]:{}},Me=function(e){return Gr(e,W)});var P,W;yo.exports={set:je,get:ue,has:Me,enforce:Tl,getterFor:ml}});var Eo=i((tT,xo)=>{"use strict";var yl=oe(),Oo=Function.prototype,Io=Oo.apply,go=Oo.call;xo.exports=typeof Reflect=="object"&&Reflect.apply||(yl?go.bind(Io):function(){return go.apply(Io,arguments)})});var $r=i((nT,wo)=>{"use strict";var hl=xe(),Il=C();wo.exports=function(e){if(hl(e)==="Function")return Il(e)}});var Po=i(Ro=>{"use strict";var So={}.propertyIsEnumerable,qo=Object.getOwnPropertyDescriptor,gl=qo&&!So.call({1:2},1);Ro.f=gl?function(r){var t=qo(this,r);return!!t&&t.enumerable}:So});var Lo=i(_o=>{"use strict";var Ol=N(),xl=V(),El=Po(),wl=se(),Sl=X(),ql=_e(),Rl=j(),Pl=Ir(),Ao=Object.getOwnPropertyDescriptor;_o.f=Ol?Ao:function(r,t){if(r=Sl(r),t=ql(t),Pl)try{return Ao(r,t)}catch(n){}if(Rl(r,t))return wl(!xl(El.f,r,t),r[t])}});var No=i((aT,Co)=>{"use strict";var Al=A(),_l=x(),Ll=/#|\.prototype\./,le=function(e,r){var t=Nl[Cl(e)];return t==Ml?!0:t==jl?!1:_l(r)?Al(r):!!r},Cl=le.normalize=function(e){return String(e).replace(Ll,".").toLowerCase()},Nl=le.data={},jl=le.NATIVE="N",Ml=le.POLYFILL="P";Co.exports=le});var Wr=i((sT,Mo)=>{"use strict";var jo=$r(),kl=ie(),Dl=oe(),Vl=jo(jo.bind);Mo.exports=function(e,r){return kl(e),r===void 0?e:Dl?Vl(e,r):function(){return e.apply(r,arguments)}}});var zr=i((uT,Do)=>{"use strict";var ke=S(),Fl=Eo(),Ul=$r(),Gl=x(),Ql=Lo().f,Bl=No(),ee=qe(),$l=Wr(),re=$(),ko=j(),Wl=function(e){var r=function(t,n,o){if(this instanceof r){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,o)}return Fl(e,this,arguments)};return r.prototype=e.prototype,r};Do.exports=function(e,r){var t=e.target,n=e.global,o=e.stat,a=e.proto,u=n?ke:o?ke[t]:(ke[t]||{}).prototype,s=n?ee:ee[t]||re(ee,t,{})[t],c=s.prototype,l,f,p,b,d,m,y,g,h;for(b in r)l=Bl(n?b:t+(o?".":"#")+b,e.forced),f=!l&&u&&ko(u,b),m=s[b],f&&(e.dontCallGetSet?(h=Ql(u,b),y=h&&h.value):y=u[b]),d=f&&y?y:r[b],!(f&&typeof m==typeof d)&&(e.bind&&f?g=$l(d,ke):e.wrap&&f?g=Wl(d):a&&Gl(d)?g=Ul(d):g=d,(e.sham||d&&d.sham||m&&m.sham)&&re(g,"sham",!0),re(s,b,g),a&&(p=t+"Prototype",ko(ee,p)||re(ee,p,{}),re(ee[p],b,d),e.real&&c&&(l||!c[b])&&re(c,b,d)))}});var Uo=i((lT,Fo)=>{"use strict";var Kr=N(),zl=j(),Vo=Function.prototype,Kl=Kr&&Object.getOwnPropertyDescriptor,Yr=zl(Vo,"name"),Yl=Yr&&function(){}.name==="something",Hl=Yr&&(!Kr||Kr&&Kl(Vo,"name").configurable);Fo.exports={EXISTS:Yr,PROPER:Yl,CONFIGURABLE:Hl}});var Qo=i((cT,Go)=>{"use strict";var Xl=Math.ceil,Jl=Math.floor;Go.exports=Math.trunc||function(r){var t=+r;return(t>0?Jl:Xl)(t)}});var Hr=i((fT,Bo)=>{"use strict";var Zl=Qo();Bo.exports=function(e){var r=+e;return r!==r||r===0?0:Zl(r)}});var Wo=i((pT,$o)=>{"use strict";var ec=Hr(),rc=Math.max,tc=Math.min;$o.exports=function(e,r){var t=ec(e);return t<0?rc(t+r,0):tc(t,r)}});var Ko=i((vT,zo)=>{"use strict";var nc=Hr(),oc=Math.min;zo.exports=function(e){return e>0?oc(nc(e),9007199254740991):0}});var Xr=i((bT,Yo)=>{"use strict";var ic=Ko();Yo.exports=function(e){return ic(e.length)}});var Jo=i((dT,Xo)=>{"use strict";var ac=X(),sc=Wo(),uc=Xr(),Ho=function(e){return function(r,t,n){var o=ac(r),a=uc(o),u=sc(n,a),s;if(e&&t!=t){for(;a>u;)if(s=o[u++],s!=s)return!0}else for(;a>u;u++)if((e||u in o)&&o[u]===t)return e||u||0;return!e&&-1}};Xo.exports={includes:Ho(!0),indexOf:Ho(!1)}});var ri=i((TT,ei)=>{"use strict";var lc=C(),Jr=j(),cc=X(),fc=Jo().indexOf,pc=Ne(),Zo=lc([].push);ei.exports=function(e,r){var t=cc(e),n=0,o=[],a;for(a in t)!Jr(pc,a)&&Jr(t,a)&&Zo(o,a);for(;r.length>n;)Jr(t,a=r[n++])&&(~fc(o,a)||Zo(o,a));return o}});var Zr=i((mT,ti)=>{"use strict";ti.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var oi=i((yT,ni)=>{"use strict";var vc=ri(),bc=Zr();ni.exports=Object.keys||function(r){return vc(r,bc)}});var ai=i(ii=>{"use strict";var dc=N(),Tc=gr(),mc=Z(),yc=D(),hc=X(),Ic=oi();ii.f=dc&&!Tc?Object.defineProperties:function(r,t){yc(r);for(var n=hc(t),o=Ic(t),a=o.length,u=0,s;a>u;)mc.f(r,s=o[u++],n[s]);return r}});var ui=i((IT,si)=>{"use strict";var gc=Er();si.exports=gc("document","documentElement")});var nt=i((gT,di)=>{"use strict";var Oc=D(),xc=ai(),li=Zr(),Ec=Ne(),wc=ui(),Sc=hr(),qc=Ce(),ci=">",fi="<",rt="prototype",tt="script",vi=qc("IE_PROTO"),et=function(){},bi=function(e){return fi+tt+ci+e+fi+"/"+tt+ci},pi=function(e){e.write(bi("")),e.close();var r=e.parentWindow.Object;return e=null,r},Rc=function(){var e=Sc("iframe"),r="java"+tt+":",t;return e.style.display="none",wc.appendChild(e),e.src=String(r),t=e.contentWindow.document,t.open(),t.write(bi("document.F=Object")),t.close(),t.F},De,Ve=function(){try{De=new ActiveXObject("htmlfile")}catch(r){}Ve=typeof document!="undefined"?document.domain&&De?pi(De):Rc():pi(De);for(var e=li.length;e--;)delete Ve[rt][li[e]];return Ve()};Ec[vi]=!0;di.exports=Object.create||function(r,t){var n;return r!==null?(et[rt]=Oc(r),n=new et,et[rt]=null,n[vi]=r):n=Ve(),t===void 0?n:xc.f(n,t)}});var mi=i((OT,Ti)=>{"use strict";var Pc=A();Ti.exports=!Pc(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})});var it=i((xT,hi)=>{"use strict";var Ac=j(),_c=x(),Lc=jr(),Cc=Ce(),Nc=mi(),yi=Cc("IE_PROTO"),ot=Object,jc=ot.prototype;hi.exports=Nc?ot.getPrototypeOf:function(e){var r=Lc(e);if(Ac(r,yi))return r[yi];var t=r.constructor;return _c(t)&&r instanceof t?t.prototype:r instanceof ot?jc:null}});var at=i((ET,Ii)=>{"use strict";var Mc=$();Ii.exports=function(e,r,t,n){return n&&n.enumerable?e[r]=t:Mc(e,r,t),e}});var ct=i((wT,xi)=>{"use strict";var kc=A(),Dc=x(),Vc=B(),Fc=nt(),gi=it(),Uc=at(),Gc=_(),Qc=ae(),lt=Gc("iterator"),Oi=!1,M,st,ut;[].keys&&(ut=[].keys(),"next"in ut?(st=gi(gi(ut)),st!==Object.prototype&&(M=st)):Oi=!0);var Bc=!Vc(M)||kc(function(){var e={};return M[lt].call(e)!==e});Bc?M={}:Qc&&(M=Fc(M));Dc(M[lt])||Uc(M,lt,function(){return this});xi.exports={IteratorPrototype:M,BUGGY_SAFARI_ITERATORS:Oi}});var Fe=i((ST,wi)=>{"use strict";var $c=_(),Wc=$c("toStringTag"),Ei={};Ei[Wc]="z";wi.exports=String(Ei)==="[object z]"});var Ge=i((qT,Si)=>{"use strict";var zc=Fe(),Kc=x(),Ue=xe(),Yc=_(),Hc=Yc("toStringTag"),Xc=Object,Jc=Ue(function(){return arguments}())=="Arguments",Zc=function(e,r){try{return e[r]}catch(t){}};Si.exports=zc?Ue:function(e){var r,t,n;return e===void 0?"Undefined":e===null?"Null":typeof(t=Zc(r=Xc(e),Hc))=="string"?t:Jc?Ue(r):(n=Ue(r))=="Object"&&Kc(r.callee)?"Arguments":n}});var Ri=i((RT,qi)=>{"use strict";var ef=Fe(),rf=Ge();qi.exports=ef?{}.toString:function(){return"[object "+rf(this)+"]"}});var ft=i((PT,Ai)=>{"use strict";var tf=Fe(),nf=Z().f,of=$(),af=j(),sf=Ri(),uf=_(),Pi=uf("toStringTag");Ai.exports=function(e,r,t,n){if(e){var o=t?e:e.prototype;af(o,Pi)||nf(o,Pi,{configurable:!0,value:r}),n&&!tf&&of(o,"toString",sf)}}});var Li=i((AT,_i)=>{"use strict";var lf=ct().IteratorPrototype,cf=nt(),ff=se(),pf=ft(),vf=Q(),bf=function(){return this};_i.exports=function(e,r,t,n){var o=r+" Iterator";return e.prototype=cf(lf,{next:ff(+!n,t)}),pf(e,o,!1,!0),vf[o]=bf,e}});var Ni=i((_T,Ci)=>{"use strict";var df=C(),Tf=ie();Ci.exports=function(e,r,t){try{return df(Tf(Object.getOwnPropertyDescriptor(e,r)[t]))}catch(n){}}});var Mi=i((LT,ji)=>{"use strict";var mf=x(),yf=String,hf=TypeError;ji.exports=function(e){if(typeof e=="object"||mf(e))return e;throw hf("Can't set "+yf(e)+" as a prototype")}});var Di=i((CT,ki)=>{"use strict";var If=Ni(),gf=D(),Of=Mi();ki.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,r={},t;try{t=If(Object.prototype,"__proto__","set"),t(r,[]),e=r instanceof Array}catch(n){}return function(o,a){return gf(o),Of(a),e?t(o,a):o.__proto__=a,o}}():void 0)});var Yi=i((NT,Ki)=>{"use strict";var xf=zr(),Ef=V(),Qe=ae(),Wi=Uo(),wf=x(),Sf=Li(),Vi=it(),Fi=Di(),qf=ft(),Rf=$(),pt=at(),Pf=_(),Ui=Q(),zi=ct(),Af=Wi.PROPER,_f=Wi.CONFIGURABLE,Gi=zi.IteratorPrototype,Be=zi.BUGGY_SAFARI_ITERATORS,ce=Pf("iterator"),Qi="keys",fe="values",Bi="entries",$i=function(){return this};Ki.exports=function(e,r,t,n,o,a,u){Sf(t,r,n);var s=function(h){if(h===o&&b)return b;if(!Be&&h in f)return f[h];switch(h){case Qi:return function(){return new t(this,h)};case fe:return function(){return new t(this,h)};case Bi:return function(){return new t(this,h)}}return function(){return new t(this)}},c=r+" Iterator",l=!1,f=e.prototype,p=f[ce]||f["@@iterator"]||o&&f[o],b=!Be&&p||s(o),d=r=="Array"&&f.entries||p,m,y,g;if(d&&(m=Vi(d.call(new e)),m!==Object.prototype&&m.next&&(!Qe&&Vi(m)!==Gi&&(Fi?Fi(m,Gi):wf(m[ce])||pt(m,ce,$i)),qf(m,c,!0,!0),Qe&&(Ui[c]=$i))),Af&&o==fe&&p&&p.name!==fe&&(!Qe&&_f?Rf(f,"name",fe):(l=!0,b=function(){return Ef(p,this)})),o)if(y={values:s(fe),keys:a?b:s(Qi),entries:s(Bi)},u)for(g in y)(Be||l||!(g in f))&&pt(f,g,y[g]);else xf({target:r,proto:!0,forced:Be||l},y);return(!Qe||u)&&f[ce]!==b&&pt(f,ce,b,{name:o}),Ui[r]=b,y}});var Xi=i((jT,Hi)=>{"use strict";Hi.exports=function(e,r){return{value:e,done:r}}});var bt=i((MT,ta)=>{"use strict";var Lf=X(),vt=rn(),Ji=Q(),ea=ho(),Cf=Z().f,Nf=Yi(),$e=Xi(),jf=ae(),Mf=N(),ra="Array Iterator",kf=ea.set,Df=ea.getterFor(ra);ta.exports=Nf(Array,"Array",function(e,r){kf(this,{type:ra,target:Lf(e),index:0,kind:r})},function(){var e=Df(this),r=e.target,t=e.kind,n=e.index++;return!r||n>=r.length?(e.target=void 0,$e(void 0,!0)):t=="keys"?$e(n,!1):t=="values"?$e(r[n],!1):$e([n,r[n]],!1)},"values");var Zi=Ji.Arguments=Ji.Array;vt("keys");vt("values");vt("entries");if(!jf&&Mf&&Zi.name!=="values")try{Cf(Zi,"name",{value:"values"})}catch(e){}});var oa=i((kT,na)=>{"use strict";var Vf=_(),Ff=Q(),Uf=Vf("iterator"),Gf=Array.prototype;na.exports=function(e){return e!==void 0&&(Ff.Array===e||Gf[Uf]===e)}});var dt=i((DT,aa)=>{"use strict";var Qf=Ge(),ia=Ae(),Bf=Ee(),$f=Q(),Wf=_(),zf=Wf("iterator");aa.exports=function(e){if(!Bf(e))return ia(e,zf)||ia(e,"@@iterator")||$f[Qf(e)]}});var ua=i((VT,sa)=>{"use strict";var Kf=V(),Yf=ie(),Hf=D(),Xf=Pe(),Jf=dt(),Zf=TypeError;sa.exports=function(e,r){var t=arguments.length<2?Jf(e):r;if(Yf(t))return Hf(Kf(t,e));throw Zf(Xf(e)+" is not iterable")}});var fa=i((FT,ca)=>{"use strict";var ep=V(),la=D(),rp=Ae();ca.exports=function(e,r,t){var n,o;la(e);try{if(n=rp(e,"return"),!n){if(r==="throw")throw t;return t}n=ep(n,e)}catch(a){o=!0,n=a}if(r==="throw")throw t;if(o)throw n;return la(n),t}});var Ta=i((UT,da)=>{"use strict";var tp=Wr(),np=V(),op=D(),ip=Pe(),ap=oa(),sp=Xr(),pa=wr(),up=ua(),lp=dt(),va=fa(),cp=TypeError,We=function(e,r){this.stopped=e,this.result=r},ba=We.prototype;da.exports=function(e,r,t){var n=t&&t.that,o=!!(t&&t.AS_ENTRIES),a=!!(t&&t.IS_RECORD),u=!!(t&&t.IS_ITERATOR),s=!!(t&&t.INTERRUPTED),c=tp(r,n),l,f,p,b,d,m,y,g=function(I){return l&&va(l,"normal",I),new We(!0,I)},h=function(I){return o?(op(I),s?c(I[0],I[1],g):c(I[0],I[1])):s?c(I,g):c(I)};if(a)l=e.iterator;else if(u)l=e;else{if(f=lp(e),!f)throw cp(ip(e)+" is not iterable");if(ap(f)){for(p=0,b=sp(e);b>p;p++)if(d=h(e[p]),d&&pa(ba,d))return d;return new We(!1)}l=up(e,f)}for(m=a?e.next:l.next;!(y=np(m,l)).done;){try{d=h(y.value)}catch(I){va(l,"throw",I)}if(typeof d=="object"&&d&&pa(ba,d))return d}return new We(!1)}});var ya=i((GT,ma)=>{"use strict";var fp=_e(),pp=Z(),vp=se();ma.exports=function(e,r,t){var n=fp(r);n in e?pp.f(e,n,vp(0,t)):e[n]=t}});var ha=i(()=>{"use strict";var bp=zr(),dp=Ta(),Tp=ya();bp({target:"Object",stat:!0},{fromEntries:function(r){var t={};return dp(r,function(n,o){Tp(t,n,o)},{AS_ENTRIES:!0}),t}})});var ga=i(($T,Ia)=>{"use strict";bt();ha();var mp=qe();Ia.exports=mp.Object.fromEntries});var xa=i((WT,Oa)=>{"use strict";Oa.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 Sa=i(()=>{"use strict";bt();var yp=xa(),hp=S(),Ip=Ge(),gp=$(),Ea=Q(),Op=_(),wa=Op("toStringTag");for(ze in yp)Tt=hp[ze],Ke=Tt&&Tt.prototype,Ke&&Ip(Ke)!==wa&&gp(Ke,wa,ze),Ea[ze]=Ea.Array;var Tt,Ke,ze});var Ra=i((YT,qa)=>{"use strict";var xp=ga();Sa();qa.exports=xp});var Aa=i((HT,Pa)=>{"use strict";var Ep=Ra();Pa.exports=Ep});var $a="__VERSION__";var E=class{constructor(){this.subscriptions=[]}unsubscribe(){let r=this.subscriptions;this.subscriptions=[],r.forEach(t=>typeof t=="function"?t():t.unsubscribe())}add(r){return this.subscriptions.push(r),this}};var L=e=>{throw new Error(`${e} is value of unexpected type`)},Wa=e=>{};var U=()=>{};var v=class{constructor(r){r&&(this._subscribe=r)}subscribe(r,t){var u;let n;t?typeof t=="function"?n={next:t,error:U}:n={next:s=>t.next(s),error:s=>{var c;return(c=t.error)==null?void 0:c.call(t,s)}}:n={next:U,error:U};let o=typeof r=="function"?{next:s=>{try{r(s)}catch(c){n.next(c)}},error:s=>n.next(s)}:{next:s=>r.next(s),error:s=>r.error?r.error(s):n.next(s)},a;try{a=this._subscribe(o)}catch(s){(u=o.error)==null||u.call(o,s)}return new E().add(()=>{switch(o.next=U,o.error=U,typeof a){case"function":a();return;case"object":a.unsubscribe();return;case"undefined":return;default:return L(a)}})}pipe(...r){return r.reduce((t,n)=>n(t),this)}_subscribe(r){}};var k=class extends v{constructor(){super();this.keyCounter=0;this.subscribers=new Map}next(t){this.subscribers.forEach(n=>n.next(t))}error(t){this.subscribers.forEach(n=>{var o;return(o=n.error)==null?void 0:o.call(n,t)})}_subscribe(t){let n=this.keyCounter++;return this.subscribers.set(n,t),new E().add(()=>this.subscribers.delete(n))}};var Ye=class{constructor(){this.log$=new k;this.logs=[];this.log=r=>{let t=de(z({},r),{timestamp:Date.now()});this.logs.push(t),this.log$.next(t)};this.getAllLogs=()=>this.logs}createCustomLog(r){return(...t)=>{let n;try{n=r(...t)}catch(o){n={message:"error in `createCustomLog`",component:"Logger"}}this.log(n)}}createComponentLog(r){return this.createCustomLog(t=>z({component:r},t))}};function za(e,r='Assertion "value is not nullable" failed'){if(e==null)throw new Error(r)}function Ka(e,r='Assertion "value is nullable" failed'){if(e!=null)throw new Error(r)}function K(e){return typeof e!="undefined"&&e!==null}function He(e){return e==null}function Ya(e,r){if(!(e!=null&&e.length))throw new Error(r)}function Ha(e,r){if(e!=null&&e.length)throw new Error(r)}var Xa=(e,r,t)=>new Promise((n,o)=>{r.addEventListener("abort",()=>{s(),l.remove()});let a=()=>{s(),o()},u=()=>{s(),n()},s=()=>{c&&clearTimeout(c),l.removeEventListener("load",u),l.removeEventListener("error",a)},c;t&&(c=window.setTimeout(a,t));let l=document.createElement("script");l.addEventListener("load",u),l.addEventListener("error",a),l.src=e,document.head.appendChild(l)});var Et,Ja=typeof((Et=window.performance)==null?void 0:Et.now)=="function"?()=>window.performance.now():()=>Date.now();var Za=(e,r)=>(...t)=>Te(void 0,null,function*(){var u;let n=r(...t),o=e.aborted,a;for(;!o&&!e.aborted;)try{let s=yield n.next(a);o=(u=s.done)!=null?u:!1,a=s.value}catch(s){yield n.throw(s)}return a});var wt=(l=>(l.Unknown="Unknown",l.Yandex="Yandex",l.Chrome="Chrome",l.Chromium="Chromium",l.Firefox="Firefox",l.Safari="Safari",l.Opera="Opera",l.Edge="Edge",l.Rest="Rest",l))(wt||{}),St=(c=>(c.Unknown="Unknown",c.Android="Android",c.iPhone="iPhone",c.iPad="iPad",c.iPod="iPod",c.RestMobile="RestMobile",c.Mac="Mac",c.Desktop="Desktop",c))(St||{}),me=()=>{let{userAgent:e}=window.navigator,r=/yabrowser/i.test(e)?"Yandex":void 0,t=/chrome|crios/i.test(e)?"Chrome":void 0,n=/chromium/i.test(e)?"Chromium":void 0,o=/firefox|fxios/i.test(e)?"Firefox":void 0,a=/webkit|safari|khtml/i.test(e)?"Safari":void 0,u=/opr\//i.test(e)?"Opera":void 0,s=/edg/i.test(e)?"Edge":void 0,c=/android/i.test(e)?"Android":void 0,l=/iphone/i.test(e)?"iPhone":void 0,f=/ipad/i.test(e)?"iPad":void 0,p=/ipod/i.test(e)?"iPod":void 0,b=/mac/i.test(e)?"Mac":void 0,d=/webOS|BlackBerry|IEMobile|Opera Mini/i.test(e)?"RestMobile":void 0;return{browser:r||o||u||s||t||n||a||"Rest",device:c||l||f||p||d||b||"Desktop"}},es=(e=!1)=>{let t=["iPhone","iPad","iPod"].includes(me().device);if(!e)return t;let{userAgent:n,maxTouchPoints:o}=window.navigator;return!!(t||/macintosh/i.test(n)&&o>0)},rs=()=>{let{userAgent:e}=window.navigator,r=e.match(/Version\/(\d+(\.\d+)?)/i);if(!r)return null;let t=r[1],n=parseFloat(t);return isNaN(n)?null:n},ts=()=>me().device==="Android",ns=()=>["Mac","iPhone","iPad","iPod"].includes(me().device),os=()=>{var e,r;return/Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test((e=navigator.appVersion)!=null?e:navigator.userAgent)||((r=navigator==null?void 0:navigator.userAgentData)==null?void 0:r.mobile)};var is=(e,{start:r=0,factor:t=2,max:n=1/0,min:o=r,random:a=0}={})=>{let u=r;return u*=xt(t,e),u*=1+(Math.random()*a*2-a),u=Math.round(u),u=Math.min(u,n),u=Math.max(u,o),u};var Je={};Ga(Je,{clear:()=>fs,get:()=>ss,has:()=>ls,isPersistent:()=>as,remove:()=>cs,set:()=>us});var O,G,Xe=`vk-videoplayer-dummy-key-${Math.random()}`,Y=()=>{if(G!==void 0)return G;try{localStorage.setItem(Xe,"test"),localStorage.removeItem(Xe),G=0}catch(e){if(e instanceof DOMException||e instanceof TypeError)try{sessionStorage.getItem(Xe),G=1}catch(r){if(r instanceof DOMException||r instanceof TypeError)G=2;else throw r}else throw e}return G===2&&(O=new Map),G},as=()=>Y()===0,ss=e=>{var t,n;let r=Y();switch(r){case 0:return(t=localStorage.getItem(e))!=null?t:void 0;case 1:return(n=sessionStorage.getItem(e))!=null?n:void 0;case 2:return O==null?void 0:O.get(e);default:L(r)}},us=(e,r)=>{let t=Y();switch(t){case 0:try{localStorage.setItem(e,r)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 1:try{sessionStorage.setItem(e,r)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 2:return void(O==null?void 0:O.set(e,r));default:L(t)}},ls=e=>{var t;let r=Y();switch(r){case 0:return e in localStorage;case 1:return e in sessionStorage;case 2:return(t=O==null?void 0:O.has(e))!=null?t:!1;default:return L(r),!1}},cs=e=>{let r=Y();switch(r){case 0:return localStorage.removeItem(e);case 1:return sessionStorage.removeItem(e);case 2:return void(O==null?void 0:O.delete(e));default:L(r)}},fs=()=>{let e=Y();switch(e){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return O==null?void 0:O.clear();default:L(e)}};var ps=()=>{let e,r;try{e=window.self!==window.top}catch(n){n instanceof DOMException&&n.name==="SecurityError"?e=!0:(e=!1,console.error(n))}try{window.location.ancestorOrigins&&(r=window.location.ancestorOrigins[window.location.ancestorOrigins.length-1])}catch(n){console.error(n)}try{!r&&document.referrer&&(r=document.referrer)}catch(n){console.error(n)}let t=r?new URL(r).hostname:void 0;return{isEmbed:e,host:t}};var Ze=(f=>(f.INVARIANT="Invariant quality",f.Q_144P="144p",f.Q_240P="240p",f.Q_360P="360p",f.Q_480P="480p",f.Q_720P="720p",f.Q_1080P="1080p",f.Q_1440P="1440p",f.Q_2160P="2160p",f.Q_4320P="4320p",f))(Ze||{});var w={"144p":{width:256,height:144},"240p":{width:428,height:240},"360p":{width:640,height:360},"480p":{width:856,height:480},"720p":{width:1280,height:720},"1080p":{width:1920,height:1080},"1440p":{width:2560,height:1440},"2160p":{width:3840,height:2160},"4320p":{width:7680,height:4320}},vs=(e,r)=>w[e].height>w[r].height,bs=(e,r)=>w[e].height>=w[r].height,er=(e,r)=>w[e].height<w[r].height,ds=(e,r)=>w[e].height<=w[r].height,Ts=e=>e.sort((r,t)=>r===t?0:r==="Invariant quality"?1:t==="Invariant quality"?-1:er(r,t)?1:-1)[0],qt=Object.keys(w).sort((e,r)=>er(e,r)?-1:1),ms=(e,r=.02)=>[...qt].find(n=>w[n].height*(1+r)>=e),ys=({width:e,height:r})=>{let t=Math.min(e,r),n=Math.max(e,r);return qt.find(o=>{let a=w[o];return a.width>=n&&a.height>=t})},hs=e=>w[e].height,rr=e=>e==="Invariant quality",Is=e=>e.every(r=>!rr(r));function gs(e){if(rr(e))throw new Error("Expected exact quality")}var Os=(e,r)=>{let t={};for(let n of Object.keys(r)){let o=r[n],a=e[n];Array.isArray(o)&&Array.isArray(a)?t[n]=a:typeof o=="object"&&typeof a=="object"?t[n]=Os(a,o):t[n]=n in e?a:o}return t};var uv=e=>{let r="";return e>=3600&&(r+=Math.floor(e/3600)+"h",e=e%3600),e>=60&&(r+=Math.floor(e/60)+"m",e=e%60),e>0&&(r+=Math.floor(e)+"s"),r};function tr(e,r=0,t){let n,o,a,u,s,c,l=0,f=!1,p=!1,b=!0,d=!r&&r!==0&&typeof window.requestAnimationFrame=="function";t&&(f=!!t.leading,p="maxWait"in t,a=t!=null&&t.maxWait?Math.max(+(t==null?void 0:t.maxWait)||0,r):a,b="trailing"in t?!!t.trailing:b);function m(T){let q=n,F=o;return n=o=void 0,l=T,u=e.apply(F,q),u}function y(T,q){return d?(s&&window.cancelAnimationFrame(s),window.requestAnimationFrame(T)):setTimeout(T,q)}function g(T){if(d){window.cancelAnimationFrame(T);return}clearTimeout(T)}function h(T){return l=T,s=y(pe,r),f?m(T):u}function I(T){let q=T-c,F=T-l,ht=r-q;return p?Math.min(ht,a-F):ht}function mt(T){let q=T-c,F=T-l;return c===void 0||q>=r||q<0||p&&F>=a}function pe(){let T=Date.now();if(mt(T))return yt(T);s=y(pe,I(T))}function yt(T){return s=void 0,b&&n?m(T):(n=o=void 0,u)}function La(){s!==void 0&&g(s),l=0,n=c=o=s=void 0}function Ca(){return s===void 0?u:yt(Date.now())}function Na(){return s!==void 0}function ve(...T){let q=Date.now(),F=mt(q);if(n=T,o=this,c=q,F){if(s===void 0)return h(c);if(p)return s=y(pe,r),m(c)}return s===void 0&&(s=y(pe,r)),u}return ve.cancel=La,ve.flush=Ca,ve.pending=Na,ve}var nr=(e,r=0,t)=>tr(e,r,de(z(z({},{leading:!0,trailing:!0}),t),{maxWait:r}));var ye=(e,r)=>{if(e===null||typeof e!="object")return e;let t=Array.isArray(e)?[]:{};for(let n in e){if(typeof r=="function"){let o=r(e[n],n,e,t);if(o!==void 0){t[n]=o;continue}}typeof e[n]=="object"?t[n]=ye(e[n],r):t[n]=e[n]}return t};var xs=e=>ye(e);var Es=300,ws=(e,r=Es)=>new v(t=>{let{width:n,height:o}=e.getBoundingClientRect();if(t.next({width:n,height:o}),!window.ResizeObserver)return;let a=new ResizeObserver(nr(u=>{let s=u[0];if(!s)return;let c,l;s.contentBoxSize&&s.contentBoxSize[0]?(l=s.contentBoxSize[0].blockSize,c=s.contentBoxSize[0].inlineSize):s.contentRect&&(c=s.contentRect.width,l=s.contentRect.height),K(c)&&K(l)&&t.next({width:c,height:l})},r));return a.observe(e),()=>a.disconnect()});var he=class extends k{constructor(t){super();this.value=t}next(t){super.next(this.value=t)}error(t){super.error(this.value=t)}getValue(){return this.value}_subscribe(t){let n=super._subscribe(t);return t.next(this.value),n}};function Rt(e){return new v(r=>{let t={},n=Object.keys(e).length,o=a=>u=>{a in t||n--,t[a]=u,n===0&&r.next(t)};return Object.entries(e).reduce((a,[u,s])=>a.add(s.subscribe(o(u))),new E)})}function Pt(...e){return new v(r=>e.reduce((t,n)=>t.add(n.subscribe(r)),new E))}var Ss=e=>new v(r=>{let t=window.setTimeout(()=>{try{r.next()}catch(n){if(r.error)r.error(n);else throw n}},e);return()=>window.clearTimeout(t)});var qs=e=>new v(r=>{let t=window.setInterval(()=>r.next(),e);return()=>{t&&(window.clearInterval(t),t=void 0)}});var Rs=e=>new v(r=>{e.forEach(t=>r.next(t))});var Ps=(e,r)=>new v(t=>{let n=o=>t.next(o);return e.addEventListener(r,n),()=>e.removeEventListener(r,n)});function At(e){return r=>new v(t=>r.subscribe(new or(t,e)))}var or=class{constructor(r,t){this.destination=r;this.size=t;this.lastValues=[]}next(r){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(r),this.destination.next(this.lastValues)}error(r){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};var As={leading:!1,trailing:!0};function _t(e,r=As){return t=>new v(n=>t.subscribe(new ir(n,e,r)))}var ir=class{constructor(r,t,n){this.destination=r;this.time=t;this.config=n}next(r){this.lastValue=r,K(this.timeout)?window.clearTimeout(this.timeout):this.config.leading&&this.destination.next(r),this.timeout=window.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(t){if(this.destination.error)this.destination.error(t);else throw t}this.timeout=void 0},this.time)}error(r){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};var _s={leading:!0,trailing:!1};function Lt(e,r=_s){return t=>new v(n=>t.subscribe(new ar(n,e,r)))}var ar=class{constructor(r,t,n){this.destination=r;this.time=t;this.config=n}next(r){this.lastValue=r,He(this.timeout)&&(this.config.leading&&this.destination.next(r),this.timeout=window.setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(r){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};function Ct(e){return r=>new v(t=>r.subscribe(new sr(t,e)))}var sr=class{constructor(r,t){this.destination=r;this.predicate=t}next(r){let t;try{t=this.predicate(r)}catch(n){throw this.error(n),n}t&&this.destination.next(r)}error(r){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};function jt(e=(r,t)=>r===t){return r=>new v(t=>r.subscribe(new ur(t,e)))}var Nt={},ur=class{constructor(r,t){this.destination=r;this.predicate=t;this.lastValue=Nt}next(r){let t;try{t=this.lastValue===Nt||!this.predicate(this.lastValue,r),this.lastValue=r}catch(n){throw this.error(n),n}t&&this.destination.next(r)}error(r){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};function Ie(e){return r=>new v(t=>r.subscribe(new lr(t,e)))}var lr=class{constructor(r,t){this.destination=r;this.mapper=t}next(r){let t;try{t=this.mapper(r)}catch(n){throw this.error(n),n}this.destination.next(t)}error(r){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};function Mt(e){return Ie(()=>e)}function kt(){return e=>new v(r=>{let t=!1,n=!1,o=e.subscribe(a=>{t||(t=!0,r.next(a)),n&&o.unsubscribe()},a=>{var u;t=!0,(u=r.error)==null||u.call(r,a),n&&o.unsubscribe()});return n=!0,t&&o.unsubscribe(),o})}function Dt(){return e=>new v(r=>e.subscribe(new cr(r)))}var cr=class{constructor(r){this.destination=r;this.hasLast=!1}next(r){let t=this.last;if(this.last=r,!this.hasLast){this.hasLast=!0;return}this.destination.next([t,r])}error(r){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};function Vt(e){return r=>new v(t=>r.subscribe(new fr(t,e)))}var fr=class{constructor(r,t){this.destination=r;this.effect=t}next(r){try{this.effect(r)}catch(t){throw this.error(t),t}this.destination.next(r)}error(r){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};var Ls=(s=>(s.NETWORK="network",s.VIDEO_PIPELINE="video_pipeline",s.EXTERNAL_API="external_api",s.PARSER="parser",s.DOM="dom",s.WTF="wtf",s.FATAL="fatal",s))(Ls||{});var ge=class{constructor(){Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}addEventListener(r,t,n){r in this.listeners||(this.listeners[r]=[]),this.listeners[r].push({callback:t,options:n})}removeEventListener(r,t){if(!(r in this.listeners))return;let n=this.listeners[r];for(let o=0,a=n.length;o<a;o++)if(n[o].callback===t){n.splice(o,1);return}}dispatchEvent(r){if(!(r.type in this.listeners))return;let n=this.listeners[r.type].slice();for(let o=0,a=n.length;o<a;o++){let u=n[o];try{u.callback.call(this,r)}catch(s){Promise.resolve().then(()=>{throw s})}u.options&&u.options.once&&this.removeEventListener(r.type,u.callback)}return!r.defaultPrevented}},H=class extends ge{constructor(){super(),this.listeners||ge.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(r){r.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,r)),super.dispatchEvent(r)}},te=class{constructor(){Object.defineProperty(this,"signal",{value:new H,writable:!0,configurable:!0})}abort(r){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 n=r;if(n===void 0)if(typeof document=="undefined")n=new Error("This operation was aborted"),n.name="AbortError";else try{n=new DOMException("signal is aborted without reason")}catch(o){n=new Error("This operation was aborted"),n.name="AbortError"}this.signal.reason=n,this.signal.dispatchEvent(t)}toString(){return"[object AbortController]"}};typeof Symbol!="undefined"&&Symbol.toStringTag&&(te.prototype[Symbol.toStringTag]="AbortController",H.prototype[Symbol.toStringTag]="AbortSignal");function Oe(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof e.Request=="function"&&!e.Request.prototype.hasOwnProperty("signal")||!e.AbortController}function pr(e){typeof e=="function"&&(e={fetch:e});let{fetch:r,Request:t=r.Request,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:o=!1}=e;if(!Oe({fetch:r,Request:t,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:o}))return{fetch:r,Request:a};let a=t;(a&&!a.prototype.hasOwnProperty("signal")||o)&&(a=function(l,f){let p;f&&f.signal&&(p=f.signal,delete f.signal);let b=new t(l,f);return p&&Object.defineProperty(b,"signal",{writable:!1,enumerable:!1,configurable:!0,value:p}),b},a.prototype=t.prototype);let u=r;return{fetch:(c,l)=>{let f=a&&a.prototype.isPrototypeOf(c)?c.signal:l?l.signal:void 0;if(f){let p;try{p=new DOMException("Aborted","AbortError")}catch(d){p=new Error("Aborted"),p.name="AbortError"}if(f.aborted)return Promise.reject(p);let b=new Promise((d,m)=>{f.addEventListener("abort",()=>m(p),{once:!0})});return l&&l.signal&&delete l.signal,Promise.race([b,u(c,l)])}return u(c,l)},Request:a}}var ne=Oe({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}),Ft=ne?pr({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}):void 0,Ut=ne?Ft.fetch:window.fetch,od=ne?Ft.Request:window.Request,id=ne?te:window.AbortController,ad=ne?H:window.AbortSignal;var _a=Ba(Aa(),1);var wp=(p=>(p.Armenian="58",p.Azerbaijani="57",p.Belarusian="114",p.English="3",p.Kazakh="97",p.Portuguese="73",p.Russian="0",p.Spanish="4",p.Ukrainian="1",p.Uzbek="65",p.Vietnamese="75",p))(wp||{}),Sp="vk.com",JT=(e,r,t)=>Te(void 0,null,function*(){let n=new URL(`https://${Sp}/js/lang-pack.js`);n.searchParams.set("format","json"),n.searchParams.set("name",r),e!==void 0&&n.searchParams.set("lang",e);let a=yield(yield Ut(n.toString())).json();return qp(a,t)}),qp=(e,r)=>(0,_a.default)(Object.entries(e.keys).map(([t,n])=>[t.substring(`${r}_`.length),Rp(n)])),Rp=e=>Array.isArray(e)?e[0]:e;var Pp=(t=>(t.RU="ru",t.EN="en",t))(Pp||{});export{wt as CurrentClientBrowser,St as CurrentClientDevice,Ls as ErrorCategory,Pp as InterfaceLanguage,Ye as Logger,v as Observable,k as Subject,E as Subscription,$a as VERSION,wp as VKNumericLanguage,he as ValueSubject,Ze as VideoQuality,Za as abortable,Xa as addScript,Is as areQualitiesExact,Ha as assertEmptyArray,L as assertNever,za as assertNonNullable,Ya as assertNotEmptyArray,Ka as assertNullable,gs as assertQualityIsExact,At as buffer,Wa as checkNever,xs as cloneDeep,ye as cloneDeepWith,Rt as combine,_t as debounce,tr as debounceFn,ps as detectEmbed,Os as fillWithDefault,Ct as filter,jt as filterChanged,Ps as fromEvent,me as getCurrentBrowser,is as getExponentialDelay,Ts as getHighestQuality,rs as getIOSVersion,qs as interval,ts as isAndroid,vs as isHigher,bs as isHigherOrEqual,es as isIOS,rr as isInvariantQuality,er as isLower,ds as isLowerOrEqual,ns as isMacLike,os as isMobile,K as isNonNullable,He as isNullable,JT as loadVKLangPack,Ie as map,Mt as mapTo,Pt as merge,U as noop,Ja as now,Rs as observableFrom,ws as observeElementSize,kt as once,Dt as pairwise,Je as safeStorage,Vt as tap,Lt as throttle,nr as throttleFn,uv as timeCodeToString,Ss as timeout,ms as videoHeightToQuality,hs as videoQualityToHeight,ys as videoSizeToQuality};
6
+ var se=Object.defineProperty,ke=Object.defineProperties;var Le=Object.getOwnPropertyDescriptors;var oe=Object.getOwnPropertySymbols;var Pe=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable;var ae=Math.pow,ie=(t,e,r)=>e in t?se(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,O=(t,e)=>{for(var r in e||(e={}))Pe.call(e,r)&&ie(t,r,e[r]);if(oe)for(var r of oe(e))Me.call(e,r)&&ie(t,r,e[r]);return t},P=(t,e)=>ke(t,Le(e));var Ne=(t,e)=>{for(var r in e)se(t,r,{get:e[r],enumerable:!0})};var M=(t,e,r)=>new Promise((n,i)=>{var s=a=>{try{o(r.next(a))}catch(p){i(p)}},l=a=>{try{o(r.throw(a))}catch(p){i(p)}},o=a=>a.done?n(a.value):Promise.resolve(a.value).then(s,l);o((r=r.apply(t,e)).next())});var Ve="1.0.37-dev.511f8223.0";var m=class{constructor(){this.subscriptions=[]}unsubscribe(){let e=this.subscriptions;this.subscriptions=[],e.forEach(r=>typeof r=="function"?r():r.unsubscribe())}add(e){return this.subscriptions.push(e),this}};var I=t=>{throw new Error(`${t} is value of unexpected type`)},Qe=t=>{};var g=()=>{};var u=class{constructor(e){e&&(this._subscribe=e)}subscribe(e,r){var l;let n;r?typeof r=="function"?n={next:r,error:g}:n={next:o=>r.next(o),error:o=>{var a;return(a=r.error)==null?void 0:a.call(r,o)}}:n={next:g,error:g};let i=typeof e=="function"?{next:o=>{try{e(o)}catch(a){n.next(a)}},error:o=>n.next(o)}:{next:o=>e.next(o),error:o=>e.error?e.error(o):n.next(o)},s;try{s=this._subscribe(i)}catch(o){(l=i.error)==null||l.call(i,o)}return new m().add(()=>{switch(i.next=g,i.error=g,typeof s){case"function":s();return;case"object":s.unsubscribe();return;case"undefined":return;default:return I(s)}})}pipe(...e){return e.reduce((r,n)=>n(r),this)}_subscribe(e){}};var x=class extends u{constructor(){super();this.keyCounter=0;this.subscribers=new Map}next(r){this.subscribers.forEach(n=>n.next(r))}error(r){this.subscribers.forEach(n=>{var i;return(i=n.error)==null?void 0:i.call(n,r)})}_subscribe(r){let n=this.keyCounter++;return this.subscribers.set(n,r),new m().add(()=>this.subscribers.delete(n))}};var D=class{constructor(){this.log$=new x;this.logs=[];this.log=e=>{let r=P(O({},e),{timestamp:Date.now()});this.logs.push(r),this.log$.next(r)};this.getAllLogs=()=>this.logs}createCustomLog(e){return(...r)=>{let n;try{n=e(...r)}catch(i){n={message:"error in `createCustomLog`",component:"Logger"}}this.log(n)}}createComponentLog(e){return this.createCustomLog(r=>O({component:e},r))}};function _e(t,e='Assertion "value is not nullable" failed'){if(t==null)throw new Error(e)}function De(t,e='Assertion "value is nullable" failed'){if(t!=null)throw new Error(e)}function w(t){return typeof t!="undefined"&&t!==null}function U(t){return t==null}function Ue(t,e){if(!(t!=null&&t.length))throw new Error(e)}function Be(t,e){if(t!=null&&t.length)throw new Error(e)}var Fe=(t,e,r)=>new Promise((n,i)=>{e.addEventListener("abort",()=>{o(),p.remove()});let s=()=>{o(),i()},l=()=>{o(),n()},o=()=>{a&&clearTimeout(a),p.removeEventListener("load",l),p.removeEventListener("error",s)},a;r&&(a=window.setTimeout(s,r));let p=document.createElement("script");p.addEventListener("load",l),p.addEventListener("error",s),p.src=t,document.head.appendChild(p)});var le,ze=typeof((le=window.performance)==null?void 0:le.now)=="function"?()=>window.performance.now():()=>Date.now();var je=(t,e)=>(...r)=>M(void 0,null,function*(){var l;let n=e(...r),i=t.aborted,s;for(;!i&&!t.aborted;)try{let o=yield n.next(s);i=(l=o.done)!=null?l:!1,s=o.value}catch(o){yield n.throw(o)}return s});var ue=(c=>(c.Unknown="Unknown",c.Yandex="Yandex",c.Chrome="Chrome",c.Chromium="Chromium",c.Firefox="Firefox",c.Safari="Safari",c.Opera="Opera",c.Edge="Edge",c.SamsungBrowser="SamsungBrowser",c.Rest="Rest",c))(ue||{}),ce=(a=>(a.Unknown="Unknown",a.Android="Android",a.iPhone="iPhone",a.iPad="iPad",a.iPod="iPod",a.RestMobile="RestMobile",a.Mac="Mac",a.Desktop="Desktop",a))(ce||{}),N=()=>{let{userAgent:t}=window.navigator,e=/yabrowser/i.test(t)?"Yandex":void 0,r=/samsungbrowser/i.test(t)?"SamsungBrowser":void 0,n=/chrome|crios/i.test(t)?"Chrome":void 0,i=/chromium/i.test(t)?"Chromium":void 0,s=/firefox|fxios/i.test(t)?"Firefox":void 0,l=/webkit|safari|khtml/i.test(t)?"Safari":void 0,o=/opr\//i.test(t)?"Opera":void 0,a=/edg/i.test(t)?"Edge":void 0,p=/android/i.test(t)?"Android":void 0,c=/iphone/i.test(t)?"iPhone":void 0,d=/ipad/i.test(t)?"iPad":void 0,S=/ipod/i.test(t)?"iPod":void 0,R=/mac/i.test(t)?"Mac":void 0,A=/webOS|BlackBerry|IEMobile|Opera Mini/i.test(t)?"RestMobile":void 0;return{browser:e||r||s||o||a||n||i||l||"Rest",device:p||c||d||S||A||R||"Desktop"}},We=(t=!1)=>{let r=["iPhone","iPad","iPod"].includes(N().device);if(!t)return r;let{userAgent:n,maxTouchPoints:i}=window.navigator;return!!(r||/macintosh/i.test(n)&&i>0)},Ge=()=>{let{userAgent:t}=window.navigator,e=t.match(/Version\/(\d+(\.\d+)?)/i);if(!e)return null;let r=e[1],n=parseFloat(r);return isNaN(n)?null:n},qe=()=>N().device==="Android",He=()=>["Mac","iPhone","iPad","iPod"].includes(N().device),Ke=()=>{var t,e;return/Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test((t=navigator.appVersion)!=null?t:navigator.userAgent)||((e=navigator==null?void 0:navigator.userAgentData)==null?void 0:e.mobile)};var $e=(t,{start:e=0,factor:r=2,max:n=1/0,min:i=e,random:s=0}={})=>{let l=e;return l*=ae(r,t),l*=1+(Math.random()*s*2-s),l=Math.round(l),l=Math.min(l,n),l=Math.max(l,i),l};var F={};Ne(F,{clear:()=>tt,get:()=>Xe,has:()=>Ze,isPersistent:()=>Ye,remove:()=>et,set:()=>Je});var f,y,B=`vk-videoplayer-dummy-key-${Math.random()}`,E=()=>{if(y!==void 0)return y;try{localStorage.setItem(B,"test"),localStorage.removeItem(B),y=0}catch(t){if(t instanceof DOMException||t instanceof TypeError)try{sessionStorage.getItem(B),y=1}catch(e){if(e instanceof DOMException||e instanceof TypeError)y=2;else throw e}else throw t}return y===2&&(f=new Map),y},Ye=()=>E()===0,Xe=t=>{var r,n;let e=E();switch(e){case 0:return(r=localStorage.getItem(t))!=null?r:void 0;case 1:return(n=sessionStorage.getItem(t))!=null?n:void 0;case 2:return f==null?void 0:f.get(t);default:I(e)}},Je=(t,e)=>{let r=E();switch(r){case 0:try{localStorage.setItem(t,e)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 1:try{sessionStorage.setItem(t,e)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 2:return void(f==null?void 0:f.set(t,e));default:I(r)}},Ze=t=>{var r;let e=E();switch(e){case 0:return t in localStorage;case 1:return t in sessionStorage;case 2:return(r=f==null?void 0:f.has(t))!=null?r:!1;default:return I(e),!1}},et=t=>{let e=E();switch(e){case 0:return localStorage.removeItem(t);case 1:return sessionStorage.removeItem(t);case 2:return void(f==null?void 0:f.delete(t));default:I(e)}},tt=()=>{let t=E();switch(t){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return f==null?void 0:f.clear();default:I(t)}};var rt=()=>{let t,e;try{t=window.self!==window.top}catch(n){n instanceof DOMException&&n.name==="SecurityError"?t=!0:(t=!1,console.error(n))}try{window.location.ancestorOrigins&&(e=window.location.ancestorOrigins[window.location.ancestorOrigins.length-1])}catch(n){console.error(n)}try{!e&&document.referrer&&(e=document.referrer)}catch(n){console.error(n)}let r=e?new URL(e).hostname:void 0;return{isEmbed:t,host:r}};var z=(c=>(c.INVARIANT="Invariant quality",c.Q_144P="144p",c.Q_240P="240p",c.Q_360P="360p",c.Q_480P="480p",c.Q_720P="720p",c.Q_1080P="1080p",c.Q_1440P="1440p",c.Q_2160P="2160p",c.Q_4320P="4320p",c))(z||{});var T={"144p":{width:256,height:144},"240p":{width:428,height:240},"360p":{width:640,height:360},"480p":{width:856,height:480},"720p":{width:1280,height:720},"1080p":{width:1920,height:1080},"1440p":{width:2560,height:1440},"2160p":{width:3840,height:2160},"4320p":{width:7680,height:4320}},nt=(t,e)=>T[t].height>T[e].height,ot=(t,e)=>T[t].height>=T[e].height,j=(t,e)=>T[t].height<T[e].height,it=(t,e)=>T[t].height<=T[e].height,st=t=>t.sort((e,r)=>e===r?0:e==="Invariant quality"?1:r==="Invariant quality"?-1:j(e,r)?1:-1)[0],pe=Object.keys(T).sort((t,e)=>j(t,e)?-1:1),at=(t,e=.02)=>[...pe].find(n=>T[n].height*(1+e)>=t),lt=({width:t,height:e})=>{let r=Math.min(t,e),n=Math.max(t,e);return pe.find(i=>{let s=T[i];return s.width>=n&&s.height>=r})},ut=t=>T[t].height,W=t=>t==="Invariant quality",ct=t=>t.every(e=>!W(e));function pt(t){if(W(t))throw new Error("Expected exact quality")}var bt=(t,e)=>{let r={};for(let n of Object.keys(e)){let i=e[n],s=t[n];Array.isArray(i)&&Array.isArray(s)?r[n]=s:typeof i=="object"&&typeof s=="object"?r[n]=bt(s,i):r[n]=n in t?s:i}return r};var sr=t=>{let e="";return t>=3600&&(e+=Math.floor(t/3600)+"h",t=t%3600),t>=60&&(e+=Math.floor(t/60)+"m",t=t%60),t>0&&(e+=Math.floor(t)+"s"),e};function G(t,e=0,r){let n,i,s,l,o,a,p=0,c=!1,d=!1,S=!0,R=!e&&e!==0&&typeof window.requestAnimationFrame=="function";r&&(c=!!r.leading,d="maxWait"in r,s=r!=null&&r.maxWait?Math.max(+(r==null?void 0:r.maxWait)||0,e):s,S="trailing"in r?!!r.trailing:S);function A(b){let v=n,h=i;return n=i=void 0,p=b,l=t.apply(h,v),l}function C(b,v){return R?(o&&window.cancelAnimationFrame(o),window.requestAnimationFrame(b)):setTimeout(b,v)}function we(b){if(R){window.cancelAnimationFrame(b);return}clearTimeout(b)}function Ee(b){return p=b,o=C(k,e),c?A(b):l}function Se(b){let v=b-a,h=b-p,ne=e-v;return d?Math.min(ne,s-h):ne}function te(b){let v=b-a,h=b-p;return a===void 0||v>=e||v<0||d&&h>=s}function k(){let b=Date.now();if(te(b))return re(b);o=C(k,Se(b))}function re(b){return o=void 0,S&&n?A(b):(n=i=void 0,l)}function Ae(){o!==void 0&&we(o),p=0,n=a=i=o=void 0}function Re(){return o===void 0?l:re(Date.now())}function Ce(){return o!==void 0}function L(...b){let v=Date.now(),h=te(v);if(n=b,i=this,a=v,h){if(o===void 0)return Ee(a);if(d)return o=C(k,e),A(a)}return o===void 0&&(o=C(k,e)),l}return L.cancel=Ae,L.flush=Re,L.pending=Ce,L}var q=(t,e=0,r)=>G(t,e,P(O(O({},{leading:!0,trailing:!0}),r),{maxWait:e}));var V=(t,e)=>{if(t===null||typeof t!="object")return t;let r=Array.isArray(t)?[]:{};for(let n in t){if(typeof e=="function"){let i=e(t[n],n,t,r);if(i!==void 0){r[n]=i;continue}}typeof t[n]=="object"?r[n]=V(t[n],e):r[n]=t[n]}return r};var dt=t=>V(t);var ft=300,mt=(t,e=ft)=>new u(r=>{let{width:n,height:i}=t.getBoundingClientRect();if(r.next({width:n,height:i}),!window.ResizeObserver)return;let s=new ResizeObserver(q(l=>{let o=l[0];if(!o)return;let a,p;o.contentBoxSize&&o.contentBoxSize[0]?(p=o.contentBoxSize[0].blockSize,a=o.contentBoxSize[0].inlineSize):o.contentRect&&(a=o.contentRect.width,p=o.contentRect.height),w(a)&&w(p)&&r.next({width:a,height:p})},e));return s.observe(t),()=>s.disconnect()});var Q=class extends x{constructor(r){super();this.value=r}next(r){super.next(this.value=r)}error(r){super.error(this.value=r)}getValue(){return this.value}_subscribe(r){let n=super._subscribe(r);return r.next(this.value),n}};function be(t){return new u(e=>{let r={},n=Object.keys(t).length,i=s=>l=>{s in r||n--,r[s]=l,n===0&&e.next(r)};return Object.entries(t).reduce((s,[l,o])=>s.add(o.subscribe(i(l))),new m)})}function de(...t){return new u(e=>t.reduce((r,n)=>r.add(n.subscribe(e)),new m))}var Tt=t=>new u(e=>{let r=window.setTimeout(()=>{try{e.next()}catch(n){if(e.error)e.error(n);else throw n}},t);return()=>window.clearTimeout(r)});var vt=t=>new u(e=>{let r=window.setInterval(()=>e.next(),t);return()=>{r&&(window.clearInterval(r),r=void 0)}});var It=t=>new u(e=>{t.forEach(r=>e.next(r))});var xt=(t,e)=>new u(r=>{let n=i=>r.next(i);return t.addEventListener(e,n),()=>t.removeEventListener(e,n)});function fe(t){return e=>new u(r=>e.subscribe(new H(r,t)))}var H=class{constructor(e,r){this.destination=e;this.size=r;this.lastValues=[]}next(e){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(e),this.destination.next(this.lastValues)}error(e){var r,n;(n=(r=this.destination).error)==null||n.call(r,e)}};var ht={leading:!1,trailing:!0};function me(t,e=ht){return r=>new u(n=>r.subscribe(new K(n,t,e)))}var K=class{constructor(e,r,n){this.destination=e;this.time=r;this.config=n}next(e){this.lastValue=e,w(this.timeout)?window.clearTimeout(this.timeout):this.config.leading&&this.destination.next(e),this.timeout=window.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(r){if(this.destination.error)this.destination.error(r);else throw r}this.timeout=void 0},this.time)}error(e){var r,n;(n=(r=this.destination).error)==null||n.call(r,e)}};var gt={leading:!0,trailing:!1};function Te(t,e=gt){return r=>new u(n=>r.subscribe(new $(n,t,e)))}var $=class{constructor(e,r,n){this.destination=e;this.time=r;this.config=n}next(e){this.lastValue=e,U(this.timeout)&&(this.config.leading&&this.destination.next(e),this.timeout=window.setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(e){var r,n;(n=(r=this.destination).error)==null||n.call(r,e)}};function ve(t){return e=>new u(r=>e.subscribe(new Y(r,t)))}var Y=class{constructor(e,r){this.destination=e;this.predicate=r}next(e){let r;try{r=this.predicate(e)}catch(n){throw this.error(n),n}r&&this.destination.next(e)}error(e){var r,n;(n=(r=this.destination).error)==null||n.call(r,e)}};function xe(t=(e,r)=>e===r){return e=>new u(r=>e.subscribe(new X(r,t)))}var Ie={},X=class{constructor(e,r){this.destination=e;this.predicate=r;this.lastValue=Ie}next(e){let r;try{r=this.lastValue===Ie||!this.predicate(this.lastValue,e),this.lastValue=e}catch(n){throw this.error(n),n}r&&this.destination.next(e)}error(e){var r,n;(n=(r=this.destination).error)==null||n.call(r,e)}};function _(t){return e=>new u(r=>e.subscribe(new J(r,t)))}var J=class{constructor(e,r){this.destination=e;this.mapper=r}next(e){let r;try{r=this.mapper(e)}catch(n){throw this.error(n),n}this.destination.next(r)}error(e){var r,n;(n=(r=this.destination).error)==null||n.call(r,e)}};function he(t){return _(()=>t)}function ge(){return t=>new u(e=>{let r=!1,n=!1,i=t.subscribe(s=>{r||(r=!0,e.next(s)),n&&i.unsubscribe()},s=>{var l;r=!0,(l=e.error)==null||l.call(e,s),n&&i.unsubscribe()});return n=!0,r&&i.unsubscribe(),i})}function ye(){return t=>new u(e=>t.subscribe(new Z(e)))}var Z=class{constructor(e){this.destination=e;this.hasLast=!1}next(e){let r=this.last;if(this.last=e,!this.hasLast){this.hasLast=!0;return}this.destination.next([r,e])}error(e){var r,n;(n=(r=this.destination).error)==null||n.call(r,e)}};function Oe(t){return e=>new u(r=>e.subscribe(new ee(r,t)))}var ee=class{constructor(e,r){this.destination=e;this.effect=r}next(e){try{this.effect(e)}catch(r){throw this.error(r),r}this.destination.next(e)}error(e){var r,n;(n=(r=this.destination).error)==null||n.call(r,e)}};var yt=(o=>(o.NETWORK="network",o.VIDEO_PIPELINE="video_pipeline",o.EXTERNAL_API="external_api",o.PARSER="parser",o.DOM="dom",o.WTF="wtf",o.FATAL="fatal",o))(yt||{});var Ot=(d=>(d.Armenian="58",d.Azerbaijani="57",d.Belarusian="114",d.English="3",d.Kazakh="97",d.Portuguese="73",d.Russian="0",d.Spanish="4",d.Ukrainian="1",d.Uzbek="65",d.Vietnamese="75",d))(Ot||{}),wt="vk.com",Yn=(t,e,r)=>M(void 0,null,function*(){let n=new URL(`https://${wt}/js/lang-pack.js`);n.searchParams.set("format","json"),n.searchParams.set("name",e),t!==void 0&&n.searchParams.set("lang",t);let s=yield(yield fetch(n.toString())).json();return Et(s,r)}),Et=(t,e)=>Object.fromEntries(Object.entries(t.keys).map(([r,n])=>[r.substring(`${e}_`.length),St(n)])),St=t=>Array.isArray(t)?t[0]:t;var At=(r=>(r.RU="ru",r.EN="en",r))(At||{});export{ue as CurrentClientBrowser,ce as CurrentClientDevice,yt as ErrorCategory,At as InterfaceLanguage,D as Logger,u as Observable,x as Subject,m as Subscription,Ve as VERSION,Ot as VKNumericLanguage,Q as ValueSubject,z as VideoQuality,je as abortable,Fe as addScript,ct as areQualitiesExact,Be as assertEmptyArray,I as assertNever,_e as assertNonNullable,Ue as assertNotEmptyArray,De as assertNullable,pt as assertQualityIsExact,fe as buffer,Qe as checkNever,dt as cloneDeep,V as cloneDeepWith,be as combine,me as debounce,G as debounceFn,rt as detectEmbed,bt as fillWithDefault,ve as filter,xe as filterChanged,xt as fromEvent,N as getCurrentBrowser,$e as getExponentialDelay,st as getHighestQuality,Ge as getIOSVersion,vt as interval,qe as isAndroid,nt as isHigher,ot as isHigherOrEqual,We as isIOS,W as isInvariantQuality,j as isLower,it as isLowerOrEqual,He as isMacLike,Ke as isMobile,w as isNonNullable,U as isNullable,Yn as loadVKLangPack,_ as map,he as mapTo,de as merge,g as noop,ze as now,It as observableFrom,mt as observeElementSize,ge as once,ye as pairwise,F as safeStorage,Oe as tap,Te as throttle,q as throttleFn,sr as timeCodeToString,Tt as timeout,at as videoHeightToQuality,ut as videoQualityToHeight,lt as videoSizeToQuality};
package/es2018.cjs.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @vkontakte/videoplayer-shared v1.0.37-dev.2e9cb822.0
3
- * Fri, 05 Jul 2024 08:48:33 GMT
2
+ * @vkontakte/videoplayer-shared v1.0.37-dev.511f8223.0
3
+ * Wed, 17 Jul 2024 10:03:53 GMT
4
4
  * https://st.mycdn.me/static/vkontakte-videoplayer/1-0-37/doc/
5
5
  */
6
- "use strict";var fs=Object.create;var me=Object.defineProperty;var ps=Object.getOwnPropertyDescriptor;var vs=Object.getOwnPropertyNames;var bs=Object.getPrototypeOf,ds=Object.prototype.hasOwnProperty;var i=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),At=(e,r)=>{for(var t in r)me(e,t,{get:r[t],enumerable:!0})},_t=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of vs(r))!ds.call(e,o)&&o!==t&&me(e,o,{get:()=>r[o],enumerable:!(n=ps(r,o))||n.enumerable});return e};var Ts=(e,r,t)=>(t=e!=null?fs(bs(e)):{},_t(r||!e||!e.__esModule?me(t,"default",{value:e,enumerable:!0}):t,e)),ms=e=>_t(me({},"__esModule",{value:!0}),e);var _=i((Jb,mn)=>{"use strict";mn.exports=function(e){try{return!!e()}catch(r){return!0}}});var se=i((Zb,yn)=>{"use strict";var Rs=_();yn.exports=!Rs(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var N=i((ed,gn)=>{"use strict";var hn=se(),In=Function.prototype,xr=In.call,Ps=hn&&In.bind.bind(xr,xr);gn.exports=hn?Ps:function(e){return function(){return xr.apply(e,arguments)}}});var Re=i((rd,xn)=>{"use strict";var On=N(),As=On({}.toString),_s=On("".slice);xn.exports=function(e){return _s(As(e),8,-1)}});var wn=i((td,En)=>{"use strict";var Ls=N(),Cs=_(),Ns=Re(),Er=Object,js=Ls("".split);En.exports=Cs(function(){return!Er("z").propertyIsEnumerable(0)})?function(e){return Ns(e)=="String"?js(e,""):Er(e)}:Er});var Pe=i((nd,Sn)=>{"use strict";Sn.exports=function(e){return e==null}});var wr=i((od,qn)=>{"use strict";var Ms=Pe(),ks=TypeError;qn.exports=function(e){if(Ms(e))throw ks("Can't call method on "+e);return e}});var H=i((id,Rn)=>{"use strict";var Ds=wn(),Vs=wr();Rn.exports=function(e){return Ds(Vs(e))}});var An=i((ad,Pn)=>{"use strict";Pn.exports=function(){}});var B=i((sd,_n)=>{"use strict";_n.exports={}});var S=i((Ln,Cn)=>{"use strict";var Ae=function(e){return e&&e.Math==Math&&e};Cn.exports=Ae(typeof globalThis=="object"&&globalThis)||Ae(typeof window=="object"&&window)||Ae(typeof self=="object"&&self)||Ae(typeof global=="object"&&global)||function(){return this}()||Ln||Function("return this")()});var qr=i((ud,Nn)=>{"use strict";var Sr=typeof document=="object"&&document.all,Fs=typeof Sr=="undefined"&&Sr!==void 0;Nn.exports={all:Sr,IS_HTMLDDA:Fs}});var x=i((ld,Mn)=>{"use strict";var jn=qr(),Us=jn.all;Mn.exports=jn.IS_HTMLDDA?function(e){return typeof e=="function"||e===Us}:function(e){return typeof e=="function"}});var Vn=i((cd,Dn)=>{"use strict";var Gs=S(),Qs=x(),kn=Gs.WeakMap;Dn.exports=Qs(kn)&&/native code/.test(String(kn))});var $=i((fd,Gn)=>{"use strict";var Fn=x(),Un=qr(),Bs=Un.all;Gn.exports=Un.IS_HTMLDDA?function(e){return typeof e=="object"?e!==null:Fn(e)||e===Bs}:function(e){return typeof e=="object"?e!==null:Fn(e)}});var j=i((pd,Qn)=>{"use strict";var $s=_();Qn.exports=!$s(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var Pr=i((vd,$n)=>{"use strict";var Ws=S(),Bn=$(),Rr=Ws.document,zs=Bn(Rr)&&Bn(Rr.createElement);$n.exports=function(e){return zs?Rr.createElement(e):{}}});var Ar=i((bd,Wn)=>{"use strict";var Ks=j(),Ys=_(),Hs=Pr();Wn.exports=!Ks&&!Ys(function(){return Object.defineProperty(Hs("div"),"a",{get:function(){return 7}}).a!=7})});var _r=i((dd,zn)=>{"use strict";var Xs=j(),Js=_();zn.exports=Xs&&Js(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})});var V=i((Td,Kn)=>{"use strict";var Zs=$(),eu=String,ru=TypeError;Kn.exports=function(e){if(Zs(e))return e;throw ru(eu(e)+" is not an object")}});var F=i((md,Yn)=>{"use strict";var tu=se(),_e=Function.prototype.call;Yn.exports=tu?_e.bind(_e):function(){return _e.apply(_e,arguments)}});var Le=i((yd,Hn)=>{"use strict";Hn.exports={}});var Nr=i((hd,Jn)=>{"use strict";var Lr=Le(),Cr=S(),nu=x(),Xn=function(e){return nu(e)?e:void 0};Jn.exports=function(e,r){return arguments.length<2?Xn(Lr[e])||Xn(Cr[e]):Lr[e]&&Lr[e][r]||Cr[e]&&Cr[e][r]}});var jr=i((Id,Zn)=>{"use strict";var ou=N();Zn.exports=ou({}.isPrototypeOf)});var ro=i((gd,eo)=>{"use strict";eo.exports=typeof navigator!="undefined"&&String(navigator.userAgent)||""});var uo=i((Od,so)=>{"use strict";var ao=S(),Mr=ro(),to=ao.process,no=ao.Deno,oo=to&&to.versions||no&&no.version,io=oo&&oo.v8,R,Ce;io&&(R=io.split("."),Ce=R[0]>0&&R[0]<4?1:+(R[0]+R[1]));!Ce&&Mr&&(R=Mr.match(/Edge\/(\d+)/),(!R||R[1]>=74)&&(R=Mr.match(/Chrome\/(\d+)/),R&&(Ce=+R[1])));so.exports=Ce});var kr=i((xd,co)=>{"use strict";var lo=uo(),iu=_(),au=S(),su=au.String;co.exports=!!Object.getOwnPropertySymbols&&!iu(function(){var e=Symbol();return!su(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&lo&&lo<41})});var Dr=i((Ed,fo)=>{"use strict";var uu=kr();fo.exports=uu&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Vr=i((wd,po)=>{"use strict";var lu=Nr(),cu=x(),fu=jr(),pu=Dr(),vu=Object;po.exports=pu?function(e){return typeof e=="symbol"}:function(e){var r=lu("Symbol");return cu(r)&&fu(r.prototype,vu(e))}});var Ne=i((Sd,vo)=>{"use strict";var bu=String;vo.exports=function(e){try{return bu(e)}catch(r){return"Object"}}});var ue=i((qd,bo)=>{"use strict";var du=x(),Tu=Ne(),mu=TypeError;bo.exports=function(e){if(du(e))return e;throw mu(Tu(e)+" is not a function")}});var je=i((Rd,To)=>{"use strict";var yu=ue(),hu=Pe();To.exports=function(e,r){var t=e[r];return hu(t)?void 0:yu(t)}});var yo=i((Pd,mo)=>{"use strict";var Fr=F(),Ur=x(),Gr=$(),Iu=TypeError;mo.exports=function(e,r){var t,n;if(r==="string"&&Ur(t=e.toString)&&!Gr(n=Fr(t,e))||Ur(t=e.valueOf)&&!Gr(n=Fr(t,e))||r!=="string"&&Ur(t=e.toString)&&!Gr(n=Fr(t,e)))return n;throw Iu("Can't convert object to primitive value")}});var le=i((Ad,ho)=>{"use strict";ho.exports=!0});var Oo=i((_d,go)=>{"use strict";var Io=S(),gu=Object.defineProperty;go.exports=function(e,r){try{gu(Io,e,{value:r,configurable:!0,writable:!0})}catch(t){Io[e]=r}return r}});var Qr=i((Ld,Eo)=>{"use strict";var Ou=S(),xu=Oo(),xo="__core-js_shared__",Eu=Ou[xo]||xu(xo,{});Eo.exports=Eu});var Br=i((Cd,So)=>{"use strict";var wu=le(),wo=Qr();(So.exports=function(e,r){return wo[e]||(wo[e]=r!==void 0?r:{})})("versions",[]).push({version:"3.31.0",mode:wu?"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 $r=i((Nd,qo)=>{"use strict";var Su=wr(),qu=Object;qo.exports=function(e){return qu(Su(e))}});var M=i((jd,Ro)=>{"use strict";var Ru=N(),Pu=$r(),Au=Ru({}.hasOwnProperty);Ro.exports=Object.hasOwn||function(r,t){return Au(Pu(r),t)}});var Wr=i((Md,Po)=>{"use strict";var _u=N(),Lu=0,Cu=Math.random(),Nu=_u(1 .toString);Po.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Nu(++Lu+Cu,36)}});var L=i((kd,_o)=>{"use strict";var ju=S(),Mu=Br(),Ao=M(),ku=Wr(),Du=kr(),Vu=Dr(),X=ju.Symbol,zr=Mu("wks"),Fu=Vu?X.for||X:X&&X.withoutSetter||ku;_o.exports=function(e){return Ao(zr,e)||(zr[e]=Du&&Ao(X,e)?X[e]:Fu("Symbol."+e)),zr[e]}});var jo=i((Dd,No)=>{"use strict";var Uu=F(),Lo=$(),Co=Vr(),Gu=je(),Qu=yo(),Bu=L(),$u=TypeError,Wu=Bu("toPrimitive");No.exports=function(e,r){if(!Lo(e)||Co(e))return e;var t=Gu(e,Wu),n;if(t){if(r===void 0&&(r="default"),n=Uu(t,e,r),!Lo(n)||Co(n))return n;throw $u("Can't convert object to primitive value")}return r===void 0&&(r="number"),Qu(e,r)}});var Me=i((Vd,Mo)=>{"use strict";var zu=jo(),Ku=Vr();Mo.exports=function(e){var r=zu(e,"string");return Ku(r)?r:r+""}});var J=i(Do=>{"use strict";var Yu=j(),Hu=Ar(),Xu=_r(),ke=V(),ko=Me(),Ju=TypeError,Kr=Object.defineProperty,Zu=Object.getOwnPropertyDescriptor,Yr="enumerable",Hr="configurable",Xr="writable";Do.f=Yu?Xu?function(r,t,n){if(ke(r),t=ko(t),ke(n),typeof r=="function"&&t==="prototype"&&"value"in n&&Xr in n&&!n[Xr]){var o=Zu(r,t);o&&o[Xr]&&(r[t]=n.value,n={configurable:Hr in n?n[Hr]:o[Hr],enumerable:Yr in n?n[Yr]:o[Yr],writable:!1})}return Kr(r,t,n)}:Kr:function(r,t,n){if(ke(r),t=ko(t),ke(n),Hu)try{return Kr(r,t,n)}catch(o){}if("get"in n||"set"in n)throw Ju("Accessors not supported");return"value"in n&&(r[t]=n.value),r}});var ce=i((Ud,Vo)=>{"use strict";Vo.exports=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}});var W=i((Gd,Fo)=>{"use strict";var el=j(),rl=J(),tl=ce();Fo.exports=el?function(e,r,t){return rl.f(e,r,tl(1,t))}:function(e,r,t){return e[r]=t,e}});var De=i((Qd,Go)=>{"use strict";var nl=Br(),ol=Wr(),Uo=nl("keys");Go.exports=function(e){return Uo[e]||(Uo[e]=ol(e))}});var Ve=i((Bd,Qo)=>{"use strict";Qo.exports={}});var zo=i(($d,Wo)=>{"use strict";var il=Vn(),$o=S(),al=$(),sl=W(),Jr=M(),Zr=Qr(),ul=De(),ll=Ve(),Bo="Object already initialized",et=$o.TypeError,cl=$o.WeakMap,Fe,fe,Ue,fl=function(e){return Ue(e)?fe(e):Fe(e,{})},pl=function(e){return function(r){var t;if(!al(r)||(t=fe(r)).type!==e)throw et("Incompatible receiver, "+e+" required");return t}};il||Zr.state?(P=Zr.state||(Zr.state=new cl),P.get=P.get,P.has=P.has,P.set=P.set,Fe=function(e,r){if(P.has(e))throw et(Bo);return r.facade=e,P.set(e,r),r},fe=function(e){return P.get(e)||{}},Ue=function(e){return P.has(e)}):(z=ul("state"),ll[z]=!0,Fe=function(e,r){if(Jr(e,z))throw et(Bo);return r.facade=e,sl(e,z,r),r},fe=function(e){return Jr(e,z)?e[z]:{}},Ue=function(e){return Jr(e,z)});var P,z;Wo.exports={set:Fe,get:fe,has:Ue,enforce:fl,getterFor:pl}});var Jo=i((Wd,Xo)=>{"use strict";var vl=se(),Ho=Function.prototype,Ko=Ho.apply,Yo=Ho.call;Xo.exports=typeof Reflect=="object"&&Reflect.apply||(vl?Yo.bind(Ko):function(){return Yo.apply(Ko,arguments)})});var rt=i((zd,Zo)=>{"use strict";var bl=Re(),dl=N();Zo.exports=function(e){if(bl(e)==="Function")return dl(e)}});var ni=i(ti=>{"use strict";var ei={}.propertyIsEnumerable,ri=Object.getOwnPropertyDescriptor,Tl=ri&&!ei.call({1:2},1);ti.f=Tl?function(r){var t=ri(this,r);return!!t&&t.enumerable}:ei});var ai=i(ii=>{"use strict";var ml=j(),yl=F(),hl=ni(),Il=ce(),gl=H(),Ol=Me(),xl=M(),El=Ar(),oi=Object.getOwnPropertyDescriptor;ii.f=ml?oi:function(r,t){if(r=gl(r),t=Ol(t),El)try{return oi(r,t)}catch(n){}if(xl(r,t))return Il(!yl(hl.f,r,t),r[t])}});var ui=i((Hd,si)=>{"use strict";var wl=_(),Sl=x(),ql=/#|\.prototype\./,pe=function(e,r){var t=Pl[Rl(e)];return t==_l?!0:t==Al?!1:Sl(r)?wl(r):!!r},Rl=pe.normalize=function(e){return String(e).replace(ql,".").toLowerCase()},Pl=pe.data={},Al=pe.NATIVE="N",_l=pe.POLYFILL="P";si.exports=pe});var tt=i((Xd,ci)=>{"use strict";var li=rt(),Ll=ue(),Cl=se(),Nl=li(li.bind);ci.exports=function(e,r){return Ll(e),r===void 0?e:Cl?Nl(e,r):function(){return e.apply(r,arguments)}}});var nt=i((Jd,pi)=>{"use strict";var Ge=S(),jl=Jo(),Ml=rt(),kl=x(),Dl=ai().f,Vl=ui(),Z=Le(),Fl=tt(),ee=W(),fi=M(),Ul=function(e){var r=function(t,n,o){if(this instanceof r){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,o)}return jl(e,this,arguments)};return r.prototype=e.prototype,r};pi.exports=function(e,r){var t=e.target,n=e.global,o=e.stat,a=e.proto,u=n?Ge:o?Ge[t]:(Ge[t]||{}).prototype,s=n?Z:Z[t]||ee(Z,t,{})[t],c=s.prototype,l,f,p,b,d,m,y,g,h;for(b in r)l=Vl(n?b:t+(o?".":"#")+b,e.forced),f=!l&&u&&fi(u,b),m=s[b],f&&(e.dontCallGetSet?(h=Dl(u,b),y=h&&h.value):y=u[b]),d=f&&y?y:r[b],!(f&&typeof m==typeof d)&&(e.bind&&f?g=Fl(d,Ge):e.wrap&&f?g=Ul(d):a&&kl(d)?g=Ml(d):g=d,(e.sham||d&&d.sham||m&&m.sham)&&ee(g,"sham",!0),ee(s,b,g),a&&(p=t+"Prototype",fi(Z,p)||ee(Z,p,{}),ee(Z[p],b,d),e.real&&c&&(l||!c[b])&&ee(c,b,d)))}});var di=i((Zd,bi)=>{"use strict";var ot=j(),Gl=M(),vi=Function.prototype,Ql=ot&&Object.getOwnPropertyDescriptor,it=Gl(vi,"name"),Bl=it&&function(){}.name==="something",$l=it&&(!ot||ot&&Ql(vi,"name").configurable);bi.exports={EXISTS:it,PROPER:Bl,CONFIGURABLE:$l}});var mi=i((eT,Ti)=>{"use strict";var Wl=Math.ceil,zl=Math.floor;Ti.exports=Math.trunc||function(r){var t=+r;return(t>0?zl:Wl)(t)}});var at=i((rT,yi)=>{"use strict";var Kl=mi();yi.exports=function(e){var r=+e;return r!==r||r===0?0:Kl(r)}});var Ii=i((tT,hi)=>{"use strict";var Yl=at(),Hl=Math.max,Xl=Math.min;hi.exports=function(e,r){var t=Yl(e);return t<0?Hl(t+r,0):Xl(t,r)}});var Oi=i((nT,gi)=>{"use strict";var Jl=at(),Zl=Math.min;gi.exports=function(e){return e>0?Zl(Jl(e),9007199254740991):0}});var st=i((oT,xi)=>{"use strict";var ec=Oi();xi.exports=function(e){return ec(e.length)}});var Si=i((iT,wi)=>{"use strict";var rc=H(),tc=Ii(),nc=st(),Ei=function(e){return function(r,t,n){var o=rc(r),a=nc(o),u=tc(n,a),s;if(e&&t!=t){for(;a>u;)if(s=o[u++],s!=s)return!0}else for(;a>u;u++)if((e||u in o)&&o[u]===t)return e||u||0;return!e&&-1}};wi.exports={includes:Ei(!0),indexOf:Ei(!1)}});var Pi=i((aT,Ri)=>{"use strict";var oc=N(),ut=M(),ic=H(),ac=Si().indexOf,sc=Ve(),qi=oc([].push);Ri.exports=function(e,r){var t=ic(e),n=0,o=[],a;for(a in t)!ut(sc,a)&&ut(t,a)&&qi(o,a);for(;r.length>n;)ut(t,a=r[n++])&&(~ac(o,a)||qi(o,a));return o}});var lt=i((sT,Ai)=>{"use strict";Ai.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var Li=i((uT,_i)=>{"use strict";var uc=Pi(),lc=lt();_i.exports=Object.keys||function(r){return uc(r,lc)}});var Ni=i(Ci=>{"use strict";var cc=j(),fc=_r(),pc=J(),vc=V(),bc=H(),dc=Li();Ci.f=cc&&!fc?Object.defineProperties:function(r,t){vc(r);for(var n=bc(t),o=dc(t),a=o.length,u=0,s;a>u;)pc.f(r,s=o[u++],n[s]);return r}});var Mi=i((cT,ji)=>{"use strict";var Tc=Nr();ji.exports=Tc("document","documentElement")});var vt=i((fT,Qi)=>{"use strict";var mc=V(),yc=Ni(),ki=lt(),hc=Ve(),Ic=Mi(),gc=Pr(),Oc=De(),Di=">",Vi="<",ft="prototype",pt="script",Ui=Oc("IE_PROTO"),ct=function(){},Gi=function(e){return Vi+pt+Di+e+Vi+"/"+pt+Di},Fi=function(e){e.write(Gi("")),e.close();var r=e.parentWindow.Object;return e=null,r},xc=function(){var e=gc("iframe"),r="java"+pt+":",t;return e.style.display="none",Ic.appendChild(e),e.src=String(r),t=e.contentWindow.document,t.open(),t.write(Gi("document.F=Object")),t.close(),t.F},Qe,Be=function(){try{Qe=new ActiveXObject("htmlfile")}catch(r){}Be=typeof document!="undefined"?document.domain&&Qe?Fi(Qe):xc():Fi(Qe);for(var e=ki.length;e--;)delete Be[ft][ki[e]];return Be()};hc[Ui]=!0;Qi.exports=Object.create||function(r,t){var n;return r!==null?(ct[ft]=mc(r),n=new ct,ct[ft]=null,n[Ui]=r):n=Be(),t===void 0?n:yc.f(n,t)}});var $i=i((pT,Bi)=>{"use strict";var Ec=_();Bi.exports=!Ec(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})});var dt=i((vT,zi)=>{"use strict";var wc=M(),Sc=x(),qc=$r(),Rc=De(),Pc=$i(),Wi=Rc("IE_PROTO"),bt=Object,Ac=bt.prototype;zi.exports=Pc?bt.getPrototypeOf:function(e){var r=qc(e);if(wc(r,Wi))return r[Wi];var t=r.constructor;return Sc(t)&&r instanceof t?t.prototype:r instanceof bt?Ac:null}});var Tt=i((bT,Ki)=>{"use strict";var _c=W();Ki.exports=function(e,r,t,n){return n&&n.enumerable?e[r]=t:_c(e,r,t),e}});var It=i((dT,Xi)=>{"use strict";var Lc=_(),Cc=x(),Nc=$(),jc=vt(),Yi=dt(),Mc=Tt(),kc=L(),Dc=le(),ht=kc("iterator"),Hi=!1,k,mt,yt;[].keys&&(yt=[].keys(),"next"in yt?(mt=Yi(Yi(yt)),mt!==Object.prototype&&(k=mt)):Hi=!0);var Vc=!Nc(k)||Lc(function(){var e={};return k[ht].call(e)!==e});Vc?k={}:Dc&&(k=jc(k));Cc(k[ht])||Mc(k,ht,function(){return this});Xi.exports={IteratorPrototype:k,BUGGY_SAFARI_ITERATORS:Hi}});var $e=i((TT,Zi)=>{"use strict";var Fc=L(),Uc=Fc("toStringTag"),Ji={};Ji[Uc]="z";Zi.exports=String(Ji)==="[object z]"});var ze=i((mT,ea)=>{"use strict";var Gc=$e(),Qc=x(),We=Re(),Bc=L(),$c=Bc("toStringTag"),Wc=Object,zc=We(function(){return arguments}())=="Arguments",Kc=function(e,r){try{return e[r]}catch(t){}};ea.exports=Gc?We:function(e){var r,t,n;return e===void 0?"Undefined":e===null?"Null":typeof(t=Kc(r=Wc(e),$c))=="string"?t:zc?We(r):(n=We(r))=="Object"&&Qc(r.callee)?"Arguments":n}});var ta=i((yT,ra)=>{"use strict";var Yc=$e(),Hc=ze();ra.exports=Yc?{}.toString:function(){return"[object "+Hc(this)+"]"}});var gt=i((hT,oa)=>{"use strict";var Xc=$e(),Jc=J().f,Zc=W(),ef=M(),rf=ta(),tf=L(),na=tf("toStringTag");oa.exports=function(e,r,t,n){if(e){var o=t?e:e.prototype;ef(o,na)||Jc(o,na,{configurable:!0,value:r}),n&&!Xc&&Zc(o,"toString",rf)}}});var aa=i((IT,ia)=>{"use strict";var nf=It().IteratorPrototype,of=vt(),af=ce(),sf=gt(),uf=B(),lf=function(){return this};ia.exports=function(e,r,t,n){var o=r+" Iterator";return e.prototype=of(nf,{next:af(+!n,t)}),sf(e,o,!1,!0),uf[o]=lf,e}});var ua=i((gT,sa)=>{"use strict";var cf=N(),ff=ue();sa.exports=function(e,r,t){try{return cf(ff(Object.getOwnPropertyDescriptor(e,r)[t]))}catch(n){}}});var ca=i((OT,la)=>{"use strict";var pf=x(),vf=String,bf=TypeError;la.exports=function(e){if(typeof e=="object"||pf(e))return e;throw bf("Can't set "+vf(e)+" as a prototype")}});var pa=i((xT,fa)=>{"use strict";var df=ua(),Tf=V(),mf=ca();fa.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,r={},t;try{t=df(Object.prototype,"__proto__","set"),t(r,[]),e=r instanceof Array}catch(n){}return function(o,a){return Tf(o),mf(a),e?t(o,a):o.__proto__=a,o}}():void 0)});var xa=i((ET,Oa)=>{"use strict";var yf=nt(),hf=F(),Ke=le(),Ia=di(),If=x(),gf=aa(),va=dt(),ba=pa(),Of=gt(),xf=W(),Ot=Tt(),Ef=L(),da=B(),ga=It(),wf=Ia.PROPER,Sf=Ia.CONFIGURABLE,Ta=ga.IteratorPrototype,Ye=ga.BUGGY_SAFARI_ITERATORS,ve=Ef("iterator"),ma="keys",be="values",ya="entries",ha=function(){return this};Oa.exports=function(e,r,t,n,o,a,u){gf(t,r,n);var s=function(h){if(h===o&&b)return b;if(!Ye&&h in f)return f[h];switch(h){case ma:return function(){return new t(this,h)};case be:return function(){return new t(this,h)};case ya:return function(){return new t(this,h)}}return function(){return new t(this)}},c=r+" Iterator",l=!1,f=e.prototype,p=f[ve]||f["@@iterator"]||o&&f[o],b=!Ye&&p||s(o),d=r=="Array"&&f.entries||p,m,y,g;if(d&&(m=va(d.call(new e)),m!==Object.prototype&&m.next&&(!Ke&&va(m)!==Ta&&(ba?ba(m,Ta):If(m[ve])||Ot(m,ve,ha)),Of(m,c,!0,!0),Ke&&(da[c]=ha))),wf&&o==be&&p&&p.name!==be&&(!Ke&&Sf?xf(f,"name",be):(l=!0,b=function(){return hf(p,this)})),o)if(y={values:s(be),keys:a?b:s(ma),entries:s(ya)},u)for(g in y)(Ye||l||!(g in f))&&Ot(f,g,y[g]);else yf({target:r,proto:!0,forced:Ye||l},y);return(!Ke||u)&&f[ve]!==b&&Ot(f,ve,b,{name:o}),da[r]=b,y}});var wa=i((wT,Ea)=>{"use strict";Ea.exports=function(e,r){return{value:e,done:r}}});var Et=i((ST,Aa)=>{"use strict";var qf=H(),xt=An(),Sa=B(),Ra=zo(),Rf=J().f,Pf=xa(),He=wa(),Af=le(),_f=j(),Pa="Array Iterator",Lf=Ra.set,Cf=Ra.getterFor(Pa);Aa.exports=Pf(Array,"Array",function(e,r){Lf(this,{type:Pa,target:qf(e),index:0,kind:r})},function(){var e=Cf(this),r=e.target,t=e.kind,n=e.index++;return!r||n>=r.length?(e.target=void 0,He(void 0,!0)):t=="keys"?He(n,!1):t=="values"?He(r[n],!1):He([n,r[n]],!1)},"values");var qa=Sa.Arguments=Sa.Array;xt("keys");xt("values");xt("entries");if(!Af&&_f&&qa.name!=="values")try{Rf(qa,"name",{value:"values"})}catch(e){}});var La=i((qT,_a)=>{"use strict";var Nf=L(),jf=B(),Mf=Nf("iterator"),kf=Array.prototype;_a.exports=function(e){return e!==void 0&&(jf.Array===e||kf[Mf]===e)}});var wt=i((RT,Na)=>{"use strict";var Df=ze(),Ca=je(),Vf=Pe(),Ff=B(),Uf=L(),Gf=Uf("iterator");Na.exports=function(e){if(!Vf(e))return Ca(e,Gf)||Ca(e,"@@iterator")||Ff[Df(e)]}});var Ma=i((PT,ja)=>{"use strict";var Qf=F(),Bf=ue(),$f=V(),Wf=Ne(),zf=wt(),Kf=TypeError;ja.exports=function(e,r){var t=arguments.length<2?zf(e):r;if(Bf(t))return $f(Qf(t,e));throw Kf(Wf(e)+" is not iterable")}});var Va=i((AT,Da)=>{"use strict";var Yf=F(),ka=V(),Hf=je();Da.exports=function(e,r,t){var n,o;ka(e);try{if(n=Hf(e,"return"),!n){if(r==="throw")throw t;return t}n=Yf(n,e)}catch(a){o=!0,n=a}if(r==="throw")throw t;if(o)throw n;return ka(n),t}});var Ba=i((_T,Qa)=>{"use strict";var Xf=tt(),Jf=F(),Zf=V(),ep=Ne(),rp=La(),tp=st(),Fa=jr(),np=Ma(),op=wt(),Ua=Va(),ip=TypeError,Xe=function(e,r){this.stopped=e,this.result=r},Ga=Xe.prototype;Qa.exports=function(e,r,t){var n=t&&t.that,o=!!(t&&t.AS_ENTRIES),a=!!(t&&t.IS_RECORD),u=!!(t&&t.IS_ITERATOR),s=!!(t&&t.INTERRUPTED),c=Xf(r,n),l,f,p,b,d,m,y,g=function(I){return l&&Ua(l,"normal",I),new Xe(!0,I)},h=function(I){return o?(Zf(I),s?c(I[0],I[1],g):c(I[0],I[1])):s?c(I,g):c(I)};if(a)l=e.iterator;else if(u)l=e;else{if(f=op(e),!f)throw ip(ep(e)+" is not iterable");if(rp(f)){for(p=0,b=tp(e);b>p;p++)if(d=h(e[p]),d&&Fa(Ga,d))return d;return new Xe(!1)}l=np(e,f)}for(m=a?e.next:l.next;!(y=Jf(m,l)).done;){try{d=h(y.value)}catch(I){Ua(l,"throw",I)}if(typeof d=="object"&&d&&Fa(Ga,d))return d}return new Xe(!1)}});var Wa=i((LT,$a)=>{"use strict";var ap=Me(),sp=J(),up=ce();$a.exports=function(e,r,t){var n=ap(r);n in e?sp.f(e,n,up(0,t)):e[n]=t}});var za=i(()=>{"use strict";var lp=nt(),cp=Ba(),fp=Wa();lp({target:"Object",stat:!0},{fromEntries:function(r){var t={};return cp(r,function(n,o){fp(t,n,o)},{AS_ENTRIES:!0}),t}})});var Ya=i((jT,Ka)=>{"use strict";Et();za();var pp=Le();Ka.exports=pp.Object.fromEntries});var Xa=i((MT,Ha)=>{"use strict";Ha.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 es=i(()=>{"use strict";Et();var vp=Xa(),bp=S(),dp=ze(),Tp=W(),Ja=B(),mp=L(),Za=mp("toStringTag");for(Je in vp)St=bp[Je],Ze=St&&St.prototype,Ze&&dp(Ze)!==Za&&Tp(Ze,Za,Je),Ja[Je]=Ja.Array;var St,Ze,Je});var ts=i((VT,rs)=>{"use strict";var yp=Ya();es();rs.exports=yp});var os=i((FT,ns)=>{"use strict";var hp=ts();ns.exports=hp});var Ep={};At(Ep,{CurrentClientBrowser:()=>er,CurrentClientDevice:()=>rr,ErrorCategory:()=>bn,InterfaceLanguage:()=>ss,Logger:()=>ye,Observable:()=>v,Subject:()=>C,Subscription:()=>E,VERSION:()=>Lt,VKNumericLanguage:()=>as,ValueSubject:()=>ne,VideoQuality:()=>ge,abortable:()=>Ut,addScript:()=>Dt,areQualitiesExact:()=>nn,assertEmptyArray:()=>kt,assertNever:()=>A,assertNonNullable:()=>Nt,assertNotEmptyArray:()=>Mt,assertNullable:()=>jt,assertQualityIsExact:()=>on,buffer:()=>ar,checkNever:()=>Ct,cloneDeep:()=>sn,cloneDeepWith:()=>te,combine:()=>nr,debounce:()=>ur,debounceFn:()=>Ee,detectEmbed:()=>Kt,fillWithDefault:()=>an,filter:()=>pr,filterChanged:()=>br,fromEvent:()=>pn,getCurrentBrowser:()=>re,getExponentialDelay:()=>zt,getHighestQuality:()=>Jt,getIOSVersion:()=>Qt,interval:()=>cn,isAndroid:()=>Bt,isHigher:()=>Yt,isHigherOrEqual:()=>Ht,isIOS:()=>Gt,isInvariantQuality:()=>xe,isLower:()=>Oe,isLowerOrEqual:()=>Xt,isMacLike:()=>$t,isMobile:()=>Wt,isNonNullable:()=>G,isNullable:()=>he,loadVKLangPack:()=>gp,map:()=>oe,mapTo:()=>Tr,merge:()=>or,noop:()=>D,now:()=>Ft,observableFrom:()=>fn,observeElementSize:()=>un,once:()=>mr,pairwise:()=>hr,safeStorage:()=>Ie,tap:()=>gr,throttle:()=>cr,throttleFn:()=>we,timeCodeToString:()=>Es,timeout:()=>ln,videoHeightToQuality:()=>en,videoQualityToHeight:()=>tn,videoSizeToQuality:()=>rn});module.exports=ms(Ep);var Lt="__VERSION__";var E=class{constructor(){this.subscriptions=[]}unsubscribe(){let r=this.subscriptions;this.subscriptions=[],r.forEach(t=>typeof t=="function"?t():t.unsubscribe())}add(r){return this.subscriptions.push(r),this}};var A=e=>{throw new Error(`${e} is value of unexpected type`)},Ct=e=>{};var D=()=>{};var v=class{constructor(r){r&&(this._subscribe=r)}subscribe(r,t){var u;let n;t?typeof t=="function"?n={next:t,error:D}:n={next:s=>t.next(s),error:s=>{var c;return(c=t.error)==null?void 0:c.call(t,s)}}:n={next:D,error:D};let o=typeof r=="function"?{next:s=>{try{r(s)}catch(c){n.next(c)}},error:s=>n.next(s)}:{next:s=>r.next(s),error:s=>r.error?r.error(s):n.next(s)},a;try{a=this._subscribe(o)}catch(s){(u=o.error)==null||u.call(o,s)}return new E().add(()=>{switch(o.next=D,o.error=D,typeof a){case"function":a();return;case"object":a.unsubscribe();return;case"undefined":return;default:return A(a)}})}pipe(...r){return r.reduce((t,n)=>n(t),this)}_subscribe(r){}};var C=class extends v{constructor(){super();this.keyCounter=0;this.subscribers=new Map}next(t){this.subscribers.forEach(n=>n.next(t))}error(t){this.subscribers.forEach(n=>{var o;return(o=n.error)==null?void 0:o.call(n,t)})}_subscribe(t){let n=this.keyCounter++;return this.subscribers.set(n,t),new E().add(()=>this.subscribers.delete(n))}};var ye=class{constructor(){this.log$=new C;this.logs=[];this.log=r=>{let t={...r,timestamp:Date.now()};this.logs.push(t),this.log$.next(t)};this.getAllLogs=()=>this.logs}createCustomLog(r){return(...t)=>{let n;try{n=r(...t)}catch(o){n={message:"error in `createCustomLog`",component:"Logger"}}this.log(n)}}createComponentLog(r){return this.createCustomLog(t=>({component:r,...t}))}};function Nt(e,r='Assertion "value is not nullable" failed'){if(e==null)throw new Error(r)}function jt(e,r='Assertion "value is nullable" failed'){if(e!=null)throw new Error(r)}function G(e){return typeof e!="undefined"&&e!==null}function he(e){return e==null}function Mt(e,r){if(!(e!=null&&e.length))throw new Error(r)}function kt(e,r){if(e!=null&&e.length)throw new Error(r)}var Dt=(e,r,t)=>new Promise((n,o)=>{r.addEventListener("abort",()=>{s(),l.remove()});let a=()=>{s(),o()},u=()=>{s(),n()},s=()=>{c&&clearTimeout(c),l.removeEventListener("load",u),l.removeEventListener("error",a)},c;t&&(c=window.setTimeout(a,t));let l=document.createElement("script");l.addEventListener("load",u),l.addEventListener("error",a),l.src=e,document.head.appendChild(l)});var Vt,Ft=typeof((Vt=window.performance)==null?void 0:Vt.now)=="function"?()=>window.performance.now():()=>Date.now();var Ut=(e,r)=>async(...t)=>{var u;let n=r(...t),o=e.aborted,a;for(;!o&&!e.aborted;)try{let s=await n.next(a);o=(u=s.done)!=null?u:!1,a=s.value}catch(s){await n.throw(s)}return a};var er=(l=>(l.Unknown="Unknown",l.Yandex="Yandex",l.Chrome="Chrome",l.Chromium="Chromium",l.Firefox="Firefox",l.Safari="Safari",l.Opera="Opera",l.Edge="Edge",l.Rest="Rest",l))(er||{}),rr=(c=>(c.Unknown="Unknown",c.Android="Android",c.iPhone="iPhone",c.iPad="iPad",c.iPod="iPod",c.RestMobile="RestMobile",c.Mac="Mac",c.Desktop="Desktop",c))(rr||{}),re=()=>{let{userAgent:e}=window.navigator,r=/yabrowser/i.test(e)?"Yandex":void 0,t=/chrome|crios/i.test(e)?"Chrome":void 0,n=/chromium/i.test(e)?"Chromium":void 0,o=/firefox|fxios/i.test(e)?"Firefox":void 0,a=/webkit|safari|khtml/i.test(e)?"Safari":void 0,u=/opr\//i.test(e)?"Opera":void 0,s=/edg/i.test(e)?"Edge":void 0,c=/android/i.test(e)?"Android":void 0,l=/iphone/i.test(e)?"iPhone":void 0,f=/ipad/i.test(e)?"iPad":void 0,p=/ipod/i.test(e)?"iPod":void 0,b=/mac/i.test(e)?"Mac":void 0,d=/webOS|BlackBerry|IEMobile|Opera Mini/i.test(e)?"RestMobile":void 0;return{browser:r||o||u||s||t||n||a||"Rest",device:c||l||f||p||d||b||"Desktop"}},Gt=(e=!1)=>{let t=["iPhone","iPad","iPod"].includes(re().device);if(!e)return t;let{userAgent:n,maxTouchPoints:o}=window.navigator;return!!(t||/macintosh/i.test(n)&&o>0)},Qt=()=>{let{userAgent:e}=window.navigator,r=e.match(/Version\/(\d+(\.\d+)?)/i);if(!r)return null;let t=r[1],n=parseFloat(t);return isNaN(n)?null:n},Bt=()=>re().device==="Android",$t=()=>["Mac","iPhone","iPad","iPod"].includes(re().device),Wt=()=>{var e,r;return/Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test((e=navigator.appVersion)!=null?e:navigator.userAgent)||((r=navigator==null?void 0:navigator.userAgentData)==null?void 0:r.mobile)};var zt=(e,{start:r=0,factor:t=2,max:n=1/0,min:o=r,random:a=0}={})=>{let u=r;return u*=t**e,u*=1+(Math.random()*a*2-a),u=Math.round(u),u=Math.min(u,n),u=Math.max(u,o),u};var Ie={};At(Ie,{clear:()=>xs,get:()=>hs,has:()=>gs,isPersistent:()=>ys,remove:()=>Os,set:()=>Is});var O,Q,tr=`vk-videoplayer-dummy-key-${Math.random()}`,K=()=>{if(Q!==void 0)return Q;try{localStorage.setItem(tr,"test"),localStorage.removeItem(tr),Q=0}catch(e){if(e instanceof DOMException||e instanceof TypeError)try{sessionStorage.getItem(tr),Q=1}catch(r){if(r instanceof DOMException||r instanceof TypeError)Q=2;else throw r}else throw e}return Q===2&&(O=new Map),Q},ys=()=>K()===0,hs=e=>{var t,n;let r=K();switch(r){case 0:return(t=localStorage.getItem(e))!=null?t:void 0;case 1:return(n=sessionStorage.getItem(e))!=null?n:void 0;case 2:return O==null?void 0:O.get(e);default:A(r)}},Is=(e,r)=>{let t=K();switch(t){case 0:try{localStorage.setItem(e,r)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 1:try{sessionStorage.setItem(e,r)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 2:return void(O==null?void 0:O.set(e,r));default:A(t)}},gs=e=>{var t;let r=K();switch(r){case 0:return e in localStorage;case 1:return e in sessionStorage;case 2:return(t=O==null?void 0:O.has(e))!=null?t:!1;default:return A(r),!1}},Os=e=>{let r=K();switch(r){case 0:return localStorage.removeItem(e);case 1:return sessionStorage.removeItem(e);case 2:return void(O==null?void 0:O.delete(e));default:A(r)}},xs=()=>{let e=K();switch(e){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return O==null?void 0:O.clear();default:A(e)}};var Kt=()=>{let e,r;try{e=window.self!==window.top}catch(n){n instanceof DOMException&&n.name==="SecurityError"?e=!0:(e=!1,console.error(n))}try{window.location.ancestorOrigins&&(r=window.location.ancestorOrigins[window.location.ancestorOrigins.length-1])}catch(n){console.error(n)}try{!r&&document.referrer&&(r=document.referrer)}catch(n){console.error(n)}let t=r?new URL(r).hostname:void 0;return{isEmbed:e,host:t}};var ge=(f=>(f.INVARIANT="Invariant quality",f.Q_144P="144p",f.Q_240P="240p",f.Q_360P="360p",f.Q_480P="480p",f.Q_720P="720p",f.Q_1080P="1080p",f.Q_1440P="1440p",f.Q_2160P="2160p",f.Q_4320P="4320p",f))(ge||{});var w={"144p":{width:256,height:144},"240p":{width:428,height:240},"360p":{width:640,height:360},"480p":{width:856,height:480},"720p":{width:1280,height:720},"1080p":{width:1920,height:1080},"1440p":{width:2560,height:1440},"2160p":{width:3840,height:2160},"4320p":{width:7680,height:4320}},Yt=(e,r)=>w[e].height>w[r].height,Ht=(e,r)=>w[e].height>=w[r].height,Oe=(e,r)=>w[e].height<w[r].height,Xt=(e,r)=>w[e].height<=w[r].height,Jt=e=>e.sort((r,t)=>r===t?0:r==="Invariant quality"?1:t==="Invariant quality"?-1:Oe(r,t)?1:-1)[0],Zt=Object.keys(w).sort((e,r)=>Oe(e,r)?-1:1),en=(e,r=.02)=>[...Zt].find(n=>w[n].height*(1+r)>=e),rn=({width:e,height:r})=>{let t=Math.min(e,r),n=Math.max(e,r);return Zt.find(o=>{let a=w[o];return a.width>=n&&a.height>=t})},tn=e=>w[e].height,xe=e=>e==="Invariant quality",nn=e=>e.every(r=>!xe(r));function on(e){if(xe(e))throw new Error("Expected exact quality")}var an=(e,r)=>{let t={};for(let n of Object.keys(r)){let o=r[n],a=e[n];Array.isArray(o)&&Array.isArray(a)?t[n]=a:typeof o=="object"&&typeof a=="object"?t[n]=an(a,o):t[n]=n in e?a:o}return t};var Es=e=>{let r="";return e>=3600&&(r+=Math.floor(e/3600)+"h",e=e%3600),e>=60&&(r+=Math.floor(e/60)+"m",e=e%60),e>0&&(r+=Math.floor(e)+"s"),r};function Ee(e,r=0,t){let n,o,a,u,s,c,l=0,f=!1,p=!1,b=!0,d=!r&&r!==0&&typeof window.requestAnimationFrame=="function";t&&(f=!!t.leading,p="maxWait"in t,a=t!=null&&t.maxWait?Math.max(+(t==null?void 0:t.maxWait)||0,r):a,b="trailing"in t?!!t.trailing:b);function m(T){let q=n,U=o;return n=o=void 0,l=T,u=e.apply(U,q),u}function y(T,q){return d?(s&&window.cancelAnimationFrame(s),window.requestAnimationFrame(T)):setTimeout(T,q)}function g(T){if(d){window.cancelAnimationFrame(T);return}clearTimeout(T)}function h(T){return l=T,s=y(de,r),f?m(T):u}function I(T){let q=T-c,U=T-l,Pt=r-q;return p?Math.min(Pt,a-U):Pt}function qt(T){let q=T-c,U=T-l;return c===void 0||q>=r||q<0||p&&U>=a}function de(){let T=Date.now();if(qt(T))return Rt(T);s=y(de,I(T))}function Rt(T){return s=void 0,b&&n?m(T):(n=o=void 0,u)}function us(){s!==void 0&&g(s),l=0,n=c=o=s=void 0}function ls(){return s===void 0?u:Rt(Date.now())}function cs(){return s!==void 0}function Te(...T){let q=Date.now(),U=qt(q);if(n=T,o=this,c=q,U){if(s===void 0)return h(c);if(p)return s=y(de,r),m(c)}return s===void 0&&(s=y(de,r)),u}return Te.cancel=us,Te.flush=ls,Te.pending=cs,Te}var we=(e,r=0,t)=>Ee(e,r,{...{leading:!0,trailing:!0},...t,maxWait:r});var te=(e,r)=>{if(e===null||typeof e!="object")return e;let t=Array.isArray(e)?[]:{};for(let n in e){if(typeof r=="function"){let o=r(e[n],n,e,t);if(o!==void 0){t[n]=o;continue}}typeof e[n]=="object"?t[n]=te(e[n],r):t[n]=e[n]}return t};var sn=e=>te(e);var ws=300,un=(e,r=ws)=>new v(t=>{let{width:n,height:o}=e.getBoundingClientRect();if(t.next({width:n,height:o}),!window.ResizeObserver)return;let a=new ResizeObserver(we(u=>{let s=u[0];if(!s)return;let c,l;s.contentBoxSize&&s.contentBoxSize[0]?(l=s.contentBoxSize[0].blockSize,c=s.contentBoxSize[0].inlineSize):s.contentRect&&(c=s.contentRect.width,l=s.contentRect.height),G(c)&&G(l)&&t.next({width:c,height:l})},r));return a.observe(e),()=>a.disconnect()});var ne=class extends C{constructor(t){super();this.value=t}next(t){super.next(this.value=t)}error(t){super.error(this.value=t)}getValue(){return this.value}_subscribe(t){let n=super._subscribe(t);return t.next(this.value),n}};function nr(e){return new v(r=>{let t={},n=Object.keys(e).length,o=a=>u=>{a in t||n--,t[a]=u,n===0&&r.next(t)};return Object.entries(e).reduce((a,[u,s])=>a.add(s.subscribe(o(u))),new E)})}function or(...e){return new v(r=>e.reduce((t,n)=>t.add(n.subscribe(r)),new E))}var ln=e=>new v(r=>{let t=window.setTimeout(()=>{try{r.next()}catch(n){if(r.error)r.error(n);else throw n}},e);return()=>window.clearTimeout(t)});var cn=e=>new v(r=>{let t=window.setInterval(()=>r.next(),e);return()=>{t&&(window.clearInterval(t),t=void 0)}});var fn=e=>new v(r=>{e.forEach(t=>r.next(t))});var pn=(e,r)=>new v(t=>{let n=o=>t.next(o);return e.addEventListener(r,n),()=>e.removeEventListener(r,n)});function ar(e){return r=>new v(t=>r.subscribe(new ir(t,e)))}var ir=class{constructor(r,t){this.destination=r;this.size=t;this.lastValues=[]}next(r){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(r),this.destination.next(this.lastValues)}error(r){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};var Ss={leading:!1,trailing:!0};function ur(e,r=Ss){return t=>new v(n=>t.subscribe(new sr(n,e,r)))}var sr=class{constructor(r,t,n){this.destination=r;this.time=t;this.config=n}next(r){this.lastValue=r,G(this.timeout)?window.clearTimeout(this.timeout):this.config.leading&&this.destination.next(r),this.timeout=window.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(t){if(this.destination.error)this.destination.error(t);else throw t}this.timeout=void 0},this.time)}error(r){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};var qs={leading:!0,trailing:!1};function cr(e,r=qs){return t=>new v(n=>t.subscribe(new lr(n,e,r)))}var lr=class{constructor(r,t,n){this.destination=r;this.time=t;this.config=n}next(r){this.lastValue=r,he(this.timeout)&&(this.config.leading&&this.destination.next(r),this.timeout=window.setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(r){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};function pr(e){return r=>new v(t=>r.subscribe(new fr(t,e)))}var fr=class{constructor(r,t){this.destination=r;this.predicate=t}next(r){let t;try{t=this.predicate(r)}catch(n){throw this.error(n),n}t&&this.destination.next(r)}error(r){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};function br(e=(r,t)=>r===t){return r=>new v(t=>r.subscribe(new vr(t,e)))}var vn={},vr=class{constructor(r,t){this.destination=r;this.predicate=t;this.lastValue=vn}next(r){let t;try{t=this.lastValue===vn||!this.predicate(this.lastValue,r),this.lastValue=r}catch(n){throw this.error(n),n}t&&this.destination.next(r)}error(r){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};function oe(e){return r=>new v(t=>r.subscribe(new dr(t,e)))}var dr=class{constructor(r,t){this.destination=r;this.mapper=t}next(r){let t;try{t=this.mapper(r)}catch(n){throw this.error(n),n}this.destination.next(t)}error(r){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};function Tr(e){return oe(()=>e)}function mr(){return e=>new v(r=>{let t=!1,n=!1,o=e.subscribe(a=>{t||(t=!0,r.next(a)),n&&o.unsubscribe()},a=>{var u;t=!0,(u=r.error)==null||u.call(r,a),n&&o.unsubscribe()});return n=!0,t&&o.unsubscribe(),o})}function hr(){return e=>new v(r=>e.subscribe(new yr(r)))}var yr=class{constructor(r){this.destination=r;this.hasLast=!1}next(r){let t=this.last;if(this.last=r,!this.hasLast){this.hasLast=!0;return}this.destination.next([t,r])}error(r){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};function gr(e){return r=>new v(t=>r.subscribe(new Ir(t,e)))}var Ir=class{constructor(r,t){this.destination=r;this.effect=t}next(r){try{this.effect(r)}catch(t){throw this.error(t),t}this.destination.next(r)}error(r){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};var bn=(s=>(s.NETWORK="network",s.VIDEO_PIPELINE="video_pipeline",s.EXTERNAL_API="external_api",s.PARSER="parser",s.DOM="dom",s.WTF="wtf",s.FATAL="fatal",s))(bn||{});var Se=class{constructor(){Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}addEventListener(r,t,n){r in this.listeners||(this.listeners[r]=[]),this.listeners[r].push({callback:t,options:n})}removeEventListener(r,t){if(!(r in this.listeners))return;let n=this.listeners[r];for(let o=0,a=n.length;o<a;o++)if(n[o].callback===t){n.splice(o,1);return}}dispatchEvent(r){if(!(r.type in this.listeners))return;let n=this.listeners[r.type].slice();for(let o=0,a=n.length;o<a;o++){let u=n[o];try{u.callback.call(this,r)}catch(s){Promise.resolve().then(()=>{throw s})}u.options&&u.options.once&&this.removeEventListener(r.type,u.callback)}return!r.defaultPrevented}},Y=class extends Se{constructor(){super(),this.listeners||Se.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(r){r.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,r)),super.dispatchEvent(r)}},ie=class{constructor(){Object.defineProperty(this,"signal",{value:new Y,writable:!0,configurable:!0})}abort(r){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 n=r;if(n===void 0)if(typeof document=="undefined")n=new Error("This operation was aborted"),n.name="AbortError";else try{n=new DOMException("signal is aborted without reason")}catch(o){n=new Error("This operation was aborted"),n.name="AbortError"}this.signal.reason=n,this.signal.dispatchEvent(t)}toString(){return"[object AbortController]"}};typeof Symbol!="undefined"&&Symbol.toStringTag&&(ie.prototype[Symbol.toStringTag]="AbortController",Y.prototype[Symbol.toStringTag]="AbortSignal");function qe(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof e.Request=="function"&&!e.Request.prototype.hasOwnProperty("signal")||!e.AbortController}function Or(e){typeof e=="function"&&(e={fetch:e});let{fetch:r,Request:t=r.Request,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:o=!1}=e;if(!qe({fetch:r,Request:t,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:o}))return{fetch:r,Request:a};let a=t;(a&&!a.prototype.hasOwnProperty("signal")||o)&&(a=function(l,f){let p;f&&f.signal&&(p=f.signal,delete f.signal);let b=new t(l,f);return p&&Object.defineProperty(b,"signal",{writable:!1,enumerable:!1,configurable:!0,value:p}),b},a.prototype=t.prototype);let u=r;return{fetch:(c,l)=>{let f=a&&a.prototype.isPrototypeOf(c)?c.signal:l?l.signal:void 0;if(f){let p;try{p=new DOMException("Aborted","AbortError")}catch(d){p=new Error("Aborted"),p.name="AbortError"}if(f.aborted)return Promise.reject(p);let b=new Promise((d,m)=>{f.addEventListener("abort",()=>m(p),{once:!0})});return l&&l.signal&&delete l.signal,Promise.race([b,u(c,l)])}return u(c,l)},Request:a}}var ae=qe({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}),dn=ae?Or({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}):void 0,Tn=ae?dn.fetch:window.fetch,Kb=ae?dn.Request:window.Request,Yb=ae?ie:window.AbortController,Hb=ae?Y:window.AbortSignal;var is=Ts(os(),1),as=(p=>(p.Armenian="58",p.Azerbaijani="57",p.Belarusian="114",p.English="3",p.Kazakh="97",p.Portuguese="73",p.Russian="0",p.Spanish="4",p.Ukrainian="1",p.Uzbek="65",p.Vietnamese="75",p))(as||{}),Ip="vk.com",gp=async(e,r,t)=>{let n=new URL(`https://${Ip}/js/lang-pack.js`);n.searchParams.set("format","json"),n.searchParams.set("name",r),e!==void 0&&n.searchParams.set("lang",e);let a=await(await Tn(n.toString())).json();return Op(a,t)},Op=(e,r)=>(0,is.default)(Object.entries(e.keys).map(([t,n])=>[t.substring(`${r}_`.length),xp(n)])),xp=e=>Array.isArray(e)?e[0]:e;var ss=(t=>(t.RU="ru",t.EN="en",t))(ss||{});
6
+ "use strict";var j=Object.defineProperty;var st=Object.getOwnPropertyDescriptor;var at=Object.getOwnPropertyNames;var lt=Object.prototype.hasOwnProperty;var me=(t,e)=>{for(var r in e)j(t,r,{get:e[r],enumerable:!0})},ut=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of at(e))!lt.call(t,i)&&i!==r&&j(t,i,{get:()=>e[i],enumerable:!(n=st(e,i))||n.enumerable});return t};var ct=t=>ut(j({},"__esModule",{value:!0}),t);var Et={};me(Et,{CurrentClientBrowser:()=>W,CurrentClientDevice:()=>G,ErrorCategory:()=>Xe,InterfaceLanguage:()=>Ze,Logger:()=>V,Observable:()=>a,Subject:()=>x,Subscription:()=>m,VERSION:()=>Te,VKNumericLanguage:()=>Je,ValueSubject:()=>C,VideoQuality:()=>D,abortable:()=>Ee,addScript:()=>ye,areQualitiesExact:()=>Fe,assertEmptyArray:()=>ge,assertNever:()=>I,assertNonNullable:()=>Ie,assertNotEmptyArray:()=>he,assertNullable:()=>xe,assertQualityIsExact:()=>ze,buffer:()=>Y,checkNever:()=>ve,cloneDeep:()=>We,cloneDeepWith:()=>R,combine:()=>H,debounce:()=>J,debounceFn:()=>F,detectEmbed:()=>Pe,fillWithDefault:()=>je,filter:()=>re,filterChanged:()=>oe,fromEvent:()=>$e,getCurrentBrowser:()=>A,getExponentialDelay:()=>Le,getHighestQuality:()=>Qe,getIOSVersion:()=>Ae,interval:()=>He,isAndroid:()=>Re,isHigher:()=>Me,isHigherOrEqual:()=>Ne,isIOS:()=>Se,isInvariantQuality:()=>B,isLower:()=>U,isLowerOrEqual:()=>Ve,isMacLike:()=>Ce,isMobile:()=>ke,isNonNullable:()=>y,isNullable:()=>Q,loadVKLangPack:()=>yt,map:()=>k,mapTo:()=>se,merge:()=>K,noop:()=>h,now:()=>we,observableFrom:()=>Ke,observeElementSize:()=>Ge,once:()=>ae,pairwise:()=>ue,safeStorage:()=>_,tap:()=>pe,throttle:()=>ee,throttleFn:()=>z,timeCodeToString:()=>vt,timeout:()=>qe,videoHeightToQuality:()=>De,videoQualityToHeight:()=>Be,videoSizeToQuality:()=>Ue});module.exports=ct(Et);var Te="1.0.37-dev.511f8223.0";var m=class{constructor(){this.subscriptions=[]}unsubscribe(){let e=this.subscriptions;this.subscriptions=[],e.forEach(r=>typeof r=="function"?r():r.unsubscribe())}add(e){return this.subscriptions.push(e),this}};var I=t=>{throw new Error(`${t} is value of unexpected type`)},ve=t=>{};var h=()=>{};var a=class{constructor(e){e&&(this._subscribe=e)}subscribe(e,r){var l;let n;r?typeof r=="function"?n={next:r,error:h}:n={next:o=>r.next(o),error:o=>{var u;return(u=r.error)==null?void 0:u.call(r,o)}}:n={next:h,error:h};let i=typeof e=="function"?{next:o=>{try{e(o)}catch(u){n.next(u)}},error:o=>n.next(o)}:{next:o=>e.next(o),error:o=>e.error?e.error(o):n.next(o)},s;try{s=this._subscribe(i)}catch(o){(l=i.error)==null||l.call(i,o)}return new m().add(()=>{switch(i.next=h,i.error=h,typeof s){case"function":s();return;case"object":s.unsubscribe();return;case"undefined":return;default:return I(s)}})}pipe(...e){return e.reduce((r,n)=>n(r),this)}_subscribe(e){}};var x=class extends a{constructor(){super();this.keyCounter=0;this.subscribers=new Map}next(r){this.subscribers.forEach(n=>n.next(r))}error(r){this.subscribers.forEach(n=>{var i;return(i=n.error)==null?void 0:i.call(n,r)})}_subscribe(r){let n=this.keyCounter++;return this.subscribers.set(n,r),new m().add(()=>this.subscribers.delete(n))}};var V=class{constructor(){this.log$=new x;this.logs=[];this.log=e=>{let r={...e,timestamp:Date.now()};this.logs.push(r),this.log$.next(r)};this.getAllLogs=()=>this.logs}createCustomLog(e){return(...r)=>{let n;try{n=e(...r)}catch(i){n={message:"error in `createCustomLog`",component:"Logger"}}this.log(n)}}createComponentLog(e){return this.createCustomLog(r=>({component:e,...r}))}};function Ie(t,e='Assertion "value is not nullable" failed'){if(t==null)throw new Error(e)}function xe(t,e='Assertion "value is nullable" failed'){if(t!=null)throw new Error(e)}function y(t){return typeof t!="undefined"&&t!==null}function Q(t){return t==null}function he(t,e){if(!(t!=null&&t.length))throw new Error(e)}function ge(t,e){if(t!=null&&t.length)throw new Error(e)}var ye=(t,e,r)=>new Promise((n,i)=>{e.addEventListener("abort",()=>{o(),b.remove()});let s=()=>{o(),i()},l=()=>{o(),n()},o=()=>{u&&clearTimeout(u),b.removeEventListener("load",l),b.removeEventListener("error",s)},u;r&&(u=window.setTimeout(s,r));let b=document.createElement("script");b.addEventListener("load",l),b.addEventListener("error",s),b.src=t,document.head.appendChild(b)});var Oe,we=typeof((Oe=window.performance)==null?void 0:Oe.now)=="function"?()=>window.performance.now():()=>Date.now();var Ee=(t,e)=>async(...r)=>{var l;let n=e(...r),i=t.aborted,s;for(;!i&&!t.aborted;)try{let o=await n.next(s);i=(l=o.done)!=null?l:!1,s=o.value}catch(o){await n.throw(o)}return s};var W=(c=>(c.Unknown="Unknown",c.Yandex="Yandex",c.Chrome="Chrome",c.Chromium="Chromium",c.Firefox="Firefox",c.Safari="Safari",c.Opera="Opera",c.Edge="Edge",c.SamsungBrowser="SamsungBrowser",c.Rest="Rest",c))(W||{}),G=(u=>(u.Unknown="Unknown",u.Android="Android",u.iPhone="iPhone",u.iPad="iPad",u.iPod="iPod",u.RestMobile="RestMobile",u.Mac="Mac",u.Desktop="Desktop",u))(G||{}),A=()=>{let{userAgent:t}=window.navigator,e=/yabrowser/i.test(t)?"Yandex":void 0,r=/samsungbrowser/i.test(t)?"SamsungBrowser":void 0,n=/chrome|crios/i.test(t)?"Chrome":void 0,i=/chromium/i.test(t)?"Chromium":void 0,s=/firefox|fxios/i.test(t)?"Firefox":void 0,l=/webkit|safari|khtml/i.test(t)?"Safari":void 0,o=/opr\//i.test(t)?"Opera":void 0,u=/edg/i.test(t)?"Edge":void 0,b=/android/i.test(t)?"Android":void 0,c=/iphone/i.test(t)?"iPhone":void 0,d=/ipad/i.test(t)?"iPad":void 0,E=/ipod/i.test(t)?"iPod":void 0,L=/mac/i.test(t)?"Mac":void 0,S=/webOS|BlackBerry|IEMobile|Opera Mini/i.test(t)?"RestMobile":void 0;return{browser:e||r||s||o||u||n||i||l||"Rest",device:b||c||d||E||S||L||"Desktop"}},Se=(t=!1)=>{let r=["iPhone","iPad","iPod"].includes(A().device);if(!t)return r;let{userAgent:n,maxTouchPoints:i}=window.navigator;return!!(r||/macintosh/i.test(n)&&i>0)},Ae=()=>{let{userAgent:t}=window.navigator,e=t.match(/Version\/(\d+(\.\d+)?)/i);if(!e)return null;let r=e[1],n=parseFloat(r);return isNaN(n)?null:n},Re=()=>A().device==="Android",Ce=()=>["Mac","iPhone","iPad","iPod"].includes(A().device),ke=()=>{var t,e;return/Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test((t=navigator.appVersion)!=null?t:navigator.userAgent)||((e=navigator==null?void 0:navigator.userAgentData)==null?void 0:e.mobile)};var Le=(t,{start:e=0,factor:r=2,max:n=1/0,min:i=e,random:s=0}={})=>{let l=e;return l*=r**t,l*=1+(Math.random()*s*2-s),l=Math.round(l),l=Math.min(l,n),l=Math.max(l,i),l};var _={};me(_,{clear:()=>Tt,get:()=>bt,has:()=>ft,isPersistent:()=>pt,remove:()=>mt,set:()=>dt});var f,O,q=`vk-videoplayer-dummy-key-${Math.random()}`,w=()=>{if(O!==void 0)return O;try{localStorage.setItem(q,"test"),localStorage.removeItem(q),O=0}catch(t){if(t instanceof DOMException||t instanceof TypeError)try{sessionStorage.getItem(q),O=1}catch(e){if(e instanceof DOMException||e instanceof TypeError)O=2;else throw e}else throw t}return O===2&&(f=new Map),O},pt=()=>w()===0,bt=t=>{var r,n;let e=w();switch(e){case 0:return(r=localStorage.getItem(t))!=null?r:void 0;case 1:return(n=sessionStorage.getItem(t))!=null?n:void 0;case 2:return f==null?void 0:f.get(t);default:I(e)}},dt=(t,e)=>{let r=w();switch(r){case 0:try{localStorage.setItem(t,e)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 1:try{sessionStorage.setItem(t,e)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 2:return void(f==null?void 0:f.set(t,e));default:I(r)}},ft=t=>{var r;let e=w();switch(e){case 0:return t in localStorage;case 1:return t in sessionStorage;case 2:return(r=f==null?void 0:f.has(t))!=null?r:!1;default:return I(e),!1}},mt=t=>{let e=w();switch(e){case 0:return localStorage.removeItem(t);case 1:return sessionStorage.removeItem(t);case 2:return void(f==null?void 0:f.delete(t));default:I(e)}},Tt=()=>{let t=w();switch(t){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return f==null?void 0:f.clear();default:I(t)}};var Pe=()=>{let t,e;try{t=window.self!==window.top}catch(n){n instanceof DOMException&&n.name==="SecurityError"?t=!0:(t=!1,console.error(n))}try{window.location.ancestorOrigins&&(e=window.location.ancestorOrigins[window.location.ancestorOrigins.length-1])}catch(n){console.error(n)}try{!e&&document.referrer&&(e=document.referrer)}catch(n){console.error(n)}let r=e?new URL(e).hostname:void 0;return{isEmbed:t,host:r}};var D=(c=>(c.INVARIANT="Invariant quality",c.Q_144P="144p",c.Q_240P="240p",c.Q_360P="360p",c.Q_480P="480p",c.Q_720P="720p",c.Q_1080P="1080p",c.Q_1440P="1440p",c.Q_2160P="2160p",c.Q_4320P="4320p",c))(D||{});var T={"144p":{width:256,height:144},"240p":{width:428,height:240},"360p":{width:640,height:360},"480p":{width:856,height:480},"720p":{width:1280,height:720},"1080p":{width:1920,height:1080},"1440p":{width:2560,height:1440},"2160p":{width:3840,height:2160},"4320p":{width:7680,height:4320}},Me=(t,e)=>T[t].height>T[e].height,Ne=(t,e)=>T[t].height>=T[e].height,U=(t,e)=>T[t].height<T[e].height,Ve=(t,e)=>T[t].height<=T[e].height,Qe=t=>t.sort((e,r)=>e===r?0:e==="Invariant quality"?1:r==="Invariant quality"?-1:U(e,r)?1:-1)[0],_e=Object.keys(T).sort((t,e)=>U(t,e)?-1:1),De=(t,e=.02)=>[..._e].find(n=>T[n].height*(1+e)>=t),Ue=({width:t,height:e})=>{let r=Math.min(t,e),n=Math.max(t,e);return _e.find(i=>{let s=T[i];return s.width>=n&&s.height>=r})},Be=t=>T[t].height,B=t=>t==="Invariant quality",Fe=t=>t.every(e=>!B(e));function ze(t){if(B(t))throw new Error("Expected exact quality")}var je=(t,e)=>{let r={};for(let n of Object.keys(e)){let i=e[n],s=t[n];Array.isArray(i)&&Array.isArray(s)?r[n]=s:typeof i=="object"&&typeof s=="object"?r[n]=je(s,i):r[n]=n in t?s:i}return r};var vt=t=>{let e="";return t>=3600&&(e+=Math.floor(t/3600)+"h",t=t%3600),t>=60&&(e+=Math.floor(t/60)+"m",t=t%60),t>0&&(e+=Math.floor(t)+"s"),e};function F(t,e=0,r){let n,i,s,l,o,u,b=0,c=!1,d=!1,E=!0,L=!e&&e!==0&&typeof window.requestAnimationFrame=="function";r&&(c=!!r.leading,d="maxWait"in r,s=r!=null&&r.maxWait?Math.max(+(r==null?void 0:r.maxWait)||0,e):s,E="trailing"in r?!!r.trailing:E);function S(p){let v=n,g=i;return n=i=void 0,b=p,l=t.apply(g,v),l}function P(p,v){return L?(o&&window.cancelAnimationFrame(o),window.requestAnimationFrame(p)):setTimeout(p,v)}function et(p){if(L){window.cancelAnimationFrame(p);return}clearTimeout(p)}function tt(p){return b=p,o=P(M,e),c?S(p):l}function rt(p){let v=p-u,g=p-b,fe=e-v;return d?Math.min(fe,s-g):fe}function be(p){let v=p-u,g=p-b;return u===void 0||v>=e||v<0||d&&g>=s}function M(){let p=Date.now();if(be(p))return de(p);o=P(M,rt(p))}function de(p){return o=void 0,E&&n?S(p):(n=i=void 0,l)}function nt(){o!==void 0&&et(o),b=0,n=u=i=o=void 0}function ot(){return o===void 0?l:de(Date.now())}function it(){return o!==void 0}function N(...p){let v=Date.now(),g=be(v);if(n=p,i=this,u=v,g){if(o===void 0)return tt(u);if(d)return o=P(M,e),S(u)}return o===void 0&&(o=P(M,e)),l}return N.cancel=nt,N.flush=ot,N.pending=it,N}var z=(t,e=0,r)=>F(t,e,{...{leading:!0,trailing:!0},...r,maxWait:e});var R=(t,e)=>{if(t===null||typeof t!="object")return t;let r=Array.isArray(t)?[]:{};for(let n in t){if(typeof e=="function"){let i=e(t[n],n,t,r);if(i!==void 0){r[n]=i;continue}}typeof t[n]=="object"?r[n]=R(t[n],e):r[n]=t[n]}return r};var We=t=>R(t);var It=300,Ge=(t,e=It)=>new a(r=>{let{width:n,height:i}=t.getBoundingClientRect();if(r.next({width:n,height:i}),!window.ResizeObserver)return;let s=new ResizeObserver(z(l=>{let o=l[0];if(!o)return;let u,b;o.contentBoxSize&&o.contentBoxSize[0]?(b=o.contentBoxSize[0].blockSize,u=o.contentBoxSize[0].inlineSize):o.contentRect&&(u=o.contentRect.width,b=o.contentRect.height),y(u)&&y(b)&&r.next({width:u,height:b})},e));return s.observe(t),()=>s.disconnect()});var C=class extends x{constructor(r){super();this.value=r}next(r){super.next(this.value=r)}error(r){super.error(this.value=r)}getValue(){return this.value}_subscribe(r){let n=super._subscribe(r);return r.next(this.value),n}};function H(t){return new a(e=>{let r={},n=Object.keys(t).length,i=s=>l=>{s in r||n--,r[s]=l,n===0&&e.next(r)};return Object.entries(t).reduce((s,[l,o])=>s.add(o.subscribe(i(l))),new m)})}function K(...t){return new a(e=>t.reduce((r,n)=>r.add(n.subscribe(e)),new m))}var qe=t=>new a(e=>{let r=window.setTimeout(()=>{try{e.next()}catch(n){if(e.error)e.error(n);else throw n}},t);return()=>window.clearTimeout(r)});var He=t=>new a(e=>{let r=window.setInterval(()=>e.next(),t);return()=>{r&&(window.clearInterval(r),r=void 0)}});var Ke=t=>new a(e=>{t.forEach(r=>e.next(r))});var $e=(t,e)=>new a(r=>{let n=i=>r.next(i);return t.addEventListener(e,n),()=>t.removeEventListener(e,n)});function Y(t){return e=>new a(r=>e.subscribe(new $(r,t)))}var $=class{constructor(e,r){this.destination=e;this.size=r;this.lastValues=[]}next(e){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(e),this.destination.next(this.lastValues)}error(e){var r,n;(n=(r=this.destination).error)==null||n.call(r,e)}};var xt={leading:!1,trailing:!0};function J(t,e=xt){return r=>new a(n=>r.subscribe(new X(n,t,e)))}var X=class{constructor(e,r,n){this.destination=e;this.time=r;this.config=n}next(e){this.lastValue=e,y(this.timeout)?window.clearTimeout(this.timeout):this.config.leading&&this.destination.next(e),this.timeout=window.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(r){if(this.destination.error)this.destination.error(r);else throw r}this.timeout=void 0},this.time)}error(e){var r,n;(n=(r=this.destination).error)==null||n.call(r,e)}};var ht={leading:!0,trailing:!1};function ee(t,e=ht){return r=>new a(n=>r.subscribe(new Z(n,t,e)))}var Z=class{constructor(e,r,n){this.destination=e;this.time=r;this.config=n}next(e){this.lastValue=e,Q(this.timeout)&&(this.config.leading&&this.destination.next(e),this.timeout=window.setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(e){var r,n;(n=(r=this.destination).error)==null||n.call(r,e)}};function re(t){return e=>new a(r=>e.subscribe(new te(r,t)))}var te=class{constructor(e,r){this.destination=e;this.predicate=r}next(e){let r;try{r=this.predicate(e)}catch(n){throw this.error(n),n}r&&this.destination.next(e)}error(e){var r,n;(n=(r=this.destination).error)==null||n.call(r,e)}};function oe(t=(e,r)=>e===r){return e=>new a(r=>e.subscribe(new ne(r,t)))}var Ye={},ne=class{constructor(e,r){this.destination=e;this.predicate=r;this.lastValue=Ye}next(e){let r;try{r=this.lastValue===Ye||!this.predicate(this.lastValue,e),this.lastValue=e}catch(n){throw this.error(n),n}r&&this.destination.next(e)}error(e){var r,n;(n=(r=this.destination).error)==null||n.call(r,e)}};function k(t){return e=>new a(r=>e.subscribe(new ie(r,t)))}var ie=class{constructor(e,r){this.destination=e;this.mapper=r}next(e){let r;try{r=this.mapper(e)}catch(n){throw this.error(n),n}this.destination.next(r)}error(e){var r,n;(n=(r=this.destination).error)==null||n.call(r,e)}};function se(t){return k(()=>t)}function ae(){return t=>new a(e=>{let r=!1,n=!1,i=t.subscribe(s=>{r||(r=!0,e.next(s)),n&&i.unsubscribe()},s=>{var l;r=!0,(l=e.error)==null||l.call(e,s),n&&i.unsubscribe()});return n=!0,r&&i.unsubscribe(),i})}function ue(){return t=>new a(e=>t.subscribe(new le(e)))}var le=class{constructor(e){this.destination=e;this.hasLast=!1}next(e){let r=this.last;if(this.last=e,!this.hasLast){this.hasLast=!0;return}this.destination.next([r,e])}error(e){var r,n;(n=(r=this.destination).error)==null||n.call(r,e)}};function pe(t){return e=>new a(r=>e.subscribe(new ce(r,t)))}var ce=class{constructor(e,r){this.destination=e;this.effect=r}next(e){try{this.effect(e)}catch(r){throw this.error(r),r}this.destination.next(e)}error(e){var r,n;(n=(r=this.destination).error)==null||n.call(r,e)}};var Xe=(o=>(o.NETWORK="network",o.VIDEO_PIPELINE="video_pipeline",o.EXTERNAL_API="external_api",o.PARSER="parser",o.DOM="dom",o.WTF="wtf",o.FATAL="fatal",o))(Xe||{});var Je=(d=>(d.Armenian="58",d.Azerbaijani="57",d.Belarusian="114",d.English="3",d.Kazakh="97",d.Portuguese="73",d.Russian="0",d.Spanish="4",d.Ukrainian="1",d.Uzbek="65",d.Vietnamese="75",d))(Je||{}),gt="vk.com",yt=async(t,e,r)=>{let n=new URL(`https://${gt}/js/lang-pack.js`);n.searchParams.set("format","json"),n.searchParams.set("name",e),t!==void 0&&n.searchParams.set("lang",t);let s=await(await fetch(n.toString())).json();return Ot(s,r)},Ot=(t,e)=>Object.fromEntries(Object.entries(t.keys).map(([r,n])=>[r.substring(`${e}_`.length),wt(n)])),wt=t=>Array.isArray(t)?t[0]:t;var Ze=(r=>(r.RU="ru",r.EN="en",r))(Ze||{});
package/es2018.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @vkontakte/videoplayer-shared v1.0.37-dev.2e9cb822.0
3
- * Fri, 05 Jul 2024 08:48:33 GMT
2
+ * @vkontakte/videoplayer-shared v1.0.37-dev.511f8223.0
3
+ * Wed, 17 Jul 2024 10:03:53 GMT
4
4
  * https://st.mycdn.me/static/vkontakte-videoplayer/1-0-37/doc/
5
5
  */
6
- var Ra=Object.create;var $e=Object.defineProperty;var Pa=Object.getOwnPropertyDescriptor;var Aa=Object.getOwnPropertyNames;var _a=Object.getPrototypeOf,La=Object.prototype.hasOwnProperty;var i=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Ca=(e,r)=>{for(var t in r)$e(e,t,{get:r[t],enumerable:!0})},Na=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of Aa(r))!La.call(e,o)&&o!==t&&$e(e,o,{get:()=>r[o],enumerable:!(n=Pa(r,o))||n.enumerable});return e};var ja=(e,r,t)=>(t=e!=null?Ra(_a(e)):{},Na(r||!e||!e.__esModule?$e(t,"default",{value:e,enumerable:!0}):t,e));var A=i((Yb,jt)=>{"use strict";jt.exports=function(e){try{return!!e()}catch(r){return!0}}});var ne=i((Hb,Mt)=>{"use strict";var Es=A();Mt.exports=!Es(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var C=i((Xb,Vt)=>{"use strict";var kt=ne(),Dt=Function.prototype,cr=Dt.call,ws=kt&&Dt.bind.bind(cr,cr);Vt.exports=kt?ws:function(e){return function(){return cr.apply(e,arguments)}}});var he=i((Jb,Ut)=>{"use strict";var Ft=C(),Ss=Ft({}.toString),qs=Ft("".slice);Ut.exports=function(e){return qs(Ss(e),8,-1)}});var Qt=i((Zb,Gt)=>{"use strict";var Rs=C(),Ps=A(),As=he(),fr=Object,_s=Rs("".split);Gt.exports=Ps(function(){return!fr("z").propertyIsEnumerable(0)})?function(e){return As(e)=="String"?_s(e,""):fr(e)}:fr});var Ie=i((ed,Bt)=>{"use strict";Bt.exports=function(e){return e==null}});var pr=i((rd,$t)=>{"use strict";var Ls=Ie(),Cs=TypeError;$t.exports=function(e){if(Ls(e))throw Cs("Can't call method on "+e);return e}});var H=i((td,Wt)=>{"use strict";var Ns=Qt(),js=pr();Wt.exports=function(e){return Ns(js(e))}});var Kt=i((nd,zt)=>{"use strict";zt.exports=function(){}});var Q=i((od,Yt)=>{"use strict";Yt.exports={}});var S=i((Ht,Xt)=>{"use strict";var ge=function(e){return e&&e.Math==Math&&e};Xt.exports=ge(typeof globalThis=="object"&&globalThis)||ge(typeof window=="object"&&window)||ge(typeof self=="object"&&self)||ge(typeof global=="object"&&global)||function(){return this}()||Ht||Function("return this")()});var br=i((id,Jt)=>{"use strict";var vr=typeof document=="object"&&document.all,Ms=typeof vr=="undefined"&&vr!==void 0;Jt.exports={all:vr,IS_HTMLDDA:Ms}});var x=i((ad,en)=>{"use strict";var Zt=br(),ks=Zt.all;en.exports=Zt.IS_HTMLDDA?function(e){return typeof e=="function"||e===ks}:function(e){return typeof e=="function"}});var nn=i((sd,tn)=>{"use strict";var Ds=S(),Vs=x(),rn=Ds.WeakMap;tn.exports=Vs(rn)&&/native code/.test(String(rn))});var B=i((ud,sn)=>{"use strict";var on=x(),an=br(),Fs=an.all;sn.exports=an.IS_HTMLDDA?function(e){return typeof e=="object"?e!==null:on(e)||e===Fs}:function(e){return typeof e=="object"?e!==null:on(e)}});var N=i((ld,un)=>{"use strict";var Us=A();un.exports=!Us(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var Tr=i((cd,cn)=>{"use strict";var Gs=S(),ln=B(),dr=Gs.document,Qs=ln(dr)&&ln(dr.createElement);cn.exports=function(e){return Qs?dr.createElement(e):{}}});var mr=i((fd,fn)=>{"use strict";var Bs=N(),$s=A(),Ws=Tr();fn.exports=!Bs&&!$s(function(){return Object.defineProperty(Ws("div"),"a",{get:function(){return 7}}).a!=7})});var yr=i((pd,pn)=>{"use strict";var zs=N(),Ks=A();pn.exports=zs&&Ks(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})});var D=i((vd,vn)=>{"use strict";var Ys=B(),Hs=String,Xs=TypeError;vn.exports=function(e){if(Ys(e))return e;throw Xs(Hs(e)+" is not an object")}});var V=i((bd,bn)=>{"use strict";var Js=ne(),Oe=Function.prototype.call;bn.exports=Js?Oe.bind(Oe):function(){return Oe.apply(Oe,arguments)}});var xe=i((dd,dn)=>{"use strict";dn.exports={}});var gr=i((Td,mn)=>{"use strict";var hr=xe(),Ir=S(),Zs=x(),Tn=function(e){return Zs(e)?e:void 0};mn.exports=function(e,r){return arguments.length<2?Tn(hr[e])||Tn(Ir[e]):hr[e]&&hr[e][r]||Ir[e]&&Ir[e][r]}});var Or=i((md,yn)=>{"use strict";var eu=C();yn.exports=eu({}.isPrototypeOf)});var In=i((yd,hn)=>{"use strict";hn.exports=typeof navigator!="undefined"&&String(navigator.userAgent)||""});var qn=i((hd,Sn)=>{"use strict";var wn=S(),xr=In(),gn=wn.process,On=wn.Deno,xn=gn&&gn.versions||On&&On.version,En=xn&&xn.v8,R,Ee;En&&(R=En.split("."),Ee=R[0]>0&&R[0]<4?1:+(R[0]+R[1]));!Ee&&xr&&(R=xr.match(/Edge\/(\d+)/),(!R||R[1]>=74)&&(R=xr.match(/Chrome\/(\d+)/),R&&(Ee=+R[1])));Sn.exports=Ee});var Er=i((Id,Pn)=>{"use strict";var Rn=qn(),ru=A(),tu=S(),nu=tu.String;Pn.exports=!!Object.getOwnPropertySymbols&&!ru(function(){var e=Symbol();return!nu(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Rn&&Rn<41})});var wr=i((gd,An)=>{"use strict";var ou=Er();An.exports=ou&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Sr=i((Od,_n)=>{"use strict";var iu=gr(),au=x(),su=Or(),uu=wr(),lu=Object;_n.exports=uu?function(e){return typeof e=="symbol"}:function(e){var r=iu("Symbol");return au(r)&&su(r.prototype,lu(e))}});var we=i((xd,Ln)=>{"use strict";var cu=String;Ln.exports=function(e){try{return cu(e)}catch(r){return"Object"}}});var oe=i((Ed,Cn)=>{"use strict";var fu=x(),pu=we(),vu=TypeError;Cn.exports=function(e){if(fu(e))return e;throw vu(pu(e)+" is not a function")}});var Se=i((wd,Nn)=>{"use strict";var bu=oe(),du=Ie();Nn.exports=function(e,r){var t=e[r];return du(t)?void 0:bu(t)}});var Mn=i((Sd,jn)=>{"use strict";var qr=V(),Rr=x(),Pr=B(),Tu=TypeError;jn.exports=function(e,r){var t,n;if(r==="string"&&Rr(t=e.toString)&&!Pr(n=qr(t,e))||Rr(t=e.valueOf)&&!Pr(n=qr(t,e))||r!=="string"&&Rr(t=e.toString)&&!Pr(n=qr(t,e)))return n;throw Tu("Can't convert object to primitive value")}});var ie=i((qd,kn)=>{"use strict";kn.exports=!0});var Fn=i((Rd,Vn)=>{"use strict";var Dn=S(),mu=Object.defineProperty;Vn.exports=function(e,r){try{mu(Dn,e,{value:r,configurable:!0,writable:!0})}catch(t){Dn[e]=r}return r}});var Ar=i((Pd,Gn)=>{"use strict";var yu=S(),hu=Fn(),Un="__core-js_shared__",Iu=yu[Un]||hu(Un,{});Gn.exports=Iu});var _r=i((Ad,Bn)=>{"use strict";var gu=ie(),Qn=Ar();(Bn.exports=function(e,r){return Qn[e]||(Qn[e]=r!==void 0?r:{})})("versions",[]).push({version:"3.31.0",mode:gu?"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 Lr=i((_d,$n)=>{"use strict";var Ou=pr(),xu=Object;$n.exports=function(e){return xu(Ou(e))}});var j=i((Ld,Wn)=>{"use strict";var Eu=C(),wu=Lr(),Su=Eu({}.hasOwnProperty);Wn.exports=Object.hasOwn||function(r,t){return Su(wu(r),t)}});var Cr=i((Cd,zn)=>{"use strict";var qu=C(),Ru=0,Pu=Math.random(),Au=qu(1 .toString);zn.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Au(++Ru+Pu,36)}});var _=i((Nd,Yn)=>{"use strict";var _u=S(),Lu=_r(),Kn=j(),Cu=Cr(),Nu=Er(),ju=wr(),X=_u.Symbol,Nr=Lu("wks"),Mu=ju?X.for||X:X&&X.withoutSetter||Cu;Yn.exports=function(e){return Kn(Nr,e)||(Nr[e]=Nu&&Kn(X,e)?X[e]:Mu("Symbol."+e)),Nr[e]}});var Zn=i((jd,Jn)=>{"use strict";var ku=V(),Hn=B(),Xn=Sr(),Du=Se(),Vu=Mn(),Fu=_(),Uu=TypeError,Gu=Fu("toPrimitive");Jn.exports=function(e,r){if(!Hn(e)||Xn(e))return e;var t=Du(e,Gu),n;if(t){if(r===void 0&&(r="default"),n=ku(t,e,r),!Hn(n)||Xn(n))return n;throw Uu("Can't convert object to primitive value")}return r===void 0&&(r="number"),Vu(e,r)}});var qe=i((Md,eo)=>{"use strict";var Qu=Zn(),Bu=Sr();eo.exports=function(e){var r=Qu(e,"string");return Bu(r)?r:r+""}});var J=i(to=>{"use strict";var $u=N(),Wu=mr(),zu=yr(),Re=D(),ro=qe(),Ku=TypeError,jr=Object.defineProperty,Yu=Object.getOwnPropertyDescriptor,Mr="enumerable",kr="configurable",Dr="writable";to.f=$u?zu?function(r,t,n){if(Re(r),t=ro(t),Re(n),typeof r=="function"&&t==="prototype"&&"value"in n&&Dr in n&&!n[Dr]){var o=Yu(r,t);o&&o[Dr]&&(r[t]=n.value,n={configurable:kr in n?n[kr]:o[kr],enumerable:Mr in n?n[Mr]:o[Mr],writable:!1})}return jr(r,t,n)}:jr:function(r,t,n){if(Re(r),t=ro(t),Re(n),Wu)try{return jr(r,t,n)}catch(o){}if("get"in n||"set"in n)throw Ku("Accessors not supported");return"value"in n&&(r[t]=n.value),r}});var ae=i((Dd,no)=>{"use strict";no.exports=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}});var $=i((Vd,oo)=>{"use strict";var Hu=N(),Xu=J(),Ju=ae();oo.exports=Hu?function(e,r,t){return Xu.f(e,r,Ju(1,t))}:function(e,r,t){return e[r]=t,e}});var Pe=i((Fd,ao)=>{"use strict";var Zu=_r(),el=Cr(),io=Zu("keys");ao.exports=function(e){return io[e]||(io[e]=el(e))}});var Ae=i((Ud,so)=>{"use strict";so.exports={}});var fo=i((Gd,co)=>{"use strict";var rl=nn(),lo=S(),tl=B(),nl=$(),Vr=j(),Fr=Ar(),ol=Pe(),il=Ae(),uo="Object already initialized",Ur=lo.TypeError,al=lo.WeakMap,_e,se,Le,sl=function(e){return Le(e)?se(e):_e(e,{})},ul=function(e){return function(r){var t;if(!tl(r)||(t=se(r)).type!==e)throw Ur("Incompatible receiver, "+e+" required");return t}};rl||Fr.state?(P=Fr.state||(Fr.state=new al),P.get=P.get,P.has=P.has,P.set=P.set,_e=function(e,r){if(P.has(e))throw Ur(uo);return r.facade=e,P.set(e,r),r},se=function(e){return P.get(e)||{}},Le=function(e){return P.has(e)}):(W=ol("state"),il[W]=!0,_e=function(e,r){if(Vr(e,W))throw Ur(uo);return r.facade=e,nl(e,W,r),r},se=function(e){return Vr(e,W)?e[W]:{}},Le=function(e){return Vr(e,W)});var P,W;co.exports={set:_e,get:se,has:Le,enforce:sl,getterFor:ul}});var mo=i((Qd,To)=>{"use strict";var ll=ne(),bo=Function.prototype,po=bo.apply,vo=bo.call;To.exports=typeof Reflect=="object"&&Reflect.apply||(ll?vo.bind(po):function(){return vo.apply(po,arguments)})});var Gr=i((Bd,yo)=>{"use strict";var cl=he(),fl=C();yo.exports=function(e){if(cl(e)==="Function")return fl(e)}});var Oo=i(go=>{"use strict";var ho={}.propertyIsEnumerable,Io=Object.getOwnPropertyDescriptor,pl=Io&&!ho.call({1:2},1);go.f=pl?function(r){var t=Io(this,r);return!!t&&t.enumerable}:ho});var wo=i(Eo=>{"use strict";var vl=N(),bl=V(),dl=Oo(),Tl=ae(),ml=H(),yl=qe(),hl=j(),Il=mr(),xo=Object.getOwnPropertyDescriptor;Eo.f=vl?xo:function(r,t){if(r=ml(r),t=yl(t),Il)try{return xo(r,t)}catch(n){}if(hl(r,t))return Tl(!bl(dl.f,r,t),r[t])}});var qo=i((zd,So)=>{"use strict";var gl=A(),Ol=x(),xl=/#|\.prototype\./,ue=function(e,r){var t=wl[El(e)];return t==ql?!0:t==Sl?!1:Ol(r)?gl(r):!!r},El=ue.normalize=function(e){return String(e).replace(xl,".").toLowerCase()},wl=ue.data={},Sl=ue.NATIVE="N",ql=ue.POLYFILL="P";So.exports=ue});var Qr=i((Kd,Po)=>{"use strict";var Ro=Gr(),Rl=oe(),Pl=ne(),Al=Ro(Ro.bind);Po.exports=function(e,r){return Rl(e),r===void 0?e:Pl?Al(e,r):function(){return e.apply(r,arguments)}}});var Br=i((Yd,_o)=>{"use strict";var Ce=S(),_l=mo(),Ll=Gr(),Cl=x(),Nl=wo().f,jl=qo(),Z=xe(),Ml=Qr(),ee=$(),Ao=j(),kl=function(e){var r=function(t,n,o){if(this instanceof r){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,o)}return _l(e,this,arguments)};return r.prototype=e.prototype,r};_o.exports=function(e,r){var t=e.target,n=e.global,o=e.stat,a=e.proto,u=n?Ce:o?Ce[t]:(Ce[t]||{}).prototype,s=n?Z:Z[t]||ee(Z,t,{})[t],c=s.prototype,l,f,p,b,d,m,y,g,h;for(b in r)l=jl(n?b:t+(o?".":"#")+b,e.forced),f=!l&&u&&Ao(u,b),m=s[b],f&&(e.dontCallGetSet?(h=Nl(u,b),y=h&&h.value):y=u[b]),d=f&&y?y:r[b],!(f&&typeof m==typeof d)&&(e.bind&&f?g=Ml(d,Ce):e.wrap&&f?g=kl(d):a&&Cl(d)?g=Ll(d):g=d,(e.sham||d&&d.sham||m&&m.sham)&&ee(g,"sham",!0),ee(s,b,g),a&&(p=t+"Prototype",Ao(Z,p)||ee(Z,p,{}),ee(Z[p],b,d),e.real&&c&&(l||!c[b])&&ee(c,b,d)))}});var No=i((Hd,Co)=>{"use strict";var $r=N(),Dl=j(),Lo=Function.prototype,Vl=$r&&Object.getOwnPropertyDescriptor,Wr=Dl(Lo,"name"),Fl=Wr&&function(){}.name==="something",Ul=Wr&&(!$r||$r&&Vl(Lo,"name").configurable);Co.exports={EXISTS:Wr,PROPER:Fl,CONFIGURABLE:Ul}});var Mo=i((Xd,jo)=>{"use strict";var Gl=Math.ceil,Ql=Math.floor;jo.exports=Math.trunc||function(r){var t=+r;return(t>0?Ql:Gl)(t)}});var zr=i((Jd,ko)=>{"use strict";var Bl=Mo();ko.exports=function(e){var r=+e;return r!==r||r===0?0:Bl(r)}});var Vo=i((Zd,Do)=>{"use strict";var $l=zr(),Wl=Math.max,zl=Math.min;Do.exports=function(e,r){var t=$l(e);return t<0?Wl(t+r,0):zl(t,r)}});var Uo=i((eT,Fo)=>{"use strict";var Kl=zr(),Yl=Math.min;Fo.exports=function(e){return e>0?Yl(Kl(e),9007199254740991):0}});var Kr=i((rT,Go)=>{"use strict";var Hl=Uo();Go.exports=function(e){return Hl(e.length)}});var $o=i((tT,Bo)=>{"use strict";var Xl=H(),Jl=Vo(),Zl=Kr(),Qo=function(e){return function(r,t,n){var o=Xl(r),a=Zl(o),u=Jl(n,a),s;if(e&&t!=t){for(;a>u;)if(s=o[u++],s!=s)return!0}else for(;a>u;u++)if((e||u in o)&&o[u]===t)return e||u||0;return!e&&-1}};Bo.exports={includes:Qo(!0),indexOf:Qo(!1)}});var Ko=i((nT,zo)=>{"use strict";var ec=C(),Yr=j(),rc=H(),tc=$o().indexOf,nc=Ae(),Wo=ec([].push);zo.exports=function(e,r){var t=rc(e),n=0,o=[],a;for(a in t)!Yr(nc,a)&&Yr(t,a)&&Wo(o,a);for(;r.length>n;)Yr(t,a=r[n++])&&(~tc(o,a)||Wo(o,a));return o}});var Hr=i((oT,Yo)=>{"use strict";Yo.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var Xo=i((iT,Ho)=>{"use strict";var oc=Ko(),ic=Hr();Ho.exports=Object.keys||function(r){return oc(r,ic)}});var Zo=i(Jo=>{"use strict";var ac=N(),sc=yr(),uc=J(),lc=D(),cc=H(),fc=Xo();Jo.f=ac&&!sc?Object.defineProperties:function(r,t){lc(r);for(var n=cc(t),o=fc(t),a=o.length,u=0,s;a>u;)uc.f(r,s=o[u++],n[s]);return r}});var ri=i((sT,ei)=>{"use strict";var pc=gr();ei.exports=pc("document","documentElement")});var et=i((uT,ui)=>{"use strict";var vc=D(),bc=Zo(),ti=Hr(),dc=Ae(),Tc=ri(),mc=Tr(),yc=Pe(),ni=">",oi="<",Jr="prototype",Zr="script",ai=yc("IE_PROTO"),Xr=function(){},si=function(e){return oi+Zr+ni+e+oi+"/"+Zr+ni},ii=function(e){e.write(si("")),e.close();var r=e.parentWindow.Object;return e=null,r},hc=function(){var e=mc("iframe"),r="java"+Zr+":",t;return e.style.display="none",Tc.appendChild(e),e.src=String(r),t=e.contentWindow.document,t.open(),t.write(si("document.F=Object")),t.close(),t.F},Ne,je=function(){try{Ne=new ActiveXObject("htmlfile")}catch(r){}je=typeof document!="undefined"?document.domain&&Ne?ii(Ne):hc():ii(Ne);for(var e=ti.length;e--;)delete je[Jr][ti[e]];return je()};dc[ai]=!0;ui.exports=Object.create||function(r,t){var n;return r!==null?(Xr[Jr]=vc(r),n=new Xr,Xr[Jr]=null,n[ai]=r):n=je(),t===void 0?n:bc.f(n,t)}});var ci=i((lT,li)=>{"use strict";var Ic=A();li.exports=!Ic(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})});var tt=i((cT,pi)=>{"use strict";var gc=j(),Oc=x(),xc=Lr(),Ec=Pe(),wc=ci(),fi=Ec("IE_PROTO"),rt=Object,Sc=rt.prototype;pi.exports=wc?rt.getPrototypeOf:function(e){var r=xc(e);if(gc(r,fi))return r[fi];var t=r.constructor;return Oc(t)&&r instanceof t?t.prototype:r instanceof rt?Sc:null}});var nt=i((fT,vi)=>{"use strict";var qc=$();vi.exports=function(e,r,t,n){return n&&n.enumerable?e[r]=t:qc(e,r,t),e}});var st=i((pT,Ti)=>{"use strict";var Rc=A(),Pc=x(),Ac=B(),_c=et(),bi=tt(),Lc=nt(),Cc=_(),Nc=ie(),at=Cc("iterator"),di=!1,M,ot,it;[].keys&&(it=[].keys(),"next"in it?(ot=bi(bi(it)),ot!==Object.prototype&&(M=ot)):di=!0);var jc=!Ac(M)||Rc(function(){var e={};return M[at].call(e)!==e});jc?M={}:Nc&&(M=_c(M));Pc(M[at])||Lc(M,at,function(){return this});Ti.exports={IteratorPrototype:M,BUGGY_SAFARI_ITERATORS:di}});var Me=i((vT,yi)=>{"use strict";var Mc=_(),kc=Mc("toStringTag"),mi={};mi[kc]="z";yi.exports=String(mi)==="[object z]"});var De=i((bT,hi)=>{"use strict";var Dc=Me(),Vc=x(),ke=he(),Fc=_(),Uc=Fc("toStringTag"),Gc=Object,Qc=ke(function(){return arguments}())=="Arguments",Bc=function(e,r){try{return e[r]}catch(t){}};hi.exports=Dc?ke:function(e){var r,t,n;return e===void 0?"Undefined":e===null?"Null":typeof(t=Bc(r=Gc(e),Uc))=="string"?t:Qc?ke(r):(n=ke(r))=="Object"&&Vc(r.callee)?"Arguments":n}});var gi=i((dT,Ii)=>{"use strict";var $c=Me(),Wc=De();Ii.exports=$c?{}.toString:function(){return"[object "+Wc(this)+"]"}});var ut=i((TT,xi)=>{"use strict";var zc=Me(),Kc=J().f,Yc=$(),Hc=j(),Xc=gi(),Jc=_(),Oi=Jc("toStringTag");xi.exports=function(e,r,t,n){if(e){var o=t?e:e.prototype;Hc(o,Oi)||Kc(o,Oi,{configurable:!0,value:r}),n&&!zc&&Yc(o,"toString",Xc)}}});var wi=i((mT,Ei)=>{"use strict";var Zc=st().IteratorPrototype,ef=et(),rf=ae(),tf=ut(),nf=Q(),of=function(){return this};Ei.exports=function(e,r,t,n){var o=r+" Iterator";return e.prototype=ef(Zc,{next:rf(+!n,t)}),tf(e,o,!1,!0),nf[o]=of,e}});var qi=i((yT,Si)=>{"use strict";var af=C(),sf=oe();Si.exports=function(e,r,t){try{return af(sf(Object.getOwnPropertyDescriptor(e,r)[t]))}catch(n){}}});var Pi=i((hT,Ri)=>{"use strict";var uf=x(),lf=String,cf=TypeError;Ri.exports=function(e){if(typeof e=="object"||uf(e))return e;throw cf("Can't set "+lf(e)+" as a prototype")}});var _i=i((IT,Ai)=>{"use strict";var ff=qi(),pf=D(),vf=Pi();Ai.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,r={},t;try{t=ff(Object.prototype,"__proto__","set"),t(r,[]),e=r instanceof Array}catch(n){}return function(o,a){return pf(o),vf(a),e?t(o,a):o.__proto__=a,o}}():void 0)});var Gi=i((gT,Ui)=>{"use strict";var bf=Br(),df=V(),Ve=ie(),Vi=No(),Tf=x(),mf=wi(),Li=tt(),Ci=_i(),yf=ut(),hf=$(),lt=nt(),If=_(),Ni=Q(),Fi=st(),gf=Vi.PROPER,Of=Vi.CONFIGURABLE,ji=Fi.IteratorPrototype,Fe=Fi.BUGGY_SAFARI_ITERATORS,le=If("iterator"),Mi="keys",ce="values",ki="entries",Di=function(){return this};Ui.exports=function(e,r,t,n,o,a,u){mf(t,r,n);var s=function(h){if(h===o&&b)return b;if(!Fe&&h in f)return f[h];switch(h){case Mi:return function(){return new t(this,h)};case ce:return function(){return new t(this,h)};case ki:return function(){return new t(this,h)}}return function(){return new t(this)}},c=r+" Iterator",l=!1,f=e.prototype,p=f[le]||f["@@iterator"]||o&&f[o],b=!Fe&&p||s(o),d=r=="Array"&&f.entries||p,m,y,g;if(d&&(m=Li(d.call(new e)),m!==Object.prototype&&m.next&&(!Ve&&Li(m)!==ji&&(Ci?Ci(m,ji):Tf(m[le])||lt(m,le,Di)),yf(m,c,!0,!0),Ve&&(Ni[c]=Di))),gf&&o==ce&&p&&p.name!==ce&&(!Ve&&Of?hf(f,"name",ce):(l=!0,b=function(){return df(p,this)})),o)if(y={values:s(ce),keys:a?b:s(Mi),entries:s(ki)},u)for(g in y)(Fe||l||!(g in f))&&lt(f,g,y[g]);else bf({target:r,proto:!0,forced:Fe||l},y);return(!Ve||u)&&f[le]!==b&&lt(f,le,b,{name:o}),Ni[r]=b,y}});var Bi=i((OT,Qi)=>{"use strict";Qi.exports=function(e,r){return{value:e,done:r}}});var ft=i((xT,Yi)=>{"use strict";var xf=H(),ct=Kt(),$i=Q(),zi=fo(),Ef=J().f,wf=Gi(),Ue=Bi(),Sf=ie(),qf=N(),Ki="Array Iterator",Rf=zi.set,Pf=zi.getterFor(Ki);Yi.exports=wf(Array,"Array",function(e,r){Rf(this,{type:Ki,target:xf(e),index:0,kind:r})},function(){var e=Pf(this),r=e.target,t=e.kind,n=e.index++;return!r||n>=r.length?(e.target=void 0,Ue(void 0,!0)):t=="keys"?Ue(n,!1):t=="values"?Ue(r[n],!1):Ue([n,r[n]],!1)},"values");var Wi=$i.Arguments=$i.Array;ct("keys");ct("values");ct("entries");if(!Sf&&qf&&Wi.name!=="values")try{Ef(Wi,"name",{value:"values"})}catch(e){}});var Xi=i((ET,Hi)=>{"use strict";var Af=_(),_f=Q(),Lf=Af("iterator"),Cf=Array.prototype;Hi.exports=function(e){return e!==void 0&&(_f.Array===e||Cf[Lf]===e)}});var pt=i((wT,Zi)=>{"use strict";var Nf=De(),Ji=Se(),jf=Ie(),Mf=Q(),kf=_(),Df=kf("iterator");Zi.exports=function(e){if(!jf(e))return Ji(e,Df)||Ji(e,"@@iterator")||Mf[Nf(e)]}});var ra=i((ST,ea)=>{"use strict";var Vf=V(),Ff=oe(),Uf=D(),Gf=we(),Qf=pt(),Bf=TypeError;ea.exports=function(e,r){var t=arguments.length<2?Qf(e):r;if(Ff(t))return Uf(Vf(t,e));throw Bf(Gf(e)+" is not iterable")}});var oa=i((qT,na)=>{"use strict";var $f=V(),ta=D(),Wf=Se();na.exports=function(e,r,t){var n,o;ta(e);try{if(n=Wf(e,"return"),!n){if(r==="throw")throw t;return t}n=$f(n,e)}catch(a){o=!0,n=a}if(r==="throw")throw t;if(o)throw n;return ta(n),t}});var la=i((RT,ua)=>{"use strict";var zf=Qr(),Kf=V(),Yf=D(),Hf=we(),Xf=Xi(),Jf=Kr(),ia=Or(),Zf=ra(),ep=pt(),aa=oa(),rp=TypeError,Ge=function(e,r){this.stopped=e,this.result=r},sa=Ge.prototype;ua.exports=function(e,r,t){var n=t&&t.that,o=!!(t&&t.AS_ENTRIES),a=!!(t&&t.IS_RECORD),u=!!(t&&t.IS_ITERATOR),s=!!(t&&t.INTERRUPTED),c=zf(r,n),l,f,p,b,d,m,y,g=function(I){return l&&aa(l,"normal",I),new Ge(!0,I)},h=function(I){return o?(Yf(I),s?c(I[0],I[1],g):c(I[0],I[1])):s?c(I,g):c(I)};if(a)l=e.iterator;else if(u)l=e;else{if(f=ep(e),!f)throw rp(Hf(e)+" is not iterable");if(Xf(f)){for(p=0,b=Jf(e);b>p;p++)if(d=h(e[p]),d&&ia(sa,d))return d;return new Ge(!1)}l=Zf(e,f)}for(m=a?e.next:l.next;!(y=Kf(m,l)).done;){try{d=h(y.value)}catch(I){aa(l,"throw",I)}if(typeof d=="object"&&d&&ia(sa,d))return d}return new Ge(!1)}});var fa=i((PT,ca)=>{"use strict";var tp=qe(),np=J(),op=ae();ca.exports=function(e,r,t){var n=tp(r);n in e?np.f(e,n,op(0,t)):e[n]=t}});var pa=i(()=>{"use strict";var ip=Br(),ap=la(),sp=fa();ip({target:"Object",stat:!0},{fromEntries:function(r){var t={};return ap(r,function(n,o){sp(t,n,o)},{AS_ENTRIES:!0}),t}})});var ba=i((LT,va)=>{"use strict";ft();pa();var up=xe();va.exports=up.Object.fromEntries});var Ta=i((CT,da)=>{"use strict";da.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 ha=i(()=>{"use strict";ft();var lp=Ta(),cp=S(),fp=De(),pp=$(),ma=Q(),vp=_(),ya=vp("toStringTag");for(Qe in lp)vt=cp[Qe],Be=vt&&vt.prototype,Be&&fp(Be)!==ya&&pp(Be,ya,Qe),ma[Qe]=ma.Array;var vt,Be,Qe});var ga=i((MT,Ia)=>{"use strict";var bp=ba();ha();Ia.exports=bp});var xa=i((kT,Oa)=>{"use strict";var dp=ga();Oa.exports=dp});var Ma="__VERSION__";var E=class{constructor(){this.subscriptions=[]}unsubscribe(){let r=this.subscriptions;this.subscriptions=[],r.forEach(t=>typeof t=="function"?t():t.unsubscribe())}add(r){return this.subscriptions.push(r),this}};var L=e=>{throw new Error(`${e} is value of unexpected type`)},ka=e=>{};var U=()=>{};var v=class{constructor(r){r&&(this._subscribe=r)}subscribe(r,t){var u;let n;t?typeof t=="function"?n={next:t,error:U}:n={next:s=>t.next(s),error:s=>{var c;return(c=t.error)==null?void 0:c.call(t,s)}}:n={next:U,error:U};let o=typeof r=="function"?{next:s=>{try{r(s)}catch(c){n.next(c)}},error:s=>n.next(s)}:{next:s=>r.next(s),error:s=>r.error?r.error(s):n.next(s)},a;try{a=this._subscribe(o)}catch(s){(u=o.error)==null||u.call(o,s)}return new E().add(()=>{switch(o.next=U,o.error=U,typeof a){case"function":a();return;case"object":a.unsubscribe();return;case"undefined":return;default:return L(a)}})}pipe(...r){return r.reduce((t,n)=>n(t),this)}_subscribe(r){}};var k=class extends v{constructor(){super();this.keyCounter=0;this.subscribers=new Map}next(t){this.subscribers.forEach(n=>n.next(t))}error(t){this.subscribers.forEach(n=>{var o;return(o=n.error)==null?void 0:o.call(n,t)})}_subscribe(t){let n=this.keyCounter++;return this.subscribers.set(n,t),new E().add(()=>this.subscribers.delete(n))}};var We=class{constructor(){this.log$=new k;this.logs=[];this.log=r=>{let t={...r,timestamp:Date.now()};this.logs.push(t),this.log$.next(t)};this.getAllLogs=()=>this.logs}createCustomLog(r){return(...t)=>{let n;try{n=r(...t)}catch(o){n={message:"error in `createCustomLog`",component:"Logger"}}this.log(n)}}createComponentLog(r){return this.createCustomLog(t=>({component:r,...t}))}};function Da(e,r='Assertion "value is not nullable" failed'){if(e==null)throw new Error(r)}function Va(e,r='Assertion "value is nullable" failed'){if(e!=null)throw new Error(r)}function z(e){return typeof e!="undefined"&&e!==null}function ze(e){return e==null}function Fa(e,r){if(!(e!=null&&e.length))throw new Error(r)}function Ua(e,r){if(e!=null&&e.length)throw new Error(r)}var Ga=(e,r,t)=>new Promise((n,o)=>{r.addEventListener("abort",()=>{s(),l.remove()});let a=()=>{s(),o()},u=()=>{s(),n()},s=()=>{c&&clearTimeout(c),l.removeEventListener("load",u),l.removeEventListener("error",a)},c;t&&(c=window.setTimeout(a,t));let l=document.createElement("script");l.addEventListener("load",u),l.addEventListener("error",a),l.src=e,document.head.appendChild(l)});var mt,Qa=typeof((mt=window.performance)==null?void 0:mt.now)=="function"?()=>window.performance.now():()=>Date.now();var Ba=(e,r)=>async(...t)=>{var u;let n=r(...t),o=e.aborted,a;for(;!o&&!e.aborted;)try{let s=await n.next(a);o=(u=s.done)!=null?u:!1,a=s.value}catch(s){await n.throw(s)}return a};var yt=(l=>(l.Unknown="Unknown",l.Yandex="Yandex",l.Chrome="Chrome",l.Chromium="Chromium",l.Firefox="Firefox",l.Safari="Safari",l.Opera="Opera",l.Edge="Edge",l.Rest="Rest",l))(yt||{}),ht=(c=>(c.Unknown="Unknown",c.Android="Android",c.iPhone="iPhone",c.iPad="iPad",c.iPod="iPod",c.RestMobile="RestMobile",c.Mac="Mac",c.Desktop="Desktop",c))(ht||{}),ve=()=>{let{userAgent:e}=window.navigator,r=/yabrowser/i.test(e)?"Yandex":void 0,t=/chrome|crios/i.test(e)?"Chrome":void 0,n=/chromium/i.test(e)?"Chromium":void 0,o=/firefox|fxios/i.test(e)?"Firefox":void 0,a=/webkit|safari|khtml/i.test(e)?"Safari":void 0,u=/opr\//i.test(e)?"Opera":void 0,s=/edg/i.test(e)?"Edge":void 0,c=/android/i.test(e)?"Android":void 0,l=/iphone/i.test(e)?"iPhone":void 0,f=/ipad/i.test(e)?"iPad":void 0,p=/ipod/i.test(e)?"iPod":void 0,b=/mac/i.test(e)?"Mac":void 0,d=/webOS|BlackBerry|IEMobile|Opera Mini/i.test(e)?"RestMobile":void 0;return{browser:r||o||u||s||t||n||a||"Rest",device:c||l||f||p||d||b||"Desktop"}},$a=(e=!1)=>{let t=["iPhone","iPad","iPod"].includes(ve().device);if(!e)return t;let{userAgent:n,maxTouchPoints:o}=window.navigator;return!!(t||/macintosh/i.test(n)&&o>0)},Wa=()=>{let{userAgent:e}=window.navigator,r=e.match(/Version\/(\d+(\.\d+)?)/i);if(!r)return null;let t=r[1],n=parseFloat(t);return isNaN(n)?null:n},za=()=>ve().device==="Android",Ka=()=>["Mac","iPhone","iPad","iPod"].includes(ve().device),Ya=()=>{var e,r;return/Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test((e=navigator.appVersion)!=null?e:navigator.userAgent)||((r=navigator==null?void 0:navigator.userAgentData)==null?void 0:r.mobile)};var Ha=(e,{start:r=0,factor:t=2,max:n=1/0,min:o=r,random:a=0}={})=>{let u=r;return u*=t**e,u*=1+(Math.random()*a*2-a),u=Math.round(u),u=Math.min(u,n),u=Math.max(u,o),u};var Ye={};Ca(Ye,{clear:()=>ts,get:()=>Ja,has:()=>es,isPersistent:()=>Xa,remove:()=>rs,set:()=>Za});var O,G,Ke=`vk-videoplayer-dummy-key-${Math.random()}`,K=()=>{if(G!==void 0)return G;try{localStorage.setItem(Ke,"test"),localStorage.removeItem(Ke),G=0}catch(e){if(e instanceof DOMException||e instanceof TypeError)try{sessionStorage.getItem(Ke),G=1}catch(r){if(r instanceof DOMException||r instanceof TypeError)G=2;else throw r}else throw e}return G===2&&(O=new Map),G},Xa=()=>K()===0,Ja=e=>{var t,n;let r=K();switch(r){case 0:return(t=localStorage.getItem(e))!=null?t:void 0;case 1:return(n=sessionStorage.getItem(e))!=null?n:void 0;case 2:return O==null?void 0:O.get(e);default:L(r)}},Za=(e,r)=>{let t=K();switch(t){case 0:try{localStorage.setItem(e,r)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 1:try{sessionStorage.setItem(e,r)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 2:return void(O==null?void 0:O.set(e,r));default:L(t)}},es=e=>{var t;let r=K();switch(r){case 0:return e in localStorage;case 1:return e in sessionStorage;case 2:return(t=O==null?void 0:O.has(e))!=null?t:!1;default:return L(r),!1}},rs=e=>{let r=K();switch(r){case 0:return localStorage.removeItem(e);case 1:return sessionStorage.removeItem(e);case 2:return void(O==null?void 0:O.delete(e));default:L(r)}},ts=()=>{let e=K();switch(e){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return O==null?void 0:O.clear();default:L(e)}};var ns=()=>{let e,r;try{e=window.self!==window.top}catch(n){n instanceof DOMException&&n.name==="SecurityError"?e=!0:(e=!1,console.error(n))}try{window.location.ancestorOrigins&&(r=window.location.ancestorOrigins[window.location.ancestorOrigins.length-1])}catch(n){console.error(n)}try{!r&&document.referrer&&(r=document.referrer)}catch(n){console.error(n)}let t=r?new URL(r).hostname:void 0;return{isEmbed:e,host:t}};var He=(f=>(f.INVARIANT="Invariant quality",f.Q_144P="144p",f.Q_240P="240p",f.Q_360P="360p",f.Q_480P="480p",f.Q_720P="720p",f.Q_1080P="1080p",f.Q_1440P="1440p",f.Q_2160P="2160p",f.Q_4320P="4320p",f))(He||{});var w={"144p":{width:256,height:144},"240p":{width:428,height:240},"360p":{width:640,height:360},"480p":{width:856,height:480},"720p":{width:1280,height:720},"1080p":{width:1920,height:1080},"1440p":{width:2560,height:1440},"2160p":{width:3840,height:2160},"4320p":{width:7680,height:4320}},os=(e,r)=>w[e].height>w[r].height,is=(e,r)=>w[e].height>=w[r].height,Xe=(e,r)=>w[e].height<w[r].height,as=(e,r)=>w[e].height<=w[r].height,ss=e=>e.sort((r,t)=>r===t?0:r==="Invariant quality"?1:t==="Invariant quality"?-1:Xe(r,t)?1:-1)[0],It=Object.keys(w).sort((e,r)=>Xe(e,r)?-1:1),us=(e,r=.02)=>[...It].find(n=>w[n].height*(1+r)>=e),ls=({width:e,height:r})=>{let t=Math.min(e,r),n=Math.max(e,r);return It.find(o=>{let a=w[o];return a.width>=n&&a.height>=t})},cs=e=>w[e].height,Je=e=>e==="Invariant quality",fs=e=>e.every(r=>!Je(r));function ps(e){if(Je(e))throw new Error("Expected exact quality")}var vs=(e,r)=>{let t={};for(let n of Object.keys(r)){let o=r[n],a=e[n];Array.isArray(o)&&Array.isArray(a)?t[n]=a:typeof o=="object"&&typeof a=="object"?t[n]=vs(a,o):t[n]=n in e?a:o}return t};var Hp=e=>{let r="";return e>=3600&&(r+=Math.floor(e/3600)+"h",e=e%3600),e>=60&&(r+=Math.floor(e/60)+"m",e=e%60),e>0&&(r+=Math.floor(e)+"s"),r};function Ze(e,r=0,t){let n,o,a,u,s,c,l=0,f=!1,p=!1,b=!0,d=!r&&r!==0&&typeof window.requestAnimationFrame=="function";t&&(f=!!t.leading,p="maxWait"in t,a=t!=null&&t.maxWait?Math.max(+(t==null?void 0:t.maxWait)||0,r):a,b="trailing"in t?!!t.trailing:b);function m(T){let q=n,F=o;return n=o=void 0,l=T,u=e.apply(F,q),u}function y(T,q){return d?(s&&window.cancelAnimationFrame(s),window.requestAnimationFrame(T)):setTimeout(T,q)}function g(T){if(d){window.cancelAnimationFrame(T);return}clearTimeout(T)}function h(T){return l=T,s=y(fe,r),f?m(T):u}function I(T){let q=T-c,F=T-l,Tt=r-q;return p?Math.min(Tt,a-F):Tt}function bt(T){let q=T-c,F=T-l;return c===void 0||q>=r||q<0||p&&F>=a}function fe(){let T=Date.now();if(bt(T))return dt(T);s=y(fe,I(T))}function dt(T){return s=void 0,b&&n?m(T):(n=o=void 0,u)}function wa(){s!==void 0&&g(s),l=0,n=c=o=s=void 0}function Sa(){return s===void 0?u:dt(Date.now())}function qa(){return s!==void 0}function pe(...T){let q=Date.now(),F=bt(q);if(n=T,o=this,c=q,F){if(s===void 0)return h(c);if(p)return s=y(fe,r),m(c)}return s===void 0&&(s=y(fe,r)),u}return pe.cancel=wa,pe.flush=Sa,pe.pending=qa,pe}var er=(e,r=0,t)=>Ze(e,r,{...{leading:!0,trailing:!0},...t,maxWait:r});var be=(e,r)=>{if(e===null||typeof e!="object")return e;let t=Array.isArray(e)?[]:{};for(let n in e){if(typeof r=="function"){let o=r(e[n],n,e,t);if(o!==void 0){t[n]=o;continue}}typeof e[n]=="object"?t[n]=be(e[n],r):t[n]=e[n]}return t};var bs=e=>be(e);var ds=300,Ts=(e,r=ds)=>new v(t=>{let{width:n,height:o}=e.getBoundingClientRect();if(t.next({width:n,height:o}),!window.ResizeObserver)return;let a=new ResizeObserver(er(u=>{let s=u[0];if(!s)return;let c,l;s.contentBoxSize&&s.contentBoxSize[0]?(l=s.contentBoxSize[0].blockSize,c=s.contentBoxSize[0].inlineSize):s.contentRect&&(c=s.contentRect.width,l=s.contentRect.height),z(c)&&z(l)&&t.next({width:c,height:l})},r));return a.observe(e),()=>a.disconnect()});var de=class extends k{constructor(t){super();this.value=t}next(t){super.next(this.value=t)}error(t){super.error(this.value=t)}getValue(){return this.value}_subscribe(t){let n=super._subscribe(t);return t.next(this.value),n}};function gt(e){return new v(r=>{let t={},n=Object.keys(e).length,o=a=>u=>{a in t||n--,t[a]=u,n===0&&r.next(t)};return Object.entries(e).reduce((a,[u,s])=>a.add(s.subscribe(o(u))),new E)})}function Ot(...e){return new v(r=>e.reduce((t,n)=>t.add(n.subscribe(r)),new E))}var ms=e=>new v(r=>{let t=window.setTimeout(()=>{try{r.next()}catch(n){if(r.error)r.error(n);else throw n}},e);return()=>window.clearTimeout(t)});var ys=e=>new v(r=>{let t=window.setInterval(()=>r.next(),e);return()=>{t&&(window.clearInterval(t),t=void 0)}});var hs=e=>new v(r=>{e.forEach(t=>r.next(t))});var Is=(e,r)=>new v(t=>{let n=o=>t.next(o);return e.addEventListener(r,n),()=>e.removeEventListener(r,n)});function xt(e){return r=>new v(t=>r.subscribe(new rr(t,e)))}var rr=class{constructor(r,t){this.destination=r;this.size=t;this.lastValues=[]}next(r){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(r),this.destination.next(this.lastValues)}error(r){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};var gs={leading:!1,trailing:!0};function Et(e,r=gs){return t=>new v(n=>t.subscribe(new tr(n,e,r)))}var tr=class{constructor(r,t,n){this.destination=r;this.time=t;this.config=n}next(r){this.lastValue=r,z(this.timeout)?window.clearTimeout(this.timeout):this.config.leading&&this.destination.next(r),this.timeout=window.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(t){if(this.destination.error)this.destination.error(t);else throw t}this.timeout=void 0},this.time)}error(r){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};var Os={leading:!0,trailing:!1};function wt(e,r=Os){return t=>new v(n=>t.subscribe(new nr(n,e,r)))}var nr=class{constructor(r,t,n){this.destination=r;this.time=t;this.config=n}next(r){this.lastValue=r,ze(this.timeout)&&(this.config.leading&&this.destination.next(r),this.timeout=window.setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(r){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};function St(e){return r=>new v(t=>r.subscribe(new or(t,e)))}var or=class{constructor(r,t){this.destination=r;this.predicate=t}next(r){let t;try{t=this.predicate(r)}catch(n){throw this.error(n),n}t&&this.destination.next(r)}error(r){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};function Rt(e=(r,t)=>r===t){return r=>new v(t=>r.subscribe(new ir(t,e)))}var qt={},ir=class{constructor(r,t){this.destination=r;this.predicate=t;this.lastValue=qt}next(r){let t;try{t=this.lastValue===qt||!this.predicate(this.lastValue,r),this.lastValue=r}catch(n){throw this.error(n),n}t&&this.destination.next(r)}error(r){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};function Te(e){return r=>new v(t=>r.subscribe(new ar(t,e)))}var ar=class{constructor(r,t){this.destination=r;this.mapper=t}next(r){let t;try{t=this.mapper(r)}catch(n){throw this.error(n),n}this.destination.next(t)}error(r){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};function Pt(e){return Te(()=>e)}function At(){return e=>new v(r=>{let t=!1,n=!1,o=e.subscribe(a=>{t||(t=!0,r.next(a)),n&&o.unsubscribe()},a=>{var u;t=!0,(u=r.error)==null||u.call(r,a),n&&o.unsubscribe()});return n=!0,t&&o.unsubscribe(),o})}function _t(){return e=>new v(r=>e.subscribe(new sr(r)))}var sr=class{constructor(r){this.destination=r;this.hasLast=!1}next(r){let t=this.last;if(this.last=r,!this.hasLast){this.hasLast=!0;return}this.destination.next([t,r])}error(r){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};function Lt(e){return r=>new v(t=>r.subscribe(new ur(t,e)))}var ur=class{constructor(r,t){this.destination=r;this.effect=t}next(r){try{this.effect(r)}catch(t){throw this.error(t),t}this.destination.next(r)}error(r){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};var xs=(s=>(s.NETWORK="network",s.VIDEO_PIPELINE="video_pipeline",s.EXTERNAL_API="external_api",s.PARSER="parser",s.DOM="dom",s.WTF="wtf",s.FATAL="fatal",s))(xs||{});var me=class{constructor(){Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}addEventListener(r,t,n){r in this.listeners||(this.listeners[r]=[]),this.listeners[r].push({callback:t,options:n})}removeEventListener(r,t){if(!(r in this.listeners))return;let n=this.listeners[r];for(let o=0,a=n.length;o<a;o++)if(n[o].callback===t){n.splice(o,1);return}}dispatchEvent(r){if(!(r.type in this.listeners))return;let n=this.listeners[r.type].slice();for(let o=0,a=n.length;o<a;o++){let u=n[o];try{u.callback.call(this,r)}catch(s){Promise.resolve().then(()=>{throw s})}u.options&&u.options.once&&this.removeEventListener(r.type,u.callback)}return!r.defaultPrevented}},Y=class extends me{constructor(){super(),this.listeners||me.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(r){r.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,r)),super.dispatchEvent(r)}},re=class{constructor(){Object.defineProperty(this,"signal",{value:new Y,writable:!0,configurable:!0})}abort(r){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 n=r;if(n===void 0)if(typeof document=="undefined")n=new Error("This operation was aborted"),n.name="AbortError";else try{n=new DOMException("signal is aborted without reason")}catch(o){n=new Error("This operation was aborted"),n.name="AbortError"}this.signal.reason=n,this.signal.dispatchEvent(t)}toString(){return"[object AbortController]"}};typeof Symbol!="undefined"&&Symbol.toStringTag&&(re.prototype[Symbol.toStringTag]="AbortController",Y.prototype[Symbol.toStringTag]="AbortSignal");function ye(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof e.Request=="function"&&!e.Request.prototype.hasOwnProperty("signal")||!e.AbortController}function lr(e){typeof e=="function"&&(e={fetch:e});let{fetch:r,Request:t=r.Request,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:o=!1}=e;if(!ye({fetch:r,Request:t,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:o}))return{fetch:r,Request:a};let a=t;(a&&!a.prototype.hasOwnProperty("signal")||o)&&(a=function(l,f){let p;f&&f.signal&&(p=f.signal,delete f.signal);let b=new t(l,f);return p&&Object.defineProperty(b,"signal",{writable:!1,enumerable:!1,configurable:!0,value:p}),b},a.prototype=t.prototype);let u=r;return{fetch:(c,l)=>{let f=a&&a.prototype.isPrototypeOf(c)?c.signal:l?l.signal:void 0;if(f){let p;try{p=new DOMException("Aborted","AbortError")}catch(d){p=new Error("Aborted"),p.name="AbortError"}if(f.aborted)return Promise.reject(p);let b=new Promise((d,m)=>{f.addEventListener("abort",()=>m(p),{once:!0})});return l&&l.signal&&delete l.signal,Promise.race([b,u(c,l)])}return u(c,l)},Request:a}}var te=ye({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}),Ct=te?lr({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}):void 0,Nt=te?Ct.fetch:window.fetch,$b=te?Ct.Request:window.Request,Wb=te?re:window.AbortController,zb=te?Y:window.AbortSignal;var Ea=ja(xa(),1),Tp=(p=>(p.Armenian="58",p.Azerbaijani="57",p.Belarusian="114",p.English="3",p.Kazakh="97",p.Portuguese="73",p.Russian="0",p.Spanish="4",p.Ukrainian="1",p.Uzbek="65",p.Vietnamese="75",p))(Tp||{}),mp="vk.com",VT=async(e,r,t)=>{let n=new URL(`https://${mp}/js/lang-pack.js`);n.searchParams.set("format","json"),n.searchParams.set("name",r),e!==void 0&&n.searchParams.set("lang",e);let a=await(await Nt(n.toString())).json();return yp(a,t)},yp=(e,r)=>(0,Ea.default)(Object.entries(e.keys).map(([t,n])=>[t.substring(`${r}_`.length),hp(n)])),hp=e=>Array.isArray(e)?e[0]:e;var Ip=(t=>(t.RU="ru",t.EN="en",t))(Ip||{});export{yt as CurrentClientBrowser,ht as CurrentClientDevice,xs as ErrorCategory,Ip as InterfaceLanguage,We as Logger,v as Observable,k as Subject,E as Subscription,Ma as VERSION,Tp as VKNumericLanguage,de as ValueSubject,He as VideoQuality,Ba as abortable,Ga as addScript,fs as areQualitiesExact,Ua as assertEmptyArray,L as assertNever,Da as assertNonNullable,Fa as assertNotEmptyArray,Va as assertNullable,ps as assertQualityIsExact,xt as buffer,ka as checkNever,bs as cloneDeep,be as cloneDeepWith,gt as combine,Et as debounce,Ze as debounceFn,ns as detectEmbed,vs as fillWithDefault,St as filter,Rt as filterChanged,Is as fromEvent,ve as getCurrentBrowser,Ha as getExponentialDelay,ss as getHighestQuality,Wa as getIOSVersion,ys as interval,za as isAndroid,os as isHigher,is as isHigherOrEqual,$a as isIOS,Je as isInvariantQuality,Xe as isLower,as as isLowerOrEqual,Ka as isMacLike,Ya as isMobile,z as isNonNullable,ze as isNullable,VT as loadVKLangPack,Te as map,Pt as mapTo,Ot as merge,U as noop,Qa as now,hs as observableFrom,Ts as observeElementSize,At as once,_t as pairwise,Ye as safeStorage,Lt as tap,wt as throttle,er as throttleFn,Hp as timeCodeToString,ms as timeout,us as videoHeightToQuality,cs as videoQualityToHeight,ls as videoSizeToQuality};
6
+ var Oe=Object.defineProperty;var we=(t,e)=>{for(var r in e)Oe(t,r,{get:e[r],enumerable:!0})};var Ee="1.0.37-dev.511f8223.0";var m=class{constructor(){this.subscriptions=[]}unsubscribe(){let e=this.subscriptions;this.subscriptions=[],e.forEach(r=>typeof r=="function"?r():r.unsubscribe())}add(e){return this.subscriptions.push(e),this}};var I=t=>{throw new Error(`${t} is value of unexpected type`)},Se=t=>{};var g=()=>{};var a=class{constructor(e){e&&(this._subscribe=e)}subscribe(e,r){var l;let n;r?typeof r=="function"?n={next:r,error:g}:n={next:o=>r.next(o),error:o=>{var u;return(u=r.error)==null?void 0:u.call(r,o)}}:n={next:g,error:g};let i=typeof e=="function"?{next:o=>{try{e(o)}catch(u){n.next(u)}},error:o=>n.next(o)}:{next:o=>e.next(o),error:o=>e.error?e.error(o):n.next(o)},s;try{s=this._subscribe(i)}catch(o){(l=i.error)==null||l.call(i,o)}return new m().add(()=>{switch(i.next=g,i.error=g,typeof s){case"function":s();return;case"object":s.unsubscribe();return;case"undefined":return;default:return I(s)}})}pipe(...e){return e.reduce((r,n)=>n(r),this)}_subscribe(e){}};var x=class extends a{constructor(){super();this.keyCounter=0;this.subscribers=new Map}next(r){this.subscribers.forEach(n=>n.next(r))}error(r){this.subscribers.forEach(n=>{var i;return(i=n.error)==null?void 0:i.call(n,r)})}_subscribe(r){let n=this.keyCounter++;return this.subscribers.set(n,r),new m().add(()=>this.subscribers.delete(n))}};var V=class{constructor(){this.log$=new x;this.logs=[];this.log=e=>{let r={...e,timestamp:Date.now()};this.logs.push(r),this.log$.next(r)};this.getAllLogs=()=>this.logs}createCustomLog(e){return(...r)=>{let n;try{n=e(...r)}catch(i){n={message:"error in `createCustomLog`",component:"Logger"}}this.log(n)}}createComponentLog(e){return this.createCustomLog(r=>({component:e,...r}))}};function Ae(t,e='Assertion "value is not nullable" failed'){if(t==null)throw new Error(e)}function Re(t,e='Assertion "value is nullable" failed'){if(t!=null)throw new Error(e)}function O(t){return typeof t!="undefined"&&t!==null}function Q(t){return t==null}function Ce(t,e){if(!(t!=null&&t.length))throw new Error(e)}function ke(t,e){if(t!=null&&t.length)throw new Error(e)}var Le=(t,e,r)=>new Promise((n,i)=>{e.addEventListener("abort",()=>{o(),b.remove()});let s=()=>{o(),i()},l=()=>{o(),n()},o=()=>{u&&clearTimeout(u),b.removeEventListener("load",l),b.removeEventListener("error",s)},u;r&&(u=window.setTimeout(s,r));let b=document.createElement("script");b.addEventListener("load",l),b.addEventListener("error",s),b.src=t,document.head.appendChild(b)});var te,Pe=typeof((te=window.performance)==null?void 0:te.now)=="function"?()=>window.performance.now():()=>Date.now();var Me=(t,e)=>async(...r)=>{var l;let n=e(...r),i=t.aborted,s;for(;!i&&!t.aborted;)try{let o=await n.next(s);i=(l=o.done)!=null?l:!1,s=o.value}catch(o){await n.throw(o)}return s};var re=(c=>(c.Unknown="Unknown",c.Yandex="Yandex",c.Chrome="Chrome",c.Chromium="Chromium",c.Firefox="Firefox",c.Safari="Safari",c.Opera="Opera",c.Edge="Edge",c.SamsungBrowser="SamsungBrowser",c.Rest="Rest",c))(re||{}),ne=(u=>(u.Unknown="Unknown",u.Android="Android",u.iPhone="iPhone",u.iPad="iPad",u.iPod="iPod",u.RestMobile="RestMobile",u.Mac="Mac",u.Desktop="Desktop",u))(ne||{}),L=()=>{let{userAgent:t}=window.navigator,e=/yabrowser/i.test(t)?"Yandex":void 0,r=/samsungbrowser/i.test(t)?"SamsungBrowser":void 0,n=/chrome|crios/i.test(t)?"Chrome":void 0,i=/chromium/i.test(t)?"Chromium":void 0,s=/firefox|fxios/i.test(t)?"Firefox":void 0,l=/webkit|safari|khtml/i.test(t)?"Safari":void 0,o=/opr\//i.test(t)?"Opera":void 0,u=/edg/i.test(t)?"Edge":void 0,b=/android/i.test(t)?"Android":void 0,c=/iphone/i.test(t)?"iPhone":void 0,d=/ipad/i.test(t)?"iPad":void 0,E=/ipod/i.test(t)?"iPod":void 0,A=/mac/i.test(t)?"Mac":void 0,S=/webOS|BlackBerry|IEMobile|Opera Mini/i.test(t)?"RestMobile":void 0;return{browser:e||r||s||o||u||n||i||l||"Rest",device:b||c||d||E||S||A||"Desktop"}},Ne=(t=!1)=>{let r=["iPhone","iPad","iPod"].includes(L().device);if(!t)return r;let{userAgent:n,maxTouchPoints:i}=window.navigator;return!!(r||/macintosh/i.test(n)&&i>0)},Ve=()=>{let{userAgent:t}=window.navigator,e=t.match(/Version\/(\d+(\.\d+)?)/i);if(!e)return null;let r=e[1],n=parseFloat(r);return isNaN(n)?null:n},Qe=()=>L().device==="Android",_e=()=>["Mac","iPhone","iPad","iPod"].includes(L().device),De=()=>{var t,e;return/Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test((t=navigator.appVersion)!=null?t:navigator.userAgent)||((e=navigator==null?void 0:navigator.userAgentData)==null?void 0:e.mobile)};var Ue=(t,{start:e=0,factor:r=2,max:n=1/0,min:i=e,random:s=0}={})=>{let l=e;return l*=r**t,l*=1+(Math.random()*s*2-s),l=Math.round(l),l=Math.min(l,n),l=Math.max(l,i),l};var D={};we(D,{clear:()=>Ge,get:()=>Fe,has:()=>je,isPersistent:()=>Be,remove:()=>We,set:()=>ze});var f,y,_=`vk-videoplayer-dummy-key-${Math.random()}`,w=()=>{if(y!==void 0)return y;try{localStorage.setItem(_,"test"),localStorage.removeItem(_),y=0}catch(t){if(t instanceof DOMException||t instanceof TypeError)try{sessionStorage.getItem(_),y=1}catch(e){if(e instanceof DOMException||e instanceof TypeError)y=2;else throw e}else throw t}return y===2&&(f=new Map),y},Be=()=>w()===0,Fe=t=>{var r,n;let e=w();switch(e){case 0:return(r=localStorage.getItem(t))!=null?r:void 0;case 1:return(n=sessionStorage.getItem(t))!=null?n:void 0;case 2:return f==null?void 0:f.get(t);default:I(e)}},ze=(t,e)=>{let r=w();switch(r){case 0:try{localStorage.setItem(t,e)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 1:try{sessionStorage.setItem(t,e)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 2:return void(f==null?void 0:f.set(t,e));default:I(r)}},je=t=>{var r;let e=w();switch(e){case 0:return t in localStorage;case 1:return t in sessionStorage;case 2:return(r=f==null?void 0:f.has(t))!=null?r:!1;default:return I(e),!1}},We=t=>{let e=w();switch(e){case 0:return localStorage.removeItem(t);case 1:return sessionStorage.removeItem(t);case 2:return void(f==null?void 0:f.delete(t));default:I(e)}},Ge=()=>{let t=w();switch(t){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return f==null?void 0:f.clear();default:I(t)}};var qe=()=>{let t,e;try{t=window.self!==window.top}catch(n){n instanceof DOMException&&n.name==="SecurityError"?t=!0:(t=!1,console.error(n))}try{window.location.ancestorOrigins&&(e=window.location.ancestorOrigins[window.location.ancestorOrigins.length-1])}catch(n){console.error(n)}try{!e&&document.referrer&&(e=document.referrer)}catch(n){console.error(n)}let r=e?new URL(e).hostname:void 0;return{isEmbed:t,host:r}};var U=(c=>(c.INVARIANT="Invariant quality",c.Q_144P="144p",c.Q_240P="240p",c.Q_360P="360p",c.Q_480P="480p",c.Q_720P="720p",c.Q_1080P="1080p",c.Q_1440P="1440p",c.Q_2160P="2160p",c.Q_4320P="4320p",c))(U||{});var T={"144p":{width:256,height:144},"240p":{width:428,height:240},"360p":{width:640,height:360},"480p":{width:856,height:480},"720p":{width:1280,height:720},"1080p":{width:1920,height:1080},"1440p":{width:2560,height:1440},"2160p":{width:3840,height:2160},"4320p":{width:7680,height:4320}},He=(t,e)=>T[t].height>T[e].height,Ke=(t,e)=>T[t].height>=T[e].height,B=(t,e)=>T[t].height<T[e].height,$e=(t,e)=>T[t].height<=T[e].height,Ye=t=>t.sort((e,r)=>e===r?0:e==="Invariant quality"?1:r==="Invariant quality"?-1:B(e,r)?1:-1)[0],oe=Object.keys(T).sort((t,e)=>B(t,e)?-1:1),Xe=(t,e=.02)=>[...oe].find(n=>T[n].height*(1+e)>=t),Je=({width:t,height:e})=>{let r=Math.min(t,e),n=Math.max(t,e);return oe.find(i=>{let s=T[i];return s.width>=n&&s.height>=r})},Ze=t=>T[t].height,F=t=>t==="Invariant quality",et=t=>t.every(e=>!F(e));function tt(t){if(F(t))throw new Error("Expected exact quality")}var rt=(t,e)=>{let r={};for(let n of Object.keys(e)){let i=e[n],s=t[n];Array.isArray(i)&&Array.isArray(s)?r[n]=s:typeof i=="object"&&typeof s=="object"?r[n]=rt(s,i):r[n]=n in t?s:i}return r};var Ht=t=>{let e="";return t>=3600&&(e+=Math.floor(t/3600)+"h",t=t%3600),t>=60&&(e+=Math.floor(t/60)+"m",t=t%60),t>0&&(e+=Math.floor(t)+"s"),e};function z(t,e=0,r){let n,i,s,l,o,u,b=0,c=!1,d=!1,E=!0,A=!e&&e!==0&&typeof window.requestAnimationFrame=="function";r&&(c=!!r.leading,d="maxWait"in r,s=r!=null&&r.maxWait?Math.max(+(r==null?void 0:r.maxWait)||0,e):s,E="trailing"in r?!!r.trailing:E);function S(p){let v=n,h=i;return n=i=void 0,b=p,l=t.apply(h,v),l}function R(p,v){return A?(o&&window.cancelAnimationFrame(o),window.requestAnimationFrame(p)):setTimeout(p,v)}function ve(p){if(A){window.cancelAnimationFrame(p);return}clearTimeout(p)}function Ie(p){return b=p,o=R(C,e),c?S(p):l}function xe(p){let v=p-u,h=p-b,ee=e-v;return d?Math.min(ee,s-h):ee}function J(p){let v=p-u,h=p-b;return u===void 0||v>=e||v<0||d&&h>=s}function C(){let p=Date.now();if(J(p))return Z(p);o=R(C,xe(p))}function Z(p){return o=void 0,E&&n?S(p):(n=i=void 0,l)}function he(){o!==void 0&&ve(o),b=0,n=u=i=o=void 0}function ge(){return o===void 0?l:Z(Date.now())}function ye(){return o!==void 0}function k(...p){let v=Date.now(),h=J(v);if(n=p,i=this,u=v,h){if(o===void 0)return Ie(u);if(d)return o=R(C,e),S(u)}return o===void 0&&(o=R(C,e)),l}return k.cancel=he,k.flush=ge,k.pending=ye,k}var j=(t,e=0,r)=>z(t,e,{...{leading:!0,trailing:!0},...r,maxWait:e});var P=(t,e)=>{if(t===null||typeof t!="object")return t;let r=Array.isArray(t)?[]:{};for(let n in t){if(typeof e=="function"){let i=e(t[n],n,t,r);if(i!==void 0){r[n]=i;continue}}typeof t[n]=="object"?r[n]=P(t[n],e):r[n]=t[n]}return r};var nt=t=>P(t);var ot=300,it=(t,e=ot)=>new a(r=>{let{width:n,height:i}=t.getBoundingClientRect();if(r.next({width:n,height:i}),!window.ResizeObserver)return;let s=new ResizeObserver(j(l=>{let o=l[0];if(!o)return;let u,b;o.contentBoxSize&&o.contentBoxSize[0]?(b=o.contentBoxSize[0].blockSize,u=o.contentBoxSize[0].inlineSize):o.contentRect&&(u=o.contentRect.width,b=o.contentRect.height),O(u)&&O(b)&&r.next({width:u,height:b})},e));return s.observe(t),()=>s.disconnect()});var M=class extends x{constructor(r){super();this.value=r}next(r){super.next(this.value=r)}error(r){super.error(this.value=r)}getValue(){return this.value}_subscribe(r){let n=super._subscribe(r);return r.next(this.value),n}};function ie(t){return new a(e=>{let r={},n=Object.keys(t).length,i=s=>l=>{s in r||n--,r[s]=l,n===0&&e.next(r)};return Object.entries(t).reduce((s,[l,o])=>s.add(o.subscribe(i(l))),new m)})}function se(...t){return new a(e=>t.reduce((r,n)=>r.add(n.subscribe(e)),new m))}var st=t=>new a(e=>{let r=window.setTimeout(()=>{try{e.next()}catch(n){if(e.error)e.error(n);else throw n}},t);return()=>window.clearTimeout(r)});var at=t=>new a(e=>{let r=window.setInterval(()=>e.next(),t);return()=>{r&&(window.clearInterval(r),r=void 0)}});var lt=t=>new a(e=>{t.forEach(r=>e.next(r))});var ut=(t,e)=>new a(r=>{let n=i=>r.next(i);return t.addEventListener(e,n),()=>t.removeEventListener(e,n)});function ae(t){return e=>new a(r=>e.subscribe(new W(r,t)))}var W=class{constructor(e,r){this.destination=e;this.size=r;this.lastValues=[]}next(e){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(e),this.destination.next(this.lastValues)}error(e){var r,n;(n=(r=this.destination).error)==null||n.call(r,e)}};var ct={leading:!1,trailing:!0};function le(t,e=ct){return r=>new a(n=>r.subscribe(new G(n,t,e)))}var G=class{constructor(e,r,n){this.destination=e;this.time=r;this.config=n}next(e){this.lastValue=e,O(this.timeout)?window.clearTimeout(this.timeout):this.config.leading&&this.destination.next(e),this.timeout=window.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(r){if(this.destination.error)this.destination.error(r);else throw r}this.timeout=void 0},this.time)}error(e){var r,n;(n=(r=this.destination).error)==null||n.call(r,e)}};var pt={leading:!0,trailing:!1};function ue(t,e=pt){return r=>new a(n=>r.subscribe(new q(n,t,e)))}var q=class{constructor(e,r,n){this.destination=e;this.time=r;this.config=n}next(e){this.lastValue=e,Q(this.timeout)&&(this.config.leading&&this.destination.next(e),this.timeout=window.setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(e){var r,n;(n=(r=this.destination).error)==null||n.call(r,e)}};function ce(t){return e=>new a(r=>e.subscribe(new H(r,t)))}var H=class{constructor(e,r){this.destination=e;this.predicate=r}next(e){let r;try{r=this.predicate(e)}catch(n){throw this.error(n),n}r&&this.destination.next(e)}error(e){var r,n;(n=(r=this.destination).error)==null||n.call(r,e)}};function be(t=(e,r)=>e===r){return e=>new a(r=>e.subscribe(new K(r,t)))}var pe={},K=class{constructor(e,r){this.destination=e;this.predicate=r;this.lastValue=pe}next(e){let r;try{r=this.lastValue===pe||!this.predicate(this.lastValue,e),this.lastValue=e}catch(n){throw this.error(n),n}r&&this.destination.next(e)}error(e){var r,n;(n=(r=this.destination).error)==null||n.call(r,e)}};function N(t){return e=>new a(r=>e.subscribe(new $(r,t)))}var $=class{constructor(e,r){this.destination=e;this.mapper=r}next(e){let r;try{r=this.mapper(e)}catch(n){throw this.error(n),n}this.destination.next(r)}error(e){var r,n;(n=(r=this.destination).error)==null||n.call(r,e)}};function de(t){return N(()=>t)}function fe(){return t=>new a(e=>{let r=!1,n=!1,i=t.subscribe(s=>{r||(r=!0,e.next(s)),n&&i.unsubscribe()},s=>{var l;r=!0,(l=e.error)==null||l.call(e,s),n&&i.unsubscribe()});return n=!0,r&&i.unsubscribe(),i})}function me(){return t=>new a(e=>t.subscribe(new Y(e)))}var Y=class{constructor(e){this.destination=e;this.hasLast=!1}next(e){let r=this.last;if(this.last=e,!this.hasLast){this.hasLast=!0;return}this.destination.next([r,e])}error(e){var r,n;(n=(r=this.destination).error)==null||n.call(r,e)}};function Te(t){return e=>new a(r=>e.subscribe(new X(r,t)))}var X=class{constructor(e,r){this.destination=e;this.effect=r}next(e){try{this.effect(e)}catch(r){throw this.error(r),r}this.destination.next(e)}error(e){var r,n;(n=(r=this.destination).error)==null||n.call(r,e)}};var bt=(o=>(o.NETWORK="network",o.VIDEO_PIPELINE="video_pipeline",o.EXTERNAL_API="external_api",o.PARSER="parser",o.DOM="dom",o.WTF="wtf",o.FATAL="fatal",o))(bt||{});var dt=(d=>(d.Armenian="58",d.Azerbaijani="57",d.Belarusian="114",d.English="3",d.Kazakh="97",d.Portuguese="73",d.Russian="0",d.Spanish="4",d.Ukrainian="1",d.Uzbek="65",d.Vietnamese="75",d))(dt||{}),ft="vk.com",Qn=async(t,e,r)=>{let n=new URL(`https://${ft}/js/lang-pack.js`);n.searchParams.set("format","json"),n.searchParams.set("name",e),t!==void 0&&n.searchParams.set("lang",t);let s=await(await fetch(n.toString())).json();return mt(s,r)},mt=(t,e)=>Object.fromEntries(Object.entries(t.keys).map(([r,n])=>[r.substring(`${e}_`.length),Tt(n)])),Tt=t=>Array.isArray(t)?t[0]:t;var vt=(r=>(r.RU="ru",r.EN="en",r))(vt||{});export{re as CurrentClientBrowser,ne as CurrentClientDevice,bt as ErrorCategory,vt as InterfaceLanguage,V as Logger,a as Observable,x as Subject,m as Subscription,Ee as VERSION,dt as VKNumericLanguage,M as ValueSubject,U as VideoQuality,Me as abortable,Le as addScript,et as areQualitiesExact,ke as assertEmptyArray,I as assertNever,Ae as assertNonNullable,Ce as assertNotEmptyArray,Re as assertNullable,tt as assertQualityIsExact,ae as buffer,Se as checkNever,nt as cloneDeep,P as cloneDeepWith,ie as combine,le as debounce,z as debounceFn,qe as detectEmbed,rt as fillWithDefault,ce as filter,be as filterChanged,ut as fromEvent,L as getCurrentBrowser,Ue as getExponentialDelay,Ye as getHighestQuality,Ve as getIOSVersion,at as interval,Qe as isAndroid,He as isHigher,Ke as isHigherOrEqual,Ne as isIOS,F as isInvariantQuality,B as isLower,$e as isLowerOrEqual,_e as isMacLike,De as isMobile,O as isNonNullable,Q as isNullable,Qn as loadVKLangPack,N as map,de as mapTo,se as merge,g as noop,Pe as now,lt as observableFrom,it as observeElementSize,fe as once,me as pairwise,D as safeStorage,Te as tap,ue as throttle,j as throttleFn,Ht as timeCodeToString,st as timeout,Xe as videoHeightToQuality,Ze as videoQualityToHeight,Je as videoSizeToQuality};
package/esnext.cjs.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @vkontakte/videoplayer-shared v1.0.37-dev.2e9cb822.0
3
- * Fri, 05 Jul 2024 08:48:33 GMT
2
+ * @vkontakte/videoplayer-shared v1.0.37-dev.511f8223.0
3
+ * Wed, 17 Jul 2024 10:03:53 GMT
4
4
  * https://st.mycdn.me/static/vkontakte-videoplayer/1-0-37/doc/
5
5
  */
6
- "use strict";var cs=Object.create;var Te=Object.defineProperty;var fs=Object.getOwnPropertyDescriptor;var ps=Object.getOwnPropertyNames;var vs=Object.getPrototypeOf,bs=Object.prototype.hasOwnProperty;var i=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),At=(e,r)=>{for(var t in r)Te(e,t,{get:r[t],enumerable:!0})},_t=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of ps(r))!bs.call(e,o)&&o!==t&&Te(e,o,{get:()=>r[o],enumerable:!(n=fs(r,o))||n.enumerable});return e};var ds=(e,r,t)=>(t=e!=null?cs(vs(e)):{},_t(r||!e||!e.__esModule?Te(t,"default",{value:e,enumerable:!0}):t,e)),ms=e=>_t(Te({},"__esModule",{value:!0}),e);var A=i((Xb,mn)=>{"use strict";mn.exports=function(e){try{return!!e()}catch{return!0}}});var se=i((Jb,Tn)=>{"use strict";var qs=A();Tn.exports=!qs(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var C=i((Zb,gn)=>{"use strict";var yn=se(),hn=Function.prototype,xr=hn.call,Rs=yn&&hn.bind.bind(xr,xr);gn.exports=yn?Rs:function(e){return function(){return xr.apply(e,arguments)}}});var qe=i((ed,On)=>{"use strict";var In=C(),Ps=In({}.toString),As=In("".slice);On.exports=function(e){return As(Ps(e),8,-1)}});var En=i((rd,xn)=>{"use strict";var _s=C(),Ls=A(),Cs=qe(),Er=Object,Ns=_s("".split);xn.exports=Ls(function(){return!Er("z").propertyIsEnumerable(0)})?function(e){return Cs(e)=="String"?Ns(e,""):Er(e)}:Er});var Re=i((td,Sn)=>{"use strict";Sn.exports=function(e){return e==null}});var Sr=i((nd,wn)=>{"use strict";var js=Re(),Ms=TypeError;wn.exports=function(e){if(js(e))throw Ms("Can't call method on "+e);return e}});var H=i((od,qn)=>{"use strict";var ks=En(),Ds=Sr();qn.exports=function(e){return ks(Ds(e))}});var Pn=i((id,Rn)=>{"use strict";Rn.exports=function(){}});var Q=i((ad,An)=>{"use strict";An.exports={}});var S=i((_n,Ln)=>{"use strict";var Pe=function(e){return e&&e.Math==Math&&e};Ln.exports=Pe(typeof globalThis=="object"&&globalThis)||Pe(typeof window=="object"&&window)||Pe(typeof self=="object"&&self)||Pe(typeof global=="object"&&global)||function(){return this}()||_n||Function("return this")()});var qr=i((sd,Cn)=>{"use strict";var wr=typeof document=="object"&&document.all,Vs=typeof wr>"u"&&wr!==void 0;Cn.exports={all:wr,IS_HTMLDDA:Vs}});var O=i((ud,jn)=>{"use strict";var Nn=qr(),Fs=Nn.all;jn.exports=Nn.IS_HTMLDDA?function(e){return typeof e=="function"||e===Fs}:function(e){return typeof e=="function"}});var Dn=i((ld,kn)=>{"use strict";var Us=S(),Gs=O(),Mn=Us.WeakMap;kn.exports=Gs(Mn)&&/native code/.test(String(Mn))});var B=i((cd,Un)=>{"use strict";var Vn=O(),Fn=qr(),Qs=Fn.all;Un.exports=Fn.IS_HTMLDDA?function(e){return typeof e=="object"?e!==null:Vn(e)||e===Qs}:function(e){return typeof e=="object"?e!==null:Vn(e)}});var N=i((fd,Gn)=>{"use strict";var Bs=A();Gn.exports=!Bs(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var Pr=i((pd,Bn)=>{"use strict";var $s=S(),Qn=B(),Rr=$s.document,Ws=Qn(Rr)&&Qn(Rr.createElement);Bn.exports=function(e){return Ws?Rr.createElement(e):{}}});var Ar=i((vd,$n)=>{"use strict";var zs=N(),Ks=A(),Ys=Pr();$n.exports=!zs&&!Ks(function(){return Object.defineProperty(Ys("div"),"a",{get:function(){return 7}}).a!=7})});var _r=i((bd,Wn)=>{"use strict";var Hs=N(),Xs=A();Wn.exports=Hs&&Xs(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})});var D=i((dd,zn)=>{"use strict";var Js=B(),Zs=String,eu=TypeError;zn.exports=function(e){if(Js(e))return e;throw eu(Zs(e)+" is not an object")}});var V=i((md,Kn)=>{"use strict";var ru=se(),Ae=Function.prototype.call;Kn.exports=ru?Ae.bind(Ae):function(){return Ae.apply(Ae,arguments)}});var _e=i((Td,Yn)=>{"use strict";Yn.exports={}});var Nr=i((yd,Xn)=>{"use strict";var Lr=_e(),Cr=S(),tu=O(),Hn=function(e){return tu(e)?e:void 0};Xn.exports=function(e,r){return arguments.length<2?Hn(Lr[e])||Hn(Cr[e]):Lr[e]&&Lr[e][r]||Cr[e]&&Cr[e][r]}});var jr=i((hd,Jn)=>{"use strict";var nu=C();Jn.exports=nu({}.isPrototypeOf)});var eo=i((gd,Zn)=>{"use strict";Zn.exports=typeof navigator<"u"&&String(navigator.userAgent)||""});var so=i((Id,ao)=>{"use strict";var io=S(),Mr=eo(),ro=io.process,to=io.Deno,no=ro&&ro.versions||to&&to.version,oo=no&&no.v8,q,Le;oo&&(q=oo.split("."),Le=q[0]>0&&q[0]<4?1:+(q[0]+q[1]));!Le&&Mr&&(q=Mr.match(/Edge\/(\d+)/),(!q||q[1]>=74)&&(q=Mr.match(/Chrome\/(\d+)/),q&&(Le=+q[1])));ao.exports=Le});var kr=i((Od,lo)=>{"use strict";var uo=so(),ou=A(),iu=S(),au=iu.String;lo.exports=!!Object.getOwnPropertySymbols&&!ou(function(){var e=Symbol();return!au(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&uo&&uo<41})});var Dr=i((xd,co)=>{"use strict";var su=kr();co.exports=su&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Vr=i((Ed,fo)=>{"use strict";var uu=Nr(),lu=O(),cu=jr(),fu=Dr(),pu=Object;fo.exports=fu?function(e){return typeof e=="symbol"}:function(e){var r=uu("Symbol");return lu(r)&&cu(r.prototype,pu(e))}});var Ce=i((Sd,po)=>{"use strict";var vu=String;po.exports=function(e){try{return vu(e)}catch{return"Object"}}});var ue=i((wd,vo)=>{"use strict";var bu=O(),du=Ce(),mu=TypeError;vo.exports=function(e){if(bu(e))return e;throw mu(du(e)+" is not a function")}});var Ne=i((qd,bo)=>{"use strict";var Tu=ue(),yu=Re();bo.exports=function(e,r){var t=e[r];return yu(t)?void 0:Tu(t)}});var To=i((Rd,mo)=>{"use strict";var Fr=V(),Ur=O(),Gr=B(),hu=TypeError;mo.exports=function(e,r){var t,n;if(r==="string"&&Ur(t=e.toString)&&!Gr(n=Fr(t,e))||Ur(t=e.valueOf)&&!Gr(n=Fr(t,e))||r!=="string"&&Ur(t=e.toString)&&!Gr(n=Fr(t,e)))return n;throw hu("Can't convert object to primitive value")}});var le=i((Pd,yo)=>{"use strict";yo.exports=!0});var Io=i((Ad,go)=>{"use strict";var ho=S(),gu=Object.defineProperty;go.exports=function(e,r){try{gu(ho,e,{value:r,configurable:!0,writable:!0})}catch{ho[e]=r}return r}});var Qr=i((_d,xo)=>{"use strict";var Iu=S(),Ou=Io(),Oo="__core-js_shared__",xu=Iu[Oo]||Ou(Oo,{});xo.exports=xu});var Br=i((Ld,So)=>{"use strict";var Eu=le(),Eo=Qr();(So.exports=function(e,r){return Eo[e]||(Eo[e]=r!==void 0?r:{})})("versions",[]).push({version:"3.31.0",mode:Eu?"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 $r=i((Cd,wo)=>{"use strict";var Su=Sr(),wu=Object;wo.exports=function(e){return wu(Su(e))}});var j=i((Nd,qo)=>{"use strict";var qu=C(),Ru=$r(),Pu=qu({}.hasOwnProperty);qo.exports=Object.hasOwn||function(r,t){return Pu(Ru(r),t)}});var Wr=i((jd,Ro)=>{"use strict";var Au=C(),_u=0,Lu=Math.random(),Cu=Au(1 .toString);Ro.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Cu(++_u+Lu,36)}});var _=i((Md,Ao)=>{"use strict";var Nu=S(),ju=Br(),Po=j(),Mu=Wr(),ku=kr(),Du=Dr(),X=Nu.Symbol,zr=ju("wks"),Vu=Du?X.for||X:X&&X.withoutSetter||Mu;Ao.exports=function(e){return Po(zr,e)||(zr[e]=ku&&Po(X,e)?X[e]:Vu("Symbol."+e)),zr[e]}});var No=i((kd,Co)=>{"use strict";var Fu=V(),_o=B(),Lo=Vr(),Uu=Ne(),Gu=To(),Qu=_(),Bu=TypeError,$u=Qu("toPrimitive");Co.exports=function(e,r){if(!_o(e)||Lo(e))return e;var t=Uu(e,$u),n;if(t){if(r===void 0&&(r="default"),n=Fu(t,e,r),!_o(n)||Lo(n))return n;throw Bu("Can't convert object to primitive value")}return r===void 0&&(r="number"),Gu(e,r)}});var je=i((Dd,jo)=>{"use strict";var Wu=No(),zu=Vr();jo.exports=function(e){var r=Wu(e,"string");return zu(r)?r:r+""}});var J=i(ko=>{"use strict";var Ku=N(),Yu=Ar(),Hu=_r(),Me=D(),Mo=je(),Xu=TypeError,Kr=Object.defineProperty,Ju=Object.getOwnPropertyDescriptor,Yr="enumerable",Hr="configurable",Xr="writable";ko.f=Ku?Hu?function(r,t,n){if(Me(r),t=Mo(t),Me(n),typeof r=="function"&&t==="prototype"&&"value"in n&&Xr in n&&!n[Xr]){var o=Ju(r,t);o&&o[Xr]&&(r[t]=n.value,n={configurable:Hr in n?n[Hr]:o[Hr],enumerable:Yr in n?n[Yr]:o[Yr],writable:!1})}return Kr(r,t,n)}:Kr:function(r,t,n){if(Me(r),t=Mo(t),Me(n),Yu)try{return Kr(r,t,n)}catch{}if("get"in n||"set"in n)throw Xu("Accessors not supported");return"value"in n&&(r[t]=n.value),r}});var ce=i((Fd,Do)=>{"use strict";Do.exports=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}});var $=i((Ud,Vo)=>{"use strict";var Zu=N(),el=J(),rl=ce();Vo.exports=Zu?function(e,r,t){return el.f(e,r,rl(1,t))}:function(e,r,t){return e[r]=t,e}});var ke=i((Gd,Uo)=>{"use strict";var tl=Br(),nl=Wr(),Fo=tl("keys");Uo.exports=function(e){return Fo[e]||(Fo[e]=nl(e))}});var De=i((Qd,Go)=>{"use strict";Go.exports={}});var Wo=i((Bd,$o)=>{"use strict";var ol=Dn(),Bo=S(),il=B(),al=$(),Jr=j(),Zr=Qr(),sl=ke(),ul=De(),Qo="Object already initialized",et=Bo.TypeError,ll=Bo.WeakMap,Ve,fe,Fe,cl=function(e){return Fe(e)?fe(e):Ve(e,{})},fl=function(e){return function(r){var t;if(!il(r)||(t=fe(r)).type!==e)throw et("Incompatible receiver, "+e+" required");return t}};ol||Zr.state?(R=Zr.state||(Zr.state=new ll),R.get=R.get,R.has=R.has,R.set=R.set,Ve=function(e,r){if(R.has(e))throw et(Qo);return r.facade=e,R.set(e,r),r},fe=function(e){return R.get(e)||{}},Fe=function(e){return R.has(e)}):(W=sl("state"),ul[W]=!0,Ve=function(e,r){if(Jr(e,W))throw et(Qo);return r.facade=e,al(e,W,r),r},fe=function(e){return Jr(e,W)?e[W]:{}},Fe=function(e){return Jr(e,W)});var R,W;$o.exports={set:Ve,get:fe,has:Fe,enforce:cl,getterFor:fl}});var Xo=i(($d,Ho)=>{"use strict";var pl=se(),Yo=Function.prototype,zo=Yo.apply,Ko=Yo.call;Ho.exports=typeof Reflect=="object"&&Reflect.apply||(pl?Ko.bind(zo):function(){return Ko.apply(zo,arguments)})});var rt=i((Wd,Jo)=>{"use strict";var vl=qe(),bl=C();Jo.exports=function(e){if(vl(e)==="Function")return bl(e)}});var ti=i(ri=>{"use strict";var Zo={}.propertyIsEnumerable,ei=Object.getOwnPropertyDescriptor,dl=ei&&!Zo.call({1:2},1);ri.f=dl?function(r){var t=ei(this,r);return!!t&&t.enumerable}:Zo});var ii=i(oi=>{"use strict";var ml=N(),Tl=V(),yl=ti(),hl=ce(),gl=H(),Il=je(),Ol=j(),xl=Ar(),ni=Object.getOwnPropertyDescriptor;oi.f=ml?ni:function(r,t){if(r=gl(r),t=Il(t),xl)try{return ni(r,t)}catch{}if(Ol(r,t))return hl(!Tl(yl.f,r,t),r[t])}});var si=i((Yd,ai)=>{"use strict";var El=A(),Sl=O(),wl=/#|\.prototype\./,pe=function(e,r){var t=Rl[ql(e)];return t==Al?!0:t==Pl?!1:Sl(r)?El(r):!!r},ql=pe.normalize=function(e){return String(e).replace(wl,".").toLowerCase()},Rl=pe.data={},Pl=pe.NATIVE="N",Al=pe.POLYFILL="P";ai.exports=pe});var tt=i((Hd,li)=>{"use strict";var ui=rt(),_l=ue(),Ll=se(),Cl=ui(ui.bind);li.exports=function(e,r){return _l(e),r===void 0?e:Ll?Cl(e,r):function(){return e.apply(r,arguments)}}});var nt=i((Xd,fi)=>{"use strict";var Ue=S(),Nl=Xo(),jl=rt(),Ml=O(),kl=ii().f,Dl=si(),Z=_e(),Vl=tt(),ee=$(),ci=j(),Fl=function(e){var r=function(t,n,o){if(this instanceof r){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,o)}return Nl(e,this,arguments)};return r.prototype=e.prototype,r};fi.exports=function(e,r){var t=e.target,n=e.global,o=e.stat,a=e.proto,s=n?Ue:o?Ue[t]:(Ue[t]||{}).prototype,u=n?Z:Z[t]||ee(Z,t,{})[t],f=u.prototype,l,c,p,b,d,T,y,I,h;for(b in r)l=Dl(n?b:t+(o?".":"#")+b,e.forced),c=!l&&s&&ci(s,b),T=u[b],c&&(e.dontCallGetSet?(h=kl(s,b),y=h&&h.value):y=s[b]),d=c&&y?y:r[b],!(c&&typeof T==typeof d)&&(e.bind&&c?I=Vl(d,Ue):e.wrap&&c?I=Fl(d):a&&Ml(d)?I=jl(d):I=d,(e.sham||d&&d.sham||T&&T.sham)&&ee(I,"sham",!0),ee(u,b,I),a&&(p=t+"Prototype",ci(Z,p)||ee(Z,p,{}),ee(Z[p],b,d),e.real&&f&&(l||!f[b])&&ee(f,b,d)))}});var bi=i((Jd,vi)=>{"use strict";var ot=N(),Ul=j(),pi=Function.prototype,Gl=ot&&Object.getOwnPropertyDescriptor,it=Ul(pi,"name"),Ql=it&&function(){}.name==="something",Bl=it&&(!ot||ot&&Gl(pi,"name").configurable);vi.exports={EXISTS:it,PROPER:Ql,CONFIGURABLE:Bl}});var mi=i((Zd,di)=>{"use strict";var $l=Math.ceil,Wl=Math.floor;di.exports=Math.trunc||function(r){var t=+r;return(t>0?Wl:$l)(t)}});var at=i((em,Ti)=>{"use strict";var zl=mi();Ti.exports=function(e){var r=+e;return r!==r||r===0?0:zl(r)}});var hi=i((rm,yi)=>{"use strict";var Kl=at(),Yl=Math.max,Hl=Math.min;yi.exports=function(e,r){var t=Kl(e);return t<0?Yl(t+r,0):Hl(t,r)}});var Ii=i((tm,gi)=>{"use strict";var Xl=at(),Jl=Math.min;gi.exports=function(e){return e>0?Jl(Xl(e),9007199254740991):0}});var st=i((nm,Oi)=>{"use strict";var Zl=Ii();Oi.exports=function(e){return Zl(e.length)}});var Si=i((om,Ei)=>{"use strict";var ec=H(),rc=hi(),tc=st(),xi=function(e){return function(r,t,n){var o=ec(r),a=tc(o),s=rc(n,a),u;if(e&&t!=t){for(;a>s;)if(u=o[s++],u!=u)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===t)return e||s||0;return!e&&-1}};Ei.exports={includes:xi(!0),indexOf:xi(!1)}});var Ri=i((im,qi)=>{"use strict";var nc=C(),ut=j(),oc=H(),ic=Si().indexOf,ac=De(),wi=nc([].push);qi.exports=function(e,r){var t=oc(e),n=0,o=[],a;for(a in t)!ut(ac,a)&&ut(t,a)&&wi(o,a);for(;r.length>n;)ut(t,a=r[n++])&&(~ic(o,a)||wi(o,a));return o}});var lt=i((am,Pi)=>{"use strict";Pi.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var _i=i((sm,Ai)=>{"use strict";var sc=Ri(),uc=lt();Ai.exports=Object.keys||function(r){return sc(r,uc)}});var Ci=i(Li=>{"use strict";var lc=N(),cc=_r(),fc=J(),pc=D(),vc=H(),bc=_i();Li.f=lc&&!cc?Object.defineProperties:function(r,t){pc(r);for(var n=vc(t),o=bc(t),a=o.length,s=0,u;a>s;)fc.f(r,u=o[s++],n[u]);return r}});var ji=i((lm,Ni)=>{"use strict";var dc=Nr();Ni.exports=dc("document","documentElement")});var vt=i((cm,Gi)=>{"use strict";var mc=D(),Tc=Ci(),Mi=lt(),yc=De(),hc=ji(),gc=Pr(),Ic=ke(),ki=">",Di="<",ft="prototype",pt="script",Fi=Ic("IE_PROTO"),ct=function(){},Ui=function(e){return Di+pt+ki+e+Di+"/"+pt+ki},Vi=function(e){e.write(Ui("")),e.close();var r=e.parentWindow.Object;return e=null,r},Oc=function(){var e=gc("iframe"),r="java"+pt+":",t;return e.style.display="none",hc.appendChild(e),e.src=String(r),t=e.contentWindow.document,t.open(),t.write(Ui("document.F=Object")),t.close(),t.F},Ge,Qe=function(){try{Ge=new ActiveXObject("htmlfile")}catch{}Qe=typeof document<"u"?document.domain&&Ge?Vi(Ge):Oc():Vi(Ge);for(var e=Mi.length;e--;)delete Qe[ft][Mi[e]];return Qe()};yc[Fi]=!0;Gi.exports=Object.create||function(r,t){var n;return r!==null?(ct[ft]=mc(r),n=new ct,ct[ft]=null,n[Fi]=r):n=Qe(),t===void 0?n:Tc.f(n,t)}});var Bi=i((fm,Qi)=>{"use strict";var xc=A();Qi.exports=!xc(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})});var dt=i((pm,Wi)=>{"use strict";var Ec=j(),Sc=O(),wc=$r(),qc=ke(),Rc=Bi(),$i=qc("IE_PROTO"),bt=Object,Pc=bt.prototype;Wi.exports=Rc?bt.getPrototypeOf:function(e){var r=wc(e);if(Ec(r,$i))return r[$i];var t=r.constructor;return Sc(t)&&r instanceof t?t.prototype:r instanceof bt?Pc:null}});var mt=i((vm,zi)=>{"use strict";var Ac=$();zi.exports=function(e,r,t,n){return n&&n.enumerable?e[r]=t:Ac(e,r,t),e}});var gt=i((bm,Hi)=>{"use strict";var _c=A(),Lc=O(),Cc=B(),Nc=vt(),Ki=dt(),jc=mt(),Mc=_(),kc=le(),ht=Mc("iterator"),Yi=!1,M,Tt,yt;[].keys&&(yt=[].keys(),"next"in yt?(Tt=Ki(Ki(yt)),Tt!==Object.prototype&&(M=Tt)):Yi=!0);var Dc=!Cc(M)||_c(function(){var e={};return M[ht].call(e)!==e});Dc?M={}:kc&&(M=Nc(M));Lc(M[ht])||jc(M,ht,function(){return this});Hi.exports={IteratorPrototype:M,BUGGY_SAFARI_ITERATORS:Yi}});var Be=i((dm,Ji)=>{"use strict";var Vc=_(),Fc=Vc("toStringTag"),Xi={};Xi[Fc]="z";Ji.exports=String(Xi)==="[object z]"});var We=i((mm,Zi)=>{"use strict";var Uc=Be(),Gc=O(),$e=qe(),Qc=_(),Bc=Qc("toStringTag"),$c=Object,Wc=$e(function(){return arguments}())=="Arguments",zc=function(e,r){try{return e[r]}catch{}};Zi.exports=Uc?$e:function(e){var r,t,n;return e===void 0?"Undefined":e===null?"Null":typeof(t=zc(r=$c(e),Bc))=="string"?t:Wc?$e(r):(n=$e(r))=="Object"&&Gc(r.callee)?"Arguments":n}});var ra=i((Tm,ea)=>{"use strict";var Kc=Be(),Yc=We();ea.exports=Kc?{}.toString:function(){return"[object "+Yc(this)+"]"}});var It=i((ym,na)=>{"use strict";var Hc=Be(),Xc=J().f,Jc=$(),Zc=j(),ef=ra(),rf=_(),ta=rf("toStringTag");na.exports=function(e,r,t,n){if(e){var o=t?e:e.prototype;Zc(o,ta)||Xc(o,ta,{configurable:!0,value:r}),n&&!Hc&&Jc(o,"toString",ef)}}});var ia=i((hm,oa)=>{"use strict";var tf=gt().IteratorPrototype,nf=vt(),of=ce(),af=It(),sf=Q(),uf=function(){return this};oa.exports=function(e,r,t,n){var o=r+" Iterator";return e.prototype=nf(tf,{next:of(+!n,t)}),af(e,o,!1,!0),sf[o]=uf,e}});var sa=i((gm,aa)=>{"use strict";var lf=C(),cf=ue();aa.exports=function(e,r,t){try{return lf(cf(Object.getOwnPropertyDescriptor(e,r)[t]))}catch{}}});var la=i((Im,ua)=>{"use strict";var ff=O(),pf=String,vf=TypeError;ua.exports=function(e){if(typeof e=="object"||ff(e))return e;throw vf("Can't set "+pf(e)+" as a prototype")}});var fa=i((Om,ca)=>{"use strict";var bf=sa(),df=D(),mf=la();ca.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,r={},t;try{t=bf(Object.prototype,"__proto__","set"),t(r,[]),e=r instanceof Array}catch{}return function(o,a){return df(o),mf(a),e?t(o,a):o.__proto__=a,o}}():void 0)});var Oa=i((xm,Ia)=>{"use strict";var Tf=nt(),yf=V(),ze=le(),ha=bi(),hf=O(),gf=ia(),pa=dt(),va=fa(),If=It(),Of=$(),Ot=mt(),xf=_(),ba=Q(),ga=gt(),Ef=ha.PROPER,Sf=ha.CONFIGURABLE,da=ga.IteratorPrototype,Ke=ga.BUGGY_SAFARI_ITERATORS,ve=xf("iterator"),ma="keys",be="values",Ta="entries",ya=function(){return this};Ia.exports=function(e,r,t,n,o,a,s){gf(t,r,n);var u=function(h){if(h===o&&b)return b;if(!Ke&&h in c)return c[h];switch(h){case ma:return function(){return new t(this,h)};case be:return function(){return new t(this,h)};case Ta:return function(){return new t(this,h)}}return function(){return new t(this)}},f=r+" Iterator",l=!1,c=e.prototype,p=c[ve]||c["@@iterator"]||o&&c[o],b=!Ke&&p||u(o),d=r=="Array"&&c.entries||p,T,y,I;if(d&&(T=pa(d.call(new e)),T!==Object.prototype&&T.next&&(!ze&&pa(T)!==da&&(va?va(T,da):hf(T[ve])||Ot(T,ve,ya)),If(T,f,!0,!0),ze&&(ba[f]=ya))),Ef&&o==be&&p&&p.name!==be&&(!ze&&Sf?Of(c,"name",be):(l=!0,b=function(){return yf(p,this)})),o)if(y={values:u(be),keys:a?b:u(ma),entries:u(Ta)},s)for(I in y)(Ke||l||!(I in c))&&Ot(c,I,y[I]);else Tf({target:r,proto:!0,forced:Ke||l},y);return(!ze||s)&&c[ve]!==b&&Ot(c,ve,b,{name:o}),ba[r]=b,y}});var Ea=i((Em,xa)=>{"use strict";xa.exports=function(e,r){return{value:e,done:r}}});var Et=i((Sm,Pa)=>{"use strict";var wf=H(),xt=Pn(),Sa=Q(),qa=Wo(),qf=J().f,Rf=Oa(),Ye=Ea(),Pf=le(),Af=N(),Ra="Array Iterator",_f=qa.set,Lf=qa.getterFor(Ra);Pa.exports=Rf(Array,"Array",function(e,r){_f(this,{type:Ra,target:wf(e),index:0,kind:r})},function(){var e=Lf(this),r=e.target,t=e.kind,n=e.index++;return!r||n>=r.length?(e.target=void 0,Ye(void 0,!0)):t=="keys"?Ye(n,!1):t=="values"?Ye(r[n],!1):Ye([n,r[n]],!1)},"values");var wa=Sa.Arguments=Sa.Array;xt("keys");xt("values");xt("entries");if(!Pf&&Af&&wa.name!=="values")try{qf(wa,"name",{value:"values"})}catch{}});var _a=i((wm,Aa)=>{"use strict";var Cf=_(),Nf=Q(),jf=Cf("iterator"),Mf=Array.prototype;Aa.exports=function(e){return e!==void 0&&(Nf.Array===e||Mf[jf]===e)}});var St=i((qm,Ca)=>{"use strict";var kf=We(),La=Ne(),Df=Re(),Vf=Q(),Ff=_(),Uf=Ff("iterator");Ca.exports=function(e){if(!Df(e))return La(e,Uf)||La(e,"@@iterator")||Vf[kf(e)]}});var ja=i((Rm,Na)=>{"use strict";var Gf=V(),Qf=ue(),Bf=D(),$f=Ce(),Wf=St(),zf=TypeError;Na.exports=function(e,r){var t=arguments.length<2?Wf(e):r;if(Qf(t))return Bf(Gf(t,e));throw zf($f(e)+" is not iterable")}});var Da=i((Pm,ka)=>{"use strict";var Kf=V(),Ma=D(),Yf=Ne();ka.exports=function(e,r,t){var n,o;Ma(e);try{if(n=Yf(e,"return"),!n){if(r==="throw")throw t;return t}n=Kf(n,e)}catch(a){o=!0,n=a}if(r==="throw")throw t;if(o)throw n;return Ma(n),t}});var Qa=i((Am,Ga)=>{"use strict";var Hf=tt(),Xf=V(),Jf=D(),Zf=Ce(),ep=_a(),rp=st(),Va=jr(),tp=ja(),np=St(),Fa=Da(),op=TypeError,He=function(e,r){this.stopped=e,this.result=r},Ua=He.prototype;Ga.exports=function(e,r,t){var n=t&&t.that,o=!!(t&&t.AS_ENTRIES),a=!!(t&&t.IS_RECORD),s=!!(t&&t.IS_ITERATOR),u=!!(t&&t.INTERRUPTED),f=Hf(r,n),l,c,p,b,d,T,y,I=function(g){return l&&Fa(l,"normal",g),new He(!0,g)},h=function(g){return o?(Jf(g),u?f(g[0],g[1],I):f(g[0],g[1])):u?f(g,I):f(g)};if(a)l=e.iterator;else if(s)l=e;else{if(c=np(e),!c)throw op(Zf(e)+" is not iterable");if(ep(c)){for(p=0,b=rp(e);b>p;p++)if(d=h(e[p]),d&&Va(Ua,d))return d;return new He(!1)}l=tp(e,c)}for(T=a?e.next:l.next;!(y=Xf(T,l)).done;){try{d=h(y.value)}catch(g){Fa(l,"throw",g)}if(typeof d=="object"&&d&&Va(Ua,d))return d}return new He(!1)}});var $a=i((_m,Ba)=>{"use strict";var ip=je(),ap=J(),sp=ce();Ba.exports=function(e,r,t){var n=ip(r);n in e?ap.f(e,n,sp(0,t)):e[n]=t}});var Wa=i(()=>{"use strict";var up=nt(),lp=Qa(),cp=$a();up({target:"Object",stat:!0},{fromEntries:function(r){var t={};return lp(r,function(n,o){cp(t,n,o)},{AS_ENTRIES:!0}),t}})});var Ka=i((Nm,za)=>{"use strict";Et();Wa();var fp=_e();za.exports=fp.Object.fromEntries});var Ha=i((jm,Ya)=>{"use strict";Ya.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 Za=i(()=>{"use strict";Et();var pp=Ha(),vp=S(),bp=We(),dp=$(),Xa=Q(),mp=_(),Ja=mp("toStringTag");for(Xe in pp)wt=vp[Xe],Je=wt&&wt.prototype,Je&&bp(Je)!==Ja&&dp(Je,Ja,Xe),Xa[Xe]=Xa.Array;var wt,Je,Xe});var rs=i((Dm,es)=>{"use strict";var Tp=Ka();Za();es.exports=Tp});var ns=i((Vm,ts)=>{"use strict";var yp=rs();ts.exports=yp});var xp={};At(xp,{CurrentClientBrowser:()=>Ze,CurrentClientDevice:()=>er,ErrorCategory:()=>vn,InterfaceLanguage:()=>as,Logger:()=>ye,Observable:()=>v,Subject:()=>L,Subscription:()=>x,VERSION:()=>Lt,VKNumericLanguage:()=>is,ValueSubject:()=>ne,VideoQuality:()=>ge,abortable:()=>Ft,addScript:()=>Dt,areQualitiesExact:()=>tn,assertEmptyArray:()=>kt,assertNever:()=>P,assertNonNullable:()=>Nt,assertNotEmptyArray:()=>Mt,assertNullable:()=>jt,assertQualityIsExact:()=>nn,buffer:()=>ar,checkNever:()=>Ct,cloneDeep:()=>an,cloneDeepWith:()=>te,combine:()=>nr,debounce:()=>ur,debounceFn:()=>xe,detectEmbed:()=>zt,fillWithDefault:()=>on,filter:()=>pr,filterChanged:()=>br,fromEvent:()=>fn,getCurrentBrowser:()=>re,getExponentialDelay:()=>Wt,getHighestQuality:()=>Xt,getIOSVersion:()=>Gt,interval:()=>ln,isAndroid:()=>Qt,isHigher:()=>Kt,isHigherOrEqual:()=>Yt,isIOS:()=>Ut,isInvariantQuality:()=>Oe,isLower:()=>Ie,isLowerOrEqual:()=>Ht,isMacLike:()=>Bt,isMobile:()=>$t,isNonNullable:()=>U,isNullable:()=>he,loadVKLangPack:()=>gp,map:()=>oe,mapTo:()=>mr,merge:()=>or,noop:()=>k,now:()=>Vt,observableFrom:()=>cn,observeElementSize:()=>sn,once:()=>Tr,pairwise:()=>hr,safeStorage:()=>tr,tap:()=>Ir,throttle:()=>cr,throttleFn:()=>Ee,timeCodeToString:()=>xs,timeout:()=>un,videoHeightToQuality:()=>Zt,videoQualityToHeight:()=>rn,videoSizeToQuality:()=>en});module.exports=ms(xp);var Lt="__VERSION__";var x=class{constructor(){this.subscriptions=[]}unsubscribe(){let r=this.subscriptions;this.subscriptions=[],r.forEach(t=>typeof t=="function"?t():t.unsubscribe())}add(r){return this.subscriptions.push(r),this}};var P=e=>{throw new Error(`${e} is value of unexpected type`)},Ct=e=>{};var k=()=>{};var v=class{constructor(r){r&&(this._subscribe=r)}subscribe(r,t){let n;t?typeof t=="function"?n={next:t,error:k}:n={next:s=>t.next(s),error:s=>t.error?.(s)}:n={next:k,error:k};let o=typeof r=="function"?{next:s=>{try{r(s)}catch(u){n.next(u)}},error:s=>n.next(s)}:{next:s=>r.next(s),error:s=>r.error?r.error(s):n.next(s)},a;try{a=this._subscribe(o)}catch(s){o.error?.(s)}return new x().add(()=>{switch(o.next=k,o.error=k,typeof a){case"function":a();return;case"object":a.unsubscribe();return;case"undefined":return;default:return P(a)}})}pipe(...r){return r.reduce((t,n)=>n(t),this)}_subscribe(r){}};var L=class extends v{constructor(){super();this.keyCounter=0;this.subscribers=new Map}next(t){this.subscribers.forEach(n=>n.next(t))}error(t){this.subscribers.forEach(n=>n.error?.(t))}_subscribe(t){let n=this.keyCounter++;return this.subscribers.set(n,t),new x().add(()=>this.subscribers.delete(n))}};var ye=class{constructor(){this.log$=new L;this.logs=[];this.log=r=>{let t={...r,timestamp:Date.now()};this.logs.push(t),this.log$.next(t)};this.getAllLogs=()=>this.logs}createCustomLog(r){return(...t)=>{let n;try{n=r(...t)}catch{n={message:"error in `createCustomLog`",component:"Logger"}}this.log(n)}}createComponentLog(r){return this.createCustomLog(t=>({component:r,...t}))}};function Nt(e,r='Assertion "value is not nullable" failed'){if(e==null)throw new Error(r)}function jt(e,r='Assertion "value is nullable" failed'){if(e!=null)throw new Error(r)}function U(e){return typeof e<"u"&&e!==null}function he(e){return e==null}function Mt(e,r){if(!e?.length)throw new Error(r)}function kt(e,r){if(e?.length)throw new Error(r)}var Dt=(e,r,t)=>new Promise((n,o)=>{r.addEventListener("abort",()=>{u(),l.remove()});let a=()=>{u(),o()},s=()=>{u(),n()},u=()=>{f&&clearTimeout(f),l.removeEventListener("load",s),l.removeEventListener("error",a)},f;t&&(f=window.setTimeout(a,t));let l=document.createElement("script");l.addEventListener("load",s),l.addEventListener("error",a),l.src=e,document.head.appendChild(l)});var Vt=typeof window.performance?.now=="function"?()=>window.performance.now():()=>Date.now();var Ft=(e,r)=>async(...t)=>{let n=r(...t),o=e.aborted,a;for(;!o&&!e.aborted;)try{let s=await n.next(a);o=s.done??!1,a=s.value}catch(s){await n.throw(s)}return a};var Ze=(l=>(l.Unknown="Unknown",l.Yandex="Yandex",l.Chrome="Chrome",l.Chromium="Chromium",l.Firefox="Firefox",l.Safari="Safari",l.Opera="Opera",l.Edge="Edge",l.Rest="Rest",l))(Ze||{}),er=(f=>(f.Unknown="Unknown",f.Android="Android",f.iPhone="iPhone",f.iPad="iPad",f.iPod="iPod",f.RestMobile="RestMobile",f.Mac="Mac",f.Desktop="Desktop",f))(er||{}),re=()=>{let{userAgent:e}=window.navigator,r=/yabrowser/i.test(e)?"Yandex":void 0,t=/chrome|crios/i.test(e)?"Chrome":void 0,n=/chromium/i.test(e)?"Chromium":void 0,o=/firefox|fxios/i.test(e)?"Firefox":void 0,a=/webkit|safari|khtml/i.test(e)?"Safari":void 0,s=/opr\//i.test(e)?"Opera":void 0,u=/edg/i.test(e)?"Edge":void 0,f=/android/i.test(e)?"Android":void 0,l=/iphone/i.test(e)?"iPhone":void 0,c=/ipad/i.test(e)?"iPad":void 0,p=/ipod/i.test(e)?"iPod":void 0,b=/mac/i.test(e)?"Mac":void 0,d=/webOS|BlackBerry|IEMobile|Opera Mini/i.test(e)?"RestMobile":void 0;return{browser:r||o||s||u||t||n||a||"Rest",device:f||l||c||p||d||b||"Desktop"}},Ut=(e=!1)=>{let t=["iPhone","iPad","iPod"].includes(re().device);if(!e)return t;let{userAgent:n,maxTouchPoints:o}=window.navigator;return!!(t||/macintosh/i.test(n)&&o>0)},Gt=()=>{let{userAgent:e}=window.navigator,r=e.match(/Version\/(\d+(\.\d+)?)/i);if(!r)return null;let t=r[1],n=parseFloat(t);return isNaN(n)?null:n},Qt=()=>re().device==="Android",Bt=()=>["Mac","iPhone","iPad","iPod"].includes(re().device),$t=()=>/Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test(navigator.appVersion??navigator.userAgent)||navigator?.userAgentData?.mobile;var Wt=(e,{start:r=0,factor:t=2,max:n=1/0,min:o=r,random:a=0}={})=>{let s=r;return s*=t**e,s*=1+(Math.random()*a*2-a),s=Math.round(s),s=Math.min(s,n),s=Math.max(s,o),s};var tr={};At(tr,{clear:()=>Os,get:()=>ys,has:()=>gs,isPersistent:()=>Ts,remove:()=>Is,set:()=>hs});var z,G,rr=`vk-videoplayer-dummy-key-${Math.random()}`,K=()=>{if(G!==void 0)return G;try{localStorage.setItem(rr,"test"),localStorage.removeItem(rr),G=0}catch(e){if(e instanceof DOMException||e instanceof TypeError)try{sessionStorage.getItem(rr),G=1}catch(r){if(r instanceof DOMException||r instanceof TypeError)G=2;else throw r}else throw e}return G===2&&(z=new Map),G},Ts=()=>K()===0,ys=e=>{let r=K();switch(r){case 0:return localStorage.getItem(e)??void 0;case 1:return sessionStorage.getItem(e)??void 0;case 2:return z?.get(e);default:P(r)}},hs=(e,r)=>{let t=K();switch(t){case 0:try{localStorage.setItem(e,r)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 1:try{sessionStorage.setItem(e,r)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 2:return void z?.set(e,r);default:P(t)}},gs=e=>{let r=K();switch(r){case 0:return e in localStorage;case 1:return e in sessionStorage;case 2:return z?.has(e)??!1;default:return P(r),!1}},Is=e=>{let r=K();switch(r){case 0:return localStorage.removeItem(e);case 1:return sessionStorage.removeItem(e);case 2:return void z?.delete(e);default:P(r)}},Os=()=>{let e=K();switch(e){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return z?.clear();default:P(e)}};var zt=()=>{let e,r;try{e=window.self!==window.top}catch(n){n instanceof DOMException&&n.name==="SecurityError"?e=!0:(e=!1,console.error(n))}try{window.location.ancestorOrigins&&(r=window.location.ancestorOrigins[window.location.ancestorOrigins.length-1])}catch(n){console.error(n)}try{!r&&document.referrer&&(r=document.referrer)}catch(n){console.error(n)}let t=r?new URL(r).hostname:void 0;return{isEmbed:e,host:t}};var ge=(c=>(c.INVARIANT="Invariant quality",c.Q_144P="144p",c.Q_240P="240p",c.Q_360P="360p",c.Q_480P="480p",c.Q_720P="720p",c.Q_1080P="1080p",c.Q_1440P="1440p",c.Q_2160P="2160p",c.Q_4320P="4320p",c))(ge||{});var E={"144p":{width:256,height:144},"240p":{width:428,height:240},"360p":{width:640,height:360},"480p":{width:856,height:480},"720p":{width:1280,height:720},"1080p":{width:1920,height:1080},"1440p":{width:2560,height:1440},"2160p":{width:3840,height:2160},"4320p":{width:7680,height:4320}},Kt=(e,r)=>E[e].height>E[r].height,Yt=(e,r)=>E[e].height>=E[r].height,Ie=(e,r)=>E[e].height<E[r].height,Ht=(e,r)=>E[e].height<=E[r].height,Xt=e=>e.sort((r,t)=>r===t?0:r==="Invariant quality"?1:t==="Invariant quality"?-1:Ie(r,t)?1:-1)[0],Jt=Object.keys(E).sort((e,r)=>Ie(e,r)?-1:1),Zt=(e,r=.02)=>[...Jt].find(n=>E[n].height*(1+r)>=e),en=({width:e,height:r})=>{let t=Math.min(e,r),n=Math.max(e,r);return Jt.find(o=>{let a=E[o];return a.width>=n&&a.height>=t})},rn=e=>E[e].height,Oe=e=>e==="Invariant quality",tn=e=>e.every(r=>!Oe(r));function nn(e){if(Oe(e))throw new Error("Expected exact quality")}var on=(e,r)=>{let t={};for(let n of Object.keys(r)){let o=r[n],a=e[n];Array.isArray(o)&&Array.isArray(a)?t[n]=a:typeof o=="object"&&typeof a=="object"?t[n]=on(a,o):t[n]=n in e?a:o}return t};var xs=e=>{let r="";return e>=3600&&(r+=Math.floor(e/3600)+"h",e=e%3600),e>=60&&(r+=Math.floor(e/60)+"m",e=e%60),e>0&&(r+=Math.floor(e)+"s"),r};function xe(e,r=0,t){let n,o,a,s,u,f,l=0,c=!1,p=!1,b=!0,d=!r&&r!==0&&typeof window.requestAnimationFrame=="function";t&&(c=!!t.leading,p="maxWait"in t,a=t?.maxWait?Math.max(+t?.maxWait||0,r):a,b="trailing"in t?!!t.trailing:b);function T(m){let w=n,F=o;return n=o=void 0,l=m,s=e.apply(F,w),s}function y(m,w){return d?(u&&window.cancelAnimationFrame(u),window.requestAnimationFrame(m)):setTimeout(m,w)}function I(m){if(d){window.cancelAnimationFrame(m);return}clearTimeout(m)}function h(m){return l=m,u=y(de,r),c?T(m):s}function g(m){let w=m-f,F=m-l,Pt=r-w;return p?Math.min(Pt,a-F):Pt}function qt(m){let w=m-f,F=m-l;return f===void 0||w>=r||w<0||p&&F>=a}function de(){let m=Date.now();if(qt(m))return Rt(m);u=y(de,g(m))}function Rt(m){return u=void 0,b&&n?T(m):(n=o=void 0,s)}function ss(){u!==void 0&&I(u),l=0,n=f=o=u=void 0}function us(){return u===void 0?s:Rt(Date.now())}function ls(){return u!==void 0}function me(...m){let w=Date.now(),F=qt(w);if(n=m,o=this,f=w,F){if(u===void 0)return h(f);if(p)return u=y(de,r),T(f)}return u===void 0&&(u=y(de,r)),s}return me.cancel=ss,me.flush=us,me.pending=ls,me}var Ee=(e,r=0,t)=>xe(e,r,{...{leading:!0,trailing:!0},...t,maxWait:r});var te=(e,r)=>{if(e===null||typeof e!="object")return e;let t=Array.isArray(e)?[]:{};for(let n in e){if(typeof r=="function"){let o=r(e[n],n,e,t);if(o!==void 0){t[n]=o;continue}}typeof e[n]=="object"?t[n]=te(e[n],r):t[n]=e[n]}return t};var an=e=>te(e);var Es=300,sn=(e,r=Es)=>new v(t=>{let{width:n,height:o}=e.getBoundingClientRect();if(t.next({width:n,height:o}),!window.ResizeObserver)return;let a=new ResizeObserver(Ee(s=>{let u=s[0];if(!u)return;let f,l;u.contentBoxSize&&u.contentBoxSize[0]?(l=u.contentBoxSize[0].blockSize,f=u.contentBoxSize[0].inlineSize):u.contentRect&&(f=u.contentRect.width,l=u.contentRect.height),U(f)&&U(l)&&t.next({width:f,height:l})},r));return a.observe(e),()=>a.disconnect()});var ne=class extends L{constructor(t){super();this.value=t}next(t){super.next(this.value=t)}error(t){super.error(this.value=t)}getValue(){return this.value}_subscribe(t){let n=super._subscribe(t);return t.next(this.value),n}};function nr(e){return new v(r=>{let t={},n=Object.keys(e).length,o=a=>s=>{a in t||n--,t[a]=s,n===0&&r.next(t)};return Object.entries(e).reduce((a,[s,u])=>a.add(u.subscribe(o(s))),new x)})}function or(...e){return new v(r=>e.reduce((t,n)=>t.add(n.subscribe(r)),new x))}var un=e=>new v(r=>{let t=window.setTimeout(()=>{try{r.next()}catch(n){if(r.error)r.error(n);else throw n}},e);return()=>window.clearTimeout(t)});var ln=e=>new v(r=>{let t=window.setInterval(()=>r.next(),e);return()=>{t&&(window.clearInterval(t),t=void 0)}});var cn=e=>new v(r=>{e.forEach(t=>r.next(t))});var fn=(e,r)=>new v(t=>{let n=o=>t.next(o);return e.addEventListener(r,n),()=>e.removeEventListener(r,n)});function ar(e){return r=>new v(t=>r.subscribe(new ir(t,e)))}var ir=class{constructor(r,t){this.destination=r;this.size=t;this.lastValues=[]}next(r){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(r),this.destination.next(this.lastValues)}error(r){this.destination.error?.(r)}};var Ss={leading:!1,trailing:!0};function ur(e,r=Ss){return t=>new v(n=>t.subscribe(new sr(n,e,r)))}var sr=class{constructor(r,t,n){this.destination=r;this.time=t;this.config=n}next(r){this.lastValue=r,U(this.timeout)?window.clearTimeout(this.timeout):this.config.leading&&this.destination.next(r),this.timeout=window.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(t){if(this.destination.error)this.destination.error(t);else throw t}this.timeout=void 0},this.time)}error(r){this.destination.error?.(r)}};var ws={leading:!0,trailing:!1};function cr(e,r=ws){return t=>new v(n=>t.subscribe(new lr(n,e,r)))}var lr=class{constructor(r,t,n){this.destination=r;this.time=t;this.config=n}next(r){this.lastValue=r,he(this.timeout)&&(this.config.leading&&this.destination.next(r),this.timeout=window.setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(r){this.destination.error?.(r)}};function pr(e){return r=>new v(t=>r.subscribe(new fr(t,e)))}var fr=class{constructor(r,t){this.destination=r;this.predicate=t}next(r){let t;try{t=this.predicate(r)}catch(n){throw this.error(n),n}t&&this.destination.next(r)}error(r){this.destination.error?.(r)}};function br(e=(r,t)=>r===t){return r=>new v(t=>r.subscribe(new vr(t,e)))}var pn={},vr=class{constructor(r,t){this.destination=r;this.predicate=t;this.lastValue=pn}next(r){let t;try{t=this.lastValue===pn||!this.predicate(this.lastValue,r),this.lastValue=r}catch(n){throw this.error(n),n}t&&this.destination.next(r)}error(r){this.destination.error?.(r)}};function oe(e){return r=>new v(t=>r.subscribe(new dr(t,e)))}var dr=class{constructor(r,t){this.destination=r;this.mapper=t}next(r){let t;try{t=this.mapper(r)}catch(n){throw this.error(n),n}this.destination.next(t)}error(r){this.destination.error?.(r)}};function mr(e){return oe(()=>e)}function Tr(){return e=>new v(r=>{let t=!1,n=!1,o=e.subscribe(a=>{t||(t=!0,r.next(a)),n&&o.unsubscribe()},a=>{t=!0,r.error?.(a),n&&o.unsubscribe()});return n=!0,t&&o.unsubscribe(),o})}function hr(){return e=>new v(r=>e.subscribe(new yr(r)))}var yr=class{constructor(r){this.destination=r;this.hasLast=!1}next(r){let t=this.last;if(this.last=r,!this.hasLast){this.hasLast=!0;return}this.destination.next([t,r])}error(r){this.destination.error?.(r)}};function Ir(e){return r=>new v(t=>r.subscribe(new gr(t,e)))}var gr=class{constructor(r,t){this.destination=r;this.effect=t}next(r){try{this.effect(r)}catch(t){throw this.error(t),t}this.destination.next(r)}error(r){this.destination.error?.(r)}};var vn=(u=>(u.NETWORK="network",u.VIDEO_PIPELINE="video_pipeline",u.EXTERNAL_API="external_api",u.PARSER="parser",u.DOM="dom",u.WTF="wtf",u.FATAL="fatal",u))(vn||{});var Se=class{constructor(){Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}addEventListener(r,t,n){r in this.listeners||(this.listeners[r]=[]),this.listeners[r].push({callback:t,options:n})}removeEventListener(r,t){if(!(r in this.listeners))return;let n=this.listeners[r];for(let o=0,a=n.length;o<a;o++)if(n[o].callback===t){n.splice(o,1);return}}dispatchEvent(r){if(!(r.type in this.listeners))return;let n=this.listeners[r.type].slice();for(let o=0,a=n.length;o<a;o++){let s=n[o];try{s.callback.call(this,r)}catch(u){Promise.resolve().then(()=>{throw u})}s.options&&s.options.once&&this.removeEventListener(r.type,s.callback)}return!r.defaultPrevented}},Y=class extends Se{constructor(){super(),this.listeners||Se.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(r){r.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,r)),super.dispatchEvent(r)}},ie=class{constructor(){Object.defineProperty(this,"signal",{value:new Y,writable:!0,configurable:!0})}abort(r){let t;try{t=new Event("abort")}catch{typeof document<"u"?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 n=r;if(n===void 0)if(typeof document>"u")n=new Error("This operation was aborted"),n.name="AbortError";else try{n=new DOMException("signal is aborted without reason")}catch{n=new Error("This operation was aborted"),n.name="AbortError"}this.signal.reason=n,this.signal.dispatchEvent(t)}toString(){return"[object AbortController]"}};typeof Symbol<"u"&&Symbol.toStringTag&&(ie.prototype[Symbol.toStringTag]="AbortController",Y.prototype[Symbol.toStringTag]="AbortSignal");function we(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof e.Request=="function"&&!e.Request.prototype.hasOwnProperty("signal")||!e.AbortController}function Or(e){typeof e=="function"&&(e={fetch:e});let{fetch:r,Request:t=r.Request,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:o=!1}=e;if(!we({fetch:r,Request:t,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:o}))return{fetch:r,Request:a};let a=t;(a&&!a.prototype.hasOwnProperty("signal")||o)&&(a=function(l,c){let p;c&&c.signal&&(p=c.signal,delete c.signal);let b=new t(l,c);return p&&Object.defineProperty(b,"signal",{writable:!1,enumerable:!1,configurable:!0,value:p}),b},a.prototype=t.prototype);let s=r;return{fetch:(f,l)=>{let c=a&&a.prototype.isPrototypeOf(f)?f.signal:l?l.signal:void 0;if(c){let p;try{p=new DOMException("Aborted","AbortError")}catch{p=new Error("Aborted"),p.name="AbortError"}if(c.aborted)return Promise.reject(p);let b=new Promise((d,T)=>{c.addEventListener("abort",()=>T(p),{once:!0})});return l&&l.signal&&delete l.signal,Promise.race([b,s(f,l)])}return s(f,l)},Request:a}}var ae=we({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}),bn=ae?Or({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}):void 0,dn=ae?bn.fetch:window.fetch,zb=ae?bn.Request:window.Request,Kb=ae?ie:window.AbortController,Yb=ae?Y:window.AbortSignal;var os=ds(ns(),1),is=(p=>(p.Armenian="58",p.Azerbaijani="57",p.Belarusian="114",p.English="3",p.Kazakh="97",p.Portuguese="73",p.Russian="0",p.Spanish="4",p.Ukrainian="1",p.Uzbek="65",p.Vietnamese="75",p))(is||{}),hp="vk.com",gp=async(e,r,t)=>{let n=new URL(`https://${hp}/js/lang-pack.js`);n.searchParams.set("format","json"),n.searchParams.set("name",r),e!==void 0&&n.searchParams.set("lang",e);let a=await(await dn(n.toString())).json();return Ip(a,t)},Ip=(e,r)=>(0,os.default)(Object.entries(e.keys).map(([t,n])=>[t.substring(`${r}_`.length),Op(n)])),Op=e=>Array.isArray(e)?e[0]:e;var as=(t=>(t.RU="ru",t.EN="en",t))(as||{});
6
+ "use strict";var z=Object.defineProperty;var it=Object.getOwnPropertyDescriptor;var st=Object.getOwnPropertyNames;var at=Object.prototype.hasOwnProperty;var me=(t,e)=>{for(var r in e)z(t,r,{get:e[r],enumerable:!0})},lt=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of st(e))!at.call(t,o)&&o!==r&&z(t,o,{get:()=>e[o],enumerable:!(n=it(e,o))||n.enumerable});return t};var ut=t=>lt(z({},"__esModule",{value:!0}),t);var wt={};me(wt,{CurrentClientBrowser:()=>j,CurrentClientDevice:()=>W,ErrorCategory:()=>Ye,InterfaceLanguage:()=>Je,Logger:()=>V,Observable:()=>l,Subject:()=>I,Subscription:()=>f,VERSION:()=>Te,VKNumericLanguage:()=>Xe,ValueSubject:()=>C,VideoQuality:()=>_,abortable:()=>we,addScript:()=>ye,areQualitiesExact:()=>Be,assertEmptyArray:()=>he,assertNever:()=>v,assertNonNullable:()=>Ie,assertNotEmptyArray:()=>ge,assertNullable:()=>xe,assertQualityIsExact:()=>Fe,buffer:()=>Y,checkNever:()=>ve,cloneDeep:()=>je,cloneDeepWith:()=>R,combine:()=>H,debounce:()=>J,debounceFn:()=>B,detectEmbed:()=>Le,fillWithDefault:()=>ze,filter:()=>re,filterChanged:()=>oe,fromEvent:()=>Ke,getCurrentBrowser:()=>A,getExponentialDelay:()=>ke,getHighestQuality:()=>Ve,getIOSVersion:()=>Se,interval:()=>qe,isAndroid:()=>Ae,isHigher:()=>Pe,isHigherOrEqual:()=>Me,isIOS:()=>Ee,isInvariantQuality:()=>U,isLower:()=>D,isLowerOrEqual:()=>Ne,isMacLike:()=>Re,isMobile:()=>Ce,isNonNullable:()=>h,isNullable:()=>Q,loadVKLangPack:()=>ht,map:()=>k,mapTo:()=>se,merge:()=>K,noop:()=>x,now:()=>Oe,observableFrom:()=>He,observeElementSize:()=>We,once:()=>ae,pairwise:()=>ue,safeStorage:()=>q,tap:()=>pe,throttle:()=>ee,throttleFn:()=>F,timeCodeToString:()=>Tt,timeout:()=>Ge,videoHeightToQuality:()=>_e,videoQualityToHeight:()=>Ue,videoSizeToQuality:()=>De});module.exports=ut(wt);var Te="1.0.37-dev.511f8223.0";var f=class{constructor(){this.subscriptions=[]}unsubscribe(){let e=this.subscriptions;this.subscriptions=[],e.forEach(r=>typeof r=="function"?r():r.unsubscribe())}add(e){return this.subscriptions.push(e),this}};var v=t=>{throw new Error(`${t} is value of unexpected type`)},ve=t=>{};var x=()=>{};var l=class{constructor(e){e&&(this._subscribe=e)}subscribe(e,r){let n;r?typeof r=="function"?n={next:r,error:x}:n={next:i=>r.next(i),error:i=>r.error?.(i)}:n={next:x,error:x};let o=typeof e=="function"?{next:i=>{try{e(i)}catch(a){n.next(a)}},error:i=>n.next(i)}:{next:i=>e.next(i),error:i=>e.error?e.error(i):n.next(i)},s;try{s=this._subscribe(o)}catch(i){o.error?.(i)}return new f().add(()=>{switch(o.next=x,o.error=x,typeof s){case"function":s();return;case"object":s.unsubscribe();return;case"undefined":return;default:return v(s)}})}pipe(...e){return e.reduce((r,n)=>n(r),this)}_subscribe(e){}};var I=class extends l{constructor(){super();this.keyCounter=0;this.subscribers=new Map}next(r){this.subscribers.forEach(n=>n.next(r))}error(r){this.subscribers.forEach(n=>n.error?.(r))}_subscribe(r){let n=this.keyCounter++;return this.subscribers.set(n,r),new f().add(()=>this.subscribers.delete(n))}};var V=class{constructor(){this.log$=new I;this.logs=[];this.log=e=>{let r={...e,timestamp:Date.now()};this.logs.push(r),this.log$.next(r)};this.getAllLogs=()=>this.logs}createCustomLog(e){return(...r)=>{let n;try{n=e(...r)}catch{n={message:"error in `createCustomLog`",component:"Logger"}}this.log(n)}}createComponentLog(e){return this.createCustomLog(r=>({component:e,...r}))}};function Ie(t,e='Assertion "value is not nullable" failed'){if(t==null)throw new Error(e)}function xe(t,e='Assertion "value is nullable" failed'){if(t!=null)throw new Error(e)}function h(t){return typeof t<"u"&&t!==null}function Q(t){return t==null}function ge(t,e){if(!t?.length)throw new Error(e)}function he(t,e){if(t?.length)throw new Error(e)}var ye=(t,e,r)=>new Promise((n,o)=>{e.addEventListener("abort",()=>{a(),b.remove()});let s=()=>{a(),o()},i=()=>{a(),n()},a=()=>{u&&clearTimeout(u),b.removeEventListener("load",i),b.removeEventListener("error",s)},u;r&&(u=window.setTimeout(s,r));let b=document.createElement("script");b.addEventListener("load",i),b.addEventListener("error",s),b.src=t,document.head.appendChild(b)});var Oe=typeof window.performance?.now=="function"?()=>window.performance.now():()=>Date.now();var we=(t,e)=>async(...r)=>{let n=e(...r),o=t.aborted,s;for(;!o&&!t.aborted;)try{let i=await n.next(s);o=i.done??!1,s=i.value}catch(i){await n.throw(i)}return s};var j=(c=>(c.Unknown="Unknown",c.Yandex="Yandex",c.Chrome="Chrome",c.Chromium="Chromium",c.Firefox="Firefox",c.Safari="Safari",c.Opera="Opera",c.Edge="Edge",c.SamsungBrowser="SamsungBrowser",c.Rest="Rest",c))(j||{}),W=(u=>(u.Unknown="Unknown",u.Android="Android",u.iPhone="iPhone",u.iPad="iPad",u.iPod="iPod",u.RestMobile="RestMobile",u.Mac="Mac",u.Desktop="Desktop",u))(W||{}),A=()=>{let{userAgent:t}=window.navigator,e=/yabrowser/i.test(t)?"Yandex":void 0,r=/samsungbrowser/i.test(t)?"SamsungBrowser":void 0,n=/chrome|crios/i.test(t)?"Chrome":void 0,o=/chromium/i.test(t)?"Chromium":void 0,s=/firefox|fxios/i.test(t)?"Firefox":void 0,i=/webkit|safari|khtml/i.test(t)?"Safari":void 0,a=/opr\//i.test(t)?"Opera":void 0,u=/edg/i.test(t)?"Edge":void 0,b=/android/i.test(t)?"Android":void 0,c=/iphone/i.test(t)?"iPhone":void 0,d=/ipad/i.test(t)?"iPad":void 0,E=/ipod/i.test(t)?"iPod":void 0,L=/mac/i.test(t)?"Mac":void 0,S=/webOS|BlackBerry|IEMobile|Opera Mini/i.test(t)?"RestMobile":void 0;return{browser:e||r||s||a||u||n||o||i||"Rest",device:b||c||d||E||S||L||"Desktop"}},Ee=(t=!1)=>{let r=["iPhone","iPad","iPod"].includes(A().device);if(!t)return r;let{userAgent:n,maxTouchPoints:o}=window.navigator;return!!(r||/macintosh/i.test(n)&&o>0)},Se=()=>{let{userAgent:t}=window.navigator,e=t.match(/Version\/(\d+(\.\d+)?)/i);if(!e)return null;let r=e[1],n=parseFloat(r);return isNaN(n)?null:n},Ae=()=>A().device==="Android",Re=()=>["Mac","iPhone","iPad","iPod"].includes(A().device),Ce=()=>/Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test(navigator.appVersion??navigator.userAgent)||navigator?.userAgentData?.mobile;var ke=(t,{start:e=0,factor:r=2,max:n=1/0,min:o=e,random:s=0}={})=>{let i=e;return i*=r**t,i*=1+(Math.random()*s*2-s),i=Math.round(i),i=Math.min(i,n),i=Math.max(i,o),i};var q={};me(q,{clear:()=>mt,get:()=>pt,has:()=>dt,isPersistent:()=>ct,remove:()=>ft,set:()=>bt});var O,y,G=`vk-videoplayer-dummy-key-${Math.random()}`,w=()=>{if(y!==void 0)return y;try{localStorage.setItem(G,"test"),localStorage.removeItem(G),y=0}catch(t){if(t instanceof DOMException||t instanceof TypeError)try{sessionStorage.getItem(G),y=1}catch(e){if(e instanceof DOMException||e instanceof TypeError)y=2;else throw e}else throw t}return y===2&&(O=new Map),y},ct=()=>w()===0,pt=t=>{let e=w();switch(e){case 0:return localStorage.getItem(t)??void 0;case 1:return sessionStorage.getItem(t)??void 0;case 2:return O?.get(t);default:v(e)}},bt=(t,e)=>{let r=w();switch(r){case 0:try{localStorage.setItem(t,e)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 1:try{sessionStorage.setItem(t,e)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 2:return void O?.set(t,e);default:v(r)}},dt=t=>{let e=w();switch(e){case 0:return t in localStorage;case 1:return t in sessionStorage;case 2:return O?.has(t)??!1;default:return v(e),!1}},ft=t=>{let e=w();switch(e){case 0:return localStorage.removeItem(t);case 1:return sessionStorage.removeItem(t);case 2:return void O?.delete(t);default:v(e)}},mt=()=>{let t=w();switch(t){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return O?.clear();default:v(t)}};var Le=()=>{let t,e;try{t=window.self!==window.top}catch(n){n instanceof DOMException&&n.name==="SecurityError"?t=!0:(t=!1,console.error(n))}try{window.location.ancestorOrigins&&(e=window.location.ancestorOrigins[window.location.ancestorOrigins.length-1])}catch(n){console.error(n)}try{!e&&document.referrer&&(e=document.referrer)}catch(n){console.error(n)}let r=e?new URL(e).hostname:void 0;return{isEmbed:t,host:r}};var _=(c=>(c.INVARIANT="Invariant quality",c.Q_144P="144p",c.Q_240P="240p",c.Q_360P="360p",c.Q_480P="480p",c.Q_720P="720p",c.Q_1080P="1080p",c.Q_1440P="1440p",c.Q_2160P="2160p",c.Q_4320P="4320p",c))(_||{});var m={"144p":{width:256,height:144},"240p":{width:428,height:240},"360p":{width:640,height:360},"480p":{width:856,height:480},"720p":{width:1280,height:720},"1080p":{width:1920,height:1080},"1440p":{width:2560,height:1440},"2160p":{width:3840,height:2160},"4320p":{width:7680,height:4320}},Pe=(t,e)=>m[t].height>m[e].height,Me=(t,e)=>m[t].height>=m[e].height,D=(t,e)=>m[t].height<m[e].height,Ne=(t,e)=>m[t].height<=m[e].height,Ve=t=>t.sort((e,r)=>e===r?0:e==="Invariant quality"?1:r==="Invariant quality"?-1:D(e,r)?1:-1)[0],Qe=Object.keys(m).sort((t,e)=>D(t,e)?-1:1),_e=(t,e=.02)=>[...Qe].find(n=>m[n].height*(1+e)>=t),De=({width:t,height:e})=>{let r=Math.min(t,e),n=Math.max(t,e);return Qe.find(o=>{let s=m[o];return s.width>=n&&s.height>=r})},Ue=t=>m[t].height,U=t=>t==="Invariant quality",Be=t=>t.every(e=>!U(e));function Fe(t){if(U(t))throw new Error("Expected exact quality")}var ze=(t,e)=>{let r={};for(let n of Object.keys(e)){let o=e[n],s=t[n];Array.isArray(o)&&Array.isArray(s)?r[n]=s:typeof o=="object"&&typeof s=="object"?r[n]=ze(s,o):r[n]=n in t?s:o}return r};var Tt=t=>{let e="";return t>=3600&&(e+=Math.floor(t/3600)+"h",t=t%3600),t>=60&&(e+=Math.floor(t/60)+"m",t=t%60),t>0&&(e+=Math.floor(t)+"s"),e};function B(t,e=0,r){let n,o,s,i,a,u,b=0,c=!1,d=!1,E=!0,L=!e&&e!==0&&typeof window.requestAnimationFrame=="function";r&&(c=!!r.leading,d="maxWait"in r,s=r?.maxWait?Math.max(+r?.maxWait||0,e):s,E="trailing"in r?!!r.trailing:E);function S(p){let T=n,g=o;return n=o=void 0,b=p,i=t.apply(g,T),i}function P(p,T){return L?(a&&window.cancelAnimationFrame(a),window.requestAnimationFrame(p)):setTimeout(p,T)}function Ze(p){if(L){window.cancelAnimationFrame(p);return}clearTimeout(p)}function et(p){return b=p,a=P(M,e),c?S(p):i}function tt(p){let T=p-u,g=p-b,fe=e-T;return d?Math.min(fe,s-g):fe}function be(p){let T=p-u,g=p-b;return u===void 0||T>=e||T<0||d&&g>=s}function M(){let p=Date.now();if(be(p))return de(p);a=P(M,tt(p))}function de(p){return a=void 0,E&&n?S(p):(n=o=void 0,i)}function rt(){a!==void 0&&Ze(a),b=0,n=u=o=a=void 0}function nt(){return a===void 0?i:de(Date.now())}function ot(){return a!==void 0}function N(...p){let T=Date.now(),g=be(T);if(n=p,o=this,u=T,g){if(a===void 0)return et(u);if(d)return a=P(M,e),S(u)}return a===void 0&&(a=P(M,e)),i}return N.cancel=rt,N.flush=nt,N.pending=ot,N}var F=(t,e=0,r)=>B(t,e,{...{leading:!0,trailing:!0},...r,maxWait:e});var R=(t,e)=>{if(t===null||typeof t!="object")return t;let r=Array.isArray(t)?[]:{};for(let n in t){if(typeof e=="function"){let o=e(t[n],n,t,r);if(o!==void 0){r[n]=o;continue}}typeof t[n]=="object"?r[n]=R(t[n],e):r[n]=t[n]}return r};var je=t=>R(t);var vt=300,We=(t,e=vt)=>new l(r=>{let{width:n,height:o}=t.getBoundingClientRect();if(r.next({width:n,height:o}),!window.ResizeObserver)return;let s=new ResizeObserver(F(i=>{let a=i[0];if(!a)return;let u,b;a.contentBoxSize&&a.contentBoxSize[0]?(b=a.contentBoxSize[0].blockSize,u=a.contentBoxSize[0].inlineSize):a.contentRect&&(u=a.contentRect.width,b=a.contentRect.height),h(u)&&h(b)&&r.next({width:u,height:b})},e));return s.observe(t),()=>s.disconnect()});var C=class extends I{constructor(r){super();this.value=r}next(r){super.next(this.value=r)}error(r){super.error(this.value=r)}getValue(){return this.value}_subscribe(r){let n=super._subscribe(r);return r.next(this.value),n}};function H(t){return new l(e=>{let r={},n=Object.keys(t).length,o=s=>i=>{s in r||n--,r[s]=i,n===0&&e.next(r)};return Object.entries(t).reduce((s,[i,a])=>s.add(a.subscribe(o(i))),new f)})}function K(...t){return new l(e=>t.reduce((r,n)=>r.add(n.subscribe(e)),new f))}var Ge=t=>new l(e=>{let r=window.setTimeout(()=>{try{e.next()}catch(n){if(e.error)e.error(n);else throw n}},t);return()=>window.clearTimeout(r)});var qe=t=>new l(e=>{let r=window.setInterval(()=>e.next(),t);return()=>{r&&(window.clearInterval(r),r=void 0)}});var He=t=>new l(e=>{t.forEach(r=>e.next(r))});var Ke=(t,e)=>new l(r=>{let n=o=>r.next(o);return t.addEventListener(e,n),()=>t.removeEventListener(e,n)});function Y(t){return e=>new l(r=>e.subscribe(new $(r,t)))}var $=class{constructor(e,r){this.destination=e;this.size=r;this.lastValues=[]}next(e){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(e),this.destination.next(this.lastValues)}error(e){this.destination.error?.(e)}};var It={leading:!1,trailing:!0};function J(t,e=It){return r=>new l(n=>r.subscribe(new X(n,t,e)))}var X=class{constructor(e,r,n){this.destination=e;this.time=r;this.config=n}next(e){this.lastValue=e,h(this.timeout)?window.clearTimeout(this.timeout):this.config.leading&&this.destination.next(e),this.timeout=window.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(r){if(this.destination.error)this.destination.error(r);else throw r}this.timeout=void 0},this.time)}error(e){this.destination.error?.(e)}};var xt={leading:!0,trailing:!1};function ee(t,e=xt){return r=>new l(n=>r.subscribe(new Z(n,t,e)))}var Z=class{constructor(e,r,n){this.destination=e;this.time=r;this.config=n}next(e){this.lastValue=e,Q(this.timeout)&&(this.config.leading&&this.destination.next(e),this.timeout=window.setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(e){this.destination.error?.(e)}};function re(t){return e=>new l(r=>e.subscribe(new te(r,t)))}var te=class{constructor(e,r){this.destination=e;this.predicate=r}next(e){let r;try{r=this.predicate(e)}catch(n){throw this.error(n),n}r&&this.destination.next(e)}error(e){this.destination.error?.(e)}};function oe(t=(e,r)=>e===r){return e=>new l(r=>e.subscribe(new ne(r,t)))}var $e={},ne=class{constructor(e,r){this.destination=e;this.predicate=r;this.lastValue=$e}next(e){let r;try{r=this.lastValue===$e||!this.predicate(this.lastValue,e),this.lastValue=e}catch(n){throw this.error(n),n}r&&this.destination.next(e)}error(e){this.destination.error?.(e)}};function k(t){return e=>new l(r=>e.subscribe(new ie(r,t)))}var ie=class{constructor(e,r){this.destination=e;this.mapper=r}next(e){let r;try{r=this.mapper(e)}catch(n){throw this.error(n),n}this.destination.next(r)}error(e){this.destination.error?.(e)}};function se(t){return k(()=>t)}function ae(){return t=>new l(e=>{let r=!1,n=!1,o=t.subscribe(s=>{r||(r=!0,e.next(s)),n&&o.unsubscribe()},s=>{r=!0,e.error?.(s),n&&o.unsubscribe()});return n=!0,r&&o.unsubscribe(),o})}function ue(){return t=>new l(e=>t.subscribe(new le(e)))}var le=class{constructor(e){this.destination=e;this.hasLast=!1}next(e){let r=this.last;if(this.last=e,!this.hasLast){this.hasLast=!0;return}this.destination.next([r,e])}error(e){this.destination.error?.(e)}};function pe(t){return e=>new l(r=>e.subscribe(new ce(r,t)))}var ce=class{constructor(e,r){this.destination=e;this.effect=r}next(e){try{this.effect(e)}catch(r){throw this.error(r),r}this.destination.next(e)}error(e){this.destination.error?.(e)}};var Ye=(a=>(a.NETWORK="network",a.VIDEO_PIPELINE="video_pipeline",a.EXTERNAL_API="external_api",a.PARSER="parser",a.DOM="dom",a.WTF="wtf",a.FATAL="fatal",a))(Ye||{});var Xe=(d=>(d.Armenian="58",d.Azerbaijani="57",d.Belarusian="114",d.English="3",d.Kazakh="97",d.Portuguese="73",d.Russian="0",d.Spanish="4",d.Ukrainian="1",d.Uzbek="65",d.Vietnamese="75",d))(Xe||{}),gt="vk.com",ht=async(t,e,r)=>{let n=new URL(`https://${gt}/js/lang-pack.js`);n.searchParams.set("format","json"),n.searchParams.set("name",e),t!==void 0&&n.searchParams.set("lang",t);let s=await(await fetch(n.toString())).json();return yt(s,r)},yt=(t,e)=>Object.fromEntries(Object.entries(t.keys).map(([r,n])=>[r.substring(`${e}_`.length),Ot(n)])),Ot=t=>Array.isArray(t)?t[0]:t;var Je=(r=>(r.RU="ru",r.EN="en",r))(Je||{});
package/esnext.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @vkontakte/videoplayer-shared v1.0.37-dev.2e9cb822.0
3
- * Fri, 05 Jul 2024 08:48:33 GMT
2
+ * @vkontakte/videoplayer-shared v1.0.37-dev.511f8223.0
3
+ * Wed, 17 Jul 2024 10:03:53 GMT
4
4
  * https://st.mycdn.me/static/vkontakte-videoplayer/1-0-37/doc/
5
5
  */
6
- var qa=Object.create;var $e=Object.defineProperty;var Ra=Object.getOwnPropertyDescriptor;var Pa=Object.getOwnPropertyNames;var Aa=Object.getPrototypeOf,_a=Object.prototype.hasOwnProperty;var i=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),La=(e,r)=>{for(var t in r)$e(e,t,{get:r[t],enumerable:!0})},Ca=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of Pa(r))!_a.call(e,o)&&o!==t&&$e(e,o,{get:()=>r[o],enumerable:!(n=Ra(r,o))||n.enumerable});return e};var Na=(e,r,t)=>(t=e!=null?qa(Aa(e)):{},Ca(r||!e||!e.__esModule?$e(t,"default",{value:e,enumerable:!0}):t,e));var P=i((Kb,Nt)=>{"use strict";Nt.exports=function(e){try{return!!e()}catch{return!0}}});var ne=i((Yb,jt)=>{"use strict";var xs=P();jt.exports=!xs(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var L=i((Hb,Dt)=>{"use strict";var Mt=ne(),kt=Function.prototype,lr=kt.call,Es=Mt&&kt.bind.bind(lr,lr);Dt.exports=Mt?Es:function(e){return function(){return lr.apply(e,arguments)}}});var he=i((Xb,Ft)=>{"use strict";var Vt=L(),Ss=Vt({}.toString),ws=Vt("".slice);Ft.exports=function(e){return ws(Ss(e),8,-1)}});var Gt=i((Jb,Ut)=>{"use strict";var qs=L(),Rs=P(),Ps=he(),cr=Object,As=qs("".split);Ut.exports=Rs(function(){return!cr("z").propertyIsEnumerable(0)})?function(e){return Ps(e)=="String"?As(e,""):cr(e)}:cr});var ge=i((Zb,Qt)=>{"use strict";Qt.exports=function(e){return e==null}});var fr=i((ed,Bt)=>{"use strict";var _s=ge(),Ls=TypeError;Bt.exports=function(e){if(_s(e))throw Ls("Can't call method on "+e);return e}});var H=i((rd,$t)=>{"use strict";var Cs=Gt(),Ns=fr();$t.exports=function(e){return Cs(Ns(e))}});var zt=i((td,Wt)=>{"use strict";Wt.exports=function(){}});var G=i((nd,Kt)=>{"use strict";Kt.exports={}});var S=i((Yt,Ht)=>{"use strict";var Ie=function(e){return e&&e.Math==Math&&e};Ht.exports=Ie(typeof globalThis=="object"&&globalThis)||Ie(typeof window=="object"&&window)||Ie(typeof self=="object"&&self)||Ie(typeof global=="object"&&global)||function(){return this}()||Yt||Function("return this")()});var vr=i((od,Xt)=>{"use strict";var pr=typeof document=="object"&&document.all,js=typeof pr>"u"&&pr!==void 0;Xt.exports={all:pr,IS_HTMLDDA:js}});var O=i((id,Zt)=>{"use strict";var Jt=vr(),Ms=Jt.all;Zt.exports=Jt.IS_HTMLDDA?function(e){return typeof e=="function"||e===Ms}:function(e){return typeof e=="function"}});var tn=i((ad,rn)=>{"use strict";var ks=S(),Ds=O(),en=ks.WeakMap;rn.exports=Ds(en)&&/native code/.test(String(en))});var Q=i((sd,an)=>{"use strict";var nn=O(),on=vr(),Vs=on.all;an.exports=on.IS_HTMLDDA?function(e){return typeof e=="object"?e!==null:nn(e)||e===Vs}:function(e){return typeof e=="object"?e!==null:nn(e)}});var C=i((ud,sn)=>{"use strict";var Fs=P();sn.exports=!Fs(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var dr=i((ld,ln)=>{"use strict";var Us=S(),un=Q(),br=Us.document,Gs=un(br)&&un(br.createElement);ln.exports=function(e){return Gs?br.createElement(e):{}}});var mr=i((cd,cn)=>{"use strict";var Qs=C(),Bs=P(),$s=dr();cn.exports=!Qs&&!Bs(function(){return Object.defineProperty($s("div"),"a",{get:function(){return 7}}).a!=7})});var Tr=i((fd,fn)=>{"use strict";var Ws=C(),zs=P();fn.exports=Ws&&zs(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})});var k=i((pd,pn)=>{"use strict";var Ks=Q(),Ys=String,Hs=TypeError;pn.exports=function(e){if(Ks(e))return e;throw Hs(Ys(e)+" is not an object")}});var D=i((vd,vn)=>{"use strict";var Xs=ne(),Oe=Function.prototype.call;vn.exports=Xs?Oe.bind(Oe):function(){return Oe.apply(Oe,arguments)}});var xe=i((bd,bn)=>{"use strict";bn.exports={}});var gr=i((dd,mn)=>{"use strict";var yr=xe(),hr=S(),Js=O(),dn=function(e){return Js(e)?e:void 0};mn.exports=function(e,r){return arguments.length<2?dn(yr[e])||dn(hr[e]):yr[e]&&yr[e][r]||hr[e]&&hr[e][r]}});var Ir=i((md,Tn)=>{"use strict";var Zs=L();Tn.exports=Zs({}.isPrototypeOf)});var hn=i((Td,yn)=>{"use strict";yn.exports=typeof navigator<"u"&&String(navigator.userAgent)||""});var wn=i((yd,Sn)=>{"use strict";var En=S(),Or=hn(),gn=En.process,In=En.Deno,On=gn&&gn.versions||In&&In.version,xn=On&&On.v8,q,Ee;xn&&(q=xn.split("."),Ee=q[0]>0&&q[0]<4?1:+(q[0]+q[1]));!Ee&&Or&&(q=Or.match(/Edge\/(\d+)/),(!q||q[1]>=74)&&(q=Or.match(/Chrome\/(\d+)/),q&&(Ee=+q[1])));Sn.exports=Ee});var xr=i((hd,Rn)=>{"use strict";var qn=wn(),eu=P(),ru=S(),tu=ru.String;Rn.exports=!!Object.getOwnPropertySymbols&&!eu(function(){var e=Symbol();return!tu(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&qn&&qn<41})});var Er=i((gd,Pn)=>{"use strict";var nu=xr();Pn.exports=nu&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Sr=i((Id,An)=>{"use strict";var ou=gr(),iu=O(),au=Ir(),su=Er(),uu=Object;An.exports=su?function(e){return typeof e=="symbol"}:function(e){var r=ou("Symbol");return iu(r)&&au(r.prototype,uu(e))}});var Se=i((Od,_n)=>{"use strict";var lu=String;_n.exports=function(e){try{return lu(e)}catch{return"Object"}}});var oe=i((xd,Ln)=>{"use strict";var cu=O(),fu=Se(),pu=TypeError;Ln.exports=function(e){if(cu(e))return e;throw pu(fu(e)+" is not a function")}});var we=i((Ed,Cn)=>{"use strict";var vu=oe(),bu=ge();Cn.exports=function(e,r){var t=e[r];return bu(t)?void 0:vu(t)}});var jn=i((Sd,Nn)=>{"use strict";var wr=D(),qr=O(),Rr=Q(),du=TypeError;Nn.exports=function(e,r){var t,n;if(r==="string"&&qr(t=e.toString)&&!Rr(n=wr(t,e))||qr(t=e.valueOf)&&!Rr(n=wr(t,e))||r!=="string"&&qr(t=e.toString)&&!Rr(n=wr(t,e)))return n;throw du("Can't convert object to primitive value")}});var ie=i((wd,Mn)=>{"use strict";Mn.exports=!0});var Vn=i((qd,Dn)=>{"use strict";var kn=S(),mu=Object.defineProperty;Dn.exports=function(e,r){try{mu(kn,e,{value:r,configurable:!0,writable:!0})}catch{kn[e]=r}return r}});var Pr=i((Rd,Un)=>{"use strict";var Tu=S(),yu=Vn(),Fn="__core-js_shared__",hu=Tu[Fn]||yu(Fn,{});Un.exports=hu});var Ar=i((Pd,Qn)=>{"use strict";var gu=ie(),Gn=Pr();(Qn.exports=function(e,r){return Gn[e]||(Gn[e]=r!==void 0?r:{})})("versions",[]).push({version:"3.31.0",mode:gu?"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 _r=i((Ad,Bn)=>{"use strict";var Iu=fr(),Ou=Object;Bn.exports=function(e){return Ou(Iu(e))}});var N=i((_d,$n)=>{"use strict";var xu=L(),Eu=_r(),Su=xu({}.hasOwnProperty);$n.exports=Object.hasOwn||function(r,t){return Su(Eu(r),t)}});var Lr=i((Ld,Wn)=>{"use strict";var wu=L(),qu=0,Ru=Math.random(),Pu=wu(1 .toString);Wn.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Pu(++qu+Ru,36)}});var A=i((Cd,Kn)=>{"use strict";var Au=S(),_u=Ar(),zn=N(),Lu=Lr(),Cu=xr(),Nu=Er(),X=Au.Symbol,Cr=_u("wks"),ju=Nu?X.for||X:X&&X.withoutSetter||Lu;Kn.exports=function(e){return zn(Cr,e)||(Cr[e]=Cu&&zn(X,e)?X[e]:ju("Symbol."+e)),Cr[e]}});var Jn=i((Nd,Xn)=>{"use strict";var Mu=D(),Yn=Q(),Hn=Sr(),ku=we(),Du=jn(),Vu=A(),Fu=TypeError,Uu=Vu("toPrimitive");Xn.exports=function(e,r){if(!Yn(e)||Hn(e))return e;var t=ku(e,Uu),n;if(t){if(r===void 0&&(r="default"),n=Mu(t,e,r),!Yn(n)||Hn(n))return n;throw Fu("Can't convert object to primitive value")}return r===void 0&&(r="number"),Du(e,r)}});var qe=i((jd,Zn)=>{"use strict";var Gu=Jn(),Qu=Sr();Zn.exports=function(e){var r=Gu(e,"string");return Qu(r)?r:r+""}});var J=i(ro=>{"use strict";var Bu=C(),$u=mr(),Wu=Tr(),Re=k(),eo=qe(),zu=TypeError,Nr=Object.defineProperty,Ku=Object.getOwnPropertyDescriptor,jr="enumerable",Mr="configurable",kr="writable";ro.f=Bu?Wu?function(r,t,n){if(Re(r),t=eo(t),Re(n),typeof r=="function"&&t==="prototype"&&"value"in n&&kr in n&&!n[kr]){var o=Ku(r,t);o&&o[kr]&&(r[t]=n.value,n={configurable:Mr in n?n[Mr]:o[Mr],enumerable:jr in n?n[jr]:o[jr],writable:!1})}return Nr(r,t,n)}:Nr:function(r,t,n){if(Re(r),t=eo(t),Re(n),$u)try{return Nr(r,t,n)}catch{}if("get"in n||"set"in n)throw zu("Accessors not supported");return"value"in n&&(r[t]=n.value),r}});var ae=i((kd,to)=>{"use strict";to.exports=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}});var B=i((Dd,no)=>{"use strict";var Yu=C(),Hu=J(),Xu=ae();no.exports=Yu?function(e,r,t){return Hu.f(e,r,Xu(1,t))}:function(e,r,t){return e[r]=t,e}});var Pe=i((Vd,io)=>{"use strict";var Ju=Ar(),Zu=Lr(),oo=Ju("keys");io.exports=function(e){return oo[e]||(oo[e]=Zu(e))}});var Ae=i((Fd,ao)=>{"use strict";ao.exports={}});var co=i((Ud,lo)=>{"use strict";var el=tn(),uo=S(),rl=Q(),tl=B(),Dr=N(),Vr=Pr(),nl=Pe(),ol=Ae(),so="Object already initialized",Fr=uo.TypeError,il=uo.WeakMap,_e,se,Le,al=function(e){return Le(e)?se(e):_e(e,{})},sl=function(e){return function(r){var t;if(!rl(r)||(t=se(r)).type!==e)throw Fr("Incompatible receiver, "+e+" required");return t}};el||Vr.state?(R=Vr.state||(Vr.state=new il),R.get=R.get,R.has=R.has,R.set=R.set,_e=function(e,r){if(R.has(e))throw Fr(so);return r.facade=e,R.set(e,r),r},se=function(e){return R.get(e)||{}},Le=function(e){return R.has(e)}):($=nl("state"),ol[$]=!0,_e=function(e,r){if(Dr(e,$))throw Fr(so);return r.facade=e,tl(e,$,r),r},se=function(e){return Dr(e,$)?e[$]:{}},Le=function(e){return Dr(e,$)});var R,$;lo.exports={set:_e,get:se,has:Le,enforce:al,getterFor:sl}});var mo=i((Gd,bo)=>{"use strict";var ul=ne(),vo=Function.prototype,fo=vo.apply,po=vo.call;bo.exports=typeof Reflect=="object"&&Reflect.apply||(ul?po.bind(fo):function(){return po.apply(fo,arguments)})});var Ur=i((Qd,To)=>{"use strict";var ll=he(),cl=L();To.exports=function(e){if(ll(e)==="Function")return cl(e)}});var Io=i(go=>{"use strict";var yo={}.propertyIsEnumerable,ho=Object.getOwnPropertyDescriptor,fl=ho&&!yo.call({1:2},1);go.f=fl?function(r){var t=ho(this,r);return!!t&&t.enumerable}:yo});var Eo=i(xo=>{"use strict";var pl=C(),vl=D(),bl=Io(),dl=ae(),ml=H(),Tl=qe(),yl=N(),hl=mr(),Oo=Object.getOwnPropertyDescriptor;xo.f=pl?Oo:function(r,t){if(r=ml(r),t=Tl(t),hl)try{return Oo(r,t)}catch{}if(yl(r,t))return dl(!vl(bl.f,r,t),r[t])}});var wo=i((Wd,So)=>{"use strict";var gl=P(),Il=O(),Ol=/#|\.prototype\./,ue=function(e,r){var t=El[xl(e)];return t==wl?!0:t==Sl?!1:Il(r)?gl(r):!!r},xl=ue.normalize=function(e){return String(e).replace(Ol,".").toLowerCase()},El=ue.data={},Sl=ue.NATIVE="N",wl=ue.POLYFILL="P";So.exports=ue});var Gr=i((zd,Ro)=>{"use strict";var qo=Ur(),ql=oe(),Rl=ne(),Pl=qo(qo.bind);Ro.exports=function(e,r){return ql(e),r===void 0?e:Rl?Pl(e,r):function(){return e.apply(r,arguments)}}});var Qr=i((Kd,Ao)=>{"use strict";var Ce=S(),Al=mo(),_l=Ur(),Ll=O(),Cl=Eo().f,Nl=wo(),Z=xe(),jl=Gr(),ee=B(),Po=N(),Ml=function(e){var r=function(t,n,o){if(this instanceof r){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,o)}return Al(e,this,arguments)};return r.prototype=e.prototype,r};Ao.exports=function(e,r){var t=e.target,n=e.global,o=e.stat,a=e.proto,s=n?Ce:o?Ce[t]:(Ce[t]||{}).prototype,u=n?Z:Z[t]||ee(Z,t,{})[t],f=u.prototype,l,c,p,b,d,T,y,I,h;for(b in r)l=Nl(n?b:t+(o?".":"#")+b,e.forced),c=!l&&s&&Po(s,b),T=u[b],c&&(e.dontCallGetSet?(h=Cl(s,b),y=h&&h.value):y=s[b]),d=c&&y?y:r[b],!(c&&typeof T==typeof d)&&(e.bind&&c?I=jl(d,Ce):e.wrap&&c?I=Ml(d):a&&Ll(d)?I=_l(d):I=d,(e.sham||d&&d.sham||T&&T.sham)&&ee(I,"sham",!0),ee(u,b,I),a&&(p=t+"Prototype",Po(Z,p)||ee(Z,p,{}),ee(Z[p],b,d),e.real&&f&&(l||!f[b])&&ee(f,b,d)))}});var Co=i((Yd,Lo)=>{"use strict";var Br=C(),kl=N(),_o=Function.prototype,Dl=Br&&Object.getOwnPropertyDescriptor,$r=kl(_o,"name"),Vl=$r&&function(){}.name==="something",Fl=$r&&(!Br||Br&&Dl(_o,"name").configurable);Lo.exports={EXISTS:$r,PROPER:Vl,CONFIGURABLE:Fl}});var jo=i((Hd,No)=>{"use strict";var Ul=Math.ceil,Gl=Math.floor;No.exports=Math.trunc||function(r){var t=+r;return(t>0?Gl:Ul)(t)}});var Wr=i((Xd,Mo)=>{"use strict";var Ql=jo();Mo.exports=function(e){var r=+e;return r!==r||r===0?0:Ql(r)}});var Do=i((Jd,ko)=>{"use strict";var Bl=Wr(),$l=Math.max,Wl=Math.min;ko.exports=function(e,r){var t=Bl(e);return t<0?$l(t+r,0):Wl(t,r)}});var Fo=i((Zd,Vo)=>{"use strict";var zl=Wr(),Kl=Math.min;Vo.exports=function(e){return e>0?Kl(zl(e),9007199254740991):0}});var zr=i((em,Uo)=>{"use strict";var Yl=Fo();Uo.exports=function(e){return Yl(e.length)}});var Bo=i((rm,Qo)=>{"use strict";var Hl=H(),Xl=Do(),Jl=zr(),Go=function(e){return function(r,t,n){var o=Hl(r),a=Jl(o),s=Xl(n,a),u;if(e&&t!=t){for(;a>s;)if(u=o[s++],u!=u)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===t)return e||s||0;return!e&&-1}};Qo.exports={includes:Go(!0),indexOf:Go(!1)}});var zo=i((tm,Wo)=>{"use strict";var Zl=L(),Kr=N(),ec=H(),rc=Bo().indexOf,tc=Ae(),$o=Zl([].push);Wo.exports=function(e,r){var t=ec(e),n=0,o=[],a;for(a in t)!Kr(tc,a)&&Kr(t,a)&&$o(o,a);for(;r.length>n;)Kr(t,a=r[n++])&&(~rc(o,a)||$o(o,a));return o}});var Yr=i((nm,Ko)=>{"use strict";Ko.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var Ho=i((om,Yo)=>{"use strict";var nc=zo(),oc=Yr();Yo.exports=Object.keys||function(r){return nc(r,oc)}});var Jo=i(Xo=>{"use strict";var ic=C(),ac=Tr(),sc=J(),uc=k(),lc=H(),cc=Ho();Xo.f=ic&&!ac?Object.defineProperties:function(r,t){uc(r);for(var n=lc(t),o=cc(t),a=o.length,s=0,u;a>s;)sc.f(r,u=o[s++],n[u]);return r}});var ei=i((am,Zo)=>{"use strict";var fc=gr();Zo.exports=fc("document","documentElement")});var Zr=i((sm,si)=>{"use strict";var pc=k(),vc=Jo(),ri=Yr(),bc=Ae(),dc=ei(),mc=dr(),Tc=Pe(),ti=">",ni="<",Xr="prototype",Jr="script",ii=Tc("IE_PROTO"),Hr=function(){},ai=function(e){return ni+Jr+ti+e+ni+"/"+Jr+ti},oi=function(e){e.write(ai("")),e.close();var r=e.parentWindow.Object;return e=null,r},yc=function(){var e=mc("iframe"),r="java"+Jr+":",t;return e.style.display="none",dc.appendChild(e),e.src=String(r),t=e.contentWindow.document,t.open(),t.write(ai("document.F=Object")),t.close(),t.F},Ne,je=function(){try{Ne=new ActiveXObject("htmlfile")}catch{}je=typeof document<"u"?document.domain&&Ne?oi(Ne):yc():oi(Ne);for(var e=ri.length;e--;)delete je[Xr][ri[e]];return je()};bc[ii]=!0;si.exports=Object.create||function(r,t){var n;return r!==null?(Hr[Xr]=pc(r),n=new Hr,Hr[Xr]=null,n[ii]=r):n=je(),t===void 0?n:vc.f(n,t)}});var li=i((um,ui)=>{"use strict";var hc=P();ui.exports=!hc(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})});var rt=i((lm,fi)=>{"use strict";var gc=N(),Ic=O(),Oc=_r(),xc=Pe(),Ec=li(),ci=xc("IE_PROTO"),et=Object,Sc=et.prototype;fi.exports=Ec?et.getPrototypeOf:function(e){var r=Oc(e);if(gc(r,ci))return r[ci];var t=r.constructor;return Ic(t)&&r instanceof t?t.prototype:r instanceof et?Sc:null}});var tt=i((cm,pi)=>{"use strict";var wc=B();pi.exports=function(e,r,t,n){return n&&n.enumerable?e[r]=t:wc(e,r,t),e}});var at=i((fm,di)=>{"use strict";var qc=P(),Rc=O(),Pc=Q(),Ac=Zr(),vi=rt(),_c=tt(),Lc=A(),Cc=ie(),it=Lc("iterator"),bi=!1,j,nt,ot;[].keys&&(ot=[].keys(),"next"in ot?(nt=vi(vi(ot)),nt!==Object.prototype&&(j=nt)):bi=!0);var Nc=!Pc(j)||qc(function(){var e={};return j[it].call(e)!==e});Nc?j={}:Cc&&(j=Ac(j));Rc(j[it])||_c(j,it,function(){return this});di.exports={IteratorPrototype:j,BUGGY_SAFARI_ITERATORS:bi}});var Me=i((pm,Ti)=>{"use strict";var jc=A(),Mc=jc("toStringTag"),mi={};mi[Mc]="z";Ti.exports=String(mi)==="[object z]"});var De=i((vm,yi)=>{"use strict";var kc=Me(),Dc=O(),ke=he(),Vc=A(),Fc=Vc("toStringTag"),Uc=Object,Gc=ke(function(){return arguments}())=="Arguments",Qc=function(e,r){try{return e[r]}catch{}};yi.exports=kc?ke:function(e){var r,t,n;return e===void 0?"Undefined":e===null?"Null":typeof(t=Qc(r=Uc(e),Fc))=="string"?t:Gc?ke(r):(n=ke(r))=="Object"&&Dc(r.callee)?"Arguments":n}});var gi=i((bm,hi)=>{"use strict";var Bc=Me(),$c=De();hi.exports=Bc?{}.toString:function(){return"[object "+$c(this)+"]"}});var st=i((dm,Oi)=>{"use strict";var Wc=Me(),zc=J().f,Kc=B(),Yc=N(),Hc=gi(),Xc=A(),Ii=Xc("toStringTag");Oi.exports=function(e,r,t,n){if(e){var o=t?e:e.prototype;Yc(o,Ii)||zc(o,Ii,{configurable:!0,value:r}),n&&!Wc&&Kc(o,"toString",Hc)}}});var Ei=i((mm,xi)=>{"use strict";var Jc=at().IteratorPrototype,Zc=Zr(),ef=ae(),rf=st(),tf=G(),nf=function(){return this};xi.exports=function(e,r,t,n){var o=r+" Iterator";return e.prototype=Zc(Jc,{next:ef(+!n,t)}),rf(e,o,!1,!0),tf[o]=nf,e}});var wi=i((Tm,Si)=>{"use strict";var of=L(),af=oe();Si.exports=function(e,r,t){try{return of(af(Object.getOwnPropertyDescriptor(e,r)[t]))}catch{}}});var Ri=i((ym,qi)=>{"use strict";var sf=O(),uf=String,lf=TypeError;qi.exports=function(e){if(typeof e=="object"||sf(e))return e;throw lf("Can't set "+uf(e)+" as a prototype")}});var Ai=i((hm,Pi)=>{"use strict";var cf=wi(),ff=k(),pf=Ri();Pi.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,r={},t;try{t=cf(Object.prototype,"__proto__","set"),t(r,[]),e=r instanceof Array}catch{}return function(o,a){return ff(o),pf(a),e?t(o,a):o.__proto__=a,o}}():void 0)});var Ui=i((gm,Fi)=>{"use strict";var vf=Qr(),bf=D(),Ve=ie(),Di=Co(),df=O(),mf=Ei(),_i=rt(),Li=Ai(),Tf=st(),yf=B(),ut=tt(),hf=A(),Ci=G(),Vi=at(),gf=Di.PROPER,If=Di.CONFIGURABLE,Ni=Vi.IteratorPrototype,Fe=Vi.BUGGY_SAFARI_ITERATORS,le=hf("iterator"),ji="keys",ce="values",Mi="entries",ki=function(){return this};Fi.exports=function(e,r,t,n,o,a,s){mf(t,r,n);var u=function(h){if(h===o&&b)return b;if(!Fe&&h in c)return c[h];switch(h){case ji:return function(){return new t(this,h)};case ce:return function(){return new t(this,h)};case Mi:return function(){return new t(this,h)}}return function(){return new t(this)}},f=r+" Iterator",l=!1,c=e.prototype,p=c[le]||c["@@iterator"]||o&&c[o],b=!Fe&&p||u(o),d=r=="Array"&&c.entries||p,T,y,I;if(d&&(T=_i(d.call(new e)),T!==Object.prototype&&T.next&&(!Ve&&_i(T)!==Ni&&(Li?Li(T,Ni):df(T[le])||ut(T,le,ki)),Tf(T,f,!0,!0),Ve&&(Ci[f]=ki))),gf&&o==ce&&p&&p.name!==ce&&(!Ve&&If?yf(c,"name",ce):(l=!0,b=function(){return bf(p,this)})),o)if(y={values:u(ce),keys:a?b:u(ji),entries:u(Mi)},s)for(I in y)(Fe||l||!(I in c))&&ut(c,I,y[I]);else vf({target:r,proto:!0,forced:Fe||l},y);return(!Ve||s)&&c[le]!==b&&ut(c,le,b,{name:o}),Ci[r]=b,y}});var Qi=i((Im,Gi)=>{"use strict";Gi.exports=function(e,r){return{value:e,done:r}}});var ct=i((Om,Ki)=>{"use strict";var Of=H(),lt=zt(),Bi=G(),Wi=co(),xf=J().f,Ef=Ui(),Ue=Qi(),Sf=ie(),wf=C(),zi="Array Iterator",qf=Wi.set,Rf=Wi.getterFor(zi);Ki.exports=Ef(Array,"Array",function(e,r){qf(this,{type:zi,target:Of(e),index:0,kind:r})},function(){var e=Rf(this),r=e.target,t=e.kind,n=e.index++;return!r||n>=r.length?(e.target=void 0,Ue(void 0,!0)):t=="keys"?Ue(n,!1):t=="values"?Ue(r[n],!1):Ue([n,r[n]],!1)},"values");var $i=Bi.Arguments=Bi.Array;lt("keys");lt("values");lt("entries");if(!Sf&&wf&&$i.name!=="values")try{xf($i,"name",{value:"values"})}catch{}});var Hi=i((xm,Yi)=>{"use strict";var Pf=A(),Af=G(),_f=Pf("iterator"),Lf=Array.prototype;Yi.exports=function(e){return e!==void 0&&(Af.Array===e||Lf[_f]===e)}});var ft=i((Em,Ji)=>{"use strict";var Cf=De(),Xi=we(),Nf=ge(),jf=G(),Mf=A(),kf=Mf("iterator");Ji.exports=function(e){if(!Nf(e))return Xi(e,kf)||Xi(e,"@@iterator")||jf[Cf(e)]}});var ea=i((Sm,Zi)=>{"use strict";var Df=D(),Vf=oe(),Ff=k(),Uf=Se(),Gf=ft(),Qf=TypeError;Zi.exports=function(e,r){var t=arguments.length<2?Gf(e):r;if(Vf(t))return Ff(Df(t,e));throw Qf(Uf(e)+" is not iterable")}});var na=i((wm,ta)=>{"use strict";var Bf=D(),ra=k(),$f=we();ta.exports=function(e,r,t){var n,o;ra(e);try{if(n=$f(e,"return"),!n){if(r==="throw")throw t;return t}n=Bf(n,e)}catch(a){o=!0,n=a}if(r==="throw")throw t;if(o)throw n;return ra(n),t}});var ua=i((qm,sa)=>{"use strict";var Wf=Gr(),zf=D(),Kf=k(),Yf=Se(),Hf=Hi(),Xf=zr(),oa=Ir(),Jf=ea(),Zf=ft(),ia=na(),ep=TypeError,Ge=function(e,r){this.stopped=e,this.result=r},aa=Ge.prototype;sa.exports=function(e,r,t){var n=t&&t.that,o=!!(t&&t.AS_ENTRIES),a=!!(t&&t.IS_RECORD),s=!!(t&&t.IS_ITERATOR),u=!!(t&&t.INTERRUPTED),f=Wf(r,n),l,c,p,b,d,T,y,I=function(g){return l&&ia(l,"normal",g),new Ge(!0,g)},h=function(g){return o?(Kf(g),u?f(g[0],g[1],I):f(g[0],g[1])):u?f(g,I):f(g)};if(a)l=e.iterator;else if(s)l=e;else{if(c=Zf(e),!c)throw ep(Yf(e)+" is not iterable");if(Hf(c)){for(p=0,b=Xf(e);b>p;p++)if(d=h(e[p]),d&&oa(aa,d))return d;return new Ge(!1)}l=Jf(e,c)}for(T=a?e.next:l.next;!(y=zf(T,l)).done;){try{d=h(y.value)}catch(g){ia(l,"throw",g)}if(typeof d=="object"&&d&&oa(aa,d))return d}return new Ge(!1)}});var ca=i((Rm,la)=>{"use strict";var rp=qe(),tp=J(),np=ae();la.exports=function(e,r,t){var n=rp(r);n in e?tp.f(e,n,np(0,t)):e[n]=t}});var fa=i(()=>{"use strict";var op=Qr(),ip=ua(),ap=ca();op({target:"Object",stat:!0},{fromEntries:function(r){var t={};return ip(r,function(n,o){ap(t,n,o)},{AS_ENTRIES:!0}),t}})});var va=i((_m,pa)=>{"use strict";ct();fa();var sp=xe();pa.exports=sp.Object.fromEntries});var da=i((Lm,ba)=>{"use strict";ba.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 ya=i(()=>{"use strict";ct();var up=da(),lp=S(),cp=De(),fp=B(),ma=G(),pp=A(),Ta=pp("toStringTag");for(Qe in up)pt=lp[Qe],Be=pt&&pt.prototype,Be&&cp(Be)!==Ta&&fp(Be,Ta,Qe),ma[Qe]=ma.Array;var pt,Be,Qe});var ga=i((jm,ha)=>{"use strict";var vp=va();ya();ha.exports=vp});var Oa=i((Mm,Ia)=>{"use strict";var bp=ga();Ia.exports=bp});var ja="__VERSION__";var x=class{constructor(){this.subscriptions=[]}unsubscribe(){let r=this.subscriptions;this.subscriptions=[],r.forEach(t=>typeof t=="function"?t():t.unsubscribe())}add(r){return this.subscriptions.push(r),this}};var _=e=>{throw new Error(`${e} is value of unexpected type`)},Ma=e=>{};var F=()=>{};var v=class{constructor(r){r&&(this._subscribe=r)}subscribe(r,t){let n;t?typeof t=="function"?n={next:t,error:F}:n={next:s=>t.next(s),error:s=>t.error?.(s)}:n={next:F,error:F};let o=typeof r=="function"?{next:s=>{try{r(s)}catch(u){n.next(u)}},error:s=>n.next(s)}:{next:s=>r.next(s),error:s=>r.error?r.error(s):n.next(s)},a;try{a=this._subscribe(o)}catch(s){o.error?.(s)}return new x().add(()=>{switch(o.next=F,o.error=F,typeof a){case"function":a();return;case"object":a.unsubscribe();return;case"undefined":return;default:return _(a)}})}pipe(...r){return r.reduce((t,n)=>n(t),this)}_subscribe(r){}};var M=class extends v{constructor(){super();this.keyCounter=0;this.subscribers=new Map}next(t){this.subscribers.forEach(n=>n.next(t))}error(t){this.subscribers.forEach(n=>n.error?.(t))}_subscribe(t){let n=this.keyCounter++;return this.subscribers.set(n,t),new x().add(()=>this.subscribers.delete(n))}};var We=class{constructor(){this.log$=new M;this.logs=[];this.log=r=>{let t={...r,timestamp:Date.now()};this.logs.push(t),this.log$.next(t)};this.getAllLogs=()=>this.logs}createCustomLog(r){return(...t)=>{let n;try{n=r(...t)}catch{n={message:"error in `createCustomLog`",component:"Logger"}}this.log(n)}}createComponentLog(r){return this.createCustomLog(t=>({component:r,...t}))}};function ka(e,r='Assertion "value is not nullable" failed'){if(e==null)throw new Error(r)}function Da(e,r='Assertion "value is nullable" failed'){if(e!=null)throw new Error(r)}function W(e){return typeof e<"u"&&e!==null}function ze(e){return e==null}function Va(e,r){if(!e?.length)throw new Error(r)}function Fa(e,r){if(e?.length)throw new Error(r)}var Ua=(e,r,t)=>new Promise((n,o)=>{r.addEventListener("abort",()=>{u(),l.remove()});let a=()=>{u(),o()},s=()=>{u(),n()},u=()=>{f&&clearTimeout(f),l.removeEventListener("load",s),l.removeEventListener("error",a)},f;t&&(f=window.setTimeout(a,t));let l=document.createElement("script");l.addEventListener("load",s),l.addEventListener("error",a),l.src=e,document.head.appendChild(l)});var Ga=typeof window.performance?.now=="function"?()=>window.performance.now():()=>Date.now();var Qa=(e,r)=>async(...t)=>{let n=r(...t),o=e.aborted,a;for(;!o&&!e.aborted;)try{let s=await n.next(a);o=s.done??!1,a=s.value}catch(s){await n.throw(s)}return a};var mt=(l=>(l.Unknown="Unknown",l.Yandex="Yandex",l.Chrome="Chrome",l.Chromium="Chromium",l.Firefox="Firefox",l.Safari="Safari",l.Opera="Opera",l.Edge="Edge",l.Rest="Rest",l))(mt||{}),Tt=(f=>(f.Unknown="Unknown",f.Android="Android",f.iPhone="iPhone",f.iPad="iPad",f.iPod="iPod",f.RestMobile="RestMobile",f.Mac="Mac",f.Desktop="Desktop",f))(Tt||{}),ve=()=>{let{userAgent:e}=window.navigator,r=/yabrowser/i.test(e)?"Yandex":void 0,t=/chrome|crios/i.test(e)?"Chrome":void 0,n=/chromium/i.test(e)?"Chromium":void 0,o=/firefox|fxios/i.test(e)?"Firefox":void 0,a=/webkit|safari|khtml/i.test(e)?"Safari":void 0,s=/opr\//i.test(e)?"Opera":void 0,u=/edg/i.test(e)?"Edge":void 0,f=/android/i.test(e)?"Android":void 0,l=/iphone/i.test(e)?"iPhone":void 0,c=/ipad/i.test(e)?"iPad":void 0,p=/ipod/i.test(e)?"iPod":void 0,b=/mac/i.test(e)?"Mac":void 0,d=/webOS|BlackBerry|IEMobile|Opera Mini/i.test(e)?"RestMobile":void 0;return{browser:r||o||s||u||t||n||a||"Rest",device:f||l||c||p||d||b||"Desktop"}},Ba=(e=!1)=>{let t=["iPhone","iPad","iPod"].includes(ve().device);if(!e)return t;let{userAgent:n,maxTouchPoints:o}=window.navigator;return!!(t||/macintosh/i.test(n)&&o>0)},$a=()=>{let{userAgent:e}=window.navigator,r=e.match(/Version\/(\d+(\.\d+)?)/i);if(!r)return null;let t=r[1],n=parseFloat(t);return isNaN(n)?null:n},Wa=()=>ve().device==="Android",za=()=>["Mac","iPhone","iPad","iPod"].includes(ve().device),Ka=()=>/Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test(navigator.appVersion??navigator.userAgent)||navigator?.userAgentData?.mobile;var Ya=(e,{start:r=0,factor:t=2,max:n=1/0,min:o=r,random:a=0}={})=>{let s=r;return s*=t**e,s*=1+(Math.random()*a*2-a),s=Math.round(s),s=Math.min(s,n),s=Math.max(s,o),s};var yt={};La(yt,{clear:()=>rs,get:()=>Xa,has:()=>Za,isPersistent:()=>Ha,remove:()=>es,set:()=>Ja});var z,U,Ke=`vk-videoplayer-dummy-key-${Math.random()}`,K=()=>{if(U!==void 0)return U;try{localStorage.setItem(Ke,"test"),localStorage.removeItem(Ke),U=0}catch(e){if(e instanceof DOMException||e instanceof TypeError)try{sessionStorage.getItem(Ke),U=1}catch(r){if(r instanceof DOMException||r instanceof TypeError)U=2;else throw r}else throw e}return U===2&&(z=new Map),U},Ha=()=>K()===0,Xa=e=>{let r=K();switch(r){case 0:return localStorage.getItem(e)??void 0;case 1:return sessionStorage.getItem(e)??void 0;case 2:return z?.get(e);default:_(r)}},Ja=(e,r)=>{let t=K();switch(t){case 0:try{localStorage.setItem(e,r)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 1:try{sessionStorage.setItem(e,r)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 2:return void z?.set(e,r);default:_(t)}},Za=e=>{let r=K();switch(r){case 0:return e in localStorage;case 1:return e in sessionStorage;case 2:return z?.has(e)??!1;default:return _(r),!1}},es=e=>{let r=K();switch(r){case 0:return localStorage.removeItem(e);case 1:return sessionStorage.removeItem(e);case 2:return void z?.delete(e);default:_(r)}},rs=()=>{let e=K();switch(e){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return z?.clear();default:_(e)}};var ts=()=>{let e,r;try{e=window.self!==window.top}catch(n){n instanceof DOMException&&n.name==="SecurityError"?e=!0:(e=!1,console.error(n))}try{window.location.ancestorOrigins&&(r=window.location.ancestorOrigins[window.location.ancestorOrigins.length-1])}catch(n){console.error(n)}try{!r&&document.referrer&&(r=document.referrer)}catch(n){console.error(n)}let t=r?new URL(r).hostname:void 0;return{isEmbed:e,host:t}};var Ye=(c=>(c.INVARIANT="Invariant quality",c.Q_144P="144p",c.Q_240P="240p",c.Q_360P="360p",c.Q_480P="480p",c.Q_720P="720p",c.Q_1080P="1080p",c.Q_1440P="1440p",c.Q_2160P="2160p",c.Q_4320P="4320p",c))(Ye||{});var E={"144p":{width:256,height:144},"240p":{width:428,height:240},"360p":{width:640,height:360},"480p":{width:856,height:480},"720p":{width:1280,height:720},"1080p":{width:1920,height:1080},"1440p":{width:2560,height:1440},"2160p":{width:3840,height:2160},"4320p":{width:7680,height:4320}},ns=(e,r)=>E[e].height>E[r].height,os=(e,r)=>E[e].height>=E[r].height,He=(e,r)=>E[e].height<E[r].height,is=(e,r)=>E[e].height<=E[r].height,as=e=>e.sort((r,t)=>r===t?0:r==="Invariant quality"?1:t==="Invariant quality"?-1:He(r,t)?1:-1)[0],ht=Object.keys(E).sort((e,r)=>He(e,r)?-1:1),ss=(e,r=.02)=>[...ht].find(n=>E[n].height*(1+r)>=e),us=({width:e,height:r})=>{let t=Math.min(e,r),n=Math.max(e,r);return ht.find(o=>{let a=E[o];return a.width>=n&&a.height>=t})},ls=e=>E[e].height,Xe=e=>e==="Invariant quality",cs=e=>e.every(r=>!Xe(r));function fs(e){if(Xe(e))throw new Error("Expected exact quality")}var ps=(e,r)=>{let t={};for(let n of Object.keys(r)){let o=r[n],a=e[n];Array.isArray(o)&&Array.isArray(a)?t[n]=a:typeof o=="object"&&typeof a=="object"?t[n]=ps(a,o):t[n]=n in e?a:o}return t};var Yp=e=>{let r="";return e>=3600&&(r+=Math.floor(e/3600)+"h",e=e%3600),e>=60&&(r+=Math.floor(e/60)+"m",e=e%60),e>0&&(r+=Math.floor(e)+"s"),r};function Je(e,r=0,t){let n,o,a,s,u,f,l=0,c=!1,p=!1,b=!0,d=!r&&r!==0&&typeof window.requestAnimationFrame=="function";t&&(c=!!t.leading,p="maxWait"in t,a=t?.maxWait?Math.max(+t?.maxWait||0,r):a,b="trailing"in t?!!t.trailing:b);function T(m){let w=n,V=o;return n=o=void 0,l=m,s=e.apply(V,w),s}function y(m,w){return d?(u&&window.cancelAnimationFrame(u),window.requestAnimationFrame(m)):setTimeout(m,w)}function I(m){if(d){window.cancelAnimationFrame(m);return}clearTimeout(m)}function h(m){return l=m,u=y(fe,r),c?T(m):s}function g(m){let w=m-f,V=m-l,dt=r-w;return p?Math.min(dt,a-V):dt}function vt(m){let w=m-f,V=m-l;return f===void 0||w>=r||w<0||p&&V>=a}function fe(){let m=Date.now();if(vt(m))return bt(m);u=y(fe,g(m))}function bt(m){return u=void 0,b&&n?T(m):(n=o=void 0,s)}function Ea(){u!==void 0&&I(u),l=0,n=f=o=u=void 0}function Sa(){return u===void 0?s:bt(Date.now())}function wa(){return u!==void 0}function pe(...m){let w=Date.now(),V=vt(w);if(n=m,o=this,f=w,V){if(u===void 0)return h(f);if(p)return u=y(fe,r),T(f)}return u===void 0&&(u=y(fe,r)),s}return pe.cancel=Ea,pe.flush=Sa,pe.pending=wa,pe}var Ze=(e,r=0,t)=>Je(e,r,{...{leading:!0,trailing:!0},...t,maxWait:r});var be=(e,r)=>{if(e===null||typeof e!="object")return e;let t=Array.isArray(e)?[]:{};for(let n in e){if(typeof r=="function"){let o=r(e[n],n,e,t);if(o!==void 0){t[n]=o;continue}}typeof e[n]=="object"?t[n]=be(e[n],r):t[n]=e[n]}return t};var vs=e=>be(e);var bs=300,ds=(e,r=bs)=>new v(t=>{let{width:n,height:o}=e.getBoundingClientRect();if(t.next({width:n,height:o}),!window.ResizeObserver)return;let a=new ResizeObserver(Ze(s=>{let u=s[0];if(!u)return;let f,l;u.contentBoxSize&&u.contentBoxSize[0]?(l=u.contentBoxSize[0].blockSize,f=u.contentBoxSize[0].inlineSize):u.contentRect&&(f=u.contentRect.width,l=u.contentRect.height),W(f)&&W(l)&&t.next({width:f,height:l})},r));return a.observe(e),()=>a.disconnect()});var de=class extends M{constructor(t){super();this.value=t}next(t){super.next(this.value=t)}error(t){super.error(this.value=t)}getValue(){return this.value}_subscribe(t){let n=super._subscribe(t);return t.next(this.value),n}};function gt(e){return new v(r=>{let t={},n=Object.keys(e).length,o=a=>s=>{a in t||n--,t[a]=s,n===0&&r.next(t)};return Object.entries(e).reduce((a,[s,u])=>a.add(u.subscribe(o(s))),new x)})}function It(...e){return new v(r=>e.reduce((t,n)=>t.add(n.subscribe(r)),new x))}var ms=e=>new v(r=>{let t=window.setTimeout(()=>{try{r.next()}catch(n){if(r.error)r.error(n);else throw n}},e);return()=>window.clearTimeout(t)});var Ts=e=>new v(r=>{let t=window.setInterval(()=>r.next(),e);return()=>{t&&(window.clearInterval(t),t=void 0)}});var ys=e=>new v(r=>{e.forEach(t=>r.next(t))});var hs=(e,r)=>new v(t=>{let n=o=>t.next(o);return e.addEventListener(r,n),()=>e.removeEventListener(r,n)});function Ot(e){return r=>new v(t=>r.subscribe(new er(t,e)))}var er=class{constructor(r,t){this.destination=r;this.size=t;this.lastValues=[]}next(r){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(r),this.destination.next(this.lastValues)}error(r){this.destination.error?.(r)}};var gs={leading:!1,trailing:!0};function xt(e,r=gs){return t=>new v(n=>t.subscribe(new rr(n,e,r)))}var rr=class{constructor(r,t,n){this.destination=r;this.time=t;this.config=n}next(r){this.lastValue=r,W(this.timeout)?window.clearTimeout(this.timeout):this.config.leading&&this.destination.next(r),this.timeout=window.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(t){if(this.destination.error)this.destination.error(t);else throw t}this.timeout=void 0},this.time)}error(r){this.destination.error?.(r)}};var Is={leading:!0,trailing:!1};function Et(e,r=Is){return t=>new v(n=>t.subscribe(new tr(n,e,r)))}var tr=class{constructor(r,t,n){this.destination=r;this.time=t;this.config=n}next(r){this.lastValue=r,ze(this.timeout)&&(this.config.leading&&this.destination.next(r),this.timeout=window.setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(r){this.destination.error?.(r)}};function St(e){return r=>new v(t=>r.subscribe(new nr(t,e)))}var nr=class{constructor(r,t){this.destination=r;this.predicate=t}next(r){let t;try{t=this.predicate(r)}catch(n){throw this.error(n),n}t&&this.destination.next(r)}error(r){this.destination.error?.(r)}};function qt(e=(r,t)=>r===t){return r=>new v(t=>r.subscribe(new or(t,e)))}var wt={},or=class{constructor(r,t){this.destination=r;this.predicate=t;this.lastValue=wt}next(r){let t;try{t=this.lastValue===wt||!this.predicate(this.lastValue,r),this.lastValue=r}catch(n){throw this.error(n),n}t&&this.destination.next(r)}error(r){this.destination.error?.(r)}};function me(e){return r=>new v(t=>r.subscribe(new ir(t,e)))}var ir=class{constructor(r,t){this.destination=r;this.mapper=t}next(r){let t;try{t=this.mapper(r)}catch(n){throw this.error(n),n}this.destination.next(t)}error(r){this.destination.error?.(r)}};function Rt(e){return me(()=>e)}function Pt(){return e=>new v(r=>{let t=!1,n=!1,o=e.subscribe(a=>{t||(t=!0,r.next(a)),n&&o.unsubscribe()},a=>{t=!0,r.error?.(a),n&&o.unsubscribe()});return n=!0,t&&o.unsubscribe(),o})}function At(){return e=>new v(r=>e.subscribe(new ar(r)))}var ar=class{constructor(r){this.destination=r;this.hasLast=!1}next(r){let t=this.last;if(this.last=r,!this.hasLast){this.hasLast=!0;return}this.destination.next([t,r])}error(r){this.destination.error?.(r)}};function _t(e){return r=>new v(t=>r.subscribe(new sr(t,e)))}var sr=class{constructor(r,t){this.destination=r;this.effect=t}next(r){try{this.effect(r)}catch(t){throw this.error(t),t}this.destination.next(r)}error(r){this.destination.error?.(r)}};var Os=(u=>(u.NETWORK="network",u.VIDEO_PIPELINE="video_pipeline",u.EXTERNAL_API="external_api",u.PARSER="parser",u.DOM="dom",u.WTF="wtf",u.FATAL="fatal",u))(Os||{});var Te=class{constructor(){Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}addEventListener(r,t,n){r in this.listeners||(this.listeners[r]=[]),this.listeners[r].push({callback:t,options:n})}removeEventListener(r,t){if(!(r in this.listeners))return;let n=this.listeners[r];for(let o=0,a=n.length;o<a;o++)if(n[o].callback===t){n.splice(o,1);return}}dispatchEvent(r){if(!(r.type in this.listeners))return;let n=this.listeners[r.type].slice();for(let o=0,a=n.length;o<a;o++){let s=n[o];try{s.callback.call(this,r)}catch(u){Promise.resolve().then(()=>{throw u})}s.options&&s.options.once&&this.removeEventListener(r.type,s.callback)}return!r.defaultPrevented}},Y=class extends Te{constructor(){super(),this.listeners||Te.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(r){r.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,r)),super.dispatchEvent(r)}},re=class{constructor(){Object.defineProperty(this,"signal",{value:new Y,writable:!0,configurable:!0})}abort(r){let t;try{t=new Event("abort")}catch{typeof document<"u"?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 n=r;if(n===void 0)if(typeof document>"u")n=new Error("This operation was aborted"),n.name="AbortError";else try{n=new DOMException("signal is aborted without reason")}catch{n=new Error("This operation was aborted"),n.name="AbortError"}this.signal.reason=n,this.signal.dispatchEvent(t)}toString(){return"[object AbortController]"}};typeof Symbol<"u"&&Symbol.toStringTag&&(re.prototype[Symbol.toStringTag]="AbortController",Y.prototype[Symbol.toStringTag]="AbortSignal");function ye(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof e.Request=="function"&&!e.Request.prototype.hasOwnProperty("signal")||!e.AbortController}function ur(e){typeof e=="function"&&(e={fetch:e});let{fetch:r,Request:t=r.Request,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:o=!1}=e;if(!ye({fetch:r,Request:t,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:o}))return{fetch:r,Request:a};let a=t;(a&&!a.prototype.hasOwnProperty("signal")||o)&&(a=function(l,c){let p;c&&c.signal&&(p=c.signal,delete c.signal);let b=new t(l,c);return p&&Object.defineProperty(b,"signal",{writable:!1,enumerable:!1,configurable:!0,value:p}),b},a.prototype=t.prototype);let s=r;return{fetch:(f,l)=>{let c=a&&a.prototype.isPrototypeOf(f)?f.signal:l?l.signal:void 0;if(c){let p;try{p=new DOMException("Aborted","AbortError")}catch{p=new Error("Aborted"),p.name="AbortError"}if(c.aborted)return Promise.reject(p);let b=new Promise((d,T)=>{c.addEventListener("abort",()=>T(p),{once:!0})});return l&&l.signal&&delete l.signal,Promise.race([b,s(f,l)])}return s(f,l)},Request:a}}var te=ye({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}),Lt=te?ur({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}):void 0,Ct=te?Lt.fetch:window.fetch,Bb=te?Lt.Request:window.Request,$b=te?re:window.AbortController,Wb=te?Y:window.AbortSignal;var xa=Na(Oa(),1),dp=(p=>(p.Armenian="58",p.Azerbaijani="57",p.Belarusian="114",p.English="3",p.Kazakh="97",p.Portuguese="73",p.Russian="0",p.Spanish="4",p.Ukrainian="1",p.Uzbek="65",p.Vietnamese="75",p))(dp||{}),mp="vk.com",Dm=async(e,r,t)=>{let n=new URL(`https://${mp}/js/lang-pack.js`);n.searchParams.set("format","json"),n.searchParams.set("name",r),e!==void 0&&n.searchParams.set("lang",e);let a=await(await Ct(n.toString())).json();return Tp(a,t)},Tp=(e,r)=>(0,xa.default)(Object.entries(e.keys).map(([t,n])=>[t.substring(`${r}_`.length),yp(n)])),yp=e=>Array.isArray(e)?e[0]:e;var hp=(t=>(t.RU="ru",t.EN="en",t))(hp||{});export{mt as CurrentClientBrowser,Tt as CurrentClientDevice,Os as ErrorCategory,hp as InterfaceLanguage,We as Logger,v as Observable,M as Subject,x as Subscription,ja as VERSION,dp as VKNumericLanguage,de as ValueSubject,Ye as VideoQuality,Qa as abortable,Ua as addScript,cs as areQualitiesExact,Fa as assertEmptyArray,_ as assertNever,ka as assertNonNullable,Va as assertNotEmptyArray,Da as assertNullable,fs as assertQualityIsExact,Ot as buffer,Ma as checkNever,vs as cloneDeep,be as cloneDeepWith,gt as combine,xt as debounce,Je as debounceFn,ts as detectEmbed,ps as fillWithDefault,St as filter,qt as filterChanged,hs as fromEvent,ve as getCurrentBrowser,Ya as getExponentialDelay,as as getHighestQuality,$a as getIOSVersion,Ts as interval,Wa as isAndroid,ns as isHigher,os as isHigherOrEqual,Ba as isIOS,Xe as isInvariantQuality,He as isLower,is as isLowerOrEqual,za as isMacLike,Ka as isMobile,W as isNonNullable,ze as isNullable,Dm as loadVKLangPack,me as map,Rt as mapTo,It as merge,F as noop,Ga as now,ys as observableFrom,ds as observeElementSize,Pt as once,At as pairwise,yt as safeStorage,_t as tap,Et as throttle,Ze as throttleFn,Yp as timeCodeToString,ms as timeout,ss as videoHeightToQuality,ls as videoQualityToHeight,us as videoSizeToQuality};
6
+ var ye=Object.defineProperty;var Oe=(t,e)=>{for(var r in e)ye(t,r,{get:e[r],enumerable:!0})};var we="1.0.37-dev.511f8223.0";var f=class{constructor(){this.subscriptions=[]}unsubscribe(){let e=this.subscriptions;this.subscriptions=[],e.forEach(r=>typeof r=="function"?r():r.unsubscribe())}add(e){return this.subscriptions.push(e),this}};var v=t=>{throw new Error(`${t} is value of unexpected type`)},Ee=t=>{};var g=()=>{};var l=class{constructor(e){e&&(this._subscribe=e)}subscribe(e,r){let n;r?typeof r=="function"?n={next:r,error:g}:n={next:o=>r.next(o),error:o=>r.error?.(o)}:n={next:g,error:g};let s=typeof e=="function"?{next:o=>{try{e(o)}catch(a){n.next(a)}},error:o=>n.next(o)}:{next:o=>e.next(o),error:o=>e.error?e.error(o):n.next(o)},i;try{i=this._subscribe(s)}catch(o){s.error?.(o)}return new f().add(()=>{switch(s.next=g,s.error=g,typeof i){case"function":i();return;case"object":i.unsubscribe();return;case"undefined":return;default:return v(i)}})}pipe(...e){return e.reduce((r,n)=>n(r),this)}_subscribe(e){}};var I=class extends l{constructor(){super();this.keyCounter=0;this.subscribers=new Map}next(r){this.subscribers.forEach(n=>n.next(r))}error(r){this.subscribers.forEach(n=>n.error?.(r))}_subscribe(r){let n=this.keyCounter++;return this.subscribers.set(n,r),new f().add(()=>this.subscribers.delete(n))}};var V=class{constructor(){this.log$=new I;this.logs=[];this.log=e=>{let r={...e,timestamp:Date.now()};this.logs.push(r),this.log$.next(r)};this.getAllLogs=()=>this.logs}createCustomLog(e){return(...r)=>{let n;try{n=e(...r)}catch{n={message:"error in `createCustomLog`",component:"Logger"}}this.log(n)}}createComponentLog(e){return this.createCustomLog(r=>({component:e,...r}))}};function Se(t,e='Assertion "value is not nullable" failed'){if(t==null)throw new Error(e)}function Ae(t,e='Assertion "value is nullable" failed'){if(t!=null)throw new Error(e)}function y(t){return typeof t<"u"&&t!==null}function Q(t){return t==null}function Re(t,e){if(!t?.length)throw new Error(e)}function Ce(t,e){if(t?.length)throw new Error(e)}var ke=(t,e,r)=>new Promise((n,s)=>{e.addEventListener("abort",()=>{a(),b.remove()});let i=()=>{a(),s()},o=()=>{a(),n()},a=()=>{u&&clearTimeout(u),b.removeEventListener("load",o),b.removeEventListener("error",i)},u;r&&(u=window.setTimeout(i,r));let b=document.createElement("script");b.addEventListener("load",o),b.addEventListener("error",i),b.src=t,document.head.appendChild(b)});var Le=typeof window.performance?.now=="function"?()=>window.performance.now():()=>Date.now();var Pe=(t,e)=>async(...r)=>{let n=e(...r),s=t.aborted,i;for(;!s&&!t.aborted;)try{let o=await n.next(i);s=o.done??!1,i=o.value}catch(o){await n.throw(o)}return i};var ee=(c=>(c.Unknown="Unknown",c.Yandex="Yandex",c.Chrome="Chrome",c.Chromium="Chromium",c.Firefox="Firefox",c.Safari="Safari",c.Opera="Opera",c.Edge="Edge",c.SamsungBrowser="SamsungBrowser",c.Rest="Rest",c))(ee||{}),te=(u=>(u.Unknown="Unknown",u.Android="Android",u.iPhone="iPhone",u.iPad="iPad",u.iPod="iPod",u.RestMobile="RestMobile",u.Mac="Mac",u.Desktop="Desktop",u))(te||{}),L=()=>{let{userAgent:t}=window.navigator,e=/yabrowser/i.test(t)?"Yandex":void 0,r=/samsungbrowser/i.test(t)?"SamsungBrowser":void 0,n=/chrome|crios/i.test(t)?"Chrome":void 0,s=/chromium/i.test(t)?"Chromium":void 0,i=/firefox|fxios/i.test(t)?"Firefox":void 0,o=/webkit|safari|khtml/i.test(t)?"Safari":void 0,a=/opr\//i.test(t)?"Opera":void 0,u=/edg/i.test(t)?"Edge":void 0,b=/android/i.test(t)?"Android":void 0,c=/iphone/i.test(t)?"iPhone":void 0,d=/ipad/i.test(t)?"iPad":void 0,E=/ipod/i.test(t)?"iPod":void 0,A=/mac/i.test(t)?"Mac":void 0,S=/webOS|BlackBerry|IEMobile|Opera Mini/i.test(t)?"RestMobile":void 0;return{browser:e||r||i||a||u||n||s||o||"Rest",device:b||c||d||E||S||A||"Desktop"}},Me=(t=!1)=>{let r=["iPhone","iPad","iPod"].includes(L().device);if(!t)return r;let{userAgent:n,maxTouchPoints:s}=window.navigator;return!!(r||/macintosh/i.test(n)&&s>0)},Ne=()=>{let{userAgent:t}=window.navigator,e=t.match(/Version\/(\d+(\.\d+)?)/i);if(!e)return null;let r=e[1],n=parseFloat(r);return isNaN(n)?null:n},Ve=()=>L().device==="Android",Qe=()=>["Mac","iPhone","iPad","iPod"].includes(L().device),_e=()=>/Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test(navigator.appVersion??navigator.userAgent)||navigator?.userAgentData?.mobile;var De=(t,{start:e=0,factor:r=2,max:n=1/0,min:s=e,random:i=0}={})=>{let o=e;return o*=r**t,o*=1+(Math.random()*i*2-i),o=Math.round(o),o=Math.min(o,n),o=Math.max(o,s),o};var re={};Oe(re,{clear:()=>We,get:()=>Be,has:()=>ze,isPersistent:()=>Ue,remove:()=>je,set:()=>Fe});var O,h,_=`vk-videoplayer-dummy-key-${Math.random()}`,w=()=>{if(h!==void 0)return h;try{localStorage.setItem(_,"test"),localStorage.removeItem(_),h=0}catch(t){if(t instanceof DOMException||t instanceof TypeError)try{sessionStorage.getItem(_),h=1}catch(e){if(e instanceof DOMException||e instanceof TypeError)h=2;else throw e}else throw t}return h===2&&(O=new Map),h},Ue=()=>w()===0,Be=t=>{let e=w();switch(e){case 0:return localStorage.getItem(t)??void 0;case 1:return sessionStorage.getItem(t)??void 0;case 2:return O?.get(t);default:v(e)}},Fe=(t,e)=>{let r=w();switch(r){case 0:try{localStorage.setItem(t,e)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 1:try{sessionStorage.setItem(t,e)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 2:return void O?.set(t,e);default:v(r)}},ze=t=>{let e=w();switch(e){case 0:return t in localStorage;case 1:return t in sessionStorage;case 2:return O?.has(t)??!1;default:return v(e),!1}},je=t=>{let e=w();switch(e){case 0:return localStorage.removeItem(t);case 1:return sessionStorage.removeItem(t);case 2:return void O?.delete(t);default:v(e)}},We=()=>{let t=w();switch(t){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return O?.clear();default:v(t)}};var Ge=()=>{let t,e;try{t=window.self!==window.top}catch(n){n instanceof DOMException&&n.name==="SecurityError"?t=!0:(t=!1,console.error(n))}try{window.location.ancestorOrigins&&(e=window.location.ancestorOrigins[window.location.ancestorOrigins.length-1])}catch(n){console.error(n)}try{!e&&document.referrer&&(e=document.referrer)}catch(n){console.error(n)}let r=e?new URL(e).hostname:void 0;return{isEmbed:t,host:r}};var D=(c=>(c.INVARIANT="Invariant quality",c.Q_144P="144p",c.Q_240P="240p",c.Q_360P="360p",c.Q_480P="480p",c.Q_720P="720p",c.Q_1080P="1080p",c.Q_1440P="1440p",c.Q_2160P="2160p",c.Q_4320P="4320p",c))(D||{});var m={"144p":{width:256,height:144},"240p":{width:428,height:240},"360p":{width:640,height:360},"480p":{width:856,height:480},"720p":{width:1280,height:720},"1080p":{width:1920,height:1080},"1440p":{width:2560,height:1440},"2160p":{width:3840,height:2160},"4320p":{width:7680,height:4320}},qe=(t,e)=>m[t].height>m[e].height,He=(t,e)=>m[t].height>=m[e].height,U=(t,e)=>m[t].height<m[e].height,Ke=(t,e)=>m[t].height<=m[e].height,$e=t=>t.sort((e,r)=>e===r?0:e==="Invariant quality"?1:r==="Invariant quality"?-1:U(e,r)?1:-1)[0],ne=Object.keys(m).sort((t,e)=>U(t,e)?-1:1),Ye=(t,e=.02)=>[...ne].find(n=>m[n].height*(1+e)>=t),Xe=({width:t,height:e})=>{let r=Math.min(t,e),n=Math.max(t,e);return ne.find(s=>{let i=m[s];return i.width>=n&&i.height>=r})},Je=t=>m[t].height,B=t=>t==="Invariant quality",Ze=t=>t.every(e=>!B(e));function et(t){if(B(t))throw new Error("Expected exact quality")}var tt=(t,e)=>{let r={};for(let n of Object.keys(e)){let s=e[n],i=t[n];Array.isArray(s)&&Array.isArray(i)?r[n]=i:typeof s=="object"&&typeof i=="object"?r[n]=tt(i,s):r[n]=n in t?i:s}return r};var qt=t=>{let e="";return t>=3600&&(e+=Math.floor(t/3600)+"h",t=t%3600),t>=60&&(e+=Math.floor(t/60)+"m",t=t%60),t>0&&(e+=Math.floor(t)+"s"),e};function F(t,e=0,r){let n,s,i,o,a,u,b=0,c=!1,d=!1,E=!0,A=!e&&e!==0&&typeof window.requestAnimationFrame=="function";r&&(c=!!r.leading,d="maxWait"in r,i=r?.maxWait?Math.max(+r?.maxWait||0,e):i,E="trailing"in r?!!r.trailing:E);function S(p){let T=n,x=s;return n=s=void 0,b=p,o=t.apply(x,T),o}function R(p,T){return A?(a&&window.cancelAnimationFrame(a),window.requestAnimationFrame(p)):setTimeout(p,T)}function Te(p){if(A){window.cancelAnimationFrame(p);return}clearTimeout(p)}function ve(p){return b=p,a=R(C,e),c?S(p):o}function Ie(p){let T=p-u,x=p-b,Z=e-T;return d?Math.min(Z,i-x):Z}function X(p){let T=p-u,x=p-b;return u===void 0||T>=e||T<0||d&&x>=i}function C(){let p=Date.now();if(X(p))return J(p);a=R(C,Ie(p))}function J(p){return a=void 0,E&&n?S(p):(n=s=void 0,o)}function xe(){a!==void 0&&Te(a),b=0,n=u=s=a=void 0}function ge(){return a===void 0?o:J(Date.now())}function he(){return a!==void 0}function k(...p){let T=Date.now(),x=X(T);if(n=p,s=this,u=T,x){if(a===void 0)return ve(u);if(d)return a=R(C,e),S(u)}return a===void 0&&(a=R(C,e)),o}return k.cancel=xe,k.flush=ge,k.pending=he,k}var z=(t,e=0,r)=>F(t,e,{...{leading:!0,trailing:!0},...r,maxWait:e});var P=(t,e)=>{if(t===null||typeof t!="object")return t;let r=Array.isArray(t)?[]:{};for(let n in t){if(typeof e=="function"){let s=e(t[n],n,t,r);if(s!==void 0){r[n]=s;continue}}typeof t[n]=="object"?r[n]=P(t[n],e):r[n]=t[n]}return r};var rt=t=>P(t);var nt=300,ot=(t,e=nt)=>new l(r=>{let{width:n,height:s}=t.getBoundingClientRect();if(r.next({width:n,height:s}),!window.ResizeObserver)return;let i=new ResizeObserver(z(o=>{let a=o[0];if(!a)return;let u,b;a.contentBoxSize&&a.contentBoxSize[0]?(b=a.contentBoxSize[0].blockSize,u=a.contentBoxSize[0].inlineSize):a.contentRect&&(u=a.contentRect.width,b=a.contentRect.height),y(u)&&y(b)&&r.next({width:u,height:b})},e));return i.observe(t),()=>i.disconnect()});var M=class extends I{constructor(r){super();this.value=r}next(r){super.next(this.value=r)}error(r){super.error(this.value=r)}getValue(){return this.value}_subscribe(r){let n=super._subscribe(r);return r.next(this.value),n}};function oe(t){return new l(e=>{let r={},n=Object.keys(t).length,s=i=>o=>{i in r||n--,r[i]=o,n===0&&e.next(r)};return Object.entries(t).reduce((i,[o,a])=>i.add(a.subscribe(s(o))),new f)})}function ie(...t){return new l(e=>t.reduce((r,n)=>r.add(n.subscribe(e)),new f))}var it=t=>new l(e=>{let r=window.setTimeout(()=>{try{e.next()}catch(n){if(e.error)e.error(n);else throw n}},t);return()=>window.clearTimeout(r)});var st=t=>new l(e=>{let r=window.setInterval(()=>e.next(),t);return()=>{r&&(window.clearInterval(r),r=void 0)}});var at=t=>new l(e=>{t.forEach(r=>e.next(r))});var lt=(t,e)=>new l(r=>{let n=s=>r.next(s);return t.addEventListener(e,n),()=>t.removeEventListener(e,n)});function se(t){return e=>new l(r=>e.subscribe(new j(r,t)))}var j=class{constructor(e,r){this.destination=e;this.size=r;this.lastValues=[]}next(e){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(e),this.destination.next(this.lastValues)}error(e){this.destination.error?.(e)}};var ut={leading:!1,trailing:!0};function ae(t,e=ut){return r=>new l(n=>r.subscribe(new W(n,t,e)))}var W=class{constructor(e,r,n){this.destination=e;this.time=r;this.config=n}next(e){this.lastValue=e,y(this.timeout)?window.clearTimeout(this.timeout):this.config.leading&&this.destination.next(e),this.timeout=window.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(r){if(this.destination.error)this.destination.error(r);else throw r}this.timeout=void 0},this.time)}error(e){this.destination.error?.(e)}};var ct={leading:!0,trailing:!1};function le(t,e=ct){return r=>new l(n=>r.subscribe(new G(n,t,e)))}var G=class{constructor(e,r,n){this.destination=e;this.time=r;this.config=n}next(e){this.lastValue=e,Q(this.timeout)&&(this.config.leading&&this.destination.next(e),this.timeout=window.setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(e){this.destination.error?.(e)}};function ue(t){return e=>new l(r=>e.subscribe(new q(r,t)))}var q=class{constructor(e,r){this.destination=e;this.predicate=r}next(e){let r;try{r=this.predicate(e)}catch(n){throw this.error(n),n}r&&this.destination.next(e)}error(e){this.destination.error?.(e)}};function pe(t=(e,r)=>e===r){return e=>new l(r=>e.subscribe(new H(r,t)))}var ce={},H=class{constructor(e,r){this.destination=e;this.predicate=r;this.lastValue=ce}next(e){let r;try{r=this.lastValue===ce||!this.predicate(this.lastValue,e),this.lastValue=e}catch(n){throw this.error(n),n}r&&this.destination.next(e)}error(e){this.destination.error?.(e)}};function N(t){return e=>new l(r=>e.subscribe(new K(r,t)))}var K=class{constructor(e,r){this.destination=e;this.mapper=r}next(e){let r;try{r=this.mapper(e)}catch(n){throw this.error(n),n}this.destination.next(r)}error(e){this.destination.error?.(e)}};function be(t){return N(()=>t)}function de(){return t=>new l(e=>{let r=!1,n=!1,s=t.subscribe(i=>{r||(r=!0,e.next(i)),n&&s.unsubscribe()},i=>{r=!0,e.error?.(i),n&&s.unsubscribe()});return n=!0,r&&s.unsubscribe(),s})}function fe(){return t=>new l(e=>t.subscribe(new $(e)))}var $=class{constructor(e){this.destination=e;this.hasLast=!1}next(e){let r=this.last;if(this.last=e,!this.hasLast){this.hasLast=!0;return}this.destination.next([r,e])}error(e){this.destination.error?.(e)}};function me(t){return e=>new l(r=>e.subscribe(new Y(r,t)))}var Y=class{constructor(e,r){this.destination=e;this.effect=r}next(e){try{this.effect(e)}catch(r){throw this.error(r),r}this.destination.next(e)}error(e){this.destination.error?.(e)}};var pt=(a=>(a.NETWORK="network",a.VIDEO_PIPELINE="video_pipeline",a.EXTERNAL_API="external_api",a.PARSER="parser",a.DOM="dom",a.WTF="wtf",a.FATAL="fatal",a))(pt||{});var bt=(d=>(d.Armenian="58",d.Azerbaijani="57",d.Belarusian="114",d.English="3",d.Kazakh="97",d.Portuguese="73",d.Russian="0",d.Spanish="4",d.Ukrainian="1",d.Uzbek="65",d.Vietnamese="75",d))(bt||{}),dt="vk.com",Vn=async(t,e,r)=>{let n=new URL(`https://${dt}/js/lang-pack.js`);n.searchParams.set("format","json"),n.searchParams.set("name",e),t!==void 0&&n.searchParams.set("lang",t);let i=await(await fetch(n.toString())).json();return ft(i,r)},ft=(t,e)=>Object.fromEntries(Object.entries(t.keys).map(([r,n])=>[r.substring(`${e}_`.length),mt(n)])),mt=t=>Array.isArray(t)?t[0]:t;var Tt=(r=>(r.RU="ru",r.EN="en",r))(Tt||{});export{ee as CurrentClientBrowser,te as CurrentClientDevice,pt as ErrorCategory,Tt as InterfaceLanguage,V as Logger,l as Observable,I as Subject,f as Subscription,we as VERSION,bt as VKNumericLanguage,M as ValueSubject,D as VideoQuality,Pe as abortable,ke as addScript,Ze as areQualitiesExact,Ce as assertEmptyArray,v as assertNever,Se as assertNonNullable,Re as assertNotEmptyArray,Ae as assertNullable,et as assertQualityIsExact,se as buffer,Ee as checkNever,rt as cloneDeep,P as cloneDeepWith,oe as combine,ae as debounce,F as debounceFn,Ge as detectEmbed,tt as fillWithDefault,ue as filter,pe as filterChanged,lt as fromEvent,L as getCurrentBrowser,De as getExponentialDelay,$e as getHighestQuality,Ne as getIOSVersion,st as interval,Ve as isAndroid,qe as isHigher,He as isHigherOrEqual,Me as isIOS,B as isInvariantQuality,U as isLower,Ke as isLowerOrEqual,Qe as isMacLike,_e as isMobile,y as isNonNullable,Q as isNullable,Vn as loadVKLangPack,N as map,be as mapTo,ie as merge,g as noop,Le as now,at as observableFrom,ot as observeElementSize,de as once,fe as pairwise,re as safeStorage,me as tap,le as throttle,z as throttleFn,qt as timeCodeToString,it as timeout,Ye as videoHeightToQuality,Je as videoQualityToHeight,Xe as videoSizeToQuality};
package/evergreen.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @vkontakte/videoplayer-shared v1.0.37-dev.2e9cb822.0
3
- * Fri, 05 Jul 2024 08:48:33 GMT
2
+ * @vkontakte/videoplayer-shared v1.0.37-dev.511f8223.0
3
+ * Wed, 17 Jul 2024 10:03:53 GMT
4
4
  * https://st.mycdn.me/static/vkontakte-videoplayer/1-0-37/doc/
5
5
  */
6
- var ye=Object.defineProperty;var Oe=(t,e)=>{for(var r in e)ye(t,r,{get:e[r],enumerable:!0})};var we="1.0.37-dev.2e9cb822.0";var f=class{constructor(){this.subscriptions=[]}unsubscribe(){let e=this.subscriptions;this.subscriptions=[],e.forEach(r=>typeof r=="function"?r():r.unsubscribe())}add(e){return this.subscriptions.push(e),this}};var v=t=>{throw new Error(`${t} is value of unexpected type`)},Ee=t=>{};var h=()=>{};var l=class{constructor(e){e&&(this._subscribe=e)}subscribe(e,r){let n;r?typeof r=="function"?n={next:r,error:h}:n={next:o=>r.next(o),error:o=>r.error?.(o)}:n={next:h,error:h};let s=typeof e=="function"?{next:o=>{try{e(o)}catch(a){n.next(a)}},error:o=>n.next(o)}:{next:o=>e.next(o),error:o=>e.error?e.error(o):n.next(o)},i;try{i=this._subscribe(s)}catch(o){s.error?.(o)}return new f().add(()=>{switch(s.next=h,s.error=h,typeof i){case"function":i();return;case"object":i.unsubscribe();return;case"undefined":return;default:return v(i)}})}pipe(...e){return e.reduce((r,n)=>n(r),this)}_subscribe(e){}};var I=class extends l{constructor(){super();this.keyCounter=0;this.subscribers=new Map}next(r){this.subscribers.forEach(n=>n.next(r))}error(r){this.subscribers.forEach(n=>n.error?.(r))}_subscribe(r){let n=this.keyCounter++;return this.subscribers.set(n,r),new f().add(()=>this.subscribers.delete(n))}};var V=class{constructor(){this.log$=new I;this.logs=[];this.log=e=>{let r={...e,timestamp:Date.now()};this.logs.push(r),this.log$.next(r)};this.getAllLogs=()=>this.logs}createCustomLog(e){return(...r)=>{let n;try{n=e(...r)}catch{n={message:"error in `createCustomLog`",component:"Logger"}}this.log(n)}}createComponentLog(e){return this.createCustomLog(r=>({component:e,...r}))}};function Se(t,e='Assertion "value is not nullable" failed'){if(t==null)throw new Error(e)}function Ae(t,e='Assertion "value is nullable" failed'){if(t!=null)throw new Error(e)}function y(t){return typeof t<"u"&&t!==null}function Q(t){return t==null}function Re(t,e){if(!t?.length)throw new Error(e)}function Ce(t,e){if(t?.length)throw new Error(e)}var ke=(t,e,r)=>new Promise((n,s)=>{e.addEventListener("abort",()=>{a(),u.remove()});let i=()=>{a(),s()},o=()=>{a(),n()},a=()=>{c&&clearTimeout(c),u.removeEventListener("load",o),u.removeEventListener("error",i)},c;r&&(c=window.setTimeout(i,r));let u=document.createElement("script");u.addEventListener("load",o),u.addEventListener("error",i),u.src=t,document.head.appendChild(u)});var Le=typeof window.performance?.now=="function"?()=>window.performance.now():()=>Date.now();var Pe=(t,e)=>async(...r)=>{let n=e(...r),s=t.aborted,i;for(;!s&&!t.aborted;)try{let o=await n.next(i);s=o.done??!1,i=o.value}catch(o){await n.throw(o)}return i};var ee=(u=>(u.Unknown="Unknown",u.Yandex="Yandex",u.Chrome="Chrome",u.Chromium="Chromium",u.Firefox="Firefox",u.Safari="Safari",u.Opera="Opera",u.Edge="Edge",u.Rest="Rest",u))(ee||{}),te=(c=>(c.Unknown="Unknown",c.Android="Android",c.iPhone="iPhone",c.iPad="iPad",c.iPod="iPod",c.RestMobile="RestMobile",c.Mac="Mac",c.Desktop="Desktop",c))(te||{}),k=()=>{let{userAgent:t}=window.navigator,e=/yabrowser/i.test(t)?"Yandex":void 0,r=/chrome|crios/i.test(t)?"Chrome":void 0,n=/chromium/i.test(t)?"Chromium":void 0,s=/firefox|fxios/i.test(t)?"Firefox":void 0,i=/webkit|safari|khtml/i.test(t)?"Safari":void 0,o=/opr\//i.test(t)?"Opera":void 0,a=/edg/i.test(t)?"Edge":void 0,c=/android/i.test(t)?"Android":void 0,u=/iphone/i.test(t)?"iPhone":void 0,d=/ipad/i.test(t)?"iPad":void 0,b=/ipod/i.test(t)?"iPod":void 0,E=/mac/i.test(t)?"Mac":void 0,S=/webOS|BlackBerry|IEMobile|Opera Mini/i.test(t)?"RestMobile":void 0;return{browser:e||s||o||a||r||n||i||"Rest",device:c||u||d||b||S||E||"Desktop"}},Me=(t=!1)=>{let r=["iPhone","iPad","iPod"].includes(k().device);if(!t)return r;let{userAgent:n,maxTouchPoints:s}=window.navigator;return!!(r||/macintosh/i.test(n)&&s>0)},Ne=()=>{let{userAgent:t}=window.navigator,e=t.match(/Version\/(\d+(\.\d+)?)/i);if(!e)return null;let r=e[1],n=parseFloat(r);return isNaN(n)?null:n},Ve=()=>k().device==="Android",Qe=()=>["Mac","iPhone","iPad","iPod"].includes(k().device),_e=()=>/Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test(navigator.appVersion??navigator.userAgent)||navigator?.userAgentData?.mobile;var De=(t,{start:e=0,factor:r=2,max:n=1/0,min:s=e,random:i=0}={})=>{let o=e;return o*=r**t,o*=1+(Math.random()*i*2-i),o=Math.round(o),o=Math.min(o,n),o=Math.max(o,s),o};var re={};Oe(re,{clear:()=>We,get:()=>Fe,has:()=>je,isPersistent:()=>Ue,remove:()=>Be,set:()=>ze});var O,g,_=`vk-videoplayer-dummy-key-${Math.random()}`,w=()=>{if(g!==void 0)return g;try{localStorage.setItem(_,"test"),localStorage.removeItem(_),g=0}catch(t){if(t instanceof DOMException||t instanceof TypeError)try{sessionStorage.getItem(_),g=1}catch(e){if(e instanceof DOMException||e instanceof TypeError)g=2;else throw e}else throw t}return g===2&&(O=new Map),g},Ue=()=>w()===0,Fe=t=>{let e=w();switch(e){case 0:return localStorage.getItem(t)??void 0;case 1:return sessionStorage.getItem(t)??void 0;case 2:return O?.get(t);default:v(e)}},ze=(t,e)=>{let r=w();switch(r){case 0:try{localStorage.setItem(t,e)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 1:try{sessionStorage.setItem(t,e)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 2:return void O?.set(t,e);default:v(r)}},je=t=>{let e=w();switch(e){case 0:return t in localStorage;case 1:return t in sessionStorage;case 2:return O?.has(t)??!1;default:return v(e),!1}},Be=t=>{let e=w();switch(e){case 0:return localStorage.removeItem(t);case 1:return sessionStorage.removeItem(t);case 2:return void O?.delete(t);default:v(e)}},We=()=>{let t=w();switch(t){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return O?.clear();default:v(t)}};var Ge=()=>{let t,e;try{t=window.self!==window.top}catch(n){n instanceof DOMException&&n.name==="SecurityError"?t=!0:(t=!1,console.error(n))}try{window.location.ancestorOrigins&&(e=window.location.ancestorOrigins[window.location.ancestorOrigins.length-1])}catch(n){console.error(n)}try{!e&&document.referrer&&(e=document.referrer)}catch(n){console.error(n)}let r=e?new URL(e).hostname:void 0;return{isEmbed:t,host:r}};var D=(d=>(d.INVARIANT="Invariant quality",d.Q_144P="144p",d.Q_240P="240p",d.Q_360P="360p",d.Q_480P="480p",d.Q_720P="720p",d.Q_1080P="1080p",d.Q_1440P="1440p",d.Q_2160P="2160p",d.Q_4320P="4320p",d))(D||{});var m={"144p":{width:256,height:144},"240p":{width:428,height:240},"360p":{width:640,height:360},"480p":{width:856,height:480},"720p":{width:1280,height:720},"1080p":{width:1920,height:1080},"1440p":{width:2560,height:1440},"2160p":{width:3840,height:2160},"4320p":{width:7680,height:4320}},qe=(t,e)=>m[t].height>m[e].height,He=(t,e)=>m[t].height>=m[e].height,U=(t,e)=>m[t].height<m[e].height,Ke=(t,e)=>m[t].height<=m[e].height,$e=t=>t.sort((e,r)=>e===r?0:e==="Invariant quality"?1:r==="Invariant quality"?-1:U(e,r)?1:-1)[0],ne=Object.keys(m).sort((t,e)=>U(t,e)?-1:1),Ye=(t,e=.02)=>[...ne].find(n=>m[n].height*(1+e)>=t),Xe=({width:t,height:e})=>{let r=Math.min(t,e),n=Math.max(t,e);return ne.find(s=>{let i=m[s];return i.width>=n&&i.height>=r})},Je=t=>m[t].height,F=t=>t==="Invariant quality",Ze=t=>t.every(e=>!F(e));function et(t){if(F(t))throw new Error("Expected exact quality")}var tt=(t,e)=>{let r={};for(let n of Object.keys(e)){let s=e[n],i=t[n];Array.isArray(s)&&Array.isArray(i)?r[n]=i:typeof s=="object"&&typeof i=="object"?r[n]=tt(i,s):r[n]=n in t?i:s}return r};var qt=t=>{let e="";return t>=3600&&(e+=Math.floor(t/3600)+"h",t=t%3600),t>=60&&(e+=Math.floor(t/60)+"m",t=t%60),t>0&&(e+=Math.floor(t)+"s"),e};function z(t,e=0,r){let n,s,i,o,a,c,u=0,d=!1,b=!1,E=!0,S=!e&&e!==0&&typeof window.requestAnimationFrame=="function";r&&(d=!!r.leading,b="maxWait"in r,i=r?.maxWait?Math.max(+r?.maxWait||0,e):i,E="trailing"in r?!!r.trailing:E);function N(p){let T=n,x=s;return n=s=void 0,u=p,o=t.apply(x,T),o}function A(p,T){return S?(a&&window.cancelAnimationFrame(a),window.requestAnimationFrame(p)):setTimeout(p,T)}function Te(p){if(S){window.cancelAnimationFrame(p);return}clearTimeout(p)}function ve(p){return u=p,a=A(R,e),d?N(p):o}function Ie(p){let T=p-c,x=p-u,Z=e-T;return b?Math.min(Z,i-x):Z}function X(p){let T=p-c,x=p-u;return c===void 0||T>=e||T<0||b&&x>=i}function R(){let p=Date.now();if(X(p))return J(p);a=A(R,Ie(p))}function J(p){return a=void 0,E&&n?N(p):(n=s=void 0,o)}function xe(){a!==void 0&&Te(a),u=0,n=c=s=a=void 0}function he(){return a===void 0?o:J(Date.now())}function ge(){return a!==void 0}function C(...p){let T=Date.now(),x=X(T);if(n=p,s=this,c=T,x){if(a===void 0)return ve(c);if(b)return a=A(R,e),N(c)}return a===void 0&&(a=A(R,e)),o}return C.cancel=xe,C.flush=he,C.pending=ge,C}var j=(t,e=0,r)=>z(t,e,{...{leading:!0,trailing:!0},...r,maxWait:e});var L=(t,e)=>{if(t===null||typeof t!="object")return t;let r=Array.isArray(t)?[]:{};for(let n in t){if(typeof e=="function"){let s=e(t[n],n,t,r);if(s!==void 0){r[n]=s;continue}}typeof t[n]=="object"?r[n]=L(t[n],e):r[n]=t[n]}return r};var rt=t=>L(t);var nt=300,ot=(t,e=nt)=>new l(r=>{let{width:n,height:s}=t.getBoundingClientRect();if(r.next({width:n,height:s}),!window.ResizeObserver)return;let i=new ResizeObserver(j(o=>{let a=o[0];if(!a)return;let c,u;a.contentBoxSize&&a.contentBoxSize[0]?(u=a.contentBoxSize[0].blockSize,c=a.contentBoxSize[0].inlineSize):a.contentRect&&(c=a.contentRect.width,u=a.contentRect.height),y(c)&&y(u)&&r.next({width:c,height:u})},e));return i.observe(t),()=>i.disconnect()});var P=class extends I{constructor(r){super();this.value=r}next(r){super.next(this.value=r)}error(r){super.error(this.value=r)}getValue(){return this.value}_subscribe(r){let n=super._subscribe(r);return r.next(this.value),n}};function oe(t){return new l(e=>{let r={},n=Object.keys(t).length,s=i=>o=>{i in r||n--,r[i]=o,n===0&&e.next(r)};return Object.entries(t).reduce((i,[o,a])=>i.add(a.subscribe(s(o))),new f)})}function ie(...t){return new l(e=>t.reduce((r,n)=>r.add(n.subscribe(e)),new f))}var it=t=>new l(e=>{let r=window.setTimeout(()=>{try{e.next()}catch(n){if(e.error)e.error(n);else throw n}},t);return()=>window.clearTimeout(r)});var st=t=>new l(e=>{let r=window.setInterval(()=>e.next(),t);return()=>{r&&(window.clearInterval(r),r=void 0)}});var at=t=>new l(e=>{t.forEach(r=>e.next(r))});var lt=(t,e)=>new l(r=>{let n=s=>r.next(s);return t.addEventListener(e,n),()=>t.removeEventListener(e,n)});function se(t){return e=>new l(r=>e.subscribe(new B(r,t)))}var B=class{constructor(e,r){this.destination=e;this.size=r;this.lastValues=[]}next(e){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(e),this.destination.next(this.lastValues)}error(e){this.destination.error?.(e)}};var ut={leading:!1,trailing:!0};function ae(t,e=ut){return r=>new l(n=>r.subscribe(new W(n,t,e)))}var W=class{constructor(e,r,n){this.destination=e;this.time=r;this.config=n}next(e){this.lastValue=e,y(this.timeout)?window.clearTimeout(this.timeout):this.config.leading&&this.destination.next(e),this.timeout=window.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(r){if(this.destination.error)this.destination.error(r);else throw r}this.timeout=void 0},this.time)}error(e){this.destination.error?.(e)}};var ct={leading:!0,trailing:!1};function le(t,e=ct){return r=>new l(n=>r.subscribe(new G(n,t,e)))}var G=class{constructor(e,r,n){this.destination=e;this.time=r;this.config=n}next(e){this.lastValue=e,Q(this.timeout)&&(this.config.leading&&this.destination.next(e),this.timeout=window.setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(e){this.destination.error?.(e)}};function ue(t){return e=>new l(r=>e.subscribe(new q(r,t)))}var q=class{constructor(e,r){this.destination=e;this.predicate=r}next(e){let r;try{r=this.predicate(e)}catch(n){throw this.error(n),n}r&&this.destination.next(e)}error(e){this.destination.error?.(e)}};function pe(t=(e,r)=>e===r){return e=>new l(r=>e.subscribe(new H(r,t)))}var ce={},H=class{constructor(e,r){this.destination=e;this.predicate=r;this.lastValue=ce}next(e){let r;try{r=this.lastValue===ce||!this.predicate(this.lastValue,e),this.lastValue=e}catch(n){throw this.error(n),n}r&&this.destination.next(e)}error(e){this.destination.error?.(e)}};function M(t){return e=>new l(r=>e.subscribe(new K(r,t)))}var K=class{constructor(e,r){this.destination=e;this.mapper=r}next(e){let r;try{r=this.mapper(e)}catch(n){throw this.error(n),n}this.destination.next(r)}error(e){this.destination.error?.(e)}};function be(t){return M(()=>t)}function de(){return t=>new l(e=>{let r=!1,n=!1,s=t.subscribe(i=>{r||(r=!0,e.next(i)),n&&s.unsubscribe()},i=>{r=!0,e.error?.(i),n&&s.unsubscribe()});return n=!0,r&&s.unsubscribe(),s})}function fe(){return t=>new l(e=>t.subscribe(new $(e)))}var $=class{constructor(e){this.destination=e;this.hasLast=!1}next(e){let r=this.last;if(this.last=e,!this.hasLast){this.hasLast=!0;return}this.destination.next([r,e])}error(e){this.destination.error?.(e)}};function me(t){return e=>new l(r=>e.subscribe(new Y(r,t)))}var Y=class{constructor(e,r){this.destination=e;this.effect=r}next(e){try{this.effect(e)}catch(r){throw this.error(r),r}this.destination.next(e)}error(e){this.destination.error?.(e)}};var pt=(a=>(a.NETWORK="network",a.VIDEO_PIPELINE="video_pipeline",a.EXTERNAL_API="external_api",a.PARSER="parser",a.DOM="dom",a.WTF="wtf",a.FATAL="fatal",a))(pt||{});var bt=(b=>(b.Armenian="58",b.Azerbaijani="57",b.Belarusian="114",b.English="3",b.Kazakh="97",b.Portuguese="73",b.Russian="0",b.Spanish="4",b.Ukrainian="1",b.Uzbek="65",b.Vietnamese="75",b))(bt||{}),dt="vk.com",Vn=async(t,e,r)=>{let n=new URL(`https://${dt}/js/lang-pack.js`);n.searchParams.set("format","json"),n.searchParams.set("name",e),t!==void 0&&n.searchParams.set("lang",t);let i=await(await fetch(n.toString())).json();return ft(i,r)},ft=(t,e)=>Object.fromEntries(Object.entries(t.keys).map(([r,n])=>[r.substring(`${e}_`.length),mt(n)])),mt=t=>Array.isArray(t)?t[0]:t;var Tt=(r=>(r.RU="ru",r.EN="en",r))(Tt||{});export{ee as CurrentClientBrowser,te as CurrentClientDevice,pt as ErrorCategory,Tt as InterfaceLanguage,V as Logger,l as Observable,I as Subject,f as Subscription,we as VERSION,bt as VKNumericLanguage,P as ValueSubject,D as VideoQuality,Pe as abortable,ke as addScript,Ze as areQualitiesExact,Ce as assertEmptyArray,v as assertNever,Se as assertNonNullable,Re as assertNotEmptyArray,Ae as assertNullable,et as assertQualityIsExact,se as buffer,Ee as checkNever,rt as cloneDeep,L as cloneDeepWith,oe as combine,ae as debounce,z as debounceFn,Ge as detectEmbed,tt as fillWithDefault,ue as filter,pe as filterChanged,lt as fromEvent,k as getCurrentBrowser,De as getExponentialDelay,$e as getHighestQuality,Ne as getIOSVersion,st as interval,Ve as isAndroid,qe as isHigher,He as isHigherOrEqual,Me as isIOS,F as isInvariantQuality,U as isLower,Ke as isLowerOrEqual,Qe as isMacLike,_e as isMobile,y as isNonNullable,Q as isNullable,Vn as loadVKLangPack,M as map,be as mapTo,ie as merge,h as noop,Le as now,at as observableFrom,ot as observeElementSize,de as once,fe as pairwise,re as safeStorage,me as tap,le as throttle,j as throttleFn,qt as timeCodeToString,it as timeout,Ye as videoHeightToQuality,Je as videoQualityToHeight,Xe as videoSizeToQuality};
6
+ var ye=Object.defineProperty;var Oe=(t,e)=>{for(var r in e)ye(t,r,{get:e[r],enumerable:!0})};var we="1.0.37-dev.511f8223.0";var f=class{constructor(){this.subscriptions=[]}unsubscribe(){let e=this.subscriptions;this.subscriptions=[],e.forEach(r=>typeof r=="function"?r():r.unsubscribe())}add(e){return this.subscriptions.push(e),this}};var v=t=>{throw new Error(`${t} is value of unexpected type`)},Ee=t=>{};var g=()=>{};var l=class{constructor(e){e&&(this._subscribe=e)}subscribe(e,r){let n;r?typeof r=="function"?n={next:r,error:g}:n={next:o=>r.next(o),error:o=>r.error?.(o)}:n={next:g,error:g};let s=typeof e=="function"?{next:o=>{try{e(o)}catch(a){n.next(a)}},error:o=>n.next(o)}:{next:o=>e.next(o),error:o=>e.error?e.error(o):n.next(o)},i;try{i=this._subscribe(s)}catch(o){s.error?.(o)}return new f().add(()=>{switch(s.next=g,s.error=g,typeof i){case"function":i();return;case"object":i.unsubscribe();return;case"undefined":return;default:return v(i)}})}pipe(...e){return e.reduce((r,n)=>n(r),this)}_subscribe(e){}};var I=class extends l{constructor(){super();this.keyCounter=0;this.subscribers=new Map}next(r){this.subscribers.forEach(n=>n.next(r))}error(r){this.subscribers.forEach(n=>n.error?.(r))}_subscribe(r){let n=this.keyCounter++;return this.subscribers.set(n,r),new f().add(()=>this.subscribers.delete(n))}};var V=class{constructor(){this.log$=new I;this.logs=[];this.log=e=>{let r={...e,timestamp:Date.now()};this.logs.push(r),this.log$.next(r)};this.getAllLogs=()=>this.logs}createCustomLog(e){return(...r)=>{let n;try{n=e(...r)}catch{n={message:"error in `createCustomLog`",component:"Logger"}}this.log(n)}}createComponentLog(e){return this.createCustomLog(r=>({component:e,...r}))}};function Se(t,e='Assertion "value is not nullable" failed'){if(t==null)throw new Error(e)}function Ae(t,e='Assertion "value is nullable" failed'){if(t!=null)throw new Error(e)}function y(t){return typeof t<"u"&&t!==null}function Q(t){return t==null}function Re(t,e){if(!t?.length)throw new Error(e)}function Ce(t,e){if(t?.length)throw new Error(e)}var ke=(t,e,r)=>new Promise((n,s)=>{e.addEventListener("abort",()=>{a(),b.remove()});let i=()=>{a(),s()},o=()=>{a(),n()},a=()=>{u&&clearTimeout(u),b.removeEventListener("load",o),b.removeEventListener("error",i)},u;r&&(u=window.setTimeout(i,r));let b=document.createElement("script");b.addEventListener("load",o),b.addEventListener("error",i),b.src=t,document.head.appendChild(b)});var Le=typeof window.performance?.now=="function"?()=>window.performance.now():()=>Date.now();var Pe=(t,e)=>async(...r)=>{let n=e(...r),s=t.aborted,i;for(;!s&&!t.aborted;)try{let o=await n.next(i);s=o.done??!1,i=o.value}catch(o){await n.throw(o)}return i};var ee=(c=>(c.Unknown="Unknown",c.Yandex="Yandex",c.Chrome="Chrome",c.Chromium="Chromium",c.Firefox="Firefox",c.Safari="Safari",c.Opera="Opera",c.Edge="Edge",c.SamsungBrowser="SamsungBrowser",c.Rest="Rest",c))(ee||{}),te=(u=>(u.Unknown="Unknown",u.Android="Android",u.iPhone="iPhone",u.iPad="iPad",u.iPod="iPod",u.RestMobile="RestMobile",u.Mac="Mac",u.Desktop="Desktop",u))(te||{}),L=()=>{let{userAgent:t}=window.navigator,e=/yabrowser/i.test(t)?"Yandex":void 0,r=/samsungbrowser/i.test(t)?"SamsungBrowser":void 0,n=/chrome|crios/i.test(t)?"Chrome":void 0,s=/chromium/i.test(t)?"Chromium":void 0,i=/firefox|fxios/i.test(t)?"Firefox":void 0,o=/webkit|safari|khtml/i.test(t)?"Safari":void 0,a=/opr\//i.test(t)?"Opera":void 0,u=/edg/i.test(t)?"Edge":void 0,b=/android/i.test(t)?"Android":void 0,c=/iphone/i.test(t)?"iPhone":void 0,d=/ipad/i.test(t)?"iPad":void 0,E=/ipod/i.test(t)?"iPod":void 0,A=/mac/i.test(t)?"Mac":void 0,S=/webOS|BlackBerry|IEMobile|Opera Mini/i.test(t)?"RestMobile":void 0;return{browser:e||r||i||a||u||n||s||o||"Rest",device:b||c||d||E||S||A||"Desktop"}},Me=(t=!1)=>{let r=["iPhone","iPad","iPod"].includes(L().device);if(!t)return r;let{userAgent:n,maxTouchPoints:s}=window.navigator;return!!(r||/macintosh/i.test(n)&&s>0)},Ne=()=>{let{userAgent:t}=window.navigator,e=t.match(/Version\/(\d+(\.\d+)?)/i);if(!e)return null;let r=e[1],n=parseFloat(r);return isNaN(n)?null:n},Ve=()=>L().device==="Android",Qe=()=>["Mac","iPhone","iPad","iPod"].includes(L().device),_e=()=>/Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test(navigator.appVersion??navigator.userAgent)||navigator?.userAgentData?.mobile;var De=(t,{start:e=0,factor:r=2,max:n=1/0,min:s=e,random:i=0}={})=>{let o=e;return o*=r**t,o*=1+(Math.random()*i*2-i),o=Math.round(o),o=Math.min(o,n),o=Math.max(o,s),o};var re={};Oe(re,{clear:()=>We,get:()=>Be,has:()=>ze,isPersistent:()=>Ue,remove:()=>je,set:()=>Fe});var O,h,_=`vk-videoplayer-dummy-key-${Math.random()}`,w=()=>{if(h!==void 0)return h;try{localStorage.setItem(_,"test"),localStorage.removeItem(_),h=0}catch(t){if(t instanceof DOMException||t instanceof TypeError)try{sessionStorage.getItem(_),h=1}catch(e){if(e instanceof DOMException||e instanceof TypeError)h=2;else throw e}else throw t}return h===2&&(O=new Map),h},Ue=()=>w()===0,Be=t=>{let e=w();switch(e){case 0:return localStorage.getItem(t)??void 0;case 1:return sessionStorage.getItem(t)??void 0;case 2:return O?.get(t);default:v(e)}},Fe=(t,e)=>{let r=w();switch(r){case 0:try{localStorage.setItem(t,e)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 1:try{sessionStorage.setItem(t,e)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 2:return void O?.set(t,e);default:v(r)}},ze=t=>{let e=w();switch(e){case 0:return t in localStorage;case 1:return t in sessionStorage;case 2:return O?.has(t)??!1;default:return v(e),!1}},je=t=>{let e=w();switch(e){case 0:return localStorage.removeItem(t);case 1:return sessionStorage.removeItem(t);case 2:return void O?.delete(t);default:v(e)}},We=()=>{let t=w();switch(t){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return O?.clear();default:v(t)}};var Ge=()=>{let t,e;try{t=window.self!==window.top}catch(n){n instanceof DOMException&&n.name==="SecurityError"?t=!0:(t=!1,console.error(n))}try{window.location.ancestorOrigins&&(e=window.location.ancestorOrigins[window.location.ancestorOrigins.length-1])}catch(n){console.error(n)}try{!e&&document.referrer&&(e=document.referrer)}catch(n){console.error(n)}let r=e?new URL(e).hostname:void 0;return{isEmbed:t,host:r}};var D=(c=>(c.INVARIANT="Invariant quality",c.Q_144P="144p",c.Q_240P="240p",c.Q_360P="360p",c.Q_480P="480p",c.Q_720P="720p",c.Q_1080P="1080p",c.Q_1440P="1440p",c.Q_2160P="2160p",c.Q_4320P="4320p",c))(D||{});var m={"144p":{width:256,height:144},"240p":{width:428,height:240},"360p":{width:640,height:360},"480p":{width:856,height:480},"720p":{width:1280,height:720},"1080p":{width:1920,height:1080},"1440p":{width:2560,height:1440},"2160p":{width:3840,height:2160},"4320p":{width:7680,height:4320}},qe=(t,e)=>m[t].height>m[e].height,He=(t,e)=>m[t].height>=m[e].height,U=(t,e)=>m[t].height<m[e].height,Ke=(t,e)=>m[t].height<=m[e].height,$e=t=>t.sort((e,r)=>e===r?0:e==="Invariant quality"?1:r==="Invariant quality"?-1:U(e,r)?1:-1)[0],ne=Object.keys(m).sort((t,e)=>U(t,e)?-1:1),Ye=(t,e=.02)=>[...ne].find(n=>m[n].height*(1+e)>=t),Xe=({width:t,height:e})=>{let r=Math.min(t,e),n=Math.max(t,e);return ne.find(s=>{let i=m[s];return i.width>=n&&i.height>=r})},Je=t=>m[t].height,B=t=>t==="Invariant quality",Ze=t=>t.every(e=>!B(e));function et(t){if(B(t))throw new Error("Expected exact quality")}var tt=(t,e)=>{let r={};for(let n of Object.keys(e)){let s=e[n],i=t[n];Array.isArray(s)&&Array.isArray(i)?r[n]=i:typeof s=="object"&&typeof i=="object"?r[n]=tt(i,s):r[n]=n in t?i:s}return r};var qt=t=>{let e="";return t>=3600&&(e+=Math.floor(t/3600)+"h",t=t%3600),t>=60&&(e+=Math.floor(t/60)+"m",t=t%60),t>0&&(e+=Math.floor(t)+"s"),e};function F(t,e=0,r){let n,s,i,o,a,u,b=0,c=!1,d=!1,E=!0,A=!e&&e!==0&&typeof window.requestAnimationFrame=="function";r&&(c=!!r.leading,d="maxWait"in r,i=r?.maxWait?Math.max(+r?.maxWait||0,e):i,E="trailing"in r?!!r.trailing:E);function S(p){let T=n,x=s;return n=s=void 0,b=p,o=t.apply(x,T),o}function R(p,T){return A?(a&&window.cancelAnimationFrame(a),window.requestAnimationFrame(p)):setTimeout(p,T)}function Te(p){if(A){window.cancelAnimationFrame(p);return}clearTimeout(p)}function ve(p){return b=p,a=R(C,e),c?S(p):o}function Ie(p){let T=p-u,x=p-b,Z=e-T;return d?Math.min(Z,i-x):Z}function X(p){let T=p-u,x=p-b;return u===void 0||T>=e||T<0||d&&x>=i}function C(){let p=Date.now();if(X(p))return J(p);a=R(C,Ie(p))}function J(p){return a=void 0,E&&n?S(p):(n=s=void 0,o)}function xe(){a!==void 0&&Te(a),b=0,n=u=s=a=void 0}function ge(){return a===void 0?o:J(Date.now())}function he(){return a!==void 0}function k(...p){let T=Date.now(),x=X(T);if(n=p,s=this,u=T,x){if(a===void 0)return ve(u);if(d)return a=R(C,e),S(u)}return a===void 0&&(a=R(C,e)),o}return k.cancel=xe,k.flush=ge,k.pending=he,k}var z=(t,e=0,r)=>F(t,e,{...{leading:!0,trailing:!0},...r,maxWait:e});var P=(t,e)=>{if(t===null||typeof t!="object")return t;let r=Array.isArray(t)?[]:{};for(let n in t){if(typeof e=="function"){let s=e(t[n],n,t,r);if(s!==void 0){r[n]=s;continue}}typeof t[n]=="object"?r[n]=P(t[n],e):r[n]=t[n]}return r};var rt=t=>P(t);var nt=300,ot=(t,e=nt)=>new l(r=>{let{width:n,height:s}=t.getBoundingClientRect();if(r.next({width:n,height:s}),!window.ResizeObserver)return;let i=new ResizeObserver(z(o=>{let a=o[0];if(!a)return;let u,b;a.contentBoxSize&&a.contentBoxSize[0]?(b=a.contentBoxSize[0].blockSize,u=a.contentBoxSize[0].inlineSize):a.contentRect&&(u=a.contentRect.width,b=a.contentRect.height),y(u)&&y(b)&&r.next({width:u,height:b})},e));return i.observe(t),()=>i.disconnect()});var M=class extends I{constructor(r){super();this.value=r}next(r){super.next(this.value=r)}error(r){super.error(this.value=r)}getValue(){return this.value}_subscribe(r){let n=super._subscribe(r);return r.next(this.value),n}};function oe(t){return new l(e=>{let r={},n=Object.keys(t).length,s=i=>o=>{i in r||n--,r[i]=o,n===0&&e.next(r)};return Object.entries(t).reduce((i,[o,a])=>i.add(a.subscribe(s(o))),new f)})}function ie(...t){return new l(e=>t.reduce((r,n)=>r.add(n.subscribe(e)),new f))}var it=t=>new l(e=>{let r=window.setTimeout(()=>{try{e.next()}catch(n){if(e.error)e.error(n);else throw n}},t);return()=>window.clearTimeout(r)});var st=t=>new l(e=>{let r=window.setInterval(()=>e.next(),t);return()=>{r&&(window.clearInterval(r),r=void 0)}});var at=t=>new l(e=>{t.forEach(r=>e.next(r))});var lt=(t,e)=>new l(r=>{let n=s=>r.next(s);return t.addEventListener(e,n),()=>t.removeEventListener(e,n)});function se(t){return e=>new l(r=>e.subscribe(new j(r,t)))}var j=class{constructor(e,r){this.destination=e;this.size=r;this.lastValues=[]}next(e){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(e),this.destination.next(this.lastValues)}error(e){this.destination.error?.(e)}};var ut={leading:!1,trailing:!0};function ae(t,e=ut){return r=>new l(n=>r.subscribe(new W(n,t,e)))}var W=class{constructor(e,r,n){this.destination=e;this.time=r;this.config=n}next(e){this.lastValue=e,y(this.timeout)?window.clearTimeout(this.timeout):this.config.leading&&this.destination.next(e),this.timeout=window.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(r){if(this.destination.error)this.destination.error(r);else throw r}this.timeout=void 0},this.time)}error(e){this.destination.error?.(e)}};var ct={leading:!0,trailing:!1};function le(t,e=ct){return r=>new l(n=>r.subscribe(new G(n,t,e)))}var G=class{constructor(e,r,n){this.destination=e;this.time=r;this.config=n}next(e){this.lastValue=e,Q(this.timeout)&&(this.config.leading&&this.destination.next(e),this.timeout=window.setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(e){this.destination.error?.(e)}};function ue(t){return e=>new l(r=>e.subscribe(new q(r,t)))}var q=class{constructor(e,r){this.destination=e;this.predicate=r}next(e){let r;try{r=this.predicate(e)}catch(n){throw this.error(n),n}r&&this.destination.next(e)}error(e){this.destination.error?.(e)}};function pe(t=(e,r)=>e===r){return e=>new l(r=>e.subscribe(new H(r,t)))}var ce={},H=class{constructor(e,r){this.destination=e;this.predicate=r;this.lastValue=ce}next(e){let r;try{r=this.lastValue===ce||!this.predicate(this.lastValue,e),this.lastValue=e}catch(n){throw this.error(n),n}r&&this.destination.next(e)}error(e){this.destination.error?.(e)}};function N(t){return e=>new l(r=>e.subscribe(new K(r,t)))}var K=class{constructor(e,r){this.destination=e;this.mapper=r}next(e){let r;try{r=this.mapper(e)}catch(n){throw this.error(n),n}this.destination.next(r)}error(e){this.destination.error?.(e)}};function be(t){return N(()=>t)}function de(){return t=>new l(e=>{let r=!1,n=!1,s=t.subscribe(i=>{r||(r=!0,e.next(i)),n&&s.unsubscribe()},i=>{r=!0,e.error?.(i),n&&s.unsubscribe()});return n=!0,r&&s.unsubscribe(),s})}function fe(){return t=>new l(e=>t.subscribe(new $(e)))}var $=class{constructor(e){this.destination=e;this.hasLast=!1}next(e){let r=this.last;if(this.last=e,!this.hasLast){this.hasLast=!0;return}this.destination.next([r,e])}error(e){this.destination.error?.(e)}};function me(t){return e=>new l(r=>e.subscribe(new Y(r,t)))}var Y=class{constructor(e,r){this.destination=e;this.effect=r}next(e){try{this.effect(e)}catch(r){throw this.error(r),r}this.destination.next(e)}error(e){this.destination.error?.(e)}};var pt=(a=>(a.NETWORK="network",a.VIDEO_PIPELINE="video_pipeline",a.EXTERNAL_API="external_api",a.PARSER="parser",a.DOM="dom",a.WTF="wtf",a.FATAL="fatal",a))(pt||{});var bt=(d=>(d.Armenian="58",d.Azerbaijani="57",d.Belarusian="114",d.English="3",d.Kazakh="97",d.Portuguese="73",d.Russian="0",d.Spanish="4",d.Ukrainian="1",d.Uzbek="65",d.Vietnamese="75",d))(bt||{}),dt="vk.com",Vn=async(t,e,r)=>{let n=new URL(`https://${dt}/js/lang-pack.js`);n.searchParams.set("format","json"),n.searchParams.set("name",e),t!==void 0&&n.searchParams.set("lang",t);let i=await(await fetch(n.toString())).json();return ft(i,r)},ft=(t,e)=>Object.fromEntries(Object.entries(t.keys).map(([r,n])=>[r.substring(`${e}_`.length),mt(n)])),mt=t=>Array.isArray(t)?t[0]:t;var Tt=(r=>(r.RU="ru",r.EN="en",r))(Tt||{});export{ee as CurrentClientBrowser,te as CurrentClientDevice,pt as ErrorCategory,Tt as InterfaceLanguage,V as Logger,l as Observable,I as Subject,f as Subscription,we as VERSION,bt as VKNumericLanguage,M as ValueSubject,D as VideoQuality,Pe as abortable,ke as addScript,Ze as areQualitiesExact,Ce as assertEmptyArray,v as assertNever,Se as assertNonNullable,Re as assertNotEmptyArray,Ae as assertNullable,et as assertQualityIsExact,se as buffer,Ee as checkNever,rt as cloneDeep,P as cloneDeepWith,oe as combine,ae as debounce,F as debounceFn,Ge as detectEmbed,tt as fillWithDefault,ue as filter,pe as filterChanged,lt as fromEvent,L as getCurrentBrowser,De as getExponentialDelay,$e as getHighestQuality,Ne as getIOSVersion,st as interval,Ve as isAndroid,qe as isHigher,He as isHigherOrEqual,Me as isIOS,B as isInvariantQuality,U as isLower,Ke as isLowerOrEqual,Qe as isMacLike,_e as isMobile,y as isNonNullable,Q as isNullable,Vn as loadVKLangPack,N as map,be as mapTo,ie as merge,g as noop,Le as now,at as observableFrom,ot as observeElementSize,de as once,fe as pairwise,re as safeStorage,me as tap,le as throttle,z as throttleFn,qt as timeCodeToString,it as timeout,Ye as videoHeightToQuality,Je as videoQualityToHeight,Xe as videoSizeToQuality};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vkontakte/videoplayer-shared",
3
- "version": "1.0.37-dev.2e9cb822.0",
3
+ "version": "1.0.37-dev.511f8223.0",
4
4
  "author": "vk.com",
5
5
  "description": "Shared code for vk.com videoplayer",
6
6
  "homepage": "https://vk.com",
@@ -7,6 +7,7 @@ export declare enum CurrentClientBrowser {
7
7
  Safari = "Safari",
8
8
  Opera = "Opera",
9
9
  Edge = "Edge",
10
+ SamsungBrowser = "SamsungBrowser",
10
11
  Rest = "Rest"
11
12
  }
12
13
  export declare enum CurrentClientDevice {