@vkontakte/videoplayer 1.1.77 → 1.1.78-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es2015.esm.js CHANGED
@@ -1,63 +1,63 @@
1
1
  /**
2
- * @vkontakte/videoplayer v1.1.77
3
- * Fri, 14 Nov 2025 11:47:34 GMT
4
- * https://st.mycdn.me/static/vkontakte-videoplayer/1-1-77/doc/
2
+ * @vkontakte/videoplayer v1.1.78-beta.0
3
+ * Thu, 20 Nov 2025 08:16:43 GMT
4
+ * https://st.mycdn.me/static/vkontakte-videoplayer/1-1-78/doc/
5
5
  */
6
- var o$=Object.defineProperty,n$=Object.defineProperties;var r$=Object.getOwnPropertyDescriptors;var Kv=Object.getOwnPropertySymbols;var s$=Object.prototype.hasOwnProperty,a$=Object.prototype.propertyIsEnumerable;var qv=t=>{throw TypeError(t)};var wp=(t,e,i)=>e in t?o$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Ae=(t,e)=>{for(var i in e||(e={}))s$.call(e,i)&&wp(t,i,e[i]);if(Kv)for(var i of Kv(e))a$.call(e,i)&&wp(t,i,e[i]);return t},Kt=(t,e)=>n$(t,r$(e));var sr=(t,e,i)=>wp(t,typeof e!="symbol"?e+"":e,i),Sp=(t,e,i)=>e.has(t)||qv("Cannot "+i);var Ni=(t,e,i)=>(Sp(t,e,"read from private field"),i?i.call(t):e.get(t)),qs=(t,e,i)=>e.has(t)?qv("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),pl=(t,e,i,o)=>(Sp(t,e,"write to private field"),o?o.call(t,i):e.set(t,i),i),Qv=(t,e,i)=>(Sp(t,e,"access private method"),i);var gt=(t,e,i)=>new Promise((o,r)=>{var a=s=>{try{d(i.next(s))}catch(u){r(u)}},l=s=>{try{d(i.throw(s))}catch(u){r(u)}},d=s=>s.done?o(s.value):Promise.resolve(s.value).then(a,l);d((i=i.apply(t,e)).next())});var Qs="[",Gs="[!",_a="]",ds={};var Zi=Symbol(),Hn=Symbol("filename"),Gv=Symbol("hmr"),Yv="http://www.w3.org/1999/xhtml",Uc="http://www.w3.org/2000/svg";var Tp="@attach";var zc=!0;var Xv,Zv,jv=(Zv=(Xv=globalThis.process)==null?void 0:Xv.env)==null?void 0:Zv.NODE_ENV,ke=jv&&!jv.toLowerCase().startsWith("prod");var ar=Array.isArray,Jv=Array.prototype.indexOf,od=Array.from,Cp=Object.keys,fo=Object.defineProperty,qo=Object.getOwnPropertyDescriptor,Wc=Object.getOwnPropertyDescriptors,Ip=Object.prototype,eg=Array.prototype,ba=Object.getPrototypeOf,Ep=Object.isExtensible;function Ys(t){return typeof t=="function"}var ht=()=>{};function tg(t){return t()}function js(t){for(var e=0;e<t.length;e++)t[e]()}var Qo=Symbol("$state"),fl=Symbol("legacy props"),ig=Symbol(""),Kc=Symbol("proxy path"),qc=1,ml=3,lr=8;function Qc(t){return t===this.v}function vl(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function og(t,e){return t!==e}function gl(t){return!vl(t,this.v)}function ng(){if(ke){let t=new Error(`derived_references_self
6
+ var s$=Object.defineProperty,a$=Object.defineProperties;var l$=Object.getOwnPropertyDescriptors;var Qv=Object.getOwnPropertySymbols;var d$=Object.prototype.hasOwnProperty,c$=Object.prototype.propertyIsEnumerable;var Gv=t=>{throw TypeError(t)};var wp=(t,e,i)=>e in t?s$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Ie=(t,e)=>{for(var i in e||(e={}))d$.call(e,i)&&wp(t,i,e[i]);if(Qv)for(var i of Qv(e))c$.call(e,i)&&wp(t,i,e[i]);return t},Gt=(t,e)=>a$(t,l$(e));var pr=(t,e,i)=>wp(t,typeof e!="symbol"?e+"":e,i),Sp=(t,e,i)=>e.has(t)||Gv("Cannot "+i);var Ni=(t,e,i)=>(Sp(t,e,"read from private field"),i?i.call(t):e.get(t)),Ks=(t,e,i)=>e.has(t)?Gv("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),cl=(t,e,i,o)=>(Sp(t,e,"write to private field"),o?o.call(t,i):e.set(t,i),i),Yv=(t,e,i)=>(Sp(t,e,"access private method"),i);var mt=(t,e,i)=>new Promise((o,r)=>{var a=s=>{try{d(i.next(s))}catch(u){r(u)}},l=s=>{try{d(i.throw(s))}catch(u){r(u)}},d=s=>s.done?o(s.value):Promise.resolve(s.value).then(a,l);d((i=i.apply(t,e)).next())});var qs="[",Qs="[!",ha="]",as={};var to=Symbol(),Kn=Symbol("filename"),jv=Symbol("hmr"),Xv="http://www.w3.org/1999/xhtml",Hc="http://www.w3.org/2000/svg";var Tp="@attach";var Uc=!0;var Jv,eg,Zv=(eg=(Jv=globalThis.process)==null?void 0:Jv.env)==null?void 0:eg.NODE_ENV,Ee=Zv&&!Zv.toLowerCase().startsWith("prod");var fr=Array.isArray,tg=Array.prototype.indexOf,id=Array.from,Cp=Object.keys,vo=Object.defineProperty,Ko=Object.getOwnPropertyDescriptor,zc=Object.getOwnPropertyDescriptors,Ip=Object.prototype,ig=Array.prototype,_a=Object.getPrototypeOf,Ep=Object.isExtensible;function Gs(t){return typeof t=="function"}var vt=()=>{};function og(t){return t()}function Ys(t){for(var e=0;e<t.length;e++)t[e]()}var qo=Symbol("$state"),ul=Symbol("legacy props"),ng=Symbol(""),Wc=Symbol("proxy path"),Kc=1,pl=3,mr=8;function qc(t){return t===this.v}function fl(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function rg(t,e){return t!==e}function ml(t){return!fl(t,this.v)}function sg(){if(Ee){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 rg(t){if(ke){let e=new Error(`effect_in_teardown
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 ag(t){if(Ee){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 sg(){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 ag(t){if(ke){let e=new Error(`effect_orphan
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 lg(){if(Ee){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 dg(t){if(Ee){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 lg(){if(ke){let t=new Error(`effect_update_depth_exceeded
12
+ https://svelte.dev/e/effect_orphan`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_orphan")}function cg(){if(Ee){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 dg(){if(ke){let t=new Error(`hydration_failed
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 ug(){if(Ee){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 cg(){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 ug(t){if(ke){let e=new Error(`props_invalid_value
16
+ https://svelte.dev/e/hydration_failed`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/hydration_failed")}function pg(){if(Ee){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 fg(t){if(Ee){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 pg(t){if(ke){let e=new Error(`props_rest_readonly
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 mg(t){if(Ee){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 fg(t){if(ke){let e=new Error(`rune_outside_svelte
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 vg(t){if(Ee){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 mg(){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 vg(){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 gg(){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 cs=!1,us=!1;function hg(){cs=!0}var nd=null;function xs(t){let e=Error(),i=e.stack;if(i){let o=i.split(`
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 gg(){if(Ee){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 hg(){if(Ee){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 _g(){if(Ee){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 bg(){ls=!0}var od=null;function ys(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;fo(e,"stack",{value:r.join(`
25
- `)}),fo(e,"name",{value:`${t}Error`})}return e}function qr(t,e){return t.label=e,Gc(t.v,e),t}function Gc(t,e){var i;return(i=t==null?void 0:t[Kc])==null||i.call(t,e),t}function hl(t){if(ke){let e=new Error(`lifecycle_outside_component
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;vo(e,"stack",{value:r.join(`
25
+ `)}),vo(e,"name",{value:`${t}Error`})}return e}function Kr(t,e){return t.label=e,Qc(t.v,e),t}function Qc(t,e){var i;return(i=t==null?void 0:t[Wc])==null||i.call(t,e),t}function vl(t){if(Ee){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 Ht=null;function rd(t){Ht=t}var dr=null;function sd(t){dr=t}function _l(t){return kp("getContext").get(t)}function bl(t,e){return kp("setContext").set(t,e),e}function ad(){return kp("getAllContexts")}function F(t,e=!1,i){var o=Ht={p:Ht,c:null,d:!1,e:null,m:!1,s:t,x:null,l:null};cs&&!e&&(Ht.l={s:null,u:null,r1:[],r2:Ar(!1)}),Io(()=>{o.d=!0}),ke&&(Ht.function=i,dr=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=$t,o=Rt;e.e=null;try{for(var r=0;r<s.length;r++){var a=s[r];mo(a.effect),Qi(a.reaction),Eo(a.fn)}}finally{mo(i),Qi(o)}}Ht=e.p,ke&&(dr=(d=(l=e.p)==null?void 0:l.function)!=null?d:null),e.m=!0}return t||{}}function ps(){return!cs||Ht!==null&&Ht.l===null}function kp(t){var e;return Ht===null&&hl(t),(e=Ht.c)!=null?e:Ht.c=new Map(d$(Ht)||void 0)}function d$(t){let e=t.p;for(;e!==null;){let i=e.c;if(i!==null)return i;e=e.p}return null}var c$=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function ci(t){if(typeof t!="object"||t===null||Qo in t)return t;let e=ba(t);if(e!==Ip&&e!==eg)return t;var i=new Map,o=ar(t),r=K(0),a=ke&&us?xs("CreatedAt"):null,l=Rt,d=p=>{var m=Rt;Qi(l);var f=p();return Qi(m),f};o&&i.set("length",K(t.length,a));var s="";function u(p){s=p,qr(r,`${s} version`);for(let[m,f]of i)qr(f,$a(s,m))}return new Proxy(t,{defineProperty(p,m,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&mg();var b=i.get(m);return b===void 0?b=d(()=>{var y=K(f.value,a);return i.set(m,y),ke&&typeof m=="string"&&qr(y,$a(s,m)),y}):N(b,f.value,!0),!0},deleteProperty(p,m){var f=i.get(m);if(f===void 0){if(m in p){let $=d(()=>K(Zi,a));i.set(m,$),Lp(r),ke&&qr($,$a(s,m))}}else{if(o&&typeof m=="string"){var b=i.get("length"),y=Number(m);Number.isInteger(y)&&y<b.v&&N(b,y)}N(f,Zi),Lp(r)}return!0},get(p,m,f){var S;if(m===Qo)return t;if(ke&&m===Kc)return u;var b=i.get(m),y=m in p;if(b===void 0&&(!y||(S=qo(p,m))!=null&&S.writable)&&(b=d(()=>{var C=ci(y?p[m]:Zi),I=K(C,a);return ke&&qr(I,$a(s,m)),I}),i.set(m,b)),b!==void 0){var $=n(b);return $===Zi?void 0:$}return Reflect.get(p,m,f)},getOwnPropertyDescriptor(p,m){var f=Reflect.getOwnPropertyDescriptor(p,m);if(f&&"value"in f){var b=i.get(m);b&&(f.value=n(b))}else if(f===void 0){var y=i.get(m),$=y==null?void 0:y.v;if(y!==void 0&&$!==Zi)return{enumerable:!0,configurable:!0,value:$,writable:!0}}return f},has(p,m){var $;if(m===Qo)return!0;var f=i.get(m),b=f!==void 0&&f.v!==Zi||Reflect.has(p,m);if(f!==void 0||$t!==null&&(!b||($=qo(p,m))!=null&&$.writable)){f===void 0&&(f=d(()=>{var S=b?ci(p[m]):Zi,C=K(S,a);return ke&&qr(C,$a(s,m)),C}),i.set(m,f));var y=n(f);if(y===Zi)return!1}return b},set(p,m,f,b){var O;var y=i.get(m),$=m in p;if(o&&m==="length")for(var S=f;S<y.v;S+=1){var C=i.get(S+"");C!==void 0?N(C,Zi):S in p&&(C=d(()=>K(Zi,a)),i.set(S+"",C),ke&&qr(C,$a(s,S)))}if(y===void 0)(!$||(O=qo(p,m))!=null&&O.writable)&&(y=d(()=>K(void 0,a)),N(y,ci(f)),i.set(m,y),ke&&qr(y,$a(s,m)));else{$=y.v!==Zi;var I=d(()=>ci(f));N(y,I)}var R=Reflect.getOwnPropertyDescriptor(p,m);if(R!=null&&R.set&&R.set.call(b,f),!$){if(o&&typeof m=="string"){var E=i.get("length"),P=Number(m);Number.isInteger(P)&&P>=E.v&&N(E,P+1)}Lp(r)}return!0},ownKeys(p){n(r);var m=Reflect.ownKeys(p).filter(y=>{var $=i.get(y);return $===void 0||$.v!==Zi});for(var[f,b]of i)b.v!==Zi&&!(f in p)&&m.push(f);return m},setPrototypeOf(){vg()}})}function $a(t,e){var i;return typeof e=="symbol"?`${t}[Symbol(${(i=e.description)!=null?i:""})]`:c$.test(e)?`${t}.${e}`:/^\d+$/.test(e)?`${t}[${e}]`:`${t}['${e}']`}function Lp(t,e=1){N(t,t.v+e)}function $l(t){try{if(t!==null&&typeof t=="object"&&Qo in t)return t[Qo]}catch(e){}return t}function Mp(t,e){return Object.is($l(t),$l(e))}function Qr(t){var e=2050,i=Rt!==null&&(Rt.f&2)!==0?Rt:null;$t===null||i!==null&&(i.f&256)!==0?e|=256:$t.f|=1048576;let o={ctx:Ht,deps:null,effects:null,equals:Qc,f:e,fn:t,reactions:null,rv:0,v:null,wv:0,parent:i!=null?i:$t};return ke&&us&&(o.created=xs("CreatedAt")),o}function v(t){let e=Qr(t);return Xc(e),e}function Tn(t){let e=Qr(t);return e.equals=gl,e}function Yc(t){var e=t.effects;if(e!==null){t.effects=null;for(var i=0;i<e.length;i+=1)Gi(e[i])}}var Vp=[];function u$(t){for(var e=t.parent;e!==null;){if((e.f&2)===0)return e;e=e.parent}return null}function Op(t){var e,i=$t;if(mo(u$(t)),ke){let o=ya;Rp(new Set);try{Vp.includes(t)&&ng(),Vp.push(t),Yc(t),e=jc(t)}finally{mo(i),Rp(o),Vp.pop()}}else try{Yc(t),e=jc(t)}finally{mo(i)}return e}function Dp(t){var e=Op(t);if(t.equals(e)||(t.v=e,t.wv=ld()),!ws){var i=(Ss||(t.f&256)!==0)&&t.deps!==null?4096:1024;Cn(t,i)}}var ya=new Set,yl=new Map;function Rp(t){ya=t}function Ar(t,e){var i={f:0,v:t,reactions:null,equals:Qc,rv:0,wv:0};return ke&&us&&(i.created=e!=null?e:xs("CreatedAt"),i.updated=null,i.set_during_effect=!1,i.trace=null),i}function K(t,e){let i=Ar(t,e);return Xc(i),i}function fs(t,e=!1,i=!0){var r,a;let o=Ar(t);return e||(o.equals=gl),cs&&i&&Ht!==null&&Ht.l!==null&&((a=(r=Ht.l).s)!=null?a:r.s=[]).push(o),o}function N(t,e,i=!1){var r;Rt!==null&&(!pr||(Rt.f&262144)!==0)&&ps()&&(Rt.f&262162)!==0&&!((r=Yo)!=null&&r[1].includes(t)&&Yo[0]===Rt)&&gg();let o=i?ci(e):e;return ke&&Gc(o,t.label),xl(t,o)}function xl(t,e){if(!t.equals(e)){var i=t.v;if(ws?yl.set(t,e):yl.set(t,i),t.v=e,ke&&us&&(t.updated=xs("UpdatedAt"),$t!==null&&(t.set_during_effect=!0)),(t.f&2)!==0&&((t.f&2048)!==0&&Op(t),Cn(t,(t.f&256)===0?1024:4096)),t.wv=ld(),bg(t,2048),ps()&&$t!==null&&($t.f&1024)!==0&&($t.f&96)===0&&(ur===null?$g([t]):ur.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)&&wl(r);ya.clear()}}return e}function bg(t,e){var i=t.reactions;if(i!==null)for(var o=ps(),r=i.length,a=0;a<r;a++){var l=i[a],d=l.f;if((d&2048)===0&&!(!o&&l===$t)){if(ke&&(d&262144)!==0){ya.add(l);continue}Cn(l,e),(d&1280)!==0&&((d&2)!==0?bg(l,4096):cd(l))}}}var Sl="font-weight: bold",Tl="font-weight: normal";function yg(t,e,i){ke?console.warn(`%c[svelte] hydration_attribute_changed
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 Wt=null;function nd(t){Wt=t}var vr=null;function rd(t){vr=t}function gl(t){return kp("getContext").get(t)}function hl(t,e){return kp("setContext").set(t,e),e}function sd(){return kp("getAllContexts")}function B(t,e=!1,i){var o=Wt={p:Wt,c:null,d:!1,e:null,m:!1,s:t,x:null,l:null};ls&&!e&&(Wt.l={s:null,u:null,r1:[],r2:Ar(!1)}),Vo(()=>{o.d=!0}),Ee&&(Wt.function=i,vr=i)}function F(t){var l,d;let e=Wt;if(e!==null){t!==void 0&&(e.x=t);let s=e.e;if(s!==null){var i=_t,o=Ot;e.e=null;try{for(var r=0;r<s.length;r++){var a=s[r];go(a.effect),qi(a.reaction),Ro(a.fn)}}finally{go(i),qi(o)}}Wt=e.p,Ee&&(vr=(d=(l=e.p)==null?void 0:l.function)!=null?d:null),e.m=!0}return t||{}}function cs(){return!ls||Wt!==null&&Wt.l===null}function kp(t){var e;return Wt===null&&vl(t),(e=Wt.c)!=null?e:Wt.c=new Map(p$(Wt)||void 0)}function p$(t){let e=t.p;for(;e!==null;){let i=e.c;if(i!==null)return i;e=e.p}return null}var f$=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function ci(t){if(typeof t!="object"||t===null||qo in t)return t;let e=_a(t);if(e!==Ip&&e!==ig)return t;var i=new Map,o=fr(t),r=K(0),a=Ee&&ds?ys("CreatedAt"):null,l=Ot,d=m=>{var p=Ot;qi(l);var f=m();return qi(p),f};o&&i.set("length",K(t.length,a));var s="";function u(m){s=m,Kr(r,`${s} version`);for(let[p,f]of i)Kr(f,ba(s,p))}return new Proxy(t,{defineProperty(m,p,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&gg();var $=i.get(p);return $===void 0?$=d(()=>{var y=K(f.value,a);return i.set(p,y),Ee&&typeof p=="string"&&Kr(y,ba(s,p)),y}):O($,f.value,!0),!0},deleteProperty(m,p){var f=i.get(p);if(f===void 0){if(p in m){let _=d(()=>K(to,a));i.set(p,_),Lp(r),Ee&&Kr(_,ba(s,p))}}else{if(o&&typeof p=="string"){var $=i.get("length"),y=Number(p);Number.isInteger(y)&&y<$.v&&O($,y)}O(f,to),Lp(r)}return!0},get(m,p,f){var S;if(p===qo)return t;if(Ee&&p===Wc)return u;var $=i.get(p),y=p in m;if($===void 0&&(!y||(S=Ko(m,p))!=null&&S.writable)&&($=d(()=>{var C=ci(y?m[p]:to),I=K(C,a);return Ee&&Kr(I,ba(s,p)),I}),i.set(p,$)),$!==void 0){var _=n($);return _===to?void 0:_}return Reflect.get(m,p,f)},getOwnPropertyDescriptor(m,p){var f=Reflect.getOwnPropertyDescriptor(m,p);if(f&&"value"in f){var $=i.get(p);$&&(f.value=n($))}else if(f===void 0){var y=i.get(p),_=y==null?void 0:y.v;if(y!==void 0&&_!==to)return{enumerable:!0,configurable:!0,value:_,writable:!0}}return f},has(m,p){var _;if(p===qo)return!0;var f=i.get(p),$=f!==void 0&&f.v!==to||Reflect.has(m,p);if(f!==void 0||_t!==null&&(!$||(_=Ko(m,p))!=null&&_.writable)){f===void 0&&(f=d(()=>{var S=$?ci(m[p]):to,C=K(S,a);return Ee&&Kr(C,ba(s,p)),C}),i.set(p,f));var y=n(f);if(y===to)return!1}return $},set(m,p,f,$){var k;var y=i.get(p),_=p in m;if(o&&p==="length")for(var S=f;S<y.v;S+=1){var C=i.get(S+"");C!==void 0?O(C,to):S in m&&(C=d(()=>K(to,a)),i.set(S+"",C),Ee&&Kr(C,ba(s,S)))}if(y===void 0)(!_||(k=Ko(m,p))!=null&&k.writable)&&(y=d(()=>K(void 0,a)),O(y,ci(f)),i.set(p,y),Ee&&Kr(y,ba(s,p)));else{_=y.v!==to;var I=d(()=>ci(f));O(y,I)}var N=Reflect.getOwnPropertyDescriptor(m,p);if(N!=null&&N.set&&N.set.call($,f),!_){if(o&&typeof p=="string"){var P=i.get("length"),E=Number(p);Number.isInteger(E)&&E>=P.v&&O(P,E+1)}Lp(r)}return!0},ownKeys(m){n(r);var p=Reflect.ownKeys(m).filter(y=>{var _=i.get(y);return _===void 0||_.v!==to});for(var[f,$]of i)$.v!==to&&!(f in m)&&p.push(f);return p},setPrototypeOf(){hg()}})}function ba(t,e){var i;return typeof e=="symbol"?`${t}[Symbol(${(i=e.description)!=null?i:""})]`:f$.test(e)?`${t}.${e}`:/^\d+$/.test(e)?`${t}[${e}]`:`${t}['${e}']`}function Lp(t,e=1){O(t,t.v+e)}function _l(t){try{if(t!==null&&typeof t=="object"&&qo in t)return t[qo]}catch(e){}return t}function Mp(t,e){return Object.is(_l(t),_l(e))}function qr(t){var e=2050,i=Ot!==null&&(Ot.f&2)!==0?Ot:null;_t===null||i!==null&&(i.f&256)!==0?e|=256:_t.f|=1048576;let o={ctx:Wt,deps:null,effects:null,equals:qc,f:e,fn:t,reactions:null,rv:0,v:null,wv:0,parent:i!=null?i:_t};return Ee&&ds&&(o.created=ys("CreatedAt")),o}function v(t){let e=qr(t);return jc(e),e}function wn(t){let e=qr(t);return e.equals=ml,e}function Gc(t){var e=t.effects;if(e!==null){t.effects=null;for(var i=0;i<e.length;i+=1)Qi(e[i])}}var Vp=[];function m$(t){for(var e=t.parent;e!==null;){if((e.f&2)===0)return e;e=e.parent}return null}function Op(t){var e,i=_t;if(go(m$(t)),Ee){let o=$a;Rp(new Set);try{Vp.includes(t)&&sg(),Vp.push(t),Gc(t),e=Yc(t)}finally{go(i),Rp(o),Vp.pop()}}else try{Gc(t),e=Yc(t)}finally{go(i)}return e}function Dp(t){var e=Op(t);if(t.equals(e)||(t.v=e,t.wv=ad()),!xs){var i=(ws||(t.f&256)!==0)&&t.deps!==null?4096:1024;Sn(t,i)}}var $a=new Set,bl=new Map;function Rp(t){$a=t}function Ar(t,e){var i={f:0,v:t,reactions:null,equals:qc,rv:0,wv:0};return Ee&&ds&&(i.created=e!=null?e:ys("CreatedAt"),i.updated=null,i.set_during_effect=!1,i.trace=null),i}function K(t,e){let i=Ar(t,e);return jc(i),i}function us(t,e=!1,i=!0){var r,a;let o=Ar(t);return e||(o.equals=ml),ls&&i&&Wt!==null&&Wt.l!==null&&((a=(r=Wt.l).s)!=null?a:r.s=[]).push(o),o}function O(t,e,i=!1){var r;Ot!==null&&(!_r||(Ot.f&262144)!==0)&&cs()&&(Ot.f&262162)!==0&&!((r=Go)!=null&&r[1].includes(t)&&Go[0]===Ot)&&_g();let o=i?ci(e):e;return Ee&&Qc(o,t.label),$l(t,o)}function $l(t,e){if(!t.equals(e)){var i=t.v;if(xs?bl.set(t,e):bl.set(t,i),t.v=e,Ee&&ds&&(t.updated=ys("UpdatedAt"),_t!==null&&(t.set_during_effect=!0)),(t.f&2)!==0&&((t.f&2048)!==0&&Op(t),Sn(t,(t.f&256)===0?1024:4096)),t.wv=ad(),yg(t,2048),cs()&&_t!==null&&(_t.f&1024)!==0&&(_t.f&96)===0&&(hr===null?xg([t]):hr.push(t)),Ee&&$a.size>0){let o=Array.from($a);for(let r of o)(r.f&1024)!==0&&Sn(r,4096),xa(r)&&yl(r);$a.clear()}}return e}function yg(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===_t)){if(Ee&&(d&262144)!==0){$a.add(l);continue}Sn(l,e),(d&1280)!==0&&((d&2)!==0?yg(l,4096):dd(l))}}}var xl="font-weight: bold",wl="font-weight: normal";function wg(t,e,i){Ee?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`,Sl,Tl):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function xg(t){ke?console.warn(`%c[svelte] hydration_html_changed
29
+ https://svelte.dev/e/hydration_attribute_changed`,xl,wl):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function Sg(t){Ee?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`,Sl,Tl):console.warn("https://svelte.dev/e/hydration_html_changed")}function Xs(t){ke?console.warn(`%c[svelte] hydration_mismatch
31
+ https://svelte.dev/e/hydration_html_changed`,xl,wl):console.warn("https://svelte.dev/e/hydration_html_changed")}function js(t){Ee?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`,Sl,Tl):console.warn("https://svelte.dev/e/hydration_mismatch")}function wg(){ke?console.warn(`%c[svelte] lifecycle_double_unmount
33
+ https://svelte.dev/e/hydration_mismatch`,xl,wl):console.warn("https://svelte.dev/e/hydration_mismatch")}function Tg(){Ee?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`,Sl,Tl):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function Sg(){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",Sl,Tl):console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Zc(t){ke?console.warn(`%c[svelte] state_proxy_equality_mismatch
35
+ https://svelte.dev/e/lifecycle_double_unmount`,xl,wl):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function Cg(){Ee?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",xl,wl):console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Xc(t){Ee?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`,Sl,Tl):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}var tt=!1;function vo(t){tt=t}var yt;function Ci(t){if(t===null)throw Xs(),ds;return yt=t}function Yi(){return Ci(jo(yt))}function w(t){if(tt){if(jo(yt)!==null)throw Xs(),ds;yt=t}}function vi(t=1){if(tt){for(var e=t,i=yt;e--;)i=jo(i);yt=i}}function Sa(){for(var t=0,e=yt;;){if(e.nodeType===lr){var i=e.data;if(i===_a){if(t===0)return e;t-=1}else(i===Qs||i===Gs)&&(t+=1)}var o=jo(e);e.remove(),e=o}}function Jc(t){if(!t||t.nodeType!==lr)throw Xs(),ds;return t.data}function Tg(){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($l(this[s])===a){Zc("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($l(this[s])===a){Zc("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($l(this[s])===a){Zc("array.includes(...)");break}}return d},Array.__svelte_cleanup=()=>{t.indexOf=i,t.lastIndexOf=o,t.includes=r}}var Ta,Cg,ud,Ig,Eg;function eu(){if(Ta===void 0){Ta=window,Cg=document,ud=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,i=Text.prototype;Ig=qo(e,"firstChild").get,Eg=qo(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,Tg())}}function In(t=""){return document.createTextNode(t)}function Ii(t){return Ig.call(t)}function jo(t){return Eg.call(t)}function T(t,e){if(!tt)return Ii(t);var i=Ii(yt);if(i===null)i=yt.appendChild(In());else if(e&&i.nodeType!==ml){var o=In();return i==null||i.before(o),Ci(o),o}return Ci(i),i}function de(t,e){var r,a;if(!tt){var i=Ii(t);return i.nodeType===8&&i.data===""?jo(i):i}if(e&&((r=yt)==null?void 0:r.nodeType)!==ml){var o=In();return(a=yt)==null||a.before(o),Ci(o),o}return yt}function k(t,e=1,i=!1){let o=tt?yt:t;for(var r;e--;)r=o,o=jo(o);if(!tt)return o;if(i&&(o==null?void 0:o.nodeType)!==ml){var a=In();return o===null?r==null||r.after(a):o.before(a),Ci(a),a}return Ci(o),o}function pd(t){t.textContent=""}function Hp(t){$t===null&&Rt===null&&ag(t),Rt!==null&&(Rt.f&256)!==0&&$t===null&&sg(),ws&&rg(t)}function p$(t,e){var i=e.last;i===null?e.last=e.first=t:(i.next=t,t.prev=i,e.last=t)}function Ca(t,e,i,o=!0){var s;var r=$t;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=dr),i)try{wl(a),a.f|=32768}catch(u){throw Gi(a),u}else e!==null&&cd(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&&p$(a,r),Rt!==null&&(Rt.f&2)!==0)){var d=Rt;((s=d.effects)!=null?s:d.effects=[]).push(a)}return a}function Io(t){let e=Ca(8,null,!1);return Cn(e,1024),e.teardown=t,e}function De(t){var r;Hp("$effect");var e=$t!==null&&($t.f&32)!==0&&Ht!==null&&!Ht.m;if(ke&&fo(t,"name",{value:"$effect"}),e){var i=Ht;((r=i.e)!=null?r:i.e=[]).push({fn:t,effect:$t,reaction:Rt})}else{var o=Eo(t);return o}}function vd(t){return Hp("$effect.pre"),ke&&fo(t,"name",{value:"$effect.pre"}),Xo(t)}function ou(t){let e=Ca(64,t,!0);return()=>{Gi(e)}}function Ag(t){let e=Ca(64,t,!0);return(i={})=>new Promise(o=>{i.outro?Kn(e,()=>{Gi(e),o(void 0)}):(Gi(e),o(void 0))})}function Eo(t){return Ca(4,t,!1)}function Xo(t){return Ca(8,t,!0)}function B(t,e=[],i=Qr){if(ke)return Xo(()=>{var r=$t,a=()=>t(...l.map(n));fo(r.fn,"name",{value:"{expression}"}),fo(a,"name",{value:"{expression}"});let l=e.map(i);ji(a)});let o=e.map(i);return ji(()=>t(...o.map(n)))}function ji(t,e=0){return Ca(24|e,t,!0)}function Oi(t,e=!0){return Ca(40,t,!0,e)}function Up(t){var e=t.teardown;if(e!==null){let i=ws,o=Rt;Bp(!0),Qi(null);try{e.call(null)}finally{Bp(i),Qi(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:Gi(i,e),i=o}}function kg(t){for(var e=t.first;e!==null;){var i=e.next;(e.f&32)===0&&Gi(e),e=i}}function Gi(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),gd(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:jo(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 Kn(t,e){var i=[];nu(t,i,!0),qp(i,()=>{Gi(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 nu(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;nu(o,e,a?i:!1),o=r}}}function Cs(t){Lg(t,!0)}function Lg(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;Lg(i,r?e:!1),i=o}if(t.transitions!==null)for(let a of t.transitions)(a.is_global||e)&&a.in()}}var hd=[],Qp=[];function Mg(){var t=hd;hd=[],js(t)}function f$(){var t=Qp;Qp=[],js(t)}function En(t){hd.length===0&&queueMicrotask(Mg),hd.push(t)}function Vg(){hd.length>0&&Mg(),Qp.length>0&&f$()}function Ng(t){var e=$t;if(ke&&t instanceof Error&&m$(t,e),(e.f&32768)===0){if((e.f&128)===0)throw t;e.fn(t)}else _d(t,e)}function _d(t,e){for(;e!==null;){if((e.f&128)!==0)try{e.fn(t);return}catch(i){}e=e.parent}throw t}var Rg=new WeakSet;function m$(t,e){var l,d;if(Rg.has(t))return;Rg.add(t);let i=qo(t,"message");if(!(i&&!i.configurable)){for(var o=ud?" ":" ",r=`
37
+ https://svelte.dev/e/state_proxy_equality_mismatch`,xl,wl):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}var Je=!1;function ho(t){Je=t}var bt;function Ci(t){if(t===null)throw js(),as;return bt=t}function Gi(){return Ci(Yo(bt))}function w(t){if(Je){if(Yo(bt)!==null)throw js(),as;bt=t}}function vi(t=1){if(Je){for(var e=t,i=bt;e--;)i=Yo(i);bt=i}}function wa(){for(var t=0,e=bt;;){if(e.nodeType===mr){var i=e.data;if(i===ha){if(t===0)return e;t-=1}else(i===qs||i===Qs)&&(t+=1)}var o=Yo(e);e.remove(),e=o}}function Zc(t){if(!t||t.nodeType!==mr)throw js(),as;return t.data}function Ig(){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(_l(this[s])===a){Xc("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(_l(this[s])===a){Xc("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(_l(this[s])===a){Xc("array.includes(...)");break}}return d},Array.__svelte_cleanup=()=>{t.indexOf=i,t.lastIndexOf=o,t.includes=r}}var Sa,Eg,cd,Pg,Ag;function Jc(){if(Sa===void 0){Sa=window,Eg=document,cd=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,i=Text.prototype;Pg=Ko(e,"firstChild").get,Ag=Ko(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),Ee&&(t.__svelte_meta=null,Ig())}}function Tn(t=""){return document.createTextNode(t)}function Ei(t){return Pg.call(t)}function Yo(t){return Ag.call(t)}function T(t,e){if(!Je)return Ei(t);var i=Ei(bt);if(i===null)i=bt.appendChild(Tn());else if(e&&i.nodeType!==pl){var o=Tn();return i==null||i.before(o),Ci(o),o}return Ci(i),i}function de(t,e){var r,a;if(!Je){var i=Ei(t);return i.nodeType===8&&i.data===""?Yo(i):i}if(e&&((r=bt)==null?void 0:r.nodeType)!==pl){var o=Tn();return(a=bt)==null||a.before(o),Ci(o),o}return bt}function L(t,e=1,i=!1){let o=Je?bt:t;for(var r;e--;)r=o,o=Yo(o);if(!Je)return o;if(i&&(o==null?void 0:o.nodeType)!==pl){var a=Tn();return o===null?r==null||r.after(a):o.before(a),Ci(a),a}return Ci(o),o}function ud(t){t.textContent=""}function Hp(t){_t===null&&Ot===null&&dg(t),Ot!==null&&(Ot.f&256)!==0&&_t===null&&lg(),xs&&ag(t)}function v$(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=_t;if(Ee)for(;r!==null&&(r.f&262144)!==0;)r=r.parent;var a={ctx:Wt,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(Ee&&(a.component_function=vr),i)try{yl(a),a.f|=32768}catch(u){throw Qi(a),u}else e!==null&&dd(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&&v$(a,r),Ot!==null&&(Ot.f&2)!==0)){var d=Ot;((s=d.effects)!=null?s:d.effects=[]).push(a)}return a}function Vo(t){let e=Ta(8,null,!1);return Sn(e,1024),e.teardown=t,e}function Oe(t){var r;Hp("$effect");var e=_t!==null&&(_t.f&32)!==0&&Wt!==null&&!Wt.m;if(Ee&&vo(t,"name",{value:"$effect"}),e){var i=Wt;((r=i.e)!=null?r:i.e=[]).push({fn:t,effect:_t,reaction:Ot})}else{var o=Ro(t);return o}}function md(t){return Hp("$effect.pre"),Ee&&vo(t,"name",{value:"$effect.pre"}),jo(t)}function iu(t){let e=Ta(64,t,!0);return()=>{Qi(e)}}function Lg(t){let e=Ta(64,t,!0);return(i={})=>new Promise(o=>{i.outro?Yn(e,()=>{Qi(e),o(void 0)}):(Qi(e),o(void 0))})}function Ro(t){return Ta(4,t,!1)}function jo(t){return Ta(8,t,!0)}function D(t,e=[],i=qr){if(Ee)return jo(()=>{var r=_t,a=()=>t(...l.map(n));vo(r.fn,"name",{value:"{expression}"}),vo(a,"name",{value:"{expression}"});let l=e.map(i);Yi(a)});let o=e.map(i);return Yi(()=>t(...o.map(n)))}function Yi(t,e=0){return Ta(24|e,t,!0)}function Oi(t,e=!0){return Ta(40,t,!0,e)}function Up(t){var e=t.teardown;if(e!==null){let i=xs,o=Ot;Bp(!0),qi(null);try{e.call(null)}finally{Bp(i),qi(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:Qi(i,e),i=o}}function Mg(t){for(var e=t.first;e!==null;){var i=e.next;(e.f&32)===0&&Qi(e),e=i}}function Qi(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),vd(t,0),Sn(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),Ee&&(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:Yo(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 Yn(t,e){var i=[];ou(t,i,!0),qp(i,()=>{Qi(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 ou(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;ou(o,e,a?i:!1),o=r}}}function Ts(t){Vg(t,!0)}function Vg(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;Vg(i,r?e:!1),i=o}if(t.transitions!==null)for(let a of t.transitions)(a.is_global||e)&&a.in()}}var gd=[],Qp=[];function Rg(){var t=gd;gd=[],Ys(t)}function g$(){var t=Qp;Qp=[],Ys(t)}function Cn(t){gd.length===0&&queueMicrotask(Rg),gd.push(t)}function Ng(){gd.length>0&&Rg(),Qp.length>0&&g$()}function Dg(t){var e=_t;if(Ee&&t instanceof Error&&h$(t,e),(e.f&32768)===0){if((e.f&128)===0)throw t;e.fn(t)}else hd(t,e)}function hd(t,e){for(;e!==null;){if((e.f&128)!==0)try{e.fn(t);return}catch(i){}e=e.parent}throw t}var Og=new WeakSet;function h$(t,e){var l,d;if(Og.has(t))return;Og.add(t);let i=Ko(t,"message");if(!(i&&!i.configurable)){for(var o=cd?" ":" ",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[Hn].split("/").pop()}`,a=a.p;fo(t,"message",{value:t.message+`
39
+ ${o}in ${(d=a.function)==null?void 0:d[Kn].split("/").pop()}`,a=a.p;vo(t,"message",{value:t.message+`
40
40
  ${r}
41
- `}),t.stack&&fo(t,"stack",{value:t.stack.split(`
41
+ `}),t.stack&&vo(t,"stack",{value:t.stack.split(`
42
42
  `).filter(s=>!s.includes("svelte/src/internal")).join(`
43
- `)})}}var Ia=!1,Cl=null,Ea=!1,ws=!1;function Bp(t){ws=t}var bd=[],$d=[],Rt=null,pr=!1;function Qi(t){Rt=t}var $t=null;function mo(t){$t=t}var Yo=null;function Xc(t){Rt!==null&&Rt.f&2097152&&(Yo===null?Yo=[Rt,[t]]:Yo[1].push(t))}var Pn=null,fr=0,ur=null;function $g(t){ur=t}var Bg=1,su=0,Ss=!1,au=null;function ld(){return++Bg}function wa(t){var m,f;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&&!Ss,s=i.length;if(l||d){var u=t,p=u.parent;for(r=0;r<s;r++)a=i[r],(l||!((m=a==null?void 0:a.reactions)!=null&&m.includes(u)))&&((f=a.reactions)!=null?f:a.reactions=[]).push(u);l&&(u.f^=512),d&&p!==null&&(p.f&256)===0&&(u.f^=256)}for(r=0;r<s;r++)if(a=i[r],wa(a)&&Dp(a),a.wv>t.wv)return!0}(!o||$t!==null&&!Ss)&&Cn(t,1024)}return!1}function Fg(t,e,i=!0){var o=t.reactions;if(o!==null)for(var r=0;r<o.length;r++){var a=o[r];Yo!=null&&Yo[1].includes(t)&&Yo[0]===Rt||((a.f&2)!==0?Fg(a,e,!1):e===a&&(i?Cn(a,2048):(a.f&1024)!==0&&Cn(a,4096),cd(a)))}}function jc(t){var b,y;var e=Pn,i=fr,o=ur,r=Rt,a=Ss,l=Yo,d=Ht,s=pr,u=t.f;Pn=null,fr=0,ur=null,Ss=(u&256)!==0&&(pr||!Ea||Rt===null),Rt=(u&96)===0?t:null,Yo=null,rd(t.ctx),pr=!1,su++,t.f|=2097152;try{var p=(0,t.fn)(),m=t.deps;if(Pn!==null){var f;if(gd(t,fr),m!==null&&fr>0)for(m.length=fr+Pn.length,f=0;f<Pn.length;f++)m[fr+f]=Pn[f];else t.deps=m=Pn;if(!Ss||(u&2)!==0&&t.reactions!==null)for(f=fr;f<m.length;f++)((y=(b=m[f]).reactions)!=null?y:b.reactions=[]).push(t)}else m!==null&&fr<m.length&&(gd(t,fr),m.length=fr);if(ps()&&ur!==null&&!pr&&m!==null&&(t.f&6146)===0)for(f=0;f<ur.length;f++)Fg(ur[f],t);return r!==null&&r!==t&&(su++,ur!==null&&(o===null?o=ur:o.push(...ur))),p}catch($){Ng($)}finally{Pn=e,fr=i,ur=o,Rt=r,Ss=a,Yo=l,rd(d),pr=s,t.f^=2097152}}function v$(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&&(Pn===null||!Pn.includes(e))&&(Cn(e,4096),(e.f&768)===0&&(e.f^=512),Yc(e),gd(e,0))}function gd(t,e){var i=t.deps;if(i!==null)for(var o=e;o<i.length;o++)v$(t,i[o])}function wl(t){var e=t.f;if((e&16384)===0){Cn(t,1024);var i=$t,o=Ea;if($t=t,Ea=!0,ke){var r=dr;sd(t.component_function)}try{(e&16)!==0?kg(t):zp(t),Up(t);var a=jc(t);if(t.teardown=typeof a=="function"?a:null,t.wv=Bg,ke&&us&&(t.f&2048)!==0&&t.deps!==null)for(var l of t.deps)l.set_during_effect&&(l.wv=ld(),l.set_during_effect=!1);ke&&$d.push(t)}finally{Ea=o,$t=i,ke&&sd(r)}}}function Og(){console.error("Last ten effects were: ",$d.slice(-10).map(t=>t.fn)),$d=[]}function g$(){try{lg()}catch(t){if(ke&&fo(t,"stack",{value:""}),Cl!==null)if(ke)try{_d(t,Cl)}catch(e){throw Og(),e}else _d(t,Cl);else throw ke&&Og(),t}}function Yp(){var t=Ea;try{var e=0;for(Ea=!0;bd.length>0;){e++>1e3&&g$();var i=bd,o=i.length;bd=[];for(var r=0;r<o;r++){var a=_$(i[r]);h$(a)}yl.clear()}}finally{Ia=!1,Ea=t,Cl=null,ke&&($d=[])}}function h$(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)&&(wl(o),o.deps===null&&o.first===null&&o.nodes_start===null&&(o.teardown===null?Kp(o):o.fn=null))}}function cd(t){Ia||(Ia=!0,queueMicrotask(Yp));for(var e=Cl=t;e.parent!==null;){e=e.parent;var i=e.f;if((i&96)!==0){if((i&1024)===0)return;e.f^=1024}}bd.push(e)}function _$(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)&&wl(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 Il(t){var e;for(t&&(Ia=!0,Yp(),Ia=!0,e=t());;){if(Vg(),bd.length===0)return Ia=!1,Cl=null,ke&&($d=[]),e;Ia=!0,Yp()}}function go(){return gt(this,null,function*(){yield Promise.resolve(),Il()})}function n(t){var e=t.f,i=(e&2)!==0;if(au!==null&&au.add(t),Rt!==null&&!pr){if(!(Yo!=null&&Yo[1].includes(t))||Yo[0]!==Rt){var o=Rt.deps;t.rv<su&&(t.rv=su,Pn===null&&o!==null&&o[fr]===t?fr++:Pn===null?Pn=[t]:(!Ss||!Pn.includes(t))&&Pn.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)&&Dp(r)),ke&&us&&!pr&&nd!==null&&Rt!==null&&nd.reaction===Rt)if(t.trace)t.trace();else{var l=xs("TracedAt");if(l){var d=nd.entries.get(t);d===void 0&&(d={traces:[]},nd.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 ws&&yl.has(t)?yl.get(t):t.v}function Pt(t){var e=pr;try{return pr=!0,t()}finally{pr=e}}var b$=-7169;function Cn(t,e){t.f=t.f&b$|e}function du(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(Qo in t)lu(t);else if(!Array.isArray(t))for(let e in t){let i=t[e];typeof i=="object"&&i&&Qo in i&&lu(i)}}}function lu(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{lu(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=Wc(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,En(()=>{document.activeElement===i&&t.focus()})}}function yd(t){var e=Rt,i=$t;Qi(null),mo(null);try{return t()}finally{Qi(e),mo(i)}}var Xp=new Set,cu=new Set;function Pa(t){if(!tt)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||El.call(e,a),!a.cancelBubble)return yd(()=>i==null?void 0:i.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?En(()=>{e.addEventListener(t,r,o)}):e.addEventListener(t,r,o),r}function _t(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)&&Io(()=>{e.removeEventListener(t,l,a)})}function rt(t){for(var e=0;e<t.length;e++)Xp.add(t[e]);for(var i of cu)i(t)}function El(t){var I;var e=this,i=e.ownerDocument,o=t.type,r=((I=t.composedPath)==null?void 0:I.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){fo(t,"currentTarget",{configurable:!0,get(){return a||i}});var p=Rt,m=$t;Qi(null),mo(null);try{for(var f,b=[];a!==null;){var y=a.assignedSlot||a.parentNode||a.host||null;try{var $=a["__"+o];if($!=null&&(!a.disabled||t.target===a))if(ar($)){var[S,...C]=$;S.apply(a,[t,...C])}else $.call(a,t)}catch(R){f?b.push(R):f=R}if(t.cancelBubble||y===e||y===null)break;a=y}if(f){for(let R of b)queueMicrotask(()=>{throw R});throw f}}finally{t.__root=e,delete t.currentTarget,Qi(p),mo(m)}}}var y$;function Hg(){y$=void 0}function Pl(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function Po(t,e){var i=$t;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(tt)return Po(yt,null),yt;r===void 0&&(r=Pl(a?t:"<!>"+t),i||(r=Ii(r)));var l=o||ud?document.importNode(r,!0):r.cloneNode(!0);if(i){var d=Ii(l),s=l.lastChild;Po(d,s)}else Po(l,l);return l}}function S$(t,e,i="svg"){var o=!t.startsWith("<!>"),r=(e&1)!==0,a=`<${i}>${o?t:"<!>"+t}</${i}>`,l;return()=>{if(tt)return Po(yt,null),yt;if(!l){var d=Pl(a),s=Ii(d);if(r)for(l=document.createDocumentFragment();Ii(s);)l.appendChild(Ii(s));else l=Ii(s)}var u=l.cloneNode(!0);if(r){var p=Ii(u),m=u.lastChild;Po(p,m)}else Po(u,u);return u}}function Ee(t,e){return S$(t,e,"svg")}function ms(t=""){if(!tt){var e=In(t+"");return Po(e,e),e}var i=yt;return i.nodeType!==ml&&(i.before(i=In()),Ci(i)),Po(i,i),i}function Le(){if(tt)return Po(yt,null),yt;var t=document.createDocumentFragment(),e=document.createComment(""),i=In();return t.append(e,i),Po(e,i),t}function _(t,e){if(tt){$t.nodes_end=yt,Yi();return}t!==null&&t.before(e)}var T$=/\r/g;function zg(t){t=t.replace(T$,"");let e=5381,i=t.length;for(;i--;)e=(e<<5)-e^t.charCodeAt(i);return(e>>>0).toString(36)}function Wg(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}var C$=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Kg(t){return C$.includes(t)}var I$=["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 E$={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 qg(t){var e;return t=t.toLowerCase(),(e=E$[t])!=null?e:t}var _A=[...I$,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var P$=["touchstart","touchmove"];function Qg(t){return P$.includes(t)}var A$=["$state","$state.raw","$derived","$derived.by"],bA=[...A$,"$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$inspect","$inspect().with","$inspect.trace","$host"];var k$=["textarea","script","style","title"];function Gg(t){return k$.includes(t)}function uu(t){return t==null?void 0:t.replace(/\//g,"/​")}var xd=!0;function pu(t){xd=t}function pe(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 Yg(t,e)}function ef(t,e){var l;eu(),e.intro=(l=e.intro)!=null?l:!1;let i=e.target,o=tt,r=yt;try{for(var a=Ii(i);a&&(a.nodeType!==lr||a.data!==Qs);)a=jo(a);if(!a)throw ds;vo(!0),Ci(a),Yi();let d=Yg(t,Kt(Ae({},e),{anchor:a}));if(yt===null||yt.nodeType!==lr||yt.data!==_a)throw Xs(),ds;return vo(!1),d}catch(d){if(d===ds)return e.recover===!1&&dg(),eu(),pd(i),vo(!1),jr(t,e);throw d}finally{vo(o),Ci(r),Hg()}}var Al=new Map;function Yg(t,{target:e,anchor:i,props:o={},events:r,context:a,intro:l=!0}){eu();var d=new Set,s=m=>{for(var f=0;f<m.length;f++){var b=m[f];if(!d.has(b)){d.add(b);var y=Qg(b);e.addEventListener(b,El,{passive:y});var $=Al.get(b);$===void 0?(document.addEventListener(b,El,{passive:y}),Al.set(b,1)):Al.set(b,$+1)}}};s(od(Xp)),cu.add(s);var u=void 0,p=Ag(()=>{var m=i!=null?i:e.appendChild(In());return Oi(()=>{if(a){F({});var f=Ht;f.c=a}r&&(o.$$events=r),tt&&Po(m,null),xd=l,u=t(m,o)||{},xd=!0,tt&&($t.nodes_end=yt),a&&H()}),()=>{var y;for(var f of d){e.removeEventListener(f,El);var b=Al.get(f);--b===0?(document.removeEventListener(f,El),Al.delete(f)):Al.set(f,b)}cu.delete(s),m!==i&&((y=m.parentNode)==null||y.removeChild(m))}});return Jp.set(u,p),u}var Jp=new WeakMap;function Aa(t,e){let i=Jp.get(t);return i?(Jp.delete(t),i(e)):(ke&&wg(),Promise.resolve())}function ri(t,e,...i){var o=t,r=ht,a;ji(()=>{r!==(r=e())&&(a&&(Gi(a),a=null),ke&&r==null&&cg(),a=Oi(()=>r(o,...i)))},65536),tt&&(o=yt)}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;fg(e)},set:o=>{i=o}})}};R$=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var R$;function Nt(t){Ht===null&&hl("onMount"),cs&&Ht.l!==null?V$(Ht).m.push(t):De(()=>{let e=Pt(t);if(typeof e=="function")return e})}function mn(t){Ht===null&&hl("onDestroy"),Nt(()=>()=>Pt(t))}function V$(t){var i;var e=t.l;return(i=e.u)!=null?i:e.u={a:[],b:[],m:[]}}var jg=new Map;function Xg(t,e){var i=jg.get(t);i||(i=new Set,jg.set(t,i)),i.add(e)}function V(t,e,[i,o]=[0,0]){tt&&i===0&&Yi();var r=t,a=null,l=null,d=Zi,s=i>0?65536:0,u=!1;let p=(f,b=!0)=>{u=!0,m(b,f)},m=(f,b)=>{if(d===(d=f))return;let y=!1;if(tt&&o!==-1){if(i===0){let S=Jc(r);S===Qs?o=0:S===Gs?o=1/0:(o=parseInt(S.substring(1)),o!==o&&(o=d?1/0:-1))}let $=o>i;!!d===$&&(r=Sa(),Ci(r),vo(!1),y=!0,o=-1)}d?(a?Cs(a):b&&(a=Oi(()=>b(r))),l&&Kn(l,()=>{l=null})):(l?Cs(l):b&&(l=Oi(()=>b(r,[i+1,o]))),a&&Kn(a,()=>{a=null})),y&&vo(!0)};ji(()=>{u=!1,e(p),u||m(null,null)},s),tt&&(r=yt)}function Is(t,e,i){tt&&Yi();var o=t,r=Zi,a,l=ps()?og:vl;ji(()=>{l(r,r=e())&&(a&&Kn(a),a=Oi(()=>i(o)))}),tt&&(o=yt)}var Js=null;function nf(t){Js=t}function wd(t,e){return e}function D$(t,e,i,o){for(var r=[],a=e.length,l=0;l<a;l++)nu(e[l].e,r,!0);var d=a>0&&r.length===0&&i!==null;if(d){var s=i.parentNode;pd(s),s.append(i),o.clear(),Zs(t,e[0].prev,e[a-1].next)}qp(r,()=>{for(var u=0;u<a;u++){var p=e[u];d||(o.delete(p.k),Zs(t,p.prev,p.next)),Gi(p.e,!d)}})}function wi(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=tt?Ci(Ii(u)):u.appendChild(In())}tt&&Yi();var p=null,m=!1,f=Tn(()=>{var b=i();return ar(b)?b:b==null?[]:od(b)});ji(()=>{var b=n(f),y=b.length;if(m&&y===0)return;m=y===0;let $=!1;if(tt){var S=Jc(l)===Gs;S!==(y===0)&&(l=Sa(),Ci(l),vo(!1),$=!0)}if(tt){for(var C=null,I,R=0;R<y;R++){if(yt.nodeType===lr&&yt.data===_a){l=yt,$=!0,vo(!1);break}var E=b[R],P=o(E,R);I=eh(yt,d,C,null,E,P,R,r,e,i),d.items.set(P,I),C=I}y>0&&Ci(Sa())}tt||B$(b,d,l,r,e,o,i),a!==null&&(y===0?p?Cs(p):p=Oi(()=>a(l)):p!==null&&Kn(p,()=>{p=null})),$&&vo(!0),n(f)}),tt&&(l=yt)}function B$(t,e,i,o,r,a,l){var X,we,ce,ne;var d=(r&8)!==0,s=(r&3)!==0,u=t.length,p=e.items,m=e.first,f=m,b,y=null,$,S=[],C=[],I,R,E,P;if(d)for(P=0;P<u;P+=1)I=t[P],R=a(I,P),E=p.get(R),E!==void 0&&((X=E.a)==null||X.measure(),($!=null?$:$=new Set).add(E));for(P=0;P<u;P+=1){if(I=t[P],R=a(I,P),E=p.get(R),E===void 0){var O=f?f.e.nodes_start:i;y=eh(O,e,y,y===null?e.first:y.next,I,R,P,o,r,l),p.set(R,y),S=[],C=[],f=y.next;continue}if(s&&F$(E,I,P,r),(E.e.f&8192)!==0&&(Cs(E.e),d&&((we=E.a)==null||we.unfix(),($!=null?$:$=new Set).delete(E))),E!==f){if(b!==void 0&&b.has(E)){if(S.length<C.length){var D=C[0],U;y=D.prev;var z=S[0],G=S[S.length-1];for(U=0;U<S.length;U+=1)Zg(S[U],D,i);for(U=0;U<C.length;U+=1)b.delete(C[U]);Zs(e,z.prev,G.next),Zs(e,y,z),Zs(e,G,D),f=D,y=G,P-=1,S=[],C=[]}else b.delete(E),Zg(E,f,i),Zs(e,E.prev,E.next),Zs(e,E,y===null?e.first:y.next),Zs(e,y,E),y=E;continue}for(S=[],C=[];f!==null&&f.k!==R;)(f.e.f&8192)===0&&(b!=null?b:b=new Set).add(f),C.push(f),f=f.next;if(f===null)continue;E=f}S.push(E),y=E,f=E.next}if(f!==null||b!==void 0){for(var le=b===void 0?[]:od(b);f!==null;)(f.e.f&8192)===0&&le.push(f),f=f.next;var Y=le.length;if(Y>0){var re=(r&4)!==0&&u===0?i:null;if(d){for(P=0;P<Y;P+=1)(ce=le[P].a)==null||ce.measure();for(P=0;P<Y;P+=1)(ne=le[P].a)==null||ne.fix()}D$(e,le,re,p)}}d&&En(()=>{var he;if($!==void 0)for(E of $)(he=E.a)==null||he.apply()}),$t.first=e.first&&e.first.e,$t.last=y&&y.e}function F$(t,e,i,o){(o&1)!==0&&xl(t.v,e),(o&2)!==0?xl(t.i,i):t.i=i}function eh(t,e,i,o,r,a,l,d,s,u){var p=Js,m=(s&1)!==0,f=(s&16)===0,b=m?f?fs(r,!1,!1):Ar(r):r,y=(s&2)===0?l:Ar(l);ke&&m&&(b.trace=()=>{var S=typeof y=="number"?l:y.v;u()[S]});var $={i:y,v:b,k:a,a:null,e:null,prev:i,next:o};Js=$;try{return $.e=Oi(()=>d(t,b,y,u),tt),$.e.prev=i&&i.e,$.e.next=o&&o.e,i===null?e.first=$:(i.next=$,i.e.next=$.e),o!==null&&(o.prev=$,o.e.prev=$.e),$}finally{Js=p}}function Zg(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=jo(a);r.before(a),a=l}}function Zs(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 H$(t,e,i){var a,l;if(!e||e===zg(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=dr)!=null&&l[Hn]&&(o=`in ${dr[Hn]}`),xg(uu(o))}function Sd(t,e,i=!1,o=!1,r=!1){var a=t,l="";B(()=>{var b;var d=$t;if(l===(l=(b=e())!=null?b:"")){tt&&Yi();return}if(d.nodes_start!==null&&(Wp(d.nodes_start,d.nodes_end),d.nodes_start=d.nodes_end=null),l!==""){if(tt){for(var s=yt.data,u=Yi(),p=u;u!==null&&(u.nodeType!==lr||u.data!=="");)p=u,u=jo(u);if(u===null)throw Xs(),ds;ke&&!r&&H$(u.parentNode,s,l),Po(yt,p),a=Ci(u);return}var m=l+"";i?m=`<svg>${m}</svg>`:o&&(m=`<math>${m}</math>`);var f=Pl(m);if((i||o)&&(f=Ii(f)),Po(Ii(f),f.lastChild),i||o)for(;Ii(f);)a.before(Ii(f));else a.before(f)}})}function Di(t,e,i){tt&&Yi();var o=t,r,a;ji(()=>{r!==(r=e())&&(a&&(Kn(a),a=null),r&&(a=Oi(()=>i(o,r))))},65536),tt&&(o=yt)}function ka(t,e,i,o,r,a){var y;let l=tt;tt&&Yi();var d=ke&&a&&((y=Ht)==null?void 0:y.function[Hn]),s,u,p=null;tt&&yt.nodeType===qc&&(p=yt,Yi());var m=tt?yt:t,f,b=Js;ji(()=>{let $=e()||null;var S=r?r():i||$==="svg"?Uc:null;if($!==s){var C=Js;nf(b),f&&($===null?Kn(f,()=>{f=null,u=null}):$===u?Cs(f):(Gi(f),pu(!1))),$&&$!==u&&(f=Oi(()=>{if(p=tt?p:S?document.createElementNS(S,$):document.createElement($),ke&&a&&(p.__svelte_meta={loc:{file:d,line:a[0],column:a[1]}}),Po(p,p),o){tt&&Gg($)&&p.append(document.createComment(""));var I=tt?Ii(p):p.appendChild(In());tt&&(I===null?vo(!1):Ci(I)),o(p,I)}$t.nodes_end=p,m.before(p)})),s=$,s&&(u=s),pu(!0),nf(C)}},65536),l&&(vo(!0),Ci(m))}var sf;function th(t){return sf=t.target,new rf(t)}var Es,kr,rf=class{constructor(e){qs(this,Es);qs(this,kr);var a,l;var i=new Map,o=(d,s)=>{var u=fs(s,!1,!1);return i.set(d,u),u};let r=new Proxy(Kt(Ae({},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===fl?!0:(n((u=i.get(s))!=null?u:o(s,Reflect.get(d,s))),Reflect.has(d,s))},set(d,s,u){var p;return N((p=i.get(s))!=null?p:o(s,u),u),Reflect.set(d,s,u)}});pl(this,kr,(e.hydrate?ef: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)&&Il(),pl(this,Es,r.$$events);for(let d of Object.keys(Ni(this,kr)))d==="$set"||d==="$destroy"||d==="$on"||fo(this,d,{get(){return Ni(this,kr)[d]},set(s){Ni(this,kr)[d]=s},enumerable:!0});Ni(this,kr).$set=d=>{Object.assign(r,d)},Ni(this,kr).$destroy=()=>{Aa(Ni(this,kr))}}$set(e){Ni(this,kr).$set(e)}$on(e,i){Ni(this,Es)[e]=Ni(this,Es)[e]||[];let o=(...r)=>i.call(this,...r);return Ni(this,Es)[e].push(o),()=>{Ni(this,Es)[e]=Ni(this,Es)[e].filter(r=>r!==o)}}$destroy(){Ni(this,kr).$destroy()}};Es=new WeakMap,kr=new WeakMap;function q(t,e){En(()=>{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&&Xg(e.hash,d)}})}function Ps(t,e){var i=void 0,o;ji(()=>{i!==(i=e())&&(o&&(Gi(o),o=null),i&&(o=Oi(()=>{Eo(()=>i(t))})))})}function ih(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=ih(t[e]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function oh(){for(var t,e,i=0,o="",r=arguments.length;i<r;i++)(t=arguments[i])&&(e=ih(t))&&(o&&(o+=" "),o+=e);return o}function Td(t){return typeof t=="object"?oh(t):t!=null?t:""}var nh=[...`
44
- \r\f \v\uFEFF`];function sh(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||nh.includes(o[l-1]))&&(d===o.length||nh.includes(o[d]))?o=(l===0?"":o.substring(0,l))+o.substring(d+1):l=d}}return o===""?null:o}function rh(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 ah(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,p=-1;let $=t.length;for(var m=0;m<$;m++){var f=t[m];if(d?f==="/"&&t[m-1]==="*"&&(d=!1):a?a===f&&(a=!1):f==="/"&&t[m+1]==="*"?d=!0:f==='"'||f==="'"?a=f:f==="("?l++:f===")"&&l--,!d&&a===!1&&l===0){if(f===":"&&p===-1)p=m;else if(f===";"||m===$-1){if(p!==-1){var b=af(t.substring(u,p).trim());if(!s.includes(b)){f!==";"&&m++;var y=t.substring(u,m).trim();i+=" "+y+";"}}u=m+1,p=-1}}}}return o&&(i+=rh(o)),r&&(i+=rh(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(tt||l!==i||l===void 0){var d=sh(i,o,a);(!tt||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 Ge(t,e,i,o){var r=t.__style;if(tt||r!==e){var a=ah(e,o);(!tt||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 Cd(t,e,i){if(t.multiple){if(e==null)return;if(!ar(e))return Sg();for(var o of t.options)o.selected=e.includes(lh(o));return}for(o of t.options){var r=lh(o);if(Mp(r,e)){o.selected=!0;return}}(!i||e!==void 0)&&(t.selectedIndex=-1)}function df(t){var e=new MutationObserver(()=>{Cd(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Io(()=>{e.disconnect()})}function lh(t){return"__value"in t?t.__value:t.value}var kl=Symbol("class"),Ll=Symbol("style"),uh=Symbol("is custom element"),ph=Symbol("is html");function fh(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Ue(t,e,i,o){var r=vh(t);if(tt&&(r[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){o||Y$(t,e,i!=null?i:"");return}r[e]!==(r[e]=i)&&(e==="loading"&&(t[ig]=i),i==null?t.removeAttribute(e):typeof i!="string"&&gh(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function mh(t,e,i,o,r=!1){var E;var a=vh(t),l=a[uh],d=!a[ph];let s=tt&&l;s&&vo(!1);var u=e||{},p=t.tagName==="OPTION";for(var m in e)m in i||(i[m]=null);i.class?i.class=Td(i.class):(o||i[kl])&&(i.class=null),i[Ll]&&((E=i.style)!=null||(i.style=null));var f=gh(t);for(let P in i){let O=i[P];if(p&&P==="value"&&O==null){t.value=t.__value="",u[P]=O;continue}if(P==="class"){var b=t.namespaceURI==="http://www.w3.org/1999/xhtml";se(t,b,O,o,e==null?void 0:e[kl],i[kl]),u[P]=O,u[kl]=i[kl];continue}if(P==="style"){Ge(t,O,e==null?void 0:e[Ll],i[Ll]),u[P]=O,u[Ll]=i[Ll];continue}var y=u[P];if(!(O===y&&!(O===void 0&&t.hasAttribute(P)))){u[P]=O;var $=P[0]+P[1];if($!=="$$")if($==="on"){let D={},U="$$"+P,z=P.slice(2);var S=Kg(z);if(Wg(z)&&(z=z.slice(0,-7),D.capture=!0),!S&&y){if(O!=null)continue;t.removeEventListener(z,u[U],D),u[U]=null}if(O!=null)if(S)t[`__${z}`]=O,rt([z]);else{let G=function(le){u[P].call(this,le)};var R=G;u[U]=Zp(z,t,G,D)}else S&&(t[`__${z}`]=void 0)}else if(P==="style")Ue(t,P,O);else if(P==="autofocus")jp(t,!!O);else if(!l&&(P==="__value"||P==="value"&&O!=null))t.value=t.__value=O;else if(P==="selected"&&p)fh(t,O);else{var C=P;d||(C=qg(C));var I=C==="defaultValue"||C==="defaultChecked";if(O==null&&!l&&!I)if(a[P]=null,C==="value"||C==="checked"){let D=t,U=e===void 0;if(C==="value"){let z=D.defaultValue;D.removeAttribute(C),D.defaultValue=z,D.value=D.__value=U?z:null}else{let z=D.defaultChecked;D.removeAttribute(C),D.defaultChecked=z,D.checked=U?z:!1}}else t.removeAttribute(P);else I||f.includes(C)&&(l||typeof O!="string")?t[C]=O:typeof O!="function"&&Ue(t,C,O,r)}}}return s&&vo(!0),u}function Ji(t,e,i=[],o,r=!1,a=Qr){let l=i.map(a);var d=void 0,s={},u=t.nodeName==="SELECT",p=!1;if(ji(()=>{var f=e(...l.map(n)),b=mh(t,d,f,o,r);p&&u&&"value"in f&&Cd(t,f.value,!1);for(let $ of Object.getOwnPropertySymbols(s))f[$]||Gi(s[$]);for(let $ of Object.getOwnPropertySymbols(f)){var y=f[$];$.description===Tp&&(!d||y!==d[$])&&(s[$]&&Gi(s[$]),s[$]=Oi(()=>Ps(t,()=>y))),b[$]=y}d=b}),u){var m=t;Eo(()=>{Cd(m,d.value),df(m)})}p=!0}function vh(t){var e;return(e=t.__attributes)!=null?e:t.__attributes={[uh]:t.nodeName.includes("-"),[ph]:t.namespaceURI===Yv}}var dh=new Map;function gh(t){var e=dh.get(t.nodeName);if(e)return e;dh.set(t.nodeName,e=[]);for(var i,o=t,r=Element.prototype;r!==o;){i=Wc(o);for(var a in i)i[a].set&&e.push(a);o=ba(o)}return e}function Y$(t,e,i){var o;ke&&(e==="srcset"&&j$(t,i)||cf((o=t.getAttribute(e))!=null?o:"",i)||yg(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 ch(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function j$(t,e){var i=ch(t.srcset),o=ch(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 X$=zc?()=>performance.now():()=>Date.now(),Xr={tick:t=>(zc?requestAnimationFrame:ht)(t),now:()=>X$(),tasks:new Set};function hh(){let t=Xr.now();Xr.tasks.forEach(e=>{e.c(t)||(Xr.tasks.delete(e),e.f())}),Xr.tasks.size!==0&&Xr.tick(hh)}function _h(t){let e;return Xr.tasks.size===0&&Xr.tick(hh),{promise:new Promise(i=>{Xr.tasks.add(e={c:t,f:i})}),abort(){Xr.tasks.delete(e)}}}function fu(t,e){yd(()=>{t.dispatchEvent(new CustomEvent(e))})}function t1(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 bh(t){let e={},i=t.split(";");for(let o of i){let[r,a]=o.split(":");if(!r||a===void 0)break;let l=t1(r.trim());e[l]=a.trim()}return e}var i1=t=>t;function Zr(t,e,i,o){var R;var r=(t&1)!==0,a=(t&2)!==0,l=r&&a,d=(t&4)!==0,s=l?"both":r?"in":"out",u,p=e.inert,m=e.style.overflow,f,b;function y(){var O;var E=Rt,P=$t;Qi(null),mo(null);try{return u!=null?u:u=i()(e,(O=o==null?void 0:o())!=null?O:{},{direction:s})}finally{Qi(E),mo(P)}}var $={is_global:d,in(){var E;if(e.inert=p,!r){b==null||b.abort(),(E=b==null?void 0:b.reset)==null||E.call(b);return}a||f==null||f.abort(),fu(e,"introstart"),f=uf(e,y(),b,1,()=>{fu(e,"introend"),f==null||f.abort(),f=u=void 0,e.style.overflow=m})},out(E){if(!a){E==null||E(),u=void 0;return}e.inert=!0,fu(e,"outrostart"),b=uf(e,y(),f,0,()=>{fu(e,"outroend"),E==null||E()})},stop:()=>{f==null||f.abort(),b==null||b.abort()}},S=$t;if(((R=S.transitions)!=null?R:S.transitions=[]).push($),r&&xd){var C=d;if(!C){for(var I=S.parent;I&&(I.f&65536)!==0;)for(;(I=I.parent)&&(I.f&16)===0;);C=!I||(I.f&32768)!==0}C&&Eo(()=>{Pt(()=>$.in())})}}function uf(t,e,i,o,r){var a=o===1;if(Ys(e)){var l,d=!1;return En(()=>{if(!d){var S=e({direction:a?"in":"out"});l=uf(t,S,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:p,easing:m=i1}=e;var f=[];if(a&&i===void 0&&(p&&p(0,1),u)){var b=bh(u(0,1));f.push(b,b)}var y=()=>1-o,$=t.animate(f,{duration:s,fill:"forwards"});return $.onfinish=()=>{var z;$.cancel();var S=(z=i==null?void 0:i.t())!=null?z:1-o;i==null||i.abort();var C=o-S,I=e.duration*Math.abs(C),R=[];if(I>0){var E=!1;if(u)for(var P=Math.ceil(I/16.666666666666668),O=0;O<=P;O+=1){var D=S+C*m(O/P),U=bh(u(D,1-D));R.push(U),E||(E=U.overflow==="hidden")}E&&(t.style.overflow="hidden"),y=()=>{var G=$.currentTime;return S+C*m(G/I)},p&&_h(()=>{if($.playState!=="running")return!1;var G=y();return p(G,1-G),!0})}$=t.animate(R,{duration:I,fill:"forwards"}),$.onfinish=()=>{y=()=>o,p==null||p(o,1-o),r()}},{abort:()=>{$&&($.cancel(),$.effect=null,$.onfinish=ht)},deactivate:()=>{r=ht},reset:()=>{o===0&&(p==null||p(1,0))},t:()=>y()}}function pf(t,e,i){var o=qo(t,e);o&&o.set&&(t[e]=i,Io(()=>{t[e]=null}))}var ea,Ml,Id,vu,$h,gu=class gu{constructor(e){qs(this,vu);qs(this,ea,new WeakMap);qs(this,Ml);qs(this,Id);pl(this,Id,e)}observe(e,i){var o=Ni(this,ea).get(e)||new Set;return o.add(i),Ni(this,ea).set(e,o),Qv(this,vu,$h).call(this).observe(e,Ni(this,Id)),()=>{var r=Ni(this,ea).get(e);r.delete(i),r.size===0&&(Ni(this,ea).delete(e),Ni(this,Ml).unobserve(e))}}};ea=new WeakMap,Ml=new WeakMap,Id=new WeakMap,vu=new WeakSet,$h=function(){var e;return(e=Ni(this,Ml))!=null?e:pl(this,Ml,new ResizeObserver(i=>{for(var o of i){gu.entries.set(o.target,o);for(var r of Ni(this,ea).get(o.target)||[])r(o)}}))},sr(gu,"entries",new WeakMap);var ff=gu;var o1=new ff({box:"border-box"});function An(t,e,i){var o=o1.observe(t,()=>i(t[e]));Eo(()=>(Pt(()=>i(t[e])),o))}function yh(t,e){return t===e||(t==null?void 0:t[Qo])===e}function ot(t={},e,i,o){return Eo(()=>{var r,a;return Xo(()=>{r=a,a=(o==null?void 0:o())||[],Pt(()=>{t!==i(...a)&&(e(t,...a),r&&yh(i(...r),t)&&e(null,...r))})}),()=>{En(()=>{a&&yh(i(...a),t)&&e(null,...a)})}}),t}function xo(t=!1){let e=Ht,i=e.l.u;if(!i)return;let o=()=>du(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&&vd(()=>{xh(e,o),js(i.b)}),De(()=>{let r=Pt(()=>i.m.map(tg));return()=>{for(let a of r)typeof a=="function"&&a()}}),i.a.length&&De(()=>{xh(e,o),js(i.a)})}function xh(t,e){if(t.l.s)for(let i of t.l.s)n(i);e()}function Ed(t,e,i){if(t==null)return e(void 0),i&&i(void 0),ht;let o=Pt(()=>t.subscribe(e,i));return o.unsubscribe?()=>o.unsubscribe():o}var Vl=[];function Lr(t,e){return{subscribe:ae(t,e).subscribe}}function ae(t,e=ht){let i=null,o=new Set;function r(d){if(vl(t,d)&&(t=d,i)){let s=!Vl.length;for(let u of o)u[1](),Vl.push(u,t);if(s){for(let u=0;u<Vl.length;u+=2)Vl[u][0](Vl[u+1]);Vl.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 _i(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 Lr(i,(l,d)=>{let s=!1,u=[],p=0,m=ht,f=()=>{if(p)return;m();let y=e(o?u[0]:u,l,d);a?l(y):m=typeof y=="function"?y:ht},b=r.map((y,$)=>Ed(y,S=>{u[$]=S,p&=~(1<<$),s&&f()},()=>{p|=1<<$}));return s=!0,f(),function(){js(b),m(),s=!1}})}function ge(t){let e;return Ed(t,i=>e=i)(),e}var hu=!1,mf=Symbol();function x(t,e,i){var a;let o=(a=i[e])!=null?a:i[e]={store:null,source:fs(void 0),unsubscribe:ht};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=ht;else{var r=!0;o.unsubscribe=Ed(t,l=>{r?o.source.v=l:N(o.source,l)}),r=!1}return t&&mf in i?ge(t):n(o.source)}function Re(){let t={};function e(){Io(()=>{for(var i in t)t[i].unsubscribe();fo(t,mf,{enumerable:!1,value:!0})})}return[t,e]}function vf(t){var e=hu;try{return hu=!1,[t(),hu]}finally{hu=e}}var c1={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return ke&&pg(`${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},c1)}var u1={get(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(Ys(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];Ys(r)&&(r=r());let a=qo(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(Ys(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o){let r=qo(o,e);return r&&!r.configurable&&(r.configurable=!0),r}}},has(t,e){if(e===Qo||e===fl)return!1;for(let i of t.props)if(Ys(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){let e=[];for(let i of t.props)if(Ys(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 As(...t){return new Proxy({props:t},u1)}function wh(t){var e,i;return(i=(e=t.ctx)==null?void 0:e.d)!=null?i:!1}function g(t,e,i,o){var D,U;var r=(i&1)!==0,a=!cs||(i&2)!==0,l=(i&8)!==0,d=(i&16)!==0,s=!1,u;l?[u,s]=vf(()=>t[e]):u=t[e];var p=Qo in t||fl in t,m=l&&((U=(D=qo(t,e))==null?void 0:D.set)!=null?U:p&&e in t&&(z=>t[e]=z))||void 0,f=o,b=!0,y=!1,$=()=>(y=!0,b&&(b=!1,d?f=Pt(o):f=o),f);u===void 0&&o!==void 0&&(m&&a&&ug(e),u=$(),m&&m(u));var S;if(a)S=()=>{var z=t[e];return z===void 0?$():(b=!0,y=!1,z)};else{var C=(r?Qr:Tn)(()=>t[e]);C.f|=131072,S=()=>{var z=n(C);return z!==void 0&&(f=void 0),z===void 0?f:z}}if((i&4)===0&&a)return S;if(m){var I=t.$$legacy;return function(z,G){return arguments.length>0?((!a||!G||I||s)&&m(G?S():z),z):S()}}var R=!1,E=!1,P=fs(u),O=Qr(()=>{var z=S(),G=n(P);return R?(R=!1,E=!0,G):(E=!1,P.v=z)});return l&&n(O),r||(O.equals=gl),function(z,G){if(au!==null&&(R=E,S(),n(P)),arguments.length>0){let le=G?n(O):a&&l?ci(z):z;if(!O.equals(le)){if(R=!0,N(P,le),y&&f!==void 0&&(f=le),wh(O))return z;Pt(()=>n(O))}return z}return wh(O)?O.v:n(O)}}var p1;typeof HTMLElement=="function"&&(p1=class extends HTMLElement{constructor(e,i,o){super();sr(this,"$$ctor");sr(this,"$$s");sr(this,"$$c");sr(this,"$$cn",!1);sr(this,"$$d",{});sr(this,"$$r",!1);sr(this,"$$p_d",{});sr(this,"$$l",{});sr(this,"$$l_u",new Map);sr(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))}}connectedCallback(){return gt(this,null,function*(){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(yield Promise.resolve(),!this.$$cn||this.$$c)return;let o={},r=f1(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=th({component:this.$$ctor,target:this.shadowRoot||this,props:Kt(Ae({},this.$$d),{$$slots:o,$$host:this})}),this.$$me=ou(()=>{Xo(()=>{var a;this.$$r=!0;for(let l of Cp(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 Cp(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 f1(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var Sh="5";var Th,Ch,Ih;typeof window!="undefined"&&((Ih=(Ch=(Th=window.__svelte)!=null?Th:window.__svelte={}).v)!=null?Ih:Ch.v=new Set).add(Sh);import{areValidLiveRecordSources as CC,clientChecker as Tv}from"@vkontakte/videoplayer-core/es2015";import"@vkontakte/videoplayer-core/es2015";import{noop as Nb,safeStorage as IC,throttleFn as EC}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as PC}from"@vkontakte/videoplayer-statistics/es2015";import{InterfaceLanguage as m1,fillWithDefault as v1,VideoQuality as Eh}from"@vkontakte/videoplayer-shared/es2015";var g1={isMobile:void 0,disableInvisibleComponentsTimeout:500,debugLog:!1,devNullLog:!1,defaultLanguage:m1.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:Eh.Q_480P,highQualityLimit:Eh.Q_720P,episodeMinWidthPc:8,hideThumbTimerAfterTouch:!0,preventPauseOnVideoClick:!1,returnFocusOnControlsHide:!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},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},Ph=t=>v1(t,g1),Ah=t=>bl("ui-config",t),Mt=()=>_l("ui-config");var Pd="vk_player_debug_panel_opened";var kh="videoplayer",Lh="videoplayer";var vs={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},Mh=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),Vh=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Rh=new Set(["ShiftRight","ShiftLeft"]);var Nh=["TIMELINE"],Ad=[...Nh,"GRAPH_BUTTON"],hf=[...Nh,"PLAY_BUTTON"],kd=[...Ad,"PLAY_BUTTON"];var gs=(a=>(a.XS="xs",a.S="s",a.M="m",a.L="l",a.XL="xl",a))(gs||{}),Ma={xs:0,s:1,m:2,l:3,xl:4};import{assertNonNullable as Oh,VERSION as h1}from"@vkontakte/videoplayer-shared/es2015";import{VERSION as _1}from"@vkontakte/videoplayer-core/es2015";import{VERSION as b1}from"@vkontakte/videoplayer-statistics/es2015";var _u="prod",Rl="1.1.77";var Va=(t,e,i)=>{let o=document.createElement("a");o.href=t,o.download=`${e}.${i}`,o.style.display="none",o.click()};var Dh=Symbol("storeContext"),Bh=Symbol("microStoresContext"),Fh=(t,e)=>{bl(Dh,t),bl(Bh,e),_u==="dev"&&(window.app={store:t,microStores:e})},ve=()=>{let t=_l(Dh);return Oh(t,"Store context is empty!"),t},wo=()=>{let t=_l(Bh);return Oh(t,"MicroStores context is empty!"),t},ui=(t,e)=>$u(t,t.getValue(),e),$u=(t,e,i)=>Lr(e,o=>{let r=t.subscribe(a=>{o(a),i==null||i(a)});return()=>r.unsubscribe()}),Hh=(t,e,i,o)=>{var D,U,z,G,le,Y,re,X,we;let r=t.info,{width:a,height:l}=ge(i.ui.playerSize),d=(U=(D=r.throughputEstimation$.getValue())==null?void 0:D.toFixed(0))!=null?U:0,s=(G=(z=r.rttEstimation$.getValue())==null?void 0:z.toFixed(0))!=null?G:0,u=r.isAutoQualityEnabled$.getValue()?"auto":"manual",p=`${Rl} (core: ${_1}, stat: ${b1}, shared: ${h1})`,m=ge(i.state.errorLog$),f=m.length?`
45
- `+m.map((ce,ne)=>{var Ne;let he=`${ne}) Type: ${ce.id}
46
- `,xe=`Message: ${ce.message} (${ce.thrown})
47
- `,Z=`Trace: ${(Ne=ce.thrown)==null?void 0:Ne.stack}
48
- `;return he+xe+Z}).join(`
49
- `):void 0,b=i.state.isAudioDisabled?"disabled":ge(i.state.isAudioAvailable$)?void 0:"unavailable",y=t.info.currentVideoStream$.getValue(),$=t.info.currentAudioStream$.getValue(),S=[];y&&S.push(`Video: ${(le=y==null?void 0:y.codec)!=null?le:""}`+(y!=null&&y.hdr?" (HDR)":"")),$&&S.push(`Audio: ${(Y=$==null?void 0:$.codec)!=null?Y:""}`+($!=null&&$.language?` (${$.language})`:""));let C=r.currentQuality$.getValue(),I="";if(C){let ce=r.availableQualitiesFps$.getValue()[C];I=ce?`${ce}fps`:""}let R=r.httpConnectionType$.getValue(),E=(X=(re=r.currentBuffer$.getValue())==null?void 0:re.end)!=null?X:0,P=Math.max(E-ge(i.state.positionExact$),0),O={Version:p,Browser:navigator.userAgent,Config:t.experimental.tuningConfigName$.getValue().join(", "),"United video id":String(i.videoId),TraceId:o,VSID:ge(i.vsid),"Content host":r.hostname$.getValue(),"Connection type":R?R+(r.httpConnectionReused$.getValue()?" (reused)":""):"",Throughput:`${d}Kbps @ ${s}ms RTT`,Format:r.currentFormat$.getValue(),"Available Formats":e!=null&&e.sources?Object.keys(e.sources).join(", "):"",Streams:S.join(", "),Quality:`${u} ${C!=null?C:""} ${I}`,"Available qualities":r.availableQualities$.getValue().join(", "),Audio:b,Position:`${ge(i.state.positionExact$)}s`,Buffer:`${P}s`,State:`${ge(i.playerPhase)} ${(we=r.playbackState$.getValue())!=null?we:""}`,"Player size":`${a}x${l}`,URL:window.location.href,Errors:f};return Object.entries(O).filter(([ce,ne])=>ne!==void 0).map(([ce,ne])=>`${ce}: ${ne}`).join(`
50
- `)},Uh=(t,e,i)=>{var D,U,z,G;let o=t.info,{width:r,height:a}=ge(i.ui.playerSize),l={version:Rl,viewport:`${r}x${a}`,volume:Math.round(ge(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 p=o.currentBuffer$.getValue(),m=o.isLive$.getValue(),f=o.liveBufferTime$.getValue();p&&(m&&f?l.buffer=p.end-f:l.buffer=Math.max(p.end-ge(i.state.positionExact$),0)),l.position=ge(i.state.positionExact$);let b=o.throughputEstimation$.getValue();b&&(l.speed=b);let y=o.videoBitrate$.getValue();y&&(l.bitrate=y);let $=o.liveLatency$.getValue();$&&(l.liveLatency=$);let S=o.currentVideoSegmentLength$.getValue();S&&(l.currentVideoSegmentLength=S);let C=o.currentAudioSegmentLength$.getValue();C&&(l.currentAudioSegmentLength=C);let I=ge(i.vsid);typeof I=="string"&&(l.vsid=I);let R=(D=t.info.currentVideoStream$.getValue())==null?void 0:D.codec;R&&(l.videoCodec=R);let E=(U=t.info.currentAudioStream$.getValue())==null?void 0:U.codec;E&&(l.audioCodec=E),((z=t.info.currentVideoStream$.getValue())==null?void 0:z.hdr)&&(l.hdr=!0);let O=(G=t.info.currentAudioStream$.getValue())==null?void 0:G.language;return O&&(l.audioLanguage=O),l},zh=(t,e)=>Va(t,e,"mp4"),Wh=t=>!t.type,Kh=t=>!!t.type,qh=()=>{let e=[],i=0;return{add:(o,r)=>{e[i]=[o,r],i=(i+1)%10},find:o=>e.find(([r])=>r===o)}},bu=class{constructor(){this.destroyController=new AbortController;this.pendingDownloads=new Set}download(e){return gt(this,null,function*(){if(this.pendingDownloads.has(e))return null;this.pendingDownloads.add(e);try{let i=yield fetch(e,{signal:this.destroyController.signal});if(i.ok)return yield 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 Ei}from"@vkontakte/videoplayer-shared/es2015";import"@vkontakte/videoplayer-core/es2015";var $1="vk_player_",Qh="vk_player_prefer_traffic_saving_enabled",Gh="vk_player_preferred_volume",Yh="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",jh="vk_player_preferred_stream_language",Xh="vk_player_preferred_rate",Zh="vk_player_preferred_autoplay_next",$f="vk_player_preferred_subtitles_language",Jh="vk_player_user_video_prefs",e_=`${$1}preview_track_close_tooltip`,t_=t=>t>1?1:t<0?0:t,wf=t=>Ei.set(Gh,t_(t).toString(10)),yu=()=>{let t=Ei.get(Gh);return yf(t)?void 0:t_(parseFloat(t))},Sf=(t,e)=>Ei.set(xf,JSON.stringify({videoId:t,value:e})),xu=()=>Ei.remove(xf),Tf=t=>{let e=Ei.get(xf);if(yf(e))return;let{videoId:i,value:o}=JSON.parse(e);if(t!==i){xu();return}return o},i_=(t,e)=>{e?Ei.set(t,"true"):Ei.remove(t)},Cf=t=>Ei.get(t)==="true",If=t=>i_(Yh,t),o_=()=>Cf(Yh),Ld=t=>i_(Qh,t),Ef=()=>Cf(Qh),n_=()=>Ei.get(jh),Pf=t=>Ei.set(jh,t),Af=()=>Ei.get($f),kf=t=>{t?Ei.set($f,t):Ei.remove($f)},r_=t=>Ei.set(Xh,JSON.stringify({rate:t})),s_=()=>{let t=Ei.get(Xh);if(yf(t))return;let{rate:e}=JSON.parse(t);return e},a_=t=>{Ei.set(Zh,String(t))},l_=()=>Cf(Zh),y1=()=>{let t=p=>{Ei.set(_f,JSON.stringify(p))},e=()=>{try{let p=Ei.get(_f);return p?JSON.parse(p):null}catch(p){return null}},i=()=>{try{let p=Ei.get(bf);return p?JSON.parse(p):null}catch(p){return null}},o=p=>{Ei.set(bf,JSON.stringify(p))},r=p=>{u(p);let m=p?i():null;if(m&&(m==null?void 0:m.videoId)===p)return Kt(Ae({},m),{appliesTo:"to-video"});m&&a();let f=e();return f?Kt(Ae({},f),{appliesTo:"as-default"}):(t({type:"auto_quality"}),{type:"auto_quality",appliesTo:"as-default"})},a=()=>{Ei.remove(bf)},l=()=>{Ei.remove(_f)},d=(p,m="as-default")=>{p.type==="exact_quality"||m==="to-video"?o(p):t(p)},s=p=>{let m=r(p);if(m){switch(m.type){case"traffic_saving":Ld(!0);break;case"exact_quality":Sf(p,m.quality)}a(),l()}},u=p=>{let m=Tf(p);if(m){o({type:"exact_quality",videoId:p,quality:m});return}Ef()&&t({type:"traffic_saving",videoId:p}),Ld(!1),xu()};return{getPreferredQualitySettings:r,migrateSettingsToLegacyWay:s,savePreferredQualitySettings:d,savePreferredDefaultQualitySettings:t,removePreferredQualitySettingsByVideo:a,getPreferredDefaultQualitySettings:e,getPreferredSubtitlesLanguage:Af,savePreferredSubtitlesLanguage:kf}},{getPreferredQualitySettings:d_,migrateSettingsToLegacyWay:c_,savePreferredQualitySettings:wu,savePreferredDefaultQualitySettings:K8,removePreferredQualitySettingsByVideo:q8,getPreferredDefaultQualitySettings:Su}=y1(),x1=3,w1=3,u_=()=>{let t=Ei.get(Jh);if(t)try{return JSON.parse(t)}catch(e){return null}return null},Tu=(t,e)=>{var r,a;let i=u_();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=u_())!=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=S1(o);Ei.set(Jh,JSON.stringify(a))};function S1(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(w1),e.reduce((o,[r])=>(o[r]=T1(t[r]),o),{})}function T1(t){let e=Object.entries(t);return e.sort(([,i],[,o])=>i.updatedTs>o.updatedTs?-1:1),e.splice(x1),Object.fromEntries(e)}function p_(){Ei.set(e_,JSON.stringify(!0))}function f_(){let t=Ei.get(e_);try{return t?JSON.parse(t):!1}catch(e){return!1}}import{PlaybackState as Mb}from"@vkontakte/videoplayer-core/es2015";hg();var ta="var(--btn-color, #fff)";var C1=Ee('<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),I1=Ee('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill-rule="evenodd" clip-rule="evenodd"><!></svg>');function Ze(t,e){var p;F(e,!0);let i=g(e,"width",19,()=>"24"),o=g(e,"height",19,()=>"24"),r=g(e,"fill",3,ta),a=(p=e.viewBox)!=null?p:`0 0 ${i()} ${o()}`;var l=I1(),d=T(l);{var s=m=>{var f=C1(),b=de(f),y=T(b);ri(y,()=>e.children),w(b),vi(),_(m,f)},u=m=>{var f=Le(),b=de(f);ri(b,()=>e.children),_(m,f)};V(d,m=>{e.shadow?m(s):m(u,!1)})}w(l),B(()=>{Ue(l,"aria-label",e.ariaLabel),Ue(l,"aria-hidden",!e.ariaLabel),Ue(l,"width",i()),Ue(l,"height",o()),Ue(l,"viewBox",a),Ue(l,"fill",r()),Ge(l,e.style),Ue(l,"data-testid",e.testId)}),_(t,l),H()}import{isNullable as g_,InterfaceLanguage as h_}from"@vkontakte/videoplayer-shared/es2015";var E1={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 Ca=!1,Sl=null,Ia=!1,xs=!1;function Bp(t){xs=t}var _d=[],bd=[],Ot=null,_r=!1;function qi(t){Ot=t}var _t=null;function go(t){_t=t}var Go=null;function jc(t){Ot!==null&&Ot.f&2097152&&(Go===null?Go=[Ot,[t]]:Go[1].push(t))}var In=null,br=0,hr=null;function xg(t){hr=t}var Hg=1,ru=0,ws=!1,su=null;function ad(){return++Hg}function xa(t){var p,f;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&&!ws,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)))&&((f=a.reactions)!=null?f: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],xa(a)&&Dp(a),a.wv>t.wv)return!0}(!o||_t!==null&&!ws)&&Sn(t,1024)}return!1}function Ug(t,e,i=!0){var o=t.reactions;if(o!==null)for(var r=0;r<o.length;r++){var a=o[r];Go!=null&&Go[1].includes(t)&&Go[0]===Ot||((a.f&2)!==0?Ug(a,e,!1):e===a&&(i?Sn(a,2048):(a.f&1024)!==0&&Sn(a,4096),dd(a)))}}function Yc(t){var $,y;var e=In,i=br,o=hr,r=Ot,a=ws,l=Go,d=Wt,s=_r,u=t.f;In=null,br=0,hr=null,ws=(u&256)!==0&&(_r||!Ia||Ot===null),Ot=(u&96)===0?t:null,Go=null,nd(t.ctx),_r=!1,ru++,t.f|=2097152;try{var m=(0,t.fn)(),p=t.deps;if(In!==null){var f;if(vd(t,br),p!==null&&br>0)for(p.length=br+In.length,f=0;f<In.length;f++)p[br+f]=In[f];else t.deps=p=In;if(!ws||(u&2)!==0&&t.reactions!==null)for(f=br;f<p.length;f++)((y=($=p[f]).reactions)!=null?y:$.reactions=[]).push(t)}else p!==null&&br<p.length&&(vd(t,br),p.length=br);if(cs()&&hr!==null&&!_r&&p!==null&&(t.f&6146)===0)for(f=0;f<hr.length;f++)Ug(hr[f],t);return r!==null&&r!==t&&(ru++,hr!==null&&(o===null?o=hr:o.push(...hr))),m}catch(_){Dg(_)}finally{In=e,br=i,hr=o,Ot=r,ws=a,Go=l,nd(d),_r=s,t.f^=2097152}}function _$(t,e){let i=e.reactions;if(i!==null){var o=tg.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&&(In===null||!In.includes(e))&&(Sn(e,4096),(e.f&768)===0&&(e.f^=512),Gc(e),vd(e,0))}function vd(t,e){var i=t.deps;if(i!==null)for(var o=e;o<i.length;o++)_$(t,i[o])}function yl(t){var e=t.f;if((e&16384)===0){Sn(t,1024);var i=_t,o=Ia;if(_t=t,Ia=!0,Ee){var r=vr;rd(t.component_function)}try{(e&16)!==0?Mg(t):zp(t),Up(t);var a=Yc(t);if(t.teardown=typeof a=="function"?a:null,t.wv=Hg,Ee&&ds&&(t.f&2048)!==0&&t.deps!==null)for(var l of t.deps)l.set_during_effect&&(l.wv=ad(),l.set_during_effect=!1);Ee&&bd.push(t)}finally{Ia=o,_t=i,Ee&&rd(r)}}}function Bg(){console.error("Last ten effects were: ",bd.slice(-10).map(t=>t.fn)),bd=[]}function b$(){try{cg()}catch(t){if(Ee&&vo(t,"stack",{value:""}),Sl!==null)if(Ee)try{hd(t,Sl)}catch(e){throw Bg(),e}else hd(t,Sl);else throw Ee&&Bg(),t}}function Yp(){var t=Ia;try{var e=0;for(Ia=!0;_d.length>0;){e++>1e3&&b$();var i=_d,o=i.length;_d=[];for(var r=0;r<o;r++){var a=y$(i[r]);$$(a)}bl.clear()}}finally{Ca=!1,Ia=t,Sl=null,Ee&&(bd=[])}}function $$(t){var e=t.length;if(e!==0)for(var i=0;i<e;i++){var o=t[i];(o.f&24576)===0&&xa(o)&&(yl(o),o.deps===null&&o.first===null&&o.nodes_start===null&&(o.teardown===null?Kp(o):o.fn=null))}}function dd(t){Ca||(Ca=!0,queueMicrotask(Yp));for(var e=Sl=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 y$(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:xa(i)&&yl(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 Tl(t){var e;for(t&&(Ca=!0,Yp(),Ca=!0,e=t());;){if(Ng(),_d.length===0)return Ca=!1,Sl=null,Ee&&(bd=[]),e;Ca=!0,Yp()}}function _o(){return mt(this,null,function*(){yield Promise.resolve(),Tl()})}function n(t){var e=t.f,i=(e&2)!==0;if(su!==null&&su.add(t),Ot!==null&&!_r){if(!(Go!=null&&Go[1].includes(t))||Go[0]!==Ot){var o=Ot.deps;t.rv<ru&&(t.rv=ru,In===null&&o!==null&&o[br]===t?br++:In===null?In=[t]:(!ws||!In.includes(t))&&In.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,xa(r)&&Dp(r)),Ee&&ds&&!_r&&od!==null&&Ot!==null&&od.reaction===Ot)if(t.trace)t.trace();else{var l=ys("TracedAt");if(l){var d=od.entries.get(t);d===void 0&&(d={traces:[]},od.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 xs&&bl.has(t)?bl.get(t):t.v}function It(t){var e=_r;try{return _r=!0,t()}finally{_r=e}}var x$=-7169;function Sn(t,e){t.f=t.f&x$|e}function lu(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(qo in t)au(t);else if(!Array.isArray(t))for(let e in t){let i=t[e];typeof i=="object"&&i&&qo 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=_a(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 jp(t,e){if(e){let i=document.body;t.autofocus=!0,Cn(()=>{document.activeElement===i&&t.focus()})}}function $d(t){var e=Ot,i=_t;qi(null),go(null);try{return t()}finally{qi(e),go(i)}}var Xp=new Set,du=new Set;function Ea(t){if(!Je)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||Cl.call(e,a),!a.cancelBubble)return $d(()=>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 gt(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)&&Vo(()=>{e.removeEventListener(t,l,a)})}function tt(t){for(var e=0;e<t.length;e++)Xp.add(t[e]);for(var i of du)i(t)}function Cl(t){var I;var e=this,i=e.ownerDocument,o=t.type,r=((I=t.composedPath)==null?void 0:I.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){vo(t,"currentTarget",{configurable:!0,get(){return a||i}});var m=Ot,p=_t;qi(null),go(null);try{for(var f,$=[];a!==null;){var y=a.assignedSlot||a.parentNode||a.host||null;try{var _=a["__"+o];if(_!=null&&(!a.disabled||t.target===a))if(fr(_)){var[S,...C]=_;S.apply(a,[t,...C])}else _.call(a,t)}catch(N){f?$.push(N):f=N}if(t.cancelBubble||y===e||y===null)break;a=y}if(f){for(let N of $)queueMicrotask(()=>{throw N});throw f}}finally{t.__root=e,delete t.currentTarget,qi(m),go(p)}}}var S$;function zg(){S$=void 0}function Il(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function No(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(Je)return No(bt,null),bt;r===void 0&&(r=Il(a?t:"<!>"+t),i||(r=Ei(r)));var l=o||cd?document.importNode(r,!0):r.cloneNode(!0);if(i){var d=Ei(l),s=l.lastChild;No(d,s)}else No(l,l);return l}}function I$(t,e,i="svg"){var o=!t.startsWith("<!>"),r=(e&1)!==0,a=`<${i}>${o?t:"<!>"+t}</${i}>`,l;return()=>{if(Je)return No(bt,null),bt;if(!l){var d=Il(a),s=Ei(d);if(r)for(l=document.createDocumentFragment();Ei(s);)l.appendChild(Ei(s));else l=Ei(s)}var u=l.cloneNode(!0);if(r){var m=Ei(u),p=u.lastChild;No(m,p)}else No(u,u);return u}}function Ce(t,e){return I$(t,e,"svg")}function ps(t=""){if(!Je){var e=Tn(t+"");return No(e,e),e}var i=bt;return i.nodeType!==pl&&(i.before(i=Tn()),Ci(i)),No(i,i),i}function Le(){if(Je)return No(bt,null),bt;var t=document.createDocumentFragment(),e=document.createComment(""),i=Tn();return t.append(e,i),No(e,i),t}function b(t,e){if(Je){_t.nodes_end=bt,Gi();return}t!==null&&t.before(e)}var E$=/\r/g;function Kg(t){t=t.replace(E$,"");let e=5381,i=t.length;for(;i--;)e=(e<<5)-e^t.charCodeAt(i);return(e>>>0).toString(36)}function qg(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}var P$=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Qg(t){return P$.includes(t)}var A$=["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 k$={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 Gg(t){var e;return t=t.toLowerCase(),(e=k$[t])!=null?e:t}var SA=[...A$,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var L$=["touchstart","touchmove"];function Yg(t){return L$.includes(t)}var M$=["$state","$state.raw","$derived","$derived.by"],TA=[...M$,"$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$inspect","$inspect().with","$inspect.trace","$host"];var V$=["textarea","script","style","title"];function jg(t){return V$.includes(t)}function cu(t){return t==null?void 0:t.replace(/\//g,"/​")}var yd=!0;function uu(t){yd=t}function me(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 Yr(t,e){return Xg(t,e)}function ef(t,e){var l;Jc(),e.intro=(l=e.intro)!=null?l:!1;let i=e.target,o=Je,r=bt;try{for(var a=Ei(i);a&&(a.nodeType!==mr||a.data!==qs);)a=Yo(a);if(!a)throw as;ho(!0),Ci(a),Gi();let d=Xg(t,Gt(Ie({},e),{anchor:a}));if(bt===null||bt.nodeType!==mr||bt.data!==ha)throw js(),as;return ho(!1),d}catch(d){if(d===as)return e.recover===!1&&ug(),Jc(),ud(i),ho(!1),Yr(t,e);throw d}finally{ho(o),Ci(r),zg()}}var El=new Map;function Xg(t,{target:e,anchor:i,props:o={},events:r,context:a,intro:l=!0}){Jc();var d=new Set,s=p=>{for(var f=0;f<p.length;f++){var $=p[f];if(!d.has($)){d.add($);var y=Yg($);e.addEventListener($,Cl,{passive:y});var _=El.get($);_===void 0?(document.addEventListener($,Cl,{passive:y}),El.set($,1)):El.set($,_+1)}}};s(id(Xp)),du.add(s);var u=void 0,m=Lg(()=>{var p=i!=null?i:e.appendChild(Tn());return Oi(()=>{if(a){B({});var f=Wt;f.c=a}r&&(o.$$events=r),Je&&No(p,null),yd=l,u=t(p,o)||{},yd=!0,Je&&(_t.nodes_end=bt),a&&F()}),()=>{var y;for(var f of d){e.removeEventListener(f,Cl);var $=El.get(f);--$===0?(document.removeEventListener(f,Cl),El.delete(f)):El.set(f,$)}du.delete(s),p!==i&&((y=p.parentNode)==null||y.removeChild(p))}});return Jp.set(u,m),u}var Jp=new WeakMap;function Pa(t,e){let i=Jp.get(t);return i?(Jp.delete(t),i(e)):(Ee&&Tg(),Promise.resolve())}function ri(t,e,...i){var o=t,r=vt,a;Yi(()=>{r!==(r=e())&&(a&&(Qi(a),a=null),Ee&&r==null&&pg(),a=Oi(()=>r(o,...i)))},65536),Je&&(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;vg(e)},set:o=>{i=o}})}};D$=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var D$;function Mt(t){Wt===null&&vl("onMount"),ls&&Wt.l!==null?O$(Wt).m.push(t):Oe(()=>{let e=It(t);if(typeof e=="function")return e})}function pn(t){Wt===null&&vl("onDestroy"),Mt(()=>()=>It(t))}function O$(t){var i;var e=t.l;return(i=e.u)!=null?i:e.u={a:[],b:[],m:[]}}var Zg=new Map;function Jg(t,e){var i=Zg.get(t);i||(i=new Set,Zg.set(t,i)),i.add(e)}function R(t,e,[i,o]=[0,0]){Je&&i===0&&Gi();var r=t,a=null,l=null,d=to,s=i>0?65536:0,u=!1;let m=(f,$=!0)=>{u=!0,p($,f)},p=(f,$)=>{if(d===(d=f))return;let y=!1;if(Je&&o!==-1){if(i===0){let S=Zc(r);S===qs?o=0:S===Qs?o=1/0:(o=parseInt(S.substring(1)),o!==o&&(o=d?1/0:-1))}let _=o>i;!!d===_&&(r=wa(),Ci(r),ho(!1),y=!0,o=-1)}d?(a?Ts(a):$&&(a=Oi(()=>$(r))),l&&Yn(l,()=>{l=null})):(l?Ts(l):$&&(l=Oi(()=>$(r,[i+1,o]))),a&&Yn(a,()=>{a=null})),y&&ho(!0)};Yi(()=>{u=!1,e(m),u||p(null,null)},s),Je&&(r=bt)}function Cs(t,e,i){Je&&Gi();var o=t,r=to,a,l=cs()?rg:fl;Yi(()=>{l(r,r=e())&&(a&&Yn(a),a=Oi(()=>i(o)))}),Je&&(o=bt)}var Zs=null;function nf(t){Zs=t}function xd(t,e){return e}function H$(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;ud(s),s.append(i),o.clear(),Xs(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),Xs(t,m.prev,m.next)),Qi(m.e,!d)}})}function wi(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=Je?Ci(Ei(u)):u.appendChild(Tn())}Je&&Gi();var m=null,p=!1,f=wn(()=>{var $=i();return fr($)?$:$==null?[]:id($)});Yi(()=>{var $=n(f),y=$.length;if(p&&y===0)return;p=y===0;let _=!1;if(Je){var S=Zc(l)===Qs;S!==(y===0)&&(l=wa(),Ci(l),ho(!1),_=!0)}if(Je){for(var C=null,I,N=0;N<y;N++){if(bt.nodeType===mr&&bt.data===ha){l=bt,_=!0,ho(!1);break}var P=$[N],E=o(P,N);I=ih(bt,d,C,null,P,E,N,r,e,i),d.items.set(E,I),C=I}y>0&&Ci(wa())}Je||U$($,d,l,r,e,o,i),a!==null&&(y===0?m?Ts(m):m=Oi(()=>a(l)):m!==null&&Yn(m,()=>{m=null})),_&&ho(!0),n(f)}),Je&&(l=bt)}function U$(t,e,i,o,r,a,l){var Z,we,ue,ne;var d=(r&8)!==0,s=(r&3)!==0,u=t.length,m=e.items,p=e.first,f=p,$,y=null,_,S=[],C=[],I,N,P,E;if(d)for(E=0;E<u;E+=1)I=t[E],N=a(I,E),P=m.get(N),P!==void 0&&((Z=P.a)==null||Z.measure(),(_!=null?_:_=new Set).add(P));for(E=0;E<u;E+=1){if(I=t[E],N=a(I,E),P=m.get(N),P===void 0){var k=f?f.e.nodes_start:i;y=ih(k,e,y,y===null?e.first:y.next,I,N,E,o,r,l),m.set(N,y),S=[],C=[],f=y.next;continue}if(s&&z$(P,I,E,r),(P.e.f&8192)!==0&&(Ts(P.e),d&&((we=P.a)==null||we.unfix(),(_!=null?_:_=new Set).delete(P))),P!==f){if($!==void 0&&$.has(P)){if(S.length<C.length){var Q=C[0],H;y=Q.prev;var z=S[0],Y=S[S.length-1];for(H=0;H<S.length;H+=1)eh(S[H],Q,i);for(H=0;H<C.length;H+=1)$.delete(C[H]);Xs(e,z.prev,Y.next),Xs(e,y,z),Xs(e,Y,Q),f=Q,y=Y,E-=1,S=[],C=[]}else $.delete(P),eh(P,f,i),Xs(e,P.prev,P.next),Xs(e,P,y===null?e.first:y.next),Xs(e,y,P),y=P;continue}for(S=[],C=[];f!==null&&f.k!==N;)(f.e.f&8192)===0&&($!=null?$:$=new Set).add(f),C.push(f),f=f.next;if(f===null)continue;P=f}S.push(P),y=P,f=P.next}if(f!==null||$!==void 0){for(var le=$===void 0?[]:id($);f!==null;)(f.e.f&8192)===0&&le.push(f),f=f.next;var X=le.length;if(X>0){var re=(r&4)!==0&&u===0?i:null;if(d){for(E=0;E<X;E+=1)(ue=le[E].a)==null||ue.measure();for(E=0;E<X;E+=1)(ne=le[E].a)==null||ne.fix()}H$(e,le,re,m)}}d&&Cn(()=>{var _e;if(_!==void 0)for(P of _)(_e=P.a)==null||_e.apply()}),_t.first=e.first&&e.first.e,_t.last=y&&y.e}function z$(t,e,i,o){(o&1)!==0&&$l(t.v,e),(o&2)!==0?$l(t.i,i):t.i=i}function ih(t,e,i,o,r,a,l,d,s,u){var m=Zs,p=(s&1)!==0,f=(s&16)===0,$=p?f?us(r,!1,!1):Ar(r):r,y=(s&2)===0?l:Ar(l);Ee&&p&&($.trace=()=>{var S=typeof y=="number"?l:y.v;u()[S]});var _={i:y,v:$,k:a,a:null,e:null,prev:i,next:o};Zs=_;try{return _.e=Oi(()=>d(t,$,y,u),Je),_.e.prev=i&&i.e,_.e.next=o&&o.e,i===null?e.first=_:(i.next=_,i.e.next=_.e),o!==null&&(o.prev=_,o.e.prev=_.e),_}finally{Zs=m}}function eh(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=Yo(a);r.before(a),a=l}}function Xs(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 W$(t,e,i){var a,l;if(!e||e===Kg(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=vr)!=null&&l[Kn]&&(o=`in ${vr[Kn]}`),Sg(cu(o))}function wd(t,e,i=!1,o=!1,r=!1){var a=t,l="";D(()=>{var $;var d=_t;if(l===(l=($=e())!=null?$:"")){Je&&Gi();return}if(d.nodes_start!==null&&(Wp(d.nodes_start,d.nodes_end),d.nodes_start=d.nodes_end=null),l!==""){if(Je){for(var s=bt.data,u=Gi(),m=u;u!==null&&(u.nodeType!==mr||u.data!=="");)m=u,u=Yo(u);if(u===null)throw js(),as;Ee&&!r&&W$(u.parentNode,s,l),No(bt,m),a=Ci(u);return}var p=l+"";i?p=`<svg>${p}</svg>`:o&&(p=`<math>${p}</math>`);var f=Il(p);if((i||o)&&(f=Ei(f)),No(Ei(f),f.lastChild),i||o)for(;Ei(f);)a.before(Ei(f));else a.before(f)}})}function Di(t,e,i){Je&&Gi();var o=t,r,a;Yi(()=>{r!==(r=e())&&(a&&(Yn(a),a=null),r&&(a=Oi(()=>i(o,r))))},65536),Je&&(o=bt)}function Aa(t,e,i,o,r,a){var y;let l=Je;Je&&Gi();var d=Ee&&a&&((y=Wt)==null?void 0:y.function[Kn]),s,u,m=null;Je&&bt.nodeType===Kc&&(m=bt,Gi());var p=Je?bt:t,f,$=Zs;Yi(()=>{let _=e()||null;var S=r?r():i||_==="svg"?Hc:null;if(_!==s){var C=Zs;nf($),f&&(_===null?Yn(f,()=>{f=null,u=null}):_===u?Ts(f):(Qi(f),uu(!1))),_&&_!==u&&(f=Oi(()=>{if(m=Je?m:S?document.createElementNS(S,_):document.createElement(_),Ee&&a&&(m.__svelte_meta={loc:{file:d,line:a[0],column:a[1]}}),No(m,m),o){Je&&jg(_)&&m.append(document.createComment(""));var I=Je?Ei(m):m.appendChild(Tn());Je&&(I===null?ho(!1):Ci(I)),o(m,I)}_t.nodes_end=m,p.before(m)})),s=_,s&&(u=s),uu(!0),nf(C)}},65536),l&&(ho(!0),Ci(p))}var sf;function oh(t){return sf=t.target,new rf(t)}var Is,kr,rf=class{constructor(e){Ks(this,Is);Ks(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(Gt(Ie({},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===ul?!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 O((m=i.get(s))!=null?m:o(s,u),u),Reflect.set(d,s,u)}});cl(this,kr,(e.hydrate?ef:Yr)(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)&&Tl(),cl(this,Is,r.$$events);for(let d of Object.keys(Ni(this,kr)))d==="$set"||d==="$destroy"||d==="$on"||vo(this,d,{get(){return Ni(this,kr)[d]},set(s){Ni(this,kr)[d]=s},enumerable:!0});Ni(this,kr).$set=d=>{Object.assign(r,d)},Ni(this,kr).$destroy=()=>{Pa(Ni(this,kr))}}$set(e){Ni(this,kr).$set(e)}$on(e,i){Ni(this,Is)[e]=Ni(this,Is)[e]||[];let o=(...r)=>i.call(this,...r);return Ni(this,Is)[e].push(o),()=>{Ni(this,Is)[e]=Ni(this,Is)[e].filter(r=>r!==o)}}$destroy(){Ni(this,kr).$destroy()}};Is=new WeakMap,kr=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=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),Ee&&Jg(e.hash,d)}})}function Es(t,e){var i=void 0,o;Yi(()=>{i!==(i=e())&&(o&&(Qi(o),o=null),i&&(o=Oi(()=>{Ro(()=>i(t))})))})}function nh(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=nh(t[e]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function rh(){for(var t,e,i=0,o="",r=arguments.length;i<r;i++)(t=arguments[i])&&(e=nh(t))&&(o&&(o+=" "),o+=e);return o}function Sd(t){return typeof t=="object"?rh(t):t!=null?t:""}var sh=[...`
44
+ \r\f \v\uFEFF`];function lh(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||sh.includes(o[l-1]))&&(d===o.length||sh.includes(o[d]))?o=(l===0?"":o.substring(0,l))+o.substring(d+1):l=d}}return o===""?null:o}function ah(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 dh(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 _=t.length;for(var p=0;p<_;p++){var f=t[p];if(d?f==="/"&&t[p-1]==="*"&&(d=!1):a?a===f&&(a=!1):f==="/"&&t[p+1]==="*"?d=!0:f==='"'||f==="'"?a=f:f==="("?l++:f===")"&&l--,!d&&a===!1&&l===0){if(f===":"&&m===-1)m=p;else if(f===";"||p===_-1){if(m!==-1){var $=af(t.substring(u,m).trim());if(!s.includes($)){f!==";"&&p++;var y=t.substring(u,p).trim();i+=" "+y+";"}}u=p+1,m=-1}}}}return o&&(i+=ah(o)),r&&(i+=ah(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(Je||l!==i||l===void 0){var d=lh(i,o,a);(!Je||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 Qe(t,e,i,o){var r=t.__style;if(Je||r!==e){var a=dh(e,o);(!Je||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 Td(t,e,i){if(t.multiple){if(e==null)return;if(!fr(e))return Cg();for(var o of t.options)o.selected=e.includes(ch(o));return}for(o of t.options){var r=ch(o);if(Mp(r,e)){o.selected=!0;return}}(!i||e!==void 0)&&(t.selectedIndex=-1)}function df(t){var e=new MutationObserver(()=>{Td(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Vo(()=>{e.disconnect()})}function ch(t){return"__value"in t?t.__value:t.value}var Pl=Symbol("class"),Al=Symbol("style"),fh=Symbol("is custom element"),mh=Symbol("is html");function vh(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Ve(t,e,i,o){var r=hh(t);if(Je&&(r[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){o||Z$(t,e,i!=null?i:"");return}r[e]!==(r[e]=i)&&(e==="loading"&&(t[ng]=i),i==null?t.removeAttribute(e):typeof i!="string"&&_h(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function gh(t,e,i,o,r=!1){var P;var a=hh(t),l=a[fh],d=!a[mh];let s=Je&&l;s&&ho(!1);var u=e||{},m=t.tagName==="OPTION";for(var p in e)p in i||(i[p]=null);i.class?i.class=Sd(i.class):(o||i[Pl])&&(i.class=null),i[Al]&&((P=i.style)!=null||(i.style=null));var f=_h(t);for(let E in i){let k=i[E];if(m&&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[Pl],i[Pl]),u[E]=k,u[Pl]=i[Pl];continue}if(E==="style"){Qe(t,k,e==null?void 0:e[Al],i[Al]),u[E]=k,u[Al]=i[Al];continue}var y=u[E];if(!(k===y&&!(k===void 0&&t.hasAttribute(E)))){u[E]=k;var _=E[0]+E[1];if(_!=="$$")if(_==="on"){let Q={},H="$$"+E,z=E.slice(2);var S=Qg(z);if(qg(z)&&(z=z.slice(0,-7),Q.capture=!0),!S&&y){if(k!=null)continue;t.removeEventListener(z,u[H],Q),u[H]=null}if(k!=null)if(S)t[`__${z}`]=k,tt([z]);else{let Y=function(le){u[E].call(this,le)};var N=Y;u[H]=Zp(z,t,Y,Q)}else S&&(t[`__${z}`]=void 0)}else if(E==="style")Ve(t,E,k);else if(E==="autofocus")jp(t,!!k);else if(!l&&(E==="__value"||E==="value"&&k!=null))t.value=t.__value=k;else if(E==="selected"&&m)vh(t,k);else{var C=E;d||(C=Gg(C));var I=C==="defaultValue"||C==="defaultChecked";if(k==null&&!l&&!I)if(a[E]=null,C==="value"||C==="checked"){let Q=t,H=e===void 0;if(C==="value"){let z=Q.defaultValue;Q.removeAttribute(C),Q.defaultValue=z,Q.value=Q.__value=H?z:null}else{let z=Q.defaultChecked;Q.removeAttribute(C),Q.defaultChecked=z,Q.checked=H?z:!1}}else t.removeAttribute(E);else I||f.includes(C)&&(l||typeof k!="string")?t[C]=k:typeof k!="function"&&Ve(t,C,k,r)}}}return s&&ho(!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",m=!1;if(Yi(()=>{var f=e(...l.map(n)),$=gh(t,d,f,o,r);m&&u&&"value"in f&&Td(t,f.value,!1);for(let _ of Object.getOwnPropertySymbols(s))f[_]||Qi(s[_]);for(let _ of Object.getOwnPropertySymbols(f)){var y=f[_];_.description===Tp&&(!d||y!==d[_])&&(s[_]&&Qi(s[_]),s[_]=Oi(()=>Es(t,()=>y))),$[_]=y}d=$}),u){var p=t;Ro(()=>{Td(p,d.value),df(p)})}m=!0}function hh(t){var e;return(e=t.__attributes)!=null?e:t.__attributes={[fh]:t.nodeName.includes("-"),[mh]:t.namespaceURI===Xv}}var uh=new Map;function _h(t){var e=uh.get(t.nodeName);if(e)return e;uh.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=_a(o)}return e}function Z$(t,e,i){var o;Ee&&(e==="srcset"&&J$(t,i)||cf((o=t.getAttribute(e))!=null?o:"",i)||wg(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 ph(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function J$(t,e){var i=ph(t.srcset),o=ph(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 ey=Uc?()=>performance.now():()=>Date.now(),jr={tick:t=>(Uc?requestAnimationFrame:vt)(t),now:()=>ey(),tasks:new Set};function bh(){let t=jr.now();jr.tasks.forEach(e=>{e.c(t)||(jr.tasks.delete(e),e.f())}),jr.tasks.size!==0&&jr.tick(bh)}function $h(t){let e;return jr.tasks.size===0&&jr.tick(bh),{promise:new Promise(i=>{jr.tasks.add(e={c:t,f:i})}),abort(){jr.tasks.delete(e)}}}function pu(t,e){$d(()=>{t.dispatchEvent(new CustomEvent(e))})}function ny(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 yh(t){let e={},i=t.split(";");for(let o of i){let[r,a]=o.split(":");if(!r||a===void 0)break;let l=ny(r.trim());e[l]=a.trim()}return e}var ry=t=>t;function Xr(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,f,$;function y(){var k;var P=Ot,E=_t;qi(null),go(null);try{return u!=null?u:u=i()(e,(k=o==null?void 0:o())!=null?k:{},{direction:s})}finally{qi(P),go(E)}}var _={is_global:d,in(){var P;if(e.inert=m,!r){$==null||$.abort(),(P=$==null?void 0:$.reset)==null||P.call($);return}a||f==null||f.abort(),pu(e,"introstart"),f=uf(e,y(),$,1,()=>{pu(e,"introend"),f==null||f.abort(),f=u=void 0,e.style.overflow=p})},out(P){if(!a){P==null||P(),u=void 0;return}e.inert=!0,pu(e,"outrostart"),$=uf(e,y(),f,0,()=>{pu(e,"outroend"),P==null||P()})},stop:()=>{f==null||f.abort(),$==null||$.abort()}},S=_t;if(((N=S.transitions)!=null?N:S.transitions=[]).push(_),r&&yd){var C=d;if(!C){for(var I=S.parent;I&&(I.f&65536)!==0;)for(;(I=I.parent)&&(I.f&16)===0;);C=!I||(I.f&32768)!==0}C&&Ro(()=>{It(()=>_.in())})}}function uf(t,e,i,o,r){var a=o===1;if(Gs(e)){var l,d=!1;return Cn(()=>{if(!d){var S=e({direction:a?"in":"out"});l=uf(t,S,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:vt,deactivate:vt,reset:vt,t:()=>o};let{delay:s=0,css:u,tick:m,easing:p=ry}=e;var f=[];if(a&&i===void 0&&(m&&m(0,1),u)){var $=yh(u(0,1));f.push($,$)}var y=()=>1-o,_=t.animate(f,{duration:s,fill:"forwards"});return _.onfinish=()=>{var z;_.cancel();var S=(z=i==null?void 0:i.t())!=null?z:1-o;i==null||i.abort();var C=o-S,I=e.duration*Math.abs(C),N=[];if(I>0){var P=!1;if(u)for(var E=Math.ceil(I/16.666666666666668),k=0;k<=E;k+=1){var Q=S+C*p(k/E),H=yh(u(Q,1-Q));N.push(H),P||(P=H.overflow==="hidden")}P&&(t.style.overflow="hidden"),y=()=>{var Y=_.currentTime;return S+C*p(Y/I)},m&&$h(()=>{if(_.playState!=="running")return!1;var Y=y();return m(Y,1-Y),!0})}_=t.animate(N,{duration:I,fill:"forwards"}),_.onfinish=()=>{y=()=>o,m==null||m(o,1-o),r()}},{abort:()=>{_&&(_.cancel(),_.effect=null,_.onfinish=vt)},deactivate:()=>{r=vt},reset:()=>{o===0&&(m==null||m(1,0))},t:()=>y()}}function pf(t,e,i){var o=Ko(t,e);o&&o.set&&(t[e]=i,Vo(()=>{t[e]=null}))}var Js,kl,Cd,mu,xh,vu=class vu{constructor(e){Ks(this,mu);Ks(this,Js,new WeakMap);Ks(this,kl);Ks(this,Cd);cl(this,Cd,e)}observe(e,i){var o=Ni(this,Js).get(e)||new Set;return o.add(i),Ni(this,Js).set(e,o),Yv(this,mu,xh).call(this).observe(e,Ni(this,Cd)),()=>{var r=Ni(this,Js).get(e);r.delete(i),r.size===0&&(Ni(this,Js).delete(e),Ni(this,kl).unobserve(e))}}};Js=new WeakMap,kl=new WeakMap,Cd=new WeakMap,mu=new WeakSet,xh=function(){var e;return(e=Ni(this,kl))!=null?e:cl(this,kl,new ResizeObserver(i=>{for(var o of i){vu.entries.set(o.target,o);for(var r of Ni(this,Js).get(o.target)||[])r(o)}}))},pr(vu,"entries",new WeakMap);var ff=vu;var sy=new ff({box:"border-box"});function En(t,e,i){var o=sy.observe(t,()=>i(t[e]));Ro(()=>(It(()=>i(t[e])),o))}function wh(t,e){return t===e||(t==null?void 0:t[qo])===e}function je(t={},e,i,o){return Ro(()=>{var r,a;return jo(()=>{r=a,a=(o==null?void 0:o())||[],It(()=>{t!==i(...a)&&(e(t,...a),r&&wh(i(...r),t)&&e(null,...r))})}),()=>{Cn(()=>{a&&wh(i(...a),t)&&e(null,...a)})}}),t}function xo(t=!1){let e=Wt,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&&md(()=>{Sh(e,o),Ys(i.b)}),Oe(()=>{let r=It(()=>i.m.map(og));return()=>{for(let a of r)typeof a=="function"&&a()}}),i.a.length&&Oe(()=>{Sh(e,o),Ys(i.a)})}function Sh(t,e){if(t.l.s)for(let i of t.l.s)n(i);e()}function Id(t,e,i){if(t==null)return e(void 0),i&&i(void 0),vt;let o=It(()=>t.subscribe(e,i));return o.unsubscribe?()=>o.unsubscribe():o}var Ll=[];function Lr(t,e){return{subscribe:ae(t,e).subscribe}}function ae(t,e=vt){let i=null,o=new Set;function r(d){if(fl(t,d)&&(t=d,i)){let s=!Ll.length;for(let u of o)u[1](),Ll.push(u,t);if(s){for(let u=0;u<Ll.length;u+=2)Ll[u][0](Ll[u+1]);Ll.length=0}}}function a(d){r(d(t))}function l(d,s=vt){let u=[d,s];return o.add(u),o.size===1&&(i=e(r,a)||vt),d(t),()=>{o.delete(u),o.size===0&&i&&(i(),i=null)}}return{set:r,update:a,subscribe:l}}function gi(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 Lr(i,(l,d)=>{let s=!1,u=[],m=0,p=vt,f=()=>{if(m)return;p();let y=e(o?u[0]:u,l,d);a?l(y):p=typeof y=="function"?y:vt},$=r.map((y,_)=>Id(y,S=>{u[_]=S,m&=~(1<<_),s&&f()},()=>{m|=1<<_}));return s=!0,f(),function(){Ys($),p(),s=!1}})}function ge(t){let e;return Id(t,i=>e=i)(),e}var gu=!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:vt};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=vt;else{var r=!0;o.unsubscribe=Id(t,l=>{r?o.source.v=l:O(o.source,l)}),r=!1}return t&&mf in i?ge(t):n(o.source)}function Re(){let t={};function e(){Vo(()=>{for(var i in t)t[i].unsubscribe();vo(t,mf,{enumerable:!1,value:!0})})}return[t,e]}function vf(t){var e=gu;try{return gu=!1,[t(),gu]}finally{gu=e}}var fy={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return Ee&&mg(`${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 Pn(t,e,i){return new Proxy(Ee?{props:t,exclude:e,name:i,other:{},to_proxy:[]}:{props:t,exclude:e},fy)}var my={get(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(Gs(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];Gs(r)&&(r=r());let a=Ko(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(Gs(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o){let r=Ko(o,e);return r&&!r.configurable&&(r.configurable=!0),r}}},has(t,e){if(e===qo||e===ul)return!1;for(let i of t.props)if(Gs(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){let e=[];for(let i of t.props)if(Gs(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 Ps(...t){return new Proxy({props:t},my)}function Th(t){var e,i;return(i=(e=t.ctx)==null?void 0:e.d)!=null?i:!1}function g(t,e,i,o){var Q,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]=vf(()=>t[e]):u=t[e];var m=qo in t||ul in t,p=l&&((H=(Q=Ko(t,e))==null?void 0:Q.set)!=null?H:m&&e in t&&(z=>t[e]=z))||void 0,f=o,$=!0,y=!1,_=()=>(y=!0,$&&($=!1,d?f=It(o):f=o),f);u===void 0&&o!==void 0&&(p&&a&&fg(e),u=_(),p&&p(u));var S;if(a)S=()=>{var z=t[e];return z===void 0?_():($=!0,y=!1,z)};else{var C=(r?qr:wn)(()=>t[e]);C.f|=131072,S=()=>{var z=n(C);return z!==void 0&&(f=void 0),z===void 0?f:z}}if((i&4)===0&&a)return S;if(p){var I=t.$$legacy;return function(z,Y){return arguments.length>0?((!a||!Y||I||s)&&p(Y?S():z),z):S()}}var N=!1,P=!1,E=us(u),k=qr(()=>{var z=S(),Y=n(E);return N?(N=!1,P=!0,Y):(P=!1,E.v=z)});return l&&n(k),r||(k.equals=ml),function(z,Y){if(su!==null&&(N=P,S(),n(E)),arguments.length>0){let le=Y?n(k):a&&l?ci(z):z;if(!k.equals(le)){if(N=!0,O(E,le),y&&f!==void 0&&(f=le),Th(k))return z;It(()=>n(k))}return z}return Th(k)?k.v:n(k)}}var vy;typeof HTMLElement=="function"&&(vy=class extends HTMLElement{constructor(e,i,o){super();pr(this,"$$ctor");pr(this,"$$s");pr(this,"$$c");pr(this,"$$cn",!1);pr(this,"$$d",{});pr(this,"$$r",!1);pr(this,"$$p_d",{});pr(this,"$$l",{});pr(this,"$$l_u",new Map);pr(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))}}connectedCallback(){return mt(this,null,function*(){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(yield Promise.resolve(),!this.$$cn||this.$$c)return;let o={},r=gy(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=oh({component:this.$$ctor,target:this.shadowRoot||this,props:Gt(Ie({},this.$$d),{$$slots:o,$$host:this})}),this.$$me=iu(()=>{jo(()=>{var a;this.$$r=!0;for(let l of Cp(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 Cp(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 gy(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var Ch="5";var Ih,Eh,Ph;typeof window!="undefined"&&((Ph=(Eh=(Ih=window.__svelte)!=null?Ih:window.__svelte={}).v)!=null?Ph:Eh.v=new Set).add(Ch);import{areValidLiveRecordSources as LC,clientChecker as Iv}from"@vkontakte/videoplayer-core/es2015";import"@vkontakte/videoplayer-core/es2015";import{noop as Ob,safeStorage as MC,throttleFn as VC}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as RC}from"@vkontakte/videoplayer-statistics/es2015";import{InterfaceLanguage as hy,fillWithDefault as _y,VideoQuality as Ah}from"@vkontakte/videoplayer-shared/es2015";var by={isMobile:void 0,disableInvisibleComponentsTimeout:500,debugLog:!1,devNullLog:!1,defaultLanguage:hy.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:Ah.Q_480P,highQualityLimit:Ah.Q_720P,episodeMinWidthPc:8,hideThumbTimerAfterTouch:!0,preventPauseOnVideoClick:!1,returnFocusOnControlsHide:!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},kh=t=>_y(t,by),Lh=t=>hl("ui-config",t),Vt=()=>gl("ui-config");var Ed="vk_player_debug_panel_opened";var Mh="videoplayer",Vh="videoplayer";var fs={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},Rh=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),Nh=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Oh=new Set(["ShiftRight","ShiftLeft"]);var Dh=["TIMELINE"],Pd=[...Dh,"GRAPH_BUTTON"],hf=[...Dh,"PLAY_BUTTON"],Ad=[...Pd,"PLAY_BUTTON"];var ms=(a=>(a.XS="xs",a.S="s",a.M="m",a.L="l",a.XL="xl",a))(ms||{}),kd={xs:0,s:1,m:2,l:3,xl:4};import{assertNonNullable as Bh,VERSION as $y}from"@vkontakte/videoplayer-shared/es2015";import{VERSION as yy}from"@vkontakte/videoplayer-core/es2015";import{VERSION as xy}from"@vkontakte/videoplayer-statistics/es2015";var hu="prod",Ml="1.1.78-beta.0";var La=(t,e,i)=>{let o=document.createElement("a");o.href=t,o.download=`${e}.${i}`,o.style.display="none",o.click()};var Fh=Symbol("storeContext"),Hh=Symbol("microStoresContext"),Uh=(t,e)=>{hl(Fh,t),hl(Hh,e),hu==="dev"&&(window.app={store:t,microStores:e})},ve=()=>{let t=gl(Fh);return Bh(t,"Store context is empty!"),t},wo=()=>{let t=gl(Hh);return Bh(t,"MicroStores context is empty!"),t},si=(t,e)=>bu(t,t.getValue(),e),bu=(t,e,i)=>Lr(e,o=>{let r=t.subscribe(a=>{o(a),i==null||i(a)});return()=>r.unsubscribe()}),zh=(t,e,i,o)=>{var Q,H,z,Y,le,X,re,Z,we;let r=t.info,{width:a,height:l}=ge(i.ui.playerSize),d=(H=(Q=r.throughputEstimation$.getValue())==null?void 0:Q.toFixed(0))!=null?H:0,s=(Y=(z=r.rttEstimation$.getValue())==null?void 0:z.toFixed(0))!=null?Y:0,u=r.isAutoQualityEnabled$.getValue()?"auto":"manual",m=`${Ml} (core: ${yy}, stat: ${xy}, shared: ${$y})`,p=ge(i.state.errorLog$),f=p.length?`
45
+ `+p.map((ue,ne)=>{var Ne;let _e=`${ne}) Type: ${ue.id}
46
+ `,xe=`Message: ${ue.message} (${ue.thrown})
47
+ `,J=`Trace: ${(Ne=ue.thrown)==null?void 0:Ne.stack}
48
+ `;return _e+xe+J}).join(`
49
+ `):void 0,$=i.state.isAudioDisabled?"disabled":ge(i.state.isAudioAvailable$)?void 0:"unavailable",y=t.info.currentVideoStream$.getValue(),_=t.info.currentAudioStream$.getValue(),S=[];y&&S.push(`Video: ${(le=y==null?void 0:y.codec)!=null?le:""}`+(y!=null&&y.hdr?" (HDR)":"")),_&&S.push(`Audio: ${(X=_==null?void 0:_.codec)!=null?X:""}`+(_!=null&&_.language?` (${_.language})`:""));let C=r.currentQuality$.getValue(),I="";if(C){let ue=r.availableQualitiesFps$.getValue()[C];I=ue?`${ue}fps`:""}let N=r.httpConnectionType$.getValue(),P=(Z=(re=r.currentBuffer$.getValue())==null?void 0:re.end)!=null?Z:0,E=Math.max(P-ge(i.state.positionExact$),0),k={Version:m,Browser:navigator.userAgent,Config:t.experimental.tuningConfigName$.getValue().join(", "),"United video id":String(i.videoId),TraceId:o,VSID:ge(i.vsid),"Content host":r.hostname$.getValue(),"Connection type":N?N+(r.httpConnectionReused$.getValue()?" (reused)":""):"",Throughput:`${d}Kbps @ ${s}ms RTT`,Format:r.currentFormat$.getValue(),"Available Formats":e!=null&&e.sources?Object.keys(e.sources).join(", "):"",Streams:S.join(", "),Quality:`${u} ${C!=null?C:""} ${I}`,"Available qualities":r.availableQualities$.getValue().join(", "),Audio:$,Position:`${ge(i.state.positionExact$)}s`,Buffer:`${E}s`,State:`${ge(i.playerPhase)} ${(we=r.playbackState$.getValue())!=null?we:""}`,"Player size":`${a}x${l}`,URL:window.location.href,Errors:f};return Object.entries(k).filter(([ue,ne])=>ne!==void 0).map(([ue,ne])=>`${ue}: ${ne}`).join(`
50
+ `)},Wh=(t,e,i)=>{var Q,H,z,Y;let o=t.info,{width:r,height:a}=ge(i.ui.playerSize),l={version:Ml,viewport:`${r}x${a}`,volume:Math.round(ge(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.isLive$.getValue(),f=o.liveBufferTime$.getValue();m&&(p&&f?l.buffer=m.end-f:l.buffer=Math.max(m.end-ge(i.state.positionExact$),0)),l.position=ge(i.state.positionExact$);let $=o.throughputEstimation$.getValue();$&&(l.speed=$);let y=o.videoBitrate$.getValue();y&&(l.bitrate=y);let _=o.liveLatency$.getValue();_&&(l.liveLatency=_);let S=o.currentVideoSegmentLength$.getValue();S&&(l.currentVideoSegmentLength=S);let C=o.currentAudioSegmentLength$.getValue();C&&(l.currentAudioSegmentLength=C);let I=ge(i.vsid);typeof I=="string"&&(l.vsid=I);let N=(Q=t.info.currentVideoStream$.getValue())==null?void 0:Q.codec;N&&(l.videoCodec=N);let P=(H=t.info.currentAudioStream$.getValue())==null?void 0:H.codec;P&&(l.audioCodec=P),((z=t.info.currentVideoStream$.getValue())==null?void 0:z.hdr)&&(l.hdr=!0);let k=(Y=t.info.currentAudioStream$.getValue())==null?void 0:Y.language;return k&&(l.audioLanguage=k),l},Kh=(t,e)=>La(t,e,"mp4"),qh=t=>!t.type,Qh=t=>!!t.type,Gh=()=>{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}download(e){return mt(this,null,function*(){if(this.pendingDownloads.has(e))return null;this.pendingDownloads.add(e);try{let i=yield fetch(e,{signal:this.destroyController.signal});if(i.ok)return yield 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 Pi}from"@vkontakte/videoplayer-shared/es2015";import"@vkontakte/videoplayer-core/es2015";var wy="vk_player_",Yh="vk_player_prefer_traffic_saving_enabled",jh="vk_player_preferred_volume",Xh="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",Zh="vk_player_preferred_stream_language",Jh="vk_player_preferred_rate",e_="vk_player_preferred_autoplay_next",$f="vk_player_preferred_subtitles_language",t_="vk_player_user_video_prefs",i_=`${wy}preview_track_close_tooltip`,o_=t=>t>1?1:t<0?0:t,wf=t=>Pi.set(jh,o_(t).toString(10)),$u=()=>{let t=Pi.get(jh);return yf(t)?void 0:o_(parseFloat(t))},Sf=(t,e)=>Pi.set(xf,JSON.stringify({videoId:t,value:e})),yu=()=>Pi.remove(xf),Tf=t=>{let e=Pi.get(xf);if(yf(e))return;let{videoId:i,value:o}=JSON.parse(e);if(t!==i){yu();return}return o},n_=(t,e)=>{e?Pi.set(t,"true"):Pi.remove(t)},Cf=t=>Pi.get(t)==="true",If=t=>n_(Xh,t),r_=()=>Cf(Xh),Ld=t=>n_(Yh,t),Ef=()=>Cf(Yh),s_=()=>Pi.get(Zh),Pf=t=>Pi.set(Zh,t),Af=()=>Pi.get($f),kf=t=>{t?Pi.set($f,t):Pi.remove($f)},a_=t=>Pi.set(Jh,JSON.stringify({rate:t})),l_=()=>{let t=Pi.get(Jh);if(yf(t))return;let{rate:e}=JSON.parse(t);return e},d_=t=>{Pi.set(e_,String(t))},c_=()=>Cf(e_),Sy=()=>{let t=m=>{Pi.set(_f,JSON.stringify(m))},e=()=>{try{let m=Pi.get(_f);return m?JSON.parse(m):null}catch(m){return null}},i=()=>{try{let m=Pi.get(bf);return m?JSON.parse(m):null}catch(m){return null}},o=m=>{Pi.set(bf,JSON.stringify(m))},r=m=>{u(m);let p=m?i():null;if(p&&(p==null?void 0:p.videoId)===m)return Gt(Ie({},p),{appliesTo:"to-video"});p&&a();let f=e();return f?Gt(Ie({},f),{appliesTo:"as-default"}):(t({type:"auto_quality"}),{type:"auto_quality",appliesTo:"as-default"})},a=()=>{Pi.remove(bf)},l=()=>{Pi.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":Ld(!0);break;case"exact_quality":Sf(m,p.quality)}a(),l()}},u=m=>{let p=Tf(m);if(p){o({type:"exact_quality",videoId:m,quality:p});return}Ef()&&t({type:"traffic_saving",videoId:m}),Ld(!1),yu()};return{getPreferredQualitySettings:r,migrateSettingsToLegacyWay:s,savePreferredQualitySettings:d,savePreferredDefaultQualitySettings:t,removePreferredQualitySettingsByVideo:a,getPreferredDefaultQualitySettings:e,getPreferredSubtitlesLanguage:Af,savePreferredSubtitlesLanguage:kf}},{getPreferredQualitySettings:u_,migrateSettingsToLegacyWay:p_,savePreferredQualitySettings:xu,savePreferredDefaultQualitySettings:X8,removePreferredQualitySettingsByVideo:Z8,getPreferredDefaultQualitySettings:wu}=Sy(),Ty=3,Cy=3,f_=()=>{let t=Pi.get(t_);if(t)try{return JSON.parse(t)}catch(e){return null}return null},Su=(t,e)=>{var r,a;let i=f_();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=f_())!=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=Iy(o);Pi.set(t_,JSON.stringify(a))};function Iy(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(Cy),e.reduce((o,[r])=>(o[r]=Ey(t[r]),o),{})}function Ey(t){let e=Object.entries(t);return e.sort(([,i],[,o])=>i.updatedTs>o.updatedTs?-1:1),e.splice(Ty),Object.fromEntries(e)}function m_(){Pi.set(i_,JSON.stringify(!0))}function v_(){let t=Pi.get(i_);try{return t?JSON.parse(t):!1}catch(e){return!1}}import{PlaybackState as Vb}from"@vkontakte/videoplayer-core/es2015";bg();var ea="var(--btn-color, #fff)";var Py=Ce('<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),Ay=Ce('<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=g(e,"width",19,()=>"24"),o=g(e,"height",19,()=>"24"),r=g(e,"fill",3,ea),a=(m=e.viewBox)!=null?m:`0 0 ${i()} ${o()}`;var l=Ay(),d=T(l);{var s=p=>{var f=Py(),$=de(f),y=T($);ri(y,()=>e.children),w($),vi(),b(p,f)},u=p=>{var f=Le(),$=de(f);ri($,()=>e.children),b(p,f)};R(d,p=>{e.shadow?p(s):p(u,!1)})}w(l),D(()=>{Ve(l,"aria-label",e.ariaLabel),Ve(l,"aria-hidden",!e.ariaLabel),Ve(l,"width",i()),Ve(l,"height",o()),Ve(l,"viewBox",a),Ve(l,"fill",r()),Qe(l,e.style),Ve(l,"data-testid",e.testId)}),b(t,l),F()}import{isNullable as __,InterfaceLanguage as b_}from"@vkontakte/videoplayer-shared/es2015";var ky={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:"Выйти из режима точной перемотки"},m_=E1;var P1={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,
52
+ попробуйте изменить качество на «Авто»`,double_forward_label:"2x",preview_track_notification_text:"Потяните вверх для точной перемотки",preview_track_close_tooltip:"Выйти из режима точной перемотки"},g_=ky;var Ly={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"},v_=P1;var ks=new Map;ks.set(h_.EN,v_);ks.set(h_.RU,m_);var __=new Map,Mf=({language:t,pack:e,fallback:i})=>{if(ks.has(t)){let o=ks.get(t);ks.set(t,Ae(Ae({},o),e))}else ks.set(t,e);__.set(t,i)},Vf=t=>ks.has(t),Rf=(t,e,i,o)=>{var l;let r=ks.get(t),a=r==null?void 0:r[e];if(g_(a)){let d=(l=__.get(t))!=null?l:o,s=d?ks.get(d):void 0;a=s==null?void 0:s[e]}return g_(a)?e+Object.values(i!=null?i:{}).join(" "):i?a.replaceAll(/{(\w+?)}/g,(d,s)=>{var u;return(u=i[s])!=null?u:""}):a},Q=(t,e)=>{let{interfaceLanguage$:i}=ve(),o=ge(i),r=Mt();return Rf(o,t,e,r.defaultLanguage)};var A1=Ee('<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 Md(t,e){F(e,!1);let i=Q("video360");xo(),Ze(t,{width:"76",height:"45",get ariaLabel(){return i},testId:"video-360-icon",shadow:!0,children:(o,r)=>{var a=A1();_(o,a)},$$slots:{default:!0}}),H()}import"@vkontakte/videoplayer-core/es2015";var Nl;(function(t){t.fatal="fatal",t.error="error",t.warning="warning",t.log="log",t.info="info",t.debug="debug",t.critical="critical"})(Nl||(Nl={}));var k1=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,L1=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,M1=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Cu="?",V1="X-Sentry-Auth",R1=/^(?:(\w+):)\/\/(?:([\w-]+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function N1(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=k1.exec(i[a]))r={filename:o[2]&&o[2].indexOf("address at ")===0?o[2].substr(11):o[2],function:o[1]||Cu,lineno:o[3]?+o[3]:null,colno:o[4]?+o[4]:null};else if(o=M1.exec(i[a]))r={filename:o[2],function:o[1]||Cu,lineno:+o[3],colno:o[4]?+o[4]:null};else if(o=L1.exec(i[a]))a===0&&!o[5]&&t.columnNumber!==void 0&&(e[0].column=t.columnNumber+1),r={filename:o[3],function:o[1]||Cu,lineno:o[4]?+o[4]:null,colno:o[5]?+o[5]:null};else continue;!r.function&&r.lineno&&(r.function=Cu),e.push(r)}return e.length?{value:b_(t),type:t.name,stacktrace:{frames:e.reverse()}}:null}function b_(t){return(t&&t.message||"No error message").split(`
56
- `).filter(i=>!!i)[0]}function O1(t){try{let e=N1(t);if(e)return e}catch(e){}return{value:b_(t),type:t&&t.name,stacktrace:{frames:[]}}}function D1(){return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}var Iu=class{constructor(e){if(e&&e.dsn){let i=R1.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 Kt(Ae({},this.getRequestBlank()),{exception:{values:[O1(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(V1,this.authHeader||""),i.send(JSON.stringify(e))}getRequestBlank(){return{platform:"javascript",event_id:D1(),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 B1(){return window}var Eu=class t extends Iu{constructor(e,i=B1()){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",Ae({},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",Ae({},e)),this}setUser(e){return this.setKeyState("user",Ae({},e)),this}clone(){let e=new t(Kt(Ae({},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:[Ae({timestamp:Date.now()/1e3},this.beforeBreadcrumb(e))]})}setBreadcrumbs(e){this.setKeyState("breadcrumbs",e)}captureMessage(e,i){this.send(Kt(Ae({},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 Ae(Kt(Ae({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(Ae({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 Kt(Ae({},i),{[o]:a||d?[...a||[],...d||[]]:Ae(Ae({},typeof r!="string"?r:{}),typeof l!="string"?l:{})})},this._state)}setKeyState(e,i){this._state[e]=i}};import{isNonNullable as Pu,Subscription as F1}from"@vkontakte/videoplayer-shared/es2015";var Au=null,Ra=class{constructor(e,i,o={}){!Au&&e.dsn&&(this.sentryClient=new Eu({dsn:e.dsn,environment:i.env}),this.version=i.version,this.sentrySubscription=new F1,this.options=e,this.context=o,Au=this)}destroy(){var e,i;(e=this.sentryClient)==null||e.destroy(),(i=this.sentrySubscription)==null||i.unsubscribe(),Au=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:p,blackErrorCategoryList:m}=l,{errorType:f,category:b}=i;if(Pu(b)&&m.includes(b)||Pu(f)&&p.includes(f))return;if(Math.random()<=d||Pu(b)&&u.includes(b)||Pu(f)&&s.includes(f)){Object.keys(i).length&&r.setTags(Ae({version:this.version},i)),(Object.keys(a).length||Object.keys(o).length)&&r.setExtras(Ae(Ae({},a),o));try{f&&r.captureMessage(f,i.fatal?Nl.fatal:Nl.error),r.report(e)}catch($){console.error($)}}}static getInstance(){return Au}};var hs=(d=>(d.Thumb="thumb",d.Video="video",d.Ads="ads",d.Crashed="crashed",d.LiveWaitingStart="LiveWaitingStart",d.LiveWaitingRecover="LiveWaitingRecover",d.LiveWaitingRecord="LiveWaitingRecord",d))(hs||{});var ku=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()},Lu=t=>t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():Promise.reject(),y_=(t,e)=>e?!0:t.fullscreenEnabled||!!t.webkitFullscreenEnabled||!!t.mozFullscreenEnabled||!!t.msFullscreenEnabled,x_=t=>{let e=t;e!=null&&e.webkitExitFullscreen&&(e==null||e.webkitExitFullscreen())},Vd=()=>{let t=document;return t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||t.msFullscreenElement},ia=()=>!!Vd(),Mu=t=>{document.addEventListener("fullscreenchange",t),document.addEventListener("webkitfullscreenchange",t),document.addEventListener("mozfullscreenchange",t),document.addEventListener("MSFullscreenChange",t)},Vu=t=>{document.removeEventListener("fullscreenchange",t),document.removeEventListener("webkitfullscreenchange",t),document.removeEventListener("mozfullscreenchange",t),document.removeEventListener("MSFullscreenChange",t)},w_=t=>{let e=window.screen;return(r=>gt(null,null,function*(){return 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 S_}from"@vkontakte/videoplayer-core/es2015";var T_=()=>({title:Q("hotkey_map_modal_title"),closeBtnText:Q("hotkey_map_modal_close_btn_text"),groups:[{title:Q("hotkey_map_group_title_common"),items:[{description:Q("hotkey_map_item_mute_description"),value:Q("hotkey_map_item_mute_value")},{description:Q("hotkey_map_item_volume_up_description"),value:Q("hotkey_map_item_volume_up_value")},{description:Q("hotkey_map_item_volume_down_description"),value:Q("hotkey_map_item_volume_down_value")},{description:Q("hotkey_map_item_pip_description"),value:Q("hotkey_map_item_pip_value")},{description:Q("hotkey_map_item_full_screen_description"),value:Q("hotkey_map_item_full_screen_value")},{description:Q("hotkey_map_item_show_context_menu_description"),value:Q("hotkey_map_item_show_context_menu_value")},{description:Q("hotkey_map_item_show_hotkey_map_description"),value:Q("hotkey_map_item_show_hotkey_map_value")}]},{title:Q("hotkey_map_group_title_playback"),items:[{description:Q("hotkey_map_item_play_toggle_description"),value:Q("hotkey_map_item_play_toggle_value")},{description:Q("hotkey_map_item_seek_backward_description"),value:Q("hotkey_map_item_seek_backward_value")},{description:Q("hotkey_map_item_seek_forward_description"),value:Q("hotkey_map_item_seek_forward_value")},{description:Q("hotkey_map_item_fast_seek_backward_description"),value:Q("hotkey_map_item_fast_seek_backward_value")},{description:Q("hotkey_map_item_fast_seek_forward_description"),value:Q("hotkey_map_item_fast_seek_forward_value")},{description:Q("hotkey_map_item_rate_down_description"),value:Q("hotkey_map_item_rate_down_value")},{description:Q("hotkey_map_item_rate_up_description"),value:Q("hotkey_map_item_rate_up_value")},{description:Q("hotkey_map_item_prev_frame_description"),value:Q("hotkey_map_item_prev_frame_value")},{description:Q("hotkey_map_item_next_frame_description"),value:Q("hotkey_map_item_next_frame_value")},{description:Q("hotkey_map_item_jump_seek_description"),value:Q("hotkey_map_item_jump_seek_value")},{description:Q("hotkey_map_item_next_video_description"),value:Q("hotkey_map_item_next_video_value")},{description:Q("hotkey_map_item_prev_video_description"),value:Q("hotkey_map_item_prev_video_value")}]},{title:Q("hotkey_map_group_title_subtitles"),items:[{description:Q("hotkey_map_item_subtitles_toggle_description"),value:Q("hotkey_map_item_subtitles_toggle_value")}]},{title:Q("hotkey_map_group_title_episodes"),items:[{description:Q("hotkey_map_item_prev_episode_description"),value:S_.device.isApple?Q("hotkey_map_item_prev_episode_mac_value"):Q("hotkey_map_item_prev_episode_pc_value")},{description:Q("hotkey_map_item_next_episode_description"),value:S_.device.isApple?Q("hotkey_map_item_next_episode_mac_value"):Q("hotkey_map_item_next_episode_pc_value")}]}]});import{debounceFn as H1,ValueSubject as Nf}from"@vkontakte/videoplayer-shared/es2015";var Na=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:H1(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}revealPictureInPicture(){return gt(this,null,function*(){this.isRequested&&(this.removeEventHandlers(),yield this.request(),this.addEventHandlers())})}request(){return gt(this,null,function*(){var e;if(!(!this.isSupported()||this.isActive()))try{yield(e=this.videoElement)==null?void 0:e.requestPictureInPicture()}catch(i){this.isRequested=!1}})}exit(){return gt(this,null,function*(){!this.isSupported()||!this.isActive()||(yield 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=Ae({},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)}dispose(){return gt(this,null,function*(){this.removeEventHandlers(),yield 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 Oa(t){return t instanceof Na}import{devNull as C_,now as I_}from"@vkontakte/videoplayer-shared/es2015";function Df(t,e){F(e,!1);let i=ve();Nt(()=>{i.getAdmanWrapper().startPostroll()}),xo(),H()}import{noop as W1}from"@vkontakte/videoplayer-shared/es2015";var U1=Ee('<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>'),z1=Ee('<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 Mr(t,e){F(e,!0);let i=g(e,"direction",3,"left"),o=g(e,"useBtnColor",3,!1),r=v(()=>["up","down"].includes(i())),a=v(()=>["right","down"].includes(i())),l=v(()=>`chevron-icon--${i()}`),d=v(()=>(()=>{let p="";return n(a)&&(p+="transform: rotate(180deg);"),p.length?p:void 0})()),s=v(()=>o()?ta:"currentColor"),u=v(()=>n(r)?"7":"16");Ze(t,{width:"12",get height(){return n(u)},get fill(){return n(s)},get testId(){return n(l)},get style(){return n(d)},children:(p,m)=>{var f=Le(),b=de(f);{var y=S=>{var C=U1();_(S,C)},$=S=>{var C=z1();_(S,C)};V(b,S=>{n(r)?S(y):S($,!1)})}_(p,f)},$$slots:{default:!0}}),H()}var K1=(t,e,i)=>{t.stopPropagation(),n(e)&&i()()},q1=L('<div class="skip s-1h"> <!></div>'),Q1=L("<div><!></div>"),G1={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){F(e,!0),q(t,G1);let[i,o]=Re(),r=()=>x(u,"$isMobile",i),a=g(e,"position",3,0),l=g(e,"secondsToWatchBeforeSkip",3,0),d=g(e,"skipAd",3,W1),u=ve().ui.isMobile,p=v(()=>a()>0&&a()>=l());var m=Q1();let f;m.__click=[K1,p,d];var b=T(m);{var y=S=>{var C=q1(),I=T(C),R=k(I);Mr(R,{direction:"right"}),w(C),B(E=>pe(I,`${E!=null?E:""} `),[()=>Q("skip_ads_now")]),_(S,C)},$=S=>{var C=ms();B(I=>pe(C,I),[()=>Q("skip_ads_after",{time:Math.ceil(l()-a()).toFixed(0)})]),_(S,C)};V(b,S=>{n(p)?S(y):S($,!1)})}w(m),B(S=>f=se(m,1,"container s-1h",null,f,S),[()=>({"container-mobile":r(),skippable:n(p)})]),_(t,m),H(),o()}rt(["click"]);var Y1=L('<button class="go-to-site s-1i"> </button>'),j1={hash:"s-1i",code:"button.go-to-site.s-1i{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 Ff(t,e){F(e,!1),q(t,j1),xo();var i=Y1(),o=T(i,!0);w(i),B(r=>pe(o,r),[()=>Q("visit_advertiser")],Tn),_(t,i),H()}var X1=L('<div class="top-gradient-mobile s-k"></div>'),Z1=L('<div class="container s-k"><!> <video style="width: 100%; height: 100%" playsinline=""></video> <!> <!> <!></div>',2),J1={hash:"s-k",code:".container.s-k{height:100%;width:100%}.top-gradient-mobile.s-k{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 Nd(t,e){F(e,!0),q(t,J1);let[i,o]=Re(),r=()=>x(U,"$canSkipAd",i),a=()=>x(D,"$adPlaybackState",i),l=()=>x(I,"$isMobile",i),d=()=>x(z,"$adPosition",i),s=()=>x(G,"$secondsToWatchBeforeSkipAd",i),u=()=>x(C,"$isVideoEnded",i),p=g(e,"adsSlotId",3,void 0),m=g(e,"adsParams",3,void 0),f=g(e,"adsAutoplayParam",3,void 0),b=g(e,"duration",3,0),y=g(e,"adsExternalApi",3,void 0),$=ve(),S=Mt(),C=$.state.isEnded$,I=$.ui.isMobile,R=S.ads.isMobileGoToSiteButton,E=K(void 0),P=K(void 0),O=!1,D=$.ads.playbackState,U=$.ads.canSkip,z=$.ads.position,G=$.ads.secondsToWatchBeforeSkip,le=v(()=>r()&&a()!=="inactive"),Y=v(()=>l()&&a()!=="inactive"&&R);Nt(()=>{let A=$.getAdmanWrapper();if(C_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_mount"],numbers:[I_(),p()]}),!p()){A.onAdmanLoadingError();return}let Ke=()=>{var Fe;let{width:Oe,height:Be}=ge($.ui.playerSize),fe=ge($.ui.isFullscreen),ee=(Fe=f())!=null?Fe:ge($.ui.isAutoplay),Se=S.ads.paramsOverride;return{width:Oe,height:Be,isFullscreen:fe,isAutoplay:ee,adsContainer:n(E),adsVideoElement:n(P),slotId:p(),params:m(),paramsOverride:Se,duration:b(),externalApi:y()}},Ce=Oe=>gt(null,null,function*(){Oe&&(yield go());let Be=Ke();yield A.initAdman(Be),O=!0}),j=new AbortController,ie=()=>{j.abort()};return window.AdmanHTML?Ce(!0).catch(()=>{A.onAdmanLoadingError()}):A.loadAdman(j.signal).then(()=>Ce(!1)).catch(()=>{A.onAdmanLoadingError()}),()=>{C_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_unmount"],numbers:[I_(),p()]}),!O&&ie()}});var re=Z1(),X=T(re);{var we=A=>{var Ke=X1();_(A,Ke)};V(X,A=>{l()&&A(we)})}var ce=k(X,2);ot(ce,A=>N(P,A),()=>n(P));var ne=k(ce,2);{var he=A=>{Bf(A,{get position(){return d()},get secondsToWatchBeforeSkip(){return s()},get skipAd(){return $.actions.internal.skipAd}})};V(ne,A=>{n(le)&&A(he)})}var xe=k(ne,2);{var Z=A=>{Df(A,{})};V(xe,A=>{u()&&A(Z)})}var Ne=k(xe,2);{var ue=A=>{Ff(A,{})};V(Ne,A=>{n(Y)&&A(ue)})}w(re),ot(re,A=>N(E,A),()=>n(E)),_(t,re),H(),o()}var Zo=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 ey=Ee('<path fill="#fff"></path>'),ty=Ee("<path></path><!>",1);function Od(t,e){let i=g(e,"isActive",3,!1),o=v(()=>i()?"live-active-icon":"live-icon"),r=v(()=>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";Ze(t,{width:"42",height:"20",get testId(){return n(o)},get fill(){return n(r)},children:(l,d)=>{var s=ty(),u=de(s),p=k(u);{var m=f=>{var b=ey();Ue(b,"d",a),_(f,b)};V(p,f=>{i()&&f(m)})}B(()=>Ue(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 iy=L('<div class="equalizer s-a"><div class="col s-a"></div> <div class="col s-a"></div> <div class="col s-a"></div></div>'),oy=L('<div class="live-icon s-a"><!></div>'),ny=L('<span class="text s-a"> </span>'),ry=L("<div><!> <!></div>"),sy={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 Dd(t,e){q(t,sy);let i=g(e,"withEqualizer",3,!1),o=g(e,"isLive",3,!1),r=g(e,"isPlaying",3,!1);var a=ry();let l;var d=T(a);{var s=f=>{var b=iy();_(f,b)};V(d,f=>{i()&&f(s)})}var u=k(d,2);{var p=f=>{var b=oy(),y=T(b);Od(y,{isActive:!0}),w(b),_(f,b)},m=f=>{var b=ny(),y=T(b,!0);w(b),B(()=>pe(y,e.time)),_(f,b)};V(u,f=>{o()?f(p):f(m,!1)})}w(a),B(f=>l=se(a,1,"wrapper s-a",null,l,f),[()=>({live:o(),playing:r()})]),_(t,a)}var Ol=(t,e,i)=>{let o;return()=>(window.clearTimeout(o),t?o=window.setTimeout(()=>e.set(!0),i):e.set(!1),()=>window.clearTimeout(o))};var ay=L('<div role="timer" data-testid="thumb-timer"><!></div>'),ly={hash:"s-m",code:".thumb-timer.s-m{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 Bd(t,e){F(e,!0),q(t,ly);let[i,o]=Re(),r=()=>x(p,"$disabled",i),a=g(e,"isHidden",3,!1),l=g(e,"isLive",3,!1),d=g(e,"isPlaying",3,!1),s=Mt(),u=v(()=>Zo(e.duration-e.position)),p=ae(!1);var m=ay();let f;var b=T(m);Dd(b,{get time(){return n(u)},get isLive(){return l()},get isPlaying(){return d()},withEqualizer:!0}),w(m),Ps(m,()=>Ol(a()&&s.features.usePerformanceFix,p,s.disableInvisibleComponentsTimeout)),B(y=>f=se(m,1,"thumb-timer s-m",null,f,y),[()=>({"out-of-flow":r(),hidden:a()})]),_(t,m),H(),o()}var Dl=t=>{if(!navigator.clipboard){E_(t);return}navigator.clipboard.writeText(t).catch(()=>E_(t))};function E_(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 by}from"@vkontakte/videoplayer-core/es2015";import{clientChecker as P_}from"@vkontakte/videoplayer-core/es2015";var Hf="focus-hidden";var Vr=t=>{t.stopPropagation(),t.preventDefault()},Uf=t=>{var e,i;(i=(e=t.parentNode)==null?void 0:e.firstElementChild)==null||i.classList.remove(Hf)},cy=t=>{var i;let e=t.previousElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.lastElementChild),e==null||e.focus()},uy=t=>{var i;let e=t.nextElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.firstElementChild),e==null||e.focus()},py=t=>{let e=t.code;return e==="Tab"&&!t.shiftKey||e==="ArrowDown"},fy=t=>{let e=t.code;return e==="Tab"||e==="ArrowUp"},A_=t=>t.code==="Escape",my=t=>t.code==="ArrowLeft",Fd=(t,e=[])=>{let i=t.code;return["Enter","Space",...e].includes(i)},k_=t=>{py(t)?(Vr(t),uy(t.target)):fy(t)&&(Vr(t),cy(t.target))},ra=t=>!P_.device.isAndroid&&(t==null?void 0:t.detail)===0||P_.device.isAndroid&&(t==null?void 0:t.pointerType)==="",Bl=(t,e,i)=>gt(null,null,function*(){yield go(),t&&!t.classList.contains("opened")&&!e&&ge(i)&&(yield go(),i.set(!1),t.focus())}),L_=(t,e,i)=>gt(null,null,function*(){yield go(),t&&!e&&ge(i)&&(i.set(!1),t.focus())}),Hd=(t,e,i,o=!1)=>gt(null,null,function*(){if(yield go(),!!t&&e&&!o){let a=t.children[0];a==null||a.classList.toggle(Hf,!i),a==null||a.focus()}}),M_=(t,e)=>gt(null,null,function*(){setTimeout(()=>{let i=t[e];!!i&&i.focus()},100)}),Ru=(t,e)=>{k_(t),Uf(t.target),A_(t)&&(Vr(t),e())},Nu=(t,e)=>gt(null,null,function*(){Fd(t,["ArrowRight"])&&(Vr(t),e())}),V_=(t,e,i)=>gt(null,null,function*(){if(k_(t),my(t)){Vr(t),e();return}A_(t)&&(Vr(t),i())}),Fl=(t,e)=>{Fd(t)&&(Vr(t),e())},R_=(t,e,i)=>{if(Fd(t))Vr(t),i(!e);else{let o=t.code;if(o==="ArrowLeft"&&e){i(!1),Vr(t);return}o==="ArrowRight"&&!e&&(i(!0),Vr(t))}},N_=t=>{let e=t.getBoundingClientRect(),i=-14,o=e.left+e.width,r=e.top+i;return{right:o,bottom:r}},O_=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 Ou,isValidURL as $y}from"@vkontakte/videoplayer-shared/es2015";var Jr={"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 D_}from"@vkontakte/videoplayer-shared/es2015";var gy=(t,e)=>{Fl(t,()=>e())},hy=L('<li class="item s-1p" role="menuitem" tabindex="0"> </li>'),_y={hash:"s-1p",code:".item.s-1p{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-1p:hover{background:rgba(66,66,66,.5);color:var(--white)}"};function zf(t,e){F(e,!0),q(t,_y);let i=g(e,"onClick",3,D_),o=g(e,"closeContextMenu",3,D_),r=d=>{d==null||d.stopPropagation(),i()(),o()()};var a=hy();a.__click=r,a.__keydown=[gy,r];var l=T(a,!0);w(a),B(()=>{var d;Ue(a,"aria-label",(d=e.ariaLabel)!=null?d:e.label),Ue(a,"data-testid",e.id),pe(l,e.label)}),_(t,a),H()}rt(["click","keydown"]);var Ba=(t,e)=>t.weight-e.weight;var Ud=(o=>(o.OPEN_SUB_MENU="OPEN_SUB_MENU",o.CLICK="CLICK",o.SWITCH="SWITCH",o))(Ud||{});var yy=(t,e)=>{Ru(t,e)},xy=t=>{t.preventDefault()},wy=L('<ul role="menu" class="s-19"></ul>'),Sy={hash:"s-19",code:"ul.s-19{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){F(e,!0),q(t,Sy);let[i,o]=Re(),r=()=>x(we,"$playerPhase",i),a=()=>x(le,"$isLive$",i),l=()=>x(ce,"$isPiPEnabled$",i),d=()=>x(G,"$chromecastState$",i),s=()=>x(ne,"$pictureInPictureApiIsActive$",i),u=()=>x(X,"$isLooped$",i),p=()=>x(Y,"$positionExact$",i),m=()=>x(D,"$additionalContextMenuItems$",i),f=g(e,"visible",3,!1),b=g(e,"position",19,()=>({top:0,left:0})),y=g(e,"playerContainerRef",3,void 0),$=g(e,"menuElementRef",15,void 0),S=K(0),C=K(0),I=ve(),{pictureInPicture$:R}=wo(),E=Mt(),P=I.ui.contextMenu.visible$,O=I.ui.debugPanelVisible,D=I.ui.additionalContextMenuItems$,U=I.ui.t,z=I.actions.internal.togglePictureInPicture,G=I.state.chromecastState$,le=I.state.isLive$,Y=I.state.positionExact$,re=I.state.isInteractive,X=I.state.looped$,we=I.playerPhase,{isEnabled$:ce,isActive$:ne}=R,he=v(()=>r()==="video"),xe=v(()=>!!a()&&n(he)),Z=v(()=>["thumb","LiveWaitingStart","LiveWaitingRecover","LiveWaitingRecord"].includes(r())),Ne=v(()=>{var be;return E.features.copyVideoLink&&((be=I.callbacks)==null?void 0:be.onCopyVideoLink)}),ue=v(()=>n(Ne)&&!n(Z)&&!re&&!n(xe)),A=v(()=>{var be;return!!((be=I.callbacks)!=null&&be.onCopyEmbedCodeClicked)}),Ke=v(()=>l()&&d()!==by.CONNECTED&&!re&&n(he)),Ce=v(()=>!re&&!n(Z)&&!n(xe)),j=v(()=>E.features.videoRotate&&!re&&!n(Z)),ie=v(()=>E.showSupport&&!s()),Oe=v(()=>E.features.saveTraceInfoToFile),Be=()=>{var be;P.set(!1),(be=e.returnFocus)==null||be.call(e)},fe=(be,Je)=>{if(!$()||!y())return;let We=$().getBoundingClientRect(),nt=y().getBoundingClientRect();N(S,be-nt.left),N(C,Je-nt.top),n(S)+We.width>nt.width&&N(S,nt.width-We.width),n(C)+We.height>nt.height&&N(C,nt.height-We.height),N(S,Math.max(n(S),0),!0),N(C,Math.max(n(C),0),!0)};De(()=>{gt(null,null,function*(){if($()&&y()){yield go();let{top:Je,left:We,bottom:nt,right:ei}=b(),li=We!=null?We:0,gi=Je!=null?Je:0,bi=$().getBoundingClientRect();Ou(We)&&!Ou(ei)&&(li=ei-bi.width),Ou(Je)&&!Ou(nt)&&(gi=nt-bi.height),li=Math.max(li,0),gi=Math.max(gi,0),fe(li,gi)}})});let ee=()=>{I.actions.internal.videoRotate()},Se=()=>{$y(e.supportLink)&&window.open(e.supportLink,"_blank"),I.actions.internal.reportProblem(),I.actions.internal.pause()},Fe=()=>{let be=I.actions.internal.getDebugTextData();if(E.features.saveDebugInfoToFile){let Je=new Blob([...be],{type:"plain/text"}),We=window.URL.createObjectURL(Je);Va(We,"vk_player_debug_info","txt")}else Dl(I.actions.internal.getDebugTextData())},qe=()=>{let be=I.actions.internal.getTraceTextData(),Je=new Blob([...be],{type:"application/json"}),We=window.URL.createObjectURL(Je);Va(We,"vk_player_trace_info","json")},Ye=()=>{O.set(!0)},Te=()=>gt(null,null,function*(){var be;try{z()}finally{(be=e.returnFocus)==null||be.call(e)}}),Me=()=>{I.actions.internal.setLooped(!u())},ze=()=>{var be,Je;if(n(A)){let We=(Je=(be=I.callbacks)==null?void 0:be.onCopyEmbedCodeClicked)==null?void 0:Je.call(be);We&&Dl(We)}},Vt=(be=!1)=>{var Je,We;if((Je=I.callbacks)!=null&&Je.onCopyVideoLink){let nt=(We=I.callbacks)==null?void 0:We.onCopyVideoLink(be,p());nt&&Dl(nt)}},et=v(()=>E.features.saveDebugInfoToFile?U("menu_save_debug"):U("menu_copy_debug")),Ot=v(()=>n(Ne)?{id:"copy-link",weight:Jr["copy-link"],label:U("menu_copy_video_link"),onClick:()=>Vt()}:void 0),qt=v(()=>n(ue)?{id:"copy-link-timestamp",weight:Jr["copy-link-timestamp"],label:U("menu_copy_video_link_with_timestamp"),onClick:()=>Vt(!0)}:void 0),St=v(()=>n(A)?{id:"copy-embed-code",weight:Jr["copy-embed-code"],label:U("menu_copy_embed_code"),onClick:ze}:void 0),Jt=v(()=>n(Ke)?{id:"pip",weight:Jr.pip,label:s()?U("menu_pip_close"):U("menu_pip"),onClick:Te}:void 0),Dt=v(()=>n(Ce)?{id:"video-loop",weight:Jr["video-loop"],label:u()?U("menu_video_loop_off"):U("menu_video_loop_on"),ariaLabel:U("aria_label_menu_loop"),onClick:Me}:void 0),$e=v(()=>n(j)?{id:"rotate",weight:Jr.rotate,label:U("menu_video_rotate"),ariaLabel:U("aria_label_menu_rotate"),onClick:ee}:void 0),_e=v(()=>n(ie)?{id:"report",weight:Jr.report,label:U("menu_report"),ariaLabel:`${U("menu_report")}. ${U("aria_label_new_tab_alert")}`,onClick:Se}:void 0),J=v(()=>({id:"save-debug",weight:Jr["save-debug"],label:n(et),onClick:Fe})),ye=v(()=>n(Oe)?{id:"save-trace",weight:Jr["save-trace"],label:U("menu_save_debug"),onClick:qe}:void 0),Pe=v(()=>({id:"debug-info",weight:Jr["debug-info"],label:U("menu_debug_overlay"),ariaLabel:U("aria_label_menu_debug_overlay"),onClick:Ye})),It=v(()=>[n(Ot),n(qt),n(St),n(Jt),n(Dt),n($e),n(_e),n(J),n(ye),n(Pe),...m()].filter(be=>!!be).sort(Ba));var Ve=Le(),st=de(Ve);{var mt=be=>{var Je=wy();Je.__contextmenu=[xy],Je.__keydown=[yy,Be],wi(Je,21,()=>n(It),We=>We.id,(We,nt)=>{zf(We,{get id(){return n(nt).id},get label(){return n(nt).label},get ariaLabel(){return n(nt).ariaLabel},get onClick(){return n(nt).onClick},closeContextMenu:Be})}),w(Je),ot(Je,We=>$(We),()=>$()),B(()=>{var We,nt;return Ge(Je,`top: ${(We=n(C))!=null?We:""}px; left: ${(nt=n(S))!=null?nt:""}px;`)}),_(be,Je)};V(st,be=>{f()&&be(mt)})}_(t,Ve),H(),o()}rt(["contextmenu","keydown"]);var Du=class{constructor(e){this.value=e,this.next=null}};var Hl=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 Ty=L('<div class="container s-1f"><canvas class="s-1f"></canvas></div>'),Cy={hash:"s-1f",code:".container.s-1f{display:inline-block;height:16px;width:120px}canvas.s-1f{margin-top:2px;transform:scaleY(-1)}"};function zd(t,e){F(e,!0),q(t,Cy);let i=g(e,"values",19,()=>[]),o=K(void 0),r=K(null),a=16,l=120,d=60,s=l/d;Nt(()=>{n(o).width=l,n(o).height=a,N(r,n(o).getContext("2d"),!0)});function u(f,b,y,$,S){S===0&&(S=1),f.fillStyle="#fff",f.fillRect(b,y,$,S)}De(()=>{let f="";if(n(r)){let b=i()[0];for(let $=1;$<i().length;$++)i()[$]>b&&(b=i()[$]);n(r).clearRect(0,0,l,a);let y=d-1;for(let $=i().length-1;$>=0;$--){let S=y*s,C=b>0?a*(i()[$]/b):0;u(n(r),S,0,s,C),f=C+" "+f,y--}}});var p=Ty(),m=T(p);ot(m,f=>N(o,f),()=>n(o)),w(p),_(t,p),H()}import{safeStorage as B_}from"@vkontakte/videoplayer-shared/es2015";var Iy=(t,e)=>{t.stopPropagation(),B_.remove(Pd),e.set(!1)},Ey=L('<div class="s-l"><div class="s-l">Video id</div> <span> </span></div>'),Py=L('<div class="s-l"><div class="s-l">VSID</div> <span> </span></div>'),Ay=L('<div class="s-l"><div class="s-l">Provider</div> <span> </span></div>'),ky=L('<div class="s-l"><div class="s-l">Streams</div> <span> </span></div>'),Ly=L('<div class="s-l"><div class="s-l">Viewport</div> <span> </span></div>'),My=L('<div class="s-l"><div class="s-l">Video size</div> <span> </span></div>'),Vy=L('<div class="s-l"><div class="s-l">CDN host</div> <span> </span></div>'),Ry=L('<div class="s-l"><div class="s-l">Volume</div> <span> </span></div>'),Ny=L('<div class="s-l"><div class="s-l">Position</div> <span> </span></div>'),Oy=L('<div class="s-l"><div class="s-l">Buffer</div> <span> </span></div>'),Dy=L('<div class="s-l"><div class="s-l">Live latency</div> <span> </span></div>'),By=L('<div class="s-l"><div class="s-l">Segment</div> <span> </span></div>'),Fy=L('<div class="s-l"><div class="s-l">Network</div> <!> <span> </span></div>'),Hy=L('<div class="s-l"><div class="s-l">V bitrate</div> <!> <span> </span></div>'),Uy=L('<div role="region"><button class="close s-l" title="закрыть">[x]</button> <div class="content s-l"><div class="s-l"><div class="s-l">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-l"><div class="s-l">Dropped</div> <span> </span></div> <!> <!> <div class="s-l"><div class="s-l">FPS</div> <!> <span> </span></div></div></div>'),zy={hash:"s-l",code:".container.s-l{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-l{left:16px;top:16px}button.close.s-l{background-color:transparent;border:none;color:#fff;cursor:pointer;outline:0;padding:0;position:absolute;right:5px;top:3px}.content.s-l{padding:5px}.content.s-l>div:where(.s-l)>div:where(.s-l){display:inline-block;padding:0 5px;text-align:right;width:60px}"};function Wd(t,e){F(e,!0),q(t,zy);let[i,o]=Re(),r=()=>x(d,"$isMobile",i),a=ve(),l=a.ui.debugPanelVisible,d=a.ui.isMobile,s=K(ci(a.actions.internal.getDebugPanelData())),u=a.actions.internal.getVideoElement(),p=K(0),m=K(0),f=K(0),b=new Hl(60),y=new Hl(60),$=new Hl(60),S=K(ci([])),C=K(ci([])),I=K(ci([])),R=Q("aria_label_debug_panel");Nt(()=>{B_.set(Pd,"true"),a.actions.internal.startLogging(),u&&(N(m,u.getVideoPlaybackQuality().droppedVideoFrames,!0),N(p,u.getVideoPlaybackQuality().totalVideoFrames,!0));let $e=window.setInterval(()=>{N(s,a.actions.internal.getDebugPanelData(),!0)},500),_e;return u&&(_e=window.setInterval(()=>{if(u){N(m,u.getVideoPlaybackQuality().droppedVideoFrames,!0);let J=u.getVideoPlaybackQuality().totalVideoFrames;N(f,J-n(p)),N(p,J,!0),b.push(n(f)),n(s).speed&&y.push(n(s).speed),n(s).bitrate&&$.push(n(s).bitrate),N(S,b.getValuesFromBottom(),!0),N(C,y.getValuesFromBottom(),!0),N(I,$.getValuesFromBottom(),!0)}},1e3)),()=>{a.actions.internal.stopLogging(),clearInterval($e),_e&&clearInterval(_e)}});var E=Uy();let P;var O=T(E);O.__click=[Iy,l];var D=k(O,2),U=T(D),z=k(T(U),2),G=T(z,!0);w(z),w(U);var le=k(U,2);{var Y=$e=>{var _e=Ey(),J=k(T(_e),2),ye=T(J,!0);w(J),w(_e),B(()=>pe(ye,n(s).id)),_($e,_e)};V(le,$e=>{n(s).id&&$e(Y)})}var re=k(le,2);{var X=$e=>{var _e=Py(),J=k(T(_e),2),ye=T(J,!0);w(J),w(_e),B(()=>pe(ye,n(s).vsid)),_($e,_e)};V(re,$e=>{n(s).vsid&&$e(X)})}var we=k(re,2);{var ce=$e=>{var _e=Ay(),J=k(T(_e),2),ye=T(J,!0);w(J),w(_e),B(()=>pe(ye,n(s).provider)),_($e,_e)};V(we,$e=>{n(s).provider&&$e(ce)})}var ne=k(we,2);{var he=$e=>{var _e=ky(),J=k(T(_e),2),ye=T(J);w(J),w(_e),B(()=>{var Pe,It;return pe(ye,`Video: ${(Pe=n(s).videoCodec||"")!=null?Pe:""} ${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"},h_=Ly;var As=new Map;As.set(b_.EN,h_);As.set(b_.RU,g_);var $_=new Map,Mf=({language:t,pack:e,fallback:i})=>{if(As.has(t)){let o=As.get(t);As.set(t,Ie(Ie({},o),e))}else As.set(t,e);$_.set(t,i)},Vf=t=>As.has(t),Rf=(t,e,i,o)=>{var l;let r=As.get(t),a=r==null?void 0:r[e];if(__(a)){let d=(l=$_.get(t))!=null?l:o,s=d?As.get(d):void 0;a=s==null?void 0:s[e]}return __(a)?e+Object.values(i!=null?i:{}).join(" "):i?a.replaceAll(/{(\w+?)}/g,(d,s)=>{var u;return(u=i[s])!=null?u:""}):a},G=(t,e)=>{let{interfaceLanguage$:i}=ve(),o=ge(i),r=Vt();return Rf(o,t,e,r.defaultLanguage)};var My=Ce('<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 Md(t,e){B(e,!1);let i=G("video360");xo(),Xe(t,{width:"76",height:"45",get ariaLabel(){return i},testId:"video-360-icon",shadow:!0,children:(o,r)=>{var a=My();b(o,a)},$$slots:{default:!0}}),F()}import"@vkontakte/videoplayer-core/es2015";var Vl;(function(t){t.fatal="fatal",t.error="error",t.warning="warning",t.log="log",t.info="info",t.debug="debug",t.critical="critical"})(Vl||(Vl={}));var Vy=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ry=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,Ny=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Tu="?",Oy="X-Sentry-Auth",Dy=/^(?:(\w+):)\/\/(?:([\w-]+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function By(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=Vy.exec(i[a]))r={filename:o[2]&&o[2].indexOf("address at ")===0?o[2].substr(11):o[2],function:o[1]||Tu,lineno:o[3]?+o[3]:null,colno:o[4]?+o[4]:null};else if(o=Ny.exec(i[a]))r={filename:o[2],function:o[1]||Tu,lineno:+o[3],colno:o[4]?+o[4]:null};else if(o=Ry.exec(i[a]))a===0&&!o[5]&&t.columnNumber!==void 0&&(e[0].column=t.columnNumber+1),r={filename:o[3],function:o[1]||Tu,lineno:o[4]?+o[4]:null,colno:o[5]?+o[5]:null};else continue;!r.function&&r.lineno&&(r.function=Tu),e.push(r)}return e.length?{value:y_(t),type:t.name,stacktrace:{frames:e.reverse()}}:null}function y_(t){return(t&&t.message||"No error message").split(`
56
+ `).filter(i=>!!i)[0]}function Fy(t){try{let e=By(t);if(e)return e}catch(e){}return{value:y_(t),type:t&&t.name,stacktrace:{frames:[]}}}function Hy(){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=Dy.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 Gt(Ie({},this.getRequestBlank()),{exception:{values:[Fy(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(Oy,this.authHeader||""),i.send(JSON.stringify(e))}getRequestBlank(){return{platform:"javascript",event_id:Hy(),sdk:{name:"micro-sentry.javascript.core",version:"0.0.0"},timestamp:Date.now()/1e3,environment:this.environment}}};function x_(t,e){return Object.prototype.toString.call(e)==="[object RegExp]"?e.test(t):typeof e=="string"?t.indexOf(e)!==-1:!1}function Uy(){return window}var Iu=class t extends Cu{constructor(e,i=Uy()){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",Ie({},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",Ie({},e)),this}setUser(e){return this.setKeyState("user",Ie({},e)),this}clone(){let e=new t(Gt(Ie({},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:[Ie({timestamp:Date.now()/1e3},this.beforeBreadcrumb(e))]})}setBreadcrumbs(e){this.setKeyState("breadcrumbs",e)}captureMessage(e,i){this.send(Gt(Ie({},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=>x_(i,o))):!1}getRequestBlank(){return Ie(Gt(Ie({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(Ie({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=>x_(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 Gt(Ie({},i),{[o]:a||d?[...a||[],...d||[]]:Ie(Ie({},typeof r!="string"?r:{}),typeof l!="string"?l:{})})},this._state)}setKeyState(e,i){this._state[e]=i}};import{isNonNullable as Eu,Subscription as zy}from"@vkontakte/videoplayer-shared/es2015";var Pu=null,Ma=class{constructor(e,i,o={}){!Pu&&e.dsn&&(this.sentryClient=new Iu({dsn:e.dsn,environment:i.env}),this.version=i.version,this.sentrySubscription=new zy,this.options=e,this.context=o,Pu=this)}destroy(){var e,i;(e=this.sentryClient)==null||e.destroy(),(i=this.sentrySubscription)==null||i.unsubscribe(),Pu=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:f,category:$}=i;if(Eu($)&&p.includes($)||Eu(f)&&m.includes(f))return;if(Math.random()<=d||Eu($)&&u.includes($)||Eu(f)&&s.includes(f)){Object.keys(i).length&&r.setTags(Ie({version:this.version},i)),(Object.keys(a).length||Object.keys(o).length)&&r.setExtras(Ie(Ie({},a),o));try{f&&r.captureMessage(f,i.fatal?Vl.fatal:Vl.error),r.report(e)}catch(_){console.error(_)}}}static getInstance(){return Pu}};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 Au=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(),w_=(t,e)=>e?!0:t.fullscreenEnabled||!!t.webkitFullscreenEnabled||!!t.mozFullscreenEnabled||!!t.msFullscreenEnabled,S_=t=>{let e=t;e!=null&&e.webkitExitFullscreen&&(e==null||e.webkitExitFullscreen())},Vd=()=>{let t=document;return t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||t.msFullscreenElement},ta=()=>!!Vd(),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_=t=>{let e=window.screen;return(r=>mt(null,null,function*(){return 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 C_}from"@vkontakte/videoplayer-core/es2015";var I_=()=>({title:G("hotkey_map_modal_title"),closeBtnText:G("hotkey_map_modal_close_btn_text"),groups:[{title:G("hotkey_map_group_title_common"),items:[{description:G("hotkey_map_item_mute_description"),value:G("hotkey_map_item_mute_value")},{description:G("hotkey_map_item_volume_up_description"),value:G("hotkey_map_item_volume_up_value")},{description:G("hotkey_map_item_volume_down_description"),value:G("hotkey_map_item_volume_down_value")},{description:G("hotkey_map_item_pip_description"),value:G("hotkey_map_item_pip_value")},{description:G("hotkey_map_item_full_screen_description"),value:G("hotkey_map_item_full_screen_value")},{description:G("hotkey_map_item_show_context_menu_description"),value:G("hotkey_map_item_show_context_menu_value")},{description:G("hotkey_map_item_show_hotkey_map_description"),value:G("hotkey_map_item_show_hotkey_map_value")}]},{title:G("hotkey_map_group_title_playback"),items:[{description:G("hotkey_map_item_play_toggle_description"),value:G("hotkey_map_item_play_toggle_value")},{description:G("hotkey_map_item_seek_backward_description"),value:G("hotkey_map_item_seek_backward_value")},{description:G("hotkey_map_item_seek_forward_description"),value:G("hotkey_map_item_seek_forward_value")},{description:G("hotkey_map_item_fast_seek_backward_description"),value:G("hotkey_map_item_fast_seek_backward_value")},{description:G("hotkey_map_item_fast_seek_forward_description"),value:G("hotkey_map_item_fast_seek_forward_value")},{description:G("hotkey_map_item_rate_down_description"),value:G("hotkey_map_item_rate_down_value")},{description:G("hotkey_map_item_rate_up_description"),value:G("hotkey_map_item_rate_up_value")},{description:G("hotkey_map_item_prev_frame_description"),value:G("hotkey_map_item_prev_frame_value")},{description:G("hotkey_map_item_next_frame_description"),value:G("hotkey_map_item_next_frame_value")},{description:G("hotkey_map_item_jump_seek_description"),value:G("hotkey_map_item_jump_seek_value")},{description:G("hotkey_map_item_next_video_description"),value:G("hotkey_map_item_next_video_value")},{description:G("hotkey_map_item_prev_video_description"),value:G("hotkey_map_item_prev_video_value")}]},{title:G("hotkey_map_group_title_subtitles"),items:[{description:G("hotkey_map_item_subtitles_toggle_description"),value:G("hotkey_map_item_subtitles_toggle_value")}]},{title:G("hotkey_map_group_title_episodes"),items:[{description:G("hotkey_map_item_prev_episode_description"),value:C_.device.isApple?G("hotkey_map_item_prev_episode_mac_value"):G("hotkey_map_item_prev_episode_pc_value")},{description:G("hotkey_map_item_next_episode_description"),value:C_.device.isApple?G("hotkey_map_item_next_episode_mac_value"):G("hotkey_map_item_next_episode_pc_value")}]}]});import{debounceFn as Wy,ValueSubject as Nf}from"@vkontakte/videoplayer-shared/es2015";var Va=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:Wy(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}revealPictureInPicture(){return mt(this,null,function*(){this.isRequested&&(this.removeEventHandlers(),yield this.request(),this.addEventHandlers())})}request(){return mt(this,null,function*(){var e;if(!(!this.isSupported()||this.isActive()))try{yield(e=this.videoElement)==null?void 0:e.requestPictureInPicture()}catch(i){this.isRequested=!1}})}exit(){return mt(this,null,function*(){!this.isSupported()||!this.isActive()||(yield 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=Ie({},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)}dispose(){return mt(this,null,function*(){this.removeEventHandlers(),yield 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 Ra(t){return t instanceof Va}import{devNull as E_,now as P_}from"@vkontakte/videoplayer-shared/es2015";function Df(t,e){B(e,!1);let i=ve();Mt(()=>{i.getAdmanWrapper().startPostroll()}),xo(),F()}import{noop as Qy}from"@vkontakte/videoplayer-shared/es2015";var Ky=Ce('<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>'),qy=Ce('<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 Mr(t,e){B(e,!0);let i=g(e,"direction",3,"left"),o=g(e,"useBtnColor",3,!1),r=v(()=>["up","down"].includes(i())),a=v(()=>["right","down"].includes(i())),l=v(()=>`chevron-icon--${i()}`),d=v(()=>(()=>{let m="";return n(a)&&(m+="transform: rotate(180deg);"),m.length?m:void 0})()),s=v(()=>o()?ea:"currentColor"),u=v(()=>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 f=Le(),$=de(f);{var y=S=>{var C=Ky();b(S,C)},_=S=>{var C=qy();b(S,C)};R($,S=>{n(r)?S(y):S(_,!1)})}b(m,f)},$$slots:{default:!0}}),F()}var Gy=(t,e,i)=>{t.stopPropagation(),n(e)&&i()()},Yy=M('<div class="skip s-1j"> <!></div>'),jy=M("<div><!></div>"),Xy={hash:"s-1j",code:".container.s-1j{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-1j{bottom:14px;font-size:15px;max-width:142px;top:unset}.skip.s-1j{align-items:flex-end;display:flex;gap:4px;white-space:nowrap}.skippable.s-1j{color:var(--white);cursor:pointer}.skippable.s-1j:hover{color:hsla(0,0%,100%,.75)}"};function Bf(t,e){B(e,!0),q(t,Xy);let[i,o]=Re(),r=()=>x(u,"$isMobile",i),a=g(e,"position",3,0),l=g(e,"secondsToWatchBeforeSkip",3,0),d=g(e,"skipAd",3,Qy),u=ve().ui.isMobile,m=v(()=>a()>0&&a()>=l());var p=jy();let f;p.__click=[Gy,m,d];var $=T(p);{var y=S=>{var C=Yy(),I=T(C),N=L(I);Mr(N,{direction:"right"}),w(C),D(P=>me(I,`${P!=null?P:""} `),[()=>G("skip_ads_now")]),b(S,C)},_=S=>{var C=ps();D(I=>me(C,I),[()=>G("skip_ads_after",{time:Math.ceil(l()-a()).toFixed(0)})]),b(S,C)};R($,S=>{n(m)?S(y):S(_,!1)})}w(p),D(S=>f=se(p,1,"container s-1j",null,f,S),[()=>({"container-mobile":r(),skippable:n(m)})]),b(t,p),F(),o()}tt(["click"]);var Zy=M('<button class="go-to-site s-1k"> </button>'),Jy={hash:"s-1k",code:"button.go-to-site.s-1k{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 Ff(t,e){B(e,!1),q(t,Jy),xo();var i=Zy(),o=T(i,!0);w(i),D(r=>me(o,r),[()=>G("visit_advertiser")],wn),b(t,i),F()}var e1=M('<div class="top-gradient-mobile s-o"></div>'),t1=M('<div class="container s-o"><!> <video style="width: 100%; height: 100%" playsinline=""></video> <!> <!> <!></div>',2),i1={hash:"s-o",code:".container.s-o{height:100%;width:100%}.top-gradient-mobile.s-o{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 Nd(t,e){B(e,!0),q(t,i1);let[i,o]=Re(),r=()=>x(H,"$canSkipAd",i),a=()=>x(Q,"$adPlaybackState",i),l=()=>x(I,"$isMobile",i),d=()=>x(z,"$adPosition",i),s=()=>x(Y,"$secondsToWatchBeforeSkipAd",i),u=()=>x(C,"$isVideoEnded",i),m=g(e,"adsSlotId",3,void 0),p=g(e,"adsParams",3,void 0),f=g(e,"adsAutoplayParam",3,void 0),$=g(e,"duration",3,0),y=g(e,"adsExternalApi",3,void 0),_=ve(),S=Vt(),C=_.state.isEnded$,I=_.ui.isMobile,N=S.ads.isMobileGoToSiteButton,P=K(void 0),E=K(void 0),k=!1,Q=_.ads.playbackState,H=_.ads.canSkip,z=_.ads.position,Y=_.ads.secondsToWatchBeforeSkip,le=v(()=>r()&&a()!=="inactive"),X=v(()=>l()&&a()!=="inactive"&&N);Mt(()=>{let A=_.getAdmanWrapper();if(E_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_mount"],numbers:[P_(),m()]}),!m()){A.onAdmanLoadingError();return}let We=()=>{var Pe;let{width:De,height:Be}=ge(_.ui.playerSize),it=ge(_.ui.isFullscreen),U=(Pe=f())!=null?Pe:ge(_.ui.isAutoplay),ke=S.ads.paramsOverride;return{width:De,height:Be,isFullscreen:it,isAutoplay:U,adsContainer:n(P),adsVideoElement:n(E),slotId:m(),params:p(),paramsOverride:ke,duration:$(),externalApi:y()}},Te=De=>mt(null,null,function*(){De&&(yield _o());let Be=We();yield A.initAdman(Be),k=!0}),j=new AbortController,ie=()=>{j.abort()};return window.AdmanHTML?Te(!0).catch(()=>{A.onAdmanLoadingError()}):A.loadAdman(j.signal).then(()=>Te(!1)).catch(()=>{A.onAdmanLoadingError()}),()=>{E_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_unmount"],numbers:[P_(),m()]}),!k&&ie()}});var re=t1(),Z=T(re);{var we=A=>{var We=e1();b(A,We)};R(Z,A=>{l()&&A(we)})}var ue=L(Z,2);je(ue,A=>O(E,A),()=>n(E));var ne=L(ue,2);{var _e=A=>{Bf(A,{get position(){return d()},get secondsToWatchBeforeSkip(){return s()},get skipAd(){return _.actions.internal.skipAd}})};R(ne,A=>{n(le)&&A(_e)})}var xe=L(ne,2);{var J=A=>{Df(A,{})};R(xe,A=>{u()&&A(J)})}var Ne=L(xe,2);{var pe=A=>{Ff(A,{})};R(Ne,A=>{n(X)&&A(pe)})}w(re),je(re,A=>O(P,A),()=>n(P)),b(t,re),F(),o()}var Xo=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 o1=Ce('<path fill="#fff"></path>'),n1=Ce("<path></path><!>",1);function Od(t,e){let i=g(e,"isActive",3,!1),o=v(()=>i()?"live-active-icon":"live-icon"),r=v(()=>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=n1(),u=de(s),m=L(u);{var p=f=>{var $=o1();Ve($,"d",a),b(f,$)};R(m,f=>{i()&&f(p)})}D(()=>Ve(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 r1=M('<div class="equalizer s-c"><div class="col s-c"></div> <div class="col s-c"></div> <div class="col s-c"></div></div>'),s1=M('<div class="live-icon s-c"><!></div>'),a1=M('<span class="text s-c"> </span>'),l1=M("<div><!> <!></div>"),d1={hash:"s-c",code:".wrapper.s-c{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-c{background:var(--red);border-radius:2px;font-size:0;height:20px;line-height:20px;padding:0 7px}.equalizer.s-c{display:inline-block;height:10px;margin-right:4px;margin-top:-4px;position:relative;vertical-align:middle;width:10px}.live.s-c .equalizer:where(.s-c){margin-top:-2px}.equalizer.s-c .col:where(.s-c){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-c .equalizer:where(.s-c) .col:where(.s-c){animation-play-state:running}.equalizer.s-c .col:where(.s-c):first-child{animation-name:s-c-thumb-timer-equalizer-col1;left:0}.equalizer.s-c .col:where(.s-c):nth-child(2){animation-name:s-c-thumb-timer-equalizer-col2;left:3px}.equalizer.s-c .col:where(.s-c):nth-child(3){animation-name:s-c-thumb-timer-equalizer-col3;left:6px}.live-icon.s-c{display:inline-block;height:20px;margin:0 -7px;vertical-align:middle;width:42px}@keyframes s-c-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-c-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-c-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-c{color:var(--controls-time);font-size:13px;font-weight:500;line-height:16px}"};function Dd(t,e){q(t,d1);let i=g(e,"withEqualizer",3,!1),o=g(e,"isLive",3,!1),r=g(e,"isPlaying",3,!1);var a=l1();let l;var d=T(a);{var s=f=>{var $=r1();b(f,$)};R(d,f=>{i()&&f(s)})}var u=L(d,2);{var m=f=>{var $=s1(),y=T($);Od(y,{isActive:!0}),w($),b(f,$)},p=f=>{var $=a1(),y=T($,!0);w($),D(()=>me(y,e.time)),b(f,$)};R(u,f=>{o()?f(m):f(p,!1)})}w(a),D(f=>l=se(a,1,"wrapper s-c",null,l,f),[()=>({live:o(),playing:r()})]),b(t,a)}var Rl=(t,e,i)=>{let o;return()=>(window.clearTimeout(o),t?o=window.setTimeout(()=>e.set(!0),i):e.set(!1),()=>window.clearTimeout(o))};var c1=M('<div role="timer" data-testid="thumb-timer"><!></div>'),u1={hash:"s-m",code:".thumb-timer.s-m{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 Bd(t,e){B(e,!0),q(t,u1);let[i,o]=Re(),r=()=>x(m,"$disabled",i),a=g(e,"isHidden",3,!1),l=g(e,"isLive",3,!1),d=g(e,"isPlaying",3,!1),s=Vt(),u=v(()=>Xo(e.duration-e.position)),m=ae(!1);var p=c1();let f;var $=T(p);Dd($,{get time(){return n(u)},get isLive(){return l()},get isPlaying(){return d()},withEqualizer:!0}),w(p),Es(p,()=>Rl(a()&&s.features.usePerformanceFix,m,s.disableInvisibleComponentsTimeout)),D(y=>f=se(p,1,"thumb-timer s-m",null,f,y),[()=>({"out-of-flow":r(),hidden:a()})]),b(t,p),F(),o()}var Nl=t=>{if(!navigator.clipboard){A_(t);return}navigator.clipboard.writeText(t).catch(()=>A_(t))};function A_(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 x1}from"@vkontakte/videoplayer-core/es2015";import{clientChecker as k_}from"@vkontakte/videoplayer-core/es2015";var Hf="focus-hidden";var Vr=t=>{t.stopPropagation(),t.preventDefault()},Uf=t=>{var e,i;(i=(e=t.parentNode)==null?void 0:e.firstElementChild)==null||i.classList.remove(Hf)},f1=t=>{var i;let e=t.previousElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.lastElementChild),e==null||e.focus()},m1=t=>{var i;let e=t.nextElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.firstElementChild),e==null||e.focus()},v1=t=>{let e=t.code;return e==="Tab"&&!t.shiftKey||e==="ArrowDown"},g1=t=>{let e=t.code;return e==="Tab"||e==="ArrowUp"},L_=t=>t.code==="Escape",h1=t=>t.code==="ArrowLeft",Fd=(t,e=[])=>{let i=t.code;return["Enter","Space",...e].includes(i)},M_=t=>{v1(t)?(Vr(t),m1(t.target)):g1(t)&&(Vr(t),f1(t.target))},na=t=>!k_.device.isAndroid&&(t==null?void 0:t.detail)===0||k_.device.isAndroid&&(t==null?void 0:t.pointerType)==="",Ol=(t,e,i)=>mt(null,null,function*(){yield _o(),t&&!t.classList.contains("opened")&&!e&&ge(i)&&(yield _o(),i.set(!1),t.focus())}),V_=(t,e,i)=>mt(null,null,function*(){yield _o(),t&&!e&&ge(i)&&(i.set(!1),t.focus())}),Hd=(t,e,i,o=!1)=>mt(null,null,function*(){if(yield _o(),!!t&&e&&!o){let a=t.children[0];a==null||a.classList.toggle(Hf,!i),a==null||a.focus()}}),R_=(t,e)=>mt(null,null,function*(){setTimeout(()=>{let i=t[e];!!i&&i.focus()},100)}),Vu=(t,e)=>{M_(t),Uf(t.target),L_(t)&&(Vr(t),e())},Ru=(t,e)=>mt(null,null,function*(){Fd(t,["ArrowRight"])&&(Vr(t),e())}),N_=(t,e,i)=>mt(null,null,function*(){if(M_(t),h1(t)){Vr(t),e();return}L_(t)&&(Vr(t),i())}),Dl=(t,e)=>{Fd(t)&&(Vr(t),e())},O_=(t,e,i)=>{if(Fd(t))Vr(t),i(!e);else{let o=t.code;if(o==="ArrowLeft"&&e){i(!1),Vr(t);return}o==="ArrowRight"&&!e&&(i(!0),Vr(t))}},D_=t=>{let e=t.getBoundingClientRect(),i=-14,o=e.left+e.width,r=e.top+i;return{right:o,bottom:r}},B_=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 w1}from"@vkontakte/videoplayer-shared/es2015";var Zr={"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 F_}from"@vkontakte/videoplayer-shared/es2015";var b1=(t,e)=>{Dl(t,()=>e())},$1=M('<li class="item s-1o" role="menuitem" tabindex="0"> </li>'),y1={hash:"s-1o",code:".item.s-1o{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-1o:hover{background:rgba(66,66,66,.5);color:var(--white)}"};function zf(t,e){B(e,!0),q(t,y1);let i=g(e,"onClick",3,F_),o=g(e,"closeContextMenu",3,F_),r=d=>{d==null||d.stopPropagation(),i()(),o()()};var a=$1();a.__click=r,a.__keydown=[b1,r];var l=T(a,!0);w(a),D(()=>{var d;Ve(a,"aria-label",(d=e.ariaLabel)!=null?d:e.label),Ve(a,"data-testid",e.id),me(l,e.label)}),b(t,a),F()}tt(["click","keydown"]);var Oa=(t,e)=>t.weight-e.weight;var Ud=(o=>(o.OPEN_SUB_MENU="OPEN_SUB_MENU",o.CLICK="CLICK",o.SWITCH="SWITCH",o))(Ud||{});var S1=(t,e)=>{Vu(t,e)},T1=t=>{t.preventDefault()},C1=M('<ul role="menu" class="s-y"></ul>'),I1={hash:"s-y",code:"ul.s-y{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),q(t,I1);let[i,o]=Re(),r=()=>x(we,"$playerPhase",i),a=()=>x(le,"$isLive$",i),l=()=>x(ue,"$isPiPEnabled$",i),d=()=>x(Y,"$chromecastState$",i),s=()=>x(ne,"$pictureInPictureApiIsActive$",i),u=()=>x(Z,"$isLooped$",i),m=()=>x(X,"$positionExact$",i),p=()=>x(Q,"$additionalContextMenuItems$",i),f=g(e,"visible",3,!1),$=g(e,"position",19,()=>({top:0,left:0})),y=g(e,"playerContainerRef",3,void 0),_=g(e,"menuElementRef",15,void 0),S=K(0),C=K(0),I=ve(),{pictureInPicture$:N}=wo(),P=Vt(),E=I.ui.contextMenu.visible$,k=I.ui.debugPanelVisible,Q=I.ui.additionalContextMenuItems$,H=I.ui.t,z=I.actions.internal.togglePictureInPicture,Y=I.state.chromecastState$,le=I.state.isLive$,X=I.state.positionExact$,re=I.state.isInteractive,Z=I.state.looped$,we=I.playerPhase,{isEnabled$:ue,isActive$:ne}=N,_e=v(()=>r()==="video"),xe=v(()=>!!a()&&n(_e)),J=v(()=>["thumb","LiveWaitingStart","LiveWaitingRecover","LiveWaitingRecord"].includes(r())),Ne=v(()=>{var ce;return P.features.copyVideoLink&&((ce=I.callbacks)==null?void 0:ce.onCopyVideoLink)}),pe=v(()=>n(Ne)&&!n(J)&&!re&&!n(xe)),A=v(()=>{var ce;return!!((ce=I.callbacks)!=null&&ce.onCopyEmbedCodeClicked)}),We=v(()=>l()&&d()!==x1.CONNECTED&&!re&&n(_e)),Te=v(()=>!re&&!n(J)&&!n(xe)),j=v(()=>P.features.videoRotate&&!re&&!n(J)),ie=v(()=>P.showSupport&&!s()),De=v(()=>P.features.saveTraceInfoToFile),Be=()=>{var ce;E.set(!1),(ce=e.returnFocus)==null||ce.call(e)},it=(ce,ze)=>{if(!_()||!y())return;let Ge=_().getBoundingClientRect(),at=y().getBoundingClientRect();O(S,ce-at.left),O(C,ze-at.top),n(S)+Ge.width>at.width&&O(S,at.width-Ge.width),n(C)+Ge.height>at.height&&O(C,at.height-Ge.height),O(S,Math.max(n(S),0),!0),O(C,Math.max(n(C),0),!0)};Oe(()=>{mt(null,null,function*(){if(_()&&y()){yield _o();let{top:ze,left:Ge,bottom:at,right:Ft}=$(),Ht=Ge!=null?Ge:0,oi=ze!=null?ze:0,yi=_().getBoundingClientRect();Nu(Ge)&&!Nu(Ft)&&(Ht=Ft-yi.width),Nu(ze)&&!Nu(at)&&(oi=at-yi.height),Ht=Math.max(Ht,0),oi=Math.max(oi,0),it(Ht,oi)}})});let U=()=>{I.actions.internal.videoRotate()},ke=()=>{w1(e.supportLink)&&window.open(e.supportLink,"_blank"),I.actions.internal.reportProblem(),I.actions.internal.pause()},Pe=()=>{let ce=I.actions.internal.getDebugTextData();if(P.features.saveDebugInfoToFile){let ze=new Blob([...ce],{type:"plain/text"}),Ge=window.URL.createObjectURL(ze);La(Ge,"vk_player_debug_info","txt")}else Nl(I.actions.internal.getDebugTextData())},Ue=()=>{let ce=I.actions.internal.getTraceTextData(),ze=new Blob([...ce],{type:"application/json"}),Ge=window.URL.createObjectURL(ze);La(Ge,"vk_player_trace_info","json")},Ze=()=>{k.set(!0)},ye=()=>mt(null,null,function*(){var ce;try{z()}finally{(ce=e.returnFocus)==null||ce.call(e)}}),Ae=()=>{I.actions.internal.setLooped(!u())},Fe=()=>{var ce,ze;if(n(A)){let Ge=(ze=(ce=I.callbacks)==null?void 0:ce.onCopyEmbedCodeClicked)==null?void 0:ze.call(ce);Ge&&Nl(Ge)}},Dt=(ce=!1)=>{var ze,Ge;if((ze=I.callbacks)!=null&&ze.onCopyVideoLink){let at=(Ge=I.callbacks)==null?void 0:Ge.onCopyVideoLink(ce,m());at&&Nl(at)}},pt=v(()=>P.features.saveDebugInfoToFile?H("menu_save_debug"):H("menu_copy_debug")),Bt=v(()=>n(Ne)?{id:"copy-link",weight:Zr["copy-link"],label:H("menu_copy_video_link"),onClick:()=>Dt()}:void 0),st=v(()=>n(pe)?{id:"copy-link-timestamp",weight:Zr["copy-link-timestamp"],label:H("menu_copy_video_link_with_timestamp"),onClick:()=>Dt(!0)}:void 0),St=v(()=>n(A)?{id:"copy-embed-code",weight:Zr["copy-embed-code"],label:H("menu_copy_embed_code"),onClick:Fe}:void 0),ti=v(()=>n(We)?{id:"pip",weight:Zr.pip,label:s()?H("menu_pip_close"):H("menu_pip"),onClick:ye}:void 0),Rt=v(()=>n(Te)?{id:"video-loop",weight:Zr["video-loop"],label:u()?H("menu_video_loop_off"):H("menu_video_loop_on"),ariaLabel:H("aria_label_menu_loop"),onClick:Ae}:void 0),$e=v(()=>n(j)?{id:"rotate",weight:Zr.rotate,label:H("menu_video_rotate"),ariaLabel:H("aria_label_menu_rotate"),onClick:U}:void 0),be=v(()=>n(ie)?{id:"report",weight:Zr.report,label:H("menu_report"),ariaLabel:`${H("menu_report")}. ${H("aria_label_new_tab_alert")}`,onClick:ke}:void 0),ee=v(()=>({id:"save-debug",weight:Zr["save-debug"],label:n(pt),onClick:Pe})),ot=v(()=>n(De)?{id:"save-trace",weight:Zr["save-trace"],label:H("menu_save_debug"),onClick:Ue}:void 0),fe=v(()=>({id:"debug-info",weight:Zr["debug-info"],label:H("menu_debug_overlay"),ariaLabel:H("aria_label_menu_debug_overlay"),onClick:Ze})),Me=v(()=>[n(Bt),n(st),n(St),n(ti),n(Rt),n($e),n(be),n(ee),n(ot),n(fe),...p()].filter(ce=>!!ce).sort(Oa));var $t=Le(),At=de($t);{var ct=ce=>{var ze=C1();ze.__contextmenu=[T1],ze.__keydown=[S1,Be],wi(ze,21,()=>n(Me),Ge=>Ge.id,(Ge,at)=>{zf(Ge,{get id(){return n(at).id},get label(){return n(at).label},get ariaLabel(){return n(at).ariaLabel},get onClick(){return n(at).onClick},closeContextMenu:Be})}),w(ze),je(ze,Ge=>_(Ge),()=>_()),D(()=>{var Ge,at;return Qe(ze,`top: ${(Ge=n(C))!=null?Ge:""}px; left: ${(at=n(S))!=null?at:""}px;`)}),b(ce,ze)};R(At,ce=>{f()&&ce(ct)})}b(t,$t),F(),o()}tt(["contextmenu","keydown"]);var Ou=class{constructor(e){this.value=e,this.next=null}};var Bl=class{constructor(e){this.top=null,this.bottom=null,this.size=0,this.maxSize=e}push(e){let i=new Ou(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 E1=M('<div class="container s-1e"><canvas class="s-1e"></canvas></div>'),P1={hash:"s-1e",code:".container.s-1e{display:inline-block;height:16px;width:120px}canvas.s-1e{margin-top:2px;transform:scaleY(-1)}"};function zd(t,e){B(e,!0),q(t,P1);let i=g(e,"values",19,()=>[]),o=K(void 0),r=K(null),a=16,l=120,d=60,s=l/d;Mt(()=>{n(o).width=l,n(o).height=a,O(r,n(o).getContext("2d"),!0)});function u(f,$,y,_,S){S===0&&(S=1),f.fillStyle="#fff",f.fillRect($,y,_,S)}Oe(()=>{let f="";if(n(r)){let $=i()[0];for(let _=1;_<i().length;_++)i()[_]>$&&($=i()[_]);n(r).clearRect(0,0,l,a);let y=d-1;for(let _=i().length-1;_>=0;_--){let S=y*s,C=$>0?a*(i()[_]/$):0;u(n(r),S,0,s,C),f=C+" "+f,y--}}});var m=E1(),p=T(m);je(p,f=>O(o,f),()=>n(o)),w(m),b(t,m),F()}import{safeStorage as H_}from"@vkontakte/videoplayer-shared/es2015";var A1=(t,e)=>{t.stopPropagation(),H_.remove(Ed),e.set(!1)},k1=M('<div class="s-q"><div class="s-q">Video id</div> <span> </span></div>'),L1=M('<div class="s-q"><div class="s-q">VSID</div> <span> </span></div>'),M1=M('<div class="s-q"><div class="s-q">Provider</div> <span> </span></div>'),V1=M('<div class="s-q"><div class="s-q">Streams</div> <span> </span></div>'),R1=M('<div class="s-q"><div class="s-q">Viewport</div> <span> </span></div>'),N1=M('<div class="s-q"><div class="s-q">Video size</div> <span> </span></div>'),O1=M('<div class="s-q"><div class="s-q">CDN host</div> <span> </span></div>'),D1=M('<div class="s-q"><div class="s-q">Volume</div> <span> </span></div>'),B1=M('<div class="s-q"><div class="s-q">Position</div> <span> </span></div>'),F1=M('<div class="s-q"><div class="s-q">Buffer</div> <span> </span></div>'),H1=M('<div class="s-q"><div class="s-q">Live latency</div> <span> </span></div>'),U1=M('<div class="s-q"><div class="s-q">Segment</div> <span> </span></div>'),z1=M('<div class="s-q"><div class="s-q">Network</div> <!> <span> </span></div>'),W1=M('<div class="s-q"><div class="s-q">V bitrate</div> <!> <span> </span></div>'),K1=M('<div role="region"><button class="close s-q" title="закрыть">[x]</button> <div class="content s-q"><div class="s-q"><div class="s-q">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-q"><div class="s-q">Dropped</div> <span> </span></div> <!> <!> <div class="s-q"><div class="s-q">FPS</div> <!> <span> </span></div></div></div>'),q1={hash:"s-q",code:".container.s-q{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-q{left:16px;top:16px}button.close.s-q{background-color:transparent;border:none;color:#fff;cursor:pointer;outline:0;padding:0;position:absolute;right:5px;top:3px}.content.s-q{padding:5px}.content.s-q>div:where(.s-q)>div:where(.s-q){display:inline-block;padding:0 5px;text-align:right;width:60px}"};function Wd(t,e){B(e,!0),q(t,q1);let[i,o]=Re(),r=()=>x(d,"$isMobile",i),a=ve(),l=a.ui.debugPanelVisible,d=a.ui.isMobile,s=K(ci(a.actions.internal.getDebugPanelData())),u=a.actions.internal.getVideoElement(),m=K(0),p=K(0),f=K(0),$=new Bl(60),y=new Bl(60),_=new Bl(60),S=K(ci([])),C=K(ci([])),I=K(ci([])),N=G("aria_label_debug_panel");Mt(()=>{H_.set(Ed,"true"),a.actions.internal.startLogging(),u&&(O(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0),O(m,u.getVideoPlaybackQuality().totalVideoFrames,!0));let $e=window.setInterval(()=>{O(s,a.actions.internal.getDebugPanelData(),!0)},500),be;return u&&(be=window.setInterval(()=>{if(u){O(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0);let ee=u.getVideoPlaybackQuality().totalVideoFrames;O(f,ee-n(m)),O(m,ee,!0),$.push(n(f)),n(s).speed&&y.push(n(s).speed),n(s).bitrate&&_.push(n(s).bitrate),O(S,$.getValuesFromBottom(),!0),O(C,y.getValuesFromBottom(),!0),O(I,_.getValuesFromBottom(),!0)}},1e3)),()=>{a.actions.internal.stopLogging(),clearInterval($e),be&&clearInterval(be)}});var P=K1();let E;var k=T(P);k.__click=[A1,l];var Q=L(k,2),H=T(Q),z=L(T(H),2),Y=T(z,!0);w(z),w(H);var le=L(H,2);{var X=$e=>{var be=k1(),ee=L(T(be),2),ot=T(ee,!0);w(ee),w(be),D(()=>me(ot,n(s).id)),b($e,be)};R(le,$e=>{n(s).id&&$e(X)})}var re=L(le,2);{var Z=$e=>{var be=L1(),ee=L(T(be),2),ot=T(ee,!0);w(ee),w(be),D(()=>me(ot,n(s).vsid)),b($e,be)};R(re,$e=>{n(s).vsid&&$e(Z)})}var we=L(re,2);{var ue=$e=>{var be=M1(),ee=L(T(be),2),ot=T(ee,!0);w(ee),w(be),D(()=>me(ot,n(s).provider)),b($e,be)};R(we,$e=>{n(s).provider&&$e(ue)})}var ne=L(we,2);{var _e=$e=>{var be=V1(),ee=L(T(be),2),ot=T(ee);w(ee),w(be),D(()=>{var fe,Me;return me(ot,`Video: ${(fe=n(s).videoCodec||"")!=null?fe:""} ${n(s).hdr?"(HDR)":""}
57
57
  &
58
- Audio: ${(It=n(s).audioCodec||"")!=null?It:""} ${n(s).audioLanguage?`(${n(s).audioLanguage})`:""}`)}),_($e,_e)};V(ne,$e=>{(n(s).videoCodec||n(s).audioCodec)&&$e(he)})}var xe=k(ne,2);{var Z=$e=>{var _e=Ly(),J=k(T(_e),2),ye=T(J,!0);w(J),w(_e),B(()=>pe(ye,n(s).viewport)),_($e,_e)};V(xe,$e=>{n(s).viewport&&$e(Z)})}var Ne=k(xe,2);{var ue=$e=>{var _e=My(),J=k(T(_e),2),ye=T(J,!0);w(J),w(_e),B(()=>pe(ye,n(s).videoSize)),_($e,_e)};V(Ne,$e=>{n(s).videoSize&&$e(ue)})}var A=k(Ne,2);{var Ke=$e=>{var _e=Vy(),J=k(T(_e),2),ye=T(J,!0);w(J),w(_e),B(()=>pe(ye,n(s).cdn)),_($e,_e)};V(A,$e=>{n(s).cdn&&$e(Ke)})}var Ce=k(A,2);{var j=$e=>{var _e=Ry(),J=k(T(_e),2),ye=T(J);w(J),w(_e),B(()=>{var Pe;return pe(ye,`${(Pe=n(s).volume)!=null?Pe:""} %`)}),_($e,_e)};V(Ce,$e=>{n(s).volume&&$e(j)})}var ie=k(Ce,2);{var Oe=$e=>{var _e=Ny(),J=k(T(_e),2),ye=T(J);w(J),w(_e),B(Pe=>pe(ye,`${Pe!=null?Pe:""} s`),[()=>n(s).position.toFixed(2)]),_($e,_e)};V(ie,$e=>{n(s).position&&$e(Oe)})}var Be=k(ie,2);{var fe=$e=>{var _e=Oy(),J=k(T(_e),2),ye=T(J);w(J),w(_e),B(Pe=>pe(ye,`${Pe!=null?Pe:""} s`),[()=>n(s).buffer.toFixed(2)]),_($e,_e)};V(Be,$e=>{n(s).buffer&&$e(fe)})}var ee=k(Be,2);{var Se=$e=>{var _e=Dy(),J=k(T(_e),2),ye=T(J);w(J),w(_e),B(Pe=>pe(ye,`${Pe!=null?Pe:""} s`),[()=>n(s).liveLatency.toFixed(2)]),_($e,_e)};V(ee,$e=>{n(s).liveLatency&&$e(Se)})}var Fe=k(ee,2);{var qe=$e=>{var _e=By(),J=k(T(_e),2),ye=T(J,!0);w(J),w(_e),B(Pe=>pe(ye,Pe),[()=>[{value:n(s).currentVideoSegmentLength,title:"Video:"},{value:n(s).currentAudioSegmentLength,title:"Audio:"}].filter(({value:Pe})=>Pe).map(({value:Pe,title:It})=>`${It} ${((Pe!=null?Pe:0)/1e3).toFixed(2)} s`).join(" & ")]),_($e,_e)};V(Fe,$e=>{(n(s).currentVideoSegmentLength||n(s).currentAudioSegmentLength)&&$e(qe)})}var Ye=k(Fe,2),Te=k(T(Ye),2),Me=T(Te);w(Te),w(Ye);var ze=k(Ye,2);{var Vt=$e=>{var _e=Fy(),J=k(T(_e),2);zd(J,{get values(){return n(C)}});var ye=k(J,2),Pe=T(ye);w(ye),w(_e),B(It=>pe(Pe,`${It!=null?It:""} Kbps`),[()=>n(s).speed.toFixed(2)]),_($e,_e)};V(ze,$e=>{n(s).speed&&$e(Vt)})}var et=k(ze,2);{var Ot=$e=>{var _e=Hy(),J=k(T(_e),2);zd(J,{get values(){return n(I)}});var ye=k(J,2),Pe=T(ye);w(ye),w(_e),B(It=>pe(Pe,`${It!=null?It:""} Kbps`),[()=>n(s).bitrate.toFixed(2)]),_($e,_e)};V(et,$e=>{n(s).bitrate&&$e(Ot)})}var qt=k(et,2),St=k(T(qt),2);zd(St,{get values(){return n(S)}});var Jt=k(St,2),Dt=T(Jt,!0);w(Jt),w(qt),w(D),w(E),B($e=>{var _e,J;P=se(E,1,"container s-l",null,P,$e),Ue(E,"aria-label",R),pe(G,n(s).version),pe(Me,`${(_e=n(m))!=null?_e:""} / ${(J=n(p))!=null?J:""} frames`),pe(Dt,n(f))},[()=>({"container-mobile":r()})]),_(t,E),H(),o()}rt(["click"]);import{noop as Wy}from"@vkontakte/videoplayer-shared/es2015";var Ky=(t,e)=>{t.stopPropagation(),e()()},qy=L('<div class="close s-y"></div>'),Qy={hash:"s-y",code:'.close.s-y{cursor:pointer;height:16px;opacity:.8;position:relative;transition:opacity .2s;width:16px}.close.s-y:hover{opacity:1}.close.s-y:after,.close.s-y:before{background-color:var(--white);content:" ";height:16px;left:8px;position:absolute;width:2px}.close.s-y:before{transform:rotate(45deg)}.close.s-y:after{transform:rotate(-45deg)}'};function Ls(t,e){F(e,!0),q(t,Qy);let i=g(e,"onClick",3,Wy);var o=qy();o.__click=[Ky,i],_(t,o),H()}rt(["click"]);import{noop as Yy}from"@vkontakte/videoplayer-shared/es2015";var vn=t=>`width:${t}px;height:${t}px;`;var Gy=Ee('<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 Ln(t,e){F(e,!0);let i=v(()=>vn(e.size));Ze(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=Gy();_(o,a)},$$slots:{default:!0}}),H()}var jy=L('<div class="timer s-z"><canvas class="timer-canvas s-z" width="100" height="100"></canvas> <!></div>'),Xy={hash:"s-z",code:".timer.s-z{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-z:hover{background:rgba(31,31,31,.85)}.timer-canvas.s-z{height:50px;position:absolute;width:50px}"};function Kd(t,e){F(e,!0),q(t,Xy);let i=g(e,"isRunning",3,!0),o=g(e,"onTimerEnded",3,Yy),r=5e3,a=K(void 0),l,d,s=0,u;De(()=>{i()&&Pt(()=>{d=Date.now(),s=requestAnimationFrame(m)})});let p=()=>{s&&(cancelAnimationFrame(s),s=0)},m=()=>{p(),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(m)):o()())};Nt(()=>{l=n(a).getContext("2d"),l&&(l.lineWidth=6,l.lineCap="round",l.strokeStyle="#fff")}),mn(()=>{p()});var f=jy(),b=T(f);ot(b,$=>N(a,$),()=>n(a));var y=k(b,2);Ln(y,{get size(){return"24"}}),w(f),_(t,f),H()}var Zy=(t,e,i)=>{e(!1),i()},Jy=L('<div class="overlay s-10"></div> <div class="next-video s-10"><div class="top s-10"><div class="caption s-10"> </div> <!></div> <div class="row s-10"><div class="column s-10"><div class="thumb s-10"><div></div> <!></div></div> <div class="column s-10"><div class="title s-10"> </div></div></div></div>',1),e0={hash:"s-10",code:".overlay.s-10{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-10{display:flex;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:362px}.top.s-10{display:flex;justify-content:space-between}.caption.s-10{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-10{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-10{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-10{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-10,.thumb-overlay.s-10{height:100%;width:100%}.thumb-overlay.s-10{position:absolute}.thumb-overlay.withOpacity.s-10{background:var(--black);opacity:.3}.title.s-10{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){F(e,!0),q(t,e0);let[i,o]=Re(),r=()=>x(d,"$autoplayNextEnabled$",i),a=()=>x(s,"$timerNextVideoRunning$",i),l=ve(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,p=l.actions.internal.nextVideoAnnouncementShow,m=l.actions.internal.nextVideoAnnouncementClick,f=l.actions.internal.nextVideoAnnouncementAuto,b=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{r()&&(u(!1),f())},$=()=>{e.clickCloseIcon(),b()};Nt(()=>{e.isHide||p(),e.isHide&&r()&&(u(!1),f())});var S=Le(),C=de(S);{var I=R=>{var E=Jy(),P=k(de(E),2),O=T(P),D=T(O),U=T(D,!0);w(D);var z=k(D,2);Ls(z,{onClick:$}),w(O);var G=k(O,2);G.__click=[Zy,u,m];var le=T(G),Y=T(le),re=T(Y);let X;var we=k(re,2);{var ce=Z=>{let Ne=v(()=>a()&&r());Kd(Z,{get isRunning(){return n(Ne)},onTimerEnded:y})};V(we,Z=>{r()&&Z(ce)})}w(Y),w(le);var ne=k(le,2),he=T(ne),xe=T(he,!0);w(he),w(ne),w(G),w(P),B((Z,Ne)=>{pe(U,Z),Ge(Y,`background-image: url('${e.thumb}')`),X=se(re,1,"thumb-overlay s-10",null,X,Ne),pe(xe,e.title)},[()=>Q("end_screen_next_video"),()=>({withOpacity:r()})]),_(R,E)};V(C,R=>{e.isHide||R(I)})}_(t,S),H(),o()}rt(["click"]);import{PlaybackState as Fa}from"@vkontakte/videoplayer-core/es2015";import{checkNever as i0}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as qn}from"@vkontakte/videoplayer-statistics/es2015";var qf=(t,e)=>Math.min(+(t+e).toFixed(2),1),Qf=(t,e)=>Math.max(+(t-e).toFixed(2),0),Bu=(t,e,i)=>{let o=qf(e,i);e<1&&t.actions.internal.setVolume(o)},Fu=(t,e,i)=>{let o=Qf(e,i);e>0&&t.actions.internal.setVolume(o)};var sa=({isAudioDisabled:t,isAudioAvailable:e,isAds:i,audioDisabledHintCallback:o,audioIsNotExistHintCallback:r})=>t?i?!0:(o==null||o(),!1):e?!0:(r==null||r(),!1);function Hu(){var t,e,i;return(i=(e=(t=document.activeElement)==null?void 0:t.shadowRoot)==null?void 0:e.activeElement)!=null?i:null}var o0=(t,e)=>{e(t)},n0=L('<div class="keyboard-controls s-13" tabindex="-1" role="region"><!></div>'),r0={hash:"s-13",code:".keyboard-controls.s-13{bottom:0;left:0;position:absolute;right:0;top:0}"};function Gf(t,e){var Pe,It;F(e,!0),q(t,r0);let[i,o]=Re(),r=()=>x(we,"$disabledControls$",i),a=()=>x(Se,"$isInteractiveTime$",i),l=()=>x(Fe,"$showInteractiveTimeIndicatorTooltip$",i),d=()=>x(G,"$playbackState$",i),s=()=>x(j,"$isEnded$",i),u=()=>x(Ke,"$doubleForwardAvailable$",i),p=()=>x(A,"$doubleForwardOn$",i),m=()=>x(ie,"$overlayContainer$",i),f=()=>x(le,"$adPlaybackState",i),b=()=>x(Y,"$positionExact$",i),y=()=>x(re,"$duration$",i),$=()=>x(fe,"$isAudioAvailable$",i),S=()=>x(X,"$volume$",i),C=()=>x(xe,"$availablePlaybackRates$",i),I=()=>x(he,"$currentPlaybackRate$",i),R=()=>x(ce,"$muted$",i),E=()=>x(ne,"$currentSubtitle$",i),P=g(e,"nextButtonActive",3,!1),O=g(e,"prevButtonActive",3,!1),D=ve(),U=Mt(),z=D.getLogger().createComponentLog("KeyboardControls component"),G=D.state.playbackState$,le=D.ads.playbackState,Y=D.state.positionExact$,re=D.state.duration$,X=D.state.volume$,we=D.ui.controls.disabledControls$,ce=D.state.muted$,ne=D.state.currentSubtitle$,he=D.state.currentPlaybackRate$,xe=D.state.availablePlaybackRates$,Z=D.ui.contextMenu.openedByHotKey$,Ne=D.ui.contextMenu.lastActiveElem$,ue=D.ui.contextMenu.visible$,A=D.ui.doubleForwardOn$,Ke=D.ui.doubleForwardAvailable$,Ce=D.ui.contextMenu.position$,j=D.state.isEnded$,ie=D.ui.overlayContainer$,Oe=(Pe=D.callbacks)==null?void 0:Pe.onAudioDoesNotExistHint,Be=(It=D.callbacks)==null?void 0:It.onAudioDisabledHint,fe=D.state.isAudioAvailable$,ee=D.state.isAudioDisabled,Se=D.state.isInteractiveTime$,{showInteractiveTimeIndicatorTooltip$:Fe}=wo(),qe=0,Ye=!0,Te=K(void 0),Me=Ve=>(Ve!==Ye&&(Ye=Ve,qe=0),qe+=1,(U.controls.seekStepKeyboard+U.controls.seekStepKeyboard*qe)/1e3),ze=!0,Vt=({type:Ve,repeat:st,disableDoubleForward:mt})=>{let be=()=>{if(!r().has("PLAY_BUTTON"))if(a()&&l()&&Fe.set(!1),e.fakePlayButtonHandler)e.fakePlayButtonHandler();else{D.actions.internal.togglePlay();let We="PLAY";d()===Fa.PAUSED?We="PAUSE":s()&&(We="REPLAY"),e.showHotKeyHelpers({type:We})}},Je=Ve==="down";if(!u()||mt){Je&&be(),ze=!0;return}if(Je)ze=!1;else if(ze)return;if(Je){!st&&e.startDoubleForwardActivationTimer();return}p()||be(),e.stopDoubleForward(),ze=!0},et=Ve=>{let st=O_(m());Ce.set(st),Ne.set(Ve.target),Z.set(!0),ue.set(!0)},Ot=(Ve,st=!1)=>{var Pi,jt;let mt=Ve.target,be=(Pi=mt==null?void 0:mt.getAttribute("role"))==null?void 0:Pi.includes("menuitem"),Je=mt.classList.contains("btn"),We=Ve.code;if(Je&&We==="Space")return!1;let nt=Vh.has(We);if(be&&nt)return!1;let ei=!Mh.has(We);if(Ve.ctrlKey&&ei||Ve.altKey&&ei||Ve.metaKey)return!1;let li=be&&We==="Escape";Rh.has(We)||li||e.hideContextMenu();let gi=d()===Fa.PLAYING||d()===Fa.PAUSED,bi=e.isAds&&(f()==="paused"||f()==="playing"),io=!bi&&!r().has("TIMELINE"),ho=Ve.shiftKey&&["Digit1","Numpad1"].includes(We);if(!ho&&!(gi||bi))return!1;z({message:`key down, code: ${We}, isExternal = ${st}`});let pi=!1,ct=()=>{pi=!0,st||Ve.preventDefault()};if(ho)return et(Ve),ct(),!0;switch(We){case"KeyJ":case"ArrowLeft":{if(!io)break;if(Ve.ctrlKey||Ve.altKey){let wt=D.actions.internal.getPrevEpisode();D.actions.internal.seekToPrevEpisode(wt),wt&&e.showHotKeyHelpers({type:"EPISODE_PREV",text:wt.text}),ct()}else{let wt=Ve.shiftKey?Me(!1):U.controls.seekStepKeyboard/1e3,oi=Math.max(b()-wt,0);b()>0&&(D.actions.internal.seekTime(oi,qn.DOUBLE_TAP),e.showHotKeyHelpers({type:"BACKWARD_SEEK",text:wt.toString()}),ct())}break}case"KeyL":case"ArrowRight":{if(!io)break;if(Ve.ctrlKey||Ve.altKey){let wt=D.actions.internal.getNextEpisode();D.actions.internal.seekToNextEpisode(wt),wt&&e.showHotKeyHelpers({type:"EPISODE_NEXT",text:wt.text}),ct()}else{let wt=Ve.shiftKey?Me(!0):U.controls.seekStepKeyboard/1e3,oi=Math.min(b()+wt,y());Math.round(b())<Math.round(y())&&(D.actions.internal.seekTime(oi,qn.DOUBLE_TAP),e.showHotKeyHelpers({type:"FORWARD_SEEK",text:wt.toString()}),ct())}break}case"ArrowUp":{if(sa({isAudioDisabled:ee,audioDisabledHintCallback:Be,isAudioAvailable:$(),audioIsNotExistHintCallback:Oe,isAds:e.isAds})){let wt=S(),oi=U.controls.volumeStepKeyboard,Xt=wt<=1;if(Bu(D,wt,oi),Xt){let bt=Math.round(qf(wt,oi)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:bt}})}}ct();break}case"ArrowDown":{if(sa({isAudioDisabled:ee,audioDisabledHintCallback:Be,isAudioAvailable:$(),audioIsNotExistHintCallback:Oe,isAds:e.isAds})){let wt=S(),oi=U.controls.volumeStepKeyboard,Xt=wt>=0;if(Fu(D,wt,oi),Xt){let bt=Math.round(Qf(wt,oi)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:bt}})}}ct();break}case"Comma":{if(Ve.shiftKey){if(!p()){D.actions.internal.decrementPlaybackRate();let wt=C().find(oi=>oi.value===I());e.showHotKeyHelpers({type:"RATE_DOWN",text:wt==null?void 0:wt.displayValue}),ct()}}else{if(bi||d()!==Fa.PAUSED)break;let wt=Math.max(b()-U.controls.seekStepFrame/1e3,0);b()>0&&(e.showHotKeyHelpers({type:"BACKWARD_SEEK"}),D.actions.internal.clearDelayedBufferingCheckTimeout(),D.actions.internal.seekTime(wt,qn.DOUBLE_TAP),ct())}break}case"Period":{if(Ve.shiftKey){if(!p()){D.actions.internal.incrementPlaybackRate();let wt=C().find(oi=>oi.value===I());e.showHotKeyHelpers({type:"RATE_UP",text:wt==null?void 0:wt.displayValue}),ct()}}else{if(bi||d()!==Fa.PAUSED)break;let wt=Math.min(b()+U.controls.seekStepFrame/1e3,y());b()<y()&&(e.showHotKeyHelpers({type:"FORWARD_SEEK"}),D.actions.internal.clearDelayedBufferingCheckTimeout(),D.actions.internal.seekTime(wt,qn.DOUBLE_TAP),ct())}break}case"KeyK":case"Space":Vt({type:"down",repeat:Ve.repeat,disableDoubleForward:"KeyK"===We}),ct();break;case"KeyM":{sa({isAudioDisabled:ee,audioDisabledHintCallback:Be,isAudioAvailable:$(),audioIsNotExistHintCallback:Oe,isAds:e.isAds})&&(e.showHotKeyHelpers({type:R()?"VOLUME":"MUTE"}),D.actions.internal.toggleMuted()),ct();break}case"KeyF":e.toggleFullscreen(),ct();break;case"KeyC":D.actions.internal.toggleSubtitle(),E().value!=="off"?e.showHotKeyHelpers({type:"SUBTITLES_ON",text:(jt=E())==null?void 0:jt.displayValue}):e.showHotKeyHelpers({type:"SUBTITLES_OFF"}),ct();break;case"KeyI":D.actions.internal.togglePictureInPicture(),ct();break;case"Digit1":case"Numpad1":e.showHotKeyHelpers(),D.actions.internal.seekToPercent(.1,qn.DOUBLE_TAP),ct();break;case"Digit2":case"Numpad2":e.showHotKeyHelpers(),D.actions.internal.seekToPercent(.2,qn.DOUBLE_TAP),ct();break;case"Digit3":case"Numpad3":e.showHotKeyHelpers(),D.actions.internal.seekToPercent(.3,qn.DOUBLE_TAP),ct();break;case"Digit4":case"Numpad4":e.showHotKeyHelpers(),D.actions.internal.seekToPercent(.4,qn.DOUBLE_TAP),ct();break;case"Digit5":case"Numpad5":e.showHotKeyHelpers(),D.actions.internal.seekToPercent(.5,qn.DOUBLE_TAP),ct();break;case"Digit6":case"Numpad6":e.showHotKeyHelpers(),D.actions.internal.seekToPercent(.6,qn.DOUBLE_TAP),ct();break;case"Digit7":case"Numpad7":e.showHotKeyHelpers(),D.actions.internal.seekToPercent(.7,qn.DOUBLE_TAP),ct();break;case"Digit8":case"Numpad8":e.showHotKeyHelpers(),D.actions.internal.seekToPercent(.8,qn.DOUBLE_TAP),ct();break;case"Digit9":case"Numpad9":e.showHotKeyHelpers(),D.actions.internal.seekToPercent(.9,qn.DOUBLE_TAP),ct();break;case"Digit0":case"Numpad0":e.showHotKeyHelpers(),D.actions.internal.seekToPercent(0,qn.DOUBLE_TAP),ct();break;case"Slash":{Ve.shiftKey&&U.features.hotKeyMapModal&&(e.showKeyMap(),ct());break}case"KeyN":Ve.shiftKey&&P()&&(D.actions.internal.nextVideoClick(),ct());break;case"KeyP":Ve.shiftKey&&O()&&(D.actions.internal.prevVideoClick(),ct());break;case"ShiftLeft":case"ShiftRight":ct();break;case"Tab":case"Escape":case"Enter":break;default:i0(We);break}return pi},qt=Ve=>{let st=Ve.code;if(Ve.ctrlKey||Ve.altKey||Ve.metaKey)return;let mt=d()===Fa.PLAYING||d()===Fa.PAUSED,be=e.isAds&&(f()==="paused"||f()==="playing");if(mt||be)switch(st){case"ShiftLeft":case"ShiftRight":qe=0;break;case"Space":Vt({type:"up"});break}},St=Q("aria_label_video_player"),Jt=()=>{var Ve;return(Ve=n(Te))==null?void 0:Ve.focus()},Dt=()=>n(Te)===Hu(),$e=Ve=>Ve.type==="keydown"?Ot(Ve,!0):(Ve.type==="keyup"&&qt(Ve),!1);var _e=n0();_e.__keyup=qt,_e.__keydown=[o0,Ot];var J=T(_e);ri(J,()=>{var Ve;return(Ve=e.children)!=null?Ve:ht}),w(_e),ot(_e,Ve=>N(Te,Ve),()=>n(Te)),B(()=>Ue(_e,"aria-label",St)),_(t,_e);var ye=H({focus:Jt,isFocused:Dt,handleExternalKeyboardEvent:$e});return o(),ye}rt(["keyup","keydown"]);var s0=L('<div class="container s-p"><div class="dot s-p"></div> <div class="dot s-p"></div> <div class="dot s-p"></div></div>'),a0={hash:"s-p",code:".container.s-p{display:flex;left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%)}.dot.s-p:first-child{animation-delay:0s}.dot.s-p:nth-child(2){animation-delay:.18s}.dot.s-p:nth-child(3){animation-delay:.36s}@keyframes s-p-dot_animation{0%{opacity:.2}30%{opacity:1}to{opacity:.2}}.dot.s-p{animation-duration:.75s;animation-iteration-count:infinite;animation-name:s-p-dot_animation;background:var(--btn-color);border-radius:4px;height:8px;width:8px}.dot.s-p+.dot:where(.s-p){margin-left:4px}"};function Ha(t,e){q(t,a0);let i=g(e,"style",3,"");var o=s0();B(()=>Ge(o,i())),_(t,o)}var l0=Ee('<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){Ze(t,{get fill(){return e.fill},children:(i,o)=>{var r=l0();_(i,r)},$$slots:{default:!0}})}import{noop as Ul}from"@vkontakte/videoplayer-shared/es2015";var d0=t=>{t.stopPropagation()},c0=L("<button><!></button>"),u0={hash:"s-1o",code:"button.btn.s-1o{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-1o{width:100%}button.btn--live.s-1o{padding:10px 4px}button.btn-jc-l.s-1o{justify-content:left}button.btn-m.s-1o{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-1o,button.btn-m--play.s-1o{align-items:center;display:flex;justify-content:center}button.btn-m--play.s-1o{height:var(--big-play-size);padding:16px;position:relative;width:var(--big-play-size)}button.btn-m--next.s-1o,button.btn-m--prev.s-1o{height:50px;position:absolute;width:50px}button.btn-m--prev.s-1o{right:calc(100% + 35px)}button.btn-m--next.s-1o{left:calc(100% + 35px)}button.btn.s-1o:disabled{cursor:default;pointer-events:none}button.btn.s-1o:not(.btn-full-opacity):disabled{opacity:.4}button.btn.s-1o:not(:disabled):hover{opacity:.8}button.pr-0.s-1o{padding-right:0}button.pl-0.s-1o{padding-left:0}"};function Ut(t,e){F(e,!0),q(t,u0);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),p=g(e,"ariaExpanded",3,void 0),m=g(e,"tabIndex",3,0),f=g(e,"click",3,Ul),b=g(e,"focus",3,Ul),y=g(e,"blur",3,Ul),$=v(()=>f()===Ul?null:E=>{E.stopPropagation(),f()(E)}),S=v(()=>b()===Ul?null:E=>{E.preventDefault(),b()()}),C=v(()=>y()===Ul?null:E=>{E.preventDefault(),y()()});var I=c0();I.__pointerdown=[d0],I.__click=function(...E){var P;(P=n($))==null||P.apply(this,E)};var R=T(I);ri(R,()=>{var E;return(E=e.children)!=null?E:ht}),w(I),ot(I,E=>s(E),()=>s()),B(()=>{var E,P,O,D,U,z,G,le;se(I,1,`btn ${(E=i())!=null?E:""}`,"s-1o"),Ge(I,o()||null),I.disabled=(P=r())!=null?P:null,Ue(I,"aria-hidden",(O=l())!=null?O:null),Ue(I,"aria-label",(D=d())!=null?D:null),Ue(I,"aria-keyshortcuts",(U=u())!=null?U:null),Ue(I,"aria-expanded",(z=p())!=null?z:null),Ue(I,"data-testid",(G=a())!=null?G:null),Ue(I,"tabindex",m()),Ue(I,"role",e.role),Ue(I,"aria-checked",(le=e.areaChecked)!=null?le:null)}),_t("focus",I,function(...E){var P;(P=n(S))==null||P.apply(this,E)}),_t("blur",I,function(...E){var P;(P=n(C))==null||P.apply(this,E)}),_(t,I),H()}rt(["pointerdown","click"]);var p0=L('<div class="modal-header s-1j"><h3 class="modal-title s-1j"> </h3> <!></div>'),f0=L('<div class="modal-overlay s-1j"><div class="modal-container s-1j"><!> <div class="modal-scroll s-1j"><div class="modal-main s-1j"><!></div></div></div></div>'),m0={hash:"s-1j",code:'.modal-overlay.s-1j{align-items:center;background:transparent;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}.modal-container.s-1j{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-1j{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-1j{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-1j{height:100%;margin:8px 4px 8px 0;overflow-x:hidden;overflow-y:auto}.modal-scroll.s-1j::-webkit-scrollbar{width:8px}.modal-scroll.s-1j::-webkit-scrollbar-track{background-color:transparent;border-radius:4px;box-shadow:none;margin-right:2px}.modal-scroll.s-1j::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#666;border:1px solid transparent;border-radius:5px;min-height:40px}.modal-scroll.s-1j::-webkit-scrollbar-thumb:hover{background-color:#777}.modal-main.s-1j{margin:-8px -4px 0 0}'};function jf(t,e){F(e,!0),q(t,m0);let i=g(e,"showHeader",3,!0),o=g(e,"showCloseCross",3,!0),r=Q("hotkey_map_modal_close_btn_text");var a=f0(),l=T(a),d=T(l);{var s=f=>{var b=p0(),y=T(b),$=T(y,!0);w(y);var S=k(y,2);{var C=I=>{Ut(I,{get click(){return e.onClose},testId:"close-modal",style:"padding: 0; height: 24px; width: 24px",get ariaLabel(){return r},children:(R,E)=>{Yf(R,{fill:"currentColor"})},$$slots:{default:!0}})};V(S,I=>{o()&&I(C)})}w(b),B(()=>pe($,e.title)),_(f,b)};V(d,f=>{i()&&f(s)})}var u=k(d,2),p=T(u),m=T(p);ri(m,()=>{var f;return(f=e.children)!=null?f:ht}),w(p),w(u),w(l),w(a),_(t,a),H()}var v0=new Set(["BR"]),F_=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;v0.has(l)||(r=a.parentElement)==null||r.removeChild(a)}return e.innerHTML};var g0=L('<li class="hot-key-map-item s-11"><span class="hot-key-map-item-description s-11"><!></span> <span class="hot-key-map-item-value s-11"> </span></li>'),h0=L('<div class="hot-key-map-group s-11"><h5 class="hot-key-map-group-title s-11"> </h5> <ul class="hot-key-map-group-items s-11"></ul></div>'),_0=L('<div class="hot-key-map s-11"></div>'),b0={hash:"s-11",code:'.hot-key-map.s-11{box-sizing:border-box;color:var(--black);overflow-x:hidden}.hot-key-map-group.s-11{border-bottom:1px solid var(--white-alpha-24);margin:0 20px 0 16px}.hot-key-map-group.s-11:last-child{border-bottom:none}.hot-key-map-group-title.s-11{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-11,.hot-key-map-item.s-11{margin:0;padding:12px 0;width:100%}.hot-key-map-group-items.s-11{box-sizing:border-box;list-style:none;margin:0;padding:0}.hot-key-map-item.s-11{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-11{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-11{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-11,.hot-key-map-item-value.s-11{font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:400;line-height:16px}'};function Xf(t,e){F(e,!1),q(t,b0);let[i,o]=Re(),r=()=>x(l,"$data",i),a=ve(),{data:l,show:d}=a.ui.modals.hotKeyMap,s=()=>{d.set(!1)};xo(),jf(t,{get title(){return r().title},onClose:s,children:(u,p)=>{var m=_0();wi(m,5,()=>r().groups,({title:f,items:b})=>f,(f,b)=>{let y=()=>n(b).title,$=()=>n(b).items;var S=h0(),C=T(S),I=T(C,!0);w(C);var R=k(C,2);wi(R,5,$,({description:E,value:P})=>P,(E,P)=>{let O=()=>n(P).description,D=()=>n(P).value;var U=g0(),z=T(U),G=T(z);Sd(G,()=>F_(O())),w(z);var le=k(z,2),Y=T(le,!0);w(le),w(U),B(()=>pe(Y,D())),_(E,U)}),w(R),w(S),B(()=>pe(I,y())),_(f,S)}),w(m),_(u,m)},$$slots:{default:!0}}),H(),o()}import{noop as mb}from"@vkontakte/videoplayer-shared/es2015";import{ChromecastState as lb,PlaybackState as Om}from"@vkontakte/videoplayer-core/es2015";import"@vkontakte/videoplayer-shared/es2015";var $0=L('<div class="pillow s-1y"><!></div>'),y0={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){q(t,y0);var i=$0(),o=T(i);ri(o,()=>{var r;return(r=e.children)!=null?r:ht}),w(i),_(t,i)}import{VideoQuality as Gd}from"@vkontakte/videoplayer-shared/es2015";var x0=Ee('<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=x0();Ji(o,()=>Ae({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img"},i));var r=T(o);ri(r,()=>{var a;return(a=e.children)!=null?a:ht}),vi(),w(o),_(t,o)}var w0=Ee('<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=w0();Ji(o,()=>Ae({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img"},i));var r=T(o);ri(r,()=>{var a;return(a=e.children)!=null?a:ht}),vi(),w(o),_(t,o)}var S0=Ee('<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=S0();Ji(o,()=>Ae({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor",role:"img"},i));var r=T(o);ri(r,()=>{var a;return(a=e.children)!=null?a:ht}),vi(),w(o),_(t,o)}var T0=Ee('<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 qd(t,e){let i=kn(e,["$$slots","$$events","$$legacy","children"]);var o=T0();Ji(o,()=>Ae({xmlns:"http://www.w3.org/2000/svg",width:"13",height:"5",fill:"currentColor",role:"img"},i));var r=T(o);ri(r,()=>{var a;return(a=e.children)!=null?a:ht}),vi(),w(o),_(t,o)}var C0=Ee('<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 Qd(t,e){let i=kn(e,["$$slots","$$events","$$legacy","children"]);var o=C0();Ji(o,()=>Ae({xmlns:"http://www.w3.org/2000/svg",width:"15",height:"7",fill:"currentColor",role:"img"},i));var r=T(o);ri(r,()=>{var a;return(a=e.children)!=null?a:ht}),vi(),w(o),_(t,o)}var Uu=t=>{switch(t){case Gd.Q_720P:return tm;case Gd.Q_1080P:return qd;case Gd.Q_1440P:return Qd;case Gd.Q_2160P:return Jf;case Gd.Q_4320P:return em}};var I0=Ee('<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 im(t,e){Ze(t,{get testId(){return e.testId},children:(i,o)=>{var r=I0();_(i,r)},$$slots:{default:!0}})}var E0=Ee('<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 om(t,e){Ze(t,{get testId(){return e.testId},children:(i,o)=>{var r=E0();_(i,r)},$$slots:{default:!0}})}var P0=L('<div aria-hidden="true"><!> <!></div>'),A0={hash:"s-1v",code:".icon.s-1v{display:flex;height:24px;position:relative;width:24px}.icon.s-1v .pillow{position:absolute;right:-9px;top:1px}.icon.triple.s-1v .pillow{right:-13px}.icon.s-1v svg[data-testid=settings-icon--labeled] ._full{opacity:0;visibility:hidden}"};function Yd(t,e){F(e,!0),q(t,A0);let i=g(e,"isMobile",3,!1),o=g(e,"currentQuality",3,void 0),r=v(()=>Uu(o())),a=v(()=>!!n(r)&&[qd,Qd].includes(n(r)));var l=Le(),d=de(l);{var s=p=>{im(p,{testId:"settings-mobile-icon"})},u=p=>{var m=P0();let f;var b=T(m);{var y=C=>{Zf(C,{children:(I,R)=>{var E=Le(),P=de(E);Di(P,()=>n(r),(O,D)=>{D(O,{})}),_(I,E)},$$slots:{default:!0}})};V(b,C=>{n(r)&&C(y)})}var $=k(b,2);let S=v(()=>n(r)?"settings-icon--labeled":"settings-icon");om($,{get testId(){return n(S)}}),w(m),B(C=>f=se(m,1,"icon s-1v",null,f,C),[()=>({triple:n(a)})]),_(p,m)};V(d,p=>{i()?p(s):p(u,!1)})}_(t,l),H()}var k0=L('<span class="settings-icon-wrapper s-1z"><!></span>'),L0={hash:"s-1z",code:".settings-icon-wrapper.s-1z{position:relative;width:24px}"};function zl(t,e){F(e,!0),q(t,L0);let[i,o]=Re(),r=()=>x(u,"$settingsMenuVisible",i),a=()=>x(f,"$isMobile",i),l=()=>x(s,"$currentQuality",i),d=ve(),s=d.state.currentQuality$,u=d.ui.settingsMenu.visible$,p=d.actions.internal.openSettingsMenu,m=d.actions.internal.closeSettingsMenu,f=d.ui.isMobile,b=d.ui.t,y=K(void 0);De(()=>{n(y)&&Pt(()=>{e.ref$.set(n(y))})});let $=b("aria_label_settings");function S(I){return gt(this,null,function*(){let R=ra(I);r()?m():p(R,go)})}let C=v(()=>r()?"opened":"");Ut(t,{get className(){return n(C)},testId:"btn-settings",click:S,get ariaLabel(){return $},get ariaExpanded(){return r()},get ref(){return n(y)},set ref(I){N(y,I,!0)},children:(I,R)=>{var E=k0(),P=T(E);Yd(P,{get isMobile(){return a()},get currentQuality(){return l()}}),w(E),_(I,E)},$$slots:{default:!0}}),H(),o()}var M0=Ee('<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),V0=Ee("<path></path>");function aa(t,e){F(e,!0);let i=v(()=>`subtitles-icon-${e.type==="off"?"off":e.type==="outline"?"outline":""}`),o=v(()=>vn(e.size));Ze(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=Le(),d=de(l);{var s=p=>{var m=M0();vi(),_(p,m)},u=p=>{var m=V0();B(()=>Ue(m,"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: ${(Me=n(s).audioCodec||"")!=null?Me:""} ${n(s).audioLanguage?`(${n(s).audioLanguage})`:""}`)}),b($e,be)};R(ne,$e=>{(n(s).videoCodec||n(s).audioCodec)&&$e(_e)})}var xe=L(ne,2);{var J=$e=>{var be=R1(),ee=L(T(be),2),ot=T(ee,!0);w(ee),w(be),D(()=>me(ot,n(s).viewport)),b($e,be)};R(xe,$e=>{n(s).viewport&&$e(J)})}var Ne=L(xe,2);{var pe=$e=>{var be=N1(),ee=L(T(be),2),ot=T(ee,!0);w(ee),w(be),D(()=>me(ot,n(s).videoSize)),b($e,be)};R(Ne,$e=>{n(s).videoSize&&$e(pe)})}var A=L(Ne,2);{var We=$e=>{var be=O1(),ee=L(T(be),2),ot=T(ee,!0);w(ee),w(be),D(()=>me(ot,n(s).cdn)),b($e,be)};R(A,$e=>{n(s).cdn&&$e(We)})}var Te=L(A,2);{var j=$e=>{var be=D1(),ee=L(T(be),2),ot=T(ee);w(ee),w(be),D(()=>{var fe;return me(ot,`${(fe=n(s).volume)!=null?fe:""} %`)}),b($e,be)};R(Te,$e=>{n(s).volume&&$e(j)})}var ie=L(Te,2);{var De=$e=>{var be=B1(),ee=L(T(be),2),ot=T(ee);w(ee),w(be),D(fe=>me(ot,`${fe!=null?fe:""} s`),[()=>n(s).position.toFixed(2)]),b($e,be)};R(ie,$e=>{n(s).position&&$e(De)})}var Be=L(ie,2);{var it=$e=>{var be=F1(),ee=L(T(be),2),ot=T(ee);w(ee),w(be),D(fe=>me(ot,`${fe!=null?fe:""} s`),[()=>n(s).buffer.toFixed(2)]),b($e,be)};R(Be,$e=>{n(s).buffer&&$e(it)})}var U=L(Be,2);{var ke=$e=>{var be=H1(),ee=L(T(be),2),ot=T(ee);w(ee),w(be),D(fe=>me(ot,`${fe!=null?fe:""} s`),[()=>n(s).liveLatency.toFixed(2)]),b($e,be)};R(U,$e=>{n(s).liveLatency&&$e(ke)})}var Pe=L(U,2);{var Ue=$e=>{var be=U1(),ee=L(T(be),2),ot=T(ee,!0);w(ee),w(be),D(fe=>me(ot,fe),[()=>[{value:n(s).currentVideoSegmentLength,title:"Video:"},{value:n(s).currentAudioSegmentLength,title:"Audio:"}].filter(({value:fe})=>fe).map(({value:fe,title:Me})=>`${Me} ${((fe!=null?fe:0)/1e3).toFixed(2)} s`).join(" & ")]),b($e,be)};R(Pe,$e=>{(n(s).currentVideoSegmentLength||n(s).currentAudioSegmentLength)&&$e(Ue)})}var Ze=L(Pe,2),ye=L(T(Ze),2),Ae=T(ye);w(ye),w(Ze);var Fe=L(Ze,2);{var Dt=$e=>{var be=z1(),ee=L(T(be),2);zd(ee,{get values(){return n(C)}});var ot=L(ee,2),fe=T(ot);w(ot),w(be),D(Me=>me(fe,`${Me!=null?Me:""} Kbps`),[()=>n(s).speed.toFixed(2)]),b($e,be)};R(Fe,$e=>{n(s).speed&&$e(Dt)})}var pt=L(Fe,2);{var Bt=$e=>{var be=W1(),ee=L(T(be),2);zd(ee,{get values(){return n(I)}});var ot=L(ee,2),fe=T(ot);w(ot),w(be),D(Me=>me(fe,`${Me!=null?Me:""} Kbps`),[()=>n(s).bitrate.toFixed(2)]),b($e,be)};R(pt,$e=>{n(s).bitrate&&$e(Bt)})}var st=L(pt,2),St=L(T(st),2);zd(St,{get values(){return n(S)}});var ti=L(St,2),Rt=T(ti,!0);w(ti),w(st),w(Q),w(P),D($e=>{var be,ee;E=se(P,1,"container s-q",null,E,$e),Ve(P,"aria-label",N),me(Y,n(s).version),me(Ae,`${(be=n(p))!=null?be:""} / ${(ee=n(m))!=null?ee:""} frames`),me(Rt,n(f))},[()=>({"container-mobile":r()})]),b(t,P),F(),o()}tt(["click"]);import{noop as Q1}from"@vkontakte/videoplayer-shared/es2015";var G1=(t,e)=>{t.stopPropagation(),e()()},Y1=M('<div class="close s-19"></div>'),j1={hash:"s-19",code:'.close.s-19{cursor:pointer;height:16px;opacity:.8;position:relative;transition:opacity .2s;width:16px}.close.s-19:hover{opacity:1}.close.s-19:after,.close.s-19:before{background-color:var(--white);content:" ";height:16px;left:8px;position:absolute;width:2px}.close.s-19:before{transform:rotate(45deg)}.close.s-19:after{transform:rotate(-45deg)}'};function ks(t,e){B(e,!0),q(t,j1);let i=g(e,"onClick",3,Q1);var o=Y1();o.__click=[G1,i],b(t,o),F()}tt(["click"]);import{noop as Z1}from"@vkontakte/videoplayer-shared/es2015";var fn=t=>`width:${t}px;height:${t}px;`;var X1=Ce('<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=v(()=>fn(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=X1();b(o,a)},$$slots:{default:!0}}),F()}var J1=M('<div class="timer s-1a"><canvas class="timer-canvas s-1a" width="100" height="100"></canvas> <!></div>'),e0={hash:"s-1a",code:".timer.s-1a{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-1a:hover{background:rgba(31,31,31,.85)}.timer-canvas.s-1a{height:50px;position:absolute;width:50px}"};function Kd(t,e){B(e,!0),q(t,e0);let i=g(e,"isRunning",3,!0),o=g(e,"onTimerEnded",3,Z1),r=5e3,a=K(void 0),l,d,s=0,u;Oe(()=>{i()&&It(()=>{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()())};Mt(()=>{l=n(a).getContext("2d"),l&&(l.lineWidth=6,l.lineCap="round",l.strokeStyle="#fff")}),pn(()=>{m()});var f=J1(),$=T(f);je($,_=>O(a,_),()=>n(a));var y=L($,2);An(y,{get size(){return"24"}}),w(f),b(t,f),F()}var t0=(t,e,i)=>{e(!1),i()},i0=M('<div class="overlay s-16"></div> <div class="next-video s-16"><div class="top s-16"><div class="caption s-16"> </div> <!></div> <div class="row s-16"><div class="column s-16"><div class="thumb s-16"><div></div> <!></div></div> <div class="column s-16"><div class="title s-16"> </div></div></div></div>',1),o0={hash:"s-16",code:".overlay.s-16{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-16{display:flex;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:362px}.top.s-16{display:flex;justify-content:space-between}.caption.s-16{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-16{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-16{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-16{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-16,.thumb-overlay.s-16{height:100%;width:100%}.thumb-overlay.s-16{position:absolute}.thumb-overlay.withOpacity.s-16{background:var(--black);opacity:.3}.title.s-16{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),q(t,o0);let[i,o]=Re(),r=()=>x(d,"$autoplayNextEnabled$",i),a=()=>x(s,"$timerNextVideoRunning$",i),l=ve(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,m=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,f=l.actions.internal.nextVideoAnnouncementAuto,$=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{r()&&(u(!1),f())},_=()=>{e.clickCloseIcon(),$()};Mt(()=>{e.isHide||m(),e.isHide&&r()&&(u(!1),f())});var S=Le(),C=de(S);{var I=N=>{var P=i0(),E=L(de(P),2),k=T(E),Q=T(k),H=T(Q,!0);w(Q);var z=L(Q,2);ks(z,{onClick:_}),w(k);var Y=L(k,2);Y.__click=[t0,u,p];var le=T(Y),X=T(le),re=T(X);let Z;var we=L(re,2);{var ue=J=>{let Ne=v(()=>a()&&r());Kd(J,{get isRunning(){return n(Ne)},onTimerEnded:y})};R(we,J=>{r()&&J(ue)})}w(X),w(le);var ne=L(le,2),_e=T(ne),xe=T(_e,!0);w(_e),w(ne),w(Y),w(E),D((J,Ne)=>{me(H,J),Qe(X,`background-image: url('${e.thumb}')`),Z=se(re,1,"thumb-overlay s-16",null,Z,Ne),me(xe,e.title)},[()=>G("end_screen_next_video"),()=>({withOpacity:r()})]),b(N,P)};R(C,N=>{e.isHide||N(I)})}b(t,S),F(),o()}tt(["click"]);import{PlaybackState as Da}from"@vkontakte/videoplayer-core/es2015";import{checkNever as r0}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as jn}from"@vkontakte/videoplayer-statistics/es2015";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)},Bu=(t,e,i)=>{let o=Qf(e,i);e>0&&t.actions.internal.setVolume(o)};var ra=({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 s0=(t,e)=>{e(t)},a0=M('<div class="keyboard-controls s-10" tabindex="-1" role="region"><!></div>'),l0={hash:"s-10",code:".keyboard-controls.s-10{bottom:0;left:0;position:absolute;right:0;top:0}"};function Gf(t,e){var ee,ot;B(e,!0),q(t,l0);let[i,o]=Re(),r=()=>x(we,"$disabledControls$",i),a=()=>x(it,"$isInteractiveTime$",i),l=()=>x(U,"$showInteractiveTimeIndicatorTooltip$",i),d=()=>x(z,"$playbackState$",i),s=()=>x(We,"$isEnded$",i),u=()=>x(pe,"$doubleForwardAvailable$",i),m=()=>x(Ne,"$doubleForwardOn$",i),p=()=>x(Te,"$overlayContainer$",i),f=()=>x(le,"$adPlaybackState",i),$=()=>x(X,"$positionExact$",i),y=()=>x(re,"$duration$",i),_=()=>x(De,"$isAudioAvailable$",i),S=()=>x(Z,"$volume$",i),C=()=>x(Y,"$canChangePlaybackSpeed$",i),I=()=>x(ue,"$muted$",i),N=()=>x(ne,"$currentSubtitle$",i),P=g(e,"nextButtonActive",3,!1),E=g(e,"prevButtonActive",3,!1),k=ve(),Q=Vt(),H=k.getLogger().createComponentLog("KeyboardControls component"),z=k.state.playbackState$,Y=k.state.canChangePlaybackSpeed$,le=k.ads.playbackState,X=k.state.positionExact$,re=k.state.duration$,Z=k.state.volume$,we=k.ui.controls.disabledControls$,ue=k.state.muted$,ne=k.state.currentSubtitle$,_e=k.ui.contextMenu.openedByHotKey$,xe=k.ui.contextMenu.lastActiveElem$,J=k.ui.contextMenu.visible$,Ne=k.ui.doubleForwardOn$,pe=k.ui.doubleForwardAvailable$,A=k.ui.contextMenu.position$,We=k.state.isEnded$,Te=k.ui.overlayContainer$,j=(ee=k.callbacks)==null?void 0:ee.onAudioDoesNotExistHint,ie=(ot=k.callbacks)==null?void 0:ot.onAudioDisabledHint,De=k.state.isAudioAvailable$,Be=k.state.isAudioDisabled,it=k.state.isInteractiveTime$,{showInteractiveTimeIndicatorTooltip$:U}=wo(),ke=0,Pe=!0,Ue=K(void 0),Ze=fe=>(fe!==Pe&&(Pe=fe,ke=0),ke+=1,(Q.controls.seekStepKeyboard+Q.controls.seekStepKeyboard*ke)/1e3),ye=!0,Ae=({type:fe,repeat:Me,disableDoubleForward:$t})=>{let At=()=>{if(!r().has("PLAY_BUTTON"))if(a()&&l()&&U.set(!1),e.fakePlayButtonHandler)e.fakePlayButtonHandler();else{k.actions.internal.togglePlay();let ce="PLAY";d()===Da.PAUSED?ce="PAUSE":s()&&(ce="REPLAY"),e.showHotKeyHelpers({type:ce})}},ct=fe==="down";if(!u()||$t){ct&&At(),ye=!0;return}if(ct)ye=!1;else if(ye)return;if(ct){!Me&&e.startDoubleForwardActivationTimer();return}m()||At(),e.stopDoubleForward(),ye=!0},Fe=fe=>{let Me=B_(p());A.set(Me),xe.set(fe.target),_e.set(!0),J.set(!0)},Dt=(fe,Me=!1)=>{var fi,hi;let $t=fe.target,At=(fi=$t==null?void 0:$t.getAttribute("role"))==null?void 0:fi.includes("menuitem"),ct=$t.classList.contains("btn"),ce=fe.code;if(ct&&ce==="Space")return!1;let ze=Nh.has(ce);if(At&&ze)return!1;let Ge=!Rh.has(ce);if(fe.ctrlKey&&Ge||fe.altKey&&Ge||fe.metaKey)return!1;let at=At&&ce==="Escape";Oh.has(ce)||at||e.hideContextMenu();let Ft=d()===Da.PLAYING||d()===Da.PAUSED,Ht=e.isAds&&(f()==="paused"||f()==="playing"),oi=!Ht&&!r().has("TIMELINE"),yi=fe.shiftKey&&["Digit1","Numpad1"].includes(ce);if(!yi&&!(Ft||Ht))return!1;H({message:`key down, code: ${ce}, isExternal = ${Me}`});let ji=!1,Nt=()=>{ji=!0,Me||fe.preventDefault()};if(yi)return Fe(fe),Nt(),!0;switch(ce){case"KeyJ":case"ArrowLeft":{if(!oi)break;if(fe.ctrlKey||fe.altKey){let ht=k.actions.internal.getPrevEpisode();k.actions.internal.seekToPrevEpisode(ht),ht&&e.showHotKeyHelpers({type:"EPISODE_PREV",text:ht.text}),Nt()}else{let ht=fe.shiftKey?Ze(!1):Q.controls.seekStepKeyboard/1e3,Xt=Math.max($()-ht,0);$()>0&&(k.actions.internal.seekTime(Xt,jn.DOUBLE_TAP),e.showHotKeyHelpers({type:"BACKWARD_SEEK",text:ht.toString()}),Nt())}break}case"KeyL":case"ArrowRight":{if(!oi)break;if(fe.ctrlKey||fe.altKey){let ht=k.actions.internal.getNextEpisode();k.actions.internal.seekToNextEpisode(ht),ht&&e.showHotKeyHelpers({type:"EPISODE_NEXT",text:ht.text}),Nt()}else{let ht=fe.shiftKey?Ze(!0):Q.controls.seekStepKeyboard/1e3,Xt=Math.min($()+ht,y());Math.round($())<Math.round(y())&&(k.actions.internal.seekTime(Xt,jn.DOUBLE_TAP),e.showHotKeyHelpers({type:"FORWARD_SEEK",text:ht.toString()}),Nt())}break}case"ArrowUp":{if(ra({isAudioDisabled:Be,audioDisabledHintCallback:ie,isAudioAvailable:_(),audioIsNotExistHintCallback:j,isAds:e.isAds})){let ht=S(),Xt=Q.controls.volumeStepKeyboard,Si=ht<=1;if(Du(k,ht,Xt),Si){let Xi=Math.round(qf(ht,Xt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:Xi}})}}Nt();break}case"ArrowDown":{if(ra({isAudioDisabled:Be,audioDisabledHintCallback:ie,isAudioAvailable:_(),audioIsNotExistHintCallback:j,isAds:e.isAds})){let ht=S(),Xt=Q.controls.volumeStepKeyboard,Si=ht>=0;if(Bu(k,ht,Xt),Si){let Xi=Math.round(Qf(ht,Xt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:Xi}})}}Nt();break}case"Comma":{if(fe.shiftKey){if(!m()&&C()){let ht=k.actions.internal.decrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_DOWN",text:ht==null?void 0:ht.displayValue}),Nt()}}else{if(Ht||d()!==Da.PAUSED)break;let ht=Math.max($()-Q.controls.seekStepFrame/1e3,0);$()>0&&(e.showHotKeyHelpers({type:"BACKWARD_SEEK"}),k.actions.internal.clearDelayedBufferingCheckTimeout(),k.actions.internal.seekTime(ht,jn.DOUBLE_TAP),Nt())}break}case"Period":{if(fe.shiftKey){if(!m()&&C()){let ht=k.actions.internal.incrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_UP",text:ht==null?void 0:ht.displayValue}),Nt()}}else{if(Ht||d()!==Da.PAUSED)break;let ht=Math.min($()+Q.controls.seekStepFrame/1e3,y());$()<y()&&(e.showHotKeyHelpers({type:"FORWARD_SEEK"}),k.actions.internal.clearDelayedBufferingCheckTimeout(),k.actions.internal.seekTime(ht,jn.DOUBLE_TAP),Nt())}break}case"KeyK":case"Space":Ae({type:"down",repeat:fe.repeat,disableDoubleForward:"KeyK"===ce}),Nt();break;case"KeyM":{ra({isAudioDisabled:Be,audioDisabledHintCallback:ie,isAudioAvailable:_(),audioIsNotExistHintCallback:j,isAds:e.isAds})&&(e.showHotKeyHelpers({type:I()?"VOLUME":"MUTE"}),k.actions.internal.toggleMuted()),Nt();break}case"KeyF":e.toggleFullscreen(),Nt();break;case"KeyC":k.actions.internal.toggleSubtitle(),N().value!=="off"?e.showHotKeyHelpers({type:"SUBTITLES_ON",text:(hi=N())==null?void 0:hi.displayValue}):e.showHotKeyHelpers({type:"SUBTITLES_OFF"}),Nt();break;case"KeyI":k.actions.internal.togglePictureInPicture(),Nt();break;case"Digit1":case"Numpad1":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.1,jn.DOUBLE_TAP),Nt();break;case"Digit2":case"Numpad2":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.2,jn.DOUBLE_TAP),Nt();break;case"Digit3":case"Numpad3":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.3,jn.DOUBLE_TAP),Nt();break;case"Digit4":case"Numpad4":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.4,jn.DOUBLE_TAP),Nt();break;case"Digit5":case"Numpad5":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.5,jn.DOUBLE_TAP),Nt();break;case"Digit6":case"Numpad6":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.6,jn.DOUBLE_TAP),Nt();break;case"Digit7":case"Numpad7":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.7,jn.DOUBLE_TAP),Nt();break;case"Digit8":case"Numpad8":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.8,jn.DOUBLE_TAP),Nt();break;case"Digit9":case"Numpad9":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.9,jn.DOUBLE_TAP),Nt();break;case"Digit0":case"Numpad0":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(0,jn.DOUBLE_TAP),Nt();break;case"Slash":{fe.shiftKey&&Q.features.hotKeyMapModal&&(e.showKeyMap(),Nt());break}case"KeyN":fe.shiftKey&&P()&&(k.actions.internal.nextVideoClick(),Nt());break;case"KeyP":fe.shiftKey&&E()&&(k.actions.internal.prevVideoClick(),Nt());break;case"ShiftLeft":case"ShiftRight":Nt();break;case"Tab":case"Escape":case"Enter":break;default:r0(ce);break}return ji},pt=fe=>{let Me=fe.code;if(fe.ctrlKey||fe.altKey||fe.metaKey)return;let $t=d()===Da.PLAYING||d()===Da.PAUSED,At=e.isAds&&(f()==="paused"||f()==="playing");if($t||At)switch(Me){case"ShiftLeft":case"ShiftRight":ke=0;break;case"Space":Ae({type:"up"});break}},Bt=G("aria_label_video_player"),st=()=>{var fe;return(fe=n(Ue))==null?void 0:fe.focus()},St=()=>n(Ue)===Fu(),ti=fe=>fe.type==="keydown"?Dt(fe,!0):(fe.type==="keyup"&&pt(fe),!1);var Rt=a0();Rt.__keyup=pt,Rt.__keydown=[s0,Dt];var $e=T(Rt);ri($e,()=>{var fe;return(fe=e.children)!=null?fe:vt}),w(Rt),je(Rt,fe=>O(Ue,fe),()=>n(Ue)),D(()=>Ve(Rt,"aria-label",Bt)),b(t,Rt);var be=F({focus:st,isFocused:St,handleExternalKeyboardEvent:ti});return o(),be}tt(["keyup","keydown"]);var d0=M('<div class="container s-w"><div class="dot s-w"></div> <div class="dot s-w"></div> <div class="dot s-w"></div></div>'),c0={hash:"s-w",code:".container.s-w{display:flex;left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%)}.dot.s-w:first-child{animation-delay:0s}.dot.s-w:nth-child(2){animation-delay:.18s}.dot.s-w:nth-child(3){animation-delay:.36s}@keyframes s-w-dot_animation{0%{opacity:.2}30%{opacity:1}to{opacity:.2}}.dot.s-w{animation-duration:.75s;animation-iteration-count:infinite;animation-name:s-w-dot_animation;background:var(--btn-color);border-radius:4px;height:8px;width:8px}.dot.s-w+.dot:where(.s-w){margin-left:4px}"};function Ba(t,e){q(t,c0);let i=g(e,"style",3,"");var o=d0();D(()=>Qe(o,i())),b(t,o)}var u0=Ce('<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=u0();b(i,r)},$$slots:{default:!0}})}import{noop as Fl}from"@vkontakte/videoplayer-shared/es2015";var p0=t=>{t.stopPropagation()},f0=M("<button><!></button>"),m0={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 Kt(t,e){B(e,!0),q(t,m0);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),m=g(e,"ariaExpanded",3,void 0),p=g(e,"tabIndex",3,0),f=g(e,"click",3,Fl),$=g(e,"focus",3,Fl),y=g(e,"blur",3,Fl),_=v(()=>f()===Fl?null:P=>{P.stopPropagation(),f()(P)}),S=v(()=>$()===Fl?null:P=>{P.preventDefault(),$()()}),C=v(()=>y()===Fl?null:P=>{P.preventDefault(),y()()});var I=f0();I.__pointerdown=[p0],I.__click=function(...P){var E;(E=n(_))==null||E.apply(this,P)};var N=T(I);ri(N,()=>{var P;return(P=e.children)!=null?P:vt}),w(I),je(I,P=>s(P),()=>s()),D(()=>{var P,E,k,Q,H,z,Y,le;se(I,1,`btn ${(P=i())!=null?P:""}`,"s-1p"),Qe(I,o()||null),I.disabled=(E=r())!=null?E:null,Ve(I,"aria-hidden",(k=l())!=null?k:null),Ve(I,"aria-label",(Q=d())!=null?Q:null),Ve(I,"aria-keyshortcuts",(H=u())!=null?H:null),Ve(I,"aria-expanded",(z=m())!=null?z:null),Ve(I,"data-testid",(Y=a())!=null?Y:null),Ve(I,"tabindex",p()),Ve(I,"role",e.role),Ve(I,"aria-checked",(le=e.areaChecked)!=null?le:null)}),gt("focus",I,function(...P){var E;(E=n(S))==null||E.apply(this,P)}),gt("blur",I,function(...P){var E;(E=n(C))==null||E.apply(this,P)}),b(t,I),F()}tt(["pointerdown","click"]);var v0=(t,e)=>{t.key==="Escape"&&e.onClose(),(t.key==="ArrowUp"||t.key==="ArrowDown")&&t.stopPropagation()},g0=M('<div class="modal-header s-1h"><h3 class="modal-title s-1h"> </h3> <!></div>'),h0=M('<div class="modal-overlay s-1h"><div class="modal-container s-1h" role="dialog" aria-modal="true"><!> <div class="modal-scroll s-1h" tabindex="0" role="scrollbar"><div class="modal-main s-1h"><!></div></div></div></div>'),_0={hash:"s-1h",code:'.modal-overlay.s-1h{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-1h{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-1h{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-1h{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-1h{height:100%;margin:8px 4px 8px 0;overflow-x:hidden;overflow-y:auto}.modal-scroll.s-1h::-webkit-scrollbar{width:8px}.modal-scroll.s-1h::-webkit-scrollbar-track{background-color:transparent;border-radius:4px;box-shadow:none;margin-right:2px}.modal-scroll.s-1h::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#666;border:1px solid transparent;border-radius:5px;min-height:40px}.modal-scroll.s-1h::-webkit-scrollbar-thumb:hover{background-color:#777}.modal-main.s-1h{margin:-8px -4px 0 0}'};function jf(t,e){B(e,!0),q(t,_0);let i=g(e,"showHeader",3,!0),o=g(e,"showCloseCross",3,!0),r=K(void 0),a=K(void 0),{webApi:{focusManager:l}}=ve(),d=G("hotkey_map_modal_close_btn_text");Mt(()=>{var _;return(_=n(r))==null||_.focus(),n(a)&&l&&(l.setContainerForFocusLock(n(a)),l.activateLock()),()=>l==null?void 0:l.deactivateLock()});var s=h0();s.__keydown=[v0,e];var u=T(s),m=T(u);{var p=_=>{var S=g0(),C=T(S),I=T(C,!0);w(C);var N=L(C,2);{var P=E=>{Kt(E,{get click(){return e.onClose},testId:"close-modal",style:"padding: 0; height: 24px; width: 24px",get ariaLabel(){return d},children:(k,Q)=>{Yf(k,{fill:"currentColor"})},$$slots:{default:!0}})};R(N,E=>{o()&&E(P)})}w(S),D(()=>me(I,e.title)),b(_,S)};R(m,_=>{i()&&_(p)})}var f=L(m,2),$=T(f),y=T($);ri(y,()=>{var _;return(_=e.children)!=null?_:vt}),w($),w(f),je(f,_=>O(r,_),()=>n(r)),w(u),je(u,_=>O(a,_),()=>n(a)),w(s),b(t,s),F()}tt(["keydown"]);var b0=new Set(["BR"]),U_=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;b0.has(l)||(r=a.parentElement)==null||r.removeChild(a)}return e.innerHTML};var $0=M('<li class="hot-key-map-item s-12"><span class="hot-key-map-item-description s-12"><!></span> &nbsp; <span class="hot-key-map-item-value s-12"> </span></li>'),y0=M('<div class="hot-key-map-group s-12"><h5 class="hot-key-map-group-title s-12"> </h5> <ul class="hot-key-map-group-items s-12"></ul></div>'),x0=M('<div class="hot-key-map s-12"></div>'),w0={hash:"s-12",code:'.hot-key-map.s-12{box-sizing:border-box;color:var(--black);overflow-x:hidden}.hot-key-map-group.s-12{border-bottom:1px solid var(--white-alpha-24);margin:0 20px 0 16px}.hot-key-map-group.s-12:last-child{border-bottom:none}.hot-key-map-group-title.s-12{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-12,.hot-key-map-item.s-12{margin:0;padding:12px 0;width:100%}.hot-key-map-group-items.s-12{box-sizing:border-box;list-style:none;margin:0;padding:0}.hot-key-map-item.s-12{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-12{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-12{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-12,.hot-key-map-item-value.s-12{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),q(t,w0);let[i,o]=Re(),r=()=>x(l,"$data",i),a=ve(),{data:l,show:d}=a.ui.modals.hotKeyMap,s=()=>{d.set(!1)};xo(),jf(t,{get title(){return r().title},onClose:s,children:(u,m)=>{var p=x0();wi(p,5,()=>r().groups,({title:f,items:$})=>f,(f,$)=>{let y=()=>n($).title,_=()=>n($).items;var S=y0(),C=T(S),I=T(C,!0);w(C);var N=L(C,2);wi(N,5,_,({description:P,value:E})=>E,(P,E)=>{let k=()=>n(E).description,Q=()=>n(E).value;var H=$0(),z=T(H),Y=T(z);wd(Y,()=>U_(k())),w(z);var le=L(z,2),X=T(le,!0);w(le),w(H),D(()=>me(X,Q())),b(P,H)}),w(N),w(S),D(()=>me(I,y())),b(f,S)}),w(p),b(u,p)},$$slots:{default:!0}}),F(),o()}import{noop as vb}from"@vkontakte/videoplayer-shared/es2015";import{ChromecastState as db,PlaybackState as Bm}from"@vkontakte/videoplayer-core/es2015";import{getVideoQualityLabel as M0}from"@vkontakte/videoplayer-shared/es2015";var S0=M('<div class="pillow s-1y"><!></div>'),T0={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){q(t,T0);var i=S0(),o=T(i);ri(o,()=>{var r;return(r=e.children)!=null?r:vt}),w(i),D(()=>Ve(i,"data-testid",e.testId)),b(t,i)}import{VideoQuality as qd}from"@vkontakte/videoplayer-shared/es2015";var C0=Ce('<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=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=C0();io(o,()=>Ie({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img"},i));var r=T(o);ri(r,()=>{var a;return(a=e.children)!=null?a:vt}),vi(),w(o),b(t,o)}var I0=Ce('<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=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=I0();io(o,()=>Ie({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img"},i));var r=T(o);ri(r,()=>{var a;return(a=e.children)!=null?a:vt}),vi(),w(o),b(t,o)}var E0=Ce('<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=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=E0();io(o,()=>Ie({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor",role:"img"},i));var r=T(o);ri(r,()=>{var a;return(a=e.children)!=null?a:vt}),vi(),w(o),b(t,o)}var P0=Ce('<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=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=P0();io(o,()=>Ie({xmlns:"http://www.w3.org/2000/svg",width:"13",height:"5",fill:"currentColor",role:"img"},i));var r=T(o);ri(r,()=>{var a;return(a=e.children)!=null?a:vt}),vi(),w(o),b(t,o)}var A0=Ce('<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=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=A0();io(o,()=>Ie({xmlns:"http://www.w3.org/2000/svg",width:"15",height:"7",fill:"currentColor",role:"img"},i));var r=T(o);ri(r,()=>{var a;return(a=e.children)!=null?a:vt}),vi(),w(o),b(t,o)}var Hu=t=>{switch(t){case qd.Q_720P:return tm;case qd.Q_1080P:return im;case qd.Q_1440P:return om;case qd.Q_2160P:return Jf;case qd.Q_4320P:return em}};var k0=Ce('<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=k0();b(i,r)},$$slots:{default:!0}})}var L0=Ce('<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=L0();b(i,r)},$$slots:{default:!0}})}var V0=M('<div aria-hidden="true"><!> <!></div>'),R0={hash:"s-1v",code:".icon.s-1v{display:flex;height:24px;position:relative;width:24px}.icon.s-1v .pillow{position:absolute;right:-9px;top:1px}.icon.triple.s-1v .pillow{right:-13px}.icon.s-1v svg[data-testid=settings-icon--labeled] ._full{opacity:0;visibility:hidden}"};function Qd(t,e){B(e,!0),q(t,R0);let i=g(e,"isMobile",3,!1),o=g(e,"currentQuality",3,void 0),r=v(()=>o()?M0(o()):""),a=v(()=>Hu(o())),l=v(()=>n(r).length>2);var d=Le(),s=de(d);{var u=p=>{nm(p,{testId:"settings-mobile-icon"})},m=p=>{var f=V0();let $;var y=T(f);{var _=I=>{let N=v(()=>`${n(r)}-pill-icon`);Zf(I,{get testId(){return n(N)},children:(P,E)=>{var k=Le(),Q=de(k);Di(Q,()=>n(a),(H,z)=>{z(H,{})}),b(P,k)},$$slots:{default:!0}})};R(y,I=>{n(a)&&I(_)})}var S=L(y,2);let C=v(()=>n(a)?"settings-icon--labeled":"settings-icon");rm(S,{get testId(){return n(C)}}),w(f),D(I=>$=se(f,1,"icon s-1v",null,$,I),[()=>({triple:n(l)})]),b(p,f)};R(s,p=>{i()?p(u):p(m,!1)})}b(t,d),F()}var N0=M('<span class="settings-icon-wrapper s-22"><!></span>'),O0={hash:"s-22",code:".settings-icon-wrapper.s-22{position:relative;width:24px}"};function Hl(t,e){B(e,!0),q(t,O0);let[i,o]=Re(),r=()=>x(u,"$settingsMenuVisible",i),a=()=>x(f,"$isMobile",i),l=()=>x(s,"$currentQuality",i),d=ve(),s=d.state.currentQuality$,u=d.ui.settingsMenu.visible$,m=d.actions.internal.openSettingsMenu,p=d.actions.internal.closeSettingsMenu,f=d.ui.isMobile,$=d.ui.t,y=K(void 0);Oe(()=>{n(y)&&It(()=>{e.ref$.set(n(y))})});let _=$("aria_label_settings");function S(I){return mt(this,null,function*(){let N=na(I);r()?p():m(N,_o)})}let C=v(()=>r()?"opened":"");Kt(t,{get className(){return n(C)},testId:"settings-btn",click:S,get ariaLabel(){return _},get ariaExpanded(){return r()},get ref(){return n(y)},set ref(I){O(y,I,!0)},children:(I,N)=>{var P=N0(),E=T(P);Qd(E,{get isMobile(){return a()},get currentQuality(){return l()}}),w(P),b(I,P)},$$slots:{default:!0}}),F(),o()}var D0=Ce('<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),B0=Ce("<path></path>");function sa(t,e){B(e,!0);let i=v(()=>`subtitles-icon-${e.type==="off"?"off":e.type==="outline"?"outline":""}`),o=v(()=>fn(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=Le(),d=de(l);{var s=m=>{var p=D0();vi(),b(m,p)},u=m=>{var p=B0();D(()=>Ve(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`)),_(p,m)};V(d,p=>{e.type==="off"?p(s):p(u,!1)})}_(r,l)},$$slots:{default:!0}}),H()}function nm(t,e){F(e,!0);let i=g(e,"isSubtitlesEnabled",3,!1),r=ve().ui.t,a=v(()=>i()?r("tooltip_subtitles_on"):r("tooltip_subtitles_off"));Ut(t,{testId:"btn-Subtitles",get ariaLabel(){return n(a)},get click(){return e.click},get ariaKeyShortCut(){return vs.KeyC},role:"button",children:(l,d)=>{let s=v(()=>i()?void 0:"outline");aa(l,{get size(){return"24"},get type(){return n(s)}})},$$slots:{default:!0}}),H()}var R0=L('<span class="duration s-21" data-testid="video_duration"> </span>'),N0=L('<div><span class="current s-21" data-testid="current_time"> </span> <!></div>'),O0={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){F(e,!0),q(t,O0);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=Mt(),d=ae(!1),s=v(()=>Zo(e.duration)),u=v(()=>Zo(e.position));var p=N0();let m;var f=T(p),b=T(f,!0);w(f);var y=k(f,2);{var $=S=>{var C=R0(),I=T(C,!0);w(C),B(()=>pe(I,n(s))),_(S,C)};V(y,S=>{r()&&S($)})}w(p),Ps(p,()=>Ol(o()&&l.features.usePerformanceFix,d,l.disableInvisibleComponentsTimeout)),ot(p,S=>a(S),()=>a()),B(S=>{m=se(p,1,"time s-21",null,m,S),pe(b,n(u))},[()=>({mobile:i()})]),_(t,p),H()}import{noop as zu}from"@vkontakte/videoplayer-shared/es2015";var D0=Ee("<path></path>");function la(t,e){F(e,!0);let i=g(e,"volume",3,1),o=g(e,"muted",3,!1),r=(m,f)=>f?"off":m>.5?"max":m>.2?"mid":m>0?"min":"off",a=v(()=>r(i(),o())),l=v(()=>vn(e.size)),d="M4 19.9a2 2 90 011.88-2l5.68-.32a4 4 90 002.5-1.08l8.58-8a2 2 90 013.36 1.44v28.12a2 2 90 01-3.36 1.46l-8.58-8.02a4 4 90 00-2.52-1.08l-5.66-.32a2 2 90 01-1.88-2z",s="M44.92 16.52a1.8 1.8 90 012.56 2.56L42.54 24l4.94 4.92a1.8 1.8 90 11-2.56 2.56L40 26.54l-4.92 4.94a1.8 1.8 90 01-2.56-2.56L37.46 24l-4.94-4.92a1.8 1.8 90 112.56-2.56L40 21.46z",u="M31.5 17.8a1.8 1.8 90 012.54-.14A8.6 8.6 90 0136.8 24c0 2.52-1.06 4.8-2.76 6.34a1.8 1.8 90 11-2.4-2.68c.92-.84 1.56-2.16 1.56-3.66s-.64-2.8-1.58-3.66a1.8 1.8 90 01-.12-2.54",p="M37.62 13.34a1.8 1.8 90 012.54.2 16 16 90 010 20.9 1.8 1.8 90 01-2.74-2.32 12.4 12.4 90 000-16.24 1.8 1.8 90 01.2-2.54";Ze(t,{get width(){return"48"},get height(){return"48"},get style(){return n(l)},get testId(){var m;return`volume-${(m=n(a))!=null?m:""}-icon`},get shadow(){return e.shadow},children:(m,f)=>{var b=D0();B(()=>Ue(b,"d",`M4 19.9a2 2 90 011.88-2l5.68-.32a4 4 90 002.5-1.08l8.58-8a2 2 90 013.36 1.44v28.12a2 2 90 01-3.36 1.46l-8.58-8.02a4 4 90 00-2.52-1.08l-5.66-.32a2 2 90 01-1.88-2z${n(a)==="off"?s:`${u}${n(a)==="max"?p:""}`}`)),_(m,b)},$$slots:{default:!0}}),H()}import{isNonNullable as U_,noop as Qn}from"@vkontakte/videoplayer-shared/es2015";import{noop as sm}from"@vkontakte/videoplayer-shared/es2015";import{noop as F0}from"@vkontakte/videoplayer-shared/es2015";var B0=L('<div class="overlay"><!></div>');function rm(t,e){F(e,!0);let[i,o]=Re(),r=()=>x(l,"$overlayContainer$",i),l=ve().ui.overlayContainer$,d=K(void 0),s=f=>{!f||!n(d)||!f.contains(n(d))||f.removeChild(n(d))},u=f=>{!f||!n(d)||f.contains(n(d))||f.appendChild(n(d))};De(()=>{u(r())}),Nt(()=>(u(r()),()=>s(r())));var p=B0(),m=T(p);ri(m,()=>{var f;return(f=e.children)!=null?f:ht}),w(p),ot(p,f=>N(d,f),()=>n(d)),_(t,p),H(),o()}var H0=L('<div class="tooltip s-1k"><div class="content s-1k"> </div> <div class="tooltip-pointer s-1k"></div></div>'),U0=L("<div><!></div> <!>",1),z0={hash:"s-1k",code:'.tooltip-wrapper.s-1k{display:flex;flex-direction:column;min-width:0}.full-width.s-1k{width:100%}.tooltip.s-1k{bottom:100%;left:0;opacity:0;position:absolute;transition:opacity .2s,visibility .2s;visibility:hidden}.content.s-1k{background-color:rgba(41,41,41,.8);border-radius:3px;color:var(--white);display:inline-block;padding:6px 10px}.tooltip-pointer.s-1k{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 Ua(t,e){F(e,!0),q(t,z0);let[i,o]=Re(),r=()=>x(G,"$overlayContainer$",i),a=()=>x(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),p=g(e,"translateY",3,0),m=g(e,"isFullWidthWrapper",3,!1),f=g(e,"maxTooltipWidth",3,void 0),b=g(e,"placement",3,"top"),y=g(e,"onVisibilityChange",3,F0),$=5,S=K(void 0),C=K(void 0),I,R=K(0),E=K(0),P=K(0),O=K(0),D=Mt(),U=ve(),z=U.ui.playerSize,G=U.ui.overlayContainer$;De(()=>{Pt(()=>{y()(s())})});let le=U.getLogger().createComponentLog("Tooltip component"),Y=()=>{if(!r()||!n(C)||!n(S))return;N(E,$);let ee=r().getBoundingClientRect(),Se=n(S).getBoundingClientRect(),Fe=Se.width,qe=n(C).clientWidth,Ye=a().width,Te=(Fe-qe)/2,Me=Se.left+u()-ee.left,ze=Me+Te,Vt=Se.top+p()-ee.top,et=qe/2-$,Ot=ze<8,qt=ze+qe>Ye-8;Ot&&(ze=8,et=Me+Se.width/2-2.5*$),qt&&(ze=Ye-8-qe,et=Se.left-ee.left+Se.width/2-ze-$),N(P,ze,!0),N(O,Vt),N(R,et,!0)},re=()=>{!r()||!n(C)||!n(S)||N(E,-$)},X=()=>{if(!r()||!n(C)||!n(S))return;N(R,$);let ee=r().getBoundingClientRect(),Se=n(S).getBoundingClientRect(),Fe=Se.height,qe=n(C).clientHeight,Ye=(Fe-qe)/2+qe,Te=Se.left+u()-ee.left-n(C).clientWidth,Me=2,ze=Te-$;ze<8&&(ze=8);let et=Se.top+p()-ee.top+Ye,Ot=Me-Ye/2,qt=Me-$;N(P,ze,!0),N(O,et),N(E,Ot),N(R,qt)},we=()=>{!r()||!n(C)||!n(S)||N(R,-$)},ce=()=>{switch(b()){case"top":Y();break;case"bottom":re();break;case"left":X();break;default:we()}},ne=()=>{try{if(!r()||!n(S))return;ce(),s(!0)}catch(ee){le({message:String(ee)})}},he=()=>{s(!1)},xe=()=>{n(C)&&(I||(I=window.setTimeout(ne,D.controls.hideTimeoutTooltips)),s()&&ne())},Z=()=>{he(),window.clearTimeout(I),I=void 0},Ne=(ee,Se,Fe)=>{let qe="";switch(b()){case"top":qe=`transform: translate(${ee}px, ${Se}px);`;break;case"bottom":qe=`transform: translate(${ee}px, ${Se}px); top: auto; bottom: 100%;`;break;case"left":qe=`transform: translate(${ee}px, ${Se}px); left: 0; right: auto;`;break;default:qe=`transform: translate(${ee}px, ${Se}px);`}return qe+=` max-width: ${f()===void 0?"auto":`${f()}px`};`,qe+=` opacity: ${Fe?1:0}; visibility: ${Fe?"visible":"hidden"}`,qe},ue=(ee,Se)=>{let Fe="";switch(b()){case"top":Fe=`transform: translate(${ee}px, ${Se}px) rotate(0); top: auto; bottom: 0;`;break;case"bottom":Fe=`transform: translate(${ee}px, ${Se}px) rotate(180deg); top: 0; bottom: auto;`;break;case"left":Fe=`transform: translate(${ee}px, ${Se}px) rotate(-90deg); left: 100%; top: auto; bottom: 0;`;break;default:Fe=`transform: translate(${ee}px, ${Se}px) rotate(90deg); right: 100%; top: auto; bottom: 0;`}return Fe},A=v(()=>Ne(n(P),n(O),s())),Ke=v(()=>ue(n(R),n(E)));Nt(ce),mn(()=>window.clearTimeout(I));var Ce=U0(),j=de(Ce);let ie;j.__pointermove=xe,j.__pointerdown=Z,j.__pointerup=function(...ee){var Se;(Se=e.disableMouseupTooltipShow?void 0:xe)==null||Se.apply(this,ee)};var Oe=T(j);ri(Oe,()=>{var ee;return(ee=e.children)!=null?ee:ht}),w(j),ot(j,ee=>N(S,ee),()=>n(S));var Be=k(j,2);{var fe=ee=>{rm(ee,{children:(Se,Fe)=>{var qe=H0(),Ye=T(qe),Te=T(Ye,!0);w(Ye);var Me=k(Ye,2);w(qe),ot(qe,ze=>N(C,ze),()=>n(C)),B(()=>{Ge(qe,n(A)),pe(Te,d()),Ge(Me,n(Ke))}),_(Se,qe)},$$slots:{default:!0}})};V(Be,ee=>{d()&&!l()&&ee(fe)})}B(ee=>ie=se(j,1,"tooltip-wrapper s-1k",null,ie,ee),[()=>({"full-width":m()})]),_t("pointerenter",j,xe),_t("pointerleave",j,Z),_(t,Ce),H(),o()}rt(["pointermove","pointerdown","pointerup"]);var H_=t=>{t.stopPropagation()},W0=L("<div><!></div>"),K0={hash:"s-1a",code:".btn-container.s-1a{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-1a{min-width:0;width:100%}"};function Ao(t,e){F(e,!0),q(t,K0);let[i,o]=Re(),r=()=>x(u,"$isGraphOpened$",i),a=()=>x(s,"$isMobile",i),l=ve(),d=wo(),s=l.ui.isMobile,u=d.graphIsOpened$,p=l.ui.t,m=g(e,"className",3,""),f=g(e,"disabled",3,!1),b=g(e,"hasTooltip",3,!0),y=g(e,"ref",15,void 0),$=g(e,"width",15,void 0),S=g(e,"isFullWidthTooltip",3,!0),C=g(e,"tooltipContent",3,""),I=g(e,"tooltipVisible",3,!1),R=g(e,"tooltipPlacement",3,"top"),E=g(e,"disabledTooltipContent",19,()=>p("tooltip_button_disabled")),P=g(e,"isAriaHidden",3,!1),O=g(e,"onTooltipVisibilityChange",3,sm),D=g(e,"initialTranslateXPx",3,0),U=g(e,"initialTranslateYPx",19,()=>-18),z=g(e,"mouseEnter",3,sm),G=g(e,"mouseLeave",3,sm),le=v(()=>f()?r()?p("tooltip_disabled_when_graph_on"):E():C()),Y=K(!1);De(()=>{I()||N(Y,!1)});var re=W0();re.__pointerdown=[H_],re.__click=[H_];var X=T(re);{var we=ne=>{Ua(ne,{get content(){return n(le)},get translateX(){return D()},get translateY(){return U()},get isFullWidthWrapper(){return S()},get placement(){return R()},get onVisibilityChange(){return O()},get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get active(){return n(Y)},set active(he){N(Y,he,!0)},children:(he,xe)=>{var Z=Le(),Ne=de(Z);ri(Ne,()=>{var ue;return(ue=e.children)!=null?ue:ht}),_(he,Z)},$$slots:{default:!0}})},ce=ne=>{var he=Le(),xe=de(he);ri(xe,()=>{var Z;return(Z=e.children)!=null?Z:ht}),_(ne,he)};V(X,ne=>{b()&&n(le)&&!a()?ne(we):ne(ce,!1)})}w(re),ot(re,ne=>y(ne),()=>y()),B(()=>{var ne;se(re,1,`btn-container ${(ne=m())!=null?ne:""}`,"s-1a"),Ue(re,"aria-hidden",P()||null)}),_t("mouseenter",re,function(...ne){var he;(he=z())==null||he.apply(this,ne)}),_t("mouseleave",re,function(...ne){var he;(he=G())==null||he.apply(this,ne)}),An(re,"clientWidth",$),_(t,re),H(),o()}rt(["pointerdown","click"]);var q0=Ee('<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=v(()=>(e.completed,"interactive-episode-completed-icon"));Ze(t,{width:"20",height:"20",fill:"none",get testId(){return n(i)},children:(o,r)=>{var a=q0(),l=de(a),d=k(l);B(()=>{Ue(l,"fill",ta),Ue(l,"fill-opacity",e.completed?1:.24),Ue(d,"fill",e.completed?"var(--interactive-episode-complete)":"white")}),_(o,a)},$$slots:{default:!0}})}var Q0=L("<div><!></div>"),G0={hash:"s-x",code:".interactive-episode-icon.s-x{cursor:default;height:20px;position:absolute;transform:translateX(-50%);width:20px}.interactive-episode-icon.disabled.s-x{opacity:.4;pointer-events:none}"};function am(t,e){F(e,!0),q(t,G0);let o=ve().ui.t,r=K(0),a=v(()=>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=Q0();let u;var p=T(s);let m=v(()=>!!e.videoEpisode.completed);Xd(p,{get completed(){return n(m)}}),w(s),B(f=>{u=se(s,1,"interactive-episode-icon s-x",null,u,f),Ge(s,`left: ${e.videoEpisode.from+e.videoEpisode.width/2}%`)},[()=>({disabled:e.disabled})]),An(s,"clientWidth",f=>N(r,f)),_(l,s)},$$slots:{default:!0}}),H()}var Y0=L('<div><div class="video-episode-inner s-w"><div class="video-episode-loaded s-w"></div> <div></div></div></div>'),j0=L('<div class="video-episodes-wrap s-w"></div>'),X0={hash:"s-w",code:".video-episodes-wrap.s-w{height:100%;position:absolute;width:100%}.video-episode.s-w{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-w:first-child{padding-left:0}.video-episode.s-w:last-child{padding-right:0}.video-episode.s-w:not(.disabled):where(:hover,:active){transform:scaleY(1.5)}.video-episode-filled.s-w,.video-episode-inner.s-w,.video-episode-loaded.s-w{border-radius:var(--slider-radius);height:var(--slider-height);position:absolute}.video-episode-inner.s-w{background:var(--slider-bg);overflow:hidden;position:absolute;width:calc(100% - var(--slider-video-episode-gap)*2)}.video-episode.s-w:first-child .video-episode-inner:where(.s-w),.video-episode.s-w:last-child .video-episode-inner:where(.s-w){width:calc(100% - var(--slider-video-episode-gap))}.video-episode-loaded.s-w{background:var(--slider-loaded-bg);transition:transform .2s}.video-episode-filled.s-w,.video-episode-loaded.s-w{border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.video-episode-filled.s-w{background-color:var(--slider-filled-bg)}"};function lm(t,e){q(t,X0);let i=g(e,"videoEpisodes",19,()=>[]);var o=j0();wi(o,21,i,r=>r.from,(r,a)=>{var l=Y0();let d;var s=T(l),u=T(s),p=k(u,2);let m;w(s),w(l),B((f,b)=>{d=se(l,1,"video-episode s-w",null,d,f),Ge(l,`left: ${n(a).from}%; width: ${n(a).width}%`),Ge(u,`transform: translateX(${n(a).loadedWidth/n(a).width*100}%)`),m=se(p,1,"video-episode-filled s-w",null,m,b),Ge(p,`transform: translateX(${n(a).filledWidth/n(a).width*100}%)`)},[()=>({disabled:e.disabled,mobile:e.isMobile}),()=>({mobile:e.isMobile})]),_(r,l)}),w(o),_(t,o)}function Z0(t,e,i,o,r,a,l){if(t.preventDefault(),e()&&N(i,e().getBoundingClientRect(),!0),o()||n(r)||!e())return;N(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 ex(t,e,i,o,r){if(t.preventDefault(),e()||!n(i))return;N(i,!1);let a=o(t.clientX,t.clientY);r()(a,t)}function tx(t,e,i,o){t.stopPropagation(),t.preventDefault(),e()&&i()(o(t.clientX,t.clientY))}function ix(t,e,i,o,r,a){let l=e(t.clientX,t.clientY);i()&&o()(l),N(r,!1),a()(l)}var ox=L("<div></div>"),nx=L('<div class="bars s-h"><div class="loaded s-h"></div> <div></div></div>'),rx=L('<!> <div role="slider" tabindex="0"><!> <div><div></div></div></div>',1),sx={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 za(t,e){F(e,!0),q(t,sx);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),p=g(e,"videoEpisodes",19,()=>[]),m=g(e,"withWheelHandler",3,!1),f=g(e,"isInteractive",3,!1),b=g(e,"disabled",3,!1),y=g(e,"hideHandel",3,!1),$=g(e,"onPointerDown",3,Qn),S=g(e,"onHandleMove",3,Qn),C=g(e,"onPointerUp",3,Qn),I=g(e,"onPointerEnter",3,Qn),R=g(e,"onPointerMove",3,Qn),E=g(e,"onPointerLeave",3,Qn),P=g(e,"onMouseEnter",3,Qn),O=g(e,"onMouseLeave",3,Qn),D=g(e,"onWheelUp",3,Qn),U=g(e,"onWheelDown",3,Qn),z=g(e,"onWheelLeft",3,Qn),G=g(e,"onWheelRight",3,Qn),le=g(e,"onDisabledClick",3,Qn),Y=g(e,"loadedProgress",3,0),re=g(e,"filledProgress",3,0),X=g(e,"handleProgress",3,0),we=g(e,"ariaLabel",3,""),ce=g(e,"ariaValueMin",3,void 0),ne=g(e,"ariaValueMax",3,void 0),he=g(e,"ariaValueNow",3,void 0),xe=g(e,"ariaValueText",3,""),Z=g(e,"onContextMenu",3,Qn),Ne=g(e,"handleAlwaysVisible",3,!1),ue=Mt(),A=K(void 0),Ke=K(!1),Ce=v(()=>{var ye;return(ye=ne())!=null?ye:0}),j=v(()=>{var ye;return U_(p())&&((ye=p()[p().length-1])==null?void 0:ye.time)<n(Ce)}),ie=v(()=>U_(p())&&p().length&&n(j)&&n(Ce)?Ye(Y()*100,re()*100):[]);function Oe(ye){if(ye.preventDefault(),i()&&N(A,i().getBoundingClientRect(),!0),b())return;let Pe=Fe(ye.clientX,ye.clientY),It=qe(ye.clientX);I()(Pe,It,n(A).width)}function Be(ye){ye.preventDefault(),!b()&&E()()}function fe(){P()()}function ee(){O()()}function Se(ye){b()||m()&&(ye.preventDefault(),ye.deltaY<0?D()():ye.deltaY>0?U()():ye.deltaX>0?G()():z()())}function Fe(ye,Pe){return l()?Math.max(0,Math.min(1,(n(A).height-(Pe-n(A).top))/n(A).height)):Math.min(Math.max(ye-n(A).x,0),n(A).width)/n(A).width}function qe(ye){return Math.min(Math.max(ye-n(A).x,0),n(A).width)}function Ye(ye,Pe){let It=ue.features.episodesClustering&&!f()?ue.episodeMinWidthPc:0,Ve=[],st=p()[0].time/n(Ce)*100,mt=0,be=0;for(let nt=1;nt<p().length;nt++)mt=p()[nt].time/n(Ce)*100,mt-st>It&&(Ve.push({from:st,width:Math.max(0,mt-st),loadedWidth:Math.max(0,Math.min(mt,ye)-st),filledWidth:Math.max(0,Math.min(mt,Pe)-st),interactive:p()[nt-1].interactive,completed:p()[nt-1].completed}),st=p()[nt].time/n(Ce)*100,be++);let Je={from:st,width:Math.max(0,100-st),loadedWidth:Math.max(0,Math.min(ye,100)-st),filledWidth:Math.max(0,Math.min(Pe,100)-st),interactive:p()[be].interactive,completed:p()[be].completed};100-st<It?(be-=1,Ve[be].width+=100-st,Ve[be].loadedWidth+=Math.max(0,Math.min(ye,100)-st),Ve[be].filledWidth+=Math.max(0,Math.min(Pe,100)-st)):Ve[be]=Je;let We=p()[0].time;if(We!==0){let nt=We/n(Ce)*100;Ve.unshift({from:0,width:nt,loadedWidth:Math.min(nt,ye),filledWidth:Math.min(nt,Pe)})}return Ve}function Te(ye){return Math.max(0,Math.min(100,ye*100))}var Me=rx(),ze=de(Me);{var Vt=ye=>{var Pe=ox();let It;wi(Pe,21,()=>n(ie),Ve=>Ve.from,(Ve,st)=>{var mt=Le(),be=de(mt);{var Je=We=>{am(We,{get videoEpisode(){return n(st)},get disabled(){return b()}})};V(be,We=>{n(st).interactive&&We(Je)})}_(Ve,mt)}),w(Pe),B(Ve=>It=se(Pe,1,"interactive-icons s-h",null,It,Ve),[()=>({mobile:s(),hidden:s()&&!n(Ke)})]),_(ye,Pe)};V(ze,ye=>{f()&&ye(Vt)})}var et=k(ze,2);let Ot;et.__pointerdown=[Z0,i,A,b,Ke,Fe,$],et.__pointermove=[J0,b,Fe,qe,R,A,Ke,S],et.__pointerup=[ex,b,Ke,Fe,C],et.__click=[tx,b,le,Fe],et.__contextmenu=[ix,Fe,b,le,Ke,Z];var qt=T(et);{var St=ye=>{lm(ye,{get videoEpisodes(){return n(ie)},get disabled(){return b()},get isMobile(){return s()}})},Jt=ye=>{var Pe=nx(),It=T(Pe),Ve=k(It,2);let st;w(Pe),B((mt,be,Je)=>{Ge(It,mt),st=se(Ve,1,"filled s-h",null,st,be),Ge(Ve,Je)},[()=>`transform: translateX(${Te(Y())}%);`,()=>({"active-live":d()}),()=>`transform: translateX(${Te(re())}%);`]),_(ye,Pe)};V(qt,ye=>{n(ie).length?ye(St):ye(Jt,!1)})}var Dt=k(qt,2);let $e;var _e=T(Dt);let J;w(Dt),w(et),ot(et,ye=>i(ye),()=>i()),B((ye,Pe,It,Ve)=>{var st,mt;Ot=se(et,1,`slider ${(st=o())!=null?st:""}`,"s-h",Ot,ye),Ue(et,"aria-label",we()),Ue(et,"aria-valuemin",ce()),Ue(et,"aria-valuemax",ne()),Ue(et,"aria-valuenow",he()),Ue(et,"aria-valuetext",xe()),Ue(et,"data-testid",(mt=r())!=null?mt:null),$e=se(Dt,1,"handleWrap s-h",null,$e,Pe),Ge(Dt,It),J=se(_e,1,"handle s-h",null,J,Ve)},[()=>({disabled:b(),"slider-dragging":n(Ke),hidden:a(),"handle-always-visible":Ne(),"slider-vertical":l(),"no-handle":y(),square:u()}),()=>({hidden:y()}),()=>`transform: translateX(${Te(X())}%);`,()=>({"active-live":d()})]),_t("pointerenter",et,Oe),_t("pointerleave",et,Be),_t("mouseenter",et,fe),_t("mouseleave",et,ee),_t("wheel",et,Se),_(t,Me),H()}rt(["pointerdown","pointermove","pointerup","click","contextmenu"]);var eo=(t,e)=>Ma[t]>=Ma[e],z_=(t,e)=>Ma[t]<Ma[e],Ms=(t,e)=>Ma[t]<=Ma[e],W_=t=>t>699?"xl":t>599?"l":t>509?"m":t>320?"s":"xs";var lx=L("<div><!></div>"),dx=L("<div><!> <!></div>"),cx={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 dm(t,e){var qe,Ye;F(e,!0),q(t,cx);let[i,o]=Re(),r=()=>x(R,"$isAudioAvailable$",i),a=()=>x(f,"$muted$",i),l=()=>x(m,"$volume$",i),d=()=>x(S,"$currentGridType$",i),s=()=>x(Oe,"$controlsVisible",i),u=ve(),p=Mt(),m=u.state.volume$,f=u.state.muted$,{setVolume:b,startVolumeChanging:y,stopVolumeChanging:$}=u.actions.internal,S=u.ui.currentGridType$,C=(qe=u.callbacks)==null?void 0:qe.onAudioDoesNotExistHint,I=(Ye=u.callbacks)==null?void 0:Ye.onAudioDisabledHint,R=u.state.isAudioAvailable$,E=u.state.isAudioDisabled,P=u.ui.t,O=K(!1),D,U=v(()=>e.isAds||r()),z=v(()=>!n(U)||a()||l()===0),G=v(()=>Ms(d(),"s")),le=v(()=>n(G)?"":n(z)?!r()||E?P("tooltip_sound_unavailable"):P("tooltip_volume"):P("tooltip_volume_muted")),Y=v(()=>n(z)?P("tooltip_volume"):P("tooltip_volume_muted")),re=v(()=>n(z)?0:l()),X=!1,we=v(()=>e.isAds?!1:E?!I:r()?!1:!C);function ce(Te){y(),b(Te)}function ne(){Bu(u,l(),p.controls.volumeStepWheel)}function he(){Fu(u,l(),p.controls.volumeStepWheel)}function xe(Te){b(Te)}function Z(Te){b(Te),$()}function Ne(){X=!0}function ue(){X=!1,Ce()}function A(){clearTimeout(D),N(O,!0)}function Ke(){Ce()}function Ce(){D=window.setTimeout(()=>{X||N(O,!1)},p.controls.volumeBarTimeout)}function j(Te){Te.preventDefault(),Te.deltaY<0?ne():Te.deltaY>0&&he()}let ie=K(!1),Oe=u.ui.controlsVisible;De(()=>{s()||N(ie,!1)});var Be=dx();let fe;var ee=T(Be);Ua(ee,{get content(){return n(le)},translateY:-18,get active(){return n(ie)},set active(Te){N(ie,Te,!0)},children:(Te,Me)=>{let ze=v(()=>n(G)?"btn-volume-vertical":"btn-volume-horizontal");Ut(Te,{className:"btn-full-opacity",get disabled(){return n(we)},get testId(){return n(ze)},get ariaLabel(){return n(Y)},get click(){return e.click},get ariaKeyShortCut(){return vs.KeyM},role:"button",children:(Vt,et)=>{la(Vt,{get size(){return"24"},get volume(){return l()},get muted(){return n(z)}})},$$slots:{default:!0}})},$$slots:{default:!0}});var Se=k(ee,2);{var Fe=Te=>{var Me=lx();let ze;var Vt=T(Me);let et=v(()=>n(G)?"volumeBar-slider-vertical":""),Ot=v(()=>n(G)&&!n(O)),qt=v(()=>n(G)?Ne:zu),St=v(()=>n(G)?ue:zu),Jt=v(()=>Math.round(n(re)*100)),Dt=v(()=>`${Math.round(n(re)*100)}%`),$e=v(()=>n(G)?"volume-slider-vertical":"volume-slider");za(Vt,{get className(){return n(et)},get isHidden(){return n(Ot)},get isVertical(){return n(G)},withWheelHandler:!0,onWheelUp:ne,onWheelDown:he,onPointerDown:ce,onHandleMove:xe,onPointerUp:Z,get onPointerEnter(){return n(qt)},get onPointerLeave(){return n(St)},ariaLabel:"Ползунок громкости",ariaValueMin:0,ariaValueMax:100,get ariaValueNow(){return n(Jt)},get ariaValueText(){return n(Dt)},get filledProgress(){return n(re)},get handleProgress(){return n(re)},get testId(){return n($e)}}),w(Me),B(_e=>ze=se(Me,1,"volumeBar s-28",null,ze,_e),[()=>({"volumeBar-vertical":n(G)})]),_(Te,Me)};V(Se,Te=>{n(U)&&Te(Fe)})}w(Be),B(Te=>fe=se(Be,1,"volumeBar-container s-28",null,fe,Te),[()=>({vertical:n(G)})]),_t("mouseenter",Be,function(...Te){var Me;(Me=n(G)?A:zu)==null||Me.apply(this,Te)}),_t("mouseleave",Be,function(...Te){var Me;(Me=n(G)?Ke:zu)==null||Me.apply(this,Te)}),_t("wheel",Be,j),_(t,Be),H(),o()}import{noop as fx}from"@vkontakte/videoplayer-shared/es2015";var ux=Ee('<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>'),px=Ee('<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 cm(t,e){let i=g(e,"isFullscreen",8,!1),o=Tn(()=>i()?"close-fullscreen-icon":"open-fullscreen-icon");Ze(t,{get testId(){return n(o)},children:(r,a)=>{var l=Le(),d=de(l);{var s=p=>{var m=ux();_(p,m)},u=p=>{var m=px();_(p,m)};V(d,p=>{i()?p(s):p(u,!1)})}_(r,l)},$$slots:{default:!0}})}function Zd(t,e){F(e,!0);let i=g(e,"isFullscreen",3,!1),o=g(e,"click",3,fx),r=ve(),a=r.ui.isFullscreenOpenedByKeyboard,l=r.ui.t,d=v(()=>i()?l("tooltip_fullscreen_on"):l("tooltip_fullscreen_off"));Ut(t,{testId:"btn-fullscreen",get ariaLabel(){return n(d)},click:u=>{let p=ra(u);a.set(p),o()()},get ariaKeyShortCut(){return vs.KeyF},role:"button",children:(u,p)=>{cm(u,{get isFullscreen(){return i()}})},$$slots:{default:!0}}),H()}var mx=Ee('<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 um(t,e){let i=kn(e,["$$slots","$$events","$$legacy","children"]);var o=mx();Ji(o,()=>Ae({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=T(o);ri(r,()=>{var a;return(a=e.children)!=null?a:ht}),vi(),w(o),_(t,o)}var vx=Ee('<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 pm(t,e){let i=kn(e,["$$slots","$$events","$$legacy","children"]);var o=vx();Ji(o,()=>Ae({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=T(o);ri(r,()=>{var a;return(a=e.children)!=null?a:ht}),vi(6),w(o),_(t,o)}var gx={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 fm(t,e){F(e,!0),q(t,gx);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=v(()=>!o()&&!i()?91:i()?l:95),s=v(()=>!o()&&!i()?"vk-video-logo-icon--en":i()?a:"vk-video-logo-icon"),u=v(()=>`0 0 ${n(d)} 24`);pm(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 Jd(t,e){F(e,!0);let[i,o]=Re(),r=()=>x(b,"$isMobile",i),a=()=>x(f,"$currentGridType$",i),l=()=>x($,"$isCyrillicRelatedInterface$",i),d=g(e,"ref",15,void 0),s=g(e,"logoClickable",3,!1),u=g(e,"targetUrl",3,""),p=Mt(),m=ve(),f=m.ui.currentGridType$,b=m.ui.isMobile,y=m.ui.t,$=m.isCyrillicRelatedInterface$,S=v(()=>p.logoType!=="vk"),C=v(()=>n(S)?y("tooltip_vk_video_logo"):y("tooltip_vk_logo")),I=v(()=>(r()&&Ms(a(),"m")||Ms(a(),"l"))&&n(S)),R=()=>{var O,D;e.click(),(O=m.callbacks)!=null&&O.onLogoClicked?(D=m.callbacks)==null||D.onLogoClicked():u()&&window.open(u(),"_blank")},E=v(()=>!s()),P=v(()=>n(S)?"btn-vk-video-logo":"btn-vk-logo");Ut(t,{className:"btn-full-opacity",get disabled(){return n(E)},click:R,get testId(){return n(P)},get ariaLabel(){return n(C)},get ref(){return d()},set ref(O){d(O)},children:(O,D)=>{var U=Le(),z=de(U);{var G=Y=>{fm(Y,{get logo(){return p.logoType},get short(){return n(I)},get isCyrillic(){return l()}})},le=Y=>{um(Y,{})};V(z,Y=>{n(S)?Y(G):Y(le,!1)})}_(O,U)},$$slots:{default:!0}}),H(),o()}import{ChromecastState as $x}from"@vkontakte/videoplayer-core/es2015";import{ChromecastState as q_}from"@vkontakte/videoplayer-core/es2015";var hx=Ee('<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-1c"></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-1c"></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-1c"></path>',1),_x=Ee('<path d="M1 18v3h3c0-1.66-1.34-3-3-3z"></path><path d="M1 14v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7z"></path><path d="M1 10v2a9 9 0 0 1 9 9h2c0-6.08-4.93-11-11-11z"></path><path d="M21 3H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" class="s-1c"></path><path d="M5.667 7.44H18.5v9.167h-5.161a11.947 11.947 0 0 0-7.673-7.672V7.44Z"></path>',1),bx={hash:"s-1c",code:".animated.s-1c{animation-duration:1s;animation-iteration-count:infinite}.wave1.animated.s-1c{animation-name:s-1c-wave1}.wave2.animated.s-1c{animation-name:s-1c-wave2}.wave3.animated.s-1c{animation-name:s-1c-wave3}@keyframes s-1c-wave1{0%{opacity:.3}33%{opacity:1}66%{opacity:1}to{opacity:1}}@keyframes s-1c-wave2{0%{opacity:.3}33%{opacity:.3}66%{opacity:1}to{opacity:1}}@keyframes s-1c-wave3{0%{opacity:.3}33%{opacity:.3}66%{opacity:.3}to{opacity:1}}"};function ec(t,e){F(e,!0),q(t,bx);let i=g(e,"isMobile",3,!1),o=v(()=>e.iconState===q_.CONNECTED),r=v(()=>e.iconState===q_.CONNECTING),a=v(()=>n(o)?"#2688EB":ta),l=v(()=>e.size?vn(e.size):void 0);var d=Le(),s=de(d);{var u=m=>{Ze(m,{get fill(){return n(a)},get style(){return n(l)},testId:"chromecast-mobile-icon",children:(f,b)=>{var y=hx();vi(2),_(f,y)},$$slots:{default:!0}})},p=m=>{Ze(m,{get style(){return n(l)},testId:"chromecast-icon",children:(f,b)=>{var y=_x(),$=de(y);let S;var C=k($);let I;var R=k(C);let E;var P=k(R,2);let O;B((D,U,z,G)=>{S=se($,0,"wave1 s-1c",null,S,D),I=se(C,0,"wave2 s-1c",null,I,U),E=se(R,0,"wave3 s-1c",null,E,z),O=se(P,0,"s-1c",null,O,G)},[()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({hidden:!n(o)})]),_(f,y)},$$slots:{default:!0}})};V(s,m=>{i()?m(u):m(p,!1)})}_(t,d),H()}import{noop as yx}from"@vkontakte/videoplayer-shared/es2015";function tc(t,e){F(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"isMobile",3,!1),r=g(e,"click",3,yx),l=ve().ui.t,d=v(()=>e.state===$x.CONNECTED?l("tooltip_chromecast_on"):l("tooltip_chromecast_off"));Ut(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}}),H()}import{noop as wx}from"@vkontakte/videoplayer-shared/es2015";var xx=Ee('<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 mm(t){Ze(t,{testId:"episodes-icon",children:(e,i)=>{var o=xx();vi(2),_(e,o)},$$slots:{default:!0}})}var Wu=(t,e,i)=>i.filter(o=>o.time<=t*e).pop();var Sx=L('<span class="text mobile s-24"> </span> <div class="chevron-episodes s-24" data-testid="btn-episodes_icon"><!></div>',1),Tx=L('<span class="text s-24"> </span>'),Cx=L('<span class="text count s-24"> </span>'),Ix=L("<!> <!>",1),Ex={hash:"s-24",code:".text.s-24{overflow:hidden;padding:0 8px;text-overflow:ellipsis;white-space:nowrap}.text.count.s-24{overflow:visible}.text.mobile.s-24{padding:0 3px 0 4px}.chevron-episodes.s-24{margin-bottom:-6px;opacity:.7;transform:scale(.8)}"};function ic(t,e){var X,we,ce;F(e,!0),q(t,Ex);let[i,o]=Re(),r=()=>x(y,"$currentGridType$",i),a=()=>x($,"$openedByKeyboard$",i),l=()=>x(S,"$panelOpened$",i),d=()=>x(C,"$isMobile",i),s=g(e,"position",3,0),u=g(e,"duration",3,0),p=g(e,"timeCodes",19,()=>[]),m=ve(),f=(we=(X=m.callbacks)==null?void 0:X.onEpisodeChanged)!=null?we:wx,b=!!((ce=m.callbacks)!=null&&ce.onEpisodeClicked),y=m.ui.currentGridType$,$=m.ui.episodes.openedByKeyboard$,S=m.ui.episodes.panelOpened$,C=m.ui.isMobile,I=m.ui.t,R=K(void 0),E=ne=>{var xe,Z,Ne;if(!!((xe=m.callbacks)!=null&&xe.onEpisodeClicked)){let ue=ra(ne);$.set(ue),S.set(!0),(Ne=(Z=m.callbacks)==null?void 0:Z.onEpisodeClicked)==null||Ne.call(Z,ue)}},P=K(null),O=v(()=>s()/u());De(()=>{var he;let ne=Wu(n(O),u(),p());ne?((he=n(P))==null?void 0:he.time)!==ne.time&&(f(ne),N(P,ne,!0)):N(P,null)});let D=v(()=>{var ne;return((ne=n(P))==null?void 0:ne.text)||""}),U=v(()=>eo(r(),"xl")?"FULL":eo(r(),"m")&&z_(r(),"xl")?"COUNT":"SHORT"),z=v(()=>`${I("tooltip_episodes")}: ${n(D)}`),G=(ne,he,xe)=>gt(null,null,function*(){yield go(),(ne==null?void 0:ne.getAttribute("aria-expanded"))==="false"&&he&&!xe&&Pt(()=>{$.set(!1),ne.focus()})});De(()=>{G(n(R),a(),l())});var le=Le(),Y=de(le);{var re=ne=>{let he=v(()=>d()?"px-0":""),xe=v(()=>!b);Ut(ne,{get className(){var Z;return`w-max btn-full-opacity btn-jc-l ${(Z=n(he))!=null?Z:""}`},testId:"btn-episodes",click:E,get disabled(){return n(xe)},get ariaExpanded(){return l()},get ariaLabel(){return n(z)},get ref(){return n(R)},set ref(Z){N(R,Z,!0)},children:(Z,Ne)=>{var ue=Le(),A=de(ue);{var Ke=j=>{var ie=Sx(),Oe=de(ie),Be=T(Oe,!0);w(Oe);var fe=k(Oe,2),ee=T(fe);Mr(ee,{direction:"right"}),w(fe),B(()=>pe(Be,n(D))),_(j,ie)},Ce=j=>{var ie=Ix(),Oe=de(ie);mm(Oe,{});var Be=k(Oe,2);{var fe=Se=>{var Fe=Tx(),qe=T(Fe,!0);w(Fe),B(()=>pe(qe,n(D))),_(Se,Fe)},ee=(Se,Fe)=>{{var qe=Ye=>{var Te=Cx(),Me=T(Te,!0);w(Te),B(()=>pe(Me,p().length)),_(Ye,Te)};V(Se,Ye=>{n(U)==="COUNT"&&Ye(qe)},Fe)}};V(Be,Se=>{n(U)==="FULL"?Se(fe):Se(ee,!1)})}_(j,ie)};V(A,j=>{d()?j(Ke):j(Ce,!1)})}_(Z,ue)},$$slots:{default:!0}})};V(Y,ne=>{n(P)&&ne(re)})}_(t,le),H(),o()}import{debounceFn as db}from"@vkontakte/videoplayer-shared/es2015";import{ChromecastState as Ox,PlaybackState as ql,Player as Dx,PredefinedQualityLimits as bs,VideoFormat as nc,clientChecker as Z_}from"@vkontakte/videoplayer-core/es2015";import{assertNonNullable as mr,getHighestQuality as Bx,InterfaceLanguage as Fx,isInvariantQuality as Hx,isNonNullable as Ux,loadVKLangPack as zx,Logger as Wx,map as J_,merge as Kx,Observable as Xu,Subject as rc,Subscription as $m,TracerFactory as qx,ValueSubject as Qx,VideoQuality as Gx,devNull as Yx,now as jx,filter as Xx,once as Zx}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as Rs}from"@vkontakte/videoplayer-statistics/es2015";import{detectEmbed as Px,devNull as si,isNonNullable as Ax,now as ai}from"@vkontakte/videoplayer-shared/es2015";import{addScript as kx,Subject as gn,clearVideoElement as Lx}from"@vkontakte/videoplayer-shared/es2015";var Mx="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",Ku=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 gn,loadStarted$:new gn,loadEnded$:new gn,loadError$:new gn,ready$:new gn,slotRequested$:new gn,started$:new gn,timeRemained$:new gn,paused$:new gn,resumed$:new gn,ended$:new gn,empty$:new gn,skipped$:new gn,clicked$:new gn,closed$:new gn,error$:new gn};this.loadAdman=e=>(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[ai()]}),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?(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[ai()]}),i(),this.events.loadEnded$.next()):(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[ai()]}),o())};kx(Mx,e,this.loadTimeout).then(()=>{si.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[ai()]}),window.AdmanHTML?(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[ai()]}),i(),this.events.loadEnded$.next()):(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[ai()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout))}).catch(l=>{si.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(l)],numbers:[ai()]}),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?(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[ai()]}),i(),this.events.loadEnded$.next()):(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[ai()]}),o())},l=()=>{d=!0,o()},d=!1,s=window.setTimeout(()=>{si.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[ai()]}),l()},this.loadTimeout);e.addEventListener("abort",l),e.aborted&&(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[ai()]}),l()),window.AdmanHTML=window.AdmanHTML||null,import("@adtech/rbadman/out/rbadman-html5.min.js").then(()=>{si.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(d)],numbers:[ai()]}),!d&&(window.AdmanHTML?(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[ai()]}),i(),this.events.loadEnded$.next()):(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[ai()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout)))},l).finally(()=>{clearTimeout(r),clearTimeout(s),e.removeEventListener("abort",l)})});this.onAdsReady=()=>{si.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[ai()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(e,i)=>{var o;si.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+i.muted],numbers:[ai(),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?ge(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;si.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),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;si.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),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(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[ai()]}),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;si.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{var e;si.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{var e;si.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),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;si.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),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")=>{si.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",e],numbers:[ai()]}),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"),si.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[ai()]}),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")}initAdman(e){return gt(this,null,function*(){var R,E;if(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[ai(),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:p,externalApi:m}=e;this.externalApi=m;let f,b=this.playerState&&ge(this.playerState.vsid);b&&(this.isVsidOriginal?f=b:f=parseInt(b,36));let{isEmbed:y,immediateOrigin:$}=Px(),S=(R=y?$:window.location.href)!=null?R:window.location.href,C=Ae(Kt(Ae(Kt(Ae({},s),{dl:encodeURIComponent(S),autoplay:r?1:0,player_width:i,player_height:o}),f?{request_id:f}:{}),{duration:p}),u);C=Object.fromEntries(Object.entries(C).filter(([P,O])=>Ax(O)));let I={slot:d,wrapper:a,videoEl:l,videoQuality:o,params:C,browser:{mobile:!1}};try{let P=new window.AdmanHTML;if(P.onReady(this.onAdsReady),P.onStarted(this.onAdStarted),P.onPlayed(this.onAdPlayed),P.onPaused(this.onAdPaused),P.adMidrollPoint(this.onAdMidrollPoint),P.onClosed(this.onAdClosed),P.onSkipped(this.onAdSkipped),P.onClicked(this.onAdClicked),P.onTimeRemained(this.onAdTimeRemained),P.onCompleted(this.onAdCompleted),P.onError(this.onAdError),P.setDebug(!1),(E=this.externalApi)!=null&&E.videoGetAds){let O=yield this.safeExternalCall(this.externalApi.videoGetAds,C);O&&(delete I.slot,delete I.params,Object.assign(I,{json:O}))}P.init(I),this.adman=P,this.videoElement=l,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(I)}`})}catch(P){si.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(P)],numbers:[ai()]}),this.onAdError("could not init adman")}})}switchToVideo(e=!1){var o,r,a;if(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",(o=this.currentAdSection)!=null?o:"","force: "+e],numbers:[ai()]}),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(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),this.adsState){this.log({message:"toggle play"});let i=ge(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(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[ai()]}),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(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),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(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),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(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),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(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),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,p,m,f;si.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[ai()]}),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),(p=this.adman)==null||p.onCompleted(void 0),(m=this.adman)==null||m.onError(void 0),(f=this.adman)==null||f.destroy(),this.videoElement&&Lx(this.videoElement),this.isDestroyed=!0}safeExternalCall(e,...i){return gt(this,null,function*(){var o;try{return yield e(...i)}catch(r){return this.onAdError((o=r==null?void 0:r.message)!=null?o:"External call failed"),null}})}};var Q_=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 vm=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 qu,{startTime:p,endTime:m}=u.parse(s);l.startTime=p,l.endTime=m}else if(s.trim()!==""){let u=new gm,{texts:p}=u.parse(s);l.texts=[...l.texts,...p]}(l.startTime||l.endTime)&&l.texts.length>0&&o.push(l)}return o}},qu=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}},gm=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((p,m)=>{let f=l.indexOf(m,d);return p===-1||p>f?f:p},-1);if(u===-1){s.push(l.substring(d));break}s.push(l.substring(d,u)),d=u+1}return s}}),a=new qu;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}},G_=vm;import{isNonNullable as hm}from"@vkontakte/videoplayer-shared/es2015";var Wa,ki,_m=0,bm=!1,Y_="",j_=(t,e=0,i=0)=>t<e&&t<i,Qu=(t,e=0,i=0)=>t>=e&&t<=i,Vx=(t,e=0,i=0)=>t>e&&t>i,X_=(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:p})=>Qu(t,u,p));let a=t>=_m,l=t<_m;if(_m=t,l&&(bm=!1),hm(Wa)&&Qu(t,Wa.startTime,Wa.endTime)&&Y_===e.value)return Wa;if(!hm(ki)&&(r!=null&&r.length)&&!bm){ki=r.find(({startTime:u,endTime:p})=>Qu(t,u,p)||a&&j_(t,u,p)),Wa=void 0,!hm(ki)&&r[r.length-1].endTime<t&&(bm=!0);return}else{if(Qu(t,ki==null?void 0:ki.startTime,ki==null?void 0:ki.endTime))return Wa=ki,ki=void 0,Y_=e.value,Wa;(a&&Vx(t,ki==null?void 0:ki.startTime,ki==null?void 0:ki.endTime)||l&&j_(t,ki==null?void 0:ki.startTime,ki==null?void 0:ki.endTime))&&(ki=void 0)}};var Gu={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"},Rx={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=Gu[t])!=null?e:Gu[Rx[t]])!=null?i:void 0};import{Subscription as Nx}from"@vkontakte/videoplayer-shared/es2015";import"@vkontakte/videoplayer-statistics/es2015";var Yu=class{constructor(e,i,o,r=new Nx){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 ju=(i=>(i.DESKTOP_CONTROL_PANEL_LEFT="desktop-control-panel-left",i.DESKTOP_CONTROL_PANEL_RIGHT="desktop-control-panel-right",i))(ju||{});var _s=t=>t!=null?t:0,Vs=(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(_s(i==null?void 0:i.top)-_s(o==null?void 0:o.top)),left:Math.round(_s(i==null?void 0:i.left)-_s(o==null?void 0:o.left)),bottom:Math.round(_s(i==null?void 0:i.bottom)-_s(o==null?void 0:o.top)),right:Math.round(_s(i==null?void 0:i.right)-_s(o==null?void 0:o.left))}},Wl=t=>{var i;let e=(i=t==null?void 0:t.getBoundingClientRect)==null?void 0:i.call(t);return{width:_s(e==null?void 0:e.width),height:_s(e==null?void 0:e.height)}};var Mn="off";var Kl=t=>!!(Math.round(Math.abs(t)/90)%2);var eb=({interfaceLanguage:t,isCyrillicRelatedInterface:e,videoId:i,isClip:o,isLiveCatchUpMode:r,statAuthToken:a,isAudioDisabled:l,canDownload:d,callbacks:s,webApi:u,videoEpisodes:p,previewThumbsData:m,uiConfig:f,coreConfig:b,player:y,disabledControls:$,isInteractive:S,interactiveRanges$:C,isInteractiveTime$:I,replayInteractive:R,stopPlayer:E,hasInteractiveBranches:P,playPrevChapterDisabledTooltip:O,additionalButtons:D,additionalSettingsMenuItems:U,additionalContextMenuItems:z,playPrevVideo:G,playNextVideo:le,onVideoChanged:Y,looped:re=!1,statistics:X,saveRate:we,internalsExposure:ce,playerView:ne,playerId:he})=>{var Uv,zv,Wv;let xe=Kt(Ae({},b),{configName:[...(Uv=b.configName)!=null?Uv:[],"ui"],isAudioDisabled:l,live:Kt(Ae({},(zv=b.live)!=null?zv:{}),{isLiveCatchUpMode:!!r})}),Z=f,Ne=qx.createRootTracer(Z.features.tracer),ue=Ne.createComponentTracer("Store"),A=y||new Dx(xe,Ne,{playerId:he});ce==null||ce.expose({corePlayer:A});let Ke=new Wx,Ce=new Ku(Ke,{loadTimeout:Z.ads.loadTimeout,initTimeout:Z.ads.initTimeout,runtimeTimeout:Z.ads.runtimeTimeout,useAdmanFromNPM:Z.ads.useAdmanFromNPM,volumeMultiplier:Z.ads.volumeMultiplier,isVsidOriginal:Z.ads.isVsidOriginal}),j=Ra.getInstance(),ie=u==null?void 0:u.pictureInPictureApi,Oe=u==null?void 0:u.annotationsApi,Be=u==null?void 0:u.slotsApi,fe=Ke.createComponentLog("Store"),ee,Se,Fe={},qe=new bu,Ye=new $m,Te="",Me=ae(!1),ze=X&&X.oneStat?ui(X.oneStat.vsid$):Lr(void 0),Vt=ae(ia()),et=ae(!1),Ot=()=>y_(document,Z_.device.isIOS),qt=(Wv=ie==null?void 0:ie.info.isActive$)!=null?Wv:new Qx(!1),St=ae(0),Jt=ae(!1),Dt=ae(!1),$e=ae([]),_e=Kx(A.events.fatalError$,A.events.managedError$).subscribe(c=>$e.update(h=>[...h,c])),J=Lr(!1,c=>{let h=A.events.fatalError$.subscribe(()=>c(!0));return()=>h.unsubscribe()}),ye=c=>gt(null,null,function*(){var oe;let h=Object.values(Fx).includes(c);if(Z.downloadVKLanguages&&(h&&Z.updateBuiltinLanguages||!Vf(c))){let Ie;try{Ie=yield zx(c,kh,Lh)}catch(it){(oe=X==null?void 0:X.oneStat)==null||oe.logError({errorType:"VKLangPack",fatal:!1}),j==null||j.report(it,{errorType:"VKLangPack",fatal:!1})}Ie&&(Mf({language:c,pack:Ie,fallback:Z.defaultLanguage}),Pe.set(c),It.update(it=>it+1))}Vf(c)&&Pe.set(c)}),Pe=ae(t),It=ae(0),Ve=ae(e);ye(t);let st=(c,h)=>{let M=ge(Pe);return Rf(M,c,h,Z.defaultLanguage)},mt=ae("thumb");mt.subscribe(c=>{c==="ads"&&A.info.playbackState$.getValue()&&We()});let be=(()=>{let c=_i([J,mt],([h,M])=>h?"crashed":M);return Kt(Ae({},c),{is:h=>ge(c)===h})})(),Je=ae(),We=()=>{Je.set({muted:A.info.muted$.getValue()})},nt=(()=>{let c=ae(new Set($));return Kt(Ae({},c),{add:h=>{c.update(M=>new Set([...M].concat(h)))},remove:h=>{c.update(M=>{let oe=[...M];return new Set(Array.isArray(h)?oe.filter(Ie=>!h.includes(Ie)):oe.filter(Ie=>Ie!==h))})},includes:h=>{let M=ge(c);return Array.isArray(h)?h.every(oe=>M.has(oe)):M.has(h)}})})(),ei=ae({width:0,height:0}),li=null,gi=A.info.isBuffering$,bi=Lr(gi.getValue(),c=>{let h=gi.subscribe(M=>{M&&li===null?li=window.setTimeout(()=>{c(gi.getValue()),li=null},Z.loaderDelay):c(M)});return()=>{h.unsubscribe(),li&&clearTimeout(li)}});ue.log("create store"),fe({message:"create store"});let io=c=>{let h=c.container,M=()=>{oi=new MutationObserver(Ie=>{let{removedNodes:it}=Ie[0];it.length&&h.append(A.experimental.element$.getValue())}),oi.observe(h,{childList:!0})},oe=A.experimental.element$.getValue();if(oe)h.append(oe),M();else{let Ie=A.experimental.element$.pipe(Xx(it=>!!it),Zx()).subscribe(it=>{h.append(it),M()});Ye.add(Ie)}},ho=c=>{fe({message:`init video, config: ${JSON.stringify(c)}`}),S?io(c):(Yx.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[jx()]}),A.initVideo(c)),ue.log("init video",{isInteractive:S}),c.subtitles&&A.setExternalTextTracks(c.subtitles),ee=c,Te=c.subtitlesForcedLanguage||""},pi=new rc,ct=c=>pi.next(c),Pi=new rc,jt=new rc,wt=new rc,oi=null,Xt={actionRewind$:Pi,actionSeek$:jt,inPiP$:qt,inFullscreen$:new Xu(c=>Vt.subscribe(h=>c.next(h))),actionSetSubtitle$:wt,nextMovie$:pi},bt=new rc,je={actionSeek$:jt,actionSubtitlesSwitched$:bt,playerSize$:new Xu(c=>ei.subscribe(h=>c.next(h))),inPiP$:qt,inFullscreen$:new Xu(c=>Vt.subscribe(h=>c.next(h))),isLoaderVisible$:new Xu(c=>bi.subscribe(h=>c.next(h)))};if(X){let{oneStat:c,thinOneStat:h,mediascopePixel:M,statSubscription:oe}=X;c&&(S||oe.add(c.attachTo(A)),oe.add(c.attachToUi(Xt)),oe.add(c.attachToAds(Ce.events)),c.authorize(a).catch(Ie=>{fe({message:`onestat auth error ${String(Ie)}`})}),M&&M.attachTo(A)),h&&(oe.add(h.attachTo(A,Ce.events)),oe.add(h.attachToUi(je)),oe.add(h.attachToAds(Ce.events)),h.updateContext({isMobile:ge(Me)}),h.authorize(a))}if(j){let c=new $m,h=(M,oe)=>c.add(M.subscribe(oe));if(h(A.events.managedError$,M=>{j.logIError(M)}),h(A.events.fatalError$,M=>{j.logIError(M,!0)}),X){let{oneStat:M}=X;M&&h(M.experimental.error$,oe=>{j.logIError(oe)})}j.sentrySubscription.add(c)}let xi=()=>{if(Z_.device.isIOS&&Se)try{x_(Se)}catch(c){fe({message:`exitIosSafariFullscreen failed: ${c}`})}};Ye.add(A.experimental.element$.subscribe(c=>{c&&(Se=c,c.classList.add("player-media"),Oa(ie)&&ie.updateVideoElement(),S&&c.setAttribute("pip","false"),ne==="preview"&&(c.setAttribute("disablePictureInPicture","true"),c.setAttribute("x-yandex-pip","false")))})).add(A.events.ended$.subscribe(()=>{var c;xi(),(c=s==null?void 0:s.onEnded)==null||c.call(s)})).add(A.events.looped$.subscribe(()=>{var c;(c=s==null?void 0:s.onLooped)==null||c.call(s)})).add(A.events.started$.subscribe(()=>gt(null,null,function*(){var h,M;Oa(ie)&&(yield ie==null?void 0:ie.revealPictureInPicture());let c=A.info.muted$.getValue();(h=s==null?void 0:s.onStarted)==null||h.call(s),(M=Fe.onStarted)==null||M.call(Fe,c)}))).add(A.events.willSeek$.subscribe(({from:c,to:h})=>{var M;(M=s==null?void 0:s.onSeek)==null||M.call(s,c,h)})).add(A.events.autoplaySoundProhibited$.subscribe(()=>{var c;(c=s==null?void 0:s.onAutoplaySoundProhibited)==null||c.call(s)})).add(A.info.position$.subscribe(c=>{var M;let h=A.info.duration$.getValue();isFinite(h)&&h>0&&((M=s==null?void 0:s.onTimeupdate)==null||M.call(s,h,c),Ce.setPosition(c,h))})).add(A.events.fatalError$.subscribe(c=>{var h;(h=s==null?void 0:s.onCrashed)==null||h.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(A.events.fetcherRecoverableError$.subscribe(c=>{var h;(h=s==null?void 0:s.onRecoverableError)==null||h.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(A.events.loadedMetadata$.subscribe(()=>{Jt.set(!0)})).add(A.info.is3DVideo$.subscribe(c=>{Dt.set(c)})).add(A.info.isEnded$.subscribe(c=>{S&&(c?(I!=null&&I.getValue()&&nt.add(kd),nt.add("PLAY_BUTTON")):nt.remove("PLAY_BUTTON"))})).add(A.info.liveTime$.subscribe(c=>{var h;(h=s==null?void 0:s.onLiveTime)==null||h.call(s,c)})).add(A.info.isStalled$.subscribe(c=>{var h;(h=s==null?void 0:s.onStalledChanged)==null||h.call(s,c)})).add(A.info.isLiveEnded$.subscribe(c=>{var h;return c&&((h=s==null?void 0:s.onLiveEnded)==null?void 0:h.call(s))})).add(Ce.events.loadStarted$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadStarted)==null?void 0:h.call(c)})).add(Ce.events.loadEnded$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadEnded)==null?void 0:h.call(c)})).add(Ce.events.loadError$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadError)==null?void 0:h.call(c)})).add(Ce.events.init$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onInit)==null?void 0:h.call(c)})).add(Ce.events.ready$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onReady)==null?void 0:h.call(c)})).add(Ce.events.started$.subscribe(c=>{var h,M;return(M=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onStarted)==null?void 0:M.call(h,c)})).add(Ce.events.timeRemained$.subscribe(c=>{var h,M;return(M=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onTimeRemained)==null?void 0:M.call(h,c)})).add(Ce.events.ended$.subscribe(c=>{var h,M;return(M=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onCompleted)==null?void 0:M.call(h,c)})).add(Ce.events.empty$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onEmpty)==null?void 0:h.call(c)})).add(Ce.events.clicked$.subscribe(c=>{var h,M;return(M=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onClicked)==null?void 0:M.call(h,c)})).add(Ce.events.closed$.subscribe(c=>{var h,M;return(M=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onClosed)==null?void 0:M.call(h,c)})).add(Ce.events.error$.subscribe(c=>{var h,M;return(M=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onError)==null?void 0:M.call(h,c)})).add(Ce.events.paused$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onPaused)==null?void 0:h.call(c)})).add(Ce.events.resumed$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onResumed)==null?void 0:h.call(c)}));let oo=new $m,Jo=()=>{var it,At,Ft;let{debugLog:c}=Z,h,M="#9df7b7",oe="#efd169";if(c&&c!==!0){let{colors:Qt}=c;h=c.tag,M=(it=Qt==null?void 0:Qt[0])!=null?it:M,oe=(Ft=(At=Qt==null?void 0:Qt[1])!=null?At:Qt==null?void 0:Qt[0])!=null?Ft:oe}let Ie=h?`: ${h}`:"";oo.add(A.events.log$.subscribe(Qt=>{console.debug(`%c sdk${Ie} `,`background:${M};`,`sdk component: ${Qt.component}`,Qt.message)})).add(Ke.log$.subscribe(Qt=>{console.debug(`%c ui${Ie} `,`background:${oe};`,`ui component: ${Qt.component}.`,Qt.message)}))},_n=()=>{oo.unsubscribe()},Et=(c,h)=>{ue.log("start camera manual rotation",{mx:c,my:h}),A.startCameraManualRotation(c,h)},Bt=(c=!1)=>{ue.log("stop camera manual rotation",{immediate:c}),A.stopCameraManualRotation(c)},W=(c,h,M)=>{ue.log("move camera focus px",{xpx:c,ypx:h,dt:M}),A.moveCameraFocusPX(c,h,M)},kt=()=>{A.holdCamera()},di=()=>{A.releaseCamera()},at=Lr(A.info.position$.getValue(),c=>{let h,M,oe=()=>{let Ie=A.info.playbackState$.getValue(),it=A.info.isLive$.getValue(),At=A.info.duration$.getValue(),Ft=A.info.position$.getValue();if(Ie&&[ql.PLAYING,ql.PAUSED].includes(Ie)){let Qt=it?Ft-At:A.getExactTime();Qt!==M&&c(Qt),M=Qt}h=requestAnimationFrame(oe)};return oe(),()=>cancelAnimationFrame(h)}),Tt=ui(A.info.playbackState$),Gt=ui(A.info.currentBuffer$),lt=ui(A.info.isEnded$),Li=ui(A.info.isLive$),Mi=Z.features.playbackRate?ui(A.info.canChangePlaybackSpeed$):Lr(!1),en=ui(A.info.liveBufferTime$),ko=ui(A.info.volume$),_o=ui(A.info.muted$),Fi=$u(A.info.predefinedQualityLimitType$.pipe(J_(c=>c===bs.TRAFFIC_SAVING)),A.info.predefinedQualityLimitType$.getValue()===bs.TRAFFIC_SAVING),vr=$u(A.info.predefinedQualityLimitType$.pipe(J_(c=>c===bs.HIGH_QUALITY)),A.info.predefinedQualityLimitType$.getValue()===bs.HIGH_QUALITY),no=ui(A.info.autoQualityLimitingAvailable$),bo=ui(A.info.availableQualities$),Hi=ui(A.info.availableQualitiesFps$),tn=ui(A.info.chromecastState$),on=ui(A.info.chromecastDeviceName$),jn=ui(A.info.currentFormat$),gr=ui(A.info.throughputEstimation$),Rr=ui(A.info.videoBitrate$),ys=ui(A.info.intrinsicVideoSize$),ts=ui(A.info.duration$),is=ui(A.info.isAudioAvailable$),Xn=()=>{li&&clearTimeout(li),li=null},nn=_i([ts,Li],([c,h])=>h?-c:c),Lo=_i([Tt],([c])=>c===ql.PLAYING),rn=ui(A.info.atLiveEdge$),Zn=ui(A.info.atLiveDurationEdge$),Vn=ui(A.info.position$),Nr=_i([Vn,ts],([c,h])=>isFinite(c)&&isFinite(h)&&!!h),Or=_i([tn],([c])=>c===Ox.CONNECTED),os=ui(A.info.availableVideoStreams$),hr=Z.features.audioLanguages?ui(A.info.availableAudioStreams$):Lr([]),ro=ui(A.info.currentVideoStream$),_r=ui(A.info.currentAudioStream$),Jn=c=>{c.language&&Pf(c.language),A.setVideoStream(c)},bn=(c,h)=>{A.setAudioStream(c),Oo(h)&&(c.language&&Pf(c.language),Z.features.userVideoPrefs&&i&&Lf(Z.userSalt,String(i),{audioTrackId:c.id}))},so=c=>{let h;if(c.length===1&&(h=c.at(0)),h!=null||(h=c.find(oe=>"isDefault"in oe&&oe.isDefault)),Z.features.userVideoPrefs&&i){let oe=Tu(Z.userSalt,String(i));if(oe!=null&&oe.audioTrackId){let Ie=c.find(it=>it.id===oe.audioTrackId);h=Ie!=null?Ie:h}}let M=n_();return M&&(h!=null||(h=c.find(({language:oe})=>M===oe))),h!=null||(h=c.at(0)),h},Dr=c=>{ue.log("change audio stream",{id:c});let h=A.info.availableAudioStreams$.getValue().find(M=>M.id===c);h&&bn(h,!0)},Rn=!1;Ye.add(A.info.availableAudioStreams$.subscribe(c=>{if(!Rn&&c.length){let h=so(c);h&&(A.setAudioStream(h),Rn=!0)}})),hr.subscribe(c=>{var h;(h=s==null?void 0:s.onAvailableAudioStreamsChanged)==null||h.call(s,c.map(({label:M="",id:oe="",language:Ie=""})=>({label:M,language:Ie,id:oe})))}),_r.subscribe(c=>{var h;return c&&((h=s==null?void 0:s.onAudioStreamChanged)==null?void 0:h.call(s,c.id))});let vt=!1;Ye.add(A.info.availableVideoStreams$.subscribe(c=>{if(!vt&&c.length){let h=so(c);h&&(A.setVideoStream(h),vt=!0)}}));let ti=ae(void 0),er=ui(A.info.isAutoQualityEnabled$,c=>c&&ti.set(void 0)),br=ui(A.info.currentQuality$,()=>ti.set(void 0)),Br=_i([ti,br],([c,h])=>c!=null?c:h),$n=_i(jn,c=>c!==nc.MPEG),$r=_i([bo,Hi,er,Br,$n],([c,h,M,oe,Ie])=>{let it=[];Ie&&it.push({value:"auto",displayValue:st("auto_quality_option"),selected:M});let At=c.filter(Ft=>!Hx(Ft));for(let Ft of At){let Qt=h[Ft];it.push({value:Ft,displayValue:`${Ft}${Qt?Q_(Qt):""}`,selected:M?!1:Ft===oe})}return it}),Mo=ui(A.info.currentPlaybackRate$),sn=_i([Mo,rn,Zn],([c,h,M])=>{let oe=M||S?1:Z.controls.playbackRateMin,Ie=h?1:Z.controls.playbackRateMax,it=Z.controls.playbackRateStep,At=[];for(let Ft=oe;Ft<=Ie;Ft+=it)At.push({value:Ft,displayValue:Ft===1?st("playback_rate_1"):st("playback_rate",{multiplier:Ft.toString(10)}),selected:c===Ft});return At}),Vo=()=>({displayValue:st("subtitles_off"),value:Mn,language:""}),tr=ae(Vo()),Ui=_i([tr,It],([c],h)=>{c.value===Mn?h(Vo()):h(c)}),Ro=Z.features.subtitles?ui(A.info.availableTextTracks$):Lr([]),ir=qh(),Fr=_i([Ro,Ui],([c,h],M)=>{var it;let oe=[],Ie=c.find(({id:At})=>At===h.value);if(Ie!=null&&Ie.url){let[,At]=(it=ir.find(Ie.url))!=null?it:[];if(At){M(At);return}qe.download(Ie.url).then(Ft=>{if(!Ft||qe.isDestroyed())return;let Qt=new G_,Ks=Ie.language;if(Ks){let t$=!!Ie.isAuto,i$=Qt.parse(Ft,Ks);oe.push({lang:Ks,subtitles:i$,isAuto:t$,id:Ie.id})}ir.add(Ie.url,oe),ge(Ui).value===h.value&&M(oe)}).catch(Ft=>{var Qt;(Qt=X==null?void 0:X.oneStat)==null||Qt.logError({errorType:"Subtitles download",fatal:!1}),j==null||j.report(Ft,{errorType:"Subtitles download",fatal:!1})})}M(oe)}),ao=_i([Mo,Lo,Ui],([c,h,M],oe)=>{let At;if(A.info.isLive$.getValue()&&h&&M.value!==Mn){let Qt=()=>{let Ks=1e3/(3*c);At=setTimeout(Qt,Ks),oe(Date.now())};return Qt(),()=>clearTimeout(At)}}),Nn=_i([Ro,Ui],([c,h])=>{if(!c.length)return[];let M=[];for(let{language:oe,isAuto:Ie,id:it}of c){let At=oe&&oc(oe);oe&&At&&M.push({displayValue:Ie?st("subtitles_auto",{language:At}):At,value:it,selected:(h==null?void 0:h.value)===it,isAuto:Ie,language:oe})}return M.length?(M.unshift(Kt(Ae({},Vo()),{selected:(h==null?void 0:h.value)===Mn})),M):[]}),No={available:[],prev:[]},Hr=()=>{var h,M;let c=A.experimental.getCurrentTime$.getValue();return(M=(h=c==null?void 0:c())!=null?h:Se==null?void 0:Se.currentTime)!=null?M:0},or=_i([at,Ui,Fr,ao],([c,h,M,oe])=>{var it;let Ie=A.info.isLive$.getValue();if(Ie&&No.prev!==M){let At=M.find(({id:Qt})=>Qt===h.value),Ft=No.prev.find(({id:Qt})=>Qt===h.value);if(At){let Qt=Kt(Ae({},At),{subtitles:[...(it=Ft==null?void 0:Ft.subtitles)!=null?it:[],...At.subtitles]});No.available=[Qt],No.prev=M}}if(h&&h.value!==Mn){let At=Ie?Hr():c,Ft=Ie?No.available:M;return X_(At,h,Ft,Ie)}}),On=_i([or],([c])=>c!=null&&c.texts?c.texts:[]);Ye.add(Ui.subscribe(c=>{var h,M;if(c.value===Mn)(h=s==null?void 0:s.onSubtitleOff)==null||h.call(s);else{let oe=Object.entries(Gu).find(([Ie,it])=>it===c.displayValue);(M=s==null?void 0:s.onSubtitleOn)==null||M.call(s,oe?oe[0]:"",c.value)}}));let Ur=ae(!0),xt=_i([Gt,nn,Vn,en],([c,h,M,oe])=>{var Ft;let Ie=(Ft=c==null?void 0:c.end)!=null?Ft:0;if(!oe)return Ie/h;let At=-M+oe-h;return(Ie-At)/h}),Ct=ui(A.info.availableSources$),lo=_i([Ct],([c])=>Object.keys((c==null?void 0:c[nc.MPEG])||{}).length>0),Xi=()=>{var M,oe,Ie;let c=Object.keys(((oe=(M=A.info.availableSources$)==null?void 0:M.getValue())==null?void 0:oe[nc.MPEG])||{}),h=Bx(c)||Gx.Q_144P;return(Ie=ee.sources[nc.MPEG])==null?void 0:Ie[h]},zi=()=>{var h;let c=Xi();if(c)ue.log("download video",{url:c}),zh(c,((h=ee==null?void 0:ee.meta)==null?void 0:h.title)||"video");else{let M="There is no URL for download video";ue.log("download video",{message:M}),fe({message:M})}},yn=()=>{fe({message:"toggle muted"});let c=A.info.muted$.getValue();A.info.volume$.getValue()===0&&!c?yr(xn(),!1):nr(!c,!1)},$o=()=>{var c;if(Wt.ui.settingsMenu.visible$.set(!1),!ge(Wt.ui.settingsSubMenu.visible$)){let h=ge(Wt.ui.settingsMenu.ref$);if((c=s==null?void 0:s.uiInfo)!=null&&c.onSettingsMenu&&h){let oe=Wl(h),Ie={top:0,left:0,bottom:0,right:0};s.uiInfo.onSettingsMenu({visible:!1,size:oe,position:Ie,name:"settings"})}}ue.log("close settings menu")},Dn=(c,h=()=>Promise.resolve())=>gt(null,null,function*(){var Ie;Wt.ui.settingsMenu.openedByBtnKeyboard$.set(!!c),Wt.ui.settingsMenu.visible$.set(!0),yield h();let M=ge(Wt.ui.settingsMenu.ref$),oe=ga();if((Ie=s==null?void 0:s.uiInfo)!=null&&Ie.onSettingsMenu&&M&&oe){let At=Wl(M),Ft=Vs(M,oe);s.uiInfo.onSettingsMenu({visible:!0,size:At,position:Ft,name:"settings"})}ue.log("open settings menu",{wasOpenedByKeyboard:c})}),mi=(c,h=!1)=>{var it;Wt.ui.settingsSubMenu.visible$.set(!1);let M=ge(Wt.ui.settingsMenu.ref$),oe=ga(),Ie=ge(Wt.ui.settingsMenu.visible$);if((it=s==null?void 0:s.uiInfo)!=null&&it.onSettingsMenu&&M&&oe)if(Ie&&!h){let Ft=Wl(M),Qt=Vs(M,oe);s.uiInfo.onSettingsMenu({visible:!0,size:Ft,position:Qt,name:"settings"})}else{let Ft=Wl(c),Qt={top:0,left:0,bottom:0,right:0},Ks=ge(Wt.ui.settingsSubMenu.name$);s.uiInfo.onSettingsMenu({visible:!1,size:Ft,position:Qt,name:Ks})}ue.log("close settings sub menu")},zr=(c,h)=>{var oe;Wt.ui.settingsSubMenu.visible$.set(!0),Wt.ui.settingsSubMenu.ref$.set(h),Wt.ui.settingsSubMenu.name$.set(c);let M=ga();if((oe=s==null?void 0:s.uiInfo)!=null&&oe.onSettingsMenu&&h&&M){let it=Wl(h),At=Vs(h,M);s.uiInfo.onSettingsMenu({visible:!0,name:c,size:it,position:At})}ue.log("open settings sub menu",{name:c})},xn=()=>{var h;let c=Math.max(Z.volumeMinRestore,(h=yu())!=null?h:0);return c===0?Z.volumeDefault:c},Oo=c=>{let h=Z.features.savePreferredStatesOnUserActionOnly;return!h||h&&!c},yr=(c,h)=>{let M=c===0?xn():c,oe=A.info.muted$.getValue();fe({message:`set volume, volume: ${c}, preferredVolume: ${M}`});let Ie=!l||be.is("ads");oe&&c>0&&Ie&&(oe=!1,Oo(h)&&If(!1)),A.setVolume(c,oe),Ce.setVolume(c),Oo(h)&&wf(M)},nr=(c,h)=>{let M=A.info.volume$.getValue();fe({message:`set muted, currentVolume: ${M}, mute: ${c}`});let oe=be.is("ads");if(A.setMuted(c,oe),Ce.setVolume(c?0:M),Oo(h)&&(!oe||!c)&&If(c),!c&&M===0){let Ie=xn();A.setVolume(Ie),Oo(h)&&wf(Ie),Ce.setVolume(Ie)}},xr=ae(!1),wn=c=>{var h,M;ue.log("set looped",{isLooped:c}),xr.set(c),A.setLooped(c),(M=(h=s==null?void 0:s.uiInfo)==null?void 0:h.onLoopedChanged)==null||M.call(h,c)};wn(re);let an=()=>{var c,h;(h=(c=s==null?void 0:s.uiInfo)==null?void 0:c.onReportProblem)==null||h.call(c)},Wr=(c,h=!1)=>{var M;fe({message:`set autoplayNextEnabled, value: ${c}`}),ue.log("set autoplay next enabled",{autoplayNextEnabled:c}),Wt.ui.autoplayNextEnabled$.set(c),a_(c),h&&((M=s==null?void 0:s.onSetAutoplayNextEnabled)==null||M.call(s,c))},ln=c=>{fe({message:`set timerNextVideoRunning, value: ${c}`}),ue.log("set timer next video running",{timerNextVideoRunning:c}),Wt.ui.timerNextVideoRunning$.set(c)},ns=(c=!0)=>{var M;let h=!0;if(c&&(s!=null&&s.onPrevVideoClick))try{h=(M=s==null?void 0:s.onPrevVideoClick)==null?void 0:M.call(s)}catch(oe){fe({message:"onPrevVideoClick callback failed to execute"})}Y(!0),h&&G()},Qe=(c=!0)=>{var M;let h=!0;if(c&&(s!=null&&s.onNextVideoClick))try{h=(M=s==null?void 0:s.onNextVideoClick)==null?void 0:M.call(s)}catch(oe){fe({message:"onNextVideoClick callback failed to execute"})}Y(!1),h&&le()},Lt=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementShow)==null||c.call(s)},$i=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementClick)==null||c.call(s)},So=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementAuto)==null||c.call(s)},To=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementCancel)==null||c.call(s)},Do=()=>{A.prepare()},co=()=>{mr(Wt);let c=ge(Wt.ui.controls.disabledControls$),h=ge(Wt.playerPhase),M={playerPhase:h,isInteractive:S,isVideoEnded:!1,action:"none"};if(c.has("PLAY_BUTTON"))return;if(fe({message:"toggle play"}),h==="ads"){M.action="play",ue.log("toggle adman play",M),Ce.togglePlay();return}let oe=()=>{var it;fe({message:"toggle play, call player.play"}),M.action="play",A.play(),(it=s==null?void 0:s.onPlay)==null||it.call(s)},Ie=()=>{var it;fe({message:"toggle play, call player.pause"}),M.action="pause",A.pause(),(it=s==null?void 0:s.onPause)==null||it.call(s)};if(A.info.isEnded$.getValue()){if(fe({message:"toggle play, video ended, seek to 0"}),Pi.next(),jt.next(Rs.REWIND),S){R==null||R();return}A.seekTime(0),oe()}else A.info.playbackState$.getValue()!==ql.PLAYING?oe():Ie();ue.log("toggle play",M)},Vi=(c,{changeReason:h="default",appliesTo:M="to-video"}={},oe)=>{fe({message:`set quality, quality: ${c}`}),ue.log("set quality",{quality:c}),A.setAutoQuality(c==="auto");let{qualityDetailsSubMenuEnabled:Ie}=Z.features;xu(),c!=="auto"?(Ie?(wu({type:"exact_quality",quality:c,videoId:i},M),A.setPredefinedQualityLimits(bs.UNKNOWN)):Sf(i,c),ti.set(c),A.setQuality(c)):Ie&&h==="default"&&(Ho("auto_quality",M,oe),ge(Fi)&&Bo(!1,void 0,oe),ge(vr)&&Fo(!1,void 0,oe))},Bo=(c,h="as-default",M)=>{fe({message:`set trafficSavingEnabled, value: ${c}`}),ue.log("set traffic saving enabled",{trafficSavingEnabled:c});let oe=c?bs.TRAFFIC_SAVING:bs.UNKNOWN;Z.features.qualityDetailsSubMenuEnabled?(yo(oe,h,M),Ld(!1)):(A.setPredefinedQualityLimits(oe),Oo(M)&&Ld(c))},Fo=(c,h="as-default",M)=>{fe({message:`set highQualityEnabled, value: ${c}`}),ue.log("set high quality enabled",{highQualityEnabled:c}),yo(c?bs.HIGH_QUALITY:bs.UNKNOWN,h,M)},yo=(c,h,M)=>{c!==bs.UNKNOWN&&(ge(no)&&!ge(er)&&Vi("auto",{appliesTo:h,changeReason:"limit-changed"},M),Ho(c,h,M)),A.setPredefinedQualityLimits(c)},Ho=(c,h,M)=>{Oo(M)&&(wu({type:c,videoId:i},h),h==="as-default"&&wu({type:c,videoId:i},"to-video"))},dn=(c,h=!0)=>{ue.log("set playback rate",{playbackRate:c}),A.setPlaybackRate(c),Z.features.saveRate&&we&&!A.info.isLive$.getValue()&&h&&r_(c)},wr=()=>{let c=ge(sn),h=c.findIndex(({selected:oe})=>oe);if(h===c.length-1)return;let M=c[h+1];dn(M.value)},Sr=()=>{let c=ge(sn),h=c.findIndex(({selected:oe})=>oe);if(h===0)return;let M=c[h-1];dn(M.value)},Tr=(c=Kt(Ae({},Vo()),{selected:!1}),h)=>{ue.log("set subtitles",Ae({},c)),c.value!==Mn&&wt.next(c.isAuto?c.value+"_auto":c.value),bt.next({enabled:c.value!==Mn,lang:c.language,auto:!!c.isAuto}),tr.set(c),Oo(h)&&(kf(c.value===Mn?void 0:c.language),Z.features.userVideoPrefs&&i&&Lf(Z.userSalt,String(i),{subtitleTrackId:c.value===Mn?void 0:c.value}))},rs=c=>{ue.log("toggle subtitles");let h=ge(Ui);(h==null?void 0:h.value)===Mn?Xe(c):zt(c)},ss=(c,h)=>{ue.log("change subtitle",{enabled:c}),c?Xe(!0,h):zt(!0)},Xe=(c,h)=>{ue.log("subtitle on");let M=ge(Nn),oe=ge(Pe),Ie=Te!=null?Te:oe,it;h&&(it=M.find(At=>At.value===h)),it!=null||(it=M.filter(At=>At.value!==Mn).find(At=>At.language===Ie)),Tr(it!=null?it:M[1],c)},zt=c=>{ue.log("subtitle off"),Tr(void 0,c)};Ye.add(A.info.availableTextTracks$.subscribe(c=>{var M;function h(){let oe=[];for(let{language:Ie,isAuto:it,id:At}of c){let Ft=Ie&&oc(Ie);Ie&&Ft&&oe.push({id:At,language:Ie,title:it?st("subtitles_auto",{language:Ft}):Ft})}return oe}(M=s==null?void 0:s.onAvailableSubtitlesChanged)==null||M.call(s,h())}));let Si=ae(!0),Uo=c=>{Si.set(c)},uo=(c,h,M=!0)=>{var oe;if(fe({message:`seek to time, time: ${c}`}),ue.log("seek to time",{time:c,action:h,forcePrecise:M}),jt.next(h),A.info.isLive$.getValue()){let Ie=A.info.duration$.getValue(),it=Math.min(0,Ie+c);A.seekTime(it,M)}else{if(I!=null&&I.getValue())return;A.info.isEnded$.getValue()&&(fe({message:"seek after ended, call callbacks.onPlay"}),(oe=s==null?void 0:s.onPlay)==null||oe.call(s)),A.seekTime(Bv(c),M)}},Cr=c=>{fe({message:`seek to episode start time: ${c}`}),ue.log("seek to episode start time",{time:c}),uo(c,Rs.EPISODE,!0)},cn=(c,h,M=!1)=>{fe({message:`seek to percent, percent: ${c}`}),ue.log("seek to percent",{percent:c,action:h});let oe=ge(nn)*c;uo(oe,h,M)},Ir=c=>{fe({message:`seek external, time: ${c}`}),ue.log("seek external",{time:c}),jt.next(Rs.UNKNOWN),A.seekTime(A.info.isLive$.getValue()?-c:c)},Fs=c=>{var oe,Ie;let h=(oe=c.max)!=null?oe:"none",M=(Ie=c.min)!=null?Ie:"none";fe({message:`set auto quality limitation. Max: ${h}. Min: ${M}`}),ue.log("set auto quality limits",{max:h,min:M}),A.setAutoQualityLimits(c)},Sn=c=>{fe({message:`seek external to episode start time: ${c}`}),ue.log("seek external to episode start time",{time:c}),uo(c,Rs.EPISODE,!0)},Hs=c=>{fe({message:`set playback rate to: ${c}`}),ue.log("set playback rate external",{playbackRate:c}),A.setPlaybackRate(c)},rr=ae(!1),as=ae(!1),ut=_i([nn],([c])=>!!m&&c>=Z.suitableDurationForUsingRichSeek&&Z.features.useRichSeek&&!S),fi=((m==null?void 0:m.frameWidth)||0)>=((m==null?void 0:m.frameHeight)||0),zo=_i([St],([c])=>{let h=Kl(c);return fi?!h:h});Ye.add(be.subscribe(c=>{c!=="video"&&rr.set(!1)}));let me=ae(void 0),pt=ae(!1),Zt=c=>{fe({message:`start scrubbing, progress: ${c}`}),ue.log("start scrubbing",{progress:c}),pt.set(!0),Ti(c)},Ti=c=>{me.set(c)},Wi,ni,ii=()=>{me.set(void 0),pt.set(!1)},po=()=>{clearTimeout(ni),clearTimeout(Wi),Wi=window.setTimeout(()=>{ii()},500),Se==null||Se.removeEventListener("seeked",po)},Bn=(c,h=!1)=>{fe({message:`complete scrubbing, progress: ${c}`}),ue.log("complete scrubbing",{progress:c}),cn(c,Rs.SLIDER,h),ge(Wt.ui.isMobile)&&ge(Wt.state.currentFormat$)===nc.HLS?(Se==null||Se.addEventListener("seeked",po),ni=window.setTimeout(()=>{po()},300)):ii()},Fn=_i([at,nn,me],([c,h,M],oe)=>{oe(Ux(M)?M*h:c)}),Ai=ae(!1),ed=()=>{Ai.set(!0)},il=()=>{Ai.set(!1)},Us=_i([ei],([{width:c}],h)=>{let M=W_(c);h(M)}),ca=D.filter(c=>Wh(c)),ua=_i([Us,Me],([c,h])=>h?ca.filter(M=>!M.hideOnMobile):ca.filter(M=>{var oe;return!((oe=M.hideOnDesktopGridTypes)!=null&&oe.includes(c))})),un=ae(D.filter(c=>Kh(c))),ol=_i([un,Us],([c,h])=>c.filter(M=>{var oe;return!((oe=M.hideOnDesktopGridTypes)!=null&&oe.includes(h))})),pa=_i([ol,ua],([c,h])=>[...Z.features.additionalButtonsDesktopControlPanelRight?c.filter(M=>M.type==="desktop-control-panel-right"):[],...Z.features.additionalButtons?h.map((M,oe)=>{var Ie;return{id:oe,weight:oe,type:"desktop-control-panel-right",testId:M.testId,icon:M.iconUrl,onClick:M.onClick,ariaLabel:(Ie=M.ariaLabel)!=null?Ie:M.tooltip,tooltipText:M.tooltip}}):[]]),Kr=ae(U),ls=_i([Kr],([c])=>Z.features.additionalSettingsMenuItems?c.map(h=>h.type==="SWITCH"?Kt(Ae({},h),{onClick:h.onChangeEnabled}):h):[]),zs=(c,h)=>{let M=ge(un).map(oe=>oe.id!==c?oe:Ae(Ae({},oe),h));un.set(M)},fa=c=>{let h=ge(un);if(h.some(M=>M.id===c.id)){fe({message:`Additional button with id: "${c.id}" was exist! Can't add more with the same id`});return}h.push(c),un.set(h)},nl=c=>{let h=ge(un);if(!h.some(M=>M.id===c)){fe({message:`Can't find additional button with id: "${c}"! Can't remove item with this id`});return}h=h.filter(M=>M.id!==c),un.set(h)},rl=c=>{jt.next(Rs.LIVE),fe({message:"live switch to low latency "+c}),ue.log("live switch to low latency "+c),A.setLiveLowLatency(c)},td=(c,h)=>{let M=ge(Kr).map(oe=>oe.id!==c?oe:Ae(Ae({},oe),h));Kr.set(M)},sl=c=>{let h=ge(Kr);if(h.some(M=>M.id===c.id)){fe({message:`Settings menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}h.push(c),Kr.set(h)},al=c=>{let h=ge(Kr);if(!h.some(M=>M.id===c)){fe({message:`Can't find settings menu item with id: "${c}"! Can't remove item with this id`});return}h=h.filter(M=>M.id!==c),Kr.set(h)},Er=ae(z),id=_i([Er],([c])=>Z.features.additionalContextMenuItems?c:[]),ma=(c,h)=>{let M=ge(Er).map(oe=>oe.id!==c?oe:Ae(Ae({},oe),h));Er.set(M)},ll=c=>{let h=ge(Er);if(h.some(M=>M.id===c.id)){fe({message:`Context menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}h.push(c),Er.set(h)},dt=c=>{let h=ge(Er);if(!h.some(M=>M.id===c)){fe({message:`Can't find context menu item with id: "${c}"! Can't remove item with this id`});return}h=h.filter(M=>M.id!==c),Er.set(h)},ft=_i([Me,J],([c,h],M)=>{M(c&&h)}),Ki=()=>{jt.next(Rs.LIVE),fe({message:"switch to active live"}),ue.log("switch to active live"),A.seekTime(0),A.info.playbackState$.getValue()!==ql.PLAYING&&Wt.actions.internal.togglePlay()},Wo=()=>{ue.log("skip adman"),Ce.skip()},qi=(c=!0)=>{var oe;mr(Wt),fe({message:`switch from ads to video, callPlay: ${c}`}),ue.log("switch from ads to video",{callPlay:c}),mt.set("video"),c&&A.play(),l&&nr(!0,!0);let h=(oe=ge(Je))==null?void 0:oe.muted,M=!A.info.muted$.getValue();h!==void 0&&!M&&nr(h,!0),Je.set(void 0)},yi=()=>{mr(Wt),fe({message:"switch from video to ads"}),ue.log("switch from video to ads"),Wt.actions.internal.pause(),xi(),mt.set("ads")},Ri=c=>{mr(Wt);let h=c?"LiveWaitingStart":"thumb";ue.log("set live waiting start",{state:c,playerPhase:h}),mt.set(h)},va=c=>{mr(Wt);let h=c?"LiveWaitingRecover":"thumb";ue.log("set live waiting recover",{state:c,playerPhase:h}),mt.set(h)},dl=c=>{mr(Wt);let h=c?"LiveWaitingRecord":"thumb";ue.log("set live waiting record",{state:c,playerPhase:h}),mt.set(h)},_p=()=>(mr(Wt),ue.log("get debug text data"),Hh(A,ee,Wt,Ne.getTraceId())),Rc=()=>(mr(Wt),JSON.stringify(Ne.getFinishedSpans())),Nc=()=>(mr(Wt),Uh(A,ee,Wt)),ga=()=>Se,bp=()=>{fe({message:"toggle chromecast"}),ue.log("toggle chromecast"),A.toggleChromecast()},Ws=c=>{var M;if(mr(Wt),A.info.isEnded$.getValue())return;let h=!c;if(ge(Wt.playerPhase)==="ads"){fe({message:`pause ads, internalCall: ${h}`}),ue.log("pause ads",{internalCall:h}),Ce.pause();return}fe({message:`pause video, internalCall: ${h}`}),ue.log("pause video",{internalCall:h}),h&&((M=s==null?void 0:s.onPause)==null||M.call(s)),A.pause()},cl=c=>{var M;mr(Wt);let h=!c;if(ge(Wt.playerPhase)==="ads"){fe({message:`play ads, internalCall: ${h}`}),ue.log("play ads",{internalCall:h}),Ce.play();return}fe({message:`play video, internalCall: ${h}`}),ue.log("play video",{internalCall:h}),h&&((M=s==null?void 0:s.onPlay)==null||M.call(s)),A.play()},Oc=c=>{mr(Wt);let h=!c;if(ge(Wt.playerPhase)==="ads"){fe({message:"player cannot be stopped during ads via external method"});return}fe({message:`player will be stopped, internalCall: ${h}`}),E==null||E()},Dc=(c,h)=>{mr(Wt),fe({message:`first start, show ads: ${c}, internalCall: ${!h}`}),ue.log("first start",{showAds:c,external:h}),c?mt.set("ads"):(mt.set("video"),h?A.play():Wt.actions.internal.togglePlay())},ul=()=>(fe({message:"getting time codes"}),p),Bc=()=>{let c=ul();if(!c||[0,1].includes(c.length))return;let h=A.info.position$.getValue();return c.find(M=>M.time>h)},$p=c=>{let h=c;h||(h=Bc());let M=A.info.position$.getValue();ue.log("seek to next episode",Ae({currentTime:M},h)),h&&(fe({message:"seek to next episode"}),uo(h.time,Rs.EPISODE,!0))},Fc=()=>{let c=ul();if(!c||[0,1].includes(c.length))return;let h=A.info.position$.getValue(),M=c.findIndex(Ie=>Ie.time>h),oe=M===-1?c.length-2:M-2;if(!(oe<0))return c[oe]},He=c=>{let h=c;h||(h=Fc());let M=A.info.position$.getValue();ue.log("seek to prev episode",Ae({currentTime:M},h)),h&&(fe({message:"seek to prev episode"}),uo(h.time,Rs.EPISODE,!0))},hi=()=>(fe({message:"getting preview thumbs data"}),ue.log("get preview thumbs data",Ae({},m)),m),Ko=()=>gt(null,null,function*(){let c=ie==null?void 0:ie.isActive(),h="none";ie!=null&&ie.isActive()?(h="exit",yield ie==null?void 0:ie.exit()):(h="request",yield ie==null?void 0:ie.request()),ue.log("toggle picture in picture",{isActive:c,action:h})}),ha=(c=-90)=>{ue.log("rotate video",{alphaDiff:c}),St.update(h=>h+c)},Co=ae([]);C==null||C.subscribe(c=>{let h=[];for(let M=0;M<c.length;M++){let{range:[oe,Ie],subjects:it}=c[M];M===0&&oe!==0&&h.push({time:0,text:"",interactive:!1,completed:!0}),h.push({time:oe/1e3,text:"",interactive:!0,completed:Z.features.interactiveTimeOpenUri?!it.length||it.every(At=>At.isRemoved):!it.length}),Ie!==1/0&&h.push({time:Ie/1e3,text:"",interactive:!1,completed:!0})}Co.set(h)});let Qb=ae(!1);I==null||I.subscribe(c=>{c&&ge(pt)&&ii()});let Bv=c=>{if(!S)return c;let h=ge(Co),M=ge(nn),Ie=ge(Vn)/M,it=h.find(At=>At.interactive&&!At.completed&&At.time>Ie);return typeof(it==null?void 0:it.time)=="number"?Math.min(c,it.time-.05):c},Gb=()=>{Wt.ui.episodes.panelOpened$.set(!1)},Yb=()=>{ue.log("destroy store"),clearTimeout(ni),clearTimeout(Wi),Ye.unsubscribe(),oo.unsubscribe(),A.destroy(),Ce.destroy(),X==null||X.destroy(),j==null||j.destroy(),_e.unsubscribe(),oi==null||oi.disconnect(),oi=null,qe.destroy()},jb=_i([rn,be,Mi],([c,h,M])=>f.features.doubleForwardAvailable&&!c&&h==="video"&&M),yp=ae(!1),Fv=2,Hc=null,Hv=c=>{if(!ge(Lo)&&c)return;let h=A.info.currentPlaybackRate$.getValue();c?h!==Fv&&(Hc=h,dn(Fv,!1),yp.set(!0)):(Hc&&dn(Hc,!1),yp.set(!1),Hc=null)};be.subscribe(c=>{c!=="video"&&Hv(!1)});let Xb=()=>{Ws(!1),rr.set(!0)},Zb=()=>{cl(!1),rr.set(!1)},xp=!1,Jb=()=>{as.set(!0),xp=A.info.playbackState$.getValue()===ql.PLAYING,Ws(!1)},e$=()=>{as.set(!1),!ge(rr)&&xp&&cl(!1),xp=!1};A.events.playing$.subscribe(()=>{ge(rr)&&Ws(!1)});let Wt={interfaceLanguage$:Pe,isCyrillicRelatedInterface$:Ve,initVideo:ho,videoId:i,isClip:o,playerPhase:be,vsid:ze,state:{positionExact$:at,positionWithScrubbing$:Fn,duration$:nn,playbackState$:Tt,isPlaying$:Lo,isLoaderVisible:bi,bufferedProgress$:xt,isLive$:Li,canChangePlaybackSpeed$:Mi,isActiveLive$:rn,isOldestAvailableLive$:Zn,isRewindableLive$:Nr,isEnded$:lt,muted$:_o,volume$:ko,trafficSavingEnabled$:Fi,highQualityEnabled$:vr,autoQualityLimitingAvailable$:no,availableVideoStreams$:os,availableAudioStreams$:hr,videoStream$:ro,audioStream$:_r,currentQuality$:Br,isAutoQualityEnabled$:er,availableQualities$:$r,currentPlaybackRate$:Mo,availablePlaybackRates$:sn,currentSubtitle$:Ui,availableTextTracks$:Ro,availableSubtitlesList$:Nn,currentSubtitleCaptions$:On,isAutoSubtitleCaptionVisible$:Ur,chromecastState$:tn,chromecastDeviceName$:on,chromecastConnected$:Or,currentFormat$:jn,throughputEstimation$:gr,videoBitrate$:Rr,videoSize$:ys,errorLog$:$e,crashed$:J,isAudioAvailable$:is,isAudioDisabled:!!l,canDownload:Z.features.download&&!!d,availableSources$:Ct,hasMpegSources$:lo,isInteractive:S,showInteractiveGraph:Z.features.interactiveGraph,showSeekToInteractive:Z.features.seekToInteractive,showPlayPrevChapter:Z.features.interactivePlayPrevChapter,showInteractiveTimeIndicator:Z.features.interactiveTimeIndicator&&!!ge(Co).length,interactiveEpisodes$:Co,isInteractiveTime$:I?ui(I):ae(!1),isInteractiveExpectation$:Qb,hasInteractiveBranches:P,playPrevChapterDisabledTooltip:O,looped$:xr,loadedMetadata$:Jt,isAutoQualityAvailable$:$n,previewTrackActive:rr,previewTrackDragInProgress:as},ui:{t:st,controlsVisible:ae(!1),touched:ae(!1),controls:{prevButton:ae(void 0),playButton:ae(void 0),replayButton:ae(void 0),nextButton:ae(void 0),playPrevChapterButton:ae(void 0),seekToInteractiveButton:ae(void 0),interactiveGraphButton:ae(void 0),liveButton:ae(void 0),time:ae(void 0),episodes:ae(void 0),volume:ae(void 0),subtitles:ae(void 0),settings:ae(void 0),context:ae(void 0),chromecast:ae(void 0),pip:ae(void 0),fullscreen:ae(void 0),vkLogo:ae(void 0),interactiveTimeIndicator:ae(void 0),timeline:ae(void 0),autoplayNextToggle:ae(void 0),additionalButtons:D.length?D.reduce(c=>[...c,ae(void 0)],[]):[],disabledControls$:nt},modals:{hotKeyMap:{show:ae(!1),data:ae({title:"",closeBtnText:"",groups:[]})}},isFullscreen:Vt,isFullscreenOpenedByKeyboard:et,rotateAlpha:St,isAutoplay:ae(!1),debugPanelVisible:ae(!1),episodes:{panelOpened$:ae(!1),openedByKeyboard$:ae(!1)},contextMenu:{visible$:ae(!1),btnRef$:ae(void 0),openedByBtnKeyboard$:ae(!1),openedByHotKey$:ae(!1),lastActiveElem$:ae(void 0),showContextMenuBtn$:ae(!1),position$:ae({top:0,left:0})},playerSize:ei,isMobile:Me,mobileNotReportControlHidden$:ft,icon3DVideoVisible:ae(!1),scrubbingInProgress:pt,volumeChangingInProgress:Ai,is3DVideo:Dt,currentGridType$:Us,additionalButtonsDeprecated$:ua,additionalDesktopControlPanelRightButtons$:pa,additionalSettingsMenuItems$:ls,additionalContextMenuItems$:id,interactiveHideMobileControls:ae(!1),overlayContainer$:ae(void 0),startedByKeyboard$:ae(!1),autoplayNextEnabled$:ae(!1),timerNextVideoRunning$:ae(!0),settingsMenu:{visible$:ae(!1),ref$:ae(void 0),openedByBtnKeyboard$:ae(!1)},settingsSubMenu:{visible$:ae(!1),ref$:ae(void 0),name$:ae(void 0)},userActionsDisabled:ae(!1),hiddenControls:{volume:ae(!1),vkLogo:ae(!1),pip:ae(!1),chromecast:ae(!1),settings:ae(!1)},isControlsAvailable:Si,controlBlocks:{topLeft:ae(void 0),topRight:ae(void 0),middle:ae(void 0),bottom:ae(void 0),bottomLeft:ae(void 0),bottomRight:ae(void 0)},videoTitleInfo:ae(void 0),doubleForwardOn$:yp,doubleForwardAvailable$:jb,previewTrackNotificationVisible:ae(!1),previewTrackActive:rr,previewTrackDragInProgress:as,previewTrackAvailable:ut,isPreviewTrackHorizontallyAligned:zo},ads:{position:ae(0),duration:ae(0),playbackState:ae("inactive"),canSkip:ae(!1),secondsToWatchBeforeSkip:ae(0),postrollPassed:ae(!1)},webApi:{pictureInPictureApi:ie,annotationsApi:Oe,slotsApi:Be},actions:{internal:{preload:Do,firstStart:c=>Dc(c,!1),play:()=>cl(!1),pause:()=>Ws(!1),togglePlay:co,toggleMuted:yn,openSettingsMenu:Dn,closeSettingsMenu:$o,openSettingsSubMenu:zr,closeSettingsSubMenu:mi,setVolume:c=>yr(c,!1),setMuted:c=>nr(c,!1),startVolumeChanging:ed,stopVolumeChanging:il,setVideoStream:Jn,setAudioStream:c=>bn(c,!1),setQuality:(c,h)=>Vi(c,h,!1),setTrafficSavingEnabled:(c,h)=>Bo(c,h,!1),setHighQualityEnabled:(c,h)=>Fo(c,h,!1),setPlaybackRate:dn,incrementPlaybackRate:wr,decrementPlaybackRate:Sr,setSubtitle:c=>Tr(c,!1),toggleSubtitle:()=>rs(!1),togglePictureInPicture:Ko,startScrubbing:Zt,progressScrubbing:Ti,completeScrubbing:Bn,toggleChromecast:bp,switchToActiveLive:Ki,switchFromAdsToVideo:qi,switchFromVideoToAds:yi,skipAd:Wo,setLiveWaitingStart:Ri,setLiveWaitingRecover:va,setLiveWaitingRecord:dl,getDebugTextData:_p,getTraceTextData:Rc,getDebugPanelData:Nc,getVideoElement:ga,seekTime:(c,h,M)=>uo(c,h,M),clearDelayedBufferingCheckTimeout:Xn,seekEpisodeStartTime:Cr,seekToPercent:cn,getNextEpisode:Bc,seekToNextEpisode:$p,getPrevEpisode:Fc,seekToPrevEpisode:He,startLogging:Jo,stopLogging:_n,startCameraManualRotation:Et,stopCameraManualRotation:Bt,moveCameraFocusPX:W,holdCamera:kt,releaseCamera:di,getVideoEpisodes:ul,getPreviewThumbsData:hi,downloadVideo:zi,addLanguage:Mf,setLanguage:ye,nextMovie:ct,videoRotate:ha,correctSeekTimeToInteractive:Bv,replayInteractive:R,setLooped:wn,reportProblem:an,setAutoplayNextEnabled:Wr,setTimerNextVideoRunning:ln,prevVideoClick:ns,nextVideoClick:Qe,nextVideoAnnouncementShow:Lt,nextVideoAnnouncementClick:$i,nextVideoAnnouncementAuto:So,nextVideoAnnouncementCancel:To,checkFullscreenSupport:Ot,changeDoubleForwardOn:Hv,closePreviewTrack:Zb,previewTrackOpened:Xb,previewTrackDragStarted:Jb,previewTrackDragFinished:e$},external:{firstStart:c=>Dc(c,!0),play:()=>cl(!0),pause:()=>Ws(!0),stop:()=>Oc(!0),seekTime:c=>Ir(c),seekEpisodeStartTime:c=>Sn(c),setPlaybackRate:c=>Hs(c),setAutoQualityLimits:c=>Fs(c),setMuted:c=>nr(c,!0),toggleSubtitle:()=>rs(!0),changeSubtitle:ss,setVolume:c=>yr(c,!0),returnFocusToEpisodes:Gb,updateAdditionalSettingsItem:td,addAdditionalSettingsItem:sl,removeAdditionalSettingsItem:al,updateAdditionalContextItem:ma,addAdditionalContextItem:ll,removeAdditionalContextItem:dt,updateAdditionalButton:zs,addAdditionalButton:fa,removeAdditionalButton:nl,setLiveLowLatency:rl,hideControls:()=>Uo(!1),showControls:()=>Uo(!0),setQuality:c=>Vi(c,{appliesTo:"to-video"},!0),setTrafficSavingEnabled:c=>Bo(c,"to-video",!0),setHighQualityEnabled:c=>Fo(c,"to-video",!0),changeAudioStream:Dr}},callbacks:s,setUiCallbacks:c=>{Fe=Ae({},c)},getAdmanWrapper:()=>Ce,getLogger:()=>Ke,getPlayer:()=>A,destroy:Yb};return Wt};function Gn(t,e,i,o){var p;let r=(p=e[i])==null?void 0:p.getBoundingClientRect(),a=o&&!!r&&!!(r.right-r.left),{top:l,left:d,bottom:s,right:u}=Vs(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 Jx=["disabledControls$","additionalButtons"],ew=["interactiveTimeIndicator"],Gl=(t,e,i,o)=>{if(t){for(let[r,a]of Object.entries(e))if(!Jx.includes(r)){let l=o||ew.includes(r);a.set(Gn(t,i,r,l))}}};var Zu=(t,e,i)=>gt(null,null,function*(){yield go(),e&&i&&(i.focus(),t.set(!1))});var tw=Ee('<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 ym(t){Ze(t,{children:(e,i)=>{var o=tw();_(e,o)},$$slots:{default:!0}})}function xm(t,e){F(e,!0);let[i,o]=Re(),r=()=>x(s,"$contextMenuVisible$",i),a=g(e,"disabled",3,!1),l=g(e,"ariaLabel",3,""),d=ve(),s=d.ui.contextMenu.visible$,u=d.ui.contextMenu.openedByBtnKeyboard$,p=d.ui.contextMenu.showContextMenuBtn$,m=d.ui.contextMenu.position$,f=d.ui.contextMenu.btnRef$,b=K(void 0);De(()=>{n(b)&&Pt(()=>{f.set(n(b))})});let y=I=>{let R=ra(I),E=N_(n(b));m.set(E),u.set(R),s.set(!r())},$=()=>{p.set(!0)},S=()=>{p.set(!1)},C=v(()=>r()?"opened":"");Ut(t,{get className(){return n(C)},testId:"btn-context-menu",get disabled(){return a()},get ariaLabel(){return l()},click:y,focus:$,blur:S,get ariaExpanded(){return r()},get ref(){return n(b)},set ref(I){N(b,I,!0)},children:(I,R)=>{ym(I,{})},$$slots:{default:!0}}),H(),o()}var iw=t=>{t.stopPropagation()},ow=L("<div><!> <div></div> <div></div></div>"),nw={hash:"s-25",code:'.interactive-episode-icon-animated.s-25{height:32px;opacity:1;position:absolute;right:16px;top:16px;transition:.3s;width:32px}.interactive-episode-icon-animated.icon-small.s-25{height:28px;width:28px}.invisible.s-25{opacity:0;visibility:hidden}.fullscreen.s-25:not(.mobile){height:40px;right:23px;top:19px;width:40px}.mobile.s-25{height:28px;right:14px;top:12px;width:28px}.fullscreen.mobile.s-25{height:32px;width:32px}@media screen and (orientation:portrait){.interactive-episode-icon-animated.mobile.fullscreen.s-25{right:16px;top:40px}}@keyframes s-25-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-25{animation:s-25-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-25{animation-play-state:paused}.interactive-episode-icon-animated svg{height:100%;width:100%}.ref-block.s-25{height:100%;position:absolute;top:0;visibility:hidden;width:100%}.hidden.s-25{display:none}'};function sc(t,e){var j;F(e,!0),q(t,nw);let[i,o]=Re(),r=()=>x(S,"$isMobile",i),a=()=>x(E,"$areControlsVisible",i),l=()=>x(O,"$currentGridType$",i),d=()=>x(I,"$isInteractiveTime$",i),s=()=>x($,"$interactiveControlsOpacity$",i),u=()=>x(R,"$showInteractiveTimeIndicatorTooltip$",i),p=()=>x(C,"$isFullscreen",i),m=g(e,"ref",15,void 0),f=K(void 0),b=ve(),y=wo(),{interactiveControlsOpacity$:$}=y,S=b.ui.isMobile,C=b.ui.isFullscreen,I=b.state.isInteractiveTime$,R=y.showInteractiveTimeIndicatorTooltip$,E=b.ui.controlsVisible,P=(j=b.callbacks)==null?void 0:j.onInteractiveTimeIndicatorClick,O=b.ui.currentGridType$,D=v(()=>!r()&&a()),U=v(()=>Ms(l(),"s")),z=v(()=>!d()||!!s()||n(D)),G=K(!1);De(()=>{N(G,n(z),!0)});let le=()=>{N(G,!0)},Y=()=>{var ie;re(),(ie=n(f))==null||ie.addEventListener("animationiteration",le,{once:!0})},re=()=>{var ie;N(G,!1),(ie=n(f))==null||ie.removeEventListener("animationiteration",le)},X=ie=>{R.set(ie)},we=v(()=>u()&&!n(z));De(()=>{u()?Y():re()});let ce=()=>{n(z)||(R.set(!0),P==null||P())};mn(()=>{R.clearTimeout(),re()});let ne=()=>{R.set(!1)},he=Q("tooltip_interactive_interaction_time_indicator");var xe=ow();let Z;xe.__mousemove=[iw],xe.__click=ce;var Ne=T(xe);Ao(Ne,{get tooltipContent(){return he},get tooltipVisible(){return n(we)},initialTranslateYPx:72,tooltipPlacement:"bottom",onTooltipVisibilityChange:X,get ref(){return m()},set ref(ie){m(ie)},children:(ie,Oe)=>{Xd(ie,{completed:!0})},$$slots:{default:!0}});var ue=k(Ne,2);let A;ot(ue,ie=>m(ie),()=>m());var Ke=k(ue,2);let Ce;ot(Ke,ie=>N(f,ie),()=>n(f)),w(xe),B((ie,Oe,Be)=>{Z=se(xe,1,"interactive-episode-icon-animated s-25",null,Z,ie),A=se(ue,1,"ref-block s-25",null,A,Oe),Ce=se(Ke,1,"pulse s-25",null,Ce,Be)},[()=>({mobile:r(),fullscreen:p(),invisible:n(z),"icon-small":n(U)}),()=>({hidden:n(z)}),()=>({paused:n(G)})]),_t("mouseleave",xe,ne),_(t,xe),H(),o()}rt(["mousemove","click"]);function Ju(t,e){F(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);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=Le();let p=v(()=>e.buttonComponent);var m=de(u);Di(m,()=>n(p),(f,b)=>{b(f,As(()=>{var y;return(y=e.buttonComponentProps)!=null?y:{}}))}),_(d,u)},$$slots:{default:!0}}),H()}var Ns={prevButton:100,replayButton:200,playButton:300,nextButton:400,playPrevChapterButton:500,seekToInteractiveButton:600,interactiveGraphButton:700,liveButton:800};var sw=Ee('<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 da(t,e){F(e,!0);let i=g(e,"reversed",3,!1),o=v(()=>i()?"transform: scaleX(-1);transform-origin: 50%;":void 0),r=v(()=>`${vn(e.size)}${n(o)}`),a=v(()=>i()?"prev-icon":"next-icon");Ze(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=sw();_(l,s)},$$slots:{default:!0}}),H()}var aw=L('<div class="icon-background-mobile s-23"><!></div>'),lw={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 Ka(t,e){F(e,!0),q(t,lw);let i=g(e,"ref",15,void 0),o=g(e,"isMobile",3,!1),r=g(e,"disabled",3,!1),l=ve().ui.t,d=v(()=>e.type==="prev"?l("tooltip_previous"):l("tooltip_next")),s=v(()=>e.type==="prev"?l("hotkey_map_item_prev_video_value"):l("hotkey_map_item_next_video_value")),u=v(()=>`btn-${o()?"m":"d"}--${e.type}`);Ut(t,{get className(){return n(u)},get testId(){var p;return`btn-${(p=e.type)!=null?p:""}`},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(p){i(p)},children:(p,m)=>{var f=Le(),b=de(f);{var y=S=>{var C=aw(),I=T(C);let R=v(()=>e.type==="prev");da(I,{get size(){return"32"},get reversed(){return n(R)}}),w(C),_(S,C)},$=S=>{let C=v(()=>e.type==="prev");da(S,{get size(){return"24"},get reversed(){return n(C)}})};V(b,S=>{o()?S(y):S($,!1)})}_(p,f)},$$slots:{default:!0}}),H()}var dw=Ee('<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 ac(t,e){F(e,!0);let i=v(()=>vn(e.size));Ze(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=dw();_(o,a)},$$slots:{default:!0}}),H()}import{noop as cw}from"@vkontakte/videoplayer-shared/es2015";var uw=L('<div class="icon-background-mobile s-27"></div>'),pw=L("<!> <div><!></div>",1),fw={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 Yl(t,e){F(e,!0),q(t,fw);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,cw),d=Q("tooltip_restart"),s=v(()=>`${o()?"btn-m--play":""} ${a()}`);Ut(t,{get className(){return n(s)},testId:"btn-replay",get ariaLabel(){return d},get disabled(){return r()},get click(){return l()},get ariaKeyShortCut(){return vs.KeyK},get ref(){return i()},set ref(u){i(u)},children:(u,p)=>{var m=pw(),f=de(m);{var b=I=>{var R=uw();_(I,R)};V(f,I=>{o()&&I(b)})}var y=k(f,2);let $;var S=T(y);let C=v(()=>o()?"48":"24");ac(S,{get size(){return n(C)}}),w(y),B(I=>$=se(y,1,"s-27",null,$,I),[()=>({mobile:o()})]),_(u,m)},$$slots:{default:!0}}),H()}var mw=Ee('<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 Os(t,e){F(e,!0);let i=v(()=>vn(e.size));Ze(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=mw();_(o,a)},$$slots:{default:!0}}),H()}import{noop as vw}from"@vkontakte/videoplayer-shared/es2015";var gw=L('<div class="icon-background-mobile s-22"><!></div>'),hw={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 jl(t,e){F(e,!0),q(t,hw);let[i,o]=Re(),r=()=>x(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),p=g(e,"className",3,""),m=g(e,"click",3,vw),b=ve().ui.t,{toggle:y}=a,$=v(()=>y),S=v(()=>r()!==null),C=v(()=>n(S)?r():s()),I=v(()=>n(C)?b("tooltip_pause"):b("tooltip_play")),R=v(()=>n(C)?Os:Ln),E=v(()=>`${d()?"btn-m--play":""} ${p()}`),P=v(()=>n(S)?n($):m());Ut(t,{get className(){return n(E)},testId:"btn-play",get click(){return n(P)},get disabled(){return u()},get ariaLabel(){return n(I)},get ariaKeyShortCut(){return vs.KeyK},get ref(){return l()},set ref(O){l(O)},children:(O,D)=>{var U=Le();let z=v(()=>n(R));var G=de(U);{var le=re=>{var X=gw(),we=T(X);Di(we,()=>n(z),(ce,ne)=>{ne(ce,{get size(){return"48"}})}),w(X),_(re,X)},Y=re=>{var X=Le(),we=de(X);Di(we,()=>n(z),(ce,ne)=>{ne(ce,{get size(){return"24"}})}),_(re,X)};V(G,re=>{d()?re(le):re(Y,!1)})}_(O,U)},$$slots:{default:!0}}),H(),o()}var _w=Ee('<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 wm(t){Ze(t,{testId:"play-prev-chapter-icon",children:(e,i)=>{var o=_w();_(e,o)},$$slots:{default:!0}})}function lc(t,e){F(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"hidden",3,!1),r=g(e,"disabled",3,!1),a=Q("tooltip_interactive_go_back"),l=v(()=>o()?"hidden":"");Ut(t,{get className(){return n(l)},testId:"btn-play-prev-chapter",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}}),H()}var bw=L('<span class="gutter s-26"><span><!></span></span>'),$w={hash:"s-26",code:".gutter.s-26{--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-26{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-26{background-color:var(--toggle-color-autoplay-on);transform:translateX(calc(var(--gutterWidth) - var(--togglerWidth) + var(--togglerGap)))}"};function dc(t,e){F(e,!0),q(t,$w);let[i,o]=Re(),r=()=>x(s,"$autoplayNextEnabled$",i),a=g(e,"ref",15,void 0),l=ve(),d=l.ui.t,s=l.ui.autoplayNextEnabled$,u=l.actions.internal.setAutoplayNextEnabled,p=()=>{u(!r(),!0)},m=d("aria_label_autoplay"),f="16",b="#000",y=v(()=>r()?"true":"false");Ut(t,{click:p,get ariaLabel(){return m},role:"switch",get areaChecked(){return n(y)},get ref(){return a()},set ref($){a($)},children:($,S)=>{var C=bw(),I=T(C);let R;var E=T(I);{var P=D=>{Ln(D,{get size(){return f},fill:b})},O=D=>{Os(D,{get size(){return f},fill:b})};V(E,D=>{r()?D(P):D(O,!1)})}w(I),w(C),B(D=>R=se(I,1,"toggler s-26",null,R,D),[()=>({enabled:r()})]),_($,C)},$$slots:{default:!0}}),H(),o()}var yw=Ee('<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 Sm(t){Ze(t,{testId:"seek-to-interactive-icon",children:(e,i)=>{var o=yw();vi(),_(e,o)},$$slots:{default:!0}})}function cc(t,e){F(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"hidden",3,!1),r=g(e,"disabled",3,!1),a=Q("tooltip_interactive_seek"),l=v(()=>o()?"hidden":"");Ut(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)=>{Sm(d,{})},$$slots:{default:!0}}),H()}var xw=Ee('<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>'),ww=Ee('<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 Tm(t,e){let i=g(e,"isOpened",3,!1),o=v(()=>i()?"graph-close-icon":"graph-open-icon");Ze(t,{get testId(){return n(o)},children:(r,a)=>{var l=ww(),d=k(de(l));{var s=u=>{var p=xw();_(u,p)};V(d,u=>{i()&&u(s)})}_(r,l)},$$slots:{default:!0}})}function uc(t,e){F(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=ve().ui.t,s=v(()=>a()?d("tooltip_interactive_graph_on"):d("tooltip_interactive_graph_off")),u=v(()=>o()?"hidden":"");Ut(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(p){i(p)},children:(p,m)=>{let f=v(()=>!!a());Tm(p,{get isOpened(){return n(f)}})},$$slots:{default:!0}}),H()}import{PlaybackState as tb}from"@vkontakte/videoplayer-core/es2015";function pc(t,e){F(e,!0);let[i,o]=Re(),r=()=>x(u,"$playbackState$",i),a=g(e,"isMobile",3,!1),l=g(e,"isLiveActive",3,!1),d=g(e,"ariaLabel",3,""),s=ve(),u=s.state.playbackState$,p=s.actions.internal.switchToActiveLive,m=s.actions.internal.togglePlay,f=v(()=>()=>{if(!l()){p();return}r()===tb.PAUSED&&m()}),b=v(()=>a()?"":"btn--live btn-full-opacity"),y=v(()=>l()?"btn-live":"btn-live-offset"),$=v(()=>l()&&r()===tb.PLAYING);Ut(t,{get className(){return n(b)},get testId(){return n(y)},get disabled(){return n($)},get ariaLabel(){return d()},get click(){return n(f)},children:(S,C)=>{Od(S,{get isActive(){return l()}})},$$slots:{default:!0}}),H(),o()}import{noop as ib}from"@vkontakte/videoplayer-shared/es2015";var Sw=L('<div class="icon icon-error-stub"><div class="inner"></div></div>'),Tw=L('<img class="icon" aria-hidden="true"/>');function qa(t,e){"use strict";let i=K(!1),o=()=>{N(i,!0)};var r=Le(),a=de(r);{var l=s=>{var u=Sw();_(s,u)},d=s=>{var u=Tw();B(()=>Ue(u,"src",e.icon)),_t("error",u,o),Pa(u),_(s,u)};V(a,s=>{n(i)?s(l):s(d,!1)})}_(t,r)}function Cm(t,e){F(e,!0);let i=g(e,"disabled",3,!1),o=g(e,"onClick",3,ib),r=g(e,"ref",15),a=v(()=>o()===ib),l=v(()=>n(a)||i()),d=v(()=>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 p=v(()=>{var m;return(m=e.testId)!=null?m:e.id});Ut(s,{get className(){return n(d)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return n(l)},get testId(){return n(p)},children:(m,f)=>{qa(m,{get icon(){return e.icon}})},$$slots:{default:!0}})},$$slots:{default:!0}}),H()}var ob=t=>!!t.buttonComponent;var Ds={vkLogo:100,autoplayNext:200,volume:300,subtitles:400,settings:500,context:600,fullscreen:700,chromecast:800};var ep=(t,e,i,o)=>{if(t)for(let[r,a]of Object.entries(e))a.set(Gn(t,i,r,o))};import{interpolate as Im}from"@vkontakte/videoplayer-shared/es2015";var nb=10,rb=40,Em=.2,Iw=.5,Ew=65,Pw=114,Aw=4,sb=({onPreviewTrackOpened:t,getTimelineRef:e,isHorizontal:i})=>{let o=v(()=>i?Ew:Pw),r=K(!1),a=K(0),l=K(0),d=v(()=>n(o)+nb-rb-Aw),s=v(()=>Im(n(a),[Em,1],[0,-n(d)])),u=v(()=>Im(n(a),[Em,1],[0,rb])),p=v(()=>Im(n(a),[Em,1],[0,n(o)+nb]));return{progressBarY:()=>n(s),controlsY:()=>n(u),calculatedHeight:()=>n(p),onPointerDown:$=>{var S;N(l,((S=e())==null?void 0:S.getBoundingClientRect().bottom)||0,!0),N(r,!0)},onPointerMove:$=>{if(!n(r))return;let S=Math.max(Math.min($.clientY-n(l),0),-n(d));N(a,Math.abs(S/n(d)),!0)},onPointerUp:()=>{N(r,!1),N(a,n(a)>=Iw?1:0,!0),n(a)===1&&t()},closePreviewTrack:()=>{N(a,0)}}};var kw=t=>t;function $s(t,{delay:e=0,duration:i=400,easing:o=kw}={}){let r=+getComputedStyle(t).opacity;return{delay:e,duration:i,easing:o,css:a=>`opacity: ${a*r}`}}var Lw=L('<span class="root s-2d"> </span>'),Mw={hash:"s-2d",code:".root.s-2d{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 Pm(t,e){q(t,Mw);var i=Lw(),o=T(i,!0);w(i),B(()=>pe(o,e.time)),_(t,i)}var Vw=L('<div class="tooltip-wrapper s-i"><div><!></div></div>'),Rw={hash:"s-i",code:'.tooltip-wrapper.s-i{display:block;position:relative}.tooltip.s-i{bottom:100%;opacity:0;position:absolute;transform:translateX(-50%);transition:opacity .2s;visibility:hidden}.pointer.s-i: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-i{opacity:1;visibility:visible}'};function Am(t,e){q(t,Rw);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=K(void 0),u=K(void 0);function p(S){if(!n(u))return 0;let{width:C}=n(u).getBoundingClientRect(),I=C/2;return S<I?I+l():S>e.containerWidth-I?e.containerWidth-I-d():S}let m=v(()=>p(r()));var f=Vw(),b=T(f);let y;var $=T(b);ri($,()=>{var S;return(S=e.children)!=null?S:ht}),w(b),ot(b,S=>N(u,S),()=>n(u)),w(f),ot(f,S=>N(s,S),()=>n(s)),B(S=>{Ge(f,`transform: translate(${n(m)}px, ${a()}px);`),y=se(b,1,"tooltip s-i",null,y,S),Ge(b,`opacity: ${i()?1:0}; visibility: ${i()?"visible":"hidden"}`)},[()=>({active:i(),pointer:o()})]),_(t,f)}var ab=t=>Math.abs(t)/90%4===1;var Nw=L('<div class="preview s-j"></div>'),Ow=L('<div class="time s-j"> </div>'),Dw=L('<div><!> <div class="episode s-j"><!></div> <!></div>'),Bw={hash:"s-j",code:".timeline-preview.s-j{border-radius:2px;bottom:18px;pointer-events:none}.timeline-preview.mobile.s-j{bottom:72px}.preview.s-j{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-j{margin-bottom:4px;margin-top:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.episode.s-j,.time.s-j{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-j{color:var(--white)}"};function km(t,e){F(e,!0),q(t,Bw);let[i,o]=Re(),r=()=>x(y,"$rotateAlpha",i),a=()=>x($,"$playerSize",i),l={MOBILE:150,DESKTOP:278},d=g(e,"time",3,""),s=g(e,"isMobile",3,!1),u=g(e,"videoEpisodes",19,()=>[]),p=g(e,"progress",3,0),m=g(e,"duration",3,0),f=g(e,"isInteractive",3,!1),b=ve(),y=b.ui.rotateAlpha,$=b.ui.playerSize,S=K(0),C=K(0),I=K(""),R=K(0),E=K(0),P=K(0),O=K(0),D=v(()=>Wu(p(),m(),u())),U=v(()=>Kl(r())),z=v(()=>ab(r())),G=v(re),le=v(()=>(n(z)?1:-1)*(n(S)/2-n(C)/2)),Y=v(()=>n(le)*-1);De(()=>{(j=>{N(S,j.width,!0),N(C,j.height,!0)})(we())}),De(()=>{(j=>{N(I,j.imgSrc,!0),N(R,j.imgWidth,!0),N(E,j.imgHeight,!0),N(P,j.imgOffsetX,!0),N(O,j.imgOffsetY,!0)})(ce(p()))});function re(){var Be;let j=s()?l.MOBILE:l.DESKTOP,{isVertical:ie}=X(),Oe=30;return(Be=n(D))!=null&&Be.text&&(Oe+=16),(ie||n(U))&&(Oe+=18,Oe+=50),Math.min(Math.max(a().height-Oe,0),j)}function X(){let j=e.previewThumbsData.frameWidth,ie=e.previewThumbsData.frameHeight,Oe=ie>j;return{width:j,height:ie,isHorizontal:!Oe,isVertical:Oe}}function we(){let{height:j,isHorizontal:ie,isVertical:Oe,width:Be}=X();return ie&&(j=j/Be*n(G),Be=n(G)),Oe&&(Be=Be/j*n(G),j=n(G)),{width:Be,height:j}}function ce(j){let ie;e.previewThumbsData.isUV?ie=Math.floor(m()*j/e.previewThumbsData.frequency):ie=Math.min(e.previewThumbsData.countTotal,Math.max(0,Math.floor(e.previewThumbsData.countTotal*j)));let Oe=Math.floor(ie/e.previewThumbsData.countPerImage),Be=Math.floor(ie%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),fe=ie%e.previewThumbsData.countPerRow,ee=Math.floor(e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow);!e.previewThumbsData.isUV&&Oe===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&(ee=Math.floor(e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage%e.previewThumbsData.countPerRow>0&&ee++);let Se=e.previewThumbsData.countPerRow;!e.previewThumbsData.isUV&&Oe===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage>0&&(Se=Math.min(e.previewThumbsData.countPerRow,e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage));let Fe=n(S)*Se,qe=n(C)*ee,Ye=-fe*n(S),Te=-Be*n(C);return{imgSrc:e.previewThumbsData.links[Oe],imgWidth:Fe,imgHeight:qe,imgOffsetX:Ye,imgOffsetY:Te}}var ne=Dw();let he;var xe=T(ne);{var Z=j=>{var ie=Nw();B(()=>Ge(ie,`width: ${n(S)}px; height: ${n(C)}px; background-image: url(${n(I)}); background-size: ${n(R)}px ${n(E)}px; background-position: ${n(P)}px ${n(O)}px;
61
- transform: rotate(${r()}deg) ${n(U)?`translate(${n(le)}px, ${n(Y)}px)`:""};
62
- `)),_(j,ie)};V(xe,j=>{n(I)&&j(Z)})}var Ne=k(xe,2),ue=T(Ne);{var A=j=>{var ie=Le(),Oe=de(ie);{var Be=ee=>{var Se=ms();B(Fe=>pe(Se,Fe),[()=>Q("tooltip_episode_unfinished")]),_(ee,Se)},fe=ee=>{var Se=ms();B(()=>pe(Se,n(D).text||"")),_(ee,Se)};V(Oe,ee=>{f()&&n(D).completed===!1?ee(Be):ee(fe,!1)})}_(j,ie)};V(ue,j=>{n(D)&&j(A)})}w(Ne);var Ke=k(Ne,2);{var Ce=j=>{var ie=Ow(),Oe=T(ie,!0);w(ie),B(()=>pe(Oe,d())),_(j,ie)};V(Ke,j=>{f()||j(Ce)})}w(ne),B(j=>{he=se(ne,1,"timeline-preview s-j",null,he,j),Ge(ne,`width: ${n(U)?n(C):n(S)}px;`)},[()=>({mobile:s()})]),_(t,ne),H(),o()}var Fw=L('<span class="time s-g"> </span>'),Hw=L("<!> <!>",1),Uw={hash:"s-g",code:".time.s-g{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 Lm(t,e){var Pe,It,Ve,st,mt;F(e,!0),q(t,Uw);let[i,o]=Re(),r=()=>x(Y,"$interactiveEpisodes$",i),a=()=>x(O,"$duration$",i),l=()=>x(P,"$position$",i),d=()=>x(we,"$isInteractiveExpectation$",i),s=()=>x(X,"$isInteractiveTime$",i),u=()=>x(xe,"$previewTrackActive",i),p=()=>x(D,"$isLive$",i),m=()=>x(he,"$disabledControls$",i),f=()=>x(z,"$isMobile",i),b=()=>x(U,"$isActiveLive$",i),y=()=>x(E,"$bufferedProgress$",i),$=g(e,"showTimeline",3,!1),S=g(e,"withEpisodes",3,!0),C=g(e,"ref",15,void 0),I=ve(),R=Mt(),E=I.state.bufferedProgress$,P=I.state.positionWithScrubbing$,O=I.state.duration$,D=I.state.isLive$,U=I.state.isActiveLive$,z=I.ui.isMobile,G=R.features.episodes&&S()?I.actions.internal.getVideoEpisodes():void 0,le=I.actions.internal.getPreviewThumbsData(),Y=I.state.interactiveEpisodes$,re=I.state.isInteractive,X=I.state.isInteractiveTime$,we=I.state.isInteractiveExpectation$,ce=I.actions.internal.correctSeekTimeToInteractive,ne=(Pe=I.callbacks)==null?void 0:Pe.onDisabledTimelineClick,he=I.ui.controls.disabledControls$,xe=I.ui.previewTrackActive,Z=(Ve=(It=I.callbacks)==null?void 0:It.uiInfo)==null?void 0:Ve.onTimelineMouseEnter,Ne=(mt=(st=I.callbacks)==null?void 0:st.uiInfo)==null?void 0:mt.onTimelineMouseLeave,ue=I.ui.t,A=R.features.interactiveResponsiveUi,Ke=v(()=>re?r():G),Ce=v(()=>Zo(a())),j=v(()=>Zo(l())),ie=v(()=>l()/a()),Oe=v(()=>d()||s()),Be=K(!1),fe=K(""),ee=K(0),Se=K(0),Fe=K(0),qe=v(()=>({containerWidth:n(Se),translateXPx:n(ee),translateYPx:re&&le?-36:-16,active:n(Be)&&$()&&!n(Oe)&&!A&&!u(),pointer:!R.features.timelinePreview||!le||p()})),Ye=ue("aria_timeline"),Te=v(()=>ue("aria_timeline_value",{position:n(j),duration:n(Ce)}));function Me(be){return!ce||!re?be:ce(be*a())/a()}function ze(be,Je){var We;(We=e.onSliderPointerDown)==null||We.call(e,Je),I.actions.internal.startScrubbing(Me(be))}function Vt(be){s()||I.actions.internal.progressScrubbing(Me(be))}function et(be){var Je;I.actions.internal.completeScrubbing(Me(be)),N(Be,!1),(Je=e.onSliderPointerUp)==null||Je.call(e)}function Ot(be,Je,We){var nt;(nt=e.onSliderPointerEnter)==null||nt.call(e,be),Jt(be,Je,We),N(Be,!0)}function qt(be,Je,We,nt){var ei;(ei=e.onSliderMove)==null||ei.call(e,nt,be),Jt(be,Je,We),N(Be,!0)}function St(){var be;N(Be,!1),(be=e.onSliderLeave)==null||be.call(e)}function Jt(be,Je,We){N(Fe,Me(be),!0),N(ee,Je,!0),We&&N(Se,We,!0),N(fe,Dt(be),!0)}function Dt(be){let Je=Zo((p()?1-be:be)*a());return p()?`-${Je}`:Je}let $e=v(()=>m().has("TIMELINE"));var _e=Hw(),J=de(_e);Am(J,As(()=>n(qe),{get leftOffset(){return e.tooltipLeftOffset},get rightOffset(){return e.tooltipRightOffset},children:(be,Je)=>{var We=Le(),nt=de(We);{var ei=gi=>{km(gi,{get time(){return n(fe)},get isMobile(){return f()},get videoEpisodes(){return n(Ke)},get previewThumbsData(){return le},get progress(){return n(Fe)},get duration(){return a()},get isInteractive(){return re}})},li=gi=>{var bi=Fw(),io=T(bi,!0);w(bi),B(()=>pe(io,n(fe))),_(gi,bi)};V(nt,gi=>{R.features.timelinePreview&&le&&!p()?gi(ei):gi(li,!1)})}_(be,We)},$$slots:{default:!0}}));var ye=k(J,2);za(ye,{className:"timeline-slider",get isActiveLive(){return b()},get isMobile(){return f()},get ariaLabel(){return Ye},ariaValueMin:0,get ariaValueMax(){return a()},get ariaValueNow(){return l()},get ariaValueText(){return n(Te)},get loadedProgress(){return y()},get filledProgress(){return n(ie)},get handleProgress(){return n(ie)},get videoEpisodes(){return n(Ke)},onPointerDown:ze,onHandleMove:Vt,onPointerMove:qt,onPointerUp:et,onPointerEnter:Ot,onPointerLeave:St,get onMouseEnter(){return Z},get onMouseLeave(){return Ne},get onDisabledClick(){return ne},get isInteractive(){return re},get disabled(){return n($e)},get handleAlwaysVisible(){return u()},get hideHandel(){return s()},testId:"progress_bar",onContextMenu:et,get ref(){return C()},set ref(be){C(be)}}),_(t,_e),H(),o()}var zw={hash:"s-f",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 fc(t,e){F(e,!0),q(t,zw);let[i,o]=Re(),r=()=>x(s,"$isMobile",i),a=g(e,"position",3,0),l=g(e,"duration",3,0),d=ve(),s=d.ui.isMobile,u=d.ui.t,p=v(()=>Zo(l())),m=v(()=>Zo(a())),f=v(()=>a()/l()),b=v(()=>u("aria_timeline_value",{position:n(m),duration:n(p)})),y=v(()=>Math.round(n(f)*100));za(t,{className:"timeline-ads-slider",ariaValueMin:0,get ariaValueMax(){return l()},get ariaValueNow(){return n(y)},get ariaValueText(){return n(b)},get filledProgress(){return n(f)},hideHandel:!0,get squareBorders(){return r()}}),H(),o()}var Ww=L("<div><!></div>"),Kw=L("<div></div>"),qw={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){F(e,!0),q(t,qw);let[i,o]=Re(),r=()=>x(S,"$isLive$",i),a=()=>x(R,"$isMobile",i),l=()=>x(E,"$disabled",i),d=()=>x(I,"$adPosition",i),s=()=>x(C,"$adDuration",i),u=g(e,"isAds",3,!1),p=g(e,"isHidden",3,!1),m=g(e,"timelineNotAvailable",3,!1),f=g(e,"needPadding",3,!0),b=g(e,"ref",15,void 0),y=ve(),$=Mt(),S=y.state.isLive$,C=y.ads.duration,I=y.ads.position,R=y.ui.isMobile,E=ae(!1),P=v(()=>!m()&&(!r()||r()&&e.canRewindLive&&e.isRewindableLive||u()));var O=Le(),D=de(O);{var U=G=>{var le=Ww();let Y;var re=T(le);{var X=ce=>{fc(ce,{get position(){return d()},get duration(){return s()}})},we=ce=>{Lm(ce,{get tooltipLeftOffset(){return e.tooltipLeftOffset},get tooltipRightOffset(){return e.tooltipRightOffset},get showTimeline(){return n(P)},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 b()},set ref(ne){b(ne)}})};V(re,ce=>{u()?ce(X):ce(we,!1)})}w(le),Ps(le,()=>Ol(p()&&$.features.usePerformanceFix,E,$.disableInvisibleComponentsTimeout)),B(ce=>Y=se(le,1,"timeline s-d",null,Y,ce),[()=>({withoutPadding:!f(),mobile:a(),"out-of-flow":l()})]),_(G,le)},z=G=>{var le=Kw();let Y;B(re=>Y=se(le,1,"timeline-stub s-d",null,Y,re),[()=>({mobile:a()})]),_(G,le)};V(D,G=>{n(P)?G(U):G(z,!1)})}_(t,O),H(),o()}import{getRangeAroundIndex as Qw}from"@vkontakte/videoplayer-shared/es2015";var Gw=(t,e,i,o,r,a,l)=>{N(e,!0),N(i,t.clientX,!0),N(o,n(r),!0),a(l())},Yw=L("<div></div>"),jw=L('<div><div class="track s-2b"></div></div>'),Xw={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 Vm(t,e){F(e,!0),q(t,Xw);let[i,o]=Re(),r=()=>x(R,"$rotateAlpha",i),a=()=>x($,"$position$",i),l=()=>x(y,"$duration$",i),d=ve(),{countPerImage:s=0,countPerRow:u=0,countTotal:p=0,links:m=[],frameHeight:f=0,frameWidth:b=0}=d.actions.internal.getPreviewThumbsData()||{},{duration$:y,positionWithScrubbing$:$}=d.state,{startScrubbing:S,progressScrubbing:C,completeScrubbing:I}=d.actions.internal,R=d.ui.rotateAlpha,E=K(void 0),P=K(!1),O=K(0),D=K(0),U=K(0),z=K(0),G=v(()=>f<=b),le=v(()=>Kl(r())),Y=v(()=>n(G)?!n(le):n(le)),re=114,X=65,we=3,ce=v(()=>n(Y)?re:X),ne=v(()=>n(G)?re:X),he=v(()=>n(G)?"var(--preview-track-frame-height-horizontal)":"var(--preview-track-frame-height-vertical)"),xe=v(()=>p*n(ce)),Z=K(0);De(()=>{N(z,Math.ceil(-n(U)/n(ce))-1),N(U,-n(xe)*a()/l())});let Ne=()=>{I(ue(),!0)},ue=()=>l()*-n(U)/n(xe)/l(),A=!1,Ke=Te=>{if(!n(P))return!1;let Me=Te.clientX-n(O);N(U,n(D)+Me),N(U,Math.max(Math.min(n(U),0),-n(xe)),!0),Math.abs(Me)>1&&(A=!0),C(ue())},Ce=Te=>{n(P)&&(N(P,!1),!A&&Te&&N(U,-(Te.offsetX-n(Z)/2)),A=!1,Ne())},j=()=>{n(P)&&Ce()},ie=v(()=>s/u),Oe=(Te,Me)=>{if(Te!==m.length-1)return u;let ze=0,Vt=Me*u;for(let et=1;et<=u;et++)Te*s+ze+Vt<p&&ze++;return ze},Be=v(()=>Math.floor(n(z)/s)),fe=v(()=>Qw(3,n(Be),m.length-1)),ee=(Te,Me,ze)=>{let Vt=s*n(ce);return Te*Vt+Me*n(ce)*u+n(Z)/2-we/2+ze*n(ce)},Se=v(()=>[`--row-numbers: ${n(ie)}`,`--column-numbers: ${u}`,`--frame-width: ${n(ne)}px`,`--frame-height: ${n(he)}`].join(";"));var Fe=jw();let qe;var Ye=T(Fe);Ye.__pointerdown=[Gw,P,O,D,U,S,ue],Ye.__pointermove=Ke,Ye.__pointerup=Ce,wi(Ye,20,()=>n(fe),Te=>Te,(Te,Me)=>{var ze=Le(),Vt=de(ze);wi(Vt,16,()=>Array.from({length:n(ie)},(et,Ot)=>Ot),et=>et,(et,Ot)=>{var qt=Le(),St=de(qt);wi(St,16,()=>Array.from({length:Oe(Me,Ot)},(Jt,Dt)=>Dt),Jt=>Jt,(Jt,Dt)=>{var $e=Yw();B((_e,J)=>{Ge($e,_e),se($e,1,J,"s-2b")},[()=>`--row-index: ${Ot}; --column-index: ${Dt}; left: ${ee(Me,Ot,Dt)}px; background-image: url(${m[Me]});`,()=>`frame rotate-${Math.abs(r())/90%4}`]),_(Jt,$e)}),_(et,qt)}),_(Te,ze)}),w(Ye),w(Fe),ot(Fe,Te=>N(E,Te),()=>n(E)),B(Te=>{qe=se(Fe,1,"root s-2b",null,qe,Te),Ge(Fe,n(Se)),Ge(Ye,`transform: translateX(${n(U)}px); width: ${n(xe)}px;`)},[()=>({"is-vertical-video":!n(G),"vertically-rotated":n(le)})]),_t("mouseleave",Ye,j),An(Fe,"clientWidth",Te=>N(Z,Te)),_(t,Fe),H(),o()}rt(["pointerdown","pointermove","pointerup"]);var Zw=L('<div class="notification s-2c"><span class="description s-2c"> </span></div>'),Jw={hash:"s-2c",code:".notification.s-2c{background:var(--notification-bg);border-radius:var(--notification-radius);padding:9px 14px 10px 12px}.description.s-2c{font-size:14px;line-height:18px}"};function Rm(t,e){F(e,!1),q(t,Jw);let i=340,{ui:{t:o}}=ve();xo();var r=Zw(),a=T(r),l=T(a,!0);w(a),w(r),B(d=>pe(l,d),[()=>o("preview_track_close_tooltip")],Tn),Zr(3,r,()=>$s,()=>({duration:i})),_(t,r),H()}import{getRangeAroundIndex as eS}from"@vkontakte/videoplayer-shared/es2015";var tS=L('<div class="preview-track-close tooltip s-29"><!></div>'),iS=L('<div class="preview-track-control s-29"><!> <div class="preview-track-close s-29"><!></div> <!></div>'),oS=L('<div class="wrapper-preview-track s-29"><!></div>'),nS=L('<div class="enriched-timeline s-29"><!> <!> <!></div>'),rS={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 Nm(t,e){F(e,!0),q(t,rS);let[i,o]=Re(),r=()=>x($,"$playerSize",i),a=()=>x(y,"$duration$",i),l=()=>x(S,"$previewTrackActive",i),d=()=>x(f,"$position$",i),s=()=>x(b,"$isRewindableLive$",i),u=g(e,"timelineRef",15,void 0),p=ve(),m=200,{positionWithScrubbing$:f,isRewindableLive$:b,duration$:y}=p.state,{playerSize:$,previewTrackActive:S}=p.ui,{countPerImage:C=0,links:I=[],frequency:R=0}=p.actions.internal.getPreviewThumbsData()||{},E=v(()=>r().width>100),P=K(!f_()),O=()=>{n(P)&&(p_(),N(P,!1))},D=ce=>{let ne=Math.floor(a()*ce/R),he=Math.floor(ne/C),xe=eS(3,he,I.length-1);for(let Z of xe){let Ne=new Image;Ne.src=I[Z]}},U=(ce,ne)=>{D(ne),!l()&&e.onTimelineMove(ce)};var z=nS(),G=T(z);{var le=ce=>{var ne=iS(),he=T(ne);let xe=v(()=>Zo(d()));Pm(he,{get time(){return n(xe)}});var Z=k(he,2),Ne=T(Z);Ls(Ne,{onClick:()=>p.actions.internal.closePreviewTrack()}),w(Z);var ue=k(Z,2);{var A=Ke=>{var Ce=tS(),j=T(Ce);Rm(j,{}),w(Ce),_(Ke,Ce)};V(ue,Ke=>{n(P)&&Ke(A)})}w(ne),_t("mouseleave",Z,O),Zr(3,ne,()=>$s,()=>({duration:m})),_(ce,ne)};V(G,ce=>{l()&&ce(le)})}var Y=k(G,2);let re=v(()=>!n(E));Qa(Y,{get isHidden(){return n(re)},get isAds(){return e.isAds},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return s()},onSliderMove:U,get onSliderPointerDown(){return e.onTimelinePointerDown},get onSliderPointerUp(){return e.onTimelinePointerUp},get onSliderLeave(){return e.onTimelinePointerLeave},onSliderPointerEnter:D,get ref(){return u()},set ref(ce){u(ce)}});var X=k(Y,2);{var we=ce=>{var ne=oS(),he=T(ne);Vm(he,{}),w(ne),B(()=>Ge(ne,`height: ${e.animatedPreviewTrackHeight}px;`)),_(ce,ne)};V(X,ce=>{e.previewTrackAvailable&&ce(we)})}w(z),B(()=>Ge(z,`transform: translateY(${e.animatedOffsetY}px);`)),_(t,z),H(),o()}var aS=L('<div><!> <div class="controls s-1e" data-testid="player_controls"><div class="controls-left s-1e"><!> <!> <!></div> <div class="controls-right s-1e"></div></div></div> <!>',1),lS={hash:"s-1e",code:'.wrapper-bottom.s-1e{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-1e:before{background:var(--controls-gradient);content:"";height:var(--controls-gradient-height);position:absolute;width:100%}.wrapper-bottom.s-1e>:where(.s-1e){pointer-events:auto}.controls.s-1e{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-1e,.controls-right.s-1e{align-content:center;display:flex}.controls-left.s-1e{flex-grow:1;min-width:0;overflow:hidden}.controls-left.s-1e >:not(:first-child),.controls-right.s-1e >*{margin-left:var(--controls-desktop-item-margin-left)}.controls-hidden.s-1e{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-1e{transition:none}'};function Dm(t,e){var ma,ll;F(e,!0),q(t,lS);let[i,o]=Re(),r=()=>x(Jo,"$disabledControls$",i),a=()=>x(lt,"$adPlaybackState",i),l=()=>x(li,"$playbackState$",i),d=()=>x(oo,"$currentSubtitle$",i),s=()=>x(io,"$isEnded$",i),u=()=>x(en,"$currentGridType$",i),p=()=>x(ho,"$isLive$",i),m=()=>x(je,"$chromecastState$",i),f=()=>x(Pi,"$isPictureInPictureActive",i),b=()=>x(jt,"$pictureInPictureType$",i),y=()=>x(xi,"$availableSubtitlesList$",i),$=()=>x(Bt,"$contextMenuOpenedByKeyboard$",i),S=()=>x(Et,"$showContextMenuBtn$",i),C=()=>x(ct,"$isRewindableLive$",i),I=()=>x(pi,"$isActiveLive$",i),R=()=>x(is,"$graphIsOpened$",i),E=()=>x(_n,"$contextMenuVisible$",i),P=()=>x(Li,"$isFullscreen",i),O=()=>x(_o,"$autoplayNextEnabled",i),D=()=>x(n(Xi),"$prevButton",i),U=()=>x(n(zi),"$replayButton",i),z=()=>x(n(yn),"$playButton",i),G=()=>x(n($o),"$nextButton",i),le=()=>x(n(Dn),"$playPrevChapterButton",i),Y=()=>x(n(mi),"$seekToInteractiveButton",i),re=()=>x(n(zr),"$interactiveGraphButton",i),X=()=>x(n(xn),"$liveButton",i),we=()=>x(n(Oo),"$time",i),ce=()=>x(n(yr),"$episodes",i),ne=()=>x(n(nr),"$vkLogo",i),he=()=>x(n(xr),"$volume",i),xe=()=>x(n(wn),"$subtitles",i),Z=()=>x(n(an),"$settings",i),Ne=()=>x(n(Wr),"$context",i),ue=()=>x(n(ln),"$fullscreen",i),A=()=>x(n(ns),"$chromecast",i),Ke=()=>x(ko,"$additionalDesktopControlPanelRightButtons$",i),Ce=()=>x(Mi,"$playerSize",i),j=()=>x(tn,"$isInteractiveTime$",i),ie=()=>x(fi,"$previewTrackActive",i),Oe=()=>x(wt,"$settingsMenuVisible",i),Be=()=>x(co,"$settingButtonRef$",i),fe=()=>x(W,"$startedByKeyboard$",i),ee=()=>x(gi,"$isAudioAvailable$",i),Se=()=>x(_e,"$fakeIsPlaying$",i),Fe=()=>x(ts,"$seekToInteractiveDisabledTooltip$",i),qe=()=>x(pt,"$isPreviewTrackHorizontallyAligned$",i),Ye=()=>x(me,"$previewTrackAvailable",i),Te=()=>x(zo,"$previewTrackDragInProgress",i),Me=()=>x(Gt,"$adPosition",i),ze=()=>x(ei,"$position$",i),Vt=()=>x(Tt,"$adDuration",i),et=()=>x(nt,"$duration$",i),Ot=g(e,"playerControlsWrapperRef",15,void 0),qt=g(e,"playerControlsRef",15,void 0),St=g(e,"isAds",3,!1),Jt=g(e,"logoTargetUrl",3,""),Dt=g(e,"isOneVideoPlaylist",3,!1),$e=g(e,"customFullscreenSupported",3,!0),{fakeIsPlaying$:_e}=wo(),J=ve(),ye=wo(),Pe=Mt(),It=J.actions.internal.toggleMuted,Ve=J.actions.internal.togglePlay,st=J.actions.internal.pause,mt=J.actions.internal.toggleSubtitle,be=J.actions.internal.checkFullscreenSupport,Je=(ma=J.callbacks)==null?void 0:ma.onAudioDoesNotExistHint,We=(ll=J.callbacks)==null?void 0:ll.onAudioDisabledHint,nt=J.state.duration$,ei=J.state.positionWithScrubbing$,li=J.state.playbackState$,gi=J.state.isAudioAvailable$,bi=J.state.isAudioDisabled,io=J.state.isEnded$,ho=J.state.isLive$,pi=J.state.isActiveLive$,ct=J.state.isRewindableLive$,{isActive$:Pi,type$:jt}=ye.pictureInPicture$,wt=J.ui.settingsMenu.visible$,oi=J.ui.settingsMenu.openedByBtnKeyboard$,Xt=J.ui.controls,bt=J.actions.internal.getVideoEpisodes(),je=J.state.chromecastState$,xi=J.state.availableSubtitlesList$,oo=J.state.currentSubtitle$,Jo=Xt.disabledControls$,_n=J.ui.contextMenu.visible$,Et=J.ui.contextMenu.showContextMenuBtn$,Bt=J.ui.contextMenu.openedByBtnKeyboard$,W=J.ui.startedByKeyboard$,kt=J.ui.controlBlocks,di=J.ui.previewTrackNotificationVisible,at=J.ui.t,Tt=J.ads.duration,Gt=J.ads.position,lt=J.ads.playbackState,Li=J.ui.isFullscreen,Mi=J.ui.playerSize,en=J.ui.currentGridType$,ko=J.ui.additionalDesktopControlPanelRightButtons$,_o=J.ui.autoplayNextEnabled$,Fi=J.actions.internal.getVideoElement,vr=J.actions.internal.replayInteractive,no=J.actions.internal.prevVideoClick,bo=J.actions.internal.nextVideoClick,Hi=J.state.isInteractive,tn=J.state.isInteractiveTime$,on=J.state.showInteractiveGraph,jn=J.state.showSeekToInteractive,gr=J.state.showPlayPrevChapter,Rr=J.state.showInteractiveTimeIndicator,ys=J.state.playPrevChapterDisabledTooltip,ts=ye.seekToInteractiveDisabledTooltip$,is=ye.graphIsOpened$,Xn=Pe.features.interactiveResponsiveUi,nn=v(()=>r().has("EPISODE_BUTTON")),Lo=v(()=>r().has("GRAPH_BUTTON")),rn=v(()=>r().has("SEEK_TO_INTERACTIVE_BUTTON")),Zn=v(()=>r().has("PLAY_BUTTON")),Vn=v(()=>r().has("REPLAY_BUTTON")),Nr=v(()=>r().has("PLAY_PREV_CHAPTER_BUTTON")),Or=()=>J.actions.internal.toggleChromecast(),os=v(()=>St()?a()==="playing":l()===Om.PLAYING),hr=v(()=>d().value!=="off"),ro=v(()=>s()&&!St()||Hi),_r=v(()=>Xn?n(ro)&&eo(u(),"m"):n(ro)),Jn=v(()=>!s()||Hi||St()),bn=v(()=>eo(u(),"m")),so=v(()=>e.showNextPrevButtons&&eo(u(),"m")&&!St()&&e.nextButtonActive),Dr=v(()=>e.showNextPrevButtons&&eo(u(),"m")&&!St()&&e.prevButtonActive),Rn=v(()=>!St()&&!!p()),vt=v(()=>m()!==lb.NOT_AVAILABLE&&!(f()&&b()===1)&&eo(u(),"m")&&!Hi),ti=v(()=>e.showAutoplayNext&&!Dt()&&eo(u(),"s")),er=v(()=>y().length>0&&eo(u(),"m")),br=v(()=>$()||S()),Br=v(()=>eo(u(),"s")&&!St()),$n=v(()=>!e.logoHidden&&!St()),$r=v(()=>Pe.features.fullscreen&&be()&&(e.logoHidden||eo(u(),Xn?"xs":"s"))&&!(f()&&b()===1)&&(Hi?$e():!0)),Mo=v(()=>(!p()||St())&&!(Pe.features.interactiveHideTime&&Hi)),sn=v(()=>on&&eo(u(),"m")),Vo=v(()=>Xn?jn&&eo(u(),"s"):jn),tr=v(()=>Xn?gr&&eo(u(),"s"):gr),Ui=v(()=>!St()&&!p()&&!!(bt!=null&&bt.length)&&n(bn)&&!n(nn)),Ro=v(()=>!C()||!!I()),ir=v(()=>R()?at("tooltip_interactive_graph_on"):at("tooltip_interactive_graph_off")),Fr=v(()=>E()?at("tooltip_context_menu_close"):at("tooltip_context_menu_open")),ao=(dt,ft)=>dt?ft&&ft===Om.PAUSED?at("tooltip_play"):"":at("tooltip_live"),Nn=v(()=>ao(n(Ro),l())),No=v(()=>Pe.logoType==="vk_video"?at("tooltip_vk_video_logo"):at("tooltip_vk_logo")),Hr=v(()=>n(hr)?at("tooltip_subtitles_on"):at("tooltip_subtitles_off")),or=v(()=>P()?at("tooltip_fullscreen_on"):at("tooltip_fullscreen_off")),On=v(()=>m()===lb.CONNECTED?at("tooltip_chromecast_on"):at("tooltip_chromecast_off")),Ur=v(()=>O()?at("tooltip_autoplay_on"):at("tooltip_autoplay_off")),xt=K(0),Ct=ci({}),lo=ci({}),Xi=v(()=>Xt.prevButton),zi=v(()=>Xt.replayButton),yn=v(()=>Xt.playButton),$o=v(()=>Xt.nextButton),Dn=v(()=>Xt.playPrevChapterButton),mi=v(()=>Xt.seekToInteractiveButton),zr=v(()=>Xt.interactiveGraphButton),xn=v(()=>Xt.liveButton),Oo=v(()=>Xt.time),yr=v(()=>Xt.episodes),nr=v(()=>Xt.vkLogo),xr=v(()=>Xt.volume),wn=v(()=>Xt.subtitles),an=v(()=>Xt.settings),Wr=v(()=>Xt.context),ln=v(()=>Xt.fullscreen),ns=v(()=>Xt.chromecast),Qe=v(()=>({prevButton:D()?D().right-D().left:0,replayButton:U()?U().right-U().left:0,playButton:z()?z().right-z().left:0,nextButton:G()?G().right-G().left:0,playPrevChapterButton:le()?le().right-le().left:0,seekToInteractiveButton:Y()?Y().right-Y().left:0,interactiveGraphButton:re()?re().right-re().left:0,liveButton:X()?X().right-X().left:0,time:we()?we().right-we().left:0,episodes:ce()?ce().right-ce().left:0,vkLogo:ne()?ne().right-ne().left:0,volume:he()?he().right-he().left:0,subtitles:xe()?xe().right-xe().left:0,settings:Z()?Z().right-Z().left:0,context:Ne()?Ne().right-Ne().left:0,fullscreen:ue()?ue().right-ue().left:0,chromecast:A()?A().right-A().left:0,additionalButtons:Ke().length?Ke().reduce(dt=>[...dt,40],[]):[]})),Lt=K(0);De(()=>{(!n(Lt)||n(Lt)<n(Qe).time)&&Pt(()=>N(Lt,n(Qe).time,!0))});let $i=K(!1);De(()=>{let dt=0;n(Ui)&&(eo(u(),"xl")?dt=n(Qe).time:dt=60);let ft=n(Qe).prevButton+n(Qe).playButton+n(Qe).nextButton+n(Qe).seekToInteractiveButton+n(Qe).interactiveGraphButton+n(Qe).liveButton+n(Lt)+dt;N($i,n(Mo)&&n(xt)>=ft,!0)});let So=v(()=>n($i)&&eo(u(),"m")),To=db(Gl,260),Do=db(ep,260);De(()=>{Ce(),j(),ie(),To(Fi(),Xt,Ct,e.showControls),Do(Fi(),kt,lo,e.showControls)}),De(()=>{lo.bottom=Ot()});let co=ae();De(()=>{Oe(),Be()&&Pt(()=>Bl(Be(),Oe(),oi))});let Vi;De(()=>{fe(),Pt(()=>Zu(W,fe(),Vi))});function Bo(){sa({isAudioDisabled:bi,isAudioAvailable:ee(),isAds:St(),audioIsNotExistHintCallback:Je,audioDisabledHintCallback:We})&&It()}let Fo=Hi?vr:Ve,yo=v(()=>Se()!==null),Ho=v(()=>n(yo)?Se():n(os)),dn=v(()=>n(Ho)?at("tooltip_pause"):at("tooltip_play")),wr=at("tooltip_episodes"),Sr=v(()=>{var dt,ft,Ki,Wo;return n(Dr)?{id:"prevButton",type:"desktop-control-panel-left",weight:Ns.prevButton,buttonComponent:Ka,buttonComponentProps:{disabled:!e.prevButtonActive,type:"prev",click:no.bind(null,!0)},tooltipEnabled:!((ft=(dt=J.callbacks)==null?void 0:dt.uiInfo)!=null&&ft.onPrevButtonMouseEnter)&&!((Wo=(Ki=J.callbacks)==null?void 0:Ki.uiInfo)!=null&&Wo.onPrevButtonMouseLeave),mouseEnter:()=>{var qi,yi,Ri;(Ri=(yi=(qi=J.callbacks)==null?void 0:qi.uiInfo)==null?void 0:yi.onPrevButtonMouseEnter)==null||Ri.call(yi,Gn(Fi(),Ct,"prevButton",e.showControls))},mouseLeave:()=>{var qi,yi,Ri;(Ri=(yi=(qi=J.callbacks)==null?void 0:qi.uiInfo)==null?void 0:yi.onPrevButtonMouseLeave)==null||Ri.call(yi,Gn(Fi(),Ct,"prevButton",e.showControls))},tooltipText:at("tooltip_previous"),disabled:!e.prevButtonActive}:void 0}),Tr=v(()=>n(_r)?{id:"replayButton",type:"desktop-control-panel-left",weight:Ns.replayButton,buttonComponent:Yl,buttonComponentProps:{disabled:n(Vn),click:Fo},tooltipText:at("tooltip_restart"),disabled:n(Vn)}:void 0),rs=v(()=>n(Jn)?{id:"playButton",type:"desktop-control-panel-left",weight:Ns.playButton,buttonComponent:jl,buttonComponentProps:{disabled:n(Zn),isPlaying:n(os),click:Ve},tooltipText:n(dn),disabled:n(Zn)}:void 0),ss=v(()=>{var dt,ft,Ki,Wo;return n(so)?{id:"nextButton",type:"desktop-control-panel-left",weight:Ns.nextButton,buttonComponent:Ka,buttonComponentProps:{disabled:!e.nextButtonActive,type:"next",click:bo.bind(null,!0)},tooltipEnabled:!((ft=(dt=J.callbacks)==null?void 0:dt.uiInfo)!=null&&ft.onNextButtonMouseEnter)&&!((Wo=(Ki=J.callbacks)==null?void 0:Ki.uiInfo)!=null&&Wo.onNextButtonMouseLeave),mouseEnter:()=>{var qi,yi,Ri;(Ri=(yi=(qi=J.callbacks)==null?void 0:qi.uiInfo)==null?void 0:yi.onNextButtonMouseEnter)==null||Ri.call(yi,Gn(Fi(),Ct,"nextButton",e.showControls))},mouseLeave:()=>{var qi,yi,Ri;(Ri=(yi=(qi=J.callbacks)==null?void 0:qi.uiInfo)==null?void 0:yi.onNextButtonMouseLeave)==null||Ri.call(yi,Gn(Fi(),Ct,"nextButton",e.showControls))},tooltipText:at("tooltip_next"),disabled:!e.nextButtonActive}:void 0}),Xe=v(()=>Hi&&n(tr)?{id:"playPrevChapterButton",type:"desktop-control-panel-left",weight:Ns.playPrevChapterButton,buttonComponent:lc,buttonComponentProps:{disabled:n(Nr),click:e.playPrevChapter},tooltipText:at("tooltip_interactive_go_back"),disabledTooltipContent:at(ys),disabled:n(Nr)}:void 0),zt=v(()=>Hi&&n(Vo)?{id:"seekToInteractiveButton",type:"desktop-control-panel-left",weight:Ns.seekToInteractiveButton,buttonComponent:cc,buttonComponentProps:{disabled:n(rn),click:e.seekToInteractive},tooltipText:at("tooltip_interactive_seek"),disabled:n(rn),disabledTooltipContent:at(Fe())}:void 0),Si=v(()=>Hi&&n(sn)?{id:"interactiveGraphButton",type:"desktop-control-panel-left",weight:Ns.interactiveGraphButton,buttonComponent:uc,buttonComponentProps:{disabled:n(Lo),click:is.toggle,graphIsOpened:R()},tooltipText:n(ir)}:void 0),Uo=v(()=>n(Rn)?{id:"liveButton",type:"desktop-control-panel-left",weight:Ns.liveButton,buttonComponent:pc,buttonComponentProps:{isLiveActive:n(Ro),ariaLabel:n(Nn)},tooltipText:n(Nn),disabled:n(Ro)&&l()===Om.PLAYING}:void 0),uo=v(()=>[n(Sr),n(Tr),n(rs),n(ss),n(Xe),n(zt),n(Si),n(Uo)].filter(dt=>!!dt).sort(Ba)),Cr=v(()=>n($n)?{id:"vkLogo",type:"desktop-control-panel-right",weight:Ds.vkLogo,buttonComponent:Jd,buttonComponentProps:{targetUrl:Jt(),logoClickable:e.logoClickable,click:st},tooltipText:n(No),disabledTooltipContent:"",disabled:!e.logoClickable}:void 0),cn=v(()=>n(ti)?{id:"autoplayNext",type:"desktop-control-panel-right",weight:Ds.autoplayNext,buttonComponent:dc,tooltipText:n(Ur)}:void 0),Ir=v(()=>({id:"volume",type:"desktop-control-panel-right",weight:Ds.volume,buttonComponent:dm,buttonComponentProps:{click:Bo,isAds:St()}})),Fs=v(()=>n(er)?{id:"subtitles",type:"desktop-control-panel-right",weight:Ds.subtitles,buttonComponent:nm,buttonComponentProps:{isSubtitlesEnabled:n(hr),click:mt},tooltipText:n(Hr)}:void 0),Sn=v(()=>n(Br)?{id:"settings",type:"desktop-control-panel-right",weight:Ds.settings,buttonComponent:zl,buttonComponentProps:{ref$:co},tooltipText:Oe()?void 0:at("tooltip_settings_off")}:void 0),Hs=v(()=>Pe.features.contextMenuButton?{id:"context",type:"desktop-control-panel-right",weight:Ds.context,buttonComponent:xm,buttonComponentProps:{ariaLabel:at("aria_label_context_menu")},className:n(br)?"":"out-of-view",tooltipText:n(Fr)}:void 0),rr=v(()=>n($r)?{id:"fullscreen",type:"desktop-control-panel-right",weight:Ds.fullscreen,buttonComponent:Zd,buttonComponentProps:{isFullscreen:P(),click:e.toggleFullscreen},tooltipText:n(or)}:void 0),as=v(()=>n(vt)?{id:"chromecast",type:"desktop-control-panel-right",weight:Ds.chromecast,buttonComponent:tc,buttonComponentProps:{state:m(),click:Or},tooltipText:n(On)}:void 0),ut=v(()=>[n(Cr),n(cn),n(Ir),n(Fs),n(Sn),n(Hs),n(rr),n(as),...Ke()].filter(dt=>!!dt).sort(Ba)),fi=J.ui.previewTrackActive,zo=J.ui.previewTrackDragInProgress,me=J.ui.previewTrackAvailable,pt=J.ui.isPreviewTrackHorizontallyAligned,Zt=v(()=>sb({onPreviewTrackOpened:J.actions.internal.previewTrackOpened,getTimelineRef:()=>Ct.timeline,isHorizontal:qe()})),Ti=v(()=>n(Zt).progressBarY),Wi=v(()=>n(Zt).controlsY),ni=v(()=>n(Zt).onPointerDown),ii=v(()=>n(Zt).onPointerMove),po=v(()=>n(Zt).onPointerUp),Bn=v(()=>n(Zt).calculatedHeight),Fn=v(()=>n(Zt).closePreviewTrack);De(()=>{ie()?di.set(!1):n(Fn)()});let Ai;Nt(()=>()=>Ai&&clearTimeout(Ai));let ed=dt=>{ie()||!Ye()||(n(ni)(dt),Ai=setTimeout(()=>{J.actions.internal.previewTrackDragStarted()},200))},il=()=>{ie()||n(po)(),Ai&&clearTimeout(Ai),Te()&&J.actions.internal.previewTrackDragFinished()},Us=dt=>{n(ii)(dt),!ie()&&Ye()&&!ie()&&di.set(!0)},ca=()=>{di.set(!1)};var ua=aS(),un=de(ua);let ol;var pa=T(un);{var Kr=dt=>{let ft=v(()=>n(Ti)()),Ki=v(()=>n(Bn)());Nm(dt,{get animatedOffsetY(){return n(ft)},get animatedPreviewTrackHeight(){return n(Ki)},get canRewindLive(){return e.canRewindLive},get isAds(){return St()},onTimelineMove:Us,onTimelinePointerDown:ed,onTimelinePointerUp:il,onTimelinePointerLeave:ca,get previewTrackAvailable(){return Ye()},get timelineRef(){return Ct.timeline},set timelineRef(Wo){Ct.timeline=Wo}})};V(pa,dt=>{e.showControls&&dt(Kr)})}var ls=k(pa,2),zs=T(ls),fa=T(zs);wi(fa,17,()=>n(uo),dt=>dt.id,(dt,ft)=>{Ju(dt,{get buttonComponent(){return n(ft).buttonComponent},get buttonComponentProps(){return n(ft).buttonComponentProps},get tooltipText(){return n(ft).tooltipText},get disabledTooltipContent(){return n(ft).disabledTooltipContent},get disabled(){return n(ft).disabled},get className(){return n(ft).className},get tooltipEnabled(){return n(ft).tooltipEnabled},get mouseEnter(){return n(ft).mouseEnter},get mouseLeave(){return n(ft).mouseLeave},get tooltipVisible(){return e.showControls},get ref(){return Ct[n(ft).id]},set ref(Ki){Ct[n(ft).id]=Ki}})});var nl=k(fa,2);{var rl=dt=>{let ft=v(()=>!e.showControls),Ki=v(()=>St()?Me():ze()),Wo=v(()=>St()?Vt():et());jd(dt,{get isHidden(){return n(ft)},isMobile:!1,get showDuration(){return n(So)},get position(){return n(Ki)},get duration(){return n(Wo)},get ref(){return Ct.time},set ref(qi){Ct.time=qi}})};V(nl,dt=>{n(Mo)&&dt(rl)})}var td=k(nl,2);let sl=v(()=>!n(Ui));Ao(td,{className:"w-max",get disabled(){return n(sl)},get tooltipContent(){return wr},get tooltipVisible(){return e.showControls},get ref(){return Ct.episodes},set ref(dt){Ct.episodes=dt},children:(dt,ft)=>{var Ki=Le(),Wo=de(Ki);{var qi=yi=>{ic(yi,{get position(){return ze()},get duration(){return et()},get timeCodes(){return bt}})};V(Wo,yi=>{n(Ui)&&yi(qi)})}_(dt,Ki)},$$slots:{default:!0}}),w(zs);var al=k(zs,2);wi(al,21,()=>n(ut),dt=>dt.id,(dt,ft)=>{var Ki=Le(),Wo=de(Ki);{var qi=Ri=>{Ju(Ri,{get buttonComponent(){return n(ft).buttonComponent},get buttonComponentProps(){return n(ft).buttonComponentProps},get tooltipText(){return n(ft).tooltipText},get disabledTooltipContent(){return n(ft).disabledTooltipContent},get disabled(){return n(ft).disabled},get className(){return n(ft).className},get tooltipVisible(){return e.showControls},get ref(){return Ct[n(ft).id]},set ref(va){Ct[n(ft).id]=va}})},yi=Ri=>{let va=v(()=>!!n(ft).disabled);Cm(Ri,{get id(){return n(ft).id},get testId(){return n(ft).testId},get icon(){return n(ft).icon},get ariaLabel(){return n(ft).ariaLabel},get tooltipText(){return n(ft).tooltipText},get disabledTooltipContent(){return n(ft).disabledTooltipContent},get disabled(){return n(va)},get onClick(){return n(ft).onClick},get disableMouseupTooltipShow(){return n(ft).disableMouseupTooltipShow},get tooltipVisible(){return e.showControls},get ref(){return Ct[n(ft).id]},set ref(dl){Ct[n(ft).id]=dl}})};V(Wo,Ri=>{ob(n(ft))?Ri(qi):Ri(yi,!1)})}_(dt,Ki)}),w(al),w(ls),ot(ls,dt=>qt(dt),()=>qt()),w(un),ot(un,dt=>Ot(dt),()=>Ot());var Er=k(un,2);{var id=dt=>{sc(dt,{get ref(){return Ct.interactiveTimeIndicator},set ref(ft){Ct.interactiveTimeIndicator=ft}})};V(Er,dt=>{Rr&&dt(id)})}B((dt,ft)=>{ol=se(un,1,"wrapper-bottom s-1e",null,ol,dt),Ge(ls,ft),ls.inert=ie()},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth||Te()}),()=>`transform: translateY(${n(Wi)()}px);`]),An(zs,"clientWidth",dt=>N(xt,dt)),_(t,ua),H(),o()}import{ChromecastState as ub,PlaybackState as pb}from"@vkontakte/videoplayer-core/es2015";import{noop as cb}from"@vkontakte/videoplayer-shared/es2015";var dS=L('<div class="icon icon-error-stub s-20"><div class="inner s-20"></div></div>'),cS=L('<img class="icon s-20" aria-hidden="true"/>'),uS={hash:"s-20",code:".icon.s-20{height:24px!important;width:24px!important}.inner.s-20{background-color:var(--white);height:16px;width:16px}"};function Bm(t,e){q(t,uS);let i=g(e,"disabled",3,!1),o=g(e,"onClick",3,cb),r=v(()=>o()===cb),a=v(()=>n(r)||i()),l=K(!1),d=()=>{N(l,!0)},s=v(()=>n(r)?"btn-full-opacity":"");Ut(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,p)=>{var m=Le(),f=de(m);{var b=$=>{var S=dS();_($,S)},y=$=>{var S=cS();B(()=>Ue(S,"src",e.iconUrl)),_t("error",S,d),Pa(S),_($,S)};V(f,$=>{n(l)?$(b):$(y,!1)})}_(u,m)},$$slots:{default:!0}})}var pS=Ee('<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 Fm(t){Ze(t,{testId:"muted-icon",children:(e,i)=>{var o=pS();_(e,o)},$$slots:{default:!0}})}import{noop as fS}from"@vkontakte/videoplayer-shared/es2015";function tp(t,e){F(e,!0);let i=g(e,"muted",3,!1),o=g(e,"click",3,fS),r=g(e,"ref",15,void 0),l=ve().ui.t,d=v(()=>i()?l("tooltip_volume"):l("tooltip_volume_muted")),s=v(()=>i()?"btn-mobile-muted":"btn-mobile-unmuted");Ut(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,p)=>{var m=Le(),f=de(m);{var b=$=>{Fm($,{})},y=$=>{la($,{get size(){return"24"}})};V(f,$=>{i()?$(b):$(y,!1)})}_(u,m)},$$slots:{default:!0}}),H()}var mS=Ee('<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>'),vS=Ee('<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>'),gS=Ee('<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 Hm(t,e){let i=g(e,"isActive",3,!1),o=v(()=>i()?"pip-icon--active":"pip-icon");Ze(t,{get testId(){return n(o)},children:(r,a)=>{var l=gS(),d=k(de(l));{var s=p=>{var m=mS();_(p,m)},u=p=>{var m=vS();_(p,m)};V(d,p=>{i()?p(s):p(u,!1)})}_(r,l)},$$slots:{default:!0}})}import{noop as hS}from"@vkontakte/videoplayer-shared/es2015";function Um(t,e){F(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"isPictureInPictureActive",3,!1),r=g(e,"click",3,hS),a=Q("menu_pip");Ut(t,{testId:"btn-pip",get ariaLabel(){return a},get click(){return r()},get ref(){return i()},set ref(l){i(l)},children:(l,d)=>{Hm(l,{get isActive(){return o()}})},$$slots:{default:!0}}),H()}import{debounceFn as fb}from"@vkontakte/videoplayer-shared/es2015";var _S=(t,e,i,o)=>{n(e)&&i.onDisabledPlayPrevChapterClick(n(o))},bS=(t,e,i,o)=>{n(e)&&i.onDisabledSeekToInteractiveClick(n(o))},$S=L("<div><!></div>"),yS=L("<div><!></div>"),xS=L("<div><!></div>"),wS=L("<!> <!> <!>",1),SS=L("<div></div> <div></div> <div><!> <!> <!> <!> <!> <!></div> <div><!> <!> <!> <!></div> <!>",1),TS=L('<div class="wrapper-middle s-1d"><!></div>'),CS=L("<div><!></div> <!> <div><!></div>",1),IS=L('<div aria-hidden="true">·</div> <!>',1),ES=L('<!> <!> <div><div><div class="controls mobile s-1d"><div class="controls-group contain s-1d"><!> <!> <!> <!></div> <div class="controls-group s-1d"><!> <!> <!></div></div> <!></div></div> <!>',1),PS={hash:"s-1d",code:".wrapper-bottom.s-1d{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-1d>:where(.s-1d){pointer-events:auto}.wrapper-bottom.ads-timeline-mobile.s-1d{height:9px;padding:0 4px 4px}.wrapper-middle.s-1d{align-items:center;left:50%;top:50%;transform:translate(-50%,-50%)}.wrapper-middle.s-1d,.wrapper-top-right.s-1d{display:flex;position:absolute;transition:opacity var(--controls-transition-duration);z-index:var(--controls-container-z-index)}.wrapper-top-right.s-1d{right:8px;top:4px}.wrapper-top-left.s-1d{left:8px;position:absolute;top:4px;z-index:var(--controls-container-z-index)}.wrapper-middle-left.s-1d,.wrapper-middle-left-second.s-1d,.wrapper-middle-right.s-1d{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-1d{left:12px}.wrapper-middle-left-second.s-1d{left:64px}.wrapper-middle-right.s-1d{right:12px}.controls.s-1d{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-1d,.controls-group.s-1d{display:flex}.controls-group.contain.s-1d{min-width:0}.controls-group.s-1d >:not(:first-child){margin-left:8px}.hidden.s-1d{opacity:0;visibility:hidden}.controls-hidden.s-1d{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-1d{transition:none}.overlay-mobile.s-1d{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-1d,.wrapper-top-right.fullscreen.s-1d{top:16px}.controls-wrapper.fullscreen.s-1d{bottom:30px;position:absolute;width:calc(100% - 8px)}}@media screen and (orientation:landscape){.wrapper-top-left.fullscreen.s-1d{left:44px;top:12px}.wrapper-top-right.fullscreen.s-1d{right:44px;top:12px}.wrapper-middle-left.fullscreen.s-1d{left:44px}.wrapper-middle-left-second.fullscreen.s-1d{left:96px}.wrapper-middle-right.fullscreen.s-1d{right:44px}.controls-wrapper.fullscreen.s-1d{bottom:32px;left:36px;position:absolute;right:36px;width:calc(100% - 72px)}}"};function zm(t,e){var ln,ns;F(e,!0),q(t,PS);let[i,o]=Re(),r=()=>x(Mi,"$seekToInteractiveDisabledTooltip$",i),a=()=>x(Xt,"$disabledControls$",i),l=()=>x(Dt,"$playbackState$",i),d=()=>x(Jo,"$adPlaybackState",i),s=()=>x(J,"$isEnded$",i),u=()=>x(Et,"$playerSize",i),p=()=>x(mt,"$scrubbingInProgress",i),m=()=>x(wt,"$chromecastState$",i),f=()=>x(Je,"$isPictureInPictureActive",i),b=()=>x(We,"$pictureInPictureType$",i),y=()=>x(be,"$mobileNotReportControlHidden$",i),$=()=>x(ct,"$chromecastHidden",i),S=()=>x(qt,"$playerPhase",i),C=()=>x(ho,"$pipHidden",i),I=()=>x(je,"$currentGridType$",i),R=()=>x(bi,"$vkLogoHidden",i),E=()=>x(gi,"$volumeHidden",i),P=()=>x(ye,"$isLive$",i),O=()=>x(nt,"$settingsMenuVisible",i),D=()=>x(st,"$isRewindableLive$",i),U=()=>x(Ve,"$isActiveLive$",i),z=()=>x($e,"$isAudioAvailable$",i),G=()=>x(It,"$muted$",i),le=()=>x(Pe,"$volume$",i),Y=()=>x(at,"$isInteractiveTime$",i),re=()=>x(Vo,"$settingButtonRef$",i),X=()=>x(bt,"$startedByKeyboard$",i),we=()=>x(_n,"$isFullscreen",i),ce=()=>x(Bt,"$additionalButtons$",i),ne=()=>x(io,"$autoplayNextToggleHidden",i),he=()=>x(oi,"$crashed$",i),xe=()=>x(pi,"$settingsHidden",i),Z=()=>x(en,"$graphIsOpened$",i),Ne=()=>x(oo,"$adPosition",i),ue=()=>x(xi,"$adDuration",i),A=()=>x(Jt,"$position$",i),Ke=()=>x(St,"$duration$",i),Ce=g(e,"playerControlsWrapperRef",15,void 0),j=g(e,"playerControlsRef",15,void 0),ie=g(e,"isAds",3,!1),Oe=g(e,"logoTargetUrl",3,""),Be=g(e,"isOneVideoPlaylist",3,!1),fe=g(e,"customFullscreenSupported",3,!0),ee=ve(),Se=wo(),Fe=Mt(),qe=ee.actions.internal.toggleMuted,Ye=ee.actions.internal.togglePlay,Te=ee.actions.internal.pause,Me=ee.actions.internal.prevVideoClick,ze=ee.actions.internal.nextVideoClick,Vt=ee.actions.internal.checkFullscreenSupport,et=(ln=ee.callbacks)==null?void 0:ln.onAudioDoesNotExistHint,Ot=(ns=ee.callbacks)==null?void 0:ns.onAudioDisabledHint,qt=ee.playerPhase,St=ee.state.duration$,Jt=ee.state.positionWithScrubbing$,Dt=ee.state.playbackState$,$e=ee.state.isAudioAvailable$,_e=ee.state.isAudioDisabled,J=ee.state.isEnded$,ye=ee.state.isLive$,Pe=ee.state.volume$,It=ee.state.muted$,Ve=ee.state.isActiveLive$,st=ee.state.isRewindableLive$,mt=ee.ui.scrubbingInProgress,be=ee.ui.mobileNotReportControlHidden$,{isActive$:Je,type$:We}=Se.pictureInPicture$,nt=ee.ui.settingsMenu.visible$,ei=ee.ui.settingsMenu.openedByBtnKeyboard$,li=ee.ui.controls,{volume:gi,vkLogo:bi,autoplayNextToggle:io,pip:ho,settings:pi,chromecast:ct}=ee.ui.hiddenControls,Pi=ee.actions.internal.getVideoEpisodes(),jt=ee.webApi.pictureInPictureApi,wt=ee.state.chromecastState$,oi=ee.state.crashed$,Xt=li.disabledControls$,bt=ee.ui.startedByKeyboard$,je=ee.ui.currentGridType$,xi=ee.ads.duration,oo=ee.ads.position,Jo=ee.ads.playbackState,_n=ee.ui.isFullscreen,Et=ee.ui.playerSize,Bt=ee.ui.additionalButtonsDeprecated$,W=ee.actions.internal.getVideoElement,kt=ee.actions.internal.replayInteractive,di=ee.state.isInteractive,at=ee.state.isInteractiveTime$,Tt=ee.state.showInteractiveGraph,Gt=ee.state.showSeekToInteractive,lt=ee.state.showPlayPrevChapter,Li=ee.state.showInteractiveTimeIndicator,Mi=Se.seekToInteractiveDisabledTooltip$,en=Se.graphIsOpened$,ko=ee.ui.controlBlocks,_o=v(()=>Q(ee.state.playPrevChapterDisabledTooltip)),Fi=v(()=>Q(r())),vr=v(()=>a().has("EPISODE_BUTTON")),no=v(()=>a().has("GRAPH_BUTTON")),bo=v(()=>a().has("SEEK_TO_INTERACTIVE_BUTTON")),Hi=v(()=>a().has("PLAY_BUTTON")),tn=v(()=>a().has("REPLAY_BUTTON")),on=v(()=>a().has("PLAY_PREV_CHAPTER_BUTTON")),jn=v(()=>l()===pb.PLAYING),gr=v(()=>d()==="paused"),Rr=v(()=>s()&&!ie()&&!di),ys=v(()=>!s()||ie()),ts=v(()=>e.showNextPrevButtons&&!ie()&&e.prevButtonActive),is=v(()=>e.showNextPrevButtons&&!ie()&&e.nextButtonActive),Xn=v(()=>u().width>300),nn=v(()=>u().width>400),Lo=v(p),rn=v(()=>m()!==ub.NOT_AVAILABLE&&!(f()&&b()===1)&&!y()&&!di&&!$()),Zn=v(()=>S()==="LiveWaitingStart"),Vn=v(()=>!!jt&&m()!==ub.CONNECTED&&!y()&&(b()===1&&n(Zn)||!n(Zn))&&!n(Lo)&&!di&&!C()),Nr=K(!1);Nt(()=>{let Qe=jt==null?void 0:jt.info.isActive$.subscribe(Lt=>N(Nr,Lt,!0));return()=>Qe==null?void 0:Qe.unsubscribe()});let Or=v(()=>!n(Lo)&&eo(I(),"s")),os=v(()=>!e.logoHidden&&u().width>350&&!R()),hr=v(()=>Fe.features.fullscreen&&Vt()&&!(f()&&b()===1)&&(di?fe():!0)&&!n(Lo)&&!n(Nr)),ro=v(()=>!E()&&!n(Lo)),_r=v(()=>(!P()||ie())&&u().width>260&&!n(Lo)&&!(Fe.features.interactiveHideTime&&di)),Jn=v(()=>O()||e.showControls),bn=v(()=>!ie()&&!P()&&!!(Pi!=null&&Pi.length)&&n(Xn)&&!n(vr)&&!n(Lo)),so=v(()=>!D()||!!U()),Dr=v(()=>Tt&&eo(I(),"m")),Rn=v(()=>!z()||G()||le()===0),vt=ci({}),ti=ci({}),er=fb(Gl,260),br=fb(ep,260);De(()=>{u(),Y(),er(W(),li,vt,e.showControls),br(W(),ko,ti,e.showControls)});let Br=()=>ee.actions.internal.toggleChromecast();function $n(){return gt(this,null,function*(){jt!=null&&jt.isActive()?yield jt==null?void 0:jt.exit():yield jt==null?void 0:jt.request()})}function $r(){sa({isAudioDisabled:_e,audioDisabledHintCallback:Ot,isAudioAvailable:z(),audioIsNotExistHintCallback:et,isAds:ie()})&&qe()}let Mo=K(""),sn=(Qe,Lt)=>{if(!Qe){N(Mo,Q("tooltip_live"),!0);return}Lt&&Lt===pb.PAUSED&&N(Mo,Q("tooltip_play"),!0)};De(()=>{sn(n(so),l())});let Vo=ae();De(()=>{re()&&Bl(re(),O(),ei)}),De(()=>{Zu(bt,X(),vt.playButton)});var tr=ES(),Ui=de(tr);{var Ro=Qe=>{var Lt=SS(),$i=de(Lt);let So;var To=k($i,2);let Do;ot(To,ut=>ti.topLeft=ut,()=>ti==null?void 0:ti.topLeft);var co=k(To,2);let Vi;var Bo=T(co);wi(Bo,1,ce,({iconUrl:ut,ariaLabel:fi,testId:zo,onClick:me,tooltip:pt})=>ut,(ut,fi)=>{let zo=()=>n(fi).iconUrl,me=()=>n(fi).ariaLabel,pt=()=>n(fi).testId,Zt=()=>n(fi).onClick,Ti=()=>n(fi).tooltip,Wi=v(()=>{var ni;return(ni=me())!=null?ni:Ti()});Bm(ut,{get iconUrl(){return zo()},get ariaLabel(){return n(Wi)},get testId(){return pt()},get onClick(){return Zt()}})});var Fo=k(Bo,2);{var yo=ut=>{dc(ut,{get ref(){return vt.autoplayNextToggle},set ref(fi){vt.autoplayNextToggle=fi}})};V(Fo,ut=>{e.showAutoplayNext&&!Be()&&!ne()&&ut(yo)})}var Ho=k(Fo,2);{var dn=ut=>{tc(ut,{isMobile:!0,click:Br,get state(){return m()},get ref(){return vt.chromecast},set ref(fi){vt.chromecast=fi}})};V(Ho,ut=>{n(rn)&&ut(dn)})}var wr=k(Ho,2);{var Sr=ut=>{Um(ut,{click:$n,get isPictureInPictureActive(){return f()},get ref(){return vt.pip},set ref(fi){vt.pip=fi}})};V(wr,ut=>{n(Vn)&&ut(Sr)})}var Tr=k(wr,2);{var rs=ut=>{zl(ut,{get ref$(){return Vo}})};V(Tr,ut=>{he()&&!xe()&&ut(rs)})}var ss=k(Tr,2);{var Xe=ut=>{Jd(ut,{get click(){return Te},get targetUrl(){return Oe()},get logoClickable(){return e.logoClickable},get ref(){return vt.vkLogo},set ref(fi){vt.vkLogo=fi}})};V(ss,ut=>{n(os)&&ut(Xe)})}w(co),ot(co,ut=>ti.topRight=ut,()=>ti==null?void 0:ti.topRight);var zt=k(co,2);let Si;var Uo=T(zt);{var uo=ut=>{let fi=v(()=>Me.bind(null,!0));Ka(ut,{get click(){return n(fi)},type:"prev",isMobile:!0,get ref(){return vt.prevButton},set ref(zo){vt.prevButton=zo}})};V(Uo,ut=>{n(ts)&&ut(uo)})}var Cr=k(Uo,2);{var cn=ut=>{jl(ut,{get disabled(){return n(Hi)},get click(){return Ye},isMobile:!0,get isPlaying(){return n(jn)},get ref(){return vt.playButton},set ref(fi){vt.playButton=fi}})};V(Cr,ut=>{n(ys)&&ut(cn)})}var Ir=k(Cr,2);{var Fs=ut=>{Yl(ut,{get disabled(){return n(tn)},get click(){return Ye},isMobile:!0,get ref(){return vt.replayButton},set ref(fi){vt.replayButton=fi}})};V(Ir,ut=>{n(Rr)&&ut(Fs)})}var Sn=k(Ir,2);{var Hs=ut=>{let fi=v(()=>ze.bind(null,!0));Ka(ut,{get click(){return n(fi)},type:"next",isMobile:!0,get ref(){return vt.nextButton},set ref(zo){vt.nextButton=zo}})};V(Sn,ut=>{n(is)&&ut(Hs)})}w(zt),ot(zt,ut=>ti.middle=ut,()=>ti==null?void 0:ti.middle);var rr=k(zt,2);{var as=ut=>{var fi=wS(),zo=de(fi);{var me=ni=>{var ii=$S();let po;ii.__click=[_S,on,e,_o];var Bn=T(ii);let Fn=v(()=>!e.showControls);lc(Bn,{get hidden(){return n(Fn)},get disabled(){return n(on)},get click(){return e.playPrevChapter},get ref(){return vt.playPrevChapterButton},set ref(Ai){vt.playPrevChapterButton=Ai}}),w(ii),B(Ai=>po=se(ii,1,"wrapper-middle-left s-1d",null,po,Ai),[()=>({fullscreen:we(),hidden:!e.showControls})]),_(ni,ii)};V(zo,ni=>{lt&&ni(me)})}var pt=k(zo,2);{var Zt=ni=>{var ii=yS();let po;var Bn=T(ii);let Fn=v(()=>!e.showControls&&!Z());uc(Bn,{get hidden(){return n(Fn)},get disabled(){return n(no)},get click(){return en.toggle},get graphIsOpened(){return Z()},get ref(){return vt.interactiveGraphButton},set ref(Ai){vt.interactiveGraphButton=Ai}}),w(ii),B(Ai=>po=se(ii,1,Td(lt?"wrapper-middle-left-second":"wrapper-middle-left"),"s-1d",po,Ai),[()=>({fullscreen:we(),hidden:!e.showControls&&!Z()})]),_(ni,ii)};V(pt,ni=>{n(Dr)&&ni(Zt)})}var Ti=k(pt,2);{var Wi=ni=>{var ii=xS();let po;ii.__click=[bS,bo,e,Fi];var Bn=T(ii);let Fn=v(()=>!e.showControls);cc(Bn,{get hidden(){return n(Fn)},get disabled(){return n(bo)},get click(){return e.seekToInteractive},get ref(){return vt.seekToInteractiveButton},set ref(Ai){vt.seekToInteractiveButton=Ai}}),w(ii),B(Ai=>po=se(ii,1,"wrapper-middle-right s-1d",null,po,Ai),[()=>({fullscreen:we(),hidden:!e.showControls})]),_(ni,ii)};V(Ti,ni=>{Gt&&ni(Wi)})}_(ut,fi)};V(rr,ut=>{di&&!p()&&ut(as)})}B((ut,fi,zo,me)=>{So=se($i,1,"overlay-mobile s-1d",null,So,ut),Do=se(To,1,"wrapper-top-left s-1d",null,Do,fi),Vi=se(co,1,"wrapper-top-right s-1d",null,Vi,zo),Si=se(zt,1,"wrapper-middle s-1d",null,Si,me)},[()=>({hidden:!n(Jn)}),()=>({hidden:!e.showControls,fullscreen:we()}),()=>({hidden:!e.showControls&&!y(),fullscreen:we()}),()=>({hidden:!e.showControls||p()||e.endScreenShown&&e.showNextPrevButtons})]),_(Qe,Lt)};V(Ui,Qe=>{ie()||Qe(Ro)})}var ir=k(Ui,2);{var Fr=Qe=>{var Lt=CS(),$i=de(Lt);let So;var To=T($i);tp(To,{get muted(){return G()},click:$r,get ref(){return vt.volume},set ref(yo){vt.volume=yo}}),w($i);var Do=k($i,2);{var co=yo=>{var Ho=TS(),dn=T(Ho);let wr=v(()=>!n(gr));jl(dn,{get disabled(){return n(Hi)},get click(){return Ye},isMobile:!0,get isPlaying(){return n(wr)},get ref(){return vt.playButton},set ref(Sr){vt.playButton=Sr}}),w(Ho),_(yo,Ho)};V(Do,yo=>{n(gr)&&yo(co)})}var Vi=k(Do,2);let Bo;var Fo=T(Vi);fc(Fo,{get position(){return Ne()},get duration(){return ue()}}),w(Vi),B((yo,Ho)=>{So=se($i,1,"wrapper-top-right s-1d",null,So,yo),Bo=se(Vi,1,"wrapper-bottom ads-timeline-mobile s-1d",null,Bo,Ho)},[()=>({fullscreen:we()}),()=>({fullscreen:we()})]),_(Qe,Lt)};V(ir,Qe=>{ie()&&d()!=="inactive"&&Qe(Fr)})}var ao=k(ir,2);let Nn;var No=T(ao);let Hr;var or=T(No),On=T(or),Ur=T(On);{var xt=Qe=>{Ao(Qe,{get disabled(){return n(tn)},get ref(){return vt.replayButton},set ref(Lt){vt.replayButton=Lt},children:(Lt,$i)=>{Yl(Lt,{get disabled(){return n(tn)},get click(){return kt}})},$$slots:{default:!0}})};V(Ur,Qe=>{di&&Qe(xt)})}var Ct=k(Ur,2);{var lo=Qe=>{Ao(Qe,{get ref(){return vt.liveButton},set ref(Lt){vt.liveButton=Lt},children:(Lt,$i)=>{pc(Lt,{get isLiveActive(){return n(so)},isMobile:!0,get ariaLabel(){return n(Mo)}})},$$slots:{default:!0}})};V(Ct,Qe=>{!ie()&&P()&&Qe(lo)})}var Xi=k(Ct,2);{var zi=Qe=>{let Lt=v(()=>ie()?Ne():A()),$i=v(()=>ie()?ue():Ke()),So=v(()=>!e.showControls);jd(Qe,{get showDuration(){return n(nn)},get position(){return n(Lt)},get duration(){return n($i)},isMobile:!0,get isHidden(){return n(So)},get ref(){return vt.time},set ref(To){vt.time=To}})};V(Xi,Qe=>{n(_r)&&Qe(zi)})}var yn=k(Xi,2);let $o=v(()=>!n(bn));Ao(yn,{className:"w-max",get disabled(){return n($o)},get ref(){return vt.episodes},set ref(Qe){vt.episodes=Qe},children:(Qe,Lt)=>{var $i=Le(),So=de($i);{var To=Do=>{var co=IS(),Vi=k(de(co),2);ic(Vi,{get position(){return A()},get duration(){return Ke()},get timeCodes(){return Pi}}),_(Do,co)};V(So,Do=>{n(bn)&&Do(To)})}_(Qe,$i)},$$slots:{default:!0}}),w(On),ot(On,Qe=>ti.bottomLeft=Qe,()=>ti==null?void 0:ti.bottomLeft);var Dn=k(On,2),mi=T(Dn);{var zr=Qe=>{Ao(Qe,{get ref(){return vt.volume},set ref(Lt){vt.volume=Lt},children:(Lt,$i)=>{tp(Lt,{get muted(){return n(Rn)},click:$r})},$$slots:{default:!0}})};V(mi,Qe=>{n(ro)&&Qe(zr)})}var xn=k(mi,2);{var Oo=Qe=>{Ao(Qe,{get ref(){return vt.settings},set ref(Lt){vt.settings=Lt},children:(Lt,$i)=>{zl(Lt,{get ref$(){return Vo}})},$$slots:{default:!0}})};V(xn,Qe=>{n(Or)&&Qe(Oo)})}var yr=k(xn,2);{var nr=Qe=>{Ao(Qe,{get ref(){return vt.fullscreen},set ref(Lt){vt.fullscreen=Lt},children:(Lt,$i)=>{Zd(Lt,{get click(){return e.toggleFullscreen},get isFullscreen(){return we()}})},$$slots:{default:!0}})};V(yr,Qe=>{n(hr)&&Qe(nr)})}w(Dn),ot(Dn,Qe=>ti.bottomRight=Qe,()=>ti==null?void 0:ti.bottomRight),w(or),ot(or,Qe=>j(Qe),()=>j());var xr=k(or,2);let wn=v(()=>!e.showControls);Qa(xr,{get isHidden(){return n(wn)},get isAds(){return ie()},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return D()},get ref(){return vt.timeline},set ref(Qe){vt.timeline=Qe}}),w(No),ot(No,Qe=>ti.bottom=Qe,()=>ti==null?void 0:ti.bottom),w(ao),ot(ao,Qe=>Ce(Qe),()=>Ce());var an=k(ao,2);{var Wr=Qe=>{sc(Qe,{get ref(){return vt.interactiveTimeIndicator},set ref(Lt){vt.interactiveTimeIndicator=Lt}})};V(an,Qe=>{Li&&Qe(Wr)})}B((Qe,Lt)=>{Nn=se(ao,1,"wrapper-bottom mobile s-1d",null,Nn,Qe),Hr=se(No,1,"controls-wrapper s-1d",null,Hr,Lt)},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth}),()=>({fullscreen:we()})]),_(t,tr),H(),o()}rt(["click"]);function mc(t,e){F(e,!0);let[i,o]=Re(),r=()=>x(C,"$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,""),p=g(e,"showAutoplayNext",3,!1),m=g(e,"isOneVideoPlaylist",3,!1),f=g(e,"customFullscreenSupported",3,!0),b=g(e,"endScreenShown",3,!1),y=g(e,"onDisabledPlayPrevChapterClick",3,mb),$=g(e,"onDisabledSeekToInteractiveClick",3,mb),C=ve().ui.isMobile,I=K(!1);Nt(()=>{let O=setTimeout(()=>N(I,!0),0);return()=>clearTimeout(O)});var R=Le(),E=de(R);{var P=O=>{var D=Le(),U=de(D);{var z=le=>{zm(le,{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 p()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get isOneVideoPlaylist(){return m()},get customFullscreenSupported(){return f()},get endScreenShown(){return b()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get onDisabledPlayPrevChapterClick(){return y()},get onDisabledSeekToInteractiveClick(){return $()},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(Y){l(Y)},get playerControlsRef(){return d()},set playerControlsRef(Y){d(Y)}})},G=le=>{Dm(le,{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 m()},get showAutoplayNext(){return p()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get customFullscreenSupported(){return f()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(Y){l(Y)},get playerControlsRef(){return d()},set playerControlsRef(Y){d(Y)}})};V(U,le=>{r()?le(z):le(G,!1)})}_(O,D)};V(E,O=>{n(I)&&O(P)})}_(t,R),H(),o()}var AS=Ee('<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 vc(t,e){F(e,!0);let i=v(()=>e.reversed?"transform:scaleX(-1);transform-origin:50% 0;":""),o=v(()=>`${vn(e.size)}${n(i)}`);Ze(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=AS();_(r,l)},$$slots:{default:!0}}),H()}var kS=Ee('<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 Wm(t,e){F(e,!0);let i=g(e,"reversed",3,!1),o=v(()=>i()?"transform:scaleX(-1);transform-origin: 50% 0;":void 0),r=v(()=>`seek-icon-${i()?"backward":"forward"}`);Ze(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=kS();_(a,d)},$$slots:{default:!0}}),H()}var LS=L('<span class="hot-key-helpers-text s-15"> </span>'),MS=L('<div data-testid="hotkey-helper-icon" class="s-15"><!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <!>',1),VS=L("<div><!></div>"),RS={hash:"s-15",code:'.hot-key-helpers-container.s-15{align-items:center;animation:s-15-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-15{left:calc(25% - 100px)}.hot-key-helpers-container--right.s-15{left:calc(75% - 100px)}.hot-key-helpers-text.s-15{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-15{animation:s-15-fadeOut ease var(--controls-transition-duration);height:0;visibility:hidden;width:0}@keyframes s-15-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes s-15-fadeOut{0%{opacity:1}to{opacity:0}}'};function Km(t,e){F(e,!0),q(t,RS);let[i,o]=Re(),r=()=>x(e.data,"$data",i),a=ve(),{features:l}=Mt(),d=a.ui.t,s=v(()=>!r()),u=v(()=>{var C;return((C=r())==null?void 0:C.type)==="BACKWARD_SEEK"}),p=v(()=>{var C;return((C=r())==null?void 0:C.type)==="FORWARD_SEEK"}),m=v(()=>{var C;return(C=r())==null?void 0:C.type}),f=v(()=>{var C,I;return(C=r())!=null&&C.t?d(r().t.key,{value:r().t.value||""}):(I=r())==null?void 0:I.text});var b=VS();let y;var $=T(b);{var S=C=>{var I=MS(),R=de(I),E=T(R);{var P=j=>{let ie=v(()=>n(m)==="BACKWARD_SEEK");Wm(j,{get reversed(){return n(ie)},shadow:!0})};V(E,j=>{["BACKWARD_SEEK","FORWARD_SEEK"].includes(n(m))&&j(P)})}var O=k(E,2);{var D=j=>{Os(j,{get size(){return"48"},shadow:!0})};V(O,j=>{n(m)==="PAUSE"&&!l.playbackStatusShow&&j(D)})}var U=k(O,2);{var z=j=>{Ln(j,{get size(){return"48"},shadow:!0})};V(U,j=>{n(m)==="PLAY"&&!l.playbackStatusShow&&j(z)})}var G=k(U,2);{var le=j=>{ac(j,{get size(){return"48"},shadow:!0})};V(G,j=>{n(m)==="REPLAY"&&!l.playbackStatusShow&&j(le)})}var Y=k(G,2);{var re=j=>{aa(j,{get size(){return"48"},type:"off",shadow:!0})};V(Y,j=>{n(m)==="SUBTITLES_OFF"&&j(re)})}var X=k(Y,2);{var we=j=>{aa(j,{get size(){return"48"},shadow:!0})};V(X,j=>{n(m)==="SUBTITLES_ON"&&j(we)})}var ce=k(X,2);{var ne=j=>{let ie=v(()=>n(m)==="RATE_DOWN");vc(j,{get size(){return"48"},get reversed(){return n(ie)},testId:"rate-change-icon",shadow:!0})};V(ce,j=>{["RATE_DOWN","RATE_UP"].includes(n(m))&&j(ne)})}var he=k(ce,2);{var xe=j=>{let ie=v(()=>n(m)==="EPISODE_PREV");da(j,{get size(){return"48"},get reversed(){return n(ie)},shadow:!0})};V(he,j=>{["EPISODE_PREV","EPISODE_NEXT"].includes(n(m))&&j(xe)})}var Z=k(he,2);{var Ne=j=>{la(j,{get size(){return"48"},volume:0,shadow:!0})};V(Z,j=>{n(m)==="MUTE"&&j(Ne)})}var ue=k(Z,2);{var A=j=>{la(j,{get size(){return"48"},volume:1,shadow:!0})};V(ue,j=>{n(m)==="VOLUME"&&j(A)})}w(R);var Ke=k(R,2);{var Ce=j=>{var ie=LS(),Oe=T(ie,!0);w(ie),B(()=>pe(Oe,n(f))),_(j,ie)};V(Ke,j=>{n(f)&&j(Ce)})}B(()=>Ue(R,"data-type",n(m))),_(C,I)};V($,C=>{!n(s)&&n(m)&&C(S)})}w(b),B(C=>y=se(b,1,"hot-key-helpers-container s-15",null,y,C),[()=>({hidden:n(s),"hot-key-helpers-container--left":n(u),"hot-key-helpers-container--right":n(p)})]),_(t,b),H(),o()}var NS=(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}},OS=(t,e,i)=>{e.has(t.code)&&(t.preventDefault(),t.stopPropagation(),i())},DS=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>'),BS={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 gc(t,e){F(e,!0),q(t,BS);let i=g(e,"isShifted",3,!1),o=ve(),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),p=Q("aria_label_spherical_control");var m=DS();let f;m.__keydown=[NS,r,a,l,s,d],m.__keyup=[OS,r,u];var b=T(m),y=T(b),$=T(y);$.__mousedown=a,$.__mouseup=u;var S=T($);Mr(S,{direction:"up",useBtnColor:!0}),w($);var C=k($,2);C.__mousedown=d,C.__mouseup=u;var I=T(C);Mr(I,{direction:"up",useBtnColor:!0}),w(C),w(y);var R=k(y,2),E=T(R);E.__mousedown=s,E.__mouseup=u;var P=T(E);Mr(P,{direction:"up",useBtnColor:!0}),w(E);var O=k(E,2);O.__mousedown=l,O.__mouseup=u;var D=T(O);Mr(D,{direction:"up",useBtnColor:!0}),w(O),w(R),w(b),w(m),B(U=>{f=se(m,1,"immersive-controls s-q",null,f,U),Ue(m,"aria-label",p)},[()=>({"m-shifted":i()})]),_t("mouseleave",$,u),_t("mouseleave",C,u),_t("mouseleave",E,u),_t("mouseleave",O,u),_(t,m),H()}rt(["keydown","keyup","mousedown","mouseup"]);import{ValueSubject as gb,Subscription as FS,filterChanged as HS,filter as US}from"@vkontakte/videoplayer-shared/es2015";var vb=(t=1e3)=>{let e=null,i=()=>{e&&(clearTimeout(e),e=null)};return{add:o=>{i(),e=setTimeout(o,t)},clear:i}};var ip=class{constructor(){this.flickeringTimeout=vb(1e3);this.subscriptions=new FS;this.isAuto=!1;this.isLive=!1;this.captions$=new gb([]);this.captionsPrepared$=new gb([])}subscribe(){return this.subscriptions.add(this.captions$.pipe(US(()=>this.isEnabled()),HS()).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 zS=L('<span class="caption-line s-e"><span class="caption-segment s-e"> </span></span>'),WS=L('<span class="caption-line s-e"><span class="caption-segment s-e"></span></span>'),KS=L('<span class="caption-line s-e"><span class="caption-segment s-e"> </span></span>'),qS=L('<div><span class="caption s-e"><!></span></div>'),QS=L("<div><!></div>"),GS={hash:"s-e",code:".subtitles-container.s-e{height:100%;left:0;pointer-events:none;position:absolute;top:0;transition:transform var(--controls-transition-duration);width:100%}.subtitles-container.shifted.s-e{transform:translateY(calc(var(--controls-height)*-1))}.subtitles-container.preview-track-active.s-e{transform:translateY(calc(var(--preview-track-height)*-1))}.preview-track-active.s-e .subtitles-caption:where(.s-e){bottom:var(--preview-track-controls-top-offset)}.subtitles-caption.s-e{bottom:4%;display:flex;justify-content:center;left:4%;position:absolute;right:4%}.subtitles-caption.mobile.s-e{bottom:8%}.subtitles-container.auto.s-e .subtitles-caption:where(.s-e){left:var(--subtitles-caption-margin);right:var(--subtitles-caption-margin)}.caption.s-e{background:rgba(0,0,0,.4);border-radius:4px;display:block;overflow-wrap:normal;padding:4px 8px}.subtitles-container.auto.s-e .caption:where(.s-e){width:100%}.caption-line.s-e{display:block;text-align:center}.subtitles-container.auto.s-e .caption-line:where(.s-e){text-align:left}.caption-segment.s-e{color:var(--white);display:inline-block;font-size:13px;line-height:1.2;white-space:pre-wrap}"};function Ya(t,e){F(e,!0),q(t,GS);let[i,o]=Re(),r=()=>x(f,"$currentSubtitle$",i),a=()=>x(y,"$isLive$",i),l=()=>x($,"$isFullscreen",i),d=()=>x(S,"$previewTrackActive",i),s=()=>x(b,"$isAutoSubtitleCaptionVisible$",i),u=g(e,"isMobile",3,!1),p=ve(),m=Mt(),f=p.state.currentSubtitle$,b=p.state.isAutoSubtitleCaptionVisible$,y=p.state.isLive$,$=p.ui.isFullscreen,S=p.ui.previewTrackActive,C=v(()=>!!r().isAuto),I=v(()=>!!a()),R=v(()=>e.playerSize.width*.02),E=v(()=>u()&&!l()||n(R)<=m.minSubtitlesFontSize?m.minSubtitlesFontSize:n(R)),P=K(null);De(()=>{var Y,re,X;(Y=n(P))==null||Y.setIsAuto(n(C)),(re=n(P))==null||re.setIsLive(n(I)),(X=n(P))==null||X.setCaptions(e.captions)});let O=K(ci([[]]));Nt(()=>{N(P,new ip().subscribe(),!0);let Y=n(P).captionsPrepared$.subscribe(re=>{N(O,re,!0)});return()=>{var re;(re=n(P))==null||re.destroy(),Y.unsubscribe()}}),Nt(()=>{if(n(C)){let Y=window.setTimeout(()=>{b.set(!1)},m.autoSubtitlesTimeout);return()=>{window.clearTimeout(Y)}}else b.set(!1)});let D=v(()=>e.playerSize.width<400?10:e.playerSize.width<550?14:24);var U=QS();let z;var G=T(U);{var le=Y=>{var re=qS();let X;var we=T(re),ce=T(we);{var ne=xe=>{var Z=zS(),Ne=T(Z),ue=T(Ne,!0);w(Ne),w(Z),B(A=>{var Ke;Ge(Ne,`font-size: ${(Ke=n(E))!=null?Ke:""}px`),pe(ue,A)},[()=>Q("subtitles_auto_caption")]),_(xe,Z)},he=(xe,Z)=>{{var Ne=A=>{var Ke=Le(),Ce=de(Ke);wi(Ce,17,()=>n(O),wd,(j,ie)=>{var Oe=WS(),Be=T(Oe);wi(Be,21,()=>n(ie),({value:fe,timeAppeared:ee})=>ee,(fe,ee)=>{let Se=()=>n(ee).value,Fe=()=>n(ee).timeAppeared;var qe=Le(),Ye=de(qe);{var Te=Me=>{var ze=ms();B(()=>pe(ze,Se())),_(Me,ze)};V(Ye,Me=>{(!Fe()||Fe()<=e.position)&&Me(Te)})}_(fe,qe)}),w(Be),w(Oe),B(()=>{var fe;return Ge(Be,`font-size: ${(fe=n(E))!=null?fe:""}px`)}),_(j,Oe)}),_(A,Ke)},ue=A=>{var Ke=Le(),Ce=de(Ke);wi(Ce,17,()=>e.captions,({value:j})=>j,(j,ie)=>{let Oe=()=>n(ie).value;var Be=KS(),fe=T(Be),ee=T(fe,!0);w(fe),w(Be),B(()=>{var Se;Ge(fe,`font-size: ${(Se=n(E))!=null?Se:""}px`),pe(ee,Oe())}),_(j,Be)}),_(A,Ke)};V(xe,A=>{var Ke;n(C)&&((Ke=n(O))!=null&&Ke.length)?A(Ne):A(ue,!1)},Z)}};V(ce,xe=>{n(C)&&s()?xe(ne):xe(he,!1)})}w(we),w(re),B(xe=>{var Z;X=se(re,1,"subtitles-caption s-e",null,X,xe),Ge(re,`--subtitles-caption-margin: ${(Z=n(D))!=null?Z:""}%`)},[()=>({mobile:u()})]),_(Y,re)};V(G,Y=>{var re;(e.captions.length||(re=n(O))!=null&&re.length)&&Y(le)})}w(U),B(Y=>z=se(U,1,"subtitles-container s-e",null,z,Y),[()=>({shifted:e.shifted,"preview-track-active":d(),auto:n(C)&&!n(I)&&!s()})]),_(t,U),H(),o()}import{ChromecastState as YS}from"@vkontakte/videoplayer-core/es2015";var jS=L('<div class="text s-s"> </div>'),XS=L('<div><div class="icon_wrapper s-s"><!></div> <!></div>'),ZS={hash:"s-s",code:".wrapper.s-s{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-s{background-size:cover}.icon_wrapper.s-s{align-items:center;display:flex;flex-direction:column;width:400px}.text.s-s{margin-top:20px}"};function hc(t,e){F(e,!0),q(t,ZS);let i=g(e,"chromecastDeviceName",3,"chromecastDeviceName"),o=Mt();var r=XS();let a;var l=T(r),d=T(l);ec(d,{get size(){return"48"},get iconState(){return YS.CONNECTED}}),w(l);var s=k(l,2);{var u=p=>{var m=jS(),f=T(m);w(m),B(()=>{var b;return pe(f,`Видео воспроизводится на ${(b=i())!=null?b:""}`)}),_(p,m)};V(s,p=>{i()&&p(u)})}w(r),B(p=>{a=se(r,1,"wrapper s-s",null,a,p),Ge(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()}var JS=Ee('<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 qm(t){Ze(t,{width:"200",height:"200",viewBox:"460 190 130 90",testId:"error-icon",children:(e,i)=>{var o=JS();_(e,o)},$$slots:{default:!0}})}var e2=L('<div class="container s-5"><!></div>'),t2={hash:"s-5",code:".container.s-5{align-items:center;background:#000;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}"};function ja(t){q(t,t2);var e=e2(),i=T(e);qm(i,{}),w(e),_(t,e)}var i2=L('<div class="playButton s-b" tabindex="0" role="button"><div class="playButtonBackground s-b"></div> <!></div>'),o2=L("<div><!></div>"),n2={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 Xa(t,e){F(e,!0),q(t,n2);let i=g(e,"iconVisible",3,!0),o=ve(),r=Mt(),a=o.ui.startedByKeyboard$,l=Q("tooltip_play"),d=b=>{var $;let y=b.code;["Enter","Space"].includes(y)&&(b.stopPropagation(),b.preventDefault(),a.set(!0),($=e.startVideo)==null||$.call(e))},s=b=>{var y,$;b.stopPropagation(),(y=e.startVideo)==null||y.call(e),($=e.onClick)==null||$.call(e,b)};var u=o2();let p;u.__click=s,u.__contextmenu=function(...b){var y;(y=e.onContextMenu)==null||y.apply(this,b)};var m=T(u);{var f=b=>{var y=i2();y.__keydown=d;var $=k(T(y),2);Ln($,{get size(){return"48"}}),w(y),B(()=>Ue(y,"aria-label",l)),_(b,y)};V(m,b=>{i()&&b(f)})}return w(u),B(b=>{p=se(u,1,"container s-b",null,p,b),Ge(u,`background-color: #222; background-image: url('${e.thumbUrl||""}')`)},[()=>({hidden:e.hidden,bgCover:r.features.previewNoEmptySpace})]),_(t,u),H({handlePressKey:d,handleClick:s})}rt(["click","contextmenu","keydown"]);var r2=L('<div data-testid="video_title"><span> </span></div>'),s2={hash:"s-12",code:".title.s-12{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;color:var(--white);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}.hidden.s-12{opacity:0;transform:translateY(calc(var(--controls-gradient-height)*-1));visibility:hidden}"};function Qm(t,e){F(e,!0),q(t,s2);let i=g(e,"title",3,""),o=g(e,"isHidden",3,!1),r=g(e,"ref",15),a=K(void 0);Nt(()=>{var m;requestAnimationFrame(()=>{var f;(f=e.onVisibilityChanged)==null||f.call(e,!0)});function p(f){var b;f.propertyName==="transform"&&((b=e.onVisibilityChanged)==null||b.call(e,!o()))}return(m=n(a))==null||m.addEventListener("transitionend",p),()=>{var f;return(f=n(a))==null?void 0:f.removeEventListener("transitionend",p)}});var l=r2();let d;var s=T(l),u=T(s,!0);w(s),ot(s,p=>r(p),()=>r()),w(l),ot(l,p=>N(a,p),()=>n(a)),B(p=>{d=se(l,1,"title s-12",null,d,p),pe(u,i())},[()=>({hidden:o()})]),_(t,l),H()}import{throttleFn as f2}from"@vkontakte/videoplayer-shared/es2015";var a2=L('<div class="timer__cell cell s-1b"><span class="cell__value s-1b"> </span> <span class="cell__unit s-1b"> </span></div> <span class="timer__points s-1b"> </span>',1),l2=L('<div class="timer__cell cell s-1b"><span class="cell__value s-1b"> </span> <span class="cell__unit s-1b"> </span></div> <span class="timer__points s-1b"> </span>',1),d2=L('<div class="timer__cell cell s-1b"><span class="cell__value s-1b"> </span> <span class="cell__unit s-1b"> </span></div> <span class="timer__points s-1b"> </span>',1),c2=L('<div class="timer__cell cell s-1b"><span class="cell__value s-1b"> </span> <span class="cell__unit s-1b"> </span></div>'),u2=L("<div><!> <!> <!> <!></div>"),p2={hash:"s-1b",code:".timer__container.s-1b{align-items:flex-start;display:flex;justify-content:center}.cell.s-1b{align-items:center;display:flex;flex-direction:column}.cell__value.s-1b{font-size:48px;font-weight:600;line-height:1.2}.small.s-1b .cell__value:where(.s-1b){font-size:24px}.cell__unit.s-1b{font-size:14px;font-weight:400;line-height:1.2}.small.s-1b .cell__unit:where(.s-1b){font-size:12px}.timer__points.s-1b{display:inline-block;font-size:42px;font-weight:600;line-height:1.2;margin:0 8px}.small.s-1b .timer__points:where(.s-1b){font-size:20px}"};function Gm(t,e){F(e,!0),q(t,p2);let i=K(""),o=K(""),r=K(""),a=K(""),l,d=32,s=d/2,u=U=>String(U).padStart(2,"0"),p=U=>Math.max(U.length,1),m=U=>`${(e.isSmallSize?s:d)*p(U)}px`,f=U=>{let z=Math.floor(U/86400);z&&(U-=z*86400,N(i,u(z),!0));let G=Math.floor(U/3600);N(o,u(G),!0);let le=Math.floor(U/60)%60;N(r,u(le),!0);let Y=U%60;N(a,u(Y),!0)},b=()=>{let U=Math.floor(Date.now()/1e3),z=e.startTime-U;f(z),z>=1?l=requestAnimationFrame(b):e.onTimerOver()};Nt(()=>{l=requestAnimationFrame(b)}),mn(()=>{cancelAnimationFrame(l)});var y=u2();let $;var S=T(y);{var C=U=>{var z=a2(),G=de(z);let le;var Y=T(G),re=T(Y,!0);w(Y);var X=k(Y,2),we=T(X,!0);w(X),w(G);var ce=k(G,2),ne=T(ce,!0);w(ce),B((he,xe,Z)=>{le=Ge(G,"",le,{width:he}),pe(re,n(i)),pe(we,xe),pe(ne,Z)},[()=>m(n(i)),()=>Q("waiting_live_day_value"),()=>Q("waiting_live_colon")]),_(U,z)};V(S,U=>{n(i)&&U(C)})}var I=k(S,2);{var R=U=>{var z=l2(),G=de(z);let le;var Y=T(G),re=T(Y,!0);w(Y);var X=k(Y,2),we=T(X,!0);w(X),w(G);var ce=k(G,2),ne=T(ce,!0);w(ce),B((he,xe,Z)=>{le=Ge(G,"",le,{width:he}),pe(re,n(o)),pe(we,xe),pe(ne,Z)},[()=>m(n(o)),()=>Q("waiting_live_hour_value"),()=>Q("waiting_live_colon")]),_(U,z)};V(I,U=>{n(o)&&U(R)})}var E=k(I,2);{var P=U=>{var z=d2(),G=de(z);let le;var Y=T(G),re=T(Y,!0);w(Y);var X=k(Y,2),we=T(X,!0);w(X),w(G);var ce=k(G,2),ne=T(ce,!0);w(ce),B((he,xe,Z)=>{le=Ge(G,"",le,{width:he}),pe(re,n(r)),pe(we,xe),pe(ne,Z)},[()=>m(n(r)),()=>Q("waiting_live_minute_value"),()=>Q("waiting_live_colon")]),_(U,z)};V(E,U=>{n(r)&&U(P)})}var O=k(E,2);{var D=U=>{var z=c2();let G;var le=T(z),Y=T(le,!0);w(le);var re=k(le,2),X=T(re,!0);w(re),w(z),B((we,ce)=>{G=Ge(z,"",G,{width:we}),pe(Y,n(a)),pe(X,ce)},[()=>m(n(a)),()=>Q("waiting_live_second_value")]),_(U,z)};V(O,U=>{n(a)&&U(D)})}w(y),B(U=>$=se(y,1,"timer__container s-1b",null,$,U),[()=>({small:e.isSmallSize})]),_(t,y),H()}var m2=L('<div class="waiting s-r"><span> </span></div>'),v2=L('<div class="upcoming-timer timer s-r"><span> </span> <!></div>'),g2=L('<div class="waiting-container s-r"><!></div>'),h2={hash:"s-r",code:'.waiting-container.s-r{background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;white-space:nowrap}.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(15px);background-color:rgba(0,0,0,.56);content:"";z-index:1}.waiting.s-r{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-r{font-size:20px;font-weight:600;line-height:1.2}.upcoming-timer.s-r{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.timer.s-r{align-items:center;display:flex;flex-direction:column;justify-content:center}.timer__title.s-r{display:inline-block;font-size:20px;font-weight:600;line-height:1.2;margin-bottom:12px;vertical-align:middle}.small.s-r{font-size:15px}.medium.s-r{font-size:17px}'};function _c(t,e){F(e,!0),q(t,h2);let i=g(e,"startTime",3,0),o=v(()=>i()<Math.floor(Date.now()/1e3)),r=K(void 0),a=K(void 0),l=0,d=K(void 0),s=K(void 0),u=v(()=>{var S,C;return((S=n(d))!=null?S:1/0)<=509||((C=n(s))!=null?C:1/0)<=320}),p=v(()=>{var S,C;return!n(u)&&(((S=n(d))!=null?S:1/0)<=699||((C=n(s))!=null?C:1/0)<=599)}),m=e.onUpcomingLiveViewStateChanged?f2(()=>{cancelAnimationFrame(l),l=requestAnimationFrame(()=>{let S={type:n(o)?"expired":"default",size:n(u)?"s":n(p)?"m":"l"},C=n(o)?n(r):n(a);e.onUpcomingLiveViewStateChanged(S,C)})},300):void 0;De(()=>{n(s),n(d),n(o),m==null||m()}),mn(()=>{if(cancelAnimationFrame(l),m==null||m.cancel(),e.onUpcomingLiveViewStateChanged){let S={type:n(o)?"expired":"default",size:n(u)?"s":n(p)?"m":"l"};e.onUpcomingLiveViewStateChanged(S)}});var f=g2();f.__contextmenu=function(...S){var C;(C=e.onContextMenu)==null||C.apply(this,S)},f.__click=function(...S){var C;(C=e.onClick)==null||C.apply(this,S)};var b=T(f);{var y=S=>{var C=m2(),I=T(C);let R;var E=T(I,!0);w(I),w(C),ot(C,P=>N(r,P),()=>n(r)),B((P,O)=>{R=se(I,1,"waiting__title s-r",null,R,P),pe(E,O)},[()=>({medium:n(p),small:n(u)}),()=>Q("waiting_live_upcoming_title")]),_(S,C)},$=S=>{var C=v2(),I=T(C);let R;var E=T(I,!0);w(I);var P=k(I,2);let O=v(()=>n(u)||n(p)),D=v(()=>i()||0);Gm(P,{get isSmallSize(){return n(O)},get startTime(){return n(D)},onTimerOver:()=>N(o,!0)}),w(C),ot(C,U=>N(a,U),()=>n(a)),B((U,z)=>{R=se(I,1,"timer__title s-r",null,R,U),pe(E,z)},[()=>({medium:n(p),small:n(u)}),()=>Q("waiting_live_timer_title")]),_(S,C)};V(b,S=>{n(o)?S(y):S($,!1)})}w(f),B(()=>Ge(f,`background-image: url(${e.thumbUrl})`)),An(f,"clientWidth",S=>N(d,S)),An(f,"clientHeight",S=>N(s,S)),_(t,f),H()}rt(["contextmenu","click"]);var _2=L('<div class="waiting-container s-t"><div class="waiting-caption s-t"><!> <p class="waiting-title s-t"> </p></div></div>'),b2={hash:"s-t",code:'.waiting-container.s-t{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-t,.waiting-container.s-t:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-t:before{backdrop-filter:blur(10px);background-color:rgba(0,0,0,.4);content:""}.waiting-caption.s-t{align-items:center;display:flex;flex-direction:column;position:relative}.waiting-title.s-t{font-size:20px;font-weight:400;line-height:1.2;margin:0;padding:20px;text-align:center}'};function Za(t,e){F(e,!0),q(t,b2);let i=g(e,"thumbUrl",3,""),o={recover:Q("waiting_live_recover_title"),record:Q("waiting_record_title")},r=v(()=>o[e.kind]||"");var a=_2();a.__contextmenu=function(...p){var m;(m=e.onContextMenu)==null||m.apply(this,p)},a.__click=function(...p){var m;(m=e.onClick)==null||m.apply(this,p)};var l=T(a),d=T(l);Ha(d,{style:"position: static; transform: translate(0, 0)"});var s=k(d,2),u=T(s,!0);w(s),w(l),w(a),B(()=>{Ge(a,`background-image: url('${i()}')`),pe(u,n(r))}),_(t,a),H()}rt(["contextmenu","click"]);var $2=Ee('<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 Ym(t){Ze(t,{width:"16",height:"16",testId:"check-mark-icon",children:(e,i)=>{var o=$2();_(e,o)},$$slots:{default:!0}})}var y2=L('<div class="select-icon s-1x"><!></div>'),x2={hash:"s-1x",code:".select-icon.s-1x{margin-right:auto;opacity:.9;padding-right:12px;position:relative;top:3px}"};function bc(t){q(t,x2);var e=y2(),i=T(e);Ym(i,{}),w(e),_(t,e)}var w2=(t,e)=>{t.stopPropagation(),e.item.selectItem(e.item.value)},S2=(t,e)=>{Fl(t,()=>e.item.selectItem(e.item.value))},T2=L("<p> </p>"),C2=L('<p class="sublabel s-1s"> </p>'),I2=L('<li role="menuitem" tabindex="0"><!> <div><!> <!></div></li>'),E2={hash:"s-1s",code:".menu-item-value.s-1s{align-items:end;display:flex;flex-direction:column;min-width:0}.menu-item-value[data-selected=false].s-1s{--select-icon-width:16px;--icon-padding:12px;margin-left:calc(var(--icon-padding) + var(--select-icon-width))}.label.s-1s,.sublabel.s-1s{max-width:100%;overflow:hidden;text-overflow:ellipsis}.sublabel.s-1s{opacity:.5}"};function jm(t,e){F(e,!0),q(t,E2);let i=g(e,"isMobile",3,!1);var o=I2();let r;o.__click=[w2,e],o.__keydown=[S2,e];var a=T(o);{var l=y=>{bc(y,{})};V(a,y=>{e.item.selected&&y(l)})}var d=k(a,2);let s;var u=T(d);{var p=y=>{var $=Le(),S=de($);Di(S,()=>e.item.valueComponent,(C,I)=>{I(C,As(()=>{var R;return(R=e.item.valueComponentParams)!=null?R:{}}))}),_(y,$)},m=y=>{var $=T2();let S;var C=T($,!0);w($),B(I=>{var R;S=se($,1,"label s-1s",null,S,I),pe(C,(R=e.item.label)!=null?R:e.item.value)},[()=>({mobile:i()})]),_(y,$)};V(u,y=>{e.item.valueComponent?y(p):y(m,!1)})}var f=k(u,2);{var b=y=>{var $=C2(),S=T($,!0);w($),B(()=>pe(S,e.item.sublabel)),_(y,$)};V(f,y=>{e.item.sublabel&&y(b)})}w(d),w(o),B((y,$,S)=>{r=se(o,1,"item",null,r,y),Ue(o,"data-value",e.item.value),Ue(o,"aria-label",$),Ue(o,"data-testid",e.item.dataTestid),s=se(d,1,"menu-item-value s-1s",null,s,S),Ue(d,"data-selected",e.item.selected)},[()=>({mobile:i()}),()=>{var y,$;return($=(y=e.item.ariaLabel)!=null?y:e.item.label)!=null?$:e.item.value.toString()},()=>({"submenu-value-mobile":i()})]),_(t,o),H()}rt(["click","keydown"]);var P2=L('<li role="menuitem" tabindex="0" aria-haspopup="true"><!> <div><!></div></li>');function Xm(t,e){F(e,!0);let i=g(e,"isMobile",3,!1),o=g(e,"refMenuItems",15),r=v(()=>()=>e.openSubMenuList(e.item.children)),a=v(()=>$=>Nu($,n(r)));var l=P2();let d;l.__click=function(...$){var S;(S=n(r))==null||S.apply(this,$)},l.__keydown=function(...$){var S;(S=n(a))==null||S.apply(this,$)};var s=T(l);{var u=$=>{bc($,{})};V(s,$=>{e.item.selected&&$(u)})}var p=k(s,2);let m;var f=T(p);{var b=$=>{var S=Le();let C=v(()=>e.item.valueComponent);var I=de(S);Di(I,()=>n(C),(R,E)=>{E(R,As(()=>{var P;return(P=e.item.valueComponentParams)!=null?P:{}}))}),_($,S)},y=$=>{var S=ms();B(()=>pe(S,e.item.label)),_($,S)};V(f,$=>{e.item.valueComponent?$(b):$(y,!1)})}w(p),w(l),ot(l,$=>o(o()[e.item.id]=$,!0),()=>{var $;return($=o())==null?void 0:$[e.item.id]}),B(($,S)=>{var C;d=se(l,1,"item",null,d,$),Ue(l,"aria-label",(C=e.item.ariaLabel)!=null?C:e.item.label),Ue(l,"data-testid",e.item.id),m=se(p,1,"menu-item-value",null,m,S)},[()=>({mobile:i(),bottomBordered:e.item.bottomBordered}),()=>({"submenu-value-mobile":i()})]),_(t,l),H()}rt(["click","keydown"]);var es={"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 k2=(t,e)=>{V_(t,e.returnFromSubMenu,e.closeSettingsMenu)},L2=(t,e)=>{t.stopPropagation(),e.returnFromSubMenu()},M2=(t,e)=>{Fd(t)&&(Vr(t),e.returnFromSubMenu())},V2=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>'),R2={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 Jm(t,e){F(e,!0),q(t,R2);let[i,o]=Re(),r=()=>x(m,"$isFullscreen",i),a=()=>x(f,"$playerSize",i),l=g(e,"isMobile",3,!1),d=g(e,"playerControlsHeight",3,0),s=g(e,"ariaLabelReturnFromSubMenu",19,()=>Q("aria_label_submenu_back")),u=g(e,"listRef",15);Nt(()=>{let Y=e.items.findIndex(re=>re.selected);u().children[Y+1].focus()});let p=ve(),m=p.ui.isFullscreen,f=p.ui.playerSize,b=K(void 0),y=K(0),$=K(0),S=v(()=>l()&&r()?`max-height: ${Math.round(a().height*.6)}px`:l()?"":`max-height: ${a().height-32-n($)-d()}px; overflow: auto;`),C=v(()=>Math.max(e.minWidth,n(y)));var I=V2();let R;var E=T(I);let P;E.__keydown=[k2,e];var O=T(E);let D;O.__click=[L2,e],O.__keydown=[M2,e];var U=T(O);Mr(U,{direction:"left"});var z=k(U,2),G=T(z,!0);w(z),w(O),ot(O,Y=>N(b,Y),()=>n(b));var le=k(O,2);wi(le,17,()=>e.items,wd,(Y,re)=>{var X=Le(),we=de(X);{var ce=he=>{jm(he,{get item(){return n(re)},get isMobile(){return l()}})},ne=(he,xe)=>{{var Z=Ne=>{Xm(Ne,{get isMobile(){return l()},get item(){return n(re)},get openSubMenuList(){return e.openSubMenuList},get refMenuItems(){return e.refMenuItems}})};V(he,Ne=>{n(re).type==="OPEN_SUB_MENU"&&Ne(Z)},xe)}};V(we,he=>{n(re).type==="SELECT_VALUE"?he(ce):he(ne,!1)})}_(Y,X)}),w(E),ot(E,Y=>u(Y),()=>u()),w(I),B((Y,re,X)=>{R=se(I,1,"sub-menu menu s-1l",null,R,Y),Ue(I,"data-testid",`sub-menu-${e.id}`),Ge(I,`min-width: ${n(C)}px`),P=se(E,1,"items s-1l",null,P,re),Ge(E,n(S)),D=se(O,1,"item header back s-1l",null,D,X),Ue(O,"aria-label",s()),pe(G,e.title)},[()=>({desktop:!l(),mobile:l()}),()=>({mobile:l()}),()=>({mobile:l()})]),An(O,"clientWidth",Y=>N(y,Y)),An(O,"clientHeight",Y=>N($,Y)),_(t,I),H(),o()}rt(["keydown","click"]);import{noop as N2}from"@vkontakte/videoplayer-shared/es2015";var O2=(t,e)=>Nu(t,e()),D2=(t,e)=>{t.stopPropagation(),e()()},B2=L('<div class="value s-1n"> </div>'),F2=L('<li role="menuitem" tabindex="0" aria-haspopup="true"><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></li>'),H2={hash:"s-1n",code:".value.s-1n{opacity:.7;overflow:hidden;position:relative;text-overflow:ellipsis}"};function ev(t,e){F(e,!0),q(t,H2);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,N2),r=g(e,"valueComponent",3,void 0),a=g(e,"ref",15);var l=F2();let d;l.__click=[D2,o],l.__keydown=[O2,o];var s=T(l),u=T(s);{var p=C=>{qa(C,{get icon(){return e.icon}})},m=C=>{var I=Le();let R=v(()=>e.icon);var E=de(I);Di(E,()=>n(R),(P,O)=>{O(P,{})}),_(C,I)};V(u,C=>{typeof e.icon=="string"?C(p):C(m,!1)})}w(s);var f=k(s,2),b=T(f,!0);w(f);var y=k(f,2);{var $=C=>{var I=Le();let R=v(r);var E=de(I);Di(E,()=>n(R),(P,O)=>{O(P,{})}),_(C,I)},S=C=>{var I=B2(),R=T(I,!0);w(I),B(()=>pe(R,e.value)),_(C,I)};V(y,C=>{r()?C($):C(S,!1)})}w(l),ot(l,C=>a(C),()=>a()),B(C=>{d=se(l,1,"item",null,d,C),Ue(l,"aria-label",e.ariaLabel),Ue(l,"data-testid",e.id),pe(b,e.label)},[()=>({mobile:i()})]),_(t,l),H()}rt(["click","keydown"]);import{noop as _b}from"@vkontakte/videoplayer-shared/es2015";var U2=(t,e)=>{Fl(t,()=>e())},z2=L('<div class="icon icon-error-stub"><div class="inner"></div></div>'),W2=L('<img class="icon" aria-hidden="true"/>'),K2=L('<li role="menuitem" tabindex="0"><div class="icon-wrapper"><!></div> <div class="label s-1m"> </div></li>'),q2={hash:"s-1m",code:".label.s-1m{overflow:hidden;text-overflow:ellipsis}"};function tv(t,e){F(e,!0),q(t,q2);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,_b),r=g(e,"closeSettings",3,_b),a=K(!1),l=()=>{N(a,!0)},d=S=>{S==null||S.stopPropagation(),o()(),r()()};var s=K2();let u;s.__click=d,s.__keydown=[U2,d];var p=T(s),m=T(p);{var f=S=>{var C=Le(),I=de(C);{var R=P=>{var O=z2();_(P,O)},E=P=>{var O=W2();B(()=>Ue(O,"src",e.icon)),_t("error",O,l),Pa(O),_(P,O)};V(I,P=>{n(a)?P(R):P(E,!1)})}_(S,C)},b=S=>{var C=Le();let I=v(()=>e.icon);var R=de(C);Di(R,()=>n(I),(E,P)=>{P(E,{})}),_(S,C)};V(m,S=>{typeof e.icon=="string"?S(f):S(b,!1)})}w(p);var y=k(p,2),$=T(y,!0);w(y),w(s),B(S=>{var C;u=se(s,1,"item",null,u,S),Ue(s,"aria-label",(C=e.ariaLabel)!=null?C:e.label),Ue(s,"data-testid",e.id),pe($,e.label)},[()=>({mobile:i()})]),_(t,s),H()}rt(["click","keydown"]);import{noop as Y2}from"@vkontakte/videoplayer-shared/es2015";var Q2=L('<div class="toggle_wrap s-1r"><div></div> <div class="toggle-label s-1r"></div></div>'),G2={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 iv(t,e){q(t,G2);let i=g(e,"enabled",3,!1);var o=Q2(),r=T(o);let a;vi(2),w(o),B(l=>a=se(r,1,"toggle s-1r",null,a,l),[()=>({on:i()})]),_(t,o)}var j2=(t,e,i)=>{R_(t,e(),o=>i()(o))},X2=(t,e,i)=>{t.stopPropagation(),e()(!i())},Z2=L('<div><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></div>'),J2=L('<li role="menuitem" tabindex="0"><!></li>');function ov(t,e){F(e,!0);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,Y2),r=g(e,"enabled",3,!1),a=g(e,"tooltipText",3,void 0),l=g(e,"maxTooltipWidth",3,void 0);var d=J2();let s;d.__click=[X2,o,r],d.__keydown=[j2,r,o];var u=T(d);Ua(u,{get content(){return a()},get isMobile(){return i()},placement:"left",translateX:10,isFullWidthWrapper:!0,get maxTooltipWidth(){return l()},children:(p,m)=>{var f=Z2();let b;var y=T(f),$=T(y);{var S=P=>{qa(P,{get icon(){return e.icon}})},C=P=>{var O=Le();let D=v(()=>e.icon);var U=de(O);Di(U,()=>n(D),(z,G)=>{G(z,{})}),_(P,O)};V($,P=>{typeof e.icon=="string"?P(S):P(C,!1)})}w(y);var I=k(y,2),R=T(I,!0);w(I);var E=k(I,2);iv(E,{get enabled(){return r()}}),w(f),B(P=>{b=se(f,1,"switch-wrapper",null,b,P),pe(R,e.label)},[()=>({mobile:i()})]),_(p,f)},$$slots:{default:!0}}),w(d),B(p=>{var m;s=se(d,1,"item switch-item",null,s,p),Ue(d,"aria-label",(m=e.ariaLabel)!=null?m:e.label),Ue(d,"data-testid",e.id)},[()=>({mobile:i()})]),_(t,d),H()}rt(["click","keydown"]);import{isValidURL as wT,VideoQuality as Pb}from"@vkontakte/videoplayer-shared/es2015";var bb=()=>{let t=K(ci([])),e=v(()=>(n(t).length?n(t).at(-1):null)||null);return{get current(){return n(e)},pushSubMenu:i=>{n(t).push(i)},popSubMenu:()=>{N(t,n(t).slice(0,-1),!0)},popAllSubMenus:()=>{N(t,[],!0)}}};var eT=L('<div class="quality-icon s-1q"><!></div>'),tT=L('<div class="quality-label s-1q"><span> </span> <!></div>'),iT={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 Ja(t,e){F(e,!0),q(t,iT);let i=g(e,"isSubCase",3,!1),o=v(()=>Uu(e.quality));var r=tT(),a=T(r);let l;var d=T(a,!0);w(a);var s=k(a,2);{var u=p=>{var m=eT();let f=v(()=>n(o));var b=T(m);Di(b,()=>n(f),(y,$)=>{$(y,{})}),w(m),_(p,m)};V(s,p=>{n(o)&&!e.isMobile&&p(u)})}w(r),B(p=>{l=se(a,1,"s-1q",null,l,p),pe(d,e.label)},[()=>({sub:!i(),quality:!e.isMobile})]),_(t,r),H()}import{VideoQuality as oT}from"@vkontakte/videoplayer-shared/es2015";import{VideoQuality as $b}from"@vkontakte/videoplayer-core/es2015";var yb=({quality:t,availableQualities:e})=>{let i=e.find(o=>o.value===t);return i?i.displayValue:t},xb=({quality:t,availableQualities:e,isAutoQualityEnabled:i})=>{if(!t)return"...";let o=yb({quality:t,availableQualities:e});return i?t===$b.INVARIANT?Q("auto_quality_invariant"):Q("auto_quality",{actual:o}):o},wb=({quality:t,availableQualities:e,prefix:i,onlyPrefix:o})=>t?o||t===$b.INVARIANT?i:`${i}${yb({quality:t,availableQualities:e})}`:"...";var nT=L('<div class="menu-item-value-wrapper s-1u"><!></div>'),rT={hash:"s-1u",code:".menu-item-value-wrapper.s-1u{line-height:normal}"};function Xl(t,e){F(e,!0),q(t,rT);let[i,o]=Re(),r=()=>x(s,"$currentQuality$",i),a=()=>x(u,"$availableQualities$",i),l=()=>x(p,"$isMobile$",i),d=ve(),s=d.state.currentQuality$,u=d.state.availableQualities$,p=d.ui.isMobile,m=" · ",f=v(()=>e.prefix+(e.selected&&r()!==oT.INVARIANT?m:"")),b=v(()=>wb({prefix:n(f),quality:r(),availableQualities:a(),onlyPrefix:!e.selected}));var y=nT(),$=T(y);let S=v(()=>e.selected?r():void 0);Ja($,{get quality(){return n(S)},get label(){return n(b)},get isMobile(){return l()},isSubCase:!0}),w(y),_(t,y),H(),o()}var sT=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")},aT={br:!0,span:!0},nv=(t,e={})=>{var d,s,u,p,m,f,b;if(!t)return t;let i=Ae(Ae({},aT),e),o=Object.keys(i);if(!o.length)return t;let r=sT(o),a=[],l=0;for(let y of t.matchAll(r)){let $=y[0],S=((d=y.groups)==null?void 0:d.keyhtml)||((s=y.groups)==null?void 0:s.keyi18n)||((u=y.groups)==null?void 0:u.keyhtmlself)||((p=y.groups)==null?void 0:p.keyi18nself)||"",{index:C}=y;if(!i[S]){a.push(t.slice(l,C)),l=C+$.length;continue}let I=(m=y.groups)!=null&&m.childrenhtml?nv(y.groups.childrenhtml,i):"",R=(f=y.groups)!=null&&f.childrenhtml?$.replace(new RegExp((b=y.groups)==null?void 0:b.childrenhtml),()=>I||""):$;a.push(t.slice(l,C),R),l=C+$.length}return l===0?t:(a.push(t.slice(l)),a.join(""))};function $c(t,e){F(e,!1);let i=g(e,"message",8),o=nv(i());xo();var r=Le(),a=de(r);{var l=d=>{var s=Le(),u=de(s);Sd(u,()=>o),_(d,s)};V(a,d=>{o&&d(l)})}_(t,r),H()}var lT=L('<p class="quality-applies sublabel s-1t"><!></p>'),dT={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 rv(t,e){F(e,!1),q(t,dT),xo();var i=lT(),o=T(i);let r=Tn(()=>Q("quality_applience",{action:`<span>${Q("quality_applience_action")}</span>`}));$c(o,{get message(){return n(r)}}),w(i),_(t,i),H()}var Tb=({isAutoQualityEnabled:t,trafficSavingEnabled:e,highQualityEnabled:i})=>{let o=!t&&!e&&!i;return{id:"QUALITY_OTHER",type:"OPEN_SUB_MENU",selected:o,valueComponent:Xl,valueComponentParams:{prefix:Q("other_quality"),selected:o},children:"QUALITY"}},sv=({appliesTo:t,labelWithQuality:e,selected:i},{selectQuality:o})=>({id:"QUALITY_AUTO",type:"SELECT_VALUE",value:"auto",label:Q("auto_quality_limit"),valueComponent:e?Xl:void 0,valueComponentParams:{prefix:Q("auto_quality_limit"),selected:i},selectItem:()=>o("auto",t),selected:i}),Cb=()=>({id:"QUALITY_APPLIENCE",type:"OPEN_SUB_MENU",valueComponent:rv,bottomBordered:!0,children:"QUALITY_APPLIENCE"}),av=({labelWithQuality:t,appliesTo:e,selected:i},{toggleHighQuality:o})=>({id:"QUALITY_HIGH",type:"SELECT_VALUE",value:"high_quality",selectItem:()=>o(!0,e),selected:i,label:Q("high_quality"),valueComponent:t?Xl:void 0,valueComponentParams:{prefix:Q("high_quality"),selected:i},sublabel:Q("high_quality_description")}),lv=({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:Q("traffic_saving_quality"),valueComponent:t?Xl:void 0,valueComponentParams:{prefix:Q("traffic_saving_quality"),selected:i},sublabel:Q("traffic_saving_quality_description")});var op=(t,e)=>String(e.findIndex(i=>i.id===t.id)+1),np=(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 Q("audio_stream_display_language_label",{language:r,label:o});{let s=op(t,d);return Q("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=op(t,d);return Q("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=op(t,d);return Q("audio_stream_display_language_index",{language:r,index:s})}}let a=op(t,e);return Q("audio_stream_display_unknown",{index:a})};var cT={QUALITY_DETAILS:t=>{let{isAutoQualityEnabled:e,isAutoQualityAvailable:i,trafficSavingEnabled:o,highQualityEnabled:r}=t,a=[];return i&&a.push({handler:sv,selected:e&&!o&&!r||!1}),a.push({handler:lv,selected:o},{handler:av,selected:r}),{title:Q("submenu_quality"),id:"QUALITY_DETAILS",items:[Cb(t),...a.map(({handler:l,selected:d})=>l({labelWithQuality:!0,appliesTo:"to-video",selected:d},t)),Tb(t)]}},QUALITY:({closeSettingsMenu:t,selectQuality:e,availableQualities:i,isMobile:o})=>({id:"QUALITY",title:Q("submenu_quality"),closeSettingsMenu:t,items:i.map(r=>({type:"SELECT_VALUE",value:r.value,valueComponent:Ja,valueComponentParams:{quality:r.value,label:r.displayValue,isMobile:o,isSubCase:!0},selectItem:a=>e(a,"to-video"),selected:r.selected,label:r.displayValue}))}),QUALITY_APPLIENCE:t=>{var i,o,r;let{closeSettingsMenu:e}=t;return{id:"QUALITY_APPLIENCE",title:Q("default_quality_for_any_video"),closeSettingsMenu:e,items:[{handler:sv,selected:((i=Su())==null?void 0:i.type)==="auto_quality"},{handler:lv,selected:((o=Su())==null?void 0:o.type)==="traffic_saving"},{handler:av,selected:((r=Su())==null?void 0:r.type)==="high_quality"}].map(({handler:a,selected:l})=>a({labelWithQuality:!1,appliesTo:"as-default",selected:l},t))}},AUDIO_LANGUAGES:({closeSettingsMenu:t,availableAudioStreams:e,currentAudioStream:i,selectAudioLanguage:o})=>({id:"AUDIO_LANGUAGES",title:Q("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:np(r,e)}))}),PLAYBACK_RATE_SUB_MENU:({closeSettingsMenu:t,availablePlaybackRates:e,selectPlaybackRate:i})=>({id:"PLAYBACK_RATE_SUB_MENU",title:Q("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:Q("subtitles_caption"),items:t.map(i=>({type:"SELECT_VALUE",value:i.value,selectItem:()=>e(i),selected:i.selected,label:i.displayValue,dataTestid:i.value===Mn?"sub_off":void 0}))})},Ib=({subMenuId:t,context:e})=>t?[cT[t](e)]:[];var uT=Ee('<path d="M.1 6.5c0-2.24 0-3.36.44-4.22A4 4 0 0 1 2.28.54C3.14.1 4.26.1 6.5.1h5c2.24 0 3.36 0 4.22.44a4 4 0 0 1 1.74 1.74c.44.86.44 1.98.44 4.22s0 3.36-.44 4.22a4 4 0 0 1-1.74 1.74c-.84.43-1.93.44-4.07.44l.55 2.2h1.9a.9.9 0 0 1 0 1.8H3.9a.9.9 0 1 1 0-1.8h1.9l.55-2.2c-2.14 0-3.23-.01-4.07-.44a4 4 0 0 1-1.74-1.74C.1 9.86.1 8.74.1 6.5m11.4-4.6h-5c-1.15 0-1.9 0-2.48.05-.56.04-.79.12-.92.19a2.2 2.2 0 0 0-.96.96 2 2 0 0 0-.2.92C1.9 4.6 1.9 5.35 1.9 6.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 0 0 .96-.96c.07-.13.15-.36.2-.92.04-.58.04-1.33.04-2.48s0-1.9-.05-2.48a3 3 0 0 0-.19-.92 2.2 2.2 0 0 0-.96-.96 2 2 0 0 0-.92-.2c-.58-.04-1.33-.04-2.48-.04m-3.3 11-.55 2.2h2.7l-.55-2.2z"></path>');function dv(t){Ze(t,{testId:"traffic-saving-icon",children:(e,i)=>{var o=uT();_(e,o)},$$slots:{default:!0}})}var pT=Ee('<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 cv(t){Ze(t,{width:"18",height:"15",children:(e,i)=>{var o=pT();_(e,o)},$$slots:{default:!0}})}var fT=Ee('<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 uv(t){Ze(t,{testId:"play-speed-icon",children:(e,i)=>{var o=fT();_(e,o)},$$slots:{default:!0}})}var mT=Ee('<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 pv(t){Ze(t,{testId:"download-icon",children:(e,i)=>{var o=mT();_(e,o)},$$slots:{default:!0}})}var vT=Ee('<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 fv(t){Ze(t,{testId:"report-icon",children:(e,i)=>{var o=vT();_(e,o)},$$slots:{default:!0}})}var gT=Ee('<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 rp(t){Ze(t,{children:(e,i)=>{var o=gT();_(e,o)},$$slots:{default:!0}})}var hT=Ee('<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 mv(t){Ze(t,{testId:"info-icon",children:(e,i)=>{var o=hT();_(e,o)},$$slots:{default:!0}})}var _T=L('<div class="menu-item-value-wrapper s-1w"><!></div>'),bT={hash:"s-1w",code:".menu-item-value-wrapper.s-1w{line-height:normal}"};function vv(t,e){F(e,!0),q(t,bT);let[i,o]=Re(),r=()=>x(u,"$currentQuality$",i),a=()=>x(p,"$availableQualities$",i),l=()=>x(m,"$isAutoQualityEnabled$",i),d=()=>x(f,"$isMobile$",i),s=ve(),u=s.state.currentQuality$,p=s.state.availableQualities$,m=s.state.isAutoQualityEnabled$,f=s.ui.isMobile,b=v(()=>xb({quality:r(),availableQualities:a(),isAutoQualityEnabled:l()}));var y=_T(),$=T(y);Ja($,{get quality(){return r()},get label(){return n(b)},get isMobile(){return d()}}),w(y),_(t,y),H(),o()}var yT={QUALITY_SETTINGS:({isAutoQualityEnabled:t,currentQuality:e,qualityDetailsSubMenuEnabled:i})=>{let o=(t?Q("auto_quality_option"):e)||"";return{id:"QUALITY_SETTINGS",type:"OPEN_SUB_MENU",ariaLabel:Q("aria_label_menu_quality",{actual:o}),icon:Yd,label:Q("menu_quality"),value:e,valueComponent:vv,weight:es["quality-settings"],children:i?"QUALITY_DETAILS":"QUALITY"}},TRAFFIC_SAVING_SWITCH:({trafficSavingEnabled:t,toggleTrafficSaving:e})=>({id:"TRAFFIC_SAVING_SWITCH",weight:es["traffic-saving-settings"],type:"SWITCH",onClick:i=>e(i,"to-video"),ariaLabel:Q("aria_label_submenu_traffic_saving"),icon:dv,label:Q("menu_traffic_saving"),enabled:t,tooltipText:Q("traffic_saving_helper_text"),maxTooltipWidth:175}),AUDIO_LANGUAGES:({currentAudioStream:t,availableAudioStreams:e})=>{let i=np(t,e);return{id:"AUDIO_LANGUAGES",weight:es["audio-language-settings"],type:"OPEN_SUB_MENU",ariaLabel:Q("aria_label_menu_audio_languages",{actual:i}),icon:cv,label:Q("menu_audio_languages"),value:i,children:"AUDIO_LANGUAGES"}},PLAYBACK_RATE:({availablePlaybackRates:t,currentPlaybackRate:e})=>{var o;let i=((o=t.find(r=>r.value===e))==null?void 0:o.displayValue)||"";return{id:"PLAYBACK_RATE",weight:es["playback-rate-settings"],type:"OPEN_SUB_MENU",ariaLabel:Q("aria_label_menu_rate",{actual:i}),icon:uv,label:Q("menu_playback_rate"),value:`${e}x`,children:"PLAYBACK_RATE_SUB_MENU"}},SUBTITLES:({currentSubtitle:t})=>({id:"SUBTITLES",weight:es["subtitles-settings"],type:"OPEN_SUB_MENU",ariaLabel:Q("aria_label_menu_subtitle",{actual:t.displayValue}),icon:aa,label:Q("subtitles_caption"),value:t.displayValue,children:"SUBTITLES"}),DOWNLOAD:({onDownloadClick:t})=>({id:"DOWNLOAD",weight:es.download,type:"CLICK",onClick:t,label:Q("download_video_caption"),ariaLabel:Q("aria_label_menu_download"),icon:pv}),SHOW_SUPPORT:({onReportProblemClick:t})=>({id:"SHOW_SUPPORT",weight:es.report,type:"CLICK",onClick:t,label:Q("menu_report"),ariaLabel:`${Q("menu_report")}. ${Q("aria_label_new_tab_alert")}`,icon:fv,isHiddenFor:["desktop"]}),COPY_DATA:({onCopyDataClick:t})=>({id:"COPY_DATA",weight:es["copy-data"],type:"CLICK",onClick:t,label:Q("menu_copy_debug"),ariaLabel:Q("menu_copy_debug"),icon:rp,isHiddenFor:["desktop"]}),SAVE_TRACE_INFO:({onSaveTraceDataClick:t})=>({id:"SAVE_TRACE_INFO",weight:es["save-trace-info"],type:"CLICK",onClick:t,label:Q("menu_save_debug"),ariaLabel:Q("menu_save_debug"),icon:rp,isHiddenFor:["desktop"]}),DEBUG_INFO:({toggleShowDebugInfo:t})=>({id:"DEBUG_INFO",weight:es["debug-info"],type:"CLICK",onClick:t,ariaLabel:Q("aria_label_menu_debug_overlay"),label:Q("menu_debug_overlay"),icon:mv,isHiddenFor:["desktop"]})},Eb=({items:t,context:e,additionalSettingsMenuItems:i})=>{let{isMobile:o}=e;return[...t.map(r=>yT[r](e)),...i.map(r=>Kt(Ae({},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(Ba)};var ST=(t,e)=>{Ru(t,e)},TT=L('<div><div> </div> <div class="close s-v"></div></div>'),CT=L('<div data-testid="settings-menu" role="presentation"><!> <ul role="menu"></ul></div>'),IT=L("<div><!> <!></div>"),ET={hash:"s-v",code:'.settings-menu-container.mobile.s-v{width:100%}.settings-menu-container.s-v ul{list-style-type:none;margin:0;padding:0}.settings-menu-container.s-v .menu{background-color:var(--settings-bg);border-radius:var(--settings-radius);overflow:hidden;transition:opacity .2s,visibility .2s}.settings-menu-container.s-v .menu .item:first-child:not(.mobile){border-top-left-radius:var(--settings-radius);border-top-right-radius:var(--settings-radius)}.settings-menu-container.s-v .menu .item:last-child{border-bottom-left-radius:var(--settings-radius);border-bottom-right-radius:var(--settings-radius)}.settings-menu-container.s-v .settings-menu .item:first-child:not(.mobile){padding-top:6px}.settings-menu-container.s-v .settings-menu .item:last-child:not(.mobile){padding-bottom:6px}.settings-menu-container.s-v .menu.desktop{bottom:0;max-width:100%;position:absolute;right:0}.settings-menu.s-v{line-height:40px}.settings-menu.desktop.s-v{min-width:300px}.settings-menu-container.s-v .menu.mobile{background:var(--mobile-settings-bg);font-size:15px;line-height:50px;width:100%}.settings-menu-container.s-v .menu.mobile.hidden{display:none}.settings-menu-container.s-v .menu .item:not(.switch-item),.settings-menu-container.s-v .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-v .menu .item:hover{background-color:var(--settings-item-bg-hover)}.settings-menu-container.s-v .menu .item.mobile:hover{background:var(--mobile-settings-bg)}.settings-menu.s-v .item:not(.switch-item),.settings-menu.s-v .switch-wrapper{padding:0 32px 0 18px}.settings-menu.s-v .item.mobile:not(.switch-item),.settings-menu.s-v .switch-wrapper.mobile{padding:0 14px}.settings-menu.s-v .icon-wrapper{align-items:center;display:flex;height:24px;justify-content:center;margin-right:16px;min-width:24px;width:24px}.settings-menu.s-v .label{flex-grow:1;margin-right:24px;overflow:hidden;text-overflow:ellipsis}.settings-menu.s-v .item.header.mobile:where(.s-v){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-v .items::-webkit-scrollbar{width:8px}.settings-menu-container.s-v .items::-webkit-scrollbar-track{background-color:#3a3a3a;border-radius:4px;box-shadow:none}.settings-menu-container.s-v .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-v .items::-webkit-scrollbar-thumb:hover{background-color:#777}.settings-menu-container.s-v .items.mobile{max-height:160px;overflow-x:hidden;overflow-y:auto;text-align:left}.close.s-v{height:12px;margin-right:-12px;padding:12px;position:relative;width:12px}.close.s-v:after,.close.s-v:before{background-color:var(--white);content:" ";height:12px;left:18px;position:absolute;width:2px}.close.s-v:before{transform:rotate(45deg)}.close.s-v:after{transform:rotate(-45deg)}'};function yc(t,e){F(e,!0),q(t,ET);let[i,o]=Re(),r=()=>x(Be,"$settingsMenuVisible",i),a=()=>x(fe,"$settingsMenuOpenedByKeyboard",i),l=()=>x(ze,"$debugPanelVisible",i),d=()=>x(Se,"$isMobile",i),s=()=>x(Me,"$playerSize",i),u=()=>x(Oe,"$hasMpegSources$",i),p=()=>x(Fe,"$mobileNotReportControlHidden$",i),m=()=>x(Z,"$autoQualityLimitingAvailable$",i),f=()=>x(j,"$availableSubtitlesList$",i),b=()=>x(qe,"$isLiveWithPlaybackSpeed",i),y=()=>x(ne,"$availableAudioStreams$",i),$=()=>x(Ke,"$availablePlaybackRates$",i),S=()=>x(ce,"$currentAudioStream$",i),C=()=>x(A,"$currentPlaybackRate$",i),I=()=>x(Ye,"$trafficSavingEnabled",i),R=()=>x(he,"$currentQuality$",i),E=()=>x(Ne,"$isAutoQualityEnabled$",i),P=()=>x(Ce,"$currentSubtitle$",i),O=()=>x(et,"$additionalSettingsMenuItems$",i),D=()=>x(ue,"$isAutoQualityAvailable$",i),U=()=>x(xe,"$availableQualities$",i),z=()=>x(Te,"$highQualityEnabled",i),G=g(e,"ref",15,void 0),le=g(e,"playerControlsHeight",3,0),Y=ci({}),re=ci({}),X=ve(),we=Mt(),ce=X.state.audioStream$,ne=X.state.availableAudioStreams$,he=X.state.currentQuality$,xe=X.state.availableQualities$,Z=X.state.autoQualityLimitingAvailable$,Ne=X.state.isAutoQualityEnabled$,ue=X.state.isAutoQualityAvailable$,A=X.state.currentPlaybackRate$,Ke=X.state.availablePlaybackRates$,Ce=X.state.currentSubtitle$,j=X.state.availableSubtitlesList$,ie=X.state.canDownload,Oe=X.state.hasMpegSources$,Be=X.ui.settingsMenu.visible$,fe=X.ui.settingsMenu.openedByBtnKeyboard$,ee=X.ui.settingsMenu.ref$,Se=X.ui.isMobile,Fe=X.ui.mobileNotReportControlHidden$,qe=X.state.canChangePlaybackSpeed$,Ye=X.state.trafficSavingEnabled$,Te=X.state.highQualityEnabled$,Me=X.ui.playerSize,ze=X.ui.debugPanelVisible,Vt=X.state.isInteractiveTime$,et=X.ui.additionalSettingsMenuItems$,Ot=X.ui.t,qt=X.actions.internal.downloadVideo,St=X.actions.internal.closeSettingsMenu,Jt=X.actions.internal.openSettingsSubMenu,Dt=X.actions.internal.closeSettingsSubMenu,$e=K(!1),_e=K(void 0),J=bb();De(()=>{!r()&&J.current&&(Dt(re[J.current]),J.popAllSubMenus())}),De(()=>{r()||N(_e,void 0)}),De(()=>{!J.current&&n(_e)&&M_(Y,n(_e))}),De(()=>{G()&&ee.set(G())});function ye(Et){return gt(this,null,function*(){var W;J.pushSubMenu(Et),yield go(),Jt(Et,re[Et]);let Bt=(W=G())==null?void 0:W.firstElementChild;Bt&&Uf(Bt)})}function Pe(Et){var Bt;Et==null||Et.stopPropagation(),a()||(Bt=e.returnFocus)==null||Bt.call(e),St(),N($e,!1)}function It(Et,Bt){X.actions.internal.setQuality(Et,{appliesTo:Bt}),Pe()}function Ve(Et){X.actions.internal.setAudioStream(Et),Pe()}function st(Et,Bt){X.actions.internal.setTrafficSavingEnabled(Et,Bt),we.features.qualityDetailsSubMenuEnabled&&Pe()}function mt(Et,Bt){X.actions.internal.setHighQualityEnabled(Et,Bt),Pe()}function be(Et){X.actions.internal.setPlaybackRate(Et),Pe()}function Je(Et){X.actions.internal.setSubtitle(Et),Pe()}function We(){qt()}function nt(){wT(e.supportLink)&&window.open(e.supportLink,"_blank"),X.actions.internal.reportProblem(),X.actions.internal.pause()}function ei(){Dl(X.actions.internal.getDebugTextData())}let li=()=>{let Et=X.actions.internal.getTraceTextData(),Bt=new Blob([...Et],{type:"application/json"}),W=window.URL.createObjectURL(Bt);Va(W,"vk_player_trace_info","json")};function gi(){ze.set(!l())}function bi(){N($e,!0)}function io(){N($e,!1)}function ho(){return d()?`max-height: ${Math.round(s().height*.6)}px`:`max-height: ${s().height-32-le()}px; overflow: auto;`}let pi=v(()=>ie&&u()&&!p()),ct=v(()=>we.features.trafficSaving&&!p()&&m()&&!we.features.qualityDetailsSubMenuEnabled),Pi=v(()=>f().length>0&&!p()),jt=v(()=>!!b()&&!p()),wt=v(()=>we.features.audioLanguages&&y().length>=2&&!p()),oi=v(()=>!p());Nt(()=>Vt.subscribe(Et=>{Et&&!d()&&!n($e)&&!a()&&Pe()}));let Xt=v(()=>{let Et=[n(oi)&&"QUALITY_SETTINGS",n(wt)&&"AUDIO_LANGUAGES",n(jt)&&"PLAYBACK_RATE",n(Pi)&&"SUBTITLES",n(ct)&&"TRAFFIC_SAVING_SWITCH",n(pi)&&"DOWNLOAD",we.showSupport&&"SHOW_SUPPORT","COPY_DATA",we.features.saveTraceInfoToFile&&"SAVE_TRACE_INFO","DEBUG_INFO"].filter(Bt=>!!Bt);return Eb({items:Et,context:{qualityDetailsSubMenuEnabled:we.features.qualityDetailsSubMenuEnabled,availablePlaybackRates:$(),currentAudioStream:S(),availableAudioStreams:y(),currentPlaybackRate:C(),selectPlaybackRate:be,trafficSavingEnabled:I(),toggleTrafficSaving:st,currentQuality:R()||Pb.INVARIANT,isAutoQualityEnabled:E()||!1,currentSubtitle:P(),isMobile:d(),onDownloadClick:We,onCopyDataClick:ei,onReportProblemClick:nt,onSaveTraceDataClick:li,toggleShowDebugInfo:gi},additionalSettingsMenuItems:O()})}),bt=v(()=>Ib({subMenuId:J.current,context:{availablePlaybackRates:$(),selectPlaybackRate:be,trafficSavingEnabled:I(),toggleTrafficSaving:st,currentQuality:R()||Pb.INVARIANT,isAutoQualityEnabled:E()||!1,isAutoQualityAvailable:D()||!1,availableQualities:U(),highQualityEnabled:z(),toggleHighQuality:mt,availableAudioStreams:y(),availableSubtitlesList:f(),closeSettingsMenu:St,currentAudioStream:S(),isMobile:d(),selectAudioLanguage:Ve,selectQuality:It,selectSubtitle:Je}}));var je=IT();let xi;var oo=T(je);{var Jo=Et=>{var Bt=CT();let W;Bt.__keydown=[ST,St];var kt=T(Bt);{var di=Gt=>{var lt=TT();let Li;var Mi=T(lt),en=T(Mi,!0);w(Mi);var ko=k(Mi,2);ko.__click=Pe,w(lt),B((_o,Fi)=>{Li=se(lt,1,"item header s-v",null,Li,_o),pe(en,Fi)},[()=>({mobile:d()}),()=>Ot("submenu_settings")]),_(Gt,lt)};V(kt,Gt=>{d()&&Gt(di)})}var at=k(kt,2);let Tt;wi(at,21,()=>n(Xt),Gt=>Gt.id,(Gt,lt)=>{var Li=Le(),Mi=de(Li);{var en=_o=>{ev(_o,{get isMobile(){return d()},get id(){return n(lt).id},get icon(){return n(lt).icon},get label(){return n(lt).label},get ariaLabel(){return n(lt).ariaLabel},get value(){return n(lt).value},get valueComponent(){return n(lt).valueComponent},onClick:()=>{ye(n(lt).children),N(_e,n(lt).id,!0)},get ref(){return Y[n(lt).id]},set ref(Fi){Y[n(lt).id]=Fi}})},ko=(_o,Fi)=>{{var vr=bo=>{tv(bo,{get isMobile(){return d()},get id(){return n(lt).id},get onClick(){return n(lt).onClick},get icon(){return n(lt).icon},get label(){return n(lt).label},get ariaLabel(){return n(lt).ariaLabel},closeSettings:Pe})},no=(bo,Hi)=>{{var tn=on=>{ov(on,{get isMobile(){return d()},get id(){return n(lt).id},get onClick(){return n(lt).onClick},get icon(){return n(lt).icon},get label(){return n(lt).label},get ariaLabel(){return n(lt).ariaLabel},get enabled(){return n(lt).enabled},get tooltipText(){return n(lt).tooltipText},get maxTooltipWidth(){return n(lt).maxTooltipWidth}})};V(bo,on=>{n(lt).type==="SWITCH"&&on(tn)},Hi)}};V(_o,bo=>{n(lt).type==="CLICK"?bo(vr):bo(no,!1)},Fi)}};V(Mi,_o=>{n(lt).type==="OPEN_SUB_MENU"?_o(en):_o(ko,!1)})}_(Gt,Li)}),w(at),ot(at,Gt=>G(Gt),()=>G()),w(Bt),B((Gt,lt,Li)=>{W=se(Bt,1,"settings-menu menu s-v",null,W,Gt),Tt=se(at,1,"items",null,Tt,lt),Ge(at,Li)},[()=>({desktop:!d(),mobile:d(),hidden:!!J.current}),()=>({mobile:d()}),ho]),_t("mouseenter",Bt,bi),_t("mouseleave",Bt,io),_(Et,Bt)};V(oo,Et=>{r()&&Et(Jo)})}var _n=k(oo,2);wi(_n,17,()=>n(bt),Et=>Et.id,(Et,Bt)=>{let W=v(()=>{var kt;return(kt=n(Bt).minWidth)!=null?kt:137});Jm(Et,{get isMobile(){return d()},get playerControlsHeight(){return le()},get returnFromSubMenu(){return J.popSubMenu},get id(){return n(Bt).id},get title(){return n(Bt).title},get closeSettingsMenu(){return St},openSubMenuList:ye,get items(){return n(Bt).items},get minWidth(){return n(W)},get refMenuItems(){return Y},get listRef(){return re[n(Bt).id]},set listRef(kt){re[n(Bt).id]=kt}})}),w(je),B(Et=>xi=se(je,1,"settings-menu-container s-v",null,xi,Et),[()=>({mobile:d(),hidden:!r()})]),_(t,je),H(),o()}rt(["keydown","click"]);var PT=L('<button class="btn s-1g"> </button>'),AT={hash:"s-1g",code:"button.btn.s-1g{background:hsla(0,0%,100%,.1);border-radius:8px;font-size:14px;line-height:18px;margin-top:12px;padding:6px 12px 7px}"};function gv(t,e){q(t,AT);var i=PT();i.__click=function(...r){var a;(a=e.onClick)==null||a.apply(this,r)};var o=T(i,!0);w(i),B(()=>pe(o,e.label)),_(t,i)}rt(["click"]);var kT=L('<div class="container s-u"><div class="notification s-u"><div><p class="description s-u"><!></p> <!></div> <!></div></div>'),LT={hash:"s-u",code:".container.s-u{display:flex;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:20px}.notification.s-u{background:var(--notification-bg);border-radius:var(--notification-radius);display:inline-flex;gap:10px;padding:9px 14px 10px 12px;pointer-events:auto}.description.s-u{font-size:13px;line-height:16px;margin:0;white-space:pre}"};function xc(t,e){F(e,!0),q(t,LT);let i=340,{features:{forceAutoQualityWhenSevereStallHappens:o}}=Mt(),{ui:{t:r}}=ve(),a=r(o?"slow_video_notification_force_description":"slow_video_notification_suggest_description");var l=kT(),d=T(l),s=T(d),u=T(s),p=T(u);$c(p,{get message(){return a}}),w(u);var m=k(u,2);{var f=y=>{let $=v(()=>r("slow_video_notification_button"));gv(y,{get label(){return n($)},get onClick(){return e.onSelectAutoQuality}})};V(m,y=>{o||y(f)})}w(s);var b=k(s,2);Ls(b,{get onClick(){return e.onClose}}),w(d),w(l),Zr(3,d,()=>$s,()=>({duration:i})),_(t,l),H()}import{isIntersecting as Ab,Subscription as MT}from"@vkontakte/videoplayer-shared/es2015";var el="annotation",sp=class{constructor(){this.slots=new Map}init(e,i){this.shadowRootContainer=e,this.store=i}add(e,i){var d;let{overlay:o,id:r,controlsBehaviour:a,hideAllControls:l}=i;e.setAttribute("slot",el),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))}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"}}runHidingControlsWhenIntersected(r,a){return gt(this,arguments,function*(e,{observedSlotElementId:i,controlsToObserve:o}){var f;let l=this.slots.get(e);if(!l)return;let d=yield this.findSlotElement(l.rootElement,i,e),{controls:s,hiddenControls:u}=((f=this.store)==null?void 0:f.ui)||{},p=new MutationObserver(b=>b.forEach(()=>{let y=Vs(d,this.shadowRootContainer);o.forEach($=>{let S=s==null?void 0:s[$],C=S?ge(S):null,I=u==null?void 0:u[$];C&&(I==null||I.set(Ab(C,y)))})}));p.observe(d,{childList:!0,subtree:!0}),l.observer=p;let m=new MT;o.forEach(b=>{s&&m.add(s[b].subscribe(y=>{let $=u==null?void 0:u[b];y&&y.isDisplayed?$==null||$.set(Ab(y,Vs(d,this.shadowRootContainer))):$==null||$.set(!1)}))}),l.subs=m})}findSlotElement(e,i,o){return gt(this,null,function*(){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,p;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(m=>m==null?void 0:m.disconnect()),l==null||l.unsubscribe(),this.slots.delete(e),s&&((u=this.store)==null||u.ui.isControlsAvailable.set(!0)),(p=d==null?void 0:d.controlsToObserve)==null||p.forEach(m=>{var f,b;(b=(f=this.store)==null?void 0:f.ui.hiddenControls[m])==null||b.set(!1)})}destroy(){for(let e in this.slots.keys())this.remove(e);this.slots.clear()}haveSlots(){return this.slots.size>0}};var VT=L('<div class="container s-4"><!></div>'),RT={hash:"s-4",code:".container.s-4{align-items:center;animation-fill-mode:forwards;animation-name:s-4-videoPlayerStatusIconPopup;background-color:#00000073;border-radius:100%;display:flex;height:64px;justify-content:center;width:64px;will-change:opacity,scale}@keyframes s-4-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 wc(t,e){F(e,!0),q(t,RT);let i=g(e,"reversed",3,!1);var o=Le(),r=de(o);Is(r,()=>e.Icon,a=>{var l=VT(),d=T(l);Di(d,()=>e.Icon,(s,u)=>{u(s,{get size(){return"48"},get reversed(){return i()}})}),w(l),B(()=>Ge(l,`animation-duration: ${e.duration}ms`)),_(a,l)}),_(t,o),H()}import{PlaybackState as kb}from"@vkontakte/videoplayer-core/es2015";var NT=L('<div class="container s-16"><!></div>'),OT={hash:"s-16",code:".container.s-16{align-items:center;display:flex;height:100%;justify-content:center;pointer-events:none;position:absolute;width:100%}"};function hv(t,e){F(e,!0),q(t,OT);let[i,o]=Re(),r=()=>x(s,"$playbackState$",i),a=()=>x(p,"$previewTrackActive",i),l=()=>x(m,"$previewTrackDragInProgress",i),d=()=>x(u,"$isPlaying$",i),{state:{playbackState$:s,isPlaying$:u},ui:{previewTrackActive:p,previewTrackDragInProgress:m}}=ve(),{features:{playbackStatusShow:f},playbackStatusAnimationDuration:b}=Mt(),y=0,$=K(null),S=K(!1);De(()=>{r()===kb.PLAYING?N($,Ln,!0):r()===kb.PAUSED?N($,Os,!0):N($,null)}),De(()=>{if(!(!f||a()||l()))return y=window.setTimeout(()=>{y=0,N($,null)},b),()=>{y&&(window.clearTimeout(y),y=0)}}),De(()=>{d()&&!n(S)&&(N(S,!0),N($,null))});var C=Le(),I=de(C);{var R=E=>{var P=NT(),O=T(P);wc(O,{get duration(){return b},get Icon(){return n($)}}),w(P),_(E,P)};V(I,E=>{n($)&&f&&E(R)})}_(t,C),H(),o()}var DT=L('<div><div data-testid="video-container"></div></div>'),BT={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 tl(t,e){F(e,!0),q(t,BT);let[i,o]=Re(),r=()=>x(p,"$rotateAlpha",i),a=()=>x(m,"$playerSize",i),l=()=>x(u,"$playerPhase",i),d=()=>x(f,"$isPlaying$",i),s=g(e,"videoContainer",15),{playerPhase:u,ui:{rotateAlpha:p,playerSize:m},state:{isPlaying$:f}}=ve(),{isSmoothVideoRotate:b}=Mt(),y=v(()=>s()&&r()%180?a().height/a().width:1);var $=DT();let S;$.__contextmenu=function(...R){var E;(E=e.onContextMenu)==null||E.apply(this,R)},$.__mousedown=function(...R){var E;(E=e.onMouseDown)==null||E.apply(this,R)},$.__mouseup=function(...R){var E;(E=e.onMouseUp)==null||E.apply(this,R)},$.__click=function(...R){var E;(E=e.onClick)==null||E.apply(this,R)},$.__dblclick=function(...R){var E;(E=e.onDblClick)==null||E.apply(this,R)};var C=T($);let I;ot(C,R=>s(R),()=>s()),w($),B((R,E)=>{S=se($,1,"video-wrapper s-c",null,S,R),I=se(C,1,"video-container s-c",null,I,E),Ge(C,`transform: rotate(${r()}deg) scale(${n(y)})`),Ue(C,"data-is-playing",d())},[()=>({hidden:l()!=="video",nocursor:e.hideCursor}),()=>({"fast-rotate":!b})]),_(t,$),H(),o()}rt(["contextmenu","mousedown","mouseup","click","dblclick"]);var FT=L('<div><span class="text s-18"> </span> <!></div>'),HT={hash:"s-18",code:".root.s-18{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-18,.root.visible.s-18{transform:translateX(-50%)}.root.visible.s-18{opacity:1;visibility:visible}.text.s-18{font-size:13px;font-weight:600;line-height:16px}"};function _v(t,e){F(e,!0),q(t,HT);let{ui:{t:i}}=ve();var o=FT();let r;var a=T(o),l=T(a,!0);w(a);var d=k(a,2);vc(d,{get size(){return"16"},fill:"currentColor"}),w(o),B((s,u)=>{r=se(o,1,"root s-18",null,r,s),pe(l,u)},[()=>({visible:e.isVisible}),()=>i("double_forward_label")]),_(t,o),H()}var UT=L('<div class="container s-14" role="button" data-testid="preview-track-overlay"><div class="icon s-14"><!></div></div>'),zT={hash:"s-14",code:".container.s-14{background-color:rgba(0,0,0,.48);cursor:pointer;height:100%;position:absolute;width:100%}.container.s-14,.icon.s-14{align-items:center;display:flex;justify-content:center}.icon.s-14{background-color:#00000073;border-radius:100%;height:64px;transition:transform .2s;transition-timing-function:ease-out;width:64px;will-change:transform}.container.s-14:hover .icon:where(.s-14){transform:scale(1.15)}"};function bv(t,e){F(e,!1),q(t,zT);let o=ve().actions.internal.closePreviewTrack,r=200,a=u=>{u.stopPropagation(),o()};xo();var l=UT();l.__click=a;var d=T(l),s=T(d);return Ln(s,{get size(){return"32"}}),w(d),w(l),Zr(3,l,()=>$s,()=>({duration:r})),_(t,l),pf(e,"handleClick",a),H({handleClick:a})}rt(["click"]);var WT=L('<div class="container s-17"><div class="notification s-17"><span class="text s-17"> </span></div></div>'),KT={hash:"s-17",code:".container.s-17{display:flex;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:20px}.notification.s-17{background-color:var(--black-alpha-40);border-radius:var(--notification-radius);padding:10px 16px}.text.s-17{font-size:14px;font-weight:500;line-height:18px}"};function $v(t,e){F(e,!1),q(t,KT);let{ui:{t:i}}=ve();xo();var o=WT(),r=T(o),a=T(r),l=T(a,!0);w(a),w(r),w(o),B(d=>pe(l,d),[()=>i("preview_track_notification_text")],Tn),Zr(3,r,()=>$s,()=>({duration:340})),_(t,o),H()}var qT=(t,e,i,o,r,a)=>{if(t.stopPropagation(),e()||o()){a();return}},QT=L("<div><!></div>"),GT=L('<div class="spherical-video-icon s-8"><!></div>'),YT=L("<div><!></div>"),jT=L('<div class="settings-menu s-8"><!></div>'),XT=L("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),ZT=L("<!> <!> <!>",1),JT=L('<div class="blocked s-8"></div>'),eC=L('<div class="player-wrapper s-8"><!> <div class="overlay-container"></div></div> <!>',1),tC={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 yv(t,e){F(e,!0),q(t,tC);let[i,o]=Re(),r=()=>x(ti,"$notificationsToShow$",i),a=()=>x(pi,"$playerPhase",i),l=()=>x(oo,"$isLoaderVisible",i),d=()=>x(bi,"$adPlaybackState",i),s=()=>x(di,"$crashed",i),u=()=>x(_o,"$isInteractiveTime$",i),p=()=>x(wt,"$settingsMenuVisible",i),m=()=>x(Fi,"$isInteractiveExpectation$",i),f=()=>x(jt,"$controlsVisible",i),b=()=>x(no,"$touched",i),y=()=>x(hr,"$graphIsOpened$",i),$=()=>x(ct,"$isFullscreen",i),S=()=>x(ts,"$autoplayNextEnabled$",i),C=()=>x(Bt,"$postrollPassed",i),I=()=>x(Jo,"$isEnded$",i),R=()=>x(tr,"$cursorInside",i),E=()=>x(Xn,"$isControlsAvailable",i),P=()=>x(Lo,"$doubleForwardOn$",i),O=()=>x(Or,"$fakeIsPlaying$",i),D=()=>x($r,"$bottomNoSmooth",i),U=()=>x(on,"$interactiveTimeIndicator",i),z=()=>x(Li,"$playerSize",i),G=()=>x(Mi,"$is3DVideo",i),le=()=>x(rn,"$doubleForwardAvailable$",i),Y=()=>x(je,"$contextMenuVisible$",i),re=()=>x(gi,"$playbackState$",i),X=()=>x(bo,"$hotKeyMapData",i),we=()=>x(Xt,"$scrubbingInProgress",i),ce=()=>x(bt,"$volumeChangingInProgress",i),ne=()=>x(_n,"$chromecastConnected$",i),he=()=>x(sn,"$controlsTimeoutActive",i),xe=()=>x(oi,"$settingsMenuOpenedByKeyboard",i),Z=()=>x(ss,"$contextMenuOpenedByKeyboard$",i),Ne=()=>x(Si,"$contextMenuOpenedByHotKey$",i),ue=()=>x(Xe,"$contextMenuButtonRef$",i),A=()=>x(Uo,"$contextMenuLastActiveElem$",i),Ke=()=>x(Pi,"$isFullscreenOpenedByKeyboard",i),Ce=()=>x(li,"$language$",i),j=()=>x(uo,"$previewTrackActive$",i),ie=()=>x(en,"$icon3DVideoVisible",i),Oe=()=>x(Et,"$chromecastDeviceName$",i),Be=()=>x(Gt,"$currentSubtitle$",i),fe=()=>x(lt,"$currentSubtitleCaptions$",i),ee=()=>x(io,"$position$",i),Se=()=>x(ho,"$duration$",i),Fe=()=>x(W,"$isLive$",i),qe=()=>x(kt,"$isPlaying$",i),Ye=()=>x(gr,"$contextMenuPosition$",i),Te=()=>x(Zn,"$previewTrackNotificationVisible$",i),Me=()=>x(Hi,"$showHotKeyMap",i),ze=()=>x(xi,"$debugPanelVisible",i),Vt=()=>x(is,"$userActionsDisabled$",i),et=g(e,"videoContainer",15),Ot=g(e,"adsSlotId",3,void 0),qt=g(e,"adsParams",3,void 0),St=g(e,"adsAutoplayParam",3,void 0),Jt=g(e,"duration",3,void 0),Dt=g(e,"logoTargetUrl",3,""),$e=g(e,"showNextPrevButtons",3,!1),_e=g(e,"nextButtonActive",3,!1),J=g(e,"prevButtonActive",3,!1),ye=g(e,"endScreenVideoTitle",3,void 0),Pe=g(e,"endScreenVideoThumb",3,void 0),It=g(e,"isOneVideoPlaylist",3,!1),Ve=g(e,"shadowRootContainer",3,void 0),st=g(e,"outerContainerRef",3,void 0),mt=g(e,"playerStarted",3,!1),be=g(e,"fullScreenTarget",3,void 0),Je=g(e,"showMiniTimer",3,!1),We=g(e,"showEndScreen",3,!0),nt=g(e,"keyboardControls",15),ei=e.store.getLogger().createComponentLog("Root component"),li=e.store.interfaceLanguage$,gi=e.store.state.playbackState$,bi=e.store.ads.playbackState,io=e.store.state.positionWithScrubbing$,ho=e.store.state.duration$,pi=e.store.playerPhase,ct=e.store.ui.isFullscreen,Pi=e.store.ui.isFullscreenOpenedByKeyboard,jt=e.store.ui.controlsVisible,wt=e.store.ui.settingsMenu.visible$,oi=e.store.ui.settingsMenu.openedByBtnKeyboard$,Xt=e.store.ui.scrubbingInProgress,bt=e.store.ui.volumeChangingInProgress,je=e.store.ui.contextMenu.visible$,xi=e.store.ui.debugPanelVisible,oo=e.store.state.isLoaderVisible,Jo=e.store.state.isEnded$,_n=e.store.state.chromecastConnected$,Et=e.store.state.chromecastDeviceName$,Bt=e.store.ads.postrollPassed,W=e.store.state.isLive$,kt=e.store.state.isPlaying$,di=e.store.state.crashed$,at=e.store.webApi.annotationsApi,Tt=e.store.webApi.pictureInPictureApi,Gt=e.store.state.currentSubtitle$,lt=e.store.state.currentSubtitleCaptions$,Li=e.store.ui.playerSize,Mi=e.store.ui.is3DVideo,en=e.store.ui.icon3DVideoVisible,ko=e.store.state.isInteractive,_o=e.store.state.isInteractiveTime$,Fi=e.store.state.isInteractiveExpectation$,vr=e.store.state.hasInteractiveBranches,no=e.store.ui.touched,bo=e.store.ui.modals.hotKeyMap.data,Hi=e.store.ui.modals.hotKeyMap.show,tn=e.store.ui.overlayContainer$,on=e.store.ui.controls.interactiveTimeIndicator,jn=e.store.state.showInteractiveTimeIndicator,gr=e.store.ui.contextMenu.position$,Rr=e.store.actions.internal.setQuality,ys=e.store.actions.internal.closeSettingsMenu,ts=e.store.ui.autoplayNextEnabled$,is=e.store.ui.userActionsDisabled,Xn=e.store.ui.isControlsAvailable,nn=e.store.ui.videoTitleInfo,Lo=e.store.ui.doubleForwardOn$,rn=e.store.ui.doubleForwardAvailable$,Zn=e.store.ui.previewTrackNotificationVisible,Vn=e.store.actions.internal.getVideoElement,Nr=e.store.actions.internal.checkFullscreenSupport,{fakeIsPlaying$:Or,notifications$:os,graphIsOpened$:hr}=wo(),ro=K(void 0),_r=K(void 0),Jn=K(void 0),bn=K(void 0),so,Dr,Rn;bo.set(T_());let{closeNotification:vt,notificationsToShow$:ti}=os,er=v(()=>!!r().slow_video),br=()=>vt("slow_video"),Br=v(()=>(a()==="video"&&l()||a()==="ads"&&d()==="inactive")&&!s()),$n=K(void 0),$r=ae(!1),Mo,sn=ae(!1),Vo=ae(),tr=ae(!1),Ui=K(!1),Ro=K(!1),ir=K(!1),Fr=K(!(e.autoplay&&!e.uiConfig.controls.showOnStartupAtAutoplay)),ao=v(()=>u()&&!p()&&!(n(Ui)||n(Ro))&&!(n(ir)&&!m())),Nn=!0,No=v(()=>e.uiConfig.features.thumbTimer&&Je()&&a()==="video"&&!f()&&!s()&&!ko&&(e.uiConfig.hideThumbTimerAfterTouch&&!b()||!e.uiConfig.hideThumbTimerAfterTouch)),Hr=v(()=>a()==="video"&&!y()&&$()),or=K(!1),On=v(()=>(We()||e.showAutoplayNext&&S())&&!!ye()&&!!Pe()&&(e.showAds&&C()||!e.showAds)&&I()&&!s()&&!n(or)),Ur=v(()=>R()&&!(f()||n(On))&&!u()&&E()&&!P()),xt=K(!1),Ct=v(()=>O()!==null),{toggle:lo}=Or,Xi=!1,zi=null;Tt==null||Tt.setContext(ad());let yn=()=>{e.autoplay&&!ko&&e.uiConfig.controls.showOnStartupAtAutoplay&&mi(e.uiConfig.controls.hideTimeout)};e.store.setUiCallbacks({onStarted:yn});let $o=()=>{window.clearTimeout(so),sn.set(!1)},Dn=()=>{window.clearTimeout(Dr),Vo.set(null)},mi=me=>{$o(),sn.set(!0),so=window.setTimeout(()=>sn.set(!1),me);let pt=me-100;Mo=window.setTimeout(()=>{D()&&$r.set(!1)},pt>0?pt:me)},zr=(me,pt)=>{Dn(),Vo.set(pt),Dr=window.setTimeout(()=>Vo.set(null),me)},xn=Mi.subscribe(me=>{en.set(me),me&&(window.clearTimeout(Rn),Rn=window.setTimeout(()=>en.set(!1),e.uiConfig.controls.hide360IconTimeout))}),Oo=()=>gt(null,null,function*(){var pt,Zt,Ti,Wi;let me=ia();if(me){let ni=Vd(),ii=xr();me=ni===ii||ni===Ve()}if(me){mi(e.uiConfig.controls.hideTimeoutFullscreen);try{yield Tt==null?void 0:Tt.exit()}catch(ni){ei({message:String(ni)})}}ct.set(me),e.store.getAdmanWrapper().setFullscreen(me),$()?(Zt=(pt=e.store.callbacks)==null?void 0:pt.onFullscreenEnter)==null||Zt.call(pt):(Wi=(Ti=e.store.callbacks)==null?void 0:Ti.onFullscreenExit)==null||Wi.call(Ti)}),yr=me=>{let{width:pt,height:Zt}=me.target;Li.set({width:pt,height:Zt})},nr=()=>{let{width:me,height:pt}=n(ro).getBoundingClientRect();Li.set({width:me,height:pt})};Nt(()=>{var pt;return Mu(Oo),e.uiConfig.features.annotationsInside&&(at==null||at.init(n(ro))),Oa(Tt)&&(Tt==null||Tt.assignPlayerContainer(n(ro)),Tt==null||Tt.setExternalEventHandlers({resize:yr,leavepictureinpicture:nr})),e.interactiveContainer&&((pt=et().parentElement)==null||pt.insertBefore(e.interactiveContainer,et().nextSibling)),()=>{window.clearTimeout(so),window.clearTimeout(Mo),window.clearTimeout(Dr),window.clearTimeout(Rn),xn(),Tt==null||Tt.dispose().catch(Zt=>{ei({message:String(Zt)})}),Vu(Oo)}});let xr=()=>{let me=e.uiConfig.features.fullscreenInternalTargetPlayerContainer||!st()?n(ro):st(),pt=me.getRootNode(),Zt=pt instanceof ShadowRoot?pt.host:pt,Ti=be()instanceof HTMLElement&&be().contains(Zt);return e.uiConfig.allowChangingFullscreenTarget&&be()&&Ti?be():me},wn=()=>{je.set(!1)},an=()=>{ys(),wn()},Wr=()=>gt(null,null,function*(){if(!Nr()){ei({message:"fullscreen disabled"});return}wn(),ia()?(yield Lu(document),ei({message:"exit fullscreen"})):(ei({message:"request fullscreen"}),yield ku(xr()))}),ln=me=>{y()||(me.preventDefault(),je.set(!0),gr.set({left:me.clientX,top:me.clientY}))};function ns(){tr.set(!0),ko||mi(e.uiConfig.controls.hideTimeoutCursor)}function Qe(me){var Wi,ni;let{relatedTarget:pt}=me,Ti=!!(pt&&((Wi=n(Jn))!=null&&Wi.contains(pt)))&&((ni=nt())==null?void 0:ni.isFocused());!ko&&!Ti&&($r.set(!0),mi(e.uiConfig.controls.hideTimeoutCursor))}function Lt(){tr.set(!1),N(Ro,!1),N(Ui,!1),Xi=!1,e.store.actions.internal.releaseCamera(),mi(e.uiConfig.controls.hideTimeout),P()&&Fo()}function $i(me){return me?me.offsetTop+$i(me.offsetParent):0}function So(me){return me?me.offsetLeft+So(me.offsetParent):0}function To(me){if(U()&&jn){let pt=me.currentTarget,Zt=$i(pt),Ti=So(pt),Wi=me.pageX-Ti,ni=me.pageY-Zt,{left:ii,bottom:po,right:Bn}=U(),Fn=Bn-ii;return Wi>=ii-Fn&&ni<=po+Fn}}function Do(me){if(n(ro)){let pt=$i(me.currentTarget),Zt=z().height,Ti=me.pageY-pt;if(To(me)){N(Ro,!1);return}Ti<40?N(Ro,!0):Ti>Zt-40?N(Ui,!0):(N(Ro,!1),p()||N(Ui,!1))}}function co(me){Do(me),!n(ao)&&!P()&&mi(e.uiConfig.controls.hideTimeoutCursor),G()&&Xi&&zi&&e.store.actions.internal.moveCameraFocusPX(zi.clientX-me.clientX,zi.clientY-me.clientY,me.timeStamp-zi.timeStamp),zi=me}let Vi=null,Bo=()=>{Vi=window.setTimeout(()=>{e.store.actions.internal.changeDoubleForwardOn(!0),$o()},e.uiConfig.doubleForwardActivationTime)},Fo=()=>{e.store.actions.internal.changeDoubleForwardOn(!1),Vi&&clearTimeout(Vi),Vi=null},yo=me=>{me.preventDefault(),me.button===0&&(Xi=!0,e.store.actions.internal.holdCamera(),le()&&Bo()),!Xi&&mi(e.uiConfig.controls.hideTimeoutCursor)},Ho=me=>{me.preventDefault(),me.button===0&&(zi=me,Xi=!1,e.store.actions.internal.releaseCamera()),!P()&&mi(e.uiConfig.controls.hideTimeoutCursor)},dn=me=>{me.preventDefault(),Nn&&(ei({message:"double click on video"}),Wr(),mi(e.uiConfig.controls.hideTimeoutCursor))},wr=me=>{var pt;if(me.preventDefault(),P()){Fo();return}if(Vi&&Fo(),Y()||p()){an();return}if(!(I()&&!vr)){if(n(Ct))return lo();if((pt=nt())==null||pt.focus(),!mt()){e.firstStart(),mi(e.uiConfig.controls.hideTimeoutCursor);return}(!e.uiConfig.preventPauseOnVideoClick||re()!==Mb.PLAYING)&&e.store.actions.internal.togglePlay(),mi(e.uiConfig.controls.hideTimeoutCursor)}},Sr=me=>{an(),no.set(!0),mi(e.uiConfig.controls.hideTimeout),me&&zr(e.uiConfig.controls.hideHotKeyHelpers,me)},Tr=()=>{var me,pt;an(),(me=e.store.callbacks)!=null&&me.onOpenHotKeyMap?(pt=e.store.callbacks)==null||pt.onOpenHotKeyMap(X()):Hi.update(Zt=>!Zt)},rs=()=>{no.set(!0)},ss=e.store.ui.contextMenu.openedByBtnKeyboard$,Xe=e.store.ui.contextMenu.btnRef$,zt=K(void 0),Si=e.store.ui.contextMenu.openedByHotKey$,Uo=e.store.ui.contextMenu.lastActiveElem$,uo=e.store.ui.previewTrackActive;De(()=>{tn.set(n($n))}),De(()=>{N(ir,n(Fr)&&re()!==Mb.PLAYING,!0),n(Fr)||Pt(()=>N(Fr,!0))}),De(()=>{var pt,Zt;let me=(n(ir)||I()||p()||we()||ce()||ne()||he())&&!n(ao)&&(a()==="video"||a()==="ads")&&!s()&&E();jt.set(me),!me&&!he()&&e.uiConfig.returnFocusOnControlsHide&&((pt=n(Jn))!=null&&pt.contains(Hu()))&&((Zt=nt())==null||Zt.focus())}),De(()=>{!we()&&n(xt)&&!u()&&mi(e.uiConfig.controls.hideTimeoutCursor),Pt(()=>N(xt,we(),!0))}),De(()=>{n(bn),p(),xe(),Pt(()=>Hd(n(bn),p(),xe()))}),De(()=>{n(zt),Y(),Z(),Ne(),Pt(()=>{let me=Z()||Ne();Hd(n(zt),Y(),me)})}),De(()=>{let me=ue();me&&(Y(),Pt(()=>Bl(me,Y(),ss)))}),De(()=>{let me=A();me&&(Y(),Pt(()=>L_(me,Y(),Si)))}),De(()=>{var me;!Ke()&&$()&&(Pt(()=>Pi.set(!1)),(me=nt())==null||me.focus())}),De(()=>{y()&&an()});let Cr=K(void 0),cn=me=>{nn.set(Gn(Vn(),{title:n(Cr)},"title",me))},Ir=(me,pt)=>{var ni,ii;let Zt=(ii=(ni=e.store.callbacks)==null?void 0:ni.uiInfo)==null?void 0:ii.onUpcomingLiveViewStateChanged;if(!Zt)return;let Ti=!!pt,Wi=Ae(Ae({},Gn(n(ro),{upcomingLiveScreen:pt},"upcomingLiveScreen",Ti)),me);Zt(Wi)};var Fs=eC();_t("blur",Ta,an);var Sn=de(Fs);Sn.__mousemove=co;var Hs=T(Sn);let rr=v(()=>a()==="ads"),as=v(()=>n(Ct)?lo:void 0);ot(Gf(Hs,{startDoubleForwardActivationTimer:Bo,stopDoubleForward:Fo,toggleFullscreen:Wr,hideContextMenu:an,showHotKeyHelpers:Sr,showKeyMap:Tr,get isAds(){return n(rr)},get fakePlayButtonHandler(){return n(as)},get nextButtonActive(){return _e()},get prevButtonActive(){return J()},children:(me,pt)=>{var Zt=ZT(),Ti=de(Zt);tl(Ti,{get hideCursor(){return n(Ur)},onClick:wr,onContextMenu:ln,onMouseDown:yo,onMouseUp:Ho,onDblClick:dn,get videoContainer(){return et()},set videoContainer(ii){et(ii)}});var Wi=k(Ti,2);ka(Wi,()=>"slot",!1,(ii,po)=>{Ji(ii,()=>({name:el}))});var ni=k(Wi,2);Is(ni,Ce,ii=>{var po=XT(),Bn=de(po);let Fn=v(()=>a()!=="thumb"||s()||ko&&e.autoplay);Xa(Bn,{get hidden(){return n(Fn)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart},onContextMenu:ln,onClick:wn});var Ai=k(Bn,2);{var ed=He=>{bv(He,{})};V(Ai,He=>{j()&&He(ed)})}var il=k(Ai,2);hv(il,{});var Us=k(il,2);_v(Us,{get isVisible(){return P()}});var ca=k(Us,2);{var ua=He=>{let hi=v(()=>{var Ko;return(Ko=e.live)==null?void 0:Ko.startTime});_c(He,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(hi)},onUpcomingLiveViewStateChanged:Ir,onContextMenu:ln,onClick:wn})};V(ca,He=>{a()==="LiveWaitingStart"&&He(ua)})}var un=k(ca,2);{var ol=He=>{Za(He,{kind:"recover",get thumbUrl(){return e.thumbUrl},onContextMenu:ln,onClick:wn})};V(un,He=>{a()==="LiveWaitingRecover"&&He(ol)})}var pa=k(un,2);{var Kr=He=>{Za(He,{kind:"record",get thumbUrl(){return e.thumbUrl},onContextMenu:ln,onClick:wn})};V(pa,He=>{a()==="LiveWaitingRecord"&&He(Kr)})}var ls=k(pa,2);{var zs=He=>{var hi=QT();let Ko;var ha=T(hi);Nd(ha,{get adsSlotId(){return Ot()},get adsParams(){return qt()},get adsAutoplayParam(){return St()},get duration(){return Jt()},get adsExternalApi(){return e.adsExternalApi}}),w(hi),B(Co=>Ko=se(hi,1,"ads-container s-8",null,Ko,Co),[()=>({hidden:a()!=="ads"})]),_(He,hi)};V(ls,He=>{e.showAds&&mt()&&He(zs)})}var fa=k(ls,2);{var nl=He=>{let hi=v(()=>!We()&&e.showAutoplayNext&&S());Kf(He,{get title(){return ye()},get thumb(){return Pe()},get isHide(){return n(hi)},clickCloseIcon:()=>N(or,!0)})};V(fa,He=>{n(On)&&ye()&&Pe()&&He(nl)})}var rl=k(fa,2);{var td=He=>{let hi=v(()=>!f());Qm(He,{get title(){return e.title},get isHidden(){return n(hi)},onVisibilityChanged:cn,get ref(){return n(Cr)},set ref(Ko){N(Cr,Ko,!0)}})};V(rl,He=>{n(Hr)&&He(td)})}var sl=k(rl,2);{var al=He=>{let hi=v(()=>a()==="video"&&f());gc(He,{get isShifted(){return n(hi)}})};V(sl,He=>{G()&&He(al)})}var Er=k(sl,2);{var id=He=>{var hi=GT(),Ko=T(hi);Md(Ko,{}),w(hi),_(He,hi)};V(Er,He=>{ie()&&He(id)})}var ma=k(Er,2);{var ll=He=>{hc(He,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return Oe()}})};V(ma,He=>{ne()&&He(ll)})}var dt=k(ma,2);{var ft=He=>{Ya(He,{get shifted(){return f()},get captions(){return fe()},get position(){return ee()},get playerSize(){return z()}})};V(dt,He=>{Be().value!=="off"&&He(ft)})}var Ki=k(dt,2);{var Wo=He=>{var hi=YT();hi.__contextmenu=ln,hi.__click=[qT,Y,je,p,wt,an];var Ko=T(hi);ja(Ko,{}),w(hi),_(He,hi)};V(Ki,He=>{s()&&He(Wo)})}var qi=k(Ki,2);{var yi=He=>{let hi=v(()=>a()==="thumb"||a()==="LiveWaitingStart"||a()==="LiveWaitingRecover"||a()==="LiveWaitingRecord"),Ko=v(()=>a()==="ads"),ha=v(()=>e.canRewindLive&&Se()!==0);mc(He,{get bottomHidden(){return n(hi)},get bottomNoSmooth(){return D()},get showControls(){return f()},get isAds(){return n(Ko)},get canRewindLive(){return n(ha)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return Dt()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return $e()},get nextButtonActive(){return _e()},get prevButtonActive(){return J()},get isOneVideoPlaylist(){return It()},customFullscreenSupported:Nn,toggleFullscreen:Wr,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return n(_r)},set playerControlsWrapperRef(Co){N(_r,Co,!0)},get playerControlsRef(){return n(Jn)},set playerControlsRef(Co){N(Jn,Co,!0)}})};V(qi,He=>{mt()&&He(yi)})}var Ri=k(qi,2);{var va=He=>{var hi=jT(),Ko=T(hi);let ha=v(()=>{var Co;return(Co=n(Jn))==null?void 0:Co.clientHeight});yc(Ko,{get supportLink(){return e.supportLink},get playerControlsHeight(){return n(ha)},returnFocus:()=>{var Co;return(Co=nt())==null?void 0:Co.focus()},get ref(){return n(bn)},set ref(Co){N(bn,Co,!0)}}),w(hi),_(He,hi)};V(Ri,He=>{!ne()&&a()!=="ads"&&He(va)})}var dl=k(Ri,2);let _p=v(()=>!n(No));Bd(dl,{get isLive(){return Fe()},get isHidden(){return n(_p)},get isPlaying(){return qe()},get position(){return ee()},get duration(){return Se()}});var Rc=k(dl,2);Km(Rc,{get data(){return Vo}});var Nc=k(Rc,2);Wf(Nc,{get supportLink(){return e.supportLink},returnFocus:()=>{var He;return(He=nt())==null?void 0:He.focus()},get visible(){return Y()},get playerContainerRef(){return n(ro)},get position(){return Ye()},get menuElementRef(){return n(zt)},set menuElementRef(He){N(zt,He,!0)}});var ga=k(Nc,2);{var bp=He=>{xc(He,{onClose:br,onSelectAutoQuality:()=>{Rr("auto"),br()}})};V(ga,He=>{n(er)&&He(bp)})}var Ws=k(ga,2);{var cl=He=>{$v(He,{})};V(Ws,He=>{Te()&&He(cl)})}var Oc=k(Ws,2);{var Dc=He=>{Ha(He,{})};V(Oc,He=>{n(Br)&&He(Dc)})}var ul=k(Oc,2);{var Bc=He=>{Xf(He,{})};V(ul,He=>{Me()&&He(Bc)})}var $p=k(ul,2);{var Fc=He=>{Wd(He,{})};V($p,He=>{ze()&&He(Fc)})}_(ii,po)}),_(me,Zt)},$$slots:{default:!0}}),me=>nt(me),()=>nt());var ut=k(Hs,2);ot(ut,me=>N($n,me),()=>n($n)),w(Sn),ot(Sn,me=>N(ro,me),()=>n(ro));var fi=k(Sn,2);{var zo=me=>{var pt=JT();_(me,pt)};V(fi,me=>{Vt()&&me(zo)})}_t("mouseenter",Sn,ns),_t("mouseleave",Sn,Lt),_t("click",Sn,rs,!0),_t("focusin",Sn,Qe,!0),_(t,Fs),H(),o()}rt(["mousemove","contextmenu","click"]);import{clientChecker as Sc,PlaybackState as uC}from"@vkontakte/videoplayer-core/es2015";import{noop as pC}from"@vkontakte/videoplayer-shared/es2015";var iC=L('<div></div> <div class="info s-o"><div class="triangles-wrapper s-o"><div></div> <div></div> <div></div></div> <p class="step-caption s-o"> </p></div>',1),oC=L("<div><!></div>"),nC={hash:"s-o",code:".double-click-area.s-o{height:100%;overflow:hidden;position:absolute;top:0;width:25%}.double-click-area.left.s-o{left:0}.double-click-area.right.s-o{right:0}.semicircle.s-o{background-color:rgba(0,0,0,.5);height:100%;position:absolute;top:0;width:100%}.semicircle.left.s-o{border-bottom-right-radius:50%;border-top-right-radius:50%;left:0}.semicircle.right.s-o{border-bottom-left-radius:50%;border-top-left-radius:50%;right:0}.info.s-o{align-items:center;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.info.s-o,.triangles-wrapper.s-o{display:flex;justify-content:center}.triangles-wrapper.s-o{margin-bottom:10px;position:relative}.triangle.s-o{animation:s-o-blink .5s infinite;border-bottom:6px solid transparent;border-top:6px solid transparent;height:0;opacity:0;width:0}.triangle.left.s-o:nth-child(3),.triangle.right.s-o:first-child{animation-delay:0s}.triangle.left.s-o:nth-child(2),.triangle.right.s-o:nth-child(2){animation-delay:.1s}.triangle.left.s-o:first-child,.triangle.right.s-o:nth-child(3){animation-delay:.2s}@keyframes s-o-blink{0%{opacity:0}50%{opacity:1}to{opacity:0}}.triangle.left.s-o{border-right:8px solid var(--white)}.triangle.right.s-o{border-left:8px solid var(--white)}.triangle.s-o:not(:last-child){margin-right:5px}.step-caption.s-o{color:var(--white);font-size:12px;line-height:1;margin:0;text-align:center}"};function ap(t,e){F(e,!0),q(t,nC);let i=g(e,"seekStep",3,0),o=K(!1),r=0,a=0,l=K(ci(i())),d=m=>{m.stopPropagation(),a+=1,N(l,i()*(a-1)),a===1?e.handleSingleFirstClick(m):(N(o,!0),e.handleSecondClick()),window.clearTimeout(r),r=window.setTimeout(()=>{a=0,N(o,!1)},300)};mn(()=>{window.clearTimeout(r)});var s=oC();s.__click=d;var u=T(s);{var p=m=>{var f=iC(),b=de(f),y=k(b,2),$=T(y),S=T($),C=k(S,2),I=k(C,2);w($);var R=k($,2),E=T(R,!0);w(R),w(y),B(P=>{var O,D,U,z;se(b,1,`semicircle ${(O=e.side)!=null?O:""}`,"s-o"),se(S,1,`triangle ${(D=e.side)!=null?D:""}`,"s-o"),se(C,1,`triangle ${(U=e.side)!=null?U:""}`,"s-o"),se(I,1,`triangle ${(z=e.side)!=null?z:""}`,"s-o"),pe(E,P)},[()=>Q("doubletap_seek_step",{seconds:n(l).toFixed(0)})]),_(m,f)};V(u,m=>{n(o)&&m(p)})}w(s),B(()=>{var m;return se(s,1,`double-click-area ${(m=e.side)!=null?m:""}`,"s-o")}),_(t,s),H()}rt(["click"]);var rC=(t,e,i)=>{e(!1),i()},sC=L('<div class="overlay s-n"></div> <div class="next-video s-n"><div class="top s-n"><div class="caption s-n"> </div> <!></div> <div class="row s-n"><div class="column s-n"><div class="thumb s-n"><div></div> <!></div></div> <div class="column s-n"><div class="title s-n"> </div></div></div></div>',1),aC={hash:"s-n",code:".overlay.s-n{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-n{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-n{display:flex;justify-content:space-between}.caption.s-n{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-n{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-n{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-n{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-n,.thumb-overlay.s-n{height:100%;width:100%}.thumb-overlay.s-n{position:absolute}.thumb-overlay.withOpacity.s-n{background:var(--black);opacity:.3}.title.s-n{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function xv(t,e){F(e,!0),q(t,aC);let[i,o]=Re(),r=()=>x(d,"$autoplayNextEnabled$",i),a=()=>x(s,"$timerNextVideoRunning$",i),l=ve(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,p=l.actions.internal.nextVideoAnnouncementShow,m=l.actions.internal.nextVideoAnnouncementClick,f=l.actions.internal.nextVideoAnnouncementAuto,b=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{u(!1),f()},$=()=>{e.clickCloseIcon(),b()};Nt(()=>{e.isHide||p(),e.isHide&&r()&&(u(!1),f())});var S=Le(),C=de(S);{var I=R=>{var E=sC(),P=k(de(E),2),O=T(P),D=T(O),U=T(D,!0);w(D);var z=k(D,2);Ls(z,{onClick:$}),w(O);var G=k(O,2);G.__click=[rC,u,m];var le=T(G),Y=T(le),re=T(Y);let X;var we=k(re,2);{var ce=Z=>{Kd(Z,{get isRunning(){return a()},onTimerEnded:y})};V(we,Z=>{r()&&Z(ce)})}w(Y),w(le);var ne=k(le,2),he=T(ne),xe=T(he,!0);w(he),w(ne),w(G),w(P),B((Z,Ne)=>{pe(U,Z),Ge(Y,`background-image: url('${e.thumb}')`),X=se(re,1,"thumb-overlay s-n",null,X,Ne),pe(xe,e.title)},[()=>r()?Q("end_screen_next_video"):Q("end_screen_recommended_video"),()=>({withOpacity:r()})]),_(R,E)};V(C,R=>{e.isHide||R(I)})}_(t,S),H(),o()}rt(["click"]);import{clientChecker as lC}from"@vkontakte/videoplayer-core/es2015";var Vb=({getFullscreenTarget:t,fullScreenChangeHandler:e})=>{let i=null,o;Nt(()=>{lC.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))}),mn(()=>{i==null||i(),clearTimeout(o)})};import{VideoFormat as dC}from"@vkontakte/videoplayer-core/es2015";var lp=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 cC}from"@vkontakte/videoplayer-core/es2015";var Rb=({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"),p=()=>cC.device.isIOS&&ge(l)===dC.DASH_LIVE_CMAF,m=()=>{s==null||s(),s=null},f=b=>{if(m(),!p()||!b)return;let y=u();if(!y)return;let $=new lp(y),S=ge(d),C=ge(a),I=ge(r);for(let P of S)C.some(D=>D.value===P.id)&&$.attach(P,I.value===P.id);let R=d.subscribe(P=>{for(let O of P)$.updateSrc(O)}),E=()=>{let P=$.getCurrentShowingId();o(ge(a).find(O=>O.value===P))};y.textTracks.addEventListener("change",E),s=()=>{R(),$.detachAll(),y.textTracks.removeEventListener("change",E)}};Nt(()=>i.subscribe(f)),mn(m)};var fC=(t,e,i,o)=>{if(t.stopPropagation(),e()){o();return}},mC=L("<!> <!>",1),vC=L("<div><!></div>"),gC=L('<div class="spherical-video-icon s-7"><!></div>'),hC=L("<div><!></div>"),_C=L('<div class="settings-mobile s-7"><!></div>'),bC=L("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),$C=L('<div class="player-wrapper s-7" role="region" tabindex="-1"><!> <!> <!> <div class="overlay-container"></div></div>'),yC={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%}.spherical-video-icon.s-7{display:inline-block;left:calc(50% - 38px);position:absolute;top:calc(50% - 23px)}.ads-container.s-7{background:var(--black);height:100%;left:0;position:absolute;top:0;width:100%;z-index:var(--ads-container-z-index)}.settings-mobile.s-7{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 wv(t,e){var On,Ur;F(e,!0),q(t,yC);let[i,o]=Re(),r=()=>x(Ve,"$playerPhase",i),a=()=>x(bi,"$isLoaderVisible",i),l=()=>x(ye,"$adPlaybackState",i),d=()=>x(Xt,"$crashed",i),s=()=>x(ts,"$notificationsToShow$",i),u=()=>x(J,"$playbackState$",i),p=()=>x(Dt,"$graphIsOpened$",i),m=()=>x(Je,"$interactiveHideMobileControls",i),f=()=>x(io,"$isEnded$",i),b=()=>x(at,"$isInteractiveExpectation$",i),y=()=>x(mt,"$controlsVisible",i),$=()=>x(lt,"$touched",i),S=()=>x(Mi,"$autoplayNextEnabled$",i),C=()=>x(ct,"$postrollPassed",i),I=()=>x(nn,"$bottomNoSmooth",i),R=()=>x(xi,"$videoSize",i),E=()=>x(Et,"$playerSize",i),P=()=>x(st,"$isFullscreen",i),O=()=>x(Pe,"$position$",i),D=()=>x(It,"$duration$",i),U=()=>x(en,"$loadedMetadata",i),z=()=>x(We,"$settingsMenuVisible",i),G=()=>x(ei,"$scrubbingInProgress",i),le=()=>x(li,"$volumeChangingInProgress",i),Y=()=>x(ho,"$chromecastConnected$",i),re=()=>x(be,"$isControlsAvailable",i),X=()=>x(di,"$isInteractiveTime$",i),we=()=>x(wt,"$isActiveLive",i),ce=()=>x(nt,"$settingsMenuOpenedByKeyboard",i),ne=()=>x(_e,"$language$",i),he=()=>x(Gt,"$disabledControls$",i),xe=()=>x(Bt,"$is3DVideo",i),Z=()=>x(W,"$icon3DVideoVisible",i),Ne=()=>x(pi,"$chromecastDeviceName$",i),ue=()=>x(oo,"$currentSubtitle$",i),A=()=>x(Jo,"$currentSubtitleCaptions$",i),Ke=()=>x(_n,"$realDuration$",i),Ce=()=>x(Pi,"$isLive$",i),j=()=>x(jt,"$isPlaying$",i),ie=()=>x(gi,"$debugPanelVisible",i),Oe=g(e,"videoContainer",15),Be=g(e,"adsSlotId",3,void 0),fe=g(e,"adsParams",3,void 0),ee=g(e,"adsAutoplayParam",3,void 0),Se=g(e,"duration",3,void 0),Fe=g(e,"logoTargetUrl",3,""),qe=g(e,"showNextPrevButtons",3,!1),Ye=g(e,"nextButtonActive",3,!1),Te=g(e,"prevButtonActive",3,!1),Me=g(e,"endScreenVideoTitle",3,void 0),ze=g(e,"endScreenVideoThumb",3,void 0),Vt=g(e,"isOneVideoPlaylist",3,!1),et=g(e,"showMiniTimer",3,!1),Ot=g(e,"fullScreenTarget",3,void 0),qt=g(e,"playerStarted",3,!1),St=g(e,"showEndScreen",3,!0),{notifications$:Jt,graphIsOpened$:Dt}=wo(),$e=e.store.getLogger().createComponentLog("Root component"),_e=e.store.interfaceLanguage$,J=e.store.state.playbackState$,ye=e.store.ads.playbackState,Pe=e.store.state.positionWithScrubbing$,It=e.store.state.duration$,Ve=e.store.playerPhase,st=e.store.ui.isFullscreen,mt=e.store.ui.controlsVisible,be=e.store.ui.isControlsAvailable,Je=e.store.ui.interactiveHideMobileControls,We=e.store.ui.settingsMenu.visible$,nt=e.store.ui.settingsMenu.openedByBtnKeyboard$,ei=e.store.ui.scrubbingInProgress,li=e.store.ui.volumeChangingInProgress,gi=e.store.ui.debugPanelVisible,bi=e.store.state.isLoaderVisible,io=e.store.state.isEnded$,ho=e.store.state.chromecastConnected$,pi=e.store.state.chromecastDeviceName$,ct=e.store.ads.postrollPassed,Pi=e.store.state.isLive$,jt=e.store.state.isPlaying$,wt=e.store.state.isActiveLive$,oi=e.store.state.isRewindableLive$,Xt=e.store.state.crashed$,bt=e.store.webApi.annotationsApi,je=e.store.webApi.pictureInPictureApi,xi=e.store.state.videoSize$,oo=e.store.state.currentSubtitle$,Jo=e.store.state.currentSubtitleCaptions$,_n=e.store.state.duration$,Et=e.store.ui.playerSize,Bt=e.store.ui.is3DVideo,W=e.store.ui.icon3DVideoVisible,kt=e.store.state.isInteractive,di=e.store.state.isInteractiveTime$,at=e.store.state.isInteractiveExpectation$,Tt=e.store.state.hasInteractiveBranches,Gt=e.store.ui.controls.disabledControls$,lt=e.store.ui.touched,Li=e.store.ui.overlayContainer$,Mi=e.store.ui.autoplayNextEnabled$,en=e.store.state.loadedMetadata$,ko=e.store.actions.internal.closeSettingsMenu,_o=(On=e.store.callbacks)==null?void 0:On.onDisabledPlayPrevChapterClick,Fi=(Ur=e.store.callbacks)==null?void 0:Ur.onDisabledSeekToInteractiveClick,vr=e.store.actions.internal.setQuality,no=K(void 0),bo=K(void 0),Hi=K(void 0),tn=K(void 0),on,jn,gr=v(()=>(r()==="video"&&a()||r()==="ads"&&l()==="inactive")&&!d()),Rr=K(void 0),{closeNotification:ys,notificationsToShow$:ts}=Jt,is=v(()=>!!s().slow_video),Xn=()=>ys("slow_video"),nn=ae(!1),Lo,rn=K(!1),Zn=v(()=>u()!==uC.PLAYING),Vn=K(!1),Nr=v(()=>p()||m()||!n(rn)&&(f()&&!!Tt||n(Zn)&&b())),Or=K(!0),os=v(()=>e.uiConfig.features.thumbTimer&&et()&&r()==="video"&&!y()&&!d()&&!kt&&(e.uiConfig.hideThumbTimerAfterTouch&&!$()||!e.uiConfig.hideThumbTimerAfterTouch)),hr=K(!1),ro=v(()=>(St()||e.showAutoplayNext&&S())&&!!Me()&&!!ze()&&(e.showAds&&C()||!e.showAds)&&f()&&!d()&&!n(hr)),_r=K(!1);je==null||je.setContext(ad());let Jn=xt=>{xt&&!kt&&so(e.uiConfig.controls.hideTimeoutMobile)};e.store.setUiCallbacks({onStarted:Jn});let bn=()=>{clearTimeout(on),N(rn,!1),m()&&Je.set(!1)},so=xt=>{bn(),N(rn,!0),on=setTimeout(()=>N(rn,!1),xt);let Ct=xt-100;Lo=setTimeout(()=>{I()&&nn.set(!1)},Ct>0?Ct:xt)},Dr=Bt.subscribe(xt=>{W.set(xt),xt&&(clearTimeout(jn),jn=setTimeout(()=>W.set(!1),e.uiConfig.controls.hide360IconTimeout))}),Rn=(...Ct)=>gt(null,[...Ct],function*(xt=ia()){var lo,Xi,zi,yn,$o,Dn;if(xt&&!Sc.device.isIOS){let mi=Vd(),zr=$n(),xn=Sc.browser.isSamsungBrowser&&mi===e.shadowRootContainer;xt=mi===zr||xn}if(xt){so(e.uiConfig.controls.hideTimeoutFullscreen);try{yield je==null?void 0:je.exit()}catch(mi){$e({message:String(mi)})}try{let mi=(lo=R())!=null&&lo.width&&((Xi=R())!=null&&Xi.height)?R():E();yield w_(mi)}catch(mi){$e({message:String(mi)})}}st.set(xt),e.store.getAdmanWrapper().setFullscreen(xt),P()?(yn=(zi=e.store.callbacks)==null?void 0:zi.onFullscreenEnter)==null||yn.call(zi):(Dn=($o=e.store.callbacks)==null?void 0:$o.onFullscreenExit)==null||Dn.call($o)}),vt=xt=>{let Ct=xt,{width:lo,height:Xi}=Ct.target;Et.set({width:lo,height:Xi})},ti=()=>{let{width:xt,height:Ct}=n(no).getBoundingClientRect();Et.set({width:xt,height:Ct})};Nt(()=>{var xt;return Mu(Rn),e.uiConfig.features.annotationsInside&&(bt==null||bt.init(n(no))),Oa(je)&&(je==null||je.assignPlayerContainer(n(no)),je==null||je.setExternalEventHandlers({resize:vt,leavepictureinpicture:ti})),N(Or,!Sc.device.isIphoneOrOldIpad),e.interactiveContainer&&((xt=Oe().parentElement)==null||xt.insertBefore(e.interactiveContainer,Oe().nextSibling)),()=>{clearTimeout(on),clearTimeout(Lo),clearTimeout(jn),Dr(),je==null||je.dispose().catch(Ct=>{$e({message:String(Ct)})}),Vu(Rn)}});let er=K(!0),br=K(!0),Br=xt=>{let Ct=O()+(xt==="forward"?1:-1)*e.uiConfig.controls.seekStepMobile/1e3;Ct<0?(N(er,!1),Ct=0):Ct>=D()&&(N(br,!1),Ct=D()),N(Vn,!0),e.seekTime(Ct)},$n=()=>Sc.device.isIOS?n(no):!e.uiConfig.allowChangingFullscreenTarget||!Ot()?e.outerContainerRef:Ot().contains(e.outerContainerRef)?Ot():e.outerContainerRef,$r=()=>gt(null,null,function*(){try{if(ia())yield Lu(document),$e({message:"exit fullscreen"});else{if($e({message:"request fullscreen"}),Sc.device.isIOS&&!U())return;yield ku($n())}}catch(xt){$e({message:String(xt)})}}),Mo=()=>{ko()},sn=xt=>{if(xt.preventDefault(),z()){Mo();return}if(!qt()){e.firstStart(),so(e.uiConfig.controls.hideTimeoutCursor);return}N(Vn,!1),y()?bn():so(e.uiConfig.controls.hideTimeoutMobile)},Vo=()=>{lt.set(!0)},tr=()=>{kt||(nn.set(!0),so(e.uiConfig.controls.hideTimeoutCursor))},Ui=xt=>{_o&&(_o(xt),so(e.uiConfig.controls.hideTimeoutMobile))},Ro=xt=>{Fi&&(Fi(xt),so(e.uiConfig.controls.hideTimeoutMobile))};De(()=>{Li.set(n(Rr))}),De(()=>{mt.set((n(Zn)||z()||G()||le()||Y()||!n(ro)&&(f()||n(rn)&&!n(Vn)))&&!n(Nr)&&r()==="video"&&!d()&&re())}),De(()=>{!G()&&n(_r)&&!X()&&so(e.uiConfig.controls.hideTimeoutMobile),N(_r,G(),!0)}),De(()=>{N(er,O()>0),N(br,!we()&&O()<D(),!0)}),De(()=>{Hd(n(tn),z(),ce(),!0)});let ir=Q("aria_label_video_player");Vb({fullScreenChangeHandler:Rn,getFullscreenTarget:$n}),Rb({store:e.store,getFullscreenTarget:$n});let Fr=(xt,Ct)=>{var yn,$o;let lo=($o=(yn=e.store.callbacks)==null?void 0:yn.uiInfo)==null?void 0:$o.onUpcomingLiveViewStateChanged;if(!lo)return;let Xi=!!Ct,zi=Ae(Ae({},Gn(n(no),{upcomingLiveScreen:Ct},"upcomingLiveScreen",Xi)),xt);lo(zi)};var ao=$C();_t("blur",Ta,Mo);var Nn=T(ao);tl(Nn,{onClick:sn,get videoContainer(){return Oe()},set videoContainer(xt){Oe(xt)}});var No=k(Nn,2);ka(No,()=>"slot",!1,(xt,Ct)=>{Ji(xt,()=>({name:el}))});var Hr=k(No,2);Is(Hr,ne,xt=>{var Ct=bC(),lo=de(Ct);let Xi=v(()=>r()!=="thumb"||d()||kt&&e.autoplay);Xa(lo,{get hidden(){return n(Xi)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var zi=k(lo,2);{var yn=Xe=>{var zt=mC(),Si=de(zt);{var Uo=cn=>{let Ir=v(()=>e.uiConfig.controls.seekStepMobile/1e3);ap(cn,{side:"left",get seekStep(){return n(Ir)},handleSingleFirstClick:sn,handleSecondClick:()=>Br("backward")})};V(Si,cn=>{n(er)&&cn(Uo)})}var uo=k(Si,2);{var Cr=cn=>{let Ir=v(()=>e.uiConfig.controls.seekStepMobile/1e3);ap(cn,{side:"right",get seekStep(){return n(Ir)},handleSingleFirstClick:sn,handleSecondClick:()=>Br("forward")})};V(uo,cn=>{n(br)&&cn(Cr)})}_(Xe,zt)};V(zi,Xe=>{e.canRewindLive&&oi&&!he().has("TIMELINE")&&Xe(yn)})}var $o=k(zi,2);{var Dn=Xe=>{let zt=v(()=>{var Si;return(Si=e.live)==null?void 0:Si.startTime});_c(Xe,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(zt)},onUpcomingLiveViewStateChanged:Fr})};V($o,Xe=>{r()==="LiveWaitingStart"&&Xe(Dn)})}var mi=k($o,2);{var zr=Xe=>{Za(Xe,{kind:"recover",get thumbUrl(){return e.thumbUrl}})};V(mi,Xe=>{r()==="LiveWaitingRecover"&&Xe(zr)})}var xn=k(mi,2);{var Oo=Xe=>{Za(Xe,{kind:"record",get thumbUrl(){return e.thumbUrl}})};V(xn,Xe=>{r()==="LiveWaitingRecord"&&Xe(Oo)})}var yr=k(xn,2);{var nr=Xe=>{var zt=vC();let Si;var Uo=T(zt);Nd(Uo,{get adsSlotId(){return Be()},get adsParams(){return fe()},get adsAutoplayParam(){return ee()},get duration(){return Se()},get adsExternalApi(){return e.adsExternalApi}}),w(zt),B(uo=>Si=se(zt,1,"ads-container s-7",null,Si,uo),[()=>({hidden:r()!=="ads"})]),_(Xe,zt)};V(yr,Xe=>{e.showAds&&qt()&&Xe(nr)})}var xr=k(yr,2);{var wn=Xe=>{let zt=v(()=>!St()&&e.showAutoplayNext&&S());xv(Xe,{get title(){return Me()},get thumb(){return ze()},get isHide(){return n(zt)},clickCloseIcon:()=>N(hr,!0)})};V(xr,Xe=>{n(ro)&&Me()&&ze()&&Xe(wn)})}var an=k(xr,2);{var Wr=Xe=>{gc(Xe,{})};V(an,Xe=>{xe()&&Xe(Wr)})}var ln=k(an,2);{var ns=Xe=>{var zt=gC(),Si=T(zt);Md(Si,{}),w(zt),_(Xe,zt)};V(ln,Xe=>{Z()&&Xe(ns)})}var Qe=k(ln,2);{var Lt=Xe=>{hc(Xe,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return Ne()}})};V(Qe,Xe=>{Y()&&Xe(Lt)})}var $i=k(Qe,2);{var So=Xe=>{Ya(Xe,{get shifted(){return y()},get captions(){return A()},get position(){return O()},get playerSize(){return E()},isMobile:!0})};V($i,Xe=>{ue().value!=="off"&&Xe(So)})}var To=k($i,2);{var Do=Xe=>{var zt=hC();zt.__click=[fC,z,We,Mo];var Si=T(zt);ja(Si,{}),w(zt),_(Xe,zt)};V(To,Xe=>{d()&&Xe(Do)})}var co=k(To,2);{var Vi=Xe=>{let zt=v(()=>r()==="thumb"||r()==="LiveWaitingStart"||r()==="LiveWaitingRecover"||r()==="LiveWaitingRecord"||r()==="ads"),Si=v(()=>r()==="ads"),Uo=v(()=>e.canRewindLive&&Ke()!==0);mc(Xe,{get bottomHidden(){return n(zt)},get showControls(){return y()},get bottomNoSmooth(){return I()},get isAds(){return n(Si)},get canRewindLive(){return n(Uo)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return Fe()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return qe()},get nextButtonActive(){return Ye()},get prevButtonActive(){return Te()},get isOneVideoPlaylist(){return Vt()},get customFullscreenSupported(){return n(Or)},get endScreenShown(){return n(ro)},toggleFullscreen:$r,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},onDisabledPlayPrevChapterClick:Ui,onDisabledSeekToInteractiveClick:Ro,get playerControlsWrapperRef(){return n(bo)},set playerControlsWrapperRef(uo){N(bo,uo,!0)},get playerControlsRef(){return n(Hi)},set playerControlsRef(uo){N(Hi,uo,!0)}})};V(co,Xe=>{qt()&&Xe(Vi)})}var Bo=k(co,2);{var Fo=Xe=>{var zt=_C(),Si=T(zt);yc(Si,{get supportLink(){return e.supportLink},get returnFocus(){return pC},get ref(){return n(tn)},set ref(Uo){N(tn,Uo,!0)}}),w(zt),_(Xe,zt)};V(Bo,Xe=>{z()&&Xe(Fo)})}var yo=k(Bo,2);let Ho=v(()=>!n(os));Bd(yo,{get isLive(){return Ce()},get isHidden(){return n(Ho)},get isPlaying(){return j()},get position(){return O()},get duration(){return D()}});var dn=k(yo,2);{var wr=Xe=>{Ha(Xe,{})};V(dn,Xe=>{n(gr)&&Xe(wr)})}var Sr=k(dn,2);{var Tr=Xe=>{Wd(Xe,{})};V(Sr,Xe=>{ie()&&Xe(Tr)})}var rs=k(Sr,2);{var ss=Xe=>{xc(Xe,{onClose:Xn,onSelectAutoQuality:()=>{vr("auto"),Xn()}})};V(rs,Xe=>{n(is)&&Xe(ss)})}_(xt,Ct)});var or=k(Hr,2);ot(or,xt=>N(Rr,xt),()=>n(Rr)),w(ao),ot(ao,xt=>N(no,xt),()=>n(no)),B(()=>Ue(ao,"aria-label",ir)),_t("click",ao,Vo,!0),_t("focusin",ao,tr,!0),_(t,ao),H(),o()}rt(["click"]);function dp(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 xC}from"@vkontakte/videoplayer-shared/es2015";var wC=L('<div class="time-container s-9"><!></div>'),SC=L('<div class="player-wrapper s-9" role="region"><!> <!> <!> <!> <!> <div><!></div></div>'),TC={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%}.timeline.s-9{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-9{opacity:1}.time-container.s-9{bottom:8px;position:absolute;right:8px;z-index:var(--thumb-timer-z-index)}"};function Sv(t,e){F(e,!0),q(t,TC);let[i,o]=Re(),r=()=>x(X,"$scrubbingInProgress",i),a=()=>x(Y,"$playerSize",i),l=()=>x(O,"$isPlaying$",i),d=()=>x(E,"$duration$",i),s=()=>x(z,"$positionWithScrubbing$",i),u=()=>x(I,"$playerPhase",i),p=()=>x(R,"$crashed$",i),m=()=>x(D,"$currentSubtitle$",i),f=()=>x(U,"$currentSubtitleCaptions$",i),b=()=>x(P,"$positionExact$",i),y=()=>x(G,"$isLive$",i),$=()=>x(le,"$isRewindableLive$",i),S=g(e,"outsideDuration",3,0),C=g(e,"videoContainer",15),{playerPhase:I,state:{crashed$:R,duration$:E,positionExact$:P,isPlaying$:O,currentSubtitle$:D,currentSubtitleCaptions$:U,positionWithScrubbing$:z,isLive$:G,isRewindableLive$:le},ui:{playerSize:Y,controls:re,scrubbingInProgress:X},actions:{internal:{getVideoElement:we}}}=ve(),ce=8,ne=K(!1),he=ci({}),xe=K(!1),Z=v(()=>!r()&&!n(xe)),Ne=()=>{N(ne,!0)},ue=()=>{N(ne,!1)},A=xC(Gl,260);De(()=>{a(),A(we(),re,he,n(ne))});let Ke=v(()=>l()?Zo(d()-s()):Zo(isFinite(d())?d():S()));var Ce=SC(),j=T(Ce);tl(j,{hideCursor:!1,get videoContainer(){return C()},set videoContainer(Me){C(Me)}});var ie=k(j,2);ka(ie,()=>"slot",!1,(Me,ze)=>{Ji(Me,()=>({name:el}))});var Oe=k(ie,2);let Be=v(()=>u()!=="thumb"||p());Xa(Oe,{get hidden(){return n(Be)},get thumbUrl(){return e.thumbUrl},iconVisible:!1});var fe=k(Oe,2);{var ee=Me=>{Ya(Me,{shifted:!1,get captions(){return f()},get position(){return b()},get playerSize(){return a()}})};V(fe,Me=>{m().value!=="off"&&n(Z)&&Me(ee)})}var Se=k(fe,2);{var Fe=Me=>{var ze=wC(),Vt=T(ze);Dd(Vt,{get isLive(){return y()},get isPlaying(){return l()},get time(){return n(Ke)}}),w(ze),_(Me,ze)};V(Se,Me=>{n(Z)&&Me(Fe)})}var qe=k(Se,2);let Ye;var Te=T(qe);Qa(Te,{get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return $()},isAds:!1,needPadding:!1,isHidden:!1,withEpisodes:!1,tooltipLeftOffset:ce,tooltipRightOffset:ce,get ref(){return he.timeline},set ref(Me){he.timeline=Me}}),w(qe),w(Ce),B(Me=>Ye=se(qe,1,"timeline s-9",null,Ye,Me),[()=>({visible:n(ne)})]),_t("mouseenter",Ce,Ne),_t("mouseleave",Ce,ue),_t("mouseenter",qe,()=>N(xe,!0)),_t("mouseleave",qe,()=>N(xe,!1)),_(t,Ce),H(),o()}var AC=L("<div><!></div>"),kC={hash:"s-3",code:'.vk-vp-root.s-3{--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;--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-3{overflow:visible}.vk-vp-root.s-3 *{-webkit-tap-highlight-color:transparent}.vk-vp-root.s-3 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-3 p{margin:0}.vk-vp-root.s-3 svg:not(.interactive-root svg){pointer-events:none}.vk-vp-root.s-3 .interactive-root{font-family:var(--vk-vp-int-custom-font,inherit)}.vk-vp-root.s-3 :focus,.vk-vp-root.s-3 :focus-visible{outline:none}.vk-vp-root.s-3 :focus-visible{border-radius:var(--focused-outline-radius);box-shadow:var(--focused-element-shadow)}.vk-vp-root.s-3 .focus-hidden:focus-visible{box-shadow:none}.vk-vp-root.s-3 .hidden{opacity:0;visibility:hidden}.vk-vp-root.s-3 .out-of-flow{content-visibility:hidden!important}.vk-vp-root.s-3 .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-3 .out-of-view{left:-1000vh!important;position:absolute!important}.vk-vp-root.s-3 .icon.icon-error-stub{align-items:center;display:flex;justify-content:center}'};function Cv(t,e){F(e,!0),q(t,kC);let[i,o]=Re(),r=()=>x(qt,"$isLive$",i),a=()=>x(bt,"$availableSubtitlesList$",i),l=()=>x(je,"$isPreviewTrackHorizontallyAligned$",i),d=g(e,"sources",7),s=g(e,"store",7),u=g(e,"microStoresRoot",7),p=g(e,"videoConfig",7),m=g(e,"uiConfig",7),f=g(e,"title",7),b=g(e,"thumbUrl",7),y=g(e,"interactiveContainer",7),$=g(e,"interactiveController",7),S=g(e,"subtitles",7),C=g(e,"subtitlesForcedLanguage",7),I=g(e,"live",7),R=g(e,"preload",7),E=g(e,"autoplay",7),P=g(e,"volume",7,void 0),O=g(e,"muted",7,void 0),D=g(e,"fromTime",7),U=g(e,"canRewindLive",7),z=g(e,"showAds",7),G=g(e,"adsSlotId",7,void 0),le=g(e,"adsParams",7,void 0),Y=g(e,"adsAutoplayParam",7,void 0),re=g(e,"duration",7,void 0),X=g(e,"logoClickable",7),we=g(e,"logoHidden",7),ce=g(e,"isMobile",7),ne=g(e,"showNextPrevButtons",7,!1),he=g(e,"nextButtonActive",7,!1),xe=g(e,"prevButtonActive",7,!1),Z=g(e,"endScreenVideoTitle",7,void 0),Ne=g(e,"endScreenVideoThumb",7,void 0),ue=g(e,"isOneVideoPlaylist",7,!1),A=g(e,"supportLink",7),Ke=g(e,"shadowRootContainer",7),Ce=g(e,"outerContainerRef",7),j=g(e,"fullScreenTarget",7,void 0),ie=g(e,"failoverHosts",7,void 0),Oe=g(e,"showMiniTimer",7,!1),Be=g(e,"saveRate",7),fe=g(e,"seekToInteractive",7,Nb),ee=g(e,"playPrevChapter",7,Nb),Se=g(e,"volumeMultiplier",7),Fe=g(e,"showAutoplayNext",7),qe=g(e,"showEndScreen",7,!0),Ye=g(e,"keyboardControls",15,void 0),{subscribers:Te,stores:Me}=u();Ah(m());let ze=Mt(),Vt=m().logoLink,et=s().ui.debugPanelVisible,Ot=s().ui.playerSize,qt=s().state.isLive$,Jt=s().state.isInteractive&&Tv.device.isAndroid,Dt=K(void 0),$e=null,_e=K(!1);s().getAdmanWrapper().init({switchFromAdsToVideo:s().actions.internal.switchFromAdsToVideo,switchFromVideoToAds:s().actions.internal.switchFromVideoToAds,setMuted:s().actions.external.setMuted},s().ads,{vsid:s().vsid}),Fh(s(),Me),De(()=>{var W,kt;s().ui.isMobile.set(ce()),(kt=(W=p().callbacks)==null?void 0:W.onDomReady)==null||kt.call(W)});let J=(W=!1)=>{N(_e,!0),W?s().actions.external.firstStart(z()):s().actions.internal.firstStart(z())},ye=()=>{if(ze.features.qualityDetailsSubMenuEnabled){let W=d_(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{c_(s().videoId),Ef()&&s().actions.internal.setTrafficSavingEnabled(!0);let kt=Tf(s().videoId);kt&&s().actions.internal.setQuality(kt)}};function Pe(W){var Gt,lt,Li;let kt=d()||W;kt&&s().initVideo({container:n(Dt),sources:kt,failoverHosts:ie(),subtitles:S(),subtitlesForcedLanguage:C(),volumeMultiplier:Se()});let di=IC.get(Pd)==="true";et.set(di),D()>0&&s().actions.external.seekTime(D());let at=ce()?ze.volumeDefault:(lt=(Gt=P())!=null?Gt:yu())!=null?lt:ze.volumeDefault,Tt=(Li=O())!=null?Li:o_();if(s().actions.external.setVolume(at),s().actions.external.setMuted(Tt),s().getAdmanWrapper().setInitialVolume(Tt?0:at),ye(),ze.features.saveRate&&Be()){let Mi=s_();Mi&&!r()&&s().actions.internal.setPlaybackRate(Mi)}if(Fe()){let Mi=l_();Mi&&s().actions.internal.setAutoplayNextEnabled(Mi)}s().ui.isAutoplay.set(E()),E()&&J(),R()&&ze.features.preload&&s().actions.internal.preload()}let It=W=>{if(window.ResizeObserver){let kt,di;$e=new ResizeObserver(EC(at=>{let Tt=at[0];if(Tt.contentBoxSize){let Gt=Array.isArray(Tt.contentBoxSize)?Tt.contentBoxSize[0]:Tt.contentBoxSize;kt=Gt.inlineSize,di=Gt.blockSize}else Tt.contentRect&&(kt=Tt.contentRect.width,di=Tt.contentRect.height);Ot.set({width:kt,height:di})},300)),$e.observe(W)}Ot.set({width:W.clientWidth,height:W.clientHeight})},Ve=()=>{document.hidden&&s().actions.external.stop()};Nt(()=>{var di,at,Tt,Gt;Jt&&document.addEventListener("visibilitychange",Ve),ze.debugLog&&s().actions.internal.startLogging(),It(n(Dt));let W=Te.map(lt=>lt.init({store:s(),microStores:Me,config:p(),interactiveController:$(),uiConfig:m()})),kt=()=>{Jt&&document.removeEventListener("visibilitychange",Ve),$e==null||$e.disconnect(),W.forEach(lt=>lt.unsubscribe()),s().destroy()};return((di=I())==null?void 0:di.status)==="upcoming"?(s().actions.internal.setLiveWaitingStart(!0),kt):((at=I())==null?void 0:at.status)==="waiting"?(s().actions.internal.setLiveWaitingRecover(!0),kt):(((Tt=I())==null?void 0:Tt.status)==="finished"||((Gt=I())==null?void 0:Gt.status)==="postlive")&&!(d()&&CC(d()))?(s().actions.internal.setLiveWaitingRecord(!0),kt):(Pe(),kt)});function st(){n(_e)?s().actions.external.play():J(!0)}function mt(){s().actions.external.pause()}function be(W){s().actions.external.setMuted(W)}function Je(){s().actions.external.toggleSubtitle()}function We(W,kt){s().actions.external.changeSubtitle(W,kt)}function nt(W){s().actions.external.changeAudioStream(W)}function ei(){var W;(W=s().webApi.slotsApi)!=null&&W.haveSlots()&&s().actions.external.hideControls()}function li(){var W;(W=s().webApi.slotsApi)!=null&&W.haveSlots()&&s().actions.external.showControls()}function gi(W){ce()||W>=0&&W<=1&&s().actions.external.setVolume(W)}function bi(W){s().actions.internal.seekTime(W,PC.UNKNOWN)}function io(W){s().actions.external.seekEpisodeStartTime(W)}function ho(){s().actions.external.returnFocusToEpisodes()}function pi(W){s().actions.external.setPlaybackRate(W)}function ct(W){s().actions.external.setAutoQualityLimits(W)}function Pi(){s().actions.external.setQuality("auto")}function jt(W){s().actions.external.setTrafficSavingEnabled(W)}function wt(W){s().actions.external.setHighQualityEnabled(W)}let oi=dp(ze.view),Xt=p().playerView==="preview",bt=s().state.availableSubtitlesList$;if(ze.features.initSubtitles){let W=!1;De(()=>{var kt;if(!W&&a().length){W=!0;let di;if(ze.features.userVideoPrefs&&s().videoId){let Tt=Tu(ze.userSalt,String(s().videoId));Tt!=null&&Tt.subtitleTrackId&&(di=a().find(Gt=>Gt.value===Tt.subtitleTrackId))}let at=(kt=C())!=null?kt:Af();at&&(di=a().find(Tt=>Tt.language===at)),s().actions.internal.setSubtitle(di)}})}let je=s().ui.isPreviewTrackHorizontallyAligned;var xi=AC();let oo;var Jo=T(xi);{var _n=W=>{wv(W,{get store(){return s()},get uiConfig(){return ze},get thumbUrl(){return b()},get interactiveContainer(){return y()},get live(){return I()},get autoplay(){return E()},get canRewindLive(){return U()},get showAds(){return z()},get adsSlotId(){return G()},get adsParams(){return le()},get adsAutoplayParam(){return Y()},get duration(){return re()},get logoClickable(){return X()},get logoHidden(){return we()},get logoTargetUrl(){return Vt},get nextButtonActive(){return he()},get prevButtonActive(){return xe()},get endScreenVideoTitle(){return Z()},get endScreenVideoThumb(){return Ne()},get isOneVideoPlaylist(){return ue()},get supportLink(){return A()},get shadowRootContainer(){return Ke()},get outerContainerRef(){return Ce()},get fullScreenTarget(){return j()},get showMiniTimer(){return Oe()},get playerStarted(){return n(_e)},get seekToInteractive(){return fe()},get playPrevChapter(){return ee()},firstStart:J,seekTime:bi,get showEndScreen(){return qe()},get showAutoplayNext(){return Fe()},get showNextPrevButtons(){return ne()},get adsExternalApi(){return e.adsExternalApi},get videoContainer(){return n(Dt)},set videoContainer(kt){N(Dt,kt,!0)}})},Et=W=>{var kt=Le(),di=de(kt);{var at=Gt=>{Sv(Gt,{get thumbUrl(){return b()},get outsideDuration(){return re()},get canRewindLive(){return U()},get videoContainer(){return n(Dt)},set videoContainer(lt){N(Dt,lt,!0)}})},Tt=Gt=>{yv(Gt,{get store(){return s()},get uiConfig(){return ze},get title(){return f()},get thumbUrl(){return b()},get interactiveContainer(){return y()},get live(){return I()},get autoplay(){return E()},get canRewindLive(){return U()},get showAds(){return z()},get adsSlotId(){return G()},get adsParams(){return le()},get adsAutoplayParam(){return Y()},get duration(){return re()},get logoClickable(){return X()},get logoHidden(){return we()},get logoTargetUrl(){return Vt},get nextButtonActive(){return he()},get prevButtonActive(){return xe()},get endScreenVideoTitle(){return Z()},get endScreenVideoThumb(){return Ne()},get isOneVideoPlaylist(){return ue()},get supportLink(){return A()},get shadowRootContainer(){return Ke()},get outerContainerRef(){return Ce()},get fullScreenTarget(){return j()},get showMiniTimer(){return Oe()},get playerStarted(){return n(_e)},get seekToInteractive(){return fe()},get playPrevChapter(){return ee()},firstStart:J,get showEndScreen(){return qe()},get showAutoplayNext(){return Fe()},get showNextPrevButtons(){return ne()},get adsExternalApi(){return e.adsExternalApi},get videoContainer(){return n(Dt)},set videoContainer(lt){N(Dt,lt,!0)},get keyboardControls(){return Ye()},set keyboardControls(lt){Ye(lt)}})};V(di,Gt=>{Xt?Gt(at):Gt(Tt,!1)})}_(W,kt)};V(Jo,W=>{ce()?W(_n):W(Et,!1)})}w(xi),B(W=>{oo=se(xi,1,"vk-vp-root s-3",null,oo,W),Ge(xi,oi)},[()=>({"root--miui-browser":Tv.device.isMobile&&Tv.browser.isMiuiBrowser,"visible-outside":Xt,"preview-track-horizontally-alinged":l()})]),_(t,xi);var Bt=H({initVideo:Pe,play:st,pause:mt,setMuted:be,toggleSubtitle:Je,changeSubtitle:We,changeAudioStream:nt,hideControls:ei,showControls:li,setVolume:gi,seekTime:bi,seekEpisodeStartTime:io,returnFocusToEpisodes:ho,setPlaybackRate:pi,setAutoQualityLimits:ct,setAutoQuality:Pi,toggleTrafficSaving:jt,toggleHighQuality:wt,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 p()},set videoConfig(W){p(W)},get uiConfig(){return m()},set uiConfig(W){m(W)},get title(){return f()},set title(W){f(W)},get thumbUrl(){return b()},set thumbUrl(W){b(W)},get interactiveContainer(){return y()},set interactiveContainer(W){y(W)},get interactiveController(){return $()},set interactiveController(W){$(W)},get subtitles(){return S()},set subtitles(W){S(W)},get subtitlesForcedLanguage(){return C()},set subtitlesForcedLanguage(W){C(W)},get live(){return I()},set live(W){I(W)},get preload(){return R()},set preload(W){R(W)},get autoplay(){return E()},set autoplay(W){E(W)},get volume(){return P()},set volume(W){P(W)},get muted(){return O()},set muted(W){O(W)},get fromTime(){return D()},set fromTime(W){D(W)},get canRewindLive(){return U()},set canRewindLive(W){U(W)},get showAds(){return z()},set showAds(W){z(W)},get adsSlotId(){return G()},set adsSlotId(W){G(W)},get adsParams(){return le()},set adsParams(W){le(W)},get adsAutoplayParam(){return Y()},set adsAutoplayParam(W){Y(W)},get duration(){return re()},set duration(W){re(W)},get logoClickable(){return X()},set logoClickable(W){X(W)},get logoHidden(){return we()},set logoHidden(W){we(W)},get isMobile(){return ce()},set isMobile(W){ce(W)},get showNextPrevButtons(){return ne()},set showNextPrevButtons(W){ne(W)},get nextButtonActive(){return he()},set nextButtonActive(W){he(W)},get prevButtonActive(){return xe()},set prevButtonActive(W){xe(W)},get endScreenVideoTitle(){return Z()},set endScreenVideoTitle(W){Z(W)},get endScreenVideoThumb(){return Ne()},set endScreenVideoThumb(W){Ne(W)},get isOneVideoPlaylist(){return ue()},set isOneVideoPlaylist(W){ue(W)},get supportLink(){return A()},set supportLink(W){A(W)},get shadowRootContainer(){return Ke()},set shadowRootContainer(W){Ke(W)},get outerContainerRef(){return Ce()},set outerContainerRef(W){Ce(W)},get fullScreenTarget(){return j()},set fullScreenTarget(W){j(W)},get failoverHosts(){return ie()},set failoverHosts(W){ie(W)},get showMiniTimer(){return Oe()},set showMiniTimer(W){Oe(W)},get saveRate(){return Be()},set saveRate(W){Be(W)},get showAutoplayNext(){return Fe()},set showAutoplayNext(W){Fe(W)},get seekToInteractive(){return fe()},set seekToInteractive(W){fe(W)},get playPrevChapter(){return ee()},set playPrevChapter(W){ee(W)},get volumeMultiplier(){return Se()},set volumeMultiplier(W){Se(W)},get showEndScreen(){return qe()},set showEndScreen(W){qe(W)},get keyboardControls(){return Ye()},set keyboardControls(W){Ye(W)}});return o(),Bt}var LC=Ee('<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 Iv(t,e){let i=g(e,"isWhite",3,!1),o=v(()=>i()?"#fff":"#909499");Ze(t,{width:"57",height:"60",get fill(){return n(o)},testId:"stub-icon",children:(r,a)=>{var l=LC();vi(9),_(r,l)},$$slots:{default:!0}})}var MC=L('<div class="title s-2"> </div>'),VC=L('<div class="playerStub s-2"><!> <!></div>'),RC={hash:"s-2",code:".playerStub.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%}.title.s-2{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 Ev(t,e){q(t,RC);var i=VC(),o=T(i);{var r=d=>{var s=MC(),u=T(s,!0);w(s),B(()=>pe(u,e.title)),_(d,s)};V(o,d=>{e.title&&d(r)})}var a=k(o,2);{var l=d=>{let s=v(()=>!!e.thumbUrl);Iv(d,{get isWhite(){return n(s)}})};V(a,d=>{(!e.title||!e.thumbUrl)&&d(l)})}w(i),B(()=>Ge(i,e.thumbUrl?`background-image: url('${e.thumbUrl}')`:"")),_(t,i)}var NC=L('<div class="playerError s-1"><!></div>'),OC={hash:"s-1",code:".playerError.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%}"};function Pv(t){q(t,OC);var e=NC(),i=T(e);ja(i,{}),w(e),_(t,e)}import{now as vI,ValueSubject as gI}from"@vkontakte/videoplayer-shared/es2015";import{cloneDeepWith as hI,InterfaceLanguage as _I,isNonNullable as Nv,Logger as bI,Observable as $I,Subscription as Kb,once as yI,InternalsExposure as xI,skip as wI,getPlayerId as SI}from"@vkontakte/videoplayer-shared/es2015";import{clientChecker as qb,isMobile as TI}from"@vkontakte/videoplayer-core/es2015";import{OneStat as CI,ThinOneStat as II,MediascopePixel as EI}from"@vkontakte/videoplayer-statistics/es2015";import{Logger as DC,Subscription as BC}from"@vkontakte/videoplayer-shared/es2015";var cp=class{constructor(){this.subscription=new BC,this.logger=new DC,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=ge(e.state.currentPlaybackRate$),r=ge(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 Lv,detectEmbed as KC}from"@vkontakte/videoplayer-shared/es2015";var FC=Ee('<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),HC=L('<div><div><!></div> <span class="title s-6"> </span></div>'),UC={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 Av(t,e){F(e,!0),q(t,UC);let[i,o]=Re(),r=()=>x(u,"$interfaceLanguage$",i),a=()=>x(p,"$isMobile$",i),l=ve(),d=Mt(),s=!!l.webApi.pictureInPictureApi,u=l.interfaceLanguage$,p=l.ui.isMobile,m=l.ui.t,f=v(()=>r()&&m("pip_dummy_title")),b=dp(d.view);var y=HC();let $;var S=T(y);let C;var I=T(S);Ze(I,{width:"57",height:"56",testId:"pip-dummy-icon",children:(P,O)=>{var D=FC();vi(),_(P,D)},$$slots:{default:!0}}),w(S);var R=k(S,2),E=T(R,!0);w(R),w(y),B((P,O)=>{$=se(y,1,"player-pip-dummy s-6",null,$,P),Ge(y,b),C=se(S,1,"dummy-image s-6",null,C,O),pe(E,n(f))},[()=>({"is-pip-api":s}),()=>({desktop:!a()})]),_(t,y),H(),o()}var zC=Object.defineProperty,WC=(t,e,i)=>e in t?zC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Zl=(t,e,i)=>WC(t,typeof e!="symbol"?e+"":e,i),kv=(t,e,i)=>new Promise((o,r)=>{var a=s=>{try{d(i.next(s))}catch(u){r(u)}},l=s=>{try{d(i.throw(s))}catch(u){r(u)}},d=s=>s.done?o(s.value):Promise.resolve(s.value).then(a,l);d((i=i.apply(t,e)).next())}),qC=460,QC=280,Tc=class{constructor({enabled:e=!0}={enabled:!0}){Zl(this,"playerDomElement"),Zl(this,"playerParentShadowRoot"),Zl(this,"playerDummyElement"),Zl(this,"svelteContext"),Zl(this,"pipWindow"),Zl(this,"info",{isActive$:new Lv(!1),isEnabled$:new Lv(!1),type:1}),this.info.isEnabled$=new Lv(e)}isSupported(){let{isEmbed:e}=KC();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}request(){return kv(this,null,function*(){var e,i;if(!this.isSupported()||!this.playerDomElement||!this.playerParentShadowRoot)return;this.pipWindow=yield documentPictureInPicture.requestWindow({width:qC,height:QC,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(Av,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||(Aa(this.playerDummyElement),this.playerParentShadowRoot.append(this.playerDomElement),this.info.isActive$.next(!1),this.pipWindow=void 0)})})}exit(){return kv(this,null,function*(){return new Promise(e=>{var i;this.pipWindow&&((i=documentPictureInPicture.window)==null||i.close()),e()})})}dispose(){return kv(this,null,function*(){yield 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 Ob(t){return t instanceof Tc}var up=class{static getLatestSupportedVersion(e){let i=new Na(e),o=new Tc(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 Db="Inner error. Unexpectedly root annotation container null reference exception",Bb="Annotation with such name already exists",Fb="Annotation with such name does not exist";var Jl=class extends Error{constructor(e){super(e),this.name="AnnotationError"}};import{observeElementSize as GC,Subscription as YC,throttleFn as jC}from"@vkontakte/videoplayer-shared/es2015";var XC="1",ZC=100,pp=class{constructor(e){this.annotationsInside=e;this.annotations=new Map;this.subscriptions=new YC}init(e){if(this.rootAnnotationsContainer=e,this.annotationsInside)return;let i=jC(()=>{for(let o of this.annotations.values())this.isElementExceedsBoundaries(o,this.playerSize.width,this.playerSize.height)?o.style.visibility="hidden":o.style.visibility="visible"},ZC);this.subscriptions.add(GC(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 Jl(Db);if(this.annotations.has(e))throw new Jl(Bb);i.style.zIndex=(o=i.style.zIndex)!=null?o:XC,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 Jl(Fb);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 fp,Subscription as JC}from"@vkontakte/videoplayer-shared/es2015";var hn=class{init({store:e,microStores:i,interactiveController:o,config:r}){return fp(e),fp(i),fp(r),r.interactiveData&&fp(o),this.subscription=new JC,this.subscription}};var Ic=class extends hn{constructor(){super(...arguments);this.stateName="fakeIsPlaying$";this.state$=Kt(Ae({},ae(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 Ec=class extends hn{constructor(){super(...arguments);this.stateName="interactiveControlsOpacity$";this.state$=Kt(Ae({},ae(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:p}=a.ui,m=ge(p),f=()=>m&&ge(u);return o.add(u.subscribe(b=>{if(!m)return;let y=ge(l);ge(s)?this.state$.set(b):y!==null&&this.state$.set(!y||b)})),o.add(s.subscribe(b=>{this.state$.set(!b||f())})),o.add(l.subscribe(b=>{if(b===null)return;let y=ge(d);if(f()){this.state$.set(!0);return}y&&this.state$.set(!b)})),o}};var Pc=class extends hn{constructor(){super(...arguments);this.stateName="seekToInteractiveDisabledTooltip$";this.state$=ae("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 eI}from"@vkontakte/videoplayer-shared/es2015";var Mv=ae(!1),mp=null,Ac=class extends hn{constructor(){super(...arguments);this.stateName="showInteractiveTimeIndicatorTooltip$";this.state$=Kt(Ae({},Mv),{set:(i,o=!1)=>{i!==ge(Mv)&&(this.clearTimeout(),Mv.set(i),!i&&mp&&(mp=!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(m=>{ge(l)&&m&&this.state$.set(!1)}));let p=(a==null?void 0:a.interactiveData)||{tooltipHelpHintActive:!1};return o.add(eI({isPlaying$:d,isInteractiveTime$:l,interactiveTimeIndicator:u}).subscribe(({isPlaying$:m,isInteractiveTime$:f,interactiveTimeIndicator:b})=>{var y,$;if(!(!m||!(b!=null&&b.isDisplayed))){if(!f)return this.state$.set(!1);p.tooltipHelpHintActive&&mp===null&&(mp=!0,p.tooltipHelpHintActive=!1,this.state$.set(!0),($=(y=r.callbacks)==null?void 0:y.onInteractiveTimeIndicatorHintDeactivated)==null||$.call(y))}})),o}clearTimeout(){window.clearTimeout(this.timeout)}};import{combine as tI,noop as iI}from"@vkontakte/videoplayer-shared/es2015";var kc=class extends hn{constructor(){super(...arguments);this.stateName="graphIsOpened$";this.graphMadePause=!1;this.state$=Kt(Ae({},ae(null)),{toggle:iI});this.checkIfShouldHide=i=>Ms(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=()=>gt(this,null,function*(){if(this.checkIfShouldHide(ge(l)))return;let s=ge(this.state$),{isEnded$:u,playbackState$:p}=r.state,{disabledControls$:m}=r.ui.controls,f=ge(u),b=ge(p);if(s)try{yield a==null?void 0:a.toggleGraphView(!1),this.state$.set(!1),m.remove(hf),!f&&this.graphMadePause&&r.actions.internal.play()}catch(y){d({message:"Cant hide graph"})}else{this.graphMadePause=b==="playing";try{yield a==null?void 0:a.toggleGraphView(!0),this.state$.set(!0),m.add(hf),!f&&this.graphMadePause&&r.actions.internal.pause()}catch(y){d({message:"Cant show graph"})}}}),o.add(tI({graphIsOpened:this.state$,currentGridType:l}).subscribe(p=>gt(this,[p],function*({graphIsOpened:s,currentGridType:u}){if(this.checkIfShouldHide(u)&&s)try{yield a==null?void 0:a.toggleGraphView(!1),this.state$.set(!1)}catch(f){d({message:"Cant hide graph"})}}))),o}};import{ValueSubject as Hb}from"@vkontakte/videoplayer-shared/es2015";var Lc=class extends hn{constructor(){super(...arguments);this.stateName="pictureInPicture$";this.state$={isActive$:ae(!1),isEnabled$:ae(!1),type$:ae(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 Hb(!1),isEnabled$:new Hb(!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 rI,filterChanged as sI}from"@vkontakte/videoplayer-shared/es2015";import{safeStorage as Vv}from"@vkontakte/videoplayer-shared/es2015";var Ub=({maxShowCount:t,timeout:e})=>{let i=[t!==0?oI({maxCount:t}):void 0,e!==0?nI({timeout:e}):void 0].filter(o=>!!o);return{notificationShowed:o=>i.forEach(r=>r.notificationShowed(o)),canShowNotification:o=>i.every(r=>r.canShowNotification(o))}},oI=({maxCount:t})=>{let e={};return{notificationShowed:i=>{var o,r;e[i]=((o=e[i])!=null?o:0)+1,Vv.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}}},nI=({timeout:t})=>{let e="videoplayer_notifications_manager",i=()=>{try{return JSON.parse(Vv.get(e)||"{}")}catch(a){return{}}},o=a=>Vv.set(e,JSON.stringify(a)),r=a=>{let l=i();delete l[a],o(l)};return{notificationShowed:a=>{o(Kt(Ae({},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 Mc=class extends hn{constructor(){super(...arguments);this.stateName="notifications$";this.state$={notificationsToShow$:ae({}),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=Ub({maxShowCount:a,timeout:l});let u=r.getPlayer();return o.add(u.events.severeStallOccured$.pipe(sI(),rI(p=>p)).subscribe(()=>{d&&!u.info.isAutoQualityEnabled$.getValue()&&this.notificationManager.canShowNotification("slow_video")&&(s&&r.actions.internal.setQuality("auto"),this.state$.showNotification("slow_video"))})),o}};var zb=()=>[Ic,Ec,Pc,Ac,kc,Lc,Mc].reduce(({subscribers:t,stores:e},i)=>{let o=new i;return{subscribers:[...t,o],stores:Kt(Ae({},e),{[o.stateName]:o.state$})}},{subscribers:[],stores:{}});import{devNull as Vc}from"@vkontakte/videoplayer-shared/es2015";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.init()}destroy(){this.shadowRoot.removeEventListener("focusin",this.handleFocusChange)}};var aI=L('<div class="root s-0"><!></div>'),lI={hash:"s-0",code:".root.s-0{align-items:center;display:flex;inset:0;justify-content:center;pointer-events:none;position:absolute;z-index:1}"};function Rv(t,e){F(e,!0),q(t,lI);let i=null,o=K(null);De(()=>(n(o)&&(i=window.setTimeout(()=>{N(o,null)},e.animationDuration)),()=>{i&&clearTimeout(i)}));function r(s){e.playbackStatusShow&&N(o,s?"prev":"next",!0)}var a=Le(),l=de(a);{var d=s=>{var u=Le(),p=de(u);Is(p,()=>n(o),m=>{var f=aI(),b=T(f);let y=v(()=>n(o)==="prev");wc(b,{get duration(){return e.animationDuration},get Icon(){return da},get reversed(){return n(y)}}),w(f),_(m,f)}),_(s,u)};V(l,s=>{e.playbackStatusShow&&n(o)&&s(d)})}return _(t,a),H({startVideoChangedAnimation:r})}var dI=Object.defineProperty,cI=Object.defineProperties,uI=Object.getOwnPropertyDescriptors,Wb=Object.getOwnPropertySymbols,pI=Object.prototype.hasOwnProperty,fI=Object.prototype.propertyIsEnumerable,Dv=(t,e,i)=>e in t?dI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Bs=(t,e)=>{for(var i in e||(e={}))pI.call(e,i)&&Dv(t,i,e[i]);if(Wb)for(var i of Wb(e))fI.call(e,i)&&Dv(t,i,e[i]);return t},mI=(t,e)=>cI(t,uI(e)),Yt=(t,e,i)=>Dv(t,typeof e!="symbol"?e+"":e,i),gp=(t,e,i)=>new Promise((o,r)=>{var a=s=>{try{d(i.next(s))}catch(u){r(u)}},l=s=>{try{d(i.throw(s))}catch(u){r(u)}},d=s=>s.done?o(s.value):Promise.resolve(s.value).then(a,l);d((i=i.apply(t,e)).next())}),PI={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:_I.RU,isCyrillicRelatedInterface:!0,logoClickable:!1,logoHidden:!1,isTouch:TI(),isMediaSessionEnabled:!0,isPictureInPictureEnabled:!0,isAudioDisabled:!1,callbacks:{uiInfo:{}},tuningConfig:{configName:[]},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showAutoplayNext:!0,showNextPrevButtons:!0},Yn=K(void 0),Ov=ci({animationDuration:0,playbackStatusShow:!1}),hp=class extends HTMLElement{constructor(){super(),Yt(this,"svelteStubComponent"),Yt(this,"svelteRootComponent"),Yt(this,"sveltePersistentLayerComponent"),Yt(this,"svelteErrorComponent"),Yt(this,"store"),Yt(this,"microStoresRoot"),Yt(this,"statistics"),Yt(this,"sentry"),Yt(this,"_shadowRoot"),Yt(this,"playerContainer"),Yt(this,"rootContainer"),Yt(this,"shadowRootContainer"),Yt(this,"playerId"),Yt(this,"uiConfig"),Yt(this,"coreConfig"),Yt(this,"statisticsConfig"),Yt(this,"interactiveController"),Yt(this,"interactiveContainer"),Yt(this,"graphMadePause"),Yt(this,"currentPlayingVideoIndex",0),Yt(this,"needToRepeatPlaylist",!1),Yt(this,"videoConfig"),Yt(this,"pictureInPictureApi"),Yt(this,"mediaSessionApi"),Yt(this,"unsubscribePlayerPhaseSubscription"),Yt(this,"logger"),Yt(this,"log"),Yt(this,"subscription"),Yt(this,"interactiveSubscription"),Yt(this,"annotationsApi"),Yt(this,"slotsApi"),Yt(this,"focusManager"),Yt(this,"prevIsid"),Yt(this,"isInited",!1),Yt(this,"postponedInitParams",null),Yt(this,"internalsExposure",null),Yt(this,"shadowDOMCallbacksDisabled",!1),Yt(this,"fatalError$",new gI(null)),Yt(this,"createOneStat",(e,i={})=>{var o,r,a,l;if(!this.videoConfig)return;let{albumId:d,statPlace:s,statUserSalt:u,statTrackCode:p,statVKAppId:m,refreshStatAuthToken:f,autoplay:b,isMobile:y,isTouch:$,refDomain:S,deviceId:C,interactiveData:I}=Cc(this.videoConfig,i),R=(o=I==null?void 0:I.projectInfo)==null?void 0:o.pid,E=(a=(r=this.interactiveController)==null?void 0:r.state.isReplay$.getValue())!=null?a:!1;E&&(this.prevIsid=void 0);let{unitedVideoId:P,isClip:O=!1}=e;if(this.uiConfig.features.statistics&&P)try{return new CI(Bs({movieId:P,albumId:d,place:s,trackCode:p,vkAppId:m,autoplay:(l=b&&!this.interactiveController)!=null?l:!1,mobile:$!=null?$:y,clip:O,refDomain:S,deviceId:C,isPreviewPlayerView:this.videoConfig.playerView==="preview"},R&&(!this.isInited||E)&&{projectId:Number(R)}),Bs({refreshAuthToken:f,userSalt:u,config:this.statisticsConfig},this.interactiveController&&{useIsid:!0,isid:this.prevIsid}))}catch(U){console.error(U),this.log({message:U.message})}}),Vc.create("ui"),this.logger=new bI,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.subscription=new Kb,this.interactiveSubscription=new Kb,this.graphMadePause=!1,this.fatalError$.subscribe(e=>{this.unmountComponent(this.svelteErrorComponent),e&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=jr(Pv,{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=ci({title:o,thumbUrl:r}),l={target:this.playerContainer,props:a};this.svelteStubComponent=jr(Ev,l),this.sveltePersistentLayerComponent=jr(Rv,{target:this.playerContainer,props:Ov}),this.postponedInitParams&&(this.initPlayer(...this.postponedInitParams),this.postponedInitParams=null)}updatePersistentLayerProps(){if(!this.uiConfig)return;let{playbackStatusNextVideoAnimationDuration:e,features:{playbackStatusShow:i,playbackStatusNextVideoShow:o}}=this.uiConfig;Ov.animationDuration=e,Ov.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(),Vc.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.append(this.rootContainer)}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 II.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,p,m,f,b;if(!this.videoConfig)return;let{albumId:y,statPlace:$,statAuthToken:S,preload:C,autoplay:I,volume:R,muted:E,fromTime:P,canRewindLive:O,supportLink:D,showAds:U,adsSlotId:z,adsParams:G={},adsAutoplayParam:le,interfaceLanguage:Y,isCyrillicRelatedInterface:re,logoClickable:X,logoHidden:we,isMobile:ce,isTouch:ne,isAudioDisabled:he,isLiveCatchUpMode:xe,fullScreenTarget:Z,failoverHosts:Ne,canDownload:ue,callbacks:A,interactiveData:Ke,showThumbTimer:Ce,additionalButtons:j=[],additionalSettingsMenuItems:ie=[],additionalContextMenuItems:Oe=[],repeat:Be,loop:fe,saveRate:ee,volumeMultiplier:Se,showEndScreen:Fe,showAutoplayNext:qe,mediascopePixels:Ye}=Cc(this.videoConfig,i),{sources:Te,title:Me,thumbUrl:ze,unitedVideoId:Vt,isClip:et=!1,duration:Ot,adsParams:qt={},videoEpisodes:St,previewThumbsData:Jt,subtitles:Dt,subtitlesForcedLanguage:$e,live:_e,adsExternalApi:J}=e;if(!Te&&!_e){let pi=new Error("empty sources and live");this.fatalError$.next(pi),(r=A.onCrashed)==null||r.call(A,pi.message);return}let ye=Bs(Bs({},G),qt),Pe=this.getNextVideoInfo(),It={sources:Te,title:Me,thumbUrl:ze,subtitles:Dt,subtitlesForcedLanguage:$e,unitedVideoId:Vt,isClip:et,live:_e,albumId:y,statPlace:$,autoplay:I,muted:E,volume:R,fromTime:P,canRewindLive:O,showAds:U,adsSlotId:z,adsParams:ye,adsAutoplayParam:le,duration:Ot,logoClickable:X,logoHidden:we,isTouch:ne!=null?ne:ce,repeat:Be,loop:fe,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:Pe.nextVideoTitle,endScreenVideoThumb:Pe.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()},Ve={pictureInPictureApi:this.pictureInPictureApi,annotationsApi:this.annotationsApi,slotsApi:this.slotsApi};this.log({message:`create player, props: ${JSON.stringify(It)}`});let st=(a=this.interactiveController)==null?void 0:a.state.statistics$.getValue(),mt=(st==null?void 0:st.oneStat)||this.createOneStat(e,i),be=this.createThinOneStat(e,i),Je;Ye&&(Je=new EI({pixels:Ye})),(mt||be)&&(this.statistics=new Yu(mt,be,Je,st==null?void 0:st.statSubscription)),this.uiConfig.features.sentry&&this.uiConfig.sentry.dsn&&new Ra(this.uiConfig.sentry,{version:Rl,env:_u},{movieId:Vt,albumId:y,place:$,autoplay:(l=I&&!this.interactiveController)!=null?l:!1,mobile:ne!=null?ne:ce,clip:et}),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=Bs(Bs({},this.sentry),Ra.getInstance());let nt=!!Ke,ei=[],li="tooltip_interactive_go_back_disabled_first";if(nt&&this.interactiveController){let pi=this.interactiveController.state.isInitialChapter$.getValue(),ct=this.interactiveController.getHistoryState();pi&&ei.push("REPLAY_BUTTON"),this.interactiveController.getIsSeekable().getValue()||ei.push("SEEK_TO_INTERACTIVE_BUTTON"),ct.hasPrevChapter$.getValue()||(ei.push("PLAY_PREV_CHAPTER_BUTTON"),pi||(ct.isGoBackLimited$.getValue()?li="tooltip_interactive_go_back_disabled_limit":li="tooltip_interactive_go_back_disabled"))}let gi=()=>{var pi;this.isInited=!1,this.prevIsid=void 0;let ct=(o==null?void 0:o.info.isEnded$.getValue())&&((pi=this.interactiveController)==null?void 0:pi.state.isEndChapter$.getValue());A.onReplayInteractiveVideo&&!ct?A.onReplayInteractiveVideo():this.replayInteractiveVideo()},bi=Be&&this.videoConfig.videos.length===1;this.store=eb({player:o,interfaceLanguage:Y,isCyrillicRelatedInterface:re,videoId:Vt,isClip:et,isLiveCatchUpMode:xe,isAudioDisabled:he,statAuthToken:S,callbacks:A,webApi:Ve,videoEpisodes:St,previewThumbsData:Jt,canDownload:ue,uiConfig:this.uiConfig,coreConfig:this.coreConfig,disabledControls:ei,isInteractive:nt,saveRate:ee,interactiveRanges$:(p=this.interactiveController)==null?void 0:p.state.interactiveRanges$,isInteractiveTime$:(m=this.interactiveController)==null?void 0:m.state.isInteractiveTime$,stopPlayer:()=>this.stop(),replayInteractive:gi,playPrevChapterDisabledTooltip:li,hasInteractiveBranches:!!((b=(f=this.interactiveController)==null?void 0:f.getChapterBranches())!=null&&b.length),additionalButtons:this.uiConfig.features.additionalButtons?j:[],additionalSettingsMenuItems:ie!=null?ie:[],additionalContextMenuItems:Oe!=null?Oe:[],playPrevVideo:()=>this.playPrevVideo(),playNextVideo:()=>this.playNextVideo(),onVideoChanged:pi=>{var ct;return(ct=this.sveltePersistentLayerComponent)==null?void 0:ct.startVideoChangedAnimation(pi)},looped:this.uiConfig.features.useLoopSetting?fe:bi,statistics:this.statistics,internalsExposure:this.internalsExposure,playerView:this.videoConfig.playerView,playerId:this.playerId});let{stores:io}=this.microStoresRoot=zb(),ho=()=>{var pi,ct,Pi,jt,wt,oi;if(!this.store||!this.microStoresRoot||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(bt=>{var je;return(je=A==null?void 0:A.onCurrentFormatChanged)==null?void 0:je.call(A,bt)})),this.subscription.add(io.interactiveControlsOpacity$.subscribe(bt=>{var je;bt!==null&&((je=this==null?void 0:this.interactiveController)==null||je.setDisabledControls(bt))})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(bt=>{var je;return(je=A==null?void 0:A.onThroughputEstimationChanged)==null?void 0:je.call(A,bt)})),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(bt=>{var je;return(je=A==null?void 0:A.onTrafficSavingEnabledChanged)==null?void 0:je.call(A,bt)})),this.subscription.add(this.store.state.highQualityEnabled$.subscribe(bt=>{var je;return(je=A==null?void 0:A.onHighQualityEnabledChanged)==null?void 0:je.call(A,bt)})),this.subscription.add(this.store.state.isAutoQualityEnabled$.subscribe(bt=>{var je;return(je=A==null?void 0:A.onAutoQualityEnabledChanged)==null?void 0:je.call(A,!!bt)})),this.subscription.add(new $I(bt=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(je=>bt.next(je)))}).pipe(wI(1)).subscribe(bt=>{var je;return(je=A==null?void 0:A.onCurrentPlaybackRateChanged)==null?void 0:je.call(A,bt)})),this.subscription.add(this.store.state.volume$.subscribe(bt=>{var je;return(je=A==null?void 0:A.onVolumeChange)==null?void 0:je.call(A,bt)})),this.subscription.add(this.store.state.muted$.subscribe(bt=>{var je,xi,oo,Jo;if(bt)(je=A==null?void 0:A.onMute)==null||je.call(A);else{let _n=(oo=((xi=this.store)==null?void 0:xi.state.volume$)&&ge(this.store.state.volume$))!=null?oo:0;(Jo=A==null?void 0:A.onUnmute)==null||Jo.call(A,_n)}})),this.subscription.add(this.store.state.videoBitrate$.subscribe(bt=>{var je;return(je=A==null?void 0:A.onVideoBitrateChanged)==null?void 0:je.call(A,bt)})),this.subscription.add(this.store.state.isInteractiveTime$.subscribe(bt=>{var je;let xi=(je=this.store)==null?void 0:je.ui.controls.disabledControls$;xi&&(bt&&!xi.includes(Ad)&&xi.add(Ad),bt||xi.remove(Ad))})),this.subscription.add(this.store.ui.isFullscreen.subscribe(bt=>gp(this,null,function*(){var je;if(!qb.browser.isSamsungBrowser||!bt||!this.interactiveController)return;document.fullscreenElement===this.shadowRootContainer&&(yield this.replayInteractiveChapter((je=this.videoConfig)==null?void 0:je.callbacks.onExternalFullscreenExit))}))),this.statistics&&this.statistics.oneStat&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(bt=>{var je;return(je=A==null?void 0:A.onVSIDChanged)==null?void 0:je.call(A,bt)})),this.initMediaSession(),N(Yn,{interactiveController:this.interactiveController,interactiveContainer:this.interactiveContainer,sources:Te,store:this.store,microStoresRoot:this.microStoresRoot,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:Me,thumbUrl:ze,subtitles:Dt,subtitlesForcedLanguage:$e,live:_e,preload:C,autoplay:I,muted:E,volume:R,fromTime:P,canRewindLive:O,supportLink:D,showAds:U,adsSlotId:z,adsParams:ye,adsAutoplayParam:le,duration:Ot,logoClickable:X,logoHidden:we,isMobile:ne!=null?ne:ce,failoverHosts:Ne,fullScreenTarget:Z,saveRate:ee,shadowRootContainer:this.shadowRootContainer,showMiniTimer:Ce,outerContainerRef:this.rootContainer,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:Pe.nextVideoTitle,endScreenVideoThumb:Pe.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist(),playPrevChapter:()=>this.playPrevChapter(),seekToInteractive:()=>this.seekToInteractive(),volumeMultiplier:Se,showEndScreen:Fe,showAutoplayNext:qe,adsExternalApi:J},!0);let Xt={target:this.playerContainer,props:n(Yn)};this.svelteRootComponent=jr(Cv,Xt),this.addPlayerInfoSubscriptions(),this.isInited||(this.isInited=!0,(Pi=(ct=(pi=this.videoConfig)==null?void 0:pi.callbacks)==null?void 0:ct.onInited)==null||Pi.call(ct)),(jt=this.internalsExposure)==null||jt.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig,logger:this.logger,log:this.log}),this.uiConfig.devNullLog&&((oi=(wt=this.videoConfig)==null?void 0:wt.callbacks)!=null&&oi.onDevNullLog)?Vc.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):Vc.destroy("ui")};this.coreConfig.asyncResolveClientChecker?qb.isInited$.subscribe(pi=>{pi&&(console.log("UI SDK async start"),ho())}):ho()}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.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&&Nv(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)}initInteractives(){return gp(this,null,function*(){var e,i,o,r,a,l;if((e=this.videoConfig)!=null&&e.interactiveData)try{let{Interactives:d}=yield import("@vkontakte/videoplayer-interactive/es2015");this.interactiveContainer=document.createElement("div"),this.interactiveContainer.classList.add("interactive-root");let s=(i=this.store)==null?void 0:i.interfaceLanguage$,u=s?ge(s):this.videoConfig.interfaceLanguage,{projectInfo:p,initChapterId:m,historyApi:f,videoLoader:b}=this.videoConfig.interactiveData;this.interactiveController=new d({parentElement:this.interactiveContainer,fullscreenTargetElement:this.playerContainer,lang:u,graph:this.uiConfig.features.interactiveGraph,projectInfo:p,initChapterId:m,historyApi:f,vkVideoLoader:b,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$:$}=this.interactiveController.state;this.uiConfig.features.seekToInteractive&&this.subscription.add($.subscribe(C=>{if(!this.isInited)return;let I=this.store;C?I.ui.controls.disabledControls$.remove("SEEK_TO_INTERACTIVE_BUTTON"):I.ui.controls.disabledControls$.add("SEEK_TO_INTERACTIVE_BUTTON")})),this.subscription.add(y.subscribe(C=>{this.store&&this.store.state.isInteractiveExpectation$.set(C)}));let S=!0;if(this.subscription.add(this.interactiveController.events.playerChanged$.subscribe(C=>{if(!this.videoConfig)return;this.videoConfig.videos[this.currentPlayingVideoIndex]=mI(Bs({},C.config),{title:(p==null?void 0:p.title)||C.config.title});let I=S?this.videoConfig.autoplay:!0;this.createPlayerWithCurrentVideo(C.player,I),S&&(S=!1)})),this.interactiveSubscription.add(this.interactiveController.events.interactiveActionChoice$.subscribe(({type:C,actionType:I})=>{var R,E,P,O,D,U;if(!this.store||!this.microStoresRoot)return;let z=y.getValue();if(C==="action-choice"&&I==="setRandomBranch"&&(this.microStoresRoot.stores.graphIsOpened$.set(!1),this.store.ui.controls.disabledControls$.remove(kd)),C==="action-choice-canceled"){let G=ge(this.store.state.isPlaying$)||z;if(((P=(R=this.videoConfig)==null?void 0:R.isTouch)!=null?P:(E=this.videoConfig)!=null&&E.isMobile)&&G){this.store.ui.interactiveHideMobileControls.set(!0);return}(U=(O=this.videoConfig)==null?void 0:(D=O.callbacks).onDisabledInteractiveClick)==null||U.call(D)}})),this.interactiveSubscription.add(this.interactiveController.events.interactiveContainerFakeRemoved$.subscribe(({type:C,removeAllOpenURI:I})=>{this.store&&C==="container-fake-removed"&&I&&this.store.ui.controls.disabledControls$.remove(kd)})),yield this.interactiveController.setManifest(this.videoConfig.interactiveData.manifest),(r=(o=this.videoConfig)==null?void 0:o.callbacks)!=null&&r.onInteractiveHistoryChanged){let C=this.interactiveController.getHistoryState();this.subscription.add(C.history$.subscribe(I=>{var R,E,P;I.length&&((P=(E=(R=this.videoConfig)==null?void 0:R.callbacks)==null?void 0:E.onInteractiveHistoryChanged)==null||P.call(E,I))}))}(l=(a=this.videoConfig)==null?void 0:a.callbacks)!=null&&l.onInteractiveChapterChanged&&this.subscription.add(this.interactiveController.events.chapterChanged$.subscribe(C=>{var I,R,E;(E=(I=this.videoConfig)==null?void 0:(R=I.callbacks).onInteractiveChapterChanged)==null||E.call(R,C.chapter,C.manifestVideo)})),this.uiConfig.features.interactiveTimeIndicator&&this.subscription.add(this.interactiveController.events.noInteraction$.subscribe(()=>{var C,I,R,E;(C=this.microStoresRoot)==null||C.stores.showInteractiveTimeIndicatorTooltip$.set(!0,!0),(E=(I=this.videoConfig)==null?void 0:(R=I.callbacks).onInteractiveTimeIndicatorClick)==null||E.call(R)})),this.interactiveSubscription.add(this.interactiveController.events.error$.subscribe(C=>{this.log({message:C.toString()})}))}catch(d){this.log({message:d.message})}})}initPlayer(e,i={}){var o,r,a,l,d,s,u,p,m,f,b,y,$,S,C,I,R,E,P,O,D,U,z,G,le;if(!this.isConnected){this.postponedInitParams=[e,i];return}if(!Array.isArray(e.videos)||e.videos.length===0&&!e.interactiveData){let Y=new Error("empty videos");this.fatalError$.next(Y),(r=(o=e.callbacks)==null?void 0:o.onCrashed)==null||r.call(o,Y.message);return}else this.fatalError$.next(null);if(this.videoConfig=Cc(PI,hI(e,Y=>Y instanceof HTMLElement?Y:void 0)),this.playerId=SI(e.playerId),this.uiConfig=Ph((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 xI("ui",this.playerId))),Vc.push("ui",{key:"videoplayer_embed",strings:["new","player_init_player","ads.enable: "+this.uiConfig.ads.enable,"showAds: "+((p=this.videoConfig)==null?void 0:p.showAds)],numbers:[vI()]}),Nv(this.videoConfig.isMediaSessionEnabled)&&(this.uiConfig.features.mediaSession=(f=(m=this.uiConfig.features.mediaSession)!=null?m:this.videoConfig.isMediaSessionEnabled)!=null?f:!0),Nv(this.videoConfig.isPictureInPictureEnabled)&&(this.uiConfig.features.pip=(y=(b=this.uiConfig.features.pip)!=null?b:this.videoConfig.isPictureInPictureEnabled)!=null?y:!0,this.uiConfig.features.dpip=(S=($=this.uiConfig.features.dpip)!=null?$:this.videoConfig.isPictureInPictureEnabled)!=null?S:!0),this.uiConfig.ads.paramsOverride=Bs({preview:(C=this.uiConfig.ads.preview)!=null?C:this.videoConfig.adsPreviewParam},this.uiConfig.ads.paramsOverride),this.videoConfig.isTouch=(R=(I=this.uiConfig.isMobile)!=null?I:this.videoConfig.isTouch)!=null?R:this.videoConfig.isMobile,(E=this.videoConfig).autoplay&&(E.autoplay=this.uiConfig.features.autoplay),this.videoConfig.showAds=(P=this.uiConfig.ads.enable)!=null?P:this.videoConfig.showAds,this.videoConfig.adsSlotId=(O=this.uiConfig.ads.slot)!=null?O:this.videoConfig.adsSlotId,this.videoConfig.logoHidden=!((D=this.uiConfig.showLogo)!=null?D:!this.videoConfig.logoHidden),(U=this.videoConfig).canRewindLive&&(U.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&&((G=this.videoConfig.videos)!=null&&G[this.videoConfig.videoIndex])?this.videoConfig.videoIndex:0,this.needToRepeatPlaylist=this.videoConfig.repeat,this.uiConfig.features.pip){let Y={enabled:this.videoConfig.pipEnabled};this.uiConfig.features.dpip?this.pictureInPictureApi=up.getLatestSupportedVersion(Y):this.pictureInPictureApi=new Na(Y)}this.mediaSessionApi=this.uiConfig.features.mediaSession?new cp:void 0,this.slotsApi=this.uiConfig.features.slots?new sp:void 0,this.annotationsApi=this.uiConfig.features.annotations?new pp(this.uiConfig.features.annotationsInside):void 0,this.annotationsApi&&!this.uiConfig.features.annotationsInside&&this.annotationsApi.init(this.rootContainer),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]),Ob(this.pictureInPictureApi)&&this.pictureInPictureApi.setPlayerDomElement(this.playerContainer,this._shadowRoot),(le=this.slotsApi)==null||le.init(this.shadowRootContainer,this.store),this.focusManager=this._shadowRoot?new vp(this._shadowRoot):void 0}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(Yn)&&(n(Yn).showNextPrevButtons=this.needToShowNextPrevButtons(),n(Yn).nextButtonActive=this.isNextButtonActive(),n(Yn).prevButtonActive=this.isPrevButtonActive(),n(Yn).endScreenVideoTitle=o.nextVideoTitle,n(Yn).endScreenVideoThumb=o.nextVideoThumb,n(Yn).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}=Bs({},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(Yn)&&(n(Yn).needToRepeatPlaylist=this.needToRepeatPlaylist,n(Yn).showNextPrevButtons=this.needToShowNextPrevButtons(),n(Yn).nextButtonActive=this.isNextButtonActive(),n(Yn).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)}setLanguage(e){return gp(this,null,function*(){var i;yield(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()}replayInteractiveChapter(e){return gp(this,null,function*(){var i,o;if(this.interactiveController&&((i=this.store)!=null&&i.state.positionExact$)){let r=ge(this.store.state.positionExact$),l=ge(this.store.state.interactiveEpisodes$).find(s=>!s.completed);this.interactiveController.events.playerChanged$.pipe(yI()).subscribe(()=>{l&&r>=l.time?this.seekTime(l.time):this.seekTime(r),e==null||e()});let d=this.interactiveController.getCurrentChapter();yield 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&&Aa(e)}};import{InterfaceLanguage as sne,VKNumericLanguage as ane,loadVKLangPack as lne}from"@vkontakte/videoplayer-shared/es2015";import{VideoQuality as cne,VideoFormat as une}from"@vkontakte/videoplayer-core/es2015";var Zoe=()=>{window.customElements.define("vk-video-player",hp)};export{ju as ControlButtonType,gs as GridTypes,sne as InterfaceLanguage,Ud as MenuItemType,hs as PlayerPhase,Rl as VERSION,ane as VKNumericLanguage,une as VideoFormat,cne as VideoQuality,lne as loadVKLangPack,Zoe 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`)),b(m,p)};R(d,m=>{e.type==="off"?m(s):m(u,!1)})}b(r,l)},$$slots:{default:!0}}),F()}function sm(t,e){B(e,!0);let i=g(e,"isSubtitlesEnabled",3,!1),r=ve().ui.t,a=v(()=>i()?r("tooltip_subtitles_on"):r("tooltip_subtitles_off"));Kt(t,{testId:"btn-Subtitles",get ariaLabel(){return n(a)},get click(){return e.click},get ariaKeyShortCut(){return fs.KeyC},role:"button",children:(l,d)=>{let s=v(()=>i()?void 0:"outline");sa(l,{get size(){return"24"},get type(){return n(s)}})},$$slots:{default:!0}}),F()}var F0=M('<span class="duration s-21" data-testid="video_duration"> </span>'),H0=M('<div><span class="current s-21" data-testid="current_time"> </span> <!></div>'),U0={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 Gd(t,e){B(e,!0),q(t,U0);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=Vt(),d=ae(!1),s=v(()=>Xo(e.duration)),u=v(()=>Xo(e.position));var m=H0();let p;var f=T(m),$=T(f,!0);w(f);var y=L(f,2);{var _=S=>{var C=F0(),I=T(C,!0);w(C),D(()=>me(I,n(s))),b(S,C)};R(y,S=>{r()&&S(_)})}w(m),Es(m,()=>Rl(o()&&l.features.usePerformanceFix,d,l.disableInvisibleComponentsTimeout)),je(m,S=>a(S),()=>a()),D(S=>{p=se(m,1,"time s-21",null,p,S),me($,n(u))},[()=>({mobile:i()})]),b(t,m),F()}import{noop as Uu}from"@vkontakte/videoplayer-shared/es2015";var z0=Ce("<path></path>");function aa(t,e){B(e,!0);let i=g(e,"volume",3,1),o=g(e,"muted",3,!1),r=(p,f)=>f?"off":p>.5?"max":p>.2?"mid":p>0?"min":"off",a=v(()=>r(i(),o())),l=v(()=>fn(e.size)),d="M4 19.9a2 2 90 011.88-2l5.68-.32a4 4 90 002.5-1.08l8.58-8a2 2 90 013.36 1.44v28.12a2 2 90 01-3.36 1.46l-8.58-8.02a4 4 90 00-2.52-1.08l-5.66-.32a2 2 90 01-1.88-2z",s="M44.92 16.52a1.8 1.8 90 012.56 2.56L42.54 24l4.94 4.92a1.8 1.8 90 11-2.56 2.56L40 26.54l-4.92 4.94a1.8 1.8 90 01-2.56-2.56L37.46 24l-4.94-4.92a1.8 1.8 90 112.56-2.56L40 21.46z",u="M31.5 17.8a1.8 1.8 90 012.54-.14A8.6 8.6 90 0136.8 24c0 2.52-1.06 4.8-2.76 6.34a1.8 1.8 90 11-2.4-2.68c.92-.84 1.56-2.16 1.56-3.66s-.64-2.8-1.58-3.66a1.8 1.8 90 01-.12-2.54",m="M37.62 13.34a1.8 1.8 90 012.54.2 16 16 90 010 20.9 1.8 1.8 90 01-2.74-2.32 12.4 12.4 90 000-16.24 1.8 1.8 90 01.2-2.54";Xe(t,{get width(){return"48"},get height(){return"48"},get style(){return n(l)},get testId(){var p;return`volume-${(p=n(a))!=null?p:""}-icon`},get shadow(){return e.shadow},children:(p,f)=>{var $=z0();D(()=>Ve($,"d",`M4 19.9a2 2 90 011.88-2l5.68-.32a4 4 90 002.5-1.08l8.58-8a2 2 90 013.36 1.44v28.12a2 2 90 01-3.36 1.46l-8.58-8.02a4 4 90 00-2.52-1.08l-5.66-.32a2 2 90 01-1.88-2z${n(a)==="off"?s:`${u}${n(a)==="max"?m:""}`}`)),b(p,$)},$$slots:{default:!0}}),F()}import{isNonNullable as W_,noop as Xn}from"@vkontakte/videoplayer-shared/es2015";import{noop as lm}from"@vkontakte/videoplayer-shared/es2015";import{noop as K0}from"@vkontakte/videoplayer-shared/es2015";var W0=M('<div class="overlay"><!></div>');function am(t,e){B(e,!0);let[i,o]=Re(),r=()=>x(l,"$overlayContainer$",i),l=ve().ui.overlayContainer$,d=K(void 0),s=f=>{!f||!n(d)||!f.contains(n(d))||f.removeChild(n(d))},u=f=>{!f||!n(d)||f.contains(n(d))||f.appendChild(n(d))};Oe(()=>{u(r())}),Mt(()=>(u(r()),()=>s(r())));var m=W0(),p=T(m);ri(p,()=>{var f;return(f=e.children)!=null?f:vt}),w(m),je(m,f=>O(d,f),()=>n(d)),b(t,m),F(),o()}var q0=M('<div class="tooltip s-1i"><div class="content s-1i"> </div> <div class="tooltip-pointer s-1i"></div></div>'),Q0=M("<div><!></div> <!>",1),G0={hash:"s-1i",code:'.tooltip-wrapper.s-1i{display:flex;flex-direction:column;min-width:0}.full-width.s-1i{width:100%}.tooltip.s-1i{bottom:100%;left:0;opacity:0;position:absolute;transition:opacity .2s,visibility .2s;visibility:hidden}.content.s-1i{background-color:rgba(41,41,41,.8);border-radius:3px;color:var(--white);display:inline-block;padding:6px 10px}.tooltip-pointer.s-1i{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),q(t,G0);let[i,o]=Re(),r=()=>x(Y,"$overlayContainer$",i),a=()=>x(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),m=g(e,"translateY",3,0),p=g(e,"isFullWidthWrapper",3,!1),f=g(e,"maxTooltipWidth",3,void 0),$=g(e,"placement",3,"top"),y=g(e,"onVisibilityChange",3,K0),_=5,S=K(void 0),C=K(void 0),I,N=K(0),P=K(0),E=K(0),k=K(0),Q=Vt(),H=ve(),z=H.ui.playerSize,Y=H.ui.overlayContainer$;Oe(()=>{It(()=>{y()(s())})});let le=H.getLogger().createComponentLog("Tooltip component"),X=()=>{if(!r()||!n(C)||!n(S))return;O(P,_);let U=r().getBoundingClientRect(),ke=n(S).getBoundingClientRect(),Pe=ke.width,Ue=n(C).clientWidth,Ze=a().width,ye=(Pe-Ue)/2,Ae=ke.left+u()-U.left,Fe=Ae+ye,Dt=ke.top+m()-U.top,pt=Ue/2-_,Bt=Fe<8,st=Fe+Ue>Ze-8;Bt&&(Fe=8,pt=Ae+ke.width/2-2.5*_),st&&(Fe=Ze-8-Ue,pt=ke.left-U.left+ke.width/2-Fe-_),O(E,Fe,!0),O(k,Dt),O(N,pt,!0)},re=()=>{!r()||!n(C)||!n(S)||O(P,-_)},Z=()=>{if(!r()||!n(C)||!n(S))return;O(N,_);let U=r().getBoundingClientRect(),ke=n(S).getBoundingClientRect(),Pe=ke.height,Ue=n(C).clientHeight,Ze=(Pe-Ue)/2+Ue,ye=ke.left+u()-U.left-n(C).clientWidth,Ae=2,Fe=ye-_;Fe<8&&(Fe=8);let pt=ke.top+m()-U.top+Ze,Bt=Ae-Ze/2,st=Ae-_;O(E,Fe,!0),O(k,pt),O(P,Bt),O(N,st)},we=()=>{!r()||!n(C)||!n(S)||O(N,-_)},ue=()=>{switch($()){case"top":X();break;case"bottom":re();break;case"left":Z();break;default:we()}},ne=()=>{try{if(!r()||!n(S))return;ue(),s(!0)}catch(U){le({message:String(U)})}},_e=()=>{s(!1)},xe=()=>{n(C)&&(I||(I=window.setTimeout(ne,Q.controls.hideTimeoutTooltips)),s()&&ne())},J=()=>{_e(),window.clearTimeout(I),I=void 0},Ne=(U,ke,Pe)=>{let Ue="";switch($()){case"top":Ue=`transform: translate(${U}px, ${ke}px);`;break;case"bottom":Ue=`transform: translate(${U}px, ${ke}px); top: auto; bottom: 100%;`;break;case"left":Ue=`transform: translate(${U}px, ${ke}px); left: 0; right: auto;`;break;default:Ue=`transform: translate(${U}px, ${ke}px);`}return Ue+=` max-width: ${f()===void 0?"auto":`${f()}px`};`,Ue+=` opacity: ${Pe?1:0}; visibility: ${Pe?"visible":"hidden"}`,Ue},pe=(U,ke)=>{let Pe="";switch($()){case"top":Pe=`transform: translate(${U}px, ${ke}px) rotate(0); top: auto; bottom: 0;`;break;case"bottom":Pe=`transform: translate(${U}px, ${ke}px) rotate(180deg); top: 0; bottom: auto;`;break;case"left":Pe=`transform: translate(${U}px, ${ke}px) rotate(-90deg); left: 100%; top: auto; bottom: 0;`;break;default:Pe=`transform: translate(${U}px, ${ke}px) rotate(90deg); right: 100%; top: auto; bottom: 0;`}return Pe},A=v(()=>Ne(n(E),n(k),s())),We=v(()=>pe(n(N),n(P)));Mt(ue),pn(()=>window.clearTimeout(I));var Te=Q0(),j=de(Te);let ie;j.__pointermove=xe,j.__pointerdown=J,j.__pointerup=function(...U){var ke;(ke=e.disableMouseupTooltipShow?void 0:xe)==null||ke.apply(this,U)};var De=T(j);ri(De,()=>{var U;return(U=e.children)!=null?U:vt}),w(j),je(j,U=>O(S,U),()=>n(S));var Be=L(j,2);{var it=U=>{am(U,{children:(ke,Pe)=>{var Ue=q0(),Ze=T(Ue),ye=T(Ze,!0);w(Ze);var Ae=L(Ze,2);w(Ue),je(Ue,Fe=>O(C,Fe),()=>n(C)),D(()=>{Qe(Ue,n(A)),me(ye,d()),Qe(Ae,n(We))}),b(ke,Ue)},$$slots:{default:!0}})};R(Be,U=>{d()&&!l()&&U(it)})}D(U=>ie=se(j,1,"tooltip-wrapper s-1i",null,ie,U),[()=>({"full-width":p()})]),gt("pointerenter",j,xe),gt("pointerleave",j,J),b(t,Te),F(),o()}tt(["pointermove","pointerdown","pointerup"]);var z_=t=>{t.stopPropagation()},Y0=M("<div><!></div>"),j0={hash:"s-18",code:".btn-container.s-18{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-18{min-width:0;width:100%}"};function Oo(t,e){B(e,!0),q(t,j0);let[i,o]=Re(),r=()=>x(u,"$isGraphOpened$",i),a=()=>x(s,"$isMobile",i),l=ve(),d=wo(),s=l.ui.isMobile,u=d.graphIsOpened$,m=l.ui.t,p=g(e,"className",3,""),f=g(e,"disabled",3,!1),$=g(e,"hasTooltip",3,!0),y=g(e,"ref",15,void 0),_=g(e,"width",15,void 0),S=g(e,"isFullWidthTooltip",3,!0),C=g(e,"tooltipContent",3,""),I=g(e,"tooltipVisible",3,!1),N=g(e,"tooltipPlacement",3,"top"),P=g(e,"disabledTooltipContent",19,()=>m("tooltip_button_disabled")),E=g(e,"isAriaHidden",3,!1),k=g(e,"onTooltipVisibilityChange",3,lm),Q=g(e,"initialTranslateXPx",3,0),H=g(e,"initialTranslateYPx",19,()=>-18),z=g(e,"mouseEnter",3,lm),Y=g(e,"mouseLeave",3,lm),le=v(()=>f()?r()?m("tooltip_disabled_when_graph_on"):P():C()),X=K(!1);Oe(()=>{I()||O(X,!1)});var re=Y0();re.__pointerdown=[z_],re.__click=[z_];var Z=T(re);{var we=ne=>{Fa(ne,{get content(){return n(le)},get translateX(){return Q()},get translateY(){return H()},get isFullWidthWrapper(){return S()},get placement(){return N()},get onVisibilityChange(){return k()},get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get active(){return n(X)},set active(_e){O(X,_e,!0)},children:(_e,xe)=>{var J=Le(),Ne=de(J);ri(Ne,()=>{var pe;return(pe=e.children)!=null?pe:vt}),b(_e,J)},$$slots:{default:!0}})},ue=ne=>{var _e=Le(),xe=de(_e);ri(xe,()=>{var J;return(J=e.children)!=null?J:vt}),b(ne,_e)};R(Z,ne=>{$()&&n(le)&&!a()?ne(we):ne(ue,!1)})}w(re),je(re,ne=>y(ne),()=>y()),D(()=>{var ne;se(re,1,`btn-container ${(ne=p())!=null?ne:""}`,"s-18"),Ve(re,"aria-hidden",E()||null)}),gt("mouseenter",re,function(...ne){var _e;(_e=z())==null||_e.apply(this,ne)}),gt("mouseleave",re,function(...ne){var _e;(_e=Y())==null||_e.apply(this,ne)}),En(re,"clientWidth",_),b(t,re),F(),o()}tt(["pointerdown","click"]);var X0=Ce('<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 Yd(t,e){let i=v(()=>(e.completed,"interactive-episode-completed-icon"));Xe(t,{width:"20",height:"20",fill:"none",get testId(){return n(i)},children:(o,r)=>{var a=X0(),l=de(a),d=L(l);D(()=>{Ve(l,"fill",ea),Ve(l,"fill-opacity",e.completed?1:.24),Ve(d,"fill",e.completed?"var(--interactive-episode-complete)":"white")}),b(o,a)},$$slots:{default:!0}})}var Z0=M("<div><!></div>"),J0={hash:"s-k",code:".interactive-episode-icon.s-k{cursor:default;height:20px;position:absolute;transform:translateX(-50%);width:20px}.interactive-episode-icon.disabled.s-k{opacity:.4;pointer-events:none}"};function dm(t,e){B(e,!0),q(t,J0);let o=ve().ui.t,r=K(0),a=v(()=>o(e.videoEpisode.completed?"tooltip_episode_finished":"tooltip_episode_unfinished"));Oo(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=Z0();let u;var m=T(s);let p=v(()=>!!e.videoEpisode.completed);Yd(m,{get completed(){return n(p)}}),w(s),D(f=>{u=se(s,1,"interactive-episode-icon s-k",null,u,f),Qe(s,`left: ${e.videoEpisode.from+e.videoEpisode.width/2}%`)},[()=>({disabled:e.disabled})]),En(s,"clientWidth",f=>O(r,f)),b(l,s)},$$slots:{default:!0}}),F()}var ex=M('<div><div class="video-episode-inner s-l"><div class="video-episode-loaded s-l"></div> <div></div></div></div>'),tx=M('<div class="video-episodes-wrap s-l"></div>'),ix={hash:"s-l",code:".video-episodes-wrap.s-l{height:100%;position:absolute;width:100%}.video-episode.s-l{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-l:first-child{padding-left:0}.video-episode.s-l:last-child{padding-right:0}.video-episode.s-l:not(.disabled):where(:hover,:active){transform:scaleY(1.5)}.video-episode-filled.s-l,.video-episode-inner.s-l,.video-episode-loaded.s-l{border-radius:var(--slider-radius);height:var(--slider-height);position:absolute}.video-episode-inner.s-l{background:var(--slider-bg);overflow:hidden;position:absolute;width:calc(100% - var(--slider-video-episode-gap)*2)}.video-episode.s-l:first-child .video-episode-inner:where(.s-l),.video-episode.s-l:last-child .video-episode-inner:where(.s-l){width:calc(100% - var(--slider-video-episode-gap))}.video-episode-loaded.s-l{background:var(--slider-loaded-bg);transition:transform .2s}.video-episode-filled.s-l,.video-episode-loaded.s-l{border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.video-episode-filled.s-l{background-color:var(--slider-filled-bg)}"};function cm(t,e){q(t,ix);let i=g(e,"videoEpisodes",19,()=>[]);var o=tx();wi(o,21,i,r=>r.from,(r,a)=>{var l=ex();let d;var s=T(l),u=T(s),m=L(u,2);let p;w(s),w(l),D((f,$)=>{d=se(l,1,"video-episode s-l",null,d,f),Qe(l,`left: ${n(a).from}%; width: ${n(a).width}%`),Qe(u,`transform: translateX(${n(a).loadedWidth/n(a).width*100}%)`),p=se(m,1,"video-episode-filled s-l",null,p,$),Qe(m,`transform: translateX(${n(a).filledWidth/n(a).width*100}%)`)},[()=>({disabled:e.disabled,mobile:e.isMobile}),()=>({mobile:e.isMobile})]),b(r,l)}),w(o),b(t,o)}function ox(t,e,i,o,r,a,l){if(t.preventDefault(),e()&&O(i,e().getBoundingClientRect(),!0),o()||n(r)||!e())return;O(r,!0);let d=a(t.clientX,t.clientY);l()(d,t),e().setPointerCapture(t.pointerId)}function nx(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 rx(t,e,i,o,r){if(t.preventDefault(),e()||!n(i))return;O(i,!1);let a=o(t.clientX,t.clientY);r()(a,t)}function sx(t,e,i,o){t.stopPropagation(),t.preventDefault(),e()&&i()(o(t.clientX,t.clientY))}function ax(t,e,i,o,r,a){let l=e(t.clientX,t.clientY);i()&&o()(l),O(r,!1),a()(l)}var lx=M("<div></div>"),dx=M('<div class="bars s-h"><div class="loaded s-h"></div> <div></div></div>'),cx=M('<!> <div role="slider" tabindex="0"><!> <div><div></div></div></div>',1),ux={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 Ha(t,e){B(e,!0),q(t,ux);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),m=g(e,"videoEpisodes",19,()=>[]),p=g(e,"withWheelHandler",3,!1),f=g(e,"isInteractive",3,!1),$=g(e,"disabled",3,!1),y=g(e,"hideHandel",3,!1),_=g(e,"onPointerDown",3,Xn),S=g(e,"onHandleMove",3,Xn),C=g(e,"onPointerUp",3,Xn),I=g(e,"onPointerEnter",3,Xn),N=g(e,"onPointerMove",3,Xn),P=g(e,"onPointerLeave",3,Xn),E=g(e,"onMouseEnter",3,Xn),k=g(e,"onMouseLeave",3,Xn),Q=g(e,"onWheelUp",3,Xn),H=g(e,"onWheelDown",3,Xn),z=g(e,"onWheelLeft",3,Xn),Y=g(e,"onWheelRight",3,Xn),le=g(e,"onDisabledClick",3,Xn),X=g(e,"loadedProgress",3,0),re=g(e,"filledProgress",3,0),Z=g(e,"handleProgress",3,0),we=g(e,"ariaLabel",3,""),ue=g(e,"ariaValueMin",3,void 0),ne=g(e,"ariaValueMax",3,void 0),_e=g(e,"ariaValueNow",3,void 0),xe=g(e,"ariaValueText",3,""),J=g(e,"onContextMenu",3,Xn),Ne=g(e,"handleAlwaysVisible",3,!1),pe=Vt(),A=K(void 0),We=K(!1),Te=v(()=>{var Me;return(Me=ne())!=null?Me:0}),j=v(()=>{var Me;return W_(m())&&((Me=m()[m().length-1])==null?void 0:Me.time)<n(Te)}),ie=v(()=>W_(m())&&m().length&&n(j)&&n(Te)?Ze(X()*100,re()*100):[]);function De(Me){if(Me.preventDefault(),i()&&O(A,i().getBoundingClientRect(),!0),$())return;let $t=Pe(Me.clientX,Me.clientY),At=Ue(Me.clientX);I()($t,At,n(A).width)}function Be(Me){Me.preventDefault(),!$()&&P()()}function it(){E()()}function U(){k()()}function ke(Me){$()||p()&&(Me.preventDefault(),Me.deltaY<0?Q()():Me.deltaY>0?H()():Me.deltaX>0?Y()():z()())}function Pe(Me,$t){return l()?Math.max(0,Math.min(1,(n(A).height-($t-n(A).top))/n(A).height)):Math.min(Math.max(Me-n(A).x,0),n(A).width)/n(A).width}function Ue(Me){return Math.min(Math.max(Me-n(A).x,0),n(A).width)}function Ze(Me,$t){let At=pe.features.episodesClustering&&!f()?pe.episodeMinWidthPc:0,ct=[],ce=m()[0].time/n(Te)*100,ze=0,Ge=0;for(let Ht=1;Ht<m().length;Ht++)ze=m()[Ht].time/n(Te)*100,ze-ce>At&&(ct.push({from:ce,width:Math.max(0,ze-ce),loadedWidth:Math.max(0,Math.min(ze,Me)-ce),filledWidth:Math.max(0,Math.min(ze,$t)-ce),interactive:m()[Ht-1].interactive,completed:m()[Ht-1].completed}),ce=m()[Ht].time/n(Te)*100,Ge++);let at={from:ce,width:Math.max(0,100-ce),loadedWidth:Math.max(0,Math.min(Me,100)-ce),filledWidth:Math.max(0,Math.min($t,100)-ce),interactive:m()[Ge].interactive,completed:m()[Ge].completed};100-ce<At?(Ge-=1,ct[Ge].width+=100-ce,ct[Ge].loadedWidth+=Math.max(0,Math.min(Me,100)-ce),ct[Ge].filledWidth+=Math.max(0,Math.min($t,100)-ce)):ct[Ge]=at;let Ft=m()[0].time;if(Ft!==0){let Ht=Ft/n(Te)*100;ct.unshift({from:0,width:Ht,loadedWidth:Math.min(Ht,Me),filledWidth:Math.min(Ht,$t)})}return ct}function ye(Me){return Math.max(0,Math.min(100,Me*100))}let Ae=v(()=>ye(X())),Fe=v(()=>ye(re()));var Dt=cx(),pt=de(Dt);{var Bt=Me=>{var $t=lx();let At;wi($t,21,()=>n(ie),ct=>ct.from,(ct,ce)=>{var ze=Le(),Ge=de(ze);{var at=Ft=>{dm(Ft,{get videoEpisode(){return n(ce)},get disabled(){return $()}})};R(Ge,Ft=>{n(ce).interactive&&Ft(at)})}b(ct,ze)}),w($t),D(ct=>At=se($t,1,"interactive-icons s-h",null,At,ct),[()=>({mobile:s(),hidden:s()&&!n(We)})]),b(Me,$t)};R(pt,Me=>{f()&&Me(Bt)})}var st=L(pt,2);let St;st.__pointerdown=[ox,i,A,$,We,Pe,_],st.__pointermove=[nx,$,Pe,Ue,N,A,We,S],st.__pointerup=[rx,$,We,Pe,C],st.__click=[sx,$,le,Pe],st.__contextmenu=[ax,Pe,$,le,We,J];var ti=T(st);{var Rt=Me=>{cm(Me,{get videoEpisodes(){return n(ie)},get disabled(){return $()},get isMobile(){return s()}})},$e=Me=>{var $t=dx(),At=T($t),ct=L(At,2);let ce;w($t),D(ze=>{Ve(At,"data-value",n(Ae)),Qe(At,`transform: translateX(${n(Ae)}%);`),ce=se(ct,1,"filled s-h",null,ce,ze),Ve(ct,"data-value",n(Fe)),Qe(ct,`transform: translateX(${n(Fe)}%);`)},[()=>({"active-live":d()})]),b(Me,$t)};R(ti,Me=>{n(ie).length?Me(Rt):Me($e,!1)})}var be=L(ti,2);let ee;var ot=T(be);let fe;w(be),w(st),je(st,Me=>i(Me),()=>i()),D((Me,$t,At,ct)=>{var ce,ze;St=se(st,1,`slider ${(ce=o())!=null?ce:""}`,"s-h",St,Me),Ve(st,"aria-label",we()),Ve(st,"aria-valuemin",ue()),Ve(st,"aria-valuemax",ne()),Ve(st,"aria-valuenow",_e()),Ve(st,"aria-valuetext",xe()),Ve(st,"data-testid",(ze=r())!=null?ze:null),ee=se(be,1,"handleWrap s-h",null,ee,$t),Qe(be,At),fe=se(ot,1,"handle s-h",null,fe,ct)},[()=>({disabled:$(),"slider-dragging":n(We),hidden:a(),"handle-always-visible":Ne(),"slider-vertical":l(),"no-handle":y(),square:u()}),()=>({hidden:y()}),()=>`transform: translateX(${ye(Z())}%);`,()=>({"active-live":d()})]),gt("pointerenter",st,De),gt("pointerleave",st,Be),gt("mouseenter",st,it),gt("mouseleave",st,U),gt("wheel",st,ke),b(t,Dt),F()}tt(["pointerdown","pointermove","pointerup","click","contextmenu"]);var oo=(t,e)=>kd[t]>=kd[e];var Ls=(t,e)=>kd[t]<=kd[e],K_=t=>t>699?"xl":t>599?"l":t>509?"m":t>320?"s":"xs";var fx=M("<div><!></div>"),mx=M("<div><!> <!></div>"),vx={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 um(t,e){var Ue,Ze;B(e,!0),q(t,vx);let[i,o]=Re(),r=()=>x(N,"$isAudioAvailable$",i),a=()=>x(f,"$muted$",i),l=()=>x(p,"$volume$",i),d=()=>x(S,"$currentGridType$",i),s=()=>x(De,"$controlsVisible",i),u=ve(),m=Vt(),p=u.state.volume$,f=u.state.muted$,{setVolume:$,startVolumeChanging:y,stopVolumeChanging:_}=u.actions.internal,S=u.ui.currentGridType$,C=(Ue=u.callbacks)==null?void 0:Ue.onAudioDoesNotExistHint,I=(Ze=u.callbacks)==null?void 0:Ze.onAudioDisabledHint,N=u.state.isAudioAvailable$,P=u.state.isAudioDisabled,E=u.ui.t,k=K(!1),Q,H=v(()=>e.isAds||r()),z=v(()=>!n(H)||a()||l()===0),Y=v(()=>Ls(d(),"l")),le=v(()=>n(Y)?"":n(z)?!r()||P?E("tooltip_sound_unavailable"):E("tooltip_volume"):E("tooltip_volume_muted")),X=v(()=>n(z)?E("tooltip_volume"):E("tooltip_volume_muted")),re=v(()=>n(z)?0:l()),Z=!1,we=v(()=>e.isAds?!1:P?!I:r()?!1:!C);function ue(ye){y(),$(ye)}function ne(){Du(u,l(),m.controls.volumeStepWheel)}function _e(){Bu(u,l(),m.controls.volumeStepWheel)}function xe(ye){$(ye)}function J(ye){$(ye),_()}function Ne(){Z=!0}function pe(){Z=!1,Te()}function A(){clearTimeout(Q),O(k,!0)}function We(){Te()}function Te(){Q=window.setTimeout(()=>{Z||O(k,!1)},m.controls.volumeBarTimeout)}function j(ye){ye.preventDefault(),ye.deltaY<0?ne():ye.deltaY>0&&_e()}let ie=K(!1),De=u.ui.controlsVisible;Oe(()=>{s()||O(ie,!1)});var Be=mx();let it;var U=T(Be);Fa(U,{get content(){return n(le)},translateY:-18,get active(){return n(ie)},set active(ye){O(ie,ye,!0)},children:(ye,Ae)=>{let Fe=v(()=>n(Y)?"btn-volume-vertical":"btn-volume-horizontal");Kt(ye,{className:"btn-full-opacity",get disabled(){return n(we)},get testId(){return n(Fe)},get ariaLabel(){return n(X)},get click(){return e.click},get ariaKeyShortCut(){return fs.KeyM},role:"button",children:(Dt,pt)=>{aa(Dt,{get size(){return"24"},get volume(){return l()},get muted(){return n(z)}})},$$slots:{default:!0}})},$$slots:{default:!0}});var ke=L(U,2);{var Pe=ye=>{var Ae=fx();let Fe;var Dt=T(Ae);let pt=v(()=>n(Y)?"volumeBar-slider-vertical":""),Bt=v(()=>n(Y)&&!n(k)),st=v(()=>n(Y)?Ne:Uu),St=v(()=>n(Y)?pe:Uu),ti=v(()=>Math.round(n(re)*100)),Rt=v(()=>`${Math.round(n(re)*100)}%`),$e=v(()=>n(Y)?"volume-slider-vertical":"volume-slider");Ha(Dt,{get className(){return n(pt)},get isHidden(){return n(Bt)},get isVertical(){return n(Y)},withWheelHandler:!0,onWheelUp:ne,onWheelDown:_e,onPointerDown:ue,onHandleMove:xe,onPointerUp:J,get onPointerEnter(){return n(st)},get onPointerLeave(){return n(St)},ariaLabel:"Ползунок громкости",ariaValueMin:0,ariaValueMax:100,get ariaValueNow(){return n(ti)},get ariaValueText(){return n(Rt)},get filledProgress(){return n(re)},get handleProgress(){return n(re)},get testId(){return n($e)}}),w(Ae),D(be=>Fe=se(Ae,1,"volumeBar s-28",null,Fe,be),[()=>({"volumeBar-vertical":n(Y)})]),b(ye,Ae)};R(ke,ye=>{n(H)&&ye(Pe)})}w(Be),D(ye=>it=se(Be,1,"volumeBar-container s-28",null,it,ye),[()=>({vertical:n(Y)})]),gt("mouseenter",Be,function(...ye){var Ae;(Ae=n(Y)?A:Uu)==null||Ae.apply(this,ye)}),gt("mouseleave",Be,function(...ye){var Ae;(Ae=n(Y)?We:Uu)==null||Ae.apply(this,ye)}),gt("wheel",Be,j),b(t,Be),F(),o()}import{noop as _x}from"@vkontakte/videoplayer-shared/es2015";var gx=Ce('<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>'),hx=Ce('<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=g(e,"isFullscreen",8,!1),o=wn(()=>i()?"close-fullscreen-icon":"open-fullscreen-icon");Xe(t,{get testId(){return n(o)},children:(r,a)=>{var l=Le(),d=de(l);{var s=m=>{var p=gx();b(m,p)},u=m=>{var p=hx();b(m,p)};R(d,m=>{i()?m(s):m(u,!1)})}b(r,l)},$$slots:{default:!0}})}function jd(t,e){B(e,!0);let i=g(e,"isFullscreen",3,!1),o=g(e,"click",3,_x),r=ve(),a=r.ui.isFullscreenOpenedByKeyboard,l=r.ui.t,d=v(()=>i()?l("tooltip_fullscreen_on"):l("tooltip_fullscreen_off"));Kt(t,{testId:"fullscreen-btn",get ariaLabel(){return n(d)},click:u=>{let m=na(u);a.set(m),o()()},get ariaKeyShortCut(){return fs.KeyF},role:"button",children:(u,m)=>{pm(u,{get isFullscreen(){return i()}})},$$slots:{default:!0}}),F()}var bx=Ce('<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=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=bx();io(o,()=>Ie({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=T(o);ri(r,()=>{var a;return(a=e.children)!=null?a:vt}),vi(),w(o),b(t,o)}var $x=Ce('<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=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=$x();io(o,()=>Ie({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=T(o);ri(r,()=>{var a;return(a=e.children)!=null?a:vt}),vi(6),w(o),b(t,o)}var yx={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),q(t,yx);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=v(()=>!o()&&!i()?91:i()?l:95),s=v(()=>!o()&&!i()?"vk-video-logo-icon--en":i()?a:"vk-video-logo-icon"),u=v(()=>`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()}}),F()}function Xd(t,e){B(e,!0);let[i,o]=Re(),r=()=>x($,"$isMobile",i),a=()=>x(f,"$currentGridType$",i),l=()=>x(_,"$isCyrillicRelatedInterface$",i),d=g(e,"ref",15,void 0),s=g(e,"logoClickable",3,!1),u=g(e,"targetUrl",3,""),m=Vt(),p=ve(),f=p.ui.currentGridType$,$=p.ui.isMobile,y=p.ui.t,_=p.isCyrillicRelatedInterface$,S=v(()=>m.logoType!=="vk"),C=v(()=>n(S)?y("tooltip_vk_video_logo"):y("tooltip_vk_logo")),I=v(()=>(r()&&Ls(a(),"m")||Ls(a(),"l"))&&n(S)),N=()=>{var k,Q;e.click(),(k=p.callbacks)!=null&&k.onLogoClicked?(Q=p.callbacks)==null||Q.onLogoClicked():u()&&window.open(u(),"_blank")},P=v(()=>!s()),E=v(()=>n(S)?"btn-vk-video-logo":"btn-vk-logo");Kt(t,{className:"btn-full-opacity",get disabled(){return n(P)},click:N,get testId(){return n(E)},get ariaLabel(){return n(C)},get ref(){return d()},set ref(k){d(k)},children:(k,Q)=>{var H=Le(),z=de(H);{var Y=X=>{vm(X,{get logo(){return m.logoType},get short(){return n(I)},get isCyrillic(){return l()}})},le=X=>{fm(X,{})};R(z,X=>{n(S)?X(Y):X(le,!1)})}b(k,H)},$$slots:{default:!0}}),F(),o()}import{ChromecastState as Tx}from"@vkontakte/videoplayer-core/es2015";import{ChromecastState as Q_}from"@vkontakte/videoplayer-core/es2015";var xx=Ce('<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-1b"></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-1b"></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-1b"></path>',1),wx=Ce('<path d="M1 18v3h3c0-1.66-1.34-3-3-3z"></path><path d="M1 14v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7z"></path><path d="M1 10v2a9 9 0 0 1 9 9h2c0-6.08-4.93-11-11-11z"></path><path d="M21 3H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" class="s-1b"></path><path d="M5.667 7.44H18.5v9.167h-5.161a11.947 11.947 0 0 0-7.673-7.672V7.44Z"></path>',1),Sx={hash:"s-1b",code:".animated.s-1b{animation-duration:1s;animation-iteration-count:infinite}.wave1.animated.s-1b{animation-name:s-1b-wave1}.wave2.animated.s-1b{animation-name:s-1b-wave2}.wave3.animated.s-1b{animation-name:s-1b-wave3}@keyframes s-1b-wave1{0%{opacity:.3}33%{opacity:1}66%{opacity:1}to{opacity:1}}@keyframes s-1b-wave2{0%{opacity:.3}33%{opacity:.3}66%{opacity:1}to{opacity:1}}@keyframes s-1b-wave3{0%{opacity:.3}33%{opacity:.3}66%{opacity:.3}to{opacity:1}}"};function Zd(t,e){B(e,!0),q(t,Sx);let i=g(e,"isMobile",3,!1),o=v(()=>e.iconState===Q_.CONNECTED),r=v(()=>e.iconState===Q_.CONNECTING),a=v(()=>n(o)?"#2688EB":ea),l=v(()=>e.size?fn(e.size):void 0);var d=Le(),s=de(d);{var u=p=>{Xe(p,{get fill(){return n(a)},get style(){return n(l)},testId:"chromecast-mobile-icon",children:(f,$)=>{var y=xx();vi(2),b(f,y)},$$slots:{default:!0}})},m=p=>{Xe(p,{get style(){return n(l)},testId:"chromecast-icon",children:(f,$)=>{var y=wx(),_=de(y);let S;var C=L(_);let I;var N=L(C);let P;var E=L(N,2);let k;D((Q,H,z,Y)=>{S=se(_,0,"wave1 s-1b",null,S,Q),I=se(C,0,"wave2 s-1b",null,I,H),P=se(N,0,"wave3 s-1b",null,P,z),k=se(E,0,"s-1b",null,k,Y)},[()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({hidden:!n(o)})]),b(f,y)},$$slots:{default:!0}})};R(s,p=>{i()?p(u):p(m,!1)})}b(t,d),F()}import{noop as Cx}from"@vkontakte/videoplayer-shared/es2015";function Jd(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"isMobile",3,!1),r=g(e,"click",3,Cx),l=ve().ui.t,d=v(()=>e.state===Tx.CONNECTED?l("tooltip_chromecast_on"):l("tooltip_chromecast_off"));Kt(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)=>{Zd(s,{get isMobile(){return o()},get iconState(){return e.state}})},$$slots:{default:!0}}),F()}import{noop as Ex}from"@vkontakte/videoplayer-shared/es2015";var Ix=Ce('<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=Ix();vi(2),b(e,o)},$$slots:{default:!0}})}var zu=(t,e,i)=>i.filter(o=>o.time<=t*e).pop();var Px=M('<span class="text mobile s-23"> </span> <div class="chevron-episodes s-23" data-testid="btn-episodes_icon"><!></div>',1),Ax=M('<span class="text s-23"> </span>'),kx=M('<span class="text count s-23"> </span>'),Lx=M('<span class="icon s-23"><!></span> <!>',1),Mx={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 ec(t,e){var Z,we,ue;B(e,!0),q(t,Mx);let[i,o]=Re(),r=()=>x(y,"$currentGridType$",i),a=()=>x(_,"$openedByKeyboard$",i),l=()=>x(S,"$panelOpened$",i),d=()=>x(C,"$isMobile",i),s=g(e,"position",3,0),u=g(e,"duration",3,0),m=g(e,"timeCodes",19,()=>[]),p=ve(),f=(we=(Z=p.callbacks)==null?void 0:Z.onEpisodeChanged)!=null?we:Ex,$=!!((ue=p.callbacks)!=null&&ue.onEpisodeClicked),y=p.ui.currentGridType$,_=p.ui.episodes.openedByKeyboard$,S=p.ui.episodes.panelOpened$,C=p.ui.isMobile,I=p.ui.t,N=K(void 0),P=ne=>{var xe,J,Ne;if(!!((xe=p.callbacks)!=null&&xe.onEpisodeClicked)){let pe=na(ne);_.set(pe),S.set(!0),(Ne=(J=p.callbacks)==null?void 0:J.onEpisodeClicked)==null||Ne.call(J,pe)}},E=K(null),k=v(()=>s()/u());Oe(()=>{var _e;let ne=zu(n(k),u(),m());ne?((_e=n(E))==null?void 0:_e.time)!==ne.time&&(f(ne),O(E,ne,!0)):O(E,null)});let Q=v(()=>{var ne;return((ne=n(E))==null?void 0:ne.text)||""}),H=v(()=>oo(r(),"xl")?"FULL":oo(r(),"m")?"COUNT":"SHORT"),z=v(()=>`${I("tooltip_episodes")}: ${n(Q)}`),Y=(ne,_e,xe)=>mt(null,null,function*(){yield _o(),(ne==null?void 0:ne.getAttribute("aria-expanded"))==="false"&&_e&&!xe&&It(()=>{_.set(!1),ne.focus()})});Oe(()=>{Y(n(N),a(),l())});var le=Le(),X=de(le);{var re=ne=>{let _e=v(()=>d()?"px-0":""),xe=v(()=>!$);Kt(ne,{get className(){var J;return`w-max btn-full-opacity btn-jc-l ${(J=n(_e))!=null?J:""}`},testId:"btn-episodes",click:P,get disabled(){return n(xe)},get ariaExpanded(){return l()},get ariaLabel(){return n(z)},get ref(){return n(N)},set ref(J){O(N,J,!0)},children:(J,Ne)=>{var pe=Le(),A=de(pe);{var We=j=>{var ie=Px(),De=de(ie),Be=T(De,!0);w(De);var it=L(De,2),U=T(it);Mr(U,{direction:"right"}),w(it),D(()=>me(Be,n(Q))),b(j,ie)},Te=j=>{var ie=Lx(),De=de(ie),Be=T(De);gm(Be,{}),w(De);var it=L(De,2);{var U=Pe=>{var Ue=Ax(),Ze=T(Ue,!0);w(Ue),D(()=>me(Ze,n(Q))),b(Pe,Ue)},ke=(Pe,Ue)=>{{var Ze=ye=>{var Ae=kx(),Fe=T(Ae,!0);w(Ae),D(()=>me(Fe,m().length)),b(ye,Ae)};R(Pe,ye=>{n(H)==="COUNT"&&ye(Ze)},Ue)}};R(it,Pe=>{n(H)==="FULL"?Pe(U):Pe(ke,!1)})}b(j,ie)};R(A,j=>{d()?j(We):j(Te,!1)})}b(J,pe)},$$slots:{default:!0}})};R(X,ne=>{n(E)&&ne(re)})}b(t,le),F(),o()}import{debounceFn as cb}from"@vkontakte/videoplayer-shared/es2015";import{ChromecastState as Ux,PlaybackState as Wl,Player as zx,PredefinedQualityLimits as hs,VideoFormat as ic,clientChecker as J_}from"@vkontakte/videoplayer-core/es2015";import{assertNonNullable as $r,getHighestQuality as Wx,InterfaceLanguage as Kx,isInvariantQuality as qx,isNonNullable as Qx,loadVKLangPack as Gx,Logger as Yx,map as eb,merge as jx,Observable as ju,Subject as oc,Subscription as xm,TracerFactory as Xx,ValueSubject as Zx,VideoQuality as Jx,devNull as ew,now as tw,filter as iw,once as ow}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as Vs}from"@vkontakte/videoplayer-statistics/es2015";import{detectEmbed as Vx,devNull as ai,isNonNullable as Rx,now as li}from"@vkontakte/videoplayer-shared/es2015";import{addScript as Nx,Subject as mn,clearVideoElement as Ox}from"@vkontakte/videoplayer-shared/es2015";var Dx="//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=>(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[li()]}),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?(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[li()]}),i(),this.events.loadEnded$.next()):(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[li()]}),o())};Nx(Dx,e,this.loadTimeout).then(()=>{ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[li()]}),window.AdmanHTML?(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[li()]}),i(),this.events.loadEnded$.next()):(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[li()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout))}).catch(l=>{ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(l)],numbers:[li()]}),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?(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[li()]}),i(),this.events.loadEnded$.next()):(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[li()]}),o())},l=()=>{d=!0,o()},d=!1,s=window.setTimeout(()=>{ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[li()]}),l()},this.loadTimeout);e.addEventListener("abort",l),e.aborted&&(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[li()]}),l()),window.AdmanHTML=window.AdmanHTML||null,import("@adtech/rbadman/out/rbadman-html5.min.js").then(()=>{ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(d)],numbers:[li()]}),!d&&(window.AdmanHTML?(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[li()]}),i(),this.events.loadEnded$.next()):(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[li()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout)))},l).finally(()=>{clearTimeout(r),clearTimeout(s),e.removeEventListener("abort",l)})});this.onAdsReady=()=>{ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[li()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(e,i)=>{var o;ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+i.muted],numbers:[li(),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?ge(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;ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),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;ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),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(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[li()]}),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;ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{var e;ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{var e;ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),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;ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),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")=>{ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",e],numbers:[li()]}),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"),ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[li()]}),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")}initAdman(e){return mt(this,null,function*(){var N,P;if(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[li(),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 f,$=this.playerState&&ge(this.playerState.vsid);$&&(this.isVsidOriginal?f=$:f=parseInt($,36));let{isEmbed:y,immediateOrigin:_}=Vx(),S=(N=y?_:window.location.href)!=null?N:window.location.href,C=Ie(Gt(Ie(Gt(Ie({},s),{dl:encodeURIComponent(S),autoplay:r?1:0,player_width:i,player_height:o}),f?{request_id:f}:{}),{duration:m}),u);C=Object.fromEntries(Object.entries(C).filter(([E,k])=>Rx(k)));let I={slot:d,wrapper:a,videoEl:l,videoQuality:o,params:C,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),(P=this.externalApi)!=null&&P.videoGetAds){let k=yield this.safeExternalCall(this.externalApi.videoGetAds,C);k&&(delete I.slot,delete I.params,Object.assign(I,{json:k}))}E.init(I),this.adman=E,this.videoElement=l,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(I)}`})}catch(E){ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(E)],numbers:[li()]}),this.onAdError("could not init adman")}})}switchToVideo(e=!1){var o,r,a;if(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",(o=this.currentAdSection)!=null?o:"","force: "+e],numbers:[li()]}),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(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),this.adsState){this.log({message:"toggle play"});let i=ge(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(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[li()]}),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(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),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(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),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(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),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(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),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,f;ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[li()]}),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),(f=this.adman)==null||f.destroy(),this.videoElement&&Ox(this.videoElement),this.isDestroyed=!0}safeExternalCall(e,...i){return mt(this,null,function*(){var o;try{return yield e(...i)}catch(r){return this.onAdError((o=r==null?void 0:r.message)!=null?o:"External call failed"),null}})}};var G_=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 Ku,{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}},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}},_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 f=l.indexOf(p,d);return m===-1||m>f?f:m},-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}},Y_=hm;import{isNonNullable as bm}from"@vkontakte/videoplayer-shared/es2015";var Ua,Li,$m=0,ym=!1,j_="",X_=(t,e=0,i=0)=>t<e&&t<i,qu=(t,e=0,i=0)=>t>=e&&t<=i,Bx=(t,e=0,i=0)=>t>e&&t>i,Z_=(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})=>qu(t,u,m));let a=t>=$m,l=t<$m;if($m=t,l&&(ym=!1),bm(Ua)&&qu(t,Ua.startTime,Ua.endTime)&&j_===e.value)return Ua;if(!bm(Li)&&(r!=null&&r.length)&&!ym){Li=r.find(({startTime:u,endTime:m})=>qu(t,u,m)||a&&X_(t,u,m)),Ua=void 0,!bm(Li)&&r[r.length-1].endTime<t&&(ym=!0);return}else{if(qu(t,Li==null?void 0:Li.startTime,Li==null?void 0:Li.endTime))return Ua=Li,Li=void 0,j_=e.value,Ua;(a&&Bx(t,Li==null?void 0:Li.startTime,Li==null?void 0:Li.endTime)||l&&X_(t,Li==null?void 0:Li.startTime,Li==null?void 0:Li.endTime))&&(Li=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"},Fx={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"},tc=t=>{var e,i;return(i=(e=Qu[t])!=null?e:Qu[Fx[t]])!=null?i:void 0};import{Subscription as Hx}from"@vkontakte/videoplayer-shared/es2015";import"@vkontakte/videoplayer-statistics/es2015";var Gu=class{constructor(e,i,o,r=new Hx){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,Ms=(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))}},Ul=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 kn="off";var zl=t=>!!(Math.round(Math.abs(t)/90)%2);var tb=({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:f,coreConfig:$,player:y,disabledControls:_,isInteractive:S,interactiveRanges$:C,isInteractiveTime$:I,replayInteractive:N,stopPlayer:P,hasInteractiveBranches:E,playPrevChapterDisabledTooltip:k,additionalButtons:Q,additionalSettingsMenuItems:H,additionalContextMenuItems:z,playPrevVideo:Y,playNextVideo:le,onVideoChanged:X,looped:re=!1,statistics:Z,saveRate:we,internalsExposure:ue,playerView:ne,playerId:_e})=>{var Wv,Kv,qv;let xe=Gt(Ie({},$),{configName:[...(Wv=$.configName)!=null?Wv:[],"ui"],isAudioDisabled:l,live:Gt(Ie({},(Kv=$.live)!=null?Kv:{}),{isLiveCatchUpMode:!!r})}),J=f,Ne=Xx.createRootTracer(J.features.tracer),pe=Ne.createComponentTracer("Store"),A=y||new zx(xe,Ne,{playerId:_e});ue==null||ue.expose({corePlayer:A});let We=new Yx,Te=new Wu(We,{loadTimeout:J.ads.loadTimeout,initTimeout:J.ads.initTimeout,runtimeTimeout:J.ads.runtimeTimeout,useAdmanFromNPM:J.ads.useAdmanFromNPM,volumeMultiplier:J.ads.volumeMultiplier,isVsidOriginal:J.ads.isVsidOriginal}),j=Ma.getInstance(),ie=u==null?void 0:u.pictureInPictureApi,De=u==null?void 0:u.annotationsApi,Be=u==null?void 0:u.slotsApi,it=u==null?void 0:u.focusManager,U=We.createComponentLog("Store"),ke,Pe,Ue={},Ze=new _u,ye=new xm,Ae="",Fe=ae(!1),Dt=Z&&Z.oneStat?si(Z.oneStat.vsid$):Lr(void 0),pt=ae(ta()),Bt=ae(!1),st=()=>w_(document,J_.device.isIOS),St=(qv=ie==null?void 0:ie.info.isActive$)!=null?qv:new Zx(!1),ti=ae(0),Rt=ae(!1),$e=ae(!1),be=ae([]),ee=jx(A.events.fatalError$,A.events.managedError$).subscribe(c=>be.update(h=>[...h,c])),ot=Lr(!1,c=>{let h=A.events.fatalError$.subscribe(()=>c(!0));return()=>h.unsubscribe()}),fe=c=>mt(null,null,function*(){var oe;let h=Object.values(Kx).includes(c);if(J.downloadVKLanguages&&(h&&J.updateBuiltinLanguages||!Vf(c))){let Se;try{Se=yield Gx(c,Mh,Vh)}catch(et){(oe=Z==null?void 0:Z.oneStat)==null||oe.logError({errorType:"VKLangPack",fatal:!1}),j==null||j.report(et,{errorType:"VKLangPack",fatal:!1})}Se&&(Mf({language:c,pack:Se,fallback:J.defaultLanguage}),Me.set(c),$t.update(et=>et+1))}Vf(c)&&Me.set(c)}),Me=ae(t),$t=ae(0),At=ae(e);fe(t);let ct=(c,h)=>{let V=ge(Me);return Rf(V,c,h,J.defaultLanguage)},ce=ae("thumb");ce.subscribe(c=>{c==="ads"&&A.info.playbackState$.getValue()&&at()});let ze=(()=>{let c=gi([ot,ce],([h,V])=>h?"crashed":V);return Gt(Ie({},c),{is:h=>ge(c)===h})})(),Ge=ae(),at=()=>{Ge.set({muted:A.info.muted$.getValue()})},Ft=(()=>{let c=ae(new Set(_));return Gt(Ie({},c),{add:h=>{c.update(V=>new Set([...V].concat(h)))},remove:h=>{c.update(V=>{let oe=[...V];return new Set(Array.isArray(h)?oe.filter(Se=>!h.includes(Se)):oe.filter(Se=>Se!==h))})},includes:h=>{let V=ge(c);return Array.isArray(h)?h.every(oe=>V.has(oe)):V.has(h)}})})(),Ht=ae({width:0,height:0}),oi=null,yi=A.info.isBuffering$,ji=Lr(yi.getValue(),c=>{let h=yi.subscribe(V=>{V&&oi===null?oi=window.setTimeout(()=>{c(yi.getValue()),oi=null},J.loaderDelay):c(V)});return()=>{h.unsubscribe(),oi&&clearTimeout(oi)}});pe.log("create store"),U({message:"create store"});let Nt=c=>{let h=c.container,V=()=>{Jt=new MutationObserver(Se=>{let{removedNodes:et}=Se[0];et.length&&h.append(A.experimental.element$.getValue())}),Jt.observe(h,{childList:!0})},oe=A.experimental.element$.getValue();if(oe)h.append(oe),V();else{let Se=A.experimental.element$.pipe(iw(et=>!!et),ow()).subscribe(et=>{h.append(et),V()});ye.add(Se)}},fi=c=>{U({message:`init video, config: ${JSON.stringify(c)}`}),S?Nt(c):(ew.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[tw()]}),A.initVideo(c)),pe.log("init video",{isInteractive:S}),c.subtitles&&A.setExternalTextTracks(c.subtitles),ke=c,Ae=c.subtitlesForcedLanguage||""},hi=new oc,ht=c=>hi.next(c),Xt=new oc,Si=new oc,Xi=new oc,Jt=null,Et={actionRewind$:Xt,actionSeek$:Si,inPiP$:St,inFullscreen$:new ju(c=>pt.subscribe(h=>c.next(h))),actionSetSubtitle$:Xi,nextMovie$:hi},Ke=new oc,Ti={actionSeek$:Si,actionSubtitlesSwitched$:Ke,playerSize$:new ju(c=>Ht.subscribe(h=>c.next(h))),inPiP$:St,inFullscreen$:new ju(c=>pt.subscribe(h=>c.next(h))),isLoaderVisible$:new ju(c=>ji.subscribe(h=>c.next(h)))};if(Z){let{oneStat:c,thinOneStat:h,mediascopePixel:V,statSubscription:oe}=Z;c&&(S||oe.add(c.attachTo(A)),oe.add(c.attachToUi(Et)),oe.add(c.attachToAds(Te.events)),c.authorize(a).catch(Se=>{U({message:`onestat auth error ${String(Se)}`})}),V&&V.attachTo(A)),h&&(oe.add(h.attachTo(A,Te.events)),oe.add(h.attachToUi(Ti)),oe.add(h.attachToAds(Te.events)),h.updateContext({isMobile:ge(Fe)}),h.authorize(a))}if(j){let c=new xm,h=(V,oe)=>c.add(V.subscribe(oe));if(h(A.events.managedError$,V=>{j.logIError(V)}),h(A.events.fatalError$,V=>{j.logIError(V,!0)}),Z){let{oneStat:V}=Z;V&&h(V.experimental.error$,oe=>{j.logIError(oe)})}j.sentrySubscription.add(c)}let bo=()=>{if(J_.device.isIOS&&Pe)try{S_(Pe)}catch(c){U({message:`exitIosSafariFullscreen failed: ${c}`})}};ye.add(A.experimental.element$.subscribe(c=>{c&&(Pe=c,c.classList.add("player-media"),Ra(ie)&&ie.updateVideoElement(),S&&c.setAttribute("pip","false"),ne==="preview"&&(c.setAttribute("disablePictureInPicture","true"),c.setAttribute("x-yandex-pip","false")))})).add(A.events.ended$.subscribe(()=>{var c;bo(),(c=s==null?void 0:s.onEnded)==null||c.call(s)})).add(A.events.looped$.subscribe(()=>{var c;(c=s==null?void 0:s.onLooped)==null||c.call(s)})).add(A.events.started$.subscribe(()=>mt(null,null,function*(){var h,V;Ra(ie)&&(yield ie==null?void 0:ie.revealPictureInPicture());let c=A.info.muted$.getValue();(h=s==null?void 0:s.onStarted)==null||h.call(s),(V=Ue.onStarted)==null||V.call(Ue,c)}))).add(A.events.willSeek$.subscribe(({from:c,to:h})=>{var V;(V=s==null?void 0:s.onSeek)==null||V.call(s,c,h)})).add(A.events.autoplaySoundProhibited$.subscribe(()=>{var c;(c=s==null?void 0:s.onAutoplaySoundProhibited)==null||c.call(s)})).add(A.info.position$.subscribe(c=>{var V;let h=A.info.duration$.getValue();isFinite(h)&&h>0&&((V=s==null?void 0:s.onTimeupdate)==null||V.call(s,h,c),Te.setPosition(c,h))})).add(A.events.fatalError$.subscribe(c=>{var h;(h=s==null?void 0:s.onCrashed)==null||h.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(A.events.fetcherRecoverableError$.subscribe(c=>{var h;(h=s==null?void 0:s.onRecoverableError)==null||h.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(A.events.loadedMetadata$.subscribe(()=>{Rt.set(!0)})).add(A.info.is3DVideo$.subscribe(c=>{$e.set(c)})).add(A.info.isEnded$.subscribe(c=>{S&&(c?(I!=null&&I.getValue()&&Ft.add(Ad),Ft.add("PLAY_BUTTON")):Ft.remove("PLAY_BUTTON"))})).add(A.info.liveTime$.subscribe(c=>{var h;(h=s==null?void 0:s.onLiveTime)==null||h.call(s,c)})).add(A.info.isStalled$.subscribe(c=>{var h;(h=s==null?void 0:s.onStalledChanged)==null||h.call(s,c)})).add(A.info.isLiveEnded$.subscribe(c=>{var h;return c&&((h=s==null?void 0:s.onLiveEnded)==null?void 0:h.call(s))})).add(Te.events.loadStarted$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadStarted)==null?void 0:h.call(c)})).add(Te.events.loadEnded$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadEnded)==null?void 0:h.call(c)})).add(Te.events.loadError$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadError)==null?void 0:h.call(c)})).add(Te.events.init$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onInit)==null?void 0:h.call(c)})).add(Te.events.ready$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onReady)==null?void 0:h.call(c)})).add(Te.events.started$.subscribe(c=>{var h,V;return(V=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onStarted)==null?void 0:V.call(h,c)})).add(Te.events.timeRemained$.subscribe(c=>{var h,V;return(V=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onTimeRemained)==null?void 0:V.call(h,c)})).add(Te.events.ended$.subscribe(c=>{var h,V;return(V=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onCompleted)==null?void 0:V.call(h,c)})).add(Te.events.empty$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onEmpty)==null?void 0:h.call(c)})).add(Te.events.clicked$.subscribe(c=>{var h,V;return(V=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onClicked)==null?void 0:V.call(h,c)})).add(Te.events.closed$.subscribe(c=>{var h,V;return(V=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onClosed)==null?void 0:V.call(h,c)})).add(Te.events.error$.subscribe(c=>{var h,V;return(V=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onError)==null?void 0:V.call(h,c)})).add(Te.events.paused$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onPaused)==null?void 0:h.call(c)})).add(Te.events.resumed$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onResumed)==null?void 0:h.call(c)}));let So=new xm,gn=()=>{var et,Pt,zt;let{debugLog:c}=J,h,V="#9df7b7",oe="#efd169";if(c&&c!==!0){let{colors:jt}=c;h=c.tag,V=(et=jt==null?void 0:jt[0])!=null?et:V,oe=(zt=(Pt=jt==null?void 0:jt[1])!=null?Pt:jt==null?void 0:jt[0])!=null?zt:oe}let Se=h?`: ${h}`:"";So.add(A.events.log$.subscribe(jt=>{console.debug(`%c sdk${Se} `,`background:${V};`,`sdk component: ${jt.component}`,jt.message)})).add(We.log$.subscribe(jt=>{console.debug(`%c ui${Se} `,`background:${oe};`,`ui component: ${jt.component}.`,jt.message)}))},Tt=()=>{So.unsubscribe()},Ut=(c,h)=>{pe.log("start camera manual rotation",{mx:c,my:h}),A.startCameraManualRotation(c,h)},W=(c=!1)=>{pe.log("stop camera manual rotation",{immediate:c}),A.stopCameraManualRotation(c)},kt=(c,h,V)=>{pe.log("move camera focus px",{xpx:c,ypx:h,dt:V}),A.moveCameraFocusPX(c,h,V)},di=()=>{A.holdCamera()},lt=()=>{A.releaseCamera()},wt=Lr(A.info.position$.getValue(),c=>{let h,V,oe=()=>{let Se=A.info.playbackState$.getValue(),et=A.info.isLive$.getValue(),Pt=A.info.duration$.getValue(),zt=A.info.position$.getValue();if(Se&&[Wl.PLAYING,Wl.PAUSED].includes(Se)){let jt=et?zt-Pt:A.getExactTime();jt!==V&&c(jt),V=jt}h=requestAnimationFrame(oe)};return oe(),()=>cancelAnimationFrame(h)}),Yt=si(A.info.playbackState$),nt=si(A.info.isBuffering$),Fi=gi([Yt,nt],([c,h])=>h?"buffering":c),Hi=si(A.info.currentBuffer$),Zo=si(A.info.isEnded$),To=si(A.info.isLive$),Ui=J.features.playbackRate?si(A.info.canChangePlaybackSpeed$):Lr(!1),Zi=si(A.info.liveBufferTime$),Rr=si(A.info.volume$),$o=si(A.info.muted$),ro=bu(A.info.predefinedQualityLimitType$.pipe(eb(c=>c===hs.TRAFFIC_SAVING)),A.info.predefinedQualityLimitType$.getValue()===hs.TRAFFIC_SAVING),Ai=bu(A.info.predefinedQualityLimitType$.pipe(eb(c=>c===hs.HIGH_QUALITY)),A.info.predefinedQualityLimitType$.getValue()===hs.HIGH_QUALITY),Jo=si(A.info.autoQualityLimitingAvailable$),en=si(A.info.availableQualities$),Ln=si(A.info.availableQualitiesFps$),er=si(A.info.chromecastState$),Nr=si(A.info.chromecastDeviceName$),es=si(A.info.currentFormat$),bs=si(A.info.throughputEstimation$),ts=si(A.info.videoBitrate$),tr=si(A.info.intrinsicVideoSize$),yr=si(A.info.duration$),hn=si(A.info.isAudioAvailable$),Mn=()=>{oi&&clearTimeout(oi),oi=null},Do=gi([yr,To],([c,h])=>h?-c:c),Vn=gi([Yt],([c])=>c===Wl.PLAYING),ir=si(A.info.atLiveEdge$),xr=si(A.info.atLiveDurationEdge$),wr=si(A.info.position$),Or=gi([wr,yr],([c,h])=>isFinite(c)&&isFinite(h)&&!!h),so=gi([er],([c])=>c===Ux.CONNECTED),Dr=si(A.info.availableVideoStreams$),Rn=J.features.audioLanguages?si(A.info.availableAudioStreams$):Lr([]),Nn=si(A.info.currentVideoStream$),ao=si(A.info.currentAudioStream$),Br=c=>{c.language&&Pf(c.language),A.setVideoStream(c)},On=(c,h)=>{A.setAudioStream(c),Po(h)&&(c.language&&Pf(c.language),J.features.userVideoPrefs&&i&&Lf(J.userSalt,String(i),{audioTrackId:c.id}))},ft=c=>{let h;if(c.length===1&&(h=c.at(0)),h!=null||(h=c.find(oe=>"isDefault"in oe&&oe.isDefault)),J.features.userVideoPrefs&&i){let oe=Su(J.userSalt,String(i));if(oe!=null&&oe.audioTrackId){let Se=c.find(et=>et.id===oe.audioTrackId);h=Se!=null?Se:h}}let V=s_();return V&&(h!=null||(h=c.find(({language:oe})=>V===oe))),h!=null||(h=c.at(0)),h},ui=c=>{pe.log("change audio stream",{id:c});let h=A.info.availableAudioStreams$.getValue().find(V=>V.id===c);h&&On(h,!0)},Sr=!1;ye.add(A.info.availableAudioStreams$.subscribe(c=>{if(!Sr&&c.length){let h=ft(c);h&&(A.setAudioStream(h),Sr=!0)}})),Rn.subscribe(c=>{var h;(h=s==null?void 0:s.onAvailableAudioStreamsChanged)==null||h.call(s,c.map(({label:V="",id:oe="",language:Se=""})=>({label:V,language:Se,id:oe})))}),ao.subscribe(c=>{var h;return c&&((h=s==null?void 0:s.onAudioStreamChanged)==null?void 0:h.call(s,c.id))});let or=!1;ye.add(A.info.availableVideoStreams$.subscribe(c=>{if(!or&&c.length){let h=ft(c);h&&(A.setVideoStream(h),or=!0)}}));let nr=ae(void 0),tn=si(A.info.isAutoQualityEnabled$,c=>c&&nr.set(void 0)),Tr=si(A.info.currentQuality$,()=>nr.set(void 0)),on=gi([nr,Tr],([c,h])=>c!=null?c:h),_n=gi(es,c=>c!==ic.MPEG),Dn=gi([en,Ln,tn,on,_n],([c,h,V,oe,Se])=>{let et=[];Se&&et.push({value:"auto",displayValue:ct("auto_quality_option"),selected:V});let Pt=c.filter(zt=>!qx(zt));for(let zt of Pt){let jt=h[zt];et.push({value:zt,displayValue:`${zt}${jt?G_(jt):""}`,selected:V?!1:zt===oe})}return et}),Bn=si(A.info.currentPlaybackRate$),Bo=gi([Bn,ir,xr],([c,h,V])=>{let oe=V||S?1:J.controls.playbackRateMin,Se=h?1:J.controls.playbackRateMax,et=J.controls.playbackRateStep,Pt=[];for(let zt=oe;zt<=Se;zt+=et)Pt.push({value:zt,displayValue:zt===1?ct("playback_rate_1"):ct("playback_rate",{multiplier:zt.toString(10)}),selected:c===zt});return Pt}),Co=()=>({displayValue:ct("subtitles_off"),value:kn,language:""}),rr=ae(Co()),Io=gi([rr,$t],([c],h)=>{c.value===kn?h(Co()):h(c)}),zi=J.features.subtitles?si(A.info.availableTextTracks$):Lr([]),Fn=Gh(),sr=gi([zi,Io],([c,h],V)=>{var et;let oe=[],Se=c.find(({id:Pt})=>Pt===h.value);if(Se!=null&&Se.url){let[,Pt]=(et=Fn.find(Se.url))!=null?et:[];if(Pt){V(Pt);return}Ze.download(Se.url).then(zt=>{if(!zt||Ze.isDestroyed())return;let jt=new Y_,Ws=Se.language;if(Ws){let n$=!!Se.isAuto,r$=jt.parse(zt,Ws);oe.push({lang:Ws,subtitles:r$,isAuto:n$,id:Se.id})}Fn.add(Se.url,oe),ge(Io).value===h.value&&V(oe)}).catch(zt=>{var jt;(jt=Z==null?void 0:Z.oneStat)==null||jt.logError({errorType:"Subtitles download",fatal:!1}),j==null||j.report(zt,{errorType:"Subtitles download",fatal:!1})})}V(oe)}),Fr=gi([Bn,Vn,Io],([c,h,V],oe)=>{let Pt;if(A.info.isLive$.getValue()&&h&&V.value!==kn){let jt=()=>{let Ws=1e3/(3*c);Pt=setTimeout(jt,Ws),oe(Date.now())};return jt(),()=>clearTimeout(Pt)}}),Hn=gi([zi,Io],([c,h])=>{if(!c.length)return[];let V=[];for(let{language:oe,isAuto:Se,id:et}of c){let Pt=oe&&tc(oe);oe&&Pt&&V.push({displayValue:Se?ct("subtitles_auto",{language:Pt}):Pt,value:et,selected:(h==null?void 0:h.value)===et,isAuto:Se,language:oe})}return V.length?(V.unshift(Gt(Ie({},Co()),{selected:(h==null?void 0:h.value)===kn})),V):[]}),Eo={available:[],prev:[]},Hr=()=>{var h,V;let c=A.experimental.getCurrentTime$.getValue();return(V=(h=c==null?void 0:c())!=null?h:Pe==null?void 0:Pe.currentTime)!=null?V:0},yt=gi([wt,Io,sr,Fr],([c,h,V,oe])=>{var et;let Se=A.info.isLive$.getValue();if(Se&&Eo.prev!==V){let Pt=V.find(({id:jt})=>jt===h.value),zt=Eo.prev.find(({id:jt})=>jt===h.value);if(Pt){let jt=Gt(Ie({},Pt),{subtitles:[...(et=zt==null?void 0:zt.subtitles)!=null?et:[],...Pt.subtitles]});Eo.available=[jt],Eo.prev=V}}if(h&&h.value!==kn){let Pt=Se?Hr():c,zt=Se?Eo.available:V;return Z_(Pt,h,zt,Se)}}),Ct=gi([yt],([c])=>c!=null&&c.texts?c.texts:[]);ye.add(Io.subscribe(c=>{var h,V;if(c.value===kn)(h=s==null?void 0:s.onSubtitleOff)==null||h.call(s);else{let oe=Object.entries(Qu).find(([Se,et])=>et===c.displayValue);(V=s==null?void 0:s.onSubtitleOn)==null||V.call(s,oe?oe[0]:"",c.value)}}));let lo=ae(!0),Ji=gi([Hi,Do,wr,Zi],([c,h,V,oe])=>{var zt;let Se=(zt=c==null?void 0:c.end)!=null?zt:0;if(!oe)return Se/h;let Pt=-V+oe-h;return(Se-Pt)/h}),Mi=si(A.info.availableSources$),bn=gi([Mi],([c])=>Object.keys((c==null?void 0:c[ic.MPEG])||{}).length>0),yo=()=>{var V,oe,Se;let c=Object.keys(((oe=(V=A.info.availableSources$)==null?void 0:V.getValue())==null?void 0:oe[ic.MPEG])||{}),h=Wx(c)||Jx.Q_144P;return(Se=ke.sources[ic.MPEG])==null?void 0:Se[h]},Un=()=>{var h;let c=yo();if(c)pe.log("download video",{url:c}),Kh(c,((h=ke==null?void 0:ke.meta)==null?void 0:h.title)||"video");else{let V="There is no URL for download video";pe.log("download video",{message:V}),U({message:V})}},mi=()=>{U({message:"toggle muted"});let c=A.info.muted$.getValue();A.info.volume$.getValue()===0&&!c?nn(zr(),!1):co(!c,!1)},Ur=()=>{var c;if(Qt.ui.settingsMenu.visible$.set(!1),!ge(Qt.ui.settingsSubMenu.visible$)){let h=ge(Qt.ui.settingsMenu.ref$);if((c=s==null?void 0:s.uiInfo)!=null&&c.onSettingsMenu&&h){let oe=Ul(h),Se={top:0,left:0,bottom:0,right:0};s.uiInfo.onSettingsMenu({visible:!1,size:oe,position:Se,name:"settings"})}}pe.log("close settings menu")},ar=(c,h=()=>Promise.resolve())=>mt(null,null,function*(){var Se;Qt.ui.settingsMenu.openedByBtnKeyboard$.set(!!c),Qt.ui.settingsMenu.visible$.set(!0),yield h();let V=ge(Qt.ui.settingsMenu.ref$),oe=dl();if((Se=s==null?void 0:s.uiInfo)!=null&&Se.onSettingsMenu&&V&&oe){let Pt=Ul(V),zt=Ms(V,oe);s.uiInfo.onSettingsMenu({visible:!0,size:Pt,position:zt,name:"settings"})}pe.log("open settings menu",{wasOpenedByKeyboard:c})}),is=(c,h=!1)=>{var et;Qt.ui.settingsSubMenu.visible$.set(!1);let V=ge(Qt.ui.settingsMenu.ref$),oe=dl(),Se=ge(Qt.ui.settingsMenu.visible$);if((et=s==null?void 0:s.uiInfo)!=null&&et.onSettingsMenu&&V&&oe)if(Se&&!h){let zt=Ul(V),jt=Ms(V,oe);s.uiInfo.onSettingsMenu({visible:!0,size:zt,position:jt,name:"settings"})}else{let zt=Ul(c),jt={top:0,left:0,bottom:0,right:0},Ws=ge(Qt.ui.settingsSubMenu.name$);s.uiInfo.onSettingsMenu({visible:!1,size:zt,position:jt,name:Ws})}pe.log("close settings sub menu")},os=(c,h)=>{var oe;Qt.ui.settingsSubMenu.visible$.set(!0),Qt.ui.settingsSubMenu.ref$.set(h),Qt.ui.settingsSubMenu.name$.set(c);let V=dl();if((oe=s==null?void 0:s.uiInfo)!=null&&oe.onSettingsMenu&&h&&V){let et=Ul(h),Pt=Ms(h,V);s.uiInfo.onSettingsMenu({visible:!0,name:c,size:et,position:Pt})}pe.log("open settings sub menu",{name:c})},zr=()=>{var h;let c=Math.max(J.volumeMinRestore,(h=$u())!=null?h:0);return c===0?J.volumeDefault:c},Po=c=>{let h=J.features.savePreferredStatesOnUserActionOnly;return!h||h&&!c},nn=(c,h)=>{let V=c===0?zr():c,oe=A.info.muted$.getValue();U({message:`set volume, volume: ${c}, preferredVolume: ${V}`});let Se=!l||ze.is("ads");oe&&c>0&&Se&&(oe=!1,Po(h)&&If(!1)),A.setVolume(c,oe),Te.setVolume(c),Po(h)&&wf(V)},co=(c,h)=>{let V=A.info.volume$.getValue();U({message:`set muted, currentVolume: ${V}, mute: ${c}`});let oe=ze.is("ads");if(A.setMuted(c,oe),Te.setVolume(c?0:V),Po(h)&&(!oe||!c)&&If(c),!c&&V===0){let Se=zr();A.setVolume(Se),Po(h)&&wf(Se),Te.setVolume(Se)}},Cr=ae(!1),Fo=c=>{var h,V;pe.log("set looped",{isLooped:c}),Cr.set(c),A.setLooped(c),(V=(h=s==null?void 0:s.uiInfo)==null?void 0:h.onLoopedChanged)==null||V.call(h,c)};Fo(re);let ns=()=>{var c,h;(h=(c=s==null?void 0:s.uiInfo)==null?void 0:c.onReportProblem)==null||h.call(c)},qe=(c,h=!1)=>{var V;U({message:`set autoplayNextEnabled, value: ${c}`}),pe.log("set autoplay next enabled",{autoplayNextEnabled:c}),Qt.ui.autoplayNextEnabled$.set(c),d_(c),h&&((V=s==null?void 0:s.onSetAutoplayNextEnabled)==null||V.call(s,c))},Lt=c=>{U({message:`set timerNextVideoRunning, value: ${c}`}),pe.log("set timer next video running",{timerNextVideoRunning:c}),Qt.ui.timerNextVideoRunning$.set(c)},bi=(c=!0)=>{var V;let h=!0;if(c&&(s!=null&&s.onPrevVideoClick))try{h=(V=s==null?void 0:s.onPrevVideoClick)==null?void 0:V.call(s)}catch(oe){U({message:"onPrevVideoClick callback failed to execute"})}X(!0),h&&Y()},Ao=(c=!0)=>{var V;let h=!0;if(c&&(s!=null&&s.onNextVideoClick))try{h=(V=s==null?void 0:s.onNextVideoClick)==null?void 0:V.call(s)}catch(oe){U({message:"onNextVideoClick callback failed to execute"})}X(!1),h&&le()},ko=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementShow)==null||c.call(s)},Ho=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementClick)==null||c.call(s)},uo=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementAuto)==null||c.call(s)},eo=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementCancel)==null||c.call(s)},$n=()=>{A.prepare()},yn=()=>{$r(Qt);let c=ge(Qt.ui.controls.disabledControls$),h=ge(Qt.playerPhase),V={playerPhase:h,isInteractive:S,isVideoEnded:!1,action:"none"};if(c.has("PLAY_BUTTON"))return;if(U({message:"toggle play"}),h==="ads"){V.action="play",pe.log("toggle adman play",V),Te.togglePlay();return}let oe=()=>{var et;U({message:"toggle play, call player.play"}),V.action="play",A.play(),(et=s==null?void 0:s.onPlay)==null||et.call(s)},Se=()=>{var et;U({message:"toggle play, call player.pause"}),V.action="pause",A.pause(),(et=s==null?void 0:s.onPause)==null||et.call(s)};if(A.info.isEnded$.getValue()){if(U({message:"toggle play, video ended, seek to 0"}),Xt.next(),Si.next(Vs.REWIND),S){N==null||N();return}A.seekTime(0),oe()}else A.info.playbackState$.getValue()!==Wl.PLAYING?oe():Se();pe.log("toggle play",V)},po=(c,{changeReason:h="default",appliesTo:V="to-video"}={},oe)=>{U({message:`set quality, quality: ${c}`}),pe.log("set quality",{quality:c}),A.setAutoQuality(c==="auto");let{qualityDetailsSubMenuEnabled:Se}=J.features;yu(),c!=="auto"?(Se?(xu({type:"exact_quality",quality:c,videoId:i},V),A.setPredefinedQualityLimits(hs.UNKNOWN)):Sf(i,c),nr.set(c),A.setQuality(c)):Se&&h==="default"&&(dr("auto_quality",V,oe),ge(ro)&&Lo(!1,void 0,oe),ge(Ai)&&zn(!1,void 0,oe))},Lo=(c,h="as-default",V)=>{U({message:`set trafficSavingEnabled, value: ${c}`}),pe.log("set traffic saving enabled",{trafficSavingEnabled:c});let oe=c?hs.TRAFFIC_SAVING:hs.UNKNOWN;J.features.qualityDetailsSubMenuEnabled?(lr(oe,h,V),Ld(!1)):(A.setPredefinedQualityLimits(oe),Po(V)&&Ld(c))},zn=(c,h="as-default",V)=>{U({message:`set highQualityEnabled, value: ${c}`}),pe.log("set high quality enabled",{highQualityEnabled:c}),lr(c?hs.HIGH_QUALITY:hs.UNKNOWN,h,V)},lr=(c,h,V)=>{c!==hs.UNKNOWN&&(ge(Jo)&&!ge(tn)&&po("auto",{appliesTo:h,changeReason:"limit-changed"},V),dr(c,h,V)),A.setPredefinedQualityLimits(c)},dr=(c,h,V)=>{Po(V)&&(xu({type:c,videoId:i},h),h==="as-default"&&xu({type:c,videoId:i},"to-video"))},Wn=(c,h=!0)=>{pe.log("set playback rate",{playbackRate:c}),A.setPlaybackRate(c),J.features.saveRate&&we&&!A.info.isLive$.getValue()&&h&&a_(c)},$s=()=>{let c=ge(Ui),h=ge(Bo),V=h.findIndex(({selected:Se})=>Se);if(V===h.length-1||!c)return h[V];let oe=h[V+1];return Wn(oe.value),oe},rs=()=>{let c=ge(Ui),h=ge(Bo),V=h.findIndex(({selected:Se})=>Se);if(V===0||!c)return h[V];let oe=h[V-1];return Wn(oe.value),oe},Ye=(c=Gt(Ie({},Co()),{selected:!1}),h)=>{pe.log("set subtitles",Ie({},c)),c.value!==kn&&Xi.next(c.isAuto?c.value+"_auto":c.value),Ke.next({enabled:c.value!==kn,lang:c.language,auto:!!c.isAuto}),rr.set(c),Po(h)&&(kf(c.value===kn?void 0:c.language),J.features.userVideoPrefs&&i&&Lf(J.userSalt,String(i),{subtitleTrackId:c.value===kn?void 0:c.value}))},qt=c=>{pe.log("toggle subtitles");let h=ge(Io);(h==null?void 0:h.value)===kn?Uo(c):rn(c)},Ii=(c,h)=>{pe.log("change subtitle",{enabled:c}),c?Uo(!0,h):rn(!0)},Uo=(c,h)=>{pe.log("subtitle on");let V=ge(Hn),oe=ge(Me),Se=Ae!=null?Ae:oe,et;h&&(et=V.find(Pt=>Pt.value===h)),et!=null||(et=V.filter(Pt=>Pt.value!==kn).find(Pt=>Pt.language===Se)),Ye(et!=null?et:V[1],c)},rn=c=>{pe.log("subtitle off"),Ye(void 0,c)};ye.add(A.info.availableTextTracks$.subscribe(c=>{var V;function h(){let oe=[];for(let{language:Se,isAuto:et,id:Pt}of c){let zt=Se&&tc(Se);Se&&zt&&oe.push({id:Pt,language:Se,title:et?ct("subtitles_auto",{language:zt}):zt})}return oe}(V=s==null?void 0:s.onAvailableSubtitlesChanged)==null||V.call(s,h())}));let cr=ae(!0),sn=c=>{cr.set(c)},zo=(c,h,V=!0)=>{var oe;if(U({message:`seek to time, time: ${c}`}),pe.log("seek to time",{time:c,action:h,forcePrecise:V}),Si.next(h),A.info.isLive$.getValue()){let Se=A.info.duration$.getValue(),et=Math.min(0,Se+c);A.seekTime(et,V)}else{if(I!=null&&I.getValue())return;A.info.isEnded$.getValue()&&(U({message:"seek after ended, call callbacks.onPlay"}),(oe=s==null?void 0:s.onPlay)==null||oe.call(s)),A.seekTime(Hv(c),V)}},Bs=c=>{U({message:`seek to episode start time: ${c}`}),pe.log("seek to episode start time",{time:c}),zo(c,Vs.EPISODE,!0)},an=(c,h,V=!1)=>{U({message:`seek to percent, percent: ${c}`}),pe.log("seek to percent",{percent:c,action:h});let oe=ge(Do)*c;zo(oe,h,V)},Fs=c=>{U({message:`seek external, time: ${c}`}),pe.log("seek external",{time:c}),Si.next(Vs.UNKNOWN),A.seekTime(A.info.isLive$.getValue()?-c:c)},da=c=>{var oe,Se;let h=(oe=c.max)!=null?oe:"none",V=(Se=c.min)!=null?Se:"none";U({message:`set auto quality limitation. Max: ${h}. Min: ${V}`}),pe.log("set auto quality limits",{max:h,min:V}),A.setAutoQualityLimits(c)},ca=c=>{U({message:`seek external to episode start time: ${c}`}),pe.log("seek external to episode start time",{time:c}),zo(c,Vs.EPISODE,!0)},dt=c=>{U({message:`set playback rate to: ${c}`}),pe.log("set playback rate external",{playbackRate:c}),A.setPlaybackRate(c)},ei=ae(!1),fo=ae(!1),he=gi([Do],([c])=>!!p&&c>=J.suitableDurationForUsingRichSeek&&J.features.useRichSeek&&!S),xt=((p==null?void 0:p.frameWidth)||0)>=((p==null?void 0:p.frameHeight)||0),ii=gi([ti],([c])=>{let h=zl(c);return xt?!h:h});ye.add(ze.subscribe(c=>{c!=="video"&&ei.set(!1)}));let xi=ae(void 0),Vi=ae(!1),pi=c=>{U({message:`start scrubbing, progress: ${c}`}),pe.log("start scrubbing",{progress:c}),Vi.set(!0),ni(c)},ni=c=>{xi.set(c)},mo,ln,dn=()=>{xi.set(void 0),Vi.set(!1)},ki=()=>{clearTimeout(ln),clearTimeout(mo),mo=window.setTimeout(()=>{dn()},500),Pe==null||Pe.removeEventListener("seeked",ki)},Zl=(c,h=!1)=>{U({message:`complete scrubbing, progress: ${c}`}),pe.log("complete scrubbing",{progress:c}),an(c,Vs.SLIDER,h),ge(Qt.ui.isMobile)&&ge(Qt.state.currentFormat$)===ic.HLS?(Pe==null||Pe.addEventListener("seeked",ki),ln=window.setTimeout(()=>{ki()},300)):dn()},el=gi([wt,Do,xi],([c,h,V],oe)=>{oe(Qx(V)?V*h:c)}),Hs=ae(!1),tl=()=>{Hs.set(!0)},il=()=>{Hs.set(!1)},Ir=gi([Ht],([{width:c}],h)=>{let V=K_(c);h(V)}),ua=Q.filter(c=>qh(c)),Us=gi([Ir,Fe],([c,h])=>h?ua.filter(V=>!V.hideOnMobile):ua.filter(V=>{var oe;return!((oe=V.hideOnDesktopGridTypes)!=null&&oe.includes(c))})),Wr=ae(Q.filter(c=>Qh(c))),ss=gi([Wr,Ir],([c,h])=>c.filter(V=>{var oe;return!((oe=V.hideOnDesktopGridTypes)!=null&&oe.includes(h))})),zs=gi([ss,Us],([c,h])=>[...J.features.additionalButtonsDesktopControlPanelRight?c.filter(V=>V.type==="desktop-control-panel-right"):[],...J.features.additionalButtons?h.map((V,oe)=>{var Se;return{id:oe,weight:oe,type:"desktop-control-panel-right",testId:V.testId,icon:V.iconUrl,onClick:V.onClick,ariaLabel:(Se=V.ariaLabel)!=null?Se:V.tooltip,tooltipText:V.tooltip}}):[]]),ur=ae(H),ol=gi([ur],([c])=>J.features.additionalSettingsMenuItems?c.map(h=>h.type==="SWITCH"?Gt(Ie({},h),{onClick:h.onChangeEnabled}):h):[]),nl=(c,h)=>{let V=ge(Wr).map(oe=>oe.id!==c?oe:Ie(Ie({},oe),h));Wr.set(V)},Jl=c=>{let h=ge(Wr);if(h.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}h.push(c),Wr.set(h)},rl=c=>{let h=ge(Wr);if(!h.some(V=>V.id===c)){U({message:`Can't find additional button with id: "${c}"! Can't remove item with this id`});return}h=h.filter(V=>V.id!==c),Wr.set(h)},sl=c=>{Si.next(Vs.LIVE),U({message:"live switch to low latency "+c}),pe.log("live switch to low latency "+c),A.setLiveLowLatency(c)},al=(c,h)=>{let V=ge(ur).map(oe=>oe.id!==c?oe:Ie(Ie({},oe),h));ur.set(V)},ed=c=>{let h=ge(ur);if(h.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}h.push(c),ur.set(h)},pa=c=>{let h=ge(ur);if(!h.some(V=>V.id===c)){U({message:`Can't find settings menu item with id: "${c}"! Can't remove item with this id`});return}h=h.filter(V=>V.id!==c),ur.set(h)},Er=ae(z),rt=gi([Er],([c])=>J.features.additionalContextMenuItems?c:[]),ut=(c,h)=>{let V=ge(Er).map(oe=>oe.id!==c?oe:Ie(Ie({},oe),h));Er.set(V)},Wi=c=>{let h=ge(Er);if(h.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}h.push(c),Er.set(h)},Wo=c=>{let h=ge(Er);if(!h.some(V=>V.id===c)){U({message:`Can't find context menu item with id: "${c}"! Can't remove item with this id`});return}h=h.filter(V=>V.id!==c),Er.set(h)},Ki=gi([Fe,ot],([c,h],V)=>{V(c&&h)}),$i=()=>{Si.next(Vs.LIVE),U({message:"switch to active live"}),pe.log("switch to active live"),A.seekTime(0),A.info.playbackState$.getValue()!==Wl.PLAYING&&Qt.actions.internal.togglePlay()},Ri=()=>{pe.log("skip adman"),Te.skip()},fa=(c=!0)=>{var oe;$r(Qt),U({message:`switch from ads to video, callPlay: ${c}`}),pe.log("switch from ads to video",{callPlay:c}),ce.set("video"),c&&A.play(),l&&co(!0,!0);let h=(oe=ge(Ge))==null?void 0:oe.muted,V=!A.info.muted$.getValue();h!==void 0&&!V&&co(h,!0),Ge.set(void 0)},ll=()=>{$r(Qt),U({message:"switch from video to ads"}),pe.log("switch from video to ads"),Qt.actions.internal.pause(),bo(),ce.set("ads")},_p=c=>{$r(Qt);let h=c?"LiveWaitingStart":"thumb";pe.log("set live waiting start",{state:c,playerPhase:h}),ce.set(h)},Mc=c=>{$r(Qt);let h=c?"LiveWaitingRecover":"thumb";pe.log("set live waiting recover",{state:c,playerPhase:h}),ce.set(h)},Vc=c=>{$r(Qt);let h=c?"LiveWaitingRecord":"thumb";pe.log("set live waiting record",{state:c,playerPhase:h}),ce.set(h)},Rc=()=>($r(Qt),pe.log("get debug text data"),zh(A,ke,Qt,Ne.getTraceId())),bp=()=>($r(Qt),JSON.stringify(Ne.getFinishedSpans())),Nc=()=>($r(Qt),Wh(A,ke,Qt)),dl=()=>Pe,Oc=()=>{U({message:"toggle chromecast"}),pe.log("toggle chromecast"),A.toggleChromecast()},ma=c=>{var V;if($r(Qt),A.info.isEnded$.getValue())return;let h=!c;if(ge(Qt.playerPhase)==="ads"){U({message:`pause ads, internalCall: ${h}`}),pe.log("pause ads",{internalCall:h}),Te.pause();return}U({message:`pause video, internalCall: ${h}`}),pe.log("pause video",{internalCall:h}),h&&((V=s==null?void 0:s.onPause)==null||V.call(s)),A.pause()},va=c=>{var V;$r(Qt);let h=!c;if(ge(Qt.playerPhase)==="ads"){U({message:`play ads, internalCall: ${h}`}),pe.log("play ads",{internalCall:h}),Te.play();return}U({message:`play video, internalCall: ${h}`}),pe.log("play video",{internalCall:h}),h&&((V=s==null?void 0:s.onPlay)==null||V.call(s)),A.play()},$p=c=>{$r(Qt);let h=!c;if(ge(Qt.playerPhase)==="ads"){U({message:"player cannot be stopped during ads via external method"});return}U({message:`player will be stopped, internalCall: ${h}`}),P==null||P()},Dc=(c,h)=>{$r(Qt),U({message:`first start, show ads: ${c}, internalCall: ${!h}`}),pe.log("first start",{showAds:c,external:h}),c?ce.set("ads"):(ce.set("video"),h?A.play():Qt.actions.internal.togglePlay())},td=()=>(U({message:"getting time codes"}),m),He=()=>{let c=td();if(!c||[0,1].includes(c.length))return;let h=A.info.position$.getValue();return c.find(V=>V.time>h)},_i=c=>{let h=c;h||(h=He());let V=A.info.position$.getValue();pe.log("seek to next episode",Ie({currentTime:V},h)),h&&(U({message:"seek to next episode"}),zo(h.time,Vs.EPISODE,!0))},Mo=()=>{let c=td();if(!c||[0,1].includes(c.length))return;let h=A.info.position$.getValue(),V=c.findIndex(Se=>Se.time>h),oe=V===-1?c.length-2:V-2;if(!(oe<0))return c[oe]},ga=c=>{let h=c;h||(h=Mo());let V=A.info.position$.getValue();pe.log("seek to prev episode",Ie({currentTime:V},h)),h&&(U({message:"seek to prev episode"}),zo(h.time,Vs.EPISODE,!0))},xn=()=>(U({message:"getting preview thumbs data"}),pe.log("get preview thumbs data",Ie({},p)),p),Gb=()=>mt(null,null,function*(){let c=ie==null?void 0:ie.isActive(),h="none";ie!=null&&ie.isActive()?(h="exit",yield ie==null?void 0:ie.exit()):(h="request",yield ie==null?void 0:ie.request()),pe.log("toggle picture in picture",{isActive:c,action:h})}),Yb=(c=-90)=>{pe.log("rotate video",{alphaDiff:c}),ti.update(h=>h+c)},Bc=ae([]);C==null||C.subscribe(c=>{let h=[];for(let V=0;V<c.length;V++){let{range:[oe,Se],subjects:et}=c[V];V===0&&oe!==0&&h.push({time:0,text:"",interactive:!1,completed:!0}),h.push({time:oe/1e3,text:"",interactive:!0,completed:J.features.interactiveTimeOpenUri?!et.length||et.every(Pt=>Pt.isRemoved):!et.length}),Se!==1/0&&h.push({time:Se/1e3,text:"",interactive:!1,completed:!0})}Bc.set(h)});let jb=ae(!1);I==null||I.subscribe(c=>{c&&ge(Vi)&&dn()});let Hv=c=>{if(!S)return c;let h=ge(Bc),V=ge(Do),Se=ge(wr)/V,et=h.find(Pt=>Pt.interactive&&!Pt.completed&&Pt.time>Se);return typeof(et==null?void 0:et.time)=="number"?Math.min(c,et.time-.05):c},Xb=()=>{Qt.ui.episodes.panelOpened$.set(!1)},Zb=()=>{pe.log("destroy store"),clearTimeout(ln),clearTimeout(mo),ye.unsubscribe(),So.unsubscribe(),A.destroy(),Te.destroy(),Z==null||Z.destroy(),j==null||j.destroy(),ee.unsubscribe(),Jt==null||Jt.disconnect(),Jt=null,Ze.destroy()},Jb=gi([ir,ze,Ui],([c,h,V])=>f.features.doubleForwardAvailable&&!c&&h==="video"&&V),yp=ae(!1),Uv=2,Fc=null,zv=c=>{if(!ge(Vn)&&c)return;let h=A.info.currentPlaybackRate$.getValue();c?h!==Uv&&(Fc=h,Wn(Uv,!1),yp.set(!0)):(Fc&&Wn(Fc,!1),yp.set(!1),Fc=null)};ze.subscribe(c=>{c!=="video"&&zv(!1)});let e$=()=>{ma(!1),ei.set(!0)},t$=()=>{va(!1),ei.set(!1)},xp=!1,i$=()=>{fo.set(!0),xp=A.info.playbackState$.getValue()===Wl.PLAYING,ma(!1)},o$=()=>{fo.set(!1),!ge(ei)&&xp&&va(!1),xp=!1};A.events.playing$.subscribe(()=>{ge(ei)&&ma(!1)});let Qt={interfaceLanguage$:Me,isCyrillicRelatedInterface$:At,initVideo:fi,videoId:i,isClip:o,playerPhase:ze,vsid:Dt,state:{positionExact$:wt,positionWithScrubbing$:el,duration$:Do,playbackState$:Yt,playbackStateRealistic$:Fi,isPlaying$:Vn,isLoaderVisible:ji,bufferedProgress$:Ji,isLive$:To,canChangePlaybackSpeed$:Ui,isActiveLive$:ir,isOldestAvailableLive$:xr,isRewindableLive$:Or,isEnded$:Zo,muted$:$o,volume$:Rr,trafficSavingEnabled$:ro,highQualityEnabled$:Ai,autoQualityLimitingAvailable$:Jo,availableVideoStreams$:Dr,availableAudioStreams$:Rn,videoStream$:Nn,audioStream$:ao,currentQuality$:on,isAutoQualityEnabled$:tn,availableQualities$:Dn,currentPlaybackRate$:Bn,availablePlaybackRates$:Bo,currentSubtitle$:Io,availableTextTracks$:zi,availableSubtitlesList$:Hn,currentSubtitleCaptions$:Ct,isAutoSubtitleCaptionVisible$:lo,chromecastState$:er,chromecastDeviceName$:Nr,chromecastConnected$:so,currentFormat$:es,throughputEstimation$:bs,videoBitrate$:ts,videoSize$:tr,errorLog$:be,crashed$:ot,isAudioAvailable$:hn,isAudioDisabled:!!l,canDownload:J.features.download&&!!d,availableSources$:Mi,hasMpegSources$:bn,isInteractive:S,showInteractiveGraph:J.features.interactiveGraph,showSeekToInteractive:J.features.seekToInteractive,showPlayPrevChapter:J.features.interactivePlayPrevChapter,showInteractiveTimeIndicator:J.features.interactiveTimeIndicator&&!!ge(Bc).length,interactiveEpisodes$:Bc,isInteractiveTime$:I?si(I):ae(!1),isInteractiveExpectation$:jb,hasInteractiveBranches:E,playPrevChapterDisabledTooltip:k,looped$:Cr,loadedMetadata$:Rt,isAutoQualityAvailable$:_n,previewTrackActive:ei,previewTrackDragInProgress:fo},ui:{t:ct,controlsVisible:ae(!1),touched:ae(!1),controls:{prevButton:ae(void 0),playButton:ae(void 0),replayButton:ae(void 0),nextButton:ae(void 0),playPrevChapterButton:ae(void 0),seekToInteractiveButton:ae(void 0),interactiveGraphButton:ae(void 0),liveButton:ae(void 0),time:ae(void 0),episodes:ae(void 0),volume:ae(void 0),subtitles:ae(void 0),settings:ae(void 0),context:ae(void 0),chromecast:ae(void 0),pip:ae(void 0),fullscreen:ae(void 0),vkLogo:ae(void 0),interactiveTimeIndicator:ae(void 0),timeline:ae(void 0),autoplayNextToggle:ae(void 0),additionalButtons:Q.length?Q.reduce(c=>[...c,ae(void 0)],[]):[],disabledControls$:Ft},modals:{hotKeyMap:{show:ae(!1),data:ae({title:"",closeBtnText:"",groups:[]})}},isFullscreen:pt,isFullscreenOpenedByKeyboard:Bt,rotateAlpha:ti,isAutoplay:ae(!1),debugPanelVisible:ae(!1),episodes:{panelOpened$:ae(!1),openedByKeyboard$:ae(!1)},contextMenu:{visible$:ae(!1),btnRef$:ae(void 0),openedByBtnKeyboard$:ae(!1),openedByHotKey$:ae(!1),lastActiveElem$:ae(void 0),showContextMenuBtn$:ae(!1),position$:ae({top:0,left:0})},playerSize:Ht,isMobile:Fe,mobileNotReportControlHidden$:Ki,icon3DVideoVisible:ae(!1),scrubbingInProgress:Vi,volumeChangingInProgress:Hs,is3DVideo:$e,currentGridType$:Ir,additionalButtonsDeprecated$:Us,additionalDesktopControlPanelRightButtons$:zs,additionalSettingsMenuItems$:ol,additionalContextMenuItems$:rt,interactiveHideMobileControls:ae(!1),overlayContainer$:ae(void 0),startedByKeyboard$:ae(!1),autoplayNextEnabled$:ae(!1),timerNextVideoRunning$:ae(!0),settingsMenu:{visible$:ae(!1),ref$:ae(void 0),openedByBtnKeyboard$:ae(!1)},settingsSubMenu:{visible$:ae(!1),ref$:ae(void 0),name$:ae(void 0)},userActionsDisabled:ae(!1),hiddenControls:{volume:ae(!1),vkLogo:ae(!1),pip:ae(!1),chromecast:ae(!1),settings:ae(!1)},isControlsAvailable:cr,controlBlocks:{topLeft:ae(void 0),topRight:ae(void 0),middle:ae(void 0),bottom:ae(void 0),bottomLeft:ae(void 0),bottomRight:ae(void 0)},videoTitleInfo:ae(void 0),doubleForwardOn$:yp,doubleForwardAvailable$:Jb,previewTrackNotificationVisible:ae(!1),previewTrackActive:ei,previewTrackDragInProgress:fo,previewTrackAvailable:he,isPreviewTrackHorizontallyAligned:ii},ads:{position:ae(0),duration:ae(0),playbackState:ae("inactive"),canSkip:ae(!1),secondsToWatchBeforeSkip:ae(0),postrollPassed:ae(!1)},webApi:{pictureInPictureApi:ie,annotationsApi:De,slotsApi:Be,focusManager:it},actions:{internal:{preload:$n,firstStart:c=>Dc(c,!1),play:()=>va(!1),pause:()=>ma(!1),togglePlay:yn,toggleMuted:mi,openSettingsMenu:ar,closeSettingsMenu:Ur,openSettingsSubMenu:os,closeSettingsSubMenu:is,setVolume:c=>nn(c,!1),setMuted:c=>co(c,!1),startVolumeChanging:tl,stopVolumeChanging:il,setVideoStream:Br,setAudioStream:c=>On(c,!1),setQuality:(c,h)=>po(c,h,!1),setTrafficSavingEnabled:(c,h)=>Lo(c,h,!1),setHighQualityEnabled:(c,h)=>zn(c,h,!1),setPlaybackRate:Wn,incrementPlaybackRate:$s,decrementPlaybackRate:rs,setSubtitle:c=>Ye(c,!1),toggleSubtitle:()=>qt(!1),togglePictureInPicture:Gb,startScrubbing:pi,progressScrubbing:ni,completeScrubbing:Zl,toggleChromecast:Oc,switchToActiveLive:$i,switchFromAdsToVideo:fa,switchFromVideoToAds:ll,skipAd:Ri,setLiveWaitingStart:_p,setLiveWaitingRecover:Mc,setLiveWaitingRecord:Vc,getDebugTextData:Rc,getTraceTextData:bp,getDebugPanelData:Nc,getVideoElement:dl,seekTime:(c,h,V)=>zo(c,h,V),clearDelayedBufferingCheckTimeout:Mn,seekEpisodeStartTime:Bs,seekToPercent:an,getNextEpisode:He,seekToNextEpisode:_i,getPrevEpisode:Mo,seekToPrevEpisode:ga,startLogging:gn,stopLogging:Tt,startCameraManualRotation:Ut,stopCameraManualRotation:W,moveCameraFocusPX:kt,holdCamera:di,releaseCamera:lt,getVideoEpisodes:td,getPreviewThumbsData:xn,downloadVideo:Un,addLanguage:Mf,setLanguage:fe,nextMovie:ht,videoRotate:Yb,correctSeekTimeToInteractive:Hv,replayInteractive:N,setLooped:Fo,reportProblem:ns,setAutoplayNextEnabled:qe,setTimerNextVideoRunning:Lt,prevVideoClick:bi,nextVideoClick:Ao,nextVideoAnnouncementShow:ko,nextVideoAnnouncementClick:Ho,nextVideoAnnouncementAuto:uo,nextVideoAnnouncementCancel:eo,checkFullscreenSupport:st,changeDoubleForwardOn:zv,closePreviewTrack:t$,previewTrackOpened:e$,previewTrackDragStarted:i$,previewTrackDragFinished:o$},external:{firstStart:c=>Dc(c,!0),play:()=>va(!0),pause:()=>ma(!0),stop:()=>$p(!0),seekTime:c=>Fs(c),seekEpisodeStartTime:c=>ca(c),setPlaybackRate:c=>dt(c),setAutoQualityLimits:c=>da(c),setMuted:c=>co(c,!0),toggleSubtitle:()=>qt(!0),changeSubtitle:Ii,setVolume:c=>nn(c,!0),returnFocusToEpisodes:Xb,updateAdditionalSettingsItem:al,addAdditionalSettingsItem:ed,removeAdditionalSettingsItem:pa,updateAdditionalContextItem:ut,addAdditionalContextItem:Wi,removeAdditionalContextItem:Wo,updateAdditionalButton:nl,addAdditionalButton:Jl,removeAdditionalButton:rl,setLiveLowLatency:sl,hideControls:()=>sn(!1),showControls:()=>sn(!0),setQuality:c=>po(c,{appliesTo:"to-video"},!0),setTrafficSavingEnabled:c=>Lo(c,"to-video",!0),setHighQualityEnabled:c=>zn(c,"to-video",!0),changeAudioStream:ui}},callbacks:s,setUiCallbacks:c=>{Ue=Ie({},c)},getAdmanWrapper:()=>Te,getLogger:()=>We,getPlayer:()=>A,destroy:Zb};return Qt};function Zn(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}=Ms(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 nw=["disabledControls$","additionalButtons"],rw=["interactiveTimeIndicator"],ql=(t,e,i,o)=>{if(t){for(let[r,a]of Object.entries(e))if(!nw.includes(r)){let l=o||rw.includes(r);a.set(Zn(t,i,r,l))}}};var Xu=(t,e,i)=>mt(null,null,function*(){yield _o(),e&&i&&(i.focus(),t.set(!1))});var sw=Ce('<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=sw();b(e,o)},$$slots:{default:!0}})}function Sm(t,e){B(e,!0);let[i,o]=Re(),r=()=>x(s,"$contextMenuVisible$",i),a=g(e,"disabled",3,!1),l=g(e,"ariaLabel",3,""),d=ve(),s=d.ui.contextMenu.visible$,u=d.ui.contextMenu.openedByBtnKeyboard$,m=d.ui.contextMenu.showContextMenuBtn$,p=d.ui.contextMenu.position$,f=d.ui.contextMenu.btnRef$,$=K(void 0);Oe(()=>{n($)&&It(()=>{f.set(n($))})});let y=I=>{let N=na(I),P=D_(n($));p.set(P),u.set(N),s.set(!r())},_=()=>{m.set(!0)},S=()=>{m.set(!1)},C=v(()=>r()?"opened":"");Kt(t,{get className(){return n(C)},testId:"btn-context-menu",get disabled(){return a()},get ariaLabel(){return l()},click:y,focus:_,blur:S,get ariaExpanded(){return r()},get ref(){return n($)},set ref(I){O($,I,!0)},children:(I,N)=>{wm(I,{})},$$slots:{default:!0}}),F(),o()}var aw=t=>{t.stopPropagation()},lw=M("<div><!> <div></div> <div></div></div>"),dw={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 nc(t,e){var j;B(e,!0),q(t,dw);let[i,o]=Re(),r=()=>x(S,"$isMobile",i),a=()=>x(P,"$areControlsVisible",i),l=()=>x(k,"$currentGridType$",i),d=()=>x(I,"$isInteractiveTime$",i),s=()=>x(_,"$interactiveControlsOpacity$",i),u=()=>x(N,"$showInteractiveTimeIndicatorTooltip$",i),m=()=>x(C,"$isFullscreen",i),p=g(e,"ref",15,void 0),f=K(void 0),$=ve(),y=wo(),{interactiveControlsOpacity$:_}=y,S=$.ui.isMobile,C=$.ui.isFullscreen,I=$.state.isInteractiveTime$,N=y.showInteractiveTimeIndicatorTooltip$,P=$.ui.controlsVisible,E=(j=$.callbacks)==null?void 0:j.onInteractiveTimeIndicatorClick,k=$.ui.currentGridType$,Q=v(()=>!r()&&a()),H=v(()=>Ls(l(),"s")),z=v(()=>!d()||!!s()||n(Q)),Y=K(!1);Oe(()=>{O(Y,n(z),!0)});let le=()=>{O(Y,!0)},X=()=>{var ie;re(),(ie=n(f))==null||ie.addEventListener("animationiteration",le,{once:!0})},re=()=>{var ie;O(Y,!1),(ie=n(f))==null||ie.removeEventListener("animationiteration",le)},Z=ie=>{N.set(ie)},we=v(()=>u()&&!n(z));Oe(()=>{u()?X():re()});let ue=()=>{n(z)||(N.set(!0),E==null||E())};pn(()=>{N.clearTimeout(),re()});let ne=()=>{N.set(!1)},_e=G("tooltip_interactive_interaction_time_indicator");var xe=lw();let J;xe.__mousemove=[aw],xe.__click=ue;var Ne=T(xe);Oo(Ne,{get tooltipContent(){return _e},get tooltipVisible(){return n(we)},initialTranslateYPx:72,tooltipPlacement:"bottom",onTooltipVisibilityChange:Z,get ref(){return p()},set ref(ie){p(ie)},children:(ie,De)=>{Yd(ie,{completed:!0})},$$slots:{default:!0}});var pe=L(Ne,2);let A;je(pe,ie=>p(ie),()=>p());var We=L(pe,2);let Te;je(We,ie=>O(f,ie),()=>n(f)),w(xe),D((ie,De,Be)=>{J=se(xe,1,"interactive-episode-icon-animated s-26",null,J,ie),A=se(pe,1,"ref-block s-26",null,A,De),Te=se(We,1,"pulse s-26",null,Te,Be)},[()=>({mobile:r(),fullscreen:m(),invisible:n(z),"icon-small":n(H)}),()=>({hidden:n(z)}),()=>({paused:n(Y)})]),gt("mouseleave",xe,ne),b(t,xe),F(),o()}tt(["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);Oo(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=Le();let m=v(()=>e.buttonComponent);var p=de(u);Di(p,()=>n(m),(f,$)=>{$(f,Ps(()=>{var y;return(y=e.buttonComponentProps)!=null?y:{}}))}),b(d,u)},$$slots:{default:!0}}),F()}var Rs={prevButton:100,replayButton:200,playButton:300,nextButton:400,playPrevChapterButton:500,seekToInteractiveButton:600,interactiveGraphButton:700,liveButton:800};var uw=Ce('<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 la(t,e){B(e,!0);let i=g(e,"reversed",3,!1),o=v(()=>i()?"transform: scaleX(-1);transform-origin: 50%;":void 0),r=v(()=>`${fn(e.size)}${n(o)}`),a=v(()=>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=uw();b(l,s)},$$slots:{default:!0}}),F()}var pw=M('<div class="icon-background-mobile s-20"><!></div>'),fw={hash:"s-20",code:".icon-background-mobile.s-20{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 za(t,e){B(e,!0),q(t,fw);let i=g(e,"ref",15,void 0),o=g(e,"isMobile",3,!1),r=g(e,"disabled",3,!1),l=ve().ui.t,d=v(()=>e.type==="prev"?l("tooltip_previous"):l("tooltip_next")),s=v(()=>e.type==="prev"?l("hotkey_map_item_prev_video_value"):l("hotkey_map_item_next_video_value")),u=v(()=>`btn-${o()?"m":"d"}--${e.type}`);Kt(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 f=Le(),$=de(f);{var y=S=>{var C=pw(),I=T(C);let N=v(()=>e.type==="prev");la(I,{get size(){return"32"},get reversed(){return n(N)}}),w(C),b(S,C)},_=S=>{let C=v(()=>e.type==="prev");la(S,{get size(){return"24"},get reversed(){return n(C)}})};R($,S=>{o()?S(y):S(_,!1)})}b(m,f)},$$slots:{default:!0}}),F()}var mw=Ce('<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 rc(t,e){B(e,!0);let i=v(()=>fn(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=mw();b(o,a)},$$slots:{default:!0}}),F()}import{noop as vw}from"@vkontakte/videoplayer-shared/es2015";var gw=M('<div class="icon-background-mobile s-24"></div>'),hw=M("<!> <div><!></div>",1),_w={hash:"s-24",code:".mobile.s-24{align-items:center;display:flex;justify-content:center;position:relative}.icon-background-mobile.s-24{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,_w);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,vw),d=G("tooltip_restart"),s=v(()=>`${o()?"btn-m--play":""} ${a()}`);Kt(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=hw(),f=de(p);{var $=I=>{var N=gw();b(I,N)};R(f,I=>{o()&&I($)})}var y=L(f,2);let _;var S=T(y);let C=v(()=>o()?"48":"24");rc(S,{get size(){return n(C)}}),w(y),D(I=>_=se(y,1,"s-24",null,_,I),[()=>({mobile:o()})]),b(u,p)},$$slots:{default:!0}}),F()}var bw=Ce('<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 Ns(t,e){B(e,!0);let i=v(()=>fn(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=bw();b(o,a)},$$slots:{default:!0}}),F()}import{noop as $w}from"@vkontakte/videoplayer-shared/es2015";var yw=M('<div class="icon-background-mobile s-25"><!></div>'),xw={hash:"s-25",code:".icon-background-mobile.s-25{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,xw);let[i,o]=Re(),r=()=>x(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),m=g(e,"className",3,""),p=g(e,"click",3,$w),$=ve().ui.t,{toggle:y}=a,_=v(()=>y),S=v(()=>r()!==null),C=v(()=>n(S)?r():s()),I=v(()=>n(C)?$("tooltip_pause"):$("tooltip_play")),N=v(()=>n(C)?Ns:An),P=v(()=>`${d()?"btn-m--play":""} ${m()}`),E=v(()=>n(S)?n(_):p());Kt(t,{get className(){return n(P)},testId:"play-btn",get click(){return n(E)},get disabled(){return u()},get ariaLabel(){return n(I)},get ariaKeyShortCut(){return fs.KeyK},get ref(){return l()},set ref(k){l(k)},children:(k,Q)=>{var H=Le();let z=v(()=>n(N));var Y=de(H);{var le=re=>{var Z=yw(),we=T(Z);Di(we,()=>n(z),(ue,ne)=>{ne(ue,{get size(){return"48"}})}),w(Z),b(re,Z)},X=re=>{var Z=Le(),we=de(Z);Di(we,()=>n(z),(ue,ne)=>{ne(ue,{get size(){return"24"}})}),b(re,Z)};R(Y,re=>{d()?re(le):re(X,!1)})}b(k,H)},$$slots:{default:!0}}),F(),o()}var ww=Ce('<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 Tm(t){Xe(t,{testId:"play-prev-chapter-icon",children:(e,i)=>{var o=ww();b(e,o)},$$slots:{default:!0}})}function sc(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("tooltip_interactive_go_back"),l=v(()=>o()?"hidden":"");Kt(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)=>{Tm(d,{})},$$slots:{default:!0}}),F()}var Sw=M('<span class="gutter s-27"><span><!></span></span>'),Tw={hash:"s-27",code:".gutter.s-27{--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-27{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-27{background-color:var(--toggle-color-autoplay-on);transform:translateX(calc(var(--gutterWidth) - var(--togglerWidth) + var(--togglerGap)))}"};function ac(t,e){B(e,!0),q(t,Tw);let[i,o]=Re(),r=()=>x(s,"$autoplayNextEnabled$",i),a=g(e,"ref",15,void 0),l=ve(),d=l.ui.t,s=l.ui.autoplayNextEnabled$,u=l.actions.internal.setAutoplayNextEnabled,m=()=>{u(!r(),!0)},p=d("aria_label_autoplay"),f="12",$="#000",y=v(()=>r()?"true":"false");Kt(t,{click:m,get ariaLabel(){return p},role:"switch",get areaChecked(){return n(y)},get ref(){return a()},set ref(_){a(_)},children:(_,S)=>{var C=Sw(),I=T(C);let N;var P=T(I);{var E=Q=>{An(Q,{get size(){return f},fill:$})},k=Q=>{Ns(Q,{get size(){return f},fill:$})};R(P,Q=>{r()?Q(E):Q(k,!1)})}w(I),w(C),D(Q=>N=se(I,1,"toggler s-27",null,N,Q),[()=>({enabled:r()})]),b(_,C)},$$slots:{default:!0}}),F(),o()}var Cw=Ce('<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 Cm(t){Xe(t,{testId:"seek-to-interactive-icon",children:(e,i)=>{var o=Cw();vi(),b(e,o)},$$slots:{default:!0}})}function lc(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("tooltip_interactive_seek"),l=v(()=>o()?"hidden":"");Kt(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)=>{Cm(d,{})},$$slots:{default:!0}}),F()}var Iw=Ce('<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>'),Ew=Ce('<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=g(e,"isOpened",3,!1),o=v(()=>i()?"graph-close-icon":"graph-open-icon");Xe(t,{get testId(){return n(o)},children:(r,a)=>{var l=Ew(),d=L(de(l));{var s=u=>{var m=Iw();b(u,m)};R(d,u=>{i()&&u(s)})}b(r,l)},$$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=g(e,"graphIsOpened",3,!1),d=ve().ui.t,s=v(()=>a()?d("tooltip_interactive_graph_on"):d("tooltip_interactive_graph_off")),u=v(()=>o()?"hidden":"");Kt(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 f=v(()=>!!a());Im(m,{get isOpened(){return n(f)}})},$$slots:{default:!0}}),F()}import{PlaybackState as ib}from"@vkontakte/videoplayer-core/es2015";function cc(t,e){B(e,!0);let[i,o]=Re(),r=()=>x(u,"$playbackState$",i),a=g(e,"isMobile",3,!1),l=g(e,"isLiveActive",3,!1),d=g(e,"ariaLabel",3,""),s=ve(),u=s.state.playbackState$,m=s.actions.internal.switchToActiveLive,p=s.actions.internal.togglePlay,f=v(()=>()=>{if(!l()){m();return}r()===ib.PAUSED&&p()}),$=v(()=>a()?"":"btn--live btn-full-opacity"),y=v(()=>l()?"btn-live":"btn-live-offset"),_=v(()=>l()&&r()===ib.PLAYING);Kt(t,{get className(){return n($)},get testId(){return n(y)},get disabled(){return n(_)},get ariaLabel(){return d()},get click(){return n(f)},children:(S,C)=>{Od(S,{get isActive(){return l()}})},$$slots:{default:!0}}),F(),o()}import{noop as ob}from"@vkontakte/videoplayer-shared/es2015";var Pw=M('<div class="icon icon-error-stub"><div class="inner"></div></div>'),Aw=M('<img class="icon" aria-hidden="true"/>');function Wa(t,e){"use strict";let i=K(!1),o=()=>{O(i,!0)};var r=Le(),a=de(r);{var l=s=>{var u=Pw();b(s,u)},d=s=>{var u=Aw();D(()=>Ve(u,"src",e.icon)),gt("error",u,o),Ea(u),b(s,u)};R(a,s=>{n(i)?s(l):s(d,!1)})}b(t,r)}function Em(t,e){B(e,!0);let i=g(e,"disabled",3,!1),o=g(e,"onClick",3,ob),r=g(e,"ref",15),a=v(()=>o()===ob),l=v(()=>n(a)||i()),d=v(()=>n(a)?"btn-full-opacity":"");Oo(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=v(()=>{var p;return(p=e.testId)!=null?p:e.id});Kt(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,f)=>{Wa(p,{get icon(){return e.icon}})},$$slots:{default:!0}})},$$slots:{default:!0}}),F()}var nb=t=>!!t.buttonComponent;var Os={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(Zn(t,i,r,o))};import{interpolate as Pm}from"@vkontakte/videoplayer-shared/es2015";var rb=10,sb=40,Am=.2,Lw=.5,Mw=65,Vw=114,Rw=4,ab=({onPreviewTrackOpened:t,getTimelineRef:e,isHorizontal:i})=>{let o=v(()=>i?Mw:Vw),r=K(!1),a=K(0),l=K(0),d=v(()=>n(o)+rb-sb-Rw),s=v(()=>Pm(n(a),[Am,1],[0,-n(d)])),u=v(()=>Pm(n(a),[Am,1],[0,sb])),m=v(()=>Pm(n(a),[Am,1],[0,n(o)+rb]));return{progressBarY:()=>n(s),controlsY:()=>n(u),calculatedHeight:()=>n(m),onPointerDown:_=>{var S;O(l,((S=e())==null?void 0:S.getBoundingClientRect().bottom)||0,!0),O(r,!0)},onPointerMove:_=>{if(!n(r))return;let S=Math.max(Math.min(_.clientY-n(l),0),-n(d));O(a,Math.abs(S/n(d)),!0)},onPointerUp:()=>{O(r,!1),O(a,n(a)>=Lw?1:0,!0),n(a)===1&&t()},closePreviewTrack:()=>{O(a,0)}}};var Nw=t=>t;function _s(t,{delay:e=0,duration:i=400,easing:o=Nw}={}){let r=+getComputedStyle(t).opacity;return{delay:e,duration:i,easing:o,css:a=>`opacity: ${a*r}`}}var Ow=M('<span class="root s-2c"> </span>'),Dw={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 km(t,e){q(t,Dw);var i=Ow(),o=T(i,!0);w(i),D(()=>me(o,e.time)),b(t,i)}var Bw=M('<div class="tooltip-wrapper s-i"><div><!></div></div>'),Fw={hash:"s-i",code:'.tooltip-wrapper.s-i{display:block;position:relative}.tooltip.s-i{bottom:100%;opacity:0;position:absolute;transform:translateX(-50%);transition:opacity .2s;visibility:hidden}.pointer.s-i: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-i{opacity:1;visibility:visible}'};function Lm(t,e){q(t,Fw);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=K(void 0),u=K(void 0);function m(S){if(!n(u))return 0;let{width:C}=n(u).getBoundingClientRect(),I=C/2;return S<I?I+l():S>e.containerWidth-I?e.containerWidth-I-d():S}let p=v(()=>m(r()));var f=Bw(),$=T(f);let y;var _=T($);ri(_,()=>{var S;return(S=e.children)!=null?S:vt}),w($),je($,S=>O(u,S),()=>n(u)),w(f),je(f,S=>O(s,S),()=>n(s)),D(S=>{Qe(f,`transform: translate(${n(p)}px, ${a()}px);`),y=se($,1,"tooltip s-i",null,y,S),Qe($,`opacity: ${i()?1:0}; visibility: ${i()?"visible":"hidden"}`)},[()=>({active:i(),pointer:o()})]),b(t,f)}var lb=t=>Math.abs(t)/90%4===1;var Hw=M('<div class="preview s-j"></div>'),Uw=M('<div class="time s-j"> </div>'),zw=M('<div><!> <div class="episode s-j"><!></div> <!></div>'),Ww={hash:"s-j",code:".timeline-preview.s-j{border-radius:2px;bottom:18px;pointer-events:none}.timeline-preview.mobile.s-j{bottom:72px}.preview.s-j{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-j{margin-bottom:4px;margin-top:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.episode.s-j,.time.s-j{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-j{color:var(--white)}"};function Mm(t,e){B(e,!0),q(t,Ww);let[i,o]=Re(),r=()=>x(y,"$rotateAlpha",i),a=()=>x(_,"$playerSize",i),l={MOBILE:150,DESKTOP:278},d=g(e,"time",3,""),s=g(e,"isMobile",3,!1),u=g(e,"videoEpisodes",19,()=>[]),m=g(e,"progress",3,0),p=g(e,"duration",3,0),f=g(e,"isInteractive",3,!1),$=ve(),y=$.ui.rotateAlpha,_=$.ui.playerSize,S=K(0),C=K(0),I=K(""),N=K(0),P=K(0),E=K(0),k=K(0),Q=v(()=>zu(m(),p(),u())),H=v(()=>zl(r())),z=v(()=>lb(r())),Y=v(re),le=v(()=>(n(z)?1:-1)*(n(S)/2-n(C)/2)),X=v(()=>n(le)*-1);Oe(()=>{(j=>{O(S,j.width,!0),O(C,j.height,!0)})(we())}),Oe(()=>{(j=>{O(I,j.imgSrc,!0),O(N,j.imgWidth,!0),O(P,j.imgHeight,!0),O(E,j.imgOffsetX,!0),O(k,j.imgOffsetY,!0)})(ue(m()))});function re(){var Be;let j=s()?l.MOBILE:l.DESKTOP,{isVertical:ie}=Z(),De=30;return(Be=n(Q))!=null&&Be.text&&(De+=16),(ie||n(H))&&(De+=18,De+=50),Math.min(Math.max(a().height-De,0),j)}function Z(){let j=e.previewThumbsData.frameWidth,ie=e.previewThumbsData.frameHeight,De=ie>j;return{width:j,height:ie,isHorizontal:!De,isVertical:De}}function we(){let{height:j,isHorizontal:ie,isVertical:De,width:Be}=Z();return ie&&(j=j/Be*n(Y),Be=n(Y)),De&&(Be=Be/j*n(Y),j=n(Y)),{width:Be,height:j}}function ue(j){let ie;e.previewThumbsData.isUV?ie=Math.floor(p()*j/e.previewThumbsData.frequency):ie=Math.min(e.previewThumbsData.countTotal,Math.max(0,Math.floor(e.previewThumbsData.countTotal*j)));let De=Math.floor(ie/e.previewThumbsData.countPerImage),Be=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 ke=e.previewThumbsData.countPerRow;!e.previewThumbsData.isUV&&De===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage>0&&(ke=Math.min(e.previewThumbsData.countPerRow,e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage));let Pe=n(S)*ke,Ue=n(C)*U,Ze=-it*n(S),ye=-Be*n(C);return{imgSrc:e.previewThumbsData.links[De],imgWidth:Pe,imgHeight:Ue,imgOffsetX:Ze,imgOffsetY:ye}}var ne=zw();let _e;var xe=T(ne);{var J=j=>{var ie=Hw();D(()=>Qe(ie,`width: ${n(S)}px; height: ${n(C)}px; background-image: url(${n(I)}); background-size: ${n(N)}px ${n(P)}px; background-position: ${n(E)}px ${n(k)}px;
61
+ transform: rotate(${r()}deg) ${n(H)?`translate(${n(le)}px, ${n(X)}px)`:""};
62
+ `)),b(j,ie)};R(xe,j=>{n(I)&&j(J)})}var Ne=L(xe,2),pe=T(Ne);{var A=j=>{var ie=Le(),De=de(ie);{var Be=U=>{var ke=ps();D(Pe=>me(ke,Pe),[()=>G("tooltip_episode_unfinished")]),b(U,ke)},it=U=>{var ke=ps();D(()=>me(ke,n(Q).text||"")),b(U,ke)};R(De,U=>{f()&&n(Q).completed===!1?U(Be):U(it,!1)})}b(j,ie)};R(pe,j=>{n(Q)&&j(A)})}w(Ne);var We=L(Ne,2);{var Te=j=>{var ie=Uw(),De=T(ie,!0);w(ie),D(()=>me(De,d())),b(j,ie)};R(We,j=>{f()||j(Te)})}w(ne),D(j=>{_e=se(ne,1,"timeline-preview s-j",null,_e,j),Qe(ne,`width: ${n(H)?n(C):n(S)}px;`)},[()=>({mobile:s()})]),b(t,ne),F(),o()}var Kw=M('<span class="time s-f"> </span>'),qw=M("<!> <!>",1),Qw={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 fe,Me,$t,At,ct;B(e,!0),q(t,Qw);let[i,o]=Re(),r=()=>x(X,"$interactiveEpisodes$",i),a=()=>x(k,"$duration$",i),l=()=>x(E,"$position$",i),d=()=>x(we,"$isInteractiveExpectation$",i),s=()=>x(Z,"$isInteractiveTime$",i),u=()=>x(xe,"$previewTrackActive",i),m=()=>x(Q,"$isLive$",i),p=()=>x(_e,"$disabledControls$",i),f=()=>x(z,"$isMobile",i),$=()=>x(H,"$isActiveLive$",i),y=()=>x(P,"$bufferedProgress$",i),_=g(e,"showTimeline",3,!1),S=g(e,"withEpisodes",3,!0),C=g(e,"ref",15,void 0),I=ve(),N=Vt(),P=I.state.bufferedProgress$,E=I.state.positionWithScrubbing$,k=I.state.duration$,Q=I.state.isLive$,H=I.state.isActiveLive$,z=I.ui.isMobile,Y=N.features.episodes&&S()?I.actions.internal.getVideoEpisodes():void 0,le=I.actions.internal.getPreviewThumbsData(),X=I.state.interactiveEpisodes$,re=I.state.isInteractive,Z=I.state.isInteractiveTime$,we=I.state.isInteractiveExpectation$,ue=I.actions.internal.correctSeekTimeToInteractive,ne=(fe=I.callbacks)==null?void 0:fe.onDisabledTimelineClick,_e=I.ui.controls.disabledControls$,xe=I.ui.previewTrackActive,J=($t=(Me=I.callbacks)==null?void 0:Me.uiInfo)==null?void 0:$t.onTimelineMouseEnter,Ne=(ct=(At=I.callbacks)==null?void 0:At.uiInfo)==null?void 0:ct.onTimelineMouseLeave,pe=I.ui.t,A=N.features.interactiveResponsiveUi,We=v(()=>re?r():Y),Te=v(()=>Xo(a())),j=v(()=>Xo(l())),ie=v(()=>l()/a()),De=v(()=>d()||s()),Be=K(!1),it=K(""),U=K(0),ke=K(0),Pe=K(0),Ue=v(()=>({containerWidth:n(ke),translateXPx:n(U),translateYPx:re&&le?-36:-16,active:n(Be)&&_()&&!n(De)&&!A&&!u(),pointer:!N.features.timelinePreview||!le||m()})),Ze=pe("aria_timeline"),ye=v(()=>pe("aria_timeline_value",{position:n(j),duration:n(Te)}));function Ae(ce){return!ue||!re?ce:ue(ce*a())/a()}function Fe(ce,ze){var Ge;(Ge=e.onSliderPointerDown)==null||Ge.call(e,ze),I.actions.internal.startScrubbing(Ae(ce))}function Dt(ce){s()||I.actions.internal.progressScrubbing(Ae(ce))}function pt(ce){var ze;I.actions.internal.completeScrubbing(Ae(ce)),O(Be,!1),(ze=e.onSliderPointerUp)==null||ze.call(e)}function Bt(ce,ze,Ge){var at;(at=e.onSliderPointerEnter)==null||at.call(e,ce),ti(ce,ze,Ge),O(Be,!0)}function st(ce,ze,Ge,at){var Ft;(Ft=e.onSliderMove)==null||Ft.call(e,at,ce),ti(ce,ze,Ge),O(Be,!0)}function St(){var ce;O(Be,!1),(ce=e.onSliderLeave)==null||ce.call(e)}function ti(ce,ze,Ge){O(Pe,Ae(ce),!0),O(U,ze,!0),Ge&&O(ke,Ge,!0),O(it,Rt(ce),!0)}function Rt(ce){let ze=Xo((m()?1-ce:ce)*a());return m()?`-${ze}`:ze}let $e=v(()=>p().has("TIMELINE"));var be=qw(),ee=de(be);Lm(ee,Ps(()=>n(Ue),{get leftOffset(){return e.tooltipLeftOffset},get rightOffset(){return e.tooltipRightOffset},children:(ce,ze)=>{var Ge=Le(),at=de(Ge);{var Ft=oi=>{Mm(oi,{get time(){return n(it)},get isMobile(){return f()},get videoEpisodes(){return n(We)},get previewThumbsData(){return le},get progress(){return n(Pe)},get duration(){return a()},get isInteractive(){return re}})},Ht=oi=>{var yi=Kw(),ji=T(yi,!0);w(yi),D(()=>me(ji,n(it))),b(oi,yi)};R(at,oi=>{N.features.timelinePreview&&le&&!m()?oi(Ft):oi(Ht,!1)})}b(ce,Ge)},$$slots:{default:!0}}));var ot=L(ee,2);Ha(ot,{className:"timeline-slider",get isActiveLive(){return $()},get isMobile(){return f()},get ariaLabel(){return Ze},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:Fe,onHandleMove:Dt,onPointerMove:st,onPointerUp:pt,onPointerEnter:Bt,onPointerLeave:St,get onMouseEnter(){return J},get onMouseLeave(){return Ne},get onDisabledClick(){return ne},get isInteractive(){return re},get disabled(){return n($e)},get handleAlwaysVisible(){return u()},get hideHandel(){return s()},testId:"progress_bar",onContextMenu:pt,get ref(){return C()},set ref(ce){C(ce)}}),b(t,be),F(),o()}var Gw={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 uc(t,e){B(e,!0),q(t,Gw);let[i,o]=Re(),r=()=>x(s,"$isMobile",i),a=g(e,"position",3,0),l=g(e,"duration",3,0),d=ve(),s=d.ui.isMobile,u=d.ui.t,m=v(()=>Xo(l())),p=v(()=>Xo(a())),f=v(()=>a()/l()),$=v(()=>u("aria_timeline_value",{position:n(p),duration:n(m)})),y=v(()=>Math.round(n(f)*100));Ha(t,{className:"timeline-ads-slider",ariaValueMin:0,get ariaValueMax(){return l()},get ariaValueNow(){return n(y)},get ariaValueText(){return n($)},get filledProgress(){return n(f)},hideHandel:!0,get squareBorders(){return r()}}),F(),o()}var Yw=M("<div><!></div>"),jw=M("<div></div>"),Xw={hash:"s-b",code:".timeline.s-b{align-items:center;bottom:0;box-sizing:border-box;display:flex;min-width:86px;pointer-events:all;position:relative;width:100%}.timeline.mobile.s-b{height:16px;margin-top:6px;padding:6px 12px 7px}.withoutPadding.s-b{padding:0}.timeline-stub.s-b{min-width:20px;width:100%}.timeline-stub.mobile.s-b{height:8px}"};function Ka(t,e){B(e,!0),q(t,Xw);let[i,o]=Re(),r=()=>x(S,"$isLive$",i),a=()=>x(N,"$isMobile",i),l=()=>x(P,"$disabled",i),d=()=>x(I,"$adPosition",i),s=()=>x(C,"$adDuration",i),u=g(e,"isAds",3,!1),m=g(e,"isHidden",3,!1),p=g(e,"timelineNotAvailable",3,!1),f=g(e,"needPadding",3,!0),$=g(e,"ref",15,void 0),y=ve(),_=Vt(),S=y.state.isLive$,C=y.ads.duration,I=y.ads.position,N=y.ui.isMobile,P=ae(!1),E=v(()=>!p()&&(!r()||r()&&e.canRewindLive&&e.isRewindableLive||u()));var k=Le(),Q=de(k);{var H=Y=>{var le=Yw();let X;var re=T(le);{var Z=ue=>{uc(ue,{get position(){return d()},get duration(){return s()}})},we=ue=>{Vm(ue,{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(ne){$(ne)}})};R(re,ue=>{u()?ue(Z):ue(we,!1)})}w(le),Es(le,()=>Rl(m()&&_.features.usePerformanceFix,P,_.disableInvisibleComponentsTimeout)),D(ue=>X=se(le,1,"timeline s-b",null,X,ue),[()=>({withoutPadding:!f(),mobile:a(),"out-of-flow":l()})]),b(Y,le)},z=Y=>{var le=jw();let X;D(re=>X=se(le,1,"timeline-stub s-b",null,X,re),[()=>({mobile:a()})]),b(Y,le)};R(Q,Y=>{n(E)?Y(H):Y(z,!1)})}b(t,k),F(),o()}import{getRangeAroundIndex as Zw}from"@vkontakte/videoplayer-shared/es2015";var Jw=(t,e,i,o,r,a,l)=>{O(e,!0),O(i,t.clientX,!0),O(o,n(r),!0),a(l())},eS=M("<div></div>"),tS=M('<div><div class="track s-2d"></div></div>'),iS={hash:"s-2d",code:'.root.s-2d{display:flex;height:var(--preview-track-frame-height-horizontal);overflow:hidden;position:relative;width:100%}.root.is-vertical-video.s-2d,.root.vertically-rotated.s-2d{height:var(--preview-track-frame-height-vertical)}.root.s-2d: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-2d{bottom:0;display:flex;left:0;padding:0 50%;top:0}.frame.s-2d,.track.s-2d{position:absolute}.frame.s-2d{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-2d .frame:where(.s-2d){transform-origin:0 0}.rotate-1.s-2d{transform:rotate(-90deg) translateX(-100%)}.rotate-2.s-2d{transform:rotate(-180deg)}.rotate-3.s-2d{transform:rotate(-270deg) translateY(-100%)}'};function Nm(t,e){B(e,!0),q(t,iS);let[i,o]=Re(),r=()=>x(N,"$rotateAlpha",i),a=()=>x(_,"$position$",i),l=()=>x(y,"$duration$",i),d=ve(),{countPerImage:s=0,countPerRow:u=0,countTotal:m=0,links:p=[],frameHeight:f=0,frameWidth:$=0}=d.actions.internal.getPreviewThumbsData()||{},{duration$:y,positionWithScrubbing$:_}=d.state,{startScrubbing:S,progressScrubbing:C,completeScrubbing:I}=d.actions.internal,N=d.ui.rotateAlpha,P=K(void 0),E=K(!1),k=K(0),Q=K(0),H=K(0),z=K(0),Y=v(()=>f<=$),le=v(()=>zl(r())),X=v(()=>n(Y)?!n(le):n(le)),re=114,Z=65,we=3,ue=v(()=>n(X)?re:Z),ne=v(()=>n(Y)?re:Z),_e=v(()=>n(Y)?"var(--preview-track-frame-height-horizontal)":"var(--preview-track-frame-height-vertical)"),xe=v(()=>m*n(ue)),J=K(0);Oe(()=>{O(z,Math.ceil(-n(H)/n(ue))-1),O(H,-n(xe)*a()/l())});let Ne=()=>{I(pe(),!0)},pe=()=>l()*-n(H)/n(xe)/l(),A=!1,We=ye=>{if(!n(E))return!1;let Ae=ye.clientX-n(k);O(H,n(Q)+Ae),O(H,Math.max(Math.min(n(H),0),-n(xe)),!0),Math.abs(Ae)>1&&(A=!0),C(pe())},Te=ye=>{n(E)&&(O(E,!1),!A&&ye&&O(H,-(ye.offsetX-n(J)/2)),A=!1,Ne())},j=()=>{n(E)&&Te()},ie=v(()=>s/u),De=(ye,Ae)=>{if(ye!==p.length-1)return u;let Fe=0,Dt=Ae*u;for(let pt=1;pt<=u;pt++)ye*s+Fe+Dt<m&&Fe++;return Fe},Be=v(()=>Math.floor(n(z)/s)),it=v(()=>Zw(3,n(Be),p.length-1)),U=(ye,Ae,Fe)=>{let Dt=s*n(ue);return ye*Dt+Ae*n(ue)*u+n(J)/2-we/2+Fe*n(ue)},ke=v(()=>[`--row-numbers: ${n(ie)}`,`--column-numbers: ${u}`,`--frame-width: ${n(ne)}px`,`--frame-height: ${n(_e)}`].join(";"));var Pe=tS();let Ue;var Ze=T(Pe);Ze.__pointerdown=[Jw,E,k,Q,H,S,pe],Ze.__pointermove=We,Ze.__pointerup=Te,wi(Ze,20,()=>n(it),ye=>ye,(ye,Ae)=>{var Fe=Le(),Dt=de(Fe);wi(Dt,16,()=>Array.from({length:n(ie)},(pt,Bt)=>Bt),pt=>pt,(pt,Bt)=>{var st=Le(),St=de(st);wi(St,16,()=>Array.from({length:De(Ae,Bt)},(ti,Rt)=>Rt),ti=>ti,(ti,Rt)=>{var $e=eS();D((be,ee)=>{Qe($e,be),se($e,1,ee,"s-2d")},[()=>`--row-index: ${Bt}; --column-index: ${Rt}; left: ${U(Ae,Bt,Rt)}px; background-image: url(${p[Ae]});`,()=>`frame rotate-${Math.abs(r())/90%4}`]),b(ti,$e)}),b(pt,st)}),b(ye,Fe)}),w(Ze),w(Pe),je(Pe,ye=>O(P,ye),()=>n(P)),D(ye=>{Ue=se(Pe,1,"root s-2d",null,Ue,ye),Qe(Pe,n(ke)),Qe(Ze,`transform: translateX(${n(H)}px); width: ${n(xe)}px;`)},[()=>({"is-vertical-video":!n(Y),"vertically-rotated":n(le)})]),gt("mouseleave",Ze,j),En(Pe,"clientWidth",ye=>O(J,ye)),b(t,Pe),F(),o()}tt(["pointerdown","pointermove","pointerup"]);var oS=M('<div class="notification s-2b"><span class="description s-2b"> </span></div>'),nS={hash:"s-2b",code:".notification.s-2b{background:var(--notification-bg);border-radius:var(--notification-radius);padding:9px 14px 10px 12px}.description.s-2b{font-size:14px;line-height:18px}"};function Om(t,e){B(e,!1),q(t,nS);let i=340,{ui:{t:o}}=ve();xo();var r=oS(),a=T(r),l=T(a,!0);w(a),w(r),D(d=>me(l,d),[()=>o("preview_track_close_tooltip")],wn),Xr(3,r,()=>_s,()=>({duration:i})),b(t,r),F()}import{getRangeAroundIndex as rS}from"@vkontakte/videoplayer-shared/es2015";var sS=M('<div class="preview-track-close tooltip s-29"><!></div>'),aS=M('<div class="preview-track-control s-29"><!> <div class="preview-track-close s-29"><!></div> <!></div>'),lS=M('<div class="wrapper-preview-track s-29"><!></div>'),dS=M('<div class="enriched-timeline s-29"><!> <!> <!></div>'),cS={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 Dm(t,e){B(e,!0),q(t,cS);let[i,o]=Re(),r=()=>x(_,"$playerSize",i),a=()=>x(y,"$duration$",i),l=()=>x(S,"$previewTrackActive",i),d=()=>x(f,"$position$",i),s=()=>x($,"$isRewindableLive$",i),u=g(e,"timelineRef",15,void 0),m=ve(),p=200,{positionWithScrubbing$:f,isRewindableLive$:$,duration$:y}=m.state,{playerSize:_,previewTrackActive:S}=m.ui,{countPerImage:C=0,links:I=[],frequency:N=0}=m.actions.internal.getPreviewThumbsData()||{},P=v(()=>r().width>100),E=K(!v_()),k=()=>{n(E)&&(m_(),O(E,!1))},Q=ue=>{let ne=Math.floor(a()*ue/N),_e=Math.floor(ne/C),xe=rS(3,_e,I.length-1);for(let J of xe){let Ne=new Image;Ne.src=I[J]}},H=(ue,ne)=>{Q(ne),!l()&&e.onTimelineMove(ue)};var z=dS(),Y=T(z);{var le=ue=>{var ne=aS(),_e=T(ne);let xe=v(()=>Xo(d()));km(_e,{get time(){return n(xe)}});var J=L(_e,2),Ne=T(J);ks(Ne,{onClick:()=>m.actions.internal.closePreviewTrack()}),w(J);var pe=L(J,2);{var A=We=>{var Te=sS(),j=T(Te);Om(j,{}),w(Te),b(We,Te)};R(pe,We=>{n(E)&&We(A)})}w(ne),gt("mouseleave",J,k),Xr(3,ne,()=>_s,()=>({duration:p})),b(ue,ne)};R(Y,ue=>{l()&&ue(le)})}var X=L(Y,2);let re=v(()=>!n(P));Ka(X,{get isHidden(){return n(re)},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:Q,get ref(){return u()},set ref(ue){u(ue)}});var Z=L(X,2);{var we=ue=>{var ne=lS(),_e=T(ne);Nm(_e,{}),w(ne),D(()=>Qe(ne,`height: ${e.animatedPreviewTrackHeight}px;`)),b(ue,ne)};R(Z,ue=>{e.previewTrackAvailable&&ue(we)})}w(z),D(()=>Qe(z,`transform: translateY(${e.animatedOffsetY}px);`)),b(t,z),F(),o()}var pS=M('<div><!> <div class="controls s-1f" data-testid="player_controls"><div class="controls-left s-1f"><!> <!> <!></div> <div class="controls-right s-1f"></div></div></div> <!>',1),fS={hash:"s-1f",code:'.wrapper-bottom.s-1f{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-1f:before{background:var(--controls-gradient);content:"";height:var(--controls-gradient-height);position:absolute;width:100%}.wrapper-bottom.s-1f>:where(.s-1f){pointer-events:auto}.controls.s-1f{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-1f,.controls-right.s-1f{align-content:center;display:flex}.controls-left.s-1f{flex-grow:1;min-width:0;overflow:hidden}.controls-left.s-1f >:not(:first-child),.controls-right.s-1f >*{margin-left:var(--controls-desktop-item-margin-left)}.controls-hidden.s-1f{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-1f{transition:none}'};function Fm(t,e){var pa,Er;B(e,!0),q(t,fS);let[i,o]=Re(),r=()=>x(So,"$disabledControls$",i),a=()=>x(nt,"$adPlaybackState",i),l=()=>x(Ht,"$playbackState$",i),d=()=>x(bo,"$currentSubtitle$",i),s=()=>x(ji,"$isEnded$",i),u=()=>x(Zo,"$currentGridType$",i),m=()=>x(Nt,"$isLive$",i),p=()=>x(Ke,"$chromecastState$",i),f=()=>x(ht,"$isPictureInPictureActive",i),$=()=>x(Xt,"$pictureInPictureType$",i),y=()=>x(Ti,"$availableSubtitlesList$",i),_=()=>x(Ut,"$contextMenuOpenedByKeyboard$",i),S=()=>x(Tt,"$showContextMenuBtn$",i),C=()=>x(hi,"$isRewindableLive$",i),I=()=>x(fi,"$isActiveLive$",i),N=()=>x(ts,"$graphIsOpened$",i),P=()=>x(gn,"$contextMenuVisible$",i),E=()=>x(Fi,"$isFullscreen",i),k=()=>x(Ui,"$autoplayNextEnabled",i),Q=()=>x(n(Ji),"$prevButton",i),H=()=>x(n(Mi),"$replayButton",i),z=()=>x(n(bn),"$playButton",i),Y=()=>x(n(yo),"$nextButton",i),le=()=>x(n(Un),"$playPrevChapterButton",i),X=()=>x(n(mi),"$seekToInteractiveButton",i),re=()=>x(n(Ur),"$interactiveGraphButton",i),Z=()=>x(n(ar),"$liveButton",i),we=()=>x(n(is),"$time",i),ue=()=>x(n(os),"$episodes",i),ne=()=>x(n(zr),"$vkLogo",i),_e=()=>x(n(Po),"$volume",i),xe=()=>x(n(nn),"$subtitles",i),J=()=>x(n(co),"$settings",i),Ne=()=>x(n(Cr),"$context",i),pe=()=>x(n(Fo),"$fullscreen",i),A=()=>x(n(ns),"$chromecast",i),We=()=>x(To,"$additionalDesktopControlPanelRightButtons$",i),Te=()=>x(Hi,"$playerSize",i),j=()=>x(Jo,"$isInteractiveTime$",i),ie=()=>x(ei,"$previewTrackActive",i),De=()=>x(Si,"$settingsMenuVisible",i),Be=()=>x(uo,"$settingButtonRef$",i),it=()=>x(W,"$startedByKeyboard$",i),U=()=>x(oi,"$isAudioAvailable$",i),ke=()=>x(be,"$fakeIsPlaying$",i),Pe=()=>x(bs,"$seekToInteractiveDisabledTooltip$",i),Ue=()=>x(xt,"$isPreviewTrackHorizontallyAligned$",i),Ze=()=>x(he,"$previewTrackAvailable",i),ye=()=>x(fo,"$previewTrackDragInProgress",i),Ae=()=>x(Yt,"$adPosition",i),Fe=()=>x(Ft,"$position$",i),Dt=()=>x(wt,"$adDuration",i),pt=()=>x(at,"$duration$",i),Bt=g(e,"playerControlsWrapperRef",15,void 0),st=g(e,"playerControlsRef",15,void 0),St=g(e,"isAds",3,!1),ti=g(e,"logoTargetUrl",3,""),Rt=g(e,"isOneVideoPlaylist",3,!1),$e=g(e,"customFullscreenSupported",3,!0),{fakeIsPlaying$:be}=wo(),ee=ve(),ot=wo(),fe=Vt(),Me=ee.actions.internal.toggleMuted,$t=ee.actions.internal.togglePlay,At=ee.actions.internal.pause,ct=ee.actions.internal.toggleSubtitle,ce=ee.actions.internal.checkFullscreenSupport,ze=(pa=ee.callbacks)==null?void 0:pa.onAudioDoesNotExistHint,Ge=(Er=ee.callbacks)==null?void 0:Er.onAudioDisabledHint,at=ee.state.duration$,Ft=ee.state.positionWithScrubbing$,Ht=ee.state.playbackState$,oi=ee.state.isAudioAvailable$,yi=ee.state.isAudioDisabled,ji=ee.state.isEnded$,Nt=ee.state.isLive$,fi=ee.state.isActiveLive$,hi=ee.state.isRewindableLive$,{isActive$:ht,type$:Xt}=ot.pictureInPicture$,Si=ee.ui.settingsMenu.visible$,Xi=ee.ui.settingsMenu.openedByBtnKeyboard$,Jt=ee.ui.controls,Et=ee.actions.internal.getVideoEpisodes(),Ke=ee.state.chromecastState$,Ti=ee.state.availableSubtitlesList$,bo=ee.state.currentSubtitle$,So=Jt.disabledControls$,gn=ee.ui.contextMenu.visible$,Tt=ee.ui.contextMenu.showContextMenuBtn$,Ut=ee.ui.contextMenu.openedByBtnKeyboard$,W=ee.ui.startedByKeyboard$,kt=ee.ui.controlBlocks,di=ee.ui.previewTrackNotificationVisible,lt=ee.ui.t,wt=ee.ads.duration,Yt=ee.ads.position,nt=ee.ads.playbackState,Fi=ee.ui.isFullscreen,Hi=ee.ui.playerSize,Zo=ee.ui.currentGridType$,To=ee.ui.additionalDesktopControlPanelRightButtons$,Ui=ee.ui.autoplayNextEnabled$,Zi=ee.actions.internal.getVideoElement,Rr=ee.actions.internal.replayInteractive,$o=ee.actions.internal.prevVideoClick,ro=ee.actions.internal.nextVideoClick,Ai=ee.state.isInteractive,Jo=ee.state.isInteractiveTime$,en=ee.state.showInteractiveGraph,Ln=ee.state.showSeekToInteractive,er=ee.state.showPlayPrevChapter,Nr=ee.state.showInteractiveTimeIndicator,es=ee.state.playPrevChapterDisabledTooltip,bs=ot.seekToInteractiveDisabledTooltip$,ts=ot.graphIsOpened$,tr=fe.features.interactiveResponsiveUi,yr=v(()=>r().has("EPISODE_BUTTON")),hn=v(()=>r().has("GRAPH_BUTTON")),Mn=v(()=>r().has("SEEK_TO_INTERACTIVE_BUTTON")),Do=v(()=>r().has("PLAY_BUTTON")),Vn=v(()=>r().has("REPLAY_BUTTON")),ir=v(()=>r().has("PLAY_PREV_CHAPTER_BUTTON")),xr=()=>ee.actions.internal.toggleChromecast(),wr=v(()=>St()?a()==="playing":l()===Bm.PLAYING),Or=v(()=>d().value!=="off"),so=v(()=>s()&&!St()||Ai),Dr=v(()=>tr?n(so)&&oo(u(),"m"):n(so)),Rn=v(()=>!s()||Ai||St()),Nn=v(()=>oo(u(),"m")),ao=v(()=>e.showNextPrevButtons&&oo(u(),"m")&&!St()&&e.nextButtonActive),Br=v(()=>e.showNextPrevButtons&&oo(u(),"m")&&!St()&&e.prevButtonActive),On=v(()=>!St()&&!!m()),ft=v(()=>p()!==db.NOT_AVAILABLE&&!(f()&&$()===1)&&oo(u(),"m")&&!Ai),ui=v(()=>e.showAutoplayNext&&!Rt()&&oo(u(),"s")),Sr=v(()=>y().length>0&&oo(u(),"m")),or=v(()=>_()||S()),nr=v(()=>oo(u(),"s")&&!St()),tn=v(()=>!e.logoHidden&&!St()),Tr=v(()=>fe.features.fullscreen&&ce()&&(e.logoHidden||oo(u(),tr?"xs":"s"))&&!(f()&&$()===1)&&(Ai?$e():!0)),on=v(()=>(!m()||St())&&!(fe.features.interactiveHideTime&&Ai)),_n=v(()=>en&&oo(u(),"m")),Dn=v(()=>tr?Ln&&oo(u(),"s"):Ln),Bn=v(()=>tr?er&&oo(u(),"s"):er),Bo=v(()=>!St()&&!m()&&!!(Et!=null&&Et.length)&&n(Nn)&&!n(yr)),Co=v(()=>!C()||!!I()),rr=v(()=>N()?lt("tooltip_interactive_graph_on"):lt("tooltip_interactive_graph_off")),Io=v(()=>P()?lt("tooltip_context_menu_close"):lt("tooltip_context_menu_open")),zi=(rt,ut)=>rt?ut&&ut===Bm.PAUSED?lt("tooltip_play"):"":lt("tooltip_live"),Fn=v(()=>zi(n(Co),l())),sr=v(()=>fe.logoType==="vk_video"?lt("tooltip_vk_video_logo"):lt("tooltip_vk_logo")),Fr=v(()=>n(Or)?lt("tooltip_subtitles_on"):lt("tooltip_subtitles_off")),Hn=v(()=>E()?lt("tooltip_fullscreen_on"):lt("tooltip_fullscreen_off")),Eo=v(()=>p()===db.CONNECTED?lt("tooltip_chromecast_on"):lt("tooltip_chromecast_off")),Hr=v(()=>k()?lt("tooltip_autoplay_on"):lt("tooltip_autoplay_off")),yt=K(0),Ct=ci({}),lo=ci({}),Ji=v(()=>Jt.prevButton),Mi=v(()=>Jt.replayButton),bn=v(()=>Jt.playButton),yo=v(()=>Jt.nextButton),Un=v(()=>Jt.playPrevChapterButton),mi=v(()=>Jt.seekToInteractiveButton),Ur=v(()=>Jt.interactiveGraphButton),ar=v(()=>Jt.liveButton),is=v(()=>Jt.time),os=v(()=>Jt.episodes),zr=v(()=>Jt.vkLogo),Po=v(()=>Jt.volume),nn=v(()=>Jt.subtitles),co=v(()=>Jt.settings),Cr=v(()=>Jt.context),Fo=v(()=>Jt.fullscreen),ns=v(()=>Jt.chromecast),qe=v(()=>({prevButton:Q()?Q().right-Q().left:0,replayButton:H()?H().right-H().left:0,playButton:z()?z().right-z().left:0,nextButton:Y()?Y().right-Y().left:0,playPrevChapterButton:le()?le().right-le().left:0,seekToInteractiveButton:X()?X().right-X().left:0,interactiveGraphButton:re()?re().right-re().left:0,liveButton:Z()?Z().right-Z().left:0,time:we()?we().right-we().left:0,episodes:ue()?ue().right-ue().left:0,vkLogo:ne()?ne().right-ne().left:0,volume:_e()?_e().right-_e().left:0,subtitles:xe()?xe().right-xe().left:0,settings:J()?J().right-J().left:0,context:Ne()?Ne().right-Ne().left:0,fullscreen:pe()?pe().right-pe().left:0,chromecast:A()?A().right-A().left:0,additionalButtons:We().length?We().reduce(rt=>[...rt,40],[]):[]})),Lt=K(0);Oe(()=>{(!n(Lt)||n(Lt)<n(qe).time)&&It(()=>O(Lt,n(qe).time,!0))});let bi=K(!1);Oe(()=>{let rt=0;n(Bo)&&(oo(u(),"xl")?rt=n(qe).time:rt=60);let ut=n(qe).prevButton+n(qe).playButton+n(qe).nextButton+n(qe).seekToInteractiveButton+n(qe).interactiveGraphButton+n(qe).liveButton+n(Lt)+rt;O(bi,n(on)&&n(yt)>=ut,!0)});let Ao=v(()=>n(bi)&&oo(u(),"m")),ko=cb(ql,260),Ho=cb(Ju,260);Oe(()=>{Te(),j(),ie(),ko(Zi(),Jt,Ct,e.showControls),Ho(Zi(),kt,lo,e.showControls)}),Oe(()=>{lo.bottom=Bt()});let uo=ae();Oe(()=>{De(),Be()&&It(()=>Ol(Be(),De(),Xi))});let eo;Oe(()=>{it(),It(()=>Xu(W,it(),eo))});function $n(){ra({isAudioDisabled:yi,isAudioAvailable:U(),isAds:St(),audioIsNotExistHintCallback:ze,audioDisabledHintCallback:Ge})&&Me()}let yn=Ai?Rr:$t,po=v(()=>ke()!==null),Lo=v(()=>n(po)?ke():n(wr)),zn=v(()=>n(Lo)?lt("tooltip_pause"):lt("tooltip_play")),lr=lt("tooltip_episodes"),dr=v(()=>{var rt,ut,Wi,Wo;return n(Br)?{id:"prevButton",type:"desktop-control-panel-left",weight:Rs.prevButton,buttonComponent:za,buttonComponentProps:{disabled:!e.prevButtonActive,type:"prev",click:$o.bind(null,!0)},tooltipEnabled:!((ut=(rt=ee.callbacks)==null?void 0:rt.uiInfo)!=null&&ut.onPrevButtonMouseEnter)&&!((Wo=(Wi=ee.callbacks)==null?void 0:Wi.uiInfo)!=null&&Wo.onPrevButtonMouseLeave),mouseEnter:()=>{var Ki,$i,Ri;(Ri=($i=(Ki=ee.callbacks)==null?void 0:Ki.uiInfo)==null?void 0:$i.onPrevButtonMouseEnter)==null||Ri.call($i,Zn(Zi(),Ct,"prevButton",e.showControls))},mouseLeave:()=>{var Ki,$i,Ri;(Ri=($i=(Ki=ee.callbacks)==null?void 0:Ki.uiInfo)==null?void 0:$i.onPrevButtonMouseLeave)==null||Ri.call($i,Zn(Zi(),Ct,"prevButton",e.showControls))},tooltipText:lt("tooltip_previous"),disabled:!e.prevButtonActive}:void 0}),Wn=v(()=>n(Dr)?{id:"replayButton",type:"desktop-control-panel-left",weight:Rs.replayButton,buttonComponent:Ql,buttonComponentProps:{disabled:n(Vn),click:yn},tooltipText:lt("tooltip_restart"),disabled:n(Vn)}:void 0),$s=v(()=>n(Rn)?{id:"playButton",type:"desktop-control-panel-left",weight:Rs.playButton,buttonComponent:Gl,buttonComponentProps:{disabled:n(Do),isPlaying:n(wr),click:$t},tooltipText:n(zn),disabled:n(Do)}:void 0),rs=v(()=>{var rt,ut,Wi,Wo;return n(ao)?{id:"nextButton",type:"desktop-control-panel-left",weight:Rs.nextButton,buttonComponent:za,buttonComponentProps:{disabled:!e.nextButtonActive,type:"next",click:ro.bind(null,!0)},tooltipEnabled:!((ut=(rt=ee.callbacks)==null?void 0:rt.uiInfo)!=null&&ut.onNextButtonMouseEnter)&&!((Wo=(Wi=ee.callbacks)==null?void 0:Wi.uiInfo)!=null&&Wo.onNextButtonMouseLeave),mouseEnter:()=>{var Ki,$i,Ri;(Ri=($i=(Ki=ee.callbacks)==null?void 0:Ki.uiInfo)==null?void 0:$i.onNextButtonMouseEnter)==null||Ri.call($i,Zn(Zi(),Ct,"nextButton",e.showControls))},mouseLeave:()=>{var Ki,$i,Ri;(Ri=($i=(Ki=ee.callbacks)==null?void 0:Ki.uiInfo)==null?void 0:$i.onNextButtonMouseLeave)==null||Ri.call($i,Zn(Zi(),Ct,"nextButton",e.showControls))},tooltipText:lt("tooltip_next"),disabled:!e.nextButtonActive}:void 0}),Ye=v(()=>Ai&&n(Bn)?{id:"playPrevChapterButton",type:"desktop-control-panel-left",weight:Rs.playPrevChapterButton,buttonComponent:sc,buttonComponentProps:{disabled:n(ir),click:e.playPrevChapter},tooltipText:lt("tooltip_interactive_go_back"),disabledTooltipContent:lt(es),disabled:n(ir)}:void 0),qt=v(()=>Ai&&n(Dn)?{id:"seekToInteractiveButton",type:"desktop-control-panel-left",weight:Rs.seekToInteractiveButton,buttonComponent:lc,buttonComponentProps:{disabled:n(Mn),click:e.seekToInteractive},tooltipText:lt("tooltip_interactive_seek"),disabled:n(Mn),disabledTooltipContent:lt(Pe())}:void 0),Ii=v(()=>Ai&&n(_n)?{id:"interactiveGraphButton",type:"desktop-control-panel-left",weight:Rs.interactiveGraphButton,buttonComponent:dc,buttonComponentProps:{disabled:n(hn),click:ts.toggle,graphIsOpened:N()},tooltipText:n(rr)}:void 0),Uo=v(()=>n(On)?{id:"liveButton",type:"desktop-control-panel-left",weight:Rs.liveButton,buttonComponent:cc,buttonComponentProps:{isLiveActive:n(Co),ariaLabel:n(Fn)},tooltipText:n(Fn),disabled:n(Co)&&l()===Bm.PLAYING}:void 0),rn=v(()=>[n(dr),n(Wn),n($s),n(rs),n(Ye),n(qt),n(Ii),n(Uo)].filter(rt=>!!rt).sort(Oa)),cr=v(()=>n(tn)?{id:"vkLogo",type:"desktop-control-panel-right",weight:Os.vkLogo,buttonComponent:Xd,buttonComponentProps:{targetUrl:ti(),logoClickable:e.logoClickable,click:At},tooltipText:n(sr),disabledTooltipContent:"",disabled:!e.logoClickable}:void 0),sn=v(()=>n(ui)?{id:"autoplayNext",type:"desktop-control-panel-right",weight:Os.autoplayNext,buttonComponent:ac,tooltipText:n(Hr)}:void 0),zo=v(()=>({id:"volume",type:"desktop-control-panel-right",weight:Os.volume,buttonComponent:um,buttonComponentProps:{click:$n,isAds:St()}})),Bs=v(()=>n(Sr)?{id:"subtitles",type:"desktop-control-panel-right",weight:Os.subtitles,buttonComponent:sm,buttonComponentProps:{isSubtitlesEnabled:n(Or),click:ct},tooltipText:n(Fr)}:void 0),an=v(()=>n(nr)?{id:"settings",type:"desktop-control-panel-right",weight:Os.settings,buttonComponent:Hl,buttonComponentProps:{ref$:uo},tooltipText:De()?void 0:lt("tooltip_settings_off")}:void 0),Fs=v(()=>fe.features.contextMenuButton?{id:"context",type:"desktop-control-panel-right",weight:Os.context,buttonComponent:Sm,buttonComponentProps:{ariaLabel:lt("aria_label_context_menu")},className:n(or)?"":"out-of-view",tooltipText:n(Io)}:void 0),da=v(()=>n(Tr)?{id:"fullscreen",type:"desktop-control-panel-right",weight:Os.fullscreen,buttonComponent:jd,buttonComponentProps:{isFullscreen:E(),click:e.toggleFullscreen},tooltipText:n(Hn)}:void 0),ca=v(()=>n(ft)?{id:"chromecast",type:"desktop-control-panel-right",weight:Os.chromecast,buttonComponent:Jd,buttonComponentProps:{state:p(),click:xr},tooltipText:n(Eo)}:void 0),dt=v(()=>[n(cr),n(sn),n(zo),n(Bs),n(an),n(Fs),n(da),n(ca),...We()].filter(rt=>!!rt).sort(Oa)),ei=ee.ui.previewTrackActive,fo=ee.ui.previewTrackDragInProgress,he=ee.ui.previewTrackAvailable,xt=ee.ui.isPreviewTrackHorizontallyAligned,ii=v(()=>ab({onPreviewTrackOpened:ee.actions.internal.previewTrackOpened,getTimelineRef:()=>Ct.timeline,isHorizontal:Ue()})),xi=v(()=>n(ii).progressBarY),Vi=v(()=>n(ii).controlsY),pi=v(()=>n(ii).onPointerDown),ni=v(()=>n(ii).onPointerMove),mo=v(()=>n(ii).onPointerUp),ln=v(()=>n(ii).calculatedHeight),dn=v(()=>n(ii).closePreviewTrack);Oe(()=>{ie()?di.set(!1):n(dn)()});let ki;Mt(()=>()=>ki&&clearTimeout(ki));let Zl=rt=>{ie()||!Ze()||(n(pi)(rt),ki=setTimeout(()=>{ee.actions.internal.previewTrackDragStarted()},200))},el=()=>{ie()||n(mo)(),ki&&clearTimeout(ki),ye()&&ee.actions.internal.previewTrackDragFinished()},Hs=rt=>{n(ni)(rt),!ie()&&Ze()&&!ie()&&di.set(!0)},tl=()=>{di.set(!1)};var il=pS(),Ir=de(il);let ua;var Us=T(Ir);{var Wr=rt=>{let ut=v(()=>n(xi)()),Wi=v(()=>n(ln)());Dm(rt,{get animatedOffsetY(){return n(ut)},get animatedPreviewTrackHeight(){return n(Wi)},get canRewindLive(){return e.canRewindLive},get isAds(){return St()},onTimelineMove:Hs,onTimelinePointerDown:Zl,onTimelinePointerUp:el,onTimelinePointerLeave:tl,get previewTrackAvailable(){return Ze()},get timelineRef(){return Ct.timeline},set timelineRef(Wo){Ct.timeline=Wo}})};R(Us,rt=>{e.showControls&&rt(Wr)})}var ss=L(Us,2),zs=T(ss),ur=T(zs);wi(ur,17,()=>n(rn),rt=>rt.id,(rt,ut)=>{Zu(rt,{get buttonComponent(){return n(ut).buttonComponent},get buttonComponentProps(){return n(ut).buttonComponentProps},get tooltipText(){return n(ut).tooltipText},get disabledTooltipContent(){return n(ut).disabledTooltipContent},get disabled(){return n(ut).disabled},get className(){return n(ut).className},get tooltipEnabled(){return n(ut).tooltipEnabled},get mouseEnter(){return n(ut).mouseEnter},get mouseLeave(){return n(ut).mouseLeave},get tooltipVisible(){return e.showControls},get ref(){return Ct[n(ut).id]},set ref(Wi){Ct[n(ut).id]=Wi}})});var ol=L(ur,2);{var nl=rt=>{let ut=v(()=>!e.showControls),Wi=v(()=>St()?Ae():Fe()),Wo=v(()=>St()?Dt():pt());Gd(rt,{get isHidden(){return n(ut)},isMobile:!1,get showDuration(){return n(Ao)},get position(){return n(Wi)},get duration(){return n(Wo)},get ref(){return Ct.time},set ref(Ki){Ct.time=Ki}})};R(ol,rt=>{n(on)&&rt(nl)})}var Jl=L(ol,2);let rl=v(()=>!n(Bo));Oo(Jl,{className:"w-max",get disabled(){return n(rl)},get tooltipContent(){return lr},get tooltipVisible(){return e.showControls},get ref(){return Ct.episodes},set ref(rt){Ct.episodes=rt},children:(rt,ut)=>{var Wi=Le(),Wo=de(Wi);{var Ki=$i=>{ec($i,{get position(){return Fe()},get duration(){return pt()},get timeCodes(){return Et}})};R(Wo,$i=>{n(Bo)&&$i(Ki)})}b(rt,Wi)},$$slots:{default:!0}}),w(zs);var sl=L(zs,2);wi(sl,21,()=>n(dt),rt=>rt.id,(rt,ut)=>{var Wi=Le(),Wo=de(Wi);{var Ki=Ri=>{Zu(Ri,{get buttonComponent(){return n(ut).buttonComponent},get buttonComponentProps(){return n(ut).buttonComponentProps},get tooltipText(){return n(ut).tooltipText},get disabledTooltipContent(){return n(ut).disabledTooltipContent},get disabled(){return n(ut).disabled},get className(){return n(ut).className},get tooltipVisible(){return e.showControls},get ref(){return Ct[n(ut).id]},set ref(fa){Ct[n(ut).id]=fa}})},$i=Ri=>{let fa=v(()=>!!n(ut).disabled);Em(Ri,{get id(){return n(ut).id},get testId(){return n(ut).testId},get icon(){return n(ut).icon},get ariaLabel(){return n(ut).ariaLabel},get tooltipText(){return n(ut).tooltipText},get disabledTooltipContent(){return n(ut).disabledTooltipContent},get disabled(){return n(fa)},get onClick(){return n(ut).onClick},get disableMouseupTooltipShow(){return n(ut).disableMouseupTooltipShow},get tooltipVisible(){return e.showControls},get ref(){return Ct[n(ut).id]},set ref(ll){Ct[n(ut).id]=ll}})};R(Wo,Ri=>{nb(n(ut))?Ri(Ki):Ri($i,!1)})}b(rt,Wi)}),w(sl),w(ss),je(ss,rt=>st(rt),()=>st()),w(Ir),je(Ir,rt=>Bt(rt),()=>Bt());var al=L(Ir,2);{var ed=rt=>{nc(rt,{get ref(){return Ct.interactiveTimeIndicator},set ref(ut){Ct.interactiveTimeIndicator=ut}})};R(al,rt=>{Nr&&rt(ed)})}D((rt,ut)=>{ua=se(Ir,1,"wrapper-bottom s-1f",null,ua,rt),Qe(ss,ut),ss.inert=ie()},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth||ye()}),()=>`transform: translateY(${n(Vi)()}px);`]),En(zs,"clientWidth",rt=>O(yt,rt)),b(t,il),F(),o()}import{ChromecastState as pb,PlaybackState as fb}from"@vkontakte/videoplayer-core/es2015";import{noop as ub}from"@vkontakte/videoplayer-shared/es2015";var mS=M('<div class="icon icon-error-stub s-1z"><div class="inner s-1z"></div></div>'),vS=M('<img class="icon s-1z" aria-hidden="true"/>'),gS={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 Hm(t,e){q(t,gS);let i=g(e,"disabled",3,!1),o=g(e,"onClick",3,ub),r=v(()=>o()===ub),a=v(()=>n(r)||i()),l=K(!1),d=()=>{O(l,!0)},s=v(()=>n(r)?"btn-full-opacity":"");Kt(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=Le(),f=de(p);{var $=_=>{var S=mS();b(_,S)},y=_=>{var S=vS();D(()=>Ve(S,"src",e.iconUrl)),gt("error",S,d),Ea(S),b(_,S)};R(f,_=>{n(l)?_($):_(y,!1)})}b(u,p)},$$slots:{default:!0}})}var hS=Ce('<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=hS();b(e,o)},$$slots:{default:!0}})}import{noop as _S}from"@vkontakte/videoplayer-shared/es2015";function ep(t,e){B(e,!0);let i=g(e,"muted",3,!1),o=g(e,"click",3,_S),r=g(e,"ref",15,void 0),l=ve().ui.t,d=v(()=>i()?l("tooltip_volume"):l("tooltip_volume_muted")),s=v(()=>i()?"btn-mobile-muted":"btn-mobile-unmuted");Kt(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=Le(),f=de(p);{var $=_=>{Um(_,{})},y=_=>{aa(_,{get size(){return"24"}})};R(f,_=>{i()?_($):_(y,!1)})}b(u,p)},$$slots:{default:!0}}),F()}var bS=Ce('<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>'),$S=Ce('<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>'),yS=Ce('<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=g(e,"isActive",3,!1),o=v(()=>i()?"pip-icon--active":"pip-icon");Xe(t,{get testId(){return n(o)},children:(r,a)=>{var l=yS(),d=L(de(l));{var s=m=>{var p=bS();b(m,p)},u=m=>{var p=$S();b(m,p)};R(d,m=>{i()?m(s):m(u,!1)})}b(r,l)},$$slots:{default:!0}})}import{noop as xS}from"@vkontakte/videoplayer-shared/es2015";function Wm(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"isPictureInPictureActive",3,!1),r=g(e,"click",3,xS),a=G("menu_pip");Kt(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}}),F()}import{debounceFn as mb}from"@vkontakte/videoplayer-shared/es2015";var wS=(t,e,i,o)=>{n(e)&&i.onDisabledPlayPrevChapterClick(n(o))},SS=(t,e,i,o)=>{n(e)&&i.onDisabledSeekToInteractiveClick(n(o))},TS=M("<div><!></div>"),CS=M("<div><!></div>"),IS=M("<div><!></div>"),ES=M("<!> <!> <!>",1),PS=M("<div></div> <div></div> <div><!> <!> <!> <!> <!> <!></div> <div><!> <!> <!> <!></div> <!>",1),AS=M('<div class="wrapper-middle s-1d"><!></div>'),kS=M("<div><!></div> <!> <div><!></div>",1),LS=M('<div aria-hidden="true">·</div> <!>',1),MS=M('<!> <!> <div><div><div class="controls mobile s-1d" data-testid="bottom-controls"><div class="controls-group contain s-1d"><!> <!> <!> <!></div> <div class="controls-group s-1d"><!> <!> <!></div></div> <!></div></div> <!>',1),VS={hash:"s-1d",code:".wrapper-bottom.s-1d{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-1d>:where(.s-1d){pointer-events:auto}.wrapper-bottom.ads-timeline-mobile.s-1d{height:9px;padding:0 4px 4px}.wrapper-middle.s-1d{align-items:center;left:50%;top:50%;transform:translate(-50%,-50%)}.wrapper-middle.s-1d,.wrapper-top-right.s-1d{display:flex;position:absolute;transition:opacity var(--controls-transition-duration);z-index:var(--controls-container-z-index)}.wrapper-top-right.s-1d{right:8px;top:4px}.wrapper-top-left.s-1d{left:8px;position:absolute;top:4px;z-index:var(--controls-container-z-index)}.wrapper-middle-left.s-1d,.wrapper-middle-left-second.s-1d,.wrapper-middle-right.s-1d{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-1d{left:12px}.wrapper-middle-left-second.s-1d{left:64px}.wrapper-middle-right.s-1d{right:12px}.controls.s-1d{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-1d,.controls-group.s-1d{display:flex}.controls-group.contain.s-1d{min-width:0}.controls-group.s-1d >:not(:first-child){margin-left:8px}.hidden.s-1d{opacity:0;visibility:hidden}.controls-hidden.s-1d{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-1d{transition:none}.overlay-mobile.s-1d{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-1d,.wrapper-top-right.fullscreen.s-1d{top:16px}.controls-wrapper.fullscreen.s-1d{bottom:30px;position:absolute;width:calc(100% - 8px)}}@media screen and (orientation:landscape){.wrapper-top-left.fullscreen.s-1d{left:44px;top:12px}.wrapper-top-right.fullscreen.s-1d{right:44px;top:12px}.wrapper-middle-left.fullscreen.s-1d{left:44px}.wrapper-middle-left-second.fullscreen.s-1d{left:96px}.wrapper-middle-right.fullscreen.s-1d{right:44px}.controls-wrapper.fullscreen.s-1d{bottom:32px;left:36px;position:absolute;right:36px;width:calc(100% - 72px)}}"};function Km(t,e){var Fo,ns;B(e,!0),q(t,VS);let[i,o]=Re(),r=()=>x(Hi,"$seekToInteractiveDisabledTooltip$",i),a=()=>x(Jt,"$disabledControls$",i),l=()=>x(Rt,"$playbackState$",i),d=()=>x(So,"$adPlaybackState",i),s=()=>x(ee,"$isEnded$",i),u=()=>x(Tt,"$playerSize",i),m=()=>x(ct,"$scrubbingInProgress",i),p=()=>x(Si,"$chromecastState$",i),f=()=>x(ze,"$isPictureInPictureActive",i),$=()=>x(Ge,"$pictureInPictureType$",i),y=()=>x(ce,"$mobileNotReportControlHidden$",i),_=()=>x(hi,"$chromecastHidden",i),S=()=>x(st,"$playerPhase",i),C=()=>x(Nt,"$pipHidden",i),I=()=>x(Ke,"$currentGridType$",i),N=()=>x(yi,"$vkLogoHidden",i),P=()=>x(oi,"$volumeHidden",i),E=()=>x(ot,"$isLive$",i),k=()=>x(at,"$settingsMenuVisible",i),Q=()=>x(At,"$isRewindableLive$",i),H=()=>x($t,"$isActiveLive$",i),z=()=>x($e,"$isAudioAvailable$",i),Y=()=>x(Me,"$muted$",i),le=()=>x(fe,"$volume$",i),X=()=>x(lt,"$isInteractiveTime$",i),re=()=>x(Dn,"$settingButtonRef$",i),Z=()=>x(Et,"$startedByKeyboard$",i),we=()=>x(gn,"$isFullscreen",i),ue=()=>x(Ut,"$additionalButtons$",i),ne=()=>x(ji,"$autoplayNextToggleHidden",i),_e=()=>x(Xi,"$crashed$",i),xe=()=>x(fi,"$settingsHidden",i),J=()=>x(Zo,"$graphIsOpened$",i),Ne=()=>x(bo,"$adPosition",i),pe=()=>x(Ti,"$adDuration",i),A=()=>x(ti,"$position$",i),We=()=>x(St,"$duration$",i),Te=g(e,"playerControlsWrapperRef",15,void 0),j=g(e,"playerControlsRef",15,void 0),ie=g(e,"isAds",3,!1),De=g(e,"logoTargetUrl",3,""),Be=g(e,"isOneVideoPlaylist",3,!1),it=g(e,"customFullscreenSupported",3,!0),U=ve(),ke=wo(),Pe=Vt(),Ue=U.actions.internal.toggleMuted,Ze=U.actions.internal.togglePlay,ye=U.actions.internal.pause,Ae=U.actions.internal.prevVideoClick,Fe=U.actions.internal.nextVideoClick,Dt=U.actions.internal.checkFullscreenSupport,pt=(Fo=U.callbacks)==null?void 0:Fo.onAudioDoesNotExistHint,Bt=(ns=U.callbacks)==null?void 0:ns.onAudioDisabledHint,st=U.playerPhase,St=U.state.duration$,ti=U.state.positionWithScrubbing$,Rt=U.state.playbackState$,$e=U.state.isAudioAvailable$,be=U.state.isAudioDisabled,ee=U.state.isEnded$,ot=U.state.isLive$,fe=U.state.volume$,Me=U.state.muted$,$t=U.state.isActiveLive$,At=U.state.isRewindableLive$,ct=U.ui.scrubbingInProgress,ce=U.ui.mobileNotReportControlHidden$,{isActive$:ze,type$:Ge}=ke.pictureInPicture$,at=U.ui.settingsMenu.visible$,Ft=U.ui.settingsMenu.openedByBtnKeyboard$,Ht=U.ui.controls,{volume:oi,vkLogo:yi,autoplayNextToggle:ji,pip:Nt,settings:fi,chromecast:hi}=U.ui.hiddenControls,ht=U.actions.internal.getVideoEpisodes(),Xt=U.webApi.pictureInPictureApi,Si=U.state.chromecastState$,Xi=U.state.crashed$,Jt=Ht.disabledControls$,Et=U.ui.startedByKeyboard$,Ke=U.ui.currentGridType$,Ti=U.ads.duration,bo=U.ads.position,So=U.ads.playbackState,gn=U.ui.isFullscreen,Tt=U.ui.playerSize,Ut=U.ui.additionalButtonsDeprecated$,W=U.actions.internal.getVideoElement,kt=U.actions.internal.replayInteractive,di=U.state.isInteractive,lt=U.state.isInteractiveTime$,wt=U.state.showInteractiveGraph,Yt=U.state.showSeekToInteractive,nt=U.state.showPlayPrevChapter,Fi=U.state.showInteractiveTimeIndicator,Hi=ke.seekToInteractiveDisabledTooltip$,Zo=ke.graphIsOpened$,To=U.ui.controlBlocks,Ui=v(()=>G(U.state.playPrevChapterDisabledTooltip)),Zi=v(()=>G(r())),Rr=v(()=>a().has("EPISODE_BUTTON")),$o=v(()=>a().has("GRAPH_BUTTON")),ro=v(()=>a().has("SEEK_TO_INTERACTIVE_BUTTON")),Ai=v(()=>a().has("PLAY_BUTTON")),Jo=v(()=>a().has("REPLAY_BUTTON")),en=v(()=>a().has("PLAY_PREV_CHAPTER_BUTTON")),Ln=v(()=>l()===fb.PLAYING),er=v(()=>d()==="paused"),Nr=v(()=>s()&&!ie()&&!di),es=v(()=>!s()||ie()),bs=v(()=>e.showNextPrevButtons&&!ie()&&e.prevButtonActive),ts=v(()=>e.showNextPrevButtons&&!ie()&&e.nextButtonActive),tr=v(()=>u().width>300),yr=v(()=>u().width>400),hn=v(m),Mn=v(()=>p()!==pb.NOT_AVAILABLE&&!(f()&&$()===1)&&!y()&&!di&&!_()),Do=v(()=>S()==="LiveWaitingStart"),Vn=v(()=>!!Xt&&p()!==pb.CONNECTED&&!y()&&($()===1&&n(Do)||!n(Do))&&!n(hn)&&!di&&!C()),ir=K(!1);Mt(()=>{let qe=Xt==null?void 0:Xt.info.isActive$.subscribe(Lt=>O(ir,Lt,!0));return()=>qe==null?void 0:qe.unsubscribe()});let xr=v(()=>!n(hn)&&oo(I(),"s")),wr=v(()=>!e.logoHidden&&u().width>350&&!N()),Or=v(()=>Pe.features.fullscreen&&Dt()&&!(f()&&$()===1)&&(di?it():!0)&&!n(hn)&&!n(ir)),so=v(()=>!P()&&!n(hn)),Dr=v(()=>(!E()||ie())&&u().width>260&&!n(hn)&&!(Pe.features.interactiveHideTime&&di)),Rn=v(()=>k()||e.showControls),Nn=v(()=>!ie()&&!E()&&!!(ht!=null&&ht.length)&&n(tr)&&!n(Rr)&&!n(hn)),ao=v(()=>!Q()||!!H()),Br=v(()=>wt&&oo(I(),"m")),On=v(()=>!z()||Y()||le()===0),ft=ci({}),ui=ci({}),Sr=mb(ql,260),or=mb(Ju,260);Oe(()=>{u(),X(),Sr(W(),Ht,ft,e.showControls),or(W(),To,ui,e.showControls)});let nr=()=>U.actions.internal.toggleChromecast();function tn(){return mt(this,null,function*(){Xt!=null&&Xt.isActive()?yield Xt==null?void 0:Xt.exit():yield Xt==null?void 0:Xt.request()})}function Tr(){ra({isAudioDisabled:be,audioDisabledHintCallback:Bt,isAudioAvailable:z(),audioIsNotExistHintCallback:pt,isAds:ie()})&&Ue()}let on=K(""),_n=(qe,Lt)=>{if(!qe){O(on,G("tooltip_live"),!0);return}Lt&&Lt===fb.PAUSED&&O(on,G("tooltip_play"),!0)};Oe(()=>{_n(n(ao),l())});let Dn=ae();Oe(()=>{re()&&Ol(re(),k(),Ft)}),Oe(()=>{Xu(Et,Z(),ft.playButton)});var Bn=MS(),Bo=de(Bn);{var Co=qe=>{var Lt=PS(),bi=de(Lt);let Ao;var ko=L(bi,2);let Ho;je(ko,dt=>ui.topLeft=dt,()=>ui==null?void 0:ui.topLeft);var uo=L(ko,2);let eo;var $n=T(uo);wi($n,1,ue,({iconUrl:dt,ariaLabel:ei,testId:fo,onClick:he,tooltip:xt})=>dt,(dt,ei)=>{let fo=()=>n(ei).iconUrl,he=()=>n(ei).ariaLabel,xt=()=>n(ei).testId,ii=()=>n(ei).onClick,xi=()=>n(ei).tooltip,Vi=v(()=>{var pi;return(pi=he())!=null?pi:xi()});Hm(dt,{get iconUrl(){return fo()},get ariaLabel(){return n(Vi)},get testId(){return xt()},get onClick(){return ii()}})});var yn=L($n,2);{var po=dt=>{ac(dt,{get ref(){return ft.autoplayNextToggle},set ref(ei){ft.autoplayNextToggle=ei}})};R(yn,dt=>{e.showAutoplayNext&&!Be()&&!ne()&&dt(po)})}var Lo=L(yn,2);{var zn=dt=>{Jd(dt,{isMobile:!0,click:nr,get state(){return p()},get ref(){return ft.chromecast},set ref(ei){ft.chromecast=ei}})};R(Lo,dt=>{n(Mn)&&dt(zn)})}var lr=L(Lo,2);{var dr=dt=>{Wm(dt,{click:tn,get isPictureInPictureActive(){return f()},get ref(){return ft.pip},set ref(ei){ft.pip=ei}})};R(lr,dt=>{n(Vn)&&dt(dr)})}var Wn=L(lr,2);{var $s=dt=>{Hl(dt,{get ref$(){return Dn}})};R(Wn,dt=>{_e()&&!xe()&&dt($s)})}var rs=L(Wn,2);{var Ye=dt=>{Xd(dt,{get click(){return ye},get targetUrl(){return De()},get logoClickable(){return e.logoClickable},get ref(){return ft.vkLogo},set ref(ei){ft.vkLogo=ei}})};R(rs,dt=>{n(wr)&&dt(Ye)})}w(uo),je(uo,dt=>ui.topRight=dt,()=>ui==null?void 0:ui.topRight);var qt=L(uo,2);let Ii;var Uo=T(qt);{var rn=dt=>{let ei=v(()=>Ae.bind(null,!0));za(dt,{get click(){return n(ei)},type:"prev",isMobile:!0,get ref(){return ft.prevButton},set ref(fo){ft.prevButton=fo}})};R(Uo,dt=>{n(bs)&&dt(rn)})}var cr=L(Uo,2);{var sn=dt=>{Gl(dt,{get disabled(){return n(Ai)},get click(){return Ze},isMobile:!0,get isPlaying(){return n(Ln)},get ref(){return ft.playButton},set ref(ei){ft.playButton=ei}})};R(cr,dt=>{n(es)&&dt(sn)})}var zo=L(cr,2);{var Bs=dt=>{Ql(dt,{get disabled(){return n(Jo)},get click(){return Ze},isMobile:!0,get ref(){return ft.replayButton},set ref(ei){ft.replayButton=ei}})};R(zo,dt=>{n(Nr)&&dt(Bs)})}var an=L(zo,2);{var Fs=dt=>{let ei=v(()=>Fe.bind(null,!0));za(dt,{get click(){return n(ei)},type:"next",isMobile:!0,get ref(){return ft.nextButton},set ref(fo){ft.nextButton=fo}})};R(an,dt=>{n(ts)&&dt(Fs)})}w(qt),je(qt,dt=>ui.middle=dt,()=>ui==null?void 0:ui.middle);var da=L(qt,2);{var ca=dt=>{var ei=ES(),fo=de(ei);{var he=pi=>{var ni=TS();let mo;ni.__click=[wS,en,e,Ui];var ln=T(ni);let dn=v(()=>!e.showControls);sc(ln,{get hidden(){return n(dn)},get disabled(){return n(en)},get click(){return e.playPrevChapter},get ref(){return ft.playPrevChapterButton},set ref(ki){ft.playPrevChapterButton=ki}}),w(ni),D(ki=>mo=se(ni,1,"wrapper-middle-left s-1d",null,mo,ki),[()=>({fullscreen:we(),hidden:!e.showControls})]),b(pi,ni)};R(fo,pi=>{nt&&pi(he)})}var xt=L(fo,2);{var ii=pi=>{var ni=CS();let mo;var ln=T(ni);let dn=v(()=>!e.showControls&&!J());dc(ln,{get hidden(){return n(dn)},get disabled(){return n($o)},get click(){return Zo.toggle},get graphIsOpened(){return J()},get ref(){return ft.interactiveGraphButton},set ref(ki){ft.interactiveGraphButton=ki}}),w(ni),D(ki=>mo=se(ni,1,Sd(nt?"wrapper-middle-left-second":"wrapper-middle-left"),"s-1d",mo,ki),[()=>({fullscreen:we(),hidden:!e.showControls&&!J()})]),b(pi,ni)};R(xt,pi=>{n(Br)&&pi(ii)})}var xi=L(xt,2);{var Vi=pi=>{var ni=IS();let mo;ni.__click=[SS,ro,e,Zi];var ln=T(ni);let dn=v(()=>!e.showControls);lc(ln,{get hidden(){return n(dn)},get disabled(){return n(ro)},get click(){return e.seekToInteractive},get ref(){return ft.seekToInteractiveButton},set ref(ki){ft.seekToInteractiveButton=ki}}),w(ni),D(ki=>mo=se(ni,1,"wrapper-middle-right s-1d",null,mo,ki),[()=>({fullscreen:we(),hidden:!e.showControls})]),b(pi,ni)};R(xi,pi=>{Yt&&pi(Vi)})}b(dt,ei)};R(da,dt=>{di&&!m()&&dt(ca)})}D((dt,ei,fo,he)=>{Ao=se(bi,1,"overlay-mobile s-1d",null,Ao,dt),Ho=se(ko,1,"wrapper-top-left s-1d",null,Ho,ei),eo=se(uo,1,"wrapper-top-right s-1d",null,eo,fo),Ii=se(qt,1,"wrapper-middle s-1d",null,Ii,he)},[()=>({hidden:!n(Rn)}),()=>({hidden:!e.showControls,fullscreen:we()}),()=>({hidden:!e.showControls&&!y(),fullscreen:we()}),()=>({hidden:!e.showControls||m()||e.endScreenShown&&e.showNextPrevButtons})]),b(qe,Lt)};R(Bo,qe=>{ie()||qe(Co)})}var rr=L(Bo,2);{var Io=qe=>{var Lt=kS(),bi=de(Lt);let Ao;var ko=T(bi);ep(ko,{get muted(){return Y()},click:Tr,get ref(){return ft.volume},set ref(po){ft.volume=po}}),w(bi);var Ho=L(bi,2);{var uo=po=>{var Lo=AS(),zn=T(Lo);let lr=v(()=>!n(er));Gl(zn,{get disabled(){return n(Ai)},get click(){return Ze},isMobile:!0,get isPlaying(){return n(lr)},get ref(){return ft.playButton},set ref(dr){ft.playButton=dr}}),w(Lo),b(po,Lo)};R(Ho,po=>{n(er)&&po(uo)})}var eo=L(Ho,2);let $n;var yn=T(eo);uc(yn,{get position(){return Ne()},get duration(){return pe()}}),w(eo),D((po,Lo)=>{Ao=se(bi,1,"wrapper-top-right s-1d",null,Ao,po),$n=se(eo,1,"wrapper-bottom ads-timeline-mobile s-1d",null,$n,Lo)},[()=>({fullscreen:we()}),()=>({fullscreen:we()})]),b(qe,Lt)};R(rr,qe=>{ie()&&d()!=="inactive"&&qe(Io)})}var zi=L(rr,2);let Fn;var sr=T(zi);let Fr;var Hn=T(sr),Eo=T(Hn),Hr=T(Eo);{var yt=qe=>{Oo(qe,{get disabled(){return n(Jo)},get ref(){return ft.replayButton},set ref(Lt){ft.replayButton=Lt},children:(Lt,bi)=>{Ql(Lt,{get disabled(){return n(Jo)},get click(){return kt}})},$$slots:{default:!0}})};R(Hr,qe=>{di&&qe(yt)})}var Ct=L(Hr,2);{var lo=qe=>{Oo(qe,{get ref(){return ft.liveButton},set ref(Lt){ft.liveButton=Lt},children:(Lt,bi)=>{cc(Lt,{get isLiveActive(){return n(ao)},isMobile:!0,get ariaLabel(){return n(on)}})},$$slots:{default:!0}})};R(Ct,qe=>{!ie()&&E()&&qe(lo)})}var Ji=L(Ct,2);{var Mi=qe=>{let Lt=v(()=>ie()?Ne():A()),bi=v(()=>ie()?pe():We()),Ao=v(()=>!e.showControls);Gd(qe,{get showDuration(){return n(yr)},get position(){return n(Lt)},get duration(){return n(bi)},isMobile:!0,get isHidden(){return n(Ao)},get ref(){return ft.time},set ref(ko){ft.time=ko}})};R(Ji,qe=>{n(Dr)&&qe(Mi)})}var bn=L(Ji,2);let yo=v(()=>!n(Nn));Oo(bn,{className:"w-max",get disabled(){return n(yo)},get ref(){return ft.episodes},set ref(qe){ft.episodes=qe},children:(qe,Lt)=>{var bi=Le(),Ao=de(bi);{var ko=Ho=>{var uo=LS(),eo=L(de(uo),2);ec(eo,{get position(){return A()},get duration(){return We()},get timeCodes(){return ht}}),b(Ho,uo)};R(Ao,Ho=>{n(Nn)&&Ho(ko)})}b(qe,bi)},$$slots:{default:!0}}),w(Eo),je(Eo,qe=>ui.bottomLeft=qe,()=>ui==null?void 0:ui.bottomLeft);var Un=L(Eo,2),mi=T(Un);{var Ur=qe=>{Oo(qe,{get ref(){return ft.volume},set ref(Lt){ft.volume=Lt},children:(Lt,bi)=>{ep(Lt,{get muted(){return n(On)},click:Tr})},$$slots:{default:!0}})};R(mi,qe=>{n(so)&&qe(Ur)})}var ar=L(mi,2);{var is=qe=>{Oo(qe,{get ref(){return ft.settings},set ref(Lt){ft.settings=Lt},children:(Lt,bi)=>{Hl(Lt,{get ref$(){return Dn}})},$$slots:{default:!0}})};R(ar,qe=>{n(xr)&&qe(is)})}var os=L(ar,2);{var zr=qe=>{Oo(qe,{get ref(){return ft.fullscreen},set ref(Lt){ft.fullscreen=Lt},children:(Lt,bi)=>{jd(Lt,{get click(){return e.toggleFullscreen},get isFullscreen(){return we()}})},$$slots:{default:!0}})};R(os,qe=>{n(Or)&&qe(zr)})}w(Un),je(Un,qe=>ui.bottomRight=qe,()=>ui==null?void 0:ui.bottomRight),w(Hn),je(Hn,qe=>j(qe),()=>j());var Po=L(Hn,2);let nn=v(()=>!e.showControls);Ka(Po,{get isHidden(){return n(nn)},get isAds(){return ie()},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return Q()},get ref(){return ft.timeline},set ref(qe){ft.timeline=qe}}),w(sr),je(sr,qe=>ui.bottom=qe,()=>ui==null?void 0:ui.bottom),w(zi),je(zi,qe=>Te(qe),()=>Te());var co=L(zi,2);{var Cr=qe=>{nc(qe,{get ref(){return ft.interactiveTimeIndicator},set ref(Lt){ft.interactiveTimeIndicator=Lt}})};R(co,qe=>{Fi&&qe(Cr)})}D((qe,Lt)=>{Fn=se(zi,1,"wrapper-bottom mobile s-1d",null,Fn,qe),Fr=se(sr,1,"controls-wrapper s-1d",null,Fr,Lt)},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth}),()=>({fullscreen:we()})]),b(t,Bn),F(),o()}tt(["click"]);function pc(t,e){B(e,!0);let[i,o]=Re(),r=()=>x(C,"$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,""),m=g(e,"showAutoplayNext",3,!1),p=g(e,"isOneVideoPlaylist",3,!1),f=g(e,"customFullscreenSupported",3,!0),$=g(e,"endScreenShown",3,!1),y=g(e,"onDisabledPlayPrevChapterClick",3,vb),_=g(e,"onDisabledSeekToInteractiveClick",3,vb),C=ve().ui.isMobile,I=K(!1);Mt(()=>{let k=setTimeout(()=>O(I,!0),0);return()=>clearTimeout(k)});var N=Le(),P=de(N);{var E=k=>{var Q=Le(),H=de(Q);{var z=le=>{Km(le,{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 f()},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 _()},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(X){l(X)},get playerControlsRef(){return d()},set playerControlsRef(X){d(X)}})},Y=le=>{Fm(le,{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 f()},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,le=>{r()?le(z):le(Y,!1)})}b(k,Q)};R(P,k=>{n(I)&&k(E)})}b(t,N),F(),o()}var RS=Ce('<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 fc(t,e){B(e,!0);let i=v(()=>e.reversed?"transform:scaleX(-1);transform-origin:50% 0;":""),o=v(()=>`${fn(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=RS();b(r,l)},$$slots:{default:!0}}),F()}var NS=Ce('<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=g(e,"reversed",3,!1),o=v(()=>i()?"transform:scaleX(-1);transform-origin: 50% 0;":void 0),r=v(()=>`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=NS();b(a,d)},$$slots:{default:!0}}),F()}var OS=M('<span class="hot-key-helpers-text s-13"> </span>'),DS=M('<div data-testid="hotkey-helper-icon" class="s-13"><!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <!>',1),BS=M("<div><!></div>"),FS={hash:"s-13",code:'.hot-key-helpers-container.s-13{align-items:center;animation:s-13-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-13{left:calc(25% - 100px)}.hot-key-helpers-container--right.s-13{left:calc(75% - 100px)}.hot-key-helpers-text.s-13{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-13{animation:s-13-fadeOut ease var(--controls-transition-duration);height:0;visibility:hidden;width:0}@keyframes s-13-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes s-13-fadeOut{0%{opacity:1}to{opacity:0}}'};function Qm(t,e){B(e,!0),q(t,FS);let[i,o]=Re(),r=()=>x(e.data,"$data",i),a=ve(),{features:l}=Vt(),d=a.ui.t,s=v(()=>!r()),u=v(()=>{var C;return((C=r())==null?void 0:C.type)==="BACKWARD_SEEK"}),m=v(()=>{var C;return((C=r())==null?void 0:C.type)==="FORWARD_SEEK"}),p=v(()=>{var C;return(C=r())==null?void 0:C.type}),f=v(()=>{var C,I;return(C=r())!=null&&C.t?d(r().t.key,{value:r().t.value||""}):(I=r())==null?void 0:I.text});var $=BS();let y;var _=T($);{var S=C=>{var I=DS(),N=de(I),P=T(N);{var E=j=>{let ie=v(()=>n(p)==="BACKWARD_SEEK");qm(j,{get reversed(){return n(ie)},shadow:!0})};R(P,j=>{["BACKWARD_SEEK","FORWARD_SEEK"].includes(n(p))&&j(E)})}var k=L(P,2);{var Q=j=>{Ns(j,{get size(){return"48"},shadow:!0})};R(k,j=>{n(p)==="PAUSE"&&!l.playbackStatusShow&&j(Q)})}var H=L(k,2);{var z=j=>{An(j,{get size(){return"48"},shadow:!0})};R(H,j=>{n(p)==="PLAY"&&!l.playbackStatusShow&&j(z)})}var Y=L(H,2);{var le=j=>{rc(j,{get size(){return"48"},shadow:!0})};R(Y,j=>{n(p)==="REPLAY"&&!l.playbackStatusShow&&j(le)})}var X=L(Y,2);{var re=j=>{sa(j,{get size(){return"48"},type:"off",shadow:!0})};R(X,j=>{n(p)==="SUBTITLES_OFF"&&j(re)})}var Z=L(X,2);{var we=j=>{sa(j,{get size(){return"48"},shadow:!0})};R(Z,j=>{n(p)==="SUBTITLES_ON"&&j(we)})}var ue=L(Z,2);{var ne=j=>{let ie=v(()=>n(p)==="RATE_DOWN");fc(j,{get size(){return"48"},get reversed(){return n(ie)},testId:"rate-change-icon",shadow:!0})};R(ue,j=>{["RATE_DOWN","RATE_UP"].includes(n(p))&&j(ne)})}var _e=L(ue,2);{var xe=j=>{let ie=v(()=>n(p)==="EPISODE_PREV");la(j,{get size(){return"48"},get reversed(){return n(ie)},shadow:!0})};R(_e,j=>{["EPISODE_PREV","EPISODE_NEXT"].includes(n(p))&&j(xe)})}var J=L(_e,2);{var Ne=j=>{aa(j,{get size(){return"48"},volume:0,shadow:!0})};R(J,j=>{n(p)==="MUTE"&&j(Ne)})}var pe=L(J,2);{var A=j=>{aa(j,{get size(){return"48"},volume:1,shadow:!0})};R(pe,j=>{n(p)==="VOLUME"&&j(A)})}w(N);var We=L(N,2);{var Te=j=>{var ie=OS(),De=T(ie,!0);w(ie),D(()=>me(De,n(f))),b(j,ie)};R(We,j=>{n(f)&&j(Te)})}D(()=>Ve(N,"data-type",n(p))),b(C,I)};R(_,C=>{!n(s)&&n(p)&&C(S)})}w($),D(C=>y=se($,1,"hot-key-helpers-container s-13",null,y,C),[()=>({hidden:n(s),"hot-key-helpers-container--left":n(u),"hot-key-helpers-container--right":n(m)})]),b(t,$),F(),o()}var HS=(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}},US=(t,e,i)=>{e.has(t.code)&&(t.preventDefault(),t.stopPropagation(),i())},zS=M('<div tabindex="0" role="button"><div class="button-block s-t" aria-hidden="true"><div class="button-row s-t"><div class="button button-up s-t"><!></div> <div class="button button-right s-t"><!></div></div> <div class="button-row s-t"><div class="button button-left s-t"><!></div> <div class="button button-down s-t"><!></div></div></div></div>'),WS={hash:"s-t",code:".immersive-controls.s-t{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-t{left:20px;top:50px}.button-block.s-t{height:40px;margin:auto;transform:rotate(45deg);width:40px}.button-row.s-t{display:flex;flex-direction:row;position:relative}.button.s-t{cursor:pointer;height:20px;text-align:center;width:20px}.button.s-t svg{opacity:.7;transition:opacity .2s linear}.button.button-up.s-t svg{transform:rotate(-45deg) translate(-1px,-1px)}.button.button-right.s-t svg{transform:rotate(45deg) translate(1px,-1px)}.button.button-down.s-t svg{transform:rotate(135deg) translate(1px,-3px)}.button.button-left.s-t svg{transform:rotate(-135deg) translate(-1px,-3px)}.button.s-t:hover svg{opacity:1}"};function mc(t,e){B(e,!0),q(t,WS);let i=g(e,"isShifted",3,!1),o=ve(),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=G("aria_label_spherical_control");var p=zS();let f;p.__keydown=[HS,r,a,l,s,d],p.__keyup=[US,r,u];var $=T(p),y=T($),_=T(y);_.__mousedown=a,_.__mouseup=u;var S=T(_);Mr(S,{direction:"up",useBtnColor:!0}),w(_);var C=L(_,2);C.__mousedown=d,C.__mouseup=u;var I=T(C);Mr(I,{direction:"up",useBtnColor:!0}),w(C),w(y);var N=L(y,2),P=T(N);P.__mousedown=s,P.__mouseup=u;var E=T(P);Mr(E,{direction:"up",useBtnColor:!0}),w(P);var k=L(P,2);k.__mousedown=l,k.__mouseup=u;var Q=T(k);Mr(Q,{direction:"up",useBtnColor:!0}),w(k),w(N),w($),w(p),D(H=>{f=se(p,1,"immersive-controls s-t",null,f,H),Ve(p,"aria-label",m)},[()=>({"m-shifted":i()})]),gt("mouseleave",_,u),gt("mouseleave",C,u),gt("mouseleave",P,u),gt("mouseleave",k,u),b(t,p),F()}tt(["keydown","keyup","mousedown","mouseup"]);import{ValueSubject as hb,Subscription as KS,filterChanged as qS,filter as QS}from"@vkontakte/videoplayer-shared/es2015";var gb=(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=gb(1e3);this.subscriptions=new KS;this.isAuto=!1;this.isLive=!1;this.captions$=new hb([]);this.captionsPrepared$=new hb([])}subscribe(){return this.subscriptions.add(this.captions$.pipe(QS(()=>this.isEnabled()),qS()).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 GS=M('<span class="caption-line s-a"><span class="caption-segment s-a"> </span></span>'),YS=M('<span class="caption-line s-a"><span class="caption-segment s-a"></span></span>'),jS=M('<span class="caption-line s-a"><span class="caption-segment s-a"> </span></span>'),XS=M('<div><span class="caption s-a"><!></span></div>'),ZS=M("<div><!></div>"),JS={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 Qa(t,e){B(e,!0),q(t,JS);let[i,o]=Re(),r=()=>x(f,"$currentSubtitle$",i),a=()=>x(y,"$isLive$",i),l=()=>x(_,"$isFullscreen",i),d=()=>x(S,"$previewTrackActive",i),s=()=>x($,"$isAutoSubtitleCaptionVisible$",i),u=g(e,"isMobile",3,!1),m=ve(),p=Vt(),f=m.state.currentSubtitle$,$=m.state.isAutoSubtitleCaptionVisible$,y=m.state.isLive$,_=m.ui.isFullscreen,S=m.ui.previewTrackActive,C=v(()=>!!r().isAuto),I=v(()=>!!a()),N=v(()=>e.playerSize.width*.02),P=v(()=>u()&&!l()||n(N)<=p.minSubtitlesFontSize?p.minSubtitlesFontSize:n(N)),E=K(null);Oe(()=>{var X,re,Z;(X=n(E))==null||X.setIsAuto(n(C)),(re=n(E))==null||re.setIsLive(n(I)),(Z=n(E))==null||Z.setCaptions(e.captions)});let k=K(ci([[]]));Mt(()=>{O(E,new tp().subscribe(),!0);let X=n(E).captionsPrepared$.subscribe(re=>{O(k,re,!0)});return()=>{var re;(re=n(E))==null||re.destroy(),X.unsubscribe()}}),Mt(()=>{if(n(C)){let X=window.setTimeout(()=>{$.set(!1)},p.autoSubtitlesTimeout);return()=>{window.clearTimeout(X)}}else $.set(!1)});let Q=v(()=>e.playerSize.width<400?10:e.playerSize.width<550?14:24);var H=ZS();let z;var Y=T(H);{var le=X=>{var re=XS();let Z;var we=T(re),ue=T(we);{var ne=xe=>{var J=GS(),Ne=T(J),pe=T(Ne,!0);w(Ne),w(J),D(A=>{var We;Qe(Ne,`font-size: ${(We=n(P))!=null?We:""}px`),me(pe,A)},[()=>G("subtitles_auto_caption")]),b(xe,J)},_e=(xe,J)=>{{var Ne=A=>{var We=Le(),Te=de(We);wi(Te,17,()=>n(k),xd,(j,ie)=>{var De=YS(),Be=T(De);wi(Be,21,()=>n(ie),({value:it,timeAppeared:U})=>U,(it,U)=>{let ke=()=>n(U).value,Pe=()=>n(U).timeAppeared;var Ue=Le(),Ze=de(Ue);{var ye=Ae=>{var Fe=ps();D(()=>me(Fe,ke())),b(Ae,Fe)};R(Ze,Ae=>{(!Pe()||Pe()<=e.position)&&Ae(ye)})}b(it,Ue)}),w(Be),w(De),D(()=>{var it;return Qe(Be,`font-size: ${(it=n(P))!=null?it:""}px`)}),b(j,De)}),b(A,We)},pe=A=>{var We=Le(),Te=de(We);wi(Te,17,()=>e.captions,({value:j})=>j,(j,ie)=>{let De=()=>n(ie).value;var Be=jS(),it=T(Be),U=T(it,!0);w(it),w(Be),D(()=>{var ke;Qe(it,`font-size: ${(ke=n(P))!=null?ke:""}px`),me(U,De())}),b(j,Be)}),b(A,We)};R(xe,A=>{var We;n(C)&&((We=n(k))!=null&&We.length)?A(Ne):A(pe,!1)},J)}};R(ue,xe=>{n(C)&&s()?xe(ne):xe(_e,!1)})}w(we),w(re),D(xe=>{var J;Z=se(re,1,"subtitles-caption s-a",null,Z,xe),Qe(re,`--subtitles-caption-margin: ${(J=n(Q))!=null?J:""}%`)},[()=>({mobile:u()})]),b(X,re)};R(Y,X=>{var re;(e.captions.length||(re=n(k))!=null&&re.length)&&X(le)})}w(H),D(X=>z=se(H,1,"subtitles-container s-a",null,z,X),[()=>({shifted:e.shifted,"preview-track-active":d(),auto:n(C)&&!n(I)&&!s()})]),b(t,H),F(),o()}import{ChromecastState as e2}from"@vkontakte/videoplayer-core/es2015";var t2=M('<div class="text s-x"> </div>'),i2=M('<div><div class="icon_wrapper s-x"><!></div> <!></div>'),o2={hash:"s-x",code:".wrapper.s-x{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-x{background-size:cover}.icon_wrapper.s-x{align-items:center;display:flex;flex-direction:column;width:400px}.text.s-x{margin-top:20px}"};function vc(t,e){B(e,!0),q(t,o2);let i=g(e,"chromecastDeviceName",3,"chromecastDeviceName"),o=Vt();var r=i2();let a;var l=T(r),d=T(l);Zd(d,{get size(){return"48"},get iconState(){return e2.CONNECTED}}),w(l);var s=L(l,2);{var u=m=>{var p=t2(),f=T(p);w(p),D(()=>{var $;return me(f,`Видео воспроизводится на ${($=i())!=null?$:""}`)}),b(m,p)};R(s,m=>{i()&&m(u)})}w(r),D(m=>{a=se(r,1,"wrapper s-x",null,a,m),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()}var n2=Ce('<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=n2();b(e,o)},$$slots:{default:!0}})}var r2=M('<div class="container s-4"><!></div>'),s2={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 Ga(t){q(t,s2);var e=r2(),i=T(e);Gm(i,{}),w(e),b(t,e)}var a2=M('<div class="playButton s-d" tabindex="0" role="button"><div class="playButtonBackground s-d"></div> <!></div>'),l2=M('<div data-testid="unstarted-thumb"><!></div>'),d2={hash:"s-d",code:".container.s-d{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-d{opacity:0;visibility:hidden}.container.bgCover.s-d{background-size:cover}.playButton.s-d{align-items:center;display:flex;height:var(--big-play-size);justify-content:center;margin:auto;width:var(--big-play-size)}.playButton.s-d,.playButtonBackground.s-d{bottom:0;left:0;position:absolute;right:0;top:0}.playButtonBackground.s-d{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-d:hover .playButtonBackground:where(.s-d){background-color:var(--big-play-hover-bg-color);transform:scale(1.15)}.playButton.s-d svg{position:relative}"};function Ya(t,e){B(e,!0),q(t,d2);let i=g(e,"iconVisible",3,!0),o=ve(),r=Vt(),a=o.ui.startedByKeyboard$,l=G("tooltip_play"),d=$=>{var _;let y=$.code;["Enter","Space"].includes(y)&&($.stopPropagation(),$.preventDefault(),a.set(!0),(_=e.startVideo)==null||_.call(e))},s=$=>{var y,_;$.stopPropagation(),(y=e.startVideo)==null||y.call(e),(_=e.onClick)==null||_.call(e,$)};var u=l2();let m;u.__click=s,u.__contextmenu=function(...$){var y;(y=e.onContextMenu)==null||y.apply(this,$)};var p=T(u);{var f=$=>{var y=a2();y.__keydown=d;var _=L(T(y),2);An(_,{get size(){return"48"}}),w(y),D(()=>Ve(y,"aria-label",l)),b($,y)};R(p,$=>{i()&&$(f)})}return w(u),D($=>{m=se(u,1,"container s-d",null,m,$),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})}tt(["click","contextmenu","keydown"]);var c2=M('<div data-testid="video_title"><span> </span></div>'),u2={hash:"s-z",code:".title.s-z{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;color:var(--white);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}.hidden.s-z{opacity:0;transform:translateY(calc(var(--controls-gradient-height)*-1));visibility:hidden}"};function Ym(t,e){B(e,!0),q(t,u2);let i=g(e,"title",3,""),o=g(e,"isHidden",3,!1),r=g(e,"ref",15),a=K(void 0);Mt(()=>{var p;requestAnimationFrame(()=>{var f;(f=e.onVisibilityChanged)==null||f.call(e,!0)});function m(f){var $;f.propertyName==="transform"&&(($=e.onVisibilityChanged)==null||$.call(e,!o()))}return(p=n(a))==null||p.addEventListener("transitionend",m),()=>{var f;return(f=n(a))==null?void 0:f.removeEventListener("transitionend",m)}});var l=c2();let d;var s=T(l),u=T(s,!0);w(s),je(s,m=>r(m),()=>r()),w(l),je(l,m=>O(a,m),()=>n(a)),D(m=>{d=se(l,1,"title s-z",null,d,m),me(u,i())},[()=>({hidden:o()})]),b(t,l),F()}import{throttleFn as _2}from"@vkontakte/videoplayer-shared/es2015";var p2=M('<div class="timer__cell cell s-1c"><span class="cell__value s-1c"> </span> <span class="cell__unit s-1c"> </span></div> <span class="timer__points s-1c"> </span>',1),f2=M('<div class="timer__cell cell s-1c"><span class="cell__value s-1c"> </span> <span class="cell__unit s-1c"> </span></div> <span class="timer__points s-1c"> </span>',1),m2=M('<div class="timer__cell cell s-1c"><span class="cell__value s-1c"> </span> <span class="cell__unit s-1c"> </span></div> <span class="timer__points s-1c"> </span>',1),v2=M('<div class="timer__cell cell s-1c"><span class="cell__value s-1c"> </span> <span class="cell__unit s-1c"> </span></div>'),g2=M("<div><!> <!> <!> <!></div>"),h2={hash:"s-1c",code:".timer__container.s-1c{align-items:flex-start;display:flex;justify-content:center}.cell.s-1c{align-items:center;display:flex;flex-direction:column}.cell__value.s-1c{font-size:48px;font-weight:600;line-height:1.2}.small.s-1c .cell__value:where(.s-1c){font-size:24px}.cell__unit.s-1c{font-size:14px;font-weight:400;line-height:1.2}.small.s-1c .cell__unit:where(.s-1c){font-size:12px}.timer__points.s-1c{display:inline-block;font-size:42px;font-weight:600;line-height:1.2;margin:0 8px}.small.s-1c .timer__points:where(.s-1c){font-size:20px}"};function jm(t,e){B(e,!0),q(t,h2);let i=K(""),o=K(""),r=K(""),a=K(""),l,d=32,s=d/2,u=H=>String(H).padStart(2,"0"),m=H=>Math.max(H.length,1),p=H=>`${(e.isSmallSize?s:d)*m(H)}px`,f=H=>{let z=Math.floor(H/86400);z&&(H-=z*86400,O(i,u(z),!0));let Y=Math.floor(H/3600);O(o,u(Y),!0);let le=Math.floor(H/60)%60;O(r,u(le),!0);let X=H%60;O(a,u(X),!0)},$=()=>{let H=Math.floor(Date.now()/1e3),z=e.startTime-H;f(z),z>=1?l=requestAnimationFrame($):e.onTimerOver()};Mt(()=>{l=requestAnimationFrame($)}),pn(()=>{cancelAnimationFrame(l)});var y=g2();let _;var S=T(y);{var C=H=>{var z=p2(),Y=de(z);let le;var X=T(Y),re=T(X,!0);w(X);var Z=L(X,2),we=T(Z,!0);w(Z),w(Y);var ue=L(Y,2),ne=T(ue,!0);w(ue),D((_e,xe,J)=>{le=Qe(Y,"",le,{width:_e}),me(re,n(i)),me(we,xe),me(ne,J)},[()=>p(n(i)),()=>G("waiting_live_day_value"),()=>G("waiting_live_colon")]),b(H,z)};R(S,H=>{n(i)&&H(C)})}var I=L(S,2);{var N=H=>{var z=f2(),Y=de(z);let le;var X=T(Y),re=T(X,!0);w(X);var Z=L(X,2),we=T(Z,!0);w(Z),w(Y);var ue=L(Y,2),ne=T(ue,!0);w(ue),D((_e,xe,J)=>{le=Qe(Y,"",le,{width:_e}),me(re,n(o)),me(we,xe),me(ne,J)},[()=>p(n(o)),()=>G("waiting_live_hour_value"),()=>G("waiting_live_colon")]),b(H,z)};R(I,H=>{n(o)&&H(N)})}var P=L(I,2);{var E=H=>{var z=m2(),Y=de(z);let le;var X=T(Y),re=T(X,!0);w(X);var Z=L(X,2),we=T(Z,!0);w(Z),w(Y);var ue=L(Y,2),ne=T(ue,!0);w(ue),D((_e,xe,J)=>{le=Qe(Y,"",le,{width:_e}),me(re,n(r)),me(we,xe),me(ne,J)},[()=>p(n(r)),()=>G("waiting_live_minute_value"),()=>G("waiting_live_colon")]),b(H,z)};R(P,H=>{n(r)&&H(E)})}var k=L(P,2);{var Q=H=>{var z=v2();let Y;var le=T(z),X=T(le,!0);w(le);var re=L(le,2),Z=T(re,!0);w(re),w(z),D((we,ue)=>{Y=Qe(z,"",Y,{width:we}),me(X,n(a)),me(Z,ue)},[()=>p(n(a)),()=>G("waiting_live_second_value")]),b(H,z)};R(k,H=>{n(a)&&H(Q)})}w(y),D(H=>_=se(y,1,"timer__container s-1c",null,_,H),[()=>({small:e.isSmallSize})]),b(t,y),F()}var b2=M('<div class="waiting s-r"><span> </span></div>'),$2=M('<div class="upcoming-timer timer s-r"><span> </span> <!></div>'),y2=M('<div class="waiting-container s-r"><!></div>'),x2={hash:"s-r",code:'.waiting-container.s-r{background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;white-space:nowrap}.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(15px);background-color:rgba(0,0,0,.56);content:"";z-index:1}.waiting.s-r{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-r{font-size:20px;font-weight:600;line-height:1.2}.upcoming-timer.s-r{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.timer.s-r{align-items:center;display:flex;flex-direction:column;justify-content:center}.timer__title.s-r{display:inline-block;font-size:20px;font-weight:600;line-height:1.2;margin-bottom:12px;vertical-align:middle}.small.s-r{font-size:15px}.medium.s-r{font-size:17px}'};function gc(t,e){B(e,!0),q(t,x2);let i=g(e,"startTime",3,0),o=v(()=>i()<Math.floor(Date.now()/1e3)),r=K(void 0),a=K(void 0),l=0,d=K(void 0),s=K(void 0),u=v(()=>{var S,C;return((S=n(d))!=null?S:1/0)<=509||((C=n(s))!=null?C:1/0)<=320}),m=v(()=>{var S,C;return!n(u)&&(((S=n(d))!=null?S:1/0)<=699||((C=n(s))!=null?C:1/0)<=599)}),p=e.onUpcomingLiveViewStateChanged?_2(()=>{cancelAnimationFrame(l),l=requestAnimationFrame(()=>{let S={type:n(o)?"expired":"default",size:n(u)?"s":n(m)?"m":"l"},C=n(o)?n(r):n(a);e.onUpcomingLiveViewStateChanged(S,C)})},300):void 0;Oe(()=>{n(s),n(d),n(o),p==null||p()}),pn(()=>{if(cancelAnimationFrame(l),p==null||p.cancel(),e.onUpcomingLiveViewStateChanged){let S={type:n(o)?"expired":"default",size:n(u)?"s":n(m)?"m":"l"};e.onUpcomingLiveViewStateChanged(S)}});var f=y2();f.__contextmenu=function(...S){var C;(C=e.onContextMenu)==null||C.apply(this,S)},f.__click=function(...S){var C;(C=e.onClick)==null||C.apply(this,S)};var $=T(f);{var y=S=>{var C=b2(),I=T(C);let N;var P=T(I,!0);w(I),w(C),je(C,E=>O(r,E),()=>n(r)),D((E,k)=>{N=se(I,1,"waiting__title s-r",null,N,E),me(P,k)},[()=>({medium:n(m),small:n(u)}),()=>G("waiting_live_upcoming_title")]),b(S,C)},_=S=>{var C=$2(),I=T(C);let N;var P=T(I,!0);w(I);var E=L(I,2);let k=v(()=>n(u)||n(m)),Q=v(()=>i()||0);jm(E,{get isSmallSize(){return n(k)},get startTime(){return n(Q)},onTimerOver:()=>O(o,!0)}),w(C),je(C,H=>O(a,H),()=>n(a)),D((H,z)=>{N=se(I,1,"timer__title s-r",null,N,H),me(P,z)},[()=>({medium:n(m),small:n(u)}),()=>G("waiting_live_timer_title")]),b(S,C)};R($,S=>{n(o)?S(y):S(_,!1)})}w(f),D(()=>Qe(f,`background-image: url(${e.thumbUrl})`)),En(f,"clientWidth",S=>O(d,S)),En(f,"clientHeight",S=>O(s,S)),b(t,f),F()}tt(["contextmenu","click"]);var w2=M('<div class="waiting-container s-s"><div class="waiting-caption s-s"><!> <p class="waiting-title s-s"> </p></div></div>'),S2={hash:"s-s",code:'.waiting-container.s-s{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-s,.waiting-container.s-s:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-s:before{backdrop-filter:blur(10px);background-color:rgba(0,0,0,.4);content:""}.waiting-caption.s-s{align-items:center;display:flex;flex-direction:column;position:relative}.waiting-title.s-s{font-size:20px;font-weight:400;line-height:1.2;margin:0;padding:20px;text-align:center}'};function ja(t,e){B(e,!0),q(t,S2);let i=g(e,"thumbUrl",3,""),o={recover:G("waiting_live_recover_title"),record:G("waiting_record_title")},r=v(()=>o[e.kind]||"");var a=w2();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=T(a),d=T(l);Ba(d,{style:"position: static; transform: translate(0, 0)"});var s=L(d,2),u=T(s,!0);w(s),w(l),w(a),D(()=>{Qe(a,`background-image: url('${i()}')`),me(u,n(r))}),b(t,a),F()}tt(["contextmenu","click"]);var T2=Ce('<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=T2();b(e,o)},$$slots:{default:!0}})}var C2=M('<div class="select-icon s-1x"><!></div>'),I2={hash:"s-1x",code:".select-icon.s-1x{margin-right:auto;opacity:.9;padding-right:12px;position:relative;top:3px}"};function hc(t){q(t,I2);var e=C2(),i=T(e);Xm(i,{}),w(e),b(t,e)}var E2=(t,e)=>{t.stopPropagation(),e.item.selectItem(e.item.value)},P2=(t,e)=>{Dl(t,()=>e.item.selectItem(e.item.value))},A2=M("<p> </p>"),k2=M('<p class="sublabel s-1s"> </p>'),L2=M('<li role="menuitem" tabindex="0"><!> <div><!> <!></div></li>'),M2={hash:"s-1s",code:".menu-item-value.s-1s{align-items:end;display:flex;flex-direction:column;min-width:0}.menu-item-value[data-selected=false].s-1s{--select-icon-width:16px;--icon-padding:12px;margin-left:calc(var(--icon-padding) + var(--select-icon-width))}.label.s-1s,.sublabel.s-1s{max-width:100%;overflow:hidden;text-overflow:ellipsis}.sublabel.s-1s{opacity:.5}"};function Zm(t,e){B(e,!0),q(t,M2);let i=g(e,"isMobile",3,!1);var o=L2();let r;o.__click=[E2,e],o.__keydown=[P2,e];var a=T(o);{var l=y=>{hc(y,{})};R(a,y=>{e.item.selected&&y(l)})}var d=L(a,2);let s;var u=T(d);{var m=y=>{var _=Le(),S=de(_);Di(S,()=>e.item.valueComponent,(C,I)=>{I(C,Ps(()=>{var N;return(N=e.item.valueComponentParams)!=null?N:{}}))}),b(y,_)},p=y=>{var _=A2();let S;var C=T(_,!0);w(_),D(I=>{var N;S=se(_,1,"label s-1s",null,S,I),me(C,(N=e.item.label)!=null?N:e.item.value)},[()=>({mobile:i()})]),b(y,_)};R(u,y=>{e.item.valueComponent?y(m):y(p,!1)})}var f=L(u,2);{var $=y=>{var _=k2(),S=T(_,!0);w(_),D(()=>me(S,e.item.sublabel)),b(y,_)};R(f,y=>{e.item.sublabel&&y($)})}w(d),w(o),D((y,_,S)=>{r=se(o,1,"item",null,r,y),Ve(o,"data-value",e.item.value),Ve(o,"aria-label",_),Ve(o,"data-testid",e.item.dataTestid),s=se(d,1,"menu-item-value s-1s",null,s,S),Ve(d,"data-selected",e.item.selected)},[()=>({mobile:i()}),()=>{var y,_;return(_=(y=e.item.ariaLabel)!=null?y:e.item.label)!=null?_:e.item.value.toString()},()=>({"submenu-value-mobile":i()})]),b(t,o),F()}tt(["click","keydown"]);var V2=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=v(()=>()=>e.openSubMenuList(e.item.children)),a=v(()=>_=>Ru(_,n(r)));var l=V2();let d;l.__click=function(..._){var S;(S=n(r))==null||S.apply(this,_)},l.__keydown=function(..._){var S;(S=n(a))==null||S.apply(this,_)};var s=T(l);{var u=_=>{hc(_,{})};R(s,_=>{e.item.selected&&_(u)})}var m=L(s,2);let p;var f=T(m);{var $=_=>{var S=Le();let C=v(()=>e.item.valueComponent);var I=de(S);Di(I,()=>n(C),(N,P)=>{P(N,Ps(()=>{var E;return(E=e.item.valueComponentParams)!=null?E:{}}))}),b(_,S)},y=_=>{var S=ps();D(()=>me(S,e.item.label)),b(_,S)};R(f,_=>{e.item.valueComponent?_($):_(y,!1)})}w(m),w(l),je(l,_=>o(o()[e.item.id]=_,!0),()=>{var _;return(_=o())==null?void 0:_[e.item.id]}),D((_,S)=>{var C;d=se(l,1,"item",null,d,_),Ve(l,"aria-label",(C=e.item.ariaLabel)!=null?C:e.item.label),Ve(l,"data-testid",e.item.id),p=se(m,1,"menu-item-value",null,p,S)},[()=>({mobile:i(),bottomBordered:e.item.bottomBordered}),()=>({"submenu-value-mobile":i()})]),b(t,l),F()}tt(["click","keydown"]);var Jr={"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 N2=(t,e)=>{N_(t,e.returnFromSubMenu,e.closeSettingsMenu)},O2=(t,e)=>{t.stopPropagation(),e.returnFromSubMenu()},D2=(t,e)=>{Fd(t)&&(Vr(t),e.returnFromSubMenu())},B2=M('<div><ul role="menu"><li role="menuitem" tabindex="0" data-testid="return-to-settings-menu"><!> <p class="title s-1m"> </p></li> <!></ul></div>'),F2={hash:"s-1m",code:".sub-menu.s-1m{--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-1m .item.mobile{font-size:14px;line-height:var(--item-label-line-height);padding:var(--item-padding-vertical-mobile) 17px}.sub-menu.s-1m{padding-top:calc(var(--edge-item-padding-vertical) + var(--item-padding-vertical) + var(--item-label-line-height))}.sub-menu.mobile.s-1m{padding-top:calc(var(--edge-item-padding-vertical-mobile) + var(--item-padding-vertical-mobile) + var(--item-label-line-height) + 1px)}.sub-menu.s-1m .items:where(.s-1m) .item.header:where(.s-1m){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-1m .title:where(.s-1m){margin-left:8px}.sub-menu.s-1m .item{padding:var(--item-padding-vertical) 12px;padding-right:22px}.items.s-1m .item:first-child:not(.mobile){padding-top:var(--edge-item-padding-vertical)}.items.s-1m .item:last-child:not(.mobile){padding-bottom:var(--edge-item-padding-vertical)}.items.s-1m .item.mobile:first-child{padding-top:var(--edge-item-padding-vertical-mobile)}.items.s-1m .item.mobile:last-child{padding-bottom:var(--edge-item-padding-vertical-mobile)}.sub-menu.s-1m .item.bottomBordered{border-bottom:var(--divider-border)}.sub-menu.s-1m .item .sublabel{font-size:12px;line-height:14px}.item.s-1m:not(.mobile) p:where(.s-1m),.sub-menu.s-1m .item:not(.mobile) .label{font-size:13px;line-height:var(--item-label-line-height)}"};function tv(t,e){B(e,!0),q(t,F2);let[i,o]=Re(),r=()=>x(p,"$isFullscreen",i),a=()=>x(f,"$playerSize",i),l=g(e,"isMobile",3,!1),d=g(e,"playerControlsHeight",3,0),s=g(e,"ariaLabelReturnFromSubMenu",19,()=>G("aria_label_submenu_back")),u=g(e,"listRef",15);Mt(()=>{let X=e.items.findIndex(re=>re.selected);u().children[X+1].focus()});let m=ve(),p=m.ui.isFullscreen,f=m.ui.playerSize,$=K(void 0),y=K(0),_=K(0),S=v(()=>l()&&r()?`max-height: ${Math.round(a().height*.6)}px`:l()?"":`max-height: ${a().height-32-n(_)-d()}px; overflow: auto;`),C=v(()=>Math.max(e.minWidth,n(y)));var I=B2();let N;var P=T(I);let E;P.__keydown=[N2,e];var k=T(P);let Q;k.__click=[O2,e],k.__keydown=[D2,e];var H=T(k);Mr(H,{direction:"left"});var z=L(H,2),Y=T(z,!0);w(z),w(k),je(k,X=>O($,X),()=>n($));var le=L(k,2);wi(le,17,()=>e.items,xd,(X,re)=>{var Z=Le(),we=de(Z);{var ue=_e=>{Zm(_e,{get item(){return n(re)},get isMobile(){return l()}})},ne=(_e,xe)=>{{var J=Ne=>{Jm(Ne,{get isMobile(){return l()},get item(){return n(re)},get openSubMenuList(){return e.openSubMenuList},get refMenuItems(){return e.refMenuItems}})};R(_e,Ne=>{n(re).type==="OPEN_SUB_MENU"&&Ne(J)},xe)}};R(we,_e=>{n(re).type==="SELECT_VALUE"?_e(ue):_e(ne,!1)})}b(X,Z)}),w(P),je(P,X=>u(X),()=>u()),w(I),D((X,re,Z)=>{N=se(I,1,"sub-menu menu s-1m",null,N,X),Ve(I,"data-testid",`${e.id}-sub-menu`),Qe(I,`min-width: ${n(C)}px`),E=se(P,1,"items s-1m",null,E,re),Qe(P,n(S)),Q=se(k,1,"item header back s-1m",null,Q,Z),Ve(k,"aria-label",s()),me(Y,e.title)},[()=>({desktop:!l(),mobile:l()}),()=>({mobile:l()}),()=>({mobile:l()})]),En(k,"clientWidth",X=>O(y,X)),En(k,"clientHeight",X=>O(_,X)),b(t,I),F(),o()}tt(["keydown","click"]);import{noop as H2}from"@vkontakte/videoplayer-shared/es2015";var U2=(t,e)=>Ru(t,e()),z2=(t,e)=>{t.stopPropagation(),e()()},W2=M('<div class="value s-1l"> </div>'),K2=M('<li role="menuitem" tabindex="0" aria-haspopup="true"><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></li>'),q2={hash:"s-1l",code:".value.s-1l{opacity:.7;overflow:hidden;position:relative;text-overflow:ellipsis}"};function iv(t,e){B(e,!0),q(t,q2);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,H2),r=g(e,"valueComponent",3,void 0),a=g(e,"ref",15);var l=K2();let d;l.__click=[z2,o],l.__keydown=[U2,o];var s=T(l),u=T(s);{var m=C=>{Wa(C,{get icon(){return e.icon}})},p=C=>{var I=Le();let N=v(()=>e.icon);var P=de(I);Di(P,()=>n(N),(E,k)=>{k(E,{})}),b(C,I)};R(u,C=>{typeof e.icon=="string"?C(m):C(p,!1)})}w(s);var f=L(s,2),$=T(f,!0);w(f);var y=L(f,2);{var _=C=>{var I=Le();let N=v(r);var P=de(I);Di(P,()=>n(N),(E,k)=>{k(E,{})}),b(C,I)},S=C=>{var I=W2(),N=T(I,!0);w(I),D(()=>me(N,e.value)),b(C,I)};R(y,C=>{r()?C(_):C(S,!1)})}w(l),je(l,C=>a(C),()=>a()),D(C=>{d=se(l,1,"item",null,d,C),Ve(l,"aria-label",e.ariaLabel),Ve(l,"data-testid",e.id),me($,e.label)},[()=>({mobile:i()})]),b(t,l),F()}tt(["click","keydown"]);import{noop as bb}from"@vkontakte/videoplayer-shared/es2015";var Q2=(t,e)=>{Dl(t,()=>e())},G2=M('<div class="icon icon-error-stub"><div class="inner"></div></div>'),Y2=M('<img class="icon" aria-hidden="true"/>'),j2=M('<li role="menuitem" tabindex="0"><div class="icon-wrapper"><!></div> <div class="label s-1n"> </div></li>'),X2={hash:"s-1n",code:".label.s-1n{overflow:hidden;text-overflow:ellipsis}"};function ov(t,e){B(e,!0),q(t,X2);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,bb),r=g(e,"closeSettings",3,bb),a=K(!1),l=()=>{O(a,!0)},d=S=>{S==null||S.stopPropagation(),o()(),r()()};var s=j2();let u;s.__click=d,s.__keydown=[Q2,d];var m=T(s),p=T(m);{var f=S=>{var C=Le(),I=de(C);{var N=E=>{var k=G2();b(E,k)},P=E=>{var k=Y2();D(()=>Ve(k,"src",e.icon)),gt("error",k,l),Ea(k),b(E,k)};R(I,E=>{n(a)?E(N):E(P,!1)})}b(S,C)},$=S=>{var C=Le();let I=v(()=>e.icon);var N=de(C);Di(N,()=>n(I),(P,E)=>{E(P,{})}),b(S,C)};R(p,S=>{typeof e.icon=="string"?S(f):S($,!1)})}w(m);var y=L(m,2),_=T(y,!0);w(y),w(s),D(S=>{var C;u=se(s,1,"item",null,u,S),Ve(s,"aria-label",(C=e.ariaLabel)!=null?C:e.label),Ve(s,"data-testid",e.id),me(_,e.label)},[()=>({mobile:i()})]),b(t,s),F()}tt(["click","keydown"]);import{noop as eT}from"@vkontakte/videoplayer-shared/es2015";var Z2=M('<div class="toggle_wrap s-1r"><div></div> <div class="toggle-label s-1r"></div></div>'),J2={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){q(t,J2);let i=g(e,"enabled",3,!1);var o=Z2(),r=T(o);let a;vi(2),w(o),D(l=>a=se(r,1,"toggle s-1r",null,a,l),[()=>({on:i()})]),b(t,o)}var tT=(t,e,i)=>{O_(t,e(),o=>i()(o))},iT=(t,e,i)=>{t.stopPropagation(),e()(!i())},oT=M('<div><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></div>'),nT=M('<li role="menuitem" tabindex="0"><!></li>');function rv(t,e){B(e,!0);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,eT),r=g(e,"enabled",3,!1),a=g(e,"tooltipText",3,void 0),l=g(e,"maxTooltipWidth",3,void 0);var d=nT();let s;d.__click=[iT,o,r],d.__keydown=[tT,r,o];var u=T(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 f=oT();let $;var y=T(f),_=T(y);{var S=E=>{Wa(E,{get icon(){return e.icon}})},C=E=>{var k=Le();let Q=v(()=>e.icon);var H=de(k);Di(H,()=>n(Q),(z,Y)=>{Y(z,{})}),b(E,k)};R(_,E=>{typeof e.icon=="string"?E(S):E(C,!1)})}w(y);var I=L(y,2),N=T(I,!0);w(I);var P=L(I,2);nv(P,{get enabled(){return r()}}),w(f),D(E=>{$=se(f,1,"switch-wrapper",null,$,E),me(N,e.label)},[()=>({mobile:i()})]),b(m,f)},$$slots:{default:!0}}),w(d),D(m=>{var p;s=se(d,1,"item switch-item",null,s,m),Ve(d,"aria-label",(p=e.ariaLabel)!=null?p:e.label),Ve(d,"data-testid",e.id)},[()=>({mobile:i()})]),b(t,d),F()}tt(["click","keydown"]);import{isValidURL as PT,VideoQuality as Ab}from"@vkontakte/videoplayer-shared/es2015";var $b=()=>{let t=K(ci([])),e=v(()=>(n(t).length?n(t).at(-1):null)||null);return{get current(){return n(e)},pushSubMenu:i=>{n(t).push(i)},popSubMenu:()=>{O(t,n(t).slice(0,-1),!0)},popAllSubMenus:()=>{O(t,[],!0)}}};import{getVideoQualityLabel as rT}from"@vkontakte/videoplayer-shared/es2015";var sT=M('<div class="quality-icon s-1q"><!></div>'),aT=M('<div class="quality-label s-1q"><span> </span> <!></div>'),lT={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 Xa(t,e){B(e,!0),q(t,lT);let i=g(e,"isSubCase",3,!1),o=v(()=>e.quality?rT(e.quality):""),r=v(()=>Hu(e.quality));var a=aT(),l=T(a);let d;var s=T(l,!0);w(l);var u=L(l,2);{var m=p=>{var f=sT();let $=v(()=>n(r));var y=T(f);Di(y,()=>n($),(_,S)=>{S(_,{})}),w(f),D(()=>Ve(f,"data-testid",`${n(o)}-icon`)),b(p,f)};R(u,p=>{n(r)&&!e.isMobile&&p(m)})}w(a),D(p=>{d=se(l,1,"s-1q",null,d,p),me(s,e.label)},[()=>({sub:!i(),quality:!e.isMobile})]),b(t,a),F()}import{VideoQuality as dT}from"@vkontakte/videoplayer-shared/es2015";import{VideoQuality as yb}from"@vkontakte/videoplayer-core/es2015";var xb=({quality:t,availableQualities:e})=>{let i=e.find(o=>o.value===t);return i?i.displayValue:t},wb=({quality:t,availableQualities:e,isAutoQualityEnabled:i})=>{if(!t)return"...";let o=xb({quality:t,availableQualities:e});return i?t===yb.INVARIANT?G("auto_quality_invariant"):G("auto_quality",{actual:o}):o},Sb=({quality:t,availableQualities:e,prefix:i,onlyPrefix:o})=>t?o||t===yb.INVARIANT?i:`${i}${xb({quality:t,availableQualities:e})}`:"...";var cT=M('<div class="menu-item-value-wrapper s-1t"><!></div>'),uT={hash:"s-1t",code:".menu-item-value-wrapper.s-1t{line-height:normal}"};function Yl(t,e){B(e,!0),q(t,uT);let[i,o]=Re(),r=()=>x(s,"$currentQuality$",i),a=()=>x(u,"$availableQualities$",i),l=()=>x(m,"$isMobile$",i),d=ve(),s=d.state.currentQuality$,u=d.state.availableQualities$,m=d.ui.isMobile,p=" · ",f=v(()=>e.prefix+(e.selected&&r()!==dT.INVARIANT?p:"")),$=v(()=>Sb({prefix:n(f),quality:r(),availableQualities:a(),onlyPrefix:!e.selected}));var y=cT(),_=T(y);let S=v(()=>e.selected?r():void 0);Xa(_,{get quality(){return n(S)},get label(){return n($)},get isMobile(){return l()},isSubCase:!0}),w(y),b(t,y),F(),o()}var pT=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")},fT={br:!0,span:!0},sv=(t,e={})=>{var d,s,u,m,p,f,$;if(!t)return t;let i=Ie(Ie({},fT),e),o=Object.keys(i);if(!o.length)return t;let r=pT(o),a=[],l=0;for(let y of t.matchAll(r)){let _=y[0],S=((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:C}=y;if(!i[S]){a.push(t.slice(l,C)),l=C+_.length;continue}let I=(p=y.groups)!=null&&p.childrenhtml?sv(y.groups.childrenhtml,i):"",N=(f=y.groups)!=null&&f.childrenhtml?_.replace(new RegExp(($=y.groups)==null?void 0:$.childrenhtml),()=>I||""):_;a.push(t.slice(l,C),N),l=C+_.length}return l===0?t:(a.push(t.slice(l)),a.join(""))};function _c(t,e){B(e,!1);let i=g(e,"message",8),o=sv(i());xo();var r=Le(),a=de(r);{var l=d=>{var s=Le(),u=de(s);wd(u,()=>o),b(d,s)};R(a,d=>{o&&d(l)})}b(t,r),F()}var mT=M('<p class="quality-applies sublabel s-1u"><!></p>'),vT={hash:"s-1u",code:".quality-applies.s-1u{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),q(t,vT),xo();var i=mT(),o=T(i);let r=wn(()=>G("quality_applience",{action:`<span>${G("quality_applience_action")}</span>`}));_c(o,{get message(){return n(r)}}),w(i),b(t,i),F()}var Cb=({isAutoQualityEnabled:t,trafficSavingEnabled:e,highQualityEnabled:i})=>{let o=!t&&!e&&!i;return{id:"quality-other-settings",type:"OPEN_SUB_MENU",selected:o,valueComponent:Yl,valueComponentParams:{prefix:G("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:G("auto_quality_limit"),valueComponent:e?Yl:void 0,valueComponentParams:{prefix:G("auto_quality_limit"),selected:i},selectItem:()=>o("auto",t),selected:i}),Ib=()=>({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:G("high_quality"),valueComponent:t?Yl:void 0,valueComponentParams:{prefix:G("high_quality"),selected:i},sublabel:G("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:G("traffic_saving_quality"),valueComponent:t?Yl:void 0,valueComponentParams:{prefix:G("traffic_saving_quality"),selected:i},sublabel:G("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=tc(i))!=null?l:i),o&&i&&r){let d=e.filter(s=>s.label===o&&s.language===i);if(d.length===1)return G("audio_stream_display_language_label",{language:r,label:o});{let s=ip(t,d);return G("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 G("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 G("audio_stream_display_language_index",{language:r,index:s})}}let a=ip(t,e);return G("audio_stream_display_unknown",{index:a})};var gT={"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:G("submenu_quality"),id:"quality-settings",items:[Ib(t),...a.map(({handler:l,selected:d})=>l({labelWithQuality:!0,appliesTo:"to-video",selected:d},t)),Cb(t)]}},"quality-other-settings":({closeSettingsMenu:t,selectQuality:e,availableQualities:i,isMobile:o})=>({id:"quality-other-settings",title:G("submenu_quality"),closeSettingsMenu:t,items:i.map(r=>({type:"SELECT_VALUE",value:r.value,valueComponent:Xa,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:G("default_quality_for_any_video"),closeSettingsMenu:e,items:[{handler:lv,selected:((i=wu())==null?void 0:i.type)==="auto_quality"},{handler:cv,selected:((o=wu())==null?void 0:o.type)==="traffic_saving"},{handler:dv,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-languages":({closeSettingsMenu:t,availableAudioStreams:e,currentAudioStream:i,selectAudioLanguage:o})=>({id:"audio-languages",title:G("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:G("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:G("subtitles_caption"),items:t.map(i=>({type:"SELECT_VALUE",value:i.value,selectItem:()=>e(i),selected:i.selected,label:i.displayValue,dataTestid:i.value===kn?"sub_off":void 0}))})},Eb=({subMenuId:t,context:e})=>t?[gT[t](e)]:[];var hT=Ce('<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=hT();b(e,o)},$$slots:{default:!0}})}var _T=Ce('<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=_T();b(e,o)},$$slots:{default:!0}})}var bT=Ce('<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=bT();b(e,o)},$$slots:{default:!0}})}var $T=Ce('<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=$T();b(e,o)},$$slots:{default:!0}})}var yT=Ce('<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=yT();b(e,o)},$$slots:{default:!0}})}var xT=Ce('<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){Xe(t,{children:(e,i)=>{var o=xT();b(e,o)},$$slots:{default:!0}})}var wT=Ce('<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=wT();b(e,o)},$$slots:{default:!0}})}var ST=M('<div class="menu-item-value-wrapper s-1w"><!></div>'),TT={hash:"s-1w",code:".menu-item-value-wrapper.s-1w{line-height:normal}"};function hv(t,e){B(e,!0),q(t,TT);let[i,o]=Re(),r=()=>x(u,"$currentQuality$",i),a=()=>x(m,"$availableQualities$",i),l=()=>x(p,"$isAutoQualityEnabled$",i),d=()=>x(f,"$isMobile$",i),s=ve(),u=s.state.currentQuality$,m=s.state.availableQualities$,p=s.state.isAutoQualityEnabled$,f=s.ui.isMobile,$=v(()=>wb({quality:r(),availableQualities:a(),isAutoQualityEnabled:l()}));var y=ST(),_=T(y);Xa(_,{get quality(){return r()},get label(){return n($)},get isMobile(){return d()}}),w(y),b(t,y),F(),o()}var IT={"quality-settings":({isAutoQualityEnabled:t,currentQuality:e,qualityDetailsSubMenuEnabled:i})=>{let o=(t?G("auto_quality_option"):e)||"";return{id:"quality-settings",type:"OPEN_SUB_MENU",ariaLabel:G("aria_label_menu_quality",{actual:o}),icon:Qd,label:G("menu_quality"),value:e,valueComponent:hv,weight:Jr["quality-settings"],children:i?"quality-settings":"quality-other-settings"}},"traffic-saving-switch":({trafficSavingEnabled:t,toggleTrafficSaving:e})=>({id:"traffic-saving-switch",weight:Jr["traffic-saving-settings"],type:"SWITCH",onClick:i=>e(i,"to-video"),ariaLabel:G("aria_label_submenu_traffic_saving"),icon:uv,label:G("menu_traffic_saving"),enabled:t,tooltipText:G("traffic_saving_helper_text"),maxTooltipWidth:175}),"audio-languages-settings":({currentAudioStream:t,availableAudioStreams:e})=>{let i=op(t,e);return{id:"audio-languages-settings",weight:Jr["audio-language-settings"],type:"OPEN_SUB_MENU",ariaLabel:G("aria_label_menu_audio_languages",{actual:i}),icon:pv,label:G("menu_audio_languages"),value:i,children:"audio-languages"}},"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:Jr["playback-rate-settings"],type:"OPEN_SUB_MENU",ariaLabel:G("aria_label_menu_rate",{actual:i}),icon:fv,label:G("menu_playback_rate"),value:`${e}x`,children:"playback-rate"}},"subtitles-settings":({currentSubtitle:t})=>({id:"subtitles-settings",weight:Jr["subtitles-settings"],type:"OPEN_SUB_MENU",ariaLabel:G("aria_label_menu_subtitle",{actual:t.displayValue}),icon:sa,label:G("subtitles_caption"),value:t.displayValue,children:"subtitles"}),download:({onDownloadClick:t})=>({id:"download",weight:Jr.download,type:"CLICK",onClick:t,label:G("download_video_caption"),ariaLabel:G("aria_label_menu_download"),icon:mv}),"show-support":({onReportProblemClick:t})=>({id:"show-support",weight:Jr.report,type:"CLICK",onClick:t,label:G("menu_report"),ariaLabel:`${G("menu_report")}. ${G("aria_label_new_tab_alert")}`,icon:vv,isHiddenFor:["desktop"]}),"copy-data":({onCopyDataClick:t})=>({id:"copy-data",weight:Jr["copy-data"],type:"CLICK",onClick:t,label:G("menu_copy_debug"),ariaLabel:G("menu_copy_debug"),icon:np,isHiddenFor:["desktop"]}),"save-trace-info":({onSaveTraceDataClick:t})=>({id:"save-trace-info",weight:Jr["save-trace-info"],type:"CLICK",onClick:t,label:G("menu_save_debug"),ariaLabel:G("menu_save_debug"),icon:np,isHiddenFor:["desktop"]}),"debug-info":({toggleShowDebugInfo:t})=>({id:"debug-info",weight:Jr["debug-info"],type:"CLICK",onClick:t,ariaLabel:G("aria_label_menu_debug_overlay"),label:G("menu_debug_overlay"),icon:gv,isHiddenFor:["desktop"]})},Pb=({items:t,context:e,additionalSettingsMenuItems:i})=>{let{isMobile:o}=e;return[...t.map(r=>IT[r](e)),...i.map(r=>Gt(Ie({},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 AT=(t,e)=>{Vu(t,e)},kT=M('<div><div> </div> <div class="close s-u"></div></div>'),LT=M('<div data-testid="settings-menu" role="presentation"><!> <ul role="menu"></ul></div>'),MT=M("<div><!> <!></div>"),VT={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 bc(t,e){B(e,!0),q(t,VT);let[i,o]=Re(),r=()=>x(Be,"$settingsMenuVisible",i),a=()=>x(it,"$settingsMenuOpenedByKeyboard",i),l=()=>x(Fe,"$debugPanelVisible",i),d=()=>x(ke,"$isMobile",i),s=()=>x(Ae,"$playerSize",i),u=()=>x(De,"$hasMpegSources$",i),m=()=>x(Pe,"$mobileNotReportControlHidden$",i),p=()=>x(J,"$autoQualityLimitingAvailable$",i),f=()=>x(j,"$availableSubtitlesList$",i),$=()=>x(Ue,"$isLiveWithPlaybackSpeed",i),y=()=>x(ne,"$availableAudioStreams$",i),_=()=>x(We,"$availablePlaybackRates$",i),S=()=>x(ue,"$currentAudioStream$",i),C=()=>x(A,"$currentPlaybackRate$",i),I=()=>x(Ze,"$trafficSavingEnabled",i),N=()=>x(_e,"$currentQuality$",i),P=()=>x(Ne,"$isAutoQualityEnabled$",i),E=()=>x(Te,"$currentSubtitle$",i),k=()=>x(pt,"$additionalSettingsMenuItems$",i),Q=()=>x(pe,"$isAutoQualityAvailable$",i),H=()=>x(xe,"$availableQualities$",i),z=()=>x(ye,"$highQualityEnabled",i),Y=g(e,"ref",15,void 0),le=g(e,"playerControlsHeight",3,0),X=ci({}),re=ci({}),Z=ve(),we=Vt(),ue=Z.state.audioStream$,ne=Z.state.availableAudioStreams$,_e=Z.state.currentQuality$,xe=Z.state.availableQualities$,J=Z.state.autoQualityLimitingAvailable$,Ne=Z.state.isAutoQualityEnabled$,pe=Z.state.isAutoQualityAvailable$,A=Z.state.currentPlaybackRate$,We=Z.state.availablePlaybackRates$,Te=Z.state.currentSubtitle$,j=Z.state.availableSubtitlesList$,ie=Z.state.canDownload,De=Z.state.hasMpegSources$,Be=Z.ui.settingsMenu.visible$,it=Z.ui.settingsMenu.openedByBtnKeyboard$,U=Z.ui.settingsMenu.ref$,ke=Z.ui.isMobile,Pe=Z.ui.mobileNotReportControlHidden$,Ue=Z.state.canChangePlaybackSpeed$,Ze=Z.state.trafficSavingEnabled$,ye=Z.state.highQualityEnabled$,Ae=Z.ui.playerSize,Fe=Z.ui.debugPanelVisible,Dt=Z.state.isInteractiveTime$,pt=Z.ui.additionalSettingsMenuItems$,Bt=Z.ui.t,st=Z.actions.internal.downloadVideo,St=Z.actions.internal.closeSettingsMenu,ti=Z.actions.internal.openSettingsSubMenu,Rt=Z.actions.internal.closeSettingsSubMenu,$e=K(!1),be=K(void 0),ee=$b();Oe(()=>{!r()&&ee.current&&(Rt(re[ee.current]),ee.popAllSubMenus())}),Oe(()=>{r()||O(be,void 0)}),Oe(()=>{!ee.current&&n(be)&&R_(X,n(be))}),Oe(()=>{Y()&&U.set(Y())});function ot(Tt){return mt(this,null,function*(){var W;ee.pushSubMenu(Tt),yield _o(),ti(Tt,re[Tt]);let Ut=(W=Y())==null?void 0:W.firstElementChild;Ut&&Uf(Ut)})}function fe(Tt){var Ut;Tt==null||Tt.stopPropagation(),a()||(Ut=e.returnFocus)==null||Ut.call(e),St(),O($e,!1)}function Me(Tt,Ut){Z.actions.internal.setQuality(Tt,{appliesTo:Ut}),fe()}function $t(Tt){Z.actions.internal.setAudioStream(Tt),fe()}function At(Tt,Ut){Z.actions.internal.setTrafficSavingEnabled(Tt,Ut),we.features.qualityDetailsSubMenuEnabled&&fe()}function ct(Tt,Ut){Z.actions.internal.setHighQualityEnabled(Tt,Ut),fe()}function ce(Tt){Z.actions.internal.setPlaybackRate(Tt),fe()}function ze(Tt){Z.actions.internal.setSubtitle(Tt),fe()}function Ge(){st()}function at(){PT(e.supportLink)&&window.open(e.supportLink,"_blank"),Z.actions.internal.reportProblem(),Z.actions.internal.pause()}function Ft(){Nl(Z.actions.internal.getDebugTextData())}let Ht=()=>{let Tt=Z.actions.internal.getTraceTextData(),Ut=new Blob([...Tt],{type:"application/json"}),W=window.URL.createObjectURL(Ut);La(W,"vk_player_trace_info","json")};function oi(){Fe.set(!l())}function yi(){O($e,!0)}function ji(){O($e,!1)}function Nt(){return d()?`max-height: ${Math.round(s().height*.6)}px`:`max-height: ${s().height-32-le()}px; overflow: auto;`}let fi=v(()=>ie&&u()&&!m()),hi=v(()=>we.features.trafficSaving&&!m()&&p()&&!we.features.qualityDetailsSubMenuEnabled),ht=v(()=>f().length>0&&!m()),Xt=v(()=>!!$()&&!m()),Si=v(()=>we.features.audioLanguages&&y().length>=2&&!m()),Xi=v(()=>!m());Mt(()=>Dt.subscribe(Tt=>{Tt&&!d()&&!n($e)&&!a()&&fe()}));let Jt=v(()=>{let Tt=[n(Xi)&&"quality-settings",n(Si)&&"audio-languages-settings",n(Xt)&&"playback-rate-settings",n(ht)&&"subtitles-settings",n(hi)&&"traffic-saving-switch",n(fi)&&"download",we.showSupport&&"show-support","copy-data",we.features.saveTraceInfoToFile&&"save-trace-info","debug-info"].filter(Ut=>!!Ut);return Pb({items:Tt,context:{qualityDetailsSubMenuEnabled:we.features.qualityDetailsSubMenuEnabled,availablePlaybackRates:_(),currentAudioStream:S(),availableAudioStreams:y(),currentPlaybackRate:C(),selectPlaybackRate:ce,trafficSavingEnabled:I(),toggleTrafficSaving:At,currentQuality:N()||Ab.INVARIANT,isAutoQualityEnabled:P()||!1,currentSubtitle:E(),isMobile:d(),onDownloadClick:Ge,onCopyDataClick:Ft,onReportProblemClick:at,onSaveTraceDataClick:Ht,toggleShowDebugInfo:oi},additionalSettingsMenuItems:k()})}),Et=v(()=>Eb({subMenuId:ee.current,context:{availablePlaybackRates:_(),selectPlaybackRate:ce,trafficSavingEnabled:I(),toggleTrafficSaving:At,currentQuality:N()||Ab.INVARIANT,isAutoQualityEnabled:P()||!1,isAutoQualityAvailable:Q()||!1,availableQualities:H(),highQualityEnabled:z(),toggleHighQuality:ct,availableAudioStreams:y(),availableSubtitlesList:f(),closeSettingsMenu:St,currentAudioStream:S(),isMobile:d(),selectAudioLanguage:$t,selectQuality:Me,selectSubtitle:ze}}));var Ke=MT();let Ti;var bo=T(Ke);{var So=Tt=>{var Ut=LT();let W;Ut.__keydown=[AT,St];var kt=T(Ut);{var di=Yt=>{var nt=kT();let Fi;var Hi=T(nt),Zo=T(Hi,!0);w(Hi);var To=L(Hi,2);To.__click=fe,w(nt),D((Ui,Zi)=>{Fi=se(nt,1,"item header s-u",null,Fi,Ui),me(Zo,Zi)},[()=>({mobile:d()}),()=>Bt("submenu_settings")]),b(Yt,nt)};R(kt,Yt=>{d()&&Yt(di)})}var lt=L(kt,2);let wt;wi(lt,21,()=>n(Jt),Yt=>Yt.id,(Yt,nt)=>{var Fi=Le(),Hi=de(Fi);{var Zo=Ui=>{iv(Ui,{get isMobile(){return d()},get id(){return n(nt).id},get icon(){return n(nt).icon},get label(){return n(nt).label},get ariaLabel(){return n(nt).ariaLabel},get value(){return n(nt).value},get valueComponent(){return n(nt).valueComponent},onClick:()=>{ot(n(nt).children),O(be,n(nt).id,!0)},get ref(){return X[n(nt).id]},set ref(Zi){X[n(nt).id]=Zi}})},To=(Ui,Zi)=>{{var Rr=ro=>{let Ai=v(()=>`${n(nt).id}-menu-item`);ov(ro,{get isMobile(){return d()},get id(){return n(Ai)},get onClick(){return n(nt).onClick},get icon(){return n(nt).icon},get label(){return n(nt).label},get ariaLabel(){return n(nt).ariaLabel},closeSettings:fe})},$o=(ro,Ai)=>{{var Jo=en=>{let Ln=v(()=>`${n(nt).id}-menu-item`);rv(en,{get isMobile(){return d()},get id(){return n(Ln)},get onClick(){return n(nt).onClick},get icon(){return n(nt).icon},get label(){return n(nt).label},get ariaLabel(){return n(nt).ariaLabel},get enabled(){return n(nt).enabled},get tooltipText(){return n(nt).tooltipText},get maxTooltipWidth(){return n(nt).maxTooltipWidth}})};R(ro,en=>{n(nt).type==="SWITCH"&&en(Jo)},Ai)}};R(Ui,ro=>{n(nt).type==="CLICK"?ro(Rr):ro($o,!1)},Zi)}};R(Hi,Ui=>{n(nt).type==="OPEN_SUB_MENU"?Ui(Zo):Ui(To,!1)})}b(Yt,Fi)}),w(lt),je(lt,Yt=>Y(Yt),()=>Y()),w(Ut),D((Yt,nt,Fi)=>{W=se(Ut,1,"settings-menu menu s-u",null,W,Yt),wt=se(lt,1,"items",null,wt,nt),Qe(lt,Fi)},[()=>({desktop:!d(),mobile:d(),hidden:!!ee.current}),()=>({mobile:d()}),Nt]),gt("mouseenter",Ut,yi),gt("mouseleave",Ut,ji),b(Tt,Ut)};R(bo,Tt=>{r()&&Tt(So)})}var gn=L(bo,2);wi(gn,17,()=>n(Et),Tt=>Tt.id,(Tt,Ut)=>{let W=v(()=>{var kt;return(kt=n(Ut).minWidth)!=null?kt:137});tv(Tt,{get isMobile(){return d()},get playerControlsHeight(){return le()},get returnFromSubMenu(){return ee.popSubMenu},get id(){return n(Ut).id},get title(){return n(Ut).title},get closeSettingsMenu(){return St},openSubMenuList:ot,get items(){return n(Ut).items},get minWidth(){return n(W)},get refMenuItems(){return X},get listRef(){return re[n(Ut).id]},set listRef(kt){re[n(Ut).id]=kt}})}),w(Ke),D(Tt=>Ti=se(Ke,1,"settings-menu-container s-u",null,Ti,Tt),[()=>({mobile:d(),hidden:!r()})]),b(t,Ke),F(),o()}tt(["keydown","click"]);var RT=M('<button class="btn s-1g"> </button>'),NT={hash:"s-1g",code:"button.btn.s-1g{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){q(t,NT);var i=RT();i.__click=function(...r){var a;(a=e.onClick)==null||a.apply(this,r)};var o=T(i,!0);w(i),D(()=>me(o,e.label)),b(t,i)}tt(["click"]);var OT=M('<div class="container s-p"><div class="notification s-p"><div><p class="description s-p"><!></p> <!></div> <!></div></div>'),DT={hash:"s-p",code:".container.s-p{display:flex;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:20px}.notification.s-p{background:var(--notification-bg);border-radius:var(--notification-radius);display:inline-flex;gap:10px;padding:9px 14px 10px 12px;pointer-events:auto}.description.s-p{font-size:13px;line-height:16px;margin:0;white-space:pre}"};function $c(t,e){B(e,!0),q(t,DT);let i=340,{features:{forceAutoQualityWhenSevereStallHappens:o}}=Vt(),{ui:{t:r}}=ve(),a=r(o?"slow_video_notification_force_description":"slow_video_notification_suggest_description");var l=OT(),d=T(l),s=T(d),u=T(s),m=T(u);_c(m,{get message(){return a}}),w(u);var p=L(u,2);{var f=y=>{let _=v(()=>r("slow_video_notification_button"));_v(y,{get label(){return n(_)},get onClick(){return e.onSelectAutoQuality}})};R(p,y=>{o||y(f)})}w(s);var $=L(s,2);ks($,{get onClick(){return e.onClose}}),w(d),w(l),Xr(3,d,()=>_s,()=>({duration:i})),b(t,l),F()}import{isIntersecting as kb,Subscription as BT}from"@vkontakte/videoplayer-shared/es2015";var Za="annotation",rp=class{constructor(){this.slots=new Map}init(e,i){this.shadowRootContainer=e,this.store=i}add(e,i){var d;let{overlay:o,id:r,controlsBehaviour:a,hideAllControls:l}=i;e.setAttribute("slot",Za),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))}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"}}runHidingControlsWhenIntersected(r,a){return mt(this,arguments,function*(e,{observedSlotElementId:i,controlsToObserve:o}){var f;let l=this.slots.get(e);if(!l)return;let d=yield this.findSlotElement(l.rootElement,i,e),{controls:s,hiddenControls:u}=((f=this.store)==null?void 0:f.ui)||{},m=new MutationObserver($=>$.forEach(()=>{let y=Ms(d,this.shadowRootContainer);o.forEach(_=>{let S=s==null?void 0:s[_],C=S?ge(S):null,I=u==null?void 0:u[_];C&&(I==null||I.set(kb(C,y)))})}));m.observe(d,{childList:!0,subtree:!0}),l.observer=m;let p=new BT;o.forEach($=>{s&&p.add(s[$].subscribe(y=>{let _=u==null?void 0:u[$];y&&y.isDisplayed?_==null||_.set(kb(y,Ms(d,this.shadowRootContainer))):_==null||_.set(!1)}))}),l.subs=p})}findSlotElement(e,i,o){return mt(this,null,function*(){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 f,$;($=(f=this.store)==null?void 0:f.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 FT=M('<div class="container s-5"><!></div>'),HT={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 yc(t,e){B(e,!0),q(t,HT);let i=g(e,"reversed",3,!1);var o=Le(),r=de(o);Cs(r,()=>e.Icon,a=>{var l=FT(),d=T(l);Di(d,()=>e.Icon,(s,u)=>{u(s,{get size(){return"48"},get reversed(){return i()}})}),w(l),D(()=>Qe(l,`animation-duration: ${e.duration}ms`)),b(a,l)}),b(t,o),F()}import{PlaybackState as Lb}from"@vkontakte/videoplayer-core/es2015";var UT=M('<div class="container s-11"><!></div>'),zT={hash:"s-11",code:".container.s-11{align-items:center;display:flex;height:100%;justify-content:center;pointer-events:none;position:absolute;width:100%}"};function bv(t,e){B(e,!0),q(t,zT);let[i,o]=Re(),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}}=ve(),{features:{playbackStatusShow:f},playbackStatusAnimationDuration:$}=Vt(),y=0,_=K(null),S=K(!1);Oe(()=>{r()===Lb.PLAYING?O(_,An,!0):r()===Lb.PAUSED?O(_,Ns,!0):O(_,null)}),Oe(()=>{if(!(!f||a()||l()))return y=window.setTimeout(()=>{y=0,O(_,null)},$),()=>{y&&(window.clearTimeout(y),y=0)}}),Oe(()=>{d()&&!n(S)&&(O(S,!0),O(_,null))});var C=Le(),I=de(C);{var N=P=>{var E=UT(),k=T(E);yc(k,{get duration(){return $},get Icon(){return n(_)}}),w(E),b(P,E)};R(I,P=>{n(_)&&f&&P(N)})}b(t,C),F(),o()}var WT=M('<div><div data-testid="video-container"></div></div>'),KT={hash:"s-e",code:".video-container.s-e,.video-wrapper.s-e{height:100%;left:0;position:absolute;top:0;width:100%}.video-wrapper.s-e{background:var(--black)}.video-container.s-e,.video-wrapper.s-e{z-index:var(--video-container-z-index)}.video-container.s-e{transition:var(--rotate-transition-duration) ease all}.video-container.fast-rotate.s-e{transition:none}.nocursor.s-e{cursor:none}"};function Ja(t,e){B(e,!0),q(t,KT);let[i,o]=Re(),r=()=>x(m,"$rotateAlpha",i),a=()=>x(p,"$playerSize",i),l=()=>x(u,"$playerPhase",i),d=()=>x(f,"$isPlaying$",i),s=g(e,"videoContainer",15),{playerPhase:u,ui:{rotateAlpha:m,playerSize:p},state:{isPlaying$:f}}=ve(),{isSmoothVideoRotate:$}=Vt(),y=v(()=>s()&&r()%180?a().height/a().width:1);var _=WT();let S;_.__contextmenu=function(...N){var P;(P=e.onContextMenu)==null||P.apply(this,N)},_.__mousedown=function(...N){var P;(P=e.onMouseDown)==null||P.apply(this,N)},_.__mouseup=function(...N){var P;(P=e.onMouseUp)==null||P.apply(this,N)},_.__click=function(...N){var P;(P=e.onClick)==null||P.apply(this,N)},_.__dblclick=function(...N){var P;(P=e.onDblClick)==null||P.apply(this,N)};var C=T(_);let I;je(C,N=>s(N),()=>s()),w(_),D((N,P)=>{S=se(_,1,"video-wrapper s-e",null,S,N),I=se(C,1,"video-container s-e",null,I,P),Qe(C,`transform: rotate(${r()}deg) scale(${n(y)})`),Ve(C,"data-is-playing",d())},[()=>({hidden:l()!=="video",nocursor:e.hideCursor}),()=>({"fast-rotate":!$})]),b(t,_),F(),o()}tt(["contextmenu","mousedown","mouseup","click","dblclick"]);var qT=M('<div><span class="text s-14"> </span> <!></div>'),QT={hash:"s-14",code:".root.s-14{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-14,.root.visible.s-14{transform:translateX(-50%)}.root.visible.s-14{opacity:1;visibility:visible}.text.s-14{font-size:13px;font-weight:600;line-height:16px}"};function $v(t,e){B(e,!0),q(t,QT);let{ui:{t:i}}=ve();var o=qT();let r;var a=T(o),l=T(a,!0);w(a);var d=L(a,2);fc(d,{get size(){return"16"},fill:"currentColor"}),w(o),D((s,u)=>{r=se(o,1,"root s-14",null,r,s),me(l,u)},[()=>({visible:e.isVisible}),()=>i("double_forward_label")]),b(t,o),F()}var GT=M('<div class="container s-17" role="button" data-testid="preview-track-overlay"><div class="icon s-17"><!></div></div>'),YT={hash:"s-17",code:".container.s-17{background-color:rgba(0,0,0,.48);cursor:pointer;height:100%;position:absolute;width:100%}.container.s-17,.icon.s-17{align-items:center;display:flex;justify-content:center}.icon.s-17{background-color:#00000073;border-radius:100%;height:64px;transition:transform .2s;transition-timing-function:ease-out;width:64px;will-change:transform}.container.s-17:hover .icon:where(.s-17){transform:scale(1.15)}"};function yv(t,e){B(e,!1),q(t,YT);let o=ve().actions.internal.closePreviewTrack,r=200,a=u=>{u.stopPropagation(),o()};xo();var l=GT();l.__click=a;var d=T(l),s=T(d);return An(s,{get size(){return"32"}}),w(d),w(l),Xr(3,l,()=>_s,()=>({duration:r})),b(t,l),pf(e,"handleClick",a),F({handleClick:a})}tt(["click"]);var jT=M('<div class="container s-15"><div class="notification s-15"><span class="text s-15"> </span></div></div>'),XT={hash:"s-15",code:".container.s-15{display:flex;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:20px}.notification.s-15{background-color:var(--black-alpha-40);border-radius:var(--notification-radius);padding:10px 16px}.text.s-15{font-size:14px;font-weight:500;line-height:18px}"};function xv(t,e){B(e,!1),q(t,XT);let{ui:{t:i}}=ve();xo();var o=jT(),r=T(o),a=T(r),l=T(a,!0);w(a),w(r),w(o),D(d=>me(l,d),[()=>i("preview_track_notification_text")],wn),Xr(3,r,()=>_s,()=>({duration:340})),b(t,o),F()}var ZT=(t,e,i,o,r,a)=>{if(t.stopPropagation(),e()||o()){a();return}},JT=M("<div><!></div>"),eC=M('<div class="spherical-video-icon s-8"><!></div>'),tC=M("<div><!></div>"),iC=M('<div class="settings-menu s-8"><!></div>'),oC=M("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),nC=M("<!> <!> <!>",1),rC=M('<div class="blocked s-8"></div>'),sC=M('<div class="player-wrapper s-8"><!> <div class="overlay-container"></div></div> <!>',1),aC={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),q(t,aC);let[i,o]=Re(),r=()=>x(ui,"$notificationsToShow$",i),a=()=>x(fi,"$playerPhase",i),l=()=>x(bo,"$isLoaderVisible",i),d=()=>x(yi,"$adPlaybackState",i),s=()=>x(di,"$crashed",i),u=()=>x(Ui,"$isInteractiveTime$",i),m=()=>x(Si,"$settingsMenuVisible",i),p=()=>x(Zi,"$isInteractiveExpectation$",i),f=()=>x(Xt,"$controlsVisible",i),$=()=>x($o,"$touched",i),y=()=>x(Or,"$graphIsOpened$",i),_=()=>x(hi,"$isFullscreen",i),S=()=>x(bs,"$autoplayNextEnabled$",i),C=()=>x(Ut,"$postrollPassed",i),I=()=>x(So,"$isEnded$",i),N=()=>x(Bn,"$cursorInside",i),P=()=>x(tr,"$isControlsAvailable",i),E=()=>x(hn,"$doubleForwardOn$",i),k=()=>x(xr,"$fakeIsPlaying$",i),Q=()=>x(Tr,"$bottomNoSmooth",i),H=()=>x(en,"$interactiveTimeIndicator",i),z=()=>x(Fi,"$playerSize",i),Y=()=>x(Hi,"$is3DVideo",i),le=()=>x(Mn,"$doubleForwardAvailable$",i),X=()=>x(Ke,"$contextMenuVisible$",i),re=()=>x(oi,"$playbackState$",i),Z=()=>x(ro,"$hotKeyMapData",i),we=()=>x(Jt,"$scrubbingInProgress",i),ue=()=>x(Et,"$volumeChangingInProgress",i),ne=()=>x(gn,"$chromecastConnected$",i),_e=()=>x(_n,"$controlsTimeoutActive",i),xe=()=>x(Xi,"$settingsMenuOpenedByKeyboard",i),J=()=>x(rs,"$contextMenuOpenedByKeyboard$",i),Ne=()=>x(Ii,"$contextMenuOpenedByHotKey$",i),pe=()=>x(Ye,"$contextMenuButtonRef$",i),A=()=>x(Uo,"$contextMenuLastActiveElem$",i),We=()=>x(ht,"$isFullscreenOpenedByKeyboard",i),Te=()=>x(Ht,"$language$",i),j=()=>x(rn,"$previewTrackActive$",i),ie=()=>x(Zo,"$icon3DVideoVisible",i),De=()=>x(Tt,"$chromecastDeviceName$",i),Be=()=>x(Yt,"$currentSubtitle$",i),it=()=>x(nt,"$currentSubtitleCaptions$",i),U=()=>x(ji,"$position$",i),ke=()=>x(Nt,"$duration$",i),Pe=()=>x(W,"$isLive$",i),Ue=()=>x(kt,"$isPlaying$",i),Ze=()=>x(er,"$contextMenuPosition$",i),ye=()=>x(Do,"$previewTrackNotificationVisible$",i),Ae=()=>x(Ai,"$showHotKeyMap",i),Fe=()=>x(Ti,"$debugPanelVisible",i),Dt=()=>x(ts,"$userActionsDisabled$",i),pt=g(e,"videoContainer",15),Bt=g(e,"adsSlotId",3,void 0),st=g(e,"adsParams",3,void 0),St=g(e,"adsAutoplayParam",3,void 0),ti=g(e,"duration",3,void 0),Rt=g(e,"logoTargetUrl",3,""),$e=g(e,"showNextPrevButtons",3,!1),be=g(e,"nextButtonActive",3,!1),ee=g(e,"prevButtonActive",3,!1),ot=g(e,"endScreenVideoTitle",3,void 0),fe=g(e,"endScreenVideoThumb",3,void 0),Me=g(e,"isOneVideoPlaylist",3,!1),$t=g(e,"shadowRootContainer",3,void 0),At=g(e,"outerContainerRef",3,void 0),ct=g(e,"playerStarted",3,!1),ce=g(e,"fullScreenTarget",3,void 0),ze=g(e,"showMiniTimer",3,!1),Ge=g(e,"showEndScreen",3,!0),at=g(e,"keyboardControls",15),Ft=e.store.getLogger().createComponentLog("Root component"),Ht=e.store.interfaceLanguage$,oi=e.store.state.playbackState$,yi=e.store.ads.playbackState,ji=e.store.state.positionWithScrubbing$,Nt=e.store.state.duration$,fi=e.store.playerPhase,hi=e.store.ui.isFullscreen,ht=e.store.ui.isFullscreenOpenedByKeyboard,Xt=e.store.ui.controlsVisible,Si=e.store.ui.settingsMenu.visible$,Xi=e.store.ui.settingsMenu.openedByBtnKeyboard$,Jt=e.store.ui.scrubbingInProgress,Et=e.store.ui.volumeChangingInProgress,Ke=e.store.ui.contextMenu.visible$,Ti=e.store.ui.debugPanelVisible,bo=e.store.state.isLoaderVisible,So=e.store.state.isEnded$,gn=e.store.state.chromecastConnected$,Tt=e.store.state.chromecastDeviceName$,Ut=e.store.ads.postrollPassed,W=e.store.state.isLive$,kt=e.store.state.isPlaying$,di=e.store.state.crashed$,lt=e.store.webApi.annotationsApi,wt=e.store.webApi.pictureInPictureApi,Yt=e.store.state.currentSubtitle$,nt=e.store.state.currentSubtitleCaptions$,Fi=e.store.ui.playerSize,Hi=e.store.ui.is3DVideo,Zo=e.store.ui.icon3DVideoVisible,To=e.store.state.isInteractive,Ui=e.store.state.isInteractiveTime$,Zi=e.store.state.isInteractiveExpectation$,Rr=e.store.state.hasInteractiveBranches,$o=e.store.ui.touched,ro=e.store.ui.modals.hotKeyMap.data,Ai=e.store.ui.modals.hotKeyMap.show,Jo=e.store.ui.overlayContainer$,en=e.store.ui.controls.interactiveTimeIndicator,Ln=e.store.state.showInteractiveTimeIndicator,er=e.store.ui.contextMenu.position$,Nr=e.store.actions.internal.setQuality,es=e.store.actions.internal.closeSettingsMenu,bs=e.store.ui.autoplayNextEnabled$,ts=e.store.ui.userActionsDisabled,tr=e.store.ui.isControlsAvailable,yr=e.store.ui.videoTitleInfo,hn=e.store.ui.doubleForwardOn$,Mn=e.store.ui.doubleForwardAvailable$,Do=e.store.ui.previewTrackNotificationVisible,Vn=e.store.actions.internal.getVideoElement,ir=e.store.actions.internal.checkFullscreenSupport,{fakeIsPlaying$:xr,notifications$:wr,graphIsOpened$:Or}=wo(),so=K(void 0),Dr=K(void 0),Rn=K(void 0),Nn=K(void 0),ao,Br,On;ro.set(I_());let{closeNotification:ft,notificationsToShow$:ui}=wr,Sr=v(()=>!!r().slow_video),or=()=>ft("slow_video"),nr=v(()=>(a()==="video"&&l()||a()==="ads"&&d()==="inactive")&&!s()),tn=K(void 0),Tr=ae(!1),on,_n=ae(!1),Dn=ae(),Bn=ae(!1),Bo=K(!1),Co=K(!1),rr=K(!1),Io=K(!(e.autoplay&&!e.uiConfig.controls.showOnStartupAtAutoplay)),zi=v(()=>u()&&!m()&&!(n(Bo)||n(Co))&&!(n(rr)&&!p())),Fn=!0,sr=v(()=>e.uiConfig.features.thumbTimer&&ze()&&a()==="video"&&!f()&&!s()&&!To&&(e.uiConfig.hideThumbTimerAfterTouch&&!$()||!e.uiConfig.hideThumbTimerAfterTouch)),Fr=v(()=>a()==="video"&&!y()&&_()),Hn=K(!1),Eo=v(()=>(Ge()||e.showAutoplayNext&&S())&&!!ot()&&!!fe()&&(e.showAds&&C()||!e.showAds)&&I()&&!s()&&!n(Hn)),Hr=v(()=>N()&&!(f()||n(Eo))&&!u()&&P()&&!E()),yt=K(!1),Ct=v(()=>k()!==null),{toggle:lo}=xr,Ji=!1,Mi=null;wt==null||wt.setContext(sd());let bn=()=>{e.autoplay&&!To&&e.uiConfig.controls.showOnStartupAtAutoplay&&mi(e.uiConfig.controls.hideTimeout)};e.store.setUiCallbacks({onStarted:bn});let yo=()=>{window.clearTimeout(ao),_n.set(!1)},Un=()=>{window.clearTimeout(Br),Dn.set(null)},mi=he=>{yo(),_n.set(!0),ao=window.setTimeout(()=>_n.set(!1),he);let xt=he-100;on=window.setTimeout(()=>{Q()&&Tr.set(!1)},xt>0?xt:he)},Ur=(he,xt)=>{Un(),Dn.set(xt),Br=window.setTimeout(()=>Dn.set(null),he)},ar=Hi.subscribe(he=>{Zo.set(he),he&&(window.clearTimeout(On),On=window.setTimeout(()=>Zo.set(!1),e.uiConfig.controls.hide360IconTimeout))}),is=()=>mt(null,null,function*(){var xt,ii,xi,Vi;let he=ta();if(he){let pi=Vd(),ni=Po();he=pi===ni||pi===$t()}if(he){mi(e.uiConfig.controls.hideTimeoutFullscreen);try{yield wt==null?void 0:wt.exit()}catch(pi){Ft({message:String(pi)})}}hi.set(he),e.store.getAdmanWrapper().setFullscreen(he),_()?(ii=(xt=e.store.callbacks)==null?void 0:xt.onFullscreenEnter)==null||ii.call(xt):(Vi=(xi=e.store.callbacks)==null?void 0:xi.onFullscreenExit)==null||Vi.call(xi)}),os=he=>{let{width:xt,height:ii}=he.target;Fi.set({width:xt,height:ii})},zr=()=>{let{width:he,height:xt}=n(so).getBoundingClientRect();Fi.set({width:he,height:xt})};Mt(()=>{var xt;return Lu(is),e.uiConfig.features.annotationsInside&&(lt==null||lt.init(n(so))),Ra(wt)&&(wt==null||wt.assignPlayerContainer(n(so)),wt==null||wt.setExternalEventHandlers({resize:os,leavepictureinpicture:zr})),e.interactiveContainer&&((xt=pt().parentElement)==null||xt.insertBefore(e.interactiveContainer,pt().nextSibling)),()=>{window.clearTimeout(ao),window.clearTimeout(on),window.clearTimeout(Br),window.clearTimeout(On),ar(),wt==null||wt.dispose().catch(ii=>{Ft({message:String(ii)})}),Mu(is)}});let Po=()=>{let he=e.uiConfig.features.fullscreenInternalTargetPlayerContainer||!At()?n(so):At(),xt=he.getRootNode(),ii=xt instanceof ShadowRoot?xt.host:xt,xi=ce()instanceof HTMLElement&&ce().contains(ii);return e.uiConfig.allowChangingFullscreenTarget&&ce()&&xi?ce():he},nn=()=>{Ke.set(!1)},co=()=>{es(),nn()},Cr=()=>mt(null,null,function*(){if(!ir()){Ft({message:"fullscreen disabled"});return}nn(),ta()?(yield ku(document),Ft({message:"exit fullscreen"})):(Ft({message:"request fullscreen"}),yield Au(Po()))}),Fo=he=>{y()||(he.preventDefault(),Ke.set(!0),er.set({left:he.clientX,top:he.clientY}))};function ns(){Bn.set(!0),To||mi(e.uiConfig.controls.hideTimeoutCursor)}function qe(he){var Vi,pi;let{relatedTarget:xt}=he,xi=!!(xt&&((Vi=n(Rn))!=null&&Vi.contains(xt)))&&((pi=at())==null?void 0:pi.isFocused());!To&&!xi&&(Tr.set(!0),mi(e.uiConfig.controls.hideTimeoutCursor))}function Lt(){Bn.set(!1),O(Co,!1),O(Bo,!1),Ji=!1,e.store.actions.internal.releaseCamera(),mi(e.uiConfig.controls.hideTimeout),E()&&yn()}function bi(he){return he?he.offsetTop+bi(he.offsetParent):0}function Ao(he){return he?he.offsetLeft+Ao(he.offsetParent):0}function ko(he){if(H()&&Ln){let xt=he.currentTarget,ii=bi(xt),xi=Ao(xt),Vi=he.pageX-xi,pi=he.pageY-ii,{left:ni,bottom:mo,right:ln}=H(),dn=ln-ni;return Vi>=ni-dn&&pi<=mo+dn}}function Ho(he){if(n(so)){let xt=bi(he.currentTarget),ii=z().height,xi=he.pageY-xt;if(ko(he)){O(Co,!1);return}xi<40?O(Co,!0):xi>ii-40?O(Bo,!0):(O(Co,!1),m()||O(Bo,!1))}}function uo(he){Ho(he),!n(zi)&&!E()&&mi(e.uiConfig.controls.hideTimeoutCursor),Y()&&Ji&&Mi&&e.store.actions.internal.moveCameraFocusPX(Mi.clientX-he.clientX,Mi.clientY-he.clientY,he.timeStamp-Mi.timeStamp),Mi=he}let eo=null,$n=()=>{eo=window.setTimeout(()=>{e.store.actions.internal.changeDoubleForwardOn(!0),yo()},e.uiConfig.doubleForwardActivationTime)},yn=()=>{e.store.actions.internal.changeDoubleForwardOn(!1),eo&&clearTimeout(eo),eo=null},po=he=>{he.preventDefault(),he.button===0&&(Ji=!0,e.store.actions.internal.holdCamera(),le()&&$n()),!Ji&&mi(e.uiConfig.controls.hideTimeoutCursor)},Lo=he=>{he.preventDefault(),he.button===0&&(Mi=he,Ji=!1,e.store.actions.internal.releaseCamera()),!E()&&mi(e.uiConfig.controls.hideTimeoutCursor)},zn=he=>{he.preventDefault(),Fn&&(Ft({message:"double click on video"}),Cr(),mi(e.uiConfig.controls.hideTimeoutCursor))},lr=he=>{var xt;if(he.preventDefault(),E()){yn();return}if(eo&&yn(),X()||m()){co();return}if(!(I()&&!Rr)){if(n(Ct))return lo();if((xt=at())==null||xt.focus(),!ct()){e.firstStart(),mi(e.uiConfig.controls.hideTimeoutCursor);return}(!e.uiConfig.preventPauseOnVideoClick||re()!==Vb.PLAYING)&&e.store.actions.internal.togglePlay(),mi(e.uiConfig.controls.hideTimeoutCursor)}},dr=he=>{co(),$o.set(!0),mi(e.uiConfig.controls.hideTimeout),he&&Ur(e.uiConfig.controls.hideHotKeyHelpers,he)},Wn=()=>{var he,xt;co(),(he=e.store.callbacks)!=null&&he.onOpenHotKeyMap?(xt=e.store.callbacks)==null||xt.onOpenHotKeyMap(Z()):Ai.update(ii=>!ii)},$s=()=>{$o.set(!0)},rs=e.store.ui.contextMenu.openedByBtnKeyboard$,Ye=e.store.ui.contextMenu.btnRef$,qt=K(void 0),Ii=e.store.ui.contextMenu.openedByHotKey$,Uo=e.store.ui.contextMenu.lastActiveElem$,rn=e.store.ui.previewTrackActive;Oe(()=>{Jo.set(n(tn))}),Oe(()=>{O(rr,n(Io)&&re()!==Vb.PLAYING,!0),n(Io)||It(()=>O(Io,!0))}),Oe(()=>{var xt,ii;let he=(n(rr)||I()||m()||we()||ue()||ne()||_e())&&!n(zi)&&(a()==="video"||a()==="ads")&&!s()&&P();Xt.set(he),!he&&!_e()&&e.uiConfig.returnFocusOnControlsHide&&((xt=n(Rn))!=null&&xt.contains(Fu()))&&((ii=at())==null||ii.focus())}),Oe(()=>{!we()&&n(yt)&&!u()&&mi(e.uiConfig.controls.hideTimeoutCursor),It(()=>O(yt,we(),!0))}),Oe(()=>{n(Nn),m(),xe(),It(()=>Hd(n(Nn),m(),xe()))}),Oe(()=>{n(qt),X(),J(),Ne(),It(()=>{let he=J()||Ne();Hd(n(qt),X(),he)})}),Oe(()=>{let he=pe();he&&(X(),It(()=>Ol(he,X(),rs)))}),Oe(()=>{let he=A();he&&(X(),It(()=>V_(he,X(),Ii)))}),Oe(()=>{var he;!We()&&_()&&(It(()=>ht.set(!1)),(he=at())==null||he.focus())}),Oe(()=>{y()&&co()});let cr=K(void 0),sn=he=>{yr.set(Zn(Vn(),{title:n(cr)},"title",he))},zo=(he,xt)=>{var pi,ni;let ii=(ni=(pi=e.store.callbacks)==null?void 0:pi.uiInfo)==null?void 0:ni.onUpcomingLiveViewStateChanged;if(!ii)return;let xi=!!xt,Vi=Ie(Ie({},Zn(n(so),{upcomingLiveScreen:xt},"upcomingLiveScreen",xi)),he);ii(Vi)};var Bs=sC();gt("blur",Sa,co);var an=de(Bs);an.__mousemove=uo;var Fs=T(an);let da=v(()=>a()==="ads"),ca=v(()=>n(Ct)?lo:void 0);je(Gf(Fs,{startDoubleForwardActivationTimer:$n,stopDoubleForward:yn,toggleFullscreen:Cr,hideContextMenu:co,showHotKeyHelpers:dr,showKeyMap:Wn,get isAds(){return n(da)},get fakePlayButtonHandler(){return n(ca)},get nextButtonActive(){return be()},get prevButtonActive(){return ee()},children:(he,xt)=>{var ii=nC(),xi=de(ii);Ja(xi,{get hideCursor(){return n(Hr)},onClick:lr,onContextMenu:Fo,onMouseDown:po,onMouseUp:Lo,onDblClick:zn,get videoContainer(){return pt()},set videoContainer(ni){pt(ni)}});var Vi=L(xi,2);Aa(Vi,()=>"slot",!1,(ni,mo)=>{io(ni,()=>({name:Za}))});var pi=L(Vi,2);Cs(pi,Te,ni=>{var mo=oC(),ln=de(mo);let dn=v(()=>a()!=="thumb"||s()||To&&e.autoplay);Ya(ln,{get hidden(){return n(dn)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart},onContextMenu:Fo,onClick:nn});var ki=L(ln,2);{var Zl=He=>{yv(He,{})};R(ki,He=>{j()&&He(Zl)})}var el=L(ki,2);bv(el,{});var Hs=L(el,2);$v(Hs,{get isVisible(){return E()}});var tl=L(Hs,2);{var il=He=>{let _i=v(()=>{var Mo;return(Mo=e.live)==null?void 0:Mo.startTime});gc(He,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(_i)},onUpcomingLiveViewStateChanged:zo,onContextMenu:Fo,onClick:nn})};R(tl,He=>{a()==="LiveWaitingStart"&&He(il)})}var Ir=L(tl,2);{var ua=He=>{ja(He,{kind:"recover",get thumbUrl(){return e.thumbUrl},onContextMenu:Fo,onClick:nn})};R(Ir,He=>{a()==="LiveWaitingRecover"&&He(ua)})}var Us=L(Ir,2);{var Wr=He=>{ja(He,{kind:"record",get thumbUrl(){return e.thumbUrl},onContextMenu:Fo,onClick:nn})};R(Us,He=>{a()==="LiveWaitingRecord"&&He(Wr)})}var ss=L(Us,2);{var zs=He=>{var _i=JT();let Mo;var ga=T(_i);Nd(ga,{get adsSlotId(){return Bt()},get adsParams(){return st()},get adsAutoplayParam(){return St()},get duration(){return ti()},get adsExternalApi(){return e.adsExternalApi}}),w(_i),D(xn=>Mo=se(_i,1,"ads-container s-8",null,Mo,xn),[()=>({hidden:a()!=="ads"})]),b(He,_i)};R(ss,He=>{e.showAds&&ct()&&He(zs)})}var ur=L(ss,2);{var ol=He=>{let _i=v(()=>!Ge()&&e.showAutoplayNext&&S());Kf(He,{get title(){return ot()},get thumb(){return fe()},get isHide(){return n(_i)},clickCloseIcon:()=>O(Hn,!0)})};R(ur,He=>{n(Eo)&&ot()&&fe()&&He(ol)})}var nl=L(ur,2);{var Jl=He=>{let _i=v(()=>!f());Ym(He,{get title(){return e.title},get isHidden(){return n(_i)},onVisibilityChanged:sn,get ref(){return n(cr)},set ref(Mo){O(cr,Mo,!0)}})};R(nl,He=>{n(Fr)&&He(Jl)})}var rl=L(nl,2);{var sl=He=>{let _i=v(()=>a()==="video"&&f());mc(He,{get isShifted(){return n(_i)}})};R(rl,He=>{Y()&&He(sl)})}var al=L(rl,2);{var ed=He=>{var _i=eC(),Mo=T(_i);Md(Mo,{}),w(_i),b(He,_i)};R(al,He=>{ie()&&He(ed)})}var pa=L(al,2);{var Er=He=>{vc(He,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return De()}})};R(pa,He=>{ne()&&He(Er)})}var rt=L(pa,2);{var ut=He=>{Qa(He,{get shifted(){return f()},get captions(){return it()},get position(){return U()},get playerSize(){return z()}})};R(rt,He=>{Be().value!=="off"&&He(ut)})}var Wi=L(rt,2);{var Wo=He=>{var _i=tC();_i.__contextmenu=Fo,_i.__click=[ZT,X,Ke,m,Si,co];var Mo=T(_i);Ga(Mo,{}),w(_i),b(He,_i)};R(Wi,He=>{s()&&He(Wo)})}var Ki=L(Wi,2);{var $i=He=>{let _i=v(()=>a()==="thumb"||a()==="LiveWaitingStart"||a()==="LiveWaitingRecover"||a()==="LiveWaitingRecord"),Mo=v(()=>a()==="ads"),ga=v(()=>e.canRewindLive&&ke()!==0);pc(He,{get bottomHidden(){return n(_i)},get bottomNoSmooth(){return Q()},get showControls(){return f()},get isAds(){return n(Mo)},get canRewindLive(){return n(ga)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return Rt()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return $e()},get nextButtonActive(){return be()},get prevButtonActive(){return ee()},get isOneVideoPlaylist(){return Me()},customFullscreenSupported:Fn,toggleFullscreen:Cr,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return n(Dr)},set playerControlsWrapperRef(xn){O(Dr,xn,!0)},get playerControlsRef(){return n(Rn)},set playerControlsRef(xn){O(Rn,xn,!0)}})};R(Ki,He=>{ct()&&He($i)})}var Ri=L(Ki,2);{var fa=He=>{var _i=iC(),Mo=T(_i);let ga=v(()=>{var xn;return(xn=n(Rn))==null?void 0:xn.clientHeight});bc(Mo,{get supportLink(){return e.supportLink},get playerControlsHeight(){return n(ga)},returnFocus:()=>{var xn;return(xn=at())==null?void 0:xn.focus()},get ref(){return n(Nn)},set ref(xn){O(Nn,xn,!0)}}),w(_i),b(He,_i)};R(Ri,He=>{!ne()&&a()!=="ads"&&He(fa)})}var ll=L(Ri,2);let _p=v(()=>!n(sr));Bd(ll,{get isLive(){return Pe()},get isHidden(){return n(_p)},get isPlaying(){return Ue()},get position(){return U()},get duration(){return ke()}});var Mc=L(ll,2);Qm(Mc,{get data(){return Dn}});var Vc=L(Mc,2);Wf(Vc,{get supportLink(){return e.supportLink},returnFocus:()=>{var He;return(He=at())==null?void 0:He.focus()},get visible(){return X()},get playerContainerRef(){return n(so)},get position(){return Ze()},get menuElementRef(){return n(qt)},set menuElementRef(He){O(qt,He,!0)}});var Rc=L(Vc,2);{var bp=He=>{$c(He,{onClose:or,onSelectAutoQuality:()=>{Nr("auto"),or()}})};R(Rc,He=>{n(Sr)&&He(bp)})}var Nc=L(Rc,2);{var dl=He=>{xv(He,{})};R(Nc,He=>{ye()&&He(dl)})}var Oc=L(Nc,2);{var ma=He=>{Ba(He,{})};R(Oc,He=>{n(nr)&&He(ma)})}var va=L(Oc,2);{var $p=He=>{Xf(He,{})};R(va,He=>{Ae()&&He($p)})}var Dc=L(va,2);{var td=He=>{Wd(He,{})};R(Dc,He=>{Fe()&&He(td)})}b(ni,mo)}),b(he,ii)},$$slots:{default:!0}}),he=>at(he),()=>at());var dt=L(Fs,2);je(dt,he=>O(tn,he),()=>n(tn)),w(an),je(an,he=>O(so,he),()=>n(so));var ei=L(an,2);{var fo=he=>{var xt=rC();b(he,xt)};R(ei,he=>{Dt()&&he(fo)})}gt("mouseenter",an,ns),gt("mouseleave",an,Lt),gt("click",an,$s,!0),gt("focusin",an,qe,!0),b(t,Bs),F(),o()}tt(["mousemove","contextmenu","click"]);import{clientChecker as xc,PlaybackState as hC}from"@vkontakte/videoplayer-core/es2015";import{noop as _C}from"@vkontakte/videoplayer-shared/es2015";var lC=M('<div></div> <div class="info s-v"><div class="triangles-wrapper s-v"><div></div> <div></div> <div></div></div> <p class="step-caption s-v"> </p></div>',1),dC=M("<div><!></div>"),cC={hash:"s-v",code:".double-click-area.s-v{height:100%;overflow:hidden;position:absolute;top:0;width:25%}.double-click-area.left.s-v{left:0}.double-click-area.right.s-v{right:0}.semicircle.s-v{background-color:rgba(0,0,0,.5);height:100%;position:absolute;top:0;width:100%}.semicircle.left.s-v{border-bottom-right-radius:50%;border-top-right-radius:50%;left:0}.semicircle.right.s-v{border-bottom-left-radius:50%;border-top-left-radius:50%;right:0}.info.s-v{align-items:center;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.info.s-v,.triangles-wrapper.s-v{display:flex;justify-content:center}.triangles-wrapper.s-v{margin-bottom:10px;position:relative}.triangle.s-v{animation:s-v-blink .5s infinite;border-bottom:6px solid transparent;border-top:6px solid transparent;height:0;opacity:0;width:0}.triangle.left.s-v:nth-child(3),.triangle.right.s-v:first-child{animation-delay:0s}.triangle.left.s-v:nth-child(2),.triangle.right.s-v:nth-child(2){animation-delay:.1s}.triangle.left.s-v:first-child,.triangle.right.s-v:nth-child(3){animation-delay:.2s}@keyframes s-v-blink{0%{opacity:0}50%{opacity:1}to{opacity:0}}.triangle.left.s-v{border-right:8px solid var(--white)}.triangle.right.s-v{border-left:8px solid var(--white)}.triangle.s-v:not(:last-child){margin-right:5px}.step-caption.s-v{color:var(--white);font-size:12px;line-height:1;margin:0;text-align:center}"};function sp(t,e){B(e,!0),q(t,cC);let i=g(e,"seekStep",3,0),o=K(!1),r=0,a=0,l=K(ci(i())),d=p=>{p.stopPropagation(),a+=1,O(l,i()*(a-1)),a===1?e.handleSingleFirstClick(p):(O(o,!0),e.handleSecondClick()),window.clearTimeout(r),r=window.setTimeout(()=>{a=0,O(o,!1)},300)};pn(()=>{window.clearTimeout(r)});var s=dC();s.__click=d;var u=T(s);{var m=p=>{var f=lC(),$=de(f),y=L($,2),_=T(y),S=T(_),C=L(S,2),I=L(C,2);w(_);var N=L(_,2),P=T(N,!0);w(N),w(y),D(E=>{var k,Q,H,z;se($,1,`semicircle ${(k=e.side)!=null?k:""}`,"s-v"),se(S,1,`triangle ${(Q=e.side)!=null?Q:""}`,"s-v"),se(C,1,`triangle ${(H=e.side)!=null?H:""}`,"s-v"),se(I,1,`triangle ${(z=e.side)!=null?z:""}`,"s-v"),me(P,E)},[()=>G("doubletap_seek_step",{seconds:n(l).toFixed(0)})]),b(p,f)};R(u,p=>{n(o)&&p(m)})}w(s),D(()=>{var p;return se(s,1,`double-click-area ${(p=e.side)!=null?p:""}`,"s-v")}),b(t,s),F()}tt(["click"]);var uC=(t,e,i)=>{e(!1),i()},pC=M('<div class="overlay s-n"></div> <div class="next-video s-n"><div class="top s-n"><div class="caption s-n"> </div> <!></div> <div class="row s-n"><div class="column s-n"><div class="thumb s-n"><div></div> <!></div></div> <div class="column s-n"><div class="title s-n"> </div></div></div></div>',1),fC={hash:"s-n",code:".overlay.s-n{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-n{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-n{display:flex;justify-content:space-between}.caption.s-n{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-n{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-n{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-n{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-n,.thumb-overlay.s-n{height:100%;width:100%}.thumb-overlay.s-n{position:absolute}.thumb-overlay.withOpacity.s-n{background:var(--black);opacity:.3}.title.s-n{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),q(t,fC);let[i,o]=Re(),r=()=>x(d,"$autoplayNextEnabled$",i),a=()=>x(s,"$timerNextVideoRunning$",i),l=ve(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,m=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,f=l.actions.internal.nextVideoAnnouncementAuto,$=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{u(!1),f()},_=()=>{e.clickCloseIcon(),$()};Mt(()=>{e.isHide||m(),e.isHide&&r()&&(u(!1),f())});var S=Le(),C=de(S);{var I=N=>{var P=pC(),E=L(de(P),2),k=T(E),Q=T(k),H=T(Q,!0);w(Q);var z=L(Q,2);ks(z,{onClick:_}),w(k);var Y=L(k,2);Y.__click=[uC,u,p];var le=T(Y),X=T(le),re=T(X);let Z;var we=L(re,2);{var ue=J=>{Kd(J,{get isRunning(){return a()},onTimerEnded:y})};R(we,J=>{r()&&J(ue)})}w(X),w(le);var ne=L(le,2),_e=T(ne),xe=T(_e,!0);w(_e),w(ne),w(Y),w(E),D((J,Ne)=>{me(H,J),Qe(X,`background-image: url('${e.thumb}')`),Z=se(re,1,"thumb-overlay s-n",null,Z,Ne),me(xe,e.title)},[()=>r()?G("end_screen_next_video"):G("end_screen_recommended_video"),()=>({withOpacity:r()})]),b(N,P)};R(C,N=>{e.isHide||N(I)})}b(t,S),F(),o()}tt(["click"]);import{clientChecker as mC}from"@vkontakte/videoplayer-core/es2015";var Rb=({getFullscreenTarget:t,fullScreenChangeHandler:e})=>{let i=null,o;Mt(()=>{mC.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 vC}from"@vkontakte/videoplayer-core/es2015";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 gC}from"@vkontakte/videoplayer-core/es2015";var Nb=({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=()=>gC.device.isIOS&&ge(l)===vC.DASH_LIVE_CMAF,p=()=>{s==null||s(),s=null},f=$=>{if(p(),!m()||!$)return;let y=u();if(!y)return;let _=new ap(y),S=ge(d),C=ge(a),I=ge(r);for(let E of S)C.some(Q=>Q.value===E.id)&&_.attach(E,I.value===E.id);let N=d.subscribe(E=>{for(let k of E)_.updateSrc(k)}),P=()=>{let E=_.getCurrentShowingId();o(ge(a).find(k=>k.value===E))};y.textTracks.addEventListener("change",P),s=()=>{N(),_.detachAll(),y.textTracks.removeEventListener("change",P)}};Mt(()=>i.subscribe(f)),pn(p)};var bC=(t,e,i,o)=>{if(t.stopPropagation(),e()){o();return}},$C=M("<!> <!>",1),yC=M("<div><!></div>"),xC=M('<div class="spherical-video-icon s-7"><!></div>'),wC=M("<div><!></div>"),SC=M('<div class="settings-mobile s-7"><!></div>'),TC=M("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),CC=M('<div class="player-wrapper s-7" role="region" tabindex="-1"><!> <!> <!> <div class="overlay-container"></div></div>'),IC={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%}.spherical-video-icon.s-7{display:inline-block;left:calc(50% - 38px);position:absolute;top:calc(50% - 23px)}.ads-container.s-7{background:var(--black);height:100%;left:0;position:absolute;top:0;width:100%;z-index:var(--ads-container-z-index)}.settings-mobile.s-7{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 Tv(t,e){var Eo,Hr;B(e,!0),q(t,IC);let[i,o]=Re(),r=()=>x($t,"$playerPhase",i),a=()=>x(yi,"$isLoaderVisible",i),l=()=>x(ot,"$adPlaybackState",i),d=()=>x(Jt,"$crashed",i),s=()=>x(bs,"$notificationsToShow$",i),u=()=>x(ee,"$playbackState$",i),m=()=>x(Rt,"$graphIsOpened$",i),p=()=>x(ze,"$interactiveHideMobileControls",i),f=()=>x(ji,"$isEnded$",i),$=()=>x(lt,"$isInteractiveExpectation$",i),y=()=>x(ct,"$controlsVisible",i),_=()=>x(nt,"$touched",i),S=()=>x(Hi,"$autoplayNextEnabled$",i),C=()=>x(hi,"$postrollPassed",i),I=()=>x(yr,"$bottomNoSmooth",i),N=()=>x(Ti,"$videoSize",i),P=()=>x(Tt,"$playerSize",i),E=()=>x(At,"$isFullscreen",i),k=()=>x(fe,"$position$",i),Q=()=>x(Me,"$duration$",i),H=()=>x(Zo,"$loadedMetadata",i),z=()=>x(Ge,"$settingsMenuVisible",i),Y=()=>x(Ft,"$scrubbingInProgress",i),le=()=>x(Ht,"$volumeChangingInProgress",i),X=()=>x(Nt,"$chromecastConnected$",i),re=()=>x(ce,"$isControlsAvailable",i),Z=()=>x(di,"$isInteractiveTime$",i),we=()=>x(Si,"$isActiveLive",i),ue=()=>x(at,"$settingsMenuOpenedByKeyboard",i),ne=()=>x(be,"$language$",i),_e=()=>x(Yt,"$disabledControls$",i),xe=()=>x(Ut,"$is3DVideo",i),J=()=>x(W,"$icon3DVideoVisible",i),Ne=()=>x(fi,"$chromecastDeviceName$",i),pe=()=>x(bo,"$currentSubtitle$",i),A=()=>x(So,"$currentSubtitleCaptions$",i),We=()=>x(gn,"$realDuration$",i),Te=()=>x(ht,"$isLive$",i),j=()=>x(Xt,"$isPlaying$",i),ie=()=>x(oi,"$debugPanelVisible",i),De=g(e,"videoContainer",15),Be=g(e,"adsSlotId",3,void 0),it=g(e,"adsParams",3,void 0),U=g(e,"adsAutoplayParam",3,void 0),ke=g(e,"duration",3,void 0),Pe=g(e,"logoTargetUrl",3,""),Ue=g(e,"showNextPrevButtons",3,!1),Ze=g(e,"nextButtonActive",3,!1),ye=g(e,"prevButtonActive",3,!1),Ae=g(e,"endScreenVideoTitle",3,void 0),Fe=g(e,"endScreenVideoThumb",3,void 0),Dt=g(e,"isOneVideoPlaylist",3,!1),pt=g(e,"showMiniTimer",3,!1),Bt=g(e,"fullScreenTarget",3,void 0),st=g(e,"playerStarted",3,!1),St=g(e,"showEndScreen",3,!0),{notifications$:ti,graphIsOpened$:Rt}=wo(),$e=e.store.getLogger().createComponentLog("Root component"),be=e.store.interfaceLanguage$,ee=e.store.state.playbackState$,ot=e.store.ads.playbackState,fe=e.store.state.positionWithScrubbing$,Me=e.store.state.duration$,$t=e.store.playerPhase,At=e.store.ui.isFullscreen,ct=e.store.ui.controlsVisible,ce=e.store.ui.isControlsAvailable,ze=e.store.ui.interactiveHideMobileControls,Ge=e.store.ui.settingsMenu.visible$,at=e.store.ui.settingsMenu.openedByBtnKeyboard$,Ft=e.store.ui.scrubbingInProgress,Ht=e.store.ui.volumeChangingInProgress,oi=e.store.ui.debugPanelVisible,yi=e.store.state.isLoaderVisible,ji=e.store.state.isEnded$,Nt=e.store.state.chromecastConnected$,fi=e.store.state.chromecastDeviceName$,hi=e.store.ads.postrollPassed,ht=e.store.state.isLive$,Xt=e.store.state.isPlaying$,Si=e.store.state.isActiveLive$,Xi=e.store.state.isRewindableLive$,Jt=e.store.state.crashed$,Et=e.store.webApi.annotationsApi,Ke=e.store.webApi.pictureInPictureApi,Ti=e.store.state.videoSize$,bo=e.store.state.currentSubtitle$,So=e.store.state.currentSubtitleCaptions$,gn=e.store.state.duration$,Tt=e.store.ui.playerSize,Ut=e.store.ui.is3DVideo,W=e.store.ui.icon3DVideoVisible,kt=e.store.state.isInteractive,di=e.store.state.isInteractiveTime$,lt=e.store.state.isInteractiveExpectation$,wt=e.store.state.hasInteractiveBranches,Yt=e.store.ui.controls.disabledControls$,nt=e.store.ui.touched,Fi=e.store.ui.overlayContainer$,Hi=e.store.ui.autoplayNextEnabled$,Zo=e.store.state.loadedMetadata$,To=e.store.actions.internal.closeSettingsMenu,Ui=(Eo=e.store.callbacks)==null?void 0:Eo.onDisabledPlayPrevChapterClick,Zi=(Hr=e.store.callbacks)==null?void 0:Hr.onDisabledSeekToInteractiveClick,Rr=e.store.actions.internal.setQuality,$o=K(void 0),ro=K(void 0),Ai=K(void 0),Jo=K(void 0),en,Ln,er=v(()=>(r()==="video"&&a()||r()==="ads"&&l()==="inactive")&&!d()),Nr=K(void 0),{closeNotification:es,notificationsToShow$:bs}=ti,ts=v(()=>!!s().slow_video),tr=()=>es("slow_video"),yr=ae(!1),hn,Mn=K(!1),Do=v(()=>u()!==hC.PLAYING),Vn=K(!1),ir=v(()=>m()||p()||!n(Mn)&&(f()&&!!wt||n(Do)&&$())),xr=K(!0),wr=v(()=>e.uiConfig.features.thumbTimer&&pt()&&r()==="video"&&!y()&&!d()&&!kt&&(e.uiConfig.hideThumbTimerAfterTouch&&!_()||!e.uiConfig.hideThumbTimerAfterTouch)),Or=K(!1),so=v(()=>(St()||e.showAutoplayNext&&S())&&!!Ae()&&!!Fe()&&(e.showAds&&C()||!e.showAds)&&f()&&!d()&&!n(Or)),Dr=K(!1);Ke==null||Ke.setContext(sd());let Rn=yt=>{yt&&!kt&&ao(e.uiConfig.controls.hideTimeoutMobile)};e.store.setUiCallbacks({onStarted:Rn});let Nn=()=>{clearTimeout(en),O(Mn,!1),p()&&ze.set(!1)},ao=yt=>{Nn(),O(Mn,!0),en=setTimeout(()=>O(Mn,!1),yt);let Ct=yt-100;hn=setTimeout(()=>{I()&&yr.set(!1)},Ct>0?Ct:yt)},Br=Ut.subscribe(yt=>{W.set(yt),yt&&(clearTimeout(Ln),Ln=setTimeout(()=>W.set(!1),e.uiConfig.controls.hide360IconTimeout))}),On=(...Ct)=>mt(null,[...Ct],function*(yt=ta()){var lo,Ji,Mi,bn,yo,Un;if(yt&&!xc.device.isIOS){let mi=Vd(),Ur=tn(),ar=xc.browser.isSamsungBrowser&&mi===e.shadowRootContainer;yt=mi===Ur||ar}if(yt){ao(e.uiConfig.controls.hideTimeoutFullscreen);try{yield Ke==null?void 0:Ke.exit()}catch(mi){$e({message:String(mi)})}try{let mi=(lo=N())!=null&&lo.width&&((Ji=N())!=null&&Ji.height)?N():P();yield T_(mi)}catch(mi){$e({message:String(mi)})}}At.set(yt),e.store.getAdmanWrapper().setFullscreen(yt),E()?(bn=(Mi=e.store.callbacks)==null?void 0:Mi.onFullscreenEnter)==null||bn.call(Mi):(Un=(yo=e.store.callbacks)==null?void 0:yo.onFullscreenExit)==null||Un.call(yo)}),ft=yt=>{let Ct=yt,{width:lo,height:Ji}=Ct.target;Tt.set({width:lo,height:Ji})},ui=()=>{let{width:yt,height:Ct}=n($o).getBoundingClientRect();Tt.set({width:yt,height:Ct})};Mt(()=>{var yt;return Lu(On),e.uiConfig.features.annotationsInside&&(Et==null||Et.init(n($o))),Ra(Ke)&&(Ke==null||Ke.assignPlayerContainer(n($o)),Ke==null||Ke.setExternalEventHandlers({resize:ft,leavepictureinpicture:ui})),O(xr,!xc.device.isIphoneOrOldIpad),e.interactiveContainer&&((yt=De().parentElement)==null||yt.insertBefore(e.interactiveContainer,De().nextSibling)),()=>{clearTimeout(en),clearTimeout(hn),clearTimeout(Ln),Br(),Ke==null||Ke.dispose().catch(Ct=>{$e({message:String(Ct)})}),Mu(On)}});let Sr=K(!0),or=K(!0),nr=yt=>{let Ct=k()+(yt==="forward"?1:-1)*e.uiConfig.controls.seekStepMobile/1e3;Ct<0?(O(Sr,!1),Ct=0):Ct>=Q()&&(O(or,!1),Ct=Q()),O(Vn,!0),e.seekTime(Ct)},tn=()=>xc.device.isIOS?n($o):!e.uiConfig.allowChangingFullscreenTarget||!Bt()?e.outerContainerRef:Bt().contains(e.outerContainerRef)?Bt():e.outerContainerRef,Tr=()=>mt(null,null,function*(){try{if(ta())yield ku(document),$e({message:"exit fullscreen"});else{if($e({message:"request fullscreen"}),xc.device.isIOS&&!H())return;yield Au(tn())}}catch(yt){$e({message:String(yt)})}}),on=()=>{To()},_n=yt=>{if(yt.preventDefault(),z()){on();return}if(!st()){e.firstStart(),ao(e.uiConfig.controls.hideTimeoutCursor);return}O(Vn,!1),y()?Nn():ao(e.uiConfig.controls.hideTimeoutMobile)},Dn=()=>{nt.set(!0)},Bn=()=>{kt||(yr.set(!0),ao(e.uiConfig.controls.hideTimeoutCursor))},Bo=yt=>{Ui&&(Ui(yt),ao(e.uiConfig.controls.hideTimeoutMobile))},Co=yt=>{Zi&&(Zi(yt),ao(e.uiConfig.controls.hideTimeoutMobile))};Oe(()=>{Fi.set(n(Nr))}),Oe(()=>{ct.set((n(Do)||z()||Y()||le()||X()||!n(so)&&(f()||n(Mn)&&!n(Vn)))&&!n(ir)&&r()==="video"&&!d()&&re())}),Oe(()=>{!Y()&&n(Dr)&&!Z()&&ao(e.uiConfig.controls.hideTimeoutMobile),O(Dr,Y(),!0)}),Oe(()=>{O(Sr,k()>0),O(or,!we()&&k()<Q(),!0)}),Oe(()=>{Hd(n(Jo),z(),ue(),!0)});let rr=G("aria_label_video_player");Rb({fullScreenChangeHandler:On,getFullscreenTarget:tn}),Nb({store:e.store,getFullscreenTarget:tn});let Io=(yt,Ct)=>{var bn,yo;let lo=(yo=(bn=e.store.callbacks)==null?void 0:bn.uiInfo)==null?void 0:yo.onUpcomingLiveViewStateChanged;if(!lo)return;let Ji=!!Ct,Mi=Ie(Ie({},Zn(n($o),{upcomingLiveScreen:Ct},"upcomingLiveScreen",Ji)),yt);lo(Mi)};var zi=CC();gt("blur",Sa,on);var Fn=T(zi);Ja(Fn,{onClick:_n,get videoContainer(){return De()},set videoContainer(yt){De(yt)}});var sr=L(Fn,2);Aa(sr,()=>"slot",!1,(yt,Ct)=>{io(yt,()=>({name:Za}))});var Fr=L(sr,2);Cs(Fr,ne,yt=>{var Ct=TC(),lo=de(Ct);let Ji=v(()=>r()!=="thumb"||d()||kt&&e.autoplay||e.uiConfig.features.disableThumbUnstartedOnAutoplay&&e.autoplay);Ya(lo,{get hidden(){return n(Ji)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var Mi=L(lo,2);{var bn=Ye=>{var qt=$C(),Ii=de(qt);{var Uo=sn=>{let zo=v(()=>e.uiConfig.controls.seekStepMobile/1e3);sp(sn,{side:"left",get seekStep(){return n(zo)},handleSingleFirstClick:_n,handleSecondClick:()=>nr("backward")})};R(Ii,sn=>{n(Sr)&&sn(Uo)})}var rn=L(Ii,2);{var cr=sn=>{let zo=v(()=>e.uiConfig.controls.seekStepMobile/1e3);sp(sn,{side:"right",get seekStep(){return n(zo)},handleSingleFirstClick:_n,handleSecondClick:()=>nr("forward")})};R(rn,sn=>{n(or)&&sn(cr)})}b(Ye,qt)};R(Mi,Ye=>{e.canRewindLive&&Xi&&!_e().has("TIMELINE")&&Ye(bn)})}var yo=L(Mi,2);{var Un=Ye=>{let qt=v(()=>{var Ii;return(Ii=e.live)==null?void 0:Ii.startTime});gc(Ye,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(qt)},onUpcomingLiveViewStateChanged:Io})};R(yo,Ye=>{r()==="LiveWaitingStart"&&Ye(Un)})}var mi=L(yo,2);{var Ur=Ye=>{ja(Ye,{kind:"recover",get thumbUrl(){return e.thumbUrl}})};R(mi,Ye=>{r()==="LiveWaitingRecover"&&Ye(Ur)})}var ar=L(mi,2);{var is=Ye=>{ja(Ye,{kind:"record",get thumbUrl(){return e.thumbUrl}})};R(ar,Ye=>{r()==="LiveWaitingRecord"&&Ye(is)})}var os=L(ar,2);{var zr=Ye=>{var qt=yC();let Ii;var Uo=T(qt);Nd(Uo,{get adsSlotId(){return Be()},get adsParams(){return it()},get adsAutoplayParam(){return U()},get duration(){return ke()},get adsExternalApi(){return e.adsExternalApi}}),w(qt),D(rn=>Ii=se(qt,1,"ads-container s-7",null,Ii,rn),[()=>({hidden:r()!=="ads"})]),b(Ye,qt)};R(os,Ye=>{e.showAds&&st()&&Ye(zr)})}var Po=L(os,2);{var nn=Ye=>{let qt=v(()=>!St()&&e.showAutoplayNext&&S());Sv(Ye,{get title(){return Ae()},get thumb(){return Fe()},get isHide(){return n(qt)},clickCloseIcon:()=>O(Or,!0)})};R(Po,Ye=>{n(so)&&Ae()&&Fe()&&Ye(nn)})}var co=L(Po,2);{var Cr=Ye=>{mc(Ye,{})};R(co,Ye=>{xe()&&Ye(Cr)})}var Fo=L(co,2);{var ns=Ye=>{var qt=xC(),Ii=T(qt);Md(Ii,{}),w(qt),b(Ye,qt)};R(Fo,Ye=>{J()&&Ye(ns)})}var qe=L(Fo,2);{var Lt=Ye=>{vc(Ye,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return Ne()}})};R(qe,Ye=>{X()&&Ye(Lt)})}var bi=L(qe,2);{var Ao=Ye=>{Qa(Ye,{get shifted(){return y()},get captions(){return A()},get position(){return k()},get playerSize(){return P()},isMobile:!0})};R(bi,Ye=>{pe().value!=="off"&&Ye(Ao)})}var ko=L(bi,2);{var Ho=Ye=>{var qt=wC();qt.__click=[bC,z,Ge,on];var Ii=T(qt);Ga(Ii,{}),w(qt),b(Ye,qt)};R(ko,Ye=>{d()&&Ye(Ho)})}var uo=L(ko,2);{var eo=Ye=>{let qt=v(()=>r()==="thumb"||r()==="LiveWaitingStart"||r()==="LiveWaitingRecover"||r()==="LiveWaitingRecord"||r()==="ads"),Ii=v(()=>r()==="ads"),Uo=v(()=>e.canRewindLive&&We()!==0);pc(Ye,{get bottomHidden(){return n(qt)},get showControls(){return y()},get bottomNoSmooth(){return I()},get isAds(){return n(Ii)},get canRewindLive(){return n(Uo)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return Pe()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Ue()},get nextButtonActive(){return Ze()},get prevButtonActive(){return ye()},get isOneVideoPlaylist(){return Dt()},get customFullscreenSupported(){return n(xr)},get endScreenShown(){return n(so)},toggleFullscreen:Tr,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},onDisabledPlayPrevChapterClick:Bo,onDisabledSeekToInteractiveClick:Co,get playerControlsWrapperRef(){return n(ro)},set playerControlsWrapperRef(rn){O(ro,rn,!0)},get playerControlsRef(){return n(Ai)},set playerControlsRef(rn){O(Ai,rn,!0)}})};R(uo,Ye=>{st()&&Ye(eo)})}var $n=L(uo,2);{var yn=Ye=>{var qt=SC(),Ii=T(qt);bc(Ii,{get supportLink(){return e.supportLink},get returnFocus(){return _C},get ref(){return n(Jo)},set ref(Uo){O(Jo,Uo,!0)}}),w(qt),b(Ye,qt)};R($n,Ye=>{z()&&Ye(yn)})}var po=L($n,2);let Lo=v(()=>!n(wr));Bd(po,{get isLive(){return Te()},get isHidden(){return n(Lo)},get isPlaying(){return j()},get position(){return k()},get duration(){return Q()}});var zn=L(po,2);{var lr=Ye=>{Ba(Ye,{})};R(zn,Ye=>{n(er)&&Ye(lr)})}var dr=L(zn,2);{var Wn=Ye=>{Wd(Ye,{})};R(dr,Ye=>{ie()&&Ye(Wn)})}var $s=L(dr,2);{var rs=Ye=>{$c(Ye,{onClose:tr,onSelectAutoQuality:()=>{Rr("auto"),tr()}})};R($s,Ye=>{n(ts)&&Ye(rs)})}b(yt,Ct)});var Hn=L(Fr,2);je(Hn,yt=>O(Nr,yt),()=>n(Nr)),w(zi),je(zi,yt=>O($o,yt),()=>n($o)),D(()=>Ve(zi,"aria-label",rr)),gt("click",zi,Dn,!0),gt("focusin",zi,Bn,!0),b(t,zi),F(),o()}tt(["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 EC}from"@vkontakte/videoplayer-shared/es2015";var PC=M('<div class="time-container s-9"><!></div>'),AC=M('<div class="player-wrapper s-9" role="region"><!> <!> <!> <!> <!> <div><!></div></div>'),kC={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%}.timeline.s-9{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-9{opacity:1}.time-container.s-9{bottom:8px;position:absolute;right:8px;z-index:var(--thumb-timer-z-index)}"};function Cv(t,e){B(e,!0),q(t,kC);let[i,o]=Re(),r=()=>x(Z,"$scrubbingInProgress",i),a=()=>x(X,"$playerSize",i),l=()=>x(k,"$isPlaying$",i),d=()=>x(P,"$duration$",i),s=()=>x(z,"$positionWithScrubbing$",i),u=()=>x(I,"$playerPhase",i),m=()=>x(N,"$crashed$",i),p=()=>x(Q,"$currentSubtitle$",i),f=()=>x(H,"$currentSubtitleCaptions$",i),$=()=>x(E,"$positionExact$",i),y=()=>x(Y,"$isLive$",i),_=()=>x(le,"$isRewindableLive$",i),S=g(e,"outsideDuration",3,0),C=g(e,"videoContainer",15),{playerPhase:I,state:{crashed$:N,duration$:P,positionExact$:E,isPlaying$:k,currentSubtitle$:Q,currentSubtitleCaptions$:H,positionWithScrubbing$:z,isLive$:Y,isRewindableLive$:le},ui:{playerSize:X,controls:re,scrubbingInProgress:Z},actions:{internal:{getVideoElement:we}}}=ve(),ue=8,ne=K(!1),_e=ci({}),xe=K(!1),J=v(()=>!r()&&!n(xe)),Ne=()=>{O(ne,!0)},pe=()=>{O(ne,!1)},A=EC(ql,260);Oe(()=>{a(),A(we(),re,_e,n(ne))});let We=v(()=>l()?Xo(d()-s()):Xo(isFinite(d())?d():S()));var Te=AC(),j=T(Te);Ja(j,{hideCursor:!1,get videoContainer(){return C()},set videoContainer(Ae){C(Ae)}});var ie=L(j,2);Aa(ie,()=>"slot",!1,(Ae,Fe)=>{io(Ae,()=>({name:Za}))});var De=L(ie,2);let Be=v(()=>u()!=="thumb"||m());Ya(De,{get hidden(){return n(Be)},get thumbUrl(){return e.thumbUrl},iconVisible:!1});var it=L(De,2);{var U=Ae=>{Qa(Ae,{shifted:!1,get captions(){return f()},get position(){return $()},get playerSize(){return a()}})};R(it,Ae=>{p().value!=="off"&&n(J)&&Ae(U)})}var ke=L(it,2);{var Pe=Ae=>{var Fe=PC(),Dt=T(Fe);Dd(Dt,{get isLive(){return y()},get isPlaying(){return l()},get time(){return n(We)}}),w(Fe),b(Ae,Fe)};R(ke,Ae=>{n(J)&&Ae(Pe)})}var Ue=L(ke,2);let Ze;var ye=T(Ue);Ka(ye,{get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return _()},isAds:!1,needPadding:!1,isHidden:!1,withEpisodes:!1,tooltipLeftOffset:ue,tooltipRightOffset:ue,get ref(){return _e.timeline},set ref(Ae){_e.timeline=Ae}}),w(Ue),w(Te),D(Ae=>Ze=se(Ue,1,"timeline s-9",null,Ze,Ae),[()=>({visible:n(ne)})]),gt("mouseenter",Te,Ne),gt("mouseleave",Te,pe),gt("mouseenter",Ue,()=>O(xe,!0)),gt("mouseleave",Ue,()=>O(xe,!1)),b(t,Te),F(),o()}var NC=M("<div><!></div>"),OC={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),q(t,OC);let[i,o]=Re(),r=()=>x(st,"$isLive$",i),a=()=>x(Et,"$availableSubtitlesList$",i),l=()=>x(Ke,"$isPreviewTrackHorizontallyAligned$",i),d=g(e,"sources",7),s=g(e,"store",7),u=g(e,"microStoresRoot",7),m=g(e,"videoConfig",7),p=g(e,"uiConfig",7),f=g(e,"title",7),$=g(e,"thumbUrl",7),y=g(e,"interactiveContainer",7),_=g(e,"interactiveController",7),S=g(e,"subtitles",7),C=g(e,"subtitlesForcedLanguage",7),I=g(e,"live",7),N=g(e,"preload",7),P=g(e,"autoplay",7),E=g(e,"volume",7,void 0),k=g(e,"muted",7,void 0),Q=g(e,"fromTime",7),H=g(e,"canRewindLive",7),z=g(e,"showAds",7),Y=g(e,"adsSlotId",7,void 0),le=g(e,"adsParams",7,void 0),X=g(e,"adsAutoplayParam",7,void 0),re=g(e,"duration",7,void 0),Z=g(e,"logoClickable",7),we=g(e,"logoHidden",7),ue=g(e,"isMobile",7),ne=g(e,"showNextPrevButtons",7,!1),_e=g(e,"nextButtonActive",7,!1),xe=g(e,"prevButtonActive",7,!1),J=g(e,"endScreenVideoTitle",7,void 0),Ne=g(e,"endScreenVideoThumb",7,void 0),pe=g(e,"isOneVideoPlaylist",7,!1),A=g(e,"supportLink",7),We=g(e,"shadowRootContainer",7),Te=g(e,"outerContainerRef",7),j=g(e,"fullScreenTarget",7,void 0),ie=g(e,"failoverHosts",7,void 0),De=g(e,"showMiniTimer",7,!1),Be=g(e,"saveRate",7),it=g(e,"seekToInteractive",7,Ob),U=g(e,"playPrevChapter",7,Ob),ke=g(e,"volumeMultiplier",7),Pe=g(e,"showAutoplayNext",7),Ue=g(e,"showEndScreen",7,!0),Ze=g(e,"keyboardControls",15,void 0),{subscribers:ye,stores:Ae}=u();Lh(p());let Fe=Vt(),Dt=p().logoLink,pt=s().ui.debugPanelVisible,Bt=s().ui.playerSize,st=s().state.isLive$,ti=s().state.isInteractive&&Iv.device.isAndroid,Rt=K(void 0),$e=null,be=K(!1);s().getAdmanWrapper().init({switchFromAdsToVideo:s().actions.internal.switchFromAdsToVideo,switchFromVideoToAds:s().actions.internal.switchFromVideoToAds,setMuted:s().actions.external.setMuted},s().ads,{vsid:s().vsid}),Uh(s(),Ae),Oe(()=>{var W,kt;s().ui.isMobile.set(ue()),(kt=(W=m().callbacks)==null?void 0:W.onDomReady)==null||kt.call(W)});let ee=(W=!1)=>{O(be,!0),W?s().actions.external.firstStart(z()):s().actions.internal.firstStart(z())},ot=()=>{if(Fe.features.qualityDetailsSubMenuEnabled){let W=u_(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{p_(s().videoId),Ef()&&s().actions.internal.setTrafficSavingEnabled(!0);let kt=Tf(s().videoId);kt&&s().actions.internal.setQuality(kt)}};function fe(W){var Yt,nt,Fi;let kt=d()||W;kt&&s().initVideo({container:n(Rt),sources:kt,failoverHosts:ie(),subtitles:S(),subtitlesForcedLanguage:C(),volumeMultiplier:ke()});let di=MC.get(Ed)==="true";pt.set(di),Q()>0&&s().actions.external.seekTime(Q());let lt=ue()?Fe.volumeDefault:(nt=(Yt=E())!=null?Yt:$u())!=null?nt:Fe.volumeDefault,wt=(Fi=k())!=null?Fi:r_();if(s().actions.external.setVolume(lt),s().actions.external.setMuted(wt),s().getAdmanWrapper().setInitialVolume(wt?0:lt),ot(),Fe.features.saveRate&&Be()){let Hi=l_();Hi&&!r()&&s().actions.internal.setPlaybackRate(Hi)}if(Pe()){let Hi=c_();Hi&&s().actions.internal.setAutoplayNextEnabled(Hi)}s().ui.isAutoplay.set(P()),P()&&ee(),N()&&Fe.features.preload&&s().actions.internal.preload()}let Me=W=>{if(window.ResizeObserver){let kt,di;$e=new ResizeObserver(VC(lt=>{let wt=lt[0];if(wt.contentBoxSize){let Yt=Array.isArray(wt.contentBoxSize)?wt.contentBoxSize[0]:wt.contentBoxSize;kt=Yt.inlineSize,di=Yt.blockSize}else wt.contentRect&&(kt=wt.contentRect.width,di=wt.contentRect.height);Bt.set({width:kt,height:di})},300)),$e.observe(W)}Bt.set({width:W.clientWidth,height:W.clientHeight})},$t=()=>{document.hidden&&s().actions.external.stop()};Mt(()=>{var di,lt,wt,Yt;ti&&document.addEventListener("visibilitychange",$t),Fe.debugLog&&s().actions.internal.startLogging(),Me(n(Rt));let W=ye.map(nt=>nt.init({store:s(),microStores:Ae,config:m(),interactiveController:_(),uiConfig:p()})),kt=()=>{ti&&document.removeEventListener("visibilitychange",$t),$e==null||$e.disconnect(),W.forEach(nt=>nt.unsubscribe()),s().destroy()};return((di=I())==null?void 0:di.status)==="upcoming"?(s().actions.internal.setLiveWaitingStart(!0),kt):((lt=I())==null?void 0:lt.status)==="waiting"?(s().actions.internal.setLiveWaitingRecover(!0),kt):(((wt=I())==null?void 0:wt.status)==="finished"||((Yt=I())==null?void 0:Yt.status)==="postlive")&&!(d()&&LC(d()))?(s().actions.internal.setLiveWaitingRecord(!0),kt):(fe(),kt)});function At(){n(be)?s().actions.external.play():ee(!0)}function ct(){s().actions.external.pause()}function ce(W){s().actions.external.setMuted(W)}function ze(){s().actions.external.toggleSubtitle()}function Ge(W,kt){s().actions.external.changeSubtitle(W,kt)}function at(W){s().actions.external.changeAudioStream(W)}function Ft(){var W;(W=s().webApi.slotsApi)!=null&&W.haveSlots()&&s().actions.external.hideControls()}function Ht(){var W;(W=s().webApi.slotsApi)!=null&&W.haveSlots()&&s().actions.external.showControls()}function oi(W){ue()||W>=0&&W<=1&&s().actions.external.setVolume(W)}function yi(W){s().actions.internal.seekTime(W,RC.UNKNOWN)}function ji(W){s().actions.external.seekEpisodeStartTime(W)}function Nt(){s().actions.external.returnFocusToEpisodes()}function fi(W){s().actions.external.setPlaybackRate(W)}function hi(W){s().actions.external.setAutoQualityLimits(W)}function ht(){s().actions.external.setQuality("auto")}function Xt(W){s().actions.external.setTrafficSavingEnabled(W)}function Si(W){s().actions.external.setHighQualityEnabled(W)}let Xi=lp(Fe.view),Jt=m().playerView==="preview",Et=s().state.availableSubtitlesList$;if(Fe.features.initSubtitles){let W=!1;Oe(()=>{var kt;if(!W&&a().length){W=!0;let di;if(Fe.features.userVideoPrefs&&s().videoId){let wt=Su(Fe.userSalt,String(s().videoId));wt!=null&&wt.subtitleTrackId&&(di=a().find(Yt=>Yt.value===wt.subtitleTrackId))}let lt=(kt=C())!=null?kt:Af();lt&&(di=a().find(wt=>wt.language===lt)),s().actions.internal.setSubtitle(di)}})}let Ke=s().ui.isPreviewTrackHorizontallyAligned;var Ti=NC();let bo;var So=T(Ti);{var gn=W=>{Tv(W,{get store(){return s()},get uiConfig(){return Fe},get thumbUrl(){return $()},get interactiveContainer(){return y()},get live(){return I()},get autoplay(){return P()},get canRewindLive(){return H()},get showAds(){return z()},get adsSlotId(){return Y()},get adsParams(){return le()},get adsAutoplayParam(){return X()},get duration(){return re()},get logoClickable(){return Z()},get logoHidden(){return we()},get logoTargetUrl(){return Dt},get nextButtonActive(){return _e()},get prevButtonActive(){return xe()},get endScreenVideoTitle(){return J()},get endScreenVideoThumb(){return Ne()},get isOneVideoPlaylist(){return pe()},get supportLink(){return A()},get shadowRootContainer(){return We()},get outerContainerRef(){return Te()},get fullScreenTarget(){return j()},get showMiniTimer(){return De()},get playerStarted(){return n(be)},get seekToInteractive(){return it()},get playPrevChapter(){return U()},firstStart:ee,seekTime:yi,get showEndScreen(){return Ue()},get showAutoplayNext(){return Pe()},get showNextPrevButtons(){return ne()},get adsExternalApi(){return e.adsExternalApi},get videoContainer(){return n(Rt)},set videoContainer(kt){O(Rt,kt,!0)}})},Tt=W=>{var kt=Le(),di=de(kt);{var lt=Yt=>{Cv(Yt,{get thumbUrl(){return $()},get outsideDuration(){return re()},get canRewindLive(){return H()},get videoContainer(){return n(Rt)},set videoContainer(nt){O(Rt,nt,!0)}})},wt=Yt=>{wv(Yt,{get store(){return s()},get uiConfig(){return Fe},get title(){return f()},get thumbUrl(){return $()},get interactiveContainer(){return y()},get live(){return I()},get autoplay(){return P()},get canRewindLive(){return H()},get showAds(){return z()},get adsSlotId(){return Y()},get adsParams(){return le()},get adsAutoplayParam(){return X()},get duration(){return re()},get logoClickable(){return Z()},get logoHidden(){return we()},get logoTargetUrl(){return Dt},get nextButtonActive(){return _e()},get prevButtonActive(){return xe()},get endScreenVideoTitle(){return J()},get endScreenVideoThumb(){return Ne()},get isOneVideoPlaylist(){return pe()},get supportLink(){return A()},get shadowRootContainer(){return We()},get outerContainerRef(){return Te()},get fullScreenTarget(){return j()},get showMiniTimer(){return De()},get playerStarted(){return n(be)},get seekToInteractive(){return it()},get playPrevChapter(){return U()},firstStart:ee,get showEndScreen(){return Ue()},get showAutoplayNext(){return Pe()},get showNextPrevButtons(){return ne()},get adsExternalApi(){return e.adsExternalApi},get videoContainer(){return n(Rt)},set videoContainer(nt){O(Rt,nt,!0)},get keyboardControls(){return Ze()},set keyboardControls(nt){Ze(nt)}})};R(di,Yt=>{Jt?Yt(lt):Yt(wt,!1)})}b(W,kt)};R(So,W=>{ue()?W(gn):W(Tt,!1)})}w(Ti),D(W=>{bo=se(Ti,1,"vk-vp-root s-0",null,bo,W),Qe(Ti,Xi)},[()=>({"root--miui-browser":Iv.device.isMobile&&Iv.browser.isMiuiBrowser,"visible-outside":Jt,"preview-track-horizontally-alinged":l()})]),b(t,Ti);var Ut=F({initVideo:fe,play:At,pause:ct,setMuted:ce,toggleSubtitle:ze,changeSubtitle:Ge,changeAudioStream:at,hideControls:Ft,showControls:Ht,setVolume:oi,seekTime:yi,seekEpisodeStartTime:ji,returnFocusToEpisodes:Nt,setPlaybackRate:fi,setAutoQualityLimits:hi,setAutoQuality:ht,toggleTrafficSaving:Xt,toggleHighQuality:Si,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 f()},set title(W){f(W)},get thumbUrl(){return $()},set thumbUrl(W){$(W)},get interactiveContainer(){return y()},set interactiveContainer(W){y(W)},get interactiveController(){return _()},set interactiveController(W){_(W)},get subtitles(){return S()},set subtitles(W){S(W)},get subtitlesForcedLanguage(){return C()},set subtitlesForcedLanguage(W){C(W)},get live(){return I()},set live(W){I(W)},get preload(){return N()},set preload(W){N(W)},get autoplay(){return P()},set autoplay(W){P(W)},get volume(){return E()},set volume(W){E(W)},get muted(){return k()},set muted(W){k(W)},get fromTime(){return Q()},set fromTime(W){Q(W)},get canRewindLive(){return H()},set canRewindLive(W){H(W)},get showAds(){return z()},set showAds(W){z(W)},get adsSlotId(){return Y()},set adsSlotId(W){Y(W)},get adsParams(){return le()},set adsParams(W){le(W)},get adsAutoplayParam(){return X()},set adsAutoplayParam(W){X(W)},get duration(){return re()},set duration(W){re(W)},get logoClickable(){return Z()},set logoClickable(W){Z(W)},get logoHidden(){return we()},set logoHidden(W){we(W)},get isMobile(){return ue()},set isMobile(W){ue(W)},get showNextPrevButtons(){return ne()},set showNextPrevButtons(W){ne(W)},get nextButtonActive(){return _e()},set nextButtonActive(W){_e(W)},get prevButtonActive(){return xe()},set prevButtonActive(W){xe(W)},get endScreenVideoTitle(){return J()},set endScreenVideoTitle(W){J(W)},get endScreenVideoThumb(){return Ne()},set endScreenVideoThumb(W){Ne(W)},get isOneVideoPlaylist(){return pe()},set isOneVideoPlaylist(W){pe(W)},get supportLink(){return A()},set supportLink(W){A(W)},get shadowRootContainer(){return We()},set shadowRootContainer(W){We(W)},get outerContainerRef(){return Te()},set outerContainerRef(W){Te(W)},get fullScreenTarget(){return j()},set fullScreenTarget(W){j(W)},get failoverHosts(){return ie()},set failoverHosts(W){ie(W)},get showMiniTimer(){return De()},set showMiniTimer(W){De(W)},get saveRate(){return Be()},set saveRate(W){Be(W)},get showAutoplayNext(){return Pe()},set showAutoplayNext(W){Pe(W)},get seekToInteractive(){return it()},set seekToInteractive(W){it(W)},get playPrevChapter(){return U()},set playPrevChapter(W){U(W)},get volumeMultiplier(){return ke()},set volumeMultiplier(W){ke(W)},get showEndScreen(){return Ue()},set showEndScreen(W){Ue(W)},get keyboardControls(){return Ze()},set keyboardControls(W){Ze(W)}});return o(),Ut}var DC=Ce('<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=g(e,"isWhite",3,!1),o=v(()=>i()?"#fff":"#909499");Xe(t,{width:"57",height:"60",get fill(){return n(o)},testId:"stub-icon",children:(r,a)=>{var l=DC();vi(9),b(r,l)},$$slots:{default:!0}})}var BC=M('<div class="title s-2"> </div>'),FC=M('<div class="playerStub s-2"><!> <!></div>'),HC={hash:"s-2",code:".playerStub.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%}.title.s-2{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 Av(t,e){q(t,HC);var i=FC(),o=T(i);{var r=d=>{var s=BC(),u=T(s,!0);w(s),D(()=>me(u,e.title)),b(d,s)};R(o,d=>{e.title&&d(r)})}var a=L(o,2);{var l=d=>{let s=v(()=>!!e.thumbUrl);Pv(d,{get isWhite(){return n(s)}})};R(a,d=>{(!e.title||!e.thumbUrl)&&d(l)})}w(i),D(()=>Qe(i,e.thumbUrl?`background-image: url('${e.thumbUrl}')`:"")),b(t,i)}var UC=M('<div class="playerError s-3"><!></div>'),zC={hash:"s-3",code:".playerError.s-3{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 kv(t){q(t,zC);var e=UC(),i=T(e);Ga(i,{}),w(e),b(t,e)}import{now as yI,ValueSubject as xI}from"@vkontakte/videoplayer-shared/es2015";import{cloneDeepWith as wI,InterfaceLanguage as SI,isNonNullable as Dv,Logger as TI,Observable as CI,Subscription as qb,once as II,InternalsExposure as EI,skip as PI,getPlayerId as AI}from"@vkontakte/videoplayer-shared/es2015";import{clientChecker as Qb,isMobile as kI}from"@vkontakte/videoplayer-core/es2015";import{OneStat as LI,ThinOneStat as MI,MediascopePixel as VI}from"@vkontakte/videoplayer-statistics/es2015";import{Logger as WC,Subscription as KC}from"@vkontakte/videoplayer-shared/es2015";var dp=class{constructor(){this.subscription=new KC,this.logger=new WC,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=ge(e.state.currentPlaybackRate$),r=ge(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 Vv,detectEmbed as XC}from"@vkontakte/videoplayer-shared/es2015";var qC=Ce('<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),QC=M('<div><div><!></div> <span class="title s-6"> </span></div>'),GC={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),q(t,GC);let[i,o]=Re(),r=()=>x(u,"$interfaceLanguage$",i),a=()=>x(m,"$isMobile$",i),l=ve(),d=Vt(),s=!!l.webApi.pictureInPictureApi,u=l.interfaceLanguage$,m=l.ui.isMobile,p=l.ui.t,f=v(()=>r()&&p("pip_dummy_title")),$=lp(d.view);var y=QC();let _;var S=T(y);let C;var I=T(S);Xe(I,{width:"57",height:"56",testId:"pip-dummy-icon",children:(E,k)=>{var Q=qC();vi(),b(E,Q)},$$slots:{default:!0}}),w(S);var N=L(S,2),P=T(N,!0);w(N),w(y),D((E,k)=>{_=se(y,1,"player-pip-dummy s-6",null,_,E),Qe(y,$),C=se(S,1,"dummy-image s-6",null,C,k),me(P,n(f))},[()=>({"is-pip-api":s}),()=>({desktop:!a()})]),b(t,y),F(),o()}var YC=Object.defineProperty,jC=(t,e,i)=>e in t?YC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,jl=(t,e,i)=>jC(t,typeof e!="symbol"?e+"":e,i),Mv=(t,e,i)=>new Promise((o,r)=>{var a=s=>{try{d(i.next(s))}catch(u){r(u)}},l=s=>{try{d(i.throw(s))}catch(u){r(u)}},d=s=>s.done?o(s.value):Promise.resolve(s.value).then(a,l);d((i=i.apply(t,e)).next())}),ZC=460,JC=280,wc=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 Vv(!1),isEnabled$:new Vv(!1),type:1}),this.info.isEnabled$=new Vv(e)}isSupported(){let{isEmbed:e}=XC();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}request(){return Mv(this,null,function*(){var e,i;if(!this.isSupported()||!this.playerDomElement||!this.playerParentShadowRoot)return;this.pipWindow=yield documentPictureInPicture.requestWindow({width:ZC,height:JC,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=Yr(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||(Pa(this.playerDummyElement),this.playerParentShadowRoot.append(this.playerDomElement),this.info.isActive$.next(!1),this.pipWindow=void 0)})})}exit(){return Mv(this,null,function*(){return new Promise(e=>{var i;this.pipWindow&&((i=documentPictureInPicture.window)==null||i.close()),e()})})}dispose(){return Mv(this,null,function*(){yield 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 Db(t){return t instanceof wc}var cp=class{static getLatestSupportedVersion(e){let i=new Va(e),o=new wc(e);if(o.isSupported())return o;if(i.isSupported())return i}};function Sc(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 Bb="Inner error. Unexpectedly root annotation container null reference exception",Fb="Annotation with such name already exists",Hb="Annotation with such name does not exist";var Xl=class extends Error{constructor(e){super(e),this.name="AnnotationError"}};import{observeElementSize as eI,Subscription as tI,throttleFn as iI}from"@vkontakte/videoplayer-shared/es2015";var oI="1",nI=100,up=class{constructor(e){this.annotationsInside=e;this.annotations=new Map;this.subscriptions=new tI}init(e){if(this.rootAnnotationsContainer=e,this.annotationsInside)return;let i=iI(()=>{for(let o of this.annotations.values())this.isElementExceedsBoundaries(o,this.playerSize.width,this.playerSize.height)?o.style.visibility="hidden":o.style.visibility="visible"},nI);this.subscriptions.add(eI(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(Bb);if(this.annotations.has(e))throw new Xl(Fb);i.style.zIndex=(o=i.style.zIndex)!=null?o:oI,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(Hb);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 rI}from"@vkontakte/videoplayer-shared/es2015";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 rI,this.subscription}};var Tc=class extends vn{constructor(){super(...arguments);this.stateName="fakeIsPlaying$";this.state$=Gt(Ie({},ae(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 Cc=class extends vn{constructor(){super(...arguments);this.stateName="interactiveControlsOpacity$";this.state$=Gt(Ie({},ae(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=ge(m),f=()=>p&&ge(u);return o.add(u.subscribe($=>{if(!p)return;let y=ge(l);ge(s)?this.state$.set($):y!==null&&this.state$.set(!y||$)})),o.add(s.subscribe($=>{this.state$.set(!$||f())})),o.add(l.subscribe($=>{if($===null)return;let y=ge(d);if(f()){this.state$.set(!0);return}y&&this.state$.set(!$)})),o}};var Ic=class extends vn{constructor(){super(...arguments);this.stateName="seekToInteractiveDisabledTooltip$";this.state$=ae("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 sI}from"@vkontakte/videoplayer-shared/es2015";var Rv=ae(!1),fp=null,Ec=class extends vn{constructor(){super(...arguments);this.stateName="showInteractiveTimeIndicatorTooltip$";this.state$=Gt(Ie({},Rv),{set:(i,o=!1)=>{i!==ge(Rv)&&(this.clearTimeout(),Rv.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=>{ge(l)&&p&&this.state$.set(!1)}));let m=(a==null?void 0:a.interactiveData)||{tooltipHelpHintActive:!1};return o.add(sI({isPlaying$:d,isInteractiveTime$:l,interactiveTimeIndicator:u}).subscribe(({isPlaying$:p,isInteractiveTime$:f,interactiveTimeIndicator:$})=>{var y,_;if(!(!p||!($!=null&&$.isDisplayed))){if(!f)return this.state$.set(!1);m.tooltipHelpHintActive&&fp===null&&(fp=!0,m.tooltipHelpHintActive=!1,this.state$.set(!0),(_=(y=r.callbacks)==null?void 0:y.onInteractiveTimeIndicatorHintDeactivated)==null||_.call(y))}})),o}clearTimeout(){window.clearTimeout(this.timeout)}};import{combine as aI,noop as lI}from"@vkontakte/videoplayer-shared/es2015";var Pc=class extends vn{constructor(){super(...arguments);this.stateName="graphIsOpened$";this.graphMadePause=!1;this.state$=Gt(Ie({},ae(null)),{toggle:lI});this.checkIfShouldHide=i=>Ls(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=()=>mt(this,null,function*(){if(this.checkIfShouldHide(ge(l)))return;let s=ge(this.state$),{isEnded$:u,playbackState$:m}=r.state,{disabledControls$:p}=r.ui.controls,f=ge(u),$=ge(m);if(s)try{yield a==null?void 0:a.toggleGraphView(!1),this.state$.set(!1),p.remove(hf),!f&&this.graphMadePause&&r.actions.internal.play()}catch(y){d({message:"Cant hide graph"})}else{this.graphMadePause=$==="playing";try{yield a==null?void 0:a.toggleGraphView(!0),this.state$.set(!0),p.add(hf),!f&&this.graphMadePause&&r.actions.internal.pause()}catch(y){d({message:"Cant show graph"})}}}),o.add(aI({graphIsOpened:this.state$,currentGridType:l}).subscribe(m=>mt(this,[m],function*({graphIsOpened:s,currentGridType:u}){if(this.checkIfShouldHide(u)&&s)try{yield a==null?void 0:a.toggleGraphView(!1),this.state$.set(!1)}catch(f){d({message:"Cant hide graph"})}}))),o}};import{ValueSubject as Ub}from"@vkontakte/videoplayer-shared/es2015";var Ac=class extends vn{constructor(){super(...arguments);this.stateName="pictureInPicture$";this.state$={isActive$:ae(!1),isEnabled$:ae(!1),type$:ae(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 Ub(!1),isEnabled$:new Ub(!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 uI,filterChanged as pI}from"@vkontakte/videoplayer-shared/es2015";import{safeStorage as Nv}from"@vkontakte/videoplayer-shared/es2015";var zb=({maxShowCount:t,timeout:e})=>{let i=[t!==0?dI({maxCount:t}):void 0,e!==0?cI({timeout:e}):void 0].filter(o=>!!o);return{notificationShowed:o=>i.forEach(r=>r.notificationShowed(o)),canShowNotification:o=>i.every(r=>r.canShowNotification(o))}},dI=({maxCount:t})=>{let e={};return{notificationShowed:i=>{var o,r;e[i]=((o=e[i])!=null?o:0)+1,Nv.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}}},cI=({timeout:t})=>{let e="videoplayer_notifications_manager",i=()=>{try{return JSON.parse(Nv.get(e)||"{}")}catch(a){return{}}},o=a=>Nv.set(e,JSON.stringify(a)),r=a=>{let l=i();delete l[a],o(l)};return{notificationShowed:a=>{o(Gt(Ie({},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 kc=class extends vn{constructor(){super(...arguments);this.stateName="notifications$";this.state$={notificationsToShow$:ae({}),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=zb({maxShowCount:a,timeout:l});let u=r.getPlayer();return o.add(u.events.severeStallOccured$.pipe(pI(),uI(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 Wb=()=>[Tc,Cc,Ic,Ec,Pc,Ac,kc].reduce(({subscribers:t,stores:e},i)=>{let o=new i;return{subscribers:[...t,o],stores:Gt(Ie({},e),{[o.stateName]:o.state$})}},{subscribers:[],stores:{}});import{devNull as Lc}from"@vkontakte/videoplayer-shared/es2015";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 fI=M('<div class="root s-1"><!></div>'),mI={hash:"s-1",code:".root.s-1{align-items:center;display:flex;inset:0;justify-content:center;pointer-events:none;position:absolute;z-index:1}"};function Ov(t,e){B(e,!0),q(t,mI);let i=null,o=K(null);Oe(()=>(n(o)&&(i=window.setTimeout(()=>{O(o,null)},e.animationDuration)),()=>{i&&clearTimeout(i)}));function r(s){e.playbackStatusShow&&O(o,s?"prev":"next",!0)}var a=Le(),l=de(a);{var d=s=>{var u=Le(),m=de(u);Cs(m,()=>n(o),p=>{var f=fI(),$=T(f);let y=v(()=>n(o)==="prev");yc($,{get duration(){return e.animationDuration},get Icon(){return la},get reversed(){return n(y)}}),w(f),b(p,f)}),b(s,u)};R(l,s=>{e.playbackStatusShow&&n(o)&&s(d)})}return b(t,a),F({startVideoChangedAnimation:r})}var vI=Object.defineProperty,gI=Object.defineProperties,hI=Object.getOwnPropertyDescriptors,Kb=Object.getOwnPropertySymbols,_I=Object.prototype.hasOwnProperty,bI=Object.prototype.propertyIsEnumerable,Fv=(t,e,i)=>e in t?vI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Ds=(t,e)=>{for(var i in e||(e={}))_I.call(e,i)&&Fv(t,i,e[i]);if(Kb)for(var i of Kb(e))bI.call(e,i)&&Fv(t,i,e[i]);return t},$I=(t,e)=>gI(t,hI(e)),Zt=(t,e,i)=>Fv(t,typeof e!="symbol"?e+"":e,i),gp=(t,e,i)=>new Promise((o,r)=>{var a=s=>{try{d(i.next(s))}catch(u){r(u)}},l=s=>{try{d(i.throw(s))}catch(u){r(u)}},d=s=>s.done?o(s.value):Promise.resolve(s.value).then(a,l);d((i=i.apply(t,e)).next())}),RI={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:SI.RU,isCyrillicRelatedInterface:!0,logoClickable:!1,logoHidden:!1,isTouch:kI(),isMediaSessionEnabled:!0,isPictureInPictureEnabled:!0,isAudioDisabled:!1,callbacks:{uiInfo:{}},tuningConfig:{configName:[]},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showAutoplayNext:!0,showNextPrevButtons:!0},Jn=K(void 0),Bv=ci({animationDuration:0,playbackStatusShow:!1}),hp=class extends HTMLElement{constructor(){super(),Zt(this,"svelteStubComponent"),Zt(this,"svelteRootComponent"),Zt(this,"sveltePersistentLayerComponent"),Zt(this,"svelteErrorComponent"),Zt(this,"store"),Zt(this,"microStoresRoot"),Zt(this,"statistics"),Zt(this,"sentry"),Zt(this,"_shadowRoot"),Zt(this,"playerContainer"),Zt(this,"rootContainer"),Zt(this,"stateContainer"),Zt(this,"shadowRootContainer"),Zt(this,"playerId"),Zt(this,"uiConfig"),Zt(this,"coreConfig"),Zt(this,"statisticsConfig"),Zt(this,"interactiveController"),Zt(this,"interactiveContainer"),Zt(this,"graphMadePause"),Zt(this,"currentPlayingVideoIndex",0),Zt(this,"needToRepeatPlaylist",!1),Zt(this,"videoConfig"),Zt(this,"pictureInPictureApi"),Zt(this,"mediaSessionApi"),Zt(this,"unsubscribePlayerPhaseSubscription"),Zt(this,"logger"),Zt(this,"log"),Zt(this,"subscription"),Zt(this,"interactiveSubscription"),Zt(this,"annotationsApi"),Zt(this,"slotsApi"),Zt(this,"focusManager"),Zt(this,"prevIsid"),Zt(this,"isInited",!1),Zt(this,"postponedInitParams",null),Zt(this,"internalsExposure",null),Zt(this,"shadowDOMCallbacksDisabled",!1),Zt(this,"fatalError$",new xI(null)),Zt(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:f,autoplay:$,isMobile:y,isTouch:_,refDomain:S,deviceId:C,interactiveData:I}=Sc(this.videoConfig,i),N=(o=I==null?void 0:I.projectInfo)==null?void 0:o.pid,P=(a=(r=this.interactiveController)==null?void 0:r.state.isReplay$.getValue())!=null?a:!1;P&&(this.prevIsid=void 0);let{unitedVideoId:E,isClip:k=!1}=e;if(this.uiConfig.features.statistics&&E)try{return new LI(Ds({movieId:E,albumId:d,place:s,trackCode:m,vkAppId:p,autoplay:(l=$&&!this.interactiveController)!=null?l:!1,mobile:_!=null?_:y,clip:k,refDomain:S,deviceId:C,isPreviewPlayerView:this.videoConfig.playerView==="preview"},N&&(!this.isInited||P)&&{projectId:Number(N)}),Ds({refreshAuthToken:f,userSalt:u,config:this.statisticsConfig},this.interactiveController&&{useIsid:!0,isid:this.prevIsid}))}catch(H){console.error(H),this.log({message:H.message})}}),Lc.create("ui"),this.logger=new TI,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.subscription=new qb,this.interactiveSubscription=new qb,this.graphMadePause=!1,this.fatalError$.subscribe(e=>{this.unmountComponent(this.svelteErrorComponent),e&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=Yr(kv,{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=ci({title:o,thumbUrl:r}),l={target:this.playerContainer,props:a};this.svelteStubComponent=Yr(Av,l),this.sveltePersistentLayerComponent=Yr(Ov,{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(),Lc.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}=Sc(this.videoConfig,i),{unitedVideoId:l}=e;if(this.uiConfig.features.thinStatistics&&l)return new MI.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,f,$;if(!this.videoConfig)return;let{albumId:y,statPlace:_,statAuthToken:S,preload:C,autoplay:I,volume:N,muted:P,fromTime:E,canRewindLive:k,supportLink:Q,showAds:H,adsSlotId:z,adsParams:Y={},adsAutoplayParam:le,interfaceLanguage:X,isCyrillicRelatedInterface:re,logoClickable:Z,logoHidden:we,isMobile:ue,isTouch:ne,isAudioDisabled:_e,isLiveCatchUpMode:xe,fullScreenTarget:J,failoverHosts:Ne,canDownload:pe,callbacks:A,interactiveData:We,showThumbTimer:Te,additionalButtons:j=[],additionalSettingsMenuItems:ie=[],additionalContextMenuItems:De=[],repeat:Be,loop:it,saveRate:U,volumeMultiplier:ke,showEndScreen:Pe,showAutoplayNext:Ue,mediascopePixels:Ze}=Sc(this.videoConfig,i),{sources:ye,title:Ae,thumbUrl:Fe,unitedVideoId:Dt,isClip:pt=!1,duration:Bt,adsParams:st={},videoEpisodes:St,previewThumbsData:ti,subtitles:Rt,subtitlesForcedLanguage:$e,live:be,adsExternalApi:ee}=e;if(!ye&&!be){let fi=new Error("empty sources and live");this.fatalError$.next(fi),(r=A.onCrashed)==null||r.call(A,fi.message);return}let ot=Ds(Ds({},Y),st),fe=this.getNextVideoInfo(),Me={sources:ye,title:Ae,thumbUrl:Fe,subtitles:Rt,subtitlesForcedLanguage:$e,unitedVideoId:Dt,isClip:pt,live:be,albumId:y,statPlace:_,autoplay:I,muted:P,volume:N,fromTime:E,canRewindLive:k,showAds:H,adsSlotId:z,adsParams:ot,adsAutoplayParam:le,duration:Bt,logoClickable:Z,logoHidden:we,isTouch:ne!=null?ne:ue,repeat:Be,loop:it,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:fe.nextVideoTitle,endScreenVideoThumb:fe.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()},$t={pictureInPictureApi:this.pictureInPictureApi,annotationsApi:this.annotationsApi,slotsApi:this.slotsApi,focusManager:this.focusManager};this.log({message:`create player, props: ${JSON.stringify(Me)}`});let At=(a=this.interactiveController)==null?void 0:a.state.statistics$.getValue(),ct=(At==null?void 0:At.oneStat)||this.createOneStat(e,i),ce=this.createThinOneStat(e,i),ze;Ze&&(ze=new VI({pixels:Ze})),(ct||ce)&&(this.statistics=new Gu(ct,ce,ze,At==null?void 0:At.statSubscription)),this.uiConfig.features.sentry&&this.uiConfig.sentry.dsn&&new Ma(this.uiConfig.sentry,{version:Ml,env:hu},{movieId:Dt,albumId:y,place:_,autoplay:(l=I&&!this.interactiveController)!=null?l:!1,mobile:ne!=null?ne:ue,clip:pt}),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=Ds(Ds({},this.sentry),Ma.getInstance());let at=!!We,Ft=[],Ht="tooltip_interactive_go_back_disabled_first";if(at&&this.interactiveController){let fi=this.interactiveController.state.isInitialChapter$.getValue(),hi=this.interactiveController.getHistoryState();fi&&Ft.push("REPLAY_BUTTON"),this.interactiveController.getIsSeekable().getValue()||Ft.push("SEEK_TO_INTERACTIVE_BUTTON"),hi.hasPrevChapter$.getValue()||(Ft.push("PLAY_PREV_CHAPTER_BUTTON"),fi||(hi.isGoBackLimited$.getValue()?Ht="tooltip_interactive_go_back_disabled_limit":Ht="tooltip_interactive_go_back_disabled"))}let oi=()=>{var fi;this.isInited=!1,this.prevIsid=void 0;let hi=(o==null?void 0:o.info.isEnded$.getValue())&&((fi=this.interactiveController)==null?void 0:fi.state.isEndChapter$.getValue());A.onReplayInteractiveVideo&&!hi?A.onReplayInteractiveVideo():this.replayInteractiveVideo()},yi=Be&&this.videoConfig.videos.length===1;this.store=tb({player:o,interfaceLanguage:X,isCyrillicRelatedInterface:re,videoId:Dt,isClip:pt,isLiveCatchUpMode:xe,isAudioDisabled:_e,statAuthToken:S,callbacks:A,webApi:$t,videoEpisodes:St,previewThumbsData:ti,canDownload:pe,uiConfig:this.uiConfig,coreConfig:this.coreConfig,disabledControls:Ft,isInteractive:at,saveRate:U,interactiveRanges$:(m=this.interactiveController)==null?void 0:m.state.interactiveRanges$,isInteractiveTime$:(p=this.interactiveController)==null?void 0:p.state.isInteractiveTime$,stopPlayer:()=>this.stop(),replayInteractive:oi,playPrevChapterDisabledTooltip:Ht,hasInteractiveBranches:!!(($=(f=this.interactiveController)==null?void 0:f.getChapterBranches())!=null&&$.length),additionalButtons:this.uiConfig.features.additionalButtons?j:[],additionalSettingsMenuItems:ie!=null?ie:[],additionalContextMenuItems:De!=null?De:[],playPrevVideo:()=>this.playPrevVideo(),playNextVideo:()=>this.playNextVideo(),onVideoChanged:fi=>{var hi;return(hi=this.sveltePersistentLayerComponent)==null?void 0:hi.startVideoChangedAnimation(fi)},looped:this.uiConfig.features.useLoopSetting?it:yi,statistics:this.statistics,internalsExposure:this.internalsExposure,playerView:this.videoConfig.playerView,playerId:this.playerId});let{stores:ji}=this.microStoresRoot=Wb(),Nt=()=>{var fi,hi,ht,Xt,Si,Xi;if(!this.store||!this.microStoresRoot||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(Et=>{var Ke;return(Ke=A==null?void 0:A.onCurrentFormatChanged)==null?void 0:Ke.call(A,Et)})),this.subscription.add(ji.interactiveControlsOpacity$.subscribe(Et=>{var Ke;Et!==null&&((Ke=this==null?void 0:this.interactiveController)==null||Ke.setDisabledControls(Et))})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(Et=>{var Ke;return(Ke=A==null?void 0:A.onThroughputEstimationChanged)==null?void 0:Ke.call(A,Et)})),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(Et=>{var Ke;return(Ke=A==null?void 0:A.onTrafficSavingEnabledChanged)==null?void 0:Ke.call(A,Et)})),this.subscription.add(this.store.state.highQualityEnabled$.subscribe(Et=>{var Ke;return(Ke=A==null?void 0:A.onHighQualityEnabledChanged)==null?void 0:Ke.call(A,Et)})),this.subscription.add(this.store.state.isAutoQualityEnabled$.subscribe(Et=>{var Ke;return(Ke=A==null?void 0:A.onAutoQualityEnabledChanged)==null?void 0:Ke.call(A,!!Et)})),this.subscription.add(new CI(Et=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(Ke=>Et.next(Ke)))}).pipe(PI(1)).subscribe(Et=>{var Ke;return(Ke=A==null?void 0:A.onCurrentPlaybackRateChanged)==null?void 0:Ke.call(A,Et)})),this.subscription.add(this.store.state.volume$.subscribe(Et=>{var Ke;return(Ke=A==null?void 0:A.onVolumeChange)==null?void 0:Ke.call(A,Et)})),this.subscription.add(this.store.state.muted$.subscribe(Et=>{var Ke,Ti,bo,So;if(Et)(Ke=A==null?void 0:A.onMute)==null||Ke.call(A);else{let gn=(bo=((Ti=this.store)==null?void 0:Ti.state.volume$)&&ge(this.store.state.volume$))!=null?bo:0;(So=A==null?void 0:A.onUnmute)==null||So.call(A,gn)}})),this.subscription.add(this.store.state.videoBitrate$.subscribe(Et=>{var Ke;return(Ke=A==null?void 0:A.onVideoBitrateChanged)==null?void 0:Ke.call(A,Et)})),this.subscription.add(this.store.state.isInteractiveTime$.subscribe(Et=>{var Ke;let Ti=(Ke=this.store)==null?void 0:Ke.ui.controls.disabledControls$;Ti&&(Et&&!Ti.includes(Pd)&&Ti.add(Pd),Et||Ti.remove(Pd))})),this.subscription.add(this.store.ui.isFullscreen.subscribe(Et=>gp(this,null,function*(){var Ke;if(!Qb.browser.isSamsungBrowser||!Et||!this.interactiveController)return;document.fullscreenElement===this.shadowRootContainer&&(yield this.replayInteractiveChapter((Ke=this.videoConfig)==null?void 0:Ke.callbacks.onExternalFullscreenExit))}))),this.statistics&&this.statistics.oneStat&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(Et=>{var Ke;return(Ke=A==null?void 0:A.onVSIDChanged)==null?void 0:Ke.call(A,Et)})),this.initMediaSession(),O(Jn,{interactiveController:this.interactiveController,interactiveContainer:this.interactiveContainer,sources:ye,store:this.store,microStoresRoot:this.microStoresRoot,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:Ae,thumbUrl:Fe,subtitles:Rt,subtitlesForcedLanguage:$e,live:be,preload:C,autoplay:I,muted:P,volume:N,fromTime:E,canRewindLive:k,supportLink:Q,showAds:H,adsSlotId:z,adsParams:ot,adsAutoplayParam:le,duration:Bt,logoClickable:Z,logoHidden:we,isMobile:ne!=null?ne:ue,failoverHosts:Ne,fullScreenTarget:J,saveRate:U,shadowRootContainer:this.shadowRootContainer,showMiniTimer:Te,outerContainerRef:this.rootContainer,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:fe.nextVideoTitle,endScreenVideoThumb:fe.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist(),playPrevChapter:()=>this.playPrevChapter(),seekToInteractive:()=>this.seekToInteractive(),volumeMultiplier:ke,showEndScreen:Pe,showAutoplayNext:Ue,adsExternalApi:ee},!0);let Jt={target:this.playerContainer,props:n(Jn)};this.svelteRootComponent=Yr(Ev,Jt),this.addPlayerInfoSubscriptions(),this.isInited||(this.isInited=!0,(ht=(hi=(fi=this.videoConfig)==null?void 0:fi.callbacks)==null?void 0:hi.onInited)==null||ht.call(hi)),(Xt=this.internalsExposure)==null||Xt.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig,logger:this.logger,log:this.log}),this.uiConfig.devNullLog&&((Xi=(Si=this.videoConfig)==null?void 0:Si.callbacks)!=null&&Xi.onDevNullLog)?Lc.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):Lc.destroy("ui")};this.coreConfig.asyncResolveClientChecker?Qb.isInited$.subscribe(fi=>{fi&&(console.log("UI SDK async start"),Nt())}):Nt()}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&&Dv(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)}initInteractives(){return gp(this,null,function*(){var e,i,o,r,a,l;if((e=this.videoConfig)!=null&&e.interactiveData)try{let{Interactives:d}=yield import("@vkontakte/videoplayer-interactive/es2015");this.interactiveContainer=document.createElement("div"),this.interactiveContainer.classList.add("interactive-root");let s=(i=this.store)==null?void 0:i.interfaceLanguage$,u=s?ge(s):this.videoConfig.interfaceLanguage,{projectInfo:m,initChapterId:p,historyApi:f,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:f,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$:_}=this.interactiveController.state;this.uiConfig.features.seekToInteractive&&this.subscription.add(_.subscribe(C=>{if(!this.isInited)return;let I=this.store;C?I.ui.controls.disabledControls$.remove("SEEK_TO_INTERACTIVE_BUTTON"):I.ui.controls.disabledControls$.add("SEEK_TO_INTERACTIVE_BUTTON")})),this.subscription.add(y.subscribe(C=>{this.store&&this.store.state.isInteractiveExpectation$.set(C)}));let S=!0;if(this.subscription.add(this.interactiveController.events.playerChanged$.subscribe(C=>{if(!this.videoConfig)return;this.videoConfig.videos[this.currentPlayingVideoIndex]=$I(Ds({},C.config),{title:(m==null?void 0:m.title)||C.config.title});let I=S?this.videoConfig.autoplay:!0;this.createPlayerWithCurrentVideo(C.player,I),S&&(S=!1)})),this.interactiveSubscription.add(this.interactiveController.events.interactiveActionChoice$.subscribe(({type:C,actionType:I})=>{var N,P,E,k,Q,H;if(!this.store||!this.microStoresRoot)return;let z=y.getValue();if(C==="action-choice"&&I==="setRandomBranch"&&(this.microStoresRoot.stores.graphIsOpened$.set(!1),this.store.ui.controls.disabledControls$.remove(Ad)),C==="action-choice-canceled"){let Y=ge(this.store.state.isPlaying$)||z;if(((E=(N=this.videoConfig)==null?void 0:N.isTouch)!=null?E:(P=this.videoConfig)!=null&&P.isMobile)&&Y){this.store.ui.interactiveHideMobileControls.set(!0);return}(H=(k=this.videoConfig)==null?void 0:(Q=k.callbacks).onDisabledInteractiveClick)==null||H.call(Q)}})),this.interactiveSubscription.add(this.interactiveController.events.interactiveContainerFakeRemoved$.subscribe(({type:C,removeAllOpenURI:I})=>{this.store&&C==="container-fake-removed"&&I&&this.store.ui.controls.disabledControls$.remove(Ad)})),yield this.interactiveController.setManifest(this.videoConfig.interactiveData.manifest),(r=(o=this.videoConfig)==null?void 0:o.callbacks)!=null&&r.onInteractiveHistoryChanged){let C=this.interactiveController.getHistoryState();this.subscription.add(C.history$.subscribe(I=>{var N,P,E;I.length&&((E=(P=(N=this.videoConfig)==null?void 0:N.callbacks)==null?void 0:P.onInteractiveHistoryChanged)==null||E.call(P,I))}))}(l=(a=this.videoConfig)==null?void 0:a.callbacks)!=null&&l.onInteractiveChapterChanged&&this.subscription.add(this.interactiveController.events.chapterChanged$.subscribe(C=>{var I,N,P;(P=(I=this.videoConfig)==null?void 0:(N=I.callbacks).onInteractiveChapterChanged)==null||P.call(N,C.chapter,C.manifestVideo)})),this.uiConfig.features.interactiveTimeIndicator&&this.subscription.add(this.interactiveController.events.noInteraction$.subscribe(()=>{var C,I,N,P;(C=this.microStoresRoot)==null||C.stores.showInteractiveTimeIndicatorTooltip$.set(!0,!0),(P=(I=this.videoConfig)==null?void 0:(N=I.callbacks).onInteractiveTimeIndicatorClick)==null||P.call(N)})),this.interactiveSubscription.add(this.interactiveController.events.error$.subscribe(C=>{this.log({message:C.toString()})}))}catch(d){this.log({message:d.message})}})}initPlayer(e,i={}){var o,r,a,l,d,s,u,m,p,f,$,y,_,S,C,I,N,P,E,k,Q,H,z,Y,le;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=Sc(RI,wI(e,X=>X instanceof HTMLElement?X:void 0)),this.playerId=AI(e.playerId),this.uiConfig=kh((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 EI("ui",this.playerId))),Lc.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:[yI()]}),Dv(this.videoConfig.isMediaSessionEnabled)&&(this.uiConfig.features.mediaSession=(f=(p=this.uiConfig.features.mediaSession)!=null?p:this.videoConfig.isMediaSessionEnabled)!=null?f:!0),Dv(this.videoConfig.isPictureInPictureEnabled)&&(this.uiConfig.features.pip=(y=($=this.uiConfig.features.pip)!=null?$:this.videoConfig.isPictureInPictureEnabled)!=null?y:!0,this.uiConfig.features.dpip=(S=(_=this.uiConfig.features.dpip)!=null?_:this.videoConfig.isPictureInPictureEnabled)!=null?S:!0),this.uiConfig.ads.paramsOverride=Ds({preview:(C=this.uiConfig.ads.preview)!=null?C:this.videoConfig.adsPreviewParam},this.uiConfig.ads.paramsOverride),this.videoConfig.isTouch=(N=(I=this.uiConfig.isMobile)!=null?I:this.videoConfig.isTouch)!=null?N:this.videoConfig.isMobile,(P=this.videoConfig).autoplay&&(P.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=!((Q=this.uiConfig.showLogo)!=null?Q:!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&&((Y=this.videoConfig.videos)!=null&&Y[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 Va(X)}this.mediaSessionApi=this.uiConfig.features.mediaSession?new dp:void 0,this.slotsApi=this.uiConfig.features.slots?new rp: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]),Db(this.pictureInPictureApi)&&this.pictureInPictureApi.setPlayerDomElement(this.playerContainer,this._shadowRoot),(le=this.slotsApi)==null||le.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(Jn)&&(n(Jn).showNextPrevButtons=this.needToShowNextPrevButtons(),n(Jn).nextButtonActive=this.isNextButtonActive(),n(Jn).prevButtonActive=this.isPrevButtonActive(),n(Jn).endScreenVideoTitle=o.nextVideoTitle,n(Jn).endScreenVideoThumb=o.nextVideoThumb,n(Jn).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}=Ds({},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(Jn)&&(n(Jn).needToRepeatPlaylist=this.needToRepeatPlaylist,n(Jn).showNextPrevButtons=this.needToShowNextPrevButtons(),n(Jn).nextButtonActive=this.isNextButtonActive(),n(Jn).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)}setLanguage(e){return gp(this,null,function*(){var i;yield(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()}replayInteractiveChapter(e){return gp(this,null,function*(){var i,o;if(this.interactiveController&&((i=this.store)!=null&&i.state.positionExact$)){let r=ge(this.store.state.positionExact$),l=ge(this.store.state.interactiveEpisodes$).find(s=>!s.completed);this.interactiveController.events.playerChanged$.pipe(II()).subscribe(()=>{l&&r>=l.time?this.seekTime(l.time):this.seekTime(r),e==null||e()});let d=this.interactiveController.getCurrentChapter();yield 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 hne,VKNumericLanguage as _ne,loadVKLangPack as bne}from"@vkontakte/videoplayer-shared/es2015";import{VideoQuality as yne,VideoFormat as xne}from"@vkontakte/videoplayer-core/es2015";var dne=()=>{window.customElements.define("vk-video-player",hp)};export{Yu as ControlButtonType,ms as GridTypes,hne as InterfaceLanguage,Ud as MenuItemType,vs as PlayerPhase,Ml as VERSION,_ne as VKNumericLanguage,xne as VideoFormat,yne as VideoQuality,bne as loadVKLangPack,dne as registerPlayerWebComponent};