@vkontakte/videoplayer-tv 1.0.12 → 1.0.13-dev.2ed41cd75.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.esm.js CHANGED
@@ -1,62 +1,19 @@
1
1
  /**
2
- * @vkontakte/videoplayer-tv v1.0.12
3
- * Tue, 02 Jun 2026 13:11:09 GMT
4
- * https://st.mycdn.me/static/vkontakte-videoplayer/1-0-12/doc/
2
+ * @vkontakte/videoplayer-tv v1.0.13-dev.2ed41cd75.0
3
+ * Thu, 04 Jun 2026 14:11:35 GMT
4
+ * https://st.mycdn.me/static/vkontakte-videoplayer/1-0-13/doc/
5
5
  */
6
- import e from"@oxc-project/runtime/helpers/defineProperty";import t from"@oxc-project/runtime/helpers/classPrivateMethodInitSpec";import n from"@oxc-project/runtime/helpers/classPrivateFieldInitSpec";import r from"@oxc-project/runtime/helpers/classPrivateFieldGet2";import i from"@oxc-project/runtime/helpers/assertClassBrand";import a from"@oxc-project/runtime/helpers/classPrivateFieldSet2";import o from"@oxc-project/runtime/helpers/objectSpread2";import s from"@oxc-project/runtime/helpers/asyncToGenerator";var c,l,u=`prod`,d=`1.0.12`;import{objectFromEntries as f}from"@vkontakte/videoplayer-shared/es2015";import{fillWithDefault as p,InterfaceLanguage as m,VideoQuality as h}from"@vkontakte/videoplayer-shared/es2015";var g=!0,_=Array.isArray,v=Array.prototype.indexOf,y=Array.prototype.includes,b=Array.from;Object.keys;var x=Object.defineProperty,S=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyDescriptors,ee=Object.prototype,te=Array.prototype,ne=Object.getPrototypeOf,re=Object.isExtensible,ie=()=>{};function ae(e){for(var t=0;t<e.length;t++)e[t]()}function oe(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var w=2,se=4,ce=8,le=1<<24,ue=16,T=32,E=64,de=128,fe=512,D=1024,O=2048,k=4096,A=8192,pe=16384,me=32768,he=65536,ge=1<<17,_e=1<<18,ve=1<<19,ye=1<<20,be=1<<25,xe=65536,Se=1<<21,Ce=1<<22,we=1<<23,Te=Symbol(`$state`),Ee=Symbol(`legacy props`),De=Symbol(``),Oe=Symbol(`proxy path`),ke=new class extends Error{constructor(...t){super(...t),e(this,`name`,`StaleReactionError`),e(this,`message`,"The reaction that called `getAbortSignal()` was re-run or destroyed")}},Ae=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`),je=3,Me=8;function Ne(){if(g){let e=Error("invalid_default_snippet\nCannot use `{@render children(...)}` if the parent component uses `let:` directives. Consider using a named snippet instead\nhttps://svelte.dev/e/invalid_default_snippet");throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/invalid_default_snippet`)}function Pe(e){if(g){let t=Error(`lifecycle_outside_component
7
- \`${e}(...)\` can only be used during component initialisation
8
- https://svelte.dev/e/lifecycle_outside_component`);throw t.name=`Svelte error`,t}else throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function Fe(){if(g){let e=Error("async_derived_orphan\nCannot create a `$derived(...)` with an `await` expression outside of an effect tree\nhttps://svelte.dev/e/async_derived_orphan");throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Ie(){if(g){let e=Error(`derived_references_self
9
- A derived value cannot reference itself recursively
10
- https://svelte.dev/e/derived_references_self`);throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/derived_references_self`)}function Le(e,t,n){if(g){let r=Error(`each_key_duplicate
11
- ${n?`Keyed each block has duplicate key \`${n}\` at indexes ${e} and ${t}`:`Keyed each block has duplicate key at indexes ${e} and ${t}`}
12
- https://svelte.dev/e/each_key_duplicate`);throw r.name=`Svelte error`,r}else throw Error(`https://svelte.dev/e/each_key_duplicate`)}function Re(e,t,n){if(g){let r=Error(`each_key_volatile
13
- Keyed each block has key that is not idempotent — the key for item at index ${e} was \`${t}\` but is now \`${n}\`. Keys must be the same each time for a given item
14
- https://svelte.dev/e/each_key_volatile`);throw r.name=`Svelte error`,r}else throw Error(`https://svelte.dev/e/each_key_volatile`)}function ze(e){if(g){let t=Error(`effect_in_teardown
15
- \`${e}\` cannot be used inside an effect cleanup function
16
- https://svelte.dev/e/effect_in_teardown`);throw t.name=`Svelte error`,t}else throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Be(){if(g){let e=Error(`effect_in_unowned_derived
17
- Effect cannot be created inside a \`$derived\` value that was not itself created inside an effect
18
- https://svelte.dev/e/effect_in_unowned_derived`);throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Ve(e){if(g){let t=Error(`effect_orphan
19
- \`${e}\` can only be used inside an effect (e.g. during component initialisation)
20
- https://svelte.dev/e/effect_orphan`);throw t.name=`Svelte error`,t}else throw Error(`https://svelte.dev/e/effect_orphan`)}function He(){if(g){let e=Error(`effect_update_depth_exceeded
21
- Maximum update depth exceeded. This typically indicates that an effect reads and writes the same piece of state
22
- https://svelte.dev/e/effect_update_depth_exceeded`);throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Ue(){if(g){let e=Error("invalid_snippet\nCould not `{@render}` snippet due to the expression being `null` or `undefined`. Consider using optional chaining `{@render snippet?.()}`\nhttps://svelte.dev/e/invalid_snippet");throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/invalid_snippet`)}function We(e){if(g){let t=Error(`props_invalid_value
23
- Cannot do \`bind:${e}={undefined}\` when \`${e}\` has a fallback value
24
- https://svelte.dev/e/props_invalid_value`);throw t.name=`Svelte error`,t}else throw Error(`https://svelte.dev/e/props_invalid_value`)}function Ge(e){if(g){let t=Error(`rune_outside_svelte
25
- The \`${e}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files
26
- https://svelte.dev/e/rune_outside_svelte`);throw t.name=`Svelte error`,t}else throw Error(`https://svelte.dev/e/rune_outside_svelte`)}function Ke(){if(g){let e=Error("set_context_after_init\n`setContext` must be called when a component first initializes, not in a subsequent effect or after an `await` expression\nhttps://svelte.dev/e/set_context_after_init");throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/set_context_after_init`)}function qe(){if(g){let e=Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Je(){if(g){let e=Error(`state_prototype_fixed
27
- Cannot set prototype of \`$state\` object
28
- https://svelte.dev/e/state_prototype_fixed`);throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function Ye(){if(g){let e=Error("state_unsafe_mutation\nUpdating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Xe(){if(g){let e=Error("svelte_boundary_reset_onerror\nA `<svelte:boundary>` `reset` function cannot be called while an error is still being handled\nhttps://svelte.dev/e/svelte_boundary_reset_onerror");throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var Ze=1,Qe=2,$e=4,et=8,tt=16,nt=1,rt=2,it=4,at=8,ot=16,st=1,ct=2,lt=`[`,ut=`[!`,dt=`[?`,ft=`]`,pt={},mt=Symbol(),ht=Symbol(`filename`),gt=`http://www.w3.org/1999/xhtml`,_t=`font-weight: bold`,vt=`font-weight: normal`;function yt(e,t){g?console.warn(`%c[svelte] await_waterfall
29
- %cAn async derived, \`${e}\` (${t}) was not read immediately after it resolved. This often indicates an unnecessary waterfall, which can slow down your app
30
- https://svelte.dev/e/await_waterfall`,_t,vt):console.warn(`https://svelte.dev/e/await_waterfall`)}function bt(e,t,n){g?console.warn(`%c[svelte] hydration_attribute_changed
31
- %cThe \`${e}\` attribute on \`${t}\` changed its value between server and client renders. The client value, \`${n}\`, will be ignored in favour of the server value
32
- https://svelte.dev/e/hydration_attribute_changed`,_t,vt):console.warn(`https://svelte.dev/e/hydration_attribute_changed`)}function xt(e){g?console.warn(`%c[svelte] hydration_mismatch
33
- %c${e?`Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${e}`:`Hydration failed because the initial UI does not match what was rendered on the server`}
34
- https://svelte.dev/e/hydration_mismatch`,_t,vt):console.warn(`https://svelte.dev/e/hydration_mismatch`)}function St(){g?console.warn(`%c[svelte] lifecycle_double_unmount
35
- %cTried to unmount a component that was not mounted
36
- https://svelte.dev/e/lifecycle_double_unmount`,_t,vt):console.warn(`https://svelte.dev/e/lifecycle_double_unmount`)}function Ct(e){g?console.warn(`%c[svelte] state_proxy_equality_mismatch
37
- %cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${e}\` will produce unexpected results
38
- https://svelte.dev/e/state_proxy_equality_mismatch`,_t,vt):console.warn(`https://svelte.dev/e/state_proxy_equality_mismatch`)}function wt(){g?console.warn(`%c[svelte] state_proxy_unmount
39
- %cTried to unmount a state proxy, rather than a component
40
- https://svelte.dev/e/state_proxy_unmount`,_t,vt):console.warn(`https://svelte.dev/e/state_proxy_unmount`)}function Tt(){g?console.warn("%c[svelte] svelte_boundary_reset_noop\n%cA `<svelte:boundary>` `reset` function only resets the boundary the first time it is called\nhttps://svelte.dev/e/svelte_boundary_reset_noop",_t,vt):console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var j=!1;function Et(e){j=e}var M;function Dt(e){if(e===null)throw xt(),pt;return M=e}function Ot(){return Dt(oi(M))}function N(e){if(j){if(oi(M)!==null)throw xt(),pt;M=e}}function kt(e=1){if(j){for(var t=e,n=M;t--;)n=oi(n);M=n}}function At(e=!0){for(var t=0,n=M;;){if(n.nodeType===Me){var r=n.data;if(r===ft){if(t===0)return n;--t}else (r===lt||r===ut||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=oi(n);e&&n.remove(),n=i}}function jt(e){if(!e||e.nodeType!==Me)throw xt(),pt;return e.data}function Mt(e){return e===this.v}function Nt(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function Pt(e){return!Nt(e,this.v)}var Ft=!1,It=!1,Lt=!1;function Rt(){It=!0}var zt=null;function Bt(e,t){return e.label=t,Vt(e.v,t),e}function Vt(e,t){var n;return e==null||(n=e[Oe])==null||n.call(e,t),e}function Ht(e){let t=Error(),n=Ut();return n.length===0?null:(n.unshift(`
41
- `),x(t,`stack`,{value:n.join(`
42
- `)}),x(t,`name`,{value:e}),t)}function Ut(){let e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;let t=Error().stack;if(Error.stackTraceLimit=e,!t)return[];let n=t.split(`
43
- `),r=[];for(let e=0;e<n.length;e++){let t=n[e],i=t.replaceAll(`\\`,`/`);if(t.trim()!==`Error`){if(t.includes(`validate_each_keys`))return[];i.includes(`svelte/src/internal`)||i.includes(`node_modules/.vite`)||r.push(t)}}return r}var P=null;function Wt(e){P=e}var Gt=null;function Kt(e){Gt=e}var qt=null;function Jt(e){qt=e}function Yt(e){return en(`getContext`).get(e)}function Xt(e,t){let n=en(`setContext`);if(Ft){var r=H.f;!V&&(r&T)!==0&&!P.i||Ke()}return n.set(e,t),t}function Zt(e,t=!1,n){P={p:P,i:!1,c:null,e:null,s:e,x:null,l:It&&!t?{s:null,u:null,$:[]}:null},g&&(P.function=n,qt=n)}function Qt(e){var t=P,n=t.e;if(n!==null){t.e=null;for(var r of n)yi(r)}return e!==void 0&&(t.x=e),t.i=!0,P=t.p,g&&(qt=P?.function??null),e??{}}function $t(){return!It||P!==null&&P.l===null}function en(e){var t;return P===null&&Pe(e),(t=P).c??(t.c=new Map(tn(P)||void 0))}function tn(e){let t=e.p;for(;t!==null;){let e=t.c;if(e!==null)return e;t=t.p}return null}var nn=[];function rn(){var e=nn;nn=[],ae(e)}function an(e){if(nn.length===0&&!xn){var t=nn;queueMicrotask(()=>{t===nn&&rn()})}nn.push(e)}var on=new WeakMap;function sn(e){var t=H;if(t===null)return V.f|=we,e;if(g&&e instanceof Error&&!on.has(e)&&on.set(e,ln(e,t)),(t.f&me)===0&&(t.f&se)===0)throw g&&!t.parent&&e instanceof Error&&un(e),e;cn(e,t)}function cn(e,t){for(;t!==null;){if((t.f&de)!==0){if((t.f&me)===0)throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw g&&e instanceof Error&&un(e),e}function ln(e,t){let n=S(e,`message`);if(!(n&&!n.configurable)){for(var r=ei?` `:` `,i=`
44
- ${r}in ${t.fn?.name||`<unknown>`}`,a=t.ctx;a!==null;)i+=`
45
- ${r}in ${a.function?.[ht].split(`/`).pop()}`,a=a.p;return{message:e.message+`
46
- ${i}
47
- `,stack:e.stack?.split(`
48
- `).filter(e=>!e.includes(`svelte/src/internal`)).join(`
49
- `)}}}function un(e){let t=on.get(e);t&&(x(e,`message`,{value:t.message}),x(e,`stack`,{value:t.stack}))}var dn=~(O|k|D);function fn(e,t){e.f=e.f&dn|t}function pn(e){(e.f&fe)!==0||e.deps===null?fn(e,D):fn(e,k)}function mn(e){if(e!==null)for(let t of e)(t.f&w)===0||(t.f&xe)===0||(t.f^=xe,mn(t.deps))}function hn(e,t,n){(e.f&O)===0?(e.f&k)!==0&&n.add(e):t.add(e),mn(e.deps),fn(e,D)}var gn=new Set,_n=null,vn=null,yn=[],bn=null,xn=!1,Sn=null,Cn=new WeakMap,wn=new WeakMap,Tn=new WeakMap,En=new WeakMap,Dn=new WeakMap,On=new WeakMap,kn=new WeakMap,An=new WeakMap,jn=new WeakMap,Mn=new WeakSet;class Nn{constructor(){t(this,Mn),e(this,`current`,new Map),e(this,`previous`,new Map),n(this,Cn,new Set),n(this,wn,new Set),n(this,Tn,0),n(this,En,0),n(this,Dn,null),n(this,On,new Set),n(this,kn,new Set),n(this,An,new Map),e(this,`is_fork`,!1),n(this,jn,!1)}skip_effect(e){r(An,this).has(e)||r(An,this).set(e,{d:[],m:[]})}unskip_effect(e){var t=r(An,this).get(e);if(t){r(An,this).delete(e);for(var n of t.d)fn(n,O),Wn(n);for(n of t.m)fn(n,k),Wn(n)}}process(e){yn=[],this.apply();var t=Sn=[],n=[];for(let r of e)i(Mn,this,Fn).call(this,r,t,n);if(Sn=null,i(Mn,this,Pn).call(this)){i(Mn,this,In).call(this,n),i(Mn,this,In).call(this,t);for(let[e,t]of r(An,this))Gn(e,t)}else{_n=null;for(let e of r(Cn,this))e(this);r(Cn,this).clear(),r(Tn,this)===0&&i(Mn,this,Ln).call(this),Vn(n),Vn(t),r(On,this).clear(),r(kn,this).clear(),r(Dn,this)?.resolve()}vn=null}capture(e,t){t!==mt&&!this.previous.has(e)&&this.previous.set(e,t),(e.f&we)===0&&(this.current.set(e,e.v),vn?.set(e,e.v))}activate(){_n=this,this.apply()}deactivate(){_n===this&&(_n=null,vn=null)}flush(){if(yn.length>0)_n=this,Rn();else if(r(Tn,this)===0&&!this.is_fork){for(let e of r(Cn,this))e(this);r(Cn,this).clear(),i(Mn,this,Ln).call(this),r(Dn,this)?.resolve()}this.deactivate()}discard(){for(let e of r(wn,this))e(this);r(wn,this).clear()}increment(e){a(Tn,this,r(Tn,this)+1),e&&a(En,this,r(En,this)+1)}decrement(e){a(Tn,this,r(Tn,this)-1),e&&a(En,this,r(En,this)-1),!r(jn,this)&&(a(jn,this,!0),an(()=>{a(jn,this,!1),i(Mn,this,Pn).call(this)?yn.length>0&&this.flush():this.revive()}))}revive(){for(let e of r(On,this))r(kn,this).delete(e),fn(e,O),Wn(e);for(let e of r(kn,this))fn(e,k),Wn(e);this.flush()}oncommit(e){r(Cn,this).add(e)}ondiscard(e){r(wn,this).add(e)}settled(){return(r(Dn,this)??a(Dn,this,oe())).promise}static ensure(){if(_n===null){let e=_n=new Nn;gn.add(_n),xn||an(()=>{_n===e&&e.flush()})}return _n}apply(){if(!(!Ft||!this.is_fork&&gn.size===1)){vn=new Map(this.current);for(let e of gn)if(e!==this)for(let[t,n]of e.previous)vn.has(t)||vn.set(t,n)}}}function Pn(){return this.is_fork||r(En,this)>0}function Fn(e,t,n){e.f^=D;for(var i=e.first;i!==null;){var a=i.f,o=(a&(T|E))!==0;if(!(o&&(a&D)!==0||(a&A)!==0||r(An,this).has(i))&&i.fn!==null){o?i.f^=D:(a&se)===0?Ft&&(a&(ce|le))!==0?n.push(i):ta(i)&&((a&ue)!==0&&r(kn,this).add(i),oa(i)):t.push(i);var s=i.first;if(s!==null){i=s;continue}}for(;i!==null;){var c=i.next;if(c!==null){i=c;break}i=i.parent}}}function In(e){for(var t=0;t<e.length;t+=1)hn(e[t],r(On,this),r(kn,this))}function Ln(){if(gn.size>1){this.previous.clear();var e=_n,t=vn,n=!0;for(let e of gn){if(e===this){n=!1;continue}let t=[];for(let[r,i]of this.current){if(e.current.has(r))if(n&&i!==e.current.get(r))e.current.set(r,i);else continue;t.push(r)}if(t.length===0)continue;let r=[...e.current.keys()].filter(e=>!this.current.has(e));if(r.length>0){var a=yn;yn=[];let n=new Set,o=new Map;for(let e of t)Hn(e,r,n,o);if(yn.length>0){_n=e,e.apply();for(let t of yn)i(Mn,e,Fn).call(e,t,[],[]);e.deactivate()}yn=a}}_n=e,vn=t}r(An,this).clear(),gn.delete(this)}function Rn(){var e=g?new Set:null;try{for(var t=0;yn.length>0;){var n=Nn.ensure();if(t++>1e3){if(g){var r=new Map;for(let e of n.current.keys())for(let[t,n]of e.updated??[]){var i=r.get(t);i||(i={error:n.error,count:0},r.set(t,i)),i.count+=n.count}for(let e of r.values())e.error&&console.error(e.error)}zn()}if(n.process(yn),Ir.clear(),g)for(let t of n.current.keys())e.add(t)}}finally{if(yn=[],bn=null,Sn=null,g)for(let t of e)t.updated=null}}function zn(){try{He()}catch(e){g&&x(e,`stack`,{value:``}),cn(e,bn)}}var Bn=null;function Vn(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(pe|A))===0&&ta(r)&&(Bn=new Set,oa(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&ji(r),Bn?.size>0)){Ir.clear();for(let e of Bn){if((e.f&(pe|A))!==0)continue;let t=[e],n=e.parent;for(;n!==null;)Bn.has(n)&&(Bn.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];(n.f&(pe|A))===0&&oa(n)}}Bn.clear()}}Bn=null}}function Hn(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let e=i.f;(e&w)===0?(e&(Ce|ue))!==0&&(e&O)===0&&Un(i,t,r)&&(fn(i,O),Wn(i)):Hn(i,t,n,r)}}function Un(e,t,n){let r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(let r of e.deps){if(y.call(t,r))return!0;if((r.f&w)!==0&&Un(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function Wn(e){var t=bn=e,n=t.b;if(n?.is_pending&&(e.f&(se|ce|le))!==0&&(e.f&me)===0){n.defer_effect(e);return}for(;t.parent!==null;){t=t.parent;var r=t.f;if(Sn!==null&&t===H&&(Ft||(e.f&ce)===0))return;if((r&(E|T))!==0){if((r&D)===0)return;t.f^=D}}yn.push(t)}function Gn(e,t){if(!((e.f&T)!==0&&(e.f&D)!==0)){(e.f&O)===0?(e.f&k)!==0&&t.m.push(e):t.d.push(e),fn(e,D);for(var n=e.first;n!==null;)Gn(n,t),n=n.next}}function Kn(e){let t=0,n=Br(0),r;return g&&Bt(n,`createSubscriber version`),()=>{gi()&&(U(n),Ci(()=>(t===0&&(r=la(()=>e(()=>Wr(n)))),t+=1,()=>{an(()=>{--t,t===0&&(r?.(),r=void 0,Wr(n))})})))}}var qn=he|ve;function Jn(e,t,n,r){new fr(e,t,n,r)}var Yn=new WeakMap,Xn=new WeakMap,Zn=new WeakMap,Qn=new WeakMap,$n=new WeakMap,er=new WeakMap,tr=new WeakMap,nr=new WeakMap,rr=new WeakMap,ir=new WeakMap,ar=new WeakMap,or=new WeakMap,sr=new WeakMap,cr=new WeakMap,lr=new WeakMap,ur=new WeakMap,dr=new WeakSet;class fr{constructor(o,s,c,l){t(this,dr),e(this,`parent`,void 0),e(this,`is_pending`,!1),e(this,`transform_error`,void 0),n(this,Yn,void 0),n(this,Xn,j?M:null),n(this,Zn,void 0),n(this,Qn,void 0),n(this,$n,void 0),n(this,er,null),n(this,tr,null),n(this,nr,null),n(this,rr,null),n(this,ir,0),n(this,ar,0),n(this,or,!1),n(this,sr,new Set),n(this,cr,new Set),n(this,lr,null),n(this,ur,Kn(()=>(a(lr,this,Br(r(ir,this))),g&&Bt(r(lr,this),`$effect.pending()`),()=>{a(lr,this,null)}))),a(Yn,this,o),a(Zn,this,s),a(Qn,this,e=>{var t=H;t.b=this,t.f|=de,c(e)}),this.parent=H.b,this.transform_error=l??this.parent?.transform_error??(e=>e),a($n,this,wi(()=>{if(j){let e=r(Xn,this);Ot();let t=e.data===ut;if(e.data.startsWith(dt)){let t=JSON.parse(e.data.slice(dt.length));i(dr,this,mr).call(this,t)}else t?i(dr,this,hr).call(this):i(dr,this,pr).call(this)}else i(dr,this,gr).call(this)},qn)),j&&a(Yn,this,M)}defer_effect(e){hn(e,r(sr,this),r(cr,this))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!r(Zn,this).pending}update_pending_count(e){i(dr,this,yr).call(this,e),a(ir,this,r(ir,this)+e),!(!r(lr,this)||r(or,this))&&(a(or,this,!0),an(()=>{a(or,this,!1),r(lr,this)&&Hr(r(lr,this),r(ir,this))}))}get_effect_pending(){return r(ur,this).call(this),U(r(lr,this))}error(e){var t=r(Zn,this).onerror;let n=r(Zn,this).failed;if(!t&&!n)throw e;r(er,this)&&(ki(r(er,this)),a(er,this,null)),r(tr,this)&&(ki(r(tr,this)),a(tr,this,null)),r(nr,this)&&(ki(r(nr,this)),a(nr,this,null)),j&&(Dt(r(Xn,this)),kt(),Dt(At()));var o=!1,s=!1;let c=()=>{if(o){Tt();return}o=!0,s&&Xe(),r(nr,this)!==null&&Mi(r(nr,this),()=>{a(nr,this,null)}),i(dr,this,vr).call(this,()=>{Nn.ensure(),i(dr,this,gr).call(this)})},l=e=>{try{s=!0,t?.(e,c),s=!1}catch(e){cn(e,r($n,this)&&r($n,this).parent)}n&&a(nr,this,i(dr,this,vr).call(this,()=>{Nn.ensure();try{return Ti(()=>{var t=H;t.b=this,t.f|=de,n(r(Yn,this),()=>e,()=>c)})}catch(e){return cn(e,r($n,this).parent),null}}))};an(()=>{var t;try{t=this.transform_error(e)}catch(e){cn(e,r($n,this)&&r($n,this).parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(l,e=>cn(e,r($n,this)&&r($n,this).parent)):l(t)})}}function pr(){try{a(er,this,Ti(()=>r(Qn,this).call(this,r(Yn,this))))}catch(e){this.error(e)}}function mr(e){let t=r(Zn,this).failed;t&&a(nr,this,Ti(()=>{t(r(Yn,this),()=>e,()=>()=>{})}))}function hr(){let e=r(Zn,this).pending;e&&(this.is_pending=!0,a(tr,this,Ti(()=>e(r(Yn,this)))),an(()=>{var e=a(rr,this,document.createDocumentFragment()),t=ii();e.append(t),a(er,this,i(dr,this,vr).call(this,()=>(Nn.ensure(),Ti(()=>r(Qn,this).call(this,t))))),r(ar,this)===0&&(r(Yn,this).before(e),a(rr,this,null),Mi(r(tr,this),()=>{a(tr,this,null)}),i(dr,this,_r).call(this))}))}function gr(){try{if(this.is_pending=this.has_pending_snippet(),a(ar,this,0),a(ir,this,0),a(er,this,Ti(()=>{r(Qn,this).call(this,r(Yn,this))})),r(ar,this)>0){var e=a(rr,this,document.createDocumentFragment());Ii(r(er,this),e);let t=r(Zn,this).pending;a(tr,this,Ti(()=>t(r(Yn,this))))}else i(dr,this,_r).call(this)}catch(e){this.error(e)}}function _r(){this.is_pending=!1;for(let e of r(sr,this))fn(e,O),Wn(e);for(let e of r(cr,this))fn(e,k),Wn(e);r(sr,this).clear(),r(cr,this).clear()}function vr(e){var t=H,n=V,i=P;Ui(r($n,this)),Hi(r($n,this)),Wt(r($n,this).ctx);try{return e()}catch(e){return sn(e),null}finally{Ui(t),Hi(n),Wt(i)}}function yr(e){if(!this.has_pending_snippet()){if(this.parent){var t;i(dr,t=this.parent,yr).call(t,e)}return}a(ar,this,r(ar,this)+e),r(ar,this)===0&&(i(dr,this,_r).call(this),r(tr,this)&&Mi(r(tr,this),()=>{a(tr,this,null)}),r(rr,this)&&(r(Yn,this).before(r(rr,this)),a(rr,this,null)))}function br(e,t,n,r){let i=$t()?Tr:Dr;var a=e.filter(e=>!e.settled);if(n.length===0&&a.length===0){r(t.map(i));return}var o=H,s=xr(),c=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function l(e){s();try{r(e)}catch(e){(o.f&pe)===0&&cn(e,o)}Sr()}if(n.length===0){c.then(()=>l(t.map(i)));return}function u(){s(),Promise.all(n.map(e=>Er(e))).then(e=>l([...t.map(i),...e])).catch(e=>cn(e,o))}c?c.then(u):u()}function xr(){var e=H,t=V,n=P,r=_n;if(g)var i=Gt;return function(a=!0){Ui(e),Hi(t),Wt(n),a&&r?.activate(),g&&Kt(i)}}function Sr(e=!0){Ui(null),Hi(null),Wt(null),e&&_n?.deactivate(),g&&Kt(null)}function Cr(){var e=H.b,t=_n,n=e.is_rendered();return e.update_pending_count(1),t.increment(n),()=>{e.update_pending_count(-1),t.decrement(n)}}var wr=new Set;function Tr(e){var t=w|O,n=V!==null&&(V.f&w)!==0?V:null;H!==null&&(H.f|=ve);let r={ctx:P,deps:null,effects:null,equals:Mt,f:t,fn:e,reactions:null,rv:0,v:mt,wv:0,parent:n??H,ac:null};return g&&Lt&&(r.created=Ht(`created at`)),r}function Er(e,t,n){H===null&&Fe();var r=void 0,i=Br(mt);g&&(i.label=t);var a=!V,o=new Map;return Si(()=>{var t=oe();r=t.promise;try{Promise.resolve(e()).then(t.resolve,t.reject).finally(Sr)}catch(e){t.reject(e),Sr()}var s=_n;if(a){var c=Cr();o.get(s)?.reject(ke),o.delete(s),o.set(s,t)}let l=(e,t=void 0)=>{if(s.activate(),t)t!==ke&&(i.f|=we,Hr(i,t));else{(i.f&we)!==0&&(i.f^=we),Hr(i,e);for(let[e,t]of o){if(o.delete(e),e===s)break;t.reject(ke)}g&&n!==void 0&&(wr.add(i),setTimeout(()=>{wr.has(i)&&(yt(i.label,n),wr.delete(i))}))}c&&c()};t.promise.then(l,e=>l(null,e||`unknown`))}),_i(()=>{for(let e of o.values())e.reject(ke)}),g&&(i.f|=Ce),new Promise(e=>{function t(n){function a(){n===r?e(i):t(r)}n.then(a,a)}t(r)})}function F(e){let t=Tr(e);return Ft||Gi(t),t}function Dr(e){let t=Tr(e);return t.equals=Pt,t}function Or(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)ki(t[n])}}var kr=[];function Ar(e){for(var t=e.parent;t!==null;){if((t.f&w)===0)return(t.f&pe)===0?t:null;t=t.parent}return null}function jr(e){var t,n=H;if(Ui(Ar(e)),g){let r=Fr;Lr(new Set);try{y.call(kr,e)&&Ie(),kr.push(e),e.f&=~xe,Or(e),t=ra(e)}finally{Ui(n),Lr(r),kr.pop()}}else try{e.f&=~xe,Or(e),t=ra(e)}finally{Ui(n)}return t}function Mr(e){var t=jr(e);if(!e.equals(t)&&(e.wv=ea(),(!_n?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){fn(e,D);return}zi||(vn===null?pn(e):(gi()||_n?.is_fork)&&vn.set(e,t))}function Nr(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.call(t),t.ac?.abort(ke),t.teardown=ie,t.ac=null,aa(t,0),Di(t))}function Pr(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&oa(t)}var Fr=new Set,Ir=new Map;function Lr(e){Fr=e}var Rr=!1;function zr(){Rr=!0}function Br(e,t){var n={f:0,v:e,reactions:null,equals:Mt,rv:0,wv:0};return g&&Lt&&(n.created=t??Ht(`created at`),n.updated=null,n.set_during_effect=!1,n.trace=null),n}function I(e,t){let n=Br(e,t);return Gi(n),n}function Vr(e,t=!1,n=!0){let r=Br(e);if(t||(r.equals=Pt),It&&n&&P!==null&&P.l!==null){var i;((i=P.l).s??(i.s=[])).push(r)}return r}function L(e,t,n=!1){V!==null&&(!Vi||(V.f&ge)!==0)&&$t()&&(V.f&(w|ue|Ce|ge))!==0&&(Wi===null||!y.call(Wi,e))&&Ye();let r=n?qr(t):t;return g&&Vt(r,e.label),Hr(e,r)}function Hr(e,t){if(!e.equals(t)){var n=e.v;zi?Ir.set(e,t):Ir.set(e,n),e.v=t;var r=Nn.ensure();if(r.capture(e,n),g){if(Lt||H!==null){e.updated??=new Map;let t=(e.updated.get(``)?.count??0)+1;if(e.updated.set(``,{error:null,count:t}),Lt||t>5){let t=Ht(`updated at`);if(t!==null){let n=e.updated.get(t.stack);n||(n={error:t,count:0},e.updated.set(t.stack,n)),n.count++}}}H!==null&&(e.set_during_effect=!0)}if((e.f&w)!==0){let t=e;(e.f&O)!==0&&jr(t),pn(t)}e.wv=ea(),Gr(e,O),$t()&&H!==null&&(H.f&D)!==0&&(H.f&(T|E))===0&&(Ji===null?Yi([e]):Ji.push(e)),!r.is_fork&&Fr.size>0&&!Rr&&Ur()}return t}function Ur(){Rr=!1;for(let e of Fr)(e.f&D)!==0&&fn(e,k),ta(e)&&oa(e);Fr.clear()}function Wr(e){L(e,e.v+1)}function Gr(e,t){var n=e.reactions;if(n!==null)for(var r=$t(),i=n.length,a=0;a<i;a++){var o=n[a],s=o.f;if(!(!r&&o===H)){if(g&&(s&ge)!==0){Fr.add(o);continue}var c=(s&O)===0;if(c&&fn(o,t),(s&w)!==0){var l=o;vn?.delete(l),(s&xe)===0&&(s&fe&&(o.f|=xe),Gr(l,k))}else c&&((s&ue)!==0&&Bn!==null&&Bn.add(o),Wn(o))}}}var Kr=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function qr(e){if(typeof e!=`object`||!e||Te in e)return e;let t=ne(e);if(t!==ee&&t!==te)return e;var n=new Map,r=_(e),i=I(0),a=g&&Lt?Ht(`created at`):null,o=Qi,s=e=>{if(Qi===o)return e();var t=V,n=Qi;Hi(null),$i(o);var r=e();return Hi(t),$i(n),r};r&&(n.set(`length`,I(e.length,a)),g&&(e=Zr(e)));var c=``;let l=!1;function u(e){if(!l){l=!0,c=e,Bt(i,`${c} version`);for(let[e,t]of n)Bt(t,Jr(c,e));l=!1}}return new Proxy(e,{defineProperty(e,t,r){(!(`value`in r)||r.configurable===!1||r.enumerable===!1||r.writable===!1)&&qe();var i=n.get(t);return i===void 0?s(()=>{var e=I(r.value,a);return n.set(t,e),g&&typeof t==`string`&&Bt(e,Jr(c,t)),e}):L(i,r.value,!0),!0},deleteProperty(e,t){var r=n.get(t);if(r===void 0){if(t in e){let e=s(()=>I(mt,a));n.set(t,e),Wr(i),g&&Bt(e,Jr(c,t))}}else L(r,mt),Wr(i);return!0},get(t,r,i){if(r===Te)return e;if(g&&r===Oe)return u;var o=n.get(r),l=r in t;if(o===void 0&&(!l||S(t,r)?.writable)&&(o=s(()=>{var e=I(qr(l?t[r]:mt),a);return g&&Bt(e,Jr(c,r)),e}),n.set(r,o)),o!==void 0){var d=U(o);return d===mt?void 0:d}return Reflect.get(t,r,i)},getOwnPropertyDescriptor(e,t){var r=Reflect.getOwnPropertyDescriptor(e,t);if(r&&`value`in r){var i=n.get(t);i&&(r.value=U(i))}else if(r===void 0){var a=n.get(t),o=a?.v;if(a!==void 0&&o!==mt)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return r},has(e,t){if(t===Te)return!0;var r=n.get(t),i=r!==void 0&&r.v!==mt||Reflect.has(e,t);return(r!==void 0||H!==null&&(!i||S(e,t)?.writable))&&(r===void 0&&(r=s(()=>{var n=I(i?qr(e[t]):mt,a);return g&&Bt(n,Jr(c,t)),n}),n.set(t,r)),U(r)===mt)?!1:i},set(e,t,o,l){var u=n.get(t),d=t in e;if(r&&t===`length`)for(var f=o;f<u.v;f+=1){var p=n.get(f+``);p===void 0?f in e&&(p=s(()=>I(mt,a)),n.set(f+``,p),g&&Bt(p,Jr(c,f))):L(p,mt)}if(u===void 0)(!d||S(e,t)?.writable)&&(u=s(()=>I(void 0,a)),g&&Bt(u,Jr(c,t)),L(u,qr(o)),n.set(t,u));else{d=u.v!==mt;var m=s(()=>qr(o));L(u,m)}var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(l,o),!d){if(r&&typeof t==`string`){var _=n.get(`length`),v=Number(t);Number.isInteger(v)&&v>=_.v&&L(_,v+1)}Wr(i)}return!0},ownKeys(e){U(i);var t=Reflect.ownKeys(e).filter(e=>{var t=n.get(e);return t===void 0||t.v!==mt});for(var[r,a]of n)a.v!==mt&&!(r in e)&&t.push(r);return t},setPrototypeOf(){Je()}})}function Jr(e,t){return typeof t==`symbol`?`${e}[Symbol(${t.description??``})]`:Kr.test(t)?`${e}.${t}`:/^\d+$/.test(t)?`${e}[${t}]`:`${e}['${t}']`}function Yr(e){try{if(typeof e==`object`&&e&&Te in e)return e[Te]}catch{}return e}var Xr=new Set([`copyWithin`,`fill`,`pop`,`push`,`reverse`,`shift`,`sort`,`splice`,`unshift`]);function Zr(e){return new Proxy(e,{get(e,t,n){var r=Reflect.get(e,t,n);return Xr.has(t)?function(...e){zr();var t=r.apply(this,e);return Ur(),t}:r}})}function Qr(){let e=Array.prototype,t=Array.__svelte_cleanup;t&&t();let{indexOf:n,lastIndexOf:r,includes:i}=e;e.indexOf=function(e,t){let r=n.call(this,e,t);if(r===-1){for(let n=t??0;n<this.length;n+=1)if(Yr(this[n])===e){Ct(`array.indexOf(...)`);break}}return r},e.lastIndexOf=function(e,t){let n=r.call(this,e,t??this.length-1);if(n===-1){for(let n=0;n<=(t??this.length-1);n+=1)if(Yr(this[n])===e){Ct(`array.lastIndexOf(...)`);break}}return n},e.includes=function(e,t){let n=i.call(this,e,t);if(!n){for(let t=0;t<this.length;t+=1)if(Yr(this[t])===e){Ct(`array.includes(...)`);break}}return n},Array.__svelte_cleanup=()=>{e.indexOf=n,e.lastIndexOf=r,e.includes=i}}var $r,ei,ti,ni;function ri(){if($r===void 0){$r=window,document,ei=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;ti=S(t,`firstChild`).get,ni=S(t,`nextSibling`).get,re(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),re(n)&&(n.__t=void 0),g&&(e.__svelte_meta=null,Qr())}}function ii(e=``){return document.createTextNode(e)}function ai(e){return ti.call(e)}function oi(e){return ni.call(e)}function R(e,t){if(!j)return ai(e);var n=ai(M);if(n===null)n=M.appendChild(ii());else if(t&&n.nodeType!==je){var r=ii();return n?.before(r),Dt(r),r}return t&&di(n),Dt(n),n}function si(e,t=!1){if(!j){var n=ai(e);return n instanceof Comment&&n.data===``?oi(n):n}if(t){if(M?.nodeType!==je){var r=ii();return M?.before(r),Dt(r),r}di(M)}return M}function z(e,t=1,n=!1){let r=j?M:e;for(var i;t--;)i=r,r=oi(r);if(!j)return r;if(n){if(r?.nodeType!==je){var a=ii();return r===null?i?.after(a):r.before(a),Dt(a),a}di(r)}return Dt(r),r}function ci(e){e.textContent=``}function li(){return!Ft||Bn!==null?!1:(H.f&me)!==0}function ui(e,t,n){let r=n?{is:n}:void 0;return document.createElementNS(t??gt,e,r)}function di(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===je;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function fi(e){var t=V,n=H;Hi(null),Ui(null);try{return e()}finally{Hi(t),Ui(n)}}function pi(e){H===null&&(V===null&&Ve(e),Be()),zi&&ze(e)}function mi(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function hi(e,t){var n=H;if(g)for(;n!==null&&(n.f&ge)!==0;)n=n.parent;n!==null&&(n.f&A)!==0&&(e|=A);var r={ctx:P,deps:null,nodes:null,f:e|O|fe,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};g&&(r.component_function=qt);var i=r;if((e&se)!==0)Sn===null?Wn(r):Sn.push(r);else if(t!==null){try{oa(r)}catch(e){throw ki(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&ve)===0&&(i=i.first,(e&ue)!==0&&(e&he)!==0&&i!==null&&(i.f|=he))}if(i!==null&&(i.parent=n,n!==null&&mi(i,n),V!==null&&(V.f&w)!==0&&(e&E)===0)){var a=V;(a.effects??=[]).push(i)}return r}function gi(){return V!==null&&!Vi}function _i(e){let t=hi(ce,null);return fn(t,D),t.teardown=e,t}function vi(e){pi(`$effect`),g&&x(e,`name`,{value:`$effect`});var t=H.f;if(!V&&(t&T)!==0&&(t&me)===0){var n=P;(n.e??=[]).push(e)}else return yi(e)}function yi(e){return hi(se|ye,e)}function bi(e){Nn.ensure();let t=hi(E|ve,e);return(e={})=>new Promise(n=>{e.outro?Mi(t,()=>{ki(t),n(void 0)}):(ki(t),n(void 0))})}function xi(e){return hi(se,e)}function Si(e){return hi(Ce|ve,e)}function Ci(e,t=0){return hi(ce|t,e)}function B(e,t=[],n=[],r=[]){br(r,t,n,t=>{hi(ce,()=>e(...t.map(U)))})}function wi(e,t=0){var n=hi(ue|t,e);return g&&(n.dev_stack=Gt),n}function Ti(e){return hi(T|ve,e)}function Ei(e){var t=e.teardown;if(t!==null){let e=zi,n=V;Bi(!0),Hi(null);try{t.call(null)}finally{Bi(e),Hi(n)}}}function Di(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&fi(()=>{e.abort(ke)});var r=n.next;(n.f&E)===0?ki(n,t):n.parent=null,n=r}}function Oi(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&T)===0&&ki(t),t=n}}function ki(e,t=!0){var n=!1;(t||(e.f&_e)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Ai(e.nodes.start,e.nodes.end),n=!0),Di(e,t&&!n),aa(e,0),fn(e,pe);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();Ei(e);var i=e.parent;i!==null&&i.first!==null&&ji(e),g&&(e.component_function=null),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Ai(e,t){for(;e!==null;){var n=e===t?null:oi(e);e.remove(),e=n}}function ji(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Mi(e,t,n=!0){var r=[];Ni(e,r,!0);var i=()=>{n&&ki(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function Ni(e,t,n){if((e.f&A)===0){e.f^=A;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next,o=(i.f&he)!==0||(i.f&T)!==0&&(e.f&ue)!==0;Ni(i,t,o?n:!1),i=a}}}function Pi(e){Fi(e,!0)}function Fi(e,t){if((e.f&A)!==0){e.f^=A,(e.f&D)===0&&(fn(e,O),Wn(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&he)!==0||(n.f&T)!==0;Fi(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function Ii(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:oi(n);t.append(n),n=i}}var Li=null,Ri=!1,zi=!1;function Bi(e){zi=e}var V=null,Vi=!1;function Hi(e){V=e}var H=null;function Ui(e){H=e}var Wi=null;function Gi(e){V!==null&&(!Ft||(V.f&w)!==0)&&(Wi===null?Wi=[e]:Wi.push(e))}var Ki=null,qi=0,Ji=null;function Yi(e){Ji=e}var Xi=1,Zi=0,Qi=Zi;function $i(e){Qi=e}function ea(){return++Xi}function ta(e){var t=e.f;if((t&O)!==0)return!0;if(t&w&&(e.f&=~xe),(t&k)!==0){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(ta(a)&&Mr(a),a.wv>e.wv)return!0}(t&fe)!==0&&vn===null&&fn(e,D)}return!1}function na(e,t,n=!0){var r=e.reactions;if(r!==null&&!(!Ft&&Wi!==null&&y.call(Wi,e)))for(var i=0;i<r.length;i++){var a=r[i];(a.f&w)===0?t===a&&(n?fn(a,O):(a.f&D)!==0&&fn(a,k),Wn(a)):na(a,t,!1)}}function ra(e){var t=Ki,n=qi,r=Ji,i=V,a=Wi,o=P,s=Vi,c=Qi,l=e.f;Ki=null,qi=0,Ji=null,V=(l&(T|E))===0?e:null,Wi=null,Wt(e.ctx),Vi=!1,Qi=++Zi,e.ac!==null&&(fi(()=>{e.ac.abort(ke)}),e.ac=null);try{e.f|=Se;var u=e.fn,d=u();e.f|=me;var f=e.deps,p=_n?.is_fork;if(Ki!==null){var m;if(p||aa(e,qi),f!==null&&qi>0)for(f.length=qi+Ki.length,m=0;m<Ki.length;m++)f[qi+m]=Ki[m];else e.deps=f=Ki;if(gi()&&(e.f&fe)!==0)for(m=qi;m<f.length;m++){var h;((h=f[m]).reactions??(h.reactions=[])).push(e)}}else !p&&f!==null&&qi<f.length&&(aa(e,qi),f.length=qi);if($t()&&Ji!==null&&!Vi&&f!==null&&(e.f&(w|k|O))===0)for(m=0;m<Ji.length;m++)na(Ji[m],e);if(i!==null&&i!==e){if(Zi++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=Zi;if(t!==null)for(let e of t)e.rv=Zi;Ji!==null&&(r===null?r=Ji:r.push(...Ji))}return(e.f&we)!==0&&(e.f^=we),d}catch(e){return sn(e)}finally{e.f^=Se,Ki=t,qi=n,Ji=r,V=i,Wi=a,Wt(o),Vi=s,Qi=c}}function ia(e,t){let n=t.reactions;if(n!==null){var r=v.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&(t.f&w)!==0&&(Ki===null||!y.call(Ki,t))){var a=t;(a.f&fe)!==0&&(a.f^=fe,a.f&=~xe),pn(a),Nr(a),aa(a,0)}}function aa(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)ia(e,n[r])}function oa(e){var t=e.f;if((t&pe)===0){fn(e,D);var n=H,r=Ri;if(H=e,Ri=!0,g){var i=qt;Jt(e.component_function);var a=Gt;Kt(e.dev_stack??Gt)}try{(t&(ue|le))===0?Di(e):Oi(e),Ei(e);var o=ra(e);if(e.teardown=typeof o==`function`?o:null,e.wv=Xi,g&&Lt&&(e.f&O)!==0&&e.deps!==null)for(var s of e.deps)s.set_during_effect&&=(s.wv=ea(),!1)}finally{Ri=r,H=n,g&&(Jt(i),Kt(a))}}}function U(e){var t=(e.f&w)!==0;if(Li?.add(e),V!==null&&!Vi&&!(H!==null&&(H.f&pe)!==0)&&(Wi===null||!y.call(Wi,e))){var n=V.deps;if((V.f&Se)!==0)e.rv<Zi&&(e.rv=Zi,Ki===null&&n!==null&&n[qi]===e?qi++:Ki===null?Ki=[e]:Ki.push(e));else{var r;((r=V).deps??(r.deps=[])).push(e);var i=e.reactions;i===null?e.reactions=[V]:y.call(i,V)||i.push(V)}}if(g&&(wr.delete(e),Lt&&!Vi&&zt!==null&&V!==null&&zt.reaction===V))if(e.trace)e.trace();else{var a=Ht(`traced at`);if(a){var o=zt.entries.get(e);o===void 0&&(o={traces:[]},zt.entries.set(e,o));var s=o.traces[o.traces.length-1];a.stack!==s?.stack&&o.traces.push(a)}}if(zi&&Ir.has(e))return Ir.get(e);if(t){var c=e;if(zi){var l=c.v;return((c.f&D)===0&&c.reactions!==null||ca(c))&&(l=jr(c)),Ir.set(c,l),l}var u=(c.f&fe)===0&&!Vi&&V!==null&&(Ri||(V.f&fe)!==0),d=(c.f&me)===0;ta(c)&&(u&&(c.f|=fe),Mr(c)),u&&!d&&(Pr(c),sa(c))}if(vn?.has(e))return vn.get(e);if((e.f&we)!==0)throw e.v;return e.v}function sa(e){if(e.f|=fe,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),(t.f&w)!==0&&(t.f&fe)===0&&(Pr(t),sa(t))}function ca(e){if(e.v===mt)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Ir.has(t)||(t.f&w)!==0&&ca(t))return!0;return!1}function la(e){var t=Vi;try{return Vi=!0,e()}finally{Vi=t}}[...`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`)];var ua=[`touchstart`,`touchmove`];function da(e){return ua.includes(e)}var fa=new Map;function pa(e,t){var n=fa.get(e);n||(n=new Set,fa.set(e,n)),n.add(t)}var ma=Symbol(`events`),ha=new Set,ga=new Set;function _a(e,t,n,r={}){function i(e){if(r.capture||Sa.call(t,e),!e.cancelBubble)return fi(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?an(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function va(e,t,n,r,i){var a={capture:r,passive:i},o=_a(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&_i(()=>{t.removeEventListener(e,o,a)})}function ya(e,t,n){(t[ma]??(t[ma]={}))[e]=n}function ba(e){for(var t=0;t<e.length;t++)ha.add(e[t]);for(var n of ga)n(e)}var xa=null;function Sa(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.call(e)||[],a=i[0]||e.target;xa=e;var o=0,s=xa===e&&e[ma];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[ma]=t;return}var l=i.indexOf(t);if(l===-1)return;c<=l&&(o=c)}if(a=i[o]||e.target,a!==t){x(e,`currentTarget`,{configurable:!0,get(){return a||n}});var u=V,d=H;Hi(null),Ui(null);try{for(var f,p=[];a!==null;){var m=a.assignedSlot||a.parentNode||a.host||null;try{var h=a[ma]?.[r];h!=null&&(!a.disabled||e.target===a)&&h.call(a,e)}catch(e){f?p.push(e):f=e}if(e.cancelBubble||m===t||m===null)break;a=m}if(f){for(let e of p)queueMicrotask(()=>{throw e});throw f}}finally{e[ma]=t,delete e.currentTarget,Hi(u),Ui(d)}}}var Ca=((c=globalThis)==null||(c=c.window)==null?void 0:c.trustedTypes)&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function wa(e){return Ca?.createHTML(e)??e}function Ta(e){var t=ui(`template`);return t.innerHTML=wa(e.replaceAll(`<!>`,`<!---->`)),t.content}function Ea(e,t){var n=H;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function W(e,t){var n=(t&st)!==0,r=(t&ct)!==0,i,a=!e.startsWith(`<!>`);return()=>{if(j)return Ea(M,null),M;i===void 0&&(i=Ta(a?e:`<!>`+e),n||(i=ai(i)));var t=r||ei?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=ai(t),s=t.lastChild;Ea(o,s)}else Ea(t,t);return t}}function Da(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=(t&st)!==0,a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(j)return Ea(M,null),M;if(!o){var e=ai(Ta(a));if(i)for(o=document.createDocumentFragment();ai(e);)o.appendChild(ai(e));else o=ai(e)}var t=o.cloneNode(!0);if(i){var n=ai(t),r=t.lastChild;Ea(n,r)}else Ea(t,t);return t}}function Oa(e,t){return Da(e,t,`svg`)}function ka(){if(j)return Ea(M,null),M;var e=document.createDocumentFragment(),t=document.createComment(``),n=ii();return e.append(t,n),Ea(t,n),e}function G(e,t){if(j){var n=H;((n.f&me)===0||n.nodes.end===null)&&(n.nodes.end=M),Ot();return}e!==null&&e.before(t)}function K(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=`${n}`)}function Aa(e,t){return Ma(e,t)}var ja=new Map;function Ma(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:o=!0,transformError:s}){ri();var c=void 0,l=bi(()=>{var o=n??t.appendChild(ii());Jn(o,{pending:()=>{}},t=>{Zt({});var n=P;if(a&&(n.c=a),i&&(r.$$events=i),j&&Ea(t,null),c=e(t,r)||{},j&&(H.nodes.end=M,M===null||M.nodeType!==Me||M.data!==ft))throw xt(),pt;Qt()},s);var l=new Set,u=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!l.has(r)){l.add(r);var i=da(r);for(let e of[t,document]){var a=ja.get(e);a===void 0&&(a=new Map,ja.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,Sa,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return u(b(ha)),ga.add(u),()=>{for(var e of l)for(let n of[t,document]){var r=ja.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,Sa),r.delete(e),r.size===0&&ja.delete(n)):r.set(e,i)}ga.delete(u),o!==n&&o.parentNode?.removeChild(o)}});return Na.set(c,l),c}var Na=new WeakMap;function Pa(e,t){let n=Na.get(e);return n?(Na.delete(e),n(t)):(g&&(Te in e?wt():St()),Promise.resolve())}var Fa=new WeakMap,Ia=new WeakMap,La=new WeakMap,Ra=new WeakMap,za=new WeakMap,Ba=new WeakMap,Va=new WeakMap;class Ha{constructor(t,i=!0){e(this,`anchor`,void 0),n(this,Fa,new Map),n(this,Ia,new Map),n(this,La,new Map),n(this,Ra,new Set),n(this,za,!0),n(this,Ba,e=>{if(r(Fa,this).has(e)){var t=r(Fa,this).get(e),n=r(Ia,this).get(t);if(n)Pi(n),r(Ra,this).delete(t);else{var i=r(La,this).get(t);i&&(r(Ia,this).set(t,i.effect),r(La,this).delete(t),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),n=i.effect)}for(let[t,n]of r(Fa,this)){if(r(Fa,this).delete(t),t===e)break;let i=r(La,this).get(n);i&&(ki(i.effect),r(La,this).delete(n))}for(let[e,i]of r(Ia,this)){if(e===t||r(Ra,this).has(e))continue;let a=()=>{if(Array.from(r(Fa,this).values()).includes(e)){var t=document.createDocumentFragment();Ii(i,t),t.append(ii()),r(La,this).set(e,{effect:i,fragment:t})}else ki(i);r(Ra,this).delete(e),r(Ia,this).delete(e)};r(za,this)||!n?(r(Ra,this).add(e),Mi(i,a,!1)):a()}}}),n(this,Va,e=>{r(Fa,this).delete(e);let t=Array.from(r(Fa,this).values());for(let[e,n]of r(La,this))t.includes(e)||(ki(n.effect),r(La,this).delete(e))}),this.anchor=t,a(za,this,i)}ensure(e,t){var n=_n,i=li();if(t&&!r(Ia,this).has(e)&&!r(La,this).has(e))if(i){var a=document.createDocumentFragment(),o=ii();a.append(o),r(La,this).set(e,{effect:Ti(()=>t(o)),fragment:a})}else r(Ia,this).set(e,Ti(()=>t(this.anchor)));if(r(Fa,this).set(n,e),i){for(let[t,i]of r(Ia,this))t===e?n.unskip_effect(i):n.skip_effect(i);for(let[t,i]of r(La,this))t===e?n.unskip_effect(i.effect):n.skip_effect(i.effect);n.oncommit(r(Ba,this)),n.ondiscard(r(Va,this))}else j&&(this.anchor=M),r(Ba,this).call(this,n)}}function q(e,t,n=!1){var r;j&&(r=M,Ot());var i=new Ha(e),a=n?he:0;function o(e,t){if(j){var n=jt(r);if(e!==(n===lt?0:n===ut?!1:parseInt(n.substring(1)))){var a=At();Dt(a),i.anchor=a,Et(!1),i.ensure(e,t),Et(!0);return}}i.ensure(e,t)}wi(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(!1,null)},a)}var Ua=Symbol(`NaN`);function Wa(e,t,n){j&&Ot();var r=new Ha(e),i=!$t();wi(()=>{var e=t();e!==e&&(e=Ua),i&&typeof e==`object`&&e&&(e={}),r.ensure(e,n)})}function Ga(e,t,n){for(var r=[],i=t.length,a,o=t.length,s=0;s<i;s++){let n=t[s];Mi(n,()=>{if(a){if(a.pending.delete(n),a.done.add(n),a.pending.size===0){var t=e.outrogroups;Ka(b(a.done)),t.delete(a),t.size===0&&(e.outrogroups=null)}}else --o},!1)}if(o===0){var c=r.length===0&&n!==null;if(c){var l=n,u=l.parentNode;ci(u),u.append(l),e.items.clear()}Ka(t,!c)}else a={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(a)}function Ka(e,t=!0){for(var n=0;n<e.length;n++)ki(e[n],t)}var qa;function Ja(e,t,n,r,i,a=null){var o=e,s=new Map;if((t&$e)!==0){var c=e;o=j?Dt(ai(c)):c.appendChild(ii())}j&&Ot();var l=null,u=Dr(()=>{var e=n();return _(e)?e:e==null?[]:b(e)}),d,f=!0;function p(){m.fallback=l,Xa(m,d,o,t,r),l!==null&&(d.length===0?(l.f&be)===0?Pi(l):(l.f^=be,Qa(l,null,o)):Mi(l,()=>{l=null}))}var m={effect:wi(()=>{d=U(u);var e=d.length;let c=!1;j&&jt(o)===ut!=(e===0)&&(o=At(),Dt(o),Et(!1),c=!0);for(var m=new Set,h=_n,_=li(),v=0;v<e;v+=1){j&&M.nodeType===Me&&M.data===ft&&(o=M,c=!0,Et(!1));var y=d[v],b=r(y,v);if(g){var x=r(y,v);b!==x&&Re(String(v),String(b),String(x))}var S=f?null:s.get(b);S?(S.v&&Hr(S.v,y),S.i&&Hr(S.i,v),_&&h.unskip_effect(S.e)):(S=Za(s,f?o:qa??=ii(),y,b,v,i,t,n),f||(S.e.f|=be),s.set(b,S)),m.add(b)}if(e===0&&a&&!l&&(f?l=Ti(()=>a(o)):(l=Ti(()=>a(qa??=ii())),l.f|=be)),e>m.size&&(g?eo(d,r):Le(``,``,``)),j&&e>0&&Dt(At()),!f)if(_){for(let[e,t]of s)m.has(e)||h.skip_effect(t.e);h.oncommit(p),h.ondiscard(()=>{})}else p();c&&Et(!0),U(u)}),flags:t,items:s,outrogroups:null,fallback:l};f=!1,j&&(o=M)}function Ya(e){for(;e!==null&&(e.f&T)===0;)e=e.next;return e}function Xa(e,t,n,r,i){var a=(r&et)!==0,o=t.length,s=e.items,c=Ya(e.effect.first),l,u=null,d,f=[],p=[],m,h,g,_;if(a){for(_=0;_<o;_+=1)if(m=t[_],h=i(m,_),g=s.get(h).e,(g.f&be)===0){var v;(v=g.nodes)==null||(v=v.a)==null||v.measure(),(d??=new Set).add(g)}}for(_=0;_<o;_+=1){if(m=t[_],h=i(m,_),g=s.get(h).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(g),t.done.delete(g);if((g.f&be)!==0)if(g.f^=be,g===c)Qa(g,null,n);else{var y=u?u.next:c;g===e.effect.last&&(e.effect.last=g.prev),g.prev&&(g.prev.next=g.next),g.next&&(g.next.prev=g.prev),$a(e,u,g),$a(e,g,y),Qa(g,y,n),u=g,f=[],p=[],c=Ya(u.next);continue}if((g.f&A)!==0&&(Pi(g),a)){var x;(x=g.nodes)==null||(x=x.a)==null||x.unfix(),(d??=new Set).delete(g)}if(g!==c){if(l!==void 0&&l.has(g)){if(f.length<p.length){var S=p[0],C;u=S.prev;var ee=f[0],te=f[f.length-1];for(C=0;C<f.length;C+=1)Qa(f[C],S,n);for(C=0;C<p.length;C+=1)l.delete(p[C]);$a(e,ee.prev,te.next),$a(e,u,ee),$a(e,te,S),c=S,u=te,--_,f=[],p=[]}else l.delete(g),Qa(g,c,n),$a(e,g.prev,g.next),$a(e,g,u===null?e.effect.first:u.next),$a(e,u,g),u=g;continue}for(f=[],p=[];c!==null&&c!==g;)(l??=new Set).add(c),p.push(c),c=Ya(c.next);if(c===null)continue}(g.f&be)===0&&f.push(g),u=g,c=Ya(g.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(Ka(b(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(c!==null||l!==void 0){var ne=[];if(l!==void 0)for(g of l)(g.f&A)===0&&ne.push(g);for(;c!==null;)(c.f&A)===0&&c!==e.fallback&&ne.push(c),c=Ya(c.next);var re=ne.length;if(re>0){var ie=(r&$e)!==0&&o===0?n:null;if(a){for(_=0;_<re;_+=1){var ae;(ae=ne[_].nodes)==null||(ae=ae.a)==null||ae.measure()}for(_=0;_<re;_+=1){var oe;(oe=ne[_].nodes)==null||(oe=oe.a)==null||oe.fix()}}Ga(e,ne,ie)}}a&&an(()=>{if(d!==void 0)for(g of d){var e;(e=g.nodes)==null||(e=e.a)==null||e.apply()}})}function Za(e,t,n,r,i,a,o,s){var c=(o&Ze)===0?null:(o&tt)===0?Vr(n,!1,!1):Br(n),l=(o&Qe)===0?null:Br(i);return g&&c&&(c.trace=()=>{s()[l?.v??i]}),{v:c,i:l,e:Ti(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function Qa(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&(t.f&be)===0?t.nodes.start:n;r!==null;){var o=oi(r);if(a.before(r),r===i)return;r=o}}function $a(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function eo(e,t){let n=new Map,r=e.length;for(let i=0;i<r;i++){let r=t(e[i],i);if(n.has(r)){let e=String(n.get(r)),t=String(i),a=String(r);a.startsWith(`[object `)&&(a=null),Le(e,t,a)}n.set(r,i)}}function to(e,t,n,r,i){j&&Ot();var a=t.$$slots?.[n],o=!1;a===!0&&(a=t[n===`default`?`children`:n],o=!0),a===void 0?i!==null&&i(e):a(e,o?()=>r:r)}function no(e,t,...n){var r=new Ha(e);wi(()=>{let e=t()??null;g&&e==null&&Ue(),r.ensure(e,e&&(t=>e(t,...n)))},he)}function ro(e,t){xi(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector(`#`+t.hash)){let e=ui(`style`);e.id=t.hash,e.textContent=t.code,r.appendChild(e),g&&pa(t.hash,e)}})}function io(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=io(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function ao(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=io(e))&&(r&&(r+=` `),r+=t);return r}function oo(e){return typeof e==`object`?ao(e):e??``}var so=[...`
50
- \r\f\xA0\v`];function co(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||so.includes(r[o-1]))&&(s===r.length||so.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function lo(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function uo(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function fo(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(uo)),i&&c.push(...Object.keys(i).map(uo));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=uo(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=lo(r)),i&&(n+=lo(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function po(e,t,n,r,i,a){var o=e.__className;if(j||o!==n||o===void 0){var s=co(n,r,a);(!j||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e.__className=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function mo(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function ho(e,t,n,r){var i=e.__style;if(j||i!==t){var a=fo(t,r);(!j||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e.__style=t}else r&&(Array.isArray(r)?(mo(e,n?.[0],r[0]),mo(e,n?.[1],r[1],`important`)):mo(e,n,r));return r}var go=Symbol(`is custom element`),_o=Symbol(`is html`),vo=Ae?`link`:`LINK`;function yo(e,t,n,r){var i=bo(e);if(j&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===vo)){r||Co(e,t,n??``);return}i[t]!==(i[t]=n)&&(t===`loading`&&(e[De]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&So(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function bo(e){return e.__attributes??={[go]:e.nodeName.includes(`-`),[_o]:e.namespaceURI===gt}}var xo=new Map;function So(e){var t=e.getAttribute(`is`)||e.nodeName,n=xo.get(t);if(n)return n;xo.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=C(i),r)r[o].set&&n.push(o);i=ne(i)}return n}function Co(e,t,n){g&&(t===`srcset`&&Eo(e,n)||wo(e.getAttribute(t)??``,n)||bt(t,e.outerHTML.replace(e.innerHTML,e.innerHTML&&`...`),String(n)))}function wo(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function To(e){return e.split(`,`).map(e=>e.trim().split(` `).filter(Boolean))}function Eo(e,t){var n=To(e.srcset),r=To(t);return r.length===n.length&&r.every(([e,t],r)=>t===n[r][1]&&(wo(n[r][0],e)||wo(e,n[r][0])))}var Do=new WeakMap,Oo=new WeakMap,ko=new WeakMap,Ao=new WeakSet;class jo{constructor(e){t(this,Ao),n(this,Do,new WeakMap),n(this,Oo,void 0),n(this,ko,void 0),a(ko,this,e)}observe(e,t){var n=r(Do,this).get(e)||new Set;return n.add(t),r(Do,this).set(e,n),i(Ao,this,Mo).call(this).observe(e,r(ko,this)),()=>{var n=r(Do,this).get(e);n.delete(t),n.size===0&&(r(Do,this).delete(e),r(Oo,this).unobserve(e))}}}l=jo;function Mo(){return r(Oo,this)??a(Oo,this,new ResizeObserver(e=>{for(var t of e){l.entries.set(t.target,t);for(var n of r(Do,this).get(t.target)||[])n(t)}}))}e(jo,`entries`,new WeakMap);function No(e,t){return e===t||e?.[Te]===t}function Po(e={},t,n,r){return xi(()=>{var i,a;return Ci(()=>{i=a,a=r?.()||[],la(()=>{e!==n(...a)&&(t(e,...a),i&&No(n(...i),e)&&t(null,...i))})}),()=>{an(()=>{a&&No(n(...a),e)&&t(null,...a)})}}),e}function Fo(e,t,n){if(e==null)return t(void 0),n&&n(void 0),ie;let r=la(()=>e.subscribe(t,n));return r.unsubscribe?()=>r.unsubscribe():r}var Io=[];function Lo(e,t){return{subscribe:J(e,t).subscribe}}function J(e,t=ie){let n=null,r=new Set;function i(t){if(Nt(e,t)&&(e=t,n)){let t=!Io.length;for(let t of r)t[1](),Io.push(t,e);if(t){for(let e=0;e<Io.length;e+=2)Io[e][0](Io[e+1]);Io.length=0}}}function a(t){i(t(e))}function o(o,s=ie){let c=[o,s];return r.add(c),r.size===1&&(n=t(i,a)||ie),o(e),()=>{r.delete(c),r.size===0&&n&&(n(),n=null)}}return{set:i,update:a,subscribe:o}}function Ro(e,t,n){let r=!Array.isArray(e),i=r?[e]:e;if(!i.every(Boolean))throw Error(`derived() expects stores as input, got a falsy value`);let a=t.length<2;return Lo(n,(e,n)=>{let o=!1,s=[],c=0,l=ie,u=()=>{if(c)return;l();let i=t(r?s[0]:s,e,n);a?e(i):l=typeof i==`function`?i:ie},d=i.map((e,t)=>Fo(e,e=>{s[t]=e,c&=~(1<<t),o&&u()},()=>{c|=1<<t}));return o=!0,u(),function(){ae(d),l(),o=!1}})}function Y(e){let t;return Fo(e,e=>t=e)(),t}var zo=!1,Bo=Symbol();function X(e,t,n){let r=n[t]??(n[t]={store:null,source:Vr(void 0),unsubscribe:ie});if(g&&(r.source.label=t),r.store!==e&&!(Bo in n))if(r.unsubscribe(),r.store=e??null,e==null)r.source.v=void 0,r.unsubscribe=ie;else{var i=!0;r.unsubscribe=Fo(e,e=>{i?r.source.v=e:L(r.source,e)}),i=!1}return e&&Bo in n?Y(e):U(r.source)}function Vo(){let e={};function t(){_i(()=>{for(var t in e)e[t].unsubscribe();x(e,Bo,{enumerable:!1,value:!0})})}return[e,t]}function Ho(e){var t=zo;try{return zo=!1,[e(),zo]}finally{zo=t}}function Uo(e,t,n,r){var i=!It||(n&rt)!==0,a=(n&at)!==0,o=(n&ot)!==0,s=r,c=!0,l=()=>(c&&(c=!1,s=o?la(r):r),s),u;if(a){var d=Te in e||Ee in e;u=S(e,t)?.set??(d&&t in e?n=>e[t]=n:void 0)}var f,p=!1;a?[f,p]=Ho(()=>e[t]):f=e[t],f===void 0&&r!==void 0&&(f=l(),u&&(i&&We(t),u(f)));var m=i?()=>{var n=e[t];return n===void 0?l():(c=!0,n)}:()=>{var n=e[t];return n!==void 0&&(s=void 0),n===void 0?s:n};if(i&&(n&it)===0)return m;if(u){var h=e.$$legacy;return function(e,t){return arguments.length>0?((!i||!t||h||p)&&u(t?m():e),e):m()}}var _=!1,v=((n&nt)===0?Dr:Tr)(()=>(_=!1,m()));g&&(v.label=t),a&&U(v);var y=H;return function(e,t){if(arguments.length>0){let n=t?U(v):i&&a?qr(e):e;return L(v,n),_=!0,s!==void 0&&(s=n),e}return zi&&_||(y.f&pe)!==0?v.v:U(v)}}if(g){let e=function(e){if(!(e in globalThis)){let t;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(t!==void 0)return t;Ge(e)},set:e=>{t=e}})}};e(`$state`),e(`$effect`),e(`$derived`),e(`$inspect`),e(`$props`),e(`$bindable`)}function Wo(e){P===null&&Pe(`onMount`),It&&P.l!==null?Ko(P).m.push(e):vi(()=>{let t=la(e);if(typeof t==`function`)return t})}function Go(e){P===null&&Pe(`onDestroy`),Wo(()=>()=>la(e))}function Ko(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}var qo={debugLog:!1,devNullLog:!1,defaultLanguage:m.RU,downloadVKLanguages:!0,updateBuiltinLanguages:!0,showSupport:!0,supportLink:`https://vk.com/support?act=new&from=v`,showLogo:void 0,logoLink:`https://vk.com/video`,logoType:`vk_video`,volumeDefault:1,volumeMinRestore:.05,loaderDelay:500,minSubtitlesFontSize:13,autoSubtitlesTimeout:2e3,trafficSavingLimit:h.Q_480P,highQualityLimit:h.Q_720P,features:{autoplay:!0,statistics:!0,thinStatistics:!1,preload:!0,subtitles:!0,fullscreen:!0,download:!0,liveRewind:!0,playbackRate:!0,trafficSaving:!0,copyVideoLink:!0,videoRotate:!0,audioLanguages:!1,saveRate:!1,fullscreenInternalTargetPlayerContainer:!1,endScreen:!0,previewNoEmptySpace:!1,exposeInternalsToGlobal:!1,userVideoPrefs:!1,initSubtitles:!0},controls:{playbackRateMin:.25,playbackRateMax:2,playbackRateStep:.25},ads:{enable:void 0,initTimeout:2e3,loadTimeout:2e3,runtimeTimeout:5e3,slot:void 0,preview:void 0,paramsOverride:void 0,isMobileGoToSiteButton:!0,useAdmanFromNPM:!1,volumeMultiplier:1,isVsidOriginal:!1},userSalt:`0`},Jo=e=>p(e,qo),Yo=`ui-config`,Xo=()=>Yt(Yo);import{cloneDeepWith as Zo,devNull as Qo,ErrorCategory as $o,getMessageFromError as es,getPlayerId as ts,getWindow as ns,InterfaceLanguage as rs,Logger as is,Subscription as as}from"@vkontakte/videoplayer-shared/es2015";var os=`5`;if(typeof window<`u`){var ss,cs;((ss=(cs=window).__svelte??(cs.__svelte={})).v??(ss.v=new Set)).add(os)}Rt();var ls=`var(--btn-color, #fff)`,us=Oa(`<g filter="url(#strokeAndShadow)"><!></g><defs><filter x="-12" width="72" y="-12" height="72" id="strokeAndShadow"><feMorphology operator="dilate" radius=".4" result="outer"></feMorphology><feFlood flood-color="rgba(0,0,0,0.1)" result="outerColor"></feFlood><feComposite operator="in" in="outerColor" in2="outer" result="outerOutline"></feComposite><feDropShadow in="SourceGraphic" dx="0" dy="0" stdDeviation="3" flood-color="rgba(0,0,0,0.4)" result="outerShadow"></feDropShadow><feMerge><feMergeNode in="outerShadow"></feMergeNode><feMergeNode in="outerOutline"></feMergeNode><feMergeNode in="SourceGraphic"></feMergeNode></feMerge></filter></defs>`,1),ds=Oa(`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill-rule="evenodd" clip-rule="evenodd"><!></svg>`);function fs(e,t){Zt(t,!0);let n=Uo(t,`width`,19,()=>`14`),r=Uo(t,`height`,19,()=>`14`),i=Uo(t,`fill`,3,ls),a=F(()=>t.viewBox??`0 0 ${n()} ${r()}`);var o=ds(),s=R(o),c=e=>{var n=us(),r=si(n);no(R(r),()=>t.children),N(r),kt(),G(e,n)},l=e=>{var n=ka();no(si(n),()=>t.children),G(e,n)};q(s,e=>{t.shadow?e(c):e(l,!1)}),N(o),B(()=>{yo(o,`aria-label`,t.ariaLabel),yo(o,`aria-hidden`,!t.ariaLabel),yo(o,`width`,n()),yo(o,`height`,r()),yo(o,`viewBox`,U(a)),yo(o,`fill`,i()),ho(o,t.style),yo(o,`data-testid`,t.testId)}),G(e,o),Qt()}var ps=Oa(`<path d="M460 194a4 4 0 0 1 4-4h122a4 4 0 0 1 4 4v82a4 4 0 0 1-4 4H464a4 4 0 0 1-4-4zm6 3a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm112-72a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm-71-37a6 6 0 1 0 0-12 6 6 0 0 0 0 12m36 0a6 6 0 1 0 0-12 6 6 0 0 0 0 12m-18.05 15c6.05 0 11.62 4.45 11.94 4.65 2.11 1.35 3.26.77 3.96.16s1.15-2.81-1.04-4.66c-1.74-1.48-5.8-5.16-14.86-5.15s-12.95 3.5-14.8 5.18c-1.83 1.69-2.28 3.5-.96 4.66s2.31 1.16 4.35-.33c0 .01 5.36-4.51 11.41-4.51"></path>`);function ms(e){fs(e,{width:`200`,height:`200`,viewBox:`460 190 130 90`,testId:`error-icon`,children:(e,t)=>{G(e,ps())},$$slots:{default:!0}})}var hs=W(`<div class="container s-2"><!></div>`),gs={hash:`s-2`,code:`.container.s-2{align-items:center;background:#000;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}`};function _s(e){ro(e,gs);var t=hs();ms(R(t),{}),N(t),G(e,t)}var vs=W(`<div class="playerError s-0"><!></div>`),ys={hash:`s-0`,code:`.playerError.s-0{align-items:center;background-color:#222;background-position:50%;background-size:cover;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;position:relative;width:100%}`};function bs(e){ro(e,ys);var t=vs();_s(R(t),{}),N(t),G(e,t)}function xs(e,t){let n=new Set([...Object.keys(e),...Object.keys(t)]),r={};for(let i of n)r[i]=t[i]??e[i]??void 0;return r}var Ss=`ui-tv`,Cs=`error-tracer`;import{MediascopePixel as ws,OneStat as Ts,ThinOneStat as Es}from"@vkontakte/videoplayer-statistics/es2015";import{Subscription as Ds}from"@vkontakte/videoplayer-shared/es2015";class Os{constructor(t=void 0,n=void 0,r=void 0,i=new Ds){e(this,`oneStat`,void 0),e(this,`thinOneStat`,void 0),e(this,`mediascopePixel`,void 0),e(this,`statSubscription`,void 0),this.oneStat=t,this.thinOneStat=n,this.mediascopePixel=r,this.statSubscription=i}destroy(){this.oneStat?.destroy(),this.thinOneStat?.destroy(),this.mediascopePixel?.destroy(),this.statSubscription.unsubscribe()}}import{Player as ks,VideoQuality as As}from"@vkontakte/videoplayer-core/es2015";import{assertNonNullable as js,cloneDeep as Ms,ErrorCategory as Ns,getMessageFromError as Ps,Logger as Fs,Subscription as Is,TracerFactory as Ls}from"@vkontakte/videoplayer-shared/es2015";import{promiseFinally as Rs}from"@vkontakte/videoplayer-shared/es2015";import{objectEntries as zs}from"@vkontakte/videoplayer-shared/es2015";import{objectFromEntries as Bs}from"@vkontakte/videoplayer-shared/es2015";import{addScript as Vs,clearVideoElement as Hs,detectEmbed as Us,devNull as Z,isNonNullable as Ws,nowInt as Q,Subject as Gs}from"@vkontakte/videoplayer-shared/es2015";var Ks=`//ad.mail.ru/static/admanhtml/rbadman-html5.min.js`;class qs{constructor(t,n){e(this,`adman`,null),e(this,`initialVolume`,1),e(this,`volumeMultiplier`,void 0),e(this,`videoElement`,null),e(this,`currentAdSection`,null),e(this,`actions`,null),e(this,`adsState`,null),e(this,`playerState`,null),e(this,`ordIds`,[]),e(this,`isDestroyed`,void 0),e(this,`log`,void 0),e(this,`loadTimeout`,void 0),e(this,`initTimeout`,void 0),e(this,`runtimeTimeout`,void 0),e(this,`useAdmanFromNPM`,void 0),e(this,`isVsidOriginal`,void 0),e(this,`watchDogTimeout`,void 0),e(this,`externalApi`,void 0),e(this,`events`,{init$:new Gs,loadStarted$:new Gs,loadEnded$:new Gs,loadError$:new Gs,ready$:new Gs,slotRequested$:new Gs,started$:new Gs,timeRemained$:new Gs,paused$:new Gs,resumed$:new Gs,ended$:new Gs,empty$:new Gs,skipped$:new Gs,clicked$:new Gs,closed$:new Gs,error$:new Gs}),e(this,`loadAdman`,e=>(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_load_start`,this.useAdmanFromNPM?`npm`:`http`],numbers:[Q()]}),this.useAdmanFromNPM?this.loadAdmanNPM(e):this.loadAdmanMailRu(e))),e(this,`loadAdmanMailRu`,e=>new Promise((t,n)=>{let r;this.events.loadStarted$.next();let i=()=>{clearTimeout(r),delete window.admanAsyncInit,window.AdmanHTML?(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_async_init_done`,`http`],numbers:[Q()]}),t(),this.events.loadEnded$.next()):(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_init_timed_out`,`http`],numbers:[Q()]}),n())};Vs(Ks,e,this.loadTimeout).then(()=>{Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_script_loaded`,`http`],numbers:[Q()]}),window.AdmanHTML?(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_already_inited`,`http`],numbers:[Q()]}),t(),this.events.loadEnded$.next()):(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_wait_async_init`,`http`],numbers:[Q()]}),window.admanAsyncInit=i,r=window.setTimeout(i,this.initTimeout))}).catch(e=>{Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_script_load_error`,`http`,String(e)],numbers:[Q()]}),n(),clearTimeout(r)})})),e(this,`loadAdmanNPM`,e=>new Promise((t,n)=>{let r;this.events.loadStarted$.next();let i=()=>{clearTimeout(r),delete window.admanAsyncInit,window.AdmanHTML?(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_init_done`,`npm`],numbers:[Q()]}),t(),this.events.loadEnded$.next()):(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_init_timed_out`,`npm`],numbers:[Q()]}),n())},a=()=>{o=!0,n()},o=!1,s=window.setTimeout(()=>{Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_load_timed_out`,`npm`],numbers:[Q()]}),a()},this.loadTimeout);e.addEventListener(`abort`,a),e.aborted&&(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_load_aborted`,`npm`],numbers:[Q()]}),a()),window.AdmanHTML=window.AdmanHTML||null,Rs(import(`@adtech/rbadman/out/rbadman-html5.min.js`).then(()=>{Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_chunk_imorted`,`npm`,`failed: `+String(o)],numbers:[Q()]}),!o&&(window.AdmanHTML?(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_already_inited`,`npm`],numbers:[Q()]}),t(),this.events.loadEnded$.next()):(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_wait_async_init`,`npm`],numbers:[Q()]}),window.admanAsyncInit=i,r=window.setTimeout(i,this.initTimeout)))},a),()=>{clearTimeout(r),clearTimeout(s),e.removeEventListener(`abort`,a)})})),e(this,`onAdsReady`,()=>{Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ads_ready`],numbers:[Q()]}),this.log({message:`ads ready`}),this.events.ready$.next(),this.startPreroll()}),e(this,`onAdStarted`,(e,t)=>{this.ordIds.push(t.ordID),Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_started`,e,`muted: `+t.muted],numbers:[Q(),t.bannerID]}),this.adsState&&this.playerState&&this.actions?(this.log({message:`ad started, section: ${e}, banner: ${JSON.stringify(t)}`}),this.events.started$.next(e),t.muted&&(this.setVolume(0),this.actions.setMuted(!0),this.log({message:`ad muted start`})),this.adsState.duration.set(t.duration),this.adsState.playbackState.set(`playing`),this.adsState.canSkip.set(t.allowClose),this.adsState.secondsToWatchBeforeSkip.set(t.allowCloseDelay),this.startWatchDog(),this.externalApi?.videoTrackAdEvent&&this.safeExternalCall(this.externalApi.videoTrackAdEvent,e,String(t.bannerID))):this.onAdError(`Started callback failed: Adman is not initialized`)}),e(this,`onAdTimeRemained`,e=>{(this.adsState?.playbackState?Y(this.adsState.playbackState):void 0)!==`inactive`&&(this.adsState?(this.adsState.position.set(e.currentTime),this.events.timeRemained$.next(e),this.startWatchDog()):this.onAdError(`TimeRemained callback failed: Adman state is not initialized`))}),e(this,`onAdPaused`,()=>{Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_pased`,this.currentAdSection??``],numbers:[Q()]}),this.stopWatchDog(),this.adsState?(this.log({message:`ad paused`}),this.adsState.playbackState.set(`paused`)):this.onAdError(`Paused callback failed: Adman state is not initialized`)}),e(this,`onAdPlayed`,()=>{Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_played`,this.currentAdSection??``],numbers:[Q()]}),this.startWatchDog(),this.adsState?(this.log({message:`ad played`}),this.adsState.playbackState.set(`playing`)):this.onAdError(`Player callback failed: Adman is not initialized`)}),e(this,`onAdMidrollPoint`,()=>{if(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_midroll_pioint`],numbers:[Q()]}),this.adman&&this.actions){this.log({message:`midroll point`}),this.actions.switchFromVideoToAds(),this.currentAdSection=`midroll`,this.startWatchDog();try{this.adman.start(`midroll`)}catch{this.onAdError(`could not start midroll`)}}else this.onAdError(`Midroll callback failed: Adman is not initialized`)}),e(this,`onAdSkipped`,()=>{Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_skipped`,this.currentAdSection??``],numbers:[Q()]}),this.log({message:`ad skipped`}),this.stopWatchDog()}),e(this,`onAdClosed`,()=>{Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_closed`,this.currentAdSection??``],numbers:[Q()]}),this.log({message:`ad closed`}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()}),e(this,`onAdCompleted`,()=>{Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_completed`,this.currentAdSection??``],numbers:[Q()]}),this.log({message:`ad completed`}),this.currentAdSection?((this.adsState?Y(this.adsState.playbackState):void 0)===`inactive`&&(this.onAdError(`Ad was inited, but can't playing`),this.events.ended$.next({section:this.currentAdSection,ordIds:this.ordIds})),this.currentAdSection===`postroll`&&this.setPostrollPassed(!0)):this.events.empty$.next(),this.switchToVideo(),this.stopWatchDog()}),e(this,`onAdClicked`,()=>{Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_clicked`,this.currentAdSection??``],numbers:[Q()]}),this.log({message:`ad clicked`}),this.videoElement?.pause(),this.currentAdSection&&this.events.clicked$.next(this.currentAdSection),this.stopWatchDog()}),e(this,`onAdError`,(e=`ad error`)=>{Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_error`,e],numbers:[Q()]}),this.log({message:e}),this.events.error$.next(e),this.currentAdSection===`postroll`&&this.setPostrollPassed(!0),this.switchToVideo(!0),this.stopWatchDog()}),this.log=t.createComponentLog(`AdmanWrapper`),Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_created`],numbers:[Q()]}),this.loadTimeout=n.loadTimeout,this.initTimeout=n.initTimeout,this.runtimeTimeout=n.runtimeTimeout,this.useAdmanFromNPM=n.useAdmanFromNPM,this.volumeMultiplier=Math.max(0,Math.min(n.volumeMultiplier,1)),this.isVsidOriginal=n.isVsidOriginal}init(e,t,n){this.actions=e,this.adsState=t,this.playerState=n}onAdmanLoadingError(){this.onAdError(`adman loading error`)}initAdman(e){var t=this;return s(function*(){if(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_init`,`already inited: `+!!t.adman],numbers:[Q(),e.slotId]}),t.adman)return;t.events.init$.next(e.slotId),t.startWatchDog();let{width:n,height:r,isAutoplay:i,adsContainer:a,adsVideoElement:s,slotId:c,params:l={},paramsOverride:u={},duration:d,externalApi:f}=e;t.externalApi=f;let p,m=t.playerState&&Y(t.playerState.vsid);m&&(p=t.isVsidOriginal?m:parseInt(m,36));let{isEmbed:h,immediateOrigin:g}=Us(),_=(h?g:window.location.href)??window.location.href,v=o(o(o({},l),{},{dl:encodeURIComponent(_),autoplay:i?1:0,player_width:n,player_height:r},p?{request_id:p}:{}),{},{duration:d},u);v=Bs(zs(v).filter(([e,t])=>Ws(t)));let y={slot:c,wrapper:a,videoEl:s,videoQuality:r,params:v,browser:{mobile:!1}};try{let n=new window.AdmanHTML;if(n.onReady(t.onAdsReady),n.onStarted(t.onAdStarted),n.onPlayed(t.onAdPlayed),n.onPaused(t.onAdPaused),n.adMidrollPoint(t.onAdMidrollPoint),n.onClosed(t.onAdClosed),n.onSkipped(t.onAdSkipped),n.onClicked(t.onAdClicked),n.onTimeRemained(t.onAdTimeRemained),n.onCompleted(t.onAdCompleted),n.onError(t.onAdError),n.setDebug(!1),t.externalApi?.videoGetAds){let e=yield t.safeExternalCall(t.externalApi.videoGetAds,v);e&&(delete y.slot,delete y.params,Object.assign(y,{json:e}))}n.init(y),t.adman=n,t.videoElement=s;let r=Object.keys(e.json?.sections??{}).join(`, `);t.events.slotRequested$.next(r),t.log({message:`adman init, config: ${JSON.stringify(y)}`})}catch(e){Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_init_threw`,String(e)],numbers:[Q()]}),t.onAdError(`could not init adman`)}})()}switchToVideo(e=!1){if(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_switch_to_video`,this.currentAdSection??``,`force: `+e],numbers:[Q()]}),this.currentAdSection===null&&!e){this.log({message:`switch to video, no currentAdSection. can't switch`});return}let t=this.currentAdSection===`postroll`;if(this.actions){var n;if(this.adsState&&this.playerState)this.adsState.playbackState.set(`inactive`),this.currentAdSection=null,this.log({message:`switch to video, isPostroll: ${t}`});else{let e=`Switch to video: Adman state was not updated correctly`;this.log({message:e}),this.events.error$.next(e)}(n=this.actions).switchFromAdsToVideo?.call(n,!t)}}setPostrollPassed(e){this.adsState?.postrollPassed.set(e),this.log({message:`postroll passed`})}togglePlay(){if(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_toggle_play`,this.currentAdSection??``],numbers:[Q()]}),this.adsState){this.log({message:`toggle play`});let e=Y(this.adsState.playbackState);e===`playing`?this.pause():e===`paused`&&this.play()}else this.onAdError(`Can not toggle play: Adman state is not initialized`)}setInitialVolume(e){this.log({message:`set initial volume ${e}`}),this.initialVolume=e}setVolume(e){let t=e*this.volumeMultiplier;if(this.log({message:`set volume ${t}`}),this.adman)try{this.adman.setVolume(t)}catch{this.onAdError(`could not set ad volume`)}this.videoElement&&(this.videoElement.volume=t)}setFullscreen(e){if(this.log({message:`set fullscreen ${e}`}),this.adman)try{this.adman.setFullscreen(e)}catch{this.onAdError(`could not set ad fullscreen`)}}startPreroll(){if(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_start_preroll`],numbers:[Q()]}),this.adman){if(!this.isDestroyed){this.log({message:`start preroll`}),this.setVolume(this.initialVolume),this.currentAdSection=`preroll`,this.startWatchDog();try{this.adman.start(`preroll`)}catch{this.onAdError(`could not start preroll`)}}}else this.onAdError(`Can not start preroll: Adman is not initialized`)}startPostroll(){if(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_start_postroll`,this.currentAdSection??``],numbers:[Q()]}),this.adman&&this.actions){this.log({message:`start postroll`}),this.actions.switchFromVideoToAds(),this.currentAdSection=`postroll`,this.startWatchDog();try{this.adman.start(`postroll`)}catch{this.onAdError(`could not start postroll`)}}else this.onAdError(`Can not start postroll: Adman is not initialized`)}startWatchDog(){this.watchDogTimeout&&this.stopWatchDog(),this.watchDogTimeout=window.setTimeout(()=>this.onAdError(`Watchdog timeout`),this.runtimeTimeout)}stopWatchDog(){clearTimeout(this.watchDogTimeout)}play(){if(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_pplay`,this.currentAdSection??``],numbers:[Q()]}),this.adman){this.log({message:`ad play`}),this.startWatchDog();try{this.adman.resume(),this.events.resumed$.next()}catch{this.onAdError(`could not resume ad`)}}else this.onAdError(`Can not play: Adman is not initialized`)}pause(){if(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_pause`,this.currentAdSection??``],numbers:[Q()]}),this.adman){this.stopWatchDog(),this.log({message:`ad pause`});try{this.adman.pause(),this.events.paused$.next()}catch{this.onAdError(`could not pause ad`)}}else this.onAdError(`Can not pause: Adman is not initialized`)}skip(){if(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_skip`,this.currentAdSection??``],numbers:[Q()]}),this.adman){this.stopWatchDog(),this.log({message:`ad skip`});try{this.adman.skip(),this.events.skipped$.next()}catch{this.onAdError(`could not skip ad`)}}else this.onAdError(`Can not skip: Adman is not initialized`)}setPosition(e,t){this.adman?.setPosition(Math.floor(e),Math.floor(t))}destroy(){Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_destroy`],numbers:[Q()]}),this.log({message:`destroy`}),this.stopWatchDog(),this.adman?.onReady(void 0),this.adman?.onStarted(void 0),this.adman?.onPlayed(void 0),this.adman?.onPaused(void 0),this.adman?.adMidrollPoint(void 0),this.adman?.onClosed(void 0),this.adman?.onSkipped(void 0),this.adman?.onClicked(void 0),this.adman?.onTimeRemained(void 0),this.adman?.onCompleted(void 0),this.adman?.onError(void 0),this.adman?.destroy(),this.videoElement&&Hs(this.videoElement),this.isDestroyed=!0}safeExternalCall(e,...t){var n=this;return s(function*(){try{return yield e(...t)}catch(e){return n.onAdError(e?.message??`External call failed`),null}})()}}import{objectValues as Js}from"@vkontakte/videoplayer-shared/es2015";import{stringReplaceAll as Ys}from"@vkontakte/videoplayer-shared/es2015";import{isNullable as Xs,InterfaceLanguage as Zs}from"@vkontakte/videoplayer-shared/es2015";import{objectEntries as Qs}from"@vkontakte/videoplayer-shared/es2015";import{AbortControllerPolyfilled as $s}from"@vkontakte/videoplayer-shared/es2015";import{fetchPolyfilled as ec}from"@vkontakte/videoplayer-shared/es2015";import{assertNonNullable as tc,getWindow as nc,VERSION as rc}from"@vkontakte/videoplayer-shared/es2015";import{VERSION as ic}from"@vkontakte/videoplayer-core/es2015";import{VERSION as ac}from"@vkontakte/videoplayer-statistics/es2015";var oc=Symbol(`storeContext`),sc=()=>{let e=Yt(oc);return tc(e,`Store context is empty!`),e},$=(e,t)=>cc(e,e.getValue(),t),cc=(e,t,n)=>Lo(t,t=>{let r=e.subscribe(e=>{t(e),n?.(e)});return()=>r.unsubscribe()}),lc=(e,t,n,r,i=[`meta config not provided`])=>{let a=e.info,{clientWidth:o,clientHeight:s}=nc().document.body,c=a.throughputEstimation$.getValue()?.toFixed(0)??0,l=a.rttEstimation$.getValue()?.toFixed(0)??0,u=a.isAutoQualityEnabled$.getValue()?`auto`:`manual`,f=`${d} (core: ${ic}, stat: ${ac}, shared: ${rc})`,p=Y(n.playerState.errorLog$),m=p.length?`
6
+ import e from"@oxc-project/runtime/helpers/defineProperty";import t from"@oxc-project/runtime/helpers/classPrivateMethodInitSpec";import n from"@oxc-project/runtime/helpers/classPrivateFieldInitSpec";import r from"@oxc-project/runtime/helpers/classPrivateFieldGet2";import i from"@oxc-project/runtime/helpers/assertClassBrand";import a from"@oxc-project/runtime/helpers/classPrivateFieldSet2";import o from"@oxc-project/runtime/helpers/objectSpread2";import s from"@oxc-project/runtime/helpers/asyncToGenerator";var c,l,u=`prod`,d=`1.0.13-dev.2ed41cd75.0`;import{objectFromEntries as f}from"@vkontakte/videoplayer-shared/es2015";import{fillWithDefault as p,InterfaceLanguage as m,VideoQuality as h}from"@vkontakte/videoplayer-shared/es2015";var g=Array.isArray,_=Array.prototype.indexOf,v=Array.prototype.includes,y=Array.from;Object.keys;var b=Object.defineProperty,x=Object.getOwnPropertyDescriptor,S=Object.getOwnPropertyDescriptors,C=Object.prototype,ee=Array.prototype,te=Object.getPrototypeOf,ne=Object.isExtensible,re=()=>{};function ie(e){for(var t=0;t<e.length;t++)e[t]()}function ae(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var w=2,T=4,oe=8,se=1<<24,ce=16,E=32,D=64,O=128,le=512,ue=1024,k=2048,de=4096,A=8192,j=16384,fe=32768,pe=65536,me=1<<17,he=1<<18,ge=1<<19,_e=1<<20,ve=1<<25,ye=65536,be=1<<21,xe=1<<22,Se=1<<23,Ce=Symbol(`$state`),we=Symbol(`legacy props`),Te=Symbol(``),Ee=new class extends Error{constructor(...t){super(...t),e(this,`name`,`StaleReactionError`),e(this,`message`,"The reaction that called `getAbortSignal()` was re-run or destroyed")}},De=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`),Oe=3,ke=8;function Ae(){throw Error(`https://svelte.dev/e/invalid_default_snippet`)}function je(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function Me(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Ne(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function Pe(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Fe(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Ie(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Le(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Re(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function ze(){throw Error(`https://svelte.dev/e/set_context_after_init`)}function Be(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Ve(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function He(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Ue(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var We=1,Ge=2,Ke=4,qe=8,Je=16,Ye=1,Xe=2,Ze=4,Qe=8,$e=16,et=1,tt=2,nt=`[`,rt=`[!`,it=`[?`,at=`]`,ot={},st=Symbol(),ct=`http://www.w3.org/1999/xhtml`;function lt(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function ut(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var M=!1;function dt(e){M=e}var N;function ft(e){if(e===null)throw lt(),ot;return N=e}function pt(){return ft(Sr(N))}function P(e){if(M){if(Sr(N)!==null)throw lt(),ot;N=e}}function mt(e=1){if(M){for(var t=e,n=N;t--;)n=Sr(n);N=n}}function ht(e=!0){for(var t=0,n=N;;){if(n.nodeType===ke){var r=n.data;if(r===at){if(t===0)return n;--t}else (r===nt||r===rt||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=Sr(n);e&&n.remove(),n=i}}function gt(e){if(!e||e.nodeType!==ke)throw lt(),ot;return e.data}function _t(e){return e===this.v}function vt(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function yt(e){return!vt(e,this.v)}var bt=!1,xt=!1;function St(){xt=!0}var F=null;function Ct(e){F=e}function wt(e){return kt(`getContext`).get(e)}function Tt(e,t){let n=kt(`setContext`);if(bt){var r=U.f;!H&&(r&E)!==0&&!F.i||ze()}return n.set(e,t),t}function Et(e,t=!1,n){F={p:F,i:!1,c:null,e:null,s:e,x:null,l:xt&&!t?{s:null,u:null,$:[]}:null}}function Dt(e){var t=F,n=t.e;if(n!==null){t.e=null;for(var r of n)Fr(r)}return e!==void 0&&(t.x=e),t.i=!0,F=t.p,e??{}}function Ot(){return!xt||F!==null&&F.l===null}function kt(e){var t;return F===null&&je(e),(t=F).c??(t.c=new Map(At(F)||void 0))}function At(e){let t=e.p;for(;t!==null;){let e=t.c;if(e!==null)return e;t=t.p}return null}var jt=[];function Mt(){var e=jt;jt=[],ie(e)}function Nt(e){if(jt.length===0&&!Kt){var t=jt;queueMicrotask(()=>{t===jt&&Mt()})}jt.push(e)}function Pt(e){var t=U;if(t===null)return H.f|=Se,e;if((t.f&fe)===0&&(t.f&T)===0)throw e;Ft(e,t)}function Ft(e,t){for(;t!==null;){if((t.f&O)!==0){if((t.f&fe)===0)throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}var It=~(k|de|ue);function Lt(e,t){e.f=e.f&It|t}function Rt(e){(e.f&le)!==0||e.deps===null?Lt(e,ue):Lt(e,de)}function zt(e){if(e!==null)for(let t of e)(t.f&w)===0||(t.f&ye)===0||(t.f^=ye,zt(t.deps))}function Bt(e,t,n){(e.f&k)===0?(e.f&de)!==0&&n.add(e):t.add(e),zt(e.deps),Lt(e,ue)}var Vt=new Set,Ht=null,Ut=null,Wt=[],Gt=null,Kt=!1,qt=null,Jt=new WeakMap,Yt=new WeakMap,Xt=new WeakMap,Zt=new WeakMap,Qt=new WeakMap,$t=new WeakMap,en=new WeakMap,tn=new WeakMap,nn=new WeakMap,rn=new WeakSet;class an{constructor(){t(this,rn),e(this,`current`,new Map),e(this,`previous`,new Map),n(this,Jt,new Set),n(this,Yt,new Set),n(this,Xt,0),n(this,Zt,0),n(this,Qt,null),n(this,$t,new Set),n(this,en,new Set),n(this,tn,new Map),e(this,`is_fork`,!1),n(this,nn,!1)}skip_effect(e){r(tn,this).has(e)||r(tn,this).set(e,{d:[],m:[]})}unskip_effect(e){var t=r(tn,this).get(e);if(t){r(tn,this).delete(e);for(var n of t.d)Lt(n,k),gn(n);for(n of t.m)Lt(n,de),gn(n)}}process(e){Wt=[],this.apply();var t=qt=[],n=[];for(let r of e)i(rn,this,sn).call(this,r,t,n);if(qt=null,i(rn,this,on).call(this)){i(rn,this,cn).call(this,n),i(rn,this,cn).call(this,t);for(let[e,t]of r(tn,this))_n(e,t)}else{Ht=null;for(let e of r(Jt,this))e(this);r(Jt,this).clear(),r(Xt,this)===0&&i(rn,this,ln).call(this),pn(n),pn(t),r($t,this).clear(),r(en,this).clear(),r(Qt,this)?.resolve()}Ut=null}capture(e,t){t!==st&&!this.previous.has(e)&&this.previous.set(e,t),(e.f&Se)===0&&(this.current.set(e,e.v),Ut?.set(e,e.v))}activate(){Ht=this,this.apply()}deactivate(){Ht===this&&(Ht=null,Ut=null)}flush(){if(Wt.length>0)Ht=this,un();else if(r(Xt,this)===0&&!this.is_fork){for(let e of r(Jt,this))e(this);r(Jt,this).clear(),i(rn,this,ln).call(this),r(Qt,this)?.resolve()}this.deactivate()}discard(){for(let e of r(Yt,this))e(this);r(Yt,this).clear()}increment(e){a(Xt,this,r(Xt,this)+1),e&&a(Zt,this,r(Zt,this)+1)}decrement(e){a(Xt,this,r(Xt,this)-1),e&&a(Zt,this,r(Zt,this)-1),!r(nn,this)&&(a(nn,this,!0),Nt(()=>{a(nn,this,!1),i(rn,this,on).call(this)?Wt.length>0&&this.flush():this.revive()}))}revive(){for(let e of r($t,this))r(en,this).delete(e),Lt(e,k),gn(e);for(let e of r(en,this))Lt(e,de),gn(e);this.flush()}oncommit(e){r(Jt,this).add(e)}ondiscard(e){r(Yt,this).add(e)}settled(){return(r(Qt,this)??a(Qt,this,ae())).promise}static ensure(){if(Ht===null){let e=Ht=new an;Vt.add(Ht),Kt||Nt(()=>{Ht===e&&e.flush()})}return Ht}apply(){if(!(!bt||!this.is_fork&&Vt.size===1)){Ut=new Map(this.current);for(let e of Vt)if(e!==this)for(let[t,n]of e.previous)Ut.has(t)||Ut.set(t,n)}}}function on(){return this.is_fork||r(Zt,this)>0}function sn(e,t,n){e.f^=ue;for(var i=e.first;i!==null;){var a=i.f,o=(a&(E|D))!==0;if(!(o&&(a&ue)!==0||(a&A)!==0||r(tn,this).has(i))&&i.fn!==null){o?i.f^=ue:(a&T)===0?bt&&(a&(oe|se))!==0?n.push(i):_i(i)&&((a&ce)!==0&&r(en,this).add(i),Si(i)):t.push(i);var s=i.first;if(s!==null){i=s;continue}}for(;i!==null;){var c=i.next;if(c!==null){i=c;break}i=i.parent}}}function cn(e){for(var t=0;t<e.length;t+=1)Bt(e[t],r($t,this),r(en,this))}function ln(){if(Vt.size>1){this.previous.clear();var e=Ht,t=Ut,n=!0;for(let e of Vt){if(e===this){n=!1;continue}let t=[];for(let[r,i]of this.current){if(e.current.has(r))if(n&&i!==e.current.get(r))e.current.set(r,i);else continue;t.push(r)}if(t.length===0)continue;let r=[...e.current.keys()].filter(e=>!this.current.has(e));if(r.length>0){var a=Wt;Wt=[];let n=new Set,o=new Map;for(let e of t)mn(e,r,n,o);if(Wt.length>0){Ht=e,e.apply();for(let t of Wt)i(rn,e,sn).call(e,t,[],[]);e.deactivate()}Wt=a}}Ht=e,Ut=t}r(tn,this).clear(),Vt.delete(this)}function un(){try{for(var e=0;Wt.length>0;){var t=an.ensure();e++>1e3&&dn(),t.process(Wt),or.clear()}}finally{Wt=[],Gt=null,qt=null}}function dn(){try{Le()}catch(e){Ft(e,Gt)}}var fn=null;function pn(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(j|A))===0&&_i(r)&&(fn=new Set,Si(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&qr(r),fn?.size>0)){or.clear();for(let e of fn){if((e.f&(j|A))!==0)continue;let t=[e],n=e.parent;for(;n!==null;)fn.has(n)&&(fn.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];(n.f&(j|A))===0&&Si(n)}}fn.clear()}}fn=null}}function mn(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let e=i.f;(e&w)===0?(e&(xe|ce))!==0&&(e&k)===0&&hn(i,t,r)&&(Lt(i,k),gn(i)):mn(i,t,n,r)}}function hn(e,t,n){let r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(let r of e.deps){if(v.call(t,r))return!0;if((r.f&w)!==0&&hn(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function gn(e){var t=Gt=e,n=t.b;if(n?.is_pending&&(e.f&(T|oe|se))!==0&&(e.f&fe)===0){n.defer_effect(e);return}for(;t.parent!==null;){t=t.parent;var r=t.f;if(qt!==null&&t===U&&(bt||(e.f&oe)===0))return;if((r&(D|E))!==0){if((r&ue)===0)return;t.f^=ue}}Wt.push(t)}function _n(e,t){if(!((e.f&E)!==0&&(e.f&ue)!==0)){(e.f&k)===0?(e.f&de)!==0&&t.m.push(e):t.d.push(e),Lt(e,ue);for(var n=e.first;n!==null;)_n(n,t),n=n.next}}function vn(e){let t=0,n=cr(0),r;return()=>{Mr()&&(W(n),zr(()=>(t===0&&(r=Ti(()=>e(()=>fr(n)))),t+=1,()=>{Nt(()=>{--t,t===0&&(r?.(),r=void 0,fr(n))})})))}}var yn=pe|ge;function bn(e,t,n,r){new Rn(e,t,n,r)}var xn=new WeakMap,Sn=new WeakMap,Cn=new WeakMap,wn=new WeakMap,Tn=new WeakMap,En=new WeakMap,Dn=new WeakMap,On=new WeakMap,kn=new WeakMap,An=new WeakMap,jn=new WeakMap,Mn=new WeakMap,Nn=new WeakMap,Pn=new WeakMap,Fn=new WeakMap,In=new WeakMap,Ln=new WeakSet;class Rn{constructor(o,s,c,l){t(this,Ln),e(this,`parent`,void 0),e(this,`is_pending`,!1),e(this,`transform_error`,void 0),n(this,xn,void 0),n(this,Sn,M?N:null),n(this,Cn,void 0),n(this,wn,void 0),n(this,Tn,void 0),n(this,En,null),n(this,Dn,null),n(this,On,null),n(this,kn,null),n(this,An,0),n(this,jn,0),n(this,Mn,!1),n(this,Nn,new Set),n(this,Pn,new Set),n(this,Fn,null),n(this,In,vn(()=>(a(Fn,this,cr(r(An,this))),()=>{a(Fn,this,null)}))),a(xn,this,o),a(Cn,this,s),a(wn,this,e=>{var t=U;t.b=this,t.f|=O,c(e)}),this.parent=U.b,this.transform_error=l??this.parent?.transform_error??(e=>e),a(Tn,this,Br(()=>{if(M){let e=r(Sn,this);pt();let t=e.data===rt;if(e.data.startsWith(it)){let t=JSON.parse(e.data.slice(it.length));i(Ln,this,Bn).call(this,t)}else t?i(Ln,this,Vn).call(this):i(Ln,this,zn).call(this)}else i(Ln,this,Hn).call(this)},yn)),M&&a(xn,this,N)}defer_effect(e){Bt(e,r(Nn,this),r(Pn,this))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!r(Cn,this).pending}update_pending_count(e){i(Ln,this,Gn).call(this,e),a(An,this,r(An,this)+e),!(!r(Fn,this)||r(Mn,this))&&(a(Mn,this,!0),Nt(()=>{a(Mn,this,!1),r(Fn,this)&&ur(r(Fn,this),r(An,this))}))}get_effect_pending(){return r(In,this).call(this),W(r(Fn,this))}error(e){var t=r(Cn,this).onerror;let n=r(Cn,this).failed;if(!t&&!n)throw e;r(En,this)&&(Gr(r(En,this)),a(En,this,null)),r(Dn,this)&&(Gr(r(Dn,this)),a(Dn,this,null)),r(On,this)&&(Gr(r(On,this)),a(On,this,null)),M&&(ft(r(Sn,this)),mt(),ft(ht()));var o=!1,s=!1;let c=()=>{if(o){ut();return}o=!0,s&&Ue(),r(On,this)!==null&&Jr(r(On,this),()=>{a(On,this,null)}),i(Ln,this,Wn).call(this,()=>{an.ensure(),i(Ln,this,Hn).call(this)})},l=e=>{try{s=!0,t?.(e,c),s=!1}catch(e){Ft(e,r(Tn,this)&&r(Tn,this).parent)}n&&a(On,this,i(Ln,this,Wn).call(this,()=>{an.ensure();try{return Vr(()=>{var t=U;t.b=this,t.f|=O,n(r(xn,this),()=>e,()=>c)})}catch(e){return Ft(e,r(Tn,this).parent),null}}))};Nt(()=>{var t;try{t=this.transform_error(e)}catch(e){Ft(e,r(Tn,this)&&r(Tn,this).parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(l,e=>Ft(e,r(Tn,this)&&r(Tn,this).parent)):l(t)})}}function zn(){try{a(En,this,Vr(()=>r(wn,this).call(this,r(xn,this))))}catch(e){this.error(e)}}function Bn(e){let t=r(Cn,this).failed;t&&a(On,this,Vr(()=>{t(r(xn,this),()=>e,()=>()=>{})}))}function Vn(){let e=r(Cn,this).pending;e&&(this.is_pending=!0,a(Dn,this,Vr(()=>e(r(xn,this)))),Nt(()=>{var e=a(kn,this,document.createDocumentFragment()),t=br();e.append(t),a(En,this,i(Ln,this,Wn).call(this,()=>(an.ensure(),Vr(()=>r(wn,this).call(this,t))))),r(jn,this)===0&&(r(xn,this).before(e),a(kn,this,null),Jr(r(Dn,this),()=>{a(Dn,this,null)}),i(Ln,this,Un).call(this))}))}function Hn(){try{if(this.is_pending=this.has_pending_snippet(),a(jn,this,0),a(An,this,0),a(En,this,Vr(()=>{r(wn,this).call(this,r(xn,this))})),r(jn,this)>0){var e=a(kn,this,document.createDocumentFragment());Qr(r(En,this),e);let t=r(Cn,this).pending;a(Dn,this,Vr(()=>t(r(xn,this))))}else i(Ln,this,Un).call(this)}catch(e){this.error(e)}}function Un(){this.is_pending=!1;for(let e of r(Nn,this))Lt(e,k),gn(e);for(let e of r(Pn,this))Lt(e,de),gn(e);r(Nn,this).clear(),r(Pn,this).clear()}function Wn(e){var t=U,n=H,i=F;ai(r(Tn,this)),ii(r(Tn,this)),Ct(r(Tn,this).ctx);try{return e()}catch(e){return Pt(e),null}finally{ai(t),ii(n),Ct(i)}}function Gn(e){if(!this.has_pending_snippet()){if(this.parent){var t;i(Ln,t=this.parent,Gn).call(t,e)}return}a(jn,this,r(jn,this)+e),r(jn,this)===0&&(i(Ln,this,Un).call(this),r(Dn,this)&&Jr(r(Dn,this),()=>{a(Dn,this,null)}),r(kn,this)&&(r(xn,this).before(r(kn,this)),a(kn,this,null)))}function Kn(e,t,n,r){let i=Ot()?Xn:Qn;var a=e.filter(e=>!e.settled);if(n.length===0&&a.length===0){r(t.map(i));return}var o=U,s=qn(),c=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function l(e){s();try{r(e)}catch(e){(o.f&j)===0&&Ft(e,o)}Jn()}if(n.length===0){c.then(()=>l(t.map(i)));return}function u(){s(),Promise.all(n.map(e=>Zn(e))).then(e=>l([...t.map(i),...e])).catch(e=>Ft(e,o))}c?c.then(u):u()}function qn(){var e=U,t=H,n=F,r=Ht;return function(i=!0){ai(e),ii(t),Ct(n),i&&r?.activate()}}function Jn(e=!0){ai(null),ii(null),Ct(null),e&&Ht?.deactivate()}function Yn(){var e=U.b,t=Ht,n=e.is_rendered();return e.update_pending_count(1),t.increment(n),()=>{e.update_pending_count(-1),t.decrement(n)}}function Xn(e){var t=w|k,n=H!==null&&(H.f&w)!==0?H:null;return U!==null&&(U.f|=ge),{ctx:F,deps:null,effects:null,equals:_t,f:t,fn:e,reactions:null,rv:0,v:st,wv:0,parent:n??U,ac:null}}function Zn(e,t,n){U===null&&Me();var r=void 0,i=cr(st),a=!H,o=new Map;return Rr(()=>{var t=ae();r=t.promise;try{Promise.resolve(e()).then(t.resolve,t.reject).finally(Jn)}catch(e){t.reject(e),Jn()}var n=Ht;if(a){var s=Yn();o.get(n)?.reject(Ee),o.delete(n),o.set(n,t)}let c=(e,t=void 0)=>{if(n.activate(),t)t!==Ee&&(i.f|=Se,ur(i,t));else{(i.f&Se)!==0&&(i.f^=Se),ur(i,e);for(let[e,t]of o){if(o.delete(e),e===n)break;t.reject(Ee)}}s&&s()};t.promise.then(c,e=>c(null,e||`unknown`))}),Nr(()=>{for(let e of o.values())e.reject(Ee)}),new Promise(e=>{function t(n){function a(){n===r?e(i):t(r)}n.then(a,a)}t(r)})}function I(e){let t=Xn(e);return bt||si(t),t}function Qn(e){let t=Xn(e);return t.equals=yt,t}function $n(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Gr(t[n])}}function er(e){for(var t=e.parent;t!==null;){if((t.f&w)===0)return(t.f&j)===0?t:null;t=t.parent}return null}function tr(e){var t,n=U;ai(er(e));try{e.f&=~ye,$n(e),t=yi(e)}finally{ai(n)}return t}function nr(e){var t=tr(e);if(!e.equals(t)&&(e.wv=gi(),(!Ht?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){Lt(e,ue);return}ti||(Ut===null?Rt(e):(Mr()||Ht?.is_fork)&&Ut.set(e,t))}function rr(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.call(t),t.ac?.abort(Ee),t.teardown=re,t.ac=null,xi(t,0),Ur(t))}function ir(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&Si(t)}var ar=new Set,or=new Map,sr=!1;function cr(e,t){return{f:0,v:e,reactions:null,equals:_t,rv:0,wv:0}}function L(e,t){let n=cr(e,t);return si(n),n}function lr(e,t=!1,n=!0){let r=cr(e);if(t||(r.equals=yt),xt&&n&&F!==null&&F.l!==null){var i;((i=F.l).s??(i.s=[])).push(r)}return r}function R(e,t,n=!1){return H!==null&&(!ri||(H.f&me)!==0)&&Ot()&&(H.f&(w|ce|xe|me))!==0&&(oi===null||!v.call(oi,e))&&He(),ur(e,n?mr(t):t)}function ur(e,t){if(!e.equals(t)){var n=e.v;ti?or.set(e,t):or.set(e,n),e.v=t;var r=an.ensure();if(r.capture(e,n),(e.f&w)!==0){let t=e;(e.f&k)!==0&&tr(t),Rt(t)}e.wv=gi(),pr(e,k),Ot()&&U!==null&&(U.f&ue)!==0&&(U.f&(E|D))===0&&(ui===null?di([e]):ui.push(e)),!r.is_fork&&ar.size>0&&!sr&&dr()}return t}function dr(){sr=!1;for(let e of ar)(e.f&ue)!==0&&Lt(e,de),_i(e)&&Si(e);ar.clear()}function fr(e){R(e,e.v+1)}function pr(e,t){var n=e.reactions;if(n!==null)for(var r=Ot(),i=n.length,a=0;a<i;a++){var o=n[a],s=o.f;if(!(!r&&o===U)){var c=(s&k)===0;if(c&&Lt(o,t),(s&w)!==0){var l=o;Ut?.delete(l),(s&ye)===0&&(s&le&&(o.f|=ye),pr(l,de))}else c&&((s&ce)!==0&&fn!==null&&fn.add(o),gn(o))}}}function mr(e){if(typeof e!=`object`||!e||Ce in e)return e;let t=te(e);if(t!==C&&t!==ee)return e;var n=new Map,r=g(e),i=L(0),a=null,o=mi,s=e=>{if(mi===o)return e();var t=H,n=mi;ii(null),hi(o);var r=e();return ii(t),hi(n),r};return r&&n.set(`length`,L(e.length,a)),new Proxy(e,{defineProperty(e,t,r){(!(`value`in r)||r.configurable===!1||r.enumerable===!1||r.writable===!1)&&Be();var i=n.get(t);return i===void 0?s(()=>{var e=L(r.value,a);return n.set(t,e),e}):R(i,r.value,!0),!0},deleteProperty(e,t){var r=n.get(t);if(r===void 0){if(t in e){let e=s(()=>L(st,a));n.set(t,e),fr(i)}}else R(r,st),fr(i);return!0},get(t,r,i){if(r===Ce)return e;var o=n.get(r),c=r in t;if(o===void 0&&(!c||x(t,r)?.writable)&&(o=s(()=>L(mr(c?t[r]:st),a)),n.set(r,o)),o!==void 0){var l=W(o);return l===st?void 0:l}return Reflect.get(t,r,i)},getOwnPropertyDescriptor(e,t){var r=Reflect.getOwnPropertyDescriptor(e,t);if(r&&`value`in r){var i=n.get(t);i&&(r.value=W(i))}else if(r===void 0){var a=n.get(t),o=a?.v;if(a!==void 0&&o!==st)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return r},has(e,t){if(t===Ce)return!0;var r=n.get(t),i=r!==void 0&&r.v!==st||Reflect.has(e,t);return(r!==void 0||U!==null&&(!i||x(e,t)?.writable))&&(r===void 0&&(r=s(()=>L(i?mr(e[t]):st,a)),n.set(t,r)),W(r)===st)?!1:i},set(e,t,o,c){var l=n.get(t),u=t in e;if(r&&t===`length`)for(var d=o;d<l.v;d+=1){var f=n.get(d+``);f===void 0?d in e&&(f=s(()=>L(st,a)),n.set(d+``,f)):R(f,st)}if(l===void 0)(!u||x(e,t)?.writable)&&(l=s(()=>L(void 0,a)),R(l,mr(o)),n.set(t,l));else{u=l.v!==st;var p=s(()=>mr(o));R(l,p)}var m=Reflect.getOwnPropertyDescriptor(e,t);if(m?.set&&m.set.call(c,o),!u){if(r&&typeof t==`string`){var h=n.get(`length`),g=Number(t);Number.isInteger(g)&&g>=h.v&&R(h,g+1)}fr(i)}return!0},ownKeys(e){W(i);var t=Reflect.ownKeys(e).filter(e=>{var t=n.get(e);return t===void 0||t.v!==st});for(var[r,a]of n)a.v!==st&&!(r in e)&&t.push(r);return t},setPrototypeOf(){Ve()}})}var hr,gr,_r,vr;function yr(){if(hr===void 0){hr=window,document,gr=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;_r=x(t,`firstChild`).get,vr=x(t,`nextSibling`).get,ne(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),ne(n)&&(n.__t=void 0)}}function br(e=``){return document.createTextNode(e)}function xr(e){return _r.call(e)}function Sr(e){return vr.call(e)}function z(e,t){if(!M)return xr(e);var n=xr(N);if(n===null)n=N.appendChild(br());else if(t&&n.nodeType!==Oe){var r=br();return n?.before(r),ft(r),r}return t&&Dr(n),ft(n),n}function Cr(e,t=!1){if(!M){var n=xr(e);return n instanceof Comment&&n.data===``?Sr(n):n}if(t){if(N?.nodeType!==Oe){var r=br();return N?.before(r),ft(r),r}Dr(N)}return N}function B(e,t=1,n=!1){let r=M?N:e;for(var i;t--;)i=r,r=Sr(r);if(!M)return r;if(n){if(r?.nodeType!==Oe){var a=br();return r===null?i?.after(a):r.before(a),ft(a),a}Dr(r)}return ft(r),r}function wr(e){e.textContent=``}function Tr(){return!bt||fn!==null?!1:(U.f&fe)!==0}function Er(e,t,n){let r=n?{is:n}:void 0;return document.createElementNS(t??ct,e,r)}function Dr(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===Oe;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function Or(e){var t=H,n=U;ii(null),ai(null);try{return e()}finally{ii(t),ai(n)}}function kr(e){U===null&&(H===null&&Ie(e),Fe()),ti&&Pe(e)}function Ar(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function jr(e,t){var n=U;n!==null&&(n.f&A)!==0&&(e|=A);var r={ctx:F,deps:null,nodes:null,f:e|k|le,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null},i=r;if((e&T)!==0)qt===null?gn(r):qt.push(r);else if(t!==null){try{Si(r)}catch(e){throw Gr(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&ge)===0&&(i=i.first,(e&ce)!==0&&(e&pe)!==0&&i!==null&&(i.f|=pe))}if(i!==null&&(i.parent=n,n!==null&&Ar(i,n),H!==null&&(H.f&w)!==0&&(e&D)===0)){var a=H;(a.effects??=[]).push(i)}return r}function Mr(){return H!==null&&!ri}function Nr(e){let t=jr(oe,null);return Lt(t,ue),t.teardown=e,t}function Pr(e){kr(`$effect`);var t=U.f;if(!H&&(t&E)!==0&&(t&fe)===0){var n=F;(n.e??=[]).push(e)}else return Fr(e)}function Fr(e){return jr(T|_e,e)}function Ir(e){an.ensure();let t=jr(D|ge,e);return(e={})=>new Promise(n=>{e.outro?Jr(t,()=>{Gr(t),n(void 0)}):(Gr(t),n(void 0))})}function Lr(e){return jr(T,e)}function Rr(e){return jr(xe|ge,e)}function zr(e,t=0){return jr(oe|t,e)}function V(e,t=[],n=[],r=[]){Kn(r,t,n,t=>{jr(oe,()=>e(...t.map(W)))})}function Br(e,t=0){return jr(ce|t,e)}function Vr(e){return jr(E|ge,e)}function Hr(e){var t=e.teardown;if(t!==null){let e=ti,n=H;ni(!0),ii(null);try{t.call(null)}finally{ni(e),ii(n)}}}function Ur(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&Or(()=>{e.abort(Ee)});var r=n.next;(n.f&D)===0?Gr(n,t):n.parent=null,n=r}}function Wr(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&E)===0&&Gr(t),t=n}}function Gr(e,t=!0){var n=!1;(t||(e.f&he)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Kr(e.nodes.start,e.nodes.end),n=!0),Ur(e,t&&!n),xi(e,0),Lt(e,j);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();Hr(e);var i=e.parent;i!==null&&i.first!==null&&qr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Kr(e,t){for(;e!==null;){var n=e===t?null:Sr(e);e.remove(),e=n}}function qr(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Jr(e,t,n=!0){var r=[];Yr(e,r,!0);var i=()=>{n&&Gr(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function Yr(e,t,n){if((e.f&A)===0){e.f^=A;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next,o=(i.f&pe)!==0||(i.f&E)!==0&&(e.f&ce)!==0;Yr(i,t,o?n:!1),i=a}}}function Xr(e){Zr(e,!0)}function Zr(e,t){if((e.f&A)!==0){e.f^=A,(e.f&ue)===0&&(Lt(e,k),gn(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&pe)!==0||(n.f&E)!==0;Zr(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function Qr(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Sr(n);t.append(n),n=i}}var $r=null,ei=!1,ti=!1;function ni(e){ti=e}var H=null,ri=!1;function ii(e){H=e}var U=null;function ai(e){U=e}var oi=null;function si(e){H!==null&&(!bt||(H.f&w)!==0)&&(oi===null?oi=[e]:oi.push(e))}var ci=null,li=0,ui=null;function di(e){ui=e}var fi=1,pi=0,mi=pi;function hi(e){mi=e}function gi(){return++fi}function _i(e){var t=e.f;if((t&k)!==0)return!0;if(t&w&&(e.f&=~ye),(t&de)!==0){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(_i(a)&&nr(a),a.wv>e.wv)return!0}(t&le)!==0&&Ut===null&&Lt(e,ue)}return!1}function vi(e,t,n=!0){var r=e.reactions;if(r!==null&&!(!bt&&oi!==null&&v.call(oi,e)))for(var i=0;i<r.length;i++){var a=r[i];(a.f&w)===0?t===a&&(n?Lt(a,k):(a.f&ue)!==0&&Lt(a,de),gn(a)):vi(a,t,!1)}}function yi(e){var t=ci,n=li,r=ui,i=H,a=oi,o=F,s=ri,c=mi,l=e.f;ci=null,li=0,ui=null,H=(l&(E|D))===0?e:null,oi=null,Ct(e.ctx),ri=!1,mi=++pi,e.ac!==null&&(Or(()=>{e.ac.abort(Ee)}),e.ac=null);try{e.f|=be;var u=e.fn,d=u();e.f|=fe;var f=e.deps,p=Ht?.is_fork;if(ci!==null){var m;if(p||xi(e,li),f!==null&&li>0)for(f.length=li+ci.length,m=0;m<ci.length;m++)f[li+m]=ci[m];else e.deps=f=ci;if(Mr()&&(e.f&le)!==0)for(m=li;m<f.length;m++){var h;((h=f[m]).reactions??(h.reactions=[])).push(e)}}else !p&&f!==null&&li<f.length&&(xi(e,li),f.length=li);if(Ot()&&ui!==null&&!ri&&f!==null&&(e.f&(w|de|k))===0)for(m=0;m<ui.length;m++)vi(ui[m],e);if(i!==null&&i!==e){if(pi++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=pi;if(t!==null)for(let e of t)e.rv=pi;ui!==null&&(r===null?r=ui:r.push(...ui))}return(e.f&Se)!==0&&(e.f^=Se),d}catch(e){return Pt(e)}finally{e.f^=be,ci=t,li=n,ui=r,H=i,oi=a,Ct(o),ri=s,mi=c}}function bi(e,t){let n=t.reactions;if(n!==null){var r=_.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&(t.f&w)!==0&&(ci===null||!v.call(ci,t))){var a=t;(a.f&le)!==0&&(a.f^=le,a.f&=~ye),Rt(a),rr(a),xi(a,0)}}function xi(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)bi(e,n[r])}function Si(e){var t=e.f;if((t&j)===0){Lt(e,ue);var n=U,r=ei;U=e,ei=!0;try{(t&(ce|se))===0?Ur(e):Wr(e),Hr(e);var i=yi(e);e.teardown=typeof i==`function`?i:null,e.wv=fi}finally{ei=r,U=n}}}function W(e){var t=(e.f&w)!==0;if($r?.add(e),H!==null&&!ri&&!(U!==null&&(U.f&j)!==0)&&(oi===null||!v.call(oi,e))){var n=H.deps;if((H.f&be)!==0)e.rv<pi&&(e.rv=pi,ci===null&&n!==null&&n[li]===e?li++:ci===null?ci=[e]:ci.push(e));else{var r;((r=H).deps??(r.deps=[])).push(e);var i=e.reactions;i===null?e.reactions=[H]:v.call(i,H)||i.push(H)}}if(ti&&or.has(e))return or.get(e);if(t){var a=e;if(ti){var o=a.v;return((a.f&ue)===0&&a.reactions!==null||wi(a))&&(o=tr(a)),or.set(a,o),o}var s=(a.f&le)===0&&!ri&&H!==null&&(ei||(H.f&le)!==0),c=(a.f&fe)===0;_i(a)&&(s&&(a.f|=le),nr(a)),s&&!c&&(ir(a),Ci(a))}if(Ut?.has(e))return Ut.get(e);if((e.f&Se)!==0)throw e.v;return e.v}function Ci(e){if(e.f|=le,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),(t.f&w)!==0&&(t.f&le)===0&&(ir(t),Ci(t))}function wi(e){if(e.v===st)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(or.has(t)||(t.f&w)!==0&&wi(t))return!0;return!1}function Ti(e){var t=ri;try{return ri=!0,e()}finally{ri=t}}[...`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`)];var Ei=[`touchstart`,`touchmove`];function Di(e){return Ei.includes(e)}var Oi=Symbol(`events`),ki=new Set,Ai=new Set;function ji(e,t,n,r={}){function i(e){if(r.capture||Ii.call(t,e),!e.cancelBubble)return Or(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?Nt(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function Mi(e,t,n,r,i){var a={capture:r,passive:i},o=ji(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Nr(()=>{t.removeEventListener(e,o,a)})}function Ni(e,t,n){(t[Oi]??(t[Oi]={}))[e]=n}function Pi(e){for(var t=0;t<e.length;t++)ki.add(e[t]);for(var n of Ai)n(e)}var Fi=null;function Ii(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.call(e)||[],a=i[0]||e.target;Fi=e;var o=0,s=Fi===e&&e[Oi];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[Oi]=t;return}var l=i.indexOf(t);if(l===-1)return;c<=l&&(o=c)}if(a=i[o]||e.target,a!==t){b(e,`currentTarget`,{configurable:!0,get(){return a||n}});var u=H,d=U;ii(null),ai(null);try{for(var f,p=[];a!==null;){var m=a.assignedSlot||a.parentNode||a.host||null;try{var h=a[Oi]?.[r];h!=null&&(!a.disabled||e.target===a)&&h.call(a,e)}catch(e){f?p.push(e):f=e}if(e.cancelBubble||m===t||m===null)break;a=m}if(f){for(let e of p)queueMicrotask(()=>{throw e});throw f}}finally{e[Oi]=t,delete e.currentTarget,ii(u),ai(d)}}}var Li=((c=globalThis)==null||(c=c.window)==null?void 0:c.trustedTypes)&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function Ri(e){return Li?.createHTML(e)??e}function zi(e){var t=Er(`template`);return t.innerHTML=Ri(e.replaceAll(`<!>`,`<!---->`)),t.content}function Bi(e,t){var n=U;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function G(e,t){var n=(t&et)!==0,r=(t&tt)!==0,i,a=!e.startsWith(`<!>`);return()=>{if(M)return Bi(N,null),N;i===void 0&&(i=zi(a?e:`<!>`+e),n||(i=xr(i)));var t=r||gr?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=xr(t),s=t.lastChild;Bi(o,s)}else Bi(t,t);return t}}function Vi(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=(t&et)!==0,a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(M)return Bi(N,null),N;if(!o){var e=xr(zi(a));if(i)for(o=document.createDocumentFragment();xr(e);)o.appendChild(xr(e));else o=xr(e)}var t=o.cloneNode(!0);if(i){var n=xr(t),r=t.lastChild;Bi(n,r)}else Bi(t,t);return t}}function Hi(e,t){return Vi(e,t,`svg`)}function Ui(){if(M)return Bi(N,null),N;var e=document.createDocumentFragment(),t=document.createComment(``),n=br();return e.append(t,n),Bi(t,n),e}function K(e,t){if(M){var n=U;((n.f&fe)===0||n.nodes.end===null)&&(n.nodes.end=N),pt();return}e!==null&&e.before(t)}function q(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=`${n}`)}function Wi(e,t){return Ki(e,t)}var Gi=new Map;function Ki(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:o=!0,transformError:s}){yr();var c=void 0,l=Ir(()=>{var o=n??t.appendChild(br());bn(o,{pending:()=>{}},t=>{Et({});var n=F;if(a&&(n.c=a),i&&(r.$$events=i),M&&Bi(t,null),c=e(t,r)||{},M&&(U.nodes.end=N,N===null||N.nodeType!==ke||N.data!==at))throw lt(),ot;Dt()},s);var l=new Set,u=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!l.has(r)){l.add(r);var i=Di(r);for(let e of[t,document]){var a=Gi.get(e);a===void 0&&(a=new Map,Gi.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,Ii,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return u(y(ki)),Ai.add(u),()=>{for(var e of l)for(let n of[t,document]){var r=Gi.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,Ii),r.delete(e),r.size===0&&Gi.delete(n)):r.set(e,i)}Ai.delete(u),o!==n&&o.parentNode?.removeChild(o)}});return qi.set(c,l),c}var qi=new WeakMap;function Ji(e,t){let n=qi.get(e);return n?(qi.delete(e),n(t)):Promise.resolve()}var Yi=new WeakMap,Xi=new WeakMap,Zi=new WeakMap,Qi=new WeakMap,$i=new WeakMap,ea=new WeakMap,ta=new WeakMap;class na{constructor(t,i=!0){e(this,`anchor`,void 0),n(this,Yi,new Map),n(this,Xi,new Map),n(this,Zi,new Map),n(this,Qi,new Set),n(this,$i,!0),n(this,ea,e=>{if(r(Yi,this).has(e)){var t=r(Yi,this).get(e),n=r(Xi,this).get(t);if(n)Xr(n),r(Qi,this).delete(t);else{var i=r(Zi,this).get(t);i&&(r(Xi,this).set(t,i.effect),r(Zi,this).delete(t),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),n=i.effect)}for(let[t,n]of r(Yi,this)){if(r(Yi,this).delete(t),t===e)break;let i=r(Zi,this).get(n);i&&(Gr(i.effect),r(Zi,this).delete(n))}for(let[e,i]of r(Xi,this)){if(e===t||r(Qi,this).has(e))continue;let a=()=>{if(Array.from(r(Yi,this).values()).includes(e)){var t=document.createDocumentFragment();Qr(i,t),t.append(br()),r(Zi,this).set(e,{effect:i,fragment:t})}else Gr(i);r(Qi,this).delete(e),r(Xi,this).delete(e)};r($i,this)||!n?(r(Qi,this).add(e),Jr(i,a,!1)):a()}}}),n(this,ta,e=>{r(Yi,this).delete(e);let t=Array.from(r(Yi,this).values());for(let[e,n]of r(Zi,this))t.includes(e)||(Gr(n.effect),r(Zi,this).delete(e))}),this.anchor=t,a($i,this,i)}ensure(e,t){var n=Ht,i=Tr();if(t&&!r(Xi,this).has(e)&&!r(Zi,this).has(e))if(i){var a=document.createDocumentFragment(),o=br();a.append(o),r(Zi,this).set(e,{effect:Vr(()=>t(o)),fragment:a})}else r(Xi,this).set(e,Vr(()=>t(this.anchor)));if(r(Yi,this).set(n,e),i){for(let[t,i]of r(Xi,this))t===e?n.unskip_effect(i):n.skip_effect(i);for(let[t,i]of r(Zi,this))t===e?n.unskip_effect(i.effect):n.skip_effect(i.effect);n.oncommit(r(ea,this)),n.ondiscard(r(ta,this))}else M&&(this.anchor=N),r(ea,this).call(this,n)}}function J(e,t,n=!1){var r;M&&(r=N,pt());var i=new na(e),a=n?pe:0;function o(e,t){if(M){var n=gt(r);if(e!==(n===nt?0:n===rt?!1:parseInt(n.substring(1)))){var a=ht();ft(a),i.anchor=a,dt(!1),i.ensure(e,t),dt(!0);return}}i.ensure(e,t)}Br(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(!1,null)},a)}var ra=Symbol(`NaN`);function ia(e,t,n){M&&pt();var r=new na(e),i=!Ot();Br(()=>{var e=t();e!==e&&(e=ra),i&&typeof e==`object`&&e&&(e={}),r.ensure(e,n)})}function aa(e,t,n){for(var r=[],i=t.length,a,o=t.length,s=0;s<i;s++){let n=t[s];Jr(n,()=>{if(a){if(a.pending.delete(n),a.done.add(n),a.pending.size===0){var t=e.outrogroups;oa(y(a.done)),t.delete(a),t.size===0&&(e.outrogroups=null)}}else --o},!1)}if(o===0){var c=r.length===0&&n!==null;if(c){var l=n,u=l.parentNode;wr(u),u.append(l),e.items.clear()}oa(t,!c)}else a={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(a)}function oa(e,t=!0){for(var n=0;n<e.length;n++)Gr(e[n],t)}var sa;function ca(e,t,n,r,i,a=null){var o=e,s=new Map;if((t&Ke)!==0){var c=e;o=M?ft(xr(c)):c.appendChild(br())}M&&pt();var l=null,u=Qn(()=>{var e=n();return g(e)?e:e==null?[]:y(e)}),d,f=!0;function p(){m.fallback=l,ua(m,d,o,t,r),l!==null&&(d.length===0?(l.f&ve)===0?Xr(l):(l.f^=ve,fa(l,null,o)):Jr(l,()=>{l=null}))}var m={effect:Br(()=>{d=W(u);var e=d.length;let c=!1;M&&gt(o)===rt!=(e===0)&&(o=ht(),ft(o),dt(!1),c=!0);for(var m=new Set,h=Ht,g=Tr(),_=0;_<e;_+=1){M&&N.nodeType===ke&&N.data===at&&(o=N,c=!0,dt(!1));var v=d[_],y=r(v,_),b=f?null:s.get(y);b?(b.v&&ur(b.v,v),b.i&&ur(b.i,_),g&&h.unskip_effect(b.e)):(b=da(s,f?o:sa??=br(),v,y,_,i,t,n),f||(b.e.f|=ve),s.set(y,b)),m.add(y)}if(e===0&&a&&!l&&(f?l=Vr(()=>a(o)):(l=Vr(()=>a(sa??=br())),l.f|=ve)),e>m.size&&Ne(``,``,``),M&&e>0&&ft(ht()),!f)if(g){for(let[e,t]of s)m.has(e)||h.skip_effect(t.e);h.oncommit(p),h.ondiscard(()=>{})}else p();c&&dt(!0),W(u)}),flags:t,items:s,outrogroups:null,fallback:l};f=!1,M&&(o=N)}function la(e){for(;e!==null&&(e.f&E)===0;)e=e.next;return e}function ua(e,t,n,r,i){var a=(r&qe)!==0,o=t.length,s=e.items,c=la(e.effect.first),l,u=null,d,f=[],p=[],m,h,g,_;if(a){for(_=0;_<o;_+=1)if(m=t[_],h=i(m,_),g=s.get(h).e,(g.f&ve)===0){var v;(v=g.nodes)==null||(v=v.a)==null||v.measure(),(d??=new Set).add(g)}}for(_=0;_<o;_+=1){if(m=t[_],h=i(m,_),g=s.get(h).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(g),t.done.delete(g);if((g.f&ve)!==0)if(g.f^=ve,g===c)fa(g,null,n);else{var b=u?u.next:c;g===e.effect.last&&(e.effect.last=g.prev),g.prev&&(g.prev.next=g.next),g.next&&(g.next.prev=g.prev),pa(e,u,g),pa(e,g,b),fa(g,b,n),u=g,f=[],p=[],c=la(u.next);continue}if((g.f&A)!==0&&(Xr(g),a)){var x;(x=g.nodes)==null||(x=x.a)==null||x.unfix(),(d??=new Set).delete(g)}if(g!==c){if(l!==void 0&&l.has(g)){if(f.length<p.length){var S=p[0],C;u=S.prev;var ee=f[0],te=f[f.length-1];for(C=0;C<f.length;C+=1)fa(f[C],S,n);for(C=0;C<p.length;C+=1)l.delete(p[C]);pa(e,ee.prev,te.next),pa(e,u,ee),pa(e,te,S),c=S,u=te,--_,f=[],p=[]}else l.delete(g),fa(g,c,n),pa(e,g.prev,g.next),pa(e,g,u===null?e.effect.first:u.next),pa(e,u,g),u=g;continue}for(f=[],p=[];c!==null&&c!==g;)(l??=new Set).add(c),p.push(c),c=la(c.next);if(c===null)continue}(g.f&ve)===0&&f.push(g),u=g,c=la(g.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(oa(y(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(c!==null||l!==void 0){var ne=[];if(l!==void 0)for(g of l)(g.f&A)===0&&ne.push(g);for(;c!==null;)(c.f&A)===0&&c!==e.fallback&&ne.push(c),c=la(c.next);var re=ne.length;if(re>0){var ie=(r&Ke)!==0&&o===0?n:null;if(a){for(_=0;_<re;_+=1){var ae;(ae=ne[_].nodes)==null||(ae=ae.a)==null||ae.measure()}for(_=0;_<re;_+=1){var w;(w=ne[_].nodes)==null||(w=w.a)==null||w.fix()}}aa(e,ne,ie)}}a&&Nt(()=>{if(d!==void 0)for(g of d){var e;(e=g.nodes)==null||(e=e.a)==null||e.apply()}})}function da(e,t,n,r,i,a,o,s){var c=(o&We)===0?null:(o&Je)===0?lr(n,!1,!1):cr(n),l=(o&Ge)===0?null:cr(i);return{v:c,i:l,e:Vr(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function fa(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&(t.f&ve)===0?t.nodes.start:n;r!==null;){var o=Sr(r);if(a.before(r),r===i)return;r=o}}function pa(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function ma(e,t,n,r,i){M&&pt();var a=t.$$slots?.[n],o=!1;a===!0&&(a=t[n===`default`?`children`:n],o=!0),a===void 0?i!==null&&i(e):a(e,o?()=>r:r)}function ha(e,t,...n){var r=new na(e);Br(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},pe)}function ga(e,t){Lr(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector(`#`+t.hash)){let e=Er(`style`);e.id=t.hash,e.textContent=t.code,r.appendChild(e)}})}function _a(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=_a(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function va(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=_a(e))&&(r&&(r+=` `),r+=t);return r}function ya(e){return typeof e==`object`?va(e):e??``}var ba=[...`
7
+ \r\f\xA0\v`];function xa(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||ba.includes(r[o-1]))&&(s===r.length||ba.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Sa(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function Ca(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function wa(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(Ca)),i&&c.push(...Object.keys(i).map(Ca));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=Ca(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=Sa(r)),i&&(n+=Sa(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function Ta(e,t,n,r,i,a){var o=e.__className;if(M||o!==n||o===void 0){var s=xa(n,r,a);(!M||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e.__className=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function Ea(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function Da(e,t,n,r){var i=e.__style;if(M||i!==t){var a=wa(t,r);(!M||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e.__style=t}else r&&(Array.isArray(r)?(Ea(e,n?.[0],r[0]),Ea(e,n?.[1],r[1],`important`)):Ea(e,n,r));return r}var Oa=Symbol(`is custom element`),ka=Symbol(`is html`),Aa=De?`link`:`LINK`;function ja(e,t,n,r){var i=Ma(e);M&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===Aa)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[Te]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&Pa(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Ma(e){return e.__attributes??={[Oa]:e.nodeName.includes(`-`),[ka]:e.namespaceURI===ct}}var Na=new Map;function Pa(e){var t=e.getAttribute(`is`)||e.nodeName,n=Na.get(t);if(n)return n;Na.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=S(i),r)r[o].set&&n.push(o);i=te(i)}return n}var Fa=new WeakMap,Ia=new WeakMap,La=new WeakMap,Ra=new WeakSet;class za{constructor(e){t(this,Ra),n(this,Fa,new WeakMap),n(this,Ia,void 0),n(this,La,void 0),a(La,this,e)}observe(e,t){var n=r(Fa,this).get(e)||new Set;return n.add(t),r(Fa,this).set(e,n),i(Ra,this,Ba).call(this).observe(e,r(La,this)),()=>{var n=r(Fa,this).get(e);n.delete(t),n.size===0&&(r(Fa,this).delete(e),r(Ia,this).unobserve(e))}}}l=za;function Ba(){return r(Ia,this)??a(Ia,this,new ResizeObserver(e=>{for(var t of e){l.entries.set(t.target,t);for(var n of r(Fa,this).get(t.target)||[])n(t)}}))}e(za,`entries`,new WeakMap);function Va(e,t){return e===t||e?.[Ce]===t}function Ha(e={},t,n,r){return Lr(()=>{var i,a;return zr(()=>{i=a,a=r?.()||[],Ti(()=>{e!==n(...a)&&(t(e,...a),i&&Va(n(...i),e)&&t(null,...i))})}),()=>{Nt(()=>{a&&Va(n(...a),e)&&t(null,...a)})}}),e}function Ua(e,t,n){if(e==null)return t(void 0),n&&n(void 0),re;let r=Ti(()=>e.subscribe(t,n));return r.unsubscribe?()=>r.unsubscribe():r}var Wa=[];function Ga(e,t){return{subscribe:Y(e,t).subscribe}}function Y(e,t=re){let n=null,r=new Set;function i(t){if(vt(e,t)&&(e=t,n)){let t=!Wa.length;for(let t of r)t[1](),Wa.push(t,e);if(t){for(let e=0;e<Wa.length;e+=2)Wa[e][0](Wa[e+1]);Wa.length=0}}}function a(t){i(t(e))}function o(o,s=re){let c=[o,s];return r.add(c),r.size===1&&(n=t(i,a)||re),o(e),()=>{r.delete(c),r.size===0&&n&&(n(),n=null)}}return{set:i,update:a,subscribe:o}}function Ka(e,t,n){let r=!Array.isArray(e),i=r?[e]:e;if(!i.every(Boolean))throw Error(`derived() expects stores as input, got a falsy value`);let a=t.length<2;return Ga(n,(e,n)=>{let o=!1,s=[],c=0,l=re,u=()=>{if(c)return;l();let i=t(r?s[0]:s,e,n);a?e(i):l=typeof i==`function`?i:re},d=i.map((e,t)=>Ua(e,e=>{s[t]=e,c&=~(1<<t),o&&u()},()=>{c|=1<<t}));return o=!0,u(),function(){ie(d),l(),o=!1}})}function X(e){let t;return Ua(e,e=>t=e)(),t}var qa=!1,Ja=Symbol();function Ya(e,t,n){let r=n[t]??(n[t]={store:null,source:lr(void 0),unsubscribe:re});if(r.store!==e&&!(Ja in n))if(r.unsubscribe(),r.store=e??null,e==null)r.source.v=void 0,r.unsubscribe=re;else{var i=!0;r.unsubscribe=Ua(e,e=>{i?r.source.v=e:R(r.source,e)}),i=!1}return e&&Ja in n?X(e):W(r.source)}function Xa(){let e={};function t(){Nr(()=>{for(var t in e)e[t].unsubscribe();b(e,Ja,{enumerable:!1,value:!0})})}return[e,t]}function Za(e){var t=qa;try{return qa=!1,[e(),qa]}finally{qa=t}}function Qa(e,t,n,r){var i=!xt||(n&Xe)!==0,a=(n&Qe)!==0,o=(n&$e)!==0,s=r,c=!0,l=()=>(c&&(c=!1,s=o?Ti(r):r),s),u;if(a){var d=Ce in e||we in e;u=x(e,t)?.set??(d&&t in e?n=>e[t]=n:void 0)}var f,p=!1;a?[f,p]=Za(()=>e[t]):f=e[t],f===void 0&&r!==void 0&&(f=l(),u&&(i&&Re(t),u(f)));var m=i?()=>{var n=e[t];return n===void 0?l():(c=!0,n)}:()=>{var n=e[t];return n!==void 0&&(s=void 0),n===void 0?s:n};if(i&&(n&Ze)===0)return m;if(u){var h=e.$$legacy;return function(e,t){return arguments.length>0?((!i||!t||h||p)&&u(t?m():e),e):m()}}var g=!1,_=((n&Ye)===0?Qn:Xn)(()=>(g=!1,m()));a&&W(_);var v=U;return function(e,t){if(arguments.length>0){let n=t?W(_):i&&a?mr(e):e;return R(_,n),g=!0,s!==void 0&&(s=n),e}return ti&&g||(v.f&j)!==0?_.v:W(_)}}function $a(e){F===null&&je(`onMount`),xt&&F.l!==null?to(F).m.push(e):Pr(()=>{let t=Ti(e);if(typeof t==`function`)return t})}function eo(e){F===null&&je(`onDestroy`),$a(()=>()=>Ti(e))}function to(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}var no={debugLog:!1,devNullLog:!1,defaultLanguage:m.RU,downloadVKLanguages:!0,updateBuiltinLanguages:!0,showSupport:!0,supportLink:`https://vk.com/support?act=new&from=v`,showLogo:void 0,logoLink:`https://vk.com/video`,logoType:`vk_video`,volumeDefault:1,volumeMinRestore:.05,loaderDelay:500,minSubtitlesFontSize:13,autoSubtitlesTimeout:2e3,trafficSavingLimit:h.Q_480P,highQualityLimit:h.Q_720P,features:{autoplay:!0,statistics:!0,thinStatistics:!1,preload:!0,subtitles:!0,fullscreen:!0,download:!0,liveRewind:!0,playbackRate:!0,trafficSaving:!0,copyVideoLink:!0,videoRotate:!0,audioLanguages:!1,saveRate:!1,fullscreenInternalTargetPlayerContainer:!1,endScreen:!0,previewNoEmptySpace:!1,exposeInternalsToGlobal:!1,userVideoPrefs:!1,initSubtitles:!0},controls:{playbackRateMin:.25,playbackRateMax:2,playbackRateStep:.25},ads:{enable:void 0,initTimeout:2e3,loadTimeout:2e3,runtimeTimeout:5e3,slot:void 0,preview:void 0,paramsOverride:void 0,isMobileGoToSiteButton:!0,useAdmanFromNPM:!1,volumeMultiplier:1,isVsidOriginal:!1},userSalt:`0`},ro=e=>p(e,no),io=`ui-config`,ao=()=>wt(io);import{cloneDeepWith as oo,devNull as so,ErrorCategory as co,getMessageFromError as lo,getPlayerId as uo,getWindow as fo,InterfaceLanguage as po,Logger as mo,Subscription as ho}from"@vkontakte/videoplayer-shared/es2015";var go=`5`;if(typeof window<`u`){var _o,vo;((_o=(vo=window).__svelte??(vo.__svelte={})).v??(_o.v=new Set)).add(go)}St();var yo=`var(--btn-color, #fff)`,bo=Hi(`<g filter="url(#strokeAndShadow)"><!></g><defs><filter x="-12" width="72" y="-12" height="72" id="strokeAndShadow"><feMorphology operator="dilate" radius=".4" result="outer"></feMorphology><feFlood flood-color="rgba(0,0,0,0.1)" result="outerColor"></feFlood><feComposite operator="in" in="outerColor" in2="outer" result="outerOutline"></feComposite><feDropShadow in="SourceGraphic" dx="0" dy="0" stdDeviation="3" flood-color="rgba(0,0,0,0.4)" result="outerShadow"></feDropShadow><feMerge><feMergeNode in="outerShadow"></feMergeNode><feMergeNode in="outerOutline"></feMergeNode><feMergeNode in="SourceGraphic"></feMergeNode></feMerge></filter></defs>`,1),xo=Hi(`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill-rule="evenodd" clip-rule="evenodd"><!></svg>`);function So(e,t){Et(t,!0);let n=Qa(t,`width`,19,()=>`14`),r=Qa(t,`height`,19,()=>`14`),i=Qa(t,`fill`,3,yo),a=I(()=>t.viewBox??`0 0 ${n()} ${r()}`);var o=xo(),s=z(o),c=e=>{var n=bo(),r=Cr(n);ha(z(r),()=>t.children),P(r),mt(),K(e,n)},l=e=>{var n=Ui();ha(Cr(n),()=>t.children),K(e,n)};J(s,e=>{t.shadow?e(c):e(l,!1)}),P(o),V(()=>{ja(o,`aria-label`,t.ariaLabel),ja(o,`aria-hidden`,!t.ariaLabel),ja(o,`width`,n()),ja(o,`height`,r()),ja(o,`viewBox`,W(a)),ja(o,`fill`,i()),Da(o,t.style),ja(o,`data-testid`,t.testId)}),K(e,o),Dt()}var Co=Hi(`<path d="M460 194a4 4 0 0 1 4-4h122a4 4 0 0 1 4 4v82a4 4 0 0 1-4 4H464a4 4 0 0 1-4-4zm6 3a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm112-72a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm-71-37a6 6 0 1 0 0-12 6 6 0 0 0 0 12m36 0a6 6 0 1 0 0-12 6 6 0 0 0 0 12m-18.05 15c6.05 0 11.62 4.45 11.94 4.65 2.11 1.35 3.26.77 3.96.16s1.15-2.81-1.04-4.66c-1.74-1.48-5.8-5.16-14.86-5.15s-12.95 3.5-14.8 5.18c-1.83 1.69-2.28 3.5-.96 4.66s2.31 1.16 4.35-.33c0 .01 5.36-4.51 11.41-4.51"></path>`);function wo(e){So(e,{width:`200`,height:`200`,viewBox:`460 190 130 90`,testId:`error-icon`,children:(e,t)=>{K(e,Co())},$$slots:{default:!0}})}var To=G(`<div class="container s-2"><!></div>`),Eo={hash:`s-2`,code:`.container.s-2{align-items:center;background:#000;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}`};function Do(e){ga(e,Eo);var t=To();wo(z(t),{}),P(t),K(e,t)}var Oo=G(`<div class="playerError s-0"><!></div>`),ko={hash:`s-0`,code:`.playerError.s-0{align-items:center;background-color:#222;background-position:50%;background-size:cover;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;position:relative;width:100%}`};function Ao(e){ga(e,ko);var t=Oo();Do(z(t),{}),P(t),K(e,t)}function jo(e,t){let n=new Set([...Object.keys(e),...Object.keys(t)]),r={};for(let i of n)r[i]=t[i]??e[i]??void 0;return r}var Mo=`ui-tv`,No=`error-tracer`;import{MediascopePixel as Po,OneStat as Fo,ThinOneStat as Io}from"@vkontakte/videoplayer-statistics/es2015";import{Subscription as Lo}from"@vkontakte/videoplayer-shared/es2015";class Ro{constructor(t=void 0,n=void 0,r=void 0,i=new Lo){e(this,`oneStat`,void 0),e(this,`thinOneStat`,void 0),e(this,`mediascopePixel`,void 0),e(this,`statSubscription`,void 0),this.oneStat=t,this.thinOneStat=n,this.mediascopePixel=r,this.statSubscription=i}destroy(){this.oneStat?.destroy(),this.thinOneStat?.destroy(),this.mediascopePixel?.destroy(),this.statSubscription.unsubscribe()}}import{Player as zo,VideoQuality as Bo}from"@vkontakte/videoplayer-core/es2015";import{assertNonNullable as Vo,cloneDeep as Ho,ErrorCategory as Uo,getMessageFromError as Wo,Logger as Go,Subscription as Ko,TracerFactory as qo}from"@vkontakte/videoplayer-shared/es2015";import{promiseFinally as Jo}from"@vkontakte/videoplayer-shared/es2015";import{objectEntries as Yo}from"@vkontakte/videoplayer-shared/es2015";import{objectFromEntries as Xo}from"@vkontakte/videoplayer-shared/es2015";import{addScript as Zo,clearVideoElement as Qo,detectEmbed as $o,devNull as Z,isNonNullable as es,nowInt as Q,Subject as ts}from"@vkontakte/videoplayer-shared/es2015";var ns=`//ad.mail.ru/static/admanhtml/rbadman-html5.min.js`;class rs{constructor(t,n){e(this,`adman`,null),e(this,`initialVolume`,1),e(this,`volumeMultiplier`,void 0),e(this,`videoElement`,null),e(this,`currentAdSection`,null),e(this,`actions`,null),e(this,`adsState`,null),e(this,`playerState`,null),e(this,`ordIds`,[]),e(this,`isDestroyed`,void 0),e(this,`log`,void 0),e(this,`loadTimeout`,void 0),e(this,`initTimeout`,void 0),e(this,`runtimeTimeout`,void 0),e(this,`useAdmanFromNPM`,void 0),e(this,`isVsidOriginal`,void 0),e(this,`watchDogTimeout`,void 0),e(this,`externalApi`,void 0),e(this,`events`,{init$:new ts,loadStarted$:new ts,loadEnded$:new ts,loadError$:new ts,ready$:new ts,slotRequested$:new ts,started$:new ts,timeRemained$:new ts,paused$:new ts,resumed$:new ts,ended$:new ts,empty$:new ts,skipped$:new ts,clicked$:new ts,closed$:new ts,error$:new ts}),e(this,`loadAdman`,e=>(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_load_start`,this.useAdmanFromNPM?`npm`:`http`],numbers:[Q()]}),this.useAdmanFromNPM?this.loadAdmanNPM(e):this.loadAdmanMailRu(e))),e(this,`loadAdmanMailRu`,e=>new Promise((t,n)=>{let r;this.events.loadStarted$.next();let i=()=>{clearTimeout(r),delete window.admanAsyncInit,window.AdmanHTML?(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_async_init_done`,`http`],numbers:[Q()]}),t(),this.events.loadEnded$.next()):(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_init_timed_out`,`http`],numbers:[Q()]}),n())};Zo(ns,e,this.loadTimeout).then(()=>{Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_script_loaded`,`http`],numbers:[Q()]}),window.AdmanHTML?(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_already_inited`,`http`],numbers:[Q()]}),t(),this.events.loadEnded$.next()):(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_wait_async_init`,`http`],numbers:[Q()]}),window.admanAsyncInit=i,r=window.setTimeout(i,this.initTimeout))}).catch(e=>{Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_script_load_error`,`http`,String(e)],numbers:[Q()]}),n(),clearTimeout(r)})})),e(this,`loadAdmanNPM`,e=>new Promise((t,n)=>{let r;this.events.loadStarted$.next();let i=()=>{clearTimeout(r),delete window.admanAsyncInit,window.AdmanHTML?(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_init_done`,`npm`],numbers:[Q()]}),t(),this.events.loadEnded$.next()):(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_init_timed_out`,`npm`],numbers:[Q()]}),n())},a=()=>{o=!0,n()},o=!1,s=window.setTimeout(()=>{Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_load_timed_out`,`npm`],numbers:[Q()]}),a()},this.loadTimeout);e.addEventListener(`abort`,a),e.aborted&&(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_load_aborted`,`npm`],numbers:[Q()]}),a()),window.AdmanHTML=window.AdmanHTML||null,Jo(import(`@adtech/rbadman/out/rbadman-html5.min.js`).then(()=>{Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_chunk_imorted`,`npm`,`failed: `+String(o)],numbers:[Q()]}),!o&&(window.AdmanHTML?(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_already_inited`,`npm`],numbers:[Q()]}),t(),this.events.loadEnded$.next()):(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_wait_async_init`,`npm`],numbers:[Q()]}),window.admanAsyncInit=i,r=window.setTimeout(i,this.initTimeout)))},a),()=>{clearTimeout(r),clearTimeout(s),e.removeEventListener(`abort`,a)})})),e(this,`onAdsReady`,()=>{Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ads_ready`],numbers:[Q()]}),this.log({message:`ads ready`}),this.events.ready$.next(),this.startPreroll()}),e(this,`onAdStarted`,(e,t)=>{this.ordIds.push(t.ordID),Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_started`,e,`muted: `+t.muted],numbers:[Q(),t.bannerID]}),this.adsState&&this.playerState&&this.actions?(this.log({message:`ad started, section: ${e}, banner: ${JSON.stringify(t)}`}),this.events.started$.next(e),t.muted&&(this.setVolume(0),this.actions.setMuted(!0),this.log({message:`ad muted start`})),this.adsState.duration.set(t.duration),this.adsState.playbackState.set(`playing`),this.adsState.canSkip.set(t.allowClose),this.adsState.secondsToWatchBeforeSkip.set(t.allowCloseDelay),this.startWatchDog(),this.externalApi?.videoTrackAdEvent&&this.safeExternalCall(this.externalApi.videoTrackAdEvent,e,String(t.bannerID))):this.onAdError(`Started callback failed: Adman is not initialized`)}),e(this,`onAdTimeRemained`,e=>{(this.adsState?.playbackState?X(this.adsState.playbackState):void 0)!==`inactive`&&(this.adsState?(this.adsState.position.set(e.currentTime),this.events.timeRemained$.next(e),this.startWatchDog()):this.onAdError(`TimeRemained callback failed: Adman state is not initialized`))}),e(this,`onAdPaused`,()=>{Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_pased`,this.currentAdSection??``],numbers:[Q()]}),this.stopWatchDog(),this.adsState?(this.log({message:`ad paused`}),this.adsState.playbackState.set(`paused`)):this.onAdError(`Paused callback failed: Adman state is not initialized`)}),e(this,`onAdPlayed`,()=>{Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_played`,this.currentAdSection??``],numbers:[Q()]}),this.startWatchDog(),this.adsState?(this.log({message:`ad played`}),this.adsState.playbackState.set(`playing`)):this.onAdError(`Player callback failed: Adman is not initialized`)}),e(this,`onAdMidrollPoint`,()=>{if(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_midroll_pioint`],numbers:[Q()]}),this.adman&&this.actions){this.log({message:`midroll point`}),this.actions.switchFromVideoToAds(),this.currentAdSection=`midroll`,this.startWatchDog();try{this.adman.start(`midroll`)}catch{this.onAdError(`could not start midroll`)}}else this.onAdError(`Midroll callback failed: Adman is not initialized`)}),e(this,`onAdSkipped`,()=>{Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_skipped`,this.currentAdSection??``],numbers:[Q()]}),this.log({message:`ad skipped`}),this.stopWatchDog()}),e(this,`onAdClosed`,()=>{Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_closed`,this.currentAdSection??``],numbers:[Q()]}),this.log({message:`ad closed`}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()}),e(this,`onAdCompleted`,()=>{Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_completed`,this.currentAdSection??``],numbers:[Q()]}),this.log({message:`ad completed`}),this.currentAdSection?((this.adsState?X(this.adsState.playbackState):void 0)===`inactive`&&(this.onAdError(`Ad was inited, but can't playing`),this.events.ended$.next({section:this.currentAdSection,ordIds:this.ordIds})),this.currentAdSection===`postroll`&&this.setPostrollPassed(!0)):this.events.empty$.next(),this.switchToVideo(),this.stopWatchDog()}),e(this,`onAdClicked`,()=>{Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_clicked`,this.currentAdSection??``],numbers:[Q()]}),this.log({message:`ad clicked`}),this.videoElement?.pause(),this.currentAdSection&&this.events.clicked$.next(this.currentAdSection),this.stopWatchDog()}),e(this,`onAdError`,(e=`ad error`)=>{Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_error`,e],numbers:[Q()]}),this.log({message:e}),this.events.error$.next(e),this.currentAdSection===`postroll`&&this.setPostrollPassed(!0),this.switchToVideo(!0),this.stopWatchDog()}),this.log=t.createComponentLog(`AdmanWrapper`),Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_created`],numbers:[Q()]}),this.loadTimeout=n.loadTimeout,this.initTimeout=n.initTimeout,this.runtimeTimeout=n.runtimeTimeout,this.useAdmanFromNPM=n.useAdmanFromNPM,this.volumeMultiplier=Math.max(0,Math.min(n.volumeMultiplier,1)),this.isVsidOriginal=n.isVsidOriginal}init(e,t,n){this.actions=e,this.adsState=t,this.playerState=n}onAdmanLoadingError(){this.onAdError(`adman loading error`)}initAdman(e){var t=this;return s(function*(){if(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_init`,`already inited: `+!!t.adman],numbers:[Q(),e.slotId]}),t.adman)return;t.events.init$.next(e.slotId),t.startWatchDog();let{width:n,height:r,isAutoplay:i,adsContainer:a,adsVideoElement:s,slotId:c,params:l={},paramsOverride:u={},duration:d,externalApi:f}=e;t.externalApi=f;let p,m=t.playerState&&X(t.playerState.vsid);m&&(p=t.isVsidOriginal?m:parseInt(m,36));let{isEmbed:h,immediateOrigin:g}=$o(),_=(h?g:window.location.href)??window.location.href,v=o(o(o({},l),{},{dl:encodeURIComponent(_),autoplay:i?1:0,player_width:n,player_height:r},p?{request_id:p}:{}),{},{duration:d},u);v=Xo(Yo(v).filter(([e,t])=>es(t)));let y={slot:c,wrapper:a,videoEl:s,videoQuality:r,params:v,browser:{mobile:!1}};try{let n=new window.AdmanHTML;if(n.onReady(t.onAdsReady),n.onStarted(t.onAdStarted),n.onPlayed(t.onAdPlayed),n.onPaused(t.onAdPaused),n.adMidrollPoint(t.onAdMidrollPoint),n.onClosed(t.onAdClosed),n.onSkipped(t.onAdSkipped),n.onClicked(t.onAdClicked),n.onTimeRemained(t.onAdTimeRemained),n.onCompleted(t.onAdCompleted),n.onError(t.onAdError),n.setDebug(!1),t.externalApi?.videoGetAds){let e=yield t.safeExternalCall(t.externalApi.videoGetAds,v);e&&(delete y.slot,delete y.params,Object.assign(y,{json:e}))}n.init(y),t.adman=n,t.videoElement=s;let r=Object.keys(e.json?.sections??{}).join(`, `);t.events.slotRequested$.next(r),t.log({message:`adman init, config: ${JSON.stringify(y)}`})}catch(e){Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_init_threw`,String(e)],numbers:[Q()]}),t.onAdError(`could not init adman`)}})()}switchToVideo(e=!1){if(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_switch_to_video`,this.currentAdSection??``,`force: `+e],numbers:[Q()]}),this.currentAdSection===null&&!e){this.log({message:`switch to video, no currentAdSection. can't switch`});return}let t=this.currentAdSection===`postroll`;if(this.actions){var n;if(this.adsState&&this.playerState)this.adsState.playbackState.set(`inactive`),this.currentAdSection=null,this.log({message:`switch to video, isPostroll: ${t}`});else{let e=`Switch to video: Adman state was not updated correctly`;this.log({message:e}),this.events.error$.next(e)}(n=this.actions).switchFromAdsToVideo?.call(n,!t)}}setPostrollPassed(e){this.adsState?.postrollPassed.set(e),this.log({message:`postroll passed`})}togglePlay(){if(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_toggle_play`,this.currentAdSection??``],numbers:[Q()]}),this.adsState){this.log({message:`toggle play`});let e=X(this.adsState.playbackState);e===`playing`?this.pause():e===`paused`&&this.play()}else this.onAdError(`Can not toggle play: Adman state is not initialized`)}setInitialVolume(e){this.log({message:`set initial volume ${e}`}),this.initialVolume=e}setVolume(e){let t=e*this.volumeMultiplier;if(this.log({message:`set volume ${t}`}),this.adman)try{this.adman.setVolume(t)}catch{this.onAdError(`could not set ad volume`)}this.videoElement&&(this.videoElement.volume=t)}setFullscreen(e){if(this.log({message:`set fullscreen ${e}`}),this.adman)try{this.adman.setFullscreen(e)}catch{this.onAdError(`could not set ad fullscreen`)}}startPreroll(){if(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_start_preroll`],numbers:[Q()]}),this.adman){if(!this.isDestroyed){this.log({message:`start preroll`}),this.setVolume(this.initialVolume),this.currentAdSection=`preroll`,this.startWatchDog();try{this.adman.start(`preroll`)}catch{this.onAdError(`could not start preroll`)}}}else this.onAdError(`Can not start preroll: Adman is not initialized`)}startPostroll(){if(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_start_postroll`,this.currentAdSection??``],numbers:[Q()]}),this.adman&&this.actions){this.log({message:`start postroll`}),this.actions.switchFromVideoToAds(),this.currentAdSection=`postroll`,this.startWatchDog();try{this.adman.start(`postroll`)}catch{this.onAdError(`could not start postroll`)}}else this.onAdError(`Can not start postroll: Adman is not initialized`)}startWatchDog(){this.watchDogTimeout&&this.stopWatchDog(),this.watchDogTimeout=window.setTimeout(()=>this.onAdError(`Watchdog timeout`),this.runtimeTimeout)}stopWatchDog(){clearTimeout(this.watchDogTimeout)}play(){if(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_pplay`,this.currentAdSection??``],numbers:[Q()]}),this.adman){this.log({message:`ad play`}),this.startWatchDog();try{this.adman.resume(),this.events.resumed$.next()}catch{this.onAdError(`could not resume ad`)}}else this.onAdError(`Can not play: Adman is not initialized`)}pause(){if(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_pause`,this.currentAdSection??``],numbers:[Q()]}),this.adman){this.stopWatchDog(),this.log({message:`ad pause`});try{this.adman.pause(),this.events.paused$.next()}catch{this.onAdError(`could not pause ad`)}}else this.onAdError(`Can not pause: Adman is not initialized`)}skip(){if(Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_skip`,this.currentAdSection??``],numbers:[Q()]}),this.adman){this.stopWatchDog(),this.log({message:`ad skip`});try{this.adman.skip(),this.events.skipped$.next()}catch{this.onAdError(`could not skip ad`)}}else this.onAdError(`Can not skip: Adman is not initialized`)}setPosition(e,t){this.adman?.setPosition(Math.floor(e),Math.floor(t))}destroy(){Z.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_destroy`],numbers:[Q()]}),this.log({message:`destroy`}),this.stopWatchDog(),this.adman?.onReady(void 0),this.adman?.onStarted(void 0),this.adman?.onPlayed(void 0),this.adman?.onPaused(void 0),this.adman?.adMidrollPoint(void 0),this.adman?.onClosed(void 0),this.adman?.onSkipped(void 0),this.adman?.onClicked(void 0),this.adman?.onTimeRemained(void 0),this.adman?.onCompleted(void 0),this.adman?.onError(void 0),this.adman?.destroy(),this.videoElement&&Qo(this.videoElement),this.isDestroyed=!0}safeExternalCall(e,...t){var n=this;return s(function*(){try{return yield e(...t)}catch(e){return n.onAdError(e?.message??`External call failed`),null}})()}}import{objectValues as is}from"@vkontakte/videoplayer-shared/es2015";import{stringReplaceAll as as}from"@vkontakte/videoplayer-shared/es2015";import{isNullable as os,InterfaceLanguage as ss}from"@vkontakte/videoplayer-shared/es2015";import{objectEntries as cs}from"@vkontakte/videoplayer-shared/es2015";import{AbortControllerPolyfilled as ls}from"@vkontakte/videoplayer-shared/es2015";import{fetchPolyfilled as us}from"@vkontakte/videoplayer-shared/es2015";import{assertNonNullable as ds,getWindow as fs,VERSION as ps}from"@vkontakte/videoplayer-shared/es2015";import{VERSION as ms}from"@vkontakte/videoplayer-core/es2015";import{VERSION as hs}from"@vkontakte/videoplayer-statistics/es2015";var gs=Symbol(`storeContext`),_s=()=>{let e=wt(gs);return ds(e,`Store context is empty!`),e},$=(e,t)=>vs(e,e.getValue(),t),vs=(e,t,n)=>Ga(t,t=>{let r=e.subscribe(e=>{t(e),n?.(e)});return()=>r.unsubscribe()}),ys=(e,t,n,r,i=[`meta config not provided`])=>{let a=e.info,{clientWidth:o,clientHeight:s}=fs().document.body,c=a.throughputEstimation$.getValue()?.toFixed(0)??0,l=a.rttEstimation$.getValue()?.toFixed(0)??0,u=a.isAutoQualityEnabled$.getValue()?`auto`:`manual`,f=`${d} (core: ${ms}, stat: ${hs}, shared: ${ps})`,p=X(n.playerState.errorLog$),m=p.length?`
51
8
  `+p.map((e,t)=>{let n=`${t}) Type: ${e.id}
52
9
  `,r=`Message: ${e.message} (${e.thrown})
53
10
  `,i=`Trace: ${e.thrown?.stack}
54
11
  `;return n+r+i}).join(`
55
- `):void 0,h=n.playerState.isAudioDisabled?`disabled`:Y(n.playerState.isAudioAvailable$)?void 0:`unavailable`,g=e.info.currentVideoStream$.getValue(),_=e.info.currentAudioStream$.getValue(),v=[];g&&v.push(`Video: ${g?.codec??``}`+(g?.hdr?` (HDR)`:``)),_&&v.push(`Audio: ${_?.codec??``}`+(_?.language?` (${_.language})`:``));let y=a.currentQuality$.getValue(),b=``;if(y){let e=a.availableQualitiesFps$.getValue()[y];b=e?`${e}fps`:``}let x=a.httpConnectionType$.getValue(),S=a.currentBuffer$.getValue()?.end??0,C=Math.max(S-Y(n.playerState.positionExact$),0);return Qs({Version:f,Browser:nc().navigator.userAgent,Config:i.join(`, `),"United video id":String(n.videoId),TraceId:r,VSID:Y(n.vsid),"Content host":a.hostname$.getValue(),"Connection type":x?x+(a.httpConnectionReused$.getValue()?` (reused)`:``):``,Throughput:`${c}Kbps @ ${l}ms RTT`,Format:a.currentFormat$.getValue(),"Available Formats":t?.sources?Object.keys(t.sources).join(`, `):``,Streams:v.join(`, `),Quality:`${u} ${y??``} ${b}`,"Available qualities":a.availableQualities$.getValue().join(`, `),Audio:h,Position:`${Y(n.playerState.positionExact$)}s`,Buffer:`${C}s`,State:`${Y(n.playerPhase)} ${a.playbackState$.getValue()??``}`,"Player size":`${o}x${s}`,URL:nc().location.href,Errors:m}).filter(([e,t])=>t!==void 0).map(([e,t])=>`${e}: ${t}`).join(`
56
- `)},uc=(e,t,n)=>{let r=e.info,{clientWidth:i,clientHeight:a}=nc().document.body,o={version:d,viewport:`${i}x${a}`,volume:Math.round(Y(n.playerState.volume$)*100)};o.id=n.videoId,r.currentFormat$.getValue()&&(o.provider=r.currentFormat$.getValue()),r.hostname$.getValue()&&(o.cdn=r.hostname$.getValue());let s=r.intrinsicVideoSize$.getValue();s&&(o.videoSize=`${s.width}x${s.height}`);let c=r.currentBuffer$.getValue(),l=r.currentNativeBuffer$.getValue(),u=r.isLive$.getValue(),f=r.liveBufferTime$.getValue();c&&l&&(u&&f?(o.buffer=c.end-f,o.nativeBuffer=l.end-f):(o.buffer=Math.max(c.end-Y(n.playerState.positionExact$),0),o.nativeBuffer=Math.max(l.end-Y(n.playerState.positionExact$),0))),o.position=Y(n.playerState.positionExact$);let p=r.throughputEstimation$.getValue();p&&(o.speed=p);let m=r.videoBitrate$.getValue();m&&(o.bitrate=m);let h=r.liveLatency$.getValue();h&&(o.liveLatency=h);let g=r.currentVideoSegmentLength$.getValue();g&&(o.currentVideoSegmentLength=g);let _=r.currentAudioSegmentLength$.getValue();_&&(o.currentAudioSegmentLength=_);let v=Y(n.vsid);typeof v==`string`&&(o.vsid=v);let y=e.info.currentVideoStream$.getValue()?.codec;y&&(o.videoCodec=y);let b=e.info.currentAudioStream$.getValue()?.codec;b&&(o.audioCodec=b),e.info.currentVideoStream$.getValue()?.hdr&&(o.hdr=!0);let x=e.info.currentAudioStream$.getValue()?.language;return x&&(o.audioLanguage=x),o},dc=()=>{let e=[],t=0;return{add:(n,r)=>{e[t]=[n,r],t=(t+1)%10},find:t=>e.find(([e])=>e===t)}};class fc{constructor(){e(this,`destroyController`,new $s),e(this,`pendingDownloads`,new Set)}download(e){var t=this;return s(function*(){if(t.pendingDownloads.has(e))return null;t.pendingDownloads.add(e);try{let n=yield ec(e,{signal:t.destroyController.signal});if(n.ok)return yield n.text();throw n}finally{t.pendingDownloads.delete(e)}})()}destroy(){this.destroyController.abort(),this.pendingDownloads.clear()}isDestroyed(){return this.destroyController.signal.aborted}}function pc(e,t=e=>e){let n=J(e);return[Lo(e,e=>{n.subscribe(e)}),e=>{n.set(t(e))}]}var mc={auto_quality_invariant:`Авто`,auto_quality:`Авто ({actual})`,auto_quality_option:`Авто`,other_quality:`Другое`,high_quality:`Высокое качество`,high_quality_description:`Будет использовано больше трафика`,auto_quality_limit:`Автоматически`,traffic_saving_quality:`Экономия трафика`,traffic_saving_quality_description:`Видео грузятся быстрее, но качество ниже`,default_quality_for_any_video:`Качество для всех видео`,quality_applience:`Качество по умолчанию можно\xA0{action}`,quality_applience_action:`изменить`,menu_quality:`Качество`,menu_traffic_saving:`Экономия данных`,menu_playback_rate:`Скорость`,menu_report:`Сообщить о проблеме`,menu_pip:`Картинка в картинке`,menu_pip_close:`Развернуть видео`,menu_copy_video_link:`Скопировать ссылку на видео`,menu_copy_video_link_with_timestamp:`Скопировать ссылку на кадр`,menu_video_rotate:`Повернуть`,menu_video_loop_on:`Включить повторение`,menu_video_loop_off:`Отключить повторение`,menu_chromecast:`Chromecast трансляция`,menu_copy_debug:`Копировать данные для диагностики`,menu_save_debug:`Сохранить данные для диагностики`,menu_debug_overlay:`Техническая информация`,menu_copy_embed_code:`Копировать код для встраивания`,menu_audio_languages:`Звуковая дорожка`,audio_stream_display_language_label:`{label} ({language})`,audio_stream_display_language_label_index:`{label} {index} ({language})`,audio_stream_display_label_index:`{label} {index}`,audio_stream_display_language_index:`{language} {index}`,audio_stream_display_unknown:`Дорожка {index}`,pip_dummy_title:`Видео воспроизводится в режиме картинка в картинке`,submenu_quality:`Качество`,submenu_playback_rate:`Скорость`,submenu_settings:`Настройки`,submenu_traffic_saving:`Экономия данных`,submenu_audio_languages:`Звуковая дорожка`,playing_ads:`Реклама {timeleft}`,skip_ads_now:`Пропустить рекламу`,skip_ads_after:`Пропустить {time}с`,visit_advertiser:`Перейти на сайт`,aria_timeline:`Ползунок временной шкалы`,aria_timeline_value:`{position} (общая длительность {duration}`,doubletap_seek_step:`{seconds} секунд`,playback_rate_1:`Обычная`,playback_rate:`{multiplier}x`,video360:`панорамное видео`,subtitles_caption:`Субтитры`,subtitles_auto:`{language} (Автоматические)`,subtitles_off:`Выкл.`,subtitles_auto_caption:`Автоматические субтитры`,subtitles_turn_on:`Включить субтитры`,subtitles_turn_off:`Выключить субтитры`,traffic_saving_off:`Откл.`,traffic_saving_on:`Вкл.`,traffic_saving_helper_text:`При включении качество видео будет снижено для экономии трафика`,tooltip_button_disabled:`Кнопка недоступна`,tooltip_previous:`Предыдущее видео`,tooltip_restart:`Начать заново`,tooltip_play:`Смотреть`,tooltip_pause:`Пауза`,tooltip_next:`Следующее видео`,tooltip_interactive_go_back:`Вернуться к предыдущей главе`,tooltip_interactive_go_back_disabled:`История прохождения недоступна`,tooltip_interactive_go_back_disabled_first:`Вы смотрите первую главу`,tooltip_interactive_go_back_disabled_limit:`Лимит возвратов исчерпан`,tooltip_chapter_without_interactive:`В этой главе нет интерактива`,tooltip_interactive_of_chapter_completed:`Интерактивы этой главы уже пройдены`,tooltip_interactive_seek:`Перейти к интерактиву`,tooltip_interactive_graph_off:`Показать карту сюжета`,tooltip_interactive_graph_on:`Скрыть карту сюжета`,tooltip_live:`Перемотать на актуальный лайв`,tooltip_episodes:`Эпизоды`,tooltip_volume:`Включить звук`,tooltip_volume_muted:`Выключить звук`,tooltip_sound_unavailable:`Звук недоступен`,tooltip_subtitles_off:`Включить субтитры`,tooltip_subtitles_on:`Выключить субтитры`,tooltip_settings_off:`Открыть настройки`,tooltip_settings_on:`Закрыть настройки`,tooltip_fullscreen_off:`На весь экран`,tooltip_fullscreen_on:`Выйти из полноэкранного режима`,tooltip_chromecast_off:`Включить Chromecast`,tooltip_chromecast_on:`Выключить Chromecast`,tooltip_episode_finished:`Вы уже сделали свой выбор`,tooltip_episode_unfinished:`Не пройдено`,tooltip_disabled_when_interactive:`Интерактив уже идёт`,tooltip_disabled_when_graph_on:`Кнопка недоступна во время просмотра карты`,tooltip_interactive_interaction_time_indicator:`Нажмите на элемент интерактива`,tooltip_vk_logo:`Открыть в VK Видео`,tooltip_vk_video_logo:`Перейти в VK Видео`,tooltip_autoplay_off:`Включить автовоспроизведение`,tooltip_autoplay_on:`Отключить автовоспроизведение`,tooltip_context_menu_open:`Открыть контекстное меню`,tooltip_context_menu_close:`Закрыть контекстное меню`,download_video_caption:`Скачать видео`,hotkey_helper_current_volume:`{value} %`,hotkey_map_modal_title:`Быстрые клавиши`,hotkey_map_modal_close_btn_text:`Закрыть`,hotkey_map_group_title_common:`Общие`,hotkey_map_group_title_playback:`Воспроизведение`,hotkey_map_group_title_subtitles:`Субтитры`,hotkey_map_group_title_episodes:`Эпизоды`,hotkey_map_item_mute_description:`Включить или отключить звук`,hotkey_map_item_mute_value:`m`,hotkey_map_item_volume_up_description:`Увеличить громкость`,hotkey_map_item_volume_up_value:`Стрелка вверх`,hotkey_map_item_volume_down_description:`Уменьшить громкость`,hotkey_map_item_volume_down_value:`Стрелка вниз`,hotkey_map_item_pip_description:`Свернуть или развернуть мини-проигрыватель`,hotkey_map_item_pip_value:`i`,hotkey_map_item_full_screen_description:`Включить или выключить полноэкранный режим`,hotkey_map_item_full_screen_value:`f`,hotkey_map_item_show_context_menu_description:`Скрыть или показать контекстное меню`,hotkey_map_item_show_context_menu_value:`Shift + !`,hotkey_map_item_show_hotkey_map_description:`Скрыть или показать список горячих клавиш`,hotkey_map_item_show_hotkey_map_value:`Shift + ?`,hotkey_map_item_play_toggle_description:`Приостановить или продолжить воспроизведение`,hotkey_map_item_play_toggle_value:`Пробел (или k)`,hotkey_map_item_seek_backward_description:`Перемотать ролик на 10 секунд назад`,hotkey_map_item_seek_backward_value:`Стрелка влево (или j)`,hotkey_map_item_seek_forward_description:`Перемотать ролик на 10 секунд вперёд`,hotkey_map_item_seek_forward_value:`Стрелка вправо (или l)`,hotkey_map_item_fast_seek_backward_description:`Ускоренная перемотка назад`,hotkey_map_item_fast_seek_backward_value:`Shift + Стрелка влево`,hotkey_map_item_fast_seek_forward_description:`Ускоренная перемотка вперёд`,hotkey_map_item_fast_seek_forward_value:`Shift + Стрелка вправо`,hotkey_map_item_rate_down_description:`Уменьшить скорость воспроизведения`,hotkey_map_item_rate_down_value:`< (Shift + ,)`,hotkey_map_item_rate_up_description:`Увеличить скорость воспроизведения`,hotkey_map_item_rate_up_value:`> (Shift + .)`,hotkey_map_item_prev_frame_description:`Перейти к предыдущему кадру <br />(когда воспроизведение приостановлено)`,hotkey_map_item_prev_frame_value:`,`,hotkey_map_item_next_frame_description:`Перейти к следующему кадру <br />(когда воспроизведение приостановлено)`,hotkey_map_item_next_frame_value:`.`,hotkey_map_item_jump_seek_description:`Перейти к определённому моменту видео <br />(например, при нажатии на цифру «7» ролик будет перемотан до временной отметки, которая соответствует 70% от длительности видео)`,hotkey_map_item_jump_seek_value:`0, 1, 2, 3, 4, 5, 6, 7, 8, 9`,hotkey_map_item_subtitles_toggle_description:`Включить или отключить субтитры`,hotkey_map_item_subtitles_toggle_value:`c`,hotkey_map_item_prev_episode_description:`Перейти к предыдущему эпизоду`,hotkey_map_item_prev_episode_pc_value:`Ctrl + Стрелка влево`,hotkey_map_item_prev_episode_mac_value:`Option + Стрелка влево`,hotkey_map_item_next_episode_description:`Перейти к следующему эпизоду`,hotkey_map_item_next_episode_pc_value:`Ctrl + Стрелка вправо`,hotkey_map_item_next_episode_mac_value:`Option + Стрелка вправо`,hotkey_map_item_next_video_description:`Перейти к следующему видео`,hotkey_map_item_next_video_value:`Shift + N`,hotkey_map_item_prev_video_description:`Перейти к предыдущему видео`,hotkey_map_item_prev_video_value:`Shift + P`,waiting_live_day_value:`дн`,waiting_live_hour_value:`ч`,waiting_live_minute_value:`мин`,waiting_live_second_value:`сек`,waiting_live_colon:`:`,waiting_live_upcoming_title:`Трансляция еще не началась`,waiting_live_timer_title:`До начала трансляции осталось`,waiting_live_recover_title:`Трансляция приостановлена - она продолжится, когда автор вернётся`,waiting_record_title:`Трансляция завершена - запись появится позже`,aria_label_video_player:`Видео плеер`,aria_label_spherical_control:`Контроллер для сферического видео. Используйте клавиши со стрелками для панорамирования видео.`,aria_label_debug_panel:`Область с технической информацией, сделайте скриншот для техподдержки`,aria_label_new_tab_alert:`Откроется в новой вкладке.`,aria_label_menu_quality:`Качество: {actual}`,aria_label_menu_audio_languages:`Язык аудио: {actual}`,aria_label_menu_rate:`Скорость: {actual}`,aria_label_menu_subtitle:`Субтитры: {actual}`,aria_label_menu_download:`Скачать видео`,aria_label_menu_debug_overlay:`Отображение технической информации`,aria_label_menu_rotate:`Повернуть видео на 90 градусов`,aria_label_menu_loop:`Переключение режима повторения`,aria_label_submenu_back:`Вернуться в меню настроек`,aria_label_submenu_traffic_saving:`Режим экономии данных`,aria_label_settings:`Настройки`,aria_label_context_menu:`Контекстное меню`,aria_label_autoplay:`Автовоспроизведение`,end_screen_next_video:`Следующее видео`,end_screen_recommended_video:`Рекомендуемое видео`,slow_video_notification_button:`Выбрать качество «Авто»`,slow_video_notification_force_description:`Видео грузится слишком медленно,
12
+ `):void 0,h=n.playerState.isAudioDisabled?`disabled`:X(n.playerState.isAudioAvailable$)?void 0:`unavailable`,g=e.info.currentVideoStream$.getValue(),_=e.info.currentAudioStream$.getValue(),v=[];g&&v.push(`Video: ${g?.codec??``}`+(g?.hdr?` (HDR)`:``)),_&&v.push(`Audio: ${_?.codec??``}`+(_?.language?` (${_.language})`:``));let y=a.currentQuality$.getValue(),b=``;if(y){let e=a.availableQualitiesFps$.getValue()[y];b=e?`${e}fps`:``}let x=a.httpConnectionType$.getValue(),S=a.currentBuffer$.getValue()?.end??0,C=Math.max(S-X(n.playerState.positionExact$),0);return cs({Version:f,Browser:fs().navigator.userAgent,Config:i.join(`, `),"United video id":String(n.videoId),TraceId:r,VSID:X(n.vsid),"Content host":a.hostname$.getValue(),"Connection type":x?x+(a.httpConnectionReused$.getValue()?` (reused)`:``):``,Throughput:`${c}Kbps @ ${l}ms RTT`,Format:a.currentFormat$.getValue(),"Available Formats":t?.sources?Object.keys(t.sources).join(`, `):``,Streams:v.join(`, `),Quality:`${u} ${y??``} ${b}`,"Available qualities":a.availableQualities$.getValue().join(`, `),Audio:h,Position:`${X(n.playerState.positionExact$)}s`,Buffer:`${C}s`,State:`${X(n.playerPhase)} ${a.playbackState$.getValue()??``}`,"Player size":`${o}x${s}`,URL:fs().location.href,Errors:m}).filter(([e,t])=>t!==void 0).map(([e,t])=>`${e}: ${t}`).join(`
13
+ `)},bs=(e,t,n)=>{let r=e.info,{clientWidth:i,clientHeight:a}=fs().document.body,o={version:d,viewport:`${i}x${a}`,volume:Math.round(X(n.playerState.volume$)*100)};o.id=n.videoId,r.currentFormat$.getValue()&&(o.provider=r.currentFormat$.getValue()),r.hostname$.getValue()&&(o.cdn=r.hostname$.getValue());let s=r.intrinsicVideoSize$.getValue();s&&(o.videoSize=`${s.width}x${s.height}`);let c=r.currentBuffer$.getValue(),l=r.currentNativeBuffer$.getValue(),u=r.isLive$.getValue(),f=r.liveBufferTime$.getValue();c&&l&&(u&&f?(o.buffer=c.end-f,o.nativeBuffer=l.end-f):(o.buffer=Math.max(c.end-X(n.playerState.positionExact$),0),o.nativeBuffer=Math.max(l.end-X(n.playerState.positionExact$),0))),o.position=X(n.playerState.positionExact$);let p=r.throughputEstimation$.getValue();p&&(o.speed=p);let m=r.videoBitrate$.getValue();m&&(o.bitrate=m);let h=r.liveLatency$.getValue();h&&(o.liveLatency=h);let g=r.currentVideoSegmentLength$.getValue();g&&(o.currentVideoSegmentLength=g);let _=r.currentAudioSegmentLength$.getValue();_&&(o.currentAudioSegmentLength=_);let v=X(n.vsid);typeof v==`string`&&(o.vsid=v);let y=e.info.currentVideoStream$.getValue()?.codec;y&&(o.videoCodec=y);let b=e.info.currentAudioStream$.getValue()?.codec;b&&(o.audioCodec=b),e.info.currentVideoStream$.getValue()?.hdr&&(o.hdr=!0);let x=e.info.currentAudioStream$.getValue()?.language;return x&&(o.audioLanguage=x),o},xs=()=>{let e=[],t=0;return{add:(n,r)=>{e[t]=[n,r],t=(t+1)%10},find:t=>e.find(([e])=>e===t)}};class Ss{constructor(){e(this,`destroyController`,new ls),e(this,`pendingDownloads`,new Set)}download(e){var t=this;return s(function*(){if(t.pendingDownloads.has(e))return null;t.pendingDownloads.add(e);try{let n=yield us(e,{signal:t.destroyController.signal});if(n.ok)return yield n.text();throw n}finally{t.pendingDownloads.delete(e)}})()}destroy(){this.destroyController.abort(),this.pendingDownloads.clear()}isDestroyed(){return this.destroyController.signal.aborted}}function Cs(e,t=e=>e){let n=Y(e);return[Ga(e,e=>{n.subscribe(e)}),e=>{n.set(t(e))}]}var ws={auto_quality_invariant:`Авто`,auto_quality:`Авто ({actual})`,auto_quality_option:`Авто`,other_quality:`Другое`,high_quality:`Высокое качество`,high_quality_description:`Будет использовано больше трафика`,auto_quality_limit:`Автоматически`,traffic_saving_quality:`Экономия трафика`,traffic_saving_quality_description:`Видео грузятся быстрее, но качество ниже`,default_quality_for_any_video:`Качество для всех видео`,quality_applience:`Качество по умолчанию можно\xA0{action}`,quality_applience_action:`изменить`,menu_quality:`Качество`,menu_traffic_saving:`Экономия данных`,menu_playback_rate:`Скорость`,menu_report:`Сообщить о проблеме`,menu_pip:`Картинка в картинке`,menu_pip_close:`Развернуть видео`,menu_copy_video_link:`Скопировать ссылку на видео`,menu_copy_video_link_with_timestamp:`Скопировать ссылку на кадр`,menu_video_rotate:`Повернуть`,menu_video_loop_on:`Включить повторение`,menu_video_loop_off:`Отключить повторение`,menu_chromecast:`Chromecast трансляция`,menu_copy_debug:`Копировать данные для диагностики`,menu_save_debug:`Сохранить данные для диагностики`,menu_debug_overlay:`Техническая информация`,menu_copy_embed_code:`Копировать код для встраивания`,menu_audio_languages:`Звуковая дорожка`,audio_stream_display_language_label:`{label} ({language})`,audio_stream_display_language_label_index:`{label} {index} ({language})`,audio_stream_display_label_index:`{label} {index}`,audio_stream_display_language_index:`{language} {index}`,audio_stream_display_unknown:`Дорожка {index}`,pip_dummy_title:`Видео воспроизводится в режиме картинка в картинке`,submenu_quality:`Качество`,submenu_playback_rate:`Скорость`,submenu_settings:`Настройки`,submenu_traffic_saving:`Экономия данных`,submenu_audio_languages:`Звуковая дорожка`,playing_ads:`Реклама {timeleft}`,skip_ads_now:`Пропустить рекламу`,skip_ads_after:`Пропустить {time}с`,visit_advertiser:`Перейти на сайт`,aria_timeline:`Ползунок временной шкалы`,aria_timeline_value:`{position} (общая длительность {duration}`,doubletap_seek_step:`{seconds} секунд`,playback_rate_1:`Обычная`,playback_rate:`{multiplier}x`,video360:`панорамное видео`,subtitles_caption:`Субтитры`,subtitles_auto:`{language} (Автоматические)`,subtitles_off:`Выкл.`,subtitles_auto_caption:`Автоматические субтитры`,subtitles_turn_on:`Включить субтитры`,subtitles_turn_off:`Выключить субтитры`,traffic_saving_off:`Откл.`,traffic_saving_on:`Вкл.`,traffic_saving_helper_text:`При включении качество видео будет снижено для экономии трафика`,tooltip_button_disabled:`Кнопка недоступна`,tooltip_previous:`Предыдущее видео`,tooltip_restart:`Начать заново`,tooltip_play:`Смотреть`,tooltip_pause:`Пауза`,tooltip_next:`Следующее видео`,tooltip_interactive_go_back:`Вернуться к предыдущей главе`,tooltip_interactive_go_back_disabled:`История прохождения недоступна`,tooltip_interactive_go_back_disabled_first:`Вы смотрите первую главу`,tooltip_interactive_go_back_disabled_limit:`Лимит возвратов исчерпан`,tooltip_chapter_without_interactive:`В этой главе нет интерактива`,tooltip_interactive_of_chapter_completed:`Интерактивы этой главы уже пройдены`,tooltip_interactive_seek:`Перейти к интерактиву`,tooltip_interactive_graph_off:`Показать карту сюжета`,tooltip_interactive_graph_on:`Скрыть карту сюжета`,tooltip_live:`Перемотать на актуальный лайв`,tooltip_episodes:`Эпизоды`,tooltip_volume:`Включить звук`,tooltip_volume_muted:`Выключить звук`,tooltip_sound_unavailable:`Звук недоступен`,tooltip_subtitles_off:`Включить субтитры`,tooltip_subtitles_on:`Выключить субтитры`,tooltip_settings_off:`Открыть настройки`,tooltip_settings_on:`Закрыть настройки`,tooltip_fullscreen_off:`На весь экран`,tooltip_fullscreen_on:`Выйти из полноэкранного режима`,tooltip_chromecast_off:`Включить Chromecast`,tooltip_chromecast_on:`Выключить Chromecast`,tooltip_episode_finished:`Вы уже сделали свой выбор`,tooltip_episode_unfinished:`Не пройдено`,tooltip_disabled_when_interactive:`Интерактив уже идёт`,tooltip_disabled_when_graph_on:`Кнопка недоступна во время просмотра карты`,tooltip_interactive_interaction_time_indicator:`Нажмите на элемент интерактива`,tooltip_vk_logo:`Открыть в VK Видео`,tooltip_vk_video_logo:`Перейти в VK Видео`,tooltip_autoplay_off:`Включить автовоспроизведение`,tooltip_autoplay_on:`Отключить автовоспроизведение`,tooltip_context_menu_open:`Открыть контекстное меню`,tooltip_context_menu_close:`Закрыть контекстное меню`,download_video_caption:`Скачать видео`,hotkey_helper_current_volume:`{value} %`,hotkey_map_modal_title:`Быстрые клавиши`,hotkey_map_modal_close_btn_text:`Закрыть`,hotkey_map_group_title_common:`Общие`,hotkey_map_group_title_playback:`Воспроизведение`,hotkey_map_group_title_subtitles:`Субтитры`,hotkey_map_group_title_episodes:`Эпизоды`,hotkey_map_item_mute_description:`Включить или отключить звук`,hotkey_map_item_mute_value:`m`,hotkey_map_item_volume_up_description:`Увеличить громкость`,hotkey_map_item_volume_up_value:`Стрелка вверх`,hotkey_map_item_volume_down_description:`Уменьшить громкость`,hotkey_map_item_volume_down_value:`Стрелка вниз`,hotkey_map_item_pip_description:`Свернуть или развернуть мини-проигрыватель`,hotkey_map_item_pip_value:`i`,hotkey_map_item_full_screen_description:`Включить или выключить полноэкранный режим`,hotkey_map_item_full_screen_value:`f`,hotkey_map_item_show_context_menu_description:`Скрыть или показать контекстное меню`,hotkey_map_item_show_context_menu_value:`Shift + !`,hotkey_map_item_show_hotkey_map_description:`Скрыть или показать список горячих клавиш`,hotkey_map_item_show_hotkey_map_value:`Shift + ?`,hotkey_map_item_play_toggle_description:`Приостановить или продолжить воспроизведение`,hotkey_map_item_play_toggle_value:`Пробел (или k)`,hotkey_map_item_seek_backward_description:`Перемотать ролик на 10 секунд назад`,hotkey_map_item_seek_backward_value:`Стрелка влево (или j)`,hotkey_map_item_seek_forward_description:`Перемотать ролик на 10 секунд вперёд`,hotkey_map_item_seek_forward_value:`Стрелка вправо (или l)`,hotkey_map_item_fast_seek_backward_description:`Ускоренная перемотка назад`,hotkey_map_item_fast_seek_backward_value:`Shift + Стрелка влево`,hotkey_map_item_fast_seek_forward_description:`Ускоренная перемотка вперёд`,hotkey_map_item_fast_seek_forward_value:`Shift + Стрелка вправо`,hotkey_map_item_rate_down_description:`Уменьшить скорость воспроизведения`,hotkey_map_item_rate_down_value:`< (Shift + ,)`,hotkey_map_item_rate_up_description:`Увеличить скорость воспроизведения`,hotkey_map_item_rate_up_value:`> (Shift + .)`,hotkey_map_item_prev_frame_description:`Перейти к предыдущему кадру <br />(когда воспроизведение приостановлено)`,hotkey_map_item_prev_frame_value:`,`,hotkey_map_item_next_frame_description:`Перейти к следующему кадру <br />(когда воспроизведение приостановлено)`,hotkey_map_item_next_frame_value:`.`,hotkey_map_item_jump_seek_description:`Перейти к определённому моменту видео <br />(например, при нажатии на цифру «7» ролик будет перемотан до временной отметки, которая соответствует 70% от длительности видео)`,hotkey_map_item_jump_seek_value:`0, 1, 2, 3, 4, 5, 6, 7, 8, 9`,hotkey_map_item_subtitles_toggle_description:`Включить или отключить субтитры`,hotkey_map_item_subtitles_toggle_value:`c`,hotkey_map_item_prev_episode_description:`Перейти к предыдущему эпизоду`,hotkey_map_item_prev_episode_pc_value:`Ctrl + Стрелка влево`,hotkey_map_item_prev_episode_mac_value:`Option + Стрелка влево`,hotkey_map_item_next_episode_description:`Перейти к следующему эпизоду`,hotkey_map_item_next_episode_pc_value:`Ctrl + Стрелка вправо`,hotkey_map_item_next_episode_mac_value:`Option + Стрелка вправо`,hotkey_map_item_next_video_description:`Перейти к следующему видео`,hotkey_map_item_next_video_value:`Shift + N`,hotkey_map_item_prev_video_description:`Перейти к предыдущему видео`,hotkey_map_item_prev_video_value:`Shift + P`,waiting_live_day_value:`дн`,waiting_live_hour_value:`ч`,waiting_live_minute_value:`мин`,waiting_live_second_value:`сек`,waiting_live_colon:`:`,waiting_live_upcoming_title:`Трансляция еще не началась`,waiting_live_timer_title:`До начала трансляции осталось`,waiting_live_recover_title:`Трансляция приостановлена - она продолжится, когда автор вернётся`,waiting_record_title:`Трансляция завершена - запись появится позже`,aria_label_video_player:`Видео плеер`,aria_label_spherical_control:`Контроллер для сферического видео. Используйте клавиши со стрелками для панорамирования видео.`,aria_label_debug_panel:`Область с технической информацией, сделайте скриншот для техподдержки`,aria_label_new_tab_alert:`Откроется в новой вкладке.`,aria_label_menu_quality:`Качество: {actual}`,aria_label_menu_audio_languages:`Язык аудио: {actual}`,aria_label_menu_rate:`Скорость: {actual}`,aria_label_menu_subtitle:`Субтитры: {actual}`,aria_label_menu_download:`Скачать видео`,aria_label_menu_debug_overlay:`Отображение технической информации`,aria_label_menu_rotate:`Повернуть видео на 90 градусов`,aria_label_menu_loop:`Переключение режима повторения`,aria_label_submenu_back:`Вернуться в меню настроек`,aria_label_submenu_traffic_saving:`Режим экономии данных`,aria_label_settings:`Настройки`,aria_label_context_menu:`Контекстное меню`,aria_label_autoplay:`Автовоспроизведение`,end_screen_next_video:`Следующее видео`,end_screen_recommended_video:`Рекомендуемое видео`,slow_video_notification_button:`Выбрать качество «Авто»`,slow_video_notification_force_description:`Видео грузится слишком медленно,
57
14
  качество изменено на\xA0«Авто»`,slow_video_notification_suggest_description:`Видео загружается слишком медленно -
58
- попробуйте изменить качество на «Авто»`,double_forward_label:`2x`,preview_track_notification_text:`Потяните вверх для точной перемотки`,preview_track_close_tooltip:`Выйти из режима точной перемотки`},hc={auto_quality_invariant:`Auto`,auto_quality:`Auto ({actual})`,auto_quality_option:`Auto`,other_quality:`Other`,high_quality:`High quality`,high_quality_description:`Uses more data`,auto_quality_limit:`Auto`,traffic_saving_quality:`Data saving`,traffic_saving_quality_description:`Videos load faster but\xA0at\xA0lower quality`,quality_applience:`You can\xA0{action} the\xA0default quality`,quality_applience_action:`change`,default_quality_for_any_video:`Quality for\xA0all videos`,menu_quality:`Quality`,menu_playback_rate:`Playback rate`,menu_traffic_saving:`Data saving`,menu_report:`Report a problem`,menu_pip:`Picture in picture`,menu_pip_close:`Expand video`,menu_copy_video_link:`Copy video link`,menu_copy_video_link_with_timestamp:`Copy link with timestamp`,menu_video_rotate:`Rotate`,menu_video_loop_on:`Enable loop`,menu_video_loop_off:`Disable loop`,menu_chromecast:`Chromecast stream`,menu_copy_debug:`Copy debug info`,menu_save_debug:`Save debug info`,menu_debug_overlay:`Tech stats`,menu_copy_embed_code:`Copy embed code`,menu_audio_languages:`Audio track`,audio_stream_display_language_label:`{label} ({language})`,audio_stream_display_language_label_index:`{label} {index} ({language})`,audio_stream_display_label_index:`{label} {index}`,audio_stream_display_language_index:`{language} {index}`,audio_stream_display_unknown:`Audio track {index}`,pip_dummy_title:`Video plays in picture-in-picture mode`,submenu_quality:`Quality`,submenu_playback_rate:`Playback rate`,submenu_traffic_saving:`Data saving`,submenu_settings:`Settings`,submenu_audio_languages:`Audio track`,playing_ads:`Ads {timeleft}`,skip_ads_after:`Skip ads`,skip_ads_now:`Skip {time}s`,visit_advertiser:`Visit site`,aria_timeline:`Time scale slider`,aria_timeline_value:`{position} out of {duration}`,doubletap_seek_step:`{seconds} seconds`,playback_rate_1:`Normal`,playback_rate:`{multiplier}x`,video360:`spherical video`,subtitles_caption:`Subtitles`,subtitles_auto:`{language} (Auto-generated)`,subtitles_off:`Off`,subtitles_auto_caption:`Auto subtitles`,subtitles_turn_on:`Turn on subtitles`,subtitles_turn_off:`Turn off subtitles`,traffic_saving_off:`Off`,traffic_saving_on:`On`,traffic_saving_helper_text:`When turned on the video quality will be reduced to save data`,tooltip_button_disabled:`Button disabled`,tooltip_previous:`Previous video`,tooltip_restart:`Watch again`,tooltip_play:`Play`,tooltip_pause:`Pause`,tooltip_next:`Next video`,tooltip_interactive_go_back:`Back to previous chapter`,tooltip_interactive_go_back_disabled:`Interactive history unavailable`,tooltip_interactive_go_back_disabled_first:`You're watching the first chapter`,tooltip_interactive_go_back_disabled_limit:`Go-back limit exceeded`,tooltip_chapter_without_interactive:`This chapter has no interactive segment`,tooltip_interactive_of_chapter_completed:`Chapter's interactive segments already watched`,tooltip_interactive_seek:`Go to interactive`,tooltip_interactive_graph_off:`Show interactive graph`,tooltip_interactive_graph_on:`Hide interactive graph`,tooltip_live:`Go to the live edge`,tooltip_episodes:`Episodes`,tooltip_volume:`Volume off`,tooltip_volume_muted:`Turn volume on`,tooltip_sound_unavailable:`Sound unavailable`,tooltip_subtitles_off:`Turn subtitles on`,tooltip_subtitles_on:`Turn subtitles off`,tooltip_settings_off:`Open settings`,tooltip_settings_on:`Close settings`,tooltip_fullscreen_off:`Enter fullscreen mode`,tooltip_fullscreen_on:`Exit fullscreen mode`,tooltip_chromecast_off:`Turn Chromecast on`,tooltip_chromecast_on:`Turn Chromecast off`,tooltip_episode_finished:`You have already viewed interactive episode`,tooltip_episode_unfinished:`Interactive episode not finished`,tooltip_disabled_when_interactive:`Interactive video in progress`,tooltip_disabled_when_graph_on:`Button is disabled when graph is opened`,tooltip_interactive_interaction_time_indicator:`Press the interactive element`,tooltip_vk_logo:`Open in VK Video`,tooltip_vk_video_logo:`Go to VK Video`,tooltip_autoplay_off:`Turn autoplay on`,tooltip_autoplay_on:`Turn autoplay off`,tooltip_context_menu_open:`Open context menu`,tooltip_context_menu_close:`Close context menu`,download_video_caption:`Download video`,hotkey_helper_current_volume:`{value} %`,hotkey_map_modal_title:`Keyboard shortcuts`,hotkey_map_modal_close_btn_text:`Close`,hotkey_map_group_title_common:`Common`,hotkey_map_group_title_playback:`Playback`,hotkey_map_group_title_subtitles:`Subtitles`,hotkey_map_group_title_episodes:`Episodes`,hotkey_map_item_mute_description:`Toggle mute`,hotkey_map_item_mute_value:`m`,hotkey_map_item_volume_up_description:`Increase volume`,hotkey_map_item_volume_up_value:`Arrow up`,hotkey_map_item_volume_down_description:`Decrease volume`,hotkey_map_item_volume_down_value:`Arrow down`,hotkey_map_item_pip_description:`Toggle miniplayer`,hotkey_map_item_pip_value:`i`,hotkey_map_item_full_screen_description:`Toggle full screen`,hotkey_map_item_full_screen_value:`f`,hotkey_map_item_show_context_menu_description:`Hide or show context menu`,hotkey_map_item_show_context_menu_value:`Shift + !`,hotkey_map_item_show_hotkey_map_description:`Hide or show list of hotkeys`,hotkey_map_item_show_hotkey_map_value:`Shift + ?`,hotkey_map_item_play_toggle_description:`Toggle play/pause`,hotkey_map_item_play_toggle_value:`Space (or k)`,hotkey_map_item_seek_backward_description:`Rewind 10 seconds`,hotkey_map_item_seek_backward_value:`Arrow left (or j)`,hotkey_map_item_seek_forward_description:`Forward 10 seconds`,hotkey_map_item_seek_forward_value:`Arrow right (or l)`,hotkey_map_item_fast_seek_backward_description:`Fast rewind`,hotkey_map_item_fast_seek_backward_value:`Shift + Arrow left`,hotkey_map_item_fast_seek_forward_description:`Fast forward`,hotkey_map_item_fast_seek_forward_value:`Shift + Arrow right`,hotkey_map_item_rate_down_description:`Decrease playback rate`,hotkey_map_item_rate_down_value:`< (Shift + ,)`,hotkey_map_item_rate_up_description:`Increase playback rate`,hotkey_map_item_rate_up_value:`> (Shift + .)`,hotkey_map_item_prev_frame_description:`Previous frame (while paused)`,hotkey_map_item_prev_frame_value:`,`,hotkey_map_item_next_frame_description:`Next frame (while paused)`,hotkey_map_item_next_frame_value:`.`,hotkey_map_item_jump_seek_description:`Seek to specific point in the video (7 advances to 70% of duration)`,hotkey_map_item_jump_seek_value:`0, 1, 2, 3, 4, 5, 6, 7, 8, 9`,hotkey_map_item_subtitles_toggle_description:`Toggle captions ON/OFF`,hotkey_map_item_subtitles_toggle_value:`c`,hotkey_map_item_prev_episode_description:`Seek to previous episode`,hotkey_map_item_prev_episode_pc_value:`Ctrl + Arrow left`,hotkey_map_item_prev_episode_mac_value:`Option + Arrow left`,hotkey_map_item_next_episode_description:`Seek to next episode`,hotkey_map_item_next_episode_pc_value:`Ctrl + Arrow right`,hotkey_map_item_next_episode_mac_value:`Option + Arrow right`,hotkey_map_item_next_video_description:`Next video`,hotkey_map_item_next_video_value:`Shift + N`,hotkey_map_item_prev_video_description:`Previous video`,hotkey_map_item_prev_video_value:`Shift + P`,waiting_live_day_value:`d`,waiting_live_hour_value:`h`,waiting_live_minute_value:`min`,waiting_live_second_value:`sec`,waiting_live_colon:`:`,waiting_live_upcoming_title:`The broadcast hasn't started yet`,waiting_live_timer_title:`Before the start of the broadcast left`,waiting_live_recover_title:`The broadcast has been paused - it will resume when the author returns`,waiting_record_title:`The broadcast completed - recording will appear later`,aria_label_video_player:`Video player`,aria_label_spherical_control:`Spherical video control. Use the arrow keys to pan the video.`,aria_label_debug_panel:`Technical information area, take a screenshot for technical support`,aria_label_new_tab_alert:`Opens in a new tab.`,aria_label_menu_quality:`Quality: {actual}`,aria_label_menu_audio_languages:`Audio language: {actual}`,aria_label_menu_rate:`Rate: {actual}`,aria_label_menu_subtitle:`Subtitles: {actual}`,aria_label_menu_download:`Download video`,aria_label_menu_debug_overlay:`Display of technical information`,aria_label_menu_rotate:`Rotate video 90 degrees`,aria_label_menu_loop:`Toggle loop`,aria_label_submenu_back:`Return to settings menu`,aria_label_submenu_traffic_saving:`Data saving mode`,aria_label_settings:`Settings`,aria_label_context_menu:`Context menu`,aria_label_autoplay:`Autoplay`,end_screen_next_video:`Next video`,end_screen_recommended_video:`Recommended video`,slow_video_notification_button:`Select Auto quality`,slow_video_notification_force_description:`The video is loading too slowly,
15
+ попробуйте изменить качество на «Авто»`,double_forward_label:`2x`,preview_track_notification_text:`Потяните вверх для точной перемотки`,preview_track_close_tooltip:`Выйти из режима точной перемотки`},Ts={auto_quality_invariant:`Auto`,auto_quality:`Auto ({actual})`,auto_quality_option:`Auto`,other_quality:`Other`,high_quality:`High quality`,high_quality_description:`Uses more data`,auto_quality_limit:`Auto`,traffic_saving_quality:`Data saving`,traffic_saving_quality_description:`Videos load faster but\xA0at\xA0lower quality`,quality_applience:`You can\xA0{action} the\xA0default quality`,quality_applience_action:`change`,default_quality_for_any_video:`Quality for\xA0all videos`,menu_quality:`Quality`,menu_playback_rate:`Playback rate`,menu_traffic_saving:`Data saving`,menu_report:`Report a problem`,menu_pip:`Picture in picture`,menu_pip_close:`Expand video`,menu_copy_video_link:`Copy video link`,menu_copy_video_link_with_timestamp:`Copy link with timestamp`,menu_video_rotate:`Rotate`,menu_video_loop_on:`Enable loop`,menu_video_loop_off:`Disable loop`,menu_chromecast:`Chromecast stream`,menu_copy_debug:`Copy debug info`,menu_save_debug:`Save debug info`,menu_debug_overlay:`Tech stats`,menu_copy_embed_code:`Copy embed code`,menu_audio_languages:`Audio track`,audio_stream_display_language_label:`{label} ({language})`,audio_stream_display_language_label_index:`{label} {index} ({language})`,audio_stream_display_label_index:`{label} {index}`,audio_stream_display_language_index:`{language} {index}`,audio_stream_display_unknown:`Audio track {index}`,pip_dummy_title:`Video plays in picture-in-picture mode`,submenu_quality:`Quality`,submenu_playback_rate:`Playback rate`,submenu_traffic_saving:`Data saving`,submenu_settings:`Settings`,submenu_audio_languages:`Audio track`,playing_ads:`Ads {timeleft}`,skip_ads_after:`Skip ads`,skip_ads_now:`Skip {time}s`,visit_advertiser:`Visit site`,aria_timeline:`Time scale slider`,aria_timeline_value:`{position} out of {duration}`,doubletap_seek_step:`{seconds} seconds`,playback_rate_1:`Normal`,playback_rate:`{multiplier}x`,video360:`spherical video`,subtitles_caption:`Subtitles`,subtitles_auto:`{language} (Auto-generated)`,subtitles_off:`Off`,subtitles_auto_caption:`Auto subtitles`,subtitles_turn_on:`Turn on subtitles`,subtitles_turn_off:`Turn off subtitles`,traffic_saving_off:`Off`,traffic_saving_on:`On`,traffic_saving_helper_text:`When turned on the video quality will be reduced to save data`,tooltip_button_disabled:`Button disabled`,tooltip_previous:`Previous video`,tooltip_restart:`Watch again`,tooltip_play:`Play`,tooltip_pause:`Pause`,tooltip_next:`Next video`,tooltip_interactive_go_back:`Back to previous chapter`,tooltip_interactive_go_back_disabled:`Interactive history unavailable`,tooltip_interactive_go_back_disabled_first:`You're watching the first chapter`,tooltip_interactive_go_back_disabled_limit:`Go-back limit exceeded`,tooltip_chapter_without_interactive:`This chapter has no interactive segment`,tooltip_interactive_of_chapter_completed:`Chapter's interactive segments already watched`,tooltip_interactive_seek:`Go to interactive`,tooltip_interactive_graph_off:`Show interactive graph`,tooltip_interactive_graph_on:`Hide interactive graph`,tooltip_live:`Go to the live edge`,tooltip_episodes:`Episodes`,tooltip_volume:`Volume off`,tooltip_volume_muted:`Turn volume on`,tooltip_sound_unavailable:`Sound unavailable`,tooltip_subtitles_off:`Turn subtitles on`,tooltip_subtitles_on:`Turn subtitles off`,tooltip_settings_off:`Open settings`,tooltip_settings_on:`Close settings`,tooltip_fullscreen_off:`Enter fullscreen mode`,tooltip_fullscreen_on:`Exit fullscreen mode`,tooltip_chromecast_off:`Turn Chromecast on`,tooltip_chromecast_on:`Turn Chromecast off`,tooltip_episode_finished:`You have already viewed interactive episode`,tooltip_episode_unfinished:`Interactive episode not finished`,tooltip_disabled_when_interactive:`Interactive video in progress`,tooltip_disabled_when_graph_on:`Button is disabled when graph is opened`,tooltip_interactive_interaction_time_indicator:`Press the interactive element`,tooltip_vk_logo:`Open in VK Video`,tooltip_vk_video_logo:`Go to VK Video`,tooltip_autoplay_off:`Turn autoplay on`,tooltip_autoplay_on:`Turn autoplay off`,tooltip_context_menu_open:`Open context menu`,tooltip_context_menu_close:`Close context menu`,download_video_caption:`Download video`,hotkey_helper_current_volume:`{value} %`,hotkey_map_modal_title:`Keyboard shortcuts`,hotkey_map_modal_close_btn_text:`Close`,hotkey_map_group_title_common:`Common`,hotkey_map_group_title_playback:`Playback`,hotkey_map_group_title_subtitles:`Subtitles`,hotkey_map_group_title_episodes:`Episodes`,hotkey_map_item_mute_description:`Toggle mute`,hotkey_map_item_mute_value:`m`,hotkey_map_item_volume_up_description:`Increase volume`,hotkey_map_item_volume_up_value:`Arrow up`,hotkey_map_item_volume_down_description:`Decrease volume`,hotkey_map_item_volume_down_value:`Arrow down`,hotkey_map_item_pip_description:`Toggle miniplayer`,hotkey_map_item_pip_value:`i`,hotkey_map_item_full_screen_description:`Toggle full screen`,hotkey_map_item_full_screen_value:`f`,hotkey_map_item_show_context_menu_description:`Hide or show context menu`,hotkey_map_item_show_context_menu_value:`Shift + !`,hotkey_map_item_show_hotkey_map_description:`Hide or show list of hotkeys`,hotkey_map_item_show_hotkey_map_value:`Shift + ?`,hotkey_map_item_play_toggle_description:`Toggle play/pause`,hotkey_map_item_play_toggle_value:`Space (or k)`,hotkey_map_item_seek_backward_description:`Rewind 10 seconds`,hotkey_map_item_seek_backward_value:`Arrow left (or j)`,hotkey_map_item_seek_forward_description:`Forward 10 seconds`,hotkey_map_item_seek_forward_value:`Arrow right (or l)`,hotkey_map_item_fast_seek_backward_description:`Fast rewind`,hotkey_map_item_fast_seek_backward_value:`Shift + Arrow left`,hotkey_map_item_fast_seek_forward_description:`Fast forward`,hotkey_map_item_fast_seek_forward_value:`Shift + Arrow right`,hotkey_map_item_rate_down_description:`Decrease playback rate`,hotkey_map_item_rate_down_value:`< (Shift + ,)`,hotkey_map_item_rate_up_description:`Increase playback rate`,hotkey_map_item_rate_up_value:`> (Shift + .)`,hotkey_map_item_prev_frame_description:`Previous frame (while paused)`,hotkey_map_item_prev_frame_value:`,`,hotkey_map_item_next_frame_description:`Next frame (while paused)`,hotkey_map_item_next_frame_value:`.`,hotkey_map_item_jump_seek_description:`Seek to specific point in the video (7 advances to 70% of duration)`,hotkey_map_item_jump_seek_value:`0, 1, 2, 3, 4, 5, 6, 7, 8, 9`,hotkey_map_item_subtitles_toggle_description:`Toggle captions ON/OFF`,hotkey_map_item_subtitles_toggle_value:`c`,hotkey_map_item_prev_episode_description:`Seek to previous episode`,hotkey_map_item_prev_episode_pc_value:`Ctrl + Arrow left`,hotkey_map_item_prev_episode_mac_value:`Option + Arrow left`,hotkey_map_item_next_episode_description:`Seek to next episode`,hotkey_map_item_next_episode_pc_value:`Ctrl + Arrow right`,hotkey_map_item_next_episode_mac_value:`Option + Arrow right`,hotkey_map_item_next_video_description:`Next video`,hotkey_map_item_next_video_value:`Shift + N`,hotkey_map_item_prev_video_description:`Previous video`,hotkey_map_item_prev_video_value:`Shift + P`,waiting_live_day_value:`d`,waiting_live_hour_value:`h`,waiting_live_minute_value:`min`,waiting_live_second_value:`sec`,waiting_live_colon:`:`,waiting_live_upcoming_title:`The broadcast hasn't started yet`,waiting_live_timer_title:`Before the start of the broadcast left`,waiting_live_recover_title:`The broadcast has been paused - it will resume when the author returns`,waiting_record_title:`The broadcast completed - recording will appear later`,aria_label_video_player:`Video player`,aria_label_spherical_control:`Spherical video control. Use the arrow keys to pan the video.`,aria_label_debug_panel:`Technical information area, take a screenshot for technical support`,aria_label_new_tab_alert:`Opens in a new tab.`,aria_label_menu_quality:`Quality: {actual}`,aria_label_menu_audio_languages:`Audio language: {actual}`,aria_label_menu_rate:`Rate: {actual}`,aria_label_menu_subtitle:`Subtitles: {actual}`,aria_label_menu_download:`Download video`,aria_label_menu_debug_overlay:`Display of technical information`,aria_label_menu_rotate:`Rotate video 90 degrees`,aria_label_menu_loop:`Toggle loop`,aria_label_submenu_back:`Return to settings menu`,aria_label_submenu_traffic_saving:`Data saving mode`,aria_label_settings:`Settings`,aria_label_context_menu:`Context menu`,aria_label_autoplay:`Autoplay`,end_screen_next_video:`Next video`,end_screen_recommended_video:`Recommended video`,slow_video_notification_button:`Select Auto quality`,slow_video_notification_force_description:`The video is loading too slowly,
59
16
  so\xA0the\xA0quality was changed to\xA0Auto`,slow_video_notification_suggest_description:`The video is loading too slowly.
60
- Try switching the\xA0quality to\xA0Auto.`,double_forward_label:`2x`,preview_track_notification_text:`pull up to open precise rewind`,preview_track_close_tooltip:`dismiss precise rewind`},gc=new Map;gc.set(Zs.EN,hc),gc.set(Zs.RU,mc);var _c=new Map,vc=({language:e,pack:t,fallback:n})=>{if(gc.has(e)){let n=gc.get(e);gc.set(e,o(o({},n),t))}else gc.set(e,t);_c.set(e,n)},yc=e=>gc.has(e),bc=(e,t,n,r)=>{let i=gc.get(e)?.[t];if(Xs(i)){let n=_c.get(e)??r;i=(n?gc.get(n):void 0)?.[t]}return Xs(i)?t+Js(n??{}).join(` `):n?Ys(i,/{(\w+?)}/g,(e,t)=>n[t]??``):i},xc=(e,t)=>{let{interfaceLanguage$:n}=sc();return bc(Y(n),e,t,Xo().defaultLanguage)};import{getWindow as Sc,safeStorage as Cc}from"@vkontakte/videoplayer-shared/es2015";var wc=`vk_player_debug_panel_opened`,Tc=`videoplayer`,Ec=`videoplayer`,Dc=5e3;function Oc({uiConfig:e,duration$:t}){let[n,r]=pc(!1),[i,a]=pc(!0),[o,s]=pc(!1),c=J(!1),[l,u]=pc(!1),d=()=>{},f=J(!1),p=Lo(!1,e=>(f.subscribe(t=>e(t)),()=>d())),m=Ro([t],([e])=>Math.abs(e)>0),h=Sc().setTimeout(()=>{},0),g=(e=`COMMON`)=>{!Y(n)&&e===`REWIND`&&Y(m)&&u(!0),c.set(!0),Sc().clearTimeout(h),h=Sc().setTimeout(()=>{c.set(!1)},Dc)},_=()=>{u(!1)},v=()=>{Sc().clearTimeout(h),c.set(!1)},y=()=>{Sc().clearTimeout(h),c.set(!1)},b=()=>{if(Y(o))return s(!1),!0;let e=Y(c);return y(),e},x=()=>{y()},S=()=>{};function C(t){let{playerState:{isPlaying$:n,isEnded$:i,crashed$:s,isBuffering$:l},ads:{playbackState:u},playerPhase:m}=t;Ro([n,i,c,o],([e,t,n,r])=>!r&&(!e||t||n)).subscribe(e=>{r(e),e||v()});let h=null;S=()=>{h&&Sc().clearTimeout(h),h=null},f.set(l.getValue());let g=l.subscribe(t=>{t&&h===null?h=Sc().setTimeout(()=>{f.set(l.getValue()),h=null},e.loaderDelay):f.set(t)});d=()=>{g.unsubscribe(),h&&Sc().clearTimeout(h)},Ro([m,p,u,s],([e,t,n,r])=>(e===`video`&&t||e===`ads`&&n===`inactive`)&&!r).subscribe(a)}let ee=Cc.get(wc)===`true`;return{state:{isAutoplay:J(!1),debugPanelVisible:J(ee),isShowLoader:i,controlsVisible:n,settingsVisible:o,isLoaderVisible:p,showUiWithRewind:l,canRewind$:m},action:{onUserInput:g,clearShowByInput:y,onBackButton:b,setSettingsVisibility:s,onPlay:x,clearDelayedBufferingCheckTimeout:()=>S(),onShowedControls:_},resolveDependency:C}}import{arrayIncludes as kc}from"@vkontakte/videoplayer-shared/es2015";import{arrayAt as Ac}from"@vkontakte/videoplayer-shared/es2015";import{PlaybackState as jc,PredefinedQualityLimits as Mc}from"@vkontakte/videoplayer-core/es2015";import{getWindow as Nc,isInvariantQuality as Pc,isNonNullable as Fc,map as Ic,merge as Lc,Subject as Rc,ValueSubject as zc}from"@vkontakte/videoplayer-shared/es2015";var Bc;(e=>{e.MPEG=`MPEG`,e.DASH=`DASH`,e.DASH_SEP=`DASH_SEP`,e.DASH_SEP_VK=`DASH_SEP`,e.DASH_WEBM=`DASH_WEBM`,e.DASH_WEBM_AV1=`DASH_WEBM_AV1`,e.DASH_STREAMS=`DASH_STREAMS`,e.DASH_WEBM_VK=`DASH_WEBM`,e.DASH_ONDEMAND=`DASH_ONDEMAND`,e.DASH_ONDEMAND_VK=`DASH_ONDEMAND`,e.DASH_LIVE=`DASH_LIVE`,e.DASH_LIVE_CMAF=`DASH_LIVE_CMAF`,e.DASH_LIVE_WEBM=`DASH_LIVE_WEBM`,e.HLS=`HLS`,e.HLS_ONDEMAND=`HLS_ONDEMAND`,e.HLS_JS=`HLS`,e.HLS_FMP4=`HLS_FMP4`,e.HLS_LIVE=`HLS_LIVE`,e.HLS_LIVE_CMAF=`HLS_LIVE_CMAF`,e.WEB_RTC_LIVE=`WEB_RTC_LIVE`})(Bc||={});var Vc=e=>{let t=Math.round(e);return isNaN(t)||t<40?``:t>=40&&t<55?50:t>=55&&t<90?60:t>=90&&t<180?120:t>=180?240:``};import{SeekAction as Hc}from"@vkontakte/videoplayer-statistics/es2015";import"@vkontakte/videoplayer-shared/es2015";import"@vkontakte/videoplayer-shared/es2015";import"@vkontakte/videoplayer-shared/es2015";import{isNullable as Uc,safeStorage as Wc}from"@vkontakte/videoplayer-shared/es2015";var Gc=`vk_player_`,Kc=`vk_player_prefer_traffic_saving_enabled`,qc=`vk_player_preferred_quality`,Jc=`vk_player_preferred_default_quality_settings`,Yc=`vk_player_preferred_quality_settings_by_video`,Xc=`vk_player_preferred_stream_language`,Zc=`vk_player_preferred_rate`,Qc=`vk_player_preferred_subtitles_language`,$c=`vk_player_user_video_prefs`;`${Gc}`;var el=(e,t)=>Wc.set(qc,JSON.stringify({videoId:e,value:t})),tl=()=>Wc.remove(qc),nl=e=>{let t=Wc.get(qc);if(Uc(t))return;let{videoId:n,value:r}=JSON.parse(t);if(e!==n){tl();return}return r},rl=(e,t)=>{t?Wc.set(e,`true`):Wc.remove(e)},il=e=>Wc.get(e)===`true`,al=e=>rl(Kc,e),ol=()=>il(Kc),sl=()=>Wc.get(Xc),cl=e=>Wc.set(Xc,e),ll=()=>Wc.get(Qc),ul=e=>{e?Wc.set(Qc,e):Wc.remove(Qc)},dl=e=>Wc.set(Zc,JSON.stringify({rate:e})),fl=()=>{let e=Wc.get(Zc);if(Uc(e))return;let{rate:t}=JSON.parse(e);return t},pl=(()=>{let e=e=>{Wc.set(Jc,JSON.stringify(e))},t=()=>{try{let e=Wc.get(Jc);return e?JSON.parse(e):null}catch{return null}},n=()=>{try{let e=Wc.get(Yc);return e?JSON.parse(e):null}catch{return null}},r=e=>{Wc.set(Yc,JSON.stringify(e))},i=r=>{u(r);let i=r?n():null;if(i&&i?.videoId===r)return o(o({},i),{},{appliesTo:`to-video`});i&&a();let s=t();return s?o(o({},s),{},{appliesTo:`as-default`}):(e({type:`auto_quality`}),{type:`auto_quality`,appliesTo:`as-default`})},a=()=>{Wc.remove(Yc)},s=()=>{Wc.remove(Jc)},c=(t,n=`as-default`)=>{t.type===`exact_quality`||n===`to-video`?r(t):e(t)},l=e=>{let t=i(e);if(t){switch(t.type){case`traffic_saving`:al(!0);break;case`exact_quality`:el(e,t.quality)}a(),s()}},u=t=>{let n=nl(t);if(n){r({type:`exact_quality`,videoId:t,quality:n});return}ol()&&e({type:`traffic_saving`,videoId:t}),al(!1),tl()};return{getPreferredQualitySettings:i,migrateSettingsToLegacyWay:l,savePreferredQualitySettings:c,savePreferredDefaultQualitySettings:e,removePreferredQualitySettingsByVideo:a,getPreferredDefaultQualitySettings:t,getPreferredSubtitlesLanguage:ll,savePreferredSubtitlesLanguage:ul}})();pl.getPreferredQualitySettings;var ml=pl.migrateSettingsToLegacyWay;pl.savePreferredQualitySettings,pl.savePreferredDefaultQualitySettings,pl.removePreferredQualitySettingsByVideo,pl.getPreferredDefaultQualitySettings;var hl=()=>{let e=Wc.get($c);if(e)try{return JSON.parse(e)}catch{return null}return null},gl=(e,t)=>{var n;let r=hl();return(r==null||(n=r[e])==null?void 0:n[t])??null},{cancelAnimationFrame:_l,requestAnimationFrame:vl}=Nc();function yl({player:e,config:t,i18n:n,looped:r,subscription:i,tracer:a,log:o,playerPhase$:s,admanWrapper:c,onPlay:l,saveRate:u,videoId:d,isAudioDisabled:f,callbacks:p}){let m=J(void 0),h=$(e.info.currentFormat$),g=$(e.info.currentVideoStream$),_=$(e.info.currentAudioStream$),v=$(e.info.duration$),y=$(e.info.isLive$),b=$(e.info.availableQualities$),x=$(e.info.availableQualitiesFps$),S=$(e.info.currentPlaybackRate$),C=$(e.info.atLiveEdge$),ee=$(e.info.atLiveDurationEdge$),te=$(e.info.playbackState$),ne=$(e.info.isBuffering$),re=$(e.info.currentBuffer$),ie=$(e.info.isEnded$),ae=$(e.info.autoQualityLimitingAvailable$),oe=$(e.info.throughputEstimation$),w=$(e.info.videoBitrate$),se=$(e.info.intrinsicVideoSize$),ce=$(e.info.isAudioAvailable$),le=$(e.info.availableSources$),ue=J(void 0),T=$(e.info.liveBufferTime$),E=$(e.info.volume$),de=$(e.info.muted$),fe=J([]),D=J(!1),O=$(e.info.availableVideoStreams$),k=$(e.info.position$),A=new zc(Hc.UNKNOWN),pe=new Rc,me=new Rc,he=$(e.info.isAutoQualityEnabled$,e=>e&&m.set(void 0)),ge=Ro([m,$(e.info.currentQuality$,()=>m.set(void 0))],([e,t])=>e??t),_e=Ro(h,e=>e!==`MPEG`),ve=Lo(e.info.position$.getValue(),t=>{let n,r,i=()=>{let a=e.info.playbackState$.getValue(),o=e.info.isLive$.getValue(),s=e.info.duration$.getValue(),c=e.info.position$.getValue();if(a&&kc([jc.PLAYING,jc.PAUSED],a)){let n=o?c-s:e.getExactTime();n!==r&&t(n),r=n}n=vl(i)};return i(),()=>_l(n)}),ye=Ro([v,y],([e,t])=>t?-e:e),be=Ro([ve,ye,ue],([e,t,n],r)=>{r(Fc(n)?n*t:e)}),xe=Ro([b,x,he,ge,_e],([e,t,r,i,a])=>{let o=[];a&&o.push({value:`auto`,displayValue:n(`auto_quality_option`),selected:r});let s=e.filter(e=>!Pc(e));for(let e of s){let n=t[e];o.push({value:e,displayValue:`${e}${n?Vc(n):``}`,selected:r?!1:e===i})}return o}),Se=Ro([S,C,ee],([e,r,i])=>{let a=i?1:t.controls.playbackRateMin,o=r?1:t.controls.playbackRateMax,s=t.controls.playbackRateStep,c=[];for(let t=a;t<=o;t+=s)c.push({value:t,displayValue:t===1?n(`playback_rate_1`):n(`playback_rate`,{multiplier:t.toString(10)}),selected:e===t});return c}),Ce=t.features.subtitles?$(e.info.availableTextTracks$):Lo([]),we=t.features.audioLanguages?$(e.info.availableAudioStreams$):Lo([]);we.subscribe(e=>{var t;p==null||(t=p.onAvailableAudioStreamsChanged)==null||t.call(p,e.map(({label:e=``,id:t=``,language:n=``})=>({label:e,language:n,id:t})))}),_.subscribe(e=>{var t;return e&&(p==null||(t=p.onAudioStreamChanged)==null?void 0:t.call(p,e.id))});let Te=t.features.playbackRate?$(e.info.canChangePlaybackSpeed$):Lo(!1),Ee=cc(e.info.predefinedQualityLimitType$.pipe(Ic(e=>e===Mc.TRAFFIC_SAVING)),e.info.predefinedQualityLimitType$.getValue()===Mc.TRAFFIC_SAVING),De=cc(e.info.predefinedQualityLimitType$.pipe(Ic(e=>e===Mc.HIGH_QUALITY)),e.info.predefinedQualityLimitType$.getValue()===Mc.HIGH_QUALITY),Oe=Ro([te,ne],([e,t])=>t?`buffering`:e),ke=Ro([te],([e])=>e===jc.PLAYING),Ae=Ro([k,v],([e,t])=>isFinite(e)&&isFinite(t)&&!!t),je=Ro([re,ye,k,T],([e,t,n,r])=>{let i=e?.end??0;return r?(i-(-n+r-t))/t:i/t}),Me=Ro([le],([e])=>Object.keys(e?.MPEG||{}).length>0),Ne=Lc(e.events.fatalError$,e.events.managedError$).subscribe(e=>fe.update(t=>[...t,e])),Pe=Lo(!1,t=>{let n=e.events.fatalError$.subscribe(()=>t(!0));return()=>n.unsubscribe()}),Fe=t=>{a.log(`set looped`,{isLooped:t}),D.set(t),e.setLooped(t)};Fe(r);let Ie=J(!1);i.add(e.events.loadedMetadata$.subscribe(()=>{Ie.set(!0)}));let Le=(t,n,r=!0)=>{if(o({message:`seek to time, time: ${t}`}),a.log(`seek to time`,{time:t,action:n,forcePrecise:r}),A.next(n),e.info.isLive$.getValue()){let n=e.info.duration$.getValue(),i=Math.min(0,n+t);e.seekTime(i,r)}else{if(e.info.isEnded$.getValue()){var i;o({message:`seek after ended, call callbacks.onPlay`}),p==null||(i=p.onPlay)==null||i.call(p)}e.seekTime(t,r)}},Re=()=>{let t=Y(s),n={playerPhase:t,isVideoEnded:!1,action:`none`};if(o({message:`toggle play`}),t===`ads`){n.action=`play`,a.log(`toggle adman play`,n),c.togglePlay();return}let r=()=>{var t;o({message:`toggle play, call player.play`}),l(),n.action=`play`,e.play(),p==null||(t=p.onPlay)==null||t.call(p)};e.info.isEnded$.getValue()?(o({message:`toggle play, video ended, seek to 0`}),pe.next(),A.next(Hc.REWIND),e.seekTime(0),r()):e.info.playbackState$.getValue()===jc.PLAYING?(()=>{var t;o({message:`toggle play, call player.pause`}),n.action=`pause`,e.pause(),p==null||(t=p.onPause)==null||t.call(p)})():r(),a.log(`toggle play`,n)},ze=(t,{byUser:n=!1}={})=>{o({message:`set quality, quality: ${t}`}),a.log(`set quality`,{quality:t}),n&&me.next(t),e.setAutoQuality(t===`auto`),tl(),t!==`auto`&&(el(d,t),m.set(t),e.setQuality(t))},Be=t=>{o({message:`set trafficSavingEnabled, value: ${t}`}),a.log(`set traffic saving enabled`,{trafficSavingEnabled:t});let n=t?Mc.TRAFFIC_SAVING:Mc.UNKNOWN;e.setPredefinedQualityLimits(n)},Ve=e=>{o({message:`set highQualityEnabled, value: ${e}`}),a.log(`set high quality enabled`,{highQualityEnabled:e}),He(e?Mc.HIGH_QUALITY:Mc.UNKNOWN)},He=t=>{e.setPredefinedQualityLimits(t)},Ue=(n,r=!0)=>{a.log(`set playback rate`,{playbackRate:n}),e.setPlaybackRate(n),t.features.saveRate&&u&&!e.info.isLive$.getValue()&&r&&dl(n)},We=()=>{let e=Y(Te),t=Y(Se),n=t.findIndex(({selected:e})=>e);if(n===t.length-1||!e)return t[n];let r=t[n+1];return Ue(r.value),r},Ge=()=>{let e=Y(Te),t=Y(Se),n=t.findIndex(({selected:e})=>e);if(n===0||!e)return t[n];let r=t[n-1];return Ue(r.value),r},Ke=(e,t,n=!1)=>{o({message:`seek to percent, percent: ${e}`}),a.log(`seek to percent`,{percent:e,action:t}),Le(Y(ye)*e,t,n)},qe=t=>{o({message:`seek external, time: ${t}`}),a.log(`seek external`,{time:t}),A.next(Hc.UNKNOWN),e.seekTime(e.info.isLive$.getValue()?-t:t)},Je=t=>{let n=t.max??`none`,r=t.min??`none`;o({message:`set auto quality limitation. Max: ${n}. Min: ${r}`}),a.log(`set auto quality limits`,{max:n,min:r}),e.setAutoQualityLimits(t)},Ye=t=>{o({message:`set playback rate to: ${t}`}),a.log(`set playback rate external`,{playbackRate:t}),e.setPlaybackRate(t)},Xe=e=>{o({message:`start scrubbing, progress: ${e}`}),a.log(`start scrubbing`,{progress:e}),Ze(e)},Ze=e=>{ue.set(e)},Qe=()=>{ue.set(void 0)},$e=(e,t=!1)=>{o({message:`complete scrubbing, progress: ${e}`}),a.log(`complete scrubbing`,{progress:e}),Ke(e,Hc.SLIDER,t),Qe()},et=t=>{A.next(Hc.LIVE),o({message:`live switch to low latency `+t}),a.log(`live switch to low latency `+t),e.setLiveLowLatency(t)},tt=()=>{A.next(Hc.LIVE),o({message:`switch to active live`}),a.log(`switch to active live`),e.seekTime(0),e.info.playbackState$.getValue()!==jc.PLAYING&&Re()},nt=t=>{t.language&&cl(t.language),e.setVideoStream(t)},rt=t=>{e.setAudioStream(t)};return{state:{positionExact$:ve,positionWithScrubbing$:be,duration$:ye,playbackState$:te,playbackStateRealistic$:Oe,isPlaying$:ke,bufferedProgress$:je,isLive$:y,canChangePlaybackSpeed$:Te,isActiveLive$:C,isOldestAvailableLive$:ee,isRewindableLive$:Ae,isEnded$:ie,muted$:de,volume$:E,trafficSavingEnabled$:Ee,highQualityEnabled$:De,autoQualityLimitingAvailable$:ae,availableVideoStreams$:O,availableAudioStreams$:we,videoStream$:g,audioStream$:_,currentQuality$:ge,isAutoQualityEnabled$:he,availableQualities$:xe,currentPlaybackRate$:S,availablePlaybackRates$:Se,availableTextTracks$:Ce,currentFormat$:h,throughputEstimation$:oe,videoBitrate$:w,videoSize$:se,errorLog$:fe,crashed$:Pe,isAudioAvailable$:ce,isAudioDisabled:!!f,canDownload:!1,availableSources$:le,hasMpegSources$:Me,looped$:D,loadedMetadata$:Ie,isAutoQualityAvailable$:_e,scrubbingProgress$:ue,isBuffering$:e.info.isBuffering$,pendingQuality$:m,actionSeek$:A,actionRewind$:pe,actionQuality$:me},actions:{setLooped:Fe,seekToTime:Le,seekExternal:qe,setAutoQualityLimitsExternal:Je,seekToPercent:Ke,destroy:()=>{Ne.unsubscribe()},setPlaybackRateExternal:Ye,startScrubbing:Xe,completeScrubbing:$e,setLiveLowLatency:et,progressScrubbing:Ze,switchToActiveLive:tt,incrementPlaybackRate:We,decrementPlaybackRate:Ge,setHighQualityEnabled:Ve,setTrafficSavingEnabled:Be,togglePlay:Re,setPlaybackRate:Ue,setQuality:ze,setAudioStream:rt,externalChangeAudioStream:t=>{a.log(`change audio stream`,{id:t});let n=e.info.availableAudioStreams$.getValue().find(e=>e.id===t);n&&rt(n)},selectInitialStream:e=>{let n;if(e.length===1&&(n=Ac(e,0)),n??=e.find(e=>`isDefault`in e&&e.isDefault),t.features.userVideoPrefs&&d){let r=gl(t.userSalt,String(d));r?.audioTrackId&&(n=e.find(e=>e.id===r.audioTrackId)??n)}let r=sl();return r&&(n??=e.find(({language:e})=>r===e)),n??=Ac(e,0),n},setVideoStream:nt}}}import{objectValues as bl}from"@vkontakte/videoplayer-shared/es2015";import{arrayIncludes as xl}from"@vkontakte/videoplayer-shared/es2015";import{InterfaceLanguage as Sl,loadVKLangPack as Cl}from"@vkontakte/videoplayer-shared/es2015";function wl({uiConfig:e,isCyrillicRelatedInterface:t,interfaceLanguage:n,uiStatistics:r}){let i=function(){var t=s(function*(t){let n=xl(bl(Sl),t);if(e.downloadVKLanguages&&(n&&e.updateBuiltinLanguages||!yc(t))){let n;try{n=yield Cl(t,Tc,Ec)}catch{var i;r==null||(i=r.oneStat)==null||i.logError({errorType:`VKLangPack`,fatal:!1})}n&&(vc({language:t,pack:n,fallback:e.defaultLanguage}),a.set(t),o.update(e=>e+1))}yc(t)&&a.set(t)});return function(e){return t.apply(this,arguments)}}(),a=J(n),o=J(0),c=J(t);return i(n),{i18n:(t,n)=>bc(Y(a),t,n,e.defaultLanguage),isCyrillicRelatedInterface$:c,interfaceLanguage$:a,interfaceLanguageUpdated$:o,setLanguage:i}}import{objectEntries as Tl}from"@vkontakte/videoplayer-shared/es2015";import{getWindow as El,Subject as Dl}from"@vkontakte/videoplayer-shared/es2015";var Ol={ru:`Русский`,en:`English`,uk:`Українська`,be:`Беларуская (тарашкевiца)`,es:`Español`,fi:`Suomi`,de:`Deutsch`,it:`Italiano`,bg:`Български`,hr:`Hrvatski`,hu:`Magyar`,sr:`Српски`,pt:`Português`,el:`Ελληνικά`,pl:`Polski`,fr:`Français`,ko:`한국어`,"zh-CN":`汉语`,lt:`Lietuvių`,ja:`日本語`,cs:`Čeština`,et:`Eesti`,tt:`Татарча`,ba:`Башҡортса`,cv:`Чăвашла`,sk:`Slovenčina`,ro:`Română`,no:`Norsk`,lv:`Latviešu`,az:`Azərbaycan dili`,hy:`Հայերեն`,sv:`Svenska`,nl:`Nederlands`,tk:`Türkmen`,ka:`ქართული`,da:`Dansk`,uz:`O‘zbek`,th:`ภาษาไทย`,id:`Bahasa Indonesia`,tg:`Тоҷикӣ`,sl:`Slovenščina`,bs:`Bosanski`,"pt-BR":`Português brasileiro`,fa:`فارسی`,vi:`Tiếng Việt`,hi:`हिन्दी`,si:`සිංහල`,bn:`বাংলা`,tl:`Tagalog`,mn:`Монгол`,my:`ဗမာစာ`,tr:`Türkçe`,ne:`नेपाली`,ur:`اردو`,ky:`Кыргыз тили`,pa:`پنجابی`,os:`Ирон`,kn:`ಕನ್ನಡ`,sw:`Kiswahili`,kk:`Қазақша`,ar:`العربية`,he:`עברית`,ab:`Аҧсшәа`,eu:`Euskara`,eo:`Esperanto`},kl={abk:`as`,ara:`ar`,aze:`az`,bak:`ba`,bel:`be`,ben:`bn`,bos:`bs`,bul:`bg`,ces:`cs`,chv:`cv`,dan:`da`,deu:`de`,ell:`el`,eng:`en`,epo:`eo`,est:`et`,eus:`eu`,fas:`fa`,fin:`fi`,fra:`fr`,heb:`he`,hin:`hi`,hrv:`hr`,hun:`hu`,hye:`hy`,ind:`id`,ita:`it`,jpn:`ja`,kan:`kn`,kat:`ka`,kaz:`kk`,kir:`ky`,kor:`ko`,lav:`lv`,lit:`lt`,mon:`mn`,mya:`my`,nep:`ne`,nld:`nl`,nor:`no`,oss:`os`,pan:`pa`,pol:`pl`,por:`pt`,ron:`ro`,rus:`ru`,sin:`si`,slk:`sk`,slv:`sl`,spa:`es`,srp:`sr`,swa:`sw`,swe:`sv`,tat:`tt`,tgk:`tg`,tgl:`tl`,tha:`th`,tuk:`tk`,tur:`tr`,ukr:`uk`,urd:`ur`,uzb:`uz`,vie:`vi`},Al=e=>Ol[e]??Ol[kl[e]]??void 0,jl=`off`;class Ml{constructor(){e(this,`oneLineRegExp`,/\r\n|\n|\r/),e(this,`twoLinesRegExp`,/\r\n\r\n|\n\n|\r\r/)}parse(e,t){let n=[],r=e.split(this.twoLinesRegExp);for(let e of r){let r={startTime:0,endTime:0,texts:[],lang:t},i=e.split(this.oneLineRegExp);for(let e of i)if(!r.startTime&&!r.endTime){let{startTime:t,endTime:n}=new Nl().parse(e);r.startTime=t,r.endTime=n}else if(e.trim()!==``){let{texts:t}=new Pl().parse(e);r.texts=[...r.texts,...t]}(r.startTime||r.endTime)&&r.texts.length>0&&n.push(r)}return n}}class Nl{constructor(){e(this,`timeRegExp`,/(\d{2,})?:?(\d{2}):(\d{2}).(\d{2,3})/),e(this,`timingRegExp`,RegExp(`${this.timeRegExp.source}( ?--> ?)${this.timeRegExp.source}`))}parse(e){let t={startTime:0,endTime:0},n=this.timingRegExp.exec(e);return n&&(t.startTime=this.calcTime(n[1],n[2],n[3],n[4]),t.endTime=this.calcTime(n[6],n[7],n[8],n[9])),t}parseTime(e){let t=this.timeRegExp.exec(e);return t?this.calcTime(t[1],t[2],t[3],t[4]):0}isTime(e){return this.timeRegExp.test(e)}calcTime(e=`0`,t=`0`,n=`0`,r=`0`){let i=Number(e)*60*60,a=Number(t)*60,o=Number(n),s=Number(`0.${r}`);return i+a+o+s}}class Pl{constructor(){e(this,`letterTagRegExp`,/<[a-z]*>|<\/[a-z]*>/)}parse(e){let t={texts:[]},n=e.replace(new RegExp(this.letterTagRegExp,`g`),``).split({[Symbol.split](e){let t=0,n=[];for(;t<e.length;){let r=[`<`,`>`].reduce((n,r)=>{let i=e.indexOf(r,t);return n===-1||n>i?i:n},-1);if(r===-1){n.push(e.substring(t));break}n.push(e.substring(t,r)),t=r+1}return n}}),r=new Nl;for(let e of n)r.isTime(e)?t.texts.push({type:`timestamp`,value:r.parseTime(e)}):t.texts.push({type:`text`,value:e});return t}}var Fl=Ml;import{isNonNullable as Il}from"@vkontakte/videoplayer-shared/es2015";var Ll,Rl,zl=0,Bl=!1,Vl=``,Hl=(e,t=0,n=0)=>e<t&&e<n,Ul=(e,t=0,n=0)=>e>=t&&e<=n,Wl=(e,t=0,n=0)=>e>t&&e>n,Gl=(e,t,n,r=!1)=>{let i=n.find(({id:e})=>e===t.value)?.subtitles;if(r)return i?.find(({startTime:t,endTime:n})=>Ul(e,t,n));let a=e>=zl,o=e<zl;if(zl=e,o&&(Bl=!1),Il(Ll)&&Ul(e,Ll.startTime,Ll.endTime)&&Vl===t.value)return Ll;if(!Il(Rl)&&i?.length&&!Bl){Rl=i.find(({startTime:t,endTime:n})=>Ul(e,t,n)||a&&Hl(e,t,n)),Ll=void 0,!Il(Rl)&&i[i.length-1].endTime<e&&(Bl=!0);return}else if(Ul(e,Rl?.startTime,Rl?.endTime))return Ll=Rl,Rl=void 0,Vl=t.value,Ll;else (a&&Wl(e,Rl?.startTime,Rl?.endTime)||o&&Hl(e,Rl?.startTime,Rl?.endTime))&&(Rl=void 0)},{setTimeout:Kl,clearTimeout:ql}=El();function Jl({subscription:e,i18n:t,tracer:n,interfaceLanguageUpdated$:r,availableTextTracks$:i,player:a,interfaceLanguage$:s,positionExact$:c,currentPlaybackRate$:l,isPlaying$:u,videoElement:d,callbacks:f,uiStatistics:p,subtitlesForcedLanguage:m}){let h=new Dl,g=new Dl,_={available:[],prev:[]},v=dc(),y=new fc,b=()=>a.experimental.getCurrentTime$.getValue()?.()??Y(d)?.currentTime??0,x=()=>({displayValue:t(`subtitles_off`),value:jl,language:``}),S=J(x()),C=Ro([S,r],([e],t)=>{e.value===jl?t(x()):t(e)}),ee=Ro([i,C],([e,t],n)=>{let r=[],i=e.find(({id:e})=>e===t.value);if(i?.url){let[,e]=v.find(i.url)??[];if(e){n(e);return}y.download(i.url).then(e=>{if(!e||y.isDestroyed())return;let a=new Fl,o=i.language;if(o){let t=!!i.isAuto,n=a.parse(e,o);r.push({lang:o,subtitles:n,isAuto:t,id:i.id})}v.add(i.url,r),Y(C).value===t.value&&n(r)}).catch(()=>{var e;p==null||(e=p.oneStat)==null||e.logError({errorType:`Subtitles download`,fatal:!1})})}n(r)}),te=(e=o(o({},x()),{},{selected:!1}))=>{n.log(`set subtitles`,o({},e)),e.value!==jl&&h.next(e.isAuto?e.value+`_auto`:e.value),g.next({enabled:e.value!==jl,lang:e.language,auto:!!e.isAuto}),S.set(e)},ne=e=>{n.log(`toggle subtitles`),Y(C)?.value===jl?ae(e):w()},re=(e,t)=>{n.log(`change subtitle`,{enabled:e}),e?ae(!0,t):w()},ie=Ro([i,C],([e,n])=>{if(!e.length)return[];let r=[];for(let{language:i,isAuto:a,id:o}of e){let e=i&&Al(i);i&&e&&r.push({displayValue:a?t(`subtitles_auto`,{language:e}):e,value:o,selected:n?.value===o,isAuto:a,language:i})}return r.length?(r.unshift(o(o({},x()),{},{selected:n?.value===jl})),r):[]});e.add(a.info.availableTextTracks$.subscribe(e=>{var n;function r(){let n=[];for(let{language:r,isAuto:i,id:a}of e){let e=r&&Al(r);r&&e&&n.push({id:a,language:r,title:i?t(`subtitles_auto`,{language:e}):e})}return n}f==null||(n=f.onAvailableSubtitlesChanged)==null||n.call(f,r())}));let ae=(e,t)=>{n.log(`subtitle on`);let r=Y(ie),i=Y(s),a=m??i,o;t&&(o=r.find(e=>e.value===t)),o??=r.filter(e=>e.value!==jl).find(e=>e.language===a),te(o??r[1])},oe=Ro([Ro([c,C,ee,Ro([l,u,C],([e,t,n],r)=>{let i;if(a.info.isLive$.getValue()&&t&&n.value!==jl){let t=()=>{i=Kl(t,1e3/(3*e)),r(Date.now())};return t(),()=>ql(i)}})],([e,t,n,r])=>{let i=a.info.isLive$.getValue();if(i&&_.prev!==n){let e=n.find(({id:e})=>e===t.value),r=_.prev.find(({id:e})=>e===t.value);e&&(_.available=[o(o({},e),{},{subtitles:[...r?.subtitles??[],...e.subtitles]})],_.prev=n)}if(t&&t.value!==jl)return Gl(i?b():e,t,i?_.available:n,i)})],([e])=>e?.texts?e.texts:[]);e.add(C.subscribe(e=>{if(e.value===jl){var t;f==null||(t=f.onSubtitleOff)==null||t.call(f)}else{var n;let t=Tl(Ol).find(([t,n])=>n===e.displayValue);f==null||(n=f.onSubtitleOn)==null||n.call(f,t?t[0]:``,e.value)}}));let w=()=>{n.log(`subtitle off`),te(void 0)};return{state:{actionSetSubtitle$:h,actionSubtitlesSwitched$:g,availableSubtitlesList$:ie,currentSubtitleCaptions$:oe},action:{subtitlesDestroy:()=>{y.destroy()},setSubtitle:te,toggleSubtitle:ne,externalChangeSubtitle:re}}}import{Observable as Yl}from"@vkontakte/videoplayer-shared/es2015";function Xl({actionSeek$:e,actionRewind$:t,actionQuality$:n,actionSetSubtitle$:r,actionSubtitlesSwitched$:i,uiStore:a,player:o,admanWrapper:s,log:c,statAuthToken:l,uiStatistics:u}){let d={actionRewind$:t,actionSeek$:e,inFullscreen$:new Yl(e=>e.next(!0)),actionSetSubtitle$:r},f={actionSeek$:e,actionSubtitlesSwitched$:i,actionQuality$:n,inFullscreen$:new Yl(e=>e.next(!0)),isLoaderVisible$:new Yl(e=>a.state.isLoaderVisible.subscribe(t=>e.next(t)))};if(u){let{oneStat:e,thinOneStat:t,mediascopePixel:n,statSubscription:r}=u;e&&(r.add(e.attachTo(o)),r.add(e.attachToUi(d)),r.add(e.attachToAds(s.events)),e.authorize(l).catch(e=>{c({message:`onestat auth error ${String(e)}`})}),n&&n.attachTo(o)),t&&(r.add(t.attachTo(o,s.events)),r.add(t.attachToUi(f)),r.add(t.attachToAds(s.events)),t.updateContext({isMobile:!1}),t.authorize(l))}}import{objectValues as Zl}from"@vkontakte/videoplayer-shared/es2015";import{objectEntries as Ql}from"@vkontakte/videoplayer-shared/es2015";import{arrayIncludes as $l}from"@vkontakte/videoplayer-shared/es2015";var eu=e=>{let t=Zl(Bc);return!!e&&Ql(e).some(([e])=>$l(t,e))};import{AbortControllerPolyfilled as tu}from"@vkontakte/videoplayer-shared/es2015";import{ErrorCategory as nu,getMessageFromError as ru,getWindow as iu}from"@vkontakte/videoplayer-shared/es2015";var{setTimeout:au,clearTimeout:ou}=iu(),su=5e3,cu=e=>!!e?.live,lu=Symbol(`canceled`);function uu({video:e,initVideo:t,getLiveApi:n,nonErrorPlayerPhase:r,tracer:i,player:a,errorTracer:c}){let l=0,u=!1,d,f=()=>{},p=new tu,m=e.live.status;if(!n)throw Error(`You must specify the live API`);let h;try{h=n({onLiveStatusChange:S})}catch(e){throw c.error({id:`get-live-api-error:`+ru(e),category:nu.EXTERNAL_API,thrown:e,severity:`fatal`}),Error(`getLiveApi error`)}function g(e){return _.apply(this,arguments)}function _(){return _=s(function*(e,...t){try{return yield h[e](...t)}catch(t){if(t===lu)return;c.error({id:`live-api-call-`+e+`-error: `+ru(t),thrown:t,category:nu.EXTERNAL_API})}}),_.apply(this,arguments)}function v(){f()}let y=(...[e,t])=>{let n=e?t:`thumb`;i.log(`set live waiting`,{state:e,playerPhase:n,type:t}),r.set(n),e&&a.stop()},b=e=>{x()||(y(!1),t(o(o({},e),{},{autoplay:!0})))},x=()=>{let{info:e}=a;return e.canPlayLiveTailBuffer$.getValue()&&!e.isStalled$.getValue()&&!e.atLiveEdge$.getValue()};function S(e){return C.apply(this,arguments)}function C(){return C=s(function*(e){try{if(!e){d=void 0;return}switch(e){case`deleted`:case`failed`:case`no_video`:d=e;break;case`upcoming`:case`waiting`:yield ee(e);break;case`started`:yield te();break;case`finished`:case`postlive`:yield re(e);break;default:c.error({id:`handle-status-update-error-unexpected status`,category:nu.EXTERNAL_API,data:{liveStatus:e}})}}catch(t){c.error({id:`handle-status-update-error: `+ru(t),data:{liveStatus:e,curLiveStatus:d},category:nu.CALL_FROM_EXTERNAL,severity:`error`,thrown:t})}}),C.apply(this,arguments)}function ee(e){if(d!==e)if(d=e,ce(),e===`upcoming`)y(!0,`LiveWaitingStart`);else{let e=!x();e&&y(!0,`LiveWaitingRecover`),f=()=>{e||y(!0,`LiveWaitingRecover`)}}}function te(){return ne.apply(this,arguments)}function ne(){return ne=s(function*(){if(!d||d===`started`){d=`started`;return}p.abort(lu),p=new tu;let e;if(e=yield g(`getVideo`,p.signal),!e)return;let t=e?.videos[0];cu(t)&&t.sources&&Object.keys(t.sources).length>0&&(d=`started`,b(e),u||(u=!0,ae()))}),ne.apply(this,arguments)}function re(e){return ie.apply(this,arguments)}function ie(){return ie=s(function*(e){if(ce(),d===`postlive`)return;if(!d&&e===`postlive`){d=`postlive`;return}if(!d&&e===`finished`){y(!0,`LiveWaitingRecord`);return}let t=!x();t&&y(!0,`LiveWaitingRecord`),f=()=>{t||y(!0,`LiveWaitingRecord`)}}),ie.apply(this,arguments)}function ae(){l=au(s(function*(){try{yield oe(),ae()}catch(e){c.error({id:`heartbeat-timer-error: `+ru(e),category:nu.WTF,thrown:e,severity:`error`})}}),su)}function oe(){return w.apply(this,arguments)}function w(){return w=s(function*(){if(!p.signal.aborted){if(!(yield g(`shouldSendHeartbeat`))){ae();return}yield g(`sendLiveHeartBeat`,p.signal)}}),w.apply(this,arguments)}function se(){l&&=(ou(l),0)}function ce(){return le.apply(this,arguments)}function le(){return le=s(function*(){se(),u&&(u=!1,yield g(`stopLiveHeartBeat`))}),le.apply(this,arguments)}function ue(){ou(0),p.abort(lu),d=void 0,c.externalCallbackFuse(`live-api-destroy`,h.destroy.bind(h)),ce()}return S(m),{actions:{onLiveEnded:v,destroy:ue}}}function du({subscription:e,videoElement:t,player:n,admanWrapper:r,actionSeek$:i,selectInitialStream:a,callbacks:s,onLiveEnded:c,errorTracer:l}){let u={},[d,f]=pc(0),p=l.callbackWrapper({callbackName:`on-live-ended-in-subscription`})(c);e.add(n.info.duration$.subscribe(e=>{f(e)})).add(n.experimental.element$.subscribe(l.callbackWrapper({callbackName:`player-element`})(e=>{e&&(t.set(e),e.classList.add(`player-media`))})).add(n.events.ended$.subscribe(()=>{l.externalCallbackFuse(`onEnded`,s?.onEnded)})).add(n.events.looped$.subscribe(()=>{l.externalCallbackFuse(`onLooped`,s?.onLooped)})).add(n.events.started$.subscribe(l.callbackWrapper({callbackName:`started-in-subscription`})(()=>{let e=n.info.muted$.getValue();l.externalCallbackFuse(`onStarted`,s?.onStarted),u.onStarted?.call(u,e)})).add(n.events.willSeek$.subscribe(({from:e,to:t})=>{l.externalCallbackFuse(`onSeek`,s?.onSeek,e,t,i.getValue())})).add(n.events.autoplaySoundProhibited$.subscribe(()=>{l.externalCallbackFuse(`onAutoplaySoundProhibited`,s?.onAutoplaySoundProhibited)})).add(n.info.position$.subscribe(l.callbackWrapper({callbackName:`player.info.position$`})(e=>{let t=n.info.duration$.getValue();if(isFinite(t)&&t>0){var i;s==null||(i=s.onTimeupdate)==null||i.call(s,t,e),r.setPosition(e,t)}}))).add(n.events.fatalError$.subscribe(e=>{l.externalCallbackFuse(`onCrashedInSubscription`,s?.onCrashed,e?`${e.id}: ${e.message}`:void 0)})).add(n.events.fetcherRecoverableError$.subscribe(e=>{l.externalCallbackFuse(`onRecoverableError`,s?.onRecoverableError,e?`${e.id}: ${e.message}`:void 0)})).add(n.info.liveTime$.subscribe(e=>{l.externalCallbackFuse(`onLiveTime`,s?.onLiveTime,e)})).add(n.info.isStalled$.subscribe(e=>{l.externalCallbackFuse(`onStalledChanged`,s?.onStalledChanged,e)})).add(n.info.isLiveEnded$.subscribe(e=>{e&&(p(),l.externalCallbackFuse(`onLiveEnded`,s?.onLiveEnded))})).add(r.events.loadStarted$.subscribe(()=>{var e;return l.externalCallbackFuse(`adsOnLoadStarted`,s==null||(e=s.adsInfo)==null?void 0:e.onLoadStarted)})).add(r.events.loadEnded$.subscribe(()=>{var e;return l.externalCallbackFuse(`adsOnLoadEnded`,s==null||(e=s.adsInfo)==null?void 0:e.onLoadEnded)})).add(r.events.loadError$.subscribe(()=>{var e;return l.externalCallbackFuse(`adsOnLoadError`,s==null||(e=s.adsInfo)==null?void 0:e.onLoadError)})).add(r.events.init$.subscribe(()=>{var e;return l.externalCallbackFuse(`adsOnInit`,s==null||(e=s.adsInfo)==null?void 0:e.onInit)})).add(r.events.ready$.subscribe(()=>{var e;return l.externalCallbackFuse(`adsOnReady`,s==null||(e=s.adsInfo)==null?void 0:e.onReady)})).add(r.events.started$.subscribe(e=>{var t;return l.externalCallbackFuse(`adsOnStarted`,s==null||(t=s.adsInfo)==null?void 0:t.onStarted,e)})).add(r.events.timeRemained$.subscribe(e=>{var t;return l.externalCallbackFuse(`adsOnTimeRemained`,s==null||(t=s.adsInfo)==null?void 0:t.onTimeRemained,e)})).add(r.events.ended$.subscribe(e=>{var t;return l.externalCallbackFuse(`adsOnCompleted`,s==null||(t=s.adsInfo)==null?void 0:t.onCompleted,e.section)})).add(r.events.empty$.subscribe(()=>{var e;return l.externalCallbackFuse(`adsOnEmpty`,s==null||(e=s.adsInfo)==null?void 0:e.onEmpty)})).add(r.events.clicked$.subscribe(e=>{var t;return l.externalCallbackFuse(`adsOnClicked`,s==null||(t=s.adsInfo)==null?void 0:t.onClicked,e)})).add(r.events.closed$.subscribe(e=>{var t;return l.externalCallbackFuse(`adsOnClosed`,s==null||(t=s.adsInfo)==null?void 0:t.onClosed,e)})).add(r.events.error$.subscribe(e=>{var t;return l.externalCallbackFuse(`adsOnError`,s==null||(t=s.adsInfo)==null?void 0:t.onError,e)})).add(r.events.paused$.subscribe(()=>{var e;return l.externalCallbackFuse(`adsOnPaused`,s==null||(e=s.adsInfo)==null?void 0:e.onPaused)})).add(r.events.resumed$.subscribe(()=>{var e;return l.externalCallbackFuse(`adsOnResumed`,s==null||(e=s.adsInfo)==null?void 0:e.onResumed)}))));let m=!1;e.add(n.info.availableAudioStreams$.subscribe(l.callbackWrapper({callbackName:`player.info.availableAudioStreams$`})(e=>{if(!m&&e.length){let t=a(e);t&&(n.setAudioStream(t),m=!0)}})));let h=!1;return e.add(n.info.availableVideoStreams$.subscribe(l.callbackWrapper({callbackName:`player.info.availableVideoStreams$`})(e=>{if(!h&&e.length){let t=a(e);t&&(n.setVideoStream(t),h=!0)}}))),l.addSubscription(n.events.managedError$.subscribe(e=>{l.error(o(o({},e),{},{severity:`debug`}))})),l.addSubscription(n.events.fatalError$.subscribe(e=>{l.error(o(o({},e),{},{severity:`fatal`}))})),l.addSubscription(n.info.currentFormat$.subscribe(e=>{e&&l.updateContext({currentFormat:e})})),{state:{duration$:d},actions:{setUiCallbacks:e=>{u=o({},e)}}}}var fu=({interfaceLanguage:e,isCyrillicRelatedInterface:t,videoId:n,isLiveCatchUpMode:r,statAuthToken:i,isAudioDisabled:a,callbacks:s,uiConfig:c,coreConfig:l,stopPlayer:u,looped:d=!1,statistics:f,saveRate:p,internalsExposure:m,playerId:h,metaConfig:g,app:_,video:v,deviceCapabilities:y,subtitlesForcedLanguage:b,getLiveApi:x,errorTracer:S})=>{let C=J(void 0),{i18n:ee,isCyrillicRelatedInterface$:te,interfaceLanguage$:ne,interfaceLanguageUpdated$:re,setLanguage:ie}=wl({uiConfig:c,interfaceLanguage:e,isCyrillicRelatedInterface:t,uiStatistics:f}),ae=o(o({},l),{},{isAudioDisabled:a,live:o(o({},l.live),{},{isLiveCatchUpMode:!!r})}),oe=Ls.createRootTracer(),w=oe.createComponentTracer(`Store`),se=new Is,ce=J({}),le=J(null),ue=new Fs,T=ue.createComponentLog(`Store`),E=new ks(ae,oe,{playerId:h,onDevNullLog:s?.onDevNullLog}),de=J(!1),fe=J(!1),D=J(`thumb`),O=Ro([de,D,fe],([e,t,n])=>e||n?`crashed`:t);O.subscribe(e=>{e===`crashed`&&Xe()});let k=new qs(ue,{loadTimeout:c.ads.loadTimeout,initTimeout:c.ads.initTimeout,runtimeTimeout:c.ads.runtimeTimeout,useAdmanFromNPM:c.ads.useAdmanFromNPM,volumeMultiplier:c.ads.volumeMultiplier,isVsidOriginal:c.ads.isVsidOriginal}),A=yl({player:E,config:c,i18n:ee,looped:d,subscription:se,tracer:w,log:T,playerPhase$:O,admanWrapper:k,onPlay:()=>{Me.action.onPlay()},saveRate:p,videoId:n,isAudioDisabled:a,callbacks:s}),{state:{crashed$:pe,actionSeek$:me,actionRewind$:he,actionQuality$:ge,availableTextTracks$:_e,positionExact$:ve,currentPlaybackRate$:ye,isPlaying$:be}}=A,xe=()=>{},{state:{duration$:Se},actions:{setUiCallbacks:Ce}}=du({subscription:se,videoElement:le,player:E,admanWrapper:k,actionSeek$:me,selectInitialStream:A.actions.selectInitialStream,callbacks:s,errorTracer:S,onLiveEnded:S.callbackWrapper({callbackName:`onLiveEndedInStore`,category:Ns.UI})(()=>xe())}),{state:{actionSetSubtitle$:we,actionSubtitlesSwitched$:Te,availableSubtitlesList$:Ee,currentSubtitleCaptions$:De},action:{subtitlesDestroy:Oe,setSubtitle:ke,toggleSubtitle:Ae,externalChangeSubtitle:je}}=Jl({subscription:se,i18n:ee,tracer:w,interfaceLanguageUpdated$:re,availableTextTracks$:_e,player:E,interfaceLanguage$:ne,positionExact$:ve,currentPlaybackRate$:ye,isPlaying$:be,videoElement:le,callbacks:s,uiStatistics:f,subtitlesForcedLanguage:b}),Me=Oc({uiConfig:c,duration$:Se});pe.subscribe(e=>de.set(e)),m?.expose({corePlayer:E});let Ne=f&&f.oneStat?$(f.oneStat.vsid$):Lo(void 0);Xl({actionSeek$:me,actionRewind$:he,actionQuality$:ge,actionSetSubtitle$:we,actionSubtitlesSwitched$:Te,uiStore:Me,player:E,admanWrapper:k,log:T,statAuthToken:i,uiStatistics:f}),D.subscribe(e=>{e===`ads`&&E.info.playbackState$.getValue()&&Fe()});let Pe=J(),Fe=()=>{Pe.set({muted:E.info.muted$.getValue()})};w.log(`create store`),T({message:`create store`});let Ie=e=>{ml(e),ol()&&A.actions.setTrafficSavingEnabled(!0),y.maxQuality!==As.INVARIANT&&E.setAutoQualityLimits({max:y.maxQuality});let t=nl(e);if(t&&t!==As.INVARIANT&&y.isCodecSupported(t)){A.actions.setQuality(t);return}},Le=!1,Re=()=>{};function ze(e,t=void 0){try{if(t&&C.set(t),!Y(C))throw Error(`video container empty`);let{videos:[{sources:n,subtitles:r,subtitlesForcedLanguage:i,unitedVideoId:a}],failoverHosts:o,volumeMultiplier:s,fromTime:l=0,autoplay:u=!1,preload:d,saveRate:f}=e;if(eu(n)&&(E.initVideo({container:Y(C),sources:n,failoverHosts:o,volumeMultiplier:s}),w.log(`init video`),r&&E.setExternalTextTracks(r),ce.set({container:Y(C),sources:n,failoverHosts:o,volumeMultiplier:s,subtitles:r,subtitlesForcedLanguage:i})),l>0&&A.actions.seekExternal(l),k.setInitialVolume(1),Ie(a),c.features.saveRate&&f){let e=fl();e&&n&&A.actions.setPlaybackRate(e)}Me.state.isAutoplay.set(u),d&&c.features.preload&&E.prepare(),u&&Ye(!1,!1);let p=e.videos[0];if(p?.live&&!Le){let e=uu({video:p,initVideo:ze,nonErrorPlayerPhase:D,tracer:w,player:E,getLiveApi:x,errorTracer:S});Re=e.actions.destroy,xe=e.actions.onLiveEnded,Le=!0}}catch(t){fe.set(!0),S.error({id:`init video error: `+Ps(t),data:{liveInitiated:Le,newVideoConfig:e,uiConfig:c},thrown:t,category:Ns.FATAL,severity:`fatal`}),S.externalCallbackFuse(`onCrashed`,s?.onCrashed,String(t))}}let Be=()=>{w.log(`skip adman`),k.skip()},Ve=(e=!0)=>{js(Ze),T({message:`switch from ads to video, callPlay: ${e}`}),w.log(`switch from ads to video`,{callPlay:e}),D.set(`video`),e&&E.play(),Pe.set(void 0)},He=()=>{js(Ze),T({message:`switch from video to ads`}),w.log(`switch from video to ads`),Ze.actions.internal.pause(),D.set(`ads`)},Ue=()=>(js(Ze),w.log(`get debug text data`),lc(E,Y(ce),Ze,oe.getTraceId(),g)),We=()=>(js(Ze),uc(E,Y(ce),Ze)),Ge=()=>Y(le),Ke=e=>{var t;if(js(Ze),E.info.isEnded$.getValue())return;let n=!e;if(Y(Ze.playerPhase)===`ads`){T({message:`pause ads, internalCall: ${n}`}),w.log(`pause ads`,{internalCall:n}),k.pause();return}T({message:`pause video, internalCall: ${n}`}),w.log(`pause video`,{internalCall:n}),n&&(s==null||(t=s.onPause)==null||t.call(s)),E.pause()},qe=e=>{var t;js(Ze);let n=!e;if(Y(Ze.playerPhase)===`ads`){T({message:`play ads, internalCall: ${n}`}),w.log(`play ads`,{internalCall:n}),k.play();return}T({message:`play video, internalCall: ${n}`}),w.log(`play video`,{internalCall:n}),n&&(s==null||(t=s.onPlay)==null||t.call(s)),E.play()},Je=e=>{js(Ze);let t=!e;if(Y(Ze.playerPhase)===`ads`){T({message:`player cannot be stopped during ads via external method`});return}T({message:`player will be stopped, internalCall: ${t}`}),u?.()},Ye=(e,t)=>{js(Ze),T({message:`first start, show ads: ${e}, internalCall: ${!t}`}),w.log(`first start`,{showAds:e,external:t}),e?D.set(`ads`):(D.set(`video`),E.play())},Xe=()=>{w.log(`destroy store`),Re(),se.unsubscribe(),E.destroy(),k.destroy(),f?.destroy(),A.actions.destroy(),Oe()},Ze={interfaceLanguage$:ne,isCyrillicRelatedInterface$:te,initVideo:ze,videoId:n,playerPhase:O,vsid:Ne,i18n:ee,app:_,video:Ms(v),playerState:A.state,ui:Me.state,subtitles:{availableSubtitlesList$:Ee,currentSubtitleCaptions$:De},ads:{position:J(0),duration:J(0),playbackState:J(`inactive`),canSkip:J(!1),secondsToWatchBeforeSkip:J(0),postrollPassed:J(!1)},actions:{internal:{firstStart:e=>Ye(e,!1),play:()=>qe(!1),pause:()=>Ke(!1),togglePlay:A.actions.togglePlay,onUserInput:Me.action.onUserInput,setSettingsVisibility:Me.action.setSettingsVisibility,clearShowByInput:Me.action.clearShowByInput,onBackButton:Me.action.onBackButton,setVideoStream:A.actions.setVideoStream,setAudioStream:A.actions.setAudioStream,setQuality:A.actions.setQuality,setTrafficSavingEnabled:A.actions.setTrafficSavingEnabled,setHighQualityEnabled:A.actions.setHighQualityEnabled,setPlaybackRate:A.actions.setPlaybackRate,incrementPlaybackRate:A.actions.incrementPlaybackRate,decrementPlaybackRate:A.actions.decrementPlaybackRate,setSubtitle:e=>ke(e),toggleSubtitle:()=>Ae(!1),startScrubbing:A.actions.startScrubbing,progressScrubbing:A.actions.progressScrubbing,completeScrubbing:A.actions.completeScrubbing,switchToActiveLive:A.actions.switchToActiveLive,switchFromAdsToVideo:Ve,switchFromVideoToAds:He,skipAd:Be,getDebugTextData:Ue,getDebugPanelData:We,getVideoElement:Ge,seekTime:A.actions.seekToTime,clearDelayedBufferingCheckTimeout:Me.action.clearDelayedBufferingCheckTimeout,seekToPercent:A.actions.seekToPercent,addLanguage:vc,setLanguage:ie,setLooped:A.actions.setLooped,onShowedControls:Me.action.onShowedControls},external:{firstStart:e=>Ye(e,!0),play:()=>qe(!0),pause:()=>Ke(!0),stop:()=>Je(!0),seekTime:A.actions.seekExternal,setPlaybackRate:A.actions.setPlaybackRateExternal,setAutoQualityLimits:A.actions.setAutoQualityLimitsExternal,toggleSubtitle:()=>Ae(!0),changeSubtitle:je,setLiveLowLatency:A.actions.setLiveLowLatency,setQuality:A.actions.setQuality,setTrafficSavingEnabled:A.actions.setTrafficSavingEnabled,setHighQualityEnabled:A.actions.setHighQualityEnabled,changeAudioStream:A.actions.externalChangeAudioStream}},callbacks:s,setUiCallbacks:Ce,getAdmanWrapper:()=>k,getLogger:()=>ue,getPlayer:()=>E,deviceCapabilities:y,destroy:Xe};return Me.resolveDependency(Ze),Ze};import{ErrorCategory as pu,getMessageFromError as mu,getWindow as hu}from"@vkontakte/videoplayer-shared/es2015";class gu{constructor(t){e(this,`value`,void 0),e(this,`next`,void 0),this.value=t,this.next=null}}class _u{constructor(t){e(this,`top`,void 0),e(this,`bottom`,void 0),e(this,`size`,void 0),e(this,`maxSize`,void 0),this.top=null,this.bottom=null,this.size=0,this.maxSize=t}push(e){let t=new gu(e);this.top?(this.top.next=t,this.top=t):(this.top=t,this.bottom=t),this.size++,this.size>this.maxSize&&this.bottom&&(this.bottom=this.bottom.next)}getValuesFromBottom(){let e=[],t=this.bottom;for(;t;)e.push(t.value),t=t.next;return e}}var vu=W(`<div class="container s-b"><canvas class="s-b"></canvas></div>`),yu={hash:`s-b`,code:`.container.s-b{display:inline-block;height:16px;width:120px}canvas.s-b{margin-top:2px;transform:scaleY(-1)}`};function bu(e,t){Zt(t,!0),ro(e,yu);let n=Uo(t,`values`,19,()=>[]),r=I(void 0),i=I(null);Wo(()=>{U(r).width=120,U(r).height=16,L(i,U(r).getContext(`2d`),!0)});function a(e,t,n,r,i){i===0&&(i=1),e.fillStyle=`#fff`,e.fillRect(t,n,r,i)}vi(()=>{let e=``;if(U(i)){let t=n()[0];for(let e=1;e<n().length;e++)n()[e]>t&&(t=n()[e]);U(i).clearRect(0,0,120,16);let r=59;for(let o=n().length-1;o>=0;o--){let s=r*2,c=t>0?16*(n()[o]/t):0;a(U(i),s,0,2,c),e=c+` `+e,r--}}});var o=vu();Po(R(o),e=>L(r,e),()=>U(r)),N(o),G(e,o),Qt()}import{safeStorage as xu}from"@vkontakte/videoplayer-shared/es2015";var Su=W(`<div class="s-3"><div class="s-3">Video id</div> <span> </span></div>`),Cu=W(`<div class="s-3"><div class="s-3">VSID</div> <span> </span></div>`),wu=W(`<div class="s-3"><div class="s-3">Provider</div> <span> </span></div>`),Tu=W(`<div class="s-3"><div class="s-3">Streams</div> <span> </span></div>`),Eu=W(`<div class="s-3"><div class="s-3">Viewport</div> <span> </span></div>`),Du=W(`<div class="s-3"><div class="s-3">Video size</div> <span> </span></div>`),Ou=W(`<div class="s-3"><div class="s-3">CDN host</div> <span> </span></div>`),ku=W(`<div class="s-3"><div class="s-3">Volume</div> <span> </span></div>`),Au=W(`<div class="s-3"><div class="s-3">Position</div> <span> </span></div>`),ju=W(`<div class="s-3"><div class="s-3">Buffer</div> <span> </span></div>`),Mu=W(`<div class="s-3"><div class="s-3">Nbuffer</div> <span> </span></div>`),Nu=W(`<div class="s-3"><div class="s-3">Live latency</div> <span> </span></div>`),Pu=W(`<div class="s-3"><div class="s-3">Segment</div> <span> </span></div>`),Fu=W(`<div class="s-3"><div class="s-3">Network</div> <!> <span> </span></div>`),Iu=W(`<div class="s-3"><div class="s-3">V bitrate</div> <!> <span> </span></div>`),Lu=W(`<div class="container s-3" role="region"><button class="close s-3" title="закрыть">[x]</button> <div class="content s-3"><div class="s-3"><div class="s-3">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-3"><div class="s-3">Dropped</div> <span> </span></div> <!> <!> <div class="s-3"><div class="s-3">FPS</div> <!> <span> </span></div></div></div>`),Ru={hash:`s-3`,code:`.container.s-3{background:rgba(28,28,28,.8);border-radius:4px;font-size:10px;left:20px;min-width:160px;text-align:left;top:45px;user-select:text;z-index:var(--debug-panel-z-index)}.container.s-3,button.close.s-3{color:#fff;position:absolute}button.close.s-3{background-color:transparent;border:none;cursor:pointer;outline:0;padding:0;right:5px;top:3px}.content.s-3{padding:5px}.content.s-3>div:where(.s-3)>div:where(.s-3){display:inline-block;padding:0 5px;text-align:right;width:60px}`};function zu(e,t){Zt(t,!0),ro(e,Ru);let n=sc(),r=n.ui.debugPanelVisible,i=e=>{e.stopPropagation(),xu.remove(wc),r.set(!1)},a=I(qr(n.actions.internal.getDebugPanelData())),o=n.actions.internal.getVideoElement(),s=I(0),c=I(0),l=I(0),u=new _u(60),d=new _u(60),f=new _u(60),p=I(qr([])),m=I(qr([])),h=I(qr([])),g=xc(`aria_label_debug_panel`);Wo(()=>{xu.set(wc,`true`),o&&(L(c,o.getVideoPlaybackQuality().droppedVideoFrames,!0),L(s,o.getVideoPlaybackQuality().totalVideoFrames,!0));let e=window.setInterval(()=>{L(a,n.actions.internal.getDebugPanelData(),!0)},500),t;return o&&(t=window.setInterval(()=>{if(o){L(c,o.getVideoPlaybackQuality().droppedVideoFrames,!0);let e=o.getVideoPlaybackQuality().totalVideoFrames;L(l,e-U(s)),L(s,e,!0),u.push(U(l)),U(a).speed&&d.push(U(a).speed),U(a).bitrate&&f.push(U(a).bitrate),L(p,u.getValuesFromBottom(),!0),L(m,d.getValuesFromBottom(),!0),L(h,f.getValuesFromBottom(),!0)}},1e3)),()=>{clearInterval(e),t&&clearInterval(t)}});var _=Lu(),v=R(_),y=z(v,2),b=R(y),x=z(R(b),2),S=R(x,!0);N(x),N(b);var C=z(b,2),ee=e=>{var t=Su(),n=z(R(t),2),r=R(n,!0);N(n),N(t),B(()=>K(r,U(a).id)),G(e,t)};q(C,e=>{U(a).id&&e(ee)});var te=z(C,2),ne=e=>{var t=Cu(),n=z(R(t),2),r=R(n,!0);N(n),N(t),B(()=>K(r,U(a).vsid)),G(e,t)};q(te,e=>{U(a).vsid&&e(ne)});var re=z(te,2),ie=e=>{var t=wu(),n=z(R(t),2),r=R(n,!0);N(n),N(t),B(()=>K(r,U(a).provider)),G(e,t)};q(re,e=>{U(a).provider&&e(ie)});var ae=z(re,2),oe=e=>{var t=Tu(),n=z(R(t),2),r=R(n);N(n),N(t),B(()=>K(r,`Video: ${(U(a).videoCodec||``)??``} ${U(a).hdr?`(HDR)`:``}
17
+ Try switching the\xA0quality to\xA0Auto.`,double_forward_label:`2x`,preview_track_notification_text:`pull up to open precise rewind`,preview_track_close_tooltip:`dismiss precise rewind`},Es=new Map;Es.set(ss.EN,Ts),Es.set(ss.RU,ws);var Ds=new Map,Os=({language:e,pack:t,fallback:n})=>{if(Es.has(e)){let n=Es.get(e);Es.set(e,o(o({},n),t))}else Es.set(e,t);Ds.set(e,n)},ks=e=>Es.has(e),As=(e,t,n,r)=>{let i=Es.get(e)?.[t];if(os(i)){let n=Ds.get(e)??r;i=(n?Es.get(n):void 0)?.[t]}return os(i)?t+is(n??{}).join(` `):n?as(i,/{(\w+?)}/g,(e,t)=>n[t]??``):i},js=(e,t)=>{let{interfaceLanguage$:n}=_s();return As(X(n),e,t,ao().defaultLanguage)};import{getWindow as Ms,safeStorage as Ns}from"@vkontakte/videoplayer-shared/es2015";var Ps=`vk_player_debug_panel_opened`,Fs=`videoplayer`,Is=`videoplayer`,Ls=5e3;function Rs({uiConfig:e,duration$:t}){let[n,r]=Cs(!1),[i,a]=Cs(!0),[o,s]=Cs(!1),c=Y(!1),[l,u]=Cs(!1),d=()=>{},f=Y(!1),p=Ga(!1,e=>(f.subscribe(t=>e(t)),()=>d())),m=Ka([t],([e])=>Math.abs(e)>0),h=Ms().setTimeout(()=>{},0),g=(e=`COMMON`)=>{!X(n)&&e===`REWIND`&&X(m)&&u(!0),c.set(!0),Ms().clearTimeout(h),h=Ms().setTimeout(()=>{c.set(!1)},Ls)},_=()=>{u(!1)},v=()=>{Ms().clearTimeout(h),c.set(!1)},y=()=>{Ms().clearTimeout(h),c.set(!1)},b=()=>{if(X(o))return s(!1),!0;let e=X(c);return y(),e},x=()=>{y()},S=()=>{};function C(t){let{playerState:{isPlaying$:n,isEnded$:i,crashed$:s,isBuffering$:l},ads:{playbackState:u},playerPhase:m}=t;Ka([n,i,c,o],([e,t,n,r])=>!r&&(!e||t||n)).subscribe(e=>{r(e),e||v()});let h=null;S=()=>{h&&Ms().clearTimeout(h),h=null},f.set(l.getValue());let g=l.subscribe(t=>{t&&h===null?h=Ms().setTimeout(()=>{f.set(l.getValue()),h=null},e.loaderDelay):f.set(t)});d=()=>{g.unsubscribe(),h&&Ms().clearTimeout(h)},Ka([m,p,u,s],([e,t,n,r])=>(e===`video`&&t||e===`ads`&&n===`inactive`)&&!r).subscribe(a)}let ee=Ns.get(Ps)===`true`;return{state:{isAutoplay:Y(!1),debugPanelVisible:Y(ee),isShowLoader:i,controlsVisible:n,settingsVisible:o,isLoaderVisible:p,showUiWithRewind:l,canRewind$:m},action:{onUserInput:g,clearShowByInput:y,onBackButton:b,setSettingsVisibility:s,onPlay:x,clearDelayedBufferingCheckTimeout:()=>S(),onShowedControls:_},resolveDependency:C}}import{arrayIncludes as zs}from"@vkontakte/videoplayer-shared/es2015";import{arrayAt as Bs}from"@vkontakte/videoplayer-shared/es2015";import{PlaybackState as Vs,PredefinedQualityLimits as Hs}from"@vkontakte/videoplayer-core/es2015";import{getWindow as Us,isInvariantQuality as Ws,isNonNullable as Gs,map as Ks,merge as qs,Subject as Js,ValueSubject as Ys}from"@vkontakte/videoplayer-shared/es2015";var Xs;(e=>{e.MPEG=`MPEG`,e.DASH=`DASH`,e.DASH_SEP=`DASH_SEP`,e.DASH_SEP_VK=`DASH_SEP`,e.DASH_WEBM=`DASH_WEBM`,e.DASH_WEBM_AV1=`DASH_WEBM_AV1`,e.DASH_STREAMS=`DASH_STREAMS`,e.DASH_WEBM_VK=`DASH_WEBM`,e.DASH_ONDEMAND=`DASH_ONDEMAND`,e.DASH_ONDEMAND_VK=`DASH_ONDEMAND`,e.DASH_LIVE=`DASH_LIVE`,e.DASH_LIVE_CMAF=`DASH_LIVE_CMAF`,e.DASH_LIVE_WEBM=`DASH_LIVE_WEBM`,e.HLS=`HLS`,e.HLS_ONDEMAND=`HLS_ONDEMAND`,e.HLS_JS=`HLS`,e.HLS_FMP4=`HLS_FMP4`,e.HLS_LIVE=`HLS_LIVE`,e.HLS_LIVE_CMAF=`HLS_LIVE_CMAF`,e.WEB_RTC_LIVE=`WEB_RTC_LIVE`})(Xs||={});var Zs=e=>{let t=Math.round(e);return isNaN(t)||t<40?``:t>=40&&t<55?50:t>=55&&t<90?60:t>=90&&t<180?120:t>=180?240:``};import{SeekAction as Qs}from"@vkontakte/videoplayer-statistics/es2015";import"@vkontakte/videoplayer-shared/es2015";import"@vkontakte/videoplayer-shared/es2015";import"@vkontakte/videoplayer-shared/es2015";import{isNullable as $s,safeStorage as ec}from"@vkontakte/videoplayer-shared/es2015";var tc=`vk_player_`,nc=`vk_player_prefer_traffic_saving_enabled`,rc=`vk_player_preferred_quality`,ic=`vk_player_preferred_default_quality_settings`,ac=`vk_player_preferred_quality_settings_by_video`,oc=`vk_player_preferred_stream_language`,sc=`vk_player_preferred_rate`,cc=`vk_player_preferred_subtitles_language`,lc=`vk_player_user_video_prefs`;`${tc}`;var uc=(e,t)=>ec.set(rc,JSON.stringify({videoId:e,value:t})),dc=()=>ec.remove(rc),fc=e=>{let t=ec.get(rc);if($s(t))return;let{videoId:n,value:r}=JSON.parse(t);if(e!==n){dc();return}return r},pc=(e,t)=>{t?ec.set(e,`true`):ec.remove(e)},mc=e=>ec.get(e)===`true`,hc=e=>pc(nc,e),gc=()=>mc(nc),_c=()=>ec.get(oc),vc=e=>ec.set(oc,e),yc=()=>ec.get(cc),bc=e=>{e?ec.set(cc,e):ec.remove(cc)},xc=e=>ec.set(sc,JSON.stringify({rate:e})),Sc=()=>{let e=ec.get(sc);if($s(e))return;let{rate:t}=JSON.parse(e);return t},Cc=(()=>{let e=e=>{ec.set(ic,JSON.stringify(e))},t=()=>{try{let e=ec.get(ic);return e?JSON.parse(e):null}catch{return null}},n=()=>{try{let e=ec.get(ac);return e?JSON.parse(e):null}catch{return null}},r=e=>{ec.set(ac,JSON.stringify(e))},i=r=>{u(r);let i=r?n():null;if(i&&i?.videoId===r)return o(o({},i),{},{appliesTo:`to-video`});i&&a();let s=t();return s?o(o({},s),{},{appliesTo:`as-default`}):(e({type:`auto_quality`}),{type:`auto_quality`,appliesTo:`as-default`})},a=()=>{ec.remove(ac)},s=()=>{ec.remove(ic)},c=(t,n=`as-default`)=>{t.type===`exact_quality`||n===`to-video`?r(t):e(t)},l=e=>{let t=i(e);if(t){switch(t.type){case`traffic_saving`:hc(!0);break;case`exact_quality`:uc(e,t.quality)}a(),s()}},u=t=>{let n=fc(t);if(n){r({type:`exact_quality`,videoId:t,quality:n});return}gc()&&e({type:`traffic_saving`,videoId:t}),hc(!1),dc()};return{getPreferredQualitySettings:i,migrateSettingsToLegacyWay:l,savePreferredQualitySettings:c,savePreferredDefaultQualitySettings:e,removePreferredQualitySettingsByVideo:a,getPreferredDefaultQualitySettings:t,getPreferredSubtitlesLanguage:yc,savePreferredSubtitlesLanguage:bc}})();Cc.getPreferredQualitySettings;var wc=Cc.migrateSettingsToLegacyWay;Cc.savePreferredQualitySettings,Cc.savePreferredDefaultQualitySettings,Cc.removePreferredQualitySettingsByVideo,Cc.getPreferredDefaultQualitySettings;var Tc=()=>{let e=ec.get(lc);if(e)try{return JSON.parse(e)}catch{return null}return null},Ec=(e,t)=>{var n;let r=Tc();return(r==null||(n=r[e])==null?void 0:n[t])??null},{cancelAnimationFrame:Dc,requestAnimationFrame:Oc}=Us();function kc({player:e,config:t,i18n:n,looped:r,subscription:i,tracer:a,log:o,playerPhase$:s,admanWrapper:c,onPlay:l,saveRate:u,videoId:d,isAudioDisabled:f,callbacks:p}){let m=Y(void 0),h=$(e.info.currentFormat$),g=$(e.info.currentVideoStream$),_=$(e.info.currentAudioStream$),v=$(e.info.duration$),y=$(e.info.isLive$),b=$(e.info.availableQualities$),x=$(e.info.availableQualitiesFps$),S=$(e.info.currentPlaybackRate$),C=$(e.info.atLiveEdge$),ee=$(e.info.atLiveDurationEdge$),te=$(e.info.playbackState$),ne=$(e.info.isBuffering$),re=$(e.info.currentBuffer$),ie=$(e.info.isEnded$),ae=$(e.info.autoQualityLimitingAvailable$),w=$(e.info.throughputEstimation$),T=$(e.info.videoBitrate$),oe=$(e.info.intrinsicVideoSize$),se=$(e.info.isAudioAvailable$),ce=$(e.info.availableSources$),E=Y(void 0),D=$(e.info.liveBufferTime$),O=$(e.info.volume$),le=$(e.info.muted$),ue=Y([]),k=Y(!1),de=$(e.info.availableVideoStreams$),A=$(e.info.position$),j=new Ys(Qs.UNKNOWN),fe=new Js,pe=new Js,me=$(e.info.isAutoQualityEnabled$,e=>e&&m.set(void 0)),he=Ka([m,$(e.info.currentQuality$,()=>m.set(void 0))],([e,t])=>e??t),ge=Ka(h,e=>e!==`MPEG`),_e=Ga(e.info.position$.getValue(),t=>{let n,r,i=()=>{let a=e.info.playbackState$.getValue(),o=e.info.isLive$.getValue(),s=e.info.duration$.getValue(),c=e.info.position$.getValue();if(a&&zs([Vs.PLAYING,Vs.PAUSED],a)){let n=o?c-s:e.getExactTime();n!==r&&t(n),r=n}n=Oc(i)};return i(),()=>Dc(n)}),ve=Ka([v,y],([e,t])=>t?-e:e),ye=Ka([_e,ve,E],([e,t,n],r)=>{r(Gs(n)?n*t:e)}),be=Ka([b,x,me,he,ge],([e,t,r,i,a])=>{let o=[];a&&o.push({value:`auto`,displayValue:n(`auto_quality_option`),selected:r});let s=e.filter(e=>!Ws(e));for(let e of s){let n=t[e];o.push({value:e,displayValue:`${e}${n?Zs(n):``}`,selected:r?!1:e===i})}return o}),xe=Ka([S,C,ee],([e,r,i])=>{let a=i?1:t.controls.playbackRateMin,o=r?1:t.controls.playbackRateMax,s=t.controls.playbackRateStep,c=[];for(let t=a;t<=o;t+=s)c.push({value:t,displayValue:t===1?n(`playback_rate_1`):n(`playback_rate`,{multiplier:t.toString(10)}),selected:e===t});return c}),Se=t.features.subtitles?$(e.info.availableTextTracks$):Ga([]),Ce=t.features.audioLanguages?$(e.info.availableAudioStreams$):Ga([]);Ce.subscribe(e=>{var t;p==null||(t=p.onAvailableAudioStreamsChanged)==null||t.call(p,e.map(({label:e=``,id:t=``,language:n=``})=>({label:e,language:n,id:t})))}),_.subscribe(e=>{var t;return e&&(p==null||(t=p.onAudioStreamChanged)==null?void 0:t.call(p,e.id))});let we=t.features.playbackRate?$(e.info.canChangePlaybackSpeed$):Ga(!1),Te=vs(e.info.predefinedQualityLimitType$.pipe(Ks(e=>e===Hs.TRAFFIC_SAVING)),e.info.predefinedQualityLimitType$.getValue()===Hs.TRAFFIC_SAVING),Ee=vs(e.info.predefinedQualityLimitType$.pipe(Ks(e=>e===Hs.HIGH_QUALITY)),e.info.predefinedQualityLimitType$.getValue()===Hs.HIGH_QUALITY),De=Ka([te,ne],([e,t])=>t?`buffering`:e),Oe=Ka([te],([e])=>e===Vs.PLAYING),ke=Ka([A,v],([e,t])=>isFinite(e)&&isFinite(t)&&!!t),Ae=Ka([re,ve,A,D],([e,t,n,r])=>{let i=e?.end??0;return r?(i-(-n+r-t))/t:i/t}),je=Ka([ce],([e])=>Object.keys(e?.MPEG||{}).length>0),Me=qs(e.events.fatalError$,e.events.managedError$).subscribe(e=>ue.update(t=>[...t,e])),Ne=Ga(!1,t=>{let n=e.events.fatalError$.subscribe(()=>t(!0));return()=>n.unsubscribe()}),Pe=t=>{a.log(`set looped`,{isLooped:t}),k.set(t),e.setLooped(t)};Pe(r);let Fe=Y(!1);i.add(e.events.loadedMetadata$.subscribe(()=>{Fe.set(!0)}));let Ie=(t,n,r=!0)=>{if(o({message:`seek to time, time: ${t}`}),a.log(`seek to time`,{time:t,action:n,forcePrecise:r}),j.next(n),e.info.isLive$.getValue()){let n=e.info.duration$.getValue(),i=Math.min(0,n+t);e.seekTime(i,r)}else{if(e.info.isEnded$.getValue()){var i;o({message:`seek after ended, call callbacks.onPlay`}),p==null||(i=p.onPlay)==null||i.call(p)}e.seekTime(t,r)}},Le=()=>{let t=X(s),n={playerPhase:t,isVideoEnded:!1,action:`none`};if(o({message:`toggle play`}),t===`ads`){n.action=`play`,a.log(`toggle adman play`,n),c.togglePlay();return}let r=()=>{var t;o({message:`toggle play, call player.play`}),l(),n.action=`play`,e.play(),p==null||(t=p.onPlay)==null||t.call(p)};e.info.isEnded$.getValue()?(o({message:`toggle play, video ended, seek to 0`}),fe.next(),j.next(Qs.REWIND),e.seekTime(0),r()):e.info.playbackState$.getValue()===Vs.PLAYING?(()=>{var t;o({message:`toggle play, call player.pause`}),n.action=`pause`,e.pause(),p==null||(t=p.onPause)==null||t.call(p)})():r(),a.log(`toggle play`,n)},Re=(t,{byUser:n=!1}={})=>{o({message:`set quality, quality: ${t}`}),a.log(`set quality`,{quality:t}),n&&pe.next(t),e.setAutoQuality(t===`auto`),dc(),t!==`auto`&&(uc(d,t),m.set(t),e.setQuality(t))},ze=t=>{o({message:`set trafficSavingEnabled, value: ${t}`}),a.log(`set traffic saving enabled`,{trafficSavingEnabled:t});let n=t?Hs.TRAFFIC_SAVING:Hs.UNKNOWN;e.setPredefinedQualityLimits(n)},Be=e=>{o({message:`set highQualityEnabled, value: ${e}`}),a.log(`set high quality enabled`,{highQualityEnabled:e}),Ve(e?Hs.HIGH_QUALITY:Hs.UNKNOWN)},Ve=t=>{e.setPredefinedQualityLimits(t)},He=(n,r=!0)=>{a.log(`set playback rate`,{playbackRate:n}),e.setPlaybackRate(n),t.features.saveRate&&u&&!e.info.isLive$.getValue()&&r&&xc(n)},Ue=()=>{let e=X(we),t=X(xe),n=t.findIndex(({selected:e})=>e);if(n===t.length-1||!e)return t[n];let r=t[n+1];return He(r.value),r},We=()=>{let e=X(we),t=X(xe),n=t.findIndex(({selected:e})=>e);if(n===0||!e)return t[n];let r=t[n-1];return He(r.value),r},Ge=(e,t,n=!1)=>{o({message:`seek to percent, percent: ${e}`}),a.log(`seek to percent`,{percent:e,action:t}),Ie(X(ve)*e,t,n)},Ke=t=>{o({message:`seek external, time: ${t}`}),a.log(`seek external`,{time:t}),j.next(Qs.UNKNOWN),e.seekTime(e.info.isLive$.getValue()?-t:t)},qe=t=>{let n=t.max??`none`,r=t.min??`none`;o({message:`set auto quality limitation. Max: ${n}. Min: ${r}`}),a.log(`set auto quality limits`,{max:n,min:r}),e.setAutoQualityLimits(t)},Je=t=>{o({message:`set playback rate to: ${t}`}),a.log(`set playback rate external`,{playbackRate:t}),e.setPlaybackRate(t)},Ye=e=>{o({message:`start scrubbing, progress: ${e}`}),a.log(`start scrubbing`,{progress:e}),Xe(e)},Xe=e=>{E.set(e)},Ze=()=>{E.set(void 0)},Qe=(e,t=!1)=>{o({message:`complete scrubbing, progress: ${e}`}),a.log(`complete scrubbing`,{progress:e}),Ge(e,Qs.SLIDER,t),Ze()},$e=t=>{j.next(Qs.LIVE),o({message:`live switch to low latency `+t}),a.log(`live switch to low latency `+t),e.setLiveLowLatency(t)},et=()=>{j.next(Qs.LIVE),o({message:`switch to active live`}),a.log(`switch to active live`),e.seekTime(0),e.info.playbackState$.getValue()!==Vs.PLAYING&&Le()},tt=t=>{t.language&&vc(t.language),e.setVideoStream(t)},nt=t=>{e.setAudioStream(t)};return{state:{positionExact$:_e,positionWithScrubbing$:ye,duration$:ve,playbackState$:te,playbackStateRealistic$:De,isPlaying$:Oe,bufferedProgress$:Ae,isLive$:y,canChangePlaybackSpeed$:we,isActiveLive$:C,isOldestAvailableLive$:ee,isRewindableLive$:ke,isEnded$:ie,muted$:le,volume$:O,trafficSavingEnabled$:Te,highQualityEnabled$:Ee,autoQualityLimitingAvailable$:ae,availableVideoStreams$:de,availableAudioStreams$:Ce,videoStream$:g,audioStream$:_,currentQuality$:he,isAutoQualityEnabled$:me,availableQualities$:be,currentPlaybackRate$:S,availablePlaybackRates$:xe,availableTextTracks$:Se,currentFormat$:h,throughputEstimation$:w,videoBitrate$:T,videoSize$:oe,errorLog$:ue,crashed$:Ne,isAudioAvailable$:se,isAudioDisabled:!!f,canDownload:!1,availableSources$:ce,hasMpegSources$:je,looped$:k,loadedMetadata$:Fe,isAutoQualityAvailable$:ge,scrubbingProgress$:E,isBuffering$:e.info.isBuffering$,pendingQuality$:m,actionSeek$:j,actionRewind$:fe,actionQuality$:pe},actions:{setLooped:Pe,seekToTime:Ie,seekExternal:Ke,setAutoQualityLimitsExternal:qe,seekToPercent:Ge,destroy:()=>{Me.unsubscribe()},setPlaybackRateExternal:Je,startScrubbing:Ye,completeScrubbing:Qe,setLiveLowLatency:$e,progressScrubbing:Xe,switchToActiveLive:et,incrementPlaybackRate:Ue,decrementPlaybackRate:We,setHighQualityEnabled:Be,setTrafficSavingEnabled:ze,togglePlay:Le,setPlaybackRate:He,setQuality:Re,setAudioStream:nt,externalChangeAudioStream:t=>{a.log(`change audio stream`,{id:t});let n=e.info.availableAudioStreams$.getValue().find(e=>e.id===t);n&&nt(n)},selectInitialStream:e=>{let n;if(e.length===1&&(n=Bs(e,0)),n??=e.find(e=>`isDefault`in e&&e.isDefault),t.features.userVideoPrefs&&d){let r=Ec(t.userSalt,String(d));r?.audioTrackId&&(n=e.find(e=>e.id===r.audioTrackId)??n)}let r=_c();return r&&(n??=e.find(({language:e})=>r===e)),n??=Bs(e,0),n},setVideoStream:tt}}}import{objectValues as Ac}from"@vkontakte/videoplayer-shared/es2015";import{arrayIncludes as jc}from"@vkontakte/videoplayer-shared/es2015";import{InterfaceLanguage as Mc,loadVKLangPack as Nc}from"@vkontakte/videoplayer-shared/es2015";function Pc({uiConfig:e,isCyrillicRelatedInterface:t,interfaceLanguage:n,uiStatistics:r}){let i=function(){var t=s(function*(t){let n=jc(Ac(Mc),t);if(e.downloadVKLanguages&&(n&&e.updateBuiltinLanguages||!ks(t))){let n;try{n=yield Nc(t,Fs,Is)}catch{var i;r==null||(i=r.oneStat)==null||i.logError({errorType:`VKLangPack`,fatal:!1})}n&&(Os({language:t,pack:n,fallback:e.defaultLanguage}),a.set(t),o.update(e=>e+1))}ks(t)&&a.set(t)});return function(e){return t.apply(this,arguments)}}(),a=Y(n),o=Y(0),c=Y(t);return i(n),{i18n:(t,n)=>As(X(a),t,n,e.defaultLanguage),isCyrillicRelatedInterface$:c,interfaceLanguage$:a,interfaceLanguageUpdated$:o,setLanguage:i}}import{objectEntries as Fc}from"@vkontakte/videoplayer-shared/es2015";import{getWindow as Ic,Subject as Lc}from"@vkontakte/videoplayer-shared/es2015";var Rc={ru:`Русский`,en:`English`,uk:`Українська`,be:`Беларуская (тарашкевiца)`,es:`Español`,fi:`Suomi`,de:`Deutsch`,it:`Italiano`,bg:`Български`,hr:`Hrvatski`,hu:`Magyar`,sr:`Српски`,pt:`Português`,el:`Ελληνικά`,pl:`Polski`,fr:`Français`,ko:`한국어`,"zh-CN":`汉语`,lt:`Lietuvių`,ja:`日本語`,cs:`Čeština`,et:`Eesti`,tt:`Татарча`,ba:`Башҡортса`,cv:`Чăвашла`,sk:`Slovenčina`,ro:`Română`,no:`Norsk`,lv:`Latviešu`,az:`Azərbaycan dili`,hy:`Հայերեն`,sv:`Svenska`,nl:`Nederlands`,tk:`Türkmen`,ka:`ქართული`,da:`Dansk`,uz:`O‘zbek`,th:`ภาษาไทย`,id:`Bahasa Indonesia`,tg:`Тоҷикӣ`,sl:`Slovenščina`,bs:`Bosanski`,"pt-BR":`Português brasileiro`,fa:`فارسی`,vi:`Tiếng Việt`,hi:`हिन्दी`,si:`සිංහල`,bn:`বাংলা`,tl:`Tagalog`,mn:`Монгол`,my:`ဗမာစာ`,tr:`Türkçe`,ne:`नेपाली`,ur:`اردو`,ky:`Кыргыз тили`,pa:`پنجابی`,os:`Ирон`,kn:`ಕನ್ನಡ`,sw:`Kiswahili`,kk:`Қазақша`,ar:`العربية`,he:`עברית`,ab:`Аҧсшәа`,eu:`Euskara`,eo:`Esperanto`},zc={abk:`as`,ara:`ar`,aze:`az`,bak:`ba`,bel:`be`,ben:`bn`,bos:`bs`,bul:`bg`,ces:`cs`,chv:`cv`,dan:`da`,deu:`de`,ell:`el`,eng:`en`,epo:`eo`,est:`et`,eus:`eu`,fas:`fa`,fin:`fi`,fra:`fr`,heb:`he`,hin:`hi`,hrv:`hr`,hun:`hu`,hye:`hy`,ind:`id`,ita:`it`,jpn:`ja`,kan:`kn`,kat:`ka`,kaz:`kk`,kir:`ky`,kor:`ko`,lav:`lv`,lit:`lt`,mon:`mn`,mya:`my`,nep:`ne`,nld:`nl`,nor:`no`,oss:`os`,pan:`pa`,pol:`pl`,por:`pt`,ron:`ro`,rus:`ru`,sin:`si`,slk:`sk`,slv:`sl`,spa:`es`,srp:`sr`,swa:`sw`,swe:`sv`,tat:`tt`,tgk:`tg`,tgl:`tl`,tha:`th`,tuk:`tk`,tur:`tr`,ukr:`uk`,urd:`ur`,uzb:`uz`,vie:`vi`},Bc=e=>Rc[e]??Rc[zc[e]]??void 0,Vc=`off`;class Hc{constructor(){e(this,`oneLineRegExp`,/\r\n|\n|\r/),e(this,`twoLinesRegExp`,/\r\n\r\n|\n\n|\r\r/)}parse(e,t){let n=[],r=e.split(this.twoLinesRegExp);for(let e of r){let r={startTime:0,endTime:0,texts:[],lang:t},i=e.split(this.oneLineRegExp);for(let e of i)if(!r.startTime&&!r.endTime){let{startTime:t,endTime:n}=new Uc().parse(e);r.startTime=t,r.endTime=n}else if(e.trim()!==``){let{texts:t}=new Wc().parse(e);r.texts=[...r.texts,...t]}(r.startTime||r.endTime)&&r.texts.length>0&&n.push(r)}return n}}class Uc{constructor(){e(this,`timeRegExp`,/(\d{2,})?:?(\d{2}):(\d{2}).(\d{2,3})/),e(this,`timingRegExp`,RegExp(`${this.timeRegExp.source}( ?--> ?)${this.timeRegExp.source}`))}parse(e){let t={startTime:0,endTime:0},n=this.timingRegExp.exec(e);return n&&(t.startTime=this.calcTime(n[1],n[2],n[3],n[4]),t.endTime=this.calcTime(n[6],n[7],n[8],n[9])),t}parseTime(e){let t=this.timeRegExp.exec(e);return t?this.calcTime(t[1],t[2],t[3],t[4]):0}isTime(e){return this.timeRegExp.test(e)}calcTime(e=`0`,t=`0`,n=`0`,r=`0`){let i=Number(e)*60*60,a=Number(t)*60,o=Number(n),s=Number(`0.${r}`);return i+a+o+s}}class Wc{constructor(){e(this,`letterTagRegExp`,/<[a-z]*>|<\/[a-z]*>/)}parse(e){let t={texts:[]},n=e.replace(new RegExp(this.letterTagRegExp,`g`),``).split({[Symbol.split](e){let t=0,n=[];for(;t<e.length;){let r=[`<`,`>`].reduce((n,r)=>{let i=e.indexOf(r,t);return n===-1||n>i?i:n},-1);if(r===-1){n.push(e.substring(t));break}n.push(e.substring(t,r)),t=r+1}return n}}),r=new Uc;for(let e of n)r.isTime(e)?t.texts.push({type:`timestamp`,value:r.parseTime(e)}):t.texts.push({type:`text`,value:e});return t}}var Gc=Hc;import{isNonNullable as Kc}from"@vkontakte/videoplayer-shared/es2015";var qc,Jc,Yc=0,Xc=!1,Zc=``,Qc=(e,t=0,n=0)=>e<t&&e<n,$c=(e,t=0,n=0)=>e>=t&&e<=n,el=(e,t=0,n=0)=>e>t&&e>n,tl=(e,t,n,r=!1)=>{let i=n.find(({id:e})=>e===t.value)?.subtitles;if(r)return i?.find(({startTime:t,endTime:n})=>$c(e,t,n));let a=e>=Yc,o=e<Yc;if(Yc=e,o&&(Xc=!1),Kc(qc)&&$c(e,qc.startTime,qc.endTime)&&Zc===t.value)return qc;if(!Kc(Jc)&&i?.length&&!Xc){Jc=i.find(({startTime:t,endTime:n})=>$c(e,t,n)||a&&Qc(e,t,n)),qc=void 0,!Kc(Jc)&&i[i.length-1].endTime<e&&(Xc=!0);return}else if($c(e,Jc?.startTime,Jc?.endTime))return qc=Jc,Jc=void 0,Zc=t.value,qc;else (a&&el(e,Jc?.startTime,Jc?.endTime)||o&&Qc(e,Jc?.startTime,Jc?.endTime))&&(Jc=void 0)},{setTimeout:nl,clearTimeout:rl}=Ic();function il({subscription:e,i18n:t,tracer:n,interfaceLanguageUpdated$:r,availableTextTracks$:i,player:a,interfaceLanguage$:s,positionExact$:c,currentPlaybackRate$:l,isPlaying$:u,videoElement:d,callbacks:f,uiStatistics:p,subtitlesForcedLanguage:m}){let h=new Lc,g=new Lc,_={available:[],prev:[]},v=xs(),y=new Ss,b=()=>a.experimental.getCurrentTime$.getValue()?.()??X(d)?.currentTime??0,x=()=>({displayValue:t(`subtitles_off`),value:Vc,language:``}),S=Y(x()),C=Ka([S,r],([e],t)=>{e.value===Vc?t(x()):t(e)}),ee=Ka([i,C],([e,t],n)=>{let r=[],i=e.find(({id:e})=>e===t.value);if(i?.url){let[,e]=v.find(i.url)??[];if(e){n(e);return}y.download(i.url).then(e=>{if(!e||y.isDestroyed())return;let a=new Gc,o=i.language;if(o){let t=!!i.isAuto,n=a.parse(e,o);r.push({lang:o,subtitles:n,isAuto:t,id:i.id})}v.add(i.url,r),X(C).value===t.value&&n(r)}).catch(()=>{var e;p==null||(e=p.oneStat)==null||e.logError({errorType:`Subtitles download`,fatal:!1})})}n(r)}),te=(e=o(o({},x()),{},{selected:!1}))=>{n.log(`set subtitles`,o({},e)),e.value!==Vc&&h.next(e.isAuto?e.value+`_auto`:e.value),g.next({enabled:e.value!==Vc,lang:e.language,auto:!!e.isAuto}),S.set(e)},ne=e=>{n.log(`toggle subtitles`),X(C)?.value===Vc?ae(e):T()},re=(e,t)=>{n.log(`change subtitle`,{enabled:e}),e?ae(!0,t):T()},ie=Ka([i,C],([e,n])=>{if(!e.length)return[];let r=[];for(let{language:i,isAuto:a,id:o}of e){let e=i&&Bc(i);i&&e&&r.push({displayValue:a?t(`subtitles_auto`,{language:e}):e,value:o,selected:n?.value===o,isAuto:a,language:i})}return r.length?(r.unshift(o(o({},x()),{},{selected:n?.value===Vc})),r):[]});e.add(a.info.availableTextTracks$.subscribe(e=>{var n;function r(){let n=[];for(let{language:r,isAuto:i,id:a}of e){let e=r&&Bc(r);r&&e&&n.push({id:a,language:r,title:i?t(`subtitles_auto`,{language:e}):e})}return n}f==null||(n=f.onAvailableSubtitlesChanged)==null||n.call(f,r())}));let ae=(e,t)=>{n.log(`subtitle on`);let r=X(ie),i=X(s),a=m??i,o;t&&(o=r.find(e=>e.value===t)),o??=r.filter(e=>e.value!==Vc).find(e=>e.language===a),te(o??r[1])},w=Ka([Ka([c,C,ee,Ka([l,u,C],([e,t,n],r)=>{let i;if(a.info.isLive$.getValue()&&t&&n.value!==Vc){let t=()=>{i=nl(t,1e3/(3*e)),r(Date.now())};return t(),()=>rl(i)}})],([e,t,n,r])=>{let i=a.info.isLive$.getValue();if(i&&_.prev!==n){let e=n.find(({id:e})=>e===t.value),r=_.prev.find(({id:e})=>e===t.value);e&&(_.available=[o(o({},e),{},{subtitles:[...r?.subtitles??[],...e.subtitles]})],_.prev=n)}if(t&&t.value!==Vc)return tl(i?b():e,t,i?_.available:n,i)})],([e])=>e?.texts?e.texts:[]);e.add(C.subscribe(e=>{if(e.value===Vc){var t;f==null||(t=f.onSubtitleOff)==null||t.call(f)}else{var n;let t=Fc(Rc).find(([t,n])=>n===e.displayValue);f==null||(n=f.onSubtitleOn)==null||n.call(f,t?t[0]:``,e.value)}}));let T=()=>{n.log(`subtitle off`),te(void 0)};return{state:{actionSetSubtitle$:h,actionSubtitlesSwitched$:g,availableSubtitlesList$:ie,currentSubtitleCaptions$:w},action:{subtitlesDestroy:()=>{y.destroy()},setSubtitle:te,toggleSubtitle:ne,externalChangeSubtitle:re}}}import{Observable as al}from"@vkontakte/videoplayer-shared/es2015";function ol({actionSeek$:e,actionRewind$:t,actionQuality$:n,actionSetSubtitle$:r,actionSubtitlesSwitched$:i,uiStore:a,player:o,admanWrapper:s,log:c,statAuthToken:l,uiStatistics:u}){let d={actionRewind$:t,actionSeek$:e,inFullscreen$:new al(e=>e.next(!0)),actionSetSubtitle$:r},f={actionSeek$:e,actionSubtitlesSwitched$:i,actionQuality$:n,inFullscreen$:new al(e=>e.next(!0)),isLoaderVisible$:new al(e=>a.state.isLoaderVisible.subscribe(t=>e.next(t)))};if(u){let{oneStat:e,thinOneStat:t,mediascopePixel:n,statSubscription:r}=u;e&&(r.add(e.attachTo(o)),r.add(e.attachToUi(d)),r.add(e.attachToAds(s.events)),e.authorize(l).catch(e=>{c({message:`onestat auth error ${String(e)}`})}),n&&n.attachTo(o)),t&&(r.add(t.attachTo(o,s.events)),r.add(t.attachToUi(f)),r.add(t.attachToAds(s.events)),t.updateContext({isMobile:!1}),t.authorize(l))}}import{objectValues as sl}from"@vkontakte/videoplayer-shared/es2015";import{objectEntries as cl}from"@vkontakte/videoplayer-shared/es2015";import{arrayIncludes as ll}from"@vkontakte/videoplayer-shared/es2015";var ul=e=>{let t=sl(Xs);return!!e&&cl(e).some(([e])=>ll(t,e))};import{AbortControllerPolyfilled as dl}from"@vkontakte/videoplayer-shared/es2015";import{ErrorCategory as fl,getMessageFromError as pl,getWindow as ml}from"@vkontakte/videoplayer-shared/es2015";var{setTimeout:hl,clearTimeout:gl}=ml(),_l=5e3,vl=e=>!!e?.live,yl=Symbol(`canceled`);function bl({video:e,initVideo:t,getLiveApi:n,nonErrorPlayerPhase:r,tracer:i,player:a,errorTracer:c}){let l=0,u=!1,d,f=()=>{},p=new dl,m=e.live.status;if(!n)throw Error(`You must specify the live API`);let h;try{h=n({onLiveStatusChange:S})}catch(e){throw c.error({id:`get-live-api-error:`+pl(e),category:fl.EXTERNAL_API,thrown:e,severity:`fatal`}),Error(`getLiveApi error`)}function g(e){return _.apply(this,arguments)}function _(){return _=s(function*(e,...t){try{return yield h[e](...t)}catch(t){if(t===yl)return;c.error({id:`live-api-call-`+e+`-error: `+pl(t),thrown:t,category:fl.EXTERNAL_API})}}),_.apply(this,arguments)}function v(){f()}let y=(...[e,t])=>{let n=e?t:`thumb`;i.log(`set live waiting`,{state:e,playerPhase:n,type:t}),r.set(n),e&&a.stop()},b=e=>{x()||(y(!1),t(o(o({},e),{},{autoplay:!0})))},x=()=>{let{info:e}=a;return e.canPlayLiveTailBuffer$.getValue()&&!e.isStalled$.getValue()&&!e.atLiveEdge$.getValue()};function S(e){return C.apply(this,arguments)}function C(){return C=s(function*(e){try{if(!e){d=void 0;return}switch(e){case`deleted`:case`failed`:case`no_video`:d=e;break;case`upcoming`:case`waiting`:yield ee(e);break;case`started`:yield te();break;case`finished`:case`postlive`:yield re(e);break;default:c.error({id:`handle-status-update-error-unexpected status`,category:fl.EXTERNAL_API,data:{liveStatus:e}})}}catch(t){c.error({id:`handle-status-update-error: `+pl(t),data:{liveStatus:e,curLiveStatus:d},category:fl.CALL_FROM_EXTERNAL,severity:`error`,thrown:t})}}),C.apply(this,arguments)}function ee(e){if(d!==e)if(d=e,se(),e===`upcoming`)y(!0,`LiveWaitingStart`);else{let e=!x();e&&y(!0,`LiveWaitingRecover`),f=()=>{e||y(!0,`LiveWaitingRecover`)}}}function te(){return ne.apply(this,arguments)}function ne(){return ne=s(function*(){if(!d||d===`started`){d=`started`;return}p.abort(yl),p=new dl;let e;if(e=yield g(`getVideo`,p.signal),!e)return;let t=e?.videos[0];vl(t)&&t.sources&&Object.keys(t.sources).length>0&&(d=`started`,b(e),u||(u=!0,ae()))}),ne.apply(this,arguments)}function re(e){return ie.apply(this,arguments)}function ie(){return ie=s(function*(e){if(se(),d===`postlive`)return;if(!d&&e===`postlive`){d=`postlive`;return}if(!d&&e===`finished`){y(!0,`LiveWaitingRecord`);return}let t=!x();t&&y(!0,`LiveWaitingRecord`),f=()=>{t||y(!0,`LiveWaitingRecord`)}}),ie.apply(this,arguments)}function ae(){l=hl(s(function*(){try{yield w(),ae()}catch(e){c.error({id:`heartbeat-timer-error: `+pl(e),category:fl.WTF,thrown:e,severity:`error`})}}),_l)}function w(){return T.apply(this,arguments)}function T(){return T=s(function*(){if(!p.signal.aborted){if(!(yield g(`shouldSendHeartbeat`))){ae();return}yield g(`sendLiveHeartBeat`,p.signal)}}),T.apply(this,arguments)}function oe(){l&&=(gl(l),0)}function se(){return ce.apply(this,arguments)}function ce(){return ce=s(function*(){oe(),u&&(u=!1,yield g(`stopLiveHeartBeat`))}),ce.apply(this,arguments)}function E(){gl(0),p.abort(yl),d=void 0,c.externalCallbackFuse(`live-api-destroy`,h.destroy.bind(h)),se()}return S(m),{actions:{onLiveEnded:v,destroy:E}}}function xl({subscription:e,videoElement:t,player:n,admanWrapper:r,actionSeek$:i,selectInitialStream:a,callbacks:s,onLiveEnded:c,errorTracer:l}){let u={},[d,f]=Cs(0),p=l.callbackWrapper({callbackName:`on-live-ended-in-subscription`})(c);e.add(n.info.duration$.subscribe(e=>{f(e)})).add(n.experimental.element$.subscribe(l.callbackWrapper({callbackName:`player-element`})(e=>{e&&(t.set(e),e.classList.add(`player-media`))})).add(n.events.ended$.subscribe(()=>{l.externalCallbackFuse(`onEnded`,s?.onEnded)})).add(n.events.looped$.subscribe(()=>{l.externalCallbackFuse(`onLooped`,s?.onLooped)})).add(n.events.started$.subscribe(l.callbackWrapper({callbackName:`started-in-subscription`})(()=>{let e=n.info.muted$.getValue();l.externalCallbackFuse(`onStarted`,s?.onStarted),u.onStarted?.call(u,e)})).add(n.events.willSeek$.subscribe(({from:e,to:t})=>{l.externalCallbackFuse(`onSeek`,s?.onSeek,e,t,i.getValue())})).add(n.events.autoplaySoundProhibited$.subscribe(()=>{l.externalCallbackFuse(`onAutoplaySoundProhibited`,s?.onAutoplaySoundProhibited)})).add(n.info.position$.subscribe(l.callbackWrapper({callbackName:`player.info.position$`})(e=>{let t=n.info.duration$.getValue();if(isFinite(t)&&t>0){var i;s==null||(i=s.onTimeupdate)==null||i.call(s,t,e),r.setPosition(e,t)}}))).add(n.events.fatalError$.subscribe(e=>{l.externalCallbackFuse(`onCrashedInSubscription`,s?.onCrashed,e?`${e.id}: ${e.message}`:void 0)})).add(n.events.fetcherRecoverableError$.subscribe(e=>{l.externalCallbackFuse(`onRecoverableError`,s?.onRecoverableError,e?`${e.id}: ${e.message}`:void 0)})).add(n.info.liveTime$.subscribe(e=>{l.externalCallbackFuse(`onLiveTime`,s?.onLiveTime,e)})).add(n.info.isStalled$.subscribe(e=>{l.externalCallbackFuse(`onStalledChanged`,s?.onStalledChanged,e)})).add(n.info.isLiveEnded$.subscribe(e=>{e&&(p(),l.externalCallbackFuse(`onLiveEnded`,s?.onLiveEnded))})).add(r.events.loadStarted$.subscribe(()=>{var e;return l.externalCallbackFuse(`adsOnLoadStarted`,s==null||(e=s.adsInfo)==null?void 0:e.onLoadStarted)})).add(r.events.loadEnded$.subscribe(()=>{var e;return l.externalCallbackFuse(`adsOnLoadEnded`,s==null||(e=s.adsInfo)==null?void 0:e.onLoadEnded)})).add(r.events.loadError$.subscribe(()=>{var e;return l.externalCallbackFuse(`adsOnLoadError`,s==null||(e=s.adsInfo)==null?void 0:e.onLoadError)})).add(r.events.init$.subscribe(()=>{var e;return l.externalCallbackFuse(`adsOnInit`,s==null||(e=s.adsInfo)==null?void 0:e.onInit)})).add(r.events.ready$.subscribe(()=>{var e;return l.externalCallbackFuse(`adsOnReady`,s==null||(e=s.adsInfo)==null?void 0:e.onReady)})).add(r.events.started$.subscribe(e=>{var t;return l.externalCallbackFuse(`adsOnStarted`,s==null||(t=s.adsInfo)==null?void 0:t.onStarted,e)})).add(r.events.timeRemained$.subscribe(e=>{var t;return l.externalCallbackFuse(`adsOnTimeRemained`,s==null||(t=s.adsInfo)==null?void 0:t.onTimeRemained,e)})).add(r.events.ended$.subscribe(e=>{var t;return l.externalCallbackFuse(`adsOnCompleted`,s==null||(t=s.adsInfo)==null?void 0:t.onCompleted,e.section)})).add(r.events.empty$.subscribe(()=>{var e;return l.externalCallbackFuse(`adsOnEmpty`,s==null||(e=s.adsInfo)==null?void 0:e.onEmpty)})).add(r.events.clicked$.subscribe(e=>{var t;return l.externalCallbackFuse(`adsOnClicked`,s==null||(t=s.adsInfo)==null?void 0:t.onClicked,e)})).add(r.events.closed$.subscribe(e=>{var t;return l.externalCallbackFuse(`adsOnClosed`,s==null||(t=s.adsInfo)==null?void 0:t.onClosed,e)})).add(r.events.error$.subscribe(e=>{var t;return l.externalCallbackFuse(`adsOnError`,s==null||(t=s.adsInfo)==null?void 0:t.onError,e)})).add(r.events.paused$.subscribe(()=>{var e;return l.externalCallbackFuse(`adsOnPaused`,s==null||(e=s.adsInfo)==null?void 0:e.onPaused)})).add(r.events.resumed$.subscribe(()=>{var e;return l.externalCallbackFuse(`adsOnResumed`,s==null||(e=s.adsInfo)==null?void 0:e.onResumed)}))));let m=!1;e.add(n.info.availableAudioStreams$.subscribe(l.callbackWrapper({callbackName:`player.info.availableAudioStreams$`})(e=>{if(!m&&e.length){let t=a(e);t&&(n.setAudioStream(t),m=!0)}})));let h=!1;return e.add(n.info.availableVideoStreams$.subscribe(l.callbackWrapper({callbackName:`player.info.availableVideoStreams$`})(e=>{if(!h&&e.length){let t=a(e);t&&(n.setVideoStream(t),h=!0)}}))),l.addSubscription(n.events.managedError$.subscribe(e=>{l.error(o(o({},e),{},{severity:`debug`}))})),l.addSubscription(n.events.fatalError$.subscribe(e=>{l.error(o(o({},e),{},{severity:`fatal`}))})),l.addSubscription(n.info.currentFormat$.subscribe(e=>{e&&l.updateContext({currentFormat:e})})),{state:{duration$:d},actions:{setUiCallbacks:e=>{u=o({},e)}}}}var Sl=({interfaceLanguage:e,isCyrillicRelatedInterface:t,videoId:n,isLiveCatchUpMode:r,statAuthToken:i,isAudioDisabled:a,callbacks:s,uiConfig:c,coreConfig:l,stopPlayer:u,looped:d=!1,statistics:f,saveRate:p,internalsExposure:m,playerId:h,metaConfig:g,app:_,video:v,deviceCapabilities:y,subtitlesForcedLanguage:b,getLiveApi:x,errorTracer:S})=>{let C=Y(void 0),{i18n:ee,isCyrillicRelatedInterface$:te,interfaceLanguage$:ne,interfaceLanguageUpdated$:re,setLanguage:ie}=Pc({uiConfig:c,interfaceLanguage:e,isCyrillicRelatedInterface:t,uiStatistics:f}),ae=o(o({},l),{},{isAudioDisabled:a,live:o(o({},l.live),{},{isLiveCatchUpMode:!!r})}),w=qo.createRootTracer(),T=w.createComponentTracer(`Store`),oe=new Ko,se=Y({}),ce=Y(null),E=new Go,D=E.createComponentLog(`Store`),O=new zo(ae,w,{playerId:h,onDevNullLog:s?.onDevNullLog}),le=Y(!1),ue=Y(!1),k=Y(`thumb`),de=Ka([le,k,ue],([e,t,n])=>e||n?`crashed`:t);de.subscribe(e=>{e===`crashed`&&Ye()});let A=new rs(E,{loadTimeout:c.ads.loadTimeout,initTimeout:c.ads.initTimeout,runtimeTimeout:c.ads.runtimeTimeout,useAdmanFromNPM:c.ads.useAdmanFromNPM,volumeMultiplier:c.ads.volumeMultiplier,isVsidOriginal:c.ads.isVsidOriginal}),j=kc({player:O,config:c,i18n:ee,looped:d,subscription:oe,tracer:T,log:D,playerPhase$:de,admanWrapper:A,onPlay:()=>{je.action.onPlay()},saveRate:p,videoId:n,isAudioDisabled:a,callbacks:s}),{state:{crashed$:fe,actionSeek$:pe,actionRewind$:me,actionQuality$:he,availableTextTracks$:ge,positionExact$:_e,currentPlaybackRate$:ve,isPlaying$:ye}}=j,be=()=>{},{state:{duration$:xe},actions:{setUiCallbacks:Se}}=xl({subscription:oe,videoElement:ce,player:O,admanWrapper:A,actionSeek$:pe,selectInitialStream:j.actions.selectInitialStream,callbacks:s,errorTracer:S,onLiveEnded:S.callbackWrapper({callbackName:`onLiveEndedInStore`,category:Uo.UI})(()=>be())}),{state:{actionSetSubtitle$:Ce,actionSubtitlesSwitched$:we,availableSubtitlesList$:Te,currentSubtitleCaptions$:Ee},action:{subtitlesDestroy:De,setSubtitle:Oe,toggleSubtitle:ke,externalChangeSubtitle:Ae}}=il({subscription:oe,i18n:ee,tracer:T,interfaceLanguageUpdated$:re,availableTextTracks$:ge,player:O,interfaceLanguage$:ne,positionExact$:_e,currentPlaybackRate$:ve,isPlaying$:ye,videoElement:ce,callbacks:s,uiStatistics:f,subtitlesForcedLanguage:b}),je=Rs({uiConfig:c,duration$:xe});fe.subscribe(e=>le.set(e)),m?.expose({corePlayer:O});let Me=f&&f.oneStat?$(f.oneStat.vsid$):Ga(void 0);ol({actionSeek$:pe,actionRewind$:me,actionQuality$:he,actionSetSubtitle$:Ce,actionSubtitlesSwitched$:we,uiStore:je,player:O,admanWrapper:A,log:D,statAuthToken:i,uiStatistics:f}),k.subscribe(e=>{e===`ads`&&O.info.playbackState$.getValue()&&Pe()});let Ne=Y(),Pe=()=>{Ne.set({muted:O.info.muted$.getValue()})};T.log(`create store`),D({message:`create store`});let Fe=e=>{wc(e),gc()&&j.actions.setTrafficSavingEnabled(!0),y.maxQuality!==Bo.INVARIANT&&O.setAutoQualityLimits({max:y.maxQuality});let t=fc(e);if(t&&t!==Bo.INVARIANT&&y.isCodecSupported(t)){j.actions.setQuality(t);return}},Ie=!1,Le=()=>{};function Re(e,t=void 0){try{if(t&&C.set(t),!X(C))throw Error(`video container empty`);let{videos:[{sources:n,subtitles:r,subtitlesForcedLanguage:i,unitedVideoId:a}],failoverHosts:o,volumeMultiplier:s,fromTime:l=0,autoplay:u=!1,preload:d,saveRate:f}=e;if(ul(n)&&(O.initVideo({container:X(C),sources:n,failoverHosts:o,volumeMultiplier:s}),T.log(`init video`),r&&O.setExternalTextTracks(r),se.set({container:X(C),sources:n,failoverHosts:o,volumeMultiplier:s,subtitles:r,subtitlesForcedLanguage:i})),l>0&&j.actions.seekExternal(l),A.setInitialVolume(1),Fe(a),c.features.saveRate&&f){let e=Sc();e&&n&&j.actions.setPlaybackRate(e)}je.state.isAutoplay.set(u),d&&c.features.preload&&O.prepare(),u&&Je(!1,!1);let p=e.videos[0];if(p?.live&&!Ie){let e=bl({video:p,initVideo:Re,nonErrorPlayerPhase:k,tracer:T,player:O,getLiveApi:x,errorTracer:S});Le=e.actions.destroy,be=e.actions.onLiveEnded,Ie=!0}}catch(t){ue.set(!0),S.error({id:`init video error: `+Wo(t),data:{liveInitiated:Ie,newVideoConfig:e,uiConfig:c},thrown:t,category:Uo.FATAL,severity:`fatal`}),S.externalCallbackFuse(`onCrashed`,s?.onCrashed,String(t))}}let ze=()=>{T.log(`skip adman`),A.skip()},Be=(e=!0)=>{Vo(Xe),D({message:`switch from ads to video, callPlay: ${e}`}),T.log(`switch from ads to video`,{callPlay:e}),k.set(`video`),e&&O.play(),Ne.set(void 0)},Ve=()=>{Vo(Xe),D({message:`switch from video to ads`}),T.log(`switch from video to ads`),Xe.actions.internal.pause(),k.set(`ads`)},He=()=>(Vo(Xe),T.log(`get debug text data`),ys(O,X(se),Xe,w.getTraceId(),g)),Ue=()=>(Vo(Xe),bs(O,X(se),Xe)),We=()=>X(ce),Ge=e=>{var t;if(Vo(Xe),O.info.isEnded$.getValue())return;let n=!e;if(X(Xe.playerPhase)===`ads`){D({message:`pause ads, internalCall: ${n}`}),T.log(`pause ads`,{internalCall:n}),A.pause();return}D({message:`pause video, internalCall: ${n}`}),T.log(`pause video`,{internalCall:n}),n&&(s==null||(t=s.onPause)==null||t.call(s)),O.pause()},Ke=e=>{var t;Vo(Xe);let n=!e;if(X(Xe.playerPhase)===`ads`){D({message:`play ads, internalCall: ${n}`}),T.log(`play ads`,{internalCall:n}),A.play();return}D({message:`play video, internalCall: ${n}`}),T.log(`play video`,{internalCall:n}),n&&(s==null||(t=s.onPlay)==null||t.call(s)),O.play()},qe=e=>{Vo(Xe);let t=!e;if(X(Xe.playerPhase)===`ads`){D({message:`player cannot be stopped during ads via external method`});return}D({message:`player will be stopped, internalCall: ${t}`}),u?.()},Je=(e,t)=>{Vo(Xe),D({message:`first start, show ads: ${e}, internalCall: ${!t}`}),T.log(`first start`,{showAds:e,external:t}),e?k.set(`ads`):(k.set(`video`),O.play())},Ye=()=>{T.log(`destroy store`),Le(),oe.unsubscribe(),O.destroy(),A.destroy(),f?.destroy(),j.actions.destroy(),De()},Xe={interfaceLanguage$:ne,isCyrillicRelatedInterface$:te,initVideo:Re,videoId:n,playerPhase:de,vsid:Me,i18n:ee,app:_,video:Ho(v),playerState:j.state,ui:je.state,subtitles:{availableSubtitlesList$:Te,currentSubtitleCaptions$:Ee},ads:{position:Y(0),duration:Y(0),playbackState:Y(`inactive`),canSkip:Y(!1),secondsToWatchBeforeSkip:Y(0),postrollPassed:Y(!1)},actions:{internal:{firstStart:e=>Je(e,!1),play:()=>Ke(!1),pause:()=>Ge(!1),togglePlay:j.actions.togglePlay,onUserInput:je.action.onUserInput,setSettingsVisibility:je.action.setSettingsVisibility,clearShowByInput:je.action.clearShowByInput,onBackButton:je.action.onBackButton,setVideoStream:j.actions.setVideoStream,setAudioStream:j.actions.setAudioStream,setQuality:j.actions.setQuality,setTrafficSavingEnabled:j.actions.setTrafficSavingEnabled,setHighQualityEnabled:j.actions.setHighQualityEnabled,setPlaybackRate:j.actions.setPlaybackRate,incrementPlaybackRate:j.actions.incrementPlaybackRate,decrementPlaybackRate:j.actions.decrementPlaybackRate,setSubtitle:e=>Oe(e),toggleSubtitle:()=>ke(!1),startScrubbing:j.actions.startScrubbing,progressScrubbing:j.actions.progressScrubbing,completeScrubbing:j.actions.completeScrubbing,switchToActiveLive:j.actions.switchToActiveLive,switchFromAdsToVideo:Be,switchFromVideoToAds:Ve,skipAd:ze,getDebugTextData:He,getDebugPanelData:Ue,getVideoElement:We,seekTime:j.actions.seekToTime,clearDelayedBufferingCheckTimeout:je.action.clearDelayedBufferingCheckTimeout,seekToPercent:j.actions.seekToPercent,addLanguage:Os,setLanguage:ie,setLooped:j.actions.setLooped,onShowedControls:je.action.onShowedControls},external:{firstStart:e=>Je(e,!0),play:()=>Ke(!0),pause:()=>Ge(!0),stop:()=>qe(!0),seekTime:j.actions.seekExternal,setPlaybackRate:j.actions.setPlaybackRateExternal,setAutoQualityLimits:j.actions.setAutoQualityLimitsExternal,toggleSubtitle:()=>ke(!0),changeSubtitle:Ae,setLiveLowLatency:j.actions.setLiveLowLatency,setQuality:j.actions.setQuality,setTrafficSavingEnabled:j.actions.setTrafficSavingEnabled,setHighQualityEnabled:j.actions.setHighQualityEnabled,changeAudioStream:j.actions.externalChangeAudioStream}},callbacks:s,setUiCallbacks:Se,getAdmanWrapper:()=>A,getLogger:()=>E,getPlayer:()=>O,deviceCapabilities:y,destroy:Ye};return je.resolveDependency(Xe),Xe};import{ErrorCategory as Cl,getMessageFromError as wl,getWindow as Tl}from"@vkontakte/videoplayer-shared/es2015";class El{constructor(t){e(this,`value`,void 0),e(this,`next`,void 0),this.value=t,this.next=null}}class Dl{constructor(t){e(this,`top`,void 0),e(this,`bottom`,void 0),e(this,`size`,void 0),e(this,`maxSize`,void 0),this.top=null,this.bottom=null,this.size=0,this.maxSize=t}push(e){let t=new El(e);this.top?(this.top.next=t,this.top=t):(this.top=t,this.bottom=t),this.size++,this.size>this.maxSize&&this.bottom&&(this.bottom=this.bottom.next)}getValuesFromBottom(){let e=[],t=this.bottom;for(;t;)e.push(t.value),t=t.next;return e}}var Ol=G(`<div class="container s-b"><canvas class="s-b"></canvas></div>`),kl={hash:`s-b`,code:`.container.s-b{display:inline-block;height:16px;width:120px}canvas.s-b{margin-top:2px;transform:scaleY(-1)}`};function Al(e,t){Et(t,!0),ga(e,kl);let n=Qa(t,`values`,19,()=>[]),r=L(void 0),i=L(null);$a(()=>{W(r).width=120,W(r).height=16,R(i,W(r).getContext(`2d`),!0)});function a(e,t,n,r,i){i===0&&(i=1),e.fillStyle=`#fff`,e.fillRect(t,n,r,i)}Pr(()=>{let e=``;if(W(i)){let t=n()[0];for(let e=1;e<n().length;e++)n()[e]>t&&(t=n()[e]);W(i).clearRect(0,0,120,16);let r=59;for(let o=n().length-1;o>=0;o--){let s=r*2,c=t>0?16*(n()[o]/t):0;a(W(i),s,0,2,c),e=c+` `+e,r--}}});var o=Ol();Ha(z(o),e=>R(r,e),()=>W(r)),P(o),K(e,o),Dt()}import{safeStorage as jl}from"@vkontakte/videoplayer-shared/es2015";var Ml=G(`<div class="s-3"><div class="s-3">Video id</div> <span> </span></div>`),Nl=G(`<div class="s-3"><div class="s-3">VSID</div> <span> </span></div>`),Pl=G(`<div class="s-3"><div class="s-3">Provider</div> <span> </span></div>`),Fl=G(`<div class="s-3"><div class="s-3">Streams</div> <span> </span></div>`),Il=G(`<div class="s-3"><div class="s-3">Viewport</div> <span> </span></div>`),Ll=G(`<div class="s-3"><div class="s-3">Video size</div> <span> </span></div>`),Rl=G(`<div class="s-3"><div class="s-3">CDN host</div> <span> </span></div>`),zl=G(`<div class="s-3"><div class="s-3">Volume</div> <span> </span></div>`),Bl=G(`<div class="s-3"><div class="s-3">Position</div> <span> </span></div>`),Vl=G(`<div class="s-3"><div class="s-3">Buffer</div> <span> </span></div>`),Hl=G(`<div class="s-3"><div class="s-3">Nbuffer</div> <span> </span></div>`),Ul=G(`<div class="s-3"><div class="s-3">Live latency</div> <span> </span></div>`),Wl=G(`<div class="s-3"><div class="s-3">Segment</div> <span> </span></div>`),Gl=G(`<div class="s-3"><div class="s-3">Network</div> <!> <span> </span></div>`),Kl=G(`<div class="s-3"><div class="s-3">V bitrate</div> <!> <span> </span></div>`),ql=G(`<div class="container s-3" role="region"><button class="close s-3" title="закрыть">[x]</button> <div class="content s-3"><div class="s-3"><div class="s-3">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-3"><div class="s-3">Dropped</div> <span> </span></div> <!> <!> <div class="s-3"><div class="s-3">FPS</div> <!> <span> </span></div></div></div>`),Jl={hash:`s-3`,code:`.container.s-3{background:rgba(28,28,28,.8);border-radius:4px;font-size:10px;left:20px;min-width:160px;text-align:left;top:45px;user-select:text;z-index:var(--debug-panel-z-index)}.container.s-3,button.close.s-3{color:#fff;position:absolute}button.close.s-3{background-color:transparent;border:none;cursor:pointer;outline:0;padding:0;right:5px;top:3px}.content.s-3{padding:5px}.content.s-3>div:where(.s-3)>div:where(.s-3){display:inline-block;padding:0 5px;text-align:right;width:60px}`};function Yl(e,t){Et(t,!0),ga(e,Jl);let n=_s(),r=n.ui.debugPanelVisible,i=e=>{e.stopPropagation(),jl.remove(Ps),r.set(!1)},a=L(mr(n.actions.internal.getDebugPanelData())),o=n.actions.internal.getVideoElement(),s=L(0),c=L(0),l=L(0),u=new Dl(60),d=new Dl(60),f=new Dl(60),p=L(mr([])),m=L(mr([])),h=L(mr([])),g=js(`aria_label_debug_panel`);$a(()=>{jl.set(Ps,`true`),o&&(R(c,o.getVideoPlaybackQuality().droppedVideoFrames,!0),R(s,o.getVideoPlaybackQuality().totalVideoFrames,!0));let e=window.setInterval(()=>{R(a,n.actions.internal.getDebugPanelData(),!0)},500),t;return o&&(t=window.setInterval(()=>{if(o){R(c,o.getVideoPlaybackQuality().droppedVideoFrames,!0);let e=o.getVideoPlaybackQuality().totalVideoFrames;R(l,e-W(s)),R(s,e,!0),u.push(W(l)),W(a).speed&&d.push(W(a).speed),W(a).bitrate&&f.push(W(a).bitrate),R(p,u.getValuesFromBottom(),!0),R(m,d.getValuesFromBottom(),!0),R(h,f.getValuesFromBottom(),!0)}},1e3)),()=>{clearInterval(e),t&&clearInterval(t)}});var _=ql(),v=z(_),y=B(v,2),b=z(y),x=B(z(b),2),S=z(x,!0);P(x),P(b);var C=B(b,2),ee=e=>{var t=Ml(),n=B(z(t),2),r=z(n,!0);P(n),P(t),V(()=>q(r,W(a).id)),K(e,t)};J(C,e=>{W(a).id&&e(ee)});var te=B(C,2),ne=e=>{var t=Nl(),n=B(z(t),2),r=z(n,!0);P(n),P(t),V(()=>q(r,W(a).vsid)),K(e,t)};J(te,e=>{W(a).vsid&&e(ne)});var re=B(te,2),ie=e=>{var t=Pl(),n=B(z(t),2),r=z(n,!0);P(n),P(t),V(()=>q(r,W(a).provider)),K(e,t)};J(re,e=>{W(a).provider&&e(ie)});var ae=B(re,2),w=e=>{var t=Fl(),n=B(z(t),2),r=z(n);P(n),P(t),V(()=>q(r,`Video: ${(W(a).videoCodec||``)??``} ${W(a).hdr?`(HDR)`:``}
61
18
  &
62
- Audio: ${(U(a).audioCodec||``)??``} ${U(a).audioLanguage?`(${U(a).audioLanguage})`:``}`)),G(e,t)};q(ae,e=>{(U(a).videoCodec||U(a).audioCodec)&&e(oe)});var w=z(ae,2),se=e=>{var t=Eu(),n=z(R(t),2),r=R(n,!0);N(n),N(t),B(()=>K(r,U(a).viewport)),G(e,t)};q(w,e=>{U(a).viewport&&e(se)});var ce=z(w,2),le=e=>{var t=Du(),n=z(R(t),2),r=R(n,!0);N(n),N(t),B(()=>K(r,U(a).videoSize)),G(e,t)};q(ce,e=>{U(a).videoSize&&e(le)});var ue=z(ce,2),T=e=>{var t=Ou(),n=z(R(t),2),r=R(n,!0);N(n),N(t),B(()=>K(r,U(a).cdn)),G(e,t)};q(ue,e=>{U(a).cdn&&e(T)});var E=z(ue,2),de=e=>{var t=ku(),n=z(R(t),2),r=R(n);N(n),N(t),B(()=>K(r,`${U(a).volume??``} %`)),G(e,t)};q(E,e=>{U(a).volume&&e(de)});var fe=z(E,2),D=e=>{var t=Au(),n=z(R(t),2),r=R(n);N(n),N(t),B(e=>K(r,`${e??``} s`),[()=>U(a).position.toFixed(2)]),G(e,t)};q(fe,e=>{U(a).position&&e(D)});var O=z(fe,2),k=e=>{var t=ju(),n=z(R(t),2),r=R(n);N(n),N(t),B(e=>K(r,`${e??``} s`),[()=>U(a).buffer.toFixed(2)]),G(e,t)};q(O,e=>{U(a).buffer&&e(k)});var A=z(O,2),pe=e=>{var t=Mu(),n=z(R(t),2),r=R(n);N(n),N(t),B(e=>K(r,`${e??``} s`),[()=>U(a).nativeBuffer.toFixed(2)]),G(e,t)};q(A,e=>{U(a).nativeBuffer&&e(pe)});var me=z(A,2),he=e=>{var t=Nu(),n=z(R(t),2),r=R(n);N(n),N(t),B(e=>K(r,`${e??``} s`),[()=>U(a).liveLatency.toFixed(2)]),G(e,t)};q(me,e=>{U(a).liveLatency&&e(he)});var ge=z(me,2),_e=e=>{var t=Pu(),n=z(R(t),2),r=R(n,!0);N(n),N(t),B(e=>K(r,e),[()=>[{value:U(a).currentVideoSegmentLength,title:`Video:`},{value:U(a).currentAudioSegmentLength,title:`Audio:`}].filter(({value:e})=>e).map(({value:e,title:t})=>`${t} ${((e??0)/1e3).toFixed(2)} s`).join(` & `)]),G(e,t)};q(ge,e=>{(U(a).currentVideoSegmentLength||U(a).currentAudioSegmentLength)&&e(_e)});var ve=z(ge,2),ye=z(R(ve),2),be=R(ye);N(ye),N(ve);var xe=z(ve,2),Se=e=>{var t=Fu(),n=z(R(t),2);bu(n,{get values(){return U(m)}});var r=z(n,2),i=R(r);N(r),N(t),B(e=>K(i,`${e??``} Kbps`),[()=>U(a).speed.toFixed(2)]),G(e,t)};q(xe,e=>{U(a).speed&&e(Se)});var Ce=z(xe,2),we=e=>{var t=Iu(),n=z(R(t),2);bu(n,{get values(){return U(h)}});var r=z(n,2),i=R(r);N(r),N(t),B(e=>K(i,`${e??``} Kbps`),[()=>U(a).bitrate.toFixed(2)]),G(e,t)};q(Ce,e=>{U(a).bitrate&&e(we)});var Te=z(Ce,2),Ee=z(R(Te),2);bu(Ee,{get values(){return U(p)}});var De=z(Ee,2),Oe=R(De,!0);N(De),N(Te),N(y),N(_),B(()=>{yo(_,`aria-label`,g),K(S,U(a).version),K(be,`${U(c)??``} / ${U(s)??``} frames`),K(Oe,U(l))}),ya(`click`,v,i),G(e,_),Qt()}ba([`click`]);var Bu=W(`<div><div class="video-container s-5"></div></div>`),Vu={hash:`s-5`,code:`.video-container.s-5,.video-wrapper.s-5{height:100%;left:0;position:absolute;top:0;width:100%}.video-wrapper.s-5{background:var(--black)}.video-container.s-5,.video-wrapper.s-5{z-index:var(--video-container-z-index)}.video-container.s-5{transition:var(--rotate-transition-duration) ease all}`};function Hu(e,t){Zt(t,!0),ro(e,Vu);let n=()=>X(o,`$playerPhase`,r),[r,i]=Vo(),a=Uo(t,`videoContainer`,15),{playerPhase:o}=sc();var s=Bu();let c;Po(R(s),e=>a(e),()=>a()),N(s),B(()=>c=po(s,1,`video-wrapper s-5`,null,c,{hidden:n()!==`video`})),G(e,s),Qt(),i()}var Uu=e=>`width:${e}rem;height:${e}rem;`;import{getWindow as Wu}from"@vkontakte/videoplayer-shared/es2015";class Gu{constructor(){e(this,`onKeyDown`,e=>{let t=Wu().document.activeElement;if(!t)return console.warn(`no active element`),!1;let{row:n,col:r,layer:i}=t.dataset;if(!n||!r||!i)return console.warn(`no col or row or layer`),!1;let a=!1;switch(e.key){case`ArrowDown`:a=this.moveFocusVertical(Number(n)+1,r,i);break;case`ArrowUp`:a=this.moveFocusVertical(Number(n)-1,r,i);break;case`ArrowLeft`:a=this.moveFocusHorizontal(Number(r)-1,n,i);break;case`ArrowRight`:a=this.moveFocusHorizontal(Number(r)+1,n,i);break}return a&&(e.preventDefault(),e.stopPropagation()),a})}unmountedElement(e,t,n,r){r&&(this.moveFocusHorizontal(Number(e)-1,t.toString(),n)||this.moveFocusHorizontal(Number(e)+1,t.toString(),n)||this.moveFocusVertical(Number(e)-1,t.toString(),n)||this.moveFocusVertical(Number(e)+1,t.toString(),n)||Wu().document.querySelector(`[data-layer=${n}][data-default]`)?.focus())}moveFocusVertical(e,t,n){let r=Wu().document.querySelectorAll(`[data-row="${e}"][data-layer="${n}"]`);if(r.length===0)return!1;let i;for(let e=0;e<r.length;e++){let n=r[e];if(n.dataset.col===t)return n.focus(),!0;n.dataset.col===`1`&&(i=n)}return i?i.focus():r[0].focus(),!0}moveFocusHorizontal(e,t,n){let r=Wu().document.querySelectorAll(`[data-col="${e}"][data-layer="${n}"]`);if(r.length===0)return!1;let i;for(let e=0;e<r.length;e++){let n=r[e];if(n.dataset.row===t)return n.focus(),!0;n.dataset.row===`1`&&(i=n)}return i?i.focus():r[0].focus(),!0}}e(Gu,`CONTEXT_KEY`,`focusManager`);var Ku=W(`<button><!></button>`),qu={hash:`s-d`,code:`.button.s-d{align-items:center;background:hsla(0,0%,100%,.15);border:0;border-radius:50%;color:#fff;display:inline-block;font-size:inherit;justify-content:center;padding:0}.button.s-d:focus{background:#fff;color:#000;outline:0}.button.s-d:hover:not(:focus){background-color:#76787a}`};function Ju(e,t){Zt(t,!0),ro(e,qu);let n=Uo(t,`ref`,15),r=Uo(t,`defaultInLayer`,3,!1),i=Uo(t,`autofocus`,3,!1),a=I(!1),o=()=>{L(a,!0)},s=()=>{L(a,!1)},c=F(()=>Uu(Number(t.size||`14`)*2)),l=e=>{e.preventDefault(),e.stopPropagation(),t.onclick?.call(t)},u=Yt(Gu.CONTEXT_KEY);Wo(()=>(i()&&n().focus(),()=>{u.focusManager.unmountedElement(t.col,t.row,t.layer,U(a))}));var d=Ku();no(R(d),()=>t.children),N(d),Po(d,e=>n(e),()=>n()),B(()=>{po(d,1,oo([`button`,t.class]),`s-d`),ho(d,U(c)),yo(d,`data-row`,t.row),yo(d,`data-col`,t.col),yo(d,`data-layer`,t.layer),yo(d,`data-default`,r())}),ya(`click`,d,l),va(`focus`,d,o),va(`blur`,d,s),G(e,d),Qt()}ba([`click`]);import{SeekAction as Yu}from"@vkontakte/videoplayer-statistics/es2015";import{stringPadStart as Xu}from"@vkontakte/videoplayer-shared/es2015";var Zu=e=>{let t=Math.abs(Math.round(e)),n=Math.floor(t/3600),r=t%3600,i=Math.floor(r/60),a=r%60;return`${e<0?`-`:``}${n?Xu(String(n),2,`0`)+`:`:``}${Xu(String(i),2,`0`)}:${Xu(String(a),2,`0`)}`},Qu=W(`<div> </div>`),$u={hash:`s-i`,code:`.video-time.s-i{color:#fff;line-height:125%}`};function ed(e,t){Zt(t,!0),ro(e,$u);let n=F(()=>Zu(t.current)+(t.duration?` / ${Zu(t.duration)}`:``)),r=F(()=>`font-size: ${t.size||10}rem`);var i=Qu(),a=R(i,!0);N(i),B(()=>{ho(i,U(r)),po(i,1,oo([`video-time`,t.class]),`s-i`),K(a,U(n))}),G(e,i),Qt()}var td=W(`<div class="pointer-time-wrapper s-f"><!></div>`),nd=W(`<div><div class="time-wrapper s-f"><!></div> <div class="current-progress s-f"></div> <div class="pointer s-f"><!></div></div>`),rd={hash:`s-f`,code:`.progress-bar.s-f{background:hsla(0,0%,100%,.15);border-radius:2rem;font-size:inherit;height:4rem;position:relative;width:100%}.current-progress.s-f{background-color:#fff;border-radius:inherit;height:100%;left:0;position:absolute;top:0}.is-live-now.s-f .current-progress:where(.s-f){background:#ff5c5c}.pointer.s-f{background:#fff;border-radius:50%;display:none;height:7rem;position:absolute;top:50%;transform:translate(-50%,-50%);width:7rem;will-change:transform}.time-wrapper.s-f{position:absolute;right:0;top:0;transform:translateY(calc(-100% - 20rem))}.pointer-time-wrapper.s-f{bottom:0;left:50%;position:absolute;transform:translate(-50%,calc(100% + 5rem))}.progress-bar.s-f:focus{outline:0}.progress-bar.s-f:focus .pointer:where(.s-f){display:block}.button.s-f:hover:not(:focus){background-color:#76787a}.disabled.s-f{visibility:hidden}`};function id(e,t){Zt(t,!0),ro(e,rd);let n=()=>X(g,`$duration$`,c),r=()=>X(p,`$showUiWithRewind`,c),i=()=>X(S,`$positionPercent$`,c),a=()=>X(h,`$positionExact$`,c),o=()=>X(_,`$isLive$`,c),s=()=>X(m,`$canRewind$`,c),[c,l]=Vo(),{actions:{internal:{seekTime:u,pause:d,play:f}},ui:{showUiWithRewind:p,canRewind$:m},playerState:{positionExact$:h,duration$:g,isLive$:_}}=sc(),v=10/n(),y=I(void 0),b=I(qr(NaN)),x=F(()=>isFinite(U(b))),S=Ro([h,g],([e,t])=>t>0?e/t:0),C=e=>{U(y)&&(e.preventDefault(),e.stopPropagation(),u(n()*e.offsetX/U(y).offsetWidth,Yu.SLIDER))};Wo(()=>{r()&&U(y)?.focus()});let ee=()=>{U(x)||(L(b,i(),!0),d())},te=e=>{switch(e.key){case`ArrowLeft`:e.stopPropagation(),ee(),L(b,Math.max(0,U(b)-v),!0);break;case`ArrowRight`:e.stopPropagation(),ee(),L(b,Math.min(1,U(b)+v),!0);break;case`ArrowDown`:case`ArrowUp`:L(b,NaN,!0);break;case`Enter`:e.preventDefault(),u(Y(g)*U(b),Yu.SLIDER),f(),L(b,NaN,!0);break;case`Escape`:U(x)&&(e.stopPropagation(),f(),L(b,NaN,!0));break}},ne=F(()=>Number(U(x)?U(b):i())),re=F(()=>`width: ${U(ne)*100}%`),ie=F(()=>`left: ${U(ne)*100}%`),ae=F(()=>a()-(o()?n():0)),oe=F(()=>U(x)?U(b)*n()-(o()?n():0):0);var w=nd(),se=R(w),ce=R(se),le=e=>{{let t=F(()=>o()?0:n());ed(e,{get size(){return`10`},get current(){return U(ae)},get duration(){return U(t)}})}};q(ce,e=>{o()||e(le)}),N(se);var ue=z(se,2),T=z(ue,2),E=R(T),de=e=>{var t=td();ed(R(t),{get size(){return`8`},get current(){return U(oe)}}),N(t),G(e,t)};q(E,e=>{U(oe)&&e(de)}),N(T),N(w),Po(w,e=>L(y,e),()=>U(y)),B(()=>{yo(w,`tabindex`,s()?0:void 0),po(w,1,oo([`progress-bar`,t.class,o()&&U(ne)===1&&`is-live-now`,!s()&&`disabled`]),`s-f`),yo(w,`data-row`,t.row),yo(w,`data-col`,t.col),yo(w,`data-layer`,t.layer),ho(ue,U(re)),ho(T,U(ie))}),ya(`keydown`,w,te),ya(`click`,w,C),G(e,w),Qt(),l()}ba([`keydown`,`click`]);var ad=Oa(`<path d="m14.4 8.76 24.02 13.85a1.6 1.6 0 0 1 0 2.78L14.4 39.24a1.6 1.6 0 0 1-2.4-1.39v-27.7a1.6 1.6 0 0 1 2.4-1.39"></path>`);function od(e,t){Zt(t,!0);let n=F(()=>Uu(t.size));fs(e,{width:`48`,height:`48`,fill:`currentColor`,get style(){return U(n)},testId:`play-icon`,get shadow(){return t.shadow},children:(e,t)=>{G(e,ad())},$$slots:{default:!0}}),Qt()}import{PlaybackState as sd}from"@vkontakte/videoplayer-core/es2015";var cd=Oa(`<path d="m17.4 10 1.6.2a2 2 90 01.8.8l.2 1.6v22.8l-.2 1.6a2 2 90 01-.8.8l-1.6.2h-4l-1.4-.2a2 2 90 01-.8-.8l-.2-1.6V12.6l.2-1.6a2 2 90 01.8-.8l1.6-.2h3.801zm16 0 1.6.2a2 2 90 01.8.8l.2 1.6v22.8l-.2 1.6a2 2 90 01-.8.8l-1.6.2h-4l-1.4-.2a2 2 90 01-.8-.8l-.2-1.6V12.6l.2-1.6a2 2 90 01.8-.8l1.6-.2h4z"></path>`);function ld(e,t){Zt(t,!0);let n=F(()=>Uu(t.size));fs(e,{width:`48`,height:`48`,fill:`currentColor`,get style(){return U(n)},testId:`pause-icon`,get shadow(){return t.shadow},children:(e,t)=>{G(e,cd())},$$slots:{default:!0}}),Qt()}var ud=Oa(`<path d="M19.605 0.0611157C20.2463 0.163726 20.8529 0.409114 21.3976 0.844894C22.29 1.55876 22.7149 2.45864 23.0434 3.77239C23.1274 4.10872 23.2729 4.50079 23.4548 4.88131C23.8719 5.05864 24.28 5.25575 24.6777 5.47185C25.0704 5.37484 25.4474 5.24601 25.7485 5.10584C27.8669 4.11966 29.644 4.17147 31.0993 5.74115C31.2224 5.87392 31.2959 5.96187 31.4558 6.15934L32.3998 7.32506C32.6537 7.63857 32.7621 7.78141 32.9223 8.04795C33.96 9.7751 33.5554 11.3836 32.2437 13.1266C32.026 13.4159 31.8038 13.7945 31.6179 14.1928C31.7352 14.6166 31.8328 15.0463 31.9105 15.4809C32.2446 15.7486 32.5997 15.9831 32.9134 16.1432C34.1196 16.7587 34.9009 17.3752 35.3957 18.4053C35.6978 19.0341 35.8004 19.6804 35.7561 20.3283C35.7327 20.6708 35.6957 20.8617 35.597 21.2892L35.2596 22.7507C35.1609 23.1782 35.1105 23.366 34.9814 23.6841C34.7371 24.2859 34.3616 24.8218 33.8144 25.2545C32.9181 25.9634 31.9457 26.175 30.5917 26.1995C30.2492 26.2057 29.84 26.2581 29.4328 26.3478C29.1681 26.7135 28.8862 27.0665 28.5882 27.4055C28.5933 27.8168 28.6342 28.221 28.7042 28.5516C28.9849 29.8764 28.9975 30.8715 28.5084 31.9043C28.2098 32.5347 27.7721 33.0212 27.2407 33.3946C26.9598 33.5919 26.7882 33.6833 26.3939 33.8756L25.0457 34.5332C24.6514 34.7255 24.4737 34.8045 24.1452 34.9043C23.5238 35.0933 22.871 35.1386 22.1904 34.9858C21.0754 34.7353 20.299 34.1128 19.4279 33.076C19.1976 32.8019 18.883 32.5036 18.5409 32.235C18.3222 32.245 18.1028 32.25 17.8829 32.25C17.6631 32.25 17.4437 32.245 17.225 32.235C16.8829 32.5036 16.5682 32.8019 16.338 33.076C15.4669 34.1128 14.6905 34.7353 13.5755 34.9858C12.8949 35.1386 12.242 35.0933 11.6206 34.9043C11.2922 34.8045 11.1145 34.7255 10.7202 34.5332L9.37201 33.8756C9.25348 33.8179 9.17995 33.7815 9.09407 33.7368C7.12674 32.7123 6.55001 30.9662 7.06165 28.5516C7.1317 28.221 7.17258 27.8168 7.17769 27.4055C6.87964 27.0665 6.59775 26.7135 6.33304 26.3478C5.92591 26.2581 5.51663 26.2057 5.17413 26.1995C3.82017 26.175 2.84776 25.9634 1.95146 25.2545C1.40431 24.8218 1.02875 24.2859 0.784502 23.6841C0.655401 23.366 0.604985 23.1782 0.506296 22.7507L0.168869 21.2892C0.0643852 20.8366 0.0258935 20.6348 0.00607361 20.2681C-0.031082 19.5806 0.100474 18.8976 0.449422 18.2496C0.957844 17.3055 1.71039 16.726 2.85245 16.1432C3.16613 15.9831 3.52129 15.7486 3.85542 15.4809C3.93305 15.0463 4.03072 14.6166 4.14799 14.1928C3.96209 13.7945 3.73987 13.4159 3.52222 13.1266C2.21049 11.3836 1.80583 9.7751 2.84361 8.04795C3.00377 7.78141 3.11222 7.63857 3.36609 7.32506L4.31007 6.15934C4.46998 5.96187 4.54348 5.87392 4.66657 5.74115C6.12187 4.17147 7.89898 4.11966 10.0173 5.10584C10.3184 5.24601 10.6955 5.37484 11.0881 5.47185C11.4859 5.25575 11.894 5.05864 12.3111 4.88131C12.4929 4.50079 12.6384 4.10872 12.7225 3.77239C13.0509 2.45864 13.4759 1.55876 14.3682 0.844894C14.913 0.409114 15.5196 0.163726 16.1609 0.0611157C16.4321 0.0177263 16.6107 0.00464598 16.8959 0.00114942L18.6329 0C19.0716 0 19.266 0.00687897 19.605 0.0611157ZM18.7615 3.00031L17.1329 3C16.3829 3 16.0079 3 15.6329 4.5C15.4248 5.33261 14.9856 6.39629 14.3794 7.30626C13.4155 7.62186 12.509 8.06414 11.6795 8.61343C10.6044 8.50749 9.51939 8.18318 8.75121 7.82556C7.3495 7.17301 7.1135 7.46444 6.64151 8.0473L5.69753 9.21302C5.22554 9.79588 4.98955 10.0873 5.91927 11.3227C6.44256 12.0181 7.00097 13.0476 7.3248 14.1068C6.9932 15.0058 6.77314 15.9587 6.68139 16.9489C5.92897 17.7503 4.98495 18.423 4.21611 18.8153C2.83891 19.5182 2.92327 19.8835 3.09198 20.6143L3.42941 22.0759C3.59812 22.8067 3.68248 23.172 5.22839 23.2C6.08312 23.2155 7.21283 23.4028 8.23271 23.7856C8.75071 24.6478 9.38097 25.4348 10.1033 26.1265C10.2448 27.2028 10.173 28.3403 9.99649 29.1735C9.67598 30.6861 10.013 30.8505 10.6871 31.1792L12.0353 31.8368C12.7094 32.1656 13.0465 32.33 14.0411 31.1462C14.5988 30.4824 15.4718 29.71 16.4268 29.1566C16.9035 29.2182 17.3895 29.25 17.8829 29.25C18.3764 29.25 18.8624 29.2182 19.3391 29.1566C20.2941 29.71 21.1671 30.4824 21.7248 31.1462C22.7194 32.33 23.0565 32.1656 23.7306 31.8368L25.0788 31.1792C25.7528 30.8505 26.0899 30.6861 25.7694 29.1735C25.5928 28.3403 25.5211 27.2028 25.6626 26.1265C26.3849 25.4348 27.0152 24.6478 27.5332 23.7856C28.553 23.4028 29.6828 23.2155 30.5375 23.2C32.0834 23.172 32.1678 22.8067 32.3365 22.0759L32.6739 20.6143C32.8426 19.8835 32.927 19.5182 31.5498 18.8153C30.7809 18.423 29.8369 17.7503 29.0845 16.9489C28.9927 15.9587 28.7727 15.0058 28.4411 14.1068C28.7649 13.0476 29.3233 12.0181 29.8466 11.3227C30.7763 10.0873 30.5403 9.79588 30.0683 9.21302L29.1244 8.0473C28.6524 7.46444 28.4164 7.17301 27.0147 7.82556C26.2465 8.18318 25.1615 8.50749 24.0864 8.61343C23.2569 8.06414 22.3504 7.62186 21.3865 7.30626C20.7803 6.39629 20.3411 5.33261 20.1329 4.5C19.78 3.08824 19.4271 3.00519 18.7615 3.00031ZM17.8829 11.25C21.6109 11.25 24.6329 14.2721 24.6329 18C24.6329 21.7279 21.6109 24.75 17.8829 24.75C14.155 24.75 11.1329 21.7279 11.1329 18C11.1329 14.2721 14.155 11.25 17.8829 11.25ZM17.8829 14.25C15.8119 14.25 14.1329 15.9289 14.1329 18C14.1329 20.0711 15.8119 21.75 17.8829 21.75C19.954 21.75 21.6329 20.0711 21.6329 18C21.6329 15.9289 19.954 14.25 17.8829 14.25Z"></path>`);function dd(e,t){Zt(t,!0);let n=F(()=>Uu(t.size));fs(e,{width:`36`,height:`36`,viewBox:`0 0 36 36`,fill:`currentColor`,get style(){return U(n)},testId:`settings-icon`,get shadow(){return t.shadow},children:(e,t)=>{G(e,ud())},$$slots:{default:!0}}),Qt()}var fd=Oa(`<path d="M5 0h32s5 0 5 5v10s0 5 -5 5h-32s-5 0 -5 -5v-10s0 -5 5 -5 M5.5 2h31s3.5 0 3.5 3.5v9s0 3.5-3.5 3.5h-31s-3.5 0-3.5-3.5v-9s0-3.5 3.5-3.5 M8 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2H9V6a1 1 0 0 0-1-1m7 1a1 1 0 1 1 2 0v8a1 1 0 1 1-2 0zm15-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2h-3v-2h3a1 1 0 1 0 0-2h-3V7h3a1 1 0 1 0 0-2zm-8.32 9.31-2.55-7.82a1 1 0 0 1-.12-.37L19 6.1a1 1 0 1 1 2-.2l2 6.4 2-6.4a1 1 0 0 1 2 .2v.02a1 1 0 0 1-.13.37l-2.55 7.82a1 1 0 0 1-.95.69h-.74a1 1 0 0 1-.95-.69 z"></path>`);function pd(e,t){Zt(t,!0);let n=F(()=>Uu(t.size));fs(e,{width:`42`,height:`20`,testId:`live-icon`,fill:`currentColor`,get style(){return U(n)},children:(e,t)=>{G(e,fd())},$$slots:{default:!0}}),Qt()}import{SeekAction as md}from"@vkontakte/videoplayer-statistics/es2015";var hd=W(`<div class="wrapper s-6"><div class="container s-6"><div class="top-buttons"></div> <div class="filler s-6"></div> <div class="top-above-progress-bar s-6"><div class="video-title s-6"> </div> <div class="filler s-6"></div> <!></div> <!> <div class="bottom-buttons s-6"><div class="play-pause-button-container"><!></div> <div class="settings-button-container s-6"><!></div></div></div></div>`),gd={hash:`s-6`,code:`.wrapper.s-6{background-image:linear-gradient(1turn,transparent,rgba(0,0,0,.016) 9.22%,rgba(0,0,0,.055) 18.76%,rgba(0,0,0,.118) 28.48%,rgba(0,0,0,.2) 38.19%,rgba(0,0,0,.29) 47.75%,rgba(0,0,0,.392) 56.99%,rgba(0,0,0,.502) 65.75%,rgba(0,0,0,.608) 73.87%,rgba(0,0,0,.71) 81.18%,rgba(0,0,0,.8) 87.52%,rgba(0,0,0,.882) 92.74%,rgba(0,0,0,.945) 96.66%,rgba(0,0,0,.984) 99.14%,#000),linear-gradient(180deg,transparent 0,rgba(0,0,0,.016) 9.22%,rgba(0,0,0,.055) 18.76%,rgba(0,0,0,.118) 28.48%,rgba(0,0,0,.2) 38.19%,rgba(0,0,0,.29) 47.75%,rgba(0,0,0,.392) 56.99%,rgba(0,0,0,.502) 65.75%,rgba(0,0,0,.608) 73.87%,rgba(0,0,0,.71) 81.18%,rgba(0,0,0,.8) 87.52%,rgba(0,0,0,.882) 92.74%,rgba(0,0,0,.945) 96.66%,rgba(0,0,0,.984) 99.14%,#000);bottom:0;left:0;position:absolute;right:0;top:0}.container.s-6{box-sizing:border-box;display:flex;flex-direction:column;height:100%;padding:10rem 48rem 0}.filler.s-6{flex-grow:1}.top-above-progress-bar.s-6{align-items:flex-end;display:flex;padding-bottom:20rem}.video-title.s-6{color:#fff;font-size:14rem;line-height:18rem;max-width:320rem}.bottom-buttons.s-6{align-items:center;display:flex;justify-content:center;margin:20rem 0;position:relative;width:100%}.settings-button-container.s-6{position:absolute;right:0;top:50%;transform:translateY(-50%)}`};function _d(e,t){Zt(t,!0),ro(e,gd);let n=()=>X(m,`$playbackState$`,s),r=()=>X(h,`$isLive$`,s),i=()=>X(g,`$positionExact$`,s),a=()=>X(_,`$duration$`,s),o=()=>X(p,`$showUiWithRewind`,s),[s,c]=Vo(),{actions:{internal:{togglePlay:l,setSettingsVisibility:u,seekTime:d,onShowedControls:f}},ui:{showUiWithRewind:p},playerState:{playbackState$:m,isLive$:h,positionExact$:g,duration$:_},video:{title:v}}=sc(),y=F(()=>n()===sd.PLAYING),b=Yt(Cs),x=I(void 0);vi(b.callbackWrapper({callbackName:`effectInPlayerControlLayers`})(()=>{f()}));let S=b.callbackWrapper({callbackName:`openSettingsInPlayerControlLayers`})(()=>{u(!0)}),C=F(()=>r()&&i()!==a()),ee=b.callbackWrapper({callbackName:`backToLiveInPlayerControlsLayer`})(()=>{d(a(),md.LIVE)});var te=hd(),ne=R(te),re=z(R(ne),4),ie=R(re),ae=R(ie,!0);N(ie);var oe=z(ie,4),w=e=>{Ju(e,{layer:`controls`,row:1,col:1,get onclick(){return ee},children:(e,t)=>{pd(e,{get size(){return`14`}})},$$slots:{default:!0}})};q(oe,e=>{U(C)&&e(w)}),N(re);var se=z(re,2);id(se,{row:2,col:1,layer:`controls`});var ce=z(se,2),le=R(ce),ue=R(le);{let e=F(()=>!o());Ju(ue,{get size(){return`20`},get onclick(){return l},row:3,col:1,layer:`controls`,get autofocus(){return U(e)},get ref(){return U(x)},set ref(e){L(x,e,!0)},children:(e,t)=>{var n=ka(),r=si(n),i=e=>{ld(e,{get size(){return`20`}})},a=e=>{od(e,{get size(){return`20`}})};q(r,e=>{U(y)?e(i):e(a,!1)}),G(e,n)},$$slots:{default:!0}})}N(le);var T=z(le,2);Ju(R(T),{get size(){return`14`},get onclick(){return S},row:3,col:2,layer:`controls`,children:(e,t)=>{dd(e,{get size(){return`14`}})},$$slots:{default:!0}}),N(T),N(ce),N(ne),N(te),B(()=>K(ae,v)),G(e,te),Qt(),c()}var vd=W(`<button class="s-c"><!></button>`),yd=W(`<div class="list s-c"></div>`),bd={hash:`s-c`,code:`.list.s-c{display:flex;flex-direction:column;gap:4rem}.list.s-c button:where(.s-c){background:none;border:none;color:inherit}.list.s-c button:where(.s-c):focus,.list.s-c button:where(.s-c):focus-visible{outline:0}`};function xd(e,t){Zt(t,!0),ro(e,bd);let n=qr([]),r=e=>n=>{n.stopPropagation(),t.onAction(e)},i=e=>{[`Enter`,`Space`].includes(e.key)&&e.stopPropagation()};Wo(()=>{n[t.items.findIndex(e=>e.isSelected)].focus()});let a=F(()=>{let e=t.row;return t.items.map(t=>o(o({},t),{},{focusIndex:t.disabled?void 0:e++}))});var s=yd();Ja(s,23,()=>U(a),e=>e.id,(e,a,o)=>{var s=vd(),c=F(()=>r(U(o)));to(R(s),t,`default`,{get item(){return t.items[U(o)]}},null),N(s),Po(s,(e,t)=>n[t]=e,e=>n?.[e],()=>[U(o)]),B(()=>{s.disabled=U(a).disabled,yo(s,`data-row`,U(a).focusIndex),yo(s,`data-col`,U(a).disabled?void 0:t.col),yo(s,`data-layer`,U(a).disabled?void 0:t.layer)}),ya(`click`,s,function(...e){U(c)?.apply(this,e)}),ya(`keydown`,s,i),G(e,s)}),N(s),G(e,s),Qt()}ba([`click`,`keydown`]);var Sd=Oa(`<path d="M16.5 24.8787L8.56066 16.9393C7.97487 16.3536 7.02513 16.3536 6.43934 16.9393C5.85355 17.5251 5.85355 18.4749 6.43934 19.0607L15.4393 28.0607C16.0251 28.6464 16.9749 28.6464 17.5607 28.0607L35.5607 10.0607C36.1464 9.47487 36.1464 8.52513 35.5607 7.93934C34.9749 7.35355 34.0251 7.35355 33.4393 7.93934L16.5 24.8787Z"></path>`);function Cd(e,t){Zt(t,!0);let n=F(()=>Uu(t.size));fs(e,{width:`39`,height:`36`,viewBox:`0 0 39 36`,fill:`currentColor`,get style(){return U(n)},testId:`back-icon`,get shadow(){return t.shadow},children:(e,t)=>{G(e,Sd())},$$slots:{default:!0}}),Qt()}var wd=W(`<div> <!></div>`),Td={hash:`s-e`,code:`.quality-list-item.s-e{align-items:center;border-radius:6rem;box-sizing:border-box;color:var(--vkui--color_text_subhead);display:flex;font-size:10rem;font-weight:500;justify-content:space-between;line-height:12rem;padding:6rem;width:100%}.quality-list-item.s-e:hover{background-color:#76787a;color:#e1e3e6}.quality-list-item.selected.s-e{background:var(--vkui--color_background_contrast_secondary_alpha);color:var(--vkui--color_text_subhead)}:focus>.quality-list-item.s-e{background-color:#fff;color:#000}.quality-list-item.disabled.s-e{opacity:.5}`};function Ed(e,t){Zt(t,!0),ro(e,Td);var n=wd(),r=R(n),i=z(r),a=e=>{Cd(e,{get size(){return`7`}})};q(i,e=>{t.data.isSelected&&e(a)}),N(n),B(()=>{po(n,1,oo([`quality-list-item`,t.data.isSelected?`selected`:``,t.data.disabled&&`disabled`]),`s-e`),K(r,`${t.data.text??``} `)}),G(e,n),Qt()}var Dd=Oa(`<path d="M9.43934 9.43934C10.0251 8.85355 10.9749 8.85355 11.5607 9.43934L21 18.8775L30.4393 9.43934C30.9801 8.89861 31.8309 8.85702 32.4193 9.31456L32.5607 9.43934C33.1464 10.0251 33.1464 10.9749 32.5607 11.5607L23.1225 21L32.5607 30.4393C33.1014 30.9801 33.143 31.8309 32.6854 32.4193L32.5607 32.5607C31.9749 33.1464 31.0251 33.1464 30.4393 32.5607L21 23.1225L11.5607 32.5607C11.0199 33.1014 10.1691 33.143 9.58065 32.6854L9.43934 32.5607C8.85355 31.9749 8.85355 31.0251 9.43934 30.4393L18.8775 21L9.43934 11.5607C8.89861 11.0199 8.85702 10.1691 9.31456 9.58065L9.43934 9.43934Z"></path>`);function Od(e,t){Zt(t,!0);let n=F(()=>Uu(t.size));fs(e,{width:`42`,height:`42`,viewBox:`0 0 42 42`,fill:`currentColor`,get style(){return U(n)},testId:`back-icon`,get shadow(){return t.shadow},children:(e,t)=>{G(e,Dd())},$$slots:{default:!0}}),Qt()}import{VideoQuality as kd}from"@vkontakte/videoplayer-shared/es2015";var Ad=W(`<div class="settings-layer s-4"><div class="settings-menu s-4"><div class="settings-title s-4">Качество</div> <div class="menu-list"><div class="close-button-container s-4"><!></div> <!></div></div></div>`),jd={hash:`s-4`,code:`.settings-layer.s-4{bottom:0;left:0}.settings-layer.s-4,.settings-menu.s-4{position:absolute;right:0;top:0}.settings-menu.s-4{background:#000;box-sizing:border-box;height:100%;padding:10rem;width:163rem}.settings-title.s-4{color:#fff;font-size:12rem;line-height:116%;margin-bottom:12rem;margin-left:8rem;margin-top:5rem}.close-button-container.s-4{left:0;position:absolute;top:15rem;transform:translateX(calc(-100% - 7rem))}`};function Md(e,t){Zt(t,!0),ro(e,jd);let n=()=>X(l,`$availableQualities$`,i),r=()=>X(u,`$currentQuality$`,i),[i,a]=Vo(),{actions:{internal:{setSettingsVisibility:o,setQuality:s,clearShowByInput:c}},playerState:{availableQualities$:l,currentQuality$:u},deviceCapabilities:d}=sc(),f=Yt(Cs),p=F(()=>n().map(e=>{let{value:t,displayValue:n,selected:i}=e,a={id:t,text:n,isSelected:i,disabled:t!==`auto`&&t!==kd.INVARIANT&&!d.isCodecSupported(t)};return i&&t===`auto`&&(a.text=`${n} (${r()})`),a})),m=f.callbackWrapper({callbackName:`closeSettingsInSettingsLayer`})(()=>{o(!1)}),h=f.callbackWrapper({callbackName:`setVideoQualityInSettingsLayer`})(e=>{let t=U(p)[e];s(t.id),o(!1),c()});var g=Ad(),_=R(g),v=z(R(_),2),y=R(v);Ju(R(y),{get size(){return`14`},get onclick(){return m},row:1,col:1,layer:`settings`,children:(e,t)=>{Od(e,{get size(){return`14`}})},$$slots:{default:!0}}),N(y),xd(z(y,2),{row:1,col:2,layer:`settings`,get items(){return U(p)},get onAction(){return h},children:Ne,$$slots:{default:(e,t)=>{let n=F(()=>t.item);Ed(e,{get data(){return U(n)}})}}}),N(v),N(_),N(g),G(e,g),Qt(),a()}var Nd=W(`<div class="container s-g"><div class="dot s-g"></div> <div class="dot s-g"></div> <div class="dot s-g"></div></div>`),Pd={hash:`s-g`,code:`.container.s-g{display:flex;left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%)}.dot.s-g:first-child{animation-delay:0s}.dot.s-g:nth-child(2){animation-delay:.18s}.dot.s-g:nth-child(3){animation-delay:.36s}@keyframes s-g-dot_animation{0%{opacity:.2}30%{opacity:1}to{opacity:.2}}.dot.s-g{animation-duration:.75s;animation-iteration-count:infinite;animation-name:s-g-dot_animation;background:var(--btn-color);border-radius:4px;height:8px;width:8px}.dot.s-g+.dot:where(.s-g){margin-left:4px}`};function Fd(e,t){ro(e,Pd);let n=Uo(t,`style`,3,``);var r=Nd();B(()=>ho(r,n())),G(e,r)}var Id=W(`<div class="container s-7"><!></div>`),Ld={hash:`s-7`,code:`.container.s-7{bottom:0;font-size:33px;left:0;position:absolute;right:0;top:0}`};function Rd(e){ro(e,Ld);var t=Id();Fd(R(t),{}),N(t),G(e,t)}import{getWindow as zd}from"@vkontakte/videoplayer-shared/es2015";var Bd=W(`<div class="timer__cell cell s-h"><span class="cell__value s-h"> </span> <span class="cell__unit s-h"> </span></div> <span class="timer__points s-h"> </span>`,1),Vd=W(`<div class="timer__cell cell s-h"><span class="cell__value s-h"> </span> <span class="cell__unit s-h"> </span></div> <span class="timer__points s-h"> </span>`,1),Hd=W(`<div class="timer__cell cell s-h"><span class="cell__value s-h"> </span> <span class="cell__unit s-h"> </span></div> <span class="timer__points s-h"> </span>`,1),Ud=W(`<div class="timer__cell cell s-h"><span class="cell__value s-h"> </span> <span class="cell__unit s-h"> </span></div>`),Wd=W(`<div class="timer__container s-h"><!> <!> <!> <!></div>`),Gd={hash:`s-h`,code:`.timer__container.s-h{align-items:flex-start;display:flex;justify-content:center}.cell.s-h{align-items:center;display:flex;flex-direction:column}.cell__value.s-h{font-size:16em;font-weight:600;line-height:1.2}.cell__unit.s-h{font-size:4.7em;font-weight:400;line-height:1.2}.timer__points.s-h{display:inline-block;font-size:42px;font-weight:600;line-height:1.2;margin:0 8px}`};function Kd(e,t){Zt(t,!0),ro(e,Gd);let n=I(``),r=I(``),i=I(``),a=I(``),o,s=e=>String(e).padStart(2,`0`),c=e=>Math.max(e.length,1),l=e=>`${(t.isSmallSize?16:32)*c(e)}px`,u=e=>{let t=Math.floor(e/86400);t&&(e-=t*86400,L(n,s(t),!0)),L(r,s(Math.floor(e/3600)),!0),L(i,s(Math.floor(e/60)%60),!0),L(a,s(e%60),!0)},d=()=>{let e=Math.floor(Date.now()/1e3),n=t.startTime-e;u(n),n>=1?o=zd().requestAnimationFrame(d):t.onTimerOver()};Wo(()=>{o=zd().requestAnimationFrame(d)}),Go(()=>{zd().cancelAnimationFrame(o)});var f=Wd(),p=R(f),m=e=>{var t=Bd(),r=si(t);let i;var a=R(r),o=R(a,!0);N(a);var s=z(a,2),c=R(s,!0);N(s),N(r);var u=z(r,2),d=R(u,!0);N(u),B((e,t,a)=>{i=ho(r,``,i,e),K(o,U(n)),K(c,t),K(d,a)},[()=>({width:l(U(n))}),()=>xc(`waiting_live_day_value`),()=>xc(`waiting_live_colon`)]),G(e,t)};q(p,e=>{U(n)&&e(m)});var h=z(p,2),g=e=>{var t=Vd(),n=si(t);let i;var a=R(n),o=R(a,!0);N(a);var s=z(a,2),c=R(s,!0);N(s),N(n);var u=z(n,2),d=R(u,!0);N(u),B((e,t,a)=>{i=ho(n,``,i,e),K(o,U(r)),K(c,t),K(d,a)},[()=>({width:l(U(r))}),()=>xc(`waiting_live_hour_value`),()=>xc(`waiting_live_colon`)]),G(e,t)};q(h,e=>{U(r)&&e(g)});var _=z(h,2),v=e=>{var t=Hd(),n=si(t);let r;var a=R(n),o=R(a,!0);N(a);var s=z(a,2),c=R(s,!0);N(s),N(n);var u=z(n,2),d=R(u,!0);N(u),B((e,t,a)=>{r=ho(n,``,r,e),K(o,U(i)),K(c,t),K(d,a)},[()=>({width:l(U(i))}),()=>xc(`waiting_live_minute_value`),()=>xc(`waiting_live_colon`)]),G(e,t)};q(_,e=>{U(i)&&e(v)});var y=z(_,2),b=e=>{var t=Ud();let n;var r=R(t),i=R(r,!0);N(r);var o=z(r,2),s=R(o,!0);N(o),N(t),B((e,r)=>{n=ho(t,``,n,e),K(i,U(a)),K(s,r)},[()=>({width:l(U(a))}),()=>xc(`waiting_live_second_value`)]),G(e,t)};q(y,e=>{U(a)&&e(b)}),N(f),G(e,f),Qt()}var qd=W(`<div class="waiting s-8"><span class="waiting__title medium s-8"> </span></div>`),Jd=W(`<div class="upcoming-timer timer s-8"><span class="timer__title medium s-8"> </span> <!></div>`),Yd=W(`<div class="waiting-container s-8"><!></div>`),Xd={hash:`s-8`,code:`.waiting-container.s-8{background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;color:#fff;white-space:nowrap}.waiting-container.s-8,.waiting-container.s-8:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-8:before{backdrop-filter:blur(5em);background-color:rgba(0,0,0,.56);content:"";z-index:1}.waiting.s-8{align-items:center;display:flex;flex-direction:column;justify-content:center;left:0;position:absolute;top:50%;transform:translateY(-50%);width:100%;z-index:2}.waiting__title.s-8{font-size:7em;font-weight:600;line-height:1.2}.upcoming-timer.s-8{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.timer.s-8{align-items:center;display:flex;flex-direction:column;justify-content:center}.timer__title.s-8{display:inline-block;font-size:6.6666em;font-weight:600;line-height:1.2;margin-bottom:.7em;vertical-align:middle}.medium.s-8{font-size:6em}`};function Zd(e,t){Zt(t,!0),ro(e,Xd);let{video:{thumbUrl:n,live:r}}=sc(),i=r?.startTime||0,a=F(()=>i<Math.floor(Date.now()/1e3));var o=Yd(),s=R(o),c=e=>{var t=qd(),n=R(t),r=R(n,!0);N(n),N(t),B(e=>K(r,e),[()=>xc(`waiting_live_upcoming_title`)]),G(e,t)},l=e=>{var t=Jd(),n=R(t),r=R(n,!0);N(n);var o=z(n,2);{let e=F(()=>i||0);Kd(o,{get startTime(){return U(e)},onTimerOver:()=>L(a,!0)})}N(t),B(e=>K(r,e),[()=>xc(`waiting_live_timer_title`)]),G(e,t)};q(s,e=>{U(a)?e(c):e(l,!1)}),N(o),B(()=>ho(o,`background-image: url(${n})`)),G(e,o),Qt()}var Qd=W(`<div class="waiting-container s-9"><div class="waiting-caption s-9"><!> <p class="waiting-title s-9"> </p></div></div>`),$d={hash:`s-9`,code:`.waiting-container.s-9{align-items:center;background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;display:flex;justify-content:center}.waiting-container.s-9,.waiting-container.s-9:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-9:before{backdrop-filter:blur(10px);background-color:rgba(0,0,0,.4);content:""}.waiting-caption.s-9{align-items:center;display:flex;flex-direction:column;position:relative}.waiting-title.s-9{font-size:20px;font-weight:400;line-height:1.2;margin:0;padding:20px;text-align:center}`};function ef(e,t){Zt(t,!0),ro(e,$d);let n=Uo(t,`thumbUrl`,3,``),r={recover:xc(`waiting_live_recover_title`),record:xc(`waiting_record_title`)},i=F(()=>r[t.kind]||``);var a=Qd(),o=R(a),s=R(o);Fd(s,{style:`position: static; transform: translate(0, 0)`});var c=z(s,2),l=R(c,!0);N(c),N(o),N(a),B(()=>{ho(a,`background-image: url('${n()}')`),K(l,U(i))}),ya(`contextmenu`,a,function(...e){t.onContextMenu?.apply(this,e)}),ya(`click`,a,function(...e){t.onClick?.apply(this,e)}),G(e,a),Qt()}ba([`contextmenu`,`click`]);var tf=W(`<div class="thumb s-a"><!></div>`),nf={hash:`s-a`,code:`.thumb.s-a{background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;bottom:0;left:0;position:absolute;right:0;top:0}`};function rf(e,t){ro(e,nf);var n=tf(),r=R(n),i=e=>{Fd(e,{})};q(r,e=>{t.thumbUrl||e(i)}),N(n),B(()=>ho(n,t.thumbUrl?`background-image: url(${t.thumbUrl})`:``)),G(e,n)}var af=W(`<!> <!> <!> <!> <!> <!> <!> <!> <!> <!>`,1);function of(e,t){Zt(t,!0);let n=()=>X(f,`$language$`,c),r=()=>X(h,`$isShowLoader`,c),i=()=>X(m,`$controlsVisible`,c),a=()=>X(g,`$settingsVisible`,c),o=()=>X(_,`$playerPhase`,c),s=()=>X(p,`$debugPanelVisible`,c),[c,l]=Vo(),u=Uo(t,`videoContainer`,15),d=sc(),f=d.interfaceLanguage$,p=d.ui.debugPanelVisible,{ui:{controlsVisible:m,isShowLoader:h,settingsVisible:g},playerPhase:_,video:{thumbUrl:v}}=d;var y=ka();Wa(si(y),n,e=>{var t=af(),n=si(t);Hu(n,{get videoContainer(){return u()},set videoContainer(e){u(e)}});var c=z(n,2),l=e=>{Rd(e,{})};q(c,e=>{r()&&e(l)});var d=z(c,2),f=e=>{_d(e,{})};q(d,e=>{i()&&e(f)});var p=z(d,2),m=e=>{Md(e,{})};q(p,e=>{a()&&e(m)});var h=z(p,2),g=e=>{Zd(e,{})};q(h,e=>{o()===`LiveWaitingStart`&&e(g)});var _=z(h,2),y=e=>{ef(e,{kind:`recover`,get thumbUrl(){return v}})};q(_,e=>{o()===`LiveWaitingRecover`&&e(y)});var b=z(_,2),x=e=>{ef(e,{kind:`record`,get thumbUrl(){return v}})};q(b,e=>{o()===`LiveWaitingRecord`&&e(x)});var S=z(b,2),C=e=>{rf(e,{get thumbUrl(){return v}})};q(S,e=>{o()===`thumb`&&e(C)});var ee=z(S,2),te=e=>{_s(e,{})};q(ee,e=>{o()===`crashed`&&e(te)});var ne=z(ee,2),re=e=>{zu(e,{})};q(ne,e=>{s()&&e(re)}),G(e,t)}),G(e,y),Qt(),l()}var sf=W(`<div class="player-wrapper s-1" tabindex="0"><!></div>`),cf={hash:`s-1`,code:`.player-wrapper.s-1{aspect-ratio:16/9;color:var(--white);height:100%;left:0;position:relative;top:0;width:100%;--white:#fff;--black:#000;--red:#ff3347;--btn-color:var(--white);--blue-light:#70c1ff;--black-alpha-40:rgba(0,0,0,.4);--white-alpha-24:hsla(0,0%,100%,.24);--white-alpha-72:hsla(0,0%,100%,.72);--devider-gray:#dce1e6;--text-gray:#626d7a;--font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;font-family:var(--font)}.player-wrapper.s-1 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}`};function lf(e,t){Zt(t,!0),ro(e,cf);let n=()=>X(d,`$availableSubtitlesList$`,a),r=()=>X(m,`$settingsVisible`,a),i=()=>X(p,`$controlsVisible`,a),[a,o]=Vo(),s=sc(),c=Xo(),l=Yt(Cs),u=I(void 0);s.getAdmanWrapper().init({switchFromAdsToVideo:s.actions.internal.switchFromAdsToVideo,switchFromVideoToAds:s.actions.internal.switchFromVideoToAds,setMuted:()=>{}},s.ads,{vsid:s.vsid}),vi(()=>{l.externalCallbackFuse(`onDomReady`,t.videoConfig.callbacks?.onDomReady)}),Wo(()=>(t.onMount(U(u)),()=>s.destroy()));let d=s.subtitles.availableSubtitlesList$;if(c.features.initSubtitles){let e=!1;vi(()=>{if(!e&&n().length){e=!0;let r;if(c.features.userVideoPrefs&&s.videoId){let e=gl(c.userSalt,String(s.videoId));e?.subtitleTrackId&&(r=n().find(t=>t.value===e.subtitleTrackId))}let i=t.subtitlesForcedLanguage??ll();i&&(r=n().find(e=>e.language===i)),s.actions.internal.setSubtitle(r)}})}let f=hu().innerWidth/640;hu().document.documentElement.style.fontSize=`${f}px`;let{controlsVisible:p,settingsVisible:m}=s.ui,h=l.callbackWrapper({callbackName:`onClickInRoot`})(()=>{r()||(i()?(s.actions.internal.clearShowByInput(),s.actions.internal.play()):(s.actions.internal.onUserInput(),s.actions.internal.pause()))}),g={focusManager:new Gu};Xt(Gu.CONTEXT_KEY,g);let _=`COMMON`,v=l.callbackWrapper({callbackName:`onKeyDownInRoot`})(e=>{switch(e.key){case`Enter`:e.target===e.currentTarget&&(s.actions.internal.onUserInput(),e.preventDefault());break;case`Escape`:s.actions.internal.onBackButton()||s.app.destroy();return;case`ArrowLeft`:case`ArrowRight`:_=`REWIND`;case`ArrowUp`:case`ArrowDown`:g.focusManager.onKeyDown(e)||(i()?s.actions.internal.clearShowByInput():s.actions.internal.onUserInput(_));break;default:g.focusManager.onKeyDown(e)}}),y=l.callbackWrapper({callbackName:`onKeyDownCaptureInRoot`})(e=>{[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`].includes(e.key)||s.actions.internal.onUserInput()}),b=l.callbackWrapper({callbackName:`onMouseMoveInRoot`})(()=>{s.actions.internal.onUserInput()}),x;s.ui.controlsVisible.subscribe(e=>{e||x.focus()});function S(e,n){l.error({id:`svelte-error-boundary: `+mu(e),thrown:e,category:pu.UI,severity:`fatal`}),t.crash(`svelte error boundary`,e)}var C=sf();Jn(R(C),{onerror:S},e=>{of(e,{get videoContainer(){return U(u)},set videoContainer(e){L(u,e,!0)}})}),N(C),Po(C,e=>x=e,()=>x),B(()=>ho(C,`font-size: ${f}px;`)),ya(`click`,C,h),ya(`keydown`,C,v),va(`keydown`,C,y,!0),ya(`mousemove`,C,b),G(e,C),Qt(),o()}ba([`click`,`keydown`,`mousemove`]);import{getWindow as uf}from"@vkontakte/videoplayer-shared/es2015";class df{constructor(t){e(this,`callbacks`,void 0),e(this,`hasFakeState`,!1),e(this,`onPopState`,({state:e})=>{let t=this.callbacks.onBackButton(),n=uf();n.removeEventListener(`popstate`,this.onPopState),t?(n.history.pushState(e,``),n.addEventListener(`popstate`,this.onPopState)):this.hasFakeState&&(this.hasFakeState=!1,n.history.back())}),this.callbacks=t;let n=uf();n.history.pushState(n.history.state,``),this.hasFakeState=!0,n.addEventListener(`popstate`,this.onPopState)}destroy(){uf().removeEventListener(`popstate`,this.onPopState),this.hasFakeState&&=(uf().history.back(),!1)}}import{getWindow as ff,isLowerOrEqual as pf,videoHeightToQuality as mf,VideoQuality as hf}from"@vkontakte/videoplayer-shared/es2015";class gf{constructor(){e(this,`maxQuality`,mf(ff().document.body.offsetHeight*ff().devicePixelRatio)||hf.INVARIANT)}isCodecSupported(e){return this.maxQuality===hf.INVARIANT?!0:pf(e,this.maxQuality)}}import{AppTracer as _f,ErrorCategory as vf,getMessageFromError as yf,getWindow as bf}from"@vkontakte/videoplayer-shared/es2015";class xf{constructor(t,n,r,i){e(this,`appTracer`,void 0),e(this,`envParams`,void 0),this.envParams=r,this.appTracer=new _f(t,n,r,i)}error(e){this.envParams.env===`dev`&&bf().console.error(e),this.appTracer.error(o(o({},e),{},{category:e.category||vf.UI,message:e.id}),{severity:e.severity||(vf.FATAL?`fatal`:`error`)})}callbackWrapper(e){return t=>(...n)=>{try{return t(...n)}catch(t){let n;n=`callbackName`in e?o(o({},e),{},{id:`callback-${e.callbackName}: ${yf(t)}`,data:o(o({},e.data),{},{callbackName:e.callbackName})}):e,n.thrown=t,this.error(n)}}}externalCallbackFuse(e,t,...n){if(t)try{return t(...n)}catch(t){this.error({id:`external-callback-error-`+e+`: `+yf(t),category:vf.EXTERNAL_API,thrown:t,data:{arg:n}})}}updateContext(e){this.appTracer.updateContext(e)}addSubscription(e){this.appTracer.addSubscription(e)}destroy(){this.appTracer.destroy()}}var Sf={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:rs.RU,isCyrillicRelatedInterface:!0,isTouch:!1,isAudioDisabled:!1,tuningConfig:{},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showNextPrevButtons:!1};class Cf{constructor(t,n={},r=ns().document.body){e(this,`parentNode`,void 0),e(this,`subscription`,new as),e(this,`svelteStubComponent`,void 0),e(this,`svelteRootComponent`,void 0),e(this,`svelteErrorComponent`,void 0),e(this,`videoConfig`,void 0),e(this,`uiConfig`,void 0),e(this,`statisticsConfig`,void 0),e(this,`statistics`,void 0),e(this,`store`,void 0),e(this,`playerId`,void 0),e(this,`coreConfig`,void 0),e(this,`metaConfig`,void 0),e(this,`internalsExposure`,null),e(this,`logger`,void 0),e(this,`log`,void 0),e(this,`status`,`Not initialized`),e(this,`backButtonService`,void 0),e(this,`errorTracer`,void 0),e(this,`createOneStat`,e=>{if(!this.videoConfig)return;let{albumId:t,statPlace:n,statUserSalt:r,statTrackCode:i,statVKAppId:a,refreshStatAuthToken:o,statUserId:s,getUvRestStatAuthToken:c,autoplay:l,isTouch:u,refDomain:d,deviceId:f}=this.videoConfig,{unitedVideoId:p}=e;if(this.uiConfig.features.statistics&&p)try{return new Ts({userId:s,movieId:p,albumId:t,place:n,trackCode:i,vkAppId:a,autoplay:l??!1,mobile:u,clip:!1,refDomain:d,deviceId:f,isPreviewPlayerView:!1},{refreshAuthToken:o,getUvRestAuthToken:c,userSalt:r,config:this.statisticsConfig})}catch(e){this.errorTracer?.error({id:`statistic create error: `+es(e),category:$o.WTF,thrown:e,data:{config:this.statisticsConfig},severity:`error`})}}),this.parentNode=r,this.parentNode.className=`vk-vp-tv-parentNode`,this.fillConfigs(t,n);let{errorTracer:i,logger:a,log:o}=this.createLoggers();this.errorTracer=i,this.logger=a,this.log=o;try{var s;let{statAuthToken:e,interfaceLanguage:n,isCyrillicRelatedInterface:r,isAudioDisabled:i,isLiveCatchUpMode:a,callbacks:o,saveRate:c,mediascopePixels:l,getLiveApi:u}=this.videoConfig;if(ns()!==top)throw Error(`Must run in top frame`);if(!Array.isArray(t.videos)||t.videos.length===0)throw Error(`empty videos`);let d=this.videoConfig.videos[0],{sources:f,unitedVideoId:p,subtitlesForcedLanguage:m,live:h}=d;if(!f&&!h)throw Error(`empty sources and live`);let g=this.createOneStat(d),_=this.createThinOneStat(d);(g||_)&&(this.statistics=new Os(g,_,l&&new ws({pixels:l}))),this.store=fu({interfaceLanguage:n,isCyrillicRelatedInterface:r,videoId:p,isLiveCatchUpMode:a,isAudioDisabled:i,statAuthToken:e,callbacks:o,uiConfig:this.uiConfig,coreConfig:this.coreConfig,metaConfig:this.metaConfig,saveRate:c,internalsExposure:this.internalsExposure,statistics:this.statistics,playerId:this.playerId,app:this,video:d,deviceCapabilities:new gf,subtitlesForcedLanguage:d.subtitlesForcedLanguage,getLiveApi:u,errorTracer:this.errorTracer});let v={videoConfig:this.videoConfig,subtitlesForcedLanguage:m,onMount:e=>{this.store.initVideo(this.videoConfig,e)},crash:this.crash.bind(this)},y=new Map;y.set(oc,this.store),y.set(Yo,this.uiConfig),y.set(Cs,this.errorTracer),this.svelteRootComponent=Aa(lf,{target:this.parentNode,props:v,context:y}),this.internalsExposure?.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig,logger:this.logger,log:this.log}),this.uiConfig.devNullLog&&!((s=this.videoConfig)==null||(s=s.callbacks)==null)&&s.onDevNullLog?Qo.subscribe(Ss,this.videoConfig.callbacks.onDevNullLog):Qo.destroy(Ss),this.backButtonService=new df({onBackButton:this.store.actions.internal.onBackButton}),this.status=`Normal`}catch(e){throw this.errorTracer.error({id:`ui-tv_create-fail: `+es(e),category:$o.FATAL,thrown:e,data:{videoConfig:t,sdkConfig:n,hasParentNode:!!r}}),this.crash(`AndroidTvConstructor`,e),e}}destroy(){var e;this.status!==`Destroyed`&&(this.backButtonService.destroy(),this.status=`Destroyed`,this.subscription.unsubscribe(),this.internalsExposure?.destroy(),Qo.destroy(Ss),(e=this.store)==null||(e=e.getPlayer())==null||e.destroy(),this.errorTracer?.destroy(),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteErrorComponent),this.unmountComponent(this.svelteStubComponent),ns().history.back())}crash(e,t){try{this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.backButtonService?.destroy(),this.svelteErrorComponent=Aa(bs,{target:this.parentNode})}catch{}if(this.errorTracer)this.errorTracer.externalCallbackFuse(`onCrashed`,this.videoConfig.callbacks?.onCrashed,e+`:`+String(t));else try{var n,r;(n=this.videoConfig.callbacks)==null||(r=n.onCrashed)==null||r.call(n,e+`:`+String(t))}catch{}}fillConfigs(e,t={}){var n,r;this.uiConfig=Jo(t.ui??{}),this.videoConfig=xs(Sf,Zo(e)),(n=this.videoConfig).autoplay&&(n.autoplay=this.uiConfig.features.autoplay),this.videoConfig.showAds=this.uiConfig.ads.enable??this.videoConfig.showAds,this.videoConfig.adsSlotId=this.uiConfig.ads.slot??this.videoConfig.adsSlotId,(r=this.videoConfig).canRewindLive&&(r.canRewindLive=this.uiConfig.features.liveRewind),this.videoConfig.supportLink=this.videoConfig.supportLink??this.uiConfig.supportLink,this.videoConfig.showEndScreen=this.uiConfig.features.endScreen&&this.videoConfig.showEndScreen,this.statisticsConfig=t.statistics??{},this.playerId=ts(e.playerId),this.uiConfig=Jo(t.ui??{}),this.coreConfig=t.core??{},this.metaConfig=t.meta}createLoggers(){var e;let t=(e=this.videoConfig)==null||(e=e.videos)==null?void 0:e[0],n=new xf(Ss,{enabled:!0,sampleRate:1,whiteErrorCategoryList:[],blackErrorCategoryList:[],whiteErrorIdList:[],blackErrorIdList:[]},{version:d,env:u},{place:`embed`,movieId:t?.unitedVideoId,autoplay:this.videoConfig.autoplay,clip:!1,mobile:!1,devicePixelRatio:ns().devicePixelRatio}),r=new is;try{let e=this.parseUa();e&&n.updateContext(e)}catch(e){n.error({id:`UA parse error: `+es(e),category:$o.WTF,thrown:e,severity:`warning`})}return{errorTracer:n,logger:r,log:r.createComponentLog(`VKVideoPlayer`)}}createThinOneStat(e){if(!this.videoConfig)return;let{deviceId:t,preload:n,refreshStatAuthToken:r,statUserId:i,getUvRestStatAuthToken:a}=this.videoConfig,{unitedVideoId:o}=e;if(this.uiConfig.features.thinStatistics&&o)return new Es.ThinOneStat({userId:i,deviceId:t,movieId:o,preload:n,isPreviewPlayerView:!1},{config:this.statisticsConfig,refreshAuthToken:r,getUvRestAuthToken:a})}unmountComponent(e){e&&Pa(e)}parseUa(){let e=ns().navigator.userAgent.match(/vkvideo \((.*)\)/i);if(!e)return!1;let t=f(e[1].split(`; `).filter(Boolean).map(e=>e.trim().split(`/`)).map(([e,t])=>[e,t===void 0?!0:t]));return{androidTv:t.AnroidTv,device:t.device,brand:t.brand,sdkInt:t.SDK_INT,hardware:t.hardware,partner:t.Partner}}updateStatContext(e){this.statistics&&(this.statistics.oneStat&&this.statistics.oneStat.updateContext(e),this.statistics.thinOneStat&&this.statistics.thinOneStat.updateContext(e))}}import{InterfaceLanguage as wf,VKNumericLanguage as Tf,loadVKLangPack as Ef}from"@vkontakte/videoplayer-shared/es2015";import{VideoQuality as Df,VideoFormat as Of}from"@vkontakte/videoplayer-core/es2015";export{Ef as loadVKLangPack,Df as VideoQuality,Of as VideoFormat,Tf as VKNumericLanguage,d as VERSION,wf as InterfaceLanguage,Cf as AndroidTvPlayer};
19
+ Audio: ${(W(a).audioCodec||``)??``} ${W(a).audioLanguage?`(${W(a).audioLanguage})`:``}`)),K(e,t)};J(ae,e=>{(W(a).videoCodec||W(a).audioCodec)&&e(w)});var T=B(ae,2),oe=e=>{var t=Il(),n=B(z(t),2),r=z(n,!0);P(n),P(t),V(()=>q(r,W(a).viewport)),K(e,t)};J(T,e=>{W(a).viewport&&e(oe)});var se=B(T,2),ce=e=>{var t=Ll(),n=B(z(t),2),r=z(n,!0);P(n),P(t),V(()=>q(r,W(a).videoSize)),K(e,t)};J(se,e=>{W(a).videoSize&&e(ce)});var E=B(se,2),D=e=>{var t=Rl(),n=B(z(t),2),r=z(n,!0);P(n),P(t),V(()=>q(r,W(a).cdn)),K(e,t)};J(E,e=>{W(a).cdn&&e(D)});var O=B(E,2),le=e=>{var t=zl(),n=B(z(t),2),r=z(n);P(n),P(t),V(()=>q(r,`${W(a).volume??``} %`)),K(e,t)};J(O,e=>{W(a).volume&&e(le)});var ue=B(O,2),k=e=>{var t=Bl(),n=B(z(t),2),r=z(n);P(n),P(t),V(e=>q(r,`${e??``} s`),[()=>W(a).position.toFixed(2)]),K(e,t)};J(ue,e=>{W(a).position&&e(k)});var de=B(ue,2),A=e=>{var t=Vl(),n=B(z(t),2),r=z(n);P(n),P(t),V(e=>q(r,`${e??``} s`),[()=>W(a).buffer.toFixed(2)]),K(e,t)};J(de,e=>{W(a).buffer&&e(A)});var j=B(de,2),fe=e=>{var t=Hl(),n=B(z(t),2),r=z(n);P(n),P(t),V(e=>q(r,`${e??``} s`),[()=>W(a).nativeBuffer.toFixed(2)]),K(e,t)};J(j,e=>{W(a).nativeBuffer&&e(fe)});var pe=B(j,2),me=e=>{var t=Ul(),n=B(z(t),2),r=z(n);P(n),P(t),V(e=>q(r,`${e??``} s`),[()=>W(a).liveLatency.toFixed(2)]),K(e,t)};J(pe,e=>{W(a).liveLatency&&e(me)});var he=B(pe,2),ge=e=>{var t=Wl(),n=B(z(t),2),r=z(n,!0);P(n),P(t),V(e=>q(r,e),[()=>[{value:W(a).currentVideoSegmentLength,title:`Video:`},{value:W(a).currentAudioSegmentLength,title:`Audio:`}].filter(({value:e})=>e).map(({value:e,title:t})=>`${t} ${((e??0)/1e3).toFixed(2)} s`).join(` & `)]),K(e,t)};J(he,e=>{(W(a).currentVideoSegmentLength||W(a).currentAudioSegmentLength)&&e(ge)});var _e=B(he,2),ve=B(z(_e),2),ye=z(ve);P(ve),P(_e);var be=B(_e,2),xe=e=>{var t=Gl(),n=B(z(t),2);Al(n,{get values(){return W(m)}});var r=B(n,2),i=z(r);P(r),P(t),V(e=>q(i,`${e??``} Kbps`),[()=>W(a).speed.toFixed(2)]),K(e,t)};J(be,e=>{W(a).speed&&e(xe)});var Se=B(be,2),Ce=e=>{var t=Kl(),n=B(z(t),2);Al(n,{get values(){return W(h)}});var r=B(n,2),i=z(r);P(r),P(t),V(e=>q(i,`${e??``} Kbps`),[()=>W(a).bitrate.toFixed(2)]),K(e,t)};J(Se,e=>{W(a).bitrate&&e(Ce)});var we=B(Se,2),Te=B(z(we),2);Al(Te,{get values(){return W(p)}});var Ee=B(Te,2),De=z(Ee,!0);P(Ee),P(we),P(y),P(_),V(()=>{ja(_,`aria-label`,g),q(S,W(a).version),q(ye,`${W(c)??``} / ${W(s)??``} frames`),q(De,W(l))}),Ni(`click`,v,i),K(e,_),Dt()}Pi([`click`]);var Xl=G(`<div><div class="video-container s-4"></div></div>`),Zl={hash:`s-4`,code:`.video-container.s-4,.video-wrapper.s-4{height:100%;left:0;position:absolute;top:0;width:100%}.video-wrapper.s-4{background:var(--black)}.video-container.s-4,.video-wrapper.s-4{z-index:var(--video-container-z-index)}.video-container.s-4{transition:var(--rotate-transition-duration) ease all}`};function Ql(e,t){Et(t,!0),ga(e,Zl);let n=()=>Ya(o,`$playerPhase`,r),[r,i]=Xa(),a=Qa(t,`videoContainer`,15),{playerPhase:o}=_s();var s=Xl();let c;Ha(z(s),e=>a(e),()=>a()),P(s),V(()=>c=Ta(s,1,`video-wrapper s-4`,null,c,{hidden:n()!==`video`})),K(e,s),Dt(),i()}var $l=e=>`width:${e}rem;height:${e}rem;`;import{getWindow as eu}from"@vkontakte/videoplayer-shared/es2015";class tu{constructor(){e(this,`onKeyDown`,e=>{let t=eu().document.activeElement;if(!t)return console.warn(`no active element`),!1;let{row:n,col:r,layer:i}=t.dataset;if(!n||!r||!i)return console.warn(`no col or row or layer`),!1;let a=!1;switch(e.key){case`ArrowDown`:a=this.moveFocusVertical(Number(n)+1,r,i);break;case`ArrowUp`:a=this.moveFocusVertical(Number(n)-1,r,i);break;case`ArrowLeft`:a=this.moveFocusHorizontal(Number(r)-1,n,i);break;case`ArrowRight`:a=this.moveFocusHorizontal(Number(r)+1,n,i);break}return a&&(e.preventDefault(),e.stopPropagation()),a})}unmountedElement(e,t,n,r){r&&(this.moveFocusHorizontal(Number(e)-1,t.toString(),n)||this.moveFocusHorizontal(Number(e)+1,t.toString(),n)||this.moveFocusVertical(Number(e)-1,t.toString(),n)||this.moveFocusVertical(Number(e)+1,t.toString(),n)||eu().document.querySelector(`[data-layer=${n}][data-default]`)?.focus())}moveFocusVertical(e,t,n){let r=eu().document.querySelectorAll(`[data-row="${e}"][data-layer="${n}"]`);if(r.length===0)return!1;let i;for(let e=0;e<r.length;e++){let n=r[e];if(n.dataset.col===t)return n.focus(),!0;n.dataset.col===`1`&&(i=n)}return i?i.focus():r[0].focus(),!0}moveFocusHorizontal(e,t,n){let r=eu().document.querySelectorAll(`[data-col="${e}"][data-layer="${n}"]`);if(r.length===0)return!1;let i;for(let e=0;e<r.length;e++){let n=r[e];if(n.dataset.row===t)return n.focus(),!0;n.dataset.row===`1`&&(i=n)}return i?i.focus():r[0].focus(),!0}}e(tu,`CONTEXT_KEY`,`focusManager`);var nu=G(`<button><!></button>`),ru={hash:`s-c`,code:`.button.s-c{align-items:center;background:hsla(0,0%,100%,.15);border:0;border-radius:50%;color:#fff;display:inline-block;font-size:inherit;justify-content:center;padding:0}.button.s-c:focus{background:#fff;color:#000;outline:0}.button.s-c:hover:not(:focus){background-color:#76787a}`};function iu(e,t){Et(t,!0),ga(e,ru);let n=Qa(t,`ref`,15),r=Qa(t,`defaultInLayer`,3,!1),i=Qa(t,`autofocus`,3,!1),a=L(!1),o=()=>{R(a,!0)},s=()=>{R(a,!1)},c=I(()=>$l(Number(t.size||`14`)*2)),l=e=>{e.preventDefault(),e.stopPropagation(),t.onclick?.call(t)},u=wt(tu.CONTEXT_KEY);$a(()=>(i()&&n().focus(),()=>{u.focusManager.unmountedElement(t.col,t.row,t.layer,W(a))}));var d=nu();ha(z(d),()=>t.children),P(d),Ha(d,e=>n(e),()=>n()),V(()=>{Ta(d,1,ya([`button`,t.class]),`s-c`),Da(d,W(c)),ja(d,`data-row`,t.row),ja(d,`data-col`,t.col),ja(d,`data-layer`,t.layer),ja(d,`data-default`,r())}),Ni(`click`,d,l),Mi(`focus`,d,o),Mi(`blur`,d,s),K(e,d),Dt()}Pi([`click`]);import{SeekAction as au}from"@vkontakte/videoplayer-statistics/es2015";import{stringPadStart as ou}from"@vkontakte/videoplayer-shared/es2015";var su=e=>{let t=Math.abs(Math.round(e)),n=Math.floor(t/3600),r=t%3600,i=Math.floor(r/60),a=r%60;return`${e<0?`-`:``}${n?ou(String(n),2,`0`)+`:`:``}${ou(String(i),2,`0`)}:${ou(String(a),2,`0`)}`},cu=G(`<div> </div>`),lu={hash:`s-i`,code:`.video-time.s-i{color:#fff;line-height:125%}`};function uu(e,t){Et(t,!0),ga(e,lu);let n=I(()=>su(t.current)+(t.duration?` / ${su(t.duration)}`:``)),r=I(()=>`font-size: ${t.size||10}rem`);var i=cu(),a=z(i,!0);P(i),V(()=>{Da(i,W(r)),Ta(i,1,ya([`video-time`,t.class]),`s-i`),q(a,W(n))}),K(e,i),Dt()}var du=G(`<div class="pointer-time-wrapper s-e"><!></div>`),fu=G(`<div><div class="time-wrapper s-e"><!></div> <div class="current-progress s-e"></div> <div class="pointer s-e"><!></div></div>`),pu={hash:`s-e`,code:`.progress-bar.s-e{background:hsla(0,0%,100%,.15);border-radius:2rem;font-size:inherit;height:4rem;position:relative;width:100%}.current-progress.s-e{background-color:#fff;border-radius:inherit;height:100%;left:0;position:absolute;top:0}.is-live-now.s-e .current-progress:where(.s-e){background:#ff5c5c}.pointer.s-e{background:#fff;border-radius:50%;display:none;height:7rem;position:absolute;top:50%;transform:translate(-50%,-50%);width:7rem;will-change:transform}.time-wrapper.s-e{position:absolute;right:0;top:0;transform:translateY(calc(-100% - 20rem))}.pointer-time-wrapper.s-e{bottom:0;left:50%;position:absolute;transform:translate(-50%,calc(100% + 5rem))}.progress-bar.s-e:focus{outline:0}.progress-bar.s-e:focus .pointer:where(.s-e){display:block}.button.s-e:hover:not(:focus){background-color:#76787a}.disabled.s-e{visibility:hidden}`};function mu(e,t){Et(t,!0),ga(e,pu);let n=()=>Ya(g,`$duration$`,c),r=()=>Ya(p,`$showUiWithRewind`,c),i=()=>Ya(S,`$positionPercent$`,c),a=()=>Ya(h,`$positionExact$`,c),o=()=>Ya(_,`$isLive$`,c),s=()=>Ya(m,`$canRewind$`,c),[c,l]=Xa(),{actions:{internal:{seekTime:u,pause:d,play:f}},ui:{showUiWithRewind:p,canRewind$:m},playerState:{positionExact$:h,duration$:g,isLive$:_}}=_s(),v=10/n(),y=L(void 0),b=L(mr(NaN)),x=I(()=>isFinite(W(b))),S=Ka([h,g],([e,t])=>t>0?e/t:0),C=e=>{W(y)&&(e.preventDefault(),e.stopPropagation(),u(n()*e.offsetX/W(y).offsetWidth,au.SLIDER))};$a(()=>{r()&&W(y)?.focus()});let ee=()=>{W(x)||(R(b,i(),!0),d())},te=e=>{switch(e.key){case`ArrowLeft`:e.stopPropagation(),ee(),R(b,Math.max(0,W(b)-v),!0);break;case`ArrowRight`:e.stopPropagation(),ee(),R(b,Math.min(1,W(b)+v),!0);break;case`ArrowDown`:case`ArrowUp`:R(b,NaN,!0);break;case`Enter`:e.preventDefault(),u(X(g)*W(b),au.SLIDER),f(),R(b,NaN,!0);break;case`Escape`:W(x)&&(e.stopPropagation(),f(),R(b,NaN,!0));break}},ne=I(()=>Number(W(x)?W(b):i())),re=I(()=>`width: ${W(ne)*100}%`),ie=I(()=>`left: ${W(ne)*100}%`),ae=I(()=>a()-(o()?n():0)),w=I(()=>W(x)?W(b)*n()-(o()?n():0):0);var T=fu(),oe=z(T),se=z(oe),ce=e=>{{let t=I(()=>o()?0:n());uu(e,{get size(){return`10`},get current(){return W(ae)},get duration(){return W(t)}})}};J(se,e=>{o()||e(ce)}),P(oe);var E=B(oe,2),D=B(E,2),O=z(D),le=e=>{var t=du();uu(z(t),{get size(){return`8`},get current(){return W(w)}}),P(t),K(e,t)};J(O,e=>{W(w)&&e(le)}),P(D),P(T),Ha(T,e=>R(y,e),()=>W(y)),V(()=>{ja(T,`tabindex`,s()?0:void 0),Ta(T,1,ya([`progress-bar`,t.class,o()&&W(ne)===1&&`is-live-now`,!s()&&`disabled`]),`s-e`),ja(T,`data-row`,t.row),ja(T,`data-col`,t.col),ja(T,`data-layer`,t.layer),Da(E,W(re)),Da(D,W(ie))}),Ni(`keydown`,T,te),Ni(`click`,T,C),K(e,T),Dt(),l()}Pi([`keydown`,`click`]);var hu=Hi(`<path d="m14.4 8.76 24.02 13.85a1.6 1.6 0 0 1 0 2.78L14.4 39.24a1.6 1.6 0 0 1-2.4-1.39v-27.7a1.6 1.6 0 0 1 2.4-1.39"></path>`);function gu(e,t){Et(t,!0);let n=I(()=>$l(t.size));So(e,{width:`48`,height:`48`,fill:`currentColor`,get style(){return W(n)},testId:`play-icon`,get shadow(){return t.shadow},children:(e,t)=>{K(e,hu())},$$slots:{default:!0}}),Dt()}import{PlaybackState as _u}from"@vkontakte/videoplayer-core/es2015";var vu=Hi(`<path d="m17.4 10 1.6.2a2 2 90 01.8.8l.2 1.6v22.8l-.2 1.6a2 2 90 01-.8.8l-1.6.2h-4l-1.4-.2a2 2 90 01-.8-.8l-.2-1.6V12.6l.2-1.6a2 2 90 01.8-.8l1.6-.2h3.801zm16 0 1.6.2a2 2 90 01.8.8l.2 1.6v22.8l-.2 1.6a2 2 90 01-.8.8l-1.6.2h-4l-1.4-.2a2 2 90 01-.8-.8l-.2-1.6V12.6l.2-1.6a2 2 90 01.8-.8l1.6-.2h4z"></path>`);function yu(e,t){Et(t,!0);let n=I(()=>$l(t.size));So(e,{width:`48`,height:`48`,fill:`currentColor`,get style(){return W(n)},testId:`pause-icon`,get shadow(){return t.shadow},children:(e,t)=>{K(e,vu())},$$slots:{default:!0}}),Dt()}var bu=Hi(`<path d="M19.605 0.0611157C20.2463 0.163726 20.8529 0.409114 21.3976 0.844894C22.29 1.55876 22.7149 2.45864 23.0434 3.77239C23.1274 4.10872 23.2729 4.50079 23.4548 4.88131C23.8719 5.05864 24.28 5.25575 24.6777 5.47185C25.0704 5.37484 25.4474 5.24601 25.7485 5.10584C27.8669 4.11966 29.644 4.17147 31.0993 5.74115C31.2224 5.87392 31.2959 5.96187 31.4558 6.15934L32.3998 7.32506C32.6537 7.63857 32.7621 7.78141 32.9223 8.04795C33.96 9.7751 33.5554 11.3836 32.2437 13.1266C32.026 13.4159 31.8038 13.7945 31.6179 14.1928C31.7352 14.6166 31.8328 15.0463 31.9105 15.4809C32.2446 15.7486 32.5997 15.9831 32.9134 16.1432C34.1196 16.7587 34.9009 17.3752 35.3957 18.4053C35.6978 19.0341 35.8004 19.6804 35.7561 20.3283C35.7327 20.6708 35.6957 20.8617 35.597 21.2892L35.2596 22.7507C35.1609 23.1782 35.1105 23.366 34.9814 23.6841C34.7371 24.2859 34.3616 24.8218 33.8144 25.2545C32.9181 25.9634 31.9457 26.175 30.5917 26.1995C30.2492 26.2057 29.84 26.2581 29.4328 26.3478C29.1681 26.7135 28.8862 27.0665 28.5882 27.4055C28.5933 27.8168 28.6342 28.221 28.7042 28.5516C28.9849 29.8764 28.9975 30.8715 28.5084 31.9043C28.2098 32.5347 27.7721 33.0212 27.2407 33.3946C26.9598 33.5919 26.7882 33.6833 26.3939 33.8756L25.0457 34.5332C24.6514 34.7255 24.4737 34.8045 24.1452 34.9043C23.5238 35.0933 22.871 35.1386 22.1904 34.9858C21.0754 34.7353 20.299 34.1128 19.4279 33.076C19.1976 32.8019 18.883 32.5036 18.5409 32.235C18.3222 32.245 18.1028 32.25 17.8829 32.25C17.6631 32.25 17.4437 32.245 17.225 32.235C16.8829 32.5036 16.5682 32.8019 16.338 33.076C15.4669 34.1128 14.6905 34.7353 13.5755 34.9858C12.8949 35.1386 12.242 35.0933 11.6206 34.9043C11.2922 34.8045 11.1145 34.7255 10.7202 34.5332L9.37201 33.8756C9.25348 33.8179 9.17995 33.7815 9.09407 33.7368C7.12674 32.7123 6.55001 30.9662 7.06165 28.5516C7.1317 28.221 7.17258 27.8168 7.17769 27.4055C6.87964 27.0665 6.59775 26.7135 6.33304 26.3478C5.92591 26.2581 5.51663 26.2057 5.17413 26.1995C3.82017 26.175 2.84776 25.9634 1.95146 25.2545C1.40431 24.8218 1.02875 24.2859 0.784502 23.6841C0.655401 23.366 0.604985 23.1782 0.506296 22.7507L0.168869 21.2892C0.0643852 20.8366 0.0258935 20.6348 0.00607361 20.2681C-0.031082 19.5806 0.100474 18.8976 0.449422 18.2496C0.957844 17.3055 1.71039 16.726 2.85245 16.1432C3.16613 15.9831 3.52129 15.7486 3.85542 15.4809C3.93305 15.0463 4.03072 14.6166 4.14799 14.1928C3.96209 13.7945 3.73987 13.4159 3.52222 13.1266C2.21049 11.3836 1.80583 9.7751 2.84361 8.04795C3.00377 7.78141 3.11222 7.63857 3.36609 7.32506L4.31007 6.15934C4.46998 5.96187 4.54348 5.87392 4.66657 5.74115C6.12187 4.17147 7.89898 4.11966 10.0173 5.10584C10.3184 5.24601 10.6955 5.37484 11.0881 5.47185C11.4859 5.25575 11.894 5.05864 12.3111 4.88131C12.4929 4.50079 12.6384 4.10872 12.7225 3.77239C13.0509 2.45864 13.4759 1.55876 14.3682 0.844894C14.913 0.409114 15.5196 0.163726 16.1609 0.0611157C16.4321 0.0177263 16.6107 0.00464598 16.8959 0.00114942L18.6329 0C19.0716 0 19.266 0.00687897 19.605 0.0611157ZM18.7615 3.00031L17.1329 3C16.3829 3 16.0079 3 15.6329 4.5C15.4248 5.33261 14.9856 6.39629 14.3794 7.30626C13.4155 7.62186 12.509 8.06414 11.6795 8.61343C10.6044 8.50749 9.51939 8.18318 8.75121 7.82556C7.3495 7.17301 7.1135 7.46444 6.64151 8.0473L5.69753 9.21302C5.22554 9.79588 4.98955 10.0873 5.91927 11.3227C6.44256 12.0181 7.00097 13.0476 7.3248 14.1068C6.9932 15.0058 6.77314 15.9587 6.68139 16.9489C5.92897 17.7503 4.98495 18.423 4.21611 18.8153C2.83891 19.5182 2.92327 19.8835 3.09198 20.6143L3.42941 22.0759C3.59812 22.8067 3.68248 23.172 5.22839 23.2C6.08312 23.2155 7.21283 23.4028 8.23271 23.7856C8.75071 24.6478 9.38097 25.4348 10.1033 26.1265C10.2448 27.2028 10.173 28.3403 9.99649 29.1735C9.67598 30.6861 10.013 30.8505 10.6871 31.1792L12.0353 31.8368C12.7094 32.1656 13.0465 32.33 14.0411 31.1462C14.5988 30.4824 15.4718 29.71 16.4268 29.1566C16.9035 29.2182 17.3895 29.25 17.8829 29.25C18.3764 29.25 18.8624 29.2182 19.3391 29.1566C20.2941 29.71 21.1671 30.4824 21.7248 31.1462C22.7194 32.33 23.0565 32.1656 23.7306 31.8368L25.0788 31.1792C25.7528 30.8505 26.0899 30.6861 25.7694 29.1735C25.5928 28.3403 25.5211 27.2028 25.6626 26.1265C26.3849 25.4348 27.0152 24.6478 27.5332 23.7856C28.553 23.4028 29.6828 23.2155 30.5375 23.2C32.0834 23.172 32.1678 22.8067 32.3365 22.0759L32.6739 20.6143C32.8426 19.8835 32.927 19.5182 31.5498 18.8153C30.7809 18.423 29.8369 17.7503 29.0845 16.9489C28.9927 15.9587 28.7727 15.0058 28.4411 14.1068C28.7649 13.0476 29.3233 12.0181 29.8466 11.3227C30.7763 10.0873 30.5403 9.79588 30.0683 9.21302L29.1244 8.0473C28.6524 7.46444 28.4164 7.17301 27.0147 7.82556C26.2465 8.18318 25.1615 8.50749 24.0864 8.61343C23.2569 8.06414 22.3504 7.62186 21.3865 7.30626C20.7803 6.39629 20.3411 5.33261 20.1329 4.5C19.78 3.08824 19.4271 3.00519 18.7615 3.00031ZM17.8829 11.25C21.6109 11.25 24.6329 14.2721 24.6329 18C24.6329 21.7279 21.6109 24.75 17.8829 24.75C14.155 24.75 11.1329 21.7279 11.1329 18C11.1329 14.2721 14.155 11.25 17.8829 11.25ZM17.8829 14.25C15.8119 14.25 14.1329 15.9289 14.1329 18C14.1329 20.0711 15.8119 21.75 17.8829 21.75C19.954 21.75 21.6329 20.0711 21.6329 18C21.6329 15.9289 19.954 14.25 17.8829 14.25Z"></path>`);function xu(e,t){Et(t,!0);let n=I(()=>$l(t.size));So(e,{width:`36`,height:`36`,viewBox:`0 0 36 36`,fill:`currentColor`,get style(){return W(n)},testId:`settings-icon`,get shadow(){return t.shadow},children:(e,t)=>{K(e,bu())},$$slots:{default:!0}}),Dt()}var Su=Hi(`<path d="M5 0h32s5 0 5 5v10s0 5 -5 5h-32s-5 0 -5 -5v-10s0 -5 5 -5 M5.5 2h31s3.5 0 3.5 3.5v9s0 3.5-3.5 3.5h-31s-3.5 0-3.5-3.5v-9s0-3.5 3.5-3.5 M8 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2H9V6a1 1 0 0 0-1-1m7 1a1 1 0 1 1 2 0v8a1 1 0 1 1-2 0zm15-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2h-3v-2h3a1 1 0 1 0 0-2h-3V7h3a1 1 0 1 0 0-2zm-8.32 9.31-2.55-7.82a1 1 0 0 1-.12-.37L19 6.1a1 1 0 1 1 2-.2l2 6.4 2-6.4a1 1 0 0 1 2 .2v.02a1 1 0 0 1-.13.37l-2.55 7.82a1 1 0 0 1-.95.69h-.74a1 1 0 0 1-.95-.69 z"></path>`);function Cu(e,t){Et(t,!0);let n=I(()=>$l(t.size));So(e,{width:`42`,height:`20`,testId:`live-icon`,fill:`currentColor`,get style(){return W(n)},children:(e,t)=>{K(e,Su())},$$slots:{default:!0}}),Dt()}import{SeekAction as wu}from"@vkontakte/videoplayer-statistics/es2015";var Tu=G(`<div class="wrapper s-6"><div class="container s-6"><div class="top-buttons"></div> <div class="filler s-6"></div> <div class="top-above-progress-bar s-6"><div class="video-title s-6"> </div> <div class="filler s-6"></div> <!></div> <!> <div class="bottom-buttons s-6"><div class="play-pause-button-container"><!></div> <div class="settings-button-container s-6"><!></div></div></div></div>`),Eu={hash:`s-6`,code:`.wrapper.s-6{background-image:linear-gradient(1turn,transparent,rgba(0,0,0,.016) 9.22%,rgba(0,0,0,.055) 18.76%,rgba(0,0,0,.118) 28.48%,rgba(0,0,0,.2) 38.19%,rgba(0,0,0,.29) 47.75%,rgba(0,0,0,.392) 56.99%,rgba(0,0,0,.502) 65.75%,rgba(0,0,0,.608) 73.87%,rgba(0,0,0,.71) 81.18%,rgba(0,0,0,.8) 87.52%,rgba(0,0,0,.882) 92.74%,rgba(0,0,0,.945) 96.66%,rgba(0,0,0,.984) 99.14%,#000),linear-gradient(180deg,transparent 0,rgba(0,0,0,.016) 9.22%,rgba(0,0,0,.055) 18.76%,rgba(0,0,0,.118) 28.48%,rgba(0,0,0,.2) 38.19%,rgba(0,0,0,.29) 47.75%,rgba(0,0,0,.392) 56.99%,rgba(0,0,0,.502) 65.75%,rgba(0,0,0,.608) 73.87%,rgba(0,0,0,.71) 81.18%,rgba(0,0,0,.8) 87.52%,rgba(0,0,0,.882) 92.74%,rgba(0,0,0,.945) 96.66%,rgba(0,0,0,.984) 99.14%,#000);bottom:0;left:0;position:absolute;right:0;top:0}.container.s-6{box-sizing:border-box;display:flex;flex-direction:column;height:100%;padding:10rem 48rem 0}.filler.s-6{flex-grow:1}.top-above-progress-bar.s-6{align-items:flex-end;display:flex;padding-bottom:20rem}.video-title.s-6{color:#fff;font-size:14rem;line-height:18rem;max-width:320rem}.bottom-buttons.s-6{align-items:center;display:flex;justify-content:center;margin:20rem 0;position:relative;width:100%}.settings-button-container.s-6{position:absolute;right:0;top:50%;transform:translateY(-50%)}`};function Du(e,t){Et(t,!0),ga(e,Eu);let n=()=>Ya(m,`$playbackState$`,s),r=()=>Ya(h,`$isLive$`,s),i=()=>Ya(g,`$positionExact$`,s),a=()=>Ya(_,`$duration$`,s),o=()=>Ya(p,`$showUiWithRewind`,s),[s,c]=Xa(),{actions:{internal:{togglePlay:l,setSettingsVisibility:u,seekTime:d,onShowedControls:f}},ui:{showUiWithRewind:p},playerState:{playbackState$:m,isLive$:h,positionExact$:g,duration$:_},video:{title:v}}=_s(),y=I(()=>n()===_u.PLAYING),b=wt(No),x=L(void 0);Pr(b.callbackWrapper({callbackName:`effectInPlayerControlLayers`})(()=>{f()}));let S=b.callbackWrapper({callbackName:`openSettingsInPlayerControlLayers`})(()=>{u(!0)}),C=I(()=>r()&&i()!==a()),ee=b.callbackWrapper({callbackName:`backToLiveInPlayerControlsLayer`})(()=>{d(a(),wu.LIVE)});var te=Tu(),ne=z(te),re=B(z(ne),4),ie=z(re),ae=z(ie,!0);P(ie);var w=B(ie,4),T=e=>{iu(e,{layer:`controls`,row:1,col:1,get onclick(){return ee},children:(e,t)=>{Cu(e,{get size(){return`14`}})},$$slots:{default:!0}})};J(w,e=>{W(C)&&e(T)}),P(re);var oe=B(re,2);mu(oe,{row:2,col:1,layer:`controls`});var se=B(oe,2),ce=z(se),E=z(ce);{let e=I(()=>!o());iu(E,{get size(){return`20`},get onclick(){return l},row:3,col:1,layer:`controls`,get autofocus(){return W(e)},get ref(){return W(x)},set ref(e){R(x,e,!0)},children:(e,t)=>{var n=Ui(),r=Cr(n),i=e=>{yu(e,{get size(){return`20`}})},a=e=>{gu(e,{get size(){return`20`}})};J(r,e=>{W(y)?e(i):e(a,!1)}),K(e,n)},$$slots:{default:!0}})}P(ce);var D=B(ce,2);iu(z(D),{get size(){return`14`},get onclick(){return S},row:3,col:2,layer:`controls`,children:(e,t)=>{xu(e,{get size(){return`14`}})},$$slots:{default:!0}}),P(D),P(se),P(ne),P(te),V(()=>q(ae,v)),K(e,te),Dt(),c()}var Ou=G(`<button class="s-f"><!></button>`),ku=G(`<div class="list s-f"></div>`),Au={hash:`s-f`,code:`.list.s-f{display:flex;flex-direction:column;gap:4rem}.list.s-f button:where(.s-f){background:none;border:none;color:inherit}.list.s-f button:where(.s-f):focus,.list.s-f button:where(.s-f):focus-visible{outline:0}`};function ju(e,t){Et(t,!0),ga(e,Au);let n=mr([]),r=e=>n=>{n.stopPropagation(),t.onAction(e)},i=e=>{[`Enter`,`Space`].includes(e.key)&&e.stopPropagation()};$a(()=>{n[t.items.findIndex(e=>e.isSelected)].focus()});let a=I(()=>{let e=t.row;return t.items.map(t=>o(o({},t),{},{focusIndex:t.disabled?void 0:e++}))});var s=ku();ca(s,23,()=>W(a),e=>e.id,(e,a,o)=>{var s=Ou(),c=I(()=>r(W(o)));ma(z(s),t,`default`,{get item(){return t.items[W(o)]}},null),P(s),Ha(s,(e,t)=>n[t]=e,e=>n?.[e],()=>[W(o)]),V(()=>{s.disabled=W(a).disabled,ja(s,`data-row`,W(a).focusIndex),ja(s,`data-col`,W(a).disabled?void 0:t.col),ja(s,`data-layer`,W(a).disabled?void 0:t.layer)}),Ni(`click`,s,function(...e){W(c)?.apply(this,e)}),Ni(`keydown`,s,i),K(e,s)}),P(s),K(e,s),Dt()}Pi([`click`,`keydown`]);var Mu=Hi(`<path d="M16.5 24.8787L8.56066 16.9393C7.97487 16.3536 7.02513 16.3536 6.43934 16.9393C5.85355 17.5251 5.85355 18.4749 6.43934 19.0607L15.4393 28.0607C16.0251 28.6464 16.9749 28.6464 17.5607 28.0607L35.5607 10.0607C36.1464 9.47487 36.1464 8.52513 35.5607 7.93934C34.9749 7.35355 34.0251 7.35355 33.4393 7.93934L16.5 24.8787Z"></path>`);function Nu(e,t){Et(t,!0);let n=I(()=>$l(t.size));So(e,{width:`39`,height:`36`,viewBox:`0 0 39 36`,fill:`currentColor`,get style(){return W(n)},testId:`back-icon`,get shadow(){return t.shadow},children:(e,t)=>{K(e,Mu())},$$slots:{default:!0}}),Dt()}var Pu=G(`<div> <!></div>`),Fu={hash:`s-g`,code:`.quality-list-item.s-g{align-items:center;border-radius:6rem;box-sizing:border-box;color:var(--vkui--color_text_subhead);display:flex;font-size:10rem;font-weight:500;justify-content:space-between;line-height:12rem;padding:6rem;width:100%}.quality-list-item.s-g:hover{background-color:#76787a;color:#e1e3e6}.quality-list-item.selected.s-g{background:var(--vkui--color_background_contrast_secondary_alpha);color:var(--vkui--color_text_subhead)}:focus>.quality-list-item.s-g{background-color:#fff;color:#000}.quality-list-item.disabled.s-g{opacity:.5}`};function Iu(e,t){Et(t,!0),ga(e,Fu);var n=Pu(),r=z(n),i=B(r),a=e=>{Nu(e,{get size(){return`7`}})};J(i,e=>{t.data.isSelected&&e(a)}),P(n),V(()=>{Ta(n,1,ya([`quality-list-item`,t.data.isSelected?`selected`:``,t.data.disabled&&`disabled`]),`s-g`),q(r,`${t.data.text??``} `)}),K(e,n),Dt()}var Lu=Hi(`<path d="M9.43934 9.43934C10.0251 8.85355 10.9749 8.85355 11.5607 9.43934L21 18.8775L30.4393 9.43934C30.9801 8.89861 31.8309 8.85702 32.4193 9.31456L32.5607 9.43934C33.1464 10.0251 33.1464 10.9749 32.5607 11.5607L23.1225 21L32.5607 30.4393C33.1014 30.9801 33.143 31.8309 32.6854 32.4193L32.5607 32.5607C31.9749 33.1464 31.0251 33.1464 30.4393 32.5607L21 23.1225L11.5607 32.5607C11.0199 33.1014 10.1691 33.143 9.58065 32.6854L9.43934 32.5607C8.85355 31.9749 8.85355 31.0251 9.43934 30.4393L18.8775 21L9.43934 11.5607C8.89861 11.0199 8.85702 10.1691 9.31456 9.58065L9.43934 9.43934Z"></path>`);function Ru(e,t){Et(t,!0);let n=I(()=>$l(t.size));So(e,{width:`42`,height:`42`,viewBox:`0 0 42 42`,fill:`currentColor`,get style(){return W(n)},testId:`back-icon`,get shadow(){return t.shadow},children:(e,t)=>{K(e,Lu())},$$slots:{default:!0}}),Dt()}import{VideoQuality as zu}from"@vkontakte/videoplayer-shared/es2015";var Bu=G(`<div class="settings-layer s-9"><div class="settings-menu s-9"><div class="settings-title s-9">Качество</div> <div class="menu-list"><div class="close-button-container s-9"><!></div> <!></div></div></div>`),Vu={hash:`s-9`,code:`.settings-layer.s-9{bottom:0;left:0}.settings-layer.s-9,.settings-menu.s-9{position:absolute;right:0;top:0}.settings-menu.s-9{background:#000;box-sizing:border-box;height:100%;padding:10rem;width:163rem}.settings-title.s-9{color:#fff;font-size:12rem;line-height:116%;margin-bottom:12rem;margin-left:8rem;margin-top:5rem}.close-button-container.s-9{left:0;position:absolute;top:15rem;transform:translateX(calc(-100% - 7rem))}`};function Hu(e,t){Et(t,!0),ga(e,Vu);let n=()=>Ya(l,`$availableQualities$`,i),r=()=>Ya(u,`$currentQuality$`,i),[i,a]=Xa(),{actions:{internal:{setSettingsVisibility:o,setQuality:s,clearShowByInput:c}},playerState:{availableQualities$:l,currentQuality$:u},deviceCapabilities:d}=_s(),f=wt(No),p=I(()=>n().map(e=>{let{value:t,displayValue:n,selected:i}=e,a={id:t,text:n,isSelected:i,disabled:t!==`auto`&&t!==zu.INVARIANT&&!d.isCodecSupported(t)};return i&&t===`auto`&&(a.text=`${n} (${r()})`),a})),m=f.callbackWrapper({callbackName:`closeSettingsInSettingsLayer`})(()=>{o(!1)}),h=f.callbackWrapper({callbackName:`setVideoQualityInSettingsLayer`})(e=>{let t=W(p)[e];s(t.id),o(!1),c()});var g=Bu(),_=z(g),v=B(z(_),2),y=z(v);iu(z(y),{get size(){return`14`},get onclick(){return m},row:1,col:1,layer:`settings`,children:(e,t)=>{Ru(e,{get size(){return`14`}})},$$slots:{default:!0}}),P(y),ju(B(y,2),{row:1,col:2,layer:`settings`,get items(){return W(p)},get onAction(){return h},children:Ae,$$slots:{default:(e,t)=>{let n=I(()=>t.item);Iu(e,{get data(){return W(n)}})}}}),P(v),P(_),P(g),K(e,g),Dt(),a()}var Uu=G(`<div class="container s-d"><div class="dot s-d"></div> <div class="dot s-d"></div> <div class="dot s-d"></div></div>`),Wu={hash:`s-d`,code:`.container.s-d{display:flex;left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%)}.dot.s-d:first-child{animation-delay:0s}.dot.s-d:nth-child(2){animation-delay:.18s}.dot.s-d:nth-child(3){animation-delay:.36s}@keyframes s-d-dot_animation{0%{opacity:.2}30%{opacity:1}to{opacity:.2}}.dot.s-d{animation-duration:.75s;animation-iteration-count:infinite;animation-name:s-d-dot_animation;background:var(--btn-color);border-radius:4px;height:8px;width:8px}.dot.s-d+.dot:where(.s-d){margin-left:4px}`};function Gu(e,t){ga(e,Wu);let n=Qa(t,`style`,3,``);var r=Uu();V(()=>Da(r,n())),K(e,r)}var Ku=G(`<div class="container s-8"><!></div>`),qu={hash:`s-8`,code:`.container.s-8{bottom:0;font-size:33px;left:0;position:absolute;right:0;top:0}`};function Ju(e){ga(e,qu);var t=Ku();Gu(z(t),{}),P(t),K(e,t)}import{getWindow as Yu}from"@vkontakte/videoplayer-shared/es2015";var Xu=G(`<div class="timer__cell cell s-h"><span class="cell__value s-h"> </span> <span class="cell__unit s-h"> </span></div> <span class="timer__points s-h"> </span>`,1),Zu=G(`<div class="timer__cell cell s-h"><span class="cell__value s-h"> </span> <span class="cell__unit s-h"> </span></div> <span class="timer__points s-h"> </span>`,1),Qu=G(`<div class="timer__cell cell s-h"><span class="cell__value s-h"> </span> <span class="cell__unit s-h"> </span></div> <span class="timer__points s-h"> </span>`,1),$u=G(`<div class="timer__cell cell s-h"><span class="cell__value s-h"> </span> <span class="cell__unit s-h"> </span></div>`),ed=G(`<div class="timer__container s-h"><!> <!> <!> <!></div>`),td={hash:`s-h`,code:`.timer__container.s-h{align-items:flex-start;display:flex;justify-content:center}.cell.s-h{align-items:center;display:flex;flex-direction:column}.cell__value.s-h{font-size:16em;font-weight:600;line-height:1.2}.cell__unit.s-h{font-size:4.7em;font-weight:400;line-height:1.2}.timer__points.s-h{display:inline-block;font-size:42px;font-weight:600;line-height:1.2;margin:0 8px}`};function nd(e,t){Et(t,!0),ga(e,td);let n=L(``),r=L(``),i=L(``),a=L(``),o,s=e=>String(e).padStart(2,`0`),c=e=>Math.max(e.length,1),l=e=>`${(t.isSmallSize?16:32)*c(e)}px`,u=e=>{let t=Math.floor(e/86400);t&&(e-=t*86400,R(n,s(t),!0)),R(r,s(Math.floor(e/3600)),!0),R(i,s(Math.floor(e/60)%60),!0),R(a,s(e%60),!0)},d=()=>{let e=Math.floor(Date.now()/1e3),n=t.startTime-e;u(n),n>=1?o=Yu().requestAnimationFrame(d):t.onTimerOver()};$a(()=>{o=Yu().requestAnimationFrame(d)}),eo(()=>{Yu().cancelAnimationFrame(o)});var f=ed(),p=z(f),m=e=>{var t=Xu(),r=Cr(t);let i;var a=z(r),o=z(a,!0);P(a);var s=B(a,2),c=z(s,!0);P(s),P(r);var u=B(r,2),d=z(u,!0);P(u),V((e,t,a)=>{i=Da(r,``,i,e),q(o,W(n)),q(c,t),q(d,a)},[()=>({width:l(W(n))}),()=>js(`waiting_live_day_value`),()=>js(`waiting_live_colon`)]),K(e,t)};J(p,e=>{W(n)&&e(m)});var h=B(p,2),g=e=>{var t=Zu(),n=Cr(t);let i;var a=z(n),o=z(a,!0);P(a);var s=B(a,2),c=z(s,!0);P(s),P(n);var u=B(n,2),d=z(u,!0);P(u),V((e,t,a)=>{i=Da(n,``,i,e),q(o,W(r)),q(c,t),q(d,a)},[()=>({width:l(W(r))}),()=>js(`waiting_live_hour_value`),()=>js(`waiting_live_colon`)]),K(e,t)};J(h,e=>{W(r)&&e(g)});var _=B(h,2),v=e=>{var t=Qu(),n=Cr(t);let r;var a=z(n),o=z(a,!0);P(a);var s=B(a,2),c=z(s,!0);P(s),P(n);var u=B(n,2),d=z(u,!0);P(u),V((e,t,a)=>{r=Da(n,``,r,e),q(o,W(i)),q(c,t),q(d,a)},[()=>({width:l(W(i))}),()=>js(`waiting_live_minute_value`),()=>js(`waiting_live_colon`)]),K(e,t)};J(_,e=>{W(i)&&e(v)});var y=B(_,2),b=e=>{var t=$u();let n;var r=z(t),i=z(r,!0);P(r);var o=B(r,2),s=z(o,!0);P(o),P(t),V((e,r)=>{n=Da(t,``,n,e),q(i,W(a)),q(s,r)},[()=>({width:l(W(a))}),()=>js(`waiting_live_second_value`)]),K(e,t)};J(y,e=>{W(a)&&e(b)}),P(f),K(e,f),Dt()}var rd=G(`<div class="waiting s-a"><span class="waiting__title medium s-a"> </span></div>`),id=G(`<div class="upcoming-timer timer s-a"><span class="timer__title medium s-a"> </span> <!></div>`),ad=G(`<div class="waiting-container s-a"><!></div>`),od={hash:`s-a`,code:`.waiting-container.s-a{background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;color:#fff;white-space:nowrap}.waiting-container.s-a,.waiting-container.s-a:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-a:before{backdrop-filter:blur(5em);background-color:rgba(0,0,0,.56);content:"";z-index:1}.waiting.s-a{align-items:center;display:flex;flex-direction:column;justify-content:center;left:0;position:absolute;top:50%;transform:translateY(-50%);width:100%;z-index:2}.waiting__title.s-a{font-size:7em;font-weight:600;line-height:1.2}.upcoming-timer.s-a{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.timer.s-a{align-items:center;display:flex;flex-direction:column;justify-content:center}.timer__title.s-a{display:inline-block;font-size:6.6666em;font-weight:600;line-height:1.2;margin-bottom:.7em;vertical-align:middle}.medium.s-a{font-size:6em}`};function sd(e,t){Et(t,!0),ga(e,od);let{video:{thumbUrl:n,live:r}}=_s(),i=r?.startTime||0,a=I(()=>i<Math.floor(Date.now()/1e3));var o=ad(),s=z(o),c=e=>{var t=rd(),n=z(t),r=z(n,!0);P(n),P(t),V(e=>q(r,e),[()=>js(`waiting_live_upcoming_title`)]),K(e,t)},l=e=>{var t=id(),n=z(t),r=z(n,!0);P(n);var o=B(n,2);{let e=I(()=>i||0);nd(o,{get startTime(){return W(e)},onTimerOver:()=>R(a,!0)})}P(t),V(e=>q(r,e),[()=>js(`waiting_live_timer_title`)]),K(e,t)};J(s,e=>{W(a)?e(c):e(l,!1)}),P(o),V(()=>Da(o,`background-image: url(${n})`)),K(e,o),Dt()}var cd=G(`<div class="waiting-container s-5"><div class="waiting-caption s-5"><!> <p class="waiting-title s-5"> </p></div></div>`),ld={hash:`s-5`,code:`.waiting-container.s-5{align-items:center;background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;display:flex;justify-content:center}.waiting-container.s-5,.waiting-container.s-5:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-5:before{backdrop-filter:blur(10px);background-color:rgba(0,0,0,.4);content:""}.waiting-caption.s-5{align-items:center;display:flex;flex-direction:column;position:relative}.waiting-title.s-5{font-size:20px;font-weight:400;line-height:1.2;margin:0;padding:20px;text-align:center}`};function ud(e,t){Et(t,!0),ga(e,ld);let n=Qa(t,`thumbUrl`,3,``),r={recover:js(`waiting_live_recover_title`),record:js(`waiting_record_title`)},i=I(()=>r[t.kind]||``);var a=cd(),o=z(a),s=z(o);Gu(s,{style:`position: static; transform: translate(0, 0)`});var c=B(s,2),l=z(c,!0);P(c),P(o),P(a),V(()=>{Da(a,`background-image: url('${n()}')`),q(l,W(i))}),Ni(`contextmenu`,a,function(...e){t.onContextMenu?.apply(this,e)}),Ni(`click`,a,function(...e){t.onClick?.apply(this,e)}),K(e,a),Dt()}Pi([`contextmenu`,`click`]);var dd=G(`<div class="thumb s-7"><!></div>`),fd={hash:`s-7`,code:`.thumb.s-7{background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;bottom:0;left:0;position:absolute;right:0;top:0}`};function pd(e,t){ga(e,fd);var n=dd(),r=z(n),i=e=>{Gu(e,{})};J(r,e=>{t.thumbUrl||e(i)}),P(n),V(()=>Da(n,t.thumbUrl?`background-image: url(${t.thumbUrl})`:``)),K(e,n)}var md=G(`<!> <!> <!> <!> <!> <!> <!> <!> <!> <!>`,1);function hd(e,t){Et(t,!0);let n=()=>Ya(f,`$language$`,c),r=()=>Ya(h,`$isShowLoader`,c),i=()=>Ya(m,`$controlsVisible`,c),a=()=>Ya(g,`$settingsVisible`,c),o=()=>Ya(_,`$playerPhase`,c),s=()=>Ya(p,`$debugPanelVisible`,c),[c,l]=Xa(),u=Qa(t,`videoContainer`,15),d=_s(),f=d.interfaceLanguage$,p=d.ui.debugPanelVisible,{ui:{controlsVisible:m,isShowLoader:h,settingsVisible:g},playerPhase:_,video:{thumbUrl:v}}=d;var y=Ui();ia(Cr(y),n,e=>{var t=md(),n=Cr(t);Ql(n,{get videoContainer(){return u()},set videoContainer(e){u(e)}});var c=B(n,2),l=e=>{Ju(e,{})};J(c,e=>{r()&&e(l)});var d=B(c,2),f=e=>{Du(e,{})};J(d,e=>{i()&&e(f)});var p=B(d,2),m=e=>{Hu(e,{})};J(p,e=>{a()&&e(m)});var h=B(p,2),g=e=>{sd(e,{})};J(h,e=>{o()===`LiveWaitingStart`&&e(g)});var _=B(h,2),y=e=>{ud(e,{kind:`recover`,get thumbUrl(){return v}})};J(_,e=>{o()===`LiveWaitingRecover`&&e(y)});var b=B(_,2),x=e=>{ud(e,{kind:`record`,get thumbUrl(){return v}})};J(b,e=>{o()===`LiveWaitingRecord`&&e(x)});var S=B(b,2),C=e=>{pd(e,{get thumbUrl(){return v}})};J(S,e=>{o()===`thumb`&&e(C)});var ee=B(S,2),te=e=>{Do(e,{})};J(ee,e=>{o()===`crashed`&&e(te)});var ne=B(ee,2),re=e=>{Yl(e,{})};J(ne,e=>{s()&&e(re)}),K(e,t)}),K(e,y),Dt(),l()}var gd=G(`<div class="player-wrapper s-1" tabindex="0"><!></div>`),_d={hash:`s-1`,code:`.player-wrapper.s-1{aspect-ratio:16/9;color:var(--white);height:100%;left:0;position:relative;top:0;width:100%;--white:#fff;--black:#000;--red:#ff3347;--btn-color:var(--white);--blue-light:#70c1ff;--black-alpha-40:rgba(0,0,0,.4);--white-alpha-24:hsla(0,0%,100%,.24);--white-alpha-72:hsla(0,0%,100%,.72);--devider-gray:#dce1e6;--text-gray:#626d7a;--font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;font-family:var(--font)}.player-wrapper.s-1 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}`};function vd(e,t){Et(t,!0),ga(e,_d);let n=()=>Ya(d,`$availableSubtitlesList$`,a),r=()=>Ya(m,`$settingsVisible`,a),i=()=>Ya(p,`$controlsVisible`,a),[a,o]=Xa(),s=_s(),c=ao(),l=wt(No),u=L(void 0);s.getAdmanWrapper().init({switchFromAdsToVideo:s.actions.internal.switchFromAdsToVideo,switchFromVideoToAds:s.actions.internal.switchFromVideoToAds,setMuted:()=>{}},s.ads,{vsid:s.vsid}),Pr(()=>{l.externalCallbackFuse(`onDomReady`,t.videoConfig.callbacks?.onDomReady)}),$a(()=>(t.onMount(W(u)),()=>s.destroy()));let d=s.subtitles.availableSubtitlesList$;if(c.features.initSubtitles){let e=!1;Pr(()=>{if(!e&&n().length){e=!0;let r;if(c.features.userVideoPrefs&&s.videoId){let e=Ec(c.userSalt,String(s.videoId));e?.subtitleTrackId&&(r=n().find(t=>t.value===e.subtitleTrackId))}let i=t.subtitlesForcedLanguage??yc();i&&(r=n().find(e=>e.language===i)),s.actions.internal.setSubtitle(r)}})}let f=Tl().innerWidth/640;Tl().document.documentElement.style.fontSize=`${f}px`;let{controlsVisible:p,settingsVisible:m}=s.ui,h=l.callbackWrapper({callbackName:`onClickInRoot`})(()=>{r()||(i()?(s.actions.internal.clearShowByInput(),s.actions.internal.play()):(s.actions.internal.onUserInput(),s.actions.internal.pause()))}),g={focusManager:new tu};Tt(tu.CONTEXT_KEY,g);let _=`COMMON`,v=l.callbackWrapper({callbackName:`onKeyDownInRoot`})(e=>{switch(e.key){case`Enter`:e.target===e.currentTarget&&(s.actions.internal.onUserInput(),e.preventDefault());break;case`Escape`:s.actions.internal.onBackButton()||s.app.destroy();return;case`ArrowLeft`:case`ArrowRight`:_=`REWIND`;case`ArrowUp`:case`ArrowDown`:g.focusManager.onKeyDown(e)||(i()?s.actions.internal.clearShowByInput():s.actions.internal.onUserInput(_));break;default:g.focusManager.onKeyDown(e)}}),y=l.callbackWrapper({callbackName:`onKeyDownCaptureInRoot`})(e=>{[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`].includes(e.key)||s.actions.internal.onUserInput()}),b=l.callbackWrapper({callbackName:`onMouseMoveInRoot`})(()=>{s.actions.internal.onUserInput()}),x;s.ui.controlsVisible.subscribe(e=>{e||x.focus()});function S(e,n){l.error({id:`svelte-error-boundary: `+wl(e),thrown:e,category:Cl.UI,severity:`fatal`}),t.crash(`svelte error boundary`,e)}var C=gd();bn(z(C),{onerror:S},e=>{hd(e,{get videoContainer(){return W(u)},set videoContainer(e){R(u,e,!0)}})}),P(C),Ha(C,e=>x=e,()=>x),V(()=>Da(C,`font-size: ${f}px;`)),Ni(`click`,C,h),Ni(`keydown`,C,v),Mi(`keydown`,C,y,!0),Ni(`mousemove`,C,b),K(e,C),Dt(),o()}Pi([`click`,`keydown`,`mousemove`]);import{getWindow as yd}from"@vkontakte/videoplayer-shared/es2015";class bd{constructor(t){e(this,`callbacks`,void 0),e(this,`hasFakeState`,!1),e(this,`onPopState`,({state:e})=>{let t=this.callbacks.onBackButton(),n=yd();n.removeEventListener(`popstate`,this.onPopState),t?(n.history.pushState(e,``),n.addEventListener(`popstate`,this.onPopState)):this.hasFakeState&&(this.hasFakeState=!1,n.history.back())}),this.callbacks=t;let n=yd();n.history.pushState(n.history.state,``),this.hasFakeState=!0,n.addEventListener(`popstate`,this.onPopState)}destroy(){yd().removeEventListener(`popstate`,this.onPopState),this.hasFakeState&&=(yd().history.back(),!1)}}import{getWindow as xd,isLowerOrEqual as Sd,videoHeightToQuality as Cd,VideoQuality as wd}from"@vkontakte/videoplayer-shared/es2015";class Td{constructor(){e(this,`maxQuality`,Cd(xd().document.body.offsetHeight*xd().devicePixelRatio)||wd.INVARIANT)}isCodecSupported(e){return this.maxQuality===wd.INVARIANT?!0:Sd(e,this.maxQuality)}}import{AppTracer as Ed,ErrorCategory as Dd,getMessageFromError as Od,getWindow as kd}from"@vkontakte/videoplayer-shared/es2015";class Ad{constructor(t,n,r,i){e(this,`appTracer`,void 0),e(this,`envParams`,void 0),this.envParams=r,this.appTracer=new Ed(t,n,r,i)}error(e){this.envParams.env===`dev`&&kd().console.error(e),this.appTracer.error(o(o({},e),{},{category:e.category||Dd.UI,message:e.id}),{severity:e.severity||(Dd.FATAL?`fatal`:`error`)})}callbackWrapper(e){return t=>(...n)=>{try{return t(...n)}catch(t){let n;n=`callbackName`in e?o(o({},e),{},{id:`callback-${e.callbackName}: ${Od(t)}`,data:o(o({},e.data),{},{callbackName:e.callbackName})}):e,n.thrown=t,this.error(n)}}}externalCallbackFuse(e,t,...n){if(t)try{return t(...n)}catch(t){this.error({id:`external-callback-error-`+e+`: `+Od(t),category:Dd.EXTERNAL_API,thrown:t,data:{arg:n}})}}updateContext(e){this.appTracer.updateContext(e)}addSubscription(e){this.appTracer.addSubscription(e)}destroy(){this.appTracer.destroy()}}var jd={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:po.RU,isCyrillicRelatedInterface:!0,isTouch:!1,isAudioDisabled:!1,tuningConfig:{},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showNextPrevButtons:!1};class Md{constructor(t,n={},r=fo().document.body){e(this,`parentNode`,void 0),e(this,`subscription`,new ho),e(this,`svelteStubComponent`,void 0),e(this,`svelteRootComponent`,void 0),e(this,`svelteErrorComponent`,void 0),e(this,`videoConfig`,void 0),e(this,`uiConfig`,void 0),e(this,`statisticsConfig`,void 0),e(this,`statistics`,void 0),e(this,`store`,void 0),e(this,`playerId`,void 0),e(this,`coreConfig`,void 0),e(this,`metaConfig`,void 0),e(this,`internalsExposure`,null),e(this,`logger`,void 0),e(this,`log`,void 0),e(this,`status`,`Not initialized`),e(this,`backButtonService`,void 0),e(this,`errorTracer`,void 0),e(this,`createOneStat`,e=>{if(!this.videoConfig)return;let{albumId:t,statPlace:n,statUserSalt:r,statTrackCode:i,statVKAppId:a,refreshStatAuthToken:o,statUserId:s,getUvRestStatAuthToken:c,autoplay:l,isTouch:u,refDomain:d,deviceId:f}=this.videoConfig,{unitedVideoId:p}=e;if(this.uiConfig.features.statistics&&p)try{return new Fo({userId:s,movieId:p,albumId:t,place:n,trackCode:i,vkAppId:a,autoplay:l??!1,mobile:u,clip:!1,refDomain:d,deviceId:f,isPreviewPlayerView:!1},{refreshAuthToken:o,getUvRestAuthToken:c,userSalt:r,config:this.statisticsConfig})}catch(e){this.errorTracer?.error({id:`statistic create error: `+lo(e),category:co.WTF,thrown:e,data:{config:this.statisticsConfig},severity:`error`})}}),this.parentNode=r,this.parentNode.className=`vk-vp-tv-parentNode`,this.fillConfigs(t,n);let{errorTracer:i,logger:a,log:o}=this.createLoggers();this.errorTracer=i,this.logger=a,this.log=o;try{var s;let{statAuthToken:e,interfaceLanguage:n,isCyrillicRelatedInterface:r,isAudioDisabled:i,isLiveCatchUpMode:a,callbacks:o,saveRate:c,mediascopePixels:l,getLiveApi:u}=this.videoConfig;if(fo()!==top)throw Error(`Must run in top frame`);if(!Array.isArray(t.videos)||t.videos.length===0)throw Error(`empty videos`);let d=this.videoConfig.videos[0],{sources:f,unitedVideoId:p,subtitlesForcedLanguage:m,live:h}=d;if(!f&&!h)throw Error(`empty sources and live`);let g=this.createOneStat(d),_=this.createThinOneStat(d);(g||_)&&(this.statistics=new Ro(g,_,l&&new Po({pixels:l}))),this.store=Sl({interfaceLanguage:n,isCyrillicRelatedInterface:r,videoId:p,isLiveCatchUpMode:a,isAudioDisabled:i,statAuthToken:e,callbacks:o,uiConfig:this.uiConfig,coreConfig:this.coreConfig,metaConfig:this.metaConfig,saveRate:c,internalsExposure:this.internalsExposure,statistics:this.statistics,playerId:this.playerId,app:this,video:d,deviceCapabilities:new Td,subtitlesForcedLanguage:d.subtitlesForcedLanguage,getLiveApi:u,errorTracer:this.errorTracer});let v={videoConfig:this.videoConfig,subtitlesForcedLanguage:m,onMount:e=>{this.store.initVideo(this.videoConfig,e)},crash:this.crash.bind(this)},y=new Map;y.set(gs,this.store),y.set(io,this.uiConfig),y.set(No,this.errorTracer),this.svelteRootComponent=Wi(vd,{target:this.parentNode,props:v,context:y}),this.internalsExposure?.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig,logger:this.logger,log:this.log}),this.uiConfig.devNullLog&&!((s=this.videoConfig)==null||(s=s.callbacks)==null)&&s.onDevNullLog?so.subscribe(Mo,this.videoConfig.callbacks.onDevNullLog):so.destroy(Mo),this.backButtonService=new bd({onBackButton:this.store.actions.internal.onBackButton}),this.status=`Normal`}catch(e){throw this.errorTracer.error({id:`ui-tv_create-fail: `+lo(e),category:co.FATAL,thrown:e,data:{videoConfig:t,sdkConfig:n,hasParentNode:!!r}}),this.crash(`AndroidTvConstructor`,e),e}}destroy(){var e;this.status!==`Destroyed`&&(this.backButtonService.destroy(),this.status=`Destroyed`,this.subscription.unsubscribe(),this.internalsExposure?.destroy(),so.destroy(Mo),(e=this.store)==null||(e=e.getPlayer())==null||e.destroy(),this.errorTracer?.destroy(),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteErrorComponent),this.unmountComponent(this.svelteStubComponent),fo().history.back())}crash(e,t){try{this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.backButtonService?.destroy(),this.svelteErrorComponent=Wi(Ao,{target:this.parentNode})}catch{}if(this.errorTracer)this.errorTracer.externalCallbackFuse(`onCrashed`,this.videoConfig.callbacks?.onCrashed,e+`:`+String(t));else try{var n,r;(n=this.videoConfig.callbacks)==null||(r=n.onCrashed)==null||r.call(n,e+`:`+String(t))}catch{}}fillConfigs(e,t={}){var n,r;this.uiConfig=ro(t.ui??{}),this.videoConfig=jo(jd,oo(e)),(n=this.videoConfig).autoplay&&(n.autoplay=this.uiConfig.features.autoplay),this.videoConfig.showAds=this.uiConfig.ads.enable??this.videoConfig.showAds,this.videoConfig.adsSlotId=this.uiConfig.ads.slot??this.videoConfig.adsSlotId,(r=this.videoConfig).canRewindLive&&(r.canRewindLive=this.uiConfig.features.liveRewind),this.videoConfig.supportLink=this.videoConfig.supportLink??this.uiConfig.supportLink,this.videoConfig.showEndScreen=this.uiConfig.features.endScreen&&this.videoConfig.showEndScreen,this.statisticsConfig=t.statistics??{},this.playerId=uo(e.playerId),this.uiConfig=ro(t.ui??{}),this.coreConfig=t.core??{},this.metaConfig=t.meta}createLoggers(){var e;let t=(e=this.videoConfig)==null||(e=e.videos)==null?void 0:e[0],n=new Ad(Mo,{enabled:!0,sampleRate:1,whiteErrorCategoryList:[],blackErrorCategoryList:[],whiteErrorIdList:[],blackErrorIdList:[]},{version:d,env:u},{place:`embed`,movieId:t?.unitedVideoId,autoplay:this.videoConfig.autoplay,clip:!1,mobile:!1,devicePixelRatio:fo().devicePixelRatio}),r=new mo;try{let e=this.parseUa();e&&n.updateContext(e)}catch(e){n.error({id:`UA parse error: `+lo(e),category:co.WTF,thrown:e,severity:`warning`})}return{errorTracer:n,logger:r,log:r.createComponentLog(`VKVideoPlayer`)}}createThinOneStat(e){if(!this.videoConfig)return;let{deviceId:t,preload:n,refreshStatAuthToken:r,statUserId:i,getUvRestStatAuthToken:a}=this.videoConfig,{unitedVideoId:o}=e;if(this.uiConfig.features.thinStatistics&&o)return new Io.ThinOneStat({userId:i,deviceId:t,movieId:o,preload:n,isPreviewPlayerView:!1},{config:this.statisticsConfig,refreshAuthToken:r,getUvRestAuthToken:a})}unmountComponent(e){e&&Ji(e)}parseUa(){let e=fo().navigator.userAgent.match(/vkvideo \((.*)\)/i);if(!e)return!1;let t=f(e[1].split(`; `).filter(Boolean).map(e=>e.trim().split(`/`)).map(([e,t])=>[e,t===void 0?!0:t]));return{androidTv:t.AnroidTv,device:t.device,brand:t.brand,sdkInt:t.SDK_INT,hardware:t.hardware,partner:t.Partner}}updateStatContext(e){this.statistics&&(this.statistics.oneStat&&this.statistics.oneStat.updateContext(e),this.statistics.thinOneStat&&this.statistics.thinOneStat.updateContext(e))}}import{InterfaceLanguage as Nd,VKNumericLanguage as Pd,loadVKLangPack as Fd}from"@vkontakte/videoplayer-shared/es2015";import{VideoQuality as Id,VideoFormat as Ld}from"@vkontakte/videoplayer-core/es2015";export{Fd as loadVKLangPack,Id as VideoQuality,Ld as VideoFormat,Pd as VKNumericLanguage,d as VERSION,Nd as InterfaceLanguage,Md as AndroidTvPlayer};