@vkontakte/videoplayer 1.1.81-dev.c564bb3a.0 → 1.1.81-dev.cb1cd8be.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es2015.cjs +38 -38
- package/es2015.esm.js +38 -38
- package/es2018.cjs +38 -38
- package/es2018.esm.js +38 -38
- package/es2024.cjs +38 -38
- package/es2024.esm.js +38 -38
- package/esnext.cjs +38 -38
- package/esnext.esm.js +38 -38
- package/evergreen.esm.js +38 -38
- package/package.json +5 -5
- package/types/VKVideoPlayer/index.svelte.d.ts +1 -0
- package/types/components/Root/types.d.ts +1 -1
- package/types/config.d.ts +1 -0
- package/types/store/index.d.ts +3 -2
- package/types/store/utils.d.ts +2 -1
- package/types/types/index.d.ts +2 -6
- package/types/utils/getControlInfo.d.ts +1 -1
- package/types/utils/userSettings.d.ts +7 -1
- package/types/utils/webAPI/slotsApi.d.ts +1 -1
package/es2018.esm.js
CHANGED
|
@@ -1,63 +1,63 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer v1.1.81-dev.
|
|
3
|
-
* Wed,
|
|
2
|
+
* @vkontakte/videoplayer v1.1.81-dev.cb1cd8be.0
|
|
3
|
+
* Wed, 21 Jan 2026 20:17:00 GMT
|
|
4
4
|
* https://st.mycdn.me/static/vkontakte-videoplayer/1-1-81/doc/
|
|
5
5
|
*/
|
|
6
|
-
var Zb=Object.defineProperty;var
|
|
6
|
+
var Zb=Object.defineProperty;var Wv=t=>{throw TypeError(t)};var Jb=(t,e,i)=>e in t?Zb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var nr=(t,e,i)=>Jb(t,typeof e!="symbol"?e+"":e,i),Sp=(t,e,i)=>e.has(t)||Wv("Cannot "+i);var Ai=(t,e,i)=>(Sp(t,e,"read from private field"),i?i.call(t):e.get(t)),Qs=(t,e,i)=>e.has(t)?Wv("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),al=(t,e,i,o)=>(Sp(t,e,"write to private field"),o?o.call(t,i):e.set(t,i),i),Kv=(t,e,i)=>(Sp(t,e,"access private method"),i);var Gs="[",Ys="[!",_a="]",as={};var Zi=Symbol(),zn=Symbol("filename"),qv=Symbol("hmr"),Qv="http://www.w3.org/1999/xhtml",Hc="http://www.w3.org/2000/svg";var Cp="@attach";var Fc=!0;var Yv,jv,Gv=(jv=(Yv=globalThis.process)==null?void 0:Yv.env)==null?void 0:jv.NODE_ENV,ke=Gv&&!Gv.toLowerCase().startsWith("prod");var rr=Array.isArray,Xv=Array.prototype.indexOf,Jl=Array.from,Tp=Object.keys,ao=Object.defineProperty,Fo=Object.getOwnPropertyDescriptor,Uc=Object.getOwnPropertyDescriptors,Ip=Object.prototype,Zv=Array.prototype,ba=Object.getPrototypeOf,Ep=Object.isExtensible;function js(t){return typeof t=="function"}var ft=()=>{};function Jv(t){return t()}function Xs(t){for(var e=0;e<t.length;e++)t[e]()}var Uo=Symbol("$state"),ll=Symbol("legacy props"),eg=Symbol(""),zc=Symbol("proxy path"),Wc=1,dl=3,sr=8;function Kc(t){return t===this.v}function cl(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function tg(t,e){return t!==e}function ul(t){return!cl(t,this.v)}function ig(){if(ke){let t=new Error(`derived_references_self
|
|
7
7
|
A derived value cannot reference itself recursively
|
|
8
|
-
https://svelte.dev/e/derived_references_self`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/derived_references_self")}function
|
|
8
|
+
https://svelte.dev/e/derived_references_self`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/derived_references_self")}function og(t){if(ke){let e=new Error(`effect_in_teardown
|
|
9
9
|
\`${t}\` cannot be used inside an effect cleanup function
|
|
10
|
-
https://svelte.dev/e/effect_in_teardown`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_in_teardown")}function
|
|
10
|
+
https://svelte.dev/e/effect_in_teardown`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_in_teardown")}function ng(){if(ke){let t=new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function rg(t){if(ke){let e=new Error(`effect_orphan
|
|
11
11
|
\`${t}\` can only be used inside an effect (e.g. during component initialisation)
|
|
12
|
-
https://svelte.dev/e/effect_orphan`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_orphan")}function
|
|
12
|
+
https://svelte.dev/e/effect_orphan`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_orphan")}function sg(){if(ke){let t=new Error(`effect_update_depth_exceeded
|
|
13
13
|
Maximum update depth exceeded. This can happen when a reactive block or effect repeatedly sets a new value. Svelte limits the number of nested updates to prevent infinite loops
|
|
14
|
-
https://svelte.dev/e/effect_update_depth_exceeded`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function
|
|
14
|
+
https://svelte.dev/e/effect_update_depth_exceeded`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ag(){if(ke){let t=new Error(`hydration_failed
|
|
15
15
|
Failed to hydrate the application
|
|
16
|
-
https://svelte.dev/e/hydration_failed`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/hydration_failed")}function
|
|
16
|
+
https://svelte.dev/e/hydration_failed`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/hydration_failed")}function lg(){if(ke){let t=new 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 t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/invalid_snippet")}function dg(t){if(ke){let e=new Error(`props_invalid_value
|
|
17
17
|
Cannot do \`bind:${t}={undefined}\` when \`${t}\` has a fallback value
|
|
18
|
-
https://svelte.dev/e/props_invalid_value`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/props_invalid_value")}function
|
|
18
|
+
https://svelte.dev/e/props_invalid_value`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/props_invalid_value")}function cg(t){if(ke){let e=new Error(`props_rest_readonly
|
|
19
19
|
Rest element properties of \`$props()\` such as \`${t}\` are readonly
|
|
20
|
-
https://svelte.dev/e/props_rest_readonly`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/props_rest_readonly")}function
|
|
20
|
+
https://svelte.dev/e/props_rest_readonly`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/props_rest_readonly")}function ug(t){if(ke){let e=new Error(`rune_outside_svelte
|
|
21
21
|
The \`${t}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files
|
|
22
|
-
https://svelte.dev/e/rune_outside_svelte`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/rune_outside_svelte")}function
|
|
22
|
+
https://svelte.dev/e/rune_outside_svelte`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/rune_outside_svelte")}function pg(){if(ke){let t=new 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 t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function fg(){if(ke){let t=new Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_prototype_fixed")}function mg(){if(ke){let t=new 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 t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_unsafe_mutation")}var ls=!1,ds=!1;function vg(){ls=!0}var ed=null;function Ts(t){let e=Error(),i=e.stack;if(i){let o=i.split(`
|
|
23
23
|
`),r=[`
|
|
24
|
-
`];for(let a=0;a<o.length;a++){let l=o[a];if(l!=="Error"){if(l.includes("validate_each_keys"))return null;l.includes("svelte/src/internal")||r.push(l)}}if(r.length===1)return null;
|
|
25
|
-
`)}),
|
|
24
|
+
`];for(let a=0;a<o.length;a++){let l=o[a];if(l!=="Error"){if(l.includes("validate_each_keys"))return null;l.includes("svelte/src/internal")||r.push(l)}}if(r.length===1)return null;ao(e,"stack",{value:r.join(`
|
|
25
|
+
`)}),ao(e,"name",{value:`${t}Error`})}return e}function Gr(t,e){return t.label=e,qc(t.v,e),t}function qc(t,e){var i;return(i=t==null?void 0:t[zc])==null||i.call(t,e),t}function pl(t){if(ke){let e=new Error(`lifecycle_outside_component
|
|
26
26
|
\`${t}(...)\` can only be used during component initialisation
|
|
27
|
-
https://svelte.dev/e/lifecycle_outside_component`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var
|
|
27
|
+
https://svelte.dev/e/lifecycle_outside_component`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var Ht=null;function td(t){Ht=t}var ar=null;function id(t){ar=t}function fl(t){return Ap("getContext").get(t)}function ml(t,e){return Ap("setContext").set(t,e),e}function od(){return Ap("getAllContexts")}function B(t,e=!1,i){var o=Ht={p:Ht,c:null,d:!1,e:null,m:!1,s:t,x:null,l:null};ls&&!e&&(Ht.l={s:null,u:null,r1:[],r2:Pr(!1)}),Eo(()=>{o.d=!0}),ke&&(Ht.function=i,ar=i)}function H(t){var l,d;let e=Ht;if(e!==null){t!==void 0&&(e.x=t);let s=e.e;if(s!==null){var i=ht,o=Nt;e.e=null;try{for(var r=0;r<s.length;r++){var a=s[r];lo(a.effect),Wi(a.reaction),Po(a.fn)}}finally{lo(i),Wi(o)}}Ht=e.p,ke&&(ar=(d=(l=e.p)==null?void 0:l.function)!=null?d:null),e.m=!0}return t||{}}function cs(){return!ls||Ht!==null&&Ht.l===null}function Ap(t){var e;return Ht===null&&pl(t),(e=Ht.c)!=null?e:Ht.c=new Map(t$(Ht)||void 0)}function t$(t){let e=t.p;for(;e!==null;){let i=e.c;if(i!==null)return i;e=e.p}return null}var i$=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function ai(t){if(typeof t!="object"||t===null||Uo in t)return t;let e=ba(t);if(e!==Ip&&e!==Zv)return t;var i=new Map,o=rr(t),r=q(0),a=ke&&ds?Ts("CreatedAt"):null,l=Nt,d=m=>{var p=Nt;Wi(l);var v=m();return Wi(p),v};o&&i.set("length",q(t.length,a));var s="";function u(m){s=m,Gr(r,`${s} version`);for(let[p,v]of i)Gr(v,$a(s,p))}return new Proxy(t,{defineProperty(m,p,v){(!("value"in v)||v.configurable===!1||v.enumerable===!1||v.writable===!1)&&pg();var _=i.get(p);return _===void 0?_=d(()=>{var y=q(v.value,a);return i.set(p,y),ke&&typeof p=="string"&&Gr(y,$a(s,p)),y}):R(_,v.value,!0),!0},deleteProperty(m,p){var v=i.get(p);if(v===void 0){if(p in m){let b=d(()=>q(Zi,a));i.set(p,b),Lp(r),ke&&Gr(b,$a(s,p))}}else{if(o&&typeof p=="string"){var _=i.get("length"),y=Number(p);Number.isInteger(y)&&y<_.v&&R(_,y)}R(v,Zi),Lp(r)}return!0},get(m,p,v){var w;if(p===Uo)return t;if(ke&&p===zc)return u;var _=i.get(p),y=p in m;if(_===void 0&&(!y||(w=Fo(m,p))!=null&&w.writable)&&(_=d(()=>{var I=ai(y?m[p]:Zi),T=q(I,a);return ke&&Gr(T,$a(s,p)),T}),i.set(p,_)),_!==void 0){var b=n(_);return b===Zi?void 0:b}return Reflect.get(m,p,v)},getOwnPropertyDescriptor(m,p){var v=Reflect.getOwnPropertyDescriptor(m,p);if(v&&"value"in v){var _=i.get(p);_&&(v.value=n(_))}else if(v===void 0){var y=i.get(p),b=y==null?void 0:y.v;if(y!==void 0&&b!==Zi)return{enumerable:!0,configurable:!0,value:b,writable:!0}}return v},has(m,p){var b;if(p===Uo)return!0;var v=i.get(p),_=v!==void 0&&v.v!==Zi||Reflect.has(m,p);if(v!==void 0||ht!==null&&(!_||(b=Fo(m,p))!=null&&b.writable)){v===void 0&&(v=d(()=>{var w=_?ai(m[p]):Zi,I=q(w,a);return ke&&Gr(I,$a(s,p)),I}),i.set(p,v));var y=n(v);if(y===Zi)return!1}return _},set(m,p,v,_){var P;var y=i.get(p),b=p in m;if(o&&p==="length")for(var w=v;w<y.v;w+=1){var I=i.get(w+"");I!==void 0?R(I,Zi):w in m&&(I=d(()=>q(Zi,a)),i.set(w+"",I),ke&&Gr(I,$a(s,w)))}if(y===void 0)(!b||(P=Fo(m,p))!=null&&P.writable)&&(y=d(()=>q(void 0,a)),R(y,ai(v)),i.set(p,y),ke&&Gr(y,$a(s,p)));else{b=y.v!==Zi;var T=d(()=>ai(v));R(y,T)}var N=Reflect.getOwnPropertyDescriptor(m,p);if(N!=null&&N.set&&N.set.call(_,v),!b){if(o&&typeof p=="string"){var A=i.get("length"),E=Number(p);Number.isInteger(E)&&E>=A.v&&R(A,E+1)}Lp(r)}return!0},ownKeys(m){n(r);var p=Reflect.ownKeys(m).filter(y=>{var b=i.get(y);return b===void 0||b.v!==Zi});for(var[v,_]of i)_.v!==Zi&&!(v in m)&&p.push(v);return p},setPrototypeOf(){fg()}})}function $a(t,e){var i;return typeof e=="symbol"?`${t}[Symbol(${(i=e.description)!=null?i:""})]`:i$.test(e)?`${t}.${e}`:/^\d+$/.test(e)?`${t}[${e}]`:`${t}['${e}']`}function Lp(t,e=1){R(t,t.v+e)}function vl(t){try{if(t!==null&&typeof t=="object"&&Uo in t)return t[Uo]}catch(e){}return t}function Mp(t,e){return Object.is(vl(t),vl(e))}function Yr(t){var e=2050,i=Nt!==null&&(Nt.f&2)!==0?Nt:null;ht===null||i!==null&&(i.f&256)!==0?e|=256:ht.f|=1048576;let o={ctx:Ht,deps:null,effects:null,equals:Kc,f:e,fn:t,reactions:null,rv:0,v:null,wv:0,parent:i!=null?i:ht};return ke&&ds&&(o.created=Ts("CreatedAt")),o}function f(t){let e=Yr(t);return Yc(e),e}function Sn(t){let e=Yr(t);return e.equals=ul,e}function Qc(t){var e=t.effects;if(e!==null){t.effects=null;for(var i=0;i<e.length;i+=1)Ki(e[i])}}var Vp=[];function o$(t){for(var e=t.parent;e!==null;){if((e.f&2)===0)return e;e=e.parent}return null}function Dp(t){var e,i=ht;if(lo(o$(t)),ke){let o=ya;Rp(new Set);try{Vp.includes(t)&&ig(),Vp.push(t),Qc(t),e=Gc(t)}finally{lo(i),Rp(o),Vp.pop()}}else try{Qc(t),e=Gc(t)}finally{lo(i)}return e}function Op(t){var e=Dp(t);if(t.equals(e)||(t.v=e,t.wv=nd()),!Is){var i=(Es||(t.f&256)!==0)&&t.deps!==null?4096:1024;Cn(t,i)}}var ya=new Set,gl=new Map;function Rp(t){ya=t}function Pr(t,e){var i={f:0,v:t,reactions:null,equals:Kc,rv:0,wv:0};return ke&&ds&&(i.created=e!=null?e:Ts("CreatedAt"),i.updated=null,i.set_during_effect=!1,i.trace=null),i}function q(t,e){let i=Pr(t,e);return Yc(i),i}function us(t,e=!1,i=!0){var r,a;let o=Pr(t);return e||(o.equals=ul),ls&&i&&Ht!==null&&Ht.l!==null&&((a=(r=Ht.l).s)!=null?a:r.s=[]).push(o),o}function R(t,e,i=!1){var r;Nt!==null&&(!cr||(Nt.f&262144)!==0)&&cs()&&(Nt.f&262162)!==0&&!((r=Wo)!=null&&r[1].includes(t)&&Wo[0]===Nt)&&mg();let o=i?ai(e):e;return ke&&qc(o,t.label),hl(t,o)}function hl(t,e){if(!t.equals(e)){var i=t.v;if(Is?gl.set(t,e):gl.set(t,i),t.v=e,ke&&ds&&(t.updated=Ts("UpdatedAt"),ht!==null&&(t.set_during_effect=!0)),(t.f&2)!==0&&((t.f&2048)!==0&&Dp(t),Cn(t,(t.f&256)===0?1024:4096)),t.wv=nd(),hg(t,2048),cs()&&ht!==null&&(ht.f&1024)!==0&&(ht.f&96)===0&&(dr===null?_g([t]):dr.push(t)),ke&&ya.size>0){let o=Array.from(ya);for(let r of o)(r.f&1024)!==0&&Cn(r,4096),wa(r)&&_l(r);ya.clear()}}return e}function hg(t,e){var i=t.reactions;if(i!==null)for(var o=cs(),r=i.length,a=0;a<r;a++){var l=i[a],d=l.f;if((d&2048)===0&&!(!o&&l===ht)){if(ke&&(d&262144)!==0){ya.add(l);continue}Cn(l,e),(d&1280)!==0&&((d&2)!==0?hg(l,4096):sd(l))}}}var bl="font-weight: bold",$l="font-weight: normal";function bg(t,e,i){ke?console.warn(`%c[svelte] hydration_attribute_changed
|
|
28
28
|
%cThe \`${t}\` attribute on \`${e}\` changed its value between server and client renders. The client value, \`${i}\`, will be ignored in favour of the server value
|
|
29
|
-
https://svelte.dev/e/hydration_attribute_changed`,
|
|
29
|
+
https://svelte.dev/e/hydration_attribute_changed`,bl,$l):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function $g(t){ke?console.warn(`%c[svelte] hydration_html_changed
|
|
30
30
|
%c${t?`The value of an \`{@html ...}\` block ${t} changed between server and client renders. The client value will be ignored in favour of the server value`:"The value of an `{@html ...}` block changed between server and client renders. The client value will be ignored in favour of the server value"}
|
|
31
|
-
https://svelte.dev/e/hydration_html_changed`,
|
|
31
|
+
https://svelte.dev/e/hydration_html_changed`,bl,$l):console.warn("https://svelte.dev/e/hydration_html_changed")}function Zs(t){ke?console.warn(`%c[svelte] hydration_mismatch
|
|
32
32
|
%c${t?`Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${t}`:"Hydration failed because the initial UI does not match what was rendered on the server"}
|
|
33
|
-
https://svelte.dev/e/hydration_mismatch`,
|
|
33
|
+
https://svelte.dev/e/hydration_mismatch`,bl,$l):console.warn("https://svelte.dev/e/hydration_mismatch")}function yg(){ke?console.warn(`%c[svelte] lifecycle_double_unmount
|
|
34
34
|
%cTried to unmount a component that was not mounted
|
|
35
|
-
https://svelte.dev/e/lifecycle_double_unmount`,
|
|
35
|
+
https://svelte.dev/e/lifecycle_double_unmount`,bl,$l):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function xg(){ke?console.warn("%c[svelte] select_multiple_invalid_value\n%cThe `value` property of a `<select multiple>` element should be an array, but it received a non-array value. The selection will be kept as is.\nhttps://svelte.dev/e/select_multiple_invalid_value",bl,$l):console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function jc(t){ke?console.warn(`%c[svelte] state_proxy_equality_mismatch
|
|
36
36
|
%cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${t}\` will produce unexpected results
|
|
37
|
-
https://svelte.dev/e/state_proxy_equality_mismatch`,
|
|
37
|
+
https://svelte.dev/e/state_proxy_equality_mismatch`,bl,$l):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}var et=!1;function co(t){et=t}var _t;function xi(t){if(t===null)throw Zs(),as;return _t=t}function qi(){return xi(Ko(_t))}function S(t){if(et){if(Ko(_t)!==null)throw Zs(),as;_t=t}}function li(t=1){if(et){for(var e=t,i=_t;e--;)i=Ko(i);_t=i}}function Sa(){for(var t=0,e=_t;;){if(e.nodeType===sr){var i=e.data;if(i===_a){if(t===0)return e;t-=1}else(i===Gs||i===Ys)&&(t+=1)}var o=Ko(e);e.remove(),e=o}}function Xc(t){if(!t||t.nodeType!==sr)throw Zs(),as;return t.data}function wg(){let t=Array.prototype,e=Array.__svelte_cleanup;e&&e();let{indexOf:i,lastIndexOf:o,includes:r}=t;t.indexOf=function(a,l){let d=i.call(this,a,l);if(d===-1){for(let s=l!=null?l:0;s<this.length;s+=1)if(vl(this[s])===a){jc("array.indexOf(...)");break}}return d},t.lastIndexOf=function(a,l){let d=o.call(this,a,l!=null?l:this.length-1);if(d===-1){for(let s=0;s<=(l!=null?l:this.length-1);s+=1)if(vl(this[s])===a){jc("array.lastIndexOf(...)");break}}return d},t.includes=function(a,l){let d=r.call(this,a,l);if(!d){for(let s=0;s<this.length;s+=1)if(vl(this[s])===a){jc("array.includes(...)");break}}return d},Array.__svelte_cleanup=()=>{t.indexOf=i,t.lastIndexOf=o,t.includes=r}}var Ca,Sg,ad,Cg,Tg;function Zc(){if(Ca===void 0){Ca=window,Sg=document,ad=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,i=Text.prototype;Cg=Fo(e,"firstChild").get,Tg=Fo(e,"nextSibling").get,Ep(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),Ep(i)&&(i.__t=void 0),ke&&(t.__svelte_meta=null,wg())}}function Tn(t=""){return document.createTextNode(t)}function wi(t){return Cg.call(t)}function Ko(t){return Tg.call(t)}function C(t,e){if(!et)return wi(t);var i=wi(_t);if(i===null)i=_t.appendChild(Tn());else if(e&&i.nodeType!==dl){var o=Tn();return i==null||i.before(o),xi(o),o}return xi(i),i}function ue(t,e){var r,a;if(!et){var i=wi(t);return i.nodeType===8&&i.data===""?Ko(i):i}if(e&&((r=_t)==null?void 0:r.nodeType)!==dl){var o=Tn();return(a=_t)==null||a.before(o),xi(o),o}return _t}function k(t,e=1,i=!1){let o=et?_t:t;for(var r;e--;)r=o,o=Ko(o);if(!et)return o;if(i&&(o==null?void 0:o.nodeType)!==dl){var a=Tn();return o===null?r==null||r.after(a):o.before(a),xi(a),a}return xi(o),o}function ld(t){t.textContent=""}function Fp(t){ht===null&&Nt===null&&rg(t),Nt!==null&&(Nt.f&256)!==0&&ht===null&&ng(),Is&&og(t)}function n$(t,e){var i=e.last;i===null?e.last=e.first=t:(i.next=t,t.prev=i,e.last=t)}function Ta(t,e,i,o=!0){var s;var r=ht;if(ke)for(;r!==null&&(r.f&262144)!==0;)r=r.parent;var a={ctx:Ht,deps:null,nodes_start:null,nodes_end:null,f:t|2048,first:null,fn:e,last:null,next:null,parent:r,prev:null,teardown:null,transitions:null,wv:0};if(ke&&(a.component_function=ar),i)try{_l(a),a.f|=32768}catch(u){throw Ki(a),u}else e!==null&&sd(a);var l=i&&a.deps===null&&a.first===null&&a.nodes_start===null&&a.teardown===null&&(a.f&1048704)===0;if(!l&&o&&(r!==null&&n$(a,r),Nt!==null&&(Nt.f&2)!==0)){var d=Nt;((s=d.effects)!=null?s:d.effects=[]).push(a)}return a}function Eo(t){let e=Ta(8,null,!1);return Cn(e,1024),e.teardown=t,e}function De(t){var r;Fp("$effect");var e=ht!==null&&(ht.f&32)!==0&&Ht!==null&&!Ht.m;if(ke&&ao(t,"name",{value:"$effect"}),e){var i=Ht;((r=i.e)!=null?r:i.e=[]).push({fn:t,effect:ht,reaction:Nt})}else{var o=Po(t);return o}}function ud(t){return Fp("$effect.pre"),ke&&ao(t,"name",{value:"$effect.pre"}),qo(t)}function tu(t){let e=Ta(64,t,!0);return()=>{Ki(e)}}function Eg(t){let e=Ta(64,t,!0);return(i={})=>new Promise(o=>{i.outro?Qn(e,()=>{Ki(e),o(void 0)}):(Ki(e),o(void 0))})}function Po(t){return Ta(4,t,!1)}function qo(t){return Ta(8,t,!0)}function D(t,e=[],i=Yr){if(ke)return qo(()=>{var r=ht,a=()=>t(...l.map(n));ao(r.fn,"name",{value:"{expression}"}),ao(a,"name",{value:"{expression}"});let l=e.map(i);Qi(a)});let o=e.map(i);return Qi(()=>t(...o.map(n)))}function Qi(t,e=0){return Ta(24|e,t,!0)}function Li(t,e=!0){return Ta(40,t,!0,e)}function Up(t){var e=t.teardown;if(e!==null){let i=Is,o=Nt;Bp(!0),Wi(null);try{e.call(null)}finally{Bp(i),Wi(o)}}}function zp(t,e=!1){var i=t.first;for(t.first=t.last=null;i!==null;){var o=i.next;(i.f&64)!==0?i.parent=null:Ki(i,e),i=o}}function Pg(t){for(var e=t.first;e!==null;){var i=e.next;(e.f&32)===0&&Ki(e),e=i}}function Ki(t,e=!0){var i=!1;(e||(t.f&524288)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(Wp(t.nodes_start,t.nodes_end),i=!0),zp(t,e&&!i),pd(t,0),Cn(t,16384);var o=t.transitions;if(o!==null)for(let a of o)a.stop();Up(t);var r=t.parent;r!==null&&r.first!==null&&Kp(t),ke&&(t.component_function=null),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function Wp(t,e){for(;t!==null;){var i=t===e?null:Ko(t);t.remove(),t=i}}function Kp(t){var e=t.parent,i=t.prev,o=t.next;i!==null&&(i.next=o),o!==null&&(o.prev=i),e!==null&&(e.first===t&&(e.first=o),e.last===t&&(e.last=i))}function Qn(t,e){var i=[];iu(t,i,!0),qp(i,()=>{Ki(t),e&&e()})}function qp(t,e){var i=t.length;if(i>0){var o=()=>--i||e();for(var r of t)r.out(o)}else e()}function iu(t,e,i){if((t.f&8192)===0){if(t.f^=8192,t.transitions!==null)for(let l of t.transitions)(l.is_global||i)&&e.push(l);for(var o=t.first;o!==null;){var r=o.next,a=(o.f&65536)!==0||(o.f&32)!==0;iu(o,e,a?i:!1),o=r}}}function ks(t){kg(t,!0)}function kg(t,e){if((t.f&8192)!==0){t.f^=8192;for(var i=t.first;i!==null;){var o=i.next,r=(i.f&65536)!==0||(i.f&32)!==0;kg(i,r?e:!1),i=o}if(t.transitions!==null)for(let a of t.transitions)(a.is_global||e)&&a.in()}}var fd=[],Qp=[];function Ag(){var t=fd;fd=[],Xs(t)}function r$(){var t=Qp;Qp=[],Xs(t)}function In(t){fd.length===0&&queueMicrotask(Ag),fd.push(t)}function Lg(){fd.length>0&&Ag(),Qp.length>0&&r$()}function Vg(t){var e=ht;if(ke&&t instanceof Error&&s$(t,e),(e.f&32768)===0){if((e.f&128)===0)throw t;e.fn(t)}else md(t,e)}function md(t,e){for(;e!==null;){if((e.f&128)!==0)try{e.fn(t);return}catch(i){}e=e.parent}throw t}var Mg=new WeakSet;function s$(t,e){var l,d;if(Mg.has(t))return;Mg.add(t);let i=Fo(t,"message");if(!(i&&!i.configurable)){for(var o=ad?" ":" ",r=`
|
|
38
38
|
${o}in ${((l=e.fn)==null?void 0:l.name)||"<unknown>"}`,a=e.ctx;a!==null;)r+=`
|
|
39
|
-
${o}in ${(d=a.function)==null?void 0:d[
|
|
39
|
+
${o}in ${(d=a.function)==null?void 0:d[zn].split("/").pop()}`,a=a.p;ao(t,"message",{value:t.message+`
|
|
40
40
|
${r}
|
|
41
|
-
`}),t.stack&&
|
|
41
|
+
`}),t.stack&&ao(t,"stack",{value:t.stack.split(`
|
|
42
42
|
`).filter(s=>!s.includes("svelte/src/internal")).join(`
|
|
43
|
-
`)})}}var Ia=!1,wl=null,Ea=!1,Ts=!1;function Np(t){Ts=t}var $d=[],yd=[],At=null,hr=!1;function Ui(t){At=t}var _t=null;function fo(t){_t=t}var tn=null;function jc(t){At!==null&&At.f&2097152&&(tn===null?tn=[At,[t]]:tn[1].push(t))}var Tn=null,_r=0,gr=null;function hg(t){gr=t}var Ng=1,ru=0,Is=!1,su=null;function dd(){return++Ng}function wa(t){var p,v;var e=t.f;if((e&2048)!==0)return!0;if((e&4096)!==0){var i=t.deps,o=(e&256)!==0;if(i!==null){var r,a,l=(e&512)!==0,d=o&&_t!==null&&!Is,s=i.length;if(l||d){var u=t,f=u.parent;for(r=0;r<s;r++)a=i[r],(l||!((p=a==null?void 0:a.reactions)!=null&&p.includes(u)))&&((v=a.reactions)!=null?v:a.reactions=[]).push(u);l&&(u.f^=512),d&&f!==null&&(f.f&256)===0&&(u.f^=256)}for(r=0;r<s;r++)if(a=i[r],wa(a)&&Rp(a),a.wv>t.wv)return!0}(!o||_t!==null&&!Is)&&wn(t,1024)}return!1}function Dg(t,e,i=!0){var o=t.reactions;if(o!==null)for(var r=0;r<o.length;r++){var a=o[r];tn!=null&&tn[1].includes(t)&&tn[0]===At||((a.f&2)!==0?Dg(a,e,!1):e===a&&(i?wn(a,2048):(a.f&1024)!==0&&wn(a,4096),ud(a)))}}function Yc(t){var $,y;var e=Tn,i=_r,o=gr,r=At,a=Is,l=tn,d=Bt,s=hr,u=t.f;Tn=null,_r=0,gr=null,Is=(u&256)!==0&&(hr||!Ea||At===null),At=(u&96)===0?t:null,tn=null,sd(t.ctx),hr=!1,ru++,t.f|=2097152;try{var f=(0,t.fn)(),p=t.deps;if(Tn!==null){var v;if(hd(t,_r),p!==null&&_r>0)for(p.length=_r+Tn.length,v=0;v<Tn.length;v++)p[_r+v]=Tn[v];else t.deps=p=Tn;if(!Is||(u&2)!==0&&t.reactions!==null)for(v=_r;v<p.length;v++)((y=($=p[v]).reactions)!=null?y:$.reactions=[]).push(t)}else p!==null&&_r<p.length&&(hd(t,_r),p.length=_r);if(cs()&&gr!==null&&!hr&&p!==null&&(t.f&6146)===0)for(v=0;v<gr.length;v++)Dg(gr[v],t);return r!==null&&r!==t&&(ru++,gr!==null&&(o===null?o=gr:o.push(...gr))),f}catch(h){Mg(h)}finally{Tn=e,_r=i,gr=o,At=r,Is=a,tn=l,sd(d),hr=s,t.f^=2097152}}function a$(t,e){let i=e.reactions;if(i!==null){var o=jv.call(i,t);if(o!==-1){var r=i.length-1;r===0?i=e.reactions=null:(i[o]=i[r],i.pop())}}i===null&&(e.f&2)!==0&&(Tn===null||!Tn.includes(e))&&(wn(e,4096),(e.f&768)===0&&(e.f^=512),Gc(e),hd(e,0))}function hd(t,e){var i=t.deps;if(i!==null)for(var o=e;o<i.length;o++)a$(t,i[o])}function $l(t){var e=t.f;if((e&16384)===0){wn(t,1024);var i=_t,o=Ea;if(_t=t,Ea=!0,Ee){var r=mr;ad(t.component_function)}try{(e&16)!==0?Eg(t):Fp(t),Bp(t);var a=Yc(t);if(t.teardown=typeof a=="function"?a:null,t.wv=Ng,Ee&&ds&&(t.f&2048)!==0&&t.deps!==null)for(var l of t.deps)l.set_during_effect&&(l.wv=dd(),l.set_during_effect=!1);Ee&&yd.push(t)}finally{Ea=o,_t=i,Ee&&ad(r)}}}function Vg(){console.error("Last ten effects were: ",yd.slice(-10).map(t=>t.fn)),yd=[]}function l$(){try{rg()}catch(t){if(Ee&&po(t,"stack",{value:""}),wl!==null)if(Ee)try{bd(t,wl)}catch(e){throw Vg(),e}else bd(t,wl);else throw Ee&&Vg(),t}}function qp(){var t=Ea;try{var e=0;for(Ea=!0;$d.length>0;){e++>1e3&&l$();var i=$d,o=i.length;$d=[];for(var r=0;r<o;r++){var a=c$(i[r]);d$(a)}_l.clear()}}finally{Ia=!1,Ea=t,wl=null,Ee&&(yd=[])}}function d$(t){var e=t.length;if(e!==0)for(var i=0;i<e;i++){var o=t[i];(o.f&24576)===0&&wa(o)&&($l(o),o.deps===null&&o.first===null&&o.nodes_start===null&&(o.teardown===null?Up(o):o.fn=null))}}function ud(t){Ia||(Ia=!0,queueMicrotask(qp));for(var e=wl=t;e.parent!==null;){e=e.parent;var i=e.f;if((i&96)!==0){if((i&1024)===0)return;e.f^=1024}}$d.push(e)}function c$(t){for(var e=[],i=t;i!==null;){var o=i.f,r=(o&96)!==0,a=r&&(o&1024)!==0;if(!a&&(o&8192)===0){(o&4)!==0?e.push(i):r?i.f^=1024:wa(i)&&$l(i);var l=i.first;if(l!==null){i=l;continue}}var d=i.parent;for(i=i.next;i===null&&d!==null;)i=d.next,d=d.parent}return e}function Sl(t){var e;for(t&&(Ia=!0,qp(),Ia=!0,e=t());;){if(Ag(),$d.length===0)return Ia=!1,wl=null,Ee&&(yd=[]),e;Ia=!0,qp()}}async function vo(){await Promise.resolve(),Sl()}function n(t){var e=t.f,i=(e&2)!==0;if(su!==null&&su.add(t),At!==null&&!hr){if(!(tn!=null&&tn[1].includes(t))||tn[0]!==At){var o=At.deps;t.rv<ru&&(t.rv=ru,Tn===null&&o!==null&&o[_r]===t?_r++:Tn===null?Tn=[t]:(!Is||!Tn.includes(t))&&Tn.push(t))}}else if(i&&t.deps===null&&t.effects===null){var r=t,a=r.parent;a!==null&&(a.f&256)===0&&(r.f^=256)}if(i&&(r=t,wa(r)&&Rp(r)),Ee&&ds&&!hr&&rd!==null&&At!==null&&rd.reaction===At)if(t.trace)t.trace();else{var l=Cs("TracedAt");if(l){var d=rd.entries.get(t);d===void 0&&(d={traces:[]},rd.entries.set(t,d));var s=d.traces[d.traces.length-1];l.stack!==(s==null?void 0:s.stack)&&d.traces.push(l)}}return Ts&&_l.has(t)?_l.get(t):t.v}function St(t){var e=hr;try{return hr=!0,t()}finally{hr=e}}var u$=-7169;function wn(t,e){t.f=t.f&u$|e}function lu(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(Jo in t)au(t);else if(!Array.isArray(t))for(let e in t){let i=t[e];typeof i=="object"&&i&&Jo in i&&au(i)}}}function au(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let o in t)try{au(t[o],e)}catch(r){}let i=ba(t);if(i!==Object.prototype&&i!==Array.prototype&&i!==Map.prototype&&i!==Set.prototype&&i!==Date.prototype){let o=zc(i);for(let r in o){let a=o[r].get;if(a)try{a.call(t)}catch(l){}}}}}function Qp(t,e){if(e){let i=document.body;t.autofocus=!0,Cn(()=>{document.activeElement===i&&t.focus()})}}function xd(t){var e=At,i=_t;Ui(null),fo(null);try{return t()}finally{Ui(e),fo(i)}}var Gp=new Set,du=new Set;function ka(t){if(!et)return;t.removeAttribute("onload"),t.removeAttribute("onerror");let e=t.__e;e!==void 0&&(t.__e=void 0,queueMicrotask(()=>{t.isConnected&&t.dispatchEvent(e)}))}function Yp(t,e,i,o={}){function r(a){if(o.capture||Cl.call(e,a),!a.cancelBubble)return xd(()=>i==null?void 0:i.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Cn(()=>{e.addEventListener(t,r,o)}):e.addEventListener(t,r,o),r}function nt(t,e,i,o,r){var a={capture:o,passive:r},l=Yp(t,e,i,a);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Do(()=>{e.removeEventListener(t,l,a)})}function Ye(t){for(var e=0;e<t.length;e++)Gp.add(t[e]);for(var i of du)i(t)}function Cl(t){var T;var e=this,i=e.ownerDocument,o=t.type,r=((T=t.composedPath)==null?void 0:T.call(t))||[],a=r[0]||t.target,l=0,d=t.__root;if(d){var s=r.indexOf(d);if(s!==-1&&(e===document||e===window)){t.__root=e;return}var u=r.indexOf(e);if(u===-1)return;s<=u&&(l=s)}if(a=r[l]||t.target,a!==e){po(t,"currentTarget",{configurable:!0,get(){return a||i}});var f=At,p=_t;Ui(null),fo(null);try{for(var v,$=[];a!==null;){var y=a.assignedSlot||a.parentNode||a.host||null;try{var h=a["__"+o];if(h!=null&&(!a.disabled||t.target===a))if(pr(h)){var[x,...I]=h;x.apply(a,[t,...I])}else h.call(a,t)}catch(N){v?$.push(N):v=N}if(t.cancelBubble||y===e||y===null)break;a=y}if(v){for(let N of $)queueMicrotask(()=>{throw N});throw v}}finally{t.__root=e,delete t.currentTarget,Ui(f),fo(p)}}}var f$;function Og(){f$=void 0}function Tl(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function Bo(t,e){var i=_t;i.nodes_start===null&&(i.nodes_start=t,i.nodes_end=e)}function M(t,e){var i=(e&1)!==0,o=(e&2)!==0,r,a=!t.startsWith("<!>");return()=>{if(et)return Bo(bt,null),bt;r===void 0&&(r=Tl(a?t:"<!>"+t),i||(r=wi(r)));var l=o||pd?document.importNode(r,!0):r.cloneNode(!0);if(i){var d=wi(l),s=l.lastChild;Bo(d,s)}else Bo(l,l);return l}}function g$(t,e,i="svg"){var o=!t.startsWith("<!>"),r=(e&1)!==0,a=`<${i}>${o?t:"<!>"+t}</${i}>`,l;return()=>{if(et)return Bo(bt,null),bt;if(!l){var d=Tl(a),s=wi(d);if(r)for(l=document.createDocumentFragment();wi(s);)l.appendChild(wi(s));else l=wi(s)}var u=l.cloneNode(!0);if(r){var f=wi(u),p=u.lastChild;Bo(f,p)}else Bo(u,u);return u}}function Te(t,e){return g$(t,e,"svg")}function ps(t=""){if(!et){var e=Sn(t+"");return Bo(e,e),e}var i=bt;return i.nodeType!==ul&&(i.before(i=Sn()),$i(i)),Bo(i,i),i}function Ae(){if(et)return Bo(bt,null),bt;var t=document.createDocumentFragment(),e=document.createComment(""),i=Sn();return t.append(e,i),Bo(e,i),t}function b(t,e){if(et){_t.nodes_end=bt,Wi();return}t!==null&&t.before(e)}var h$=/\r/g;function Fg(t){t=t.replace(h$,"");let e=5381,i=t.length;for(;i--;)e=(e<<5)-e^t.charCodeAt(i);return(e>>>0).toString(36)}function Hg(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}var _$=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Ug(t){return _$.includes(t)}var b$=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory","defer","disablepictureinpicture","disableremoteplayback"];var $$={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function zg(t){var e;return t=t.toLowerCase(),(e=$$[t])!=null?e:t}var v3=[...b$,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var y$=["touchstart","touchmove"];function Wg(t){return y$.includes(t)}var x$=["$state","$state.raw","$derived","$derived.by"],g3=[...x$,"$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$inspect","$inspect().with","$inspect.trace","$host"];var w$=["textarea","script","style","title"];function Kg(t){return w$.includes(t)}function cu(t){return t==null?void 0:t.replace(/\//g,"/")}var wd=!0;function uu(t){wd=t}function ve(t,e){var o;var i=e==null?"":typeof e=="object"?e+"":e;i!==((o=t.__t)!=null?o:t.__t=t.nodeValue)&&(t.__t=i,t.nodeValue=i+"")}function jr(t,e){return qg(t,e)}function Xp(t,e){var l;Jc(),e.intro=(l=e.intro)!=null?l:!1;let i=e.target,o=et,r=bt;try{for(var a=wi(i);a&&(a.nodeType!==fr||a.data!==Gs);)a=on(a);if(!a)throw as;mo(!0),$i(a),Wi();let d=qg(t,{...e,anchor:a});if(bt===null||bt.nodeType!==fr||bt.data!==_a)throw Zs(),as;return mo(!1),d}catch(d){if(d===as)return e.recover===!1&&sg(),Jc(),fd(i),mo(!1),jr(t,e);throw d}finally{mo(o),$i(r),Og()}}var Il=new Map;function qg(t,{target:e,anchor:i,props:o={},events:r,context:a,intro:l=!0}){Jc();var d=new Set,s=p=>{for(var v=0;v<p.length;v++){var $=p[v];if(!d.has($)){d.add($);var y=Wg($);e.addEventListener($,Cl,{passive:y});var h=Il.get($);h===void 0?(document.addEventListener($,Cl,{passive:y}),Il.set($,1)):Il.set($,h+1)}}};s(nd(Gp)),du.add(s);var u=void 0,f=Ig(()=>{var p=i!=null?i:e.appendChild(Sn());return Oi(()=>{if(a){B({});var v=Bt;v.c=a}r&&(o.$$events=r),et&&Bo(p,null),wd=l,u=t(p,o)||{},wd=!0,et&&(_t.nodes_end=bt),a&&F()}),()=>{var y;for(var v of d){e.removeEventListener(v,Cl);var $=Il.get(v);--$===0?(document.removeEventListener(v,Cl),Il.delete(v)):Il.set(v,$)}du.delete(s),p!==i&&((y=p.parentNode)==null||y.removeChild(p))}});return jp.set(u,f),u}var jp=new WeakMap;function Pa(t,e){let i=jp.get(t);return i?(jp.delete(t),i(e)):(Ee&&$g(),Promise.resolve())}function ei(t,e,...i){var o=t,r=ht,a;Ki(()=>{r!==(r=e())&&(a&&(zi(a),a=null),Ee&&r==null&&ag(),a=Oi(()=>r(o,...i)))},65536),et&&(o=bt)}if(Ee){let t=function(e){if(!(e in globalThis)){let i;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(i!==void 0)return i;cg(e)},set:o=>{i=o}})}};I$=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var I$;function Et(t){Bt===null&&ml("onMount"),ls&&Bt.l!==null?T$(Bt).m.push(t):Ne(()=>{let e=St(t);if(typeof e=="function")return e})}function pn(t){Bt===null&&ml("onDestroy"),Et(()=>()=>St(t))}function T$(t){var i;var e=t.l;return(i=e.u)!=null?i:e.u={a:[],b:[],m:[]}}var Qg=new Map;function Gg(t,e){var i=Qg.get(t);i||(i=new Set,Qg.set(t,i)),i.add(e)}function R(t,e,[i,o]=[0,0]){et&&i===0&&Wi();var r=t,a=null,l=null,d=to,s=i>0?65536:0,u=!1;let f=(v,$=!0)=>{u=!0,p($,v)},p=(v,$)=>{if(d===(d=v))return;let y=!1;if(et&&o!==-1){if(i===0){let x=Zc(r);x===Gs?o=0:x===Ys?o=1/0:(o=parseInt(x.substring(1)),o!==o&&(o=d?1/0:-1))}let h=o>i;!!d===h&&(r=Sa(),$i(r),mo(!1),y=!0,o=-1)}d?(a?ks(a):$&&(a=Oi(()=>$(r))),l&&Kn(l,()=>{l=null})):(l?ks(l):$&&(l=Oi(()=>$(r,[i+1,o]))),a&&Kn(a,()=>{a=null})),y&&mo(!0)};Ki(()=>{u=!1,e(f),u||p(null,null)},s),et&&(r=bt)}function Ps(t,e,i){et&&Wi();var o=t,r=to,a,l=cs()?eg:pl;Ki(()=>{l(r,r=e())&&(a&&Kn(a),a=Oi(()=>i(o)))}),et&&(o=bt)}var ea=null;function ef(t){ea=t}function Sd(t,e){return e}function P$(t,e,i,o){for(var r=[],a=e.length,l=0;l<a;l++)ou(e[l].e,r,!0);var d=a>0&&r.length===0&&i!==null;if(d){var s=i.parentNode;fd(s),s.append(i),o.clear(),Js(t,e[0].prev,e[a-1].next)}zp(r,()=>{for(var u=0;u<a;u++){var f=e[u];d||(o.delete(f.k),Js(t,f.prev,f.next)),zi(f.e,!d)}})}function bi(t,e,i,o,r,a=null){var l=t,d={flags:e,items:new Map,first:null},s=(e&4)!==0;if(s){var u=t;l=et?$i(wi(u)):u.appendChild(Sn())}et&&Wi();var f=null,p=!1,v=xn(()=>{var $=i();return pr($)?$:$==null?[]:nd($)});Ki(()=>{var $=n(v),y=$.length;if(p&&y===0)return;p=y===0;let h=!1;if(et){var x=Zc(l)===Ys;x!==(y===0)&&(l=Sa(),$i(l),mo(!1),h=!0)}if(et){for(var I=null,T,N=0;N<y;N++){if(bt.nodeType===fr&&bt.data===_a){l=bt,h=!0,mo(!1);break}var L=$[N],E=o(L,N);T=Xg(bt,d,I,null,L,E,N,r,e,i),d.items.set(E,T),I=T}y>0&&$i(Sa())}et||A$($,d,l,r,e,o,i),a!==null&&(y===0?f?ks(f):f=Oi(()=>a(l)):f!==null&&Kn(f,()=>{f=null})),h&&mo(!0),n(v)}),et&&(l=bt)}function A$(t,e,i,o,r,a,l){var J,we,pe,re;var d=(r&8)!==0,s=(r&3)!==0,u=t.length,f=e.items,p=e.first,v=p,$,y=null,h,x=[],I=[],T,N,L,E;if(d)for(E=0;E<u;E+=1)T=t[E],N=a(T,E),L=f.get(N),L!==void 0&&((J=L.a)==null||J.measure(),(h!=null?h:h=new Set).add(L));for(E=0;E<u;E+=1){if(T=t[E],N=a(T,E),L=f.get(N),L===void 0){var k=v?v.e.nodes_start:i;y=Xg(k,e,y,y===null?e.first:y.next,T,N,E,o,r,l),f.set(N,y),x=[],I=[],v=y.next;continue}if(s&&L$(L,T,E,r),(L.e.f&8192)!==0&&(ks(L.e),d&&((we=L.a)==null||we.unfix(),(h!=null?h:h=new Set).delete(L))),L!==v){if($!==void 0&&$.has(L)){if(x.length<I.length){var K=I[0],H;y=K.prev;var z=x[0],j=x[x.length-1];for(H=0;H<x.length;H+=1)Yg(x[H],K,i);for(H=0;H<I.length;H+=1)$.delete(I[H]);Js(e,z.prev,j.next),Js(e,y,z),Js(e,j,K),v=K,y=j,E-=1,x=[],I=[]}else $.delete(L),Yg(L,v,i),Js(e,L.prev,L.next),Js(e,L,y===null?e.first:y.next),Js(e,y,L),y=L;continue}for(x=[],I=[];v!==null&&v.k!==N;)(v.e.f&8192)===0&&($!=null?$:$=new Set).add(v),I.push(v),v=v.next;if(v===null)continue;L=v}x.push(L),y=L,v=L.next}if(v!==null||$!==void 0){for(var ae=$===void 0?[]:nd($);v!==null;)(v.e.f&8192)===0&&ae.push(v),v=v.next;var X=ae.length;if(X>0){var ne=(r&4)!==0&&u===0?i:null;if(d){for(E=0;E<X;E+=1)(pe=ae[E].a)==null||pe.measure();for(E=0;E<X;E+=1)(re=ae[E].a)==null||re.fix()}P$(e,ae,ne,f)}}d&&Cn(()=>{var be;if(h!==void 0)for(L of h)(be=L.a)==null||be.apply()}),_t.first=e.first&&e.first.e,_t.last=y&&y.e}function L$(t,e,i,o){(o&1)!==0&&bl(t.v,e),(o&2)!==0?bl(t.i,i):t.i=i}function Xg(t,e,i,o,r,a,l,d,s,u){var f=ea,p=(s&1)!==0,v=(s&16)===0,$=p?v?us(r,!1,!1):Mr(r):r,y=(s&2)===0?l:Mr(l);Ee&&p&&($.trace=()=>{var x=typeof y=="number"?l:y.v;u()[x]});var h={i:y,v:$,k:a,a:null,e:null,prev:i,next:o};ea=h;try{return h.e=Oi(()=>d(t,$,y,u),et),h.e.prev=i&&i.e,h.e.next=o&&o.e,i===null?e.first=h:(i.next=h,i.e.next=h.e),o!==null&&(o.prev=h,o.e.prev=h.e),h}finally{ea=f}}function Yg(t,e,i){for(var o=t.next?t.next.e.nodes_start:i,r=e?e.e.nodes_start:i,a=t.e.nodes_start;a!==o;){var l=on(a);r.before(a),a=l}}function Js(t,e,i){e===null?t.first=i:(e.next=i,e.e.next=i&&i.e),i!==null&&(i.prev=e,i.e.prev=e&&e.e)}function M$(t,e,i){var a,l;if(!e||e===Fg(String(i!=null?i:"")))return;let o,r=(a=t.__svelte_meta)==null?void 0:a.loc;r?o=`near ${r.file}:${r.line}:${r.column}`:(l=mr)!=null&&l[Hn]&&(o=`in ${mr[Hn]}`),bg(cu(o))}function Cd(t,e,i=!1,o=!1,r=!1){var a=t,l="";O(()=>{var $;var d=_t;if(l===(l=($=e())!=null?$:"")){et&&Wi();return}if(d.nodes_start!==null&&(Hp(d.nodes_start,d.nodes_end),d.nodes_start=d.nodes_end=null),l!==""){if(et){for(var s=bt.data,u=Wi(),f=u;u!==null&&(u.nodeType!==fr||u.data!=="");)f=u,u=on(u);if(u===null)throw Zs(),as;Ee&&!r&&M$(u.parentNode,s,l),Bo(bt,f),a=$i(u);return}var p=l+"";i?p=`<svg>${p}</svg>`:o&&(p=`<math>${p}</math>`);var v=Tl(p);if((i||o)&&(v=wi(v)),Bo(wi(v),v.lastChild),i||o)for(;wi(v);)a.before(wi(v));else a.before(v)}})}function Bi(t,e,i){et&&Wi();var o=t,r,a;Ki(()=>{r!==(r=e())&&(a&&(Kn(a),a=null),r&&(a=Oi(()=>i(o,r))))},65536),et&&(o=bt)}function Aa(t,e,i,o,r,a){var y;let l=et;et&&Wi();var d=Ee&&a&&((y=Bt)==null?void 0:y.function[Hn]),s,u,f=null;et&&bt.nodeType===Kc&&(f=bt,Wi());var p=et?bt:t,v,$=ea;Ki(()=>{let h=e()||null;var x=r?r():i||h==="svg"?Hc:null;if(h!==s){var I=ea;ef($),v&&(h===null?Kn(v,()=>{v=null,u=null}):h===u?ks(v):(zi(v),uu(!1))),h&&h!==u&&(v=Oi(()=>{if(f=et?f:x?document.createElementNS(x,h):document.createElement(h),Ee&&a&&(f.__svelte_meta={loc:{file:d,line:a[0],column:a[1]}}),Bo(f,f),o){et&&Kg(h)&&f.append(document.createComment(""));var T=et?wi(f):f.appendChild(Sn());et&&(T===null?mo(!1):$i(T)),o(f,T)}_t.nodes_end=f,p.before(f)})),s=h,s&&(u=s),uu(!0),ef(I)}},65536),l&&(mo(!0),$i(p))}var of;function Zg(t){return of=t.target,new tf(t)}var As,Vr,tf=class{constructor(e){Qs(this,As);Qs(this,Vr);var a,l;var i=new Map,o=(d,s)=>{var u=us(s,!1,!1);return i.set(d,u),u};let r=new Proxy({...e.props||{},$$events:{}},{get(d,s){var u;return n((u=i.get(s))!=null?u:o(s,Reflect.get(d,s)))},has(d,s){var u;return s===cl?!0:(n((u=i.get(s))!=null?u:o(s,Reflect.get(d,s))),Reflect.has(d,s))},set(d,s,u){var f;return D((f=i.get(s))!=null?f:o(s,u),u),Reflect.set(d,s,u)}});dl(this,Vr,(e.hydrate?Xp:jr)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:(a=e.intro)!=null?a:!1,recover:e.recover})),(!((l=e==null?void 0:e.props)!=null&&l.$$host)||e.sync===!1)&&Sl(),dl(this,As,r.$$events);for(let d of Object.keys(Di(this,Vr)))d==="$set"||d==="$destroy"||d==="$on"||po(this,d,{get(){return Di(this,Vr)[d]},set(s){Di(this,Vr)[d]=s},enumerable:!0});Di(this,Vr).$set=d=>{Object.assign(r,d)},Di(this,Vr).$destroy=()=>{Pa(Di(this,Vr))}}$set(e){Di(this,Vr).$set(e)}$on(e,i){Di(this,As)[e]=Di(this,As)[e]||[];let o=(...r)=>i.call(this,...r);return Di(this,As)[e].push(o),()=>{Di(this,As)[e]=Di(this,As)[e].filter(r=>r!==o)}}$destroy(){Di(this,Vr).$destroy()}};As=new WeakMap,Vr=new WeakMap;function Q(t,e){Cn(()=>{var r,a,l;var i=t.getRootNode(),o=i.host?i:(l=(r=i.head)!=null?r:i.ownerDocument.head)!=null?l:(a=of)==null?void 0:a.parentNode;if(!(o!=null&&o.querySelector("#"+e.hash))){let d=document.createElement("style");d.id=e.hash,d.textContent=e.code,o.appendChild(d),Ee&&Gg(e.hash,d)}})}function Ls(t,e){var i=void 0,o;Ki(()=>{i!==(i=e())&&(o&&(zi(o),o=null),i&&(o=Oi(()=>{Oo(()=>i(t))})))})}function Jg(t){var e,i,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e<r;e++)t[e]&&(i=Jg(t[e]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function eh(){for(var t,e,i=0,o="",r=arguments.length;i<r;i++)(t=arguments[i])&&(e=Jg(t))&&(o&&(o+=" "),o+=e);return o}function Td(t){return typeof t=="object"?eh(t):t!=null?t:""}var th=[...`
|
|
44
|
-
\r\f \v\uFEFF`];function oh(t,e,i){var o=t==null?"":""+t;if(e&&(o=o?o+" "+e:e),i){for(var r in i)if(i[r])o=o?o+" "+r:r;else if(o.length)for(var a=r.length,l=0;(l=o.indexOf(r,l))>=0;){var d=l+a;(l===0||th.includes(o[l-1]))&&(d===o.length||th.includes(o[d]))?o=(l===0?"":o.substring(0,l))+o.substring(d+1):l=d}}return o===""?null:o}function ih(t,e=!1){var i=e?" !important;":";",o="";for(var r in t){var a=t[r];a!=null&&a!==""&&(o+=" "+r+": "+a+i)}return o}function nf(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function nh(t,e){if(e){var i="",o,r;if(Array.isArray(e)?(o=e[0],r=e[1]):o=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var a=!1,l=0,d=!1,s=[];o&&s.push(...Object.keys(o).map(nf)),r&&s.push(...Object.keys(r).map(nf));var u=0,f=-1;let h=t.length;for(var p=0;p<h;p++){var v=t[p];if(d?v==="/"&&t[p-1]==="*"&&(d=!1):a?a===v&&(a=!1):v==="/"&&t[p+1]==="*"?d=!0:v==='"'||v==="'"?a=v:v==="("?l++:v===")"&&l--,!d&&a===!1&&l===0){if(v===":"&&f===-1)f=p;else if(v===";"||p===h-1){if(f!==-1){var $=nf(t.substring(u,f).trim());if(!s.includes($)){v!==";"&&p++;var y=t.substring(u,p).trim();i+=" "+y+";"}}u=p+1,f=-1}}}}return o&&(i+=ih(o)),r&&(i+=ih(r,!0)),i=i.trim(),i===""?null:i}return t==null?null:String(t)}function se(t,e,i,o,r,a){var l=t.__className;if(et||l!==i||l===void 0){var d=oh(i,o,a);(!et||d!==t.getAttribute("class"))&&(d==null?t.removeAttribute("class"):e?t.className=d:t.setAttribute("class",d)),t.__className=i}else if(a&&r!==a)for(var s in a){var u=!!a[s];(r==null||u!==!!r[s])&&t.classList.toggle(s,u)}return a}function rf(t,e={},i,o){for(var r in i){var a=i[r];e[r]!==a&&(i[r]==null?t.style.removeProperty(r):t.style.setProperty(r,a,o))}}function qe(t,e,i,o){var r=t.__style;if(et||r!==e){var a=nh(e,o);(!et||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else o&&(Array.isArray(o)?(rf(t,i==null?void 0:i[0],o[0]),rf(t,i==null?void 0:i[1],o[1],"important")):rf(t,i,o));return o}function Id(t,e,i){if(t.multiple){if(e==null)return;if(!pr(e))return yg();for(var o of t.options)o.selected=e.includes(rh(o));return}for(o of t.options){var r=rh(o);if(Pp(r,e)){o.selected=!0;return}}(!i||e!==void 0)&&(t.selectedIndex=-1)}function sf(t){var e=new MutationObserver(()=>{Id(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Do(()=>{e.disconnect()})}function rh(t){return"__value"in t?t.__value:t.value}var El=Symbol("class"),kl=Symbol("style"),lh=Symbol("is custom element"),dh=Symbol("is html");function ch(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Le(t,e,i,o){var r=ph(t);if(et&&(r[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){o||H$(t,e,i!=null?i:"");return}r[e]!==(r[e]=i)&&(e==="loading"&&(t[Jv]=i),i==null?t.removeAttribute(e):typeof i!="string"&&fh(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function uh(t,e,i,o,r=!1){var L;var a=ph(t),l=a[lh],d=!a[dh];let s=et&&l;s&&mo(!1);var u=e||{},f=t.tagName==="OPTION";for(var p in e)p in i||(i[p]=null);i.class?i.class=Td(i.class):(o||i[El])&&(i.class=null),i[kl]&&((L=i.style)!=null||(i.style=null));var v=fh(t);for(let E in i){let k=i[E];if(f&&E==="value"&&k==null){t.value=t.__value="",u[E]=k;continue}if(E==="class"){var $=t.namespaceURI==="http://www.w3.org/1999/xhtml";se(t,$,k,o,e==null?void 0:e[El],i[El]),u[E]=k,u[El]=i[El];continue}if(E==="style"){qe(t,k,e==null?void 0:e[kl],i[kl]),u[E]=k,u[kl]=i[kl];continue}var y=u[E];if(!(k===y&&!(k===void 0&&t.hasAttribute(E)))){u[E]=k;var h=E[0]+E[1];if(h!=="$$")if(h==="on"){let K={},H="$$"+E,z=E.slice(2);var x=Ug(z);if(Hg(z)&&(z=z.slice(0,-7),K.capture=!0),!x&&y){if(k!=null)continue;t.removeEventListener(z,u[H],K),u[H]=null}if(k!=null)if(x)t[`__${z}`]=k,Ye([z]);else{let j=function(ae){u[E].call(this,ae)};var N=j;u[H]=Yp(z,t,j,K)}else x&&(t[`__${z}`]=void 0)}else if(E==="style")Le(t,E,k);else if(E==="autofocus")Qp(t,!!k);else if(!l&&(E==="__value"||E==="value"&&k!=null))t.value=t.__value=k;else if(E==="selected"&&f)ch(t,k);else{var I=E;d||(I=zg(I));var T=I==="defaultValue"||I==="defaultChecked";if(k==null&&!l&&!T)if(a[E]=null,I==="value"||I==="checked"){let K=t,H=e===void 0;if(I==="value"){let z=K.defaultValue;K.removeAttribute(I),K.defaultValue=z,K.value=K.__value=H?z:null}else{let z=K.defaultChecked;K.removeAttribute(I),K.defaultChecked=z,K.checked=H?z:!1}}else t.removeAttribute(E);else T||v.includes(I)&&(l||typeof k!="string")?t[I]=k:typeof k!="function"&&Le(t,I,k,r)}}}return s&&mo(!0),u}function io(t,e,i=[],o,r=!1,a=Qr){let l=i.map(a);var d=void 0,s={},u=t.nodeName==="SELECT",f=!1;if(Ki(()=>{var v=e(...l.map(n)),$=uh(t,d,v,o,r);f&&u&&"value"in v&&Id(t,v.value,!1);for(let h of Object.getOwnPropertySymbols(s))v[h]||zi(s[h]);for(let h of Object.getOwnPropertySymbols(v)){var y=v[h];h.description===xp&&(!d||y!==d[h])&&(s[h]&&zi(s[h]),s[h]=Oi(()=>Ls(t,()=>y))),$[h]=y}d=$}),u){var p=t;Oo(()=>{Id(p,d.value),sf(p)})}f=!0}function ph(t){var e;return(e=t.__attributes)!=null?e:t.__attributes={[lh]:t.nodeName.includes("-"),[dh]:t.namespaceURI===qv}}var sh=new Map;function fh(t){var e=sh.get(t.nodeName);if(e)return e;sh.set(t.nodeName,e=[]);for(var i,o=t,r=Element.prototype;r!==o;){i=zc(o);for(var a in i)i[a].set&&e.push(a);o=ba(o)}return e}function H$(t,e,i){var o;Ee&&(e==="srcset"&&U$(t,i)||af((o=t.getAttribute(e))!=null?o:"",i)||_g(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function af(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function ah(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function U$(t,e){var i=ah(t.srcset),o=ah(e);return o.length===i.length&&o.every(([r,a],l)=>a===i[l][1]&&(af(i[l][0],r)||af(r,i[l][0])))}var z$=Uc?()=>performance.now():()=>Date.now(),Xr={tick:t=>(Uc?requestAnimationFrame:ht)(t),now:()=>z$(),tasks:new Set};function mh(){let t=Xr.now();Xr.tasks.forEach(e=>{e.c(t)||(Xr.tasks.delete(e),e.f())}),Xr.tasks.size!==0&&Xr.tick(mh)}function vh(t){let e;return Xr.tasks.size===0&&Xr.tick(mh),{promise:new Promise(i=>{Xr.tasks.add(e={c:t,f:i})}),abort(){Xr.tasks.delete(e)}}}function pu(t,e){xd(()=>{t.dispatchEvent(new CustomEvent(e))})}function Q$(t){if(t==="float")return"cssFloat";if(t==="offset")return"cssOffset";if(t.startsWith("--"))return t;let e=t.split("-");return e.length===1?e[0]:e[0]+e.slice(1).map(i=>i[0].toUpperCase()+i.slice(1)).join("")}function gh(t){let e={},i=t.split(";");for(let o of i){let[r,a]=o.split(":");if(!r||a===void 0)break;let l=Q$(r.trim());e[l]=a.trim()}return e}var G$=t=>t;function Zr(t,e,i,o){var N;var r=(t&1)!==0,a=(t&2)!==0,l=r&&a,d=(t&4)!==0,s=l?"both":r?"in":"out",u,f=e.inert,p=e.style.overflow,v,$;function y(){var k;var L=At,E=_t;Ui(null),fo(null);try{return u!=null?u:u=i()(e,(k=o==null?void 0:o())!=null?k:{},{direction:s})}finally{Ui(L),fo(E)}}var h={is_global:d,in(){var L;if(e.inert=f,!r){$==null||$.abort(),(L=$==null?void 0:$.reset)==null||L.call($);return}a||v==null||v.abort(),pu(e,"introstart"),v=lf(e,y(),$,1,()=>{pu(e,"introend"),v==null||v.abort(),v=u=void 0,e.style.overflow=p})},out(L){if(!a){L==null||L(),u=void 0;return}e.inert=!0,pu(e,"outrostart"),$=lf(e,y(),v,0,()=>{pu(e,"outroend"),L==null||L()})},stop:()=>{v==null||v.abort(),$==null||$.abort()}},x=_t;if(((N=x.transitions)!=null?N:x.transitions=[]).push(h),r&&wd){var I=d;if(!I){for(var T=x.parent;T&&(T.f&65536)!==0;)for(;(T=T.parent)&&(T.f&16)===0;);I=!T||(T.f&32768)!==0}I&&Oo(()=>{St(()=>h.in())})}}function lf(t,e,i,o,r){var a=o===1;if(js(e)){var l,d=!1;return Cn(()=>{if(!d){var x=e({direction:a?"in":"out"});l=lf(t,x,i,o,r)}}),{abort:()=>{d=!0,l==null||l.abort()},deactivate:()=>l.deactivate(),reset:()=>l.reset(),t:()=>l.t()}}if(i==null||i.deactivate(),!(e!=null&&e.duration))return r(),{abort:ht,deactivate:ht,reset:ht,t:()=>o};let{delay:s=0,css:u,tick:f,easing:p=G$}=e;var v=[];if(a&&i===void 0&&(f&&f(0,1),u)){var $=gh(u(0,1));v.push($,$)}var y=()=>1-o,h=t.animate(v,{duration:s,fill:"forwards"});return h.onfinish=()=>{var z;h.cancel();var x=(z=i==null?void 0:i.t())!=null?z:1-o;i==null||i.abort();var I=o-x,T=e.duration*Math.abs(I),N=[];if(T>0){var L=!1;if(u)for(var E=Math.ceil(T/16.666666666666668),k=0;k<=E;k+=1){var K=x+I*p(k/E),H=gh(u(K,1-K));N.push(H),L||(L=H.overflow==="hidden")}L&&(t.style.overflow="hidden"),y=()=>{var j=h.currentTime;return x+I*p(j/T)},f&&vh(()=>{if(h.playState!=="running")return!1;var j=y();return f(j,1-j),!0})}h=t.animate(N,{duration:T,fill:"forwards"}),h.onfinish=()=>{y=()=>o,f==null||f(o,1-o),r()}},{abort:()=>{h&&(h.cancel(),h.effect=null,h.onfinish=ht)},deactivate:()=>{r=ht},reset:()=>{o===0&&(f==null||f(1,0))},t:()=>y()}}function df(t,e,i){var o=Zo(t,e);o&&o.set&&(t[e]=i,Do(()=>{t[e]=null}))}var ta,Pl,Ed,mu,hh,vu=class vu{constructor(e){Qs(this,mu);Qs(this,ta,new WeakMap);Qs(this,Pl);Qs(this,Ed);dl(this,Ed,e)}observe(e,i){var o=Di(this,ta).get(e)||new Set;return o.add(i),Di(this,ta).set(e,o),Wv(this,mu,hh).call(this).observe(e,Di(this,Ed)),()=>{var r=Di(this,ta).get(e);r.delete(i),r.size===0&&(Di(this,ta).delete(e),Di(this,Pl).unobserve(e))}}};ta=new WeakMap,Pl=new WeakMap,Ed=new WeakMap,mu=new WeakSet,hh=function(){var e;return(e=Di(this,Pl))!=null?e:dl(this,Pl,new ResizeObserver(i=>{for(var o of i){vu.entries.set(o.target,o);for(var r of Di(this,ta).get(o.target)||[])r(o)}}))},ur(vu,"entries",new WeakMap);var cf=vu;var Y$=new cf({box:"border-box"});function In(t,e,i){var o=Y$.observe(t,()=>i(t[e]));Oo(()=>(St(()=>i(t[e])),o))}function _h(t,e){return t===e||(t==null?void 0:t[Jo])===e}function Ze(t={},e,i,o){return Oo(()=>{var r,a;return nn(()=>{r=a,a=(o==null?void 0:o())||[],St(()=>{t!==i(...a)&&(e(t,...a),r&&_h(i(...r),t)&&e(null,...r))})}),()=>{Cn(()=>{a&&_h(i(...a),t)&&e(null,...a)})}}),t}function xo(t=!1){let e=Bt,i=e.l.u;if(!i)return;let o=()=>lu(e.s);if(t){let r=0,a={},l=Qr(()=>{let d=!1,s=e.s;for(let u in s)s[u]!==a[u]&&(a[u]=s[u],d=!0);return d&&r++,r});o=()=>n(l)}i.b.length&&gd(()=>{bh(e,o),Xs(i.b)}),Ne(()=>{let r=St(()=>i.m.map(Zv));return()=>{for(let a of r)typeof a=="function"&&a()}}),i.a.length&&Ne(()=>{bh(e,o),Xs(i.a)})}function bh(t,e){if(t.l.s)for(let i of t.l.s)n(i);e()}function kd(t,e,i){if(t==null)return e(void 0),i&&i(void 0),ht;let o=St(()=>t.subscribe(e,i));return o.unsubscribe?()=>o.unsubscribe():o}var Al=[];function Rr(t,e){return{subscribe:de(t,e).subscribe}}function de(t,e=ht){let i=null,o=new Set;function r(d){if(pl(t,d)&&(t=d,i)){let s=!Al.length;for(let u of o)u[1](),Al.push(u,t);if(s){for(let u=0;u<Al.length;u+=2)Al[u][0](Al[u+1]);Al.length=0}}}function a(d){r(d(t))}function l(d,s=ht){let u=[d,s];return o.add(u),o.size===1&&(i=e(r,a)||ht),d(t),()=>{o.delete(u),o.size===0&&i&&(i(),i=null)}}return{set:r,update:a,subscribe:l}}function ui(t,e,i){let o=!Array.isArray(t),r=o?[t]:t;if(!r.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");let a=e.length<2;return Rr(i,(l,d)=>{let s=!1,u=[],f=0,p=ht,v=()=>{if(f)return;p();let y=e(o?u[0]:u,l,d);a?l(y):p=typeof y=="function"?y:ht},$=r.map((y,h)=>kd(y,x=>{u[h]=x,f&=~(1<<h),s&&v()},()=>{f|=1<<h}));return s=!0,v(),function(){Xs($),p(),s=!1}})}function he(t){let e;return kd(t,i=>e=i)(),e}var gu=!1,uf=Symbol();function w(t,e,i){var a;let o=(a=i[e])!=null?a:i[e]={store:null,source:us(void 0),unsubscribe:ht};if(o.store!==t&&!(uf in i))if(o.unsubscribe(),o.store=t!=null?t:null,t==null)o.source.v=void 0,o.unsubscribe=ht;else{var r=!0;o.unsubscribe=kd(t,l=>{r?o.source.v=l:D(o.source,l)}),r=!1}return t&&uf in i?he(t):n(o.source)}function Ve(){let t={};function e(){Do(()=>{for(var i in t)t[i].unsubscribe();po(t,uf,{enumerable:!1,value:!0})})}return[t,e]}function pf(t){var e=gu;try{return gu=!1,[t(),gu]}finally{gu=e}}var i1={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return Ee&&dg(`${t.name}.${String(e)}`),!1},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function En(t,e,i){return new Proxy(Ee?{props:t,exclude:e,name:i,other:{},to_proxy:[]}:{props:t,exclude:e},i1)}var o1={get(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(js(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o)return o[e]}},set(t,e,i){let o=t.props.length;for(;o--;){let r=t.props[o];js(r)&&(r=r());let a=Zo(r,e);if(a&&a.set)return a.set(i),!0}return!1},getOwnPropertyDescriptor(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(js(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o){let r=Zo(o,e);return r&&!r.configurable&&(r.configurable=!0),r}}},has(t,e){if(e===Jo||e===cl)return!1;for(let i of t.props)if(js(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){let e=[];for(let i of t.props)if(js(i)&&(i=i()),!!i){for(let o in i)e.includes(o)||e.push(o);for(let o of Object.getOwnPropertySymbols(i))e.includes(o)||e.push(o)}return e}};function Jr(...t){return new Proxy({props:t},o1)}function $h(t){var e,i;return(i=(e=t.ctx)==null?void 0:e.d)!=null?i:!1}function g(t,e,i,o){var K,H;var r=(i&1)!==0,a=!ls||(i&2)!==0,l=(i&8)!==0,d=(i&16)!==0,s=!1,u;l?[u,s]=pf(()=>t[e]):u=t[e];var f=Jo in t||cl in t,p=l&&((H=(K=Zo(t,e))==null?void 0:K.set)!=null?H:f&&e in t&&(z=>t[e]=z))||void 0,v=o,$=!0,y=!1,h=()=>(y=!0,$&&($=!1,d?v=St(o):v=o),v);u===void 0&&o!==void 0&&(p&&a&&lg(e),u=h(),p&&p(u));var x;if(a)x=()=>{var z=t[e];return z===void 0?h():($=!0,y=!1,z)};else{var I=(r?Qr:xn)(()=>t[e]);I.f|=131072,x=()=>{var z=n(I);return z!==void 0&&(v=void 0),z===void 0?v:z}}if((i&4)===0&&a)return x;if(p){var T=t.$$legacy;return function(z,j){return arguments.length>0?((!a||!j||T||s)&&p(j?x():z),z):x()}}var N=!1,L=!1,E=us(u),k=Qr(()=>{var z=x(),j=n(E);return N?(N=!1,L=!0,j):(L=!1,E.v=z)});return l&&n(k),r||(k.equals=fl),function(z,j){if(su!==null&&(N=L,x(),n(E)),arguments.length>0){let ae=j?n(k):a&&l?si(z):z;if(!k.equals(ae)){if(N=!0,D(E,ae),y&&v!==void 0&&(v=ae),$h(k))return z;St(()=>n(k))}return z}return $h(k)?k.v:n(k)}}var n1;typeof HTMLElement=="function"&&(n1=class extends HTMLElement{constructor(e,i,o){super();ur(this,"$$ctor");ur(this,"$$s");ur(this,"$$c");ur(this,"$$cn",!1);ur(this,"$$d",{});ur(this,"$$r",!1);ur(this,"$$p_d",{});ur(this,"$$l",{});ur(this,"$$l_u",new Map);ur(this,"$$me");this.$$ctor=e,this.$$s=i,o&&this.attachShadow({mode:"open"})}addEventListener(e,i,o){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(i),this.$$c){let r=this.$$c.$on(e,i);this.$$l_u.set(i,r)}super.addEventListener(e,i,o)}removeEventListener(e,i,o){if(super.removeEventListener(e,i,o),this.$$c){let r=this.$$l_u.get(i);r&&(r(),this.$$l_u.delete(i))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let i=function(a){return l=>{let d=document.createElement("slot");a!=="default"&&(d.name=a),b(l,d)}};var e=i;if(await Promise.resolve(),!this.$$cn||this.$$c)return;let o={},r=r1(this);for(let a of this.$$s)a in r&&(a==="default"&&!this.$$d.children?(this.$$d.children=i(a),o.default=!0):o[a]=i(a));for(let a of this.attributes){let l=this.$$g_p(a.name);l in this.$$d||(this.$$d[l]=ff(l,a.value,this.$$p_d,"toProp"))}for(let a in this.$$p_d)!(a in this.$$d)&&this[a]!==void 0&&(this.$$d[a]=this[a],delete this[a]);this.$$c=Zg({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:o,$$host:this}}),this.$$me=iu(()=>{nn(()=>{var a;this.$$r=!0;for(let l of wp(this.$$c)){if(!((a=this.$$p_d[l])!=null&&a.reflect))continue;this.$$d[l]=this.$$c[l];let d=ff(l,this.$$d[l],this.$$p_d,"toAttribute");d==null?this.removeAttribute(this.$$p_d[l].attribute||l):this.setAttribute(this.$$p_d[l].attribute||l,d)}this.$$r=!1})});for(let a in this.$$l)for(let l of this.$$l[a]){let d=this.$$c.$on(a,l);this.$$l_u.set(l,d)}this.$$l={}}}attributeChangedCallback(e,i,o){var r;this.$$r||(e=this.$$g_p(e),this.$$d[e]=ff(e,o,this.$$p_d,"toProp"),(r=this.$$c)==null||r.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return wp(this.$$p_d).find(i=>this.$$p_d[i].attribute===e||!this.$$p_d[i].attribute&&i.toLowerCase()===e)||e}});function ff(t,e,i,o){var a;let r=(a=i[t])==null?void 0:a.type;if(e=r==="Boolean"&&typeof e!="boolean"?e!=null:e,!o||!i[t])return e;if(o==="toAttribute")switch(r){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e==null?null:e;default:return e}else switch(r){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function r1(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var yh="5";var xh,wh,Sh;typeof window!="undefined"&&((Sh=(wh=(xh=window.__svelte)!=null?xh:window.__svelte={}).v)!=null?Sh:wh.v=new Set).add(yh);import{areValidLiveRecordSources as IT,clientChecker as Sv}from"@vkontakte/videoplayer-core/es2018";import"@vkontakte/videoplayer-core/es2018";import{noop as Lb,safeStorage as ET,throttleFn as kT}from"@vkontakte/videoplayer-shared/es2018";import{SeekAction as PT}from"@vkontakte/videoplayer-statistics/es2018";import{InterfaceLanguage as s1,fillWithDefault as a1,VideoQuality as Ch}from"@vkontakte/videoplayer-shared/es2018";var l1={isMobile:void 0,disableInvisibleComponentsTimeout:500,debugLog:!1,devNullLog:!1,defaultLanguage:s1.RU,downloadVKLanguages:!0,updateBuiltinLanguages:!0,isSmoothVideoRotate:!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,allowChangingFullscreenTarget:!0,trafficSavingLimit:Ch.Q_480P,highQualityLimit:Ch.Q_720P,episodeMinWidthPc:8,hideThumbTimerAfterTouch:!0,preventPauseOnVideoClick:!1,sentry:{dsn:"https://e349fd23c68f405388980d0868d0ff27@sentry.mvk.com/126",sampleRate:.01,whiteErrorCategoryList:[],blackErrorCategoryList:[],whiteErrorIdList:[],blackErrorIdList:[]},features:{autoplay:!0,statistics:!0,thinStatistics:!1,sentry:!0,preload:!0,subtitles:!0,episodes:!0,fullscreen:!0,timelinePreview:!0,mediaSession:!0,annotations:!0,slots:!0,annotationsInside:!1,pip:!0,dpip:!0,download:!0,liveRewind:!0,playbackRate:!0,trafficSaving:!0,episodesClustering:!0,copyVideoLink:!0,videoRotate:!0,tracer:!1,interactiveGraph:!1,interactiveResponsiveUi:!1,seekToInteractive:!0,interactiveLastFrame:!1,interactiveTextPermanent:!0,interactiveHideTime:!0,interactivePlayPrevChapter:!0,interactiveTimeIndicator:!0,interactiveTimeOpenUri:!1,interactiveAreaControlShadow:!1,interactiveControlsExpectTimeBlinkAnimation:!1,interactiveControlsTapPlace:!1,interactiveControlsFillAnimation:!1,interactiveControlsHideAnimation:!1,interactiveHistoryEndChapterFix:!0,thumbTimer:!0,hotKeyMapModal:!0,hotKeyHelpers:!0,saveDebugInfoToFile:!1,saveTraceInfoToFile:!1,additionalButtons:!0,additionalButtonsDesktopControlPanelRight:!0,additionalSettingsMenuItems:!0,additionalContextMenuItems:!0,contextMenuButton:!0,audioLanguages:!1,saveRate:!1,fullscreenInternalTargetPlayerContainer:!1,endScreen:!0,autoplayNext:!0,nextPrevButtons:!0,previewNoEmptySpace:!1,exposeInternalsToGlobal:!1,qualityDetailsSubMenuEnabled:!1,showSlowVideoNotification:!1,forceAutoQualityWhenSevereStallHappens:!1,timeoutShowSlowVideoNotification:0,maxCountShowSlowVideoNotification:1,forcePlayerDisplayBlock:!1,playbackStatusShow:!1,playbackStatusNextVideoShow:!1,initSubtitles:!0,useCallbackForMediaSessionNextPrevClick:!1,usePerformanceFix:!1,userVideoPrefs:!1,savePreferredStatesOnUserActionOnly:!1,useLoopSetting:!1,doubleForwardAvailable:!1,useRichSeek:!1,disableThumbUnstartedOnAutoplay:!1},controls:{showOnStartupAtAutoplay:!0,hideTimeout:500,hideTimeoutMobile:3e3,hideTimeoutInitial:200,hideTimeoutFullscreen:3e3,hideTimeoutCursor:3e3,hideTimeoutTooltips:1e3,collapseMobileUnmute:6e3,hide360IconTimeout:3e3,hideHotKeyHelpers:2e3,playbackRateMin:.25,playbackRateMax:2,playbackRateStep:.25,volumeStepKeyboard:.05,volumeStepWheel:.05,volumeBarTimeout:300,seekStepKeyboard:1e4,seekStepMobile:15e3,seekStepFrame:400},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},interactive:{historyMaxLength:100,noInteractionEventTimeout:3e4},view:{timelineSliderColor:null,timelineSliderHandleColor:null,timelineSliderFilledColor:null,timelineSliderLoadedColor:null,volumeSliderColor:null,volumeSliderHandleColor:null,volumeSliderFilledColor:null,controlsTimeColor:null,timelineSliderFilledActiveLiveColor:null,timelineSliderHandleActiveLiveColor:null,buttonColor:null,buttonToggleOnColor:null,focusedColor:null,font:null,focusedOutlineWidth:null,focusedOutlineRadius:null,controlsDesktopPaddingHorizontal:null,timelinePaddingHorizontal:null,settingsBackgroundColor:null,controlsGradientHeight:null,controlsGradient:null},userSalt:"0",doubleForwardActivationTime:600,playbackStatusAnimationDuration:1e3,playbackStatusNextVideoAnimationDuration:1e3,suitableDurationForUsingRichSeek:180,titleShowBehaviour:"fullscreen",disabledSlotIds:[],disabledAdditionalButtonIds:[]},Th=t=>a1(t,l1),Ih=t=>gl("ui-config",t),kt=()=>vl("ui-config");var Pd="vk_player_debug_panel_opened";var Eh="videoplayer",kh="videoplayer";var fs={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},Ph=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),Ah=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Lh=new Set(["ShiftRight","ShiftLeft"]);var Mh=["TIMELINE"],Ad=[...Mh,"GRAPH_BUTTON"],mf=[...Mh,"PLAY_BUTTON"],Ld=[...Ad,"PLAY_BUTTON"];var ms=(a=>(a.XS="xs",a.S="s",a.M="m",a.L="l",a.XL="xl",a))(ms||{}),Md={xs:0,s:1,m:2,l:3,xl:4};import{assertNonNullable as Vh,VERSION as d1}from"@vkontakte/videoplayer-shared/es2018";import{VERSION as c1}from"@vkontakte/videoplayer-core/es2018";import{VERSION as u1}from"@vkontakte/videoplayer-statistics/es2018";var hu="prod",Ll="1.1.81-dev.c564bb3a.0";var Ma=(t,e,i)=>{let o=document.createElement("a");o.href=t,o.download=`${e}.${i}`,o.style.display="none",o.click()};var Rh=Symbol("storeContext"),Nh=Symbol("microStoresContext"),Dh=(t,e)=>{gl(Rh,t),gl(Nh,e),hu==="dev"&&(window.app={store:t,microStores:e})},ge=()=>{let t=vl(Rh);return Vh(t,"Store context is empty!"),t},wo=()=>{let t=vl(Nh);return Vh(t,"MicroStores context is empty!"),t},ti=(t,e)=>bu(t,t.getValue(),e),bu=(t,e,i)=>Rr(e,o=>{let r=t.subscribe(a=>{o(a),i==null||i(a)});return()=>r.unsubscribe()}),Oh=(t,e,i,o)=>{var K,H,z,j,ae,X,ne,J,we;let r=t.info,{width:a,height:l}=he(i.ui.playerSize),d=(H=(K=r.throughputEstimation$.getValue())==null?void 0:K.toFixed(0))!=null?H:0,s=(j=(z=r.rttEstimation$.getValue())==null?void 0:z.toFixed(0))!=null?j:0,u=r.isAutoQualityEnabled$.getValue()?"auto":"manual",f=`${Ll} (core: ${c1}, stat: ${u1}, shared: ${d1})`,p=he(i.state.errorLog$),v=p.length?`
|
|
45
|
-
`+
|
|
46
|
-
|
|
47
|
-
`,
|
|
48
|
-
`;return
|
|
49
|
-
`):void 0
|
|
50
|
-
`)},Bh=(t,e,i)=>{var H,z,j,ae;let o=t.info,{width:r,height:a}=he(i.ui.playerSize),l={version:Ll,viewport:`${r}x${a}`,volume:Math.round(he(i.state.volume$)*100)};l.id=i.videoId,o.currentFormat$.getValue()&&(l.provider=o.currentFormat$.getValue()),o.hostname$.getValue()&&(l.cdn=o.hostname$.getValue());let u=o.intrinsicVideoSize$.getValue();u&&(l.videoSize=`${u.width}x${u.height}`);let f=o.currentBuffer$.getValue(),p=o.currentNativeBuffer$.getValue(),v=o.isLive$.getValue(),$=o.liveBufferTime$.getValue();f&&p&&(v&&$?(l.buffer=f.end-$,l.nativeBuffer=p.end-$):(l.buffer=Math.max(f.end-he(i.state.positionExact$),0),l.nativeBuffer=Math.max(p.end-he(i.state.positionExact$),0))),l.position=he(i.state.positionExact$);let y=o.throughputEstimation$.getValue();y&&(l.speed=y);let h=o.videoBitrate$.getValue();h&&(l.bitrate=h);let x=o.liveLatency$.getValue();x&&(l.liveLatency=x);let I=o.currentVideoSegmentLength$.getValue();I&&(l.currentVideoSegmentLength=I);let T=o.currentAudioSegmentLength$.getValue();T&&(l.currentAudioSegmentLength=T);let N=he(i.vsid);typeof N=="string"&&(l.vsid=N);let L=(H=t.info.currentVideoStream$.getValue())==null?void 0:H.codec;L&&(l.videoCodec=L);let E=(z=t.info.currentAudioStream$.getValue())==null?void 0:z.codec;E&&(l.audioCodec=E),((j=t.info.currentVideoStream$.getValue())==null?void 0:j.hdr)&&(l.hdr=!0);let K=(ae=t.info.currentAudioStream$.getValue())==null?void 0:ae.language;return K&&(l.audioLanguage=K),l},Fh=(t,e)=>Ma(t,e,"mp4"),Hh=t=>!t.type,Uh=t=>!!t.type,zh=()=>{let e=[],i=0;return{add:(o,r)=>{e[i]=[o,r],i=(i+1)%10},find:o=>e.find(([r])=>r===o)}},_u=class{constructor(){this.destroyController=new AbortController;this.pendingDownloads=new Set}async download(e){if(this.pendingDownloads.has(e))return null;this.pendingDownloads.add(e);try{let i=await fetch(e,{signal:this.destroyController.signal});if(i.ok)return await i.text();throw i}finally{this.pendingDownloads.delete(e)}}destroy(){this.destroyController.abort(),this.pendingDownloads.clear()}isDestroyed(){return this.destroyController.signal.aborted}};import{isNullable as _f,safeStorage as Si}from"@vkontakte/videoplayer-shared/es2018";import"@vkontakte/videoplayer-core/es2018";var p1="vk_player_",Wh="vk_player_prefer_traffic_saving_enabled",Kh="vk_player_preferred_volume",qh="vk_player_prefer_volume_mute",bf="vk_player_preferred_quality",vf="vk_player_preferred_default_quality_settings",gf="vk_player_preferred_quality_settings_by_video",Qh="vk_player_preferred_stream_language",Gh="vk_player_preferred_rate",Yh="vk_player_preferred_autoplay_next",hf="vk_player_preferred_subtitles_language",jh="vk_player_user_video_prefs",Xh=`${p1}preview_track_close_tooltip`,Zh=t=>t>1?1:t<0?0:t,$f=t=>Si.set(Kh,Zh(t).toString(10)),$u=()=>{let t=Si.get(Kh);return _f(t)?void 0:Zh(parseFloat(t))},yf=(t,e)=>Si.set(bf,JSON.stringify({videoId:t,value:e})),yu=()=>Si.remove(bf),xf=t=>{let e=Si.get(bf);if(_f(e))return;let{videoId:i,value:o}=JSON.parse(e);if(t!==i){yu();return}return o},Jh=(t,e)=>{e?Si.set(t,"true"):Si.remove(t)},wf=t=>Si.get(t)==="true",Sf=t=>Jh(qh,t),e_=()=>wf(qh),Vd=t=>Jh(Wh,t),Cf=()=>wf(Wh),t_=()=>Si.get(Qh),Tf=t=>Si.set(Qh,t),If=()=>Si.get(hf),Ef=t=>{t?Si.set(hf,t):Si.remove(hf)},i_=t=>Si.set(Gh,JSON.stringify({rate:t})),o_=()=>{let t=Si.get(Gh);if(_f(t))return;let{rate:e}=JSON.parse(t);return e},n_=t=>{Si.set(Yh,String(t))},r_=()=>wf(Yh),f1=()=>{let t=f=>{Si.set(vf,JSON.stringify(f))},e=()=>{try{let f=Si.get(vf);return f?JSON.parse(f):null}catch(f){return null}},i=()=>{try{let f=Si.get(gf);return f?JSON.parse(f):null}catch(f){return null}},o=f=>{Si.set(gf,JSON.stringify(f))},r=f=>{u(f);let p=f?i():null;if(p&&(p==null?void 0:p.videoId)===f)return{...p,appliesTo:"to-video"};p&&a();let v=e();return v?{...v,appliesTo:"as-default"}:(t({type:"auto_quality"}),{type:"auto_quality",appliesTo:"as-default"})},a=()=>{Si.remove(gf)},l=()=>{Si.remove(vf)},d=(f,p="as-default")=>{f.type==="exact_quality"||p==="to-video"?o(f):t(f)},s=f=>{let p=r(f);if(p){switch(p.type){case"traffic_saving":Vd(!0);break;case"exact_quality":yf(f,p.quality)}a(),l()}},u=f=>{let p=xf(f);if(p){o({type:"exact_quality",videoId:f,quality:p});return}Cf()&&t({type:"traffic_saving",videoId:f}),Vd(!1),yu()};return{getPreferredQualitySettings:r,migrateSettingsToLegacyWay:s,savePreferredQualitySettings:d,savePreferredDefaultQualitySettings:t,removePreferredQualitySettingsByVideo:a,getPreferredDefaultQualitySettings:e,getPreferredSubtitlesLanguage:If,savePreferredSubtitlesLanguage:Ef}},{getPreferredQualitySettings:s_,migrateSettingsToLegacyWay:a_,savePreferredQualitySettings:xu,savePreferredDefaultQualitySettings:FV,removePreferredQualitySettingsByVideo:HV,getPreferredDefaultQualitySettings:wu}=f1(),m1=3,v1=3,l_=()=>{let t=Si.get(jh);if(t)try{return JSON.parse(t)}catch(e){return null}return null},Su=(t,e)=>{var r,a;let i=l_();return(a=(r=i==null?void 0:i[t])==null?void 0:r[e])!=null?a:null},kf=(t,e,i)=>{var l,d,s;let o=(l=l_())!=null?l:{},r=(s=(d=o[t])==null?void 0:d[e])!=null?s:{};Object.assign(r,i,{updatedTs:Date.now()}),t in o||(o[t]={}),o[t][e]=r;let a=g1(o);Si.set(jh,JSON.stringify(a))};function g1(t){let e=Object.entries(t).reduce((o,[r,a])=>{let l=0;return Object.values(a).forEach(d=>{l<d.updatedTs&&(l=d.updatedTs)}),o.push([r,l]),o},[]);return e.sort(([,o],[,r])=>o>r?-1:1),e.splice(v1),e.reduce((o,[r])=>(o[r]=h1(t[r]),o),{})}function h1(t){let e=Object.entries(t);return e.sort(([,i],[,o])=>i.updatedTs>o.updatedTs?-1:1),e.splice(m1),Object.fromEntries(e)}function d_(){Si.set(Xh,JSON.stringify(!0))}function c_(){let t=Si.get(Xh);try{return t?JSON.parse(t):!1}catch(e){return!1}}import{PlaybackState as kb}from"@vkontakte/videoplayer-core/es2018";mg();var ia="var(--btn-color, #fff)";var _1=Te('<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),b1=Te('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill-rule="evenodd" clip-rule="evenodd"><!></svg>');function Je(t,e){var f;B(e,!0);let i=g(e,"width",19,()=>"24"),o=g(e,"height",19,()=>"24"),r=g(e,"fill",3,ia),a=(f=e.viewBox)!=null?f:`0 0 ${i()} ${o()}`;var l=b1(),d=C(l);{var s=p=>{var v=_1(),$=ce(v),y=C($);ei(y,()=>e.children),S($),ai(),b(p,v)},u=p=>{var v=Ae(),$=ce(v);ei($,()=>e.children),b(p,v)};R(d,p=>{e.shadow?p(s):p(u,!1)})}S(l),O(()=>{Le(l,"aria-label",e.ariaLabel),Le(l,"aria-hidden",!e.ariaLabel),Le(l,"width",i()),Le(l,"height",o()),Le(l,"viewBox",a),Le(l,"fill",r()),qe(l,e.style),Le(l,"data-testid",e.testId)}),b(t,l),F()}import{isNullable as f_,InterfaceLanguage as m_}from"@vkontakte/videoplayer-shared/es2018";var $1={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:"Качество по умолчанию можно {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:`Видео грузится слишком медленно,
|
|
43
|
+
`)})}}var Ia=!1,yl=null,Ea=!1,Is=!1;function Bp(t){Is=t}var vd=[],gd=[],Nt=null,cr=!1;function Wi(t){Nt=t}var ht=null;function lo(t){ht=t}var Wo=null;function Yc(t){Nt!==null&&Nt.f&2097152&&(Wo===null?Wo=[Nt,[t]]:Wo[1].push(t))}var En=null,ur=0,dr=null;function _g(t){dr=t}var Dg=1,nu=0,Es=!1,ru=null;function nd(){return++Dg}function wa(t){var p,v;var e=t.f;if((e&2048)!==0)return!0;if((e&4096)!==0){var i=t.deps,o=(e&256)!==0;if(i!==null){var r,a,l=(e&512)!==0,d=o&&ht!==null&&!Es,s=i.length;if(l||d){var u=t,m=u.parent;for(r=0;r<s;r++)a=i[r],(l||!((p=a==null?void 0:a.reactions)!=null&&p.includes(u)))&&((v=a.reactions)!=null?v:a.reactions=[]).push(u);l&&(u.f^=512),d&&m!==null&&(m.f&256)===0&&(u.f^=256)}for(r=0;r<s;r++)if(a=i[r],wa(a)&&Op(a),a.wv>t.wv)return!0}(!o||ht!==null&&!Es)&&Cn(t,1024)}return!1}function Og(t,e,i=!0){var o=t.reactions;if(o!==null)for(var r=0;r<o.length;r++){var a=o[r];Wo!=null&&Wo[1].includes(t)&&Wo[0]===Nt||((a.f&2)!==0?Og(a,e,!1):e===a&&(i?Cn(a,2048):(a.f&1024)!==0&&Cn(a,4096),sd(a)))}}function Gc(t){var _,y;var e=En,i=ur,o=dr,r=Nt,a=Es,l=Wo,d=Ht,s=cr,u=t.f;En=null,ur=0,dr=null,Es=(u&256)!==0&&(cr||!Ea||Nt===null),Nt=(u&96)===0?t:null,Wo=null,td(t.ctx),cr=!1,nu++,t.f|=2097152;try{var m=(0,t.fn)(),p=t.deps;if(En!==null){var v;if(pd(t,ur),p!==null&&ur>0)for(p.length=ur+En.length,v=0;v<En.length;v++)p[ur+v]=En[v];else t.deps=p=En;if(!Es||(u&2)!==0&&t.reactions!==null)for(v=ur;v<p.length;v++)((y=(_=p[v]).reactions)!=null?y:_.reactions=[]).push(t)}else p!==null&&ur<p.length&&(pd(t,ur),p.length=ur);if(cs()&&dr!==null&&!cr&&p!==null&&(t.f&6146)===0)for(v=0;v<dr.length;v++)Og(dr[v],t);return r!==null&&r!==t&&(nu++,dr!==null&&(o===null?o=dr:o.push(...dr))),m}catch(b){Vg(b)}finally{En=e,ur=i,dr=o,Nt=r,Es=a,Wo=l,td(d),cr=s,t.f^=2097152}}function a$(t,e){let i=e.reactions;if(i!==null){var o=Xv.call(i,t);if(o!==-1){var r=i.length-1;r===0?i=e.reactions=null:(i[o]=i[r],i.pop())}}i===null&&(e.f&2)!==0&&(En===null||!En.includes(e))&&(Cn(e,4096),(e.f&768)===0&&(e.f^=512),Qc(e),pd(e,0))}function pd(t,e){var i=t.deps;if(i!==null)for(var o=e;o<i.length;o++)a$(t,i[o])}function _l(t){var e=t.f;if((e&16384)===0){Cn(t,1024);var i=ht,o=Ea;if(ht=t,Ea=!0,ke){var r=ar;id(t.component_function)}try{(e&16)!==0?Pg(t):zp(t),Up(t);var a=Gc(t);if(t.teardown=typeof a=="function"?a:null,t.wv=Dg,ke&&ds&&(t.f&2048)!==0&&t.deps!==null)for(var l of t.deps)l.set_during_effect&&(l.wv=nd(),l.set_during_effect=!1);ke&&gd.push(t)}finally{Ea=o,ht=i,ke&&id(r)}}}function Rg(){console.error("Last ten effects were: ",gd.slice(-10).map(t=>t.fn)),gd=[]}function l$(){try{sg()}catch(t){if(ke&&ao(t,"stack",{value:""}),yl!==null)if(ke)try{md(t,yl)}catch(e){throw Rg(),e}else md(t,yl);else throw ke&&Rg(),t}}function Yp(){var t=Ea;try{var e=0;for(Ea=!0;vd.length>0;){e++>1e3&&l$();var i=vd,o=i.length;vd=[];for(var r=0;r<o;r++){var a=c$(i[r]);d$(a)}gl.clear()}}finally{Ia=!1,Ea=t,yl=null,ke&&(gd=[])}}function d$(t){var e=t.length;if(e!==0)for(var i=0;i<e;i++){var o=t[i];(o.f&24576)===0&&wa(o)&&(_l(o),o.deps===null&&o.first===null&&o.nodes_start===null&&(o.teardown===null?Kp(o):o.fn=null))}}function sd(t){Ia||(Ia=!0,queueMicrotask(Yp));for(var e=yl=t;e.parent!==null;){e=e.parent;var i=e.f;if((i&96)!==0){if((i&1024)===0)return;e.f^=1024}}vd.push(e)}function c$(t){for(var e=[],i=t;i!==null;){var o=i.f,r=(o&96)!==0,a=r&&(o&1024)!==0;if(!a&&(o&8192)===0){(o&4)!==0?e.push(i):r?i.f^=1024:wa(i)&&_l(i);var l=i.first;if(l!==null){i=l;continue}}var d=i.parent;for(i=i.next;i===null&&d!==null;)i=d.next,d=d.parent}return e}function xl(t){var e;for(t&&(Ia=!0,Yp(),Ia=!0,e=t());;){if(Lg(),vd.length===0)return Ia=!1,yl=null,ke&&(gd=[]),e;Ia=!0,Yp()}}async function uo(){await Promise.resolve(),xl()}function n(t){var e=t.f,i=(e&2)!==0;if(ru!==null&&ru.add(t),Nt!==null&&!cr){if(!(Wo!=null&&Wo[1].includes(t))||Wo[0]!==Nt){var o=Nt.deps;t.rv<nu&&(t.rv=nu,En===null&&o!==null&&o[ur]===t?ur++:En===null?En=[t]:(!Es||!En.includes(t))&&En.push(t))}}else if(i&&t.deps===null&&t.effects===null){var r=t,a=r.parent;a!==null&&(a.f&256)===0&&(r.f^=256)}if(i&&(r=t,wa(r)&&Op(r)),ke&&ds&&!cr&&ed!==null&&Nt!==null&&ed.reaction===Nt)if(t.trace)t.trace();else{var l=Ts("TracedAt");if(l){var d=ed.entries.get(t);d===void 0&&(d={traces:[]},ed.entries.set(t,d));var s=d.traces[d.traces.length-1];l.stack!==(s==null?void 0:s.stack)&&d.traces.push(l)}}return Is&&gl.has(t)?gl.get(t):t.v}function St(t){var e=cr;try{return cr=!0,t()}finally{cr=e}}var u$=-7169;function Cn(t,e){t.f=t.f&u$|e}function au(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(Uo in t)su(t);else if(!Array.isArray(t))for(let e in t){let i=t[e];typeof i=="object"&&i&&Uo in i&&su(i)}}}function su(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let o in t)try{su(t[o],e)}catch(r){}let i=ba(t);if(i!==Object.prototype&&i!==Array.prototype&&i!==Map.prototype&&i!==Set.prototype&&i!==Date.prototype){let o=Uc(i);for(let r in o){let a=o[r].get;if(a)try{a.call(t)}catch(l){}}}}}function jp(t,e){if(e){let i=document.body;t.autofocus=!0,In(()=>{document.activeElement===i&&t.focus()})}}function hd(t){var e=Nt,i=ht;Wi(null),lo(null);try{return t()}finally{Wi(e),lo(i)}}var Xp=new Set,lu=new Set;function Pa(t){if(!et)return;t.removeAttribute("onload"),t.removeAttribute("onerror");let e=t.__e;e!==void 0&&(t.__e=void 0,queueMicrotask(()=>{t.isConnected&&t.dispatchEvent(e)}))}function Zp(t,e,i,o={}){function r(a){if(o.capture||wl.call(e,a),!a.cancelBubble)return hd(()=>i==null?void 0:i.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?In(()=>{e.addEventListener(t,r,o)}):e.addEventListener(t,r,o),r}function st(t,e,i,o,r){var a={capture:o,passive:r},l=Zp(t,e,i,a);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Eo(()=>{e.removeEventListener(t,l,a)})}function Qe(t){for(var e=0;e<t.length;e++)Xp.add(t[e]);for(var i of lu)i(t)}function wl(t){var T;var e=this,i=e.ownerDocument,o=t.type,r=((T=t.composedPath)==null?void 0:T.call(t))||[],a=r[0]||t.target,l=0,d=t.__root;if(d){var s=r.indexOf(d);if(s!==-1&&(e===document||e===window)){t.__root=e;return}var u=r.indexOf(e);if(u===-1)return;s<=u&&(l=s)}if(a=r[l]||t.target,a!==e){ao(t,"currentTarget",{configurable:!0,get(){return a||i}});var m=Nt,p=ht;Wi(null),lo(null);try{for(var v,_=[];a!==null;){var y=a.assignedSlot||a.parentNode||a.host||null;try{var b=a["__"+o];if(b!=null&&(!a.disabled||t.target===a))if(rr(b)){var[w,...I]=b;w.apply(a,[t,...I])}else b.call(a,t)}catch(N){v?_.push(N):v=N}if(t.cancelBubble||y===e||y===null)break;a=y}if(v){for(let N of _)queueMicrotask(()=>{throw N});throw v}}finally{t.__root=e,delete t.currentTarget,Wi(m),lo(p)}}}var f$;function Bg(){f$=void 0}function Sl(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function ko(t,e){var i=ht;i.nodes_start===null&&(i.nodes_start=t,i.nodes_end=e)}function L(t,e){var i=(e&1)!==0,o=(e&2)!==0,r,a=!t.startsWith("<!>");return()=>{if(et)return ko(_t,null),_t;r===void 0&&(r=Sl(a?t:"<!>"+t),i||(r=wi(r)));var l=o||ad?document.importNode(r,!0):r.cloneNode(!0);if(i){var d=wi(l),s=l.lastChild;ko(d,s)}else ko(l,l);return l}}function g$(t,e,i="svg"){var o=!t.startsWith("<!>"),r=(e&1)!==0,a=`<${i}>${o?t:"<!>"+t}</${i}>`,l;return()=>{if(et)return ko(_t,null),_t;if(!l){var d=Sl(a),s=wi(d);if(r)for(l=document.createDocumentFragment();wi(s);)l.appendChild(wi(s));else l=wi(s)}var u=l.cloneNode(!0);if(r){var m=wi(u),p=u.lastChild;ko(m,p)}else ko(u,u);return u}}function Ie(t,e){return g$(t,e,"svg")}function ps(t=""){if(!et){var e=Tn(t+"");return ko(e,e),e}var i=_t;return i.nodeType!==dl&&(i.before(i=Tn()),xi(i)),ko(i,i),i}function Ae(){if(et)return ko(_t,null),_t;var t=document.createDocumentFragment(),e=document.createComment(""),i=Tn();return t.append(e,i),ko(e,i),t}function $(t,e){if(et){ht.nodes_end=_t,qi();return}t!==null&&t.before(e)}var h$=/\r/g;function Fg(t){t=t.replace(h$,"");let e=5381,i=t.length;for(;i--;)e=(e<<5)-e^t.charCodeAt(i);return(e>>>0).toString(36)}function Ug(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}var _$=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function zg(t){return _$.includes(t)}var b$=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory","defer","disablepictureinpicture","disableremoteplayback"];var $$={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function Wg(t){var e;return t=t.toLowerCase(),(e=$$[t])!=null?e:t}var _P=[...b$,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var y$=["touchstart","touchmove"];function Kg(t){return y$.includes(t)}var x$=["$state","$state.raw","$derived","$derived.by"],bP=[...x$,"$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$inspect","$inspect().with","$inspect.trace","$host"];var w$=["textarea","script","style","title"];function qg(t){return w$.includes(t)}function du(t){return t==null?void 0:t.replace(/\//g,"/")}var _d=!0;function cu(t){_d=t}function ve(t,e){var o;var i=e==null?"":typeof e=="object"?e+"":e;i!==((o=t.__t)!=null?o:t.__t=t.nodeValue)&&(t.__t=i,t.nodeValue=i+"")}function Zr(t,e){return Qg(t,e)}function ef(t,e){var l;Zc(),e.intro=(l=e.intro)!=null?l:!1;let i=e.target,o=et,r=_t;try{for(var a=wi(i);a&&(a.nodeType!==sr||a.data!==Gs);)a=Ko(a);if(!a)throw as;co(!0),xi(a),qi();let d=Qg(t,{...e,anchor:a});if(_t===null||_t.nodeType!==sr||_t.data!==_a)throw Zs(),as;return co(!1),d}catch(d){if(d===as)return e.recover===!1&&ag(),Zc(),ld(i),co(!1),Zr(t,e);throw d}finally{co(o),xi(r),Bg()}}var Cl=new Map;function Qg(t,{target:e,anchor:i,props:o={},events:r,context:a,intro:l=!0}){Zc();var d=new Set,s=p=>{for(var v=0;v<p.length;v++){var _=p[v];if(!d.has(_)){d.add(_);var y=Kg(_);e.addEventListener(_,wl,{passive:y});var b=Cl.get(_);b===void 0?(document.addEventListener(_,wl,{passive:y}),Cl.set(_,1)):Cl.set(_,b+1)}}};s(Jl(Xp)),lu.add(s);var u=void 0,m=Eg(()=>{var p=i!=null?i:e.appendChild(Tn());return Li(()=>{if(a){B({});var v=Ht;v.c=a}r&&(o.$$events=r),et&&ko(p,null),_d=l,u=t(p,o)||{},_d=!0,et&&(ht.nodes_end=_t),a&&H()}),()=>{var y;for(var v of d){e.removeEventListener(v,wl);var _=Cl.get(v);--_===0?(document.removeEventListener(v,wl),Cl.delete(v)):Cl.set(v,_)}lu.delete(s),p!==i&&((y=p.parentNode)==null||y.removeChild(p))}});return Jp.set(u,m),u}var Jp=new WeakMap;function ka(t,e){let i=Jp.get(t);return i?(Jp.delete(t),i(e)):(ke&&yg(),Promise.resolve())}function ti(t,e,...i){var o=t,r=ft,a;Qi(()=>{r!==(r=e())&&(a&&(Ki(a),a=null),ke&&r==null&&lg(),a=Li(()=>r(o,...i)))},65536),et&&(o=_t)}if(ke){let t=function(e){if(!(e in globalThis)){let i;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(i!==void 0)return i;ug(e)},set:o=>{i=o}})}};I$=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var I$;function Vt(t){Ht===null&&pl("onMount"),ls&&Ht.l!==null?T$(Ht).m.push(t):De(()=>{let e=St(t);if(typeof e=="function")return e})}function sn(t){Ht===null&&pl("onDestroy"),Vt(()=>()=>St(t))}function T$(t){var i;var e=t.l;return(i=e.u)!=null?i:e.u={a:[],b:[],m:[]}}var Gg=new Map;function Yg(t,e){var i=Gg.get(t);i||(i=new Set,Gg.set(t,i)),i.add(e)}function V(t,e,[i,o]=[0,0]){et&&i===0&&qi();var r=t,a=null,l=null,d=Zi,s=i>0?65536:0,u=!1;let m=(v,_=!0)=>{u=!0,p(_,v)},p=(v,_)=>{if(d===(d=v))return;let y=!1;if(et&&o!==-1){if(i===0){let w=Xc(r);w===Gs?o=0:w===Ys?o=1/0:(o=parseInt(w.substring(1)),o!==o&&(o=d?1/0:-1))}let b=o>i;!!d===b&&(r=Sa(),xi(r),co(!1),y=!0,o=-1)}d?(a?ks(a):_&&(a=Li(()=>_(r))),l&&Qn(l,()=>{l=null})):(l?ks(l):_&&(l=Li(()=>_(r,[i+1,o]))),a&&Qn(a,()=>{a=null})),y&&co(!0)};Qi(()=>{u=!1,e(m),u||p(null,null)},s),et&&(r=_t)}function As(t,e,i){et&&qi();var o=t,r=Zi,a,l=cs()?tg:cl;Qi(()=>{l(r,r=e())&&(a&&Qn(a),a=Li(()=>i(o)))}),et&&(o=_t)}var ea=null;function nf(t){ea=t}function bd(t,e){return e}function k$(t,e,i,o){for(var r=[],a=e.length,l=0;l<a;l++)iu(e[l].e,r,!0);var d=a>0&&r.length===0&&i!==null;if(d){var s=i.parentNode;ld(s),s.append(i),o.clear(),Js(t,e[0].prev,e[a-1].next)}qp(r,()=>{for(var u=0;u<a;u++){var m=e[u];d||(o.delete(m.k),Js(t,m.prev,m.next)),Ki(m.e,!d)}})}function _i(t,e,i,o,r,a=null){var l=t,d={flags:e,items:new Map,first:null},s=(e&4)!==0;if(s){var u=t;l=et?xi(wi(u)):u.appendChild(Tn())}et&&qi();var m=null,p=!1,v=Sn(()=>{var _=i();return rr(_)?_:_==null?[]:Jl(_)});Qi(()=>{var _=n(v),y=_.length;if(p&&y===0)return;p=y===0;let b=!1;if(et){var w=Xc(l)===Ys;w!==(y===0)&&(l=Sa(),xi(l),co(!1),b=!0)}if(et){for(var I=null,T,N=0;N<y;N++){if(_t.nodeType===sr&&_t.data===_a){l=_t,b=!0,co(!1);break}var A=_[N],E=o(A,N);T=Zg(_t,d,I,null,A,E,N,r,e,i),d.items.set(E,T),I=T}y>0&&xi(Sa())}et||A$(_,d,l,r,e,o,i),a!==null&&(y===0?m?ks(m):m=Li(()=>a(l)):m!==null&&Qn(m,()=>{m=null})),b&&co(!0),n(v)}),et&&(l=_t)}function A$(t,e,i,o,r,a,l){var J,Ce,me,ee;var d=(r&8)!==0,s=(r&3)!==0,u=t.length,m=e.items,p=e.first,v=p,_,y=null,b,w=[],I=[],T,N,A,E;if(d)for(E=0;E<u;E+=1)T=t[E],N=a(T,E),A=m.get(N),A!==void 0&&((J=A.a)==null||J.measure(),(b!=null?b:b=new Set).add(A));for(E=0;E<u;E+=1){if(T=t[E],N=a(T,E),A=m.get(N),A===void 0){var P=v?v.e.nodes_start:i;y=Zg(P,e,y,y===null?e.first:y.next,T,N,E,o,r,l),m.set(N,y),w=[],I=[],v=y.next;continue}if(s&&L$(A,T,E,r),(A.e.f&8192)!==0&&(ks(A.e),d&&((Ce=A.a)==null||Ce.unfix(),(b!=null?b:b=new Set).delete(A))),A!==v){if(_!==void 0&&_.has(A)){if(w.length<I.length){var Q=I[0],F;y=Q.prev;var z=w[0],X=w[w.length-1];for(F=0;F<w.length;F+=1)jg(w[F],Q,i);for(F=0;F<I.length;F+=1)_.delete(I[F]);Js(e,z.prev,X.next),Js(e,y,z),Js(e,X,Q),v=Q,y=X,E-=1,w=[],I=[]}else _.delete(A),jg(A,v,i),Js(e,A.prev,A.next),Js(e,A,y===null?e.first:y.next),Js(e,y,A),y=A;continue}for(w=[],I=[];v!==null&&v.k!==N;)(v.e.f&8192)===0&&(_!=null?_:_=new Set).add(v),I.push(v),v=v.next;if(v===null)continue;A=v}w.push(A),y=A,v=A.next}if(v!==null||_!==void 0){for(var se=_===void 0?[]:Jl(_);v!==null;)(v.e.f&8192)===0&&se.push(v),v=v.next;var Z=se.length;if(Z>0){var oe=(r&4)!==0&&u===0?i:null;if(d){for(E=0;E<Z;E+=1)(me=se[E].a)==null||me.measure();for(E=0;E<Z;E+=1)(ee=se[E].a)==null||ee.fix()}k$(e,se,oe,m)}}d&&In(()=>{var be;if(b!==void 0)for(A of b)(be=A.a)==null||be.apply()}),ht.first=e.first&&e.first.e,ht.last=y&&y.e}function L$(t,e,i,o){(o&1)!==0&&hl(t.v,e),(o&2)!==0?hl(t.i,i):t.i=i}function Zg(t,e,i,o,r,a,l,d,s,u){var m=ea,p=(s&1)!==0,v=(s&16)===0,_=p?v?us(r,!1,!1):Pr(r):r,y=(s&2)===0?l:Pr(l);ke&&p&&(_.trace=()=>{var w=typeof y=="number"?l:y.v;u()[w]});var b={i:y,v:_,k:a,a:null,e:null,prev:i,next:o};ea=b;try{return b.e=Li(()=>d(t,_,y,u),et),b.e.prev=i&&i.e,b.e.next=o&&o.e,i===null?e.first=b:(i.next=b,i.e.next=b.e),o!==null&&(o.prev=b,o.e.prev=b.e),b}finally{ea=m}}function jg(t,e,i){for(var o=t.next?t.next.e.nodes_start:i,r=e?e.e.nodes_start:i,a=t.e.nodes_start;a!==o;){var l=Ko(a);r.before(a),a=l}}function Js(t,e,i){e===null?t.first=i:(e.next=i,e.e.next=i&&i.e),i!==null&&(i.prev=e,i.e.prev=e&&e.e)}function M$(t,e,i){var a,l;if(!e||e===Fg(String(i!=null?i:"")))return;let o,r=(a=t.__svelte_meta)==null?void 0:a.loc;r?o=`near ${r.file}:${r.line}:${r.column}`:(l=ar)!=null&&l[zn]&&(o=`in ${ar[zn]}`),$g(du(o))}function $d(t,e,i=!1,o=!1,r=!1){var a=t,l="";D(()=>{var _;var d=ht;if(l===(l=(_=e())!=null?_:"")){et&&qi();return}if(d.nodes_start!==null&&(Wp(d.nodes_start,d.nodes_end),d.nodes_start=d.nodes_end=null),l!==""){if(et){for(var s=_t.data,u=qi(),m=u;u!==null&&(u.nodeType!==sr||u.data!=="");)m=u,u=Ko(u);if(u===null)throw Zs(),as;ke&&!r&&M$(u.parentNode,s,l),ko(_t,m),a=xi(u);return}var p=l+"";i?p=`<svg>${p}</svg>`:o&&(p=`<math>${p}</math>`);var v=Sl(p);if((i||o)&&(v=wi(v)),ko(wi(v),v.lastChild),i||o)for(;wi(v);)a.before(wi(v));else a.before(v)}})}function Mi(t,e,i){et&&qi();var o=t,r,a;Qi(()=>{r!==(r=e())&&(a&&(Qn(a),a=null),r&&(a=Li(()=>i(o,r))))},65536),et&&(o=_t)}function Aa(t,e,i,o,r,a){var y;let l=et;et&&qi();var d=ke&&a&&((y=Ht)==null?void 0:y.function[zn]),s,u,m=null;et&&_t.nodeType===Wc&&(m=_t,qi());var p=et?_t:t,v,_=ea;Qi(()=>{let b=e()||null;var w=r?r():i||b==="svg"?Hc:null;if(b!==s){var I=ea;nf(_),v&&(b===null?Qn(v,()=>{v=null,u=null}):b===u?ks(v):(Ki(v),cu(!1))),b&&b!==u&&(v=Li(()=>{if(m=et?m:w?document.createElementNS(w,b):document.createElement(b),ke&&a&&(m.__svelte_meta={loc:{file:d,line:a[0],column:a[1]}}),ko(m,m),o){et&&qg(b)&&m.append(document.createComment(""));var T=et?wi(m):m.appendChild(Tn());et&&(T===null?co(!1):xi(T)),o(m,T)}ht.nodes_end=m,p.before(m)})),s=b,s&&(u=s),cu(!0),nf(I)}},65536),l&&(co(!0),xi(p))}var sf;function Jg(t){return sf=t.target,new rf(t)}var Ls,kr,rf=class{constructor(e){Qs(this,Ls);Qs(this,kr);var a,l;var i=new Map,o=(d,s)=>{var u=us(s,!1,!1);return i.set(d,u),u};let r=new Proxy({...e.props||{},$$events:{}},{get(d,s){var u;return n((u=i.get(s))!=null?u:o(s,Reflect.get(d,s)))},has(d,s){var u;return s===ll?!0:(n((u=i.get(s))!=null?u:o(s,Reflect.get(d,s))),Reflect.has(d,s))},set(d,s,u){var m;return R((m=i.get(s))!=null?m:o(s,u),u),Reflect.set(d,s,u)}});al(this,kr,(e.hydrate?ef:Zr)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:(a=e.intro)!=null?a:!1,recover:e.recover})),(!((l=e==null?void 0:e.props)!=null&&l.$$host)||e.sync===!1)&&xl(),al(this,Ls,r.$$events);for(let d of Object.keys(Ai(this,kr)))d==="$set"||d==="$destroy"||d==="$on"||ao(this,d,{get(){return Ai(this,kr)[d]},set(s){Ai(this,kr)[d]=s},enumerable:!0});Ai(this,kr).$set=d=>{Object.assign(r,d)},Ai(this,kr).$destroy=()=>{ka(Ai(this,kr))}}$set(e){Ai(this,kr).$set(e)}$on(e,i){Ai(this,Ls)[e]=Ai(this,Ls)[e]||[];let o=(...r)=>i.call(this,...r);return Ai(this,Ls)[e].push(o),()=>{Ai(this,Ls)[e]=Ai(this,Ls)[e].filter(r=>r!==o)}}$destroy(){Ai(this,kr).$destroy()}};Ls=new WeakMap,kr=new WeakMap;function G(t,e){In(()=>{var r,a,l;var i=t.getRootNode(),o=i.host?i:(l=(r=i.head)!=null?r:i.ownerDocument.head)!=null?l:(a=sf)==null?void 0:a.parentNode;if(!(o!=null&&o.querySelector("#"+e.hash))){let d=document.createElement("style");d.id=e.hash,d.textContent=e.code,o.appendChild(d),ke&&Yg(e.hash,d)}})}function Ms(t,e){var i=void 0,o;Qi(()=>{i!==(i=e())&&(o&&(Ki(o),o=null),i&&(o=Li(()=>{Po(()=>i(t))})))})}function eh(t){var e,i,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e<r;e++)t[e]&&(i=eh(t[e]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function th(){for(var t,e,i=0,o="",r=arguments.length;i<r;i++)(t=arguments[i])&&(e=eh(t))&&(o&&(o+=" "),o+=e);return o}function yd(t){return typeof t=="object"?th(t):t!=null?t:""}var ih=[...`
|
|
44
|
+
\r\f \v\uFEFF`];function nh(t,e,i){var o=t==null?"":""+t;if(e&&(o=o?o+" "+e:e),i){for(var r in i)if(i[r])o=o?o+" "+r:r;else if(o.length)for(var a=r.length,l=0;(l=o.indexOf(r,l))>=0;){var d=l+a;(l===0||ih.includes(o[l-1]))&&(d===o.length||ih.includes(o[d]))?o=(l===0?"":o.substring(0,l))+o.substring(d+1):l=d}}return o===""?null:o}function oh(t,e=!1){var i=e?" !important;":";",o="";for(var r in t){var a=t[r];a!=null&&a!==""&&(o+=" "+r+": "+a+i)}return o}function af(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function rh(t,e){if(e){var i="",o,r;if(Array.isArray(e)?(o=e[0],r=e[1]):o=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var a=!1,l=0,d=!1,s=[];o&&s.push(...Object.keys(o).map(af)),r&&s.push(...Object.keys(r).map(af));var u=0,m=-1;let b=t.length;for(var p=0;p<b;p++){var v=t[p];if(d?v==="/"&&t[p-1]==="*"&&(d=!1):a?a===v&&(a=!1):v==="/"&&t[p+1]==="*"?d=!0:v==='"'||v==="'"?a=v:v==="("?l++:v===")"&&l--,!d&&a===!1&&l===0){if(v===":"&&m===-1)m=p;else if(v===";"||p===b-1){if(m!==-1){var _=af(t.substring(u,m).trim());if(!s.includes(_)){v!==";"&&p++;var y=t.substring(u,p).trim();i+=" "+y+";"}}u=p+1,m=-1}}}}return o&&(i+=oh(o)),r&&(i+=oh(r,!0)),i=i.trim(),i===""?null:i}return t==null?null:String(t)}function ne(t,e,i,o,r,a){var l=t.__className;if(et||l!==i||l===void 0){var d=nh(i,o,a);(!et||d!==t.getAttribute("class"))&&(d==null?t.removeAttribute("class"):e?t.className=d:t.setAttribute("class",d)),t.__className=i}else if(a&&r!==a)for(var s in a){var u=!!a[s];(r==null||u!==!!r[s])&&t.classList.toggle(s,u)}return a}function lf(t,e={},i,o){for(var r in i){var a=i[r];e[r]!==a&&(i[r]==null?t.style.removeProperty(r):t.style.setProperty(r,a,o))}}function We(t,e,i,o){var r=t.__style;if(et||r!==e){var a=rh(e,o);(!et||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else o&&(Array.isArray(o)?(lf(t,i==null?void 0:i[0],o[0]),lf(t,i==null?void 0:i[1],o[1],"important")):lf(t,i,o));return o}function xd(t,e,i){if(t.multiple){if(e==null)return;if(!rr(e))return xg();for(var o of t.options)o.selected=e.includes(sh(o));return}for(o of t.options){var r=sh(o);if(Mp(r,e)){o.selected=!0;return}}(!i||e!==void 0)&&(t.selectedIndex=-1)}function df(t){var e=new MutationObserver(()=>{xd(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Eo(()=>{e.disconnect()})}function sh(t){return"__value"in t?t.__value:t.value}var Tl=Symbol("class"),Il=Symbol("style"),dh=Symbol("is custom element"),ch=Symbol("is html");function uh(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Me(t,e,i,o){var r=fh(t);if(et&&(r[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){o||F$(t,e,i!=null?i:"");return}r[e]!==(r[e]=i)&&(e==="loading"&&(t[eg]=i),i==null?t.removeAttribute(e):typeof i!="string"&&mh(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function ph(t,e,i,o,r=!1){var A;var a=fh(t),l=a[dh],d=!a[ch];let s=et&&l;s&&co(!1);var u=e||{},m=t.tagName==="OPTION";for(var p in e)p in i||(i[p]=null);i.class?i.class=yd(i.class):(o||i[Tl])&&(i.class=null),i[Il]&&((A=i.style)!=null||(i.style=null));var v=mh(t);for(let E in i){let P=i[E];if(m&&E==="value"&&P==null){t.value=t.__value="",u[E]=P;continue}if(E==="class"){var _=t.namespaceURI==="http://www.w3.org/1999/xhtml";ne(t,_,P,o,e==null?void 0:e[Tl],i[Tl]),u[E]=P,u[Tl]=i[Tl];continue}if(E==="style"){We(t,P,e==null?void 0:e[Il],i[Il]),u[E]=P,u[Il]=i[Il];continue}var y=u[E];if(!(P===y&&!(P===void 0&&t.hasAttribute(E)))){u[E]=P;var b=E[0]+E[1];if(b!=="$$")if(b==="on"){let Q={},F="$$"+E,z=E.slice(2);var w=zg(z);if(Ug(z)&&(z=z.slice(0,-7),Q.capture=!0),!w&&y){if(P!=null)continue;t.removeEventListener(z,u[F],Q),u[F]=null}if(P!=null)if(w)t[`__${z}`]=P,Qe([z]);else{let X=function(se){u[E].call(this,se)};var N=X;u[F]=Zp(z,t,X,Q)}else w&&(t[`__${z}`]=void 0)}else if(E==="style")Me(t,E,P);else if(E==="autofocus")jp(t,!!P);else if(!l&&(E==="__value"||E==="value"&&P!=null))t.value=t.__value=P;else if(E==="selected"&&m)uh(t,P);else{var I=E;d||(I=Wg(I));var T=I==="defaultValue"||I==="defaultChecked";if(P==null&&!l&&!T)if(a[E]=null,I==="value"||I==="checked"){let Q=t,F=e===void 0;if(I==="value"){let z=Q.defaultValue;Q.removeAttribute(I),Q.defaultValue=z,Q.value=Q.__value=F?z:null}else{let z=Q.defaultChecked;Q.removeAttribute(I),Q.defaultChecked=z,Q.checked=F?z:!1}}else t.removeAttribute(E);else T||v.includes(I)&&(l||typeof P!="string")?t[I]=P:typeof P!="function"&&Me(t,I,P,r)}}}return s&&co(!0),u}function Ji(t,e,i=[],o,r=!1,a=Yr){let l=i.map(a);var d=void 0,s={},u=t.nodeName==="SELECT",m=!1;if(Qi(()=>{var v=e(...l.map(n)),_=ph(t,d,v,o,r);m&&u&&"value"in v&&xd(t,v.value,!1);for(let b of Object.getOwnPropertySymbols(s))v[b]||Ki(s[b]);for(let b of Object.getOwnPropertySymbols(v)){var y=v[b];b.description===Cp&&(!d||y!==d[b])&&(s[b]&&Ki(s[b]),s[b]=Li(()=>Ms(t,()=>y))),_[b]=y}d=_}),u){var p=t;Po(()=>{xd(p,d.value),df(p)})}m=!0}function fh(t){var e;return(e=t.__attributes)!=null?e:t.__attributes={[dh]:t.nodeName.includes("-"),[ch]:t.namespaceURI===Qv}}var ah=new Map;function mh(t){var e=ah.get(t.nodeName);if(e)return e;ah.set(t.nodeName,e=[]);for(var i,o=t,r=Element.prototype;r!==o;){i=Uc(o);for(var a in i)i[a].set&&e.push(a);o=ba(o)}return e}function F$(t,e,i){var o;ke&&(e==="srcset"&&U$(t,i)||cf((o=t.getAttribute(e))!=null?o:"",i)||bg(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function cf(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function lh(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function U$(t,e){var i=lh(t.srcset),o=lh(e);return o.length===i.length&&o.every(([r,a],l)=>a===i[l][1]&&(cf(i[l][0],r)||cf(r,i[l][0])))}var z$=Fc?()=>performance.now():()=>Date.now(),Jr={tick:t=>(Fc?requestAnimationFrame:ft)(t),now:()=>z$(),tasks:new Set};function vh(){let t=Jr.now();Jr.tasks.forEach(e=>{e.c(t)||(Jr.tasks.delete(e),e.f())}),Jr.tasks.size!==0&&Jr.tick(vh)}function gh(t){let e;return Jr.tasks.size===0&&Jr.tick(vh),{promise:new Promise(i=>{Jr.tasks.add(e={c:t,f:i})}),abort(){Jr.tasks.delete(e)}}}function uu(t,e){hd(()=>{t.dispatchEvent(new CustomEvent(e))})}function Q$(t){if(t==="float")return"cssFloat";if(t==="offset")return"cssOffset";if(t.startsWith("--"))return t;let e=t.split("-");return e.length===1?e[0]:e[0]+e.slice(1).map(i=>i[0].toUpperCase()+i.slice(1)).join("")}function hh(t){let e={},i=t.split(";");for(let o of i){let[r,a]=o.split(":");if(!r||a===void 0)break;let l=Q$(r.trim());e[l]=a.trim()}return e}var G$=t=>t;function es(t,e,i,o){var N;var r=(t&1)!==0,a=(t&2)!==0,l=r&&a,d=(t&4)!==0,s=l?"both":r?"in":"out",u,m=e.inert,p=e.style.overflow,v,_;function y(){var P;var A=Nt,E=ht;Wi(null),lo(null);try{return u!=null?u:u=i()(e,(P=o==null?void 0:o())!=null?P:{},{direction:s})}finally{Wi(A),lo(E)}}var b={is_global:d,in(){var A;if(e.inert=m,!r){_==null||_.abort(),(A=_==null?void 0:_.reset)==null||A.call(_);return}a||v==null||v.abort(),uu(e,"introstart"),v=uf(e,y(),_,1,()=>{uu(e,"introend"),v==null||v.abort(),v=u=void 0,e.style.overflow=p})},out(A){if(!a){A==null||A(),u=void 0;return}e.inert=!0,uu(e,"outrostart"),_=uf(e,y(),v,0,()=>{uu(e,"outroend"),A==null||A()})},stop:()=>{v==null||v.abort(),_==null||_.abort()}},w=ht;if(((N=w.transitions)!=null?N:w.transitions=[]).push(b),r&&_d){var I=d;if(!I){for(var T=w.parent;T&&(T.f&65536)!==0;)for(;(T=T.parent)&&(T.f&16)===0;);I=!T||(T.f&32768)!==0}I&&Po(()=>{St(()=>b.in())})}}function uf(t,e,i,o,r){var a=o===1;if(js(e)){var l,d=!1;return In(()=>{if(!d){var w=e({direction:a?"in":"out"});l=uf(t,w,i,o,r)}}),{abort:()=>{d=!0,l==null||l.abort()},deactivate:()=>l.deactivate(),reset:()=>l.reset(),t:()=>l.t()}}if(i==null||i.deactivate(),!(e!=null&&e.duration))return r(),{abort:ft,deactivate:ft,reset:ft,t:()=>o};let{delay:s=0,css:u,tick:m,easing:p=G$}=e;var v=[];if(a&&i===void 0&&(m&&m(0,1),u)){var _=hh(u(0,1));v.push(_,_)}var y=()=>1-o,b=t.animate(v,{duration:s,fill:"forwards"});return b.onfinish=()=>{var z;b.cancel();var w=(z=i==null?void 0:i.t())!=null?z:1-o;i==null||i.abort();var I=o-w,T=e.duration*Math.abs(I),N=[];if(T>0){var A=!1;if(u)for(var E=Math.ceil(T/16.666666666666668),P=0;P<=E;P+=1){var Q=w+I*p(P/E),F=hh(u(Q,1-Q));N.push(F),A||(A=F.overflow==="hidden")}A&&(t.style.overflow="hidden"),y=()=>{var X=b.currentTime;return w+I*p(X/T)},m&&gh(()=>{if(b.playState!=="running")return!1;var X=y();return m(X,1-X),!0})}b=t.animate(N,{duration:T,fill:"forwards"}),b.onfinish=()=>{y=()=>o,m==null||m(o,1-o),r()}},{abort:()=>{b&&(b.cancel(),b.effect=null,b.onfinish=ft)},deactivate:()=>{r=ft},reset:()=>{o===0&&(m==null||m(1,0))},t:()=>y()}}function pf(t,e,i){var o=Fo(t,e);o&&o.set&&(t[e]=i,Eo(()=>{t[e]=null}))}var ta,El,wd,fu,_h,mu=class mu{constructor(e){Qs(this,fu);Qs(this,ta,new WeakMap);Qs(this,El);Qs(this,wd);al(this,wd,e)}observe(e,i){var o=Ai(this,ta).get(e)||new Set;return o.add(i),Ai(this,ta).set(e,o),Kv(this,fu,_h).call(this).observe(e,Ai(this,wd)),()=>{var r=Ai(this,ta).get(e);r.delete(i),r.size===0&&(Ai(this,ta).delete(e),Ai(this,El).unobserve(e))}}};ta=new WeakMap,El=new WeakMap,wd=new WeakMap,fu=new WeakSet,_h=function(){var e;return(e=Ai(this,El))!=null?e:al(this,El,new ResizeObserver(i=>{for(var o of i){mu.entries.set(o.target,o);for(var r of Ai(this,ta).get(o.target)||[])r(o)}}))},nr(mu,"entries",new WeakMap);var ff=mu;var Y$=new ff({box:"border-box"});function Pn(t,e,i){var o=Y$.observe(t,()=>i(t[e]));Po(()=>(St(()=>i(t[e])),o))}function bh(t,e){return t===e||(t==null?void 0:t[Uo])===e}function je(t={},e,i,o){return Po(()=>{var r,a;return qo(()=>{r=a,a=(o==null?void 0:o())||[],St(()=>{t!==i(...a)&&(e(t,...a),r&&bh(i(...r),t)&&e(null,...r))})}),()=>{In(()=>{a&&bh(i(...a),t)&&e(null,...a)})}}),t}function mo(t=!1){let e=Ht,i=e.l.u;if(!i)return;let o=()=>au(e.s);if(t){let r=0,a={},l=Yr(()=>{let d=!1,s=e.s;for(let u in s)s[u]!==a[u]&&(a[u]=s[u],d=!0);return d&&r++,r});o=()=>n(l)}i.b.length&&ud(()=>{$h(e,o),Xs(i.b)}),De(()=>{let r=St(()=>i.m.map(Jv));return()=>{for(let a of r)typeof a=="function"&&a()}}),i.a.length&&De(()=>{$h(e,o),Xs(i.a)})}function $h(t,e){if(t.l.s)for(let i of t.l.s)n(i);e()}function Sd(t,e,i){if(t==null)return e(void 0),i&&i(void 0),ft;let o=St(()=>t.subscribe(e,i));return o.unsubscribe?()=>o.unsubscribe():o}var Pl=[];function Ar(t,e){return{subscribe:de(t,e).subscribe}}function de(t,e=ft){let i=null,o=new Set;function r(d){if(cl(t,d)&&(t=d,i)){let s=!Pl.length;for(let u of o)u[1](),Pl.push(u,t);if(s){for(let u=0;u<Pl.length;u+=2)Pl[u][0](Pl[u+1]);Pl.length=0}}}function a(d){r(d(t))}function l(d,s=ft){let u=[d,s];return o.add(u),o.size===1&&(i=e(r,a)||ft),d(t),()=>{o.delete(u),o.size===0&&i&&(i(),i=null)}}return{set:r,update:a,subscribe:l}}function mi(t,e,i){let o=!Array.isArray(t),r=o?[t]:t;if(!r.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");let a=e.length<2;return Ar(i,(l,d)=>{let s=!1,u=[],m=0,p=ft,v=()=>{if(m)return;p();let y=e(o?u[0]:u,l,d);a?l(y):p=typeof y=="function"?y:ft},_=r.map((y,b)=>Sd(y,w=>{u[b]=w,m&=~(1<<b),s&&v()},()=>{m|=1<<b}));return s=!0,v(),function(){Xs(_),p(),s=!1}})}function $e(t){let e;return Sd(t,i=>e=i)(),e}var vu=!1,mf=Symbol();function x(t,e,i){var a;let o=(a=i[e])!=null?a:i[e]={store:null,source:us(void 0),unsubscribe:ft};if(o.store!==t&&!(mf in i))if(o.unsubscribe(),o.store=t!=null?t:null,t==null)o.source.v=void 0,o.unsubscribe=ft;else{var r=!0;o.unsubscribe=Sd(t,l=>{r?o.source.v=l:R(o.source,l)}),r=!1}return t&&mf in i?$e(t):n(o.source)}function Ne(){let t={};function e(){Eo(()=>{for(var i in t)t[i].unsubscribe();ao(t,mf,{enumerable:!1,value:!0})})}return[t,e]}function vf(t){var e=vu;try{return vu=!1,[t(),vu]}finally{vu=e}}var i1={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return ke&&cg(`${t.name}.${String(e)}`),!1},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function kn(t,e,i){return new Proxy(ke?{props:t,exclude:e,name:i,other:{},to_proxy:[]}:{props:t,exclude:e},i1)}var o1={get(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(js(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o)return o[e]}},set(t,e,i){let o=t.props.length;for(;o--;){let r=t.props[o];js(r)&&(r=r());let a=Fo(r,e);if(a&&a.set)return a.set(i),!0}return!1},getOwnPropertyDescriptor(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(js(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o){let r=Fo(o,e);return r&&!r.configurable&&(r.configurable=!0),r}}},has(t,e){if(e===Uo||e===ll)return!1;for(let i of t.props)if(js(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){let e=[];for(let i of t.props)if(js(i)&&(i=i()),!!i){for(let o in i)e.includes(o)||e.push(o);for(let o of Object.getOwnPropertySymbols(i))e.includes(o)||e.push(o)}return e}};function ts(...t){return new Proxy({props:t},o1)}function yh(t){var e,i;return(i=(e=t.ctx)==null?void 0:e.d)!=null?i:!1}function h(t,e,i,o){var Q,F;var r=(i&1)!==0,a=!ls||(i&2)!==0,l=(i&8)!==0,d=(i&16)!==0,s=!1,u;l?[u,s]=vf(()=>t[e]):u=t[e];var m=Uo in t||ll in t,p=l&&((F=(Q=Fo(t,e))==null?void 0:Q.set)!=null?F:m&&e in t&&(z=>t[e]=z))||void 0,v=o,_=!0,y=!1,b=()=>(y=!0,_&&(_=!1,d?v=St(o):v=o),v);u===void 0&&o!==void 0&&(p&&a&&dg(e),u=b(),p&&p(u));var w;if(a)w=()=>{var z=t[e];return z===void 0?b():(_=!0,y=!1,z)};else{var I=(r?Yr:Sn)(()=>t[e]);I.f|=131072,w=()=>{var z=n(I);return z!==void 0&&(v=void 0),z===void 0?v:z}}if((i&4)===0&&a)return w;if(p){var T=t.$$legacy;return function(z,X){return arguments.length>0?((!a||!X||T||s)&&p(X?w():z),z):w()}}var N=!1,A=!1,E=us(u),P=Yr(()=>{var z=w(),X=n(E);return N?(N=!1,A=!0,X):(A=!1,E.v=z)});return l&&n(P),r||(P.equals=ul),function(z,X){if(ru!==null&&(N=A,w(),n(E)),arguments.length>0){let se=X?n(P):a&&l?ai(z):z;if(!P.equals(se)){if(N=!0,R(E,se),y&&v!==void 0&&(v=se),yh(P))return z;St(()=>n(P))}return z}return yh(P)?P.v:n(P)}}var n1;typeof HTMLElement=="function"&&(n1=class extends HTMLElement{constructor(e,i,o){super();nr(this,"$$ctor");nr(this,"$$s");nr(this,"$$c");nr(this,"$$cn",!1);nr(this,"$$d",{});nr(this,"$$r",!1);nr(this,"$$p_d",{});nr(this,"$$l",{});nr(this,"$$l_u",new Map);nr(this,"$$me");this.$$ctor=e,this.$$s=i,o&&this.attachShadow({mode:"open"})}addEventListener(e,i,o){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(i),this.$$c){let r=this.$$c.$on(e,i);this.$$l_u.set(i,r)}super.addEventListener(e,i,o)}removeEventListener(e,i,o){if(super.removeEventListener(e,i,o),this.$$c){let r=this.$$l_u.get(i);r&&(r(),this.$$l_u.delete(i))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let i=function(a){return l=>{let d=document.createElement("slot");a!=="default"&&(d.name=a),$(l,d)}};var e=i;if(await Promise.resolve(),!this.$$cn||this.$$c)return;let o={},r=r1(this);for(let a of this.$$s)a in r&&(a==="default"&&!this.$$d.children?(this.$$d.children=i(a),o.default=!0):o[a]=i(a));for(let a of this.attributes){let l=this.$$g_p(a.name);l in this.$$d||(this.$$d[l]=gf(l,a.value,this.$$p_d,"toProp"))}for(let a in this.$$p_d)!(a in this.$$d)&&this[a]!==void 0&&(this.$$d[a]=this[a],delete this[a]);this.$$c=Jg({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:o,$$host:this}}),this.$$me=tu(()=>{qo(()=>{var a;this.$$r=!0;for(let l of Tp(this.$$c)){if(!((a=this.$$p_d[l])!=null&&a.reflect))continue;this.$$d[l]=this.$$c[l];let d=gf(l,this.$$d[l],this.$$p_d,"toAttribute");d==null?this.removeAttribute(this.$$p_d[l].attribute||l):this.setAttribute(this.$$p_d[l].attribute||l,d)}this.$$r=!1})});for(let a in this.$$l)for(let l of this.$$l[a]){let d=this.$$c.$on(a,l);this.$$l_u.set(l,d)}this.$$l={}}}attributeChangedCallback(e,i,o){var r;this.$$r||(e=this.$$g_p(e),this.$$d[e]=gf(e,o,this.$$p_d,"toProp"),(r=this.$$c)==null||r.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Tp(this.$$p_d).find(i=>this.$$p_d[i].attribute===e||!this.$$p_d[i].attribute&&i.toLowerCase()===e)||e}});function gf(t,e,i,o){var a;let r=(a=i[t])==null?void 0:a.type;if(e=r==="Boolean"&&typeof e!="boolean"?e!=null:e,!o||!i[t])return e;if(o==="toAttribute")switch(r){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e==null?null:e;default:return e}else switch(r){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function r1(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var xh="5";var wh,Sh,Ch;typeof window!="undefined"&&((Ch=(Sh=(wh=window.__svelte)!=null?wh:window.__svelte={}).v)!=null?Ch:Sh.v=new Set).add(xh);import{areValidLiveRecordSources as kT,clientChecker as Iv}from"@vkontakte/videoplayer-core/es2018";import"@vkontakte/videoplayer-core/es2018";import{noop as Mb,safeStorage as AT,throttleFn as LT}from"@vkontakte/videoplayer-shared/es2018";import{SeekAction as MT}from"@vkontakte/videoplayer-statistics/es2018";import{InterfaceLanguage as s1,fillWithDefault as a1,VideoQuality as Th}from"@vkontakte/videoplayer-shared/es2018";var l1={isMobile:void 0,disableInvisibleComponentsTimeout:500,debugLog:!1,devNullLog:!1,defaultLanguage:s1.RU,downloadVKLanguages:!0,updateBuiltinLanguages:!0,isSmoothVideoRotate:!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,allowChangingFullscreenTarget:!0,trafficSavingLimit:Th.Q_480P,highQualityLimit:Th.Q_720P,episodeMinWidthPc:8,hideThumbTimerAfterTouch:!0,preventPauseOnVideoClick:!1,sentry:{dsn:"https://e349fd23c68f405388980d0868d0ff27@sentry.mvk.com/126",sampleRate:.01,whiteErrorCategoryList:[],blackErrorCategoryList:[],whiteErrorIdList:[],blackErrorIdList:[]},features:{autoplay:!0,statistics:!0,thinStatistics:!1,sentry:!0,preload:!0,subtitles:!0,episodes:!0,fullscreen:!0,timelinePreview:!0,mediaSession:!0,annotations:!0,slots:!0,annotationsInside:!1,pip:!0,dpip:!0,download:!0,liveRewind:!0,playbackRate:!0,trafficSaving:!0,episodesClustering:!0,copyVideoLink:!0,videoRotate:!0,tracer:!1,interactiveGraph:!1,interactiveResponsiveUi:!1,seekToInteractive:!0,interactiveLastFrame:!1,interactiveTextPermanent:!0,interactiveHideTime:!0,interactivePlayPrevChapter:!0,interactiveTimeIndicator:!0,interactiveTimeOpenUri:!1,interactiveAreaControlShadow:!1,interactiveControlsExpectTimeBlinkAnimation:!1,interactiveControlsTapPlace:!1,interactiveControlsFillAnimation:!1,interactiveControlsHideAnimation:!1,interactiveHistoryEndChapterFix:!0,thumbTimer:!0,hotKeyMapModal:!0,hotKeyHelpers:!0,saveDebugInfoToFile:!1,saveTraceInfoToFile:!1,additionalButtons:!0,additionalButtonsDesktopControlPanelRight:!0,additionalSettingsMenuItems:!0,additionalContextMenuItems:!0,contextMenuButton:!0,audioLanguages:!1,saveRate:!1,fullscreenInternalTargetPlayerContainer:!1,endScreen:!0,autoplayNext:!0,nextPrevButtons:!0,previewNoEmptySpace:!1,exposeInternalsToGlobal:!1,qualityDetailsSubMenuEnabled:!1,showSlowVideoNotification:!1,forceAutoQualityWhenSevereStallHappens:!1,timeoutShowSlowVideoNotification:0,maxCountShowSlowVideoNotification:1,forcePlayerDisplayBlock:!1,playbackStatusShow:!1,playbackStatusNextVideoShow:!1,initSubtitles:!0,useCallbackForMediaSessionNextPrevClick:!1,usePerformanceFix:!1,userVideoPrefs:!1,savePreferredStatesOnUserActionOnly:!1,useLoopSetting:!1,doubleForwardAvailable:!1,useRichSeek:!1,disableThumbUnstartedOnAutoplay:!1},controls:{showOnStartupAtAutoplay:!0,hideTimeout:500,hideTimeoutMobile:3e3,hideTimeoutInitial:200,hideTimeoutFullscreen:3e3,hideTimeoutCursor:3e3,hideTimeoutTooltips:1e3,collapseMobileUnmute:6e3,hide360IconTimeout:3e3,hideHotKeyHelpers:2e3,playbackRateMin:.25,playbackRateMax:2,playbackRateStep:.25,volumeStepKeyboard:.05,volumeStepWheel:.05,volumeBarTimeout:300,seekStepKeyboard:1e4,seekStepMobile:15e3,seekStepFrame:400},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},interactive:{historyMaxLength:100,noInteractionEventTimeout:3e4},view:{timelineSliderColor:null,timelineSliderHandleColor:null,timelineSliderFilledColor:null,timelineSliderLoadedColor:null,volumeSliderColor:null,volumeSliderHandleColor:null,volumeSliderFilledColor:null,controlsTimeColor:null,timelineSliderFilledActiveLiveColor:null,timelineSliderHandleActiveLiveColor:null,buttonColor:null,buttonToggleOnColor:null,focusedColor:null,font:null,focusedOutlineWidth:null,focusedOutlineRadius:null,controlsDesktopPaddingHorizontal:null,timelinePaddingHorizontal:null,settingsBackgroundColor:null,controlsGradientHeight:null,controlsGradient:null},userSalt:"0",doubleForwardActivationTime:600,playbackStatusAnimationDuration:1e3,playbackStatusNextVideoAnimationDuration:1e3,suitableDurationForUsingRichSeek:180,titleShowBehaviour:"fullscreen",disabledSlotIds:[],disabledAdditionalButtonIds:[]},Ih=t=>a1(t,l1),Eh=t=>ml("ui-config",t),Rt=()=>fl("ui-config");var Cd="vk_player_debug_panel_opened";var Ph="videoplayer",kh="videoplayer";var fs={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},Ah=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),Lh=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Mh=new Set(["ShiftRight","ShiftLeft"]);var Vh=["TIMELINE"],Td=[...Vh,"GRAPH_BUTTON"],hf=[...Vh,"PLAY_BUTTON"],Id=[...Td,"PLAY_BUTTON"];var ms=(a=>(a.XS="xs",a.S="s",a.M="m",a.L="l",a.XL="xl",a))(ms||{}),Ed={xs:0,s:1,m:2,l:3,xl:4};import{assertNonNullable as Rh,VERSION as d1}from"@vkontakte/videoplayer-shared/es2018";import{VERSION as c1}from"@vkontakte/videoplayer-core/es2018";import{VERSION as u1}from"@vkontakte/videoplayer-statistics/es2018";var gu="prod",kl="1.1.81-dev.cb1cd8be.0";var Ma=(t,e,i)=>{let o=document.createElement("a");o.href=t,o.download=`${e}.${i}`,o.style.display="none",o.click()};var Nh=Symbol("storeContext"),Dh=Symbol("microStoresContext"),Oh=(t,e)=>{ml(Nh,t),ml(Dh,e),gu==="dev"&&(window.app={store:t,microStores:e})},_e=()=>{let t=fl(Nh);return Rh(t,"Store context is empty!"),t},vo=()=>{let t=fl(Dh);return Rh(t,"MicroStores context is empty!"),t},ii=(t,e)=>_u(t,t.getValue(),e),_u=(t,e,i)=>Ar(e,o=>{let r=t.subscribe(a=>{o(a),i==null||i(a)});return()=>r.unsubscribe()}),Bh=(t,e,i,o,r=["meta config not provided"])=>{var F,z,X,se,Z,oe,J,Ce,me;let a=t.info,{width:l,height:d}=$e(i.ui.playerSize),s=(z=(F=a.throughputEstimation$.getValue())==null?void 0:F.toFixed(0))!=null?z:0,u=(se=(X=a.rttEstimation$.getValue())==null?void 0:X.toFixed(0))!=null?se:0,m=a.isAutoQualityEnabled$.getValue()?"auto":"manual",p=`${kl} (core: ${c1}, stat: ${u1}, shared: ${d1})`,v=$e(i.state.errorLog$),_=v.length?`
|
|
45
|
+
`+v.map((ee,be)=>{var Ke;let we=`${be}) Type: ${ee.id}
|
|
46
|
+
`,ge=`Message: ${ee.message} (${ee.thrown})
|
|
47
|
+
`,pe=`Trace: ${(Ke=ee.thrown)==null?void 0:Ke.stack}
|
|
48
|
+
`;return we+ge+pe}).join(`
|
|
49
|
+
`):void 0,y=i.state.isAudioDisabled?"disabled":$e(i.state.isAudioAvailable$)?void 0:"unavailable",b=t.info.currentVideoStream$.getValue(),w=t.info.currentAudioStream$.getValue(),I=[];b&&I.push(`Video: ${(Z=b==null?void 0:b.codec)!=null?Z:""}`+(b!=null&&b.hdr?" (HDR)":"")),w&&I.push(`Audio: ${(oe=w==null?void 0:w.codec)!=null?oe:""}`+(w!=null&&w.language?` (${w.language})`:""));let T=a.currentQuality$.getValue(),N="";if(T){let ee=a.availableQualitiesFps$.getValue()[T];N=ee?`${ee}fps`:""}let A=a.httpConnectionType$.getValue(),E=(Ce=(J=a.currentBuffer$.getValue())==null?void 0:J.end)!=null?Ce:0,P=Math.max(E-$e(i.state.positionExact$),0),Q={Version:p,Browser:navigator.userAgent,Config:r.join(", "),"United video id":String(i.videoId),TraceId:o,VSID:$e(i.vsid),"Content host":a.hostname$.getValue(),"Connection type":A?A+(a.httpConnectionReused$.getValue()?" (reused)":""):"",Throughput:`${s}Kbps @ ${u}ms RTT`,Format:a.currentFormat$.getValue(),"Available Formats":e!=null&&e.sources?Object.keys(e.sources).join(", "):"",Streams:I.join(", "),Quality:`${m} ${T!=null?T:""} ${N}`,"Available qualities":a.availableQualities$.getValue().join(", "),Audio:y,Position:`${$e(i.state.positionExact$)}s`,Buffer:`${P}s`,State:`${$e(i.playerPhase)} ${(me=a.playbackState$.getValue())!=null?me:""}`,"Player size":`${l}x${d}`,URL:window.location.href,Errors:_};return Object.entries(Q).filter(([ee,be])=>be!==void 0).map(([ee,be])=>`${ee}: ${be}`).join(`
|
|
50
|
+
`)},Hh=(t,e,i)=>{var F,z,X,se;let o=t.info,{width:r,height:a}=$e(i.ui.playerSize),l={version:kl,viewport:`${r}x${a}`,volume:Math.round($e(i.state.volume$)*100)};l.id=i.videoId,o.currentFormat$.getValue()&&(l.provider=o.currentFormat$.getValue()),o.hostname$.getValue()&&(l.cdn=o.hostname$.getValue());let u=o.intrinsicVideoSize$.getValue();u&&(l.videoSize=`${u.width}x${u.height}`);let m=o.currentBuffer$.getValue(),p=o.currentNativeBuffer$.getValue(),v=o.isLive$.getValue(),_=o.liveBufferTime$.getValue();m&&p&&(v&&_?(l.buffer=m.end-_,l.nativeBuffer=p.end-_):(l.buffer=Math.max(m.end-$e(i.state.positionExact$),0),l.nativeBuffer=Math.max(p.end-$e(i.state.positionExact$),0))),l.position=$e(i.state.positionExact$);let y=o.throughputEstimation$.getValue();y&&(l.speed=y);let b=o.videoBitrate$.getValue();b&&(l.bitrate=b);let w=o.liveLatency$.getValue();w&&(l.liveLatency=w);let I=o.currentVideoSegmentLength$.getValue();I&&(l.currentVideoSegmentLength=I);let T=o.currentAudioSegmentLength$.getValue();T&&(l.currentAudioSegmentLength=T);let N=$e(i.vsid);typeof N=="string"&&(l.vsid=N);let A=(F=t.info.currentVideoStream$.getValue())==null?void 0:F.codec;A&&(l.videoCodec=A);let E=(z=t.info.currentAudioStream$.getValue())==null?void 0:z.codec;E&&(l.audioCodec=E),((X=t.info.currentVideoStream$.getValue())==null?void 0:X.hdr)&&(l.hdr=!0);let Q=(se=t.info.currentAudioStream$.getValue())==null?void 0:se.language;return Q&&(l.audioLanguage=Q),l},Fh=(t,e)=>Ma(t,e,"mp4"),Uh=t=>!t.type,zh=t=>!!t.type,Wh=()=>{let e=[],i=0;return{add:(o,r)=>{e[i]=[o,r],i=(i+1)%10},find:o=>e.find(([r])=>r===o)}},hu=class{constructor(){this.destroyController=new AbortController;this.pendingDownloads=new Set}async download(e){if(this.pendingDownloads.has(e))return null;this.pendingDownloads.add(e);try{let i=await fetch(e,{signal:this.destroyController.signal});if(i.ok)return await i.text();throw i}finally{this.pendingDownloads.delete(e)}}destroy(){this.destroyController.abort(),this.pendingDownloads.clear()}isDestroyed(){return this.destroyController.signal.aborted}};import{isNullable as yf,safeStorage as Si}from"@vkontakte/videoplayer-shared/es2018";import"@vkontakte/videoplayer-core/es2018";var p1="vk_player_",Kh="vk_player_prefer_traffic_saving_enabled",qh="vk_player_preferred_volume",Qh="vk_player_prefer_volume_mute",xf="vk_player_preferred_quality",_f="vk_player_preferred_default_quality_settings",bf="vk_player_preferred_quality_settings_by_video",Gh="vk_player_preferred_stream_language",Yh="vk_player_preferred_rate",jh="vk_player_preferred_autoplay_next",$f="vk_player_preferred_subtitles_language",Xh="vk_player_user_video_prefs",Zh=`${p1}preview_track_close_tooltip`,Jh=t=>t>1?1:t<0?0:t,wf=t=>Si.set(qh,Jh(t).toString(10)),bu=()=>{let t=Si.get(qh);return yf(t)?void 0:Jh(parseFloat(t))},Sf=(t,e)=>Si.set(xf,JSON.stringify({videoId:t,value:e})),$u=()=>Si.remove(xf),Cf=t=>{let e=Si.get(xf);if(yf(e))return;let{videoId:i,value:o}=JSON.parse(e);if(t!==i){$u();return}return o},e_=(t,e)=>{e?Si.set(t,"true"):Si.remove(t)},Tf=t=>Si.get(t)==="true",If=t=>e_(Qh,t),t_=()=>Tf(Qh),Pd=t=>e_(Kh,t),Ef=()=>Tf(Kh),i_=()=>Si.get(Gh),Pf=t=>Si.set(Gh,t),kf=()=>Si.get($f),Af=t=>{t?Si.set($f,t):Si.remove($f)},o_=t=>Si.set(Yh,JSON.stringify({rate:t})),n_=()=>{let t=Si.get(Yh);if(yf(t))return;let{rate:e}=JSON.parse(t);return e},r_=t=>{Si.set(jh,String(t))},s_=()=>Tf(jh),f1=()=>{let t=m=>{Si.set(_f,JSON.stringify(m))},e=()=>{try{let m=Si.get(_f);return m?JSON.parse(m):null}catch(m){return null}},i=()=>{try{let m=Si.get(bf);return m?JSON.parse(m):null}catch(m){return null}},o=m=>{Si.set(bf,JSON.stringify(m))},r=m=>{u(m);let p=m?i():null;if(p&&(p==null?void 0:p.videoId)===m)return{...p,appliesTo:"to-video"};p&&a();let v=e();return v?{...v,appliesTo:"as-default"}:(t({type:"auto_quality"}),{type:"auto_quality",appliesTo:"as-default"})},a=()=>{Si.remove(bf)},l=()=>{Si.remove(_f)},d=(m,p="as-default")=>{m.type==="exact_quality"||p==="to-video"?o(m):t(m)},s=m=>{let p=r(m);if(p){switch(p.type){case"traffic_saving":Pd(!0);break;case"exact_quality":Sf(m,p.quality)}a(),l()}},u=m=>{let p=Cf(m);if(p){o({type:"exact_quality",videoId:m,quality:p});return}Ef()&&t({type:"traffic_saving",videoId:m}),Pd(!1),$u()};return{getPreferredQualitySettings:r,migrateSettingsToLegacyWay:s,savePreferredQualitySettings:d,savePreferredDefaultQualitySettings:t,removePreferredQualitySettingsByVideo:a,getPreferredDefaultQualitySettings:e,getPreferredSubtitlesLanguage:kf,savePreferredSubtitlesLanguage:Af}},{getPreferredQualitySettings:a_,migrateSettingsToLegacyWay:l_,savePreferredQualitySettings:yu,savePreferredDefaultQualitySettings:zV,removePreferredQualitySettingsByVideo:WV,getPreferredDefaultQualitySettings:xu}=f1(),m1=3,v1=3,d_=()=>{let t=Si.get(Xh);if(t)try{return JSON.parse(t)}catch(e){return null}return null},wu=(t,e)=>{var r,a;let i=d_();return(a=(r=i==null?void 0:i[t])==null?void 0:r[e])!=null?a:null},Lf=(t,e,i)=>{var l,d,s;let o=(l=d_())!=null?l:{},r=(s=(d=o[t])==null?void 0:d[e])!=null?s:{};Object.assign(r,i,{updatedTs:Date.now()}),t in o||(o[t]={}),o[t][e]=r;let a=g1(o);Si.set(Xh,JSON.stringify(a))};function g1(t){let e=Object.entries(t).reduce((o,[r,a])=>{let l=0;return Object.values(a).forEach(d=>{l<d.updatedTs&&(l=d.updatedTs)}),o.push([r,l]),o},[]);return e.sort(([,o],[,r])=>o>r?-1:1),e.splice(v1),e.reduce((o,[r])=>(o[r]=h1(t[r]),o),{})}function h1(t){let e=Object.entries(t);return e.sort(([,i],[,o])=>i.updatedTs>o.updatedTs?-1:1),e.splice(m1),Object.fromEntries(e)}function c_(){Si.set(Zh,JSON.stringify(!0))}function u_(){let t=Si.get(Zh);try{return t?JSON.parse(t):!1}catch(e){return!1}}import{PlaybackState as kb}from"@vkontakte/videoplayer-core/es2018";vg();var ia="var(--btn-color, #fff)";var _1=Ie('<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),b1=Ie('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill-rule="evenodd" clip-rule="evenodd"><!></svg>');function Xe(t,e){var m;B(e,!0);let i=h(e,"width",19,()=>"24"),o=h(e,"height",19,()=>"24"),r=h(e,"fill",3,ia),a=(m=e.viewBox)!=null?m:`0 0 ${i()} ${o()}`;var l=b1(),d=C(l);{var s=p=>{var v=_1(),_=ue(v),y=C(_);ti(y,()=>e.children),S(_),li(),$(p,v)},u=p=>{var v=Ae(),_=ue(v);ti(_,()=>e.children),$(p,v)};V(d,p=>{e.shadow?p(s):p(u,!1)})}S(l),D(()=>{Me(l,"aria-label",e.ariaLabel),Me(l,"aria-hidden",!e.ariaLabel),Me(l,"width",i()),Me(l,"height",o()),Me(l,"viewBox",a),Me(l,"fill",r()),We(l,e.style),Me(l,"data-testid",e.testId)}),$(t,l),H()}import{isNullable as m_,InterfaceLanguage as v_}from"@vkontakte/videoplayer-shared/es2018";var $1={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:"Качество по умолчанию можно {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:`Видео грузится слишком медленно,
|
|
51
51
|
качество изменено на «Авто»`,slow_video_notification_suggest_description:`Видео загружается слишком медленно -
|
|
52
|
-
попробуйте изменить качество на «Авто»`,double_forward_label:"2x",preview_track_notification_text:"Потяните вверх для точной перемотки",preview_track_close_tooltip:"Выйти из режима точной перемотки"},
|
|
52
|
+
попробуйте изменить качество на «Авто»`,double_forward_label:"2x",preview_track_notification_text:"Потяните вверх для точной перемотки",preview_track_close_tooltip:"Выйти из режима точной перемотки"},p_=$1;var y1={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 at lower quality",quality_applience:"You can {action} the default quality",quality_applience_action:"change",default_quality_for_any_video:"Quality for all 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,
|
|
53
53
|
so the quality was changed to Auto`,slow_video_notification_suggest_description:`The video is loading too slowly.
|
|
54
|
-
Try switching the quality to Auto.`,double_forward_label:"2x",preview_track_notification_text:"pull up to open precise rewind",preview_track_close_tooltip:"dismiss precise rewind"},
|
|
55
|
-
`),o,r;for(let a=0;a<i.length;++a){if(o=w1.exec(i[a]))r={filename:o[2]&&o[2].indexOf("address at ")===0?o[2].substr(11):o[2],function:o[1]||
|
|
56
|
-
`).filter(i=>!!i)[0]}function k1(t){try{let e=E1(t);if(e)return e}catch(e){}return{value:g_(t),type:t&&t.name,stacktrace:{frames:[]}}}function P1(){return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}var Tu=class{constructor(e){if(e&&e.dsn){let i=I1.exec(e.dsn),o=i?i.slice(1):[],r=o[5].split("/"),a=r.slice(0,-1).join("/");this.apiUrl=o[0]+"://"+o[3]+(o[4]?":"+o[4]:"")+(a?"/"+a:"")+"/api/"+r.pop()+"/store/",this.authHeader="Sentry sentry_version=7,sentry_key="+o[1]+(o[2]?",sentry_secret="+o[2]:"")}this.environment=e&&e.environment}prepare(e){return{...this.getRequestBlank(),exception:{values:[k1(e)]}}}report(e){this.send(this.prepare(e))}send(e){!this.apiUrl||!e||this.createRequest(e)}createRequest(e){let i=new XMLHttpRequest;i.open("POST",this.apiUrl,!0),i.setRequestHeader("Content-type","application/json"),i.setRequestHeader(T1,this.authHeader||""),i.send(JSON.stringify(e))}getRequestBlank(){return{platform:"javascript",event_id:P1(),sdk:{name:"micro-sentry.javascript.core",version:"0.0.0"},timestamp:Date.now()/1e3,environment:this.environment}}};function h_(t,e){return Object.prototype.toString.call(e)==="[object RegExp]"?e.test(t):typeof e=="string"?t.indexOf(e)!==-1:!1}function A1(){return window}var Iu=class t extends Tu{constructor(e,i=A1()){super(e),this.options=e,this.window=i,this.destroyed=!1,this._state={};let{plugins:o=[],beforeSend:r=u=>u,beforeBreadcrumb:a=u=>u,blacklistUrls:l=[],ignoreErrors:d=[],release:s=void 0}=this.options||{};this.plugins=o.map(u=>new u(this)),this.beforeSend=r,this.beforeBreadcrumb=a,this.blacklistUrls=l,this.ignoreErrors=d,this.release=s}get state(){return this._state}clearState(){this._state={}}setTags(e){return this.setKeyState("tags",{...e}),this}setTag(e,i){return this.extendState({tags:{[e]:i}}),this}setExtra(e,i){return this.extendState({extra:{[e]:i}}),this}setExtras(e){return this.setKeyState("extra",{...e}),this}setUser(e){return this.setKeyState("user",{...e}),this}clone(){let e=new t({...this.options,plugins:[]});return e.extendState(this.state),e}withScope(e){let i=this.clone();e(i),i.destroy(),this.setBreadcrumbs(void 0)}addBreadcrumb(e){this.extendState({breadcrumbs:[{timestamp:Date.now()/1e3,...this.beforeBreadcrumb(e)}]})}setBreadcrumbs(e){this.setKeyState("breadcrumbs",e)}captureMessage(e,i){this.send({...this.getRequestBlank(),message:e,level:i})}destroy(){this.destroyed=!0,this.plugins.forEach(e=>{e.destroy&&e.destroy()})}isIgnoredError(e){return this.ignoreErrors.length?this.getPossibleEventMessages(e).some(i=>this.ignoreErrors.some(o=>h_(i,o))):!1}getRequestBlank(){return{request:{url:this.window.location.toString(),headers:{"User-Agent":this.window.navigator.userAgent}},...super.getRequestBlank(),sdk:{name:"micro-sentry.javascript.browser",version:"0.0.0"},...this.state}}send(e){this.destroyed||this.isDeniedUrl(e)||this.isIgnoredError(e)||(super.send(this.beforeSend({release:this.release,...e})),this.setBreadcrumbs(void 0))}getPossibleEventMessages(e){if(e.message)return[e.message];if(e.exception)try{let{type:i="",value:o=""}=e.exception.values&&e.exception.values[0]||{};return[`${o}`,`${i}: ${o}`]}catch(i){return[]}return[]}isDeniedUrl(e){if(!this.blacklistUrls.length)return!1;let i=this.getEventFilterUrl(e);return i?this.blacklistUrls.some(o=>h_(i,o)):!1}getEventFilterUrl(e){try{if(e.exception){let i=e.exception.values&&e.exception.values[0].stacktrace&&e.exception.values[0].stacktrace.frames;return i&&i[i.length-1].filename||null}return null}catch(i){return null}}extendState(e){this._state=Object.keys(e).reduce((i,o)=>{let r=this._state[o],a=Array.isArray(r)?r:null,l=e[o],d=Array.isArray(l)?l:null;return{...i,[o]:a||d?[...a||[],...d||[]]:{...typeof r!="string"?r:{},...typeof l!="string"?l:{}}}},this._state)}setKeyState(e,i){this._state[e]=i}};import{isNonNullable as Eu,Subscription as L1}from"@vkontakte/videoplayer-shared/es2018";var ku=null,Va=class{constructor(e,i,o={}){!ku&&e.dsn&&(this.sentryClient=new Iu({dsn:e.dsn,environment:i.env}),this.version=i.version,this.sentrySubscription=new L1,this.options=e,this.context=o,ku=this)}destroy(){var e,i;(e=this.sentryClient)==null||e.destroy(),(i=this.sentrySubscription)==null||i.unsubscribe(),ku=null}logIError(e,i=!1){e.thrown&&this.report(e.thrown,{fatal:i,errorType:e.id,category:e.category},{message:e.message,errorData:e.data})}report(e,i={},o={}){let{sentryClient:r,context:a,options:l}=this,{sampleRate:d=0,whiteErrorIdList:s,whiteErrorCategoryList:u=[],blackErrorIdList:f,blackErrorCategoryList:p}=l,{errorType:v,category:$}=i;if(Eu($)&&p.includes($)||Eu(v)&&f.includes(v))return;if(Math.random()<=d||Eu($)&&u.includes($)||Eu(v)&&s.includes(v)){Object.keys(i).length&&r.setTags({version:this.version,...i}),(Object.keys(a).length||Object.keys(o).length)&&r.setExtras({...a,...o});try{v&&r.captureMessage(v,i.fatal?Ml.fatal:Ml.error),r.report(e)}catch(h){console.error(h)}}}static getInstance(){return ku}};var vs=(d=>(d.Thumb="thumb",d.Video="video",d.Ads="ads",d.Crashed="crashed",d.LiveWaitingStart="LiveWaitingStart",d.LiveWaitingRecover="LiveWaitingRecover",d.LiveWaitingRecord="LiveWaitingRecord",d))(vs||{});var Pu=t=>{if(t.requestFullscreen)return t.requestFullscreen();if(t.msRequestFullscreen)return t.msRequestFullscreen();if(t.webkitRequestFullscreen)return t.webkitRequestFullscreen();if(t.mozRequestFullScreen)return t.mozRequestFullScreen();let e=t.querySelector("video");return e!=null&&e.webkitEnterFullscreen?(e.webkitEnterFullscreen(),Promise.resolve()):Promise.reject()},Au=t=>t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():Promise.reject(),__=(t,e)=>e?!0:t.fullscreenEnabled||!!t.webkitFullscreenEnabled||!!t.mozFullscreenEnabled||!!t.msFullscreenEnabled,b_=t=>{let e=t;e!=null&&e.webkitExitFullscreen&&(e==null||e.webkitExitFullscreen())},Nd=()=>{let t=document;return t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||t.msFullscreenElement},oa=()=>!!Nd(),Lu=t=>{document.addEventListener("fullscreenchange",t),document.addEventListener("webkitfullscreenchange",t),document.addEventListener("mozfullscreenchange",t),document.addEventListener("MSFullscreenChange",t)},Mu=t=>{document.removeEventListener("fullscreenchange",t),document.removeEventListener("webkitfullscreenchange",t),document.removeEventListener("mozfullscreenchange",t),document.removeEventListener("MSFullscreenChange",t)},$_=t=>{let e=window.screen;return(async r=>e.orientation?e.orientation.lock(r):e.mozLockOrientation?e.mozLockOrientation(r):e.msLockOrientation?e.msLockOrientation(r):Promise.reject())(((r={width:0,height:0})=>r.width<=r.height?"portrait":"landscape")(t))};import{clientChecker as y_}from"@vkontakte/videoplayer-core/es2018";var x_=()=>({title:Y("hotkey_map_modal_title"),closeBtnText:Y("hotkey_map_modal_close_btn_text"),groups:[{title:Y("hotkey_map_group_title_common"),items:[{description:Y("hotkey_map_item_mute_description"),value:Y("hotkey_map_item_mute_value")},{description:Y("hotkey_map_item_volume_up_description"),value:Y("hotkey_map_item_volume_up_value")},{description:Y("hotkey_map_item_volume_down_description"),value:Y("hotkey_map_item_volume_down_value")},{description:Y("hotkey_map_item_pip_description"),value:Y("hotkey_map_item_pip_value")},{description:Y("hotkey_map_item_full_screen_description"),value:Y("hotkey_map_item_full_screen_value")},{description:Y("hotkey_map_item_show_context_menu_description"),value:Y("hotkey_map_item_show_context_menu_value")},{description:Y("hotkey_map_item_show_hotkey_map_description"),value:Y("hotkey_map_item_show_hotkey_map_value")}]},{title:Y("hotkey_map_group_title_playback"),items:[{description:Y("hotkey_map_item_play_toggle_description"),value:Y("hotkey_map_item_play_toggle_value")},{description:Y("hotkey_map_item_seek_backward_description"),value:Y("hotkey_map_item_seek_backward_value")},{description:Y("hotkey_map_item_seek_forward_description"),value:Y("hotkey_map_item_seek_forward_value")},{description:Y("hotkey_map_item_fast_seek_backward_description"),value:Y("hotkey_map_item_fast_seek_backward_value")},{description:Y("hotkey_map_item_fast_seek_forward_description"),value:Y("hotkey_map_item_fast_seek_forward_value")},{description:Y("hotkey_map_item_rate_down_description"),value:Y("hotkey_map_item_rate_down_value")},{description:Y("hotkey_map_item_rate_up_description"),value:Y("hotkey_map_item_rate_up_value")},{description:Y("hotkey_map_item_prev_frame_description"),value:Y("hotkey_map_item_prev_frame_value")},{description:Y("hotkey_map_item_next_frame_description"),value:Y("hotkey_map_item_next_frame_value")},{description:Y("hotkey_map_item_jump_seek_description"),value:Y("hotkey_map_item_jump_seek_value")},{description:Y("hotkey_map_item_next_video_description"),value:Y("hotkey_map_item_next_video_value")},{description:Y("hotkey_map_item_prev_video_description"),value:Y("hotkey_map_item_prev_video_value")}]},{title:Y("hotkey_map_group_title_subtitles"),items:[{description:Y("hotkey_map_item_subtitles_toggle_description"),value:Y("hotkey_map_item_subtitles_toggle_value")}]},{title:Y("hotkey_map_group_title_episodes"),items:[{description:Y("hotkey_map_item_prev_episode_description"),value:y_.device.isApple?Y("hotkey_map_item_prev_episode_mac_value"):Y("hotkey_map_item_prev_episode_pc_value")},{description:Y("hotkey_map_item_next_episode_description"),value:y_.device.isApple?Y("hotkey_map_item_next_episode_mac_value"):Y("hotkey_map_item_next_episode_pc_value")}]}]});import{debounceFn as M1,ValueSubject as Mf}from"@vkontakte/videoplayer-shared/es2018";var Ra=class{constructor({enabled:e=!0}={enabled:!0}){this.isRequested=!1;this.videoElement=void 0;this.playerContainer=void 0;this.externalEventHandlers={};this.eventHandlers={enterpictureinpicture:this.onEnterPictureInPicture.bind(this),leavepictureinpicture:this.onLeavePictureInPicture.bind(this),resize:M1(this.onResize.bind(this),300)};this.info={isActive$:new Mf(!1),isEnabled$:new Mf(!1),type:0};this.info.isEnabled$=new Mf(e)}isSupported(){return document.pictureInPictureEnabled}isActive(){return this.info.isActive$.getValue()}setContext(e){this.svelteContext=e}async revealPictureInPicture(){this.isRequested&&(this.removeEventHandlers(),await this.request(),this.addEventHandlers())}async request(){var e;if(!(!this.isSupported()||this.isActive()))try{await((e=this.videoElement)==null?void 0:e.requestPictureInPicture())}catch(i){this.isRequested=!1}}async exit(){!this.isSupported()||!this.isActive()||await document.exitPictureInPicture()}assignPlayerContainer(e){this.isSupported()&&(this.playerContainer=e)}updateVideoElement(){this.isSupported()&&this.exit().finally(()=>{var e;this.removeEventHandlers(),this.videoElement=(e=this.playerContainer)==null?void 0:e.querySelector("video"),this.addEventHandlers()})}addEventHandlers(){var e,i;(e=this.videoElement)==null||e.addEventListener("enterpictureinpicture",this.eventHandlers.enterpictureinpicture),(i=this.videoElement)==null||i.addEventListener("leavepictureinpicture",this.eventHandlers.leavepictureinpicture)}setExternalEventHandlers(e){this.externalEventHandlers={...e}}removeEventHandlers(){var e,i;(e=this.videoElement)==null||e.removeEventListener("enterpictureinpicture",this.eventHandlers.enterpictureinpicture),(i=this.videoElement)==null||i.removeEventListener("leavepictureinpicture",this.eventHandlers.leavepictureinpicture)}async dispose(){this.removeEventHandlers(),await this.exit(),this.info.isActive$.next(!1),this.isRequested=!1}onEnterPictureInPicture(e){var r,a;let o=e.pictureInPictureWindow;o&&(this.info.isActive$.next(!0),this.isRequested=!0,o.addEventListener("resize",this.eventHandlers.resize),(a=(r=this.externalEventHandlers).enterpictureinpicture)==null||a.call(r,e))}onLeavePictureInPicture(e){var r,a;let o=e.pictureInPictureWindow;this.info.isActive$.next(!1),this.isRequested=!1,this.eventHandlers.resize.cancel(),o==null||o.removeEventListener("resize",this.eventHandlers.resize),(a=(r=this.externalEventHandlers).leavepictureinpicture)==null||a.call(r,e)}onResize(e){var i,o;(o=(i=this.externalEventHandlers).resize)==null||o.call(i,e)}setEnabled(e){this.info.isEnabled$.next(e)}};function Na(t){return t instanceof Ra}import{devNull as w_,now as S_}from"@vkontakte/videoplayer-shared/es2018";function Rf(t,e){B(e,!1);let i=ge();Et(()=>{i.getAdmanWrapper().startPostroll()}),xo(),F()}import{noop as N1}from"@vkontakte/videoplayer-shared/es2018";var V1=Te('<path d="M11.74 6.74a.9.9 0 0 1-1.28 0L6 2.27 1.54 6.74A.9.9 0 1 1 .26 5.46l5.1-5.1a.9.9 0 0 1 1.28 0l5.1 5.1a.9.9 0 0 1 0 1.28Z"></path>'),R1=Te('<path d="m5.773 8 3.363 3.364a.9.9 0 1 1-1.272 1.272l-4-4a.9.9 0 0 1 0-1.272l4-4a.9.9 0 0 1 1.272 1.272L5.773 8z"></path>');function Nr(t,e){B(e,!0);let i=g(e,"direction",3,"left"),o=g(e,"useBtnColor",3,!1),r=m(()=>["up","down"].includes(i())),a=m(()=>["right","down"].includes(i())),l=m(()=>`chevron-icon--${i()}`),d=m(()=>(()=>{let f="";return n(a)&&(f+="transform: rotate(180deg);"),f.length?f:void 0})()),s=m(()=>o()?ia:"currentColor"),u=m(()=>n(r)?"7":"16");Je(t,{width:"12",get height(){return n(u)},get fill(){return n(s)},get testId(){return n(l)},get style(){return n(d)},children:(f,p)=>{var v=Ae(),$=ce(v);{var y=x=>{var I=V1();b(x,I)},h=x=>{var I=R1();b(x,I)};R($,x=>{n(r)?x(y):x(h,!1)})}b(f,v)},$$slots:{default:!0}}),F()}var D1=(t,e,i)=>{t.stopPropagation(),n(e)&&i()()},O1=M('<div class="skip s-1f"> <!></div>'),B1=M("<div><!></div>"),F1={hash:"s-1f",code:".container.s-1f{background:rgba(0,0,0,.56);border-radius:6px;color:#fff;font-size:13px;padding:6px 10px;position:absolute;right:16px;top:14px;transition:color .2s}.container-mobile.s-1f{bottom:14px;font-size:15px;max-width:142px;top:unset}.skip.s-1f{align-items:flex-end;display:flex;gap:4px;white-space:nowrap}.skippable.s-1f{color:var(--white);cursor:pointer}.skippable.s-1f:hover{color:hsla(0,0%,100%,.75)}"};function Nf(t,e){B(e,!0),Q(t,F1);let[i,o]=Ve(),r=()=>w(u,"$isMobile",i),a=g(e,"position",3,0),l=g(e,"secondsToWatchBeforeSkip",3,0),d=g(e,"skipAd",3,N1),u=ge().ui.isMobile,f=m(()=>a()>0&&a()>=l());var p=B1();let v;p.__click=[D1,f,d];var $=C(p);{var y=x=>{var I=O1(),T=C(I),N=A(T);Nr(N,{direction:"right"}),S(I),O(L=>ve(T,`${L!=null?L:""} `),[()=>Y("skip_ads_now")]),b(x,I)},h=x=>{var I=ps();O(T=>ve(I,T),[()=>Y("skip_ads_after",{time:Math.ceil(l()-a()).toFixed(0)})]),b(x,I)};R($,x=>{n(f)?x(y):x(h,!1)})}S(p),O(x=>v=se(p,1,"container s-1f",null,v,x),[()=>({"container-mobile":r(),skippable:n(f)})]),b(t,p),F(),o()}Ye(["click"]);var H1=M('<button class="go-to-site s-1e"> </button>'),U1={hash:"s-1e",code:"button.go-to-site.s-1e{background:#fff;border:none;border-radius:6px;bottom:14px;color:#000;font-size:15px;left:16px;padding:6px 10px;pointer-events:none;position:absolute}"};function Df(t,e){B(e,!1),Q(t,U1),xo();var i=H1(),o=C(i,!0);S(i),O(r=>ve(o,r),[()=>Y("visit_advertiser")],xn),b(t,i),F()}var z1=M('<div class="top-gradient-mobile s-m"></div>'),W1=M('<div class="container s-m"><!> <video style="width: 100%; height: 100%" playsinline=""></video> <!> <!> <!></div>',2),K1={hash:"s-m",code:".container.s-m{height:100%;width:100%}.top-gradient-mobile.s-m{background:linear-gradient(1turn,transparent,rgba(0,0,0,.05) 12%,rgba(0,0,0,.15) 25%,rgba(0,0,0,.3) 45%,rgba(0,0,0,.4) 57%,rgba(0,0,0,.5) 77%,rgba(0,0,0,.55) 88%,rgba(0,0,0,.65));height:80px;left:0;pointer-events:none;position:absolute;top:0;width:100%}"};function Od(t,e){B(e,!0),Q(t,K1);let[i,o]=Ve(),r=()=>w(H,"$canSkipAd",i),a=()=>w(K,"$adPlaybackState",i),l=()=>w(T,"$isMobile",i),d=()=>w(z,"$adPosition",i),s=()=>w(j,"$secondsToWatchBeforeSkipAd",i),u=()=>w(I,"$isVideoEnded",i),f=g(e,"adsSlotId",3,void 0),p=g(e,"adsParams",3,void 0),v=g(e,"adsAutoplayParam",3,void 0),$=g(e,"duration",3,0),y=g(e,"adsExternalApi",3,void 0),h=ge(),x=kt(),I=h.state.isEnded$,T=h.ui.isMobile,N=x.ads.isMobileGoToSiteButton,L=W(void 0),E=W(void 0),k=!1,K=h.ads.playbackState,H=h.ads.canSkip,z=h.ads.position,j=h.ads.secondsToWatchBeforeSkip,ae=m(()=>r()&&a()!=="inactive"),X=m(()=>l()&&a()!=="inactive"&&N);Et(()=>{let P=h.getAdmanWrapper();if(w_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_mount"],numbers:[S_(),f()]}),!f()){P.onAdmanLoadingError();return}let We=()=>{var ke;let{width:De,height:Oe}=he(h.ui.playerSize),it=he(h.ui.isFullscreen),U=(ke=v())!=null?ke:he(h.ui.isAutoplay),Pe=x.ads.paramsOverride;return{width:De,height:Oe,isFullscreen:it,isAutoplay:U,adsContainer:n(L),adsVideoElement:n(E),slotId:f(),params:p(),paramsOverride:Pe,duration:$(),externalApi:y()}},Se=async De=>{De&&await vo();let Oe=We();await P.initAdman(Oe),k=!0},Z=new AbortController,ie=()=>{Z.abort()};return window.AdmanHTML?Se(!0).catch(()=>{P.onAdmanLoadingError()}):P.loadAdman(Z.signal).then(()=>Se(!1)).catch(()=>{P.onAdmanLoadingError()}),()=>{w_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_unmount"],numbers:[S_(),f()]}),!k&&ie()}});var ne=W1(),J=C(ne);{var we=P=>{var We=z1();b(P,We)};R(J,P=>{l()&&P(we)})}var pe=A(J,2);Ze(pe,P=>D(E,P),()=>n(E));var re=A(pe,2);{var be=P=>{Nf(P,{get position(){return d()},get secondsToWatchBeforeSkip(){return s()},get skipAd(){return h.actions.internal.skipAd}})};R(re,P=>{n(ae)&&P(be)})}var $e=A(re,2);{var ee=P=>{Rf(P,{})};R($e,P=>{u()&&P(ee)})}var Re=A($e,2);{var fe=P=>{Df(P,{})};R(Re,P=>{n(X)&&P(fe)})}S(ne),Ze(ne,P=>D(L,P),()=>n(L)),b(t,ne),F(),o()}var rn=t=>{if(!isFinite(t))return"00:00";let e=Math.round(t),i=Math.floor(e/(60*60));e-=i*3600;let o=Math.floor(e/60);e-=o*60;let r=[o,e].map(a=>String(a).padStart(2,"0")).join(":");return i>0&&(r=`${i}:${r}`),r};var q1=Te('<path fill="#fff"></path>'),Q1=Te("<path></path><!>",1);function Bd(t,e){let i=g(e,"isActive",3,!1),o=m(()=>i()?"live-active-icon":"live-icon"),r=m(()=>i()?"var(--timeline-slider-filled-active-live-bg, #FF3347)":void 0),a="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";Je(t,{width:"42",height:"20",get testId(){return n(o)},get fill(){return n(r)},children:(l,d)=>{var s=Q1(),u=ce(s),f=A(u);{var p=v=>{var $=q1();Le($,"d",a),b(v,$)};R(f,v=>{i()&&v(p)})}O(()=>Le(u,"d",`M5 0h32s5 0 5 5v10s0 5 -5 5h-32s-5 0 -5 -5v-10s0 -5 5 -5${i()?"":"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"+a}z`)),b(l,s)},$$slots:{default:!0}})}var G1=M('<div class="equalizer s-a"><div class="col s-a"></div> <div class="col s-a"></div> <div class="col s-a"></div></div>'),Y1=M('<div class="live-icon s-a"><!></div>'),j1=M('<span class="text s-a"> </span>'),X1=M("<div><!> <!></div>"),Z1={hash:"s-a",code:".wrapper.s-a{background-color:var(--black-alpha-40);border-radius:4px;padding:2px 6px;transition:visibility var(--controls-transition-duration),opacity var(--controls-transition-duration);white-space:nowrap}.wrapper.live.s-a{background:var(--red);border-radius:2px;font-size:0;height:20px;line-height:20px;padding:0 7px}.equalizer.s-a{display:inline-block;height:10px;margin-right:4px;margin-top:-4px;position:relative;vertical-align:middle;width:10px}.live.s-a .equalizer:where(.s-a){margin-top:-2px}.equalizer.s-a .col:where(.s-a){animation:1.5s linear infinite alternate;animation-play-state:paused;background:var(--btn-color,--white);bottom:0;height:10px;margin-right:2px;position:absolute;transform-origin:50% 100%;width:2px}.playing.s-a .equalizer:where(.s-a) .col:where(.s-a){animation-play-state:running}.equalizer.s-a .col:where(.s-a):first-child{animation-name:s-a-thumb-timer-equalizer-col1;left:0}.equalizer.s-a .col:where(.s-a):nth-child(2){animation-name:s-a-thumb-timer-equalizer-col2;left:3px}.equalizer.s-a .col:where(.s-a):nth-child(3){animation-name:s-a-thumb-timer-equalizer-col3;left:6px}.live-icon.s-a{display:inline-block;height:20px;margin:0 -7px;vertical-align:middle;width:42px}@keyframes s-a-thumb-timer-equalizer-col1{0%{transform:scaleY(.1)}25%{transform:scaleY(.8)}50%{transform:scaleY(.4)}75%{transform:scaleY(.6)}to{transform:scaleY(.1)}}@keyframes s-a-thumb-timer-equalizer-col2{0%{transform:scaleY(1)}25%{transform:scaleY(.3)}50%{transform:scaleY(.9)}75%{transform:scaleY(.6)}to{transform:scaleY(1)}}@keyframes s-a-thumb-timer-equalizer-col3{0%{transform:scaleY(.6)}25%{transform:scaleY(.9)}50%{transform:scaleY(.1)}75%{transform:scaleY(.9)}to{transform:scaleY(.6)}}.text.s-a{color:var(--controls-time);font-size:13px;font-weight:500;line-height:16px}"};function Fd(t,e){Q(t,Z1);let i=g(e,"withEqualizer",3,!1),o=g(e,"isLive",3,!1),r=g(e,"isPlaying",3,!1);var a=X1();let l;var d=C(a);{var s=v=>{var $=G1();b(v,$)};R(d,v=>{i()&&v(s)})}var u=A(d,2);{var f=v=>{var $=Y1(),y=C($);Bd(y,{isActive:!0}),S($),b(v,$)},p=v=>{var $=j1(),y=C($,!0);S($),O(()=>ve(y,e.time)),b(v,$)};R(u,v=>{o()?v(f):v(p,!1)})}S(a),O(v=>l=se(a,1,"wrapper s-a",null,l,v),[()=>({live:o(),playing:r()})]),b(t,a)}var Vl=(t,e,i)=>{let o;return()=>(window.clearTimeout(o),t?o=window.setTimeout(()=>e.set(!0),i):e.set(!1),()=>window.clearTimeout(o))};var J1=M('<div role="timer" data-testid="thumb-timer"><!></div>'),ey={hash:"s-n",code:".thumb-timer.s-n{bottom:0;margin:8px;position:absolute;right:0;transition:visibility var(--controls-transition-duration),opacity var(--controls-transition-duration);z-index:var(--thumb-timer-z-index)}"};function Hd(t,e){B(e,!0),Q(t,ey);let[i,o]=Ve(),r=()=>w(f,"$disabled",i),a=g(e,"isHidden",3,!1),l=g(e,"isLive",3,!1),d=g(e,"isPlaying",3,!1),s=kt(),u=m(()=>rn(e.duration-e.position)),f=de(!1);var p=J1();let v;var $=C(p);Fd($,{get time(){return n(u)},get isLive(){return l()},get isPlaying(){return d()},withEqualizer:!0}),S(p),Ls(p,()=>Vl(a()&&s.features.usePerformanceFix,f,s.disableInvisibleComponentsTimeout)),O(y=>v=se(p,1,"thumb-timer s-n",null,v,y),[()=>({"out-of-flow":r(),hidden:a()})]),b(t,p),F(),o()}var Rl=t=>{if(!navigator.clipboard){C_(t);return}navigator.clipboard.writeText(t).catch(()=>C_(t))};function C_(t){if(document.queryCommandSupported&&document.queryCommandSupported("copy")){let e=document.createElement("textarea");e.textContent=t,e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e),e.select();try{document.execCommand("copy")}finally{document.body.removeChild(e)}}}import{ChromecastState as uy}from"@vkontakte/videoplayer-core/es2018";import{clientChecker as T_}from"@vkontakte/videoplayer-core/es2018";var Of="focus-hidden";var Dr=t=>{t.stopPropagation(),t.preventDefault()},Bf=t=>{var e,i;(i=(e=t.parentNode)==null?void 0:e.firstElementChild)==null||i.classList.remove(Of)},iy=t=>{var i;let e=t.previousElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.lastElementChild),e==null||e.focus()},oy=t=>{var i;let e=t.nextElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.firstElementChild),e==null||e.focus()},ny=t=>{let e=t.code;return e==="Tab"&&!t.shiftKey||e==="ArrowDown"},ry=t=>{let e=t.code;return e==="Tab"||e==="ArrowUp"},I_=t=>t.code==="Escape",sy=t=>t.code==="ArrowLeft",Ud=(t,e=[])=>{let i=t.code;return["Enter","Space",...e].includes(i)},E_=t=>{ny(t)?(Dr(t),oy(t.target)):ry(t)&&(Dr(t),iy(t.target))},sa=t=>!T_.device.isAndroid&&(t==null?void 0:t.detail)===0||T_.device.isAndroid&&(t==null?void 0:t.pointerType)==="",Nl=async(t,e,i)=>{await vo(),t&&!t.classList.contains("opened")&&!e&&he(i)&&(await vo(),i.set(!1),t.focus())},k_=async(t,e,i)=>{await vo(),t&&!e&&he(i)&&(i.set(!1),t.focus())},zd=async(t,e,i,o=!1)=>{if(await vo(),!!t&&e&&!o){let a=t.children[0];a==null||a.classList.toggle(Of,!i),a==null||a.focus()}},P_=async(t,e)=>{setTimeout(()=>{let i=t[e];!!i&&i.focus()},100)},Vu=(t,e)=>{E_(t),Bf(t.target),I_(t)&&(Dr(t),e())},Ru=async(t,e)=>{Ud(t,["ArrowRight"])&&(Dr(t),e())},A_=async(t,e,i)=>{if(E_(t),sy(t)){Dr(t),e();return}I_(t)&&(Dr(t),i())},Dl=(t,e)=>{Ud(t)&&(Dr(t),e())},L_=(t,e,i)=>{if(Ud(t))Dr(t),i(!e);else{let o=t.code;if(o==="ArrowLeft"&&e){i(!1),Dr(t);return}o==="ArrowRight"&&!e&&(i(!0),Dr(t))}},M_=t=>{let e=t.getBoundingClientRect(),i=-14,o=e.left+e.width,r=e.top+i;return{right:o,bottom:r}},V_=t=>{if(!t)return{top:0,left:0};let e=t.getBoundingClientRect(),i=-58,o=8,r=e.left+o;return{bottom:e.bottom+i,left:r}};import{isNullable as Nu,isValidURL as py}from"@vkontakte/videoplayer-shared/es2018";var es={"copy-link":100,"copy-link-timestamp":200,"copy-embed-code":300,pip:400,"video-loop":500,rotate:600,report:700,"save-debug":800,"save-trace":900,"debug-info":1e3};import{noop as R_}from"@vkontakte/videoplayer-shared/es2018";var ly=(t,e)=>{Dl(t,()=>e())},dy=M('<li class="item s-1q" role="menuitem" tabindex="0"> </li>'),cy={hash:"s-1q",code:".item.s-1q{color:hsla(0,0%,100%,.72);cursor:pointer;display:block;font-size:13px;letter-spacing:-.14px;line-height:18px;padding:8px 16px;position:relative;white-space:nowrap}.item.s-1q:hover{background:rgba(66,66,66,.5);color:var(--white)}"};function Ff(t,e){B(e,!0),Q(t,cy);let i=g(e,"onClick",3,R_),o=g(e,"closeContextMenu",3,R_),r=d=>{d==null||d.stopPropagation(),i()(),o()()};var a=dy();a.__click=r,a.__keydown=[ly,r];var l=C(a,!0);S(a),O(()=>{var d;Le(a,"aria-label",(d=e.ariaLabel)!=null?d:e.label),Le(a,"data-testid",e.id),ve(l,e.label)}),b(t,a),F()}Ye(["click","keydown"]);var Oa=(t,e)=>t.weight-e.weight;var Wd=(o=>(o.OPEN_SUB_MENU="OPEN_SUB_MENU",o.CLICK="CLICK",o.SWITCH="SWITCH",o))(Wd||{});var fy=(t,e)=>{Vu(t,e)},my=t=>{t.preventDefault()},vy=M('<ul role="menu" class="s-14"></ul>'),gy={hash:"s-14",code:"ul.s-14{background:rgba(0,0,0,.72);border-radius:8px;list-style:none;margin:0;max-height:100%;max-width:100%;overflow-x:hidden;overflow-y:auto;padding:6px 0;position:absolute;transition:visibility .1s,opacity .1s;z-index:var(--context-menu-z-index)}"};function Hf(t,e){B(e,!0),Q(t,gy);let[i,o]=Ve(),r=()=>w(we,"$playerPhase",i),a=()=>w(ae,"$isLive$",i),l=()=>w(pe,"$isPiPEnabled$",i),d=()=>w(j,"$chromecastState$",i),s=()=>w(re,"$pictureInPictureApiIsActive$",i),u=()=>w(J,"$isLooped$",i),f=()=>w(X,"$positionExact$",i),p=()=>w(K,"$additionalContextMenuItems$",i),v=g(e,"visible",3,!1),$=g(e,"position",19,()=>({top:0,left:0})),y=g(e,"playerContainerRef",3,void 0),h=g(e,"menuElementRef",15,void 0),x=W(0),I=W(0),T=ge(),{pictureInPicture$:N}=wo(),L=kt(),E=T.ui.contextMenu.visible$,k=T.ui.debugPanelVisible,K=T.ui.additionalContextMenuItems$,H=T.ui.t,z=T.actions.internal.togglePictureInPicture,j=T.state.chromecastState$,ae=T.state.isLive$,X=T.state.positionExact$,ne=T.state.isInteractive,J=T.state.looped$,we=T.playerPhase,{isEnabled$:pe,isActive$:re}=N,be=m(()=>r()==="video"),$e=m(()=>!!a()&&n(be)),ee=m(()=>["thumb","LiveWaitingStart","LiveWaitingRecover","LiveWaitingRecord"].includes(r())),Re=m(()=>{var ue;return L.features.copyVideoLink&&((ue=T.callbacks)==null?void 0:ue.onCopyVideoLink)}),fe=m(()=>n(Re)&&!n(ee)&&!ne&&!n($e)),P=m(()=>{var ue;return!!((ue=T.callbacks)!=null&&ue.onCopyEmbedCodeClicked)}),We=m(()=>l()&&d()!==uy.CONNECTED&&!ne&&n(be)),Se=m(()=>!ne&&!n(ee)&&!n($e)),Z=m(()=>L.features.videoRotate&&!ne&&!n(ee)),ie=m(()=>L.showSupport&&!s()),De=m(()=>L.features.saveTraceInfoToFile),Oe=()=>{var ue;E.set(!1),(ue=e.returnFocus)==null||ue.call(e)},it=(ue,ze)=>{if(!h()||!y())return;let Qe=h().getBoundingClientRect(),ct=y().getBoundingClientRect();D(x,ue-ct.left),D(I,ze-ct.top),n(x)+Qe.width>ct.width&&D(x,ct.width-Qe.width),n(I)+Qe.height>ct.height&&D(I,ct.height-Qe.height),D(x,Math.max(n(x),0),!0),D(I,Math.max(n(I),0),!0)};Ne(()=>{(async()=>{if(h()&&y()){await vo();let{top:ze,left:Qe,bottom:ct,right:Nt}=$(),Ht=Qe!=null?Qe:0,Gt=ze!=null?ze:0,vi=h().getBoundingClientRect();Nu(Qe)&&!Nu(Nt)&&(Ht=Nt-vi.width),Nu(ze)&&!Nu(ct)&&(Gt=ct-vi.height),Ht=Math.max(Ht,0),Gt=Math.max(Gt,0),it(Ht,Gt)}})()});let U=()=>{T.actions.internal.videoRotate()},Pe=()=>{py(e.supportLink)&&window.open(e.supportLink,"_blank"),T.actions.internal.reportProblem(),T.actions.internal.pause()},ke=()=>{let ue=T.actions.internal.getDebugTextData();if(L.features.saveDebugInfoToFile){let ze=new Blob([...ue],{type:"plain/text"}),Qe=window.URL.createObjectURL(ze);Ma(Qe,"vk_player_debug_info","txt")}else Rl(T.actions.internal.getDebugTextData())},He=()=>{let ue=T.actions.internal.getTraceTextData(),ze=new Blob([...ue],{type:"application/json"}),Qe=window.URL.createObjectURL(ze);Ma(Qe,"vk_player_trace_info","json")},tt=()=>{k.set(!0)},ye=async()=>{var ue;try{z()}finally{(ue=e.returnFocus)==null||ue.call(e)}},Ie=()=>{T.actions.internal.setLooped(!u())},Be=()=>{var ue,ze;if(n(P)){let Qe=(ze=(ue=T.callbacks)==null?void 0:ue.onCopyEmbedCodeClicked)==null?void 0:ze.call(ue);Qe&&Rl(Qe)}},Lt=(ue=!1)=>{var ze,Qe;if((ze=T.callbacks)!=null&&ze.onCopyVideoLink){let ct=(Qe=T.callbacks)==null?void 0:Qe.onCopyVideoLink(ue,f());ct&&Rl(ct)}},mt=m(()=>L.features.saveDebugInfoToFile?H("menu_save_debug"):H("menu_copy_debug")),Vt=m(()=>n(Re)?{id:"copy-link",weight:es["copy-link"],label:H("menu_copy_video_link"),onClick:()=>Lt()}:void 0),dt=m(()=>n(fe)?{id:"copy-link-timestamp",weight:es["copy-link-timestamp"],label:H("menu_copy_video_link_with_timestamp"),onClick:()=>Lt(!0)}:void 0),xt=m(()=>n(P)?{id:"copy-embed-code",weight:es["copy-embed-code"],label:H("menu_copy_embed_code"),onClick:Be}:void 0),Qt=m(()=>n(We)?{id:"pip",weight:es.pip,label:s()?H("menu_pip_close"):H("menu_pip"),onClick:ye}:void 0),Tt=m(()=>n(Se)?{id:"video-loop",weight:es["video-loop"],label:u()?H("menu_video_loop_off"):H("menu_video_loop_on"),ariaLabel:H("aria_label_menu_loop"),onClick:Ie}:void 0),Mt=m(()=>n(Z)?{id:"rotate",weight:es.rotate,label:H("menu_video_rotate"),ariaLabel:H("aria_label_menu_rotate"),onClick:U}:void 0),Rt=m(()=>n(ie)?{id:"report",weight:es.report,label:H("menu_report"),ariaLabel:`${H("menu_report")}. ${H("aria_label_new_tab_alert")}`,onClick:Pe}:void 0),G=m(()=>({id:"save-debug",weight:es["save-debug"],label:n(mt),onClick:ke})),Ce=m(()=>n(De)?{id:"save-trace",weight:es["save-trace"],label:H("menu_save_debug"),onClick:He}:void 0),le=m(()=>({id:"debug-info",weight:es["debug-info"],label:H("menu_debug_overlay"),ariaLabel:H("aria_label_menu_debug_overlay"),onClick:tt})),_e=m(()=>[n(Vt),n(dt),n(xt),n(Qt),n(Tt),n(Mt),n(Rt),n(G),n(Ce),n(le),...p()].filter(ue=>!!ue).sort(Oa));var Me=Ae(),rt=ce(Me);{var pt=ue=>{var ze=vy();ze.__contextmenu=[my],ze.__keydown=[fy,Oe],bi(ze,21,()=>n(_e),Qe=>Qe.id,(Qe,ct)=>{Ff(Qe,{get id(){return n(ct).id},get label(){return n(ct).label},get ariaLabel(){return n(ct).ariaLabel},get onClick(){return n(ct).onClick},closeContextMenu:Oe})}),S(ze),Ze(ze,Qe=>h(Qe),()=>h()),O(()=>{var Qe,ct;return qe(ze,`top: ${(Qe=n(I))!=null?Qe:""}px; left: ${(ct=n(x))!=null?ct:""}px;`)}),b(ue,ze)};R(rt,ue=>{v()&&ue(pt)})}b(t,Me),F(),o()}Ye(["contextmenu","keydown"]);var Du=class{constructor(e){this.value=e,this.next=null}};var Ol=class{constructor(e){this.top=null,this.bottom=null,this.size=0,this.maxSize=e}push(e){let i=new Du(e);this.top?(this.top.next=i,this.top=i):(this.top=i,this.bottom=i),this.size++,this.size>this.maxSize&&this.bottom&&(this.bottom=this.bottom.next)}getValuesFromBottom(){let e=[],i=this.bottom;for(;i;)e.push(i.value),i=i.next;return e}};var hy=M('<div class="container s-13"><canvas class="s-13"></canvas></div>'),_y={hash:"s-13",code:".container.s-13{display:inline-block;height:16px;width:120px}canvas.s-13{margin-top:2px;transform:scaleY(-1)}"};function Kd(t,e){B(e,!0),Q(t,_y);let i=g(e,"values",19,()=>[]),o=W(void 0),r=W(null),a=16,l=120,d=60,s=l/d;Et(()=>{n(o).width=l,n(o).height=a,D(r,n(o).getContext("2d"),!0)});function u(v,$,y,h,x){x===0&&(x=1),v.fillStyle="#fff",v.fillRect($,y,h,x)}Ne(()=>{let v="";if(n(r)){let $=i()[0];for(let h=1;h<i().length;h++)i()[h]>$&&($=i()[h]);n(r).clearRect(0,0,l,a);let y=d-1;for(let h=i().length-1;h>=0;h--){let x=y*s,I=$>0?a*(i()[h]/$):0;u(n(r),x,0,s,I),v=I+" "+v,y--}}});var f=hy(),p=C(f);Ze(p,v=>D(o,v),()=>n(o)),S(f),b(t,f),F()}import{safeStorage as N_}from"@vkontakte/videoplayer-shared/es2018";var by=(t,e)=>{t.stopPropagation(),N_.remove(Pd),e.set(!1)},$y=M('<div class="s-k"><div class="s-k">Video id</div> <span> </span></div>'),yy=M('<div class="s-k"><div class="s-k">VSID</div> <span> </span></div>'),xy=M('<div class="s-k"><div class="s-k">Provider</div> <span> </span></div>'),wy=M('<div class="s-k"><div class="s-k">Streams</div> <span> </span></div>'),Sy=M('<div class="s-k"><div class="s-k">Viewport</div> <span> </span></div>'),Cy=M('<div class="s-k"><div class="s-k">Video size</div> <span> </span></div>'),Ty=M('<div class="s-k"><div class="s-k">CDN host</div> <span> </span></div>'),Iy=M('<div class="s-k"><div class="s-k">Volume</div> <span> </span></div>'),Ey=M('<div class="s-k"><div class="s-k">Position</div> <span> </span></div>'),ky=M('<div class="s-k"><div class="s-k">Buffer</div> <span> </span></div>'),Py=M('<div class="s-k"><div class="s-k">Nbuffer</div> <span> </span></div>'),Ay=M('<div class="s-k"><div class="s-k">Live latency</div> <span> </span></div>'),Ly=M('<div class="s-k"><div class="s-k">Segment</div> <span> </span></div>'),My=M('<div class="s-k"><div class="s-k">Network</div> <!> <span> </span></div>'),Vy=M('<div class="s-k"><div class="s-k">V bitrate</div> <!> <span> </span></div>'),Ry=M('<div role="region"><button class="close s-k" title="закрыть">[x]</button> <div class="content s-k"><div class="s-k"><div class="s-k">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-k"><div class="s-k">Dropped</div> <span> </span></div> <!> <!> <div class="s-k"><div class="s-k">FPS</div> <!> <span> </span></div></div></div>'),Ny={hash:"s-k",code:".container.s-k{background:rgba(28,28,28,.8);border-radius:4px;color:#fff;font-size:10px;left:20px;min-width:160px;position:absolute;text-align:left;top:45px;user-select:text;z-index:var(--debug-panel-z-index)}.container-mobile.s-k{left:16px;top:16px}button.close.s-k{background-color:transparent;border:none;color:#fff;cursor:pointer;outline:0;padding:0;position:absolute;right:5px;top:3px}.content.s-k{padding:5px}.content.s-k>div:where(.s-k)>div:where(.s-k){display:inline-block;padding:0 5px;text-align:right;width:60px}"};function qd(t,e){B(e,!0),Q(t,Ny);let[i,o]=Ve(),r=()=>w(d,"$isMobile",i),a=ge(),l=a.ui.debugPanelVisible,d=a.ui.isMobile,s=W(si(a.actions.internal.getDebugPanelData())),u=a.actions.internal.getVideoElement(),f=W(0),p=W(0),v=W(0),$=new Ol(60),y=new Ol(60),h=new Ol(60),x=W(si([])),I=W(si([])),T=W(si([])),N=Y("aria_label_debug_panel");Et(()=>{N_.set(Pd,"true"),a.actions.internal.startLogging(),u&&(D(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0),D(f,u.getVideoPlaybackQuality().totalVideoFrames,!0));let G=window.setInterval(()=>{D(s,a.actions.internal.getDebugPanelData(),!0)},500),Ce;return u&&(Ce=window.setInterval(()=>{if(u){D(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0);let le=u.getVideoPlaybackQuality().totalVideoFrames;D(v,le-n(f)),D(f,le,!0),$.push(n(v)),n(s).speed&&y.push(n(s).speed),n(s).bitrate&&h.push(n(s).bitrate),D(x,$.getValuesFromBottom(),!0),D(I,y.getValuesFromBottom(),!0),D(T,h.getValuesFromBottom(),!0)}},1e3)),()=>{a.actions.internal.stopLogging(),clearInterval(G),Ce&&clearInterval(Ce)}});var L=Ry();let E;var k=C(L);k.__click=[by,l];var K=A(k,2),H=C(K),z=A(C(H),2),j=C(z,!0);S(z),S(H);var ae=A(H,2);{var X=G=>{var Ce=$y(),le=A(C(Ce),2),_e=C(le,!0);S(le),S(Ce),O(()=>ve(_e,n(s).id)),b(G,Ce)};R(ae,G=>{n(s).id&&G(X)})}var ne=A(ae,2);{var J=G=>{var Ce=yy(),le=A(C(Ce),2),_e=C(le,!0);S(le),S(Ce),O(()=>ve(_e,n(s).vsid)),b(G,Ce)};R(ne,G=>{n(s).vsid&&G(J)})}var we=A(ne,2);{var pe=G=>{var Ce=xy(),le=A(C(Ce),2),_e=C(le,!0);S(le),S(Ce),O(()=>ve(_e,n(s).provider)),b(G,Ce)};R(we,G=>{n(s).provider&&G(pe)})}var re=A(we,2);{var be=G=>{var Ce=wy(),le=A(C(Ce),2),_e=C(le);S(le),S(Ce),O(()=>{var Me,rt;return ve(_e,`Video: ${(Me=n(s).videoCodec||"")!=null?Me:""} ${n(s).hdr?"(HDR)":""}
|
|
54
|
+
Try switching the quality to Auto.`,double_forward_label:"2x",preview_track_notification_text:"pull up to open precise rewind",preview_track_close_tooltip:"dismiss precise rewind"},f_=y1;var Vs=new Map;Vs.set(v_.EN,f_);Vs.set(v_.RU,p_);var g_=new Map,Mf=({language:t,pack:e,fallback:i})=>{if(Vs.has(t)){let o=Vs.get(t);Vs.set(t,{...o,...e})}else Vs.set(t,e);g_.set(t,i)},Vf=t=>Vs.has(t),Rf=(t,e,i,o)=>{var l;let r=Vs.get(t),a=r==null?void 0:r[e];if(m_(a)){let d=(l=g_.get(t))!=null?l:o,s=d?Vs.get(d):void 0;a=s==null?void 0:s[e]}return m_(a)?e+Object.values(i!=null?i:{}).join(" "):i?a.replaceAll(/{(\w+?)}/g,(d,s)=>{var u;return(u=i[s])!=null?u:""}):a},j=(t,e)=>{let{interfaceLanguage$:i}=_e(),o=$e(i),r=Rt();return Rf(o,t,e,r.defaultLanguage)};var x1=Ie('<path d="M26.86 15.18a3.7 3.7 0 0 0 2.53-3.6C29.4 8.91 27.2 7 24.07 7c-1.96 0-3.57.78-4.67 2.29l-.1.15a1.33 1.33 0 0 0 .26 1.85c.54.4 1.3.35 1.74-.16l.2-.25a3 3 0 0 1 2.5-1.3c1.53 0 2.6.91 2.6 2.25 0 1.36-1.09 2.27-2.65 2.27h-.58a1.23 1.23 0 0 0 0 2.47h.58c1.75 0 2.91.98 2.91 2.39 0 1.45-1.19 2.46-2.88 2.46a3.2 3.2 0 0 1-2.89-1.6l-.2-.29a1.4 1.4 0 0 0-2.05-.25 1.3 1.3 0 0 0-.3 1.68l.21.33A6 6 0 0 0 24 24c3.28 0 5.63-2.04 5.63-4.92a4 4 0 0 0-2.77-3.9M37.73 12.68c-.46 0-1 .04-1.5.16L38.8 9.1a1.34 1.34 0 1 0-2.2-1.52l-3.76 5.47C31.43 15.18 31 16.87 31 18.33 31 21.8 33.56 24 37.19 24c3.6 0 6.16-2.4 6.16-5.77a5.4 5.4 0 0 0-5.63-5.56m-.53 8.74c-1.98 0-3.33-1.27-3.33-3.14 0-1.85 1.35-3.14 3.33-3.14 1.95 0 3.3 1.29 3.3 3.14 0 1.87-1.35 3.14-3.3 3.14m20.8-5.9c0 5.03-2.7 8.43-6.63 8.43s-6.62-3.4-6.62-8.44 2.7-8.44 6.62-8.44S58 10.47 58 15.51m-10.35 0c0 3.56 1.49 5.85 3.72 5.85s3.72-2.3 3.72-5.86-1.48-5.86-3.72-5.86c-2.23 0-3.72 2.3-3.72 5.86M67 9.49A3.5 3.5 0 0 1 63.51 13 3.5 3.5 0 0 1 60 9.49 3.5 3.5 0 0 1 63.51 6 3.5 3.5 0 0 1 67 9.49m-5 0c0 .83.68 1.51 1.51 1.51.81 0 1.5-.68 1.5-1.51 0-.81-.69-1.5-1.5-1.5-.83 0-1.51.69-1.51 1.5ZM67 23.5c0-1.32-1.2-3.1-4.2-4.67a1.5 1.5 0 1 1 1.4-2.66c3.25 1.72 5.8 4.26 5.8 7.33 0 3.13-2.56 5.55-6.09 7.27-3.63 1.77-8.82 3.06-15.26 3.72a1.5 1.5 0 0 1-.3-2.98c6.25-.64 11.05-1.88 14.25-3.44 3.3-1.6 4.4-3.27 4.4-4.57M38.88 35H38c-9.64 0-17.45-1.13-22.9-3.02-2.72-.94-4.94-2.1-6.5-3.47C7.01 27.14 6 25.44 6 23.5a6.2 6.2 0 0 1 1.9-4.25 16 16 0 0 1 4.43-3.1 1.5 1.5 0 1 1 1.34 2.7q-2.39 1.19-3.59 2.46C9.3 22.14 9 22.87 9 23.5c0 .8.4 1.74 1.57 2.76s3 2.01 5.51 2.89C21.11 30.89 28.55 32 38 32h.88l-1.44-1.44a1.5 1.5 0 0 1 2.12-2.12l4 4h.01a1.5 1.5 0 0 1 .32 1.63 2 2 0 0 1-.33.5l-4 4a1.5 1.5 0 0 1-2.12-2.13z"></path>');function kd(t,e){B(e,!1);let i=j("video360");mo(),Xe(t,{width:"76",height:"45",get ariaLabel(){return i},testId:"video-360-icon",shadow:!0,children:(o,r)=>{var a=x1();$(o,a)},$$slots:{default:!0}}),H()}import"@vkontakte/videoplayer-core/es2018";var Al;(function(t){t.fatal="fatal",t.error="error",t.warning="warning",t.log="log",t.info="info",t.debug="debug",t.critical="critical"})(Al||(Al={}));var w1=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,S1=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,C1=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Su="?",T1="X-Sentry-Auth",I1=/^(?:(\w+):)\/\/(?:([\w-]+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function E1(t){if(!t.stack)return null;let e=[],i=t.stack.split(`
|
|
55
|
+
`),o,r;for(let a=0;a<i.length;++a){if(o=w1.exec(i[a]))r={filename:o[2]&&o[2].indexOf("address at ")===0?o[2].substr(11):o[2],function:o[1]||Su,lineno:o[3]?+o[3]:null,colno:o[4]?+o[4]:null};else if(o=C1.exec(i[a]))r={filename:o[2],function:o[1]||Su,lineno:+o[3],colno:o[4]?+o[4]:null};else if(o=S1.exec(i[a]))a===0&&!o[5]&&t.columnNumber!==void 0&&(e[0].column=t.columnNumber+1),r={filename:o[3],function:o[1]||Su,lineno:o[4]?+o[4]:null,colno:o[5]?+o[5]:null};else continue;!r.function&&r.lineno&&(r.function=Su),e.push(r)}return e.length?{value:h_(t),type:t.name,stacktrace:{frames:e.reverse()}}:null}function h_(t){return(t&&t.message||"No error message").split(`
|
|
56
|
+
`).filter(i=>!!i)[0]}function P1(t){try{let e=E1(t);if(e)return e}catch(e){}return{value:h_(t),type:t&&t.name,stacktrace:{frames:[]}}}function k1(){return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}var Cu=class{constructor(e){if(e&&e.dsn){let i=I1.exec(e.dsn),o=i?i.slice(1):[],r=o[5].split("/"),a=r.slice(0,-1).join("/");this.apiUrl=o[0]+"://"+o[3]+(o[4]?":"+o[4]:"")+(a?"/"+a:"")+"/api/"+r.pop()+"/store/",this.authHeader="Sentry sentry_version=7,sentry_key="+o[1]+(o[2]?",sentry_secret="+o[2]:"")}this.environment=e&&e.environment}prepare(e){return{...this.getRequestBlank(),exception:{values:[P1(e)]}}}report(e){this.send(this.prepare(e))}send(e){!this.apiUrl||!e||this.createRequest(e)}createRequest(e){let i=new XMLHttpRequest;i.open("POST",this.apiUrl,!0),i.setRequestHeader("Content-type","application/json"),i.setRequestHeader(T1,this.authHeader||""),i.send(JSON.stringify(e))}getRequestBlank(){return{platform:"javascript",event_id:k1(),sdk:{name:"micro-sentry.javascript.core",version:"0.0.0"},timestamp:Date.now()/1e3,environment:this.environment}}};function __(t,e){return Object.prototype.toString.call(e)==="[object RegExp]"?e.test(t):typeof e=="string"?t.indexOf(e)!==-1:!1}function A1(){return window}var Tu=class t extends Cu{constructor(e,i=A1()){super(e),this.options=e,this.window=i,this.destroyed=!1,this._state={};let{plugins:o=[],beforeSend:r=u=>u,beforeBreadcrumb:a=u=>u,blacklistUrls:l=[],ignoreErrors:d=[],release:s=void 0}=this.options||{};this.plugins=o.map(u=>new u(this)),this.beforeSend=r,this.beforeBreadcrumb=a,this.blacklistUrls=l,this.ignoreErrors=d,this.release=s}get state(){return this._state}clearState(){this._state={}}setTags(e){return this.setKeyState("tags",{...e}),this}setTag(e,i){return this.extendState({tags:{[e]:i}}),this}setExtra(e,i){return this.extendState({extra:{[e]:i}}),this}setExtras(e){return this.setKeyState("extra",{...e}),this}setUser(e){return this.setKeyState("user",{...e}),this}clone(){let e=new t({...this.options,plugins:[]});return e.extendState(this.state),e}withScope(e){let i=this.clone();e(i),i.destroy(),this.setBreadcrumbs(void 0)}addBreadcrumb(e){this.extendState({breadcrumbs:[{timestamp:Date.now()/1e3,...this.beforeBreadcrumb(e)}]})}setBreadcrumbs(e){this.setKeyState("breadcrumbs",e)}captureMessage(e,i){this.send({...this.getRequestBlank(),message:e,level:i})}destroy(){this.destroyed=!0,this.plugins.forEach(e=>{e.destroy&&e.destroy()})}isIgnoredError(e){return this.ignoreErrors.length?this.getPossibleEventMessages(e).some(i=>this.ignoreErrors.some(o=>__(i,o))):!1}getRequestBlank(){return{request:{url:this.window.location.toString(),headers:{"User-Agent":this.window.navigator.userAgent}},...super.getRequestBlank(),sdk:{name:"micro-sentry.javascript.browser",version:"0.0.0"},...this.state}}send(e){this.destroyed||this.isDeniedUrl(e)||this.isIgnoredError(e)||(super.send(this.beforeSend({release:this.release,...e})),this.setBreadcrumbs(void 0))}getPossibleEventMessages(e){if(e.message)return[e.message];if(e.exception)try{let{type:i="",value:o=""}=e.exception.values&&e.exception.values[0]||{};return[`${o}`,`${i}: ${o}`]}catch(i){return[]}return[]}isDeniedUrl(e){if(!this.blacklistUrls.length)return!1;let i=this.getEventFilterUrl(e);return i?this.blacklistUrls.some(o=>__(i,o)):!1}getEventFilterUrl(e){try{if(e.exception){let i=e.exception.values&&e.exception.values[0].stacktrace&&e.exception.values[0].stacktrace.frames;return i&&i[i.length-1].filename||null}return null}catch(i){return null}}extendState(e){this._state=Object.keys(e).reduce((i,o)=>{let r=this._state[o],a=Array.isArray(r)?r:null,l=e[o],d=Array.isArray(l)?l:null;return{...i,[o]:a||d?[...a||[],...d||[]]:{...typeof r!="string"?r:{},...typeof l!="string"?l:{}}}},this._state)}setKeyState(e,i){this._state[e]=i}};import{isNonNullable as Iu,Subscription as L1}from"@vkontakte/videoplayer-shared/es2018";var Eu=null,Va=class{constructor(e,i,o={}){!Eu&&e.dsn&&(this.sentryClient=new Tu({dsn:e.dsn,environment:i.env}),this.version=i.version,this.sentrySubscription=new L1,this.options=e,this.context=o,Eu=this)}destroy(){var e,i;(e=this.sentryClient)==null||e.destroy(),(i=this.sentrySubscription)==null||i.unsubscribe(),Eu=null}logIError(e,i=!1){e.thrown&&this.report(e.thrown,{fatal:i,errorType:e.id,category:e.category},{message:e.message,errorData:e.data})}report(e,i={},o={}){let{sentryClient:r,context:a,options:l}=this,{sampleRate:d=0,whiteErrorIdList:s,whiteErrorCategoryList:u=[],blackErrorIdList:m,blackErrorCategoryList:p}=l,{errorType:v,category:_}=i;if(Iu(_)&&p.includes(_)||Iu(v)&&m.includes(v))return;if(Math.random()<=d||Iu(_)&&u.includes(_)||Iu(v)&&s.includes(v)){Object.keys(i).length&&r.setTags({version:this.version,...i}),(Object.keys(a).length||Object.keys(o).length)&&r.setExtras({...a,...o});try{v&&r.captureMessage(v,i.fatal?Al.fatal:Al.error),r.report(e)}catch(b){console.error(b)}}}static getInstance(){return Eu}};var vs=(d=>(d.Thumb="thumb",d.Video="video",d.Ads="ads",d.Crashed="crashed",d.LiveWaitingStart="LiveWaitingStart",d.LiveWaitingRecover="LiveWaitingRecover",d.LiveWaitingRecord="LiveWaitingRecord",d))(vs||{});var Pu=t=>{if(t.requestFullscreen)return t.requestFullscreen();if(t.msRequestFullscreen)return t.msRequestFullscreen();if(t.webkitRequestFullscreen)return t.webkitRequestFullscreen();if(t.mozRequestFullScreen)return t.mozRequestFullScreen();let e=t.querySelector("video");return e!=null&&e.webkitEnterFullscreen?(e.webkitEnterFullscreen(),Promise.resolve()):Promise.reject()},ku=t=>t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():Promise.reject(),b_=(t,e)=>e?!0:t.fullscreenEnabled||!!t.webkitFullscreenEnabled||!!t.mozFullscreenEnabled||!!t.msFullscreenEnabled,$_=t=>{let e=t;e!=null&&e.webkitExitFullscreen&&(e==null||e.webkitExitFullscreen())},Ad=()=>{let t=document;return t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||t.msFullscreenElement},oa=()=>!!Ad(),Au=t=>{document.addEventListener("fullscreenchange",t),document.addEventListener("webkitfullscreenchange",t),document.addEventListener("mozfullscreenchange",t),document.addEventListener("MSFullscreenChange",t)},Lu=t=>{document.removeEventListener("fullscreenchange",t),document.removeEventListener("webkitfullscreenchange",t),document.removeEventListener("mozfullscreenchange",t),document.removeEventListener("MSFullscreenChange",t)},y_=t=>{let e=window.screen;return(async r=>e.orientation?e.orientation.lock(r):e.mozLockOrientation?e.mozLockOrientation(r):e.msLockOrientation?e.msLockOrientation(r):Promise.reject())(((r={width:0,height:0})=>r.width<=r.height?"portrait":"landscape")(t))};import{clientChecker as x_}from"@vkontakte/videoplayer-core/es2018";var w_=()=>({title:j("hotkey_map_modal_title"),closeBtnText:j("hotkey_map_modal_close_btn_text"),groups:[{title:j("hotkey_map_group_title_common"),items:[{description:j("hotkey_map_item_mute_description"),value:j("hotkey_map_item_mute_value")},{description:j("hotkey_map_item_volume_up_description"),value:j("hotkey_map_item_volume_up_value")},{description:j("hotkey_map_item_volume_down_description"),value:j("hotkey_map_item_volume_down_value")},{description:j("hotkey_map_item_pip_description"),value:j("hotkey_map_item_pip_value")},{description:j("hotkey_map_item_full_screen_description"),value:j("hotkey_map_item_full_screen_value")},{description:j("hotkey_map_item_show_context_menu_description"),value:j("hotkey_map_item_show_context_menu_value")},{description:j("hotkey_map_item_show_hotkey_map_description"),value:j("hotkey_map_item_show_hotkey_map_value")}]},{title:j("hotkey_map_group_title_playback"),items:[{description:j("hotkey_map_item_play_toggle_description"),value:j("hotkey_map_item_play_toggle_value")},{description:j("hotkey_map_item_seek_backward_description"),value:j("hotkey_map_item_seek_backward_value")},{description:j("hotkey_map_item_seek_forward_description"),value:j("hotkey_map_item_seek_forward_value")},{description:j("hotkey_map_item_fast_seek_backward_description"),value:j("hotkey_map_item_fast_seek_backward_value")},{description:j("hotkey_map_item_fast_seek_forward_description"),value:j("hotkey_map_item_fast_seek_forward_value")},{description:j("hotkey_map_item_rate_down_description"),value:j("hotkey_map_item_rate_down_value")},{description:j("hotkey_map_item_rate_up_description"),value:j("hotkey_map_item_rate_up_value")},{description:j("hotkey_map_item_prev_frame_description"),value:j("hotkey_map_item_prev_frame_value")},{description:j("hotkey_map_item_next_frame_description"),value:j("hotkey_map_item_next_frame_value")},{description:j("hotkey_map_item_jump_seek_description"),value:j("hotkey_map_item_jump_seek_value")},{description:j("hotkey_map_item_next_video_description"),value:j("hotkey_map_item_next_video_value")},{description:j("hotkey_map_item_prev_video_description"),value:j("hotkey_map_item_prev_video_value")}]},{title:j("hotkey_map_group_title_subtitles"),items:[{description:j("hotkey_map_item_subtitles_toggle_description"),value:j("hotkey_map_item_subtitles_toggle_value")}]},{title:j("hotkey_map_group_title_episodes"),items:[{description:j("hotkey_map_item_prev_episode_description"),value:x_.device.isApple?j("hotkey_map_item_prev_episode_mac_value"):j("hotkey_map_item_prev_episode_pc_value")},{description:j("hotkey_map_item_next_episode_description"),value:x_.device.isApple?j("hotkey_map_item_next_episode_mac_value"):j("hotkey_map_item_next_episode_pc_value")}]}]});import{debounceFn as M1,ValueSubject as Nf}from"@vkontakte/videoplayer-shared/es2018";var Ra=class{constructor({enabled:e=!0}={enabled:!0}){this.isRequested=!1;this.videoElement=void 0;this.playerContainer=void 0;this.externalEventHandlers={};this.eventHandlers={enterpictureinpicture:this.onEnterPictureInPicture.bind(this),leavepictureinpicture:this.onLeavePictureInPicture.bind(this),resize:M1(this.onResize.bind(this),300)};this.info={isActive$:new Nf(!1),isEnabled$:new Nf(!1),type:0};this.info.isEnabled$=new Nf(e)}isSupported(){return document.pictureInPictureEnabled}isActive(){return this.info.isActive$.getValue()}setContext(e){this.svelteContext=e}async revealPictureInPicture(){this.isRequested&&(this.removeEventHandlers(),await this.request(),this.addEventHandlers())}async request(){var e;if(!(!this.isSupported()||this.isActive()))try{await((e=this.videoElement)==null?void 0:e.requestPictureInPicture())}catch(i){this.isRequested=!1}}async exit(){!this.isSupported()||!this.isActive()||await document.exitPictureInPicture()}assignPlayerContainer(e){this.isSupported()&&(this.playerContainer=e)}updateVideoElement(){this.isSupported()&&this.exit().finally(()=>{var e;this.removeEventHandlers(),this.videoElement=(e=this.playerContainer)==null?void 0:e.querySelector("video"),this.addEventHandlers()})}addEventHandlers(){var e,i;(e=this.videoElement)==null||e.addEventListener("enterpictureinpicture",this.eventHandlers.enterpictureinpicture),(i=this.videoElement)==null||i.addEventListener("leavepictureinpicture",this.eventHandlers.leavepictureinpicture)}setExternalEventHandlers(e){this.externalEventHandlers={...e}}removeEventHandlers(){var e,i;(e=this.videoElement)==null||e.removeEventListener("enterpictureinpicture",this.eventHandlers.enterpictureinpicture),(i=this.videoElement)==null||i.removeEventListener("leavepictureinpicture",this.eventHandlers.leavepictureinpicture)}async dispose(){this.removeEventHandlers(),await this.exit(),this.info.isActive$.next(!1),this.isRequested=!1}onEnterPictureInPicture(e){var r,a;let o=e.pictureInPictureWindow;o&&(this.info.isActive$.next(!0),this.isRequested=!0,o.addEventListener("resize",this.eventHandlers.resize),(a=(r=this.externalEventHandlers).enterpictureinpicture)==null||a.call(r,e))}onLeavePictureInPicture(e){var r,a;let o=e.pictureInPictureWindow;this.info.isActive$.next(!1),this.isRequested=!1,this.eventHandlers.resize.cancel(),o==null||o.removeEventListener("resize",this.eventHandlers.resize),(a=(r=this.externalEventHandlers).leavepictureinpicture)==null||a.call(r,e)}onResize(e){var i,o;(o=(i=this.externalEventHandlers).resize)==null||o.call(i,e)}setEnabled(e){this.info.isEnabled$.next(e)}};function Na(t){return t instanceof Ra}import{devNull as S_,now as C_}from"@vkontakte/videoplayer-shared/es2018";function Of(t,e){B(e,!1);let i=_e();Vt(()=>{i.getAdmanWrapper().startPostroll()}),mo(),H()}import{noop as N1}from"@vkontakte/videoplayer-shared/es2018";var V1=Ie('<path d="M11.74 6.74a.9.9 0 0 1-1.28 0L6 2.27 1.54 6.74A.9.9 0 1 1 .26 5.46l5.1-5.1a.9.9 0 0 1 1.28 0l5.1 5.1a.9.9 0 0 1 0 1.28Z"></path>'),R1=Ie('<path d="m5.773 8 3.363 3.364a.9.9 0 1 1-1.272 1.272l-4-4a.9.9 0 0 1 0-1.272l4-4a.9.9 0 0 1 1.272 1.272L5.773 8z"></path>');function Lr(t,e){B(e,!0);let i=h(e,"direction",3,"left"),o=h(e,"useBtnColor",3,!1),r=f(()=>["up","down"].includes(i())),a=f(()=>["right","down"].includes(i())),l=f(()=>`chevron-icon--${i()}`),d=f(()=>(()=>{let m="";return n(a)&&(m+="transform: rotate(180deg);"),m.length?m:void 0})()),s=f(()=>o()?ia:"currentColor"),u=f(()=>n(r)?"7":"16");Xe(t,{width:"12",get height(){return n(u)},get fill(){return n(s)},get testId(){return n(l)},get style(){return n(d)},children:(m,p)=>{var v=Ae(),_=ue(v);{var y=w=>{var I=V1();$(w,I)},b=w=>{var I=R1();$(w,I)};V(_,w=>{n(r)?w(y):w(b,!1)})}$(m,v)},$$slots:{default:!0}}),H()}var D1=(t,e,i)=>{t.stopPropagation(),n(e)&&i()()},O1=L('<div class="skip s-1h"> <!></div>'),B1=L("<div><!></div>"),H1={hash:"s-1h",code:".container.s-1h{background:rgba(0,0,0,.56);border-radius:6px;color:#fff;font-size:13px;padding:6px 10px;position:absolute;right:16px;top:14px;transition:color .2s}.container-mobile.s-1h{bottom:14px;font-size:15px;max-width:142px;top:unset}.skip.s-1h{align-items:flex-end;display:flex;gap:4px;white-space:nowrap}.skippable.s-1h{color:var(--white);cursor:pointer}.skippable.s-1h:hover{color:hsla(0,0%,100%,.75)}"};function Bf(t,e){B(e,!0),G(t,H1);let[i,o]=Ne(),r=()=>x(u,"$isMobile",i),a=h(e,"position",3,0),l=h(e,"secondsToWatchBeforeSkip",3,0),d=h(e,"skipAd",3,N1),u=_e().ui.isMobile,m=f(()=>a()>0&&a()>=l());var p=B1();let v;p.__click=[D1,m,d];var _=C(p);{var y=w=>{var I=O1(),T=C(I),N=k(T);Lr(N,{direction:"right"}),S(I),D(A=>ve(T,`${A!=null?A:""} `),[()=>j("skip_ads_now")]),$(w,I)},b=w=>{var I=ps();D(T=>ve(I,T),[()=>j("skip_ads_after",{time:Math.ceil(l()-a()).toFixed(0)})]),$(w,I)};V(_,w=>{n(m)?w(y):w(b,!1)})}S(p),D(w=>v=ne(p,1,"container s-1h",null,v,w),[()=>({"container-mobile":r(),skippable:n(m)})]),$(t,p),H(),o()}Qe(["click"]);var F1=L('<button class="go-to-site s-1j"> </button>'),U1={hash:"s-1j",code:"button.go-to-site.s-1j{background:#fff;border:none;border-radius:6px;bottom:14px;color:#000;font-size:15px;left:16px;padding:6px 10px;pointer-events:none;position:absolute}"};function Hf(t,e){B(e,!1),G(t,U1),mo();var i=F1(),o=C(i,!0);S(i),D(r=>ve(o,r),[()=>j("visit_advertiser")],Sn),$(t,i),H()}var z1=L('<div class="top-gradient-mobile s-n"></div>'),W1=L('<div class="container s-n"><!> <video style="width: 100%; height: 100%" playsinline=""></video> <!> <!> <!></div>',2),K1={hash:"s-n",code:".container.s-n{height:100%;width:100%}.top-gradient-mobile.s-n{background:linear-gradient(1turn,transparent,rgba(0,0,0,.05) 12%,rgba(0,0,0,.15) 25%,rgba(0,0,0,.3) 45%,rgba(0,0,0,.4) 57%,rgba(0,0,0,.5) 77%,rgba(0,0,0,.55) 88%,rgba(0,0,0,.65));height:80px;left:0;pointer-events:none;position:absolute;top:0;width:100%}"};function Md(t,e){B(e,!0),G(t,K1);let[i,o]=Ne(),r=()=>x(F,"$canSkipAd",i),a=()=>x(Q,"$adPlaybackState",i),l=()=>x(T,"$isMobile",i),d=()=>x(z,"$adPosition",i),s=()=>x(X,"$secondsToWatchBeforeSkipAd",i),u=()=>x(I,"$isVideoEnded",i),m=h(e,"adsSlotId",3,void 0),p=h(e,"adsParams",3,void 0),v=h(e,"adsAutoplayParam",3,void 0),_=h(e,"duration",3,0),y=h(e,"adsExternalApi",3,void 0),b=_e(),w=Rt(),I=b.state.isEnded$,T=b.ui.isMobile,N=w.ads.isMobileGoToSiteButton,A=q(void 0),E=q(void 0),P=!1,Q=b.ads.playbackState,F=b.ads.canSkip,z=b.ads.position,X=b.ads.secondsToWatchBeforeSkip,se=f(()=>r()&&a()!=="inactive"),Z=f(()=>l()&&a()!=="inactive"&&N);Vt(()=>{let U=b.getAdmanWrapper();if(S_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_mount"],numbers:[C_(),m()]}),!m()){U.onAdmanLoadingError();return}let O=()=>{var Re;let{width:xe,height:Be}=$e(b.ui.playerSize),tt=$e(b.ui.isFullscreen),re=(Re=v())!=null?Re:$e(b.ui.isAutoplay),ce=w.ads.paramsOverride;return{width:xe,height:Be,isFullscreen:tt,isAutoplay:re,adsContainer:n(A),adsVideoElement:n(E),slotId:m(),params:p(),paramsOverride:ce,duration:_(),externalApi:y()}},qe=async xe=>{xe&&await uo();let Be=O();await U.initAdman(Be),P=!0},K=new AbortController,ae=()=>{K.abort()};return window.AdmanHTML?qe(!0).catch(()=>{U.onAdmanLoadingError()}):U.loadAdman(K.signal).then(()=>qe(!1)).catch(()=>{U.onAdmanLoadingError()}),()=>{S_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_unmount"],numbers:[C_(),m()]}),!P&&ae()}});var oe=W1(),J=C(oe);{var Ce=U=>{var O=z1();$(U,O)};V(J,U=>{l()&&U(Ce)})}var me=k(J,2);je(me,U=>R(E,U),()=>n(E));var ee=k(me,2);{var be=U=>{Bf(U,{get position(){return d()},get secondsToWatchBeforeSkip(){return s()},get skipAd(){return b.actions.internal.skipAd}})};V(ee,U=>{n(se)&&U(be)})}var we=k(ee,2);{var ge=U=>{Of(U,{})};V(we,U=>{u()&&U(ge)})}var pe=k(we,2);{var Ke=U=>{Hf(U,{})};V(pe,U=>{n(Z)&&U(Ke)})}S(oe),je(oe,U=>R(A,U),()=>n(A)),$(t,oe),H(),o()}var Qo=t=>{if(!isFinite(t))return"00:00";let e=Math.round(t),i=Math.floor(e/(60*60));e-=i*3600;let o=Math.floor(e/60);e-=o*60;let r=[o,e].map(a=>String(a).padStart(2,"0")).join(":");return i>0&&(r=`${i}:${r}`),r};var q1=Ie('<path fill="#fff"></path>'),Q1=Ie("<path></path><!>",1);function Vd(t,e){let i=h(e,"isActive",3,!1),o=f(()=>i()?"live-active-icon":"live-icon"),r=f(()=>i()?"var(--timeline-slider-filled-active-live-bg, #FF3347)":void 0),a="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";Xe(t,{width:"42",height:"20",get testId(){return n(o)},get fill(){return n(r)},children:(l,d)=>{var s=Q1(),u=ue(s),m=k(u);{var p=v=>{var _=q1();Me(_,"d",a),$(v,_)};V(m,v=>{i()&&v(p)})}D(()=>Me(u,"d",`M5 0h32s5 0 5 5v10s0 5 -5 5h-32s-5 0 -5 -5v-10s0 -5 5 -5${i()?"":"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"+a}z`)),$(l,s)},$$slots:{default:!0}})}var G1=L('<div class="equalizer s-e"><div class="col s-e"></div> <div class="col s-e"></div> <div class="col s-e"></div></div>'),Y1=L('<div class="live-icon s-e"><!></div>'),j1=L('<span class="text s-e"> </span>'),X1=L("<div><!> <!></div>"),Z1={hash:"s-e",code:".wrapper.s-e{background-color:var(--black-alpha-40);border-radius:4px;padding:2px 6px;transition:visibility var(--controls-transition-duration),opacity var(--controls-transition-duration);white-space:nowrap}.wrapper.live.s-e{background:var(--red);border-radius:2px;font-size:0;height:20px;line-height:20px;padding:0 7px}.equalizer.s-e{display:inline-block;height:10px;margin-right:4px;margin-top:-4px;position:relative;vertical-align:middle;width:10px}.live.s-e .equalizer:where(.s-e){margin-top:-2px}.equalizer.s-e .col:where(.s-e){animation:1.5s linear infinite alternate;animation-play-state:paused;background:var(--btn-color,--white);bottom:0;height:10px;margin-right:2px;position:absolute;transform-origin:50% 100%;width:2px}.playing.s-e .equalizer:where(.s-e) .col:where(.s-e){animation-play-state:running}.equalizer.s-e .col:where(.s-e):first-child{animation-name:s-e-thumb-timer-equalizer-col1;left:0}.equalizer.s-e .col:where(.s-e):nth-child(2){animation-name:s-e-thumb-timer-equalizer-col2;left:3px}.equalizer.s-e .col:where(.s-e):nth-child(3){animation-name:s-e-thumb-timer-equalizer-col3;left:6px}.live-icon.s-e{display:inline-block;height:20px;margin:0 -7px;vertical-align:middle;width:42px}@keyframes s-e-thumb-timer-equalizer-col1{0%{transform:scaleY(.1)}25%{transform:scaleY(.8)}50%{transform:scaleY(.4)}75%{transform:scaleY(.6)}to{transform:scaleY(.1)}}@keyframes s-e-thumb-timer-equalizer-col2{0%{transform:scaleY(1)}25%{transform:scaleY(.3)}50%{transform:scaleY(.9)}75%{transform:scaleY(.6)}to{transform:scaleY(1)}}@keyframes s-e-thumb-timer-equalizer-col3{0%{transform:scaleY(.6)}25%{transform:scaleY(.9)}50%{transform:scaleY(.1)}75%{transform:scaleY(.9)}to{transform:scaleY(.6)}}.text.s-e{color:var(--controls-time);font-size:13px;font-weight:500;line-height:16px}"};function Rd(t,e){G(t,Z1);let i=h(e,"withEqualizer",3,!1),o=h(e,"isLive",3,!1),r=h(e,"isPlaying",3,!1);var a=X1();let l;var d=C(a);{var s=v=>{var _=G1();$(v,_)};V(d,v=>{i()&&v(s)})}var u=k(d,2);{var m=v=>{var _=Y1(),y=C(_);Vd(y,{isActive:!0}),S(_),$(v,_)},p=v=>{var _=j1(),y=C(_,!0);S(_),D(()=>ve(y,e.time)),$(v,_)};V(u,v=>{o()?v(m):v(p,!1)})}S(a),D(v=>l=ne(a,1,"wrapper s-e",null,l,v),[()=>({live:o(),playing:r()})]),$(t,a)}var Ll=(t,e,i)=>{let o;return()=>(window.clearTimeout(o),t?o=window.setTimeout(()=>e.set(!0),i):e.set(!1),()=>window.clearTimeout(o))};var J1=L('<div role="timer" data-testid="thumb-timer"><!></div>'),ey={hash:"s-p",code:".thumb-timer.s-p{bottom:0;margin:8px;position:absolute;right:0;transition:visibility var(--controls-transition-duration),opacity var(--controls-transition-duration);z-index:var(--thumb-timer-z-index)}"};function Nd(t,e){B(e,!0),G(t,ey);let[i,o]=Ne(),r=()=>x(m,"$disabled",i),a=h(e,"isHidden",3,!1),l=h(e,"isLive",3,!1),d=h(e,"isPlaying",3,!1),s=Rt(),u=f(()=>Qo(e.duration-e.position)),m=de(!1);var p=J1();let v;var _=C(p);Rd(_,{get time(){return n(u)},get isLive(){return l()},get isPlaying(){return d()},withEqualizer:!0}),S(p),Ms(p,()=>Ll(a()&&s.features.usePerformanceFix,m,s.disableInvisibleComponentsTimeout)),D(y=>v=ne(p,1,"thumb-timer s-p",null,v,y),[()=>({"out-of-flow":r(),hidden:a()})]),$(t,p),H(),o()}var Ml=t=>{if(!navigator.clipboard){T_(t);return}navigator.clipboard.writeText(t).catch(()=>T_(t))};function T_(t){if(document.queryCommandSupported&&document.queryCommandSupported("copy")){let e=document.createElement("textarea");e.textContent=t,e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e),e.select();try{document.execCommand("copy")}finally{document.body.removeChild(e)}}}import{ChromecastState as uy,clientChecker as py}from"@vkontakte/videoplayer-core/es2018";import{clientChecker as I_}from"@vkontakte/videoplayer-core/es2018";var Ff="focus-hidden";var Mr=t=>{t.stopPropagation(),t.preventDefault()},Uf=t=>{var e,i;(i=(e=t.parentNode)==null?void 0:e.firstElementChild)==null||i.classList.remove(Ff)},iy=t=>{var i;let e=t.previousElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.lastElementChild),e==null||e.focus()},oy=t=>{var i;let e=t.nextElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.firstElementChild),e==null||e.focus()},ny=t=>{let e=t.code;return e==="Tab"&&!t.shiftKey||e==="ArrowDown"},ry=t=>{let e=t.code;return e==="Tab"||e==="ArrowUp"},E_=t=>t.code==="Escape",sy=t=>t.code==="ArrowLeft",Dd=(t,e=[])=>{let i=t.code;return["Enter","Space",...e].includes(i)},P_=t=>{ny(t)?(Mr(t),oy(t.target)):ry(t)&&(Mr(t),iy(t.target))},sa=t=>!I_.device.isAndroid&&(t==null?void 0:t.detail)===0||I_.device.isAndroid&&(t==null?void 0:t.pointerType)==="",Vl=async(t,e,i)=>{await uo(),t&&!t.classList.contains("opened")&&!e&&$e(i)&&(await uo(),i.set(!1),t.focus())},k_=async(t,e,i)=>{await uo(),t&&!e&&$e(i)&&(i.set(!1),t.focus())},Od=async(t,e,i,o=!1)=>{if(await uo(),!!t&&e&&!o){let a=t.children[0];a==null||a.classList.toggle(Ff,!i),a==null||a.focus()}},A_=async(t,e)=>{setTimeout(()=>{let i=t[e];!!i&&i.focus()},100)},Mu=(t,e)=>{P_(t),Uf(t.target),E_(t)&&(Mr(t),e())},Vu=async(t,e)=>{Dd(t,["ArrowRight"])&&(Mr(t),e())},L_=async(t,e,i)=>{if(P_(t),sy(t)){Mr(t),e();return}E_(t)&&(Mr(t),i())},Rl=(t,e)=>{Dd(t)&&(Mr(t),e())},M_=(t,e,i)=>{if(Dd(t))Mr(t),i(!e);else{let o=t.code;if(o==="ArrowLeft"&&e){i(!1),Mr(t);return}o==="ArrowRight"&&!e&&(i(!0),Mr(t))}},V_=t=>{let e=t.getBoundingClientRect(),i=-14,o=e.left+e.width,r=e.top+i;return{right:o,bottom:r}},R_=t=>{if(!t)return{top:0,left:0};let e=t.getBoundingClientRect(),i=-58,o=8,r=e.left+o;return{bottom:e.bottom+i,left:r}};import{isNullable as Ru,isValidURL as fy}from"@vkontakte/videoplayer-shared/es2018";var is={"copy-link":100,"copy-link-timestamp":200,"copy-embed-code":300,pip:400,"video-loop":500,rotate:600,report:700,"save-debug":800,"save-trace":900,"debug-info":1e3};import{noop as N_}from"@vkontakte/videoplayer-shared/es2018";var ly=(t,e)=>{Rl(t,()=>e())},dy=L('<li class="item s-1m" role="menuitem" tabindex="0"> </li>'),cy={hash:"s-1m",code:".item.s-1m{color:hsla(0,0%,100%,.72);cursor:pointer;display:block;font-size:13px;letter-spacing:-.14px;line-height:18px;padding:8px 16px;position:relative;white-space:nowrap}.item.s-1m:hover{background:rgba(66,66,66,.5);color:var(--white)}"};function zf(t,e){B(e,!0),G(t,cy);let i=h(e,"onClick",3,N_),o=h(e,"closeContextMenu",3,N_),r=d=>{d==null||d.stopPropagation(),i()(),o()()};var a=dy();a.__click=r,a.__keydown=[ly,r];var l=C(a,!0);S(a),D(()=>{var d;Me(a,"aria-label",(d=e.ariaLabel)!=null?d:e.label),Me(a,"data-testid",e.id),ve(l,e.label)}),$(t,a),H()}Qe(["click","keydown"]);var Oa=(t,e)=>t.weight-e.weight;var Bd=(o=>(o.OPEN_SUB_MENU="OPEN_SUB_MENU",o.CLICK="CLICK",o.SWITCH="SWITCH",o))(Bd||{});var my=(t,e)=>{Mu(t,e)},vy=t=>{t.preventDefault()},gy=L('<ul role="menu" class="s-k"></ul>'),hy={hash:"s-k",code:"ul.s-k{background:rgba(0,0,0,.72);border-radius:8px;list-style:none;margin:0;max-height:100%;max-width:100%;overflow-x:hidden;overflow-y:auto;padding:6px 0;position:absolute;transition:visibility .1s,opacity .1s;z-index:var(--context-menu-z-index)}"};function Wf(t,e){B(e,!0),G(t,hy);let[i,o]=Ne(),r=()=>x(Ce,"$playerPhase",i),a=()=>x(se,"$isLive$",i),l=()=>x(me,"$isPiPEnabled$",i),d=()=>x(X,"$chromecastState$",i),s=()=>x(ee,"$pictureInPictureApiIsActive$",i),u=()=>x(J,"$isLooped$",i),m=()=>x(Z,"$positionExact$",i),p=()=>x(Q,"$additionalContextMenuItems$",i),v=h(e,"visible",3,!1),_=h(e,"position",19,()=>({top:0,left:0})),y=h(e,"playerContainerRef",3,void 0),b=h(e,"menuElementRef",15,void 0),w=q(0),I=q(0),T=_e(),{pictureInPicture$:N}=vo(),A=Rt(),E=T.ui.contextMenu.visible$,P=T.ui.debugPanelVisible,Q=T.ui.additionalContextMenuItems$,F=T.ui.t,z=T.actions.internal.togglePictureInPicture,X=T.state.chromecastState$,se=T.state.isLive$,Z=T.state.positionExact$,oe=T.state.isInteractive,J=T.state.looped$,Ce=T.playerPhase,{isEnabled$:me,isActive$:ee}=N,be=f(()=>r()==="video"),we=f(()=>!!a()&&n(be)),ge=f(()=>["thumb","LiveWaitingStart","LiveWaitingRecover","LiveWaitingRecord"].includes(r())),pe=f(()=>{var fe;return A.features.copyVideoLink&&((fe=T.callbacks)==null?void 0:fe.onCopyVideoLink)}),Ke=f(()=>n(pe)&&!n(ge)&&!oe&&!n(we)),U=f(()=>{var fe;return!!((fe=T.callbacks)!=null&&fe.onCopyEmbedCodeClicked)}),O=f(()=>l()&&d()!==uy.CONNECTED&&!oe&&n(be)&&!py.browser.isFirefox),qe=f(()=>!oe&&!n(ge)&&!n(we)),K=f(()=>A.features.videoRotate&&!oe&&!n(ge)),ae=f(()=>A.showSupport&&!s()),xe=f(()=>A.features.saveTraceInfoToFile),Be=()=>{var fe;E.set(!1),(fe=e.returnFocus)==null||fe.call(e)},tt=(fe,Oe)=>{if(!b()||!y())return;let ze=b().getBoundingClientRect(),bt=y().getBoundingClientRect();R(w,fe-bt.left),R(I,Oe-bt.top),n(w)+ze.width>bt.width&&R(w,bt.width-ze.width),n(I)+ze.height>bt.height&&R(I,bt.height-ze.height),R(w,Math.max(n(w),0),!0),R(I,Math.max(n(I),0),!0)};De(()=>{(async()=>{if(b()&&y()){await uo();let{top:Oe,left:ze,bottom:bt,right:zt}=_(),Pt=ze!=null?ze:0,ui=Oe!=null?Oe:0,di=b().getBoundingClientRect();Ru(ze)&&!Ru(zt)&&(Pt=zt-di.width),Ru(Oe)&&!Ru(bt)&&(ui=bt-di.height),Pt=Math.max(Pt,0),ui=Math.max(ui,0),tt(Pt,ui)}})()});let re=()=>{T.actions.internal.videoRotate()},ce=()=>{fy(e.supportLink)&&window.open(e.supportLink,"_blank"),T.actions.internal.reportProblem(),T.actions.internal.pause()},Re=()=>{let fe=T.actions.internal.getDebugTextData();if(A.features.saveDebugInfoToFile){let Oe=new Blob([...fe],{type:"plain/text"}),ze=window.URL.createObjectURL(Oe);Ma(ze,"vk_player_debug_info","txt")}else Ml(T.actions.internal.getDebugTextData())},Ve=()=>{let fe=T.actions.internal.getTraceTextData(),Oe=new Blob([...fe],{type:"application/json"}),ze=window.URL.createObjectURL(Oe);Ma(ze,"vk_player_trace_info","json")},Je=()=>{P.set(!0)},Ee=async()=>{var fe;try{z()}finally{(fe=e.returnFocus)==null||fe.call(e)}},Te=()=>{T.actions.internal.setLooped(!u())},He=()=>{var fe,Oe;if(n(U)){let ze=(Oe=(fe=T.callbacks)==null?void 0:fe.onCopyEmbedCodeClicked)==null?void 0:Oe.call(fe);ze&&Ml(ze)}},Ct=(fe=!1)=>{var Oe,ze;if((Oe=T.callbacks)!=null&&Oe.onCopyVideoLink){let bt=(ze=T.callbacks)==null?void 0:ze.onCopyVideoLink(fe,m());bt&&Ml(bt)}},xt=f(()=>A.features.saveDebugInfoToFile?F("menu_save_debug"):F("menu_copy_debug")),At=f(()=>n(pe)?{id:"copy-link",weight:is["copy-link"],label:F("menu_copy_video_link"),onClick:()=>Ct()}:void 0),at=f(()=>n(Ke)?{id:"copy-link-timestamp",weight:is["copy-link-timestamp"],label:F("menu_copy_video_link_with_timestamp"),onClick:()=>Ct(!0)}:void 0),Tt=f(()=>n(U)?{id:"copy-embed-code",weight:is["copy-embed-code"],label:F("menu_copy_embed_code"),onClick:He}:void 0),jt=f(()=>n(O)?{id:"pip",weight:is.pip,label:s()?F("menu_pip_close"):F("menu_pip"),onClick:Ee}:void 0),It=f(()=>n(qe)?{id:"video-loop",weight:is["video-loop"],label:u()?F("menu_video_loop_off"):F("menu_video_loop_on"),ariaLabel:F("aria_label_menu_loop"),onClick:Te}:void 0),Dt=f(()=>n(K)?{id:"rotate",weight:is.rotate,label:F("menu_video_rotate"),ariaLabel:F("aria_label_menu_rotate"),onClick:re}:void 0),Ut=f(()=>n(ae)?{id:"report",weight:is.report,label:F("menu_report"),ariaLabel:`${F("menu_report")}. ${F("aria_label_new_tab_alert")}`,onClick:ce}:void 0),Y=f(()=>({id:"save-debug",weight:is["save-debug"],label:n(xt),onClick:Re})),Pe=f(()=>n(xe)?{id:"save-trace",weight:is["save-trace"],label:F("menu_save_debug"),onClick:Ve}:void 0),le=f(()=>({id:"debug-info",weight:is["debug-info"],label:F("menu_debug_overlay"),ariaLabel:F("aria_label_menu_debug_overlay"),onClick:Je})),ye=f(()=>[n(At),n(at),n(Tt),n(jt),n(It),n(Dt),n(Ut),n(Y),n(Pe),n(le),...p()].filter(fe=>!!fe).sort(Oa));var Le=Ae(),nt=ue(Le);{var Et=fe=>{var Oe=gy();Oe.__contextmenu=[vy],Oe.__keydown=[my,Be],_i(Oe,21,()=>n(ye),ze=>ze.id,(ze,bt)=>{zf(ze,{get id(){return n(bt).id},get label(){return n(bt).label},get ariaLabel(){return n(bt).ariaLabel},get onClick(){return n(bt).onClick},closeContextMenu:Be})}),S(Oe),je(Oe,ze=>b(ze),()=>b()),D(()=>{var ze,bt;return We(Oe,`top: ${(ze=n(I))!=null?ze:""}px; left: ${(bt=n(w))!=null?bt:""}px;`)}),$(fe,Oe)};V(nt,fe=>{v()&&fe(Et)})}$(t,Le),H(),o()}Qe(["contextmenu","keydown"]);var Nu=class{constructor(e){this.value=e,this.next=null}};var Nl=class{constructor(e){this.top=null,this.bottom=null,this.size=0,this.maxSize=e}push(e){let i=new Nu(e);this.top?(this.top.next=i,this.top=i):(this.top=i,this.bottom=i),this.size++,this.size>this.maxSize&&this.bottom&&(this.bottom=this.bottom.next)}getValuesFromBottom(){let e=[],i=this.bottom;for(;i;)e.push(i.value),i=i.next;return e}};var _y=L('<div class="container s-1g"><canvas class="s-1g"></canvas></div>'),by={hash:"s-1g",code:".container.s-1g{display:inline-block;height:16px;width:120px}canvas.s-1g{margin-top:2px;transform:scaleY(-1)}"};function Hd(t,e){B(e,!0),G(t,by);let i=h(e,"values",19,()=>[]),o=q(void 0),r=q(null),a=16,l=120,d=60,s=l/d;Vt(()=>{n(o).width=l,n(o).height=a,R(r,n(o).getContext("2d"),!0)});function u(v,_,y,b,w){w===0&&(w=1),v.fillStyle="#fff",v.fillRect(_,y,b,w)}De(()=>{let v="";if(n(r)){let _=i()[0];for(let b=1;b<i().length;b++)i()[b]>_&&(_=i()[b]);n(r).clearRect(0,0,l,a);let y=d-1;for(let b=i().length-1;b>=0;b--){let w=y*s,I=_>0?a*(i()[b]/_):0;u(n(r),w,0,s,I),v=I+" "+v,y--}}});var m=_y(),p=C(m);je(p,v=>R(o,v),()=>n(o)),S(m),$(t,m),H()}import{safeStorage as D_}from"@vkontakte/videoplayer-shared/es2018";var $y=(t,e)=>{t.stopPropagation(),D_.remove(Cd),e.set(!1)},yy=L('<div class="s-m"><div class="s-m">Video id</div> <span> </span></div>'),xy=L('<div class="s-m"><div class="s-m">VSID</div> <span> </span></div>'),wy=L('<div class="s-m"><div class="s-m">Provider</div> <span> </span></div>'),Sy=L('<div class="s-m"><div class="s-m">Streams</div> <span> </span></div>'),Cy=L('<div class="s-m"><div class="s-m">Viewport</div> <span> </span></div>'),Ty=L('<div class="s-m"><div class="s-m">Video size</div> <span> </span></div>'),Iy=L('<div class="s-m"><div class="s-m">CDN host</div> <span> </span></div>'),Ey=L('<div class="s-m"><div class="s-m">Volume</div> <span> </span></div>'),Py=L('<div class="s-m"><div class="s-m">Position</div> <span> </span></div>'),ky=L('<div class="s-m"><div class="s-m">Buffer</div> <span> </span></div>'),Ay=L('<div class="s-m"><div class="s-m">Nbuffer</div> <span> </span></div>'),Ly=L('<div class="s-m"><div class="s-m">Live latency</div> <span> </span></div>'),My=L('<div class="s-m"><div class="s-m">Segment</div> <span> </span></div>'),Vy=L('<div class="s-m"><div class="s-m">Network</div> <!> <span> </span></div>'),Ry=L('<div class="s-m"><div class="s-m">V bitrate</div> <!> <span> </span></div>'),Ny=L('<div role="region"><button class="close s-m" title="закрыть">[x]</button> <div class="content s-m"><div class="s-m"><div class="s-m">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-m"><div class="s-m">Dropped</div> <span> </span></div> <!> <!> <div class="s-m"><div class="s-m">FPS</div> <!> <span> </span></div></div></div>'),Dy={hash:"s-m",code:".container.s-m{background:rgba(28,28,28,.8);border-radius:4px;color:#fff;font-size:10px;left:20px;min-width:160px;position:absolute;text-align:left;top:45px;user-select:text;z-index:var(--debug-panel-z-index)}.container-mobile.s-m{left:16px;top:16px}button.close.s-m{background-color:transparent;border:none;color:#fff;cursor:pointer;outline:0;padding:0;position:absolute;right:5px;top:3px}.content.s-m{padding:5px}.content.s-m>div:where(.s-m)>div:where(.s-m){display:inline-block;padding:0 5px;text-align:right;width:60px}"};function Fd(t,e){B(e,!0),G(t,Dy);let[i,o]=Ne(),r=()=>x(d,"$isMobile",i),a=_e(),l=a.ui.debugPanelVisible,d=a.ui.isMobile,s=q(ai(a.actions.internal.getDebugPanelData())),u=a.actions.internal.getVideoElement(),m=q(0),p=q(0),v=q(0),_=new Nl(60),y=new Nl(60),b=new Nl(60),w=q(ai([])),I=q(ai([])),T=q(ai([])),N=j("aria_label_debug_panel");Vt(()=>{D_.set(Cd,"true"),a.actions.internal.startLogging(),u&&(R(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0),R(m,u.getVideoPlaybackQuality().totalVideoFrames,!0));let Y=window.setInterval(()=>{R(s,a.actions.internal.getDebugPanelData(),!0)},500),Pe;return u&&(Pe=window.setInterval(()=>{if(u){R(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0);let le=u.getVideoPlaybackQuality().totalVideoFrames;R(v,le-n(m)),R(m,le,!0),_.push(n(v)),n(s).speed&&y.push(n(s).speed),n(s).bitrate&&b.push(n(s).bitrate),R(w,_.getValuesFromBottom(),!0),R(I,y.getValuesFromBottom(),!0),R(T,b.getValuesFromBottom(),!0)}},1e3)),()=>{a.actions.internal.stopLogging(),clearInterval(Y),Pe&&clearInterval(Pe)}});var A=Ny();let E;var P=C(A);P.__click=[$y,l];var Q=k(P,2),F=C(Q),z=k(C(F),2),X=C(z,!0);S(z),S(F);var se=k(F,2);{var Z=Y=>{var Pe=yy(),le=k(C(Pe),2),ye=C(le,!0);S(le),S(Pe),D(()=>ve(ye,n(s).id)),$(Y,Pe)};V(se,Y=>{n(s).id&&Y(Z)})}var oe=k(se,2);{var J=Y=>{var Pe=xy(),le=k(C(Pe),2),ye=C(le,!0);S(le),S(Pe),D(()=>ve(ye,n(s).vsid)),$(Y,Pe)};V(oe,Y=>{n(s).vsid&&Y(J)})}var Ce=k(oe,2);{var me=Y=>{var Pe=wy(),le=k(C(Pe),2),ye=C(le,!0);S(le),S(Pe),D(()=>ve(ye,n(s).provider)),$(Y,Pe)};V(Ce,Y=>{n(s).provider&&Y(me)})}var ee=k(Ce,2);{var be=Y=>{var Pe=Sy(),le=k(C(Pe),2),ye=C(le);S(le),S(Pe),D(()=>{var Le,nt;return ve(ye,`Video: ${(Le=n(s).videoCodec||"")!=null?Le:""} ${n(s).hdr?"(HDR)":""}
|
|
57
57
|
&
|
|
58
|
-
Audio: ${(rt=n(s).audioCodec||"")!=null?rt:""} ${n(s).audioLanguage?`(${n(s).audioLanguage})`:""}`)}),b(G,Ce)};R(re,G=>{(n(s).videoCodec||n(s).audioCodec)&&G(be)})}var $e=A(re,2);{var ee=G=>{var Ce=Sy(),le=A(C(Ce),2),_e=C(le,!0);S(le),S(Ce),O(()=>ve(_e,n(s).viewport)),b(G,Ce)};R($e,G=>{n(s).viewport&&G(ee)})}var Re=A($e,2);{var fe=G=>{var Ce=Cy(),le=A(C(Ce),2),_e=C(le,!0);S(le),S(Ce),O(()=>ve(_e,n(s).videoSize)),b(G,Ce)};R(Re,G=>{n(s).videoSize&&G(fe)})}var P=A(Re,2);{var We=G=>{var Ce=Ty(),le=A(C(Ce),2),_e=C(le,!0);S(le),S(Ce),O(()=>ve(_e,n(s).cdn)),b(G,Ce)};R(P,G=>{n(s).cdn&&G(We)})}var Se=A(P,2);{var Z=G=>{var Ce=Iy(),le=A(C(Ce),2),_e=C(le);S(le),S(Ce),O(()=>{var Me;return ve(_e,`${(Me=n(s).volume)!=null?Me:""} %`)}),b(G,Ce)};R(Se,G=>{n(s).volume&&G(Z)})}var ie=A(Se,2);{var De=G=>{var Ce=Ey(),le=A(C(Ce),2),_e=C(le);S(le),S(Ce),O(Me=>ve(_e,`${Me!=null?Me:""} s`),[()=>n(s).position.toFixed(2)]),b(G,Ce)};R(ie,G=>{n(s).position&&G(De)})}var Oe=A(ie,2);{var it=G=>{var Ce=ky(),le=A(C(Ce),2),_e=C(le);S(le),S(Ce),O(Me=>ve(_e,`${Me!=null?Me:""} s`),[()=>n(s).buffer.toFixed(2)]),b(G,Ce)};R(Oe,G=>{n(s).buffer&&G(it)})}var U=A(Oe,2);{var Pe=G=>{var Ce=Py(),le=A(C(Ce),2),_e=C(le);S(le),S(Ce),O(Me=>ve(_e,`${Me!=null?Me:""} s`),[()=>n(s).nativeBuffer.toFixed(2)]),b(G,Ce)};R(U,G=>{n(s).nativeBuffer&&G(Pe)})}var ke=A(U,2);{var He=G=>{var Ce=Ay(),le=A(C(Ce),2),_e=C(le);S(le),S(Ce),O(Me=>ve(_e,`${Me!=null?Me:""} s`),[()=>n(s).liveLatency.toFixed(2)]),b(G,Ce)};R(ke,G=>{n(s).liveLatency&&G(He)})}var tt=A(ke,2);{var ye=G=>{var Ce=Ly(),le=A(C(Ce),2),_e=C(le,!0);S(le),S(Ce),O(Me=>ve(_e,Me),[()=>[{value:n(s).currentVideoSegmentLength,title:"Video:"},{value:n(s).currentAudioSegmentLength,title:"Audio:"}].filter(({value:Me})=>Me).map(({value:Me,title:rt})=>`${rt} ${((Me!=null?Me:0)/1e3).toFixed(2)} s`).join(" & ")]),b(G,Ce)};R(tt,G=>{(n(s).currentVideoSegmentLength||n(s).currentAudioSegmentLength)&&G(ye)})}var Ie=A(tt,2),Be=A(C(Ie),2),Lt=C(Be);S(Be),S(Ie);var mt=A(Ie,2);{var Vt=G=>{var Ce=My(),le=A(C(Ce),2);Kd(le,{get values(){return n(I)}});var _e=A(le,2),Me=C(_e);S(_e),S(Ce),O(rt=>ve(Me,`${rt!=null?rt:""} Kbps`),[()=>n(s).speed.toFixed(2)]),b(G,Ce)};R(mt,G=>{n(s).speed&&G(Vt)})}var dt=A(mt,2);{var xt=G=>{var Ce=Vy(),le=A(C(Ce),2);Kd(le,{get values(){return n(T)}});var _e=A(le,2),Me=C(_e);S(_e),S(Ce),O(rt=>ve(Me,`${rt!=null?rt:""} Kbps`),[()=>n(s).bitrate.toFixed(2)]),b(G,Ce)};R(dt,G=>{n(s).bitrate&&G(xt)})}var Qt=A(dt,2),Tt=A(C(Qt),2);Kd(Tt,{get values(){return n(x)}});var Mt=A(Tt,2),Rt=C(Mt,!0);S(Mt),S(Qt),S(K),S(L),O(G=>{var Ce,le;E=se(L,1,"container s-k",null,E,G),Le(L,"aria-label",N),ve(j,n(s).version),ve(Lt,`${(Ce=n(p))!=null?Ce:""} / ${(le=n(f))!=null?le:""} frames`),ve(Rt,n(v))},[()=>({"container-mobile":r()})]),b(t,L),F(),o()}Ye(["click"]);import{noop as Dy}from"@vkontakte/videoplayer-shared/es2018";var Oy=(t,e)=>{t.stopPropagation(),e()()},By=M('<div class="close s-x"></div>'),Fy={hash:"s-x",code:'.close.s-x{cursor:pointer;height:16px;opacity:.8;position:relative;transition:opacity .2s;width:16px}.close.s-x:hover{opacity:1}.close.s-x:after,.close.s-x:before{background-color:var(--white);content:" ";height:16px;left:8px;position:absolute;width:2px}.close.s-x:before{transform:rotate(45deg)}.close.s-x:after{transform:rotate(-45deg)}'};function Vs(t,e){B(e,!0),Q(t,Fy);let i=g(e,"onClick",3,Dy);var o=By();o.__click=[Oy,i],b(t,o),F()}Ye(["click"]);import{noop as Uy}from"@vkontakte/videoplayer-shared/es2018";var fn=t=>`width:${t}px;height:${t}px;`;var Hy=Te('<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 kn(t,e){B(e,!0);let i=m(()=>fn(e.size));Je(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(i)},testId:"play-icon",get shadow(){return e.shadow},children:(o,r)=>{var a=Hy();b(o,a)},$$slots:{default:!0}}),F()}var zy=M('<div class="timer s-w"><canvas class="timer-canvas s-w" width="100" height="100"></canvas> <!></div>'),Wy={hash:"s-w",code:".timer.s-w{align-items:center;background:rgba(31,31,31,.65);border-radius:50%;display:flex;height:50px;justify-content:space-around;transition:background .2s;width:50px}.timer.s-w:hover{background:rgba(31,31,31,.85)}.timer-canvas.s-w{height:50px;position:absolute;width:50px}"};function Qd(t,e){B(e,!0),Q(t,Wy);let i=g(e,"isRunning",3,!0),o=g(e,"onTimerEnded",3,Uy),r=5e3,a=W(void 0),l,d,s=0,u;Ne(()=>{i()&&St(()=>{d=Date.now(),s=requestAnimationFrame(p)})});let f=()=>{s&&(cancelAnimationFrame(s),s=0)},p=()=>{f(),i()&&(u=(Date.now()-d)/r,u<1?(l==null||l.clearRect(0,0,100,100),l==null||l.beginPath(),l==null||l.arc(50,50,47,-Math.PI/2,-Math.PI/2+Math.PI*2*u),l==null||l.stroke(),s=requestAnimationFrame(p)):o()())};Et(()=>{l=n(a).getContext("2d"),l&&(l.lineWidth=6,l.lineCap="round",l.strokeStyle="#fff")}),pn(()=>{f()});var v=zy(),$=C(v);Ze($,h=>D(a,h),()=>n(a));var y=A($,2);kn(y,{get size(){return"24"}}),S(v),b(t,v),F()}var Ky=(t,e,i)=>{e(!1),i()},qy=M('<div class="overlay s-19"></div> <div class="next-video s-19"><div class="top s-19"><div class="caption s-19"> </div> <!></div> <div class="row s-19"><div class="column s-19"><div class="thumb s-19"><div></div> <!></div></div> <div class="column s-19"><div class="title s-19"> </div></div></div></div>',1),Qy={hash:"s-19",code:".overlay.s-19{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-19{display:flex;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:362px}.top.s-19{display:flex;justify-content:space-between}.caption.s-19{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-19{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-19{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-19{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-19,.thumb-overlay.s-19{height:100%;width:100%}.thumb-overlay.s-19{position:absolute}.thumb-overlay.withOpacity.s-19{background:var(--black);opacity:.3}.title.s-19{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function Uf(t,e){B(e,!0),Q(t,Qy);let[i,o]=Ve(),r=()=>w(d,"$autoplayNextEnabled$",i),a=()=>w(s,"$timerNextVideoRunning$",i),l=ge(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,f=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,v=l.actions.internal.nextVideoAnnouncementAuto,$=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{r()&&(u(!1),v())},h=()=>{e.clickCloseIcon(),$()};Et(()=>{e.isHide||f(),e.isHide&&r()&&(u(!1),v())});var x=Ae(),I=ce(x);{var T=N=>{var L=qy(),E=A(ce(L),2),k=C(E),K=C(k),H=C(K,!0);S(K);var z=A(K,2);Vs(z,{onClick:h}),S(k);var j=A(k,2);j.__click=[Ky,u,p];var ae=C(j),X=C(ae),ne=C(X);let J;var we=A(ne,2);{var pe=ee=>{let Re=m(()=>a()&&r());Qd(ee,{get isRunning(){return n(Re)},onTimerEnded:y})};R(we,ee=>{r()&&ee(pe)})}S(X),S(ae);var re=A(ae,2),be=C(re),$e=C(be,!0);S(be),S(re),S(j),S(E),O((ee,Re)=>{ve(H,ee),qe(X,`background-image: url('${e.thumb}')`),J=se(ne,1,"thumb-overlay s-19",null,J,Re),ve($e,e.title)},[()=>Y("end_screen_next_video"),()=>({withOpacity:r()})]),b(N,L)};R(I,N=>{e.isHide||N(T)})}b(t,x),F(),o()}Ye(["click"]);import{PlaybackState as Ba}from"@vkontakte/videoplayer-core/es2018";import{checkNever as Yy}from"@vkontakte/videoplayer-shared/es2018";import{SeekAction as qn}from"@vkontakte/videoplayer-statistics/es2018";var zf=(t,e)=>Math.min(+(t+e).toFixed(2),1),Wf=(t,e)=>Math.max(+(t-e).toFixed(2),0),Ou=(t,e,i)=>{let o=zf(e,i);e<1&&t.actions.internal.setVolume(o)},Bu=(t,e,i)=>{let o=Wf(e,i);e>0&&t.actions.internal.setVolume(o)};var aa=({isAudioDisabled:t,isAudioAvailable:e,isAds:i,audioDisabledHintCallback:o,audioIsNotExistHintCallback:r})=>t?i?!0:(o==null||o(),!1):e?!0:(r==null||r(),!1);function Fu(){var t,e,i;return(i=(e=(t=document.activeElement)==null?void 0:t.shadowRoot)==null?void 0:e.activeElement)!=null?i:null}var jy=(t,e)=>{e(t)},Xy=M('<div class="keyboard-controls s-18" tabindex="-1" role="region"><!></div>'),Zy={hash:"s-18",code:".keyboard-controls.s-18{bottom:0;left:0;position:absolute;right:0;top:0}"};function Kf(t,e){var G,Ce;B(e,!0),Q(t,Zy);let[i,o]=Ve(),r=()=>w(we,"$disabledControls$",i),a=()=>w(it,"$isInteractiveTime$",i),l=()=>w(U,"$showInteractiveTimeIndicatorTooltip$",i),d=()=>w(z,"$playbackState$",i),s=()=>w(We,"$isEnded$",i),u=()=>w(fe,"$doubleForwardAvailable$",i),f=()=>w(Re,"$doubleForwardOn$",i),p=()=>w(Se,"$overlayContainer$",i),v=()=>w(ae,"$adPlaybackState",i),$=()=>w(X,"$positionExact$",i),y=()=>w(ne,"$duration$",i),h=()=>w(De,"$isAudioAvailable$",i),x=()=>w(J,"$volume$",i),I=()=>w(j,"$canChangePlaybackSpeed$",i),T=()=>w(pe,"$muted$",i),N=()=>w(re,"$currentSubtitle$",i),L=g(e,"nextButtonActive",3,!1),E=g(e,"prevButtonActive",3,!1),k=ge(),K=kt(),H=k.getLogger().createComponentLog("KeyboardControls component"),z=k.state.playbackState$,j=k.state.canChangePlaybackSpeed$,ae=k.ads.playbackState,X=k.state.positionExact$,ne=k.state.duration$,J=k.state.volume$,we=k.ui.controls.disabledControls$,pe=k.state.muted$,re=k.state.currentSubtitle$,be=k.ui.contextMenu.openedByHotKey$,$e=k.ui.contextMenu.lastActiveElem$,ee=k.ui.contextMenu.visible$,Re=k.ui.doubleForwardOn$,fe=k.ui.doubleForwardAvailable$,P=k.ui.contextMenu.position$,We=k.state.isEnded$,Se=k.ui.overlayContainer$,Z=(G=k.callbacks)==null?void 0:G.onAudioDoesNotExistHint,ie=(Ce=k.callbacks)==null?void 0:Ce.onAudioDisabledHint,De=k.state.isAudioAvailable$,Oe=k.state.isAudioDisabled,it=k.state.isInteractiveTime$,{showInteractiveTimeIndicatorTooltip$:U}=wo(),Pe=0,ke=!0,He=W(void 0),tt=le=>(le!==ke&&(ke=le,Pe=0),Pe+=1,(K.controls.seekStepKeyboard+K.controls.seekStepKeyboard*Pe)/1e3),ye=!0,Ie=({type:le,repeat:_e,disableDoubleForward:Me})=>{let rt=()=>{if(!r().has("PLAY_BUTTON"))if(a()&&l()&&U.set(!1),e.fakePlayButtonHandler)e.fakePlayButtonHandler();else{k.actions.internal.togglePlay();let ue="PLAY";d()===Ba.PAUSED?ue="PAUSE":s()&&(ue="REPLAY"),e.showHotKeyHelpers({type:ue})}},pt=le==="down";if(!u()||Me){pt&&rt(),ye=!0;return}if(pt)ye=!1;else if(ye)return;if(pt){!_e&&e.startDoubleForwardActivationTimer();return}f()||rt(),e.stopDoubleForward(),ye=!0},Be=le=>{let _e=V_(p());P.set(_e),$e.set(le.target),be.set(!0),ee.set(!0)},Lt=(le,_e=!1)=>{var di,pi;let Me=le.target,rt=(di=Me==null?void 0:Me.getAttribute("role"))==null?void 0:di.includes("menuitem"),pt=Me.classList.contains("btn"),ue=le.code;if(pt&&ue==="Space")return!1;let ze=Ah.has(ue);if(rt&&ze)return!1;let Qe=!Ph.has(ue);if(le.ctrlKey&&Qe||le.altKey&&Qe||le.metaKey)return!1;let ct=rt&&ue==="Escape";Lh.has(ue)||ct||e.hideContextMenu();let Nt=d()===Ba.PLAYING||d()===Ba.PAUSED,Ht=e.isAds&&(v()==="paused"||v()==="playing"),Gt=!Ht&&!r().has("TIMELINE"),vi=le.shiftKey&&["Digit1","Numpad1"].includes(ue);if(!vi&&!(Nt||Ht))return!1;H({message:`key down, code: ${ue}, isExternal = ${_e}`});let Qi=!1,Pt=()=>{Qi=!0,_e||le.preventDefault()};if(vi)return Be(le),Pt(),!0;switch(ue){case"KeyJ":case"ArrowLeft":{if(!Gt)break;if(le.ctrlKey||le.altKey){let $t=k.actions.internal.getPrevEpisode();k.actions.internal.seekToPrevEpisode($t),$t&&e.showHotKeyHelpers({type:"EPISODE_PREV",text:$t.text}),Pt()}else{let $t=le.shiftKey?tt(!1):K.controls.seekStepKeyboard/1e3,ci=Math.max($()-$t,0);$()>0&&(k.actions.internal.seekTime(ci,qn.DOUBLE_TAP),e.showHotKeyHelpers({type:"BACKWARD_SEEK",text:$t.toString()}),Pt())}break}case"KeyL":case"ArrowRight":{if(!Gt)break;if(le.ctrlKey||le.altKey){let $t=k.actions.internal.getNextEpisode();k.actions.internal.seekToNextEpisode($t),$t&&e.showHotKeyHelpers({type:"EPISODE_NEXT",text:$t.text}),Pt()}else{let $t=le.shiftKey?tt(!0):K.controls.seekStepKeyboard/1e3,ci=Math.min($()+$t,y());Math.round($())<Math.round(y())&&(k.actions.internal.seekTime(ci,qn.DOUBLE_TAP),e.showHotKeyHelpers({type:"FORWARD_SEEK",text:$t.toString()}),Pt())}break}case"ArrowUp":{if(aa({isAudioDisabled:Oe,audioDisabledHintCallback:ie,isAudioAvailable:h(),audioIsNotExistHintCallback:Z,isAds:e.isAds})){let $t=x(),ci=K.controls.volumeStepKeyboard,qt=$t<=1;if(Ou(k,$t,ci),qt){let Gi=Math.round(zf($t,ci)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:Gi}})}}Pt();break}case"ArrowDown":{if(aa({isAudioDisabled:Oe,audioDisabledHintCallback:ie,isAudioAvailable:h(),audioIsNotExistHintCallback:Z,isAds:e.isAds})){let $t=x(),ci=K.controls.volumeStepKeyboard,qt=$t>=0;if(Bu(k,$t,ci),qt){let Gi=Math.round(Wf($t,ci)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:Gi}})}}Pt();break}case"Comma":{if(le.shiftKey){if(!f()&&I()){let $t=k.actions.internal.decrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_DOWN",text:$t==null?void 0:$t.displayValue}),Pt()}}else{if(Ht||d()!==Ba.PAUSED)break;let $t=Math.max($()-K.controls.seekStepFrame/1e3,0);$()>0&&(e.showHotKeyHelpers({type:"BACKWARD_SEEK"}),k.actions.internal.clearDelayedBufferingCheckTimeout(),k.actions.internal.seekTime($t,qn.DOUBLE_TAP),Pt())}break}case"Period":{if(le.shiftKey){if(!f()&&I()){let $t=k.actions.internal.incrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_UP",text:$t==null?void 0:$t.displayValue}),Pt()}}else{if(Ht||d()!==Ba.PAUSED)break;let $t=Math.min($()+K.controls.seekStepFrame/1e3,y());$()<y()&&(e.showHotKeyHelpers({type:"FORWARD_SEEK"}),k.actions.internal.clearDelayedBufferingCheckTimeout(),k.actions.internal.seekTime($t,qn.DOUBLE_TAP),Pt())}break}case"KeyK":case"Space":Ie({type:"down",repeat:le.repeat,disableDoubleForward:"KeyK"===ue}),Pt();break;case"KeyM":{aa({isAudioDisabled:Oe,audioDisabledHintCallback:ie,isAudioAvailable:h(),audioIsNotExistHintCallback:Z,isAds:e.isAds})&&(e.showHotKeyHelpers({type:T()?"VOLUME":"MUTE"}),k.actions.internal.toggleMuted()),Pt();break}case"KeyF":e.toggleFullscreen(),Pt();break;case"KeyC":k.actions.internal.toggleSubtitle(),N().value!=="off"?e.showHotKeyHelpers({type:"SUBTITLES_ON",text:(pi=N())==null?void 0:pi.displayValue}):e.showHotKeyHelpers({type:"SUBTITLES_OFF"}),Pt();break;case"KeyI":k.actions.internal.togglePictureInPicture(),Pt();break;case"Digit1":case"Numpad1":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.1,qn.DOUBLE_TAP),Pt();break;case"Digit2":case"Numpad2":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.2,qn.DOUBLE_TAP),Pt();break;case"Digit3":case"Numpad3":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.3,qn.DOUBLE_TAP),Pt();break;case"Digit4":case"Numpad4":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.4,qn.DOUBLE_TAP),Pt();break;case"Digit5":case"Numpad5":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.5,qn.DOUBLE_TAP),Pt();break;case"Digit6":case"Numpad6":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.6,qn.DOUBLE_TAP),Pt();break;case"Digit7":case"Numpad7":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.7,qn.DOUBLE_TAP),Pt();break;case"Digit8":case"Numpad8":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.8,qn.DOUBLE_TAP),Pt();break;case"Digit9":case"Numpad9":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.9,qn.DOUBLE_TAP),Pt();break;case"Digit0":case"Numpad0":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(0,qn.DOUBLE_TAP),Pt();break;case"Slash":{le.shiftKey&&K.features.hotKeyMapModal&&(e.showKeyMap(),Pt());break}case"KeyN":le.shiftKey&&L()&&(k.actions.internal.nextVideoClick(),Pt());break;case"KeyP":le.shiftKey&&E()&&(k.actions.internal.prevVideoClick(),Pt());break;case"ShiftLeft":case"ShiftRight":Pt();break;case"Tab":case"Escape":case"Enter":break;default:Yy(ue);break}return Qi},mt=le=>{let _e=le.code;if(le.ctrlKey||le.altKey||le.metaKey)return;let Me=d()===Ba.PLAYING||d()===Ba.PAUSED,rt=e.isAds&&(v()==="paused"||v()==="playing");if(Me||rt)switch(_e){case"ShiftLeft":case"ShiftRight":Pe=0;break;case"Space":Ie({type:"up"});break}},Vt=Y("aria_label_video_player"),dt=()=>{var le;return(le=n(He))==null?void 0:le.focus()},xt=()=>n(He)===Fu(),Qt=le=>le.type==="keydown"?Lt(le,!0):(le.type==="keyup"&&mt(le),!1);var Tt=Xy();Tt.__keyup=mt,Tt.__keydown=[jy,Lt];var Mt=C(Tt);ei(Mt,()=>{var le;return(le=e.children)!=null?le:ht}),S(Tt),Ze(Tt,le=>D(He,le),()=>n(He)),O(()=>Le(Tt,"aria-label",Vt)),b(t,Tt);var Rt=F({focus:dt,isFocused:xt,handleExternalKeyboardEvent:Qt});return o(),Rt}Ye(["keyup","keydown"]);var Jy=M('<div class="container s-j"><div class="dot s-j"></div> <div class="dot s-j"></div> <div class="dot s-j"></div></div>'),e0={hash:"s-j",code:".container.s-j{display:flex;left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%)}.dot.s-j:first-child{animation-delay:0s}.dot.s-j:nth-child(2){animation-delay:.18s}.dot.s-j:nth-child(3){animation-delay:.36s}@keyframes s-j-dot_animation{0%{opacity:.2}30%{opacity:1}to{opacity:.2}}.dot.s-j{animation-duration:.75s;animation-iteration-count:infinite;animation-name:s-j-dot_animation;background:var(--btn-color);border-radius:4px;height:8px;width:8px}.dot.s-j+.dot:where(.s-j){margin-left:4px}"};function Fa(t,e){Q(t,e0);let i=g(e,"style",3,"");var o=Jy();O(()=>qe(o,i())),b(t,o)}var t0=Te('<path d="M5.26 5.26a.9.9 0 0 1 1.28 0L12 10.73l5.46-5.47a.9.9 0 0 1 1.28 1.28L13.27 12l5.47 5.46a.9.9 0 1 1-1.28 1.28L12 13.27l-5.46 5.47a.9.9 0 1 1-1.28-1.28L10.73 12 5.26 6.54a.9.9 0 0 1 0-1.28Z"></path>');function qf(t,e){Je(t,{get fill(){return e.fill},children:(i,o)=>{var r=t0();b(i,r)},$$slots:{default:!0}})}import{noop as Bl}from"@vkontakte/videoplayer-shared/es2018";var i0=t=>{t.stopPropagation()},o0=M("<button><!></button>"),n0={hash:"s-1p",code:"button.btn.s-1p{align-items:center;display:flex;flex-direction:row;height:var(--controls-height);justify-content:center;margin:0;padding:8px;will-change:opacity}button.w-max.s-1p{width:100%}button.btn--live.s-1p{padding:10px 4px}button.btn-jc-l.s-1p{justify-content:left}button.btn-m.s-1p{background-color:rgba(0,0,0,.56);border-radius:12px;height:44px;left:12px;position:absolute;top:50%;transform:translateY(-50%);transition:opacity var(--controls-transition-duration);width:44px}button.btn-m.s-1p,button.btn-m--play.s-1p{align-items:center;display:flex;justify-content:center}button.btn-m--play.s-1p{height:var(--big-play-size);padding:16px;position:relative;width:var(--big-play-size)}button.btn-m--next.s-1p,button.btn-m--prev.s-1p{height:50px;position:absolute;width:50px}button.btn-m--prev.s-1p{right:calc(100% + 35px)}button.btn-m--next.s-1p{left:calc(100% + 35px)}button.btn.s-1p:disabled{cursor:default;pointer-events:none}button.btn.s-1p:not(.btn-full-opacity):disabled{opacity:.4}button.btn.s-1p:not(:disabled):hover{opacity:.8}button.pr-0.s-1p{padding-right:0}button.pl-0.s-1p{padding-left:0}"};function Ft(t,e){B(e,!0),Q(t,n0);let i=g(e,"className",3,""),o=g(e,"style",3,""),r=g(e,"disabled",3,void 0),a=g(e,"testId",3,void 0),l=g(e,"ariaHidden",3,void 0),d=g(e,"ariaLabel",3,void 0),s=g(e,"ref",15,void 0),u=g(e,"ariaKeyShortCut",3,void 0),f=g(e,"ariaExpanded",3,void 0),p=g(e,"tabIndex",3,0),v=g(e,"click",3,Bl),$=g(e,"focus",3,Bl),y=g(e,"blur",3,Bl),h=m(()=>v()===Bl?null:L=>{L.stopPropagation(),v()(L)}),x=m(()=>$()===Bl?null:L=>{L.preventDefault(),$()()}),I=m(()=>y()===Bl?null:L=>{L.preventDefault(),y()()});var T=o0();T.__pointerdown=[i0],T.__click=function(...L){var E;(E=n(h))==null||E.apply(this,L)};var N=C(T);ei(N,()=>{var L;return(L=e.children)!=null?L:ht}),S(T),Ze(T,L=>s(L),()=>s()),O(()=>{var L,E,k,K,H,z,j,ae;se(T,1,`btn ${(L=i())!=null?L:""}`,"s-1p"),qe(T,o()||null),T.disabled=(E=r())!=null?E:null,Le(T,"aria-hidden",(k=l())!=null?k:null),Le(T,"aria-label",(K=d())!=null?K:null),Le(T,"aria-keyshortcuts",(H=u())!=null?H:null),Le(T,"aria-expanded",(z=f())!=null?z:null),Le(T,"data-testid",(j=a())!=null?j:null),Le(T,"tabindex",p()),Le(T,"role",e.role),Le(T,"aria-checked",(ae=e.areaChecked)!=null?ae:null)}),nt("focus",T,function(...L){var E;(E=n(x))==null||E.apply(this,L)}),nt("blur",T,function(...L){var E;(E=n(I))==null||E.apply(this,L)}),b(t,T),F()}Ye(["pointerdown","click"]);var r0=(t,e)=>{t.key==="Escape"&&e.onClose(),(t.key==="ArrowUp"||t.key==="ArrowDown")&&t.stopPropagation()},s0=M('<div class="modal-header s-1i"><h3 class="modal-title s-1i"> </h3> <!></div>'),a0=M('<div class="modal-overlay s-1i"><div class="modal-container s-1i" role="dialog" aria-modal="true"><!> <div class="modal-scroll s-1i" tabindex="0" role="scrollbar"><div class="modal-main s-1i"><!></div></div></div></div>'),l0={hash:"s-1i",code:'.modal-overlay.s-1i{align-items:center;background:transparent;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:var(--modal-z-index)}.modal-container.s-1i{background:var(--mobile-settings-bg);border-radius:8px;color:var(--white);display:flex;flex-direction:column;height:calc(100% - 24px);max-height:490px;max-width:600px;width:calc(100% - 32px)}.modal-header.s-1i{align-items:start;border-bottom:1px solid var(--white-alpha-24);box-sizing:border-box;display:flex;height:40px;justify-content:space-between;padding:8px 10px}.modal-title.s-1i{color:var(--white);font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:600;line-height:16px;margin:3px 0 0 6px}.modal-scroll.s-1i{height:100%;margin:8px 4px 8px 0;overflow-x:hidden;overflow-y:auto}.modal-scroll.s-1i::-webkit-scrollbar{width:8px}.modal-scroll.s-1i::-webkit-scrollbar-track{background-color:transparent;border-radius:4px;box-shadow:none;margin-right:2px}.modal-scroll.s-1i::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#666;border:1px solid transparent;border-radius:5px;min-height:40px}.modal-scroll.s-1i::-webkit-scrollbar-thumb:hover{background-color:#777}.modal-main.s-1i{margin:-8px -4px 0 0}'};function Qf(t,e){B(e,!0),Q(t,l0);let i=g(e,"showHeader",3,!0),o=g(e,"showCloseCross",3,!0),r=W(void 0),a=W(void 0),{webApi:{focusManager:l}}=ge(),d=Y("hotkey_map_modal_close_btn_text");Et(()=>{var h;return(h=n(r))==null||h.focus(),n(a)&&l&&(l.setContainerForFocusLock(n(a)),l.activateLock()),()=>l==null?void 0:l.deactivateLock()});var s=a0();s.__keydown=[r0,e];var u=C(s),f=C(u);{var p=h=>{var x=s0(),I=C(x),T=C(I,!0);S(I);var N=A(I,2);{var L=E=>{Ft(E,{get click(){return e.onClose},testId:"close-modal",style:"padding: 0; height: 24px; width: 24px",get ariaLabel(){return d},children:(k,K)=>{qf(k,{fill:"currentColor"})},$$slots:{default:!0}})};R(N,E=>{o()&&E(L)})}S(x),O(()=>ve(T,e.title)),b(h,x)};R(f,h=>{i()&&h(p)})}var v=A(f,2),$=C(v),y=C($);ei(y,()=>{var h;return(h=e.children)!=null?h:ht}),S($),S(v),Ze(v,h=>D(r,h),()=>n(r)),S(u),Ze(u,h=>D(a,h),()=>n(a)),S(s),b(t,s),F()}Ye(["keydown"]);var d0=new Set(["BR"]),D_=t=>{var r;let e=document.createElement("DIV");e.innerHTML=t;let i=e.querySelectorAll("*"),o=i.length;for(;o--;){let a=i[o],l=a.tagName;d0.has(l)||(r=a.parentElement)==null||r.removeChild(a)}return e.innerHTML};var c0=M('<li class="hot-key-map-item s-15"><span class="hot-key-map-item-description s-15"><!></span> <span class="hot-key-map-item-value s-15"> </span></li>'),u0=M('<div class="hot-key-map-group s-15"><h5 class="hot-key-map-group-title s-15"> </h5> <ul class="hot-key-map-group-items s-15"></ul></div>'),p0=M('<div class="hot-key-map s-15"></div>'),f0={hash:"s-15",code:'.hot-key-map.s-15{box-sizing:border-box;color:var(--black);overflow-x:hidden}.hot-key-map-group.s-15{border-bottom:1px solid var(--white-alpha-24);margin:0 20px 0 16px}.hot-key-map-group.s-15:last-child{border-bottom:none}.hot-key-map-group-title.s-15{color:var(--white);font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:600;line-height:16px}.hot-key-map-group-title.s-15,.hot-key-map-item.s-15{margin:0;padding:12px 0;width:100%}.hot-key-map-group-items.s-15{box-sizing:border-box;list-style:none;margin:0;padding:0}.hot-key-map-item.s-15{align-items:center;box-sizing:border-box;display:flex;justify-content:space-between;--videoplayer-hotkey-item-value-width:156px;--videoplayer-hotkey-item-value-padding-left:24px}.hot-key-map-item-description.s-15{color:var(--white-alpha-72);max-width:388px;width:calc(100% - var(--videoplayer-hotkey-item-value-width) - var(--videoplayer-hotkey-item-value-padding-left))}.hot-key-map-item-value.s-15{color:var(--white);letter-spacing:-.14px;padding-left:var(--videoplayer-hotkey-item-value-padding-left);width:var(--videoplayer-hotkey-item-value-width)}.hot-key-map-item-description.s-15,.hot-key-map-item-value.s-15{font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:400;line-height:16px}'};function Gf(t,e){B(e,!1),Q(t,f0);let[i,o]=Ve(),r=()=>w(l,"$data",i),a=ge(),{data:l,show:d}=a.ui.modals.hotKeyMap,s=()=>{d.set(!1)};xo(),Qf(t,{get title(){return r().title},onClose:s,children:(u,f)=>{var p=p0();bi(p,5,()=>r().groups,({title:v,items:$})=>v,(v,$)=>{let y=()=>n($).title,h=()=>n($).items;var x=u0(),I=C(x),T=C(I,!0);S(I);var N=A(I,2);bi(N,5,h,({description:L,value:E})=>E,(L,E)=>{let k=()=>n(E).description,K=()=>n(E).value;var H=c0(),z=C(H),j=C(z);Cd(j,()=>D_(k())),S(z);var ae=A(z,2),X=C(ae,!0);S(ae),S(H),O(()=>ve(X,K())),b(L,H)}),S(N),S(x),O(()=>ve(T,y())),b(v,x)}),S(p),b(u,p)},$$slots:{default:!0}}),F(),o()}import{noop as cb}from"@vkontakte/videoplayer-shared/es2018";import{ChromecastState as nb,PlaybackState as Nm}from"@vkontakte/videoplayer-core/es2018";import{getVideoQualityLabel as w0}from"@vkontakte/videoplayer-shared/es2018";var m0=M('<div class="pillow s-1y"><!></div>'),v0={hash:"s-1y",code:".pillow.s-1y{background-color:#679ff8;color:var(--white);font-size:6px;font-weight:600;-webkit-font-smoothing:antialiased;border-radius:12px;padding:2px 4px}"};function Yf(t,e){Q(t,v0);var i=m0(),o=C(i);ei(o,()=>{var r;return(r=e.children)!=null?r:ht}),S(i),O(()=>Le(i,"data-testid",e.testId)),b(t,i)}import{VideoQuality as Gd}from"@vkontakte/videoplayer-shared/es2018";var g0=Te('<svg><!><path d="M5.52 5c.32 0 .51-.2.51-.54V3.5l.5-.51 1.46 1.74c.16.2.3.28.51.28a.5.5 0 0 0 .5-.5c0-.14-.07-.29-.22-.48L7.3 2.3 8.8.87c.16-.14.2-.25.2-.4A.47.47 0 0 0 8.52 0c-.18 0-.3.07-.45.22l-2 2.03h-.04V.54C6.03.2 5.84 0 5.52 0S5 .2 5 .54v3.92c0 .34.2.54.52.54M2.55 1.05 1.05 3.1h1.5zM3.5 3.1V.83C3.5.03 2.41-.3 1.94.35L.14 2.82A.75.75 0 0 0 .75 4h1.8v.55c0 .25.25.45.5.45a.45.45 0 0 0 .45-.45V4h.05a.45.45 0 0 0 0-.9z"></path></svg>');function jf(t,e){let i=En(e,["$$slots","$$events","$$legacy","children"]);var o=g0();io(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img",...i}));var r=C(o);ei(r,()=>{var a;return(a=e.children)!=null?a:ht}),ai(),S(o),b(t,o)}var h0=Te('<svg><!><path d="M5.51 5c.33 0 .52-.2.52-.54V3.5l.49-.51L7.99 4.7c.16.21.3.29.51.29a.49.49 0 0 0 .5-.5c0-.14-.07-.29-.22-.48L7.29 2.3 8.82.87C8.95.73 9 .62 9 .47A.47.47 0 0 0 8.52 0c-.17 0-.3.07-.44.22L6.06 2.25h-.03V.54C6.03.2 5.83 0 5.5 0S5 .2 5 .54v3.92c0 .34.19.54.51.54M2 0c-.35 0-.67.06-.95.17a1.5 1.5 0 0 0-.66.49c-.15.2-.23.44-.23.7 0 .43.21.76.62 1-.23.11-.41.26-.55.44-.15.2-.23.44-.23.71 0 .29.08.55.25.78.18.23.41.4.71.52.3.13.65.19 1.04.19s.73-.06 1.03-.19c.3-.12.54-.3.71-.52a1.26 1.26 0 0 0 .03-1.49 1.45 1.45 0 0 0-.55-.44c.4-.23.62-.57.62-1a1.14 1.14 0 0 0-.24-.7 1.44 1.44 0 0 0-.66-.49A2.4 2.4 0 0 0 2 0m-.57.96C1.56.86 1.75.8 2 .8s.43.06.56.16a.51.51 0 0 1 .2.43c0 .2-.06.34-.2.44A.87.87 0 0 1 2 2a.9.9 0 0 1-.57-.16.52.52 0 0 1-.2-.44c0-.18.06-.32.2-.43ZM1.08 3.5a.6.6 0 0 1 .24-.5c.16-.13.38-.2.68-.2s.52.07.68.2a.6.6 0 0 1 .24.5.63.63 0 0 1-.24.52c-.16.12-.38.19-.68.19s-.52-.07-.68-.19a.64.64 0 0 1-.24-.52"></path></svg>');function Xf(t,e){let i=En(e,["$$slots","$$events","$$legacy","children"]);var o=h0();io(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img",...i}));var r=C(o);ei(r,()=>{var a;return(a=e.children)!=null?a:ht}),ai(),S(o),b(t,o)}var _0=Te('<svg><!><path d="M5.52 5h1.1C8.1 5 9 4.07 9 2.5S8.1 0 6.62 0h-1.1C5.19 0 5 .2 5 .54v3.92c0 .34.2.54.52.54m.51-.85V.85h.47C7.41.85 8 1.47 8 2.5c0 1.07-.58 1.65-1.5 1.65zM.52 5c.32 0 .51-.2.51-.54V2.92h1.94v1.54c0 .34.19.54.51.54S4 4.8 4 4.46V.54C4 .2 3.8 0 3.48 0s-.51.2-.51.54v1.53H1.03V.54C1.03.2.84 0 .52 0S0 .2 0 .54v3.99c0 .34.2.47.52.47"></path></svg>');function Zf(t,e){let i=En(e,["$$slots","$$events","$$legacy","children"]);var o=_0();io(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor",role:"img",...i}));var r=C(o);ei(r,()=>{var a;return(a=e.children)!=null?a:ht}),ai(),S(o),b(t,o)}var b0=Te('<svg><!><path d="M9.52 5h1.1C12.1 5 13 4.07 13 2.5S12.1 0 10.62 0h-1.1C9.19 0 9 .2 9 .54v3.92c0 .34.2.54.52.54m.51-.85V.85h.47c.91 0 1.5.62 1.5 1.65 0 1.07-.58 1.65-1.5 1.65zM4.52 5c.32 0 .51-.2.51-.54V2.92h1.94v1.54c0 .34.19.54.51.54S8 4.8 8 4.46V.54C8 .2 7.8 0 7.48 0s-.51.2-.51.54v1.53H5.03V.54C5.03.2 4.84 0 4.52 0S4 .2 4 .54v3.99c0 .34.2.47.52.47m-4 0c.32 0 .51-.2.51-.54V3h1.33c.27 0 .45-.15.45-.41 0-.25-.18-.4-.45-.4H1.03V.84h1.5C2.81.85 3 .7 3 .43S2.8 0 2.53 0H.52C.19 0 0 .2 0 .54v3.92C0 4.8.2 5 .52 5"></path></svg>');function Jf(t,e){let i=En(e,["$$slots","$$events","$$legacy","children"]);var o=b0();io(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"13",height:"5",fill:"currentColor",role:"img",...i}));var r=C(o);ei(r,()=>{var a;return(a=e.children)!=null?a:ht}),ai(),S(o),b(t,o)}var $0=Te('<svg><!><path d="M11.52 5.75h1.1c1.48 0 2.38-.94 2.38-2.5s-.9-2.5-2.38-2.5h-1.1c-.33 0-.52.2-.52.54V5.2c0 .34.2.54.52.54Zm.51-.85V1.6h.47c.91 0 1.5.62 1.5 1.65 0 1.07-.58 1.65-1.5 1.65zm-5.51.85c.32 0 .51-.2.51-.54V3.67h1.94v1.54c0 .34.19.54.51.54s.52-.2.52-.54V1.3c0-.34-.2-.54-.52-.54s-.51.2-.51.54v1.53H7.03V1.3c0-.34-.19-.54-.51-.54S6 .95 6 1.29v3.99c0 .34.2.47.52.47m-3.18-.09a4 4 0 0 1-.84.09C1.04 5.75 0 4.88 0 3.3 0 1.73 1.04.75 2.5.75S5 1.73 5 3.3c0 .87-.27 1.46-.78 1.88l.2.3a.5.5 0 0 1-.84.55zm-.52-.78-.24-.35a.5.5 0 1 1 .84-.56l.24.37c.18-.26.29-.62.29-1.04 0-1.03-.64-1.65-1.45-1.65s-1.45.62-1.45 1.65.64 1.6 1.45 1.6c.08 0 .2 0 .32-.02"></path></svg>');function em(t,e){let i=En(e,["$$slots","$$events","$$legacy","children"]);var o=$0();io(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"15",height:"7",fill:"currentColor",role:"img",...i}));var r=C(o);ei(r,()=>{var a;return(a=e.children)!=null?a:ht}),ai(),S(o),b(t,o)}var Hu=t=>{switch(t){case Gd.Q_720P:return Zf;case Gd.Q_1080P:return Jf;case Gd.Q_1440P:return em;case Gd.Q_2160P:return jf;case Gd.Q_4320P:return Xf}};var y0=Te('<path d="M12.72 2.21q1.8.07 2.41 1.96l.06.21.06.2.06.23.06.16.04.01.06-.02.14-.05.15-.07c1.42-.66 2.5-.53 3.4.44l.12.14.82 1.02c.73.96.7 2 0 3.1l-.13.19-.12.16-.14.2-.07.12-.04.05v.03l.1.06.13.07.15.09c1.39.7 1.96 1.64 1.74 2.93l-.04.19-.24 1.06c-.16.68-.28 1-.77 1.45-.48.43-1.02.61-1.73.67l-.22.02h-.2l-.25.02-.18.02.02.14v.1l.04.17c.32 1.53-.04 2.56-1.19 3.2l-.17.1-1.17.57q-1.64.73-3.02-.7l-.15-.17-.13-.15-.17-.19-.1-.1-.05-.04-.1.09-.1.1-.12.14c-.95 1.13-1.95 1.54-3.17 1.07l-.18-.08-1.05-.5-.31-.17a2 2 0 0 1-1-1.06 3 3 0 0 1-.16-1.88l.04-.23.04-.24.02-.17-.1-.02-.15-.01h-.18c-1.56-.04-2.48-.62-2.85-1.89l-.05-.18-.3-1.28q-.33-1.77 1.37-2.78l.2-.11.17-.1.22-.12.15-.1v-.02l-.06-.1-.08-.13-.1-.14c-.94-1.25-1.04-2.34-.28-3.4L4 6.32l.82-1.01c.8-.92 1.8-1.1 3.04-.64l.2.08.19.08.22.1.13.04.04-.01.03-.1.05-.13.04-.17c.36-1.43 1.09-2.24 2.4-2.35h1.58Zm-.05 1.8h-1.34l-.14.01c-.28.04-.47.2-.65.83l-.04.16-.06.2a6 6 0 0 1-.46 1.14 6 6 0 0 0-1.15.56 7 7 0 0 1-1.16-.35l-.35-.16q-.37-.15-.59-.17h-.08a.6.6 0 0 0-.4.19l-.08.07-.78.98-.1.12c-.18.26-.2.5.2 1.08l.22.31q.34.48.6 1.1-.2.59-.27 1.2-.51.45-1.01.73l-.34.18c-.62.34-.7.56-.65.88l.01.08.28 1.21.04.16c.1.3.27.47.97.5l.39.02q.57.03 1.22.2.35.53.78.97a6 6 0 0 1-.12 1.45c-.2.95-.01 1.1.38 1.3l1.13.54a1 1 0 0 0 .34.1l.06-.01q.26-.03.67-.49l.26-.3q.4-.42.95-.83l.3.02.3.01h.3l.3-.03q.56.4.95.84l.26.3c.32.36.53.48.73.48h.07l.18-.05.09-.04 1.13-.54.14-.08c.3-.17.42-.4.24-1.22a6 6 0 0 1-.12-1.45q.44-.45.78-.97a7 7 0 0 1 1.22-.2l.39-.01c.81-.04.91-.26 1-.66l.27-1.15c.09-.4.1-.64-.62-1.03l-.34-.18a6 6 0 0 1-1.01-.73 6 6 0 0 0-.27-1.2q.26-.62.6-1.1l.22-.31c.4-.58.38-.81.2-1.08l-.05-.06-.78-.97c-.14-.18-.26-.3-.46-.33h-.07q-.23 0-.67.17l-.35.16a6 6 0 0 1-1.16.35 6 6 0 0 0-1.15-.56 7 7 0 0 1-.45-1.1l-.11-.4c-.2-.68-.4-.81-.72-.83zM12 8.2a3.8 3.8 0 1 1 0 7.6 3.8 3.8 0 0 1 0-7.6m0 1.8a2 2 0 1 0 0 4 2 2 0 0 0 0-4"></path>');function tm(t,e){Je(t,{get testId(){return e.testId},children:(i,o)=>{var r=y0();b(i,r)},$$slots:{default:!0}})}var x0=Te('<path d="M13.25 2.83c.23.75.38 1.5 1.63 2.23 1.4.38 2.08 0 2.72-.42.66-.45.86-.32 1.12-.06l.65.64c.29.3.4.42 0 1.18-.38.7-.8 1.33-.42 2.73.72 1.25 1.47 1.47 2.22 1.62.78.16.83.39.83.76v.9c0 .42 0 .59-.83.84-.75.23-1.5.38-2.23 1.63-.38 1.4 0 2.08.42 2.72.45.66.32.86.06 1.12l-.64.65c-.3.29-.42.4-1.18 0-.7-.38-1.34-.8-2.73-.42-1.25.72-1.47 1.47-1.62 2.22-.16.78-.39.83-.76.83h-.9c-.42 0-.59 0-.84-.83-.23-.75-.38-1.5-1.63-2.23-1.4-.38-2.08 0-2.72.42-.66.45-.86.32-1.12.06l-.65-.64c-.29-.3-.4-.42 0-1.18.38-.7.8-1.34.42-2.73-.72-1.25-1.47-1.47-2.22-1.62-.78-.16-.83-.39-.83-.76v-.9c0-.42 0-.59.83-.84.75-.23 1.5-.38 2.22-1.63.38-1.4 0-2.08-.42-2.72-.44-.66-.31-.86-.05-1.12l.64-.65c.3-.29.42-.4 1.18 0 .7.38 1.33.8 2.73.42 1.25-.72 1.47-1.47 1.62-2.22.16-.78.39-.83.76-.83h.9c.42 0 .59 0 .84.83M12 7.25a4.75 4.75 0 1 0 0 9.5 4.75 4.75 0 0 0 0-9.5"></path>');function im(t,e){Je(t,{get testId(){return e.testId},children:(i,o)=>{var r=x0();b(i,r)},$$slots:{default:!0}})}var S0=M('<div aria-hidden="true"><!> <!></div>'),C0={hash:"s-1w",code:".icon.s-1w{display:flex;height:24px;position:relative;width:24px}.icon.s-1w .pillow{position:absolute;right:-9px;top:1px}.icon.triple.s-1w .pillow{right:-13px}.icon.s-1w svg[data-testid=settings-icon--labeled] ._full{opacity:0;visibility:hidden}"};function Yd(t,e){B(e,!0),Q(t,C0);let i=g(e,"isMobile",3,!1),o=g(e,"currentQuality",3,void 0),r=m(()=>o()?w0(o()):""),a=m(()=>Hu(o())),l=m(()=>n(r).length>2);var d=Ae(),s=ce(d);{var u=p=>{tm(p,{testId:"settings-mobile-icon"})},f=p=>{var v=S0();let $;var y=C(v);{var h=T=>{let N=m(()=>`${n(r)}-pill-icon`);Yf(T,{get testId(){return n(N)},children:(L,E)=>{var k=Ae(),K=ce(k);Bi(K,()=>n(a),(H,z)=>{z(H,{})}),b(L,k)},$$slots:{default:!0}})};R(y,T=>{n(a)&&T(h)})}var x=A(y,2);let I=m(()=>n(a)?"settings-icon--labeled":"settings-icon");im(x,{get testId(){return n(I)}}),S(v),O(T=>$=se(v,1,"icon s-1w",null,$,T),[()=>({triple:n(l)})]),b(p,v)};R(s,p=>{i()?p(u):p(f,!1)})}b(t,d),F()}var T0=M('<span class="settings-icon-wrapper s-20"><!></span>'),I0={hash:"s-20",code:".settings-icon-wrapper.s-20{position:relative;width:24px}"};function Fl(t,e){B(e,!0),Q(t,I0);let[i,o]=Ve(),r=()=>w(u,"$settingsMenuVisible",i),a=()=>w(v,"$isMobile",i),l=()=>w(s,"$currentQuality",i),d=ge(),s=d.state.currentQuality$,u=d.ui.settingsMenu.visible$,f=d.actions.internal.openSettingsMenu,p=d.actions.internal.closeSettingsMenu,v=d.ui.isMobile,$=d.ui.t,y=W(void 0);Ne(()=>{n(y)&&St(()=>{e.ref$.set(n(y))})});let h=$("aria_label_settings");async function x(T){let N=sa(T);r()?p():f(N,vo)}let I=m(()=>r()?"opened":"");Ft(t,{get className(){return n(I)},testId:"settings-btn",click:x,get ariaLabel(){return h},get ariaExpanded(){return r()},get ref(){return n(y)},set ref(T){D(y,T,!0)},children:(T,N)=>{var L=T0(),E=C(L);Yd(E,{get isMobile(){return a()},get currentQuality(){return l()}}),S(L),b(T,L)},$$slots:{default:!0}}),F(),o()}var E0=Te('<path d="M6.56 4.44a1.5 1.5 0 1 0-2.12 2.12l3.09 3.09a11 11 0 0 0-2.39 3.08 11 11 0 0 0-1.01 4.14C4 18.43 4 20.37 4 22.83v2.34c0 2.46 0 4.4.13 5.96.13 1.6.4 2.93 1.01 4.14a10.5 10.5 0 0 0 4.6 4.59c1.2.61 2.53.88 4.13 1.01 1.56.13 3.5.13 5.96.13h8.34c2.46 0 4.4 0 5.96-.13 1.44-.12 2.66-.35 3.78-.84l3.53 3.53a1.5 1.5 0 0 0 2.12-2.12zM13.5 28a1.5 1.5 0 0 0 0 3h11a1.5 1.5 0 0 0 0-3zM12 22a1.5 1.5 0 0 1 1.5-1.5h4a1.5 1.5 0 0 1 0 3h-4A1.5 1.5 0 0 1 12 22"></path><path d="M34.5 23.5h-4.64l12.55 12.55q.23-.37.45-.78a11 11 0 0 0 1.01-4.14c.13-1.56.13-3.5.13-5.96v-2.34c0-2.46 0-4.4-.13-5.96a11 11 0 0 0-1.01-4.14 10.5 10.5 0 0 0-4.6-4.59 11 11 0 0 0-4.13-1.01C32.57 7 30.63 7 28.17 7h-8.34c-2.46 0-4.4 0-5.96.13l-.35.03L26.86 20.5h7.64a1.5 1.5 0 0 1 0 3"></path>',1),k0=Te("<path></path>");function la(t,e){B(e,!0);let i=m(()=>`subtitles-icon${e.type==="off"?"-off":e.type==="outline"?"-outline":""}`),o=m(()=>fn(e.size));Je(t,{get width(){return"48"},get height(){return"48"},get style(){return n(o)},get testId(){return n(i)},get shadow(){return e.shadow},children:(r,a)=>{var l=Ae(),d=ce(l);{var s=f=>{var p=E0();ai(),b(f,p)},u=f=>{var p=k0();O(()=>Le(p,"d",`M16.92 8h14.16q2.82-.02 4.66.1c1.28.1 2.4.32 3.46.86a8.8 8.8 90 013.84 3.84c.54 1.04.76 2.18.86 3.46q.12 1.84.1 4.66v6.16q.02 2.82-.1 4.66a10 10 90 01-.86 3.46 8.8 8.8 90 01-3.84 3.84 10 10 90 01-3.46.86q-1.84.12-4.66.1H16.92q-2.82.02-4.66-.1a10 10 90 01-3.46-.86 8.8 8.8 90 01-3.84-3.84 10 10 90 01-.86-3.46Q4 29.9 4 27.08v-6.16q-.02-2.82.1-4.66c.1-1.28.32-2.4.86-3.46A8.8 8.8 90 018.8 8.96a10 10 90 013.46-.86Q14.1 8 16.92 8
|
|
58
|
+
Audio: ${(nt=n(s).audioCodec||"")!=null?nt:""} ${n(s).audioLanguage?`(${n(s).audioLanguage})`:""}`)}),$(Y,Pe)};V(ee,Y=>{(n(s).videoCodec||n(s).audioCodec)&&Y(be)})}var we=k(ee,2);{var ge=Y=>{var Pe=Cy(),le=k(C(Pe),2),ye=C(le,!0);S(le),S(Pe),D(()=>ve(ye,n(s).viewport)),$(Y,Pe)};V(we,Y=>{n(s).viewport&&Y(ge)})}var pe=k(we,2);{var Ke=Y=>{var Pe=Ty(),le=k(C(Pe),2),ye=C(le,!0);S(le),S(Pe),D(()=>ve(ye,n(s).videoSize)),$(Y,Pe)};V(pe,Y=>{n(s).videoSize&&Y(Ke)})}var U=k(pe,2);{var O=Y=>{var Pe=Iy(),le=k(C(Pe),2),ye=C(le,!0);S(le),S(Pe),D(()=>ve(ye,n(s).cdn)),$(Y,Pe)};V(U,Y=>{n(s).cdn&&Y(O)})}var qe=k(U,2);{var K=Y=>{var Pe=Ey(),le=k(C(Pe),2),ye=C(le);S(le),S(Pe),D(()=>{var Le;return ve(ye,`${(Le=n(s).volume)!=null?Le:""} %`)}),$(Y,Pe)};V(qe,Y=>{n(s).volume&&Y(K)})}var ae=k(qe,2);{var xe=Y=>{var Pe=Py(),le=k(C(Pe),2),ye=C(le);S(le),S(Pe),D(Le=>ve(ye,`${Le!=null?Le:""} s`),[()=>n(s).position.toFixed(2)]),$(Y,Pe)};V(ae,Y=>{n(s).position&&Y(xe)})}var Be=k(ae,2);{var tt=Y=>{var Pe=ky(),le=k(C(Pe),2),ye=C(le);S(le),S(Pe),D(Le=>ve(ye,`${Le!=null?Le:""} s`),[()=>n(s).buffer.toFixed(2)]),$(Y,Pe)};V(Be,Y=>{n(s).buffer&&Y(tt)})}var re=k(Be,2);{var ce=Y=>{var Pe=Ay(),le=k(C(Pe),2),ye=C(le);S(le),S(Pe),D(Le=>ve(ye,`${Le!=null?Le:""} s`),[()=>n(s).nativeBuffer.toFixed(2)]),$(Y,Pe)};V(re,Y=>{n(s).nativeBuffer&&Y(ce)})}var Re=k(re,2);{var Ve=Y=>{var Pe=Ly(),le=k(C(Pe),2),ye=C(le);S(le),S(Pe),D(Le=>ve(ye,`${Le!=null?Le:""} s`),[()=>n(s).liveLatency.toFixed(2)]),$(Y,Pe)};V(Re,Y=>{n(s).liveLatency&&Y(Ve)})}var Je=k(Re,2);{var Ee=Y=>{var Pe=My(),le=k(C(Pe),2),ye=C(le,!0);S(le),S(Pe),D(Le=>ve(ye,Le),[()=>[{value:n(s).currentVideoSegmentLength,title:"Video:"},{value:n(s).currentAudioSegmentLength,title:"Audio:"}].filter(({value:Le})=>Le).map(({value:Le,title:nt})=>`${nt} ${((Le!=null?Le:0)/1e3).toFixed(2)} s`).join(" & ")]),$(Y,Pe)};V(Je,Y=>{(n(s).currentVideoSegmentLength||n(s).currentAudioSegmentLength)&&Y(Ee)})}var Te=k(Je,2),He=k(C(Te),2),Ct=C(He);S(He),S(Te);var xt=k(Te,2);{var At=Y=>{var Pe=Vy(),le=k(C(Pe),2);Hd(le,{get values(){return n(I)}});var ye=k(le,2),Le=C(ye);S(ye),S(Pe),D(nt=>ve(Le,`${nt!=null?nt:""} Kbps`),[()=>n(s).speed.toFixed(2)]),$(Y,Pe)};V(xt,Y=>{n(s).speed&&Y(At)})}var at=k(xt,2);{var Tt=Y=>{var Pe=Ry(),le=k(C(Pe),2);Hd(le,{get values(){return n(T)}});var ye=k(le,2),Le=C(ye);S(ye),S(Pe),D(nt=>ve(Le,`${nt!=null?nt:""} Kbps`),[()=>n(s).bitrate.toFixed(2)]),$(Y,Pe)};V(at,Y=>{n(s).bitrate&&Y(Tt)})}var jt=k(at,2),It=k(C(jt),2);Hd(It,{get values(){return n(w)}});var Dt=k(It,2),Ut=C(Dt,!0);S(Dt),S(jt),S(Q),S(A),D(Y=>{var Pe,le;E=ne(A,1,"container s-m",null,E,Y),Me(A,"aria-label",N),ve(X,n(s).version),ve(Ct,`${(Pe=n(p))!=null?Pe:""} / ${(le=n(m))!=null?le:""} frames`),ve(Ut,n(v))},[()=>({"container-mobile":r()})]),$(t,A),H(),o()}Qe(["click"]);import{noop as Oy}from"@vkontakte/videoplayer-shared/es2018";var By=(t,e)=>{t.stopPropagation(),e()()},Hy=L('<div class="close s-1a"></div>'),Fy={hash:"s-1a",code:'.close.s-1a{cursor:pointer;height:16px;opacity:.8;position:relative;transition:opacity .2s;width:16px}.close.s-1a:hover{opacity:1}.close.s-1a:after,.close.s-1a:before{background-color:var(--white);content:" ";height:16px;left:8px;position:absolute;width:2px}.close.s-1a:before{transform:rotate(45deg)}.close.s-1a:after{transform:rotate(-45deg)}'};function Rs(t,e){B(e,!0),G(t,Fy);let i=h(e,"onClick",3,Oy);var o=Hy();o.__click=[By,i],$(t,o),H()}Qe(["click"]);import{noop as zy}from"@vkontakte/videoplayer-shared/es2018";var an=t=>`width:${t}px;height:${t}px;`;var Uy=Ie('<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 An(t,e){B(e,!0);let i=f(()=>an(e.size));Xe(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(i)},testId:"play-icon",get shadow(){return e.shadow},children:(o,r)=>{var a=Uy();$(o,a)},$$slots:{default:!0}}),H()}var Wy=L('<div class="timer s-1c"><canvas class="timer-canvas s-1c" width="100" height="100"></canvas> <!></div>'),Ky={hash:"s-1c",code:".timer.s-1c{align-items:center;background:rgba(31,31,31,.65);border-radius:50%;display:flex;height:50px;justify-content:space-around;transition:background .2s;width:50px}.timer.s-1c:hover{background:rgba(31,31,31,.85)}.timer-canvas.s-1c{height:50px;position:absolute;width:50px}"};function Ud(t,e){B(e,!0),G(t,Ky);let i=h(e,"isRunning",3,!0),o=h(e,"onTimerEnded",3,zy),r=5e3,a=q(void 0),l,d,s=0,u;De(()=>{i()&&St(()=>{d=Date.now(),s=requestAnimationFrame(p)})});let m=()=>{s&&(cancelAnimationFrame(s),s=0)},p=()=>{m(),i()&&(u=(Date.now()-d)/r,u<1?(l==null||l.clearRect(0,0,100,100),l==null||l.beginPath(),l==null||l.arc(50,50,47,-Math.PI/2,-Math.PI/2+Math.PI*2*u),l==null||l.stroke(),s=requestAnimationFrame(p)):o()())};Vt(()=>{l=n(a).getContext("2d"),l&&(l.lineWidth=6,l.lineCap="round",l.strokeStyle="#fff")}),sn(()=>{m()});var v=Wy(),_=C(v);je(_,b=>R(a,b),()=>n(a));var y=k(_,2);An(y,{get size(){return"24"}}),S(v),$(t,v),H()}var qy=(t,e,i)=>{e(!1),i()},Qy=L('<div class="overlay s-o"></div> <div class="next-video s-o"><div class="top s-o"><div class="caption s-o"> </div> <!></div> <div class="row s-o"><div class="column s-o"><div class="thumb s-o"><div></div> <!></div></div> <div class="column s-o"><div class="title s-o"> </div></div></div></div>',1),Gy={hash:"s-o",code:".overlay.s-o{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-o{display:flex;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:362px}.top.s-o{display:flex;justify-content:space-between}.caption.s-o{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-o{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-o{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-o{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-o,.thumb-overlay.s-o{height:100%;width:100%}.thumb-overlay.s-o{position:absolute}.thumb-overlay.withOpacity.s-o{background:var(--black);opacity:.3}.title.s-o{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function Kf(t,e){B(e,!0),G(t,Gy);let[i,o]=Ne(),r=()=>x(d,"$autoplayNextEnabled$",i),a=()=>x(s,"$timerNextVideoRunning$",i),l=_e(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,m=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,v=l.actions.internal.nextVideoAnnouncementAuto,_=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{r()&&(u(!1),v())},b=()=>{e.clickCloseIcon(),_()};Vt(()=>{e.isHide||m(),e.isHide&&r()&&(u(!1),v())});var w=Ae(),I=ue(w);{var T=N=>{var A=Qy(),E=k(ue(A),2),P=C(E),Q=C(P),F=C(Q,!0);S(Q);var z=k(Q,2);Rs(z,{onClick:b}),S(P);var X=k(P,2);X.__click=[qy,u,p];var se=C(X),Z=C(se),oe=C(Z);let J;var Ce=k(oe,2);{var me=ge=>{let pe=f(()=>a()&&r());Ud(ge,{get isRunning(){return n(pe)},onTimerEnded:y})};V(Ce,ge=>{r()&&ge(me)})}S(Z),S(se);var ee=k(se,2),be=C(ee),we=C(be,!0);S(be),S(ee),S(X),S(E),D((ge,pe)=>{ve(F,ge),We(Z,`background-image: url('${e.thumb}')`),J=ne(oe,1,"thumb-overlay s-o",null,J,pe),ve(we,e.title)},[()=>j("end_screen_next_video"),()=>({withOpacity:r()})]),$(N,A)};V(I,N=>{e.isHide||N(T)})}$(t,w),H(),o()}Qe(["click"]);import{PlaybackState as Ba}from"@vkontakte/videoplayer-core/es2018";import{checkNever as jy}from"@vkontakte/videoplayer-shared/es2018";import{SeekAction as Gn}from"@vkontakte/videoplayer-statistics/es2018";var qf=(t,e)=>Math.min(+(t+e).toFixed(2),1),Qf=(t,e)=>Math.max(+(t-e).toFixed(2),0),Du=(t,e,i)=>{let o=qf(e,i);e<1&&t.actions.internal.setVolume(o)},Ou=(t,e,i)=>{let o=Qf(e,i);e>0&&t.actions.internal.setVolume(o)};var aa=({isAudioDisabled:t,isAudioAvailable:e,isAds:i,audioDisabledHintCallback:o,audioIsNotExistHintCallback:r})=>t?i?!0:(o==null||o(),!1):e?!0:(r==null||r(),!1);function Bu(){var t,e,i;return(i=(e=(t=document.activeElement)==null?void 0:t.shadowRoot)==null?void 0:e.activeElement)!=null?i:null}var Xy=(t,e)=>{e(t)},Zy=L('<div class="keyboard-controls s-r" tabindex="-1" role="region"><!></div>'),Jy={hash:"s-r",code:".keyboard-controls.s-r{bottom:0;left:0;position:absolute;right:0;top:0}"};function Gf(t,e){var Y,Pe;B(e,!0),G(t,Jy);let[i,o]=Ne(),r=()=>x(Ce,"$disabledControls$",i),a=()=>x(tt,"$isInteractiveTime$",i),l=()=>x(re,"$showInteractiveTimeIndicatorTooltip$",i),d=()=>x(z,"$playbackState$",i),s=()=>x(O,"$isEnded$",i),u=()=>x(Ke,"$doubleForwardAvailable$",i),m=()=>x(pe,"$doubleForwardOn$",i),p=()=>x(qe,"$overlayContainer$",i),v=()=>x(se,"$adPlaybackState",i),_=()=>x(Z,"$positionExact$",i),y=()=>x(oe,"$duration$",i),b=()=>x(xe,"$isAudioAvailable$",i),w=()=>x(J,"$volume$",i),I=()=>x(X,"$canChangePlaybackSpeed$",i),T=()=>x(me,"$muted$",i),N=()=>x(ee,"$currentSubtitle$",i),A=h(e,"nextButtonActive",3,!1),E=h(e,"prevButtonActive",3,!1),P=_e(),Q=Rt(),F=P.getLogger().createComponentLog("KeyboardControls component"),z=P.state.playbackState$,X=P.state.canChangePlaybackSpeed$,se=P.ads.playbackState,Z=P.state.positionExact$,oe=P.state.duration$,J=P.state.volume$,Ce=P.ui.controls.disabledControls$,me=P.state.muted$,ee=P.state.currentSubtitle$,be=P.ui.contextMenu.openedByHotKey$,we=P.ui.contextMenu.lastActiveElem$,ge=P.ui.contextMenu.visible$,pe=P.ui.doubleForwardOn$,Ke=P.ui.doubleForwardAvailable$,U=P.ui.contextMenu.position$,O=P.state.isEnded$,qe=P.ui.overlayContainer$,K=(Y=P.callbacks)==null?void 0:Y.onAudioDoesNotExistHint,ae=(Pe=P.callbacks)==null?void 0:Pe.onAudioDisabledHint,xe=P.state.isAudioAvailable$,Be=P.state.isAudioDisabled,tt=P.state.isInteractiveTime$,{showInteractiveTimeIndicatorTooltip$:re}=vo(),ce=0,Re=!0,Ve=q(void 0),Je=le=>(le!==Re&&(Re=le,ce=0),ce+=1,(Q.controls.seekStepKeyboard+Q.controls.seekStepKeyboard*ce)/1e3),Ee=!0,Te=({type:le,repeat:ye,disableDoubleForward:Le})=>{let nt=()=>{if(!r().has("PLAY_BUTTON"))if(a()&&l()&&re.set(!1),e.fakePlayButtonHandler)e.fakePlayButtonHandler();else{P.actions.internal.togglePlay();let fe="PLAY";d()===Ba.PAUSED?fe="PAUSE":s()&&(fe="REPLAY"),e.showHotKeyHelpers({type:fe})}},Et=le==="down";if(!u()||Le){Et&&nt(),Ee=!0;return}if(Et)Ee=!1;else if(Ee)return;if(Et){!ye&&e.startDoubleForwardActivationTimer();return}m()||nt(),e.stopDoubleForward(),Ee=!0},He=le=>{let ye=R_(p());U.set(ye),we.set(le.target),be.set(!0),ge.set(!0)},Ct=(le,ye=!1)=>{var pi,hi;let Le=le.target,nt=(pi=Le==null?void 0:Le.getAttribute("role"))==null?void 0:pi.includes("menuitem"),Et=Le.classList.contains("btn"),fe=le.code;if(Et&&fe==="Space")return!1;let Oe=Lh.has(fe);if(nt&&Oe)return!1;let ze=!Ah.has(fe);if(le.ctrlKey&&ze||le.altKey&&ze||le.metaKey)return!1;let bt=nt&&fe==="Escape";Mh.has(fe)||bt||e.hideContextMenu();let zt=d()===Ba.PLAYING||d()===Ba.PAUSED,Pt=e.isAds&&(v()==="paused"||v()==="playing"),ui=!Pt&&!r().has("TIMELINE"),di=le.shiftKey&&["Digit1","Numpad1"].includes(fe);if(!di&&!(zt||Pt))return!1;F({message:`key down, code: ${fe}, isExternal = ${ye}`});let Vi=!1,Lt=()=>{Vi=!0,ye||le.preventDefault()};if(di)return He(le),Lt(),!0;switch(fe){case"KeyJ":case"ArrowLeft":{if(!ui)break;if(le.ctrlKey||le.altKey){let ut=P.actions.internal.getPrevEpisode();P.actions.internal.seekToPrevEpisode(ut),ut&&e.showHotKeyHelpers({type:"EPISODE_PREV",text:ut.text}),Lt()}else{let ut=le.shiftKey?Je(!1):Q.controls.seekStepKeyboard/1e3,Gt=Math.max(_()-ut,0);_()>0&&(P.actions.internal.seekTime(Gt,Gn.DOUBLE_TAP),e.showHotKeyHelpers({type:"BACKWARD_SEEK",text:ut.toString()}),Lt())}break}case"KeyL":case"ArrowRight":{if(!ui)break;if(le.ctrlKey||le.altKey){let ut=P.actions.internal.getNextEpisode();P.actions.internal.seekToNextEpisode(ut),ut&&e.showHotKeyHelpers({type:"EPISODE_NEXT",text:ut.text}),Lt()}else{let ut=le.shiftKey?Je(!0):Q.controls.seekStepKeyboard/1e3,Gt=Math.min(_()+ut,y());Math.round(_())<Math.round(y())&&(P.actions.internal.seekTime(Gt,Gn.DOUBLE_TAP),e.showHotKeyHelpers({type:"FORWARD_SEEK",text:ut.toString()}),Lt())}break}case"ArrowUp":{if(aa({isAudioDisabled:Be,audioDisabledHintCallback:ae,isAudioAvailable:b(),audioIsNotExistHintCallback:K,isAds:e.isAds})){let ut=w(),Gt=Q.controls.volumeStepKeyboard,Ri=ut<=1;if(Du(P,ut,Gt),Ri){let bi=Math.round(qf(ut,Gt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:bi}})}}Lt();break}case"ArrowDown":{if(aa({isAudioDisabled:Be,audioDisabledHintCallback:ae,isAudioAvailable:b(),audioIsNotExistHintCallback:K,isAds:e.isAds})){let ut=w(),Gt=Q.controls.volumeStepKeyboard,Ri=ut>=0;if(Ou(P,ut,Gt),Ri){let bi=Math.round(Qf(ut,Gt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:bi}})}}Lt();break}case"Comma":{if(le.shiftKey){if(!m()&&I()){let ut=P.actions.internal.decrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_DOWN",text:ut==null?void 0:ut.displayValue}),Lt()}}else{if(Pt||d()!==Ba.PAUSED)break;let ut=Math.max(_()-Q.controls.seekStepFrame/1e3,0);_()>0&&(e.showHotKeyHelpers({type:"BACKWARD_SEEK"}),P.actions.internal.clearDelayedBufferingCheckTimeout(),P.actions.internal.seekTime(ut,Gn.DOUBLE_TAP),Lt())}break}case"Period":{if(le.shiftKey){if(!m()&&I()){let ut=P.actions.internal.incrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_UP",text:ut==null?void 0:ut.displayValue}),Lt()}}else{if(Pt||d()!==Ba.PAUSED)break;let ut=Math.min(_()+Q.controls.seekStepFrame/1e3,y());_()<y()&&(e.showHotKeyHelpers({type:"FORWARD_SEEK"}),P.actions.internal.clearDelayedBufferingCheckTimeout(),P.actions.internal.seekTime(ut,Gn.DOUBLE_TAP),Lt())}break}case"KeyK":case"Space":Te({type:"down",repeat:le.repeat,disableDoubleForward:"KeyK"===fe}),Lt();break;case"KeyM":{aa({isAudioDisabled:Be,audioDisabledHintCallback:ae,isAudioAvailable:b(),audioIsNotExistHintCallback:K,isAds:e.isAds})&&(e.showHotKeyHelpers({type:T()?"VOLUME":"MUTE"}),P.actions.internal.toggleMuted()),Lt();break}case"KeyF":e.toggleFullscreen(),Lt();break;case"KeyC":P.actions.internal.toggleSubtitle(),N().value!=="off"?e.showHotKeyHelpers({type:"SUBTITLES_ON",text:(hi=N())==null?void 0:hi.displayValue}):e.showHotKeyHelpers({type:"SUBTITLES_OFF"}),Lt();break;case"KeyI":P.actions.internal.togglePictureInPicture(),Lt();break;case"Digit1":case"Numpad1":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.1,Gn.DOUBLE_TAP),Lt();break;case"Digit2":case"Numpad2":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.2,Gn.DOUBLE_TAP),Lt();break;case"Digit3":case"Numpad3":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.3,Gn.DOUBLE_TAP),Lt();break;case"Digit4":case"Numpad4":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.4,Gn.DOUBLE_TAP),Lt();break;case"Digit5":case"Numpad5":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.5,Gn.DOUBLE_TAP),Lt();break;case"Digit6":case"Numpad6":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.6,Gn.DOUBLE_TAP),Lt();break;case"Digit7":case"Numpad7":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.7,Gn.DOUBLE_TAP),Lt();break;case"Digit8":case"Numpad8":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.8,Gn.DOUBLE_TAP),Lt();break;case"Digit9":case"Numpad9":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.9,Gn.DOUBLE_TAP),Lt();break;case"Digit0":case"Numpad0":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(0,Gn.DOUBLE_TAP),Lt();break;case"Slash":{le.shiftKey&&Q.features.hotKeyMapModal&&(e.showKeyMap(),Lt());break}case"KeyN":le.shiftKey&&A()&&(P.actions.internal.nextVideoClick(),Lt());break;case"KeyP":le.shiftKey&&E()&&(P.actions.internal.prevVideoClick(),Lt());break;case"ShiftLeft":case"ShiftRight":Lt();break;case"Tab":case"Escape":case"Enter":break;default:jy(fe);break}return Vi},xt=le=>{let ye=le.code;if(le.ctrlKey||le.altKey||le.metaKey)return;let Le=d()===Ba.PLAYING||d()===Ba.PAUSED,nt=e.isAds&&(v()==="paused"||v()==="playing");if(Le||nt)switch(ye){case"ShiftLeft":case"ShiftRight":ce=0;break;case"Space":Te({type:"up"});break}},At=j("aria_label_video_player"),at=()=>{var le;return(le=n(Ve))==null?void 0:le.focus()},Tt=()=>n(Ve)===Bu(),jt=le=>le.type==="keydown"?Ct(le,!0):(le.type==="keyup"&&xt(le),!1);var It=Zy();It.__keyup=xt,It.__keydown=[Xy,Ct];var Dt=C(It);ti(Dt,()=>{var le;return(le=e.children)!=null?le:ft}),S(It),je(It,le=>R(Ve,le),()=>n(Ve)),D(()=>Me(It,"aria-label",At)),$(t,It);var Ut=H({focus:at,isFocused:Tt,handleExternalKeyboardEvent:jt});return o(),Ut}Qe(["keyup","keydown"]);var e0=L('<div class="container s-s"><div class="dot s-s"></div> <div class="dot s-s"></div> <div class="dot s-s"></div></div>'),t0={hash:"s-s",code:".container.s-s{display:flex;left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%)}.dot.s-s:first-child{animation-delay:0s}.dot.s-s:nth-child(2){animation-delay:.18s}.dot.s-s:nth-child(3){animation-delay:.36s}@keyframes s-s-dot_animation{0%{opacity:.2}30%{opacity:1}to{opacity:.2}}.dot.s-s{animation-duration:.75s;animation-iteration-count:infinite;animation-name:s-s-dot_animation;background:var(--btn-color);border-radius:4px;height:8px;width:8px}.dot.s-s+.dot:where(.s-s){margin-left:4px}"};function Ha(t,e){G(t,t0);let i=h(e,"style",3,"");var o=e0();D(()=>We(o,i())),$(t,o)}var i0=Ie('<path d="M5.26 5.26a.9.9 0 0 1 1.28 0L12 10.73l5.46-5.47a.9.9 0 0 1 1.28 1.28L13.27 12l5.47 5.46a.9.9 0 1 1-1.28 1.28L12 13.27l-5.46 5.47a.9.9 0 1 1-1.28-1.28L10.73 12 5.26 6.54a.9.9 0 0 1 0-1.28Z"></path>');function Yf(t,e){Xe(t,{get fill(){return e.fill},children:(i,o)=>{var r=i0();$(i,r)},$$slots:{default:!0}})}import{noop as Dl}from"@vkontakte/videoplayer-shared/es2018";var o0=t=>{t.stopPropagation()},n0=L("<button><!></button>"),r0={hash:"s-1k",code:"button.btn.s-1k{align-items:center;display:flex;flex-direction:row;height:var(--controls-height);justify-content:center;margin:0;padding:8px;will-change:opacity}button.w-max.s-1k{width:100%}button.btn--live.s-1k{padding:10px 4px}button.btn-jc-l.s-1k{justify-content:left}button.btn-m.s-1k{background-color:rgba(0,0,0,.56);border-radius:12px;height:44px;left:12px;position:absolute;top:50%;transform:translateY(-50%);transition:opacity var(--controls-transition-duration);width:44px}button.btn-m.s-1k,button.btn-m--play.s-1k{align-items:center;display:flex;justify-content:center}button.btn-m--play.s-1k{height:var(--big-play-size);padding:16px;position:relative;width:var(--big-play-size)}button.btn-m--next.s-1k,button.btn-m--prev.s-1k{height:50px;position:absolute;width:50px}button.btn-m--prev.s-1k{right:calc(100% + 35px)}button.btn-m--next.s-1k{left:calc(100% + 35px)}button.btn.s-1k:disabled{cursor:default;pointer-events:none}button.btn.s-1k:not(.btn-full-opacity):disabled{opacity:.4}button.btn.s-1k:not(:disabled):hover{opacity:.8}button.pr-0.s-1k{padding-right:0}button.pl-0.s-1k{padding-left:0}"};function Ft(t,e){B(e,!0),G(t,r0);let i=h(e,"className",3,""),o=h(e,"style",3,""),r=h(e,"disabled",3,void 0),a=h(e,"testId",3,void 0),l=h(e,"ariaHidden",3,void 0),d=h(e,"ariaLabel",3,void 0),s=h(e,"ref",15,void 0),u=h(e,"ariaKeyShortCut",3,void 0),m=h(e,"ariaExpanded",3,void 0),p=h(e,"tabIndex",3,0),v=h(e,"click",3,Dl),_=h(e,"focus",3,Dl),y=h(e,"blur",3,Dl),b=f(()=>v()===Dl?null:A=>{A.stopPropagation(),v()(A)}),w=f(()=>_()===Dl?null:A=>{A.preventDefault(),_()()}),I=f(()=>y()===Dl?null:A=>{A.preventDefault(),y()()});var T=n0();T.__pointerdown=[o0],T.__click=function(...A){var E;(E=n(b))==null||E.apply(this,A)};var N=C(T);ti(N,()=>{var A;return(A=e.children)!=null?A:ft}),S(T),je(T,A=>s(A),()=>s()),D(()=>{var A,E,P,Q,F,z,X,se;ne(T,1,`btn ${(A=i())!=null?A:""}`,"s-1k"),We(T,o()||null),T.disabled=(E=r())!=null?E:null,Me(T,"aria-hidden",(P=l())!=null?P:null),Me(T,"aria-label",(Q=d())!=null?Q:null),Me(T,"aria-keyshortcuts",(F=u())!=null?F:null),Me(T,"aria-expanded",(z=m())!=null?z:null),Me(T,"data-testid",(X=a())!=null?X:null),Me(T,"tabindex",p()),Me(T,"role",e.role),Me(T,"aria-checked",(se=e.areaChecked)!=null?se:null)}),st("focus",T,function(...A){var E;(E=n(w))==null||E.apply(this,A)}),st("blur",T,function(...A){var E;(E=n(I))==null||E.apply(this,A)}),$(t,T),H()}Qe(["pointerdown","click"]);var s0=(t,e)=>{t.key==="Escape"&&e.onClose(),(t.key==="ArrowUp"||t.key==="ArrowDown")&&t.stopPropagation()},a0=L('<div class="modal-header s-18"><h3 class="modal-title s-18"> </h3> <!></div>'),l0=L('<div class="modal-overlay s-18"><div class="modal-container s-18" role="dialog" aria-modal="true"><!> <div class="modal-scroll s-18" tabindex="0" role="scrollbar"><div class="modal-main s-18"><!></div></div></div></div>'),d0={hash:"s-18",code:'.modal-overlay.s-18{align-items:center;background:transparent;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:var(--modal-z-index)}.modal-container.s-18{background:var(--mobile-settings-bg);border-radius:8px;color:var(--white);display:flex;flex-direction:column;height:calc(100% - 24px);max-height:490px;max-width:600px;width:calc(100% - 32px)}.modal-header.s-18{align-items:start;border-bottom:1px solid var(--white-alpha-24);box-sizing:border-box;display:flex;height:40px;justify-content:space-between;padding:8px 10px}.modal-title.s-18{color:var(--white);font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:600;line-height:16px;margin:3px 0 0 6px}.modal-scroll.s-18{height:100%;margin:8px 4px 8px 0;overflow-x:hidden;overflow-y:auto}.modal-scroll.s-18::-webkit-scrollbar{width:8px}.modal-scroll.s-18::-webkit-scrollbar-track{background-color:transparent;border-radius:4px;box-shadow:none;margin-right:2px}.modal-scroll.s-18::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#666;border:1px solid transparent;border-radius:5px;min-height:40px}.modal-scroll.s-18::-webkit-scrollbar-thumb:hover{background-color:#777}.modal-main.s-18{margin:-8px -4px 0 0}'};function jf(t,e){B(e,!0),G(t,d0);let i=h(e,"showHeader",3,!0),o=h(e,"showCloseCross",3,!0),r=q(void 0),a=q(void 0),{webApi:{focusManager:l}}=_e(),d=j("hotkey_map_modal_close_btn_text");Vt(()=>{var b;return(b=n(r))==null||b.focus(),n(a)&&l&&(l.setContainerForFocusLock(n(a)),l.activateLock()),()=>l==null?void 0:l.deactivateLock()});var s=l0();s.__keydown=[s0,e];var u=C(s),m=C(u);{var p=b=>{var w=a0(),I=C(w),T=C(I,!0);S(I);var N=k(I,2);{var A=E=>{Ft(E,{get click(){return e.onClose},testId:"close-modal",style:"padding: 0; height: 24px; width: 24px",get ariaLabel(){return d},children:(P,Q)=>{Yf(P,{fill:"currentColor"})},$$slots:{default:!0}})};V(N,E=>{o()&&E(A)})}S(w),D(()=>ve(T,e.title)),$(b,w)};V(m,b=>{i()&&b(p)})}var v=k(m,2),_=C(v),y=C(_);ti(y,()=>{var b;return(b=e.children)!=null?b:ft}),S(_),S(v),je(v,b=>R(r,b),()=>n(r)),S(u),je(u,b=>R(a,b),()=>n(a)),S(s),$(t,s),H()}Qe(["keydown"]);var c0=new Set(["BR"]),O_=t=>{var r;let e=document.createElement("DIV");e.innerHTML=t;let i=e.querySelectorAll("*"),o=i.length;for(;o--;){let a=i[o],l=a.tagName;c0.has(l)||(r=a.parentElement)==null||r.removeChild(a)}return e.innerHTML};var u0=L('<li class="hot-key-map-item s-l"><span class="hot-key-map-item-description s-l"><!></span> <span class="hot-key-map-item-value s-l"> </span></li>'),p0=L('<div class="hot-key-map-group s-l"><h5 class="hot-key-map-group-title s-l"> </h5> <ul class="hot-key-map-group-items s-l"></ul></div>'),f0=L('<div class="hot-key-map s-l"></div>'),m0={hash:"s-l",code:'.hot-key-map.s-l{box-sizing:border-box;color:var(--black);overflow-x:hidden}.hot-key-map-group.s-l{border-bottom:1px solid var(--white-alpha-24);margin:0 20px 0 16px}.hot-key-map-group.s-l:last-child{border-bottom:none}.hot-key-map-group-title.s-l{color:var(--white);font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:600;line-height:16px}.hot-key-map-group-title.s-l,.hot-key-map-item.s-l{margin:0;padding:12px 0;width:100%}.hot-key-map-group-items.s-l{box-sizing:border-box;list-style:none;margin:0;padding:0}.hot-key-map-item.s-l{align-items:center;box-sizing:border-box;display:flex;justify-content:space-between;--videoplayer-hotkey-item-value-width:156px;--videoplayer-hotkey-item-value-padding-left:24px}.hot-key-map-item-description.s-l{color:var(--white-alpha-72);max-width:388px;width:calc(100% - var(--videoplayer-hotkey-item-value-width) - var(--videoplayer-hotkey-item-value-padding-left))}.hot-key-map-item-value.s-l{color:var(--white);letter-spacing:-.14px;padding-left:var(--videoplayer-hotkey-item-value-padding-left);width:var(--videoplayer-hotkey-item-value-width)}.hot-key-map-item-description.s-l,.hot-key-map-item-value.s-l{font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:400;line-height:16px}'};function Xf(t,e){B(e,!1),G(t,m0);let[i,o]=Ne(),r=()=>x(l,"$data",i),a=_e(),{data:l,show:d}=a.ui.modals.hotKeyMap,s=()=>{d.set(!1)};mo(),jf(t,{get title(){return r().title},onClose:s,children:(u,m)=>{var p=f0();_i(p,5,()=>r().groups,({title:v,items:_})=>v,(v,_)=>{let y=()=>n(_).title,b=()=>n(_).items;var w=p0(),I=C(w),T=C(I,!0);S(I);var N=k(I,2);_i(N,5,b,({description:A,value:E})=>E,(A,E)=>{let P=()=>n(E).description,Q=()=>n(E).value;var F=u0(),z=C(F),X=C(z);$d(X,()=>O_(P())),S(z);var se=k(z,2),Z=C(se,!0);S(se),S(F),D(()=>ve(Z,Q())),$(A,F)}),S(N),S(w),D(()=>ve(T,y())),$(v,w)}),S(p),$(u,p)},$$slots:{default:!0}}),H(),o()}import{noop as ub}from"@vkontakte/videoplayer-shared/es2018";import{ChromecastState as rb,PlaybackState as Bm}from"@vkontakte/videoplayer-core/es2018";import{getVideoQualityLabel as S0}from"@vkontakte/videoplayer-shared/es2018";var v0=L('<div class="pillow s-1y"><!></div>'),g0={hash:"s-1y",code:".pillow.s-1y{background-color:#679ff8;color:var(--white);font-size:6px;font-weight:600;-webkit-font-smoothing:antialiased;border-radius:12px;padding:2px 4px}"};function Zf(t,e){G(t,g0);var i=v0(),o=C(i);ti(o,()=>{var r;return(r=e.children)!=null?r:ft}),S(i),D(()=>Me(i,"data-testid",e.testId)),$(t,i)}import{VideoQuality as zd}from"@vkontakte/videoplayer-shared/es2018";var h0=Ie('<svg><!><path d="M5.52 5c.32 0 .51-.2.51-.54V3.5l.5-.51 1.46 1.74c.16.2.3.28.51.28a.5.5 0 0 0 .5-.5c0-.14-.07-.29-.22-.48L7.3 2.3 8.8.87c.16-.14.2-.25.2-.4A.47.47 0 0 0 8.52 0c-.18 0-.3.07-.45.22l-2 2.03h-.04V.54C6.03.2 5.84 0 5.52 0S5 .2 5 .54v3.92c0 .34.2.54.52.54M2.55 1.05 1.05 3.1h1.5zM3.5 3.1V.83C3.5.03 2.41-.3 1.94.35L.14 2.82A.75.75 0 0 0 .75 4h1.8v.55c0 .25.25.45.5.45a.45.45 0 0 0 .45-.45V4h.05a.45.45 0 0 0 0-.9z"></path></svg>');function Jf(t,e){let i=kn(e,["$$slots","$$events","$$legacy","children"]);var o=h0();Ji(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img",...i}));var r=C(o);ti(r,()=>{var a;return(a=e.children)!=null?a:ft}),li(),S(o),$(t,o)}var _0=Ie('<svg><!><path d="M5.51 5c.33 0 .52-.2.52-.54V3.5l.49-.51L7.99 4.7c.16.21.3.29.51.29a.49.49 0 0 0 .5-.5c0-.14-.07-.29-.22-.48L7.29 2.3 8.82.87C8.95.73 9 .62 9 .47A.47.47 0 0 0 8.52 0c-.17 0-.3.07-.44.22L6.06 2.25h-.03V.54C6.03.2 5.83 0 5.5 0S5 .2 5 .54v3.92c0 .34.19.54.51.54M2 0c-.35 0-.67.06-.95.17a1.5 1.5 0 0 0-.66.49c-.15.2-.23.44-.23.7 0 .43.21.76.62 1-.23.11-.41.26-.55.44-.15.2-.23.44-.23.71 0 .29.08.55.25.78.18.23.41.4.71.52.3.13.65.19 1.04.19s.73-.06 1.03-.19c.3-.12.54-.3.71-.52a1.26 1.26 0 0 0 .03-1.49 1.45 1.45 0 0 0-.55-.44c.4-.23.62-.57.62-1a1.14 1.14 0 0 0-.24-.7 1.44 1.44 0 0 0-.66-.49A2.4 2.4 0 0 0 2 0m-.57.96C1.56.86 1.75.8 2 .8s.43.06.56.16a.51.51 0 0 1 .2.43c0 .2-.06.34-.2.44A.87.87 0 0 1 2 2a.9.9 0 0 1-.57-.16.52.52 0 0 1-.2-.44c0-.18.06-.32.2-.43ZM1.08 3.5a.6.6 0 0 1 .24-.5c.16-.13.38-.2.68-.2s.52.07.68.2a.6.6 0 0 1 .24.5.63.63 0 0 1-.24.52c-.16.12-.38.19-.68.19s-.52-.07-.68-.19a.64.64 0 0 1-.24-.52"></path></svg>');function em(t,e){let i=kn(e,["$$slots","$$events","$$legacy","children"]);var o=_0();Ji(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img",...i}));var r=C(o);ti(r,()=>{var a;return(a=e.children)!=null?a:ft}),li(),S(o),$(t,o)}var b0=Ie('<svg><!><path d="M5.52 5h1.1C8.1 5 9 4.07 9 2.5S8.1 0 6.62 0h-1.1C5.19 0 5 .2 5 .54v3.92c0 .34.2.54.52.54m.51-.85V.85h.47C7.41.85 8 1.47 8 2.5c0 1.07-.58 1.65-1.5 1.65zM.52 5c.32 0 .51-.2.51-.54V2.92h1.94v1.54c0 .34.19.54.51.54S4 4.8 4 4.46V.54C4 .2 3.8 0 3.48 0s-.51.2-.51.54v1.53H1.03V.54C1.03.2.84 0 .52 0S0 .2 0 .54v3.99c0 .34.2.47.52.47"></path></svg>');function tm(t,e){let i=kn(e,["$$slots","$$events","$$legacy","children"]);var o=b0();Ji(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor",role:"img",...i}));var r=C(o);ti(r,()=>{var a;return(a=e.children)!=null?a:ft}),li(),S(o),$(t,o)}var $0=Ie('<svg><!><path d="M9.52 5h1.1C12.1 5 13 4.07 13 2.5S12.1 0 10.62 0h-1.1C9.19 0 9 .2 9 .54v3.92c0 .34.2.54.52.54m.51-.85V.85h.47c.91 0 1.5.62 1.5 1.65 0 1.07-.58 1.65-1.5 1.65zM4.52 5c.32 0 .51-.2.51-.54V2.92h1.94v1.54c0 .34.19.54.51.54S8 4.8 8 4.46V.54C8 .2 7.8 0 7.48 0s-.51.2-.51.54v1.53H5.03V.54C5.03.2 4.84 0 4.52 0S4 .2 4 .54v3.99c0 .34.2.47.52.47m-4 0c.32 0 .51-.2.51-.54V3h1.33c.27 0 .45-.15.45-.41 0-.25-.18-.4-.45-.4H1.03V.84h1.5C2.81.85 3 .7 3 .43S2.8 0 2.53 0H.52C.19 0 0 .2 0 .54v3.92C0 4.8.2 5 .52 5"></path></svg>');function im(t,e){let i=kn(e,["$$slots","$$events","$$legacy","children"]);var o=$0();Ji(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"13",height:"5",fill:"currentColor",role:"img",...i}));var r=C(o);ti(r,()=>{var a;return(a=e.children)!=null?a:ft}),li(),S(o),$(t,o)}var y0=Ie('<svg><!><path d="M11.52 5.75h1.1c1.48 0 2.38-.94 2.38-2.5s-.9-2.5-2.38-2.5h-1.1c-.33 0-.52.2-.52.54V5.2c0 .34.2.54.52.54Zm.51-.85V1.6h.47c.91 0 1.5.62 1.5 1.65 0 1.07-.58 1.65-1.5 1.65zm-5.51.85c.32 0 .51-.2.51-.54V3.67h1.94v1.54c0 .34.19.54.51.54s.52-.2.52-.54V1.3c0-.34-.2-.54-.52-.54s-.51.2-.51.54v1.53H7.03V1.3c0-.34-.19-.54-.51-.54S6 .95 6 1.29v3.99c0 .34.2.47.52.47m-3.18-.09a4 4 0 0 1-.84.09C1.04 5.75 0 4.88 0 3.3 0 1.73 1.04.75 2.5.75S5 1.73 5 3.3c0 .87-.27 1.46-.78 1.88l.2.3a.5.5 0 0 1-.84.55zm-.52-.78-.24-.35a.5.5 0 1 1 .84-.56l.24.37c.18-.26.29-.62.29-1.04 0-1.03-.64-1.65-1.45-1.65s-1.45.62-1.45 1.65.64 1.6 1.45 1.6c.08 0 .2 0 .32-.02"></path></svg>');function om(t,e){let i=kn(e,["$$slots","$$events","$$legacy","children"]);var o=y0();Ji(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"15",height:"7",fill:"currentColor",role:"img",...i}));var r=C(o);ti(r,()=>{var a;return(a=e.children)!=null?a:ft}),li(),S(o),$(t,o)}var Hu=t=>{switch(t){case zd.Q_720P:return tm;case zd.Q_1080P:return im;case zd.Q_1440P:return om;case zd.Q_2160P:return Jf;case zd.Q_4320P:return em}};var x0=Ie('<path d="M12.72 2.21q1.8.07 2.41 1.96l.06.21.06.2.06.23.06.16.04.01.06-.02.14-.05.15-.07c1.42-.66 2.5-.53 3.4.44l.12.14.82 1.02c.73.96.7 2 0 3.1l-.13.19-.12.16-.14.2-.07.12-.04.05v.03l.1.06.13.07.15.09c1.39.7 1.96 1.64 1.74 2.93l-.04.19-.24 1.06c-.16.68-.28 1-.77 1.45-.48.43-1.02.61-1.73.67l-.22.02h-.2l-.25.02-.18.02.02.14v.1l.04.17c.32 1.53-.04 2.56-1.19 3.2l-.17.1-1.17.57q-1.64.73-3.02-.7l-.15-.17-.13-.15-.17-.19-.1-.1-.05-.04-.1.09-.1.1-.12.14c-.95 1.13-1.95 1.54-3.17 1.07l-.18-.08-1.05-.5-.31-.17a2 2 0 0 1-1-1.06 3 3 0 0 1-.16-1.88l.04-.23.04-.24.02-.17-.1-.02-.15-.01h-.18c-1.56-.04-2.48-.62-2.85-1.89l-.05-.18-.3-1.28q-.33-1.77 1.37-2.78l.2-.11.17-.1.22-.12.15-.1v-.02l-.06-.1-.08-.13-.1-.14c-.94-1.25-1.04-2.34-.28-3.4L4 6.32l.82-1.01c.8-.92 1.8-1.1 3.04-.64l.2.08.19.08.22.1.13.04.04-.01.03-.1.05-.13.04-.17c.36-1.43 1.09-2.24 2.4-2.35h1.58Zm-.05 1.8h-1.34l-.14.01c-.28.04-.47.2-.65.83l-.04.16-.06.2a6 6 0 0 1-.46 1.14 6 6 0 0 0-1.15.56 7 7 0 0 1-1.16-.35l-.35-.16q-.37-.15-.59-.17h-.08a.6.6 0 0 0-.4.19l-.08.07-.78.98-.1.12c-.18.26-.2.5.2 1.08l.22.31q.34.48.6 1.1-.2.59-.27 1.2-.51.45-1.01.73l-.34.18c-.62.34-.7.56-.65.88l.01.08.28 1.21.04.16c.1.3.27.47.97.5l.39.02q.57.03 1.22.2.35.53.78.97a6 6 0 0 1-.12 1.45c-.2.95-.01 1.1.38 1.3l1.13.54a1 1 0 0 0 .34.1l.06-.01q.26-.03.67-.49l.26-.3q.4-.42.95-.83l.3.02.3.01h.3l.3-.03q.56.4.95.84l.26.3c.32.36.53.48.73.48h.07l.18-.05.09-.04 1.13-.54.14-.08c.3-.17.42-.4.24-1.22a6 6 0 0 1-.12-1.45q.44-.45.78-.97a7 7 0 0 1 1.22-.2l.39-.01c.81-.04.91-.26 1-.66l.27-1.15c.09-.4.1-.64-.62-1.03l-.34-.18a6 6 0 0 1-1.01-.73 6 6 0 0 0-.27-1.2q.26-.62.6-1.1l.22-.31c.4-.58.38-.81.2-1.08l-.05-.06-.78-.97c-.14-.18-.26-.3-.46-.33h-.07q-.23 0-.67.17l-.35.16a6 6 0 0 1-1.16.35 6 6 0 0 0-1.15-.56 7 7 0 0 1-.45-1.1l-.11-.4c-.2-.68-.4-.81-.72-.83zM12 8.2a3.8 3.8 0 1 1 0 7.6 3.8 3.8 0 0 1 0-7.6m0 1.8a2 2 0 1 0 0 4 2 2 0 0 0 0-4"></path>');function nm(t,e){Xe(t,{get testId(){return e.testId},children:(i,o)=>{var r=x0();$(i,r)},$$slots:{default:!0}})}var w0=Ie('<path d="M13.25 2.83c.23.75.38 1.5 1.63 2.23 1.4.38 2.08 0 2.72-.42.66-.45.86-.32 1.12-.06l.65.64c.29.3.4.42 0 1.18-.38.7-.8 1.33-.42 2.73.72 1.25 1.47 1.47 2.22 1.62.78.16.83.39.83.76v.9c0 .42 0 .59-.83.84-.75.23-1.5.38-2.23 1.63-.38 1.4 0 2.08.42 2.72.45.66.32.86.06 1.12l-.64.65c-.3.29-.42.4-1.18 0-.7-.38-1.34-.8-2.73-.42-1.25.72-1.47 1.47-1.62 2.22-.16.78-.39.83-.76.83h-.9c-.42 0-.59 0-.84-.83-.23-.75-.38-1.5-1.63-2.23-1.4-.38-2.08 0-2.72.42-.66.45-.86.32-1.12.06l-.65-.64c-.29-.3-.4-.42 0-1.18.38-.7.8-1.34.42-2.73-.72-1.25-1.47-1.47-2.22-1.62-.78-.16-.83-.39-.83-.76v-.9c0-.42 0-.59.83-.84.75-.23 1.5-.38 2.22-1.63.38-1.4 0-2.08-.42-2.72-.44-.66-.31-.86-.05-1.12l.64-.65c.3-.29.42-.4 1.18 0 .7.38 1.33.8 2.73.42 1.25-.72 1.47-1.47 1.62-2.22.16-.78.39-.83.76-.83h.9c.42 0 .59 0 .84.83M12 7.25a4.75 4.75 0 1 0 0 9.5 4.75 4.75 0 0 0 0-9.5"></path>');function rm(t,e){Xe(t,{get testId(){return e.testId},children:(i,o)=>{var r=w0();$(i,r)},$$slots:{default:!0}})}var C0=L('<div aria-hidden="true"><!> <!></div>'),T0={hash:"s-1w",code:".icon.s-1w{display:flex;height:24px;position:relative;width:24px}.icon.s-1w .pillow{position:absolute;right:-9px;top:1px}.icon.triple.s-1w .pillow{right:-13px}.icon.s-1w svg[data-testid=settings-icon--labeled] ._full{opacity:0;visibility:hidden}"};function Wd(t,e){B(e,!0),G(t,T0);let i=h(e,"isMobile",3,!1),o=h(e,"currentQuality",3,void 0),r=f(()=>o()?S0(o()):""),a=f(()=>Hu(o())),l=f(()=>n(r).length>2);var d=Ae(),s=ue(d);{var u=p=>{nm(p,{testId:"settings-mobile-icon"})},m=p=>{var v=C0();let _;var y=C(v);{var b=T=>{let N=f(()=>`${n(r)}-pill-icon`);Zf(T,{get testId(){return n(N)},children:(A,E)=>{var P=Ae(),Q=ue(P);Mi(Q,()=>n(a),(F,z)=>{z(F,{})}),$(A,P)},$$slots:{default:!0}})};V(y,T=>{n(a)&&T(b)})}var w=k(y,2);let I=f(()=>n(a)?"settings-icon--labeled":"settings-icon");rm(w,{get testId(){return n(I)}}),S(v),D(T=>_=ne(v,1,"icon s-1w",null,_,T),[()=>({triple:n(l)})]),$(p,v)};V(s,p=>{i()?p(u):p(m,!1)})}$(t,d),H()}var I0=L('<span class="settings-icon-wrapper s-1z"><!></span>'),E0={hash:"s-1z",code:".settings-icon-wrapper.s-1z{position:relative;width:24px}"};function Ol(t,e){B(e,!0),G(t,E0);let[i,o]=Ne(),r=()=>x(u,"$settingsMenuVisible",i),a=()=>x(v,"$isMobile",i),l=()=>x(s,"$currentQuality",i),d=_e(),s=d.state.currentQuality$,u=d.ui.settingsMenu.visible$,m=d.actions.internal.openSettingsMenu,p=d.actions.internal.closeSettingsMenu,v=d.ui.isMobile,_=d.ui.t,y=q(void 0);De(()=>{n(y)&&St(()=>{e.ref$.set(n(y))})});let b=_("aria_label_settings");async function w(T){let N=sa(T);r()?p():m(N,uo)}let I=f(()=>r()?"opened":"");Ft(t,{get className(){return n(I)},testId:"settings-btn",click:w,get ariaLabel(){return b},get ariaExpanded(){return r()},get ref(){return n(y)},set ref(T){R(y,T,!0)},children:(T,N)=>{var A=I0(),E=C(A);Wd(E,{get isMobile(){return a()},get currentQuality(){return l()}}),S(A),$(T,A)},$$slots:{default:!0}}),H(),o()}var P0=Ie('<path d="M6.56 4.44a1.5 1.5 0 1 0-2.12 2.12l3.09 3.09a11 11 0 0 0-2.39 3.08 11 11 0 0 0-1.01 4.14C4 18.43 4 20.37 4 22.83v2.34c0 2.46 0 4.4.13 5.96.13 1.6.4 2.93 1.01 4.14a10.5 10.5 0 0 0 4.6 4.59c1.2.61 2.53.88 4.13 1.01 1.56.13 3.5.13 5.96.13h8.34c2.46 0 4.4 0 5.96-.13 1.44-.12 2.66-.35 3.78-.84l3.53 3.53a1.5 1.5 0 0 0 2.12-2.12zM13.5 28a1.5 1.5 0 0 0 0 3h11a1.5 1.5 0 0 0 0-3zM12 22a1.5 1.5 0 0 1 1.5-1.5h4a1.5 1.5 0 0 1 0 3h-4A1.5 1.5 0 0 1 12 22"></path><path d="M34.5 23.5h-4.64l12.55 12.55q.23-.37.45-.78a11 11 0 0 0 1.01-4.14c.13-1.56.13-3.5.13-5.96v-2.34c0-2.46 0-4.4-.13-5.96a11 11 0 0 0-1.01-4.14 10.5 10.5 0 0 0-4.6-4.59 11 11 0 0 0-4.13-1.01C32.57 7 30.63 7 28.17 7h-8.34c-2.46 0-4.4 0-5.96.13l-.35.03L26.86 20.5h7.64a1.5 1.5 0 0 1 0 3"></path>',1),k0=Ie("<path></path>");function la(t,e){B(e,!0);let i=f(()=>`subtitles-icon${e.type==="off"?"-off":e.type==="outline"?"-outline":""}`),o=f(()=>an(e.size));Xe(t,{get width(){return"48"},get height(){return"48"},get style(){return n(o)},get testId(){return n(i)},get shadow(){return e.shadow},children:(r,a)=>{var l=Ae(),d=ue(l);{var s=m=>{var p=P0();li(),$(m,p)},u=m=>{var p=k0();D(()=>Me(p,"d",`M16.92 8h14.16q2.82-.02 4.66.1c1.28.1 2.4.32 3.46.86a8.8 8.8 90 013.84 3.84c.54 1.04.76 2.18.86 3.46q.12 1.84.1 4.66v6.16q.02 2.82-.1 4.66a10 10 90 01-.86 3.46 8.8 8.8 90 01-3.84 3.84 10 10 90 01-3.46.86q-1.84.12-4.66.1H16.92q-2.82.02-4.66-.1a10 10 90 01-3.46-.86 8.8 8.8 90 01-3.84-3.84 10 10 90 01-.86-3.46Q4 29.9 4 27.08v-6.16q-.02-2.82.1-4.66c.1-1.28.32-2.4.86-3.46A8.8 8.8 90 018.8 8.96a10 10 90 013.46-.86Q14.1 8 16.92 8
|
|
59
59
|
${e.type==="outline"?"M12.54 11.68c-1.04.1-1.64.26-2.1.48a5.2 5.2 90 00-2.28 2.28c-.22.46-.4 1.06-.48 2.1-.08 1.08-.08 2.46-.08 4.46v6c0 2 0 3.38.08 4.46.1 1.04.26 1.64.48 2.1q.78 1.5 2.28 2.28c.46.22 1.06.4 2.1.48 1.08.08 2.48.08 4.46.08h14c2 0 3.38 0 4.46-.08 1.04-.1 1.64-.26 2.1-.48a5.2 5.2 90 002.28-2.28c.22-.46.4-1.06.48-2.1.08-1.08.08-2.48.08-4.46v-6c0-2 0-3.38-.08-4.46a6 6 90 00-.48-2.1 5.2 5.2 90 00-2.28-2.28c-.46-.22-1.06-.4-2.1-.48-1.08-.08-2.48-.08-4.46-.08h-14c-2 0-3.38 0-4.46.08":""}
|
|
60
|
-
M12 29.8c0-1 .8-1.8 1.8-1.8h10.4a1.8 1.8 90 010 3.6H13.8a1.8 1.8 90 01-1.8-1.8m0-7.6c0-1 .8-1.8 1.8-1.8h3.4a1.8 1.8 90 110 3.6H13.8a1.8 1.8 90 01-1.8-1.8m17 7.6c0-1 .8-1.8 1.8-1.8h3.4a1.8 1.8 90 110 3.6h-3.4a1.8 1.8 90 01-1.8-1.8M22 22.2c0-1 .8-1.8 1.8-1.8h10.4a1.8 1.8 90 010 3.6h-10.4a1.8 1.8 90 01-1.8-1.8`)),b(f,p)};R(d,f=>{e.type==="off"?f(s):f(u,!1)})}b(r,l)},$$slots:{default:!0}}),F()}function om(t,e){B(e,!0);let i=g(e,"isSubtitlesEnabled",3,!1),r=ge().ui.t,a=m(()=>i()?r("tooltip_subtitles_on"):r("tooltip_subtitles_off"));Ft(t,{testId:"subtitles-btn",get ariaLabel(){return n(a)},get click(){return e.click},get ariaKeyShortCut(){return fs.KeyC},role:"button",children:(l,d)=>{let s=m(()=>i()?void 0:"outline");la(l,{get size(){return"24"},get type(){return n(s)}})},$$slots:{default:!0}}),F()}var P0=M('<span class="duration s-21" data-testid="video_duration"> </span>'),A0=M('<div><span class="current s-21" data-testid="current_time"> </span> <!></div>'),L0={hash:"s-21",code:'.time.s-21{align-items:center;color:var(--controls-time);display:flex;font-variant-numeric:tabular-nums;font-weight:500;padding:12px 6px}.time.mobile.s-21{padding:0 0 0 8px}.current.s-21{position:relative}.duration.s-21{opacity:.7}.duration.s-21:before{content:" / ";white-space:pre}'};function jd(t,e){B(e,!0),Q(t,L0);let i=g(e,"isMobile",3,!1),o=g(e,"isHidden",3,!1),r=g(e,"showDuration",3,!0),a=g(e,"ref",15),l=kt(),d=de(!1),s=m(()=>rn(e.duration)),u=m(()=>rn(e.position));var f=A0();let p;var v=C(f),$=C(v,!0);S(v);var y=A(v,2);{var h=x=>{var I=P0(),T=C(I,!0);S(I),O(()=>ve(T,n(s))),b(x,I)};R(y,x=>{r()&&x(h)})}S(f),Ls(f,()=>Vl(o()&&l.features.usePerformanceFix,d,l.disableInvisibleComponentsTimeout)),Ze(f,x=>a(x),()=>a()),O(x=>{p=se(f,1,"time s-21",null,p,x),ve($,n(u))},[()=>({mobile:i()})]),b(t,f),F()}import{noop as Uu}from"@vkontakte/videoplayer-shared/es2018";var M0=Te('<path d="M21.8632 10.0832C22.2147 9.73171 22.7852 9.73171 23.1367 10.0832C23.4881 10.4347 23.4881 11.0051 23.1367 11.3566L18.6367 15.8566C18.2852 16.2081 17.7147 16.2081 17.3632 15.8566C17.0117 15.5051 17.0117 14.9347 17.3632 14.5832L21.8632 10.0832Z"></path><path d="M17.3632 11.3566C17.0117 11.0051 17.0117 10.4347 17.3632 10.0832C17.7147 9.73171 18.2852 9.73171 18.6367 10.0832L23.1367 14.5832C23.4881 14.9347 23.4881 15.5051 23.1367 15.8566C22.7852 16.2081 22.2147 16.2081 21.8632 15.8566L17.3632 11.3566Z"></path>',1),V0=Te("<path></path>"),R0=Te('<path d="M14 3.96997C14.5523 3.96997 15 4.41769 15 4.96997V20.97C15 21.5223 14.5523 21.97 14 21.97C13.3585 21.97 12.7422 21.7208 12.2808 21.2751L6.79013 15.97H4C2.89543 15.97 2 15.0745 2 13.97V11.97C2 10.8654 2.89543 9.96997 4 9.96997H6.765L12.2794 4.66337C12.7417 4.21849 13.3584 3.96997 14 3.96997Z"></path><!>',1);function da(t,e){B(e,!0);let i=g(e,"volume",3,1),o=g(e,"muted",3,!1),r=(u,f)=>f?"off":u>.5?"max":u>.2?"mid":u>0?"min":"off",a=m(()=>r(i(),o())),l=m(()=>fn(e.size)),d="M16.8748 8.85259C17.2324 8.50731 17.8021 8.51726 18.1474 8.87481C18.5465 9.28803 18.8614 9.77691 19.0757 10.3128C19.2901 10.8486 19.4 11.4218 19.4 12C19.4 12.5782 19.2901 13.1514 19.0757 13.6872C18.8614 14.2231 18.5465 14.712 18.1474 15.1252C17.8021 15.4827 17.2324 15.4927 16.8748 15.1474C16.5173 14.8021 16.5073 14.2324 16.8526 13.8748C17.0876 13.6314 17.2757 13.3408 17.4045 13.0187C17.5333 12.6966 17.6 12.3504 17.6 12C17.6 11.6496 17.5333 11.3034 17.4045 10.9813C17.2757 10.6592 17.0876 10.3686 16.8526 10.1252C16.5073 9.76764 16.5173 9.19788 16.8748 8.85259Z",s="M19.2636 6.2636C19.6151 5.91213 20.1849 5.91213 20.5364 6.2636C21.2516 6.97878 21.9929 7.99659 22.3989 8.97678C22.7959 9.93525 23.0003 10.9625 23.0003 12C23.0003 13.0374 22.7959 14.0647 22.3989 15.0232C21.9929 16.0034 21.2516 17.0212 20.5364 17.7364C20.1849 18.0879 19.6151 18.0879 19.2636 17.7364C18.9121 17.3849 18.9121 16.8151 19.2636 16.4636C19.8484 15.8788 20.4384 15.0527 20.7359 14.3343C21.0425 13.5943 21.2003 12.801 21.2003 12C21.2003 11.1989 21.0425 10.4057 20.7359 9.66561C20.4384 8.94724 19.8484 8.12124 19.2636 7.5364C18.9121 7.18492 18.9121 6.61508 19.2636 6.2636Z";Je(t,{get style(){return n(l)},get testId(){var u;return`volume-${(u=n(a))!=null?u:""}-icon`},get shadow(){return e.shadow},children:(u,f)=>{var p=R0(),v=A(ce(p));{var $=h=>{var x=M0();ai(),b(h,x)},y=h=>{var x=V0();O(()=>Le(x,"d",`${d}${n(a)==="max"?s:""}`)),b(h,x)};R(v,h=>{n(a)==="off"?h($):h(y,!1)})}b(u,p)},$$slots:{default:!0}}),F()}import{isNonNullable as B_,noop as Qn}from"@vkontakte/videoplayer-shared/es2018";import{noop as rm}from"@vkontakte/videoplayer-shared/es2018";import{noop as D0}from"@vkontakte/videoplayer-shared/es2018";var N0=M('<div class="overlay"><!></div>');function nm(t,e){B(e,!0);let[i,o]=Ve(),r=()=>w(l,"$overlayContainer$",i),l=ge().ui.overlayContainer$,d=W(void 0),s=v=>{!v||!n(d)||!v.contains(n(d))||v.removeChild(n(d))},u=v=>{!v||!n(d)||v.contains(n(d))||v.appendChild(n(d))};Ne(()=>{u(r())}),Et(()=>(u(r()),()=>s(r())));var f=N0(),p=C(f);ei(p,()=>{var v;return(v=e.children)!=null?v:ht}),S(f),Ze(f,v=>D(d,v),()=>n(d)),b(t,f),F(),o()}var O0=M('<div class="tooltip s-1o"><div class="content s-1o"> </div> <div class="tooltip-pointer s-1o"></div></div>'),B0=M("<div><!></div> <!>",1),F0={hash:"s-1o",code:'.tooltip-wrapper.s-1o{display:flex;flex-direction:column;min-width:0}.full-width.s-1o{width:100%}.tooltip.s-1o{bottom:100%;left:0;opacity:0;position:absolute;transition:opacity .2s,visibility .2s;visibility:hidden}.content.s-1o{background-color:rgba(41,41,41,.8);border-radius:3px;color:var(--white);display:inline-block;padding:6px 10px}.tooltip-pointer.s-1o{border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid rgba(41,41,41,.8);bottom:0;content:" ";font-size:0;line-height:0;position:absolute;width:0}'};function Ha(t,e){B(e,!0),Q(t,F0);let[i,o]=Ve(),r=()=>w(j,"$overlayContainer$",i),a=()=>w(z,"$containerSize",i),l=g(e,"isMobile",3,!1),d=g(e,"content",3,""),s=g(e,"active",15,!1),u=g(e,"translateX",3,0),f=g(e,"translateY",3,0),p=g(e,"isFullWidthWrapper",3,!1),v=g(e,"maxTooltipWidth",3,void 0),$=g(e,"placement",3,"top"),y=g(e,"onVisibilityChange",3,D0),h=5,x=W(void 0),I=W(void 0),T,N=W(0),L=W(0),E=W(0),k=W(0),K=kt(),H=ge(),z=H.ui.playerSize,j=H.ui.overlayContainer$;Ne(()=>{St(()=>{y()(s())})});let ae=H.getLogger().createComponentLog("Tooltip component"),X=()=>{if(!r()||!n(I)||!n(x))return;D(L,h);let U=r().getBoundingClientRect(),Pe=n(x).getBoundingClientRect(),ke=Pe.width,He=n(I).clientWidth,tt=a().width,ye=(ke-He)/2,Ie=Pe.left+u()-U.left,Be=Ie+ye,Lt=Pe.top+f()-U.top,mt=He/2-h,Vt=Be<8,dt=Be+He>tt-8;Vt&&(Be=8,mt=Ie+Pe.width/2-2.5*h),dt&&(Be=tt-8-He,mt=Pe.left-U.left+Pe.width/2-Be-h),D(E,Be,!0),D(k,Lt),D(N,mt,!0)},ne=()=>{!r()||!n(I)||!n(x)||D(L,-h)},J=()=>{if(!r()||!n(I)||!n(x))return;D(N,h);let U=r().getBoundingClientRect(),Pe=n(x).getBoundingClientRect(),ke=Pe.height,He=n(I).clientHeight,tt=(ke-He)/2+He,ye=Pe.left+u()-U.left-n(I).clientWidth,Ie=2,Be=ye-h;Be<8&&(Be=8);let mt=Pe.top+f()-U.top+tt,Vt=Ie-tt/2,dt=Ie-h;D(E,Be,!0),D(k,mt),D(L,Vt),D(N,dt)},we=()=>{!r()||!n(I)||!n(x)||D(N,-h)},pe=()=>{switch($()){case"top":X();break;case"bottom":ne();break;case"left":J();break;default:we()}},re=()=>{try{if(!r()||!n(x))return;pe(),s(!0)}catch(U){ae({message:String(U)})}},be=()=>{s(!1)},$e=()=>{n(I)&&(T||(T=window.setTimeout(re,K.controls.hideTimeoutTooltips)),s()&&re())},ee=()=>{be(),window.clearTimeout(T),T=void 0},Re=(U,Pe,ke)=>{let He="";switch($()){case"top":He=`transform: translate(${U}px, ${Pe}px);`;break;case"bottom":He=`transform: translate(${U}px, ${Pe}px); top: auto; bottom: 100%;`;break;case"left":He=`transform: translate(${U}px, ${Pe}px); left: 0; right: auto;`;break;default:He=`transform: translate(${U}px, ${Pe}px);`}return He+=` max-width: ${v()===void 0?"auto":`${v()}px`};`,He+=` opacity: ${ke?1:0}; visibility: ${ke?"visible":"hidden"}`,He},fe=(U,Pe)=>{let ke="";switch($()){case"top":ke=`transform: translate(${U}px, ${Pe}px) rotate(0); top: auto; bottom: 0;`;break;case"bottom":ke=`transform: translate(${U}px, ${Pe}px) rotate(180deg); top: 0; bottom: auto;`;break;case"left":ke=`transform: translate(${U}px, ${Pe}px) rotate(-90deg); left: 100%; top: auto; bottom: 0;`;break;default:ke=`transform: translate(${U}px, ${Pe}px) rotate(90deg); right: 100%; top: auto; bottom: 0;`}return ke},P=m(()=>Re(n(E),n(k),s())),We=m(()=>fe(n(N),n(L)));Et(pe),pn(()=>window.clearTimeout(T));var Se=B0(),Z=ce(Se);let ie;Z.__pointermove=$e,Z.__pointerdown=ee,Z.__pointerup=function(...U){var Pe;(Pe=e.disableMouseupTooltipShow?void 0:$e)==null||Pe.apply(this,U)};var De=C(Z);ei(De,()=>{var U;return(U=e.children)!=null?U:ht}),S(Z),Ze(Z,U=>D(x,U),()=>n(x));var Oe=A(Z,2);{var it=U=>{nm(U,{children:(Pe,ke)=>{var He=O0(),tt=C(He),ye=C(tt,!0);S(tt);var Ie=A(tt,2);S(He),Ze(He,Be=>D(I,Be),()=>n(I)),O(()=>{qe(He,n(P)),ve(ye,d()),qe(Ie,n(We))}),b(Pe,He)},$$slots:{default:!0}})};R(Oe,U=>{d()&&!l()&&U(it)})}O(U=>ie=se(Z,1,"tooltip-wrapper s-1o",null,ie,U),[()=>({"full-width":p()})]),nt("pointerenter",Z,$e),nt("pointerleave",Z,ee),b(t,Se),F(),o()}Ye(["pointermove","pointerdown","pointerup"]);var O_=t=>{t.stopPropagation()},H0=M("<div><!></div>"),U0={hash:"s-1j",code:".btn-container.s-1j{align-items:center;display:flex;height:100%;position:relative;transition:var(--button-hover-transition);will-change:opacity;-webkit-tap-highlight-color:transparent}.w-max.s-1j{min-width:0;width:100%}"};function Fo(t,e){B(e,!0),Q(t,U0);let[i,o]=Ve(),r=()=>w(u,"$isGraphOpened$",i),a=()=>w(s,"$isMobile",i),l=ge(),d=wo(),s=l.ui.isMobile,u=d.graphIsOpened$,f=l.ui.t,p=g(e,"className",3,""),v=g(e,"disabled",3,!1),$=g(e,"hasTooltip",3,!0),y=g(e,"ref",15,void 0),h=g(e,"width",15,void 0),x=g(e,"isFullWidthTooltip",3,!0),I=g(e,"tooltipContent",3,""),T=g(e,"tooltipVisible",3,!1),N=g(e,"tooltipPlacement",3,"top"),L=g(e,"disabledTooltipContent",19,()=>f("tooltip_button_disabled")),E=g(e,"isAriaHidden",3,!1),k=g(e,"onTooltipVisibilityChange",3,rm),K=g(e,"initialTranslateXPx",3,0),H=g(e,"initialTranslateYPx",19,()=>-18),z=g(e,"mouseEnter",3,rm),j=g(e,"mouseLeave",3,rm),ae=m(()=>v()?r()?f("tooltip_disabled_when_graph_on"):L():I()),X=W(!1);Ne(()=>{T()||D(X,!1)});var ne=H0();ne.__pointerdown=[O_],ne.__click=[O_];var J=C(ne);{var we=re=>{Ha(re,{get content(){return n(ae)},get translateX(){return K()},get translateY(){return H()},get isFullWidthWrapper(){return x()},get placement(){return N()},get onVisibilityChange(){return k()},get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get active(){return n(X)},set active(be){D(X,be,!0)},children:(be,$e)=>{var ee=Ae(),Re=ce(ee);ei(Re,()=>{var fe;return(fe=e.children)!=null?fe:ht}),b(be,ee)},$$slots:{default:!0}})},pe=re=>{var be=Ae(),$e=ce(be);ei($e,()=>{var ee;return(ee=e.children)!=null?ee:ht}),b(re,be)};R(J,re=>{$()&&n(ae)&&!a()?re(we):re(pe,!1)})}S(ne),Ze(ne,re=>y(re),()=>y()),O(()=>{var re;se(ne,1,`btn-container ${(re=p())!=null?re:""}`,"s-1j"),Le(ne,"aria-hidden",E()||null)}),nt("mouseenter",ne,function(...re){var be;(be=z())==null||be.apply(this,re)}),nt("mouseleave",ne,function(...re){var be;(be=j())==null||be.apply(this,re)}),In(ne,"clientWidth",h),b(t,ne),F(),o()}Ye(["pointerdown","click"]);var z0=Te('<rect width="20" height="20" rx="10"></rect><path d="m12.53 8.69.06.19-.22-.64a.83.83 0 0 0-1.6.47l.13.48-.23-.85a.82.82 0 0 0-1.6.24l-.73-2.93a.85.85 0 0 0-1.65.4L8 11.34l-1.12-1.16a.8.8 0 0 0-1.21 1.03l2.23 2.94s1.23 1.83 4.3 1.23c2.43-.48 3.25-2.67 2.58-4.88l-.55-2.3a.88.88 0 1 0-1.7.49"></path>',1);function Xd(t,e){let i=m(()=>(e.completed,"interactive-episode-completed-icon"));Je(t,{width:"20",height:"20",fill:"none",get testId(){return n(i)},children:(o,r)=>{var a=z0(),l=ce(a),d=A(l);O(()=>{Le(l,"fill",ia),Le(l,"fill-opacity",e.completed?1:.24),Le(d,"fill",e.completed?"var(--interactive-episode-complete)":"white")}),b(o,a)},$$slots:{default:!0}})}var W0=M("<div><!></div>"),K0={hash:"s-1h",code:".interactive-episode-icon.s-1h{cursor:default;height:20px;position:absolute;transform:translateX(-50%);width:20px}.interactive-episode-icon.disabled.s-1h{opacity:.4;pointer-events:none}"};function sm(t,e){B(e,!0),Q(t,K0);let o=ge().ui.t,r=W(0),a=m(()=>o(e.videoEpisode.completed?"tooltip_episode_finished":"tooltip_episode_unfinished"));Fo(t,{get tooltipContent(){return n(a)},initialTranslateXPx:-10,initialTranslateYPx:-10,get disabled(){return e.disabled},get width(){return n(r)},isAriaHidden:!0,isFullWidthTooltip:!1,children:(l,d)=>{var s=W0();let u;var f=C(s);let p=m(()=>!!e.videoEpisode.completed);Xd(f,{get completed(){return n(p)}}),S(s),O(v=>{u=se(s,1,"interactive-episode-icon s-1h",null,u,v),qe(s,`left: ${e.videoEpisode.from+e.videoEpisode.width/2}%`)},[()=>({disabled:e.disabled})]),In(s,"clientWidth",v=>D(r,v)),b(l,s)},$$slots:{default:!0}}),F()}var q0=M('<div><div class="video-episode-inner s-1g"><div class="video-episode-loaded s-1g"></div> <div></div></div></div>'),Q0=M('<div class="video-episodes-wrap s-1g"></div>'),G0={hash:"s-1g",code:".video-episodes-wrap.s-1g{height:100%;position:absolute;width:100%}.video-episode.s-1g{box-sizing:border-box;height:calc(var(--slider-height)*3);margin-top:calc(var(--slider-height)*-1);padding:var(--slider-height) var(--slider-video-episode-gap);position:absolute;transition:transform .2s}.video-episode.s-1g:first-child{padding-left:0}.video-episode.s-1g:last-child{padding-right:0}.video-episode.s-1g:not(.disabled):where(:hover,:active){transform:scaleY(1.5)}.video-episode-filled.s-1g,.video-episode-inner.s-1g,.video-episode-loaded.s-1g{border-radius:var(--slider-radius);height:var(--slider-height);position:absolute}.video-episode-inner.s-1g{background:var(--slider-bg);overflow:hidden;position:absolute;width:calc(100% - var(--slider-video-episode-gap)*2)}.video-episode.s-1g:first-child .video-episode-inner:where(.s-1g),.video-episode.s-1g:last-child .video-episode-inner:where(.s-1g){width:calc(100% - var(--slider-video-episode-gap))}.video-episode-loaded.s-1g{background:var(--slider-loaded-bg);transition:transform .2s}.video-episode-filled.s-1g,.video-episode-loaded.s-1g{border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.video-episode-filled.s-1g{background-color:var(--slider-filled-bg)}"};function am(t,e){Q(t,G0);let i=g(e,"videoEpisodes",19,()=>[]);var o=Q0();bi(o,21,i,r=>r.from,(r,a)=>{var l=q0();let d;var s=C(l),u=C(s),f=A(u,2);let p;S(s),S(l),O((v,$)=>{d=se(l,1,"video-episode s-1g",null,d,v),qe(l,`left: ${n(a).from}%; width: ${n(a).width}%`),qe(u,`transform: translateX(${n(a).loadedWidth/n(a).width*100}%)`),p=se(f,1,"video-episode-filled s-1g",null,p,$),qe(f,`transform: translateX(${n(a).filledWidth/n(a).width*100}%)`)},[()=>({disabled:e.disabled,mobile:e.isMobile}),()=>({mobile:e.isMobile})]),b(r,l)}),S(o),b(t,o)}function Y0(t,e,i,o,r,a,l){if(t.preventDefault(),e()&&D(i,e().getBoundingClientRect(),!0),o()||n(r)||!e())return;D(r,!0);let d=a(t.clientX,t.clientY);l()(d,t),e().setPointerCapture(t.pointerId)}function j0(t,e,i,o,r,a,l,d){if(t.preventDefault(),e())return;let s=i(t.clientX,t.clientY),u=o(t.clientX);r()(s,u,n(a).width,t),n(l)&&d()(s)}function X0(t,e,i,o,r){if(t.preventDefault(),e()||!n(i))return;D(i,!1);let a=o(t.clientX,t.clientY);r()(a,t)}function Z0(t,e,i,o){t.stopPropagation(),t.preventDefault(),e()&&i()(o(t.clientX,t.clientY))}function J0(t,e,i,o,r,a){let l=e(t.clientX,t.clientY);i()&&o()(l),D(r,!1),a()(l)}var ex=M("<div></div>"),tx=M('<div class="bars s-t"><div class="loaded s-t"></div> <div></div></div>'),ix=M('<!> <div role="slider" tabindex="0"><!> <div><div></div></div></div>',1),ox={hash:"s-t",code:'.interactive-icons.s-t{position:absolute;top:-28px;width:calc(100% - 20px)}.interactive-icons.mobile.s-t{top:-10px}.slider.s-t{border-radius:var(--slider-radius);cursor:pointer;height:var(--slider-height);position:relative;touch-action:none;transition:opacity .2s;width:100%;will-change:opacity,transform;-webkit-tap-highlight-color:transparent}.no-handle.s-t{cursor:default}.slider.s-t:before{content:"";height:calc(var(--controls-height)/2);left:0;position:absolute;right:0;top:calc((var(--controls-height)/2 - var(--slider-height))*-1/2)}.bars.s-t{background:var(--slider-bg);overflow:hidden}.bars.s-t,.loaded.s-t{border-radius:var(--slider-radius);height:100%;position:absolute;width:100%}.loaded.s-t{background:var(--slider-loaded-bg);left:-100%;transition:transform .2s;will-change:transform}.filled.s-t{background-color:var(--slider-filled-bg);border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.slider.square.s-t,.slider.square.s-t .filled:where(.s-t),.slider.square.s-t .loaded:where(.s-t),.slider.square.s-t>.bars:where(.s-t){border-radius:unset}.filled.active-live.s-t{background-color:var(--timeline-slider-filled-active-live-bg)}.filled.ads.s-t{background-color:var(--slider-filled-ads)}.handleWrap.s-t{left:-100%;position:absolute;width:100%}.handle.s-t{background-color:var(--slider-handle-bg);border-radius:50%;height:var(--slider-handle-size);opacity:0;position:absolute;right:calc(var(--slider-handle-size)*-1/2);top:calc((var(--slider-height) - var(--slider-handle-size))/2);transform:scale(0);transition:opacity .2s,transform .2s;visibility:hidden;width:var(--slider-handle-size);will-change:opacity,transform}.handle.active-live.s-t{background-color:var(--timeline-slider-handle-active-live-bg)}.handle-always-visible.s-t .handle:where(.s-t),.slider-dragging.s-t .handle:where(.s-t),.slider.s-t:hover .handle:where(.s-t){opacity:1;transform:scale(1);visibility:visible}.slider-dragging.s-t .handle:where(.s-t){transform:scale(1.3)}.slider-vertical.s-t{left:-8px;position:absolute;top:-18px;transform:rotate(-90deg);transform-origin:0 0}.slider.disabled.s-t{cursor:default;opacity:.4}'};function Ua(t,e){B(e,!0),Q(t,ox);let i=g(e,"ref",15,void 0),o=g(e,"className",3,""),r=g(e,"testId",3,void 0),a=g(e,"isHidden",3,!1),l=g(e,"isVertical",3,!1),d=g(e,"isActiveLive",3,!1),s=g(e,"isMobile",3,!1),u=g(e,"squareBorders",3,!1),f=g(e,"videoEpisodes",19,()=>[]),p=g(e,"withWheelHandler",3,!1),v=g(e,"isInteractive",3,!1),$=g(e,"disabled",3,!1),y=g(e,"hideHandel",3,!1),h=g(e,"onPointerDown",3,Qn),x=g(e,"onHandleMove",3,Qn),I=g(e,"onPointerUp",3,Qn),T=g(e,"onPointerEnter",3,Qn),N=g(e,"onPointerMove",3,Qn),L=g(e,"onPointerLeave",3,Qn),E=g(e,"onMouseEnter",3,Qn),k=g(e,"onMouseLeave",3,Qn),K=g(e,"onWheelUp",3,Qn),H=g(e,"onWheelDown",3,Qn),z=g(e,"onWheelLeft",3,Qn),j=g(e,"onWheelRight",3,Qn),ae=g(e,"onDisabledClick",3,Qn),X=g(e,"loadedProgress",3,0),ne=g(e,"filledProgress",3,0),J=g(e,"handleProgress",3,0),we=g(e,"ariaLabel",3,""),pe=g(e,"ariaValueMin",3,void 0),re=g(e,"ariaValueMax",3,void 0),be=g(e,"ariaValueNow",3,void 0),$e=g(e,"ariaValueText",3,""),ee=g(e,"onContextMenu",3,Qn),Re=g(e,"handleAlwaysVisible",3,!1),fe=kt(),P=W(void 0),We=W(!1),Se=m(()=>{var _e;return(_e=re())!=null?_e:0}),Z=m(()=>{var _e;return B_(f())&&((_e=f()[f().length-1])==null?void 0:_e.time)<n(Se)}),ie=m(()=>B_(f())&&f().length&&n(Z)&&n(Se)?tt(X()*100,ne()*100):[]);function De(_e){if(_e.preventDefault(),i()&&D(P,i().getBoundingClientRect(),!0),$())return;let Me=ke(_e.clientX,_e.clientY),rt=He(_e.clientX);T()(Me,rt,n(P).width)}function Oe(_e){_e.preventDefault(),!$()&&L()()}function it(){E()()}function U(){k()()}function Pe(_e){$()||p()&&(_e.preventDefault(),_e.deltaY<0?K()():_e.deltaY>0?H()():_e.deltaX>0?j()():z()())}function ke(_e,Me){return l()?Math.max(0,Math.min(1,(n(P).height-(Me-n(P).top))/n(P).height)):Math.min(Math.max(_e-n(P).x,0),n(P).width)/n(P).width}function He(_e){return Math.min(Math.max(_e-n(P).x,0),n(P).width)}function tt(_e,Me){let rt=fe.features.episodesClustering&&!v()?fe.episodeMinWidthPc:0,pt=[],ue=f()[0].time/n(Se)*100,ze=0,Qe=0;for(let Ht=1;Ht<f().length;Ht++)ze=f()[Ht].time/n(Se)*100,ze-ue>rt&&(pt.push({from:ue,width:Math.max(0,ze-ue),loadedWidth:Math.max(0,Math.min(ze,_e)-ue),filledWidth:Math.max(0,Math.min(ze,Me)-ue),interactive:f()[Ht-1].interactive,completed:f()[Ht-1].completed}),ue=f()[Ht].time/n(Se)*100,Qe++);let ct={from:ue,width:Math.max(0,100-ue),loadedWidth:Math.max(0,Math.min(_e,100)-ue),filledWidth:Math.max(0,Math.min(Me,100)-ue),interactive:f()[Qe].interactive,completed:f()[Qe].completed};100-ue<rt?(Qe-=1,pt[Qe].width+=100-ue,pt[Qe].loadedWidth+=Math.max(0,Math.min(_e,100)-ue),pt[Qe].filledWidth+=Math.max(0,Math.min(Me,100)-ue)):pt[Qe]=ct;let Nt=f()[0].time;if(Nt!==0){let Ht=Nt/n(Se)*100;pt.unshift({from:0,width:Ht,loadedWidth:Math.min(Ht,_e),filledWidth:Math.min(Ht,Me)})}return pt}function ye(_e){return Math.max(0,Math.min(100,_e*100))}let Ie=m(()=>ye(X())),Be=m(()=>ye(ne()));var Lt=ix(),mt=ce(Lt);{var Vt=_e=>{var Me=ex();let rt;bi(Me,21,()=>n(ie),pt=>pt.from,(pt,ue)=>{var ze=Ae(),Qe=ce(ze);{var ct=Nt=>{sm(Nt,{get videoEpisode(){return n(ue)},get disabled(){return $()}})};R(Qe,Nt=>{n(ue).interactive&&Nt(ct)})}b(pt,ze)}),S(Me),O(pt=>rt=se(Me,1,"interactive-icons s-t",null,rt,pt),[()=>({mobile:s(),hidden:s()&&!n(We)})]),b(_e,Me)};R(mt,_e=>{v()&&_e(Vt)})}var dt=A(mt,2);let xt;dt.__pointerdown=[Y0,i,P,$,We,ke,h],dt.__pointermove=[j0,$,ke,He,N,P,We,x],dt.__pointerup=[X0,$,We,ke,I],dt.__click=[Z0,$,ae,ke],dt.__contextmenu=[J0,ke,$,ae,We,ee];var Qt=C(dt);{var Tt=_e=>{am(_e,{get videoEpisodes(){return n(ie)},get disabled(){return $()},get isMobile(){return s()}})},Mt=_e=>{var Me=tx(),rt=C(Me),pt=A(rt,2);let ue;S(Me),O(ze=>{Le(rt,"data-value",n(Ie)),qe(rt,`transform: translateX(${n(Ie)}%);`),ue=se(pt,1,"filled s-t",null,ue,ze),Le(pt,"data-value",n(Be)),qe(pt,`transform: translateX(${n(Be)}%);`)},[()=>({"active-live":d()})]),b(_e,Me)};R(Qt,_e=>{n(ie).length?_e(Tt):_e(Mt,!1)})}var Rt=A(Qt,2);let G;var Ce=C(Rt);let le;S(Rt),S(dt),Ze(dt,_e=>i(_e),()=>i()),O((_e,Me,rt,pt)=>{var ue,ze;xt=se(dt,1,`slider ${(ue=o())!=null?ue:""}`,"s-t",xt,_e),Le(dt,"aria-label",we()),Le(dt,"aria-valuemin",pe()),Le(dt,"aria-valuemax",re()),Le(dt,"aria-valuenow",be()),Le(dt,"aria-valuetext",$e()),Le(dt,"data-testid",(ze=r())!=null?ze:null),G=se(Rt,1,"handleWrap s-t",null,G,Me),qe(Rt,rt),le=se(Ce,1,"handle s-t",null,le,pt)},[()=>({disabled:$(),"slider-dragging":n(We),hidden:a(),"handle-always-visible":Re(),"slider-vertical":l(),"no-handle":y(),square:u()}),()=>({hidden:y()}),()=>`transform: translateX(${ye(J())}%);`,()=>({"active-live":d()})]),nt("pointerenter",dt,De),nt("pointerleave",dt,Oe),nt("mouseenter",dt,it),nt("mouseleave",dt,U),nt("wheel",dt,Pe),b(t,Lt),F()}Ye(["pointerdown","pointermove","pointerup","click","contextmenu"]);var oo=(t,e)=>Md[t]>=Md[e];var Rs=(t,e)=>Md[t]<=Md[e],F_=t=>t>699?"xl":t>599?"l":t>509?"m":t>320?"s":"xs";var rx=M("<div><!></div>"),sx=M("<div><!> <!></div>"),ax={hash:"s-28",code:".volumeBar-container.s-28{align-items:center;display:flex}.vertical.s-28 .btn,.vertical.s-28 .tooltip-wrapper,.volumeBar-container.vertical.s-28{width:40px}.volumeBar.s-28{align-items:center;display:flex;margin:0 8px;position:relative;width:70px;--slider-height:var(--slider-volume-height);--slider-radius:var(--slider-volume-radius);--slider-handle-size:var(--slider-volume-handle-size);--slider-bg:var(--volume-slider-bg);--slider-filled-bg:var(--volume-slider-filled-bg);--slider-handle-bg:var(--volume-slider-handle-bg)}.volumeBar-slider-vertical{width:50px!important}.volumeBar-vertical.s-28{padding:0 8px 0 0;width:0}"};function lm(t,e){var He,tt;B(e,!0),Q(t,ax);let[i,o]=Ve(),r=()=>w(N,"$isAudioAvailable$",i),a=()=>w(v,"$muted$",i),l=()=>w(p,"$volume$",i),d=()=>w(x,"$currentGridType$",i),s=()=>w(De,"$controlsVisible",i),u=ge(),f=kt(),p=u.state.volume$,v=u.state.muted$,{setVolume:$,startVolumeChanging:y,stopVolumeChanging:h}=u.actions.internal,x=u.ui.currentGridType$,I=(He=u.callbacks)==null?void 0:He.onAudioDoesNotExistHint,T=(tt=u.callbacks)==null?void 0:tt.onAudioDisabledHint,N=u.state.isAudioAvailable$,L=u.state.isAudioDisabled,E=u.ui.t,k=W(!1),K,H=m(()=>e.isAds||r()),z=m(()=>!n(H)||a()||l()===0),j=m(()=>Rs(d(),"l")),ae=m(()=>n(j)?"":n(z)?!r()||L?E("tooltip_sound_unavailable"):E("tooltip_volume"):E("tooltip_volume_muted")),X=m(()=>n(z)?E("tooltip_volume"):E("tooltip_volume_muted")),ne=m(()=>n(z)?0:l()),J=!1,we=m(()=>e.isAds?!1:L?!T:r()?!1:!I);function pe(ye){y(),$(ye)}function re(){Ou(u,l(),f.controls.volumeStepWheel)}function be(){Bu(u,l(),f.controls.volumeStepWheel)}function $e(ye){$(ye)}function ee(ye){$(ye),h()}function Re(){J=!0}function fe(){J=!1,Se()}function P(){clearTimeout(K),D(k,!0)}function We(){Se()}function Se(){K=window.setTimeout(()=>{J||D(k,!1)},f.controls.volumeBarTimeout)}function Z(ye){ye.preventDefault(),ye.deltaY<0?re():ye.deltaY>0&&be()}let ie=W(!1),De=u.ui.controlsVisible;Ne(()=>{s()||D(ie,!1)});var Oe=sx();let it;var U=C(Oe);Ha(U,{get content(){return n(ae)},translateY:-18,get active(){return n(ie)},set active(ye){D(ie,ye,!0)},children:(ye,Ie)=>{let Be=m(()=>n(j)?"btn-volume-vertical":"btn-volume-horizontal");Ft(ye,{className:"btn-full-opacity",get disabled(){return n(we)},get testId(){return n(Be)},get ariaLabel(){return n(X)},get click(){return e.click},get ariaKeyShortCut(){return fs.KeyM},role:"button",children:(Lt,mt)=>{da(Lt,{get size(){return"24"},get volume(){return l()},get muted(){return n(z)}})},$$slots:{default:!0}})},$$slots:{default:!0}});var Pe=A(U,2);{var ke=ye=>{var Ie=rx();let Be;var Lt=C(Ie);let mt=m(()=>n(j)?"volumeBar-slider-vertical":""),Vt=m(()=>n(j)&&!n(k)),dt=m(()=>n(j)?Re:Uu),xt=m(()=>n(j)?fe:Uu),Qt=m(()=>Math.round(n(ne)*100)),Tt=m(()=>`${Math.round(n(ne)*100)}%`),Mt=m(()=>n(j)?"volume-slider-vertical":"volume-slider");Ua(Lt,{get className(){return n(mt)},get isHidden(){return n(Vt)},get isVertical(){return n(j)},withWheelHandler:!0,onWheelUp:re,onWheelDown:be,onPointerDown:pe,onHandleMove:$e,onPointerUp:ee,get onPointerEnter(){return n(dt)},get onPointerLeave(){return n(xt)},ariaLabel:"Ползунок громкости",ariaValueMin:0,ariaValueMax:100,get ariaValueNow(){return n(Qt)},get ariaValueText(){return n(Tt)},get filledProgress(){return n(ne)},get handleProgress(){return n(ne)},get testId(){return n(Mt)}}),S(Ie),O(Rt=>Be=se(Ie,1,"volumeBar s-28",null,Be,Rt),[()=>({"volumeBar-vertical":n(j)})]),b(ye,Ie)};R(Pe,ye=>{n(H)&&ye(ke)})}S(Oe),O(ye=>it=se(Oe,1,"volumeBar-container s-28",null,it,ye),[()=>({vertical:n(j)})]),nt("mouseenter",Oe,function(...ye){var Ie;(Ie=n(j)?P:Uu)==null||Ie.apply(this,ye)}),nt("mouseleave",Oe,function(...ye){var Ie;(Ie=n(j)?We:Uu)==null||Ie.apply(this,ye)}),nt("wheel",Oe,Z),b(t,Oe),F(),o()}import{noop as cx}from"@vkontakte/videoplayer-shared/es2018";var lx=Te('<path d="M4.58 13.98a1 1 0 0 1 .99-1h4.45a1 1 0 0 1 1 1v4.45a.99.99 0 0 1-1.99 0v-2.05L5.71 19.7a1 1 0 1 1-1.41-1.4l3.32-3.32H5.57a1 1 0 0 1-.99-1m10.39-6.36 3.32-3.32a1 1 0 1 1 1.41 1.4l-3.32 3.32h2.05a.99.99 0 0 1 0 1.98H14a1 1 0 0 1-1-1V5.57a.99.99 0 1 1 1.98 0z"></path>'),dx=Te('<path d="M10.5 19a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-4.5a1 1 0 0 1 2 0v2.07l3.36-3.36a1 1 0 0 1 1.42 0l.01.01a1 1 0 0 1 0 1.42L7.43 18H9.5a1 1 0 0 1 1 1M18 7.43l-3.36 3.36a1 1 0 0 1-1.42 0l-.01-.01a1 1 0 0 1 0-1.42L16.57 6H14.5a1 1 0 0 1 0-2H19a1 1 0 0 1 1 1v4.5a1 1 0 0 1-2 0z"></path>');function dm(t,e){let i=g(e,"isFullscreen",8,!1),o=xn(()=>i()?"close-fullscreen-icon":"open-fullscreen-icon");Je(t,{get testId(){return n(o)},children:(r,a)=>{var l=Ae(),d=ce(l);{var s=f=>{var p=lx();b(f,p)},u=f=>{var p=dx();b(f,p)};R(d,f=>{i()?f(s):f(u,!1)})}b(r,l)},$$slots:{default:!0}})}function Zd(t,e){B(e,!0);let i=g(e,"isFullscreen",3,!1),o=g(e,"click",3,cx),r=ge(),a=r.ui.isFullscreenOpenedByKeyboard,l=r.ui.t,d=m(()=>i()?l("tooltip_fullscreen_on"):l("tooltip_fullscreen_off"));Ft(t,{testId:"fullscreen-btn",get ariaLabel(){return n(d)},click:u=>{let f=sa(u);a.set(f),o()()},get ariaKeyShortCut(){return fs.KeyF},role:"button",children:(u,f)=>{dm(u,{get isFullscreen(){return i()}})},$$slots:{default:!0}}),F()}var ux=Te('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M4.26 4.26C3 5.54 3 7.57 3 11.65v.72c0 4.07 0 6.11 1.26 7.38C5.54 21 7.57 21 11.65 21h.72c4.07 0 6.11 0 7.38-1.26C21 18.47 21 16.43 21 12.36v-.72c0-4.07 0-6.11-1.26-7.38C18.47 3 16.43 3 12.36 3h-.72C7.57 3 5.53 3 4.26 4.26M6 8.5c.1 4.68 2.56 7.5 6.61 7.5h.24v-2.68c1.47.15 2.57 1.25 3.02 2.68H18a6 6 0 0 0-3-3.76 5.7 5.7 0 0 0 2.55-3.74h-1.94c-.4 1.49-1.61 2.84-2.77 2.97V8.5h-1.96v5.2c-1.2-.3-2.76-1.76-2.83-5.2z" clip-rule="evenodd"></path></svg>');function cm(t,e){let i=En(e,["$$slots","$$events","$$legacy","children"]);var o=ux();io(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"vk-logo-icon",role:"img",...i}));var r=C(o);ei(r,()=>{var a;return(a=e.children)!=null?a:ht}),ai(),S(o),b(t,o)}var px=Te('<svg><!><svg data-logo="vk_video"><path d="M7 8.6c0-1.96 0-2.94.38-3.69a3.5 3.5 0 0 1 1.53-1.53C9.66 3 10.64 3 12.6 3h1.36c2.46 0 3.7 0 4.64.48a4.4 4.4 0 0 1 1.92 1.92c.48.94.48 2.18.48 4.64v3.92c0 2.46 0 3.7-.48 4.64a4.4 4.4 0 0 1-1.92 1.92c-.94.48-2.18.48-4.64.48H12.6c-1.96 0-2.94 0-3.69-.38a3.5 3.5 0 0 1-1.53-1.53C7 18.34 7 17.36 7 15.4zm9.26 1.74c.9.54 1.36.81 1.51 1.16.13.3.13.65 0 .96-.15.34-.6.61-1.5 1.15l-2.4 1.43c-.93.56-1.4.84-1.8.8-.33-.03-.64-.2-.84-.48-.23-.31-.23-.86-.23-1.96v-2.85c0-1.1 0-1.64.23-1.96q.31-.42.85-.48c.38-.04.86.25 1.8.8zM5 9.04c0-2.46 0-3.7.48-4.64q.37-.71.95-1.25-.58.1-1.03.33A4.4 4.4 0 0 0 3.48 5.4C3 6.34 3 7.58 3 10.04v3.92c0 2.46 0 3.7.48 4.64a4.4 4.4 0 0 0 1.92 1.92q.45.23 1.03.33a4 4 0 0 1-.95-1.25C5 18.66 5 17.42 5 14.96z"></path></svg><svg x="4" y="3" data-logo="play_market"><path d="M0 1.26v15.47q0 .66.34 1L9.52 9 .33.28C.08.53 0 .92 0 1.26"></path><path d="M.33.28.38.23c.34-.3.89-.32 1.49 0l10.75 5.81-2.6 2.48zm10.29 8.75 2.88 2.45-.53.29-.34.18-2.58-2.44-9.71 8.22c.33.34.9.37 1.53.04l11.1-6 .53-.29 2.73-1.47c1.03-.56 1.03-1.47 0-2.02l-2.77-1.5-.84-.45.84.45.1.05z"></path></svg><svg x="3" data-logo="app_store"><path d="M17.62 16.37q-.48 1.09-1.15 2.03-.9 1.27-1.48 1.75-.88.8-1.9.83-.72 0-1.76-.42a5 5 0 0 0-1.89-.4q-.9 0-1.94.4a5 5 0 0 1-1.68.44q-.98.04-1.95-.85-.62-.53-1.55-1.82a13 13 0 0 1-1.63-3.2 12 12 0 0 1-.69-3.8q0-2.1.93-3.64A5.4 5.4 0 0 1 5.5 5.03q.77 0 2.03.46t1.62.47q.26 0 1.79-.55a6 6 0 0 1 2.43-.42 5.2 5.2 0 0 1 4.05 2.09q-2.4 1.44-2.4 4.02a4.4 4.4 0 0 0 1.49 3.34q.66.61 1.48.95-.18.5-.38.98M13.5.42q0 1.58-1.17 2.94c-.94 1.08-2.07 1.7-3.3 1.6L9 4.56c0-1 .45-2.08 1.24-2.96q.6-.67 1.5-1.12.93-.44 1.74-.48z"></path></svg><path d="M32.55 17.04h2.5L38.7 7h-1.8l-2.94 8.28h-.28L30.84 7H29zm15.52 0-4.61-5.2L47.72 7H45.6l-3.56 4.09h-.42V7h-1.7v10.04h1.7v-4.3h.43l3.76 4.3z"></path><path d="M57.89 11.89a2.2 2.2 0 0 0 1.44-2.16C59.33 8.14 58 7 56.06 7h-3.92v10.04h4.2c1.96 0 3.29-1.14 3.29-2.8 0-1.17-.66-2.04-1.74-2.35m-4.04-3.4h2.21c.92 0 1.54.56 1.54 1.39 0 .8-.62 1.36-1.54 1.36h-2.2zm2.5 7.06h-2.5v-2.81h2.5c.9 0 1.52.57 1.52 1.4 0 .84-.62 1.4-1.52 1.4m4.84 1.5h2.32l2.77-5.5h.22v5.5h1.57v-7.4h-2.32l-2.77 5.5h-.22v-5.5h-1.57zm7.96 2.21h1.64v-2.2h5.33v2.2h1.64v-3.7h-1.29V9.64h-5.43l-.37 3.78c-.13 1.34-.53 2.13-1.34 2.13h-.18zm2.49-3.7c.4-.39.57-1.04.68-2.15l.23-2.27h2.28v4.42zm14.38-2.3a3.7 3.7 0 0 0-3.84-3.76 3.7 3.7 0 0 0-3.85 3.85 3.7 3.7 0 0 0 3.85 3.84c1.54 0 2.99-.72 3.55-2.13l-1.54-.26c-.36.53-1.04.9-1.91.9-1.26 0-2.09-.77-2.24-1.91H86zm-3.84-2.33c1.02 0 1.8.65 2.06 1.58h-4.1a2.1 2.1 0 0 1 2.04-1.58m8.66 6.26c2.32 0 3.96-1.6 3.96-3.84 0-2.25-1.64-3.85-3.96-3.85s-3.97 1.6-3.97 3.85 1.64 3.84 3.97 3.84m0-1.5c-1.34 0-2.25-.95-2.25-2.34 0-1.4.9-2.35 2.25-2.35 1.34 0 2.25.95 2.25 2.35s-.91 2.35-2.25 2.35" class="_ru"></path><path d="M35.02 17.36h-2.48L29 7.42h1.83l2.83 8.2h.28l2.93-8.2h1.8zm8.41-5.15 4.6 5.15h-2.24l-3.75-4.26h-.43v4.26h-1.7V7.42h1.7v4.05h.41l3.55-4.05h2.1zm13.37 5.15h-2.48L50.8 7.42h1.83l2.82 8.2h.29l2.92-8.2h1.8zm6.46 0h-1.64v-7.33h1.64zm-.81-8.37q-.45 0-.74-.27a1 1 0 0 1-.28-.72q0-.44.28-.72.3-.28.74-.28t.72.28q.3.29.29.72 0 .44-.29.72t-.72.27m5.93 8.51q-1.03 0-1.86-.48a3.5 3.5 0 0 1-1.29-1.35 4 4 0 0 1-.45-1.98q0-1.1.45-1.95.46-.88 1.3-1.36.81-.5 1.85-.5.9 0 1.6.38.68.35 1.13.88V7.42h1.63v9.94h-1.22l-.34-1.18q-.46.54-1.17.94a3.4 3.4 0 0 1-1.63.38m.4-1.45q1.04 0 1.68-.65.65-.66.65-1.7t-.65-1.7a2.2 2.2 0 0 0-1.68-.66 2.2 2.2 0 0 0-1.66.66q-.64.66-.64 1.7t.64 1.7q.64.65 1.66.65m13.15-2.44-.03.52h-5.94q.12.86.71 1.38.6.51 1.52.51.63 0 1.13-.24.51-.24.78-.65l1.53.26q-.39 1.01-1.38 1.56-.96.55-2.16.55-1.1 0-1.98-.48a3.6 3.6 0 0 1-1.85-3.33q0-1.1.48-1.95.5-.88 1.37-1.36a4 4 0 0 1 1.98-.5q1.11 0 1.98.5.88.48 1.36 1.34.5.86.5 1.89m-3.84-2.31q-.73 0-1.29.42-.53.42-.74 1.14h4.1a2.2 2.2 0 0 0-2.07-1.56m8.66 6.2q-1.14 0-2.04-.48a3.7 3.7 0 0 1-1.4-1.35 4 4 0 0 1-.5-1.98q0-1.1.5-1.95.5-.88 1.4-1.36.9-.5 2.04-.5t2.03.5q.91.48 1.4 1.36.52.86.52 1.95 0 1.11-.51 1.98-.5.86-1.4 1.35-.9.48-2.04.48m0-1.48q.99 0 1.62-.63.63-.66.63-1.7t-.63-1.67a2.2 2.2 0 0 0-1.62-.65q-.99 0-1.62.65-.62.63-.62 1.67 0 1.05.62 1.7.63.63 1.62.63" class="_en"></path></svg>');function um(t,e){let i=En(e,["$$slots","$$events","$$legacy","children"]);var o=px();io(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"95",height:"24",fill:"var(--btn-color, #fff)","fill-rule":"evenodd","aria-hidden":"true","clip-rule":"evenodd",viewBox:"0 0 95 24",role:"img",...i}));var r=C(o);ei(r,()=>{var a;return(a=e.children)!=null?a:ht}),ai(6),S(o),b(t,o)}var fx={hash:"s-2a",code:"svg [data-logo],svg[data-testid=vk-video-logo-icon--en] ._ru,svg[data-testid=vk-video-logo-icon--short] ._en,svg[data-testid=vk-video-logo-icon--short] ._ru,svg[data-testid=vk-video-logo-icon] ._en{opacity:0;visibility:hidden}svg[data-logo=app_store] [data-logo=app_store],svg[data-logo=play_market] [data-logo=play_market],svg[data-logo=vk_video] [data-logo=vk_video]{opacity:1;visibility:visible}"};function pm(t,e){B(e,!0),Q(t,fx);let i=g(e,"short",3,!1),o=g(e,"isCyrillic",3,!0),r=g(e,"logo",19,()=>"vk_video"),a="vk-video-logo-icon--short",l=24,d=m(()=>!o()&&!i()?91:i()?l:95),s=m(()=>!o()&&!i()?"vk-video-logo-icon--en":i()?a:"vk-video-logo-icon"),u=m(()=>`0 0 ${n(d)} 24`);um(t,{get width(){return n(d)},height:"24",get viewBox(){return n(u)},get"data-testid"(){return n(s)},get"data-logo"(){return r()}}),F()}function Jd(t,e){B(e,!0);let[i,o]=Ve(),r=()=>w($,"$isMobile",i),a=()=>w(v,"$currentGridType$",i),l=()=>w(h,"$isCyrillicRelatedInterface$",i),d=g(e,"ref",15,void 0),s=g(e,"logoClickable",3,!1),u=g(e,"targetUrl",3,""),f=kt(),p=ge(),v=p.ui.currentGridType$,$=p.ui.isMobile,y=p.ui.t,h=p.isCyrillicRelatedInterface$,x=m(()=>f.logoType!=="vk"),I=m(()=>n(x)?y("tooltip_vk_video_logo"):y("tooltip_vk_logo")),T=m(()=>(r()&&Rs(a(),"m")||Rs(a(),"l"))&&n(x)),N=()=>{var k,K;e.click(),(k=p.callbacks)!=null&&k.onLogoClicked?(K=p.callbacks)==null||K.onLogoClicked():u()&&window.open(u(),"_blank")},L=m(()=>!s()),E=m(()=>n(x)?"btn-vk-video-logo":"btn-vk-logo");Ft(t,{className:"btn-full-opacity",get disabled(){return n(L)},click:N,get testId(){return n(E)},get ariaLabel(){return n(I)},get ref(){return d()},set ref(k){d(k)},children:(k,K)=>{var H=Ae(),z=ce(H);{var j=X=>{pm(X,{get logo(){return f.logoType},get short(){return n(T)},get isCyrillic(){return l()}})},ae=X=>{cm(X,{})};R(z,X=>{n(x)?X(j):X(ae,!1)})}b(k,H)},$$slots:{default:!0}}),F(),o()}import{ChromecastState as hx}from"@vkontakte/videoplayer-core/es2018";import{ChromecastState as U_}from"@vkontakte/videoplayer-core/es2018";var mx=Te('<path d="M3.6 13.3a5.1 5.1 0 0 1 5.05 5.83.9.9 0 0 1-1.78-.26 3.3 3.3 0 0 0-3.74-3.74.9.9 0 0 1-.26-1.78c.24-.03.49-.05.73-.05Z" class="s-y"></path><path d="M3.6 9.7a8.7 8.7 0 0 1 8.68 9.37.9.9 0 0 1-1.8-.14c.02-.17.02-.35.02-.53a6.9 6.9 0 0 0-7.43-6.88.9.9 0 0 1-.14-1.8l.67-.02ZM3.6 16.9a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Z" class="s-y"></path><path d="M16.24 4.1c.8 0 1.47 0 2 .04a4 4 0 0 1 1.53.38 3.9 3.9 0 0 1 1.7 1.71 4 4 0 0 1 .39 1.53c.04.53.04 1.2.04 2v4.48c0 .8 0 1.47-.04 2a4 4 0 0 1-.38 1.53 3.9 3.9 0 0 1-1.7 1.7 4 4 0 0 1-1.54.39c-.53.04-1.2.04-2 .04H15a.9.9 0 0 1 0-1.8h1.2c.85 0 1.44 0 1.9-.04.44-.03.68-.1.85-.19.4-.2.72-.52.92-.92.09-.17.16-.4.2-.85.03-.46.03-1.05.03-1.9V9.8c0-.85 0-1.44-.04-1.9-.03-.44-.1-.68-.19-.85a2.1 2.1 0 0 0-.92-.92 2.25 2.25 0 0 0-.85-.2 25.9 25.9 0 0 0-1.9-.03H5.83a2.1 2.1 0 0 0-1.81 1.4.9.9 0 1 1-1.7-.6A3.9 3.9 0 0 1 6 4.1h10.24Z" class="s-y"></path>',1),vx=Te('<path d="M3.60219 13.2993C6.41858 13.2995 8.70256 15.5835 8.70278 18.3999C8.70277 18.6469 8.68424 18.8909 8.65004 19.1294C8.57937 19.6212 8.12333 19.9625 7.63149 19.8921C7.13968 19.8213 6.79823 19.3654 6.86879 18.8735C6.89087 18.7195 6.90199 18.5611 6.902 18.3999C6.90178 16.5776 5.42447 15.1003 3.60219 15.1001C3.441 15.1001 3.28267 15.1112 3.12856 15.1333C2.63666 15.2039 2.18077 14.8624 2.11 14.3706C2.03966 13.8788 2.38091 13.4227 2.8727 13.3521C3.11125 13.3178 3.35516 13.2993 3.60219 13.2993Z"></path><path d="M3.60219 9.69971C8.40682 9.69977 12.3021 13.5953 12.3024 18.3999C12.3024 18.6248 12.2938 18.8489 12.277 19.0698C12.239 19.5651 11.8065 19.9365 11.3112 19.8989C10.8157 19.8611 10.4445 19.4286 10.4821 18.9331C10.4954 18.7576 10.5026 18.5791 10.5026 18.3999C10.5023 14.5894 7.41271 11.5005 3.60219 11.5005C3.42268 11.5005 3.24474 11.5066 3.06899 11.52C2.57352 11.5578 2.14115 11.1863 2.10317 10.6909C2.06587 10.1957 2.43694 9.76287 2.93227 9.7251C3.15348 9.70823 3.37699 9.69971 3.60219 9.69971Z"></path><path d="M3.60219 16.8999C4.43047 16.8999 5.10198 17.5717 5.10219 18.3999C5.10209 19.2282 4.43054 19.8999 3.60219 19.8999C2.77383 19.8999 2.10229 19.2282 2.10219 18.3999C2.10241 17.5717 2.7739 16.8999 3.60219 16.8999Z"></path><path d="M16.2379 4.1001C17.0459 4.10009 17.7067 4.10017 18.2438 4.14404C18.7997 4.18946 19.3022 4.28599 19.7711 4.5249C20.5049 4.89882 21.1014 5.49623 21.4752 6.22998C21.714 6.69873 21.8107 7.20063 21.8561 7.75635C21.9 8.29338 21.9001 8.95424 21.9 9.76221V14.2378C21.9001 15.0458 21.9 15.7066 21.8561 16.2437C21.8107 16.7996 21.7141 17.3021 21.4752 17.771C21.1014 18.5046 20.5048 19.1012 19.7711 19.4751C19.3022 19.714 18.7997 19.8105 18.2438 19.856C17.7067 19.8998 17.0459 19.8999 16.2379 19.8999H14.9997C14.503 19.8996 14.1005 19.4972 14.1002 19.0005C14.1002 18.5036 14.5028 18.1004 14.9997 18.1001H16.1998C17.0548 18.1001 17.6422 18.0992 18.0973 18.062C18.5419 18.0257 18.7809 17.9596 18.9538 17.8716C19.3489 17.6702 19.6704 17.3487 19.8717 16.9536C19.9598 16.7808 20.0258 16.5417 20.0622 16.0972C20.0993 15.6421 20.1002 15.0546 20.1002 14.1997V9.80029C20.1002 8.94536 20.0993 8.35794 20.0622 7.90283C20.0258 7.45834 19.9598 7.21921 19.8717 7.04639C19.6704 6.6514 19.3487 6.33073 18.9538 6.12939C18.7809 6.04133 18.5419 5.97431 18.0973 5.93799C17.6422 5.9008 17.0548 5.8999 16.1998 5.8999H6.00063L5.83071 5.90674C4.99191 5.97398 4.28981 6.53462 4.01918 7.30029C3.85342 7.76872 3.33928 8.01472 2.87075 7.84912C2.40214 7.68346 2.15628 7.16833 2.32192 6.69971C2.85696 5.18632 4.30125 4.1001 6.00063 4.1001H16.2379Z"></path><path d="M2.95114 7.11345C2.42394 7.1914 1.90399 6.78569 2.00995 6.2634C2.05777 6.0277 2.12517 5.82449 2.22018 5.63803C2.5078 5.07354 2.96674 4.6146 3.53123 4.32698C4.17296 4 5.01304 4 6.6932 4H17.2001C18.8803 4 19.7204 4 20.3621 4.32698C20.9266 4.6146 21.3855 5.07354 21.6731 5.63803C22.0001 6.27976 22.0001 7.11984 22.0001 8.8V15.2C22.0001 16.8802 22.0001 17.7202 21.6731 18.362C21.3855 18.9265 20.9266 19.3854 20.3621 19.673C19.7204 20 18.8803 20 17.2001 20H15.7196C15.2009 20 14.8203 19.5134 14.8938 19C14.9638 18.5101 15.0001 18.0093 15.0001 17.5C15.0001 11.701 10.2991 7 4.5001 7C3.97384 7 3.45662 7.03872 2.95114 7.11345Z"></path>',1),gx={hash:"s-y",code:".animated.s-y{animation-duration:1s;animation-iteration-count:infinite}.wave1.animated.s-y{animation-name:s-y-wave1}.wave2.animated.s-y{animation-name:s-y-wave2}.wave3.animated.s-y{animation-name:s-y-wave3}@keyframes s-y-wave1{0%{opacity:.3}33%{opacity:1}66%{opacity:1}to{opacity:1}}@keyframes s-y-wave2{0%{opacity:.3}33%{opacity:.3}66%{opacity:1}to{opacity:1}}@keyframes s-y-wave3{0%{opacity:.3}33%{opacity:.3}66%{opacity:.3}to{opacity:1}}"};function ec(t,e){B(e,!0),Q(t,gx);let i=g(e,"isMobile",3,!1),o=m(()=>e.iconState===U_.CONNECTED),r=m(()=>e.iconState===U_.CONNECTING),a=m(()=>n(o)?"#2688EB":ia),l=m(()=>e.size?fn(e.size):void 0);var d=Ae(),s=ce(d);{var u=p=>{Je(p,{get fill(){return n(a)},get style(){return n(l)},testId:"chromecast-mobile-icon",children:(v,$)=>{var y=mx();ai(2),b(v,y)},$$slots:{default:!0}})},f=p=>{Je(p,{get style(){return n(l)},testId:"chromecast-icon",children:(v,$)=>{var y=vx(),h=ce(y);let x;var I=A(h);let T;var N=A(I);let L;var E=A(N);let k;var K=A(E);let H;O((z,j,ae,X,ne)=>{x=se(h,0,"wave2 s-y",null,x,z),T=se(I,0,"wave3 s-y",null,T,j),L=se(N,0,"wave1 s-y",null,L,ae),k=se(E,0,"s-y",null,k,X),H=se(K,0,"s-y",null,H,ne)},[()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({hidden:n(o)}),()=>({hidden:!n(o)})]),b(v,y)},$$slots:{default:!0}})};R(s,p=>{i()?p(u):p(f,!1)})}b(t,d),F()}import{noop as _x}from"@vkontakte/videoplayer-shared/es2018";function tc(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"isMobile",3,!1),r=g(e,"click",3,_x),l=ge().ui.t,d=m(()=>e.state===hx.CONNECTED?l("tooltip_chromecast_on"):l("tooltip_chromecast_off"));Ft(t,{get ariaLabel(){return n(d)},get click(){return r()},testId:"btn-chromecast",get ref(){return i()},set ref(s){i(s)},children:(s,u)=>{ec(s,{get isMobile(){return o()},get iconState(){return e.state}})},$$slots:{default:!0}}),F()}import{noop as $x}from"@vkontakte/videoplayer-shared/es2018";var bx=Te('<path d="m21.62 16.5-.02.07q-.22 1.27-.42 2.09a5 5 0 0 1-.64 1.5 4.4 4.4 0 0 1-2.51 1.73q-.77.18-1.63.07t-2.11-.34l-4.34-.8q-1.27-.22-2.1-.42a5 5 0 0 1-1.5-.65 4.4 4.4 0 0 1-1.72-2.5 5 5 0 0 1-.07-1.63q.1-.84.34-2.11l.01-.07q.22-1.27.43-2.1a5 5 0 0 1 .64-1.5 4.4 4.4 0 0 1 2.5-1.73 5 5 0 0 1 1.64-.07q.83.1 2.1.35l4.34.8q1.28.21 2.1.42a5 5 0 0 1 1.5.64 4.4 4.4 0 0 1 1.73 2.5q.18.78.07 1.64-.1.83-.34 2.1m-1.45-2.3c.05-.49.03-.77-.02-1a2.6 2.6 0 0 0-1.02-1.48 3 3 0 0 0-.93-.37c-.48-.13-1.1-.24-2-.4l-4.26-.79c-.9-.16-1.52-.27-2.01-.33a3 3 0 0 0-1 .03 2.6 2.6 0 0 0-1.48 1.02 3 3 0 0 0-.37.92c-.13.48-.24 1.1-.4 2s-.28 1.51-.33 2c-.06.5-.04.78.02 1 .15.6.51 1.13 1.02 1.48.19.13.45.25.92.37.48.13 1.1.25 2 .4l4.27.79c.9.16 1.52.28 2.01.33s.77.03 1-.02a2.6 2.6 0 0 0 1.47-1.03c.14-.19.25-.45.38-.92.12-.48.24-1.1.4-2s.28-1.51.33-2"></path><path d="M18.19 7.49a.9.9 0 0 1-1.05-.73c-.14-.8-.2-1.08-.28-1.3A2.6 2.6 0 0 0 14.5 3.8c-.22 0-.5.04-1.31.17l-5.85.96a8 8 0 0 0-2.17.5 2.6 2.6 0 0 0-1.33 1.75c-.08.38-.04.85.11 2.23l.01.1a.9.9 0 1 1-1.78.2l-.01-.1-.02-.17a9 9 0 0 1-.07-2.64 4.4 4.4 0 0 1 2.25-2.97c.63-.33 1.42-.46 2.56-.65l.16-.03 5.85-.96.1-.01c.67-.11 1.13-.19 1.55-.18a4.4 4.4 0 0 1 4 2.82c.14.39.23.85.35 1.53l.01.1a.9.9 0 0 1-.72 1.04"></path><path d="M12.72 12.41a.42.42 0 0 0-.69.23l-.72 4.18a.4.4 0 0 0 .03.23c.08.2.33.3.54.22l3.67-1.47a.4.4 0 0 0 .12-.68z"></path>',1);function fm(t){Je(t,{testId:"episodes-icon",children:(e,i)=>{var o=bx();ai(2),b(e,o)},$$slots:{default:!0}})}var zu=(t,e,i)=>i.filter(o=>o.time<=t*e).pop();var yx=M('<span class="text mobile s-23"> </span> <div class="chevron-episodes s-23" data-testid="btn-episodes_icon"><!></div>',1),xx=M('<span class="text s-23"> </span>'),wx=M('<span class="text count s-23"> </span>'),Sx=M('<span class="icon s-23"><!></span> <!>',1),Cx={hash:"s-23",code:".icon.s-23{flex-shrink:0}.text.s-23{overflow:hidden;padding:0 8px;text-overflow:ellipsis;white-space:nowrap}.text.count.s-23{overflow:visible}.text.mobile.s-23{padding:0 3px 0 4px}.chevron-episodes.s-23{margin-bottom:-6px;opacity:.7;transform:scale(.8)}"};function ic(t,e){var J,we,pe;B(e,!0),Q(t,Cx);let[i,o]=Ve(),r=()=>w(y,"$currentGridType$",i),a=()=>w(h,"$openedByKeyboard$",i),l=()=>w(x,"$panelOpened$",i),d=()=>w(I,"$isMobile",i),s=g(e,"position",3,0),u=g(e,"duration",3,0),f=g(e,"timeCodes",19,()=>[]),p=ge(),v=(we=(J=p.callbacks)==null?void 0:J.onEpisodeChanged)!=null?we:$x,$=!!((pe=p.callbacks)!=null&&pe.onEpisodeClicked),y=p.ui.currentGridType$,h=p.ui.episodes.openedByKeyboard$,x=p.ui.episodes.panelOpened$,I=p.ui.isMobile,T=p.ui.t,N=W(void 0),L=re=>{var $e,ee,Re;if(!!(($e=p.callbacks)!=null&&$e.onEpisodeClicked)){let fe=sa(re);h.set(fe),x.set(!0),(Re=(ee=p.callbacks)==null?void 0:ee.onEpisodeClicked)==null||Re.call(ee,fe)}},E=W(null),k=m(()=>s()/u());Ne(()=>{var be;let re=zu(n(k),u(),f());re?((be=n(E))==null?void 0:be.time)!==re.time&&(v(re),D(E,re,!0)):D(E,null)});let K=m(()=>{var re;return((re=n(E))==null?void 0:re.text)||""}),H=m(()=>oo(r(),"xl")?"FULL":oo(r(),"m")?"COUNT":"SHORT"),z=m(()=>`${T("tooltip_episodes")}: ${n(K)}`),j=async(re,be,$e)=>{await vo(),(re==null?void 0:re.getAttribute("aria-expanded"))==="false"&&be&&!$e&&St(()=>{h.set(!1),re.focus()})};Ne(()=>{j(n(N),a(),l())});var ae=Ae(),X=ce(ae);{var ne=re=>{let be=m(()=>d()?"px-0":""),$e=m(()=>!$);Ft(re,{get className(){var ee;return`w-max btn-full-opacity btn-jc-l ${(ee=n(be))!=null?ee:""}`},testId:"btn-episodes",click:L,get disabled(){return n($e)},get ariaExpanded(){return l()},get ariaLabel(){return n(z)},get ref(){return n(N)},set ref(ee){D(N,ee,!0)},children:(ee,Re)=>{var fe=Ae(),P=ce(fe);{var We=Z=>{var ie=yx(),De=ce(ie),Oe=C(De,!0);S(De);var it=A(De,2),U=C(it);Nr(U,{direction:"right"}),S(it),O(()=>ve(Oe,n(K))),b(Z,ie)},Se=Z=>{var ie=Sx(),De=ce(ie),Oe=C(De);fm(Oe,{}),S(De);var it=A(De,2);{var U=ke=>{var He=xx(),tt=C(He,!0);S(He),O(()=>ve(tt,n(K))),b(ke,He)},Pe=(ke,He)=>{{var tt=ye=>{var Ie=wx(),Be=C(Ie,!0);S(Ie),O(()=>ve(Be,f().length)),b(ye,Ie)};R(ke,ye=>{n(H)==="COUNT"&&ye(tt)},He)}};R(it,ke=>{n(H)==="FULL"?ke(U):ke(Pe,!1)})}b(Z,ie)};R(P,Z=>{d()?Z(We):Z(Se,!1)})}b(ee,fe)},$$slots:{default:!0}})};R(X,re=>{n(E)&&re(ne)})}b(t,ae),F(),o()}import{debounceFn as rb}from"@vkontakte/videoplayer-shared/es2018";import{ChromecastState as Vx,PlaybackState as zl,Player as Rx,PredefinedQualityLimits as hs,VideoFormat as nc,clientChecker as G_}from"@vkontakte/videoplayer-core/es2018";import{assertNonNullable as br,getHighestQuality as Nx,InterfaceLanguage as Dx,isInvariantQuality as Ox,isNonNullable as Bx,loadVKLangPack as Fx,Logger as Hx,map as Y_,merge as Ux,Observable as ju,Subject as Wl,Subscription as bm,TracerFactory as zx,ValueSubject as Wx,VideoQuality as Kx,devNull as qx,now as Qx,filter as Gx,once as Yx}from"@vkontakte/videoplayer-shared/es2018";import{SeekAction as Ds}from"@vkontakte/videoplayer-statistics/es2018";import{detectEmbed as Tx,devNull as ii,isNonNullable as Ix,now as oi}from"@vkontakte/videoplayer-shared/es2018";import{addScript as Ex,Subject as mn,clearVideoElement as kx}from"@vkontakte/videoplayer-shared/es2018";var Px="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",Wu=class{constructor(e,i){this.adman=null;this.initialVolume=1;this.videoElement=null;this.currentAdSection=null;this.actions=null;this.adsState=null;this.playerState=null;this.events={init$:new mn,loadStarted$:new mn,loadEnded$:new mn,loadError$:new mn,ready$:new mn,slotRequested$:new mn,started$:new mn,timeRemained$:new mn,paused$:new mn,resumed$:new mn,ended$:new mn,empty$:new mn,skipped$:new mn,clicked$:new mn,closed$:new mn,error$:new mn};this.loadAdman=e=>(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[oi()]}),this.useAdmanFromNPM?this.loadAdmanNPM(e):this.loadAdmanMailRu(e));this.loadAdmanMailRu=e=>new Promise((i,o)=>{let r;this.events.loadStarted$.next();let a=()=>{clearTimeout(r),delete window.admanAsyncInit,window.AdmanHTML?(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[oi()]}),i(),this.events.loadEnded$.next()):(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[oi()]}),o())};Ex(Px,e,this.loadTimeout).then(()=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[oi()]}),window.AdmanHTML?(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[oi()]}),i(),this.events.loadEnded$.next()):(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[oi()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout))}).catch(l=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(l)],numbers:[oi()]}),o(),clearTimeout(r)})});this.loadAdmanNPM=e=>new Promise((i,o)=>{let r;this.events.loadStarted$.next();let a=()=>{clearTimeout(r),delete window.admanAsyncInit,window.AdmanHTML?(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[oi()]}),i(),this.events.loadEnded$.next()):(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[oi()]}),o())},l=()=>{d=!0,o()},d=!1,s=window.setTimeout(()=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[oi()]}),l()},this.loadTimeout);e.addEventListener("abort",l),e.aborted&&(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[oi()]}),l()),window.AdmanHTML=window.AdmanHTML||null,import("@adtech/rbadman/out/rbadman-html5.min.js").then(()=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(d)],numbers:[oi()]}),!d&&(window.AdmanHTML?(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[oi()]}),i(),this.events.loadEnded$.next()):(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[oi()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout)))},l).finally(()=>{clearTimeout(r),clearTimeout(s),e.removeEventListener("abort",l)})});this.onAdsReady=()=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[oi()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(e,i)=>{var o;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+i.muted],numbers:[oi(),i.bannerID]}),this.adsState&&this.playerState&&this.actions?(this.log({message:`ad started, section: ${e}, banner: ${JSON.stringify(i)}`}),this.events.started$.next(e),i.muted&&(this.setVolume(0),this.actions.setMuted(!0),this.log({message:"ad muted start"})),this.adsState.duration.set(i.duration),this.adsState.playbackState.set("playing"),this.adsState.canSkip.set(i.allowClose),this.adsState.secondsToWatchBeforeSkip.set(i.allowCloseDelay),this.startWatchDog(),(o=this.externalApi)!=null&&o.videoTrackAdEvent&&this.safeExternalCall(this.externalApi.videoTrackAdEvent,e,String(i.bannerID))):this.onAdError("Started callback failed: Adman is not initialized")};this.onAdTimeRemained=e=>{var o;((o=this.adsState)!=null&&o.playbackState?he(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"))};this.onAdPaused=()=>{var e;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.stopWatchDog(),this.adsState?(this.log({message:"ad paused"}),this.adsState.playbackState.set("paused")):this.onAdError("Paused callback failed: Adman state is not initialized")};this.onAdPlayed=()=>{var e;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.startWatchDog(),this.adsState?(this.log({message:"ad played"}),this.adsState.playbackState.set("playing")):this.onAdError("Player callback failed: Adman is not initialized")};this.onAdMidrollPoint=()=>{if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[oi()]}),this.adman&&this.actions){this.log({message:"midroll point"}),this.actions.switchFromVideoToAds(),this.currentAdSection="midroll",this.startWatchDog();try{this.adman.start("midroll")}catch(e){this.onAdError("could not start midroll")}}else this.onAdError("Midroll callback failed: Adman is not initialized")};this.onAdSkipped=()=>{var e;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{var e;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{var e;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.log({message:"ad completed"}),this.currentAdSection?(this.events.ended$.next(this.currentAdSection),this.currentAdSection==="postroll"&&this.setPostrollPassed(!0)):this.events.empty$.next(),this.switchToVideo(),this.stopWatchDog()};this.onAdClicked=()=>{var e,i;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.log({message:"ad clicked"}),(i=this.videoElement)==null||i.pause(),this.currentAdSection&&this.events.clicked$.next(this.currentAdSection),this.stopWatchDog()};this.onAdError=(e="ad error")=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",e],numbers:[oi()]}),this.log({message:e}),this.events.error$.next(e),this.currentAdSection==="postroll"&&this.setPostrollPassed(!0),this.switchToVideo(!0),this.stopWatchDog()};this.log=e.createComponentLog("AdmanWrapper"),ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[oi()]}),this.loadTimeout=i.loadTimeout,this.initTimeout=i.initTimeout,this.runtimeTimeout=i.runtimeTimeout,this.useAdmanFromNPM=i.useAdmanFromNPM,this.volumeMultiplier=Math.max(0,Math.min(i.volumeMultiplier,1)),this.isVsidOriginal=i.isVsidOriginal}init(e,i,o){this.actions=e,this.adsState=i,this.playerState=o}onAdmanLoadingError(){this.onAdError("adman loading error")}async initAdman(e){var N,L;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[oi(),e.slotId]}),this.adman)return;this.events.init$.next(e.slotId),this.startWatchDog();let{width:i,height:o,isAutoplay:r,adsContainer:a,adsVideoElement:l,slotId:d,params:s={},paramsOverride:u={},duration:f,externalApi:p}=e;this.externalApi=p;let v,$=this.playerState&&he(this.playerState.vsid);$&&(this.isVsidOriginal?v=$:v=parseInt($,36));let{isEmbed:y,immediateOrigin:h}=Tx(),x=(N=y?h:window.location.href)!=null?N:window.location.href,I={...s,dl:encodeURIComponent(x),autoplay:r?1:0,player_width:i,player_height:o,...v?{request_id:v}:{},duration:f,...u};I=Object.fromEntries(Object.entries(I).filter(([E,k])=>Ix(k)));let T={slot:d,wrapper:a,videoEl:l,videoQuality:o,params:I,browser:{mobile:!1}};try{let E=new window.AdmanHTML;if(E.onReady(this.onAdsReady),E.onStarted(this.onAdStarted),E.onPlayed(this.onAdPlayed),E.onPaused(this.onAdPaused),E.adMidrollPoint(this.onAdMidrollPoint),E.onClosed(this.onAdClosed),E.onSkipped(this.onAdSkipped),E.onClicked(this.onAdClicked),E.onTimeRemained(this.onAdTimeRemained),E.onCompleted(this.onAdCompleted),E.onError(this.onAdError),E.setDebug(!1),(L=this.externalApi)!=null&&L.videoGetAds){let k=await this.safeExternalCall(this.externalApi.videoGetAds,I);k&&(delete T.slot,delete T.params,Object.assign(T,{json:k}))}E.init(T),this.adman=E,this.videoElement=l,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(T)}`})}catch(E){ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(E)],numbers:[oi()]}),this.onAdError("could not init adman")}}switchToVideo(e=!1){var o,r,a;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",(o=this.currentAdSection)!=null?o:"","force: "+e],numbers:[oi()]}),this.currentAdSection===null&&!e){this.log({message:"switch to video, no currentAdSection. can't switch"});return}let i=this.currentAdSection==="postroll";if(this.actions){if(this.adsState&&this.playerState)this.adsState.playbackState.set("inactive"),this.currentAdSection=null,this.log({message:`switch to video, isPostroll: ${i}`});else{let l="Switch to video: Adman state was not updated correctly";this.log({message:l}),this.events.error$.next(l)}(a=(r=this.actions).switchFromAdsToVideo)==null||a.call(r,!i)}}setPostrollPassed(e){var i;(i=this.adsState)==null||i.postrollPassed.set(e),this.log({message:"postroll passed"})}togglePlay(){var e;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adsState){this.log({message:"toggle play"});let i=he(this.adsState.playbackState);i==="playing"?this.pause():i==="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 i=e*this.volumeMultiplier;if(this.log({message:`set volume ${i}`}),this.adman)try{this.adman.setVolume(i)}catch(o){this.onAdError("could not set ad volume")}this.videoElement&&(this.videoElement.volume=i)}setFullscreen(e){if(this.log({message:`set fullscreen ${e}`}),this.adman)try{this.adman.setFullscreen(e)}catch(i){this.onAdError("could not set ad fullscreen")}}startPreroll(){if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[oi()]}),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(e){this.onAdError("could not start preroll")}}}else this.onAdError("Can not start preroll: Adman is not initialized")}startPostroll(){var e;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adman&&this.actions){this.log({message:"start postroll"}),this.actions.switchFromVideoToAds(),this.currentAdSection="postroll",this.startWatchDog();try{this.adman.start("postroll")}catch(i){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(){var e;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adman){this.log({message:"ad play"}),this.startWatchDog();try{this.adman.resume(),this.events.resumed$.next()}catch(i){this.onAdError("could not resume ad")}}else this.onAdError("Can not play: Adman is not initialized")}pause(){var e;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adman){this.stopWatchDog(),this.log({message:"ad pause"});try{this.adman.pause(),this.events.paused$.next()}catch(i){this.onAdError("could not pause ad")}}else this.onAdError("Can not pause: Adman is not initialized")}skip(){var e;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adman){this.stopWatchDog(),this.log({message:"ad skip"});try{this.adman.skip(),this.events.skipped$.next()}catch(i){this.onAdError("could not skip ad")}}else this.onAdError("Can not skip: Adman is not initialized")}setPosition(e,i){var o;(o=this.adman)==null||o.setPosition(Math.floor(e),Math.floor(i))}destroy(){var e,i,o,r,a,l,d,s,u,f,p,v;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[oi()]}),this.log({message:"destroy"}),this.stopWatchDog(),(e=this.adman)==null||e.onReady(void 0),(i=this.adman)==null||i.onStarted(void 0),(o=this.adman)==null||o.onPlayed(void 0),(r=this.adman)==null||r.onPaused(void 0),(a=this.adman)==null||a.adMidrollPoint(void 0),(l=this.adman)==null||l.onClosed(void 0),(d=this.adman)==null||d.onSkipped(void 0),(s=this.adman)==null||s.onClicked(void 0),(u=this.adman)==null||u.onTimeRemained(void 0),(f=this.adman)==null||f.onCompleted(void 0),(p=this.adman)==null||p.onError(void 0),(v=this.adman)==null||v.destroy(),this.videoElement&&kx(this.videoElement),this.isDestroyed=!0}async safeExternalCall(e,...i){var o;try{return await e(...i)}catch(r){return this.onAdError((o=r==null?void 0:r.message)!=null?o:"External call failed"),null}}};var z_=t=>{let e=Math.round(t);return isNaN(e)||e<40?"":e>=40&&e<55?50:e>=55&&e<90?60:e>=90&&e<180?120:e>=180?240:""};var mm=class{constructor(){this.oneLineRegExp=/\r\n|\n|\r/;this.twoLinesRegExp=/\r\n\r\n|\n\n|\r\r/}parse(e,i){let o=[],r=e.split(this.twoLinesRegExp);for(let a of r){let l={startTime:0,endTime:0,texts:[],lang:i},d=a.split(this.oneLineRegExp);for(let s of d)if(!l.startTime&&!l.endTime){let u=new Ku,{startTime:f,endTime:p}=u.parse(s);l.startTime=f,l.endTime=p}else if(s.trim()!==""){let u=new vm,{texts:f}=u.parse(s);l.texts=[...l.texts,...f]}(l.startTime||l.endTime)&&l.texts.length>0&&o.push(l)}return o}},Ku=class{constructor(){this.timeRegExp=/(\d{2,})?:?(\d{2}):(\d{2}).(\d{2,3})/;this.timingRegExp=new RegExp(`${this.timeRegExp.source}( ?--> ?)${this.timeRegExp.source}`)}parse(e){let i={startTime:0,endTime:0},o=this.timingRegExp.exec(e);return o&&(i.startTime=this.calcTime(o[1],o[2],o[3],o[4]),i.endTime=this.calcTime(o[6],o[7],o[8],o[9])),i}parseTime(e){let i=this.timeRegExp.exec(e);return i?this.calcTime(i[1],i[2],i[3],i[4]):0}isTime(e){return this.timeRegExp.test(e)}calcTime(e="0",i="0",o="0",r="0"){let a=Number(e)*60*60,l=Number(i)*60,d=Number(o),s=+`0.${r}`;return a+l+d+s}},vm=class{constructor(){this.letterTagRegExp=/<[a-z]*>|<\/[a-z]*>/}parse(e){let i={texts:[]},r=e.replace(new RegExp(this.letterTagRegExp,"g"),"").split({[Symbol.split](l){let d=0,s=[];for(;d<l.length;){let u=["<",">"].reduce((f,p)=>{let v=l.indexOf(p,d);return f===-1||f>v?v:f},-1);if(u===-1){s.push(l.substring(d));break}s.push(l.substring(d,u)),d=u+1}return s}}),a=new Ku;for(let l of r)a.isTime(l)?i.texts.push({type:"timestamp",value:a.parseTime(l)}):i.texts.push({type:"text",value:l});return i}},W_=mm;import{isNonNullable as gm}from"@vkontakte/videoplayer-shared/es2018";var za,ki,hm=0,_m=!1,K_="",q_=(t,e=0,i=0)=>t<e&&t<i,qu=(t,e=0,i=0)=>t>=e&&t<=i,Ax=(t,e=0,i=0)=>t>e&&t>i,Q_=(t,e,i,o=!1)=>{var d;let r=(d=i.find(({id:s})=>s===e.value))==null?void 0:d.subtitles;if(o)return r==null?void 0:r.find(({startTime:u,endTime:f})=>qu(t,u,f));let a=t>=hm,l=t<hm;if(hm=t,l&&(_m=!1),gm(za)&&qu(t,za.startTime,za.endTime)&&K_===e.value)return za;if(!gm(ki)&&(r!=null&&r.length)&&!_m){ki=r.find(({startTime:u,endTime:f})=>qu(t,u,f)||a&&q_(t,u,f)),za=void 0,!gm(ki)&&r[r.length-1].endTime<t&&(_m=!0);return}else{if(qu(t,ki==null?void 0:ki.startTime,ki==null?void 0:ki.endTime))return za=ki,ki=void 0,K_=e.value,za;(a&&Ax(t,ki==null?void 0:ki.startTime,ki==null?void 0:ki.endTime)||l&&q_(t,ki==null?void 0:ki.startTime,ki==null?void 0:ki.endTime))&&(ki=void 0)}};var Qu={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"},Lx={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"},oc=t=>{var e,i;return(i=(e=Qu[t])!=null?e:Qu[Lx[t]])!=null?i:void 0};import{Subscription as Mx}from"@vkontakte/videoplayer-shared/es2018";import"@vkontakte/videoplayer-statistics/es2018";var Gu=class{constructor(e,i,o,r=new Mx){this.oneStat=e;this.thinOneStat=i;this.mediascopePixel=o;this.statSubscription=r}destroy(){var e,i,o;(e=this.oneStat)==null||e.destroy(),(i=this.thinOneStat)==null||i.destroy(),(o=this.mediascopePixel)==null||o.destroy(),this.statSubscription.unsubscribe()}};var Yu=(i=>(i.DESKTOP_CONTROL_PANEL_LEFT="desktop-control-panel-left",i.DESKTOP_CONTROL_PANEL_RIGHT="desktop-control-panel-right",i))(Yu||{});var gs=t=>t!=null?t:0,Ns=(t,e)=>{var r,a;let i=(r=t==null?void 0:t.getBoundingClientRect)==null?void 0:r.call(t),o=(a=e==null?void 0:e.getBoundingClientRect)==null?void 0:a.call(e);return{top:Math.round(gs(i==null?void 0:i.top)-gs(o==null?void 0:o.top)),left:Math.round(gs(i==null?void 0:i.left)-gs(o==null?void 0:o.left)),bottom:Math.round(gs(i==null?void 0:i.bottom)-gs(o==null?void 0:o.top)),right:Math.round(gs(i==null?void 0:i.right)-gs(o==null?void 0:o.left))}},Hl=t=>{var i;let e=(i=t==null?void 0:t.getBoundingClientRect)==null?void 0:i.call(t);return{width:gs(e==null?void 0:e.width),height:gs(e==null?void 0:e.height)}};var Pn="off";var Ul=t=>!!(Math.round(Math.abs(t)/90)%2);var j_=({interfaceLanguage:t,isCyrillicRelatedInterface:e,videoId:i,isClip:o,isLiveCatchUpMode:r,statAuthToken:a,isAudioDisabled:l,canDownload:d,callbacks:s,webApi:u,videoEpisodes:f,previewThumbsData:p,uiConfig:v,coreConfig:$,player:y,disabledControls:h,isInteractive:x,interactiveRanges$:I,isInteractiveTime$:T,replayInteractive:N,stopPlayer:L,hasInteractiveBranches:E,playPrevChapterDisabledTooltip:k,additionalButtons:K,additionalSettingsMenuItems:H,additionalContextMenuItems:z,playPrevVideo:j,playNextVideo:ae,onVideoChanged:X,looped:ne=!1,statistics:J,saveRate:we,internalsExposure:pe,playerView:re,playerId:be})=>{var Fv,Hv,Uv;let $e={...$,configName:[...(Fv=$.configName)!=null?Fv:[],"ui"],isAudioDisabled:l,live:{...(Hv=$.live)!=null?Hv:{},isLiveCatchUpMode:!!r}},ee=v,Re=zx.createRootTracer(ee.features.tracer),fe=Re.createComponentTracer("Store"),P=y||new Rx($e,Re,{playerId:be,onDevNullLog:s==null?void 0:s.onDevNullLog});pe==null||pe.expose({corePlayer:P});let We=new Hx,Se=new Wu(We,{loadTimeout:ee.ads.loadTimeout,initTimeout:ee.ads.initTimeout,runtimeTimeout:ee.ads.runtimeTimeout,useAdmanFromNPM:ee.ads.useAdmanFromNPM,volumeMultiplier:ee.ads.volumeMultiplier,isVsidOriginal:ee.ads.isVsidOriginal}),Z=Va.getInstance(),ie=u==null?void 0:u.pictureInPictureApi,De=u==null?void 0:u.annotationsApi,Oe=u==null?void 0:u.slotsApi,it=u==null?void 0:u.focusManager,U=We.createComponentLog("Store"),Pe,ke,He={},tt=new _u,ye=new bm,Ie="",Be=de(!1),Lt=J&&J.oneStat?ti(J.oneStat.vsid$):Rr(void 0),mt=de(oa()),Vt=de(!1),dt=()=>__(document,G_.device.isIOS),xt=(Uv=ie==null?void 0:ie.info.isActive$)!=null?Uv:new Wx(!1),Qt=de(0),Tt=de(!1),Mt=de(!1),Rt=de([]),G=Ux(P.events.fatalError$,P.events.managedError$).subscribe(c=>Rt.update(_=>[..._,c])),Ce=Rr(!1,c=>{let _=P.events.fatalError$.subscribe(()=>c(!0));return()=>_.unsubscribe()}),le=async c=>{var oe;let _=Object.values(Dx).includes(c);if(ee.downloadVKLanguages&&(_&&ee.updateBuiltinLanguages||!Af(c))){let xe;try{xe=await Fx(c,Eh,kh)}catch(Xe){(oe=J==null?void 0:J.oneStat)==null||oe.logError({errorType:"VKLangPack",fatal:!1}),Z==null||Z.report(Xe,{errorType:"VKLangPack",fatal:!1})}xe&&(Pf({language:c,pack:xe,fallback:ee.defaultLanguage}),_e.set(c),Me.update(Xe=>Xe+1))}Af(c)&&_e.set(c)},_e=de(t),Me=de(0),rt=de(e);le(t);let pt=(c,_)=>{let V=he(_e);return Lf(V,c,_,ee.defaultLanguage)},ue=de("thumb");ue.subscribe(c=>{c==="ads"&&P.info.playbackState$.getValue()&&ct()});let ze=(()=>{let c=ui([Ce,ue],([_,V])=>_?"crashed":V);return{...c,is:_=>he(c)===_}})(),Qe=de(),ct=()=>{Qe.set({muted:P.info.muted$.getValue()})},Nt=(()=>{let c=de(new Set(h));return{...c,add:_=>{c.update(V=>new Set([...V].concat(_)))},remove:_=>{c.update(V=>{let oe=[...V];return new Set(Array.isArray(_)?oe.filter(xe=>!_.includes(xe)):oe.filter(xe=>xe!==_))})},includes:_=>{let V=he(c);return Array.isArray(_)?_.every(oe=>V.has(oe)):V.has(_)}}})(),Ht=de({width:0,height:0}),Gt=null,vi=P.info.isBuffering$,Qi=Rr(vi.getValue(),c=>{let _=vi.subscribe(V=>{V&&Gt===null?Gt=window.setTimeout(()=>{c(vi.getValue()),Gt=null},ee.loaderDelay):c(V)});return()=>{_.unsubscribe(),Gt&&clearTimeout(Gt)}});fe.log("create store"),U({message:"create store"});let Pt=c=>{let _=c.container,V=()=>{Yi=new MutationObserver(xe=>{let{removedNodes:Xe}=xe[0];Xe.length&&_.append(P.experimental.element$.getValue())}),Yi.observe(_,{childList:!0})},oe=P.experimental.element$.getValue();if(oe)_.append(oe),V();else{let xe=P.experimental.element$.pipe(Gx(Xe=>!!Xe),Yx()).subscribe(Xe=>{_.append(Xe),V()});ye.add(xe)}},di=c=>{U({message:`init video, config: ${JSON.stringify(c)}`}),x?Pt(c):(qx.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[Qx()]}),P.initVideo(c)),fe.log("init video",{isInteractive:x}),c.subtitles&&P.setExternalTextTracks(c.subtitles),Pe=c,Ie=c.subtitlesForcedLanguage||""},pi=new Wl,$t=c=>pi.next(c),ci=new Wl,qt=new Wl,Gi=new Wl,Yi=null,ot={actionRewind$:ci,actionSeek$:qt,inPiP$:xt,inFullscreen$:new ju(c=>mt.subscribe(_=>c.next(_))),actionSetSubtitle$:Gi,nextMovie$:pi},Ue=new Wl,gi=new Wl,So={actionSeek$:qt,actionSubtitlesSwitched$:Ue,actionQuality$:gi,playerSize$:new ju(c=>Ht.subscribe(_=>c.next(_))),inPiP$:xt,inFullscreen$:new ju(c=>mt.subscribe(_=>c.next(_))),isLoaderVisible$:new ju(c=>Qi.subscribe(_=>c.next(_)))};if(J){let{oneStat:c,thinOneStat:_,mediascopePixel:V,statSubscription:oe}=J;c&&(x||oe.add(c.attachTo(P)),oe.add(c.attachToUi(ot)),oe.add(c.attachToAds(Se.events)),c.authorize(a).catch(xe=>{U({message:`onestat auth error ${String(xe)}`})}),V&&V.attachTo(P)),_&&(oe.add(_.attachTo(P,Se.events)),oe.add(_.attachToUi(So)),oe.add(_.attachToAds(Se.events)),_.updateContext({isMobile:he(Be)}),_.authorize(a))}if(Z){let c=new bm,_=(V,oe)=>c.add(V.subscribe(oe));if(_(P.events.managedError$,V=>{Z.logIError(V)}),_(P.events.fatalError$,V=>{Z.logIError(V,!0)}),J){let{oneStat:V}=J;V&&_(V.experimental.error$,oe=>{Z.logIError(oe)})}Z.sentrySubscription.add(c)}let Ho=()=>{if(G_.device.isIOS&&ke)try{b_(ke)}catch(c){U({message:`exitIosSafariFullscreen failed: ${c}`})}};ye.add(P.experimental.element$.subscribe(c=>{c&&(ke=c,c.classList.add("player-media"),Na(ie)&&ie.updateVideoElement(),x&&c.setAttribute("pip","false"),re==="preview"&&(c.setAttribute("disablePictureInPicture","true"),c.setAttribute("x-yandex-pip","false")))})).add(P.events.ended$.subscribe(()=>{var c;Ho(),(c=s==null?void 0:s.onEnded)==null||c.call(s)})).add(P.events.looped$.subscribe(()=>{var c;(c=s==null?void 0:s.onLooped)==null||c.call(s)})).add(P.events.started$.subscribe(async()=>{var _,V;Na(ie)&&await(ie==null?void 0:ie.revealPictureInPicture());let c=P.info.muted$.getValue();(_=s==null?void 0:s.onStarted)==null||_.call(s),(V=He.onStarted)==null||V.call(He,c)})).add(P.events.willSeek$.subscribe(({from:c,to:_})=>{var V;(V=s==null?void 0:s.onSeek)==null||V.call(s,c,_)})).add(P.events.autoplaySoundProhibited$.subscribe(()=>{var c;(c=s==null?void 0:s.onAutoplaySoundProhibited)==null||c.call(s)})).add(P.info.position$.subscribe(c=>{var V;let _=P.info.duration$.getValue();isFinite(_)&&_>0&&((V=s==null?void 0:s.onTimeupdate)==null||V.call(s,_,c),Se.setPosition(c,_))})).add(P.events.fatalError$.subscribe(c=>{var _;(_=s==null?void 0:s.onCrashed)==null||_.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(P.events.fetcherRecoverableError$.subscribe(c=>{var _;(_=s==null?void 0:s.onRecoverableError)==null||_.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(P.events.loadedMetadata$.subscribe(()=>{Tt.set(!0)})).add(P.info.is3DVideo$.subscribe(c=>{Mt.set(c)})).add(P.info.isEnded$.subscribe(c=>{x&&(c?(T!=null&&T.getValue()&&Nt.add(Ld),Nt.add("PLAY_BUTTON")):Nt.remove("PLAY_BUTTON"))})).add(P.info.liveTime$.subscribe(c=>{var _;(_=s==null?void 0:s.onLiveTime)==null||_.call(s,c)})).add(P.info.isStalled$.subscribe(c=>{var _;(_=s==null?void 0:s.onStalledChanged)==null||_.call(s,c)})).add(P.info.isLiveEnded$.subscribe(c=>{var _;return c&&((_=s==null?void 0:s.onLiveEnded)==null?void 0:_.call(s))})).add(Se.events.loadStarted$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadStarted)==null?void 0:_.call(c)})).add(Se.events.loadEnded$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadEnded)==null?void 0:_.call(c)})).add(Se.events.loadError$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadError)==null?void 0:_.call(c)})).add(Se.events.init$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onInit)==null?void 0:_.call(c)})).add(Se.events.ready$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onReady)==null?void 0:_.call(c)})).add(Se.events.started$.subscribe(c=>{var _,V;return(V=(_=s==null?void 0:s.adsInfo)==null?void 0:_.onStarted)==null?void 0:V.call(_,c)})).add(Se.events.timeRemained$.subscribe(c=>{var _,V;return(V=(_=s==null?void 0:s.adsInfo)==null?void 0:_.onTimeRemained)==null?void 0:V.call(_,c)})).add(Se.events.ended$.subscribe(c=>{var _,V;return(V=(_=s==null?void 0:s.adsInfo)==null?void 0:_.onCompleted)==null?void 0:V.call(_,c)})).add(Se.events.empty$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onEmpty)==null?void 0:_.call(c)})).add(Se.events.clicked$.subscribe(c=>{var _,V;return(V=(_=s==null?void 0:s.adsInfo)==null?void 0:_.onClicked)==null?void 0:V.call(_,c)})).add(Se.events.closed$.subscribe(c=>{var _,V;return(V=(_=s==null?void 0:s.adsInfo)==null?void 0:_.onClosed)==null?void 0:V.call(_,c)})).add(Se.events.error$.subscribe(c=>{var _,V;return(V=(_=s==null?void 0:s.adsInfo)==null?void 0:_.onError)==null?void 0:V.call(_,c)})).add(Se.events.paused$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onPaused)==null?void 0:_.call(c)})).add(Se.events.resumed$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onResumed)==null?void 0:_.call(c)}));let Uo=new bm,wt=()=>{var Xe,Ct,Ot;let{debugLog:c}=ee,_,V="#9df7b7",oe="#efd169";if(c&&c!==!0){let{colors:Wt}=c;_=c.tag,V=(Xe=Wt==null?void 0:Wt[0])!=null?Xe:V,oe=(Ot=(Ct=Wt==null?void 0:Wt[1])!=null?Ct:Wt==null?void 0:Wt[0])!=null?Ot:oe}let xe=_?`: ${_}`:"";Uo.add(P.events.log$.subscribe(Wt=>{console.debug(`%c sdk${xe} `,`background:${V};`,`sdk component: ${Wt.component}`,Wt.message)})).add(We.log$.subscribe(Wt=>{console.debug(`%c ui${xe} `,`background:${oe};`,`ui component: ${Wt.component}.`,Wt.message)}))},Dt=()=>{Uo.unsubscribe()},q=(c,_)=>{fe.log("start camera manual rotation",{mx:c,my:_}),P.startCameraManualRotation(c,_)},yt=(c=!1)=>{fe.log("stop camera manual rotation",{immediate:c}),P.stopCameraManualRotation(c)},yi=(c,_,V)=>{fe.log("move camera focus px",{xpx:c,ypx:_,dt:V}),P.moveCameraFocusPX(c,_,V)},Yt=()=>{P.holdCamera()},Ke=()=>{P.releaseCamera()},zt=Rr(P.info.position$.getValue(),c=>{let _,V,oe=()=>{let xe=P.info.playbackState$.getValue(),Xe=P.info.isLive$.getValue(),Ct=P.info.duration$.getValue(),Ot=P.info.position$.getValue();if(xe&&[zl.PLAYING,zl.PAUSED].includes(xe)){let Wt=Xe?Ot-Ct:P.getExactTime();Wt!==V&&c(Wt),V=Wt}_=requestAnimationFrame(oe)};return oe(),()=>cancelAnimationFrame(_)}),st=ti(P.info.playbackState$),Pi=ti(P.info.isBuffering$),Fi=ui([st,Pi],([c,_])=>_?"buffering":c),gn=ti(P.info.currentBuffer$),Co=ti(P.info.isEnded$),ro=ti(P.info.isLive$),go=ee.features.playbackRate?ti(P.info.canChangePlaybackSpeed$):Rr(!1),zo=ti(P.info.liveBufferTime$),ho=ti(P.info.volume$),To=ti(P.info.muted$),Wo=bu(P.info.predefinedQualityLimitType$.pipe(Y_(c=>c===hs.TRAFFIC_SAVING)),P.info.predefinedQualityLimitType$.getValue()===hs.TRAFFIC_SAVING),Ai=bu(P.info.predefinedQualityLimitType$.pipe(Y_(c=>c===hs.HIGH_QUALITY)),P.info.predefinedQualityLimitType$.getValue()===hs.HIGH_QUALITY),Io=ti(P.info.autoQualityLimitingAvailable$),An=ti(P.info.availableQualities$),Or=ti(P.info.availableQualitiesFps$),Ln=ti(P.info.chromecastState$),bs=ti(P.info.chromecastDeviceName$),is=ti(P.info.currentFormat$),$s=ti(P.info.throughputEstimation$),Br=ti(P.info.videoBitrate$),Mn=ti(P.info.intrinsicVideoSize$),Fr=ti(P.info.duration$),Eo=ti(P.info.isAudioAvailable$),Hr=()=>{Gt&&clearTimeout(Gt),Gt=null},ko=ui([Fr,ro],([c,_])=>_?-c:c),$r=ui([st],([c])=>c===zl.PLAYING),hn=ti(P.info.atLiveEdge$),os=ti(P.info.atLiveDurationEdge$),Yn=ti(P.info.position$),so=ui([Yn,Fr],([c,_])=>isFinite(c)&&isFinite(_)&&!!_),yr=ui([Ln],([c])=>c===Vx.CONNECTED),jn=ti(P.info.availableVideoStreams$),Vn=ee.features.audioLanguages?ti(P.info.availableAudioStreams$):Rr([]),_o=ti(P.info.currentVideoStream$),Xn=ti(P.info.currentAudioStream$),Zn=c=>{c.language&&Tf(c.language),P.setVideoStream(c)},ns=(c,_)=>{P.setAudioStream(c),ln(_)&&(c.language&&Tf(c.language),ee.features.userVideoPrefs&&i&&kf(ee.userSalt,String(i),{audioTrackId:c.id}))},vt=c=>{let _;if(c.length===1&&(_=c.at(0)),_!=null||(_=c.find(oe=>"isDefault"in oe&&oe.isDefault)),ee.features.userVideoPrefs&&i){let oe=Su(ee.userSalt,String(i));if(oe!=null&&oe.audioTrackId){let xe=c.find(Xe=>Xe.id===oe.audioTrackId);_=xe!=null?xe:_}}let V=t_();return V&&(_!=null||(_=c.find(({language:oe})=>V===oe))),_!=null||(_=c.at(0)),_},Zt=c=>{fe.log("change audio stream",{id:c});let _=P.info.availableAudioStreams$.getValue().find(V=>V.id===c);_&&ns(_,!0)},Jn=!1;ye.add(P.info.availableAudioStreams$.subscribe(c=>{if(!Jn&&c.length){let _=vt(c);_&&(P.setAudioStream(_),Jn=!0)}})),Vn.subscribe(c=>{var _;(_=s==null?void 0:s.onAvailableAudioStreamsChanged)==null||_.call(s,c.map(({label:V="",id:oe="",language:xe=""})=>({label:V,language:xe,id:oe})))}),Xn.subscribe(c=>{var _;return c&&((_=s==null?void 0:s.onAudioStreamChanged)==null?void 0:_.call(s,c.id))});let Ur=!1;ye.add(P.info.availableVideoStreams$.subscribe(c=>{if(!Ur&&c.length){let _=vt(c);_&&(P.setVideoStream(_),Ur=!0)}}));let Ko=de(void 0),er=ti(P.info.isAutoQualityEnabled$,c=>c&&Ko.set(void 0)),tr=ti(P.info.currentQuality$,()=>Ko.set(void 0)),bo=ui([Ko,tr],([c,_])=>c!=null?c:_),ir=ui(is,c=>c!==nc.MPEG),or=ui([An,Or,er,bo,ir],([c,_,V,oe,xe])=>{let Xe=[];xe&&Xe.push({value:"auto",displayValue:pt("auto_quality_option"),selected:V});let Ct=c.filter(Ot=>!Ox(Ot));for(let Ot of Ct){let Wt=_[Ot];Xe.push({value:Ot,displayValue:`${Ot}${Wt?z_(Wt):""}`,selected:V?!1:Ot===oe})}return Xe}),Rn=ti(P.info.currentPlaybackRate$),Po=ui([Rn,hn,os],([c,_,V])=>{let oe=V||x?1:ee.controls.playbackRateMin,xe=_?1:ee.controls.playbackRateMax,Xe=ee.controls.playbackRateStep,Ct=[];for(let Ot=oe;Ot<=xe;Ot+=Xe)Ct.push({value:Ot,displayValue:Ot===1?pt("playback_rate_1"):pt("playback_rate",{multiplier:Ot.toString(10)}),selected:c===Ot});return Ct}),qo=()=>({displayValue:pt("subtitles_off"),value:Pn,language:""}),xr=de(qo()),Ii=ui([xr,Me],([c],_)=>{c.value===Pn?_(qo()):_(c)}),nr=ee.features.subtitles?ti(P.info.availableTextTracks$):Rr([]),Qo=zh(),rr=ui([nr,Ii],([c,_],V)=>{var Xe;let oe=[],xe=c.find(({id:Ct})=>Ct===_.value);if(xe!=null&&xe.url){let[,Ct]=(Xe=Qo.find(xe.url))!=null?Xe:[];if(Ct){V(Ct);return}tt.download(xe.url).then(Ot=>{if(!Ot||tt.isDestroyed())return;let Wt=new W_,qs=xe.language;if(qs){let jb=!!xe.isAuto,Xb=Wt.parse(Ot,qs);oe.push({lang:qs,subtitles:Xb,isAuto:jb,id:xe.id})}Qo.add(xe.url,oe),he(Ii).value===_.value&&V(oe)}).catch(Ot=>{var Wt;(Wt=J==null?void 0:J.oneStat)==null||Wt.logError({errorType:"Subtitles download",fatal:!1}),Z==null||Z.report(Ot,{errorType:"Subtitles download",fatal:!1})})}V(oe)}),wr=ui([Rn,$r,Ii],([c,_,V],oe)=>{let Ct;if(P.info.isLive$.getValue()&&_&&V.value!==Pn){let Wt=()=>{let qs=1e3/(3*c);Ct=setTimeout(Wt,qs),oe(Date.now())};return Wt(),()=>clearTimeout(Ct)}}),Sr=ui([nr,Ii],([c,_])=>{if(!c.length)return[];let V=[];for(let{language:oe,isAuto:xe,id:Xe}of c){let Ct=oe&&oc(oe);oe&&Ct&&V.push({displayValue:xe?pt("subtitles_auto",{language:Ct}):Ct,value:Xe,selected:(_==null?void 0:_.value)===Xe,isAuto:xe,language:oe})}return V.length?(V.unshift({...qo(),selected:(_==null?void 0:_.value)===Pn}),V):[]}),Ao={available:[],prev:[]},gt=()=>{var _,V;let c=P.experimental.getCurrentTime$.getValue();return(V=(_=c==null?void 0:c())!=null?_:ke==null?void 0:ke.currentTime)!=null?V:0},ni=ui([zt,Ii,rr,wr],([c,_,V,oe])=>{var Xe;let xe=P.info.isLive$.getValue();if(xe&&Ao.prev!==V){let Ct=V.find(({id:Wt})=>Wt===_.value),Ot=Ao.prev.find(({id:Wt})=>Wt===_.value);if(Ct){let Wt={...Ct,subtitles:[...(Xe=Ot==null?void 0:Ot.subtitles)!=null?Xe:[],...Ct.subtitles]};Ao.available=[Wt],Ao.prev=V}}if(_&&_.value!==Pn){let Ct=xe?gt():c,Ot=xe?Ao.available:V;return Q_(Ct,_,Ot,xe)}}),jt=ui([ni],([c])=>c!=null&&c.texts?c.texts:[]);ye.add(Ii.subscribe(c=>{var _,V;if(c.value===Pn)(_=s==null?void 0:s.onSubtitleOff)==null||_.call(s);else{let oe=Object.entries(Qu).find(([xe,Xe])=>Xe===c.displayValue);(V=s==null?void 0:s.onSubtitleOn)==null||V.call(s,oe?oe[0]:"",c.value)}}));let Ci=de(!0),an=ui([gn,ko,Yn,zo],([c,_,V,oe])=>{var Ot;let xe=(Ot=c==null?void 0:c.end)!=null?Ot:0;if(!oe)return xe/_;let Ct=-V+oe-_;return(xe-Ct)/_}),Li=ti(P.info.availableSources$),ji=ui([Li],([c])=>Object.keys((c==null?void 0:c[nc.MPEG])||{}).length>0),Lo=()=>{var V,oe,xe;let c=Object.keys(((oe=(V=P.info.availableSources$)==null?void 0:V.getValue())==null?void 0:oe[nc.MPEG])||{}),_=Nx(c)||Kx.Q_144P;return(xe=Pe.sources[nc.MPEG])==null?void 0:xe[_]},sr=()=>{var _;let c=Lo();if(c)fe.log("download video",{url:c}),Fh(c,((_=Pe==null?void 0:Pe.meta)==null?void 0:_.title)||"video");else{let V="There is no URL for download video";fe.log("download video",{message:V}),U({message:V})}},ar=()=>{U({message:"toggle muted"});let c=P.info.muted$.getValue();P.info.volume$.getValue()===0&&!c?lr(Cr(),!1):Mo(!c,!1)},Mi=()=>{var c;if(Ut.ui.settingsMenu.visible$.set(!1),!he(Ut.ui.settingsSubMenu.visible$)){let _=he(Ut.ui.settingsMenu.ref$);if((c=s==null?void 0:s.uiInfo)!=null&&c.onSettingsMenu&&_){let oe=Hl(_),xe={top:0,left:0,bottom:0,right:0};s.uiInfo.onSettingsMenu({visible:!1,size:oe,position:xe,name:"settings"})}}fe.log("close settings menu")},ys=async(c,_=()=>Promise.resolve())=>{var xe;Ut.ui.settingsMenu.openedByBtnKeyboard$.set(!!c),Ut.ui.settingsMenu.visible$.set(!0),await _();let V=he(Ut.ui.settingsMenu.ref$),oe=ll();if((xe=s==null?void 0:s.uiInfo)!=null&&xe.onSettingsMenu&&V&&oe){let Ct=Hl(V),Ot=Ns(V,oe);s.uiInfo.onSettingsMenu({visible:!0,size:Ct,position:Ot,name:"settings"})}fe.log("open settings menu",{wasOpenedByKeyboard:c})},zr=(c,_=!1)=>{var Xe;Ut.ui.settingsSubMenu.visible$.set(!1);let V=he(Ut.ui.settingsMenu.ref$),oe=ll(),xe=he(Ut.ui.settingsMenu.visible$);if((Xe=s==null?void 0:s.uiInfo)!=null&&Xe.onSettingsMenu&&V&&oe)if(xe&&!_){let Ot=Hl(V),Wt=Ns(V,oe);s.uiInfo.onSettingsMenu({visible:!0,size:Ot,position:Wt,name:"settings"})}else{let Ot=Hl(c),Wt={top:0,left:0,bottom:0,right:0},qs=he(Ut.ui.settingsSubMenu.name$);s.uiInfo.onSettingsMenu({visible:!1,size:Ot,position:Wt,name:qs})}fe.log("close settings sub menu")},rs=(c,_)=>{var oe;Ut.ui.settingsSubMenu.visible$.set(!0),Ut.ui.settingsSubMenu.ref$.set(_),Ut.ui.settingsSubMenu.name$.set(c);let V=ll();if((oe=s==null?void 0:s.uiInfo)!=null&&oe.onSettingsMenu&&_&&V){let Xe=Hl(_),Ct=Ns(_,V);s.uiInfo.onSettingsMenu({visible:!0,name:c,size:Xe,position:Ct})}fe.log("open settings sub menu",{name:c})},Cr=()=>{var _;let c=Math.max(ee.volumeMinRestore,(_=$u())!=null?_:0);return c===0?ee.volumeDefault:c},ln=c=>{let _=ee.features.savePreferredStatesOnUserActionOnly;return!_||_&&!c},lr=(c,_)=>{let V=c===0?Cr():c,oe=P.info.muted$.getValue();U({message:`set volume, volume: ${c}, preferredVolume: ${V}`});let xe=!l||ze.is("ads");oe&&c>0&&xe&&(oe=!1,ln(_)&&Sf(!1)),P.setVolume(c,oe),Se.setVolume(c),ln(_)&&$f(V)},Mo=(c,_)=>{let V=P.info.volume$.getValue();U({message:`set muted, currentVolume: ${V}, mute: ${c}`});let oe=ze.is("ads");if(P.setMuted(c,oe),Se.setVolume(c?0:V),ln(_)&&(!oe||!c)&&Sf(c),!c&&V===0){let xe=Cr();P.setVolume(xe),ln(_)&&$f(xe),Se.setVolume(xe)}},Go=de(!1),Tr=c=>{var _,V;fe.log("set looped",{isLooped:c}),Go.set(c),P.setLooped(c),(V=(_=s==null?void 0:s.uiInfo)==null?void 0:_.onLoopedChanged)==null||V.call(_,c)};Tr(ne);let Yo=()=>{var c,_;(_=(c=s==null?void 0:s.uiInfo)==null?void 0:c.onReportProblem)==null||_.call(c)},Vo=(c,_=!1)=>{var V;U({message:`set autoplayNextEnabled, value: ${c}`}),fe.log("set autoplay next enabled",{autoplayNextEnabled:c}),Ut.ui.autoplayNextEnabled$.set(c),n_(c),_&&((V=s==null?void 0:s.onSetAutoplayNextEnabled)==null||V.call(s,c))},Nn=c=>{U({message:`set timerNextVideoRunning, value: ${c}`}),fe.log("set timer next video running",{timerNextVideoRunning:c}),Ut.ui.timerNextVideoRunning$.set(c)},Wr=(c=!0)=>{var V;let _=!0;if(c&&(s!=null&&s.onPrevVideoClick))try{_=(V=s==null?void 0:s.onPrevVideoClick)==null?void 0:V.call(s)}catch(oe){U({message:"onPrevVideoClick callback failed to execute"})}X(!0),_&&j()},je=(c=!0)=>{var V;let _=!0;if(c&&(s!=null&&s.onNextVideoClick))try{_=(V=s==null?void 0:s.onNextVideoClick)==null?void 0:V.call(s)}catch(oe){U({message:"onNextVideoClick callback failed to execute"})}X(!1),_&&ae()},It=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementShow)==null||c.call(s)},hi=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementClick)==null||c.call(s)},ao=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementAuto)==null||c.call(s)},Xi=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementCancel)==null||c.call(s)},Zi=()=>{P.prepare()},lo=()=>{br(Ut);let c=he(Ut.ui.controls.disabledControls$),_=he(Ut.playerPhase),V={playerPhase:_,isInteractive:x,isVideoEnded:!1,action:"none"};if(c.has("PLAY_BUTTON"))return;if(U({message:"toggle play"}),_==="ads"){V.action="play",fe.log("toggle adman play",V),Se.togglePlay();return}let oe=()=>{var Xe;U({message:"toggle play, call player.play"}),V.action="play",P.play(),(Xe=s==null?void 0:s.onPlay)==null||Xe.call(s)},xe=()=>{var Xe;U({message:"toggle play, call player.pause"}),V.action="pause",P.pause(),(Xe=s==null?void 0:s.onPause)==null||Xe.call(s)};if(P.info.isEnded$.getValue()){if(U({message:"toggle play, video ended, seek to 0"}),ci.next(),qt.next(Ds.REWIND),x){N==null||N();return}P.seekTime(0),oe()}else P.info.playbackState$.getValue()!==zl.PLAYING?oe():xe();fe.log("toggle play",V)},Ji=(c,{changeReason:_="default",appliesTo:V="to-video",byUser:oe=!1}={},xe)=>{U({message:`set quality, quality: ${c}`}),fe.log("set quality",{quality:c}),oe&&gi.next(c),P.setAutoQuality(c==="auto");let{qualityDetailsSubMenuEnabled:Xe}=ee.features;yu(),c!=="auto"?(Xe?(xu({type:"exact_quality",quality:c,videoId:i},V),P.setPredefinedQualityLimits(hs.UNKNOWN)):yf(i,c),Ko.set(c),P.setQuality(c)):Xe&&_==="default"&&(Ro("auto_quality",V,xe),he(Wo)&&dn(!1,void 0,xe),he(Ai)&&Dn(!1,void 0,xe))},dn=(c,_="as-default",V)=>{U({message:`set trafficSavingEnabled, value: ${c}`}),fe.log("set traffic saving enabled",{trafficSavingEnabled:c});let oe=c?hs.TRAFFIC_SAVING:hs.UNKNOWN;ee.features.qualityDetailsSubMenuEnabled?(co(oe,_,V),Vd(!1)):(P.setPredefinedQualityLimits(oe),ln(V)&&Vd(c))},Dn=(c,_="as-default",V)=>{U({message:`set highQualityEnabled, value: ${c}`}),fe.log("set high quality enabled",{highQualityEnabled:c}),co(c?hs.HIGH_QUALITY:hs.UNKNOWN,_,V)},co=(c,_,V)=>{c!==hs.UNKNOWN&&(he(Io)&&!he(er)&&Ji("auto",{appliesTo:_,changeReason:"limit-changed"},V),Ro(c,_,V)),P.setPredefinedQualityLimits(c)},Ro=(c,_,V)=>{ln(V)&&(xu({type:c,videoId:i},_),_==="as-default"&&xu({type:c,videoId:i},"to-video"))},_n=(c,_=!0)=>{fe.log("set playback rate",{playbackRate:c}),P.setPlaybackRate(c),ee.features.saveRate&&we&&!P.info.isLive$.getValue()&&_&&i_(c)},Ir=()=>{let c=he(go),_=he(Po),V=_.findIndex(({selected:xe})=>xe);if(V===_.length-1||!c)return _[V];let oe=_[V+1];return _n(oe.value),oe},Ge=()=>{let c=he(go),_=he(Po),V=_.findIndex(({selected:xe})=>xe);if(V===0||!c)return _[V];let oe=_[V-1];return _n(oe.value),oe},Xt=(c={...qo(),selected:!1},_)=>{fe.log("set subtitles",{...c}),c.value!==Pn&&Gi.next(c.isAuto?c.value+"_auto":c.value),Ue.next({enabled:c.value!==Pn,lang:c.language,auto:!!c.isAuto}),xr.set(c),ln(_)&&(Ef(c.value===Pn?void 0:c.language),ee.features.userVideoPrefs&&i&&kf(ee.userSalt,String(i),{subtitleTrackId:c.value===Pn?void 0:c.value}))},Ti=c=>{fe.log("toggle subtitles");let _=he(Ii);(_==null?void 0:_.value)===Pn?jo(c):On(c)},No=(c,_)=>{fe.log("change subtitle",{enabled:c}),c?jo(!0,_):On(!0)},jo=(c,_)=>{fe.log("subtitle on");let V=he(Sr),oe=he(_e),xe=Ie!=null?Ie:oe,Xe;_&&(Xe=V.find(Ct=>Ct.value===_)),Xe!=null||(Xe=V.filter(Ct=>Ct.value!==Pn).find(Ct=>Ct.language===xe)),Xt(Xe!=null?Xe:V[1],c)},On=c=>{fe.log("subtitle off"),Xt(void 0,c)};ye.add(P.info.availableTextTracks$.subscribe(c=>{var V;function _(){let oe=[];for(let{language:xe,isAuto:Xe,id:Ct}of c){let Ot=xe&&oc(xe);xe&&Ot&&oe.push({id:Ct,language:xe,title:Xe?pt("subtitles_auto",{language:Ot}):Ot})}return oe}(V=s==null?void 0:s.onAvailableSubtitlesChanged)==null||V.call(s,_())}));let $o=de(!0),dr=c=>{$o.set(c)},Bn=(c,_,V=!0)=>{var oe;if(U({message:`seek to time, time: ${c}`}),fe.log("seek to time",{time:c,action:_,forcePrecise:V}),qt.next(_),P.info.isLive$.getValue()){let xe=P.info.duration$.getValue(),Xe=Math.min(0,xe+c);P.seekTime(Xe,V)}else{if(T!=null&&T.getValue())return;P.info.isEnded$.getValue()&&(U({message:"seek after ended, call callbacks.onPlay"}),(oe=s==null?void 0:s.onPlay)==null||oe.call(s)),P.seekTime(Dv(c),V)}},Hs=c=>{U({message:`seek to episode start time: ${c}`}),fe.log("seek to episode start time",{time:c}),Bn(c,Ds.EPISODE,!0)},Us=(c,_,V=!1)=>{U({message:`seek to percent, percent: ${c}`}),fe.log("seek to percent",{percent:c,action:_});let oe=he(ko)*c;Bn(oe,_,V)},xs=c=>{U({message:`seek external, time: ${c}`}),fe.log("seek external",{time:c}),qt.next(Ds.UNKNOWN),P.seekTime(P.info.isLive$.getValue()?-c:c)},bn=c=>{var oe,xe;let _=(oe=c.max)!=null?oe:"none",V=(xe=c.min)!=null?xe:"none";U({message:`set auto quality limitation. Max: ${_}. Min: ${V}`}),fe.log("set auto quality limits",{max:_,min:V}),P.setAutoQualityLimits(c)},zs=c=>{U({message:`seek external to episode start time: ${c}`}),fe.log("seek external to episode start time",{time:c}),Bn(c,Ds.EPISODE,!0)},ua=c=>{U({message:`set playback rate to: ${c}`}),fe.log("set playback rate external",{playbackRate:c}),P.setPlaybackRate(c)},cr=de(!1),ss=de(!1),ut=ui([ko],([c])=>!!p&&c>=ee.suitableDurationForUsingRichSeek&&ee.features.useRichSeek&&!x),li=((p==null?void 0:p.frameWidth)||0)>=((p==null?void 0:p.frameHeight)||0),me=ui([Qt],([c])=>{let _=Ul(c);return li?!_:_});ye.add(ze.subscribe(c=>{c!=="video"&&cr.set(!1)}));let ft=de(void 0),Jt=de(!1),xi=c=>{U({message:`start scrubbing, progress: ${c}`}),fe.log("start scrubbing",{progress:c}),Jt.set(!0),eo(c)},eo=c=>{ft.set(c)},Ei,ri,_i=()=>{ft.set(void 0),Jt.set(!1)},Vi=()=>{clearTimeout(ri),clearTimeout(Ei),Ei=window.setTimeout(()=>{_i()},500),ke==null||ke.removeEventListener("seeked",Vi)},Fn=(c,_=!1)=>{U({message:`complete scrubbing, progress: ${c}`}),fe.log("complete scrubbing",{progress:c}),Us(c,Ds.SLIDER,_),he(Ut.ui.isMobile)&&he(Ut.state.currentFormat$)===nc.HLS?(ke==null||ke.addEventListener("seeked",Vi),ri=window.setTimeout(()=>{Vi()},300)):_i()},Er=ui([zt,ko,ft],([c,_,V],oe)=>{oe(Bx(V)?V*_:c)}),yo=de(!1),tl=()=>{yo.set(!0)},il=()=>{yo.set(!1)},ws=ui([Ht],([{width:c}],_)=>{let V=F_(c);_(V)}),Kr=K.filter(c=>Hh(c)),Ws=ui([ws,Be],([c,_])=>_?Kr.filter(V=>!V.hideOnMobile):Kr.filter(V=>{var oe;return!((oe=V.hideOnDesktopGridTypes)!=null&&oe.includes(c))})),kr=de(K.filter(c=>Uh(c))),ol=ui([kr,ws],([c,_])=>c.filter(V=>{var oe;return!((oe=V.hideOnDesktopGridTypes)!=null&&oe.includes(_))})),Ss=ui([ol,Ws],([c,_])=>[...ee.features.additionalButtonsDesktopControlPanelRight?c.filter(V=>V.type==="desktop-control-panel-right"):[],...ee.features.additionalButtons?_.map((V,oe)=>{var xe;return{id:oe,weight:oe,type:"desktop-control-panel-right",testId:V.testId,icon:V.iconUrl,onClick:V.onClick,ariaLabel:(xe=V.ariaLabel)!=null?xe:V.tooltip,tooltipText:V.tooltip}}):[]].filter(V=>!v.disabledAdditionalButtonIds.includes(V.id))),$n=de(H),nl=ui([$n],([c])=>ee.features.additionalSettingsMenuItems?c.map(_=>_.type==="SWITCH"?{..._,onClick:_.onChangeEnabled}:_):[]),pa=(c,_)=>{let V=he(kr).map(oe=>oe.id!==c?oe:{...oe,..._});kr.set(V)},Zl=c=>{let _=he(kr);if(_.some(V=>V.id===c.id)){U({message:`Additional button with id: "${c.id}" was exist! Can't add more with the same id`});return}_.push(c),kr.set(_)},rl=c=>{let _=he(kr);if(!_.some(V=>V.id===c)){U({message:`Can't find additional button with id: "${c}"! Can't remove item with this id`});return}_=_.filter(V=>V.id!==c),kr.set(_)},Jl=c=>{qt.next(Ds.LIVE),U({message:"live switch to low latency "+c}),fe.log("live switch to low latency "+c),P.setLiveLowLatency(c)},fa=(c,_)=>{let V=he($n).map(oe=>oe.id!==c?oe:{...oe,..._});$n.set(V)},ed=c=>{let _=he($n);if(_.some(V=>V.id===c.id)){U({message:`Settings menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}_.push(c),$n.set(_)},sl=c=>{let _=he($n);if(!_.some(V=>V.id===c)){U({message:`Can't find settings menu item with id: "${c}"! Can't remove item with this id`});return}_=_.filter(V=>V.id!==c),$n.set(_)},Pr=de(z),ma=ui([Pr],([c])=>ee.features.additionalContextMenuItems?c:[]),al=(c,_)=>{let V=he(Pr).map(oe=>oe.id!==c?oe:{...oe,..._});Pr.set(V)},va=c=>{let _=he(Pr);if(_.some(V=>V.id===c.id)){U({message:`Context menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}_.push(c),Pr.set(_)},at=c=>{let _=he(Pr);if(!_.some(V=>V.id===c)){U({message:`Can't find context menu item with id: "${c}"! Can't remove item with this id`});return}_=_.filter(V=>V.id!==c),Pr.set(_)},lt=ui([Be,Ce],([c,_],V)=>{V(c&&_)}),Ri=()=>{qt.next(Ds.LIVE),U({message:"switch to active live"}),fe.log("switch to active live"),P.seekTime(0),P.info.playbackState$.getValue()!==zl.PLAYING&&Ut.actions.internal.togglePlay()},uo=()=>{fe.log("skip adman"),Se.skip()},Ni=(c=!0)=>{var oe;br(Ut),U({message:`switch from ads to video, callPlay: ${c}`}),fe.log("switch from ads to video",{callPlay:c}),ue.set("video"),c&&P.play(),l&&Mo(!0,!0);let _=(oe=he(Qe))==null?void 0:oe.muted,V=!P.info.muted$.getValue();_!==void 0&&!V&&Mo(_,!0),Qe.set(void 0)},fi=()=>{br(Ut),U({message:"switch from video to ads"}),fe.log("switch from video to ads"),Ut.actions.internal.pause(),Ho(),ue.set("ads")},Hi=c=>{br(Ut);let _=c?"LiveWaitingStart":"thumb";fe.log("set live waiting start",{state:c,playerPhase:_}),ue.set(_)},Ks=c=>{br(Ut);let _=c?"LiveWaitingRecover":"thumb";fe.log("set live waiting recover",{state:c,playerPhase:_}),ue.set(_)},td=c=>{br(Ut);let _=c?"LiveWaitingRecord":"thumb";fe.log("set live waiting record",{state:c,playerPhase:_}),ue.set(_)},Vc=()=>(br(Ut),fe.log("get debug text data"),Oh(P,Pe,Ut,Re.getTraceId())),Rc=()=>(br(Ut),JSON.stringify(Re.getFinishedSpans())),Nc=()=>(br(Ut),Bh(P,Pe,Ut)),ll=()=>ke,Dc=()=>{U({message:"toggle chromecast"}),fe.log("toggle chromecast"),P.toggleChromecast()},ga=c=>{var V;if(br(Ut),P.info.isEnded$.getValue())return;let _=!c;if(he(Ut.playerPhase)==="ads"){U({message:`pause ads, internalCall: ${_}`}),fe.log("pause ads",{internalCall:_}),Se.pause();return}U({message:`pause video, internalCall: ${_}`}),fe.log("pause video",{internalCall:_}),_&&((V=s==null?void 0:s.onPause)==null||V.call(s)),P.pause()},ha=c=>{var V;br(Ut);let _=!c;if(he(Ut.playerPhase)==="ads"){U({message:`play ads, internalCall: ${_}`}),fe.log("play ads",{internalCall:_}),Se.play();return}U({message:`play video, internalCall: ${_}`}),fe.log("play video",{internalCall:_}),_&&((V=s==null?void 0:s.onPlay)==null||V.call(s)),P.play()},hp=c=>{br(Ut);let _=!c;if(he(Ut.playerPhase)==="ads"){U({message:"player cannot be stopped during ads via external method"});return}U({message:`player will be stopped, internalCall: ${_}`}),L==null||L()},id=(c,_)=>{br(Ut),U({message:`first start, show ads: ${c}, internalCall: ${!_}`}),fe.log("first start",{showAds:c,external:_}),c?ue.set("ads"):(ue.set("video"),_?P.play():Ut.actions.internal.togglePlay())},od=()=>(U({message:"getting time codes"}),f),Oc=()=>{let c=od();if(!c||[0,1].includes(c.length))return;let _=P.info.position$.getValue();return c.find(V=>V.time>_)},_p=c=>{let _=c;_||(_=Oc());let V=P.info.position$.getValue();fe.log("seek to next episode",{currentTime:V,..._}),_&&(U({message:"seek to next episode"}),Bn(_.time,Ds.EPISODE,!0))},Fe=()=>{let c=od();if(!c||[0,1].includes(c.length))return;let _=P.info.position$.getValue(),V=c.findIndex(xe=>xe.time>_),oe=V===-1?c.length-2:V-2;if(!(oe<0))return c[oe]},mi=c=>{let _=c;_||(_=Fe());let V=P.info.position$.getValue();fe.log("seek to prev episode",{currentTime:V,..._}),_&&(U({message:"seek to prev episode"}),Bn(_.time,Ds.EPISODE,!0))},Xo=()=>(U({message:"getting preview thumbs data"}),fe.log("get preview thumbs data",{...p}),p),Ar=async()=>{let c=ie==null?void 0:ie.isActive(),_="none";ie!=null&&ie.isActive()?(_="exit",await(ie==null?void 0:ie.exit())):(_="request",await(ie==null?void 0:ie.request())),fe.log("toggle picture in picture",{isActive:c,action:_})},yn=(c=-90)=>{fe.log("rotate video",{alphaDiff:c}),Qt.update(_=>_+c)},Bc=de([]);I==null||I.subscribe(c=>{let _=[];for(let V=0;V<c.length;V++){let{range:[oe,xe],subjects:Xe}=c[V];V===0&&oe!==0&&_.push({time:0,text:"",interactive:!1,completed:!0}),_.push({time:oe/1e3,text:"",interactive:!0,completed:ee.features.interactiveTimeOpenUri?!Xe.length||Xe.every(Ct=>Ct.isRemoved):!Xe.length}),xe!==1/0&&_.push({time:xe/1e3,text:"",interactive:!1,completed:!0})}Bc.set(_)});let Ub=de(!1);T==null||T.subscribe(c=>{c&&he(Jt)&&_i()});let Dv=c=>{if(!x)return c;let _=he(Bc),V=he(ko),xe=he(Yn)/V,Xe=_.find(Ct=>Ct.interactive&&!Ct.completed&&Ct.time>xe);return typeof(Xe==null?void 0:Xe.time)=="number"?Math.min(c,Xe.time-.05):c},zb=()=>{Ut.ui.episodes.panelOpened$.set(!1)},Wb=()=>{fe.log("destroy store"),clearTimeout(ri),clearTimeout(Ei),ye.unsubscribe(),Uo.unsubscribe(),P.destroy(),Se.destroy(),J==null||J.destroy(),Z==null||Z.destroy(),G.unsubscribe(),Yi==null||Yi.disconnect(),Yi=null,tt.destroy()},Kb=ui([hn,ze,go],([c,_,V])=>v.features.doubleForwardAvailable&&!c&&_==="video"&&V),bp=de(!1),Ov=2,Fc=null,Bv=c=>{if(!he($r)&&c)return;let _=P.info.currentPlaybackRate$.getValue();c?_!==Ov&&(Fc=_,_n(Ov,!1),bp.set(!0)):(Fc&&_n(Fc,!1),bp.set(!1),Fc=null)};ze.subscribe(c=>{c!=="video"&&Bv(!1)});let qb=()=>{ga(!1),cr.set(!0)},Qb=()=>{ha(!1),cr.set(!1)},$p=!1,Gb=()=>{ss.set(!0),$p=P.info.playbackState$.getValue()===zl.PLAYING,ga(!1)},Yb=()=>{ss.set(!1),!he(cr)&&$p&&ha(!1),$p=!1};P.events.playing$.subscribe(()=>{he(cr)&&ga(!1)});let Ut={interfaceLanguage$:_e,isCyrillicRelatedInterface$:rt,initVideo:di,videoId:i,isClip:o,playerPhase:ze,vsid:Lt,state:{positionExact$:zt,positionWithScrubbing$:Er,duration$:ko,playbackState$:st,playbackStateRealistic$:Fi,isPlaying$:$r,isLoaderVisible:Qi,bufferedProgress$:an,isLive$:ro,canChangePlaybackSpeed$:go,isActiveLive$:hn,isOldestAvailableLive$:os,isRewindableLive$:so,isEnded$:Co,muted$:To,volume$:ho,trafficSavingEnabled$:Wo,highQualityEnabled$:Ai,autoQualityLimitingAvailable$:Io,availableVideoStreams$:jn,availableAudioStreams$:Vn,videoStream$:_o,audioStream$:Xn,currentQuality$:bo,isAutoQualityEnabled$:er,availableQualities$:or,currentPlaybackRate$:Rn,availablePlaybackRates$:Po,currentSubtitle$:Ii,availableTextTracks$:nr,availableSubtitlesList$:Sr,currentSubtitleCaptions$:jt,isAutoSubtitleCaptionVisible$:Ci,chromecastState$:Ln,chromecastDeviceName$:bs,chromecastConnected$:yr,currentFormat$:is,throughputEstimation$:$s,videoBitrate$:Br,videoSize$:Mn,errorLog$:Rt,crashed$:Ce,isAudioAvailable$:Eo,isAudioDisabled:!!l,canDownload:ee.features.download&&!!d,availableSources$:Li,hasMpegSources$:ji,isInteractive:x,showInteractiveGraph:ee.features.interactiveGraph,showSeekToInteractive:ee.features.seekToInteractive,showPlayPrevChapter:ee.features.interactivePlayPrevChapter,showInteractiveTimeIndicator:ee.features.interactiveTimeIndicator&&!!he(Bc).length,interactiveEpisodes$:Bc,isInteractiveTime$:T?ti(T):de(!1),isInteractiveExpectation$:Ub,hasInteractiveBranches:E,playPrevChapterDisabledTooltip:k,looped$:Go,loadedMetadata$:Tt,isAutoQualityAvailable$:ir,previewTrackActive:cr,previewTrackDragInProgress:ss},ui:{t:pt,controlsVisible:de(!1),touched:de(!1),controls:{prevButton:de(void 0),playButton:de(void 0),replayButton:de(void 0),nextButton:de(void 0),playPrevChapterButton:de(void 0),seekToInteractiveButton:de(void 0),interactiveGraphButton:de(void 0),liveButton:de(void 0),time:de(void 0),episodes:de(void 0),volume:de(void 0),subtitles:de(void 0),settings:de(void 0),context:de(void 0),chromecast:de(void 0),pip:de(void 0),fullscreen:de(void 0),vkLogo:de(void 0),interactiveTimeIndicator:de(void 0),timeline:de(void 0),autoplayNextToggle:de(void 0),additionalButtons:K.length?K.reduce(c=>[...c,de(void 0)],[]):[],disabledControls$:Nt},modals:{hotKeyMap:{show:de(!1),data:de({title:"",closeBtnText:"",groups:[]})}},isFullscreen:mt,isFullscreenOpenedByKeyboard:Vt,rotateAlpha:Qt,isAutoplay:de(!1),debugPanelVisible:de(!1),episodes:{panelOpened$:de(!1),openedByKeyboard$:de(!1)},contextMenu:{visible$:de(!1),btnRef$:de(void 0),openedByBtnKeyboard$:de(!1),openedByHotKey$:de(!1),lastActiveElem$:de(void 0),showContextMenuBtn$:de(!1),position$:de({top:0,left:0})},playerSize:Ht,isMobile:Be,mobileNotReportControlHidden$:lt,icon3DVideoVisible:de(!1),scrubbingInProgress:Jt,volumeChangingInProgress:yo,is3DVideo:Mt,currentGridType$:ws,additionalButtonsDeprecated$:Ws,additionalDesktopControlPanelRightButtons$:Ss,additionalSettingsMenuItems$:nl,additionalContextMenuItems$:ma,interactiveHideMobileControls:de(!1),overlayContainer$:de(void 0),startedByKeyboard$:de(!1),autoplayNextEnabled$:de(!1),timerNextVideoRunning$:de(!0),settingsMenu:{visible$:de(!1),ref$:de(void 0),openedByBtnKeyboard$:de(!1)},settingsSubMenu:{visible$:de(!1),ref$:de(void 0),name$:de(void 0)},userActionsDisabled:de(!1),hiddenControls:{volume:de(!1),vkLogo:de(!1),pip:de(!1),chromecast:de(!1),settings:de(!1)},isControlsAvailable:$o,controlBlocks:{topLeft:de(void 0),topRight:de(void 0),middle:de(void 0),bottom:de(void 0),bottomLeft:de(void 0),bottomRight:de(void 0)},videoTitleInfo:de(void 0),doubleForwardOn$:bp,doubleForwardAvailable$:Kb,previewTrackNotificationVisible:de(!1),previewTrackActive:cr,previewTrackDragInProgress:ss,previewTrackAvailable:ut,isPreviewTrackHorizontallyAligned:me},ads:{position:de(0),duration:de(0),playbackState:de("inactive"),canSkip:de(!1),secondsToWatchBeforeSkip:de(0),postrollPassed:de(!1)},webApi:{pictureInPictureApi:ie,annotationsApi:De,slotsApi:Oe,focusManager:it},actions:{internal:{preload:Zi,firstStart:c=>id(c,!1),play:()=>ha(!1),pause:()=>ga(!1),togglePlay:lo,toggleMuted:ar,openSettingsMenu:ys,closeSettingsMenu:Mi,openSettingsSubMenu:rs,closeSettingsSubMenu:zr,setVolume:c=>lr(c,!1),setMuted:c=>Mo(c,!1),startVolumeChanging:tl,stopVolumeChanging:il,setVideoStream:Zn,setAudioStream:c=>ns(c,!1),setQuality:(c,_)=>Ji(c,_,!1),setTrafficSavingEnabled:(c,_)=>dn(c,_,!1),setHighQualityEnabled:(c,_)=>Dn(c,_,!1),setPlaybackRate:_n,incrementPlaybackRate:Ir,decrementPlaybackRate:Ge,setSubtitle:c=>Xt(c,!1),toggleSubtitle:()=>Ti(!1),togglePictureInPicture:Ar,startScrubbing:xi,progressScrubbing:eo,completeScrubbing:Fn,toggleChromecast:Dc,switchToActiveLive:Ri,switchFromAdsToVideo:Ni,switchFromVideoToAds:fi,skipAd:uo,setLiveWaitingStart:Hi,setLiveWaitingRecover:Ks,setLiveWaitingRecord:td,getDebugTextData:Vc,getTraceTextData:Rc,getDebugPanelData:Nc,getVideoElement:ll,seekTime:(c,_,V)=>Bn(c,_,V),clearDelayedBufferingCheckTimeout:Hr,seekEpisodeStartTime:Hs,seekToPercent:Us,getNextEpisode:Oc,seekToNextEpisode:_p,getPrevEpisode:Fe,seekToPrevEpisode:mi,startLogging:wt,stopLogging:Dt,startCameraManualRotation:q,stopCameraManualRotation:yt,moveCameraFocusPX:yi,holdCamera:Yt,releaseCamera:Ke,getVideoEpisodes:od,getPreviewThumbsData:Xo,downloadVideo:sr,addLanguage:Pf,setLanguage:le,nextMovie:$t,videoRotate:yn,correctSeekTimeToInteractive:Dv,replayInteractive:N,setLooped:Tr,reportProblem:Yo,setAutoplayNextEnabled:Vo,setTimerNextVideoRunning:Nn,prevVideoClick:Wr,nextVideoClick:je,nextVideoAnnouncementShow:It,nextVideoAnnouncementClick:hi,nextVideoAnnouncementAuto:ao,nextVideoAnnouncementCancel:Xi,checkFullscreenSupport:dt,changeDoubleForwardOn:Bv,closePreviewTrack:Qb,previewTrackOpened:qb,previewTrackDragStarted:Gb,previewTrackDragFinished:Yb},external:{firstStart:c=>id(c,!0),play:()=>ha(!0),pause:()=>ga(!0),stop:()=>hp(!0),seekTime:c=>xs(c),seekEpisodeStartTime:c=>zs(c),setPlaybackRate:c=>ua(c),setAutoQualityLimits:c=>bn(c),setMuted:c=>Mo(c,!0),toggleSubtitle:()=>Ti(!0),changeSubtitle:No,setVolume:c=>lr(c,!0),returnFocusToEpisodes:zb,updateAdditionalSettingsItem:fa,addAdditionalSettingsItem:ed,removeAdditionalSettingsItem:sl,updateAdditionalContextItem:al,addAdditionalContextItem:va,removeAdditionalContextItem:at,updateAdditionalButton:pa,addAdditionalButton:Zl,removeAdditionalButton:rl,setLiveLowLatency:Jl,hideControls:()=>dr(!1),showControls:()=>dr(!0),setQuality:c=>Ji(c,{appliesTo:"to-video"},!0),setTrafficSavingEnabled:c=>dn(c,"to-video",!0),setHighQualityEnabled:c=>Dn(c,"to-video",!0),changeAudioStream:Zt}},callbacks:s,setUiCallbacks:c=>{He={...c}},getAdmanWrapper:()=>Se,getLogger:()=>We,getPlayer:()=>P,destroy:Wb};return Ut};function sn(t,e,i,o,r=!1){var p;let a=(p=e[i])==null?void 0:p.getBoundingClientRect(),l=(o||r)&&!!a&&!!(a.right-a.left),{top:d,left:s,bottom:u,right:f}=Ns(e[i],t||void 0);return{left:l?s:0,right:l?f:0,top:l?d:0,bottom:l?u:0,isDisplayed:l}}var jx=["disabledControls$","additionalButtons"],Xx=["interactiveTimeIndicator"],ql=(t,e,i,o)=>{if(t){for(let[r,a]of Object.entries(e))if(!jx.includes(r)){let l=o||Xx.includes(r);a.set(sn(t,i,r,l))}}};var Xu=async(t,e,i)=>{await vo(),e&&i&&(i.focus(),t.set(!1))};var Zx=Te('<path d="M18 10c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2Zm-6 4c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2Zm-6 0c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2Z"></path>');function $m(t){Je(t,{children:(e,i)=>{var o=Zx();b(e,o)},$$slots:{default:!0}})}function ym(t,e){B(e,!0);let[i,o]=Ve(),r=()=>w(s,"$contextMenuVisible$",i),a=g(e,"disabled",3,!1),l=g(e,"ariaLabel",3,""),d=ge(),s=d.ui.contextMenu.visible$,u=d.ui.contextMenu.openedByBtnKeyboard$,f=d.ui.contextMenu.showContextMenuBtn$,p=d.ui.contextMenu.position$,v=d.ui.contextMenu.btnRef$,$=W(void 0);Ne(()=>{n($)&&St(()=>{v.set(n($))})});let y=T=>{let N=sa(T),L=M_(n($));p.set(L),u.set(N),s.set(!r())},h=()=>{f.set(!0)},x=()=>{f.set(!1)},I=m(()=>r()?"opened":"");Ft(t,{get className(){return n(I)},testId:"btn-context-menu",get disabled(){return a()},get ariaLabel(){return l()},click:y,focus:h,blur:x,get ariaExpanded(){return r()},get ref(){return n($)},set ref(T){D($,T,!0)},children:(T,N)=>{$m(T,{})},$$slots:{default:!0}}),F(),o()}var Jx=t=>{t.stopPropagation()},e2=M("<div><!> <div></div> <div></div></div>"),t2={hash:"s-26",code:'.interactive-episode-icon-animated.s-26{height:32px;opacity:1;position:absolute;right:16px;top:16px;transition:.3s;width:32px}.interactive-episode-icon-animated.icon-small.s-26{height:28px;width:28px}.invisible.s-26{opacity:0;visibility:hidden}.fullscreen.s-26:not(.mobile){height:40px;right:23px;top:19px;width:40px}.mobile.s-26{height:28px;right:14px;top:12px;width:28px}.fullscreen.mobile.s-26{height:32px;width:32px}@media screen and (orientation:portrait){.interactive-episode-icon-animated.mobile.fullscreen.s-26{right:16px;top:40px}}@keyframes s-26-pulse{0%{border-width:1px;opacity:0;transform:scale(1)}10%{opacity:1}50%{border-width:1px;opacity:.5;transform:scale(1.5)}to{border-width:.5px;opacity:0;transform:scale(1.5)}}.pulse.s-26{animation:s-26-pulse 1s infinite;border:1px solid #fff;border-radius:100%;bottom:0;content:"";display:block;left:0;pointer-events:none;position:absolute;right:0;top:0;transform:scale(1.8);transition:.3s}.pulse.paused.s-26{animation-play-state:paused}.interactive-episode-icon-animated svg{height:100%;width:100%}.ref-block.s-26{height:100%;position:absolute;top:0;visibility:hidden;width:100%}.hidden.s-26{display:none}'};function rc(t,e){var Z;B(e,!0),Q(t,t2);let[i,o]=Ve(),r=()=>w(x,"$isMobile",i),a=()=>w(L,"$areControlsVisible",i),l=()=>w(k,"$currentGridType$",i),d=()=>w(T,"$isInteractiveTime$",i),s=()=>w(h,"$interactiveControlsOpacity$",i),u=()=>w(N,"$showInteractiveTimeIndicatorTooltip$",i),f=()=>w(I,"$isFullscreen",i),p=g(e,"ref",15,void 0),v=W(void 0),$=ge(),y=wo(),{interactiveControlsOpacity$:h}=y,x=$.ui.isMobile,I=$.ui.isFullscreen,T=$.state.isInteractiveTime$,N=y.showInteractiveTimeIndicatorTooltip$,L=$.ui.controlsVisible,E=(Z=$.callbacks)==null?void 0:Z.onInteractiveTimeIndicatorClick,k=$.ui.currentGridType$,K=m(()=>!r()&&a()),H=m(()=>Rs(l(),"s")),z=m(()=>!d()||!!s()||n(K)),j=W(!1);Ne(()=>{D(j,n(z),!0)});let ae=()=>{D(j,!0)},X=()=>{var ie;ne(),(ie=n(v))==null||ie.addEventListener("animationiteration",ae,{once:!0})},ne=()=>{var ie;D(j,!1),(ie=n(v))==null||ie.removeEventListener("animationiteration",ae)},J=ie=>{N.set(ie)},we=m(()=>u()&&!n(z));Ne(()=>{u()?X():ne()});let pe=()=>{n(z)||(N.set(!0),E==null||E())};pn(()=>{N.clearTimeout(),ne()});let re=()=>{N.set(!1)},be=Y("tooltip_interactive_interaction_time_indicator");var $e=e2();let ee;$e.__mousemove=[Jx],$e.__click=pe;var Re=C($e);Fo(Re,{get tooltipContent(){return be},get tooltipVisible(){return n(we)},initialTranslateYPx:72,tooltipPlacement:"bottom",onTooltipVisibilityChange:J,get ref(){return p()},set ref(ie){p(ie)},children:(ie,De)=>{Xd(ie,{completed:!0})},$$slots:{default:!0}});var fe=A(Re,2);let P;Ze(fe,ie=>p(ie),()=>p());var We=A(fe,2);let Se;Ze(We,ie=>D(v,ie),()=>n(v)),S($e),O((ie,De,Oe)=>{ee=se($e,1,"interactive-episode-icon-animated s-26",null,ee,ie),P=se(fe,1,"ref-block s-26",null,P,De),Se=se(We,1,"pulse s-26",null,Se,Oe)},[()=>({mobile:r(),fullscreen:f(),invisible:n(z),"icon-small":n(H)}),()=>({hidden:n(z)}),()=>({paused:n(j)})]),nt("mouseleave",$e,re),b(t,$e),F(),o()}Ye(["mousemove","click"]);function Zu(t,e){B(e,!0);let i=g(e,"tooltipEnabled",3,!0),o=g(e,"disabled",3,!1),r=g(e,"className",3,void 0),a=g(e,"ref",15),l=g(e,"tooltipVisible",3,!1);Fo(t,{get disabled(){return o()},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},get hasTooltip(){return i()},get mouseEnter(){return e.mouseEnter},get mouseLeave(){return e.mouseLeave},get tooltipVisible(){return l()},get className(){return r()},get ref(){return a()},set ref(d){a(d)},children:(d,s)=>{var u=Ae();let f=m(()=>e.buttonComponent);var p=ce(u);Bi(p,()=>n(f),(v,$)=>{$(v,Jr(()=>{var y;return(y=e.buttonComponentProps)!=null?y:{}}))}),b(d,u)},$$slots:{default:!0}}),F()}var Os={prevButton:100,replayButton:200,playButton:300,nextButton:400,playPrevChapterButton:500,seekToInteractiveButton:600,interactiveGraphButton:700,liveButton:800};var o2=Te('<path d="M32 21.68V15a2 2 90 114 0v18a2 2 90 01-4 0v-6.66l-16.3 9.32A2.48 2.48 90 0112 33.56V14.46c0-1.9 2.06-3.08 3.7-2.12z"></path>');function ca(t,e){B(e,!0);let i=g(e,"reversed",3,!1),o=m(()=>i()?"transform: scaleX(-1);transform-origin: 50%;":void 0),r=m(()=>`${fn(e.size)}${n(o)}`),a=m(()=>i()?"prev-icon":"next-icon");Je(t,{get width(){return"48"},get height(){return"48"},get style(){return n(r)},get testId(){return n(a)},get shadow(){return e.shadow},children:(l,d)=>{var s=o2();b(l,s)},$$slots:{default:!0}}),F()}var n2=M('<div class="icon-background-mobile s-24"><!></div>'),r2={hash:"s-24",code:".icon-background-mobile.s-24{align-items:center;background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);display:flex;height:100%;justify-content:space-around;left:0;position:absolute;top:0;width:100%}"};function Wa(t,e){B(e,!0),Q(t,r2);let i=g(e,"ref",15,void 0),o=g(e,"isMobile",3,!1),r=g(e,"disabled",3,!1),l=ge().ui.t,d=m(()=>e.type==="prev"?l("tooltip_previous"):l("tooltip_next")),s=m(()=>e.type==="prev"?l("hotkey_map_item_prev_video_value"):l("hotkey_map_item_next_video_value")),u=m(()=>`btn-${o()?"m":"d"}--${e.type}`);Ft(t,{get className(){return n(u)},get testId(){var f;return`btn-${(f=e.type)!=null?f:""}`},get disabled(){return r()},get ariaLabel(){return n(d)},get click(){return e.click},get ariaKeyShortCut(){return n(s)},get ref(){return i()},set ref(f){i(f)},children:(f,p)=>{var v=Ae(),$=ce(v);{var y=x=>{var I=n2(),T=C(I);let N=m(()=>e.type==="prev");ca(T,{get size(){return"32"},get reversed(){return n(N)}}),S(I),b(x,I)},h=x=>{let I=m(()=>e.type==="prev");ca(x,{get size(){return"24"},get reversed(){return n(I)}})};R($,x=>{o()?x(y):x(h,!1)})}b(f,v)},$$slots:{default:!0}}),F()}var s2=Te('<path d="M24 21.2a.8.8 90 01-1.34.6L14.08 14a1.34 1.34 90 010-2l8.6-7.8a.8.8 90 011.32.6V11a16 16 90 11-16 16 2 2 90 114 0 12 12 90 1012-12z"></path>');function sc(t,e){B(e,!0);let i=m(()=>fn(e.size));Je(t,{get width(){return"48"},get height(){return"48"},get style(){return n(i)},testId:"replay-icon",get shadow(){return e.shadow},children:(o,r)=>{var a=s2();b(o,a)},$$slots:{default:!0}}),F()}import{noop as a2}from"@vkontakte/videoplayer-shared/es2018";var l2=M('<div class="icon-background-mobile s-27"></div>'),d2=M("<!> <div><!></div>",1),c2={hash:"s-27",code:".mobile.s-27{align-items:center;display:flex;justify-content:center;position:relative}.icon-background-mobile.s-27{background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);height:calc(100% - 32px);left:16px;position:absolute;top:16px;width:calc(100% - 32px)}"};function Ql(t,e){B(e,!0),Q(t,c2);let i=g(e,"ref",15,void 0),o=g(e,"isMobile",3,!1),r=g(e,"disabled",3,!1),a=g(e,"className",3,""),l=g(e,"click",3,a2),d=Y("tooltip_restart"),s=m(()=>`${o()?"btn-m--play":""} ${a()}`);Ft(t,{get className(){return n(s)},testId:"replay-btn",get ariaLabel(){return d},get disabled(){return r()},get click(){return l()},get ariaKeyShortCut(){return fs.KeyK},get ref(){return i()},set ref(u){i(u)},children:(u,f)=>{var p=d2(),v=ce(p);{var $=T=>{var N=l2();b(T,N)};R(v,T=>{o()&&T($)})}var y=A(v,2);let h;var x=C(y);let I=m(()=>o()?"48":"24");sc(x,{get size(){return n(I)}}),S(y),O(T=>h=se(y,1,"s-27",null,h,T),[()=>({mobile:o()})]),b(u,p)},$$slots:{default:!0}}),F()}var u2=Te('<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 Bs(t,e){B(e,!0);let i=m(()=>fn(e.size));Je(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(i)},testId:"pause-icon",get shadow(){return e.shadow},children:(o,r)=>{var a=u2();b(o,a)},$$slots:{default:!0}}),F()}import{noop as p2}from"@vkontakte/videoplayer-shared/es2018";var f2=M('<div class="icon-background-mobile s-22"><!></div>'),m2={hash:"s-22",code:".icon-background-mobile.s-22{align-items:center;background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);display:flex;height:calc(100% - 32px);justify-content:space-around;left:16px;position:absolute;top:16px;width:calc(100% - 32px)}"};function Gl(t,e){B(e,!0),Q(t,m2);let[i,o]=Ve(),r=()=>w(a,"$fakeIsPlaying$",i),{fakeIsPlaying$:a}=wo(),l=g(e,"ref",15,void 0),d=g(e,"isMobile",3,!1),s=g(e,"isPlaying",3,!1),u=g(e,"disabled",3,!1),f=g(e,"className",3,""),p=g(e,"click",3,p2),$=ge().ui.t,{toggle:y}=a,h=m(()=>y),x=m(()=>r()!==null),I=m(()=>n(x)?r():s()),T=m(()=>n(I)?$("tooltip_pause"):$("tooltip_play")),N=m(()=>n(I)?Bs:kn),L=m(()=>`${d()?"btn-m--play":""} ${f()}`),E=m(()=>n(x)?n(h):p());Ft(t,{get className(){return n(L)},testId:"play-btn",get click(){return n(E)},get disabled(){return u()},get ariaLabel(){return n(T)},get ariaKeyShortCut(){return fs.KeyK},get ref(){return l()},set ref(k){l(k)},children:(k,K)=>{var H=Ae();let z=m(()=>n(N));var j=ce(H);{var ae=ne=>{var J=f2(),we=C(J);Bi(we,()=>n(z),(pe,re)=>{re(pe,{get size(){return"48"}})}),S(J),b(ne,J)},X=ne=>{var J=Ae(),we=ce(J);Bi(we,()=>n(z),(pe,re)=>{re(pe,{get size(){return"24"}})}),b(ne,J)};R(j,ne=>{d()?ne(ae):ne(X,!1)})}b(k,H)},$$slots:{default:!0}}),F(),o()}var v2=Te('<path d="M12.58 12.92v2.5a1 1 0 0 1-1.52.85l-5.58-3.42a1 1 0 0 1 0-1.7l5.58-3.42a1 1 0 0 1 1.52.86v2.5l5.48-3.36a1 1 0 0 1 1.52.86v6.82a1 1 0 0 1-1.52.86z"></path>');function xm(t){Je(t,{testId:"play-prev-chapter-icon",children:(e,i)=>{var o=v2();b(e,o)},$$slots:{default:!0}})}function ac(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"hidden",3,!1),r=g(e,"disabled",3,!1),a=Y("tooltip_interactive_go_back"),l=m(()=>o()?"hidden":"");Ft(t,{get className(){return n(l)},testId:"play-prev-chapter-btn",get ariaLabel(){return a},get disabled(){return r()},get click(){return e.click},get ref(){return i()},set ref(d){i(d)},children:(d,s)=>{xm(d,{})},$$slots:{default:!0}}),F()}var g2=M('<span class="gutter s-25"><span><!></span></span>'),h2={hash:"s-25",code:".gutter.s-25{--gutterWidth:32px;--gutterHeight:12px;--togglerWidth:18px;--togglerHeight:18px;--togglerGap:calc(var(--togglerWidth)/6);background-color:hsla(0,0%,100%,.3);border-radius:50px;height:var(--gutterHeight);position:relative;width:var(--gutterWidth)}.toggler.s-25{align-items:center;background-color:#626364;border-radius:50%;display:flex;height:var(--togglerHeight);justify-content:center;left:0;position:absolute;top:calc((var(--togglerHeight) - var(--gutterHeight))/2*-1);transform:translateX(calc(var(--togglerGap)*-1));transition-duration:.2s;transition-property:background-color,transform;transition-timing-function:ease;width:var(--togglerWidth)}.toggler.enabled.s-25{background-color:var(--toggle-color-autoplay-on);transform:translateX(calc(var(--gutterWidth) - var(--togglerWidth) + var(--togglerGap)))}"};function lc(t,e){B(e,!0),Q(t,h2);let[i,o]=Ve(),r=()=>w(s,"$autoplayNextEnabled$",i),a=g(e,"ref",15,void 0),l=ge(),d=l.ui.t,s=l.ui.autoplayNextEnabled$,u=l.actions.internal.setAutoplayNextEnabled,f=()=>{u(!r(),!0)},p=d("aria_label_autoplay"),v="12",$="#000",y=m(()=>r()?"true":"false");Ft(t,{click:f,get ariaLabel(){return p},role:"switch",get areaChecked(){return n(y)},get ref(){return a()},set ref(h){a(h)},children:(h,x)=>{var I=g2(),T=C(I);let N;var L=C(T);{var E=K=>{kn(K,{get size(){return v},fill:$})},k=K=>{Bs(K,{get size(){return v},fill:$})};R(L,K=>{r()?K(E):K(k,!1)})}S(T),S(I),O(K=>N=se(T,1,"toggler s-25",null,N,K),[()=>({enabled:r()})]),b(h,I)},$$slots:{default:!0}}),F(),o()}var _2=Te('<path d="M16.73 4.85c-.54-.05-1.23-.05-2.23-.05H7.9a.9.9 0 1 1 0-1.8h6.64q1.41-.01 2.33.05c.64.05 1.2.16 1.73.43a4.4 4.4 0 0 1 1.92 1.92c.27.52.38 1.09.43 1.73q.06.92.05 2.33v5.08q.01 1.41-.05 2.33a5 5 0 0 1-.43 1.73 4.4 4.4 0 0 1-1.92 1.92 5 5 0 0 1-1.73.43q-.92.06-2.33.05H7.9a.9.9 0 1 1 0-1.8h6.6c1 0 1.69 0 2.23-.04.52-.05.82-.13 1.05-.24a2.6 2.6 0 0 0 1.14-1.14c.11-.23.2-.53.24-1.06s.04-1.23.04-2.22v-5c0-1 0-1.69-.04-2.23a3 3 0 0 0-.24-1.05 2.6 2.6 0 0 0-1.14-1.14c-.23-.11-.53-.2-1.05-.24"></path><path d="M7.76 11.17V8.9c0-.71.7-1.15 1.25-.78l4.6 3.1a.96.96 0 0 1 0 1.54L9 15.87c-.55.37-1.25-.07-1.25-.78v-2.26l-4.5 3.04C2.7 16.24 2 15.8 2 15.09V8.91c0-.71.7-1.15 1.25-.78z "></path>',1);function wm(t){Je(t,{testId:"seek-to-interactive-icon",children:(e,i)=>{var o=_2();ai(),b(e,o)},$$slots:{default:!0}})}function dc(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"hidden",3,!1),r=g(e,"disabled",3,!1),a=Y("tooltip_interactive_seek"),l=m(()=>o()?"hidden":"");Ft(t,{get className(){return n(l)},testId:"btn-seek-to-interactive",get ariaLabel(){return a},get disabled(){return r()},get click(){return e.click},get ref(){return i()},set ref(d){i(d)},children:(d,s)=>{wm(d,{})},$$slots:{default:!0}}),F()}var b2=Te('<path d="M15.2 5.9v1.2c0 .6 0 .9.12 1.12q.15.3.46.46c.23.12.52.12 1.12.12h1.2c.6 0 .9 0 1.12-.12q.3-.15.46-.46c.12-.23.12-.52.12-1.12V5.9c0-.6 0-.9-.12-1.12a1 1 0 0 0-.46-.46c-.23-.12-.52-.12-1.12-.12h-1.2c-.6 0-.9 0-1.12.12q-.3.15-.47.46c-.11.23-.11.53-.11 1.12m-.05 11.03v1.14c0 .6 0 .91.12 1.14q.15.31.47.47c.23.12.53.12 1.14.12h1.22c.6 0 .9 0 1.14-.12a1 1 0 0 0 .47-.47c.12-.23.12-.53.12-1.14v-1.14c0-.6 0-.9-.12-1.14a1 1 0 0 0-.47-.47c-.23-.12-.54-.12-1.14-.12h-1.22c-.6 0-.91 0-1.14.12a1 1 0 0 0-.47.47c-.12.23-.12.53-.12 1.14"></path>'),$2=Te('<path d="M16.78 3h1.42q.47 0 .83.02.4.02.82.21.61.31.92.92.2.41.21.81.03.36.02.83v1.4q0 .47-.02.83-.02.4-.21.81a2 2 0 0 1-.92.92 2 2 0 0 1-.82.21q-.36.02-.83.02h-1.42q-.47 0-.84-.02a2 2 0 0 1-.81-.2 2 2 0 0 1-.93-.93 2 2 0 0 1-.2-.8l-.03-.64h-2.2c-.49 0-.8 0-1.04.02a1 1 0 0 0-.35.06 1 1 0 0 0-.35.35 1 1 0 0 0-.07.35c-.02.24-.02.55-.02 1.04v5.57c0 .5 0 .8.02 1.04s.05.31.07.34q.12.23.35.35c.03.02.11.05.34.07s.56.02 1.05.02h2.2q0-.34.02-.62.01-.4.21-.81.31-.61.93-.92.42-.2.81-.21.37-.02.84-.02h1.42q.47 0 .83.02.4.01.82.2.61.31.92.93.2.41.21.8.03.37.02.84v1.4q0 .47-.02.83-.02.39-.21.81a2 2 0 0 1-.92.92q-.43.2-.82.21-.36.02-.83.02h-1.42q-.47 0-.84-.02a2 2 0 0 1-.81-.21 2 2 0 0 1-.93-.92 2 2 0 0 1-.2-.81l-.03-.63h-2.24q-.68 0-1.16-.03a3 3 0 0 1-1.01-.26 2.6 2.6 0 0 1-1.14-1.14 3 3 0 0 1-.26-1q-.04-.5-.03-1.16v-1.93H2.9A.9.9 0 0 1 2 12c0-.5.4-.9.9-.9h5.23V9.18q0-.68.03-1.16.02-.51.26-1.02a2.6 2.6 0 0 1 1.14-1.13q.5-.24 1.02-.26.48-.04 1.16-.02h2.23q0-.34.02-.63.01-.4.21-.81.31-.61.93-.92.42-.2.81-.21.37-.02.84-.02m-.84 1.84.15-.02c.16-.02.37-.02.72-.02h1.35c.36 0 .57 0 .72.02l.15.02a.3.3 0 0 1 .12.12l.03.15.01.71v1.34l-.01.71-.02.15a.3.3 0 0 1-.13.13l-.15.02-.72.01h-1.35l-.72-.01-.15-.03a.3.3 0 0 1-.12-.12l-.02-.15-.02-.71V5.82q0-.5.02-.71l.02-.15a.3.3 0 0 1 .12-.12m0 11.02.15-.03.72-.01h1.35l.72.01.15.03a.3.3 0 0 1 .12.12l.03.15.01.71v1.34l-.01.71-.02.15a.3.3 0 0 1-.13.12l-.15.02c-.15.02-.36.02-.72.02h-1.35c-.35 0-.56 0-.72-.02l-.15-.02a.3.3 0 0 1-.12-.12l-.02-.15-.02-.71v-1.34c0-.35 0-.56.02-.71l.02-.15a.3.3 0 0 1 .12-.13"></path><!>',1);function Sm(t,e){let i=g(e,"isOpened",3,!1),o=m(()=>i()?"graph-close-icon":"graph-open-icon");Je(t,{get testId(){return n(o)},children:(r,a)=>{var l=$2(),d=A(ce(l));{var s=u=>{var f=b2();b(u,f)};R(d,u=>{i()&&u(s)})}b(r,l)},$$slots:{default:!0}})}function cc(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"hidden",3,!1),r=g(e,"disabled",3,!1),a=g(e,"graphIsOpened",3,!1),d=ge().ui.t,s=m(()=>a()?d("tooltip_interactive_graph_on"):d("tooltip_interactive_graph_off")),u=m(()=>o()?"hidden":"");Ft(t,{get className(){return n(u)},testId:"btn-graph",get disabled(){return r()},get ariaLabel(){return n(s)},get click(){return e.click},get ref(){return i()},set ref(f){i(f)},children:(f,p)=>{let v=m(()=>!!a());Sm(f,{get isOpened(){return n(v)}})},$$slots:{default:!0}}),F()}import{PlaybackState as X_}from"@vkontakte/videoplayer-core/es2018";function uc(t,e){B(e,!0);let[i,o]=Ve(),r=()=>w(u,"$playbackState$",i),a=g(e,"isMobile",3,!1),l=g(e,"isLiveActive",3,!1),d=g(e,"ariaLabel",3,""),s=ge(),u=s.state.playbackState$,f=s.actions.internal.switchToActiveLive,p=s.actions.internal.togglePlay,v=m(()=>()=>{if(!l()){f();return}r()===X_.PAUSED&&p()}),$=m(()=>a()?"":"btn--live btn-full-opacity"),y=m(()=>l()?"btn-live":"btn-live-offset"),h=m(()=>l()&&r()===X_.PLAYING);Ft(t,{get className(){return n($)},get testId(){return n(y)},get disabled(){return n(h)},get ariaLabel(){return d()},get click(){return n(v)},children:(x,I)=>{Bd(x,{get isActive(){return l()}})},$$slots:{default:!0}}),F(),o()}import{noop as Z_}from"@vkontakte/videoplayer-shared/es2018";var y2=M('<div class="icon icon-error-stub"><div class="inner"></div></div>'),x2=M('<img class="icon" aria-hidden="true"/>');function Ka(t,e){"use strict";let i=W(!1),o=()=>{D(i,!0)};var r=Ae(),a=ce(r);{var l=s=>{var u=y2();b(s,u)},d=s=>{var u=x2();O(()=>Le(u,"src",e.icon)),nt("error",u,o),ka(u),b(s,u)};R(a,s=>{n(i)?s(l):s(d,!1)})}b(t,r)}function Cm(t,e){B(e,!0);let i=g(e,"disabled",3,!1),o=g(e,"onClick",3,Z_),r=g(e,"ref",15),a=m(()=>o()===Z_),l=m(()=>n(a)||i()),d=m(()=>n(a)?"btn-full-opacity":"");Fo(t,{get disabled(){return n(l)},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},width:40,get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get tooltipVisible(){return e.tooltipVisible},get ref(){return r()},set ref(s){r(s)},children:(s,u)=>{let f=m(()=>{var p;return(p=e.testId)!=null?p:e.id});Ft(s,{get className(){return n(d)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return n(l)},get testId(){return n(f)},children:(p,v)=>{Ka(p,{get icon(){return e.icon}})},$$slots:{default:!0}})},$$slots:{default:!0}}),F()}var J_=t=>!!t.buttonComponent;var Fs={vkLogo:100,autoplayNext:200,volume:300,subtitles:400,settings:500,context:600,fullscreen:700,chromecast:800};var Ju=(t,e,i,o)=>{if(t)for(let[r,a]of Object.entries(e))a.set(sn(t,i,r,o))};import{interpolate as Tm}from"@vkontakte/videoplayer-shared/es2018";var eb=10,tb=40,Im=.2,S2=.5,C2=65,T2=114,I2=4,ib=({onPreviewTrackOpened:t,getTimelineRef:e,isHorizontal:i})=>{let o=m(()=>i?C2:T2),r=W(!1),a=W(0),l=W(0),d=m(()=>n(o)+eb-tb-I2),s=m(()=>Tm(n(a),[Im,1],[0,-n(d)])),u=m(()=>Tm(n(a),[Im,1],[0,tb])),f=m(()=>Tm(n(a),[Im,1],[0,n(o)+eb]));return{progressBarY:()=>n(s),controlsY:()=>n(u),calculatedHeight:()=>n(f),onPointerDown:h=>{var x;D(l,((x=e())==null?void 0:x.getBoundingClientRect().bottom)||0,!0),D(r,!0)},onPointerMove:h=>{if(!n(r))return;let x=Math.max(Math.min(h.clientY-n(l),0),-n(d));D(a,Math.abs(x/n(d)),!0)},onPointerUp:()=>{D(r,!1),D(a,n(a)>=S2?1:0,!0),n(a)===1&&t()},closePreviewTrack:()=>{D(a,0)}}};var E2=t=>t;function _s(t,{delay:e=0,duration:i=400,easing:o=E2}={}){let r=+getComputedStyle(t).opacity;return{delay:e,duration:i,easing:o,css:a=>`opacity: ${a*r}`}}var k2=M('<span class="root s-2b"> </span>'),P2={hash:"s-2b",code:".root.s-2b{box-shadow:0 8px 24px 0 rgba(0,0,0,.08);box-shadow:0 0 2px 0 rgba(0,0,0,.08);color:#fff;font-size:13px;font-weight:500;line-height:16px}"};function Em(t,e){Q(t,P2);var i=k2(),o=C(i,!0);S(i),O(()=>ve(o,e.time)),b(t,i)}var A2=M('<div class="tooltip-wrapper s-v"><div><!></div></div>'),L2={hash:"s-v",code:'.tooltip-wrapper.s-v{display:block;position:relative}.tooltip.s-v{bottom:100%;opacity:0;position:absolute;transform:translateX(-50%);transition:opacity .2s;visibility:hidden}.pointer.s-v:after{border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid rgba(41,41,41,.8);bottom:0;content:" ";font-size:0;left:50%;line-height:0;position:absolute;transform:translate(-50%,5px);width:0}.tooltip.active.s-v{opacity:1;visibility:visible}'};function km(t,e){Q(t,L2);let i=g(e,"active",3,!1),o=g(e,"pointer",3,!1),r=g(e,"translateXPx",3,0),a=g(e,"translateYPx",3,0),l=g(e,"leftOffset",3,0),d=g(e,"rightOffset",3,0),s=W(void 0),u=W(void 0);function f(x){if(!n(u))return 0;let{width:I}=n(u).getBoundingClientRect(),T=I/2;return x<T?T+l():x>e.containerWidth-T?e.containerWidth-T-d():x}let p=m(()=>f(r()));var v=A2(),$=C(v);let y;var h=C($);ei(h,()=>{var x;return(x=e.children)!=null?x:ht}),S($),Ze($,x=>D(u,x),()=>n(u)),S(v),Ze(v,x=>D(s,x),()=>n(s)),O(x=>{qe(v,`transform: translate(${n(p)}px, ${a()}px);`),y=se($,1,"tooltip s-v",null,y,x),qe($,`opacity: ${i()?1:0}; visibility: ${i()?"visible":"hidden"}`)},[()=>({active:i(),pointer:o()})]),b(t,v)}var ob=t=>Math.abs(t)/90%4===1;var M2=M('<div class="preview s-u"></div>'),V2=M('<div class="time s-u"> </div>'),R2=M('<div><!> <div class="episode s-u"><!></div> <!></div>'),N2={hash:"s-u",code:".timeline-preview.s-u{border-radius:2px;bottom:18px;pointer-events:none}.timeline-preview.mobile.s-u{bottom:72px}.preview.s-u{background-color:var(--timeline-preview-bg);border:1px solid var(--white);border-radius:8px;box-shadow:0 0 2px var(--timeline-preview-shadow),0 8px 24px var(--timeline-preview-shadow)}.episode.s-u{margin-bottom:4px;margin-top:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.episode.s-u,.time.s-u{font-size:13px;font-weight:500;line-height:16px;text-align:center;text-shadow:0 8px 24px var(--timeline-preview-shadow),0 0 2px var(--timeline-preview-shadow)}.time.s-u{color:var(--white)}"};function Pm(t,e){B(e,!0),Q(t,N2);let[i,o]=Ve(),r=()=>w(y,"$rotateAlpha",i),a=()=>w(h,"$playerSize",i),l={MOBILE:150,DESKTOP:278},d=g(e,"time",3,""),s=g(e,"isMobile",3,!1),u=g(e,"videoEpisodes",19,()=>[]),f=g(e,"progress",3,0),p=g(e,"duration",3,0),v=g(e,"isInteractive",3,!1),$=ge(),y=$.ui.rotateAlpha,h=$.ui.playerSize,x=W(0),I=W(0),T=W(""),N=W(0),L=W(0),E=W(0),k=W(0),K=m(()=>zu(f(),p(),u())),H=m(()=>Ul(r())),z=m(()=>ob(r())),j=m(ne),ae=m(()=>(n(z)?1:-1)*(n(x)/2-n(I)/2)),X=m(()=>n(ae)*-1);Ne(()=>{(Z=>{D(x,Z.width,!0),D(I,Z.height,!0)})(we())}),Ne(()=>{(Z=>{D(T,Z.imgSrc,!0),D(N,Z.imgWidth,!0),D(L,Z.imgHeight,!0),D(E,Z.imgOffsetX,!0),D(k,Z.imgOffsetY,!0)})(pe(f()))});function ne(){var Oe;let Z=s()?l.MOBILE:l.DESKTOP,{isVertical:ie}=J(),De=30;return(Oe=n(K))!=null&&Oe.text&&(De+=16),(ie||n(H))&&(De+=18,De+=50),Math.min(Math.max(a().height-De,0),Z)}function J(){let Z=e.previewThumbsData.frameWidth,ie=e.previewThumbsData.frameHeight,De=ie>Z;return{width:Z,height:ie,isHorizontal:!De,isVertical:De}}function we(){let{height:Z,isHorizontal:ie,isVertical:De,width:Oe}=J();return ie&&(Z=Z/Oe*n(j),Oe=n(j)),De&&(Oe=Oe/Z*n(j),Z=n(j)),{width:Oe,height:Z}}function pe(Z){let ie;e.previewThumbsData.isUV?ie=Math.floor(p()*Z/e.previewThumbsData.frequency):ie=Math.min(e.previewThumbsData.countTotal,Math.max(0,Math.floor(e.previewThumbsData.countTotal*Z)));let De=Math.floor(ie/e.previewThumbsData.countPerImage),Oe=Math.floor(ie%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),it=ie%e.previewThumbsData.countPerRow,U=Math.floor(e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow);!e.previewThumbsData.isUV&&De===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&(U=Math.floor(e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage%e.previewThumbsData.countPerRow>0&&U++);let Pe=e.previewThumbsData.countPerRow;!e.previewThumbsData.isUV&&De===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage>0&&(Pe=Math.min(e.previewThumbsData.countPerRow,e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage));let ke=n(x)*Pe,He=n(I)*U,tt=-it*n(x),ye=-Oe*n(I);return{imgSrc:e.previewThumbsData.links[De],imgWidth:ke,imgHeight:He,imgOffsetX:tt,imgOffsetY:ye}}var re=R2();let be;var $e=C(re);{var ee=Z=>{var ie=M2();O(()=>qe(ie,`width: ${n(x)}px; height: ${n(I)}px; background-image: url(${n(T)}); background-size: ${n(N)}px ${n(L)}px; background-position: ${n(E)}px ${n(k)}px;
|
|
61
|
-
transform: rotate(${r()}deg) ${n(
|
|
62
|
-
`)),b(Z,ie)};R($e,Z=>{n(T)&&Z(ee)})}var Re=A($e,2),fe=C(Re);{var P=Z=>{var ie=Ae(),De=ce(ie);{var Oe=U=>{var Pe=ps();O(ke=>ve(Pe,ke),[()=>Y("tooltip_episode_unfinished")]),b(U,Pe)},it=U=>{var Pe=ps();O(()=>ve(Pe,n(K).text||"")),b(U,Pe)};R(De,U=>{v()&&n(K).completed===!1?U(Oe):U(it,!1)})}b(Z,ie)};R(fe,Z=>{n(K)&&Z(P)})}S(Re);var We=A(Re,2);{var Se=Z=>{var ie=V2(),De=C(ie,!0);S(ie),O(()=>ve(De,d())),b(Z,ie)};R(We,Z=>{v()||Z(Se)})}S(re),O(Z=>{be=se(re,1,"timeline-preview s-u",null,be,Z),qe(re,`width: ${n(H)?n(I):n(x)}px;`)},[()=>({mobile:s()})]),b(t,re),F(),o()}var D2=M('<span class="time s-f"> </span>'),O2=M("<!> <!>",1),B2={hash:"s-f",code:".time.s-f{background-color:rgba(41,41,41,.8);border-radius:3px;color:var(--white);display:inline-block;padding:6px 10px}.timeline-slider{--slider-bg:var(--timeline-slider-bg);--slider-filled-bg:var(--timeline-slider-filled-bg);--slider-handle-bg:var(--timeline-slider-handle-bg);--slider-loaded-bg:var(--timeline-slider-loaded-bg)}"};function Am(t,e){var le,_e,Me,rt,pt;B(e,!0),Q(t,B2);let[i,o]=Ve(),r=()=>w(X,"$interactiveEpisodes$",i),a=()=>w(k,"$duration$",i),l=()=>w(E,"$position$",i),d=()=>w(we,"$isInteractiveExpectation$",i),s=()=>w(J,"$isInteractiveTime$",i),u=()=>w($e,"$previewTrackActive",i),f=()=>w(K,"$isLive$",i),p=()=>w(be,"$disabledControls$",i),v=()=>w(z,"$isMobile",i),$=()=>w(H,"$isActiveLive$",i),y=()=>w(L,"$bufferedProgress$",i),h=g(e,"showTimeline",3,!1),x=g(e,"withEpisodes",3,!0),I=g(e,"ref",15,void 0),T=ge(),N=kt(),L=T.state.bufferedProgress$,E=T.state.positionWithScrubbing$,k=T.state.duration$,K=T.state.isLive$,H=T.state.isActiveLive$,z=T.ui.isMobile,j=N.features.episodes&&x()?T.actions.internal.getVideoEpisodes():void 0,ae=T.actions.internal.getPreviewThumbsData(),X=T.state.interactiveEpisodes$,ne=T.state.isInteractive,J=T.state.isInteractiveTime$,we=T.state.isInteractiveExpectation$,pe=T.actions.internal.correctSeekTimeToInteractive,re=(le=T.callbacks)==null?void 0:le.onDisabledTimelineClick,be=T.ui.controls.disabledControls$,$e=T.ui.previewTrackActive,ee=(Me=(_e=T.callbacks)==null?void 0:_e.uiInfo)==null?void 0:Me.onTimelineMouseEnter,Re=(pt=(rt=T.callbacks)==null?void 0:rt.uiInfo)==null?void 0:pt.onTimelineMouseLeave,fe=T.ui.t,P=N.features.interactiveResponsiveUi,We=m(()=>ne?r():j),Se=m(()=>rn(a())),Z=m(()=>rn(l())),ie=m(()=>l()/a()),De=m(()=>d()||s()),Oe=W(!1),it=W(""),U=W(0),Pe=W(0),ke=W(0),He=m(()=>({containerWidth:n(Pe),translateXPx:n(U),translateYPx:ne&&ae?-36:-16,active:n(Oe)&&h()&&!n(De)&&!P&&!u(),pointer:!N.features.timelinePreview||!ae||f()})),tt=fe("aria_timeline"),ye=m(()=>fe("aria_timeline_value",{position:n(Z),duration:n(Se)}));function Ie(ue){return!pe||!ne?ue:pe(ue*a())/a()}function Be(ue,ze){var Qe;(Qe=e.onSliderPointerDown)==null||Qe.call(e,ze),T.actions.internal.startScrubbing(Ie(ue))}function Lt(ue){s()||T.actions.internal.progressScrubbing(Ie(ue))}function mt(ue){var ze;T.actions.internal.completeScrubbing(Ie(ue)),D(Oe,!1),(ze=e.onSliderPointerUp)==null||ze.call(e)}function Vt(ue,ze,Qe){var ct;(ct=e.onSliderPointerEnter)==null||ct.call(e,ue),Qt(ue,ze,Qe),D(Oe,!0)}function dt(ue,ze,Qe,ct){var Nt;(Nt=e.onSliderMove)==null||Nt.call(e,ct,ue),Qt(ue,ze,Qe),D(Oe,!0)}function xt(){var ue;D(Oe,!1),(ue=e.onSliderLeave)==null||ue.call(e)}function Qt(ue,ze,Qe){D(ke,Ie(ue),!0),D(U,ze,!0),Qe&&D(Pe,Qe,!0),D(it,Tt(ue),!0)}function Tt(ue){let ze=rn((f()?1-ue:ue)*a());return f()?`-${ze}`:ze}let Mt=m(()=>p().has("TIMELINE"));var Rt=O2(),G=ce(Rt);km(G,Jr(()=>n(He),{get leftOffset(){return e.tooltipLeftOffset},get rightOffset(){return e.tooltipRightOffset},children:(ue,ze)=>{var Qe=Ae(),ct=ce(Qe);{var Nt=Gt=>{Pm(Gt,{get time(){return n(it)},get isMobile(){return v()},get videoEpisodes(){return n(We)},get previewThumbsData(){return ae},get progress(){return n(ke)},get duration(){return a()},get isInteractive(){return ne}})},Ht=Gt=>{var vi=D2(),Qi=C(vi,!0);S(vi),O(()=>ve(Qi,n(it))),b(Gt,vi)};R(ct,Gt=>{N.features.timelinePreview&&ae&&!f()?Gt(Nt):Gt(Ht,!1)})}b(ue,Qe)},$$slots:{default:!0}}));var Ce=A(G,2);Ua(Ce,{className:"timeline-slider",get isActiveLive(){return $()},get isMobile(){return v()},get ariaLabel(){return tt},ariaValueMin:0,get ariaValueMax(){return a()},get ariaValueNow(){return l()},get ariaValueText(){return n(ye)},get loadedProgress(){return y()},get filledProgress(){return n(ie)},get handleProgress(){return n(ie)},get videoEpisodes(){return n(We)},onPointerDown:Be,onHandleMove:Lt,onPointerMove:dt,onPointerUp:mt,onPointerEnter:Vt,onPointerLeave:xt,get onMouseEnter(){return ee},get onMouseLeave(){return Re},get onDisabledClick(){return re},get isInteractive(){return ne},get disabled(){return n(Mt)},get handleAlwaysVisible(){return u()},get hideHandel(){return s()},testId:"progress_bar",onContextMenu:mt,get ref(){return I()},set ref(ue){I(ue)}}),b(t,Rt),F(),o()}var F2={hash:"s-g",code:".timeline-ads-slider{--slider-bg:var(--timeline-slider-bg);--slider-filled-bg:var(--timeline-slider-filled-bg);--slider-handle-bg:var(--timeline-slider-handle-bg);--slider-loaded-bg:var(--timeline-slider-loaded-bg)}"};function pc(t,e){B(e,!0),Q(t,F2);let[i,o]=Ve(),r=()=>w(s,"$isMobile",i),a=g(e,"position",3,0),l=g(e,"duration",3,0),d=ge(),s=d.ui.isMobile,u=d.ui.t,f=m(()=>rn(l())),p=m(()=>rn(a())),v=m(()=>a()/l()),$=m(()=>u("aria_timeline_value",{position:n(p),duration:n(f)})),y=m(()=>Math.round(n(v)*100));Ua(t,{className:"timeline-ads-slider",ariaValueMin:0,get ariaValueMax(){return l()},get ariaValueNow(){return n(y)},get ariaValueText(){return n($)},get filledProgress(){return n(v)},hideHandel:!0,get squareBorders(){return r()}}),F(),o()}var H2=M("<div><!></div>"),U2=M("<div></div>"),z2={hash:"s-d",code:".timeline.s-d{align-items:center;bottom:0;box-sizing:border-box;display:flex;min-width:86px;pointer-events:all;position:relative;width:100%}.timeline.mobile.s-d{height:16px;margin-top:6px;padding:6px 12px 7px}.withoutPadding.s-d{padding:0}.timeline-stub.s-d{min-width:20px;width:100%}.timeline-stub.mobile.s-d{height:8px}"};function qa(t,e){B(e,!0),Q(t,z2);let[i,o]=Ve(),r=()=>w(x,"$isLive$",i),a=()=>w(N,"$isMobile",i),l=()=>w(L,"$disabled",i),d=()=>w(T,"$adPosition",i),s=()=>w(I,"$adDuration",i),u=g(e,"isAds",3,!1),f=g(e,"isHidden",3,!1),p=g(e,"timelineNotAvailable",3,!1),v=g(e,"needPadding",3,!0),$=g(e,"ref",15,void 0),y=ge(),h=kt(),x=y.state.isLive$,I=y.ads.duration,T=y.ads.position,N=y.ui.isMobile,L=de(!1),E=m(()=>!p()&&(!r()||r()&&e.canRewindLive&&e.isRewindableLive||u()));var k=Ae(),K=ce(k);{var H=j=>{var ae=H2();let X;var ne=C(ae);{var J=pe=>{pc(pe,{get position(){return d()},get duration(){return s()}})},we=pe=>{Am(pe,{get tooltipLeftOffset(){return e.tooltipLeftOffset},get tooltipRightOffset(){return e.tooltipRightOffset},get showTimeline(){return n(E)},get withEpisodes(){return e.withEpisodes},get onSliderMove(){return e.onSliderMove},get onSliderPointerDown(){return e.onSliderPointerDown},get onSliderPointerUp(){return e.onSliderPointerUp},get onSliderLeave(){return e.onSliderLeave},get onSliderPointerEnter(){return e.onSliderPointerEnter},get ref(){return $()},set ref(re){$(re)}})};R(ne,pe=>{u()?pe(J):pe(we,!1)})}S(ae),Ls(ae,()=>Vl(f()&&h.features.usePerformanceFix,L,h.disableInvisibleComponentsTimeout)),O(pe=>X=se(ae,1,"timeline s-d",null,X,pe),[()=>({withoutPadding:!v(),mobile:a(),"out-of-flow":l()})]),b(j,ae)},z=j=>{var ae=U2();let X;O(ne=>X=se(ae,1,"timeline-stub s-d",null,X,ne),[()=>({mobile:a()})]),b(j,ae)};R(K,j=>{n(E)?j(H):j(z,!1)})}b(t,k),F(),o()}import{getRangeAroundIndex as W2}from"@vkontakte/videoplayer-shared/es2018";var K2=(t,e,i,o,r,a,l)=>{D(e,!0),D(i,t.clientX,!0),D(o,n(r),!0),a(l())},q2=M("<div></div>"),Q2=M('<div><div class="track s-2c"></div></div>'),G2={hash:"s-2c",code:'.root.s-2c{display:flex;height:var(--preview-track-frame-height-horizontal);overflow:hidden;position:relative;width:100%}.root.is-vertical-video.s-2c,.root.vertically-rotated.s-2c{height:var(--preview-track-frame-height-vertical)}.root.s-2c:after{background-color:#fff;box-shadow:0 2px 2px 0 rgba(0,0,0,.12);box-shadow:0 0 2px 0 rgba(0,0,0,.06);content:"";height:100%;margin:0 auto;pointer-events:none;width:3px;z-index:1}.track.s-2c{bottom:0;display:flex;left:0;padding:0 50%;top:0}.frame.s-2c,.track.s-2c{position:absolute}.frame.s-2c{background-position-x:calc(var(--column-index)*-1*var(--frame-width));background-position-y:calc(var(--frame-height)*-1*var(--row-index));background-size:calc(var(--frame-width)*var(--column-numbers)) calc(var(--frame-height)*var(--row-numbers));flex-shrink:0;height:var(--frame-height);pointer-events:none;transform-origin:center;width:var(--frame-width)}.vertically-rotated.s-2c .frame:where(.s-2c){transform-origin:0 0}.rotate-1.s-2c{transform:rotate(-90deg) translateX(-100%)}.rotate-2.s-2c{transform:rotate(-180deg)}.rotate-3.s-2c{transform:rotate(-270deg) translateY(-100%)}'};function Mm(t,e){B(e,!0),Q(t,G2);let[i,o]=Ve(),r=()=>w(N,"$rotateAlpha",i),a=()=>w(h,"$position$",i),l=()=>w(y,"$duration$",i),d=ge(),{countPerImage:s=0,countPerRow:u=0,countTotal:f=0,links:p=[],frameHeight:v=0,frameWidth:$=0}=d.actions.internal.getPreviewThumbsData()||{},{duration$:y,positionWithScrubbing$:h}=d.state,{startScrubbing:x,progressScrubbing:I,completeScrubbing:T}=d.actions.internal,N=d.ui.rotateAlpha,L=W(void 0),E=W(!1),k=W(0),K=W(0),H=W(0),z=W(0),j=m(()=>v<=$),ae=m(()=>Ul(r())),X=m(()=>n(j)?!n(ae):n(ae)),ne=114,J=65,we=3,pe=m(()=>n(X)?ne:J),re=m(()=>n(j)?ne:J),be=m(()=>n(j)?"var(--preview-track-frame-height-horizontal)":"var(--preview-track-frame-height-vertical)"),$e=m(()=>f*n(pe)),ee=W(0);Ne(()=>{D(z,Math.ceil(-n(H)/n(pe))-1),D(H,-n($e)*a()/l())});let Re=()=>{T(fe(),!0)},fe=()=>l()*-n(H)/n($e)/l(),P=!1,We=ye=>{if(!n(E))return!1;let Ie=ye.clientX-n(k);D(H,n(K)+Ie),D(H,Math.max(Math.min(n(H),0),-n($e)),!0),Math.abs(Ie)>1&&(P=!0),I(fe())},Se=ye=>{n(E)&&(D(E,!1),!P&&ye&&D(H,-(ye.offsetX-n(ee)/2)),P=!1,Re())},Z=()=>{n(E)&&Se()},ie=m(()=>s/u),De=(ye,Ie)=>{if(ye!==p.length-1)return u;let Be=0,Lt=Ie*u;for(let mt=1;mt<=u;mt++)ye*s+Be+Lt<f&&Be++;return Be},Oe=m(()=>Math.floor(n(z)/s)),it=m(()=>W2(3,n(Oe),p.length-1)),U=(ye,Ie,Be)=>{let Lt=s*n(pe);return ye*Lt+Ie*n(pe)*u+n(ee)/2-we/2+Be*n(pe)},Pe=m(()=>[`--row-numbers: ${n(ie)}`,`--column-numbers: ${u}`,`--frame-width: ${n(re)}px`,`--frame-height: ${n(be)}`].join(";"));var ke=Q2();let He;var tt=C(ke);tt.__pointerdown=[K2,E,k,K,H,x,fe],tt.__pointermove=We,tt.__pointerup=Se,bi(tt,20,()=>n(it),ye=>ye,(ye,Ie)=>{var Be=Ae(),Lt=ce(Be);bi(Lt,16,()=>Array.from({length:n(ie)},(mt,Vt)=>Vt),mt=>mt,(mt,Vt)=>{var dt=Ae(),xt=ce(dt);bi(xt,16,()=>Array.from({length:De(Ie,Vt)},(Qt,Tt)=>Tt),Qt=>Qt,(Qt,Tt)=>{var Mt=q2();O((Rt,G)=>{qe(Mt,Rt),se(Mt,1,G,"s-2c")},[()=>`--row-index: ${Vt}; --column-index: ${Tt}; left: ${U(Ie,Vt,Tt)}px; background-image: url(${p[Ie]});`,()=>`frame rotate-${Math.abs(r())/90%4}`]),b(Qt,Mt)}),b(mt,dt)}),b(ye,Be)}),S(tt),S(ke),Ze(ke,ye=>D(L,ye),()=>n(L)),O(ye=>{He=se(ke,1,"root s-2c",null,He,ye),qe(ke,n(Pe)),qe(tt,`transform: translateX(${n(H)}px); width: ${n($e)}px;`)},[()=>({"is-vertical-video":!n(j),"vertically-rotated":n(ae)})]),nt("mouseleave",tt,Z),In(ke,"clientWidth",ye=>D(ee,ye)),b(t,ke),F(),o()}Ye(["pointerdown","pointermove","pointerup"]);var Y2=M('<div class="notification s-2d"><span class="description s-2d"> </span></div>'),j2={hash:"s-2d",code:".notification.s-2d{background:var(--notification-bg);border-radius:var(--notification-radius);padding:9px 14px 10px 12px}.description.s-2d{font-size:14px;line-height:18px}"};function Vm(t,e){B(e,!1),Q(t,j2);let i=340,{ui:{t:o}}=ge();xo();var r=Y2(),a=C(r),l=C(a,!0);S(a),S(r),O(d=>ve(l,d),[()=>o("preview_track_close_tooltip")],xn),Zr(3,r,()=>_s,()=>({duration:i})),b(t,r),F()}import{getRangeAroundIndex as X2}from"@vkontakte/videoplayer-shared/es2018";var Z2=M('<div class="preview-track-close tooltip s-29"><!></div>'),J2=M('<div class="preview-track-control s-29"><!> <div class="preview-track-close s-29"><!></div> <!></div>'),ew=M('<div class="wrapper-preview-track s-29"><!></div>'),tw=M('<div class="enriched-timeline s-29"><!> <!> <!></div>'),iw={hash:"s-29",code:".enriched-timeline.s-29{padding:var(--timeline-padding-vertical-top) var(--timeline-padding-horizontal) var(--timeline-padding-vertical-bottom);pointer-events:auto;position:relative}.preview-track-control.s-29{align-items:center;display:flex;justify-content:center;left:0;padding:0 calc(var(--timeline-padding-horizontal));pointer-events:none;position:absolute;right:0;top:calc((var(--timeline-height) + var(--preview-track-controls-top))*-1)}.preview-track-close.s-29{pointer-events:auto;position:absolute;right:calc(var(--timeline-padding-horizontal))}.preview-track-close.tooltip.s-29{bottom:32px;opacity:0;transition:opacity .2s}.preview-track-close.s-29:hover+.tooltip:where(.s-29){opacity:1}.wrapper-preview-track.s-29{box-sizing:border-box;left:0;overflow:hidden;padding:0 calc(var(--timeline-padding-horizontal));position:absolute;right:0;z-index:-1}"};function Rm(t,e){B(e,!0),Q(t,iw);let[i,o]=Ve(),r=()=>w(h,"$playerSize",i),a=()=>w(y,"$duration$",i),l=()=>w(x,"$previewTrackActive",i),d=()=>w(v,"$position$",i),s=()=>w($,"$isRewindableLive$",i),u=g(e,"timelineRef",15,void 0),f=ge(),p=200,{positionWithScrubbing$:v,isRewindableLive$:$,duration$:y}=f.state,{playerSize:h,previewTrackActive:x}=f.ui,{countPerImage:I=0,links:T=[],frequency:N=0}=f.actions.internal.getPreviewThumbsData()||{},L=m(()=>r().width>100),E=W(!c_()),k=()=>{n(E)&&(d_(),D(E,!1))},K=pe=>{let re=Math.floor(a()*pe/N),be=Math.floor(re/I),$e=X2(3,be,T.length-1);for(let ee of $e){let Re=new Image;Re.src=T[ee]}},H=(pe,re)=>{K(re),!l()&&e.onTimelineMove(pe)};var z=tw(),j=C(z);{var ae=pe=>{var re=J2(),be=C(re);let $e=m(()=>rn(d()));Em(be,{get time(){return n($e)}});var ee=A(be,2),Re=C(ee);Vs(Re,{onClick:()=>f.actions.internal.closePreviewTrack()}),S(ee);var fe=A(ee,2);{var P=We=>{var Se=Z2(),Z=C(Se);Vm(Z,{}),S(Se),b(We,Se)};R(fe,We=>{n(E)&&We(P)})}S(re),nt("mouseleave",ee,k),Zr(3,re,()=>_s,()=>({duration:p})),b(pe,re)};R(j,pe=>{l()&&pe(ae)})}var X=A(j,2);let ne=m(()=>!n(L));qa(X,{get isHidden(){return n(ne)},get isAds(){return e.isAds},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return s()},onSliderMove:H,get onSliderPointerDown(){return e.onTimelinePointerDown},get onSliderPointerUp(){return e.onTimelinePointerUp},get onSliderLeave(){return e.onTimelinePointerLeave},onSliderPointerEnter:K,get ref(){return u()},set ref(pe){u(pe)}});var J=A(X,2);{var we=pe=>{var re=ew(),be=C(re);Mm(be,{}),S(re),O(()=>qe(re,`height: ${e.animatedPreviewTrackHeight}px;`)),b(pe,re)};R(J,pe=>{e.previewTrackAvailable&&pe(we)})}S(z),O(()=>qe(z,`transform: translateY(${e.animatedOffsetY}px);`)),b(t,z),F(),o()}var nw=M('<div><!> <div class="controls s-10" data-testid="player_controls"><div class="controls-left s-10"><!> <!> <!></div> <div class="controls-right s-10"></div></div></div> <!>',1),rw={hash:"s-10",code:'.wrapper-bottom.s-10{bottom:0;box-sizing:border-box;display:flex;flex-direction:column;justify-content:flex-end;left:0;pointer-events:none;position:absolute;transition:transform var(--controls-transition-duration) var(--controls-transition-fn);width:100%;will-change:transform;z-index:var(--controls-container-z-index)}.wrapper-bottom.s-10:before{background:var(--controls-gradient);content:"";height:var(--controls-gradient-height);position:absolute;width:100%}.wrapper-bottom.s-10>:where(.s-10){pointer-events:auto}.controls.s-10{align-items:center;box-sizing:border-box;display:flex;font-size:13px;height:var(--controls-height);justify-content:space-between;padding:0 var(--controls-desktop-padding-horizontal) 4px;white-space:nowrap;width:100%}.controls-left.s-10,.controls-right.s-10{align-content:center;display:flex}.controls-left.s-10{flex-grow:1;min-width:0;overflow:hidden}.controls-left.s-10 >:not(:first-child),.controls-right.s-10 >*{margin-left:var(--controls-desktop-item-margin-left)}.controls-hidden.s-10{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-10{transition:none}'};function Dm(t,e){var Pr,ma,al,va;B(e,!0),Q(t,rw);let[i,o]=Ve(),r=()=>w(Uo,"$disabledControls$",i),a=()=>w(Pi,"$adPlaybackState",i),l=()=>w(Gt,"$playbackState$",i),d=()=>w(Ho,"$currentSubtitle$",i),s=()=>w(Pt,"$isEnded$",i),u=()=>w(Co,"$currentGridType$",i),f=()=>w(di,"$isLive$",i),p=()=>w(gi,"$chromecastState$",i),v=()=>w(ci,"$isPictureInPictureActive",i),$=()=>w(qt,"$pictureInPictureType$",i),y=()=>w(So,"$availableSubtitlesList$",i),h=()=>w(q,"$contextMenuOpenedByKeyboard$",i),x=()=>w(Dt,"$showContextMenuBtn$",i),I=()=>w($t,"$isRewindableLive$",i),T=()=>w(pi,"$isActiveLive$",i),N=()=>w(Br,"$graphIsOpened$",i),L=()=>w(wt,"$contextMenuVisible$",i),E=()=>w(Fi,"$isFullscreen",i),k=()=>w(go,"$autoplayNextEnabled",i),K=()=>w(n(an),"$prevButton",i),H=()=>w(n(Li),"$replayButton",i),z=()=>w(n(ji),"$playButton",i),j=()=>w(n(Lo),"$nextButton",i),ae=()=>w(n(sr),"$playPrevChapterButton",i),X=()=>w(n(ar),"$seekToInteractiveButton",i),ne=()=>w(n(Mi),"$interactiveGraphButton",i),J=()=>w(n(ys),"$liveButton",i),we=()=>w(n(zr),"$time",i),pe=()=>w(n(rs),"$episodes",i),re=()=>w(n(Cr),"$vkLogo",i),be=()=>w(n(ln),"$volume",i),$e=()=>w(n(lr),"$subtitles",i),ee=()=>w(n(Mo),"$settings",i),Re=()=>w(n(Go),"$context",i),fe=()=>w(n(Tr),"$fullscreen",i),P=()=>w(n(Yo),"$chromecast",i),We=()=>w(ro,"$additionalDesktopControlPanelRightButtons$",i),Se=()=>w(gn,"$playerSize",i),Z=()=>w(Io,"$isInteractiveTime$",i),ie=()=>w(cr,"$previewTrackActive",i),De=()=>w(Gi,"$settingsMenuVisible",i),Oe=()=>w(ao,"$settingButtonRef$",i),it=()=>w(yt,"$startedByKeyboard$",i),U=()=>w(vi,"$isAudioAvailable$",i),Pe=()=>w(Rt,"$fakeIsPlaying$",i),ke=()=>w($s,"$seekToInteractiveDisabledTooltip$",i),He=()=>w(li,"$isPreviewTrackHorizontallyAligned$",i),tt=()=>w(ut,"$previewTrackAvailable",i),ye=()=>w(ss,"$previewTrackDragInProgress",i),Ie=()=>w(st,"$adPosition",i),Be=()=>w(Ht,"$position$",i),Lt=()=>w(zt,"$adDuration",i),mt=()=>w(Nt,"$duration$",i),Vt=g(e,"playerControlsWrapperRef",15,void 0),dt=g(e,"playerControlsRef",15,void 0),xt=g(e,"isAds",3,!1),Qt=g(e,"logoTargetUrl",3,""),Tt=g(e,"isOneVideoPlaylist",3,!1),Mt=g(e,"customFullscreenSupported",3,!0),{fakeIsPlaying$:Rt}=wo(),G=ge(),Ce=wo(),le=kt(),_e=G.actions.internal.toggleMuted,Me=G.actions.internal.togglePlay,rt=G.actions.internal.pause,pt=G.actions.internal.toggleSubtitle,ue=G.actions.internal.checkFullscreenSupport,ze=(Pr=G.callbacks)==null?void 0:Pr.onAudioDoesNotExistHint,Qe=(ma=G.callbacks)==null?void 0:ma.onAudioDisabledHint,ct=(va=(al=G.callbacks)==null?void 0:al.uiInfo)==null?void 0:va.onControlsBottomWillChange,Nt=G.state.duration$,Ht=G.state.positionWithScrubbing$,Gt=G.state.playbackState$,vi=G.state.isAudioAvailable$,Qi=G.state.isAudioDisabled,Pt=G.state.isEnded$,di=G.state.isLive$,pi=G.state.isActiveLive$,$t=G.state.isRewindableLive$,{isActive$:ci,type$:qt}=Ce.pictureInPicture$,Gi=G.ui.settingsMenu.visible$,Yi=G.ui.settingsMenu.openedByBtnKeyboard$,ot=G.ui.controls,Ue=G.actions.internal.getVideoEpisodes(),gi=G.state.chromecastState$,So=G.state.availableSubtitlesList$,Ho=G.state.currentSubtitle$,Uo=ot.disabledControls$,wt=G.ui.contextMenu.visible$,Dt=G.ui.contextMenu.showContextMenuBtn$,q=G.ui.contextMenu.openedByBtnKeyboard$,yt=G.ui.startedByKeyboard$,yi=G.ui.controlBlocks,Yt=G.ui.previewTrackNotificationVisible,Ke=G.ui.t,zt=G.ads.duration,st=G.ads.position,Pi=G.ads.playbackState,Fi=G.ui.isFullscreen,gn=G.ui.playerSize,Co=G.ui.currentGridType$,ro=G.ui.additionalDesktopControlPanelRightButtons$,go=G.ui.autoplayNextEnabled$,zo=G.actions.internal.getVideoElement,ho=G.actions.internal.replayInteractive,To=G.actions.internal.prevVideoClick,Wo=G.actions.internal.nextVideoClick,Ai=G.state.isInteractive,Io=G.state.isInteractiveTime$,An=G.state.showInteractiveGraph,Or=G.state.showSeekToInteractive,Ln=G.state.showPlayPrevChapter,bs=G.state.showInteractiveTimeIndicator,is=G.state.playPrevChapterDisabledTooltip,$s=Ce.seekToInteractiveDisabledTooltip$,Br=Ce.graphIsOpened$,Mn=le.features.interactiveResponsiveUi,Fr=m(()=>r().has("EPISODE_BUTTON")),Eo=m(()=>r().has("GRAPH_BUTTON")),Hr=m(()=>r().has("SEEK_TO_INTERACTIVE_BUTTON")),ko=m(()=>r().has("PLAY_BUTTON")),$r=m(()=>r().has("REPLAY_BUTTON")),hn=m(()=>r().has("PLAY_PREV_CHAPTER_BUTTON")),os=()=>G.actions.internal.toggleChromecast(),Yn=m(()=>xt()?a()==="playing":l()===Nm.PLAYING),so=m(()=>d().value!=="off"),yr=m(()=>s()&&!xt()||Ai),jn=m(()=>Mn?n(yr)&&oo(u(),"m"):n(yr)),Vn=m(()=>!s()||Ai||xt()),_o=m(()=>oo(u(),"m")),Xn=m(()=>e.showNextPrevButtons&&oo(u(),"m")&&!xt()&&e.nextButtonActive),Zn=m(()=>e.showNextPrevButtons&&oo(u(),"m")&&!xt()&&e.prevButtonActive),ns=m(()=>!xt()&&!!f()),vt=m(()=>p()!==nb.NOT_AVAILABLE&&!(v()&&$()===1)&&oo(u(),"m")&&!Ai),Zt=m(()=>e.showAutoplayNext&&!Tt()&&oo(u(),"s")),Jn=m(()=>y().length>0&&oo(u(),"m")),Ur=m(()=>h()||x()),Ko=m(()=>oo(u(),"s")&&!xt()),er=m(()=>!e.logoHidden&&!xt()),tr=m(()=>le.features.fullscreen&&ue()&&(e.logoHidden||oo(u(),Mn?"xs":"s"))&&!(v()&&$()===1)&&(Ai?Mt():!0)),bo=m(()=>(!f()||xt())&&!(le.features.interactiveHideTime&&Ai)),ir=m(()=>An&&oo(u(),"m")),or=m(()=>Mn?Or&&oo(u(),"s"):Or),Rn=m(()=>Mn?Ln&&oo(u(),"s"):Ln),Po=m(()=>!xt()&&!f()&&!!(Ue!=null&&Ue.length)&&n(_o)&&!n(Fr)),qo=m(()=>!I()||!!T()),xr=m(()=>N()?Ke("tooltip_interactive_graph_on"):Ke("tooltip_interactive_graph_off")),Ii=m(()=>L()?Ke("tooltip_context_menu_close"):Ke("tooltip_context_menu_open")),nr=(at,lt)=>at?lt&<===Nm.PAUSED?Ke("tooltip_play"):"":Ke("tooltip_live"),Qo=m(()=>nr(n(qo),l())),rr=m(()=>le.logoType==="vk_video"?Ke("tooltip_vk_video_logo"):Ke("tooltip_vk_logo")),wr=m(()=>n(so)?Ke("tooltip_subtitles_on"):Ke("tooltip_subtitles_off")),Sr=m(()=>E()?Ke("tooltip_fullscreen_on"):Ke("tooltip_fullscreen_off")),Ao=m(()=>p()===nb.CONNECTED?Ke("tooltip_chromecast_on"):Ke("tooltip_chromecast_off")),gt=m(()=>k()?Ke("tooltip_autoplay_on"):Ke("tooltip_autoplay_off")),ni=W(0),jt=si({}),Ci=si({}),an=m(()=>ot.prevButton),Li=m(()=>ot.replayButton),ji=m(()=>ot.playButton),Lo=m(()=>ot.nextButton),sr=m(()=>ot.playPrevChapterButton),ar=m(()=>ot.seekToInteractiveButton),Mi=m(()=>ot.interactiveGraphButton),ys=m(()=>ot.liveButton),zr=m(()=>ot.time),rs=m(()=>ot.episodes),Cr=m(()=>ot.vkLogo),ln=m(()=>ot.volume),lr=m(()=>ot.subtitles),Mo=m(()=>ot.settings),Go=m(()=>ot.context),Tr=m(()=>ot.fullscreen),Yo=m(()=>ot.chromecast),Vo=m(()=>({prevButton:K()?K().right-K().left:0,replayButton:H()?H().right-H().left:0,playButton:z()?z().right-z().left:0,nextButton:j()?j().right-j().left:0,playPrevChapterButton:ae()?ae().right-ae().left:0,seekToInteractiveButton:X()?X().right-X().left:0,interactiveGraphButton:ne()?ne().right-ne().left:0,liveButton:J()?J().right-J().left:0,time:we()?we().right-we().left:0,episodes:pe()?pe().right-pe().left:0,vkLogo:re()?re().right-re().left:0,volume:be()?be().right-be().left:0,subtitles:$e()?$e().right-$e().left:0,settings:ee()?ee().right-ee().left:0,context:Re()?Re().right-Re().left:0,fullscreen:fe()?fe().right-fe().left:0,chromecast:P()?P().right-P().left:0,additionalButtons:We().length?We().reduce(at=>[...at,40],[]):[]})),Nn=W(0);Ne(()=>{(!n(Nn)||n(Nn)<n(Vo).time)&&St(()=>D(Nn,n(Vo).time,!0))});let Wr=W(!1);Ne(()=>{let at=0;n(Po)&&(oo(u(),"xl")?at=n(Vo).time:at=60);let lt=n(Vo).prevButton+n(Vo).playButton+n(Vo).nextButton+n(Vo).seekToInteractiveButton+n(Vo).interactiveGraphButton+n(Vo).liveButton+n(Nn)+at;D(Wr,n(bo)&&n(ni)>=lt,!0)});let je=m(()=>n(Wr)&&oo(u(),"m")),It=rb(ql,260),hi=rb(Ju,260);Ne(()=>{Se(),Z(),ie(),It(zo(),ot,jt,e.showControls),hi(zo(),yi,Ci,e.showControls)}),Ne(()=>{Ci.bottom=Vt()});let ao=de();Ne(()=>{De(),Oe()&&St(()=>Nl(Oe(),De(),Yi))});let Xi;Ne(()=>{it(),St(()=>Xu(yt,it(),Xi))});function Zi(){aa({isAudioDisabled:Qi,isAudioAvailable:U(),isAds:xt(),audioIsNotExistHintCallback:ze,audioDisabledHintCallback:Qe})&&_e()}let lo=Ai?ho:Me,Ji=m(()=>Pe()!==null),dn=m(()=>n(Ji)?Pe():n(Yn)),Dn=m(()=>n(dn)?Ke("tooltip_pause"):Ke("tooltip_play")),co=Ke("tooltip_episodes"),Ro=m(()=>{var at,lt,Ri,uo;return n(Zn)?{id:"prevButton",type:"desktop-control-panel-left",weight:Os.prevButton,buttonComponent:Wa,buttonComponentProps:{disabled:!e.prevButtonActive,type:"prev",click:To.bind(null,!0)},tooltipEnabled:!((lt=(at=G.callbacks)==null?void 0:at.uiInfo)!=null&<.onPrevButtonMouseEnter)&&!((uo=(Ri=G.callbacks)==null?void 0:Ri.uiInfo)!=null&&uo.onPrevButtonMouseLeave),mouseEnter:()=>{var Ni,fi,Hi;(Hi=(fi=(Ni=G.callbacks)==null?void 0:Ni.uiInfo)==null?void 0:fi.onPrevButtonMouseEnter)==null||Hi.call(fi,sn(zo(),jt,"prevButton",e.showControls))},mouseLeave:()=>{var Ni,fi,Hi;(Hi=(fi=(Ni=G.callbacks)==null?void 0:Ni.uiInfo)==null?void 0:fi.onPrevButtonMouseLeave)==null||Hi.call(fi,sn(zo(),jt,"prevButton",e.showControls))},tooltipText:Ke("tooltip_previous"),disabled:!e.prevButtonActive}:void 0}),_n=m(()=>n(jn)?{id:"replayButton",type:"desktop-control-panel-left",weight:Os.replayButton,buttonComponent:Ql,buttonComponentProps:{disabled:n($r),click:lo},tooltipText:Ke("tooltip_restart"),disabled:n($r)}:void 0),Ir=m(()=>n(Vn)?{id:"playButton",type:"desktop-control-panel-left",weight:Os.playButton,buttonComponent:Gl,buttonComponentProps:{disabled:n(ko),isPlaying:n(Yn),click:Me},tooltipText:n(Dn),disabled:n(ko)}:void 0),Ge=m(()=>{var at,lt,Ri,uo;return n(Xn)?{id:"nextButton",type:"desktop-control-panel-left",weight:Os.nextButton,buttonComponent:Wa,buttonComponentProps:{disabled:!e.nextButtonActive,type:"next",click:Wo.bind(null,!0)},tooltipEnabled:!((lt=(at=G.callbacks)==null?void 0:at.uiInfo)!=null&<.onNextButtonMouseEnter)&&!((uo=(Ri=G.callbacks)==null?void 0:Ri.uiInfo)!=null&&uo.onNextButtonMouseLeave),mouseEnter:()=>{var Ni,fi,Hi;(Hi=(fi=(Ni=G.callbacks)==null?void 0:Ni.uiInfo)==null?void 0:fi.onNextButtonMouseEnter)==null||Hi.call(fi,sn(zo(),jt,"nextButton",e.showControls))},mouseLeave:()=>{var Ni,fi,Hi;(Hi=(fi=(Ni=G.callbacks)==null?void 0:Ni.uiInfo)==null?void 0:fi.onNextButtonMouseLeave)==null||Hi.call(fi,sn(zo(),jt,"nextButton",e.showControls))},tooltipText:Ke("tooltip_next"),disabled:!e.nextButtonActive}:void 0}),Xt=m(()=>Ai&&n(Rn)?{id:"playPrevChapterButton",type:"desktop-control-panel-left",weight:Os.playPrevChapterButton,buttonComponent:ac,buttonComponentProps:{disabled:n(hn),click:e.playPrevChapter},tooltipText:Ke("tooltip_interactive_go_back"),disabledTooltipContent:Ke(is),disabled:n(hn)}:void 0),Ti=m(()=>Ai&&n(or)?{id:"seekToInteractiveButton",type:"desktop-control-panel-left",weight:Os.seekToInteractiveButton,buttonComponent:dc,buttonComponentProps:{disabled:n(Hr),click:e.seekToInteractive},tooltipText:Ke("tooltip_interactive_seek"),disabled:n(Hr),disabledTooltipContent:Ke(ke())}:void 0),No=m(()=>Ai&&n(ir)?{id:"interactiveGraphButton",type:"desktop-control-panel-left",weight:Os.interactiveGraphButton,buttonComponent:cc,buttonComponentProps:{disabled:n(Eo),click:Br.toggle,graphIsOpened:N()},tooltipText:n(xr)}:void 0),jo=m(()=>n(ns)?{id:"liveButton",type:"desktop-control-panel-left",weight:Os.liveButton,buttonComponent:uc,buttonComponentProps:{isLiveActive:n(qo),ariaLabel:n(Qo)},tooltipText:n(Qo),disabled:n(qo)&&l()===Nm.PLAYING}:void 0),On=m(()=>[n(Ro),n(_n),n(Ir),n(Ge),n(Xt),n(Ti),n(No),n(jo)].filter(at=>!!at).sort(Oa)),$o=m(()=>n(er)?{id:"vkLogo",type:"desktop-control-panel-right",weight:Fs.vkLogo,buttonComponent:Jd,buttonComponentProps:{targetUrl:Qt(),logoClickable:e.logoClickable,click:rt},tooltipText:n(rr),disabledTooltipContent:"",disabled:!e.logoClickable}:void 0),dr=m(()=>n(Zt)?{id:"autoplayNext",type:"desktop-control-panel-right",weight:Fs.autoplayNext,buttonComponent:lc,tooltipText:n(gt)}:void 0),Bn=m(()=>({id:"volume",type:"desktop-control-panel-right",weight:Fs.volume,buttonComponent:lm,buttonComponentProps:{click:Zi,isAds:xt()}})),Hs=m(()=>n(Jn)?{id:"subtitles",type:"desktop-control-panel-right",weight:Fs.subtitles,buttonComponent:om,buttonComponentProps:{isSubtitlesEnabled:n(so),click:pt},tooltipText:n(wr)}:void 0),Us=m(()=>n(Ko)?{id:"settings",type:"desktop-control-panel-right",weight:Fs.settings,buttonComponent:Fl,buttonComponentProps:{ref$:ao},tooltipText:De()?void 0:Ke("tooltip_settings_off")}:void 0),xs=m(()=>le.features.contextMenuButton?{id:"context",type:"desktop-control-panel-right",weight:Fs.context,buttonComponent:ym,buttonComponentProps:{ariaLabel:Ke("aria_label_context_menu")},className:n(Ur)?"":"out-of-view",tooltipText:n(Ii)}:void 0),bn=m(()=>n(tr)?{id:"fullscreen",type:"desktop-control-panel-right",weight:Fs.fullscreen,buttonComponent:Zd,buttonComponentProps:{isFullscreen:E(),click:e.toggleFullscreen},tooltipText:n(Sr)}:void 0),zs=m(()=>n(vt)?{id:"chromecast",type:"desktop-control-panel-right",weight:Fs.chromecast,buttonComponent:tc,buttonComponentProps:{state:p(),click:os},tooltipText:n(Ao)}:void 0),ua=m(()=>[n($o),n(dr),n(Bn),n(Hs),n(Us),n(xs),n(bn),n(zs),...We()].filter(at=>!!at).sort(Oa)),cr=G.ui.previewTrackActive,ss=G.ui.previewTrackDragInProgress,ut=G.ui.previewTrackAvailable,li=G.ui.isPreviewTrackHorizontallyAligned,me=m(()=>ib({onPreviewTrackOpened:G.actions.internal.previewTrackOpened,getTimelineRef:()=>jt.timeline,isHorizontal:He()})),ft=m(()=>n(me).progressBarY),Jt=m(()=>n(me).controlsY),xi=m(()=>n(me).onPointerDown),eo=m(()=>n(me).onPointerMove),Ei=m(()=>n(me).onPointerUp),ri=m(()=>n(me).calculatedHeight),_i=m(()=>n(me).closePreviewTrack);Ne(()=>{ie()?Yt.set(!1):n(_i)()});let Vi;Et(()=>()=>Vi&&clearTimeout(Vi));let Fn=at=>{ie()||!tt()||(n(xi)(at),Vi=setTimeout(()=>{G.actions.internal.previewTrackDragStarted()},200))},Er=()=>{ie()||n(Ei)(),Vi&&clearTimeout(Vi),ye()&&G.actions.internal.previewTrackDragFinished()},yo=at=>{n(eo)(at),!ie()&&tt()&&!ie()&&Yt.set(!0)},tl=()=>{Yt.set(!1)},il=at=>{if(Ci.bottom&&ct&&at.target===Ci.bottom){let lt=getComputedStyle(Ci.bottom),{transitionDuration:Ri,transitionTimingFunction:uo}=lt,Ni=sn(zo(),Ci,"bottom",e.showControls,!0);ct(Ni,{duration:Ri,timingFunction:uo})}};var ws=nw(),Kr=ce(ws);let Ws;var kr=C(Kr);{var ol=at=>{let lt=m(()=>n(ft)()),Ri=m(()=>n(ri)());Rm(at,{get animatedOffsetY(){return n(lt)},get animatedPreviewTrackHeight(){return n(Ri)},get canRewindLive(){return e.canRewindLive},get isAds(){return xt()},onTimelineMove:yo,onTimelinePointerDown:Fn,onTimelinePointerUp:Er,onTimelinePointerLeave:tl,get previewTrackAvailable(){return tt()},get timelineRef(){return jt.timeline},set timelineRef(uo){jt.timeline=uo}})};R(kr,at=>{e.showControls&&at(ol)})}var Ss=A(kr,2),$n=C(Ss),nl=C($n);bi(nl,17,()=>n(On),at=>at.id,(at,lt)=>{Zu(at,{get buttonComponent(){return n(lt).buttonComponent},get buttonComponentProps(){return n(lt).buttonComponentProps},get tooltipText(){return n(lt).tooltipText},get disabledTooltipContent(){return n(lt).disabledTooltipContent},get disabled(){return n(lt).disabled},get className(){return n(lt).className},get tooltipEnabled(){return n(lt).tooltipEnabled},get mouseEnter(){return n(lt).mouseEnter},get mouseLeave(){return n(lt).mouseLeave},get tooltipVisible(){return e.showControls},get ref(){return jt[n(lt).id]},set ref(Ri){jt[n(lt).id]=Ri}})});var pa=A(nl,2);{var Zl=at=>{let lt=m(()=>!e.showControls),Ri=m(()=>xt()?Ie():Be()),uo=m(()=>xt()?Lt():mt());jd(at,{get isHidden(){return n(lt)},isMobile:!1,get showDuration(){return n(je)},get position(){return n(Ri)},get duration(){return n(uo)},get ref(){return jt.time},set ref(Ni){jt.time=Ni}})};R(pa,at=>{n(bo)&&at(Zl)})}var rl=A(pa,2);let Jl=m(()=>!n(Po));Fo(rl,{className:"w-max",get disabled(){return n(Jl)},get tooltipContent(){return co},get tooltipVisible(){return e.showControls},get ref(){return jt.episodes},set ref(at){jt.episodes=at},children:(at,lt)=>{var Ri=Ae(),uo=ce(Ri);{var Ni=fi=>{ic(fi,{get position(){return Be()},get duration(){return mt()},get timeCodes(){return Ue}})};R(uo,fi=>{n(Po)&&fi(Ni)})}b(at,Ri)},$$slots:{default:!0}}),S($n);var fa=A($n,2);bi(fa,21,()=>n(ua),at=>at.id,(at,lt)=>{var Ri=Ae(),uo=ce(Ri);{var Ni=Hi=>{Zu(Hi,{get buttonComponent(){return n(lt).buttonComponent},get buttonComponentProps(){return n(lt).buttonComponentProps},get tooltipText(){return n(lt).tooltipText},get disabledTooltipContent(){return n(lt).disabledTooltipContent},get disabled(){return n(lt).disabled},get className(){return n(lt).className},get tooltipVisible(){return e.showControls},get ref(){return jt[n(lt).id]},set ref(Ks){jt[n(lt).id]=Ks}})},fi=Hi=>{let Ks=m(()=>!!n(lt).disabled);Cm(Hi,{get id(){return n(lt).id},get testId(){return n(lt).testId},get icon(){return n(lt).icon},get ariaLabel(){return n(lt).ariaLabel},get tooltipText(){return n(lt).tooltipText},get disabledTooltipContent(){return n(lt).disabledTooltipContent},get disabled(){return n(Ks)},get onClick(){return n(lt).onClick},get disableMouseupTooltipShow(){return n(lt).disableMouseupTooltipShow},get tooltipVisible(){return e.showControls},get ref(){return jt[n(lt).id]},set ref(td){jt[n(lt).id]=td}})};R(uo,Hi=>{J_(n(lt))?Hi(Ni):Hi(fi,!1)})}b(at,Ri)}),S(fa),S(Ss),Ze(Ss,at=>dt(at),()=>dt()),S(Kr),Ze(Kr,at=>Vt(at),()=>Vt());var ed=A(Kr,2);{var sl=at=>{rc(at,{get ref(){return jt.interactiveTimeIndicator},set ref(lt){jt.interactiveTimeIndicator=lt}})};R(ed,at=>{bs&&at(sl)})}O((at,lt)=>{Ws=se(Kr,1,"wrapper-bottom s-10",null,Ws,at),qe(Ss,lt),Ss.inert=ie()},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth||ye()}),()=>`transform: translateY(${n(Jt)()}px);`]),nt("transitionstart",Kr,il),In($n,"clientWidth",at=>D(ni,at)),b(t,ws),F(),o()}import{ChromecastState as ab,PlaybackState as lb}from"@vkontakte/videoplayer-core/es2018";import{noop as sb}from"@vkontakte/videoplayer-shared/es2018";var sw=M('<div class="icon icon-error-stub s-1z"><div class="inner s-1z"></div></div>'),aw=M('<img class="icon s-1z" aria-hidden="true"/>'),lw={hash:"s-1z",code:".icon.s-1z{height:24px!important;width:24px!important}.inner.s-1z{background-color:var(--white);height:16px;width:16px}"};function Om(t,e){Q(t,lw);let i=g(e,"disabled",3,!1),o=g(e,"onClick",3,sb),r=m(()=>o()===sb),a=m(()=>n(r)||i()),l=W(!1),d=()=>{D(l,!0)},s=m(()=>n(r)?"btn-full-opacity":"");Ft(t,{get className(){return n(s)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return n(a)},get testId(){return e.testId},children:(u,f)=>{var p=Ae(),v=ce(p);{var $=h=>{var x=sw();b(h,x)},y=h=>{var x=aw();O(()=>Le(x,"src",e.iconUrl)),nt("error",x,d),ka(x),b(h,x)};R(v,h=>{n(l)?h($):h(y,!1)})}b(u,p)},$$slots:{default:!0}})}var dw=Te('<path d="M8.7 8.1 5.3 4.72A1 1 0 0 1 6.72 3.3L20.7 17.29a1 1 0 0 1-1.41 1.41L16 15.41V20a1 1 0 0 1-1 1c-.64 0-1.26-.25-1.72-.7L7.79 15H5a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2h2.77zm2.88-2.76 1.7-1.65A2.5 2.5 0 0 1 15 3a1 1 0 0 1 1 1v5.76z"></path>');function Bm(t){Je(t,{testId:"muted-icon",children:(e,i)=>{var o=dw();b(e,o)},$$slots:{default:!0}})}import{noop as cw}from"@vkontakte/videoplayer-shared/es2018";function ep(t,e){B(e,!0);let i=g(e,"muted",3,!1),o=g(e,"click",3,cw),r=g(e,"ref",15,void 0),l=ge().ui.t,d=m(()=>i()?l("tooltip_volume"):l("tooltip_volume_muted")),s=m(()=>i()?"btn-mobile-muted":"btn-mobile-unmuted");Ft(t,{get testId(){return n(s)},get click(){return o()},get ariaLabel(){return n(d)},role:"button",get ref(){return r()},set ref(u){r(u)},children:(u,f)=>{var p=Ae(),v=ce(p);{var $=h=>{Bm(h,{})},y=h=>{da(h,{get size(){return"24"}})};R(v,h=>{i()?h($):h(y,!1)})}b(u,p)},$$slots:{default:!0}}),F()}var uw=Te('<path d="M11.64 12.37 9.07 9.8h1.03a.9.9 0 1 0 0-1.8H6.9a.9.9 0 0 0-.9.9v3.2a.9.9 0 0 0 1.8 0v-1.02l2.53 2.52.13.14a.9.9 0 0 0 1.28-1.28z"></path>'),pw=Te('<path d="m6.36 9.63 2.57 2.57H7.9a.9.9 0 1 0 0 1.8h3.2a.9.9 0 0 0 .9-.9V9.9a.9.9 0 0 0-1.8 0v1.02L7.67 8.4l-.13-.14a.9.9 0 0 0-1.28 1.28z"></path>'),fw=Te('<path d="M7.66 4h6.68q1.2-.01 2 .04.83.06 1.53.38a4 4 0 0 1 1.7 1.7c.24.48.34.98.39 1.54q.05.8.04 2v1.44a.9.9 0 0 1-1.8 0V9.7c0-.85 0-1.44-.04-1.9-.03-.44-.1-.68-.19-.85a2 2 0 0 0-.92-.92 2 2 0 0 0-.85-.2c-.46-.03-1.04-.03-1.9-.03H7.7c-.85 0-1.44 0-1.9.04-.44.03-.68.1-.85.19a2 2 0 0 0-.92.92c-.09.17-.16.4-.2.85-.03.46-.03 1.05-.03 1.9v2.65c0 .85 0 1.44.04 1.9.03.44.1.68.19.85a2 2 0 0 0 .92.92c.17.08.4.15.85.19.46.03 1.04.04 1.9.04h2.4a.9.9 0 0 1 0 1.8H7.66q-1.2.01-2-.05a4 4 0 0 1-1.53-.38 4 4 0 0 1-1.7-1.7 4 4 0 0 1-.39-1.53q-.05-.8-.04-2V9.65q-.01-1.2.04-2c.05-.56.15-1.06.39-1.53a4 4 0 0 1 1.7-1.7c.47-.24.97-.34 1.53-.39q.8-.05 2-.04M13 16.8c0-.98 0-1.47.19-1.84a2 2 0 0 1 .77-.77c.37-.19.86-.19 1.84-.19h3.4c.98 0 1.47 0 1.85.19q.5.27.76.77c.19.37.19.86.19 1.84v.4c0 .98 0 1.47-.19 1.85a2 2 0 0 1-.77.76c-.37.19-.86.19-1.84.19h-3.4c-.98 0-1.47 0-1.85-.19a2 2 0 0 1-.76-.76c-.19-.38-.19-.87-.19-1.85z"></path><!>',1);function Fm(t,e){let i=g(e,"isActive",3,!1),o=m(()=>i()?"pip-icon--active":"pip-icon");Je(t,{get testId(){return n(o)},children:(r,a)=>{var l=fw(),d=A(ce(l));{var s=f=>{var p=uw();b(f,p)},u=f=>{var p=pw();b(f,p)};R(d,f=>{i()?f(s):f(u,!1)})}b(r,l)},$$slots:{default:!0}})}import{noop as mw}from"@vkontakte/videoplayer-shared/es2018";function Hm(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"isPictureInPictureActive",3,!1),r=g(e,"click",3,mw),a=Y("menu_pip");Ft(t,{testId:"btn-pip",get ariaLabel(){return a},get click(){return r()},get ref(){return i()},set ref(l){i(l)},children:(l,d)=>{Fm(l,{get isActive(){return o()}})},$$slots:{default:!0}}),F()}import{debounceFn as db}from"@vkontakte/videoplayer-shared/es2018";var vw=(t,e,i,o)=>{n(e)&&i.onDisabledPlayPrevChapterClick(n(o))},gw=(t,e,i,o)=>{n(e)&&i.onDisabledSeekToInteractiveClick(n(o))},hw=M("<div><!></div>"),_w=M("<div><!></div>"),bw=M("<div><!></div>"),$w=M("<!> <!> <!>",1),yw=M("<div></div> <div></div> <div><!> <!> <!> <!> <!> <!></div> <div><!> <!> <!> <!></div> <!>",1),xw=M('<div class="wrapper-middle s-11"><!></div>'),ww=M("<div><!></div> <!> <div><!></div>",1),Sw=M('<div aria-hidden="true">·</div> <!>',1),Cw=M('<!> <!> <div><div><div class="controls mobile s-11" data-testid="bottom-controls"><div class="controls-group contain s-11"><!> <!> <!> <!></div> <div class="controls-group s-11"><!> <!> <!></div></div> <!></div></div> <!>',1),Tw={hash:"s-11",code:".wrapper-bottom.s-11{background:var(--controls-gradient);bottom:0;box-sizing:border-box;display:flex;flex-direction:column;height:var(--controls-gradient-height);justify-content:flex-end;left:0;padding:0 4px 8px;pointer-events:none;position:absolute;transition:transform var(--controls-transition-duration) var(--controls-transition-fn);width:100%;z-index:var(--controls-container-z-index)}.wrapper-bottom.s-11>:where(.s-11){pointer-events:auto}.wrapper-bottom.ads-timeline-mobile.s-11{height:9px;padding:0 4px 4px}.wrapper-middle.s-11{align-items:center;left:50%;top:50%;transform:translate(-50%,-50%)}.wrapper-middle.s-11,.wrapper-top-right.s-11{display:flex;position:absolute;transition:opacity var(--controls-transition-duration);z-index:var(--controls-container-z-index)}.wrapper-top-right.s-11{right:8px;top:4px}.wrapper-top-left.s-11{left:8px;position:absolute;top:4px;z-index:var(--controls-container-z-index)}.wrapper-middle-left.s-11,.wrapper-middle-left-second.s-11,.wrapper-middle-right.s-11{align-items:center;background-color:rgba(0,0,0,.56);border-radius:12px;display:flex;height:44px;justify-content:center;position:absolute;top:50%;transform:translateY(-50%);transition:opacity var(--controls-transition-duration);width:44px}.wrapper-middle-left.s-11{left:12px}.wrapper-middle-left-second.s-11{left:64px}.wrapper-middle-right.s-11{right:12px}.controls.s-11{align-items:center;box-sizing:border-box;font-size:13px;height:var(--controls-height);justify-content:space-between;padding:0 4px;transition:transform var(--controls-transition-duration) var(--controls-transition-fn);white-space:nowrap;width:100%;will-change:transform}.controls.s-11,.controls-group.s-11{display:flex}.controls-group.contain.s-11{min-width:0}.controls-group.s-11 >:not(:first-child){margin-left:8px}.hidden.s-11{opacity:0;visibility:hidden}.controls-hidden.s-11{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-11{transition:none}.overlay-mobile.s-11{background-color:rgba(0,0,0,.3);height:100%;left:0;pointer-events:none;position:absolute;top:0;transition:opacity var(--controls-transition-duration);width:100%}@media screen and (orientation:portrait){.wrapper-top-left.fullscreen.s-11,.wrapper-top-right.fullscreen.s-11{top:16px}.controls-wrapper.fullscreen.s-11{bottom:30px;position:absolute;width:calc(100% - 8px)}}@media screen and (orientation:landscape){.wrapper-top-left.fullscreen.s-11{left:44px;top:12px}.wrapper-top-right.fullscreen.s-11{right:44px;top:12px}.wrapper-middle-left.fullscreen.s-11{left:44px}.wrapper-middle-left-second.fullscreen.s-11{left:96px}.wrapper-middle-right.fullscreen.s-11{right:44px}.controls-wrapper.fullscreen.s-11{bottom:32px;left:36px;position:absolute;right:36px;width:calc(100% - 72px)}}"};function Um(t,e){var Yo,Vo,Nn,Wr;B(e,!0),Q(t,Tw);let[i,o]=Ve(),r=()=>w(gn,"$seekToInteractiveDisabledTooltip$",i),a=()=>w(ot,"$disabledControls$",i),l=()=>w(Mt,"$playbackState$",i),d=()=>w(Uo,"$adPlaybackState",i),s=()=>w(Ce,"$isEnded$",i),u=()=>w(Dt,"$playerSize",i),f=()=>w(ue,"$scrubbingInProgress",i),p=()=>w(Gi,"$chromecastState$",i),v=()=>w(Qe,"$isPictureInPictureActive",i),$=()=>w(ct,"$pictureInPictureType$",i),y=()=>w(ze,"$mobileNotReportControlHidden$",i),h=()=>w($t,"$chromecastHidden",i),x=()=>w(xt,"$playerPhase",i),I=()=>w(di,"$pipHidden",i),T=()=>w(gi,"$currentGridType$",i),N=()=>w(Qi,"$vkLogoHidden",i),L=()=>w(vi,"$volumeHidden",i),E=()=>w(le,"$isLive$",i),k=()=>w(Nt,"$settingsMenuVisible",i),K=()=>w(pt,"$isRewindableLive$",i),H=()=>w(rt,"$isActiveLive$",i),z=()=>w(Rt,"$isAudioAvailable$",i),j=()=>w(Me,"$muted$",i),ae=()=>w(_e,"$volume$",i),X=()=>w(Ke,"$isInteractiveTime$",i),ne=()=>w(or,"$settingButtonRef$",i),J=()=>w(Ue,"$startedByKeyboard$",i),we=()=>w(wt,"$isFullscreen",i),pe=()=>w(q,"$additionalButtons$",i),re=()=>w(Pt,"$autoplayNextToggleHidden",i),be=()=>w(Yi,"$crashed$",i),$e=()=>w(pi,"$settingsHidden",i),ee=()=>w(Co,"$graphIsOpened$",i),Re=()=>w(Ho,"$adPosition",i),fe=()=>w(So,"$adDuration",i),P=()=>w(Tt,"$position$",i),We=()=>w(Qt,"$duration$",i),Se=g(e,"playerControlsWrapperRef",15,void 0),Z=g(e,"playerControlsRef",15,void 0),ie=g(e,"isAds",3,!1),De=g(e,"logoTargetUrl",3,""),Oe=g(e,"isOneVideoPlaylist",3,!1),it=g(e,"customFullscreenSupported",3,!0),U=ge(),Pe=wo(),ke=kt(),He=U.actions.internal.toggleMuted,tt=U.actions.internal.togglePlay,ye=U.actions.internal.pause,Ie=U.actions.internal.prevVideoClick,Be=U.actions.internal.nextVideoClick,Lt=U.actions.internal.checkFullscreenSupport,mt=(Yo=U.callbacks)==null?void 0:Yo.onAudioDoesNotExistHint,Vt=(Vo=U.callbacks)==null?void 0:Vo.onAudioDisabledHint,dt=(Wr=(Nn=U.callbacks)==null?void 0:Nn.uiInfo)==null?void 0:Wr.onControlsBottomWillChange,xt=U.playerPhase,Qt=U.state.duration$,Tt=U.state.positionWithScrubbing$,Mt=U.state.playbackState$,Rt=U.state.isAudioAvailable$,G=U.state.isAudioDisabled,Ce=U.state.isEnded$,le=U.state.isLive$,_e=U.state.volume$,Me=U.state.muted$,rt=U.state.isActiveLive$,pt=U.state.isRewindableLive$,ue=U.ui.scrubbingInProgress,ze=U.ui.mobileNotReportControlHidden$,{isActive$:Qe,type$:ct}=Pe.pictureInPicture$,Nt=U.ui.settingsMenu.visible$,Ht=U.ui.settingsMenu.openedByBtnKeyboard$,Gt=U.ui.controls,{volume:vi,vkLogo:Qi,autoplayNextToggle:Pt,pip:di,settings:pi,chromecast:$t}=U.ui.hiddenControls,ci=U.actions.internal.getVideoEpisodes(),qt=U.webApi.pictureInPictureApi,Gi=U.state.chromecastState$,Yi=U.state.crashed$,ot=Gt.disabledControls$,Ue=U.ui.startedByKeyboard$,gi=U.ui.currentGridType$,So=U.ads.duration,Ho=U.ads.position,Uo=U.ads.playbackState,wt=U.ui.isFullscreen,Dt=U.ui.playerSize,q=U.ui.additionalButtonsDeprecated$,yt=U.actions.internal.getVideoElement,yi=U.actions.internal.replayInteractive,Yt=U.state.isInteractive,Ke=U.state.isInteractiveTime$,zt=U.state.showInteractiveGraph,st=U.state.showSeekToInteractive,Pi=U.state.showPlayPrevChapter,Fi=U.state.showInteractiveTimeIndicator,gn=Pe.seekToInteractiveDisabledTooltip$,Co=Pe.graphIsOpened$,ro=U.ui.controlBlocks,go=m(()=>Y(U.state.playPrevChapterDisabledTooltip)),zo=m(()=>Y(r())),ho=m(()=>a().has("EPISODE_BUTTON")),To=m(()=>a().has("GRAPH_BUTTON")),Wo=m(()=>a().has("SEEK_TO_INTERACTIVE_BUTTON")),Ai=m(()=>a().has("PLAY_BUTTON")),Io=m(()=>a().has("REPLAY_BUTTON")),An=m(()=>a().has("PLAY_PREV_CHAPTER_BUTTON")),Or=m(()=>l()===lb.PLAYING),Ln=m(()=>d()==="paused"),bs=m(()=>s()&&!ie()&&!Yt),is=m(()=>!s()||ie()),$s=m(()=>e.showNextPrevButtons&&!ie()&&e.prevButtonActive),Br=m(()=>e.showNextPrevButtons&&!ie()&&e.nextButtonActive),Mn=m(()=>u().width>300),Fr=m(()=>u().width>400),Eo=m(f),Hr=m(()=>p()!==ab.NOT_AVAILABLE&&!(v()&&$()===1)&&!y()&&!Yt&&!h()),ko=m(()=>x()==="LiveWaitingStart"),$r=m(()=>!!qt&&p()!==ab.CONNECTED&&!y()&&($()===1&&n(ko)||!n(ko))&&!n(Eo)&&!Yt&&!I()),hn=W(!1);Et(()=>{let je=qt==null?void 0:qt.info.isActive$.subscribe(It=>D(hn,It,!0));return()=>je==null?void 0:je.unsubscribe()});let os=m(()=>!n(Eo)&&oo(T(),"s")),Yn=m(()=>!e.logoHidden&&u().width>350&&!N()),so=m(()=>ke.features.fullscreen&&Lt()&&!(v()&&$()===1)&&(Yt?it():!0)&&!n(Eo)&&!n(hn)),yr=m(()=>!L()&&!n(Eo)),jn=m(()=>(!E()||ie())&&u().width>260&&!n(Eo)&&!(ke.features.interactiveHideTime&&Yt)),Vn=m(()=>k()||e.showControls),_o=m(()=>!ie()&&!E()&&!!(ci!=null&&ci.length)&&n(Mn)&&!n(ho)&&!n(Eo)),Xn=m(()=>!K()||!!H()),Zn=m(()=>zt&&oo(T(),"m")),ns=m(()=>!z()||j()||ae()===0),vt=si({}),Zt=si({}),Jn=db(ql,260),Ur=db(Ju,260);Ne(()=>{u(),X(),Jn(yt(),Gt,vt,e.showControls),Ur(yt(),ro,Zt,e.showControls)});let Ko=()=>U.actions.internal.toggleChromecast();async function er(){qt!=null&&qt.isActive()?await(qt==null?void 0:qt.exit()):await(qt==null?void 0:qt.request())}function tr(){aa({isAudioDisabled:G,audioDisabledHintCallback:Vt,isAudioAvailable:z(),audioIsNotExistHintCallback:mt,isAds:ie()})&&He()}let bo=W(""),ir=(je,It)=>{if(!je){D(bo,Y("tooltip_live"),!0);return}It&&It===lb.PAUSED&&D(bo,Y("tooltip_play"),!0)};Ne(()=>{ir(n(Xn),l())});let or=de();Ne(()=>{ne()&&Nl(ne(),k(),Ht)}),Ne(()=>{Xu(Ue,J(),vt.playButton)});let Rn=je=>{if(Zt.bottom&&Se()&&dt&&je.target===Se()){let It=getComputedStyle(Se()),{transitionDuration:hi,transitionTimingFunction:ao}=It,Xi=sn(yt(),Zt,"bottom",e.showControls,!0);dt(Xi,{duration:hi,timingFunction:ao})}};var Po=Cw(),qo=ce(Po);{var xr=je=>{var It=yw(),hi=ce(It);let ao;var Xi=A(hi,2);let Zi;Ze(Xi,ut=>Zt.topLeft=ut,()=>Zt==null?void 0:Zt.topLeft);var lo=A(Xi,2);let Ji;var dn=C(lo);bi(dn,1,pe,({iconUrl:ut,ariaLabel:li,testId:me,onClick:ft,tooltip:Jt})=>ut,(ut,li)=>{let me=()=>n(li).iconUrl,ft=()=>n(li).ariaLabel,Jt=()=>n(li).testId,xi=()=>n(li).onClick,eo=()=>n(li).tooltip,Ei=m(()=>{var ri;return(ri=ft())!=null?ri:eo()});Om(ut,{get iconUrl(){return me()},get ariaLabel(){return n(Ei)},get testId(){return Jt()},get onClick(){return xi()}})});var Dn=A(dn,2);{var co=ut=>{lc(ut,{get ref(){return vt.autoplayNextToggle},set ref(li){vt.autoplayNextToggle=li}})};R(Dn,ut=>{e.showAutoplayNext&&!Oe()&&!re()&&ut(co)})}var Ro=A(Dn,2);{var _n=ut=>{tc(ut,{isMobile:!0,click:Ko,get state(){return p()},get ref(){return vt.chromecast},set ref(li){vt.chromecast=li}})};R(Ro,ut=>{n(Hr)&&ut(_n)})}var Ir=A(Ro,2);{var Ge=ut=>{Hm(ut,{click:er,get isPictureInPictureActive(){return v()},get ref(){return vt.pip},set ref(li){vt.pip=li}})};R(Ir,ut=>{n($r)&&ut(Ge)})}var Xt=A(Ir,2);{var Ti=ut=>{Fl(ut,{get ref$(){return or}})};R(Xt,ut=>{be()&&!$e()&&ut(Ti)})}var No=A(Xt,2);{var jo=ut=>{Jd(ut,{get click(){return ye},get targetUrl(){return De()},get logoClickable(){return e.logoClickable},get ref(){return vt.vkLogo},set ref(li){vt.vkLogo=li}})};R(No,ut=>{n(Yn)&&ut(jo)})}S(lo),Ze(lo,ut=>Zt.topRight=ut,()=>Zt==null?void 0:Zt.topRight);var On=A(lo,2);let $o;var dr=C(On);{var Bn=ut=>{let li=m(()=>Ie.bind(null,!0));Wa(ut,{get click(){return n(li)},type:"prev",isMobile:!0,get ref(){return vt.prevButton},set ref(me){vt.prevButton=me}})};R(dr,ut=>{n($s)&&ut(Bn)})}var Hs=A(dr,2);{var Us=ut=>{Gl(ut,{get disabled(){return n(Ai)},get click(){return tt},isMobile:!0,get isPlaying(){return n(Or)},get ref(){return vt.playButton},set ref(li){vt.playButton=li}})};R(Hs,ut=>{n(is)&&ut(Us)})}var xs=A(Hs,2);{var bn=ut=>{Ql(ut,{get disabled(){return n(Io)},get click(){return tt},isMobile:!0,get ref(){return vt.replayButton},set ref(li){vt.replayButton=li}})};R(xs,ut=>{n(bs)&&ut(bn)})}var zs=A(xs,2);{var ua=ut=>{let li=m(()=>Be.bind(null,!0));Wa(ut,{get click(){return n(li)},type:"next",isMobile:!0,get ref(){return vt.nextButton},set ref(me){vt.nextButton=me}})};R(zs,ut=>{n(Br)&&ut(ua)})}S(On),Ze(On,ut=>Zt.middle=ut,()=>Zt==null?void 0:Zt.middle);var cr=A(On,2);{var ss=ut=>{var li=$w(),me=ce(li);{var ft=ri=>{var _i=hw();let Vi;_i.__click=[vw,An,e,go];var Fn=C(_i);let Er=m(()=>!e.showControls);ac(Fn,{get hidden(){return n(Er)},get disabled(){return n(An)},get click(){return e.playPrevChapter},get ref(){return vt.playPrevChapterButton},set ref(yo){vt.playPrevChapterButton=yo}}),S(_i),O(yo=>Vi=se(_i,1,"wrapper-middle-left s-11",null,Vi,yo),[()=>({fullscreen:we(),hidden:!e.showControls})]),b(ri,_i)};R(me,ri=>{Pi&&ri(ft)})}var Jt=A(me,2);{var xi=ri=>{var _i=_w();let Vi;var Fn=C(_i);let Er=m(()=>!e.showControls&&!ee());cc(Fn,{get hidden(){return n(Er)},get disabled(){return n(To)},get click(){return Co.toggle},get graphIsOpened(){return ee()},get ref(){return vt.interactiveGraphButton},set ref(yo){vt.interactiveGraphButton=yo}}),S(_i),O(yo=>Vi=se(_i,1,Td(Pi?"wrapper-middle-left-second":"wrapper-middle-left"),"s-11",Vi,yo),[()=>({fullscreen:we(),hidden:!e.showControls&&!ee()})]),b(ri,_i)};R(Jt,ri=>{n(Zn)&&ri(xi)})}var eo=A(Jt,2);{var Ei=ri=>{var _i=bw();let Vi;_i.__click=[gw,Wo,e,zo];var Fn=C(_i);let Er=m(()=>!e.showControls);dc(Fn,{get hidden(){return n(Er)},get disabled(){return n(Wo)},get click(){return e.seekToInteractive},get ref(){return vt.seekToInteractiveButton},set ref(yo){vt.seekToInteractiveButton=yo}}),S(_i),O(yo=>Vi=se(_i,1,"wrapper-middle-right s-11",null,Vi,yo),[()=>({fullscreen:we(),hidden:!e.showControls})]),b(ri,_i)};R(eo,ri=>{st&&ri(Ei)})}b(ut,li)};R(cr,ut=>{Yt&&!f()&&ut(ss)})}O((ut,li,me,ft)=>{ao=se(hi,1,"overlay-mobile s-11",null,ao,ut),Zi=se(Xi,1,"wrapper-top-left s-11",null,Zi,li),Ji=se(lo,1,"wrapper-top-right s-11",null,Ji,me),$o=se(On,1,"wrapper-middle s-11",null,$o,ft)},[()=>({hidden:!n(Vn)}),()=>({hidden:!e.showControls,fullscreen:we()}),()=>({hidden:!e.showControls&&!y(),fullscreen:we()}),()=>({hidden:!e.showControls||f()||e.endScreenShown&&e.showNextPrevButtons})]),b(je,It)};R(qo,je=>{ie()||je(xr)})}var Ii=A(qo,2);{var nr=je=>{var It=ww(),hi=ce(It);let ao;var Xi=C(hi);ep(Xi,{get muted(){return j()},click:tr,get ref(){return vt.volume},set ref(co){vt.volume=co}}),S(hi);var Zi=A(hi,2);{var lo=co=>{var Ro=xw(),_n=C(Ro);let Ir=m(()=>!n(Ln));Gl(_n,{get disabled(){return n(Ai)},get click(){return tt},isMobile:!0,get isPlaying(){return n(Ir)},get ref(){return vt.playButton},set ref(Ge){vt.playButton=Ge}}),S(Ro),b(co,Ro)};R(Zi,co=>{n(Ln)&&co(lo)})}var Ji=A(Zi,2);let dn;var Dn=C(Ji);pc(Dn,{get position(){return Re()},get duration(){return fe()}}),S(Ji),O((co,Ro)=>{ao=se(hi,1,"wrapper-top-right s-11",null,ao,co),dn=se(Ji,1,"wrapper-bottom ads-timeline-mobile s-11",null,dn,Ro)},[()=>({fullscreen:we()}),()=>({fullscreen:we()})]),b(je,It)};R(Ii,je=>{ie()&&d()!=="inactive"&&je(nr)})}var Qo=A(Ii,2);let rr;var wr=C(Qo);let Sr;var Ao=C(wr),gt=C(Ao),ni=C(gt);{var jt=je=>{Fo(je,{get disabled(){return n(Io)},get ref(){return vt.replayButton},set ref(It){vt.replayButton=It},children:(It,hi)=>{Ql(It,{get disabled(){return n(Io)},get click(){return yi}})},$$slots:{default:!0}})};R(ni,je=>{Yt&&je(jt)})}var Ci=A(ni,2);{var an=je=>{Fo(je,{get ref(){return vt.liveButton},set ref(It){vt.liveButton=It},children:(It,hi)=>{uc(It,{get isLiveActive(){return n(Xn)},isMobile:!0,get ariaLabel(){return n(bo)}})},$$slots:{default:!0}})};R(Ci,je=>{!ie()&&E()&&je(an)})}var Li=A(Ci,2);{var ji=je=>{let It=m(()=>ie()?Re():P()),hi=m(()=>ie()?fe():We()),ao=m(()=>!e.showControls);jd(je,{get showDuration(){return n(Fr)},get position(){return n(It)},get duration(){return n(hi)},isMobile:!0,get isHidden(){return n(ao)},get ref(){return vt.time},set ref(Xi){vt.time=Xi}})};R(Li,je=>{n(jn)&&je(ji)})}var Lo=A(Li,2);let sr=m(()=>!n(_o));Fo(Lo,{className:"w-max",get disabled(){return n(sr)},get ref(){return vt.episodes},set ref(je){vt.episodes=je},children:(je,It)=>{var hi=Ae(),ao=ce(hi);{var Xi=Zi=>{var lo=Sw(),Ji=A(ce(lo),2);ic(Ji,{get position(){return P()},get duration(){return We()},get timeCodes(){return ci}}),b(Zi,lo)};R(ao,Zi=>{n(_o)&&Zi(Xi)})}b(je,hi)},$$slots:{default:!0}}),S(gt),Ze(gt,je=>Zt.bottomLeft=je,()=>Zt==null?void 0:Zt.bottomLeft);var ar=A(gt,2),Mi=C(ar);{var ys=je=>{Fo(je,{get ref(){return vt.volume},set ref(It){vt.volume=It},children:(It,hi)=>{ep(It,{get muted(){return n(ns)},click:tr})},$$slots:{default:!0}})};R(Mi,je=>{n(yr)&&je(ys)})}var zr=A(Mi,2);{var rs=je=>{Fo(je,{get ref(){return vt.settings},set ref(It){vt.settings=It},children:(It,hi)=>{Fl(It,{get ref$(){return or}})},$$slots:{default:!0}})};R(zr,je=>{n(os)&&je(rs)})}var Cr=A(zr,2);{var ln=je=>{Fo(je,{get ref(){return vt.fullscreen},set ref(It){vt.fullscreen=It},children:(It,hi)=>{Zd(It,{get click(){return e.toggleFullscreen},get isFullscreen(){return we()}})},$$slots:{default:!0}})};R(Cr,je=>{n(so)&&je(ln)})}S(ar),Ze(ar,je=>Zt.bottomRight=je,()=>Zt==null?void 0:Zt.bottomRight),S(Ao),Ze(Ao,je=>Z(je),()=>Z());var lr=A(Ao,2);let Mo=m(()=>!e.showControls);qa(lr,{get isHidden(){return n(Mo)},get isAds(){return ie()},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return K()},get ref(){return vt.timeline},set ref(je){vt.timeline=je}}),S(wr),Ze(wr,je=>Zt.bottom=je,()=>Zt==null?void 0:Zt.bottom),S(Qo),Ze(Qo,je=>Se(je),()=>Se());var Go=A(Qo,2);{var Tr=je=>{rc(je,{get ref(){return vt.interactiveTimeIndicator},set ref(It){vt.interactiveTimeIndicator=It}})};R(Go,je=>{Fi&&je(Tr)})}O((je,It)=>{rr=se(Qo,1,"wrapper-bottom mobile s-11",null,rr,je),Sr=se(wr,1,"controls-wrapper s-11",null,Sr,It)},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth}),()=>({fullscreen:we()})]),nt("transitionstart",Qo,Rn),b(t,Po),F(),o()}Ye(["click"]);function fc(t,e){B(e,!0);let[i,o]=Ve(),r=()=>w(I,"$isMobile",i),a=g(e,"bottomNoSmooth",3,!1),l=g(e,"playerControlsWrapperRef",15,void 0),d=g(e,"playerControlsRef",15,void 0),s=g(e,"isAds",3,!1),u=g(e,"logoTargetUrl",3,""),f=g(e,"showAutoplayNext",3,!1),p=g(e,"isOneVideoPlaylist",3,!1),v=g(e,"customFullscreenSupported",3,!0),$=g(e,"endScreenShown",3,!1),y=g(e,"onDisabledPlayPrevChapterClick",3,cb),h=g(e,"onDisabledSeekToInteractiveClick",3,cb),I=ge().ui.isMobile,T=W(!1);Et(()=>{let k=setTimeout(()=>D(T,!0),0);return()=>clearTimeout(k)});var N=Ae(),L=ce(N);{var E=k=>{var K=Ae(),H=ce(K);{var z=ae=>{Um(ae,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return s()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return u()},get showAutoplayNext(){return f()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get isOneVideoPlaylist(){return p()},get customFullscreenSupported(){return v()},get endScreenShown(){return $()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get onDisabledPlayPrevChapterClick(){return y()},get onDisabledSeekToInteractiveClick(){return h()},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(X){l(X)},get playerControlsRef(){return d()},set playerControlsRef(X){d(X)}})},j=ae=>{Dm(ae,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return s()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return u()},get isOneVideoPlaylist(){return p()},get showAutoplayNext(){return f()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get customFullscreenSupported(){return v()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(X){l(X)},get playerControlsRef(){return d()},set playerControlsRef(X){d(X)}})};R(H,ae=>{r()?ae(z):ae(j,!1)})}b(k,K)};R(L,k=>{n(T)&&k(E)})}b(t,N),F(),o()}var Iw=Te('<path d="M23.75 31.2v-5.45l-11.84 6.7a1.45 1.45 180 01-2.16-1.25v-14.4a1.45 1.45 180 012.16-1.26l11.84 6.7v-5.44a1.45 1.45 180 012.16-1.26l12.7 7.19a1.45 1.45 180 010 2.52l-12.7 7.2a1.45 1.45 180 01-2.16-1.27Z"></path>');function mc(t,e){B(e,!0);let i=m(()=>e.reversed?"transform:scaleX(-1);transform-origin:50% 0;":""),o=m(()=>`${fn(e.size)}${n(i)}`);Je(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(o)},get testId(){return e.testId},get shadow(){return e.shadow},children:(r,a)=>{var l=Iw();b(r,l)},$$slots:{default:!0}}),F()}var Ew=Te('<path d="M32.46 9.53a1.16 1.16 90 010 1.96l-7.66 4.83c-.78.49-1.8-.07-1.8-.98v-3.3a14 14 90 1014.1 18.93 1.5 1.5 90 012.8 1.06 17 17 90 11-16.9-23V5.66c0-.91 1.03-1.47 1.8-.98z"></path>');function zm(t,e){B(e,!0);let i=g(e,"reversed",3,!1),o=m(()=>i()?"transform:scaleX(-1);transform-origin: 50% 0;":void 0),r=m(()=>`seek-icon-${i()?"backward":"forward"}`);Je(t,{get width(){return"48"},get height(){return"48"},get style(){return n(o)},get testId(){return n(r)},get shadow(){return e.shadow},children:(a,l)=>{var d=Ew();b(a,d)},$$slots:{default:!0}}),F()}var kw=M('<span class="hot-key-helpers-text s-17"> </span>'),Pw=M('<div data-testid="hotkey-helper-icon" class="s-17"><!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <!>',1),Aw=M("<div><!></div>"),Lw={hash:"s-17",code:'.hot-key-helpers-container.s-17{align-items:center;animation:s-17-fadeIn ease var(--controls-transition-duration);box-sizing:border-box;display:flex;flex-direction:column;height:120px;left:calc(50% - 100px);padding-top:14px;position:absolute;top:calc(50% - 40px);width:200px;z-index:var(--hot-key-helpers-container-z-index)}.hot-key-helpers-container--left.s-17{left:calc(25% - 100px)}.hot-key-helpers-container--right.s-17{left:calc(75% - 100px)}.hot-key-helpers-text.s-17{display:-webkit-box;font-feature-settings:"clig" off,"liga" off;font-size:15px;font-style:normal;font-weight:600;letter-spacing:-.105px;-webkit-line-clamp:2;line-height:20px;margin-top:4px;max-height:40px;overflow:hidden;text-align:center;text-overflow:ellipsis;text-shadow:0 0 5px rgba(0,0,0,.16);white-space:pre-wrap;width:100%;-webkit-box-orient:vertical}.hidden.s-17{animation:s-17-fadeOut ease var(--controls-transition-duration);height:0;visibility:hidden;width:0}@keyframes s-17-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes s-17-fadeOut{0%{opacity:1}to{opacity:0}}'};function Wm(t,e){B(e,!0),Q(t,Lw);let[i,o]=Ve(),r=()=>w(e.data,"$data",i),a=ge(),{features:l}=kt(),d=a.ui.t,s=m(()=>!r()),u=m(()=>{var I;return((I=r())==null?void 0:I.type)==="BACKWARD_SEEK"}),f=m(()=>{var I;return((I=r())==null?void 0:I.type)==="FORWARD_SEEK"}),p=m(()=>{var I;return(I=r())==null?void 0:I.type}),v=m(()=>{var I,T;return(I=r())!=null&&I.t?d(r().t.key,{value:r().t.value||""}):(T=r())==null?void 0:T.text});var $=Aw();let y;var h=C($);{var x=I=>{var T=Pw(),N=ce(T),L=C(N);{var E=Z=>{let ie=m(()=>n(p)==="BACKWARD_SEEK");zm(Z,{get reversed(){return n(ie)},shadow:!0})};R(L,Z=>{["BACKWARD_SEEK","FORWARD_SEEK"].includes(n(p))&&Z(E)})}var k=A(L,2);{var K=Z=>{Bs(Z,{get size(){return"48"},shadow:!0})};R(k,Z=>{n(p)==="PAUSE"&&!l.playbackStatusShow&&Z(K)})}var H=A(k,2);{var z=Z=>{kn(Z,{get size(){return"48"},shadow:!0})};R(H,Z=>{n(p)==="PLAY"&&!l.playbackStatusShow&&Z(z)})}var j=A(H,2);{var ae=Z=>{sc(Z,{get size(){return"48"},shadow:!0})};R(j,Z=>{n(p)==="REPLAY"&&!l.playbackStatusShow&&Z(ae)})}var X=A(j,2);{var ne=Z=>{la(Z,{get size(){return"48"},type:"off",shadow:!0})};R(X,Z=>{n(p)==="SUBTITLES_OFF"&&Z(ne)})}var J=A(X,2);{var we=Z=>{la(Z,{get size(){return"48"},shadow:!0})};R(J,Z=>{n(p)==="SUBTITLES_ON"&&Z(we)})}var pe=A(J,2);{var re=Z=>{let ie=m(()=>n(p)==="RATE_DOWN");mc(Z,{get size(){return"48"},get reversed(){return n(ie)},testId:"rate-change-icon",shadow:!0})};R(pe,Z=>{["RATE_DOWN","RATE_UP"].includes(n(p))&&Z(re)})}var be=A(pe,2);{var $e=Z=>{let ie=m(()=>n(p)==="EPISODE_PREV");ca(Z,{get size(){return"48"},get reversed(){return n(ie)},shadow:!0})};R(be,Z=>{["EPISODE_PREV","EPISODE_NEXT"].includes(n(p))&&Z($e)})}var ee=A(be,2);{var Re=Z=>{da(Z,{get size(){return"48"},volume:0,shadow:!0})};R(ee,Z=>{n(p)==="MUTE"&&Z(Re)})}var fe=A(ee,2);{var P=Z=>{da(Z,{get size(){return"48"},volume:1,shadow:!0})};R(fe,Z=>{n(p)==="VOLUME"&&Z(P)})}S(N);var We=A(N,2);{var Se=Z=>{var ie=kw(),De=C(ie,!0);S(ie),O(()=>ve(De,n(v))),b(Z,ie)};R(We,Z=>{n(v)&&Z(Se)})}O(()=>Le(N,"data-type",n(p))),b(I,T)};R(h,I=>{!n(s)&&n(p)&&I(x)})}S($),O(I=>y=se($,1,"hot-key-helpers-container s-17",null,y,I),[()=>({hidden:n(s),"hot-key-helpers-container--left":n(u),"hot-key-helpers-container--right":n(f)})]),b(t,$),F(),o()}var Mw=(t,e,i,o,r,a)=>{if(e.has(t.code))switch(t.preventDefault(),t.stopPropagation(),t.code){case"ArrowUp":i();break;case"ArrowDown":o();break;case"ArrowLeft":r();break;case"ArrowRight":a();break}},Vw=(t,e,i)=>{e.has(t.code)&&(t.preventDefault(),t.stopPropagation(),i())},Rw=M('<div tabindex="0" role="button"><div class="button-block s-i" aria-hidden="true"><div class="button-row s-i"><div class="button button-up s-i"><!></div> <div class="button button-right s-i"><!></div></div> <div class="button-row s-i"><div class="button button-left s-i"><!></div> <div class="button button-down s-i"><!></div></div></div></div>'),Nw={hash:"s-i",code:".immersive-controls.s-i{background-color:rgba(0,0,0,.56);border-radius:8px;display:flex;flex-direction:row;height:56px;left:10px;position:absolute;top:10px;transition-duration:var(--controls-transition-duration);transition-property:top,left;transition-timing-function:var(--controls-transition-fn);width:56px}.immersive-controls.m-shifted.s-i{left:20px;top:50px}.button-block.s-i{height:40px;margin:auto;transform:rotate(45deg);width:40px}.button-row.s-i{display:flex;flex-direction:row;position:relative}.button.s-i{cursor:pointer;height:20px;text-align:center;width:20px}.button.s-i svg{opacity:.7;transition:opacity .2s linear}.button.button-up.s-i svg{transform:rotate(-45deg) translate(-1px,-1px)}.button.button-right.s-i svg{transform:rotate(45deg) translate(1px,-1px)}.button.button-down.s-i svg{transform:rotate(135deg) translate(1px,-3px)}.button.button-left.s-i svg{transform:rotate(-135deg) translate(-1px,-3px)}.button.s-i:hover svg{opacity:1}"};function vc(t,e){B(e,!0),Q(t,Nw);let i=g(e,"isShifted",3,!1),o=ge(),r=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]),a=()=>{o.actions.internal.startCameraManualRotation(0,1)},l=()=>{o.actions.internal.startCameraManualRotation(0,-1)},d=()=>{o.actions.internal.startCameraManualRotation(1,0)},s=()=>{o.actions.internal.startCameraManualRotation(-1,0)},u=()=>(o.actions.internal.stopCameraManualRotation(),null),f=Y("aria_label_spherical_control");var p=Rw();let v;p.__keydown=[Mw,r,a,l,s,d],p.__keyup=[Vw,r,u];var $=C(p),y=C($),h=C(y);h.__mousedown=a,h.__mouseup=u;var x=C(h);Nr(x,{direction:"up",useBtnColor:!0}),S(h);var I=A(h,2);I.__mousedown=d,I.__mouseup=u;var T=C(I);Nr(T,{direction:"up",useBtnColor:!0}),S(I),S(y);var N=A(y,2),L=C(N);L.__mousedown=s,L.__mouseup=u;var E=C(L);Nr(E,{direction:"up",useBtnColor:!0}),S(L);var k=A(L,2);k.__mousedown=l,k.__mouseup=u;var K=C(k);Nr(K,{direction:"up",useBtnColor:!0}),S(k),S(N),S($),S(p),O(H=>{v=se(p,1,"immersive-controls s-i",null,v,H),Le(p,"aria-label",f)},[()=>({"m-shifted":i()})]),nt("mouseleave",h,u),nt("mouseleave",I,u),nt("mouseleave",L,u),nt("mouseleave",k,u),b(t,p),F()}Ye(["keydown","keyup","mousedown","mouseup"]);import{ValueSubject as pb,Subscription as Dw,filterChanged as Ow,filter as Bw}from"@vkontakte/videoplayer-shared/es2018";var ub=(t=1e3)=>{let e=null,i=()=>{e&&(clearTimeout(e),e=null)};return{add:o=>{i(),e=setTimeout(o,t)},clear:i}};var tp=class{constructor(){this.flickeringTimeout=ub(1e3);this.subscriptions=new Dw;this.isAuto=!1;this.isLive=!1;this.captions$=new pb([]);this.captionsPrepared$=new pb([])}subscribe(){return this.subscriptions.add(this.captions$.pipe(Bw(()=>this.isEnabled()),Ow()).subscribe(e=>{this.processCaptions(e)})),this}setIsAuto(e){this.isAuto=e}setIsLive(e){this.isLive=e}setCaptions(e){this.captions$.next(e)}destroy(){this.subscriptions.unsubscribe(),this.flickeringTimeout.clear()}isEnabled(){return this.isAuto&&!this.isLive}processCaptions(e){if(!e.length){this.flickeringTimeout.add(()=>{this.captionsPrepared$.next([])});return}this.flickeringTimeout.clear();let i=[],o=e.length>1&&e[0].type!=="timestamp"&&e[1].type!=="timestamp";o&&i.push([{value:String(e[0].value),timeAppeared:null}]),i.push(e.reduce((r,{type:a,value:l},d)=>(o&&!d||(a==="timestamp"?r.push({timeAppeared:Number(l),value:""}):r.length===0?r.push({value:String(l)}):r[r.length-1].value=String(l)),r),[])),this.captionsPrepared$.next(i)}};var Fw=M('<span class="caption-line s-b"><span class="caption-segment s-b"> </span></span>'),Hw=M('<span class="caption-line s-b"><span class="caption-segment s-b"></span></span>'),Uw=M('<span class="caption-line s-b"><span class="caption-segment s-b"> </span></span>'),zw=M('<div><span class="caption s-b"><!></span></div>'),Ww=M("<div><!></div>"),Kw={hash:"s-b",code:".subtitles-container.s-b{height:100%;left:0;pointer-events:none;position:absolute;top:0;transition:transform var(--controls-transition-duration);width:100%}.subtitles-container.shifted.s-b{transform:translateY(calc(var(--controls-height)*-1))}.subtitles-container.preview-track-active.s-b{transform:translateY(calc(var(--preview-track-height)*-1))}.preview-track-active.s-b .subtitles-caption:where(.s-b){bottom:var(--preview-track-controls-top-offset)}.subtitles-caption.s-b{bottom:4%;display:flex;justify-content:center;left:4%;position:absolute;right:4%}.subtitles-caption.mobile.s-b{bottom:8%}.subtitles-container.auto.s-b .subtitles-caption:where(.s-b){left:var(--subtitles-caption-margin);right:var(--subtitles-caption-margin)}.caption.s-b{background:rgba(0,0,0,.4);border-radius:4px;display:block;overflow-wrap:normal;padding:4px 8px}.subtitles-container.auto.s-b .caption:where(.s-b){width:100%}.caption-line.s-b{display:block;text-align:center}.subtitles-container.auto.s-b .caption-line:where(.s-b){text-align:left}.caption-segment.s-b{color:var(--white);display:inline-block;font-size:13px;line-height:1.2;white-space:pre-wrap}"};function Ga(t,e){B(e,!0),Q(t,Kw);let[i,o]=Ve(),r=()=>w(v,"$currentSubtitle$",i),a=()=>w(y,"$isLive$",i),l=()=>w(h,"$isFullscreen",i),d=()=>w(x,"$previewTrackActive",i),s=()=>w($,"$isAutoSubtitleCaptionVisible$",i),u=g(e,"isMobile",3,!1),f=ge(),p=kt(),v=f.state.currentSubtitle$,$=f.state.isAutoSubtitleCaptionVisible$,y=f.state.isLive$,h=f.ui.isFullscreen,x=f.ui.previewTrackActive,I=m(()=>!!r().isAuto),T=m(()=>!!a()),N=m(()=>e.playerSize.width*.02),L=m(()=>u()&&!l()||n(N)<=p.minSubtitlesFontSize?p.minSubtitlesFontSize:n(N)),E=W(null);Ne(()=>{var X,ne,J;(X=n(E))==null||X.setIsAuto(n(I)),(ne=n(E))==null||ne.setIsLive(n(T)),(J=n(E))==null||J.setCaptions(e.captions)});let k=W(si([[]]));Et(()=>{D(E,new tp().subscribe(),!0);let X=n(E).captionsPrepared$.subscribe(ne=>{D(k,ne,!0)});return()=>{var ne;(ne=n(E))==null||ne.destroy(),X.unsubscribe()}}),Et(()=>{if(n(I)){let X=window.setTimeout(()=>{$.set(!1)},p.autoSubtitlesTimeout);return()=>{window.clearTimeout(X)}}else $.set(!1)});let K=m(()=>e.playerSize.width<400?10:e.playerSize.width<550?14:24);var H=Ww();let z;var j=C(H);{var ae=X=>{var ne=zw();let J;var we=C(ne),pe=C(we);{var re=$e=>{var ee=Fw(),Re=C(ee),fe=C(Re,!0);S(Re),S(ee),O(P=>{var We;qe(Re,`font-size: ${(We=n(L))!=null?We:""}px`),ve(fe,P)},[()=>Y("subtitles_auto_caption")]),b($e,ee)},be=($e,ee)=>{{var Re=P=>{var We=Ae(),Se=ce(We);bi(Se,17,()=>n(k),Sd,(Z,ie)=>{var De=Hw(),Oe=C(De);bi(Oe,21,()=>n(ie),({value:it,timeAppeared:U})=>U,(it,U)=>{let Pe=()=>n(U).value,ke=()=>n(U).timeAppeared;var He=Ae(),tt=ce(He);{var ye=Ie=>{var Be=ps();O(()=>ve(Be,Pe())),b(Ie,Be)};R(tt,Ie=>{(!ke()||ke()<=e.position)&&Ie(ye)})}b(it,He)}),S(Oe),S(De),O(()=>{var it;return qe(Oe,`font-size: ${(it=n(L))!=null?it:""}px`)}),b(Z,De)}),b(P,We)},fe=P=>{var We=Ae(),Se=ce(We);bi(Se,17,()=>e.captions,({value:Z})=>Z,(Z,ie)=>{let De=()=>n(ie).value;var Oe=Uw(),it=C(Oe),U=C(it,!0);S(it),S(Oe),O(()=>{var Pe;qe(it,`font-size: ${(Pe=n(L))!=null?Pe:""}px`),ve(U,De())}),b(Z,Oe)}),b(P,We)};R($e,P=>{var We;n(I)&&((We=n(k))!=null&&We.length)?P(Re):P(fe,!1)},ee)}};R(pe,$e=>{n(I)&&s()?$e(re):$e(be,!1)})}S(we),S(ne),O($e=>{var ee;J=se(ne,1,"subtitles-caption s-b",null,J,$e),qe(ne,`--subtitles-caption-margin: ${(ee=n(K))!=null?ee:""}%`)},[()=>({mobile:u()})]),b(X,ne)};R(j,X=>{var ne;(e.captions.length||(ne=n(k))!=null&&ne.length)&&X(ae)})}S(H),O(X=>z=se(H,1,"subtitles-container s-b",null,z,X),[()=>({shifted:e.shifted,"preview-track-active":d(),auto:n(I)&&!n(T)&&!s()})]),b(t,H),F(),o()}import{ChromecastState as qw}from"@vkontakte/videoplayer-core/es2018";var Qw=M('<div class="text s-p"> </div>'),Gw=M('<div><div class="icon_wrapper s-p"><!></div> <!></div>'),Yw={hash:"s-p",code:".wrapper.s-p{align-items:center;background-position:50%;background-repeat:no-repeat;background-size:contain;display:flex;flex-direction:column;font-size:16px;height:100%;justify-content:center}.wrapper.bgCover.s-p{background-size:cover}.icon_wrapper.s-p{align-items:center;display:flex;flex-direction:column;width:400px}.text.s-p{margin-top:20px}"};function gc(t,e){B(e,!0),Q(t,Yw);let i=g(e,"chromecastDeviceName",3,"chromecastDeviceName"),o=kt();var r=Gw();let a;r.__contextmenu=function(...f){var p;(p=e.onContextMenu)==null||p.apply(this,f)},r.__click=function(...f){var p;(p=e.onClick)==null||p.apply(this,f)},r.__dblclick=function(...f){var p;(p=e.onDblClick)==null||p.apply(this,f)};var l=C(r),d=C(l);ec(d,{get size(){return"48"},get iconState(){return qw.CONNECTED}}),S(l);var s=A(l,2);{var u=f=>{var p=Qw(),v=C(p);S(p),O(()=>{var $;return ve(v,`Видео воспроизводится на ${($=i())!=null?$:""}`)}),b(f,p)};R(s,f=>{i()&&f(u)})}S(r),O(f=>{a=se(r,1,"wrapper s-p",null,a,f),qe(r,`background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('${e.thumbUrl||""}')`)},[()=>({bgCover:o.features.previewNoEmptySpace})]),b(t,r),F()}Ye(["contextmenu","click","dblclick"]);var jw=Te('<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 Km(t){Je(t,{width:"200",height:"200",viewBox:"460 190 130 90",testId:"error-icon",children:(e,i)=>{var o=jw();b(e,o)},$$slots:{default:!0}})}var Xw=M('<div class="container s-4"><!></div>'),Zw={hash:"s-4",code:".container.s-4{align-items:center;background:#000;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}"};function Ya(t){Q(t,Zw);var e=Xw(),i=C(e);Km(i,{}),S(e),b(t,e)}var Jw=M('<div class="playButton s-e" tabindex="0" role="button"><div class="playButtonBackground s-e"></div> <!></div>'),eS=M('<div data-testid="unstarted-thumb"><!></div>'),tS={hash:"s-e",code:".container.s-e{background-position:50%;background-repeat:no-repeat;background-size:contain;bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:opacity .2s,visibility .2s;will-change:opacity}.container.hidden.s-e{opacity:0;visibility:hidden}.container.bgCover.s-e{background-size:cover}.playButton.s-e{align-items:center;display:flex;height:var(--big-play-size);justify-content:center;margin:auto;width:var(--big-play-size)}.playButton.s-e,.playButtonBackground.s-e{bottom:0;left:0;position:absolute;right:0;top:0}.playButtonBackground.s-e{background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);transition:background .2s,transform .2s;transition-timing-function:ease-out;will-change:background,transform}.container.s-e:hover .playButtonBackground:where(.s-e){background-color:var(--big-play-hover-bg-color);transform:scale(1.15)}.playButton.s-e svg{position:relative}"};function ja(t,e){B(e,!0),Q(t,tS);let i=g(e,"iconVisible",3,!0),o=ge(),r=kt(),a=o.ui.startedByKeyboard$,l=Y("tooltip_play"),d=$=>{var h;let y=$.code;["Enter","Space"].includes(y)&&($.stopPropagation(),$.preventDefault(),a.set(!0),(h=e.startVideo)==null||h.call(e))},s=$=>{var y,h;$.stopPropagation(),(y=e.startVideo)==null||y.call(e),(h=e.onClick)==null||h.call(e,$)};var u=eS();let f;u.__click=s,u.__contextmenu=function(...$){var y;(y=e.onContextMenu)==null||y.apply(this,$)};var p=C(u);{var v=$=>{var y=Jw();y.__keydown=d;var h=A(C(y),2);kn(h,{get size(){return"48"}}),S(y),O(()=>Le(y,"aria-label",l)),b($,y)};R(p,$=>{i()&&$(v)})}return S(u),O($=>{f=se(u,1,"container s-e",null,f,$),qe(u,`background-color: #222; background-image: url('${e.thumbUrl||""}')`)},[()=>({hidden:e.hidden,bgCover:r.features.previewNoEmptySpace})]),b(t,u),F({handlePressKey:d,handleClick:s})}Ye(["click","contextmenu","keydown"]);var iS=M('<span class="text s-16"> </span>'),oS=(t,e)=>{var i;return(i=e.onTitleClicked)==null?void 0:i.call(e)},nS=M('<a target="_blank" class="link s-16"><!></a>'),rS=M('<div data-testid="video_title"><!></div>'),sS={hash:"s-16",code:".title.s-16{background:linear-gradient(0deg,transparent,rgba(0,0,0,.02) 19%,rgba(0,0,0,.1) 34%,rgba(0,0,0,.4) 60%,rgba(0,0,0,.6));box-sizing:border-box;font-size:15px;height:var(--controls-gradient-height);left:0;overflow:hidden;padding:18px 20px 10px;pointer-events:none;position:absolute;text-overflow:ellipsis;top:0;transition-duration:var(--controls-transition-duration);transition-property:visibility,transform,opacity;transition-timing-function:var(--controls-transition-fn);white-space:nowrap;width:100%;will-change:transform,opacity;z-index:var(--controls-container-z-index)}.link.s-16,.title.s-16{color:var(--white)}.link.s-16{pointer-events:auto;text-decoration:none}.link.s-16:hover{text-decoration:underline}.text.s-16{pointer-events:auto}.size-sm.s-16{font-size:14px;font-weight:500;line-height:18px}.hidden.s-16{opacity:0;transform:translateY(calc(var(--controls-gradient-height)*-1));visibility:hidden}"};function qm(t,e){var y;B(e,!0),Q(t,sS);let i=h=>{var x=iS(),I=C(x,!0);S(x),Ze(x,T=>l(T),()=>l()),O(()=>ve(I,o())),nt("mouseenter",x,function(...T){var N;(N=e.onMouseEnter)==null||N.apply(this,T)}),nt("mouseleave",x,function(...T){var N;(N=e.onMouseLeave)==null||N.apply(this,T)}),b(h,x)},o=g(e,"title",3,""),r=g(e,"isHidden",3,!1),a=g(e,"size",3,"md"),l=g(e,"ref",15),d=W(void 0);Et(()=>{var x;requestAnimationFrame(()=>{var I;(I=e.onVisibilityChanged)==null||I.call(e,!0)});function h(I){var T;I.propertyName==="transform"&&((T=e.onVisibilityChanged)==null||T.call(e,!r()))}return(x=n(d))==null||x.addEventListener("transitionend",h),()=>{var I;return(I=n(d))==null?void 0:I.removeEventListener("transitionend",h)}});let s=(y=e.getVideoDeeplink)==null?void 0:y.call(e);var u=rS();let f;var p=C(u);{var v=h=>{var x=nS();x.__click=[oS,e];var I=C(x);i(I),S(x),O(()=>Le(x,"href",s||"")),b(h,x)},$=h=>{i(h)};R(p,h=>{s||e.onTitleClicked?h(v):h($,!1)})}S(u),Ze(u,h=>D(d,h),()=>n(d)),O(h=>f=se(u,1,`title size-${a()}`,"s-16",f,h),[()=>({hidden:r()})]),b(t,u),F()}Ye(["click"]);import{throttleFn as fS}from"@vkontakte/videoplayer-shared/es2018";var aS=M('<div class="timer__cell cell s-z"><span class="cell__value s-z"> </span> <span class="cell__unit s-z"> </span></div> <span class="timer__points s-z"> </span>',1),lS=M('<div class="timer__cell cell s-z"><span class="cell__value s-z"> </span> <span class="cell__unit s-z"> </span></div> <span class="timer__points s-z"> </span>',1),dS=M('<div class="timer__cell cell s-z"><span class="cell__value s-z"> </span> <span class="cell__unit s-z"> </span></div> <span class="timer__points s-z"> </span>',1),cS=M('<div class="timer__cell cell s-z"><span class="cell__value s-z"> </span> <span class="cell__unit s-z"> </span></div>'),uS=M("<div><!> <!> <!> <!></div>"),pS={hash:"s-z",code:".timer__container.s-z{align-items:flex-start;display:flex;justify-content:center}.cell.s-z{align-items:center;display:flex;flex-direction:column}.cell__value.s-z{font-size:48px;font-weight:600;line-height:1.2}.small.s-z .cell__value:where(.s-z){font-size:24px}.cell__unit.s-z{font-size:14px;font-weight:400;line-height:1.2}.small.s-z .cell__unit:where(.s-z){font-size:12px}.timer__points.s-z{display:inline-block;font-size:42px;font-weight:600;line-height:1.2;margin:0 8px}.small.s-z .timer__points:where(.s-z){font-size:20px}"};function Qm(t,e){B(e,!0),Q(t,pS);let i=W(""),o=W(""),r=W(""),a=W(""),l,d=32,s=d/2,u=H=>String(H).padStart(2,"0"),f=H=>Math.max(H.length,1),p=H=>`${(e.isSmallSize?s:d)*f(H)}px`,v=H=>{let z=Math.floor(H/86400);z&&(H-=z*86400,D(i,u(z),!0));let j=Math.floor(H/3600);D(o,u(j),!0);let ae=Math.floor(H/60)%60;D(r,u(ae),!0);let X=H%60;D(a,u(X),!0)},$=()=>{let H=Math.floor(Date.now()/1e3),z=e.startTime-H;v(z),z>=1?l=requestAnimationFrame($):e.onTimerOver()};Et(()=>{l=requestAnimationFrame($)}),pn(()=>{cancelAnimationFrame(l)});var y=uS();let h;var x=C(y);{var I=H=>{var z=aS(),j=ce(z);let ae;var X=C(j),ne=C(X,!0);S(X);var J=A(X,2),we=C(J,!0);S(J),S(j);var pe=A(j,2),re=C(pe,!0);S(pe),O((be,$e,ee)=>{ae=qe(j,"",ae,{width:be}),ve(ne,n(i)),ve(we,$e),ve(re,ee)},[()=>p(n(i)),()=>Y("waiting_live_day_value"),()=>Y("waiting_live_colon")]),b(H,z)};R(x,H=>{n(i)&&H(I)})}var T=A(x,2);{var N=H=>{var z=lS(),j=ce(z);let ae;var X=C(j),ne=C(X,!0);S(X);var J=A(X,2),we=C(J,!0);S(J),S(j);var pe=A(j,2),re=C(pe,!0);S(pe),O((be,$e,ee)=>{ae=qe(j,"",ae,{width:be}),ve(ne,n(o)),ve(we,$e),ve(re,ee)},[()=>p(n(o)),()=>Y("waiting_live_hour_value"),()=>Y("waiting_live_colon")]),b(H,z)};R(T,H=>{n(o)&&H(N)})}var L=A(T,2);{var E=H=>{var z=dS(),j=ce(z);let ae;var X=C(j),ne=C(X,!0);S(X);var J=A(X,2),we=C(J,!0);S(J),S(j);var pe=A(j,2),re=C(pe,!0);S(pe),O((be,$e,ee)=>{ae=qe(j,"",ae,{width:be}),ve(ne,n(r)),ve(we,$e),ve(re,ee)},[()=>p(n(r)),()=>Y("waiting_live_minute_value"),()=>Y("waiting_live_colon")]),b(H,z)};R(L,H=>{n(r)&&H(E)})}var k=A(L,2);{var K=H=>{var z=cS();let j;var ae=C(z),X=C(ae,!0);S(ae);var ne=A(ae,2),J=C(ne,!0);S(ne),S(z),O((we,pe)=>{j=qe(z,"",j,{width:we}),ve(X,n(a)),ve(J,pe)},[()=>p(n(a)),()=>Y("waiting_live_second_value")]),b(H,z)};R(k,H=>{n(a)&&H(K)})}S(y),O(H=>h=se(y,1,"timer__container s-z",null,h,H),[()=>({small:e.isSmallSize})]),b(t,y),F()}var mS=M('<div class="waiting s-o"><span> </span></div>'),vS=M('<div class="upcoming-timer timer s-o"><span> </span> <!></div>'),gS=M('<div class="waiting-container s-o"><!></div>'),hS={hash:"s-o",code:'.waiting-container.s-o{background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;white-space:nowrap}.waiting-container.s-o,.waiting-container.s-o:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-o:before{backdrop-filter:blur(15px);background-color:rgba(0,0,0,.56);content:"";z-index:1}.waiting.s-o{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-o{font-size:20px;font-weight:600;line-height:1.2}.upcoming-timer.s-o{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.timer.s-o{align-items:center;display:flex;flex-direction:column;justify-content:center}.timer__title.s-o{display:inline-block;font-size:20px;font-weight:600;line-height:1.2;margin-bottom:12px;vertical-align:middle}.small.s-o{font-size:15px}.medium.s-o{font-size:17px}'};function hc(t,e){B(e,!0),Q(t,hS);let i=g(e,"startTime",3,0),o=m(()=>i()<Math.floor(Date.now()/1e3)),r=W(void 0),a=W(void 0),l=0,d=W(void 0),s=W(void 0),u=m(()=>{var x,I;return((x=n(d))!=null?x:1/0)<=509||((I=n(s))!=null?I:1/0)<=320}),f=m(()=>{var x,I;return!n(u)&&(((x=n(d))!=null?x:1/0)<=699||((I=n(s))!=null?I:1/0)<=599)}),p=e.onUpcomingLiveViewStateChanged?fS(()=>{cancelAnimationFrame(l),l=requestAnimationFrame(()=>{let x={type:n(o)?"expired":"default",size:n(u)?"s":n(f)?"m":"l"},I=n(o)?n(r):n(a);e.onUpcomingLiveViewStateChanged(x,I)})},300):void 0;Ne(()=>{n(s),n(d),n(o),p==null||p()}),pn(()=>{if(cancelAnimationFrame(l),p==null||p.cancel(),e.onUpcomingLiveViewStateChanged){let x={type:n(o)?"expired":"default",size:n(u)?"s":n(f)?"m":"l"};e.onUpcomingLiveViewStateChanged(x)}});var v=gS();v.__contextmenu=function(...x){var I;(I=e.onContextMenu)==null||I.apply(this,x)},v.__click=function(...x){var I;(I=e.onClick)==null||I.apply(this,x)};var $=C(v);{var y=x=>{var I=mS(),T=C(I);let N;var L=C(T,!0);S(T),S(I),Ze(I,E=>D(r,E),()=>n(r)),O((E,k)=>{N=se(T,1,"waiting__title s-o",null,N,E),ve(L,k)},[()=>({medium:n(f),small:n(u)}),()=>Y("waiting_live_upcoming_title")]),b(x,I)},h=x=>{var I=vS(),T=C(I);let N;var L=C(T,!0);S(T);var E=A(T,2);let k=m(()=>n(u)||n(f)),K=m(()=>i()||0);Qm(E,{get isSmallSize(){return n(k)},get startTime(){return n(K)},onTimerOver:()=>D(o,!0)}),S(I),Ze(I,H=>D(a,H),()=>n(a)),O((H,z)=>{N=se(T,1,"timer__title s-o",null,N,H),ve(L,z)},[()=>({medium:n(f),small:n(u)}),()=>Y("waiting_live_timer_title")]),b(x,I)};R($,x=>{n(o)?x(y):x(h,!1)})}S(v),O(()=>qe(v,`background-image: url(${e.thumbUrl})`)),In(v,"clientWidth",x=>D(d,x)),In(v,"clientHeight",x=>D(s,x)),b(t,v),F()}Ye(["contextmenu","click"]);var _S=M('<div class="waiting-container s-r"><div class="waiting-caption s-r"><!> <p class="waiting-title s-r"> </p></div></div>'),bS={hash:"s-r",code:'.waiting-container.s-r{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-r,.waiting-container.s-r:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-r:before{backdrop-filter:blur(10px);background-color:rgba(0,0,0,.4);content:""}.waiting-caption.s-r{align-items:center;display:flex;flex-direction:column;position:relative}.waiting-title.s-r{font-size:20px;font-weight:400;line-height:1.2;margin:0;padding:20px;text-align:center}'};function Xa(t,e){B(e,!0),Q(t,bS);let i=g(e,"thumbUrl",3,""),o={recover:Y("waiting_live_recover_title"),record:Y("waiting_record_title")},r=m(()=>o[e.kind]||"");var a=_S();a.__contextmenu=function(...f){var p;(p=e.onContextMenu)==null||p.apply(this,f)},a.__click=function(...f){var p;(p=e.onClick)==null||p.apply(this,f)};var l=C(a),d=C(l);Fa(d,{style:"position: static; transform: translate(0, 0)"});var s=A(d,2),u=C(s,!0);S(s),S(l),S(a),O(()=>{qe(a,`background-image: url('${i()}')`),ve(u,n(r))}),b(t,a),F()}Ye(["contextmenu","click"]);var $S=Te('<path d="M6 10.2 3.5 7.7a.99.99 0 0 0-1.4 1.4l3.2 3.2a1 1 0 0 0 1.4 0l7.6-7.6a.99.99 0 0 0-1.4-1.4z"></path>');function Gm(t){Je(t,{width:"16",height:"16",testId:"check-mark-icon",children:(e,i)=>{var o=$S();b(e,o)},$$slots:{default:!0}})}var yS=M('<div class="select-icon s-1x"><!></div>'),xS={hash:"s-1x",code:".select-icon.s-1x{margin-right:auto;opacity:.9;padding-right:12px;position:relative;top:3px}"};function _c(t){Q(t,xS);var e=yS(),i=C(e);Gm(i,{}),S(e),b(t,e)}var wS=(t,e)=>{t.stopPropagation(),e.item.selectItem(e.item.value)},SS=(t,e)=>{Dl(t,()=>e.item.selectItem(e.item.value))},CS=M("<p> </p>"),TS=M('<p class="sublabel s-1u"> </p>'),IS=M('<li role="menuitem" tabindex="0"><!> <div><!> <!></div></li>'),ES={hash:"s-1u",code:".menu-item-value.s-1u{align-items:end;display:flex;flex-direction:column;min-width:0}.menu-item-value[data-selected=false].s-1u{--select-icon-width:16px;--icon-padding:12px;margin-left:calc(var(--icon-padding) + var(--select-icon-width))}.label.s-1u,.sublabel.s-1u{max-width:100%;overflow:hidden;text-overflow:ellipsis}.sublabel.s-1u{opacity:.5}"};function Ym(t,e){B(e,!0),Q(t,ES);let i=g(e,"isMobile",3,!1);var o=IS();let r;o.__click=[wS,e],o.__keydown=[SS,e];var a=C(o);{var l=y=>{_c(y,{})};R(a,y=>{e.item.selected&&y(l)})}var d=A(a,2);let s;var u=C(d);{var f=y=>{var h=Ae(),x=ce(h);Bi(x,()=>e.item.valueComponent,(I,T)=>{T(I,Jr(()=>{var N;return(N=e.item.valueComponentParams)!=null?N:{}}))}),b(y,h)},p=y=>{var h=CS();let x;var I=C(h,!0);S(h),O(T=>{var N;x=se(h,1,"label s-1u",null,x,T),ve(I,(N=e.item.label)!=null?N:e.item.value)},[()=>({mobile:i()})]),b(y,h)};R(u,y=>{e.item.valueComponent?y(f):y(p,!1)})}var v=A(u,2);{var $=y=>{var h=TS(),x=C(h,!0);S(h),O(()=>ve(x,e.item.sublabel)),b(y,h)};R(v,y=>{e.item.sublabel&&y($)})}S(d),S(o),O((y,h,x)=>{var I;r=se(o,1,"item",null,r,y),Le(o,"data-value",(I=e.item.dataValue)!=null?I:e.item.value),Le(o,"aria-label",h),Le(o,"data-testid",e.item.dataTestid),s=se(d,1,"menu-item-value s-1u",null,s,x),Le(d,"data-selected",e.item.selected)},[()=>({mobile:i()}),()=>{var y,h;return(h=(y=e.item.ariaLabel)!=null?y:e.item.label)!=null?h:e.item.value.toString()},()=>({"submenu-value-mobile":i()})]),b(t,o),F()}Ye(["click","keydown"]);var kS=M('<li role="menuitem" tabindex="0" aria-haspopup="true"><!> <div><!></div></li>');function jm(t,e){B(e,!0);let i=g(e,"isMobile",3,!1),o=g(e,"refMenuItems",15),r=m(()=>()=>e.openSubMenuList(e.item.children)),a=m(()=>h=>Ru(h,n(r)));var l=kS();let d;l.__click=function(...h){var x;(x=n(r))==null||x.apply(this,h)},l.__keydown=function(...h){var x;(x=n(a))==null||x.apply(this,h)};var s=C(l);{var u=h=>{_c(h,{})};R(s,h=>{e.item.selected&&h(u)})}var f=A(s,2);let p;var v=C(f);{var $=h=>{var x=Ae();let I=m(()=>e.item.valueComponent);var T=ce(x);Bi(T,()=>n(I),(N,L)=>{L(N,Jr(()=>{var E;return(E=e.item.valueComponentParams)!=null?E:{}}))}),b(h,x)},y=h=>{var x=ps();O(()=>ve(x,e.item.label)),b(h,x)};R(v,h=>{e.item.valueComponent?h($):h(y,!1)})}S(f),S(l),Ze(l,h=>o(o()[e.item.id]=h,!0),()=>{var h;return(h=o())==null?void 0:h[e.item.id]}),O((h,x)=>{var I;d=se(l,1,"item",null,d,h),Le(l,"aria-label",(I=e.item.ariaLabel)!=null?I:e.item.label),Le(l,"data-testid",e.item.id),p=se(f,1,"menu-item-value",null,p,x)},[()=>({mobile:i(),bottomBordered:e.item.bottomBordered}),()=>({"submenu-value-mobile":i()})]),b(t,l),F()}Ye(["click","keydown"]);var ts={"quality-settings":100,"audio-language-settings":200,"playback-rate-settings":300,"subtitles-settings":400,"traffic-saving-settings":500,download:600,report:700,"copy-data":800,"save-trace-info":900,"debug-info":1e3};var AS=(t,e)=>{A_(t,e.returnFromSubMenu,e.closeSettingsMenu)},LS=(t,e)=>{t.stopPropagation(),e.returnFromSubMenu()},MS=(t,e)=>{Ud(t)&&(Dr(t),e.returnFromSubMenu())},VS=M('<div><ul role="menu"><li role="menuitem" tabindex="0" data-testid="return-to-settings-menu"><!> <p class="title s-1k"> </p></li> <!></ul></div>'),RS={hash:"s-1k",code:".sub-menu.s-1k{--item-padding-vertical-mobile:16px;--item-padding-vertical:7px;--item-label-line-height:18px;--edge-item-padding-vertical-mobile:calc(6px + var(--item-padding-vertical-mobile));--edge-item-padding-vertical:calc(8px + var(--item-padding-vertical))}.sub-menu.s-1k .item.mobile{font-size:14px;line-height:var(--item-label-line-height);padding:var(--item-padding-vertical-mobile) 17px}.sub-menu.s-1k{padding-top:calc(var(--edge-item-padding-vertical) + var(--item-padding-vertical) + var(--item-label-line-height))}.sub-menu.mobile.s-1k{padding-top:calc(var(--edge-item-padding-vertical-mobile) + var(--item-padding-vertical-mobile) + var(--item-label-line-height) + 1px)}.sub-menu.s-1k .items:where(.s-1k) .item.header:where(.s-1k){border-bottom:var(--divider-border);display:flex;justify-content:space-between;left:0;min-width:max-content;position:absolute;right:0;top:0}.header.s-1k .title:where(.s-1k){margin-left:8px}.sub-menu.s-1k .item{padding:var(--item-padding-vertical) 12px;padding-right:22px}.items.s-1k .item:first-child:not(.mobile){padding-top:var(--edge-item-padding-vertical)}.items.s-1k .item:last-child:not(.mobile){padding-bottom:var(--edge-item-padding-vertical)}.items.s-1k .item.mobile:first-child{padding-top:var(--edge-item-padding-vertical-mobile)}.items.s-1k .item.mobile:last-child{padding-bottom:var(--edge-item-padding-vertical-mobile)}.sub-menu.s-1k .item.bottomBordered{border-bottom:var(--divider-border)}.sub-menu.s-1k .item .sublabel{font-size:12px;line-height:14px}.item.s-1k:not(.mobile) p:where(.s-1k),.sub-menu.s-1k .item:not(.mobile) .label{font-size:13px;line-height:var(--item-label-line-height)}"};function Zm(t,e){B(e,!0),Q(t,RS);let[i,o]=Ve(),r=()=>w(p,"$isFullscreen",i),a=()=>w(v,"$playerSize",i),l=g(e,"isMobile",3,!1),d=g(e,"playerControlsHeight",3,0),s=g(e,"ariaLabelReturnFromSubMenu",19,()=>Y("aria_label_submenu_back")),u=g(e,"listRef",15);Et(()=>{let X=e.items.findIndex(ne=>ne.selected);u().children[X+1].focus()});let f=ge(),p=f.ui.isFullscreen,v=f.ui.playerSize,$=W(void 0),y=W(0),h=W(0),x=m(()=>l()&&r()?`max-height: ${Math.round(a().height*.6)}px`:l()?"":`max-height: ${a().height-32-n(h)-d()}px; overflow: auto;`),I=m(()=>Math.max(e.minWidth,n(y)));var T=VS();let N;var L=C(T);let E;L.__keydown=[AS,e];var k=C(L);let K;k.__click=[LS,e],k.__keydown=[MS,e];var H=C(k);Nr(H,{direction:"left"});var z=A(H,2),j=C(z,!0);S(z),S(k),Ze(k,X=>D($,X),()=>n($));var ae=A(k,2);bi(ae,17,()=>e.items,Sd,(X,ne)=>{var J=Ae(),we=ce(J);{var pe=be=>{Ym(be,{get item(){return n(ne)},get isMobile(){return l()}})},re=(be,$e)=>{{var ee=Re=>{jm(Re,{get isMobile(){return l()},get item(){return n(ne)},get openSubMenuList(){return e.openSubMenuList},get refMenuItems(){return e.refMenuItems}})};R(be,Re=>{n(ne).type==="OPEN_SUB_MENU"&&Re(ee)},$e)}};R(we,be=>{n(ne).type==="SELECT_VALUE"?be(pe):be(re,!1)})}b(X,J)}),S(L),Ze(L,X=>u(X),()=>u()),S(T),O((X,ne,J)=>{N=se(T,1,"sub-menu menu s-1k",null,N,X),Le(T,"data-testid",`${e.id}-sub-menu`),qe(T,`min-width: ${n(I)}px`),E=se(L,1,"items s-1k",null,E,ne),qe(L,n(x)),K=se(k,1,"item header back s-1k",null,K,J),Le(k,"aria-label",s()),ve(j,e.title)},[()=>({desktop:!l(),mobile:l()}),()=>({mobile:l()}),()=>({mobile:l()})]),In(k,"clientWidth",X=>D(y,X)),In(k,"clientHeight",X=>D(h,X)),b(t,T),F(),o()}Ye(["keydown","click"]);import{noop as NS}from"@vkontakte/videoplayer-shared/es2018";var DS=(t,e)=>Ru(t,e()),OS=(t,e)=>{t.stopPropagation(),e()()},BS=M('<div class="value s-1l"> </div>'),FS=M('<li role="menuitem" tabindex="0" aria-haspopup="true"><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></li>'),HS={hash:"s-1l",code:".value.s-1l{opacity:.7;overflow:hidden;position:relative;text-overflow:ellipsis}"};function Jm(t,e){B(e,!0),Q(t,HS);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,NS),r=g(e,"valueComponent",3,void 0),a=g(e,"iconProps",19,()=>({})),l=g(e,"ref",15);var d=FS();let s;d.__click=[OS,o],d.__keydown=[DS,o];var u=C(d),f=C(u);{var p=T=>{Ka(T,{get icon(){return e.icon}})},v=T=>{var N=Ae();let L=m(()=>e.icon);var E=ce(N);Bi(E,()=>n(L),(k,K)=>{K(k,Jr(a))}),b(T,N)};R(f,T=>{typeof e.icon=="string"?T(p):T(v,!1)})}S(u);var $=A(u,2),y=C($,!0);S($);var h=A($,2);{var x=T=>{var N=Ae();let L=m(r);var E=ce(N);Bi(E,()=>n(L),(k,K)=>{K(k,{})}),b(T,N)},I=T=>{var N=BS(),L=C(N,!0);S(N),O(()=>ve(L,e.value)),b(T,N)};R(h,T=>{r()?T(x):T(I,!1)})}S(d),Ze(d,T=>l(T),()=>l()),O(T=>{s=se(d,1,"item",null,s,T),Le(d,"aria-label",e.ariaLabel),Le(d,"data-testid",e.id),ve(y,e.label)},[()=>({mobile:i()})]),b(t,d),F()}Ye(["click","keydown"]);import{noop as mb}from"@vkontakte/videoplayer-shared/es2018";var US=(t,e)=>{Dl(t,()=>e())},zS=M('<div class="icon icon-error-stub"><div class="inner"></div></div>'),WS=M('<img class="icon" aria-hidden="true"/>'),KS=M('<li role="menuitem" tabindex="0"><div class="icon-wrapper"><!></div> <div class="label s-1m"> </div></li>'),qS={hash:"s-1m",code:".label.s-1m{overflow:hidden;text-overflow:ellipsis}"};function ev(t,e){B(e,!0),Q(t,qS);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,mb),r=g(e,"closeSettings",3,mb),a=W(!1),l=()=>{D(a,!0)},d=x=>{x==null||x.stopPropagation(),o()(),r()()};var s=KS();let u;s.__click=d,s.__keydown=[US,d];var f=C(s),p=C(f);{var v=x=>{var I=Ae(),T=ce(I);{var N=E=>{var k=zS();b(E,k)},L=E=>{var k=WS();O(()=>Le(k,"src",e.icon)),nt("error",k,l),ka(k),b(E,k)};R(T,E=>{n(a)?E(N):E(L,!1)})}b(x,I)},$=x=>{var I=Ae();let T=m(()=>e.icon);var N=ce(I);Bi(N,()=>n(T),(L,E)=>{E(L,{})}),b(x,I)};R(p,x=>{typeof e.icon=="string"?x(v):x($,!1)})}S(f);var y=A(f,2),h=C(y,!0);S(y),S(s),O(x=>{var I;u=se(s,1,"item",null,u,x),Le(s,"aria-label",(I=e.ariaLabel)!=null?I:e.label),Le(s,"data-testid",e.id),ve(h,e.label)},[()=>({mobile:i()})]),b(t,s),F()}Ye(["click","keydown"]);import{noop as YS}from"@vkontakte/videoplayer-shared/es2018";var QS=M('<div class="toggle_wrap s-1r"><div></div> <div class="toggle-label s-1r"></div></div>'),GS={hash:"s-1r",code:'.toggle_wrap.s-1r{cursor:pointer;font-size:12px;line-height:15px;min-height:15px;padding:0;user-select:none}.toggle.s-1r{background-color:var(--toggle-color-separator);border-radius:45px;cursor:pointer;float:right;height:9px;margin-top:3px;width:28px}.toggle.s-1r:after{background-color:var(--toggle-color-off);border-radius:50%;content:"";float:left;height:15px;left:0;position:relative;top:-3px;transition:left .1s ease;width:15px}.toggle.on.s-1r:after{background-color:var(--toggle-color-on);left:13px}.toggle-label.s-1r{overflow:hidden}'};function tv(t,e){Q(t,GS);let i=g(e,"enabled",3,!1);var o=QS(),r=C(o);let a;ai(2),S(o),O(l=>a=se(r,1,"toggle s-1r",null,a,l),[()=>({on:i()})]),b(t,o)}var jS=(t,e,i)=>{L_(t,e(),o=>i()(o))},XS=(t,e,i)=>{t.stopPropagation(),e()(!i())},ZS=M('<div><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></div>'),JS=M('<li role="menuitem" tabindex="0"><!></li>');function iv(t,e){B(e,!0);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,YS),r=g(e,"enabled",3,!1),a=g(e,"tooltipText",3,void 0),l=g(e,"maxTooltipWidth",3,void 0);var d=JS();let s;d.__click=[XS,o,r],d.__keydown=[jS,r,o];var u=C(d);Ha(u,{get content(){return a()},get isMobile(){return i()},placement:"left",translateX:10,isFullWidthWrapper:!0,get maxTooltipWidth(){return l()},children:(f,p)=>{var v=ZS();let $;var y=C(v),h=C(y);{var x=E=>{Ka(E,{get icon(){return e.icon}})},I=E=>{var k=Ae();let K=m(()=>e.icon);var H=ce(k);Bi(H,()=>n(K),(z,j)=>{j(z,{})}),b(E,k)};R(h,E=>{typeof e.icon=="string"?E(x):E(I,!1)})}S(y);var T=A(y,2),N=C(T,!0);S(T);var L=A(T,2);tv(L,{get enabled(){return r()}}),S(v),O(E=>{$=se(v,1,"switch-wrapper",null,$,E),ve(N,e.label)},[()=>({mobile:i()})]),b(f,v)},$$slots:{default:!0}}),S(d),O(f=>{var p;s=se(d,1,"item switch-item",null,s,f),Le(d,"aria-label",(p=e.ariaLabel)!=null?p:e.label),Le(d,"data-testid",e.id)},[()=>({mobile:i()})]),b(t,d),F()}Ye(["click","keydown"]);import{isValidURL as SC,VideoQuality as Cb}from"@vkontakte/videoplayer-shared/es2018";var vb=()=>{let t=W(si([])),e=m(()=>(n(t).length?n(t).at(-1):null)||null);return{get current(){return n(e)},pushSubMenu:i=>{n(t).push(i)},popSubMenu:()=>{D(t,n(t).slice(0,-1),!0)},popAllSubMenus:()=>{D(t,[],!0)}}};import{getVideoQualityLabel as eC}from"@vkontakte/videoplayer-shared/es2018";var tC=M('<div class="quality-icon s-1n"><!></div>'),iC=M('<div class="quality-label s-1n"><span> </span> <!></div>'),oC={hash:"s-1n",code:".quality-label.s-1n{position:relative}.quality.s-1n{font-size:13px;line-height:18px}.quality.sub.s-1n{opacity:.7}.quality-icon.s-1n{display:flex;padding-left:2px;position:absolute;right:0;top:0;transform:translateX(100%)}.quality-icon.s-1n svg{color:var(--blue-light)}"};function Za(t,e){B(e,!0),Q(t,oC);let i=g(e,"isSubCase",3,!1),o=m(()=>e.quality?eC(e.quality):""),r=m(()=>Hu(e.quality));var a=iC(),l=C(a);let d;var s=C(l,!0);S(l);var u=A(l,2);{var f=p=>{var v=tC();let $=m(()=>n(r));var y=C(v);Bi(y,()=>n($),(h,x)=>{x(h,{})}),S(v),O(()=>Le(v,"data-testid",`${n(o)}-icon`)),b(p,v)};R(u,p=>{n(r)&&!e.isMobile&&p(f)})}S(a),O(p=>{d=se(l,1,"s-1n",null,d,p),ve(s,e.label)},[()=>({sub:!i(),quality:!e.isMobile})]),b(t,a),F()}import{VideoQuality as nC}from"@vkontakte/videoplayer-shared/es2018";import{VideoQuality as gb}from"@vkontakte/videoplayer-core/es2018";var hb=({quality:t,availableQualities:e})=>{let i=e.find(o=>o.value===t);return i?i.displayValue:t},_b=({quality:t,availableQualities:e,isAutoQualityEnabled:i})=>{if(!t)return"...";let o=hb({quality:t,availableQualities:e});return i?t===gb.INVARIANT?Y("auto_quality_invariant"):Y("auto_quality",{actual:o}):o},bb=({quality:t,availableQualities:e,prefix:i,onlyPrefix:o})=>t?o||t===gb.INVARIANT?i:`${i}${hb({quality:t,availableQualities:e})}`:"...";var rC=M('<div class="menu-item-value-wrapper s-1s"><!></div>'),sC={hash:"s-1s",code:".menu-item-value-wrapper.s-1s{line-height:normal}"};function Yl(t,e){B(e,!0),Q(t,sC);let[i,o]=Ve(),r=()=>w(s,"$currentQuality$",i),a=()=>w(u,"$availableQualities$",i),l=()=>w(f,"$isMobile$",i),d=ge(),s=d.state.currentQuality$,u=d.state.availableQualities$,f=d.ui.isMobile,p=" · ",v=m(()=>e.prefix+(e.selected&&r()!==nC.INVARIANT?p:"")),$=m(()=>bb({prefix:n(v),quality:r(),availableQualities:a(),onlyPrefix:!e.selected}));var y=rC(),h=C(y);let x=m(()=>e.selected?r():void 0);Za(h,{get quality(){return n(x)},get label(){return n($)},get isMobile(){return l()},isSubCase:!0}),S(y),b(t,y),F(),o()}var aC=t=>{let e=t.join("|"),i="<(?<keyhtml>.*?)(?<propshtml> .*?)?>(?<childrenhtml>.*?)</\\k<keyhtml>>",o=`{(?<keyi18n>${e})}(?<childreni18n>.*?){/\\k<keyi18n>}`,r="<(?<keyhtmlself>.*?)(?<propshtmlself> .*?)?/?>",a=`{(?<keyi18nself>${e})}`;return new RegExp(`${i}|${o}|${r}|${a}`,"g")},lC={br:!0,span:!0},ov=(t,e={})=>{var d,s,u,f,p,v,$;if(!t)return t;let i={...lC,...e},o=Object.keys(i);if(!o.length)return t;let r=aC(o),a=[],l=0;for(let y of t.matchAll(r)){let h=y[0],x=((d=y.groups)==null?void 0:d.keyhtml)||((s=y.groups)==null?void 0:s.keyi18n)||((u=y.groups)==null?void 0:u.keyhtmlself)||((f=y.groups)==null?void 0:f.keyi18nself)||"",{index:I}=y;if(!i[x]){a.push(t.slice(l,I)),l=I+h.length;continue}let T=(p=y.groups)!=null&&p.childrenhtml?ov(y.groups.childrenhtml,i):"",N=(v=y.groups)!=null&&v.childrenhtml?h.replace(new RegExp(($=y.groups)==null?void 0:$.childrenhtml),()=>T||""):h;a.push(t.slice(l,I),N),l=I+h.length}return l===0?t:(a.push(t.slice(l)),a.join(""))};function bc(t,e){B(e,!1);let i=g(e,"message",8),o=ov(i());xo();var r=Ae(),a=ce(r);{var l=d=>{var s=Ae(),u=ce(s);Cd(u,()=>o),b(d,s)};R(a,d=>{o&&d(l)})}b(t,r),F()}var dC=M('<p class="quality-applies sublabel s-1t"><!></p>'),cC={hash:"s-1t",code:".quality-applies.s-1t{color:hsla(0,0%,100%,.5);display:flex;justify-content:end;padding:3px 0}.quality-applies span{color:#70c1ff}"};function nv(t,e){B(e,!1),Q(t,cC),xo();var i=dC(),o=C(i);let r=xn(()=>Y("quality_applience",{action:`<span>${Y("quality_applience_action")}</span>`}));bc(o,{get message(){return n(r)}}),S(i),b(t,i),F()}var yb=({isAutoQualityEnabled:t,trafficSavingEnabled:e,highQualityEnabled:i})=>{let o=!t&&!e&&!i;return{id:"quality-other-settings",type:"OPEN_SUB_MENU",label:Y("other_quality"),selected:o,valueComponent:Yl,valueComponentParams:{prefix:Y("other_quality"),selected:o},children:"quality-other-settings"}},rv=({appliesTo:t,labelWithQuality:e,selected:i},{selectQuality:o})=>({id:"quality-auto",type:"SELECT_VALUE",value:"auto",label:Y("auto_quality_limit"),valueComponent:e?Yl:void 0,valueComponentParams:{prefix:Y("auto_quality_limit"),selected:i},selectItem:()=>o("auto",t),selected:i}),xb=()=>({id:"quality-appliance-settings",type:"OPEN_SUB_MENU",valueComponent:nv,bottomBordered:!0,children:"quality-appliance"}),sv=({labelWithQuality:t,appliesTo:e,selected:i},{toggleHighQuality:o})=>({id:"quality-high",type:"SELECT_VALUE",value:"high_quality",selectItem:()=>o(!0,e),selected:i,label:Y("high_quality"),valueComponent:t?Yl:void 0,valueComponentParams:{prefix:Y("high_quality"),selected:i},sublabel:Y("high_quality_description")}),av=({labelWithQuality:t,appliesTo:e,selected:i},{toggleTrafficSaving:o})=>({id:"quality-traffic-saving",type:"SELECT_VALUE",value:"save_traffic",selectItem:()=>o(!0,e),selected:i,label:Y("traffic_saving_quality"),valueComponent:t?Yl:void 0,valueComponentParams:{prefix:Y("traffic_saving_quality"),selected:i},sublabel:Y("traffic_saving_quality_description")});var ip=(t,e)=>String(e.findIndex(i=>i.id===t.id)+1),op=(t,e)=>{var l;if(!t)return"";let{language:i,label:o}=t,r;if(i==="und"?r=void 0:i&&(r=(l=oc(i))!=null?l:i),o&&i&&r){let d=e.filter(s=>s.label===o&&s.language===i);if(d.length===1)return Y("audio_stream_display_language_label",{language:r,label:o});{let s=ip(t,d);return Y("audio_stream_display_language_label_index",{language:r,label:o,index:s})}}if(o){let d=e.filter(s=>s.label===o);if(d.length===1)return o;{let s=ip(t,d);return Y("audio_stream_display_label_index",{label:o,index:s})}}if(i&&r){let d=e.filter(s=>s.language===i);if(d.length===1)return r;{let s=ip(t,d);return Y("audio_stream_display_language_index",{language:r,index:s})}}let a=ip(t,e);return Y("audio_stream_display_unknown",{index:a})};var uC={"quality-settings":t=>{let{isAutoQualityEnabled:e,isAutoQualityAvailable:i,trafficSavingEnabled:o,highQualityEnabled:r}=t,a=[];return i&&a.push({handler:rv,selected:e&&!o&&!r||!1}),a.push({handler:av,selected:o},{handler:sv,selected:r}),{title:Y("submenu_quality"),id:"quality-settings",items:[xb(t),...a.map(({handler:l,selected:d})=>l({labelWithQuality:!0,appliesTo:"to-video",selected:d},t)),yb(t)]}},"quality-other-settings":({closeSettingsMenu:t,selectQuality:e,availableQualities:i,isMobile:o})=>({id:"quality-other-settings",title:Y("submenu_quality"),closeSettingsMenu:t,items:i.map(r=>({type:"SELECT_VALUE",value:r.value,valueComponent:Za,valueComponentParams:{quality:r.value,label:r.displayValue,isMobile:o,isSubCase:!0},selectItem:a=>e(a,"to-video"),selected:r.selected,label:r.displayValue}))}),"quality-appliance":t=>{var i,o,r;let{closeSettingsMenu:e}=t;return{id:"quality-appliance",title:Y("default_quality_for_any_video"),closeSettingsMenu:e,items:[{handler:rv,selected:((i=wu())==null?void 0:i.type)==="auto_quality"},{handler:av,selected:((o=wu())==null?void 0:o.type)==="traffic_saving"},{handler:sv,selected:((r=wu())==null?void 0:r.type)==="high_quality"}].map(({handler:a,selected:l})=>a({labelWithQuality:!1,appliesTo:"as-default",selected:l},t))}},"audio-tracks":({closeSettingsMenu:t,availableAudioStreams:e,currentAudioStream:i,selectAudioLanguage:o})=>({id:"audio-tracks",title:Y("submenu_audio_languages"),closeSettingsMenu:t,items:e.map(r=>({type:"SELECT_VALUE",value:r,dataValue:r.id,selectItem:o,selected:r.id===(i==null?void 0:i.id),label:op(r,e)}))}),"playback-rate":({closeSettingsMenu:t,availablePlaybackRates:e,selectPlaybackRate:i})=>({id:"playback-rate",title:Y("submenu_playback_rate"),closeSettingsMenu:t,items:e.map(o=>({type:"SELECT_VALUE",value:o.value,selectItem:i,selected:o.selected,label:o.displayValue}))}),subtitles:({availableSubtitlesList:t,selectSubtitle:e})=>({id:"subtitles",minWidth:164,title:Y("subtitles_caption"),items:t.map(i=>({type:"SELECT_VALUE",value:i.value,selectItem:()=>e(i),selected:i.selected,label:i.displayValue,dataTestid:i.value===Pn?"sub_off":void 0}))})},wb=({subMenuId:t,context:e})=>t?[uC[t](e)]:[];var pC=Te('<path d="M3.1 9.5c0-2.24 0-3.36.44-4.22A4 4 0 015.28 3.54C6.14 3.1 7.26 3.1 9.5 3.1h5c2.24 0 3.36 0 4.22.44a4 4 0 011.74 1.74c.44.86.44 1.98.44 4.22s0 3.36-.44 4.22a4 4 0 01-1.74 1.74c-.84.43-1.93.44-4.07.44l.55 2.2h1.9a.9.9 0 010 1.8H6.9a.9.9 0 110-1.8h1.9l.55-2.2c-2.14 0-3.23-.01-4.07-.44a4 4 0 01-1.74-1.74C3.1 12.86 3.1 11.74 3.1 9.5m11.4-4.6h-5c-1.15 0-1.9 0-2.48.05-.56.04-.79.12-.92.19a2.2 2.2 0 00-.96.96 2 2 0 00-.2.92C4.9 7.6 4.9 8.35 4.9 9.5s0 1.9.05 2.48c.04.56.12.79.19.92q.33.63.96.96c.13.07.36.15.92.2.58.04 1.33.04 2.48.04h5c1.15 0 1.9 0 2.48-.05.56-.04.79-.12.92-.19a2.2 2.2 0 00.96-.96c.07-.13.15-.36.2-.92.04-.58.04-1.33.04-2.48s0-1.9-.05-2.48a3 3 0 00-.19-.92 2.2 2.2 0 00-.96-.96 2 2 0 00-.92-.2c-.58-.04-1.33-.04-2.48-.04m-3.3 11-.55 2.2h2.7l-.55-2.2z"></path>');function lv(t){Je(t,{testId:"traffic-saving-icon",children:(e,i)=>{var o=pC();b(e,o)},$$slots:{default:!0}})}var fC=Te('<path d="M8.3 14.25c1.86 1.9 5.5.02 5.5-3.55V5.64l2.4-.7A2.74 2.74 0 0 0 18 2.37V.64a.75.75 0 0 0-.92-.62l-.26.06C15.88.3 14.93.51 14 .8c-1.33.45-2.03 1.62-2.01 3.08V9c-3.89.2-5.64 3.29-3.7 5.25ZM.9.1a.9.9 0 0 0 0 1.8h8.2a.9.9 0 0 0 0-1.8H.9ZM.9 5.1a.9.9 0 1 0 0 1.8h7.2a.9.9 0 0 0 0-1.8H.9ZM0 11c0-.5.4-.9.9-.9h4.18a.9.9 0 1 1 0 1.8H.9A.9.9 0 0 1 0 11Z"></path>');function dv(t){Je(t,{width:"18",height:"15",children:(e,i)=>{var o=fC();b(e,o)},$$slots:{default:!0}})}var mC=Te('<path d="M11 4.07V2.05c-2.01.2-3.84 1-5.32 2.21L7.1 5.69A8 8 0 0 1 11 4.07M5.69 7.1 4.26 5.68A10 10 0 0 0 2.05 11h2.02a8 8 0 0 1 1.62-3.9M2.05 13c.2 2.01 1 3.84 2.21 5.32l1.43-1.43A8 8 0 0 1 4.07 13zM11 21.95v-2.02a8 8 0 0 1-3.9-1.62l-1.42 1.43A10 10 0 0 0 11 21.95M22 12c0 5.16-3.92 9.42-8.95 9.95v-2.02C16.97 19.41 20 16.05 20 12s-3.03-7.41-6.95-7.93V2.05C18.08 2.58 22 6.84 22 12M10.69 8.58l4.74 2.73a.8.8 0 0 1 0 1.37l-4.74 2.74a.8.8 0 0 1-1.19-.68V9.26a.8.8 0 0 1 1.19-.68"></path>');function cv(t){Je(t,{testId:"play-speed-icon",children:(e,i)=>{var o=mC();b(e,o)},$$slots:{default:!0}})}var vC=Te('<path d="M12 2a.9.9 0 01.9.9v10.93l4.56-4.57a.9.9 0 011.28 1.28l-6.1 6.1a.9.9 0 01-1.28 0l-6.1-6.1a.9.9 0 111.28-1.28l4.56 4.57V2.9A.9.9 0 0112 2M4 20a.9.9 0 01.9-.9h14.2a.9.9 0 110 1.8H4.9A.9.9 0 014 20"></path>');function uv(t){Je(t,{testId:"download-icon",children:(e,i)=>{var o=vC();b(e,o)},$$slots:{default:!0}})}var gC=Te('<path d="M8.86 2.1h6.28c.67 0 1.2.21 1.68.7l4.38 4.38c.48.48.7 1 .7 1.68v6.28c0 .68-.22 1.2-.7 1.68l-4.38 4.38c-.48.48-1 .7-1.68.7H8.86c-.68 0-1.2-.22-1.68-.7L2.8 16.82c-.48-.48-.7-1-.7-1.68V8.86c0-.68.22-1.2.7-1.68L7.18 2.8c.48-.49 1-.7 1.68-.7m-.44 2L4.1 8.43c-.18.18-.21.24-.21.5v6.17c0 .25.03.31.2.5l4.32 4.3c.18.18.24.21.5.21h6.17c.25 0 .31-.03.5-.2l4.3-4.32c.18-.18.21-.24.21-.5V8.92c0-.25-.03-.31-.2-.5l-4.32-4.3c-.18-.18-.24-.21-.5-.21H8.92c-.25 0-.32.03-.5.2M13 16a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-.1-8.1a.9.9 0 0 0-1.8 0v5.2a.9.9 0 1 0 1.8 0z"></path>');function pv(t){Je(t,{testId:"report-icon",children:(e,i)=>{var o=gC();b(e,o)},$$slots:{default:!0}})}var hC=Te('<path d="M4 12.3V12c0-1.47 0-2.55.08-3.4.07-.9.21-1.48.45-1.95a4.85 4.85 0 0 1 2.12-2.12 5.1 5.1 0 0 1 1.95-.45C9.5 4 10.68 4 12.3 4h4.51c-.03-.16-.09-.33-.17-.49a2.4 2.4 0 0 0-1.05-1.05c-.3-.16-.63-.21-.93-.24-.29-.02-.64-.02-1.03-.02h-1.37c-1.58 0-2.81 0-3.81.08a6.84 6.84 0 0 0-2.62.64 6.65 6.65 0 0 0-2.9 2.91c-.4.76-.57 1.6-.65 2.62-.08 1-.08 2.23-.08 3.81v1.37c0 .4 0 .74.02 1.03.03.3.08.62.24.93A2.4 2.4 0 0 0 4 16.8V12.3ZM10.08 6h-.03c-.53 0-.97 0-1.33.03-.39.03-.76.1-1.12.28a2.9 2.9 0 0 0-1.3 1.3c-.17.35-.24.72-.27 1.1C6 9.09 6 9.53 6 10.06v7.9c0 .53 0 .97.03 1.33.03.39.1.76.28 1.12a2.9 2.9 0 0 0 1.3 1.3c.35.17.72.24 1.1.27.37.03.81.03 1.33.03h6.91c.53 0 .97 0 1.33-.03.39-.03.76-.1 1.12-.28a2.9 2.9 0 0 0 1.3-1.3c.17-.35.24-.72.27-1.1.03-.37.03-.81.03-1.34v-7.9c0-.53 0-.97-.03-1.33-.03-.39-.1-.76-.28-1.12a2.9 2.9 0 0 0-1.3-1.3 2.96 2.96 0 0 0-1.1-.27C17.91 6 17.47 6 16.94 6h-6.87ZM8.41 7.92c.06-.04.18-.07.45-.1.28-.02.65-.02 1.22-.02h6.84c.57 0 .94 0 1.22.02.27.03.39.06.45.1.21.1.39.28.5.49.03.06.06.18.09.45.02.28.02.65.02 1.22v7.84c0 .57 0 .94-.02 1.22-.03.27-.06.39-.1.45-.1.21-.28.39-.49.5-.06.03-.18.06-.45.09-.28.02-.65.02-1.22.02h-6.84c-.57 0-.94 0-1.22-.02a1.23 1.23 0 0 1-.45-.1 1.1 1.1 0 0 1-.5-.49 1.23 1.23 0 0 1-.09-.45c-.02-.28-.02-.65-.02-1.22v-7.84c0-.57 0-.94.02-1.22.03-.27.06-.39.1-.45.1-.21.28-.39.49-.5Z"></path>');function np(t){Je(t,{children:(e,i)=>{var o=hC();b(e,o)},$$slots:{default:!0}})}var _C=Te('<path d="M12 20.1a8.1 8.1 0 1 0 0-16.2 8.1 8.1 0 0 0 0 16.2m0 1.9a10 10 0 1 1 0-20 10 10 0 0 1 0 20m0-12.37A1.32 1.32 0 1 1 12 7a1.32 1.32 0 0 1 0 2.63m-.95 2.82c0-.54.43-.98.95-.98s.95.44.95.98v3.83c0 .54-.43.98-.95.98a.96.96 0 0 1-.95-.98z"></path>');function fv(t){Je(t,{testId:"info-icon",children:(e,i)=>{var o=_C();b(e,o)},$$slots:{default:!0}})}var bC=M('<div class="menu-item-value-wrapper s-1v"><!></div>'),$C={hash:"s-1v",code:".menu-item-value-wrapper.s-1v{line-height:normal}"};function mv(t,e){B(e,!0),Q(t,$C);let[i,o]=Ve(),r=()=>w(u,"$currentQuality$",i),a=()=>w(f,"$availableQualities$",i),l=()=>w(p,"$isAutoQualityEnabled$",i),d=()=>w(v,"$isMobile$",i),s=ge(),u=s.state.currentQuality$,f=s.state.availableQualities$,p=s.state.isAutoQualityEnabled$,v=s.ui.isMobile,$=m(()=>_b({quality:r(),availableQualities:a(),isAutoQualityEnabled:l()}));var y=bC(),h=C(y);Za(h,{get quality(){return r()},get label(){return n($)},get isMobile(){return d()}}),S(y),b(t,y),F(),o()}var xC={"quality-settings":({isAutoQualityEnabled:t,currentQuality:e,qualityDetailsSubMenuEnabled:i})=>{let o=(t?Y("auto_quality_option"):e)||"";return{id:"quality-settings",type:"OPEN_SUB_MENU",ariaLabel:Y("aria_label_menu_quality",{actual:o}),icon:Yd,label:Y("menu_quality"),value:e,valueComponent:mv,weight:ts["quality-settings"],children:i?"quality-settings":"quality-other-settings"}},"traffic-saving-switch":({trafficSavingEnabled:t,toggleTrafficSaving:e})=>({id:"traffic-saving-switch",weight:ts["traffic-saving-settings"],type:"SWITCH",onClick:i=>e(i,"to-video"),ariaLabel:Y("aria_label_submenu_traffic_saving"),icon:lv,label:Y("menu_traffic_saving"),enabled:t,tooltipText:Y("traffic_saving_helper_text"),maxTooltipWidth:175}),"audio-tracks-settings":({currentAudioStream:t,availableAudioStreams:e})=>{let i=op(t,e);return{id:"audio-tracks-settings",weight:ts["audio-language-settings"],type:"OPEN_SUB_MENU",ariaLabel:Y("aria_label_menu_audio_languages",{actual:i}),icon:dv,label:Y("menu_audio_languages"),value:i,children:"audio-tracks"}},"playback-rate-settings":({availablePlaybackRates:t,currentPlaybackRate:e})=>{var o;let i=((o=t.find(r=>r.value===e))==null?void 0:o.displayValue)||"";return{id:"playback-rate-settings",weight:ts["playback-rate-settings"],type:"OPEN_SUB_MENU",ariaLabel:Y("aria_label_menu_rate",{actual:i}),icon:cv,label:Y("menu_playback_rate"),value:`${e}x`,children:"playback-rate"}},"subtitles-settings":({currentSubtitle:t})=>({id:"subtitles-settings",weight:ts["subtitles-settings"],type:"OPEN_SUB_MENU",ariaLabel:Y("aria_label_menu_subtitle",{actual:t.displayValue}),icon:la,iconProps:{type:"outline"},label:Y("subtitles_caption"),value:t.displayValue,children:"subtitles"}),download:({onDownloadClick:t})=>({id:"download",weight:ts.download,type:"CLICK",onClick:t,label:Y("download_video_caption"),ariaLabel:Y("aria_label_menu_download"),icon:uv}),"show-support":({onReportProblemClick:t})=>({id:"show-support",weight:ts.report,type:"CLICK",onClick:t,label:Y("menu_report"),ariaLabel:`${Y("menu_report")}. ${Y("aria_label_new_tab_alert")}`,icon:pv,isHiddenFor:["desktop"]}),"copy-data":({onCopyDataClick:t})=>({id:"copy-data",weight:ts["copy-data"],type:"CLICK",onClick:t,label:Y("menu_copy_debug"),ariaLabel:Y("menu_copy_debug"),icon:np,isHiddenFor:["desktop"]}),"save-trace-info":({onSaveTraceDataClick:t})=>({id:"save-trace-info",weight:ts["save-trace-info"],type:"CLICK",onClick:t,label:Y("menu_save_debug"),ariaLabel:Y("menu_save_debug"),icon:np,isHiddenFor:["desktop"]}),"debug-info":({toggleShowDebugInfo:t})=>({id:"debug-info",weight:ts["debug-info"],type:"CLICK",onClick:t,ariaLabel:Y("aria_label_menu_debug_overlay"),label:Y("menu_debug_overlay"),icon:fv,isHiddenFor:["desktop"]})},Sb=({items:t,context:e,additionalSettingsMenuItems:i})=>{let{isMobile:o}=e;return[...t.map(r=>xC[r](e)),...i.map(r=>({...r,isAdditional:!0}))].filter(r=>{var a,l,d;return!((a=r==null?void 0:r.isHiddenFor)!=null&&a.length)||!((l=r==null?void 0:r.isHiddenFor)!=null&&l.includes("desktop"))&&!o||!((d=r==null?void 0:r.isHiddenFor)!=null&&d.includes("mobile"))&&o}).sort(Oa)};var CC=(t,e)=>{Vu(t,e)},TC=M('<div><div> </div> <div class="close s-s"></div></div>'),IC=M('<div data-testid="settings-menu" role="presentation"><!> <ul role="menu"></ul></div>'),EC=M("<div><!> <!></div>"),kC={hash:"s-s",code:'.settings-menu-container.mobile.s-s{width:100%;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.settings-menu-container.s-s ul{list-style-type:none;margin:0;padding:0}.settings-menu-container.s-s .menu{background-color:var(--settings-bg);border-radius:var(--settings-radius);overflow:hidden;transition:opacity .2s,visibility .2s}.settings-menu-container.s-s .menu .item:first-child:not(.mobile){border-top-left-radius:var(--settings-radius);border-top-right-radius:var(--settings-radius)}.settings-menu-container.s-s .menu .item:last-child{border-bottom-left-radius:var(--settings-radius);border-bottom-right-radius:var(--settings-radius)}.settings-menu-container.s-s .settings-menu .item:first-child:not(.mobile){padding-top:6px}.settings-menu-container.s-s .settings-menu .item:last-child:not(.mobile){padding-bottom:6px}.settings-menu-container.s-s .menu.desktop{bottom:0;max-width:100%;position:absolute;right:0}.settings-menu.s-s{line-height:40px}.settings-menu.desktop.s-s{min-width:300px}.settings-menu-container.s-s .menu.mobile{background:var(--mobile-settings-bg);font-size:15px;line-height:50px;width:100%}.settings-menu-container.s-s .menu.mobile.hidden{display:none}.settings-menu-container.s-s .menu .item:not(.switch-item),.settings-menu-container.s-s .menu .switch-wrapper{align-items:center;color:var(--white);cursor:pointer;display:flex;justify-content:flex-end;position:relative;white-space:nowrap}.settings-menu-container.s-s .menu .item:hover{background-color:var(--settings-item-bg-hover)}.settings-menu-container.s-s .menu .item.mobile:hover{background:var(--mobile-settings-bg)}.settings-menu.s-s .item:not(.switch-item),.settings-menu.s-s .switch-wrapper{padding:0 32px 0 18px}.settings-menu.s-s .item.mobile:not(.switch-item),.settings-menu.s-s .switch-wrapper.mobile{padding:0 14px}.settings-menu.s-s .icon-wrapper{align-items:center;display:flex;height:24px;justify-content:center;margin-right:16px;min-width:24px;width:24px}.settings-menu.s-s .label{flex-grow:1;margin-right:24px;overflow:hidden;text-overflow:ellipsis}.settings-menu.s-s .item.header.mobile:where(.s-s){border-bottom:var(--divider-border);color:var(--white);column-gap:12px;cursor:pointer;display:flex;justify-content:space-between;margin-bottom:4px}.settings-menu-container.s-s .items::-webkit-scrollbar{width:8px}.settings-menu-container.s-s .items::-webkit-scrollbar-track{background-color:#3a3a3a;border-radius:4px;box-shadow:none}.settings-menu-container.s-s .items::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#666;border:1px solid transparent;border-radius:5px;min-height:40px}.settings-menu-container.s-s .items::-webkit-scrollbar-thumb:hover{background-color:#777}.settings-menu-container.s-s .items.mobile{max-height:160px;overflow-x:hidden;overflow-y:auto;text-align:left}.close.s-s{height:12px;margin-right:-12px;padding:12px;position:relative;width:12px}.close.s-s:after,.close.s-s:before{background-color:var(--white);content:" ";height:12px;left:18px;position:absolute;width:2px}.close.s-s:before{transform:rotate(45deg)}.close.s-s:after{transform:rotate(-45deg)}'};function $c(t,e){B(e,!0),Q(t,kC);let[i,o]=Ve(),r=()=>w(Oe,"$settingsMenuVisible",i),a=()=>w(it,"$settingsMenuOpenedByKeyboard",i),l=()=>w(Be,"$debugPanelVisible",i),d=()=>w(Pe,"$isMobile",i),s=()=>w(Ie,"$playerSize",i),u=()=>w(De,"$hasMpegSources$",i),f=()=>w(ke,"$mobileNotReportControlHidden$",i),p=()=>w(ee,"$autoQualityLimitingAvailable$",i),v=()=>w(Z,"$availableSubtitlesList$",i),$=()=>w(He,"$isLiveWithPlaybackSpeed",i),y=()=>w(re,"$availableAudioStreams$",i),h=()=>w(We,"$availablePlaybackRates$",i),x=()=>w(pe,"$currentAudioStream$",i),I=()=>w(P,"$currentPlaybackRate$",i),T=()=>w(tt,"$trafficSavingEnabled",i),N=()=>w(be,"$currentQuality$",i),L=()=>w(Re,"$isAutoQualityEnabled$",i),E=()=>w(Se,"$currentSubtitle$",i),k=()=>w(mt,"$additionalSettingsMenuItems$",i),K=()=>w(fe,"$isAutoQualityAvailable$",i),H=()=>w($e,"$availableQualities$",i),z=()=>w(ye,"$highQualityEnabled",i),j=g(e,"ref",15,void 0),ae=g(e,"playerControlsHeight",3,0),X=si({}),ne=si({}),J=ge(),we=kt(),pe=J.state.audioStream$,re=J.state.availableAudioStreams$,be=J.state.currentQuality$,$e=J.state.availableQualities$,ee=J.state.autoQualityLimitingAvailable$,Re=J.state.isAutoQualityEnabled$,fe=J.state.isAutoQualityAvailable$,P=J.state.currentPlaybackRate$,We=J.state.availablePlaybackRates$,Se=J.state.currentSubtitle$,Z=J.state.availableSubtitlesList$,ie=J.state.canDownload,De=J.state.hasMpegSources$,Oe=J.ui.settingsMenu.visible$,it=J.ui.settingsMenu.openedByBtnKeyboard$,U=J.ui.settingsMenu.ref$,Pe=J.ui.isMobile,ke=J.ui.mobileNotReportControlHidden$,He=J.state.canChangePlaybackSpeed$,tt=J.state.trafficSavingEnabled$,ye=J.state.highQualityEnabled$,Ie=J.ui.playerSize,Be=J.ui.debugPanelVisible,Lt=J.state.isInteractiveTime$,mt=J.ui.additionalSettingsMenuItems$,Vt=J.ui.t,dt=J.actions.internal.downloadVideo,xt=J.actions.internal.closeSettingsMenu,Qt=J.actions.internal.openSettingsSubMenu,Tt=J.actions.internal.closeSettingsSubMenu,Mt=W(!1),Rt=W(void 0),G=vb();Ne(()=>{!r()&&G.current&&(Tt(ne[G.current]),G.popAllSubMenus())}),Ne(()=>{r()||D(Rt,void 0)}),Ne(()=>{!G.current&&n(Rt)&&P_(X,n(Rt))}),Ne(()=>{j()&&U.set(j())});async function Ce(wt){var q;G.pushSubMenu(wt),await vo(),Qt(wt,ne[wt]);let Dt=(q=j())==null?void 0:q.firstElementChild;Dt&&Bf(Dt)}function le(wt){var Dt;wt==null||wt.stopPropagation(),a()||(Dt=e.returnFocus)==null||Dt.call(e),xt(),D(Mt,!1)}function _e(wt,Dt){J.actions.internal.setQuality(wt,{appliesTo:Dt,byUser:!0}),le()}function Me(wt){J.actions.internal.setAudioStream(wt),le()}function rt(wt,Dt){J.actions.internal.setTrafficSavingEnabled(wt,Dt),we.features.qualityDetailsSubMenuEnabled&&le()}function pt(wt,Dt){J.actions.internal.setHighQualityEnabled(wt,Dt),le()}function ue(wt){J.actions.internal.setPlaybackRate(wt),le()}function ze(wt){J.actions.internal.setSubtitle(wt),le()}function Qe(){dt()}function ct(){SC(e.supportLink)&&window.open(e.supportLink,"_blank"),J.actions.internal.reportProblem(),J.actions.internal.pause()}function Nt(){Rl(J.actions.internal.getDebugTextData())}let Ht=()=>{let wt=J.actions.internal.getTraceTextData(),Dt=new Blob([...wt],{type:"application/json"}),q=window.URL.createObjectURL(Dt);Ma(q,"vk_player_trace_info","json")};function Gt(){Be.set(!l())}function vi(){D(Mt,!0)}function Qi(){D(Mt,!1)}function Pt(){return d()?`max-height: ${Math.round(s().height*.6)}px`:`max-height: ${s().height-32-ae()}px; overflow: auto;`}let di=m(()=>ie&&u()&&!f()),pi=m(()=>we.features.trafficSaving&&!f()&&p()&&!we.features.qualityDetailsSubMenuEnabled),$t=m(()=>v().length>0&&!f()),ci=m(()=>!!$()&&!f()),qt=m(()=>we.features.audioLanguages&&y().length>=2&&!f()),Gi=m(()=>!f());Et(()=>Lt.subscribe(wt=>{wt&&!d()&&!n(Mt)&&!a()&&le()}));let Yi=m(()=>{let wt=[n(Gi)&&"quality-settings",n(qt)&&"audio-tracks-settings",n(ci)&&"playback-rate-settings",n($t)&&"subtitles-settings",n(pi)&&"traffic-saving-switch",n(di)&&"download",we.showSupport&&"show-support","copy-data",we.features.saveTraceInfoToFile&&"save-trace-info","debug-info"].filter(Dt=>!!Dt);return Sb({items:wt,context:{qualityDetailsSubMenuEnabled:we.features.qualityDetailsSubMenuEnabled,availablePlaybackRates:h(),currentAudioStream:x(),availableAudioStreams:y(),currentPlaybackRate:I(),selectPlaybackRate:ue,trafficSavingEnabled:T(),toggleTrafficSaving:rt,currentQuality:N()||Cb.INVARIANT,isAutoQualityEnabled:L()||!1,currentSubtitle:E(),isMobile:d(),onDownloadClick:Qe,onCopyDataClick:Nt,onReportProblemClick:ct,onSaveTraceDataClick:Ht,toggleShowDebugInfo:Gt},additionalSettingsMenuItems:k()})}),ot=m(()=>wb({subMenuId:G.current,context:{availablePlaybackRates:h(),selectPlaybackRate:ue,trafficSavingEnabled:T(),toggleTrafficSaving:rt,currentQuality:N()||Cb.INVARIANT,isAutoQualityEnabled:L()||!1,isAutoQualityAvailable:K()||!1,availableQualities:H(),highQualityEnabled:z(),toggleHighQuality:pt,availableAudioStreams:y(),availableSubtitlesList:v(),closeSettingsMenu:xt,currentAudioStream:x(),isMobile:d(),selectAudioLanguage:Me,selectQuality:_e,selectSubtitle:ze}}));var Ue=EC();let gi;var So=C(Ue);{var Ho=wt=>{var Dt=IC();let q;Dt.__keydown=[CC,xt];var yt=C(Dt);{var yi=zt=>{var st=TC();let Pi;var Fi=C(st),gn=C(Fi,!0);S(Fi);var Co=A(Fi,2);Co.__click=le,S(st),O((ro,go)=>{Pi=se(st,1,"item header s-s",null,Pi,ro),ve(gn,go)},[()=>({mobile:d()}),()=>Vt("submenu_settings")]),b(zt,st)};R(yt,zt=>{d()&&zt(yi)})}var Yt=A(yt,2);let Ke;bi(Yt,21,()=>n(Yi),zt=>zt.id,(zt,st)=>{var Pi=Ae(),Fi=ce(Pi);{var gn=ro=>{Jm(ro,{get isMobile(){return d()},get id(){return n(st).id},get icon(){return n(st).icon},get iconProps(){return n(st).iconProps},get label(){return n(st).label},get ariaLabel(){return n(st).ariaLabel},get value(){return n(st).value},get valueComponent(){return n(st).valueComponent},onClick:()=>{Ce(n(st).children),D(Rt,n(st).id,!0)},get ref(){return X[n(st).id]},set ref(go){X[n(st).id]=go}})},Co=(ro,go)=>{{var zo=To=>{let Wo=m(()=>`${n(st).id}-menu-item`);ev(To,{get isMobile(){return d()},get id(){return n(Wo)},get onClick(){return n(st).onClick},get icon(){return n(st).icon},get label(){return n(st).label},get ariaLabel(){return n(st).ariaLabel},closeSettings:le})},ho=(To,Wo)=>{{var Ai=Io=>{let An=m(()=>`${n(st).id}-menu-item`);iv(Io,{get isMobile(){return d()},get id(){return n(An)},get onClick(){return n(st).onClick},get icon(){return n(st).icon},get label(){return n(st).label},get ariaLabel(){return n(st).ariaLabel},get enabled(){return n(st).enabled},get tooltipText(){return n(st).tooltipText},get maxTooltipWidth(){return n(st).maxTooltipWidth}})};R(To,Io=>{n(st).type==="SWITCH"&&Io(Ai)},Wo)}};R(ro,To=>{n(st).type==="CLICK"?To(zo):To(ho,!1)},go)}};R(Fi,ro=>{n(st).type==="OPEN_SUB_MENU"?ro(gn):ro(Co,!1)})}b(zt,Pi)}),S(Yt),Ze(Yt,zt=>j(zt),()=>j()),S(Dt),O((zt,st,Pi)=>{q=se(Dt,1,"settings-menu menu s-s",null,q,zt),Ke=se(Yt,1,"items",null,Ke,st),qe(Yt,Pi)},[()=>({desktop:!d(),mobile:d(),hidden:!!G.current}),()=>({mobile:d()}),Pt]),nt("mouseenter",Dt,vi),nt("mouseleave",Dt,Qi),b(wt,Dt)};R(So,wt=>{r()&&wt(Ho)})}var Uo=A(So,2);bi(Uo,17,()=>n(ot),wt=>wt.id,(wt,Dt)=>{let q=m(()=>{var yt;return(yt=n(Dt).minWidth)!=null?yt:137});Zm(wt,{get isMobile(){return d()},get playerControlsHeight(){return ae()},get returnFromSubMenu(){return G.popSubMenu},get id(){return n(Dt).id},get title(){return n(Dt).title},get closeSettingsMenu(){return xt},openSubMenuList:Ce,get items(){return n(Dt).items},get minWidth(){return n(q)},get refMenuItems(){return X},get listRef(){return ne[n(Dt).id]},set listRef(yt){ne[n(Dt).id]=yt}})}),S(Ue),O(wt=>gi=se(Ue,1,"settings-menu-container s-s",null,gi,wt),[()=>({mobile:d(),hidden:!r()})]),b(t,Ue),F(),o()}Ye(["keydown","click"]);var PC=M('<button class="btn s-12"> </button>'),AC={hash:"s-12",code:"button.btn.s-12{background:hsla(0,0%,100%,.1);border-radius:8px;font-size:14px;line-height:18px;margin-top:12px;padding:6px 12px 7px}"};function vv(t,e){Q(t,AC);var i=PC();i.__click=function(...r){var a;(a=e.onClick)==null||a.apply(this,r)};var o=C(i,!0);S(i),O(()=>ve(o,e.label)),b(t,i)}Ye(["click"]);var LC=M('<div class="container s-q"><div class="notification s-q"><div><p class="description s-q"><!></p> <!></div> <!></div></div>'),MC={hash:"s-q",code:".container.s-q{display:flex;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:20px}.notification.s-q{background:var(--notification-bg);border-radius:var(--notification-radius);display:inline-flex;gap:10px;padding:9px 14px 10px 12px;pointer-events:auto}.description.s-q{font-size:13px;line-height:16px;margin:0;white-space:pre}"};function yc(t,e){B(e,!0),Q(t,MC);let i=340,{features:{forceAutoQualityWhenSevereStallHappens:o}}=kt(),{ui:{t:r}}=ge(),a=r(o?"slow_video_notification_force_description":"slow_video_notification_suggest_description");var l=LC(),d=C(l),s=C(d),u=C(s),f=C(u);bc(f,{get message(){return a}}),S(u);var p=A(u,2);{var v=y=>{let h=m(()=>r("slow_video_notification_button"));vv(y,{get label(){return n(h)},get onClick(){return e.onSelectAutoQuality}})};R(p,y=>{o||y(v)})}S(s);var $=A(s,2);Vs($,{get onClick(){return e.onClose}}),S(d),S(l),Zr(3,d,()=>_s,()=>({duration:i})),b(t,l),F()}import{isIntersecting as Tb,Subscription as VC}from"@vkontakte/videoplayer-shared/es2018";var Ja="annotation",rp=class{constructor(e){this.slots=new Map;this.disabledIds=new Set(e)}init(e,i){this.shadowRootContainer=e,this.store=i}add(e,i){var d;let{overlay:o,id:r,controlsBehaviour:a,hideAllControls:l}=i;return this.disabledIds.has(r)?{success:!1,message:"current slotId is disabled via config"}:(e.setAttribute("slot",Ja),this.setupSlotStyles(e,o),this.shadowRootContainer.append(e),this.slots.set(r,{rootElement:e,options:i}),a&&this.runHidingControlsWhenIntersected(r,a),l&&((d=this.store)==null||d.ui.isControlsAvailable.set(!1)),{success:!0})}setupSlotStyles(e,i){switch(e.style.position="absolute",i){case"over_video":e.style.zIndex="calc(var(--video-container-z-index) + 1)";break;case"over_controls":e.style.zIndex="calc(var(--controls-container-z-index) + 1)";break;default:e.style.zIndex="0"}}async runHidingControlsWhenIntersected(e,{observedSlotElementId:i,controlsToObserve:o}){var f;let r=this.slots.get(e);if(!r)return;let a=await this.findSlotElement(r.rootElement,i,e),{controls:l,hiddenControls:d}=((f=this.store)==null?void 0:f.ui)||{},s=new MutationObserver(p=>p.forEach(()=>{let v=Ns(a,this.shadowRootContainer);o.forEach($=>{let y=l==null?void 0:l[$],h=y?he(y):null,x=d==null?void 0:d[$];h&&(x==null||x.set(Tb(h,v)))})}));s.observe(a,{childList:!0,subtree:!0}),r.observer=s;let u=new VC;o.forEach(p=>{l&&u.add(l[p].subscribe(v=>{let $=d==null?void 0:d[p];v&&v.isDisplayed?$==null||$.set(Tb(v,Ns(a,this.shadowRootContainer))):$==null||$.set(!1)}))}),r.subs=u}async findSlotElement(e,i,o){return new Promise(r=>{let a=null,l=new MutationObserver(()=>{if(a=e.querySelector(`#${i}`),a){l.disconnect();let s=this.slots.get(o);s&&(s.observerForFindingSlotElement=void 0),r(a)}});l.observe(e,{childList:!0,subtree:!0});let d=this.slots.get(o);d&&(d.observerForFindingSlotElement=l)})}remove(e){var u,f;let i=this.slots.get(e);if(!i)return;let{rootElement:o,observer:r,observerForFindingSlotElement:a,subs:l,options:{controlsBehaviour:d,hideAllControls:s}}=i;o&&o.remove(),[r,a].forEach(p=>p==null?void 0:p.disconnect()),l==null||l.unsubscribe(),this.slots.delete(e),s&&((u=this.store)==null||u.ui.isControlsAvailable.set(!0)),(f=d==null?void 0:d.controlsToObserve)==null||f.forEach(p=>{var v,$;($=(v=this.store)==null?void 0:v.ui.hiddenControls[p])==null||$.set(!1)})}destroy(){for(let e in this.slots.keys())this.remove(e);this.slots.clear()}haveSlots(){return this.slots.size>0}};var RC=M('<div class="container s-5"><!></div>'),NC={hash:"s-5",code:".container.s-5{align-items:center;animation-fill-mode:forwards;animation-name:s-5-videoPlayerStatusIconPopup;background-color:#00000073;border-radius:100%;display:flex;height:64px;justify-content:center;width:64px;will-change:opacity,scale}@keyframes s-5-videoPlayerStatusIconPopup{0%{opacity:0;scale:.6}10%{animation-timing-function:ease-in;opacity:1;scale:1}75%{opacity:1;scale:1}90%{animation-timing-function:ease-out;opacity:0;scale:.4}to{opacity:0;scale:0}}"};function xc(t,e){B(e,!0),Q(t,NC);let i=g(e,"reversed",3,!1);var o=Ae(),r=ce(o);Ps(r,()=>e.Icon,a=>{var l=RC(),d=C(l);Bi(d,()=>e.Icon,(s,u)=>{u(s,{get size(){return"48"},get reversed(){return i()}})}),S(l),O(()=>qe(l,`animation-duration: ${e.duration}ms`)),b(a,l)}),b(t,o),F()}import{PlaybackState as Ib}from"@vkontakte/videoplayer-core/es2018";var DC=M('<div class="container s-1b"><!></div>'),OC={hash:"s-1b",code:".container.s-1b{align-items:center;display:flex;height:100%;justify-content:center;pointer-events:none;position:absolute;width:100%}"};function gv(t,e){B(e,!0),Q(t,OC);let[i,o]=Ve(),r=()=>w(s,"$playbackState$",i),a=()=>w(f,"$previewTrackActive",i),l=()=>w(p,"$previewTrackDragInProgress",i),d=()=>w(u,"$isPlaying$",i),{state:{playbackState$:s,isPlaying$:u},ui:{previewTrackActive:f,previewTrackDragInProgress:p}}=ge(),{features:{playbackStatusShow:v},playbackStatusAnimationDuration:$}=kt(),y=0,h=W(null),x=W(!1);Ne(()=>{r()===Ib.PLAYING?D(h,kn,!0):r()===Ib.PAUSED?D(h,Bs,!0):D(h,null)}),Ne(()=>{if(!(!v||a()||l()))return y=window.setTimeout(()=>{y=0,D(h,null)},$),()=>{y&&(window.clearTimeout(y),y=0)}}),Ne(()=>{d()&&!n(x)&&(D(x,!0),D(h,null))});var I=Ae(),T=ce(I);{var N=L=>{var E=DC(),k=C(E);xc(k,{get duration(){return $},get Icon(){return n(h)}}),S(E),b(L,E)};R(T,L=>{n(h)&&v&&L(N)})}b(t,I),F(),o()}var BC=M('<div><div data-testid="video-container"></div></div>'),FC={hash:"s-c",code:".video-container.s-c,.video-wrapper.s-c{height:100%;left:0;position:absolute;top:0;width:100%}.video-wrapper.s-c{background:var(--black)}.video-container.s-c,.video-wrapper.s-c{z-index:var(--video-container-z-index)}.video-container.s-c{transition:var(--rotate-transition-duration) ease all}.video-container.fast-rotate.s-c{transition:none}.nocursor.s-c{cursor:none}"};function el(t,e){B(e,!0),Q(t,FC);let[i,o]=Ve(),r=()=>w(p,"$rotateAlpha",i),a=()=>w(v,"$playerSize",i),l=()=>w(f,"$playerPhase",i),d=()=>w(y,"$chromecastConnected$",i),s=()=>w($,"$isPlaying$",i),u=g(e,"videoContainer",15),{playerPhase:f,ui:{rotateAlpha:p,playerSize:v},state:{isPlaying$:$,chromecastConnected$:y}}=ge(),{isSmoothVideoRotate:h}=kt(),x=m(()=>u()&&r()%180?a().height/a().width:1);var I=BC();let T;I.__contextmenu=function(...E){var k;(k=e.onContextMenu)==null||k.apply(this,E)},I.__mousedown=function(...E){var k;(k=e.onMouseDown)==null||k.apply(this,E)},I.__mouseup=function(...E){var k;(k=e.onMouseUp)==null||k.apply(this,E)},I.__click=function(...E){var k;(k=e.onClick)==null||k.apply(this,E)},I.__dblclick=function(...E){var k;(k=e.onDblClick)==null||k.apply(this,E)};var N=C(I);let L;Ze(N,E=>u(E),()=>u()),S(I),O((E,k)=>{T=se(I,1,"video-wrapper s-c",null,T,E),L=se(N,1,"video-container s-c",null,L,k),qe(N,`transform: rotate(${r()}deg) scale(${n(x)})`),Le(N,"data-is-playing",s())},[()=>({hidden:l()!=="video"||d(),nocursor:e.hideCursor}),()=>({"fast-rotate":!h})]),b(t,I),F(),o()}Ye(["contextmenu","mousedown","mouseup","click","dblclick"]);var HC=M('<div><span class="text s-1a"> </span> <!></div>'),UC={hash:"s-1a",code:".root.s-1a{background-color:var(--double-forward-bg);border-radius:100px;color:var(--white);display:flex;gap:4px;left:50%;opacity:0;padding:6px 12px;pointer-events:none;position:absolute;top:24px;transition:opacity var(--controls-transition-duration) var(--controls-transition-fn);visibility:hidden}.root.s-1a,.root.visible.s-1a{transform:translateX(-50%)}.root.visible.s-1a{opacity:1;visibility:visible}.text.s-1a{font-size:13px;font-weight:600;line-height:16px}"};function hv(t,e){B(e,!0),Q(t,UC);let{ui:{t:i}}=ge();var o=HC();let r;var a=C(o),l=C(a,!0);S(a);var d=A(a,2);mc(d,{get size(){return"16"},fill:"currentColor"}),S(o),O((s,u)=>{r=se(o,1,"root s-1a",null,r,s),ve(l,u)},[()=>({visible:e.isVisible}),()=>i("double_forward_label")]),b(t,o),F()}var zC=M('<div class="container s-1c" role="button" data-testid="preview-track-overlay"><div class="icon s-1c"><!></div></div>'),WC={hash:"s-1c",code:".container.s-1c{background-color:rgba(0,0,0,.48);cursor:pointer;height:100%;position:absolute;width:100%}.container.s-1c,.icon.s-1c{align-items:center;display:flex;justify-content:center}.icon.s-1c{background-color:#00000073;border-radius:100%;height:64px;transition:transform .2s;transition-timing-function:ease-out;width:64px;will-change:transform}.container.s-1c:hover .icon:where(.s-1c){transform:scale(1.15)}"};function _v(t,e){B(e,!1),Q(t,WC);let o=ge().actions.internal.closePreviewTrack,r=200,a=u=>{u.stopPropagation(),o()};xo();var l=zC();l.__click=a;var d=C(l),s=C(d);return kn(s,{get size(){return"32"}}),S(d),S(l),Zr(3,l,()=>_s,()=>({duration:r})),b(t,l),df(e,"handleClick",a),F({handleClick:a})}Ye(["click"]);var KC=M('<div class="container s-1d"><div class="notification s-1d"><span class="text s-1d"> </span></div></div>'),qC={hash:"s-1d",code:".container.s-1d{display:flex;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:20px}.notification.s-1d{background-color:var(--black-alpha-40);border-radius:var(--notification-radius);padding:10px 16px}.text.s-1d{font-size:14px;font-weight:500;line-height:18px}"};function bv(t,e){B(e,!1),Q(t,qC);let{ui:{t:i}}=ge();xo();var o=KC(),r=C(o),a=C(r),l=C(a,!0);S(a),S(r),S(o),O(d=>ve(l,d),[()=>i("preview_track_notification_text")],xn),Zr(3,r,()=>_s,()=>({duration:340})),b(t,o),F()}var QC=(t,e,i,o,r,a)=>{if(t.stopPropagation(),e()||o()){a();return}},GC=M("<div><!></div>"),YC=M('<div class="spherical-video-icon s-9"><!></div>'),jC=M("<div><!></div>"),XC=M('<div class="settings-menu s-9"><!></div>'),ZC=M("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),JC=M("<!> <!> <!>",1),eT=M('<div class="blocked s-9"></div>'),tT=M('<div class="player-wrapper s-9"><!> <div class="overlay-container"></div></div> <!>',1),iT={hash:"s-9",code:".blocked.s-9,.player-wrapper.s-9{height:100%;position:absolute;width:100%}.blocked.s-9{z-index:var(--overlay-container-z-index)}.player-wrapper.s-9 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.spherical-video-icon.s-9{display:inline-block;left:calc(50% - 38px);position:absolute;top:calc(50% - 23px)}.ads-container.s-9{background:var(--black);height:100%;left:0;position:absolute;top:0;width:100%;z-index:var(--ads-container-z-index)}.settings-menu.s-9{bottom:57px;left:0;position:absolute;right:18px;transition:opacity .2s;z-index:var(--settings-menu-z-index)}"};function $v(t,e){B(e,!0),Q(t,iT);let[i,o]=Ve(),r=()=>w(vt,"$notificationsToShow$",i),a=()=>w(di,"$playerPhase",i),l=()=>w(So,"$isLoaderVisible",i),d=()=>w(vi,"$adPlaybackState",i),s=()=>w(yi,"$crashed",i),u=()=>w(ro,"$isInteractiveTime$",i),f=()=>w(qt,"$settingsMenuVisible",i),p=()=>w(go,"$isInteractiveExpectation$",i),v=()=>w(ci,"$controlsVisible",i),$=()=>w(ho,"$touched",i),y=()=>w(Yn,"$graphIsOpened$",i),h=()=>w(pi,"$isFullscreen",i),x=()=>w(is,"$autoplayNextEnabled$",i),I=()=>w(Dt,"$postrollPassed",i),T=()=>w(Ho,"$isEnded$",i),N=()=>w(or,"$cursorInside",i),L=()=>w(Br,"$isControlsAvailable",i),E=()=>w(Fr,"$doubleForwardOn$",i),k=()=>w(hn,"$fakeIsPlaying$",i),K=()=>w(er,"$bottomNoSmooth",i),H=()=>w(Io,"$interactiveTimeIndicator",i),z=()=>w(Pi,"$playerSize",i),j=()=>w(Fi,"$is3DVideo",i),ae=()=>w(Eo,"$doubleForwardAvailable$",i),X=()=>w(Ue,"$contextMenuVisible$",i),ne=()=>w(Gt,"$playbackState$",i),J=()=>w(To,"$hotKeyMapData",i),we=()=>w(Yi,"$scrubbingInProgress",i),pe=()=>w(ot,"$volumeChangingInProgress",i),re=()=>w(Uo,"$chromecastConnected$",i),be=()=>w(bo,"$controlsTimeoutActive",i),$e=()=>w(Gi,"$settingsMenuOpenedByKeyboard",i),ee=()=>w(Xt,"$contextMenuOpenedByKeyboard$",i),Re=()=>w(jo,"$contextMenuOpenedByHotKey$",i),fe=()=>w(Ti,"$contextMenuButtonRef$",i),P=()=>w(On,"$contextMenuLastActiveElem$",i),We=()=>w($t,"$isFullscreenOpenedByKeyboard",i),Se=()=>w(Ht,"$language$",i),Z=()=>w(dr,"$previewTrackActive$",i),ie=()=>w(gn,"$icon3DVideoVisible",i),De=()=>w(wt,"$chromecastDeviceName$",i),Oe=()=>w(zt,"$currentSubtitle$",i),it=()=>w(st,"$currentSubtitleCaptions$",i),U=()=>w(Qi,"$position$",i),Pe=()=>w(Pt,"$duration$",i),ke=()=>w(q,"$isLive$",i),He=()=>w(yt,"$isPlaying$",i),tt=()=>w(Or,"$contextMenuPosition$",i),ye=()=>w(Hr,"$previewTrackNotificationVisible$",i),Ie=()=>w(Wo,"$showHotKeyMap",i),Be=()=>w(gi,"$debugPanelVisible",i),Lt=()=>w($s,"$userActionsDisabled$",i),mt=g(e,"videoContainer",15),Vt=g(e,"adsSlotId",3,void 0),dt=g(e,"adsParams",3,void 0),xt=g(e,"adsAutoplayParam",3,void 0),Qt=g(e,"duration",3,void 0),Tt=g(e,"logoTargetUrl",3,""),Mt=g(e,"showNextPrevButtons",3,!1),Rt=g(e,"nextButtonActive",3,!1),G=g(e,"prevButtonActive",3,!1),Ce=g(e,"endScreenVideoTitle",3,void 0),le=g(e,"endScreenVideoThumb",3,void 0),_e=g(e,"isOneVideoPlaylist",3,!1),Me=g(e,"shadowRootContainer",3,void 0),rt=g(e,"outerContainerRef",3,void 0),pt=g(e,"playerStarted",3,!1),ue=g(e,"fullScreenTarget",3,void 0),ze=g(e,"showMiniTimer",3,!1),Qe=g(e,"showEndScreen",3,!0),ct=g(e,"keyboardControls",15),Nt=e.store.getLogger().createComponentLog("Root component"),Ht=e.store.interfaceLanguage$,Gt=e.store.state.playbackState$,vi=e.store.ads.playbackState,Qi=e.store.state.positionWithScrubbing$,Pt=e.store.state.duration$,di=e.store.playerPhase,pi=e.store.ui.isFullscreen,$t=e.store.ui.isFullscreenOpenedByKeyboard,ci=e.store.ui.controlsVisible,qt=e.store.ui.settingsMenu.visible$,Gi=e.store.ui.settingsMenu.openedByBtnKeyboard$,Yi=e.store.ui.scrubbingInProgress,ot=e.store.ui.volumeChangingInProgress,Ue=e.store.ui.contextMenu.visible$,gi=e.store.ui.debugPanelVisible,So=e.store.state.isLoaderVisible,Ho=e.store.state.isEnded$,Uo=e.store.state.chromecastConnected$,wt=e.store.state.chromecastDeviceName$,Dt=e.store.ads.postrollPassed,q=e.store.state.isLive$,yt=e.store.state.isPlaying$,yi=e.store.state.crashed$,Yt=e.store.webApi.annotationsApi,Ke=e.store.webApi.pictureInPictureApi,zt=e.store.state.currentSubtitle$,st=e.store.state.currentSubtitleCaptions$,Pi=e.store.ui.playerSize,Fi=e.store.ui.is3DVideo,gn=e.store.ui.icon3DVideoVisible,Co=e.store.state.isInteractive,ro=e.store.state.isInteractiveTime$,go=e.store.state.isInteractiveExpectation$,zo=e.store.state.hasInteractiveBranches,ho=e.store.ui.touched,To=e.store.ui.modals.hotKeyMap.data,Wo=e.store.ui.modals.hotKeyMap.show,Ai=e.store.ui.overlayContainer$,Io=e.store.ui.controls.interactiveTimeIndicator,An=e.store.state.showInteractiveTimeIndicator,Or=e.store.ui.contextMenu.position$,Ln=e.store.actions.internal.setQuality,bs=e.store.actions.internal.closeSettingsMenu,is=e.store.ui.autoplayNextEnabled$,$s=e.store.ui.userActionsDisabled,Br=e.store.ui.isControlsAvailable,Mn=e.store.ui.videoTitleInfo,Fr=e.store.ui.doubleForwardOn$,Eo=e.store.ui.doubleForwardAvailable$,Hr=e.store.ui.previewTrackNotificationVisible,ko=e.store.actions.internal.getVideoElement,$r=e.store.actions.internal.checkFullscreenSupport,{fakeIsPlaying$:hn,notifications$:os,graphIsOpened$:Yn}=wo(),so=W(void 0),yr=W(void 0),jn=W(void 0),Vn=W(void 0),_o,Xn,Zn;To.set(x_());let{closeNotification:ns,notificationsToShow$:vt}=os,Zt=m(()=>!!r().slow_video),Jn=()=>ns("slow_video"),Ur=m(()=>(a()==="video"&&l()||a()==="ads"&&d()==="inactive")&&!s()),Ko=W(void 0),er=de(!1),tr,bo=de(!1),ir=de(),or=de(!1),Rn=W(!1),Po=W(!1),qo=W(!1),xr=W(!(e.autoplay&&!e.uiConfig.controls.showOnStartupAtAutoplay)),Ii=m(()=>u()&&!f()&&!(n(Rn)||n(Po))&&!(n(qo)&&!p())),nr=!0,Qo=m(()=>e.uiConfig.features.thumbTimer&&ze()&&a()==="video"&&!v()&&!s()&&!Co&&(e.uiConfig.hideThumbTimerAfterTouch&&!$()||!e.uiConfig.hideThumbTimerAfterTouch)),rr=e.uiConfig.titleShowBehaviour,wr=m(()=>!["video","thumb"].includes(a())||rr==="never"||y()?!1:rr==="fullscreen"?h():!0),Sr=m(()=>rr==="always"||a()==="thumb"?!1:!v()),Ao=W(!1),gt=m(()=>(Qe()||e.showAutoplayNext&&x())&&!!Ce()&&!!le()&&(e.showAds&&I()||!e.showAds)&&T()&&!s()&&!n(Ao)),ni=m(()=>N()&&!(v()||n(gt))&&!u()&&L()&&!E()),jt=W(!1),Ci=m(()=>k()!==null),{toggle:an}=hn,Li=!1,ji=null;Ke==null||Ke.setContext(ld());let Lo=()=>{e.autoplay&&!Co&&e.uiConfig.controls.showOnStartupAtAutoplay&&Mi(e.uiConfig.controls.hideTimeout)};e.store.setUiCallbacks({onStarted:Lo});let sr=()=>{window.clearTimeout(_o),bo.set(!1)},ar=()=>{window.clearTimeout(Xn),ir.set(null)},Mi=me=>{sr(),bo.set(!0),_o=window.setTimeout(()=>bo.set(!1),me);let ft=me-100;tr=window.setTimeout(()=>{K()&&er.set(!1)},ft>0?ft:me)},ys=(me,ft)=>{ar(),ir.set(ft),Xn=window.setTimeout(()=>ir.set(null),me)},zr=Fi.subscribe(me=>{gn.set(me),me&&(window.clearTimeout(Zn),Zn=window.setTimeout(()=>gn.set(!1),e.uiConfig.controls.hide360IconTimeout))}),rs=async()=>{var ft,Jt,xi,eo;let me=oa();if(me){let Ei=Nd(),ri=lr();me=Ei===ri||Ei===Me()}if(me){Mi(e.uiConfig.controls.hideTimeoutFullscreen);try{await(Ke==null?void 0:Ke.exit())}catch(Ei){Nt({message:String(Ei)})}}pi.set(me),e.store.getAdmanWrapper().setFullscreen(me),h()?(Jt=(ft=e.store.callbacks)==null?void 0:ft.onFullscreenEnter)==null||Jt.call(ft):(eo=(xi=e.store.callbacks)==null?void 0:xi.onFullscreenExit)==null||eo.call(xi)},Cr=me=>{let{width:ft,height:Jt}=me.target;Pi.set({width:ft,height:Jt})},ln=()=>{let{width:me,height:ft}=n(so).getBoundingClientRect();Pi.set({width:me,height:ft})};Et(()=>{var ft;return Lu(rs),e.uiConfig.features.annotationsInside&&(Yt==null||Yt.init(n(so))),Na(Ke)&&(Ke==null||Ke.assignPlayerContainer(n(so)),Ke==null||Ke.setExternalEventHandlers({resize:Cr,leavepictureinpicture:ln})),e.interactiveContainer&&((ft=mt().parentElement)==null||ft.insertBefore(e.interactiveContainer,mt().nextSibling)),()=>{window.clearTimeout(_o),window.clearTimeout(tr),window.clearTimeout(Xn),window.clearTimeout(Zn),zr(),Ke==null||Ke.dispose().catch(Jt=>{Nt({message:String(Jt)})}),Mu(rs)}});let lr=()=>{let me=e.uiConfig.features.fullscreenInternalTargetPlayerContainer||!rt()?n(so):rt(),ft=me.getRootNode(),Jt=ft instanceof ShadowRoot?ft.host:ft,xi=ue()instanceof HTMLElement&&ue().contains(Jt);return e.uiConfig.allowChangingFullscreenTarget&&ue()&&xi?ue():me},Mo=()=>{Ue.set(!1)},Go=()=>{bs(),Mo()},Tr=async()=>{if(!$r()){Nt({message:"fullscreen disabled"});return}Mo(),oa()?(await Au(document),Nt({message:"exit fullscreen"})):(Nt({message:"request fullscreen"}),await Pu(lr()))},Yo=me=>{y()||(me.preventDefault(),Ue.set(!0),Or.set({left:me.clientX,top:me.clientY}))};function Vo(){or.set(!0),Co||Mi(e.uiConfig.controls.hideTimeoutCursor)}function Nn(me){var eo,Ei;let{relatedTarget:ft}=me,xi=!!(ft&&((eo=n(jn))!=null&&eo.contains(ft)))&&((Ei=ct())==null?void 0:Ei.isFocused());!Co&&!xi&&(er.set(!0),Mi(e.uiConfig.controls.hideTimeoutCursor))}function Wr(){or.set(!1),D(Po,!1),D(Rn,!1),Li=!1,e.store.actions.internal.releaseCamera(),Mi(e.uiConfig.controls.hideTimeout),E()&&Ji()}function je(me){return me?me.offsetTop+je(me.offsetParent):0}function It(me){return me?me.offsetLeft+It(me.offsetParent):0}function hi(me){if(H()&&An){let ft=me.currentTarget,Jt=je(ft),xi=It(ft),eo=me.pageX-xi,Ei=me.pageY-Jt,{left:ri,bottom:_i,right:Vi}=H(),Fn=Vi-ri;return eo>=ri-Fn&&Ei<=_i+Fn}}function ao(me){if(n(so)){let ft=je(me.currentTarget),Jt=z().height,xi=me.pageY-ft;if(hi(me)){D(Po,!1);return}xi<40?D(Po,!0):xi>Jt-40?D(Rn,!0):(D(Po,!1),f()||D(Rn,!1))}}function Xi(me){ao(me),!n(Ii)&&!E()&&Mi(e.uiConfig.controls.hideTimeoutCursor),j()&&Li&&ji&&e.store.actions.internal.moveCameraFocusPX(ji.clientX-me.clientX,ji.clientY-me.clientY,me.timeStamp-ji.timeStamp),ji=me}let Zi=null,lo=()=>{Zi=window.setTimeout(()=>{e.store.actions.internal.changeDoubleForwardOn(!0),sr()},e.uiConfig.doubleForwardActivationTime)},Ji=()=>{e.store.actions.internal.changeDoubleForwardOn(!1),Zi&&clearTimeout(Zi),Zi=null},dn=me=>{me.preventDefault(),me.button===0&&(Li=!0,e.store.actions.internal.holdCamera(),ae()&&lo()),!Li&&Mi(e.uiConfig.controls.hideTimeoutCursor)},Dn=me=>{me.preventDefault(),me.button===0&&(ji=me,Li=!1,e.store.actions.internal.releaseCamera()),!E()&&Mi(e.uiConfig.controls.hideTimeoutCursor)},co=me=>{me.preventDefault(),nr&&(Nt({message:"double click on video"}),Tr(),Mi(e.uiConfig.controls.hideTimeoutCursor))},Ro=me=>{var ft;if(me.preventDefault(),E()){Ji();return}if(Zi&&Ji(),X()||f()){Go();return}if(!(T()&&!zo)){if(n(Ci))return an();if((ft=ct())==null||ft.focus(),!pt()){e.firstStart(),Mi(e.uiConfig.controls.hideTimeoutCursor);return}(!e.uiConfig.preventPauseOnVideoClick||ne()!==kb.PLAYING)&&e.store.actions.internal.togglePlay(),Mi(e.uiConfig.controls.hideTimeoutCursor)}},_n=me=>{Go(),ho.set(!0),Mi(e.uiConfig.controls.hideTimeout),me&&ys(e.uiConfig.controls.hideHotKeyHelpers,me)},Ir=()=>{var me,ft;Go(),(me=e.store.callbacks)!=null&&me.onOpenHotKeyMap?(ft=e.store.callbacks)==null||ft.onOpenHotKeyMap(J()):Wo.update(Jt=>!Jt)},Ge=()=>{ho.set(!0)},Xt=e.store.ui.contextMenu.openedByBtnKeyboard$,Ti=e.store.ui.contextMenu.btnRef$,No=W(void 0),jo=e.store.ui.contextMenu.openedByHotKey$,On=e.store.ui.contextMenu.lastActiveElem$,$o=W(!1),dr=e.store.ui.previewTrackActive;Ne(()=>{Ai.set(n(Ko))}),Ne(()=>{D(qo,n(xr)&&ne()!==kb.PLAYING,!0),n(xr)||St(()=>D(xr,!0))}),Ne(()=>{var ft,Jt;let me=(n(qo)||T()||f()||we()||pe()||re()||be()||n($o))&&!n(Ii)&&(a()==="video"||a()==="ads")&&!s()&&L();ci.set(me),!me&&!be()&&((ft=n(jn))!=null&&ft.contains(Fu()))&&((Jt=ct())==null||Jt.focus())}),Ne(()=>{!we()&&n(jt)&&!u()&&Mi(e.uiConfig.controls.hideTimeoutCursor),St(()=>D(jt,we(),!0))}),Ne(()=>{n(Vn),f(),$e(),St(()=>zd(n(Vn),f(),$e()))}),Ne(()=>{n(No),X(),ee(),Re(),St(()=>{let me=ee()||Re();zd(n(No),X(),me)})}),Ne(()=>{let me=fe();me&&(X(),St(()=>Nl(me,X(),Xt)))}),Ne(()=>{let me=P();me&&(X(),St(()=>k_(me,X(),jo)))}),Ne(()=>{var me;!We()&&h()&&(St(()=>$t.set(!1)),(me=ct())==null||me.focus())}),Ne(()=>{y()&&Go()});let Bn=W(void 0),Hs=me=>{Mn.set(sn(ko(),{title:n(Bn)},"title",me))},Us=(me,ft)=>{var Ei,ri;let Jt=(ri=(Ei=e.store.callbacks)==null?void 0:Ei.uiInfo)==null?void 0:ri.onUpcomingLiveViewStateChanged;if(!Jt)return;let xi=!!ft,eo={...sn(n(so),{upcomingLiveScreen:ft},"upcomingLiveScreen",xi),...me};Jt(eo)};var xs=tT();nt("blur",Ca,Go);var bn=ce(xs);bn.__mousemove=Xi;var zs=C(bn);let ua=m(()=>a()==="ads"),cr=m(()=>n(Ci)?an:void 0);Ze(Kf(zs,{startDoubleForwardActivationTimer:lo,stopDoubleForward:Ji,toggleFullscreen:Tr,hideContextMenu:Go,showHotKeyHelpers:_n,showKeyMap:Ir,get isAds(){return n(ua)},get fakePlayButtonHandler(){return n(cr)},get nextButtonActive(){return Rt()},get prevButtonActive(){return G()},children:(me,ft)=>{var Jt=JC(),xi=ce(Jt);el(xi,{get hideCursor(){return n(ni)},onClick:Ro,onContextMenu:Yo,onMouseDown:dn,onMouseUp:Dn,onDblClick:co,get videoContainer(){return mt()},set videoContainer(ri){mt(ri)}});var eo=A(xi,2);Aa(eo,()=>"slot",!1,(ri,_i)=>{io(ri,()=>({name:Ja}))});var Ei=A(eo,2);Ps(Ei,Se,ri=>{var _i=ZC(),Vi=ce(_i);let Fn=m(()=>a()!=="thumb"||s()||Co&&e.autoplay);ja(Vi,{get hidden(){return n(Fn)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart},onContextMenu:Yo,onClick:Mo});var Er=A(Vi,2);{var yo=Fe=>{_v(Fe,{})};R(Er,Fe=>{Z()&&Fe(yo)})}var tl=A(Er,2);gv(tl,{});var il=A(tl,2);hv(il,{get isVisible(){return E()}});var ws=A(il,2);{var Kr=Fe=>{let mi=m(()=>{var Xo;return(Xo=e.live)==null?void 0:Xo.startTime});hc(Fe,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(mi)},onUpcomingLiveViewStateChanged:Us,onContextMenu:Yo,onClick:Mo})};R(ws,Fe=>{a()==="LiveWaitingStart"&&Fe(Kr)})}var Ws=A(ws,2);{var kr=Fe=>{Xa(Fe,{kind:"recover",get thumbUrl(){return e.thumbUrl},onContextMenu:Yo,onClick:Mo})};R(Ws,Fe=>{a()==="LiveWaitingRecover"&&Fe(kr)})}var ol=A(Ws,2);{var Ss=Fe=>{Xa(Fe,{kind:"record",get thumbUrl(){return e.thumbUrl},onContextMenu:Yo,onClick:Mo})};R(ol,Fe=>{a()==="LiveWaitingRecord"&&Fe(Ss)})}var $n=A(ol,2);{var nl=Fe=>{var mi=GC();let Xo;var Ar=C(mi);Od(Ar,{get adsSlotId(){return Vt()},get adsParams(){return dt()},get adsAutoplayParam(){return xt()},get duration(){return Qt()},get adsExternalApi(){return e.adsExternalApi}}),S(mi),O(yn=>Xo=se(mi,1,"ads-container s-9",null,Xo,yn),[()=>({hidden:a()!=="ads"})]),b(Fe,mi)};R($n,Fe=>{e.showAds&&pt()&&Fe(nl)})}var pa=A($n,2);{var Zl=Fe=>{let mi=m(()=>!Qe()&&e.showAutoplayNext&&x());Uf(Fe,{get title(){return Ce()},get thumb(){return le()},get isHide(){return n(mi)},clickCloseIcon:()=>D(Ao,!0)})};R(pa,Fe=>{n(gt)&&Ce()&&le()&&Fe(Zl)})}var rl=A(pa,2);{var Jl=Fe=>{let mi=m(()=>h()?"md":"sm"),Xo=m(()=>{var Ar;return(Ar=e.store.callbacks)==null?void 0:Ar.onTitleClicked});qm(Fe,{get title(){return e.title},get getVideoDeeplink(){return e.getVideoDeeplink},get isHidden(){return n(Sr)},onVisibilityChanged:Hs,onMouseEnter:()=>{D($o,!0)},onMouseLeave:()=>{D($o,!1)},get size(){return n(mi)},get onTitleClicked(){return n(Xo)},get ref(){return n(Bn)},set ref(Ar){D(Bn,Ar,!0)}})};R(rl,Fe=>{n(wr)&&Fe(Jl)})}var fa=A(rl,2);{var ed=Fe=>{let mi=m(()=>a()==="video"&&v());vc(Fe,{get isShifted(){return n(mi)}})};R(fa,Fe=>{j()&&Fe(ed)})}var sl=A(fa,2);{var Pr=Fe=>{var mi=YC(),Xo=C(mi);Rd(Xo,{}),S(mi),b(Fe,mi)};R(sl,Fe=>{ie()&&Fe(Pr)})}var ma=A(sl,2);{var al=Fe=>{gc(Fe,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return De()},onClick:Ro,onContextMenu:Yo,onDblClick:co})};R(ma,Fe=>{re()&&Fe(al)})}var va=A(ma,2);{var at=Fe=>{Ga(Fe,{get shifted(){return v()},get captions(){return it()},get position(){return U()},get playerSize(){return z()}})};R(va,Fe=>{Oe().value!=="off"&&Fe(at)})}var lt=A(va,2);{var Ri=Fe=>{var mi=jC();mi.__contextmenu=Yo,mi.__click=[QC,X,Ue,f,qt,Go];var Xo=C(mi);Ya(Xo,{}),S(mi),b(Fe,mi)};R(lt,Fe=>{s()&&Fe(Ri)})}var uo=A(lt,2);{var Ni=Fe=>{let mi=m(()=>a()==="thumb"||a()==="LiveWaitingStart"||a()==="LiveWaitingRecover"||a()==="LiveWaitingRecord"),Xo=m(()=>a()==="ads"),Ar=m(()=>e.canRewindLive&&Pe()!==0);fc(Fe,{get bottomHidden(){return n(mi)},get bottomNoSmooth(){return K()},get showControls(){return v()},get isAds(){return n(Xo)},get canRewindLive(){return n(Ar)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return Tt()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Mt()},get nextButtonActive(){return Rt()},get prevButtonActive(){return G()},get isOneVideoPlaylist(){return _e()},customFullscreenSupported:nr,toggleFullscreen:Tr,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return n(yr)},set playerControlsWrapperRef(yn){D(yr,yn,!0)},get playerControlsRef(){return n(jn)},set playerControlsRef(yn){D(jn,yn,!0)}})};R(uo,Fe=>{pt()&&Fe(Ni)})}var fi=A(uo,2);{var Hi=Fe=>{var mi=XC(),Xo=C(mi);let Ar=m(()=>{var yn;return(yn=n(jn))==null?void 0:yn.clientHeight});$c(Xo,{get supportLink(){return e.supportLink},get playerControlsHeight(){return n(Ar)},returnFocus:()=>{var yn;return(yn=ct())==null?void 0:yn.focus()},get ref(){return n(Vn)},set ref(yn){D(Vn,yn,!0)}}),S(mi),b(Fe,mi)};R(fi,Fe=>{!re()&&a()!=="ads"&&Fe(Hi)})}var Ks=A(fi,2);let td=m(()=>!n(Qo));Hd(Ks,{get isLive(){return ke()},get isHidden(){return n(td)},get isPlaying(){return He()},get position(){return U()},get duration(){return Pe()}});var Vc=A(Ks,2);Wm(Vc,{get data(){return ir}});var Rc=A(Vc,2);Hf(Rc,{get supportLink(){return e.supportLink},returnFocus:()=>{var Fe;return(Fe=ct())==null?void 0:Fe.focus()},get visible(){return X()},get playerContainerRef(){return n(so)},get position(){return tt()},get menuElementRef(){return n(No)},set menuElementRef(Fe){D(No,Fe,!0)}});var Nc=A(Rc,2);{var ll=Fe=>{yc(Fe,{onClose:Jn,onSelectAutoQuality:()=>{Ln("auto"),Jn()}})};R(Nc,Fe=>{n(Zt)&&Fe(ll)})}var Dc=A(Nc,2);{var ga=Fe=>{bv(Fe,{})};R(Dc,Fe=>{ye()&&Fe(ga)})}var ha=A(Dc,2);{var hp=Fe=>{Fa(Fe,{})};R(ha,Fe=>{n(Ur)&&Fe(hp)})}var id=A(ha,2);{var od=Fe=>{Gf(Fe,{})};R(id,Fe=>{Ie()&&Fe(od)})}var Oc=A(id,2);{var _p=Fe=>{qd(Fe,{})};R(Oc,Fe=>{Be()&&Fe(_p)})}b(ri,_i)}),b(me,Jt)},$$slots:{default:!0}}),me=>ct(me),()=>ct());var ss=A(zs,2);Ze(ss,me=>D(Ko,me),()=>n(Ko)),S(bn),Ze(bn,me=>D(so,me),()=>n(so));var ut=A(bn,2);{var li=me=>{var ft=eT();b(me,ft)};R(ut,me=>{Lt()&&me(li)})}nt("mouseenter",bn,Vo),nt("mouseleave",bn,Wr),nt("click",bn,Ge,!0),nt("focusin",bn,Nn,!0),b(t,xs),F(),o()}Ye(["mousemove","contextmenu","click"]);import{clientChecker as wc,PlaybackState as pT}from"@vkontakte/videoplayer-core/es2018";import{noop as fT}from"@vkontakte/videoplayer-shared/es2018";var oT=M('<div></div> <div class="info s-l"><div class="triangles-wrapper s-l"><div></div> <div></div> <div></div></div> <p class="step-caption s-l"> </p></div>',1),nT=M("<div><!></div>"),rT={hash:"s-l",code:".double-click-area.s-l{height:100%;overflow:hidden;position:absolute;top:0;width:25%}.double-click-area.left.s-l{left:0}.double-click-area.right.s-l{right:0}.semicircle.s-l{background-color:rgba(0,0,0,.5);height:100%;position:absolute;top:0;width:100%}.semicircle.left.s-l{border-bottom-right-radius:50%;border-top-right-radius:50%;left:0}.semicircle.right.s-l{border-bottom-left-radius:50%;border-top-left-radius:50%;right:0}.info.s-l{align-items:center;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.info.s-l,.triangles-wrapper.s-l{display:flex;justify-content:center}.triangles-wrapper.s-l{margin-bottom:10px;position:relative}.triangle.s-l{animation:s-l-blink .5s infinite;border-bottom:6px solid transparent;border-top:6px solid transparent;height:0;opacity:0;width:0}.triangle.left.s-l:nth-child(3),.triangle.right.s-l:first-child{animation-delay:0s}.triangle.left.s-l:nth-child(2),.triangle.right.s-l:nth-child(2){animation-delay:.1s}.triangle.left.s-l:first-child,.triangle.right.s-l:nth-child(3){animation-delay:.2s}@keyframes s-l-blink{0%{opacity:0}50%{opacity:1}to{opacity:0}}.triangle.left.s-l{border-right:8px solid var(--white)}.triangle.right.s-l{border-left:8px solid var(--white)}.triangle.s-l:not(:last-child){margin-right:5px}.step-caption.s-l{color:var(--white);font-size:12px;line-height:1;margin:0;text-align:center}"};function sp(t,e){B(e,!0),Q(t,rT);let i=g(e,"seekStep",3,0),o=W(!1),r=0,a=0,l=W(si(i())),d=p=>{p.stopPropagation(),a+=1,D(l,i()*(a-1)),a===1?e.handleSingleFirstClick(p):(D(o,!0),e.handleSecondClick()),window.clearTimeout(r),r=window.setTimeout(()=>{a=0,D(o,!1)},300)};pn(()=>{window.clearTimeout(r)});var s=nT();s.__click=d;var u=C(s);{var f=p=>{var v=oT(),$=ce(v),y=A($,2),h=C(y),x=C(h),I=A(x,2),T=A(I,2);S(h);var N=A(h,2),L=C(N,!0);S(N),S(y),O(E=>{var k,K,H,z;se($,1,`semicircle ${(k=e.side)!=null?k:""}`,"s-l"),se(x,1,`triangle ${(K=e.side)!=null?K:""}`,"s-l"),se(I,1,`triangle ${(H=e.side)!=null?H:""}`,"s-l"),se(T,1,`triangle ${(z=e.side)!=null?z:""}`,"s-l"),ve(L,E)},[()=>Y("doubletap_seek_step",{seconds:n(l).toFixed(0)})]),b(p,v)};R(u,p=>{n(o)&&p(f)})}S(s),O(()=>{var p;return se(s,1,`double-click-area ${(p=e.side)!=null?p:""}`,"s-l")}),b(t,s),F()}Ye(["click"]);var sT=(t,e,i)=>{e(!1),i()},aT=M('<div class="overlay s-h"></div> <div class="next-video s-h"><div class="top s-h"><div class="caption s-h"> </div> <!></div> <div class="row s-h"><div class="column s-h"><div class="thumb s-h"><div></div> <!></div></div> <div class="column s-h"><div class="title s-h"> </div></div></div></div>',1),lT={hash:"s-h",code:".overlay.s-h{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-h{display:flex;flex-direction:column;left:50%;margin:0 auto;max-width:362px;min-width:320px;padding-bottom:12px;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:var(--end-screen-mobile-z-index)}.top.s-h{display:flex;justify-content:space-between}.caption.s-h{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-h{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-h{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-h{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-h,.thumb-overlay.s-h{height:100%;width:100%}.thumb-overlay.s-h{position:absolute}.thumb-overlay.withOpacity.s-h{background:var(--black);opacity:.3}.title.s-h{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function yv(t,e){B(e,!0),Q(t,lT);let[i,o]=Ve(),r=()=>w(d,"$autoplayNextEnabled$",i),a=()=>w(s,"$timerNextVideoRunning$",i),l=ge(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,f=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,v=l.actions.internal.nextVideoAnnouncementAuto,$=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{u(!1),v()},h=()=>{e.clickCloseIcon(),$()};Et(()=>{e.isHide||f(),e.isHide&&r()&&(u(!1),v())});var x=Ae(),I=ce(x);{var T=N=>{var L=aT(),E=A(ce(L),2),k=C(E),K=C(k),H=C(K,!0);S(K);var z=A(K,2);Vs(z,{onClick:h}),S(k);var j=A(k,2);j.__click=[sT,u,p];var ae=C(j),X=C(ae),ne=C(X);let J;var we=A(ne,2);{var pe=ee=>{Qd(ee,{get isRunning(){return a()},onTimerEnded:y})};R(we,ee=>{r()&&ee(pe)})}S(X),S(ae);var re=A(ae,2),be=C(re),$e=C(be,!0);S(be),S(re),S(j),S(E),O((ee,Re)=>{ve(H,ee),qe(X,`background-image: url('${e.thumb}')`),J=se(ne,1,"thumb-overlay s-h",null,J,Re),ve($e,e.title)},[()=>r()?Y("end_screen_next_video"):Y("end_screen_recommended_video"),()=>({withOpacity:r()})]),b(N,L)};R(I,N=>{e.isHide||N(T)})}b(t,x),F(),o()}Ye(["click"]);import{clientChecker as dT}from"@vkontakte/videoplayer-core/es2018";var Pb=({getFullscreenTarget:t,fullScreenChangeHandler:e})=>{let i=null,o;Et(()=>{dT.device.isIOS&&(o=setTimeout(()=>{let a=t().querySelector("video");if(!a)return;let l=()=>e(!0),d=()=>e(!1);a.addEventListener("webkitbeginfullscreen",l),a.addEventListener("webkitendfullscreen",d),i=()=>{a.removeEventListener("webkitbeginfullscreen",l),a.removeEventListener("webkitendfullscreen",d)}},0))}),pn(()=>{i==null||i(),clearTimeout(o)})};import{VideoFormat as cT}from"@vkontakte/videoplayer-core/es2018";var ap=class{constructor(e){this.video=e}getTracksArray(){return Array.from(this.video.getElementsByTagName("track"))}attach(e,i=!1){let o=document.createElement("track");o.setAttribute("src",e.url),o.setAttribute("id",e.id),e.label&&o.setAttribute("label",e.label),e.language&&o.setAttribute("srclang",e.language),i&&(o.track.mode="showing"),this.video.appendChild(o)}detachAll(){for(let e of this.getTracksArray())this.video.removeChild(e)}updateSrc(e){let i=this.getTracksArray().find(o=>o.id===e.id);i&&(i.src=e.url)}getCurrentShowingId(){var e,i;return(i=(e=this.getTracksArray().find(o=>o.track.mode==="showing"))==null?void 0:e.id)!=null?i:null}};import{clientChecker as uT}from"@vkontakte/videoplayer-core/es2018";var Ab=({store:t,getFullscreenTarget:e})=>{let{isFullscreen:i}=t.ui,{setSubtitle:o}=t.actions.internal,{currentSubtitle$:r,availableSubtitlesList$:a,currentFormat$:l,availableTextTracks$:d}=t.state,s=null,u=()=>e().querySelector("video"),f=()=>uT.device.isIOS&&he(l)===cT.DASH_LIVE_CMAF,p=()=>{s==null||s(),s=null},v=$=>{if(p(),!f()||!$)return;let y=u();if(!y)return;let h=new ap(y),x=he(d),I=he(a),T=he(r);for(let E of x)I.some(K=>K.value===E.id)&&h.attach(E,T.value===E.id);let N=d.subscribe(E=>{for(let k of E)h.updateSrc(k)}),L=()=>{let E=h.getCurrentShowingId();o(he(a).find(k=>k.value===E))};y.textTracks.addEventListener("change",L),s=()=>{N(),h.detachAll(),y.textTracks.removeEventListener("change",L)}};Et(()=>i.subscribe(v)),pn(p)};var mT=(t,e,i,o)=>{if(t.stopPropagation(),e()){o();return}},vT=M("<!> <!>",1),gT=M("<div><!></div>"),hT=M('<div class="spherical-video-icon s-8"><!></div>'),_T=M("<div><!></div>"),bT=M('<div class="settings-mobile s-8"><!></div>'),$T=M("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),yT=M('<div class="player-wrapper s-8" role="region" tabindex="-1"><!> <!> <!> <div class="overlay-container"></div></div>'),xT={hash:"s-8",code:".player-wrapper.s-8{height:100%;position:absolute;width:100%}.player-wrapper.s-8 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.spherical-video-icon.s-8{display:inline-block;left:calc(50% - 38px);position:absolute;top:calc(50% - 23px)}.ads-container.s-8{background:var(--black);height:100%;left:0;position:absolute;top:0;width:100%;z-index:var(--ads-container-z-index)}.settings-mobile.s-8{align-items:center;display:flex;left:50%;max-width:320px;position:absolute;top:50%;transform:translate(-50%,-50%);transition:opacity var(--controls-transition-duration);width:90%;z-index:var(--settings-menu-z-index)}"};function xv(t,e){var Sr,Ao;B(e,!0),Q(t,xT);let[i,o]=Ve(),r=()=>w(Me,"$playerPhase",i),a=()=>w(vi,"$isLoaderVisible",i),l=()=>w(Ce,"$adPlaybackState",i),d=()=>w(Yi,"$crashed",i),s=()=>w(is,"$notificationsToShow$",i),u=()=>w(G,"$playbackState$",i),f=()=>w(Tt,"$graphIsOpened$",i),p=()=>w(ze,"$interactiveHideMobileControls",i),v=()=>w(Qi,"$isEnded$",i),$=()=>w(Yt,"$isInteractiveExpectation$",i),y=()=>w(pt,"$controlsVisible",i),h=()=>w(st,"$touched",i),x=()=>w(Fi,"$autoplayNextEnabled$",i),I=()=>w(pi,"$postrollPassed",i),T=()=>w(Mn,"$bottomNoSmooth",i),N=()=>w(gi,"$videoSize",i),L=()=>w(wt,"$playerSize",i),E=()=>w(rt,"$isFullscreen",i),k=()=>w(le,"$position$",i),K=()=>w(_e,"$duration$",i),H=()=>w(gn,"$loadedMetadata",i),z=()=>w(Qe,"$settingsMenuVisible",i),j=()=>w(Nt,"$scrubbingInProgress",i),ae=()=>w(Ht,"$volumeChangingInProgress",i),X=()=>w(Pt,"$chromecastConnected$",i),ne=()=>w(ue,"$isControlsAvailable",i),J=()=>w(yi,"$isInteractiveTime$",i),we=()=>w(qt,"$isActiveLive",i),pe=()=>w(ct,"$settingsMenuOpenedByKeyboard",i),re=()=>w(Rt,"$language$",i),be=()=>w(zt,"$disabledControls$",i),$e=()=>w(Dt,"$is3DVideo",i),ee=()=>w(q,"$icon3DVideoVisible",i),Re=()=>w(di,"$chromecastDeviceName$",i),fe=()=>w(So,"$currentSubtitle$",i),P=()=>w(Ho,"$currentSubtitleCaptions$",i),We=()=>w(Uo,"$realDuration$",i),Se=()=>w($t,"$isLive$",i),Z=()=>w(ci,"$isPlaying$",i),ie=()=>w(Gt,"$debugPanelVisible",i),De=g(e,"videoContainer",15),Oe=g(e,"adsSlotId",3,void 0),it=g(e,"adsParams",3,void 0),U=g(e,"adsAutoplayParam",3,void 0),Pe=g(e,"duration",3,void 0),ke=g(e,"logoTargetUrl",3,""),He=g(e,"showNextPrevButtons",3,!1),tt=g(e,"nextButtonActive",3,!1),ye=g(e,"prevButtonActive",3,!1),Ie=g(e,"endScreenVideoTitle",3,void 0),Be=g(e,"endScreenVideoThumb",3,void 0),Lt=g(e,"isOneVideoPlaylist",3,!1),mt=g(e,"showMiniTimer",3,!1),Vt=g(e,"fullScreenTarget",3,void 0),dt=g(e,"playerStarted",3,!1),xt=g(e,"showEndScreen",3,!0),{notifications$:Qt,graphIsOpened$:Tt}=wo(),Mt=e.store.getLogger().createComponentLog("Root component"),Rt=e.store.interfaceLanguage$,G=e.store.state.playbackState$,Ce=e.store.ads.playbackState,le=e.store.state.positionWithScrubbing$,_e=e.store.state.duration$,Me=e.store.playerPhase,rt=e.store.ui.isFullscreen,pt=e.store.ui.controlsVisible,ue=e.store.ui.isControlsAvailable,ze=e.store.ui.interactiveHideMobileControls,Qe=e.store.ui.settingsMenu.visible$,ct=e.store.ui.settingsMenu.openedByBtnKeyboard$,Nt=e.store.ui.scrubbingInProgress,Ht=e.store.ui.volumeChangingInProgress,Gt=e.store.ui.debugPanelVisible,vi=e.store.state.isLoaderVisible,Qi=e.store.state.isEnded$,Pt=e.store.state.chromecastConnected$,di=e.store.state.chromecastDeviceName$,pi=e.store.ads.postrollPassed,$t=e.store.state.isLive$,ci=e.store.state.isPlaying$,qt=e.store.state.isActiveLive$,Gi=e.store.state.isRewindableLive$,Yi=e.store.state.crashed$,ot=e.store.webApi.annotationsApi,Ue=e.store.webApi.pictureInPictureApi,gi=e.store.state.videoSize$,So=e.store.state.currentSubtitle$,Ho=e.store.state.currentSubtitleCaptions$,Uo=e.store.state.duration$,wt=e.store.ui.playerSize,Dt=e.store.ui.is3DVideo,q=e.store.ui.icon3DVideoVisible,yt=e.store.state.isInteractive,yi=e.store.state.isInteractiveTime$,Yt=e.store.state.isInteractiveExpectation$,Ke=e.store.state.hasInteractiveBranches,zt=e.store.ui.controls.disabledControls$,st=e.store.ui.touched,Pi=e.store.ui.overlayContainer$,Fi=e.store.ui.autoplayNextEnabled$,gn=e.store.state.loadedMetadata$,Co=e.store.actions.internal.closeSettingsMenu,ro=(Sr=e.store.callbacks)==null?void 0:Sr.onDisabledPlayPrevChapterClick,go=(Ao=e.store.callbacks)==null?void 0:Ao.onDisabledSeekToInteractiveClick,zo=e.store.actions.internal.setQuality,ho=W(void 0),To=W(void 0),Wo=W(void 0),Ai=W(void 0),Io,An,Or=m(()=>(r()==="video"&&a()||r()==="ads"&&l()==="inactive")&&!d()),Ln=W(void 0),{closeNotification:bs,notificationsToShow$:is}=Qt,$s=m(()=>!!s().slow_video),Br=()=>bs("slow_video"),Mn=de(!1),Fr,Eo=W(!1),Hr=m(()=>u()!==pT.PLAYING),ko=W(!1),$r=m(()=>f()||p()||!n(Eo)&&(v()&&!!Ke||n(Hr)&&$())),hn=W(!0),os=m(()=>e.uiConfig.features.thumbTimer&&mt()&&r()==="video"&&!y()&&!d()&&!yt&&(e.uiConfig.hideThumbTimerAfterTouch&&!h()||!e.uiConfig.hideThumbTimerAfterTouch)),Yn=W(!1),so=m(()=>(xt()||e.showAutoplayNext&&x())&&!!Ie()&&!!Be()&&(e.showAds&&I()||!e.showAds)&&v()&&!d()&&!n(Yn)),yr=W(!1);Ue==null||Ue.setContext(ld());let jn=gt=>{gt&&!yt&&_o(e.uiConfig.controls.hideTimeoutMobile)};e.store.setUiCallbacks({onStarted:jn});let Vn=()=>{clearTimeout(Io),D(Eo,!1),p()&&ze.set(!1)},_o=gt=>{Vn(),D(Eo,!0),Io=setTimeout(()=>D(Eo,!1),gt);let ni=gt-100;Fr=setTimeout(()=>{T()&&Mn.set(!1)},ni>0?ni:gt)},Xn=Dt.subscribe(gt=>{q.set(gt),gt&&(clearTimeout(An),An=setTimeout(()=>q.set(!1),e.uiConfig.controls.hide360IconTimeout))}),Zn=async(gt=oa())=>{var ni,jt,Ci,an,Li,ji;if(gt&&!wc.device.isIOS){let Lo=Nd(),sr=Ko(),ar=wc.browser.isSamsungBrowser&&Lo===e.shadowRootContainer;gt=Lo===sr||ar}if(gt){_o(e.uiConfig.controls.hideTimeoutFullscreen);try{await(Ue==null?void 0:Ue.exit())}catch(Lo){Mt({message:String(Lo)})}try{let Lo=(ni=N())!=null&&ni.width&&((jt=N())!=null&&jt.height)?N():L();await $_(Lo)}catch(Lo){Mt({message:String(Lo)})}}rt.set(gt),e.store.getAdmanWrapper().setFullscreen(gt),E()?(an=(Ci=e.store.callbacks)==null?void 0:Ci.onFullscreenEnter)==null||an.call(Ci):(ji=(Li=e.store.callbacks)==null?void 0:Li.onFullscreenExit)==null||ji.call(Li)},ns=gt=>{let ni=gt,{width:jt,height:Ci}=ni.target;wt.set({width:jt,height:Ci})},vt=()=>{let{width:gt,height:ni}=n(ho).getBoundingClientRect();wt.set({width:gt,height:ni})};Et(()=>{var gt;return Lu(Zn),e.uiConfig.features.annotationsInside&&(ot==null||ot.init(n(ho))),Na(Ue)&&(Ue==null||Ue.assignPlayerContainer(n(ho)),Ue==null||Ue.setExternalEventHandlers({resize:ns,leavepictureinpicture:vt})),D(hn,!wc.device.isIphoneOrOldIpad),e.interactiveContainer&&((gt=De().parentElement)==null||gt.insertBefore(e.interactiveContainer,De().nextSibling)),()=>{clearTimeout(Io),clearTimeout(Fr),clearTimeout(An),Xn(),Ue==null||Ue.dispose().catch(ni=>{Mt({message:String(ni)})}),Mu(Zn)}});let Zt=W(!0),Jn=W(!0),Ur=gt=>{let ni=k()+(gt==="forward"?1:-1)*e.uiConfig.controls.seekStepMobile/1e3;ni<0?(D(Zt,!1),ni=0):ni>=K()&&(D(Jn,!1),ni=K()),D(ko,!0),e.seekTime(ni)},Ko=()=>wc.device.isIOS?n(ho):!e.uiConfig.allowChangingFullscreenTarget||!Vt()?e.outerContainerRef:Vt().contains(e.outerContainerRef)?Vt():e.outerContainerRef,er=async()=>{try{if(oa())await Au(document),Mt({message:"exit fullscreen"});else{if(Mt({message:"request fullscreen"}),wc.device.isIOS&&!H())return;await Pu(Ko())}}catch(gt){Mt({message:String(gt)})}},tr=()=>{Co()},bo=gt=>{if(gt.preventDefault(),z()){tr();return}if(!dt()){e.firstStart(),_o(e.uiConfig.controls.hideTimeoutCursor);return}D(ko,!1),y()?Vn():_o(e.uiConfig.controls.hideTimeoutMobile)},ir=()=>{st.set(!0)},or=()=>{yt||(Mn.set(!0),_o(e.uiConfig.controls.hideTimeoutCursor))},Rn=gt=>{ro&&(ro(gt),_o(e.uiConfig.controls.hideTimeoutMobile))},Po=gt=>{go&&(go(gt),_o(e.uiConfig.controls.hideTimeoutMobile))};Ne(()=>{Pi.set(n(Ln))}),Ne(()=>{pt.set((n(Hr)||z()||j()||ae()||X()||!n(so)&&(v()||n(Eo)&&!n(ko)))&&!n($r)&&r()==="video"&&!d()&&ne())}),Ne(()=>{!j()&&n(yr)&&!J()&&_o(e.uiConfig.controls.hideTimeoutMobile),D(yr,j(),!0)}),Ne(()=>{D(Zt,k()>0),D(Jn,!we()&&k()<K(),!0)}),Ne(()=>{zd(n(Ai),z(),pe(),!0)});let qo=Y("aria_label_video_player");Pb({fullScreenChangeHandler:Zn,getFullscreenTarget:Ko}),Ab({store:e.store,getFullscreenTarget:Ko});let xr=(gt,ni)=>{var Li,ji;let jt=(ji=(Li=e.store.callbacks)==null?void 0:Li.uiInfo)==null?void 0:ji.onUpcomingLiveViewStateChanged;if(!jt)return;let Ci=!!ni,an={...sn(n(ho),{upcomingLiveScreen:ni},"upcomingLiveScreen",Ci),...gt};jt(an)};var Ii=yT();nt("blur",Ca,tr);var nr=C(Ii);el(nr,{onClick:bo,get videoContainer(){return De()},set videoContainer(gt){De(gt)}});var Qo=A(nr,2);Aa(Qo,()=>"slot",!1,(gt,ni)=>{io(gt,()=>({name:Ja}))});var rr=A(Qo,2);Ps(rr,re,gt=>{var ni=$T(),jt=ce(ni);let Ci=m(()=>r()!=="thumb"||d()||yt&&e.autoplay||e.uiConfig.features.disableThumbUnstartedOnAutoplay&&e.autoplay);ja(jt,{get hidden(){return n(Ci)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var an=A(jt,2);{var Li=Ge=>{var Xt=vT(),Ti=ce(Xt);{var No=$o=>{let dr=m(()=>e.uiConfig.controls.seekStepMobile/1e3);sp($o,{side:"left",get seekStep(){return n(dr)},handleSingleFirstClick:bo,handleSecondClick:()=>Ur("backward")})};R(Ti,$o=>{n(Zt)&&$o(No)})}var jo=A(Ti,2);{var On=$o=>{let dr=m(()=>e.uiConfig.controls.seekStepMobile/1e3);sp($o,{side:"right",get seekStep(){return n(dr)},handleSingleFirstClick:bo,handleSecondClick:()=>Ur("forward")})};R(jo,$o=>{n(Jn)&&$o(On)})}b(Ge,Xt)};R(an,Ge=>{e.canRewindLive&&Gi&&!be().has("TIMELINE")&&Ge(Li)})}var ji=A(an,2);{var Lo=Ge=>{let Xt=m(()=>{var Ti;return(Ti=e.live)==null?void 0:Ti.startTime});hc(Ge,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(Xt)},onUpcomingLiveViewStateChanged:xr})};R(ji,Ge=>{r()==="LiveWaitingStart"&&Ge(Lo)})}var sr=A(ji,2);{var ar=Ge=>{Xa(Ge,{kind:"recover",get thumbUrl(){return e.thumbUrl}})};R(sr,Ge=>{r()==="LiveWaitingRecover"&&Ge(ar)})}var Mi=A(sr,2);{var ys=Ge=>{Xa(Ge,{kind:"record",get thumbUrl(){return e.thumbUrl}})};R(Mi,Ge=>{r()==="LiveWaitingRecord"&&Ge(ys)})}var zr=A(Mi,2);{var rs=Ge=>{var Xt=gT();let Ti;var No=C(Xt);Od(No,{get adsSlotId(){return Oe()},get adsParams(){return it()},get adsAutoplayParam(){return U()},get duration(){return Pe()},get adsExternalApi(){return e.adsExternalApi}}),S(Xt),O(jo=>Ti=se(Xt,1,"ads-container s-8",null,Ti,jo),[()=>({hidden:r()!=="ads"})]),b(Ge,Xt)};R(zr,Ge=>{e.showAds&&dt()&&Ge(rs)})}var Cr=A(zr,2);{var ln=Ge=>{let Xt=m(()=>!xt()&&e.showAutoplayNext&&x());yv(Ge,{get title(){return Ie()},get thumb(){return Be()},get isHide(){return n(Xt)},clickCloseIcon:()=>D(Yn,!0)})};R(Cr,Ge=>{n(so)&&Ie()&&Be()&&Ge(ln)})}var lr=A(Cr,2);{var Mo=Ge=>{vc(Ge,{})};R(lr,Ge=>{$e()&&Ge(Mo)})}var Go=A(lr,2);{var Tr=Ge=>{var Xt=hT(),Ti=C(Xt);Rd(Ti,{}),S(Xt),b(Ge,Xt)};R(Go,Ge=>{ee()&&Ge(Tr)})}var Yo=A(Go,2);{var Vo=Ge=>{gc(Ge,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return Re()},onClick:bo})};R(Yo,Ge=>{X()&&Ge(Vo)})}var Nn=A(Yo,2);{var Wr=Ge=>{Ga(Ge,{get shifted(){return y()},get captions(){return P()},get position(){return k()},get playerSize(){return L()},isMobile:!0})};R(Nn,Ge=>{fe().value!=="off"&&Ge(Wr)})}var je=A(Nn,2);{var It=Ge=>{var Xt=_T();Xt.__click=[mT,z,Qe,tr];var Ti=C(Xt);Ya(Ti,{}),S(Xt),b(Ge,Xt)};R(je,Ge=>{d()&&Ge(It)})}var hi=A(je,2);{var ao=Ge=>{let Xt=m(()=>r()==="thumb"||r()==="LiveWaitingStart"||r()==="LiveWaitingRecover"||r()==="LiveWaitingRecord"||r()==="ads"),Ti=m(()=>r()==="ads"),No=m(()=>e.canRewindLive&&We()!==0);fc(Ge,{get bottomHidden(){return n(Xt)},get showControls(){return y()},get bottomNoSmooth(){return T()},get isAds(){return n(Ti)},get canRewindLive(){return n(No)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return ke()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return He()},get nextButtonActive(){return tt()},get prevButtonActive(){return ye()},get isOneVideoPlaylist(){return Lt()},get customFullscreenSupported(){return n(hn)},get endScreenShown(){return n(so)},toggleFullscreen:er,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},onDisabledPlayPrevChapterClick:Rn,onDisabledSeekToInteractiveClick:Po,get playerControlsWrapperRef(){return n(To)},set playerControlsWrapperRef(jo){D(To,jo,!0)},get playerControlsRef(){return n(Wo)},set playerControlsRef(jo){D(Wo,jo,!0)}})};R(hi,Ge=>{dt()&&Ge(ao)})}var Xi=A(hi,2);{var Zi=Ge=>{var Xt=bT(),Ti=C(Xt);$c(Ti,{get supportLink(){return e.supportLink},get returnFocus(){return fT},get ref(){return n(Ai)},set ref(No){D(Ai,No,!0)}}),S(Xt),b(Ge,Xt)};R(Xi,Ge=>{z()&&Ge(Zi)})}var lo=A(Xi,2);let Ji=m(()=>!n(os));Hd(lo,{get isLive(){return Se()},get isHidden(){return n(Ji)},get isPlaying(){return Z()},get position(){return k()},get duration(){return K()}});var dn=A(lo,2);{var Dn=Ge=>{Fa(Ge,{})};R(dn,Ge=>{n(Or)&&Ge(Dn)})}var co=A(dn,2);{var Ro=Ge=>{qd(Ge,{})};R(co,Ge=>{ie()&&Ge(Ro)})}var _n=A(co,2);{var Ir=Ge=>{yc(Ge,{onClose:Br,onSelectAutoQuality:()=>{zo("auto"),Br()}})};R(_n,Ge=>{n($s)&&Ge(Ir)})}b(gt,ni)});var wr=A(rr,2);Ze(wr,gt=>D(Ln,gt),()=>n(Ln)),S(Ii),Ze(Ii,gt=>D(ho,gt),()=>n(ho)),O(()=>Le(Ii,"aria-label",qo)),nt("click",Ii,ir,!0),nt("focusin",Ii,or,!0),b(t,Ii),F(),o()}Ye(["click"]);function lp(t){let e="";return no(t.timelineSliderFilledColor)&&(e+=`--timeline-slider-filled-bg:${t.timelineSliderFilledColor};`),no(t.timelineSliderHandleColor)&&(e+=`--timeline-slider-handle-bg:${t.timelineSliderHandleColor};`),no(t.timelineSliderLoadedColor)&&(e+=`--timeline-slider-loaded-bg:${t.timelineSliderLoadedColor};`),no(t.timelineSliderColor)&&(e+=`--timeline-slider-bg:${t.timelineSliderColor};`),no(t.volumeSliderColor)&&(e+=`--volume-slider-bg:${t.volumeSliderColor};`),no(t.volumeSliderHandleColor)&&(e+=`--volume-slider-handle-bg:${t.volumeSliderHandleColor};`),no(t.volumeSliderFilledColor)&&(e+=`--volume-slider-filled-bg:${t.volumeSliderFilledColor};`),no(t.controlsTimeColor)&&(e+=`--controls-time:${t.controlsTimeColor};`),no(t.timelineSliderFilledActiveLiveColor)&&(e+=`--timeline-slider-filled-active-live-bg:${t.timelineSliderFilledActiveLiveColor};`),no(t.timelineSliderHandleActiveLiveColor)&&(e+=`--timeline-slider-handle-active-live-bg:${t.timelineSliderHandleActiveLiveColor};`),no(t.buttonColor)&&(e+=`--btn-color:${t.buttonColor};`),no(t.buttonToggleOnColor)&&(e+=`--toggle-color-on:${t.buttonToggleOnColor};`,e+=`--toggle-color-autoplay-on:${t.buttonToggleOnColor};`),no(t.focusedColor)&&(e+=`--focused:${t.focusedColor};`),no(t.focusedOutlineWidth)&&(e+=`--focused-outline-width:${t.focusedOutlineWidth};`),no(t.focusedOutlineRadius)&&(e+=`--focused-outline-radius:${t.focusedOutlineRadius};`),no(t.controlsDesktopPaddingHorizontal)&&(e+=`--controls-desktop-padding-horizontal:${t.controlsDesktopPaddingHorizontal};`),no(t.timelinePaddingHorizontal)&&(e+=`--timeline-padding-horizontal:${t.timelinePaddingHorizontal};`),no(t.settingsBackgroundColor)&&(e+=`--settings-bg:${t.settingsBackgroundColor};`),no(t.font)&&(e+=`--font:${t.font};`),no(t.controlsGradientHeight)&&(e+=`--controls-gradient-height:${t.controlsGradientHeight};`),no(t.controlsGradient)&&(e+=`--controls-gradient:${t.controlsGradient};`),e.length&&e||void 0}function no(t){return typeof t=="string"&&!t.includes(";")}import{debounceFn as wT}from"@vkontakte/videoplayer-shared/es2018";var ST=M('<div class="time-container s-7"><!></div>'),CT=M('<div class="player-wrapper s-7" role="region"><!> <!> <!> <!> <!> <div><!></div></div>'),TT={hash:"s-7",code:".player-wrapper.s-7{height:100%;position:absolute;width:100%}.player-wrapper.s-7 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.timeline.s-7{bottom:0;left:0;opacity:0;opacity:1;position:absolute;transition:opacity var(--controls-transition-duration) var(--controls-transition-fn);width:100%;z-index:var(--controls-container-z-index)}.visible.s-7{opacity:1}.time-container.s-7{bottom:8px;position:absolute;right:8px;z-index:var(--thumb-timer-z-index)}"};function wv(t,e){B(e,!0),Q(t,TT);let[i,o]=Ve(),r=()=>w(J,"$scrubbingInProgress",i),a=()=>w(X,"$playerSize",i),l=()=>w(k,"$isPlaying$",i),d=()=>w(L,"$duration$",i),s=()=>w(z,"$positionWithScrubbing$",i),u=()=>w(T,"$playerPhase",i),f=()=>w(N,"$crashed$",i),p=()=>w(K,"$currentSubtitle$",i),v=()=>w(H,"$currentSubtitleCaptions$",i),$=()=>w(E,"$positionExact$",i),y=()=>w(j,"$isLive$",i),h=()=>w(ae,"$isRewindableLive$",i),x=g(e,"outsideDuration",3,0),I=g(e,"videoContainer",15),{playerPhase:T,state:{crashed$:N,duration$:L,positionExact$:E,isPlaying$:k,currentSubtitle$:K,currentSubtitleCaptions$:H,positionWithScrubbing$:z,isLive$:j,isRewindableLive$:ae},ui:{playerSize:X,controls:ne,scrubbingInProgress:J},actions:{internal:{getVideoElement:we}}}=ge(),pe=8,re=W(!1),be=si({}),$e=W(!1),ee=m(()=>!r()&&!n($e)),Re=()=>{D(re,!0)},fe=()=>{D(re,!1)},P=wT(ql,260);Ne(()=>{a(),P(we(),ne,be,n(re))});let We=m(()=>l()?rn(d()-s()):rn(isFinite(d())?d():x()));var Se=CT(),Z=C(Se);el(Z,{hideCursor:!1,get videoContainer(){return I()},set videoContainer(Ie){I(Ie)}});var ie=A(Z,2);Aa(ie,()=>"slot",!1,(Ie,Be)=>{io(Ie,()=>({name:Ja}))});var De=A(ie,2);let Oe=m(()=>u()!=="thumb"||f());ja(De,{get hidden(){return n(Oe)},get thumbUrl(){return e.thumbUrl},iconVisible:!1});var it=A(De,2);{var U=Ie=>{Ga(Ie,{shifted:!1,get captions(){return v()},get position(){return $()},get playerSize(){return a()}})};R(it,Ie=>{p().value!=="off"&&n(ee)&&Ie(U)})}var Pe=A(it,2);{var ke=Ie=>{var Be=ST(),Lt=C(Be);Fd(Lt,{get isLive(){return y()},get isPlaying(){return l()},get time(){return n(We)}}),S(Be),b(Ie,Be)};R(Pe,Ie=>{n(ee)&&Ie(ke)})}var He=A(Pe,2);let tt;var ye=C(He);qa(ye,{get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return h()},isAds:!1,needPadding:!1,isHidden:!1,withEpisodes:!1,tooltipLeftOffset:pe,tooltipRightOffset:pe,get ref(){return be.timeline},set ref(Ie){be.timeline=Ie}}),S(He),S(Se),O(Ie=>tt=se(He,1,"timeline s-7",null,tt,Ie),[()=>({visible:n(re)})]),nt("mouseenter",Se,Re),nt("mouseleave",Se,fe),nt("mouseenter",He,()=>D($e,!0)),nt("mouseleave",He,()=>D($e,!1)),b(t,Se),F(),o()}var AT=M("<div><!></div>"),LT={hash:"s-2",code:'.vk-vp-root.s-2{--white:#fff;--black:#000;--red:#ff3347;--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;--controls-height:40px;--controls-gradient-height:100px;--controls-transition-duration:0.25s;--controls-transition-fn:cubic-bezier(0.455,0.03,0.515,0.955);--controls-desktop-item-margin-left:4px;--controls-desktop-padding-horizontal:4px;--focused:var(--white);--focused-outline-width:2px;--focused-outline-radius:0;--focused-element-shadow:inset 0 0 0 var(--focused-outline-width) var(--focused);--focused-slider-shadow:0 0 0 2px var(--focused);--big-play-size:96px;--big-play-radius:50%;--big-play-bg-color:rgba(0,0,0,.5);--big-play-hover-bg-color:rgba(0,0,0,.6);--big-play-icon-width:38px;--big-play-icon-height:33px;--interactive-episode-complete:#5c9ce6;--slider-bg:hsla(0,0%,100%,.4);--slider-filled-bg:var(--white);--slider-handle-bg:var(--white);--slider-loaded-bg:hsla(0,0%,100%,.4);--slider-height:3px;--slider-video-episode-gap:1.5px;--slider-radius:0px;--slider-handle-size:12px;--slider-filled-ads:#67a5eb;--slider-disabled-color:hsla(0,0%,97%,.31);--slider-volume-height:5px;--slider-volume-radius:calc(var(--slider-volume-height)/2);--slider-volume-handle-size:13px;--timeline-slider-filled-active-live-bg:var(--red);--timeline-slider-handle-active-live-bg:var(--red);--timeline-slider-bg:var(--slider-bg);--timeline-slider-filled-bg:var(--slider-filled-bg);--timeline-slider-handle-bg:var(--slider-handle-bg);--timeline-slider-loaded-bg:var(--slider-loaded-bg);--volume-slider-bg:var(--slider-bg);--volume-slider-filled-bg:var(--slider-filled-bg);--volume-slider-handle-bg:var(--slider-handle-bg);--controls-time:var(--white);--controls-gradient:linear-gradient(180deg,transparent 0%,rgba(0,0,0,.005) 6.67%,rgba(0,0,0,.02) 13.33%,rgba(1,1,1,.04) 20%,rgba(1,1,1,.07) 26.67%,rgba(2,2,2,.11) 33.33%,rgba(3,3,3,.16) 40%,rgba(4,4,4,.22) 46.67%,rgba(6,6,6,.28) 53.33%,rgba(7,7,7,.33) 60%,rgba(8,8,8,.38) 66.67%,rgba(9,9,9,.42) 73.33%,rgba(9,9,9,.46) 80%,hsla(0,0%,4%,.48) 86.67%,hsla(0,0%,4%,.5));--timeline-preview-shadow:rgba(0,0,0,.08);--timeline-preview-bg:#222;--timeline-padding-horizontal:10px;--timeline-padding-vertical-top:3px;--timeline-padding-vertical-bottom:4px;--timeline-height:calc(var(--timeline-padding-vertical-bottom) + var(--timeline-padding-vertical-top) + var(--slider-height));--preview-track-frame-height-vertical:114px;--preview-track-frame-height-horizontal:65px;--preview-track-controls-top:16px;--preview-track-time-line-height:16px;--preview-track-bottom-offset:10px;--preview-track-height:calc(var(--preview-track-frame-height-vertical) + var(--preview-track-bottom-offset));--preview-track-controls-top-offset:calc(var(--timeline-height) + var(--preview-track-controls-top) + var(--preview-track-time-line-height));--settings-bg:rgba(0,0,0,.72);--settings-item-bg-hover:hsla(0,0%,100%,.08);--settings-radius:8px;--mobile-settings-bg:#2c2d2e;--divider-border:1px solid var(--white-alpha-24);--toggle-color-separator:#363738;--toggle-color-off:#656565;--toggle-color-on:#71aaeb;--toggle-color-autoplay-on:var(--white);--notification-bg:#2c2d2e;--notification-radius:8px;--button-hover-transition:opacity 0.2s;--video-container-z-index:0;--controls-container-z-index:1;--ads-container-z-index:1;--end-screen-mobile-z-index:1;--notification-z-index:1;--thumb-timer-z-index:2;--debug-panel-z-index:2;--modal-z-index:2;--settings-menu-z-index:2;--context-menu-z-index:3;--hot-key-helpers-container-z-index:3;--overlay-container-z-index:4;--rotate-transition-duration:0.25s;--btn-color:var(--white);--double-forward-bg:rgba(0,0,0,.6);background:var(--black);color:var(--white);font-family:var(--vk-vp-custom-font,var(--font));font-size:12px;height:100%;line-height:normal;outline:0;overflow:hidden;position:relative;user-select:none;width:100%}.vk-vp-root.visible-outside.s-2{overflow:visible}.vk-vp-root.s-2 *{-webkit-tap-highlight-color:transparent}.vk-vp-root.s-2 button{background:transparent;border:none;color:inherit;font:inherit;line-height:normal;margin:0;overflow:visible;padding:0;width:auto;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;cursor:pointer}.vk-vp-root.s-2 p{margin:0}.vk-vp-root.s-2 svg:not(.interactive-root svg){pointer-events:none}.vk-vp-root.s-2 .interactive-root{font-family:var(--vk-vp-int-custom-font,inherit)}.vk-vp-root.s-2 :focus,.vk-vp-root.s-2 :focus-visible{outline:none}.vk-vp-root.s-2 :focus-visible{border-radius:var(--focused-outline-radius);box-shadow:var(--focused-element-shadow)}.vk-vp-root.s-2 .focus-hidden:focus-visible{box-shadow:none}.vk-vp-root.s-2 .hidden{opacity:0;visibility:hidden}.vk-vp-root.s-2 .out-of-flow{content-visibility:hidden!important}.vk-vp-root.s-2 .overlay-container{height:100%;left:0;pointer-events:none;position:fixed;top:0;width:100%;z-index:var(--overlay-container-z-index)}.vk-vp-root.s-2 .out-of-view{left:-1000vh!important;position:absolute!important}.vk-vp-root.s-2 .icon.icon-error-stub{align-items:center;display:flex;justify-content:center}'};function Cv(t,e){B(e,!0),Q(t,LT);let[i,o]=Ve(),r=()=>w(dt,"$isLive$",i),a=()=>w(ot,"$availableSubtitlesList$",i),l=()=>w(Ue,"$isPreviewTrackHorizontallyAligned$",i),d=g(e,"sources",7),s=g(e,"store",7),u=g(e,"microStoresRoot",7),f=g(e,"videoConfig",7),p=g(e,"uiConfig",7),v=g(e,"title",7),$=g(e,"thumbUrl",7),y=g(e,"interactiveContainer",7),h=g(e,"interactiveController",7),x=g(e,"subtitles",7),I=g(e,"subtitlesForcedLanguage",7),T=g(e,"live",7),N=g(e,"preload",7),L=g(e,"autoplay",7),E=g(e,"volume",7,void 0),k=g(e,"muted",7,void 0),K=g(e,"fromTime",7),H=g(e,"canRewindLive",7),z=g(e,"showAds",7),j=g(e,"adsSlotId",7,void 0),ae=g(e,"adsParams",7,void 0),X=g(e,"adsAutoplayParam",7,void 0),ne=g(e,"duration",7,void 0),J=g(e,"logoClickable",7),we=g(e,"logoHidden",7),pe=g(e,"isMobile",7),re=g(e,"showNextPrevButtons",7,!1),be=g(e,"nextButtonActive",7,!1),$e=g(e,"prevButtonActive",7,!1),ee=g(e,"endScreenVideoTitle",7,void 0),Re=g(e,"endScreenVideoThumb",7,void 0),fe=g(e,"isOneVideoPlaylist",7,!1),P=g(e,"supportLink",7),We=g(e,"shadowRootContainer",7),Se=g(e,"outerContainerRef",7),Z=g(e,"fullScreenTarget",7,void 0),ie=g(e,"failoverHosts",7,void 0),De=g(e,"showMiniTimer",7,!1),Oe=g(e,"saveRate",7),it=g(e,"seekToInteractive",7,Lb),U=g(e,"playPrevChapter",7,Lb),Pe=g(e,"volumeMultiplier",7),ke=g(e,"showAutoplayNext",7),He=g(e,"showEndScreen",7,!0),tt=g(e,"keyboardControls",15,void 0),{subscribers:ye,stores:Ie}=u();Ih(p());let Be=kt(),Lt=p().logoLink,mt=s().ui.debugPanelVisible,Vt=s().ui.playerSize,dt=s().state.isLive$,Qt=s().state.isInteractive&&Sv.device.isAndroid,Tt=W(void 0),Mt=null,Rt=W(!1);s().getAdmanWrapper().init({switchFromAdsToVideo:s().actions.internal.switchFromAdsToVideo,switchFromVideoToAds:s().actions.internal.switchFromVideoToAds,setMuted:s().actions.external.setMuted},s().ads,{vsid:s().vsid}),Dh(s(),Ie),Ne(()=>{var q,yt;s().ui.isMobile.set(pe()),(yt=(q=f().callbacks)==null?void 0:q.onDomReady)==null||yt.call(q)});let G=(q=!1)=>{D(Rt,!0),q?s().actions.external.firstStart(z()):s().actions.internal.firstStart(z())},Ce=()=>{if(Be.features.qualityDetailsSubMenuEnabled){let q=s_(s().videoId);if(q)switch(q.type){case"high_quality":s().actions.internal.setHighQualityEnabled(!0,q.appliesTo);break;case"traffic_saving":s().actions.internal.setTrafficSavingEnabled(!0,q.appliesTo);break;case"exact_quality":s().actions.internal.setQuality(q.quality);break}}else{a_(s().videoId),Cf()&&s().actions.internal.setTrafficSavingEnabled(!0);let yt=xf(s().videoId);yt&&s().actions.internal.setQuality(yt)}};function le(q){var zt,st,Pi;let yt=d()||q;yt&&s().initVideo({container:n(Tt),sources:yt,failoverHosts:ie(),subtitles:x(),subtitlesForcedLanguage:I(),volumeMultiplier:Pe()});let yi=ET.get(Pd)==="true";mt.set(yi),K()>0&&s().actions.external.seekTime(K());let Yt=pe()?Be.volumeDefault:(st=(zt=E())!=null?zt:$u())!=null?st:Be.volumeDefault,Ke=(Pi=k())!=null?Pi:e_();if(s().actions.external.setVolume(Yt),s().actions.external.setMuted(Ke),s().getAdmanWrapper().setInitialVolume(Ke?0:Yt),Ce(),Be.features.saveRate&&Oe()){let Fi=o_();Fi&&!r()&&s().actions.internal.setPlaybackRate(Fi)}if(ke()){let Fi=r_();Fi&&s().actions.internal.setAutoplayNextEnabled(Fi)}s().ui.isAutoplay.set(L()),L()&&G(),N()&&Be.features.preload&&s().actions.internal.preload()}let _e=q=>{if(window.ResizeObserver){let yt,yi;Mt=new ResizeObserver(kT(Yt=>{let Ke=Yt[0];if(Ke.contentBoxSize){let zt=Array.isArray(Ke.contentBoxSize)?Ke.contentBoxSize[0]:Ke.contentBoxSize;yt=zt.inlineSize,yi=zt.blockSize}else Ke.contentRect&&(yt=Ke.contentRect.width,yi=Ke.contentRect.height);Vt.set({width:yt,height:yi})},300)),Mt.observe(q)}q.clientWidth&&q.clientHeight&&Vt.set({width:q.clientWidth,height:q.clientHeight})},Me=()=>{document.hidden&&s().actions.external.stop()};Et(()=>{var yi,Yt,Ke,zt;Qt&&document.addEventListener("visibilitychange",Me),Be.debugLog&&s().actions.internal.startLogging(),_e(n(Tt));let q=ye.map(st=>st.init({store:s(),microStores:Ie,config:f(),interactiveController:h(),uiConfig:p()})),yt=()=>{Qt&&document.removeEventListener("visibilitychange",Me),Mt==null||Mt.disconnect(),q.forEach(st=>st.unsubscribe()),s().destroy()};return((yi=T())==null?void 0:yi.status)==="upcoming"?(s().actions.internal.setLiveWaitingStart(!0),yt):((Yt=T())==null?void 0:Yt.status)==="waiting"?(s().actions.internal.setLiveWaitingRecover(!0),yt):(((Ke=T())==null?void 0:Ke.status)==="finished"||((zt=T())==null?void 0:zt.status)==="postlive")&&!(d()&&IT(d()))?(s().actions.internal.setLiveWaitingRecord(!0),yt):(le(),yt)});function rt(){n(Rt)?s().actions.external.play():G(!0)}function pt(){s().actions.external.pause()}function ue(q){s().actions.external.setMuted(q)}function ze(){s().actions.external.toggleSubtitle()}function Qe(q,yt){s().actions.external.changeSubtitle(q,yt)}function ct(q){s().actions.external.changeAudioStream(q)}function Nt(){var q;(q=s().webApi.slotsApi)!=null&&q.haveSlots()&&s().actions.external.hideControls()}function Ht(){var q;(q=s().webApi.slotsApi)!=null&&q.haveSlots()&&s().actions.external.showControls()}function Gt(q){pe()||q>=0&&q<=1&&s().actions.external.setVolume(q)}function vi(q){s().actions.internal.seekTime(q,PT.UNKNOWN)}function Qi(q){s().actions.external.seekEpisodeStartTime(q)}function Pt(){s().actions.external.returnFocusToEpisodes()}function di(q){s().actions.external.setPlaybackRate(q)}function pi(q){s().actions.external.setAutoQualityLimits(q)}function $t(){s().actions.external.setQuality("auto")}function ci(q){s().actions.external.setTrafficSavingEnabled(q)}function qt(q){s().actions.external.setHighQualityEnabled(q)}let Gi=lp(Be.view),Yi=f().playerView==="preview",ot=s().state.availableSubtitlesList$;if(Be.features.initSubtitles){let q=!1;Ne(()=>{var yt;if(!q&&a().length){q=!0;let yi;if(Be.features.userVideoPrefs&&s().videoId){let Ke=Su(Be.userSalt,String(s().videoId));Ke!=null&&Ke.subtitleTrackId&&(yi=a().find(zt=>zt.value===Ke.subtitleTrackId))}let Yt=(yt=I())!=null?yt:If();Yt&&(yi=a().find(Ke=>Ke.language===Yt)),s().actions.internal.setSubtitle(yi)}})}let Ue=s().ui.isPreviewTrackHorizontallyAligned;var gi=AT();let So;var Ho=C(gi);{var Uo=q=>{xv(q,{get store(){return s()},get uiConfig(){return Be},get thumbUrl(){return $()},get interactiveContainer(){return y()},get live(){return T()},get autoplay(){return L()},get canRewindLive(){return H()},get showAds(){return z()},get adsSlotId(){return j()},get adsParams(){return ae()},get adsAutoplayParam(){return X()},get duration(){return ne()},get logoClickable(){return J()},get logoHidden(){return we()},get logoTargetUrl(){return Lt},get nextButtonActive(){return be()},get prevButtonActive(){return $e()},get endScreenVideoTitle(){return ee()},get endScreenVideoThumb(){return Re()},get isOneVideoPlaylist(){return fe()},get supportLink(){return P()},get shadowRootContainer(){return We()},get outerContainerRef(){return Se()},get fullScreenTarget(){return Z()},get showMiniTimer(){return De()},get playerStarted(){return n(Rt)},get seekToInteractive(){return it()},get playPrevChapter(){return U()},firstStart:G,seekTime:vi,get showEndScreen(){return He()},get showAutoplayNext(){return ke()},get showNextPrevButtons(){return re()},get adsExternalApi(){return e.adsExternalApi},get videoContainer(){return n(Tt)},set videoContainer(yt){D(Tt,yt,!0)}})},wt=q=>{var yt=Ae(),yi=ce(yt);{var Yt=zt=>{wv(zt,{get thumbUrl(){return $()},get outsideDuration(){return ne()},get canRewindLive(){return H()},get videoContainer(){return n(Tt)},set videoContainer(st){D(Tt,st,!0)}})},Ke=zt=>{$v(zt,{get store(){return s()},get uiConfig(){return Be},get title(){return v()},get thumbUrl(){return $()},get interactiveContainer(){return y()},get live(){return T()},get autoplay(){return L()},get canRewindLive(){return H()},get showAds(){return z()},get adsSlotId(){return j()},get adsParams(){return ae()},get adsAutoplayParam(){return X()},get duration(){return ne()},get logoClickable(){return J()},get logoHidden(){return we()},get logoTargetUrl(){return Lt},get nextButtonActive(){return be()},get prevButtonActive(){return $e()},get endScreenVideoTitle(){return ee()},get endScreenVideoThumb(){return Re()},get isOneVideoPlaylist(){return fe()},get supportLink(){return P()},get shadowRootContainer(){return We()},get outerContainerRef(){return Se()},get fullScreenTarget(){return Z()},get showMiniTimer(){return De()},get playerStarted(){return n(Rt)},get seekToInteractive(){return it()},get playPrevChapter(){return U()},firstStart:G,get showEndScreen(){return He()},get showAutoplayNext(){return ke()},get showNextPrevButtons(){return re()},get adsExternalApi(){return e.adsExternalApi},get getVideoDeeplink(){return e.getVideoDeeplink},get videoContainer(){return n(Tt)},set videoContainer(st){D(Tt,st,!0)},get keyboardControls(){return tt()},set keyboardControls(st){tt(st)}})};R(yi,zt=>{Yi?zt(Yt):zt(Ke,!1)})}b(q,yt)};R(Ho,q=>{pe()?q(Uo):q(wt,!1)})}S(gi),O(q=>{So=se(gi,1,"vk-vp-root s-2",null,So,q),qe(gi,Gi)},[()=>({"root--miui-browser":Sv.device.isMobile&&Sv.browser.isMiuiBrowser,"visible-outside":Yi,"preview-track-horizontally-alinged":l()})]),b(t,gi);var Dt=F({initVideo:le,play:rt,pause:pt,setMuted:ue,toggleSubtitle:ze,changeSubtitle:Qe,changeAudioStream:ct,hideControls:Nt,showControls:Ht,setVolume:Gt,seekTime:vi,seekEpisodeStartTime:Qi,returnFocusToEpisodes:Pt,setPlaybackRate:di,setAutoQualityLimits:pi,setAutoQuality:$t,toggleTrafficSaving:ci,toggleHighQuality:qt,get sources(){return d()},set sources(q){d(q)},get store(){return s()},set store(q){s(q)},get microStoresRoot(){return u()},set microStoresRoot(q){u(q)},get videoConfig(){return f()},set videoConfig(q){f(q)},get uiConfig(){return p()},set uiConfig(q){p(q)},get title(){return v()},set title(q){v(q)},get thumbUrl(){return $()},set thumbUrl(q){$(q)},get interactiveContainer(){return y()},set interactiveContainer(q){y(q)},get interactiveController(){return h()},set interactiveController(q){h(q)},get subtitles(){return x()},set subtitles(q){x(q)},get subtitlesForcedLanguage(){return I()},set subtitlesForcedLanguage(q){I(q)},get live(){return T()},set live(q){T(q)},get preload(){return N()},set preload(q){N(q)},get autoplay(){return L()},set autoplay(q){L(q)},get volume(){return E()},set volume(q){E(q)},get muted(){return k()},set muted(q){k(q)},get fromTime(){return K()},set fromTime(q){K(q)},get canRewindLive(){return H()},set canRewindLive(q){H(q)},get showAds(){return z()},set showAds(q){z(q)},get adsSlotId(){return j()},set adsSlotId(q){j(q)},get adsParams(){return ae()},set adsParams(q){ae(q)},get adsAutoplayParam(){return X()},set adsAutoplayParam(q){X(q)},get duration(){return ne()},set duration(q){ne(q)},get logoClickable(){return J()},set logoClickable(q){J(q)},get logoHidden(){return we()},set logoHidden(q){we(q)},get isMobile(){return pe()},set isMobile(q){pe(q)},get showNextPrevButtons(){return re()},set showNextPrevButtons(q){re(q)},get nextButtonActive(){return be()},set nextButtonActive(q){be(q)},get prevButtonActive(){return $e()},set prevButtonActive(q){$e(q)},get endScreenVideoTitle(){return ee()},set endScreenVideoTitle(q){ee(q)},get endScreenVideoThumb(){return Re()},set endScreenVideoThumb(q){Re(q)},get isOneVideoPlaylist(){return fe()},set isOneVideoPlaylist(q){fe(q)},get supportLink(){return P()},set supportLink(q){P(q)},get shadowRootContainer(){return We()},set shadowRootContainer(q){We(q)},get outerContainerRef(){return Se()},set outerContainerRef(q){Se(q)},get fullScreenTarget(){return Z()},set fullScreenTarget(q){Z(q)},get failoverHosts(){return ie()},set failoverHosts(q){ie(q)},get showMiniTimer(){return De()},set showMiniTimer(q){De(q)},get saveRate(){return Oe()},set saveRate(q){Oe(q)},get showAutoplayNext(){return ke()},set showAutoplayNext(q){ke(q)},get seekToInteractive(){return it()},set seekToInteractive(q){it(q)},get playPrevChapter(){return U()},set playPrevChapter(q){U(q)},get volumeMultiplier(){return Pe()},set volumeMultiplier(q){Pe(q)},get showEndScreen(){return He()},set showEndScreen(q){He(q)},get keyboardControls(){return tt()},set keyboardControls(q){tt(q)}});return o(),Dt}var MT=Te('<defs><path id="rect" d="m2.72 0c.45 0 .6.05.77.13a1 1 0 01.38.38c.09.16.13.33.13.77v1.44c0 .44-.04.6-.13.77a1 1 0 01-.38.38c-.16.08-.32.13-.77.13h-1.44c-.44 0-.6-.05-.77-.13a1 1 0 01-.37-.38c-.1-.16-.14-.33-.14-.77v-1.44c0-.44.05-.6.13-.77a1 1 0 01.38-.38c.17-.08.33-.13.77-.13z"></path></defs><path d="M38.24 6c3.57 0 4.86.37 6.17 1.07a7.3 7.3 0 0 1 3.02 3.02c.7 1.3 1.07 2.6 1.07 6.17v23.49c0 3.56-.37 4.85-1.07 6.16a7.3 7.3 0 0 1-3.02 3.02c-1.3.7-2.6 1.07-6.16 1.07h-19.5c-3.56 0-4.85-.37-6.16-1.07a7.3 7.3 0 0 1-3.02-3.02c-.7-1.3-1.07-2.6-1.07-6.16v-23.5c0-3.56.37-4.85 1.07-6.16a7.3 7.3 0 0 1 3.02-3.02C13.9 6.37 15.2 6 18.76 6zm.32 3h-19.8c-2.8 0-3.77.19-4.75.71a4.3 4.3 0 0 0-1.8 1.8c-.5.95-.7 1.87-.7 4.43l-.01 23.8c0 2.8.19 3.76.71 4.75a4.3 4.3 0 0 0 1.8 1.8c.98.52 1.95.71 4.75.71h19.49c2.8 0 3.76-.19 4.74-.71a4.3 4.3 0 0 0 1.8-1.8c.52-.98.71-1.95.71-4.74v-23.5c0-2.8-.19-3.75-.71-4.74a4.3 4.3 0 0 0-1.8-1.8c-.95-.5-1.87-.7-4.43-.7z"></path><use xlink:href="#rect" x="16.5" y="14"></use><use xlink:href="#rect" x="16.5" y="22"></use><use xlink:href="#rect" x="16.5" y="30"></use><use xlink:href="#rect" x="16.5" y="38"></use><use xlink:href="#rect" x="37" y="14"></use><use xlink:href="#rect" x="37" y="22"></use><use xlink:href="#rect" x="37" y="30"></use><use xlink:href="#rect" x="37" y="38"></use>',1);function Tv(t,e){let i=g(e,"isWhite",3,!1),o=m(()=>i()?"#fff":"#909499");Je(t,{width:"57",height:"60",get fill(){return n(o)},testId:"stub-icon",children:(r,a)=>{var l=MT();ai(9),b(r,l)},$$slots:{default:!0}})}var VT=M('<div class="title s-1"> </div>'),RT=M('<div class="playerStub s-1"><!> <!></div>'),NT={hash:"s-1",code:".playerStub.s-1{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%}.title.s-1{box-sizing:border-box;color:#fff;font-size:15px;left:0;overflow:hidden;padding:18px 20px 10px;position:absolute;text-overflow:ellipsis;top:0;white-space:nowrap;width:100%}"};function Iv(t,e){Q(t,NT);var i=RT(),o=C(i);{var r=d=>{var s=VT(),u=C(s,!0);S(s),O(()=>ve(u,e.title)),b(d,s)};R(o,d=>{e.title&&d(r)})}var a=A(o,2);{var l=d=>{let s=m(()=>!!e.thumbUrl);Tv(d,{get isWhite(){return n(s)}})};R(a,d=>{(!e.title||!e.thumbUrl)&&d(l)})}S(i),O(()=>qe(i,e.thumbUrl?`background-image: url('${e.thumbUrl}')`:"")),b(t,i)}var DT=M('<div class="playerError s-0"><!></div>'),OT={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 Ev(t){Q(t,OT);var e=DT(),i=C(e);Ya(i,{}),S(e),b(t,e)}import{now as fI,ValueSubject as mI}from"@vkontakte/videoplayer-shared/es2018";import{cloneDeepWith as vI,InterfaceLanguage as gI,isNonNullable as Rv,Logger as hI,Observable as _I,Subscription as Fb,once as bI,InternalsExposure as $I,skip as yI,getPlayerId as xI}from"@vkontakte/videoplayer-shared/es2018";import{clientChecker as Hb,isMobile as wI}from"@vkontakte/videoplayer-core/es2018";import{OneStat as SI,ThinOneStat as CI,MediascopePixel as TI}from"@vkontakte/videoplayer-statistics/es2018";import{Logger as BT,Subscription as FT}from"@vkontakte/videoplayer-shared/es2018";var dp=class{constructor(){this.subscription=new FT,this.logger=new BT,this.log=this.logger.createComponentLog("MediaSessionApi")}isSupported(){return"mediaSession"in navigator}setMetaData({title:e,artist:i="",thumbUrl:o=""}){this.isSupported()&&(navigator.mediaSession.metadata=new MediaMetadata({title:e,artist:i,artwork:[{src:o,sizes:"96x96",type:"image/png"},{src:o,sizes:"128x128",type:"image/png"},{src:o,sizes:"192x192",type:"image/png"},{src:o,sizes:"256x256",type:"image/png"},{src:o,sizes:"384x384",type:"image/png"},{src:o,sizes:"512x512",type:"image/png"}]}))}updateActionHandlers(e){this.resetActionHandlers(),this.setActionHandlers(e)}resetActionHandlers(){let e=[["play",null],["pause",null],["stop",null],["nexttrack",null],["previoustrack",null],["seekto",null],["seekbackward",null],["seekforward",null]];this.setActionHandlers(e)}setActionHandlers(e){var i,o;if(this.isSupported())for(let[r,a]of e)try{(o=(i=navigator.mediaSession).setActionHandler)==null||o.call(i,r,a)}catch(l){throw new Error(`The media session action "${r}" is not supported yet.`)}}attachToStore(e){!this.isSupported()||!e||(this.clearSubscriptions(),this.subscription.add(e.state.positionExact$.subscribe(i=>{var a,l;let o=he(e.state.currentPlaybackRate$),r=he(e.state.duration$);if(!(!isFinite(i)||!isFinite(r)))try{(l=(a=navigator.mediaSession).setPositionState)==null||l.call(a,{position:i,playbackRate:o,duration:r})}catch(d){this.log({message:`MediaSession setPositionState can't call with position: ${i} and duration: ${r}`})}})))}clearSubscriptions(){this.subscription.unsubscribe()}destroy(){this.resetActionHandlers(),this.clearSubscriptions()}};import{ValueSubject as Pv,detectEmbed as qT}from"@vkontakte/videoplayer-shared/es2018";var HT=Te('<path d="M31.257 3.998c3.037.01 4.52.39 6.13 1.24a9 9 0 013.47 3.35l.17.31.15.3c.78 1.55 1.07 3.18 1.09 6.25v9.04a1.5 1.5 0 01-3 .02v-9.65c-.05-2.04-.24-3.12-.64-4.04l-.12-.27-.13-.25A6 6 0 0036.2 7.9c-1.19-.64-2.34-.88-5.11-.9h-8.84c-2.73 0-4 .2-5.07.7l-.25.13a6 6 0 00-2.4 2.41c-.64 1.19-.88 2.34-.9 5.11v20.83c0 2.74.2 4 .7 5.08l.13.25a6 6 0 002.41 2.4c1.1.6 2.13.83 4.44.89H26a1.5 1.5 0 010 3h-4.47c-3-.05-4.53-.38-6.14-1.24a9 9 0 01-3.48-3.35l-.15-.3c-.73-1.47-1.04-3.01-1.08-5.8V15c.05-2.98.39-4.52 1.25-6.12a9 9 0 013.293-3.582c1.85-.871 2.623-1.27 5.747-1.27z"></path><path d="M30.5 33.8c0-1.68 0-2.52.33-3.16a3 3 0 0 1 1.3-1.31c.65-.33 1.49-.33 3.17-.33h6.4c1.68 0 2.52 0 3.16.33a3 3 0 0 1 1.31 1.3c.33.65.33 1.49.33 3.17v13.4c0 1.68 0 2.52-.33 3.16a3 3 0 0 1-1.3 1.31c-.65.33-1.49.33-3.17.33h-6.4c-1.68 0-2.52 0-3.16-.33a3 3 0 0 1-1.31-1.3c-.33-.65-.33-1.49-.33-3.17z"></path>',1),UT=M('<div><div><!></div> <span class="title s-6"> </span></div>'),zT={hash:"s-6",code:".player-pip-dummy.s-6{align-items:center;background-color:#19191a;display:flex;flex-direction:column;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;width:100%}.player-pip-dummy.is-pip-api.s-6{position:relative}.dummy-image.s-6 svg{transform:scale(1.07143)}.dummy-image.desktop.s-6{transform:scale(1.07143) rotate(-90deg) rotateY(180deg)}.title.s-6{color:#fff;font-size:16px;padding:18px 20px 10px;text-align:center}"};function kv(t,e){B(e,!0),Q(t,zT);let[i,o]=Ve(),r=()=>w(u,"$interfaceLanguage$",i),a=()=>w(f,"$isMobile$",i),l=ge(),d=kt(),s=!!l.webApi.pictureInPictureApi,u=l.interfaceLanguage$,f=l.ui.isMobile,p=l.ui.t,v=m(()=>r()&&p("pip_dummy_title")),$=lp(d.view);var y=UT();let h;var x=C(y);let I;var T=C(x);Je(T,{width:"57",height:"56",testId:"pip-dummy-icon",children:(E,k)=>{var K=HT();ai(),b(E,K)},$$slots:{default:!0}}),S(x);var N=A(x,2),L=C(N,!0);S(N),S(y),O((E,k)=>{h=se(y,1,"player-pip-dummy s-6",null,h,E),qe(y,$),I=se(x,1,"dummy-image s-6",null,I,k),ve(L,n(v))},[()=>({"is-pip-api":s}),()=>({desktop:!a()})]),b(t,y),F(),o()}var WT=Object.defineProperty,KT=(t,e,i)=>e in t?WT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,jl=(t,e,i)=>KT(t,typeof e!="symbol"?e+"":e,i),QT=460,GT=280,Sc=class{constructor({enabled:e=!0}={enabled:!0}){jl(this,"playerDomElement"),jl(this,"playerParentShadowRoot"),jl(this,"playerDummyElement"),jl(this,"svelteContext"),jl(this,"pipWindow"),jl(this,"info",{isActive$:new Pv(!1),isEnabled$:new Pv(!1),type:1}),this.info.isEnabled$=new Pv(e)}isSupported(){let{isEmbed:e}=qT();return"documentPictureInPicture"in window&&!e}isActive(){return this.info.isActive$.getValue()}setPlayerDomElement(e,i){this.playerDomElement=e,this.playerParentShadowRoot=i}setContext(e){this.svelteContext=e}async request(){var e,i;if(!this.isSupported()||!this.playerDomElement||!this.playerParentShadowRoot)return;this.pipWindow=await documentPictureInPicture.requestWindow({width:QT,height:GT,copyStyleSheets:!0}),this.pipWindow.document.body.style.margin="0";let o=[...this.playerParentShadowRoot.styleSheets].map(s=>[...s.cssRules].map(u=>u.cssText).join(" ")).filter(Boolean).join(`
|
|
63
|
-
`),r=document.createElement("style");r.textContent=o;let a=this.createStretchedContainer(),l=a.attachShadow({mode:"open"});l.append(r),l.append(this.playerDomElement);let d={target:this.playerParentShadowRoot,context:this.svelteContext};this.playerDummyElement=jr(kv,d),(e=this.pipWindow)==null||e.document.body.append(a),this.info.isActive$.next(!0),(i=this.pipWindow)==null||i.addEventListener("unload",s=>{!this.playerDomElement||!this.playerParentShadowRoot||!this.playerDummyElement||(Pa(this.playerDummyElement),this.playerParentShadowRoot.append(this.playerDomElement),this.info.isActive$.next(!1),this.pipWindow=void 0)})}async exit(){return new Promise(e=>{var i;this.pipWindow&&((i=documentPictureInPicture.window)==null||i.close()),e()})}async dispose(){await this.exit()}setEnabled(e){this.info.isEnabled$.next(e)}createStretchedContainer(){let e=document.createElement("div");return e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="100%",e}};function Mb(t){return t instanceof Sc}var cp=class{static getLatestSupportedVersion(e){let i=new Ra(e),o=new Sc(e);if(o.isSupported())return o;if(i.isSupported())return i}};function Cc(t,e){var r,a;let i=new Set([...Object.keys(t),...Object.keys(e)]),o={};for(let l of i)o[l]=(a=(r=e[l])!=null?r:t[l])!=null?a:void 0;return o}var Vb="Inner error. Unexpectedly root annotation container null reference exception",Rb="Annotation with such name already exists",Nb="Annotation with such name does not exist";var Xl=class extends Error{constructor(e){super(e),this.name="AnnotationError"}};import{observeElementSize as YT,Subscription as jT,throttleFn as XT}from"@vkontakte/videoplayer-shared/es2018";var ZT="1",JT=100,up=class{constructor(e){this.annotationsInside=e;this.annotations=new Map;this.subscriptions=new jT}init(e){if(this.rootAnnotationsContainer=e,this.annotationsInside)return;let i=XT(()=>{for(let o of this.annotations.values())this.isElementExceedsBoundaries(o,this.playerSize.width,this.playerSize.height)?o.style.visibility="hidden":o.style.visibility="visible"},JT);this.subscriptions.add(YT(this.rootAnnotationsContainer).subscribe(({width:o,height:r})=>{this.playerSize={width:o,height:r},i()})),this.mutationObserver=new MutationObserver(i),this.mutationObserver.observe(this.rootAnnotationsContainer,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}add(e,i){var o;if(!this.rootAnnotationsContainer)throw new Xl(Vb);if(this.annotations.has(e))throw new Xl(Rb);i.style.zIndex=(o=i.style.zIndex)!=null?o:ZT,i.style.position="absolute",this.rootAnnotationsContainer.append(i),this.annotations.set(e,i)}get(e){let i=this.annotations.get(e);if(!i)throw new Xl(Nb);return i}remove(e){let i=this.get(e);this.annotations.delete(e)&&i.remove()}clear(){for(let e in this.annotations.keys())this.remove(e)}destroy(){var e;this.annotations.clear(),this.subscriptions.unsubscribe(),(e=this.mutationObserver)==null||e.disconnect(),this.rootAnnotationsContainer=null}isElementExceedsBoundaries(e,i,o){let r=e.offsetTop,a=e.offsetLeft,l=e.offsetWidth,d=e.offsetHeight;return r<0||a<0||a+l>i||r+d>o}registryRootContainer(e){}addLayer(e){return document.createElement("div")}getLayer(e){}removeLayer(e){}clearLayer(e){}detach(){}reattach(){}};import{assertNonNullable as pp,Subscription as eI}from"@vkontakte/videoplayer-shared/es2018";var vn=class{init({store:e,microStores:i,interactiveController:o,config:r}){return pp(e),pp(i),pp(r),r.interactiveData&&pp(o),this.subscription=new eI,this.subscription}};var Tc=class extends vn{constructor(){super(...arguments);this.stateName="fakeIsPlaying$";this.state$={...de(null),toggle:()=>this.state$.update(i=>!i)}}init(i){let o=super.init(i),{isInteractiveExpectation$:r}=i.store.state;return o.add(r.subscribe(a=>{this.state$.set(a?!0:null)})),o}};var Ic=class extends vn{constructor(){super(...arguments);this.stateName="interactiveControlsOpacity$";this.state$={...de(null),toggle:()=>this.state$.update(i=>!i)}}init(i){let o=super.init(i),{microStores:r,store:a}=i,{fakeIsPlaying$:l}=r,{isInteractiveExpectation$:d,isPlaying$:s}=a.state,{controlsVisible:u,isMobile:f}=a.ui,p=he(f),v=()=>p&&he(u);return o.add(u.subscribe($=>{if(!p)return;let y=he(l);he(s)?this.state$.set($):y!==null&&this.state$.set(!y||$)})),o.add(s.subscribe($=>{this.state$.set(!$||v())})),o.add(l.subscribe($=>{if($===null)return;let y=he(d);if(v()){this.state$.set(!0);return}y&&this.state$.set(!$)})),o}};var Ec=class extends vn{constructor(){super(...arguments);this.stateName="seekToInteractiveDisabledTooltip$";this.state$=de("tooltip_chapter_without_interactive")}init(i){let o=super.init(i),{store:r}=i;return o.add(r.state.interactiveEpisodes$.subscribe(a=>{a.length&&(a.every(l=>l.completed)?this.state$.set("tooltip_interactive_of_chapter_completed"):this.state$.set("tooltip_disabled_when_interactive"))})),o}};import{combine as tI}from"@vkontakte/videoplayer-shared/es2018";var Av=de(!1),fp=null,kc=class extends vn{constructor(){super(...arguments);this.stateName="showInteractiveTimeIndicatorTooltip$";this.state$={...Av,set:(i,o=!1)=>{i!==he(Av)&&(this.clearTimeout(),Av.set(i),!i&&fp&&(fp=!1),i&&o&&(this.timeout=setTimeout(()=>{this.state$.set(!1)},3e3)))},clearTimeout:()=>this.clearTimeout()}}init(i){let o=super.init(i),{store:r,config:a}=i,{isInteractiveTime$:l,isPlaying$:d}=r.state,s=r.ui.controlsVisible,{interactiveTimeIndicator:u}=r.ui.controls;o.add(s.subscribe(p=>{he(l)&&p&&this.state$.set(!1)}));let f=(a==null?void 0:a.interactiveData)||{tooltipHelpHintActive:!1};return o.add(tI({isPlaying$:d,isInteractiveTime$:l,interactiveTimeIndicator:u}).subscribe(({isPlaying$:p,isInteractiveTime$:v,interactiveTimeIndicator:$})=>{var y,h;if(!(!p||!($!=null&&$.isDisplayed))){if(!v)return this.state$.set(!1);f.tooltipHelpHintActive&&fp===null&&(fp=!0,f.tooltipHelpHintActive=!1,this.state$.set(!0),(h=(y=r.callbacks)==null?void 0:y.onInteractiveTimeIndicatorHintDeactivated)==null||h.call(y))}})),o}clearTimeout(){window.clearTimeout(this.timeout)}};import{combine as iI,noop as oI}from"@vkontakte/videoplayer-shared/es2018";var Pc=class extends vn{constructor(){super(...arguments);this.stateName="graphIsOpened$";this.graphMadePause=!1;this.state$={...de(null),toggle:oI};this.checkIfShouldHide=i=>Rs(i,"s")}init(i){let o=super.init(i),{store:r,interactiveController:a}=i,l=r.ui.currentGridType$,d=r.getLogger().createComponentLog("GraphIsOpened microStore");return this.state$.toggle=async()=>{if(this.checkIfShouldHide(he(l)))return;let s=he(this.state$),{isEnded$:u,playbackState$:f}=r.state,{disabledControls$:p}=r.ui.controls,v=he(u),$=he(f);if(s)try{await(a==null?void 0:a.toggleGraphView(!1)),this.state$.set(!1),p.remove(mf),!v&&this.graphMadePause&&r.actions.internal.play()}catch(y){d({message:"Cant hide graph"})}else{this.graphMadePause=$==="playing";try{await(a==null?void 0:a.toggleGraphView(!0)),this.state$.set(!0),p.add(mf),!v&&this.graphMadePause&&r.actions.internal.pause()}catch(y){d({message:"Cant show graph"})}}},o.add(iI({graphIsOpened:this.state$,currentGridType:l}).subscribe(async({graphIsOpened:s,currentGridType:u})=>{if(this.checkIfShouldHide(u)&&s)try{await(a==null?void 0:a.toggleGraphView(!1)),this.state$.set(!1)}catch(p){d({message:"Cant hide graph"})}})),o}};import{ValueSubject as Db}from"@vkontakte/videoplayer-shared/es2018";var Ac=class extends vn{constructor(){super(...arguments);this.stateName="pictureInPicture$";this.state$={isActive$:de(!1),isEnabled$:de(!1),type$:de(void 0)}}init(i){let o=super.init(i),{store:r}=i,{info:{isActive$:a,isEnabled$:l,type:d}}=r.webApi.pictureInPictureApi||{info:{isActive$:new Db(!1),isEnabled$:new Db(!1)}};return o.add(a.subscribe(s=>{this.state$.isActive$.set(s)})),o.add(l.subscribe(s=>{this.state$.isEnabled$.set(s)})),this.state$.type$.set(d),o}};import{filter as sI,filterChanged as aI}from"@vkontakte/videoplayer-shared/es2018";import{safeStorage as Lv}from"@vkontakte/videoplayer-shared/es2018";var Ob=({maxShowCount:t,timeout:e})=>{let i=[t!==0?nI({maxCount:t}):void 0,e!==0?rI({timeout:e}):void 0].filter(o=>!!o);return{notificationShowed:o=>i.forEach(r=>r.notificationShowed(o)),canShowNotification:o=>i.every(r=>r.canShowNotification(o))}},nI=({maxCount:t})=>{let e={};return{notificationShowed:i=>{var o,r;e[i]=((o=e[i])!=null?o:0)+1,Lv.set("videoplayer_notifications_manager_count",JSON.stringify((r=e[i])!=null?r:0))},canShowNotification:i=>{var o;return((o=e[i])!=null?o:0)<t}}},rI=({timeout:t})=>{let e="videoplayer_notifications_manager",i=()=>{try{return JSON.parse(Lv.get(e)||"{}")}catch(a){return{}}},o=a=>Lv.set(e,JSON.stringify(a)),r=a=>{let l=i();delete l[a],o(l)};return{notificationShowed:a=>{o({...i(),[a]:{timeout:t,launchTime:Date.now()}})},canShowNotification:a=>{let l=i()[a];if(l){let d=Date.now()-l.launchTime>t;return d&&r(a),d}else return!0}}};var Lc=class extends vn{constructor(){super(...arguments);this.stateName="notifications$";this.state$={notificationsToShow$:de({}),showNotification:i=>{this.state$.notificationsToShow$.update(o=>(o[i]=!0,o)),this.notificationManager.notificationShowed(i)},closeNotification:i=>{this.state$.notificationsToShow$.update(o=>(delete o[i],o))}}}init(i){let o=super.init(i),{store:r,uiConfig:{features:{maxCountShowSlowVideoNotification:a,timeoutShowSlowVideoNotification:l,showSlowVideoNotification:d,forceAutoQualityWhenSevereStallHappens:s}}}=i;this.notificationManager=Ob({maxShowCount:a,timeout:l});let u=r.getPlayer();return o.add(u.events.severeStallOccured$.pipe(aI(),sI(f=>f)).subscribe(()=>{d&&!u.info.isAutoQualityEnabled$.getValue()&&this.notificationManager.canShowNotification("slow_video")&&(s&&r.actions.internal.setQuality("auto"),this.state$.showNotification("slow_video"))})),o}};var Bb=()=>[Tc,Ic,Ec,kc,Pc,Ac,Lc].reduce(({subscribers:t,stores:e},i)=>{let o=new i;return{subscribers:[...t,o],stores:{...e,[o.stateName]:o.state$}}},{subscribers:[],stores:{}});import{devNull as Mc}from"@vkontakte/videoplayer-shared/es2018";var mp=class{constructor(e){this.getActiveElement=e;this.focusableElements=[];this.isActive=!1;this.handleTabKey=e=>{if(this.updateFocusableElements(),!this.focusableElements.length)return;let i=this.focusableElements[0],o=this.focusableElements[this.focusableElements.length-1],r=this.getActiveElement();e.shiftKey&&r===i?(e.preventDefault(),o.focus()):!e.shiftKey&&r===o&&(e.preventDefault(),i.focus())}}activate(){this.isActive||(document.addEventListener("keydown",this.handleTabKey),this.isActive=!0)}deactivate(){this.isActive&&(document.removeEventListener("keydown",this.handleTabKey),this.isActive=!1,this.focusableElements=[])}updateFocusableElements(){this.isActive&&(this.focusableElements=this.getFocusableElements())}getFocusableElements(){let e=["button:not([disabled])","[href]:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"]):not([disabled])'].join(", ");return Array.from(this.container.querySelectorAll(e)).filter(i=>!i.disabled&&i.offsetParent!==null)}destroy(){this.deactivate()}setContainer(e){this.container=e}};var vp=class{constructor(e){this.shadowRoot=e;this.lastFocusedNode=null;this.init=()=>{this.shadowRoot.addEventListener("focusin",this.handleFocusChange)};this.handleFocusChange=()=>{this.lastFocusedNode=this.shadowRoot.activeElement};this.restoreFocus=()=>{var e;(e=this.lastFocusedNode)==null||e.focus()};this.focusLock=new mp(()=>this.lastFocusedNode),this.init()}destroy(){this.shadowRoot.removeEventListener("focusin",this.handleFocusChange),this.focusLock.destroy()}getLastFocusedNode(){return this.lastFocusedNode}activateLock(){this.focusLock.activate()}deactivateLock(){this.focusLock.deactivate()}setContainerForFocusLock(e){this.focusLock.setContainer(e)}};var lI=M('<div class="root s-3"><!></div>'),dI={hash:"s-3",code:".root.s-3{align-items:center;display:flex;inset:0;justify-content:center;pointer-events:none;position:absolute;z-index:1}"};function Mv(t,e){B(e,!0),Q(t,dI);let i=null,o=W(null);Ne(()=>(n(o)&&(i=window.setTimeout(()=>{D(o,null)},e.animationDuration)),()=>{i&&clearTimeout(i)}));function r(s){e.playbackStatusShow&&D(o,s?"prev":"next",!0)}var a=Ae(),l=ce(a);{var d=s=>{var u=Ae(),f=ce(u);Ps(f,()=>n(o),p=>{var v=lI(),$=C(v);let y=m(()=>n(o)==="prev");xc($,{get duration(){return e.animationDuration},get Icon(){return ca},get reversed(){return n(y)}}),S(v),b(p,v)}),b(s,u)};R(l,s=>{e.playbackStatusShow&&n(o)&&s(d)})}return b(t,a),F({startVideoChangedAnimation:r})}import{getWindow as cI}from"@vkontakte/videoplayer-shared/es2018";var Vv=cI().HTMLElement||class{constructor(){this.isConnected=!1}};var uI=Object.defineProperty,pI=(t,e,i)=>e in t?uI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Kt=(t,e,i)=>pI(t,typeof e!="symbol"?e+"":e,i),II={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:gI.RU,isCyrillicRelatedInterface:!0,logoClickable:!1,logoHidden:!1,isTouch:wI(),isMediaSessionEnabled:!0,isPictureInPictureEnabled:!0,isAudioDisabled:!1,callbacks:{uiInfo:{}},tuningConfig:{configName:[]},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showAutoplayNext:!0,showNextPrevButtons:!0},Gn=W(void 0),Nv=si({animationDuration:0,playbackStatusShow:!1}),gp=class extends Vv{constructor(){super(),Kt(this,"svelteStubComponent"),Kt(this,"svelteRootComponent"),Kt(this,"sveltePersistentLayerComponent"),Kt(this,"svelteErrorComponent"),Kt(this,"store"),Kt(this,"microStoresRoot"),Kt(this,"statistics"),Kt(this,"sentry"),Kt(this,"_shadowRoot"),Kt(this,"playerContainer"),Kt(this,"rootContainer"),Kt(this,"stateContainer"),Kt(this,"shadowRootContainer"),Kt(this,"playerId"),Kt(this,"uiConfig"),Kt(this,"coreConfig"),Kt(this,"statisticsConfig"),Kt(this,"interactiveController"),Kt(this,"interactiveContainer"),Kt(this,"graphMadePause"),Kt(this,"currentPlayingVideoIndex",0),Kt(this,"needToRepeatPlaylist",!1),Kt(this,"videoConfig"),Kt(this,"pictureInPictureApi"),Kt(this,"mediaSessionApi"),Kt(this,"unsubscribePlayerPhaseSubscription"),Kt(this,"logger"),Kt(this,"log"),Kt(this,"subscription"),Kt(this,"interactiveSubscription"),Kt(this,"annotationsApi"),Kt(this,"slotsApi"),Kt(this,"focusManager"),Kt(this,"prevIsid"),Kt(this,"isInited",!1),Kt(this,"postponedInitParams",null),Kt(this,"internalsExposure",null),Kt(this,"shadowDOMCallbacksDisabled",!1),Kt(this,"fatalError$",new mI(null)),Kt(this,"createOneStat",(e,i={})=>{var o,r,a,l;if(!this.videoConfig)return;let{albumId:d,statPlace:s,statUserSalt:u,statTrackCode:f,statVKAppId:p,refreshStatAuthToken:v,autoplay:$,isMobile:y,isTouch:h,refDomain:x,deviceId:I,interactiveData:T}=Cc(this.videoConfig,i),N=(o=T==null?void 0:T.projectInfo)==null?void 0:o.pid,L=(a=(r=this.interactiveController)==null?void 0:r.state.isReplay$.getValue())!=null?a:!1;L&&(this.prevIsid=void 0);let{unitedVideoId:E,isClip:k=!1}=e;if(this.uiConfig.features.statistics&&E)try{return new SI({movieId:E,albumId:d,place:s,trackCode:f,vkAppId:p,autoplay:(l=$&&!this.interactiveController)!=null?l:!1,mobile:h!=null?h:y,clip:k,refDomain:x,deviceId:I,isPreviewPlayerView:this.videoConfig.playerView==="preview",...N&&(!this.isInited||L)&&{projectId:Number(N)}},{refreshAuthToken:v,userSalt:u,config:this.statisticsConfig,...this.interactiveController&&{useIsid:!0,isid:this.prevIsid}})}catch(H){console.error(H),this.log({message:H.message})}}),Mc.create("ui"),this.logger=new hI,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.subscription=new Fb,this.interactiveSubscription=new Fb,this.graphMadePause=!1,this.fatalError$.subscribe(e=>{this.unmountComponent(this.svelteErrorComponent),e&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=jr(Ev,{target:this.playerContainer}))})}connectedCallback(){var e,i;if(this.rootContainer)return;this.initPlayerRootContainers();let o=(e=this.getAttribute("stub-title"))!=null?e:void 0,r=(i=this.getAttribute("stub-thumb-url"))!=null?i:void 0,a=si({title:o,thumbUrl:r}),l={target:this.playerContainer,props:a};this.svelteStubComponent=jr(Iv,l),this.sveltePersistentLayerComponent=jr(Mv,{target:this.playerContainer,props:Nv}),this.postponedInitParams&&(this.initPlayer(...this.postponedInitParams),this.postponedInitParams=null)}updatePersistentLayerProps(){if(!this.uiConfig)return;let{playbackStatusNextVideoAnimationDuration:e,features:{playbackStatusShow:i,playbackStatusNextVideoShow:o}}=this.uiConfig;Nv.animationDuration=e,Nv.playbackStatusShow=i&&o}disconnectedCallback(){var e,i,o,r,a,l,d;this.shadowDOMCallbacksDisabled||((e=this.annotationsApi)==null||e.destroy(),(i=this.slotsApi)==null||i.destroy(),(o=this.focusManager)==null||o.destroy(),(r=this.mediaSessionApi)==null||r.destroy(),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteErrorComponent),this.unmountComponent(this.sveltePersistentLayerComponent),this.subscription.unsubscribe(),(a=this.unsubscribePlayerPhaseSubscription)==null||a.call(this),(l=this.interactiveController)==null||l.destroy(),this.interactiveSubscription.unsubscribe(),(d=this.internalsExposure)==null||d.destroy(),Mc.destroy("ui"))}initPlayerRootContainers(){this.rootContainer=document.createElement("div"),this.rootContainer.style.position="relative",this.rootContainer.className="root-container",this.rootContainer.style.width="100%",this.rootContainer.style.height="100%",this.rootContainer.style.minHeight="206px",this.shadowRootContainer=document.createElement("div"),this.shadowRootContainer.style.position="absolute",this.shadowRootContainer.className="shadow-root-container",this.shadowRootContainer.style.width="100%",this.shadowRootContainer.style.height="100%",this._shadowRoot=this.shadowRootContainer.attachShadow({mode:"open"}),this.playerContainer=document.createElement("div"),this.playerContainer.style.all="initial",this.playerContainer.style.display="block",this.playerContainer.style.contain="strict",this.playerContainer.style.width="100%",this.playerContainer.style.height="100%",this._shadowRoot.append(this.playerContainer),this.rootContainer.append(this.shadowRootContainer),this.stateContainer=document.createElement("div"),this.stateContainer.className="state-container",this.stateContainer.style.width="1px",this.stateContainer.style.height="1px",this.stateContainer.style.position="absolute",this.stateContainer.style.backgroundColor="transparent",this.stateContainer.style.left="-100000px",this.append(this.rootContainer),this.append(this.stateContainer)}needToShowNextPrevButtons(){return this.videoConfig?this.videoConfig.videos.length>1&&this.videoConfig.showNextPrevButtons:!1}isNextButtonActive(){return this.videoConfig?this.needToShowNextPrevButtons()&&(this.currentPlayingVideoIndex<this.videoConfig.videos.length-1||this.needToRepeatPlaylist):!1}isPrevButtonActive(){return this.videoConfig?this.needToShowNextPrevButtons()&&(this.currentPlayingVideoIndex>0||this.needToRepeatPlaylist):!1}isControlDisabled(e){var i;let o=(i=this.store)==null?void 0:i.ui.controls.disabledControls$;return(o==null?void 0:o.includes(e))||!1}getNextVideoInfo(){if(!this.videoConfig)return{nextVideoTitle:void 0,nextVideoThumb:void 0};let e=this.videoConfig.videos[this.currentPlayingVideoIndex+1]||{};return{nextVideoTitle:e.title,nextVideoThumb:e.thumbUrl}}createThinOneStat(e,i={}){if(!this.videoConfig)return;let{deviceId:o,preload:r,refreshStatAuthToken:a}=Cc(this.videoConfig,i),{unitedVideoId:l}=e;if(this.uiConfig.features.thinStatistics&&l)return new CI.ThinOneStat({deviceId:o,movieId:l,preload:r,isPreviewPlayerView:this.videoConfig.playerView==="preview"},{config:this.statisticsConfig,refreshAuthToken:a})}createPlayer(e,i={},o){var r,a,l,d,s,u,f,p,v,$;if(!this.videoConfig)return;let{albumId:y,statPlace:h,statAuthToken:x,preload:I,autoplay:T,volume:N,muted:L,fromTime:E,canRewindLive:k,supportLink:K,showAds:H,adsSlotId:z,adsParams:j={},adsAutoplayParam:ae,interfaceLanguage:X,isCyrillicRelatedInterface:ne,logoClickable:J,logoHidden:we,isMobile:pe,isTouch:re,isAudioDisabled:be,isLiveCatchUpMode:$e,fullScreenTarget:ee,failoverHosts:Re,canDownload:fe,callbacks:P,interactiveData:We,showThumbTimer:Se,additionalButtons:Z=[],additionalSettingsMenuItems:ie=[],additionalContextMenuItems:De=[],repeat:Oe,loop:it,saveRate:U,volumeMultiplier:Pe,showEndScreen:ke,showAutoplayNext:He,mediascopePixels:tt}=Cc(this.videoConfig,i),{sources:ye,title:Ie,thumbUrl:Be,unitedVideoId:Lt,isClip:mt=!1,duration:Vt,adsParams:dt={},videoEpisodes:xt,previewThumbsData:Qt,subtitles:Tt,subtitlesForcedLanguage:Mt,live:Rt,adsExternalApi:G}=e;if(!ye&&!Rt){let di=new Error("empty sources and live");this.fatalError$.next(di),(r=P.onCrashed)==null||r.call(P,di.message);return}let Ce={...j,...dt},le=this.getNextVideoInfo(),_e={sources:ye,title:Ie,thumbUrl:Be,subtitles:Tt,subtitlesForcedLanguage:Mt,unitedVideoId:Lt,isClip:mt,live:Rt,albumId:y,statPlace:h,autoplay:T,muted:L,volume:N,fromTime:E,canRewindLive:k,showAds:H,adsSlotId:z,adsParams:Ce,adsAutoplayParam:ae,duration:Vt,logoClickable:J,logoHidden:we,isTouch:re!=null?re:pe,repeat:Oe,loop:it,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:le.nextVideoTitle,endScreenVideoThumb:le.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()},Me={pictureInPictureApi:this.pictureInPictureApi,annotationsApi:this.annotationsApi,slotsApi:this.slotsApi,focusManager:this.focusManager};this.log({message:`create player, props: ${JSON.stringify(_e)}`});let rt=(a=this.interactiveController)==null?void 0:a.state.statistics$.getValue(),pt=(rt==null?void 0:rt.oneStat)||this.createOneStat(e,i),ue=this.createThinOneStat(e,i),ze;tt&&(ze=new TI({pixels:tt})),(pt||ue)&&(this.statistics=new Gu(pt,ue,ze,rt==null?void 0:rt.statSubscription)),this.uiConfig.features.sentry&&this.uiConfig.sentry.dsn&&new Va(this.uiConfig.sentry,{version:Ll,env:hu},{movieId:Lt,albumId:y,place:h,autoplay:(l=T&&!this.interactiveController)!=null?l:!1,mobile:re!=null?re:pe,clip:mt}),this.interactiveController&&((u=this.prevIsid)!=null||(this.prevIsid=(s=(d=this.statistics)==null?void 0:d.oneStat)==null?void 0:s.isid$.getValue())),this.sentry={...this.sentry,...Va.getInstance()};let ct=!!We,Nt=[],Ht="tooltip_interactive_go_back_disabled_first";if(ct&&this.interactiveController){let di=this.interactiveController.state.isInitialChapter$.getValue(),pi=this.interactiveController.getHistoryState();di&&Nt.push("REPLAY_BUTTON"),this.interactiveController.getIsSeekable().getValue()||Nt.push("SEEK_TO_INTERACTIVE_BUTTON"),pi.hasPrevChapter$.getValue()||(Nt.push("PLAY_PREV_CHAPTER_BUTTON"),di||(pi.isGoBackLimited$.getValue()?Ht="tooltip_interactive_go_back_disabled_limit":Ht="tooltip_interactive_go_back_disabled"))}let Gt=()=>{var di;this.isInited=!1,this.prevIsid=void 0;let pi=(o==null?void 0:o.info.isEnded$.getValue())&&((di=this.interactiveController)==null?void 0:di.state.isEndChapter$.getValue());P.onReplayInteractiveVideo&&!pi?P.onReplayInteractiveVideo():this.replayInteractiveVideo()},vi=Oe&&this.videoConfig.videos.length===1;this.store=j_({player:o,interfaceLanguage:X,isCyrillicRelatedInterface:ne,videoId:Lt,isClip:mt,isLiveCatchUpMode:$e,isAudioDisabled:be,statAuthToken:x,callbacks:P,webApi:Me,videoEpisodes:xt,previewThumbsData:Qt,canDownload:fe,uiConfig:this.uiConfig,coreConfig:this.coreConfig,disabledControls:Nt,isInteractive:ct,saveRate:U,interactiveRanges$:(f=this.interactiveController)==null?void 0:f.state.interactiveRanges$,isInteractiveTime$:(p=this.interactiveController)==null?void 0:p.state.isInteractiveTime$,stopPlayer:()=>this.stop(),replayInteractive:Gt,playPrevChapterDisabledTooltip:Ht,hasInteractiveBranches:!!(($=(v=this.interactiveController)==null?void 0:v.getChapterBranches())!=null&&$.length),additionalButtons:this.uiConfig.features.additionalButtons?Z:[],additionalSettingsMenuItems:ie!=null?ie:[],additionalContextMenuItems:De!=null?De:[],playPrevVideo:()=>this.playPrevVideo(),playNextVideo:()=>this.playNextVideo(),onVideoChanged:di=>{var pi;return(pi=this.sveltePersistentLayerComponent)==null?void 0:pi.startVideoChangedAnimation(di)},looped:this.uiConfig.features.useLoopSetting?it:vi,statistics:this.statistics,internalsExposure:this.internalsExposure,playerView:this.videoConfig.playerView,playerId:this.playerId});let{stores:Qi}=this.microStoresRoot=Bb(),Pt=()=>{var di,pi,$t,ci,qt,Gi;if(!this.store||!this.microStoresRoot||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(ot=>{var Ue;return(Ue=P==null?void 0:P.onCurrentFormatChanged)==null?void 0:Ue.call(P,ot)})),this.subscription.add(Qi.interactiveControlsOpacity$.subscribe(ot=>{var Ue;ot!==null&&((Ue=this==null?void 0:this.interactiveController)==null||Ue.setDisabledControls(ot))})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(ot=>{var Ue;return(Ue=P==null?void 0:P.onThroughputEstimationChanged)==null?void 0:Ue.call(P,ot)})),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(ot=>{var Ue;return(Ue=P==null?void 0:P.onTrafficSavingEnabledChanged)==null?void 0:Ue.call(P,ot)})),this.subscription.add(this.store.state.highQualityEnabled$.subscribe(ot=>{var Ue;return(Ue=P==null?void 0:P.onHighQualityEnabledChanged)==null?void 0:Ue.call(P,ot)})),this.subscription.add(this.store.state.isAutoQualityEnabled$.subscribe(ot=>{var Ue;return(Ue=P==null?void 0:P.onAutoQualityEnabledChanged)==null?void 0:Ue.call(P,!!ot)})),this.subscription.add(new _I(ot=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(Ue=>ot.next(Ue)))}).pipe(yI(1)).subscribe(ot=>{var Ue;return(Ue=P==null?void 0:P.onCurrentPlaybackRateChanged)==null?void 0:Ue.call(P,ot)})),this.subscription.add(this.store.state.volume$.subscribe(ot=>{var Ue;return(Ue=P==null?void 0:P.onVolumeChange)==null?void 0:Ue.call(P,ot)})),this.subscription.add(this.store.state.muted$.subscribe(ot=>{var Ue,gi,So,Ho;if(ot)(Ue=P==null?void 0:P.onMute)==null||Ue.call(P);else{let Uo=(So=((gi=this.store)==null?void 0:gi.state.volume$)&&he(this.store.state.volume$))!=null?So:0;(Ho=P==null?void 0:P.onUnmute)==null||Ho.call(P,Uo)}})),this.subscription.add(this.store.state.videoBitrate$.subscribe(ot=>{var Ue;return(Ue=P==null?void 0:P.onVideoBitrateChanged)==null?void 0:Ue.call(P,ot)})),this.subscription.add(this.store.state.isInteractiveTime$.subscribe(ot=>{var Ue;let gi=(Ue=this.store)==null?void 0:Ue.ui.controls.disabledControls$;gi&&(ot&&!gi.includes(Ad)&&gi.add(Ad),ot||gi.remove(Ad))})),this.subscription.add(this.store.ui.isFullscreen.subscribe(async ot=>{var Ue;if(!Hb.browser.isSamsungBrowser||!ot||!this.interactiveController)return;document.fullscreenElement===this.shadowRootContainer&&await this.replayInteractiveChapter((Ue=this.videoConfig)==null?void 0:Ue.callbacks.onExternalFullscreenExit)})),this.statistics&&this.statistics.oneStat&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(ot=>{var Ue;return(Ue=P==null?void 0:P.onVSIDChanged)==null?void 0:Ue.call(P,ot)})),this.initMediaSession(),D(Gn,{interactiveController:this.interactiveController,interactiveContainer:this.interactiveContainer,sources:ye,store:this.store,microStoresRoot:this.microStoresRoot,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:Ie,thumbUrl:Be,subtitles:Tt,subtitlesForcedLanguage:Mt,live:Rt,preload:I,autoplay:T,muted:L,volume:N,fromTime:E,canRewindLive:k,supportLink:K,showAds:H,adsSlotId:z,adsParams:Ce,adsAutoplayParam:ae,duration:Vt,logoClickable:J,logoHidden:we,isMobile:re!=null?re:pe,failoverHosts:Re,fullScreenTarget:ee,saveRate:U,shadowRootContainer:this.shadowRootContainer,showMiniTimer:Se,outerContainerRef:this.rootContainer,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:le.nextVideoTitle,endScreenVideoThumb:le.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist(),playPrevChapter:()=>this.playPrevChapter(),seekToInteractive:()=>this.seekToInteractive(),volumeMultiplier:Pe,showEndScreen:ke,showAutoplayNext:He,adsExternalApi:G,getVideoDeeplink:this.videoConfig.getVideoDeeplink},!0);let Yi={target:this.playerContainer,props:n(Gn)};this.svelteRootComponent=jr(Cv,Yi),this.addPlayerInfoSubscriptions(),this.isInited||(this.isInited=!0,($t=(pi=(di=this.videoConfig)==null?void 0:di.callbacks)==null?void 0:pi.onInited)==null||$t.call(pi)),(ci=this.internalsExposure)==null||ci.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig,logger:this.logger,log:this.log}),this.uiConfig.devNullLog&&((Gi=(qt=this.videoConfig)==null?void 0:qt.callbacks)!=null&&Gi.onDevNullLog)?Mc.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):Mc.destroy("ui")};this.coreConfig.asyncResolveClientChecker?Hb.isInited$.subscribe(di=>{di&&(console.log("UI SDK async start"),Pt())}):Pt()}addPlayerInfoSubscriptions(){var e,i;let o=this.store,r=(e=this.microStoresRoot)==null?void 0:e.stores;if(!o||!r)return;let a=(i=this.videoConfig)==null?void 0:i.callbacks;a&&this.subscription.add(o.playerPhase.subscribe(d=>{var s;return(s=a.onPlayerPhaseChanged)==null?void 0:s.call(a,d)})).add(o.state.playbackState$.subscribe(d=>{var s;return d&&((s=a.onPlaybackStateChanged)==null?void 0:s.call(a,d))})).add(o.state.playbackStateRealistic$.subscribe(d=>{d?this.stateContainer.setAttribute("data-playback-state",d):this.stateContainer.removeAttribute("data-playback-state")})).add(o.state.isLive$.subscribe(d=>{var s;return(s=a.onIsLiveChanged)==null?void 0:s.call(a,d)})).add(o.state.isActiveLive$.subscribe(d=>{var s;return(s=a.onIsActiveLiveChanged)==null?void 0:s.call(a,d)})).add(o.state.isAudioAvailable$.subscribe(d=>{var s;return(s=a.onIsAudioAvailableChanged)==null?void 0:s.call(a,d)})).add(o.state.currentQuality$.subscribe(d=>{var s;return(s=a.onCurrentQualityChanged)==null?void 0:s.call(a,d)})).add(o.state.availableQualities$.subscribe(d=>{var s;return(s=a.onAvailableQualitiesChanged)==null?void 0:s.call(a,d.map(({value:u})=>u).filter(u=>u!=="auto"))})).add(o.state.availableAudioStreams$.subscribe(d=>{d.length>1&&a.onAudioLanguagesAvailable&&a.onAudioLanguagesAvailable()})).add(r.pictureInPicture$.isActive$.subscribe(d=>{var s,u;return d?(s=a.onPiPEnter)==null?void 0:s.call(a):(u=a.onPiPExit)==null?void 0:u.call(a)}));let l=a==null?void 0:a.uiInfo;l&&this.subscription.add(o.ui.controlsVisible.subscribe(d=>{var s;return(s=l.onControlsVisibleChanged)==null?void 0:s.call(l,d)})).add(o.ui.isMobile.subscribe(d=>{var s;return(s=l.onIsMobileChanged)==null?void 0:s.call(l,d)})).add(o.ui.playerSize.subscribe(d=>{var s;return(s=l.onPlayerSizeChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.prevButton.subscribe(d=>{var s;return(s=l.onPrevButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.playButton.subscribe(d=>{var s;return(s=l.onPlayButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.replayButton.subscribe(d=>{var s;return(s=l.onReplayButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.nextButton.subscribe(d=>{var s;return(s=l.onNextButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.playPrevChapterButton.subscribe(d=>{var s;return(s=l.onPlayPrevChapterChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.seekToInteractiveButton.subscribe(d=>{var s;return(s=l.onSeekToInteractiveButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.interactiveGraphButton.subscribe(d=>{var s;return(s=l.onGraphButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.liveButton.subscribe(d=>{var s;return(s=l.onLiveButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.time.subscribe(d=>{var s;return(s=l.onTimeUpdateChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.episodes.subscribe(d=>{var s;return(s=l.onEpisodesChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.subtitles.subscribe(d=>{var s;return(s=l.onSubtitlesChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.topLeft.subscribe(d=>{var s;return(s=l.onTopLeftControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.topRight.subscribe(d=>{var s;return(s=l.onTopRightControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.bottomLeft.subscribe(d=>{var s;return(s=l.onBottomLeftControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.bottomRight.subscribe(d=>{var s;return(s=l.onBottomRightControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.middle.subscribe(d=>{var s;return(s=l.onMiddleControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.bottom.subscribe(d=>{var s;return(s=l.onBottomControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.videoTitleInfo.subscribe(d=>{var s;return(s=l.onTitleChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.settings.subscribe(d=>{var s;return(s=l.onSettingsChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.fullscreen.subscribe(d=>{var s;return(s=l.onFullscreenChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.chromecast.subscribe(d=>{var s;return(s=l.onChromecastChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.pip.subscribe(d=>{var s;return(s=l.onPipChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.vkLogo.subscribe(d=>{var s;return(s=l.onVkLogoChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.interactiveTimeIndicator.subscribe(d=>{var s;return(s=l.onInteractiveTimeIndicatorChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.timeline.subscribe(d=>{var s;return(s=l.onTimelineChanged)==null?void 0:s.call(l,d)}))}playNextVideo(){this.videoConfig&&(this.currentPlayingVideoIndex++,this.currentPlayingVideoIndex>=this.videoConfig.videos.length&&(this.currentPlayingVideoIndex=0),this.log({message:`play next video, index: ${this.currentPlayingVideoIndex}`}),this.createPlayerWithCurrentVideo())}playPrevVideo(){this.videoConfig&&(this.currentPlayingVideoIndex--,this.currentPlayingVideoIndex<0&&(this.currentPlayingVideoIndex=this.videoConfig.videos.length-1),this.log({message:`play prev video, index: ${this.currentPlayingVideoIndex}`}),this.createPlayerWithCurrentVideo())}createPlayerWithCurrentVideo(e,i=!0){var o;if(!this.videoConfig)return;let r=this.videoConfig.videos[this.currentPlayingVideoIndex];if(!r){this.log({message:"no next video"});return}this.isInited&&Rv(r.unitedVideoId)&&((o=this.store)==null||o.actions.internal.nextMovie(r.unitedVideoId)),this.unmountComponent(this.svelteRootComponent),this.createPlayer(r,{autoplay:i,fromTime:0},e)}playPrevChapter(){var e;(e=this.interactiveController)==null||e.playPrevChapter()}seekToInteractive(){var e;let i=(e=this.interactiveController)==null?void 0:e.getNextInteractiveStartTime();typeof i=="number"&&this.seekTime(i/1e3)}async initInteractives(){var e,i,o,r,a,l;if((e=this.videoConfig)!=null&&e.interactiveData)try{let{Interactives:d}=await import("@vkontakte/videoplayer-interactive/es2018");this.interactiveContainer=document.createElement("div"),this.interactiveContainer.classList.add("interactive-root");let s=(i=this.store)==null?void 0:i.interfaceLanguage$,u=s?he(s):this.videoConfig.interfaceLanguage,{projectInfo:f,initChapterId:p,historyApi:v,videoLoader:$}=this.videoConfig.interactiveData;this.interactiveController=new d({parentElement:this.interactiveContainer,fullscreenTargetElement:this.playerContainer,lang:u,graph:this.uiConfig.features.interactiveGraph,projectInfo:f,initChapterId:p,historyApi:v,vkVideoLoader:$,lastFrame:this.uiConfig.features.interactiveLastFrame,permanentTextControls:this.uiConfig.features.interactiveTextPermanent,interactiveTimeOpenUri:this.uiConfig.features.interactiveTimeOpenUri,initSeamless:!0,config:this.uiConfig.interactive,coreConfig:this.coreConfig,createOneStat:this.createOneStat,isTouch:this.videoConfig.isTouch,animationsFeatureToggles:{areaControlShadow:this.uiConfig.features.interactiveAreaControlShadow,controlsExpectTimeBlinkAnimation:this.uiConfig.features.interactiveControlsExpectTimeBlinkAnimation,controlsTapPlace:this.uiConfig.features.interactiveControlsTapPlace,controlsFillAnimation:this.uiConfig.features.interactiveControlsFillAnimation,controlsHideAnimation:this.uiConfig.features.interactiveControlsHideAnimation},endChapterHistoryFix:this.uiConfig.features.interactiveHistoryEndChapterFix});let{isInteractiveExpectation$:y,isSeekable$:h}=this.interactiveController.state;this.uiConfig.features.seekToInteractive&&this.subscription.add(h.subscribe(I=>{if(!this.isInited)return;let T=this.store;I?T.ui.controls.disabledControls$.remove("SEEK_TO_INTERACTIVE_BUTTON"):T.ui.controls.disabledControls$.add("SEEK_TO_INTERACTIVE_BUTTON")})),this.subscription.add(y.subscribe(I=>{this.store&&this.store.state.isInteractiveExpectation$.set(I)}));let x=!0;if(this.subscription.add(this.interactiveController.events.playerChanged$.subscribe(I=>{if(!this.videoConfig)return;this.videoConfig.videos[this.currentPlayingVideoIndex]={...I.config,title:(f==null?void 0:f.title)||I.config.title};let T=x?this.videoConfig.autoplay:!0;this.createPlayerWithCurrentVideo(I.player,T),x&&(x=!1)})),this.interactiveSubscription.add(this.interactiveController.events.interactiveActionChoice$.subscribe(({type:I,actionType:T})=>{var N,L,E,k,K,H;if(!this.store||!this.microStoresRoot)return;let z=y.getValue();if(I==="action-choice"&&T==="setRandomBranch"&&(this.microStoresRoot.stores.graphIsOpened$.set(!1),this.store.ui.controls.disabledControls$.remove(Ld)),I==="action-choice-canceled"){let j=he(this.store.state.isPlaying$)||z;if(((E=(N=this.videoConfig)==null?void 0:N.isTouch)!=null?E:(L=this.videoConfig)!=null&&L.isMobile)&&j){this.store.ui.interactiveHideMobileControls.set(!0);return}(H=(k=this.videoConfig)==null?void 0:(K=k.callbacks).onDisabledInteractiveClick)==null||H.call(K)}})),this.interactiveSubscription.add(this.interactiveController.events.interactiveContainerFakeRemoved$.subscribe(({type:I,removeAllOpenURI:T})=>{this.store&&I==="container-fake-removed"&&T&&this.store.ui.controls.disabledControls$.remove(Ld)})),await this.interactiveController.setManifest(this.videoConfig.interactiveData.manifest),(r=(o=this.videoConfig)==null?void 0:o.callbacks)!=null&&r.onInteractiveHistoryChanged){let I=this.interactiveController.getHistoryState();this.subscription.add(I.history$.subscribe(T=>{var N,L,E;T.length&&((E=(L=(N=this.videoConfig)==null?void 0:N.callbacks)==null?void 0:L.onInteractiveHistoryChanged)==null||E.call(L,T))}))}(l=(a=this.videoConfig)==null?void 0:a.callbacks)!=null&&l.onInteractiveChapterChanged&&this.subscription.add(this.interactiveController.events.chapterChanged$.subscribe(I=>{var T,N,L;(L=(T=this.videoConfig)==null?void 0:(N=T.callbacks).onInteractiveChapterChanged)==null||L.call(N,I.chapter,I.manifestVideo)})),this.uiConfig.features.interactiveTimeIndicator&&this.subscription.add(this.interactiveController.events.noInteraction$.subscribe(()=>{var I,T,N,L;(I=this.microStoresRoot)==null||I.stores.showInteractiveTimeIndicatorTooltip$.set(!0,!0),(L=(T=this.videoConfig)==null?void 0:(N=T.callbacks).onInteractiveTimeIndicatorClick)==null||L.call(N)})),this.interactiveSubscription.add(this.interactiveController.events.error$.subscribe(I=>{this.log({message:I.toString()})}))}catch(d){this.log({message:d.message})}}initPlayer(e,i={}){var o,r,a,l,d,s,u,f,p,v,$,y,h,x,I,T,N,L,E,k,K,H,z,j,ae;if(!this.isConnected){this.postponedInitParams=[e,i];return}if(!Array.isArray(e.videos)||e.videos.length===0&&!e.interactiveData){let X=new Error("empty videos");this.fatalError$.next(X),(r=(o=e.callbacks)==null?void 0:o.onCrashed)==null||r.call(o,X.message);return}else this.fatalError$.next(null);if(this.videoConfig=Cc(II,vI(e,X=>X instanceof Vv?X:void 0)),this.playerId=xI(e.playerId),this.uiConfig=Th((a=i.ui)!=null?a:{}),this.updatePersistentLayerProps(),this.coreConfig=(l=i.core)!=null?l:{configName:[]},this.statisticsConfig=(d=i.statistics)!=null?d:{},this.uiConfig.features.forcePlayerDisplayBlock&&(this.rootContainer&&(this.rootContainer.style.minHeight="unset"),this.style.display="block",this.style.width="100%",this.style.height="100%"),this.videoConfig.playerView==="preview"&&(this.playerContainer.style.contain="none"),this.sentry={config:(s=this.uiConfig.sentry)!=null?s:{}},this.uiConfig.features.exposeInternalsToGlobal&&((u=this.internalsExposure)!=null||(this.internalsExposure=new $I("ui",this.playerId))),Mc.push("ui",{key:"videoplayer_embed",strings:["new","player_init_player","ads.enable: "+this.uiConfig.ads.enable,"showAds: "+((f=this.videoConfig)==null?void 0:f.showAds)],numbers:[fI()]}),Rv(this.videoConfig.isMediaSessionEnabled)&&(this.uiConfig.features.mediaSession=(v=(p=this.uiConfig.features.mediaSession)!=null?p:this.videoConfig.isMediaSessionEnabled)!=null?v:!0),Rv(this.videoConfig.isPictureInPictureEnabled)&&(this.uiConfig.features.pip=(y=($=this.uiConfig.features.pip)!=null?$:this.videoConfig.isPictureInPictureEnabled)!=null?y:!0,this.uiConfig.features.dpip=(x=(h=this.uiConfig.features.dpip)!=null?h:this.videoConfig.isPictureInPictureEnabled)!=null?x:!0),this.uiConfig.ads.paramsOverride={preview:(I=this.uiConfig.ads.preview)!=null?I:this.videoConfig.adsPreviewParam,...this.uiConfig.ads.paramsOverride},this.videoConfig.isTouch=(N=(T=this.uiConfig.isMobile)!=null?T:this.videoConfig.isTouch)!=null?N:this.videoConfig.isMobile,(L=this.videoConfig).autoplay&&(L.autoplay=this.uiConfig.features.autoplay),this.videoConfig.showAds=(E=this.uiConfig.ads.enable)!=null?E:this.videoConfig.showAds,this.videoConfig.adsSlotId=(k=this.uiConfig.ads.slot)!=null?k:this.videoConfig.adsSlotId,this.videoConfig.logoHidden=!((K=this.uiConfig.showLogo)!=null?K:!this.videoConfig.logoHidden),(H=this.videoConfig).canRewindLive&&(H.canRewindLive=this.uiConfig.features.liveRewind),this.videoConfig.supportLink=(z=this.videoConfig.supportLink)!=null?z:this.uiConfig.supportLink,this.videoConfig.showEndScreen=this.uiConfig.features.endScreen&&this.videoConfig.showEndScreen,this.videoConfig.showAutoplayNext=this.uiConfig.features.autoplayNext&&this.videoConfig.showAutoplayNext,this.videoConfig.showNextPrevButtons=this.uiConfig.features.nextPrevButtons&&this.videoConfig.showNextPrevButtons,this.currentPlayingVideoIndex=this.videoConfig.videoIndex&&((j=this.videoConfig.videos)!=null&&j[this.videoConfig.videoIndex])?this.videoConfig.videoIndex:0,this.needToRepeatPlaylist=this.videoConfig.repeat,this.uiConfig.features.pip){let X={enabled:this.videoConfig.pipEnabled};this.uiConfig.features.dpip?this.pictureInPictureApi=cp.getLatestSupportedVersion(X):this.pictureInPictureApi=new Ra(X)}this.mediaSessionApi=this.uiConfig.features.mediaSession?new dp:void 0,this.slotsApi=this.uiConfig.features.slots?new rp(this.uiConfig.disabledSlotIds):void 0,this.annotationsApi=this.uiConfig.features.annotations?new up(this.uiConfig.features.annotationsInside):void 0,this.annotationsApi&&!this.uiConfig.features.annotationsInside&&this.annotationsApi.init(this.rootContainer),this.focusManager=this._shadowRoot?new vp(this._shadowRoot):void 0,this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteErrorComponent),this.isInited=!1,this.prevIsid=void 0,this.interactiveController&&(this.interactiveController.destroy(),this.interactiveController=void 0,this.interactiveSubscription.unsubscribe()),this.videoConfig.interactiveData?this.initInteractives():this.createPlayer(this.videoConfig.videos[this.currentPlayingVideoIndex]),Mb(this.pictureInPictureApi)&&this.pictureInPictureApi.setPlayerDomElement(this.playerContainer,this._shadowRoot),(ae=this.slotsApi)==null||ae.init(this.shadowRootContainer,this.store)}isOneVideoPlaylist(){return this.videoConfig?this.videoConfig.videos.length===1:!1}updateVideos(e,i){if(!this.videoConfig)return;this.log({message:`update ${i} videos, videos: ${JSON.stringify(e)}`}),i==="prev"?(this.videoConfig.videos.splice(0,this.currentPlayingVideoIndex),this.videoConfig.videos.unshift(...e),this.currentPlayingVideoIndex=e.length):i==="next"&&(this.videoConfig.videos.splice(this.currentPlayingVideoIndex+1),this.videoConfig.videos.push(...e));let o=this.getNextVideoInfo();n(Gn)&&(n(Gn).showNextPrevButtons=this.needToShowNextPrevButtons(),n(Gn).nextButtonActive=this.isNextButtonActive(),n(Gn).prevButtonActive=this.isPrevButtonActive(),n(Gn).endScreenVideoTitle=o.nextVideoTitle,n(Gn).endScreenVideoThumb=o.nextVideoThumb,n(Gn).isOneVideoPlaylist=this.isOneVideoPlaylist())}updatePrevVideos(e){this.updateVideos(e,"prev")}updateNextVideos(e){this.updateVideos(e,"next")}initMediaSession(){var e,i;this.mediaSessionApi&&((e=this.unsubscribePlayerPhaseSubscription)==null||e.call(this),this.mediaSessionApi.clearSubscriptions(),this.unsubscribePlayerPhaseSubscription=(i=this.store)==null?void 0:i.playerPhase.subscribe(o=>{o==="video"?this.setupMediaSessionForVideo():o==="ads"&&this.setupMediaSessionForAds()}))}setupMediaSessionForVideo(){if(!(!this.videoConfig||!this.mediaSessionApi))try{let{title:e,thumbUrl:i}={...this.videoConfig.videos[this.currentPlayingVideoIndex]},o=[["play",()=>this.play()],["pause",()=>this.pause()],["seekto",r=>this.seekTime(r.seekTime)]];this.videoConfig.videos.length>1&&(this.currentPlayingVideoIndex<this.videoConfig.videos.length-1&&o.push(["nexttrack",()=>{var r,a,l;if(this.uiConfig.features.useCallbackForMediaSessionNextPrevClick)try{(l=(a=(r=this.videoConfig)==null?void 0:r.callbacks)==null?void 0:a.onNextVideoClick)==null||l.call(a)}catch(d){this.log({message:"onNextVideoClick callback failed to execute"})}else this.playNextVideo()}]),this.currentPlayingVideoIndex>0&&o.push(["previoustrack",()=>{var r,a,l;if(this.uiConfig.features.useCallbackForMediaSessionNextPrevClick)try{(l=(a=(r=this.videoConfig)==null?void 0:r.callbacks)==null?void 0:a.onPrevVideoClick)==null||l.call(a)}catch(d){this.log({message:"onPrevVideoClick callback failed to execute"})}else this.playPrevVideo()}])),this.mediaSessionApi.setMetaData({title:e,thumbUrl:i}),this.mediaSessionApi.updateActionHandlers(o),this.mediaSessionApi.attachToStore(this.store)}catch(e){this.log({message:e.message})}}setupMediaSessionForAds(){if(!(!this.videoConfig||!this.mediaSessionApi))try{let e="Реклама",i=[["play",()=>this.play()],["pause",()=>this.pause()]];this.mediaSessionApi.setMetaData({title:e}),this.mediaSessionApi.updateActionHandlers(i),this.mediaSessionApi.attachToStore(this.store)}catch(e){this.log({message:e.message})}}moveTo(e){this.shadowDOMCallbacksDisabled=!0,e.append(this),this.shadowDOMCallbacksDisabled=!1}play(){var e,i,o,r;this.isControlDisabled("PLAY_BUTTON")||(e=this.store)!=null&&e.playerPhase.is("LiveWaitingStart")||(i=this.store)!=null&&i.playerPhase.is("LiveWaitingRecover")||(o=this.store)!=null&&o.playerPhase.is("LiveWaitingRecord")||(this.log({message:"play"}),(r=this.svelteRootComponent)==null||r.play())}pause(){var e;this.log({message:"pause"}),(e=this.svelteRootComponent)==null||e.pause()}stop(){var e;if(!this.videoConfig)return;this.log({message:"stop"});let i=!!this.interactiveController;i&&(this.interactiveController.destroy(),this.interactiveController=void 0,this.interactiveContainer=void 0,this.interactiveSubscription.unsubscribe()),this.unmountComponent(this.svelteStubComponent),(e=this.mediaSessionApi)==null||e.destroy();let o=this.videoConfig.videos[0];o&&(this.unmountComponent(this.svelteRootComponent),i?(this.videoConfig.autoplay=!1,this.initInteractives()):this.createPlayer(o))}setMuted(e){var i;this.log({message:`set muted, muted: ${e}`}),(i=this.svelteRootComponent)==null||i.setMuted(e)}toggleSubtitle(){var e;this.log({message:"toggle subtitle"}),(e=this.svelteRootComponent)==null||e.toggleSubtitle()}changeSubtitle(e,i){var o;this.log({message:"change subtitle"}),(o=this.svelteRootComponent)==null||o.changeSubtitle(e,i)}hideControls(){var e;this.log({message:"hide controls"}),(e=this.svelteRootComponent)==null||e.hideControls()}showControls(){var e;this.log({message:"show controls"}),(e=this.svelteRootComponent)==null||e.showControls()}setPiPEnabled(e){var i,o;(o=(i=this.store)==null?void 0:i.webApi.pictureInPictureApi)==null||o.setEnabled(e)}setVolume(e){var i;this.log({message:`set volume, volume: ${e}`}),(i=this.svelteRootComponent)==null||i.setVolume(e)}setRepeat(e){this.log({message:`set repeat, repeat: ${e}`}),this.needToRepeatPlaylist=e,n(Gn)&&(n(Gn).needToRepeatPlaylist=this.needToRepeatPlaylist,n(Gn).showNextPrevButtons=this.needToShowNextPrevButtons(),n(Gn).nextButtonActive=this.isNextButtonActive(),n(Gn).prevButtonActive=this.isPrevButtonActive())}seekTime(e){var i;this.isControlDisabled("TIMELINE")||(this.log({message:`seek time, time: ${e}`}),(i=this.svelteRootComponent)==null||i.seekTime(e))}seekEpisodeStartTime(e){var i;this.log({message:`seek episode start time, time: ${e}`}),(i=this.svelteRootComponent)==null||i.seekEpisodeStartTime(e)}returnFocusToEpisodes(){var e;this.log({message:"return focus to episodes button"}),(e=this.svelteRootComponent)==null||e.returnFocusToEpisodes()}setPlaybackRate(e){var i;this.log({message:`set playback rate to: ${e}`}),(i=this.svelteRootComponent)==null||i.setPlaybackRate(e)}setAutoQualityLimits(e){var i,o,r;this.log({message:`set auto quality limitation. Max: ${(i=e.max)!=null?i:"none"}. Min: ${(o=e.min)!=null?o:"none"}`}),(r=this.svelteRootComponent)==null||r.setAutoQualityLimits(e)}setAutoQuality(){var e;(e=this.svelteRootComponent)==null||e.setAutoQuality()}toggleTrafficSaving(e){var i;(i=this.svelteRootComponent)==null||i.toggleTrafficSaving(e)}toggleHighQuality(e){var i;(i=this.svelteRootComponent)==null||i.toggleHighQuality(e)}changeAudioStream(e){var i;(i=this.svelteRootComponent)==null||i.changeAudioStream(e)}addLanguage(e){var i;(i=this.store)==null||i.actions.internal.addLanguage(e)}async setLanguage(e){var i;await((i=this.store)==null?void 0:i.actions.internal.setLanguage(e))}setLiveStart(e){var i,o;let r=this.isLiveTailPlaying();this.log({message:`live started: liveTailPlaying = ${r}`}),r||((i=this.store)==null||i.actions.internal.setLiveWaitingRecover(!1),(o=this.store)==null||o.actions.internal.setLiveWaitingStart(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!0}))}setLiveWaitingStart(){var e;this.log({message:"live waiting"}),(e=this.store)==null||e.actions.internal.setLiveWaitingStart(!0)}isLiveTailPlaying(){var e;let i=(e=this.store)==null?void 0:e.getPlayer();if(!i)return!1;let{info:o}=i;return o.canPlayLiveTailBuffer$.getValue()&&!o.isStalled$.getValue()&&!o.atLiveEdge$.getValue()}setLiveWaitingRecover(e=!1){var i;let o=this.isLiveTailPlaying(),r=e||!o;this.log({message:`live waiting recover: forceImmediate = ${e}, liveTailPlaying = ${o}`});let a=()=>{var l;(l=this.store)==null||l.actions.internal.setLiveWaitingRecover(!0)};r&&a(),(i=this.store)!=null&&i.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var l;r||a(),(l=this.store)==null||l.destroy()})}setLiveWaitingRecord(){var e;let i=this.isLiveTailPlaying(),o=!i;this.log({message:`live waiting record: liveTailPlaying = ${i}`});let r=()=>{var a;(a=this.store)==null||a.actions.internal.setLiveWaitingRecord(!0)};o&&r(),(e=this.store)!=null&&e.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var a;o||r(),(a=this.store)==null||a.destroy()})}setLiveEnd(e){var i;let o=this.isLiveTailPlaying(),r=!o;this.log({message:`live ended: liveTailPlaying = ${o}`});let a=()=>{var l,d;(l=this.store)==null||l.actions.internal.setLiveWaitingRecover(!1),(d=this.store)==null||d.actions.internal.setLiveWaitingRecord(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!1})};if(r){a();return}(i=this.store)!=null&&i.callbacks&&(this.store.callbacks.onLiveEnded=a)}setLiveLowLatency(e){var i;this.log({message:"live switch to low latency "+e}),(i=this.store)==null||i.actions.external.setLiveLowLatency(e)}setLooped(e){var i;(i=this.store)==null||i.actions.internal.setLooped(e)}getDebugData(){var e,i;return(i=(e=this.store)==null?void 0:e.actions.internal.getDebugTextData())!=null?i:""}getDeviceId(){var e,i,o;return(o=(i=(e=this.statistics)==null?void 0:e.oneStat)==null?void 0:i.getDeviceId())!=null?o:void 0}replayInteractiveVideo(){this.interactiveController&&this.interactiveController.setChapter()}async replayInteractiveChapter(e){var i,o;if(this.interactiveController&&((i=this.store)!=null&&i.state.positionExact$)){let r=he(this.store.state.positionExact$),l=he(this.store.state.interactiveEpisodes$).find(s=>!s.completed);this.interactiveController.events.playerChanged$.pipe(bI()).subscribe(()=>{l&&r>=l.time?this.seekTime(l.time):this.seekTime(r),e==null||e()});let d=this.interactiveController.getCurrentChapter();await this.interactiveController.setChapter({chapterId:(o=d==null?void 0:d.chapter)==null?void 0:o.id,pushToHistory:!1})}}showInteractiveIndicatorTooltip(e,i=!1){var o;(o=this.microStoresRoot)==null||o.stores.showInteractiveTimeIndicatorTooltip$.set(e,i)}switchToActiveLive(){var e;(e=this.store)==null||e.actions.internal.switchToActiveLive()}updateAdditionalSettingsItem(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalSettingsItem(e,i)}addAdditionalSettingsItem(e){var i;(i=this.store)==null||i.actions.external.addAdditionalSettingsItem(e)}removeAdditionalSettingsItem(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalSettingsItem(e)}updateAdditionalContextItem(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalContextItem(e,i)}addAdditionalContextItem(e){var i;(i=this.store)==null||i.actions.external.addAdditionalContextItem(e)}removeAdditionalContextItem(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalContextItem(e)}updateAdditionalButton(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalButton(e,i)}addAdditionalButton(e){var i;(i=this.store)==null||i.actions.external.addAdditionalButton(e)}removeAdditionalButton(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalButton(e)}updateStatContext(e){this.statistics&&(this.statistics.oneStat&&this.statistics.oneStat.updateContext(e),this.statistics.thinOneStat&&this.statistics.thinOneStat.updateContext(e))}handleTimerNextVideo(e){var i;(i=this.store)==null||i.actions.internal.setTimerNextVideoRunning(e)}togglePictureInPicture(){var e;(e=this.store)==null||e.actions.internal.togglePictureInPicture()}focus(){var e,i,o;(o=(i=(e=this.svelteRootComponent)==null?void 0:e.keyboardControls)==null?void 0:i.focus)==null||o.call(i)}restoreFocus(){var e;(e=this.focusManager)==null||e.restoreFocus()}handleExternalKeyboardEvent(e){var i,o;return!!((o=(i=this.svelteRootComponent)==null?void 0:i.keyboardControls)!=null&&o.handleExternalKeyboardEvent(e))}setAutoplayNext(e){var i;(i=this.store)==null||i.actions.internal.setAutoplayNextEnabled(e)}getTotalViewTime(){var e,i;return(i=(e=this.statistics)==null?void 0:e.thinOneStat)==null?void 0:i.getTotalViewTime()}unmountComponent(e){e&&Pa(e)}};import{InterfaceLanguage as koe,VKNumericLanguage as Poe,loadVKLangPack as Aoe}from"@vkontakte/videoplayer-shared/es2018";import{VideoQuality as Moe,VideoFormat as Voe}from"@vkontakte/videoplayer-core/es2018";var yoe=()=>{window.customElements.define("vk-video-player",gp)};export{Yu as ControlButtonType,ms as GridTypes,koe as InterfaceLanguage,Wd as MenuItemType,vs as PlayerPhase,Ll as VERSION,Poe as VKNumericLanguage,Voe as VideoFormat,Moe as VideoQuality,Aoe as loadVKLangPack,yoe as registerPlayerWebComponent};
|
|
60
|
+
M12 29.8c0-1 .8-1.8 1.8-1.8h10.4a1.8 1.8 90 010 3.6H13.8a1.8 1.8 90 01-1.8-1.8m0-7.6c0-1 .8-1.8 1.8-1.8h3.4a1.8 1.8 90 110 3.6H13.8a1.8 1.8 90 01-1.8-1.8m17 7.6c0-1 .8-1.8 1.8-1.8h3.4a1.8 1.8 90 110 3.6h-3.4a1.8 1.8 90 01-1.8-1.8M22 22.2c0-1 .8-1.8 1.8-1.8h10.4a1.8 1.8 90 010 3.6h-10.4a1.8 1.8 90 01-1.8-1.8`)),$(m,p)};V(d,m=>{e.type==="off"?m(s):m(u,!1)})}$(r,l)},$$slots:{default:!0}}),H()}function sm(t,e){B(e,!0);let i=h(e,"isSubtitlesEnabled",3,!1),r=_e().ui.t,a=f(()=>i()?r("tooltip_subtitles_on"):r("tooltip_subtitles_off"));Ft(t,{testId:"subtitles-btn",get ariaLabel(){return n(a)},get click(){return e.click},get ariaKeyShortCut(){return fs.KeyC},role:"button",children:(l,d)=>{let s=f(()=>i()?void 0:"outline");la(l,{get size(){return"24"},get type(){return n(s)}})},$$slots:{default:!0}}),H()}var A0=L('<span class="duration s-20" data-testid="video_duration"> </span>'),L0=L('<div><span class="current s-20" data-testid="current_time"> </span> <!></div>'),M0={hash:"s-20",code:'.time.s-20{align-items:center;color:var(--controls-time);display:flex;font-variant-numeric:tabular-nums;font-weight:500;padding:12px 6px}.time.mobile.s-20{padding:0 0 0 8px}.current.s-20{position:relative}.duration.s-20{opacity:.7}.duration.s-20:before{content:" / ";white-space:pre}'};function Kd(t,e){B(e,!0),G(t,M0);let i=h(e,"isMobile",3,!1),o=h(e,"isHidden",3,!1),r=h(e,"showDuration",3,!0),a=h(e,"ref",15),l=Rt(),d=de(!1),s=f(()=>Qo(e.duration)),u=f(()=>Qo(e.position));var m=L0();let p;var v=C(m),_=C(v,!0);S(v);var y=k(v,2);{var b=w=>{var I=A0(),T=C(I,!0);S(I),D(()=>ve(T,n(s))),$(w,I)};V(y,w=>{r()&&w(b)})}S(m),Ms(m,()=>Ll(o()&&l.features.usePerformanceFix,d,l.disableInvisibleComponentsTimeout)),je(m,w=>a(w),()=>a()),D(w=>{p=ne(m,1,"time s-20",null,p,w),ve(_,n(u))},[()=>({mobile:i()})]),$(t,m),H()}import{noop as Fu}from"@vkontakte/videoplayer-shared/es2018";var V0=Ie('<path d="M21.8632 10.0832C22.2147 9.73171 22.7852 9.73171 23.1367 10.0832C23.4881 10.4347 23.4881 11.0051 23.1367 11.3566L18.6367 15.8566C18.2852 16.2081 17.7147 16.2081 17.3632 15.8566C17.0117 15.5051 17.0117 14.9347 17.3632 14.5832L21.8632 10.0832Z"></path><path d="M17.3632 11.3566C17.0117 11.0051 17.0117 10.4347 17.3632 10.0832C17.7147 9.73171 18.2852 9.73171 18.6367 10.0832L23.1367 14.5832C23.4881 14.9347 23.4881 15.5051 23.1367 15.8566C22.7852 16.2081 22.2147 16.2081 21.8632 15.8566L17.3632 11.3566Z"></path>',1),R0=Ie("<path></path>"),N0=Ie('<path d="M14 3.96997C14.5523 3.96997 15 4.41769 15 4.96997V20.97C15 21.5223 14.5523 21.97 14 21.97C13.3585 21.97 12.7422 21.7208 12.2808 21.2751L6.79013 15.97H4C2.89543 15.97 2 15.0745 2 13.97V11.97C2 10.8654 2.89543 9.96997 4 9.96997H6.765L12.2794 4.66337C12.7417 4.21849 13.3584 3.96997 14 3.96997Z"></path><!>',1);function da(t,e){B(e,!0);let i=h(e,"volume",3,1),o=h(e,"muted",3,!1),r=(u,m)=>m?"off":u>.5?"max":u>.2?"mid":u>0?"min":"off",a=f(()=>r(i(),o())),l=f(()=>an(e.size)),d="M16.8748 8.85259C17.2324 8.50731 17.8021 8.51726 18.1474 8.87481C18.5465 9.28803 18.8614 9.77691 19.0757 10.3128C19.2901 10.8486 19.4 11.4218 19.4 12C19.4 12.5782 19.2901 13.1514 19.0757 13.6872C18.8614 14.2231 18.5465 14.712 18.1474 15.1252C17.8021 15.4827 17.2324 15.4927 16.8748 15.1474C16.5173 14.8021 16.5073 14.2324 16.8526 13.8748C17.0876 13.6314 17.2757 13.3408 17.4045 13.0187C17.5333 12.6966 17.6 12.3504 17.6 12C17.6 11.6496 17.5333 11.3034 17.4045 10.9813C17.2757 10.6592 17.0876 10.3686 16.8526 10.1252C16.5073 9.76764 16.5173 9.19788 16.8748 8.85259Z",s="M19.2636 6.2636C19.6151 5.91213 20.1849 5.91213 20.5364 6.2636C21.2516 6.97878 21.9929 7.99659 22.3989 8.97678C22.7959 9.93525 23.0003 10.9625 23.0003 12C23.0003 13.0374 22.7959 14.0647 22.3989 15.0232C21.9929 16.0034 21.2516 17.0212 20.5364 17.7364C20.1849 18.0879 19.6151 18.0879 19.2636 17.7364C18.9121 17.3849 18.9121 16.8151 19.2636 16.4636C19.8484 15.8788 20.4384 15.0527 20.7359 14.3343C21.0425 13.5943 21.2003 12.801 21.2003 12C21.2003 11.1989 21.0425 10.4057 20.7359 9.66561C20.4384 8.94724 19.8484 8.12124 19.2636 7.5364C18.9121 7.18492 18.9121 6.61508 19.2636 6.2636Z";Xe(t,{get style(){return n(l)},get testId(){var u;return`volume-${(u=n(a))!=null?u:""}-icon`},get shadow(){return e.shadow},children:(u,m)=>{var p=N0(),v=k(ue(p));{var _=b=>{var w=V0();li(),$(b,w)},y=b=>{var w=R0();D(()=>Me(w,"d",`${d}${n(a)==="max"?s:""}`)),$(b,w)};V(v,b=>{n(a)==="off"?b(_):b(y,!1)})}$(u,p)},$$slots:{default:!0}}),H()}import{isNonNullable as H_,noop as Yn}from"@vkontakte/videoplayer-shared/es2018";import{noop as lm}from"@vkontakte/videoplayer-shared/es2018";import{noop as O0}from"@vkontakte/videoplayer-shared/es2018";var D0=L('<div class="overlay"><!></div>');function am(t,e){B(e,!0);let[i,o]=Ne(),r=()=>x(l,"$overlayContainer$",i),l=_e().ui.overlayContainer$,d=q(void 0),s=v=>{!v||!n(d)||!v.contains(n(d))||v.removeChild(n(d))},u=v=>{!v||!n(d)||v.contains(n(d))||v.appendChild(n(d))};De(()=>{u(r())}),Vt(()=>(u(r()),()=>s(r())));var m=D0(),p=C(m);ti(p,()=>{var v;return(v=e.children)!=null?v:ft}),S(m),je(m,v=>R(d,v),()=>n(d)),$(t,m),H(),o()}var B0=L('<div class="tooltip s-1p"><div class="content s-1p"> </div> <div class="tooltip-pointer s-1p"></div></div>'),H0=L("<div><!></div> <!>",1),F0={hash:"s-1p",code:'.tooltip-wrapper.s-1p{display:flex;flex-direction:column;min-width:0}.full-width.s-1p{width:100%}.tooltip.s-1p{bottom:100%;left:0;opacity:0;position:absolute;transition:opacity .2s,visibility .2s;visibility:hidden}.content.s-1p{background-color:rgba(41,41,41,.8);border-radius:3px;color:var(--white);display:inline-block;padding:6px 10px}.tooltip-pointer.s-1p{border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid rgba(41,41,41,.8);bottom:0;content:" ";font-size:0;line-height:0;position:absolute;width:0}'};function Fa(t,e){B(e,!0),G(t,F0);let[i,o]=Ne(),r=()=>x(X,"$overlayContainer$",i),a=()=>x(z,"$containerSize",i),l=h(e,"isMobile",3,!1),d=h(e,"content",3,""),s=h(e,"active",15,!1),u=h(e,"translateX",3,0),m=h(e,"translateY",3,0),p=h(e,"isFullWidthWrapper",3,!1),v=h(e,"maxTooltipWidth",3,void 0),_=h(e,"placement",3,"top"),y=h(e,"onVisibilityChange",3,O0),b=5,w=q(void 0),I=q(void 0),T,N=q(0),A=q(0),E=q(0),P=q(0),Q=Rt(),F=_e(),z=F.ui.playerSize,X=F.ui.overlayContainer$;De(()=>{St(()=>{y()(s())})});let se=F.getLogger().createComponentLog("Tooltip component"),Z=()=>{if(!r()||!n(I)||!n(w))return;R(A,b);let re=r().getBoundingClientRect(),ce=n(w).getBoundingClientRect(),Re=ce.width,Ve=n(I).clientWidth,Je=a().width,Ee=(Re-Ve)/2,Te=ce.left+u()-re.left,He=Te+Ee,Ct=ce.top+m()-re.top,xt=Ve/2-b,At=He<8,at=He+Ve>Je-8;At&&(He=8,xt=Te+ce.width/2-2.5*b),at&&(He=Je-8-Ve,xt=ce.left-re.left+ce.width/2-He-b),R(E,He,!0),R(P,Ct),R(N,xt,!0)},oe=()=>{!r()||!n(I)||!n(w)||R(A,-b)},J=()=>{if(!r()||!n(I)||!n(w))return;R(N,b);let re=r().getBoundingClientRect(),ce=n(w).getBoundingClientRect(),Re=ce.height,Ve=n(I).clientHeight,Je=(Re-Ve)/2+Ve,Ee=ce.left+u()-re.left-n(I).clientWidth,Te=2,He=Ee-b;He<8&&(He=8);let xt=ce.top+m()-re.top+Je,At=Te-Je/2,at=Te-b;R(E,He,!0),R(P,xt),R(A,At),R(N,at)},Ce=()=>{!r()||!n(I)||!n(w)||R(N,-b)},me=()=>{switch(_()){case"top":Z();break;case"bottom":oe();break;case"left":J();break;default:Ce()}},ee=()=>{try{if(!r()||!n(w))return;me(),s(!0)}catch(re){se({message:String(re)})}},be=()=>{s(!1)},we=()=>{n(I)&&(T||(T=window.setTimeout(ee,Q.controls.hideTimeoutTooltips)),s()&&ee())},ge=()=>{be(),window.clearTimeout(T),T=void 0},pe=(re,ce,Re)=>{let Ve="";switch(_()){case"top":Ve=`transform: translate(${re}px, ${ce}px);`;break;case"bottom":Ve=`transform: translate(${re}px, ${ce}px); top: auto; bottom: 100%;`;break;case"left":Ve=`transform: translate(${re}px, ${ce}px); left: 0; right: auto;`;break;default:Ve=`transform: translate(${re}px, ${ce}px);`}return Ve+=` max-width: ${v()===void 0?"auto":`${v()}px`};`,Ve+=` opacity: ${Re?1:0}; visibility: ${Re?"visible":"hidden"}`,Ve},Ke=(re,ce)=>{let Re="";switch(_()){case"top":Re=`transform: translate(${re}px, ${ce}px) rotate(0); top: auto; bottom: 0;`;break;case"bottom":Re=`transform: translate(${re}px, ${ce}px) rotate(180deg); top: 0; bottom: auto;`;break;case"left":Re=`transform: translate(${re}px, ${ce}px) rotate(-90deg); left: 100%; top: auto; bottom: 0;`;break;default:Re=`transform: translate(${re}px, ${ce}px) rotate(90deg); right: 100%; top: auto; bottom: 0;`}return Re},U=f(()=>pe(n(E),n(P),s())),O=f(()=>Ke(n(N),n(A)));Vt(me),sn(()=>window.clearTimeout(T));var qe=H0(),K=ue(qe);let ae;K.__pointermove=we,K.__pointerdown=ge,K.__pointerup=function(...re){var ce;(ce=e.disableMouseupTooltipShow?void 0:we)==null||ce.apply(this,re)};var xe=C(K);ti(xe,()=>{var re;return(re=e.children)!=null?re:ft}),S(K),je(K,re=>R(w,re),()=>n(w));var Be=k(K,2);{var tt=re=>{am(re,{children:(ce,Re)=>{var Ve=B0(),Je=C(Ve),Ee=C(Je,!0);S(Je);var Te=k(Je,2);S(Ve),je(Ve,He=>R(I,He),()=>n(I)),D(()=>{We(Ve,n(U)),ve(Ee,d()),We(Te,n(O))}),$(ce,Ve)},$$slots:{default:!0}})};V(Be,re=>{d()&&!l()&&re(tt)})}D(re=>ae=ne(K,1,"tooltip-wrapper s-1p",null,ae,re),[()=>({"full-width":p()})]),st("pointerenter",K,we),st("pointerleave",K,ge),$(t,qe),H(),o()}Qe(["pointermove","pointerdown","pointerup"]);var B_=t=>{t.stopPropagation()},U0=L("<div><!></div>"),z0={hash:"s-1i",code:".btn-container.s-1i{align-items:center;display:flex;height:100%;position:relative;transition:var(--button-hover-transition);will-change:opacity;-webkit-tap-highlight-color:transparent}.w-max.s-1i{min-width:0;width:100%}"};function Ao(t,e){B(e,!0),G(t,z0);let[i,o]=Ne(),r=()=>x(u,"$isGraphOpened$",i),a=()=>x(s,"$isMobile",i),l=_e(),d=vo(),s=l.ui.isMobile,u=d.graphIsOpened$,m=l.ui.t,p=h(e,"className",3,""),v=h(e,"disabled",3,!1),_=h(e,"hasTooltip",3,!0),y=h(e,"ref",15,void 0),b=h(e,"width",15,void 0),w=h(e,"isFullWidthTooltip",3,!0),I=h(e,"tooltipContent",3,""),T=h(e,"tooltipVisible",3,!1),N=h(e,"tooltipPlacement",3,"top"),A=h(e,"disabledTooltipContent",19,()=>m("tooltip_button_disabled")),E=h(e,"isAriaHidden",3,!1),P=h(e,"onTooltipVisibilityChange",3,lm),Q=h(e,"initialTranslateXPx",3,0),F=h(e,"initialTranslateYPx",19,()=>-18),z=h(e,"mouseEnter",3,lm),X=h(e,"mouseLeave",3,lm),se=f(()=>v()?r()?m("tooltip_disabled_when_graph_on"):A():I()),Z=q(!1);De(()=>{T()||R(Z,!1)});var oe=U0();oe.__pointerdown=[B_],oe.__click=[B_];var J=C(oe);{var Ce=ee=>{Fa(ee,{get content(){return n(se)},get translateX(){return Q()},get translateY(){return F()},get isFullWidthWrapper(){return w()},get placement(){return N()},get onVisibilityChange(){return P()},get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get active(){return n(Z)},set active(be){R(Z,be,!0)},children:(be,we)=>{var ge=Ae(),pe=ue(ge);ti(pe,()=>{var Ke;return(Ke=e.children)!=null?Ke:ft}),$(be,ge)},$$slots:{default:!0}})},me=ee=>{var be=Ae(),we=ue(be);ti(we,()=>{var ge;return(ge=e.children)!=null?ge:ft}),$(ee,be)};V(J,ee=>{_()&&n(se)&&!a()?ee(Ce):ee(me,!1)})}S(oe),je(oe,ee=>y(ee),()=>y()),D(()=>{var ee;ne(oe,1,`btn-container ${(ee=p())!=null?ee:""}`,"s-1i"),Me(oe,"aria-hidden",E()||null)}),st("mouseenter",oe,function(...ee){var be;(be=z())==null||be.apply(this,ee)}),st("mouseleave",oe,function(...ee){var be;(be=X())==null||be.apply(this,ee)}),Pn(oe,"clientWidth",b),$(t,oe),H(),o()}Qe(["pointerdown","click"]);var W0=Ie('<rect width="20" height="20" rx="10"></rect><path d="m12.53 8.69.06.19-.22-.64a.83.83 0 0 0-1.6.47l.13.48-.23-.85a.82.82 0 0 0-1.6.24l-.73-2.93a.85.85 0 0 0-1.65.4L8 11.34l-1.12-1.16a.8.8 0 0 0-1.21 1.03l2.23 2.94s1.23 1.83 4.3 1.23c2.43-.48 3.25-2.67 2.58-4.88l-.55-2.3a.88.88 0 1 0-1.7.49"></path>',1);function qd(t,e){let i=f(()=>(e.completed,"interactive-episode-completed-icon"));Xe(t,{width:"20",height:"20",fill:"none",get testId(){return n(i)},children:(o,r)=>{var a=W0(),l=ue(a),d=k(l);D(()=>{Me(l,"fill",ia),Me(l,"fill-opacity",e.completed?1:.24),Me(d,"fill",e.completed?"var(--interactive-episode-complete)":"white")}),$(o,a)},$$slots:{default:!0}})}var K0=L("<div><!></div>"),q0={hash:"s-16",code:".interactive-episode-icon.s-16{cursor:default;height:20px;position:absolute;transform:translateX(-50%);width:20px}.interactive-episode-icon.disabled.s-16{opacity:.4;pointer-events:none}"};function dm(t,e){B(e,!0),G(t,q0);let o=_e().ui.t,r=q(0),a=f(()=>o(e.videoEpisode.completed?"tooltip_episode_finished":"tooltip_episode_unfinished"));Ao(t,{get tooltipContent(){return n(a)},initialTranslateXPx:-10,initialTranslateYPx:-10,get disabled(){return e.disabled},get width(){return n(r)},isAriaHidden:!0,isFullWidthTooltip:!1,children:(l,d)=>{var s=K0();let u;var m=C(s);let p=f(()=>!!e.videoEpisode.completed);qd(m,{get completed(){return n(p)}}),S(s),D(v=>{u=ne(s,1,"interactive-episode-icon s-16",null,u,v),We(s,`left: ${e.videoEpisode.from+e.videoEpisode.width/2}%`)},[()=>({disabled:e.disabled})]),Pn(s,"clientWidth",v=>R(r,v)),$(l,s)},$$slots:{default:!0}}),H()}var Q0=L('<div><div class="video-episode-inner s-17"><div class="video-episode-loaded s-17"></div> <div></div></div></div>'),G0=L('<div class="video-episodes-wrap s-17"></div>'),Y0={hash:"s-17",code:".video-episodes-wrap.s-17{height:100%;position:absolute;width:100%}.video-episode.s-17{box-sizing:border-box;height:calc(var(--slider-height)*3);margin-top:calc(var(--slider-height)*-1);padding:var(--slider-height) var(--slider-video-episode-gap);position:absolute;transition:transform .2s}.video-episode.s-17:first-child{padding-left:0}.video-episode.s-17:last-child{padding-right:0}.video-episode.s-17:not(.disabled):where(:hover,:active){transform:scaleY(1.5)}.video-episode-filled.s-17,.video-episode-inner.s-17,.video-episode-loaded.s-17{border-radius:var(--slider-radius);height:var(--slider-height);position:absolute}.video-episode-inner.s-17{background:var(--slider-bg);overflow:hidden;position:absolute;width:calc(100% - var(--slider-video-episode-gap)*2)}.video-episode.s-17:first-child .video-episode-inner:where(.s-17),.video-episode.s-17:last-child .video-episode-inner:where(.s-17){width:calc(100% - var(--slider-video-episode-gap))}.video-episode-loaded.s-17{background:var(--slider-loaded-bg);transition:transform .2s}.video-episode-filled.s-17,.video-episode-loaded.s-17{border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.video-episode-filled.s-17{background-color:var(--slider-filled-bg)}"};function cm(t,e){G(t,Y0);let i=h(e,"videoEpisodes",19,()=>[]);var o=G0();_i(o,21,i,r=>r.from,(r,a)=>{var l=Q0();let d;var s=C(l),u=C(s),m=k(u,2);let p;S(s),S(l),D((v,_)=>{d=ne(l,1,"video-episode s-17",null,d,v),We(l,`left: ${n(a).from}%; width: ${n(a).width}%`),We(u,`transform: translateX(${n(a).loadedWidth/n(a).width*100}%)`),p=ne(m,1,"video-episode-filled s-17",null,p,_),We(m,`transform: translateX(${n(a).filledWidth/n(a).width*100}%)`)},[()=>({disabled:e.disabled,mobile:e.isMobile}),()=>({mobile:e.isMobile})]),$(r,l)}),S(o),$(t,o)}function j0(t,e,i,o,r,a,l){if(t.preventDefault(),e()&&R(i,e().getBoundingClientRect(),!0),o()||n(r)||!e())return;R(r,!0);let d=a(t.clientX,t.clientY);l()(d,t),e().setPointerCapture(t.pointerId)}function X0(t,e,i,o,r,a,l,d){if(t.preventDefault(),e())return;let s=i(t.clientX,t.clientY),u=o(t.clientX);r()(s,u,n(a).width,t),n(l)&&d()(s)}function Z0(t,e,i,o,r){if(t.preventDefault(),e()||!n(i))return;R(i,!1);let a=o(t.clientX,t.clientY);r()(a,t)}function J0(t,e,i,o){t.stopPropagation(),t.preventDefault(),e()&&i()(o(t.clientX,t.clientY))}function ex(t,e,i,o,r,a){let l=e(t.clientX,t.clientY);i()&&o()(l),R(r,!1),a()(l)}var tx=L("<div></div>"),ix=L('<div class="bars s-h"><div class="loaded s-h"></div> <div></div></div>'),ox=L('<!> <div role="slider" tabindex="0"><!> <div><div></div></div></div>',1),nx={hash:"s-h",code:'.interactive-icons.s-h{position:absolute;top:-28px;width:calc(100% - 20px)}.interactive-icons.mobile.s-h{top:-10px}.slider.s-h{border-radius:var(--slider-radius);cursor:pointer;height:var(--slider-height);position:relative;touch-action:none;transition:opacity .2s;width:100%;will-change:opacity,transform;-webkit-tap-highlight-color:transparent}.no-handle.s-h{cursor:default}.slider.s-h:before{content:"";height:calc(var(--controls-height)/2);left:0;position:absolute;right:0;top:calc((var(--controls-height)/2 - var(--slider-height))*-1/2)}.bars.s-h{background:var(--slider-bg);overflow:hidden}.bars.s-h,.loaded.s-h{border-radius:var(--slider-radius);height:100%;position:absolute;width:100%}.loaded.s-h{background:var(--slider-loaded-bg);left:-100%;transition:transform .2s;will-change:transform}.filled.s-h{background-color:var(--slider-filled-bg);border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.slider.square.s-h,.slider.square.s-h .filled:where(.s-h),.slider.square.s-h .loaded:where(.s-h),.slider.square.s-h>.bars:where(.s-h){border-radius:unset}.filled.active-live.s-h{background-color:var(--timeline-slider-filled-active-live-bg)}.filled.ads.s-h{background-color:var(--slider-filled-ads)}.handleWrap.s-h{left:-100%;position:absolute;width:100%}.handle.s-h{background-color:var(--slider-handle-bg);border-radius:50%;height:var(--slider-handle-size);opacity:0;position:absolute;right:calc(var(--slider-handle-size)*-1/2);top:calc((var(--slider-height) - var(--slider-handle-size))/2);transform:scale(0);transition:opacity .2s,transform .2s;visibility:hidden;width:var(--slider-handle-size);will-change:opacity,transform}.handle.active-live.s-h{background-color:var(--timeline-slider-handle-active-live-bg)}.handle-always-visible.s-h .handle:where(.s-h),.slider-dragging.s-h .handle:where(.s-h),.slider.s-h:hover .handle:where(.s-h){opacity:1;transform:scale(1);visibility:visible}.slider-dragging.s-h .handle:where(.s-h){transform:scale(1.3)}.slider-vertical.s-h{left:-8px;position:absolute;top:-18px;transform:rotate(-90deg);transform-origin:0 0}.slider.disabled.s-h{cursor:default;opacity:.4}'};function Ua(t,e){B(e,!0),G(t,nx);let i=h(e,"ref",15,void 0),o=h(e,"className",3,""),r=h(e,"testId",3,void 0),a=h(e,"isHidden",3,!1),l=h(e,"isVertical",3,!1),d=h(e,"isActiveLive",3,!1),s=h(e,"isMobile",3,!1),u=h(e,"squareBorders",3,!1),m=h(e,"videoEpisodes",19,()=>[]),p=h(e,"withWheelHandler",3,!1),v=h(e,"isInteractive",3,!1),_=h(e,"disabled",3,!1),y=h(e,"hideHandel",3,!1),b=h(e,"onPointerDown",3,Yn),w=h(e,"onHandleMove",3,Yn),I=h(e,"onPointerUp",3,Yn),T=h(e,"onPointerEnter",3,Yn),N=h(e,"onPointerMove",3,Yn),A=h(e,"onPointerLeave",3,Yn),E=h(e,"onMouseEnter",3,Yn),P=h(e,"onMouseLeave",3,Yn),Q=h(e,"onWheelUp",3,Yn),F=h(e,"onWheelDown",3,Yn),z=h(e,"onWheelLeft",3,Yn),X=h(e,"onWheelRight",3,Yn),se=h(e,"onDisabledClick",3,Yn),Z=h(e,"loadedProgress",3,0),oe=h(e,"filledProgress",3,0),J=h(e,"handleProgress",3,0),Ce=h(e,"ariaLabel",3,""),me=h(e,"ariaValueMin",3,void 0),ee=h(e,"ariaValueMax",3,void 0),be=h(e,"ariaValueNow",3,void 0),we=h(e,"ariaValueText",3,""),ge=h(e,"onContextMenu",3,Yn),pe=h(e,"handleAlwaysVisible",3,!1),Ke=Rt(),U=q(void 0),O=q(!1),qe=f(()=>{var ye;return(ye=ee())!=null?ye:0}),K=f(()=>{var ye;return H_(m())&&((ye=m()[m().length-1])==null?void 0:ye.time)<n(qe)}),ae=f(()=>H_(m())&&m().length&&n(K)&&n(qe)?Je(Z()*100,oe()*100):[]);function xe(ye){if(ye.preventDefault(),i()&&R(U,i().getBoundingClientRect(),!0),_())return;let Le=Re(ye.clientX,ye.clientY),nt=Ve(ye.clientX);T()(Le,nt,n(U).width)}function Be(ye){ye.preventDefault(),!_()&&A()()}function tt(){E()()}function re(){P()()}function ce(ye){_()||p()&&(ye.preventDefault(),ye.deltaY<0?Q()():ye.deltaY>0?F()():ye.deltaX>0?X()():z()())}function Re(ye,Le){return l()?Math.max(0,Math.min(1,(n(U).height-(Le-n(U).top))/n(U).height)):Math.min(Math.max(ye-n(U).x,0),n(U).width)/n(U).width}function Ve(ye){return Math.min(Math.max(ye-n(U).x,0),n(U).width)}function Je(ye,Le){let nt=Ke.features.episodesClustering&&!v()?Ke.episodeMinWidthPc:0,Et=[],fe=m()[0].time/n(qe)*100,Oe=0,ze=0;for(let Pt=1;Pt<m().length;Pt++)Oe=m()[Pt].time/n(qe)*100,Oe-fe>nt&&(Et.push({from:fe,width:Math.max(0,Oe-fe),loadedWidth:Math.max(0,Math.min(Oe,ye)-fe),filledWidth:Math.max(0,Math.min(Oe,Le)-fe),interactive:m()[Pt-1].interactive,completed:m()[Pt-1].completed}),fe=m()[Pt].time/n(qe)*100,ze++);let bt={from:fe,width:Math.max(0,100-fe),loadedWidth:Math.max(0,Math.min(ye,100)-fe),filledWidth:Math.max(0,Math.min(Le,100)-fe),interactive:m()[ze].interactive,completed:m()[ze].completed};100-fe<nt?(ze-=1,Et[ze].width+=100-fe,Et[ze].loadedWidth+=Math.max(0,Math.min(ye,100)-fe),Et[ze].filledWidth+=Math.max(0,Math.min(Le,100)-fe)):Et[ze]=bt;let zt=m()[0].time;if(zt!==0){let Pt=zt/n(qe)*100;Et.unshift({from:0,width:Pt,loadedWidth:Math.min(Pt,ye),filledWidth:Math.min(Pt,Le)})}return Et}function Ee(ye){return Math.max(0,Math.min(100,ye*100))}let Te=f(()=>Ee(Z())),He=f(()=>Ee(oe()));var Ct=ox(),xt=ue(Ct);{var At=ye=>{var Le=tx();let nt;_i(Le,21,()=>n(ae),Et=>Et.from,(Et,fe)=>{var Oe=Ae(),ze=ue(Oe);{var bt=zt=>{dm(zt,{get videoEpisode(){return n(fe)},get disabled(){return _()}})};V(ze,zt=>{n(fe).interactive&&zt(bt)})}$(Et,Oe)}),S(Le),D(Et=>nt=ne(Le,1,"interactive-icons s-h",null,nt,Et),[()=>({mobile:s(),hidden:s()&&!n(O)})]),$(ye,Le)};V(xt,ye=>{v()&&ye(At)})}var at=k(xt,2);let Tt;at.__pointerdown=[j0,i,U,_,O,Re,b],at.__pointermove=[X0,_,Re,Ve,N,U,O,w],at.__pointerup=[Z0,_,O,Re,I],at.__click=[J0,_,se,Re],at.__contextmenu=[ex,Re,_,se,O,ge];var jt=C(at);{var It=ye=>{cm(ye,{get videoEpisodes(){return n(ae)},get disabled(){return _()},get isMobile(){return s()}})},Dt=ye=>{var Le=ix(),nt=C(Le),Et=k(nt,2);let fe;S(Le),D(Oe=>{Me(nt,"data-value",n(Te)),We(nt,`transform: translateX(${n(Te)}%);`),fe=ne(Et,1,"filled s-h",null,fe,Oe),Me(Et,"data-value",n(He)),We(Et,`transform: translateX(${n(He)}%);`)},[()=>({"active-live":d()})]),$(ye,Le)};V(jt,ye=>{n(ae).length?ye(It):ye(Dt,!1)})}var Ut=k(jt,2);let Y;var Pe=C(Ut);let le;S(Ut),S(at),je(at,ye=>i(ye),()=>i()),D((ye,Le,nt,Et)=>{var fe,Oe;Tt=ne(at,1,`slider ${(fe=o())!=null?fe:""}`,"s-h",Tt,ye),Me(at,"aria-label",Ce()),Me(at,"aria-valuemin",me()),Me(at,"aria-valuemax",ee()),Me(at,"aria-valuenow",be()),Me(at,"aria-valuetext",we()),Me(at,"data-testid",(Oe=r())!=null?Oe:null),Y=ne(Ut,1,"handleWrap s-h",null,Y,Le),We(Ut,nt),le=ne(Pe,1,"handle s-h",null,le,Et)},[()=>({disabled:_(),"slider-dragging":n(O),hidden:a(),"handle-always-visible":pe(),"slider-vertical":l(),"no-handle":y(),square:u()}),()=>({hidden:y()}),()=>`transform: translateX(${Ee(J())}%);`,()=>({"active-live":d()})]),st("pointerenter",at,xe),st("pointerleave",at,Be),st("mouseenter",at,tt),st("mouseleave",at,re),st("wheel",at,ce),$(t,Ct),H()}Qe(["pointerdown","pointermove","pointerup","click","contextmenu"]);var eo=(t,e)=>Ed[t]>=Ed[e];var Ns=(t,e)=>Ed[t]<=Ed[e],F_=t=>t>699?"xl":t>599?"l":t>509?"m":t>320?"s":"xs";var sx=L("<div><!></div>"),ax=L("<div><!> <!></div>"),lx={hash:"s-29",code:".volumeBar-container.s-29{align-items:center;display:flex}.vertical.s-29 .btn,.vertical.s-29 .tooltip-wrapper,.volumeBar-container.vertical.s-29{width:40px}.volumeBar.s-29{align-items:center;display:flex;margin:0 8px;position:relative;width:70px;--slider-height:var(--slider-volume-height);--slider-radius:var(--slider-volume-radius);--slider-handle-size:var(--slider-volume-handle-size);--slider-bg:var(--volume-slider-bg);--slider-filled-bg:var(--volume-slider-filled-bg);--slider-handle-bg:var(--volume-slider-handle-bg)}.volumeBar-slider-vertical{width:50px!important}.volumeBar-vertical.s-29{padding:0 8px 0 0;width:0}"};function um(t,e){var Ve,Je;B(e,!0),G(t,lx);let[i,o]=Ne(),r=()=>x(N,"$isAudioAvailable$",i),a=()=>x(v,"$muted$",i),l=()=>x(p,"$volume$",i),d=()=>x(w,"$currentGridType$",i),s=()=>x(xe,"$controlsVisible",i),u=_e(),m=Rt(),p=u.state.volume$,v=u.state.muted$,{setVolume:_,startVolumeChanging:y,stopVolumeChanging:b}=u.actions.internal,w=u.ui.currentGridType$,I=(Ve=u.callbacks)==null?void 0:Ve.onAudioDoesNotExistHint,T=(Je=u.callbacks)==null?void 0:Je.onAudioDisabledHint,N=u.state.isAudioAvailable$,A=u.state.isAudioDisabled,E=u.ui.t,P=q(!1),Q,F=f(()=>e.isAds||r()),z=f(()=>!n(F)||a()||l()===0),X=f(()=>Ns(d(),"l")),se=f(()=>n(X)?"":n(z)?!r()||A?E("tooltip_sound_unavailable"):E("tooltip_volume"):E("tooltip_volume_muted")),Z=f(()=>n(z)?E("tooltip_volume"):E("tooltip_volume_muted")),oe=f(()=>n(z)?0:l()),J=!1,Ce=f(()=>e.isAds?!1:A?!T:r()?!1:!I);function me(Ee){y(),_(Ee)}function ee(){Du(u,l(),m.controls.volumeStepWheel)}function be(){Ou(u,l(),m.controls.volumeStepWheel)}function we(Ee){_(Ee)}function ge(Ee){_(Ee),b()}function pe(){J=!0}function Ke(){J=!1,qe()}function U(){clearTimeout(Q),R(P,!0)}function O(){qe()}function qe(){Q=window.setTimeout(()=>{J||R(P,!1)},m.controls.volumeBarTimeout)}function K(Ee){Ee.preventDefault(),Ee.deltaY<0?ee():Ee.deltaY>0&&be()}let ae=q(!1),xe=u.ui.controlsVisible;De(()=>{s()||R(ae,!1)});var Be=ax();let tt;var re=C(Be);Fa(re,{get content(){return n(se)},translateY:-18,get active(){return n(ae)},set active(Ee){R(ae,Ee,!0)},children:(Ee,Te)=>{let He=f(()=>n(X)?"btn-volume-vertical":"btn-volume-horizontal");Ft(Ee,{className:"btn-full-opacity",get disabled(){return n(Ce)},get testId(){return n(He)},get ariaLabel(){return n(Z)},get click(){return e.click},get ariaKeyShortCut(){return fs.KeyM},role:"button",children:(Ct,xt)=>{da(Ct,{get size(){return"24"},get volume(){return l()},get muted(){return n(z)}})},$$slots:{default:!0}})},$$slots:{default:!0}});var ce=k(re,2);{var Re=Ee=>{var Te=sx();let He;var Ct=C(Te);let xt=f(()=>n(X)?"volumeBar-slider-vertical":""),At=f(()=>n(X)&&!n(P)),at=f(()=>n(X)?pe:Fu),Tt=f(()=>n(X)?Ke:Fu),jt=f(()=>Math.round(n(oe)*100)),It=f(()=>`${Math.round(n(oe)*100)}%`),Dt=f(()=>n(X)?"volume-slider-vertical":"volume-slider");Ua(Ct,{get className(){return n(xt)},get isHidden(){return n(At)},get isVertical(){return n(X)},withWheelHandler:!0,onWheelUp:ee,onWheelDown:be,onPointerDown:me,onHandleMove:we,onPointerUp:ge,get onPointerEnter(){return n(at)},get onPointerLeave(){return n(Tt)},ariaLabel:"Ползунок громкости",ariaValueMin:0,ariaValueMax:100,get ariaValueNow(){return n(jt)},get ariaValueText(){return n(It)},get filledProgress(){return n(oe)},get handleProgress(){return n(oe)},get testId(){return n(Dt)}}),S(Te),D(Ut=>He=ne(Te,1,"volumeBar s-29",null,He,Ut),[()=>({"volumeBar-vertical":n(X)})]),$(Ee,Te)};V(ce,Ee=>{n(F)&&Ee(Re)})}S(Be),D(Ee=>tt=ne(Be,1,"volumeBar-container s-29",null,tt,Ee),[()=>({vertical:n(X)})]),st("mouseenter",Be,function(...Ee){var Te;(Te=n(X)?U:Fu)==null||Te.apply(this,Ee)}),st("mouseleave",Be,function(...Ee){var Te;(Te=n(X)?O:Fu)==null||Te.apply(this,Ee)}),st("wheel",Be,K),$(t,Be),H(),o()}import{noop as ux}from"@vkontakte/videoplayer-shared/es2018";var dx=Ie('<path d="M4.58 13.98a1 1 0 0 1 .99-1h4.45a1 1 0 0 1 1 1v4.45a.99.99 0 0 1-1.99 0v-2.05L5.71 19.7a1 1 0 1 1-1.41-1.4l3.32-3.32H5.57a1 1 0 0 1-.99-1m10.39-6.36 3.32-3.32a1 1 0 1 1 1.41 1.4l-3.32 3.32h2.05a.99.99 0 0 1 0 1.98H14a1 1 0 0 1-1-1V5.57a.99.99 0 1 1 1.98 0z"></path>'),cx=Ie('<path d="M10.5 19a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-4.5a1 1 0 0 1 2 0v2.07l3.36-3.36a1 1 0 0 1 1.42 0l.01.01a1 1 0 0 1 0 1.42L7.43 18H9.5a1 1 0 0 1 1 1M18 7.43l-3.36 3.36a1 1 0 0 1-1.42 0l-.01-.01a1 1 0 0 1 0-1.42L16.57 6H14.5a1 1 0 0 1 0-2H19a1 1 0 0 1 1 1v4.5a1 1 0 0 1-2 0z"></path>');function pm(t,e){let i=h(e,"isFullscreen",8,!1),o=Sn(()=>i()?"close-fullscreen-icon":"open-fullscreen-icon");Xe(t,{get testId(){return n(o)},children:(r,a)=>{var l=Ae(),d=ue(l);{var s=m=>{var p=dx();$(m,p)},u=m=>{var p=cx();$(m,p)};V(d,m=>{i()?m(s):m(u,!1)})}$(r,l)},$$slots:{default:!0}})}function Qd(t,e){B(e,!0);let i=h(e,"isFullscreen",3,!1),o=h(e,"click",3,ux),r=_e(),a=r.ui.isFullscreenOpenedByKeyboard,l=r.ui.t,d=f(()=>i()?l("tooltip_fullscreen_on"):l("tooltip_fullscreen_off"));Ft(t,{testId:"fullscreen-btn",get ariaLabel(){return n(d)},click:u=>{let m=sa(u);a.set(m),o()()},get ariaKeyShortCut(){return fs.KeyF},role:"button",children:(u,m)=>{pm(u,{get isFullscreen(){return i()}})},$$slots:{default:!0}}),H()}var px=Ie('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M4.26 4.26C3 5.54 3 7.57 3 11.65v.72c0 4.07 0 6.11 1.26 7.38C5.54 21 7.57 21 11.65 21h.72c4.07 0 6.11 0 7.38-1.26C21 18.47 21 16.43 21 12.36v-.72c0-4.07 0-6.11-1.26-7.38C18.47 3 16.43 3 12.36 3h-.72C7.57 3 5.53 3 4.26 4.26M6 8.5c.1 4.68 2.56 7.5 6.61 7.5h.24v-2.68c1.47.15 2.57 1.25 3.02 2.68H18a6 6 0 0 0-3-3.76 5.7 5.7 0 0 0 2.55-3.74h-1.94c-.4 1.49-1.61 2.84-2.77 2.97V8.5h-1.96v5.2c-1.2-.3-2.76-1.76-2.83-5.2z" clip-rule="evenodd"></path></svg>');function fm(t,e){let i=kn(e,["$$slots","$$events","$$legacy","children"]);var o=px();Ji(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"vk-logo-icon",role:"img",...i}));var r=C(o);ti(r,()=>{var a;return(a=e.children)!=null?a:ft}),li(),S(o),$(t,o)}var fx=Ie('<svg><!><svg data-logo="vk_video"><path d="M7 8.6c0-1.96 0-2.94.38-3.69a3.5 3.5 0 0 1 1.53-1.53C9.66 3 10.64 3 12.6 3h1.36c2.46 0 3.7 0 4.64.48a4.4 4.4 0 0 1 1.92 1.92c.48.94.48 2.18.48 4.64v3.92c0 2.46 0 3.7-.48 4.64a4.4 4.4 0 0 1-1.92 1.92c-.94.48-2.18.48-4.64.48H12.6c-1.96 0-2.94 0-3.69-.38a3.5 3.5 0 0 1-1.53-1.53C7 18.34 7 17.36 7 15.4zm9.26 1.74c.9.54 1.36.81 1.51 1.16.13.3.13.65 0 .96-.15.34-.6.61-1.5 1.15l-2.4 1.43c-.93.56-1.4.84-1.8.8-.33-.03-.64-.2-.84-.48-.23-.31-.23-.86-.23-1.96v-2.85c0-1.1 0-1.64.23-1.96q.31-.42.85-.48c.38-.04.86.25 1.8.8zM5 9.04c0-2.46 0-3.7.48-4.64q.37-.71.95-1.25-.58.1-1.03.33A4.4 4.4 0 0 0 3.48 5.4C3 6.34 3 7.58 3 10.04v3.92c0 2.46 0 3.7.48 4.64a4.4 4.4 0 0 0 1.92 1.92q.45.23 1.03.33a4 4 0 0 1-.95-1.25C5 18.66 5 17.42 5 14.96z"></path></svg><svg x="4" y="3" data-logo="play_market"><path d="M0 1.26v15.47q0 .66.34 1L9.52 9 .33.28C.08.53 0 .92 0 1.26"></path><path d="M.33.28.38.23c.34-.3.89-.32 1.49 0l10.75 5.81-2.6 2.48zm10.29 8.75 2.88 2.45-.53.29-.34.18-2.58-2.44-9.71 8.22c.33.34.9.37 1.53.04l11.1-6 .53-.29 2.73-1.47c1.03-.56 1.03-1.47 0-2.02l-2.77-1.5-.84-.45.84.45.1.05z"></path></svg><svg x="3" data-logo="app_store"><path d="M17.62 16.37q-.48 1.09-1.15 2.03-.9 1.27-1.48 1.75-.88.8-1.9.83-.72 0-1.76-.42a5 5 0 0 0-1.89-.4q-.9 0-1.94.4a5 5 0 0 1-1.68.44q-.98.04-1.95-.85-.62-.53-1.55-1.82a13 13 0 0 1-1.63-3.2 12 12 0 0 1-.69-3.8q0-2.1.93-3.64A5.4 5.4 0 0 1 5.5 5.03q.77 0 2.03.46t1.62.47q.26 0 1.79-.55a6 6 0 0 1 2.43-.42 5.2 5.2 0 0 1 4.05 2.09q-2.4 1.44-2.4 4.02a4.4 4.4 0 0 0 1.49 3.34q.66.61 1.48.95-.18.5-.38.98M13.5.42q0 1.58-1.17 2.94c-.94 1.08-2.07 1.7-3.3 1.6L9 4.56c0-1 .45-2.08 1.24-2.96q.6-.67 1.5-1.12.93-.44 1.74-.48z"></path></svg><path d="M32.55 17.04h2.5L38.7 7h-1.8l-2.94 8.28h-.28L30.84 7H29zm15.52 0-4.61-5.2L47.72 7H45.6l-3.56 4.09h-.42V7h-1.7v10.04h1.7v-4.3h.43l3.76 4.3z"></path><path d="M57.89 11.89a2.2 2.2 0 0 0 1.44-2.16C59.33 8.14 58 7 56.06 7h-3.92v10.04h4.2c1.96 0 3.29-1.14 3.29-2.8 0-1.17-.66-2.04-1.74-2.35m-4.04-3.4h2.21c.92 0 1.54.56 1.54 1.39 0 .8-.62 1.36-1.54 1.36h-2.2zm2.5 7.06h-2.5v-2.81h2.5c.9 0 1.52.57 1.52 1.4 0 .84-.62 1.4-1.52 1.4m4.84 1.5h2.32l2.77-5.5h.22v5.5h1.57v-7.4h-2.32l-2.77 5.5h-.22v-5.5h-1.57zm7.96 2.21h1.64v-2.2h5.33v2.2h1.64v-3.7h-1.29V9.64h-5.43l-.37 3.78c-.13 1.34-.53 2.13-1.34 2.13h-.18zm2.49-3.7c.4-.39.57-1.04.68-2.15l.23-2.27h2.28v4.42zm14.38-2.3a3.7 3.7 0 0 0-3.84-3.76 3.7 3.7 0 0 0-3.85 3.85 3.7 3.7 0 0 0 3.85 3.84c1.54 0 2.99-.72 3.55-2.13l-1.54-.26c-.36.53-1.04.9-1.91.9-1.26 0-2.09-.77-2.24-1.91H86zm-3.84-2.33c1.02 0 1.8.65 2.06 1.58h-4.1a2.1 2.1 0 0 1 2.04-1.58m8.66 6.26c2.32 0 3.96-1.6 3.96-3.84 0-2.25-1.64-3.85-3.96-3.85s-3.97 1.6-3.97 3.85 1.64 3.84 3.97 3.84m0-1.5c-1.34 0-2.25-.95-2.25-2.34 0-1.4.9-2.35 2.25-2.35 1.34 0 2.25.95 2.25 2.35s-.91 2.35-2.25 2.35" class="_ru"></path><path d="M35.02 17.36h-2.48L29 7.42h1.83l2.83 8.2h.28l2.93-8.2h1.8zm8.41-5.15 4.6 5.15h-2.24l-3.75-4.26h-.43v4.26h-1.7V7.42h1.7v4.05h.41l3.55-4.05h2.1zm13.37 5.15h-2.48L50.8 7.42h1.83l2.82 8.2h.29l2.92-8.2h1.8zm6.46 0h-1.64v-7.33h1.64zm-.81-8.37q-.45 0-.74-.27a1 1 0 0 1-.28-.72q0-.44.28-.72.3-.28.74-.28t.72.28q.3.29.29.72 0 .44-.29.72t-.72.27m5.93 8.51q-1.03 0-1.86-.48a3.5 3.5 0 0 1-1.29-1.35 4 4 0 0 1-.45-1.98q0-1.1.45-1.95.46-.88 1.3-1.36.81-.5 1.85-.5.9 0 1.6.38.68.35 1.13.88V7.42h1.63v9.94h-1.22l-.34-1.18q-.46.54-1.17.94a3.4 3.4 0 0 1-1.63.38m.4-1.45q1.04 0 1.68-.65.65-.66.65-1.7t-.65-1.7a2.2 2.2 0 0 0-1.68-.66 2.2 2.2 0 0 0-1.66.66q-.64.66-.64 1.7t.64 1.7q.64.65 1.66.65m13.15-2.44-.03.52h-5.94q.12.86.71 1.38.6.51 1.52.51.63 0 1.13-.24.51-.24.78-.65l1.53.26q-.39 1.01-1.38 1.56-.96.55-2.16.55-1.1 0-1.98-.48a3.6 3.6 0 0 1-1.85-3.33q0-1.1.48-1.95.5-.88 1.37-1.36a4 4 0 0 1 1.98-.5q1.11 0 1.98.5.88.48 1.36 1.34.5.86.5 1.89m-3.84-2.31q-.73 0-1.29.42-.53.42-.74 1.14h4.1a2.2 2.2 0 0 0-2.07-1.56m8.66 6.2q-1.14 0-2.04-.48a3.7 3.7 0 0 1-1.4-1.35 4 4 0 0 1-.5-1.98q0-1.1.5-1.95.5-.88 1.4-1.36.9-.5 2.04-.5t2.03.5q.91.48 1.4 1.36.52.86.52 1.95 0 1.11-.51 1.98-.5.86-1.4 1.35-.9.48-2.04.48m0-1.48q.99 0 1.62-.63.63-.66.63-1.7t-.63-1.67a2.2 2.2 0 0 0-1.62-.65q-.99 0-1.62.65-.62.63-.62 1.67 0 1.05.62 1.7.63.63 1.62.63" class="_en"></path></svg>');function mm(t,e){let i=kn(e,["$$slots","$$events","$$legacy","children"]);var o=fx();Ji(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"95",height:"24",fill:"var(--btn-color, #fff)","fill-rule":"evenodd","aria-hidden":"true","clip-rule":"evenodd",viewBox:"0 0 95 24",role:"img",...i}));var r=C(o);ti(r,()=>{var a;return(a=e.children)!=null?a:ft}),li(6),S(o),$(t,o)}var mx={hash:"s-2a",code:"svg [data-logo],svg[data-testid=vk-video-logo-icon--en] ._ru,svg[data-testid=vk-video-logo-icon--short] ._en,svg[data-testid=vk-video-logo-icon--short] ._ru,svg[data-testid=vk-video-logo-icon] ._en{opacity:0;visibility:hidden}svg[data-logo=app_store] [data-logo=app_store],svg[data-logo=play_market] [data-logo=play_market],svg[data-logo=vk_video] [data-logo=vk_video]{opacity:1;visibility:visible}"};function vm(t,e){B(e,!0),G(t,mx);let i=h(e,"short",3,!1),o=h(e,"isCyrillic",3,!0),r=h(e,"logo",19,()=>"vk_video"),a="vk-video-logo-icon--short",l=24,d=f(()=>!o()&&!i()?91:i()?l:95),s=f(()=>!o()&&!i()?"vk-video-logo-icon--en":i()?a:"vk-video-logo-icon"),u=f(()=>`0 0 ${n(d)} 24`);mm(t,{get width(){return n(d)},height:"24",get viewBox(){return n(u)},get"data-testid"(){return n(s)},get"data-logo"(){return r()}}),H()}function Gd(t,e){B(e,!0);let[i,o]=Ne(),r=()=>x(_,"$isMobile",i),a=()=>x(v,"$currentGridType$",i),l=()=>x(b,"$isCyrillicRelatedInterface$",i),d=h(e,"ref",15,void 0),s=h(e,"logoClickable",3,!1),u=h(e,"targetUrl",3,""),m=Rt(),p=_e(),v=p.ui.currentGridType$,_=p.ui.isMobile,y=p.ui.t,b=p.isCyrillicRelatedInterface$,w=f(()=>m.logoType!=="vk"),I=f(()=>n(w)?y("tooltip_vk_video_logo"):y("tooltip_vk_logo")),T=f(()=>(r()&&Ns(a(),"m")||Ns(a(),"l"))&&n(w)),N=()=>{var P,Q;e.click(),(P=p.callbacks)!=null&&P.onLogoClicked?(Q=p.callbacks)==null||Q.onLogoClicked():u()&&window.open(u(),"_blank")},A=f(()=>!s()),E=f(()=>n(w)?"btn-vk-video-logo":"btn-vk-logo");Ft(t,{className:"btn-full-opacity",get disabled(){return n(A)},click:N,get testId(){return n(E)},get ariaLabel(){return n(I)},get ref(){return d()},set ref(P){d(P)},children:(P,Q)=>{var F=Ae(),z=ue(F);{var X=Z=>{vm(Z,{get logo(){return m.logoType},get short(){return n(T)},get isCyrillic(){return l()}})},se=Z=>{fm(Z,{})};V(z,Z=>{n(w)?Z(X):Z(se,!1)})}$(P,F)},$$slots:{default:!0}}),H(),o()}import{ChromecastState as _x}from"@vkontakte/videoplayer-core/es2018";import{ChromecastState as z_}from"@vkontakte/videoplayer-core/es2018";var vx=Ie('<path d="M3.6 13.3a5.1 5.1 0 0 1 5.05 5.83.9.9 0 0 1-1.78-.26 3.3 3.3 0 0 0-3.74-3.74.9.9 0 0 1-.26-1.78c.24-.03.49-.05.73-.05Z" class="s-1d"></path><path d="M3.6 9.7a8.7 8.7 0 0 1 8.68 9.37.9.9 0 0 1-1.8-.14c.02-.17.02-.35.02-.53a6.9 6.9 0 0 0-7.43-6.88.9.9 0 0 1-.14-1.8l.67-.02ZM3.6 16.9a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Z" class="s-1d"></path><path d="M16.24 4.1c.8 0 1.47 0 2 .04a4 4 0 0 1 1.53.38 3.9 3.9 0 0 1 1.7 1.71 4 4 0 0 1 .39 1.53c.04.53.04 1.2.04 2v4.48c0 .8 0 1.47-.04 2a4 4 0 0 1-.38 1.53 3.9 3.9 0 0 1-1.7 1.7 4 4 0 0 1-1.54.39c-.53.04-1.2.04-2 .04H15a.9.9 0 0 1 0-1.8h1.2c.85 0 1.44 0 1.9-.04.44-.03.68-.1.85-.19.4-.2.72-.52.92-.92.09-.17.16-.4.2-.85.03-.46.03-1.05.03-1.9V9.8c0-.85 0-1.44-.04-1.9-.03-.44-.1-.68-.19-.85a2.1 2.1 0 0 0-.92-.92 2.25 2.25 0 0 0-.85-.2 25.9 25.9 0 0 0-1.9-.03H5.83a2.1 2.1 0 0 0-1.81 1.4.9.9 0 1 1-1.7-.6A3.9 3.9 0 0 1 6 4.1h10.24Z" class="s-1d"></path>',1),gx=Ie('<path d="M3.60219 13.2993C6.41858 13.2995 8.70256 15.5835 8.70278 18.3999C8.70277 18.6469 8.68424 18.8909 8.65004 19.1294C8.57937 19.6212 8.12333 19.9625 7.63149 19.8921C7.13968 19.8213 6.79823 19.3654 6.86879 18.8735C6.89087 18.7195 6.90199 18.5611 6.902 18.3999C6.90178 16.5776 5.42447 15.1003 3.60219 15.1001C3.441 15.1001 3.28267 15.1112 3.12856 15.1333C2.63666 15.2039 2.18077 14.8624 2.11 14.3706C2.03966 13.8788 2.38091 13.4227 2.8727 13.3521C3.11125 13.3178 3.35516 13.2993 3.60219 13.2993Z"></path><path d="M3.60219 9.69971C8.40682 9.69977 12.3021 13.5953 12.3024 18.3999C12.3024 18.6248 12.2938 18.8489 12.277 19.0698C12.239 19.5651 11.8065 19.9365 11.3112 19.8989C10.8157 19.8611 10.4445 19.4286 10.4821 18.9331C10.4954 18.7576 10.5026 18.5791 10.5026 18.3999C10.5023 14.5894 7.41271 11.5005 3.60219 11.5005C3.42268 11.5005 3.24474 11.5066 3.06899 11.52C2.57352 11.5578 2.14115 11.1863 2.10317 10.6909C2.06587 10.1957 2.43694 9.76287 2.93227 9.7251C3.15348 9.70823 3.37699 9.69971 3.60219 9.69971Z"></path><path d="M3.60219 16.8999C4.43047 16.8999 5.10198 17.5717 5.10219 18.3999C5.10209 19.2282 4.43054 19.8999 3.60219 19.8999C2.77383 19.8999 2.10229 19.2282 2.10219 18.3999C2.10241 17.5717 2.7739 16.8999 3.60219 16.8999Z"></path><path d="M16.2379 4.1001C17.0459 4.10009 17.7067 4.10017 18.2438 4.14404C18.7997 4.18946 19.3022 4.28599 19.7711 4.5249C20.5049 4.89882 21.1014 5.49623 21.4752 6.22998C21.714 6.69873 21.8107 7.20063 21.8561 7.75635C21.9 8.29338 21.9001 8.95424 21.9 9.76221V14.2378C21.9001 15.0458 21.9 15.7066 21.8561 16.2437C21.8107 16.7996 21.7141 17.3021 21.4752 17.771C21.1014 18.5046 20.5048 19.1012 19.7711 19.4751C19.3022 19.714 18.7997 19.8105 18.2438 19.856C17.7067 19.8998 17.0459 19.8999 16.2379 19.8999H14.9997C14.503 19.8996 14.1005 19.4972 14.1002 19.0005C14.1002 18.5036 14.5028 18.1004 14.9997 18.1001H16.1998C17.0548 18.1001 17.6422 18.0992 18.0973 18.062C18.5419 18.0257 18.7809 17.9596 18.9538 17.8716C19.3489 17.6702 19.6704 17.3487 19.8717 16.9536C19.9598 16.7808 20.0258 16.5417 20.0622 16.0972C20.0993 15.6421 20.1002 15.0546 20.1002 14.1997V9.80029C20.1002 8.94536 20.0993 8.35794 20.0622 7.90283C20.0258 7.45834 19.9598 7.21921 19.8717 7.04639C19.6704 6.6514 19.3487 6.33073 18.9538 6.12939C18.7809 6.04133 18.5419 5.97431 18.0973 5.93799C17.6422 5.9008 17.0548 5.8999 16.1998 5.8999H6.00063L5.83071 5.90674C4.99191 5.97398 4.28981 6.53462 4.01918 7.30029C3.85342 7.76872 3.33928 8.01472 2.87075 7.84912C2.40214 7.68346 2.15628 7.16833 2.32192 6.69971C2.85696 5.18632 4.30125 4.1001 6.00063 4.1001H16.2379Z"></path><path d="M2.95114 7.11345C2.42394 7.1914 1.90399 6.78569 2.00995 6.2634C2.05777 6.0277 2.12517 5.82449 2.22018 5.63803C2.5078 5.07354 2.96674 4.6146 3.53123 4.32698C4.17296 4 5.01304 4 6.6932 4H17.2001C18.8803 4 19.7204 4 20.3621 4.32698C20.9266 4.6146 21.3855 5.07354 21.6731 5.63803C22.0001 6.27976 22.0001 7.11984 22.0001 8.8V15.2C22.0001 16.8802 22.0001 17.7202 21.6731 18.362C21.3855 18.9265 20.9266 19.3854 20.3621 19.673C19.7204 20 18.8803 20 17.2001 20H15.7196C15.2009 20 14.8203 19.5134 14.8938 19C14.9638 18.5101 15.0001 18.0093 15.0001 17.5C15.0001 11.701 10.2991 7 4.5001 7C3.97384 7 3.45662 7.03872 2.95114 7.11345Z"></path>',1),hx={hash:"s-1d",code:".animated.s-1d{animation-duration:1s;animation-iteration-count:infinite}.wave1.animated.s-1d{animation-name:s-1d-wave1}.wave2.animated.s-1d{animation-name:s-1d-wave2}.wave3.animated.s-1d{animation-name:s-1d-wave3}@keyframes s-1d-wave1{0%{opacity:.3}33%{opacity:1}66%{opacity:1}to{opacity:1}}@keyframes s-1d-wave2{0%{opacity:.3}33%{opacity:.3}66%{opacity:1}to{opacity:1}}@keyframes s-1d-wave3{0%{opacity:.3}33%{opacity:.3}66%{opacity:.3}to{opacity:1}}"};function Yd(t,e){B(e,!0),G(t,hx);let i=h(e,"isMobile",3,!1),o=f(()=>e.iconState===z_.CONNECTED),r=f(()=>e.iconState===z_.CONNECTING),a=f(()=>n(o)?"#2688EB":ia),l=f(()=>e.size?an(e.size):void 0);var d=Ae(),s=ue(d);{var u=p=>{Xe(p,{get fill(){return n(a)},get style(){return n(l)},testId:"chromecast-mobile-icon",children:(v,_)=>{var y=vx();li(2),$(v,y)},$$slots:{default:!0}})},m=p=>{Xe(p,{get style(){return n(l)},testId:"chromecast-icon",children:(v,_)=>{var y=gx(),b=ue(y);let w;var I=k(b);let T;var N=k(I);let A;var E=k(N);let P;var Q=k(E);let F;D((z,X,se,Z,oe)=>{w=ne(b,0,"wave2 s-1d",null,w,z),T=ne(I,0,"wave3 s-1d",null,T,X),A=ne(N,0,"wave1 s-1d",null,A,se),P=ne(E,0,"s-1d",null,P,Z),F=ne(Q,0,"s-1d",null,F,oe)},[()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({hidden:n(o)}),()=>({hidden:!n(o)})]),$(v,y)},$$slots:{default:!0}})};V(s,p=>{i()?p(u):p(m,!1)})}$(t,d),H()}import{noop as bx}from"@vkontakte/videoplayer-shared/es2018";function jd(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"isMobile",3,!1),r=h(e,"click",3,bx),l=_e().ui.t,d=f(()=>e.state===_x.CONNECTED?l("tooltip_chromecast_on"):l("tooltip_chromecast_off"));Ft(t,{get ariaLabel(){return n(d)},get click(){return r()},testId:"btn-chromecast",get ref(){return i()},set ref(s){i(s)},children:(s,u)=>{Yd(s,{get isMobile(){return o()},get iconState(){return e.state}})},$$slots:{default:!0}}),H()}import{noop as yx}from"@vkontakte/videoplayer-shared/es2018";var $x=Ie('<path d="m21.62 16.5-.02.07q-.22 1.27-.42 2.09a5 5 0 0 1-.64 1.5 4.4 4.4 0 0 1-2.51 1.73q-.77.18-1.63.07t-2.11-.34l-4.34-.8q-1.27-.22-2.1-.42a5 5 0 0 1-1.5-.65 4.4 4.4 0 0 1-1.72-2.5 5 5 0 0 1-.07-1.63q.1-.84.34-2.11l.01-.07q.22-1.27.43-2.1a5 5 0 0 1 .64-1.5 4.4 4.4 0 0 1 2.5-1.73 5 5 0 0 1 1.64-.07q.83.1 2.1.35l4.34.8q1.28.21 2.1.42a5 5 0 0 1 1.5.64 4.4 4.4 0 0 1 1.73 2.5q.18.78.07 1.64-.1.83-.34 2.1m-1.45-2.3c.05-.49.03-.77-.02-1a2.6 2.6 0 0 0-1.02-1.48 3 3 0 0 0-.93-.37c-.48-.13-1.1-.24-2-.4l-4.26-.79c-.9-.16-1.52-.27-2.01-.33a3 3 0 0 0-1 .03 2.6 2.6 0 0 0-1.48 1.02 3 3 0 0 0-.37.92c-.13.48-.24 1.1-.4 2s-.28 1.51-.33 2c-.06.5-.04.78.02 1 .15.6.51 1.13 1.02 1.48.19.13.45.25.92.37.48.13 1.1.25 2 .4l4.27.79c.9.16 1.52.28 2.01.33s.77.03 1-.02a2.6 2.6 0 0 0 1.47-1.03c.14-.19.25-.45.38-.92.12-.48.24-1.1.4-2s.28-1.51.33-2"></path><path d="M18.19 7.49a.9.9 0 0 1-1.05-.73c-.14-.8-.2-1.08-.28-1.3A2.6 2.6 0 0 0 14.5 3.8c-.22 0-.5.04-1.31.17l-5.85.96a8 8 0 0 0-2.17.5 2.6 2.6 0 0 0-1.33 1.75c-.08.38-.04.85.11 2.23l.01.1a.9.9 0 1 1-1.78.2l-.01-.1-.02-.17a9 9 0 0 1-.07-2.64 4.4 4.4 0 0 1 2.25-2.97c.63-.33 1.42-.46 2.56-.65l.16-.03 5.85-.96.1-.01c.67-.11 1.13-.19 1.55-.18a4.4 4.4 0 0 1 4 2.82c.14.39.23.85.35 1.53l.01.1a.9.9 0 0 1-.72 1.04"></path><path d="M12.72 12.41a.42.42 0 0 0-.69.23l-.72 4.18a.4.4 0 0 0 .03.23c.08.2.33.3.54.22l3.67-1.47a.4.4 0 0 0 .12-.68z"></path>',1);function gm(t){Xe(t,{testId:"episodes-icon",children:(e,i)=>{var o=$x();li(2),$(e,o)},$$slots:{default:!0}})}var Uu=(t,e,i)=>i.filter(o=>o.time<=t*e).pop();var xx=L('<span class="text mobile s-26"> </span> <div class="chevron-episodes s-26" data-testid="btn-episodes_icon"><!></div>',1),wx=L('<span class="text s-26"> </span>'),Sx=L('<span class="text count s-26"> </span>'),Cx=L('<span class="icon s-26"><!></span> <!>',1),Tx={hash:"s-26",code:".icon.s-26{flex-shrink:0}.text.s-26{overflow:hidden;padding:0 8px;text-overflow:ellipsis;white-space:nowrap}.text.count.s-26{overflow:visible}.text.mobile.s-26{padding:0 3px 0 4px}.chevron-episodes.s-26{margin-bottom:-6px;opacity:.7;transform:scale(.8)}"};function Xd(t,e){var J,Ce,me;B(e,!0),G(t,Tx);let[i,o]=Ne(),r=()=>x(y,"$currentGridType$",i),a=()=>x(b,"$openedByKeyboard$",i),l=()=>x(w,"$panelOpened$",i),d=()=>x(I,"$isMobile",i),s=h(e,"position",3,0),u=h(e,"duration",3,0),m=h(e,"timeCodes",19,()=>[]),p=_e(),v=(Ce=(J=p.callbacks)==null?void 0:J.onEpisodeChanged)!=null?Ce:yx,_=!!((me=p.callbacks)!=null&&me.onEpisodeClicked),y=p.ui.currentGridType$,b=p.ui.episodes.openedByKeyboard$,w=p.ui.episodes.panelOpened$,I=p.ui.isMobile,T=p.ui.t,N=q(void 0),A=ee=>{var we,ge,pe;if(!!((we=p.callbacks)!=null&&we.onEpisodeClicked)){let Ke=sa(ee);b.set(Ke),w.set(!0),(pe=(ge=p.callbacks)==null?void 0:ge.onEpisodeClicked)==null||pe.call(ge,Ke)}},E=q(null),P=f(()=>s()/u());De(()=>{var be;let ee=Uu(n(P),u(),m());ee?((be=n(E))==null?void 0:be.time)!==ee.time&&(v(ee),R(E,ee,!0)):R(E,null)});let Q=f(()=>{var ee;return((ee=n(E))==null?void 0:ee.text)||""}),F=f(()=>eo(r(),"xl")?"FULL":eo(r(),"m")?"COUNT":"SHORT"),z=f(()=>`${T("tooltip_episodes")}: ${n(Q)}`),X=async(ee,be,we)=>{await uo(),(ee==null?void 0:ee.getAttribute("aria-expanded"))==="false"&&be&&!we&&St(()=>{b.set(!1),ee.focus()})};De(()=>{X(n(N),a(),l())});var se=Ae(),Z=ue(se);{var oe=ee=>{let be=f(()=>d()?"px-0":""),we=f(()=>!_);Ft(ee,{get className(){var ge;return`w-max btn-full-opacity btn-jc-l ${(ge=n(be))!=null?ge:""}`},testId:"btn-episodes",click:A,get disabled(){return n(we)},get ariaExpanded(){return l()},get ariaLabel(){return n(z)},get ref(){return n(N)},set ref(ge){R(N,ge,!0)},children:(ge,pe)=>{var Ke=Ae(),U=ue(Ke);{var O=K=>{var ae=xx(),xe=ue(ae),Be=C(xe,!0);S(xe);var tt=k(xe,2),re=C(tt);Lr(re,{direction:"right"}),S(tt),D(()=>ve(Be,n(Q))),$(K,ae)},qe=K=>{var ae=Cx(),xe=ue(ae),Be=C(xe);gm(Be,{}),S(xe);var tt=k(xe,2);{var re=Re=>{var Ve=wx(),Je=C(Ve,!0);S(Ve),D(()=>ve(Je,n(Q))),$(Re,Ve)},ce=(Re,Ve)=>{{var Je=Ee=>{var Te=Sx(),He=C(Te,!0);S(Te),D(()=>ve(He,m().length)),$(Ee,Te)};V(Re,Ee=>{n(F)==="COUNT"&&Ee(Je)},Ve)}};V(tt,Re=>{n(F)==="FULL"?Re(re):Re(ce,!1)})}$(K,ae)};V(U,K=>{d()?K(O):K(qe,!1)})}$(ge,Ke)},$$slots:{default:!0}})};V(Z,ee=>{n(E)&&ee(oe)})}$(t,se),H(),o()}import{debounceFn as sb}from"@vkontakte/videoplayer-shared/es2018";import{ChromecastState as Rx,PlaybackState as Fl,Player as Nx,PredefinedQualityLimits as hs,VideoFormat as Jd,clientChecker as Y_}from"@vkontakte/videoplayer-core/es2018";import{assertNonNullable as pr,getHighestQuality as Dx,InterfaceLanguage as Ox,isInvariantQuality as Bx,isNonNullable as Hx,loadVKLangPack as Fx,Logger as Ux,map as j_,merge as zx,Observable as Yu,Subject as Ul,Subscription as xm,TracerFactory as Wx,ValueSubject as Kx,VideoQuality as qx,devNull as Qx,now as Gx,filter as Yx,once as jx}from"@vkontakte/videoplayer-shared/es2018";import{SeekAction as Os}from"@vkontakte/videoplayer-statistics/es2018";import{detectEmbed as Ix,devNull as oi,isNonNullable as Ex,now as ni}from"@vkontakte/videoplayer-shared/es2018";import{addScript as Px,Subject as ln,clearVideoElement as kx}from"@vkontakte/videoplayer-shared/es2018";var Ax="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",zu=class{constructor(e,i){this.adman=null;this.initialVolume=1;this.videoElement=null;this.currentAdSection=null;this.actions=null;this.adsState=null;this.playerState=null;this.events={init$:new ln,loadStarted$:new ln,loadEnded$:new ln,loadError$:new ln,ready$:new ln,slotRequested$:new ln,started$:new ln,timeRemained$:new ln,paused$:new ln,resumed$:new ln,ended$:new ln,empty$:new ln,skipped$:new ln,clicked$:new ln,closed$:new ln,error$:new ln};this.loadAdman=e=>(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[ni()]}),this.useAdmanFromNPM?this.loadAdmanNPM(e):this.loadAdmanMailRu(e));this.loadAdmanMailRu=e=>new Promise((i,o)=>{let r;this.events.loadStarted$.next();let a=()=>{clearTimeout(r),delete window.admanAsyncInit,window.AdmanHTML?(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[ni()]}),i(),this.events.loadEnded$.next()):(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[ni()]}),o())};Px(Ax,e,this.loadTimeout).then(()=>{oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[ni()]}),window.AdmanHTML?(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[ni()]}),i(),this.events.loadEnded$.next()):(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[ni()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout))}).catch(l=>{oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(l)],numbers:[ni()]}),o(),clearTimeout(r)})});this.loadAdmanNPM=e=>new Promise((i,o)=>{let r;this.events.loadStarted$.next();let a=()=>{clearTimeout(r),delete window.admanAsyncInit,window.AdmanHTML?(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[ni()]}),i(),this.events.loadEnded$.next()):(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[ni()]}),o())},l=()=>{d=!0,o()},d=!1,s=window.setTimeout(()=>{oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[ni()]}),l()},this.loadTimeout);e.addEventListener("abort",l),e.aborted&&(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[ni()]}),l()),window.AdmanHTML=window.AdmanHTML||null,import("@adtech/rbadman/out/rbadman-html5.min.js").then(()=>{oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(d)],numbers:[ni()]}),!d&&(window.AdmanHTML?(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[ni()]}),i(),this.events.loadEnded$.next()):(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[ni()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout)))},l).finally(()=>{clearTimeout(r),clearTimeout(s),e.removeEventListener("abort",l)})});this.onAdsReady=()=>{oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[ni()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(e,i)=>{var o;oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+i.muted],numbers:[ni(),i.bannerID]}),this.adsState&&this.playerState&&this.actions?(this.log({message:`ad started, section: ${e}, banner: ${JSON.stringify(i)}`}),this.events.started$.next(e),i.muted&&(this.setVolume(0),this.actions.setMuted(!0),this.log({message:"ad muted start"})),this.adsState.duration.set(i.duration),this.adsState.playbackState.set("playing"),this.adsState.canSkip.set(i.allowClose),this.adsState.secondsToWatchBeforeSkip.set(i.allowCloseDelay),this.startWatchDog(),(o=this.externalApi)!=null&&o.videoTrackAdEvent&&this.safeExternalCall(this.externalApi.videoTrackAdEvent,e,String(i.bannerID))):this.onAdError("Started callback failed: Adman is not initialized")};this.onAdTimeRemained=e=>{var o;((o=this.adsState)!=null&&o.playbackState?$e(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"))};this.onAdPaused=()=>{var e;oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",(e=this.currentAdSection)!=null?e:""],numbers:[ni()]}),this.stopWatchDog(),this.adsState?(this.log({message:"ad paused"}),this.adsState.playbackState.set("paused")):this.onAdError("Paused callback failed: Adman state is not initialized")};this.onAdPlayed=()=>{var e;oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",(e=this.currentAdSection)!=null?e:""],numbers:[ni()]}),this.startWatchDog(),this.adsState?(this.log({message:"ad played"}),this.adsState.playbackState.set("playing")):this.onAdError("Player callback failed: Adman is not initialized")};this.onAdMidrollPoint=()=>{if(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[ni()]}),this.adman&&this.actions){this.log({message:"midroll point"}),this.actions.switchFromVideoToAds(),this.currentAdSection="midroll",this.startWatchDog();try{this.adman.start("midroll")}catch(e){this.onAdError("could not start midroll")}}else this.onAdError("Midroll callback failed: Adman is not initialized")};this.onAdSkipped=()=>{var e;oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",(e=this.currentAdSection)!=null?e:""],numbers:[ni()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{var e;oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",(e=this.currentAdSection)!=null?e:""],numbers:[ni()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{var e;oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",(e=this.currentAdSection)!=null?e:""],numbers:[ni()]}),this.log({message:"ad completed"}),this.currentAdSection?(this.events.ended$.next(this.currentAdSection),this.currentAdSection==="postroll"&&this.setPostrollPassed(!0)):this.events.empty$.next(),this.switchToVideo(),this.stopWatchDog()};this.onAdClicked=()=>{var e,i;oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",(e=this.currentAdSection)!=null?e:""],numbers:[ni()]}),this.log({message:"ad clicked"}),(i=this.videoElement)==null||i.pause(),this.currentAdSection&&this.events.clicked$.next(this.currentAdSection),this.stopWatchDog()};this.onAdError=(e="ad error")=>{oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",e],numbers:[ni()]}),this.log({message:e}),this.events.error$.next(e),this.currentAdSection==="postroll"&&this.setPostrollPassed(!0),this.switchToVideo(!0),this.stopWatchDog()};this.log=e.createComponentLog("AdmanWrapper"),oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[ni()]}),this.loadTimeout=i.loadTimeout,this.initTimeout=i.initTimeout,this.runtimeTimeout=i.runtimeTimeout,this.useAdmanFromNPM=i.useAdmanFromNPM,this.volumeMultiplier=Math.max(0,Math.min(i.volumeMultiplier,1)),this.isVsidOriginal=i.isVsidOriginal}init(e,i,o){this.actions=e,this.adsState=i,this.playerState=o}onAdmanLoadingError(){this.onAdError("adman loading error")}async initAdman(e){var N,A;if(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[ni(),e.slotId]}),this.adman)return;this.events.init$.next(e.slotId),this.startWatchDog();let{width:i,height:o,isAutoplay:r,adsContainer:a,adsVideoElement:l,slotId:d,params:s={},paramsOverride:u={},duration:m,externalApi:p}=e;this.externalApi=p;let v,_=this.playerState&&$e(this.playerState.vsid);_&&(this.isVsidOriginal?v=_:v=parseInt(_,36));let{isEmbed:y,immediateOrigin:b}=Ix(),w=(N=y?b:window.location.href)!=null?N:window.location.href,I={...s,dl:encodeURIComponent(w),autoplay:r?1:0,player_width:i,player_height:o,...v?{request_id:v}:{},duration:m,...u};I=Object.fromEntries(Object.entries(I).filter(([E,P])=>Ex(P)));let T={slot:d,wrapper:a,videoEl:l,videoQuality:o,params:I,browser:{mobile:!1}};try{let E=new window.AdmanHTML;if(E.onReady(this.onAdsReady),E.onStarted(this.onAdStarted),E.onPlayed(this.onAdPlayed),E.onPaused(this.onAdPaused),E.adMidrollPoint(this.onAdMidrollPoint),E.onClosed(this.onAdClosed),E.onSkipped(this.onAdSkipped),E.onClicked(this.onAdClicked),E.onTimeRemained(this.onAdTimeRemained),E.onCompleted(this.onAdCompleted),E.onError(this.onAdError),E.setDebug(!1),(A=this.externalApi)!=null&&A.videoGetAds){let P=await this.safeExternalCall(this.externalApi.videoGetAds,I);P&&(delete T.slot,delete T.params,Object.assign(T,{json:P}))}E.init(T),this.adman=E,this.videoElement=l,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(T)}`})}catch(E){oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(E)],numbers:[ni()]}),this.onAdError("could not init adman")}}switchToVideo(e=!1){var o,r,a;if(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",(o=this.currentAdSection)!=null?o:"","force: "+e],numbers:[ni()]}),this.currentAdSection===null&&!e){this.log({message:"switch to video, no currentAdSection. can't switch"});return}let i=this.currentAdSection==="postroll";if(this.actions){if(this.adsState&&this.playerState)this.adsState.playbackState.set("inactive"),this.currentAdSection=null,this.log({message:`switch to video, isPostroll: ${i}`});else{let l="Switch to video: Adman state was not updated correctly";this.log({message:l}),this.events.error$.next(l)}(a=(r=this.actions).switchFromAdsToVideo)==null||a.call(r,!i)}}setPostrollPassed(e){var i;(i=this.adsState)==null||i.postrollPassed.set(e),this.log({message:"postroll passed"})}togglePlay(){var e;if(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",(e=this.currentAdSection)!=null?e:""],numbers:[ni()]}),this.adsState){this.log({message:"toggle play"});let i=$e(this.adsState.playbackState);i==="playing"?this.pause():i==="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 i=e*this.volumeMultiplier;if(this.log({message:`set volume ${i}`}),this.adman)try{this.adman.setVolume(i)}catch(o){this.onAdError("could not set ad volume")}this.videoElement&&(this.videoElement.volume=i)}setFullscreen(e){if(this.log({message:`set fullscreen ${e}`}),this.adman)try{this.adman.setFullscreen(e)}catch(i){this.onAdError("could not set ad fullscreen")}}startPreroll(){if(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[ni()]}),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(e){this.onAdError("could not start preroll")}}}else this.onAdError("Can not start preroll: Adman is not initialized")}startPostroll(){var e;if(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",(e=this.currentAdSection)!=null?e:""],numbers:[ni()]}),this.adman&&this.actions){this.log({message:"start postroll"}),this.actions.switchFromVideoToAds(),this.currentAdSection="postroll",this.startWatchDog();try{this.adman.start("postroll")}catch(i){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(){var e;if(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",(e=this.currentAdSection)!=null?e:""],numbers:[ni()]}),this.adman){this.log({message:"ad play"}),this.startWatchDog();try{this.adman.resume(),this.events.resumed$.next()}catch(i){this.onAdError("could not resume ad")}}else this.onAdError("Can not play: Adman is not initialized")}pause(){var e;if(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",(e=this.currentAdSection)!=null?e:""],numbers:[ni()]}),this.adman){this.stopWatchDog(),this.log({message:"ad pause"});try{this.adman.pause(),this.events.paused$.next()}catch(i){this.onAdError("could not pause ad")}}else this.onAdError("Can not pause: Adman is not initialized")}skip(){var e;if(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",(e=this.currentAdSection)!=null?e:""],numbers:[ni()]}),this.adman){this.stopWatchDog(),this.log({message:"ad skip"});try{this.adman.skip(),this.events.skipped$.next()}catch(i){this.onAdError("could not skip ad")}}else this.onAdError("Can not skip: Adman is not initialized")}setPosition(e,i){var o;(o=this.adman)==null||o.setPosition(Math.floor(e),Math.floor(i))}destroy(){var e,i,o,r,a,l,d,s,u,m,p,v;oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[ni()]}),this.log({message:"destroy"}),this.stopWatchDog(),(e=this.adman)==null||e.onReady(void 0),(i=this.adman)==null||i.onStarted(void 0),(o=this.adman)==null||o.onPlayed(void 0),(r=this.adman)==null||r.onPaused(void 0),(a=this.adman)==null||a.adMidrollPoint(void 0),(l=this.adman)==null||l.onClosed(void 0),(d=this.adman)==null||d.onSkipped(void 0),(s=this.adman)==null||s.onClicked(void 0),(u=this.adman)==null||u.onTimeRemained(void 0),(m=this.adman)==null||m.onCompleted(void 0),(p=this.adman)==null||p.onError(void 0),(v=this.adman)==null||v.destroy(),this.videoElement&&kx(this.videoElement),this.isDestroyed=!0}async safeExternalCall(e,...i){var o;try{return await e(...i)}catch(r){return this.onAdError((o=r==null?void 0:r.message)!=null?o:"External call failed"),null}}};var W_=t=>{let e=Math.round(t);return isNaN(e)||e<40?"":e>=40&&e<55?50:e>=55&&e<90?60:e>=90&&e<180?120:e>=180?240:""};var hm=class{constructor(){this.oneLineRegExp=/\r\n|\n|\r/;this.twoLinesRegExp=/\r\n\r\n|\n\n|\r\r/}parse(e,i){let o=[],r=e.split(this.twoLinesRegExp);for(let a of r){let l={startTime:0,endTime:0,texts:[],lang:i},d=a.split(this.oneLineRegExp);for(let s of d)if(!l.startTime&&!l.endTime){let u=new Wu,{startTime:m,endTime:p}=u.parse(s);l.startTime=m,l.endTime=p}else if(s.trim()!==""){let u=new _m,{texts:m}=u.parse(s);l.texts=[...l.texts,...m]}(l.startTime||l.endTime)&&l.texts.length>0&&o.push(l)}return o}},Wu=class{constructor(){this.timeRegExp=/(\d{2,})?:?(\d{2}):(\d{2}).(\d{2,3})/;this.timingRegExp=new RegExp(`${this.timeRegExp.source}( ?--> ?)${this.timeRegExp.source}`)}parse(e){let i={startTime:0,endTime:0},o=this.timingRegExp.exec(e);return o&&(i.startTime=this.calcTime(o[1],o[2],o[3],o[4]),i.endTime=this.calcTime(o[6],o[7],o[8],o[9])),i}parseTime(e){let i=this.timeRegExp.exec(e);return i?this.calcTime(i[1],i[2],i[3],i[4]):0}isTime(e){return this.timeRegExp.test(e)}calcTime(e="0",i="0",o="0",r="0"){let a=Number(e)*60*60,l=Number(i)*60,d=Number(o),s=+`0.${r}`;return a+l+d+s}},_m=class{constructor(){this.letterTagRegExp=/<[a-z]*>|<\/[a-z]*>/}parse(e){let i={texts:[]},r=e.replace(new RegExp(this.letterTagRegExp,"g"),"").split({[Symbol.split](l){let d=0,s=[];for(;d<l.length;){let u=["<",">"].reduce((m,p)=>{let v=l.indexOf(p,d);return m===-1||m>v?v:m},-1);if(u===-1){s.push(l.substring(d));break}s.push(l.substring(d,u)),d=u+1}return s}}),a=new Wu;for(let l of r)a.isTime(l)?i.texts.push({type:"timestamp",value:a.parseTime(l)}):i.texts.push({type:"text",value:l});return i}},K_=hm;import{isNonNullable as bm}from"@vkontakte/videoplayer-shared/es2018";var za,Ei,$m=0,ym=!1,q_="",Q_=(t,e=0,i=0)=>t<e&&t<i,Ku=(t,e=0,i=0)=>t>=e&&t<=i,Lx=(t,e=0,i=0)=>t>e&&t>i,G_=(t,e,i,o=!1)=>{var d;let r=(d=i.find(({id:s})=>s===e.value))==null?void 0:d.subtitles;if(o)return r==null?void 0:r.find(({startTime:u,endTime:m})=>Ku(t,u,m));let a=t>=$m,l=t<$m;if($m=t,l&&(ym=!1),bm(za)&&Ku(t,za.startTime,za.endTime)&&q_===e.value)return za;if(!bm(Ei)&&(r!=null&&r.length)&&!ym){Ei=r.find(({startTime:u,endTime:m})=>Ku(t,u,m)||a&&Q_(t,u,m)),za=void 0,!bm(Ei)&&r[r.length-1].endTime<t&&(ym=!0);return}else{if(Ku(t,Ei==null?void 0:Ei.startTime,Ei==null?void 0:Ei.endTime))return za=Ei,Ei=void 0,q_=e.value,za;(a&&Lx(t,Ei==null?void 0:Ei.startTime,Ei==null?void 0:Ei.endTime)||l&&Q_(t,Ei==null?void 0:Ei.startTime,Ei==null?void 0:Ei.endTime))&&(Ei=void 0)}};var qu={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"},Mx={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"},Zd=t=>{var e,i;return(i=(e=qu[t])!=null?e:qu[Mx[t]])!=null?i:void 0};import{Subscription as Vx}from"@vkontakte/videoplayer-shared/es2018";import"@vkontakte/videoplayer-statistics/es2018";var Qu=class{constructor(e,i,o,r=new Vx){this.oneStat=e;this.thinOneStat=i;this.mediascopePixel=o;this.statSubscription=r}destroy(){var e,i,o;(e=this.oneStat)==null||e.destroy(),(i=this.thinOneStat)==null||i.destroy(),(o=this.mediascopePixel)==null||o.destroy(),this.statSubscription.unsubscribe()}};var Gu=(i=>(i.DESKTOP_CONTROL_PANEL_LEFT="desktop-control-panel-left",i.DESKTOP_CONTROL_PANEL_RIGHT="desktop-control-panel-right",i))(Gu||{});var gs=t=>t!=null?t:0,Ds=(t,e)=>{var r,a;let i=(r=t==null?void 0:t.getBoundingClientRect)==null?void 0:r.call(t),o=(a=e==null?void 0:e.getBoundingClientRect)==null?void 0:a.call(e);return{top:Math.round(gs(i==null?void 0:i.top)-gs(o==null?void 0:o.top)),left:Math.round(gs(i==null?void 0:i.left)-gs(o==null?void 0:o.left)),bottom:Math.round(gs(i==null?void 0:i.bottom)-gs(o==null?void 0:o.top)),right:Math.round(gs(i==null?void 0:i.right)-gs(o==null?void 0:o.left))}},Bl=t=>{var i;let e=(i=t==null?void 0:t.getBoundingClientRect)==null?void 0:i.call(t);return{width:gs(e==null?void 0:e.width),height:gs(e==null?void 0:e.height)}};var Ln="off";var Hl=t=>!!(Math.round(Math.abs(t)/90)%2);var X_=({interfaceLanguage:t,isCyrillicRelatedInterface:e,videoId:i,isClip:o,isLiveCatchUpMode:r,statAuthToken:a,isAudioDisabled:l,canDownload:d,callbacks:s,webApi:u,videoEpisodes:m,previewThumbsData:p,uiConfig:v,coreConfig:_,player:y,disabledControls:b,isInteractive:w,interactiveRanges$:I,isInteractiveTime$:T,replayInteractive:N,stopPlayer:A,hasInteractiveBranches:E,playPrevChapterDisabledTooltip:P,additionalButtons:Q,additionalSettingsMenuItems:F,additionalContextMenuItems:z,playPrevVideo:X,playNextVideo:se,onVideoChanged:Z,looped:oe=!1,statistics:J,saveRate:Ce,internalsExposure:me,playerView:ee,playerId:be,metaConfig:we})=>{var Uv,zv;let ge={..._,isAudioDisabled:l,live:{...(Uv=_.live)!=null?Uv:{},isLiveCatchUpMode:!!r}},pe=v,Ke=Wx.createRootTracer(pe.features.tracer),U=Ke.createComponentTracer("Store"),O=y||new Nx(ge,Ke,{playerId:be,onDevNullLog:s==null?void 0:s.onDevNullLog});me==null||me.expose({corePlayer:O});let qe=new Ux,K=new zu(qe,{loadTimeout:pe.ads.loadTimeout,initTimeout:pe.ads.initTimeout,runtimeTimeout:pe.ads.runtimeTimeout,useAdmanFromNPM:pe.ads.useAdmanFromNPM,volumeMultiplier:pe.ads.volumeMultiplier,isVsidOriginal:pe.ads.isVsidOriginal}),ae=Va.getInstance(),xe=u==null?void 0:u.pictureInPictureApi,Be=u==null?void 0:u.annotationsApi,tt=u==null?void 0:u.slotsApi,re=u==null?void 0:u.focusManager,ce=qe.createComponentLog("Store"),Re,Ve,Je={},Ee=new hu,Te=new xm,He="",Ct=de(!1),xt=J&&J.oneStat?ii(J.oneStat.vsid$):Ar(void 0),At=de(oa()),at=de(!1),Tt=()=>b_(document,Y_.device.isIOS),jt=(zv=xe==null?void 0:xe.info.isActive$)!=null?zv:new Kx(!1),It=de(0),Dt=de(!1),Ut=de(!1),Y=de([]),Pe=zx(O.events.fatalError$,O.events.managedError$).subscribe(c=>Y.update(g=>[...g,c])),le=Ar(!1,c=>{let g=O.events.fatalError$.subscribe(()=>c(!0));return()=>g.unsubscribe()}),ye=async c=>{var ie;let g=Object.values(Ox).includes(c);if(pe.downloadVKLanguages&&(g&&pe.updateBuiltinLanguages||!Vf(c))){let Se;try{Se=await Fx(c,Ph,kh)}catch(Ye){(ie=J==null?void 0:J.oneStat)==null||ie.logError({errorType:"VKLangPack",fatal:!1}),ae==null||ae.report(Ye,{errorType:"VKLangPack",fatal:!1})}Se&&(Mf({language:c,pack:Se,fallback:pe.defaultLanguage}),Le.set(c),nt.update(Ye=>Ye+1))}Vf(c)&&Le.set(c)},Le=de(t),nt=de(0),Et=de(e);ye(t);let fe=(c,g)=>{let M=$e(Le);return Rf(M,c,g,pe.defaultLanguage)},Oe=de("thumb");Oe.subscribe(c=>{c==="ads"&&O.info.playbackState$.getValue()&&zt()});let ze=(()=>{let c=mi([le,Oe],([g,M])=>g?"crashed":M);return{...c,is:g=>$e(c)===g}})(),bt=de(),zt=()=>{bt.set({muted:O.info.muted$.getValue()})},Pt=(()=>{let c=de(new Set(b));return{...c,add:g=>{c.update(M=>new Set([...M].concat(g)))},remove:g=>{c.update(M=>{let ie=[...M];return new Set(Array.isArray(g)?ie.filter(Se=>!g.includes(Se)):ie.filter(Se=>Se!==g))})},includes:g=>{let M=$e(c);return Array.isArray(g)?g.every(ie=>M.has(ie)):M.has(g)}}})(),ui=de({width:0,height:0}),di=null,Vi=O.info.isBuffering$,Lt=Ar(Vi.getValue(),c=>{let g=Vi.subscribe(M=>{M&&di===null?di=window.setTimeout(()=>{c(Vi.getValue()),di=null},pe.loaderDelay):c(M)});return()=>{g.unsubscribe(),di&&clearTimeout(di)}});U.log("create store"),ce({message:"create store"});let pi=c=>{let g=c.container,M=()=>{mt=new MutationObserver(Se=>{let{removedNodes:Ye}=Se[0];Ye.length&&g.append(O.experimental.element$.getValue())}),mt.observe(g,{childList:!0})},ie=O.experimental.element$.getValue();if(ie)g.append(ie),M();else{let Se=O.experimental.element$.pipe(Yx(Ye=>!!Ye),jx()).subscribe(Ye=>{g.append(Ye),M()});Te.add(Se)}},hi=c=>{ce({message:`init video, config: ${JSON.stringify(c)}`}),w?pi(c):(Qx.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[Gx()]}),O.initVideo(c)),U.log("init video",{isInteractive:w}),c.subtitles&&O.setExternalTextTracks(c.subtitles),Re=c,He=c.subtitlesForcedLanguage||""},ut=new Ul,Gt=c=>ut.next(c),Ri=new Ul,bi=new Ul,ei=new Ul,mt=null,Ge={actionRewind$:Ri,actionSeek$:bi,inPiP$:jt,inFullscreen$:new Yu(c=>At.subscribe(g=>c.next(g))),actionSetSubtitle$:ei,nextMovie$:ut},fi=new Ul,po=new Ul,Go={actionSeek$:bi,actionSubtitlesSwitched$:fi,actionQuality$:po,playerSize$:new Yu(c=>ui.subscribe(g=>c.next(g))),inPiP$:jt,inFullscreen$:new Yu(c=>At.subscribe(g=>c.next(g))),isLoaderVisible$:new Yu(c=>Lt.subscribe(g=>c.next(g)))};if(J){let{oneStat:c,thinOneStat:g,mediascopePixel:M,statSubscription:ie}=J;c&&(w||ie.add(c.attachTo(O)),ie.add(c.attachToUi(Ge)),ie.add(c.attachToAds(K.events)),c.authorize(a).catch(Se=>{ce({message:`onestat auth error ${String(Se)}`})}),M&&M.attachTo(O)),g&&(ie.add(g.attachTo(O,K.events)),ie.add(g.attachToUi(Go)),ie.add(g.attachToAds(K.events)),g.updateContext({isMobile:$e(Ct)}),g.authorize(a))}if(ae){let c=new xm,g=(M,ie)=>c.add(M.subscribe(ie));if(g(O.events.managedError$,M=>{ae.logIError(M)}),g(O.events.fatalError$,M=>{ae.logIError(M,!0)}),J){let{oneStat:M}=J;M&&g(M.experimental.error$,ie=>{ae.logIError(ie)})}ae.sentrySubscription.add(c)}let Yo=()=>{if(Y_.device.isIOS&&Ve)try{$_(Ve)}catch(c){ce({message:`exitIosSafariFullscreen failed: ${c}`})}};Te.add(O.experimental.element$.subscribe(c=>{c&&(Ve=c,c.classList.add("player-media"),Na(xe)&&xe.updateVideoElement(),w&&c.setAttribute("pip","false"),(ee==="preview"||!pe.features.pip&&!pe.features.dpip)&&(c.setAttribute("disablePictureInPicture","true"),c.setAttribute("x-yandex-pip","false")))})).add(O.events.ended$.subscribe(()=>{var c;Yo(),(c=s==null?void 0:s.onEnded)==null||c.call(s)})).add(O.events.looped$.subscribe(()=>{var c;(c=s==null?void 0:s.onLooped)==null||c.call(s)})).add(O.events.started$.subscribe(async()=>{var g,M;Na(xe)&&await(xe==null?void 0:xe.revealPictureInPicture());let c=O.info.muted$.getValue();(g=s==null?void 0:s.onStarted)==null||g.call(s),(M=Je.onStarted)==null||M.call(Je,c)})).add(O.events.willSeek$.subscribe(({from:c,to:g})=>{var M;(M=s==null?void 0:s.onSeek)==null||M.call(s,c,g)})).add(O.events.autoplaySoundProhibited$.subscribe(()=>{var c;(c=s==null?void 0:s.onAutoplaySoundProhibited)==null||c.call(s)})).add(O.info.position$.subscribe(c=>{var M;let g=O.info.duration$.getValue();isFinite(g)&&g>0&&((M=s==null?void 0:s.onTimeupdate)==null||M.call(s,g,c),K.setPosition(c,g))})).add(O.events.fatalError$.subscribe(c=>{var g;(g=s==null?void 0:s.onCrashed)==null||g.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(O.events.fetcherRecoverableError$.subscribe(c=>{var g;(g=s==null?void 0:s.onRecoverableError)==null||g.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(O.events.loadedMetadata$.subscribe(()=>{Dt.set(!0)})).add(O.info.is3DVideo$.subscribe(c=>{Ut.set(c)})).add(O.info.isEnded$.subscribe(c=>{w&&(c?(T!=null&&T.getValue()&&Pt.add(Id),Pt.add("PLAY_BUTTON")):Pt.remove("PLAY_BUTTON"))})).add(O.info.liveTime$.subscribe(c=>{var g;(g=s==null?void 0:s.onLiveTime)==null||g.call(s,c)})).add(O.info.isStalled$.subscribe(c=>{var g;(g=s==null?void 0:s.onStalledChanged)==null||g.call(s,c)})).add(O.info.isLiveEnded$.subscribe(c=>{var g;return c&&((g=s==null?void 0:s.onLiveEnded)==null?void 0:g.call(s))})).add(K.events.loadStarted$.subscribe(()=>{var c,g;return(g=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadStarted)==null?void 0:g.call(c)})).add(K.events.loadEnded$.subscribe(()=>{var c,g;return(g=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadEnded)==null?void 0:g.call(c)})).add(K.events.loadError$.subscribe(()=>{var c,g;return(g=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadError)==null?void 0:g.call(c)})).add(K.events.init$.subscribe(()=>{var c,g;return(g=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onInit)==null?void 0:g.call(c)})).add(K.events.ready$.subscribe(()=>{var c,g;return(g=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onReady)==null?void 0:g.call(c)})).add(K.events.started$.subscribe(c=>{var g,M;return(M=(g=s==null?void 0:s.adsInfo)==null?void 0:g.onStarted)==null?void 0:M.call(g,c)})).add(K.events.timeRemained$.subscribe(c=>{var g,M;return(M=(g=s==null?void 0:s.adsInfo)==null?void 0:g.onTimeRemained)==null?void 0:M.call(g,c)})).add(K.events.ended$.subscribe(c=>{var g,M;return(M=(g=s==null?void 0:s.adsInfo)==null?void 0:g.onCompleted)==null?void 0:M.call(g,c)})).add(K.events.empty$.subscribe(()=>{var c,g;return(g=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onEmpty)==null?void 0:g.call(c)})).add(K.events.clicked$.subscribe(c=>{var g,M;return(M=(g=s==null?void 0:s.adsInfo)==null?void 0:g.onClicked)==null?void 0:M.call(g,c)})).add(K.events.closed$.subscribe(c=>{var g,M;return(M=(g=s==null?void 0:s.adsInfo)==null?void 0:g.onClosed)==null?void 0:M.call(g,c)})).add(K.events.error$.subscribe(c=>{var g,M;return(M=(g=s==null?void 0:s.adsInfo)==null?void 0:g.onError)==null?void 0:M.call(g,c)})).add(K.events.paused$.subscribe(()=>{var c,g;return(g=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onPaused)==null?void 0:g.call(c)})).add(K.events.resumed$.subscribe(()=>{var c,g;return(g=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onResumed)==null?void 0:g.call(c)}));let yt=new xm,Ot=()=>{var Ye,kt,Bt;let{debugLog:c}=pe,g,M="#9df7b7",ie="#efd169";if(c&&c!==!0){let{colors:Kt}=c;g=c.tag,M=(Ye=Kt==null?void 0:Kt[0])!=null?Ye:M,ie=(Bt=(kt=Kt==null?void 0:Kt[1])!=null?kt:Kt==null?void 0:Kt[0])!=null?Bt:ie}let Se=g?`: ${g}`:"";yt.add(O.events.log$.subscribe(Kt=>{console.debug(`%c sdk${Se} `,`background:${M};`,`sdk component: ${Kt.component}`,Kt.message)})).add(qe.log$.subscribe(Kt=>{console.debug(`%c ui${Se} `,`background:${ie};`,`ui component: ${Kt.component}.`,Kt.message)}))},W=()=>{yt.unsubscribe()},Mt=(c,g)=>{U.log("start camera manual rotation",{mx:c,my:g}),O.startCameraManualRotation(c,g)},ri=(c=!1)=>{U.log("stop camera manual rotation",{immediate:c}),O.stopCameraManualRotation(c)},pt=(c,g,M)=>{U.log("move camera focus px",{xpx:c,ypx:g,dt:M}),O.moveCameraFocusPX(c,g,M)},Xt=()=>{O.holdCamera()},vt=()=>{O.releaseCamera()},ot=Ar(O.info.position$.getValue(),c=>{let g,M,ie=()=>{let Se=O.info.playbackState$.getValue(),Ye=O.info.isLive$.getValue(),kt=O.info.duration$.getValue(),Bt=O.info.position$.getValue();if(Se&&[Fl.PLAYING,Fl.PAUSED].includes(Se)){let Kt=Ye?Bt-kt:O.getExactTime();Kt!==M&&c(Kt),M=Kt}g=requestAnimationFrame(ie)};return ie(),()=>cancelAnimationFrame(g)}),Ni=ii(O.info.playbackState$),Pi=ii(O.info.isBuffering$),cn=mi([Ni,Pi],([c,g])=>g?"buffering":c),un=ii(O.info.currentBuffer$),ki=ii(O.info.isEnded$),Di=ii(O.info.isLive$),Mn=pe.features.playbackRate?ii(O.info.canChangePlaybackSpeed$):Ar(!1),go=ii(O.info.liveBufferTime$),io=ii(O.info.volume$),Ti=ii(O.info.muted$),Lo=_u(O.info.predefinedQualityLimitType$.pipe(j_(c=>c===hs.TRAFFIC_SAVING)),O.info.predefinedQualityLimitType$.getValue()===hs.TRAFFIC_SAVING),Mo=_u(O.info.predefinedQualityLimitType$.pipe(j_(c=>c===hs.HIGH_QUALITY)),O.info.predefinedQualityLimitType$.getValue()===hs.HIGH_QUALITY),pn=ii(O.info.autoQualityLimitingAvailable$),Vr=ii(O.info.availableQualities$),Rr=ii(O.info.availableQualitiesFps$),Nr=ii(O.info.chromecastState$),bs=ii(O.info.chromecastDeviceName$),Dr=ii(O.info.currentFormat$),Zn=ii(O.info.throughputEstimation$),Or=ii(O.info.videoBitrate$),fn=ii(O.info.intrinsicVideoSize$),mn=ii(O.info.duration$),fr=ii(O.info.isAudioAvailable$),mr=()=>{di&&clearTimeout(di),di=null},jo=mi([mn,Di],([c,g])=>g?-c:c),vr=mi([Ni],([c])=>c===Fl.PLAYING),gr=ii(O.info.atLiveEdge$),Jn=ii(O.info.atLiveDurationEdge$),Vn=ii(O.info.position$),ns=mi([Vn,mn],([c,g])=>isFinite(c)&&isFinite(g)&&!!g),Vo=mi([Nr],([c])=>c===Rx.CONNECTED),hr=ii(O.info.availableVideoStreams$),Oi=pe.features.audioLanguages?ii(O.info.availableAudioStreams$):Ar([]),_r=ii(O.info.currentVideoStream$),Rn=ii(O.info.currentAudioStream$),ct=c=>{c.language&&Pf(c.language),O.setVideoStream(c)},Zt=(c,g)=>{O.setAudioStream(c),Ro(g)&&(c.language&&Pf(c.language),pe.features.userVideoPrefs&&i&&Lf(pe.userSalt,String(i),{audioTrackId:c.id}))},br=c=>{let g;if(c.length===1&&(g=c.at(0)),g!=null||(g=c.find(ie=>"isDefault"in ie&&ie.isDefault)),pe.features.userVideoPrefs&&i){let ie=wu(pe.userSalt,String(i));if(ie!=null&&ie.audioTrackId){let Se=c.find(Ye=>Ye.id===ie.audioTrackId);g=Se!=null?Se:g}}let M=i_();return M&&(g!=null||(g=c.find(({language:ie})=>M===ie))),g!=null||(g=c.at(0)),g},Br=c=>{U.log("change audio stream",{id:c});let g=O.info.availableAudioStreams$.getValue().find(M=>M.id===c);g&&Zt(g,!0)},Hr=!1;Te.add(O.info.availableAudioStreams$.subscribe(c=>{if(!Hr&&c.length){let g=br(c);g&&(O.setAudioStream(g),Hr=!0)}})),Oi.subscribe(c=>{var g;(g=s==null?void 0:s.onAvailableAudioStreamsChanged)==null||g.call(s,c.map(({label:M="",id:ie="",language:Se=""})=>({label:M,language:Se,id:ie})))}),Rn.subscribe(c=>{var g;return c&&((g=s==null?void 0:s.onAudioStreamChanged)==null?void 0:g.call(s,c.id))});let Nn=!1;Te.add(O.info.availableVideoStreams$.subscribe(c=>{if(!Nn&&c.length){let g=br(c);g&&(O.setVideoStream(g),Nn=!0)}}));let er=de(void 0),ho=ii(O.info.isAutoQualityEnabled$,c=>c&&er.set(void 0)),Dn=ii(O.info.currentQuality$,()=>er.set(void 0)),tr=mi([er,Dn],([c,g])=>c!=null?c:g),On=mi(Dr,c=>c!==Jd.MPEG),vn=mi([Vr,Rr,ho,tr,On],([c,g,M,ie,Se])=>{let Ye=[];Se&&Ye.push({value:"auto",displayValue:fe("auto_quality_option"),selected:M});let kt=c.filter(Bt=>!Bx(Bt));for(let Bt of kt){let Kt=g[Bt];Ye.push({value:Bt,displayValue:`${Bt}${Kt?W_(Kt):""}`,selected:M?!1:Bt===ie})}return Ye}),gn=ii(O.info.currentPlaybackRate$),hn=mi([gn,gr,Jn],([c,g,M])=>{let ie=M||w?1:pe.controls.playbackRateMin,Se=g?1:pe.controls.playbackRateMax,Ye=pe.controls.playbackRateStep,kt=[];for(let Bt=ie;Bt<=Se;Bt+=Ye)kt.push({value:Bt,displayValue:Bt===1?fe("playback_rate_1"):fe("playback_rate",{multiplier:Bt.toString(10)}),selected:c===Bt});return kt}),Xo=()=>({displayValue:fe("subtitles_off"),value:Ln,language:""}),Bi=de(Xo()),Yi=mi([Bi,nt],([c],g)=>{c.value===Ln?g(Xo()):g(c)}),Zo=pe.features.subtitles?ii(O.info.availableTextTracks$):Ar([]),ir=Wh(),$r=mi([Zo,Yi],([c,g],M)=>{var Ye;let ie=[],Se=c.find(({id:kt})=>kt===g.value);if(Se!=null&&Se.url){let[,kt]=(Ye=ir.find(Se.url))!=null?Ye:[];if(kt){M(kt);return}Ee.download(Se.url).then(Bt=>{if(!Bt||Ee.isDestroyed())return;let Kt=new K_,qs=Se.language;if(qs){let jb=!!Se.isAuto,Xb=Kt.parse(Bt,qs);ie.push({lang:qs,subtitles:Xb,isAuto:jb,id:Se.id})}ir.add(Se.url,ie),$e(Yi).value===g.value&&M(ie)}).catch(Bt=>{var Kt;(Kt=J==null?void 0:J.oneStat)==null||Kt.logError({errorType:"Subtitles download",fatal:!1}),ae==null||ae.report(Bt,{errorType:"Subtitles download",fatal:!1})})}M(ie)}),_n=mi([gn,vr,Yi],([c,g,M],ie)=>{let kt;if(O.info.isLive$.getValue()&&g&&M.value!==Ln){let Kt=()=>{let qs=1e3/(3*c);kt=setTimeout(Kt,qs),ie(Date.now())};return Kt(),()=>clearTimeout(kt)}}),yr=mi([Zo,Yi],([c,g])=>{if(!c.length)return[];let M=[];for(let{language:ie,isAuto:Se,id:Ye}of c){let kt=ie&&Zd(ie);ie&&kt&&M.push({displayValue:Se?fe("subtitles_auto",{language:kt}):kt,value:Ye,selected:(g==null?void 0:g.value)===Ye,isAuto:Se,language:ie})}return M.length?(M.unshift({...Xo(),selected:(g==null?void 0:g.value)===Ln}),M):[]}),lt={available:[],prev:[]},$t=()=>{var g,M;let c=O.experimental.getCurrentTime$.getValue();return(M=(g=c==null?void 0:c())!=null?g:Ve==null?void 0:Ve.currentTime)!=null?M:0},oo=mi([ot,Yi,$r,_n],([c,g,M,ie])=>{var Ye;let Se=O.info.isLive$.getValue();if(Se&<.prev!==M){let kt=M.find(({id:Kt})=>Kt===g.value),Bt=lt.prev.find(({id:Kt})=>Kt===g.value);if(kt){let Kt={...kt,subtitles:[...(Ye=Bt==null?void 0:Bt.subtitles)!=null?Ye:[],...kt.subtitles]};lt.available=[Kt],lt.prev=M}}if(g&&g.value!==Ln){let kt=Se?$t():c,Bt=Se?lt.available:M;return G_(kt,g,Bt,Se)}}),fo=mi([oo],([c])=>c!=null&&c.texts?c.texts:[]);Te.add(Yi.subscribe(c=>{var g,M;if(c.value===Ln)(g=s==null?void 0:s.onSubtitleOff)==null||g.call(s);else{let ie=Object.entries(qu).find(([Se,Ye])=>Ye===c.displayValue);(M=s==null?void 0:s.onSubtitleOn)==null||M.call(s,ie?ie[0]:"",c.value)}}));let Jo=de(!0),_o=mi([un,jo,Vn,go],([c,g,M,ie])=>{var Bt;let Se=(Bt=c==null?void 0:c.end)!=null?Bt:0;if(!ie)return Se/g;let kt=-M+ie-g;return(Se-kt)/g}),bo=ii(O.info.availableSources$),Ii=mi([bo],([c])=>Object.keys((c==null?void 0:c[Jd.MPEG])||{}).length>0),$o=()=>{var M,ie,Se;let c=Object.keys(((ie=(M=O.info.availableSources$)==null?void 0:M.getValue())==null?void 0:ie[Jd.MPEG])||{}),g=Dx(c)||qx.Q_144P;return(Se=Re.sources[Jd.MPEG])==null?void 0:Se[g]},Fr=()=>{var g;let c=$o();if(c)U.log("download video",{url:c}),Fh(c,((g=Re==null?void 0:Re.meta)==null?void 0:g.title)||"video");else{let M="There is no URL for download video";U.log("download video",{message:M}),ce({message:M})}},xr=()=>{ce({message:"toggle muted"});let c=O.info.muted$.getValue();O.info.volume$.getValue()===0&&!c?Ur(wr(),!1):en(!c,!1)},$s=()=>{var c;if(Wt.ui.settingsMenu.visible$.set(!1),!$e(Wt.ui.settingsSubMenu.visible$)){let g=$e(Wt.ui.settingsMenu.ref$);if((c=s==null?void 0:s.uiInfo)!=null&&c.onSettingsMenu&&g){let ie=Bl(g),Se={top:0,left:0,bottom:0,right:0};s.uiInfo.onSettingsMenu({visible:!1,size:ie,position:Se,name:"settings"})}}U.log("close settings menu")},Hi=async(c,g=()=>Promise.resolve())=>{var Se;Wt.ui.settingsMenu.openedByBtnKeyboard$.set(!!c),Wt.ui.settingsMenu.visible$.set(!0),await g();let M=$e(Wt.ui.settingsMenu.ref$),ie=ha();if((Se=s==null?void 0:s.uiInfo)!=null&&Se.onSettingsMenu&&M&&ie){let kt=Bl(M),Bt=Ds(M,ie);s.uiInfo.onSettingsMenu({visible:!0,size:kt,position:Bt,name:"settings"})}U.log("open settings menu",{wasOpenedByKeyboard:c})},ys=(c,g=!1)=>{var Ye;Wt.ui.settingsSubMenu.visible$.set(!1);let M=$e(Wt.ui.settingsMenu.ref$),ie=ha(),Se=$e(Wt.ui.settingsMenu.visible$);if((Ye=s==null?void 0:s.uiInfo)!=null&&Ye.onSettingsMenu&&M&&ie)if(Se&&!g){let Bt=Bl(M),Kt=Ds(M,ie);s.uiInfo.onSettingsMenu({visible:!0,size:Bt,position:Kt,name:"settings"})}else{let Bt=Bl(c),Kt={top:0,left:0,bottom:0,right:0},qs=$e(Wt.ui.settingsSubMenu.name$);s.uiInfo.onSettingsMenu({visible:!1,size:Bt,position:Kt,name:qs})}U.log("close settings sub menu")},rs=(c,g)=>{var ie;Wt.ui.settingsSubMenu.visible$.set(!0),Wt.ui.settingsSubMenu.ref$.set(g),Wt.ui.settingsSubMenu.name$.set(c);let M=ha();if((ie=s==null?void 0:s.uiInfo)!=null&&ie.onSettingsMenu&&g&&M){let Ye=Bl(g),kt=Ds(g,M);s.uiInfo.onSettingsMenu({visible:!0,name:c,size:Ye,position:kt})}U.log("open settings sub menu",{name:c})},wr=()=>{var g;let c=Math.max(pe.volumeMinRestore,(g=bu())!=null?g:0);return c===0?pe.volumeDefault:c},Ro=c=>{let g=pe.features.savePreferredStatesOnUserActionOnly;return!g||g&&!c},Ur=(c,g)=>{let M=c===0?wr():c,ie=O.info.muted$.getValue();ce({message:`set volume, volume: ${c}, preferredVolume: ${M}`});let Se=!l||ze.is("ads");ie&&c>0&&Se&&(ie=!1,Ro(g)&&If(!1)),O.setVolume(c,ie),K.setVolume(c),Ro(g)&&wf(M)},en=(c,g)=>{let M=O.info.volume$.getValue();ce({message:`set muted, currentVolume: ${M}, mute: ${c}`});let ie=ze.is("ads");if(O.setMuted(c,ie),K.setVolume(c?0:M),Ro(g)&&(!ie||!c)&&If(c),!c&&M===0){let Se=wr();O.setVolume(Se),Ro(g)&&wf(Se),K.setVolume(Se)}},tn=de(!1),Fe=c=>{var g,M;U.log("set looped",{isLooped:c}),tn.set(c),O.setLooped(c),(M=(g=s==null?void 0:s.uiInfo)==null?void 0:g.onLoopedChanged)==null||M.call(g,c)};Fe(oe);let wt=()=>{var c,g;(g=(c=s==null?void 0:s.uiInfo)==null?void 0:c.onReportProblem)==null||g.call(c)},ci=(c,g=!1)=>{var M;ce({message:`set autoplayNextEnabled, value: ${c}`}),U.log("set autoplay next enabled",{autoplayNextEnabled:c}),Wt.ui.autoplayNextEnabled$.set(c),r_(c),g&&((M=s==null?void 0:s.onSetAutoplayNextEnabled)==null||M.call(s,c))},No=c=>{ce({message:`set timerNextVideoRunning, value: ${c}`}),U.log("set timer next video running",{timerNextVideoRunning:c}),Wt.ui.timerNextVideoRunning$.set(c)},yo=(c=!0)=>{var M;let g=!0;if(c&&(s!=null&&s.onPrevVideoClick))try{g=(M=s==null?void 0:s.onPrevVideoClick)==null?void 0:M.call(s)}catch(ie){ce({message:"onPrevVideoClick callback failed to execute"})}Z(!0),g&&X()},Do=(c=!0)=>{var M;let g=!0;if(c&&(s!=null&&s.onNextVideoClick))try{g=(M=s==null?void 0:s.onNextVideoClick)==null?void 0:M.call(s)}catch(ie){ce({message:"onNextVideoClick callback failed to execute"})}Z(!1),g&&se()},Fi=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementShow)==null||c.call(s)},xo=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementClick)==null||c.call(s)},Bn=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementAuto)==null||c.call(s)},Sr=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementCancel)==null||c.call(s)},wo=()=>{O.prepare()},no=()=>{pr(Wt);let c=$e(Wt.ui.controls.disabledControls$),g=$e(Wt.playerPhase),M={playerPhase:g,isInteractive:w,isVideoEnded:!1,action:"none"};if(c.has("PLAY_BUTTON"))return;if(ce({message:"toggle play"}),g==="ads"){M.action="play",U.log("toggle adman play",M),K.togglePlay();return}let ie=()=>{var Ye;ce({message:"toggle play, call player.play"}),M.action="play",O.play(),(Ye=s==null?void 0:s.onPlay)==null||Ye.call(s)},Se=()=>{var Ye;ce({message:"toggle play, call player.pause"}),M.action="pause",O.pause(),(Ye=s==null?void 0:s.onPause)==null||Ye.call(s)};if(O.info.isEnded$.getValue()){if(ce({message:"toggle play, video ended, seek to 0"}),Ri.next(),bi.next(Os.REWIND),w){N==null||N();return}O.seekTime(0),ie()}else O.info.playbackState$.getValue()!==Fl.PLAYING?ie():Se();U.log("toggle play",M)},bn=(c,{changeReason:g="default",appliesTo:M="to-video",byUser:ie=!1}={},Se)=>{ce({message:`set quality, quality: ${c}`}),U.log("set quality",{quality:c}),ie&&po.next(c),O.setAutoQuality(c==="auto");let{qualityDetailsSubMenuEnabled:Ye}=pe.features;$u(),c!=="auto"?(Ye?(yu({type:"exact_quality",quality:c,videoId:i},M),O.setPredefinedQualityLimits(hs.UNKNOWN)):Sf(i,c),er.set(c),O.setQuality(c)):Ye&&g==="default"&&(Wr("auto_quality",M,Se),$e(Lo)&&Oo(!1,void 0,Se),$e(Mo)&&Hn(!1,void 0,Se))},Oo=(c,g="as-default",M)=>{ce({message:`set trafficSavingEnabled, value: ${c}`}),U.log("set traffic saving enabled",{trafficSavingEnabled:c});let ie=c?hs.TRAFFIC_SAVING:hs.UNKNOWN;pe.features.qualityDetailsSubMenuEnabled?(zr(ie,g,M),Pd(!1)):(O.setPredefinedQualityLimits(ie),Ro(M)&&Pd(c))},Hn=(c,g="as-default",M)=>{ce({message:`set highQualityEnabled, value: ${c}`}),U.log("set high quality enabled",{highQualityEnabled:c}),zr(c?hs.HIGH_QUALITY:hs.UNKNOWN,g,M)},zr=(c,g,M)=>{c!==hs.UNKNOWN&&($e(pn)&&!$e(ho)&&bn("auto",{appliesTo:g,changeReason:"limit-changed"},M),Wr(c,g,M)),O.setPredefinedQualityLimits(c)},Wr=(c,g,M)=>{Ro(M)&&(yu({type:c,videoId:i},g),g==="as-default"&&yu({type:c,videoId:i},"to-video"))},Fn=(c,g=!0)=>{U.log("set playback rate",{playbackRate:c}),O.setPlaybackRate(c),pe.features.saveRate&&Ce&&!O.info.isLive$.getValue()&&g&&o_(c)},Ze=()=>{let c=$e(Mn),g=$e(hn),M=g.findIndex(({selected:Se})=>Se);if(M===g.length-1||!c)return g[M];let ie=g[M+1];return Fn(ie.value),ie},Yt=()=>{let c=$e(Mn),g=$e(hn),M=g.findIndex(({selected:Se})=>Se);if(M===0||!c)return g[M];let ie=g[M-1];return Fn(ie.value),ie},$i=(c={...Xo(),selected:!1},g)=>{U.log("set subtitles",{...c}),c.value!==Ln&&ei.next(c.isAuto?c.value+"_auto":c.value),fi.next({enabled:c.value!==Ln,lang:c.language,auto:!!c.isAuto}),Bi.set(c),Ro(g)&&(Af(c.value===Ln?void 0:c.language),pe.features.userVideoPrefs&&i&&Lf(pe.userSalt,String(i),{subtitleTrackId:c.value===Ln?void 0:c.value}))},So=c=>{U.log("toggle subtitles");let g=$e(Yi);(g==null?void 0:g.value)===Ln?Un(c):Bo(c)},$n=(c,g)=>{U.log("change subtitle",{enabled:c}),c?Un(!0,g):Bo(!0)},Un=(c,g)=>{U.log("subtitle on");let M=$e(yr),ie=$e(Le),Se=He!=null?He:ie,Ye;g&&(Ye=M.find(kt=>kt.value===g)),Ye!=null||(Ye=M.filter(kt=>kt.value!==Ln).find(kt=>kt.language===Se)),$i(Ye!=null?Ye:M[1],c)},Bo=c=>{U.log("subtitle off"),$i(void 0,c)};Te.add(O.info.availableTextTracks$.subscribe(c=>{var M;function g(){let ie=[];for(let{language:Se,isAuto:Ye,id:kt}of c){let Bt=Se&&Zd(Se);Se&&Bt&&ie.push({id:kt,language:Se,title:Ye?fe("subtitles_auto",{language:Bt}):Bt})}return ie}(M=s==null?void 0:s.onAvailableSubtitlesChanged)==null||M.call(s,g())}));let or=de(!0),ss=c=>{or.set(c)},Cr=(c,g,M=!0)=>{var ie;if(ce({message:`seek to time, time: ${c}`}),U.log("seek to time",{time:c,action:g,forcePrecise:M}),bi.next(g),O.info.isLive$.getValue()){let Se=O.info.duration$.getValue(),Ye=Math.min(0,Se+c);O.seekTime(Ye,M)}else{if(T!=null&&T.getValue())return;O.info.isEnded$.getValue()&&(ce({message:"seek after ended, call callbacks.onPlay"}),(ie=s==null?void 0:s.onPlay)==null||ie.call(s)),O.seekTime(on(c),M)}},xs=c=>{ce({message:`seek to episode start time: ${c}`}),U.log("seek to episode start time",{time:c}),Cr(c,Os.EPISODE,!0)},Us=(c,g,M=!1)=>{ce({message:`seek to percent, percent: ${c}`}),U.log("seek to percent",{percent:c,action:g});let ie=$e(jo)*c;Cr(ie,g,M)},ua=c=>{ce({message:`seek external, time: ${c}`}),U.log("seek external",{time:c}),bi.next(Os.UNKNOWN),O.seekTime(O.info.isLive$.getValue()?-c:c)},rt=c=>{var ie,Se;let g=(ie=c.max)!=null?ie:"none",M=(Se=c.min)!=null?Se:"none";ce({message:`set auto quality limitation. Max: ${g}. Min: ${M}`}),U.log("set auto quality limits",{max:g,min:M}),O.setAutoQualityLimits(c)},si=c=>{ce({message:`seek external to episode start time: ${c}`}),U.log("seek external to episode start time",{time:c}),Cr(c,Os.EPISODE,!0)},Co=c=>{ce({message:`set playback rate to: ${c}`}),U.log("set playback rate external",{playbackRate:c}),O.setPlaybackRate(c)},yi=de(!1),yn=de(!1),xn=mi([jo],([c])=>!!p&&c>=pe.suitableDurationForUsingRichSeek&&pe.features.useRichSeek&&!w),ws=((p==null?void 0:p.frameWidth)||0)>=((p==null?void 0:p.frameHeight)||0),Ss=mi([It],([c])=>{let g=Hl(c);return ws?!g:g});Te.add(ze.subscribe(c=>{c!=="video"&&yi.set(!1)})),yi.subscribe(c=>{var g;(g=s==null?void 0:s.onRichSeekActiveChanged)==null||g.call(s,c)});let Ui=de(void 0),Ci=de(!1),he=c=>{ce({message:`start scrubbing, progress: ${c}`}),U.log("start scrubbing",{progress:c}),Ci.set(!0),gt(c)},gt=c=>{Ui.set(c)},Jt,Qt,To=()=>{Ui.set(void 0),Ci.set(!1)},ro=()=>{clearTimeout(Qt),clearTimeout(Jt),Jt=window.setTimeout(()=>{To()},500),Ve==null||Ve.removeEventListener("seeked",ro)},Ho=(c,g=!1)=>{ce({message:`complete scrubbing, progress: ${c}`}),U.log("complete scrubbing",{progress:c}),Us(c,Os.SLIDER,g),$e(Wt.ui.isMobile)&&$e(Wt.state.currentFormat$)===Jd.HLS?(Ve==null||Ve.addEventListener("seeked",ro),Qt=window.setTimeout(()=>{ro()},300)):To()},Cs=mi([ot,jo,Ui],([c,g,M],ie)=>{ie(Hx(M)?M*g:c)}),Kr=de(!1),Tr=()=>{Kr.set(!0)},pa=()=>{Kr.set(!1)},zs=mi([ui],([{width:c}],g)=>{let M=F_(c);g(M)}),fa=Q.filter(c=>Uh(c)),qr=mi([zs,Ct],([c,g])=>g?fa.filter(M=>!M.hideOnMobile):fa.filter(M=>{var ie;return!((ie=M.hideOnDesktopGridTypes)!=null&&ie.includes(c))})),wn=de(Q.filter(c=>zh(c))),tl=mi([wn,zs],([c,g])=>c.filter(M=>{var ie;return!((ie=M.hideOnDesktopGridTypes)!=null&&ie.includes(g))})),ma=mi([tl,qr],([c,g])=>[...pe.features.additionalButtonsDesktopControlPanelRight?c.filter(M=>M.type==="desktop-control-panel-right"):[],...pe.features.additionalButtons?g.map((M,ie)=>{var Se;return{id:ie,weight:ie,type:"desktop-control-panel-right",testId:M.testId,icon:M.iconUrl,onClick:M.onClick,ariaLabel:(Se=M.ariaLabel)!=null?Se:M.tooltip,tooltipText:M.tooltip}}):[]].filter(M=>!v.disabledAdditionalButtonIds.includes(M.id))),Qr=de(F),il=mi([Qr],([c])=>pe.features.additionalSettingsMenuItems?c.map(g=>g.type==="SWITCH"?{...g,onClick:g.onChangeEnabled}:g):[]),jl=(c,g)=>{let M=$e(wn).map(ie=>ie.id!==c?ie:{...ie,...g});wn.set(M)},va=c=>{let g=$e(wn);if(g.some(M=>M.id===c.id)){ce({message:`Additional button with id: "${c.id}" was exist! Can't add more with the same id`});return}g.push(c),wn.set(g)},Xl=c=>{let g=$e(wn);if(!g.some(M=>M.id===c)){ce({message:`Can't find additional button with id: "${c}"! Can't remove item with this id`});return}g=g.filter(M=>M.id!==c),wn.set(g)},ol=c=>{bi.next(Os.LIVE),ce({message:"live switch to low latency "+c}),U.log("live switch to low latency "+c),O.setLiveLowLatency(c)},nl=(c,g)=>{let M=$e(Qr).map(ie=>ie.id!==c?ie:{...ie,...g});Qr.set(M)},ga=c=>{let g=$e(Qr);if(g.some(M=>M.id===c.id)){ce({message:`Settings menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}g.push(c),Qr.set(g)},dt=c=>{let g=$e(Qr);if(!g.some(M=>M.id===c)){ce({message:`Can't find settings menu item with id: "${c}"! Can't remove item with this id`});return}g=g.filter(M=>M.id!==c),Qr.set(g)},it=de(z),ji=mi([it],([c])=>pe.features.additionalContextMenuItems?c:[]),Io=(c,g)=>{let M=$e(it).map(ie=>ie.id!==c?ie:{...ie,...g});it.set(M)},Xi=c=>{let g=$e(it);if(g.some(M=>M.id===c.id)){ce({message:`Context menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}g.push(c),it.set(g)},vi=c=>{let g=$e(it);if(!g.some(M=>M.id===c)){ce({message:`Can't find context menu item with id: "${c}"! Can't remove item with this id`});return}g=g.filter(M=>M.id!==c),it.set(g)},zi=mi([Ct,le],([c,g],M)=>{M(c&&g)}),Ws=()=>{bi.next(Os.LIVE),ce({message:"switch to active live"}),U.log("switch to active live"),O.seekTime(0),O.info.playbackState$.getValue()!==Fl.PLAYING&&Wt.actions.internal.togglePlay()},Zl=()=>{U.log("skip adman"),K.skip()},Pc=(c=!0)=>{var ie;pr(Wt),ce({message:`switch from ads to video, callPlay: ${c}`}),U.log("switch from ads to video",{callPlay:c}),Oe.set("video"),c&&O.play(),l&&en(!0,!0);let g=(ie=$e(bt))==null?void 0:ie.muted,M=!O.info.muted$.getValue();g!==void 0&&!M&&en(g,!0),bt.set(void 0)},gp=()=>{pr(Wt),ce({message:"switch from video to ads"}),U.log("switch from video to ads"),Wt.actions.internal.pause(),Yo(),Oe.set("ads")},kc=c=>{pr(Wt);let g=c?"LiveWaitingStart":"thumb";U.log("set live waiting start",{state:c,playerPhase:g}),Oe.set(g)},hp=c=>{pr(Wt);let g=c?"LiveWaitingRecover":"thumb";U.log("set live waiting recover",{state:c,playerPhase:g}),Oe.set(g)},Ac=c=>{pr(Wt);let g=c?"LiveWaitingRecord":"thumb";U.log("set live waiting record",{state:c,playerPhase:g}),Oe.set(g)},_p=()=>(pr(Wt),U.log("get debug text data"),Bh(O,Re,Wt,Ke.getTraceId(),we)),Lc=()=>(pr(Wt),JSON.stringify(Ke.getFinishedSpans())),bp=()=>(pr(Wt),Hh(O,Re,Wt)),ha=()=>Ve,Mc=()=>{ce({message:"toggle chromecast"}),U.log("toggle chromecast"),O.toggleChromecast()},Ks=c=>{var M;if(pr(Wt),O.info.isEnded$.getValue())return;let g=!c;if($e(Wt.playerPhase)==="ads"){ce({message:`pause ads, internalCall: ${g}`}),U.log("pause ads",{internalCall:g}),K.pause();return}ce({message:`pause video, internalCall: ${g}`}),U.log("pause video",{internalCall:g}),g&&((M=s==null?void 0:s.onPause)==null||M.call(s)),O.pause()},rl=c=>{var M;pr(Wt);let g=!c;if($e(Wt.playerPhase)==="ads"){ce({message:`play ads, internalCall: ${g}`}),U.log("play ads",{internalCall:g}),K.play();return}ce({message:`play video, internalCall: ${g}`}),U.log("play video",{internalCall:g}),g&&((M=s==null?void 0:s.onPlay)==null||M.call(s)),O.play()},Vc=c=>{pr(Wt);let g=!c;if($e(Wt.playerPhase)==="ads"){ce({message:"player cannot be stopped during ads via external method"});return}ce({message:`player will be stopped, internalCall: ${g}`}),A==null||A()},Rc=(c,g)=>{pr(Wt),ce({message:`first start, show ads: ${c}, internalCall: ${!g}`}),U.log("first start",{showAds:c,external:g}),c?Oe.set("ads"):(Oe.set("video"),g?O.play():Wt.actions.internal.togglePlay())},sl=()=>(ce({message:"getting time codes"}),m),Nc=()=>{let c=sl();if(!c||[0,1].includes(c.length))return;let g=O.info.position$.getValue();return c.find(M=>M.time>g)},Dc=c=>{let g=c;g||(g=Nc());let M=O.info.position$.getValue();U.log("seek to next episode",{currentTime:M,...g}),g&&(ce({message:"seek to next episode"}),Cr(g.time,Os.EPISODE,!0))},Oc=()=>{let c=sl();if(!c||[0,1].includes(c.length))return;let g=O.info.position$.getValue(),M=c.findIndex(Se=>Se.time>g),ie=M===-1?c.length-2:M-2;if(!(ie<0))return c[ie]},$p=c=>{let g=c;g||(g=Oc());let M=O.info.position$.getValue();U.log("seek to prev episode",{currentTime:M,...g}),g&&(ce({message:"seek to prev episode"}),Cr(g.time,Os.EPISODE,!0))},yp=()=>(ce({message:"getting preview thumbs data"}),U.log("get preview thumbs data",{...p}),p),Ue=async()=>{let c=xe==null?void 0:xe.isActive(),g="none";xe!=null&&xe.isActive()?(g="exit",await(xe==null?void 0:xe.exit())):(g="request",await(xe==null?void 0:xe.request())),U.log("toggle picture in picture",{isActive:c,action:g})},gi=(c=-90)=>{U.log("rotate video",{alphaDiff:c}),It.update(g=>g+c)},so=de([]);I==null||I.subscribe(c=>{let g=[];for(let M=0;M<c.length;M++){let{range:[ie,Se],subjects:Ye}=c[M];M===0&&ie!==0&&g.push({time:0,text:"",interactive:!1,completed:!0}),g.push({time:ie/1e3,text:"",interactive:!0,completed:pe.features.interactiveTimeOpenUri?!Ye.length||Ye.every(kt=>kt.isRemoved):!Ye.length}),Se!==1/0&&g.push({time:Se/1e3,text:"",interactive:!1,completed:!0})}so.set(g)});let Ir=de(!1);T==null||T.subscribe(c=>{c&&$e(Ci)&&To()});let on=c=>{if(!w)return c;let g=$e(so),M=$e(jo),Se=$e(Vn)/M,Ye=g.find(kt=>kt.interactive&&!kt.completed&&kt.time>Se);return typeof(Ye==null?void 0:Ye.time)=="number"?Math.min(c,Ye.time-.05):c},zb=()=>{Wt.ui.episodes.panelOpened$.set(!1)},Wb=()=>{U.log("destroy store"),clearTimeout(Qt),clearTimeout(Jt),Te.unsubscribe(),yt.unsubscribe(),O.destroy(),K.destroy(),J==null||J.destroy(),ae==null||ae.destroy(),Pe.unsubscribe(),mt==null||mt.disconnect(),mt=null,Ee.destroy()},Kb=mi([gr,ze,Mn],([c,g,M])=>v.features.doubleForwardAvailable&&!c&&g==="video"&&M),xp=de(!1),Hv=2,Bc=null,Fv=c=>{if(!$e(vr)&&c)return;let g=O.info.currentPlaybackRate$.getValue();c?g!==Hv&&(Bc=g,Fn(Hv,!1),xp.set(!0)):(Bc&&Fn(Bc,!1),xp.set(!1),Bc=null)};ze.subscribe(c=>{c!=="video"&&Fv(!1)});let qb=()=>{Ks(!1),yi.set(!0)},Qb=()=>{rl(!1),yi.set(!1)},wp=!1,Gb=()=>{yn.set(!0),wp=O.info.playbackState$.getValue()===Fl.PLAYING,Ks(!1)},Yb=()=>{yn.set(!1),!$e(yi)&&wp&&rl(!1),wp=!1};O.events.playing$.subscribe(()=>{$e(yi)&&Ks(!1)});let Wt={interfaceLanguage$:Le,isCyrillicRelatedInterface$:Et,initVideo:hi,videoId:i,isClip:o,playerPhase:ze,vsid:xt,state:{positionExact$:ot,positionWithScrubbing$:Cs,duration$:jo,playbackState$:Ni,playbackStateRealistic$:cn,isPlaying$:vr,isLoaderVisible:Lt,bufferedProgress$:_o,isLive$:Di,canChangePlaybackSpeed$:Mn,isActiveLive$:gr,isOldestAvailableLive$:Jn,isRewindableLive$:ns,isEnded$:ki,muted$:Ti,volume$:io,trafficSavingEnabled$:Lo,highQualityEnabled$:Mo,autoQualityLimitingAvailable$:pn,availableVideoStreams$:hr,availableAudioStreams$:Oi,videoStream$:_r,audioStream$:Rn,currentQuality$:tr,isAutoQualityEnabled$:ho,availableQualities$:vn,currentPlaybackRate$:gn,availablePlaybackRates$:hn,currentSubtitle$:Yi,availableTextTracks$:Zo,availableSubtitlesList$:yr,currentSubtitleCaptions$:fo,isAutoSubtitleCaptionVisible$:Jo,chromecastState$:Nr,chromecastDeviceName$:bs,chromecastConnected$:Vo,currentFormat$:Dr,throughputEstimation$:Zn,videoBitrate$:Or,videoSize$:fn,errorLog$:Y,crashed$:le,isAudioAvailable$:fr,isAudioDisabled:!!l,canDownload:pe.features.download&&!!d,availableSources$:bo,hasMpegSources$:Ii,isInteractive:w,showInteractiveGraph:pe.features.interactiveGraph,showSeekToInteractive:pe.features.seekToInteractive,showPlayPrevChapter:pe.features.interactivePlayPrevChapter,showInteractiveTimeIndicator:pe.features.interactiveTimeIndicator&&!!$e(so).length,interactiveEpisodes$:so,isInteractiveTime$:T?ii(T):de(!1),isInteractiveExpectation$:Ir,hasInteractiveBranches:E,playPrevChapterDisabledTooltip:P,looped$:tn,loadedMetadata$:Dt,isAutoQualityAvailable$:On,previewTrackActive:yi,previewTrackDragInProgress:yn},ui:{t:fe,controlsVisible:de(!1),touched:de(!1),controls:{prevButton:de(void 0),playButton:de(void 0),replayButton:de(void 0),nextButton:de(void 0),playPrevChapterButton:de(void 0),seekToInteractiveButton:de(void 0),interactiveGraphButton:de(void 0),liveButton:de(void 0),time:de(void 0),episodes:de(void 0),volume:de(void 0),subtitles:de(void 0),settings:de(void 0),context:de(void 0),chromecast:de(void 0),pip:de(void 0),fullscreen:de(void 0),vkLogo:de(void 0),interactiveTimeIndicator:de(void 0),timeline:de(void 0),autoplayNextToggle:de(void 0),additionalButtons:Q.length?Q.reduce(c=>[...c,de(void 0)],[]):[],disabledControls$:Pt},modals:{hotKeyMap:{show:de(!1),data:de({title:"",closeBtnText:"",groups:[]})}},isFullscreen:At,isFullscreenOpenedByKeyboard:at,rotateAlpha:It,isAutoplay:de(!1),debugPanelVisible:de(!1),episodes:{panelOpened$:de(!1),openedByKeyboard$:de(!1)},contextMenu:{visible$:de(!1),btnRef$:de(void 0),openedByBtnKeyboard$:de(!1),openedByHotKey$:de(!1),lastActiveElem$:de(void 0),showContextMenuBtn$:de(!1),position$:de({top:0,left:0})},playerSize:ui,isMobile:Ct,mobileNotReportControlHidden$:zi,icon3DVideoVisible:de(!1),scrubbingInProgress:Ci,volumeChangingInProgress:Kr,is3DVideo:Ut,currentGridType$:zs,additionalButtonsDeprecated$:qr,additionalDesktopControlPanelRightButtons$:ma,additionalSettingsMenuItems$:il,additionalContextMenuItems$:ji,interactiveHideMobileControls:de(!1),overlayContainer$:de(void 0),startedByKeyboard$:de(!1),autoplayNextEnabled$:de(!1),timerNextVideoRunning$:de(!0),settingsMenu:{visible$:de(!1),ref$:de(void 0),openedByBtnKeyboard$:de(!1)},settingsSubMenu:{visible$:de(!1),ref$:de(void 0),name$:de(void 0)},userActionsDisabled:de(!1),hiddenControls:{volume:de(!1),vkLogo:de(!1),pip:de(!1),chromecast:de(!1),settings:de(!1)},isControlsAvailable:or,controlBlocks:{topLeft:de(void 0),topRight:de(void 0),middle:de(void 0),bottom:de(void 0),bottomLeft:de(void 0),bottomRight:de(void 0)},videoTitleInfo:de(void 0),doubleForwardOn$:xp,doubleForwardAvailable$:Kb,previewTrackNotificationVisible:de(!1),previewTrackActive:yi,previewTrackDragInProgress:yn,previewTrackAvailable:xn,isPreviewTrackHorizontallyAligned:Ss},ads:{position:de(0),duration:de(0),playbackState:de("inactive"),canSkip:de(!1),secondsToWatchBeforeSkip:de(0),postrollPassed:de(!1)},webApi:{pictureInPictureApi:xe,annotationsApi:Be,slotsApi:tt,focusManager:re},actions:{internal:{preload:wo,firstStart:c=>Rc(c,!1),play:()=>rl(!1),pause:()=>Ks(!1),togglePlay:no,toggleMuted:xr,openSettingsMenu:Hi,closeSettingsMenu:$s,openSettingsSubMenu:rs,closeSettingsSubMenu:ys,setVolume:c=>Ur(c,!1),setMuted:c=>en(c,!1),startVolumeChanging:Tr,stopVolumeChanging:pa,setVideoStream:ct,setAudioStream:c=>Zt(c,!1),setQuality:(c,g)=>bn(c,g,!1),setTrafficSavingEnabled:(c,g)=>Oo(c,g,!1),setHighQualityEnabled:(c,g)=>Hn(c,g,!1),setPlaybackRate:Fn,incrementPlaybackRate:Ze,decrementPlaybackRate:Yt,setSubtitle:c=>$i(c,!1),toggleSubtitle:()=>So(!1),togglePictureInPicture:Ue,startScrubbing:he,progressScrubbing:gt,completeScrubbing:Ho,toggleChromecast:Mc,switchToActiveLive:Ws,switchFromAdsToVideo:Pc,switchFromVideoToAds:gp,skipAd:Zl,setLiveWaitingStart:kc,setLiveWaitingRecover:hp,setLiveWaitingRecord:Ac,getDebugTextData:_p,getTraceTextData:Lc,getDebugPanelData:bp,getVideoElement:ha,seekTime:(c,g,M)=>Cr(c,g,M),clearDelayedBufferingCheckTimeout:mr,seekEpisodeStartTime:xs,seekToPercent:Us,getNextEpisode:Nc,seekToNextEpisode:Dc,getPrevEpisode:Oc,seekToPrevEpisode:$p,startLogging:Ot,stopLogging:W,startCameraManualRotation:Mt,stopCameraManualRotation:ri,moveCameraFocusPX:pt,holdCamera:Xt,releaseCamera:vt,getVideoEpisodes:sl,getPreviewThumbsData:yp,downloadVideo:Fr,addLanguage:Mf,setLanguage:ye,nextMovie:Gt,videoRotate:gi,correctSeekTimeToInteractive:on,replayInteractive:N,setLooped:Fe,reportProblem:wt,setAutoplayNextEnabled:ci,setTimerNextVideoRunning:No,prevVideoClick:yo,nextVideoClick:Do,nextVideoAnnouncementShow:Fi,nextVideoAnnouncementClick:xo,nextVideoAnnouncementAuto:Bn,nextVideoAnnouncementCancel:Sr,checkFullscreenSupport:Tt,changeDoubleForwardOn:Fv,closePreviewTrack:Qb,previewTrackOpened:qb,previewTrackDragStarted:Gb,previewTrackDragFinished:Yb},external:{firstStart:c=>Rc(c,!0),play:()=>rl(!0),pause:()=>Ks(!0),stop:()=>Vc(!0),seekTime:c=>ua(c),seekEpisodeStartTime:c=>si(c),setPlaybackRate:c=>Co(c),setAutoQualityLimits:c=>rt(c),setMuted:c=>en(c,!0),toggleSubtitle:()=>So(!0),changeSubtitle:$n,setVolume:c=>Ur(c,!0),returnFocusToEpisodes:zb,updateAdditionalSettingsItem:nl,addAdditionalSettingsItem:ga,removeAdditionalSettingsItem:dt,updateAdditionalContextItem:Io,addAdditionalContextItem:Xi,removeAdditionalContextItem:vi,updateAdditionalButton:jl,addAdditionalButton:va,removeAdditionalButton:Xl,setLiveLowLatency:ol,hideControls:()=>ss(!1),showControls:()=>ss(!0),setQuality:c=>bn(c,{appliesTo:"to-video"},!0),setTrafficSavingEnabled:c=>Oo(c,"to-video",!0),setHighQualityEnabled:c=>Hn(c,"to-video",!0),changeAudioStream:Br}},callbacks:s,setUiCallbacks:c=>{Je={...c}},getAdmanWrapper:()=>K,getLogger:()=>qe,getPlayer:()=>O,destroy:Wb};return Wt};function jn(t,e,i,o){var m;let r=(m=e[i])==null?void 0:m.getBoundingClientRect(),a=o&&!!r&&!!(r.right-r.left),{top:l,left:d,bottom:s,right:u}=Ds(e[i],t||void 0);return{left:a?d:0,right:a?u:0,top:a?l:0,bottom:a?s:0,isDisplayed:a}}var Xx=["disabledControls$","additionalButtons"],Zx=["interactiveTimeIndicator"],Wl=(t,e,i,o)=>{if(t){for(let[r,a]of Object.entries(e))if(!Xx.includes(r)){let l=o||Zx.includes(r);a.set(jn(t,i,r,l))}}};var ju=async(t,e,i)=>{await uo(),e&&i&&(i.focus(),t.set(!1))};var Jx=Ie('<path d="M18 10c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2Zm-6 4c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2Zm-6 0c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2Z"></path>');function wm(t){Xe(t,{children:(e,i)=>{var o=Jx();$(e,o)},$$slots:{default:!0}})}function Sm(t,e){B(e,!0);let[i,o]=Ne(),r=()=>x(s,"$contextMenuVisible$",i),a=h(e,"disabled",3,!1),l=h(e,"ariaLabel",3,""),d=_e(),s=d.ui.contextMenu.visible$,u=d.ui.contextMenu.openedByBtnKeyboard$,m=d.ui.contextMenu.showContextMenuBtn$,p=d.ui.contextMenu.position$,v=d.ui.contextMenu.btnRef$,_=q(void 0);De(()=>{n(_)&&St(()=>{v.set(n(_))})});let y=T=>{let N=sa(T),A=V_(n(_));p.set(A),u.set(N),s.set(!r())},b=()=>{m.set(!0)},w=()=>{m.set(!1)},I=f(()=>r()?"opened":"");Ft(t,{get className(){return n(I)},testId:"btn-context-menu",get disabled(){return a()},get ariaLabel(){return l()},click:y,focus:b,blur:w,get ariaExpanded(){return r()},get ref(){return n(_)},set ref(T){R(_,T,!0)},children:(T,N)=>{wm(T,{})},$$slots:{default:!0}}),H(),o()}var e2=t=>{t.stopPropagation()},t2=L("<div><!> <div></div> <div></div></div>"),i2={hash:"s-27",code:'.interactive-episode-icon-animated.s-27{height:32px;opacity:1;position:absolute;right:16px;top:16px;transition:.3s;width:32px}.interactive-episode-icon-animated.icon-small.s-27{height:28px;width:28px}.invisible.s-27{opacity:0;visibility:hidden}.fullscreen.s-27:not(.mobile){height:40px;right:23px;top:19px;width:40px}.mobile.s-27{height:28px;right:14px;top:12px;width:28px}.fullscreen.mobile.s-27{height:32px;width:32px}@media screen and (orientation:portrait){.interactive-episode-icon-animated.mobile.fullscreen.s-27{right:16px;top:40px}}@keyframes s-27-pulse{0%{border-width:1px;opacity:0;transform:scale(1)}10%{opacity:1}50%{border-width:1px;opacity:.5;transform:scale(1.5)}to{border-width:.5px;opacity:0;transform:scale(1.5)}}.pulse.s-27{animation:s-27-pulse 1s infinite;border:1px solid #fff;border-radius:100%;bottom:0;content:"";display:block;left:0;pointer-events:none;position:absolute;right:0;top:0;transform:scale(1.8);transition:.3s}.pulse.paused.s-27{animation-play-state:paused}.interactive-episode-icon-animated svg{height:100%;width:100%}.ref-block.s-27{height:100%;position:absolute;top:0;visibility:hidden;width:100%}.hidden.s-27{display:none}'};function ec(t,e){var K;B(e,!0),G(t,i2);let[i,o]=Ne(),r=()=>x(w,"$isMobile",i),a=()=>x(A,"$areControlsVisible",i),l=()=>x(P,"$currentGridType$",i),d=()=>x(T,"$isInteractiveTime$",i),s=()=>x(b,"$interactiveControlsOpacity$",i),u=()=>x(N,"$showInteractiveTimeIndicatorTooltip$",i),m=()=>x(I,"$isFullscreen",i),p=h(e,"ref",15,void 0),v=q(void 0),_=_e(),y=vo(),{interactiveControlsOpacity$:b}=y,w=_.ui.isMobile,I=_.ui.isFullscreen,T=_.state.isInteractiveTime$,N=y.showInteractiveTimeIndicatorTooltip$,A=_.ui.controlsVisible,E=(K=_.callbacks)==null?void 0:K.onInteractiveTimeIndicatorClick,P=_.ui.currentGridType$,Q=f(()=>!r()&&a()),F=f(()=>Ns(l(),"s")),z=f(()=>!d()||!!s()||n(Q)),X=q(!1);De(()=>{R(X,n(z),!0)});let se=()=>{R(X,!0)},Z=()=>{var ae;oe(),(ae=n(v))==null||ae.addEventListener("animationiteration",se,{once:!0})},oe=()=>{var ae;R(X,!1),(ae=n(v))==null||ae.removeEventListener("animationiteration",se)},J=ae=>{N.set(ae)},Ce=f(()=>u()&&!n(z));De(()=>{u()?Z():oe()});let me=()=>{n(z)||(N.set(!0),E==null||E())};sn(()=>{N.clearTimeout(),oe()});let ee=()=>{N.set(!1)},be=j("tooltip_interactive_interaction_time_indicator");var we=t2();let ge;we.__mousemove=[e2],we.__click=me;var pe=C(we);Ao(pe,{get tooltipContent(){return be},get tooltipVisible(){return n(Ce)},initialTranslateYPx:72,tooltipPlacement:"bottom",onTooltipVisibilityChange:J,get ref(){return p()},set ref(ae){p(ae)},children:(ae,xe)=>{qd(ae,{completed:!0})},$$slots:{default:!0}});var Ke=k(pe,2);let U;je(Ke,ae=>p(ae),()=>p());var O=k(Ke,2);let qe;je(O,ae=>R(v,ae),()=>n(v)),S(we),D((ae,xe,Be)=>{ge=ne(we,1,"interactive-episode-icon-animated s-27",null,ge,ae),U=ne(Ke,1,"ref-block s-27",null,U,xe),qe=ne(O,1,"pulse s-27",null,qe,Be)},[()=>({mobile:r(),fullscreen:m(),invisible:n(z),"icon-small":n(F)}),()=>({hidden:n(z)}),()=>({paused:n(X)})]),st("mouseleave",we,ee),$(t,we),H(),o()}Qe(["mousemove","click"]);function Xu(t,e){B(e,!0);let i=h(e,"tooltipEnabled",3,!0),o=h(e,"disabled",3,!1),r=h(e,"className",3,void 0),a=h(e,"ref",15),l=h(e,"tooltipVisible",3,!1);Ao(t,{get disabled(){return o()},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},get hasTooltip(){return i()},get mouseEnter(){return e.mouseEnter},get mouseLeave(){return e.mouseLeave},get tooltipVisible(){return l()},get className(){return r()},get ref(){return a()},set ref(d){a(d)},children:(d,s)=>{var u=Ae();let m=f(()=>e.buttonComponent);var p=ue(u);Mi(p,()=>n(m),(v,_)=>{_(v,ts(()=>{var y;return(y=e.buttonComponentProps)!=null?y:{}}))}),$(d,u)},$$slots:{default:!0}}),H()}var Bs={prevButton:100,replayButton:200,playButton:300,nextButton:400,playPrevChapterButton:500,seekToInteractiveButton:600,interactiveGraphButton:700,liveButton:800};var n2=Ie('<path d="M32 21.68V15a2 2 90 114 0v18a2 2 90 01-4 0v-6.66l-16.3 9.32A2.48 2.48 90 0112 33.56V14.46c0-1.9 2.06-3.08 3.7-2.12z"></path>');function ca(t,e){B(e,!0);let i=h(e,"reversed",3,!1),o=f(()=>i()?"transform: scaleX(-1);transform-origin: 50%;":void 0),r=f(()=>`${an(e.size)}${n(o)}`),a=f(()=>i()?"prev-icon":"next-icon");Xe(t,{get width(){return"48"},get height(){return"48"},get style(){return n(r)},get testId(){return n(a)},get shadow(){return e.shadow},children:(l,d)=>{var s=n2();$(l,s)},$$slots:{default:!0}}),H()}var r2=L('<div class="icon-background-mobile s-23"><!></div>'),s2={hash:"s-23",code:".icon-background-mobile.s-23{align-items:center;background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);display:flex;height:100%;justify-content:space-around;left:0;position:absolute;top:0;width:100%}"};function Wa(t,e){B(e,!0),G(t,s2);let i=h(e,"ref",15,void 0),o=h(e,"isMobile",3,!1),r=h(e,"disabled",3,!1),l=_e().ui.t,d=f(()=>e.type==="prev"?l("tooltip_previous"):l("tooltip_next")),s=f(()=>e.type==="prev"?l("hotkey_map_item_prev_video_value"):l("hotkey_map_item_next_video_value")),u=f(()=>`btn-${o()?"m":"d"}--${e.type}`);Ft(t,{get className(){return n(u)},get testId(){var m;return`btn-${(m=e.type)!=null?m:""}`},get disabled(){return r()},get ariaLabel(){return n(d)},get click(){return e.click},get ariaKeyShortCut(){return n(s)},get ref(){return i()},set ref(m){i(m)},children:(m,p)=>{var v=Ae(),_=ue(v);{var y=w=>{var I=r2(),T=C(I);let N=f(()=>e.type==="prev");ca(T,{get size(){return"32"},get reversed(){return n(N)}}),S(I),$(w,I)},b=w=>{let I=f(()=>e.type==="prev");ca(w,{get size(){return"24"},get reversed(){return n(I)}})};V(_,w=>{o()?w(y):w(b,!1)})}$(m,v)},$$slots:{default:!0}}),H()}var a2=Ie('<path d="M24 21.2a.8.8 90 01-1.34.6L14.08 14a1.34 1.34 90 010-2l8.6-7.8a.8.8 90 011.32.6V11a16 16 90 11-16 16 2 2 90 114 0 12 12 90 1012-12z"></path>');function tc(t,e){B(e,!0);let i=f(()=>an(e.size));Xe(t,{get width(){return"48"},get height(){return"48"},get style(){return n(i)},testId:"replay-icon",get shadow(){return e.shadow},children:(o,r)=>{var a=a2();$(o,a)},$$slots:{default:!0}}),H()}import{noop as l2}from"@vkontakte/videoplayer-shared/es2018";var d2=L('<div class="icon-background-mobile s-25"></div>'),c2=L("<!> <div><!></div>",1),u2={hash:"s-25",code:".mobile.s-25{align-items:center;display:flex;justify-content:center;position:relative}.icon-background-mobile.s-25{background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);height:calc(100% - 32px);left:16px;position:absolute;top:16px;width:calc(100% - 32px)}"};function Kl(t,e){B(e,!0),G(t,u2);let i=h(e,"ref",15,void 0),o=h(e,"isMobile",3,!1),r=h(e,"disabled",3,!1),a=h(e,"className",3,""),l=h(e,"click",3,l2),d=j("tooltip_restart"),s=f(()=>`${o()?"btn-m--play":""} ${a()}`);Ft(t,{get className(){return n(s)},testId:"replay-btn",get ariaLabel(){return d},get disabled(){return r()},get click(){return l()},get ariaKeyShortCut(){return fs.KeyK},get ref(){return i()},set ref(u){i(u)},children:(u,m)=>{var p=c2(),v=ue(p);{var _=T=>{var N=d2();$(T,N)};V(v,T=>{o()&&T(_)})}var y=k(v,2);let b;var w=C(y);let I=f(()=>o()?"48":"24");tc(w,{get size(){return n(I)}}),S(y),D(T=>b=ne(y,1,"s-25",null,b,T),[()=>({mobile:o()})]),$(u,p)},$$slots:{default:!0}}),H()}var p2=Ie('<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 Hs(t,e){B(e,!0);let i=f(()=>an(e.size));Xe(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(i)},testId:"pause-icon",get shadow(){return e.shadow},children:(o,r)=>{var a=p2();$(o,a)},$$slots:{default:!0}}),H()}import{noop as f2}from"@vkontakte/videoplayer-shared/es2018";var m2=L('<div class="icon-background-mobile s-22"><!></div>'),v2={hash:"s-22",code:".icon-background-mobile.s-22{align-items:center;background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);display:flex;height:calc(100% - 32px);justify-content:space-around;left:16px;position:absolute;top:16px;width:calc(100% - 32px)}"};function ql(t,e){B(e,!0),G(t,v2);let[i,o]=Ne(),r=()=>x(a,"$fakeIsPlaying$",i),{fakeIsPlaying$:a}=vo(),l=h(e,"ref",15,void 0),d=h(e,"isMobile",3,!1),s=h(e,"isPlaying",3,!1),u=h(e,"disabled",3,!1),m=h(e,"className",3,""),p=h(e,"click",3,f2),_=_e().ui.t,{toggle:y}=a,b=f(()=>y),w=f(()=>r()!==null),I=f(()=>n(w)?r():s()),T=f(()=>n(I)?_("tooltip_pause"):_("tooltip_play")),N=f(()=>n(I)?Hs:An),A=f(()=>`${d()?"btn-m--play":""} ${m()}`),E=f(()=>n(w)?n(b):p());Ft(t,{get className(){return n(A)},testId:"play-btn",get click(){return n(E)},get disabled(){return u()},get ariaLabel(){return n(T)},get ariaKeyShortCut(){return fs.KeyK},get ref(){return l()},set ref(P){l(P)},children:(P,Q)=>{var F=Ae();let z=f(()=>n(N));var X=ue(F);{var se=oe=>{var J=m2(),Ce=C(J);Mi(Ce,()=>n(z),(me,ee)=>{ee(me,{get size(){return"48"}})}),S(J),$(oe,J)},Z=oe=>{var J=Ae(),Ce=ue(J);Mi(Ce,()=>n(z),(me,ee)=>{ee(me,{get size(){return"24"}})}),$(oe,J)};V(X,oe=>{d()?oe(se):oe(Z,!1)})}$(P,F)},$$slots:{default:!0}}),H(),o()}var g2=Ie('<path d="M12.58 12.92v2.5a1 1 0 0 1-1.52.85l-5.58-3.42a1 1 0 0 1 0-1.7l5.58-3.42a1 1 0 0 1 1.52.86v2.5l5.48-3.36a1 1 0 0 1 1.52.86v6.82a1 1 0 0 1-1.52.86z"></path>');function Cm(t){Xe(t,{testId:"play-prev-chapter-icon",children:(e,i)=>{var o=g2();$(e,o)},$$slots:{default:!0}})}function ic(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"hidden",3,!1),r=h(e,"disabled",3,!1),a=j("tooltip_interactive_go_back"),l=f(()=>o()?"hidden":"");Ft(t,{get className(){return n(l)},testId:"play-prev-chapter-btn",get ariaLabel(){return a},get disabled(){return r()},get click(){return e.click},get ref(){return i()},set ref(d){i(d)},children:(d,s)=>{Cm(d,{})},$$slots:{default:!0}}),H()}var h2=L('<span class="gutter s-24"><span><!></span></span>'),_2={hash:"s-24",code:".gutter.s-24{--gutterWidth:32px;--gutterHeight:12px;--togglerWidth:18px;--togglerHeight:18px;--togglerGap:calc(var(--togglerWidth)/6);background-color:hsla(0,0%,100%,.3);border-radius:50px;height:var(--gutterHeight);position:relative;width:var(--gutterWidth)}.toggler.s-24{align-items:center;background-color:#626364;border-radius:50%;display:flex;height:var(--togglerHeight);justify-content:center;left:0;position:absolute;top:calc((var(--togglerHeight) - var(--gutterHeight))/2*-1);transform:translateX(calc(var(--togglerGap)*-1));transition-duration:.2s;transition-property:background-color,transform;transition-timing-function:ease;width:var(--togglerWidth)}.toggler.enabled.s-24{background-color:var(--toggle-color-autoplay-on);transform:translateX(calc(var(--gutterWidth) - var(--togglerWidth) + var(--togglerGap)))}"};function oc(t,e){B(e,!0),G(t,_2);let[i,o]=Ne(),r=()=>x(s,"$autoplayNextEnabled$",i),a=h(e,"ref",15,void 0),l=_e(),d=l.ui.t,s=l.ui.autoplayNextEnabled$,u=l.actions.internal.setAutoplayNextEnabled,m=()=>{u(!r(),!0)},p=d("aria_label_autoplay"),v="12",_="#000",y=f(()=>r()?"true":"false");Ft(t,{click:m,get ariaLabel(){return p},role:"switch",get areaChecked(){return n(y)},get ref(){return a()},set ref(b){a(b)},children:(b,w)=>{var I=h2(),T=C(I);let N;var A=C(T);{var E=Q=>{An(Q,{get size(){return v},fill:_})},P=Q=>{Hs(Q,{get size(){return v},fill:_})};V(A,Q=>{r()?Q(E):Q(P,!1)})}S(T),S(I),D(Q=>N=ne(T,1,"toggler s-24",null,N,Q),[()=>({enabled:r()})]),$(b,I)},$$slots:{default:!0}}),H(),o()}var b2=Ie('<path d="M16.73 4.85c-.54-.05-1.23-.05-2.23-.05H7.9a.9.9 0 1 1 0-1.8h6.64q1.41-.01 2.33.05c.64.05 1.2.16 1.73.43a4.4 4.4 0 0 1 1.92 1.92c.27.52.38 1.09.43 1.73q.06.92.05 2.33v5.08q.01 1.41-.05 2.33a5 5 0 0 1-.43 1.73 4.4 4.4 0 0 1-1.92 1.92 5 5 0 0 1-1.73.43q-.92.06-2.33.05H7.9a.9.9 0 1 1 0-1.8h6.6c1 0 1.69 0 2.23-.04.52-.05.82-.13 1.05-.24a2.6 2.6 0 0 0 1.14-1.14c.11-.23.2-.53.24-1.06s.04-1.23.04-2.22v-5c0-1 0-1.69-.04-2.23a3 3 0 0 0-.24-1.05 2.6 2.6 0 0 0-1.14-1.14c-.23-.11-.53-.2-1.05-.24"></path><path d="M7.76 11.17V8.9c0-.71.7-1.15 1.25-.78l4.6 3.1a.96.96 0 0 1 0 1.54L9 15.87c-.55.37-1.25-.07-1.25-.78v-2.26l-4.5 3.04C2.7 16.24 2 15.8 2 15.09V8.91c0-.71.7-1.15 1.25-.78z "></path>',1);function Tm(t){Xe(t,{testId:"seek-to-interactive-icon",children:(e,i)=>{var o=b2();li(),$(e,o)},$$slots:{default:!0}})}function nc(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"hidden",3,!1),r=h(e,"disabled",3,!1),a=j("tooltip_interactive_seek"),l=f(()=>o()?"hidden":"");Ft(t,{get className(){return n(l)},testId:"btn-seek-to-interactive",get ariaLabel(){return a},get disabled(){return r()},get click(){return e.click},get ref(){return i()},set ref(d){i(d)},children:(d,s)=>{Tm(d,{})},$$slots:{default:!0}}),H()}var $2=Ie('<path d="M15.2 5.9v1.2c0 .6 0 .9.12 1.12q.15.3.46.46c.23.12.52.12 1.12.12h1.2c.6 0 .9 0 1.12-.12q.3-.15.46-.46c.12-.23.12-.52.12-1.12V5.9c0-.6 0-.9-.12-1.12a1 1 0 0 0-.46-.46c-.23-.12-.52-.12-1.12-.12h-1.2c-.6 0-.9 0-1.12.12q-.3.15-.47.46c-.11.23-.11.53-.11 1.12m-.05 11.03v1.14c0 .6 0 .91.12 1.14q.15.31.47.47c.23.12.53.12 1.14.12h1.22c.6 0 .9 0 1.14-.12a1 1 0 0 0 .47-.47c.12-.23.12-.53.12-1.14v-1.14c0-.6 0-.9-.12-1.14a1 1 0 0 0-.47-.47c-.23-.12-.54-.12-1.14-.12h-1.22c-.6 0-.91 0-1.14.12a1 1 0 0 0-.47.47c-.12.23-.12.53-.12 1.14"></path>'),y2=Ie('<path d="M16.78 3h1.42q.47 0 .83.02.4.02.82.21.61.31.92.92.2.41.21.81.03.36.02.83v1.4q0 .47-.02.83-.02.4-.21.81a2 2 0 0 1-.92.92 2 2 0 0 1-.82.21q-.36.02-.83.02h-1.42q-.47 0-.84-.02a2 2 0 0 1-.81-.2 2 2 0 0 1-.93-.93 2 2 0 0 1-.2-.8l-.03-.64h-2.2c-.49 0-.8 0-1.04.02a1 1 0 0 0-.35.06 1 1 0 0 0-.35.35 1 1 0 0 0-.07.35c-.02.24-.02.55-.02 1.04v5.57c0 .5 0 .8.02 1.04s.05.31.07.34q.12.23.35.35c.03.02.11.05.34.07s.56.02 1.05.02h2.2q0-.34.02-.62.01-.4.21-.81.31-.61.93-.92.42-.2.81-.21.37-.02.84-.02h1.42q.47 0 .83.02.4.01.82.2.61.31.92.93.2.41.21.8.03.37.02.84v1.4q0 .47-.02.83-.02.39-.21.81a2 2 0 0 1-.92.92q-.43.2-.82.21-.36.02-.83.02h-1.42q-.47 0-.84-.02a2 2 0 0 1-.81-.21 2 2 0 0 1-.93-.92 2 2 0 0 1-.2-.81l-.03-.63h-2.24q-.68 0-1.16-.03a3 3 0 0 1-1.01-.26 2.6 2.6 0 0 1-1.14-1.14 3 3 0 0 1-.26-1q-.04-.5-.03-1.16v-1.93H2.9A.9.9 0 0 1 2 12c0-.5.4-.9.9-.9h5.23V9.18q0-.68.03-1.16.02-.51.26-1.02a2.6 2.6 0 0 1 1.14-1.13q.5-.24 1.02-.26.48-.04 1.16-.02h2.23q0-.34.02-.63.01-.4.21-.81.31-.61.93-.92.42-.2.81-.21.37-.02.84-.02m-.84 1.84.15-.02c.16-.02.37-.02.72-.02h1.35c.36 0 .57 0 .72.02l.15.02a.3.3 0 0 1 .12.12l.03.15.01.71v1.34l-.01.71-.02.15a.3.3 0 0 1-.13.13l-.15.02-.72.01h-1.35l-.72-.01-.15-.03a.3.3 0 0 1-.12-.12l-.02-.15-.02-.71V5.82q0-.5.02-.71l.02-.15a.3.3 0 0 1 .12-.12m0 11.02.15-.03.72-.01h1.35l.72.01.15.03a.3.3 0 0 1 .12.12l.03.15.01.71v1.34l-.01.71-.02.15a.3.3 0 0 1-.13.12l-.15.02c-.15.02-.36.02-.72.02h-1.35c-.35 0-.56 0-.72-.02l-.15-.02a.3.3 0 0 1-.12-.12l-.02-.15-.02-.71v-1.34c0-.35 0-.56.02-.71l.02-.15a.3.3 0 0 1 .12-.13"></path><!>',1);function Im(t,e){let i=h(e,"isOpened",3,!1),o=f(()=>i()?"graph-close-icon":"graph-open-icon");Xe(t,{get testId(){return n(o)},children:(r,a)=>{var l=y2(),d=k(ue(l));{var s=u=>{var m=$2();$(u,m)};V(d,u=>{i()&&u(s)})}$(r,l)},$$slots:{default:!0}})}function rc(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"hidden",3,!1),r=h(e,"disabled",3,!1),a=h(e,"graphIsOpened",3,!1),d=_e().ui.t,s=f(()=>a()?d("tooltip_interactive_graph_on"):d("tooltip_interactive_graph_off")),u=f(()=>o()?"hidden":"");Ft(t,{get className(){return n(u)},testId:"btn-graph",get disabled(){return r()},get ariaLabel(){return n(s)},get click(){return e.click},get ref(){return i()},set ref(m){i(m)},children:(m,p)=>{let v=f(()=>!!a());Im(m,{get isOpened(){return n(v)}})},$$slots:{default:!0}}),H()}import{PlaybackState as Z_}from"@vkontakte/videoplayer-core/es2018";function sc(t,e){B(e,!0);let[i,o]=Ne(),r=()=>x(u,"$playbackState$",i),a=h(e,"isMobile",3,!1),l=h(e,"isLiveActive",3,!1),d=h(e,"ariaLabel",3,""),s=_e(),u=s.state.playbackState$,m=s.actions.internal.switchToActiveLive,p=s.actions.internal.togglePlay,v=f(()=>()=>{if(!l()){m();return}r()===Z_.PAUSED&&p()}),_=f(()=>a()?"":"btn--live btn-full-opacity"),y=f(()=>l()?"btn-live":"btn-live-offset"),b=f(()=>l()&&r()===Z_.PLAYING);Ft(t,{get className(){return n(_)},get testId(){return n(y)},get disabled(){return n(b)},get ariaLabel(){return d()},get click(){return n(v)},children:(w,I)=>{Vd(w,{get isActive(){return l()}})},$$slots:{default:!0}}),H(),o()}import{noop as J_}from"@vkontakte/videoplayer-shared/es2018";var x2=L('<div class="icon icon-error-stub"><div class="inner"></div></div>'),w2=L('<img class="icon" aria-hidden="true"/>');function Ka(t,e){"use strict";let i=q(!1),o=()=>{R(i,!0)};var r=Ae(),a=ue(r);{var l=s=>{var u=x2();$(s,u)},d=s=>{var u=w2();D(()=>Me(u,"src",e.icon)),st("error",u,o),Pa(u),$(s,u)};V(a,s=>{n(i)?s(l):s(d,!1)})}$(t,r)}function Em(t,e){B(e,!0);let i=h(e,"disabled",3,!1),o=h(e,"onClick",3,J_),r=h(e,"ref",15),a=f(()=>o()===J_),l=f(()=>n(a)||i()),d=f(()=>n(a)?"btn-full-opacity":"");Ao(t,{get disabled(){return n(l)},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},width:40,get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get tooltipVisible(){return e.tooltipVisible},get ref(){return r()},set ref(s){r(s)},children:(s,u)=>{let m=f(()=>{var p;return(p=e.testId)!=null?p:e.id});Ft(s,{get className(){return n(d)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return n(l)},get testId(){return n(m)},children:(p,v)=>{Ka(p,{get icon(){return e.icon}})},$$slots:{default:!0}})},$$slots:{default:!0}}),H()}var eb=t=>!!t.buttonComponent;var Fs={vkLogo:100,autoplayNext:200,volume:300,subtitles:400,settings:500,context:600,fullscreen:700,chromecast:800};var Zu=(t,e,i,o)=>{if(t)for(let[r,a]of Object.entries(e))a.set(jn(t,i,r,o))};import{interpolate as Pm}from"@vkontakte/videoplayer-shared/es2018";var tb=10,ib=40,km=.2,C2=.5,T2=65,I2=114,E2=4,ob=({onPreviewTrackOpened:t,getTimelineRef:e,isHorizontal:i})=>{let o=f(()=>i?T2:I2),r=q(!1),a=q(0),l=q(0),d=f(()=>n(o)+tb-ib-E2),s=f(()=>Pm(n(a),[km,1],[0,-n(d)])),u=f(()=>Pm(n(a),[km,1],[0,ib])),m=f(()=>Pm(n(a),[km,1],[0,n(o)+tb]));return{progressBarY:()=>n(s),controlsY:()=>n(u),calculatedHeight:()=>n(m),onPointerDown:b=>{var w;R(l,((w=e())==null?void 0:w.getBoundingClientRect().bottom)||0,!0),R(r,!0)},onPointerMove:b=>{if(!n(r))return;let w=Math.max(Math.min(b.clientY-n(l),0),-n(d));R(a,Math.abs(w/n(d)),!0)},onPointerUp:()=>{R(r,!1),R(a,n(a)>=C2?1:0,!0),n(a)===1&&t()},closePreviewTrack:()=>{R(a,0)}}};var P2=t=>t;function _s(t,{delay:e=0,duration:i=400,easing:o=P2}={}){let r=+getComputedStyle(t).opacity;return{delay:e,duration:i,easing:o,css:a=>`opacity: ${a*r}`}}var k2=L('<span class="root s-2c"> </span>'),A2={hash:"s-2c",code:".root.s-2c{box-shadow:0 8px 24px 0 rgba(0,0,0,.08);box-shadow:0 0 2px 0 rgba(0,0,0,.08);color:#fff;font-size:13px;font-weight:500;line-height:16px}"};function Am(t,e){G(t,A2);var i=k2(),o=C(i,!0);S(i),D(()=>ve(o,e.time)),$(t,i)}var L2=L('<div class="tooltip-wrapper s-j"><div><!></div></div>'),M2={hash:"s-j",code:'.tooltip-wrapper.s-j{display:block;position:relative}.tooltip.s-j{bottom:100%;opacity:0;position:absolute;transform:translateX(-50%);transition:opacity .2s;visibility:hidden}.pointer.s-j:after{border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid rgba(41,41,41,.8);bottom:0;content:" ";font-size:0;left:50%;line-height:0;position:absolute;transform:translate(-50%,5px);width:0}.tooltip.active.s-j{opacity:1;visibility:visible}'};function Lm(t,e){G(t,M2);let i=h(e,"active",3,!1),o=h(e,"pointer",3,!1),r=h(e,"translateXPx",3,0),a=h(e,"translateYPx",3,0),l=h(e,"leftOffset",3,0),d=h(e,"rightOffset",3,0),s=q(void 0),u=q(void 0);function m(w){if(!n(u))return 0;let{width:I}=n(u).getBoundingClientRect(),T=I/2;return w<T?T+l():w>e.containerWidth-T?e.containerWidth-T-d():w}let p=f(()=>m(r()));var v=L2(),_=C(v);let y;var b=C(_);ti(b,()=>{var w;return(w=e.children)!=null?w:ft}),S(_),je(_,w=>R(u,w),()=>n(u)),S(v),je(v,w=>R(s,w),()=>n(s)),D(w=>{We(v,`transform: translate(${n(p)}px, ${a()}px);`),y=ne(_,1,"tooltip s-j",null,y,w),We(_,`opacity: ${i()?1:0}; visibility: ${i()?"visible":"hidden"}`)},[()=>({active:i(),pointer:o()})]),$(t,v)}var nb=t=>Math.abs(t)/90%4===1;var V2=L('<div class="preview s-i"></div>'),R2=L('<div class="time s-i"> </div>'),N2=L('<div><!> <div class="episode s-i"><!></div> <!></div>'),D2={hash:"s-i",code:".timeline-preview.s-i{border-radius:2px;bottom:18px;pointer-events:none}.timeline-preview.mobile.s-i{bottom:72px}.preview.s-i{background-color:var(--timeline-preview-bg);border:1px solid var(--white);border-radius:8px;box-shadow:0 0 2px var(--timeline-preview-shadow),0 8px 24px var(--timeline-preview-shadow)}.episode.s-i{margin-bottom:4px;margin-top:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.episode.s-i,.time.s-i{font-size:13px;font-weight:500;line-height:16px;text-align:center;text-shadow:0 8px 24px var(--timeline-preview-shadow),0 0 2px var(--timeline-preview-shadow)}.time.s-i{color:var(--white)}"};function Mm(t,e){B(e,!0),G(t,D2);let[i,o]=Ne(),r=()=>x(y,"$rotateAlpha",i),a=()=>x(b,"$playerSize",i),l={MOBILE:150,DESKTOP:278},d=h(e,"time",3,""),s=h(e,"isMobile",3,!1),u=h(e,"videoEpisodes",19,()=>[]),m=h(e,"progress",3,0),p=h(e,"duration",3,0),v=h(e,"isInteractive",3,!1),_=_e(),y=_.ui.rotateAlpha,b=_.ui.playerSize,w=q(0),I=q(0),T=q(""),N=q(0),A=q(0),E=q(0),P=q(0),Q=f(()=>Uu(m(),p(),u())),F=f(()=>Hl(r())),z=f(()=>nb(r())),X=f(oe),se=f(()=>(n(z)?1:-1)*(n(w)/2-n(I)/2)),Z=f(()=>n(se)*-1);De(()=>{(K=>{R(w,K.width,!0),R(I,K.height,!0)})(Ce())}),De(()=>{(K=>{R(T,K.imgSrc,!0),R(N,K.imgWidth,!0),R(A,K.imgHeight,!0),R(E,K.imgOffsetX,!0),R(P,K.imgOffsetY,!0)})(me(m()))});function oe(){var Be;let K=s()?l.MOBILE:l.DESKTOP,{isVertical:ae}=J(),xe=30;return(Be=n(Q))!=null&&Be.text&&(xe+=16),(ae||n(F))&&(xe+=18,xe+=50),Math.min(Math.max(a().height-xe,0),K)}function J(){let K=e.previewThumbsData.frameWidth,ae=e.previewThumbsData.frameHeight,xe=ae>K;return{width:K,height:ae,isHorizontal:!xe,isVertical:xe}}function Ce(){let{height:K,isHorizontal:ae,isVertical:xe,width:Be}=J();return ae&&(K=K/Be*n(X),Be=n(X)),xe&&(Be=Be/K*n(X),K=n(X)),{width:Be,height:K}}function me(K){let ae;e.previewThumbsData.isUV?ae=Math.floor(p()*K/e.previewThumbsData.frequency):ae=Math.min(e.previewThumbsData.countTotal,Math.max(0,Math.floor(e.previewThumbsData.countTotal*K)));let xe=Math.floor(ae/e.previewThumbsData.countPerImage),Be=Math.floor(ae%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),tt=ae%e.previewThumbsData.countPerRow,re=Math.floor(e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow);!e.previewThumbsData.isUV&&xe===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&(re=Math.floor(e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage%e.previewThumbsData.countPerRow>0&&re++);let ce=e.previewThumbsData.countPerRow;!e.previewThumbsData.isUV&&xe===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage>0&&(ce=Math.min(e.previewThumbsData.countPerRow,e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage));let Re=n(w)*ce,Ve=n(I)*re,Je=-tt*n(w),Ee=-Be*n(I);return{imgSrc:e.previewThumbsData.links[xe],imgWidth:Re,imgHeight:Ve,imgOffsetX:Je,imgOffsetY:Ee}}var ee=N2();let be;var we=C(ee);{var ge=K=>{var ae=V2();D(()=>We(ae,`width: ${n(w)}px; height: ${n(I)}px; background-image: url(${n(T)}); background-size: ${n(N)}px ${n(A)}px; background-position: ${n(E)}px ${n(P)}px;
|
|
61
|
+
transform: rotate(${r()}deg) ${n(F)?`translate(${n(se)}px, ${n(Z)}px)`:""};
|
|
62
|
+
`)),$(K,ae)};V(we,K=>{n(T)&&K(ge)})}var pe=k(we,2),Ke=C(pe);{var U=K=>{var ae=Ae(),xe=ue(ae);{var Be=re=>{var ce=ps();D(Re=>ve(ce,Re),[()=>j("tooltip_episode_unfinished")]),$(re,ce)},tt=re=>{var ce=ps();D(()=>ve(ce,n(Q).text||"")),$(re,ce)};V(xe,re=>{v()&&n(Q).completed===!1?re(Be):re(tt,!1)})}$(K,ae)};V(Ke,K=>{n(Q)&&K(U)})}S(pe);var O=k(pe,2);{var qe=K=>{var ae=R2(),xe=C(ae,!0);S(ae),D(()=>ve(xe,d())),$(K,ae)};V(O,K=>{v()||K(qe)})}S(ee),D(K=>{be=ne(ee,1,"timeline-preview s-i",null,be,K),We(ee,`width: ${n(F)?n(I):n(w)}px;`)},[()=>({mobile:s()})]),$(t,ee),H(),o()}var O2=L('<span class="time s-f"> </span>'),B2=L("<!> <!>",1),H2={hash:"s-f",code:".time.s-f{background-color:rgba(41,41,41,.8);border-radius:3px;color:var(--white);display:inline-block;padding:6px 10px}.timeline-slider{--slider-bg:var(--timeline-slider-bg);--slider-filled-bg:var(--timeline-slider-filled-bg);--slider-handle-bg:var(--timeline-slider-handle-bg);--slider-loaded-bg:var(--timeline-slider-loaded-bg)}"};function Vm(t,e){var le,ye,Le,nt,Et;B(e,!0),G(t,H2);let[i,o]=Ne(),r=()=>x(Z,"$interactiveEpisodes$",i),a=()=>x(P,"$duration$",i),l=()=>x(E,"$position$",i),d=()=>x(Ce,"$isInteractiveExpectation$",i),s=()=>x(J,"$isInteractiveTime$",i),u=()=>x(we,"$previewTrackActive",i),m=()=>x(Q,"$isLive$",i),p=()=>x(be,"$disabledControls$",i),v=()=>x(z,"$isMobile",i),_=()=>x(F,"$isActiveLive$",i),y=()=>x(A,"$bufferedProgress$",i),b=h(e,"showTimeline",3,!1),w=h(e,"withEpisodes",3,!0),I=h(e,"ref",15,void 0),T=_e(),N=Rt(),A=T.state.bufferedProgress$,E=T.state.positionWithScrubbing$,P=T.state.duration$,Q=T.state.isLive$,F=T.state.isActiveLive$,z=T.ui.isMobile,X=N.features.episodes&&w()?T.actions.internal.getVideoEpisodes():void 0,se=T.actions.internal.getPreviewThumbsData(),Z=T.state.interactiveEpisodes$,oe=T.state.isInteractive,J=T.state.isInteractiveTime$,Ce=T.state.isInteractiveExpectation$,me=T.actions.internal.correctSeekTimeToInteractive,ee=(le=T.callbacks)==null?void 0:le.onDisabledTimelineClick,be=T.ui.controls.disabledControls$,we=T.ui.previewTrackActive,ge=(Le=(ye=T.callbacks)==null?void 0:ye.uiInfo)==null?void 0:Le.onTimelineMouseEnter,pe=(Et=(nt=T.callbacks)==null?void 0:nt.uiInfo)==null?void 0:Et.onTimelineMouseLeave,Ke=T.ui.t,U=N.features.interactiveResponsiveUi,O=f(()=>oe?r():X),qe=f(()=>Qo(a())),K=f(()=>Qo(l())),ae=f(()=>l()/a()),xe=f(()=>d()||s()),Be=q(!1),tt=q(""),re=q(0),ce=q(0),Re=q(0),Ve=f(()=>({containerWidth:n(ce),translateXPx:n(re),translateYPx:oe&&se?-36:-16,active:n(Be)&&b()&&!n(xe)&&!U&&!u(),pointer:!N.features.timelinePreview||!se||m()})),Je=Ke("aria_timeline"),Ee=f(()=>Ke("aria_timeline_value",{position:n(K),duration:n(qe)}));function Te(fe){return!me||!oe?fe:me(fe*a())/a()}function He(fe,Oe){var ze;(ze=e.onSliderPointerDown)==null||ze.call(e,Oe),T.actions.internal.startScrubbing(Te(fe))}function Ct(fe){s()||T.actions.internal.progressScrubbing(Te(fe))}function xt(fe){var Oe;T.actions.internal.completeScrubbing(Te(fe)),R(Be,!1),(Oe=e.onSliderPointerUp)==null||Oe.call(e)}function At(fe,Oe,ze){var bt;(bt=e.onSliderPointerEnter)==null||bt.call(e,fe),jt(fe,Oe,ze),R(Be,!0)}function at(fe,Oe,ze,bt){var zt;(zt=e.onSliderMove)==null||zt.call(e,bt,fe),jt(fe,Oe,ze),R(Be,!0)}function Tt(){var fe;R(Be,!1),(fe=e.onSliderLeave)==null||fe.call(e)}function jt(fe,Oe,ze){R(Re,Te(fe),!0),R(re,Oe,!0),ze&&R(ce,ze,!0),R(tt,It(fe),!0)}function It(fe){let Oe=Qo((m()?1-fe:fe)*a());return m()?`-${Oe}`:Oe}let Dt=f(()=>p().has("TIMELINE"));var Ut=B2(),Y=ue(Ut);Lm(Y,ts(()=>n(Ve),{get leftOffset(){return e.tooltipLeftOffset},get rightOffset(){return e.tooltipRightOffset},children:(fe,Oe)=>{var ze=Ae(),bt=ue(ze);{var zt=ui=>{Mm(ui,{get time(){return n(tt)},get isMobile(){return v()},get videoEpisodes(){return n(O)},get previewThumbsData(){return se},get progress(){return n(Re)},get duration(){return a()},get isInteractive(){return oe}})},Pt=ui=>{var di=O2(),Vi=C(di,!0);S(di),D(()=>ve(Vi,n(tt))),$(ui,di)};V(bt,ui=>{N.features.timelinePreview&&se&&!m()?ui(zt):ui(Pt,!1)})}$(fe,ze)},$$slots:{default:!0}}));var Pe=k(Y,2);Ua(Pe,{className:"timeline-slider",get isActiveLive(){return _()},get isMobile(){return v()},get ariaLabel(){return Je},ariaValueMin:0,get ariaValueMax(){return a()},get ariaValueNow(){return l()},get ariaValueText(){return n(Ee)},get loadedProgress(){return y()},get filledProgress(){return n(ae)},get handleProgress(){return n(ae)},get videoEpisodes(){return n(O)},onPointerDown:He,onHandleMove:Ct,onPointerMove:at,onPointerUp:xt,onPointerEnter:At,onPointerLeave:Tt,get onMouseEnter(){return ge},get onMouseLeave(){return pe},get onDisabledClick(){return ee},get isInteractive(){return oe},get disabled(){return n(Dt)},get handleAlwaysVisible(){return u()},get hideHandel(){return s()},testId:"progress_bar",onContextMenu:xt,get ref(){return I()},set ref(fe){I(fe)}}),$(t,Ut),H(),o()}var F2={hash:"s-g",code:".timeline-ads-slider{--slider-bg:var(--timeline-slider-bg);--slider-filled-bg:var(--timeline-slider-filled-bg);--slider-handle-bg:var(--timeline-slider-handle-bg);--slider-loaded-bg:var(--timeline-slider-loaded-bg)}"};function ac(t,e){B(e,!0),G(t,F2);let[i,o]=Ne(),r=()=>x(s,"$isMobile",i),a=h(e,"position",3,0),l=h(e,"duration",3,0),d=_e(),s=d.ui.isMobile,u=d.ui.t,m=f(()=>Qo(l())),p=f(()=>Qo(a())),v=f(()=>a()/l()),_=f(()=>u("aria_timeline_value",{position:n(p),duration:n(m)})),y=f(()=>Math.round(n(v)*100));Ua(t,{className:"timeline-ads-slider",ariaValueMin:0,get ariaValueMax(){return l()},get ariaValueNow(){return n(y)},get ariaValueText(){return n(_)},get filledProgress(){return n(v)},hideHandel:!0,get squareBorders(){return r()}}),H(),o()}var U2=L("<div><!></div>"),z2=L("<div></div>"),W2={hash:"s-c",code:".timeline.s-c{align-items:center;bottom:0;box-sizing:border-box;display:flex;min-width:86px;pointer-events:all;position:relative;width:100%}.timeline.mobile.s-c{height:16px;margin-top:6px;padding:6px 12px 7px}.withoutPadding.s-c{padding:0}.timeline-stub.s-c{min-width:20px;width:100%}.timeline-stub.mobile.s-c{height:8px}"};function qa(t,e){B(e,!0),G(t,W2);let[i,o]=Ne(),r=()=>x(w,"$isLive$",i),a=()=>x(N,"$isMobile",i),l=()=>x(A,"$disabled",i),d=()=>x(T,"$adPosition",i),s=()=>x(I,"$adDuration",i),u=h(e,"isAds",3,!1),m=h(e,"isHidden",3,!1),p=h(e,"timelineNotAvailable",3,!1),v=h(e,"needPadding",3,!0),_=h(e,"ref",15,void 0),y=_e(),b=Rt(),w=y.state.isLive$,I=y.ads.duration,T=y.ads.position,N=y.ui.isMobile,A=de(!1),E=f(()=>!p()&&(!r()||r()&&e.canRewindLive&&e.isRewindableLive||u()));var P=Ae(),Q=ue(P);{var F=X=>{var se=U2();let Z;var oe=C(se);{var J=me=>{ac(me,{get position(){return d()},get duration(){return s()}})},Ce=me=>{Vm(me,{get tooltipLeftOffset(){return e.tooltipLeftOffset},get tooltipRightOffset(){return e.tooltipRightOffset},get showTimeline(){return n(E)},get withEpisodes(){return e.withEpisodes},get onSliderMove(){return e.onSliderMove},get onSliderPointerDown(){return e.onSliderPointerDown},get onSliderPointerUp(){return e.onSliderPointerUp},get onSliderLeave(){return e.onSliderLeave},get onSliderPointerEnter(){return e.onSliderPointerEnter},get ref(){return _()},set ref(ee){_(ee)}})};V(oe,me=>{u()?me(J):me(Ce,!1)})}S(se),Ms(se,()=>Ll(m()&&b.features.usePerformanceFix,A,b.disableInvisibleComponentsTimeout)),D(me=>Z=ne(se,1,"timeline s-c",null,Z,me),[()=>({withoutPadding:!v(),mobile:a(),"out-of-flow":l()})]),$(X,se)},z=X=>{var se=z2();let Z;D(oe=>Z=ne(se,1,"timeline-stub s-c",null,Z,oe),[()=>({mobile:a()})]),$(X,se)};V(Q,X=>{n(E)?X(F):X(z,!1)})}$(t,P),H(),o()}import{getRangeAroundIndex as K2}from"@vkontakte/videoplayer-shared/es2018";var q2=(t,e,i,o,r,a,l)=>{R(e,!0),R(i,t.clientX,!0),R(o,n(r),!0),a(l())},Q2=L("<div></div>"),G2=L('<div><div class="track s-2b"></div></div>'),Y2={hash:"s-2b",code:'.root.s-2b{display:flex;height:var(--preview-track-frame-height-horizontal);overflow:hidden;position:relative;width:100%}.root.is-vertical-video.s-2b,.root.vertically-rotated.s-2b{height:var(--preview-track-frame-height-vertical)}.root.s-2b:after{background-color:#fff;box-shadow:0 2px 2px 0 rgba(0,0,0,.12);box-shadow:0 0 2px 0 rgba(0,0,0,.06);content:"";height:100%;margin:0 auto;pointer-events:none;width:3px;z-index:1}.track.s-2b{bottom:0;display:flex;left:0;padding:0 50%;top:0}.frame.s-2b,.track.s-2b{position:absolute}.frame.s-2b{background-position-x:calc(var(--column-index)*-1*var(--frame-width));background-position-y:calc(var(--frame-height)*-1*var(--row-index));background-size:calc(var(--frame-width)*var(--column-numbers)) calc(var(--frame-height)*var(--row-numbers));flex-shrink:0;height:var(--frame-height);pointer-events:none;transform-origin:center;width:var(--frame-width)}.vertically-rotated.s-2b .frame:where(.s-2b){transform-origin:0 0}.rotate-1.s-2b{transform:rotate(-90deg) translateX(-100%)}.rotate-2.s-2b{transform:rotate(-180deg)}.rotate-3.s-2b{transform:rotate(-270deg) translateY(-100%)}'};function Nm(t,e){B(e,!0),G(t,Y2);let[i,o]=Ne(),r=()=>x(N,"$rotateAlpha",i),a=()=>x(b,"$position$",i),l=()=>x(y,"$duration$",i),d=_e(),{countPerImage:s=0,countPerRow:u=0,countTotal:m=0,links:p=[],frameHeight:v=0,frameWidth:_=0}=d.actions.internal.getPreviewThumbsData()||{},{duration$:y,positionWithScrubbing$:b}=d.state,{startScrubbing:w,progressScrubbing:I,completeScrubbing:T}=d.actions.internal,N=d.ui.rotateAlpha,A=q(void 0),E=q(!1),P=q(0),Q=q(0),F=q(0),z=q(0),X=f(()=>v<=_),se=f(()=>Hl(r())),Z=f(()=>n(X)?!n(se):n(se)),oe=114,J=65,Ce=3,me=f(()=>n(Z)?oe:J),ee=f(()=>n(X)?oe:J),be=f(()=>n(X)?"var(--preview-track-frame-height-horizontal)":"var(--preview-track-frame-height-vertical)"),we=f(()=>m*n(me)),ge=q(0);De(()=>{R(z,Math.ceil(-n(F)/n(me))-1),R(F,-n(we)*a()/l())});let pe=()=>{T(Ke(),!0)},Ke=()=>l()*-n(F)/n(we)/l(),U=!1,O=Ee=>{if(!n(E))return!1;let Te=Ee.clientX-n(P);R(F,n(Q)+Te),R(F,Math.max(Math.min(n(F),0),-n(we)),!0),Math.abs(Te)>1&&(U=!0),I(Ke())},qe=Ee=>{n(E)&&(R(E,!1),!U&&Ee&&R(F,-(Ee.offsetX-n(ge)/2)),U=!1,pe())},K=()=>{n(E)&&qe()},ae=f(()=>s/u),xe=(Ee,Te)=>{if(Ee!==p.length-1)return u;let He=0,Ct=Te*u;for(let xt=1;xt<=u;xt++)Ee*s+He+Ct<m&&He++;return He},Be=f(()=>Math.floor(n(z)/s)),tt=f(()=>K2(3,n(Be),p.length-1)),re=(Ee,Te,He)=>{let Ct=s*n(me);return Ee*Ct+Te*n(me)*u+n(ge)/2-Ce/2+He*n(me)},ce=f(()=>[`--row-numbers: ${n(ae)}`,`--column-numbers: ${u}`,`--frame-width: ${n(ee)}px`,`--frame-height: ${n(be)}`].join(";"));var Re=G2();let Ve;var Je=C(Re);Je.__pointerdown=[q2,E,P,Q,F,w,Ke],Je.__pointermove=O,Je.__pointerup=qe,_i(Je,20,()=>n(tt),Ee=>Ee,(Ee,Te)=>{var He=Ae(),Ct=ue(He);_i(Ct,16,()=>Array.from({length:n(ae)},(xt,At)=>At),xt=>xt,(xt,At)=>{var at=Ae(),Tt=ue(at);_i(Tt,16,()=>Array.from({length:xe(Te,At)},(jt,It)=>It),jt=>jt,(jt,It)=>{var Dt=Q2();D((Ut,Y)=>{We(Dt,Ut),ne(Dt,1,Y,"s-2b")},[()=>`--row-index: ${At}; --column-index: ${It}; left: ${re(Te,At,It)}px; background-image: url(${p[Te]});`,()=>`frame rotate-${Math.abs(r())/90%4}`]),$(jt,Dt)}),$(xt,at)}),$(Ee,He)}),S(Je),S(Re),je(Re,Ee=>R(A,Ee),()=>n(A)),D(Ee=>{Ve=ne(Re,1,"root s-2b",null,Ve,Ee),We(Re,n(ce)),We(Je,`transform: translateX(${n(F)}px); width: ${n(we)}px;`)},[()=>({"is-vertical-video":!n(X),"vertically-rotated":n(se)})]),st("mouseleave",Je,K),Pn(Re,"clientWidth",Ee=>R(ge,Ee)),$(t,Re),H(),o()}Qe(["pointerdown","pointermove","pointerup"]);var j2=L('<div class="notification s-2d"><span class="description s-2d"> </span></div>'),X2={hash:"s-2d",code:".notification.s-2d{background:var(--notification-bg);border-radius:var(--notification-radius);padding:9px 14px 10px 12px}.description.s-2d{font-size:14px;line-height:18px}"};function Dm(t,e){B(e,!1),G(t,X2);let i=340,{ui:{t:o}}=_e();mo();var r=j2(),a=C(r),l=C(a,!0);S(a),S(r),D(d=>ve(l,d),[()=>o("preview_track_close_tooltip")],Sn),es(3,r,()=>_s,()=>({duration:i})),$(t,r),H()}import{getRangeAroundIndex as Z2}from"@vkontakte/videoplayer-shared/es2018";var J2=L('<div class="preview-track-close tooltip s-28"><!></div>'),ew=L('<div class="preview-track-control s-28"><!> <div class="preview-track-close s-28"><!></div> <!></div>'),tw=L('<div class="wrapper-preview-track s-28"><!></div>'),iw=L('<div class="enriched-timeline s-28"><!> <!> <!></div>'),ow={hash:"s-28",code:".enriched-timeline.s-28{padding:var(--timeline-padding-vertical-top) var(--timeline-padding-horizontal) var(--timeline-padding-vertical-bottom);pointer-events:auto;position:relative}.preview-track-control.s-28{align-items:center;display:flex;justify-content:center;left:0;padding:0 calc(var(--timeline-padding-horizontal));pointer-events:none;position:absolute;right:0;top:calc((var(--timeline-height) + var(--preview-track-controls-top))*-1)}.preview-track-close.s-28{pointer-events:auto;position:absolute;right:calc(var(--timeline-padding-horizontal))}.preview-track-close.tooltip.s-28{bottom:32px;opacity:0;transition:opacity .2s}.preview-track-close.s-28:hover+.tooltip:where(.s-28){opacity:1}.wrapper-preview-track.s-28{box-sizing:border-box;left:0;overflow:hidden;padding:0 calc(var(--timeline-padding-horizontal));position:absolute;right:0;z-index:-1}"};function Om(t,e){B(e,!0),G(t,ow);let[i,o]=Ne(),r=()=>x(b,"$playerSize",i),a=()=>x(y,"$duration$",i),l=()=>x(w,"$previewTrackActive",i),d=()=>x(v,"$position$",i),s=()=>x(_,"$isRewindableLive$",i),u=h(e,"timelineRef",15,void 0),m=_e(),p=200,{positionWithScrubbing$:v,isRewindableLive$:_,duration$:y}=m.state,{playerSize:b,previewTrackActive:w}=m.ui,{countPerImage:I=0,links:T=[],frequency:N=0}=m.actions.internal.getPreviewThumbsData()||{},A=f(()=>r().width>100),E=q(!u_()),P=()=>{n(E)&&(c_(),R(E,!1))},Q=me=>{let ee=Math.floor(a()*me/N),be=Math.floor(ee/I),we=Z2(3,be,T.length-1);for(let ge of we){let pe=new Image;pe.src=T[ge]}},F=(me,ee)=>{Q(ee),!l()&&e.onTimelineMove(me)};var z=iw(),X=C(z);{var se=me=>{var ee=ew(),be=C(ee);let we=f(()=>Qo(d()));Am(be,{get time(){return n(we)}});var ge=k(be,2),pe=C(ge);Rs(pe,{onClick:()=>m.actions.internal.closePreviewTrack()}),S(ge);var Ke=k(ge,2);{var U=O=>{var qe=J2(),K=C(qe);Dm(K,{}),S(qe),$(O,qe)};V(Ke,O=>{n(E)&&O(U)})}S(ee),st("mouseleave",ge,P),es(3,ee,()=>_s,()=>({duration:p})),$(me,ee)};V(X,me=>{l()&&me(se)})}var Z=k(X,2);let oe=f(()=>!n(A));qa(Z,{get isHidden(){return n(oe)},get isAds(){return e.isAds},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return s()},onSliderMove:F,get onSliderPointerDown(){return e.onTimelinePointerDown},get onSliderPointerUp(){return e.onTimelinePointerUp},get onSliderLeave(){return e.onTimelinePointerLeave},onSliderPointerEnter:Q,get ref(){return u()},set ref(me){u(me)}});var J=k(Z,2);{var Ce=me=>{var ee=tw(),be=C(ee);Nm(be,{}),S(ee),D(()=>We(ee,`height: ${e.animatedPreviewTrackHeight}px;`)),$(me,ee)};V(J,me=>{e.previewTrackAvailable&&me(Ce)})}S(z),D(()=>We(z,`transform: translateY(${e.animatedOffsetY}px);`)),$(t,z),H(),o()}var rw=L('<div><!> <div class="controls s-19" data-testid="player_controls"><div class="controls-left s-19"><!> <!> <!></div> <div class="controls-right s-19"></div></div></div> <!>',1),sw={hash:"s-19",code:'.wrapper-bottom.s-19{bottom:0;box-sizing:border-box;display:flex;flex-direction:column;justify-content:flex-end;left:0;pointer-events:none;position:absolute;transition:transform var(--controls-transition-duration) var(--controls-transition-fn);width:100%;will-change:transform;z-index:var(--controls-container-z-index)}.wrapper-bottom.s-19:before{background:var(--controls-gradient);content:"";height:var(--controls-gradient-height);position:absolute;width:100%}.wrapper-bottom.s-19>:where(.s-19){pointer-events:auto}.controls.s-19{align-items:center;box-sizing:border-box;display:flex;font-size:13px;height:var(--controls-height);justify-content:space-between;padding:0 var(--controls-desktop-padding-horizontal) 4px;white-space:nowrap;width:100%}.controls-left.s-19,.controls-right.s-19{align-content:center;display:flex}.controls-left.s-19{flex-grow:1;min-width:0;overflow:hidden}.controls-left.s-19 >:not(:first-child),.controls-right.s-19 >*{margin-left:var(--controls-desktop-item-margin-left)}.controls-hidden.s-19{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-19{transition:none}'};function Hm(t,e){var nl,ga;B(e,!0),G(t,sw);let[i,o]=Ne(),r=()=>x(Go,"$disabledControls$",i),a=()=>x(ot,"$adPlaybackState",i),l=()=>x(Pt,"$playbackState$",i),d=()=>x(po,"$currentSubtitle$",i),s=()=>x(Vi,"$isEnded$",i),u=()=>x(cn,"$currentGridType$",i),m=()=>x(Lt,"$isLive$",i),p=()=>x(Ge,"$chromecastState$",i),v=()=>x(ut,"$isPictureInPictureActive",i),_=()=>x(Gt,"$pictureInPictureType$",i),y=()=>x(fi,"$availableSubtitlesList$",i),b=()=>x(Ot,"$contextMenuOpenedByKeyboard$",i),w=()=>x(yt,"$showContextMenuBtn$",i),I=()=>x(hi,"$isRewindableLive$",i),T=()=>x(pi,"$isActiveLive$",i),N=()=>x(Dr,"$graphIsOpened$",i),A=()=>x(Yo,"$contextMenuVisible$",i),E=()=>x(Ni,"$isFullscreen",i),P=()=>x(ki,"$autoplayNextEnabled",i),Q=()=>x(n(fo),"$prevButton",i),F=()=>x(n(Jo),"$replayButton",i),z=()=>x(n(_o),"$playButton",i),X=()=>x(n(bo),"$nextButton",i),se=()=>x(n(Ii),"$playPrevChapterButton",i),Z=()=>x(n($o),"$seekToInteractiveButton",i),oe=()=>x(n(Fr),"$interactiveGraphButton",i),J=()=>x(n(xr),"$liveButton",i),Ce=()=>x(n($s),"$time",i),me=()=>x(n(Hi),"$episodes",i),ee=()=>x(n(ys),"$vkLogo",i),be=()=>x(n(rs),"$volume",i),we=()=>x(n(wr),"$subtitles",i),ge=()=>x(n(Ro),"$settings",i),pe=()=>x(n(Ur),"$context",i),Ke=()=>x(n(en),"$fullscreen",i),U=()=>x(n(tn),"$chromecast",i),O=()=>x(un,"$additionalDesktopControlPanelRightButtons$",i),qe=()=>x(Pi,"$playerSize",i),K=()=>x(Lo,"$isInteractiveTime$",i),ae=()=>x(si,"$previewTrackActive",i),xe=()=>x(Ri,"$settingsMenuVisible",i),Be=()=>x(Fi,"$settingButtonRef$",i),tt=()=>x(W,"$startedByKeyboard$",i),re=()=>x(ui,"$isAudioAvailable$",i),ce=()=>x(Ut,"$fakeIsPlaying$",i),Re=()=>x(bs,"$seekToInteractiveDisabledTooltip$",i),Ve=()=>x(yn,"$isPreviewTrackHorizontallyAligned$",i),Je=()=>x(yi,"$previewTrackAvailable",i),Ee=()=>x(Co,"$previewTrackDragInProgress",i),Te=()=>x(vt,"$adPosition",i),He=()=>x(zt,"$position$",i),Ct=()=>x(Xt,"$adDuration",i),xt=()=>x(bt,"$duration$",i),At=h(e,"playerControlsWrapperRef",15,void 0),at=h(e,"playerControlsRef",15,void 0),Tt=h(e,"isAds",3,!1),jt=h(e,"logoTargetUrl",3,""),It=h(e,"isOneVideoPlaylist",3,!1),Dt=h(e,"customFullscreenSupported",3,!0),{fakeIsPlaying$:Ut}=vo(),Y=_e(),Pe=vo(),le=Rt(),ye=Y.actions.internal.toggleMuted,Le=Y.actions.internal.togglePlay,nt=Y.actions.internal.pause,Et=Y.actions.internal.toggleSubtitle,fe=Y.actions.internal.checkFullscreenSupport,Oe=(nl=Y.callbacks)==null?void 0:nl.onAudioDoesNotExistHint,ze=(ga=Y.callbacks)==null?void 0:ga.onAudioDisabledHint,bt=Y.state.duration$,zt=Y.state.positionWithScrubbing$,Pt=Y.state.playbackState$,ui=Y.state.isAudioAvailable$,di=Y.state.isAudioDisabled,Vi=Y.state.isEnded$,Lt=Y.state.isLive$,pi=Y.state.isActiveLive$,hi=Y.state.isRewindableLive$,{isActive$:ut,type$:Gt}=Pe.pictureInPicture$,Ri=Y.ui.settingsMenu.visible$,bi=Y.ui.settingsMenu.openedByBtnKeyboard$,ei=Y.ui.controls,mt=Y.actions.internal.getVideoEpisodes(),Ge=Y.state.chromecastState$,fi=Y.state.availableSubtitlesList$,po=Y.state.currentSubtitle$,Go=ei.disabledControls$,Yo=Y.ui.contextMenu.visible$,yt=Y.ui.contextMenu.showContextMenuBtn$,Ot=Y.ui.contextMenu.openedByBtnKeyboard$,W=Y.ui.startedByKeyboard$,Mt=Y.ui.controlBlocks,ri=Y.ui.previewTrackNotificationVisible,pt=Y.ui.t,Xt=Y.ads.duration,vt=Y.ads.position,ot=Y.ads.playbackState,Ni=Y.ui.isFullscreen,Pi=Y.ui.playerSize,cn=Y.ui.currentGridType$,un=Y.ui.additionalDesktopControlPanelRightButtons$,ki=Y.ui.autoplayNextEnabled$,Di=Y.actions.internal.getVideoElement,Mn=Y.actions.internal.replayInteractive,go=Y.actions.internal.prevVideoClick,io=Y.actions.internal.nextVideoClick,Ti=Y.state.isInteractive,Lo=Y.state.isInteractiveTime$,Mo=Y.state.showInteractiveGraph,pn=Y.state.showSeekToInteractive,Vr=Y.state.showPlayPrevChapter,Rr=Y.state.showInteractiveTimeIndicator,Nr=Y.state.playPrevChapterDisabledTooltip,bs=Pe.seekToInteractiveDisabledTooltip$,Dr=Pe.graphIsOpened$,Zn=le.features.interactiveResponsiveUi,Or=f(()=>r().has("EPISODE_BUTTON")),fn=f(()=>r().has("GRAPH_BUTTON")),mn=f(()=>r().has("SEEK_TO_INTERACTIVE_BUTTON")),fr=f(()=>r().has("PLAY_BUTTON")),mr=f(()=>r().has("REPLAY_BUTTON")),jo=f(()=>r().has("PLAY_PREV_CHAPTER_BUTTON")),vr=()=>Y.actions.internal.toggleChromecast(),gr=f(()=>Tt()?a()==="playing":l()===Bm.PLAYING),Jn=f(()=>d().value!=="off"),Vn=f(()=>s()&&!Tt()||Ti),ns=f(()=>Zn?n(Vn)&&eo(u(),"m"):n(Vn)),Vo=f(()=>!s()||Ti||Tt()),hr=f(()=>eo(u(),"m")),Oi=f(()=>e.showNextPrevButtons&&eo(u(),"m")&&!Tt()&&e.nextButtonActive),_r=f(()=>e.showNextPrevButtons&&eo(u(),"m")&&!Tt()&&e.prevButtonActive),Rn=f(()=>!Tt()&&!!m()),ct=f(()=>p()!==rb.NOT_AVAILABLE&&!(v()&&_()===1)&&eo(u(),"m")&&!Ti),Zt=f(()=>e.showAutoplayNext&&!It()&&eo(u(),"s")),br=f(()=>y().length>0&&eo(u(),"m")),Br=f(()=>b()||w()),Hr=f(()=>eo(u(),"s")&&!Tt()),Nn=f(()=>!e.logoHidden&&!Tt()),er=f(()=>le.features.fullscreen&&fe()&&(e.logoHidden||eo(u(),Zn?"xs":"s"))&&!(v()&&_()===1)&&(Ti?Dt():!0)),ho=f(()=>(!m()||Tt())&&!(le.features.interactiveHideTime&&Ti)),Dn=f(()=>Mo&&eo(u(),"m")),tr=f(()=>Zn?pn&&eo(u(),"s"):pn),On=f(()=>Zn?Vr&&eo(u(),"s"):Vr),vn=f(()=>!Tt()&&!m()&&!!(mt!=null&&mt.length)&&n(hr)&&!n(Or)),gn=f(()=>!I()||!!T()),hn=f(()=>N()?pt("tooltip_interactive_graph_on"):pt("tooltip_interactive_graph_off")),Xo=f(()=>A()?pt("tooltip_context_menu_close"):pt("tooltip_context_menu_open")),Bi=(dt,it)=>dt?it&&it===Bm.PAUSED?pt("tooltip_play"):"":pt("tooltip_live"),Yi=f(()=>Bi(n(gn),l())),Zo=f(()=>le.logoType==="vk_video"?pt("tooltip_vk_video_logo"):pt("tooltip_vk_logo")),ir=f(()=>n(Jn)?pt("tooltip_subtitles_on"):pt("tooltip_subtitles_off")),$r=f(()=>E()?pt("tooltip_fullscreen_on"):pt("tooltip_fullscreen_off")),_n=f(()=>p()===rb.CONNECTED?pt("tooltip_chromecast_on"):pt("tooltip_chromecast_off")),yr=f(()=>P()?pt("tooltip_autoplay_on"):pt("tooltip_autoplay_off")),lt=q(0),$t=ai({}),oo=ai({}),fo=f(()=>ei.prevButton),Jo=f(()=>ei.replayButton),_o=f(()=>ei.playButton),bo=f(()=>ei.nextButton),Ii=f(()=>ei.playPrevChapterButton),$o=f(()=>ei.seekToInteractiveButton),Fr=f(()=>ei.interactiveGraphButton),xr=f(()=>ei.liveButton),$s=f(()=>ei.time),Hi=f(()=>ei.episodes),ys=f(()=>ei.vkLogo),rs=f(()=>ei.volume),wr=f(()=>ei.subtitles),Ro=f(()=>ei.settings),Ur=f(()=>ei.context),en=f(()=>ei.fullscreen),tn=f(()=>ei.chromecast),Fe=f(()=>({prevButton:Q()?Q().right-Q().left:0,replayButton:F()?F().right-F().left:0,playButton:z()?z().right-z().left:0,nextButton:X()?X().right-X().left:0,playPrevChapterButton:se()?se().right-se().left:0,seekToInteractiveButton:Z()?Z().right-Z().left:0,interactiveGraphButton:oe()?oe().right-oe().left:0,liveButton:J()?J().right-J().left:0,time:Ce()?Ce().right-Ce().left:0,episodes:me()?me().right-me().left:0,vkLogo:ee()?ee().right-ee().left:0,volume:be()?be().right-be().left:0,subtitles:we()?we().right-we().left:0,settings:ge()?ge().right-ge().left:0,context:pe()?pe().right-pe().left:0,fullscreen:Ke()?Ke().right-Ke().left:0,chromecast:U()?U().right-U().left:0,additionalButtons:O().length?O().reduce(dt=>[...dt,40],[]):[]})),wt=q(0);De(()=>{(!n(wt)||n(wt)<n(Fe).time)&&St(()=>R(wt,n(Fe).time,!0))});let ci=q(!1);De(()=>{let dt=0;n(vn)&&(eo(u(),"xl")?dt=n(Fe).time:dt=60);let it=n(Fe).prevButton+n(Fe).playButton+n(Fe).nextButton+n(Fe).seekToInteractiveButton+n(Fe).interactiveGraphButton+n(Fe).liveButton+n(wt)+dt;R(ci,n(ho)&&n(lt)>=it,!0)});let No=f(()=>n(ci)&&eo(u(),"m")),yo=sb(Wl,260),Do=sb(Zu,260);De(()=>{qe(),K(),ae(),yo(Di(),ei,$t,e.showControls),Do(Di(),Mt,oo,e.showControls)}),De(()=>{oo.bottom=At()});let Fi=de();De(()=>{xe(),Be()&&St(()=>Vl(Be(),xe(),bi))});let xo;De(()=>{tt(),St(()=>ju(W,tt(),xo))});function Bn(){aa({isAudioDisabled:di,isAudioAvailable:re(),isAds:Tt(),audioIsNotExistHintCallback:Oe,audioDisabledHintCallback:ze})&&ye()}let Sr=Ti?Mn:Le,wo=f(()=>ce()!==null),no=f(()=>n(wo)?ce():n(gr)),bn=f(()=>n(no)?pt("tooltip_pause"):pt("tooltip_play")),Oo=pt("tooltip_episodes"),Hn=f(()=>{var dt,it,ji,Io;return n(_r)?{id:"prevButton",type:"desktop-control-panel-left",weight:Bs.prevButton,buttonComponent:Wa,buttonComponentProps:{disabled:!e.prevButtonActive,type:"prev",click:go.bind(null,!0)},tooltipEnabled:!((it=(dt=Y.callbacks)==null?void 0:dt.uiInfo)!=null&&it.onPrevButtonMouseEnter)&&!((Io=(ji=Y.callbacks)==null?void 0:ji.uiInfo)!=null&&Io.onPrevButtonMouseLeave),mouseEnter:()=>{var Xi,vi,zi;(zi=(vi=(Xi=Y.callbacks)==null?void 0:Xi.uiInfo)==null?void 0:vi.onPrevButtonMouseEnter)==null||zi.call(vi,jn(Di(),$t,"prevButton",e.showControls))},mouseLeave:()=>{var Xi,vi,zi;(zi=(vi=(Xi=Y.callbacks)==null?void 0:Xi.uiInfo)==null?void 0:vi.onPrevButtonMouseLeave)==null||zi.call(vi,jn(Di(),$t,"prevButton",e.showControls))},tooltipText:pt("tooltip_previous"),disabled:!e.prevButtonActive}:void 0}),zr=f(()=>n(ns)?{id:"replayButton",type:"desktop-control-panel-left",weight:Bs.replayButton,buttonComponent:Kl,buttonComponentProps:{disabled:n(mr),click:Sr},tooltipText:pt("tooltip_restart"),disabled:n(mr)}:void 0),Wr=f(()=>n(Vo)?{id:"playButton",type:"desktop-control-panel-left",weight:Bs.playButton,buttonComponent:ql,buttonComponentProps:{disabled:n(fr),isPlaying:n(gr),click:Le},tooltipText:n(bn),disabled:n(fr)}:void 0),Fn=f(()=>{var dt,it,ji,Io;return n(Oi)?{id:"nextButton",type:"desktop-control-panel-left",weight:Bs.nextButton,buttonComponent:Wa,buttonComponentProps:{disabled:!e.nextButtonActive,type:"next",click:io.bind(null,!0)},tooltipEnabled:!((it=(dt=Y.callbacks)==null?void 0:dt.uiInfo)!=null&&it.onNextButtonMouseEnter)&&!((Io=(ji=Y.callbacks)==null?void 0:ji.uiInfo)!=null&&Io.onNextButtonMouseLeave),mouseEnter:()=>{var Xi,vi,zi;(zi=(vi=(Xi=Y.callbacks)==null?void 0:Xi.uiInfo)==null?void 0:vi.onNextButtonMouseEnter)==null||zi.call(vi,jn(Di(),$t,"nextButton",e.showControls))},mouseLeave:()=>{var Xi,vi,zi;(zi=(vi=(Xi=Y.callbacks)==null?void 0:Xi.uiInfo)==null?void 0:vi.onNextButtonMouseLeave)==null||zi.call(vi,jn(Di(),$t,"nextButton",e.showControls))},tooltipText:pt("tooltip_next"),disabled:!e.nextButtonActive}:void 0}),Ze=f(()=>Ti&&n(On)?{id:"playPrevChapterButton",type:"desktop-control-panel-left",weight:Bs.playPrevChapterButton,buttonComponent:ic,buttonComponentProps:{disabled:n(jo),click:e.playPrevChapter},tooltipText:pt("tooltip_interactive_go_back"),disabledTooltipContent:pt(Nr),disabled:n(jo)}:void 0),Yt=f(()=>Ti&&n(tr)?{id:"seekToInteractiveButton",type:"desktop-control-panel-left",weight:Bs.seekToInteractiveButton,buttonComponent:nc,buttonComponentProps:{disabled:n(mn),click:e.seekToInteractive},tooltipText:pt("tooltip_interactive_seek"),disabled:n(mn),disabledTooltipContent:pt(Re())}:void 0),$i=f(()=>Ti&&n(Dn)?{id:"interactiveGraphButton",type:"desktop-control-panel-left",weight:Bs.interactiveGraphButton,buttonComponent:rc,buttonComponentProps:{disabled:n(fn),click:Dr.toggle,graphIsOpened:N()},tooltipText:n(hn)}:void 0),So=f(()=>n(Rn)?{id:"liveButton",type:"desktop-control-panel-left",weight:Bs.liveButton,buttonComponent:sc,buttonComponentProps:{isLiveActive:n(gn),ariaLabel:n(Yi)},tooltipText:n(Yi),disabled:n(gn)&&l()===Bm.PLAYING}:void 0),$n=f(()=>[n(Hn),n(zr),n(Wr),n(Fn),n(Ze),n(Yt),n($i),n(So)].filter(dt=>!!dt).sort(Oa)),Un=f(()=>n(Nn)?{id:"vkLogo",type:"desktop-control-panel-right",weight:Fs.vkLogo,buttonComponent:Gd,buttonComponentProps:{targetUrl:jt(),logoClickable:e.logoClickable,click:nt},tooltipText:n(Zo),disabledTooltipContent:"",disabled:!e.logoClickable}:void 0),Bo=f(()=>n(Zt)?{id:"autoplayNext",type:"desktop-control-panel-right",weight:Fs.autoplayNext,buttonComponent:oc,tooltipText:n(yr)}:void 0),or=f(()=>({id:"volume",type:"desktop-control-panel-right",weight:Fs.volume,buttonComponent:um,buttonComponentProps:{click:Bn,isAds:Tt()}})),ss=f(()=>n(br)?{id:"subtitles",type:"desktop-control-panel-right",weight:Fs.subtitles,buttonComponent:sm,buttonComponentProps:{isSubtitlesEnabled:n(Jn),click:Et},tooltipText:n(ir)}:void 0),Cr=f(()=>n(Hr)?{id:"settings",type:"desktop-control-panel-right",weight:Fs.settings,buttonComponent:Ol,buttonComponentProps:{ref$:Fi},tooltipText:xe()?void 0:pt("tooltip_settings_off")}:void 0),xs=f(()=>le.features.contextMenuButton?{id:"context",type:"desktop-control-panel-right",weight:Fs.context,buttonComponent:Sm,buttonComponentProps:{ariaLabel:pt("aria_label_context_menu")},className:n(Br)?"":"out-of-view",tooltipText:n(Xo)}:void 0),Us=f(()=>n(er)?{id:"fullscreen",type:"desktop-control-panel-right",weight:Fs.fullscreen,buttonComponent:Qd,buttonComponentProps:{isFullscreen:E(),click:e.toggleFullscreen},tooltipText:n($r)}:void 0),ua=f(()=>n(ct)?{id:"chromecast",type:"desktop-control-panel-right",weight:Fs.chromecast,buttonComponent:jd,buttonComponentProps:{state:p(),click:vr},tooltipText:n(_n)}:void 0),rt=f(()=>[n(Un),n(Bo),n(or),n(ss),n(Cr),n(xs),n(Us),n(ua),...O()].filter(dt=>!!dt).sort(Oa)),si=Y.ui.previewTrackActive,Co=Y.ui.previewTrackDragInProgress,yi=Y.ui.previewTrackAvailable,yn=Y.ui.isPreviewTrackHorizontallyAligned,xn=f(()=>ob({onPreviewTrackOpened:Y.actions.internal.previewTrackOpened,getTimelineRef:()=>$t.timeline,isHorizontal:Ve()})),ws=f(()=>n(xn).progressBarY),Ss=f(()=>n(xn).controlsY),Ui=f(()=>n(xn).onPointerDown),Ci=f(()=>n(xn).onPointerMove),he=f(()=>n(xn).onPointerUp),gt=f(()=>n(xn).calculatedHeight),Jt=f(()=>n(xn).closePreviewTrack);De(()=>{ae()?ri.set(!1):n(Jt)()});let Qt;Vt(()=>()=>Qt&&clearTimeout(Qt));let To=dt=>{ae()||!Je()||(n(Ui)(dt),Qt=setTimeout(()=>{Y.actions.internal.previewTrackDragStarted()},200))},ro=()=>{ae()||n(he)(),Qt&&clearTimeout(Qt),Ee()&&Y.actions.internal.previewTrackDragFinished()},Ho=dt=>{n(Ci)(dt),!ae()&&Je()&&!ae()&&ri.set(!0)},Cs=()=>{ri.set(!1)};var Kr=rw(),Tr=ue(Kr);let pa;var zs=C(Tr);{var fa=dt=>{let it=f(()=>n(ws)()),ji=f(()=>n(gt)());Om(dt,{get animatedOffsetY(){return n(it)},get animatedPreviewTrackHeight(){return n(ji)},get canRewindLive(){return e.canRewindLive},get isAds(){return Tt()},onTimelineMove:Ho,onTimelinePointerDown:To,onTimelinePointerUp:ro,onTimelinePointerLeave:Cs,get previewTrackAvailable(){return Je()},get timelineRef(){return $t.timeline},set timelineRef(Io){$t.timeline=Io}})};V(zs,dt=>{e.showControls&&dt(fa)})}var qr=k(zs,2),wn=C(qr),tl=C(wn);_i(tl,17,()=>n($n),dt=>dt.id,(dt,it)=>{Xu(dt,{get buttonComponent(){return n(it).buttonComponent},get buttonComponentProps(){return n(it).buttonComponentProps},get tooltipText(){return n(it).tooltipText},get disabledTooltipContent(){return n(it).disabledTooltipContent},get disabled(){return n(it).disabled},get className(){return n(it).className},get tooltipEnabled(){return n(it).tooltipEnabled},get mouseEnter(){return n(it).mouseEnter},get mouseLeave(){return n(it).mouseLeave},get tooltipVisible(){return e.showControls},get ref(){return $t[n(it).id]},set ref(ji){$t[n(it).id]=ji}})});var ma=k(tl,2);{var Qr=dt=>{let it=f(()=>!e.showControls),ji=f(()=>Tt()?Te():He()),Io=f(()=>Tt()?Ct():xt());Kd(dt,{get isHidden(){return n(it)},isMobile:!1,get showDuration(){return n(No)},get position(){return n(ji)},get duration(){return n(Io)},get ref(){return $t.time},set ref(Xi){$t.time=Xi}})};V(ma,dt=>{n(ho)&&dt(Qr)})}var il=k(ma,2);let jl=f(()=>!n(vn));Ao(il,{className:"w-max",get disabled(){return n(jl)},get tooltipContent(){return Oo},get tooltipVisible(){return e.showControls},get ref(){return $t.episodes},set ref(dt){$t.episodes=dt},children:(dt,it)=>{var ji=Ae(),Io=ue(ji);{var Xi=vi=>{Xd(vi,{get position(){return He()},get duration(){return xt()},get timeCodes(){return mt}})};V(Io,vi=>{n(vn)&&vi(Xi)})}$(dt,ji)},$$slots:{default:!0}}),S(wn);var va=k(wn,2);_i(va,21,()=>n(rt),dt=>dt.id,(dt,it)=>{var ji=Ae(),Io=ue(ji);{var Xi=zi=>{Xu(zi,{get buttonComponent(){return n(it).buttonComponent},get buttonComponentProps(){return n(it).buttonComponentProps},get tooltipText(){return n(it).tooltipText},get disabledTooltipContent(){return n(it).disabledTooltipContent},get disabled(){return n(it).disabled},get className(){return n(it).className},get tooltipVisible(){return e.showControls},get ref(){return $t[n(it).id]},set ref(Ws){$t[n(it).id]=Ws}})},vi=zi=>{let Ws=f(()=>!!n(it).disabled);Em(zi,{get id(){return n(it).id},get testId(){return n(it).testId},get icon(){return n(it).icon},get ariaLabel(){return n(it).ariaLabel},get tooltipText(){return n(it).tooltipText},get disabledTooltipContent(){return n(it).disabledTooltipContent},get disabled(){return n(Ws)},get onClick(){return n(it).onClick},get disableMouseupTooltipShow(){return n(it).disableMouseupTooltipShow},get tooltipVisible(){return e.showControls},get ref(){return $t[n(it).id]},set ref(Zl){$t[n(it).id]=Zl}})};V(Io,zi=>{eb(n(it))?zi(Xi):zi(vi,!1)})}$(dt,ji)}),S(va),S(qr),je(qr,dt=>at(dt),()=>at()),S(Tr),je(Tr,dt=>At(dt),()=>At());var Xl=k(Tr,2);{var ol=dt=>{ec(dt,{get ref(){return $t.interactiveTimeIndicator},set ref(it){$t.interactiveTimeIndicator=it}})};V(Xl,dt=>{Rr&&dt(ol)})}D((dt,it)=>{pa=ne(Tr,1,"wrapper-bottom s-19",null,pa,dt),We(qr,it),qr.inert=ae()},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth||Ee()}),()=>`transform: translateY(${n(Ss)()}px);`]),Pn(wn,"clientWidth",dt=>R(lt,dt)),$(t,Kr),H(),o()}import{ChromecastState as lb,PlaybackState as db}from"@vkontakte/videoplayer-core/es2018";import{noop as ab}from"@vkontakte/videoplayer-shared/es2018";var aw=L('<div class="icon icon-error-stub s-21"><div class="inner s-21"></div></div>'),lw=L('<img class="icon s-21" aria-hidden="true"/>'),dw={hash:"s-21",code:".icon.s-21{height:24px!important;width:24px!important}.inner.s-21{background-color:var(--white);height:16px;width:16px}"};function Fm(t,e){G(t,dw);let i=h(e,"disabled",3,!1),o=h(e,"onClick",3,ab),r=f(()=>o()===ab),a=f(()=>n(r)||i()),l=q(!1),d=()=>{R(l,!0)},s=f(()=>n(r)?"btn-full-opacity":"");Ft(t,{get className(){return n(s)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return n(a)},get testId(){return e.testId},children:(u,m)=>{var p=Ae(),v=ue(p);{var _=b=>{var w=aw();$(b,w)},y=b=>{var w=lw();D(()=>Me(w,"src",e.iconUrl)),st("error",w,d),Pa(w),$(b,w)};V(v,b=>{n(l)?b(_):b(y,!1)})}$(u,p)},$$slots:{default:!0}})}var cw=Ie('<path d="M8.7 8.1 5.3 4.72A1 1 0 0 1 6.72 3.3L20.7 17.29a1 1 0 0 1-1.41 1.41L16 15.41V20a1 1 0 0 1-1 1c-.64 0-1.26-.25-1.72-.7L7.79 15H5a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2h2.77zm2.88-2.76 1.7-1.65A2.5 2.5 0 0 1 15 3a1 1 0 0 1 1 1v5.76z"></path>');function Um(t){Xe(t,{testId:"muted-icon",children:(e,i)=>{var o=cw();$(e,o)},$$slots:{default:!0}})}import{noop as uw}from"@vkontakte/videoplayer-shared/es2018";function Ju(t,e){B(e,!0);let i=h(e,"muted",3,!1),o=h(e,"click",3,uw),r=h(e,"ref",15,void 0),l=_e().ui.t,d=f(()=>i()?l("tooltip_volume"):l("tooltip_volume_muted")),s=f(()=>i()?"btn-mobile-muted":"btn-mobile-unmuted");Ft(t,{get testId(){return n(s)},get click(){return o()},get ariaLabel(){return n(d)},role:"button",get ref(){return r()},set ref(u){r(u)},children:(u,m)=>{var p=Ae(),v=ue(p);{var _=b=>{Um(b,{})},y=b=>{da(b,{get size(){return"24"}})};V(v,b=>{i()?b(_):b(y,!1)})}$(u,p)},$$slots:{default:!0}}),H()}var pw=Ie('<path d="M11.64 12.37 9.07 9.8h1.03a.9.9 0 1 0 0-1.8H6.9a.9.9 0 0 0-.9.9v3.2a.9.9 0 0 0 1.8 0v-1.02l2.53 2.52.13.14a.9.9 0 0 0 1.28-1.28z"></path>'),fw=Ie('<path d="m6.36 9.63 2.57 2.57H7.9a.9.9 0 1 0 0 1.8h3.2a.9.9 0 0 0 .9-.9V9.9a.9.9 0 0 0-1.8 0v1.02L7.67 8.4l-.13-.14a.9.9 0 0 0-1.28 1.28z"></path>'),mw=Ie('<path d="M7.66 4h6.68q1.2-.01 2 .04.83.06 1.53.38a4 4 0 0 1 1.7 1.7c.24.48.34.98.39 1.54q.05.8.04 2v1.44a.9.9 0 0 1-1.8 0V9.7c0-.85 0-1.44-.04-1.9-.03-.44-.1-.68-.19-.85a2 2 0 0 0-.92-.92 2 2 0 0 0-.85-.2c-.46-.03-1.04-.03-1.9-.03H7.7c-.85 0-1.44 0-1.9.04-.44.03-.68.1-.85.19a2 2 0 0 0-.92.92c-.09.17-.16.4-.2.85-.03.46-.03 1.05-.03 1.9v2.65c0 .85 0 1.44.04 1.9.03.44.1.68.19.85a2 2 0 0 0 .92.92c.17.08.4.15.85.19.46.03 1.04.04 1.9.04h2.4a.9.9 0 0 1 0 1.8H7.66q-1.2.01-2-.05a4 4 0 0 1-1.53-.38 4 4 0 0 1-1.7-1.7 4 4 0 0 1-.39-1.53q-.05-.8-.04-2V9.65q-.01-1.2.04-2c.05-.56.15-1.06.39-1.53a4 4 0 0 1 1.7-1.7c.47-.24.97-.34 1.53-.39q.8-.05 2-.04M13 16.8c0-.98 0-1.47.19-1.84a2 2 0 0 1 .77-.77c.37-.19.86-.19 1.84-.19h3.4c.98 0 1.47 0 1.85.19q.5.27.76.77c.19.37.19.86.19 1.84v.4c0 .98 0 1.47-.19 1.85a2 2 0 0 1-.77.76c-.37.19-.86.19-1.84.19h-3.4c-.98 0-1.47 0-1.85-.19a2 2 0 0 1-.76-.76c-.19-.38-.19-.87-.19-1.85z"></path><!>',1);function zm(t,e){let i=h(e,"isActive",3,!1),o=f(()=>i()?"pip-icon--active":"pip-icon");Xe(t,{get testId(){return n(o)},children:(r,a)=>{var l=mw(),d=k(ue(l));{var s=m=>{var p=pw();$(m,p)},u=m=>{var p=fw();$(m,p)};V(d,m=>{i()?m(s):m(u,!1)})}$(r,l)},$$slots:{default:!0}})}import{noop as vw}from"@vkontakte/videoplayer-shared/es2018";function Wm(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"isPictureInPictureActive",3,!1),r=h(e,"click",3,vw),a=j("menu_pip");Ft(t,{testId:"btn-pip",get ariaLabel(){return a},get click(){return r()},get ref(){return i()},set ref(l){i(l)},children:(l,d)=>{zm(l,{get isActive(){return o()}})},$$slots:{default:!0}}),H()}import{debounceFn as cb}from"@vkontakte/videoplayer-shared/es2018";var gw=(t,e,i,o)=>{n(e)&&i.onDisabledPlayPrevChapterClick(n(o))},hw=(t,e,i,o)=>{n(e)&&i.onDisabledSeekToInteractiveClick(n(o))},_w=L("<div><!></div>"),bw=L("<div><!></div>"),$w=L("<div><!></div>"),yw=L("<!> <!> <!>",1),xw=L("<div></div> <div></div> <div><!> <!> <!> <!> <!> <!></div> <div><!> <!> <!> <!></div> <!>",1),ww=L('<div class="wrapper-middle s-1b"><!></div>'),Sw=L("<div><!></div> <!> <div><!></div>",1),Cw=L('<div aria-hidden="true">·</div> <!>',1),Tw=L('<!> <!> <div><div><div class="controls mobile s-1b" data-testid="bottom-controls"><div class="controls-group contain s-1b"><!> <!> <!> <!></div> <div class="controls-group s-1b"><!> <!> <!></div></div> <!></div></div> <!>',1),Iw={hash:"s-1b",code:".wrapper-bottom.s-1b{background:var(--controls-gradient);bottom:0;box-sizing:border-box;display:flex;flex-direction:column;height:var(--controls-gradient-height);justify-content:flex-end;left:0;padding:0 4px 8px;pointer-events:none;position:absolute;transition:transform var(--controls-transition-duration) var(--controls-transition-fn);width:100%;z-index:var(--controls-container-z-index)}.wrapper-bottom.s-1b>:where(.s-1b){pointer-events:auto}.wrapper-bottom.ads-timeline-mobile.s-1b{height:9px;padding:0 4px 4px}.wrapper-middle.s-1b{align-items:center;left:50%;top:50%;transform:translate(-50%,-50%)}.wrapper-middle.s-1b,.wrapper-top-right.s-1b{display:flex;position:absolute;transition:opacity var(--controls-transition-duration);z-index:var(--controls-container-z-index)}.wrapper-top-right.s-1b{right:8px;top:4px}.wrapper-top-left.s-1b{left:8px;position:absolute;top:4px;z-index:var(--controls-container-z-index)}.wrapper-middle-left.s-1b,.wrapper-middle-left-second.s-1b,.wrapper-middle-right.s-1b{align-items:center;background-color:rgba(0,0,0,.56);border-radius:12px;display:flex;height:44px;justify-content:center;position:absolute;top:50%;transform:translateY(-50%);transition:opacity var(--controls-transition-duration);width:44px}.wrapper-middle-left.s-1b{left:12px}.wrapper-middle-left-second.s-1b{left:64px}.wrapper-middle-right.s-1b{right:12px}.controls.s-1b{align-items:center;box-sizing:border-box;font-size:13px;height:var(--controls-height);justify-content:space-between;padding:0 4px;transition:transform var(--controls-transition-duration) var(--controls-transition-fn);white-space:nowrap;width:100%;will-change:transform}.controls.s-1b,.controls-group.s-1b{display:flex}.controls-group.contain.s-1b{min-width:0}.controls-group.s-1b >:not(:first-child){margin-left:8px}.hidden.s-1b{opacity:0;visibility:hidden}.controls-hidden.s-1b{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-1b{transition:none}.overlay-mobile.s-1b{background-color:rgba(0,0,0,.3);height:100%;left:0;pointer-events:none;position:absolute;top:0;transition:opacity var(--controls-transition-duration);width:100%}@media screen and (orientation:portrait){.wrapper-top-left.fullscreen.s-1b,.wrapper-top-right.fullscreen.s-1b{top:16px}.controls-wrapper.fullscreen.s-1b{bottom:30px;position:absolute;width:calc(100% - 8px)}}@media screen and (orientation:landscape){.wrapper-top-left.fullscreen.s-1b{left:44px;top:12px}.wrapper-top-right.fullscreen.s-1b{right:44px;top:12px}.wrapper-middle-left.fullscreen.s-1b{left:44px}.wrapper-middle-left-second.fullscreen.s-1b{left:96px}.wrapper-middle-right.fullscreen.s-1b{right:44px}.controls-wrapper.fullscreen.s-1b{bottom:32px;left:36px;position:absolute;right:36px;width:calc(100% - 72px)}}"};function Km(t,e){var en,tn;B(e,!0),G(t,Iw);let[i,o]=Ne(),r=()=>x(Pi,"$seekToInteractiveDisabledTooltip$",i),a=()=>x(ei,"$disabledControls$",i),l=()=>x(It,"$playbackState$",i),d=()=>x(Go,"$adPlaybackState",i),s=()=>x(Y,"$isEnded$",i),u=()=>x(yt,"$playerSize",i),m=()=>x(Et,"$scrubbingInProgress",i),p=()=>x(Ri,"$chromecastState$",i),v=()=>x(Oe,"$isPictureInPictureActive",i),_=()=>x(ze,"$pictureInPictureType$",i),y=()=>x(fe,"$mobileNotReportControlHidden$",i),b=()=>x(hi,"$chromecastHidden",i),w=()=>x(at,"$playerPhase",i),I=()=>x(Lt,"$pipHidden",i),T=()=>x(Ge,"$currentGridType$",i),N=()=>x(di,"$vkLogoHidden",i),A=()=>x(ui,"$volumeHidden",i),E=()=>x(Pe,"$isLive$",i),P=()=>x(bt,"$settingsMenuVisible",i),Q=()=>x(nt,"$isRewindableLive$",i),F=()=>x(Le,"$isActiveLive$",i),z=()=>x(Dt,"$isAudioAvailable$",i),X=()=>x(ye,"$muted$",i),se=()=>x(le,"$volume$",i),Z=()=>x(pt,"$isInteractiveTime$",i),oe=()=>x(tr,"$settingButtonRef$",i),J=()=>x(mt,"$startedByKeyboard$",i),Ce=()=>x(Yo,"$isFullscreen",i),me=()=>x(Ot,"$additionalButtons$",i),ee=()=>x(Vi,"$autoplayNextToggleHidden",i),be=()=>x(bi,"$crashed$",i),we=()=>x(pi,"$settingsHidden",i),ge=()=>x(cn,"$graphIsOpened$",i),pe=()=>x(po,"$adPosition",i),Ke=()=>x(fi,"$adDuration",i),U=()=>x(jt,"$position$",i),O=()=>x(Tt,"$duration$",i),qe=h(e,"playerControlsWrapperRef",15,void 0),K=h(e,"playerControlsRef",15,void 0),ae=h(e,"isAds",3,!1),xe=h(e,"logoTargetUrl",3,""),Be=h(e,"isOneVideoPlaylist",3,!1),tt=h(e,"customFullscreenSupported",3,!0),re=_e(),ce=vo(),Re=Rt(),Ve=re.actions.internal.toggleMuted,Je=re.actions.internal.togglePlay,Ee=re.actions.internal.pause,Te=re.actions.internal.prevVideoClick,He=re.actions.internal.nextVideoClick,Ct=re.actions.internal.checkFullscreenSupport,xt=(en=re.callbacks)==null?void 0:en.onAudioDoesNotExistHint,At=(tn=re.callbacks)==null?void 0:tn.onAudioDisabledHint,at=re.playerPhase,Tt=re.state.duration$,jt=re.state.positionWithScrubbing$,It=re.state.playbackState$,Dt=re.state.isAudioAvailable$,Ut=re.state.isAudioDisabled,Y=re.state.isEnded$,Pe=re.state.isLive$,le=re.state.volume$,ye=re.state.muted$,Le=re.state.isActiveLive$,nt=re.state.isRewindableLive$,Et=re.ui.scrubbingInProgress,fe=re.ui.mobileNotReportControlHidden$,{isActive$:Oe,type$:ze}=ce.pictureInPicture$,bt=re.ui.settingsMenu.visible$,zt=re.ui.settingsMenu.openedByBtnKeyboard$,Pt=re.ui.controls,{volume:ui,vkLogo:di,autoplayNextToggle:Vi,pip:Lt,settings:pi,chromecast:hi}=re.ui.hiddenControls,ut=re.actions.internal.getVideoEpisodes(),Gt=re.webApi.pictureInPictureApi,Ri=re.state.chromecastState$,bi=re.state.crashed$,ei=Pt.disabledControls$,mt=re.ui.startedByKeyboard$,Ge=re.ui.currentGridType$,fi=re.ads.duration,po=re.ads.position,Go=re.ads.playbackState,Yo=re.ui.isFullscreen,yt=re.ui.playerSize,Ot=re.ui.additionalButtonsDeprecated$,W=re.actions.internal.getVideoElement,Mt=re.actions.internal.replayInteractive,ri=re.state.isInteractive,pt=re.state.isInteractiveTime$,Xt=re.state.showInteractiveGraph,vt=re.state.showSeekToInteractive,ot=re.state.showPlayPrevChapter,Ni=re.state.showInteractiveTimeIndicator,Pi=ce.seekToInteractiveDisabledTooltip$,cn=ce.graphIsOpened$,un=re.ui.controlBlocks,ki=f(()=>j(re.state.playPrevChapterDisabledTooltip)),Di=f(()=>j(r())),Mn=f(()=>a().has("EPISODE_BUTTON")),go=f(()=>a().has("GRAPH_BUTTON")),io=f(()=>a().has("SEEK_TO_INTERACTIVE_BUTTON")),Ti=f(()=>a().has("PLAY_BUTTON")),Lo=f(()=>a().has("REPLAY_BUTTON")),Mo=f(()=>a().has("PLAY_PREV_CHAPTER_BUTTON")),pn=f(()=>l()===db.PLAYING),Vr=f(()=>d()==="paused"),Rr=f(()=>s()&&!ae()&&!ri),Nr=f(()=>!s()||ae()),bs=f(()=>e.showNextPrevButtons&&!ae()&&e.prevButtonActive),Dr=f(()=>e.showNextPrevButtons&&!ae()&&e.nextButtonActive),Zn=f(()=>u().width>300),Or=f(()=>u().width>400),fn=f(m),mn=f(()=>p()!==lb.NOT_AVAILABLE&&!(v()&&_()===1)&&!y()&&!ri&&!b()),fr=f(()=>w()==="LiveWaitingStart"),mr=f(()=>!!Gt&&p()!==lb.CONNECTED&&!y()&&(_()===1&&n(fr)||!n(fr))&&!n(fn)&&!ri&&!I()),jo=q(!1);Vt(()=>{let Fe=Gt==null?void 0:Gt.info.isActive$.subscribe(wt=>R(jo,wt,!0));return()=>Fe==null?void 0:Fe.unsubscribe()});let vr=f(()=>!n(fn)&&eo(T(),"s")),gr=f(()=>!e.logoHidden&&u().width>350&&!N()),Jn=f(()=>Re.features.fullscreen&&Ct()&&!(v()&&_()===1)&&(ri?tt():!0)&&!n(fn)&&!n(jo)),Vn=f(()=>!A()&&!n(fn)),ns=f(()=>(!E()||ae())&&u().width>260&&!n(fn)&&!(Re.features.interactiveHideTime&&ri)),Vo=f(()=>P()||e.showControls),hr=f(()=>!ae()&&!E()&&!!(ut!=null&&ut.length)&&n(Zn)&&!n(Mn)&&!n(fn)),Oi=f(()=>!Q()||!!F()),_r=f(()=>Xt&&eo(T(),"m")),Rn=f(()=>!z()||X()||se()===0),ct=ai({}),Zt=ai({}),br=cb(Wl,260),Br=cb(Zu,260);De(()=>{u(),Z(),br(W(),Pt,ct,e.showControls),Br(W(),un,Zt,e.showControls)});let Hr=()=>re.actions.internal.toggleChromecast();async function Nn(){Gt!=null&&Gt.isActive()?await(Gt==null?void 0:Gt.exit()):await(Gt==null?void 0:Gt.request())}function er(){aa({isAudioDisabled:Ut,audioDisabledHintCallback:At,isAudioAvailable:z(),audioIsNotExistHintCallback:xt,isAds:ae()})&&Ve()}let ho=q(""),Dn=(Fe,wt)=>{if(!Fe){R(ho,j("tooltip_live"),!0);return}wt&&wt===db.PAUSED&&R(ho,j("tooltip_play"),!0)};De(()=>{Dn(n(Oi),l())});let tr=de();De(()=>{oe()&&Vl(oe(),P(),zt)}),De(()=>{ju(mt,J(),ct.playButton)});var On=Tw(),vn=ue(On);{var gn=Fe=>{var wt=xw(),ci=ue(wt);let No;var yo=k(ci,2);let Do;je(yo,rt=>Zt.topLeft=rt,()=>Zt==null?void 0:Zt.topLeft);var Fi=k(yo,2);let xo;var Bn=C(Fi);_i(Bn,1,me,({iconUrl:rt,ariaLabel:si,testId:Co,onClick:yi,tooltip:yn})=>rt,(rt,si)=>{let Co=()=>n(si).iconUrl,yi=()=>n(si).ariaLabel,yn=()=>n(si).testId,xn=()=>n(si).onClick,ws=()=>n(si).tooltip,Ss=f(()=>{var Ui;return(Ui=yi())!=null?Ui:ws()});Fm(rt,{get iconUrl(){return Co()},get ariaLabel(){return n(Ss)},get testId(){return yn()},get onClick(){return xn()}})});var Sr=k(Bn,2);{var wo=rt=>{oc(rt,{get ref(){return ct.autoplayNextToggle},set ref(si){ct.autoplayNextToggle=si}})};V(Sr,rt=>{e.showAutoplayNext&&!Be()&&!ee()&&rt(wo)})}var no=k(Sr,2);{var bn=rt=>{jd(rt,{isMobile:!0,click:Hr,get state(){return p()},get ref(){return ct.chromecast},set ref(si){ct.chromecast=si}})};V(no,rt=>{n(mn)&&rt(bn)})}var Oo=k(no,2);{var Hn=rt=>{Wm(rt,{click:Nn,get isPictureInPictureActive(){return v()},get ref(){return ct.pip},set ref(si){ct.pip=si}})};V(Oo,rt=>{n(mr)&&rt(Hn)})}var zr=k(Oo,2);{var Wr=rt=>{Ol(rt,{get ref$(){return tr}})};V(zr,rt=>{be()&&!we()&&rt(Wr)})}var Fn=k(zr,2);{var Ze=rt=>{Gd(rt,{get click(){return Ee},get targetUrl(){return xe()},get logoClickable(){return e.logoClickable},get ref(){return ct.vkLogo},set ref(si){ct.vkLogo=si}})};V(Fn,rt=>{n(gr)&&rt(Ze)})}S(Fi),je(Fi,rt=>Zt.topRight=rt,()=>Zt==null?void 0:Zt.topRight);var Yt=k(Fi,2);let $i;var So=C(Yt);{var $n=rt=>{let si=f(()=>Te.bind(null,!0));Wa(rt,{get click(){return n(si)},type:"prev",isMobile:!0,get ref(){return ct.prevButton},set ref(Co){ct.prevButton=Co}})};V(So,rt=>{n(bs)&&rt($n)})}var Un=k(So,2);{var Bo=rt=>{ql(rt,{get disabled(){return n(Ti)},get click(){return Je},isMobile:!0,get isPlaying(){return n(pn)},get ref(){return ct.playButton},set ref(si){ct.playButton=si}})};V(Un,rt=>{n(Nr)&&rt(Bo)})}var or=k(Un,2);{var ss=rt=>{Kl(rt,{get disabled(){return n(Lo)},get click(){return Je},isMobile:!0,get ref(){return ct.replayButton},set ref(si){ct.replayButton=si}})};V(or,rt=>{n(Rr)&&rt(ss)})}var Cr=k(or,2);{var xs=rt=>{let si=f(()=>He.bind(null,!0));Wa(rt,{get click(){return n(si)},type:"next",isMobile:!0,get ref(){return ct.nextButton},set ref(Co){ct.nextButton=Co}})};V(Cr,rt=>{n(Dr)&&rt(xs)})}S(Yt),je(Yt,rt=>Zt.middle=rt,()=>Zt==null?void 0:Zt.middle);var Us=k(Yt,2);{var ua=rt=>{var si=yw(),Co=ue(si);{var yi=Ui=>{var Ci=_w();let he;Ci.__click=[gw,Mo,e,ki];var gt=C(Ci);let Jt=f(()=>!e.showControls);ic(gt,{get hidden(){return n(Jt)},get disabled(){return n(Mo)},get click(){return e.playPrevChapter},get ref(){return ct.playPrevChapterButton},set ref(Qt){ct.playPrevChapterButton=Qt}}),S(Ci),D(Qt=>he=ne(Ci,1,"wrapper-middle-left s-1b",null,he,Qt),[()=>({fullscreen:Ce(),hidden:!e.showControls})]),$(Ui,Ci)};V(Co,Ui=>{ot&&Ui(yi)})}var yn=k(Co,2);{var xn=Ui=>{var Ci=bw();let he;var gt=C(Ci);let Jt=f(()=>!e.showControls&&!ge());rc(gt,{get hidden(){return n(Jt)},get disabled(){return n(go)},get click(){return cn.toggle},get graphIsOpened(){return ge()},get ref(){return ct.interactiveGraphButton},set ref(Qt){ct.interactiveGraphButton=Qt}}),S(Ci),D(Qt=>he=ne(Ci,1,yd(ot?"wrapper-middle-left-second":"wrapper-middle-left"),"s-1b",he,Qt),[()=>({fullscreen:Ce(),hidden:!e.showControls&&!ge()})]),$(Ui,Ci)};V(yn,Ui=>{n(_r)&&Ui(xn)})}var ws=k(yn,2);{var Ss=Ui=>{var Ci=$w();let he;Ci.__click=[hw,io,e,Di];var gt=C(Ci);let Jt=f(()=>!e.showControls);nc(gt,{get hidden(){return n(Jt)},get disabled(){return n(io)},get click(){return e.seekToInteractive},get ref(){return ct.seekToInteractiveButton},set ref(Qt){ct.seekToInteractiveButton=Qt}}),S(Ci),D(Qt=>he=ne(Ci,1,"wrapper-middle-right s-1b",null,he,Qt),[()=>({fullscreen:Ce(),hidden:!e.showControls})]),$(Ui,Ci)};V(ws,Ui=>{vt&&Ui(Ss)})}$(rt,si)};V(Us,rt=>{ri&&!m()&&rt(ua)})}D((rt,si,Co,yi)=>{No=ne(ci,1,"overlay-mobile s-1b",null,No,rt),Do=ne(yo,1,"wrapper-top-left s-1b",null,Do,si),xo=ne(Fi,1,"wrapper-top-right s-1b",null,xo,Co),$i=ne(Yt,1,"wrapper-middle s-1b",null,$i,yi)},[()=>({hidden:!n(Vo)}),()=>({hidden:!e.showControls,fullscreen:Ce()}),()=>({hidden:!e.showControls&&!y(),fullscreen:Ce()}),()=>({hidden:!e.showControls||m()||e.endScreenShown&&e.showNextPrevButtons})]),$(Fe,wt)};V(vn,Fe=>{ae()||Fe(gn)})}var hn=k(vn,2);{var Xo=Fe=>{var wt=Sw(),ci=ue(wt);let No;var yo=C(ci);Ju(yo,{get muted(){return X()},click:er,get ref(){return ct.volume},set ref(wo){ct.volume=wo}}),S(ci);var Do=k(ci,2);{var Fi=wo=>{var no=ww(),bn=C(no);let Oo=f(()=>!n(Vr));ql(bn,{get disabled(){return n(Ti)},get click(){return Je},isMobile:!0,get isPlaying(){return n(Oo)},get ref(){return ct.playButton},set ref(Hn){ct.playButton=Hn}}),S(no),$(wo,no)};V(Do,wo=>{n(Vr)&&wo(Fi)})}var xo=k(Do,2);let Bn;var Sr=C(xo);ac(Sr,{get position(){return pe()},get duration(){return Ke()}}),S(xo),D((wo,no)=>{No=ne(ci,1,"wrapper-top-right s-1b",null,No,wo),Bn=ne(xo,1,"wrapper-bottom ads-timeline-mobile s-1b",null,Bn,no)},[()=>({fullscreen:Ce()}),()=>({fullscreen:Ce()})]),$(Fe,wt)};V(hn,Fe=>{ae()&&d()!=="inactive"&&Fe(Xo)})}var Bi=k(hn,2);let Yi;var Zo=C(Bi);let ir;var $r=C(Zo),_n=C($r),yr=C(_n);{var lt=Fe=>{Ao(Fe,{get disabled(){return n(Lo)},get ref(){return ct.replayButton},set ref(wt){ct.replayButton=wt},children:(wt,ci)=>{Kl(wt,{get disabled(){return n(Lo)},get click(){return Mt}})},$$slots:{default:!0}})};V(yr,Fe=>{ri&&Fe(lt)})}var $t=k(yr,2);{var oo=Fe=>{Ao(Fe,{get ref(){return ct.liveButton},set ref(wt){ct.liveButton=wt},children:(wt,ci)=>{sc(wt,{get isLiveActive(){return n(Oi)},isMobile:!0,get ariaLabel(){return n(ho)}})},$$slots:{default:!0}})};V($t,Fe=>{!ae()&&E()&&Fe(oo)})}var fo=k($t,2);{var Jo=Fe=>{let wt=f(()=>ae()?pe():U()),ci=f(()=>ae()?Ke():O()),No=f(()=>!e.showControls);Kd(Fe,{get showDuration(){return n(Or)},get position(){return n(wt)},get duration(){return n(ci)},isMobile:!0,get isHidden(){return n(No)},get ref(){return ct.time},set ref(yo){ct.time=yo}})};V(fo,Fe=>{n(ns)&&Fe(Jo)})}var _o=k(fo,2);let bo=f(()=>!n(hr));Ao(_o,{className:"w-max",get disabled(){return n(bo)},get ref(){return ct.episodes},set ref(Fe){ct.episodes=Fe},children:(Fe,wt)=>{var ci=Ae(),No=ue(ci);{var yo=Do=>{var Fi=Cw(),xo=k(ue(Fi),2);Xd(xo,{get position(){return U()},get duration(){return O()},get timeCodes(){return ut}}),$(Do,Fi)};V(No,Do=>{n(hr)&&Do(yo)})}$(Fe,ci)},$$slots:{default:!0}}),S(_n),je(_n,Fe=>Zt.bottomLeft=Fe,()=>Zt==null?void 0:Zt.bottomLeft);var Ii=k(_n,2),$o=C(Ii);{var Fr=Fe=>{Ao(Fe,{get ref(){return ct.volume},set ref(wt){ct.volume=wt},children:(wt,ci)=>{Ju(wt,{get muted(){return n(Rn)},click:er})},$$slots:{default:!0}})};V($o,Fe=>{n(Vn)&&Fe(Fr)})}var xr=k($o,2);{var $s=Fe=>{Ao(Fe,{get ref(){return ct.settings},set ref(wt){ct.settings=wt},children:(wt,ci)=>{Ol(wt,{get ref$(){return tr}})},$$slots:{default:!0}})};V(xr,Fe=>{n(vr)&&Fe($s)})}var Hi=k(xr,2);{var ys=Fe=>{Ao(Fe,{get ref(){return ct.fullscreen},set ref(wt){ct.fullscreen=wt},children:(wt,ci)=>{Qd(wt,{get click(){return e.toggleFullscreen},get isFullscreen(){return Ce()}})},$$slots:{default:!0}})};V(Hi,Fe=>{n(Jn)&&Fe(ys)})}S(Ii),je(Ii,Fe=>Zt.bottomRight=Fe,()=>Zt==null?void 0:Zt.bottomRight),S($r),je($r,Fe=>K(Fe),()=>K());var rs=k($r,2);let wr=f(()=>!e.showControls);qa(rs,{get isHidden(){return n(wr)},get isAds(){return ae()},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return Q()},get ref(){return ct.timeline},set ref(Fe){ct.timeline=Fe}}),S(Zo),je(Zo,Fe=>Zt.bottom=Fe,()=>Zt==null?void 0:Zt.bottom),S(Bi),je(Bi,Fe=>qe(Fe),()=>qe());var Ro=k(Bi,2);{var Ur=Fe=>{ec(Fe,{get ref(){return ct.interactiveTimeIndicator},set ref(wt){ct.interactiveTimeIndicator=wt}})};V(Ro,Fe=>{Ni&&Fe(Ur)})}D((Fe,wt)=>{Yi=ne(Bi,1,"wrapper-bottom mobile s-1b",null,Yi,Fe),ir=ne(Zo,1,"controls-wrapper s-1b",null,ir,wt)},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth}),()=>({fullscreen:Ce()})]),$(t,On),H(),o()}Qe(["click"]);function lc(t,e){B(e,!0);let[i,o]=Ne(),r=()=>x(I,"$isMobile",i),a=h(e,"bottomNoSmooth",3,!1),l=h(e,"playerControlsWrapperRef",15,void 0),d=h(e,"playerControlsRef",15,void 0),s=h(e,"isAds",3,!1),u=h(e,"logoTargetUrl",3,""),m=h(e,"showAutoplayNext",3,!1),p=h(e,"isOneVideoPlaylist",3,!1),v=h(e,"customFullscreenSupported",3,!0),_=h(e,"endScreenShown",3,!1),y=h(e,"onDisabledPlayPrevChapterClick",3,ub),b=h(e,"onDisabledSeekToInteractiveClick",3,ub),I=_e().ui.isMobile,T=q(!1);Vt(()=>{let P=setTimeout(()=>R(T,!0),0);return()=>clearTimeout(P)});var N=Ae(),A=ue(N);{var E=P=>{var Q=Ae(),F=ue(Q);{var z=se=>{Km(se,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return s()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return u()},get showAutoplayNext(){return m()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get isOneVideoPlaylist(){return p()},get customFullscreenSupported(){return v()},get endScreenShown(){return _()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get onDisabledPlayPrevChapterClick(){return y()},get onDisabledSeekToInteractiveClick(){return b()},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(Z){l(Z)},get playerControlsRef(){return d()},set playerControlsRef(Z){d(Z)}})},X=se=>{Hm(se,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return s()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return u()},get isOneVideoPlaylist(){return p()},get showAutoplayNext(){return m()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get customFullscreenSupported(){return v()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(Z){l(Z)},get playerControlsRef(){return d()},set playerControlsRef(Z){d(Z)}})};V(F,se=>{r()?se(z):se(X,!1)})}$(P,Q)};V(A,P=>{n(T)&&P(E)})}$(t,N),H(),o()}var Ew=Ie('<path d="M23.75 31.2v-5.45l-11.84 6.7a1.45 1.45 180 01-2.16-1.25v-14.4a1.45 1.45 180 012.16-1.26l11.84 6.7v-5.44a1.45 1.45 180 012.16-1.26l12.7 7.19a1.45 1.45 180 010 2.52l-12.7 7.2a1.45 1.45 180 01-2.16-1.27Z"></path>');function dc(t,e){B(e,!0);let i=f(()=>e.reversed?"transform:scaleX(-1);transform-origin:50% 0;":""),o=f(()=>`${an(e.size)}${n(i)}`);Xe(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(o)},get testId(){return e.testId},get shadow(){return e.shadow},children:(r,a)=>{var l=Ew();$(r,l)},$$slots:{default:!0}}),H()}var Pw=Ie('<path d="M32.46 9.53a1.16 1.16 90 010 1.96l-7.66 4.83c-.78.49-1.8-.07-1.8-.98v-3.3a14 14 90 1014.1 18.93 1.5 1.5 90 012.8 1.06 17 17 90 11-16.9-23V5.66c0-.91 1.03-1.47 1.8-.98z"></path>');function qm(t,e){B(e,!0);let i=h(e,"reversed",3,!1),o=f(()=>i()?"transform:scaleX(-1);transform-origin: 50% 0;":void 0),r=f(()=>`seek-icon-${i()?"backward":"forward"}`);Xe(t,{get width(){return"48"},get height(){return"48"},get style(){return n(o)},get testId(){return n(r)},get shadow(){return e.shadow},children:(a,l)=>{var d=Pw();$(a,d)},$$slots:{default:!0}}),H()}var kw=L('<span class="hot-key-helpers-text s-10"> </span>'),Aw=L('<div data-testid="hotkey-helper-icon" class="s-10"><!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <!>',1),Lw=L("<div><!></div>"),Mw={hash:"s-10",code:'.hot-key-helpers-container.s-10{align-items:center;animation:s-10-fadeIn ease var(--controls-transition-duration);box-sizing:border-box;display:flex;flex-direction:column;height:120px;left:calc(50% - 100px);padding-top:14px;position:absolute;top:calc(50% - 40px);width:200px;z-index:var(--hot-key-helpers-container-z-index)}.hot-key-helpers-container--left.s-10{left:calc(25% - 100px)}.hot-key-helpers-container--right.s-10{left:calc(75% - 100px)}.hot-key-helpers-text.s-10{display:-webkit-box;font-feature-settings:"clig" off,"liga" off;font-size:15px;font-style:normal;font-weight:600;letter-spacing:-.105px;-webkit-line-clamp:2;line-height:20px;margin-top:4px;max-height:40px;overflow:hidden;text-align:center;text-overflow:ellipsis;text-shadow:0 0 5px rgba(0,0,0,.16);white-space:pre-wrap;width:100%;-webkit-box-orient:vertical}.hidden.s-10{animation:s-10-fadeOut ease var(--controls-transition-duration);height:0;visibility:hidden;width:0}@keyframes s-10-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes s-10-fadeOut{0%{opacity:1}to{opacity:0}}'};function Qm(t,e){B(e,!0),G(t,Mw);let[i,o]=Ne(),r=()=>x(e.data,"$data",i),a=_e(),{features:l}=Rt(),d=a.ui.t,s=f(()=>!r()),u=f(()=>{var I;return((I=r())==null?void 0:I.type)==="BACKWARD_SEEK"}),m=f(()=>{var I;return((I=r())==null?void 0:I.type)==="FORWARD_SEEK"}),p=f(()=>{var I;return(I=r())==null?void 0:I.type}),v=f(()=>{var I,T;return(I=r())!=null&&I.t?d(r().t.key,{value:r().t.value||""}):(T=r())==null?void 0:T.text});var _=Lw();let y;var b=C(_);{var w=I=>{var T=Aw(),N=ue(T),A=C(N);{var E=K=>{let ae=f(()=>n(p)==="BACKWARD_SEEK");qm(K,{get reversed(){return n(ae)},shadow:!0})};V(A,K=>{["BACKWARD_SEEK","FORWARD_SEEK"].includes(n(p))&&K(E)})}var P=k(A,2);{var Q=K=>{Hs(K,{get size(){return"48"},shadow:!0})};V(P,K=>{n(p)==="PAUSE"&&!l.playbackStatusShow&&K(Q)})}var F=k(P,2);{var z=K=>{An(K,{get size(){return"48"},shadow:!0})};V(F,K=>{n(p)==="PLAY"&&!l.playbackStatusShow&&K(z)})}var X=k(F,2);{var se=K=>{tc(K,{get size(){return"48"},shadow:!0})};V(X,K=>{n(p)==="REPLAY"&&!l.playbackStatusShow&&K(se)})}var Z=k(X,2);{var oe=K=>{la(K,{get size(){return"48"},type:"off",shadow:!0})};V(Z,K=>{n(p)==="SUBTITLES_OFF"&&K(oe)})}var J=k(Z,2);{var Ce=K=>{la(K,{get size(){return"48"},shadow:!0})};V(J,K=>{n(p)==="SUBTITLES_ON"&&K(Ce)})}var me=k(J,2);{var ee=K=>{let ae=f(()=>n(p)==="RATE_DOWN");dc(K,{get size(){return"48"},get reversed(){return n(ae)},testId:"rate-change-icon",shadow:!0})};V(me,K=>{["RATE_DOWN","RATE_UP"].includes(n(p))&&K(ee)})}var be=k(me,2);{var we=K=>{let ae=f(()=>n(p)==="EPISODE_PREV");ca(K,{get size(){return"48"},get reversed(){return n(ae)},shadow:!0})};V(be,K=>{["EPISODE_PREV","EPISODE_NEXT"].includes(n(p))&&K(we)})}var ge=k(be,2);{var pe=K=>{da(K,{get size(){return"48"},volume:0,shadow:!0})};V(ge,K=>{n(p)==="MUTE"&&K(pe)})}var Ke=k(ge,2);{var U=K=>{da(K,{get size(){return"48"},volume:1,shadow:!0})};V(Ke,K=>{n(p)==="VOLUME"&&K(U)})}S(N);var O=k(N,2);{var qe=K=>{var ae=kw(),xe=C(ae,!0);S(ae),D(()=>ve(xe,n(v))),$(K,ae)};V(O,K=>{n(v)&&K(qe)})}D(()=>Me(N,"data-type",n(p))),$(I,T)};V(b,I=>{!n(s)&&n(p)&&I(w)})}S(_),D(I=>y=ne(_,1,"hot-key-helpers-container s-10",null,y,I),[()=>({hidden:n(s),"hot-key-helpers-container--left":n(u),"hot-key-helpers-container--right":n(m)})]),$(t,_),H(),o()}var Vw=(t,e,i,o,r,a)=>{if(e.has(t.code))switch(t.preventDefault(),t.stopPropagation(),t.code){case"ArrowUp":i();break;case"ArrowDown":o();break;case"ArrowLeft":r();break;case"ArrowRight":a();break}},Rw=(t,e,i)=>{e.has(t.code)&&(t.preventDefault(),t.stopPropagation(),i())},Nw=L('<div tabindex="0" role="button"><div class="button-block s-q" aria-hidden="true"><div class="button-row s-q"><div class="button button-up s-q"><!></div> <div class="button button-right s-q"><!></div></div> <div class="button-row s-q"><div class="button button-left s-q"><!></div> <div class="button button-down s-q"><!></div></div></div></div>'),Dw={hash:"s-q",code:".immersive-controls.s-q{background-color:rgba(0,0,0,.56);border-radius:8px;display:flex;flex-direction:row;height:56px;left:10px;position:absolute;top:10px;transition-duration:var(--controls-transition-duration);transition-property:top,left;transition-timing-function:var(--controls-transition-fn);width:56px}.immersive-controls.m-shifted.s-q{left:20px;top:50px}.button-block.s-q{height:40px;margin:auto;transform:rotate(45deg);width:40px}.button-row.s-q{display:flex;flex-direction:row;position:relative}.button.s-q{cursor:pointer;height:20px;text-align:center;width:20px}.button.s-q svg{opacity:.7;transition:opacity .2s linear}.button.button-up.s-q svg{transform:rotate(-45deg) translate(-1px,-1px)}.button.button-right.s-q svg{transform:rotate(45deg) translate(1px,-1px)}.button.button-down.s-q svg{transform:rotate(135deg) translate(1px,-3px)}.button.button-left.s-q svg{transform:rotate(-135deg) translate(-1px,-3px)}.button.s-q:hover svg{opacity:1}"};function cc(t,e){B(e,!0),G(t,Dw);let i=h(e,"isShifted",3,!1),o=_e(),r=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]),a=()=>{o.actions.internal.startCameraManualRotation(0,1)},l=()=>{o.actions.internal.startCameraManualRotation(0,-1)},d=()=>{o.actions.internal.startCameraManualRotation(1,0)},s=()=>{o.actions.internal.startCameraManualRotation(-1,0)},u=()=>(o.actions.internal.stopCameraManualRotation(),null),m=j("aria_label_spherical_control");var p=Nw();let v;p.__keydown=[Vw,r,a,l,s,d],p.__keyup=[Rw,r,u];var _=C(p),y=C(_),b=C(y);b.__mousedown=a,b.__mouseup=u;var w=C(b);Lr(w,{direction:"up",useBtnColor:!0}),S(b);var I=k(b,2);I.__mousedown=d,I.__mouseup=u;var T=C(I);Lr(T,{direction:"up",useBtnColor:!0}),S(I),S(y);var N=k(y,2),A=C(N);A.__mousedown=s,A.__mouseup=u;var E=C(A);Lr(E,{direction:"up",useBtnColor:!0}),S(A);var P=k(A,2);P.__mousedown=l,P.__mouseup=u;var Q=C(P);Lr(Q,{direction:"up",useBtnColor:!0}),S(P),S(N),S(_),S(p),D(F=>{v=ne(p,1,"immersive-controls s-q",null,v,F),Me(p,"aria-label",m)},[()=>({"m-shifted":i()})]),st("mouseleave",b,u),st("mouseleave",I,u),st("mouseleave",A,u),st("mouseleave",P,u),$(t,p),H()}Qe(["keydown","keyup","mousedown","mouseup"]);import{ValueSubject as fb,Subscription as Ow,filterChanged as Bw,filter as Hw}from"@vkontakte/videoplayer-shared/es2018";var pb=(t=1e3)=>{let e=null,i=()=>{e&&(clearTimeout(e),e=null)};return{add:o=>{i(),e=setTimeout(o,t)},clear:i}};var ep=class{constructor(){this.flickeringTimeout=pb(1e3);this.subscriptions=new Ow;this.isAuto=!1;this.isLive=!1;this.captions$=new fb([]);this.captionsPrepared$=new fb([])}subscribe(){return this.subscriptions.add(this.captions$.pipe(Hw(()=>this.isEnabled()),Bw()).subscribe(e=>{this.processCaptions(e)})),this}setIsAuto(e){this.isAuto=e}setIsLive(e){this.isLive=e}setCaptions(e){this.captions$.next(e)}destroy(){this.subscriptions.unsubscribe(),this.flickeringTimeout.clear()}isEnabled(){return this.isAuto&&!this.isLive}processCaptions(e){if(!e.length){this.flickeringTimeout.add(()=>{this.captionsPrepared$.next([])});return}this.flickeringTimeout.clear();let i=[],o=e.length>1&&e[0].type!=="timestamp"&&e[1].type!=="timestamp";o&&i.push([{value:String(e[0].value),timeAppeared:null}]),i.push(e.reduce((r,{type:a,value:l},d)=>(o&&!d||(a==="timestamp"?r.push({timeAppeared:Number(l),value:""}):r.length===0?r.push({value:String(l)}):r[r.length-1].value=String(l)),r),[])),this.captionsPrepared$.next(i)}};var Fw=L('<span class="caption-line s-a"><span class="caption-segment s-a"> </span></span>'),Uw=L('<span class="caption-line s-a"><span class="caption-segment s-a"></span></span>'),zw=L('<span class="caption-line s-a"><span class="caption-segment s-a"> </span></span>'),Ww=L('<div><span class="caption s-a"><!></span></div>'),Kw=L("<div><!></div>"),qw={hash:"s-a",code:".subtitles-container.s-a{height:100%;left:0;pointer-events:none;position:absolute;top:0;transition:transform var(--controls-transition-duration);width:100%}.subtitles-container.shifted.s-a{transform:translateY(calc(var(--controls-height)*-1))}.subtitles-container.preview-track-active.s-a{transform:translateY(calc(var(--preview-track-height)*-1))}.preview-track-active.s-a .subtitles-caption:where(.s-a){bottom:var(--preview-track-controls-top-offset)}.subtitles-caption.s-a{bottom:4%;display:flex;justify-content:center;left:4%;position:absolute;right:4%}.subtitles-caption.mobile.s-a{bottom:8%}.subtitles-container.auto.s-a .subtitles-caption:where(.s-a){left:var(--subtitles-caption-margin);right:var(--subtitles-caption-margin)}.caption.s-a{background:rgba(0,0,0,.4);border-radius:4px;display:block;overflow-wrap:normal;padding:4px 8px}.subtitles-container.auto.s-a .caption:where(.s-a){width:100%}.caption-line.s-a{display:block;text-align:center}.subtitles-container.auto.s-a .caption-line:where(.s-a){text-align:left}.caption-segment.s-a{color:var(--white);display:inline-block;font-size:13px;line-height:1.2;white-space:pre-wrap}"};function Ga(t,e){B(e,!0),G(t,qw);let[i,o]=Ne(),r=()=>x(v,"$currentSubtitle$",i),a=()=>x(y,"$isLive$",i),l=()=>x(b,"$isFullscreen",i),d=()=>x(w,"$previewTrackActive",i),s=()=>x(_,"$isAutoSubtitleCaptionVisible$",i),u=h(e,"isMobile",3,!1),m=_e(),p=Rt(),v=m.state.currentSubtitle$,_=m.state.isAutoSubtitleCaptionVisible$,y=m.state.isLive$,b=m.ui.isFullscreen,w=m.ui.previewTrackActive,I=f(()=>!!r().isAuto),T=f(()=>!!a()),N=f(()=>e.playerSize.width*.02),A=f(()=>u()&&!l()||n(N)<=p.minSubtitlesFontSize?p.minSubtitlesFontSize:n(N)),E=q(null);De(()=>{var Z,oe,J;(Z=n(E))==null||Z.setIsAuto(n(I)),(oe=n(E))==null||oe.setIsLive(n(T)),(J=n(E))==null||J.setCaptions(e.captions)});let P=q(ai([[]]));Vt(()=>{R(E,new ep().subscribe(),!0);let Z=n(E).captionsPrepared$.subscribe(oe=>{R(P,oe,!0)});return()=>{var oe;(oe=n(E))==null||oe.destroy(),Z.unsubscribe()}}),Vt(()=>{if(n(I)){let Z=window.setTimeout(()=>{_.set(!1)},p.autoSubtitlesTimeout);return()=>{window.clearTimeout(Z)}}else _.set(!1)});let Q=f(()=>e.playerSize.width<400?10:e.playerSize.width<550?14:24);var F=Kw();let z;var X=C(F);{var se=Z=>{var oe=Ww();let J;var Ce=C(oe),me=C(Ce);{var ee=we=>{var ge=Fw(),pe=C(ge),Ke=C(pe,!0);S(pe),S(ge),D(U=>{var O;We(pe,`font-size: ${(O=n(A))!=null?O:""}px`),ve(Ke,U)},[()=>j("subtitles_auto_caption")]),$(we,ge)},be=(we,ge)=>{{var pe=U=>{var O=Ae(),qe=ue(O);_i(qe,17,()=>n(P),bd,(K,ae)=>{var xe=Uw(),Be=C(xe);_i(Be,21,()=>n(ae),({value:tt,timeAppeared:re})=>re,(tt,re)=>{let ce=()=>n(re).value,Re=()=>n(re).timeAppeared;var Ve=Ae(),Je=ue(Ve);{var Ee=Te=>{var He=ps();D(()=>ve(He,ce())),$(Te,He)};V(Je,Te=>{(!Re()||Re()<=e.position)&&Te(Ee)})}$(tt,Ve)}),S(Be),S(xe),D(()=>{var tt;return We(Be,`font-size: ${(tt=n(A))!=null?tt:""}px`)}),$(K,xe)}),$(U,O)},Ke=U=>{var O=Ae(),qe=ue(O);_i(qe,17,()=>e.captions,({value:K})=>K,(K,ae)=>{let xe=()=>n(ae).value;var Be=zw(),tt=C(Be),re=C(tt,!0);S(tt),S(Be),D(()=>{var ce;We(tt,`font-size: ${(ce=n(A))!=null?ce:""}px`),ve(re,xe())}),$(K,Be)}),$(U,O)};V(we,U=>{var O;n(I)&&((O=n(P))!=null&&O.length)?U(pe):U(Ke,!1)},ge)}};V(me,we=>{n(I)&&s()?we(ee):we(be,!1)})}S(Ce),S(oe),D(we=>{var ge;J=ne(oe,1,"subtitles-caption s-a",null,J,we),We(oe,`--subtitles-caption-margin: ${(ge=n(Q))!=null?ge:""}%`)},[()=>({mobile:u()})]),$(Z,oe)};V(X,Z=>{var oe;(e.captions.length||(oe=n(P))!=null&&oe.length)&&Z(se)})}S(F),D(Z=>z=ne(F,1,"subtitles-container s-a",null,z,Z),[()=>({shifted:e.shifted,"preview-track-active":d(),auto:n(I)&&!n(T)&&!s()})]),$(t,F),H(),o()}import{ChromecastState as Qw}from"@vkontakte/videoplayer-core/es2018";var Gw=L('<div class="text s-t"> </div>'),Yw=L('<div><div class="icon_wrapper s-t"><!></div> <!></div>'),jw={hash:"s-t",code:".wrapper.s-t{align-items:center;background-position:50%;background-repeat:no-repeat;background-size:contain;display:flex;flex-direction:column;font-size:16px;height:100%;justify-content:center}.wrapper.bgCover.s-t{background-size:cover}.icon_wrapper.s-t{align-items:center;display:flex;flex-direction:column;width:400px}.text.s-t{margin-top:20px}"};function uc(t,e){B(e,!0),G(t,jw);let i=h(e,"chromecastDeviceName",3,"chromecastDeviceName"),o=Rt();var r=Yw();let a;r.__contextmenu=function(...m){var p;(p=e.onContextMenu)==null||p.apply(this,m)},r.__click=function(...m){var p;(p=e.onClick)==null||p.apply(this,m)},r.__dblclick=function(...m){var p;(p=e.onDblClick)==null||p.apply(this,m)};var l=C(r),d=C(l);Yd(d,{get size(){return"48"},get iconState(){return Qw.CONNECTED}}),S(l);var s=k(l,2);{var u=m=>{var p=Gw(),v=C(p);S(p),D(()=>{var _;return ve(v,`Видео воспроизводится на ${(_=i())!=null?_:""}`)}),$(m,p)};V(s,m=>{i()&&m(u)})}S(r),D(m=>{a=ne(r,1,"wrapper s-t",null,a,m),We(r,`background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('${e.thumbUrl||""}')`)},[()=>({bgCover:o.features.previewNoEmptySpace})]),$(t,r),H()}Qe(["contextmenu","click","dblclick"]);var Xw=Ie('<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 Gm(t){Xe(t,{width:"200",height:"200",viewBox:"460 190 130 90",testId:"error-icon",children:(e,i)=>{var o=Xw();$(e,o)},$$slots:{default:!0}})}var Zw=L('<div class="container s-4"><!></div>'),Jw={hash:"s-4",code:".container.s-4{align-items:center;background:#000;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}"};function Ya(t){G(t,Jw);var e=Zw(),i=C(e);Gm(i,{}),S(e),$(t,e)}var eS=L('<div class="playButton s-b" tabindex="0" role="button"><div class="playButtonBackground s-b"></div> <!></div>'),tS=L('<div data-testid="unstarted-thumb"><!></div>'),iS={hash:"s-b",code:".container.s-b{background-position:50%;background-repeat:no-repeat;background-size:contain;bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:opacity .2s,visibility .2s;will-change:opacity}.container.hidden.s-b{opacity:0;visibility:hidden}.container.bgCover.s-b{background-size:cover}.playButton.s-b{align-items:center;display:flex;height:var(--big-play-size);justify-content:center;margin:auto;width:var(--big-play-size)}.playButton.s-b,.playButtonBackground.s-b{bottom:0;left:0;position:absolute;right:0;top:0}.playButtonBackground.s-b{background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);transition:background .2s,transform .2s;transition-timing-function:ease-out;will-change:background,transform}.container.s-b:hover .playButtonBackground:where(.s-b){background-color:var(--big-play-hover-bg-color);transform:scale(1.15)}.playButton.s-b svg{position:relative}"};function ja(t,e){B(e,!0),G(t,iS);let i=h(e,"iconVisible",3,!0),o=_e(),r=Rt(),a=o.ui.startedByKeyboard$,l=j("tooltip_play"),d=_=>{var b;let y=_.code;["Enter","Space"].includes(y)&&(_.stopPropagation(),_.preventDefault(),a.set(!0),(b=e.startVideo)==null||b.call(e))},s=_=>{var y,b;_.stopPropagation(),(y=e.startVideo)==null||y.call(e),(b=e.onClick)==null||b.call(e,_)};var u=tS();let m;u.__click=s,u.__contextmenu=function(..._){var y;(y=e.onContextMenu)==null||y.apply(this,_)};var p=C(u);{var v=_=>{var y=eS();y.__keydown=d;var b=k(C(y),2);An(b,{get size(){return"48"}}),S(y),D(()=>Me(y,"aria-label",l)),$(_,y)};V(p,_=>{i()&&_(v)})}return S(u),D(_=>{m=ne(u,1,"container s-b",null,m,_),We(u,`background-color: #222; background-image: url('${e.thumbUrl||""}')`)},[()=>({hidden:e.hidden,bgCover:r.features.previewNoEmptySpace})]),$(t,u),H({handlePressKey:d,handleClick:s})}Qe(["click","contextmenu","keydown"]);var oS=L('<span class="text s-v"> </span>'),nS=(t,e)=>{var i;return(i=e.onTitleClicked)==null?void 0:i.call(e)},rS=L('<a target="_blank" class="link s-v"><!></a>'),sS=(t,e)=>e.onTitleClicked(),aS=L("<button><!></button>"),lS=L('<div data-testid="video_title"><!></div>'),dS={hash:"s-v",code:".title.s-v{background:linear-gradient(0deg,transparent,rgba(0,0,0,.02) 19%,rgba(0,0,0,.1) 34%,rgba(0,0,0,.4) 60%,rgba(0,0,0,.6));box-sizing:border-box;font-size:15px;height:var(--controls-gradient-height);left:0;overflow:hidden;padding:18px 20px 10px;pointer-events:none;position:absolute;text-overflow:ellipsis;top:0;transition-duration:var(--controls-transition-duration);transition-property:visibility,transform,opacity;transition-timing-function:var(--controls-transition-fn);white-space:nowrap;width:100%;will-change:transform,opacity;z-index:var(--controls-container-z-index)}.link.s-v,.title.s-v{color:var(--white)}.link.s-v{pointer-events:auto;text-decoration:none}.link.s-v:hover{text-decoration:underline}.text.s-v{pointer-events:auto}.size-sm.s-v{font-size:14px;font-weight:500;line-height:18px}.hidden.s-v{opacity:0;transform:translateY(calc(var(--controls-gradient-height)*-1));visibility:hidden}"};function Ym(t,e){B(e,!0),G(t,dS);let i=_=>{var y=oS(),b=C(y,!0);S(y),je(y,w=>l(w),()=>l()),D(()=>ve(b,o())),st("mouseenter",y,function(...w){var I;(I=e.onMouseEnter)==null||I.apply(this,w)}),st("mouseleave",y,function(...w){var I;(I=e.onMouseLeave)==null||I.apply(this,w)}),$(_,y)},o=h(e,"title",3,""),r=h(e,"isHidden",3,!1),a=h(e,"size",3,"md"),l=h(e,"ref",15),d=q(void 0);Vt(()=>{var y;requestAnimationFrame(()=>{var b;(b=e.onVisibilityChanged)==null||b.call(e,!0)});function _(b){var w;b.propertyName==="transform"&&((w=e.onVisibilityChanged)==null||w.call(e,!r()))}return(y=n(d))==null||y.addEventListener("transitionend",_),()=>{var b;return(b=n(d))==null?void 0:b.removeEventListener("transitionend",_)}});var s=lS();let u;var m=C(s);{var p=_=>{var y=rS();y.__click=[nS,e];var b=C(y);i(b),S(y),D(()=>Me(y,"href",e.titleLinkHref)),$(_,y)},v=(_,y)=>{{var b=I=>{var T=aS();T.__click=[sS,e];var N=C(T);i(N),S(T),$(I,T)},w=I=>{i(I)};V(_,I=>{e.onTitleClicked?I(b):I(w,!1)},y)}};V(m,_=>{e.titleLinkHref?_(p):_(v,!1)})}S(s),je(s,_=>R(d,_),()=>n(d)),D(_=>u=ne(s,1,`title size-${a()}`,"s-v",u,_),[()=>({hidden:r()})]),$(t,s),H()}Qe(["click"]);import{throttleFn as gS}from"@vkontakte/videoplayer-shared/es2018";var cS=L('<div class="timer__cell cell s-1e"><span class="cell__value s-1e"> </span> <span class="cell__unit s-1e"> </span></div> <span class="timer__points s-1e"> </span>',1),uS=L('<div class="timer__cell cell s-1e"><span class="cell__value s-1e"> </span> <span class="cell__unit s-1e"> </span></div> <span class="timer__points s-1e"> </span>',1),pS=L('<div class="timer__cell cell s-1e"><span class="cell__value s-1e"> </span> <span class="cell__unit s-1e"> </span></div> <span class="timer__points s-1e"> </span>',1),fS=L('<div class="timer__cell cell s-1e"><span class="cell__value s-1e"> </span> <span class="cell__unit s-1e"> </span></div>'),mS=L("<div><!> <!> <!> <!></div>"),vS={hash:"s-1e",code:".timer__container.s-1e{align-items:flex-start;display:flex;justify-content:center}.cell.s-1e{align-items:center;display:flex;flex-direction:column}.cell__value.s-1e{font-size:48px;font-weight:600;line-height:1.2}.small.s-1e .cell__value:where(.s-1e){font-size:24px}.cell__unit.s-1e{font-size:14px;font-weight:400;line-height:1.2}.small.s-1e .cell__unit:where(.s-1e){font-size:12px}.timer__points.s-1e{display:inline-block;font-size:42px;font-weight:600;line-height:1.2;margin:0 8px}.small.s-1e .timer__points:where(.s-1e){font-size:20px}"};function jm(t,e){B(e,!0),G(t,vS);let i=q(""),o=q(""),r=q(""),a=q(""),l,d=32,s=d/2,u=F=>String(F).padStart(2,"0"),m=F=>Math.max(F.length,1),p=F=>`${(e.isSmallSize?s:d)*m(F)}px`,v=F=>{let z=Math.floor(F/86400);z&&(F-=z*86400,R(i,u(z),!0));let X=Math.floor(F/3600);R(o,u(X),!0);let se=Math.floor(F/60)%60;R(r,u(se),!0);let Z=F%60;R(a,u(Z),!0)},_=()=>{let F=Math.floor(Date.now()/1e3),z=e.startTime-F;v(z),z>=1?l=requestAnimationFrame(_):e.onTimerOver()};Vt(()=>{l=requestAnimationFrame(_)}),sn(()=>{cancelAnimationFrame(l)});var y=mS();let b;var w=C(y);{var I=F=>{var z=cS(),X=ue(z);let se;var Z=C(X),oe=C(Z,!0);S(Z);var J=k(Z,2),Ce=C(J,!0);S(J),S(X);var me=k(X,2),ee=C(me,!0);S(me),D((be,we,ge)=>{se=We(X,"",se,{width:be}),ve(oe,n(i)),ve(Ce,we),ve(ee,ge)},[()=>p(n(i)),()=>j("waiting_live_day_value"),()=>j("waiting_live_colon")]),$(F,z)};V(w,F=>{n(i)&&F(I)})}var T=k(w,2);{var N=F=>{var z=uS(),X=ue(z);let se;var Z=C(X),oe=C(Z,!0);S(Z);var J=k(Z,2),Ce=C(J,!0);S(J),S(X);var me=k(X,2),ee=C(me,!0);S(me),D((be,we,ge)=>{se=We(X,"",se,{width:be}),ve(oe,n(o)),ve(Ce,we),ve(ee,ge)},[()=>p(n(o)),()=>j("waiting_live_hour_value"),()=>j("waiting_live_colon")]),$(F,z)};V(T,F=>{n(o)&&F(N)})}var A=k(T,2);{var E=F=>{var z=pS(),X=ue(z);let se;var Z=C(X),oe=C(Z,!0);S(Z);var J=k(Z,2),Ce=C(J,!0);S(J),S(X);var me=k(X,2),ee=C(me,!0);S(me),D((be,we,ge)=>{se=We(X,"",se,{width:be}),ve(oe,n(r)),ve(Ce,we),ve(ee,ge)},[()=>p(n(r)),()=>j("waiting_live_minute_value"),()=>j("waiting_live_colon")]),$(F,z)};V(A,F=>{n(r)&&F(E)})}var P=k(A,2);{var Q=F=>{var z=fS();let X;var se=C(z),Z=C(se,!0);S(se);var oe=k(se,2),J=C(oe,!0);S(oe),S(z),D((Ce,me)=>{X=We(z,"",X,{width:Ce}),ve(Z,n(a)),ve(J,me)},[()=>p(n(a)),()=>j("waiting_live_second_value")]),$(F,z)};V(P,F=>{n(a)&&F(Q)})}S(y),D(F=>b=ne(y,1,"timer__container s-1e",null,b,F),[()=>({small:e.isSmallSize})]),$(t,y),H()}var hS=L('<div class="waiting s-w"><span> </span></div>'),_S=L('<div class="upcoming-timer timer s-w"><span> </span> <!></div>'),bS=L('<div class="waiting-container s-w"><!></div>'),$S={hash:"s-w",code:'.waiting-container.s-w{background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;white-space:nowrap}.waiting-container.s-w,.waiting-container.s-w:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-w:before{backdrop-filter:blur(15px);background-color:rgba(0,0,0,.56);content:"";z-index:1}.waiting.s-w{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-w{font-size:20px;font-weight:600;line-height:1.2}.upcoming-timer.s-w{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.timer.s-w{align-items:center;display:flex;flex-direction:column;justify-content:center}.timer__title.s-w{display:inline-block;font-size:20px;font-weight:600;line-height:1.2;margin-bottom:12px;vertical-align:middle}.small.s-w{font-size:15px}.medium.s-w{font-size:17px}'};function pc(t,e){B(e,!0),G(t,$S);let i=h(e,"startTime",3,0),o=f(()=>i()<Math.floor(Date.now()/1e3)),r=q(void 0),a=q(void 0),l=0,d=q(void 0),s=q(void 0),u=f(()=>{var w,I;return((w=n(d))!=null?w:1/0)<=509||((I=n(s))!=null?I:1/0)<=320}),m=f(()=>{var w,I;return!n(u)&&(((w=n(d))!=null?w:1/0)<=699||((I=n(s))!=null?I:1/0)<=599)}),p=e.onUpcomingLiveViewStateChanged?gS(()=>{cancelAnimationFrame(l),l=requestAnimationFrame(()=>{let w={type:n(o)?"expired":"default",size:n(u)?"s":n(m)?"m":"l"},I=n(o)?n(r):n(a);e.onUpcomingLiveViewStateChanged(w,I)})},300):void 0;De(()=>{n(s),n(d),n(o),p==null||p()}),sn(()=>{if(cancelAnimationFrame(l),p==null||p.cancel(),e.onUpcomingLiveViewStateChanged){let w={type:n(o)?"expired":"default",size:n(u)?"s":n(m)?"m":"l"};e.onUpcomingLiveViewStateChanged(w)}});var v=bS();v.__contextmenu=function(...w){var I;(I=e.onContextMenu)==null||I.apply(this,w)},v.__click=function(...w){var I;(I=e.onClick)==null||I.apply(this,w)};var _=C(v);{var y=w=>{var I=hS(),T=C(I);let N;var A=C(T,!0);S(T),S(I),je(I,E=>R(r,E),()=>n(r)),D((E,P)=>{N=ne(T,1,"waiting__title s-w",null,N,E),ve(A,P)},[()=>({medium:n(m),small:n(u)}),()=>j("waiting_live_upcoming_title")]),$(w,I)},b=w=>{var I=_S(),T=C(I);let N;var A=C(T,!0);S(T);var E=k(T,2);let P=f(()=>n(u)||n(m)),Q=f(()=>i()||0);jm(E,{get isSmallSize(){return n(P)},get startTime(){return n(Q)},onTimerOver:()=>R(o,!0)}),S(I),je(I,F=>R(a,F),()=>n(a)),D((F,z)=>{N=ne(T,1,"timer__title s-w",null,N,F),ve(A,z)},[()=>({medium:n(m),small:n(u)}),()=>j("waiting_live_timer_title")]),$(w,I)};V(_,w=>{n(o)?w(y):w(b,!1)})}S(v),D(()=>We(v,`background-image: url(${e.thumbUrl})`)),Pn(v,"clientWidth",w=>R(d,w)),Pn(v,"clientHeight",w=>R(s,w)),$(t,v),H()}Qe(["contextmenu","click"]);var yS=L('<div class="waiting-container s-x"><div class="waiting-caption s-x"><!> <p class="waiting-title s-x"> </p></div></div>'),xS={hash:"s-x",code:'.waiting-container.s-x{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-x,.waiting-container.s-x:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-x:before{backdrop-filter:blur(10px);background-color:rgba(0,0,0,.4);content:""}.waiting-caption.s-x{align-items:center;display:flex;flex-direction:column;position:relative}.waiting-title.s-x{font-size:20px;font-weight:400;line-height:1.2;margin:0;padding:20px;text-align:center}'};function Xa(t,e){B(e,!0),G(t,xS);let i=h(e,"thumbUrl",3,""),o={recover:j("waiting_live_recover_title"),record:j("waiting_record_title")},r=f(()=>o[e.kind]||"");var a=yS();a.__contextmenu=function(...m){var p;(p=e.onContextMenu)==null||p.apply(this,m)},a.__click=function(...m){var p;(p=e.onClick)==null||p.apply(this,m)};var l=C(a),d=C(l);Ha(d,{style:"position: static; transform: translate(0, 0)"});var s=k(d,2),u=C(s,!0);S(s),S(l),S(a),D(()=>{We(a,`background-image: url('${i()}')`),ve(u,n(r))}),$(t,a),H()}Qe(["contextmenu","click"]);var wS=Ie('<path d="M6 10.2 3.5 7.7a.99.99 0 0 0-1.4 1.4l3.2 3.2a1 1 0 0 0 1.4 0l7.6-7.6a.99.99 0 0 0-1.4-1.4z"></path>');function Xm(t){Xe(t,{width:"16",height:"16",testId:"check-mark-icon",children:(e,i)=>{var o=wS();$(e,o)},$$slots:{default:!0}})}var SS=L('<div class="select-icon s-1x"><!></div>'),CS={hash:"s-1x",code:".select-icon.s-1x{margin-right:auto;opacity:.9;padding-right:12px;position:relative;top:3px}"};function fc(t){G(t,CS);var e=SS(),i=C(e);Xm(i,{}),S(e),$(t,e)}var TS=(t,e)=>{t.stopPropagation(),e.item.selectItem(e.item.value)},IS=(t,e)=>{Rl(t,()=>e.item.selectItem(e.item.value))},ES=L("<p> </p>"),PS=L('<p class="sublabel s-1t"> </p>'),kS=L('<li role="menuitem" tabindex="0"><!> <div><!> <!></div></li>'),AS={hash:"s-1t",code:".menu-item-value.s-1t{align-items:end;display:flex;flex-direction:column;min-width:0}.menu-item-value[data-selected=false].s-1t{--select-icon-width:16px;--icon-padding:12px;margin-left:calc(var(--icon-padding) + var(--select-icon-width))}.label.s-1t,.sublabel.s-1t{max-width:100%;overflow:hidden;text-overflow:ellipsis}.sublabel.s-1t{opacity:.5}"};function Zm(t,e){B(e,!0),G(t,AS);let i=h(e,"isMobile",3,!1);var o=kS();let r;o.__click=[TS,e],o.__keydown=[IS,e];var a=C(o);{var l=y=>{fc(y,{})};V(a,y=>{e.item.selected&&y(l)})}var d=k(a,2);let s;var u=C(d);{var m=y=>{var b=Ae(),w=ue(b);Mi(w,()=>e.item.valueComponent,(I,T)=>{T(I,ts(()=>{var N;return(N=e.item.valueComponentParams)!=null?N:{}}))}),$(y,b)},p=y=>{var b=ES();let w;var I=C(b,!0);S(b),D(T=>{var N;w=ne(b,1,"label s-1t",null,w,T),ve(I,(N=e.item.label)!=null?N:e.item.value)},[()=>({mobile:i()})]),$(y,b)};V(u,y=>{e.item.valueComponent?y(m):y(p,!1)})}var v=k(u,2);{var _=y=>{var b=PS(),w=C(b,!0);S(b),D(()=>ve(w,e.item.sublabel)),$(y,b)};V(v,y=>{e.item.sublabel&&y(_)})}S(d),S(o),D((y,b,w)=>{var I;r=ne(o,1,"item",null,r,y),Me(o,"data-value",(I=e.item.dataValue)!=null?I:e.item.value),Me(o,"aria-label",b),Me(o,"data-testid",e.item.dataTestid),s=ne(d,1,"menu-item-value s-1t",null,s,w),Me(d,"data-selected",e.item.selected)},[()=>({mobile:i()}),()=>{var y,b;return(b=(y=e.item.ariaLabel)!=null?y:e.item.label)!=null?b:e.item.value.toString()},()=>({"submenu-value-mobile":i()})]),$(t,o),H()}Qe(["click","keydown"]);var LS=L('<li role="menuitem" tabindex="0" aria-haspopup="true"><!> <div><!></div></li>');function Jm(t,e){B(e,!0);let i=h(e,"isMobile",3,!1),o=h(e,"refMenuItems",15),r=f(()=>()=>e.openSubMenuList(e.item.children)),a=f(()=>b=>Vu(b,n(r)));var l=LS();let d;l.__click=function(...b){var w;(w=n(r))==null||w.apply(this,b)},l.__keydown=function(...b){var w;(w=n(a))==null||w.apply(this,b)};var s=C(l);{var u=b=>{fc(b,{})};V(s,b=>{e.item.selected&&b(u)})}var m=k(s,2);let p;var v=C(m);{var _=b=>{var w=Ae();let I=f(()=>e.item.valueComponent);var T=ue(w);Mi(T,()=>n(I),(N,A)=>{A(N,ts(()=>{var E;return(E=e.item.valueComponentParams)!=null?E:{}}))}),$(b,w)},y=b=>{var w=ps();D(()=>ve(w,e.item.label)),$(b,w)};V(v,b=>{e.item.valueComponent?b(_):b(y,!1)})}S(m),S(l),je(l,b=>o(o()[e.item.id]=b,!0),()=>{var b;return(b=o())==null?void 0:b[e.item.id]}),D((b,w)=>{var I;d=ne(l,1,"item",null,d,b),Me(l,"aria-label",(I=e.item.ariaLabel)!=null?I:e.item.label),Me(l,"data-testid",e.item.id),p=ne(m,1,"menu-item-value",null,p,w)},[()=>({mobile:i(),bottomBordered:e.item.bottomBordered}),()=>({"submenu-value-mobile":i()})]),$(t,l),H()}Qe(["click","keydown"]);var os={"quality-settings":100,"audio-language-settings":200,"playback-rate-settings":300,"subtitles-settings":400,"traffic-saving-settings":500,download:600,report:700,"copy-data":800,"save-trace-info":900,"debug-info":1e3};var VS=(t,e)=>{L_(t,e.returnFromSubMenu,e.closeSettingsMenu)},RS=(t,e)=>{t.stopPropagation(),e.returnFromSubMenu()},NS=(t,e)=>{Dd(t)&&(Mr(t),e.returnFromSubMenu())},DS=L('<div><ul role="menu"><li role="menuitem" tabindex="0" data-testid="return-to-settings-menu"><!> <p class="title s-1l"> </p></li> <!></ul></div>'),OS={hash:"s-1l",code:".sub-menu.s-1l{--item-padding-vertical-mobile:16px;--item-padding-vertical:7px;--item-label-line-height:18px;--edge-item-padding-vertical-mobile:calc(6px + var(--item-padding-vertical-mobile));--edge-item-padding-vertical:calc(8px + var(--item-padding-vertical))}.sub-menu.s-1l .item.mobile{font-size:14px;line-height:var(--item-label-line-height);padding:var(--item-padding-vertical-mobile) 17px}.sub-menu.s-1l{padding-top:calc(var(--edge-item-padding-vertical) + var(--item-padding-vertical) + var(--item-label-line-height))}.sub-menu.mobile.s-1l{padding-top:calc(var(--edge-item-padding-vertical-mobile) + var(--item-padding-vertical-mobile) + var(--item-label-line-height) + 1px)}.sub-menu.s-1l .items:where(.s-1l) .item.header:where(.s-1l){border-bottom:var(--divider-border);display:flex;justify-content:space-between;left:0;min-width:max-content;position:absolute;right:0;top:0}.header.s-1l .title:where(.s-1l){margin-left:8px}.sub-menu.s-1l .item{padding:var(--item-padding-vertical) 12px;padding-right:22px}.items.s-1l .item:first-child:not(.mobile){padding-top:var(--edge-item-padding-vertical)}.items.s-1l .item:last-child:not(.mobile){padding-bottom:var(--edge-item-padding-vertical)}.items.s-1l .item.mobile:first-child{padding-top:var(--edge-item-padding-vertical-mobile)}.items.s-1l .item.mobile:last-child{padding-bottom:var(--edge-item-padding-vertical-mobile)}.sub-menu.s-1l .item.bottomBordered{border-bottom:var(--divider-border)}.sub-menu.s-1l .item .sublabel{font-size:12px;line-height:14px}.item.s-1l:not(.mobile) p:where(.s-1l),.sub-menu.s-1l .item:not(.mobile) .label{font-size:13px;line-height:var(--item-label-line-height)}"};function tv(t,e){B(e,!0),G(t,OS);let[i,o]=Ne(),r=()=>x(p,"$isFullscreen",i),a=()=>x(v,"$playerSize",i),l=h(e,"isMobile",3,!1),d=h(e,"playerControlsHeight",3,0),s=h(e,"ariaLabelReturnFromSubMenu",19,()=>j("aria_label_submenu_back")),u=h(e,"listRef",15);Vt(()=>{let Z=e.items.findIndex(oe=>oe.selected);u().children[Z+1].focus()});let m=_e(),p=m.ui.isFullscreen,v=m.ui.playerSize,_=q(void 0),y=q(0),b=q(0),w=f(()=>l()&&r()?`max-height: ${Math.round(a().height*.6)}px`:l()?"":`max-height: ${a().height-32-n(b)-d()}px; overflow: auto;`),I=f(()=>Math.max(e.minWidth,n(y)));var T=DS();let N;var A=C(T);let E;A.__keydown=[VS,e];var P=C(A);let Q;P.__click=[RS,e],P.__keydown=[NS,e];var F=C(P);Lr(F,{direction:"left"});var z=k(F,2),X=C(z,!0);S(z),S(P),je(P,Z=>R(_,Z),()=>n(_));var se=k(P,2);_i(se,17,()=>e.items,bd,(Z,oe)=>{var J=Ae(),Ce=ue(J);{var me=be=>{Zm(be,{get item(){return n(oe)},get isMobile(){return l()}})},ee=(be,we)=>{{var ge=pe=>{Jm(pe,{get isMobile(){return l()},get item(){return n(oe)},get openSubMenuList(){return e.openSubMenuList},get refMenuItems(){return e.refMenuItems}})};V(be,pe=>{n(oe).type==="OPEN_SUB_MENU"&&pe(ge)},we)}};V(Ce,be=>{n(oe).type==="SELECT_VALUE"?be(me):be(ee,!1)})}$(Z,J)}),S(A),je(A,Z=>u(Z),()=>u()),S(T),D((Z,oe,J)=>{N=ne(T,1,"sub-menu menu s-1l",null,N,Z),Me(T,"data-testid",`${e.id}-sub-menu`),We(T,`min-width: ${n(I)}px`),E=ne(A,1,"items s-1l",null,E,oe),We(A,n(w)),Q=ne(P,1,"item header back s-1l",null,Q,J),Me(P,"aria-label",s()),ve(X,e.title)},[()=>({desktop:!l(),mobile:l()}),()=>({mobile:l()}),()=>({mobile:l()})]),Pn(P,"clientWidth",Z=>R(y,Z)),Pn(P,"clientHeight",Z=>R(b,Z)),$(t,T),H(),o()}Qe(["keydown","click"]);import{noop as BS}from"@vkontakte/videoplayer-shared/es2018";var HS=(t,e)=>Vu(t,e()),FS=(t,e)=>{t.stopPropagation(),e()()},US=L('<div class="value s-1n"> </div>'),zS=L('<li role="menuitem" tabindex="0" aria-haspopup="true"><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></li>'),WS={hash:"s-1n",code:".value.s-1n{opacity:.7;overflow:hidden;position:relative;text-overflow:ellipsis}"};function iv(t,e){B(e,!0),G(t,WS);let i=h(e,"isMobile",3,!1),o=h(e,"onClick",3,BS),r=h(e,"valueComponent",3,void 0),a=h(e,"iconProps",19,()=>({})),l=h(e,"ref",15);var d=zS();let s;d.__click=[FS,o],d.__keydown=[HS,o];var u=C(d),m=C(u);{var p=T=>{Ka(T,{get icon(){return e.icon}})},v=T=>{var N=Ae();let A=f(()=>e.icon);var E=ue(N);Mi(E,()=>n(A),(P,Q)=>{Q(P,ts(a))}),$(T,N)};V(m,T=>{typeof e.icon=="string"?T(p):T(v,!1)})}S(u);var _=k(u,2),y=C(_,!0);S(_);var b=k(_,2);{var w=T=>{var N=Ae();let A=f(r);var E=ue(N);Mi(E,()=>n(A),(P,Q)=>{Q(P,{})}),$(T,N)},I=T=>{var N=US(),A=C(N,!0);S(N),D(()=>ve(A,e.value)),$(T,N)};V(b,T=>{r()?T(w):T(I,!1)})}S(d),je(d,T=>l(T),()=>l()),D(T=>{s=ne(d,1,"item",null,s,T),Me(d,"aria-label",e.ariaLabel),Me(d,"data-testid",e.id),ve(y,e.label)},[()=>({mobile:i()})]),$(t,d),H()}Qe(["click","keydown"]);import{noop as vb}from"@vkontakte/videoplayer-shared/es2018";var KS=(t,e)=>{Rl(t,()=>e())},qS=L('<div class="icon icon-error-stub"><div class="inner"></div></div>'),QS=L('<img class="icon" aria-hidden="true"/>'),GS=L('<li role="menuitem" tabindex="0"><div class="icon-wrapper"><!></div> <div class="label s-1o"> </div></li>'),YS={hash:"s-1o",code:".label.s-1o{overflow:hidden;text-overflow:ellipsis}"};function ov(t,e){B(e,!0),G(t,YS);let i=h(e,"isMobile",3,!1),o=h(e,"onClick",3,vb),r=h(e,"closeSettings",3,vb),a=q(!1),l=()=>{R(a,!0)},d=w=>{w==null||w.stopPropagation(),o()(),r()()};var s=GS();let u;s.__click=d,s.__keydown=[KS,d];var m=C(s),p=C(m);{var v=w=>{var I=Ae(),T=ue(I);{var N=E=>{var P=qS();$(E,P)},A=E=>{var P=QS();D(()=>Me(P,"src",e.icon)),st("error",P,l),Pa(P),$(E,P)};V(T,E=>{n(a)?E(N):E(A,!1)})}$(w,I)},_=w=>{var I=Ae();let T=f(()=>e.icon);var N=ue(I);Mi(N,()=>n(T),(A,E)=>{E(A,{})}),$(w,I)};V(p,w=>{typeof e.icon=="string"?w(v):w(_,!1)})}S(m);var y=k(m,2),b=C(y,!0);S(y),S(s),D(w=>{var I;u=ne(s,1,"item",null,u,w),Me(s,"aria-label",(I=e.ariaLabel)!=null?I:e.label),Me(s,"data-testid",e.id),ve(b,e.label)},[()=>({mobile:i()})]),$(t,s),H()}Qe(["click","keydown"]);import{noop as ZS}from"@vkontakte/videoplayer-shared/es2018";var jS=L('<div class="toggle_wrap s-1r"><div></div> <div class="toggle-label s-1r"></div></div>'),XS={hash:"s-1r",code:'.toggle_wrap.s-1r{cursor:pointer;font-size:12px;line-height:15px;min-height:15px;padding:0;user-select:none}.toggle.s-1r{background-color:var(--toggle-color-separator);border-radius:45px;cursor:pointer;float:right;height:9px;margin-top:3px;width:28px}.toggle.s-1r:after{background-color:var(--toggle-color-off);border-radius:50%;content:"";float:left;height:15px;left:0;position:relative;top:-3px;transition:left .1s ease;width:15px}.toggle.on.s-1r:after{background-color:var(--toggle-color-on);left:13px}.toggle-label.s-1r{overflow:hidden}'};function nv(t,e){G(t,XS);let i=h(e,"enabled",3,!1);var o=jS(),r=C(o);let a;li(2),S(o),D(l=>a=ne(r,1,"toggle s-1r",null,a,l),[()=>({on:i()})]),$(t,o)}var JS=(t,e,i)=>{M_(t,e(),o=>i()(o))},eC=(t,e,i)=>{t.stopPropagation(),e()(!i())},tC=L('<div><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></div>'),iC=L('<li role="menuitem" tabindex="0"><!></li>');function rv(t,e){B(e,!0);let i=h(e,"isMobile",3,!1),o=h(e,"onClick",3,ZS),r=h(e,"enabled",3,!1),a=h(e,"tooltipText",3,void 0),l=h(e,"maxTooltipWidth",3,void 0);var d=iC();let s;d.__click=[eC,o,r],d.__keydown=[JS,r,o];var u=C(d);Fa(u,{get content(){return a()},get isMobile(){return i()},placement:"left",translateX:10,isFullWidthWrapper:!0,get maxTooltipWidth(){return l()},children:(m,p)=>{var v=tC();let _;var y=C(v),b=C(y);{var w=E=>{Ka(E,{get icon(){return e.icon}})},I=E=>{var P=Ae();let Q=f(()=>e.icon);var F=ue(P);Mi(F,()=>n(Q),(z,X)=>{X(z,{})}),$(E,P)};V(b,E=>{typeof e.icon=="string"?E(w):E(I,!1)})}S(y);var T=k(y,2),N=C(T,!0);S(T);var A=k(T,2);nv(A,{get enabled(){return r()}}),S(v),D(E=>{_=ne(v,1,"switch-wrapper",null,_,E),ve(N,e.label)},[()=>({mobile:i()})]),$(m,v)},$$slots:{default:!0}}),S(d),D(m=>{var p;s=ne(d,1,"item switch-item",null,s,m),Me(d,"aria-label",(p=e.ariaLabel)!=null?p:e.label),Me(d,"data-testid",e.id)},[()=>({mobile:i()})]),$(t,d),H()}Qe(["click","keydown"]);import{isValidURL as IC,VideoQuality as Tb}from"@vkontakte/videoplayer-shared/es2018";var gb=()=>{let t=q(ai([])),e=f(()=>(n(t).length?n(t).at(-1):null)||null);return{get current(){return n(e)},pushSubMenu:i=>{n(t).push(i)},popSubMenu:()=>{R(t,n(t).slice(0,-1),!0)},popAllSubMenus:()=>{R(t,[],!0)}}};import{getVideoQualityLabel as oC}from"@vkontakte/videoplayer-shared/es2018";var nC=L('<div class="quality-icon s-1q"><!></div>'),rC=L('<div class="quality-label s-1q"><span> </span> <!></div>'),sC={hash:"s-1q",code:".quality-label.s-1q{position:relative}.quality.s-1q{font-size:13px;line-height:18px}.quality.sub.s-1q{opacity:.7}.quality-icon.s-1q{display:flex;padding-left:2px;position:absolute;right:0;top:0;transform:translateX(100%)}.quality-icon.s-1q svg{color:var(--blue-light)}"};function Za(t,e){B(e,!0),G(t,sC);let i=h(e,"isSubCase",3,!1),o=f(()=>e.quality?oC(e.quality):""),r=f(()=>Hu(e.quality));var a=rC(),l=C(a);let d;var s=C(l,!0);S(l);var u=k(l,2);{var m=p=>{var v=nC();let _=f(()=>n(r));var y=C(v);Mi(y,()=>n(_),(b,w)=>{w(b,{})}),S(v),D(()=>Me(v,"data-testid",`${n(o)}-icon`)),$(p,v)};V(u,p=>{n(r)&&!e.isMobile&&p(m)})}S(a),D(p=>{d=ne(l,1,"s-1q",null,d,p),ve(s,e.label)},[()=>({sub:!i(),quality:!e.isMobile})]),$(t,a),H()}import{VideoQuality as aC}from"@vkontakte/videoplayer-shared/es2018";import{VideoQuality as hb}from"@vkontakte/videoplayer-core/es2018";var _b=({quality:t,availableQualities:e})=>{let i=e.find(o=>o.value===t);return i?i.displayValue:t},bb=({quality:t,availableQualities:e,isAutoQualityEnabled:i})=>{if(!t)return"...";let o=_b({quality:t,availableQualities:e});return i?t===hb.INVARIANT?j("auto_quality_invariant"):j("auto_quality",{actual:o}):o},$b=({quality:t,availableQualities:e,prefix:i,onlyPrefix:o})=>t?o||t===hb.INVARIANT?i:`${i}${_b({quality:t,availableQualities:e})}`:"...";var lC=L('<div class="menu-item-value-wrapper s-1u"><!></div>'),dC={hash:"s-1u",code:".menu-item-value-wrapper.s-1u{line-height:normal}"};function Ql(t,e){B(e,!0),G(t,dC);let[i,o]=Ne(),r=()=>x(s,"$currentQuality$",i),a=()=>x(u,"$availableQualities$",i),l=()=>x(m,"$isMobile$",i),d=_e(),s=d.state.currentQuality$,u=d.state.availableQualities$,m=d.ui.isMobile,p=" · ",v=f(()=>e.prefix+(e.selected&&r()!==aC.INVARIANT?p:"")),_=f(()=>$b({prefix:n(v),quality:r(),availableQualities:a(),onlyPrefix:!e.selected}));var y=lC(),b=C(y);let w=f(()=>e.selected?r():void 0);Za(b,{get quality(){return n(w)},get label(){return n(_)},get isMobile(){return l()},isSubCase:!0}),S(y),$(t,y),H(),o()}var cC=t=>{let e=t.join("|"),i="<(?<keyhtml>.*?)(?<propshtml> .*?)?>(?<childrenhtml>.*?)</\\k<keyhtml>>",o=`{(?<keyi18n>${e})}(?<childreni18n>.*?){/\\k<keyi18n>}`,r="<(?<keyhtmlself>.*?)(?<propshtmlself> .*?)?/?>",a=`{(?<keyi18nself>${e})}`;return new RegExp(`${i}|${o}|${r}|${a}`,"g")},uC={br:!0,span:!0},sv=(t,e={})=>{var d,s,u,m,p,v,_;if(!t)return t;let i={...uC,...e},o=Object.keys(i);if(!o.length)return t;let r=cC(o),a=[],l=0;for(let y of t.matchAll(r)){let b=y[0],w=((d=y.groups)==null?void 0:d.keyhtml)||((s=y.groups)==null?void 0:s.keyi18n)||((u=y.groups)==null?void 0:u.keyhtmlself)||((m=y.groups)==null?void 0:m.keyi18nself)||"",{index:I}=y;if(!i[w]){a.push(t.slice(l,I)),l=I+b.length;continue}let T=(p=y.groups)!=null&&p.childrenhtml?sv(y.groups.childrenhtml,i):"",N=(v=y.groups)!=null&&v.childrenhtml?b.replace(new RegExp((_=y.groups)==null?void 0:_.childrenhtml),()=>T||""):b;a.push(t.slice(l,I),N),l=I+b.length}return l===0?t:(a.push(t.slice(l)),a.join(""))};function mc(t,e){B(e,!1);let i=h(e,"message",8),o=sv(i());mo();var r=Ae(),a=ue(r);{var l=d=>{var s=Ae(),u=ue(s);$d(u,()=>o),$(d,s)};V(a,d=>{o&&d(l)})}$(t,r),H()}var pC=L('<p class="quality-applies sublabel s-1s"><!></p>'),fC={hash:"s-1s",code:".quality-applies.s-1s{color:hsla(0,0%,100%,.5);display:flex;justify-content:end;padding:3px 0}.quality-applies span{color:#70c1ff}"};function av(t,e){B(e,!1),G(t,fC),mo();var i=pC(),o=C(i);let r=Sn(()=>j("quality_applience",{action:`<span>${j("quality_applience_action")}</span>`}));mc(o,{get message(){return n(r)}}),S(i),$(t,i),H()}var xb=({isAutoQualityEnabled:t,trafficSavingEnabled:e,highQualityEnabled:i})=>{let o=!t&&!e&&!i;return{id:"quality-other-settings",type:"OPEN_SUB_MENU",label:j("other_quality"),selected:o,valueComponent:Ql,valueComponentParams:{prefix:j("other_quality"),selected:o},children:"quality-other-settings"}},lv=({appliesTo:t,labelWithQuality:e,selected:i},{selectQuality:o})=>({id:"quality-auto",type:"SELECT_VALUE",value:"auto",label:j("auto_quality_limit"),valueComponent:e?Ql:void 0,valueComponentParams:{prefix:j("auto_quality_limit"),selected:i},selectItem:()=>o("auto",t),selected:i}),wb=()=>({id:"quality-appliance-settings",type:"OPEN_SUB_MENU",valueComponent:av,bottomBordered:!0,children:"quality-appliance"}),dv=({labelWithQuality:t,appliesTo:e,selected:i},{toggleHighQuality:o})=>({id:"quality-high",type:"SELECT_VALUE",value:"high_quality",selectItem:()=>o(!0,e),selected:i,label:j("high_quality"),valueComponent:t?Ql:void 0,valueComponentParams:{prefix:j("high_quality"),selected:i},sublabel:j("high_quality_description")}),cv=({labelWithQuality:t,appliesTo:e,selected:i},{toggleTrafficSaving:o})=>({id:"quality-traffic-saving",type:"SELECT_VALUE",value:"save_traffic",selectItem:()=>o(!0,e),selected:i,label:j("traffic_saving_quality"),valueComponent:t?Ql:void 0,valueComponentParams:{prefix:j("traffic_saving_quality"),selected:i},sublabel:j("traffic_saving_quality_description")});var tp=(t,e)=>String(e.findIndex(i=>i.id===t.id)+1),ip=(t,e)=>{var l;if(!t)return"";let{language:i,label:o}=t,r;if(i==="und"?r=void 0:i&&(r=(l=Zd(i))!=null?l:i),o&&i&&r){let d=e.filter(s=>s.label===o&&s.language===i);if(d.length===1)return j("audio_stream_display_language_label",{language:r,label:o});{let s=tp(t,d);return j("audio_stream_display_language_label_index",{language:r,label:o,index:s})}}if(o){let d=e.filter(s=>s.label===o);if(d.length===1)return o;{let s=tp(t,d);return j("audio_stream_display_label_index",{label:o,index:s})}}if(i&&r){let d=e.filter(s=>s.language===i);if(d.length===1)return r;{let s=tp(t,d);return j("audio_stream_display_language_index",{language:r,index:s})}}let a=tp(t,e);return j("audio_stream_display_unknown",{index:a})};var mC={"quality-settings":t=>{let{isAutoQualityEnabled:e,isAutoQualityAvailable:i,trafficSavingEnabled:o,highQualityEnabled:r}=t,a=[];return i&&a.push({handler:lv,selected:e&&!o&&!r||!1}),a.push({handler:cv,selected:o},{handler:dv,selected:r}),{title:j("submenu_quality"),id:"quality-settings",items:[wb(t),...a.map(({handler:l,selected:d})=>l({labelWithQuality:!0,appliesTo:"to-video",selected:d},t)),xb(t)]}},"quality-other-settings":({closeSettingsMenu:t,selectQuality:e,availableQualities:i,isMobile:o})=>({id:"quality-other-settings",title:j("submenu_quality"),closeSettingsMenu:t,items:i.map(r=>({type:"SELECT_VALUE",value:r.value,valueComponent:Za,valueComponentParams:{quality:r.value,label:r.displayValue,isMobile:o,isSubCase:!0},selectItem:a=>e(a,"to-video"),selected:r.selected,label:r.displayValue}))}),"quality-appliance":t=>{var i,o,r;let{closeSettingsMenu:e}=t;return{id:"quality-appliance",title:j("default_quality_for_any_video"),closeSettingsMenu:e,items:[{handler:lv,selected:((i=xu())==null?void 0:i.type)==="auto_quality"},{handler:cv,selected:((o=xu())==null?void 0:o.type)==="traffic_saving"},{handler:dv,selected:((r=xu())==null?void 0:r.type)==="high_quality"}].map(({handler:a,selected:l})=>a({labelWithQuality:!1,appliesTo:"as-default",selected:l},t))}},"audio-tracks":({closeSettingsMenu:t,availableAudioStreams:e,currentAudioStream:i,selectAudioLanguage:o})=>({id:"audio-tracks",title:j("submenu_audio_languages"),closeSettingsMenu:t,items:e.map(r=>({type:"SELECT_VALUE",value:r,dataValue:r.id,selectItem:o,selected:r.id===(i==null?void 0:i.id),label:ip(r,e)}))}),"playback-rate":({closeSettingsMenu:t,availablePlaybackRates:e,selectPlaybackRate:i})=>({id:"playback-rate",title:j("submenu_playback_rate"),closeSettingsMenu:t,items:e.map(o=>({type:"SELECT_VALUE",value:o.value,selectItem:i,selected:o.selected,label:o.displayValue}))}),subtitles:({availableSubtitlesList:t,selectSubtitle:e})=>({id:"subtitles",minWidth:164,title:j("subtitles_caption"),items:t.map(i=>({type:"SELECT_VALUE",value:i.value,selectItem:()=>e(i),selected:i.selected,label:i.displayValue,dataTestid:i.value===Ln?"sub_off":void 0}))})},Sb=({subMenuId:t,context:e})=>t?[mC[t](e)]:[];var vC=Ie('<path d="M3.1 9.5c0-2.24 0-3.36.44-4.22A4 4 0 015.28 3.54C6.14 3.1 7.26 3.1 9.5 3.1h5c2.24 0 3.36 0 4.22.44a4 4 0 011.74 1.74c.44.86.44 1.98.44 4.22s0 3.36-.44 4.22a4 4 0 01-1.74 1.74c-.84.43-1.93.44-4.07.44l.55 2.2h1.9a.9.9 0 010 1.8H6.9a.9.9 0 110-1.8h1.9l.55-2.2c-2.14 0-3.23-.01-4.07-.44a4 4 0 01-1.74-1.74C3.1 12.86 3.1 11.74 3.1 9.5m11.4-4.6h-5c-1.15 0-1.9 0-2.48.05-.56.04-.79.12-.92.19a2.2 2.2 0 00-.96.96 2 2 0 00-.2.92C4.9 7.6 4.9 8.35 4.9 9.5s0 1.9.05 2.48c.04.56.12.79.19.92q.33.63.96.96c.13.07.36.15.92.2.58.04 1.33.04 2.48.04h5c1.15 0 1.9 0 2.48-.05.56-.04.79-.12.92-.19a2.2 2.2 0 00.96-.96c.07-.13.15-.36.2-.92.04-.58.04-1.33.04-2.48s0-1.9-.05-2.48a3 3 0 00-.19-.92 2.2 2.2 0 00-.96-.96 2 2 0 00-.92-.2c-.58-.04-1.33-.04-2.48-.04m-3.3 11-.55 2.2h2.7l-.55-2.2z"></path>');function uv(t){Xe(t,{testId:"traffic-saving-icon",children:(e,i)=>{var o=vC();$(e,o)},$$slots:{default:!0}})}var gC=Ie('<path d="M8.3 14.25c1.86 1.9 5.5.02 5.5-3.55V5.64l2.4-.7A2.74 2.74 0 0 0 18 2.37V.64a.75.75 0 0 0-.92-.62l-.26.06C15.88.3 14.93.51 14 .8c-1.33.45-2.03 1.62-2.01 3.08V9c-3.89.2-5.64 3.29-3.7 5.25ZM.9.1a.9.9 0 0 0 0 1.8h8.2a.9.9 0 0 0 0-1.8H.9ZM.9 5.1a.9.9 0 1 0 0 1.8h7.2a.9.9 0 0 0 0-1.8H.9ZM0 11c0-.5.4-.9.9-.9h4.18a.9.9 0 1 1 0 1.8H.9A.9.9 0 0 1 0 11Z"></path>');function pv(t){Xe(t,{width:"18",height:"15",children:(e,i)=>{var o=gC();$(e,o)},$$slots:{default:!0}})}var hC=Ie('<path d="M11 4.07V2.05c-2.01.2-3.84 1-5.32 2.21L7.1 5.69A8 8 0 0 1 11 4.07M5.69 7.1 4.26 5.68A10 10 0 0 0 2.05 11h2.02a8 8 0 0 1 1.62-3.9M2.05 13c.2 2.01 1 3.84 2.21 5.32l1.43-1.43A8 8 0 0 1 4.07 13zM11 21.95v-2.02a8 8 0 0 1-3.9-1.62l-1.42 1.43A10 10 0 0 0 11 21.95M22 12c0 5.16-3.92 9.42-8.95 9.95v-2.02C16.97 19.41 20 16.05 20 12s-3.03-7.41-6.95-7.93V2.05C18.08 2.58 22 6.84 22 12M10.69 8.58l4.74 2.73a.8.8 0 0 1 0 1.37l-4.74 2.74a.8.8 0 0 1-1.19-.68V9.26a.8.8 0 0 1 1.19-.68"></path>');function fv(t){Xe(t,{testId:"play-speed-icon",children:(e,i)=>{var o=hC();$(e,o)},$$slots:{default:!0}})}var _C=Ie('<path d="M12 2a.9.9 0 01.9.9v10.93l4.56-4.57a.9.9 0 011.28 1.28l-6.1 6.1a.9.9 0 01-1.28 0l-6.1-6.1a.9.9 0 111.28-1.28l4.56 4.57V2.9A.9.9 0 0112 2M4 20a.9.9 0 01.9-.9h14.2a.9.9 0 110 1.8H4.9A.9.9 0 014 20"></path>');function mv(t){Xe(t,{testId:"download-icon",children:(e,i)=>{var o=_C();$(e,o)},$$slots:{default:!0}})}var bC=Ie('<path d="M8.86 2.1h6.28c.67 0 1.2.21 1.68.7l4.38 4.38c.48.48.7 1 .7 1.68v6.28c0 .68-.22 1.2-.7 1.68l-4.38 4.38c-.48.48-1 .7-1.68.7H8.86c-.68 0-1.2-.22-1.68-.7L2.8 16.82c-.48-.48-.7-1-.7-1.68V8.86c0-.68.22-1.2.7-1.68L7.18 2.8c.48-.49 1-.7 1.68-.7m-.44 2L4.1 8.43c-.18.18-.21.24-.21.5v6.17c0 .25.03.31.2.5l4.32 4.3c.18.18.24.21.5.21h6.17c.25 0 .31-.03.5-.2l4.3-4.32c.18-.18.21-.24.21-.5V8.92c0-.25-.03-.31-.2-.5l-4.32-4.3c-.18-.18-.24-.21-.5-.21H8.92c-.25 0-.32.03-.5.2M13 16a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-.1-8.1a.9.9 0 0 0-1.8 0v5.2a.9.9 0 1 0 1.8 0z"></path>');function vv(t){Xe(t,{testId:"report-icon",children:(e,i)=>{var o=bC();$(e,o)},$$slots:{default:!0}})}var $C=Ie('<path d="M4 12.3V12c0-1.47 0-2.55.08-3.4.07-.9.21-1.48.45-1.95a4.85 4.85 0 0 1 2.12-2.12 5.1 5.1 0 0 1 1.95-.45C9.5 4 10.68 4 12.3 4h4.51c-.03-.16-.09-.33-.17-.49a2.4 2.4 0 0 0-1.05-1.05c-.3-.16-.63-.21-.93-.24-.29-.02-.64-.02-1.03-.02h-1.37c-1.58 0-2.81 0-3.81.08a6.84 6.84 0 0 0-2.62.64 6.65 6.65 0 0 0-2.9 2.91c-.4.76-.57 1.6-.65 2.62-.08 1-.08 2.23-.08 3.81v1.37c0 .4 0 .74.02 1.03.03.3.08.62.24.93A2.4 2.4 0 0 0 4 16.8V12.3ZM10.08 6h-.03c-.53 0-.97 0-1.33.03-.39.03-.76.1-1.12.28a2.9 2.9 0 0 0-1.3 1.3c-.17.35-.24.72-.27 1.1C6 9.09 6 9.53 6 10.06v7.9c0 .53 0 .97.03 1.33.03.39.1.76.28 1.12a2.9 2.9 0 0 0 1.3 1.3c.35.17.72.24 1.1.27.37.03.81.03 1.33.03h6.91c.53 0 .97 0 1.33-.03.39-.03.76-.1 1.12-.28a2.9 2.9 0 0 0 1.3-1.3c.17-.35.24-.72.27-1.1.03-.37.03-.81.03-1.34v-7.9c0-.53 0-.97-.03-1.33-.03-.39-.1-.76-.28-1.12a2.9 2.9 0 0 0-1.3-1.3 2.96 2.96 0 0 0-1.1-.27C17.91 6 17.47 6 16.94 6h-6.87ZM8.41 7.92c.06-.04.18-.07.45-.1.28-.02.65-.02 1.22-.02h6.84c.57 0 .94 0 1.22.02.27.03.39.06.45.1.21.1.39.28.5.49.03.06.06.18.09.45.02.28.02.65.02 1.22v7.84c0 .57 0 .94-.02 1.22-.03.27-.06.39-.1.45-.1.21-.28.39-.49.5-.06.03-.18.06-.45.09-.28.02-.65.02-1.22.02h-6.84c-.57 0-.94 0-1.22-.02a1.23 1.23 0 0 1-.45-.1 1.1 1.1 0 0 1-.5-.49 1.23 1.23 0 0 1-.09-.45c-.02-.28-.02-.65-.02-1.22v-7.84c0-.57 0-.94.02-1.22.03-.27.06-.39.1-.45.1-.21.28-.39.49-.5Z"></path>');function op(t){Xe(t,{children:(e,i)=>{var o=$C();$(e,o)},$$slots:{default:!0}})}var yC=Ie('<path d="M12 20.1a8.1 8.1 0 1 0 0-16.2 8.1 8.1 0 0 0 0 16.2m0 1.9a10 10 0 1 1 0-20 10 10 0 0 1 0 20m0-12.37A1.32 1.32 0 1 1 12 7a1.32 1.32 0 0 1 0 2.63m-.95 2.82c0-.54.43-.98.95-.98s.95.44.95.98v3.83c0 .54-.43.98-.95.98a.96.96 0 0 1-.95-.98z"></path>');function gv(t){Xe(t,{testId:"info-icon",children:(e,i)=>{var o=yC();$(e,o)},$$slots:{default:!0}})}var xC=L('<div class="menu-item-value-wrapper s-1v"><!></div>'),wC={hash:"s-1v",code:".menu-item-value-wrapper.s-1v{line-height:normal}"};function hv(t,e){B(e,!0),G(t,wC);let[i,o]=Ne(),r=()=>x(u,"$currentQuality$",i),a=()=>x(m,"$availableQualities$",i),l=()=>x(p,"$isAutoQualityEnabled$",i),d=()=>x(v,"$isMobile$",i),s=_e(),u=s.state.currentQuality$,m=s.state.availableQualities$,p=s.state.isAutoQualityEnabled$,v=s.ui.isMobile,_=f(()=>bb({quality:r(),availableQualities:a(),isAutoQualityEnabled:l()}));var y=xC(),b=C(y);Za(b,{get quality(){return r()},get label(){return n(_)},get isMobile(){return d()}}),S(y),$(t,y),H(),o()}var CC={"quality-settings":({isAutoQualityEnabled:t,currentQuality:e,qualityDetailsSubMenuEnabled:i})=>{let o=(t?j("auto_quality_option"):e)||"";return{id:"quality-settings",type:"OPEN_SUB_MENU",ariaLabel:j("aria_label_menu_quality",{actual:o}),icon:Wd,label:j("menu_quality"),value:e,valueComponent:hv,weight:os["quality-settings"],children:i?"quality-settings":"quality-other-settings"}},"traffic-saving-switch":({trafficSavingEnabled:t,toggleTrafficSaving:e})=>({id:"traffic-saving-switch",weight:os["traffic-saving-settings"],type:"SWITCH",onClick:i=>e(i,"to-video"),ariaLabel:j("aria_label_submenu_traffic_saving"),icon:uv,label:j("menu_traffic_saving"),enabled:t,tooltipText:j("traffic_saving_helper_text"),maxTooltipWidth:175}),"audio-tracks-settings":({currentAudioStream:t,availableAudioStreams:e})=>{let i=ip(t,e);return{id:"audio-tracks-settings",weight:os["audio-language-settings"],type:"OPEN_SUB_MENU",ariaLabel:j("aria_label_menu_audio_languages",{actual:i}),icon:pv,label:j("menu_audio_languages"),value:i,children:"audio-tracks"}},"playback-rate-settings":({availablePlaybackRates:t,currentPlaybackRate:e})=>{var o;let i=((o=t.find(r=>r.value===e))==null?void 0:o.displayValue)||"";return{id:"playback-rate-settings",weight:os["playback-rate-settings"],type:"OPEN_SUB_MENU",ariaLabel:j("aria_label_menu_rate",{actual:i}),icon:fv,label:j("menu_playback_rate"),value:`${e}x`,children:"playback-rate"}},"subtitles-settings":({currentSubtitle:t})=>({id:"subtitles-settings",weight:os["subtitles-settings"],type:"OPEN_SUB_MENU",ariaLabel:j("aria_label_menu_subtitle",{actual:t.displayValue}),icon:la,iconProps:{type:"outline"},label:j("subtitles_caption"),value:t.displayValue,children:"subtitles"}),download:({onDownloadClick:t})=>({id:"download",weight:os.download,type:"CLICK",onClick:t,label:j("download_video_caption"),ariaLabel:j("aria_label_menu_download"),icon:mv}),"show-support":({onReportProblemClick:t})=>({id:"show-support",weight:os.report,type:"CLICK",onClick:t,label:j("menu_report"),ariaLabel:`${j("menu_report")}. ${j("aria_label_new_tab_alert")}`,icon:vv,isHiddenFor:["desktop"]}),"copy-data":({onCopyDataClick:t})=>({id:"copy-data",weight:os["copy-data"],type:"CLICK",onClick:t,label:j("menu_copy_debug"),ariaLabel:j("menu_copy_debug"),icon:op,isHiddenFor:["desktop"]}),"save-trace-info":({onSaveTraceDataClick:t})=>({id:"save-trace-info",weight:os["save-trace-info"],type:"CLICK",onClick:t,label:j("menu_save_debug"),ariaLabel:j("menu_save_debug"),icon:op,isHiddenFor:["desktop"]}),"debug-info":({toggleShowDebugInfo:t})=>({id:"debug-info",weight:os["debug-info"],type:"CLICK",onClick:t,ariaLabel:j("aria_label_menu_debug_overlay"),label:j("menu_debug_overlay"),icon:gv,isHiddenFor:["desktop"]})},Cb=({items:t,context:e,additionalSettingsMenuItems:i})=>{let{isMobile:o}=e;return[...t.map(r=>CC[r](e)),...i.map(r=>({...r,isAdditional:!0}))].filter(r=>{var a,l,d;return!((a=r==null?void 0:r.isHiddenFor)!=null&&a.length)||!((l=r==null?void 0:r.isHiddenFor)!=null&&l.includes("desktop"))&&!o||!((d=r==null?void 0:r.isHiddenFor)!=null&&d.includes("mobile"))&&o}).sort(Oa)};var EC=(t,e)=>{Mu(t,e)},PC=L('<div><div> </div> <div class="close s-u"></div></div>'),kC=L('<div data-testid="settings-menu" role="presentation"><!> <ul role="menu"></ul></div>'),AC=L("<div><!> <!></div>"),LC={hash:"s-u",code:'.settings-menu-container.mobile.s-u{width:100%;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.settings-menu-container.s-u ul{list-style-type:none;margin:0;padding:0}.settings-menu-container.s-u .menu{background-color:var(--settings-bg);border-radius:var(--settings-radius);overflow:hidden;transition:opacity .2s,visibility .2s}.settings-menu-container.s-u .menu .item:first-child:not(.mobile){border-top-left-radius:var(--settings-radius);border-top-right-radius:var(--settings-radius)}.settings-menu-container.s-u .menu .item:last-child{border-bottom-left-radius:var(--settings-radius);border-bottom-right-radius:var(--settings-radius)}.settings-menu-container.s-u .settings-menu .item:first-child:not(.mobile){padding-top:6px}.settings-menu-container.s-u .settings-menu .item:last-child:not(.mobile){padding-bottom:6px}.settings-menu-container.s-u .menu.desktop{bottom:0;max-width:100%;position:absolute;right:0}.settings-menu.s-u{line-height:40px}.settings-menu.desktop.s-u{min-width:300px}.settings-menu-container.s-u .menu.mobile{background:var(--mobile-settings-bg);font-size:15px;line-height:50px;width:100%}.settings-menu-container.s-u .menu.mobile.hidden{display:none}.settings-menu-container.s-u .menu .item:not(.switch-item),.settings-menu-container.s-u .menu .switch-wrapper{align-items:center;color:var(--white);cursor:pointer;display:flex;justify-content:flex-end;position:relative;white-space:nowrap}.settings-menu-container.s-u .menu .item:hover{background-color:var(--settings-item-bg-hover)}.settings-menu-container.s-u .menu .item.mobile:hover{background:var(--mobile-settings-bg)}.settings-menu.s-u .item:not(.switch-item),.settings-menu.s-u .switch-wrapper{padding:0 32px 0 18px}.settings-menu.s-u .item.mobile:not(.switch-item),.settings-menu.s-u .switch-wrapper.mobile{padding:0 14px}.settings-menu.s-u .icon-wrapper{align-items:center;display:flex;height:24px;justify-content:center;margin-right:16px;min-width:24px;width:24px}.settings-menu.s-u .label{flex-grow:1;margin-right:24px;overflow:hidden;text-overflow:ellipsis}.settings-menu.s-u .item.header.mobile:where(.s-u){border-bottom:var(--divider-border);color:var(--white);column-gap:12px;cursor:pointer;display:flex;justify-content:space-between;margin-bottom:4px}.settings-menu-container.s-u .items::-webkit-scrollbar{width:8px}.settings-menu-container.s-u .items::-webkit-scrollbar-track{background-color:#3a3a3a;border-radius:4px;box-shadow:none}.settings-menu-container.s-u .items::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#666;border:1px solid transparent;border-radius:5px;min-height:40px}.settings-menu-container.s-u .items::-webkit-scrollbar-thumb:hover{background-color:#777}.settings-menu-container.s-u .items.mobile{max-height:160px;overflow-x:hidden;overflow-y:auto;text-align:left}.close.s-u{height:12px;margin-right:-12px;padding:12px;position:relative;width:12px}.close.s-u:after,.close.s-u:before{background-color:var(--white);content:" ";height:12px;left:18px;position:absolute;width:2px}.close.s-u:before{transform:rotate(45deg)}.close.s-u:after{transform:rotate(-45deg)}'};function vc(t,e){B(e,!0),G(t,LC);let[i,o]=Ne(),r=()=>x(Be,"$settingsMenuVisible",i),a=()=>x(tt,"$settingsMenuOpenedByKeyboard",i),l=()=>x(He,"$debugPanelVisible",i),d=()=>x(ce,"$isMobile",i),s=()=>x(Te,"$playerSize",i),u=()=>x(xe,"$hasMpegSources$",i),m=()=>x(Re,"$mobileNotReportControlHidden$",i),p=()=>x(ge,"$autoQualityLimitingAvailable$",i),v=()=>x(K,"$availableSubtitlesList$",i),_=()=>x(Ve,"$isLiveWithPlaybackSpeed",i),y=()=>x(ee,"$availableAudioStreams$",i),b=()=>x(O,"$availablePlaybackRates$",i),w=()=>x(me,"$currentAudioStream$",i),I=()=>x(U,"$currentPlaybackRate$",i),T=()=>x(Je,"$trafficSavingEnabled",i),N=()=>x(be,"$currentQuality$",i),A=()=>x(pe,"$isAutoQualityEnabled$",i),E=()=>x(qe,"$currentSubtitle$",i),P=()=>x(xt,"$additionalSettingsMenuItems$",i),Q=()=>x(Ke,"$isAutoQualityAvailable$",i),F=()=>x(we,"$availableQualities$",i),z=()=>x(Ee,"$highQualityEnabled",i),X=h(e,"ref",15,void 0),se=h(e,"playerControlsHeight",3,0),Z=ai({}),oe=ai({}),J=_e(),Ce=Rt(),me=J.state.audioStream$,ee=J.state.availableAudioStreams$,be=J.state.currentQuality$,we=J.state.availableQualities$,ge=J.state.autoQualityLimitingAvailable$,pe=J.state.isAutoQualityEnabled$,Ke=J.state.isAutoQualityAvailable$,U=J.state.currentPlaybackRate$,O=J.state.availablePlaybackRates$,qe=J.state.currentSubtitle$,K=J.state.availableSubtitlesList$,ae=J.state.canDownload,xe=J.state.hasMpegSources$,Be=J.ui.settingsMenu.visible$,tt=J.ui.settingsMenu.openedByBtnKeyboard$,re=J.ui.settingsMenu.ref$,ce=J.ui.isMobile,Re=J.ui.mobileNotReportControlHidden$,Ve=J.state.canChangePlaybackSpeed$,Je=J.state.trafficSavingEnabled$,Ee=J.state.highQualityEnabled$,Te=J.ui.playerSize,He=J.ui.debugPanelVisible,Ct=J.state.isInteractiveTime$,xt=J.ui.additionalSettingsMenuItems$,At=J.ui.t,at=J.actions.internal.downloadVideo,Tt=J.actions.internal.closeSettingsMenu,jt=J.actions.internal.openSettingsSubMenu,It=J.actions.internal.closeSettingsSubMenu,Dt=q(!1),Ut=q(void 0),Y=gb();De(()=>{!r()&&Y.current&&(It(oe[Y.current]),Y.popAllSubMenus())}),De(()=>{r()||R(Ut,void 0)}),De(()=>{!Y.current&&n(Ut)&&A_(Z,n(Ut))}),De(()=>{X()&&re.set(X())});async function Pe(yt){var W;Y.pushSubMenu(yt),await uo(),jt(yt,oe[yt]);let Ot=(W=X())==null?void 0:W.firstElementChild;Ot&&Uf(Ot)}function le(yt){var Ot;yt==null||yt.stopPropagation(),a()||(Ot=e.returnFocus)==null||Ot.call(e),Tt(),R(Dt,!1)}function ye(yt,Ot){J.actions.internal.setQuality(yt,{appliesTo:Ot,byUser:!0}),le()}function Le(yt){J.actions.internal.setAudioStream(yt),le()}function nt(yt,Ot){J.actions.internal.setTrafficSavingEnabled(yt,Ot),Ce.features.qualityDetailsSubMenuEnabled&&le()}function Et(yt,Ot){J.actions.internal.setHighQualityEnabled(yt,Ot),le()}function fe(yt){J.actions.internal.setPlaybackRate(yt),le()}function Oe(yt){J.actions.internal.setSubtitle(yt),le()}function ze(){at()}function bt(){IC(e.supportLink)&&window.open(e.supportLink,"_blank"),J.actions.internal.reportProblem(),J.actions.internal.pause()}function zt(){Ml(J.actions.internal.getDebugTextData())}let Pt=()=>{let yt=J.actions.internal.getTraceTextData(),Ot=new Blob([...yt],{type:"application/json"}),W=window.URL.createObjectURL(Ot);Ma(W,"vk_player_trace_info","json")};function ui(){He.set(!l())}function di(){R(Dt,!0)}function Vi(){R(Dt,!1)}function Lt(){return d()?`max-height: ${Math.round(s().height*.6)}px`:`max-height: ${s().height-32-se()}px; overflow: auto;`}let pi=f(()=>ae&&u()&&!m()),hi=f(()=>Ce.features.trafficSaving&&!m()&&p()&&!Ce.features.qualityDetailsSubMenuEnabled),ut=f(()=>v().length>0&&!m()),Gt=f(()=>!!_()&&!m()),Ri=f(()=>Ce.features.audioLanguages&&y().length>=2&&!m()),bi=f(()=>!m());Vt(()=>Ct.subscribe(yt=>{yt&&!d()&&!n(Dt)&&!a()&&le()}));let ei=f(()=>{let yt=[n(bi)&&"quality-settings",n(Ri)&&"audio-tracks-settings",n(Gt)&&"playback-rate-settings",n(ut)&&"subtitles-settings",n(hi)&&"traffic-saving-switch",n(pi)&&"download",Ce.showSupport&&"show-support","copy-data",Ce.features.saveTraceInfoToFile&&"save-trace-info","debug-info"].filter(Ot=>!!Ot);return Cb({items:yt,context:{qualityDetailsSubMenuEnabled:Ce.features.qualityDetailsSubMenuEnabled,availablePlaybackRates:b(),currentAudioStream:w(),availableAudioStreams:y(),currentPlaybackRate:I(),selectPlaybackRate:fe,trafficSavingEnabled:T(),toggleTrafficSaving:nt,currentQuality:N()||Tb.INVARIANT,isAutoQualityEnabled:A()||!1,currentSubtitle:E(),isMobile:d(),onDownloadClick:ze,onCopyDataClick:zt,onReportProblemClick:bt,onSaveTraceDataClick:Pt,toggleShowDebugInfo:ui},additionalSettingsMenuItems:P()})}),mt=f(()=>Sb({subMenuId:Y.current,context:{availablePlaybackRates:b(),selectPlaybackRate:fe,trafficSavingEnabled:T(),toggleTrafficSaving:nt,currentQuality:N()||Tb.INVARIANT,isAutoQualityEnabled:A()||!1,isAutoQualityAvailable:Q()||!1,availableQualities:F(),highQualityEnabled:z(),toggleHighQuality:Et,availableAudioStreams:y(),availableSubtitlesList:v(),closeSettingsMenu:Tt,currentAudioStream:w(),isMobile:d(),selectAudioLanguage:Le,selectQuality:ye,selectSubtitle:Oe}}));var Ge=AC();let fi;var po=C(Ge);{var Go=yt=>{var Ot=kC();let W;Ot.__keydown=[EC,Tt];var Mt=C(Ot);{var ri=vt=>{var ot=PC();let Ni;var Pi=C(ot),cn=C(Pi,!0);S(Pi);var un=k(Pi,2);un.__click=le,S(ot),D((ki,Di)=>{Ni=ne(ot,1,"item header s-u",null,Ni,ki),ve(cn,Di)},[()=>({mobile:d()}),()=>At("submenu_settings")]),$(vt,ot)};V(Mt,vt=>{d()&&vt(ri)})}var pt=k(Mt,2);let Xt;_i(pt,21,()=>n(ei),vt=>vt.id,(vt,ot)=>{var Ni=Ae(),Pi=ue(Ni);{var cn=ki=>{iv(ki,{get isMobile(){return d()},get id(){return n(ot).id},get icon(){return n(ot).icon},get iconProps(){return n(ot).iconProps},get label(){return n(ot).label},get ariaLabel(){return n(ot).ariaLabel},get value(){return n(ot).value},get valueComponent(){return n(ot).valueComponent},onClick:()=>{Pe(n(ot).children),R(Ut,n(ot).id,!0)},get ref(){return Z[n(ot).id]},set ref(Di){Z[n(ot).id]=Di}})},un=(ki,Di)=>{{var Mn=io=>{let Ti=f(()=>`${n(ot).id}-menu-item`);ov(io,{get isMobile(){return d()},get id(){return n(Ti)},get onClick(){return n(ot).onClick},get icon(){return n(ot).icon},get label(){return n(ot).label},get ariaLabel(){return n(ot).ariaLabel},closeSettings:le})},go=(io,Ti)=>{{var Lo=Mo=>{let pn=f(()=>`${n(ot).id}-menu-item`);rv(Mo,{get isMobile(){return d()},get id(){return n(pn)},get onClick(){return n(ot).onClick},get icon(){return n(ot).icon},get label(){return n(ot).label},get ariaLabel(){return n(ot).ariaLabel},get enabled(){return n(ot).enabled},get tooltipText(){return n(ot).tooltipText},get maxTooltipWidth(){return n(ot).maxTooltipWidth}})};V(io,Mo=>{n(ot).type==="SWITCH"&&Mo(Lo)},Ti)}};V(ki,io=>{n(ot).type==="CLICK"?io(Mn):io(go,!1)},Di)}};V(Pi,ki=>{n(ot).type==="OPEN_SUB_MENU"?ki(cn):ki(un,!1)})}$(vt,Ni)}),S(pt),je(pt,vt=>X(vt),()=>X()),S(Ot),D((vt,ot,Ni)=>{W=ne(Ot,1,"settings-menu menu s-u",null,W,vt),Xt=ne(pt,1,"items",null,Xt,ot),We(pt,Ni)},[()=>({desktop:!d(),mobile:d(),hidden:!!Y.current}),()=>({mobile:d()}),Lt]),st("mouseenter",Ot,di),st("mouseleave",Ot,Vi),$(yt,Ot)};V(po,yt=>{r()&&yt(Go)})}var Yo=k(po,2);_i(Yo,17,()=>n(mt),yt=>yt.id,(yt,Ot)=>{let W=f(()=>{var Mt;return(Mt=n(Ot).minWidth)!=null?Mt:137});tv(yt,{get isMobile(){return d()},get playerControlsHeight(){return se()},get returnFromSubMenu(){return Y.popSubMenu},get id(){return n(Ot).id},get title(){return n(Ot).title},get closeSettingsMenu(){return Tt},openSubMenuList:Pe,get items(){return n(Ot).items},get minWidth(){return n(W)},get refMenuItems(){return Z},get listRef(){return oe[n(Ot).id]},set listRef(Mt){oe[n(Ot).id]=Mt}})}),S(Ge),D(yt=>fi=ne(Ge,1,"settings-menu-container s-u",null,fi,yt),[()=>({mobile:d(),hidden:!r()})]),$(t,Ge),H(),o()}Qe(["keydown","click"]);var MC=L('<button class="btn s-1f"> </button>'),VC={hash:"s-1f",code:"button.btn.s-1f{background:hsla(0,0%,100%,.1);border-radius:8px;font-size:14px;line-height:18px;margin-top:12px;padding:6px 12px 7px}"};function _v(t,e){G(t,VC);var i=MC();i.__click=function(...r){var a;(a=e.onClick)==null||a.apply(this,r)};var o=C(i,!0);S(i),D(()=>ve(o,e.label)),$(t,i)}Qe(["click"]);var RC=L('<div class="container s-12"><div class="notification s-12"><div><p class="description s-12"><!></p> <!></div> <!></div></div>'),NC={hash:"s-12",code:".container.s-12{display:flex;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:20px;z-index:var(--controls-container-z-index)}.notification.s-12{background:var(--notification-bg);border-radius:var(--notification-radius);display:inline-flex;gap:10px;padding:9px 14px 10px 12px;pointer-events:auto}.description.s-12{font-size:13px;line-height:16px;margin:0;white-space:pre}"};function gc(t,e){B(e,!0),G(t,NC);let i=340,{features:{forceAutoQualityWhenSevereStallHappens:o}}=Rt(),{ui:{t:r}}=_e(),a=r(o?"slow_video_notification_force_description":"slow_video_notification_suggest_description");var l=RC(),d=C(l),s=C(d),u=C(s),m=C(u);mc(m,{get message(){return a}}),S(u);var p=k(u,2);{var v=y=>{let b=f(()=>r("slow_video_notification_button"));_v(y,{get label(){return n(b)},get onClick(){return e.onSelectAutoQuality}})};V(p,y=>{o||y(v)})}S(s);var _=k(s,2);Rs(_,{get onClick(){return e.onClose}}),S(d),S(l),es(3,d,()=>_s,()=>({duration:i})),$(t,l),H()}import{isIntersecting as Ib,Subscription as DC}from"@vkontakte/videoplayer-shared/es2018";var Ja="annotation",np=class{constructor(e){this.slots=new Map;this.disabledIds=new Set(e)}init(e,i){this.shadowRootContainer=e,this.store=i}add(e,i){var s;let{overlay:o,id:r,controlsBehaviour:a,hideAllControls:l}=i;if(this.disabledIds.has(r))return{success:!1,message:"current slotId is disabled via config"};let d=typeof e=="function"?e():e;return d.setAttribute("slot",Ja),this.setupSlotStyles(d,o),this.shadowRootContainer.append(d),this.slots.set(r,{rootElement:d,options:i}),a&&this.runHidingControlsWhenIntersected(r,a),l&&((s=this.store)==null||s.ui.isControlsAvailable.set(!1)),{success:!0}}setupSlotStyles(e,i){switch(e.style.position="absolute",i){case"over_video":e.style.zIndex="calc(var(--video-container-z-index) + 1)";break;case"over_controls":e.style.zIndex="calc(var(--controls-container-z-index) + 1)";break;default:e.style.zIndex="0"}}async runHidingControlsWhenIntersected(e,{observedSlotElementId:i,controlsToObserve:o}){var m;let r=this.slots.get(e);if(!r)return;let a=await this.findSlotElement(r.rootElement,i,e),{controls:l,hiddenControls:d}=((m=this.store)==null?void 0:m.ui)||{},s=new MutationObserver(p=>p.forEach(()=>{let v=Ds(a,this.shadowRootContainer);o.forEach(_=>{let y=l==null?void 0:l[_],b=y?$e(y):null,w=d==null?void 0:d[_];b&&(w==null||w.set(Ib(b,v)))})}));s.observe(a,{childList:!0,subtree:!0}),r.observer=s;let u=new DC;o.forEach(p=>{l&&u.add(l[p].subscribe(v=>{let _=d==null?void 0:d[p];v&&v.isDisplayed?_==null||_.set(Ib(v,Ds(a,this.shadowRootContainer))):_==null||_.set(!1)}))}),r.subs=u}async findSlotElement(e,i,o){return new Promise(r=>{let a=null,l=new MutationObserver(()=>{if(a=e.querySelector(`#${i}`),a){l.disconnect();let s=this.slots.get(o);s&&(s.observerForFindingSlotElement=void 0),r(a)}});l.observe(e,{childList:!0,subtree:!0});let d=this.slots.get(o);d&&(d.observerForFindingSlotElement=l)})}remove(e){var u,m;let i=this.slots.get(e);if(!i)return;let{rootElement:o,observer:r,observerForFindingSlotElement:a,subs:l,options:{controlsBehaviour:d,hideAllControls:s}}=i;o&&o.remove(),[r,a].forEach(p=>p==null?void 0:p.disconnect()),l==null||l.unsubscribe(),this.slots.delete(e),s&&((u=this.store)==null||u.ui.isControlsAvailable.set(!0)),(m=d==null?void 0:d.controlsToObserve)==null||m.forEach(p=>{var v,_;(_=(v=this.store)==null?void 0:v.ui.hiddenControls[p])==null||_.set(!1)})}destroy(){for(let e in this.slots.keys())this.remove(e);this.slots.clear()}haveSlots(){return this.slots.size>0}};var OC=L('<div class="container s-5"><!></div>'),BC={hash:"s-5",code:".container.s-5{align-items:center;animation-fill-mode:forwards;animation-name:s-5-videoPlayerStatusIconPopup;background-color:#00000073;border-radius:100%;display:flex;height:64px;justify-content:center;width:64px;will-change:opacity,scale}@keyframes s-5-videoPlayerStatusIconPopup{0%{opacity:0;scale:.6}10%{animation-timing-function:ease-in;opacity:1;scale:1}75%{opacity:1;scale:1}90%{animation-timing-function:ease-out;opacity:0;scale:.4}to{opacity:0;scale:0}}"};function hc(t,e){B(e,!0),G(t,BC);let i=h(e,"reversed",3,!1);var o=Ae(),r=ue(o);As(r,()=>e.Icon,a=>{var l=OC(),d=C(l);Mi(d,()=>e.Icon,(s,u)=>{u(s,{get size(){return"48"},get reversed(){return i()}})}),S(l),D(()=>We(l,`animation-duration: ${e.duration}ms`)),$(a,l)}),$(t,o),H()}import{PlaybackState as Eb}from"@vkontakte/videoplayer-core/es2018";var HC=L('<div class="container s-z"><!></div>'),FC={hash:"s-z",code:".container.s-z{align-items:center;display:flex;height:100%;justify-content:center;pointer-events:none;position:absolute;width:100%}"};function bv(t,e){B(e,!0),G(t,FC);let[i,o]=Ne(),r=()=>x(s,"$playbackState$",i),a=()=>x(m,"$previewTrackActive",i),l=()=>x(p,"$previewTrackDragInProgress",i),d=()=>x(u,"$isPlaying$",i),{state:{playbackState$:s,isPlaying$:u},ui:{previewTrackActive:m,previewTrackDragInProgress:p}}=_e(),{features:{playbackStatusShow:v},playbackStatusAnimationDuration:_}=Rt(),y=0,b=q(null),w=q(!1);De(()=>{r()===Eb.PLAYING?R(b,An,!0):r()===Eb.PAUSED?R(b,Hs,!0):R(b,null)}),De(()=>{if(!(!v||a()||l()))return y=window.setTimeout(()=>{y=0,R(b,null)},_),()=>{y&&(window.clearTimeout(y),y=0)}}),De(()=>{d()&&!n(w)&&(R(w,!0),R(b,null))});var I=Ae(),T=ue(I);{var N=A=>{var E=HC(),P=C(E);hc(P,{get duration(){return _},get Icon(){return n(b)}}),S(E),$(A,E)};V(T,A=>{n(b)&&v&&A(N)})}$(t,I),H(),o()}var UC=L('<div><div data-testid="video-container"></div></div>'),zC={hash:"s-d",code:".video-container.s-d,.video-wrapper.s-d{height:100%;left:0;position:absolute;top:0;width:100%}.video-wrapper.s-d{background:var(--black)}.video-container.s-d,.video-wrapper.s-d{z-index:var(--video-container-z-index)}.video-container.s-d{transition:var(--rotate-transition-duration) ease all}.video-container.fast-rotate.s-d{transition:none}.nocursor.s-d{cursor:none}"};function el(t,e){B(e,!0),G(t,zC);let[i,o]=Ne(),r=()=>x(p,"$rotateAlpha",i),a=()=>x(v,"$playerSize",i),l=()=>x(m,"$playerPhase",i),d=()=>x(y,"$chromecastConnected$",i),s=()=>x(_,"$isPlaying$",i),u=h(e,"videoContainer",15),{playerPhase:m,ui:{rotateAlpha:p,playerSize:v},state:{isPlaying$:_,chromecastConnected$:y}}=_e(),{isSmoothVideoRotate:b}=Rt(),w=f(()=>u()&&r()%180?a().height/a().width:1);var I=UC();let T;I.__contextmenu=function(...E){var P;(P=e.onContextMenu)==null||P.apply(this,E)},I.__mousedown=function(...E){var P;(P=e.onMouseDown)==null||P.apply(this,E)},I.__mouseup=function(...E){var P;(P=e.onMouseUp)==null||P.apply(this,E)},I.__click=function(...E){var P;(P=e.onClick)==null||P.apply(this,E)},I.__dblclick=function(...E){var P;(P=e.onDblClick)==null||P.apply(this,E)};var N=C(I);let A;je(N,E=>u(E),()=>u()),S(I),D((E,P)=>{T=ne(I,1,"video-wrapper s-d",null,T,E),A=ne(N,1,"video-container s-d",null,A,P),We(N,`transform: rotate(${r()}deg) scale(${n(w)})`),Me(N,"data-is-playing",s())},[()=>({hidden:l()!=="video"||d(),nocursor:e.hideCursor}),()=>({"fast-rotate":!b})]),$(t,I),H(),o()}Qe(["contextmenu","mousedown","mouseup","click","dblclick"]);var WC=L('<div><span class="text s-y"> </span> <!></div>'),KC={hash:"s-y",code:".root.s-y{background-color:var(--double-forward-bg);border-radius:100px;color:var(--white);display:flex;gap:4px;left:50%;opacity:0;padding:6px 12px;pointer-events:none;position:absolute;top:24px;transition:opacity var(--controls-transition-duration) var(--controls-transition-fn);visibility:hidden}.root.s-y,.root.visible.s-y{transform:translateX(-50%)}.root.visible.s-y{opacity:1;visibility:visible}.text.s-y{font-size:13px;font-weight:600;line-height:16px}"};function $v(t,e){B(e,!0),G(t,KC);let{ui:{t:i}}=_e();var o=WC();let r;var a=C(o),l=C(a,!0);S(a);var d=k(a,2);dc(d,{get size(){return"16"},fill:"currentColor"}),S(o),D((s,u)=>{r=ne(o,1,"root s-y",null,r,s),ve(l,u)},[()=>({visible:e.isVisible}),()=>i("double_forward_label")]),$(t,o),H()}var qC=L('<div class="container s-11" role="button" data-testid="preview-track-overlay"><div class="icon s-11"><!></div></div>'),QC={hash:"s-11",code:".container.s-11{background-color:rgba(0,0,0,.48);cursor:pointer;height:100%;position:absolute;width:100%}.container.s-11,.icon.s-11{align-items:center;display:flex;justify-content:center}.icon.s-11{background-color:#00000073;border-radius:100%;height:64px;transition:transform .2s;transition-timing-function:ease-out;width:64px;will-change:transform}.container.s-11:hover .icon:where(.s-11){transform:scale(1.15)}"};function yv(t,e){B(e,!1),G(t,QC);let o=_e().actions.internal.closePreviewTrack,r=200,a=u=>{u.stopPropagation(),o()};mo();var l=qC();l.__click=a;var d=C(l),s=C(d);return An(s,{get size(){return"32"}}),S(d),S(l),es(3,l,()=>_s,()=>({duration:r})),$(t,l),pf(e,"handleClick",a),H({handleClick:a})}Qe(["click"]);var GC=L('<div class="container s-13"><div class="notification s-13"><span class="text s-13"> </span></div></div>'),YC={hash:"s-13",code:".container.s-13{display:flex;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:20px}.notification.s-13{background-color:var(--black-alpha-40);border-radius:var(--notification-radius);padding:10px 16px}.text.s-13{font-size:14px;font-weight:500;line-height:18px}"};function xv(t,e){B(e,!1),G(t,YC);let{ui:{t:i}}=_e();mo();var o=GC(),r=C(o),a=C(r),l=C(a,!0);S(a),S(r),S(o),D(d=>ve(l,d),[()=>i("preview_track_notification_text")],Sn),es(3,r,()=>_s,()=>({duration:340})),$(t,o),H()}var jC=(t,e,i,o,r,a)=>{if(t.stopPropagation(),e()||o()){a();return}},XC=L("<div><!></div>"),ZC=L('<div class="spherical-video-icon s-8"><!></div>'),JC=L("<div><!></div>"),eT=L('<div class="settings-menu s-8"><!></div>'),tT=L("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),iT=L("<!> <!> <!>",1),oT=L('<div class="blocked s-8"></div>'),nT=L('<div class="player-wrapper s-8"><!> <div class="overlay-container"></div></div> <!>',1),rT={hash:"s-8",code:".blocked.s-8,.player-wrapper.s-8{height:100%;position:absolute;width:100%}.blocked.s-8{z-index:var(--overlay-container-z-index)}.player-wrapper.s-8 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.spherical-video-icon.s-8{display:inline-block;left:calc(50% - 38px);position:absolute;top:calc(50% - 23px)}.ads-container.s-8{background:var(--black);height:100%;left:0;position:absolute;top:0;width:100%;z-index:var(--ads-container-z-index)}.settings-menu.s-8{bottom:57px;left:0;position:absolute;right:18px;transition:opacity .2s;z-index:var(--settings-menu-z-index)}"};function wv(t,e){B(e,!0),G(t,rT);let[i,o]=Ne(),r=()=>x(Br,"$notificationsToShow$",i),a=()=>x(hi,"$playerPhase",i),l=()=>x(Go,"$isLoaderVisible",i),d=()=>x(Vi,"$adPlaybackState",i),s=()=>x(pt,"$crashed",i),u=()=>x(Di,"$isInteractiveTime$",i),m=()=>x(bi,"$settingsMenuVisible",i),p=()=>x(Mn,"$isInteractiveExpectation$",i),v=()=>x(Ri,"$controlsVisible",i),_=()=>x(io,"$touched",i),y=()=>x(ns,"$graphIsOpened$",i),b=()=>x(ut,"$isFullscreen",i),w=()=>x(Zn,"$autoplayNextEnabled$",i),I=()=>x(W,"$postrollPassed",i),T=()=>x(Yo,"$isEnded$",i),N=()=>x(gn,"$cursorInside",i),A=()=>x(fn,"$isControlsAvailable",i),E=()=>x(fr,"$doubleForwardOn$",i),P=()=>x(Jn,"$fakeIsPlaying$",i),Q=()=>x(Dn,"$bottomNoSmooth",i),F=()=>x(Vr,"$interactiveTimeIndicator",i),z=()=>x(Pi,"$playerSize",i),X=()=>x(cn,"$is3DVideo",i),se=()=>x(mr,"$doubleForwardAvailable$",i),Z=()=>x(fi,"$contextMenuVisible$",i),oe=()=>x(di,"$playbackState$",i),J=()=>x(Ti,"$hotKeyMapData",i),Ce=()=>x(mt,"$scrubbingInProgress",i),me=()=>x(Ge,"$volumeChangingInProgress",i),ee=()=>x(yt,"$chromecastConnected$",i),be=()=>x(On,"$controlsTimeoutActive",i),we=()=>x(ei,"$settingsMenuOpenedByKeyboard",i),ge=()=>x(So,"$contextMenuOpenedByKeyboard$",i),pe=()=>x(Bo,"$contextMenuOpenedByHotKey$",i),Ke=()=>x($n,"$contextMenuButtonRef$",i),U=()=>x(or,"$contextMenuLastActiveElem$",i),O=()=>x(Gt,"$isFullscreenOpenedByKeyboard",i),qe=()=>x(Mo,"$positionExact$",i),K=()=>x(ui,"$language$",i),ae=()=>x(Cr,"$previewTrackActive$",i),xe=()=>x(un,"$icon3DVideoVisible",i),Be=()=>x(Ot,"$chromecastDeviceName$",i),tt=()=>x(ot,"$currentSubtitle$",i),re=()=>x(Ni,"$currentSubtitleCaptions$",i),ce=()=>x(Lt,"$position$",i),Re=()=>x(pi,"$duration$",i),Ve=()=>x(Mt,"$isLive$",i),Je=()=>x(ri,"$isPlaying$",i),Ee=()=>x(Nr,"$contextMenuPosition$",i),Te=()=>x(jo,"$previewTrackNotificationVisible$",i),He=()=>x(Lo,"$showHotKeyMap",i),Ct=()=>x(po,"$debugPanelVisible",i),xt=()=>x(Or,"$userActionsDisabled$",i),At=h(e,"videoContainer",15),at=h(e,"adsSlotId",3,void 0),Tt=h(e,"adsParams",3,void 0),jt=h(e,"adsAutoplayParam",3,void 0),It=h(e,"duration",3,void 0),Dt=h(e,"logoTargetUrl",3,""),Ut=h(e,"showNextPrevButtons",3,!1),Y=h(e,"nextButtonActive",3,!1),Pe=h(e,"prevButtonActive",3,!1),le=h(e,"endScreenVideoTitle",3,void 0),ye=h(e,"endScreenVideoThumb",3,void 0),Le=h(e,"isOneVideoPlaylist",3,!1),nt=h(e,"shadowRootContainer",3,void 0),Et=h(e,"outerContainerRef",3,void 0),fe=h(e,"playerStarted",3,!1),Oe=h(e,"fullScreenTarget",3,void 0),ze=h(e,"showMiniTimer",3,!1),bt=h(e,"showEndScreen",3,!0),zt=h(e,"keyboardControls",15),Pt=e.store.getLogger().createComponentLog("Root component"),ui=e.store.interfaceLanguage$,di=e.store.state.playbackState$,Vi=e.store.ads.playbackState,Lt=e.store.state.positionWithScrubbing$,pi=e.store.state.duration$,hi=e.store.playerPhase,ut=e.store.ui.isFullscreen,Gt=e.store.ui.isFullscreenOpenedByKeyboard,Ri=e.store.ui.controlsVisible,bi=e.store.ui.settingsMenu.visible$,ei=e.store.ui.settingsMenu.openedByBtnKeyboard$,mt=e.store.ui.scrubbingInProgress,Ge=e.store.ui.volumeChangingInProgress,fi=e.store.ui.contextMenu.visible$,po=e.store.ui.debugPanelVisible,Go=e.store.state.isLoaderVisible,Yo=e.store.state.isEnded$,yt=e.store.state.chromecastConnected$,Ot=e.store.state.chromecastDeviceName$,W=e.store.ads.postrollPassed,Mt=e.store.state.isLive$,ri=e.store.state.isPlaying$,pt=e.store.state.crashed$,Xt=e.store.webApi.annotationsApi,vt=e.store.webApi.pictureInPictureApi,ot=e.store.state.currentSubtitle$,Ni=e.store.state.currentSubtitleCaptions$,Pi=e.store.ui.playerSize,cn=e.store.ui.is3DVideo,un=e.store.ui.icon3DVideoVisible,ki=e.store.state.isInteractive,Di=e.store.state.isInteractiveTime$,Mn=e.store.state.isInteractiveExpectation$,go=e.store.state.hasInteractiveBranches,io=e.store.ui.touched,Ti=e.store.ui.modals.hotKeyMap.data,Lo=e.store.ui.modals.hotKeyMap.show,Mo=e.store.state.positionExact$,pn=e.store.ui.overlayContainer$,Vr=e.store.ui.controls.interactiveTimeIndicator,Rr=e.store.state.showInteractiveTimeIndicator,Nr=e.store.ui.contextMenu.position$,bs=e.store.actions.internal.setQuality,Dr=e.store.actions.internal.closeSettingsMenu,Zn=e.store.ui.autoplayNextEnabled$,Or=e.store.ui.userActionsDisabled,fn=e.store.ui.isControlsAvailable,mn=e.store.ui.videoTitleInfo,fr=e.store.ui.doubleForwardOn$,mr=e.store.ui.doubleForwardAvailable$,jo=e.store.ui.previewTrackNotificationVisible,vr=e.store.actions.internal.getVideoElement,gr=e.store.actions.internal.checkFullscreenSupport,{fakeIsPlaying$:Jn,notifications$:Vn,graphIsOpened$:ns}=vo(),Vo=q(void 0),hr=q(void 0),Oi=q(void 0),_r=q(void 0),Rn,ct,Zt;Ti.set(w_());let{closeNotification:br,notificationsToShow$:Br}=Vn,Hr=f(()=>!!r().slow_video),Nn=()=>br("slow_video"),er=f(()=>(a()==="video"&&l()||a()==="ads"&&d()==="inactive")&&!s()),ho=q(void 0),Dn=de(!1),tr,On=de(!1),vn=de(),gn=de(!1),hn=q(!1),Xo=q(!1),Bi=q(!1),Yi=q(!(e.autoplay&&!e.uiConfig.controls.showOnStartupAtAutoplay)),Zo=f(()=>u()&&!m()&&!(n(hn)||n(Xo))&&!(n(Bi)&&!p())),ir=!0,$r=f(()=>e.uiConfig.features.thumbTimer&&ze()&&a()==="video"&&!v()&&!s()&&!ki&&(e.uiConfig.hideThumbTimerAfterTouch&&!_()||!e.uiConfig.hideThumbTimerAfterTouch)),_n=e.uiConfig.titleShowBehaviour,yr=f(()=>!["video","thumb"].includes(a())||_n==="never"||y()?!1:_n==="fullscreen"?b():!0),lt=f(()=>_n==="always"||a()==="thumb"?!1:!v()),$t=q(!1),oo=f(()=>(bt()||e.showAutoplayNext&&w())&&!!le()&&!!ye()&&(e.showAds&&I()||!e.showAds)&&T()&&!s()&&!n($t)&&!go),fo=f(()=>N()&&!(v()||n(oo))&&!u()&&A()&&!E()),Jo=q(!1),_o=f(()=>P()!==null),{toggle:bo}=Jn,Ii=!1,$o=null;vt==null||vt.setContext(od());let Fr=()=>{e.autoplay&&!ki&&e.uiConfig.controls.showOnStartupAtAutoplay&&Hi(e.uiConfig.controls.hideTimeout)};e.store.setUiCallbacks({onStarted:Fr});let xr=()=>{window.clearTimeout(Rn),On.set(!1)},$s=()=>{window.clearTimeout(ct),vn.set(null)},Hi=he=>{xr(),On.set(!0),Rn=window.setTimeout(()=>On.set(!1),he);let gt=he-100;tr=window.setTimeout(()=>{Q()&&Dn.set(!1)},gt>0?gt:he)},ys=(he,gt)=>{$s(),vn.set(gt),ct=window.setTimeout(()=>vn.set(null),he)},rs=cn.subscribe(he=>{un.set(he),he&&(window.clearTimeout(Zt),Zt=window.setTimeout(()=>un.set(!1),e.uiConfig.controls.hide360IconTimeout))}),wr=async()=>{var gt,Jt,Qt,To;let he=oa();if(he){let ro=Ad(),Ho=en();he=ro===Ho||ro===nt()}if(he){Hi(e.uiConfig.controls.hideTimeoutFullscreen);try{await(vt==null?void 0:vt.exit())}catch(ro){Pt({message:String(ro)})}}ut.set(he),e.store.getAdmanWrapper().setFullscreen(he),b()?(Jt=(gt=e.store.callbacks)==null?void 0:gt.onFullscreenEnter)==null||Jt.call(gt):(To=(Qt=e.store.callbacks)==null?void 0:Qt.onFullscreenExit)==null||To.call(Qt)},Ro=he=>{let{width:gt,height:Jt}=he.target;Pi.set({width:gt,height:Jt})},Ur=()=>{let{width:he,height:gt}=n(Vo).getBoundingClientRect();Pi.set({width:he,height:gt})};Vt(()=>{var gt;return Au(wr),e.uiConfig.features.annotationsInside&&(Xt==null||Xt.init(n(Vo))),Na(vt)&&(vt==null||vt.assignPlayerContainer(n(Vo)),vt==null||vt.setExternalEventHandlers({resize:Ro,leavepictureinpicture:Ur})),e.interactiveContainer&&((gt=At().parentElement)==null||gt.insertBefore(e.interactiveContainer,At().nextSibling)),()=>{window.clearTimeout(Rn),window.clearTimeout(tr),window.clearTimeout(ct),window.clearTimeout(Zt),rs(),vt==null||vt.dispose().catch(Jt=>{Pt({message:String(Jt)})}),Lu(wr)}});let en=()=>{let he=e.uiConfig.features.fullscreenInternalTargetPlayerContainer||!Et()?n(Vo):Et(),gt=he.getRootNode(),Jt=gt instanceof ShadowRoot?gt.host:gt,Qt=Oe()instanceof HTMLElement&&Oe().contains(Jt);return e.uiConfig.allowChangingFullscreenTarget&&Oe()&&Qt?Oe():he},tn=()=>{fi.set(!1)},Fe=()=>{Dr(),tn()},wt=async()=>{if(!gr()){Pt({message:"fullscreen disabled"});return}tn(),oa()?(await ku(document),Pt({message:"exit fullscreen"})):(Pt({message:"request fullscreen"}),await Pu(en()))},ci=he=>{y()||(he.preventDefault(),fi.set(!0),Nr.set({left:he.clientX,top:he.clientY}))};function No(){gn.set(!0),ki||Hi(e.uiConfig.controls.hideTimeoutCursor)}function yo(he){var To,ro;let{relatedTarget:gt}=he,Qt=!!(gt&&((To=n(Oi))!=null&&To.contains(gt)))&&((ro=zt())==null?void 0:ro.isFocused());!ki&&!Qt&&(Dn.set(!0),Hi(e.uiConfig.controls.hideTimeoutCursor))}function Do(){gn.set(!1),R(Xo,!1),R(hn,!1),Ii=!1,e.store.actions.internal.releaseCamera(),Hi(e.uiConfig.controls.hideTimeout),E()&&Oo()}function Fi(he){return he?he.offsetTop+Fi(he.offsetParent):0}function xo(he){return he?he.offsetLeft+xo(he.offsetParent):0}function Bn(he){if(F()&&Rr){let gt=he.currentTarget,Jt=Fi(gt),Qt=xo(gt),To=he.pageX-Qt,ro=he.pageY-Jt,{left:Ho,bottom:Cs,right:Kr}=F(),Tr=Kr-Ho;return To>=Ho-Tr&&ro<=Cs+Tr}}function Sr(he){if(n(Vo)){let gt=Fi(he.currentTarget),Jt=z().height,Qt=he.pageY-gt;if(Bn(he)){R(Xo,!1);return}Qt<40?R(Xo,!0):Qt>Jt-40?R(hn,!0):(R(Xo,!1),m()||R(hn,!1))}}function wo(he){Sr(he),!n(Zo)&&!E()&&Hi(e.uiConfig.controls.hideTimeoutCursor),X()&&Ii&&$o&&e.store.actions.internal.moveCameraFocusPX($o.clientX-he.clientX,$o.clientY-he.clientY,he.timeStamp-$o.timeStamp),$o=he}let no=null,bn=()=>{no=window.setTimeout(()=>{e.store.actions.internal.changeDoubleForwardOn(!0),xr()},e.uiConfig.doubleForwardActivationTime)},Oo=()=>{e.store.actions.internal.changeDoubleForwardOn(!1),no&&clearTimeout(no),no=null},Hn=he=>{he.preventDefault(),he.button===0&&(Ii=!0,e.store.actions.internal.holdCamera(),se()&&bn()),!Ii&&Hi(e.uiConfig.controls.hideTimeoutCursor)},zr=he=>{he.preventDefault(),he.button===0&&($o=he,Ii=!1,e.store.actions.internal.releaseCamera()),!E()&&Hi(e.uiConfig.controls.hideTimeoutCursor)},Wr=he=>{he.preventDefault(),ir&&(Pt({message:"double click on video"}),wt(),Hi(e.uiConfig.controls.hideTimeoutCursor))},Fn=he=>{var gt;if(he.preventDefault(),E()){Oo();return}if(no&&Oo(),Z()||m()){Fe();return}if(!(T()&&!go)){if(n(_o))return bo();if((gt=zt())==null||gt.focus(),!fe()){e.firstStart(),Hi(e.uiConfig.controls.hideTimeoutCursor);return}(!e.uiConfig.preventPauseOnVideoClick||oe()!==kb.PLAYING)&&e.store.actions.internal.togglePlay(),Hi(e.uiConfig.controls.hideTimeoutCursor)}},Ze=he=>{Fe(),io.set(!0),Hi(e.uiConfig.controls.hideTimeout),he&&ys(e.uiConfig.controls.hideHotKeyHelpers,he)},Yt=()=>{var he,gt;Fe(),(he=e.store.callbacks)!=null&&he.onOpenHotKeyMap?(gt=e.store.callbacks)==null||gt.onOpenHotKeyMap(J()):Lo.update(Jt=>!Jt)},$i=()=>{io.set(!0)},So=e.store.ui.contextMenu.openedByBtnKeyboard$,$n=e.store.ui.contextMenu.btnRef$,Un=q(void 0),Bo=e.store.ui.contextMenu.openedByHotKey$,or=e.store.ui.contextMenu.lastActiveElem$,ss=q(!1),Cr=e.store.ui.previewTrackActive;De(()=>{pn.set(n(ho))}),De(()=>{R(Bi,n(Yi)&&oe()!==kb.PLAYING,!0),n(Yi)||St(()=>R(Yi,!0))}),De(()=>{var gt,Jt;let he=(n(Bi)||T()||m()||Ce()||me()||ee()||be()||n(ss))&&!n(Zo)&&(a()==="video"||a()==="ads")&&!s()&&A();Ri.set(he),!he&&!be()&&((gt=n(Oi))!=null&>.contains(Bu()))&&((Jt=zt())==null||Jt.focus())}),De(()=>{!Ce()&&n(Jo)&&!u()&&Hi(e.uiConfig.controls.hideTimeoutCursor),St(()=>R(Jo,Ce(),!0))}),De(()=>{n(_r),m(),we(),St(()=>Od(n(_r),m(),we()))}),De(()=>{n(Un),Z(),ge(),pe(),St(()=>{let he=ge()||pe();Od(n(Un),Z(),he)})}),De(()=>{let he=Ke();he&&(Z(),St(()=>Vl(he,Z(),So)))}),De(()=>{let he=U();he&&(Z(),St(()=>k_(he,Z(),Bo)))}),De(()=>{var he;!O()&&b()&&(St(()=>Gt.set(!1)),(he=zt())==null||he.focus())}),De(()=>{y()&&Fe()});let xs=q(void 0),Us=he=>{mn.set(jn(vr(),{title:n(xs)},"title",he))},ua=(he,gt)=>{var ro,Ho;let Jt=(Ho=(ro=e.store.callbacks)==null?void 0:ro.uiInfo)==null?void 0:Ho.onUpcomingLiveViewStateChanged;if(!Jt)return;let Qt=!!gt,To={...jn(n(Vo),{upcomingLiveScreen:gt},"upcomingLiveScreen",Qt),...he};Jt(To)},rt="",si=f(()=>{var he;return n(lt)?rt:(he=e.getVideoDeeplink)==null?void 0:he.call(e,qe())});De(()=>{rt=n(si)});var Co=nT();st("blur",Ca,Fe);var yi=ue(Co);yi.__mousemove=wo;var yn=C(yi);let xn=f(()=>a()==="ads"),ws=f(()=>n(_o)?bo:void 0);je(Gf(yn,{startDoubleForwardActivationTimer:bn,stopDoubleForward:Oo,toggleFullscreen:wt,hideContextMenu:Fe,showHotKeyHelpers:Ze,showKeyMap:Yt,get isAds(){return n(xn)},get fakePlayButtonHandler(){return n(ws)},get nextButtonActive(){return Y()},get prevButtonActive(){return Pe()},children:(he,gt)=>{var Jt=iT(),Qt=ue(Jt);el(Qt,{get hideCursor(){return n(fo)},onClick:Fn,onContextMenu:ci,onMouseDown:Hn,onMouseUp:zr,onDblClick:Wr,get videoContainer(){return At()},set videoContainer(Ho){At(Ho)}});var To=k(Qt,2);Aa(To,()=>"slot",!1,(Ho,Cs)=>{Ji(Ho,()=>({name:Ja}))});var ro=k(To,2);As(ro,K,Ho=>{var Cs=tT(),Kr=ue(Cs);let Tr=f(()=>a()!=="thumb"||s()||ki&&e.autoplay);ja(Kr,{get hidden(){return n(Tr)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart},onContextMenu:ci,onClick:tn});var pa=k(Kr,2);{var zs=Ue=>{yv(Ue,{})};V(pa,Ue=>{ae()&&Ue(zs)})}var fa=k(pa,2);bv(fa,{});var qr=k(fa,2);$v(qr,{get isVisible(){return E()}});var wn=k(qr,2);{var tl=Ue=>{let gi=f(()=>{var so;return(so=e.live)==null?void 0:so.startTime});pc(Ue,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(gi)},onUpcomingLiveViewStateChanged:ua,onContextMenu:ci,onClick:tn})};V(wn,Ue=>{a()==="LiveWaitingStart"&&Ue(tl)})}var ma=k(wn,2);{var Qr=Ue=>{Xa(Ue,{kind:"recover",get thumbUrl(){return e.thumbUrl},onContextMenu:ci,onClick:tn})};V(ma,Ue=>{a()==="LiveWaitingRecover"&&Ue(Qr)})}var il=k(ma,2);{var jl=Ue=>{Xa(Ue,{kind:"record",get thumbUrl(){return e.thumbUrl},onContextMenu:ci,onClick:tn})};V(il,Ue=>{a()==="LiveWaitingRecord"&&Ue(jl)})}var va=k(il,2);{var Xl=Ue=>{var gi=XC();let so;var Ir=C(gi);Md(Ir,{get adsSlotId(){return at()},get adsParams(){return Tt()},get adsAutoplayParam(){return jt()},get duration(){return It()},get adsExternalApi(){return e.adsExternalApi}}),S(gi),D(on=>so=ne(gi,1,"ads-container s-8",null,so,on),[()=>({hidden:a()!=="ads"})]),$(Ue,gi)};V(va,Ue=>{e.showAds&&fe()&&Ue(Xl)})}var ol=k(va,2);{var nl=Ue=>{let gi=f(()=>!bt()&&e.showAutoplayNext&&w());Kf(Ue,{get title(){return le()},get thumb(){return ye()},get isHide(){return n(gi)},clickCloseIcon:()=>R($t,!0)})};V(ol,Ue=>{n(oo)&&le()&&ye()&&Ue(nl)})}var ga=k(ol,2);{var dt=Ue=>{let gi=f(()=>b()?"md":"sm"),so=f(()=>{var Ir;return(Ir=e.store.callbacks)==null?void 0:Ir.onTitleClicked});Ym(Ue,{get title(){return e.title},get isHidden(){return n(lt)},onVisibilityChanged:Us,get titleLinkHref(){return n(si)},onMouseEnter:()=>{R(ss,!0)},onMouseLeave:()=>{R(ss,!1)},get size(){return n(gi)},get onTitleClicked(){return n(so)},get ref(){return n(xs)},set ref(Ir){R(xs,Ir,!0)}})};V(ga,Ue=>{n(yr)&&Ue(dt)})}var it=k(ga,2);{var ji=Ue=>{let gi=f(()=>a()==="video"&&v());cc(Ue,{get isShifted(){return n(gi)}})};V(it,Ue=>{X()&&Ue(ji)})}var Io=k(it,2);{var Xi=Ue=>{var gi=ZC(),so=C(gi);kd(so,{}),S(gi),$(Ue,gi)};V(Io,Ue=>{xe()&&Ue(Xi)})}var vi=k(Io,2);{var zi=Ue=>{uc(Ue,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return Be()},onClick:Fn,onContextMenu:ci,onDblClick:Wr})};V(vi,Ue=>{ee()&&Ue(zi)})}var Ws=k(vi,2);{var Zl=Ue=>{Ga(Ue,{get shifted(){return v()},get captions(){return re()},get position(){return ce()},get playerSize(){return z()}})};V(Ws,Ue=>{tt().value!=="off"&&Ue(Zl)})}var Pc=k(Ws,2);{var gp=Ue=>{var gi=JC();gi.__contextmenu=ci,gi.__click=[jC,Z,fi,m,bi,Fe];var so=C(gi);Ya(so,{}),S(gi),$(Ue,gi)};V(Pc,Ue=>{s()&&Ue(gp)})}var kc=k(Pc,2);{var hp=Ue=>{let gi=f(()=>a()==="thumb"||a()==="LiveWaitingStart"||a()==="LiveWaitingRecover"||a()==="LiveWaitingRecord"),so=f(()=>a()==="ads"),Ir=f(()=>e.canRewindLive&&Re()!==0);lc(Ue,{get bottomHidden(){return n(gi)},get bottomNoSmooth(){return Q()},get showControls(){return v()},get isAds(){return n(so)},get canRewindLive(){return n(Ir)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return Dt()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Ut()},get nextButtonActive(){return Y()},get prevButtonActive(){return Pe()},get isOneVideoPlaylist(){return Le()},customFullscreenSupported:ir,toggleFullscreen:wt,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return n(hr)},set playerControlsWrapperRef(on){R(hr,on,!0)},get playerControlsRef(){return n(Oi)},set playerControlsRef(on){R(Oi,on,!0)}})};V(kc,Ue=>{fe()&&Ue(hp)})}var Ac=k(kc,2);{var _p=Ue=>{var gi=eT(),so=C(gi);let Ir=f(()=>{var on;return(on=n(Oi))==null?void 0:on.clientHeight});vc(so,{get supportLink(){return e.supportLink},get playerControlsHeight(){return n(Ir)},returnFocus:()=>{var on;return(on=zt())==null?void 0:on.focus()},get ref(){return n(_r)},set ref(on){R(_r,on,!0)}}),S(gi),$(Ue,gi)};V(Ac,Ue=>{!ee()&&a()!=="ads"&&Ue(_p)})}var Lc=k(Ac,2);let bp=f(()=>!n($r));Nd(Lc,{get isLive(){return Ve()},get isHidden(){return n(bp)},get isPlaying(){return Je()},get position(){return ce()},get duration(){return Re()}});var ha=k(Lc,2);Qm(ha,{get data(){return vn}});var Mc=k(ha,2);Wf(Mc,{get supportLink(){return e.supportLink},returnFocus:()=>{var Ue;return(Ue=zt())==null?void 0:Ue.focus()},get visible(){return Z()},get playerContainerRef(){return n(Vo)},get position(){return Ee()},get menuElementRef(){return n(Un)},set menuElementRef(Ue){R(Un,Ue,!0)}});var Ks=k(Mc,2);{var rl=Ue=>{gc(Ue,{onClose:Nn,onSelectAutoQuality:()=>{bs("auto"),Nn()}})};V(Ks,Ue=>{n(Hr)&&Ue(rl)})}var Vc=k(Ks,2);{var Rc=Ue=>{xv(Ue,{})};V(Vc,Ue=>{Te()&&Ue(Rc)})}var sl=k(Vc,2);{var Nc=Ue=>{Ha(Ue,{})};V(sl,Ue=>{n(er)&&Ue(Nc)})}var Dc=k(sl,2);{var Oc=Ue=>{Xf(Ue,{})};V(Dc,Ue=>{He()&&Ue(Oc)})}var $p=k(Dc,2);{var yp=Ue=>{Fd(Ue,{})};V($p,Ue=>{Ct()&&Ue(yp)})}$(Ho,Cs)}),$(he,Jt)},$$slots:{default:!0}}),he=>zt(he),()=>zt());var Ss=k(yn,2);je(Ss,he=>R(ho,he),()=>n(ho)),S(yi),je(yi,he=>R(Vo,he),()=>n(Vo));var Ui=k(yi,2);{var Ci=he=>{var gt=oT();$(he,gt)};V(Ui,he=>{xt()&&he(Ci)})}st("mouseenter",yi,No),st("mouseleave",yi,Do),st("click",yi,$i,!0),st("focusin",yi,yo,!0),$(t,Co),H(),o()}Qe(["mousemove","contextmenu","click"]);import{clientChecker as _c,PlaybackState as vT}from"@vkontakte/videoplayer-core/es2018";import{noop as gT}from"@vkontakte/videoplayer-shared/es2018";var sT=L('<div></div> <div class="info s-14"><div class="triangles-wrapper s-14"><div></div> <div></div> <div></div></div> <p class="step-caption s-14"> </p></div>',1),aT=L("<div><!></div>"),lT={hash:"s-14",code:".double-click-area.s-14{height:100%;overflow:hidden;position:absolute;top:0;width:25%}.double-click-area.left.s-14{left:0}.double-click-area.right.s-14{right:0}.semicircle.s-14{background-color:rgba(0,0,0,.5);height:100%;position:absolute;top:0;width:100%}.semicircle.left.s-14{border-bottom-right-radius:50%;border-top-right-radius:50%;left:0}.semicircle.right.s-14{border-bottom-left-radius:50%;border-top-left-radius:50%;right:0}.info.s-14{align-items:center;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.info.s-14,.triangles-wrapper.s-14{display:flex;justify-content:center}.triangles-wrapper.s-14{margin-bottom:10px;position:relative}.triangle.s-14{animation:s-14-blink .5s infinite;border-bottom:6px solid transparent;border-top:6px solid transparent;height:0;opacity:0;width:0}.triangle.left.s-14:nth-child(3),.triangle.right.s-14:first-child{animation-delay:0s}.triangle.left.s-14:nth-child(2),.triangle.right.s-14:nth-child(2){animation-delay:.1s}.triangle.left.s-14:first-child,.triangle.right.s-14:nth-child(3){animation-delay:.2s}@keyframes s-14-blink{0%{opacity:0}50%{opacity:1}to{opacity:0}}.triangle.left.s-14{border-right:8px solid var(--white)}.triangle.right.s-14{border-left:8px solid var(--white)}.triangle.s-14:not(:last-child){margin-right:5px}.step-caption.s-14{color:var(--white);font-size:12px;line-height:1;margin:0;text-align:center}"};function rp(t,e){B(e,!0),G(t,lT);let i=h(e,"seekStep",3,0),o=q(!1),r=0,a=0,l=q(ai(i())),d=p=>{p.stopPropagation(),a+=1,R(l,i()*(a-1)),a===1?e.handleSingleFirstClick(p):(R(o,!0),e.handleSecondClick()),window.clearTimeout(r),r=window.setTimeout(()=>{a=0,R(o,!1)},300)};sn(()=>{window.clearTimeout(r)});var s=aT();s.__click=d;var u=C(s);{var m=p=>{var v=sT(),_=ue(v),y=k(_,2),b=C(y),w=C(b),I=k(w,2),T=k(I,2);S(b);var N=k(b,2),A=C(N,!0);S(N),S(y),D(E=>{var P,Q,F,z;ne(_,1,`semicircle ${(P=e.side)!=null?P:""}`,"s-14"),ne(w,1,`triangle ${(Q=e.side)!=null?Q:""}`,"s-14"),ne(I,1,`triangle ${(F=e.side)!=null?F:""}`,"s-14"),ne(T,1,`triangle ${(z=e.side)!=null?z:""}`,"s-14"),ve(A,E)},[()=>j("doubletap_seek_step",{seconds:n(l).toFixed(0)})]),$(p,v)};V(u,p=>{n(o)&&p(m)})}S(s),D(()=>{var p;return ne(s,1,`double-click-area ${(p=e.side)!=null?p:""}`,"s-14")}),$(t,s),H()}Qe(["click"]);var dT=(t,e,i)=>{e(!1),i()},cT=L('<div class="overlay s-15"></div> <div class="next-video s-15"><div class="top s-15"><div class="caption s-15"> </div> <!></div> <div class="row s-15"><div class="column s-15"><div class="thumb s-15"><div></div> <!></div></div> <div class="column s-15"><div class="title s-15"> </div></div></div></div>',1),uT={hash:"s-15",code:".overlay.s-15{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-15{display:flex;flex-direction:column;left:50%;margin:0 auto;max-width:362px;min-width:320px;padding-bottom:12px;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:var(--end-screen-mobile-z-index)}.top.s-15{display:flex;justify-content:space-between}.caption.s-15{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-15{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-15{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-15{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-15,.thumb-overlay.s-15{height:100%;width:100%}.thumb-overlay.s-15{position:absolute}.thumb-overlay.withOpacity.s-15{background:var(--black);opacity:.3}.title.s-15{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function Sv(t,e){B(e,!0),G(t,uT);let[i,o]=Ne(),r=()=>x(d,"$autoplayNextEnabled$",i),a=()=>x(s,"$timerNextVideoRunning$",i),l=_e(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,m=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,v=l.actions.internal.nextVideoAnnouncementAuto,_=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{u(!1),v()},b=()=>{e.clickCloseIcon(),_()};Vt(()=>{e.isHide||m(),e.isHide&&r()&&(u(!1),v())});var w=Ae(),I=ue(w);{var T=N=>{var A=cT(),E=k(ue(A),2),P=C(E),Q=C(P),F=C(Q,!0);S(Q);var z=k(Q,2);Rs(z,{onClick:b}),S(P);var X=k(P,2);X.__click=[dT,u,p];var se=C(X),Z=C(se),oe=C(Z);let J;var Ce=k(oe,2);{var me=ge=>{Ud(ge,{get isRunning(){return a()},onTimerEnded:y})};V(Ce,ge=>{r()&&ge(me)})}S(Z),S(se);var ee=k(se,2),be=C(ee),we=C(be,!0);S(be),S(ee),S(X),S(E),D((ge,pe)=>{ve(F,ge),We(Z,`background-image: url('${e.thumb}')`),J=ne(oe,1,"thumb-overlay s-15",null,J,pe),ve(we,e.title)},[()=>r()?j("end_screen_next_video"):j("end_screen_recommended_video"),()=>({withOpacity:r()})]),$(N,A)};V(I,N=>{e.isHide||N(T)})}$(t,w),H(),o()}Qe(["click"]);import{clientChecker as pT}from"@vkontakte/videoplayer-core/es2018";var Ab=({getFullscreenTarget:t,fullScreenChangeHandler:e})=>{let i=null,o;Vt(()=>{pT.device.isIOS&&(o=setTimeout(()=>{let a=t().querySelector("video");if(!a)return;let l=()=>e(!0),d=()=>e(!1);a.addEventListener("webkitbeginfullscreen",l),a.addEventListener("webkitendfullscreen",d),i=()=>{a.removeEventListener("webkitbeginfullscreen",l),a.removeEventListener("webkitendfullscreen",d)}},0))}),sn(()=>{i==null||i(),clearTimeout(o)})};import{VideoFormat as fT}from"@vkontakte/videoplayer-core/es2018";var sp=class{constructor(e){this.video=e}getTracksArray(){return Array.from(this.video.getElementsByTagName("track"))}attach(e,i=!1){let o=document.createElement("track");o.setAttribute("src",e.url),o.setAttribute("id",e.id),e.label&&o.setAttribute("label",e.label),e.language&&o.setAttribute("srclang",e.language),i&&(o.track.mode="showing"),this.video.appendChild(o)}detachAll(){for(let e of this.getTracksArray())this.video.removeChild(e)}updateSrc(e){let i=this.getTracksArray().find(o=>o.id===e.id);i&&(i.src=e.url)}getCurrentShowingId(){var e,i;return(i=(e=this.getTracksArray().find(o=>o.track.mode==="showing"))==null?void 0:e.id)!=null?i:null}};import{clientChecker as mT}from"@vkontakte/videoplayer-core/es2018";var Lb=({store:t,getFullscreenTarget:e})=>{let{isFullscreen:i}=t.ui,{setSubtitle:o}=t.actions.internal,{currentSubtitle$:r,availableSubtitlesList$:a,currentFormat$:l,availableTextTracks$:d}=t.state,s=null,u=()=>e().querySelector("video"),m=()=>mT.device.isIOS&&$e(l)===fT.DASH_LIVE_CMAF,p=()=>{s==null||s(),s=null},v=_=>{if(p(),!m()||!_)return;let y=u();if(!y)return;let b=new sp(y),w=$e(d),I=$e(a),T=$e(r);for(let E of w)I.some(Q=>Q.value===E.id)&&b.attach(E,T.value===E.id);let N=d.subscribe(E=>{for(let P of E)b.updateSrc(P)}),A=()=>{let E=b.getCurrentShowingId();o($e(a).find(P=>P.value===E))};y.textTracks.addEventListener("change",A),s=()=>{N(),b.detachAll(),y.textTracks.removeEventListener("change",A)}};Vt(()=>i.subscribe(v)),sn(p)};var hT=(t,e,i,o)=>{if(t.stopPropagation(),e()){o();return}},_T=L("<!> <!>",1),bT=L("<div><!></div>"),$T=L('<div class="spherical-video-icon s-9"><!></div>'),yT=L("<div><!></div>"),xT=L('<div class="settings-mobile s-9"><!></div>'),wT=L("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),ST=L('<div class="player-wrapper s-9" role="region" tabindex="-1"><!> <!> <!> <div class="overlay-container"></div></div>'),CT={hash:"s-9",code:".player-wrapper.s-9{height:100%;position:absolute;width:100%}.player-wrapper.s-9 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.spherical-video-icon.s-9{display:inline-block;left:calc(50% - 38px);position:absolute;top:calc(50% - 23px)}.ads-container.s-9{background:var(--black);height:100%;left:0;position:absolute;top:0;width:100%;z-index:var(--ads-container-z-index)}.settings-mobile.s-9{align-items:center;display:flex;left:50%;max-width:320px;position:absolute;top:50%;transform:translate(-50%,-50%);transition:opacity var(--controls-transition-duration);width:90%;z-index:var(--settings-menu-z-index)}"};function Cv(t,e){var _n,yr;B(e,!0),G(t,CT);let[i,o]=Ne(),r=()=>x(Le,"$playerPhase",i),a=()=>x(di,"$isLoaderVisible",i),l=()=>x(Pe,"$adPlaybackState",i),d=()=>x(ei,"$crashed",i),s=()=>x(bs,"$notificationsToShow$",i),u=()=>x(Y,"$playbackState$",i),m=()=>x(It,"$graphIsOpened$",i),p=()=>x(Oe,"$interactiveHideMobileControls",i),v=()=>x(Vi,"$isEnded$",i),_=()=>x(pt,"$isInteractiveExpectation$",i),y=()=>x(Et,"$controlsVisible",i),b=()=>x(ot,"$touched",i),w=()=>x(Pi,"$autoplayNextEnabled$",i),I=()=>x(hi,"$postrollPassed",i),T=()=>x(Or,"$bottomNoSmooth",i),N=()=>x(fi,"$videoSize",i),A=()=>x(yt,"$playerSize",i),E=()=>x(nt,"$isFullscreen",i),P=()=>x(le,"$position$",i),Q=()=>x(ye,"$duration$",i),F=()=>x(cn,"$loadedMetadata",i),z=()=>x(ze,"$settingsMenuVisible",i),X=()=>x(zt,"$scrubbingInProgress",i),se=()=>x(Pt,"$volumeChangingInProgress",i),Z=()=>x(Lt,"$chromecastConnected$",i),oe=()=>x(fe,"$isControlsAvailable",i),J=()=>x(ri,"$isInteractiveTime$",i),Ce=()=>x(Ri,"$isActiveLive",i),me=()=>x(bt,"$settingsMenuOpenedByKeyboard",i),ee=()=>x(Ut,"$language$",i),be=()=>x(vt,"$disabledControls$",i),we=()=>x(Ot,"$is3DVideo",i),ge=()=>x(W,"$icon3DVideoVisible",i),pe=()=>x(pi,"$chromecastDeviceName$",i),Ke=()=>x(po,"$currentSubtitle$",i),U=()=>x(Go,"$currentSubtitleCaptions$",i),O=()=>x(Yo,"$realDuration$",i),qe=()=>x(ut,"$isLive$",i),K=()=>x(Gt,"$isPlaying$",i),ae=()=>x(ui,"$debugPanelVisible",i),xe=h(e,"videoContainer",15),Be=h(e,"adsSlotId",3,void 0),tt=h(e,"adsParams",3,void 0),re=h(e,"adsAutoplayParam",3,void 0),ce=h(e,"duration",3,void 0),Re=h(e,"logoTargetUrl",3,""),Ve=h(e,"showNextPrevButtons",3,!1),Je=h(e,"nextButtonActive",3,!1),Ee=h(e,"prevButtonActive",3,!1),Te=h(e,"endScreenVideoTitle",3,void 0),He=h(e,"endScreenVideoThumb",3,void 0),Ct=h(e,"isOneVideoPlaylist",3,!1),xt=h(e,"showMiniTimer",3,!1),At=h(e,"fullScreenTarget",3,void 0),at=h(e,"playerStarted",3,!1),Tt=h(e,"showEndScreen",3,!0),{notifications$:jt,graphIsOpened$:It}=vo(),Dt=e.store.getLogger().createComponentLog("Root component"),Ut=e.store.interfaceLanguage$,Y=e.store.state.playbackState$,Pe=e.store.ads.playbackState,le=e.store.state.positionWithScrubbing$,ye=e.store.state.duration$,Le=e.store.playerPhase,nt=e.store.ui.isFullscreen,Et=e.store.ui.controlsVisible,fe=e.store.ui.isControlsAvailable,Oe=e.store.ui.interactiveHideMobileControls,ze=e.store.ui.settingsMenu.visible$,bt=e.store.ui.settingsMenu.openedByBtnKeyboard$,zt=e.store.ui.scrubbingInProgress,Pt=e.store.ui.volumeChangingInProgress,ui=e.store.ui.debugPanelVisible,di=e.store.state.isLoaderVisible,Vi=e.store.state.isEnded$,Lt=e.store.state.chromecastConnected$,pi=e.store.state.chromecastDeviceName$,hi=e.store.ads.postrollPassed,ut=e.store.state.isLive$,Gt=e.store.state.isPlaying$,Ri=e.store.state.isActiveLive$,bi=e.store.state.isRewindableLive$,ei=e.store.state.crashed$,mt=e.store.webApi.annotationsApi,Ge=e.store.webApi.pictureInPictureApi,fi=e.store.state.videoSize$,po=e.store.state.currentSubtitle$,Go=e.store.state.currentSubtitleCaptions$,Yo=e.store.state.duration$,yt=e.store.ui.playerSize,Ot=e.store.ui.is3DVideo,W=e.store.ui.icon3DVideoVisible,Mt=e.store.state.isInteractive,ri=e.store.state.isInteractiveTime$,pt=e.store.state.isInteractiveExpectation$,Xt=e.store.state.hasInteractiveBranches,vt=e.store.ui.controls.disabledControls$,ot=e.store.ui.touched,Ni=e.store.ui.overlayContainer$,Pi=e.store.ui.autoplayNextEnabled$,cn=e.store.state.loadedMetadata$,un=e.store.actions.internal.closeSettingsMenu,ki=(_n=e.store.callbacks)==null?void 0:_n.onDisabledPlayPrevChapterClick,Di=(yr=e.store.callbacks)==null?void 0:yr.onDisabledSeekToInteractiveClick,Mn=e.store.actions.internal.setQuality,go=q(void 0),io=q(void 0),Ti=q(void 0),Lo=q(void 0),Mo,pn,Vr=f(()=>(r()==="video"&&a()||r()==="ads"&&l()==="inactive")&&!d()),Rr=q(void 0),{closeNotification:Nr,notificationsToShow$:bs}=jt,Dr=f(()=>!!s().slow_video),Zn=()=>Nr("slow_video"),Or=de(!1),fn,mn=q(!1),fr=f(()=>u()!==vT.PLAYING),mr=q(!1),jo=f(()=>m()||p()||!n(mn)&&(v()&&!!Xt||n(fr)&&_())),vr=q(!0),gr=f(()=>e.uiConfig.features.thumbTimer&&xt()&&r()==="video"&&!y()&&!d()&&!Mt&&(e.uiConfig.hideThumbTimerAfterTouch&&!b()||!e.uiConfig.hideThumbTimerAfterTouch)),Jn=q(!1),Vn=f(()=>(Tt()||e.showAutoplayNext&&w())&&!!Te()&&!!He()&&(e.showAds&&I()||!e.showAds)&&v()&&!d()&&!n(Jn)),ns=q(!1);Ge==null||Ge.setContext(od());let Vo=lt=>{lt&&!Mt&&Oi(e.uiConfig.controls.hideTimeoutMobile)};e.store.setUiCallbacks({onStarted:Vo});let hr=()=>{clearTimeout(Mo),R(mn,!1),p()&&Oe.set(!1)},Oi=lt=>{hr(),R(mn,!0),Mo=setTimeout(()=>R(mn,!1),lt);let $t=lt-100;fn=setTimeout(()=>{T()&&Or.set(!1)},$t>0?$t:lt)},_r=Ot.subscribe(lt=>{W.set(lt),lt&&(clearTimeout(pn),pn=setTimeout(()=>W.set(!1),e.uiConfig.controls.hide360IconTimeout))}),Rn=async(lt=oa())=>{var $t,oo,fo,Jo,_o,bo;if(lt&&!_c.device.isIOS){let Ii=Ad(),$o=Nn(),Fr=_c.browser.isSamsungBrowser&&Ii===e.shadowRootContainer;lt=Ii===$o||Fr}if(lt){Oi(e.uiConfig.controls.hideTimeoutFullscreen);try{await(Ge==null?void 0:Ge.exit())}catch(Ii){Dt({message:String(Ii)})}try{let Ii=($t=N())!=null&&$t.width&&((oo=N())!=null&&oo.height)?N():A();await y_(Ii)}catch(Ii){Dt({message:String(Ii)})}}nt.set(lt),e.store.getAdmanWrapper().setFullscreen(lt),E()?(Jo=(fo=e.store.callbacks)==null?void 0:fo.onFullscreenEnter)==null||Jo.call(fo):(bo=(_o=e.store.callbacks)==null?void 0:_o.onFullscreenExit)==null||bo.call(_o)},ct=lt=>{let $t=lt,{width:oo,height:fo}=$t.target;yt.set({width:oo,height:fo})},Zt=()=>{let{width:lt,height:$t}=n(go).getBoundingClientRect();yt.set({width:lt,height:$t})};Vt(()=>{var lt;return Au(Rn),e.uiConfig.features.annotationsInside&&(mt==null||mt.init(n(go))),Na(Ge)&&(Ge==null||Ge.assignPlayerContainer(n(go)),Ge==null||Ge.setExternalEventHandlers({resize:ct,leavepictureinpicture:Zt})),R(vr,!_c.device.isIphoneOrOldIpad),e.interactiveContainer&&((lt=xe().parentElement)==null||lt.insertBefore(e.interactiveContainer,xe().nextSibling)),()=>{clearTimeout(Mo),clearTimeout(fn),clearTimeout(pn),_r(),Ge==null||Ge.dispose().catch($t=>{Dt({message:String($t)})}),Lu(Rn)}});let br=q(!0),Br=q(!0),Hr=lt=>{let $t=P()+(lt==="forward"?1:-1)*e.uiConfig.controls.seekStepMobile/1e3;$t<0?(R(br,!1),$t=0):$t>=Q()&&(R(Br,!1),$t=Q()),R(mr,!0),e.seekTime($t)},Nn=()=>_c.device.isIOS?n(go):!e.uiConfig.allowChangingFullscreenTarget||!At()?e.outerContainerRef:At().contains(e.outerContainerRef)?At():e.outerContainerRef,er=async()=>{try{if(oa())await ku(document),Dt({message:"exit fullscreen"});else{if(Dt({message:"request fullscreen"}),_c.device.isIOS&&!F())return;await Pu(Nn())}}catch(lt){Dt({message:String(lt)})}},ho=()=>{un()},Dn=lt=>{if(lt.preventDefault(),z()){ho();return}if(!at()){e.firstStart(),Oi(e.uiConfig.controls.hideTimeoutCursor);return}R(mr,!1),y()?hr():Oi(e.uiConfig.controls.hideTimeoutMobile)},tr=()=>{ot.set(!0)},On=()=>{Mt||(Or.set(!0),Oi(e.uiConfig.controls.hideTimeoutCursor))},vn=lt=>{ki&&(ki(lt),Oi(e.uiConfig.controls.hideTimeoutMobile))},gn=lt=>{Di&&(Di(lt),Oi(e.uiConfig.controls.hideTimeoutMobile))};De(()=>{Ni.set(n(Rr))}),De(()=>{Et.set((n(fr)||z()||X()||se()||Z()||!n(Vn)&&(v()||n(mn)&&!n(mr)))&&!n(jo)&&r()==="video"&&!d()&&oe())}),De(()=>{!X()&&n(ns)&&!J()&&Oi(e.uiConfig.controls.hideTimeoutMobile),R(ns,X(),!0)}),De(()=>{R(br,P()>0),R(Br,!Ce()&&P()<Q(),!0)}),De(()=>{Od(n(Lo),z(),me(),!0)});let hn=j("aria_label_video_player");Ab({fullScreenChangeHandler:Rn,getFullscreenTarget:Nn}),Lb({store:e.store,getFullscreenTarget:Nn});let Xo=(lt,$t)=>{var _o,bo;let oo=(bo=(_o=e.store.callbacks)==null?void 0:_o.uiInfo)==null?void 0:bo.onUpcomingLiveViewStateChanged;if(!oo)return;let fo=!!$t,Jo={...jn(n(go),{upcomingLiveScreen:$t},"upcomingLiveScreen",fo),...lt};oo(Jo)};var Bi=ST();st("blur",Ca,ho);var Yi=C(Bi);el(Yi,{onClick:Dn,get videoContainer(){return xe()},set videoContainer(lt){xe(lt)}});var Zo=k(Yi,2);Aa(Zo,()=>"slot",!1,(lt,$t)=>{Ji(lt,()=>({name:Ja}))});var ir=k(Zo,2);As(ir,ee,lt=>{var $t=wT(),oo=ue($t);let fo=f(()=>r()!=="thumb"||d()||Mt&&e.autoplay||e.uiConfig.features.disableThumbUnstartedOnAutoplay&&e.autoplay);ja(oo,{get hidden(){return n(fo)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var Jo=k(oo,2);{var _o=Ze=>{var Yt=_T(),$i=ue(Yt);{var So=Bo=>{let or=f(()=>e.uiConfig.controls.seekStepMobile/1e3);rp(Bo,{side:"left",get seekStep(){return n(or)},handleSingleFirstClick:Dn,handleSecondClick:()=>Hr("backward")})};V($i,Bo=>{n(br)&&Bo(So)})}var $n=k($i,2);{var Un=Bo=>{let or=f(()=>e.uiConfig.controls.seekStepMobile/1e3);rp(Bo,{side:"right",get seekStep(){return n(or)},handleSingleFirstClick:Dn,handleSecondClick:()=>Hr("forward")})};V($n,Bo=>{n(Br)&&Bo(Un)})}$(Ze,Yt)};V(Jo,Ze=>{e.canRewindLive&&bi&&!be().has("TIMELINE")&&Ze(_o)})}var bo=k(Jo,2);{var Ii=Ze=>{let Yt=f(()=>{var $i;return($i=e.live)==null?void 0:$i.startTime});pc(Ze,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(Yt)},onUpcomingLiveViewStateChanged:Xo})};V(bo,Ze=>{r()==="LiveWaitingStart"&&Ze(Ii)})}var $o=k(bo,2);{var Fr=Ze=>{Xa(Ze,{kind:"recover",get thumbUrl(){return e.thumbUrl}})};V($o,Ze=>{r()==="LiveWaitingRecover"&&Ze(Fr)})}var xr=k($o,2);{var $s=Ze=>{Xa(Ze,{kind:"record",get thumbUrl(){return e.thumbUrl}})};V(xr,Ze=>{r()==="LiveWaitingRecord"&&Ze($s)})}var Hi=k(xr,2);{var ys=Ze=>{var Yt=bT();let $i;var So=C(Yt);Md(So,{get adsSlotId(){return Be()},get adsParams(){return tt()},get adsAutoplayParam(){return re()},get duration(){return ce()},get adsExternalApi(){return e.adsExternalApi}}),S(Yt),D($n=>$i=ne(Yt,1,"ads-container s-9",null,$i,$n),[()=>({hidden:r()!=="ads"})]),$(Ze,Yt)};V(Hi,Ze=>{e.showAds&&at()&&Ze(ys)})}var rs=k(Hi,2);{var wr=Ze=>{let Yt=f(()=>!Tt()&&e.showAutoplayNext&&w());Sv(Ze,{get title(){return Te()},get thumb(){return He()},get isHide(){return n(Yt)},clickCloseIcon:()=>R(Jn,!0)})};V(rs,Ze=>{n(Vn)&&Te()&&He()&&Ze(wr)})}var Ro=k(rs,2);{var Ur=Ze=>{cc(Ze,{})};V(Ro,Ze=>{we()&&Ze(Ur)})}var en=k(Ro,2);{var tn=Ze=>{var Yt=$T(),$i=C(Yt);kd($i,{}),S(Yt),$(Ze,Yt)};V(en,Ze=>{ge()&&Ze(tn)})}var Fe=k(en,2);{var wt=Ze=>{uc(Ze,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return pe()},onClick:Dn})};V(Fe,Ze=>{Z()&&Ze(wt)})}var ci=k(Fe,2);{var No=Ze=>{Ga(Ze,{get shifted(){return y()},get captions(){return U()},get position(){return P()},get playerSize(){return A()},isMobile:!0})};V(ci,Ze=>{Ke().value!=="off"&&Ze(No)})}var yo=k(ci,2);{var Do=Ze=>{var Yt=yT();Yt.__click=[hT,z,ze,ho];var $i=C(Yt);Ya($i,{}),S(Yt),$(Ze,Yt)};V(yo,Ze=>{d()&&Ze(Do)})}var Fi=k(yo,2);{var xo=Ze=>{let Yt=f(()=>r()==="thumb"||r()==="LiveWaitingStart"||r()==="LiveWaitingRecover"||r()==="LiveWaitingRecord"||r()==="ads"),$i=f(()=>r()==="ads"),So=f(()=>e.canRewindLive&&O()!==0);lc(Ze,{get bottomHidden(){return n(Yt)},get showControls(){return y()},get bottomNoSmooth(){return T()},get isAds(){return n($i)},get canRewindLive(){return n(So)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return Re()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Ve()},get nextButtonActive(){return Je()},get prevButtonActive(){return Ee()},get isOneVideoPlaylist(){return Ct()},get customFullscreenSupported(){return n(vr)},get endScreenShown(){return n(Vn)},toggleFullscreen:er,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},onDisabledPlayPrevChapterClick:vn,onDisabledSeekToInteractiveClick:gn,get playerControlsWrapperRef(){return n(io)},set playerControlsWrapperRef($n){R(io,$n,!0)},get playerControlsRef(){return n(Ti)},set playerControlsRef($n){R(Ti,$n,!0)}})};V(Fi,Ze=>{at()&&Ze(xo)})}var Bn=k(Fi,2);{var Sr=Ze=>{var Yt=xT(),$i=C(Yt);vc($i,{get supportLink(){return e.supportLink},get returnFocus(){return gT},get ref(){return n(Lo)},set ref(So){R(Lo,So,!0)}}),S(Yt),$(Ze,Yt)};V(Bn,Ze=>{z()&&Ze(Sr)})}var wo=k(Bn,2);let no=f(()=>!n(gr));Nd(wo,{get isLive(){return qe()},get isHidden(){return n(no)},get isPlaying(){return K()},get position(){return P()},get duration(){return Q()}});var bn=k(wo,2);{var Oo=Ze=>{Ha(Ze,{})};V(bn,Ze=>{n(Vr)&&Ze(Oo)})}var Hn=k(bn,2);{var zr=Ze=>{Fd(Ze,{})};V(Hn,Ze=>{ae()&&Ze(zr)})}var Wr=k(Hn,2);{var Fn=Ze=>{gc(Ze,{onClose:Zn,onSelectAutoQuality:()=>{Mn("auto"),Zn()}})};V(Wr,Ze=>{n(Dr)&&Ze(Fn)})}$(lt,$t)});var $r=k(ir,2);je($r,lt=>R(Rr,lt),()=>n(Rr)),S(Bi),je(Bi,lt=>R(go,lt),()=>n(go)),D(()=>Me(Bi,"aria-label",hn)),st("click",Bi,tr,!0),st("focusin",Bi,On,!0),$(t,Bi),H(),o()}Qe(["click"]);function ap(t){let e="";return to(t.timelineSliderFilledColor)&&(e+=`--timeline-slider-filled-bg:${t.timelineSliderFilledColor};`),to(t.timelineSliderHandleColor)&&(e+=`--timeline-slider-handle-bg:${t.timelineSliderHandleColor};`),to(t.timelineSliderLoadedColor)&&(e+=`--timeline-slider-loaded-bg:${t.timelineSliderLoadedColor};`),to(t.timelineSliderColor)&&(e+=`--timeline-slider-bg:${t.timelineSliderColor};`),to(t.volumeSliderColor)&&(e+=`--volume-slider-bg:${t.volumeSliderColor};`),to(t.volumeSliderHandleColor)&&(e+=`--volume-slider-handle-bg:${t.volumeSliderHandleColor};`),to(t.volumeSliderFilledColor)&&(e+=`--volume-slider-filled-bg:${t.volumeSliderFilledColor};`),to(t.controlsTimeColor)&&(e+=`--controls-time:${t.controlsTimeColor};`),to(t.timelineSliderFilledActiveLiveColor)&&(e+=`--timeline-slider-filled-active-live-bg:${t.timelineSliderFilledActiveLiveColor};`),to(t.timelineSliderHandleActiveLiveColor)&&(e+=`--timeline-slider-handle-active-live-bg:${t.timelineSliderHandleActiveLiveColor};`),to(t.buttonColor)&&(e+=`--btn-color:${t.buttonColor};`),to(t.buttonToggleOnColor)&&(e+=`--toggle-color-on:${t.buttonToggleOnColor};`,e+=`--toggle-color-autoplay-on:${t.buttonToggleOnColor};`),to(t.focusedColor)&&(e+=`--focused:${t.focusedColor};`),to(t.focusedOutlineWidth)&&(e+=`--focused-outline-width:${t.focusedOutlineWidth};`),to(t.focusedOutlineRadius)&&(e+=`--focused-outline-radius:${t.focusedOutlineRadius};`),to(t.controlsDesktopPaddingHorizontal)&&(e+=`--controls-desktop-padding-horizontal:${t.controlsDesktopPaddingHorizontal};`),to(t.timelinePaddingHorizontal)&&(e+=`--timeline-padding-horizontal:${t.timelinePaddingHorizontal};`),to(t.settingsBackgroundColor)&&(e+=`--settings-bg:${t.settingsBackgroundColor};`),to(t.font)&&(e+=`--font:${t.font};`),to(t.controlsGradientHeight)&&(e+=`--controls-gradient-height:${t.controlsGradientHeight};`),to(t.controlsGradient)&&(e+=`--controls-gradient:${t.controlsGradient};`),e.length&&e||void 0}function to(t){return typeof t=="string"&&!t.includes(";")}import{debounceFn as TT}from"@vkontakte/videoplayer-shared/es2018";var IT=L('<div class="time-container s-7"><!></div>'),ET=L('<div class="player-wrapper s-7" role="region"><!> <!> <!> <!> <!> <div><!></div></div>'),PT={hash:"s-7",code:".player-wrapper.s-7{height:100%;position:absolute;width:100%}.player-wrapper.s-7 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.timeline.s-7{bottom:0;left:0;opacity:0;opacity:1;position:absolute;transition:opacity var(--controls-transition-duration) var(--controls-transition-fn);width:100%;z-index:var(--controls-container-z-index)}.visible.s-7{opacity:1}.time-container.s-7{bottom:8px;position:absolute;right:8px;z-index:var(--thumb-timer-z-index)}"};function Tv(t,e){B(e,!0),G(t,PT);let[i,o]=Ne(),r=()=>x(J,"$scrubbingInProgress",i),a=()=>x(Z,"$playerSize",i),l=()=>x(P,"$isPlaying$",i),d=()=>x(A,"$duration$",i),s=()=>x(z,"$positionWithScrubbing$",i),u=()=>x(T,"$playerPhase",i),m=()=>x(N,"$crashed$",i),p=()=>x(Q,"$currentSubtitle$",i),v=()=>x(F,"$currentSubtitleCaptions$",i),_=()=>x(E,"$positionExact$",i),y=()=>x(X,"$isLive$",i),b=()=>x(se,"$isRewindableLive$",i),w=h(e,"outsideDuration",3,0),I=h(e,"videoContainer",15),{playerPhase:T,state:{crashed$:N,duration$:A,positionExact$:E,isPlaying$:P,currentSubtitle$:Q,currentSubtitleCaptions$:F,positionWithScrubbing$:z,isLive$:X,isRewindableLive$:se},ui:{playerSize:Z,controls:oe,scrubbingInProgress:J},actions:{internal:{getVideoElement:Ce}}}=_e(),me=8,ee=q(!1),be=ai({}),we=q(!1),ge=f(()=>!r()&&!n(we)),pe=()=>{R(ee,!0)},Ke=()=>{R(ee,!1)},U=TT(Wl,260);De(()=>{a(),U(Ce(),oe,be,n(ee))});let O=f(()=>l()?Qo(d()-s()):Qo(isFinite(d())?d():w()));var qe=ET(),K=C(qe);el(K,{hideCursor:!1,get videoContainer(){return I()},set videoContainer(Te){I(Te)}});var ae=k(K,2);Aa(ae,()=>"slot",!1,(Te,He)=>{Ji(Te,()=>({name:Ja}))});var xe=k(ae,2);let Be=f(()=>u()!=="thumb"||m());ja(xe,{get hidden(){return n(Be)},get thumbUrl(){return e.thumbUrl},iconVisible:!1});var tt=k(xe,2);{var re=Te=>{Ga(Te,{shifted:!1,get captions(){return v()},get position(){return _()},get playerSize(){return a()}})};V(tt,Te=>{p().value!=="off"&&n(ge)&&Te(re)})}var ce=k(tt,2);{var Re=Te=>{var He=IT(),Ct=C(He);Rd(Ct,{get isLive(){return y()},get isPlaying(){return l()},get time(){return n(O)}}),S(He),$(Te,He)};V(ce,Te=>{n(ge)&&Te(Re)})}var Ve=k(ce,2);let Je;var Ee=C(Ve);qa(Ee,{get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return b()},isAds:!1,needPadding:!1,isHidden:!1,withEpisodes:!1,tooltipLeftOffset:me,tooltipRightOffset:me,get ref(){return be.timeline},set ref(Te){be.timeline=Te}}),S(Ve),S(qe),D(Te=>Je=ne(Ve,1,"timeline s-7",null,Je,Te),[()=>({visible:n(ee)})]),st("mouseenter",qe,pe),st("mouseleave",qe,Ke),st("mouseenter",Ve,()=>R(we,!0)),st("mouseleave",Ve,()=>R(we,!1)),$(t,qe),H(),o()}var VT=L("<div><!></div>"),RT={hash:"s-0",code:'.vk-vp-root.s-0{--white:#fff;--black:#000;--red:#ff3347;--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;--controls-height:40px;--controls-gradient-height:100px;--controls-transition-duration:0.25s;--controls-transition-fn:cubic-bezier(0.455,0.03,0.515,0.955);--controls-desktop-item-margin-left:4px;--controls-desktop-padding-horizontal:4px;--focused:var(--white);--focused-outline-width:2px;--focused-outline-radius:0;--focused-element-shadow:inset 0 0 0 var(--focused-outline-width) var(--focused);--focused-slider-shadow:0 0 0 2px var(--focused);--big-play-size:96px;--big-play-radius:50%;--big-play-bg-color:rgba(0,0,0,.5);--big-play-hover-bg-color:rgba(0,0,0,.6);--big-play-icon-width:38px;--big-play-icon-height:33px;--interactive-episode-complete:#5c9ce6;--slider-bg:hsla(0,0%,100%,.4);--slider-filled-bg:var(--white);--slider-handle-bg:var(--white);--slider-loaded-bg:hsla(0,0%,100%,.4);--slider-height:3px;--slider-video-episode-gap:1.5px;--slider-radius:0px;--slider-handle-size:12px;--slider-filled-ads:#67a5eb;--slider-disabled-color:hsla(0,0%,97%,.31);--slider-volume-height:5px;--slider-volume-radius:calc(var(--slider-volume-height)/2);--slider-volume-handle-size:13px;--timeline-slider-filled-active-live-bg:var(--red);--timeline-slider-handle-active-live-bg:var(--red);--timeline-slider-bg:var(--slider-bg);--timeline-slider-filled-bg:var(--slider-filled-bg);--timeline-slider-handle-bg:var(--slider-handle-bg);--timeline-slider-loaded-bg:var(--slider-loaded-bg);--volume-slider-bg:var(--slider-bg);--volume-slider-filled-bg:var(--slider-filled-bg);--volume-slider-handle-bg:var(--slider-handle-bg);--controls-time:var(--white);--controls-gradient:linear-gradient(180deg,transparent 0%,rgba(0,0,0,.005) 6.67%,rgba(0,0,0,.02) 13.33%,rgba(1,1,1,.04) 20%,rgba(1,1,1,.07) 26.67%,rgba(2,2,2,.11) 33.33%,rgba(3,3,3,.16) 40%,rgba(4,4,4,.22) 46.67%,rgba(6,6,6,.28) 53.33%,rgba(7,7,7,.33) 60%,rgba(8,8,8,.38) 66.67%,rgba(9,9,9,.42) 73.33%,rgba(9,9,9,.46) 80%,hsla(0,0%,4%,.48) 86.67%,hsla(0,0%,4%,.5));--timeline-preview-shadow:rgba(0,0,0,.08);--timeline-preview-bg:#222;--timeline-padding-horizontal:10px;--timeline-padding-vertical-top:3px;--timeline-padding-vertical-bottom:4px;--timeline-height:calc(var(--timeline-padding-vertical-bottom) + var(--timeline-padding-vertical-top) + var(--slider-height));--preview-track-frame-height-vertical:114px;--preview-track-frame-height-horizontal:65px;--preview-track-controls-top:16px;--preview-track-time-line-height:16px;--preview-track-bottom-offset:10px;--preview-track-height:calc(var(--preview-track-frame-height-vertical) + var(--preview-track-bottom-offset));--preview-track-controls-top-offset:calc(var(--timeline-height) + var(--preview-track-controls-top) + var(--preview-track-time-line-height));--settings-bg:rgba(0,0,0,.72);--settings-item-bg-hover:hsla(0,0%,100%,.08);--settings-radius:8px;--mobile-settings-bg:#2c2d2e;--divider-border:1px solid var(--white-alpha-24);--toggle-color-separator:#363738;--toggle-color-off:#656565;--toggle-color-on:#71aaeb;--toggle-color-autoplay-on:var(--white);--notification-bg:#2c2d2e;--notification-radius:8px;--button-hover-transition:opacity 0.2s;--video-container-z-index:0;--controls-container-z-index:1;--ads-container-z-index:1;--end-screen-mobile-z-index:1;--notification-z-index:1;--thumb-timer-z-index:2;--debug-panel-z-index:2;--modal-z-index:2;--settings-menu-z-index:2;--context-menu-z-index:3;--hot-key-helpers-container-z-index:3;--overlay-container-z-index:4;--rotate-transition-duration:0.25s;--btn-color:var(--white);--double-forward-bg:rgba(0,0,0,.6);background:var(--black);color:var(--white);font-family:var(--vk-vp-custom-font,var(--font));font-size:12px;height:100%;line-height:normal;outline:0;overflow:hidden;position:relative;user-select:none;width:100%}.vk-vp-root.visible-outside.s-0{overflow:visible}.vk-vp-root.s-0 *{-webkit-tap-highlight-color:transparent}.vk-vp-root.s-0 button{background:transparent;border:none;color:inherit;font:inherit;line-height:normal;margin:0;overflow:visible;padding:0;width:auto;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;cursor:pointer}.vk-vp-root.s-0 p{margin:0}.vk-vp-root.s-0 svg:not(.interactive-root svg){pointer-events:none}.vk-vp-root.s-0 .interactive-root{font-family:var(--vk-vp-int-custom-font,inherit)}.vk-vp-root.s-0 :focus,.vk-vp-root.s-0 :focus-visible{outline:none}.vk-vp-root.s-0 :focus-visible{border-radius:var(--focused-outline-radius);box-shadow:var(--focused-element-shadow)}.vk-vp-root.s-0 .focus-hidden:focus-visible{box-shadow:none}.vk-vp-root.s-0 .hidden{opacity:0;visibility:hidden}.vk-vp-root.s-0 .out-of-flow{content-visibility:hidden!important}.vk-vp-root.s-0 .overlay-container{height:100%;left:0;pointer-events:none;position:fixed;top:0;width:100%;z-index:var(--overlay-container-z-index)}.vk-vp-root.s-0 .out-of-view{left:-1000vh!important;position:absolute!important}.vk-vp-root.s-0 .icon.icon-error-stub{align-items:center;display:flex;justify-content:center}'};function Ev(t,e){B(e,!0),G(t,RT);let[i,o]=Ne(),r=()=>x(at,"$isLive$",i),a=()=>x(mt,"$availableSubtitlesList$",i),l=()=>x(Ge,"$isPreviewTrackHorizontallyAligned$",i),d=h(e,"sources",7),s=h(e,"store",7),u=h(e,"microStoresRoot",7),m=h(e,"videoConfig",7),p=h(e,"uiConfig",7),v=h(e,"title",7),_=h(e,"thumbUrl",7),y=h(e,"interactiveContainer",7),b=h(e,"interactiveController",7),w=h(e,"subtitles",7),I=h(e,"subtitlesForcedLanguage",7),T=h(e,"live",7),N=h(e,"preload",7),A=h(e,"autoplay",7),E=h(e,"volume",7,void 0),P=h(e,"muted",7,void 0),Q=h(e,"fromTime",7),F=h(e,"canRewindLive",7),z=h(e,"showAds",7),X=h(e,"adsSlotId",7,void 0),se=h(e,"adsParams",7,void 0),Z=h(e,"adsAutoplayParam",7,void 0),oe=h(e,"duration",7,void 0),J=h(e,"logoClickable",7),Ce=h(e,"logoHidden",7),me=h(e,"isMobile",7),ee=h(e,"showNextPrevButtons",7,!1),be=h(e,"nextButtonActive",7,!1),we=h(e,"prevButtonActive",7,!1),ge=h(e,"endScreenVideoTitle",7,void 0),pe=h(e,"endScreenVideoThumb",7,void 0),Ke=h(e,"isOneVideoPlaylist",7,!1),U=h(e,"supportLink",7),O=h(e,"shadowRootContainer",7),qe=h(e,"outerContainerRef",7),K=h(e,"fullScreenTarget",7,void 0),ae=h(e,"failoverHosts",7,void 0),xe=h(e,"showMiniTimer",7,!1),Be=h(e,"saveRate",7),tt=h(e,"seekToInteractive",7,Mb),re=h(e,"playPrevChapter",7,Mb),ce=h(e,"volumeMultiplier",7),Re=h(e,"showAutoplayNext",7),Ve=h(e,"showEndScreen",7,!0),Je=h(e,"keyboardControls",15,void 0),{subscribers:Ee,stores:Te}=u();Eh(p());let He=Rt(),Ct=p().logoLink,xt=s().ui.debugPanelVisible,At=s().ui.playerSize,at=s().state.isLive$,jt=s().state.isInteractive&&Iv.device.isAndroid,It=q(void 0),Dt=null,Ut=q(!1);s().getAdmanWrapper().init({switchFromAdsToVideo:s().actions.internal.switchFromAdsToVideo,switchFromVideoToAds:s().actions.internal.switchFromVideoToAds,setMuted:s().actions.external.setMuted},s().ads,{vsid:s().vsid}),Oh(s(),Te),De(()=>{var W,Mt;s().ui.isMobile.set(me()),(Mt=(W=m().callbacks)==null?void 0:W.onDomReady)==null||Mt.call(W)});let Y=(W=!1)=>{R(Ut,!0),W?s().actions.external.firstStart(z()):s().actions.internal.firstStart(z())},Pe=()=>{if(He.features.qualityDetailsSubMenuEnabled){let W=a_(s().videoId);if(W)switch(W.type){case"high_quality":s().actions.internal.setHighQualityEnabled(!0,W.appliesTo);break;case"traffic_saving":s().actions.internal.setTrafficSavingEnabled(!0,W.appliesTo);break;case"exact_quality":s().actions.internal.setQuality(W.quality);break}}else{l_(s().videoId),Ef()&&s().actions.internal.setTrafficSavingEnabled(!0);let Mt=Cf(s().videoId);Mt&&s().actions.internal.setQuality(Mt)}};function le(W){var vt,ot,Ni;let Mt=d()||W;Mt&&s().initVideo({container:n(It),sources:Mt,failoverHosts:ae(),subtitles:w(),subtitlesForcedLanguage:I(),volumeMultiplier:ce()});let ri=AT.get(Cd)==="true";xt.set(ri),Q()>0&&s().actions.external.seekTime(Q());let pt=me()?He.volumeDefault:(ot=(vt=E())!=null?vt:bu())!=null?ot:He.volumeDefault,Xt=(Ni=P())!=null?Ni:t_();if(s().actions.external.setVolume(pt),s().actions.external.setMuted(Xt),s().getAdmanWrapper().setInitialVolume(Xt?0:pt),Pe(),He.features.saveRate&&Be()){let Pi=n_();Pi&&!r()&&s().actions.internal.setPlaybackRate(Pi)}if(Re()){let Pi=s_();Pi&&s().actions.internal.setAutoplayNextEnabled(Pi)}s().ui.isAutoplay.set(A()),A()&&Y(),N()&&He.features.preload&&s().actions.internal.preload()}let ye=W=>{if(window.ResizeObserver){let Mt,ri;Dt=new ResizeObserver(LT(pt=>{let Xt=pt[0];if(Xt.contentBoxSize){let vt=Array.isArray(Xt.contentBoxSize)?Xt.contentBoxSize[0]:Xt.contentBoxSize;Mt=vt.inlineSize,ri=vt.blockSize}else Xt.contentRect&&(Mt=Xt.contentRect.width,ri=Xt.contentRect.height);At.set({width:Mt,height:ri})},300)),Dt.observe(W)}W.clientWidth&&W.clientHeight&&At.set({width:W.clientWidth,height:W.clientHeight})},Le=()=>{document.hidden&&s().actions.external.stop()};Vt(()=>{var ri,pt,Xt,vt;jt&&document.addEventListener("visibilitychange",Le),He.debugLog&&s().actions.internal.startLogging(),ye(n(It));let W=Ee.map(ot=>ot.init({store:s(),microStores:Te,config:m(),interactiveController:b(),uiConfig:p()})),Mt=()=>{jt&&document.removeEventListener("visibilitychange",Le),Dt==null||Dt.disconnect(),W.forEach(ot=>ot.unsubscribe()),s().destroy()};return((ri=T())==null?void 0:ri.status)==="upcoming"?(s().actions.internal.setLiveWaitingStart(!0),Mt):((pt=T())==null?void 0:pt.status)==="waiting"?(s().actions.internal.setLiveWaitingRecover(!0),Mt):(((Xt=T())==null?void 0:Xt.status)==="finished"||((vt=T())==null?void 0:vt.status)==="postlive")&&!(d()&&kT(d()))?(s().actions.internal.setLiveWaitingRecord(!0),Mt):(le(),Mt)});function nt(){n(Ut)?s().actions.external.play():Y(!0)}function Et(){s().actions.external.pause()}function fe(W){s().actions.external.setMuted(W)}function Oe(){s().actions.external.toggleSubtitle()}function ze(W,Mt){s().actions.external.changeSubtitle(W,Mt)}function bt(W){s().actions.external.changeAudioStream(W)}function zt(){var W;(W=s().webApi.slotsApi)!=null&&W.haveSlots()&&s().actions.external.hideControls()}function Pt(){var W;(W=s().webApi.slotsApi)!=null&&W.haveSlots()&&s().actions.external.showControls()}function ui(W){me()||W>=0&&W<=1&&s().actions.external.setVolume(W)}function di(W){s().actions.internal.seekTime(W,MT.UNKNOWN)}function Vi(W){s().actions.external.seekEpisodeStartTime(W)}function Lt(){s().actions.external.returnFocusToEpisodes()}function pi(W){s().actions.external.setPlaybackRate(W)}function hi(W){s().actions.external.setAutoQualityLimits(W)}function ut(){s().actions.external.setQuality("auto")}function Gt(W){s().actions.external.setTrafficSavingEnabled(W)}function Ri(W){s().actions.external.setHighQualityEnabled(W)}let bi=ap(He.view),ei=m().playerView==="preview",mt=s().state.availableSubtitlesList$;if(He.features.initSubtitles){let W=!1;De(()=>{var Mt;if(!W&&a().length){W=!0;let ri;if(He.features.userVideoPrefs&&s().videoId){let Xt=wu(He.userSalt,String(s().videoId));Xt!=null&&Xt.subtitleTrackId&&(ri=a().find(vt=>vt.value===Xt.subtitleTrackId))}let pt=(Mt=I())!=null?Mt:kf();pt&&(ri=a().find(Xt=>Xt.language===pt)),s().actions.internal.setSubtitle(ri)}})}let Ge=s().ui.isPreviewTrackHorizontallyAligned;var fi=VT();let po;var Go=C(fi);{var Yo=W=>{Cv(W,{get store(){return s()},get uiConfig(){return He},get thumbUrl(){return _()},get interactiveContainer(){return y()},get live(){return T()},get autoplay(){return A()},get canRewindLive(){return F()},get showAds(){return z()},get adsSlotId(){return X()},get adsParams(){return se()},get adsAutoplayParam(){return Z()},get duration(){return oe()},get logoClickable(){return J()},get logoHidden(){return Ce()},get logoTargetUrl(){return Ct},get nextButtonActive(){return be()},get prevButtonActive(){return we()},get endScreenVideoTitle(){return ge()},get endScreenVideoThumb(){return pe()},get isOneVideoPlaylist(){return Ke()},get supportLink(){return U()},get shadowRootContainer(){return O()},get outerContainerRef(){return qe()},get fullScreenTarget(){return K()},get showMiniTimer(){return xe()},get playerStarted(){return n(Ut)},get seekToInteractive(){return tt()},get playPrevChapter(){return re()},firstStart:Y,seekTime:di,get showEndScreen(){return Ve()},get showAutoplayNext(){return Re()},get showNextPrevButtons(){return ee()},get adsExternalApi(){return e.adsExternalApi},get videoContainer(){return n(It)},set videoContainer(Mt){R(It,Mt,!0)}})},yt=W=>{var Mt=Ae(),ri=ue(Mt);{var pt=vt=>{Tv(vt,{get thumbUrl(){return _()},get outsideDuration(){return oe()},get canRewindLive(){return F()},get videoContainer(){return n(It)},set videoContainer(ot){R(It,ot,!0)}})},Xt=vt=>{wv(vt,{get store(){return s()},get uiConfig(){return He},get title(){return v()},get thumbUrl(){return _()},get interactiveContainer(){return y()},get live(){return T()},get autoplay(){return A()},get canRewindLive(){return F()},get showAds(){return z()},get adsSlotId(){return X()},get adsParams(){return se()},get adsAutoplayParam(){return Z()},get duration(){return oe()},get logoClickable(){return J()},get logoHidden(){return Ce()},get logoTargetUrl(){return Ct},get nextButtonActive(){return be()},get prevButtonActive(){return we()},get endScreenVideoTitle(){return ge()},get endScreenVideoThumb(){return pe()},get isOneVideoPlaylist(){return Ke()},get supportLink(){return U()},get shadowRootContainer(){return O()},get outerContainerRef(){return qe()},get fullScreenTarget(){return K()},get showMiniTimer(){return xe()},get playerStarted(){return n(Ut)},get seekToInteractive(){return tt()},get playPrevChapter(){return re()},firstStart:Y,get showEndScreen(){return Ve()},get showAutoplayNext(){return Re()},get showNextPrevButtons(){return ee()},get adsExternalApi(){return e.adsExternalApi},get getVideoDeeplink(){return e.getVideoDeeplink},get videoContainer(){return n(It)},set videoContainer(ot){R(It,ot,!0)},get keyboardControls(){return Je()},set keyboardControls(ot){Je(ot)}})};V(ri,vt=>{ei?vt(pt):vt(Xt,!1)})}$(W,Mt)};V(Go,W=>{me()?W(Yo):W(yt,!1)})}S(fi),D(W=>{po=ne(fi,1,"vk-vp-root s-0",null,po,W),We(fi,bi)},[()=>({"root--miui-browser":Iv.device.isMobile&&Iv.browser.isMiuiBrowser,"visible-outside":ei,"preview-track-horizontally-alinged":l()})]),$(t,fi);var Ot=H({initVideo:le,play:nt,pause:Et,setMuted:fe,toggleSubtitle:Oe,changeSubtitle:ze,changeAudioStream:bt,hideControls:zt,showControls:Pt,setVolume:ui,seekTime:di,seekEpisodeStartTime:Vi,returnFocusToEpisodes:Lt,setPlaybackRate:pi,setAutoQualityLimits:hi,setAutoQuality:ut,toggleTrafficSaving:Gt,toggleHighQuality:Ri,get sources(){return d()},set sources(W){d(W)},get store(){return s()},set store(W){s(W)},get microStoresRoot(){return u()},set microStoresRoot(W){u(W)},get videoConfig(){return m()},set videoConfig(W){m(W)},get uiConfig(){return p()},set uiConfig(W){p(W)},get title(){return v()},set title(W){v(W)},get thumbUrl(){return _()},set thumbUrl(W){_(W)},get interactiveContainer(){return y()},set interactiveContainer(W){y(W)},get interactiveController(){return b()},set interactiveController(W){b(W)},get subtitles(){return w()},set subtitles(W){w(W)},get subtitlesForcedLanguage(){return I()},set subtitlesForcedLanguage(W){I(W)},get live(){return T()},set live(W){T(W)},get preload(){return N()},set preload(W){N(W)},get autoplay(){return A()},set autoplay(W){A(W)},get volume(){return E()},set volume(W){E(W)},get muted(){return P()},set muted(W){P(W)},get fromTime(){return Q()},set fromTime(W){Q(W)},get canRewindLive(){return F()},set canRewindLive(W){F(W)},get showAds(){return z()},set showAds(W){z(W)},get adsSlotId(){return X()},set adsSlotId(W){X(W)},get adsParams(){return se()},set adsParams(W){se(W)},get adsAutoplayParam(){return Z()},set adsAutoplayParam(W){Z(W)},get duration(){return oe()},set duration(W){oe(W)},get logoClickable(){return J()},set logoClickable(W){J(W)},get logoHidden(){return Ce()},set logoHidden(W){Ce(W)},get isMobile(){return me()},set isMobile(W){me(W)},get showNextPrevButtons(){return ee()},set showNextPrevButtons(W){ee(W)},get nextButtonActive(){return be()},set nextButtonActive(W){be(W)},get prevButtonActive(){return we()},set prevButtonActive(W){we(W)},get endScreenVideoTitle(){return ge()},set endScreenVideoTitle(W){ge(W)},get endScreenVideoThumb(){return pe()},set endScreenVideoThumb(W){pe(W)},get isOneVideoPlaylist(){return Ke()},set isOneVideoPlaylist(W){Ke(W)},get supportLink(){return U()},set supportLink(W){U(W)},get shadowRootContainer(){return O()},set shadowRootContainer(W){O(W)},get outerContainerRef(){return qe()},set outerContainerRef(W){qe(W)},get fullScreenTarget(){return K()},set fullScreenTarget(W){K(W)},get failoverHosts(){return ae()},set failoverHosts(W){ae(W)},get showMiniTimer(){return xe()},set showMiniTimer(W){xe(W)},get saveRate(){return Be()},set saveRate(W){Be(W)},get showAutoplayNext(){return Re()},set showAutoplayNext(W){Re(W)},get seekToInteractive(){return tt()},set seekToInteractive(W){tt(W)},get playPrevChapter(){return re()},set playPrevChapter(W){re(W)},get volumeMultiplier(){return ce()},set volumeMultiplier(W){ce(W)},get showEndScreen(){return Ve()},set showEndScreen(W){Ve(W)},get keyboardControls(){return Je()},set keyboardControls(W){Je(W)}});return o(),Ot}var NT=Ie('<defs><path id="rect" d="m2.72 0c.45 0 .6.05.77.13a1 1 0 01.38.38c.09.16.13.33.13.77v1.44c0 .44-.04.6-.13.77a1 1 0 01-.38.38c-.16.08-.32.13-.77.13h-1.44c-.44 0-.6-.05-.77-.13a1 1 0 01-.37-.38c-.1-.16-.14-.33-.14-.77v-1.44c0-.44.05-.6.13-.77a1 1 0 01.38-.38c.17-.08.33-.13.77-.13z"></path></defs><path d="M38.24 6c3.57 0 4.86.37 6.17 1.07a7.3 7.3 0 0 1 3.02 3.02c.7 1.3 1.07 2.6 1.07 6.17v23.49c0 3.56-.37 4.85-1.07 6.16a7.3 7.3 0 0 1-3.02 3.02c-1.3.7-2.6 1.07-6.16 1.07h-19.5c-3.56 0-4.85-.37-6.16-1.07a7.3 7.3 0 0 1-3.02-3.02c-.7-1.3-1.07-2.6-1.07-6.16v-23.5c0-3.56.37-4.85 1.07-6.16a7.3 7.3 0 0 1 3.02-3.02C13.9 6.37 15.2 6 18.76 6zm.32 3h-19.8c-2.8 0-3.77.19-4.75.71a4.3 4.3 0 0 0-1.8 1.8c-.5.95-.7 1.87-.7 4.43l-.01 23.8c0 2.8.19 3.76.71 4.75a4.3 4.3 0 0 0 1.8 1.8c.98.52 1.95.71 4.75.71h19.49c2.8 0 3.76-.19 4.74-.71a4.3 4.3 0 0 0 1.8-1.8c.52-.98.71-1.95.71-4.74v-23.5c0-2.8-.19-3.75-.71-4.74a4.3 4.3 0 0 0-1.8-1.8c-.95-.5-1.87-.7-4.43-.7z"></path><use xlink:href="#rect" x="16.5" y="14"></use><use xlink:href="#rect" x="16.5" y="22"></use><use xlink:href="#rect" x="16.5" y="30"></use><use xlink:href="#rect" x="16.5" y="38"></use><use xlink:href="#rect" x="37" y="14"></use><use xlink:href="#rect" x="37" y="22"></use><use xlink:href="#rect" x="37" y="30"></use><use xlink:href="#rect" x="37" y="38"></use>',1);function Pv(t,e){let i=h(e,"isWhite",3,!1),o=f(()=>i()?"#fff":"#909499");Xe(t,{width:"57",height:"60",get fill(){return n(o)},testId:"stub-icon",children:(r,a)=>{var l=NT();li(9),$(r,l)},$$slots:{default:!0}})}var DT=L('<div class="title s-1"> </div>'),OT=L('<div class="playerStub s-1"><!> <!></div>'),BT={hash:"s-1",code:".playerStub.s-1{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%}.title.s-1{box-sizing:border-box;color:#fff;font-size:15px;left:0;overflow:hidden;padding:18px 20px 10px;position:absolute;text-overflow:ellipsis;top:0;white-space:nowrap;width:100%}"};function kv(t,e){G(t,BT);var i=OT(),o=C(i);{var r=d=>{var s=DT(),u=C(s,!0);S(s),D(()=>ve(u,e.title)),$(d,s)};V(o,d=>{e.title&&d(r)})}var a=k(o,2);{var l=d=>{let s=f(()=>!!e.thumbUrl);Pv(d,{get isWhite(){return n(s)}})};V(a,d=>{(!e.title||!e.thumbUrl)&&d(l)})}S(i),D(()=>We(i,e.thumbUrl?`background-image: url('${e.thumbUrl}')`:"")),$(t,i)}var HT=L('<div class="playerError s-2"><!></div>'),FT={hash:"s-2",code:".playerError.s-2{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 Av(t){G(t,FT);var e=HT(),i=C(e);Ya(i,{}),S(e),$(t,e)}import{now as gI,ValueSubject as hI}from"@vkontakte/videoplayer-shared/es2018";import{cloneDeepWith as _I,InterfaceLanguage as bI,isNonNullable as Ov,Logger as $I,Observable as yI,Subscription as Fb,once as xI,InternalsExposure as wI,skip as SI,getPlayerId as CI}from"@vkontakte/videoplayer-shared/es2018";import{clientChecker as Ub,isMobile as TI}from"@vkontakte/videoplayer-core/es2018";import{OneStat as II,ThinOneStat as EI,MediascopePixel as PI}from"@vkontakte/videoplayer-statistics/es2018";import{Logger as UT,Subscription as zT}from"@vkontakte/videoplayer-shared/es2018";var lp=class{constructor(){this.subscription=new zT,this.logger=new UT,this.log=this.logger.createComponentLog("MediaSessionApi")}isSupported(){return"mediaSession"in navigator}setMetaData({title:e,artist:i="",thumbUrl:o=""}){this.isSupported()&&(navigator.mediaSession.metadata=new MediaMetadata({title:e,artist:i,artwork:[{src:o,sizes:"96x96",type:"image/png"},{src:o,sizes:"128x128",type:"image/png"},{src:o,sizes:"192x192",type:"image/png"},{src:o,sizes:"256x256",type:"image/png"},{src:o,sizes:"384x384",type:"image/png"},{src:o,sizes:"512x512",type:"image/png"}]}))}updateActionHandlers(e){this.resetActionHandlers(),this.setActionHandlers(e)}resetActionHandlers(){let e=[["play",null],["pause",null],["stop",null],["nexttrack",null],["previoustrack",null],["seekto",null],["seekbackward",null],["seekforward",null]];this.setActionHandlers(e)}setActionHandlers(e){var i,o;if(this.isSupported())for(let[r,a]of e)try{(o=(i=navigator.mediaSession).setActionHandler)==null||o.call(i,r,a)}catch(l){throw new Error(`The media session action "${r}" is not supported yet.`)}}attachToStore(e){!this.isSupported()||!e||(this.clearSubscriptions(),this.subscription.add(e.state.positionExact$.subscribe(i=>{var a,l;let o=$e(e.state.currentPlaybackRate$),r=$e(e.state.duration$);if(!(!isFinite(i)||!isFinite(r)))try{(l=(a=navigator.mediaSession).setPositionState)==null||l.call(a,{position:i,playbackRate:o,duration:r})}catch(d){this.log({message:`MediaSession setPositionState can't call with position: ${i} and duration: ${r}`})}})))}clearSubscriptions(){this.subscription.unsubscribe()}destroy(){this.resetActionHandlers(),this.clearSubscriptions()}};import{ValueSubject as Mv,detectEmbed as YT}from"@vkontakte/videoplayer-shared/es2018";var WT=Ie('<path d="M31.257 3.998c3.037.01 4.52.39 6.13 1.24a9 9 0 013.47 3.35l.17.31.15.3c.78 1.55 1.07 3.18 1.09 6.25v9.04a1.5 1.5 0 01-3 .02v-9.65c-.05-2.04-.24-3.12-.64-4.04l-.12-.27-.13-.25A6 6 0 0036.2 7.9c-1.19-.64-2.34-.88-5.11-.9h-8.84c-2.73 0-4 .2-5.07.7l-.25.13a6 6 0 00-2.4 2.41c-.64 1.19-.88 2.34-.9 5.11v20.83c0 2.74.2 4 .7 5.08l.13.25a6 6 0 002.41 2.4c1.1.6 2.13.83 4.44.89H26a1.5 1.5 0 010 3h-4.47c-3-.05-4.53-.38-6.14-1.24a9 9 0 01-3.48-3.35l-.15-.3c-.73-1.47-1.04-3.01-1.08-5.8V15c.05-2.98.39-4.52 1.25-6.12a9 9 0 013.293-3.582c1.85-.871 2.623-1.27 5.747-1.27z"></path><path d="M30.5 33.8c0-1.68 0-2.52.33-3.16a3 3 0 0 1 1.3-1.31c.65-.33 1.49-.33 3.17-.33h6.4c1.68 0 2.52 0 3.16.33a3 3 0 0 1 1.31 1.3c.33.65.33 1.49.33 3.17v13.4c0 1.68 0 2.52-.33 3.16a3 3 0 0 1-1.3 1.31c-.65.33-1.49.33-3.17.33h-6.4c-1.68 0-2.52 0-3.16-.33a3 3 0 0 1-1.31-1.3c-.33-.65-.33-1.49-.33-3.17z"></path>',1),KT=L('<div><div><!></div> <span class="title s-6"> </span></div>'),qT={hash:"s-6",code:".player-pip-dummy.s-6{align-items:center;background-color:#19191a;display:flex;flex-direction:column;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;width:100%}.player-pip-dummy.is-pip-api.s-6{position:relative}.dummy-image.s-6 svg{transform:scale(1.07143)}.dummy-image.desktop.s-6{transform:scale(1.07143) rotate(-90deg) rotateY(180deg)}.title.s-6{color:#fff;font-size:16px;padding:18px 20px 10px;text-align:center}"};function Lv(t,e){B(e,!0),G(t,qT);let[i,o]=Ne(),r=()=>x(u,"$interfaceLanguage$",i),a=()=>x(m,"$isMobile$",i),l=_e(),d=Rt(),s=!!l.webApi.pictureInPictureApi,u=l.interfaceLanguage$,m=l.ui.isMobile,p=l.ui.t,v=f(()=>r()&&p("pip_dummy_title")),_=ap(d.view);var y=KT();let b;var w=C(y);let I;var T=C(w);Xe(T,{width:"57",height:"56",testId:"pip-dummy-icon",children:(E,P)=>{var Q=WT();li(),$(E,Q)},$$slots:{default:!0}}),S(w);var N=k(w,2),A=C(N,!0);S(N),S(y),D((E,P)=>{b=ne(y,1,"player-pip-dummy s-6",null,b,E),We(y,_),I=ne(w,1,"dummy-image s-6",null,I,P),ve(A,n(v))},[()=>({"is-pip-api":s}),()=>({desktop:!a()})]),$(t,y),H(),o()}var QT=Object.defineProperty,GT=(t,e,i)=>e in t?QT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Gl=(t,e,i)=>GT(t,typeof e!="symbol"?e+"":e,i),jT=460,XT=280,bc=class{constructor({enabled:e=!0}={enabled:!0}){Gl(this,"playerDomElement"),Gl(this,"playerParentShadowRoot"),Gl(this,"playerDummyElement"),Gl(this,"svelteContext"),Gl(this,"pipWindow"),Gl(this,"info",{isActive$:new Mv(!1),isEnabled$:new Mv(!1),type:1}),this.info.isEnabled$=new Mv(e)}isSupported(){let{isEmbed:e}=YT();return"documentPictureInPicture"in window&&!e}isActive(){return this.info.isActive$.getValue()}setPlayerDomElement(e,i){this.playerDomElement=e,this.playerParentShadowRoot=i}setContext(e){this.svelteContext=e}async request(){var e,i;if(!this.isSupported()||!this.playerDomElement||!this.playerParentShadowRoot)return;this.pipWindow=await documentPictureInPicture.requestWindow({width:jT,height:XT,copyStyleSheets:!0}),this.pipWindow.document.body.style.margin="0";let o=[...this.playerParentShadowRoot.styleSheets].map(s=>[...s.cssRules].map(u=>u.cssText).join(" ")).filter(Boolean).join(`
|
|
63
|
+
`),r=document.createElement("style");r.textContent=o;let a=this.createStretchedContainer(),l=a.attachShadow({mode:"open"});l.append(r),l.append(this.playerDomElement);let d={target:this.playerParentShadowRoot,context:this.svelteContext};this.playerDummyElement=Zr(Lv,d),(e=this.pipWindow)==null||e.document.body.append(a),this.info.isActive$.next(!0),(i=this.pipWindow)==null||i.addEventListener("unload",s=>{!this.playerDomElement||!this.playerParentShadowRoot||!this.playerDummyElement||(ka(this.playerDummyElement),this.playerParentShadowRoot.append(this.playerDomElement),this.info.isActive$.next(!1),this.pipWindow=void 0)})}async exit(){return new Promise(e=>{var i;this.pipWindow&&((i=documentPictureInPicture.window)==null||i.close()),e()})}async dispose(){await this.exit()}setEnabled(e){this.info.isEnabled$.next(e)}createStretchedContainer(){let e=document.createElement("div");return e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="100%",e}};function Vb(t){return t instanceof bc}var dp=class{static getLatestSupportedVersion(e){let i=new Ra(e),o=new bc(e);if(o.isSupported())return o;if(i.isSupported())return i}};function $c(t,e){var r,a;let i=new Set([...Object.keys(t),...Object.keys(e)]),o={};for(let l of i)o[l]=(a=(r=e[l])!=null?r:t[l])!=null?a:void 0;return o}var Rb="Inner error. Unexpectedly root annotation container null reference exception",Nb="Annotation with such name already exists",Db="Annotation with such name does not exist";var Yl=class extends Error{constructor(e){super(e),this.name="AnnotationError"}};import{observeElementSize as ZT,Subscription as JT,throttleFn as eI}from"@vkontakte/videoplayer-shared/es2018";var tI="1",iI=100,cp=class{constructor(e){this.annotationsInside=e;this.annotations=new Map;this.subscriptions=new JT}init(e){if(this.rootAnnotationsContainer=e,this.annotationsInside)return;let i=eI(()=>{for(let o of this.annotations.values())this.isElementExceedsBoundaries(o,this.playerSize.width,this.playerSize.height)?o.style.visibility="hidden":o.style.visibility="visible"},iI);this.subscriptions.add(ZT(this.rootAnnotationsContainer).subscribe(({width:o,height:r})=>{this.playerSize={width:o,height:r},i()})),this.mutationObserver=new MutationObserver(i),this.mutationObserver.observe(this.rootAnnotationsContainer,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}add(e,i){var o;if(!this.rootAnnotationsContainer)throw new Yl(Rb);if(this.annotations.has(e))throw new Yl(Nb);i.style.zIndex=(o=i.style.zIndex)!=null?o:tI,i.style.position="absolute",this.rootAnnotationsContainer.append(i),this.annotations.set(e,i)}get(e){let i=this.annotations.get(e);if(!i)throw new Yl(Db);return i}remove(e){let i=this.get(e);this.annotations.delete(e)&&i.remove()}clear(){for(let e in this.annotations.keys())this.remove(e)}destroy(){var e;this.annotations.clear(),this.subscriptions.unsubscribe(),(e=this.mutationObserver)==null||e.disconnect(),this.rootAnnotationsContainer=null}isElementExceedsBoundaries(e,i,o){let r=e.offsetTop,a=e.offsetLeft,l=e.offsetWidth,d=e.offsetHeight;return r<0||a<0||a+l>i||r+d>o}registryRootContainer(e){}addLayer(e){return document.createElement("div")}getLayer(e){}removeLayer(e){}clearLayer(e){}detach(){}reattach(){}};import{assertNonNullable as up,Subscription as oI}from"@vkontakte/videoplayer-shared/es2018";var dn=class{init({store:e,microStores:i,interactiveController:o,config:r}){return up(e),up(i),up(r),r.interactiveData&&up(o),this.subscription=new oI,this.subscription}};var yc=class extends dn{constructor(){super(...arguments);this.stateName="fakeIsPlaying$";this.state$={...de(null),toggle:()=>this.state$.update(i=>!i)}}init(i){let o=super.init(i),{isInteractiveExpectation$:r}=i.store.state;return o.add(r.subscribe(a=>{this.state$.set(a?!0:null)})),o}};var xc=class extends dn{constructor(){super(...arguments);this.stateName="interactiveControlsOpacity$";this.state$={...de(null),toggle:()=>this.state$.update(i=>!i)}}init(i){let o=super.init(i),{microStores:r,store:a}=i,{fakeIsPlaying$:l}=r,{isInteractiveExpectation$:d,isPlaying$:s}=a.state,{controlsVisible:u,isMobile:m}=a.ui,p=$e(m),v=()=>p&&$e(u);return o.add(u.subscribe(_=>{if(!p)return;let y=$e(l);$e(s)?this.state$.set(_):y!==null&&this.state$.set(!y||_)})),o.add(s.subscribe(_=>{this.state$.set(!_||v())})),o.add(l.subscribe(_=>{if(_===null)return;let y=$e(d);if(v()){this.state$.set(!0);return}y&&this.state$.set(!_)})),o}};var wc=class extends dn{constructor(){super(...arguments);this.stateName="seekToInteractiveDisabledTooltip$";this.state$=de("tooltip_chapter_without_interactive")}init(i){let o=super.init(i),{store:r}=i;return o.add(r.state.interactiveEpisodes$.subscribe(a=>{a.length&&(a.every(l=>l.completed)?this.state$.set("tooltip_interactive_of_chapter_completed"):this.state$.set("tooltip_disabled_when_interactive"))})),o}};import{combine as nI}from"@vkontakte/videoplayer-shared/es2018";var Vv=de(!1),pp=null,Sc=class extends dn{constructor(){super(...arguments);this.stateName="showInteractiveTimeIndicatorTooltip$";this.state$={...Vv,set:(i,o=!1)=>{i!==$e(Vv)&&(this.clearTimeout(),Vv.set(i),!i&&pp&&(pp=!1),i&&o&&(this.timeout=setTimeout(()=>{this.state$.set(!1)},3e3)))},clearTimeout:()=>this.clearTimeout()}}init(i){let o=super.init(i),{store:r,config:a}=i,{isInteractiveTime$:l,isPlaying$:d}=r.state,s=r.ui.controlsVisible,{interactiveTimeIndicator:u}=r.ui.controls;o.add(s.subscribe(p=>{$e(l)&&p&&this.state$.set(!1)}));let m=(a==null?void 0:a.interactiveData)||{tooltipHelpHintActive:!1};return o.add(nI({isPlaying$:d,isInteractiveTime$:l,interactiveTimeIndicator:u}).subscribe(({isPlaying$:p,isInteractiveTime$:v,interactiveTimeIndicator:_})=>{var y,b;if(!(!p||!(_!=null&&_.isDisplayed))){if(!v)return this.state$.set(!1);m.tooltipHelpHintActive&&pp===null&&(pp=!0,m.tooltipHelpHintActive=!1,this.state$.set(!0),(b=(y=r.callbacks)==null?void 0:y.onInteractiveTimeIndicatorHintDeactivated)==null||b.call(y))}})),o}clearTimeout(){window.clearTimeout(this.timeout)}};import{combine as rI,noop as sI}from"@vkontakte/videoplayer-shared/es2018";var Cc=class extends dn{constructor(){super(...arguments);this.stateName="graphIsOpened$";this.graphMadePause=!1;this.state$={...de(null),toggle:sI};this.checkIfShouldHide=i=>Ns(i,"s")}init(i){let o=super.init(i),{store:r,interactiveController:a}=i,l=r.ui.currentGridType$,d=r.getLogger().createComponentLog("GraphIsOpened microStore");return this.state$.toggle=async()=>{if(this.checkIfShouldHide($e(l)))return;let s=$e(this.state$),{isEnded$:u,playbackState$:m}=r.state,{disabledControls$:p}=r.ui.controls,v=$e(u),_=$e(m);if(s)try{await(a==null?void 0:a.toggleGraphView(!1)),this.state$.set(!1),p.remove(hf),!v&&this.graphMadePause&&r.actions.internal.play()}catch(y){d({message:"Cant hide graph"})}else{this.graphMadePause=_==="playing";try{await(a==null?void 0:a.toggleGraphView(!0)),this.state$.set(!0),p.add(hf),!v&&this.graphMadePause&&r.actions.internal.pause()}catch(y){d({message:"Cant show graph"})}}},o.add(rI({graphIsOpened:this.state$,currentGridType:l}).subscribe(async({graphIsOpened:s,currentGridType:u})=>{if(this.checkIfShouldHide(u)&&s)try{await(a==null?void 0:a.toggleGraphView(!1)),this.state$.set(!1)}catch(p){d({message:"Cant hide graph"})}})),o}};import{ValueSubject as Ob}from"@vkontakte/videoplayer-shared/es2018";var Tc=class extends dn{constructor(){super(...arguments);this.stateName="pictureInPicture$";this.state$={isActive$:de(!1),isEnabled$:de(!1),type$:de(void 0)}}init(i){let o=super.init(i),{store:r}=i,{info:{isActive$:a,isEnabled$:l,type:d}}=r.webApi.pictureInPictureApi||{info:{isActive$:new Ob(!1),isEnabled$:new Ob(!1)}};return o.add(a.subscribe(s=>{this.state$.isActive$.set(s)})),o.add(l.subscribe(s=>{this.state$.isEnabled$.set(s)})),this.state$.type$.set(d),o}};import{filter as dI,filterChanged as cI}from"@vkontakte/videoplayer-shared/es2018";import{safeStorage as Rv}from"@vkontakte/videoplayer-shared/es2018";var Bb=({maxShowCount:t,timeout:e})=>{let i=[t!==0?aI({maxCount:t}):void 0,e!==0?lI({timeout:e}):void 0].filter(o=>!!o);return{notificationShowed:o=>i.forEach(r=>r.notificationShowed(o)),canShowNotification:o=>i.every(r=>r.canShowNotification(o))}},aI=({maxCount:t})=>{let e={};return{notificationShowed:i=>{var o,r;e[i]=((o=e[i])!=null?o:0)+1,Rv.set("videoplayer_notifications_manager_count",JSON.stringify((r=e[i])!=null?r:0))},canShowNotification:i=>{var o;return((o=e[i])!=null?o:0)<t}}},lI=({timeout:t})=>{let e="videoplayer_notifications_manager",i=()=>{try{return JSON.parse(Rv.get(e)||"{}")}catch(a){return{}}},o=a=>Rv.set(e,JSON.stringify(a)),r=a=>{let l=i();delete l[a],o(l)};return{notificationShowed:a=>{o({...i(),[a]:{timeout:t,launchTime:Date.now()}})},canShowNotification:a=>{let l=i()[a];if(l){let d=Date.now()-l.launchTime>t;return d&&r(a),d}else return!0}}};var Ic=class extends dn{constructor(){super(...arguments);this.stateName="notifications$";this.state$={notificationsToShow$:de({}),showNotification:i=>{this.state$.notificationsToShow$.update(o=>(o[i]=!0,o)),this.notificationManager.notificationShowed(i)},closeNotification:i=>{this.state$.notificationsToShow$.update(o=>(delete o[i],o))}}}init(i){let o=super.init(i),{store:r,uiConfig:{features:{maxCountShowSlowVideoNotification:a,timeoutShowSlowVideoNotification:l,showSlowVideoNotification:d,forceAutoQualityWhenSevereStallHappens:s}}}=i;this.notificationManager=Bb({maxShowCount:a,timeout:l});let u=r.getPlayer();return o.add(u.events.severeStallOccured$.pipe(cI(),dI(m=>m)).subscribe(()=>{d&&!u.info.isAutoQualityEnabled$.getValue()&&this.notificationManager.canShowNotification("slow_video")&&(s&&r.actions.internal.setQuality("auto"),this.state$.showNotification("slow_video"))})),o}};var Hb=()=>[yc,xc,wc,Sc,Cc,Tc,Ic].reduce(({subscribers:t,stores:e},i)=>{let o=new i;return{subscribers:[...t,o],stores:{...e,[o.stateName]:o.state$}}},{subscribers:[],stores:{}});import{devNull as Ec}from"@vkontakte/videoplayer-shared/es2018";var fp=class{constructor(e){this.getActiveElement=e;this.focusableElements=[];this.isActive=!1;this.handleTabKey=e=>{if(this.updateFocusableElements(),!this.focusableElements.length)return;let i=this.focusableElements[0],o=this.focusableElements[this.focusableElements.length-1],r=this.getActiveElement();e.shiftKey&&r===i?(e.preventDefault(),o.focus()):!e.shiftKey&&r===o&&(e.preventDefault(),i.focus())}}activate(){this.isActive||(document.addEventListener("keydown",this.handleTabKey),this.isActive=!0)}deactivate(){this.isActive&&(document.removeEventListener("keydown",this.handleTabKey),this.isActive=!1,this.focusableElements=[])}updateFocusableElements(){this.isActive&&(this.focusableElements=this.getFocusableElements())}getFocusableElements(){let e=["button:not([disabled])","[href]:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"]):not([disabled])'].join(", ");return Array.from(this.container.querySelectorAll(e)).filter(i=>!i.disabled&&i.offsetParent!==null)}destroy(){this.deactivate()}setContainer(e){this.container=e}};var mp=class{constructor(e){this.shadowRoot=e;this.lastFocusedNode=null;this.init=()=>{this.shadowRoot.addEventListener("focusin",this.handleFocusChange)};this.handleFocusChange=()=>{this.lastFocusedNode=this.shadowRoot.activeElement};this.restoreFocus=()=>{var e;(e=this.lastFocusedNode)==null||e.focus()};this.focusLock=new fp(()=>this.lastFocusedNode),this.init()}destroy(){this.shadowRoot.removeEventListener("focusin",this.handleFocusChange),this.focusLock.destroy()}getLastFocusedNode(){return this.lastFocusedNode}activateLock(){this.focusLock.activate()}deactivateLock(){this.focusLock.deactivate()}setContainerForFocusLock(e){this.focusLock.setContainer(e)}};var uI=L('<div class="root s-3"><!></div>'),pI={hash:"s-3",code:".root.s-3{align-items:center;display:flex;inset:0;justify-content:center;pointer-events:none;position:absolute;z-index:1}"};function Nv(t,e){B(e,!0),G(t,pI);let i=null,o=q(null);De(()=>(n(o)&&(i=window.setTimeout(()=>{R(o,null)},e.animationDuration)),()=>{i&&clearTimeout(i)}));function r(s){e.playbackStatusShow&&R(o,s?"prev":"next",!0)}var a=Ae(),l=ue(a);{var d=s=>{var u=Ae(),m=ue(u);As(m,()=>n(o),p=>{var v=uI(),_=C(v);let y=f(()=>n(o)==="prev");hc(_,{get duration(){return e.animationDuration},get Icon(){return ca},get reversed(){return n(y)}}),S(v),$(p,v)}),$(s,u)};V(l,s=>{e.playbackStatusShow&&n(o)&&s(d)})}return $(t,a),H({startVideoChangedAnimation:r})}import{getWindow as fI}from"@vkontakte/videoplayer-shared/es2018";var Dv=fI().HTMLElement||class{constructor(){this.isConnected=!1}};var mI=Object.defineProperty,vI=(t,e,i)=>e in t?mI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,qt=(t,e,i)=>vI(t,typeof e!="symbol"?e+"":e,i),kI={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:bI.RU,isCyrillicRelatedInterface:!0,logoClickable:!1,logoHidden:!1,isTouch:TI(),isMediaSessionEnabled:!0,isPictureInPictureEnabled:!0,isAudioDisabled:!1,callbacks:{uiInfo:{}},tuningConfig:{},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showAutoplayNext:!0,showNextPrevButtons:!0},Xn=q(void 0),Bv=ai({animationDuration:0,playbackStatusShow:!1}),vp=class extends Dv{constructor(){super(),qt(this,"svelteStubComponent"),qt(this,"svelteRootComponent"),qt(this,"sveltePersistentLayerComponent"),qt(this,"svelteErrorComponent"),qt(this,"store"),qt(this,"microStoresRoot"),qt(this,"statistics"),qt(this,"sentry"),qt(this,"_shadowRoot"),qt(this,"playerContainer"),qt(this,"rootContainer"),qt(this,"stateContainer"),qt(this,"shadowRootContainer"),qt(this,"playerId"),qt(this,"uiConfig"),qt(this,"coreConfig"),qt(this,"statisticsConfig"),qt(this,"metaConfig"),qt(this,"interactiveController"),qt(this,"interactiveContainer"),qt(this,"graphMadePause"),qt(this,"currentPlayingVideoIndex",0),qt(this,"needToRepeatPlaylist",!1),qt(this,"videoConfig"),qt(this,"pictureInPictureApi"),qt(this,"mediaSessionApi"),qt(this,"unsubscribePlayerPhaseSubscription"),qt(this,"logger"),qt(this,"log"),qt(this,"subscription"),qt(this,"interactiveSubscription"),qt(this,"annotationsApi"),qt(this,"slotsApi"),qt(this,"focusManager"),qt(this,"prevIsid"),qt(this,"isInited",!1),qt(this,"postponedInitParams",null),qt(this,"internalsExposure",null),qt(this,"shadowDOMCallbacksDisabled",!1),qt(this,"fatalError$",new hI(null)),qt(this,"createOneStat",(e,i={})=>{var o,r,a,l;if(!this.videoConfig)return;let{albumId:d,statPlace:s,statUserSalt:u,statTrackCode:m,statVKAppId:p,refreshStatAuthToken:v,autoplay:_,isMobile:y,isTouch:b,refDomain:w,deviceId:I,interactiveData:T}=$c(this.videoConfig,i),N=(o=T==null?void 0:T.projectInfo)==null?void 0:o.pid,A=(a=(r=this.interactiveController)==null?void 0:r.state.isReplay$.getValue())!=null?a:!1;A&&(this.prevIsid=void 0);let{unitedVideoId:E,isClip:P=!1}=e;if(this.uiConfig.features.statistics&&E)try{return new II({movieId:E,albumId:d,place:s,trackCode:m,vkAppId:p,autoplay:(l=_&&!this.interactiveController)!=null?l:!1,mobile:b!=null?b:y,clip:P,refDomain:w,deviceId:I,isPreviewPlayerView:this.videoConfig.playerView==="preview",...N&&(!this.isInited||A)&&{projectId:Number(N)}},{refreshAuthToken:v,userSalt:u,config:this.statisticsConfig,...this.interactiveController&&{useIsid:!0,isid:this.prevIsid}})}catch(F){console.error(F),this.log({message:F.message})}}),Ec.create("ui"),this.logger=new $I,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.subscription=new Fb,this.interactiveSubscription=new Fb,this.graphMadePause=!1,this.fatalError$.subscribe(e=>{this.unmountComponent(this.svelteErrorComponent),e&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=Zr(Av,{target:this.playerContainer}))})}connectedCallback(){var e,i;if(this.rootContainer)return;this.initPlayerRootContainers();let o=(e=this.getAttribute("stub-title"))!=null?e:void 0,r=(i=this.getAttribute("stub-thumb-url"))!=null?i:void 0,a=ai({title:o,thumbUrl:r}),l={target:this.playerContainer,props:a};this.svelteStubComponent=Zr(kv,l),this.sveltePersistentLayerComponent=Zr(Nv,{target:this.playerContainer,props:Bv}),this.postponedInitParams&&(this.initPlayer(...this.postponedInitParams),this.postponedInitParams=null)}updatePersistentLayerProps(){if(!this.uiConfig)return;let{playbackStatusNextVideoAnimationDuration:e,features:{playbackStatusShow:i,playbackStatusNextVideoShow:o}}=this.uiConfig;Bv.animationDuration=e,Bv.playbackStatusShow=i&&o}disconnectedCallback(){var e,i,o,r,a,l,d;this.shadowDOMCallbacksDisabled||((e=this.annotationsApi)==null||e.destroy(),(i=this.slotsApi)==null||i.destroy(),(o=this.focusManager)==null||o.destroy(),(r=this.mediaSessionApi)==null||r.destroy(),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteErrorComponent),this.unmountComponent(this.sveltePersistentLayerComponent),this.subscription.unsubscribe(),(a=this.unsubscribePlayerPhaseSubscription)==null||a.call(this),(l=this.interactiveController)==null||l.destroy(),this.interactiveSubscription.unsubscribe(),(d=this.internalsExposure)==null||d.destroy(),Ec.destroy("ui"))}initPlayerRootContainers(){this.rootContainer=document.createElement("div"),this.rootContainer.style.position="relative",this.rootContainer.className="root-container",this.rootContainer.style.width="100%",this.rootContainer.style.height="100%",this.rootContainer.style.minHeight="206px",this.shadowRootContainer=document.createElement("div"),this.shadowRootContainer.style.position="absolute",this.shadowRootContainer.className="shadow-root-container",this.shadowRootContainer.style.width="100%",this.shadowRootContainer.style.height="100%",this._shadowRoot=this.shadowRootContainer.attachShadow({mode:"open"}),this.playerContainer=document.createElement("div"),this.playerContainer.style.all="initial",this.playerContainer.style.display="block",this.playerContainer.style.contain="strict",this.playerContainer.style.width="100%",this.playerContainer.style.height="100%",this._shadowRoot.append(this.playerContainer),this.rootContainer.append(this.shadowRootContainer),this.stateContainer=document.createElement("div"),this.stateContainer.className="state-container",this.stateContainer.style.width="1px",this.stateContainer.style.height="1px",this.stateContainer.style.position="absolute",this.stateContainer.style.backgroundColor="transparent",this.stateContainer.style.left="-100000px",this.append(this.rootContainer),this.append(this.stateContainer)}needToShowNextPrevButtons(){return this.videoConfig?this.videoConfig.videos.length>1&&this.videoConfig.showNextPrevButtons:!1}isNextButtonActive(){return this.videoConfig?this.needToShowNextPrevButtons()&&(this.currentPlayingVideoIndex<this.videoConfig.videos.length-1||this.needToRepeatPlaylist):!1}isPrevButtonActive(){return this.videoConfig?this.needToShowNextPrevButtons()&&(this.currentPlayingVideoIndex>0||this.needToRepeatPlaylist):!1}isControlDisabled(e){var i;let o=(i=this.store)==null?void 0:i.ui.controls.disabledControls$;return(o==null?void 0:o.includes(e))||!1}getNextVideoInfo(){if(!this.videoConfig)return{nextVideoTitle:void 0,nextVideoThumb:void 0};let e=this.videoConfig.videos[this.currentPlayingVideoIndex+1]||{};return{nextVideoTitle:e.title,nextVideoThumb:e.thumbUrl}}createThinOneStat(e,i={}){if(!this.videoConfig)return;let{deviceId:o,preload:r,refreshStatAuthToken:a}=$c(this.videoConfig,i),{unitedVideoId:l}=e;if(this.uiConfig.features.thinStatistics&&l)return new EI.ThinOneStat({deviceId:o,movieId:l,preload:r,isPreviewPlayerView:this.videoConfig.playerView==="preview"},{config:this.statisticsConfig,refreshAuthToken:a})}createPlayer(e,i={},o){var r,a,l,d,s,u,m,p,v,_;if(!this.videoConfig)return;let{albumId:y,statPlace:b,statAuthToken:w,preload:I,autoplay:T,volume:N,muted:A,fromTime:E,canRewindLive:P,supportLink:Q,showAds:F,adsSlotId:z,adsParams:X={},adsAutoplayParam:se,interfaceLanguage:Z,isCyrillicRelatedInterface:oe,logoClickable:J,logoHidden:Ce,isMobile:me,isTouch:ee,isAudioDisabled:be,isLiveCatchUpMode:we,fullScreenTarget:ge,failoverHosts:pe,canDownload:Ke,callbacks:U,interactiveData:O,showThumbTimer:qe,additionalButtons:K=[],additionalSettingsMenuItems:ae=[],additionalContextMenuItems:xe=[],repeat:Be,loop:tt,saveRate:re,volumeMultiplier:ce,showEndScreen:Re,showAutoplayNext:Ve,mediascopePixels:Je}=$c(this.videoConfig,i),{sources:Ee,title:Te,thumbUrl:He,unitedVideoId:Ct,isClip:xt=!1,duration:At,adsParams:at={},videoEpisodes:Tt,previewThumbsData:jt,subtitles:It,subtitlesForcedLanguage:Dt,live:Ut,adsExternalApi:Y}=e;if(!Ee&&!Ut){let pi=new Error("empty sources and live");this.fatalError$.next(pi),(r=U.onCrashed)==null||r.call(U,pi.message);return}let Pe={...X,...at},le=this.getNextVideoInfo(),ye={sources:Ee,title:Te,thumbUrl:He,subtitles:It,subtitlesForcedLanguage:Dt,unitedVideoId:Ct,isClip:xt,live:Ut,albumId:y,statPlace:b,autoplay:T,muted:A,volume:N,fromTime:E,canRewindLive:P,showAds:F,adsSlotId:z,adsParams:Pe,adsAutoplayParam:se,duration:At,logoClickable:J,logoHidden:Ce,isTouch:ee!=null?ee:me,repeat:Be,loop:tt,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:le.nextVideoTitle,endScreenVideoThumb:le.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()},Le={pictureInPictureApi:this.pictureInPictureApi,annotationsApi:this.annotationsApi,slotsApi:this.slotsApi,focusManager:this.focusManager};this.log({message:`create player, props: ${JSON.stringify(ye)}`});let nt=(a=this.interactiveController)==null?void 0:a.state.statistics$.getValue(),Et=(nt==null?void 0:nt.oneStat)||this.createOneStat(e,i),fe=this.createThinOneStat(e,i),Oe;Je&&(Oe=new PI({pixels:Je})),(Et||fe)&&(this.statistics=new Qu(Et,fe,Oe,nt==null?void 0:nt.statSubscription)),this.uiConfig.features.sentry&&this.uiConfig.sentry.dsn&&new Va(this.uiConfig.sentry,{version:kl,env:gu},{movieId:Ct,albumId:y,place:b,autoplay:(l=T&&!this.interactiveController)!=null?l:!1,mobile:ee!=null?ee:me,clip:xt}),this.interactiveController&&((u=this.prevIsid)!=null||(this.prevIsid=(s=(d=this.statistics)==null?void 0:d.oneStat)==null?void 0:s.isid$.getValue())),this.sentry={...this.sentry,...Va.getInstance()};let bt=!!O,zt=[],Pt="tooltip_interactive_go_back_disabled_first";if(bt&&this.interactiveController){let pi=this.interactiveController.state.isInitialChapter$.getValue(),hi=this.interactiveController.getHistoryState();pi&&zt.push("REPLAY_BUTTON"),this.interactiveController.getIsSeekable().getValue()||zt.push("SEEK_TO_INTERACTIVE_BUTTON"),hi.hasPrevChapter$.getValue()||(zt.push("PLAY_PREV_CHAPTER_BUTTON"),pi||(hi.isGoBackLimited$.getValue()?Pt="tooltip_interactive_go_back_disabled_limit":Pt="tooltip_interactive_go_back_disabled"))}let ui=()=>{var pi;this.isInited=!1,this.prevIsid=void 0;let hi=(o==null?void 0:o.info.isEnded$.getValue())&&((pi=this.interactiveController)==null?void 0:pi.state.isEndChapter$.getValue());U.onReplayInteractiveVideo&&!hi?U.onReplayInteractiveVideo():this.replayInteractiveVideo()},di=Be&&this.videoConfig.videos.length===1;this.store=X_({player:o,interfaceLanguage:Z,isCyrillicRelatedInterface:oe,videoId:Ct,isClip:xt,isLiveCatchUpMode:we,isAudioDisabled:be,statAuthToken:w,callbacks:U,webApi:Le,videoEpisodes:Tt,previewThumbsData:jt,canDownload:Ke,uiConfig:this.uiConfig,coreConfig:this.coreConfig,metaConfig:this.metaConfig,disabledControls:zt,isInteractive:bt,saveRate:re,interactiveRanges$:(m=this.interactiveController)==null?void 0:m.state.interactiveRanges$,isInteractiveTime$:(p=this.interactiveController)==null?void 0:p.state.isInteractiveTime$,stopPlayer:()=>this.stop(),replayInteractive:ui,playPrevChapterDisabledTooltip:Pt,hasInteractiveBranches:!!((_=(v=this.interactiveController)==null?void 0:v.getChapterBranches())!=null&&_.length),additionalButtons:this.uiConfig.features.additionalButtons?K:[],additionalSettingsMenuItems:ae!=null?ae:[],additionalContextMenuItems:xe!=null?xe:[],playPrevVideo:()=>this.playPrevVideo(),playNextVideo:()=>this.playNextVideo(),onVideoChanged:pi=>{var hi;return(hi=this.sveltePersistentLayerComponent)==null?void 0:hi.startVideoChangedAnimation(pi)},looped:this.uiConfig.features.useLoopSetting?tt:di,statistics:this.statistics,internalsExposure:this.internalsExposure,playerView:this.videoConfig.playerView,playerId:this.playerId});let{stores:Vi}=this.microStoresRoot=Hb(),Lt=()=>{var pi,hi,ut,Gt,Ri,bi;if(!this.store||!this.microStoresRoot||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(mt=>{var Ge;return(Ge=U==null?void 0:U.onCurrentFormatChanged)==null?void 0:Ge.call(U,mt)})),this.subscription.add(Vi.interactiveControlsOpacity$.subscribe(mt=>{var Ge;mt!==null&&((Ge=this==null?void 0:this.interactiveController)==null||Ge.setDisabledControls(mt))})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(mt=>{var Ge;return(Ge=U==null?void 0:U.onThroughputEstimationChanged)==null?void 0:Ge.call(U,mt)})),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(mt=>{var Ge;return(Ge=U==null?void 0:U.onTrafficSavingEnabledChanged)==null?void 0:Ge.call(U,mt)})),this.subscription.add(this.store.state.highQualityEnabled$.subscribe(mt=>{var Ge;return(Ge=U==null?void 0:U.onHighQualityEnabledChanged)==null?void 0:Ge.call(U,mt)})),this.subscription.add(this.store.state.isAutoQualityEnabled$.subscribe(mt=>{var Ge;return(Ge=U==null?void 0:U.onAutoQualityEnabledChanged)==null?void 0:Ge.call(U,!!mt)})),this.subscription.add(new yI(mt=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(Ge=>mt.next(Ge)))}).pipe(SI(1)).subscribe(mt=>{var Ge;return(Ge=U==null?void 0:U.onCurrentPlaybackRateChanged)==null?void 0:Ge.call(U,mt)})),this.subscription.add(this.store.state.volume$.subscribe(mt=>{var Ge;return(Ge=U==null?void 0:U.onVolumeChange)==null?void 0:Ge.call(U,mt)})),this.subscription.add(this.store.state.muted$.subscribe(mt=>{var Ge,fi,po,Go;if(mt)(Ge=U==null?void 0:U.onMute)==null||Ge.call(U);else{let Yo=(po=((fi=this.store)==null?void 0:fi.state.volume$)&&$e(this.store.state.volume$))!=null?po:0;(Go=U==null?void 0:U.onUnmute)==null||Go.call(U,Yo)}})),this.subscription.add(this.store.state.videoBitrate$.subscribe(mt=>{var Ge;return(Ge=U==null?void 0:U.onVideoBitrateChanged)==null?void 0:Ge.call(U,mt)})),this.subscription.add(this.store.state.isInteractiveTime$.subscribe(mt=>{var Ge;let fi=(Ge=this.store)==null?void 0:Ge.ui.controls.disabledControls$;fi&&(mt&&!fi.includes(Td)&&fi.add(Td),mt||fi.remove(Td))})),this.subscription.add(this.store.ui.isFullscreen.subscribe(async mt=>{var Ge;if(!Ub.browser.isSamsungBrowser||!mt||!this.interactiveController)return;document.fullscreenElement===this.shadowRootContainer&&await this.replayInteractiveChapter((Ge=this.videoConfig)==null?void 0:Ge.callbacks.onExternalFullscreenExit)})),this.statistics&&this.statistics.oneStat&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(mt=>{var Ge;return(Ge=U==null?void 0:U.onVSIDChanged)==null?void 0:Ge.call(U,mt)})),this.initMediaSession(),R(Xn,{interactiveController:this.interactiveController,interactiveContainer:this.interactiveContainer,sources:Ee,store:this.store,microStoresRoot:this.microStoresRoot,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:Te,thumbUrl:He,subtitles:It,subtitlesForcedLanguage:Dt,live:Ut,preload:I,autoplay:T,muted:A,volume:N,fromTime:E,canRewindLive:P,supportLink:Q,showAds:F,adsSlotId:z,adsParams:Pe,adsAutoplayParam:se,duration:At,logoClickable:J,logoHidden:Ce,isMobile:ee!=null?ee:me,failoverHosts:pe,fullScreenTarget:ge,saveRate:re,shadowRootContainer:this.shadowRootContainer,showMiniTimer:qe,outerContainerRef:this.rootContainer,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:le.nextVideoTitle,endScreenVideoThumb:le.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist(),playPrevChapter:()=>this.playPrevChapter(),seekToInteractive:()=>this.seekToInteractive(),volumeMultiplier:ce,showEndScreen:Re,showAutoplayNext:Ve,adsExternalApi:Y,getVideoDeeplink:this.videoConfig.getVideoDeeplink},!0);let ei={target:this.playerContainer,props:n(Xn)};this.svelteRootComponent=Zr(Ev,ei),this.addPlayerInfoSubscriptions(),this.isInited||(this.isInited=!0,(ut=(hi=(pi=this.videoConfig)==null?void 0:pi.callbacks)==null?void 0:hi.onInited)==null||ut.call(hi)),(Gt=this.internalsExposure)==null||Gt.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig,logger:this.logger,log:this.log}),this.uiConfig.devNullLog&&((bi=(Ri=this.videoConfig)==null?void 0:Ri.callbacks)!=null&&bi.onDevNullLog)?Ec.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):Ec.destroy("ui")};this.coreConfig.asyncResolveClientChecker?Ub.isInited$.subscribe(pi=>{pi&&(console.log("UI SDK async start"),Lt())}):Lt()}addPlayerInfoSubscriptions(){var e,i;let o=this.store,r=(e=this.microStoresRoot)==null?void 0:e.stores;if(!o||!r)return;let a=(i=this.videoConfig)==null?void 0:i.callbacks;a&&this.subscription.add(o.playerPhase.subscribe(d=>{var s;return(s=a.onPlayerPhaseChanged)==null?void 0:s.call(a,d)})).add(o.state.playbackState$.subscribe(d=>{var s;return d&&((s=a.onPlaybackStateChanged)==null?void 0:s.call(a,d))})).add(o.state.playbackStateRealistic$.subscribe(d=>{d?this.stateContainer.setAttribute("data-playback-state",d):this.stateContainer.removeAttribute("data-playback-state")})).add(o.state.isLive$.subscribe(d=>{var s;return(s=a.onIsLiveChanged)==null?void 0:s.call(a,d)})).add(o.state.isActiveLive$.subscribe(d=>{var s;return(s=a.onIsActiveLiveChanged)==null?void 0:s.call(a,d)})).add(o.state.isAudioAvailable$.subscribe(d=>{var s;return(s=a.onIsAudioAvailableChanged)==null?void 0:s.call(a,d)})).add(o.state.currentQuality$.subscribe(d=>{var s;return(s=a.onCurrentQualityChanged)==null?void 0:s.call(a,d)})).add(o.state.availableQualities$.subscribe(d=>{var s;return(s=a.onAvailableQualitiesChanged)==null?void 0:s.call(a,d.map(({value:u})=>u).filter(u=>u!=="auto"))})).add(o.state.availableAudioStreams$.subscribe(d=>{d.length>1&&a.onAudioLanguagesAvailable&&a.onAudioLanguagesAvailable()})).add(r.pictureInPicture$.isActive$.subscribe(d=>{var s,u;return d?(s=a.onPiPEnter)==null?void 0:s.call(a):(u=a.onPiPExit)==null?void 0:u.call(a)}));let l=a==null?void 0:a.uiInfo;l&&this.subscription.add(o.ui.controlsVisible.subscribe(d=>{var s;return(s=l.onControlsVisibleChanged)==null?void 0:s.call(l,d)})).add(o.ui.isMobile.subscribe(d=>{var s;return(s=l.onIsMobileChanged)==null?void 0:s.call(l,d)})).add(o.ui.playerSize.subscribe(d=>{var s;return(s=l.onPlayerSizeChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.prevButton.subscribe(d=>{var s;return(s=l.onPrevButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.playButton.subscribe(d=>{var s;return(s=l.onPlayButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.replayButton.subscribe(d=>{var s;return(s=l.onReplayButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.nextButton.subscribe(d=>{var s;return(s=l.onNextButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.playPrevChapterButton.subscribe(d=>{var s;return(s=l.onPlayPrevChapterChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.seekToInteractiveButton.subscribe(d=>{var s;return(s=l.onSeekToInteractiveButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.interactiveGraphButton.subscribe(d=>{var s;return(s=l.onGraphButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.liveButton.subscribe(d=>{var s;return(s=l.onLiveButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.time.subscribe(d=>{var s;return(s=l.onTimeUpdateChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.episodes.subscribe(d=>{var s;return(s=l.onEpisodesChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.subtitles.subscribe(d=>{var s;return(s=l.onSubtitlesChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.topLeft.subscribe(d=>{var s;return(s=l.onTopLeftControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.topRight.subscribe(d=>{var s;return(s=l.onTopRightControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.bottomLeft.subscribe(d=>{var s;return(s=l.onBottomLeftControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.bottomRight.subscribe(d=>{var s;return(s=l.onBottomRightControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.middle.subscribe(d=>{var s;return(s=l.onMiddleControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.bottom.subscribe(d=>{var s;return(s=l.onBottomControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.videoTitleInfo.subscribe(d=>{var s;return(s=l.onTitleChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.settings.subscribe(d=>{var s;return(s=l.onSettingsChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.fullscreen.subscribe(d=>{var s;return(s=l.onFullscreenChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.chromecast.subscribe(d=>{var s;return(s=l.onChromecastChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.pip.subscribe(d=>{var s;return(s=l.onPipChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.vkLogo.subscribe(d=>{var s;return(s=l.onVkLogoChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.interactiveTimeIndicator.subscribe(d=>{var s;return(s=l.onInteractiveTimeIndicatorChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.timeline.subscribe(d=>{var s;return(s=l.onTimelineChanged)==null?void 0:s.call(l,d)}))}playNextVideo(){this.videoConfig&&(this.currentPlayingVideoIndex++,this.currentPlayingVideoIndex>=this.videoConfig.videos.length&&(this.currentPlayingVideoIndex=0),this.log({message:`play next video, index: ${this.currentPlayingVideoIndex}`}),this.createPlayerWithCurrentVideo())}playPrevVideo(){this.videoConfig&&(this.currentPlayingVideoIndex--,this.currentPlayingVideoIndex<0&&(this.currentPlayingVideoIndex=this.videoConfig.videos.length-1),this.log({message:`play prev video, index: ${this.currentPlayingVideoIndex}`}),this.createPlayerWithCurrentVideo())}createPlayerWithCurrentVideo(e,i=!0){var o;if(!this.videoConfig)return;let r=this.videoConfig.videos[this.currentPlayingVideoIndex];if(!r){this.log({message:"no next video"});return}this.isInited&&Ov(r.unitedVideoId)&&((o=this.store)==null||o.actions.internal.nextMovie(r.unitedVideoId)),this.unmountComponent(this.svelteRootComponent),this.createPlayer(r,{autoplay:i,fromTime:0},e)}playPrevChapter(){var e;(e=this.interactiveController)==null||e.playPrevChapter()}seekToInteractive(){var e;let i=(e=this.interactiveController)==null?void 0:e.getNextInteractiveStartTime();typeof i=="number"&&this.seekTime(i/1e3)}async initInteractives(){var e,i,o,r,a,l;if((e=this.videoConfig)!=null&&e.interactiveData)try{let{Interactives:d}=await import("@vkontakte/videoplayer-interactive/es2018");this.interactiveContainer=document.createElement("div"),this.interactiveContainer.classList.add("interactive-root");let s=(i=this.store)==null?void 0:i.interfaceLanguage$,u=s?$e(s):this.videoConfig.interfaceLanguage,{projectInfo:m,initChapterId:p,historyApi:v,videoLoader:_}=this.videoConfig.interactiveData;this.interactiveController=new d({parentElement:this.interactiveContainer,fullscreenTargetElement:this.playerContainer,lang:u,graph:this.uiConfig.features.interactiveGraph,projectInfo:m,initChapterId:p,historyApi:v,vkVideoLoader:_,lastFrame:this.uiConfig.features.interactiveLastFrame,permanentTextControls:this.uiConfig.features.interactiveTextPermanent,interactiveTimeOpenUri:this.uiConfig.features.interactiveTimeOpenUri,initSeamless:!0,config:this.uiConfig.interactive,coreConfig:this.coreConfig,createOneStat:this.createOneStat,isTouch:this.videoConfig.isTouch,animationsFeatureToggles:{areaControlShadow:this.uiConfig.features.interactiveAreaControlShadow,controlsExpectTimeBlinkAnimation:this.uiConfig.features.interactiveControlsExpectTimeBlinkAnimation,controlsTapPlace:this.uiConfig.features.interactiveControlsTapPlace,controlsFillAnimation:this.uiConfig.features.interactiveControlsFillAnimation,controlsHideAnimation:this.uiConfig.features.interactiveControlsHideAnimation},endChapterHistoryFix:this.uiConfig.features.interactiveHistoryEndChapterFix});let{isInteractiveExpectation$:y,isSeekable$:b}=this.interactiveController.state;this.uiConfig.features.seekToInteractive&&this.subscription.add(b.subscribe(I=>{if(!this.isInited)return;let T=this.store;I?T.ui.controls.disabledControls$.remove("SEEK_TO_INTERACTIVE_BUTTON"):T.ui.controls.disabledControls$.add("SEEK_TO_INTERACTIVE_BUTTON")})),this.subscription.add(y.subscribe(I=>{this.store&&this.store.state.isInteractiveExpectation$.set(I)}));let w=!0;if(this.subscription.add(this.interactiveController.events.playerChanged$.subscribe(I=>{if(!this.videoConfig)return;this.videoConfig.videos[this.currentPlayingVideoIndex]={...I.config,title:(m==null?void 0:m.title)||I.config.title};let T=w?this.videoConfig.autoplay:!0;this.createPlayerWithCurrentVideo(I.player,T),w&&(w=!1)})),this.interactiveSubscription.add(this.interactiveController.events.interactiveActionChoice$.subscribe(({type:I,actionType:T})=>{var N,A,E,P,Q,F;if(!this.store||!this.microStoresRoot)return;let z=y.getValue();if(I==="action-choice"&&T==="setRandomBranch"&&(this.microStoresRoot.stores.graphIsOpened$.set(!1),this.store.ui.controls.disabledControls$.remove(Id)),I==="action-choice-canceled"){let X=$e(this.store.state.isPlaying$)||z;if(((E=(N=this.videoConfig)==null?void 0:N.isTouch)!=null?E:(A=this.videoConfig)!=null&&A.isMobile)&&X){this.store.ui.interactiveHideMobileControls.set(!0);return}(F=(P=this.videoConfig)==null?void 0:(Q=P.callbacks).onDisabledInteractiveClick)==null||F.call(Q)}})),this.interactiveSubscription.add(this.interactiveController.events.interactiveContainerFakeRemoved$.subscribe(({type:I,removeAllOpenURI:T})=>{this.store&&I==="container-fake-removed"&&T&&this.store.ui.controls.disabledControls$.remove(Id)})),await this.interactiveController.setManifest(this.videoConfig.interactiveData.manifest),(r=(o=this.videoConfig)==null?void 0:o.callbacks)!=null&&r.onInteractiveHistoryChanged){let I=this.interactiveController.getHistoryState();this.subscription.add(I.history$.subscribe(T=>{var N,A,E;T.length&&((E=(A=(N=this.videoConfig)==null?void 0:N.callbacks)==null?void 0:A.onInteractiveHistoryChanged)==null||E.call(A,T))}))}(l=(a=this.videoConfig)==null?void 0:a.callbacks)!=null&&l.onInteractiveChapterChanged&&this.subscription.add(this.interactiveController.events.chapterChanged$.subscribe(I=>{var T,N,A;(A=(T=this.videoConfig)==null?void 0:(N=T.callbacks).onInteractiveChapterChanged)==null||A.call(N,I.chapter,I.manifestVideo)})),this.uiConfig.features.interactiveTimeIndicator&&this.subscription.add(this.interactiveController.events.noInteraction$.subscribe(()=>{var I,T,N,A;(I=this.microStoresRoot)==null||I.stores.showInteractiveTimeIndicatorTooltip$.set(!0,!0),(A=(T=this.videoConfig)==null?void 0:(N=T.callbacks).onInteractiveTimeIndicatorClick)==null||A.call(N)})),this.interactiveSubscription.add(this.interactiveController.events.error$.subscribe(I=>{this.log({message:I.toString()})}))}catch(d){this.log({message:d.message})}}initPlayer(e,i={}){var o,r,a,l,d,s,u,m,p,v,_,y,b,w,I,T,N,A,E,P,Q,F,z,X,se;if(!this.isConnected){this.postponedInitParams=[e,i];return}if(!Array.isArray(e.videos)||e.videos.length===0&&!e.interactiveData){let Z=new Error("empty videos");this.fatalError$.next(Z),(r=(o=e.callbacks)==null?void 0:o.onCrashed)==null||r.call(o,Z.message);return}else this.fatalError$.next(null);if(this.videoConfig=$c(kI,_I(e,Z=>Z instanceof Dv?Z:void 0)),this.playerId=CI(e.playerId),this.uiConfig=Ih((a=i.ui)!=null?a:{}),this.updatePersistentLayerProps(),this.coreConfig=(l=i.core)!=null?l:{},this.statisticsConfig=(d=i.statistics)!=null?d:{},this.metaConfig=i.meta,this.uiConfig.features.forcePlayerDisplayBlock&&(this.rootContainer&&(this.rootContainer.style.minHeight="unset"),this.style.display="block",this.style.width="100%",this.style.height="100%"),this.videoConfig.playerView==="preview"&&(this.playerContainer.style.contain="none"),this.sentry={config:(s=this.uiConfig.sentry)!=null?s:{}},this.uiConfig.features.exposeInternalsToGlobal&&((u=this.internalsExposure)!=null||(this.internalsExposure=new wI("ui",this.playerId))),Ec.push("ui",{key:"videoplayer_embed",strings:["new","player_init_player","ads.enable: "+this.uiConfig.ads.enable,"showAds: "+((m=this.videoConfig)==null?void 0:m.showAds)],numbers:[gI()]}),Ov(this.videoConfig.isMediaSessionEnabled)&&(this.uiConfig.features.mediaSession=(v=(p=this.uiConfig.features.mediaSession)!=null?p:this.videoConfig.isMediaSessionEnabled)!=null?v:!0),Ov(this.videoConfig.isPictureInPictureEnabled)&&(this.uiConfig.features.pip=(y=(_=this.uiConfig.features.pip)!=null?_:this.videoConfig.isPictureInPictureEnabled)!=null?y:!0,this.uiConfig.features.dpip=(w=(b=this.uiConfig.features.dpip)!=null?b:this.videoConfig.isPictureInPictureEnabled)!=null?w:!0),this.uiConfig.ads.paramsOverride={preview:(I=this.uiConfig.ads.preview)!=null?I:this.videoConfig.adsPreviewParam,...this.uiConfig.ads.paramsOverride},this.videoConfig.isTouch=(N=(T=this.uiConfig.isMobile)!=null?T:this.videoConfig.isTouch)!=null?N:this.videoConfig.isMobile,(A=this.videoConfig).autoplay&&(A.autoplay=this.uiConfig.features.autoplay),this.videoConfig.showAds=(E=this.uiConfig.ads.enable)!=null?E:this.videoConfig.showAds,this.videoConfig.adsSlotId=(P=this.uiConfig.ads.slot)!=null?P:this.videoConfig.adsSlotId,this.videoConfig.logoHidden=!((Q=this.uiConfig.showLogo)!=null?Q:!this.videoConfig.logoHidden),(F=this.videoConfig).canRewindLive&&(F.canRewindLive=this.uiConfig.features.liveRewind),this.videoConfig.supportLink=(z=this.videoConfig.supportLink)!=null?z:this.uiConfig.supportLink,this.videoConfig.showEndScreen=this.uiConfig.features.endScreen&&this.videoConfig.showEndScreen,this.videoConfig.showAutoplayNext=this.uiConfig.features.autoplayNext&&this.videoConfig.showAutoplayNext,this.videoConfig.showNextPrevButtons=this.uiConfig.features.nextPrevButtons&&this.videoConfig.showNextPrevButtons,this.currentPlayingVideoIndex=this.videoConfig.videoIndex&&((X=this.videoConfig.videos)!=null&&X[this.videoConfig.videoIndex])?this.videoConfig.videoIndex:0,this.needToRepeatPlaylist=this.videoConfig.repeat,this.uiConfig.features.pip){let Z={enabled:this.videoConfig.pipEnabled};this.uiConfig.features.dpip?this.pictureInPictureApi=dp.getLatestSupportedVersion(Z):this.pictureInPictureApi=new Ra(Z)}this.mediaSessionApi=this.uiConfig.features.mediaSession?new lp:void 0,this.slotsApi=this.uiConfig.features.slots?new np(this.uiConfig.disabledSlotIds):void 0,this.annotationsApi=this.uiConfig.features.annotations?new cp(this.uiConfig.features.annotationsInside):void 0,this.annotationsApi&&!this.uiConfig.features.annotationsInside&&this.annotationsApi.init(this.rootContainer),this.focusManager=this._shadowRoot?new mp(this._shadowRoot):void 0,this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteErrorComponent),this.isInited=!1,this.prevIsid=void 0,this.interactiveController&&(this.interactiveController.destroy(),this.interactiveController=void 0,this.interactiveSubscription.unsubscribe()),this.videoConfig.interactiveData?this.initInteractives():this.createPlayer(this.videoConfig.videos[this.currentPlayingVideoIndex]),Vb(this.pictureInPictureApi)&&this.pictureInPictureApi.setPlayerDomElement(this.playerContainer,this._shadowRoot),(se=this.slotsApi)==null||se.init(this.shadowRootContainer,this.store)}isOneVideoPlaylist(){return this.videoConfig?this.videoConfig.videos.length===1:!1}updateVideos(e,i){if(!this.videoConfig)return;this.log({message:`update ${i} videos, videos: ${JSON.stringify(e)}`}),i==="prev"?(this.videoConfig.videos.splice(0,this.currentPlayingVideoIndex),this.videoConfig.videos.unshift(...e),this.currentPlayingVideoIndex=e.length):i==="next"&&(this.videoConfig.videos.splice(this.currentPlayingVideoIndex+1),this.videoConfig.videos.push(...e));let o=this.getNextVideoInfo();n(Xn)&&(n(Xn).showNextPrevButtons=this.needToShowNextPrevButtons(),n(Xn).nextButtonActive=this.isNextButtonActive(),n(Xn).prevButtonActive=this.isPrevButtonActive(),n(Xn).endScreenVideoTitle=o.nextVideoTitle,n(Xn).endScreenVideoThumb=o.nextVideoThumb,n(Xn).isOneVideoPlaylist=this.isOneVideoPlaylist())}updatePrevVideos(e){this.updateVideos(e,"prev")}updateNextVideos(e){this.updateVideos(e,"next")}initMediaSession(){var e,i;this.mediaSessionApi&&((e=this.unsubscribePlayerPhaseSubscription)==null||e.call(this),this.mediaSessionApi.clearSubscriptions(),this.unsubscribePlayerPhaseSubscription=(i=this.store)==null?void 0:i.playerPhase.subscribe(o=>{o==="video"?this.setupMediaSessionForVideo():o==="ads"&&this.setupMediaSessionForAds()}))}setupMediaSessionForVideo(){if(!(!this.videoConfig||!this.mediaSessionApi))try{let{title:e,thumbUrl:i}={...this.videoConfig.videos[this.currentPlayingVideoIndex]},o=[["play",()=>this.play()],["pause",()=>this.pause()],["seekto",r=>this.seekTime(r.seekTime)]];this.videoConfig.videos.length>1&&(this.currentPlayingVideoIndex<this.videoConfig.videos.length-1&&o.push(["nexttrack",()=>{var r,a,l;if(this.uiConfig.features.useCallbackForMediaSessionNextPrevClick)try{(l=(a=(r=this.videoConfig)==null?void 0:r.callbacks)==null?void 0:a.onNextVideoClick)==null||l.call(a)}catch(d){this.log({message:"onNextVideoClick callback failed to execute"})}else this.playNextVideo()}]),this.currentPlayingVideoIndex>0&&o.push(["previoustrack",()=>{var r,a,l;if(this.uiConfig.features.useCallbackForMediaSessionNextPrevClick)try{(l=(a=(r=this.videoConfig)==null?void 0:r.callbacks)==null?void 0:a.onPrevVideoClick)==null||l.call(a)}catch(d){this.log({message:"onPrevVideoClick callback failed to execute"})}else this.playPrevVideo()}])),this.mediaSessionApi.setMetaData({title:e,thumbUrl:i}),this.mediaSessionApi.updateActionHandlers(o),this.mediaSessionApi.attachToStore(this.store)}catch(e){this.log({message:e.message})}}setupMediaSessionForAds(){if(!(!this.videoConfig||!this.mediaSessionApi))try{let e="Реклама",i=[["play",()=>this.play()],["pause",()=>this.pause()]];this.mediaSessionApi.setMetaData({title:e}),this.mediaSessionApi.updateActionHandlers(i),this.mediaSessionApi.attachToStore(this.store)}catch(e){this.log({message:e.message})}}moveTo(e){this.shadowDOMCallbacksDisabled=!0,e.append(this),this.shadowDOMCallbacksDisabled=!1}play(){var e,i,o,r;this.isControlDisabled("PLAY_BUTTON")||(e=this.store)!=null&&e.playerPhase.is("LiveWaitingStart")||(i=this.store)!=null&&i.playerPhase.is("LiveWaitingRecover")||(o=this.store)!=null&&o.playerPhase.is("LiveWaitingRecord")||(this.log({message:"play"}),(r=this.svelteRootComponent)==null||r.play())}pause(){var e;this.log({message:"pause"}),(e=this.svelteRootComponent)==null||e.pause()}stop(){var e;if(!this.videoConfig)return;this.log({message:"stop"});let i=!!this.interactiveController;i&&(this.interactiveController.destroy(),this.interactiveController=void 0,this.interactiveContainer=void 0,this.interactiveSubscription.unsubscribe()),this.unmountComponent(this.svelteStubComponent),(e=this.mediaSessionApi)==null||e.destroy();let o=this.videoConfig.videos[0];o&&(this.unmountComponent(this.svelteRootComponent),i?(this.videoConfig.autoplay=!1,this.initInteractives()):this.createPlayer(o))}setMuted(e){var i;this.log({message:`set muted, muted: ${e}`}),(i=this.svelteRootComponent)==null||i.setMuted(e)}toggleSubtitle(){var e;this.log({message:"toggle subtitle"}),(e=this.svelteRootComponent)==null||e.toggleSubtitle()}changeSubtitle(e,i){var o;this.log({message:"change subtitle"}),(o=this.svelteRootComponent)==null||o.changeSubtitle(e,i)}hideControls(){var e;this.log({message:"hide controls"}),(e=this.svelteRootComponent)==null||e.hideControls()}showControls(){var e;this.log({message:"show controls"}),(e=this.svelteRootComponent)==null||e.showControls()}setPiPEnabled(e){var i,o;(o=(i=this.store)==null?void 0:i.webApi.pictureInPictureApi)==null||o.setEnabled(e)}setVolume(e){var i;this.log({message:`set volume, volume: ${e}`}),(i=this.svelteRootComponent)==null||i.setVolume(e)}setRepeat(e){this.log({message:`set repeat, repeat: ${e}`}),this.needToRepeatPlaylist=e,n(Xn)&&(n(Xn).needToRepeatPlaylist=this.needToRepeatPlaylist,n(Xn).showNextPrevButtons=this.needToShowNextPrevButtons(),n(Xn).nextButtonActive=this.isNextButtonActive(),n(Xn).prevButtonActive=this.isPrevButtonActive())}seekTime(e){var i;this.isControlDisabled("TIMELINE")||(this.log({message:`seek time, time: ${e}`}),(i=this.svelteRootComponent)==null||i.seekTime(e))}seekEpisodeStartTime(e){var i;this.log({message:`seek episode start time, time: ${e}`}),(i=this.svelteRootComponent)==null||i.seekEpisodeStartTime(e)}returnFocusToEpisodes(){var e;this.log({message:"return focus to episodes button"}),(e=this.svelteRootComponent)==null||e.returnFocusToEpisodes()}setPlaybackRate(e){var i;this.log({message:`set playback rate to: ${e}`}),(i=this.svelteRootComponent)==null||i.setPlaybackRate(e)}setAutoQualityLimits(e){var i,o,r;this.log({message:`set auto quality limitation. Max: ${(i=e.max)!=null?i:"none"}. Min: ${(o=e.min)!=null?o:"none"}`}),(r=this.svelteRootComponent)==null||r.setAutoQualityLimits(e)}setAutoQuality(){var e;(e=this.svelteRootComponent)==null||e.setAutoQuality()}toggleTrafficSaving(e){var i;(i=this.svelteRootComponent)==null||i.toggleTrafficSaving(e)}toggleHighQuality(e){var i;(i=this.svelteRootComponent)==null||i.toggleHighQuality(e)}changeAudioStream(e){var i;(i=this.svelteRootComponent)==null||i.changeAudioStream(e)}addLanguage(e){var i;(i=this.store)==null||i.actions.internal.addLanguage(e)}async setLanguage(e){var i;await((i=this.store)==null?void 0:i.actions.internal.setLanguage(e))}setLiveStart(e){var i,o;let r=this.isLiveTailPlaying();this.log({message:`live started: liveTailPlaying = ${r}`}),r||((i=this.store)==null||i.actions.internal.setLiveWaitingRecover(!1),(o=this.store)==null||o.actions.internal.setLiveWaitingStart(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!0}))}setLiveWaitingStart(){var e;this.log({message:"live waiting"}),(e=this.store)==null||e.actions.internal.setLiveWaitingStart(!0)}isLiveTailPlaying(){var e;let i=(e=this.store)==null?void 0:e.getPlayer();if(!i)return!1;let{info:o}=i;return o.canPlayLiveTailBuffer$.getValue()&&!o.isStalled$.getValue()&&!o.atLiveEdge$.getValue()}setLiveWaitingRecover(e=!1){var i;let o=this.isLiveTailPlaying(),r=e||!o;this.log({message:`live waiting recover: forceImmediate = ${e}, liveTailPlaying = ${o}`});let a=()=>{var l;(l=this.store)==null||l.actions.internal.setLiveWaitingRecover(!0)};r&&a(),(i=this.store)!=null&&i.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var l;r||a(),(l=this.store)==null||l.destroy()})}setLiveWaitingRecord(){var e;let i=this.isLiveTailPlaying(),o=!i;this.log({message:`live waiting record: liveTailPlaying = ${i}`});let r=()=>{var a;(a=this.store)==null||a.actions.internal.setLiveWaitingRecord(!0)};o&&r(),(e=this.store)!=null&&e.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var a;o||r(),(a=this.store)==null||a.destroy()})}setLiveEnd(e){var i;let o=this.isLiveTailPlaying(),r=!o;this.log({message:`live ended: liveTailPlaying = ${o}`});let a=()=>{var l,d;(l=this.store)==null||l.actions.internal.setLiveWaitingRecover(!1),(d=this.store)==null||d.actions.internal.setLiveWaitingRecord(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!1})};if(r){a();return}(i=this.store)!=null&&i.callbacks&&(this.store.callbacks.onLiveEnded=a)}setLiveLowLatency(e){var i;this.log({message:"live switch to low latency "+e}),(i=this.store)==null||i.actions.external.setLiveLowLatency(e)}setLooped(e){var i;(i=this.store)==null||i.actions.internal.setLooped(e)}getDebugData(){var e,i;return(i=(e=this.store)==null?void 0:e.actions.internal.getDebugTextData())!=null?i:""}getDeviceId(){var e,i,o;return(o=(i=(e=this.statistics)==null?void 0:e.oneStat)==null?void 0:i.getDeviceId())!=null?o:void 0}replayInteractiveVideo(){this.interactiveController&&this.interactiveController.setChapter()}async replayInteractiveChapter(e){var i,o;if(this.interactiveController&&((i=this.store)!=null&&i.state.positionExact$)){let r=$e(this.store.state.positionExact$),l=$e(this.store.state.interactiveEpisodes$).find(s=>!s.completed);this.interactiveController.events.playerChanged$.pipe(xI()).subscribe(()=>{l&&r>=l.time?this.seekTime(l.time):this.seekTime(r),e==null||e()});let d=this.interactiveController.getCurrentChapter();await this.interactiveController.setChapter({chapterId:(o=d==null?void 0:d.chapter)==null?void 0:o.id,pushToHistory:!1})}}showInteractiveIndicatorTooltip(e,i=!1){var o;(o=this.microStoresRoot)==null||o.stores.showInteractiveTimeIndicatorTooltip$.set(e,i)}switchToActiveLive(){var e;(e=this.store)==null||e.actions.internal.switchToActiveLive()}updateAdditionalSettingsItem(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalSettingsItem(e,i)}addAdditionalSettingsItem(e){var i;(i=this.store)==null||i.actions.external.addAdditionalSettingsItem(e)}removeAdditionalSettingsItem(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalSettingsItem(e)}updateAdditionalContextItem(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalContextItem(e,i)}addAdditionalContextItem(e){var i;(i=this.store)==null||i.actions.external.addAdditionalContextItem(e)}removeAdditionalContextItem(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalContextItem(e)}updateAdditionalButton(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalButton(e,i)}addAdditionalButton(e){var i;(i=this.store)==null||i.actions.external.addAdditionalButton(e)}removeAdditionalButton(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalButton(e)}updateStatContext(e){this.statistics&&(this.statistics.oneStat&&this.statistics.oneStat.updateContext(e),this.statistics.thinOneStat&&this.statistics.thinOneStat.updateContext(e))}handleTimerNextVideo(e){var i;(i=this.store)==null||i.actions.internal.setTimerNextVideoRunning(e)}togglePictureInPicture(){var e;(e=this.store)==null||e.actions.internal.togglePictureInPicture()}focus(){var e,i,o;(o=(i=(e=this.svelteRootComponent)==null?void 0:e.keyboardControls)==null?void 0:i.focus)==null||o.call(i)}restoreFocus(){var e;(e=this.focusManager)==null||e.restoreFocus()}handleExternalKeyboardEvent(e){var i,o;return!!((o=(i=this.svelteRootComponent)==null?void 0:i.keyboardControls)!=null&&o.handleExternalKeyboardEvent(e))}setAutoplayNext(e){var i;(i=this.store)==null||i.actions.internal.setAutoplayNextEnabled(e)}getTotalViewTime(){var e,i;return(i=(e=this.statistics)==null?void 0:e.thinOneStat)==null?void 0:i.getTotalViewTime()}unmountComponent(e){e&&ka(e)}};import{InterfaceLanguage as Aoe,VKNumericLanguage as Loe,loadVKLangPack as Moe}from"@vkontakte/videoplayer-shared/es2018";import{VideoQuality as Roe,VideoFormat as Noe}from"@vkontakte/videoplayer-core/es2018";var woe=()=>{window.customElements.define("vk-video-player",vp)};export{Gu as ControlButtonType,ms as GridTypes,Aoe as InterfaceLanguage,Bd as MenuItemType,vs as PlayerPhase,kl as VERSION,Loe as VKNumericLanguage,Noe as VideoFormat,Roe as VideoQuality,Moe as loadVKLangPack,woe as registerPlayerWebComponent};
|