@vkontakte/videoplayer-shared 1.0.38-beta.0 → 1.0.38-beta.1

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.38-beta.0
3
- * Wed, 07 Aug 2024 14:12:32 GMT
2
+ * @vkontakte/videoplayer-shared v1.0.38-beta.1
3
+ * Thu, 08 Aug 2024 11:57:05 GMT
4
4
  * https://st.mycdn.me/static/vkontakte-videoplayer/1-0-38/doc/
5
5
  */
6
- "use strict";var Q=Object.defineProperty,ft=Object.defineProperties,mt=Object.getOwnPropertyDescriptor,Tt=Object.getOwnPropertyDescriptors,vt=Object.getOwnPropertyNames,Ie=Object.getOwnPropertySymbols;var he=Object.prototype.hasOwnProperty,It=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))It.call(e,r)&&xe(t,r,e[r]);return t},_=(t,e)=>ft(t,Tt(e));var ye=(t,e)=>{for(var r in e)Q(t,r,{get:e[r],enumerable:!0})},xt=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of vt(e))!he.call(t,i)&&i!==r&&Q(t,i,{get:()=>e[i],enumerable:!(n=mt(e,i))||n.enumerable});return t};var ht=t=>xt(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 Vt={};ye(Vt,{CurrentClientBrowser:()=>H,CurrentClientDevice:()=>K,ErrorCategory:()=>it,InterfaceLanguage:()=>at,Logger:()=>U,Observable:()=>l,Subject:()=>x,Subscription:()=>m,VERSION:()=>Oe,VKNumericLanguage:()=>st,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,clearVideoElement:()=>Ze,cloneDeep:()=>Xe,cloneDeepWith:()=>C,combine:()=>Y,debounce:()=>te,debounceFn:()=>G,detectEmbed:()=>Ue,fillWithDefault:()=>Ye,filter:()=>ie,filterChanged:()=>ae,fromEvent:()=>nt,getCurrentBrowser:()=>R,getExponentialDelay:()=>De,getHighestQuality:()=>je,getIOSVersion:()=>Ne,interval:()=>tt,isAndroid:()=>Ve,isHigher:()=>Be,isHigherOrEqual:()=>Fe,isIOS:()=>Me,isInvariantQuality:()=>W,isLower:()=>j,isLowerOrEqual:()=>ze,isMacLike:()=>Qe,isMobile:()=>_e,isNonNullable:()=>y,isNullable:()=>B,loadVKLangPack:()=>Pt,map:()=>L,mapTo:()=>ue,merge:()=>X,noop:()=>h,now:()=>Le,observableFrom:()=>rt,observeElementSize:()=>Je,once:()=>ce,pairwise:()=>be,safeStorage:()=>F,tap:()=>fe,throttle:()=>ne,throttleFn:()=>q,timeCodeToString:()=>At,timeout:()=>et,videoHeightToQuality:()=>Ge,videoQualityToHeight:()=>He,videoSizeToQuality:()=>qe});module.exports=ht(Vt);var Oe="1.0.38-beta.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:()=>St,get:()=>yt,has:()=>wt,isPersistent:()=>gt,remove:()=>Et,set:()=>Ot});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},gt=()=>E()===0,yt=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)}},Ot=(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)}},wt=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)}},St=()=>{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 At=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 lt(b){if(P){window.cancelAnimationFrame(b);return}clearTimeout(b)}function ut(b){return p=b,o=M(N,e),c?A(b):u}function ct(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,ct(b))}function Te(b){return o=void 0,S&&n?A(b):(n=i=void 0,u)}function pt(){o!==void 0&&lt(o),p=0,n=a=i=o=void 0}function bt(){return o===void 0?u:Te(Date.now())}function dt(){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 ut(a);if(d)return o=M(N,e),A(a)}return o===void 0&&(o=M(N,e)),u}return V.cancel=pt,V.flush=bt,V.pending=dt,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 Rt=300,Je=(t,e=Rt)=>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 Ze=t=>{t.removeAttribute("src"),t.load()};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 et=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 tt=t=>new l(e=>{let r=window.setInterval(()=>e.next(),t);return()=>{r&&(window.clearInterval(r),r=void 0)}});var rt=t=>new l(e=>{t.forEach(r=>e.next(r))});var nt=(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 Ct={leading:!1,trailing:!0};function te(t,e=Ct){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 kt={leading:!0,trailing:!1};function ne(t,e=kt){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 ot={},se=class{constructor(e,r){this.destination=e;this.predicate=r;this.lastValue=ot}next(e){let r;try{r=this.lastValue===ot||!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 it=(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))(it||{});var st=(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))(st||{}),Lt="vk.com",Pt=(t,e,r)=>D(void 0,null,function*(){let n=new URL(`https://${Lt}/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 Mt(s,r)}),Mt=(t,e)=>Object.fromEntries(Object.entries(t.keys).map(([r,n])=>[r.substring(`${e}_`.length),Nt(n)])),Nt=t=>Array.isArray(t)?t[0]:t;var at=(r=>(r.RU="ru",r.EN="en",r))(at||{});
6
+ "use strict";var hs=Object.create;var te=Object.defineProperty,gs=Object.defineProperties,Is=Object.getOwnPropertyDescriptor,Os=Object.getOwnPropertyDescriptors,xs=Object.getOwnPropertyNames,Ct=Object.getOwnPropertySymbols,Es=Object.getPrototypeOf,jt=Object.prototype.hasOwnProperty,ws=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))ws.call(r,t)&&Nt(e,t,r[t]);return e},he=(e,r)=>gs(e,Os(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 xs(r))!jt.call(e,o)&&o!==t&&te(e,o,{get:()=>r[o],enumerable:!(n=Is(r,o))||n.enumerable});return e};var Ss=(e,r,t)=>(t=e!=null?hs(Es(e)):{},Dt(r||!e||!e.__esModule?te(t,"default",{value:e,enumerable:!0}):t,e)),qs=e=>Dt(te({},"__esModule",{value:!0}),e);var ge=(e,r,t)=>new Promise((n,o)=>{var a=c=>{try{s(t.next(c))}catch(f){o(f)}},u=c=>{try{s(t.throw(c))}catch(f){o(f)}},s=c=>c.done?n(c.value):Promise.resolve(c.value).then(a,u);s((t=t.apply(e,r)).next())});var _=i((bd,wn)=>{"use strict";wn.exports=function(e){try{return!!e()}catch(r){return!0}}});var le=i((dd,Sn)=>{"use strict";var Ds=_();Sn.exports=!Ds(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var N=i((Td,Pn)=>{"use strict";var qn=le(),Rn=Function.prototype,Sr=Rn.call,Vs=qn&&Rn.bind.bind(Sr,Sr);Pn.exports=qn?Vs:function(e){return function(){return Sr.apply(e,arguments)}}});var _e=i((md,_n)=>{"use strict";var An=N(),Fs=An({}.toString),Us=An("".slice);_n.exports=function(e){return Us(Fs(e),8,-1)}});var Cn=i((yd,Ln)=>{"use strict";var Gs=N(),Bs=_(),Qs=_e(),qr=Object,$s=Gs("".split);Ln.exports=Bs(function(){return!qr("z").propertyIsEnumerable(0)})?function(e){return Qs(e)=="String"?$s(e,""):qr(e)}:qr});var Le=i((hd,Nn)=>{"use strict";Nn.exports=function(e){return e==null}});var Rr=i((gd,jn)=>{"use strict";var Ws=Le(),zs=TypeError;jn.exports=function(e){if(Ws(e))throw zs("Can't call method on "+e);return e}});var X=i((Id,Mn)=>{"use strict";var Ks=Cn(),Ys=Rr();Mn.exports=function(e){return Ks(Ys(e))}});var Dn=i((Od,kn)=>{"use strict";kn.exports=function(){}});var Q=i((xd,Vn)=>{"use strict";Vn.exports={}});var S=i((Fn,Un)=>{"use strict";var Ce=function(e){return e&&e.Math==Math&&e};Un.exports=Ce(typeof globalThis=="object"&&globalThis)||Ce(typeof window=="object"&&window)||Ce(typeof self=="object"&&self)||Ce(typeof global=="object"&&global)||function(){return this}()||Fn||Function("return this")()});var Ar=i((Ed,Gn)=>{"use strict";var Pr=typeof document=="object"&&document.all,Hs=typeof Pr=="undefined"&&Pr!==void 0;Gn.exports={all:Pr,IS_HTMLDDA:Hs}});var x=i((wd,Qn)=>{"use strict";var Bn=Ar(),Xs=Bn.all;Qn.exports=Bn.IS_HTMLDDA?function(e){return typeof e=="function"||e===Xs}:function(e){return typeof e=="function"}});var zn=i((Sd,Wn)=>{"use strict";var Js=S(),Zs=x(),$n=Js.WeakMap;Wn.exports=Zs($n)&&/native code/.test(String($n))});var $=i((qd,Hn)=>{"use strict";var Kn=x(),Yn=Ar(),eu=Yn.all;Hn.exports=Yn.IS_HTMLDDA?function(e){return typeof e=="object"?e!==null:Kn(e)||e===eu}:function(e){return typeof e=="object"?e!==null:Kn(e)}});var j=i((Rd,Xn)=>{"use strict";var ru=_();Xn.exports=!ru(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var Lr=i((Pd,Zn)=>{"use strict";var tu=S(),Jn=$(),_r=tu.document,nu=Jn(_r)&&Jn(_r.createElement);Zn.exports=function(e){return nu?_r.createElement(e):{}}});var Cr=i((Ad,eo)=>{"use strict";var ou=j(),iu=_(),au=Lr();eo.exports=!ou&&!iu(function(){return Object.defineProperty(au("div"),"a",{get:function(){return 7}}).a!=7})});var Nr=i((_d,ro)=>{"use strict";var su=j(),uu=_();ro.exports=su&&uu(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})});var V=i((Ld,to)=>{"use strict";var lu=$(),cu=String,fu=TypeError;to.exports=function(e){if(lu(e))return e;throw fu(cu(e)+" is not an object")}});var F=i((Cd,no)=>{"use strict";var pu=le(),Ne=Function.prototype.call;no.exports=pu?Ne.bind(Ne):function(){return Ne.apply(Ne,arguments)}});var je=i((Nd,oo)=>{"use strict";oo.exports={}});var kr=i((jd,ao)=>{"use strict";var jr=je(),Mr=S(),vu=x(),io=function(e){return vu(e)?e:void 0};ao.exports=function(e,r){return arguments.length<2?io(jr[e])||io(Mr[e]):jr[e]&&jr[e][r]||Mr[e]&&Mr[e][r]}});var Dr=i((Md,so)=>{"use strict";var bu=N();so.exports=bu({}.isPrototypeOf)});var lo=i((kd,uo)=>{"use strict";uo.exports=typeof navigator!="undefined"&&String(navigator.userAgent)||""});var mo=i((Dd,To)=>{"use strict";var bo=S(),Vr=lo(),co=bo.process,fo=bo.Deno,po=co&&co.versions||fo&&fo.version,vo=po&&po.v8,R,Me;vo&&(R=vo.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])));To.exports=Me});var Fr=i((Vd,ho)=>{"use strict";var yo=mo(),du=_(),Tu=S(),mu=Tu.String;ho.exports=!!Object.getOwnPropertySymbols&&!du(function(){var e=Symbol();return!mu(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&yo&&yo<41})});var Ur=i((Fd,go)=>{"use strict";var yu=Fr();go.exports=yu&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Gr=i((Ud,Io)=>{"use strict";var hu=kr(),gu=x(),Iu=Dr(),Ou=Ur(),xu=Object;Io.exports=Ou?function(e){return typeof e=="symbol"}:function(e){var r=hu("Symbol");return gu(r)&&Iu(r.prototype,xu(e))}});var ke=i((Gd,Oo)=>{"use strict";var Eu=String;Oo.exports=function(e){try{return Eu(e)}catch(r){return"Object"}}});var ce=i((Bd,xo)=>{"use strict";var wu=x(),Su=ke(),qu=TypeError;xo.exports=function(e){if(wu(e))return e;throw qu(Su(e)+" is not a function")}});var De=i((Qd,Eo)=>{"use strict";var Ru=ce(),Pu=Le();Eo.exports=function(e,r){var t=e[r];return Pu(t)?void 0:Ru(t)}});var So=i(($d,wo)=>{"use strict";var Br=F(),Qr=x(),$r=$(),Au=TypeError;wo.exports=function(e,r){var t,n;if(r==="string"&&Qr(t=e.toString)&&!$r(n=Br(t,e))||Qr(t=e.valueOf)&&!$r(n=Br(t,e))||r!=="string"&&Qr(t=e.toString)&&!$r(n=Br(t,e)))return n;throw Au("Can't convert object to primitive value")}});var fe=i((Wd,qo)=>{"use strict";qo.exports=!0});var Ao=i((zd,Po)=>{"use strict";var Ro=S(),_u=Object.defineProperty;Po.exports=function(e,r){try{_u(Ro,e,{value:r,configurable:!0,writable:!0})}catch(t){Ro[e]=r}return r}});var Wr=i((Kd,Lo)=>{"use strict";var Lu=S(),Cu=Ao(),_o="__core-js_shared__",Nu=Lu[_o]||Cu(_o,{});Lo.exports=Nu});var zr=i((Yd,No)=>{"use strict";var ju=fe(),Co=Wr();(No.exports=function(e,r){return Co[e]||(Co[e]=r!==void 0?r:{})})("versions",[]).push({version:"3.31.0",mode:ju?"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((Hd,jo)=>{"use strict";var Mu=Rr(),ku=Object;jo.exports=function(e){return ku(Mu(e))}});var M=i((Xd,Mo)=>{"use strict";var Du=N(),Vu=Kr(),Fu=Du({}.hasOwnProperty);Mo.exports=Object.hasOwn||function(r,t){return Fu(Vu(r),t)}});var Yr=i((Jd,ko)=>{"use strict";var Uu=N(),Gu=0,Bu=Math.random(),Qu=Uu(1 .toString);ko.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Qu(++Gu+Bu,36)}});var L=i((Zd,Vo)=>{"use strict";var $u=S(),Wu=zr(),Do=M(),zu=Yr(),Ku=Fr(),Yu=Ur(),J=$u.Symbol,Hr=Wu("wks"),Hu=Yu?J.for||J:J&&J.withoutSetter||zu;Vo.exports=function(e){return Do(Hr,e)||(Hr[e]=Ku&&Do(J,e)?J[e]:Hu("Symbol."+e)),Hr[e]}});var Bo=i((eT,Go)=>{"use strict";var Xu=F(),Fo=$(),Uo=Gr(),Ju=De(),Zu=So(),el=L(),rl=TypeError,tl=el("toPrimitive");Go.exports=function(e,r){if(!Fo(e)||Uo(e))return e;var t=Ju(e,tl),n;if(t){if(r===void 0&&(r="default"),n=Xu(t,e,r),!Fo(n)||Uo(n))return n;throw rl("Can't convert object to primitive value")}return r===void 0&&(r="number"),Zu(e,r)}});var Ve=i((rT,Qo)=>{"use strict";var nl=Bo(),ol=Gr();Qo.exports=function(e){var r=nl(e,"string");return ol(r)?r:r+""}});var Z=i(Wo=>{"use strict";var il=j(),al=Cr(),sl=Nr(),Fe=V(),$o=Ve(),ul=TypeError,Xr=Object.defineProperty,ll=Object.getOwnPropertyDescriptor,Jr="enumerable",Zr="configurable",et="writable";Wo.f=il?sl?function(r,t,n){if(Fe(r),t=$o(t),Fe(n),typeof r=="function"&&t==="prototype"&&"value"in n&&et in n&&!n[et]){var o=ll(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=$o(t),Fe(n),al)try{return Xr(r,t,n)}catch(o){}if("get"in n||"set"in n)throw ul("Accessors not supported");return"value"in n&&(r[t]=n.value),r}});var pe=i((nT,zo)=>{"use strict";zo.exports=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}});var W=i((oT,Ko)=>{"use strict";var cl=j(),fl=Z(),pl=pe();Ko.exports=cl?function(e,r,t){return fl.f(e,r,pl(1,t))}:function(e,r,t){return e[r]=t,e}});var Ue=i((iT,Ho)=>{"use strict";var vl=zr(),bl=Yr(),Yo=vl("keys");Ho.exports=function(e){return Yo[e]||(Yo[e]=bl(e))}});var Ge=i((aT,Xo)=>{"use strict";Xo.exports={}});var ri=i((sT,ei)=>{"use strict";var dl=zn(),Zo=S(),Tl=$(),ml=W(),rt=M(),tt=Wr(),yl=Ue(),hl=Ge(),Jo="Object already initialized",nt=Zo.TypeError,gl=Zo.WeakMap,Be,ve,Qe,Il=function(e){return Qe(e)?ve(e):Be(e,{})},Ol=function(e){return function(r){var t;if(!Tl(r)||(t=ve(r)).type!==e)throw nt("Incompatible receiver, "+e+" required");return t}};dl||tt.state?(P=tt.state||(tt.state=new gl),P.get=P.get,P.has=P.has,P.set=P.set,Be=function(e,r){if(P.has(e))throw nt(Jo);return r.facade=e,P.set(e,r),r},ve=function(e){return P.get(e)||{}},Qe=function(e){return P.has(e)}):(z=yl("state"),hl[z]=!0,Be=function(e,r){if(rt(e,z))throw nt(Jo);return r.facade=e,ml(e,z,r),r},ve=function(e){return rt(e,z)?e[z]:{}},Qe=function(e){return rt(e,z)});var P,z;ei.exports={set:Be,get:ve,has:Qe,enforce:Il,getterFor:Ol}});var ai=i((uT,ii)=>{"use strict";var xl=le(),oi=Function.prototype,ti=oi.apply,ni=oi.call;ii.exports=typeof Reflect=="object"&&Reflect.apply||(xl?ni.bind(ti):function(){return ni.apply(ti,arguments)})});var ot=i((lT,si)=>{"use strict";var El=_e(),wl=N();si.exports=function(e){if(El(e)==="Function")return wl(e)}});var fi=i(ci=>{"use strict";var ui={}.propertyIsEnumerable,li=Object.getOwnPropertyDescriptor,Sl=li&&!ui.call({1:2},1);ci.f=Sl?function(r){var t=li(this,r);return!!t&&t.enumerable}:ui});var bi=i(vi=>{"use strict";var ql=j(),Rl=F(),Pl=fi(),Al=pe(),_l=X(),Ll=Ve(),Cl=M(),Nl=Cr(),pi=Object.getOwnPropertyDescriptor;vi.f=ql?pi:function(r,t){if(r=_l(r),t=Ll(t),Nl)try{return pi(r,t)}catch(n){}if(Cl(r,t))return Al(!Rl(Pl.f,r,t),r[t])}});var Ti=i((pT,di)=>{"use strict";var jl=_(),Ml=x(),kl=/#|\.prototype\./,be=function(e,r){var t=Vl[Dl(e)];return t==Ul?!0:t==Fl?!1:Ml(r)?jl(r):!!r},Dl=be.normalize=function(e){return String(e).replace(kl,".").toLowerCase()},Vl=be.data={},Fl=be.NATIVE="N",Ul=be.POLYFILL="P";di.exports=be});var it=i((vT,yi)=>{"use strict";var mi=ot(),Gl=ce(),Bl=le(),Ql=mi(mi.bind);yi.exports=function(e,r){return Gl(e),r===void 0?e:Bl?Ql(e,r):function(){return e.apply(r,arguments)}}});var at=i((bT,gi)=>{"use strict";var $e=S(),$l=ai(),Wl=ot(),zl=x(),Kl=bi().f,Yl=Ti(),ee=je(),Hl=it(),re=W(),hi=M(),Xl=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};gi.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,f,l,p,b,d,T,y,I,h;for(b in r)f=Yl(n?b:t+(o?".":"#")+b,e.forced),l=!f&&u&&hi(u,b),T=s[b],l&&(e.dontCallGetSet?(h=Kl(u,b),y=h&&h.value):y=u[b]),d=l&&y?y:r[b],!(l&&typeof T==typeof d)&&(e.bind&&l?I=Hl(d,$e):e.wrap&&l?I=Xl(d):a&&zl(d)?I=Wl(d):I=d,(e.sham||d&&d.sham||T&&T.sham)&&re(I,"sham",!0),re(s,b,I),a&&(p=t+"Prototype",hi(ee,p)||re(ee,p,{}),re(ee[p],b,d),e.real&&c&&(f||!c[b])&&re(c,b,d)))}});var xi=i((dT,Oi)=>{"use strict";var st=j(),Jl=M(),Ii=Function.prototype,Zl=st&&Object.getOwnPropertyDescriptor,ut=Jl(Ii,"name"),ec=ut&&function(){}.name==="something",rc=ut&&(!st||st&&Zl(Ii,"name").configurable);Oi.exports={EXISTS:ut,PROPER:ec,CONFIGURABLE:rc}});var wi=i((TT,Ei)=>{"use strict";var tc=Math.ceil,nc=Math.floor;Ei.exports=Math.trunc||function(r){var t=+r;return(t>0?nc:tc)(t)}});var lt=i((mT,Si)=>{"use strict";var oc=wi();Si.exports=function(e){var r=+e;return r!==r||r===0?0:oc(r)}});var Ri=i((yT,qi)=>{"use strict";var ic=lt(),ac=Math.max,sc=Math.min;qi.exports=function(e,r){var t=ic(e);return t<0?ac(t+r,0):sc(t,r)}});var Ai=i((hT,Pi)=>{"use strict";var uc=lt(),lc=Math.min;Pi.exports=function(e){return e>0?lc(uc(e),9007199254740991):0}});var ct=i((gT,_i)=>{"use strict";var cc=Ai();_i.exports=function(e){return cc(e.length)}});var Ni=i((IT,Ci)=>{"use strict";var fc=X(),pc=Ri(),vc=ct(),Li=function(e){return function(r,t,n){var o=fc(r),a=vc(o),u=pc(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}};Ci.exports={includes:Li(!0),indexOf:Li(!1)}});var ki=i((OT,Mi)=>{"use strict";var bc=N(),ft=M(),dc=X(),Tc=Ni().indexOf,mc=Ge(),ji=bc([].push);Mi.exports=function(e,r){var t=dc(e),n=0,o=[],a;for(a in t)!ft(mc,a)&&ft(t,a)&&ji(o,a);for(;r.length>n;)ft(t,a=r[n++])&&(~Tc(o,a)||ji(o,a));return o}});var pt=i((xT,Di)=>{"use strict";Di.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var Fi=i((ET,Vi)=>{"use strict";var yc=ki(),hc=pt();Vi.exports=Object.keys||function(r){return yc(r,hc)}});var Gi=i(Ui=>{"use strict";var gc=j(),Ic=Nr(),Oc=Z(),xc=V(),Ec=X(),wc=Fi();Ui.f=gc&&!Ic?Object.defineProperties:function(r,t){xc(r);for(var n=Ec(t),o=wc(t),a=o.length,u=0,s;a>u;)Oc.f(r,s=o[u++],n[s]);return r}});var Qi=i((ST,Bi)=>{"use strict";var Sc=kr();Bi.exports=Sc("document","documentElement")});var Tt=i((qT,Xi)=>{"use strict";var qc=V(),Rc=Gi(),$i=pt(),Pc=Ge(),Ac=Qi(),_c=Lr(),Lc=Ue(),Wi=">",zi="<",bt="prototype",dt="script",Yi=Lc("IE_PROTO"),vt=function(){},Hi=function(e){return zi+dt+Wi+e+zi+"/"+dt+Wi},Ki=function(e){e.write(Hi("")),e.close();var r=e.parentWindow.Object;return e=null,r},Cc=function(){var e=_c("iframe"),r="java"+dt+":",t;return e.style.display="none",Ac.appendChild(e),e.src=String(r),t=e.contentWindow.document,t.open(),t.write(Hi("document.F=Object")),t.close(),t.F},We,ze=function(){try{We=new ActiveXObject("htmlfile")}catch(r){}ze=typeof document!="undefined"?document.domain&&We?Ki(We):Cc():Ki(We);for(var e=$i.length;e--;)delete ze[bt][$i[e]];return ze()};Pc[Yi]=!0;Xi.exports=Object.create||function(r,t){var n;return r!==null?(vt[bt]=qc(r),n=new vt,vt[bt]=null,n[Yi]=r):n=ze(),t===void 0?n:Rc.f(n,t)}});var Zi=i((RT,Ji)=>{"use strict";var Nc=_();Ji.exports=!Nc(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})});var yt=i((PT,ra)=>{"use strict";var jc=M(),Mc=x(),kc=Kr(),Dc=Ue(),Vc=Zi(),ea=Dc("IE_PROTO"),mt=Object,Fc=mt.prototype;ra.exports=Vc?mt.getPrototypeOf:function(e){var r=kc(e);if(jc(r,ea))return r[ea];var t=r.constructor;return Mc(t)&&r instanceof t?t.prototype:r instanceof mt?Fc:null}});var ht=i((AT,ta)=>{"use strict";var Uc=W();ta.exports=function(e,r,t,n){return n&&n.enumerable?e[r]=t:Uc(e,r,t),e}});var xt=i((_T,ia)=>{"use strict";var Gc=_(),Bc=x(),Qc=$(),$c=Tt(),na=yt(),Wc=ht(),zc=L(),Kc=fe(),Ot=zc("iterator"),oa=!1,k,gt,It;[].keys&&(It=[].keys(),"next"in It?(gt=na(na(It)),gt!==Object.prototype&&(k=gt)):oa=!0);var Yc=!Qc(k)||Gc(function(){var e={};return k[Ot].call(e)!==e});Yc?k={}:Kc&&(k=$c(k));Bc(k[Ot])||Wc(k,Ot,function(){return this});ia.exports={IteratorPrototype:k,BUGGY_SAFARI_ITERATORS:oa}});var Ke=i((LT,sa)=>{"use strict";var Hc=L(),Xc=Hc("toStringTag"),aa={};aa[Xc]="z";sa.exports=String(aa)==="[object z]"});var He=i((CT,ua)=>{"use strict";var Jc=Ke(),Zc=x(),Ye=_e(),ef=L(),rf=ef("toStringTag"),tf=Object,nf=Ye(function(){return arguments}())=="Arguments",of=function(e,r){try{return e[r]}catch(t){}};ua.exports=Jc?Ye:function(e){var r,t,n;return e===void 0?"Undefined":e===null?"Null":typeof(t=of(r=tf(e),rf))=="string"?t:nf?Ye(r):(n=Ye(r))=="Object"&&Zc(r.callee)?"Arguments":n}});var ca=i((NT,la)=>{"use strict";var af=Ke(),sf=He();la.exports=af?{}.toString:function(){return"[object "+sf(this)+"]"}});var Et=i((jT,pa)=>{"use strict";var uf=Ke(),lf=Z().f,cf=W(),ff=M(),pf=ca(),vf=L(),fa=vf("toStringTag");pa.exports=function(e,r,t,n){if(e){var o=t?e:e.prototype;ff(o,fa)||lf(o,fa,{configurable:!0,value:r}),n&&!uf&&cf(o,"toString",pf)}}});var ba=i((MT,va)=>{"use strict";var bf=xt().IteratorPrototype,df=Tt(),Tf=pe(),mf=Et(),yf=Q(),hf=function(){return this};va.exports=function(e,r,t,n){var o=r+" Iterator";return e.prototype=df(bf,{next:Tf(+!n,t)}),mf(e,o,!1,!0),yf[o]=hf,e}});var Ta=i((kT,da)=>{"use strict";var gf=N(),If=ce();da.exports=function(e,r,t){try{return gf(If(Object.getOwnPropertyDescriptor(e,r)[t]))}catch(n){}}});var ya=i((DT,ma)=>{"use strict";var Of=x(),xf=String,Ef=TypeError;ma.exports=function(e){if(typeof e=="object"||Of(e))return e;throw Ef("Can't set "+xf(e)+" as a prototype")}});var ga=i((VT,ha)=>{"use strict";var wf=Ta(),Sf=V(),qf=ya();ha.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,r={},t;try{t=wf(Object.prototype,"__proto__","set"),t(r,[]),e=r instanceof Array}catch(n){}return function(o,a){return Sf(o),qf(a),e?t(o,a):o.__proto__=a,o}}():void 0)});var _a=i((FT,Aa)=>{"use strict";var Rf=at(),Pf=F(),Xe=fe(),Ra=xi(),Af=x(),_f=ba(),Ia=yt(),Oa=ga(),Lf=Et(),Cf=W(),wt=ht(),Nf=L(),xa=Q(),Pa=xt(),jf=Ra.PROPER,Mf=Ra.CONFIGURABLE,Ea=Pa.IteratorPrototype,Je=Pa.BUGGY_SAFARI_ITERATORS,de=Nf("iterator"),wa="keys",Te="values",Sa="entries",qa=function(){return this};Aa.exports=function(e,r,t,n,o,a,u){_f(t,r,n);var s=function(h){if(h===o&&b)return b;if(!Je&&h in l)return l[h];switch(h){case wa:return function(){return new t(this,h)};case Te:return function(){return new t(this,h)};case Sa:return function(){return new t(this,h)}}return function(){return new t(this)}},c=r+" Iterator",f=!1,l=e.prototype,p=l[de]||l["@@iterator"]||o&&l[o],b=!Je&&p||s(o),d=r=="Array"&&l.entries||p,T,y,I;if(d&&(T=Ia(d.call(new e)),T!==Object.prototype&&T.next&&(!Xe&&Ia(T)!==Ea&&(Oa?Oa(T,Ea):Af(T[de])||wt(T,de,qa)),Lf(T,c,!0,!0),Xe&&(xa[c]=qa))),jf&&o==Te&&p&&p.name!==Te&&(!Xe&&Mf?Cf(l,"name",Te):(f=!0,b=function(){return Pf(p,this)})),o)if(y={values:s(Te),keys:a?b:s(wa),entries:s(Sa)},u)for(I in y)(Je||f||!(I in l))&&wt(l,I,y[I]);else Rf({target:r,proto:!0,forced:Je||f},y);return(!Xe||u)&&l[de]!==b&&wt(l,de,b,{name:o}),xa[r]=b,y}});var Ca=i((UT,La)=>{"use strict";La.exports=function(e,r){return{value:e,done:r}}});var qt=i((GT,Da)=>{"use strict";var kf=X(),St=Dn(),Na=Q(),Ma=ri(),Df=Z().f,Vf=_a(),Ze=Ca(),Ff=fe(),Uf=j(),ka="Array Iterator",Gf=Ma.set,Bf=Ma.getterFor(ka);Da.exports=Vf(Array,"Array",function(e,r){Gf(this,{type:ka,target:kf(e),index:0,kind:r})},function(){var e=Bf(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 ja=Na.Arguments=Na.Array;St("keys");St("values");St("entries");if(!Ff&&Uf&&ja.name!=="values")try{Df(ja,"name",{value:"values"})}catch(e){}});var Fa=i((BT,Va)=>{"use strict";var Qf=L(),$f=Q(),Wf=Qf("iterator"),zf=Array.prototype;Va.exports=function(e){return e!==void 0&&($f.Array===e||zf[Wf]===e)}});var Rt=i((QT,Ga)=>{"use strict";var Kf=He(),Ua=De(),Yf=Le(),Hf=Q(),Xf=L(),Jf=Xf("iterator");Ga.exports=function(e){if(!Yf(e))return Ua(e,Jf)||Ua(e,"@@iterator")||Hf[Kf(e)]}});var Qa=i(($T,Ba)=>{"use strict";var Zf=F(),ep=ce(),rp=V(),tp=ke(),np=Rt(),op=TypeError;Ba.exports=function(e,r){var t=arguments.length<2?np(e):r;if(ep(t))return rp(Zf(t,e));throw op(tp(e)+" is not iterable")}});var za=i((WT,Wa)=>{"use strict";var ip=F(),$a=V(),ap=De();Wa.exports=function(e,r,t){var n,o;$a(e);try{if(n=ap(e,"return"),!n){if(r==="throw")throw t;return t}n=ip(n,e)}catch(a){o=!0,n=a}if(r==="throw")throw t;if(o)throw n;return $a(n),t}});var Ja=i((zT,Xa)=>{"use strict";var sp=it(),up=F(),lp=V(),cp=ke(),fp=Fa(),pp=ct(),Ka=Dr(),vp=Qa(),bp=Rt(),Ya=za(),dp=TypeError,er=function(e,r){this.stopped=e,this.result=r},Ha=er.prototype;Xa.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=sp(r,n),f,l,p,b,d,T,y,I=function(g){return f&&Ya(f,"normal",g),new er(!0,g)},h=function(g){return o?(lp(g),s?c(g[0],g[1],I):c(g[0],g[1])):s?c(g,I):c(g)};if(a)f=e.iterator;else if(u)f=e;else{if(l=bp(e),!l)throw dp(cp(e)+" is not iterable");if(fp(l)){for(p=0,b=pp(e);b>p;p++)if(d=h(e[p]),d&&Ka(Ha,d))return d;return new er(!1)}f=vp(e,l)}for(T=a?e.next:f.next;!(y=up(T,f)).done;){try{d=h(y.value)}catch(g){Ya(f,"throw",g)}if(typeof d=="object"&&d&&Ka(Ha,d))return d}return new er(!1)}});var es=i((KT,Za)=>{"use strict";var Tp=Ve(),mp=Z(),yp=pe();Za.exports=function(e,r,t){var n=Tp(r);n in e?mp.f(e,n,yp(0,t)):e[n]=t}});var rs=i(()=>{"use strict";var hp=at(),gp=Ja(),Ip=es();hp({target:"Object",stat:!0},{fromEntries:function(r){var t={};return gp(r,function(n,o){Ip(t,n,o)},{AS_ENTRIES:!0}),t}})});var ns=i((XT,ts)=>{"use strict";qt();rs();var Op=je();ts.exports=Op.Object.fromEntries});var is=i((JT,os)=>{"use strict";os.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 us=i(()=>{"use strict";qt();var xp=is(),Ep=S(),wp=He(),Sp=W(),as=Q(),qp=L(),ss=qp("toStringTag");for(rr in xp)Pt=Ep[rr],tr=Pt&&Pt.prototype,tr&&wp(tr)!==ss&&Sp(tr,ss,rr),as[rr]=as.Array;var Pt,tr,rr});var cs=i((rm,ls)=>{"use strict";var Rp=ns();us();ls.exports=Rp});var ps=i((tm,fs)=>{"use strict";var Pp=cs();fs.exports=Pp});var Np={};kt(Np,{CurrentClientBrowser:()=>nr,CurrentClientDevice:()=>or,ErrorCategory:()=>On,InterfaceLanguage:()=>ds,Logger:()=>Ie,Observable:()=>v,Subject:()=>C,Subscription:()=>E,VERSION:()=>Vt,VKNumericLanguage:()=>bs,ValueSubject:()=>ie,VideoQuality:()=>Ee,abortable:()=>Kt,addScript:()=>$t,areQualitiesExact:()=>fn,assertEmptyArray:()=>Qt,assertNever:()=>A,assertNonNullable:()=>Ut,assertNotEmptyArray:()=>Bt,assertNullable:()=>Gt,assertQualityIsExact:()=>pn,buffer:()=>lr,checkNever:()=>Ft,clearVideoElement:()=>Tn,cloneDeep:()=>bn,cloneDeepWith:()=>oe,combine:()=>ar,debounce:()=>fr,debounceFn:()=>qe,detectEmbed:()=>rn,fillWithDefault:()=>vn,filter:()=>dr,filterChanged:()=>mr,fromEvent:()=>gn,getCurrentBrowser:()=>ne,getExponentialDelay:()=>en,getHighestQuality:()=>an,getIOSVersion:()=>Ht,interval:()=>yn,isAndroid:()=>Xt,isHigher:()=>tn,isHigherOrEqual:()=>nn,isIOS:()=>Yt,isInvariantQuality:()=>Se,isLower:()=>we,isLowerOrEqual:()=>on,isMacLike:()=>Jt,isMobile:()=>Zt,isNonNullable:()=>G,isNullable:()=>Oe,loadVKLangPack:()=>_p,map:()=>ae,mapTo:()=>hr,merge:()=>sr,noop:()=>D,now:()=>zt,observableFrom:()=>hn,observeElementSize:()=>dn,once:()=>gr,pairwise:()=>Or,safeStorage:()=>xe,tap:()=>Er,throttle:()=>vr,throttleFn:()=>Re,timeCodeToString:()=>Ns,timeout:()=>mn,videoHeightToQuality:()=>un,videoQualityToHeight:()=>cn,videoSizeToQuality:()=>ln});module.exports=qs(Np);var Vt="1.0.38-beta.1";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 Ie=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 Bt(e,r){if(!(e!=null&&e.length))throw new Error(r)}function Qt(e,r){if(e!=null&&e.length)throw new Error(r)}var $t=(e,r,t)=>new Promise((n,o)=>{r.addEventListener("abort",()=>{s(),f.remove()});let a=()=>{s(),o()},u=()=>{s(),n()},s=()=>{c&&clearTimeout(c),f.removeEventListener("load",u),f.removeEventListener("error",a)},c;t&&(c=window.setTimeout(a,t));let f=document.createElement("script");f.addEventListener("load",u),f.addEventListener("error",a),f.src=e,document.head.appendChild(f)});var Wt,zt=typeof((Wt=window.performance)==null?void 0:Wt.now)=="function"?()=>window.performance.now():()=>Date.now();var Kt=(e,r)=>(...t)=>ge(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.SamsungBrowser="SamsungBrowser",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=/samsungbrowser/i.test(e)?"SamsungBrowser":void 0,n=/chrome|crios/i.test(e)?"Chrome":void 0,o=/chromium/i.test(e)?"Chromium":void 0,a=/firefox|fxios/i.test(e)?"Firefox":void 0,u=/webkit|safari|khtml/i.test(e)?"Safari":void 0,s=/opr\//i.test(e)?"Opera":void 0,c=/edg/i.test(e)?"Edge":void 0,f=/android/i.test(e)?"Android":void 0,l=/iphone/i.test(e)?"iPhone":void 0,p=/ipad/i.test(e)?"iPad":void 0,b=/ipod/i.test(e)?"iPod":void 0,d=/mac/i.test(e)?"Mac":void 0,T=/webOS|BlackBerry|IEMobile|Opera Mini/i.test(e)?"RestMobile":void 0;return{browser:r||t||a||s||c||n||o||u||"Rest",device:f||l||p||b||T||d||"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:()=>Cs,get:()=>Ps,has:()=>_s,isPersistent:()=>Rs,remove:()=>Ls,set:()=>As});var O,B,ir=`vk-videoplayer-dummy-key-${Math.random()}`,Y=()=>{if(B!==void 0)return B;try{localStorage.setItem(ir,"test"),localStorage.removeItem(ir),B=0}catch(e){if(e instanceof DOMException||e instanceof TypeError)try{sessionStorage.getItem(ir),B=1}catch(r){if(r instanceof DOMException||r instanceof TypeError)B=2;else throw r}else throw e}return B===2&&(O=new Map),B},Rs=()=>Y()===0,Ps=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)}},As=(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)}},_s=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}},Ls=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)}},Cs=()=>{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=(l=>(l.INVARIANT="Invariant quality",l.Q_144P="144p",l.Q_240P="240p",l.Q_360P="360p",l.Q_480P="480p",l.Q_720P="720p",l.Q_1080P="1080p",l.Q_1440P="1440p",l.Q_2160P="2160p",l.Q_4320P="4320p",l))(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 Ns=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,f=0,l=!1,p=!1,b=!0,d=!r&&r!==0&&typeof window.requestAnimationFrame=="function";t&&(l=!!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 T(m){let q=n,U=o;return n=o=void 0,f=m,u=e.apply(U,q),u}function y(m,q){return d?(s&&window.cancelAnimationFrame(s),window.requestAnimationFrame(m)):setTimeout(m,q)}function I(m){if(d){window.cancelAnimationFrame(m);return}clearTimeout(m)}function h(m){return f=m,s=y(me,r),l?T(m):u}function g(m){let q=m-c,U=m-f,Lt=r-q;return p?Math.min(Lt,a-U):Lt}function At(m){let q=m-c,U=m-f;return c===void 0||q>=r||q<0||p&&U>=a}function me(){let m=Date.now();if(At(m))return _t(m);s=y(me,g(m))}function _t(m){return s=void 0,b&&n?T(m):(n=o=void 0,u)}function Ts(){s!==void 0&&I(s),f=0,n=c=o=s=void 0}function ms(){return s===void 0?u:_t(Date.now())}function ys(){return s!==void 0}function ye(...m){let q=Date.now(),U=At(q);if(n=m,o=this,c=q,U){if(s===void 0)return h(c);if(p)return s=y(me,r),T(c)}return s===void 0&&(s=y(me,r)),u}return ye.cancel=Ts,ye.flush=ms,ye.pending=ys,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 js=300,dn=(e,r=js)=>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,f;s.contentBoxSize&&s.contentBoxSize[0]?(f=s.contentBoxSize[0].blockSize,c=s.contentBoxSize[0].inlineSize):s.contentRect&&(c=s.contentRect.width,f=s.contentRect.height),G(c)&&G(f)&&t.next({width:c,height:f})},r));return a.observe(e),()=>a.disconnect()});var Tn=e=>{e.removeAttribute("src"),e.load()};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 mn=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 yn=e=>new v(r=>{let t=window.setInterval(()=>r.next(),e);return()=>{t&&(window.clearInterval(t),t=void 0)}});var hn=e=>new v(r=>{e.forEach(t=>r.next(t))});var gn=(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 Ms={leading:!1,trailing:!0};function fr(e,r=Ms){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 ks={leading:!0,trailing:!1};function vr(e,r=ks){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 gr(){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 Ir(r)))}var Ir=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 On=(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))(On||{});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(f,l){let p;l&&l.signal&&(p=l.signal,delete l.signal);let b=new t(f,l);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,f)=>{let l=a&&a.prototype.isPrototypeOf(c)?c.signal:f?f.signal:void 0;if(l){let p;try{p=new DOMException("Aborted","AbortError")}catch(d){p=new Error("Aborted"),p.name="AbortError"}if(l.aborted)return Promise.reject(p);let b=new Promise((d,T)=>{l.addEventListener("abort",()=>T(p),{once:!0})});return f&&f.signal&&delete f.signal,Promise.race([b,u(c,f)])}return u(c,f)},Request:a}}var ue=Ae({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}),xn=ue?wr({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}):void 0,En=ue?xn.fetch:window.fetch,cd=ue?xn.Request:window.Request,fd=ue?se:window.AbortController,pd=ue?H:window.AbortSignal;var vs=Ss(ps(),1);var bs=(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))(bs||{}),Ap="vk.com",_p=(e,r,t)=>ge(void 0,null,function*(){let n=new URL(`https://${Ap}/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 En(n.toString())).json();return Lp(a,t)}),Lp=(e,r)=>(0,vs.default)(Object.entries(e.keys).map(([t,n])=>[t.substring(`${r}_`.length),Cp(n)])),Cp=e=>Array.isArray(e)?e[0]:e;var ds=(t=>(t.RU="ru",t.EN="en",t))(ds||{});
package/es2015.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @vkontakte/videoplayer-shared v1.0.38-beta.0
3
- * Wed, 07 Aug 2024 14:12:32 GMT
2
+ * @vkontakte/videoplayer-shared v1.0.38-beta.1
3
+ * Thu, 08 Aug 2024 11:57:05 GMT
4
4
  * https://st.mycdn.me/static/vkontakte-videoplayer/1-0-38/doc/
5
5
  */
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.38-beta.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 ar=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 Tt=t=>{t.removeAttribute("src"),t.load()};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 vt=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 It=t=>new u(e=>{let r=window.setInterval(()=>e.next(),t);return()=>{r&&(window.clearInterval(r),r=void 0)}});var xt=t=>new u(e=>{t.forEach(r=>e.next(r))});var ht=(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 gt={leading:!1,trailing:!0};function me(t,e=gt){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 yt={leading:!0,trailing:!1};function Te(t,e=yt){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 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 wt=(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))(wt||{}),Et="vk.com",Zn=(t,e,r)=>M(void 0,null,function*(){let n=new URL(`https://${Et}/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 St(s,r)}),St=(t,e)=>Object.fromEntries(Object.entries(t.keys).map(([r,n])=>[r.substring(`${e}_`.length),At(n)])),At=t=>Array.isArray(t)?t[0]:t;var Rt=(r=>(r.RU="ru",r.EN="en",r))(Rt||{});export{ue as CurrentClientBrowser,ce as CurrentClientDevice,Ot as ErrorCategory,Rt as InterfaceLanguage,D as Logger,u as Observable,x as Subject,m as Subscription,Ve as VERSION,wt 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,Tt as clearVideoElement,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,ht as fromEvent,N as getCurrentBrowser,$e as getExponentialDelay,st as getHighestQuality,Ge as getIOSVersion,It 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,Zn as loadVKLangPack,_ as map,he as mapTo,de as merge,g as noop,ze as now,xt as observableFrom,mt as observeElementSize,ge as once,ye as pairwise,F as safeStorage,Oe as tap,Te as throttle,q as throttleFn,ar as timeCodeToString,vt as timeout,at as videoHeightToQuality,ut as videoQualityToHeight,lt as videoSizeToQuality};
6
+ var ja=Object.create;var be=Object.defineProperty,Ma=Object.defineProperties,ka=Object.getOwnPropertyDescriptor,Da=Object.getOwnPropertyDescriptors,Va=Object.getOwnPropertyNames,gt=Object.getOwnPropertySymbols,Fa=Object.getPrototypeOf,Ot=Object.prototype.hasOwnProperty,Ua=Object.prototype.propertyIsEnumerable;var xt=Math.pow,It=(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)&&It(e,t,r[t]);if(gt)for(var t of gt(r))Ua.call(r,t)&&It(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})},Ba=(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 Qa=(e,r,t)=>(t=e!=null?ja(Fa(e)):{},Ba(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(f){o(f)}},u=c=>{try{s(t.throw(c))}catch(f){o(f)}},s=c=>c.done?n(c.value):Promise.resolve(c.value).then(a,u);s((t=t.apply(e,r)).next())});var A=i((fd,Gt)=>{"use strict";Gt.exports=function(e){try{return!!e()}catch(r){return!0}}});var oe=i((pd,Bt)=>{"use strict";var Ns=A();Bt.exports=!Ns(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var C=i((vd,Wt)=>{"use strict";var Qt=oe(),$t=Function.prototype,vr=$t.call,js=Qt&&$t.bind.bind(vr,vr);Wt.exports=Qt?js:function(e){return function(){return vr.apply(e,arguments)}}});var xe=i((bd,Kt)=>{"use strict";var zt=C(),Ms=zt({}.toString),ks=zt("".slice);Kt.exports=function(e){return ks(Ms(e),8,-1)}});var Ht=i((dd,Yt)=>{"use strict";var Ds=C(),Vs=A(),Fs=xe(),br=Object,Us=Ds("".split);Yt.exports=Vs(function(){return!br("z").propertyIsEnumerable(0)})?function(e){return Fs(e)=="String"?Us(e,""):br(e)}:br});var Ee=i((Td,Xt)=>{"use strict";Xt.exports=function(e){return e==null}});var dr=i((md,Jt)=>{"use strict";var Gs=Ee(),Bs=TypeError;Jt.exports=function(e){if(Gs(e))throw Bs("Can't call method on "+e);return e}});var X=i((yd,Zt)=>{"use strict";var Qs=Ht(),$s=dr();Zt.exports=function(e){return Qs($s(e))}});var rn=i((hd,en)=>{"use strict";en.exports=function(){}});var B=i((gd,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((Id,an)=>{"use strict";var Tr=typeof document=="object"&&document.all,Ws=typeof Tr=="undefined"&&Tr!==void 0;an.exports={all:Tr,IS_HTMLDDA:Ws}});var x=i((Od,un)=>{"use strict";var sn=mr(),zs=sn.all;un.exports=sn.IS_HTMLDDA?function(e){return typeof e=="function"||e===zs}:function(e){return typeof e=="function"}});var fn=i((xd,cn)=>{"use strict";var Ks=S(),Ys=x(),ln=Ks.WeakMap;cn.exports=Ys(ln)&&/native code/.test(String(ln))});var Q=i((Ed,bn)=>{"use strict";var pn=x(),vn=mr(),Hs=vn.all;bn.exports=vn.IS_HTMLDDA?function(e){return typeof e=="object"?e!==null:pn(e)||e===Hs}:function(e){return typeof e=="object"?e!==null:pn(e)}});var N=i((wd,dn)=>{"use strict";var Xs=A();dn.exports=!Xs(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var hr=i((Sd,mn)=>{"use strict";var Js=S(),Tn=Q(),yr=Js.document,Zs=Tn(yr)&&Tn(yr.createElement);mn.exports=function(e){return Zs?yr.createElement(e):{}}});var gr=i((qd,yn)=>{"use strict";var eu=N(),ru=A(),tu=hr();yn.exports=!eu&&!ru(function(){return Object.defineProperty(tu("div"),"a",{get:function(){return 7}}).a!=7})});var Ir=i((Rd,hn)=>{"use strict";var nu=N(),ou=A();hn.exports=nu&&ou(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})});var D=i((Pd,gn)=>{"use strict";var iu=Q(),au=String,su=TypeError;gn.exports=function(e){if(iu(e))return e;throw su(au(e)+" is not an object")}});var V=i((Ad,In)=>{"use strict";var uu=oe(),Se=Function.prototype.call;In.exports=uu?Se.bind(Se):function(){return Se.apply(Se,arguments)}});var qe=i((_d,On)=>{"use strict";On.exports={}});var Er=i((Ld,En)=>{"use strict";var Or=qe(),xr=S(),lu=x(),xn=function(e){return lu(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((Cd,wn)=>{"use strict";var cu=C();wn.exports=cu({}.isPrototypeOf)});var qn=i((Nd,Sn)=>{"use strict";Sn.exports=typeof navigator!="undefined"&&String(navigator.userAgent)||""});var Nn=i((jd,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((Md,Mn)=>{"use strict";var jn=Nn(),fu=A(),pu=S(),vu=pu.String;Mn.exports=!!Object.getOwnPropertySymbols&&!fu(function(){var e=Symbol();return!vu(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&jn&&jn<41})});var Rr=i((kd,kn)=>{"use strict";var bu=qr();kn.exports=bu&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Pr=i((Dd,Dn)=>{"use strict";var du=Er(),Tu=x(),mu=wr(),yu=Rr(),hu=Object;Dn.exports=yu?function(e){return typeof e=="symbol"}:function(e){var r=du("Symbol");return Tu(r)&&mu(r.prototype,hu(e))}});var Pe=i((Vd,Vn)=>{"use strict";var gu=String;Vn.exports=function(e){try{return gu(e)}catch(r){return"Object"}}});var ie=i((Fd,Fn)=>{"use strict";var Iu=x(),Ou=Pe(),xu=TypeError;Fn.exports=function(e){if(Iu(e))return e;throw xu(Ou(e)+" is not a function")}});var Ae=i((Ud,Un)=>{"use strict";var Eu=ie(),wu=Ee();Un.exports=function(e,r){var t=e[r];return wu(t)?void 0:Eu(t)}});var Bn=i((Gd,Gn)=>{"use strict";var Ar=V(),_r=x(),Lr=Q(),Su=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 Su("Can't convert object to primitive value")}});var ae=i((Bd,Qn)=>{"use strict";Qn.exports=!0});var zn=i((Qd,Wn)=>{"use strict";var $n=S(),qu=Object.defineProperty;Wn.exports=function(e,r){try{qu($n,e,{value:r,configurable:!0,writable:!0})}catch(t){$n[e]=r}return r}});var Cr=i(($d,Yn)=>{"use strict";var Ru=S(),Pu=zn(),Kn="__core-js_shared__",Au=Ru[Kn]||Pu(Kn,{});Yn.exports=Au});var Nr=i((Wd,Xn)=>{"use strict";var _u=ae(),Hn=Cr();(Xn.exports=function(e,r){return Hn[e]||(Hn[e]=r!==void 0?r:{})})("versions",[]).push({version:"3.31.0",mode:_u?"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((zd,Jn)=>{"use strict";var Lu=dr(),Cu=Object;Jn.exports=function(e){return Cu(Lu(e))}});var j=i((Kd,Zn)=>{"use strict";var Nu=C(),ju=jr(),Mu=Nu({}.hasOwnProperty);Zn.exports=Object.hasOwn||function(r,t){return Mu(ju(r),t)}});var Mr=i((Yd,eo)=>{"use strict";var ku=C(),Du=0,Vu=Math.random(),Fu=ku(1 .toString);eo.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Fu(++Du+Vu,36)}});var _=i((Hd,to)=>{"use strict";var Uu=S(),Gu=Nr(),ro=j(),Bu=Mr(),Qu=qr(),$u=Rr(),J=Uu.Symbol,kr=Gu("wks"),Wu=$u?J.for||J:J&&J.withoutSetter||Bu;to.exports=function(e){return ro(kr,e)||(kr[e]=Qu&&ro(J,e)?J[e]:Wu("Symbol."+e)),kr[e]}});var ao=i((Xd,io)=>{"use strict";var zu=V(),no=Q(),oo=Pr(),Ku=Ae(),Yu=Bn(),Hu=_(),Xu=TypeError,Ju=Hu("toPrimitive");io.exports=function(e,r){if(!no(e)||oo(e))return e;var t=Ku(e,Ju),n;if(t){if(r===void 0&&(r="default"),n=zu(t,e,r),!no(n)||oo(n))return n;throw Xu("Can't convert object to primitive value")}return r===void 0&&(r="number"),Yu(e,r)}});var _e=i((Jd,so)=>{"use strict";var Zu=ao(),el=Pr();so.exports=function(e){var r=Zu(e,"string");return el(r)?r:r+""}});var Z=i(lo=>{"use strict";var rl=N(),tl=gr(),nl=Ir(),Le=D(),uo=_e(),ol=TypeError,Dr=Object.defineProperty,il=Object.getOwnPropertyDescriptor,Vr="enumerable",Fr="configurable",Ur="writable";lo.f=rl?nl?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=il(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),tl)try{return Dr(r,t,n)}catch(o){}if("get"in n||"set"in n)throw ol("Accessors not supported");return"value"in n&&(r[t]=n.value),r}});var se=i((eT,co)=>{"use strict";co.exports=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}});var $=i((rT,fo)=>{"use strict";var al=N(),sl=Z(),ul=se();fo.exports=al?function(e,r,t){return sl.f(e,r,ul(1,t))}:function(e,r,t){return e[r]=t,e}});var Ce=i((tT,vo)=>{"use strict";var ll=Nr(),cl=Mr(),po=ll("keys");vo.exports=function(e){return po[e]||(po[e]=cl(e))}});var Ne=i((nT,bo)=>{"use strict";bo.exports={}});var ho=i((oT,yo)=>{"use strict";var fl=fn(),mo=S(),pl=Q(),vl=$(),Gr=j(),Br=Cr(),bl=Ce(),dl=Ne(),To="Object already initialized",Qr=mo.TypeError,Tl=mo.WeakMap,je,ue,Me,ml=function(e){return Me(e)?ue(e):je(e,{})},yl=function(e){return function(r){var t;if(!pl(r)||(t=ue(r)).type!==e)throw Qr("Incompatible receiver, "+e+" required");return t}};fl||Br.state?(P=Br.state||(Br.state=new Tl),P.get=P.get,P.has=P.has,P.set=P.set,je=function(e,r){if(P.has(e))throw Qr(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=bl("state"),dl[W]=!0,je=function(e,r){if(Gr(e,W))throw Qr(To);return r.facade=e,vl(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:ml,getterFor:yl}});var Eo=i((iT,xo)=>{"use strict";var hl=oe(),Oo=Function.prototype,go=Oo.apply,Io=Oo.call;xo.exports=typeof Reflect=="object"&&Reflect.apply||(hl?Io.bind(go):function(){return Io.apply(go,arguments)})});var $r=i((aT,wo)=>{"use strict";var gl=xe(),Il=C();wo.exports=function(e){if(gl(e)==="Function")return Il(e)}});var Po=i(Ro=>{"use strict";var So={}.propertyIsEnumerable,qo=Object.getOwnPropertyDescriptor,Ol=qo&&!So.call({1:2},1);Ro.f=Ol?function(r){var t=qo(this,r);return!!t&&t.enumerable}:So});var Lo=i(_o=>{"use strict";var xl=N(),El=V(),wl=Po(),Sl=se(),ql=X(),Rl=_e(),Pl=j(),Al=gr(),Ao=Object.getOwnPropertyDescriptor;_o.f=xl?Ao:function(r,t){if(r=ql(r),t=Rl(t),Al)try{return Ao(r,t)}catch(n){}if(Pl(r,t))return Sl(!El(wl.f,r,t),r[t])}});var No=i((lT,Co)=>{"use strict";var _l=A(),Ll=x(),Cl=/#|\.prototype\./,le=function(e,r){var t=jl[Nl(e)];return t==kl?!0:t==Ml?!1:Ll(r)?_l(r):!!r},Nl=le.normalize=function(e){return String(e).replace(Cl,".").toLowerCase()},jl=le.data={},Ml=le.NATIVE="N",kl=le.POLYFILL="P";Co.exports=le});var Wr=i((cT,Mo)=>{"use strict";var jo=$r(),Dl=ie(),Vl=oe(),Fl=jo(jo.bind);Mo.exports=function(e,r){return Dl(e),r===void 0?e:Vl?Fl(e,r):function(){return e.apply(r,arguments)}}});var zr=i((fT,Do)=>{"use strict";var ke=S(),Ul=Eo(),Gl=$r(),Bl=x(),Ql=Lo().f,$l=No(),ee=qe(),Wl=Wr(),re=$(),ko=j(),zl=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 Ul(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,f,l,p,b,d,T,y,I,h;for(b in r)f=$l(n?b:t+(o?".":"#")+b,e.forced),l=!f&&u&&ko(u,b),T=s[b],l&&(e.dontCallGetSet?(h=Ql(u,b),y=h&&h.value):y=u[b]),d=l&&y?y:r[b],!(l&&typeof T==typeof d)&&(e.bind&&l?I=Wl(d,ke):e.wrap&&l?I=zl(d):a&&Bl(d)?I=Gl(d):I=d,(e.sham||d&&d.sham||T&&T.sham)&&re(I,"sham",!0),re(s,b,I),a&&(p=t+"Prototype",ko(ee,p)||re(ee,p,{}),re(ee[p],b,d),e.real&&c&&(f||!c[b])&&re(c,b,d)))}});var Uo=i((pT,Fo)=>{"use strict";var Kr=N(),Kl=j(),Vo=Function.prototype,Yl=Kr&&Object.getOwnPropertyDescriptor,Yr=Kl(Vo,"name"),Hl=Yr&&function(){}.name==="something",Xl=Yr&&(!Kr||Kr&&Yl(Vo,"name").configurable);Fo.exports={EXISTS:Yr,PROPER:Hl,CONFIGURABLE:Xl}});var Bo=i((vT,Go)=>{"use strict";var Jl=Math.ceil,Zl=Math.floor;Go.exports=Math.trunc||function(r){var t=+r;return(t>0?Zl:Jl)(t)}});var Hr=i((bT,Qo)=>{"use strict";var ec=Bo();Qo.exports=function(e){var r=+e;return r!==r||r===0?0:ec(r)}});var Wo=i((dT,$o)=>{"use strict";var rc=Hr(),tc=Math.max,nc=Math.min;$o.exports=function(e,r){var t=rc(e);return t<0?tc(t+r,0):nc(t,r)}});var Ko=i((TT,zo)=>{"use strict";var oc=Hr(),ic=Math.min;zo.exports=function(e){return e>0?ic(oc(e),9007199254740991):0}});var Xr=i((mT,Yo)=>{"use strict";var ac=Ko();Yo.exports=function(e){return ac(e.length)}});var Jo=i((yT,Xo)=>{"use strict";var sc=X(),uc=Wo(),lc=Xr(),Ho=function(e){return function(r,t,n){var o=sc(r),a=lc(o),u=uc(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((hT,ei)=>{"use strict";var cc=C(),Jr=j(),fc=X(),pc=Jo().indexOf,vc=Ne(),Zo=cc([].push);ei.exports=function(e,r){var t=fc(e),n=0,o=[],a;for(a in t)!Jr(vc,a)&&Jr(t,a)&&Zo(o,a);for(;r.length>n;)Jr(t,a=r[n++])&&(~pc(o,a)||Zo(o,a));return o}});var Zr=i((gT,ti)=>{"use strict";ti.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var oi=i((IT,ni)=>{"use strict";var bc=ri(),dc=Zr();ni.exports=Object.keys||function(r){return bc(r,dc)}});var ai=i(ii=>{"use strict";var Tc=N(),mc=Ir(),yc=Z(),hc=D(),gc=X(),Ic=oi();ii.f=Tc&&!mc?Object.defineProperties:function(r,t){hc(r);for(var n=gc(t),o=Ic(t),a=o.length,u=0,s;a>u;)yc.f(r,s=o[u++],n[s]);return r}});var ui=i((xT,si)=>{"use strict";var Oc=Er();si.exports=Oc("document","documentElement")});var nt=i((ET,di)=>{"use strict";var xc=D(),Ec=ai(),li=Zr(),wc=Ne(),Sc=ui(),qc=hr(),Rc=Ce(),ci=">",fi="<",rt="prototype",tt="script",vi=Rc("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},Pc=function(){var e=qc("iframe"),r="java"+tt+":",t;return e.style.display="none",Sc.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):Pc():pi(De);for(var e=li.length;e--;)delete Ve[rt][li[e]];return Ve()};wc[vi]=!0;di.exports=Object.create||function(r,t){var n;return r!==null?(et[rt]=xc(r),n=new et,et[rt]=null,n[vi]=r):n=Ve(),t===void 0?n:Ec.f(n,t)}});var mi=i((wT,Ti)=>{"use strict";var Ac=A();Ti.exports=!Ac(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})});var it=i((ST,hi)=>{"use strict";var _c=j(),Lc=x(),Cc=jr(),Nc=Ce(),jc=mi(),yi=Nc("IE_PROTO"),ot=Object,Mc=ot.prototype;hi.exports=jc?ot.getPrototypeOf:function(e){var r=Cc(e);if(_c(r,yi))return r[yi];var t=r.constructor;return Lc(t)&&r instanceof t?t.prototype:r instanceof ot?Mc:null}});var at=i((qT,gi)=>{"use strict";var kc=$();gi.exports=function(e,r,t,n){return n&&n.enumerable?e[r]=t:kc(e,r,t),e}});var ct=i((RT,xi)=>{"use strict";var Dc=A(),Vc=x(),Fc=Q(),Uc=nt(),Ii=it(),Gc=at(),Bc=_(),Qc=ae(),lt=Bc("iterator"),Oi=!1,M,st,ut;[].keys&&(ut=[].keys(),"next"in ut?(st=Ii(Ii(ut)),st!==Object.prototype&&(M=st)):Oi=!0);var $c=!Fc(M)||Dc(function(){var e={};return M[lt].call(e)!==e});$c?M={}:Qc&&(M=Uc(M));Vc(M[lt])||Gc(M,lt,function(){return this});xi.exports={IteratorPrototype:M,BUGGY_SAFARI_ITERATORS:Oi}});var Fe=i((PT,wi)=>{"use strict";var Wc=_(),zc=Wc("toStringTag"),Ei={};Ei[zc]="z";wi.exports=String(Ei)==="[object z]"});var Ge=i((AT,Si)=>{"use strict";var Kc=Fe(),Yc=x(),Ue=xe(),Hc=_(),Xc=Hc("toStringTag"),Jc=Object,Zc=Ue(function(){return arguments}())=="Arguments",ef=function(e,r){try{return e[r]}catch(t){}};Si.exports=Kc?Ue:function(e){var r,t,n;return e===void 0?"Undefined":e===null?"Null":typeof(t=ef(r=Jc(e),Xc))=="string"?t:Zc?Ue(r):(n=Ue(r))=="Object"&&Yc(r.callee)?"Arguments":n}});var Ri=i((_T,qi)=>{"use strict";var rf=Fe(),tf=Ge();qi.exports=rf?{}.toString:function(){return"[object "+tf(this)+"]"}});var ft=i((LT,Ai)=>{"use strict";var nf=Fe(),of=Z().f,af=$(),sf=j(),uf=Ri(),lf=_(),Pi=lf("toStringTag");Ai.exports=function(e,r,t,n){if(e){var o=t?e:e.prototype;sf(o,Pi)||of(o,Pi,{configurable:!0,value:r}),n&&!nf&&af(o,"toString",uf)}}});var Li=i((CT,_i)=>{"use strict";var cf=ct().IteratorPrototype,ff=nt(),pf=se(),vf=ft(),bf=B(),df=function(){return this};_i.exports=function(e,r,t,n){var o=r+" Iterator";return e.prototype=ff(cf,{next:pf(+!n,t)}),vf(e,o,!1,!0),bf[o]=df,e}});var Ni=i((NT,Ci)=>{"use strict";var Tf=C(),mf=ie();Ci.exports=function(e,r,t){try{return Tf(mf(Object.getOwnPropertyDescriptor(e,r)[t]))}catch(n){}}});var Mi=i((jT,ji)=>{"use strict";var yf=x(),hf=String,gf=TypeError;ji.exports=function(e){if(typeof e=="object"||yf(e))return e;throw gf("Can't set "+hf(e)+" as a prototype")}});var Di=i((MT,ki)=>{"use strict";var If=Ni(),Of=D(),xf=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 Of(o),xf(a),e?t(o,a):o.__proto__=a,o}}():void 0)});var Yi=i((kT,Ki)=>{"use strict";var Ef=zr(),wf=V(),Be=ae(),Wi=Uo(),Sf=x(),qf=Li(),Vi=it(),Fi=Di(),Rf=ft(),Pf=$(),pt=at(),Af=_(),Ui=B(),zi=ct(),_f=Wi.PROPER,Lf=Wi.CONFIGURABLE,Gi=zi.IteratorPrototype,Qe=zi.BUGGY_SAFARI_ITERATORS,ce=Af("iterator"),Bi="keys",fe="values",Qi="entries",$i=function(){return this};Ki.exports=function(e,r,t,n,o,a,u){qf(t,r,n);var s=function(h){if(h===o&&b)return b;if(!Qe&&h in l)return l[h];switch(h){case Bi:return function(){return new t(this,h)};case fe:return function(){return new t(this,h)};case Qi:return function(){return new t(this,h)}}return function(){return new t(this)}},c=r+" Iterator",f=!1,l=e.prototype,p=l[ce]||l["@@iterator"]||o&&l[o],b=!Qe&&p||s(o),d=r=="Array"&&l.entries||p,T,y,I;if(d&&(T=Vi(d.call(new e)),T!==Object.prototype&&T.next&&(!Be&&Vi(T)!==Gi&&(Fi?Fi(T,Gi):Sf(T[ce])||pt(T,ce,$i)),Rf(T,c,!0,!0),Be&&(Ui[c]=$i))),_f&&o==fe&&p&&p.name!==fe&&(!Be&&Lf?Pf(l,"name",fe):(f=!0,b=function(){return wf(p,this)})),o)if(y={values:s(fe),keys:a?b:s(Bi),entries:s(Qi)},u)for(I in y)(Qe||f||!(I in l))&&pt(l,I,y[I]);else Ef({target:r,proto:!0,forced:Qe||f},y);return(!Be||u)&&l[ce]!==b&&pt(l,ce,b,{name:o}),Ui[r]=b,y}});var Xi=i((DT,Hi)=>{"use strict";Hi.exports=function(e,r){return{value:e,done:r}}});var bt=i((VT,ta)=>{"use strict";var Cf=X(),vt=rn(),Ji=B(),ea=ho(),Nf=Z().f,jf=Yi(),$e=Xi(),Mf=ae(),kf=N(),ra="Array Iterator",Df=ea.set,Vf=ea.getterFor(ra);ta.exports=jf(Array,"Array",function(e,r){Df(this,{type:ra,target:Cf(e),index:0,kind:r})},function(){var e=Vf(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(!Mf&&kf&&Zi.name!=="values")try{Nf(Zi,"name",{value:"values"})}catch(e){}});var oa=i((FT,na)=>{"use strict";var Ff=_(),Uf=B(),Gf=Ff("iterator"),Bf=Array.prototype;na.exports=function(e){return e!==void 0&&(Uf.Array===e||Bf[Gf]===e)}});var dt=i((UT,aa)=>{"use strict";var Qf=Ge(),ia=Ae(),$f=Ee(),Wf=B(),zf=_(),Kf=zf("iterator");aa.exports=function(e){if(!$f(e))return ia(e,Kf)||ia(e,"@@iterator")||Wf[Qf(e)]}});var ua=i((GT,sa)=>{"use strict";var Yf=V(),Hf=ie(),Xf=D(),Jf=Pe(),Zf=dt(),ep=TypeError;sa.exports=function(e,r){var t=arguments.length<2?Zf(e):r;if(Hf(t))return Xf(Yf(t,e));throw ep(Jf(e)+" is not iterable")}});var fa=i((BT,ca)=>{"use strict";var rp=V(),la=D(),tp=Ae();ca.exports=function(e,r,t){var n,o;la(e);try{if(n=tp(e,"return"),!n){if(r==="throw")throw t;return t}n=rp(n,e)}catch(a){o=!0,n=a}if(r==="throw")throw t;if(o)throw n;return la(n),t}});var Ta=i((QT,da)=>{"use strict";var np=Wr(),op=V(),ip=D(),ap=Pe(),sp=oa(),up=Xr(),pa=wr(),lp=ua(),cp=dt(),va=fa(),fp=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=np(r,n),f,l,p,b,d,T,y,I=function(g){return f&&va(f,"normal",g),new We(!0,g)},h=function(g){return o?(ip(g),s?c(g[0],g[1],I):c(g[0],g[1])):s?c(g,I):c(g)};if(a)f=e.iterator;else if(u)f=e;else{if(l=cp(e),!l)throw fp(ap(e)+" is not iterable");if(sp(l)){for(p=0,b=up(e);b>p;p++)if(d=h(e[p]),d&&pa(ba,d))return d;return new We(!1)}f=lp(e,l)}for(T=a?e.next:f.next;!(y=op(T,f)).done;){try{d=h(y.value)}catch(g){va(f,"throw",g)}if(typeof d=="object"&&d&&pa(ba,d))return d}return new We(!1)}});var ya=i(($T,ma)=>{"use strict";var pp=_e(),vp=Z(),bp=se();ma.exports=function(e,r,t){var n=pp(r);n in e?vp.f(e,n,bp(0,t)):e[n]=t}});var ha=i(()=>{"use strict";var dp=zr(),Tp=Ta(),mp=ya();dp({target:"Object",stat:!0},{fromEntries:function(r){var t={};return Tp(r,function(n,o){mp(t,n,o)},{AS_ENTRIES:!0}),t}})});var Ia=i((KT,ga)=>{"use strict";bt();ha();var yp=qe();ga.exports=yp.Object.fromEntries});var xa=i((YT,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 hp=xa(),gp=S(),Ip=Ge(),Op=$(),Ea=B(),xp=_(),wa=xp("toStringTag");for(ze in hp)Tt=gp[ze],Ke=Tt&&Tt.prototype,Ke&&Ip(Ke)!==wa&&Op(Ke,wa,ze),Ea[ze]=Ea.Array;var Tt,Ke,ze});var Ra=i((JT,qa)=>{"use strict";var Ep=Ia();Sa();qa.exports=Ep});var Aa=i((ZT,Pa)=>{"use strict";var wp=Ra();Pa.exports=wp});var $a="1.0.38-beta.1";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(),f.remove()});let a=()=>{s(),o()},u=()=>{s(),n()},s=()=>{c&&clearTimeout(c),f.removeEventListener("load",u),f.removeEventListener("error",a)},c;t&&(c=window.setTimeout(a,t));let f=document.createElement("script");f.addEventListener("load",u),f.addEventListener("error",a),f.src=e,document.head.appendChild(f)});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.SamsungBrowser="SamsungBrowser",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=/samsungbrowser/i.test(e)?"SamsungBrowser":void 0,n=/chrome|crios/i.test(e)?"Chrome":void 0,o=/chromium/i.test(e)?"Chromium":void 0,a=/firefox|fxios/i.test(e)?"Firefox":void 0,u=/webkit|safari|khtml/i.test(e)?"Safari":void 0,s=/opr\//i.test(e)?"Opera":void 0,c=/edg/i.test(e)?"Edge":void 0,f=/android/i.test(e)?"Android":void 0,l=/iphone/i.test(e)?"iPhone":void 0,p=/ipad/i.test(e)?"iPad":void 0,b=/ipod/i.test(e)?"iPod":void 0,d=/mac/i.test(e)?"Mac":void 0,T=/webOS|BlackBerry|IEMobile|Opera Mini/i.test(e)?"RestMobile":void 0;return{browser:r||t||a||s||c||n||o||u||"Rest",device:f||l||p||b||T||d||"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=(l=>(l.INVARIANT="Invariant quality",l.Q_144P="144p",l.Q_240P="240p",l.Q_360P="360p",l.Q_480P="480p",l.Q_720P="720p",l.Q_1080P="1080p",l.Q_1440P="1440p",l.Q_2160P="2160p",l.Q_4320P="4320p",l))(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",gs=e=>e.every(r=>!rr(r));function Is(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 lv=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,f=0,l=!1,p=!1,b=!0,d=!r&&r!==0&&typeof window.requestAnimationFrame=="function";t&&(l=!!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 T(m){let q=n,F=o;return n=o=void 0,f=m,u=e.apply(F,q),u}function y(m,q){return d?(s&&window.cancelAnimationFrame(s),window.requestAnimationFrame(m)):setTimeout(m,q)}function I(m){if(d){window.cancelAnimationFrame(m);return}clearTimeout(m)}function h(m){return f=m,s=y(pe,r),l?T(m):u}function g(m){let q=m-c,F=m-f,ht=r-q;return p?Math.min(ht,a-F):ht}function mt(m){let q=m-c,F=m-f;return c===void 0||q>=r||q<0||p&&F>=a}function pe(){let m=Date.now();if(mt(m))return yt(m);s=y(pe,g(m))}function yt(m){return s=void 0,b&&n?T(m):(n=o=void 0,u)}function La(){s!==void 0&&I(s),f=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(...m){let q=Date.now(),F=mt(q);if(n=m,o=this,c=q,F){if(s===void 0)return h(c);if(p)return s=y(pe,r),T(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,f;s.contentBoxSize&&s.contentBoxSize[0]?(f=s.contentBoxSize[0].blockSize,c=s.contentBoxSize[0].inlineSize):s.contentRect&&(c=s.contentRect.width,f=s.contentRect.height),K(c)&&K(f)&&t.next({width:c,height:f})},r));return a.observe(e),()=>a.disconnect()});var Ss=e=>{e.removeAttribute("src"),e.load()};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 qs=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 Rs=e=>new v(r=>{let t=window.setInterval(()=>r.next(),e);return()=>{t&&(window.clearInterval(t),t=void 0)}});var Ps=e=>new v(r=>{e.forEach(t=>r.next(t))});var As=(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 _s={leading:!1,trailing:!0};function _t(e,r=_s){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 Ls={leading:!0,trailing:!1};function Lt(e,r=Ls){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 ge(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 ge(()=>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 Cs=(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))(Cs||{});var Ie=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 Ie{constructor(){super(),this.listeners||Ie.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(f,l){let p;l&&l.signal&&(p=l.signal,delete l.signal);let b=new t(f,l);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,f)=>{let l=a&&a.prototype.isPrototypeOf(c)?c.signal:f?f.signal:void 0;if(l){let p;try{p=new DOMException("Aborted","AbortError")}catch(d){p=new Error("Aborted"),p.name="AbortError"}if(l.aborted)return Promise.reject(p);let b=new Promise((d,T)=>{l.addEventListener("abort",()=>T(p),{once:!0})});return f&&f.signal&&delete f.signal,Promise.race([b,u(c,f)])}return u(c,f)},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,sd=ne?Ft.Request:window.Request,ud=ne?te:window.AbortController,ld=ne?H:window.AbortSignal;var _a=Qa(Aa(),1);var Sp=(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))(Sp||{}),qp="vk.com",rm=(e,r,t)=>Te(void 0,null,function*(){let n=new URL(`https://${qp}/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 Rp(a,t)}),Rp=(e,r)=>(0,_a.default)(Object.entries(e.keys).map(([t,n])=>[t.substring(`${r}_`.length),Pp(n)])),Pp=e=>Array.isArray(e)?e[0]:e;var Ap=(t=>(t.RU="ru",t.EN="en",t))(Ap||{});export{wt as CurrentClientBrowser,St as CurrentClientDevice,Cs as ErrorCategory,Ap as InterfaceLanguage,Ye as Logger,v as Observable,k as Subject,E as Subscription,$a as VERSION,Sp as VKNumericLanguage,he as ValueSubject,Ze as VideoQuality,Za as abortable,Xa as addScript,gs as areQualitiesExact,Ha as assertEmptyArray,L as assertNever,za as assertNonNullable,Ya as assertNotEmptyArray,Ka as assertNullable,Is as assertQualityIsExact,At as buffer,Wa as checkNever,Ss as clearVideoElement,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,As as fromEvent,me as getCurrentBrowser,is as getExponentialDelay,Ts as getHighestQuality,rs as getIOSVersion,Rs 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,rm as loadVKLangPack,ge as map,Mt as mapTo,Pt as merge,U as noop,Ja as now,Ps as observableFrom,ws as observeElementSize,kt as once,Dt as pairwise,Je as safeStorage,Vt as tap,Lt as throttle,nr as throttleFn,lv as timeCodeToString,qs as timeout,ms as videoHeightToQuality,hs as videoQualityToHeight,ys as videoSizeToQuality};
package/es2018.cjs.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @vkontakte/videoplayer-shared v1.0.38-beta.0
3
- * Wed, 07 Aug 2024 14:12:32 GMT
2
+ * @vkontakte/videoplayer-shared v1.0.38-beta.1
3
+ * Thu, 08 Aug 2024 11:57:05 GMT
4
4
  * https://st.mycdn.me/static/vkontakte-videoplayer/1-0-38/doc/
5
5
  */
6
- "use strict";var j=Object.defineProperty;var at=Object.getOwnPropertyDescriptor;var lt=Object.getOwnPropertyNames;var ut=Object.prototype.hasOwnProperty;var me=(t,e)=>{for(var r in e)j(t,r,{get:e[r],enumerable:!0})},ct=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of lt(e))!ut.call(t,i)&&i!==r&&j(t,i,{get:()=>e[i],enumerable:!(n=at(e,i))||n.enumerable});return t};var pt=t=>ct(j({},"__esModule",{value:!0}),t);var St={};me(St,{CurrentClientBrowser:()=>W,CurrentClientDevice:()=>G,ErrorCategory:()=>Je,InterfaceLanguage:()=>et,Logger:()=>V,Observable:()=>a,Subject:()=>x,Subscription:()=>m,VERSION:()=>Te,VKNumericLanguage:()=>Ze,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,clearVideoElement:()=>qe,cloneDeep:()=>We,cloneDeepWith:()=>R,combine:()=>H,debounce:()=>J,debounceFn:()=>F,detectEmbed:()=>Pe,fillWithDefault:()=>je,filter:()=>re,filterChanged:()=>oe,fromEvent:()=>Ye,getCurrentBrowser:()=>A,getExponentialDelay:()=>Le,getHighestQuality:()=>Qe,getIOSVersion:()=>Ae,interval:()=>Ke,isAndroid:()=>Re,isHigher:()=>Me,isHigherOrEqual:()=>Ne,isIOS:()=>Se,isInvariantQuality:()=>B,isLower:()=>U,isLowerOrEqual:()=>Ve,isMacLike:()=>Ce,isMobile:()=>ke,isNonNullable:()=>y,isNullable:()=>Q,loadVKLangPack:()=>Ot,map:()=>k,mapTo:()=>se,merge:()=>K,noop:()=>h,now:()=>we,observableFrom:()=>$e,observeElementSize:()=>Ge,once:()=>ae,pairwise:()=>ue,safeStorage:()=>_,tap:()=>pe,throttle:()=>ee,throttleFn:()=>z,timeCodeToString:()=>It,timeout:()=>He,videoHeightToQuality:()=>De,videoQualityToHeight:()=>Be,videoSizeToQuality:()=>Ue});module.exports=pt(St);var Te="1.0.38-beta.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:()=>vt,get:()=>dt,has:()=>mt,isPersistent:()=>bt,remove:()=>Tt,set:()=>ft});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},bt=()=>w()===0,dt=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)}},ft=(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)}},mt=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}},Tt=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)}},vt=()=>{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 It=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 tt(p){if(L){window.cancelAnimationFrame(p);return}clearTimeout(p)}function rt(p){return b=p,o=P(M,e),c?S(p):l}function nt(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,nt(p))}function de(p){return o=void 0,E&&n?S(p):(n=i=void 0,l)}function ot(){o!==void 0&&tt(o),b=0,n=u=i=o=void 0}function it(){return o===void 0?l:de(Date.now())}function st(){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 rt(u);if(d)return o=P(M,e),S(u)}return o===void 0&&(o=P(M,e)),l}return N.cancel=ot,N.flush=it,N.pending=st,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 xt=300,Ge=(t,e=xt)=>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 qe=t=>{t.removeAttribute("src"),t.load()};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 He=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 Ke=t=>new a(e=>{let r=window.setInterval(()=>e.next(),t);return()=>{r&&(window.clearInterval(r),r=void 0)}});var $e=t=>new a(e=>{t.forEach(r=>e.next(r))});var Ye=(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 ht={leading:!1,trailing:!0};function J(t,e=ht){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 gt={leading:!0,trailing:!1};function ee(t,e=gt){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 Xe={},ne=class{constructor(e,r){this.destination=e;this.predicate=r;this.lastValue=Xe}next(e){let r;try{r=this.lastValue===Xe||!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 Je=(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))(Je||{});var Ze=(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))(Ze||{}),yt="vk.com",Ot=async(t,e,r)=>{let n=new URL(`https://${yt}/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 wt(s,r)},wt=(t,e)=>Object.fromEntries(Object.entries(t.keys).map(([r,n])=>[r.substring(`${e}_`.length),Et(n)])),Et=t=>Array.isArray(t)?t[0]:t;var et=(r=>(r.RU="ru",r.EN="en",r))(et||{});
6
+ "use strict";var ps=Object.create;var me=Object.defineProperty;var vs=Object.getOwnPropertyDescriptor;var bs=Object.getOwnPropertyNames;var ds=Object.getPrototypeOf,Ts=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 bs(r))!Ts.call(e,o)&&o!==t&&me(e,o,{get:()=>r[o],enumerable:!(n=vs(r,o))||n.enumerable});return e};var ms=(e,r,t)=>(t=e!=null?ps(ds(e)):{},_t(r||!e||!e.__esModule?me(t,"default",{value:e,enumerable:!0}):t,e)),ys=e=>_t(me({},"__esModule",{value:!0}),e);var _=i((rd,yn)=>{"use strict";yn.exports=function(e){try{return!!e()}catch(r){return!0}}});var se=i((td,hn)=>{"use strict";var Ps=_();hn.exports=!Ps(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var N=i((nd,On)=>{"use strict";var gn=se(),In=Function.prototype,xr=In.call,As=gn&&In.bind.bind(xr,xr);On.exports=gn?As:function(e){return function(){return xr.apply(e,arguments)}}});var Re=i((od,En)=>{"use strict";var xn=N(),_s=xn({}.toString),Ls=xn("".slice);En.exports=function(e){return Ls(_s(e),8,-1)}});var Sn=i((id,wn)=>{"use strict";var Cs=N(),Ns=_(),js=Re(),Er=Object,Ms=Cs("".split);wn.exports=Ns(function(){return!Er("z").propertyIsEnumerable(0)})?function(e){return js(e)=="String"?Ms(e,""):Er(e)}:Er});var Pe=i((ad,qn)=>{"use strict";qn.exports=function(e){return e==null}});var wr=i((sd,Rn)=>{"use strict";var ks=Pe(),Ds=TypeError;Rn.exports=function(e){if(ks(e))throw Ds("Can't call method on "+e);return e}});var H=i((ud,Pn)=>{"use strict";var Vs=Sn(),Fs=wr();Pn.exports=function(e){return Vs(Fs(e))}});var _n=i((ld,An)=>{"use strict";An.exports=function(){}});var Q=i((cd,Ln)=>{"use strict";Ln.exports={}});var S=i((Cn,Nn)=>{"use strict";var Ae=function(e){return e&&e.Math==Math&&e};Nn.exports=Ae(typeof globalThis=="object"&&globalThis)||Ae(typeof window=="object"&&window)||Ae(typeof self=="object"&&self)||Ae(typeof global=="object"&&global)||function(){return this}()||Cn||Function("return this")()});var qr=i((fd,jn)=>{"use strict";var Sr=typeof document=="object"&&document.all,Us=typeof Sr=="undefined"&&Sr!==void 0;jn.exports={all:Sr,IS_HTMLDDA:Us}});var x=i((pd,kn)=>{"use strict";var Mn=qr(),Gs=Mn.all;kn.exports=Mn.IS_HTMLDDA?function(e){return typeof e=="function"||e===Gs}:function(e){return typeof e=="function"}});var Fn=i((vd,Vn)=>{"use strict";var Bs=S(),Qs=x(),Dn=Bs.WeakMap;Vn.exports=Qs(Dn)&&/native code/.test(String(Dn))});var $=i((bd,Bn)=>{"use strict";var Un=x(),Gn=qr(),$s=Gn.all;Bn.exports=Gn.IS_HTMLDDA?function(e){return typeof e=="object"?e!==null:Un(e)||e===$s}:function(e){return typeof e=="object"?e!==null:Un(e)}});var j=i((dd,Qn)=>{"use strict";var Ws=_();Qn.exports=!Ws(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var Pr=i((Td,Wn)=>{"use strict";var zs=S(),$n=$(),Rr=zs.document,Ks=$n(Rr)&&$n(Rr.createElement);Wn.exports=function(e){return Ks?Rr.createElement(e):{}}});var Ar=i((md,zn)=>{"use strict";var Ys=j(),Hs=_(),Xs=Pr();zn.exports=!Ys&&!Hs(function(){return Object.defineProperty(Xs("div"),"a",{get:function(){return 7}}).a!=7})});var _r=i((yd,Kn)=>{"use strict";var Js=j(),Zs=_();Kn.exports=Js&&Zs(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})});var V=i((hd,Yn)=>{"use strict";var eu=$(),ru=String,tu=TypeError;Yn.exports=function(e){if(eu(e))return e;throw tu(ru(e)+" is not an object")}});var F=i((gd,Hn)=>{"use strict";var nu=se(),_e=Function.prototype.call;Hn.exports=nu?_e.bind(_e):function(){return _e.apply(_e,arguments)}});var Le=i((Id,Xn)=>{"use strict";Xn.exports={}});var Nr=i((Od,Zn)=>{"use strict";var Lr=Le(),Cr=S(),ou=x(),Jn=function(e){return ou(e)?e:void 0};Zn.exports=function(e,r){return arguments.length<2?Jn(Lr[e])||Jn(Cr[e]):Lr[e]&&Lr[e][r]||Cr[e]&&Cr[e][r]}});var jr=i((xd,eo)=>{"use strict";var iu=N();eo.exports=iu({}.isPrototypeOf)});var to=i((Ed,ro)=>{"use strict";ro.exports=typeof navigator!="undefined"&&String(navigator.userAgent)||""});var lo=i((wd,uo)=>{"use strict";var so=S(),Mr=to(),no=so.process,oo=so.Deno,io=no&&no.versions||oo&&oo.version,ao=io&&io.v8,R,Ce;ao&&(R=ao.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])));uo.exports=Ce});var kr=i((Sd,fo)=>{"use strict";var co=lo(),au=_(),su=S(),uu=su.String;fo.exports=!!Object.getOwnPropertySymbols&&!au(function(){var e=Symbol();return!uu(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&co&&co<41})});var Dr=i((qd,po)=>{"use strict";var lu=kr();po.exports=lu&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Vr=i((Rd,vo)=>{"use strict";var cu=Nr(),fu=x(),pu=jr(),vu=Dr(),bu=Object;vo.exports=vu?function(e){return typeof e=="symbol"}:function(e){var r=cu("Symbol");return fu(r)&&pu(r.prototype,bu(e))}});var Ne=i((Pd,bo)=>{"use strict";var du=String;bo.exports=function(e){try{return du(e)}catch(r){return"Object"}}});var ue=i((Ad,To)=>{"use strict";var Tu=x(),mu=Ne(),yu=TypeError;To.exports=function(e){if(Tu(e))return e;throw yu(mu(e)+" is not a function")}});var je=i((_d,mo)=>{"use strict";var hu=ue(),gu=Pe();mo.exports=function(e,r){var t=e[r];return gu(t)?void 0:hu(t)}});var ho=i((Ld,yo)=>{"use strict";var Fr=F(),Ur=x(),Gr=$(),Iu=TypeError;yo.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((Cd,go)=>{"use strict";go.exports=!0});var xo=i((Nd,Oo)=>{"use strict";var Io=S(),Ou=Object.defineProperty;Oo.exports=function(e,r){try{Ou(Io,e,{value:r,configurable:!0,writable:!0})}catch(t){Io[e]=r}return r}});var Br=i((jd,wo)=>{"use strict";var xu=S(),Eu=xo(),Eo="__core-js_shared__",wu=xu[Eo]||Eu(Eo,{});wo.exports=wu});var Qr=i((Md,qo)=>{"use strict";var Su=le(),So=Br();(qo.exports=function(e,r){return So[e]||(So[e]=r!==void 0?r:{})})("versions",[]).push({version:"3.31.0",mode:Su?"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((kd,Ro)=>{"use strict";var qu=wr(),Ru=Object;Ro.exports=function(e){return Ru(qu(e))}});var M=i((Dd,Po)=>{"use strict";var Pu=N(),Au=$r(),_u=Pu({}.hasOwnProperty);Po.exports=Object.hasOwn||function(r,t){return _u(Au(r),t)}});var Wr=i((Vd,Ao)=>{"use strict";var Lu=N(),Cu=0,Nu=Math.random(),ju=Lu(1 .toString);Ao.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+ju(++Cu+Nu,36)}});var L=i((Fd,Lo)=>{"use strict";var Mu=S(),ku=Qr(),_o=M(),Du=Wr(),Vu=kr(),Fu=Dr(),X=Mu.Symbol,zr=ku("wks"),Uu=Fu?X.for||X:X&&X.withoutSetter||Du;Lo.exports=function(e){return _o(zr,e)||(zr[e]=Vu&&_o(X,e)?X[e]:Uu("Symbol."+e)),zr[e]}});var Mo=i((Ud,jo)=>{"use strict";var Gu=F(),Co=$(),No=Vr(),Bu=je(),Qu=ho(),$u=L(),Wu=TypeError,zu=$u("toPrimitive");jo.exports=function(e,r){if(!Co(e)||No(e))return e;var t=Bu(e,zu),n;if(t){if(r===void 0&&(r="default"),n=Gu(t,e,r),!Co(n)||No(n))return n;throw Wu("Can't convert object to primitive value")}return r===void 0&&(r="number"),Qu(e,r)}});var Me=i((Gd,ko)=>{"use strict";var Ku=Mo(),Yu=Vr();ko.exports=function(e){var r=Ku(e,"string");return Yu(r)?r:r+""}});var J=i(Vo=>{"use strict";var Hu=j(),Xu=Ar(),Ju=_r(),ke=V(),Do=Me(),Zu=TypeError,Kr=Object.defineProperty,el=Object.getOwnPropertyDescriptor,Yr="enumerable",Hr="configurable",Xr="writable";Vo.f=Hu?Ju?function(r,t,n){if(ke(r),t=Do(t),ke(n),typeof r=="function"&&t==="prototype"&&"value"in n&&Xr in n&&!n[Xr]){var o=el(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=Do(t),ke(n),Xu)try{return Kr(r,t,n)}catch(o){}if("get"in n||"set"in n)throw Zu("Accessors not supported");return"value"in n&&(r[t]=n.value),r}});var ce=i((Qd,Fo)=>{"use strict";Fo.exports=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}});var W=i(($d,Uo)=>{"use strict";var rl=j(),tl=J(),nl=ce();Uo.exports=rl?function(e,r,t){return tl.f(e,r,nl(1,t))}:function(e,r,t){return e[r]=t,e}});var De=i((Wd,Bo)=>{"use strict";var ol=Qr(),il=Wr(),Go=ol("keys");Bo.exports=function(e){return Go[e]||(Go[e]=il(e))}});var Ve=i((zd,Qo)=>{"use strict";Qo.exports={}});var Ko=i((Kd,zo)=>{"use strict";var al=Fn(),Wo=S(),sl=$(),ul=W(),Jr=M(),Zr=Br(),ll=De(),cl=Ve(),$o="Object already initialized",et=Wo.TypeError,fl=Wo.WeakMap,Fe,fe,Ue,pl=function(e){return Ue(e)?fe(e):Fe(e,{})},vl=function(e){return function(r){var t;if(!sl(r)||(t=fe(r)).type!==e)throw et("Incompatible receiver, "+e+" required");return t}};al||Zr.state?(P=Zr.state||(Zr.state=new fl),P.get=P.get,P.has=P.has,P.set=P.set,Fe=function(e,r){if(P.has(e))throw et($o);return r.facade=e,P.set(e,r),r},fe=function(e){return P.get(e)||{}},Ue=function(e){return P.has(e)}):(z=ll("state"),cl[z]=!0,Fe=function(e,r){if(Jr(e,z))throw et($o);return r.facade=e,ul(e,z,r),r},fe=function(e){return Jr(e,z)?e[z]:{}},Ue=function(e){return Jr(e,z)});var P,z;zo.exports={set:Fe,get:fe,has:Ue,enforce:pl,getterFor:vl}});var Zo=i((Yd,Jo)=>{"use strict";var bl=se(),Xo=Function.prototype,Yo=Xo.apply,Ho=Xo.call;Jo.exports=typeof Reflect=="object"&&Reflect.apply||(bl?Ho.bind(Yo):function(){return Ho.apply(Yo,arguments)})});var rt=i((Hd,ei)=>{"use strict";var dl=Re(),Tl=N();ei.exports=function(e){if(dl(e)==="Function")return Tl(e)}});var oi=i(ni=>{"use strict";var ri={}.propertyIsEnumerable,ti=Object.getOwnPropertyDescriptor,ml=ti&&!ri.call({1:2},1);ni.f=ml?function(r){var t=ti(this,r);return!!t&&t.enumerable}:ri});var si=i(ai=>{"use strict";var yl=j(),hl=F(),gl=oi(),Il=ce(),Ol=H(),xl=Me(),El=M(),wl=Ar(),ii=Object.getOwnPropertyDescriptor;ai.f=yl?ii:function(r,t){if(r=Ol(r),t=xl(t),wl)try{return ii(r,t)}catch(n){}if(El(r,t))return Il(!hl(gl.f,r,t),r[t])}});var li=i((Zd,ui)=>{"use strict";var Sl=_(),ql=x(),Rl=/#|\.prototype\./,pe=function(e,r){var t=Al[Pl(e)];return t==Ll?!0:t==_l?!1:ql(r)?Sl(r):!!r},Pl=pe.normalize=function(e){return String(e).replace(Rl,".").toLowerCase()},Al=pe.data={},_l=pe.NATIVE="N",Ll=pe.POLYFILL="P";ui.exports=pe});var tt=i((eT,fi)=>{"use strict";var ci=rt(),Cl=ue(),Nl=se(),jl=ci(ci.bind);fi.exports=function(e,r){return Cl(e),r===void 0?e:Nl?jl(e,r):function(){return e.apply(r,arguments)}}});var nt=i((rT,vi)=>{"use strict";var Ge=S(),Ml=Zo(),kl=rt(),Dl=x(),Vl=si().f,Fl=li(),Z=Le(),Ul=tt(),ee=W(),pi=M(),Gl=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 Ml(e,this,arguments)};return r.prototype=e.prototype,r};vi.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,f,l,p,b,d,T,y,I,h;for(b in r)f=Fl(n?b:t+(o?".":"#")+b,e.forced),l=!f&&u&&pi(u,b),T=s[b],l&&(e.dontCallGetSet?(h=Vl(u,b),y=h&&h.value):y=u[b]),d=l&&y?y:r[b],!(l&&typeof T==typeof d)&&(e.bind&&l?I=Ul(d,Ge):e.wrap&&l?I=Gl(d):a&&Dl(d)?I=kl(d):I=d,(e.sham||d&&d.sham||T&&T.sham)&&ee(I,"sham",!0),ee(s,b,I),a&&(p=t+"Prototype",pi(Z,p)||ee(Z,p,{}),ee(Z[p],b,d),e.real&&c&&(f||!c[b])&&ee(c,b,d)))}});var Ti=i((tT,di)=>{"use strict";var ot=j(),Bl=M(),bi=Function.prototype,Ql=ot&&Object.getOwnPropertyDescriptor,it=Bl(bi,"name"),$l=it&&function(){}.name==="something",Wl=it&&(!ot||ot&&Ql(bi,"name").configurable);di.exports={EXISTS:it,PROPER:$l,CONFIGURABLE:Wl}});var yi=i((nT,mi)=>{"use strict";var zl=Math.ceil,Kl=Math.floor;mi.exports=Math.trunc||function(r){var t=+r;return(t>0?Kl:zl)(t)}});var at=i((oT,hi)=>{"use strict";var Yl=yi();hi.exports=function(e){var r=+e;return r!==r||r===0?0:Yl(r)}});var Ii=i((iT,gi)=>{"use strict";var Hl=at(),Xl=Math.max,Jl=Math.min;gi.exports=function(e,r){var t=Hl(e);return t<0?Xl(t+r,0):Jl(t,r)}});var xi=i((aT,Oi)=>{"use strict";var Zl=at(),ec=Math.min;Oi.exports=function(e){return e>0?ec(Zl(e),9007199254740991):0}});var st=i((sT,Ei)=>{"use strict";var rc=xi();Ei.exports=function(e){return rc(e.length)}});var qi=i((uT,Si)=>{"use strict";var tc=H(),nc=Ii(),oc=st(),wi=function(e){return function(r,t,n){var o=tc(r),a=oc(o),u=nc(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}};Si.exports={includes:wi(!0),indexOf:wi(!1)}});var Ai=i((lT,Pi)=>{"use strict";var ic=N(),ut=M(),ac=H(),sc=qi().indexOf,uc=Ve(),Ri=ic([].push);Pi.exports=function(e,r){var t=ac(e),n=0,o=[],a;for(a in t)!ut(uc,a)&&ut(t,a)&&Ri(o,a);for(;r.length>n;)ut(t,a=r[n++])&&(~sc(o,a)||Ri(o,a));return o}});var lt=i((cT,_i)=>{"use strict";_i.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var Ci=i((fT,Li)=>{"use strict";var lc=Ai(),cc=lt();Li.exports=Object.keys||function(r){return lc(r,cc)}});var ji=i(Ni=>{"use strict";var fc=j(),pc=_r(),vc=J(),bc=V(),dc=H(),Tc=Ci();Ni.f=fc&&!pc?Object.defineProperties:function(r,t){bc(r);for(var n=dc(t),o=Tc(t),a=o.length,u=0,s;a>u;)vc.f(r,s=o[u++],n[s]);return r}});var ki=i((vT,Mi)=>{"use strict";var mc=Nr();Mi.exports=mc("document","documentElement")});var vt=i((bT,Qi)=>{"use strict";var yc=V(),hc=ji(),Di=lt(),gc=Ve(),Ic=ki(),Oc=Pr(),xc=De(),Vi=">",Fi="<",ft="prototype",pt="script",Gi=xc("IE_PROTO"),ct=function(){},Bi=function(e){return Fi+pt+Vi+e+Fi+"/"+pt+Vi},Ui=function(e){e.write(Bi("")),e.close();var r=e.parentWindow.Object;return e=null,r},Ec=function(){var e=Oc("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(Bi("document.F=Object")),t.close(),t.F},Be,Qe=function(){try{Be=new ActiveXObject("htmlfile")}catch(r){}Qe=typeof document!="undefined"?document.domain&&Be?Ui(Be):Ec():Ui(Be);for(var e=Di.length;e--;)delete Qe[ft][Di[e]];return Qe()};gc[Gi]=!0;Qi.exports=Object.create||function(r,t){var n;return r!==null?(ct[ft]=yc(r),n=new ct,ct[ft]=null,n[Gi]=r):n=Qe(),t===void 0?n:hc.f(n,t)}});var Wi=i((dT,$i)=>{"use strict";var wc=_();$i.exports=!wc(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})});var dt=i((TT,Ki)=>{"use strict";var Sc=M(),qc=x(),Rc=$r(),Pc=De(),Ac=Wi(),zi=Pc("IE_PROTO"),bt=Object,_c=bt.prototype;Ki.exports=Ac?bt.getPrototypeOf:function(e){var r=Rc(e);if(Sc(r,zi))return r[zi];var t=r.constructor;return qc(t)&&r instanceof t?t.prototype:r instanceof bt?_c:null}});var Tt=i((mT,Yi)=>{"use strict";var Lc=W();Yi.exports=function(e,r,t,n){return n&&n.enumerable?e[r]=t:Lc(e,r,t),e}});var gt=i((yT,Ji)=>{"use strict";var Cc=_(),Nc=x(),jc=$(),Mc=vt(),Hi=dt(),kc=Tt(),Dc=L(),Vc=le(),ht=Dc("iterator"),Xi=!1,k,mt,yt;[].keys&&(yt=[].keys(),"next"in yt?(mt=Hi(Hi(yt)),mt!==Object.prototype&&(k=mt)):Xi=!0);var Fc=!jc(k)||Cc(function(){var e={};return k[ht].call(e)!==e});Fc?k={}:Vc&&(k=Mc(k));Nc(k[ht])||kc(k,ht,function(){return this});Ji.exports={IteratorPrototype:k,BUGGY_SAFARI_ITERATORS:Xi}});var $e=i((hT,ea)=>{"use strict";var Uc=L(),Gc=Uc("toStringTag"),Zi={};Zi[Gc]="z";ea.exports=String(Zi)==="[object z]"});var ze=i((gT,ra)=>{"use strict";var Bc=$e(),Qc=x(),We=Re(),$c=L(),Wc=$c("toStringTag"),zc=Object,Kc=We(function(){return arguments}())=="Arguments",Yc=function(e,r){try{return e[r]}catch(t){}};ra.exports=Bc?We:function(e){var r,t,n;return e===void 0?"Undefined":e===null?"Null":typeof(t=Yc(r=zc(e),Wc))=="string"?t:Kc?We(r):(n=We(r))=="Object"&&Qc(r.callee)?"Arguments":n}});var na=i((IT,ta)=>{"use strict";var Hc=$e(),Xc=ze();ta.exports=Hc?{}.toString:function(){return"[object "+Xc(this)+"]"}});var It=i((OT,ia)=>{"use strict";var Jc=$e(),Zc=J().f,ef=W(),rf=M(),tf=na(),nf=L(),oa=nf("toStringTag");ia.exports=function(e,r,t,n){if(e){var o=t?e:e.prototype;rf(o,oa)||Zc(o,oa,{configurable:!0,value:r}),n&&!Jc&&ef(o,"toString",tf)}}});var sa=i((xT,aa)=>{"use strict";var of=gt().IteratorPrototype,af=vt(),sf=ce(),uf=It(),lf=Q(),cf=function(){return this};aa.exports=function(e,r,t,n){var o=r+" Iterator";return e.prototype=af(of,{next:sf(+!n,t)}),uf(e,o,!1,!0),lf[o]=cf,e}});var la=i((ET,ua)=>{"use strict";var ff=N(),pf=ue();ua.exports=function(e,r,t){try{return ff(pf(Object.getOwnPropertyDescriptor(e,r)[t]))}catch(n){}}});var fa=i((wT,ca)=>{"use strict";var vf=x(),bf=String,df=TypeError;ca.exports=function(e){if(typeof e=="object"||vf(e))return e;throw df("Can't set "+bf(e)+" as a prototype")}});var va=i((ST,pa)=>{"use strict";var Tf=la(),mf=V(),yf=fa();pa.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,r={},t;try{t=Tf(Object.prototype,"__proto__","set"),t(r,[]),e=r instanceof Array}catch(n){}return function(o,a){return mf(o),yf(a),e?t(o,a):o.__proto__=a,o}}():void 0)});var Ea=i((qT,xa)=>{"use strict";var hf=nt(),gf=F(),Ke=le(),Ia=Ti(),If=x(),Of=sa(),ba=dt(),da=va(),xf=It(),Ef=W(),Ot=Tt(),wf=L(),Ta=Q(),Oa=gt(),Sf=Ia.PROPER,qf=Ia.CONFIGURABLE,ma=Oa.IteratorPrototype,Ye=Oa.BUGGY_SAFARI_ITERATORS,ve=wf("iterator"),ya="keys",be="values",ha="entries",ga=function(){return this};xa.exports=function(e,r,t,n,o,a,u){Of(t,r,n);var s=function(h){if(h===o&&b)return b;if(!Ye&&h in l)return l[h];switch(h){case ya:return function(){return new t(this,h)};case be:return function(){return new t(this,h)};case ha:return function(){return new t(this,h)}}return function(){return new t(this)}},c=r+" Iterator",f=!1,l=e.prototype,p=l[ve]||l["@@iterator"]||o&&l[o],b=!Ye&&p||s(o),d=r=="Array"&&l.entries||p,T,y,I;if(d&&(T=ba(d.call(new e)),T!==Object.prototype&&T.next&&(!Ke&&ba(T)!==ma&&(da?da(T,ma):If(T[ve])||Ot(T,ve,ga)),xf(T,c,!0,!0),Ke&&(Ta[c]=ga))),Sf&&o==be&&p&&p.name!==be&&(!Ke&&qf?Ef(l,"name",be):(f=!0,b=function(){return gf(p,this)})),o)if(y={values:s(be),keys:a?b:s(ya),entries:s(ha)},u)for(I in y)(Ye||f||!(I in l))&&Ot(l,I,y[I]);else hf({target:r,proto:!0,forced:Ye||f},y);return(!Ke||u)&&l[ve]!==b&&Ot(l,ve,b,{name:o}),Ta[r]=b,y}});var Sa=i((RT,wa)=>{"use strict";wa.exports=function(e,r){return{value:e,done:r}}});var Et=i((PT,_a)=>{"use strict";var Rf=H(),xt=_n(),qa=Q(),Pa=Ko(),Pf=J().f,Af=Ea(),He=Sa(),_f=le(),Lf=j(),Aa="Array Iterator",Cf=Pa.set,Nf=Pa.getterFor(Aa);_a.exports=Af(Array,"Array",function(e,r){Cf(this,{type:Aa,target:Rf(e),index:0,kind:r})},function(){var e=Nf(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 Ra=qa.Arguments=qa.Array;xt("keys");xt("values");xt("entries");if(!_f&&Lf&&Ra.name!=="values")try{Pf(Ra,"name",{value:"values"})}catch(e){}});var Ca=i((AT,La)=>{"use strict";var jf=L(),Mf=Q(),kf=jf("iterator"),Df=Array.prototype;La.exports=function(e){return e!==void 0&&(Mf.Array===e||Df[kf]===e)}});var wt=i((_T,ja)=>{"use strict";var Vf=ze(),Na=je(),Ff=Pe(),Uf=Q(),Gf=L(),Bf=Gf("iterator");ja.exports=function(e){if(!Ff(e))return Na(e,Bf)||Na(e,"@@iterator")||Uf[Vf(e)]}});var ka=i((LT,Ma)=>{"use strict";var Qf=F(),$f=ue(),Wf=V(),zf=Ne(),Kf=wt(),Yf=TypeError;Ma.exports=function(e,r){var t=arguments.length<2?Kf(e):r;if($f(t))return Wf(Qf(t,e));throw Yf(zf(e)+" is not iterable")}});var Fa=i((CT,Va)=>{"use strict";var Hf=F(),Da=V(),Xf=je();Va.exports=function(e,r,t){var n,o;Da(e);try{if(n=Xf(e,"return"),!n){if(r==="throw")throw t;return t}n=Hf(n,e)}catch(a){o=!0,n=a}if(r==="throw")throw t;if(o)throw n;return Da(n),t}});var $a=i((NT,Qa)=>{"use strict";var Jf=tt(),Zf=F(),ep=V(),rp=Ne(),tp=Ca(),np=st(),Ua=jr(),op=ka(),ip=wt(),Ga=Fa(),ap=TypeError,Xe=function(e,r){this.stopped=e,this.result=r},Ba=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=Jf(r,n),f,l,p,b,d,T,y,I=function(g){return f&&Ga(f,"normal",g),new Xe(!0,g)},h=function(g){return o?(ep(g),s?c(g[0],g[1],I):c(g[0],g[1])):s?c(g,I):c(g)};if(a)f=e.iterator;else if(u)f=e;else{if(l=ip(e),!l)throw ap(rp(e)+" is not iterable");if(tp(l)){for(p=0,b=np(e);b>p;p++)if(d=h(e[p]),d&&Ua(Ba,d))return d;return new Xe(!1)}f=op(e,l)}for(T=a?e.next:f.next;!(y=Zf(T,f)).done;){try{d=h(y.value)}catch(g){Ga(f,"throw",g)}if(typeof d=="object"&&d&&Ua(Ba,d))return d}return new Xe(!1)}});var za=i((jT,Wa)=>{"use strict";var sp=Me(),up=J(),lp=ce();Wa.exports=function(e,r,t){var n=sp(r);n in e?up.f(e,n,lp(0,t)):e[n]=t}});var Ka=i(()=>{"use strict";var cp=nt(),fp=$a(),pp=za();cp({target:"Object",stat:!0},{fromEntries:function(r){var t={};return fp(r,function(n,o){pp(t,n,o)},{AS_ENTRIES:!0}),t}})});var Ha=i((DT,Ya)=>{"use strict";Et();Ka();var vp=Le();Ya.exports=vp.Object.fromEntries});var Ja=i((VT,Xa)=>{"use strict";Xa.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 rs=i(()=>{"use strict";Et();var bp=Ja(),dp=S(),Tp=ze(),mp=W(),Za=Q(),yp=L(),es=yp("toStringTag");for(Je in bp)St=dp[Je],Ze=St&&St.prototype,Ze&&Tp(Ze)!==es&&mp(Ze,es,Je),Za[Je]=Za.Array;var St,Ze,Je});var ns=i((GT,ts)=>{"use strict";var hp=Ha();rs();ts.exports=hp});var is=i((BT,os)=>{"use strict";var gp=ns();os.exports=gp});var wp={};At(wp,{CurrentClientBrowser:()=>er,CurrentClientDevice:()=>rr,ErrorCategory:()=>dn,InterfaceLanguage:()=>us,Logger:()=>ye,Observable:()=>v,Subject:()=>C,Subscription:()=>E,VERSION:()=>Lt,VKNumericLanguage:()=>ss,ValueSubject:()=>ne,VideoQuality:()=>Ie,abortable:()=>Ut,addScript:()=>Dt,areQualitiesExact:()=>nn,assertEmptyArray:()=>kt,assertNever:()=>A,assertNonNullable:()=>Nt,assertNotEmptyArray:()=>Mt,assertNullable:()=>jt,assertQualityIsExact:()=>on,buffer:()=>ar,checkNever:()=>Ct,clearVideoElement:()=>ln,cloneDeep:()=>sn,cloneDeepWith:()=>te,combine:()=>nr,debounce:()=>ur,debounceFn:()=>Ee,detectEmbed:()=>Kt,fillWithDefault:()=>an,filter:()=>pr,filterChanged:()=>br,fromEvent:()=>vn,getCurrentBrowser:()=>re,getExponentialDelay:()=>zt,getHighestQuality:()=>Jt,getIOSVersion:()=>Bt,interval:()=>fn,isAndroid:()=>Qt,isHigher:()=>Yt,isHigherOrEqual:()=>Ht,isIOS:()=>Gt,isInvariantQuality:()=>xe,isLower:()=>Oe,isLowerOrEqual:()=>Xt,isMacLike:()=>$t,isMobile:()=>Wt,isNonNullable:()=>G,isNullable:()=>he,loadVKLangPack:()=>Op,map:()=>oe,mapTo:()=>Tr,merge:()=>or,noop:()=>D,now:()=>Ft,observableFrom:()=>pn,observeElementSize:()=>un,once:()=>mr,pairwise:()=>hr,safeStorage:()=>ge,tap:()=>Ir,throttle:()=>cr,throttleFn:()=>we,timeCodeToString:()=>ws,timeout:()=>cn,videoHeightToQuality:()=>en,videoQualityToHeight:()=>tn,videoSizeToQuality:()=>rn});module.exports=ys(wp);var Lt="1.0.38-beta.1";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(),f.remove()});let a=()=>{s(),o()},u=()=>{s(),n()},s=()=>{c&&clearTimeout(c),f.removeEventListener("load",u),f.removeEventListener("error",a)},c;t&&(c=window.setTimeout(a,t));let f=document.createElement("script");f.addEventListener("load",u),f.addEventListener("error",a),f.src=e,document.head.appendChild(f)});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.SamsungBrowser="SamsungBrowser",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=/samsungbrowser/i.test(e)?"SamsungBrowser":void 0,n=/chrome|crios/i.test(e)?"Chrome":void 0,o=/chromium/i.test(e)?"Chromium":void 0,a=/firefox|fxios/i.test(e)?"Firefox":void 0,u=/webkit|safari|khtml/i.test(e)?"Safari":void 0,s=/opr\//i.test(e)?"Opera":void 0,c=/edg/i.test(e)?"Edge":void 0,f=/android/i.test(e)?"Android":void 0,l=/iphone/i.test(e)?"iPhone":void 0,p=/ipad/i.test(e)?"iPad":void 0,b=/ipod/i.test(e)?"iPod":void 0,d=/mac/i.test(e)?"Mac":void 0,T=/webOS|BlackBerry|IEMobile|Opera Mini/i.test(e)?"RestMobile":void 0;return{browser:r||t||a||s||c||n||o||u||"Rest",device:f||l||p||b||T||d||"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)},Bt=()=>{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",$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 ge={};At(ge,{clear:()=>Es,get:()=>gs,has:()=>Os,isPersistent:()=>hs,remove:()=>xs,set:()=>Is});var O,B,tr=`vk-videoplayer-dummy-key-${Math.random()}`,K=()=>{if(B!==void 0)return B;try{localStorage.setItem(tr,"test"),localStorage.removeItem(tr),B=0}catch(e){if(e instanceof DOMException||e instanceof TypeError)try{sessionStorage.getItem(tr),B=1}catch(r){if(r instanceof DOMException||r instanceof TypeError)B=2;else throw r}else throw e}return B===2&&(O=new Map),B},hs=()=>K()===0,gs=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)}},Os=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}},xs=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)}},Es=()=>{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 Ie=(l=>(l.INVARIANT="Invariant quality",l.Q_144P="144p",l.Q_240P="240p",l.Q_360P="360p",l.Q_480P="480p",l.Q_720P="720p",l.Q_1080P="1080p",l.Q_1440P="1440p",l.Q_2160P="2160p",l.Q_4320P="4320p",l))(Ie||{});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 ws=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,f=0,l=!1,p=!1,b=!0,d=!r&&r!==0&&typeof window.requestAnimationFrame=="function";t&&(l=!!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 T(m){let q=n,U=o;return n=o=void 0,f=m,u=e.apply(U,q),u}function y(m,q){return d?(s&&window.cancelAnimationFrame(s),window.requestAnimationFrame(m)):setTimeout(m,q)}function I(m){if(d){window.cancelAnimationFrame(m);return}clearTimeout(m)}function h(m){return f=m,s=y(de,r),l?T(m):u}function g(m){let q=m-c,U=m-f,Pt=r-q;return p?Math.min(Pt,a-U):Pt}function qt(m){let q=m-c,U=m-f;return c===void 0||q>=r||q<0||p&&U>=a}function de(){let m=Date.now();if(qt(m))return Rt(m);s=y(de,g(m))}function Rt(m){return s=void 0,b&&n?T(m):(n=o=void 0,u)}function ls(){s!==void 0&&I(s),f=0,n=c=o=s=void 0}function cs(){return s===void 0?u:Rt(Date.now())}function fs(){return s!==void 0}function Te(...m){let q=Date.now(),U=qt(q);if(n=m,o=this,c=q,U){if(s===void 0)return h(c);if(p)return s=y(de,r),T(c)}return s===void 0&&(s=y(de,r)),u}return Te.cancel=ls,Te.flush=cs,Te.pending=fs,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 Ss=300,un=(e,r=Ss)=>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,f;s.contentBoxSize&&s.contentBoxSize[0]?(f=s.contentBoxSize[0].blockSize,c=s.contentBoxSize[0].inlineSize):s.contentRect&&(c=s.contentRect.width,f=s.contentRect.height),G(c)&&G(f)&&t.next({width:c,height:f})},r));return a.observe(e),()=>a.disconnect()});var ln=e=>{e.removeAttribute("src"),e.load()};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 cn=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 fn=e=>new v(r=>{let t=window.setInterval(()=>r.next(),e);return()=>{t&&(window.clearInterval(t),t=void 0)}});var pn=e=>new v(r=>{e.forEach(t=>r.next(t))});var vn=(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 qs={leading:!1,trailing:!0};function ur(e,r=qs){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 Rs={leading:!0,trailing:!1};function cr(e,r=Rs){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 bn={},vr=class{constructor(r,t){this.destination=r;this.predicate=t;this.lastValue=bn}next(r){let t;try{t=this.lastValue===bn||!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 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){var t,n;(n=(t=this.destination).error)==null||n.call(t,r)}};var dn=(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))(dn||{});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(f,l){let p;l&&l.signal&&(p=l.signal,delete l.signal);let b=new t(f,l);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,f)=>{let l=a&&a.prototype.isPrototypeOf(c)?c.signal:f?f.signal:void 0;if(l){let p;try{p=new DOMException("Aborted","AbortError")}catch(d){p=new Error("Aborted"),p.name="AbortError"}if(l.aborted)return Promise.reject(p);let b=new Promise((d,T)=>{l.addEventListener("abort",()=>T(p),{once:!0})});return f&&f.signal&&delete f.signal,Promise.race([b,u(c,f)])}return u(c,f)},Request:a}}var ae=qe({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}),Tn=ae?Or({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}):void 0,mn=ae?Tn.fetch:window.fetch,Xb=ae?Tn.Request:window.Request,Jb=ae?ie:window.AbortController,Zb=ae?Y:window.AbortSignal;var as=ms(is(),1),ss=(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))(ss||{}),Ip="vk.com",Op=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 mn(n.toString())).json();return xp(a,t)},xp=(e,r)=>(0,as.default)(Object.entries(e.keys).map(([t,n])=>[t.substring(`${r}_`.length),Ep(n)])),Ep=e=>Array.isArray(e)?e[0]:e;var us=(t=>(t.RU="ru",t.EN="en",t))(us||{});
package/es2018.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @vkontakte/videoplayer-shared v1.0.38-beta.0
3
- * Wed, 07 Aug 2024 14:12:32 GMT
2
+ * @vkontakte/videoplayer-shared v1.0.38-beta.1
3
+ * Thu, 08 Aug 2024 11:57:05 GMT
4
4
  * https://st.mycdn.me/static/vkontakte-videoplayer/1-0-38/doc/
5
5
  */
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.38-beta.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 Kt=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 st=t=>{t.removeAttribute("src"),t.load()};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 at=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 lt=t=>new a(e=>{let r=window.setInterval(()=>e.next(),t);return()=>{r&&(window.clearInterval(r),r=void 0)}});var ut=t=>new a(e=>{t.forEach(r=>e.next(r))});var ct=(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 pt={leading:!1,trailing:!0};function le(t,e=pt){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 bt={leading:!0,trailing:!1};function ue(t,e=bt){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 dt=(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))(dt||{});var ft=(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))(ft||{}),mt="vk.com",Un=async(t,e,r)=>{let n=new URL(`https://${mt}/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 Tt(s,r)},Tt=(t,e)=>Object.fromEntries(Object.entries(t.keys).map(([r,n])=>[r.substring(`${e}_`.length),vt(n)])),vt=t=>Array.isArray(t)?t[0]:t;var It=(r=>(r.RU="ru",r.EN="en",r))(It||{});export{re as CurrentClientBrowser,ne as CurrentClientDevice,dt as ErrorCategory,It as InterfaceLanguage,V as Logger,a as Observable,x as Subject,m as Subscription,Ee as VERSION,ft 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,st as clearVideoElement,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,ct as fromEvent,L as getCurrentBrowser,Ue as getExponentialDelay,Ye as getHighestQuality,Ve as getIOSVersion,lt 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,Un as loadVKLangPack,N as map,de as mapTo,se as merge,g as noop,Pe as now,ut as observableFrom,it as observeElementSize,fe as once,me as pairwise,D as safeStorage,Te as tap,ue as throttle,j as throttleFn,Kt as timeCodeToString,at as timeout,Xe as videoHeightToQuality,Ze as videoQualityToHeight,Je as videoSizeToQuality};
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((Jb,jt)=>{"use strict";jt.exports=function(e){try{return!!e()}catch(r){return!0}}});var ne=i((Zb,Mt)=>{"use strict";var ws=A();Mt.exports=!ws(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var C=i((ed,Vt)=>{"use strict";var kt=ne(),Dt=Function.prototype,cr=Dt.call,Ss=kt&&Dt.bind.bind(cr,cr);Vt.exports=kt?Ss:function(e){return function(){return cr.apply(e,arguments)}}});var he=i((rd,Ut)=>{"use strict";var Ft=C(),qs=Ft({}.toString),Rs=Ft("".slice);Ut.exports=function(e){return Rs(qs(e),8,-1)}});var Bt=i((td,Gt)=>{"use strict";var Ps=C(),As=A(),_s=he(),fr=Object,Ls=Ps("".split);Gt.exports=As(function(){return!fr("z").propertyIsEnumerable(0)})?function(e){return _s(e)=="String"?Ls(e,""):fr(e)}:fr});var ge=i((nd,Qt)=>{"use strict";Qt.exports=function(e){return e==null}});var pr=i((od,$t)=>{"use strict";var Cs=ge(),Ns=TypeError;$t.exports=function(e){if(Cs(e))throw Ns("Can't call method on "+e);return e}});var H=i((id,Wt)=>{"use strict";var js=Bt(),Ms=pr();Wt.exports=function(e){return js(Ms(e))}});var Kt=i((ad,zt)=>{"use strict";zt.exports=function(){}});var B=i((sd,Yt)=>{"use strict";Yt.exports={}});var S=i((Ht,Xt)=>{"use strict";var Ie=function(e){return e&&e.Math==Math&&e};Xt.exports=Ie(typeof globalThis=="object"&&globalThis)||Ie(typeof window=="object"&&window)||Ie(typeof self=="object"&&self)||Ie(typeof global=="object"&&global)||function(){return this}()||Ht||Function("return this")()});var br=i((ud,Jt)=>{"use strict";var vr=typeof document=="object"&&document.all,ks=typeof vr=="undefined"&&vr!==void 0;Jt.exports={all:vr,IS_HTMLDDA:ks}});var x=i((ld,en)=>{"use strict";var Zt=br(),Ds=Zt.all;en.exports=Zt.IS_HTMLDDA?function(e){return typeof e=="function"||e===Ds}:function(e){return typeof e=="function"}});var nn=i((cd,tn)=>{"use strict";var Vs=S(),Fs=x(),rn=Vs.WeakMap;tn.exports=Fs(rn)&&/native code/.test(String(rn))});var Q=i((fd,sn)=>{"use strict";var on=x(),an=br(),Us=an.all;sn.exports=an.IS_HTMLDDA?function(e){return typeof e=="object"?e!==null:on(e)||e===Us}:function(e){return typeof e=="object"?e!==null:on(e)}});var N=i((pd,un)=>{"use strict";var Gs=A();un.exports=!Gs(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var Tr=i((vd,cn)=>{"use strict";var Bs=S(),ln=Q(),dr=Bs.document,Qs=ln(dr)&&ln(dr.createElement);cn.exports=function(e){return Qs?dr.createElement(e):{}}});var mr=i((bd,fn)=>{"use strict";var $s=N(),Ws=A(),zs=Tr();fn.exports=!$s&&!Ws(function(){return Object.defineProperty(zs("div"),"a",{get:function(){return 7}}).a!=7})});var yr=i((dd,pn)=>{"use strict";var Ks=N(),Ys=A();pn.exports=Ks&&Ys(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})});var D=i((Td,vn)=>{"use strict";var Hs=Q(),Xs=String,Js=TypeError;vn.exports=function(e){if(Hs(e))return e;throw Js(Xs(e)+" is not an object")}});var V=i((md,bn)=>{"use strict";var Zs=ne(),Oe=Function.prototype.call;bn.exports=Zs?Oe.bind(Oe):function(){return Oe.apply(Oe,arguments)}});var xe=i((yd,dn)=>{"use strict";dn.exports={}});var Ir=i((hd,mn)=>{"use strict";var hr=xe(),gr=S(),eu=x(),Tn=function(e){return eu(e)?e:void 0};mn.exports=function(e,r){return arguments.length<2?Tn(hr[e])||Tn(gr[e]):hr[e]&&hr[e][r]||gr[e]&&gr[e][r]}});var Or=i((gd,yn)=>{"use strict";var ru=C();yn.exports=ru({}.isPrototypeOf)});var gn=i((Id,hn)=>{"use strict";hn.exports=typeof navigator!="undefined"&&String(navigator.userAgent)||""});var qn=i((Od,Sn)=>{"use strict";var wn=S(),xr=gn(),In=wn.process,On=wn.Deno,xn=In&&In.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((xd,Pn)=>{"use strict";var Rn=qn(),tu=A(),nu=S(),ou=nu.String;Pn.exports=!!Object.getOwnPropertySymbols&&!tu(function(){var e=Symbol();return!ou(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Rn&&Rn<41})});var wr=i((Ed,An)=>{"use strict";var iu=Er();An.exports=iu&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Sr=i((wd,_n)=>{"use strict";var au=Ir(),su=x(),uu=Or(),lu=wr(),cu=Object;_n.exports=lu?function(e){return typeof e=="symbol"}:function(e){var r=au("Symbol");return su(r)&&uu(r.prototype,cu(e))}});var we=i((Sd,Ln)=>{"use strict";var fu=String;Ln.exports=function(e){try{return fu(e)}catch(r){return"Object"}}});var oe=i((qd,Cn)=>{"use strict";var pu=x(),vu=we(),bu=TypeError;Cn.exports=function(e){if(pu(e))return e;throw bu(vu(e)+" is not a function")}});var Se=i((Rd,Nn)=>{"use strict";var du=oe(),Tu=ge();Nn.exports=function(e,r){var t=e[r];return Tu(t)?void 0:du(t)}});var Mn=i((Pd,jn)=>{"use strict";var qr=V(),Rr=x(),Pr=Q(),mu=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 mu("Can't convert object to primitive value")}});var ie=i((Ad,kn)=>{"use strict";kn.exports=!0});var Fn=i((_d,Vn)=>{"use strict";var Dn=S(),yu=Object.defineProperty;Vn.exports=function(e,r){try{yu(Dn,e,{value:r,configurable:!0,writable:!0})}catch(t){Dn[e]=r}return r}});var Ar=i((Ld,Gn)=>{"use strict";var hu=S(),gu=Fn(),Un="__core-js_shared__",Iu=hu[Un]||gu(Un,{});Gn.exports=Iu});var _r=i((Cd,Qn)=>{"use strict";var Ou=ie(),Bn=Ar();(Qn.exports=function(e,r){return Bn[e]||(Bn[e]=r!==void 0?r:{})})("versions",[]).push({version:"3.31.0",mode:Ou?"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((Nd,$n)=>{"use strict";var xu=pr(),Eu=Object;$n.exports=function(e){return Eu(xu(e))}});var j=i((jd,Wn)=>{"use strict";var wu=C(),Su=Lr(),qu=wu({}.hasOwnProperty);Wn.exports=Object.hasOwn||function(r,t){return qu(Su(r),t)}});var Cr=i((Md,zn)=>{"use strict";var Ru=C(),Pu=0,Au=Math.random(),_u=Ru(1 .toString);zn.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+_u(++Pu+Au,36)}});var _=i((kd,Yn)=>{"use strict";var Lu=S(),Cu=_r(),Kn=j(),Nu=Cr(),ju=Er(),Mu=wr(),X=Lu.Symbol,Nr=Cu("wks"),ku=Mu?X.for||X:X&&X.withoutSetter||Nu;Yn.exports=function(e){return Kn(Nr,e)||(Nr[e]=ju&&Kn(X,e)?X[e]:ku("Symbol."+e)),Nr[e]}});var Zn=i((Dd,Jn)=>{"use strict";var Du=V(),Hn=Q(),Xn=Sr(),Vu=Se(),Fu=Mn(),Uu=_(),Gu=TypeError,Bu=Uu("toPrimitive");Jn.exports=function(e,r){if(!Hn(e)||Xn(e))return e;var t=Vu(e,Bu),n;if(t){if(r===void 0&&(r="default"),n=Du(t,e,r),!Hn(n)||Xn(n))return n;throw Gu("Can't convert object to primitive value")}return r===void 0&&(r="number"),Fu(e,r)}});var qe=i((Vd,eo)=>{"use strict";var Qu=Zn(),$u=Sr();eo.exports=function(e){var r=Qu(e,"string");return $u(r)?r:r+""}});var J=i(to=>{"use strict";var Wu=N(),zu=mr(),Ku=yr(),Re=D(),ro=qe(),Yu=TypeError,jr=Object.defineProperty,Hu=Object.getOwnPropertyDescriptor,Mr="enumerable",kr="configurable",Dr="writable";to.f=Wu?Ku?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=Hu(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),zu)try{return jr(r,t,n)}catch(o){}if("get"in n||"set"in n)throw Yu("Accessors not supported");return"value"in n&&(r[t]=n.value),r}});var ae=i((Ud,no)=>{"use strict";no.exports=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}});var $=i((Gd,oo)=>{"use strict";var Xu=N(),Ju=J(),Zu=ae();oo.exports=Xu?function(e,r,t){return Ju.f(e,r,Zu(1,t))}:function(e,r,t){return e[r]=t,e}});var Pe=i((Bd,ao)=>{"use strict";var el=_r(),rl=Cr(),io=el("keys");ao.exports=function(e){return io[e]||(io[e]=rl(e))}});var Ae=i((Qd,so)=>{"use strict";so.exports={}});var fo=i(($d,co)=>{"use strict";var tl=nn(),lo=S(),nl=Q(),ol=$(),Vr=j(),Fr=Ar(),il=Pe(),al=Ae(),uo="Object already initialized",Ur=lo.TypeError,sl=lo.WeakMap,_e,se,Le,ul=function(e){return Le(e)?se(e):_e(e,{})},ll=function(e){return function(r){var t;if(!nl(r)||(t=se(r)).type!==e)throw Ur("Incompatible receiver, "+e+" required");return t}};tl||Fr.state?(P=Fr.state||(Fr.state=new sl),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=il("state"),al[W]=!0,_e=function(e,r){if(Vr(e,W))throw Ur(uo);return r.facade=e,ol(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:ul,getterFor:ll}});var mo=i((Wd,To)=>{"use strict";var cl=ne(),bo=Function.prototype,po=bo.apply,vo=bo.call;To.exports=typeof Reflect=="object"&&Reflect.apply||(cl?vo.bind(po):function(){return vo.apply(po,arguments)})});var Gr=i((zd,yo)=>{"use strict";var fl=he(),pl=C();yo.exports=function(e){if(fl(e)==="Function")return pl(e)}});var Oo=i(Io=>{"use strict";var ho={}.propertyIsEnumerable,go=Object.getOwnPropertyDescriptor,vl=go&&!ho.call({1:2},1);Io.f=vl?function(r){var t=go(this,r);return!!t&&t.enumerable}:ho});var wo=i(Eo=>{"use strict";var bl=N(),dl=V(),Tl=Oo(),ml=ae(),yl=H(),hl=qe(),gl=j(),Il=mr(),xo=Object.getOwnPropertyDescriptor;Eo.f=bl?xo:function(r,t){if(r=yl(r),t=hl(t),Il)try{return xo(r,t)}catch(n){}if(gl(r,t))return ml(!dl(Tl.f,r,t),r[t])}});var qo=i((Hd,So)=>{"use strict";var Ol=A(),xl=x(),El=/#|\.prototype\./,ue=function(e,r){var t=Sl[wl(e)];return t==Rl?!0:t==ql?!1:xl(r)?Ol(r):!!r},wl=ue.normalize=function(e){return String(e).replace(El,".").toLowerCase()},Sl=ue.data={},ql=ue.NATIVE="N",Rl=ue.POLYFILL="P";So.exports=ue});var Br=i((Xd,Po)=>{"use strict";var Ro=Gr(),Pl=oe(),Al=ne(),_l=Ro(Ro.bind);Po.exports=function(e,r){return Pl(e),r===void 0?e:Al?_l(e,r):function(){return e.apply(r,arguments)}}});var Qr=i((Jd,_o)=>{"use strict";var Ce=S(),Ll=mo(),Cl=Gr(),Nl=x(),jl=wo().f,Ml=qo(),Z=xe(),kl=Br(),ee=$(),Ao=j(),Dl=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 Ll(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,f,l,p,b,d,T,y,I,h;for(b in r)f=Ml(n?b:t+(o?".":"#")+b,e.forced),l=!f&&u&&Ao(u,b),T=s[b],l&&(e.dontCallGetSet?(h=jl(u,b),y=h&&h.value):y=u[b]),d=l&&y?y:r[b],!(l&&typeof T==typeof d)&&(e.bind&&l?I=kl(d,Ce):e.wrap&&l?I=Dl(d):a&&Nl(d)?I=Cl(d):I=d,(e.sham||d&&d.sham||T&&T.sham)&&ee(I,"sham",!0),ee(s,b,I),a&&(p=t+"Prototype",Ao(Z,p)||ee(Z,p,{}),ee(Z[p],b,d),e.real&&c&&(f||!c[b])&&ee(c,b,d)))}});var No=i((Zd,Co)=>{"use strict";var $r=N(),Vl=j(),Lo=Function.prototype,Fl=$r&&Object.getOwnPropertyDescriptor,Wr=Vl(Lo,"name"),Ul=Wr&&function(){}.name==="something",Gl=Wr&&(!$r||$r&&Fl(Lo,"name").configurable);Co.exports={EXISTS:Wr,PROPER:Ul,CONFIGURABLE:Gl}});var Mo=i((eT,jo)=>{"use strict";var Bl=Math.ceil,Ql=Math.floor;jo.exports=Math.trunc||function(r){var t=+r;return(t>0?Ql:Bl)(t)}});var zr=i((rT,ko)=>{"use strict";var $l=Mo();ko.exports=function(e){var r=+e;return r!==r||r===0?0:$l(r)}});var Vo=i((tT,Do)=>{"use strict";var Wl=zr(),zl=Math.max,Kl=Math.min;Do.exports=function(e,r){var t=Wl(e);return t<0?zl(t+r,0):Kl(t,r)}});var Uo=i((nT,Fo)=>{"use strict";var Yl=zr(),Hl=Math.min;Fo.exports=function(e){return e>0?Hl(Yl(e),9007199254740991):0}});var Kr=i((oT,Go)=>{"use strict";var Xl=Uo();Go.exports=function(e){return Xl(e.length)}});var $o=i((iT,Qo)=>{"use strict";var Jl=H(),Zl=Vo(),ec=Kr(),Bo=function(e){return function(r,t,n){var o=Jl(r),a=ec(o),u=Zl(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}};Qo.exports={includes:Bo(!0),indexOf:Bo(!1)}});var Ko=i((aT,zo)=>{"use strict";var rc=C(),Yr=j(),tc=H(),nc=$o().indexOf,oc=Ae(),Wo=rc([].push);zo.exports=function(e,r){var t=tc(e),n=0,o=[],a;for(a in t)!Yr(oc,a)&&Yr(t,a)&&Wo(o,a);for(;r.length>n;)Yr(t,a=r[n++])&&(~nc(o,a)||Wo(o,a));return o}});var Hr=i((sT,Yo)=>{"use strict";Yo.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var Xo=i((uT,Ho)=>{"use strict";var ic=Ko(),ac=Hr();Ho.exports=Object.keys||function(r){return ic(r,ac)}});var Zo=i(Jo=>{"use strict";var sc=N(),uc=yr(),lc=J(),cc=D(),fc=H(),pc=Xo();Jo.f=sc&&!uc?Object.defineProperties:function(r,t){cc(r);for(var n=fc(t),o=pc(t),a=o.length,u=0,s;a>u;)lc.f(r,s=o[u++],n[s]);return r}});var ri=i((cT,ei)=>{"use strict";var vc=Ir();ei.exports=vc("document","documentElement")});var et=i((fT,ui)=>{"use strict";var bc=D(),dc=Zo(),ti=Hr(),Tc=Ae(),mc=ri(),yc=Tr(),hc=Pe(),ni=">",oi="<",Jr="prototype",Zr="script",ai=hc("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},gc=function(){var e=yc("iframe"),r="java"+Zr+":",t;return e.style.display="none",mc.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):gc():ii(Ne);for(var e=ti.length;e--;)delete je[Jr][ti[e]];return je()};Tc[ai]=!0;ui.exports=Object.create||function(r,t){var n;return r!==null?(Xr[Jr]=bc(r),n=new Xr,Xr[Jr]=null,n[ai]=r):n=je(),t===void 0?n:dc.f(n,t)}});var ci=i((pT,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((vT,pi)=>{"use strict";var Oc=j(),xc=x(),Ec=Lr(),wc=Pe(),Sc=ci(),fi=wc("IE_PROTO"),rt=Object,qc=rt.prototype;pi.exports=Sc?rt.getPrototypeOf:function(e){var r=Ec(e);if(Oc(r,fi))return r[fi];var t=r.constructor;return xc(t)&&r instanceof t?t.prototype:r instanceof rt?qc:null}});var nt=i((bT,vi)=>{"use strict";var Rc=$();vi.exports=function(e,r,t,n){return n&&n.enumerable?e[r]=t:Rc(e,r,t),e}});var st=i((dT,Ti)=>{"use strict";var Pc=A(),Ac=x(),_c=Q(),Lc=et(),bi=tt(),Cc=nt(),Nc=_(),jc=ie(),at=Nc("iterator"),di=!1,M,ot,it;[].keys&&(it=[].keys(),"next"in it?(ot=bi(bi(it)),ot!==Object.prototype&&(M=ot)):di=!0);var Mc=!_c(M)||Pc(function(){var e={};return M[at].call(e)!==e});Mc?M={}:jc&&(M=Lc(M));Ac(M[at])||Cc(M,at,function(){return this});Ti.exports={IteratorPrototype:M,BUGGY_SAFARI_ITERATORS:di}});var Me=i((TT,yi)=>{"use strict";var kc=_(),Dc=kc("toStringTag"),mi={};mi[Dc]="z";yi.exports=String(mi)==="[object z]"});var De=i((mT,hi)=>{"use strict";var Vc=Me(),Fc=x(),ke=he(),Uc=_(),Gc=Uc("toStringTag"),Bc=Object,Qc=ke(function(){return arguments}())=="Arguments",$c=function(e,r){try{return e[r]}catch(t){}};hi.exports=Vc?ke:function(e){var r,t,n;return e===void 0?"Undefined":e===null?"Null":typeof(t=$c(r=Bc(e),Gc))=="string"?t:Qc?ke(r):(n=ke(r))=="Object"&&Fc(r.callee)?"Arguments":n}});var Ii=i((yT,gi)=>{"use strict";var Wc=Me(),zc=De();gi.exports=Wc?{}.toString:function(){return"[object "+zc(this)+"]"}});var ut=i((hT,xi)=>{"use strict";var Kc=Me(),Yc=J().f,Hc=$(),Xc=j(),Jc=Ii(),Zc=_(),Oi=Zc("toStringTag");xi.exports=function(e,r,t,n){if(e){var o=t?e:e.prototype;Xc(o,Oi)||Yc(o,Oi,{configurable:!0,value:r}),n&&!Kc&&Hc(o,"toString",Jc)}}});var wi=i((gT,Ei)=>{"use strict";var ef=st().IteratorPrototype,rf=et(),tf=ae(),nf=ut(),of=B(),af=function(){return this};Ei.exports=function(e,r,t,n){var o=r+" Iterator";return e.prototype=rf(ef,{next:tf(+!n,t)}),nf(e,o,!1,!0),of[o]=af,e}});var qi=i((IT,Si)=>{"use strict";var sf=C(),uf=oe();Si.exports=function(e,r,t){try{return sf(uf(Object.getOwnPropertyDescriptor(e,r)[t]))}catch(n){}}});var Pi=i((OT,Ri)=>{"use strict";var lf=x(),cf=String,ff=TypeError;Ri.exports=function(e){if(typeof e=="object"||lf(e))return e;throw ff("Can't set "+cf(e)+" as a prototype")}});var _i=i((xT,Ai)=>{"use strict";var pf=qi(),vf=D(),bf=Pi();Ai.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,r={},t;try{t=pf(Object.prototype,"__proto__","set"),t(r,[]),e=r instanceof Array}catch(n){}return function(o,a){return vf(o),bf(a),e?t(o,a):o.__proto__=a,o}}():void 0)});var Gi=i((ET,Ui)=>{"use strict";var df=Qr(),Tf=V(),Ve=ie(),Vi=No(),mf=x(),yf=wi(),Li=tt(),Ci=_i(),hf=ut(),gf=$(),lt=nt(),If=_(),Ni=B(),Fi=st(),Of=Vi.PROPER,xf=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){yf(t,r,n);var s=function(h){if(h===o&&b)return b;if(!Fe&&h in l)return l[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",f=!1,l=e.prototype,p=l[le]||l["@@iterator"]||o&&l[o],b=!Fe&&p||s(o),d=r=="Array"&&l.entries||p,T,y,I;if(d&&(T=Li(d.call(new e)),T!==Object.prototype&&T.next&&(!Ve&&Li(T)!==ji&&(Ci?Ci(T,ji):mf(T[le])||lt(T,le,Di)),hf(T,c,!0,!0),Ve&&(Ni[c]=Di))),Of&&o==ce&&p&&p.name!==ce&&(!Ve&&xf?gf(l,"name",ce):(f=!0,b=function(){return Tf(p,this)})),o)if(y={values:s(ce),keys:a?b:s(Mi),entries:s(ki)},u)for(I in y)(Fe||f||!(I in l))&&lt(l,I,y[I]);else df({target:r,proto:!0,forced:Fe||f},y);return(!Ve||u)&&l[le]!==b&&lt(l,le,b,{name:o}),Ni[r]=b,y}});var Qi=i((wT,Bi)=>{"use strict";Bi.exports=function(e,r){return{value:e,done:r}}});var ft=i((ST,Yi)=>{"use strict";var Ef=H(),ct=Kt(),$i=B(),zi=fo(),wf=J().f,Sf=Gi(),Ue=Qi(),qf=ie(),Rf=N(),Ki="Array Iterator",Pf=zi.set,Af=zi.getterFor(Ki);Yi.exports=Sf(Array,"Array",function(e,r){Pf(this,{type:Ki,target:Ef(e),index:0,kind:r})},function(){var e=Af(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(!qf&&Rf&&Wi.name!=="values")try{wf(Wi,"name",{value:"values"})}catch(e){}});var Xi=i((qT,Hi)=>{"use strict";var _f=_(),Lf=B(),Cf=_f("iterator"),Nf=Array.prototype;Hi.exports=function(e){return e!==void 0&&(Lf.Array===e||Nf[Cf]===e)}});var pt=i((RT,Zi)=>{"use strict";var jf=De(),Ji=Se(),Mf=ge(),kf=B(),Df=_(),Vf=Df("iterator");Zi.exports=function(e){if(!Mf(e))return Ji(e,Vf)||Ji(e,"@@iterator")||kf[jf(e)]}});var ra=i((PT,ea)=>{"use strict";var Ff=V(),Uf=oe(),Gf=D(),Bf=we(),Qf=pt(),$f=TypeError;ea.exports=function(e,r){var t=arguments.length<2?Qf(e):r;if(Uf(t))return Gf(Ff(t,e));throw $f(Bf(e)+" is not iterable")}});var oa=i((AT,na)=>{"use strict";var Wf=V(),ta=D(),zf=Se();na.exports=function(e,r,t){var n,o;ta(e);try{if(n=zf(e,"return"),!n){if(r==="throw")throw t;return t}n=Wf(n,e)}catch(a){o=!0,n=a}if(r==="throw")throw t;if(o)throw n;return ta(n),t}});var la=i((_T,ua)=>{"use strict";var Kf=Br(),Yf=V(),Hf=D(),Xf=we(),Jf=Xi(),Zf=Kr(),ia=Or(),ep=ra(),rp=pt(),aa=oa(),tp=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=Kf(r,n),f,l,p,b,d,T,y,I=function(g){return f&&aa(f,"normal",g),new Ge(!0,g)},h=function(g){return o?(Hf(g),s?c(g[0],g[1],I):c(g[0],g[1])):s?c(g,I):c(g)};if(a)f=e.iterator;else if(u)f=e;else{if(l=rp(e),!l)throw tp(Xf(e)+" is not iterable");if(Jf(l)){for(p=0,b=Zf(e);b>p;p++)if(d=h(e[p]),d&&ia(sa,d))return d;return new Ge(!1)}f=ep(e,l)}for(T=a?e.next:f.next;!(y=Yf(T,f)).done;){try{d=h(y.value)}catch(g){aa(f,"throw",g)}if(typeof d=="object"&&d&&ia(sa,d))return d}return new Ge(!1)}});var fa=i((LT,ca)=>{"use strict";var np=qe(),op=J(),ip=ae();ca.exports=function(e,r,t){var n=np(r);n in e?op.f(e,n,ip(0,t)):e[n]=t}});var pa=i(()=>{"use strict";var ap=Qr(),sp=la(),up=fa();ap({target:"Object",stat:!0},{fromEntries:function(r){var t={};return sp(r,function(n,o){up(t,n,o)},{AS_ENTRIES:!0}),t}})});var ba=i((jT,va)=>{"use strict";ft();pa();var lp=xe();va.exports=lp.Object.fromEntries});var Ta=i((MT,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 cp=Ta(),fp=S(),pp=De(),vp=$(),ma=B(),bp=_(),ya=bp("toStringTag");for(Be in cp)vt=fp[Be],Qe=vt&&vt.prototype,Qe&&pp(Qe)!==ya&&vp(Qe,ya,Be),ma[Be]=ma.Array;var vt,Qe,Be});var Ia=i((VT,ga)=>{"use strict";var dp=ba();ha();ga.exports=dp});var xa=i((FT,Oa)=>{"use strict";var Tp=Ia();Oa.exports=Tp});var Ma="1.0.38-beta.1";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(),f.remove()});let a=()=>{s(),o()},u=()=>{s(),n()},s=()=>{c&&clearTimeout(c),f.removeEventListener("load",u),f.removeEventListener("error",a)},c;t&&(c=window.setTimeout(a,t));let f=document.createElement("script");f.addEventListener("load",u),f.addEventListener("error",a),f.src=e,document.head.appendChild(f)});var mt,Ba=typeof((mt=window.performance)==null?void 0:mt.now)=="function"?()=>window.performance.now():()=>Date.now();var Qa=(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.SamsungBrowser="SamsungBrowser",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=/samsungbrowser/i.test(e)?"SamsungBrowser":void 0,n=/chrome|crios/i.test(e)?"Chrome":void 0,o=/chromium/i.test(e)?"Chromium":void 0,a=/firefox|fxios/i.test(e)?"Firefox":void 0,u=/webkit|safari|khtml/i.test(e)?"Safari":void 0,s=/opr\//i.test(e)?"Opera":void 0,c=/edg/i.test(e)?"Edge":void 0,f=/android/i.test(e)?"Android":void 0,l=/iphone/i.test(e)?"iPhone":void 0,p=/ipad/i.test(e)?"iPad":void 0,b=/ipod/i.test(e)?"iPod":void 0,d=/mac/i.test(e)?"Mac":void 0,T=/webOS|BlackBerry|IEMobile|Opera Mini/i.test(e)?"RestMobile":void 0;return{browser:r||t||a||s||c||n||o||u||"Rest",device:f||l||p||b||T||d||"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=(l=>(l.INVARIANT="Invariant quality",l.Q_144P="144p",l.Q_240P="240p",l.Q_360P="360p",l.Q_480P="480p",l.Q_720P="720p",l.Q_1080P="1080p",l.Q_1440P="1440p",l.Q_2160P="2160p",l.Q_4320P="4320p",l))(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],gt=Object.keys(w).sort((e,r)=>Xe(e,r)?-1:1),us=(e,r=.02)=>[...gt].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 gt.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 Xp=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,f=0,l=!1,p=!1,b=!0,d=!r&&r!==0&&typeof window.requestAnimationFrame=="function";t&&(l=!!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 T(m){let q=n,F=o;return n=o=void 0,f=m,u=e.apply(F,q),u}function y(m,q){return d?(s&&window.cancelAnimationFrame(s),window.requestAnimationFrame(m)):setTimeout(m,q)}function I(m){if(d){window.cancelAnimationFrame(m);return}clearTimeout(m)}function h(m){return f=m,s=y(fe,r),l?T(m):u}function g(m){let q=m-c,F=m-f,Tt=r-q;return p?Math.min(Tt,a-F):Tt}function bt(m){let q=m-c,F=m-f;return c===void 0||q>=r||q<0||p&&F>=a}function fe(){let m=Date.now();if(bt(m))return dt(m);s=y(fe,g(m))}function dt(m){return s=void 0,b&&n?T(m):(n=o=void 0,u)}function wa(){s!==void 0&&I(s),f=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(...m){let q=Date.now(),F=bt(q);if(n=m,o=this,c=q,F){if(s===void 0)return h(c);if(p)return s=y(fe,r),T(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,f;s.contentBoxSize&&s.contentBoxSize[0]?(f=s.contentBoxSize[0].blockSize,c=s.contentBoxSize[0].inlineSize):s.contentRect&&(c=s.contentRect.width,f=s.contentRect.height),z(c)&&z(f)&&t.next({width:c,height:f})},r));return a.observe(e),()=>a.disconnect()});var ms=e=>{e.removeAttribute("src"),e.load()};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 It(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 ys=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 hs=e=>new v(r=>{let t=window.setInterval(()=>r.next(),e);return()=>{t&&(window.clearInterval(t),t=void 0)}});var gs=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 Os={leading:!1,trailing:!0};function Et(e,r=Os){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 xs={leading:!0,trailing:!1};function wt(e,r=xs){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 Es=(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))(Es||{});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(f,l){let p;l&&l.signal&&(p=l.signal,delete l.signal);let b=new t(f,l);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,f)=>{let l=a&&a.prototype.isPrototypeOf(c)?c.signal:f?f.signal:void 0;if(l){let p;try{p=new DOMException("Aborted","AbortError")}catch(d){p=new Error("Aborted"),p.name="AbortError"}if(l.aborted)return Promise.reject(p);let b=new Promise((d,T)=>{l.addEventListener("abort",()=>T(p),{once:!0})});return f&&f.signal&&delete f.signal,Promise.race([b,u(c,f)])}return u(c,f)},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,Kb=te?Ct.Request:window.Request,Yb=te?re:window.AbortController,Hb=te?Y:window.AbortSignal;var Ea=ja(xa(),1),mp=(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))(mp||{}),yp="vk.com",GT=async(e,r,t)=>{let n=new URL(`https://${yp}/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 hp(a,t)},hp=(e,r)=>(0,Ea.default)(Object.entries(e.keys).map(([t,n])=>[t.substring(`${r}_`.length),gp(n)])),gp=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,Es as ErrorCategory,Ip as InterfaceLanguage,We as Logger,v as Observable,k as Subject,E as Subscription,Ma as VERSION,mp as VKNumericLanguage,de as ValueSubject,He as VideoQuality,Qa 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,ms as clearVideoElement,bs as cloneDeep,be as cloneDeepWith,It 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,hs 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,GT as loadVKLangPack,Te as map,Pt as mapTo,Ot as merge,U as noop,Ba as now,gs as observableFrom,Ts as observeElementSize,At as once,_t as pairwise,Ye as safeStorage,Lt as tap,wt as throttle,er as throttleFn,Xp as timeCodeToString,ys as timeout,us as videoHeightToQuality,cs as videoQualityToHeight,ls as videoSizeToQuality};
package/esnext.cjs.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @vkontakte/videoplayer-shared v1.0.38-beta.0
3
- * Wed, 07 Aug 2024 14:12:32 GMT
2
+ * @vkontakte/videoplayer-shared v1.0.38-beta.1
3
+ * Thu, 08 Aug 2024 11:57:05 GMT
4
4
  * https://st.mycdn.me/static/vkontakte-videoplayer/1-0-38/doc/
5
5
  */
6
- "use strict";var z=Object.defineProperty;var st=Object.getOwnPropertyDescriptor;var at=Object.getOwnPropertyNames;var lt=Object.prototype.hasOwnProperty;var me=(t,e)=>{for(var r in e)z(t,r,{get:e[r],enumerable:!0})},ut=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of at(e))!lt.call(t,o)&&o!==r&&z(t,o,{get:()=>e[o],enumerable:!(n=st(e,o))||n.enumerable});return t};var ct=t=>ut(z({},"__esModule",{value:!0}),t);var Et={};me(Et,{CurrentClientBrowser:()=>j,CurrentClientDevice:()=>W,ErrorCategory:()=>Xe,InterfaceLanguage:()=>Ze,Logger:()=>V,Observable:()=>l,Subject:()=>I,Subscription:()=>f,VERSION:()=>Te,VKNumericLanguage:()=>Je,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,clearVideoElement:()=>Ge,cloneDeep:()=>je,cloneDeepWith:()=>R,combine:()=>H,debounce:()=>J,debounceFn:()=>B,detectEmbed:()=>Le,fillWithDefault:()=>ze,filter:()=>re,filterChanged:()=>oe,fromEvent:()=>$e,getCurrentBrowser:()=>A,getExponentialDelay:()=>ke,getHighestQuality:()=>Ve,getIOSVersion:()=>Se,interval:()=>He,isAndroid:()=>Ae,isHigher:()=>Pe,isHigherOrEqual:()=>Me,isIOS:()=>Ee,isInvariantQuality:()=>U,isLower:()=>D,isLowerOrEqual:()=>Ne,isMacLike:()=>Re,isMobile:()=>Ce,isNonNullable:()=>h,isNullable:()=>Q,loadVKLangPack:()=>yt,map:()=>k,mapTo:()=>se,merge:()=>K,noop:()=>x,now:()=>Oe,observableFrom:()=>Ke,observeElementSize:()=>We,once:()=>ae,pairwise:()=>ue,safeStorage:()=>q,tap:()=>pe,throttle:()=>ee,throttleFn:()=>F,timeCodeToString:()=>vt,timeout:()=>qe,videoHeightToQuality:()=>_e,videoQualityToHeight:()=>Ue,videoSizeToQuality:()=>De});module.exports=ct(Et);var Te="1.0.38-beta.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:()=>Tt,get:()=>bt,has:()=>ft,isPersistent:()=>pt,remove:()=>mt,set:()=>dt});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},pt=()=>w()===0,bt=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)}},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 O?.set(t,e);default:v(r)}},ft=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}},mt=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)}},Tt=()=>{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 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 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 et(p){if(L){window.cancelAnimationFrame(p);return}clearTimeout(p)}function tt(p){return b=p,a=P(M,e),c?S(p):i}function rt(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,rt(p))}function de(p){return a=void 0,E&&n?S(p):(n=o=void 0,i)}function nt(){a!==void 0&&et(a),b=0,n=u=o=a=void 0}function ot(){return a===void 0?i:de(Date.now())}function it(){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 tt(u);if(d)return a=P(M,e),S(u)}return a===void 0&&(a=P(M,e)),i}return N.cancel=nt,N.flush=ot,N.pending=it,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 It=300,We=(t,e=It)=>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 Ge=t=>{t.removeAttribute("src"),t.load()};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 qe=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 He=t=>new l(e=>{let r=window.setInterval(()=>e.next(),t);return()=>{r&&(window.clearInterval(r),r=void 0)}});var Ke=t=>new l(e=>{t.forEach(r=>e.next(r))});var $e=(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 xt={leading:!1,trailing:!0};function J(t,e=xt){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 gt={leading:!0,trailing:!1};function ee(t,e=gt){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 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){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 Xe=(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))(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||{}),ht="vk.com",yt=async(t,e,r)=>{let n=new URL(`https://${ht}/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||{});
6
+ "use strict";var fs=Object.create;var Te=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)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 vs(r))!ds.call(e,o)&&o!==t&&Te(e,o,{get:()=>r[o],enumerable:!(n=ps(r,o))||n.enumerable});return e};var ms=(e,r,t)=>(t=e!=null?fs(bs(e)):{},_t(r||!e||!e.__esModule?Te(t,"default",{value:e,enumerable:!0}):t,e)),Ts=e=>_t(Te({},"__esModule",{value:!0}),e);var A=i((ed,Tn)=>{"use strict";Tn.exports=function(e){try{return!!e()}catch{return!0}}});var se=i((rd,yn)=>{"use strict";var Rs=A();yn.exports=!Rs(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var C=i((td,In)=>{"use strict";var hn=se(),gn=Function.prototype,xr=gn.call,Ps=hn&&gn.bind.bind(xr,xr);In.exports=hn?Ps:function(e){return function(){return xr.apply(e,arguments)}}});var qe=i((nd,xn)=>{"use strict";var On=C(),As=On({}.toString),_s=On("".slice);xn.exports=function(e){return _s(As(e),8,-1)}});var Sn=i((od,En)=>{"use strict";var Ls=C(),Cs=A(),Ns=qe(),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 Re=i((id,wn)=>{"use strict";wn.exports=function(e){return e==null}});var Sr=i((ad,qn)=>{"use strict";var Ms=Re(),ks=TypeError;qn.exports=function(e){if(Ms(e))throw ks("Can't call method on "+e);return e}});var H=i((sd,Rn)=>{"use strict";var Ds=Sn(),Vs=Sr();Rn.exports=function(e){return Ds(Vs(e))}});var An=i((ud,Pn)=>{"use strict";Pn.exports=function(){}});var B=i((ld,_n)=>{"use strict";_n.exports={}});var S=i((Ln,Cn)=>{"use strict";var Pe=function(e){return e&&e.Math==Math&&e};Cn.exports=Pe(typeof globalThis=="object"&&globalThis)||Pe(typeof window=="object"&&window)||Pe(typeof self=="object"&&self)||Pe(typeof global=="object"&&global)||function(){return this}()||Ln||Function("return this")()});var qr=i((cd,Nn)=>{"use strict";var wr=typeof document=="object"&&document.all,Fs=typeof wr>"u"&&wr!==void 0;Nn.exports={all:wr,IS_HTMLDDA:Fs}});var O=i((fd,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((pd,Dn)=>{"use strict";var Gs=S(),Bs=O(),kn=Gs.WeakMap;Dn.exports=Bs(kn)&&/native code/.test(String(kn))});var Q=i((vd,Gn)=>{"use strict";var Fn=O(),Un=qr(),Qs=Un.all;Gn.exports=Un.IS_HTMLDDA?function(e){return typeof e=="object"?e!==null:Fn(e)||e===Qs}:function(e){return typeof e=="object"?e!==null:Fn(e)}});var N=i((bd,Bn)=>{"use strict";var $s=A();Bn.exports=!$s(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var Pr=i((dd,$n)=>{"use strict";var Ws=S(),Qn=Q(),Rr=Ws.document,zs=Qn(Rr)&&Qn(Rr.createElement);$n.exports=function(e){return zs?Rr.createElement(e):{}}});var Ar=i((md,Wn)=>{"use strict";var Ks=N(),Ys=A(),Hs=Pr();Wn.exports=!Ks&&!Ys(function(){return Object.defineProperty(Hs("div"),"a",{get:function(){return 7}}).a!=7})});var _r=i((Td,zn)=>{"use strict";var Xs=N(),Js=A();zn.exports=Xs&&Js(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})});var D=i((yd,Kn)=>{"use strict";var Zs=Q(),eu=String,ru=TypeError;Kn.exports=function(e){if(Zs(e))return e;throw ru(eu(e)+" is not an object")}});var V=i((hd,Yn)=>{"use strict";var tu=se(),Ae=Function.prototype.call;Yn.exports=tu?Ae.bind(Ae):function(){return Ae.apply(Ae,arguments)}});var _e=i((gd,Hn)=>{"use strict";Hn.exports={}});var Nr=i((Id,Jn)=>{"use strict";var Lr=_e(),Cr=S(),nu=O(),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((Od,Zn)=>{"use strict";var ou=C();Zn.exports=ou({}.isPrototypeOf)});var ro=i((xd,eo)=>{"use strict";eo.exports=typeof navigator<"u"&&String(navigator.userAgent)||""});var uo=i((Ed,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,q,Le;io&&(q=io.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])));so.exports=Le});var kr=i((Sd,co)=>{"use strict";var lo=uo(),iu=A(),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((wd,fo)=>{"use strict";var uu=kr();fo.exports=uu&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Vr=i((qd,po)=>{"use strict";var lu=Nr(),cu=O(),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 Ce=i((Rd,vo)=>{"use strict";var bu=String;vo.exports=function(e){try{return bu(e)}catch{return"Object"}}});var ue=i((Pd,bo)=>{"use strict";var du=O(),mu=Ce(),Tu=TypeError;bo.exports=function(e){if(du(e))return e;throw Tu(mu(e)+" is not a function")}});var Ne=i((Ad,mo)=>{"use strict";var yu=ue(),hu=Re();mo.exports=function(e,r){var t=e[r];return hu(t)?void 0:yu(t)}});var yo=i((_d,To)=>{"use strict";var Fr=V(),Ur=O(),Gr=Q(),gu=TypeError;To.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 gu("Can't convert object to primitive value")}});var le=i((Ld,ho)=>{"use strict";ho.exports=!0});var Oo=i((Cd,Io)=>{"use strict";var go=S(),Iu=Object.defineProperty;Io.exports=function(e,r){try{Iu(go,e,{value:r,configurable:!0,writable:!0})}catch{go[e]=r}return r}});var Br=i((Nd,Eo)=>{"use strict";var Ou=S(),xu=Oo(),xo="__core-js_shared__",Eu=Ou[xo]||xu(xo,{});Eo.exports=Eu});var Qr=i((jd,wo)=>{"use strict";var Su=le(),So=Br();(wo.exports=function(e,r){return So[e]||(So[e]=r!==void 0?r:{})})("versions",[]).push({version:"3.31.0",mode:Su?"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((Md,qo)=>{"use strict";var wu=Sr(),qu=Object;qo.exports=function(e){return qu(wu(e))}});var j=i((kd,Ro)=>{"use strict";var Ru=C(),Pu=$r(),Au=Ru({}.hasOwnProperty);Ro.exports=Object.hasOwn||function(r,t){return Au(Pu(r),t)}});var Wr=i((Dd,Po)=>{"use strict";var _u=C(),Lu=0,Cu=Math.random(),Nu=_u(1 .toString);Po.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Nu(++Lu+Cu,36)}});var _=i((Vd,_o)=>{"use strict";var ju=S(),Mu=Qr(),Ao=j(),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((Fd,No)=>{"use strict";var Uu=V(),Lo=Q(),Co=Vr(),Gu=Ne(),Bu=yo(),Qu=_(),$u=TypeError,Wu=Qu("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"),Bu(e,r)}});var je=i((Ud,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=N(),Hu=Ar(),Xu=_r(),Me=D(),ko=je(),Ju=TypeError,Kr=Object.defineProperty,Zu=Object.getOwnPropertyDescriptor,Yr="enumerable",Hr="configurable",Xr="writable";Do.f=Yu?Xu?function(r,t,n){if(Me(r),t=ko(t),Me(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(Me(r),t=ko(t),Me(n),Hu)try{return Kr(r,t,n)}catch{}if("get"in n||"set"in n)throw Ju("Accessors not supported");return"value"in n&&(r[t]=n.value),r}});var ce=i((Bd,Vo)=>{"use strict";Vo.exports=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}});var $=i((Qd,Fo)=>{"use strict";var el=N(),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 ke=i(($d,Go)=>{"use strict";var nl=Qr(),ol=Wr(),Uo=nl("keys");Go.exports=function(e){return Uo[e]||(Uo[e]=ol(e))}});var De=i((Wd,Bo)=>{"use strict";Bo.exports={}});var zo=i((zd,Wo)=>{"use strict";var il=Vn(),$o=S(),al=Q(),sl=$(),Jr=j(),Zr=Br(),ul=ke(),ll=De(),Qo="Object already initialized",et=$o.TypeError,cl=$o.WeakMap,Ve,fe,Fe,fl=function(e){return Fe(e)?fe(e):Ve(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?(R=Zr.state||(Zr.state=new cl),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=ul("state"),ll[W]=!0,Ve=function(e,r){if(Jr(e,W))throw et(Qo);return r.facade=e,sl(e,W,r),r},fe=function(e){return Jr(e,W)?e[W]:{}},Fe=function(e){return Jr(e,W)});var R,W;Wo.exports={set:Ve,get:fe,has:Fe,enforce:fl,getterFor:pl}});var Jo=i((Kd,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((Yd,Zo)=>{"use strict";var bl=qe(),dl=C();Zo.exports=function(e){if(bl(e)==="Function")return dl(e)}});var ni=i(ti=>{"use strict";var ei={}.propertyIsEnumerable,ri=Object.getOwnPropertyDescriptor,ml=ri&&!ei.call({1:2},1);ti.f=ml?function(r){var t=ri(this,r);return!!t&&t.enumerable}:ei});var ai=i(ii=>{"use strict";var Tl=N(),yl=V(),hl=ni(),gl=ce(),Il=H(),Ol=je(),xl=j(),El=Ar(),oi=Object.getOwnPropertyDescriptor;ii.f=Tl?oi:function(r,t){if(r=Il(r),t=Ol(t),El)try{return oi(r,t)}catch{}if(xl(r,t))return gl(!yl(hl.f,r,t),r[t])}});var ui=i((Jd,si)=>{"use strict";var Sl=A(),wl=O(),ql=/#|\.prototype\./,pe=function(e,r){var t=Pl[Rl(e)];return t==_l?!0:t==Al?!1:wl(r)?Sl(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((Zd,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((em,pi)=>{"use strict";var Ue=S(),jl=Jo(),Ml=rt(),kl=O(),Dl=ai().f,Vl=ui(),Z=_e(),Fl=tt(),ee=$(),fi=j(),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,s=n?Ue:o?Ue[t]:(Ue[t]||{}).prototype,u=n?Z:Z[t]||ee(Z,t,{})[t],f=u.prototype,c,l,p,b,d,m,y,I,h;for(b in r)c=Vl(n?b:t+(o?".":"#")+b,e.forced),l=!c&&s&&fi(s,b),m=u[b],l&&(e.dontCallGetSet?(h=Dl(s,b),y=h&&h.value):y=s[b]),d=l&&y?y:r[b],!(l&&typeof m==typeof d)&&(e.bind&&l?I=Fl(d,Ue):e.wrap&&l?I=Ul(d):a&&kl(d)?I=Ml(d):I=d,(e.sham||d&&d.sham||m&&m.sham)&&ee(I,"sham",!0),ee(u,b,I),a&&(p=t+"Prototype",fi(Z,p)||ee(Z,p,{}),ee(Z[p],b,d),e.real&&f&&(c||!f[b])&&ee(f,b,d)))}});var di=i((rm,bi)=>{"use strict";var ot=N(),Gl=j(),vi=Function.prototype,Bl=ot&&Object.getOwnPropertyDescriptor,it=Gl(vi,"name"),Ql=it&&function(){}.name==="something",$l=it&&(!ot||ot&&Bl(vi,"name").configurable);bi.exports={EXISTS:it,PROPER:Ql,CONFIGURABLE:$l}});var Ti=i((tm,mi)=>{"use strict";var Wl=Math.ceil,zl=Math.floor;mi.exports=Math.trunc||function(r){var t=+r;return(t>0?zl:Wl)(t)}});var at=i((nm,yi)=>{"use strict";var Kl=Ti();yi.exports=function(e){var r=+e;return r!==r||r===0?0:Kl(r)}});var gi=i((om,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((im,Ii)=>{"use strict";var Jl=at(),Zl=Math.min;Ii.exports=function(e){return e>0?Zl(Jl(e),9007199254740991):0}});var st=i((am,xi)=>{"use strict";var ec=Oi();xi.exports=function(e){return ec(e.length)}});var wi=i((sm,Si)=>{"use strict";var rc=H(),tc=gi(),nc=st(),Ei=function(e){return function(r,t,n){var o=rc(r),a=nc(o),s=tc(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}};Si.exports={includes:Ei(!0),indexOf:Ei(!1)}});var Pi=i((um,Ri)=>{"use strict";var oc=C(),ut=j(),ic=H(),ac=wi().indexOf,sc=De(),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((lm,Ai)=>{"use strict";Ai.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var Li=i((cm,_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=N(),fc=_r(),pc=J(),vc=D(),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,s=0,u;a>s;)pc.f(r,u=o[s++],n[u]);return r}});var Mi=i((pm,ji)=>{"use strict";var mc=Nr();ji.exports=mc("document","documentElement")});var vt=i((vm,Bi)=>{"use strict";var Tc=D(),yc=Ni(),ki=lt(),hc=De(),gc=Mi(),Ic=Pr(),Oc=ke(),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=Ic("iframe"),r="java"+pt+":",t;return e.style.display="none",gc.appendChild(e),e.src=String(r),t=e.contentWindow.document,t.open(),t.write(Gi("document.F=Object")),t.close(),t.F},Ge,Be=function(){try{Ge=new ActiveXObject("htmlfile")}catch{}Be=typeof document<"u"?document.domain&&Ge?Fi(Ge):xc():Fi(Ge);for(var e=ki.length;e--;)delete Be[ft][ki[e]];return Be()};hc[Ui]=!0;Bi.exports=Object.create||function(r,t){var n;return r!==null?(ct[ft]=Tc(r),n=new ct,ct[ft]=null,n[Ui]=r):n=Be(),t===void 0?n:yc.f(n,t)}});var $i=i((bm,Qi)=>{"use strict";var Ec=A();Qi.exports=!Ec(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})});var dt=i((dm,zi)=>{"use strict";var Sc=j(),wc=O(),qc=$r(),Rc=ke(),Pc=$i(),Wi=Rc("IE_PROTO"),bt=Object,Ac=bt.prototype;zi.exports=Pc?bt.getPrototypeOf:function(e){var r=qc(e);if(Sc(r,Wi))return r[Wi];var t=r.constructor;return wc(t)&&r instanceof t?t.prototype:r instanceof bt?Ac:null}});var mt=i((mm,Ki)=>{"use strict";var _c=$();Ki.exports=function(e,r,t,n){return n&&n.enumerable?e[r]=t:_c(e,r,t),e}});var gt=i((Tm,Xi)=>{"use strict";var Lc=A(),Cc=O(),Nc=Q(),jc=vt(),Yi=dt(),Mc=mt(),kc=_(),Dc=le(),ht=kc("iterator"),Hi=!1,M,Tt,yt;[].keys&&(yt=[].keys(),"next"in yt?(Tt=Yi(Yi(yt)),Tt!==Object.prototype&&(M=Tt)):Hi=!0);var Vc=!Nc(M)||Lc(function(){var e={};return M[ht].call(e)!==e});Vc?M={}:Dc&&(M=jc(M));Cc(M[ht])||Mc(M,ht,function(){return this});Xi.exports={IteratorPrototype:M,BUGGY_SAFARI_ITERATORS:Hi}});var Qe=i((ym,Zi)=>{"use strict";var Fc=_(),Uc=Fc("toStringTag"),Ji={};Ji[Uc]="z";Zi.exports=String(Ji)==="[object z]"});var We=i((hm,ea)=>{"use strict";var Gc=Qe(),Bc=O(),$e=qe(),Qc=_(),$c=Qc("toStringTag"),Wc=Object,zc=$e(function(){return arguments}())=="Arguments",Kc=function(e,r){try{return e[r]}catch{}};ea.exports=Gc?$e:function(e){var r,t,n;return e===void 0?"Undefined":e===null?"Null":typeof(t=Kc(r=Wc(e),$c))=="string"?t:zc?$e(r):(n=$e(r))=="Object"&&Bc(r.callee)?"Arguments":n}});var ta=i((gm,ra)=>{"use strict";var Yc=Qe(),Hc=We();ra.exports=Yc?{}.toString:function(){return"[object "+Hc(this)+"]"}});var It=i((Im,oa)=>{"use strict";var Xc=Qe(),Jc=J().f,Zc=$(),ef=j(),rf=ta(),tf=_(),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((Om,ia)=>{"use strict";var nf=gt().IteratorPrototype,of=vt(),af=ce(),sf=It(),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((xm,sa)=>{"use strict";var cf=C(),ff=ue();sa.exports=function(e,r,t){try{return cf(ff(Object.getOwnPropertyDescriptor(e,r)[t]))}catch{}}});var ca=i((Em,la)=>{"use strict";var pf=O(),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((Sm,fa)=>{"use strict";var df=ua(),mf=D(),Tf=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{}return function(o,a){return mf(o),Tf(a),e?t(o,a):o.__proto__=a,o}}():void 0)});var xa=i((wm,Oa)=>{"use strict";var yf=nt(),hf=V(),ze=le(),ga=di(),gf=O(),If=aa(),va=dt(),ba=pa(),Of=It(),xf=$(),Ot=mt(),Ef=_(),da=B(),Ia=gt(),Sf=ga.PROPER,wf=ga.CONFIGURABLE,ma=Ia.IteratorPrototype,Ke=Ia.BUGGY_SAFARI_ITERATORS,ve=Ef("iterator"),Ta="keys",be="values",ya="entries",ha=function(){return this};Oa.exports=function(e,r,t,n,o,a,s){If(t,r,n);var u=function(h){if(h===o&&b)return b;if(!Ke&&h in l)return l[h];switch(h){case Ta: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)}},f=r+" Iterator",c=!1,l=e.prototype,p=l[ve]||l["@@iterator"]||o&&l[o],b=!Ke&&p||u(o),d=r=="Array"&&l.entries||p,m,y,I;if(d&&(m=va(d.call(new e)),m!==Object.prototype&&m.next&&(!ze&&va(m)!==ma&&(ba?ba(m,ma):gf(m[ve])||Ot(m,ve,ha)),Of(m,f,!0,!0),ze&&(da[f]=ha))),Sf&&o==be&&p&&p.name!==be&&(!ze&&wf?xf(l,"name",be):(c=!0,b=function(){return hf(p,this)})),o)if(y={values:u(be),keys:a?b:u(Ta),entries:u(ya)},s)for(I in y)(Ke||c||!(I in l))&&Ot(l,I,y[I]);else yf({target:r,proto:!0,forced:Ke||c},y);return(!ze||s)&&l[ve]!==b&&Ot(l,ve,b,{name:o}),da[r]=b,y}});var Sa=i((qm,Ea)=>{"use strict";Ea.exports=function(e,r){return{value:e,done:r}}});var Et=i((Rm,Aa)=>{"use strict";var qf=H(),xt=An(),wa=B(),Ra=zo(),Rf=J().f,Pf=xa(),Ye=Sa(),Af=le(),_f=N(),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,Ye(void 0,!0)):t=="keys"?Ye(n,!1):t=="values"?Ye(r[n],!1):Ye([n,r[n]],!1)},"values");var qa=wa.Arguments=wa.Array;xt("keys");xt("values");xt("entries");if(!Af&&_f&&qa.name!=="values")try{Rf(qa,"name",{value:"values"})}catch{}});var La=i((Pm,_a)=>{"use strict";var Nf=_(),jf=B(),Mf=Nf("iterator"),kf=Array.prototype;_a.exports=function(e){return e!==void 0&&(jf.Array===e||kf[Mf]===e)}});var St=i((Am,Na)=>{"use strict";var Df=We(),Ca=Ne(),Vf=Re(),Ff=B(),Uf=_(),Gf=Uf("iterator");Na.exports=function(e){if(!Vf(e))return Ca(e,Gf)||Ca(e,"@@iterator")||Ff[Df(e)]}});var Ma=i((_m,ja)=>{"use strict";var Bf=V(),Qf=ue(),$f=D(),Wf=Ce(),zf=St(),Kf=TypeError;ja.exports=function(e,r){var t=arguments.length<2?zf(e):r;if(Qf(t))return $f(Bf(t,e));throw Kf(Wf(e)+" is not iterable")}});var Va=i((Lm,Da)=>{"use strict";var Yf=V(),ka=D(),Hf=Ne();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 Qa=i((Cm,Ba)=>{"use strict";var Xf=tt(),Jf=V(),Zf=D(),ep=Ce(),rp=La(),tp=st(),Fa=jr(),np=Ma(),op=St(),Ua=Va(),ip=TypeError,He=function(e,r){this.stopped=e,this.result=r},Ga=He.prototype;Ba.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=Xf(r,n),c,l,p,b,d,m,y,I=function(g){return c&&Ua(c,"normal",g),new He(!0,g)},h=function(g){return o?(Zf(g),u?f(g[0],g[1],I):f(g[0],g[1])):u?f(g,I):f(g)};if(a)c=e.iterator;else if(s)c=e;else{if(l=op(e),!l)throw ip(ep(e)+" is not iterable");if(rp(l)){for(p=0,b=tp(e);b>p;p++)if(d=h(e[p]),d&&Fa(Ga,d))return d;return new He(!1)}c=np(e,l)}for(m=a?e.next:c.next;!(y=Jf(m,c)).done;){try{d=h(y.value)}catch(g){Ua(c,"throw",g)}if(typeof d=="object"&&d&&Fa(Ga,d))return d}return new He(!1)}});var Wa=i((Nm,$a)=>{"use strict";var ap=je(),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=Qa(),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((km,Ka)=>{"use strict";Et();za();var pp=_e();Ka.exports=pp.Object.fromEntries});var Xa=i((Dm,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=We(),mp=$(),Ja=B(),Tp=_(),Za=Tp("toStringTag");for(Xe in vp)wt=bp[Xe],Je=wt&&wt.prototype,Je&&dp(Je)!==Za&&mp(Je,Za,Xe),Ja[Xe]=Ja.Array;var wt,Je,Xe});var ts=i((Um,rs)=>{"use strict";var yp=Ya();es();rs.exports=yp});var os=i((Gm,ns)=>{"use strict";var hp=ts();ns.exports=hp});var Ep={};At(Ep,{CurrentClientBrowser:()=>Ze,CurrentClientDevice:()=>er,ErrorCategory:()=>bn,InterfaceLanguage:()=>ss,Logger:()=>ye,Observable:()=>v,Subject:()=>L,Subscription:()=>x,VERSION:()=>Lt,VKNumericLanguage:()=>as,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,clearVideoElement:()=>un,cloneDeep:()=>an,cloneDeepWith:()=>te,combine:()=>nr,debounce:()=>ur,debounceFn:()=>xe,detectEmbed:()=>zt,fillWithDefault:()=>on,filter:()=>pr,filterChanged:()=>br,fromEvent:()=>pn,getCurrentBrowser:()=>re,getExponentialDelay:()=>Wt,getHighestQuality:()=>Xt,getIOSVersion:()=>Gt,interval:()=>cn,isAndroid:()=>Bt,isHigher:()=>Kt,isHigherOrEqual:()=>Yt,isIOS:()=>Ut,isInvariantQuality:()=>Oe,isLower:()=>Ie,isLowerOrEqual:()=>Ht,isMacLike:()=>Qt,isMobile:()=>$t,isNonNullable:()=>U,isNullable:()=>he,loadVKLangPack:()=>Ip,map:()=>oe,mapTo:()=>mr,merge:()=>or,noop:()=>k,now:()=>Vt,observableFrom:()=>fn,observeElementSize:()=>sn,once:()=>Tr,pairwise:()=>hr,safeStorage:()=>tr,tap:()=>Ir,throttle:()=>cr,throttleFn:()=>Ee,timeCodeToString:()=>Es,timeout:()=>ln,videoHeightToQuality:()=>Zt,videoQualityToHeight:()=>rn,videoSizeToQuality:()=>en});module.exports=Ts(Ep);var Lt="1.0.38-beta.1";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(),c.remove()});let a=()=>{u(),o()},s=()=>{u(),n()},u=()=>{f&&clearTimeout(f),c.removeEventListener("load",s),c.removeEventListener("error",a)},f;t&&(f=window.setTimeout(a,t));let c=document.createElement("script");c.addEventListener("load",s),c.addEventListener("error",a),c.src=e,document.head.appendChild(c)});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.SamsungBrowser="SamsungBrowser",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=/samsungbrowser/i.test(e)?"SamsungBrowser":void 0,n=/chrome|crios/i.test(e)?"Chrome":void 0,o=/chromium/i.test(e)?"Chromium":void 0,a=/firefox|fxios/i.test(e)?"Firefox":void 0,s=/webkit|safari|khtml/i.test(e)?"Safari":void 0,u=/opr\//i.test(e)?"Opera":void 0,f=/edg/i.test(e)?"Edge":void 0,c=/android/i.test(e)?"Android":void 0,l=/iphone/i.test(e)?"iPhone":void 0,p=/ipad/i.test(e)?"iPad":void 0,b=/ipod/i.test(e)?"iPod":void 0,d=/mac/i.test(e)?"Mac":void 0,m=/webOS|BlackBerry|IEMobile|Opera Mini/i.test(e)?"RestMobile":void 0;return{browser:r||t||a||u||f||n||o||s||"Rest",device:c||l||p||b||m||d||"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},Bt=()=>re().device==="Android",Qt=()=>["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:()=>xs,get:()=>hs,has:()=>Is,isPersistent:()=>ys,remove:()=>Os,set:()=>gs});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},ys=()=>K()===0,hs=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)}},gs=(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)}},Is=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}},Os=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)}},xs=()=>{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=(l=>(l.INVARIANT="Invariant quality",l.Q_144P="144p",l.Q_240P="240p",l.Q_360P="360p",l.Q_480P="480p",l.Q_720P="720p",l.Q_1080P="1080p",l.Q_1440P="1440p",l.Q_2160P="2160p",l.Q_4320P="4320p",l))(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 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 xe(e,r=0,t){let n,o,a,s,u,f,c=0,l=!1,p=!1,b=!0,d=!r&&r!==0&&typeof window.requestAnimationFrame=="function";t&&(l=!!t.leading,p="maxWait"in t,a=t?.maxWait?Math.max(+t?.maxWait||0,r):a,b="trailing"in t?!!t.trailing:b);function m(T){let w=n,F=o;return n=o=void 0,c=T,s=e.apply(F,w),s}function y(T,w){return d?(u&&window.cancelAnimationFrame(u),window.requestAnimationFrame(T)):setTimeout(T,w)}function I(T){if(d){window.cancelAnimationFrame(T);return}clearTimeout(T)}function h(T){return c=T,u=y(de,r),l?m(T):s}function g(T){let w=T-f,F=T-c,Pt=r-w;return p?Math.min(Pt,a-F):Pt}function qt(T){let w=T-f,F=T-c;return f===void 0||w>=r||w<0||p&&F>=a}function de(){let T=Date.now();if(qt(T))return Rt(T);u=y(de,g(T))}function Rt(T){return u=void 0,b&&n?m(T):(n=o=void 0,s)}function us(){u!==void 0&&I(u),c=0,n=f=o=u=void 0}function ls(){return u===void 0?s:Rt(Date.now())}function cs(){return u!==void 0}function me(...T){let w=Date.now(),F=qt(w);if(n=T,o=this,f=w,F){if(u===void 0)return h(f);if(p)return u=y(de,r),m(f)}return u===void 0&&(u=y(de,r)),s}return me.cancel=us,me.flush=ls,me.pending=cs,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 Ss=300,sn=(e,r=Ss)=>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,c;u.contentBoxSize&&u.contentBoxSize[0]?(c=u.contentBoxSize[0].blockSize,f=u.contentBoxSize[0].inlineSize):u.contentRect&&(f=u.contentRect.width,c=u.contentRect.height),U(f)&&U(c)&&t.next({width:f,height:c})},r));return a.observe(e),()=>a.disconnect()});var un=e=>{e.removeAttribute("src"),e.load()};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 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){this.destination.error?.(r)}};var ws={leading:!1,trailing:!0};function ur(e,r=ws){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 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){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 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){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 bn=(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))(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 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(c,l){let p;l&&l.signal&&(p=l.signal,delete l.signal);let b=new t(c,l);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,c)=>{let l=a&&a.prototype.isPrototypeOf(f)?f.signal:c?c.signal:void 0;if(l){let p;try{p=new DOMException("Aborted","AbortError")}catch{p=new Error("Aborted"),p.name="AbortError"}if(l.aborted)return Promise.reject(p);let b=new Promise((d,m)=>{l.addEventListener("abort",()=>m(p),{once:!0})});return c&&c.signal&&delete c.signal,Promise.race([b,s(f,c)])}return s(f,c)},Request:a}}var ae=we({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}),dn=ae?Or({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}):void 0,mn=ae?dn.fetch:window.fetch,Hb=ae?dn.Request:window.Request,Xb=ae?ie:window.AbortController,Jb=ae?Y:window.AbortSignal;var is=ms(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||{}),gp="vk.com",Ip=async(e,r,t)=>{let n=new URL(`https://${gp}/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 mn(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||{});
package/esnext.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @vkontakte/videoplayer-shared v1.0.38-beta.0
3
- * Wed, 07 Aug 2024 14:12:32 GMT
2
+ * @vkontakte/videoplayer-shared v1.0.38-beta.1
3
+ * Thu, 08 Aug 2024 11:57:05 GMT
4
4
  * https://st.mycdn.me/static/vkontakte-videoplayer/1-0-38/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.38-beta.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 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 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 it=t=>{t.removeAttribute("src"),t.load()};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 st=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 at=t=>new l(e=>{let r=window.setInterval(()=>e.next(),t);return()=>{r&&(window.clearInterval(r),r=void 0)}});var lt=t=>new l(e=>{t.forEach(r=>e.next(r))});var ut=(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 ct={leading:!1,trailing:!0};function ae(t,e=ct){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 pt={leading:!0,trailing:!1};function le(t,e=pt){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 bt=(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))(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",Dn=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 i=await(await fetch(n.toString())).json();return mt(i,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{ee as CurrentClientBrowser,te as CurrentClientDevice,bt as ErrorCategory,vt as InterfaceLanguage,V as Logger,l as Observable,I as Subject,f as Subscription,we as VERSION,dt 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,it as clearVideoElement,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,ut as fromEvent,L as getCurrentBrowser,De as getExponentialDelay,$e as getHighestQuality,Ne as getIOSVersion,at 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,Dn as loadVKLangPack,N as map,be as mapTo,ie as merge,g as noop,Le as now,lt as observableFrom,ot as observeElementSize,de as once,fe as pairwise,re as safeStorage,me as tap,le as throttle,z as throttleFn,Ht as timeCodeToString,st as timeout,Ye as videoHeightToQuality,Je as videoQualityToHeight,Xe as videoSizeToQuality};
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((Xb,Nt)=>{"use strict";Nt.exports=function(e){try{return!!e()}catch{return!0}}});var ne=i((Jb,jt)=>{"use strict";var Es=P();jt.exports=!Es(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var L=i((Zb,Dt)=>{"use strict";var Mt=ne(),kt=Function.prototype,lr=kt.call,Ss=Mt&&kt.bind.bind(lr,lr);Dt.exports=Mt?Ss:function(e){return function(){return lr.apply(e,arguments)}}});var he=i((ed,Ft)=>{"use strict";var Vt=L(),ws=Vt({}.toString),qs=Vt("".slice);Ft.exports=function(e){return qs(ws(e),8,-1)}});var Gt=i((rd,Ut)=>{"use strict";var Rs=L(),Ps=P(),As=he(),cr=Object,_s=Rs("".split);Ut.exports=Ps(function(){return!cr("z").propertyIsEnumerable(0)})?function(e){return As(e)=="String"?_s(e,""):cr(e)}:cr});var ge=i((td,Bt)=>{"use strict";Bt.exports=function(e){return e==null}});var fr=i((nd,Qt)=>{"use strict";var Ls=ge(),Cs=TypeError;Qt.exports=function(e){if(Ls(e))throw Cs("Can't call method on "+e);return e}});var H=i((od,$t)=>{"use strict";var Ns=Gt(),js=fr();$t.exports=function(e){return Ns(js(e))}});var zt=i((id,Wt)=>{"use strict";Wt.exports=function(){}});var G=i((ad,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((sd,Xt)=>{"use strict";var pr=typeof document=="object"&&document.all,Ms=typeof pr>"u"&&pr!==void 0;Xt.exports={all:pr,IS_HTMLDDA:Ms}});var O=i((ud,Zt)=>{"use strict";var Jt=vr(),ks=Jt.all;Zt.exports=Jt.IS_HTMLDDA?function(e){return typeof e=="function"||e===ks}:function(e){return typeof e=="function"}});var tn=i((ld,rn)=>{"use strict";var Ds=S(),Vs=O(),en=Ds.WeakMap;rn.exports=Vs(en)&&/native code/.test(String(en))});var B=i((cd,an)=>{"use strict";var nn=O(),on=vr(),Fs=on.all;an.exports=on.IS_HTMLDDA?function(e){return typeof e=="object"?e!==null:nn(e)||e===Fs}:function(e){return typeof e=="object"?e!==null:nn(e)}});var C=i((fd,sn)=>{"use strict";var Us=P();sn.exports=!Us(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var dr=i((pd,ln)=>{"use strict";var Gs=S(),un=B(),br=Gs.document,Bs=un(br)&&un(br.createElement);ln.exports=function(e){return Bs?br.createElement(e):{}}});var mr=i((vd,cn)=>{"use strict";var Qs=C(),$s=P(),Ws=dr();cn.exports=!Qs&&!$s(function(){return Object.defineProperty(Ws("div"),"a",{get:function(){return 7}}).a!=7})});var Tr=i((bd,fn)=>{"use strict";var zs=C(),Ks=P();fn.exports=zs&&Ks(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})});var k=i((dd,pn)=>{"use strict";var Ys=B(),Hs=String,Xs=TypeError;pn.exports=function(e){if(Ys(e))return e;throw Xs(Hs(e)+" is not an object")}});var D=i((md,vn)=>{"use strict";var Js=ne(),Oe=Function.prototype.call;vn.exports=Js?Oe.bind(Oe):function(){return Oe.apply(Oe,arguments)}});var xe=i((Td,bn)=>{"use strict";bn.exports={}});var gr=i((yd,mn)=>{"use strict";var yr=xe(),hr=S(),Zs=O(),dn=function(e){return Zs(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((hd,Tn)=>{"use strict";var eu=L();Tn.exports=eu({}.isPrototypeOf)});var hn=i((gd,yn)=>{"use strict";yn.exports=typeof navigator<"u"&&String(navigator.userAgent)||""});var wn=i((Id,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((Od,Rn)=>{"use strict";var qn=wn(),ru=P(),tu=S(),nu=tu.String;Rn.exports=!!Object.getOwnPropertySymbols&&!ru(function(){var e=Symbol();return!nu(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&qn&&qn<41})});var Er=i((xd,Pn)=>{"use strict";var ou=xr();Pn.exports=ou&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Sr=i((Ed,An)=>{"use strict";var iu=gr(),au=O(),su=Ir(),uu=Er(),lu=Object;An.exports=uu?function(e){return typeof e=="symbol"}:function(e){var r=iu("Symbol");return au(r)&&su(r.prototype,lu(e))}});var Se=i((Sd,_n)=>{"use strict";var cu=String;_n.exports=function(e){try{return cu(e)}catch{return"Object"}}});var oe=i((wd,Ln)=>{"use strict";var fu=O(),pu=Se(),vu=TypeError;Ln.exports=function(e){if(fu(e))return e;throw vu(pu(e)+" is not a function")}});var we=i((qd,Cn)=>{"use strict";var bu=oe(),du=ge();Cn.exports=function(e,r){var t=e[r];return du(t)?void 0:bu(t)}});var jn=i((Rd,Nn)=>{"use strict";var wr=D(),qr=O(),Rr=B(),mu=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 mu("Can't convert object to primitive value")}});var ie=i((Pd,Mn)=>{"use strict";Mn.exports=!0});var Vn=i((Ad,Dn)=>{"use strict";var kn=S(),Tu=Object.defineProperty;Dn.exports=function(e,r){try{Tu(kn,e,{value:r,configurable:!0,writable:!0})}catch{kn[e]=r}return r}});var Pr=i((_d,Un)=>{"use strict";var yu=S(),hu=Vn(),Fn="__core-js_shared__",gu=yu[Fn]||hu(Fn,{});Un.exports=gu});var Ar=i((Ld,Bn)=>{"use strict";var Iu=ie(),Gn=Pr();(Bn.exports=function(e,r){return Gn[e]||(Gn[e]=r!==void 0?r:{})})("versions",[]).push({version:"3.31.0",mode:Iu?"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,Qn)=>{"use strict";var Ou=fr(),xu=Object;Qn.exports=function(e){return xu(Ou(e))}});var N=i((Nd,$n)=>{"use strict";var Eu=L(),Su=_r(),wu=Eu({}.hasOwnProperty);$n.exports=Object.hasOwn||function(r,t){return wu(Su(r),t)}});var Lr=i((jd,Wn)=>{"use strict";var qu=L(),Ru=0,Pu=Math.random(),Au=qu(1 .toString);Wn.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Au(++Ru+Pu,36)}});var A=i((Md,Kn)=>{"use strict";var _u=S(),Lu=Ar(),zn=N(),Cu=Lr(),Nu=xr(),ju=Er(),X=_u.Symbol,Cr=Lu("wks"),Mu=ju?X.for||X:X&&X.withoutSetter||Cu;Kn.exports=function(e){return zn(Cr,e)||(Cr[e]=Nu&&zn(X,e)?X[e]:Mu("Symbol."+e)),Cr[e]}});var Jn=i((kd,Xn)=>{"use strict";var ku=D(),Yn=B(),Hn=Sr(),Du=we(),Vu=jn(),Fu=A(),Uu=TypeError,Gu=Fu("toPrimitive");Xn.exports=function(e,r){if(!Yn(e)||Hn(e))return e;var t=Du(e,Gu),n;if(t){if(r===void 0&&(r="default"),n=ku(t,e,r),!Yn(n)||Hn(n))return n;throw Uu("Can't convert object to primitive value")}return r===void 0&&(r="number"),Vu(e,r)}});var qe=i((Dd,Zn)=>{"use strict";var Bu=Jn(),Qu=Sr();Zn.exports=function(e){var r=Bu(e,"string");return Qu(r)?r:r+""}});var J=i(ro=>{"use strict";var $u=C(),Wu=mr(),zu=Tr(),Re=k(),eo=qe(),Ku=TypeError,Nr=Object.defineProperty,Yu=Object.getOwnPropertyDescriptor,jr="enumerable",Mr="configurable",kr="writable";ro.f=$u?zu?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=Yu(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),Wu)try{return Nr(r,t,n)}catch{}if("get"in n||"set"in n)throw Ku("Accessors not supported");return"value"in n&&(r[t]=n.value),r}});var ae=i((Fd,to)=>{"use strict";to.exports=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}});var Q=i((Ud,no)=>{"use strict";var Hu=C(),Xu=J(),Ju=ae();no.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((Gd,io)=>{"use strict";var Zu=Ar(),el=Lr(),oo=Zu("keys");io.exports=function(e){return oo[e]||(oo[e]=el(e))}});var Ae=i((Bd,ao)=>{"use strict";ao.exports={}});var co=i((Qd,lo)=>{"use strict";var rl=tn(),uo=S(),tl=B(),nl=Q(),Dr=N(),Vr=Pr(),ol=Pe(),il=Ae(),so="Object already initialized",Fr=uo.TypeError,al=uo.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 Fr("Incompatible receiver, "+e+" required");return t}};rl||Vr.state?(R=Vr.state||(Vr.state=new al),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)}):($=ol("state"),il[$]=!0,_e=function(e,r){if(Dr(e,$))throw Fr(so);return r.facade=e,nl(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:sl,getterFor:ul}});var mo=i(($d,bo)=>{"use strict";var ll=ne(),vo=Function.prototype,fo=vo.apply,po=vo.call;bo.exports=typeof Reflect=="object"&&Reflect.apply||(ll?po.bind(fo):function(){return po.apply(fo,arguments)})});var Ur=i((Wd,To)=>{"use strict";var cl=he(),fl=L();To.exports=function(e){if(cl(e)==="Function")return fl(e)}});var Io=i(go=>{"use strict";var yo={}.propertyIsEnumerable,ho=Object.getOwnPropertyDescriptor,pl=ho&&!yo.call({1:2},1);go.f=pl?function(r){var t=ho(this,r);return!!t&&t.enumerable}:yo});var Eo=i(xo=>{"use strict";var vl=C(),bl=D(),dl=Io(),ml=ae(),Tl=H(),yl=qe(),hl=N(),gl=mr(),Oo=Object.getOwnPropertyDescriptor;xo.f=vl?Oo:function(r,t){if(r=Tl(r),t=yl(t),gl)try{return Oo(r,t)}catch{}if(hl(r,t))return ml(!bl(dl.f,r,t),r[t])}});var wo=i((Yd,So)=>{"use strict";var Il=P(),Ol=O(),xl=/#|\.prototype\./,ue=function(e,r){var t=Sl[El(e)];return t==ql?!0:t==wl?!1:Ol(r)?Il(r):!!r},El=ue.normalize=function(e){return String(e).replace(xl,".").toLowerCase()},Sl=ue.data={},wl=ue.NATIVE="N",ql=ue.POLYFILL="P";So.exports=ue});var Gr=i((Hd,Ro)=>{"use strict";var qo=Ur(),Rl=oe(),Pl=ne(),Al=qo(qo.bind);Ro.exports=function(e,r){return Rl(e),r===void 0?e:Pl?Al(e,r):function(){return e.apply(r,arguments)}}});var Br=i((Xd,Ao)=>{"use strict";var Ce=S(),_l=mo(),Ll=Ur(),Cl=O(),Nl=Eo().f,jl=wo(),Z=xe(),Ml=Gr(),ee=Q(),Po=N(),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};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,c,l,p,b,d,m,y,I,h;for(b in r)c=jl(n?b:t+(o?".":"#")+b,e.forced),l=!c&&s&&Po(s,b),m=u[b],l&&(e.dontCallGetSet?(h=Nl(s,b),y=h&&h.value):y=s[b]),d=l&&y?y:r[b],!(l&&typeof m==typeof d)&&(e.bind&&l?I=Ml(d,Ce):e.wrap&&l?I=kl(d):a&&Cl(d)?I=Ll(d):I=d,(e.sham||d&&d.sham||m&&m.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&&(c||!f[b])&&ee(f,b,d)))}});var Co=i((Jd,Lo)=>{"use strict";var Qr=C(),Dl=N(),_o=Function.prototype,Vl=Qr&&Object.getOwnPropertyDescriptor,$r=Dl(_o,"name"),Fl=$r&&function(){}.name==="something",Ul=$r&&(!Qr||Qr&&Vl(_o,"name").configurable);Lo.exports={EXISTS:$r,PROPER:Fl,CONFIGURABLE:Ul}});var jo=i((Zd,No)=>{"use strict";var Gl=Math.ceil,Bl=Math.floor;No.exports=Math.trunc||function(r){var t=+r;return(t>0?Bl:Gl)(t)}});var Wr=i((em,Mo)=>{"use strict";var Ql=jo();Mo.exports=function(e){var r=+e;return r!==r||r===0?0:Ql(r)}});var Do=i((rm,ko)=>{"use strict";var $l=Wr(),Wl=Math.max,zl=Math.min;ko.exports=function(e,r){var t=$l(e);return t<0?Wl(t+r,0):zl(t,r)}});var Fo=i((tm,Vo)=>{"use strict";var Kl=Wr(),Yl=Math.min;Vo.exports=function(e){return e>0?Yl(Kl(e),9007199254740991):0}});var zr=i((nm,Uo)=>{"use strict";var Hl=Fo();Uo.exports=function(e){return Hl(e.length)}});var Qo=i((om,Bo)=>{"use strict";var Xl=H(),Jl=Do(),Zl=zr(),Go=function(e){return function(r,t,n){var o=Xl(r),a=Zl(o),s=Jl(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}};Bo.exports={includes:Go(!0),indexOf:Go(!1)}});var zo=i((im,Wo)=>{"use strict";var ec=L(),Kr=N(),rc=H(),tc=Qo().indexOf,nc=Ae(),$o=ec([].push);Wo.exports=function(e,r){var t=rc(e),n=0,o=[],a;for(a in t)!Kr(nc,a)&&Kr(t,a)&&$o(o,a);for(;r.length>n;)Kr(t,a=r[n++])&&(~tc(o,a)||$o(o,a));return o}});var Yr=i((am,Ko)=>{"use strict";Ko.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var Ho=i((sm,Yo)=>{"use strict";var oc=zo(),ic=Yr();Yo.exports=Object.keys||function(r){return oc(r,ic)}});var Jo=i(Xo=>{"use strict";var ac=C(),sc=Tr(),uc=J(),lc=k(),cc=H(),fc=Ho();Xo.f=ac&&!sc?Object.defineProperties:function(r,t){lc(r);for(var n=cc(t),o=fc(t),a=o.length,s=0,u;a>s;)uc.f(r,u=o[s++],n[u]);return r}});var ei=i((lm,Zo)=>{"use strict";var pc=gr();Zo.exports=pc("document","documentElement")});var Zr=i((cm,si)=>{"use strict";var vc=k(),bc=Jo(),ri=Yr(),dc=Ae(),mc=ei(),Tc=dr(),yc=Pe(),ti=">",ni="<",Xr="prototype",Jr="script",ii=yc("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},hc=function(){var e=Tc("iframe"),r="java"+Jr+":",t;return e.style.display="none",mc.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):hc():oi(Ne);for(var e=ri.length;e--;)delete je[Xr][ri[e]];return je()};dc[ii]=!0;si.exports=Object.create||function(r,t){var n;return r!==null?(Hr[Xr]=vc(r),n=new Hr,Hr[Xr]=null,n[ii]=r):n=je(),t===void 0?n:bc.f(n,t)}});var li=i((fm,ui)=>{"use strict";var gc=P();ui.exports=!gc(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})});var rt=i((pm,fi)=>{"use strict";var Ic=N(),Oc=O(),xc=_r(),Ec=Pe(),Sc=li(),ci=Ec("IE_PROTO"),et=Object,wc=et.prototype;fi.exports=Sc?et.getPrototypeOf:function(e){var r=xc(e);if(Ic(r,ci))return r[ci];var t=r.constructor;return Oc(t)&&r instanceof t?t.prototype:r instanceof et?wc:null}});var tt=i((vm,pi)=>{"use strict";var qc=Q();pi.exports=function(e,r,t,n){return n&&n.enumerable?e[r]=t:qc(e,r,t),e}});var at=i((bm,di)=>{"use strict";var Rc=P(),Pc=O(),Ac=B(),_c=Zr(),vi=rt(),Lc=tt(),Cc=A(),Nc=ie(),it=Cc("iterator"),bi=!1,j,nt,ot;[].keys&&(ot=[].keys(),"next"in ot?(nt=vi(vi(ot)),nt!==Object.prototype&&(j=nt)):bi=!0);var jc=!Ac(j)||Rc(function(){var e={};return j[it].call(e)!==e});jc?j={}:Nc&&(j=_c(j));Pc(j[it])||Lc(j,it,function(){return this});di.exports={IteratorPrototype:j,BUGGY_SAFARI_ITERATORS:bi}});var Me=i((dm,Ti)=>{"use strict";var Mc=A(),kc=Mc("toStringTag"),mi={};mi[kc]="z";Ti.exports=String(mi)==="[object z]"});var De=i((mm,yi)=>{"use strict";var Dc=Me(),Vc=O(),ke=he(),Fc=A(),Uc=Fc("toStringTag"),Gc=Object,Bc=ke(function(){return arguments}())=="Arguments",Qc=function(e,r){try{return e[r]}catch{}};yi.exports=Dc?ke:function(e){var r,t,n;return e===void 0?"Undefined":e===null?"Null":typeof(t=Qc(r=Gc(e),Uc))=="string"?t:Bc?ke(r):(n=ke(r))=="Object"&&Vc(r.callee)?"Arguments":n}});var gi=i((Tm,hi)=>{"use strict";var $c=Me(),Wc=De();hi.exports=$c?{}.toString:function(){return"[object "+Wc(this)+"]"}});var st=i((ym,Oi)=>{"use strict";var zc=Me(),Kc=J().f,Yc=Q(),Hc=N(),Xc=gi(),Jc=A(),Ii=Jc("toStringTag");Oi.exports=function(e,r,t,n){if(e){var o=t?e:e.prototype;Hc(o,Ii)||Kc(o,Ii,{configurable:!0,value:r}),n&&!zc&&Yc(o,"toString",Xc)}}});var Ei=i((hm,xi)=>{"use strict";var Zc=at().IteratorPrototype,ef=Zr(),rf=ae(),tf=st(),nf=G(),of=function(){return this};xi.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 wi=i((gm,Si)=>{"use strict";var af=L(),sf=oe();Si.exports=function(e,r,t){try{return af(sf(Object.getOwnPropertyDescriptor(e,r)[t]))}catch{}}});var Ri=i((Im,qi)=>{"use strict";var uf=O(),lf=String,cf=TypeError;qi.exports=function(e){if(typeof e=="object"||uf(e))return e;throw cf("Can't set "+lf(e)+" as a prototype")}});var Ai=i((Om,Pi)=>{"use strict";var ff=wi(),pf=k(),vf=Ri();Pi.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{}return function(o,a){return pf(o),vf(a),e?t(o,a):o.__proto__=a,o}}():void 0)});var Ui=i((xm,Fi)=>{"use strict";var bf=Br(),df=D(),Ve=ie(),Di=Co(),mf=O(),Tf=Ei(),_i=rt(),Li=Ai(),yf=st(),hf=Q(),ut=tt(),gf=A(),Ci=G(),Vi=at(),If=Di.PROPER,Of=Di.CONFIGURABLE,Ni=Vi.IteratorPrototype,Fe=Vi.BUGGY_SAFARI_ITERATORS,le=gf("iterator"),ji="keys",ce="values",Mi="entries",ki=function(){return this};Fi.exports=function(e,r,t,n,o,a,s){Tf(t,r,n);var u=function(h){if(h===o&&b)return b;if(!Fe&&h in l)return l[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",c=!1,l=e.prototype,p=l[le]||l["@@iterator"]||o&&l[o],b=!Fe&&p||u(o),d=r=="Array"&&l.entries||p,m,y,I;if(d&&(m=_i(d.call(new e)),m!==Object.prototype&&m.next&&(!Ve&&_i(m)!==Ni&&(Li?Li(m,Ni):mf(m[le])||ut(m,le,ki)),yf(m,f,!0,!0),Ve&&(Ci[f]=ki))),If&&o==ce&&p&&p.name!==ce&&(!Ve&&Of?hf(l,"name",ce):(c=!0,b=function(){return df(p,this)})),o)if(y={values:u(ce),keys:a?b:u(ji),entries:u(Mi)},s)for(I in y)(Fe||c||!(I in l))&&ut(l,I,y[I]);else bf({target:r,proto:!0,forced:Fe||c},y);return(!Ve||s)&&l[le]!==b&&ut(l,le,b,{name:o}),Ci[r]=b,y}});var Bi=i((Em,Gi)=>{"use strict";Gi.exports=function(e,r){return{value:e,done:r}}});var ct=i((Sm,Ki)=>{"use strict";var xf=H(),lt=zt(),Qi=G(),Wi=co(),Ef=J().f,Sf=Ui(),Ue=Bi(),wf=ie(),qf=C(),zi="Array Iterator",Rf=Wi.set,Pf=Wi.getterFor(zi);Ki.exports=Sf(Array,"Array",function(e,r){Rf(this,{type:zi,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 $i=Qi.Arguments=Qi.Array;lt("keys");lt("values");lt("entries");if(!wf&&qf&&$i.name!=="values")try{Ef($i,"name",{value:"values"})}catch{}});var Hi=i((wm,Yi)=>{"use strict";var Af=A(),_f=G(),Lf=Af("iterator"),Cf=Array.prototype;Yi.exports=function(e){return e!==void 0&&(_f.Array===e||Cf[Lf]===e)}});var ft=i((qm,Ji)=>{"use strict";var Nf=De(),Xi=we(),jf=ge(),Mf=G(),kf=A(),Df=kf("iterator");Ji.exports=function(e){if(!jf(e))return Xi(e,Df)||Xi(e,"@@iterator")||Mf[Nf(e)]}});var ea=i((Rm,Zi)=>{"use strict";var Vf=D(),Ff=oe(),Uf=k(),Gf=Se(),Bf=ft(),Qf=TypeError;Zi.exports=function(e,r){var t=arguments.length<2?Bf(e):r;if(Ff(t))return Uf(Vf(t,e));throw Qf(Gf(e)+" is not iterable")}});var na=i((Pm,ta)=>{"use strict";var $f=D(),ra=k(),Wf=we();ta.exports=function(e,r,t){var n,o;ra(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 ra(n),t}});var ua=i((Am,sa)=>{"use strict";var zf=Gr(),Kf=D(),Yf=k(),Hf=Se(),Xf=Hi(),Jf=zr(),oa=Ir(),Zf=ea(),ep=ft(),ia=na(),rp=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=zf(r,n),c,l,p,b,d,m,y,I=function(g){return c&&ia(c,"normal",g),new Ge(!0,g)},h=function(g){return o?(Yf(g),u?f(g[0],g[1],I):f(g[0],g[1])):u?f(g,I):f(g)};if(a)c=e.iterator;else if(s)c=e;else{if(l=ep(e),!l)throw rp(Hf(e)+" is not iterable");if(Xf(l)){for(p=0,b=Jf(e);b>p;p++)if(d=h(e[p]),d&&oa(aa,d))return d;return new Ge(!1)}c=Zf(e,l)}for(m=a?e.next:c.next;!(y=Kf(m,c)).done;){try{d=h(y.value)}catch(g){ia(c,"throw",g)}if(typeof d=="object"&&d&&oa(aa,d))return d}return new Ge(!1)}});var ca=i((_m,la)=>{"use strict";var tp=qe(),np=J(),op=ae();la.exports=function(e,r,t){var n=tp(r);n in e?np.f(e,n,op(0,t)):e[n]=t}});var fa=i(()=>{"use strict";var ip=Br(),ap=ua(),sp=ca();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 va=i((Nm,pa)=>{"use strict";ct();fa();var up=xe();pa.exports=up.Object.fromEntries});var da=i((jm,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 lp=da(),cp=S(),fp=De(),pp=Q(),ma=G(),vp=A(),Ta=vp("toStringTag");for(Be in lp)pt=cp[Be],Qe=pt&&pt.prototype,Qe&&fp(Qe)!==Ta&&pp(Qe,Ta,Be),ma[Be]=ma.Array;var pt,Qe,Be});var ga=i((Dm,ha)=>{"use strict";var bp=va();ya();ha.exports=bp});var Oa=i((Vm,Ia)=>{"use strict";var dp=ga();Ia.exports=dp});var ja="1.0.38-beta.1";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(),c.remove()});let a=()=>{u(),o()},s=()=>{u(),n()},u=()=>{f&&clearTimeout(f),c.removeEventListener("load",s),c.removeEventListener("error",a)},f;t&&(f=window.setTimeout(a,t));let c=document.createElement("script");c.addEventListener("load",s),c.addEventListener("error",a),c.src=e,document.head.appendChild(c)});var Ga=typeof window.performance?.now=="function"?()=>window.performance.now():()=>Date.now();var Ba=(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.SamsungBrowser="SamsungBrowser",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=/samsungbrowser/i.test(e)?"SamsungBrowser":void 0,n=/chrome|crios/i.test(e)?"Chrome":void 0,o=/chromium/i.test(e)?"Chromium":void 0,a=/firefox|fxios/i.test(e)?"Firefox":void 0,s=/webkit|safari|khtml/i.test(e)?"Safari":void 0,u=/opr\//i.test(e)?"Opera":void 0,f=/edg/i.test(e)?"Edge":void 0,c=/android/i.test(e)?"Android":void 0,l=/iphone/i.test(e)?"iPhone":void 0,p=/ipad/i.test(e)?"iPad":void 0,b=/ipod/i.test(e)?"iPod":void 0,d=/mac/i.test(e)?"Mac":void 0,m=/webOS|BlackBerry|IEMobile|Opera Mini/i.test(e)?"RestMobile":void 0;return{browser:r||t||a||u||f||n||o||s||"Rest",device:c||l||p||b||m||d||"Desktop"}},Qa=(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=(l=>(l.INVARIANT="Invariant quality",l.Q_144P="144p",l.Q_240P="240p",l.Q_360P="360p",l.Q_480P="480p",l.Q_720P="720p",l.Q_1080P="1080p",l.Q_1440P="1440p",l.Q_2160P="2160p",l.Q_4320P="4320p",l))(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 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 Je(e,r=0,t){let n,o,a,s,u,f,c=0,l=!1,p=!1,b=!0,d=!r&&r!==0&&typeof window.requestAnimationFrame=="function";t&&(l=!!t.leading,p="maxWait"in t,a=t?.maxWait?Math.max(+t?.maxWait||0,r):a,b="trailing"in t?!!t.trailing:b);function m(T){let w=n,V=o;return n=o=void 0,c=T,s=e.apply(V,w),s}function y(T,w){return d?(u&&window.cancelAnimationFrame(u),window.requestAnimationFrame(T)):setTimeout(T,w)}function I(T){if(d){window.cancelAnimationFrame(T);return}clearTimeout(T)}function h(T){return c=T,u=y(fe,r),l?m(T):s}function g(T){let w=T-f,V=T-c,dt=r-w;return p?Math.min(dt,a-V):dt}function vt(T){let w=T-f,V=T-c;return f===void 0||w>=r||w<0||p&&V>=a}function fe(){let T=Date.now();if(vt(T))return bt(T);u=y(fe,g(T))}function bt(T){return u=void 0,b&&n?m(T):(n=o=void 0,s)}function Ea(){u!==void 0&&I(u),c=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(...T){let w=Date.now(),V=vt(w);if(n=T,o=this,f=w,V){if(u===void 0)return h(f);if(p)return u=y(fe,r),m(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,c;u.contentBoxSize&&u.contentBoxSize[0]?(c=u.contentBoxSize[0].blockSize,f=u.contentBoxSize[0].inlineSize):u.contentRect&&(f=u.contentRect.width,c=u.contentRect.height),W(f)&&W(c)&&t.next({width:f,height:c})},r));return a.observe(e),()=>a.disconnect()});var ms=e=>{e.removeAttribute("src"),e.load()};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 Ts=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 gs=(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 Is={leading:!1,trailing:!0};function xt(e,r=Is){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 Os={leading:!0,trailing:!1};function Et(e,r=Os){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 xs=(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))(xs||{});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(c,l){let p;l&&l.signal&&(p=l.signal,delete l.signal);let b=new t(c,l);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,c)=>{let l=a&&a.prototype.isPrototypeOf(f)?f.signal:c?c.signal:void 0;if(l){let p;try{p=new DOMException("Aborted","AbortError")}catch{p=new Error("Aborted"),p.name="AbortError"}if(l.aborted)return Promise.reject(p);let b=new Promise((d,m)=>{l.addEventListener("abort",()=>m(p),{once:!0})});return c&&c.signal&&delete c.signal,Promise.race([b,s(f,c)])}return s(f,c)},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,zb=te?Lt.Request:window.Request,Kb=te?re:window.AbortController,Yb=te?Y:window.AbortSignal;var xa=Na(Oa(),1),mp=(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))(mp||{}),Tp="vk.com",Um=async(e,r,t)=>{let n=new URL(`https://${Tp}/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 yp(a,t)},yp=(e,r)=>(0,xa.default)(Object.entries(e.keys).map(([t,n])=>[t.substring(`${r}_`.length),hp(n)])),hp=e=>Array.isArray(e)?e[0]:e;var gp=(t=>(t.RU="ru",t.EN="en",t))(gp||{});export{mt as CurrentClientBrowser,Tt as CurrentClientDevice,xs as ErrorCategory,gp as InterfaceLanguage,We as Logger,v as Observable,M as Subject,x as Subscription,ja as VERSION,mp as VKNumericLanguage,de as ValueSubject,Ye as VideoQuality,Ba 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,ms as clearVideoElement,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,gs as fromEvent,ve as getCurrentBrowser,Ya as getExponentialDelay,as as getHighestQuality,$a as getIOSVersion,ys as interval,Wa as isAndroid,ns as isHigher,os as isHigherOrEqual,Qa as isIOS,Xe as isInvariantQuality,He as isLower,is as isLowerOrEqual,za as isMacLike,Ka as isMobile,W as isNonNullable,ze as isNullable,Um as loadVKLangPack,me as map,Rt as mapTo,It as merge,F as noop,Ga as now,hs as observableFrom,ds as observeElementSize,Pt as once,At as pairwise,yt as safeStorage,_t as tap,Et as throttle,Ze as throttleFn,Hp as timeCodeToString,Ts as timeout,ss as videoHeightToQuality,ls as videoQualityToHeight,us as videoSizeToQuality};
package/evergreen.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @vkontakte/videoplayer-shared v1.0.38-beta.0
3
- * Wed, 07 Aug 2024 14:12:32 GMT
2
+ * @vkontakte/videoplayer-shared v1.0.38-beta.1
3
+ * Thu, 08 Aug 2024 11:57:05 GMT
4
4
  * https://st.mycdn.me/static/vkontakte-videoplayer/1-0-38/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.38-beta.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 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 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 it=t=>{t.removeAttribute("src"),t.load()};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 st=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 at=t=>new l(e=>{let r=window.setInterval(()=>e.next(),t);return()=>{r&&(window.clearInterval(r),r=void 0)}});var lt=t=>new l(e=>{t.forEach(r=>e.next(r))});var ut=(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 ct={leading:!1,trailing:!0};function ae(t,e=ct){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 pt={leading:!0,trailing:!1};function le(t,e=pt){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 bt=(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))(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",Dn=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 i=await(await fetch(n.toString())).json();return mt(i,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{ee as CurrentClientBrowser,te as CurrentClientDevice,bt as ErrorCategory,vt as InterfaceLanguage,V as Logger,l as Observable,I as Subject,f as Subscription,we as VERSION,dt 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,it as clearVideoElement,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,ut as fromEvent,L as getCurrentBrowser,De as getExponentialDelay,$e as getHighestQuality,Ne as getIOSVersion,at 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,Dn as loadVKLangPack,N as map,be as mapTo,ie as merge,g as noop,Le as now,lt as observableFrom,ot as observeElementSize,de as once,fe as pairwise,re as safeStorage,me as tap,le as throttle,z as throttleFn,Ht as timeCodeToString,st 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.38-beta.1";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 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 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 it=t=>{t.removeAttribute("src"),t.load()};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 st=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 at=t=>new l(e=>{let r=window.setInterval(()=>e.next(),t);return()=>{r&&(window.clearInterval(r),r=void 0)}});var lt=t=>new l(e=>{t.forEach(r=>e.next(r))});var ut=(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 ct={leading:!1,trailing:!0};function ae(t,e=ct){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 pt={leading:!0,trailing:!1};function le(t,e=pt){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 bt=(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))(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",Dn=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 i=await(await fetch(n.toString())).json();return mt(i,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{ee as CurrentClientBrowser,te as CurrentClientDevice,bt as ErrorCategory,vt as InterfaceLanguage,V as Logger,l as Observable,I as Subject,f as Subscription,we as VERSION,dt 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,it as clearVideoElement,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,ut as fromEvent,L as getCurrentBrowser,De as getExponentialDelay,$e as getHighestQuality,Ne as getIOSVersion,at 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,Dn as loadVKLangPack,N as map,be as mapTo,ie as merge,g as noop,Le as now,lt as observableFrom,ot as observeElementSize,de as once,fe as pairwise,re as safeStorage,me as tap,le as throttle,z as throttleFn,Ht as timeCodeToString,st 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.38-beta.0",
3
+ "version": "1.0.38-beta.1",
4
4
  "author": "vk.com",
5
5
  "description": "Shared code for vk.com videoplayer",
6
6
  "homepage": "https://vk.com",