@vkontakte/videoplayer-shared 1.0.100-dev.ed76c949d.0 → 1.0.101-beta.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 +4 -4
- package/es2015.esm.js +4 -4
- package/esnext.cjs +4 -4
- package/esnext.esm.js +4 -4
- package/evergreen.esm.js +4 -4
- package/package.json +1 -1
- package/types/AppTracer/AppTracer.d.ts +17 -2
- package/types/index.d.ts +1 -0
- package/types/reactive/combineLatest.d.ts +6 -0
- package/types/reactive/index.d.ts +1 -0
- package/types/types/DebugData.d.ts +25 -0
- package/types/types/index.d.ts +1 -0
- package/types/utils/suppressAbort.d.ts +1 -1
package/es2015.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer-shared v1.0.
|
|
3
|
-
*
|
|
4
|
-
* https://st.mycdn.me/static/vkontakte-videoplayer/1-0-
|
|
2
|
+
* @vkontakte/videoplayer-shared v1.0.101-beta.0
|
|
3
|
+
* Mon, 31 Aug 2026 18:54:17 GMT
|
|
4
|
+
* https://st.mycdn.me/static/vkontakte-videoplayer/1-0-101/doc/
|
|
5
5
|
*/
|
|
6
|
-
function e(t){"@babel/helpers - typeof";return e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},e(t)}var t=e;function n(e,n){if(t(e)!=`object`||!e)return e;var r=e[Symbol._oxc_toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(t(i)!=`object`)return i;throw TypeError(`@@_oxc_toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}var t=e,r=n;function i(e){var n=r(e,`string`);return t(n)==`symbol`?n:n+``}var a=i;function o(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=o;function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?c(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function d(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){u(a,r,i,o,s,`next`,e)}function s(e){u(a,r,i,o,s,`throw`,e)}o(void 0)})}}var f=l,p=d;let m;var h=Object.defineProperty,ee=Object.getOwnPropertyNames,te=Object.getOwnPropertyDescriptor,ne=Object.prototype.hasOwnProperty;function g(e){return this[e]}var _=e=>{var t=(v??=new WeakMap).get(e),n;if(t)return t;if(t=h({},`__esModule`,{value:!0}),e&&typeof e==`object`||typeof e==`function`)for(var r of ee(e))ne.call(t,r)||h(t,r,{get:g.bind(e,r),enumerable:!(n=te(e,r))||n.enumerable});return v.set(e,t),t},v,re=e=>e;function ie(e,t){this[e]=re.bind(null,t)}var y=(e,t)=>{for(var n in t)h(e,n,{get:t[n],enumerable:!0,configurable:!0,set:ie.bind(t,n)})},b={};y(b,{withoutNullable:()=>fe,videoSizeToQuality:()=>tt,videoQualityToHeight:()=>nt,videoHeightToQuality:()=>et,urlCanParsePolyfilled:()=>Br,timeout:()=>ht,timeCodeToString:()=>st,throttleFn:()=>lt,throttle:()=>Dt,tap:()=>Ht,suppressAbort:()=>an,stringTrimStart:()=>Or,stringTrimRight:()=>jr,stringTrimLeft:()=>Ar,stringTrimEnd:()=>kr,stringReplaceAll:()=>Dr,stringPadStart:()=>Er,stringPadEnd:()=>Tr,stringMatchAll:()=>wr,stringAt:()=>Cr,skip:()=>Wt,shareReplay:()=>Kt,safeStorage:()=>Be,retainTimers:()=>Pe,requestIdleCallbackPolyfilled:()=>Lr,releaseTimers:()=>Fe,promiseWithResolvers:()=>ur,promiseTry:()=>lr,promiseFinally:()=>cr,promiseAny:()=>sr,promiseAllSettled:()=>or,pairwise:()=>Bt,once:()=>zt,observeElementSize:()=>Jt,observableFrom:()=>vt,objectValues:()=>ar,objectHasOwn:()=>ir,objectFromEntries:()=>nr,objectEntries:()=>tr,nowInt:()=>_e,now:()=>k,noop:()=>C,merge:()=>mt,mapTo:()=>Rt,map:()=>It,loadVKLangPack:()=>xn,isValidURL:()=>Zt,isNullable:()=>D,isNonNullable:()=>E,isLowerOrEqual:()=>Ze,isLower:()=>V,isInvariantQuality:()=>H,isIntersecting:()=>Qt,isHigherOrEqual:()=>Xe,isHigher:()=>Ye,isBrowserWindow:()=>ge,isAbortError:()=>rn,interval:()=>gt,interpolate:()=>tn,includesPolyfilled:()=>zr,globalThisPolyfill:()=>er,getWindow:()=>O,getVideoQualityLabel:()=>at,getTraceSubscriptionMethod:()=>sn,getTimersDiagnostics:()=>Ie,getTimerWindow:()=>he,getRangeAroundIndex:()=>nn,getPlayerId:()=>en,getMessageFromError:()=>on,getHighestQuality:()=>Qe,getExponentialDelay:()=>ze,fromEvent:()=>yt,flattenObject:()=>Yt,filterChanged:()=>Nt,filter:()=>kt,fillWithDefault:()=>ot,fetchPolyfilled:()=>yr,devNull:()=>En,detectEmbed:()=>qe,debounceFn:()=>ct,debounce:()=>wt,createTimers:()=>Me,createDIContainer:()=>In,combine:()=>pt,cloneDeepWith:()=>U,cloneDeep:()=>ut,clearVideoElement:()=>Xt,checkNever:()=>oe,cancelIdleCallbackPolyfilled:()=>Rr,buffer:()=>xt,atPolyfilled:()=>Mr,assertQualityIsExact:()=>it,assertNullable:()=>de,assertNotEmptyArray:()=>pe,assertNonNullable:()=>ue,assertNever:()=>S,assertEmptyArray:()=>me,arrayWith:()=>$n,arrayToSpliced:()=>Qn,arrayToSorted:()=>Zn,arrayToReversed:()=>Xn,arrayIncludes:()=>Yn,arrayFlatMap:()=>Jn,arrayFlat:()=>qn,arrayFindLastIndex:()=>Kn,arrayFindLast:()=>Gn,arrayAt:()=>Wn,areQualitiesExact:()=>rt,addScript:()=>Le,abortable:()=>Re,WorkerState:()=>Se,VolumeFaderPlugin:()=>Bn,VideoQuality:()=>Je,ValueSubject:()=>ft,VKNumericLanguage:()=>yn,VERSION:()=>ae,TracerFactory:()=>gn,TimerModule:()=>xe,SubscriptionRemovable:()=>bt,Subscription:()=>x,Subject:()=>T,RequestPolyfilled:()=>br,ReplaySubject:()=>dt,Observable:()=>w,NormalizerPlugin:()=>Un,Logger:()=>le,InternalsExposure:()=>Tn,InterfaceLanguage:()=>wn,InjectionToken:()=>Fn,INTERNAL_EXPOSE_GLOBAL_KEY:()=>K,ErrorOrigin:()=>_n,ErrorCategory:()=>vn,EqualizerPlugin:()=>Y,CircularBuffer:()=>W,AudioGraph:()=>zn,AppTracer:()=>J,AbortSignalPolyfilled:()=>Sr,AbortControllerPolyfilled:()=>xr}),module.exports=_(b);var ae=`1.0.100-dev.ed76c949d.0`;class x{constructor(){this.subscriptions=[]}unsubscribe(){let e=this.subscriptions;this.subscriptions=[],e.forEach(e=>{typeof e==`function`?e():e.unsubscribe()})}add(e){return this.subscriptions.push(e),this}}var S=e=>{throw Error(`${e} is value of unexpected type`)},oe=e=>{},C=()=>{},se=e=>{throw console.error(e),e},ce=e=>{console.error(e)};class w{constructor(e){this.suppressErrors=!1,e&&(this._subscribe=e)}setSuppressErrors(e){this.suppressErrors=e}subscribe(e,t){let n=this.suppressErrors?ce:se,r;r=t?typeof t==`function`?{next:t,error:C}:{next:e=>t.next(e),error:e=>t.error?.call(t,e)}:{next:n,error:C};let i=typeof e==`function`?{next:t=>{try{let n=e(t);n instanceof Promise&&n.catch(e=>r.next(e))}catch(e){r.next(e)}},error:e=>r.next(e)}:{next:t=>e.next(t),error:t=>e.error?e.error(t):r.next(t)},a;try{a=this._subscribe(i)}catch(e){i.error?.call(i,e)}return new x().add(()=>{switch(i.next=C,i.error=C,typeof a){case`function`:a();return;case`object`:a.unsubscribe();return;case`undefined`:return;default:return S(a)}})}pipe(...e){return e.reduce((e,t)=>t(e),this)}_subscribe(e){}}class T extends w{constructor(){super(),this.keyCounter=0,this.subscribers=new Map}next(e){this.subscribers.forEach(t=>t.next(e))}error(e){this.subscribers.forEach(t=>t.error?.call(t,e))}_subscribe(e){let t=this.keyCounter++;return this.subscribers.set(t,e),new x().add(()=>this.subscribers.delete(t))}}class le{constructor(){this.log$=new T,this.logs=[],this.log=e=>{let t=f(f({},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{n={message:"error in `createCustomLog`",component:`Logger`}}this.log(n)}}createComponentLog(e){return this.createCustomLog(t=>f({component:e},t))}}function ue(e,t=`Assertion "value is not nullable" failed`){if(e==null)throw Error(t)}function de(e,t=`Assertion "value is nullable" failed`){if(e!=null)throw Error(t)}function E(e){return e!=null}function D(e){return e==null}var fe=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>E(t)));function pe(e,t){if(!e?.length)throw Error(t)}function me(e,t){if(e?.length)throw Error(t)}var O=()=>globalThis,he=()=>globalThis,ge=(e=O())=>!!(e.window&&e.screen),k=typeof O().performance?.now==`function`?()=>O().performance.now():()=>Date.now(),_e=()=>Math.trunc(k());function ve(){var e=self,t=new Map;e.onmessage=function(n){var r=n.data;if(r.type===`ping`){e.postMessage({type:`ready`});return}if(r.type===`set`){var i=r.id;r.repeat?t.set(i,{repeat:!0,handle:e.setInterval(function(){e.postMessage({type:`tick`,id:i})},r.delay)}):t.set(i,{repeat:!1,handle:e.setTimeout(function(){t.delete(i),e.postMessage({type:`tick`,id:i})},r.delay)});return}var a=t.get(r.id);a&&(a.repeat?e.clearInterval(a.handle):e.clearTimeout(a.handle),t.delete(r.id))}}var ye=()=>`'use strict';(${ve.toString()})();`;class be{constructor(e,t){this.worker=void 0,this.handlers=void 0,this.records=new Map,this.ticks=0,this.handleMessage=e=>{if(e.data.type===`ready`){this.handlers.onReady();return}let{id:t}=e.data,n=this.records.get(t);D(n)||(this.ticks++,n.repeat||this.records.delete(t),n.callback())},this.handleError=()=>{this.handlers.onFatalError(this.destroy())},this.worker=e,this.handlers=t,this.worker.onmessage=this.handleMessage,this.worker.onerror=this.handleError,this.worker.onmessageerror=this.handleError,this.postCommand({type:`ping`})}static create(e){let t=O();if(typeof t.Worker!=`function`||typeof t.Blob!=`function`||D(t.URL?.createObjectURL))return null;let n=t.URL.createObjectURL(new t.Blob([ye()],{type:`text/javascript`}));try{return new be(new t.Worker(n),e)}catch{return null}finally{t.URL.revokeObjectURL(n)}}get activeCount(){return this.records.size}get deliveredTicks(){return this.ticks}set(e,t,n,r){this.records.set(e,{callback:t,repeat:r,delay:n,startedAt:k()}),this.postCommand({type:`set`,id:e,delay:n,repeat:r})}clear(e){this.records.delete(e)&&this.postCommand({type:`clear`,id:e})}destroy(){let e=new Map(this.records);return this.records.clear(),this.worker.onmessage=null,this.worker.onerror=null,this.worker.onmessageerror=null,this.worker.terminate(),e}postCommand(e){this.worker.postMessage(e)}}var xe;(e=>{e.SHARED=`shared`,e.CORE=`core`,e.STATISTICS=`statistics`,e.INTERACTIVE=`interactive`,e.UI=`ui`,e.UI_TV=`ui-tv`})(xe||={});var Se;(e=>{e.IDLE=`idle`,e.STARTING=`starting`,e.READY=`ready`,e.FAILED=`failed`})(Se||={});var Ce=1,A=0,j=`idle`,M=null,N=new Map,P=new Set,we=e=>{let t=k();for(let[n,r]of e){let e=r.repeat?r.delay:Math.max(0,r.delay-(t-r.startedAt));ke(n,r.callback,e,r.repeat)}},Te=e=>{j=`failed`,M=null,we(e)},Ee=()=>{D(M)||(we(M.destroy()),M=null),j=`idle`},De=()=>{j===`idle`&&(j=`starting`,M=be.create({onReady:()=>{j=`ready`},onFatalError:Te}))},Oe=e=>P.has(e)?(De(),j===`ready`?M:null):null,ke=(e,t,n,r)=>{let i=he();r?N.set(e,{repeat:!0,nativeId:i.setInterval(t,n)}):N.set(e,{repeat:!1,nativeId:i.setTimeout(()=>{N.delete(e),t()},n)})},Ae=(e,t,n,r)=>{let i=Ce++,a=Oe(e);return D(a)?ke(i,t,n,r):a.set(i,t,n,r),i},je=e=>{if(D(e))return;let t=N.get(e);if(D(t)){M?.clear(e);return}N.delete(e);let n=he();t.repeat?n.clearInterval(t.nativeId):n.clearTimeout(t.nativeId)},Me=e=>({setTimeout:(t,n=0)=>Ae(e,t,n,!1),setInterval:(t,n=0)=>Ae(e,t,n,!0),clearTimeout:je,clearInterval:je}),Ne=e=>{P.clear(),e.forEach(e=>P.add(e)),P.size===0&&Ee()},Pe=e=>{A++,Ne(e)},Fe=()=>{A!==0&&(A--,A===0&&Ne([]))},Ie=()=>({workerModules:[...P],workerState:j,liveConsumers:A,activeWindowTimers:N.size,activeWorkerTimers:M?.activeCount??0,workerTicks:M?.deliveredTicks??0}),F=Me(`shared`),Le=(e,t,n)=>new Promise((r,i)=>{t.addEventListener(`abort`,()=>{s(),l.remove()});let a=()=>{s(),i(`error`)},o=()=>{s(),r()},s=()=>{c&&F.clearTimeout(c),l.removeEventListener(`load`,o),l.removeEventListener(`error`,a)},c;n&&(c=F.setTimeout(()=>{s(),i(`timeout`)},n));let l=document.createElement(`script`);l.addEventListener(`load`,o),l.addEventListener(`error`,a),l.src=e,document.head.appendChild(l)}),Re=(e,t)=>p(function*(...n){let r=t(...n),i=e.aborted,a;for(;!i&&!e.aborted;)try{let e=yield r.next(a);i=e.done??!1,a=e.value}catch(e){yield r.throw(e)}return a}),ze=(e,{start:t=0,factor:n=2,max:r=1/0,min:i=t,random:a=0}={})=>{let o=t;return o*=n**+e,o*=1+(Math.random()*a*2-a),o=Math.round(o),o=Math.min(o,r),o=Math.max(o,i),o},Be={};y(Be,{set:()=>Ue,remove:()=>Ge,isPersistent:()=>Ve,has:()=>We,get:()=>He,clear:()=>Ke});var I,L,R=`vk-videoplayer-dummy-key-${Math.random()}`,z=()=>{if(L!==void 0)return L;try{localStorage.setItem(R,`test`),localStorage.removeItem(R),L=0}catch(e){if(e instanceof DOMException||e instanceof TypeError)try{sessionStorage.getItem(R),L=1}catch(e){if(e instanceof DOMException||e instanceof TypeError)L=2;else throw e}else throw e}return L===2&&(I=new Map),L},Ve=()=>z()===0,He=e=>{let t=z();switch(t){case 0:return localStorage.getItem(e)??void 0;case 1:return sessionStorage.getItem(e)??void 0;case 2:return I?.get(e);default:S(t)}},Ue=(e,t)=>{let n=z();switch(n){case 0:try{localStorage.setItem(e,t)}catch(e){if(e instanceof DOMException)console.error(e);else throw e}break;case 1:try{sessionStorage.setItem(e,t)}catch(e){if(e instanceof DOMException)console.error(e);else throw e}break;case 2:I?.set(e,t);return;default:S(n)}},We=e=>{let t=z();switch(t){case 0:return e in localStorage;case 1:return e in sessionStorage;case 2:return I?.has(e)??!1;default:return S(t),!1}},Ge=e=>{let t=z();switch(t){case 0:return localStorage.removeItem(e);case 1:return sessionStorage.removeItem(e);case 2:I?.delete(e);return;default:S(t)}},Ke=()=>{let e=z();switch(e){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return I?.clear();default:S(e)}},qe=()=>{let e,t=[],n=O();try{e=n.self!==n.top}catch(t){t instanceof DOMException&&t.name===`SecurityError`?e=!0:(e=!1,console.error(t))}try{n.location?.ancestorOrigins&&(t=[...n.location.ancestorOrigins])}catch(e){console.error(e)}try{!t.length&&n.document.referrer&&(t=[new URL(n.document.referrer).origin])}catch(e){console.error(e)}return t=t.filter(e=>URL.canParse(e)),{isEmbed:e,origins:t,topOrigin:t.at(-1),immediateOrigin:t.at(0)}},Je;(e=>{e.INVARIANT=`Invariant quality`,e.Q_144P=`144p`,e.Q_240P=`240p`,e.Q_360P=`360p`,e.Q_480P=`480p`,e.Q_576P=`576p`,e.Q_720P=`720p`,e.Q_1080P=`1080p`,e.Q_1440P=`1440p`,e.Q_2160P=`2160p`,e.Q_4320P=`4320p`})(Je||={});var B={"144p":{width:256,height:144},"240p":{width:428,height:240},"360p":{width:640,height:360},"480p":{width:856,height:480},"576p":{width:1024,height:576},"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}},Ye=(e,t)=>B[e].height>B[t].height,Xe=(e,t)=>B[e].height>=B[t].height,V=(e,t)=>B[e].height<B[t].height,Ze=(e,t)=>B[e].height<=B[t].height,Qe=e=>e.sort((e,t)=>e===t?0:e===`Invariant quality`?1:t===`Invariant quality`?-1:V(e,t)?1:-1)[0],$e=Object.keys(B).sort((e,t)=>V(e,t)?-1:1),et=(e,t=.02)=>[...$e].find(n=>B[n].height*(1+t)>=e),tt=({width:e,height:t})=>{let n=Math.min(e,t),r=Math.max(e,t);return $e.find(e=>{let t=B[e];return t.width>=r&&t.height>=n})},nt=e=>B[e].height,H=e=>e===`Invariant quality`,rt=e=>e.every(e=>!H(e));function it(e){if(H(e))throw Error(`Expected exact quality`)}var at=e=>{switch(e){case`4320p`:return`8K`;case`2160p`:return`4K`;case`1440p`:return`QHD`;case`1080p`:return`FHD`;case`720p`:return`HD`;default:return``}},ot=(e,t)=>{let n={};for(let r of Object.keys(t)){let i=t[r],a=e[r];Array.isArray(i)?n[r]=Array.isArray(a)?a:i:typeof i==`object`&&i?typeof a==`object`&&a&&!Array.isArray(a)?n[r]=ot(a,i):n[r]=a??i:n[r]=r in e?a:i}return n},st=e=>{let t=``;return e>=3600&&(t+=Math.floor(e/3600)+`h`,e%=3600),e>=60&&(t+=Math.floor(e/60)+`m`,e%=60),e>0&&(t+=Math.floor(e)+`s`),t};function ct(e,t=0,n){let r,i,a,o,s,c,l=0,u=!1,d=!1,f=!0,p=!t&&t!==0&&typeof O().requestAnimationFrame==`function`;n&&(u=!!n.leading,d=`maxWait`in n,a=n?.maxWait?Math.max(+n?.maxWait||0,t):a,f=`trailing`in n?!!n.trailing:f);function m(t){let n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o}function h(e,t){return p?(s&&O().cancelAnimationFrame(s),O().requestAnimationFrame(e)):F.setTimeout(e,t)}function ee(e){if(p){O().cancelAnimationFrame(e);return}F.clearTimeout(e)}function te(e){return l=e,s=h(_,t),u?m(e):o}function ne(e){let n=e-c,r=e-l,i=t-n;return d?Math.min(i,a-r):i}function g(e){let n=e-c,r=e-l;return c===void 0||n>=t||n<0||d&&r>=a}function _(){let e=Date.now();if(g(e))return v(e);s=h(_,ne(e))}function v(e){return s=void 0,f&&r?m(e):(r=i=void 0,o)}function re(){s!==void 0&&ee(s),l=0,r=c=i=s=void 0}function ie(){return s===void 0?o:v(Date.now())}function y(){return s!==void 0}function b(...e){let n=Date.now(),a=g(n);if(r=e,i=this,c=n,a){if(s===void 0)return te(c);if(d)return s=h(_,t),m(c)}return s===void 0&&(s=h(_,t)),o}return b.cancel=re,b.flush=ie,b.pending=y,b}var lt=(e,t=0,n)=>ct(e,t,f(f(f({},{leading:!0,trailing:!0}),n),{},{maxWait:t})),U=(e,t)=>{if(typeof e!=`object`||!e)return e;let n=Array.isArray(e)?[]:{};for(let r in e){if(typeof t==`function`){let i=t(e[r],r,e,n);if(i!==void 0){n[r]=i;continue}}typeof e[r]==`object`?n[r]=U(e[r],t):n[r]=e[r]}return n},ut=e=>U(e);class dt extends T{constructor(e){super(),this.bufferSize=void 0,this.buffer=[],this.cursorEnd=-1,this.cursorStart=0,this.bufferSize=e,this.buffer=Array(e)}next(e){this.cursorEnd+=1,this.cursorStart=this.cursorEnd>=this.bufferSize?this.cursorStart+1:0,this.buffer[this.cursorEnd%this.bufferSize]=e,this.subscribers.forEach(t=>t.next(e))}_subscribe(e){for(let t=this.cursorStart;t<=this.cursorEnd;t++)e.next(this.buffer[t%this.bufferSize]);let t=this.keyCounter++;return this.subscribers.set(t,e),new x().add(()=>this.subscribers.delete(t))}}class ft extends T{constructor(e){super(),this.value=void 0,this.value=e}next(e){super.next(this.value=e)}error(e){super.error(this.value=e)}getValue(){return this.value}_subscribe(e){let t=super._subscribe(e);return e.next(this.value),t}}function pt(e){return new w(t=>{let n={},r=Object.keys(e).length,i=e=>i=>{e in n||r--,n[e]=i,r===0&&t.next(n)};return Object.entries(e).reduce((e,[t,n])=>e.add(n.subscribe(i(t))),new x)})}function mt(...e){return new w(t=>e.reduce((e,n)=>e.add(n.subscribe(t)),new x))}var ht=e=>new w(t=>{let n=F.setTimeout(()=>{try{t.next()}catch(e){if(t.error)t.error(e);else throw e}},e);return()=>F.clearTimeout(n)}),gt=e=>new w(t=>{let n=F.setInterval(()=>t.next(),e);return()=>{n&&=(F.clearInterval(n),void 0)}});function _t(e){return new w(t=>{if(e instanceof Promise){let n=!1;return e.then(e=>{n||t.next(e)}).catch(e=>{n||t.error?.call(t,e)}),()=>{n=!0}}for(let n=0;n<e.length;n++)t.next(e[n])})}var vt=_t,yt=(e,t)=>new w(n=>{let r=e=>n.next(e);return e.addEventListener(t,r),()=>e.removeEventListener(t,r)});class bt extends x{remove(e){this.subscriptions=this.subscriptions.filter(t=>t!==e)}}function xt(e){return t=>new w(n=>t.subscribe(new St(n,e)))}class St{constructor(e,t){this.destination=void 0,this.size=void 0,this.lastValues=[],this.destination=e,this.size=t}next(e){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(e),this.destination.next(this.lastValues)}error(e){var t;(t=this.destination).error?.call(t,e)}}var Ct={leading:!1,trailing:!0};function wt(e,t=Ct){return n=>new w(r=>n.subscribe(new Tt(r,e,t)))}class Tt{constructor(e,t,n){this.destination=void 0,this.time=void 0,this.config=void 0,this.lastValue=void 0,this.timeout=void 0,this.destination=e,this.time=t,this.config=n}next(e){this.lastValue=e,E(this.timeout)?F.clearTimeout(this.timeout):this.config.leading&&this.destination.next(e),this.timeout=F.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(e){if(this.destination.error)this.destination.error(e);else throw e}this.timeout=void 0},this.time)}error(e){var t;(t=this.destination).error?.call(t,e)}}var Et={leading:!0,trailing:!1};function Dt(e,t=Et){return n=>new w(r=>n.subscribe(new Ot(r,e,t)))}class Ot{constructor(e,t,n){this.destination=void 0,this.time=void 0,this.config=void 0,this.lastValue=void 0,this.timeout=void 0,this.destination=e,this.time=t,this.config=n}next(e){this.lastValue=e,D(this.timeout)&&(this.config.leading&&this.destination.next(e),this.timeout=F.setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(e){var t;(t=this.destination).error?.call(t,e)}}function kt(e){return t=>new w(n=>t.subscribe(new At(n,e)))}class At{constructor(e,t){this.destination=void 0,this.predicate=void 0,this.destination=e,this.predicate=t}next(e){let t;try{t=this.predicate(e)}catch(e){throw this.error(e),e}t&&this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}var jt=(e,t)=>{let n=(e,t)=>{let n=Object.keys(e);for(let r in t)if(!n.includes(r)||t[r]!==e[r])return!1;return!0};return n(e,t)&&n(t,e)},Mt=(e,t)=>e instanceof Object&&t instanceof Object?jt(e,t):e===t;function Nt(e=Mt){return t=>new w(n=>t.subscribe(new Ft(n,e)))}var Pt={};class Ft{constructor(e,t){this.destination=void 0,this.predicate=void 0,this.lastValue=Pt,this.destination=e,this.predicate=t}next(e){let t;try{t=this.lastValue===Pt||!this.predicate(this.lastValue,e),this.lastValue=e instanceof Object&&!Array.isArray(e)?f({},e):e}catch(e){throw this.error(e),e}t&&this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}function It(e){return t=>new w(n=>t.subscribe(new Lt(n,e)))}class Lt{constructor(e,t){this.destination=void 0,this.mapper=void 0,this.destination=e,this.mapper=t}next(e){let t;try{t=this.mapper(e)}catch(e){throw this.error(e),e}this.destination.next(t)}error(e){var t;(t=this.destination).error?.call(t,e)}}function Rt(e){return It(()=>e)}function zt(){return e=>new w(t=>{let n=!1,r=!1,i=e.subscribe(e=>{n||(n=!0,t.next(e)),r&&i.unsubscribe()},e=>{n=!0,t.error?.call(t,e),r&&i.unsubscribe()});return r=!0,n&&i.unsubscribe(),i})}function Bt(){return e=>new w(t=>e.subscribe(new Vt(t)))}class Vt{constructor(e){this.destination=void 0,this.last=void 0,this.hasLast=!1,this.destination=e}next(e){let t=this.last;if(this.last=e,!this.hasLast){this.hasLast=!0;return}this.destination.next([t,e])}error(e){var t;(t=this.destination).error?.call(t,e)}}function Ht(e){return t=>new w(n=>t.subscribe(new Ut(n,e)))}class Ut{constructor(e,t){this.destination=void 0,this.effect=void 0,this.destination=e,this.effect=t}next(e){try{this.effect(e)}catch(e){throw this.error(e),e}this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}function Wt(e){return t=>new w(n=>t.subscribe(new Gt(n,e)))}class Gt{constructor(e,t){if(this.destination=void 0,this.count=void 0,this.destination=e,this.count=t,t<0){var n;(n=this.destination).error?.call(n,Error(`Count can not be less than zero`))}}next(e){this.count===0?this.destination.next(e):this.count--}error(e){var t;(t=this.destination).error?.call(t,e)}}function Kt(e=0){return t=>{let n=0,r=new dt(e),i=t.subscribe(r),a=e=>()=>{e.unsubscribe(),n--,n===0&&i.unsubscribe()};return new w(e=>(n++,a(r.subscribe(e))))}}var qt=300,Jt=(e,t=qt)=>new w(n=>{let r=O(),{width:i,height:a}=e.getBoundingClientRect();if(n.next({width:i,height:a}),!ge(r))return;let o=new r.ResizeObserver(lt(e=>{let t=e[0];if(!t)return;let r,i;t.contentBoxSize&&t.contentBoxSize[0]?(i=t.contentBoxSize[0].blockSize,r=t.contentBoxSize[0].inlineSize):t.contentRect&&(r=t.contentRect.width,i=t.contentRect.height),E(r)&&E(i)&&n.next({width:r,height:i})},t));return o.observe(e),()=>o.disconnect()}),Yt=(e,t=6,n=`.`)=>{let r={};for(let i in e)if(!(!e.hasOwnProperty(i)||e[i]instanceof HTMLElement||!t))if(typeof e[i]==`object`&&e[i]!==null){let a=Yt(e[i],t-1);for(let e in a)a.hasOwnProperty(e)&&(r[i+n+e]=a[e])}else r[i]=e[i];return r},Xt=e=>{e.innerHTML=``,e.removeAttribute(`src`),e.load()},Zt=e=>{let t;try{t=new URL(e)}catch{return!1}return t.protocol===`https:`},Qt=(e,t)=>!(e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom),$t=(()=>{let e=0;return()=>{let t=e;return e=(e+1)%(2**53-1),t}})(),en=e=>e!==void 0&&e!==``?e:$t().toString();function tn(e,t,n){if(e<=t[0])return n[0];if(e>=t[t.length-1])return n[n.length-1];let r=1;for(;r<t.length&&t[r]<e;)r++;r>=t.length&&(r=t.length-1);let i=t[r-1],a=t[r],o=n[r-1],s=n[r];return e===i?o:e===a?s:o+(e-i)/(a-i)*(s-o)}function nn(e,t,n){if(e<=0||n<0)return[];let r=[],i=Math.floor((e-1)/2),a=Math.floor(e/2),o=t-i,s=t+a;o<0&&(s+=Math.abs(o),o=0),s>n&&(o-=s-n,s=n),o=Math.max(0,o),s=Math.min(n,s);for(let e=o;e<=s;e++)r.push(e);return r}var rn=e=>e instanceof DOMException&&(e.name===`AbortError`||e.code===20),an=e=>{if(!rn(e))throw e};function on(e){if(e&&typeof e==`object`){if(`message`in e)return String(e.message);try{return JSON.stringify(e)}catch{return`object serialization error`}}return String(e)}m=Symbol.iterator;class W{constructor(e){if(this.buffer=void 0,this.writeIndex=0,this.count=0,this.capacity=void 0,e<=0)throw Error(`Capacity must be greater than 0`);this.capacity=e,this.buffer=Array.from({length:e}).fill(null)}add(e){this.buffer[this.writeIndex]=e,this.writeIndex=(this.writeIndex+1)%this.capacity,this.count<this.capacity&&this.count++}*[m](){if(this.count===0)return;let e=this.count<this.capacity?0:this.writeIndex;for(let t=0;t<this.count;t++){let t=this.buffer[e];E(t)&&(yield t),e=(e+1)%this.capacity}}clear(){this.buffer.fill(null),this.writeIndex=0,this.count=0}get size(){return this.count}get maxCapacity(){return this.capacity}}var sn=e=>(t,n=!1)=>r=>{let i=typeof r==`object`;r==null||i&&!Object.keys(r).length||e(t,i?Yt(r):{value:r},n)},cn=(e={})=>{let t=e=>{let t=e;return e===void 0?t=`undefined`:e===null?t=`null`:(typeof e==`number`||typeof e==`boolean`)&&(t=e.toString()),t},n={};for(let r in e)Array.isArray(e[r])?n[r]=e[r].map(t):n[r]=t(e[r]);return n};class G{constructor({name:e,getParentContext:t,getRootTracerContext:n,options:r}){this.dynamicImportTimeout=5e3,this.subscription=new x,this.options=void 0,this.span=void 0,this.context=void 0,this.childTracers=[],this.initPromise=void 0,this.getRootTracerContext=void 0,this.eventsBuffer=null,this.options=r??{};let{tracerEventsBufferSize:i}=this.options;E(i)&&i>0&&(this.eventsBuffer=new W(i)),G.dynamicImportStatus===`not_started`&&(G.dynamicImportPromise=this.loadOpentelemetry());let a=Date.now();this.initPromise=G.dynamicImportPromise.then(r=>{G.dynamicImportStatus===`completed`&&this.init({name:e,getParentContext:t,getRootTracerContext:n},a)})}init({name:e,getParentContext:t,getRootTracerContext:n},r){let i=n?.();if(D(i))return;let{opentelemetryApi:a}=G.dynamicImports,{context:o,trace:s}=a,{tracer:c,attributes$:l}=i;this.span=c.startSpan(e,{startTime:r},t?.()),this.context=s.setSpan(o.active(),this.span),this.getRootTracerContext=n,this.subscription.add(l.subscribe(e=>{E(e)&&this.span.setAttributes(e)}))}loadOpentelemetry(){var e=this;return p(function*(){if(G.dynamicImportStatus===`not_started`){G.dynamicImportStatus=`in_progress`;try{let t=new Promise((t,n)=>F.setTimeout(n,e.dynamicImportTimeout)),n=Promise.all([import(`@opentelemetry/api`),import(`@opentelemetry/sdk-trace-web`),import(`@apptracer/opentelemetry`),import(`@opentelemetry/resources`),import(`@opentelemetry/semantic-conventions`)]),[r,i,a,o,s]=yield Promise.race([n,t]);G.dynamicImports={opentelemetryApi:r,opentelemetrySdk:i,tracer:a,opentelemetryResources:o,opentelemetrySemanticConventions:s},G.dynamicImportStatus=`completed`}catch{G.dynamicImportStatus=`failed`}}})()}isComponentTracerNotInitialized(){return D(this.span)||G.dynamicImportStatus===`failed`}addEventToBuffer(e,t,n,r){E(this.eventsBuffer)&&this.eventsBuffer.add({name:e,attributes:t,type:n,timestamp:r})}addEventToSpan(e,t,n,r){this.span.addEvent(e,f(f({},cn(t)),{},{type:n}),r)}log(e,t,n=!1){let r=Date.now();n?this.initPromise.then(n=>{this.isComponentTracerNotInitialized()||this.addEventToSpan(e,t,`log`,r)}):this.addEventToBuffer(e,t,`log`,r)}error(e,t,n=!1){let r=Date.now();n?this.initPromise.then(n=>{this.isComponentTracerNotInitialized()||this.addEventToSpan(e,t,`error`,r)}):this.addEventToBuffer(e,t,`error`,r)}critical(e,t,n=!1){let r=Date.now();n?this.initPromise.then(n=>{this.isComponentTracerNotInitialized()||this.addEventToSpan(e,t,`critical`,r)}):this.addEventToBuffer(e,t,`critical`,r)}createComponentTracer(e){let t=new G({name:e,getParentContext:()=>this.context,getRootTracerContext:()=>this.getRootTracerContext?.call(this),options:this.options});return this.childTracers.push(t),t}setSpanAttributes(e){this.span.setAttributes(cn(e))}end(){this.initPromise.then(e=>{if(!this.isComponentTracerNotInitialized()){if(E(this.eventsBuffer))for(let e of this.eventsBuffer)this.addEventToSpan(e.name,e.attributes,e.type,e.timestamp);this.childTracers.forEach(e=>e.end()),this.span.end(),this.subscription.unsubscribe()}})}pause(){var e;(e=this.getRootTracerContext)==null||(e=e.call(this))==null||e.paused$.next(!0)}resume(){var e;(e=this.getRootTracerContext)==null||(e=e.call(this))==null||e.paused$.next(!1)}}G.dynamicImportStatus=`not_started`,G.dynamicImports=void 0,G.dynamicImportPromise=void 0;var ln=`gW5EerTD5QhAnsbpF7Hd2NSMRteYIUUMjFbSyI68Pf5`,un=e=>{class t extends e{constructor(e,t){super(e,t),this._isPaused=!1,this._pausedSpans=void 0,this.maxExportBatchSize=void 0,this.maxQueueSize=void 0,this.maxQueueSize=t?.maxQueueSize??2048,this.maxExportBatchSize=t?.maxExportBatchSize??512,this._pausedSpans=new W(this.maxQueueSize)}pause(){this._isPaused=!0}resume(){var e=()=>super.onEnd,t=this;return p(function*(){if(!t._isPaused)return;t._isPaused=!1;let n=t._pausedSpans;t._pausedSpans=new W(t.maxQueueSize);let r=0;for(let i of n)e().call(t,i),r+=1,r>=t.maxExportBatchSize&&(yield new Promise(e=>F.setTimeout(()=>e(void 0),0)),r=0);n.clear(),yield t.forceFlush()})()}onEnd(e){if(this._isPaused){this._pausedSpans.add(e);return}super.onEnd(e)}}return t};class dn extends G{constructor(e){super({name:`Root`,options:e}),this.attributes$=new ft(null),this.paused$=new ft(!1),this.paused$.next(!!this.options.tracerPausedAtInit)}init({name:e,getParentContext:t},n){let{tracer:r,opentelemetryResources:i,opentelemetrySdk:a,opentelemetrySemanticConventions:o}=G.dynamicImports,{TracerUploadSpanExporter:s}=r,{WebTracerProvider:c,BatchSpanProcessor:l}=a,{resourceFromAttributes:u}=i,{ATTR_SERVICE_NAME:d,ATTR_SERVICE_VERSION:f}=o,p=new(un(l))(new s({appToken:ln}));this.subscription.add(this.paused$.subscribe(e=>{e?p.pause():p.resume()}));let m=new c({resource:u({[d]:`videoplayer-sdk-web`,[f]:ae}),spanLimits:{attributeCountLimit:1/0,eventCountLimit:1/0,attributePerEventCountLimit:1/0},spanProcessors:[p]});m.register();let h=m.getTracer(`sdk-videoplayer-tracer`);super.init({name:e,getParentContext:t,getRootTracerContext:()=>({tracer:h,attributes$:this.attributes$,paused$:this.paused$})},n)}getTraceId(){return this.isComponentTracerNotInitialized()?``:this.span.spanContext().traceId}setSpanAttributes(e){this.attributes$.next(f(f({},this.attributes$.getValue()),cn(e)))}addSubscription(e){this.subscription.add(e)}}class fn{constructor(e){this.fakeTraceId=void 0}log(e,t,n){}error(e,t,n){}critical(e,t,n){}createComponentTracer(e){return new fn({name:e})}end(){}getTraceId(){return this.fakeTraceId}addSubscription(e){}setSpanAttributes(e){}pause(){}resume(){}}var pn=()=>!0,mn={level:0,filter:pn,name:`Noname Tracer`,outputMethod:`log`};class hn{constructor({name:e,level:t,filter:n,outputMethod:r}={}){this.name=void 0,this.filter=pn,this.level=mn.level,this.outputMethod=mn.outputMethod,this.childTracers=[],this.filter=n??this.filter,this.level=t??this.level,this.outputMethod=r??this.outputMethod,this.name=e??mn.name}log(e,t,n){this.logDebug(e,t)}error(e,t,n){this.logError(e,t)}critical(e,t,n){this.logError(e,t)}createComponentTracer(e){let t=new hn({filter:this.filter,level:this.level,name:`${this.name}/ ${e}`,outputMethod:this.outputMethod});return this.childTracers.push(t),t}end(){this.childTracers.forEach(e=>e.end()),this.childTracers=[]}setLevel(e){this.level=e,this.childTracers.forEach(t=>t.setLevel(e))}setOtputMethod(e){this.outputMethod=e,this.childTracers.forEach(t=>t.setOtputMethod(e))}setFilter(e){this.filter=e,this.childTracers.forEach(t=>t.setFilter(e))}getFinishedSpans(){}getTraceId(){return`debug_trace`}get verbose(){return this.level===0}createMessage(e,t){return[this.name,e,JSON.stringify(t)].join(`: `)}logDebug(e,t){!this.verbose||!this.filter(e,t)||O().console[this.outputMethod](this.createMessage(e,t))}logError(e,t){this.filter(e,t)&&O().console.error(this.createMessage(e,t))}addSubscription(e){}setSpanAttributes(e){}pause(){}resume(){}}class gn{static createRootTracer(e=`fake`,t){switch(e){case`real`:return new dn(t);case`debug`:return new hn;default:return new fn}}}var _n;(e=>{e.MediaError=`mediaError`,e.SegmentFetcher=`segment_fetcher`,e.Hangup=`hangup`,e.Stall=`stall`})(_n||={});var vn;(e=>{e.NETWORK=`network`,e.VIDEO_PIPELINE=`video_pipeline`,e.EXTERNAL_API=`external_api`,e.PARSER=`parser`,e.DOM=`dom`,e.WTF=`wtf`,e.UI=`ui`,e.CALL_FROM_EXTERNAL=`call_from_external`,e.FATAL=`fatal`})(vn||={});var yn;(e=>{e.Armenian=`58`,e.Azerbaijani=`57`,e.Belarusian=`114`,e.English=`3`,e.Kazakh=`97`,e.Portuguese=`73`,e.Russian=`0`,e.Spanish=`4`,e.Ukrainian=`1`,e.Uzbek=`65`,e.Vietnamese=`75`})(yn||={});var bn=`vk.ru`,xn=function(){var e=p(function*(e,t,n){let r=new URL(`https://${bn}/js/lang-pack.js`);return r.searchParams.set(`format`,`json`),r.searchParams.set(`name`,t),e!==void 0&&r.searchParams.set(`lang`,e),Sn(yield(yield fetch(r.toString())).json(),n)});return function(t,n,r){return e.apply(this,arguments)}}(),Sn=(e,t)=>Object.fromEntries(Object.entries(e.keys).map(([e,n])=>[e.substring(`${t}_`.length),Cn(n)])),Cn=e=>Array.isArray(e)?e[0]:e,wn;(e=>{e.RU=`ru`,e.EN=`en`})(wn||={});var K=`__vk_vp_internals_exposure`;class Tn{constructor(e,t){this.playerId=void 0,this.type=void 0,this.playerId=t,this.type=e,this.initWindowObjects()}getWindowObject(){var e;if(typeof window>`u`)return{};let t=this.playerId,n=this.type;return((e=window[K])==null||(e=e[t])==null?void 0:e[n])??{}}initWindowObjects(){if(typeof window>`u`)return;let e=this.playerId,t=this.type;window[K]||(window[K]={}),window[K][e]||(window[K][e]={}),window[K][e][t]||(window[K][e][t]={})}expose(e){typeof window>`u`||Object.assign(this.getWindowObject(),e)}destroy(){if(typeof window>`u`)return;let e=this.playerId,t=this.type;window[K]&&window[K][e]&&window[K][e][t]&&(delete window[K][e][t],Object.keys(window[K][e]).length||delete window[K][e],Object.keys(window[K]).length||delete window[K])}}var En={};y(En,{subscribe:()=>An,push:()=>kn,destroy:()=>On,create:()=>Dn});var q=new Map,Dn=(e,t)=>q.set(e,t??[]),On=e=>q.delete(e),kn=(e,t)=>{let n=q.get(e);n&&(typeof n==`function`?n(t):n.push(t))},An=(e,t)=>{let n=q.get(e);if(n){if(n&&Array.isArray(n))for(let e of n)t(e);q.set(e,t)}},jn=e=>fe({id:e.id,message:e.message,category:e.category,data:Mn(e.data),httpCode:e.httpCode,UVBackendErrorCode:e.UVBackendErrorCode});function Mn(e){switch(typeof e){case`boolean`:case`string`:case`number`:return e;case`object`:try{return JSON.stringify(e)}catch{return}default:return}}var Nn=e=>{let t=e.thrown instanceof Error?e.thrown:Error(e.message),n=e.id.length>10240?e.id.substring(0,10240):e.id;try{t.name=n}catch{t=Error(e.message),t.name=n}return t},Pn=()=>{try{var e;let{origin:t,pathname:n,search:r,hostname:i}=((e=O())==null||(e=e.document)==null?void 0:e.location)??{};return!i||i===`localhost`?void 0:f({url:t+n},new URLSearchParams(r).entries().reduce((e,[t,n])=>(e[`url.${t}`]=n,e),{}))}catch{}};class J{constructor(e,t,n,r){this.dynamicImportTimeout=5e3,this.componentName=void 0,this.subscription=new x,this.options=void 0,this.envParams=void 0,this.context=void 0,this.isEmbed=void 0,this.embedParent=void 0,this.beforeInitErrors=[],this.componentName=e,this.options=t,this.envParams=n,this.context=f({},r);let{isEmbed:i,topOrigin:a}=qe();this.isEmbed=i,this.embedParent=a?new URL(a).hostname:void 0,this.options.enabled&&(this.loadModule(),this.init())}updateContext(e){Object.assign(this.context,e)}error(e,t){let n=J.tracerErrorMap.get(this.componentName);if(!n){this.beforeInitErrors.push([e,t]);return}let{blackErrorCategoryList:r,blackErrorIdList:i,sampleRate:a,whiteErrorCategoryList:o,whiteErrorIdList:s}=this.options,{id:c,category:l}=e;if(!(r.length&&r.includes(l)||i.length&&i.includes(c)||o.length&&!o.includes(l)||s.length&&!s.includes(c)||Math.random()>=a))try{let r=Nn(e);n?.error(r,f(f({crashIdSource:t?.crashIdSource??r.name,severity:t?.severity??(e.traceAsLog?`debug`:void 0)},t?.issueKey?{issueKey:t.issueKey}:{}),{},{keys:f(f(f(f({},this.context),jn(e)),Pn()),this.isEmbed&&this.embedParent&&{iframe_host:this.embedParent})}))}catch(e){console.error(e)}}addSubscription(e){this.subscription.add(e)}destroy(){this.subscription.unsubscribe()}init(){var e=this;return p(function*(){try{if(yield J.loadPromise,J.tracerErrorMap.has(e.componentName)||D(J.appTracerModule))return;let{appTracerModule:t}=J,{initTracerError:n,initTracerErrorUploader:r,getTracerModules:i}=t,a=i(e.componentName),o=!a.error,s=a.error??n(e.componentName,{enableUnhandledErrorsListeners:!1,stringifyErrorDataObject:!0});E(e.options.userId)&&s.setUserId(e.options.userId),o&&r(e.componentName,{appToken:ln,environment:e.envParams.env,versionCode:1,versionName:e.envParams.version}),J.tracerErrorMap.set(e.componentName,s),e.beforeInitErrors.forEach(t=>e.error.apply(e,t)),e.beforeInitErrors=[]}catch(e){console.error(e)}})()}loadModule(){var e=this;E(J.loadPromise)||(J.loadPromise=function(){var t=p(function*(){try{let t=new Promise((t,n)=>F.setTimeout(n,e.dynamicImportTimeout));J.appTracerModule=yield Promise.race([t,import(`@apptracer/sdk/lite`)])}catch(e){J.loadPromise=null,console.error(e)}});return function(){return t.apply(this,arguments)}}()())}}J.tracerErrorMap=new Map,J.appTracerModule=null,J.loadPromise=null;class Fn{constructor(e,t){this.options=void 0,this.symbol=void 0,this.options=t,this.symbol=Symbol(e)}}var In=()=>{let e=new Map,t=new Map,n=new Map,r=new Map,i=new Set;return{resolve(e){if(!r.has(e)){let t=n.get(e);if(!t)throw Error(`No constructor registered in DI container for ${e.name}`);r.set(e,new t)}return r.get(e)},resolveOptional(e){try{return this.resolve(e)}catch{return}},replace(e,t){r.forEach((t,n)=>{t instanceof e&&r.delete(n)}),n.set(e,t)},getToken(n){if(e.has(n.symbol))return e.get(n.symbol);if(t.has(n.symbol)){let r=t.get(n.symbol)();return e.set(n.symbol,r),r}if(n.options?.factory){let t=n.options.factory();return e.set(n.symbol,t),t}throw Error(`No value registered in DI container for token "${n.symbol.description}"`)},registerToken(t,n){e.set(t.symbol,n)},registerFactory(e,n){t.set(e.symbol,n)},hasToken(n){return e.has(n.symbol)||t.has(n.symbol)||!!n.options?.factory},registerCleanup(e){i.add(e)},clear(){i.forEach(e=>e()),i.clear(),e.clear(),t.clear(),r.clear(),n.clear()}}};class Ln{constructor(e){this._inputNode=void 0,this._outputNode=void 0,this._plugins=[],this._destination=null,this._taps=[],this._inputNode=e.createGain(),this._outputNode=e.createGain()}get input(){return this._inputNode}get plugins(){return this._plugins}connectTo(e){this._destination=e,this.rebuild()}addTap(e){this._taps.push(e),this._outputNode.connect(e)}hasPlugin(e){return this._plugins.some(t=>t.id===e)}addPlugin(e){this.hasPlugin(e.id)||(this._plugins.push(e),this.rebuild())}removePlugin(e){let t=this._plugins.findIndex(t=>t.id===e);t!==-1&&(this._plugins.splice(t,1),this.rebuild())}rebuild(){this._inputNode.disconnect();for(let e of this._plugins)e.outputNode.disconnect();this._outputNode.disconnect();let e=this._inputNode;for(let t of this._plugins)e.connect(t.inputNode),e=t.outputNode;e.connect(this._outputNode),this._destination!==null&&this._outputNode.connect(this._destination);for(let e of this._taps)this._outputNode.connect(e)}}class Rn{constructor(e,t,n){this._pluginChain=void 0,this._element=void 0,this._ctx=void 0,this._sourceNode=null,this._isBound=!1,this._element=e,this._ctx=t,this._pluginChain=new Ln(t),this._pluginChain.connectTo(n)}get isBound(){return this._isBound}get plugins(){return this._pluginChain.plugins}bind(){this._isBound||=(this._sourceNode===null&&(this._sourceNode=this._ctx.createMediaElementSource(this._element)),this._sourceNode.disconnect(),this._sourceNode.connect(this._pluginChain.input),!0)}unbind(){this._isBound&&=(this._sourceNode?.disconnect(),this._sourceNode?.connect(this._ctx.destination),!1)}addPlugin(e){this._pluginChain.addPlugin(e)}removePlugin(e){this._pluginChain.removePlugin(e)}addAnalyser(e){this._pluginChain.addTap(e)}}class zn{constructor(){this._ctx=null,this._masterGain=null,this._connections=new Map,this._contextEnabled=!1,this._boundBeforeDisable=new Set}static isSupported(){let e=O();return E(e.AudioContext??e.webkitAudioContext)}get context(){if(D(this._ctx)){let e=O(),t=e.AudioContext??e.webkitAudioContext;this._ctx=new t}return this._ctx}get contextState(){return this._contextEnabled?this._ctx?.state??`suspended`:`suspended`}enableContext(){var e=this;return p(function*(){e.ensureContext(),yield e._ctx?.resume(),e._contextEnabled=!0;for(let t of e._boundBeforeDisable)e._connections.get(t)?.bind();e._boundBeforeDisable.clear()})()}disableContext(){var e=this;return p(function*(){e._contextEnabled=!1;for(let[t,n]of e._connections)n.isBound&&(e._boundBeforeDisable.add(t),n.unbind())})()}connectSource(e){var t=this;return p(function*(){t.ensureContext(),t._contextEnabled=!0,yield t._ctx?.resume();let n=t._connections.get(e);if(n!==void 0){n.isBound||n.bind();return}let r=new Rn(e,t.context,t._masterGain);r.bind(),t._connections.set(e,r)})()}disconnectSource(e){this._connections.get(e)?.unbind()}isSourceConnected(e){return this._connections.get(e)?.isBound??!1}addPlugin(e,t){let n=this._connections.get(e);if(n===void 0)throw Error(`Source is not connected. Call connectSource() first.`);n.addPlugin(t)}removePlugin(e,t){this._connections.get(e)?.removePlugin(t)}getPlugins(e){return this._connections.get(e)?.plugins??[]}createAnalyser(e){let t=this._connections.get(e);if(t===void 0)return null;let n=this.context.createAnalyser();return n.fftSize=256,n.smoothingTimeConstant=.8,t.addAnalyser(n),n}setMasterVolume(e){this._masterGain!==null&&(this._masterGain.gain.value=e)}getMasterVolume(){return this._masterGain?.gain.value??1}dispose(){this._connections.clear(),this._boundBeforeDisable.clear(),this._masterGain=null,this._contextEnabled=!1,this._ctx?.close(),this._ctx=null}ensureContext(){let e=this.context;D(this._masterGain)&&(this._masterGain=e.createGain(),this._masterGain.gain.value=1,this._masterGain.connect(e.destination))}}class Bn{constructor(e,t){this.id=`volume-fader`,this._gainNode=void 0,this._duration=void 0,this._curve=void 0,this._fade=null,this._gainNode=e.createGain(),this._gainNode.gain.value=1,this._duration=t.duration,this._curve=t.curve??this._buildEasingCurve(t.duration/1e3)}get inputNode(){return this._gainNode}get outputNode(){return this._gainNode}get faded(){return this._fade!==null}appear(){this._startFade(0,1)}disappear(){this._startFade(1,0)}pause(){if(this._fade===null)return;let e=this._gainNode.gain,t=this._gainNode.context.currentTime,n=t-this._fade.startTime,r=Math.max(0,this._fade.remaining-n);if(r<=.001){this._finishFade();return}let i=this._sampleIndex(this._fade,t),a=this._fade.curve[i];e.cancelScheduledValues(t),e.setValueAtTime(a,t),this._fade={from:a,target:this._fade.target,startTime:t,remaining:r,curve:this._fade.curve.subarray(i)}}resume(){if(this._fade===null)return;let e=this._gainNode.context.currentTime,{from:t,target:n,remaining:r,curve:i}=this._fade;if(r<=.001||Math.abs(n-t)<.001||i.length<2){this._finishFade();return}this._fade={from:t,target:n,startTime:e,remaining:r,curve:i},this._scheduleCurve(i,t,e,r)}cancel(){this._fade!==null&&this._finishFade()}_finishFade(){if(this._fade===null)return;let e=this._gainNode.gain,t=this._gainNode.context.currentTime;e.cancelScheduledValues(t),e.setValueAtTime(this._fade.target,t),this._fade=null}_startFade(e,t){let n=this._gainNode.gain,r=this._gainNode.context.currentTime,i=this._duration/1e3;if(i<=0){n.cancelScheduledValues(r),n.setValueAtTime(t,r),this._fade=null;return}let a=new Float32Array(this._curve.length);for(let n=0;n<this._curve.length;n++)a[n]=e+(t-e)*this._curve[n];this._fade={from:a[0],target:t,startTime:r,remaining:i,curve:a},this._scheduleCurve(a,a[0],r,i)}_buildEasingCurve(e){let t=Math.max(2,Math.ceil(e*60)),n=new Float32Array(t);for(let e=0;e<t;e++){let r=e/(t-1);n[e]=(1-Math.cos(Math.PI*r))/2}return n}_scheduleCurve(e,t,n,r){let i=this._gainNode.gain;i.cancelScheduledValues(n),i.setValueAtTime(t,n),i.setValueCurveAtTime(e,n,r)}_sampleIndex(e,t){let n=t-e.startTime,r=Math.max(0,Math.min(1,n/e.remaining));return Math.min(Math.round(r*(e.curve.length-1)),e.curve.length-1)}}class Vn{constructor(e,t,n,r){this._filter=void 0,this._source=void 0,this._defaultGain=void 0,this.frequency=void 0,this.frequency=t,this._source=n,this._defaultGain=r,this._filter=e.createBiquadFilter(),this._filter.type=`peaking`,this._filter.frequency.value=t,this._filter.gain.value=0,this._filter.Q.value=1,this._source.connect(this._filter.gain)}get value(){return this._source.offset.value}get node(){return this._filter}set(e){this._source.offset.value=e}reset(){this.set(this._defaultGain)}dispose(){this._source.disconnect(this._filter.gain)}}class Y{constructor(e,t){this.id=`equalizer`,this._inputNode=void 0,this._outputNode=void 0,this._filterMap=new Map,this.equalizer=void 0,this._inputNode=e.createGain(),this._outputNode=e.createGain();let n=Object.entries(t).map(([e,t])=>[Number(e),t]).filter(([e])=>Number.isFinite(e)).sort((e,t)=>e[0]-t[0]),r=Y._sources.get(e);D(r)&&(r=new Map,Y._sources.set(e,r));for(let[t,i]of n)if(!r.has(t)){let n=e.createConstantSource();n.offset.value=i,n.start(),r.set(t,n)}let i={};for(let[t,a]of n){let n=r.get(t);if(!n)continue;let o=new Vn(e,t,n,a);this._filterMap.set(t,o),i[t]=o}this.equalizer=i,this.rebuild()}get inputNode(){return this._inputNode}get outputNode(){return this._outputNode}resetAll(){for(let e of this._filterMap.values())e.reset()}dispose(){for(let e of this._filterMap.values())e.dispose()}rebuild(){this._inputNode.disconnect();for(let e of this._filterMap.values())e.node.disconnect();this._outputNode.disconnect();let e=this._inputNode;for(let t of this._filterMap.values())e.connect(t.node),e=t.node;e.connect(this._outputNode)}}Y._sources=new WeakMap;var Hn=-14;class Un{constructor(e,t){this.id=`normalizer`,this._compressor=void 0,this._gainNode=void 0,this._compressor=e.createDynamicsCompressor(),this._gainNode=e.createGain(),this.applyConfig(t),this._compressor.connect(this._gainNode)}get inputNode(){return this._compressor}get outputNode(){return this._gainNode}applyConfig(e){if(!Number.isFinite(e.lufs)||!Number.isFinite(e.peak)){this._gainNode.gain.value=1;return}this._compressor.threshold.value=e.peak,this._compressor.knee.value=0,this._compressor.ratio.value=20,this._compressor.attack.value=.003,this._compressor.release.value=.25;let t=(e.targetLufs??Hn)-e.lufs;this._gainNode.gain.value=10**(t/20)}}var Wn=(e,t)=>{let n=e.length,r=t>=0?t:n+t;return r>=0&&r<n?e[r]:void 0},Gn=(e,t)=>{for(let n=e.length-1;n>=0;n--){let r=e[n];if(t(r,n,e))return r}},Kn=(e,t)=>{for(let n=e.length-1;n>=0;n--)if(t(e[n],n,e))return n;return-1},qn=(e,t=1)=>{let n=[],r=(e,t)=>{for(let i=0;i<e.length;i++){if(!(i in e))continue;let a=e[i];t>0&&Array.isArray(a)?r(a,t-1):n.push(a)}};return r(e,t),n},Jn=(e,t)=>{let n=[];for(let r=0;r<e.length;r++){let i=t(e[r],r,e);if(Array.isArray(i))for(let e=0;e<i.length;e++)n.push(i[e]);else n.push(i)}return n},Yn=(e,t,n=0)=>{let r=e.length,i=n>=0?n:Math.max(r+n,0);for(;i<r;i++){let n=e[i];if(n===t||n!==n&&t!==t)return!0}return!1},Xn=e=>{let t=e.length,n=Array(t);for(let r=0;r<t;r++)n[r]=e[t-1-r];return n},Zn=(e,t)=>{let n=e.slice();return t?n.sort(t):n.sort()},Qn=(e,t,n,...r)=>{let i=e.slice();return n===void 0?i.splice(t):i.splice(t,n,...r),i},$n=(e,t,n)=>{let r=e.length,i=t>=0?t:r+t,a=e.slice();return a[i]=n,a},er=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof self<`u`?self:Function(`return this`)(),tr=e=>{let t=[],n=Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r];t.push([i,e[i]])}return t},nr=e=>{let t={};for(let[n,r]of e)t[n]=r;return t},rr=Object.prototype.hasOwnProperty,ir=(e,t)=>rr.call(e,t),ar=e=>{let t=Object.keys(e),n=Array(t.length);for(let r=0;r<t.length;r++)n[r]=e[t[r]];return n},or=e=>{let t=Array.from(e);return t.length===0?Promise.resolve([]):Promise.all(t.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))},sr=e=>{let t=Array.from(e);return t.length===0?Promise.reject(AggregateError([],`All promises were rejected`)):new Promise((e,n)=>{let r=Array(t.length),i=t.length;t.forEach((t,a)=>{Promise.resolve(t).then(e,e=>{r[a]=e,--i,i===0&&n(AggregateError(r,`All promises were rejected`))})})})},cr=(e,t)=>e.then(e=>Promise.resolve(t()).then(()=>e),e=>Promise.resolve(t()).then(()=>{throw e})),lr=e=>{try{return Promise.resolve(e())}catch(e){return Promise.reject(e)}},ur=()=>{let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}},{NativeAbortSignal:dr,NativeAbortController:fr}=function(e){return{NativeAbortSignal:e.AbortSignal,NativeAbortController:e.AbortController}}(typeof self<`u`?self:global);function pr(e){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}}return t.reason=e,t}function mr(e){if(e===void 0)if(typeof document>`u`)e=Error(`This operation was aborted`),e.name=`AbortError`;else try{e=new DOMException(`signal is aborted without reason`),Object.defineProperty(e,"name",{value:`AbortError`})}catch{e=Error(`This operation was aborted`),e.name=`AbortError`}return e}class hr{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;let n=this.listeners[e];for(let e=0,r=n.length;e<r;e++)if(n[e].callback===t){n.splice(e,1);return}}dispatchEvent(e){if(!(e.type in this.listeners))return;let t=this.listeners[e.type].slice();for(let n=0,r=t.length;n<r;n++){let r=t[n];try{r.callback.call(this,e)}catch(e){Promise.resolve().then(()=>{throw e})}r.options&&r.options.once&&this.removeEventListener(e.type,r.callback)}return!e.defaultPrevented}}class X extends hr{constructor(){super(),this.listeners||hr.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)}throwIfAborted(){let{aborted:e,reason:t=`Aborted`}=this;if(e)throw t}static timeout(e){let t=new Z;return setTimeout(()=>t.abort(new DOMException(`This signal is timeout in ${e}ms`,`TimeoutError`)),e),t.signal}static any(e){let t=new Z;function n(){t.abort(this.reason),r()}function r(){for(let t of e)t.removeEventListener(`abort`,n)}for(let r of e)if(r.aborted){t.abort(r.reason);break}else r.addEventListener(`abort`,n);return t.signal}}class Z{constructor(){Object.defineProperty(this,"signal",{value:new X,writable:!0,configurable:!0})}abort(e){let t=mr(e),n=pr(t);this.signal.reason=t,this.signal.dispatchEvent(n)}toString(){return`[object AbortController]`}}typeof Symbol<`u`&&Symbol.toStringTag&&(Z.prototype[Symbol.toStringTag]=`AbortController`,X.prototype[Symbol.toStringTag]=`AbortSignal`);function gr(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 _r(e){typeof e==`function`&&(e={fetch:e});let{fetch:t,Request:n=t.Request,AbortController:r,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i=!1}=e;if(!gr({fetch:t,Request:n,AbortController:r,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i}))return{fetch:t,Request:a};let a=n;(a&&!a.prototype.hasOwnProperty(`signal`)||i)&&(a=function(e,t){let r;t&&t.signal&&(r=t.signal,delete t.signal);let i=new n(e,t);return r&&Object.defineProperty(i,"signal",{writable:!1,enumerable:!1,configurable:!0,value:r}),i},a.prototype=n.prototype);let o=t;return{fetch:(e,t)=>{let n=a&&a.prototype.isPrototypeOf(e)?e.signal:t?t.signal:void 0;if(n){let r;try{r=new DOMException(`Aborted`,`AbortError`)}catch{r=Error(`Aborted`),r.name=`AbortError`}if(n.aborted)return Promise.reject(r);let i=new Promise((e,t)=>{n.addEventListener(`abort`,()=>t(r),{once:!0})});return t&&t.signal&&delete t.signal,Promise.race([i,o(e,t)])}return o(e,t)},Request:a}}var Q=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window,$=`fetch`in Q&&gr({fetch:Q.fetch,Request:Q.Request,AbortController:Q.AbortController}),vr=$?_r({fetch:Q.fetch,Request:Q.Request,AbortController:Q.AbortController}):void 0,yr=$?vr.fetch:Q.fetch,br=$?vr.Request:Q.Request,xr=$?Z:Q.AbortController,Sr=$?X:Q.AbortSignal,Cr=(e,t)=>{let n=e.length,r=t>=0?t:n+t;if(r<0||r>=n)return;let i=e.charCodeAt(r);if(i>=55296&&i<=56319&&r+1<n){let t=e.charCodeAt(r+1);if(t>=56320&&t<=57343)return e[r]+e[r+1]}return e[r]};function*wr(e,t){let n=t.flags.includes(`g`)?t.flags:t.flags+`g`,r=new RegExp(t.source,n),i;for(;(i=r.exec(e))!==null;)yield i,i[0].length===0&&r.lastIndex++}var Tr=(e,t,n=` `)=>{if(n===``||e.length>=t)return e;let r=t-e.length;return e+n.repeat(Math.ceil(r/n.length)).slice(0,r)},Er=(e,t,n=` `)=>{if(n===``||e.length>=t)return e;let r=t-e.length;return n.repeat(Math.ceil(r/n.length)).slice(0,r)+e},Dr=(e,t,n)=>{if(typeof t==`string`){if(typeof n==`string`)return t===``?n+e.split(``).join(n)+n:e.split(t).join(n);let r=[],i=0,a=e.indexOf(t,i);for(;a!==-1;)r.push(e.slice(i,a)),r.push(n(t,a,e)),i=a+t.length,a=e.indexOf(t,i);return r.push(e.slice(i)),r.join(``)}let r=t.flags.includes(`g`)?t.flags:t.flags+`g`,i=new RegExp(t.source,r);return e.replace(i,n)},Or=e=>e.replace(/^\s+/,``),kr=e=>e.replace(/\s+$/,``),Ar=Or,jr=kr,Mr=(e,t)=>typeof e==`string`?Cr(e,t):Wn(e,t),Nr=(e,t={})=>{let n=t.timeout||1,r=performance.now();return Q.setTimeout(()=>{e({get didTimeout(){return t.timeout?!1:performance.now()-r-1>n},timeRemaining(){return Math.max(0,1+(performance.now()-r))}})},1)},Pr=e=>Q.clearTimeout(e),Fr=e=>typeof e==`function`&&e?.toString().endsWith(`{ [native code] }`),Ir=!Fr(Q.requestIdleCallback)||!Fr(Q.cancelIdleCallback),Lr=Ir?Nr:Q.requestIdleCallback,Rr=Ir?Pr:Q.cancelIdleCallback,zr=(e,t,n)=>typeof e==`string`?e.includes(t,n):Yn(e,t,n),Br=(e,t,n)=>{if(typeof e.canParse==`function`)return e.canParse(t,n);try{return new e(t,n),!0}catch{return!1}};
|
|
6
|
+
function e(t){"@babel/helpers - typeof";return e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},e(t)}var t=e;function n(e,n){if(t(e)!=`object`||!e)return e;var r=e[Symbol._oxc_toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(t(i)!=`object`)return i;throw TypeError(`@@_oxc_toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}var t=e,r=n;function i(e){var n=r(e,`string`);return t(n)==`symbol`?n:n+``}var a=i;function o(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=o;function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?c(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function d(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){u(a,r,i,o,s,`next`,e)}function s(e){u(a,r,i,o,s,`throw`,e)}o(void 0)})}}var f=l,p=d;let m;var h=Object.defineProperty,ee=Object.getOwnPropertyNames,te=Object.getOwnPropertyDescriptor,ne=Object.prototype.hasOwnProperty;function g(e){return this[e]}var _=e=>{var t=(v??=new WeakMap).get(e),n;if(t)return t;if(t=h({},`__esModule`,{value:!0}),e&&typeof e==`object`||typeof e==`function`)for(var r of ee(e))ne.call(t,r)||h(t,r,{get:g.bind(e,r),enumerable:!(n=te(e,r))||n.enumerable});return v.set(e,t),t},v,re=e=>e;function ie(e,t){this[e]=re.bind(null,t)}var y=(e,t)=>{for(var n in t)h(e,n,{get:t[n],enumerable:!0,configurable:!0,set:ie.bind(t,n)})},b={};y(b,{withoutNullable:()=>fe,videoSizeToQuality:()=>tt,videoQualityToHeight:()=>nt,videoHeightToQuality:()=>et,urlCanParsePolyfilled:()=>Vr,timeout:()=>ht,timeCodeToString:()=>st,throttleFn:()=>lt,throttle:()=>Ot,tap:()=>Ut,suppressAbort:()=>on,stringTrimStart:()=>kr,stringTrimRight:()=>Mr,stringTrimLeft:()=>jr,stringTrimEnd:()=>Ar,stringReplaceAll:()=>Or,stringPadStart:()=>Dr,stringPadEnd:()=>Er,stringMatchAll:()=>Tr,stringAt:()=>wr,skip:()=>Gt,shareReplay:()=>qt,safeStorage:()=>Be,retainTimers:()=>Pe,requestIdleCallbackPolyfilled:()=>Rr,releaseTimers:()=>Fe,promiseWithResolvers:()=>dr,promiseTry:()=>ur,promiseFinally:()=>lr,promiseAny:()=>cr,promiseAllSettled:()=>sr,pairwise:()=>Vt,once:()=>Bt,observeElementSize:()=>Yt,observableFrom:()=>vt,objectValues:()=>or,objectHasOwn:()=>ar,objectFromEntries:()=>rr,objectEntries:()=>nr,nowInt:()=>_e,now:()=>k,noop:()=>C,merge:()=>mt,mapTo:()=>zt,map:()=>Lt,loadVKLangPack:()=>Sn,isValidURL:()=>Qt,isNullable:()=>D,isNonNullable:()=>E,isLowerOrEqual:()=>Ze,isLower:()=>V,isInvariantQuality:()=>H,isIntersecting:()=>$t,isHigherOrEqual:()=>Xe,isHigher:()=>Ye,isBrowserWindow:()=>ge,isAbortError:()=>an,interval:()=>gt,interpolate:()=>nn,includesPolyfilled:()=>Br,globalThisPolyfill:()=>tr,getWindow:()=>O,getVideoQualityLabel:()=>at,getTraceSubscriptionMethod:()=>cn,getTimersDiagnostics:()=>Ie,getTimerWindow:()=>he,getRangeAroundIndex:()=>rn,getPlayerId:()=>tn,getMessageFromError:()=>sn,getHighestQuality:()=>Qe,getExponentialDelay:()=>ze,fromEvent:()=>yt,flattenObject:()=>Xt,filterChanged:()=>Pt,filter:()=>At,fillWithDefault:()=>ot,fetchPolyfilled:()=>br,devNull:()=>Dn,detectEmbed:()=>qe,debounceFn:()=>ct,debounce:()=>Tt,createTimers:()=>Me,createDIContainer:()=>Ln,combineLatest:()=>xt,combine:()=>pt,cloneDeepWith:()=>U,cloneDeep:()=>ut,clearVideoElement:()=>Zt,checkNever:()=>oe,cancelIdleCallbackPolyfilled:()=>zr,buffer:()=>St,atPolyfilled:()=>Nr,assertQualityIsExact:()=>it,assertNullable:()=>de,assertNotEmptyArray:()=>pe,assertNonNullable:()=>ue,assertNever:()=>S,assertEmptyArray:()=>me,arrayWith:()=>er,arrayToSpliced:()=>$n,arrayToSorted:()=>Qn,arrayToReversed:()=>Zn,arrayIncludes:()=>Xn,arrayFlatMap:()=>Yn,arrayFlat:()=>Jn,arrayFindLastIndex:()=>qn,arrayFindLast:()=>Kn,arrayAt:()=>Gn,areQualitiesExact:()=>rt,addScript:()=>Le,abortable:()=>Re,WorkerState:()=>Se,VolumeFaderPlugin:()=>Vn,VideoQuality:()=>Je,ValueSubject:()=>ft,VKNumericLanguage:()=>bn,VERSION:()=>ae,TracerFactory:()=>_n,TimerModule:()=>xe,SubscriptionRemovable:()=>bt,Subscription:()=>x,Subject:()=>T,RequestPolyfilled:()=>xr,ReplaySubject:()=>dt,Observable:()=>w,NormalizerPlugin:()=>Wn,Logger:()=>le,InternalsExposure:()=>En,InterfaceLanguage:()=>Tn,InjectionToken:()=>In,INTERNAL_EXPOSE_GLOBAL_KEY:()=>K,ErrorOrigin:()=>vn,ErrorCategory:()=>yn,EqualizerPlugin:()=>Y,CircularBuffer:()=>W,AudioGraph:()=>Bn,AppTracer:()=>J,AbortSignalPolyfilled:()=>Cr,AbortControllerPolyfilled:()=>Sr}),module.exports=_(b);var ae=`1.0.101-beta.0`;class x{constructor(){this.subscriptions=[]}unsubscribe(){let e=this.subscriptions;this.subscriptions=[],e.forEach(e=>{typeof e==`function`?e():e.unsubscribe()})}add(e){return this.subscriptions.push(e),this}}var S=e=>{throw Error(`${e} is value of unexpected type`)},oe=e=>{},C=()=>{},se=e=>{throw console.error(e),e},ce=e=>{console.error(e)};class w{constructor(e){this.suppressErrors=!1,e&&(this._subscribe=e)}setSuppressErrors(e){this.suppressErrors=e}subscribe(e,t){let n=this.suppressErrors?ce:se,r;r=t?typeof t==`function`?{next:t,error:C}:{next:e=>t.next(e),error:e=>t.error?.call(t,e)}:{next:n,error:C};let i=typeof e==`function`?{next:t=>{try{let n=e(t);n instanceof Promise&&n.catch(e=>r.next(e))}catch(e){r.next(e)}},error:e=>r.next(e)}:{next:t=>e.next(t),error:t=>e.error?e.error(t):r.next(t)},a;try{a=this._subscribe(i)}catch(e){i.error?.call(i,e)}return new x().add(()=>{switch(i.next=C,i.error=C,typeof a){case`function`:a();return;case`object`:a.unsubscribe();return;case`undefined`:return;default:return S(a)}})}pipe(...e){return e.reduce((e,t)=>t(e),this)}_subscribe(e){}}class T extends w{constructor(){super(),this.keyCounter=0,this.subscribers=new Map}next(e){this.subscribers.forEach(t=>t.next(e))}error(e){this.subscribers.forEach(t=>t.error?.call(t,e))}_subscribe(e){let t=this.keyCounter++;return this.subscribers.set(t,e),new x().add(()=>this.subscribers.delete(t))}}class le{constructor(){this.log$=new T,this.logs=[],this.log=e=>{let t=f(f({},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{n={message:"error in `createCustomLog`",component:`Logger`}}this.log(n)}}createComponentLog(e){return this.createCustomLog(t=>f({component:e},t))}}function ue(e,t=`Assertion "value is not nullable" failed`){if(e==null)throw Error(t)}function de(e,t=`Assertion "value is nullable" failed`){if(e!=null)throw Error(t)}function E(e){return e!=null}function D(e){return e==null}var fe=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>E(t)));function pe(e,t){if(!e?.length)throw Error(t)}function me(e,t){if(e?.length)throw Error(t)}var O=()=>globalThis,he=()=>globalThis,ge=(e=O())=>!!(e.window&&e.screen),k=typeof O().performance?.now==`function`?()=>O().performance.now():()=>Date.now(),_e=()=>Math.trunc(k());function ve(){var e=self,t=new Map;e.onmessage=function(n){var r=n.data;if(r.type===`ping`){e.postMessage({type:`ready`});return}if(r.type===`set`){var i=r.id;r.repeat?t.set(i,{repeat:!0,handle:e.setInterval(function(){e.postMessage({type:`tick`,id:i})},r.delay)}):t.set(i,{repeat:!1,handle:e.setTimeout(function(){t.delete(i),e.postMessage({type:`tick`,id:i})},r.delay)});return}var a=t.get(r.id);a&&(a.repeat?e.clearInterval(a.handle):e.clearTimeout(a.handle),t.delete(r.id))}}var ye=()=>`'use strict';(${ve.toString()})();`;class be{constructor(e,t){this.worker=void 0,this.handlers=void 0,this.records=new Map,this.ticks=0,this.handleMessage=e=>{if(e.data.type===`ready`){this.handlers.onReady();return}let{id:t}=e.data,n=this.records.get(t);D(n)||(this.ticks++,n.repeat||this.records.delete(t),n.callback())},this.handleError=()=>{this.handlers.onFatalError(this.destroy())},this.worker=e,this.handlers=t,this.worker.onmessage=this.handleMessage,this.worker.onerror=this.handleError,this.worker.onmessageerror=this.handleError,this.postCommand({type:`ping`})}static create(e){let t=O();if(typeof t.Worker!=`function`||typeof t.Blob!=`function`||D(t.URL?.createObjectURL))return null;let n=t.URL.createObjectURL(new t.Blob([ye()],{type:`text/javascript`}));try{return new be(new t.Worker(n),e)}catch{return null}finally{t.URL.revokeObjectURL(n)}}get activeCount(){return this.records.size}get deliveredTicks(){return this.ticks}set(e,t,n,r){this.records.set(e,{callback:t,repeat:r,delay:n,startedAt:k()}),this.postCommand({type:`set`,id:e,delay:n,repeat:r})}clear(e){this.records.delete(e)&&this.postCommand({type:`clear`,id:e})}destroy(){let e=new Map(this.records);return this.records.clear(),this.worker.onmessage=null,this.worker.onerror=null,this.worker.onmessageerror=null,this.worker.terminate(),e}postCommand(e){this.worker.postMessage(e)}}var xe;(e=>{e.SHARED=`shared`,e.CORE=`core`,e.STATISTICS=`statistics`,e.INTERACTIVE=`interactive`,e.UI=`ui`,e.UI_TV=`ui-tv`})(xe||={});var Se;(e=>{e.IDLE=`idle`,e.STARTING=`starting`,e.READY=`ready`,e.FAILED=`failed`})(Se||={});var Ce=1,A=0,j=`idle`,M=null,N=new Map,P=new Set,we=e=>{let t=k();for(let[n,r]of e){let e=r.repeat?r.delay:Math.max(0,r.delay-(t-r.startedAt));ke(n,r.callback,e,r.repeat)}},Te=e=>{j=`failed`,M=null,we(e)},Ee=()=>{D(M)||(we(M.destroy()),M=null),j=`idle`},De=()=>{j===`idle`&&(j=`starting`,M=be.create({onReady:()=>{j=`ready`},onFatalError:Te}))},Oe=e=>P.has(e)?(De(),j===`ready`?M:null):null,ke=(e,t,n,r)=>{let i=he();r?N.set(e,{repeat:!0,nativeId:i.setInterval(t,n)}):N.set(e,{repeat:!1,nativeId:i.setTimeout(()=>{N.delete(e),t()},n)})},Ae=(e,t,n,r)=>{let i=Ce++,a=Oe(e);return D(a)?ke(i,t,n,r):a.set(i,t,n,r),i},je=e=>{if(D(e))return;let t=N.get(e);if(D(t)){M?.clear(e);return}N.delete(e);let n=he();t.repeat?n.clearInterval(t.nativeId):n.clearTimeout(t.nativeId)},Me=e=>({setTimeout:(t,n=0)=>Ae(e,t,n,!1),setInterval:(t,n=0)=>Ae(e,t,n,!0),clearTimeout:je,clearInterval:je}),Ne=e=>{P.clear(),e.forEach(e=>P.add(e)),P.size===0&&Ee()},Pe=e=>{A++,Ne(e)},Fe=()=>{A!==0&&(A--,A===0&&Ne([]))},Ie=()=>({workerModules:[...P],workerState:j,liveConsumers:A,activeWindowTimers:N.size,activeWorkerTimers:M?.activeCount??0,workerTicks:M?.deliveredTicks??0}),F=Me(`shared`),Le=(e,t,n)=>new Promise((r,i)=>{t.addEventListener(`abort`,()=>{s(),l.remove()});let a=()=>{s(),i(`error`)},o=()=>{s(),r()},s=()=>{c&&F.clearTimeout(c),l.removeEventListener(`load`,o),l.removeEventListener(`error`,a)},c;n&&(c=F.setTimeout(()=>{s(),i(`timeout`)},n));let l=document.createElement(`script`);l.addEventListener(`load`,o),l.addEventListener(`error`,a),l.src=e,document.head.appendChild(l)}),Re=(e,t)=>p(function*(...n){let r=t(...n),i=e.aborted,a;for(;!i&&!e.aborted;)try{let e=yield r.next(a);i=e.done??!1,a=e.value}catch(e){yield r.throw(e)}return a}),ze=(e,{start:t=0,factor:n=2,max:r=1/0,min:i=t,random:a=0}={})=>{let o=t;return o*=n**+e,o*=1+(Math.random()*a*2-a),o=Math.round(o),o=Math.min(o,r),o=Math.max(o,i),o},Be={};y(Be,{set:()=>Ue,remove:()=>Ge,isPersistent:()=>Ve,has:()=>We,get:()=>He,clear:()=>Ke});var I,L,R=`vk-videoplayer-dummy-key-${Math.random()}`,z=()=>{if(L!==void 0)return L;try{localStorage.setItem(R,`test`),localStorage.removeItem(R),L=0}catch(e){if(e instanceof DOMException||e instanceof TypeError)try{sessionStorage.getItem(R),L=1}catch(e){if(e instanceof DOMException||e instanceof TypeError)L=2;else throw e}else throw e}return L===2&&(I=new Map),L},Ve=()=>z()===0,He=e=>{let t=z();switch(t){case 0:return localStorage.getItem(e)??void 0;case 1:return sessionStorage.getItem(e)??void 0;case 2:return I?.get(e);default:S(t)}},Ue=(e,t)=>{let n=z();switch(n){case 0:try{localStorage.setItem(e,t)}catch(e){if(e instanceof DOMException)console.error(e);else throw e}break;case 1:try{sessionStorage.setItem(e,t)}catch(e){if(e instanceof DOMException)console.error(e);else throw e}break;case 2:I?.set(e,t);return;default:S(n)}},We=e=>{let t=z();switch(t){case 0:return e in localStorage;case 1:return e in sessionStorage;case 2:return I?.has(e)??!1;default:return S(t),!1}},Ge=e=>{let t=z();switch(t){case 0:return localStorage.removeItem(e);case 1:return sessionStorage.removeItem(e);case 2:I?.delete(e);return;default:S(t)}},Ke=()=>{let e=z();switch(e){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return I?.clear();default:S(e)}},qe=()=>{let e,t=[],n=O();try{e=n.self!==n.top}catch(t){t instanceof DOMException&&t.name===`SecurityError`?e=!0:(e=!1,console.error(t))}try{n.location?.ancestorOrigins&&(t=[...n.location.ancestorOrigins])}catch(e){console.error(e)}try{!t.length&&n.document.referrer&&(t=[new URL(n.document.referrer).origin])}catch(e){console.error(e)}return t=t.filter(e=>URL.canParse(e)),{isEmbed:e,origins:t,topOrigin:t.at(-1),immediateOrigin:t.at(0)}},Je;(e=>{e.INVARIANT=`Invariant quality`,e.Q_144P=`144p`,e.Q_240P=`240p`,e.Q_360P=`360p`,e.Q_480P=`480p`,e.Q_576P=`576p`,e.Q_720P=`720p`,e.Q_1080P=`1080p`,e.Q_1440P=`1440p`,e.Q_2160P=`2160p`,e.Q_4320P=`4320p`})(Je||={});var B={"144p":{width:256,height:144},"240p":{width:428,height:240},"360p":{width:640,height:360},"480p":{width:856,height:480},"576p":{width:1024,height:576},"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}},Ye=(e,t)=>B[e].height>B[t].height,Xe=(e,t)=>B[e].height>=B[t].height,V=(e,t)=>B[e].height<B[t].height,Ze=(e,t)=>B[e].height<=B[t].height,Qe=e=>e.sort((e,t)=>e===t?0:e===`Invariant quality`?1:t===`Invariant quality`?-1:V(e,t)?1:-1)[0],$e=Object.keys(B).sort((e,t)=>V(e,t)?-1:1),et=(e,t=.02)=>[...$e].find(n=>B[n].height*(1+t)>=e),tt=({width:e,height:t})=>{let n=Math.min(e,t),r=Math.max(e,t);return $e.find(e=>{let t=B[e];return t.width>=r&&t.height>=n})},nt=e=>B[e].height,H=e=>e===`Invariant quality`,rt=e=>e.every(e=>!H(e));function it(e){if(H(e))throw Error(`Expected exact quality`)}var at=e=>{switch(e){case`4320p`:return`8K`;case`2160p`:return`4K`;case`1440p`:return`QHD`;case`1080p`:return`FHD`;case`720p`:return`HD`;default:return``}},ot=(e,t)=>{let n={};for(let r of Object.keys(t)){let i=t[r],a=e[r];Array.isArray(i)?n[r]=Array.isArray(a)?a:i:typeof i==`object`&&i?typeof a==`object`&&a&&!Array.isArray(a)?n[r]=ot(a,i):n[r]=a??i:n[r]=r in e?a:i}return n},st=e=>{let t=``;return e>=3600&&(t+=Math.floor(e/3600)+`h`,e%=3600),e>=60&&(t+=Math.floor(e/60)+`m`,e%=60),e>0&&(t+=Math.floor(e)+`s`),t};function ct(e,t=0,n){let r,i,a,o,s,c,l=0,u=!1,d=!1,f=!0,p=!t&&t!==0&&typeof O().requestAnimationFrame==`function`;n&&(u=!!n.leading,d=`maxWait`in n,a=n?.maxWait?Math.max(+n?.maxWait||0,t):a,f=`trailing`in n?!!n.trailing:f);function m(t){let n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o}function h(e,t){return p?(s&&O().cancelAnimationFrame(s),O().requestAnimationFrame(e)):F.setTimeout(e,t)}function ee(e){if(p){O().cancelAnimationFrame(e);return}F.clearTimeout(e)}function te(e){return l=e,s=h(_,t),u?m(e):o}function ne(e){let n=e-c,r=e-l,i=t-n;return d?Math.min(i,a-r):i}function g(e){let n=e-c,r=e-l;return c===void 0||n>=t||n<0||d&&r>=a}function _(){let e=Date.now();if(g(e))return v(e);s=h(_,ne(e))}function v(e){return s=void 0,f&&r?m(e):(r=i=void 0,o)}function re(){s!==void 0&&ee(s),l=0,r=c=i=s=void 0}function ie(){return s===void 0?o:v(Date.now())}function y(){return s!==void 0}function b(...e){let n=Date.now(),a=g(n);if(r=e,i=this,c=n,a){if(s===void 0)return te(c);if(d)return s=h(_,t),m(c)}return s===void 0&&(s=h(_,t)),o}return b.cancel=re,b.flush=ie,b.pending=y,b}var lt=(e,t=0,n)=>ct(e,t,f(f(f({},{leading:!0,trailing:!0}),n),{},{maxWait:t})),U=(e,t)=>{if(typeof e!=`object`||!e)return e;let n=Array.isArray(e)?[]:{};for(let r in e){if(typeof t==`function`){let i=t(e[r],r,e,n);if(i!==void 0){n[r]=i;continue}}typeof e[r]==`object`?n[r]=U(e[r],t):n[r]=e[r]}return n},ut=e=>U(e);class dt extends T{constructor(e){super(),this.bufferSize=void 0,this.buffer=[],this.cursorEnd=-1,this.cursorStart=0,this.bufferSize=e,this.buffer=Array(e)}next(e){this.cursorEnd+=1,this.cursorStart=this.cursorEnd>=this.bufferSize?this.cursorStart+1:0,this.buffer[this.cursorEnd%this.bufferSize]=e,this.subscribers.forEach(t=>t.next(e))}_subscribe(e){for(let t=this.cursorStart;t<=this.cursorEnd;t++)e.next(this.buffer[t%this.bufferSize]);let t=this.keyCounter++;return this.subscribers.set(t,e),new x().add(()=>this.subscribers.delete(t))}}class ft extends T{constructor(e){super(),this.value=void 0,this.value=e}next(e){super.next(this.value=e)}error(e){super.error(this.value=e)}getValue(){return this.value}_subscribe(e){let t=super._subscribe(e);return e.next(this.value),t}}function pt(e){return new w(t=>{let n={},r=Object.keys(e).length,i=e=>i=>{e in n||r--,n[e]=i,r===0&&t.next(n)};return Object.entries(e).reduce((e,[t,n])=>e.add(n.subscribe(i(t))),new x)})}function mt(...e){return new w(t=>e.reduce((e,n)=>e.add(n.subscribe(t)),new x))}var ht=e=>new w(t=>{let n=F.setTimeout(()=>{try{t.next()}catch(e){if(t.error)t.error(e);else throw e}},e);return()=>F.clearTimeout(n)}),gt=e=>new w(t=>{let n=F.setInterval(()=>t.next(),e);return()=>{n&&=(F.clearInterval(n),void 0)}});function _t(e){return new w(t=>{if(e instanceof Promise){let n=!1;return e.then(e=>{n||t.next(e)}).catch(e=>{n||t.error?.call(t,e)}),()=>{n=!0}}for(let n=0;n<e.length;n++)t.next(e[n])})}var vt=_t,yt=(e,t)=>new w(n=>{let r=e=>n.next(e);return e.addEventListener(t,r),()=>e.removeEventListener(t,r)});class bt extends x{remove(e){this.subscriptions=this.subscriptions.filter(t=>t!==e)}}function xt(e){return new w(t=>{let n=Array(e.length),r=e=>r=>{n[e]=r,t.next([...n])};return e.reduce((e,t,n)=>e.add(t.subscribe(r(n))),new x)})}function St(e){return t=>new w(n=>t.subscribe(new Ct(n,e)))}class Ct{constructor(e,t){this.destination=void 0,this.size=void 0,this.lastValues=[],this.destination=e,this.size=t}next(e){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(e),this.destination.next(this.lastValues)}error(e){var t;(t=this.destination).error?.call(t,e)}}var wt={leading:!1,trailing:!0};function Tt(e,t=wt){return n=>new w(r=>n.subscribe(new Et(r,e,t)))}class Et{constructor(e,t,n){this.destination=void 0,this.time=void 0,this.config=void 0,this.lastValue=void 0,this.timeout=void 0,this.destination=e,this.time=t,this.config=n}next(e){this.lastValue=e,E(this.timeout)?F.clearTimeout(this.timeout):this.config.leading&&this.destination.next(e),this.timeout=F.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(e){if(this.destination.error)this.destination.error(e);else throw e}this.timeout=void 0},this.time)}error(e){var t;(t=this.destination).error?.call(t,e)}}var Dt={leading:!0,trailing:!1};function Ot(e,t=Dt){return n=>new w(r=>n.subscribe(new kt(r,e,t)))}class kt{constructor(e,t,n){this.destination=void 0,this.time=void 0,this.config=void 0,this.lastValue=void 0,this.timeout=void 0,this.destination=e,this.time=t,this.config=n}next(e){this.lastValue=e,D(this.timeout)&&(this.config.leading&&this.destination.next(e),this.timeout=F.setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(e){var t;(t=this.destination).error?.call(t,e)}}function At(e){return t=>new w(n=>t.subscribe(new jt(n,e)))}class jt{constructor(e,t){this.destination=void 0,this.predicate=void 0,this.destination=e,this.predicate=t}next(e){let t;try{t=this.predicate(e)}catch(e){throw this.error(e),e}t&&this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}var Mt=(e,t)=>{let n=(e,t)=>{let n=Object.keys(e);for(let r in t)if(!n.includes(r)||t[r]!==e[r])return!1;return!0};return n(e,t)&&n(t,e)},Nt=(e,t)=>e instanceof Object&&t instanceof Object?Mt(e,t):e===t;function Pt(e=Nt){return t=>new w(n=>t.subscribe(new It(n,e)))}var Ft={};class It{constructor(e,t){this.destination=void 0,this.predicate=void 0,this.lastValue=Ft,this.destination=e,this.predicate=t}next(e){let t;try{t=this.lastValue===Ft||!this.predicate(this.lastValue,e),this.lastValue=e instanceof Object&&!Array.isArray(e)?f({},e):e}catch(e){throw this.error(e),e}t&&this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}function Lt(e){return t=>new w(n=>t.subscribe(new Rt(n,e)))}class Rt{constructor(e,t){this.destination=void 0,this.mapper=void 0,this.destination=e,this.mapper=t}next(e){let t;try{t=this.mapper(e)}catch(e){throw this.error(e),e}this.destination.next(t)}error(e){var t;(t=this.destination).error?.call(t,e)}}function zt(e){return Lt(()=>e)}function Bt(){return e=>new w(t=>{let n=!1,r=!1,i=e.subscribe(e=>{n||(n=!0,t.next(e)),r&&i.unsubscribe()},e=>{n=!0,t.error?.call(t,e),r&&i.unsubscribe()});return r=!0,n&&i.unsubscribe(),i})}function Vt(){return e=>new w(t=>e.subscribe(new Ht(t)))}class Ht{constructor(e){this.destination=void 0,this.last=void 0,this.hasLast=!1,this.destination=e}next(e){let t=this.last;if(this.last=e,!this.hasLast){this.hasLast=!0;return}this.destination.next([t,e])}error(e){var t;(t=this.destination).error?.call(t,e)}}function Ut(e){return t=>new w(n=>t.subscribe(new Wt(n,e)))}class Wt{constructor(e,t){this.destination=void 0,this.effect=void 0,this.destination=e,this.effect=t}next(e){try{this.effect(e)}catch(e){throw this.error(e),e}this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}function Gt(e){return t=>new w(n=>t.subscribe(new Kt(n,e)))}class Kt{constructor(e,t){if(this.destination=void 0,this.count=void 0,this.destination=e,this.count=t,t<0){var n;(n=this.destination).error?.call(n,Error(`Count can not be less than zero`))}}next(e){this.count===0?this.destination.next(e):this.count--}error(e){var t;(t=this.destination).error?.call(t,e)}}function qt(e=0){return t=>{let n=0,r=new dt(e),i=t.subscribe(r),a=e=>()=>{e.unsubscribe(),n--,n===0&&i.unsubscribe()};return new w(e=>(n++,a(r.subscribe(e))))}}var Jt=300,Yt=(e,t=Jt)=>new w(n=>{let r=O(),{width:i,height:a}=e.getBoundingClientRect();if(n.next({width:i,height:a}),!ge(r))return;let o=new r.ResizeObserver(lt(e=>{let t=e[0];if(!t)return;let r,i;t.contentBoxSize&&t.contentBoxSize[0]?(i=t.contentBoxSize[0].blockSize,r=t.contentBoxSize[0].inlineSize):t.contentRect&&(r=t.contentRect.width,i=t.contentRect.height),E(r)&&E(i)&&n.next({width:r,height:i})},t));return o.observe(e),()=>o.disconnect()}),Xt=(e,t=6,n=`.`)=>{let r={};for(let i in e)if(!(!e.hasOwnProperty(i)||e[i]instanceof HTMLElement||!t))if(typeof e[i]==`object`&&e[i]!==null){let a=Xt(e[i],t-1);for(let e in a)a.hasOwnProperty(e)&&(r[i+n+e]=a[e])}else r[i]=e[i];return r},Zt=e=>{e.innerHTML=``,e.removeAttribute(`src`),e.load()},Qt=e=>{let t;try{t=new URL(e)}catch{return!1}return t.protocol===`https:`},$t=(e,t)=>!(e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom),en=(()=>{let e=0;return()=>{let t=e;return e=(e+1)%(2**53-1),t}})(),tn=e=>e!==void 0&&e!==``?e:en().toString();function nn(e,t,n){if(e<=t[0])return n[0];if(e>=t[t.length-1])return n[n.length-1];let r=1;for(;r<t.length&&t[r]<e;)r++;r>=t.length&&(r=t.length-1);let i=t[r-1],a=t[r],o=n[r-1],s=n[r];return e===i?o:e===a?s:o+(e-i)/(a-i)*(s-o)}function rn(e,t,n){if(e<=0||n<0)return[];let r=[],i=Math.floor((e-1)/2),a=Math.floor(e/2),o=t-i,s=t+a;o<0&&(s+=Math.abs(o),o=0),s>n&&(o-=s-n,s=n),o=Math.max(0,o),s=Math.min(n,s);for(let e=o;e<=s;e++)r.push(e);return r}var an=e=>e instanceof DOMException&&(e.name===`AbortError`||e.code===20),on=e=>{if(!an(e))throw e};function sn(e){if(e&&typeof e==`object`){if(`message`in e)return String(e.message);try{return JSON.stringify(e)}catch{return`object serialization error`}}return String(e)}m=Symbol.iterator;class W{constructor(e){if(this.buffer=void 0,this.writeIndex=0,this.count=0,this.capacity=void 0,e<=0)throw Error(`Capacity must be greater than 0`);this.capacity=e,this.buffer=Array.from({length:e}).fill(null)}add(e){this.buffer[this.writeIndex]=e,this.writeIndex=(this.writeIndex+1)%this.capacity,this.count<this.capacity&&this.count++}*[m](){if(this.count===0)return;let e=this.count<this.capacity?0:this.writeIndex;for(let t=0;t<this.count;t++){let t=this.buffer[e];E(t)&&(yield t),e=(e+1)%this.capacity}}clear(){this.buffer.fill(null),this.writeIndex=0,this.count=0}get size(){return this.count}get maxCapacity(){return this.capacity}}var cn=e=>(t,n=!1)=>r=>{let i=typeof r==`object`;r==null||i&&!Object.keys(r).length||e(t,i?Xt(r):{value:r},n)},ln=(e={})=>{let t=e=>{let t=e;return e===void 0?t=`undefined`:e===null?t=`null`:(typeof e==`number`||typeof e==`boolean`)&&(t=e.toString()),t},n={};for(let r in e)Array.isArray(e[r])?n[r]=e[r].map(t):n[r]=t(e[r]);return n};class G{constructor({name:e,getParentContext:t,getRootTracerContext:n,options:r}){this.dynamicImportTimeout=5e3,this.subscription=new x,this.options=void 0,this.span=void 0,this.context=void 0,this.childTracers=[],this.initPromise=void 0,this.getRootTracerContext=void 0,this.eventsBuffer=null,this.options=r??{};let{tracerEventsBufferSize:i}=this.options;E(i)&&i>0&&(this.eventsBuffer=new W(i)),G.dynamicImportStatus===`not_started`&&(G.dynamicImportPromise=this.loadOpentelemetry());let a=Date.now();this.initPromise=G.dynamicImportPromise.then(r=>{G.dynamicImportStatus===`completed`&&this.init({name:e,getParentContext:t,getRootTracerContext:n},a)})}init({name:e,getParentContext:t,getRootTracerContext:n},r){let i=n?.();if(D(i))return;let{opentelemetryApi:a}=G.dynamicImports,{context:o,trace:s}=a,{tracer:c,attributes$:l}=i;this.span=c.startSpan(e,{startTime:r},t?.()),this.context=s.setSpan(o.active(),this.span),this.getRootTracerContext=n,this.subscription.add(l.subscribe(e=>{E(e)&&this.span.setAttributes(e)}))}loadOpentelemetry(){var e=this;return p(function*(){if(G.dynamicImportStatus===`not_started`){G.dynamicImportStatus=`in_progress`;try{let t=new Promise((t,n)=>F.setTimeout(n,e.dynamicImportTimeout)),n=Promise.all([import(`@opentelemetry/api`),import(`@opentelemetry/sdk-trace-web`),import(`@apptracer/opentelemetry`),import(`@opentelemetry/resources`),import(`@opentelemetry/semantic-conventions`)]),[r,i,a,o,s]=yield Promise.race([n,t]);G.dynamicImports={opentelemetryApi:r,opentelemetrySdk:i,tracer:a,opentelemetryResources:o,opentelemetrySemanticConventions:s},G.dynamicImportStatus=`completed`}catch{G.dynamicImportStatus=`failed`}}})()}isComponentTracerNotInitialized(){return D(this.span)||G.dynamicImportStatus===`failed`}addEventToBuffer(e,t,n,r){E(this.eventsBuffer)&&this.eventsBuffer.add({name:e,attributes:t,type:n,timestamp:r})}addEventToSpan(e,t,n,r){this.span.addEvent(e,f(f({},ln(t)),{},{type:n}),r)}log(e,t,n=!1){let r=Date.now();n?this.initPromise.then(n=>{this.isComponentTracerNotInitialized()||this.addEventToSpan(e,t,`log`,r)}):this.addEventToBuffer(e,t,`log`,r)}error(e,t,n=!1){let r=Date.now();n?this.initPromise.then(n=>{this.isComponentTracerNotInitialized()||this.addEventToSpan(e,t,`error`,r)}):this.addEventToBuffer(e,t,`error`,r)}critical(e,t,n=!1){let r=Date.now();n?this.initPromise.then(n=>{this.isComponentTracerNotInitialized()||this.addEventToSpan(e,t,`critical`,r)}):this.addEventToBuffer(e,t,`critical`,r)}createComponentTracer(e){let t=new G({name:e,getParentContext:()=>this.context,getRootTracerContext:()=>this.getRootTracerContext?.call(this),options:this.options});return this.childTracers.push(t),t}setSpanAttributes(e){this.initPromise.then(t=>{this.isComponentTracerNotInitialized()||this.span.setAttributes(ln(e))})}end(){this.initPromise.then(e=>{if(!this.isComponentTracerNotInitialized()){if(E(this.eventsBuffer))for(let e of this.eventsBuffer)this.addEventToSpan(e.name,e.attributes,e.type,e.timestamp);this.childTracers.forEach(e=>e.end()),this.span.end(),this.subscription.unsubscribe()}})}pause(){var e;(e=this.getRootTracerContext)==null||(e=e.call(this))==null||e.paused$.next(!0)}resume(){var e;(e=this.getRootTracerContext)==null||(e=e.call(this))==null||e.paused$.next(!1)}}G.dynamicImportStatus=`not_started`,G.dynamicImports=void 0,G.dynamicImportPromise=void 0;var un=`gW5EerTD5QhAnsbpF7Hd2NSMRteYIUUMjFbSyI68Pf5`,dn=e=>{class t extends e{constructor(e,t){super(e,t),this._isPaused=!1,this._pausedSpans=void 0,this.maxExportBatchSize=void 0,this.maxQueueSize=void 0,this.maxQueueSize=t?.maxQueueSize??2048,this.maxExportBatchSize=t?.maxExportBatchSize??512,this._pausedSpans=new W(this.maxQueueSize)}pause(){this._isPaused=!0}resume(){var e=()=>super.onEnd,t=this;return p(function*(){if(!t._isPaused)return;t._isPaused=!1;let n=t._pausedSpans;t._pausedSpans=new W(t.maxQueueSize);let r=0;for(let i of n)e().call(t,i),r+=1,r>=t.maxExportBatchSize&&(yield new Promise(e=>F.setTimeout(()=>e(void 0),0)),r=0);n.clear(),yield t.forceFlush()})()}onEnd(e){if(this._isPaused){this._pausedSpans.add(e);return}super.onEnd(e)}}return t};class fn extends G{constructor(e){super({name:`Root`,options:e}),this.attributes$=new ft(null),this.paused$=new ft(!1),this.paused$.next(!!this.options.tracerPausedAtInit)}init({name:e,getParentContext:t},n){let{tracer:r,opentelemetryResources:i,opentelemetrySdk:a,opentelemetrySemanticConventions:o}=G.dynamicImports,{TracerUploadSpanExporter:s}=r,{WebTracerProvider:c,BatchSpanProcessor:l}=a,{resourceFromAttributes:u}=i,{ATTR_SERVICE_NAME:d,ATTR_SERVICE_VERSION:f}=o,p=new(dn(l))(new s({appToken:un}));this.subscription.add(this.paused$.subscribe(e=>{e?p.pause():p.resume()}));let m=new c({resource:u({[d]:`videoplayer-sdk-web`,[f]:ae}),spanLimits:{attributeCountLimit:1/0,eventCountLimit:1/0,attributePerEventCountLimit:1/0},spanProcessors:[p]});m.register();let h=m.getTracer(`sdk-videoplayer-tracer`);super.init({name:e,getParentContext:t,getRootTracerContext:()=>({tracer:h,attributes$:this.attributes$,paused$:this.paused$})},n)}getTraceId(){return this.isComponentTracerNotInitialized()?``:this.span.spanContext().traceId}setSpanAttributes(e){this.attributes$.next(f(f({},this.attributes$.getValue()),ln(e)))}addSubscription(e){this.subscription.add(e)}}class pn{constructor(e){this.fakeTraceId=void 0}log(e,t,n){}error(e,t,n){}critical(e,t,n){}createComponentTracer(e){return new pn({name:e})}end(){}getTraceId(){return this.fakeTraceId}addSubscription(e){}setSpanAttributes(e){}pause(){}resume(){}}var mn=()=>!0,hn={level:0,filter:mn,name:`Noname Tracer`,outputMethod:`log`};class gn{constructor({name:e,level:t,filter:n,outputMethod:r}={}){this.name=void 0,this.filter=mn,this.level=hn.level,this.outputMethod=hn.outputMethod,this.childTracers=[],this.filter=n??this.filter,this.level=t??this.level,this.outputMethod=r??this.outputMethod,this.name=e??hn.name}log(e,t,n){this.logDebug(e,t)}error(e,t,n){this.logError(e,t)}critical(e,t,n){this.logError(e,t)}createComponentTracer(e){let t=new gn({filter:this.filter,level:this.level,name:`${this.name}/ ${e}`,outputMethod:this.outputMethod});return this.childTracers.push(t),t}end(){this.childTracers.forEach(e=>e.end()),this.childTracers=[]}setLevel(e){this.level=e,this.childTracers.forEach(t=>t.setLevel(e))}setOtputMethod(e){this.outputMethod=e,this.childTracers.forEach(t=>t.setOtputMethod(e))}setFilter(e){this.filter=e,this.childTracers.forEach(t=>t.setFilter(e))}getFinishedSpans(){}getTraceId(){return`debug_trace`}get verbose(){return this.level===0}createMessage(e,t){return[this.name,e,JSON.stringify(t)].join(`: `)}logDebug(e,t){!this.verbose||!this.filter(e,t)||O().console[this.outputMethod](this.createMessage(e,t))}logError(e,t){this.filter(e,t)&&O().console.error(this.createMessage(e,t))}addSubscription(e){}setSpanAttributes(e){}pause(){}resume(){}}class _n{static createRootTracer(e=`fake`,t){switch(e){case`real`:return new fn(t);case`debug`:return new gn;default:return new pn}}}var vn;(e=>{e.MediaError=`mediaError`,e.SegmentFetcher=`segment_fetcher`,e.SegmentAppend=`segment_append`,e.Hangup=`hangup`,e.Stall=`stall`})(vn||={});var yn;(e=>{e.NETWORK=`network`,e.VIDEO_PIPELINE=`video_pipeline`,e.EXTERNAL_API=`external_api`,e.PARSER=`parser`,e.DOM=`dom`,e.WTF=`wtf`,e.UI=`ui`,e.CALL_FROM_EXTERNAL=`call_from_external`,e.FATAL=`fatal`})(yn||={});var bn;(e=>{e.Armenian=`58`,e.Azerbaijani=`57`,e.Belarusian=`114`,e.English=`3`,e.Kazakh=`97`,e.Portuguese=`73`,e.Russian=`0`,e.Spanish=`4`,e.Ukrainian=`1`,e.Uzbek=`65`,e.Vietnamese=`75`})(bn||={});var xn=`vk.ru`,Sn=function(){var e=p(function*(e,t,n){let r=new URL(`https://${xn}/js/lang-pack.js`);return r.searchParams.set(`format`,`json`),r.searchParams.set(`name`,t),e!==void 0&&r.searchParams.set(`lang`,e),Cn(yield(yield fetch(r.toString())).json(),n)});return function(t,n,r){return e.apply(this,arguments)}}(),Cn=(e,t)=>Object.fromEntries(Object.entries(e.keys).map(([e,n])=>[e.substring(`${t}_`.length),wn(n)])),wn=e=>Array.isArray(e)?e[0]:e,Tn;(e=>{e.RU=`ru`,e.EN=`en`})(Tn||={});var K=`__vk_vp_internals_exposure`;class En{constructor(e,t){this.playerId=void 0,this.type=void 0,this.playerId=t,this.type=e,this.initWindowObjects()}getWindowObject(){var e;if(typeof window>`u`)return{};let t=this.playerId,n=this.type;return((e=window[K])==null||(e=e[t])==null?void 0:e[n])??{}}initWindowObjects(){if(typeof window>`u`)return;let e=this.playerId,t=this.type;window[K]||(window[K]={}),window[K][e]||(window[K][e]={}),window[K][e][t]||(window[K][e][t]={})}expose(e){typeof window>`u`||Object.assign(this.getWindowObject(),e)}destroy(){if(typeof window>`u`)return;let e=this.playerId,t=this.type;window[K]&&window[K][e]&&window[K][e][t]&&(delete window[K][e][t],Object.keys(window[K][e]).length||delete window[K][e],Object.keys(window[K]).length||delete window[K])}}var Dn={};y(Dn,{subscribe:()=>jn,push:()=>An,destroy:()=>kn,create:()=>On});var q=new Map,On=(e,t)=>q.set(e,t??[]),kn=e=>q.delete(e),An=(e,t)=>{let n=q.get(e);n&&(typeof n==`function`?n(t):n.push(t))},jn=(e,t)=>{let n=q.get(e);if(n){if(n&&Array.isArray(n))for(let e of n)t(e);q.set(e,t)}},Mn=e=>fe({id:e.id,message:e.message,category:e.category,data:Nn(e.data),httpCode:e.httpCode,UVBackendErrorCode:e.UVBackendErrorCode});function Nn(e){switch(typeof e){case`boolean`:case`string`:case`number`:return e;case`object`:try{return JSON.stringify(e)}catch{return}default:return}}var Pn=e=>{let t=e.thrown instanceof Error?e.thrown:Error(e.message),n=e.id.length>10240?e.id.substring(0,10240):e.id;try{t.name=n}catch{t=Error(e.message),t.name=n}return t},Fn=()=>{try{var e;let{origin:t,pathname:n,search:r,hostname:i}=((e=O())==null||(e=e.document)==null?void 0:e.location)??{};return!i||i===`localhost`?void 0:f({url:t+n},new URLSearchParams(r).entries().reduce((e,[t,n])=>(e[`url.${t}`]=n,e),{}))}catch{}};class J{constructor(e,t,n,r){this.dynamicImportTimeout=5e3,this.componentName=void 0,this.subscription=new x,this.options=void 0,this.envParams=void 0,this.context=void 0,this.beforeInitLogs=[],this.isEmbed=void 0,this.embedParent=void 0,this.beforeInitErrors=[],this.componentName=e,this.options=t,this.envParams=n,this.context=f({},r);let{isEmbed:i,topOrigin:a}=qe();this.isEmbed=i,this.embedParent=a?new URL(a).hostname:void 0,this.options.enabled&&(this.loadModule(),this.init())}updateContext(e){Object.assign(this.context,e)}log(e){let t=J.tracerModulesMap.get(this.componentName)?.log;if(D(t)){this.beforeInitLogs.push(e);return}t.log(e)}error(e,t){let n=J.tracerModulesMap.get(this.componentName)?.error;if(!n){this.beforeInitErrors.push([e,t]);return}let{blackErrorCategoryList:r,blackErrorIdList:i,sampleRate:a,whiteErrorCategoryList:o,whiteErrorIdList:s}=this.options,{id:c,category:l}=e;if(!(r.length&&r.includes(l)||i.length&&i.includes(c)||o.length&&!o.includes(l)||s.length&&!s.includes(c)||Math.random()>=a))try{let r=Pn(e);n?.error(r,f(f({crashIdSource:t?.crashIdSource??r.name,severity:t?.severity??(e.traceAsLog?`debug`:void 0)},t?.issueKey?{issueKey:t.issueKey}:{}),{},{keys:f(f(f(f({},this.context),Mn(e)),Fn()),this.isEmbed&&this.embedParent&&{iframe_host:this.embedParent})}))}catch(e){console.error(e)}}addSubscription(e){this.subscription.add(e)}destroy(){this.subscription.unsubscribe()}init(){var e=this;return p(function*(){try{if(yield J.loadPromise,D(J.appTracerModule))return;let{appTracerModule:t}=J,{initTracerError:n,initTracerErrorUploader:r,getTracerModules:i,initTracerLog:a}=t,o=J.tracerModulesMap.get(e.componentName)??i(e.componentName),s=o.log??a(e.componentName),c=o.error??n(e.componentName,{enableUnhandledErrorsListeners:!1,stringifyErrorDataObject:!0});J.tracerModulesMap.set(e.componentName,{error:c,log:s}),e.beforeInitLogs.forEach(t=>e.log(t)),e.beforeInitLogs=[],E(e.options.userId)&&c.setUserId(e.options.userId),D(o.error)&&r(e.componentName,{appToken:un,environment:e.envParams.env,versionCode:1,versionName:e.envParams.version}),e.beforeInitErrors.forEach(t=>e.error.apply(e,t)),e.beforeInitErrors=[]}catch(e){console.error(e)}})()}loadModule(){var e=this;E(J.loadPromise)||(J.loadPromise=function(){var t=p(function*(){try{let t=new Promise((t,n)=>F.setTimeout(n,e.dynamicImportTimeout));J.appTracerModule=yield Promise.race([t,import(`@apptracer/sdk/lite`)])}catch(e){J.loadPromise=null,console.error(e)}});return function(){return t.apply(this,arguments)}}()())}}J.tracerModulesMap=new Map,J.appTracerModule=null,J.loadPromise=null;class In{constructor(e,t){this.options=void 0,this.symbol=void 0,this.options=t,this.symbol=Symbol(e)}}var Ln=()=>{let e=new Map,t=new Map,n=new Map,r=new Map,i=new Set;return{resolve(e){if(!r.has(e)){let t=n.get(e);if(!t)throw Error(`No constructor registered in DI container for ${e.name}`);r.set(e,new t)}return r.get(e)},resolveOptional(e){try{return this.resolve(e)}catch{return}},replace(e,t){r.forEach((t,n)=>{t instanceof e&&r.delete(n)}),n.set(e,t)},getToken(n){if(e.has(n.symbol))return e.get(n.symbol);if(t.has(n.symbol)){let r=t.get(n.symbol)();return e.set(n.symbol,r),r}if(n.options?.factory){let t=n.options.factory();return e.set(n.symbol,t),t}throw Error(`No value registered in DI container for token "${n.symbol.description}"`)},registerToken(t,n){e.set(t.symbol,n)},registerFactory(e,n){t.set(e.symbol,n)},hasToken(n){return e.has(n.symbol)||t.has(n.symbol)||!!n.options?.factory},registerCleanup(e){i.add(e)},clear(){i.forEach(e=>e()),i.clear(),e.clear(),t.clear(),r.clear(),n.clear()}}};class Rn{constructor(e){this._inputNode=void 0,this._outputNode=void 0,this._plugins=[],this._destination=null,this._taps=[],this._inputNode=e.createGain(),this._outputNode=e.createGain()}get input(){return this._inputNode}get plugins(){return this._plugins}connectTo(e){this._destination=e,this.rebuild()}addTap(e){this._taps.push(e),this._outputNode.connect(e)}hasPlugin(e){return this._plugins.some(t=>t.id===e)}addPlugin(e){this.hasPlugin(e.id)||(this._plugins.push(e),this.rebuild())}removePlugin(e){let t=this._plugins.findIndex(t=>t.id===e);t!==-1&&(this._plugins.splice(t,1),this.rebuild())}rebuild(){this._inputNode.disconnect();for(let e of this._plugins)e.outputNode.disconnect();this._outputNode.disconnect();let e=this._inputNode;for(let t of this._plugins)e.connect(t.inputNode),e=t.outputNode;e.connect(this._outputNode),this._destination!==null&&this._outputNode.connect(this._destination);for(let e of this._taps)this._outputNode.connect(e)}}class zn{constructor(e,t,n){this._pluginChain=void 0,this._element=void 0,this._ctx=void 0,this._sourceNode=null,this._isBound=!1,this._element=e,this._ctx=t,this._pluginChain=new Rn(t),this._pluginChain.connectTo(n)}get isBound(){return this._isBound}get plugins(){return this._pluginChain.plugins}bind(){this._isBound||=(this._sourceNode===null&&(this._sourceNode=this._ctx.createMediaElementSource(this._element)),this._sourceNode.disconnect(),this._sourceNode.connect(this._pluginChain.input),!0)}unbind(){this._isBound&&=(this._sourceNode?.disconnect(),this._sourceNode?.connect(this._ctx.destination),!1)}addPlugin(e){this._pluginChain.addPlugin(e)}removePlugin(e){this._pluginChain.removePlugin(e)}addAnalyser(e){this._pluginChain.addTap(e)}}class Bn{constructor(){this._ctx=null,this._masterGain=null,this._connections=new Map,this._contextEnabled=!1,this._boundBeforeDisable=new Set}static isSupported(){let e=O();return E(e.AudioContext??e.webkitAudioContext)}get context(){if(D(this._ctx)){let e=O(),t=e.AudioContext??e.webkitAudioContext;this._ctx=new t}return this._ctx}get contextState(){return this._contextEnabled?this._ctx?.state??`suspended`:`suspended`}enableContext(){var e=this;return p(function*(){e.ensureContext(),yield e._ctx?.resume(),e._contextEnabled=!0;for(let t of e._boundBeforeDisable)e._connections.get(t)?.bind();e._boundBeforeDisable.clear()})()}disableContext(){var e=this;return p(function*(){e._contextEnabled=!1;for(let[t,n]of e._connections)n.isBound&&(e._boundBeforeDisable.add(t),n.unbind())})()}connectSource(e){var t=this;return p(function*(){t.ensureContext(),t._contextEnabled=!0,yield t._ctx?.resume();let n=t._connections.get(e);if(n!==void 0){n.isBound||n.bind();return}let r=new zn(e,t.context,t._masterGain);r.bind(),t._connections.set(e,r)})()}disconnectSource(e){this._connections.get(e)?.unbind()}isSourceConnected(e){return this._connections.get(e)?.isBound??!1}addPlugin(e,t){let n=this._connections.get(e);if(n===void 0)throw Error(`Source is not connected. Call connectSource() first.`);n.addPlugin(t)}removePlugin(e,t){this._connections.get(e)?.removePlugin(t)}getPlugins(e){return this._connections.get(e)?.plugins??[]}createAnalyser(e){let t=this._connections.get(e);if(t===void 0)return null;let n=this.context.createAnalyser();return n.fftSize=256,n.smoothingTimeConstant=.8,t.addAnalyser(n),n}setMasterVolume(e){this._masterGain!==null&&(this._masterGain.gain.value=e)}getMasterVolume(){return this._masterGain?.gain.value??1}dispose(){this._connections.clear(),this._boundBeforeDisable.clear(),this._masterGain=null,this._contextEnabled=!1,this._ctx?.close(),this._ctx=null}ensureContext(){let e=this.context;D(this._masterGain)&&(this._masterGain=e.createGain(),this._masterGain.gain.value=1,this._masterGain.connect(e.destination))}}class Vn{constructor(e,t){this.id=`volume-fader`,this._gainNode=void 0,this._duration=void 0,this._curve=void 0,this._fade=null,this._gainNode=e.createGain(),this._gainNode.gain.value=1,this._duration=t.duration,this._curve=t.curve??this._buildEasingCurve(t.duration/1e3)}get inputNode(){return this._gainNode}get outputNode(){return this._gainNode}get faded(){return this._fade!==null}appear(){this._startFade(0,1)}disappear(){this._startFade(1,0)}pause(){if(this._fade===null)return;let e=this._gainNode.gain,t=this._gainNode.context.currentTime,n=t-this._fade.startTime,r=Math.max(0,this._fade.remaining-n);if(r<=.001){this._finishFade();return}let i=this._sampleIndex(this._fade,t),a=this._fade.curve[i];e.cancelScheduledValues(t),e.setValueAtTime(a,t),this._fade={from:a,target:this._fade.target,startTime:t,remaining:r,curve:this._fade.curve.subarray(i)}}resume(){if(this._fade===null)return;let e=this._gainNode.context.currentTime,{from:t,target:n,remaining:r,curve:i}=this._fade;if(r<=.001||Math.abs(n-t)<.001||i.length<2){this._finishFade();return}this._fade={from:t,target:n,startTime:e,remaining:r,curve:i},this._scheduleCurve(i,t,e,r)}cancel(){this._fade!==null&&this._finishFade()}_finishFade(){if(this._fade===null)return;let e=this._gainNode.gain,t=this._gainNode.context.currentTime;e.cancelScheduledValues(t),e.setValueAtTime(this._fade.target,t),this._fade=null}_startFade(e,t){let n=this._gainNode.gain,r=this._gainNode.context.currentTime,i=this._duration/1e3;if(i<=0){n.cancelScheduledValues(r),n.setValueAtTime(t,r),this._fade=null;return}let a=new Float32Array(this._curve.length);for(let n=0;n<this._curve.length;n++)a[n]=e+(t-e)*this._curve[n];this._fade={from:a[0],target:t,startTime:r,remaining:i,curve:a},this._scheduleCurve(a,a[0],r,i)}_buildEasingCurve(e){let t=Math.max(2,Math.ceil(e*60)),n=new Float32Array(t);for(let e=0;e<t;e++){let r=e/(t-1);n[e]=(1-Math.cos(Math.PI*r))/2}return n}_scheduleCurve(e,t,n,r){let i=this._gainNode.gain;i.cancelScheduledValues(n),i.setValueAtTime(t,n),i.setValueCurveAtTime(e,n,r)}_sampleIndex(e,t){let n=t-e.startTime,r=Math.max(0,Math.min(1,n/e.remaining));return Math.min(Math.round(r*(e.curve.length-1)),e.curve.length-1)}}class Hn{constructor(e,t,n,r){this._filter=void 0,this._source=void 0,this._defaultGain=void 0,this.frequency=void 0,this.frequency=t,this._source=n,this._defaultGain=r,this._filter=e.createBiquadFilter(),this._filter.type=`peaking`,this._filter.frequency.value=t,this._filter.gain.value=0,this._filter.Q.value=1,this._source.connect(this._filter.gain)}get value(){return this._source.offset.value}get node(){return this._filter}set(e){this._source.offset.value=e}reset(){this.set(this._defaultGain)}dispose(){this._source.disconnect(this._filter.gain)}}class Y{constructor(e,t){this.id=`equalizer`,this._inputNode=void 0,this._outputNode=void 0,this._filterMap=new Map,this.equalizer=void 0,this._inputNode=e.createGain(),this._outputNode=e.createGain();let n=Object.entries(t).map(([e,t])=>[Number(e),t]).filter(([e])=>Number.isFinite(e)).sort((e,t)=>e[0]-t[0]),r=Y._sources.get(e);D(r)&&(r=new Map,Y._sources.set(e,r));for(let[t,i]of n)if(!r.has(t)){let n=e.createConstantSource();n.offset.value=i,n.start(),r.set(t,n)}let i={};for(let[t,a]of n){let n=r.get(t);if(!n)continue;let o=new Hn(e,t,n,a);this._filterMap.set(t,o),i[t]=o}this.equalizer=i,this.rebuild()}get inputNode(){return this._inputNode}get outputNode(){return this._outputNode}resetAll(){for(let e of this._filterMap.values())e.reset()}dispose(){for(let e of this._filterMap.values())e.dispose()}rebuild(){this._inputNode.disconnect();for(let e of this._filterMap.values())e.node.disconnect();this._outputNode.disconnect();let e=this._inputNode;for(let t of this._filterMap.values())e.connect(t.node),e=t.node;e.connect(this._outputNode)}}Y._sources=new WeakMap;var Un=-14;class Wn{constructor(e,t){this.id=`normalizer`,this._compressor=void 0,this._gainNode=void 0,this._compressor=e.createDynamicsCompressor(),this._gainNode=e.createGain(),this.applyConfig(t),this._compressor.connect(this._gainNode)}get inputNode(){return this._compressor}get outputNode(){return this._gainNode}applyConfig(e){if(!Number.isFinite(e.lufs)||!Number.isFinite(e.peak)){this._gainNode.gain.value=1;return}this._compressor.threshold.value=e.peak,this._compressor.knee.value=0,this._compressor.ratio.value=20,this._compressor.attack.value=.003,this._compressor.release.value=.25;let t=(e.targetLufs??Un)-e.lufs;this._gainNode.gain.value=10**(t/20)}}var Gn=(e,t)=>{let n=e.length,r=t>=0?t:n+t;return r>=0&&r<n?e[r]:void 0},Kn=(e,t)=>{for(let n=e.length-1;n>=0;n--){let r=e[n];if(t(r,n,e))return r}},qn=(e,t)=>{for(let n=e.length-1;n>=0;n--)if(t(e[n],n,e))return n;return-1},Jn=(e,t=1)=>{let n=[],r=(e,t)=>{for(let i=0;i<e.length;i++){if(!(i in e))continue;let a=e[i];t>0&&Array.isArray(a)?r(a,t-1):n.push(a)}};return r(e,t),n},Yn=(e,t)=>{let n=[];for(let r=0;r<e.length;r++){let i=t(e[r],r,e);if(Array.isArray(i))for(let e=0;e<i.length;e++)n.push(i[e]);else n.push(i)}return n},Xn=(e,t,n=0)=>{let r=e.length,i=n>=0?n:Math.max(r+n,0);for(;i<r;i++){let n=e[i];if(n===t||n!==n&&t!==t)return!0}return!1},Zn=e=>{let t=e.length,n=Array(t);for(let r=0;r<t;r++)n[r]=e[t-1-r];return n},Qn=(e,t)=>{let n=e.slice();return t?n.sort(t):n.sort()},$n=(e,t,n,...r)=>{let i=e.slice();return n===void 0?i.splice(t):i.splice(t,n,...r),i},er=(e,t,n)=>{let r=e.length,i=t>=0?t:r+t,a=e.slice();return a[i]=n,a},tr=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof self<`u`?self:Function(`return this`)(),nr=e=>{let t=[],n=Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r];t.push([i,e[i]])}return t},rr=e=>{let t={};for(let[n,r]of e)t[n]=r;return t},ir=Object.prototype.hasOwnProperty,ar=(e,t)=>ir.call(e,t),or=e=>{let t=Object.keys(e),n=Array(t.length);for(let r=0;r<t.length;r++)n[r]=e[t[r]];return n},sr=e=>{let t=Array.from(e);return t.length===0?Promise.resolve([]):Promise.all(t.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))},cr=e=>{let t=Array.from(e);return t.length===0?Promise.reject(AggregateError([],`All promises were rejected`)):new Promise((e,n)=>{let r=Array(t.length),i=t.length;t.forEach((t,a)=>{Promise.resolve(t).then(e,e=>{r[a]=e,--i,i===0&&n(AggregateError(r,`All promises were rejected`))})})})},lr=(e,t)=>e.then(e=>Promise.resolve(t()).then(()=>e),e=>Promise.resolve(t()).then(()=>{throw e})),ur=e=>{try{return Promise.resolve(e())}catch(e){return Promise.reject(e)}},dr=()=>{let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}},{NativeAbortSignal:fr,NativeAbortController:pr}=function(e){return{NativeAbortSignal:e.AbortSignal,NativeAbortController:e.AbortController}}(typeof self<`u`?self:global);function mr(e){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}}return t.reason=e,t}function hr(e){if(e===void 0)if(typeof document>`u`)e=Error(`This operation was aborted`),e.name=`AbortError`;else try{e=new DOMException(`signal is aborted without reason`),Object.defineProperty(e,"name",{value:`AbortError`})}catch{e=Error(`This operation was aborted`),e.name=`AbortError`}return e}class gr{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;let n=this.listeners[e];for(let e=0,r=n.length;e<r;e++)if(n[e].callback===t){n.splice(e,1);return}}dispatchEvent(e){if(!(e.type in this.listeners))return;let t=this.listeners[e.type].slice();for(let n=0,r=t.length;n<r;n++){let r=t[n];try{r.callback.call(this,e)}catch(e){Promise.resolve().then(()=>{throw e})}r.options&&r.options.once&&this.removeEventListener(e.type,r.callback)}return!e.defaultPrevented}}class X extends gr{constructor(){super(),this.listeners||gr.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)}throwIfAborted(){let{aborted:e,reason:t=`Aborted`}=this;if(e)throw t}static timeout(e){let t=new Z;return setTimeout(()=>t.abort(new DOMException(`This signal is timeout in ${e}ms`,`TimeoutError`)),e),t.signal}static any(e){let t=new Z;function n(){t.abort(this.reason),r()}function r(){for(let t of e)t.removeEventListener(`abort`,n)}for(let r of e)if(r.aborted){t.abort(r.reason);break}else r.addEventListener(`abort`,n);return t.signal}}class Z{constructor(){Object.defineProperty(this,"signal",{value:new X,writable:!0,configurable:!0})}abort(e){let t=hr(e),n=mr(t);this.signal.reason=t,this.signal.dispatchEvent(n)}toString(){return`[object AbortController]`}}typeof Symbol<`u`&&Symbol.toStringTag&&(Z.prototype[Symbol.toStringTag]=`AbortController`,X.prototype[Symbol.toStringTag]=`AbortSignal`);function _r(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 vr(e){typeof e==`function`&&(e={fetch:e});let{fetch:t,Request:n=t.Request,AbortController:r,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i=!1}=e;if(!_r({fetch:t,Request:n,AbortController:r,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i}))return{fetch:t,Request:a};let a=n;(a&&!a.prototype.hasOwnProperty(`signal`)||i)&&(a=function(e,t){let r;t&&t.signal&&(r=t.signal,delete t.signal);let i=new n(e,t);return r&&Object.defineProperty(i,"signal",{writable:!1,enumerable:!1,configurable:!0,value:r}),i},a.prototype=n.prototype);let o=t;return{fetch:(e,t)=>{let n=a&&a.prototype.isPrototypeOf(e)?e.signal:t?t.signal:void 0;if(n){let r;try{r=new DOMException(`Aborted`,`AbortError`)}catch{r=Error(`Aborted`),r.name=`AbortError`}if(n.aborted)return Promise.reject(r);let i=new Promise((e,t)=>{n.addEventListener(`abort`,()=>t(r),{once:!0})});return t&&t.signal&&delete t.signal,Promise.race([i,o(e,t)])}return o(e,t)},Request:a}}var Q=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window,$=`fetch`in Q&&_r({fetch:Q.fetch,Request:Q.Request,AbortController:Q.AbortController}),yr=$?vr({fetch:Q.fetch,Request:Q.Request,AbortController:Q.AbortController}):void 0,br=$?yr.fetch:Q.fetch,xr=$?yr.Request:Q.Request,Sr=$?Z:Q.AbortController,Cr=$?X:Q.AbortSignal,wr=(e,t)=>{let n=e.length,r=t>=0?t:n+t;if(r<0||r>=n)return;let i=e.charCodeAt(r);if(i>=55296&&i<=56319&&r+1<n){let t=e.charCodeAt(r+1);if(t>=56320&&t<=57343)return e[r]+e[r+1]}return e[r]};function*Tr(e,t){let n=t.flags.includes(`g`)?t.flags:t.flags+`g`,r=new RegExp(t.source,n),i;for(;(i=r.exec(e))!==null;)yield i,i[0].length===0&&r.lastIndex++}var Er=(e,t,n=` `)=>{if(n===``||e.length>=t)return e;let r=t-e.length;return e+n.repeat(Math.ceil(r/n.length)).slice(0,r)},Dr=(e,t,n=` `)=>{if(n===``||e.length>=t)return e;let r=t-e.length;return n.repeat(Math.ceil(r/n.length)).slice(0,r)+e},Or=(e,t,n)=>{if(typeof t==`string`){if(typeof n==`string`)return t===``?n+e.split(``).join(n)+n:e.split(t).join(n);let r=[],i=0,a=e.indexOf(t,i);for(;a!==-1;)r.push(e.slice(i,a)),r.push(n(t,a,e)),i=a+t.length,a=e.indexOf(t,i);return r.push(e.slice(i)),r.join(``)}let r=t.flags.includes(`g`)?t.flags:t.flags+`g`,i=new RegExp(t.source,r);return e.replace(i,n)},kr=e=>e.replace(/^\s+/,``),Ar=e=>e.replace(/\s+$/,``),jr=kr,Mr=Ar,Nr=(e,t)=>typeof e==`string`?wr(e,t):Gn(e,t),Pr=(e,t={})=>{let n=t.timeout||1,r=performance.now();return Q.setTimeout(()=>{e({get didTimeout(){return t.timeout?!1:performance.now()-r-1>n},timeRemaining(){return Math.max(0,1+(performance.now()-r))}})},1)},Fr=e=>Q.clearTimeout(e),Ir=e=>typeof e==`function`&&e?.toString().endsWith(`{ [native code] }`),Lr=!Ir(Q.requestIdleCallback)||!Ir(Q.cancelIdleCallback),Rr=Lr?Pr:Q.requestIdleCallback,zr=Lr?Fr:Q.cancelIdleCallback,Br=(e,t,n)=>typeof e==`string`?e.includes(t,n):Xn(e,t,n),Vr=(e,t,n)=>{if(typeof e.canParse==`function`)return e.canParse(t,n);try{return new e(t,n),!0}catch{return!1}};
|
package/es2015.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer-shared v1.0.
|
|
3
|
-
*
|
|
4
|
-
* https://st.mycdn.me/static/vkontakte-videoplayer/1-0-
|
|
2
|
+
* @vkontakte/videoplayer-shared v1.0.101-beta.0
|
|
3
|
+
* Mon, 31 Aug 2026 18:54:17 GMT
|
|
4
|
+
* https://st.mycdn.me/static/vkontakte-videoplayer/1-0-101/doc/
|
|
5
5
|
*/
|
|
6
|
-
var _oxcMods5l7s3=function(){function e(t){"@babel/helpers - typeof";return e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},e(t)}var t=e;function n(e,n){if(t(e)!=`object`||!e)return e;var r=e[Symbol._oxc_toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(t(i)!=`object`)return i;throw TypeError(`@@_oxc_toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}var t=e,r=n;function i(e){var n=r(e,`string`);return t(n)==`symbol`?n:n+``}var a=i;function o(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=o;function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?c(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function d(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){u(a,r,i,o,s,`next`,e)}function s(e){u(a,r,i,o,s,`throw`,e)}o(void 0)})}}var f=l,p=d;let m;var h=Object.defineProperty,ee=e=>e;function te(e,t){this[e]=ee.bind(null,t)}var g=(e,t)=>{for(var n in t)h(e,n,{get:t[n],enumerable:!0,configurable:!0,set:te.bind(t,n)})},_=`1.0.100-dev.ed76c949d.0`;class v{constructor(){this.subscriptions=[]}unsubscribe(){let e=this.subscriptions;this.subscriptions=[],e.forEach(e=>{typeof e==`function`?e():e.unsubscribe()})}add(e){return this.subscriptions.push(e),this}}var y=e=>{throw Error(`${e} is value of unexpected type`)},ne=e=>{},b=()=>{},re=e=>{throw console.error(e),e},x=e=>{console.error(e)};class S{constructor(e){this.suppressErrors=!1,e&&(this._subscribe=e)}setSuppressErrors(e){this.suppressErrors=e}subscribe(e,t){let n=this.suppressErrors?x:re,r;r=t?typeof t==`function`?{next:t,error:b}:{next:e=>t.next(e),error:e=>t.error?.call(t,e)}:{next:n,error:b};let i=typeof e==`function`?{next:t=>{try{let n=e(t);n instanceof Promise&&n.catch(e=>r.next(e))}catch(e){r.next(e)}},error:e=>r.next(e)}:{next:t=>e.next(t),error:t=>e.error?e.error(t):r.next(t)},a;try{a=this._subscribe(i)}catch(e){i.error?.call(i,e)}return new v().add(()=>{switch(i.next=b,i.error=b,typeof a){case`function`:a();return;case`object`:a.unsubscribe();return;case`undefined`:return;default:return y(a)}})}pipe(...e){return e.reduce((e,t)=>t(e),this)}_subscribe(e){}}class C extends S{constructor(){super(),this.keyCounter=0,this.subscribers=new Map}next(e){this.subscribers.forEach(t=>t.next(e))}error(e){this.subscribers.forEach(t=>t.error?.call(t,e))}_subscribe(e){let t=this.keyCounter++;return this.subscribers.set(t,e),new v().add(()=>this.subscribers.delete(t))}}class ie{constructor(){this.log$=new C,this.logs=[],this.log=e=>{let t=f(f({},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{n={message:"error in `createCustomLog`",component:`Logger`}}this.log(n)}}createComponentLog(e){return this.createCustomLog(t=>f({component:e},t))}}function ae(e,t=`Assertion "value is not nullable" failed`){if(e==null)throw Error(t)}function oe(e,t=`Assertion "value is nullable" failed`){if(e!=null)throw Error(t)}function w(e){return e!=null}function T(e){return e==null}var se=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>w(t)));function ce(e,t){if(!e?.length)throw Error(t)}function le(e,t){if(e?.length)throw Error(t)}var E=()=>globalThis,D=()=>globalThis,ue=(e=E())=>!!(e.window&&e.screen),O=typeof E().performance?.now==`function`?()=>E().performance.now():()=>Date.now(),de=()=>Math.trunc(O());function fe(){var e=self,t=new Map;e.onmessage=function(n){var r=n.data;if(r.type===`ping`){e.postMessage({type:`ready`});return}if(r.type===`set`){var i=r.id;r.repeat?t.set(i,{repeat:!0,handle:e.setInterval(function(){e.postMessage({type:`tick`,id:i})},r.delay)}):t.set(i,{repeat:!1,handle:e.setTimeout(function(){t.delete(i),e.postMessage({type:`tick`,id:i})},r.delay)});return}var a=t.get(r.id);a&&(a.repeat?e.clearInterval(a.handle):e.clearTimeout(a.handle),t.delete(r.id))}}var pe=()=>`'use strict';(${fe.toString()})();`;class me{constructor(e,t){this.worker=void 0,this.handlers=void 0,this.records=new Map,this.ticks=0,this.handleMessage=e=>{if(e.data.type===`ready`){this.handlers.onReady();return}let{id:t}=e.data,n=this.records.get(t);T(n)||(this.ticks++,n.repeat||this.records.delete(t),n.callback())},this.handleError=()=>{this.handlers.onFatalError(this.destroy())},this.worker=e,this.handlers=t,this.worker.onmessage=this.handleMessage,this.worker.onerror=this.handleError,this.worker.onmessageerror=this.handleError,this.postCommand({type:`ping`})}static create(e){let t=E();if(typeof t.Worker!=`function`||typeof t.Blob!=`function`||T(t.URL?.createObjectURL))return null;let n=t.URL.createObjectURL(new t.Blob([pe()],{type:`text/javascript`}));try{return new me(new t.Worker(n),e)}catch{return null}finally{t.URL.revokeObjectURL(n)}}get activeCount(){return this.records.size}get deliveredTicks(){return this.ticks}set(e,t,n,r){this.records.set(e,{callback:t,repeat:r,delay:n,startedAt:O()}),this.postCommand({type:`set`,id:e,delay:n,repeat:r})}clear(e){this.records.delete(e)&&this.postCommand({type:`clear`,id:e})}destroy(){let e=new Map(this.records);return this.records.clear(),this.worker.onmessage=null,this.worker.onerror=null,this.worker.onmessageerror=null,this.worker.terminate(),e}postCommand(e){this.worker.postMessage(e)}}var he;(e=>{e.SHARED=`shared`,e.CORE=`core`,e.STATISTICS=`statistics`,e.INTERACTIVE=`interactive`,e.UI=`ui`,e.UI_TV=`ui-tv`})(he||={});var ge;(e=>{e.IDLE=`idle`,e.STARTING=`starting`,e.READY=`ready`,e.FAILED=`failed`})(ge||={});var _e=1,k=0,A=`idle`,j=null,M=new Map,N=new Set,ve=e=>{let t=O();for(let[n,r]of e){let e=r.repeat?r.delay:Math.max(0,r.delay-(t-r.startedAt));Ce(n,r.callback,e,r.repeat)}},ye=e=>{A=`failed`,j=null,ve(e)},be=()=>{T(j)||(ve(j.destroy()),j=null),A=`idle`},xe=()=>{A===`idle`&&(A=`starting`,j=me.create({onReady:()=>{A=`ready`},onFatalError:ye}))},Se=e=>N.has(e)?(xe(),A===`ready`?j:null):null,Ce=(e,t,n,r)=>{let i=D();r?M.set(e,{repeat:!0,nativeId:i.setInterval(t,n)}):M.set(e,{repeat:!1,nativeId:i.setTimeout(()=>{M.delete(e),t()},n)})},we=(e,t,n,r)=>{let i=_e++,a=Se(e);return T(a)?Ce(i,t,n,r):a.set(i,t,n,r),i},Te=e=>{if(T(e))return;let t=M.get(e);if(T(t)){j?.clear(e);return}M.delete(e);let n=D();t.repeat?n.clearInterval(t.nativeId):n.clearTimeout(t.nativeId)},Ee=e=>({setTimeout:(t,n=0)=>we(e,t,n,!1),setInterval:(t,n=0)=>we(e,t,n,!0),clearTimeout:Te,clearInterval:Te}),De=e=>{N.clear(),e.forEach(e=>N.add(e)),N.size===0&&be()},Oe=e=>{k++,De(e)},ke=()=>{k!==0&&(k--,k===0&&De([]))},Ae=()=>({workerModules:[...N],workerState:A,liveConsumers:k,activeWindowTimers:M.size,activeWorkerTimers:j?.activeCount??0,workerTicks:j?.deliveredTicks??0}),P=Ee(`shared`),je=(e,t,n)=>new Promise((r,i)=>{t.addEventListener(`abort`,()=>{s(),l.remove()});let a=()=>{s(),i(`error`)},o=()=>{s(),r()},s=()=>{c&&P.clearTimeout(c),l.removeEventListener(`load`,o),l.removeEventListener(`error`,a)},c;n&&(c=P.setTimeout(()=>{s(),i(`timeout`)},n));let l=document.createElement(`script`);l.addEventListener(`load`,o),l.addEventListener(`error`,a),l.src=e,document.head.appendChild(l)}),Me=(e,t)=>p(function*(...n){let r=t(...n),i=e.aborted,a;for(;!i&&!e.aborted;)try{let e=yield r.next(a);i=e.done??!1,a=e.value}catch(e){yield r.throw(e)}return a}),Ne=(e,{start:t=0,factor:n=2,max:r=1/0,min:i=t,random:a=0}={})=>{let o=t;return o*=n**+e,o*=1+(Math.random()*a*2-a),o=Math.round(o),o=Math.min(o,r),o=Math.max(o,i),o},Pe={};g(Pe,{set:()=>Le,remove:()=>ze,isPersistent:()=>Fe,has:()=>Re,get:()=>Ie,clear:()=>Be});var F,I,L=`vk-videoplayer-dummy-key-${Math.random()}`,R=()=>{if(I!==void 0)return I;try{localStorage.setItem(L,`test`),localStorage.removeItem(L),I=0}catch(e){if(e instanceof DOMException||e instanceof TypeError)try{sessionStorage.getItem(L),I=1}catch(e){if(e instanceof DOMException||e instanceof TypeError)I=2;else throw e}else throw e}return I===2&&(F=new Map),I},Fe=()=>R()===0,Ie=e=>{let t=R();switch(t){case 0:return localStorage.getItem(e)??void 0;case 1:return sessionStorage.getItem(e)??void 0;case 2:return F?.get(e);default:y(t)}},Le=(e,t)=>{let n=R();switch(n){case 0:try{localStorage.setItem(e,t)}catch(e){if(e instanceof DOMException)console.error(e);else throw e}break;case 1:try{sessionStorage.setItem(e,t)}catch(e){if(e instanceof DOMException)console.error(e);else throw e}break;case 2:F?.set(e,t);return;default:y(n)}},Re=e=>{let t=R();switch(t){case 0:return e in localStorage;case 1:return e in sessionStorage;case 2:return F?.has(e)??!1;default:return y(t),!1}},ze=e=>{let t=R();switch(t){case 0:return localStorage.removeItem(e);case 1:return sessionStorage.removeItem(e);case 2:F?.delete(e);return;default:y(t)}},Be=()=>{let e=R();switch(e){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return F?.clear();default:y(e)}},Ve=()=>{let e,t=[],n=E();try{e=n.self!==n.top}catch(t){t instanceof DOMException&&t.name===`SecurityError`?e=!0:(e=!1,console.error(t))}try{n.location?.ancestorOrigins&&(t=[...n.location.ancestorOrigins])}catch(e){console.error(e)}try{!t.length&&n.document.referrer&&(t=[new URL(n.document.referrer).origin])}catch(e){console.error(e)}return t=t.filter(e=>URL.canParse(e)),{isEmbed:e,origins:t,topOrigin:t.at(-1),immediateOrigin:t.at(0)}},He;(e=>{e.INVARIANT=`Invariant quality`,e.Q_144P=`144p`,e.Q_240P=`240p`,e.Q_360P=`360p`,e.Q_480P=`480p`,e.Q_576P=`576p`,e.Q_720P=`720p`,e.Q_1080P=`1080p`,e.Q_1440P=`1440p`,e.Q_2160P=`2160p`,e.Q_4320P=`4320p`})(He||={});var z={"144p":{width:256,height:144},"240p":{width:428,height:240},"360p":{width:640,height:360},"480p":{width:856,height:480},"576p":{width:1024,height:576},"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}},Ue=(e,t)=>z[e].height>z[t].height,We=(e,t)=>z[e].height>=z[t].height,B=(e,t)=>z[e].height<z[t].height,Ge=(e,t)=>z[e].height<=z[t].height,Ke=e=>e.sort((e,t)=>e===t?0:e===`Invariant quality`?1:t===`Invariant quality`?-1:B(e,t)?1:-1)[0],qe=Object.keys(z).sort((e,t)=>B(e,t)?-1:1),Je=(e,t=.02)=>[...qe].find(n=>z[n].height*(1+t)>=e),Ye=({width:e,height:t})=>{let n=Math.min(e,t),r=Math.max(e,t);return qe.find(e=>{let t=z[e];return t.width>=r&&t.height>=n})},Xe=e=>z[e].height,V=e=>e===`Invariant quality`,Ze=e=>e.every(e=>!V(e));function Qe(e){if(V(e))throw Error(`Expected exact quality`)}var $e=e=>{switch(e){case`4320p`:return`8K`;case`2160p`:return`4K`;case`1440p`:return`QHD`;case`1080p`:return`FHD`;case`720p`:return`HD`;default:return``}},et=(e,t)=>{let n={};for(let r of Object.keys(t)){let i=t[r],a=e[r];Array.isArray(i)?n[r]=Array.isArray(a)?a:i:typeof i==`object`&&i?typeof a==`object`&&a&&!Array.isArray(a)?n[r]=et(a,i):n[r]=a??i:n[r]=r in e?a:i}return n},tt=e=>{let t=``;return e>=3600&&(t+=Math.floor(e/3600)+`h`,e%=3600),e>=60&&(t+=Math.floor(e/60)+`m`,e%=60),e>0&&(t+=Math.floor(e)+`s`),t};function nt(e,t=0,n){let r,i,a,o,s,c,l=0,u=!1,d=!1,f=!0,p=!t&&t!==0&&typeof E().requestAnimationFrame==`function`;n&&(u=!!n.leading,d=`maxWait`in n,a=n?.maxWait?Math.max(+n?.maxWait||0,t):a,f=`trailing`in n?!!n.trailing:f);function m(t){let n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o}function h(e,t){return p?(s&&E().cancelAnimationFrame(s),E().requestAnimationFrame(e)):P.setTimeout(e,t)}function ee(e){if(p){E().cancelAnimationFrame(e);return}P.clearTimeout(e)}function te(e){return l=e,s=h(v,t),u?m(e):o}function g(e){let n=e-c,r=e-l,i=t-n;return d?Math.min(i,a-r):i}function _(e){let n=e-c,r=e-l;return c===void 0||n>=t||n<0||d&&r>=a}function v(){let e=Date.now();if(_(e))return y(e);s=h(v,g(e))}function y(e){return s=void 0,f&&r?m(e):(r=i=void 0,o)}function ne(){s!==void 0&&ee(s),l=0,r=c=i=s=void 0}function b(){return s===void 0?o:y(Date.now())}function re(){return s!==void 0}function x(...e){let n=Date.now(),a=_(n);if(r=e,i=this,c=n,a){if(s===void 0)return te(c);if(d)return s=h(v,t),m(c)}return s===void 0&&(s=h(v,t)),o}return x.cancel=ne,x.flush=b,x.pending=re,x}var rt=(e,t=0,n)=>nt(e,t,f(f(f({},{leading:!0,trailing:!0}),n),{},{maxWait:t})),H=(e,t)=>{if(typeof e!=`object`||!e)return e;let n=Array.isArray(e)?[]:{};for(let r in e){if(typeof t==`function`){let i=t(e[r],r,e,n);if(i!==void 0){n[r]=i;continue}}typeof e[r]==`object`?n[r]=H(e[r],t):n[r]=e[r]}return n},it=e=>H(e);class at extends C{constructor(e){super(),this.bufferSize=void 0,this.buffer=[],this.cursorEnd=-1,this.cursorStart=0,this.bufferSize=e,this.buffer=Array(e)}next(e){this.cursorEnd+=1,this.cursorStart=this.cursorEnd>=this.bufferSize?this.cursorStart+1:0,this.buffer[this.cursorEnd%this.bufferSize]=e,this.subscribers.forEach(t=>t.next(e))}_subscribe(e){for(let t=this.cursorStart;t<=this.cursorEnd;t++)e.next(this.buffer[t%this.bufferSize]);let t=this.keyCounter++;return this.subscribers.set(t,e),new v().add(()=>this.subscribers.delete(t))}}class U extends C{constructor(e){super(),this.value=void 0,this.value=e}next(e){super.next(this.value=e)}error(e){super.error(this.value=e)}getValue(){return this.value}_subscribe(e){let t=super._subscribe(e);return e.next(this.value),t}}function ot(e){return new S(t=>{let n={},r=Object.keys(e).length,i=e=>i=>{e in n||r--,n[e]=i,r===0&&t.next(n)};return Object.entries(e).reduce((e,[t,n])=>e.add(n.subscribe(i(t))),new v)})}function st(...e){return new S(t=>e.reduce((e,n)=>e.add(n.subscribe(t)),new v))}var ct=e=>new S(t=>{let n=P.setTimeout(()=>{try{t.next()}catch(e){if(t.error)t.error(e);else throw e}},e);return()=>P.clearTimeout(n)}),lt=e=>new S(t=>{let n=P.setInterval(()=>t.next(),e);return()=>{n&&=(P.clearInterval(n),void 0)}});function ut(e){return new S(t=>{if(e instanceof Promise){let n=!1;return e.then(e=>{n||t.next(e)}).catch(e=>{n||t.error?.call(t,e)}),()=>{n=!0}}for(let n=0;n<e.length;n++)t.next(e[n])})}var dt=ut,ft=(e,t)=>new S(n=>{let r=e=>n.next(e);return e.addEventListener(t,r),()=>e.removeEventListener(t,r)});class pt extends v{remove(e){this.subscriptions=this.subscriptions.filter(t=>t!==e)}}function mt(e){return t=>new S(n=>t.subscribe(new ht(n,e)))}class ht{constructor(e,t){this.destination=void 0,this.size=void 0,this.lastValues=[],this.destination=e,this.size=t}next(e){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(e),this.destination.next(this.lastValues)}error(e){var t;(t=this.destination).error?.call(t,e)}}var gt={leading:!1,trailing:!0};function _t(e,t=gt){return n=>new S(r=>n.subscribe(new vt(r,e,t)))}class vt{constructor(e,t,n){this.destination=void 0,this.time=void 0,this.config=void 0,this.lastValue=void 0,this.timeout=void 0,this.destination=e,this.time=t,this.config=n}next(e){this.lastValue=e,w(this.timeout)?P.clearTimeout(this.timeout):this.config.leading&&this.destination.next(e),this.timeout=P.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(e){if(this.destination.error)this.destination.error(e);else throw e}this.timeout=void 0},this.time)}error(e){var t;(t=this.destination).error?.call(t,e)}}var yt={leading:!0,trailing:!1};function bt(e,t=yt){return n=>new S(r=>n.subscribe(new xt(r,e,t)))}class xt{constructor(e,t,n){this.destination=void 0,this.time=void 0,this.config=void 0,this.lastValue=void 0,this.timeout=void 0,this.destination=e,this.time=t,this.config=n}next(e){this.lastValue=e,T(this.timeout)&&(this.config.leading&&this.destination.next(e),this.timeout=P.setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(e){var t;(t=this.destination).error?.call(t,e)}}function St(e){return t=>new S(n=>t.subscribe(new Ct(n,e)))}class Ct{constructor(e,t){this.destination=void 0,this.predicate=void 0,this.destination=e,this.predicate=t}next(e){let t;try{t=this.predicate(e)}catch(e){throw this.error(e),e}t&&this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}var wt=(e,t)=>{let n=(e,t)=>{let n=Object.keys(e);for(let r in t)if(!n.includes(r)||t[r]!==e[r])return!1;return!0};return n(e,t)&&n(t,e)},Tt=(e,t)=>e instanceof Object&&t instanceof Object?wt(e,t):e===t;function Et(e=Tt){return t=>new S(n=>t.subscribe(new Ot(n,e)))}var Dt={};class Ot{constructor(e,t){this.destination=void 0,this.predicate=void 0,this.lastValue=Dt,this.destination=e,this.predicate=t}next(e){let t;try{t=this.lastValue===Dt||!this.predicate(this.lastValue,e),this.lastValue=e instanceof Object&&!Array.isArray(e)?f({},e):e}catch(e){throw this.error(e),e}t&&this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}function kt(e){return t=>new S(n=>t.subscribe(new At(n,e)))}class At{constructor(e,t){this.destination=void 0,this.mapper=void 0,this.destination=e,this.mapper=t}next(e){let t;try{t=this.mapper(e)}catch(e){throw this.error(e),e}this.destination.next(t)}error(e){var t;(t=this.destination).error?.call(t,e)}}function jt(e){return kt(()=>e)}function Mt(){return e=>new S(t=>{let n=!1,r=!1,i=e.subscribe(e=>{n||(n=!0,t.next(e)),r&&i.unsubscribe()},e=>{n=!0,t.error?.call(t,e),r&&i.unsubscribe()});return r=!0,n&&i.unsubscribe(),i})}function Nt(){return e=>new S(t=>e.subscribe(new Pt(t)))}class Pt{constructor(e){this.destination=void 0,this.last=void 0,this.hasLast=!1,this.destination=e}next(e){let t=this.last;if(this.last=e,!this.hasLast){this.hasLast=!0;return}this.destination.next([t,e])}error(e){var t;(t=this.destination).error?.call(t,e)}}function Ft(e){return t=>new S(n=>t.subscribe(new It(n,e)))}class It{constructor(e,t){this.destination=void 0,this.effect=void 0,this.destination=e,this.effect=t}next(e){try{this.effect(e)}catch(e){throw this.error(e),e}this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}function Lt(e){return t=>new S(n=>t.subscribe(new Rt(n,e)))}class Rt{constructor(e,t){if(this.destination=void 0,this.count=void 0,this.destination=e,this.count=t,t<0){var n;(n=this.destination).error?.call(n,Error(`Count can not be less than zero`))}}next(e){this.count===0?this.destination.next(e):this.count--}error(e){var t;(t=this.destination).error?.call(t,e)}}function zt(e=0){return t=>{let n=0,r=new at(e),i=t.subscribe(r),a=e=>()=>{e.unsubscribe(),n--,n===0&&i.unsubscribe()};return new S(e=>(n++,a(r.subscribe(e))))}}var Bt=300,Vt=(e,t=Bt)=>new S(n=>{let r=E(),{width:i,height:a}=e.getBoundingClientRect();if(n.next({width:i,height:a}),!ue(r))return;let o=new r.ResizeObserver(rt(e=>{let t=e[0];if(!t)return;let r,i;t.contentBoxSize&&t.contentBoxSize[0]?(i=t.contentBoxSize[0].blockSize,r=t.contentBoxSize[0].inlineSize):t.contentRect&&(r=t.contentRect.width,i=t.contentRect.height),w(r)&&w(i)&&n.next({width:r,height:i})},t));return o.observe(e),()=>o.disconnect()}),W=(e,t=6,n=`.`)=>{let r={};for(let i in e)if(!(!e.hasOwnProperty(i)||e[i]instanceof HTMLElement||!t))if(typeof e[i]==`object`&&e[i]!==null){let a=W(e[i],t-1);for(let e in a)a.hasOwnProperty(e)&&(r[i+n+e]=a[e])}else r[i]=e[i];return r},Ht=e=>{e.innerHTML=``,e.removeAttribute(`src`),e.load()},Ut=e=>{let t;try{t=new URL(e)}catch{return!1}return t.protocol===`https:`},Wt=(e,t)=>!(e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom),Gt=(()=>{let e=0;return()=>{let t=e;return e=(e+1)%(2**53-1),t}})(),Kt=e=>e!==void 0&&e!==``?e:Gt().toString();function qt(e,t,n){if(e<=t[0])return n[0];if(e>=t[t.length-1])return n[n.length-1];let r=1;for(;r<t.length&&t[r]<e;)r++;r>=t.length&&(r=t.length-1);let i=t[r-1],a=t[r],o=n[r-1],s=n[r];return e===i?o:e===a?s:o+(e-i)/(a-i)*(s-o)}function Jt(e,t,n){if(e<=0||n<0)return[];let r=[],i=Math.floor((e-1)/2),a=Math.floor(e/2),o=t-i,s=t+a;o<0&&(s+=Math.abs(o),o=0),s>n&&(o-=s-n,s=n),o=Math.max(0,o),s=Math.min(n,s);for(let e=o;e<=s;e++)r.push(e);return r}var Yt=e=>e instanceof DOMException&&(e.name===`AbortError`||e.code===20),Xt=e=>{if(!Yt(e))throw e};function Zt(e){if(e&&typeof e==`object`){if(`message`in e)return String(e.message);try{return JSON.stringify(e)}catch{return`object serialization error`}}return String(e)}m=Symbol.iterator;class G{constructor(e){if(this.buffer=void 0,this.writeIndex=0,this.count=0,this.capacity=void 0,e<=0)throw Error(`Capacity must be greater than 0`);this.capacity=e,this.buffer=Array.from({length:e}).fill(null)}add(e){this.buffer[this.writeIndex]=e,this.writeIndex=(this.writeIndex+1)%this.capacity,this.count<this.capacity&&this.count++}*[m](){if(this.count===0)return;let e=this.count<this.capacity?0:this.writeIndex;for(let t=0;t<this.count;t++){let t=this.buffer[e];w(t)&&(yield t),e=(e+1)%this.capacity}}clear(){this.buffer.fill(null),this.writeIndex=0,this.count=0}get size(){return this.count}get maxCapacity(){return this.capacity}}var Qt=e=>(t,n=!1)=>r=>{let i=typeof r==`object`;r==null||i&&!Object.keys(r).length||e(t,i?W(r):{value:r},n)},$t=(e={})=>{let t=e=>{let t=e;return e===void 0?t=`undefined`:e===null?t=`null`:(typeof e==`number`||typeof e==`boolean`)&&(t=e.toString()),t},n={};for(let r in e)Array.isArray(e[r])?n[r]=e[r].map(t):n[r]=t(e[r]);return n};class K{constructor({name:e,getParentContext:t,getRootTracerContext:n,options:r}){this.dynamicImportTimeout=5e3,this.subscription=new v,this.options=void 0,this.span=void 0,this.context=void 0,this.childTracers=[],this.initPromise=void 0,this.getRootTracerContext=void 0,this.eventsBuffer=null,this.options=r??{};let{tracerEventsBufferSize:i}=this.options;w(i)&&i>0&&(this.eventsBuffer=new G(i)),K.dynamicImportStatus===`not_started`&&(K.dynamicImportPromise=this.loadOpentelemetry());let a=Date.now();this.initPromise=K.dynamicImportPromise.then(r=>{K.dynamicImportStatus===`completed`&&this.init({name:e,getParentContext:t,getRootTracerContext:n},a)})}init({name:e,getParentContext:t,getRootTracerContext:n},r){let i=n?.();if(T(i))return;let{opentelemetryApi:a}=K.dynamicImports,{context:o,trace:s}=a,{tracer:c,attributes$:l}=i;this.span=c.startSpan(e,{startTime:r},t?.()),this.context=s.setSpan(o.active(),this.span),this.getRootTracerContext=n,this.subscription.add(l.subscribe(e=>{w(e)&&this.span.setAttributes(e)}))}loadOpentelemetry(){var e=this;return p(function*(){if(K.dynamicImportStatus===`not_started`){K.dynamicImportStatus=`in_progress`;try{let t=new Promise((t,n)=>P.setTimeout(n,e.dynamicImportTimeout)),n=Promise.all([import(`@opentelemetry/api`),import(`@opentelemetry/sdk-trace-web`),import(`@apptracer/opentelemetry`),import(`@opentelemetry/resources`),import(`@opentelemetry/semantic-conventions`)]),[r,i,a,o,s]=yield Promise.race([n,t]);K.dynamicImports={opentelemetryApi:r,opentelemetrySdk:i,tracer:a,opentelemetryResources:o,opentelemetrySemanticConventions:s},K.dynamicImportStatus=`completed`}catch{K.dynamicImportStatus=`failed`}}})()}isComponentTracerNotInitialized(){return T(this.span)||K.dynamicImportStatus===`failed`}addEventToBuffer(e,t,n,r){w(this.eventsBuffer)&&this.eventsBuffer.add({name:e,attributes:t,type:n,timestamp:r})}addEventToSpan(e,t,n,r){this.span.addEvent(e,f(f({},$t(t)),{},{type:n}),r)}log(e,t,n=!1){let r=Date.now();n?this.initPromise.then(n=>{this.isComponentTracerNotInitialized()||this.addEventToSpan(e,t,`log`,r)}):this.addEventToBuffer(e,t,`log`,r)}error(e,t,n=!1){let r=Date.now();n?this.initPromise.then(n=>{this.isComponentTracerNotInitialized()||this.addEventToSpan(e,t,`error`,r)}):this.addEventToBuffer(e,t,`error`,r)}critical(e,t,n=!1){let r=Date.now();n?this.initPromise.then(n=>{this.isComponentTracerNotInitialized()||this.addEventToSpan(e,t,`critical`,r)}):this.addEventToBuffer(e,t,`critical`,r)}createComponentTracer(e){let t=new K({name:e,getParentContext:()=>this.context,getRootTracerContext:()=>this.getRootTracerContext?.call(this),options:this.options});return this.childTracers.push(t),t}setSpanAttributes(e){this.span.setAttributes($t(e))}end(){this.initPromise.then(e=>{if(!this.isComponentTracerNotInitialized()){if(w(this.eventsBuffer))for(let e of this.eventsBuffer)this.addEventToSpan(e.name,e.attributes,e.type,e.timestamp);this.childTracers.forEach(e=>e.end()),this.span.end(),this.subscription.unsubscribe()}})}pause(){var e;(e=this.getRootTracerContext)==null||(e=e.call(this))==null||e.paused$.next(!0)}resume(){var e;(e=this.getRootTracerContext)==null||(e=e.call(this))==null||e.paused$.next(!1)}}K.dynamicImportStatus=`not_started`,K.dynamicImports=void 0,K.dynamicImportPromise=void 0;var en=`gW5EerTD5QhAnsbpF7Hd2NSMRteYIUUMjFbSyI68Pf5`,tn=e=>{class t extends e{constructor(e,t){super(e,t),this._isPaused=!1,this._pausedSpans=void 0,this.maxExportBatchSize=void 0,this.maxQueueSize=void 0,this.maxQueueSize=t?.maxQueueSize??2048,this.maxExportBatchSize=t?.maxExportBatchSize??512,this._pausedSpans=new G(this.maxQueueSize)}pause(){this._isPaused=!0}resume(){var e=()=>super.onEnd,t=this;return p(function*(){if(!t._isPaused)return;t._isPaused=!1;let n=t._pausedSpans;t._pausedSpans=new G(t.maxQueueSize);let r=0;for(let i of n)e().call(t,i),r+=1,r>=t.maxExportBatchSize&&(yield new Promise(e=>P.setTimeout(()=>e(void 0),0)),r=0);n.clear(),yield t.forceFlush()})()}onEnd(e){if(this._isPaused){this._pausedSpans.add(e);return}super.onEnd(e)}}return t};class nn extends K{constructor(e){super({name:`Root`,options:e}),this.attributes$=new U(null),this.paused$=new U(!1),this.paused$.next(!!this.options.tracerPausedAtInit)}init({name:e,getParentContext:t},n){let{tracer:r,opentelemetryResources:i,opentelemetrySdk:a,opentelemetrySemanticConventions:o}=K.dynamicImports,{TracerUploadSpanExporter:s}=r,{WebTracerProvider:c,BatchSpanProcessor:l}=a,{resourceFromAttributes:u}=i,{ATTR_SERVICE_NAME:d,ATTR_SERVICE_VERSION:f}=o,p=new(tn(l))(new s({appToken:en}));this.subscription.add(this.paused$.subscribe(e=>{e?p.pause():p.resume()}));let m=new c({resource:u({[d]:`videoplayer-sdk-web`,[f]:_}),spanLimits:{attributeCountLimit:1/0,eventCountLimit:1/0,attributePerEventCountLimit:1/0},spanProcessors:[p]});m.register();let h=m.getTracer(`sdk-videoplayer-tracer`);super.init({name:e,getParentContext:t,getRootTracerContext:()=>({tracer:h,attributes$:this.attributes$,paused$:this.paused$})},n)}getTraceId(){return this.isComponentTracerNotInitialized()?``:this.span.spanContext().traceId}setSpanAttributes(e){this.attributes$.next(f(f({},this.attributes$.getValue()),$t(e)))}addSubscription(e){this.subscription.add(e)}}class rn{constructor(e){this.fakeTraceId=void 0}log(e,t,n){}error(e,t,n){}critical(e,t,n){}createComponentTracer(e){return new rn({name:e})}end(){}getTraceId(){return this.fakeTraceId}addSubscription(e){}setSpanAttributes(e){}pause(){}resume(){}}var an=()=>!0,on={level:0,filter:an,name:`Noname Tracer`,outputMethod:`log`};class sn{constructor({name:e,level:t,filter:n,outputMethod:r}={}){this.name=void 0,this.filter=an,this.level=on.level,this.outputMethod=on.outputMethod,this.childTracers=[],this.filter=n??this.filter,this.level=t??this.level,this.outputMethod=r??this.outputMethod,this.name=e??on.name}log(e,t,n){this.logDebug(e,t)}error(e,t,n){this.logError(e,t)}critical(e,t,n){this.logError(e,t)}createComponentTracer(e){let t=new sn({filter:this.filter,level:this.level,name:`${this.name}/ ${e}`,outputMethod:this.outputMethod});return this.childTracers.push(t),t}end(){this.childTracers.forEach(e=>e.end()),this.childTracers=[]}setLevel(e){this.level=e,this.childTracers.forEach(t=>t.setLevel(e))}setOtputMethod(e){this.outputMethod=e,this.childTracers.forEach(t=>t.setOtputMethod(e))}setFilter(e){this.filter=e,this.childTracers.forEach(t=>t.setFilter(e))}getFinishedSpans(){}getTraceId(){return`debug_trace`}get verbose(){return this.level===0}createMessage(e,t){return[this.name,e,JSON.stringify(t)].join(`: `)}logDebug(e,t){!this.verbose||!this.filter(e,t)||E().console[this.outputMethod](this.createMessage(e,t))}logError(e,t){this.filter(e,t)&&E().console.error(this.createMessage(e,t))}addSubscription(e){}setSpanAttributes(e){}pause(){}resume(){}}class cn{static createRootTracer(e=`fake`,t){switch(e){case`real`:return new nn(t);case`debug`:return new sn;default:return new rn}}}var ln;(e=>{e.MediaError=`mediaError`,e.SegmentFetcher=`segment_fetcher`,e.Hangup=`hangup`,e.Stall=`stall`})(ln||={});var un;(e=>{e.NETWORK=`network`,e.VIDEO_PIPELINE=`video_pipeline`,e.EXTERNAL_API=`external_api`,e.PARSER=`parser`,e.DOM=`dom`,e.WTF=`wtf`,e.UI=`ui`,e.CALL_FROM_EXTERNAL=`call_from_external`,e.FATAL=`fatal`})(un||={});var dn;(e=>{e.Armenian=`58`,e.Azerbaijani=`57`,e.Belarusian=`114`,e.English=`3`,e.Kazakh=`97`,e.Portuguese=`73`,e.Russian=`0`,e.Spanish=`4`,e.Ukrainian=`1`,e.Uzbek=`65`,e.Vietnamese=`75`})(dn||={});var fn=`vk.ru`,pn=function(){var e=p(function*(e,t,n){let r=new URL(`https://${fn}/js/lang-pack.js`);return r.searchParams.set(`format`,`json`),r.searchParams.set(`name`,t),e!==void 0&&r.searchParams.set(`lang`,e),mn(yield(yield fetch(r.toString())).json(),n)});return function(t,n,r){return e.apply(this,arguments)}}(),mn=(e,t)=>Object.fromEntries(Object.entries(e.keys).map(([e,n])=>[e.substring(`${t}_`.length),hn(n)])),hn=e=>Array.isArray(e)?e[0]:e,gn;(e=>{e.RU=`ru`,e.EN=`en`})(gn||={});var q=`__vk_vp_internals_exposure`;class _n{constructor(e,t){this.playerId=void 0,this.type=void 0,this.playerId=t,this.type=e,this.initWindowObjects()}getWindowObject(){var e;if(typeof window>`u`)return{};let t=this.playerId,n=this.type;return((e=window[q])==null||(e=e[t])==null?void 0:e[n])??{}}initWindowObjects(){if(typeof window>`u`)return;let e=this.playerId,t=this.type;window[q]||(window[q]={}),window[q][e]||(window[q][e]={}),window[q][e][t]||(window[q][e][t]={})}expose(e){typeof window>`u`||Object.assign(this.getWindowObject(),e)}destroy(){if(typeof window>`u`)return;let e=this.playerId,t=this.type;window[q]&&window[q][e]&&window[q][e][t]&&(delete window[q][e][t],Object.keys(window[q][e]).length||delete window[q][e],Object.keys(window[q]).length||delete window[q])}}var vn={};g(vn,{subscribe:()=>Sn,push:()=>xn,destroy:()=>bn,create:()=>yn});var J=new Map,yn=(e,t)=>J.set(e,t??[]),bn=e=>J.delete(e),xn=(e,t)=>{let n=J.get(e);n&&(typeof n==`function`?n(t):n.push(t))},Sn=(e,t)=>{let n=J.get(e);if(n){if(n&&Array.isArray(n))for(let e of n)t(e);J.set(e,t)}},Cn=e=>se({id:e.id,message:e.message,category:e.category,data:wn(e.data),httpCode:e.httpCode,UVBackendErrorCode:e.UVBackendErrorCode});function wn(e){switch(typeof e){case`boolean`:case`string`:case`number`:return e;case`object`:try{return JSON.stringify(e)}catch{return}default:return}}var Tn=e=>{let t=e.thrown instanceof Error?e.thrown:Error(e.message),n=e.id.length>10240?e.id.substring(0,10240):e.id;try{t.name=n}catch{t=Error(e.message),t.name=n}return t},En=()=>{try{var e;let{origin:t,pathname:n,search:r,hostname:i}=((e=E())==null||(e=e.document)==null?void 0:e.location)??{};return!i||i===`localhost`?void 0:f({url:t+n},new URLSearchParams(r).entries().reduce((e,[t,n])=>(e[`url.${t}`]=n,e),{}))}catch{}};class Y{constructor(e,t,n,r){this.dynamicImportTimeout=5e3,this.componentName=void 0,this.subscription=new v,this.options=void 0,this.envParams=void 0,this.context=void 0,this.isEmbed=void 0,this.embedParent=void 0,this.beforeInitErrors=[],this.componentName=e,this.options=t,this.envParams=n,this.context=f({},r);let{isEmbed:i,topOrigin:a}=Ve();this.isEmbed=i,this.embedParent=a?new URL(a).hostname:void 0,this.options.enabled&&(this.loadModule(),this.init())}updateContext(e){Object.assign(this.context,e)}error(e,t){let n=Y.tracerErrorMap.get(this.componentName);if(!n){this.beforeInitErrors.push([e,t]);return}let{blackErrorCategoryList:r,blackErrorIdList:i,sampleRate:a,whiteErrorCategoryList:o,whiteErrorIdList:s}=this.options,{id:c,category:l}=e;if(!(r.length&&r.includes(l)||i.length&&i.includes(c)||o.length&&!o.includes(l)||s.length&&!s.includes(c)||Math.random()>=a))try{let r=Tn(e);n?.error(r,f(f({crashIdSource:t?.crashIdSource??r.name,severity:t?.severity??(e.traceAsLog?`debug`:void 0)},t?.issueKey?{issueKey:t.issueKey}:{}),{},{keys:f(f(f(f({},this.context),Cn(e)),En()),this.isEmbed&&this.embedParent&&{iframe_host:this.embedParent})}))}catch(e){console.error(e)}}addSubscription(e){this.subscription.add(e)}destroy(){this.subscription.unsubscribe()}init(){var e=this;return p(function*(){try{if(yield Y.loadPromise,Y.tracerErrorMap.has(e.componentName)||T(Y.appTracerModule))return;let{appTracerModule:t}=Y,{initTracerError:n,initTracerErrorUploader:r,getTracerModules:i}=t,a=i(e.componentName),o=!a.error,s=a.error??n(e.componentName,{enableUnhandledErrorsListeners:!1,stringifyErrorDataObject:!0});w(e.options.userId)&&s.setUserId(e.options.userId),o&&r(e.componentName,{appToken:en,environment:e.envParams.env,versionCode:1,versionName:e.envParams.version}),Y.tracerErrorMap.set(e.componentName,s),e.beforeInitErrors.forEach(t=>e.error.apply(e,t)),e.beforeInitErrors=[]}catch(e){console.error(e)}})()}loadModule(){var e=this;w(Y.loadPromise)||(Y.loadPromise=function(){var t=p(function*(){try{let t=new Promise((t,n)=>P.setTimeout(n,e.dynamicImportTimeout));Y.appTracerModule=yield Promise.race([t,import(`@apptracer/sdk/lite`)])}catch(e){Y.loadPromise=null,console.error(e)}});return function(){return t.apply(this,arguments)}}()())}}Y.tracerErrorMap=new Map,Y.appTracerModule=null,Y.loadPromise=null;class Dn{constructor(e,t){this.options=void 0,this.symbol=void 0,this.options=t,this.symbol=Symbol(e)}}var On=()=>{let e=new Map,t=new Map,n=new Map,r=new Map,i=new Set;return{resolve(e){if(!r.has(e)){let t=n.get(e);if(!t)throw Error(`No constructor registered in DI container for ${e.name}`);r.set(e,new t)}return r.get(e)},resolveOptional(e){try{return this.resolve(e)}catch{return}},replace(e,t){r.forEach((t,n)=>{t instanceof e&&r.delete(n)}),n.set(e,t)},getToken(n){if(e.has(n.symbol))return e.get(n.symbol);if(t.has(n.symbol)){let r=t.get(n.symbol)();return e.set(n.symbol,r),r}if(n.options?.factory){let t=n.options.factory();return e.set(n.symbol,t),t}throw Error(`No value registered in DI container for token "${n.symbol.description}"`)},registerToken(t,n){e.set(t.symbol,n)},registerFactory(e,n){t.set(e.symbol,n)},hasToken(n){return e.has(n.symbol)||t.has(n.symbol)||!!n.options?.factory},registerCleanup(e){i.add(e)},clear(){i.forEach(e=>e()),i.clear(),e.clear(),t.clear(),r.clear(),n.clear()}}};class kn{constructor(e){this._inputNode=void 0,this._outputNode=void 0,this._plugins=[],this._destination=null,this._taps=[],this._inputNode=e.createGain(),this._outputNode=e.createGain()}get input(){return this._inputNode}get plugins(){return this._plugins}connectTo(e){this._destination=e,this.rebuild()}addTap(e){this._taps.push(e),this._outputNode.connect(e)}hasPlugin(e){return this._plugins.some(t=>t.id===e)}addPlugin(e){this.hasPlugin(e.id)||(this._plugins.push(e),this.rebuild())}removePlugin(e){let t=this._plugins.findIndex(t=>t.id===e);t!==-1&&(this._plugins.splice(t,1),this.rebuild())}rebuild(){this._inputNode.disconnect();for(let e of this._plugins)e.outputNode.disconnect();this._outputNode.disconnect();let e=this._inputNode;for(let t of this._plugins)e.connect(t.inputNode),e=t.outputNode;e.connect(this._outputNode),this._destination!==null&&this._outputNode.connect(this._destination);for(let e of this._taps)this._outputNode.connect(e)}}class An{constructor(e,t,n){this._pluginChain=void 0,this._element=void 0,this._ctx=void 0,this._sourceNode=null,this._isBound=!1,this._element=e,this._ctx=t,this._pluginChain=new kn(t),this._pluginChain.connectTo(n)}get isBound(){return this._isBound}get plugins(){return this._pluginChain.plugins}bind(){this._isBound||=(this._sourceNode===null&&(this._sourceNode=this._ctx.createMediaElementSource(this._element)),this._sourceNode.disconnect(),this._sourceNode.connect(this._pluginChain.input),!0)}unbind(){this._isBound&&=(this._sourceNode?.disconnect(),this._sourceNode?.connect(this._ctx.destination),!1)}addPlugin(e){this._pluginChain.addPlugin(e)}removePlugin(e){this._pluginChain.removePlugin(e)}addAnalyser(e){this._pluginChain.addTap(e)}}class jn{constructor(){this._ctx=null,this._masterGain=null,this._connections=new Map,this._contextEnabled=!1,this._boundBeforeDisable=new Set}static isSupported(){let e=E();return w(e.AudioContext??e.webkitAudioContext)}get context(){if(T(this._ctx)){let e=E(),t=e.AudioContext??e.webkitAudioContext;this._ctx=new t}return this._ctx}get contextState(){return this._contextEnabled?this._ctx?.state??`suspended`:`suspended`}enableContext(){var e=this;return p(function*(){e.ensureContext(),yield e._ctx?.resume(),e._contextEnabled=!0;for(let t of e._boundBeforeDisable)e._connections.get(t)?.bind();e._boundBeforeDisable.clear()})()}disableContext(){var e=this;return p(function*(){e._contextEnabled=!1;for(let[t,n]of e._connections)n.isBound&&(e._boundBeforeDisable.add(t),n.unbind())})()}connectSource(e){var t=this;return p(function*(){t.ensureContext(),t._contextEnabled=!0,yield t._ctx?.resume();let n=t._connections.get(e);if(n!==void 0){n.isBound||n.bind();return}let r=new An(e,t.context,t._masterGain);r.bind(),t._connections.set(e,r)})()}disconnectSource(e){this._connections.get(e)?.unbind()}isSourceConnected(e){return this._connections.get(e)?.isBound??!1}addPlugin(e,t){let n=this._connections.get(e);if(n===void 0)throw Error(`Source is not connected. Call connectSource() first.`);n.addPlugin(t)}removePlugin(e,t){this._connections.get(e)?.removePlugin(t)}getPlugins(e){return this._connections.get(e)?.plugins??[]}createAnalyser(e){let t=this._connections.get(e);if(t===void 0)return null;let n=this.context.createAnalyser();return n.fftSize=256,n.smoothingTimeConstant=.8,t.addAnalyser(n),n}setMasterVolume(e){this._masterGain!==null&&(this._masterGain.gain.value=e)}getMasterVolume(){return this._masterGain?.gain.value??1}dispose(){this._connections.clear(),this._boundBeforeDisable.clear(),this._masterGain=null,this._contextEnabled=!1,this._ctx?.close(),this._ctx=null}ensureContext(){let e=this.context;T(this._masterGain)&&(this._masterGain=e.createGain(),this._masterGain.gain.value=1,this._masterGain.connect(e.destination))}}class Mn{constructor(e,t){this.id=`volume-fader`,this._gainNode=void 0,this._duration=void 0,this._curve=void 0,this._fade=null,this._gainNode=e.createGain(),this._gainNode.gain.value=1,this._duration=t.duration,this._curve=t.curve??this._buildEasingCurve(t.duration/1e3)}get inputNode(){return this._gainNode}get outputNode(){return this._gainNode}get faded(){return this._fade!==null}appear(){this._startFade(0,1)}disappear(){this._startFade(1,0)}pause(){if(this._fade===null)return;let e=this._gainNode.gain,t=this._gainNode.context.currentTime,n=t-this._fade.startTime,r=Math.max(0,this._fade.remaining-n);if(r<=.001){this._finishFade();return}let i=this._sampleIndex(this._fade,t),a=this._fade.curve[i];e.cancelScheduledValues(t),e.setValueAtTime(a,t),this._fade={from:a,target:this._fade.target,startTime:t,remaining:r,curve:this._fade.curve.subarray(i)}}resume(){if(this._fade===null)return;let e=this._gainNode.context.currentTime,{from:t,target:n,remaining:r,curve:i}=this._fade;if(r<=.001||Math.abs(n-t)<.001||i.length<2){this._finishFade();return}this._fade={from:t,target:n,startTime:e,remaining:r,curve:i},this._scheduleCurve(i,t,e,r)}cancel(){this._fade!==null&&this._finishFade()}_finishFade(){if(this._fade===null)return;let e=this._gainNode.gain,t=this._gainNode.context.currentTime;e.cancelScheduledValues(t),e.setValueAtTime(this._fade.target,t),this._fade=null}_startFade(e,t){let n=this._gainNode.gain,r=this._gainNode.context.currentTime,i=this._duration/1e3;if(i<=0){n.cancelScheduledValues(r),n.setValueAtTime(t,r),this._fade=null;return}let a=new Float32Array(this._curve.length);for(let n=0;n<this._curve.length;n++)a[n]=e+(t-e)*this._curve[n];this._fade={from:a[0],target:t,startTime:r,remaining:i,curve:a},this._scheduleCurve(a,a[0],r,i)}_buildEasingCurve(e){let t=Math.max(2,Math.ceil(e*60)),n=new Float32Array(t);for(let e=0;e<t;e++){let r=e/(t-1);n[e]=(1-Math.cos(Math.PI*r))/2}return n}_scheduleCurve(e,t,n,r){let i=this._gainNode.gain;i.cancelScheduledValues(n),i.setValueAtTime(t,n),i.setValueCurveAtTime(e,n,r)}_sampleIndex(e,t){let n=t-e.startTime,r=Math.max(0,Math.min(1,n/e.remaining));return Math.min(Math.round(r*(e.curve.length-1)),e.curve.length-1)}}class Nn{constructor(e,t,n,r){this._filter=void 0,this._source=void 0,this._defaultGain=void 0,this.frequency=void 0,this.frequency=t,this._source=n,this._defaultGain=r,this._filter=e.createBiquadFilter(),this._filter.type=`peaking`,this._filter.frequency.value=t,this._filter.gain.value=0,this._filter.Q.value=1,this._source.connect(this._filter.gain)}get value(){return this._source.offset.value}get node(){return this._filter}set(e){this._source.offset.value=e}reset(){this.set(this._defaultGain)}dispose(){this._source.disconnect(this._filter.gain)}}class X{constructor(e,t){this.id=`equalizer`,this._inputNode=void 0,this._outputNode=void 0,this._filterMap=new Map,this.equalizer=void 0,this._inputNode=e.createGain(),this._outputNode=e.createGain();let n=Object.entries(t).map(([e,t])=>[Number(e),t]).filter(([e])=>Number.isFinite(e)).sort((e,t)=>e[0]-t[0]),r=X._sources.get(e);T(r)&&(r=new Map,X._sources.set(e,r));for(let[t,i]of n)if(!r.has(t)){let n=e.createConstantSource();n.offset.value=i,n.start(),r.set(t,n)}let i={};for(let[t,a]of n){let n=r.get(t);if(!n)continue;let o=new Nn(e,t,n,a);this._filterMap.set(t,o),i[t]=o}this.equalizer=i,this.rebuild()}get inputNode(){return this._inputNode}get outputNode(){return this._outputNode}resetAll(){for(let e of this._filterMap.values())e.reset()}dispose(){for(let e of this._filterMap.values())e.dispose()}rebuild(){this._inputNode.disconnect();for(let e of this._filterMap.values())e.node.disconnect();this._outputNode.disconnect();let e=this._inputNode;for(let t of this._filterMap.values())e.connect(t.node),e=t.node;e.connect(this._outputNode)}}X._sources=new WeakMap;var Pn=-14;class Fn{constructor(e,t){this.id=`normalizer`,this._compressor=void 0,this._gainNode=void 0,this._compressor=e.createDynamicsCompressor(),this._gainNode=e.createGain(),this.applyConfig(t),this._compressor.connect(this._gainNode)}get inputNode(){return this._compressor}get outputNode(){return this._gainNode}applyConfig(e){if(!Number.isFinite(e.lufs)||!Number.isFinite(e.peak)){this._gainNode.gain.value=1;return}this._compressor.threshold.value=e.peak,this._compressor.knee.value=0,this._compressor.ratio.value=20,this._compressor.attack.value=.003,this._compressor.release.value=.25;let t=(e.targetLufs??Pn)-e.lufs;this._gainNode.gain.value=10**(t/20)}}var In=(e,t)=>{let n=e.length,r=t>=0?t:n+t;return r>=0&&r<n?e[r]:void 0},Ln=(e,t)=>{for(let n=e.length-1;n>=0;n--){let r=e[n];if(t(r,n,e))return r}},Rn=(e,t)=>{for(let n=e.length-1;n>=0;n--)if(t(e[n],n,e))return n;return-1},zn=(e,t=1)=>{let n=[],r=(e,t)=>{for(let i=0;i<e.length;i++){if(!(i in e))continue;let a=e[i];t>0&&Array.isArray(a)?r(a,t-1):n.push(a)}};return r(e,t),n},Bn=(e,t)=>{let n=[];for(let r=0;r<e.length;r++){let i=t(e[r],r,e);if(Array.isArray(i))for(let e=0;e<i.length;e++)n.push(i[e]);else n.push(i)}return n},Vn=(e,t,n=0)=>{let r=e.length,i=n>=0?n:Math.max(r+n,0);for(;i<r;i++){let n=e[i];if(n===t||n!==n&&t!==t)return!0}return!1},Hn=e=>{let t=e.length,n=Array(t);for(let r=0;r<t;r++)n[r]=e[t-1-r];return n},Un=(e,t)=>{let n=e.slice();return t?n.sort(t):n.sort()},Wn=(e,t,n,...r)=>{let i=e.slice();return n===void 0?i.splice(t):i.splice(t,n,...r),i},Gn=(e,t,n)=>{let r=e.length,i=t>=0?t:r+t,a=e.slice();return a[i]=n,a},Kn=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof self<`u`?self:Function(`return this`)(),qn=e=>{let t=[],n=Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r];t.push([i,e[i]])}return t},Jn=e=>{let t={};for(let[n,r]of e)t[n]=r;return t},Yn=Object.prototype.hasOwnProperty,Xn=(e,t)=>Yn.call(e,t),Zn=e=>{let t=Object.keys(e),n=Array(t.length);for(let r=0;r<t.length;r++)n[r]=e[t[r]];return n},Qn=e=>{let t=Array.from(e);return t.length===0?Promise.resolve([]):Promise.all(t.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))},$n=e=>{let t=Array.from(e);return t.length===0?Promise.reject(AggregateError([],`All promises were rejected`)):new Promise((e,n)=>{let r=Array(t.length),i=t.length;t.forEach((t,a)=>{Promise.resolve(t).then(e,e=>{r[a]=e,--i,i===0&&n(AggregateError(r,`All promises were rejected`))})})})},er=(e,t)=>e.then(e=>Promise.resolve(t()).then(()=>e),e=>Promise.resolve(t()).then(()=>{throw e})),tr=e=>{try{return Promise.resolve(e())}catch(e){return Promise.reject(e)}},nr=()=>{let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}},{NativeAbortSignal:rr,NativeAbortController:ir}=function(e){return{NativeAbortSignal:e.AbortSignal,NativeAbortController:e.AbortController}}(typeof self<`u`?self:global);function ar(e){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}}return t.reason=e,t}function or(e){if(e===void 0)if(typeof document>`u`)e=Error(`This operation was aborted`),e.name=`AbortError`;else try{e=new DOMException(`signal is aborted without reason`),Object.defineProperty(e,"name",{value:`AbortError`})}catch{e=Error(`This operation was aborted`),e.name=`AbortError`}return e}class sr{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;let n=this.listeners[e];for(let e=0,r=n.length;e<r;e++)if(n[e].callback===t){n.splice(e,1);return}}dispatchEvent(e){if(!(e.type in this.listeners))return;let t=this.listeners[e.type].slice();for(let n=0,r=t.length;n<r;n++){let r=t[n];try{r.callback.call(this,e)}catch(e){Promise.resolve().then(()=>{throw e})}r.options&&r.options.once&&this.removeEventListener(e.type,r.callback)}return!e.defaultPrevented}}class cr extends sr{constructor(){super(),this.listeners||sr.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)}throwIfAborted(){let{aborted:e,reason:t=`Aborted`}=this;if(e)throw t}static timeout(e){let t=new Z;return setTimeout(()=>t.abort(new DOMException(`This signal is timeout in ${e}ms`,`TimeoutError`)),e),t.signal}static any(e){let t=new Z;function n(){t.abort(this.reason),r()}function r(){for(let t of e)t.removeEventListener(`abort`,n)}for(let r of e)if(r.aborted){t.abort(r.reason);break}else r.addEventListener(`abort`,n);return t.signal}}class Z{constructor(){Object.defineProperty(this,"signal",{value:new cr,writable:!0,configurable:!0})}abort(e){let t=or(e),n=ar(t);this.signal.reason=t,this.signal.dispatchEvent(n)}toString(){return`[object AbortController]`}}typeof Symbol<`u`&&Symbol.toStringTag&&(Z.prototype[Symbol.toStringTag]=`AbortController`,cr.prototype[Symbol.toStringTag]=`AbortSignal`);function lr(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:t,Request:n=t.Request,AbortController:r,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i=!1}=e;if(!lr({fetch:t,Request:n,AbortController:r,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i}))return{fetch:t,Request:a};let a=n;(a&&!a.prototype.hasOwnProperty(`signal`)||i)&&(a=function(e,t){let r;t&&t.signal&&(r=t.signal,delete t.signal);let i=new n(e,t);return r&&Object.defineProperty(i,"signal",{writable:!1,enumerable:!1,configurable:!0,value:r}),i},a.prototype=n.prototype);let o=t;return{fetch:(e,t)=>{let n=a&&a.prototype.isPrototypeOf(e)?e.signal:t?t.signal:void 0;if(n){let r;try{r=new DOMException(`Aborted`,`AbortError`)}catch{r=Error(`Aborted`),r.name=`AbortError`}if(n.aborted)return Promise.reject(r);let i=new Promise((e,t)=>{n.addEventListener(`abort`,()=>t(r),{once:!0})});return t&&t.signal&&delete t.signal,Promise.race([i,o(e,t)])}return o(e,t)},Request:a}}var Q=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window,$=`fetch`in Q&&lr({fetch:Q.fetch,Request:Q.Request,AbortController:Q.AbortController}),dr=$?ur({fetch:Q.fetch,Request:Q.Request,AbortController:Q.AbortController}):void 0,fr=$?dr.fetch:Q.fetch,pr=$?dr.Request:Q.Request,mr=$?Z:Q.AbortController,hr=$?cr:Q.AbortSignal,gr=(e,t)=>{let n=e.length,r=t>=0?t:n+t;if(r<0||r>=n)return;let i=e.charCodeAt(r);if(i>=55296&&i<=56319&&r+1<n){let t=e.charCodeAt(r+1);if(t>=56320&&t<=57343)return e[r]+e[r+1]}return e[r]};function*_r(e,t){let n=t.flags.includes(`g`)?t.flags:t.flags+`g`,r=new RegExp(t.source,n),i;for(;(i=r.exec(e))!==null;)yield i,i[0].length===0&&r.lastIndex++}var vr=(e,t,n=` `)=>{if(n===``||e.length>=t)return e;let r=t-e.length;return e+n.repeat(Math.ceil(r/n.length)).slice(0,r)},yr=(e,t,n=` `)=>{if(n===``||e.length>=t)return e;let r=t-e.length;return n.repeat(Math.ceil(r/n.length)).slice(0,r)+e},br=(e,t,n)=>{if(typeof t==`string`){if(typeof n==`string`)return t===``?n+e.split(``).join(n)+n:e.split(t).join(n);let r=[],i=0,a=e.indexOf(t,i);for(;a!==-1;)r.push(e.slice(i,a)),r.push(n(t,a,e)),i=a+t.length,a=e.indexOf(t,i);return r.push(e.slice(i)),r.join(``)}let r=t.flags.includes(`g`)?t.flags:t.flags+`g`,i=new RegExp(t.source,r);return e.replace(i,n)},xr=e=>e.replace(/^\s+/,``),Sr=e=>e.replace(/\s+$/,``),Cr=xr,wr=Sr,Tr=(e,t)=>typeof e==`string`?gr(e,t):In(e,t),Er=(e,t={})=>{let n=t.timeout||1,r=performance.now();return Q.setTimeout(()=>{e({get didTimeout(){return t.timeout?!1:performance.now()-r-1>n},timeRemaining(){return Math.max(0,1+(performance.now()-r))}})},1)},Dr=e=>Q.clearTimeout(e),Or=e=>typeof e==`function`&&e?.toString().endsWith(`{ [native code] }`),kr=!Or(Q.requestIdleCallback)||!Or(Q.cancelIdleCallback),Ar=kr?Er:Q.requestIdleCallback,jr=kr?Dr:Q.cancelIdleCallback,Mr=(e,t,n)=>typeof e==`string`?e.includes(t,n):Vn(e,t,n),Nr=(e,t,n)=>{if(typeof e.canParse==`function`)return e.canParse(t,n);try{return new e(t,n),!0}catch{return!1}};;return{se,Ye,Xe,Je,Nr,ct,tt,rt,bt,Ft,Xt,xr,wr,Cr,Sr,br,yr,vr,_r,gr,Lt,zt,Pe,Oe,Ar,ke,nr,tr,er,$n,Qn,Nt,Mt,Vt,dt,Zn,Xn,Jn,qn,de,O,b,st,jt,kt,pn,Ut,T,w,Ge,B,V,Wt,We,Ue,ue,Yt,lt,qt,Mr,Kn,E,$e,Qt,Ae,D,Jt,Kt,Zt,Ke,Ne,ft,W,Et,St,et,fr,vn,Ve,nt,_t,Ee,On,ot,H,it,Ht,ne,jr,mt,Tr,Qe,oe,ce,ae,y,le,Gn,Wn,Un,Hn,Vn,Bn,zn,Rn,Ln,In,Ze,je,Me,ge,Mn,He,U,dn,_,cn,he,pt,v,C,pr,at,S,Fn,ie,_n,gn,Dn,q,ln,un,X,G,jn,Y,hr,mr};}();var{se:_oxcMods5l7s3_se,Ye:_oxcMods5l7s3_Ye,Xe:_oxcMods5l7s3_Xe,Je:_oxcMods5l7s3_Je,Nr:_oxcMods5l7s3_Nr,ct:_oxcMods5l7s3_ct,tt:_oxcMods5l7s3_tt,rt:_oxcMods5l7s3_rt,bt:_oxcMods5l7s3_bt,Ft:_oxcMods5l7s3_Ft,Xt:_oxcMods5l7s3_Xt,xr:_oxcMods5l7s3_xr,wr:_oxcMods5l7s3_wr,Cr:_oxcMods5l7s3_Cr,Sr:_oxcMods5l7s3_Sr,br:_oxcMods5l7s3_br,yr:_oxcMods5l7s3_yr,vr:_oxcMods5l7s3_vr,_r:_oxcMods5l7s3__r,gr:_oxcMods5l7s3_gr,Lt:_oxcMods5l7s3_Lt,zt:_oxcMods5l7s3_zt,Pe:_oxcMods5l7s3_Pe,Oe:_oxcMods5l7s3_Oe,Ar:_oxcMods5l7s3_Ar,ke:_oxcMods5l7s3_ke,nr:_oxcMods5l7s3_nr,tr:_oxcMods5l7s3_tr,er:_oxcMods5l7s3_er,$n:_oxcMods5l7s3_$n,Qn:_oxcMods5l7s3_Qn,Nt:_oxcMods5l7s3_Nt,Mt:_oxcMods5l7s3_Mt,Vt:_oxcMods5l7s3_Vt,dt:_oxcMods5l7s3_dt,Zn:_oxcMods5l7s3_Zn,Xn:_oxcMods5l7s3_Xn,Jn:_oxcMods5l7s3_Jn,qn:_oxcMods5l7s3_qn,de:_oxcMods5l7s3_de,O:_oxcMods5l7s3_O,b:_oxcMods5l7s3_b,st:_oxcMods5l7s3_st,jt:_oxcMods5l7s3_jt,kt:_oxcMods5l7s3_kt,pn:_oxcMods5l7s3_pn,Ut:_oxcMods5l7s3_Ut,T:_oxcMods5l7s3_T,w:_oxcMods5l7s3_w,Ge:_oxcMods5l7s3_Ge,B:_oxcMods5l7s3_B,V:_oxcMods5l7s3_V,Wt:_oxcMods5l7s3_Wt,We:_oxcMods5l7s3_We,Ue:_oxcMods5l7s3_Ue,ue:_oxcMods5l7s3_ue,Yt:_oxcMods5l7s3_Yt,lt:_oxcMods5l7s3_lt,qt:_oxcMods5l7s3_qt,Mr:_oxcMods5l7s3_Mr,Kn:_oxcMods5l7s3_Kn,E:_oxcMods5l7s3_E,$e:_oxcMods5l7s3_$e,Qt:_oxcMods5l7s3_Qt,Ae:_oxcMods5l7s3_Ae,D:_oxcMods5l7s3_D,Jt:_oxcMods5l7s3_Jt,Kt:_oxcMods5l7s3_Kt,Zt:_oxcMods5l7s3_Zt,Ke:_oxcMods5l7s3_Ke,Ne:_oxcMods5l7s3_Ne,ft:_oxcMods5l7s3_ft,W:_oxcMods5l7s3_W,Et:_oxcMods5l7s3_Et,St:_oxcMods5l7s3_St,et:_oxcMods5l7s3_et,fr:_oxcMods5l7s3_fr,vn:_oxcMods5l7s3_vn,Ve:_oxcMods5l7s3_Ve,nt:_oxcMods5l7s3_nt,_t:_oxcMods5l7s3__t,Ee:_oxcMods5l7s3_Ee,On:_oxcMods5l7s3_On,ot:_oxcMods5l7s3_ot,H:_oxcMods5l7s3_H,it:_oxcMods5l7s3_it,Ht:_oxcMods5l7s3_Ht,ne:_oxcMods5l7s3_ne,jr:_oxcMods5l7s3_jr,mt:_oxcMods5l7s3_mt,Tr:_oxcMods5l7s3_Tr,Qe:_oxcMods5l7s3_Qe,oe:_oxcMods5l7s3_oe,ce:_oxcMods5l7s3_ce,ae:_oxcMods5l7s3_ae,y:_oxcMods5l7s3_y,le:_oxcMods5l7s3_le,Gn:_oxcMods5l7s3_Gn,Wn:_oxcMods5l7s3_Wn,Un:_oxcMods5l7s3_Un,Hn:_oxcMods5l7s3_Hn,Vn:_oxcMods5l7s3_Vn,Bn:_oxcMods5l7s3_Bn,zn:_oxcMods5l7s3_zn,Rn:_oxcMods5l7s3_Rn,Ln:_oxcMods5l7s3_Ln,In:_oxcMods5l7s3_In,Ze:_oxcMods5l7s3_Ze,je:_oxcMods5l7s3_je,Me:_oxcMods5l7s3_Me,ge:_oxcMods5l7s3_ge,Mn:_oxcMods5l7s3_Mn,He:_oxcMods5l7s3_He,U:_oxcMods5l7s3_U,dn:_oxcMods5l7s3_dn,_:_oxcMods5l7s3__,cn:_oxcMods5l7s3_cn,he:_oxcMods5l7s3_he,pt:_oxcMods5l7s3_pt,v:_oxcMods5l7s3_v,C:_oxcMods5l7s3_C,pr:_oxcMods5l7s3_pr,at:_oxcMods5l7s3_at,S:_oxcMods5l7s3_S,Fn:_oxcMods5l7s3_Fn,ie:_oxcMods5l7s3_ie,_n:_oxcMods5l7s3__n,gn:_oxcMods5l7s3_gn,Dn:_oxcMods5l7s3_Dn,q:_oxcMods5l7s3_q,ln:_oxcMods5l7s3_ln,un:_oxcMods5l7s3_un,X:_oxcMods5l7s3_X,G:_oxcMods5l7s3_G,jn:_oxcMods5l7s3_jn,Y:_oxcMods5l7s3_Y,hr:_oxcMods5l7s3_hr,mr:_oxcMods5l7s3_mr}=_oxcMods5l7s3;export{_oxcMods5l7s3_se as withoutNullable,_oxcMods5l7s3_Ye as videoSizeToQuality,_oxcMods5l7s3_Xe as videoQualityToHeight,_oxcMods5l7s3_Je as videoHeightToQuality,_oxcMods5l7s3_Nr as urlCanParsePolyfilled,_oxcMods5l7s3_ct as timeout,_oxcMods5l7s3_tt as timeCodeToString,_oxcMods5l7s3_rt as throttleFn,_oxcMods5l7s3_bt as throttle,_oxcMods5l7s3_Ft as tap,_oxcMods5l7s3_Xt as suppressAbort,_oxcMods5l7s3_xr as stringTrimStart,_oxcMods5l7s3_wr as stringTrimRight,_oxcMods5l7s3_Cr as stringTrimLeft,_oxcMods5l7s3_Sr as stringTrimEnd,_oxcMods5l7s3_br as stringReplaceAll,_oxcMods5l7s3_yr as stringPadStart,_oxcMods5l7s3_vr as stringPadEnd,_oxcMods5l7s3__r as stringMatchAll,_oxcMods5l7s3_gr as stringAt,_oxcMods5l7s3_Lt as skip,_oxcMods5l7s3_zt as shareReplay,_oxcMods5l7s3_Pe as safeStorage,_oxcMods5l7s3_Oe as retainTimers,_oxcMods5l7s3_Ar as requestIdleCallbackPolyfilled,_oxcMods5l7s3_ke as releaseTimers,_oxcMods5l7s3_nr as promiseWithResolvers,_oxcMods5l7s3_tr as promiseTry,_oxcMods5l7s3_er as promiseFinally,_oxcMods5l7s3_$n as promiseAny,_oxcMods5l7s3_Qn as promiseAllSettled,_oxcMods5l7s3_Nt as pairwise,_oxcMods5l7s3_Mt as once,_oxcMods5l7s3_Vt as observeElementSize,_oxcMods5l7s3_dt as observableFrom,_oxcMods5l7s3_Zn as objectValues,_oxcMods5l7s3_Xn as objectHasOwn,_oxcMods5l7s3_Jn as objectFromEntries,_oxcMods5l7s3_qn as objectEntries,_oxcMods5l7s3_de as nowInt,_oxcMods5l7s3_O as now,_oxcMods5l7s3_b as noop,_oxcMods5l7s3_st as merge,_oxcMods5l7s3_jt as mapTo,_oxcMods5l7s3_kt as map,_oxcMods5l7s3_pn as loadVKLangPack,_oxcMods5l7s3_Ut as isValidURL,_oxcMods5l7s3_T as isNullable,_oxcMods5l7s3_w as isNonNullable,_oxcMods5l7s3_Ge as isLowerOrEqual,_oxcMods5l7s3_B as isLower,_oxcMods5l7s3_V as isInvariantQuality,_oxcMods5l7s3_Wt as isIntersecting,_oxcMods5l7s3_We as isHigherOrEqual,_oxcMods5l7s3_Ue as isHigher,_oxcMods5l7s3_ue as isBrowserWindow,_oxcMods5l7s3_Yt as isAbortError,_oxcMods5l7s3_lt as interval,_oxcMods5l7s3_qt as interpolate,_oxcMods5l7s3_Mr as includesPolyfilled,_oxcMods5l7s3_Kn as globalThisPolyfill,_oxcMods5l7s3_E as getWindow,_oxcMods5l7s3_$e as getVideoQualityLabel,_oxcMods5l7s3_Qt as getTraceSubscriptionMethod,_oxcMods5l7s3_Ae as getTimersDiagnostics,_oxcMods5l7s3_D as getTimerWindow,_oxcMods5l7s3_Jt as getRangeAroundIndex,_oxcMods5l7s3_Kt as getPlayerId,_oxcMods5l7s3_Zt as getMessageFromError,_oxcMods5l7s3_Ke as getHighestQuality,_oxcMods5l7s3_Ne as getExponentialDelay,_oxcMods5l7s3_ft as fromEvent,_oxcMods5l7s3_W as flattenObject,_oxcMods5l7s3_Et as filterChanged,_oxcMods5l7s3_St as filter,_oxcMods5l7s3_et as fillWithDefault,_oxcMods5l7s3_fr as fetchPolyfilled,_oxcMods5l7s3_vn as devNull,_oxcMods5l7s3_Ve as detectEmbed,_oxcMods5l7s3_nt as debounceFn,_oxcMods5l7s3__t as debounce,_oxcMods5l7s3_Ee as createTimers,_oxcMods5l7s3_On as createDIContainer,_oxcMods5l7s3_ot as combine,_oxcMods5l7s3_H as cloneDeepWith,_oxcMods5l7s3_it as cloneDeep,_oxcMods5l7s3_Ht as clearVideoElement,_oxcMods5l7s3_ne as checkNever,_oxcMods5l7s3_jr as cancelIdleCallbackPolyfilled,_oxcMods5l7s3_mt as buffer,_oxcMods5l7s3_Tr as atPolyfilled,_oxcMods5l7s3_Qe as assertQualityIsExact,_oxcMods5l7s3_oe as assertNullable,_oxcMods5l7s3_ce as assertNotEmptyArray,_oxcMods5l7s3_ae as assertNonNullable,_oxcMods5l7s3_y as assertNever,_oxcMods5l7s3_le as assertEmptyArray,_oxcMods5l7s3_Gn as arrayWith,_oxcMods5l7s3_Wn as arrayToSpliced,_oxcMods5l7s3_Un as arrayToSorted,_oxcMods5l7s3_Hn as arrayToReversed,_oxcMods5l7s3_Vn as arrayIncludes,_oxcMods5l7s3_Bn as arrayFlatMap,_oxcMods5l7s3_zn as arrayFlat,_oxcMods5l7s3_Rn as arrayFindLastIndex,_oxcMods5l7s3_Ln as arrayFindLast,_oxcMods5l7s3_In as arrayAt,_oxcMods5l7s3_Ze as areQualitiesExact,_oxcMods5l7s3_je as addScript,_oxcMods5l7s3_Me as abortable,_oxcMods5l7s3_ge as WorkerState,_oxcMods5l7s3_Mn as VolumeFaderPlugin,_oxcMods5l7s3_He as VideoQuality,_oxcMods5l7s3_U as ValueSubject,_oxcMods5l7s3_dn as VKNumericLanguage,_oxcMods5l7s3__ as VERSION,_oxcMods5l7s3_cn as TracerFactory,_oxcMods5l7s3_he as TimerModule,_oxcMods5l7s3_pt as SubscriptionRemovable,_oxcMods5l7s3_v as Subscription,_oxcMods5l7s3_C as Subject,_oxcMods5l7s3_pr as RequestPolyfilled,_oxcMods5l7s3_at as ReplaySubject,_oxcMods5l7s3_S as Observable,_oxcMods5l7s3_Fn as NormalizerPlugin,_oxcMods5l7s3_ie as Logger,_oxcMods5l7s3__n as InternalsExposure,_oxcMods5l7s3_gn as InterfaceLanguage,_oxcMods5l7s3_Dn as InjectionToken,_oxcMods5l7s3_q as INTERNAL_EXPOSE_GLOBAL_KEY,_oxcMods5l7s3_ln as ErrorOrigin,_oxcMods5l7s3_un as ErrorCategory,_oxcMods5l7s3_X as EqualizerPlugin,_oxcMods5l7s3_G as CircularBuffer,_oxcMods5l7s3_jn as AudioGraph,_oxcMods5l7s3_Y as AppTracer,_oxcMods5l7s3_hr as AbortSignalPolyfilled,_oxcMods5l7s3_mr as AbortControllerPolyfilled};
|
|
6
|
+
var _oxcModld2xqi=function(){function e(t){"@babel/helpers - typeof";return e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},e(t)}var t=e;function n(e,n){if(t(e)!=`object`||!e)return e;var r=e[Symbol._oxc_toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(t(i)!=`object`)return i;throw TypeError(`@@_oxc_toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}var t=e,r=n;function i(e){var n=r(e,`string`);return t(n)==`symbol`?n:n+``}var a=i;function o(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=o;function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?c(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function d(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){u(a,r,i,o,s,`next`,e)}function s(e){u(a,r,i,o,s,`throw`,e)}o(void 0)})}}var f=l,p=d;let m;var h=Object.defineProperty,ee=e=>e;function te(e,t){this[e]=ee.bind(null,t)}var g=(e,t)=>{for(var n in t)h(e,n,{get:t[n],enumerable:!0,configurable:!0,set:te.bind(t,n)})},_=`1.0.101-beta.0`;class v{constructor(){this.subscriptions=[]}unsubscribe(){let e=this.subscriptions;this.subscriptions=[],e.forEach(e=>{typeof e==`function`?e():e.unsubscribe()})}add(e){return this.subscriptions.push(e),this}}var y=e=>{throw Error(`${e} is value of unexpected type`)},ne=e=>{},b=()=>{},re=e=>{throw console.error(e),e},x=e=>{console.error(e)};class S{constructor(e){this.suppressErrors=!1,e&&(this._subscribe=e)}setSuppressErrors(e){this.suppressErrors=e}subscribe(e,t){let n=this.suppressErrors?x:re,r;r=t?typeof t==`function`?{next:t,error:b}:{next:e=>t.next(e),error:e=>t.error?.call(t,e)}:{next:n,error:b};let i=typeof e==`function`?{next:t=>{try{let n=e(t);n instanceof Promise&&n.catch(e=>r.next(e))}catch(e){r.next(e)}},error:e=>r.next(e)}:{next:t=>e.next(t),error:t=>e.error?e.error(t):r.next(t)},a;try{a=this._subscribe(i)}catch(e){i.error?.call(i,e)}return new v().add(()=>{switch(i.next=b,i.error=b,typeof a){case`function`:a();return;case`object`:a.unsubscribe();return;case`undefined`:return;default:return y(a)}})}pipe(...e){return e.reduce((e,t)=>t(e),this)}_subscribe(e){}}class C extends S{constructor(){super(),this.keyCounter=0,this.subscribers=new Map}next(e){this.subscribers.forEach(t=>t.next(e))}error(e){this.subscribers.forEach(t=>t.error?.call(t,e))}_subscribe(e){let t=this.keyCounter++;return this.subscribers.set(t,e),new v().add(()=>this.subscribers.delete(t))}}class ie{constructor(){this.log$=new C,this.logs=[],this.log=e=>{let t=f(f({},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{n={message:"error in `createCustomLog`",component:`Logger`}}this.log(n)}}createComponentLog(e){return this.createCustomLog(t=>f({component:e},t))}}function ae(e,t=`Assertion "value is not nullable" failed`){if(e==null)throw Error(t)}function oe(e,t=`Assertion "value is nullable" failed`){if(e!=null)throw Error(t)}function w(e){return e!=null}function T(e){return e==null}var se=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>w(t)));function ce(e,t){if(!e?.length)throw Error(t)}function le(e,t){if(e?.length)throw Error(t)}var E=()=>globalThis,D=()=>globalThis,ue=(e=E())=>!!(e.window&&e.screen),O=typeof E().performance?.now==`function`?()=>E().performance.now():()=>Date.now(),de=()=>Math.trunc(O());function fe(){var e=self,t=new Map;e.onmessage=function(n){var r=n.data;if(r.type===`ping`){e.postMessage({type:`ready`});return}if(r.type===`set`){var i=r.id;r.repeat?t.set(i,{repeat:!0,handle:e.setInterval(function(){e.postMessage({type:`tick`,id:i})},r.delay)}):t.set(i,{repeat:!1,handle:e.setTimeout(function(){t.delete(i),e.postMessage({type:`tick`,id:i})},r.delay)});return}var a=t.get(r.id);a&&(a.repeat?e.clearInterval(a.handle):e.clearTimeout(a.handle),t.delete(r.id))}}var pe=()=>`'use strict';(${fe.toString()})();`;class me{constructor(e,t){this.worker=void 0,this.handlers=void 0,this.records=new Map,this.ticks=0,this.handleMessage=e=>{if(e.data.type===`ready`){this.handlers.onReady();return}let{id:t}=e.data,n=this.records.get(t);T(n)||(this.ticks++,n.repeat||this.records.delete(t),n.callback())},this.handleError=()=>{this.handlers.onFatalError(this.destroy())},this.worker=e,this.handlers=t,this.worker.onmessage=this.handleMessage,this.worker.onerror=this.handleError,this.worker.onmessageerror=this.handleError,this.postCommand({type:`ping`})}static create(e){let t=E();if(typeof t.Worker!=`function`||typeof t.Blob!=`function`||T(t.URL?.createObjectURL))return null;let n=t.URL.createObjectURL(new t.Blob([pe()],{type:`text/javascript`}));try{return new me(new t.Worker(n),e)}catch{return null}finally{t.URL.revokeObjectURL(n)}}get activeCount(){return this.records.size}get deliveredTicks(){return this.ticks}set(e,t,n,r){this.records.set(e,{callback:t,repeat:r,delay:n,startedAt:O()}),this.postCommand({type:`set`,id:e,delay:n,repeat:r})}clear(e){this.records.delete(e)&&this.postCommand({type:`clear`,id:e})}destroy(){let e=new Map(this.records);return this.records.clear(),this.worker.onmessage=null,this.worker.onerror=null,this.worker.onmessageerror=null,this.worker.terminate(),e}postCommand(e){this.worker.postMessage(e)}}var he;(e=>{e.SHARED=`shared`,e.CORE=`core`,e.STATISTICS=`statistics`,e.INTERACTIVE=`interactive`,e.UI=`ui`,e.UI_TV=`ui-tv`})(he||={});var ge;(e=>{e.IDLE=`idle`,e.STARTING=`starting`,e.READY=`ready`,e.FAILED=`failed`})(ge||={});var _e=1,k=0,A=`idle`,j=null,M=new Map,N=new Set,ve=e=>{let t=O();for(let[n,r]of e){let e=r.repeat?r.delay:Math.max(0,r.delay-(t-r.startedAt));Ce(n,r.callback,e,r.repeat)}},ye=e=>{A=`failed`,j=null,ve(e)},be=()=>{T(j)||(ve(j.destroy()),j=null),A=`idle`},xe=()=>{A===`idle`&&(A=`starting`,j=me.create({onReady:()=>{A=`ready`},onFatalError:ye}))},Se=e=>N.has(e)?(xe(),A===`ready`?j:null):null,Ce=(e,t,n,r)=>{let i=D();r?M.set(e,{repeat:!0,nativeId:i.setInterval(t,n)}):M.set(e,{repeat:!1,nativeId:i.setTimeout(()=>{M.delete(e),t()},n)})},we=(e,t,n,r)=>{let i=_e++,a=Se(e);return T(a)?Ce(i,t,n,r):a.set(i,t,n,r),i},Te=e=>{if(T(e))return;let t=M.get(e);if(T(t)){j?.clear(e);return}M.delete(e);let n=D();t.repeat?n.clearInterval(t.nativeId):n.clearTimeout(t.nativeId)},Ee=e=>({setTimeout:(t,n=0)=>we(e,t,n,!1),setInterval:(t,n=0)=>we(e,t,n,!0),clearTimeout:Te,clearInterval:Te}),De=e=>{N.clear(),e.forEach(e=>N.add(e)),N.size===0&&be()},Oe=e=>{k++,De(e)},ke=()=>{k!==0&&(k--,k===0&&De([]))},Ae=()=>({workerModules:[...N],workerState:A,liveConsumers:k,activeWindowTimers:M.size,activeWorkerTimers:j?.activeCount??0,workerTicks:j?.deliveredTicks??0}),P=Ee(`shared`),je=(e,t,n)=>new Promise((r,i)=>{t.addEventListener(`abort`,()=>{s(),l.remove()});let a=()=>{s(),i(`error`)},o=()=>{s(),r()},s=()=>{c&&P.clearTimeout(c),l.removeEventListener(`load`,o),l.removeEventListener(`error`,a)},c;n&&(c=P.setTimeout(()=>{s(),i(`timeout`)},n));let l=document.createElement(`script`);l.addEventListener(`load`,o),l.addEventListener(`error`,a),l.src=e,document.head.appendChild(l)}),Me=(e,t)=>p(function*(...n){let r=t(...n),i=e.aborted,a;for(;!i&&!e.aborted;)try{let e=yield r.next(a);i=e.done??!1,a=e.value}catch(e){yield r.throw(e)}return a}),Ne=(e,{start:t=0,factor:n=2,max:r=1/0,min:i=t,random:a=0}={})=>{let o=t;return o*=n**+e,o*=1+(Math.random()*a*2-a),o=Math.round(o),o=Math.min(o,r),o=Math.max(o,i),o},Pe={};g(Pe,{set:()=>Le,remove:()=>ze,isPersistent:()=>Fe,has:()=>Re,get:()=>Ie,clear:()=>Be});var F,I,L=`vk-videoplayer-dummy-key-${Math.random()}`,R=()=>{if(I!==void 0)return I;try{localStorage.setItem(L,`test`),localStorage.removeItem(L),I=0}catch(e){if(e instanceof DOMException||e instanceof TypeError)try{sessionStorage.getItem(L),I=1}catch(e){if(e instanceof DOMException||e instanceof TypeError)I=2;else throw e}else throw e}return I===2&&(F=new Map),I},Fe=()=>R()===0,Ie=e=>{let t=R();switch(t){case 0:return localStorage.getItem(e)??void 0;case 1:return sessionStorage.getItem(e)??void 0;case 2:return F?.get(e);default:y(t)}},Le=(e,t)=>{let n=R();switch(n){case 0:try{localStorage.setItem(e,t)}catch(e){if(e instanceof DOMException)console.error(e);else throw e}break;case 1:try{sessionStorage.setItem(e,t)}catch(e){if(e instanceof DOMException)console.error(e);else throw e}break;case 2:F?.set(e,t);return;default:y(n)}},Re=e=>{let t=R();switch(t){case 0:return e in localStorage;case 1:return e in sessionStorage;case 2:return F?.has(e)??!1;default:return y(t),!1}},ze=e=>{let t=R();switch(t){case 0:return localStorage.removeItem(e);case 1:return sessionStorage.removeItem(e);case 2:F?.delete(e);return;default:y(t)}},Be=()=>{let e=R();switch(e){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return F?.clear();default:y(e)}},Ve=()=>{let e,t=[],n=E();try{e=n.self!==n.top}catch(t){t instanceof DOMException&&t.name===`SecurityError`?e=!0:(e=!1,console.error(t))}try{n.location?.ancestorOrigins&&(t=[...n.location.ancestorOrigins])}catch(e){console.error(e)}try{!t.length&&n.document.referrer&&(t=[new URL(n.document.referrer).origin])}catch(e){console.error(e)}return t=t.filter(e=>URL.canParse(e)),{isEmbed:e,origins:t,topOrigin:t.at(-1),immediateOrigin:t.at(0)}},He;(e=>{e.INVARIANT=`Invariant quality`,e.Q_144P=`144p`,e.Q_240P=`240p`,e.Q_360P=`360p`,e.Q_480P=`480p`,e.Q_576P=`576p`,e.Q_720P=`720p`,e.Q_1080P=`1080p`,e.Q_1440P=`1440p`,e.Q_2160P=`2160p`,e.Q_4320P=`4320p`})(He||={});var z={"144p":{width:256,height:144},"240p":{width:428,height:240},"360p":{width:640,height:360},"480p":{width:856,height:480},"576p":{width:1024,height:576},"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}},Ue=(e,t)=>z[e].height>z[t].height,We=(e,t)=>z[e].height>=z[t].height,B=(e,t)=>z[e].height<z[t].height,Ge=(e,t)=>z[e].height<=z[t].height,Ke=e=>e.sort((e,t)=>e===t?0:e===`Invariant quality`?1:t===`Invariant quality`?-1:B(e,t)?1:-1)[0],qe=Object.keys(z).sort((e,t)=>B(e,t)?-1:1),Je=(e,t=.02)=>[...qe].find(n=>z[n].height*(1+t)>=e),Ye=({width:e,height:t})=>{let n=Math.min(e,t),r=Math.max(e,t);return qe.find(e=>{let t=z[e];return t.width>=r&&t.height>=n})},Xe=e=>z[e].height,V=e=>e===`Invariant quality`,Ze=e=>e.every(e=>!V(e));function Qe(e){if(V(e))throw Error(`Expected exact quality`)}var $e=e=>{switch(e){case`4320p`:return`8K`;case`2160p`:return`4K`;case`1440p`:return`QHD`;case`1080p`:return`FHD`;case`720p`:return`HD`;default:return``}},et=(e,t)=>{let n={};for(let r of Object.keys(t)){let i=t[r],a=e[r];Array.isArray(i)?n[r]=Array.isArray(a)?a:i:typeof i==`object`&&i?typeof a==`object`&&a&&!Array.isArray(a)?n[r]=et(a,i):n[r]=a??i:n[r]=r in e?a:i}return n},tt=e=>{let t=``;return e>=3600&&(t+=Math.floor(e/3600)+`h`,e%=3600),e>=60&&(t+=Math.floor(e/60)+`m`,e%=60),e>0&&(t+=Math.floor(e)+`s`),t};function nt(e,t=0,n){let r,i,a,o,s,c,l=0,u=!1,d=!1,f=!0,p=!t&&t!==0&&typeof E().requestAnimationFrame==`function`;n&&(u=!!n.leading,d=`maxWait`in n,a=n?.maxWait?Math.max(+n?.maxWait||0,t):a,f=`trailing`in n?!!n.trailing:f);function m(t){let n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o}function h(e,t){return p?(s&&E().cancelAnimationFrame(s),E().requestAnimationFrame(e)):P.setTimeout(e,t)}function ee(e){if(p){E().cancelAnimationFrame(e);return}P.clearTimeout(e)}function te(e){return l=e,s=h(v,t),u?m(e):o}function g(e){let n=e-c,r=e-l,i=t-n;return d?Math.min(i,a-r):i}function _(e){let n=e-c,r=e-l;return c===void 0||n>=t||n<0||d&&r>=a}function v(){let e=Date.now();if(_(e))return y(e);s=h(v,g(e))}function y(e){return s=void 0,f&&r?m(e):(r=i=void 0,o)}function ne(){s!==void 0&&ee(s),l=0,r=c=i=s=void 0}function b(){return s===void 0?o:y(Date.now())}function re(){return s!==void 0}function x(...e){let n=Date.now(),a=_(n);if(r=e,i=this,c=n,a){if(s===void 0)return te(c);if(d)return s=h(v,t),m(c)}return s===void 0&&(s=h(v,t)),o}return x.cancel=ne,x.flush=b,x.pending=re,x}var rt=(e,t=0,n)=>nt(e,t,f(f(f({},{leading:!0,trailing:!0}),n),{},{maxWait:t})),H=(e,t)=>{if(typeof e!=`object`||!e)return e;let n=Array.isArray(e)?[]:{};for(let r in e){if(typeof t==`function`){let i=t(e[r],r,e,n);if(i!==void 0){n[r]=i;continue}}typeof e[r]==`object`?n[r]=H(e[r],t):n[r]=e[r]}return n},it=e=>H(e);class at extends C{constructor(e){super(),this.bufferSize=void 0,this.buffer=[],this.cursorEnd=-1,this.cursorStart=0,this.bufferSize=e,this.buffer=Array(e)}next(e){this.cursorEnd+=1,this.cursorStart=this.cursorEnd>=this.bufferSize?this.cursorStart+1:0,this.buffer[this.cursorEnd%this.bufferSize]=e,this.subscribers.forEach(t=>t.next(e))}_subscribe(e){for(let t=this.cursorStart;t<=this.cursorEnd;t++)e.next(this.buffer[t%this.bufferSize]);let t=this.keyCounter++;return this.subscribers.set(t,e),new v().add(()=>this.subscribers.delete(t))}}class U extends C{constructor(e){super(),this.value=void 0,this.value=e}next(e){super.next(this.value=e)}error(e){super.error(this.value=e)}getValue(){return this.value}_subscribe(e){let t=super._subscribe(e);return e.next(this.value),t}}function ot(e){return new S(t=>{let n={},r=Object.keys(e).length,i=e=>i=>{e in n||r--,n[e]=i,r===0&&t.next(n)};return Object.entries(e).reduce((e,[t,n])=>e.add(n.subscribe(i(t))),new v)})}function st(...e){return new S(t=>e.reduce((e,n)=>e.add(n.subscribe(t)),new v))}var ct=e=>new S(t=>{let n=P.setTimeout(()=>{try{t.next()}catch(e){if(t.error)t.error(e);else throw e}},e);return()=>P.clearTimeout(n)}),lt=e=>new S(t=>{let n=P.setInterval(()=>t.next(),e);return()=>{n&&=(P.clearInterval(n),void 0)}});function ut(e){return new S(t=>{if(e instanceof Promise){let n=!1;return e.then(e=>{n||t.next(e)}).catch(e=>{n||t.error?.call(t,e)}),()=>{n=!0}}for(let n=0;n<e.length;n++)t.next(e[n])})}var dt=ut,ft=(e,t)=>new S(n=>{let r=e=>n.next(e);return e.addEventListener(t,r),()=>e.removeEventListener(t,r)});class pt extends v{remove(e){this.subscriptions=this.subscriptions.filter(t=>t!==e)}}function mt(e){return new S(t=>{let n=Array(e.length),r=e=>r=>{n[e]=r,t.next([...n])};return e.reduce((e,t,n)=>e.add(t.subscribe(r(n))),new v)})}function ht(e){return t=>new S(n=>t.subscribe(new gt(n,e)))}class gt{constructor(e,t){this.destination=void 0,this.size=void 0,this.lastValues=[],this.destination=e,this.size=t}next(e){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(e),this.destination.next(this.lastValues)}error(e){var t;(t=this.destination).error?.call(t,e)}}var _t={leading:!1,trailing:!0};function vt(e,t=_t){return n=>new S(r=>n.subscribe(new yt(r,e,t)))}class yt{constructor(e,t,n){this.destination=void 0,this.time=void 0,this.config=void 0,this.lastValue=void 0,this.timeout=void 0,this.destination=e,this.time=t,this.config=n}next(e){this.lastValue=e,w(this.timeout)?P.clearTimeout(this.timeout):this.config.leading&&this.destination.next(e),this.timeout=P.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(e){if(this.destination.error)this.destination.error(e);else throw e}this.timeout=void 0},this.time)}error(e){var t;(t=this.destination).error?.call(t,e)}}var bt={leading:!0,trailing:!1};function xt(e,t=bt){return n=>new S(r=>n.subscribe(new St(r,e,t)))}class St{constructor(e,t,n){this.destination=void 0,this.time=void 0,this.config=void 0,this.lastValue=void 0,this.timeout=void 0,this.destination=e,this.time=t,this.config=n}next(e){this.lastValue=e,T(this.timeout)&&(this.config.leading&&this.destination.next(e),this.timeout=P.setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(e){var t;(t=this.destination).error?.call(t,e)}}function Ct(e){return t=>new S(n=>t.subscribe(new wt(n,e)))}class wt{constructor(e,t){this.destination=void 0,this.predicate=void 0,this.destination=e,this.predicate=t}next(e){let t;try{t=this.predicate(e)}catch(e){throw this.error(e),e}t&&this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}var Tt=(e,t)=>{let n=(e,t)=>{let n=Object.keys(e);for(let r in t)if(!n.includes(r)||t[r]!==e[r])return!1;return!0};return n(e,t)&&n(t,e)},Et=(e,t)=>e instanceof Object&&t instanceof Object?Tt(e,t):e===t;function Dt(e=Et){return t=>new S(n=>t.subscribe(new kt(n,e)))}var Ot={};class kt{constructor(e,t){this.destination=void 0,this.predicate=void 0,this.lastValue=Ot,this.destination=e,this.predicate=t}next(e){let t;try{t=this.lastValue===Ot||!this.predicate(this.lastValue,e),this.lastValue=e instanceof Object&&!Array.isArray(e)?f({},e):e}catch(e){throw this.error(e),e}t&&this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}function At(e){return t=>new S(n=>t.subscribe(new jt(n,e)))}class jt{constructor(e,t){this.destination=void 0,this.mapper=void 0,this.destination=e,this.mapper=t}next(e){let t;try{t=this.mapper(e)}catch(e){throw this.error(e),e}this.destination.next(t)}error(e){var t;(t=this.destination).error?.call(t,e)}}function Mt(e){return At(()=>e)}function Nt(){return e=>new S(t=>{let n=!1,r=!1,i=e.subscribe(e=>{n||(n=!0,t.next(e)),r&&i.unsubscribe()},e=>{n=!0,t.error?.call(t,e),r&&i.unsubscribe()});return r=!0,n&&i.unsubscribe(),i})}function Pt(){return e=>new S(t=>e.subscribe(new Ft(t)))}class Ft{constructor(e){this.destination=void 0,this.last=void 0,this.hasLast=!1,this.destination=e}next(e){let t=this.last;if(this.last=e,!this.hasLast){this.hasLast=!0;return}this.destination.next([t,e])}error(e){var t;(t=this.destination).error?.call(t,e)}}function It(e){return t=>new S(n=>t.subscribe(new Lt(n,e)))}class Lt{constructor(e,t){this.destination=void 0,this.effect=void 0,this.destination=e,this.effect=t}next(e){try{this.effect(e)}catch(e){throw this.error(e),e}this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}function Rt(e){return t=>new S(n=>t.subscribe(new zt(n,e)))}class zt{constructor(e,t){if(this.destination=void 0,this.count=void 0,this.destination=e,this.count=t,t<0){var n;(n=this.destination).error?.call(n,Error(`Count can not be less than zero`))}}next(e){this.count===0?this.destination.next(e):this.count--}error(e){var t;(t=this.destination).error?.call(t,e)}}function Bt(e=0){return t=>{let n=0,r=new at(e),i=t.subscribe(r),a=e=>()=>{e.unsubscribe(),n--,n===0&&i.unsubscribe()};return new S(e=>(n++,a(r.subscribe(e))))}}var Vt=300,Ht=(e,t=Vt)=>new S(n=>{let r=E(),{width:i,height:a}=e.getBoundingClientRect();if(n.next({width:i,height:a}),!ue(r))return;let o=new r.ResizeObserver(rt(e=>{let t=e[0];if(!t)return;let r,i;t.contentBoxSize&&t.contentBoxSize[0]?(i=t.contentBoxSize[0].blockSize,r=t.contentBoxSize[0].inlineSize):t.contentRect&&(r=t.contentRect.width,i=t.contentRect.height),w(r)&&w(i)&&n.next({width:r,height:i})},t));return o.observe(e),()=>o.disconnect()}),W=(e,t=6,n=`.`)=>{let r={};for(let i in e)if(!(!e.hasOwnProperty(i)||e[i]instanceof HTMLElement||!t))if(typeof e[i]==`object`&&e[i]!==null){let a=W(e[i],t-1);for(let e in a)a.hasOwnProperty(e)&&(r[i+n+e]=a[e])}else r[i]=e[i];return r},Ut=e=>{e.innerHTML=``,e.removeAttribute(`src`),e.load()},Wt=e=>{let t;try{t=new URL(e)}catch{return!1}return t.protocol===`https:`},Gt=(e,t)=>!(e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom),Kt=(()=>{let e=0;return()=>{let t=e;return e=(e+1)%(2**53-1),t}})(),qt=e=>e!==void 0&&e!==``?e:Kt().toString();function Jt(e,t,n){if(e<=t[0])return n[0];if(e>=t[t.length-1])return n[n.length-1];let r=1;for(;r<t.length&&t[r]<e;)r++;r>=t.length&&(r=t.length-1);let i=t[r-1],a=t[r],o=n[r-1],s=n[r];return e===i?o:e===a?s:o+(e-i)/(a-i)*(s-o)}function Yt(e,t,n){if(e<=0||n<0)return[];let r=[],i=Math.floor((e-1)/2),a=Math.floor(e/2),o=t-i,s=t+a;o<0&&(s+=Math.abs(o),o=0),s>n&&(o-=s-n,s=n),o=Math.max(0,o),s=Math.min(n,s);for(let e=o;e<=s;e++)r.push(e);return r}var Xt=e=>e instanceof DOMException&&(e.name===`AbortError`||e.code===20),Zt=e=>{if(!Xt(e))throw e};function Qt(e){if(e&&typeof e==`object`){if(`message`in e)return String(e.message);try{return JSON.stringify(e)}catch{return`object serialization error`}}return String(e)}m=Symbol.iterator;class G{constructor(e){if(this.buffer=void 0,this.writeIndex=0,this.count=0,this.capacity=void 0,e<=0)throw Error(`Capacity must be greater than 0`);this.capacity=e,this.buffer=Array.from({length:e}).fill(null)}add(e){this.buffer[this.writeIndex]=e,this.writeIndex=(this.writeIndex+1)%this.capacity,this.count<this.capacity&&this.count++}*[m](){if(this.count===0)return;let e=this.count<this.capacity?0:this.writeIndex;for(let t=0;t<this.count;t++){let t=this.buffer[e];w(t)&&(yield t),e=(e+1)%this.capacity}}clear(){this.buffer.fill(null),this.writeIndex=0,this.count=0}get size(){return this.count}get maxCapacity(){return this.capacity}}var $t=e=>(t,n=!1)=>r=>{let i=typeof r==`object`;r==null||i&&!Object.keys(r).length||e(t,i?W(r):{value:r},n)},en=(e={})=>{let t=e=>{let t=e;return e===void 0?t=`undefined`:e===null?t=`null`:(typeof e==`number`||typeof e==`boolean`)&&(t=e.toString()),t},n={};for(let r in e)Array.isArray(e[r])?n[r]=e[r].map(t):n[r]=t(e[r]);return n};class K{constructor({name:e,getParentContext:t,getRootTracerContext:n,options:r}){this.dynamicImportTimeout=5e3,this.subscription=new v,this.options=void 0,this.span=void 0,this.context=void 0,this.childTracers=[],this.initPromise=void 0,this.getRootTracerContext=void 0,this.eventsBuffer=null,this.options=r??{};let{tracerEventsBufferSize:i}=this.options;w(i)&&i>0&&(this.eventsBuffer=new G(i)),K.dynamicImportStatus===`not_started`&&(K.dynamicImportPromise=this.loadOpentelemetry());let a=Date.now();this.initPromise=K.dynamicImportPromise.then(r=>{K.dynamicImportStatus===`completed`&&this.init({name:e,getParentContext:t,getRootTracerContext:n},a)})}init({name:e,getParentContext:t,getRootTracerContext:n},r){let i=n?.();if(T(i))return;let{opentelemetryApi:a}=K.dynamicImports,{context:o,trace:s}=a,{tracer:c,attributes$:l}=i;this.span=c.startSpan(e,{startTime:r},t?.()),this.context=s.setSpan(o.active(),this.span),this.getRootTracerContext=n,this.subscription.add(l.subscribe(e=>{w(e)&&this.span.setAttributes(e)}))}loadOpentelemetry(){var e=this;return p(function*(){if(K.dynamicImportStatus===`not_started`){K.dynamicImportStatus=`in_progress`;try{let t=new Promise((t,n)=>P.setTimeout(n,e.dynamicImportTimeout)),n=Promise.all([import(`@opentelemetry/api`),import(`@opentelemetry/sdk-trace-web`),import(`@apptracer/opentelemetry`),import(`@opentelemetry/resources`),import(`@opentelemetry/semantic-conventions`)]),[r,i,a,o,s]=yield Promise.race([n,t]);K.dynamicImports={opentelemetryApi:r,opentelemetrySdk:i,tracer:a,opentelemetryResources:o,opentelemetrySemanticConventions:s},K.dynamicImportStatus=`completed`}catch{K.dynamicImportStatus=`failed`}}})()}isComponentTracerNotInitialized(){return T(this.span)||K.dynamicImportStatus===`failed`}addEventToBuffer(e,t,n,r){w(this.eventsBuffer)&&this.eventsBuffer.add({name:e,attributes:t,type:n,timestamp:r})}addEventToSpan(e,t,n,r){this.span.addEvent(e,f(f({},en(t)),{},{type:n}),r)}log(e,t,n=!1){let r=Date.now();n?this.initPromise.then(n=>{this.isComponentTracerNotInitialized()||this.addEventToSpan(e,t,`log`,r)}):this.addEventToBuffer(e,t,`log`,r)}error(e,t,n=!1){let r=Date.now();n?this.initPromise.then(n=>{this.isComponentTracerNotInitialized()||this.addEventToSpan(e,t,`error`,r)}):this.addEventToBuffer(e,t,`error`,r)}critical(e,t,n=!1){let r=Date.now();n?this.initPromise.then(n=>{this.isComponentTracerNotInitialized()||this.addEventToSpan(e,t,`critical`,r)}):this.addEventToBuffer(e,t,`critical`,r)}createComponentTracer(e){let t=new K({name:e,getParentContext:()=>this.context,getRootTracerContext:()=>this.getRootTracerContext?.call(this),options:this.options});return this.childTracers.push(t),t}setSpanAttributes(e){this.initPromise.then(t=>{this.isComponentTracerNotInitialized()||this.span.setAttributes(en(e))})}end(){this.initPromise.then(e=>{if(!this.isComponentTracerNotInitialized()){if(w(this.eventsBuffer))for(let e of this.eventsBuffer)this.addEventToSpan(e.name,e.attributes,e.type,e.timestamp);this.childTracers.forEach(e=>e.end()),this.span.end(),this.subscription.unsubscribe()}})}pause(){var e;(e=this.getRootTracerContext)==null||(e=e.call(this))==null||e.paused$.next(!0)}resume(){var e;(e=this.getRootTracerContext)==null||(e=e.call(this))==null||e.paused$.next(!1)}}K.dynamicImportStatus=`not_started`,K.dynamicImports=void 0,K.dynamicImportPromise=void 0;var tn=`gW5EerTD5QhAnsbpF7Hd2NSMRteYIUUMjFbSyI68Pf5`,nn=e=>{class t extends e{constructor(e,t){super(e,t),this._isPaused=!1,this._pausedSpans=void 0,this.maxExportBatchSize=void 0,this.maxQueueSize=void 0,this.maxQueueSize=t?.maxQueueSize??2048,this.maxExportBatchSize=t?.maxExportBatchSize??512,this._pausedSpans=new G(this.maxQueueSize)}pause(){this._isPaused=!0}resume(){var e=()=>super.onEnd,t=this;return p(function*(){if(!t._isPaused)return;t._isPaused=!1;let n=t._pausedSpans;t._pausedSpans=new G(t.maxQueueSize);let r=0;for(let i of n)e().call(t,i),r+=1,r>=t.maxExportBatchSize&&(yield new Promise(e=>P.setTimeout(()=>e(void 0),0)),r=0);n.clear(),yield t.forceFlush()})()}onEnd(e){if(this._isPaused){this._pausedSpans.add(e);return}super.onEnd(e)}}return t};class rn extends K{constructor(e){super({name:`Root`,options:e}),this.attributes$=new U(null),this.paused$=new U(!1),this.paused$.next(!!this.options.tracerPausedAtInit)}init({name:e,getParentContext:t},n){let{tracer:r,opentelemetryResources:i,opentelemetrySdk:a,opentelemetrySemanticConventions:o}=K.dynamicImports,{TracerUploadSpanExporter:s}=r,{WebTracerProvider:c,BatchSpanProcessor:l}=a,{resourceFromAttributes:u}=i,{ATTR_SERVICE_NAME:d,ATTR_SERVICE_VERSION:f}=o,p=new(nn(l))(new s({appToken:tn}));this.subscription.add(this.paused$.subscribe(e=>{e?p.pause():p.resume()}));let m=new c({resource:u({[d]:`videoplayer-sdk-web`,[f]:_}),spanLimits:{attributeCountLimit:1/0,eventCountLimit:1/0,attributePerEventCountLimit:1/0},spanProcessors:[p]});m.register();let h=m.getTracer(`sdk-videoplayer-tracer`);super.init({name:e,getParentContext:t,getRootTracerContext:()=>({tracer:h,attributes$:this.attributes$,paused$:this.paused$})},n)}getTraceId(){return this.isComponentTracerNotInitialized()?``:this.span.spanContext().traceId}setSpanAttributes(e){this.attributes$.next(f(f({},this.attributes$.getValue()),en(e)))}addSubscription(e){this.subscription.add(e)}}class an{constructor(e){this.fakeTraceId=void 0}log(e,t,n){}error(e,t,n){}critical(e,t,n){}createComponentTracer(e){return new an({name:e})}end(){}getTraceId(){return this.fakeTraceId}addSubscription(e){}setSpanAttributes(e){}pause(){}resume(){}}var on=()=>!0,sn={level:0,filter:on,name:`Noname Tracer`,outputMethod:`log`};class cn{constructor({name:e,level:t,filter:n,outputMethod:r}={}){this.name=void 0,this.filter=on,this.level=sn.level,this.outputMethod=sn.outputMethod,this.childTracers=[],this.filter=n??this.filter,this.level=t??this.level,this.outputMethod=r??this.outputMethod,this.name=e??sn.name}log(e,t,n){this.logDebug(e,t)}error(e,t,n){this.logError(e,t)}critical(e,t,n){this.logError(e,t)}createComponentTracer(e){let t=new cn({filter:this.filter,level:this.level,name:`${this.name}/ ${e}`,outputMethod:this.outputMethod});return this.childTracers.push(t),t}end(){this.childTracers.forEach(e=>e.end()),this.childTracers=[]}setLevel(e){this.level=e,this.childTracers.forEach(t=>t.setLevel(e))}setOtputMethod(e){this.outputMethod=e,this.childTracers.forEach(t=>t.setOtputMethod(e))}setFilter(e){this.filter=e,this.childTracers.forEach(t=>t.setFilter(e))}getFinishedSpans(){}getTraceId(){return`debug_trace`}get verbose(){return this.level===0}createMessage(e,t){return[this.name,e,JSON.stringify(t)].join(`: `)}logDebug(e,t){!this.verbose||!this.filter(e,t)||E().console[this.outputMethod](this.createMessage(e,t))}logError(e,t){this.filter(e,t)&&E().console.error(this.createMessage(e,t))}addSubscription(e){}setSpanAttributes(e){}pause(){}resume(){}}class ln{static createRootTracer(e=`fake`,t){switch(e){case`real`:return new rn(t);case`debug`:return new cn;default:return new an}}}var un;(e=>{e.MediaError=`mediaError`,e.SegmentFetcher=`segment_fetcher`,e.SegmentAppend=`segment_append`,e.Hangup=`hangup`,e.Stall=`stall`})(un||={});var dn;(e=>{e.NETWORK=`network`,e.VIDEO_PIPELINE=`video_pipeline`,e.EXTERNAL_API=`external_api`,e.PARSER=`parser`,e.DOM=`dom`,e.WTF=`wtf`,e.UI=`ui`,e.CALL_FROM_EXTERNAL=`call_from_external`,e.FATAL=`fatal`})(dn||={});var fn;(e=>{e.Armenian=`58`,e.Azerbaijani=`57`,e.Belarusian=`114`,e.English=`3`,e.Kazakh=`97`,e.Portuguese=`73`,e.Russian=`0`,e.Spanish=`4`,e.Ukrainian=`1`,e.Uzbek=`65`,e.Vietnamese=`75`})(fn||={});var pn=`vk.ru`,mn=function(){var e=p(function*(e,t,n){let r=new URL(`https://${pn}/js/lang-pack.js`);return r.searchParams.set(`format`,`json`),r.searchParams.set(`name`,t),e!==void 0&&r.searchParams.set(`lang`,e),hn(yield(yield fetch(r.toString())).json(),n)});return function(t,n,r){return e.apply(this,arguments)}}(),hn=(e,t)=>Object.fromEntries(Object.entries(e.keys).map(([e,n])=>[e.substring(`${t}_`.length),gn(n)])),gn=e=>Array.isArray(e)?e[0]:e,_n;(e=>{e.RU=`ru`,e.EN=`en`})(_n||={});var q=`__vk_vp_internals_exposure`;class vn{constructor(e,t){this.playerId=void 0,this.type=void 0,this.playerId=t,this.type=e,this.initWindowObjects()}getWindowObject(){var e;if(typeof window>`u`)return{};let t=this.playerId,n=this.type;return((e=window[q])==null||(e=e[t])==null?void 0:e[n])??{}}initWindowObjects(){if(typeof window>`u`)return;let e=this.playerId,t=this.type;window[q]||(window[q]={}),window[q][e]||(window[q][e]={}),window[q][e][t]||(window[q][e][t]={})}expose(e){typeof window>`u`||Object.assign(this.getWindowObject(),e)}destroy(){if(typeof window>`u`)return;let e=this.playerId,t=this.type;window[q]&&window[q][e]&&window[q][e][t]&&(delete window[q][e][t],Object.keys(window[q][e]).length||delete window[q][e],Object.keys(window[q]).length||delete window[q])}}var yn={};g(yn,{subscribe:()=>Cn,push:()=>Sn,destroy:()=>xn,create:()=>bn});var J=new Map,bn=(e,t)=>J.set(e,t??[]),xn=e=>J.delete(e),Sn=(e,t)=>{let n=J.get(e);n&&(typeof n==`function`?n(t):n.push(t))},Cn=(e,t)=>{let n=J.get(e);if(n){if(n&&Array.isArray(n))for(let e of n)t(e);J.set(e,t)}},wn=e=>se({id:e.id,message:e.message,category:e.category,data:Tn(e.data),httpCode:e.httpCode,UVBackendErrorCode:e.UVBackendErrorCode});function Tn(e){switch(typeof e){case`boolean`:case`string`:case`number`:return e;case`object`:try{return JSON.stringify(e)}catch{return}default:return}}var En=e=>{let t=e.thrown instanceof Error?e.thrown:Error(e.message),n=e.id.length>10240?e.id.substring(0,10240):e.id;try{t.name=n}catch{t=Error(e.message),t.name=n}return t},Dn=()=>{try{var e;let{origin:t,pathname:n,search:r,hostname:i}=((e=E())==null||(e=e.document)==null?void 0:e.location)??{};return!i||i===`localhost`?void 0:f({url:t+n},new URLSearchParams(r).entries().reduce((e,[t,n])=>(e[`url.${t}`]=n,e),{}))}catch{}};class Y{constructor(e,t,n,r){this.dynamicImportTimeout=5e3,this.componentName=void 0,this.subscription=new v,this.options=void 0,this.envParams=void 0,this.context=void 0,this.beforeInitLogs=[],this.isEmbed=void 0,this.embedParent=void 0,this.beforeInitErrors=[],this.componentName=e,this.options=t,this.envParams=n,this.context=f({},r);let{isEmbed:i,topOrigin:a}=Ve();this.isEmbed=i,this.embedParent=a?new URL(a).hostname:void 0,this.options.enabled&&(this.loadModule(),this.init())}updateContext(e){Object.assign(this.context,e)}log(e){let t=Y.tracerModulesMap.get(this.componentName)?.log;if(T(t)){this.beforeInitLogs.push(e);return}t.log(e)}error(e,t){let n=Y.tracerModulesMap.get(this.componentName)?.error;if(!n){this.beforeInitErrors.push([e,t]);return}let{blackErrorCategoryList:r,blackErrorIdList:i,sampleRate:a,whiteErrorCategoryList:o,whiteErrorIdList:s}=this.options,{id:c,category:l}=e;if(!(r.length&&r.includes(l)||i.length&&i.includes(c)||o.length&&!o.includes(l)||s.length&&!s.includes(c)||Math.random()>=a))try{let r=En(e);n?.error(r,f(f({crashIdSource:t?.crashIdSource??r.name,severity:t?.severity??(e.traceAsLog?`debug`:void 0)},t?.issueKey?{issueKey:t.issueKey}:{}),{},{keys:f(f(f(f({},this.context),wn(e)),Dn()),this.isEmbed&&this.embedParent&&{iframe_host:this.embedParent})}))}catch(e){console.error(e)}}addSubscription(e){this.subscription.add(e)}destroy(){this.subscription.unsubscribe()}init(){var e=this;return p(function*(){try{if(yield Y.loadPromise,T(Y.appTracerModule))return;let{appTracerModule:t}=Y,{initTracerError:n,initTracerErrorUploader:r,getTracerModules:i,initTracerLog:a}=t,o=Y.tracerModulesMap.get(e.componentName)??i(e.componentName),s=o.log??a(e.componentName),c=o.error??n(e.componentName,{enableUnhandledErrorsListeners:!1,stringifyErrorDataObject:!0});Y.tracerModulesMap.set(e.componentName,{error:c,log:s}),e.beforeInitLogs.forEach(t=>e.log(t)),e.beforeInitLogs=[],w(e.options.userId)&&c.setUserId(e.options.userId),T(o.error)&&r(e.componentName,{appToken:tn,environment:e.envParams.env,versionCode:1,versionName:e.envParams.version}),e.beforeInitErrors.forEach(t=>e.error.apply(e,t)),e.beforeInitErrors=[]}catch(e){console.error(e)}})()}loadModule(){var e=this;w(Y.loadPromise)||(Y.loadPromise=function(){var t=p(function*(){try{let t=new Promise((t,n)=>P.setTimeout(n,e.dynamicImportTimeout));Y.appTracerModule=yield Promise.race([t,import(`@apptracer/sdk/lite`)])}catch(e){Y.loadPromise=null,console.error(e)}});return function(){return t.apply(this,arguments)}}()())}}Y.tracerModulesMap=new Map,Y.appTracerModule=null,Y.loadPromise=null;class On{constructor(e,t){this.options=void 0,this.symbol=void 0,this.options=t,this.symbol=Symbol(e)}}var kn=()=>{let e=new Map,t=new Map,n=new Map,r=new Map,i=new Set;return{resolve(e){if(!r.has(e)){let t=n.get(e);if(!t)throw Error(`No constructor registered in DI container for ${e.name}`);r.set(e,new t)}return r.get(e)},resolveOptional(e){try{return this.resolve(e)}catch{return}},replace(e,t){r.forEach((t,n)=>{t instanceof e&&r.delete(n)}),n.set(e,t)},getToken(n){if(e.has(n.symbol))return e.get(n.symbol);if(t.has(n.symbol)){let r=t.get(n.symbol)();return e.set(n.symbol,r),r}if(n.options?.factory){let t=n.options.factory();return e.set(n.symbol,t),t}throw Error(`No value registered in DI container for token "${n.symbol.description}"`)},registerToken(t,n){e.set(t.symbol,n)},registerFactory(e,n){t.set(e.symbol,n)},hasToken(n){return e.has(n.symbol)||t.has(n.symbol)||!!n.options?.factory},registerCleanup(e){i.add(e)},clear(){i.forEach(e=>e()),i.clear(),e.clear(),t.clear(),r.clear(),n.clear()}}};class An{constructor(e){this._inputNode=void 0,this._outputNode=void 0,this._plugins=[],this._destination=null,this._taps=[],this._inputNode=e.createGain(),this._outputNode=e.createGain()}get input(){return this._inputNode}get plugins(){return this._plugins}connectTo(e){this._destination=e,this.rebuild()}addTap(e){this._taps.push(e),this._outputNode.connect(e)}hasPlugin(e){return this._plugins.some(t=>t.id===e)}addPlugin(e){this.hasPlugin(e.id)||(this._plugins.push(e),this.rebuild())}removePlugin(e){let t=this._plugins.findIndex(t=>t.id===e);t!==-1&&(this._plugins.splice(t,1),this.rebuild())}rebuild(){this._inputNode.disconnect();for(let e of this._plugins)e.outputNode.disconnect();this._outputNode.disconnect();let e=this._inputNode;for(let t of this._plugins)e.connect(t.inputNode),e=t.outputNode;e.connect(this._outputNode),this._destination!==null&&this._outputNode.connect(this._destination);for(let e of this._taps)this._outputNode.connect(e)}}class jn{constructor(e,t,n){this._pluginChain=void 0,this._element=void 0,this._ctx=void 0,this._sourceNode=null,this._isBound=!1,this._element=e,this._ctx=t,this._pluginChain=new An(t),this._pluginChain.connectTo(n)}get isBound(){return this._isBound}get plugins(){return this._pluginChain.plugins}bind(){this._isBound||=(this._sourceNode===null&&(this._sourceNode=this._ctx.createMediaElementSource(this._element)),this._sourceNode.disconnect(),this._sourceNode.connect(this._pluginChain.input),!0)}unbind(){this._isBound&&=(this._sourceNode?.disconnect(),this._sourceNode?.connect(this._ctx.destination),!1)}addPlugin(e){this._pluginChain.addPlugin(e)}removePlugin(e){this._pluginChain.removePlugin(e)}addAnalyser(e){this._pluginChain.addTap(e)}}class Mn{constructor(){this._ctx=null,this._masterGain=null,this._connections=new Map,this._contextEnabled=!1,this._boundBeforeDisable=new Set}static isSupported(){let e=E();return w(e.AudioContext??e.webkitAudioContext)}get context(){if(T(this._ctx)){let e=E(),t=e.AudioContext??e.webkitAudioContext;this._ctx=new t}return this._ctx}get contextState(){return this._contextEnabled?this._ctx?.state??`suspended`:`suspended`}enableContext(){var e=this;return p(function*(){e.ensureContext(),yield e._ctx?.resume(),e._contextEnabled=!0;for(let t of e._boundBeforeDisable)e._connections.get(t)?.bind();e._boundBeforeDisable.clear()})()}disableContext(){var e=this;return p(function*(){e._contextEnabled=!1;for(let[t,n]of e._connections)n.isBound&&(e._boundBeforeDisable.add(t),n.unbind())})()}connectSource(e){var t=this;return p(function*(){t.ensureContext(),t._contextEnabled=!0,yield t._ctx?.resume();let n=t._connections.get(e);if(n!==void 0){n.isBound||n.bind();return}let r=new jn(e,t.context,t._masterGain);r.bind(),t._connections.set(e,r)})()}disconnectSource(e){this._connections.get(e)?.unbind()}isSourceConnected(e){return this._connections.get(e)?.isBound??!1}addPlugin(e,t){let n=this._connections.get(e);if(n===void 0)throw Error(`Source is not connected. Call connectSource() first.`);n.addPlugin(t)}removePlugin(e,t){this._connections.get(e)?.removePlugin(t)}getPlugins(e){return this._connections.get(e)?.plugins??[]}createAnalyser(e){let t=this._connections.get(e);if(t===void 0)return null;let n=this.context.createAnalyser();return n.fftSize=256,n.smoothingTimeConstant=.8,t.addAnalyser(n),n}setMasterVolume(e){this._masterGain!==null&&(this._masterGain.gain.value=e)}getMasterVolume(){return this._masterGain?.gain.value??1}dispose(){this._connections.clear(),this._boundBeforeDisable.clear(),this._masterGain=null,this._contextEnabled=!1,this._ctx?.close(),this._ctx=null}ensureContext(){let e=this.context;T(this._masterGain)&&(this._masterGain=e.createGain(),this._masterGain.gain.value=1,this._masterGain.connect(e.destination))}}class Nn{constructor(e,t){this.id=`volume-fader`,this._gainNode=void 0,this._duration=void 0,this._curve=void 0,this._fade=null,this._gainNode=e.createGain(),this._gainNode.gain.value=1,this._duration=t.duration,this._curve=t.curve??this._buildEasingCurve(t.duration/1e3)}get inputNode(){return this._gainNode}get outputNode(){return this._gainNode}get faded(){return this._fade!==null}appear(){this._startFade(0,1)}disappear(){this._startFade(1,0)}pause(){if(this._fade===null)return;let e=this._gainNode.gain,t=this._gainNode.context.currentTime,n=t-this._fade.startTime,r=Math.max(0,this._fade.remaining-n);if(r<=.001){this._finishFade();return}let i=this._sampleIndex(this._fade,t),a=this._fade.curve[i];e.cancelScheduledValues(t),e.setValueAtTime(a,t),this._fade={from:a,target:this._fade.target,startTime:t,remaining:r,curve:this._fade.curve.subarray(i)}}resume(){if(this._fade===null)return;let e=this._gainNode.context.currentTime,{from:t,target:n,remaining:r,curve:i}=this._fade;if(r<=.001||Math.abs(n-t)<.001||i.length<2){this._finishFade();return}this._fade={from:t,target:n,startTime:e,remaining:r,curve:i},this._scheduleCurve(i,t,e,r)}cancel(){this._fade!==null&&this._finishFade()}_finishFade(){if(this._fade===null)return;let e=this._gainNode.gain,t=this._gainNode.context.currentTime;e.cancelScheduledValues(t),e.setValueAtTime(this._fade.target,t),this._fade=null}_startFade(e,t){let n=this._gainNode.gain,r=this._gainNode.context.currentTime,i=this._duration/1e3;if(i<=0){n.cancelScheduledValues(r),n.setValueAtTime(t,r),this._fade=null;return}let a=new Float32Array(this._curve.length);for(let n=0;n<this._curve.length;n++)a[n]=e+(t-e)*this._curve[n];this._fade={from:a[0],target:t,startTime:r,remaining:i,curve:a},this._scheduleCurve(a,a[0],r,i)}_buildEasingCurve(e){let t=Math.max(2,Math.ceil(e*60)),n=new Float32Array(t);for(let e=0;e<t;e++){let r=e/(t-1);n[e]=(1-Math.cos(Math.PI*r))/2}return n}_scheduleCurve(e,t,n,r){let i=this._gainNode.gain;i.cancelScheduledValues(n),i.setValueAtTime(t,n),i.setValueCurveAtTime(e,n,r)}_sampleIndex(e,t){let n=t-e.startTime,r=Math.max(0,Math.min(1,n/e.remaining));return Math.min(Math.round(r*(e.curve.length-1)),e.curve.length-1)}}class Pn{constructor(e,t,n,r){this._filter=void 0,this._source=void 0,this._defaultGain=void 0,this.frequency=void 0,this.frequency=t,this._source=n,this._defaultGain=r,this._filter=e.createBiquadFilter(),this._filter.type=`peaking`,this._filter.frequency.value=t,this._filter.gain.value=0,this._filter.Q.value=1,this._source.connect(this._filter.gain)}get value(){return this._source.offset.value}get node(){return this._filter}set(e){this._source.offset.value=e}reset(){this.set(this._defaultGain)}dispose(){this._source.disconnect(this._filter.gain)}}class X{constructor(e,t){this.id=`equalizer`,this._inputNode=void 0,this._outputNode=void 0,this._filterMap=new Map,this.equalizer=void 0,this._inputNode=e.createGain(),this._outputNode=e.createGain();let n=Object.entries(t).map(([e,t])=>[Number(e),t]).filter(([e])=>Number.isFinite(e)).sort((e,t)=>e[0]-t[0]),r=X._sources.get(e);T(r)&&(r=new Map,X._sources.set(e,r));for(let[t,i]of n)if(!r.has(t)){let n=e.createConstantSource();n.offset.value=i,n.start(),r.set(t,n)}let i={};for(let[t,a]of n){let n=r.get(t);if(!n)continue;let o=new Pn(e,t,n,a);this._filterMap.set(t,o),i[t]=o}this.equalizer=i,this.rebuild()}get inputNode(){return this._inputNode}get outputNode(){return this._outputNode}resetAll(){for(let e of this._filterMap.values())e.reset()}dispose(){for(let e of this._filterMap.values())e.dispose()}rebuild(){this._inputNode.disconnect();for(let e of this._filterMap.values())e.node.disconnect();this._outputNode.disconnect();let e=this._inputNode;for(let t of this._filterMap.values())e.connect(t.node),e=t.node;e.connect(this._outputNode)}}X._sources=new WeakMap;var Fn=-14;class In{constructor(e,t){this.id=`normalizer`,this._compressor=void 0,this._gainNode=void 0,this._compressor=e.createDynamicsCompressor(),this._gainNode=e.createGain(),this.applyConfig(t),this._compressor.connect(this._gainNode)}get inputNode(){return this._compressor}get outputNode(){return this._gainNode}applyConfig(e){if(!Number.isFinite(e.lufs)||!Number.isFinite(e.peak)){this._gainNode.gain.value=1;return}this._compressor.threshold.value=e.peak,this._compressor.knee.value=0,this._compressor.ratio.value=20,this._compressor.attack.value=.003,this._compressor.release.value=.25;let t=(e.targetLufs??Fn)-e.lufs;this._gainNode.gain.value=10**(t/20)}}var Ln=(e,t)=>{let n=e.length,r=t>=0?t:n+t;return r>=0&&r<n?e[r]:void 0},Rn=(e,t)=>{for(let n=e.length-1;n>=0;n--){let r=e[n];if(t(r,n,e))return r}},zn=(e,t)=>{for(let n=e.length-1;n>=0;n--)if(t(e[n],n,e))return n;return-1},Bn=(e,t=1)=>{let n=[],r=(e,t)=>{for(let i=0;i<e.length;i++){if(!(i in e))continue;let a=e[i];t>0&&Array.isArray(a)?r(a,t-1):n.push(a)}};return r(e,t),n},Vn=(e,t)=>{let n=[];for(let r=0;r<e.length;r++){let i=t(e[r],r,e);if(Array.isArray(i))for(let e=0;e<i.length;e++)n.push(i[e]);else n.push(i)}return n},Hn=(e,t,n=0)=>{let r=e.length,i=n>=0?n:Math.max(r+n,0);for(;i<r;i++){let n=e[i];if(n===t||n!==n&&t!==t)return!0}return!1},Un=e=>{let t=e.length,n=Array(t);for(let r=0;r<t;r++)n[r]=e[t-1-r];return n},Wn=(e,t)=>{let n=e.slice();return t?n.sort(t):n.sort()},Gn=(e,t,n,...r)=>{let i=e.slice();return n===void 0?i.splice(t):i.splice(t,n,...r),i},Kn=(e,t,n)=>{let r=e.length,i=t>=0?t:r+t,a=e.slice();return a[i]=n,a},qn=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof self<`u`?self:Function(`return this`)(),Jn=e=>{let t=[],n=Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r];t.push([i,e[i]])}return t},Yn=e=>{let t={};for(let[n,r]of e)t[n]=r;return t},Xn=Object.prototype.hasOwnProperty,Zn=(e,t)=>Xn.call(e,t),Qn=e=>{let t=Object.keys(e),n=Array(t.length);for(let r=0;r<t.length;r++)n[r]=e[t[r]];return n},$n=e=>{let t=Array.from(e);return t.length===0?Promise.resolve([]):Promise.all(t.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))},er=e=>{let t=Array.from(e);return t.length===0?Promise.reject(AggregateError([],`All promises were rejected`)):new Promise((e,n)=>{let r=Array(t.length),i=t.length;t.forEach((t,a)=>{Promise.resolve(t).then(e,e=>{r[a]=e,--i,i===0&&n(AggregateError(r,`All promises were rejected`))})})})},tr=(e,t)=>e.then(e=>Promise.resolve(t()).then(()=>e),e=>Promise.resolve(t()).then(()=>{throw e})),nr=e=>{try{return Promise.resolve(e())}catch(e){return Promise.reject(e)}},rr=()=>{let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}},{NativeAbortSignal:ir,NativeAbortController:ar}=function(e){return{NativeAbortSignal:e.AbortSignal,NativeAbortController:e.AbortController}}(typeof self<`u`?self:global);function or(e){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}}return t.reason=e,t}function sr(e){if(e===void 0)if(typeof document>`u`)e=Error(`This operation was aborted`),e.name=`AbortError`;else try{e=new DOMException(`signal is aborted without reason`),Object.defineProperty(e,"name",{value:`AbortError`})}catch{e=Error(`This operation was aborted`),e.name=`AbortError`}return e}class cr{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;let n=this.listeners[e];for(let e=0,r=n.length;e<r;e++)if(n[e].callback===t){n.splice(e,1);return}}dispatchEvent(e){if(!(e.type in this.listeners))return;let t=this.listeners[e.type].slice();for(let n=0,r=t.length;n<r;n++){let r=t[n];try{r.callback.call(this,e)}catch(e){Promise.resolve().then(()=>{throw e})}r.options&&r.options.once&&this.removeEventListener(e.type,r.callback)}return!e.defaultPrevented}}class lr extends cr{constructor(){super(),this.listeners||cr.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)}throwIfAborted(){let{aborted:e,reason:t=`Aborted`}=this;if(e)throw t}static timeout(e){let t=new Z;return setTimeout(()=>t.abort(new DOMException(`This signal is timeout in ${e}ms`,`TimeoutError`)),e),t.signal}static any(e){let t=new Z;function n(){t.abort(this.reason),r()}function r(){for(let t of e)t.removeEventListener(`abort`,n)}for(let r of e)if(r.aborted){t.abort(r.reason);break}else r.addEventListener(`abort`,n);return t.signal}}class Z{constructor(){Object.defineProperty(this,"signal",{value:new lr,writable:!0,configurable:!0})}abort(e){let t=sr(e),n=or(t);this.signal.reason=t,this.signal.dispatchEvent(n)}toString(){return`[object AbortController]`}}typeof Symbol<`u`&&Symbol.toStringTag&&(Z.prototype[Symbol.toStringTag]=`AbortController`,lr.prototype[Symbol.toStringTag]=`AbortSignal`);function ur(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 dr(e){typeof e==`function`&&(e={fetch:e});let{fetch:t,Request:n=t.Request,AbortController:r,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i=!1}=e;if(!ur({fetch:t,Request:n,AbortController:r,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i}))return{fetch:t,Request:a};let a=n;(a&&!a.prototype.hasOwnProperty(`signal`)||i)&&(a=function(e,t){let r;t&&t.signal&&(r=t.signal,delete t.signal);let i=new n(e,t);return r&&Object.defineProperty(i,"signal",{writable:!1,enumerable:!1,configurable:!0,value:r}),i},a.prototype=n.prototype);let o=t;return{fetch:(e,t)=>{let n=a&&a.prototype.isPrototypeOf(e)?e.signal:t?t.signal:void 0;if(n){let r;try{r=new DOMException(`Aborted`,`AbortError`)}catch{r=Error(`Aborted`),r.name=`AbortError`}if(n.aborted)return Promise.reject(r);let i=new Promise((e,t)=>{n.addEventListener(`abort`,()=>t(r),{once:!0})});return t&&t.signal&&delete t.signal,Promise.race([i,o(e,t)])}return o(e,t)},Request:a}}var Q=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window,$=`fetch`in Q&&ur({fetch:Q.fetch,Request:Q.Request,AbortController:Q.AbortController}),fr=$?dr({fetch:Q.fetch,Request:Q.Request,AbortController:Q.AbortController}):void 0,pr=$?fr.fetch:Q.fetch,mr=$?fr.Request:Q.Request,hr=$?Z:Q.AbortController,gr=$?lr:Q.AbortSignal,_r=(e,t)=>{let n=e.length,r=t>=0?t:n+t;if(r<0||r>=n)return;let i=e.charCodeAt(r);if(i>=55296&&i<=56319&&r+1<n){let t=e.charCodeAt(r+1);if(t>=56320&&t<=57343)return e[r]+e[r+1]}return e[r]};function*vr(e,t){let n=t.flags.includes(`g`)?t.flags:t.flags+`g`,r=new RegExp(t.source,n),i;for(;(i=r.exec(e))!==null;)yield i,i[0].length===0&&r.lastIndex++}var yr=(e,t,n=` `)=>{if(n===``||e.length>=t)return e;let r=t-e.length;return e+n.repeat(Math.ceil(r/n.length)).slice(0,r)},br=(e,t,n=` `)=>{if(n===``||e.length>=t)return e;let r=t-e.length;return n.repeat(Math.ceil(r/n.length)).slice(0,r)+e},xr=(e,t,n)=>{if(typeof t==`string`){if(typeof n==`string`)return t===``?n+e.split(``).join(n)+n:e.split(t).join(n);let r=[],i=0,a=e.indexOf(t,i);for(;a!==-1;)r.push(e.slice(i,a)),r.push(n(t,a,e)),i=a+t.length,a=e.indexOf(t,i);return r.push(e.slice(i)),r.join(``)}let r=t.flags.includes(`g`)?t.flags:t.flags+`g`,i=new RegExp(t.source,r);return e.replace(i,n)},Sr=e=>e.replace(/^\s+/,``),Cr=e=>e.replace(/\s+$/,``),wr=Sr,Tr=Cr,Er=(e,t)=>typeof e==`string`?_r(e,t):Ln(e,t),Dr=(e,t={})=>{let n=t.timeout||1,r=performance.now();return Q.setTimeout(()=>{e({get didTimeout(){return t.timeout?!1:performance.now()-r-1>n},timeRemaining(){return Math.max(0,1+(performance.now()-r))}})},1)},Or=e=>Q.clearTimeout(e),kr=e=>typeof e==`function`&&e?.toString().endsWith(`{ [native code] }`),Ar=!kr(Q.requestIdleCallback)||!kr(Q.cancelIdleCallback),jr=Ar?Dr:Q.requestIdleCallback,Mr=Ar?Or:Q.cancelIdleCallback,Nr=(e,t,n)=>typeof e==`string`?e.includes(t,n):Hn(e,t,n),Pr=(e,t,n)=>{if(typeof e.canParse==`function`)return e.canParse(t,n);try{return new e(t,n),!0}catch{return!1}};;return{se,Ye,Xe,Je,Pr,ct,tt,rt,xt,It,Zt,Sr,Tr,wr,Cr,xr,br,yr,vr,_r,Rt,Bt,Pe,Oe,jr,ke,rr,nr,tr,er,$n,Pt,Nt,Ht,dt,Qn,Zn,Yn,Jn,de,O,b,st,Mt,At,mn,Wt,T,w,Ge,B,V,Gt,We,Ue,ue,Xt,lt,Jt,Nr,qn,E,$e,$t,Ae,D,Yt,qt,Qt,Ke,Ne,ft,W,Dt,Ct,et,pr,yn,Ve,nt,vt,Ee,kn,mt,ot,H,it,Ut,ne,Mr,ht,Er,Qe,oe,ce,ae,y,le,Kn,Gn,Wn,Un,Hn,Vn,Bn,zn,Rn,Ln,Ze,je,Me,ge,Nn,He,U,fn,_,ln,he,pt,v,C,mr,at,S,In,ie,vn,_n,On,q,un,dn,X,G,Mn,Y,gr,hr};}();var{se:_oxcModld2xqi_se,Ye:_oxcModld2xqi_Ye,Xe:_oxcModld2xqi_Xe,Je:_oxcModld2xqi_Je,Pr:_oxcModld2xqi_Pr,ct:_oxcModld2xqi_ct,tt:_oxcModld2xqi_tt,rt:_oxcModld2xqi_rt,xt:_oxcModld2xqi_xt,It:_oxcModld2xqi_It,Zt:_oxcModld2xqi_Zt,Sr:_oxcModld2xqi_Sr,Tr:_oxcModld2xqi_Tr,wr:_oxcModld2xqi_wr,Cr:_oxcModld2xqi_Cr,xr:_oxcModld2xqi_xr,br:_oxcModld2xqi_br,yr:_oxcModld2xqi_yr,vr:_oxcModld2xqi_vr,_r:_oxcModld2xqi__r,Rt:_oxcModld2xqi_Rt,Bt:_oxcModld2xqi_Bt,Pe:_oxcModld2xqi_Pe,Oe:_oxcModld2xqi_Oe,jr:_oxcModld2xqi_jr,ke:_oxcModld2xqi_ke,rr:_oxcModld2xqi_rr,nr:_oxcModld2xqi_nr,tr:_oxcModld2xqi_tr,er:_oxcModld2xqi_er,$n:_oxcModld2xqi_$n,Pt:_oxcModld2xqi_Pt,Nt:_oxcModld2xqi_Nt,Ht:_oxcModld2xqi_Ht,dt:_oxcModld2xqi_dt,Qn:_oxcModld2xqi_Qn,Zn:_oxcModld2xqi_Zn,Yn:_oxcModld2xqi_Yn,Jn:_oxcModld2xqi_Jn,de:_oxcModld2xqi_de,O:_oxcModld2xqi_O,b:_oxcModld2xqi_b,st:_oxcModld2xqi_st,Mt:_oxcModld2xqi_Mt,At:_oxcModld2xqi_At,mn:_oxcModld2xqi_mn,Wt:_oxcModld2xqi_Wt,T:_oxcModld2xqi_T,w:_oxcModld2xqi_w,Ge:_oxcModld2xqi_Ge,B:_oxcModld2xqi_B,V:_oxcModld2xqi_V,Gt:_oxcModld2xqi_Gt,We:_oxcModld2xqi_We,Ue:_oxcModld2xqi_Ue,ue:_oxcModld2xqi_ue,Xt:_oxcModld2xqi_Xt,lt:_oxcModld2xqi_lt,Jt:_oxcModld2xqi_Jt,Nr:_oxcModld2xqi_Nr,qn:_oxcModld2xqi_qn,E:_oxcModld2xqi_E,$e:_oxcModld2xqi_$e,$t:_oxcModld2xqi_$t,Ae:_oxcModld2xqi_Ae,D:_oxcModld2xqi_D,Yt:_oxcModld2xqi_Yt,qt:_oxcModld2xqi_qt,Qt:_oxcModld2xqi_Qt,Ke:_oxcModld2xqi_Ke,Ne:_oxcModld2xqi_Ne,ft:_oxcModld2xqi_ft,W:_oxcModld2xqi_W,Dt:_oxcModld2xqi_Dt,Ct:_oxcModld2xqi_Ct,et:_oxcModld2xqi_et,pr:_oxcModld2xqi_pr,yn:_oxcModld2xqi_yn,Ve:_oxcModld2xqi_Ve,nt:_oxcModld2xqi_nt,vt:_oxcModld2xqi_vt,Ee:_oxcModld2xqi_Ee,kn:_oxcModld2xqi_kn,mt:_oxcModld2xqi_mt,ot:_oxcModld2xqi_ot,H:_oxcModld2xqi_H,it:_oxcModld2xqi_it,Ut:_oxcModld2xqi_Ut,ne:_oxcModld2xqi_ne,Mr:_oxcModld2xqi_Mr,ht:_oxcModld2xqi_ht,Er:_oxcModld2xqi_Er,Qe:_oxcModld2xqi_Qe,oe:_oxcModld2xqi_oe,ce:_oxcModld2xqi_ce,ae:_oxcModld2xqi_ae,y:_oxcModld2xqi_y,le:_oxcModld2xqi_le,Kn:_oxcModld2xqi_Kn,Gn:_oxcModld2xqi_Gn,Wn:_oxcModld2xqi_Wn,Un:_oxcModld2xqi_Un,Hn:_oxcModld2xqi_Hn,Vn:_oxcModld2xqi_Vn,Bn:_oxcModld2xqi_Bn,zn:_oxcModld2xqi_zn,Rn:_oxcModld2xqi_Rn,Ln:_oxcModld2xqi_Ln,Ze:_oxcModld2xqi_Ze,je:_oxcModld2xqi_je,Me:_oxcModld2xqi_Me,ge:_oxcModld2xqi_ge,Nn:_oxcModld2xqi_Nn,He:_oxcModld2xqi_He,U:_oxcModld2xqi_U,fn:_oxcModld2xqi_fn,_:_oxcModld2xqi__,ln:_oxcModld2xqi_ln,he:_oxcModld2xqi_he,pt:_oxcModld2xqi_pt,v:_oxcModld2xqi_v,C:_oxcModld2xqi_C,mr:_oxcModld2xqi_mr,at:_oxcModld2xqi_at,S:_oxcModld2xqi_S,In:_oxcModld2xqi_In,ie:_oxcModld2xqi_ie,vn:_oxcModld2xqi_vn,_n:_oxcModld2xqi__n,On:_oxcModld2xqi_On,q:_oxcModld2xqi_q,un:_oxcModld2xqi_un,dn:_oxcModld2xqi_dn,X:_oxcModld2xqi_X,G:_oxcModld2xqi_G,Mn:_oxcModld2xqi_Mn,Y:_oxcModld2xqi_Y,gr:_oxcModld2xqi_gr,hr:_oxcModld2xqi_hr}=_oxcModld2xqi;export{_oxcModld2xqi_se as withoutNullable,_oxcModld2xqi_Ye as videoSizeToQuality,_oxcModld2xqi_Xe as videoQualityToHeight,_oxcModld2xqi_Je as videoHeightToQuality,_oxcModld2xqi_Pr as urlCanParsePolyfilled,_oxcModld2xqi_ct as timeout,_oxcModld2xqi_tt as timeCodeToString,_oxcModld2xqi_rt as throttleFn,_oxcModld2xqi_xt as throttle,_oxcModld2xqi_It as tap,_oxcModld2xqi_Zt as suppressAbort,_oxcModld2xqi_Sr as stringTrimStart,_oxcModld2xqi_Tr as stringTrimRight,_oxcModld2xqi_wr as stringTrimLeft,_oxcModld2xqi_Cr as stringTrimEnd,_oxcModld2xqi_xr as stringReplaceAll,_oxcModld2xqi_br as stringPadStart,_oxcModld2xqi_yr as stringPadEnd,_oxcModld2xqi_vr as stringMatchAll,_oxcModld2xqi__r as stringAt,_oxcModld2xqi_Rt as skip,_oxcModld2xqi_Bt as shareReplay,_oxcModld2xqi_Pe as safeStorage,_oxcModld2xqi_Oe as retainTimers,_oxcModld2xqi_jr as requestIdleCallbackPolyfilled,_oxcModld2xqi_ke as releaseTimers,_oxcModld2xqi_rr as promiseWithResolvers,_oxcModld2xqi_nr as promiseTry,_oxcModld2xqi_tr as promiseFinally,_oxcModld2xqi_er as promiseAny,_oxcModld2xqi_$n as promiseAllSettled,_oxcModld2xqi_Pt as pairwise,_oxcModld2xqi_Nt as once,_oxcModld2xqi_Ht as observeElementSize,_oxcModld2xqi_dt as observableFrom,_oxcModld2xqi_Qn as objectValues,_oxcModld2xqi_Zn as objectHasOwn,_oxcModld2xqi_Yn as objectFromEntries,_oxcModld2xqi_Jn as objectEntries,_oxcModld2xqi_de as nowInt,_oxcModld2xqi_O as now,_oxcModld2xqi_b as noop,_oxcModld2xqi_st as merge,_oxcModld2xqi_Mt as mapTo,_oxcModld2xqi_At as map,_oxcModld2xqi_mn as loadVKLangPack,_oxcModld2xqi_Wt as isValidURL,_oxcModld2xqi_T as isNullable,_oxcModld2xqi_w as isNonNullable,_oxcModld2xqi_Ge as isLowerOrEqual,_oxcModld2xqi_B as isLower,_oxcModld2xqi_V as isInvariantQuality,_oxcModld2xqi_Gt as isIntersecting,_oxcModld2xqi_We as isHigherOrEqual,_oxcModld2xqi_Ue as isHigher,_oxcModld2xqi_ue as isBrowserWindow,_oxcModld2xqi_Xt as isAbortError,_oxcModld2xqi_lt as interval,_oxcModld2xqi_Jt as interpolate,_oxcModld2xqi_Nr as includesPolyfilled,_oxcModld2xqi_qn as globalThisPolyfill,_oxcModld2xqi_E as getWindow,_oxcModld2xqi_$e as getVideoQualityLabel,_oxcModld2xqi_$t as getTraceSubscriptionMethod,_oxcModld2xqi_Ae as getTimersDiagnostics,_oxcModld2xqi_D as getTimerWindow,_oxcModld2xqi_Yt as getRangeAroundIndex,_oxcModld2xqi_qt as getPlayerId,_oxcModld2xqi_Qt as getMessageFromError,_oxcModld2xqi_Ke as getHighestQuality,_oxcModld2xqi_Ne as getExponentialDelay,_oxcModld2xqi_ft as fromEvent,_oxcModld2xqi_W as flattenObject,_oxcModld2xqi_Dt as filterChanged,_oxcModld2xqi_Ct as filter,_oxcModld2xqi_et as fillWithDefault,_oxcModld2xqi_pr as fetchPolyfilled,_oxcModld2xqi_yn as devNull,_oxcModld2xqi_Ve as detectEmbed,_oxcModld2xqi_nt as debounceFn,_oxcModld2xqi_vt as debounce,_oxcModld2xqi_Ee as createTimers,_oxcModld2xqi_kn as createDIContainer,_oxcModld2xqi_mt as combineLatest,_oxcModld2xqi_ot as combine,_oxcModld2xqi_H as cloneDeepWith,_oxcModld2xqi_it as cloneDeep,_oxcModld2xqi_Ut as clearVideoElement,_oxcModld2xqi_ne as checkNever,_oxcModld2xqi_Mr as cancelIdleCallbackPolyfilled,_oxcModld2xqi_ht as buffer,_oxcModld2xqi_Er as atPolyfilled,_oxcModld2xqi_Qe as assertQualityIsExact,_oxcModld2xqi_oe as assertNullable,_oxcModld2xqi_ce as assertNotEmptyArray,_oxcModld2xqi_ae as assertNonNullable,_oxcModld2xqi_y as assertNever,_oxcModld2xqi_le as assertEmptyArray,_oxcModld2xqi_Kn as arrayWith,_oxcModld2xqi_Gn as arrayToSpliced,_oxcModld2xqi_Wn as arrayToSorted,_oxcModld2xqi_Un as arrayToReversed,_oxcModld2xqi_Hn as arrayIncludes,_oxcModld2xqi_Vn as arrayFlatMap,_oxcModld2xqi_Bn as arrayFlat,_oxcModld2xqi_zn as arrayFindLastIndex,_oxcModld2xqi_Rn as arrayFindLast,_oxcModld2xqi_Ln as arrayAt,_oxcModld2xqi_Ze as areQualitiesExact,_oxcModld2xqi_je as addScript,_oxcModld2xqi_Me as abortable,_oxcModld2xqi_ge as WorkerState,_oxcModld2xqi_Nn as VolumeFaderPlugin,_oxcModld2xqi_He as VideoQuality,_oxcModld2xqi_U as ValueSubject,_oxcModld2xqi_fn as VKNumericLanguage,_oxcModld2xqi__ as VERSION,_oxcModld2xqi_ln as TracerFactory,_oxcModld2xqi_he as TimerModule,_oxcModld2xqi_pt as SubscriptionRemovable,_oxcModld2xqi_v as Subscription,_oxcModld2xqi_C as Subject,_oxcModld2xqi_mr as RequestPolyfilled,_oxcModld2xqi_at as ReplaySubject,_oxcModld2xqi_S as Observable,_oxcModld2xqi_In as NormalizerPlugin,_oxcModld2xqi_ie as Logger,_oxcModld2xqi_vn as InternalsExposure,_oxcModld2xqi__n as InterfaceLanguage,_oxcModld2xqi_On as InjectionToken,_oxcModld2xqi_q as INTERNAL_EXPOSE_GLOBAL_KEY,_oxcModld2xqi_un as ErrorOrigin,_oxcModld2xqi_dn as ErrorCategory,_oxcModld2xqi_X as EqualizerPlugin,_oxcModld2xqi_G as CircularBuffer,_oxcModld2xqi_Mn as AudioGraph,_oxcModld2xqi_Y as AppTracer,_oxcModld2xqi_gr as AbortSignalPolyfilled,_oxcModld2xqi_hr as AbortControllerPolyfilled};
|