@vkontakte/videoplayer-shared 1.0.31-dev.2d3fd91.0 → 1.0.31-dev.680271f.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es2015.cjs.js +3 -3
- package/es2015.esm.js +3 -3
- package/es2018.cjs.js +3 -3
- package/es2018.esm.js +3 -3
- package/es5.umd.js +3112 -0
- package/esnext.cjs.js +3 -3
- package/esnext.esm.js +3 -3
- package/evergreen.esm.js +3 -3
- package/package.json +5 -3
package/es2018.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer-shared v1.0.31-dev.
|
|
3
|
-
* Tue,
|
|
2
|
+
* @vkontakte/videoplayer-shared v1.0.31-dev.680271f.0
|
|
3
|
+
* Tue, 09 Jan 2024 09:52:53 GMT
|
|
4
4
|
* https://st.mycdn.me/static/vkontakte-videoplayer/1-0-31/doc/
|
|
5
5
|
*/
|
|
6
|
-
const Yc="1.0.31-dev.2d3fd91.0";class dr{constructor(){this.subscriptions=[]}unsubscribe(){const e=this.subscriptions;this.subscriptions=[],e.forEach(t=>typeof t=="function"?t():t.unsubscribe())}add(e){return this.subscriptions.push(e),this}}const V=r=>{throw new Error(`${r} is value of unexpected type`)},zc=r=>{},Q=()=>{};class y{constructor(e){e&&(this._subscribe=e)}subscribe(e,t){var n;let a;t?typeof t=="function"?a={next:t,error:Q}:a={next:s=>t.next(s),error:s=>{var v;return(v=t.error)===null||v===void 0?void 0:v.call(t,s)}}:a={next:Q,error:Q};const o=typeof e=="function"?{next:s=>{try{e(s)}catch(v){a.next(v)}},error:s=>a.next(s)}:{next:s=>e.next(s),error:s=>e.error?e.error(s):a.next(s)};let i;try{i=this._subscribe(o)}catch(s){(n=o.error)===null||n===void 0||n.call(o,s)}return new dr().add(()=>{switch(o.next=Q,o.error=Q,typeof i){case"function":i();return;case"object":i.unsubscribe();return;case"undefined":return;default:return V(i)}})}pipe(...e){return e.reduce((t,n)=>n(t),this)}_subscribe(e){}}class at extends y{constructor(){super(),this.keyCounter=0,this.subscribers=new Map}next(e){this.subscribers.forEach(t=>t.next(e))}error(e){this.subscribers.forEach(t=>{var n;return(n=t.error)===null||n===void 0?void 0:n.call(t,e)})}_subscribe(e){const t=this.keyCounter++;return this.subscribers.set(t,e),new dr().add(()=>this.subscribers.delete(t))}}class Qc{constructor(){this.log$=new at,this.logs=[],this.log=e=>{const t={...e,timestamp:Date.now()};this.logs.push(t),this.log$.next(t)},this.getAllLogs=()=>this.logs}createCustomLog(e){return(...t)=>{let n;try{n=e(...t)}catch(a){n={message:"error in `createCustomLog`",component:"Logger"}}this.log(n)}}createComponentLog(e){return this.createCustomLog(t=>({component:e,...t}))}}function Wc(r,e='Assertion "value is not nullable" failed'){if(r==null)throw new Error(e)}function Hc(r,e='Assertion "value is nullable" failed'){if(r!=null)throw new Error(e)}function cn(r){return typeof r!="undefined"&&r!==null}function ln(r){return r==null}function Xc(r,e){if(!(r!=null&&r.length))throw new Error(e)}function Jc(r,e){if(r!=null&&r.length)throw new Error(e)}const Zc=(r,e,t)=>new Promise((n,a)=>{e.addEventListener("abort",()=>{s(),c.remove()});const o=()=>{s(),a()},i=()=>{s(),n()},s=()=>{v&&clearTimeout(v),c.removeEventListener("load",i),c.removeEventListener("error",o)};let v;t&&(v=window.setTimeout(o,t));const c=document.createElement("script");c.addEventListener("load",i),c.addEventListener("error",o),c.src=r,document.head.appendChild(c)});var br;const rl=typeof((br=window.performance)===null||br===void 0?void 0:br.now)=="function"?()=>window.performance.now():()=>Date.now(),el=(r,e)=>async(...t)=>{var n;const a=e(...t);let o=r.aborted,i;for(;!o&&!r.aborted;){const s=await a.next(i);o=(n=s.done)!==null&&n!==void 0?n:!1,i=s.value}return i};var _;(function(r){r.Unknown="Unknown",r.Yandex="Yandex",r.Chrome="Chrome",r.Chromium="Chromium",r.Firefox="Firefox",r.Safari="Safari",r.Opera="Opera",r.Edge="Edge",r.Rest="Rest"})(_||(_={}));var p;(function(r){r.Unknown="Unknown",r.Android="Android",r.iPhone="iPhone",r.iPad="iPad",r.iPod="iPod",r.RestMobile="RestMobile",r.Mac="Mac",r.Desktop="Desktop"})(p||(p={}));const ot=()=>{const{userAgent:r}=window.navigator,e=/yabrowser/i.test(r)?_.Yandex:void 0,t=/chrome|crios/i.test(r)?_.Chrome:void 0,n=/chromium/i.test(r)?_.Chromium:void 0,a=/firefox|fxios/i.test(r)?_.Firefox:void 0,o=/webkit|safari|khtml/i.test(r)?_.Safari:void 0,i=/opr\//i.test(r)?_.Opera:void 0,s=/edg/i.test(r)?_.Edge:void 0,v=/android/i.test(r)?p.Android:void 0,c=/iphone/i.test(r)?p.iPhone:void 0,l=/ipad/i.test(r)?p.iPad:void 0,f=/ipod/i.test(r)?p.iPod:void 0,u=/mac/i.test(r)?p.Mac:void 0,d=/webOS|BlackBerry|IEMobile|Opera Mini/i.test(r)?p.RestMobile:void 0;return{browser:e||a||i||s||t||n||o||_.Rest,device:v||c||l||f||d||u||p.Desktop}},tl=(r=!1)=>{const t=[p.iPhone,p.iPad,p.iPod].includes(ot().device);if(!r)return t;const{userAgent:n,maxTouchPoints:a}=window.navigator;return!!(t||/macintosh/i.test(n)&&a>0)},nl=()=>{const{userAgent:r}=window.navigator,e=r.match(/Version\/(\d+(\.\d+)?)/i);if(!e)return null;const t=e[1],n=parseFloat(t);return isNaN(n)?null:n},al=()=>[p.Mac,p.iPhone,p.iPad,p.iPod].includes(ot().device),ol=(r,{start:e=0,factor:t=2,max:n=1/0,min:a=e,random:o=0}={})=>{let i=e;return i*=t**r,i*=1+(Math.random()*o*2-o),i=Math.round(i),i=Math.min(i,n),i=Math.max(i,a),i};var h;(function(r){r[r.LOCAL_STORAGE=0]="LOCAL_STORAGE",r[r.SESSION_STORAGE=1]="SESSION_STORAGE",r[r.RUNTIME=2]="RUNTIME"})(h||(h={}));let b,M;const yr=`vk-videoplayer-dummy-key-${Math.random()}`,B=()=>{if(M!==void 0)return M;try{localStorage.setItem(yr,"test"),localStorage.removeItem(yr),M=h.LOCAL_STORAGE}catch(r){if(r instanceof DOMException||r instanceof TypeError)try{sessionStorage.getItem(yr),M=h.SESSION_STORAGE}catch(e){if(e instanceof DOMException||e instanceof TypeError)M=h.RUNTIME;else throw e}else throw r}return M===h.RUNTIME&&(b=new Map),M},un=()=>B()===h.LOCAL_STORAGE,vn=r=>{var e,t;const n=B();switch(n){case h.LOCAL_STORAGE:return(e=localStorage.getItem(r))!==null&&e!==void 0?e:void 0;case h.SESSION_STORAGE:return(t=sessionStorage.getItem(r))!==null&&t!==void 0?t:void 0;case h.RUNTIME:return b==null?void 0:b.get(r);default:V(n)}},fn=(r,e)=>{const t=B();switch(t){case h.LOCAL_STORAGE:try{localStorage.setItem(r,e)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case h.SESSION_STORAGE:try{sessionStorage.setItem(r,e)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case h.RUNTIME:return void(b==null?void 0:b.set(r,e));default:V(t)}},dn=r=>{var e;const t=B();switch(t){case h.LOCAL_STORAGE:return r in localStorage;case h.SESSION_STORAGE:return r in sessionStorage;case h.RUNTIME:return(e=b==null?void 0:b.has(r))!==null&&e!==void 0?e:!1;default:return V(t),!1}},hn=r=>{const e=B();switch(e){case h.LOCAL_STORAGE:return localStorage.removeItem(r);case h.SESSION_STORAGE:return sessionStorage.removeItem(r);case h.RUNTIME:return void(b==null?void 0:b.delete(r));default:V(e)}},pn=()=>{const r=B();switch(r){case h.LOCAL_STORAGE:return localStorage.clear();case h.SESSION_STORAGE:return sessionStorage.clear();case h.RUNTIME:return b==null?void 0:b.clear();default:V(r)}};var il=Object.freeze({__proto__:null,clear:pn,get:vn,has:dn,isPersistent:un,remove:hn,set:fn}),m;(function(r){r.INVARIANT="Invariant quality",r.Q_144P="144p",r.Q_240P="240p",r.Q_360P="360p",r.Q_480P="480p",r.Q_720P="720p",r.Q_1080P="1080p",r.Q_1440P="1440p",r.Q_2160P="2160p",r.Q_4320P="4320p"})(m||(m={}));const S={[m.Q_144P]:{width:256,height:144},[m.Q_240P]:{width:428,height:240},[m.Q_360P]:{width:640,height:360},[m.Q_480P]:{width:856,height:480},[m.Q_720P]:{width:1280,height:720},[m.Q_1080P]:{width:1920,height:1080},[m.Q_1440P]:{width:2560,height:1440},[m.Q_2160P]:{width:3840,height:2160},[m.Q_4320P]:{width:7680,height:4320}},sl=(r,e)=>S[r].height>S[e].height,cl=(r,e)=>S[r].height>=S[e].height,it=(r,e)=>S[r].height<S[e].height,ll=(r,e)=>S[r].height<=S[e].height,ul=r=>r.sort((e,t)=>e===t?0:e===m.INVARIANT?1:t===m.INVARIANT?-1:it(e,t)?1:-1)[0],st=Object.keys(S).sort((r,e)=>it(r,e)?-1:1),vl=(r,e=.02)=>[...st].find(n=>S[n].height*(1+e)>=r),fl=({width:r,height:e})=>{const t=Math.min(r,e),n=Math.max(r,e);return st.find(a=>{const o=S[a];return o.width>=n&&o.height>=t})},dl=r=>S[r].height,ct=r=>r===m.INVARIANT,hl=r=>r.every(e=>!ct(e));function pl(r){if(ct(r))throw new Error("Expected exact quality")}const bn=(r,e)=>{const t={};for(const n of Object.keys(e)){const a=e[n],o=r[n];Array.isArray(a)&&Array.isArray(o)?t[n]=o:typeof a=="object"&&typeof o=="object"?t[n]=bn(o,a):t[n]=n in r?o:a}return t};class bl extends at{constructor(e){super(),this.value=e}next(e){super.next(this.value=e)}error(e){super.error(this.value=e)}getValue(){return this.value}_subscribe(e){const t=super._subscribe(e);return e.next(this.value),t}}function yl(r){return new y(e=>{const t={};let n=Object.keys(r).length;const a=o=>i=>{o in t||n--,t[o]=i,n===0&&e.next(t)};return Object.entries(r).reduce((o,[i,s])=>o.add(s.subscribe(a(i))),new dr)})}function gl(...r){return new y(e=>r.reduce((t,n)=>t.add(n.subscribe(e)),new dr))}var Ol=r=>new y(e=>{const t=window.setTimeout(()=>{try{e.next()}catch(n){if(e.error)e.error(n);else throw n}},r);return()=>window.clearTimeout(t)}),$l=r=>new y(e=>{const t=window.setInterval(()=>e.next(),r);return()=>window.clearInterval(t)}),wl=r=>new y(e=>{r.forEach(t=>e.next(t))}),ml=(r,e)=>new y(t=>{const n=a=>t.next(a);return r.addEventListener(e,n),()=>r.removeEventListener(e,n)});function El(r){return e=>new y(t=>e.subscribe(new yn(t,r)))}class yn{constructor(e,t){this.destination=e,this.size=t,this.lastValues=[]}next(e){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(e),this.destination.next(this.lastValues)}error(e){var t,n;(n=(t=this.destination).error)===null||n===void 0||n.call(t,e)}}const gn={leading:!1,trailing:!0};function Sl(r,e=gn){return t=>new y(n=>t.subscribe(new On(n,r,e)))}class On{constructor(e,t,n){this.destination=e,this.time=t,this.config=n}next(e){this.lastValue=e,cn(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(t){if(this.destination.error)this.destination.error(t);else throw t}this.timeout=void 0},this.time)}error(e){var t,n;(n=(t=this.destination).error)===null||n===void 0||n.call(t,e)}}const $n={leading:!0,trailing:!1};function Tl(r,e=$n){return t=>new y(n=>t.subscribe(new wn(n,r,e)))}class wn{constructor(e,t,n){this.destination=e,this.time=t,this.config=n}next(e){this.lastValue=e,ln(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 t,n;(n=(t=this.destination).error)===null||n===void 0||n.call(t,e)}}function Il(r){return e=>new y(t=>e.subscribe(new mn(t,r)))}class mn{constructor(e,t){this.destination=e,this.predicate=t}next(e){let t;try{t=this.predicate(e)}catch(n){throw this.error(n),n}t&&this.destination.next(e)}error(e){var t,n;(n=(t=this.destination).error)===null||n===void 0||n.call(t,e)}}function Pl(r=(e,t)=>e===t){return e=>new y(t=>e.subscribe(new En(t,r)))}const ce={};class En{constructor(e,t){this.destination=e,this.predicate=t,this.lastValue=ce}next(e){let t;try{t=this.lastValue===ce||!this.predicate(this.lastValue,e),this.lastValue=e}catch(n){throw this.error(n),n}t&&this.destination.next(e)}error(e){var t,n;(n=(t=this.destination).error)===null||n===void 0||n.call(t,e)}}function Sn(r){return e=>new y(t=>e.subscribe(new Tn(t,r)))}let Tn=class{constructor(e,t){this.destination=e,this.mapper=t}next(e){let t;try{t=this.mapper(e)}catch(n){throw this.error(n),n}this.destination.next(t)}error(e){var t,n;(n=(t=this.destination).error)===null||n===void 0||n.call(t,e)}};function _l(r){return Sn(()=>r)}function Al(){return r=>new y(e=>{let t=!1,n=!1;const a=r.subscribe(o=>{t||(t=!0,e.next(o)),n&&a.unsubscribe()},o=>{var i;t=!0,(i=e.error)===null||i===void 0||i.call(e,o),n&&a.unsubscribe()});return n=!0,t&&a.unsubscribe(),a})}function jl(){return r=>new y(e=>r.subscribe(new In(e)))}class In{constructor(e){this.destination=e,this.hasLast=!1}next(e){const t=this.last;if(this.last=e,!this.hasLast){this.hasLast=!0;return}this.destination.next([t,e])}error(e){var t,n;(n=(t=this.destination).error)===null||n===void 0||n.call(t,e)}}function Ll(r){return e=>new y(t=>e.subscribe(new Pn(t,r)))}class Pn{constructor(e,t){this.destination=e,this.effect=t}next(e){try{this.effect(e)}catch(t){throw this.error(t),t}this.destination.next(e)}error(e){var t,n;(n=(t=this.destination).error)===null||n===void 0||n.call(t,e)}}var le;(function(r){r.NETWORK="network",r.VIDEO_PIPELINE="video_pipeline",r.EXTERNAL_API="external_api",r.PARSER="parser",r.DOM="dom",r.WTF="wtf"})(le||(le={}));class ue{constructor(){Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}addEventListener(e,t,n){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push({callback:t,options:n})}removeEventListener(e,t){if(!(e in this.listeners))return;const n=this.listeners[e];for(let a=0,o=n.length;a<o;a++)if(n[a].callback===t){n.splice(a,1);return}}dispatchEvent(e){if(!(e.type in this.listeners))return;const n=this.listeners[e.type].slice();for(let a=0,o=n.length;a<o;a++){const i=n[a];try{i.callback.call(this,e)}catch(s){Promise.resolve().then(()=>{throw s})}i.options&&i.options.once&&this.removeEventListener(e.type,i.callback)}return!e.defaultPrevented}}class lt extends ue{constructor(){super(),this.listeners||ue.call(this),Object.defineProperty(this,"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(this,"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(this,"reason",{value:void 0,writable:!0,configurable:!0})}toString(){return"[object AbortSignal]"}dispatchEvent(e){e.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,e)),super.dispatchEvent(e)}}class Rn{constructor(){Object.defineProperty(this,"signal",{value:new lt,writable:!0,configurable:!0})}abort(e){let t;try{t=new Event("abort")}catch(a){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=e;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(a){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&&(Rn.prototype[Symbol.toStringTag]="AbortController",lt.prototype[Symbol.toStringTag]="AbortSignal");function ut(r){return r.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof r.Request=="function"&&!r.Request.prototype.hasOwnProperty("signal")||!r.AbortController}function _n(r){typeof r=="function"&&(r={fetch:r});const{fetch:e,Request:t=e.Request,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:a=!1}=r;if(!ut({fetch:e,Request:t,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:a}))return{fetch:e,Request:o};let o=t;(o&&!o.prototype.hasOwnProperty("signal")||a)&&(o=function(c,l){let f;l&&l.signal&&(f=l.signal,delete l.signal);const u=new t(c,l);return f&&Object.defineProperty(u,"signal",{writable:!1,enumerable:!1,configurable:!0,value:f}),u},o.prototype=t.prototype);const i=e;return{fetch:(v,c)=>{const l=o&&o.prototype.isPrototypeOf(v)?v.signal:c?c.signal:void 0;if(l){let f;try{f=new DOMException("Aborted","AbortError")}catch(d){f=new Error("Aborted"),f.name="AbortError"}if(l.aborted)return Promise.reject(f);const u=new Promise((d,$)=>{l.addEventListener("abort",()=>$(f),{once:!0})});return c&&c.signal&&delete c.signal,Promise.race([u,i(v,c)])}return i(v,c)},Request:o}}const Wr=ut({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}),vt=Wr?_n({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}):void 0,An=Wr?vt.fetch:window.fetch;Wr?vt.Request:window.Request;var gr=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function jn(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var j=function(r){try{return!!r()}catch(e){return!0}},Ln=j,hr=!Ln(function(){var r=function(){}.bind();return typeof r!="function"||r.hasOwnProperty("prototype")}),ft=hr,dt=Function.prototype,kr=dt.call,xn=ft&&dt.bind.bind(kr,kr),N=ft?xn:function(r){return function(){return kr.apply(r,arguments)}},ht=N,Mn=ht({}.toString),Nn=ht("".slice),Hr=function(r){return Nn(Mn(r),8,-1)},Cn=N,Fn=j,Gn=Hr,Or=Object,Dn=Cn("".split),kn=Fn(function(){return!Or("z").propertyIsEnumerable(0)})?function(r){return Gn(r)=="String"?Dn(r,""):Or(r)}:Or,Xr=function(r){return r==null},Un=Xr,Vn=TypeError,pt=function(r){if(Un(r))throw Vn("Can't call method on "+r);return r},Bn=kn,Kn=pt,H=function(r){return Bn(Kn(r))},K={},Z=function(r){return r&&r.Math==Math&&r},I=Z(typeof globalThis=="object"&&globalThis)||Z(typeof window=="object"&&window)||Z(typeof self=="object"&&self)||Z(typeof gr=="object"&&gr)||function(){return this}()||gr||Function("return this")(),Ur=typeof document=="object"&&document.all,qn=typeof Ur=="undefined"&&Ur!==void 0,bt={all:Ur,IS_HTMLDDA:qn},yt=bt,Yn=yt.all,P=yt.IS_HTMLDDA?function(r){return typeof r=="function"||r===Yn}:function(r){return typeof r=="function"},zn=I,Qn=P,ve=zn.WeakMap,Wn=Qn(ve)&&/native code/.test(String(ve)),fe=P,gt=bt,Hn=gt.all,q=gt.IS_HTMLDDA?function(r){return typeof r=="object"?r!==null:fe(r)||r===Hn}:function(r){return typeof r=="object"?r!==null:fe(r)},Xn=j,C=!Xn(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Y={},Jn=I,de=q,Vr=Jn.document,Zn=de(Vr)&&de(Vr.createElement),Ot=function(r){return Zn?Vr.createElement(r):{}},ra=C,ea=j,ta=Ot,$t=!ra&&!ea(function(){return Object.defineProperty(ta("div"),"a",{get:function(){return 7}}).a!=7}),na=C,aa=j,wt=na&&aa(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),oa=q,ia=String,sa=TypeError,z=function(r){if(oa(r))return r;throw sa(ia(r)+" is not an object")},ca=hr,rr=Function.prototype.call,F=ca?rr.bind(rr):function(){return rr.apply(rr,arguments)},Jr={},$r=Jr,wr=I,la=P,he=function(r){return la(r)?r:void 0},mt=function(r,e){return arguments.length<2?he($r[r])||he(wr[r]):$r[r]&&$r[r][e]||wr[r]&&wr[r][e]},ua=N,Et=ua({}.isPrototypeOf),va=typeof navigator!="undefined"&&String(navigator.userAgent)||"",St=I,mr=va,pe=St.process,be=St.Deno,ye=pe&&pe.versions||be&&be.version,ge=ye&&ye.v8,T,ur;ge&&(T=ge.split("."),ur=T[0]>0&&T[0]<4?1:+(T[0]+T[1]));!ur&&mr&&(T=mr.match(/Edge\/(\d+)/),(!T||T[1]>=74)&&(T=mr.match(/Chrome\/(\d+)/),T&&(ur=+T[1])));var fa=ur,Oe=fa,da=j,ha=I,pa=ha.String,Tt=!!Object.getOwnPropertySymbols&&!da(function(){var r=Symbol();return!pa(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&Oe&&Oe<41}),ba=Tt,It=ba&&!Symbol.sham&&typeof Symbol.iterator=="symbol",ya=mt,ga=P,Oa=Et,$a=It,wa=Object,Pt=$a?function(r){return typeof r=="symbol"}:function(r){var e=ya("Symbol");return ga(e)&&Oa(e.prototype,wa(r))},ma=String,Zr=function(r){try{return ma(r)}catch(e){return"Object"}},Ea=P,Sa=Zr,Ta=TypeError,re=function(r){if(Ea(r))return r;throw Ta(Sa(r)+" is not a function")},Ia=re,Pa=Xr,ee=function(r,e){var t=r[e];return Pa(t)?void 0:Ia(t)},Er=F,Sr=P,Tr=q,Ra=TypeError,_a=function(r,e){var t,n;if(e==="string"&&Sr(t=r.toString)&&!Tr(n=Er(t,r))||Sr(t=r.valueOf)&&!Tr(n=Er(t,r))||e!=="string"&&Sr(t=r.toString)&&!Tr(n=Er(t,r)))return n;throw Ra("Can't convert object to primitive value")},Rt={exports:{}},$e=I,Aa=Object.defineProperty,ja=function(r,e){try{Aa($e,r,{value:e,configurable:!0,writable:!0})}catch(t){$e[r]=e}return e},La=I,xa=ja,we="__core-js_shared__",Ma=La[we]||xa(we,{}),_t=Ma,me=_t;(Rt.exports=function(r,e){return me[r]||(me[r]=e!==void 0?e:{})})("versions",[]).push({version:"3.31.0",mode:"pure",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 At=Rt.exports,Na=pt,Ca=Object,jt=function(r){return Ca(Na(r))},Fa=N,Ga=jt,Da=Fa({}.hasOwnProperty),x=Object.hasOwn||function(e,t){return Da(Ga(e),t)},ka=N,Ua=0,Va=Math.random(),Ba=ka(1 .toString),Lt=function(r){return"Symbol("+(r===void 0?"":r)+")_"+Ba(++Ua+Va,36)},Ka=I,qa=At,Ee=x,Ya=Lt,za=Tt,Qa=It,U=Ka.Symbol,Ir=qa("wks"),Wa=Qa?U.for||U:U&&U.withoutSetter||Ya,L=function(r){return Ee(Ir,r)||(Ir[r]=za&&Ee(U,r)?U[r]:Wa("Symbol."+r)),Ir[r]},Ha=F,Se=q,Te=Pt,Xa=ee,Ja=_a,Za=L,ro=TypeError,eo=Za("toPrimitive"),to=function(r,e){if(!Se(r)||Te(r))return r;var t=Xa(r,eo),n;if(t){if(e===void 0&&(e="default"),n=Ha(t,r,e),!Se(n)||Te(n))return n;throw ro("Can't convert object to primitive value")}return e===void 0&&(e="number"),Ja(r,e)},no=to,ao=Pt,te=function(r){var e=no(r,"string");return ao(e)?e:e+""},oo=C,io=$t,so=wt,er=z,Ie=te,co=TypeError,Pr=Object.defineProperty,lo=Object.getOwnPropertyDescriptor,Rr="enumerable",_r="configurable",Ar="writable";Y.f=oo?so?function(e,t,n){if(er(e),t=Ie(t),er(n),typeof e=="function"&&t==="prototype"&&"value"in n&&Ar in n&&!n[Ar]){var a=lo(e,t);a&&a[Ar]&&(e[t]=n.value,n={configurable:_r in n?n[_r]:a[_r],enumerable:Rr in n?n[Rr]:a[Rr],writable:!1})}return Pr(e,t,n)}:Pr:function(e,t,n){if(er(e),t=Ie(t),er(n),io)try{return Pr(e,t,n)}catch(a){}if("get"in n||"set"in n)throw co("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var pr=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}},uo=C,vo=Y,fo=pr,X=uo?function(r,e,t){return vo.f(r,e,fo(1,t))}:function(r,e,t){return r[e]=t,r},ho=At,po=Lt,Pe=ho("keys"),ne=function(r){return Pe[r]||(Pe[r]=po(r))},ae={},bo=Wn,xt=I,yo=q,go=X,jr=x,Lr=_t,Oo=ne,$o=ae,Re="Object already initialized",Br=xt.TypeError,wo=xt.WeakMap,vr,W,fr,mo=function(r){return fr(r)?W(r):vr(r,{})},Eo=function(r){return function(e){var t;if(!yo(e)||(t=W(e)).type!==r)throw Br("Incompatible receiver, "+r+" required");return t}};if(bo||Lr.state){var R=Lr.state||(Lr.state=new wo);R.get=R.get,R.has=R.has,R.set=R.set,vr=function(r,e){if(R.has(r))throw Br(Re);return e.facade=r,R.set(r,e),e},W=function(r){return R.get(r)||{}},fr=function(r){return R.has(r)}}else{var G=Oo("state");$o[G]=!0,vr=function(r,e){if(jr(r,G))throw Br(Re);return e.facade=r,go(r,G,e),e},W=function(r){return jr(r,G)?r[G]:{}},fr=function(r){return jr(r,G)}}var So={set:vr,get:W,has:fr,enforce:mo,getterFor:Eo},To=hr,Mt=Function.prototype,_e=Mt.apply,Ae=Mt.call,Io=typeof Reflect=="object"&&Reflect.apply||(To?Ae.bind(_e):function(){return Ae.apply(_e,arguments)}),Po=Hr,Ro=N,Nt=function(r){if(Po(r)==="Function")return Ro(r)},Ct={},Ft={},Gt={}.propertyIsEnumerable,Dt=Object.getOwnPropertyDescriptor,_o=Dt&&!Gt.call({1:2},1);Ft.f=_o?function(e){var t=Dt(this,e);return!!t&&t.enumerable}:Gt;var Ao=C,jo=F,Lo=Ft,xo=pr,Mo=H,No=te,Co=x,Fo=$t,je=Object.getOwnPropertyDescriptor;Ct.f=Ao?je:function(e,t){if(e=Mo(e),t=No(t),Fo)try{return je(e,t)}catch(n){}if(Co(e,t))return xo(!jo(Lo.f,e,t),e[t])};var Go=j,Do=P,ko=/#|\.prototype\./,J=function(r,e){var t=Vo[Uo(r)];return t==Ko?!0:t==Bo?!1:Do(e)?Go(e):!!e},Uo=J.normalize=function(r){return String(r).replace(ko,".").toLowerCase()},Vo=J.data={},Bo=J.NATIVE="N",Ko=J.POLYFILL="P",qo=J,Le=Nt,Yo=re,zo=hr,Qo=Le(Le.bind),kt=function(r,e){return Yo(r),e===void 0?r:zo?Qo(r,e):function(){return r.apply(e,arguments)}},tr=I,Wo=Io,Ho=Nt,Xo=P,Jo=Ct.f,Zo=qo,D=Jr,ri=kt,k=X,xe=x,ei=function(r){var e=function(t,n,a){if(this instanceof e){switch(arguments.length){case 0:return new r;case 1:return new r(t);case 2:return new r(t,n)}return new r(t,n,a)}return Wo(r,this,arguments)};return e.prototype=r.prototype,e},Ut=function(r,e){var t=r.target,n=r.global,a=r.stat,o=r.proto,i=n?tr:a?tr[t]:(tr[t]||{}).prototype,s=n?D:D[t]||k(D,t,{})[t],v=s.prototype,c,l,f,u,d,$,E,w,g;for(u in e)c=Zo(n?u:t+(a?".":"#")+u,r.forced),l=!c&&i&&xe(i,u),$=s[u],l&&(r.dontCallGetSet?(g=Jo(i,u),E=g&&g.value):E=i[u]),d=l&&E?E:e[u],!(l&&typeof $==typeof d)&&(r.bind&&l?w=ri(d,tr):r.wrap&&l?w=ei(d):o&&Xo(d)?w=Ho(d):w=d,(r.sham||d&&d.sham||$&&$.sham)&&k(w,"sham",!0),k(s,u,w),o&&(f=t+"Prototype",xe(D,f)||k(D,f,{}),k(D[f],u,d),r.real&&v&&(c||!v[u])&&k(v,u,d)))},Kr=C,ti=x,Vt=Function.prototype,ni=Kr&&Object.getOwnPropertyDescriptor,oe=ti(Vt,"name"),ai=oe&&function(){}.name==="something",oi=oe&&(!Kr||Kr&&ni(Vt,"name").configurable),ii={EXISTS:oe,PROPER:ai,CONFIGURABLE:oi},Bt={},si=Math.ceil,ci=Math.floor,li=Math.trunc||function(e){var t=+e;return(t>0?ci:si)(t)},ui=li,Kt=function(r){var e=+r;return e!==e||e===0?0:ui(e)},vi=Kt,fi=Math.max,di=Math.min,hi=function(r,e){var t=vi(r);return t<0?fi(t+e,0):di(t,e)},pi=Kt,bi=Math.min,yi=function(r){return r>0?bi(pi(r),9007199254740991):0},gi=yi,qt=function(r){return gi(r.length)},Oi=H,$i=hi,wi=qt,Me=function(r){return function(e,t,n){var a=Oi(e),o=wi(a),i=$i(n,o),s;if(r&&t!=t){for(;o>i;)if(s=a[i++],s!=s)return!0}else for(;o>i;i++)if((r||i in a)&&a[i]===t)return r||i||0;return!r&&-1}},mi={includes:Me(!0),indexOf:Me(!1)},Ei=N,xr=x,Si=H,Ti=mi.indexOf,Ii=ae,Ne=Ei([].push),Pi=function(r,e){var t=Si(r),n=0,a=[],o;for(o in t)!xr(Ii,o)&&xr(t,o)&&Ne(a,o);for(;e.length>n;)xr(t,o=e[n++])&&(~Ti(a,o)||Ne(a,o));return a},Yt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ri=Pi,_i=Yt,Ai=Object.keys||function(e){return Ri(e,_i)},ji=C,Li=wt,xi=Y,Mi=z,Ni=H,Ci=Ai;Bt.f=ji&&!Li?Object.defineProperties:function(e,t){Mi(e);for(var n=Ni(t),a=Ci(t),o=a.length,i=0,s;o>i;)xi.f(e,s=a[i++],n[s]);return e};var Fi=mt,Gi=Fi("document","documentElement"),Di=z,ki=Bt,Ce=Yt,Ui=ae,Vi=Gi,Bi=Ot,Ki=ne,Fe=">",Ge="<",qr="prototype",Yr="script",zt=Ki("IE_PROTO"),Mr=function(){},Qt=function(r){return Ge+Yr+Fe+r+Ge+"/"+Yr+Fe},De=function(r){r.write(Qt("")),r.close();var e=r.parentWindow.Object;return r=null,e},qi=function(){var r=Bi("iframe"),e="java"+Yr+":",t;return r.style.display="none",Vi.appendChild(r),r.src=String(e),t=r.contentWindow.document,t.open(),t.write(Qt("document.F=Object")),t.close(),t.F},nr,sr=function(){try{nr=new ActiveXObject("htmlfile")}catch(e){}sr=typeof document!="undefined"?document.domain&&nr?De(nr):qi():De(nr);for(var r=Ce.length;r--;)delete sr[qr][Ce[r]];return sr()};Ui[zt]=!0;var Wt=Object.create||function(e,t){var n;return e!==null?(Mr[qr]=Di(e),n=new Mr,Mr[qr]=null,n[zt]=e):n=sr(),t===void 0?n:ki.f(n,t)},Yi=j,zi=!Yi(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype}),Qi=x,Wi=P,Hi=jt,Xi=ne,Ji=zi,ke=Xi("IE_PROTO"),zr=Object,Zi=zr.prototype,Ht=Ji?zr.getPrototypeOf:function(r){var e=Hi(r);if(Qi(e,ke))return e[ke];var t=e.constructor;return Wi(t)&&e instanceof t?t.prototype:e instanceof zr?Zi:null},rs=X,Xt=function(r,e,t,n){return n&&n.enumerable?r[e]=t:rs(r,e,t),r},es=j,ts=P,ns=q,as=Wt,Ue=Ht,os=Xt,is=L,Qr=is("iterator"),Jt=!1,A,Nr,Cr;[].keys&&(Cr=[].keys(),"next"in Cr?(Nr=Ue(Ue(Cr)),Nr!==Object.prototype&&(A=Nr)):Jt=!0);var ss=!ns(A)||es(function(){var r={};return A[Qr].call(r)!==r});ss?A={}:A=as(A);ts(A[Qr])||os(A,Qr,function(){return this});var Zt={IteratorPrototype:A,BUGGY_SAFARI_ITERATORS:Jt},cs=L,ls=cs("toStringTag"),rn={};rn[ls]="z";var ie=String(rn)==="[object z]",us=ie,vs=P,cr=Hr,fs=L,ds=fs("toStringTag"),hs=Object,ps=cr(function(){return arguments}())=="Arguments",bs=function(r,e){try{return r[e]}catch(t){}},se=us?cr:function(r){var e,t,n;return r===void 0?"Undefined":r===null?"Null":typeof(t=bs(e=hs(r),ds))=="string"?t:ps?cr(e):(n=cr(e))=="Object"&&vs(e.callee)?"Arguments":n},ys=ie,gs=se,Os=ys?{}.toString:function(){return"[object "+gs(this)+"]"},$s=ie,ws=Y.f,ms=X,Es=x,Ss=Os,Ts=L,Ve=Ts("toStringTag"),en=function(r,e,t,n){if(r){var a=t?r:r.prototype;Es(a,Ve)||ws(a,Ve,{configurable:!0,value:e}),n&&!$s&&ms(a,"toString",Ss)}},Is=Zt.IteratorPrototype,Ps=Wt,Rs=pr,_s=en,As=K,js=function(){return this},Ls=function(r,e,t,n){var a=e+" Iterator";return r.prototype=Ps(Is,{next:Rs(+!n,t)}),_s(r,a,!1,!0),As[a]=js,r},xs=Ut,Ms=F,tn=ii,Ns=Ls,Cs=Ht,Fs=en,Be=Xt,Gs=L,Ke=K,nn=Zt,Ds=tn.PROPER;tn.CONFIGURABLE;nn.IteratorPrototype;var ar=nn.BUGGY_SAFARI_ITERATORS,Fr=Gs("iterator"),qe="keys",or="values",Ye="entries",ks=function(){return this},Us=function(r,e,t,n,a,o,i){Ns(t,e,n);var s=function(g){if(g===a&&u)return u;if(!ar&&g in l)return l[g];switch(g){case qe:return function(){return new t(this,g)};case or:return function(){return new t(this,g)};case Ye:return function(){return new t(this,g)}}return function(){return new t(this)}},v=e+" Iterator",c=!1,l=r.prototype,f=l[Fr]||l["@@iterator"]||a&&l[a],u=!ar&&f||s(a),d=e=="Array"&&l.entries||f,$,E,w;if(d&&($=Cs(d.call(new r)),$!==Object.prototype&&$.next&&(Fs($,v,!0,!0),Ke[v]=ks)),Ds&&a==or&&f&&f.name!==or&&(c=!0,u=function(){return Ms(f,this)}),a)if(E={values:s(or),keys:o?u:s(qe),entries:s(Ye)},i)for(w in E)(ar||c||!(w in l))&&Be(l,w,E[w]);else xs({target:e,proto:!0,forced:ar||c},E);return i&&l[Fr]!==u&&Be(l,Fr,u,{name:a}),Ke[e]=u,E},Vs=function(r,e){return{value:r,done:e}},Bs=H,ze=K,an=So;Y.f;var Ks=Us,ir=Vs,on="Array Iterator",qs=an.set,Ys=an.getterFor(on);Ks(Array,"Array",function(r,e){qs(this,{type:on,target:Bs(r),index:0,kind:e})},function(){var r=Ys(this),e=r.target,t=r.kind,n=r.index++;return!e||n>=e.length?(r.target=void 0,ir(void 0,!0)):t=="keys"?ir(n,!1):t=="values"?ir(e[n],!1):ir([n,e[n]],!1)},"values");ze.Arguments=ze.Array;var zs=L,Qs=K,Ws=zs("iterator"),Hs=Array.prototype,Xs=function(r){return r!==void 0&&(Qs.Array===r||Hs[Ws]===r)},Js=se,Qe=ee,Zs=Xr,rc=K,ec=L,tc=ec("iterator"),sn=function(r){if(!Zs(r))return Qe(r,tc)||Qe(r,"@@iterator")||rc[Js(r)]},nc=F,ac=re,oc=z,ic=Zr,sc=sn,cc=TypeError,lc=function(r,e){var t=arguments.length<2?sc(r):e;if(ac(t))return oc(nc(t,r));throw cc(ic(r)+" is not iterable")},uc=F,We=z,vc=ee,fc=function(r,e,t){var n,a;We(r);try{if(n=vc(r,"return"),!n){if(e==="throw")throw t;return t}n=uc(n,r)}catch(o){a=!0,n=o}if(e==="throw")throw t;if(a)throw n;return We(n),t},dc=kt,hc=F,pc=z,bc=Zr,yc=Xs,gc=qt,He=Et,Oc=lc,$c=sn,Xe=fc,wc=TypeError,lr=function(r,e){this.stopped=r,this.result=e},Je=lr.prototype,mc=function(r,e,t){var n=t&&t.that,a=!!(t&&t.AS_ENTRIES),o=!!(t&&t.IS_RECORD),i=!!(t&&t.IS_ITERATOR),s=!!(t&&t.INTERRUPTED),v=dc(e,n),c,l,f,u,d,$,E,w=function(O){return c&&Xe(c,"normal",O),new lr(!0,O)},g=function(O){return a?(pc(O),s?v(O[0],O[1],w):v(O[0],O[1])):s?v(O,w):v(O)};if(o)c=r.iterator;else if(i)c=r;else{if(l=$c(r),!l)throw wc(bc(r)+" is not iterable");if(yc(l)){for(f=0,u=gc(r);u>f;f++)if(d=g(r[f]),d&&He(Je,d))return d;return new lr(!1)}c=Oc(r,l)}for($=o?r.next:c.next;!(E=hc($,c)).done;){try{d=g(E.value)}catch(O){Xe(c,"throw",O)}if(typeof d=="object"&&d&&He(Je,d))return d}return new lr(!1)},Ec=te,Sc=Y,Tc=pr,Ic=function(r,e,t){var n=Ec(e);n in r?Sc.f(r,n,Tc(0,t)):r[n]=t},Pc=Ut,Rc=mc,_c=Ic;Pc({target:"Object",stat:!0},{fromEntries:function(e){var t={};return Rc(e,function(n,a){_c(t,n,a)},{AS_ENTRIES:!0}),t}});var Ac=Jr,jc=Ac.Object.fromEntries,Lc={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},xc=Lc,Mc=I,Nc=se,Cc=X,Ze=K,Fc=L,rt=Fc("toStringTag");for(var Gr in xc){var et=Mc[Gr],Dr=et&&et.prototype;Dr&&Nc(Dr)!==rt&&Cc(Dr,rt,Gr),Ze[Gr]=Ze.Array}var Gc=jc,Dc=Gc,kc=Dc,Uc=kc,Vc=jn(Uc),tt;(function(r){r.Armenian="58",r.Azerbaijani="57",r.Belarusian="114",r.English="3",r.Kazakh="97",r.Portuguese="73",r.Russian="0",r.Spanish="4",r.Ukrainian="1",r.Uzbek="65",r.Vietnamese="75"})(tt||(tt={}));const Bc="vk.com",xl=async(r,e,t)=>{const n=new URL(`https://${Bc}/js/lang-pack.js`);n.searchParams.set("format","json"),n.searchParams.set("name",e),r!==void 0&&n.searchParams.set("lang",r);const o=await(await An(n.toString())).json();return Kc(o,t)},Kc=(r,e)=>Vc(Object.entries(r.keys).map(([t,n])=>[t.substring(`${e}_`.length),qc(n)])),qc=r=>Array.isArray(r)?r[0]:r;var nt;(function(r){r.RU="ru",r.EN="en"})(nt||(nt={}));export{_ as CurrentClientBrowser,p as CurrentClientDevice,le as ErrorCategory,nt as InterfaceLanguage,Qc as Logger,y as Observable,at as Subject,dr as Subscription,Yc as VERSION,tt as VKNumericLanguage,bl as ValueSubject,m as VideoQuality,el as abortable,Zc as addScript,hl as areQualitiesExact,Jc as assertEmptyArray,V as assertNever,Wc as assertNonNullable,Xc as assertNotEmptyArray,Hc as assertNullable,pl as assertQualityIsExact,El as buffer,zc as checkNever,yl as combine,Sl as debounce,bn as fillWithDefault,Il as filter,Pl as filterChanged,ml as fromEvent,ot as getCurrentBrowser,ol as getExponentialDelay,ul as getHighestQuality,nl as getIOSVersion,$l as interval,sl as isHigher,cl as isHigherOrEqual,tl as isIOS,ct as isInvariantQuality,it as isLower,ll as isLowerOrEqual,al as isMacLike,cn as isNonNullable,ln as isNullable,xl as loadVKLangPack,Sn as map,_l as mapTo,gl as merge,Q as noop,rl as now,wl as observableFrom,Al as once,jl as pairwise,il as safeStorage,Ll as tap,Tl as throttle,Ol as timeout,vl as videoHeightToQuality,dl as videoQualityToHeight,fl as videoSizeToQuality};
|
|
6
|
+
const Yc="1.0.31-dev.680271f.0";class dr{constructor(){this.subscriptions=[]}unsubscribe(){const e=this.subscriptions;this.subscriptions=[],e.forEach(t=>typeof t=="function"?t():t.unsubscribe())}add(e){return this.subscriptions.push(e),this}}const V=r=>{throw new Error(`${r} is value of unexpected type`)},zc=r=>{},Q=()=>{};class y{constructor(e){e&&(this._subscribe=e)}subscribe(e,t){var n;let a;t?typeof t=="function"?a={next:t,error:Q}:a={next:s=>t.next(s),error:s=>{var v;return(v=t.error)===null||v===void 0?void 0:v.call(t,s)}}:a={next:Q,error:Q};const o=typeof e=="function"?{next:s=>{try{e(s)}catch(v){a.next(v)}},error:s=>a.next(s)}:{next:s=>e.next(s),error:s=>e.error?e.error(s):a.next(s)};let i;try{i=this._subscribe(o)}catch(s){(n=o.error)===null||n===void 0||n.call(o,s)}return new dr().add(()=>{switch(o.next=Q,o.error=Q,typeof i){case"function":i();return;case"object":i.unsubscribe();return;case"undefined":return;default:return V(i)}})}pipe(...e){return e.reduce((t,n)=>n(t),this)}_subscribe(e){}}class at extends y{constructor(){super(),this.keyCounter=0,this.subscribers=new Map}next(e){this.subscribers.forEach(t=>t.next(e))}error(e){this.subscribers.forEach(t=>{var n;return(n=t.error)===null||n===void 0?void 0:n.call(t,e)})}_subscribe(e){const t=this.keyCounter++;return this.subscribers.set(t,e),new dr().add(()=>this.subscribers.delete(t))}}class Qc{constructor(){this.log$=new at,this.logs=[],this.log=e=>{const t={...e,timestamp:Date.now()};this.logs.push(t),this.log$.next(t)},this.getAllLogs=()=>this.logs}createCustomLog(e){return(...t)=>{let n;try{n=e(...t)}catch(a){n={message:"error in `createCustomLog`",component:"Logger"}}this.log(n)}}createComponentLog(e){return this.createCustomLog(t=>({component:e,...t}))}}function Wc(r,e='Assertion "value is not nullable" failed'){if(r==null)throw new Error(e)}function Hc(r,e='Assertion "value is nullable" failed'){if(r!=null)throw new Error(e)}function cn(r){return typeof r!="undefined"&&r!==null}function ln(r){return r==null}function Xc(r,e){if(!(r!=null&&r.length))throw new Error(e)}function Jc(r,e){if(r!=null&&r.length)throw new Error(e)}const Zc=(r,e,t)=>new Promise((n,a)=>{e.addEventListener("abort",()=>{s(),c.remove()});const o=()=>{s(),a()},i=()=>{s(),n()},s=()=>{v&&clearTimeout(v),c.removeEventListener("load",i),c.removeEventListener("error",o)};let v;t&&(v=window.setTimeout(o,t));const c=document.createElement("script");c.addEventListener("load",i),c.addEventListener("error",o),c.src=r,document.head.appendChild(c)});var br;const rl=typeof((br=window.performance)===null||br===void 0?void 0:br.now)=="function"?()=>window.performance.now():()=>Date.now(),el=(r,e)=>async(...t)=>{var n;const a=e(...t);let o=r.aborted,i;for(;!o&&!r.aborted;){const s=await a.next(i);o=(n=s.done)!==null&&n!==void 0?n:!1,i=s.value}return i};var _;(function(r){r.Unknown="Unknown",r.Yandex="Yandex",r.Chrome="Chrome",r.Chromium="Chromium",r.Firefox="Firefox",r.Safari="Safari",r.Opera="Opera",r.Edge="Edge",r.Rest="Rest"})(_||(_={}));var p;(function(r){r.Unknown="Unknown",r.Android="Android",r.iPhone="iPhone",r.iPad="iPad",r.iPod="iPod",r.RestMobile="RestMobile",r.Mac="Mac",r.Desktop="Desktop"})(p||(p={}));const ot=()=>{const{userAgent:r}=window.navigator,e=/yabrowser/i.test(r)?_.Yandex:void 0,t=/chrome|crios/i.test(r)?_.Chrome:void 0,n=/chromium/i.test(r)?_.Chromium:void 0,a=/firefox|fxios/i.test(r)?_.Firefox:void 0,o=/webkit|safari|khtml/i.test(r)?_.Safari:void 0,i=/opr\//i.test(r)?_.Opera:void 0,s=/edg/i.test(r)?_.Edge:void 0,v=/android/i.test(r)?p.Android:void 0,c=/iphone/i.test(r)?p.iPhone:void 0,l=/ipad/i.test(r)?p.iPad:void 0,f=/ipod/i.test(r)?p.iPod:void 0,u=/mac/i.test(r)?p.Mac:void 0,d=/webOS|BlackBerry|IEMobile|Opera Mini/i.test(r)?p.RestMobile:void 0;return{browser:e||a||i||s||t||n||o||_.Rest,device:v||c||l||f||d||u||p.Desktop}},tl=(r=!1)=>{const t=[p.iPhone,p.iPad,p.iPod].includes(ot().device);if(!r)return t;const{userAgent:n,maxTouchPoints:a}=window.navigator;return!!(t||/macintosh/i.test(n)&&a>0)},nl=()=>{const{userAgent:r}=window.navigator,e=r.match(/Version\/(\d+(\.\d+)?)/i);if(!e)return null;const t=e[1],n=parseFloat(t);return isNaN(n)?null:n},al=()=>[p.Mac,p.iPhone,p.iPad,p.iPod].includes(ot().device),ol=(r,{start:e=0,factor:t=2,max:n=1/0,min:a=e,random:o=0}={})=>{let i=e;return i*=t**r,i*=1+(Math.random()*o*2-o),i=Math.round(i),i=Math.min(i,n),i=Math.max(i,a),i};var h;(function(r){r[r.LOCAL_STORAGE=0]="LOCAL_STORAGE",r[r.SESSION_STORAGE=1]="SESSION_STORAGE",r[r.RUNTIME=2]="RUNTIME"})(h||(h={}));let b,M;const yr=`vk-videoplayer-dummy-key-${Math.random()}`,B=()=>{if(M!==void 0)return M;try{localStorage.setItem(yr,"test"),localStorage.removeItem(yr),M=h.LOCAL_STORAGE}catch(r){if(r instanceof DOMException||r instanceof TypeError)try{sessionStorage.getItem(yr),M=h.SESSION_STORAGE}catch(e){if(e instanceof DOMException||e instanceof TypeError)M=h.RUNTIME;else throw e}else throw r}return M===h.RUNTIME&&(b=new Map),M},un=()=>B()===h.LOCAL_STORAGE,vn=r=>{var e,t;const n=B();switch(n){case h.LOCAL_STORAGE:return(e=localStorage.getItem(r))!==null&&e!==void 0?e:void 0;case h.SESSION_STORAGE:return(t=sessionStorage.getItem(r))!==null&&t!==void 0?t:void 0;case h.RUNTIME:return b==null?void 0:b.get(r);default:V(n)}},fn=(r,e)=>{const t=B();switch(t){case h.LOCAL_STORAGE:try{localStorage.setItem(r,e)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case h.SESSION_STORAGE:try{sessionStorage.setItem(r,e)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case h.RUNTIME:return void(b==null?void 0:b.set(r,e));default:V(t)}},dn=r=>{var e;const t=B();switch(t){case h.LOCAL_STORAGE:return r in localStorage;case h.SESSION_STORAGE:return r in sessionStorage;case h.RUNTIME:return(e=b==null?void 0:b.has(r))!==null&&e!==void 0?e:!1;default:return V(t),!1}},hn=r=>{const e=B();switch(e){case h.LOCAL_STORAGE:return localStorage.removeItem(r);case h.SESSION_STORAGE:return sessionStorage.removeItem(r);case h.RUNTIME:return void(b==null?void 0:b.delete(r));default:V(e)}},pn=()=>{const r=B();switch(r){case h.LOCAL_STORAGE:return localStorage.clear();case h.SESSION_STORAGE:return sessionStorage.clear();case h.RUNTIME:return b==null?void 0:b.clear();default:V(r)}};var il=Object.freeze({__proto__:null,clear:pn,get:vn,has:dn,isPersistent:un,remove:hn,set:fn}),m;(function(r){r.INVARIANT="Invariant quality",r.Q_144P="144p",r.Q_240P="240p",r.Q_360P="360p",r.Q_480P="480p",r.Q_720P="720p",r.Q_1080P="1080p",r.Q_1440P="1440p",r.Q_2160P="2160p",r.Q_4320P="4320p"})(m||(m={}));const S={[m.Q_144P]:{width:256,height:144},[m.Q_240P]:{width:428,height:240},[m.Q_360P]:{width:640,height:360},[m.Q_480P]:{width:856,height:480},[m.Q_720P]:{width:1280,height:720},[m.Q_1080P]:{width:1920,height:1080},[m.Q_1440P]:{width:2560,height:1440},[m.Q_2160P]:{width:3840,height:2160},[m.Q_4320P]:{width:7680,height:4320}},sl=(r,e)=>S[r].height>S[e].height,cl=(r,e)=>S[r].height>=S[e].height,it=(r,e)=>S[r].height<S[e].height,ll=(r,e)=>S[r].height<=S[e].height,ul=r=>r.sort((e,t)=>e===t?0:e===m.INVARIANT?1:t===m.INVARIANT?-1:it(e,t)?1:-1)[0],st=Object.keys(S).sort((r,e)=>it(r,e)?-1:1),vl=(r,e=.02)=>[...st].find(n=>S[n].height*(1+e)>=r),fl=({width:r,height:e})=>{const t=Math.min(r,e),n=Math.max(r,e);return st.find(a=>{const o=S[a];return o.width>=n&&o.height>=t})},dl=r=>S[r].height,ct=r=>r===m.INVARIANT,hl=r=>r.every(e=>!ct(e));function pl(r){if(ct(r))throw new Error("Expected exact quality")}const bn=(r,e)=>{const t={};for(const n of Object.keys(e)){const a=e[n],o=r[n];Array.isArray(a)&&Array.isArray(o)?t[n]=o:typeof a=="object"&&typeof o=="object"?t[n]=bn(o,a):t[n]=n in r?o:a}return t};class bl extends at{constructor(e){super(),this.value=e}next(e){super.next(this.value=e)}error(e){super.error(this.value=e)}getValue(){return this.value}_subscribe(e){const t=super._subscribe(e);return e.next(this.value),t}}function yl(r){return new y(e=>{const t={};let n=Object.keys(r).length;const a=o=>i=>{o in t||n--,t[o]=i,n===0&&e.next(t)};return Object.entries(r).reduce((o,[i,s])=>o.add(s.subscribe(a(i))),new dr)})}function gl(...r){return new y(e=>r.reduce((t,n)=>t.add(n.subscribe(e)),new dr))}var Ol=r=>new y(e=>{const t=window.setTimeout(()=>{try{e.next()}catch(n){if(e.error)e.error(n);else throw n}},r);return()=>window.clearTimeout(t)}),$l=r=>new y(e=>{const t=window.setInterval(()=>e.next(),r);return()=>window.clearInterval(t)}),wl=r=>new y(e=>{r.forEach(t=>e.next(t))}),ml=(r,e)=>new y(t=>{const n=a=>t.next(a);return r.addEventListener(e,n),()=>r.removeEventListener(e,n)});function El(r){return e=>new y(t=>e.subscribe(new yn(t,r)))}class yn{constructor(e,t){this.destination=e,this.size=t,this.lastValues=[]}next(e){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(e),this.destination.next(this.lastValues)}error(e){var t,n;(n=(t=this.destination).error)===null||n===void 0||n.call(t,e)}}const gn={leading:!1,trailing:!0};function Sl(r,e=gn){return t=>new y(n=>t.subscribe(new On(n,r,e)))}class On{constructor(e,t,n){this.destination=e,this.time=t,this.config=n}next(e){this.lastValue=e,cn(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(t){if(this.destination.error)this.destination.error(t);else throw t}this.timeout=void 0},this.time)}error(e){var t,n;(n=(t=this.destination).error)===null||n===void 0||n.call(t,e)}}const $n={leading:!0,trailing:!1};function Tl(r,e=$n){return t=>new y(n=>t.subscribe(new wn(n,r,e)))}class wn{constructor(e,t,n){this.destination=e,this.time=t,this.config=n}next(e){this.lastValue=e,ln(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 t,n;(n=(t=this.destination).error)===null||n===void 0||n.call(t,e)}}function Il(r){return e=>new y(t=>e.subscribe(new mn(t,r)))}class mn{constructor(e,t){this.destination=e,this.predicate=t}next(e){let t;try{t=this.predicate(e)}catch(n){throw this.error(n),n}t&&this.destination.next(e)}error(e){var t,n;(n=(t=this.destination).error)===null||n===void 0||n.call(t,e)}}function Pl(r=(e,t)=>e===t){return e=>new y(t=>e.subscribe(new En(t,r)))}const ce={};class En{constructor(e,t){this.destination=e,this.predicate=t,this.lastValue=ce}next(e){let t;try{t=this.lastValue===ce||!this.predicate(this.lastValue,e),this.lastValue=e}catch(n){throw this.error(n),n}t&&this.destination.next(e)}error(e){var t,n;(n=(t=this.destination).error)===null||n===void 0||n.call(t,e)}}function Sn(r){return e=>new y(t=>e.subscribe(new Tn(t,r)))}let Tn=class{constructor(e,t){this.destination=e,this.mapper=t}next(e){let t;try{t=this.mapper(e)}catch(n){throw this.error(n),n}this.destination.next(t)}error(e){var t,n;(n=(t=this.destination).error)===null||n===void 0||n.call(t,e)}};function _l(r){return Sn(()=>r)}function Al(){return r=>new y(e=>{let t=!1,n=!1;const a=r.subscribe(o=>{t||(t=!0,e.next(o)),n&&a.unsubscribe()},o=>{var i;t=!0,(i=e.error)===null||i===void 0||i.call(e,o),n&&a.unsubscribe()});return n=!0,t&&a.unsubscribe(),a})}function jl(){return r=>new y(e=>r.subscribe(new In(e)))}class In{constructor(e){this.destination=e,this.hasLast=!1}next(e){const t=this.last;if(this.last=e,!this.hasLast){this.hasLast=!0;return}this.destination.next([t,e])}error(e){var t,n;(n=(t=this.destination).error)===null||n===void 0||n.call(t,e)}}function Ll(r){return e=>new y(t=>e.subscribe(new Pn(t,r)))}class Pn{constructor(e,t){this.destination=e,this.effect=t}next(e){try{this.effect(e)}catch(t){throw this.error(t),t}this.destination.next(e)}error(e){var t,n;(n=(t=this.destination).error)===null||n===void 0||n.call(t,e)}}var le;(function(r){r.NETWORK="network",r.VIDEO_PIPELINE="video_pipeline",r.EXTERNAL_API="external_api",r.PARSER="parser",r.DOM="dom",r.WTF="wtf"})(le||(le={}));class ue{constructor(){Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}addEventListener(e,t,n){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push({callback:t,options:n})}removeEventListener(e,t){if(!(e in this.listeners))return;const n=this.listeners[e];for(let a=0,o=n.length;a<o;a++)if(n[a].callback===t){n.splice(a,1);return}}dispatchEvent(e){if(!(e.type in this.listeners))return;const n=this.listeners[e.type].slice();for(let a=0,o=n.length;a<o;a++){const i=n[a];try{i.callback.call(this,e)}catch(s){Promise.resolve().then(()=>{throw s})}i.options&&i.options.once&&this.removeEventListener(e.type,i.callback)}return!e.defaultPrevented}}class lt extends ue{constructor(){super(),this.listeners||ue.call(this),Object.defineProperty(this,"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(this,"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(this,"reason",{value:void 0,writable:!0,configurable:!0})}toString(){return"[object AbortSignal]"}dispatchEvent(e){e.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,e)),super.dispatchEvent(e)}}class Rn{constructor(){Object.defineProperty(this,"signal",{value:new lt,writable:!0,configurable:!0})}abort(e){let t;try{t=new Event("abort")}catch(a){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=e;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(a){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&&(Rn.prototype[Symbol.toStringTag]="AbortController",lt.prototype[Symbol.toStringTag]="AbortSignal");function ut(r){return r.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof r.Request=="function"&&!r.Request.prototype.hasOwnProperty("signal")||!r.AbortController}function _n(r){typeof r=="function"&&(r={fetch:r});const{fetch:e,Request:t=e.Request,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:a=!1}=r;if(!ut({fetch:e,Request:t,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:a}))return{fetch:e,Request:o};let o=t;(o&&!o.prototype.hasOwnProperty("signal")||a)&&(o=function(c,l){let f;l&&l.signal&&(f=l.signal,delete l.signal);const u=new t(c,l);return f&&Object.defineProperty(u,"signal",{writable:!1,enumerable:!1,configurable:!0,value:f}),u},o.prototype=t.prototype);const i=e;return{fetch:(v,c)=>{const l=o&&o.prototype.isPrototypeOf(v)?v.signal:c?c.signal:void 0;if(l){let f;try{f=new DOMException("Aborted","AbortError")}catch(d){f=new Error("Aborted"),f.name="AbortError"}if(l.aborted)return Promise.reject(f);const u=new Promise((d,$)=>{l.addEventListener("abort",()=>$(f),{once:!0})});return c&&c.signal&&delete c.signal,Promise.race([u,i(v,c)])}return i(v,c)},Request:o}}const Wr=ut({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}),vt=Wr?_n({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}):void 0,An=Wr?vt.fetch:window.fetch;Wr?vt.Request:window.Request;var gr=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function jn(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var j=function(r){try{return!!r()}catch(e){return!0}},Ln=j,hr=!Ln(function(){var r=function(){}.bind();return typeof r!="function"||r.hasOwnProperty("prototype")}),ft=hr,dt=Function.prototype,kr=dt.call,xn=ft&&dt.bind.bind(kr,kr),N=ft?xn:function(r){return function(){return kr.apply(r,arguments)}},ht=N,Mn=ht({}.toString),Nn=ht("".slice),Hr=function(r){return Nn(Mn(r),8,-1)},Cn=N,Fn=j,Gn=Hr,Or=Object,Dn=Cn("".split),kn=Fn(function(){return!Or("z").propertyIsEnumerable(0)})?function(r){return Gn(r)=="String"?Dn(r,""):Or(r)}:Or,Xr=function(r){return r==null},Un=Xr,Vn=TypeError,pt=function(r){if(Un(r))throw Vn("Can't call method on "+r);return r},Bn=kn,Kn=pt,H=function(r){return Bn(Kn(r))},K={},Z=function(r){return r&&r.Math==Math&&r},I=Z(typeof globalThis=="object"&&globalThis)||Z(typeof window=="object"&&window)||Z(typeof self=="object"&&self)||Z(typeof gr=="object"&&gr)||function(){return this}()||gr||Function("return this")(),Ur=typeof document=="object"&&document.all,qn=typeof Ur=="undefined"&&Ur!==void 0,bt={all:Ur,IS_HTMLDDA:qn},yt=bt,Yn=yt.all,P=yt.IS_HTMLDDA?function(r){return typeof r=="function"||r===Yn}:function(r){return typeof r=="function"},zn=I,Qn=P,ve=zn.WeakMap,Wn=Qn(ve)&&/native code/.test(String(ve)),fe=P,gt=bt,Hn=gt.all,q=gt.IS_HTMLDDA?function(r){return typeof r=="object"?r!==null:fe(r)||r===Hn}:function(r){return typeof r=="object"?r!==null:fe(r)},Xn=j,C=!Xn(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Y={},Jn=I,de=q,Vr=Jn.document,Zn=de(Vr)&&de(Vr.createElement),Ot=function(r){return Zn?Vr.createElement(r):{}},ra=C,ea=j,ta=Ot,$t=!ra&&!ea(function(){return Object.defineProperty(ta("div"),"a",{get:function(){return 7}}).a!=7}),na=C,aa=j,wt=na&&aa(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),oa=q,ia=String,sa=TypeError,z=function(r){if(oa(r))return r;throw sa(ia(r)+" is not an object")},ca=hr,rr=Function.prototype.call,F=ca?rr.bind(rr):function(){return rr.apply(rr,arguments)},Jr={},$r=Jr,wr=I,la=P,he=function(r){return la(r)?r:void 0},mt=function(r,e){return arguments.length<2?he($r[r])||he(wr[r]):$r[r]&&$r[r][e]||wr[r]&&wr[r][e]},ua=N,Et=ua({}.isPrototypeOf),va=typeof navigator!="undefined"&&String(navigator.userAgent)||"",St=I,mr=va,pe=St.process,be=St.Deno,ye=pe&&pe.versions||be&&be.version,ge=ye&&ye.v8,T,ur;ge&&(T=ge.split("."),ur=T[0]>0&&T[0]<4?1:+(T[0]+T[1]));!ur&&mr&&(T=mr.match(/Edge\/(\d+)/),(!T||T[1]>=74)&&(T=mr.match(/Chrome\/(\d+)/),T&&(ur=+T[1])));var fa=ur,Oe=fa,da=j,ha=I,pa=ha.String,Tt=!!Object.getOwnPropertySymbols&&!da(function(){var r=Symbol();return!pa(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&Oe&&Oe<41}),ba=Tt,It=ba&&!Symbol.sham&&typeof Symbol.iterator=="symbol",ya=mt,ga=P,Oa=Et,$a=It,wa=Object,Pt=$a?function(r){return typeof r=="symbol"}:function(r){var e=ya("Symbol");return ga(e)&&Oa(e.prototype,wa(r))},ma=String,Zr=function(r){try{return ma(r)}catch(e){return"Object"}},Ea=P,Sa=Zr,Ta=TypeError,re=function(r){if(Ea(r))return r;throw Ta(Sa(r)+" is not a function")},Ia=re,Pa=Xr,ee=function(r,e){var t=r[e];return Pa(t)?void 0:Ia(t)},Er=F,Sr=P,Tr=q,Ra=TypeError,_a=function(r,e){var t,n;if(e==="string"&&Sr(t=r.toString)&&!Tr(n=Er(t,r))||Sr(t=r.valueOf)&&!Tr(n=Er(t,r))||e!=="string"&&Sr(t=r.toString)&&!Tr(n=Er(t,r)))return n;throw Ra("Can't convert object to primitive value")},Rt={exports:{}},$e=I,Aa=Object.defineProperty,ja=function(r,e){try{Aa($e,r,{value:e,configurable:!0,writable:!0})}catch(t){$e[r]=e}return e},La=I,xa=ja,we="__core-js_shared__",Ma=La[we]||xa(we,{}),_t=Ma,me=_t;(Rt.exports=function(r,e){return me[r]||(me[r]=e!==void 0?e:{})})("versions",[]).push({version:"3.31.0",mode:"pure",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 At=Rt.exports,Na=pt,Ca=Object,jt=function(r){return Ca(Na(r))},Fa=N,Ga=jt,Da=Fa({}.hasOwnProperty),x=Object.hasOwn||function(e,t){return Da(Ga(e),t)},ka=N,Ua=0,Va=Math.random(),Ba=ka(1 .toString),Lt=function(r){return"Symbol("+(r===void 0?"":r)+")_"+Ba(++Ua+Va,36)},Ka=I,qa=At,Ee=x,Ya=Lt,za=Tt,Qa=It,U=Ka.Symbol,Ir=qa("wks"),Wa=Qa?U.for||U:U&&U.withoutSetter||Ya,L=function(r){return Ee(Ir,r)||(Ir[r]=za&&Ee(U,r)?U[r]:Wa("Symbol."+r)),Ir[r]},Ha=F,Se=q,Te=Pt,Xa=ee,Ja=_a,Za=L,ro=TypeError,eo=Za("toPrimitive"),to=function(r,e){if(!Se(r)||Te(r))return r;var t=Xa(r,eo),n;if(t){if(e===void 0&&(e="default"),n=Ha(t,r,e),!Se(n)||Te(n))return n;throw ro("Can't convert object to primitive value")}return e===void 0&&(e="number"),Ja(r,e)},no=to,ao=Pt,te=function(r){var e=no(r,"string");return ao(e)?e:e+""},oo=C,io=$t,so=wt,er=z,Ie=te,co=TypeError,Pr=Object.defineProperty,lo=Object.getOwnPropertyDescriptor,Rr="enumerable",_r="configurable",Ar="writable";Y.f=oo?so?function(e,t,n){if(er(e),t=Ie(t),er(n),typeof e=="function"&&t==="prototype"&&"value"in n&&Ar in n&&!n[Ar]){var a=lo(e,t);a&&a[Ar]&&(e[t]=n.value,n={configurable:_r in n?n[_r]:a[_r],enumerable:Rr in n?n[Rr]:a[Rr],writable:!1})}return Pr(e,t,n)}:Pr:function(e,t,n){if(er(e),t=Ie(t),er(n),io)try{return Pr(e,t,n)}catch(a){}if("get"in n||"set"in n)throw co("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var pr=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}},uo=C,vo=Y,fo=pr,X=uo?function(r,e,t){return vo.f(r,e,fo(1,t))}:function(r,e,t){return r[e]=t,r},ho=At,po=Lt,Pe=ho("keys"),ne=function(r){return Pe[r]||(Pe[r]=po(r))},ae={},bo=Wn,xt=I,yo=q,go=X,jr=x,Lr=_t,Oo=ne,$o=ae,Re="Object already initialized",Br=xt.TypeError,wo=xt.WeakMap,vr,W,fr,mo=function(r){return fr(r)?W(r):vr(r,{})},Eo=function(r){return function(e){var t;if(!yo(e)||(t=W(e)).type!==r)throw Br("Incompatible receiver, "+r+" required");return t}};if(bo||Lr.state){var R=Lr.state||(Lr.state=new wo);R.get=R.get,R.has=R.has,R.set=R.set,vr=function(r,e){if(R.has(r))throw Br(Re);return e.facade=r,R.set(r,e),e},W=function(r){return R.get(r)||{}},fr=function(r){return R.has(r)}}else{var G=Oo("state");$o[G]=!0,vr=function(r,e){if(jr(r,G))throw Br(Re);return e.facade=r,go(r,G,e),e},W=function(r){return jr(r,G)?r[G]:{}},fr=function(r){return jr(r,G)}}var So={set:vr,get:W,has:fr,enforce:mo,getterFor:Eo},To=hr,Mt=Function.prototype,_e=Mt.apply,Ae=Mt.call,Io=typeof Reflect=="object"&&Reflect.apply||(To?Ae.bind(_e):function(){return Ae.apply(_e,arguments)}),Po=Hr,Ro=N,Nt=function(r){if(Po(r)==="Function")return Ro(r)},Ct={},Ft={},Gt={}.propertyIsEnumerable,Dt=Object.getOwnPropertyDescriptor,_o=Dt&&!Gt.call({1:2},1);Ft.f=_o?function(e){var t=Dt(this,e);return!!t&&t.enumerable}:Gt;var Ao=C,jo=F,Lo=Ft,xo=pr,Mo=H,No=te,Co=x,Fo=$t,je=Object.getOwnPropertyDescriptor;Ct.f=Ao?je:function(e,t){if(e=Mo(e),t=No(t),Fo)try{return je(e,t)}catch(n){}if(Co(e,t))return xo(!jo(Lo.f,e,t),e[t])};var Go=j,Do=P,ko=/#|\.prototype\./,J=function(r,e){var t=Vo[Uo(r)];return t==Ko?!0:t==Bo?!1:Do(e)?Go(e):!!e},Uo=J.normalize=function(r){return String(r).replace(ko,".").toLowerCase()},Vo=J.data={},Bo=J.NATIVE="N",Ko=J.POLYFILL="P",qo=J,Le=Nt,Yo=re,zo=hr,Qo=Le(Le.bind),kt=function(r,e){return Yo(r),e===void 0?r:zo?Qo(r,e):function(){return r.apply(e,arguments)}},tr=I,Wo=Io,Ho=Nt,Xo=P,Jo=Ct.f,Zo=qo,D=Jr,ri=kt,k=X,xe=x,ei=function(r){var e=function(t,n,a){if(this instanceof e){switch(arguments.length){case 0:return new r;case 1:return new r(t);case 2:return new r(t,n)}return new r(t,n,a)}return Wo(r,this,arguments)};return e.prototype=r.prototype,e},Ut=function(r,e){var t=r.target,n=r.global,a=r.stat,o=r.proto,i=n?tr:a?tr[t]:(tr[t]||{}).prototype,s=n?D:D[t]||k(D,t,{})[t],v=s.prototype,c,l,f,u,d,$,E,w,g;for(u in e)c=Zo(n?u:t+(a?".":"#")+u,r.forced),l=!c&&i&&xe(i,u),$=s[u],l&&(r.dontCallGetSet?(g=Jo(i,u),E=g&&g.value):E=i[u]),d=l&&E?E:e[u],!(l&&typeof $==typeof d)&&(r.bind&&l?w=ri(d,tr):r.wrap&&l?w=ei(d):o&&Xo(d)?w=Ho(d):w=d,(r.sham||d&&d.sham||$&&$.sham)&&k(w,"sham",!0),k(s,u,w),o&&(f=t+"Prototype",xe(D,f)||k(D,f,{}),k(D[f],u,d),r.real&&v&&(c||!v[u])&&k(v,u,d)))},Kr=C,ti=x,Vt=Function.prototype,ni=Kr&&Object.getOwnPropertyDescriptor,oe=ti(Vt,"name"),ai=oe&&function(){}.name==="something",oi=oe&&(!Kr||Kr&&ni(Vt,"name").configurable),ii={EXISTS:oe,PROPER:ai,CONFIGURABLE:oi},Bt={},si=Math.ceil,ci=Math.floor,li=Math.trunc||function(e){var t=+e;return(t>0?ci:si)(t)},ui=li,Kt=function(r){var e=+r;return e!==e||e===0?0:ui(e)},vi=Kt,fi=Math.max,di=Math.min,hi=function(r,e){var t=vi(r);return t<0?fi(t+e,0):di(t,e)},pi=Kt,bi=Math.min,yi=function(r){return r>0?bi(pi(r),9007199254740991):0},gi=yi,qt=function(r){return gi(r.length)},Oi=H,$i=hi,wi=qt,Me=function(r){return function(e,t,n){var a=Oi(e),o=wi(a),i=$i(n,o),s;if(r&&t!=t){for(;o>i;)if(s=a[i++],s!=s)return!0}else for(;o>i;i++)if((r||i in a)&&a[i]===t)return r||i||0;return!r&&-1}},mi={includes:Me(!0),indexOf:Me(!1)},Ei=N,xr=x,Si=H,Ti=mi.indexOf,Ii=ae,Ne=Ei([].push),Pi=function(r,e){var t=Si(r),n=0,a=[],o;for(o in t)!xr(Ii,o)&&xr(t,o)&&Ne(a,o);for(;e.length>n;)xr(t,o=e[n++])&&(~Ti(a,o)||Ne(a,o));return a},Yt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ri=Pi,_i=Yt,Ai=Object.keys||function(e){return Ri(e,_i)},ji=C,Li=wt,xi=Y,Mi=z,Ni=H,Ci=Ai;Bt.f=ji&&!Li?Object.defineProperties:function(e,t){Mi(e);for(var n=Ni(t),a=Ci(t),o=a.length,i=0,s;o>i;)xi.f(e,s=a[i++],n[s]);return e};var Fi=mt,Gi=Fi("document","documentElement"),Di=z,ki=Bt,Ce=Yt,Ui=ae,Vi=Gi,Bi=Ot,Ki=ne,Fe=">",Ge="<",qr="prototype",Yr="script",zt=Ki("IE_PROTO"),Mr=function(){},Qt=function(r){return Ge+Yr+Fe+r+Ge+"/"+Yr+Fe},De=function(r){r.write(Qt("")),r.close();var e=r.parentWindow.Object;return r=null,e},qi=function(){var r=Bi("iframe"),e="java"+Yr+":",t;return r.style.display="none",Vi.appendChild(r),r.src=String(e),t=r.contentWindow.document,t.open(),t.write(Qt("document.F=Object")),t.close(),t.F},nr,sr=function(){try{nr=new ActiveXObject("htmlfile")}catch(e){}sr=typeof document!="undefined"?document.domain&&nr?De(nr):qi():De(nr);for(var r=Ce.length;r--;)delete sr[qr][Ce[r]];return sr()};Ui[zt]=!0;var Wt=Object.create||function(e,t){var n;return e!==null?(Mr[qr]=Di(e),n=new Mr,Mr[qr]=null,n[zt]=e):n=sr(),t===void 0?n:ki.f(n,t)},Yi=j,zi=!Yi(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype}),Qi=x,Wi=P,Hi=jt,Xi=ne,Ji=zi,ke=Xi("IE_PROTO"),zr=Object,Zi=zr.prototype,Ht=Ji?zr.getPrototypeOf:function(r){var e=Hi(r);if(Qi(e,ke))return e[ke];var t=e.constructor;return Wi(t)&&e instanceof t?t.prototype:e instanceof zr?Zi:null},rs=X,Xt=function(r,e,t,n){return n&&n.enumerable?r[e]=t:rs(r,e,t),r},es=j,ts=P,ns=q,as=Wt,Ue=Ht,os=Xt,is=L,Qr=is("iterator"),Jt=!1,A,Nr,Cr;[].keys&&(Cr=[].keys(),"next"in Cr?(Nr=Ue(Ue(Cr)),Nr!==Object.prototype&&(A=Nr)):Jt=!0);var ss=!ns(A)||es(function(){var r={};return A[Qr].call(r)!==r});ss?A={}:A=as(A);ts(A[Qr])||os(A,Qr,function(){return this});var Zt={IteratorPrototype:A,BUGGY_SAFARI_ITERATORS:Jt},cs=L,ls=cs("toStringTag"),rn={};rn[ls]="z";var ie=String(rn)==="[object z]",us=ie,vs=P,cr=Hr,fs=L,ds=fs("toStringTag"),hs=Object,ps=cr(function(){return arguments}())=="Arguments",bs=function(r,e){try{return r[e]}catch(t){}},se=us?cr:function(r){var e,t,n;return r===void 0?"Undefined":r===null?"Null":typeof(t=bs(e=hs(r),ds))=="string"?t:ps?cr(e):(n=cr(e))=="Object"&&vs(e.callee)?"Arguments":n},ys=ie,gs=se,Os=ys?{}.toString:function(){return"[object "+gs(this)+"]"},$s=ie,ws=Y.f,ms=X,Es=x,Ss=Os,Ts=L,Ve=Ts("toStringTag"),en=function(r,e,t,n){if(r){var a=t?r:r.prototype;Es(a,Ve)||ws(a,Ve,{configurable:!0,value:e}),n&&!$s&&ms(a,"toString",Ss)}},Is=Zt.IteratorPrototype,Ps=Wt,Rs=pr,_s=en,As=K,js=function(){return this},Ls=function(r,e,t,n){var a=e+" Iterator";return r.prototype=Ps(Is,{next:Rs(+!n,t)}),_s(r,a,!1,!0),As[a]=js,r},xs=Ut,Ms=F,tn=ii,Ns=Ls,Cs=Ht,Fs=en,Be=Xt,Gs=L,Ke=K,nn=Zt,Ds=tn.PROPER;tn.CONFIGURABLE;nn.IteratorPrototype;var ar=nn.BUGGY_SAFARI_ITERATORS,Fr=Gs("iterator"),qe="keys",or="values",Ye="entries",ks=function(){return this},Us=function(r,e,t,n,a,o,i){Ns(t,e,n);var s=function(g){if(g===a&&u)return u;if(!ar&&g in l)return l[g];switch(g){case qe:return function(){return new t(this,g)};case or:return function(){return new t(this,g)};case Ye:return function(){return new t(this,g)}}return function(){return new t(this)}},v=e+" Iterator",c=!1,l=r.prototype,f=l[Fr]||l["@@iterator"]||a&&l[a],u=!ar&&f||s(a),d=e=="Array"&&l.entries||f,$,E,w;if(d&&($=Cs(d.call(new r)),$!==Object.prototype&&$.next&&(Fs($,v,!0,!0),Ke[v]=ks)),Ds&&a==or&&f&&f.name!==or&&(c=!0,u=function(){return Ms(f,this)}),a)if(E={values:s(or),keys:o?u:s(qe),entries:s(Ye)},i)for(w in E)(ar||c||!(w in l))&&Be(l,w,E[w]);else xs({target:e,proto:!0,forced:ar||c},E);return i&&l[Fr]!==u&&Be(l,Fr,u,{name:a}),Ke[e]=u,E},Vs=function(r,e){return{value:r,done:e}},Bs=H,ze=K,an=So;Y.f;var Ks=Us,ir=Vs,on="Array Iterator",qs=an.set,Ys=an.getterFor(on);Ks(Array,"Array",function(r,e){qs(this,{type:on,target:Bs(r),index:0,kind:e})},function(){var r=Ys(this),e=r.target,t=r.kind,n=r.index++;return!e||n>=e.length?(r.target=void 0,ir(void 0,!0)):t=="keys"?ir(n,!1):t=="values"?ir(e[n],!1):ir([n,e[n]],!1)},"values");ze.Arguments=ze.Array;var zs=L,Qs=K,Ws=zs("iterator"),Hs=Array.prototype,Xs=function(r){return r!==void 0&&(Qs.Array===r||Hs[Ws]===r)},Js=se,Qe=ee,Zs=Xr,rc=K,ec=L,tc=ec("iterator"),sn=function(r){if(!Zs(r))return Qe(r,tc)||Qe(r,"@@iterator")||rc[Js(r)]},nc=F,ac=re,oc=z,ic=Zr,sc=sn,cc=TypeError,lc=function(r,e){var t=arguments.length<2?sc(r):e;if(ac(t))return oc(nc(t,r));throw cc(ic(r)+" is not iterable")},uc=F,We=z,vc=ee,fc=function(r,e,t){var n,a;We(r);try{if(n=vc(r,"return"),!n){if(e==="throw")throw t;return t}n=uc(n,r)}catch(o){a=!0,n=o}if(e==="throw")throw t;if(a)throw n;return We(n),t},dc=kt,hc=F,pc=z,bc=Zr,yc=Xs,gc=qt,He=Et,Oc=lc,$c=sn,Xe=fc,wc=TypeError,lr=function(r,e){this.stopped=r,this.result=e},Je=lr.prototype,mc=function(r,e,t){var n=t&&t.that,a=!!(t&&t.AS_ENTRIES),o=!!(t&&t.IS_RECORD),i=!!(t&&t.IS_ITERATOR),s=!!(t&&t.INTERRUPTED),v=dc(e,n),c,l,f,u,d,$,E,w=function(O){return c&&Xe(c,"normal",O),new lr(!0,O)},g=function(O){return a?(pc(O),s?v(O[0],O[1],w):v(O[0],O[1])):s?v(O,w):v(O)};if(o)c=r.iterator;else if(i)c=r;else{if(l=$c(r),!l)throw wc(bc(r)+" is not iterable");if(yc(l)){for(f=0,u=gc(r);u>f;f++)if(d=g(r[f]),d&&He(Je,d))return d;return new lr(!1)}c=Oc(r,l)}for($=o?r.next:c.next;!(E=hc($,c)).done;){try{d=g(E.value)}catch(O){Xe(c,"throw",O)}if(typeof d=="object"&&d&&He(Je,d))return d}return new lr(!1)},Ec=te,Sc=Y,Tc=pr,Ic=function(r,e,t){var n=Ec(e);n in r?Sc.f(r,n,Tc(0,t)):r[n]=t},Pc=Ut,Rc=mc,_c=Ic;Pc({target:"Object",stat:!0},{fromEntries:function(e){var t={};return Rc(e,function(n,a){_c(t,n,a)},{AS_ENTRIES:!0}),t}});var Ac=Jr,jc=Ac.Object.fromEntries,Lc={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},xc=Lc,Mc=I,Nc=se,Cc=X,Ze=K,Fc=L,rt=Fc("toStringTag");for(var Gr in xc){var et=Mc[Gr],Dr=et&&et.prototype;Dr&&Nc(Dr)!==rt&&Cc(Dr,rt,Gr),Ze[Gr]=Ze.Array}var Gc=jc,Dc=Gc,kc=Dc,Uc=kc,Vc=jn(Uc),tt;(function(r){r.Armenian="58",r.Azerbaijani="57",r.Belarusian="114",r.English="3",r.Kazakh="97",r.Portuguese="73",r.Russian="0",r.Spanish="4",r.Ukrainian="1",r.Uzbek="65",r.Vietnamese="75"})(tt||(tt={}));const Bc="vk.com",xl=async(r,e,t)=>{const n=new URL(`https://${Bc}/js/lang-pack.js`);n.searchParams.set("format","json"),n.searchParams.set("name",e),r!==void 0&&n.searchParams.set("lang",r);const o=await(await An(n.toString())).json();return Kc(o,t)},Kc=(r,e)=>Vc(Object.entries(r.keys).map(([t,n])=>[t.substring(`${e}_`.length),qc(n)])),qc=r=>Array.isArray(r)?r[0]:r;var nt;(function(r){r.RU="ru",r.EN="en"})(nt||(nt={}));export{_ as CurrentClientBrowser,p as CurrentClientDevice,le as ErrorCategory,nt as InterfaceLanguage,Qc as Logger,y as Observable,at as Subject,dr as Subscription,Yc as VERSION,tt as VKNumericLanguage,bl as ValueSubject,m as VideoQuality,el as abortable,Zc as addScript,hl as areQualitiesExact,Jc as assertEmptyArray,V as assertNever,Wc as assertNonNullable,Xc as assertNotEmptyArray,Hc as assertNullable,pl as assertQualityIsExact,El as buffer,zc as checkNever,yl as combine,Sl as debounce,bn as fillWithDefault,Il as filter,Pl as filterChanged,ml as fromEvent,ot as getCurrentBrowser,ol as getExponentialDelay,ul as getHighestQuality,nl as getIOSVersion,$l as interval,sl as isHigher,cl as isHigherOrEqual,tl as isIOS,ct as isInvariantQuality,it as isLower,ll as isLowerOrEqual,al as isMacLike,cn as isNonNullable,ln as isNullable,xl as loadVKLangPack,Sn as map,_l as mapTo,gl as merge,Q as noop,rl as now,wl as observableFrom,Al as once,jl as pairwise,il as safeStorage,Ll as tap,Tl as throttle,Ol as timeout,vl as videoHeightToQuality,dl as videoQualityToHeight,fl as videoSizeToQuality};
|