@divkitframework/divkit 29.2.0 → 29.3.0-canary-bb695da4bafbcfd075df8cecef0920b71ac5a7d0
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/dist/browser/client-devtool.js +1 -1
- package/dist/browser/client-devtool.js.map +1 -1
- package/dist/browser/client-hydratable.js +1 -1
- package/dist/browser/client-hydratable.js.map +1 -1
- package/dist/browser/client.js +1 -1
- package/dist/browser/client.js.map +1 -1
- package/dist/client-devtool.js +1 -1
- package/dist/client-devtool.js.map +1 -1
- package/dist/client-hydratable.js +1 -1
- package/dist/client-hydratable.js.map +1 -1
- package/dist/client.js +1 -1
- package/dist/client.js.map +1 -1
- package/dist/esm/client-devtool.mjs +1 -1
- package/dist/esm/client-devtool.mjs.map +1 -1
- package/dist/esm/client-hydratable.mjs +1 -1
- package/dist/esm/client-hydratable.mjs.map +1 -1
- package/dist/esm/client.mjs +1 -1
- package/dist/esm/client.mjs.map +1 -1
- package/dist/esm/server.mjs +1 -1
- package/dist/esm/server.mjs.map +1 -1
- package/dist/server.js +1 -1
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/server.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var t={d:(e,r)=>{for(var i in r)t.o(r,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:r[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};t.d(e,{M:()=>go,Os:()=>Or,sY:()=>Eo}),new Set;const r="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function i(t,e,r){return e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class n{constructor(t){i(this,"_listeners","WeakMap"in r?new WeakMap:void 0),i(this,"_observer",void 0),i(this,"options",void 0),this.options=t}observe(t,e){return this._listeners.set(t,e),this._getObserver().observe(t,this.options),()=>{this._listeners.delete(t),this._observer.unobserve(t)}}_getObserver(){var t;return null!==(t=this._observer)&&void 0!==t?t:this._observer=new ResizeObserver((t=>{for(const r of t){var e;n.entries.set(r.target,r),null===(e=this._listeners.get(r.target))||void 0===e||e(r)}}))}}function o(){}function a(t){return t()}function s(t){t.forEach(a)}function l(t,...e){if(null==t){for(const t of e)t(void 0);return o}const r=t.subscribe(...e);return r.unsubscribe?()=>r.unsubscribe():r}function c(t,e,r){return t.set(r),e}let u;function d(t){u=t}function p(){if(!u)throw new Error("Function called outside component initialization");return u}function v(t){p().$$.on_destroy.push(t)}function g(t,e){return p().$$.context.set(t,e),e}function f(t){return p().$$.context.get(t)}n.entries="WeakMap"in r?new WeakMap:void 0,new Map;const h=[],m=[];let y=[];const b=[],_=Promise.resolve();let w=!1;function $(){return w||(w=!0,_.then(C)),_}function x(t){y.push(t)}const k=new Set;let E=0;function C(){if(0!==E)return;const t=u;do{try{for(;E<h.length;){const t=h[E];E++,d(t),A(t.$$)}}catch(t){throw h.length=0,E=0,t}for(d(null),h.length=0,E=0;m.length;)m.pop()();for(let t=0;t<y.length;t+=1){const e=y[t];k.has(e)||(k.add(e),e())}y.length=0}while(h.length);for(;b.length;)b.pop()();w=!1,k.clear(),d(t)}function A(t){if(null!==t.fragment){t.update(),s(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(x)}}new Set;const F=new Set(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]),V=/^(?:area|base|br|col|command|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)$/;function D(t){return V.test(t)||"!doctype"===t.toLowerCase()}const j=/[\s'">/=\u{FDD0}-\u{FDEF}\u{FFFE}\u{FFFF}\u{1FFFE}\u{1FFFF}\u{2FFFE}\u{2FFFF}\u{3FFFE}\u{3FFFF}\u{4FFFE}\u{4FFFF}\u{5FFFE}\u{5FFFF}\u{6FFFE}\u{6FFFF}\u{7FFFE}\u{7FFFF}\u{8FFFE}\u{8FFFF}\u{9FFFE}\u{9FFFF}\u{AFFFE}\u{AFFFF}\u{BFFFE}\u{BFFFF}\u{CFFFE}\u{CFFFF}\u{DFFFE}\u{DFFFF}\u{EFFFE}\u{EFFFF}\u{FFFFE}\u{FFFFF}\u{10FFFE}\u{10FFFF}]/u;function P(t,e){const r=Object.assign({},...t);if(e){const t=e.classes,i=e.styles;t&&(null==r.class?r.class=t:r.class+=" "+t),i&&(null==r.style?r.style=W(i):r.style=W(function(t,e){const r={};for(const e of t.split(";")){const t=e.indexOf(":"),i=e.slice(0,t).trim(),n=e.slice(t+1).trim();i&&(r[i]=n)}for(const t in e){const i=e[t];i?r[t]=i:delete r[t]}return r}(r.style,i)))}let i="";return Object.keys(r).forEach((t=>{if(j.test(t))return;const e=r[t];!0===e?i+=" "+t:F.has(t.toLowerCase())?e&&(i+=" "+t):null!=e&&(i+=` ${t}="${e}"`)})),i}const S=/[&"]/g,O=/[&<]/g;function I(t,e=!1){const r=String(t),i=e?S:O;i.lastIndex=0;let n="",o=0;for(;i.test(r);){const t=i.lastIndex-1,e=r[t];n+=r.substring(o,t)+("&"===e?"&":'"'===e?""":"<"),o=t+1}return n+r.substring(o)}function M(t){return"string"==typeof t||t&&"object"==typeof t?I(t,!0):t}function T(t){const e={};for(const r in t)e[r]=M(t[r]);return e}function z(t,e){var r;t=void 0!==(null==(r=t)?void 0:r.length)?r:Array.from(r);let i="";for(let r=0;r<t.length;r+=1)i+=e(t[r],r);return i}const N={$$render:()=>""};function B(t,e){if(!t||!t.$$render)throw"svelte:component"===e&&(e+=" this={...}"),new Error(`<${e}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules. Otherwise you may need to fix a <${e}>.`);return t}let R,J;function U(t){function e(e,r,i,n,o){const a=u;d({$$:{on_destroy:R,context:new Map(o||(a?a.$$.context:[])),on_mount:[],before_update:[],after_update:[],callbacks:Object.create(null)}});const s=t(e,r,i,n);return d(a),s}return{render:(t={},{$$slots:r={},context:i=new Map}={})=>{R=[];const n={title:"",head:"",css:new Set},o=e(n,t,{},r,i);return s(R),{html:o,css:{code:Array.from(n.css).map((t=>t.code)).join("\n"),map:null},head:n.title+n.head}},$$render:e}}function L(t,e,r){return null==e||r&&!e?"":` ${t}${r&&!0===e?"":`="${I(e,!0)}"`}`}function W(t){return Object.keys(t).filter((e=>t[e])).map((e=>`${e}: ${M(t[e])};`)).join(" ")}function H(t){const e=W(t);return e?` style="${e}"`:""}function q(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function G(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?q(Object(r),!0).forEach((function(e){Z(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):q(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Z(t,e,r){return e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Y(t,e,r,i){var n;const o=null===(n=r[t])||void 0===n?void 0:n.type;if(e="Boolean"===o&&"boolean"!=typeof e?null!=e:e,!i||!r[t])return e;if("toAttribute"===i)switch(o){case"Object":case"Array":return null==e?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return null==e?null:e;default:return e}else switch(o){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":default:return e;case"Number":return null!=e?+e:e}}"function"==typeof HTMLElement&&(J=class extends HTMLElement{constructor(t,e,r){super(),Z(this,"$$ctor",void 0),Z(this,"$$s",void 0),Z(this,"$$c",void 0),Z(this,"$$cn",!1),Z(this,"$$d",{}),Z(this,"$$r",!1),Z(this,"$$p_d",{}),Z(this,"$$l",{}),Z(this,"$$l_u",new Map),this.$$ctor=t,this.$$s=e,r&&this.attachShadow({mode:"open"})}addEventListener(t,e,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const r=this.$$c.$on(t,e);this.$$l_u.set(e,r)}super.addEventListener(t,e,r)}removeEventListener(t,e,r){if(super.removeEventListener(t,e,r),this.$$c){const t=this.$$l_u.get(e);t&&(t(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){if(await Promise.resolve(),!this.$$cn)return;function t(t){return()=>{let e;return{c:function(){e=function(t){return document.createElement(t)}("slot"),"default"!==t&&function(t,e,r){null==r?t.removeAttribute(e):t.getAttribute(e)!==r&&t.setAttribute(e,r)}(e,"name",t)},m:function(t,r){!function(t,e,r){t.insertBefore(e,r||null)}(t,e,r)},d:function(t){t&&function(t){t.parentNode&&t.parentNode.removeChild(t)}(e)}}}}const e={},r=function(t){const e={};return t.childNodes.forEach((t=>{e[t.slot||"default"]=!0})),e}(this);for(const n of this.$$s)n in r&&(e[n]=[t(n)]);for(const o of this.attributes){const a=this.$$g_p(o.name);a in this.$$d||(this.$$d[a]=Y(a,o.value,this.$$p_d,"toProp"))}this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:G(G({},this.$$d),{},{$$slots:e,$$scope:{ctx:[]}})});const i=()=>{this.$$r=!0;for(const t in this.$$p_d)if(this.$$d[t]=this.$$c.$$.ctx[this.$$c.$$.props[t]],this.$$p_d[t].reflect){const e=Y(t,this.$$d[t],this.$$p_d,"toAttribute");null==e?this.removeAttribute(t):this.setAttribute(this.$$p_d[t].attribute||t,e)}this.$$r=!1};this.$$c.$$.after_update.push(i),i();for(const s in this.$$l)for(const l of this.$$l[s]){const c=this.$$c.$on(s,l);this.$$l_u.set(l,c)}this.$$l={}}}attributeChangedCallback(t,e,r){var i;this.$$r||(t=this.$$g_p(t),this.$$d[t]=Y(t,r,this.$$p_d,"toProp"),null===(i=this.$$c)||void 0===i||i.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then((()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)}))}$$g_p(t){return Object.keys(this.$$p_d).find((e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t))||t}});const X=[];function Q(t,e=o){let r;const i=new Set;function n(e){if(o=e,((n=t)!=n?o==o:n!==o||n&&"object"==typeof n||"function"==typeof n)&&(t=e,r)){const e=!X.length;for(const e of i)e[1](),X.push(e,t);if(e){for(let t=0;t<X.length;t+=2)X[t][0](X[t+1]);X.length=0}}var n,o}function a(e){n(e(t))}return{set:n,update:a,subscribe:function(s,l=o){const c=[s,l];return i.add(c),1===i.size&&(r=e(n,a)||o),s(t),()=>{i.delete(c),0===i.size&&r&&(r(),r=null)}}}}function K(t,e,r){const i=!Array.isArray(t),n=i?[t]:t;if(!n.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const a=e.length<2;return c=(t,r)=>{let c=!1;const u=[];let d=0,p=o;const v=()=>{if(d)return;p();const n=e(i?u[0]:u,t,r);a?t(n):p="function"==typeof n?n:o},g=n.map(((t,e)=>l(t,(t=>{u[e]=t,d&=~(1<<e),c&&v()}),(()=>{d|=1<<e}))));return c=!0,v(),function(){s(g),p(),c=!1}},{subscribe:Q(r,c).subscribe};var c}const tt="divkit-bd259",et="divkit-d9099",rt="divkit-c016b",it="divkit-ee112",nt="divkit-aa145",ot="divkit-f0cba",at=Symbol("root");function st(t,e={}){const r=t;return r.level=e.level||"error",e.additional&&(r.additional=e.additional),r}const lt={"text-range":"divkit-faf07",text:"divkit-d9b0e",text_halign_left:"divkit-a4cb7",text_halign_center:"divkit-e1659",text_halign_right:"divkit-ea280",text_valign_top:"divkit-d8ce0",text_valign_center:"divkit-ef58e",text_valign_bottom:"divkit-fe8ed",text_valign_baseline:"divkit-e0c6c",text__inner:"divkit-b8528",text_singleline:"divkit-ef11c",text_multiline:"divkit-ee8e3",text_truncate_none:"divkit-c6ea1",text__inner_gradient:"divkit-cb8e0",text__image:"divkit-bf6e2",text__image_hidden:"divkit-f1002","text_has-focus-color":"divkit-cb341"},ct={outer:"divkit-d65a7","outer_hide-on-transition-in":"divkit-a6d12","outer_halign-self_start":"divkit-cc452","outer_halign-self_center":"divkit-b8331","outer_halign-self_end":"divkit-c573c","outer_halign-self_stretch":"divkit-dcc74","outer_valign-self_start":"divkit-e8077","outer_valign-self_center":"divkit-d40a7","outer_valign-self_end":"divkit-e9f84","outer_valign-self_stretch":"divkit-b7aa3","outer_parent-flex_vertical":"divkit-c143f","outer_parent-flex_horizontal":"divkit-ef302","outer_valign-self_baseline":"divkit-e72b5",outer_width_content:"divkit-b8f4d",outer_height_content:"divkit-faa66","outer_width-constrained":"divkit-d3211","outer_parent-grid":"divkit-ff439","outer_height-constrained":"divkit-a5256","outer_parent-overlap":"divkit-dab2d","outer_parent-overlap-absolute":"divkit-d43fb","outer_scroll-snap_center":"divkit-d9e38","outer_scroll-snap_start":"divkit-efd1e",outer__border:"divkit-d4056",outer_visibility_invisible:"divkit-f018b",outer_visibility_gone:"divkit-e784b","outer_has-action-animation":"divkit-f4980","outer_has-custom-focus":"divkit-c7f14"};function ut(t){if(!t)return;let e="";for(const r in t)if(t.hasOwnProperty(r)){if(!t[r]&&0!==t[r])continue;e&&(e+=";"),e+=r+":"+String(t[r])}return e||void 0}function dt(t){if("number"!=typeof t&&"string"!=typeof t||!t)return"0";const e=Number(t);return isNaN(e)?"0":Math.ceil(1e3*e)/1e4+"em"}function pt(t){let e=dt(t);return"0"===e&&(e+="em"),e}function vt(t,e){for(;t.length<e;)t="0"+t;return t}function gt(t,e=1,r="transparent"){if("#"!==(t=("string"==typeof t&&t||"").toLowerCase()).charAt(0))return r;const i=ft(t);return i?(i.a*=e,function(t){return 255===t.a?`#${[t.r,t.g,t.b].map((t=>vt(Math.round(t).toString(16),2))).join("")}`:`rgba(${t.r},${t.g},${t.b},${(t.a/255).toFixed(2)})`}(i)):r}function ft(t){const e=t.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)||t.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])$/i)||t.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)||t.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i);if(e){if(5===e.length){const[t,r,i,n,o]=e,a=2===i.length?i:i+i,s=2===n.length?n:n+n,l=2===o.length?o:o+o,c=2===r.length?r:r+r;return{a:parseInt(c,16),r:parseInt(a,16),g:parseInt(s,16),b:parseInt(l,16)}}const[t,r,i,n]=e,o=2===r.length?r:r+r,a=2===i.length?i:i+i,s=2===n.length?n:n+n;return{a:255,r:parseInt(o,16),g:parseInt(a,16),b:parseInt(s,16)}}return null}function ht(t){let e=String(t);return e.indexOf("&")>-1&&(e=e.replace(/&/g,"&")),e.indexOf("<")>-1&&(e=e.replace(/</g,"<")),e.indexOf(">")>-1&&(e=e.replace(/>/g,">")),e.indexOf('"')>-1&&(e=e.replace(/"/g,""")),e}const mt=Boolean;function yt(t){if(1===t.length&&"solid"===t[0].type)return{color:gt(t[0].color||"transparent"),size:"auto",position:"50% 50%"};const e=t.map((t=>"solid"===t.type?function(t){const e=gt(t.bg.color||"transparent");return{size:void 0,pos:void 0,image:`linear-gradient(to bottom,${e},${e})`}}({bg:t}):"gradient"===t.type?function(t){var e;if(!Array.isArray(null===(e=t.bg)||void 0===e?void 0:e.colors))return;const r=t.bg.colors.filter(mt);return r.length?{size:void 0,pos:void 0,image:"linear-gradient("+(90-Number(t.bg.angle||0))+"deg,"+r.map((t=>gt(t))).join(",")+")"}:void 0}({bg:t}):"image"===t.type?function(t){var e;const r=null===(e=t.bg)||void 0===e?void 0:e.image_url;if(r)return{size:wt(t.bg.scale),pos:$t(t.bg),image:'url("'+ht(r)+'")'}}({bg:t}):"radial_gradient"===t.type?function(t){var e;if(!Array.isArray(null===(e=t.bg)||void 0===e?void 0:e.colors))return;const r=t.bg.colors.filter(mt);if(!r.length)return;const i=t.bg.radius;let n;i&&"object"==typeof i&&"type"in i&&void 0!==i.value&&("fixed"===i.type?n=pt(i.value):"relative"===i.type&&(n=bt[i.value]));return{size:void 0,pos:void 0,image:`radial-gradient(circle ${n||"farthest-corner"} at ${_t(t.bg.center_x)} ${_t(t.bg.center_y)},`+r.map((t=>gt(t))).join(",")+")"}}({bg:t}):void 0)).filter(mt).reverse().reduce((function(t,e){return t.image.push(e.image),t.size.push(e.size||"auto"),t.position.push(e.pos||"50% 50%"),t}),{image:[],size:[],position:[]});return{image:e.image.join(","),size:e.size.join(","),position:e.position.join(",")}}const bt={nearest_corner:"closest-corner",farthest_corner:"farthest-corner",nearest_side:"closest-side",farthest_side:"farthest-side"};function _t(t){if(t&&"object"==typeof t&&"type"in t&&void 0!==t.value){if("fixed"===t.type)return pt(t.value);if("relative"===t.type)return 100*Number(t.value)+"%"}return"50%"}function wt(t){return"fit"===t?"contain":"stretch"===t?"fill":"no_scale"===t?"none":"cover"}function $t(t){let e,r;return e="left"===t.content_alignment_horizontal?"0%":"right"===t.content_alignment_horizontal?"100%":"50%",r="top"===t.content_alignment_vertical?"0%":"bottom"===t.content_alignment_vertical?"100%":"50%",e+" "+r}function xt(t){const e=/^([^/]+):\/\//.exec(t);return e&&e[1]||""}function kt(t,e){return e.has(t)}function Et(t,e,r){return"number"==typeof e&&(t&&e>0&&e<=100||!t&&e>=0&&e<100)?e:r}function Ct(t){return 0!==t.is_enabled&&!1!==t.is_enabled&&void 0!==t.index}function At(t,e){e&&t.push(e)}function Ft(t,e,r){const i=[];At(i,e[t]);for(const n in r)if(r.hasOwnProperty(n)){const o=r[n];o&&At(i,e[`${t}_${n}`+("string"==typeof o?`_${o}`:"")])}return i.join(" ")}const Vt=Symbol("state");function Dt(t){const e=t.top||0,r=t.right||0,i=t.bottom||0,n=t.left||0;return 0===e&&0===r&&0===i&&0===n?"":dt(e)+" "+dt(r)+" "+dt(i)+" "+dt(n)}function jt(t){if("number"!=typeof t&&"string"!=typeof t)return!1;const e=Number(t);return!isNaN(e)}function Pt(t){return jt(t)&&t>=0}function St(t,e){if(!t)return e;const r=[t.top,t.right,t.bottom,t.left];for(let t=0;t<r.length;++t)if(r[t]&&!Pt(r[t]))return e;return Dt(t)}function Ot(t,e){const r=Number(t);return isNaN(r)||r<0?e:r}const It=Object.prototype.hasOwnProperty;function Mt(t,e){if(Object.is(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return Object.is(t,e);const r=Object.keys(t),i=Object.keys(e);if(r.length!==i.length)return!1;for(let i=0;i<r.length;i++){const n=r[i];if(!It.call(e,n)||!Mt(t[n],e[n]))return!1}return!0}function Tt(t,e){return Mt(t,e)?e:t}function zt(t,e){return"linear"===t||"ease"===t||"ease_in_out"===t||"ease_in"===t||"ease_out"===t?t:e}function Nt(t,e){const r=Number(t);return isNaN(r)?e:r}function Bt(t){const e=[];return"set"===t.name?(t.items||[]).forEach((t=>{e.push(...Bt(t))})):e.push(t),e}function Rt(t,e){if(!t||"object"!=typeof t)return e;const r=["top","right","bottom","left"];for(let i=0;i<r.length;++i)if(t[r[i]]&&!Pt(t[r[i]]))return e;return t}function Jt(t,e=0,r=10){return[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]].map((t=>dt((t||e)/r*10))).join(" ")}function Ut(t){return 0!==t.is_enabled&&!1!==t.is_enabled}function Lt(){}const Wt=Symbol("action"),Ht=U(((t,e,r,i)=>{let{id:n=""}=e,{actions:o}=e,{doubleTapActions:a}=e,{longTapActions:s}=e,{cls:l=""}=e,{style:c=null}=e,{attrs:u}=e,{use:d=Lt}=e,{customAction:p=null}=e,{isNativeActionAnimation:h=!0}=e,{hasInnerFocusable:m=!1}=e;const y=f(at),b=f(Wt);let _;g(Wt,{hasAction:()=>Boolean(b.hasAction()||(null==o?void 0:o.length))});let w,$="",x=!1;if(v((()=>{n&&!m&&y.unregisterFocusable(n)})),void 0===e.id&&r.id&&void 0!==n&&r.id(n),void 0===e.actions&&r.actions&&void 0!==o&&r.actions(o),void 0===e.doubleTapActions&&r.doubleTapActions&&void 0!==a&&r.doubleTapActions(a),void 0===e.longTapActions&&r.longTapActions&&void 0!==s&&r.longTapActions(s),void 0===e.cls&&r.cls&&void 0!==l&&r.cls(l),void 0===e.style&&r.style&&void 0!==c&&r.style(c),void 0===e.attrs&&r.attrs&&void 0!==u&&r.attrs(u),void 0===e.use&&r.use&&void 0!==d&&r.use(d),void 0===e.customAction&&r.customAction&&void 0!==p&&r.customAction(p),void 0===e.isNativeActionAnimation&&r.isNativeActionAnimation&&void 0!==h&&r.isNativeActionAnimation(h),void 0===e.hasInnerFocusable&&r.hasInnerFocusable&&void 0!==m&&r.hasInnerFocusable(m),Array.isArray(o)&&(null==o?void 0:o.length))for(let t=0;t<o.length;++t){const e=o[t].url;if(e){$=e,w=o[t].target||void 0;break}}return Array.isArray(o)&&(null==o?void 0:o.length)&&b.hasAction()&&($="",y.logError(st(new Error("Actionable element is forbidden inside other actionable element"),{level:"warn",additional:{actions:o}}))),x=Boolean(p),$&&!kt(xt($),y.getBuiltinProtocols())?($="",x=!0):!$&&Array.isArray(o)&&(null==o?void 0:o.length)&&(x=!0,o.some((t=>t.url||t.typed))||y.logError(st(new Error("The component has a list of actions, but does not have a real action"),{level:"warn",additional:{actions:o}}))),$?`<a${P([{href:M($)},{target:M(w)},{style:M(c)},{class:I(l,!0)+" "+I(h?tt:et,!0)+" "+I(null!=s&&s.length?ot:"",!0)},T(u)],{})}${L("this",_,0)}>${i.default?i.default({}):""}</a>`:` <span${P([{class:I(l,!0)+I(x?` ${h?tt:et} ${rt}`:"",!0)+" "+I(null!=s&&s.length?ot:"",!0)},{style:M(c)},{role:M(x?"button":null)},{tabindex:M(x?0:null)},T(u)],{})}${L("this",_,0)}>${i.default?i.default({}):""}</span>`})),qt="divkit-b921d";function Gt(t){return jt(t)&&t>0}function Zt(t,e){return t.map((t=>{if("blur"===(null==t?void 0:t.type)){if(Gt(t.radius))return`blur(${pt(t.radius/2)})`}else e(st(new Error("Unknown filter"),{level:"warn",additional:{filter:null==t?void 0:t.type}}))})).filter(Boolean).join(" ")}const Yt=U(((t,e,r,i)=>{let n,{background:o=[]}=e,{radius:a=""}=e;const s=f(at);return void 0===e.background&&r.background&&void 0!==o&&r.background(o),void 0===e.radius&&r.radius&&void 0!==a&&r.radius(a),n=o.map((t=>{const e={},r={style:e};if("nine_patch_image"===t.type&&t.insets)e["border-image"]=`url("${t.image_url}") ${t.insets.top||0} ${t.insets.right||0} ${t.insets.bottom||0} ${t.insets.left||0} fill`,e["border-image-width"]="auto";else{const i=yt([t]);"solid"===t.type&&(e["background-color"]=i.color),"gradient"===t.type&&(e["background-image"]=i.image),"image"===t.type&&(e.opacity=Number(t.alpha),r.image_url=t.image_url,e["object-fit"]=i.size,e["object-position"]=i.position,Array.isArray(t.filters)&&t.filters.length&&(e.filter=Zt(t.filters,s.logError)))}return r})),`<span${L("class","divkit-bf253"+(a?" divkit-dcad7":""),0)}${H({"border-radius":a})}>${z(n,(t=>t.image_url?`<img${L("src",t.image_url,0)} alt="" aria-hidden="true" loading="lazy" decoding="async"${L("class",qt,0)}${L("style",ut(t.style),0)}>`:`<span${L("class",qt,0)}${L("style",ut(t.style),0)}></span>`))}</span>`})),Xt=Yt,Qt={left:"start",center:"center",right:"end"},Kt={top:"start",center:"center",bottom:"end",baseline:"baseline"},te=U(((t,e,r,i)=>{let n,a,s,c,u,d,p,g,h,m,y,b,_,w,x,k,E,C,A,F,V,D,j,P,S,O,I,M,T,z,N,R,J,U,W,H,q,G,Z,Y,X,Q,tt,et,rt,it=o,nt=o,ot=o,lt=o,vt=o,ft=o,ht=o,bt=o,_t=o,wt=o,$t=o,At=o,jt=o,It=o,Lt=o,Wt=o,qt=o,Gt=o,{json:Zt={}}=e,{origJson:Yt}=e,{templateContext:te}=e,{cls:ee=""}=e,{style:re}=e,{layoutParams:ie={}}=e,{customDescription:ne=!1}=e,{customPaddings:oe=!1}=e,{customActions:ae=""}=e,{additionalPaddings:se=null}=e,{heightByAspect:le=!1}=e,{parentOf:ce}=e,{parentOfSimpleMode:ue}=e,{replaceItems:de}=e,{hasInnerFocusable:pe=!1}=e;const ve=f(at),ge=f(Vt);let fe,he;I=l(ve.isPointerFocus,(t=>O=t));let me,ye,be,_e,we,$e,xe,ke,Ee,Ce,Ae,Fe,Ve,De,je,Pe,Se,Oe,Ie,Me,Te=null,ze=[],Ne={},Be={},Re=!1,Je=1,Ue="transparent",Le=0,We={"top-left":0,"top-right":0,"bottom-right":0,"bottom-left":0},He="",qe=null,Ge="",Ze={},Ye=0,Xe=0,Qe=0,Ke=!1,tr=!1,er={},rr=0,ir=0,nr=0,or=!1,ar=!1,sr=1,lr=[],cr=!1,ur=!1,dr=[],pr=[],vr=[],gr=[],fr=[],hr=[],mr="",yr=!1,br="visible",_r=0,wr=0,$r=!1,xr=null;function kr(t,e){if(!Array.isArray(ce)||!de)return;if(ue&&1!==(Array.isArray(e)&&e.length||0))return;const r=ce.findIndex((e=>(null==e?void 0:e.id)===t)),i=ce.slice();i.splice(r,1,...e||[]),ce=i,de(i)}function Er(){if(Te&&fe){const t=ve.getExtensionContext();Te.forEach((e=>{var r;null===(r=e.unmountView)||void 0===r||r.call(e,fe,t)})),Te=null}}function Cr(){Zt.focus&&(O||($r=!0),ve.execAnyActions(gr))}function Ar(){Zt.focus&&($r=!1,ve.execAnyActions(fr))}v((()=>{var t;ze.forEach((t=>{ve.unregisterParentOf(t)})),ze=[],null===(t=Zt.tooltips)||void 0===t||t.forEach((t=>{ve.unregisterTooltip(t)})),Er()})),void 0===e.json&&r.json&&void 0!==Zt&&r.json(Zt),void 0===e.origJson&&r.origJson&&void 0!==Yt&&r.origJson(Yt),void 0===e.templateContext&&r.templateContext&&void 0!==te&&r.templateContext(te),void 0===e.cls&&r.cls&&void 0!==ee&&r.cls(ee),void 0===e.style&&r.style&&void 0!==re&&r.style(re),void 0===e.layoutParams&&r.layoutParams&&void 0!==ie&&r.layoutParams(ie),void 0===e.customDescription&&r.customDescription&&void 0!==ne&&r.customDescription(ne),void 0===e.customPaddings&&r.customPaddings&&void 0!==oe&&r.customPaddings(oe),void 0===e.customActions&&r.customActions&&void 0!==ae&&r.customActions(ae),void 0===e.additionalPaddings&&r.additionalPaddings&&void 0!==se&&r.additionalPaddings(se),void 0===e.heightByAspect&&r.heightByAspect&&void 0!==le&&r.heightByAspect(le),void 0===e.parentOf&&r.parentOf&&void 0!==ce&&r.parentOf(ce),void 0===e.parentOfSimpleMode&&r.parentOfSimpleMode&&void 0!==ue&&r.parentOfSimpleMode(ue),void 0===e.replaceItems&&r.replaceItems&&void 0!==de&&r.replaceItems(de),void 0===e.hasInnerFocusable&&r.hasInnerFocusable&&void 0!==pe&&r.hasInnerFocusable(pe),Zt&&ie&&(qe=null,Ge="",sr=1,yr=!1,br="visible",_r=0,wr=0,Oe=void 0,Ie=void 0,lr=ie.fakeElement?[]:Zt.transition_triggers||["state_change","visibility_change"],cr=Boolean(-1!==lr.indexOf("state_change")&&Zt.id),ur=Boolean(-1!==lr.indexOf("visibility_change")&&Zt.id)),n=ve.getDerivedFromVars(Zt.focus),lt(),lt=l(n,(t=>N=t)),a=ve.getDerivedFromVars(Zt.border),Gt(),Gt=l(a,(t=>rt=t)),s=ve.getDerivedFromVars(Zt.paddings),qt(),qt=l(s,(t=>et=t)),c=ve.getDerivedFromVars(Zt.margins),Lt(),Lt=l(c,(t=>Q=t)),u=ve.getDerivedFromVars(Zt.width),jt(),jt=l(u,(t=>Y=t)),d=ve.getDerivedFromVars(Zt.alignment_horizontal),Wt(),Wt=l(d,(t=>tt=t)),p=ve.getDerivedFromVars(Zt.height),At(),At=l(p,(t=>Z=t)),g=ve.getDerivedFromVars(Zt.alignment_vertical),It(),It=l(g,(t=>X=t)),h=ve.getDerivedFromVars(Zt.alpha),$t(),$t=l(h,(t=>G=t)),m=ve.getDerivedFromVars(Zt.accessibility),wt(),wt=l(m,(t=>q=t)),y=ve.getDerivedFromVars(Zt.background),_t(),_t=l(y,(t=>H=t)),b=ve.getDerivedFromVars(Zt.action),ht(),ht=l(b,(t=>U=t)),_=ve.getDerivedFromVars(Zt.actions),bt(),bt=l(_,(t=>W=t)),w=ve.getDerivedFromVars(Zt.doubletap_actions),ft(),ft=l(w,(t=>J=t)),x=ve.getDerivedFromVars(Zt.longtap_actions),vt(),vt=l(x,(t=>R=t)),k=ve.getDerivedFromVars(Zt.action_animation),ot(),ot=l(k,(t=>z=t)),E=ve.getDerivedFromVars(Zt.visibility),nt(),nt=l(E,(t=>T=t)),C=ve.getDerivedFromVars(Zt.transform),it(),it=l(C,(t=>M=t)),ze.forEach((t=>{ve.unregisterParentOf(t)})),ze=[],ce&&ce.forEach((t=>{(null==t?void 0:t.id)&&(ze.push(t.id),ve.registerParentOf(t.id,{replaceWith:kr,isSingleMode:Boolean(ue)}))}));{const t=$r&&(null==N?void 0:N.border)?N.border:rt;let e={},r={},i=!1,n="";if(t){if(t.has_shadow){const r=t.shadow;e["box-shadow"]=r?function(t){var e,r,i,n,o,a;return dt((null===(e=t.offset)||void 0===e||null===(r=e.x)||void 0===r?void 0:r.value)||0)+" "+dt((null===(i=t.offset)||void 0===i||null===(n=i.y)||void 0===n?void 0:n.value)||0)+" "+dt(null!==(o=t.blur)&&void 0!==o?o:2)+" "+gt(t.color||"#000000",null!==(a=t.alpha)&&void 0!==a?a:.19)}(r):"0 1px 2px 0 rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.07)"}if(t.stroke&&(i=!0,Je=Ot(t.stroke.width,Je),Ue=gt(t.stroke.color,1,Ue),r.border=`${dt(Je)} solid ${Ue}`),t.corners_radius?(We=function(t,e){const r=[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]];for(let t=0;t<r.length;++t)if(r[t]&&!Pt(r[t]))return e;return t}(t.corners_radius,We),r["border-radius"]=e["border-radius"]=Jt(We)):t.corner_radius&&(Le=Ot(t.corner_radius,Le),We={"top-left":Le,"top-right":Le,"bottom-right":Le,"bottom-left":Le},r["border-radius"]=e["border-radius"]=dt(Le)),i&&Je&&(t.corners_radius||t.corner_radius)){let t=Object.assign({},We);["top-left","top-right","bottom-right","bottom-left"].forEach((e=>{t[e]=(t[e]||0)+Je/2})),n=Jt(t)}}Ne=Tt(e,Ne),Be=Tt(r,Be),Re=i,He=n}qe=Rt(et&&!oe?et:void 0,qe),A=Dt(function(t,e){if(!t&&!e)return{};if(!e)return t;if(!t)return e;const r={};return["top","right","bottom","left"].forEach((i=>{const n=t[i];n&&(r[i]=n);const o=e[i];o&&(r[i]=(r[i]||0)+o)})),r}(qe,se)),Ge=St(Q,Ge);{let t,e,r,i,n={},o=0,a=0,s=!1,l=!1;const c=null==Y?void 0:Y.type;if("fixed"===c)Ye=Ot(null==Y?void 0:Y.value,Ye),e=dt(Ye);else if("wrap_content"===c||("match_parent"===c||!c)&&ie.parentHorizontalWrapContent){if(t="content",("wrap_content"===c&&(null==Y?void 0:Y.constrained)||("match_parent"===c||!c)&&ie.parentHorizontalWrapContent)&&(n["width-constrained"]=!0,"horizontal"===ie.parentContainerOrientation&&(a=1)),"wrap_content"===c){const t=Y;t.min_size&&Pt(t.min_size.value)&&(r=dt(t.min_size.value)),t.max_size&&Pt(t.max_size.value)&&(i=dt(t.max_size.value))}"match_parent"!==c&&c||ve.logError(st(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))}else t="parent","vertical"===ie.parentContainerOrientation&&ie.parentContainerWrap&&(l=!0,ve.logError(st(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"vertical"===ie.parentLayoutOrientation?e=`calc(100% - ${pt(((null==Q?void 0:Q.left)||0)+((null==Q?void 0:Q.right)||0))})`:"horizontal"===ie.parentContainerOrientation&&(o=Y&&"weight"in Y&&Y.weight||1,ie.parentContainerWrap&&(s=!0));if("parent"===t)n["halign-self"]="stretch";else{const t=tt;n["halign-self"]="left"===t||"center"===t||"right"===t?Qt[t]:ie.parentHAlign||"start"}t&&(n.width=t),me=e,ye=r,be=i,Xe=o,Qe=a,Ze=Tt(n,Ze),Ke=s,tr=l}{let t,e,r,i,n={},o=0,a=0,s=!1,l=!1;const c=null==Z?void 0:Z.type;if(le);else if("fixed"===c)rr=Ot(null==Z?void 0:Z.value,rr),e=dt(rr);else if("match_parent"!==c||ie.parentVerticalWrapContent){if(t="content",("wrap_content"===c&&(null==Z?void 0:Z.constrained)||"match_parent"===c&&ie.parentVerticalWrapContent)&&(n["height-constrained"]=!0,"vertical"===ie.parentContainerOrientation&&(a=1)),"wrap_content"===c){const t=Z;(null==t?void 0:t.min_size)&&Pt(t.min_size.value)&&(r=dt(t.min_size.value)),(null==t?void 0:t.max_size)&&Pt(t.max_size.value)&&(i=dt(t.max_size.value))}"match_parent"===c&&ve.logError(st(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))}else t="parent","horizontal"===ie.parentContainerOrientation&&ie.parentContainerWrap&&(l=!0,ve.logError(st(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"horizontal"===ie.parentLayoutOrientation?e=`calc(100% - ${pt(((null==Q?void 0:Q.top)||0)+((null==Q?void 0:Q.bottom)||0))})`:"vertical"===ie.parentContainerOrientation&&(o=(null==Z?void 0:Z.weight)||1,ie.parentContainerWrap&&(s=!0));if("parent"===t)n["valign-self"]="stretch";else{const t=X;"top"===t||"center"===t||"bottom"===t||"baseline"===t&&"horizontal"===ie.parentContainerOrientation?n["valign-self"]=Kt[t]:n["valign-self"]=ie.parentVAlign||"start"}t&&(n.height=t),_e=e,we=r,$e=i,ir=o,nr=a,er=Tt(n,er),or=s,ar=l}var Fr,Vr,Dr;if(F=!!ie.overlapParent||void 0,V=ie.overlapParent&&(!Y||"match_parent"===Y.type)&&!ie.parentHorizontalWrapContent&&"match_parent"===(null==Z?void 0:Z.type)&&!ie.parentVerticalWrapContent,D=ie.gridArea?`${ie.gridArea.y+1}/${ie.gridArea.x+1}/span ${ie.gridArea.rowSpan}/span ${ie.gridArea.colSpan}`:void 0,Vr=sr,sr=!Pt(Fr=G)||void 0===Fr||Fr>1?Vr:Number(Fr),xe=1===sr?void 0:sr,he=void 0,q&&!ne&&q.description&&(he={},he["aria-label"]=q.description),ke=$r&&(null==N?void 0:N.background)?N.background:H,Ee={},Ce=!1,Array.isArray(ke)&&(Ce=ke.some((t=>"image"===t.type||"nine_patch_image"===t.type))||Boolean(He),!Ce)){const t=yt(ke);Ee["background-color"]=t.color,Ee["background-image"]=t.image,Ee["background-size"]=t.size,Ee["background-position"]=t.position,Ee["background-repeat"]="no-repeat"}Ae=void 0,cr&&Zt.transition_in&&ve.isRunning("stateChange")&&(Ae=!0),Ve=void 0,cr&&Zt.transition_change&&ve.isRunning("stateChange")&&ge.hasTransitionChange(Zt.id)&&(Ve=!0);{let t=W||U&&[U]||[],e=J||[],r=R||[],i=(null==N?void 0:N.on_focus)||[],n=(null==N?void 0:N.on_blur)||[];ie.fakeElement?(t=[],e=[],r=[],i=[],n=[]):(Array.isArray(t)||(t=[],ve.logError(st(new Error("Actions should be array")))),Array.isArray(e)||(e=[],ve.logError(st(new Error("DoubleTapActions should be array")))),Array.isArray(r)||(r=[],ve.logError(st(new Error("LongTapActions should be array")))),Array.isArray(i)||(i=[],ve.logError(st(new Error("FocusActions should be array")))),Array.isArray(n)||(n=[],ve.logError(st(new Error("BlurActions should be array"))))),(t.length||e.length||r.length)&&ae&&(t=[],e=[],r=[],ve.logError(st(new Error(`Cannot use action on component "${ae}"`)))),dr=t.filter(Ut),pr=e.filter(Ut),vr=r.filter(Ut),gr=i.filter(Ut),fr=n.filter(Ut)}z&&(hr=Bt(z),mr=hr.map((function(t){const e=Nt(t.start_value,1),r=Nt(t.end_value,1),i=Ot(t.start_delay,0),n=Ot(t.duration,300),o=zt(t.interpolator,"ease_in_out").replace(/_/g,"-");switch(t.name){case"fade":return De=e,je=r,`opacity ${n}ms ${o} ${i}ms`;case"scale":return Pe=e,Se=r,`transform ${n}ms ${o} ${i}ms`;case"native":case"no_animation":return"";default:return ve.logError(st(new Error("Unknown action_animation name"),{additional:{animation:t.name}})),""}})).filter(Boolean).join(", "));{const t=br,e=function(t,e){return"visible"===t||"invisible"===t||"gone"===t?t:e}(T,br);t!==e&&(!yr||"visible"!==br&&"visible"!==e?br=e:async function(t){br=t;const e="visible"===t?"in":"out",r="in"===e?Zt.transition_in:Zt.transition_out;ur&&r&&(await $(),"in"===e&&(Fe=!0),ge.runVisibilityTransition(Object.assign(Object.assign({},Zt),{visibility:"visible"}),te,r,fe,e).then((()=>{"in"===e&&(Fe=!1)})).catch((t=>{throw"in"===e&&(Fe=!1),t})))}(e)),yr||(yr=!0)}if(Zt&&fe&&!Mt(Zt.extensions,Me)){let t=Me=Zt.extensions;$().then((()=>{if(t===Me&&fe&&(Er(),Array.isArray(Zt.extensions))){const t=ve.getExtensionContext();Te=Zt.extensions.map((e=>{var r;const i=ve.getExtension(e.id,e.params);return i&&(null===(r=i.mountView)||void 0===r||r.call(i,fe,t)),i})).filter(mt)}}))}if(Zt&&Yt&&te&&xr&&xr.update({json:Zt,origJson:Yt,templateContext:te}),j=Object.assign(Object.assign(Object.assign({},Ze),er),{"parent-overlap":F,"parent-overlap-absolute":V,"scroll-snap":ie.scrollSnap,"hide-on-transition-in":Ae||Fe||Ve,visibility:br,"has-action-animation":Boolean(mr),"parent-flex":ie.parentContainerOrientation||void 0,"parent-grid":Boolean(ie.gridArea)||void 0,"has-custom-focus":Boolean($r&&Zt.focus)}),M&&void 0!==M.rotation){const t=M.pivot_x||{type:"pivot-percentage",value:50};_r=Nt(t.value,_r);const e="pivot-fixed"===t.type?dt(_r):`${_r}%`,r=M.pivot_y||{type:"pivot-percentage",value:50};wr=Nt(r.value,wr),Oe=`${e} ${"pivot-fixed"===r.type?dt(wr):`${wr}%`}`,Ie=`rotate(${M.rotation}deg)`}return P=Ke||or?"100%":Xe||ir?0:void 0,S=Object.assign(Object.assign(Object.assign(Object.assign({},re),Ee),Ne),{width:me,"min-width":ye,"max-width":be,height:_e,"min-height":we,"max-height":$e||(null==re?void 0:re["max-height"]),"grid-area":D,padding:A,margin:Ge,opacity:xe,transition:mr,"transform-origin":Oe,transform:Ie,"flex-grow":Xe||ir||void 0,"flex-shrink":Qe||nr?1:void 0,"flex-basis":P,"--divkit-animation-opacity-start":De,"--divkit-animation-opacity-end":je,"--divkit-animation-scale-start":Pe,"--divkit-animation-scale-end":Se}),I(),it(),nt(),ot(),lt(),vt(),ft(),ht(),bt(),_t(),wt(),$t(),At(),jt(),It(),Lt(),Wt(),qt(),Gt(),tr||ar?"":`${B(Ht,"Actionable").$$render(t,{id:Zt.id,use:function(t){var e;fe=t,cr&&Zt.transition_in&&ge.registerChildWithTransitionIn(Zt,te,Zt.transition_in,t).then((()=>{Ae=!1})).catch((t=>{throw Ae=!1,t})),cr&&Zt.transition_out&&ge.registerChildWithTransitionOut(Zt,te,Zt.transition_out,t),cr&&Zt.transition_change&&ge.registerChildWithTransitionChange(Zt,te,Zt.transition_change,t).then((()=>{Ve=!1})).catch((t=>{throw Ve=!1,t}));const r=ie.fakeElement?[]:Zt.visibility_actions||Zt.visibility_action&&[Zt.visibility_action],i=ie.fakeElement?[]:Zt.disappear_actions;let n;(Array.isArray(r)&&r.length||Array.isArray(i)&&i.length)&&(n=function(t,{visibilityActions:e,disappearActions:r,rootCtx:i}){const n=[];e&&e.forEach((t=>{n.push({type:"visibility",index:n.length,action:t,visible:!1,count:0,finished:!1})})),r&&r.forEach((t=>{n.push({type:"disappear",index:n.length,action:t,visible:!1,count:0,finished:!1})}));const o=n.map(((t,e)=>{const r="visibility"===t.type;return i.getDerivedFromVars({index:e,visibility_percentage:t.action.visibility_percentage,visibility_duration:r?t.action.visibility_duration:t.action.disappear_duration,log_limit:t.action.log_limit,is_enabled:t.action.is_enabled})}));let a;const s=()=>{a&&a.disconnect(),n.forEach((t=>{t.timer&&clearTimeout(t.timer)}))},l=K(o,(t=>t)).subscribe((e=>{const r=e.filter(Ct),o={};r.forEach((t=>{o[t.index]=t})),s();const l=[...new Set(r.map((t=>{const e="visibility"===n[t.index].type;return Et(e,t.visibility_percentage,e?50:0)/100})))];l.length&&(a=new IntersectionObserver((t=>{t.forEach((t=>{r.forEach((e=>{const r=n[e.index],o="visibility"===r.type,a=Et(o,e.visibility_percentage,o?50:0);let s;s=0===a?t.intersectionRatio>=1e-12:t.intersectionRatio>=a/100;const l=o?!r.visible&&s:r.visible&&!s,c=o?!s:s;l?r.finished||(r.timer=setTimeout((()=>{++r.count;const t=0===e.log_limit?1/0:e.log_limit||1;++r.count>=t&&(r.finished=!0);const n=i.getJsonWithVars(r.action),a=n.url,s=n.typed;if(a){const t=xt(a);t&&!kt(t,i.getBuiltinProtocols())&&("div-action"===t?i.execAction(n):n.log_id&&i.execCustomAction(n))}else s&&i.execAction(n);i.logStat(o?"visible":"disappear",n)}),e.visibility_duration||800)):c&&r.timer&&clearTimeout(r.timer),r.visible=s}))}))}),{threshold:l}),a.observe(t))}));return{destroy(){s(),l()}}}(t,{visibilityActions:r,disappearActions:i,rootCtx:ve}));const o=Zt.id;return o&&ge.registerChild(o),null===(e=Zt.tooltips)||void 0===e||e.forEach((e=>{ve.registerTooltip(t,e)})),{destroy(){o&&ge.unregisterChild(o),n&&n.destroy(),xr&&xr.destroy()}}},cls:ee+" "+Ft("outer",ct,j),style:ut(S),actions:dr,doubleTapActions:pr,longTapActions:vr,attrs:he,hasInnerFocusable:pe,isNativeActionAnimation:!hr.length||(Dr=hr,Dr.some((t=>"native"===t.name)))},{},{default:()=>` ${Ce?`${B(Xt,"OuterBackground").$$render(t,{background:ke,radius:He},{},{})}`:""}${i.default?i.default({focusHandler:Cr,blurHandler:Ar,hasCustomFocus:$r}):""}${Re?`<span${L("class",ct.outer__border,0)}${L("style",ut(Be),0)}></span>`:""}`})}`})),ee=te,re={"text-range":"divkit-faf07","text-range_singleline":"divkit-ccb64","text-range__top-offset":"divkit-d9237","text-range_decoration_both":"divkit-d7e07","text-range_decoration_underline":"divkit-f3dde","text-range_decoration_strike":"divkit-d27b7","text-range_decoration_none":"divkit-c6b0f"};function ie(t,e){const r=Number(t);return isNaN(r)||r<=0?e:r}function ne(t){if("light"===t||"medium"===t||"bold"===t||"regular"===t)return"medium"===t?500:"bold"===t?700:"light"===t?300:400}function oe(t,e){return ne(t)||e}const ae=U(((t,e,r,i)=>{let n,o,a,s,l,c;var u,d;let{json:p}=e,{text:v}=e,{rootFontSize:g}=e,{textStyles:h={}}=e,{singleline:m=!1}=e,{actions:y}=e;const b=f(at);let _,w="none",$=12,x=1.25,k="",E="",C="",A=null;void 0===e.json&&r.json&&void 0!==p&&r.json(p),void 0===e.text&&r.text&&void 0!==v&&r.text(v),void 0===e.rootFontSize&&r.rootFontSize&&void 0!==g&&r.rootFontSize(g),void 0===e.textStyles&&r.textStyles&&void 0!==h&&r.textStyles(h),void 0===e.singleline&&r.singleline&&void 0!==m&&r.singleline(m),void 0===e.actions&&r.actions&&void 0!==y&&r.actions(y),p&&(w="none",$=12,x=1.25,k="",_=void 0,E="",C="",A=null);{let t="none";(h.underline||h.strike)&&("single"===h.underline&&"single"===h.strike?t="both":"single"===h.underline?t="underline":"single"===h.strike&&(t="strike")),w=t}return $=ie(h.font_size,$),Gt(h.line_height)&&(x=Number(h.line_height)/$),Pt(h.letter_spacing)&&(k=dt(h.letter_spacing)),_=oe(h.font_weight,_),E="string"==typeof h.font_family&&h.font_family?b.typefaceProvider(h.font_family,{fontWeight:_||400}):"",C=gt(h.text_color,1,C),n=h.top_offset?dt(h.top_offset):"",o=h.background?yt([h.background]):null,A=(null===(u=h.border)||void 0===u?void 0:u.stroke)&&h.border.stroke.color&&"transparent"!==gt(h.border.stroke.color)&&Gt(h.border.stroke.width)?{color:h.border.stroke.color,width:h.border.stroke.width}:null,a=ie(null===(d=h.border)||void 0===d?void 0:d.corner_radius,0),s=h.text_shadow?function(t,e){var r,i,n,o,a,s;return"drop-shadow("+gt(t.color||"#000000",null!==(r=t.alpha)&&void 0!==r?r:.19)+" "+dt(10*((null===(i=t.offset)||void 0===i||null===(n=i.x)||void 0===n?void 0:n.value)||0)/e)+" "+dt(10*((null===(o=t.offset)||void 0===o||null===(a=o.y)||void 0===a?void 0:a.value)||0)/e)+" "+dt(10*(null!==(s=t.blur)&&void 0!==s?s:2)/e)+")"}(h.text_shadow,$):void 0,l={singleline:m,decoration:w},c={"font-size":dt(10*$/g),"line-height":x,"letter-spacing":k,"font-weight":_,"font-family":E,filter:s,color:C,background:(null==o?void 0:o.color)||void 0,"box-shadow":A?`inset 0 0 0 ${dt(A.width)} ${A.color}`:void 0,"border-radius":a?dt(a):void 0},`${n?`<span${L("class",re["text-range__top-offset"],0)}${H({"margin-top":n})}></span>`:""}${B(Ht,"Actionable").$$render(t,{cls:Ft("text-range",re,l),actions:y,style:ut(c)},{},{default:()=>`${I(v)}`})}`})),se=ae;function le(t,e){return"left"===t||"center"===t||"right"===t?t:e}function ce(t,e){return"top"===t||"center"===t||"bottom"===t||"baseline"===t?t:e}function ue(t,e){return 1===t||0===t||!1===t||!0===t?Boolean(t):e}function de(t,e){return"source_in"===t||"source_atop"===t||"darken"===t||"lighten"===t||"multiply"===t||"screen"===t?t:e}const pe=U(((t,e,r,i)=>{let n,a,s,c,u,d,p,g,h,m,y,b,_,w,$,x,k,E,C,A,F,V,D,j,P,S,O,I,M,T,N,R,J,U,W,H,q,G=o,Z=o,Y=o,X=o,Q=o,K=o,tt=o,et=o,it=o,nt=o,ot=o,st=o,ct=o,pt=o,vt=o,{json:ft={}}=e,{templateContext:ht}=e,{origJson:mt}=e,{layoutParams:bt}=e;const _t=f(at);let wt="",$t=12,xt=1.25,kt=!1,Et="",Ct="",At=!1,Vt="left",Dt="top",jt="",Pt="",St="",Ot=!1,It=[],Mt=[];var Tt;v((()=>{Mt.forEach((([t,e])=>{_t.removeSvgFilter(t,e)}))})),void 0===e.json&&r.json&&void 0!==ft&&r.json(ft),void 0===e.templateContext&&r.templateContext&&void 0!==ht&&r.templateContext(ht),void 0===e.origJson&&r.origJson&&void 0!==mt&&r.origJson(mt),void 0===e.layoutParams&&r.layoutParams&&void 0!==bt&&r.layoutParams(bt),ft&&($t=12,xt=1.25,kt=!1,Et="",Ct="",At=!1,Vt="left",Dt="top",jt="",St="",Ot=!1),n=_t.getDerivedFromVars(ft.text),vt(),vt=l(n,(t=>q=t)),a=_t.getDerivedFromVars(ft.ranges),Z(),Z=l(a,(t=>j=t)),s=_t.getDerivedFromVars(ft.images),G(),G=l(s,(t=>D=t)),c=_t.getDerivedFromVars({font_size:ft.font_size,letter_spacing:ft.letter_spacing,font_weight:ft.font_weight,font_family:ft.font_family,text_color:ft.text_color,underline:ft.underline,strike:ft.strike,line_height:ft.line_height,text_shadow:ft.text_shadow}),Y(),Y=l(c,(t=>P=t)),u=_t.getDerivedFromVars(ft.font_size),pt(),pt=l(u,(t=>H=t)),d=_t.getDerivedFromVars(ft.line_height),ct(),ct=l(d,(t=>W=t)),p=_t.getDerivedFromVars(ft.max_lines),it(),it=l(p,(t=>N=t)),g=_t.getDerivedFromVars(ft.text_alignment_horizontal),ot(),ot=l(g,(t=>J=t)),h=_t.getDerivedFromVars(ft.text_alignment_vertical),nt(),nt=l(h,(t=>R=t)),m=_t.getDerivedFromVars(ft.text_color),et(),et=l(m,(t=>T=t)),y=_t.getDerivedFromVars(ft.focused_text_color),tt(),tt=l(y,(t=>M=t)),b=_t.getDerivedFromVars(ft.truncate),K(),K=l(b,(t=>I=t)),_=_t.getDerivedFromVars(ft.text_gradient),Q(),Q=l(_,(t=>O=t)),w=_t.getDerivedFromVars(ft.selectable),X(),X=l(w,(t=>S=t)),$=_t.getDerivedFromVars(ft.auto_ellipsize),st(),st=l($,(t=>U=t)),Tt=q,wt=String(null!=Tt?Tt:""),$t=ie(H,$t);{const t=W;Gt(t)?(xt=Number(t)/$t,kt=!0):kt=!1}x=1===N;{let t="",e="",r=!1;if(N&&N>1){let i=Number(N);t=i*xt+"em",e=i,r=!0}else U&&1!==N&&(r=!0);Et=t,Ct=e,At=r}Vt=le(J,Vt),Dt=ce(R,Dt),k=!j||wt&&1===j.length&&j[0]&&0===j[0].start&&"number"==typeof j[0].end&&j[0].end>=wt.length,E=Boolean(T)!==Boolean(j&&j[0]&&j[0].text_color);{let t="";N&&k&&E&&(t=gt(T||j&&j[0]&&j[0].text_color,1,jt)),jt=t}Pt=gt(M,1,Pt),C="none"===I?"none":"";{let t="";if(O){const e=yt([O]);e.image&&(t=e.image)}St=t}return Ot=ue(S,Ot),function(t,e,r){let i=[];if(Mt.forEach((([t,e])=>{_t.removeSvgFilter(t,e)})),Mt=[],!(Array.isArray(e)&&e.length||Array.isArray(r)&&r.length&&t))return void(It=[]);const n=t;let o=e||[{start:0,end:n.length}],a=r||[],s=0,l=[],c=[];o.forEach((t=>{void 0!==t.start&&void 0!==t.end&&(c.push({index:t.start,range:t,type:"rangeStart",isStart:!0}),c.push({index:t.end,range:t,type:"rangeEnd"}))})),a.forEach(((t,e)=>{void 0!==t.start&&t.url&&t.start<=n.length&&c.push({index:t.start,image:t,type:"image",arrayIndex:e})})),c.sort(((t,e)=>t.index===e.index?t.type!==e.type?"image"===t.type?-1:"image"===e.type?1:t.type<e.type?-1:1:"image"===t.type&&"image"===e.type?e.arrayIndex-t.arrayIndex:"rangeStart"===t.type&&"rangeStart"===e.type?t.range.end-e.range.end:"rangeStart"===t.type?1:"rangeStart"===e.type?-1:"image"!==t.type&&"image"!==e.type?t.range.start-e.range.start:0:t.index-e.index)),c.forEach((t=>{var e,r;let o="image"===t.type?null:t.range,a=t.index;if(a>s){let o=Object.assign(Object.assign({},P),...l);i.push({text:n.substring(s,a),textStyles:o,actions:"rangeEnd"===t.type&&(null===(r=null===(e=t.range)||void 0===e?void 0:e.actions)||void 0===r?void 0:r.filter(Ut))||void 0})}if("rangeStart"===t.type&&o)l.push(o);else if("rangeEnd"===t.type)l=l.filter((e=>e!==t.range));else if("image"===t.type){let e=Object.assign(Object.assign({},P),...l),r=dt(10*(t.image.width&&t.image.width.value||20)/(e.font_size||12)),n=dt(10*(t.image.height&&t.image.height.value||20)/(e.font_size||12));const o={"font-size":dt(10*(Number(e.font_size)||12)/$t)};let a="";const s=t.image.tint_color,c=de(t.image.tint_mode,"source_in");if(s){const e=gt(t.image.tint_color);a=_t.addSvgFilter(e,c),Mt.push([e,c])}i.push({image:{url:t.image.url,width:r,height:n,wrapperStyle:o,svgFilterId:a}})}s=a})),s<n.length&&i.push({text:n.substring(s),textStyles:Object.assign({},P)}),It=i}(wt,j,D),A={singleline:x,multiline:At,halign:Vt,valign:Dt,truncate:C,"has-focus-color":Boolean(Pt)},F={gradient:Boolean(St)},V={"font-size":dt($t),"line-height":xt,"max-height":Et,"-webkit-line-clamp":Ct,color:jt,"background-image":St,"--divkit-text-focus-color":Pt},G(),Z(),Y(),X(),Q(),K(),tt(),et(),it(),nt(),ot(),st(),ct(),pt(),vt(),`${B(ee,"Outer").$$render(t,{cls:Ft("text",lt,A)+" "+(Ot?"":rt),json:ft,origJson:mt,templateContext:ht,layoutParams:bt},{},{default:()=>`<span${L("class",Ft("text__inner",lt,F),0)}${L("style",ut(V),0)}>${It.length?`${z(It,(e=>"text"in e?e.text?`${B(se,"TextRangeView").$$render(t,{json:ft,text:e.text,rootFontSize:$t,textStyles:e.textStyles,singleline:x,actions:e.actions},{},{})}`:"":e.image?`<span${L("style",ut(e.image.wrapperStyle),0)}><img${L("class",lt.text__image,0)}${L("src",e.image.url,0)} loading="lazy" decoding="async" aria-hidden="true" alt=""${L("style",ut({width:e.image.width,height:e.image.height,"margin-top":kt?`-${e.image.height}`:void 0,"margin-bottom":kt?`-${e.image.height}`:void 0,filter:e.image.svgFilterId?`url(#${e.image.svgFilterId})`:void 0}),0)}></span>`:""))}`:`${B(se,"TextRangeView").$$render(t,{json:ft,text:wt,rootFontSize:$t,textStyles:P,singleline:x},{},{})}`}</span>`})}`})),ve=pe,ge={container:"divkit-d37d6",container_wrap:"divkit-c8551",container_overflow_visible:"divkit-f315a",container_orientation_vertical:"divkit-ddc33",container_valign_top:"divkit-a331a",container_valign_center:"divkit-aae61",container_valign_bottom:"divkit-c2226","container_valign_space-between":"divkit-ce053","container_valign_space-around":"divkit-cf29b","container_valign_space-evenly":"divkit-b4b04",container_halign_left:"divkit-a3091",container_halign_center:"divkit-bac9d",container_halign_right:"divkit-f4230","container_halign_space-between":"divkit-e5c38","container_halign_space-around":"divkit-feff2","container_halign_space-evenly":"divkit-e5e05",container_orientation_horizontal:"divkit-fe458",container_orientation_overlap:"divkit-a644d"};function fe(t){return{top:Number(null==t?void 0:t.top)||0,right:Number(null==t?void 0:t.right)||0,bottom:Number(null==t?void 0:t.bottom)||0,left:Number(null==t?void 0:t.left)||0}}function he(t,e,r){const i=((null==e?void 0:e.margins.left)||0)+((null==e?void 0:e.margins.right)||0),n=((null==e?void 0:e.margins.top)||0)+((null==e?void 0:e.margins.bottom)||0);null!=e&&e.show_at_start&&(r?t.top=e.style.height+n:t.left=e.style.width+i),null!=e&&e.show_at_end&&(r?t.bottom=e.style.height+n:t.right=e.style.width+i)}function me(t,e,r){let i;const n=((null==e?void 0:e.margins.left)||0)+((null==e?void 0:e.margins.right)||0),o=((null==e?void 0:e.margins.top)||0)+((null==e?void 0:e.margins.bottom)||0),a=((null==r?void 0:r.margins.left)||0)+((null==r?void 0:r.margins.right)||0),s=((null==r?void 0:r.margins.top)||0)+((null==r?void 0:r.margins.bottom)||0);return i="horizontal"===t?[null!=r&&r.show_between?r.style.height+s:0,null!=e&&e.show_between?e.style.width+n:0]:[null!=e&&e.show_between?e.style.height+o:0,null!=r&&r.show_between?r.style.width+a:0],i.map(dt).join(" ")}function ye(t){var e;const r=null===(e=t.width)||void 0===e?void 0:e.type;return"wrap_content"===r||"fixed"===r}function be(t){var e;return"match_parent"!==(null===(e=t.height)||void 0===e?void 0:e.type)}function _e(t,e,r){if(!(t&&t.shape&&t.shape.type&&e.includes(t.shape.type)&&"shape_drawable"===t.type))return r;let i;if("rounded_rectangle"===t.shape.type)i={width:Ot(null===(o=(n=t.shape).item_width)||void 0===o?void 0:o.value,10),height:Ot(null===(a=n.item_height)||void 0===a?void 0:a.value,10),radius:Ot(null===(s=n.corner_radius)||void 0===s?void 0:s.value,5)};else{if("circle"!==t.shape.type)return r;i=function(t){var e;const r=2*Ot(null===(e=t.radius)||void 0===e?void 0:e.value,10);return{width:r,height:r,radius:r}}(t.shape)}var n,o,a,s;return function(t,e,r){var i;const n={},o=e.stroke||(null==r?void 0:r.stroke),a=null!=o&&o.color?gt(o.color):"",s=null!=o&&o.width?Number(null!==(i=o.width)&&void 0!==i?i:1):"";n.width=t.width,n.height=t.height,n.borderRadius=t.radius;const l=e.background_color||(null==r?void 0:r.color);return n.background=gt(l),a&&s&&(n.boxShadow=`inset 0 0 0 ${dt(s)} ${a}`),n}(i,t.shape,{color:t.color,stroke:t.stroke})}let we;function $e(){if("undefined"==typeof document&&(we=!0),void 0!==we)return we;const t=document.createElement("div");return t.style.position="absolute",t.style.display="flex",t.style.flexDirection="column",t.style.gap="1px",t.appendChild(document.createElement("div")),t.appendChild(document.createElement("div")),document.body.appendChild(t),we=1===t.scrollHeight,document.body.removeChild(t),we}const xe="divkit-a7719",ke="divkit-f6e9a";function Ee(t,e,r,i,n,o){const a=e.margins.left,s=e.margins.right,l=e.margins.top,c=e.margins.bottom;o?t.push({top:r.bottom+l,left:n.left+a,width:Math.max(0,n.right-n.left-a-s),height:i.top-r.bottom-l-c,style:e.style}):t.push({top:n.top+l,left:r.right+a,width:i.left-r.right-a-s,height:Math.max(0,n.bottom-n.top-l-c),style:e.style})}function Ce(t,e,r,i,n,o){const a={top:Math.min(...r.map((t=>t.top))),right:Math.max(...r.map((t=>t.right))),bottom:Math.max(...r.map((t=>t.bottom))),left:Math.min(...r.map((t=>t.left)))};if(null==e?void 0:e.show_at_start){let s,l;"space-around"===n||"space-evenly"===n?(s=o.left-e.style.width,l=o.top-e.style.height):(s=r[0].left-e.style.width-e.margins.left-e.margins.right,l=r[0].top-e.style.height-e.margins.top-e.margins.bottom),Ee(t,e,{top:0,right:s,bottom:l,left:0},r[0],a,i)}if(null==e?void 0:e.show_between)for(let n=0;n<r.length-1;++n)Ee(t,e,r[n],r[n+1],a,i);if(null==e?void 0:e.show_at_end){const s=r[r.length-1];let l,c;"space-around"===n||"space-evenly"===n?(l=o.bottom+e.style.height,c=o.right+e.style.width):(l=s.bottom+e.style.height+e.margins.top+e.margins.bottom,c=s.right+e.style.width+e.margins.left+e.margins.right),Ee(t,e,s,{top:l,right:0,bottom:0,left:c},a,i)}}const Ae=U(((t,e,r,i)=>{let n,{orientation:o}=e,{separator:a}=e,{lineSeparator:s}=e,{contentHAlign:l}=e,{contentVAlign:c}=e;const u=function(t,e){let r,i=0,n=!1;return function(){const e=Date.now();return!i||Math.abs(e-i)>10?(i=e,r=t.apply(this,arguments)):(n||(n=!0,setTimeout((()=>{n=!1,r=t.apply(this,arguments)}),10)),r)}}((function(){if(!n)return;const t=n.getBoundingClientRect(),e=window.getComputedStyle(n),r={top:t.top+parseFloat(e.paddingTop),right:t.right-parseFloat(e.paddingRight),bottom:t.bottom-parseFloat(e.paddingBottom),left:t.left+parseFloat(e.paddingLeft)};p=[];let i=[...n.children].filter((t=>t!==d&&!t.classList.contains(ct.outer__border))),u=[];for(;i.length;){const t=[],e=i.shift();t.push(e);let r=e.getBoundingClientRect(),n=r.right,a=r.bottom;for(;i.length;){let e=i[0],r=e.getBoundingClientRect();if("vertical"===o){if(r.top<a)break}else if(r.left<n)break;n=Math.max(n,r.right),a=Math.max(a,r.bottom),t.push(e),i.shift()}u.push(t)}const v=[];u.forEach((t=>{const e=t.map((t=>function(t){const e=t.getBoundingClientRect(),r=getComputedStyle(t);return{top:e.top-parseFloat(r.marginTop),right:e.right+parseFloat(r.marginRight),bottom:e.bottom+parseFloat(r.marginBottom),left:e.left-parseFloat(r.marginLeft)}}(t)));a&&Ce(p,a,e,"vertical"===o,"vertical"===o?c:l,r);const i={top:Math.min(...e.map((t=>t.top))),right:Math.max(...e.map((t=>t.right))),bottom:Math.max(...e.map((t=>t.bottom))),left:Math.min(...e.map((t=>t.left)))};v.push(i)})),s&&Ce(p,s,v,"horizontal"===o,"vertical"===o?l:c,r),p.forEach((e=>{e.top-=t.top,e.left-=t.left}))}));let d,p=[],g=!1,f=null,h=null;return v((()=>{g=!1})),void 0===e.orientation&&r.orientation&&void 0!==o&&r.orientation(o),void 0===e.separator&&r.separator&&void 0!==a&&r.separator(a),void 0===e.lineSeparator&&r.lineSeparator&&void 0!==s&&r.lineSeparator(s),void 0===e.contentHAlign&&r.contentHAlign&&void 0!==l&&r.contentHAlign(l),void 0===e.contentVAlign&&r.contentVAlign&&void 0!==c&&r.contentVAlign(c),n=null,(g&&n||f||h)&&(f&&(f.disconnect(),f=null),h&&(h.disconnect(),h=null),g&&n&&("undefined"!=typeof MutationObserver&&(f=new MutationObserver((function(t){t.some((t=>{var e;const r=null===(e=t.target)||void 0===e?void 0:e.classList;return!(null==r?void 0:r.contains(ke))&&!(null==r?void 0:r.contains(xe))}))&&u()})),f.observe(n,{childList:!0,attributes:!0,characterData:!0,subtree:!0})),"undefined"!=typeof ResizeObserver&&(h=new ResizeObserver(u),h.observe(n)))),g&&n&&u(),` <div${L("class",xe,0)}${L("this",d,0)}>${z(p,(t=>`<div${L("class","divkit-c770e",0)}${H({left:`${t.left}px`,top:`${t.top}px`,width:`${t.width}px`,height:`${t.height}px`})}><div${L("class",ke,0)}${H({width:`${t.style.width}px`,height:`${t.style.height}px`,"border-radius":`${t.style.borderRadius}px`,background:t.style.background,"box-shadow":t.style.boxShadow})}></div> </div>`))}</div>`})),Fe={left:"start",center:"center",right:"end","space-between":"start","space-around":"start","space-evenly":"start"},Ve={top:"start",center:"center",bottom:"end",baseline:"baseline","space-between":"start","space-around":"start","space-evenly":"start"},De=["rounded_rectangle","circle"],je=U(((t,e,r,i)=>{let n,a,s,c,u,d,p,v,g,h,m,y,b,_,w,$,x,k,E,C,A,F,V,D,j,P,S,O,I,M=o,T=o,N=o,R=o,J=o,U=o,L=o,W=o,H=o,q=o,G=o;var Z,Y,X,Q,tt,et;let{json:rt={}}=e,{templateContext:it}=e,{origJson:nt}=e,{layoutParams:ot}=e;const st=f(at);let lt,ct,ut="vertical",dt="top",pt="left",vt=null,gt=null,ft={};void 0===e.json&&r.json&&void 0!==rt&&r.json(rt),void 0===e.templateContext&&r.templateContext&&void 0!==it&&r.templateContext(it),void 0===e.origJson&&r.origJson&&void 0!==nt&&r.origJson(nt),void 0===e.layoutParams&&r.layoutParams&&void 0!==ot&&r.layoutParams(ot),rt&&(ut="vertical",dt="top",pt="left",ct=void 0),n=rt.items,a=st.getDerivedFromVars(rt.orientation),G(),G=l(a,(t=>I=t)),s=st.getDerivedFromVars(rt.layout_mode),q(),q=l(s,(t=>O=t)),c=st.getDerivedFromVars(rt.content_alignment_vertical),W(),W=l(c,(t=>P=t)),u=st.getDerivedFromVars(rt.content_alignment_horizontal),L(),L=l(u,(t=>j=t)),d=st.getDerivedFromVars(rt.separator),U(),U=l(d,(t=>D=t)),p=st.getDerivedFromVars(rt.line_separator),J(),J=l(p,(t=>V=t)),v=st.getDerivedFromVars(rt.aspect),R(),R=l(v,(t=>F=t)),g=st.getDerivedFromVars(rt.width),T(),T=l(g,(t=>C=t)),h=st.getDerivedFromVars(rt.height),N(),N=l(h,(t=>A=t)),m=st.getDerivedFromVars(rt.clip_to_bounds),M(),M=l(m,(t=>E=t)),y=(n||[]).map((t=>{let e=t,r=it;return({templateContext:r,json:e}=st.processTemplate(e,r)),{json:e,templateContext:r,origJson:t}}));{let t=[];y.forEach((e=>{t.push(st.getDerivedFromVars({width:e.json.width,height:e.json.height}))})),lt=K(t,(t=>[...t])),H(),H=l(lt,(t=>S=t))}if(ut=function(t,e){return"vertical"===t||"horizontal"===t||"overlap"===t?t:e}(I,ut),b="wrap"===O,_="horizontal"!==ut&&!b&&S.some(ye),w="vertical"!==ut&&!b&&S.some(be),dt=function(t,e){return"top"===t||"center"===t||"bottom"===t||"baseline"===t||"space-between"===t||"space-around"===t||"space-evenly"===t?t:e}(P,dt),pt=function(t,e){return"left"===t||"center"===t||"right"===t||"space-between"===t||"space-around"===t||"space-evenly"===t?t:e}(j,pt),(null==D?void 0:D.style)&&"overlap"!==ut&&$e()){const t=_e(D.style,De,(null==vt?void 0:vt.style)||null);vt=t?{show_at_start:Boolean(null!==(Z=D.show_at_start)&&void 0!==Z&&Z),show_at_end:Boolean(null!==(Y=D.show_at_end)&&void 0!==Y&&Y),show_between:Boolean(null===(X=D.show_between)||void 0===X||X),style:t,margins:fe(D.margins)}:null}else vt=null;if((null==V?void 0:V.style)&&"overlap"!==ut&&$e()){const t=_e(V.style,De,(null==gt?void 0:gt.style)||null);gt=t?{show_at_start:Boolean(null!==(Q=V.show_at_start)&&void 0!==Q&&Q),show_at_end:Boolean(null!==(tt=V.show_at_end)&&void 0!==tt&&tt),show_between:Boolean(null===(et=V.show_between)||void 0===et||et),style:t,margins:fe(V.margins)}:null}else gt=null;$=vt||gt?function(t,e,r){const i={};return he(i,e,"vertical"===t),he(i,r,"horizontal"===t),i}(ut,vt,gt):null;{const t=null==F?void 0:F.ratio;ct=t&&Gt(t)?t:void 0}{let t={};(null==ot?void 0:ot.fakeElement)&&(t.fakeElement=!0),"overlap"===ut&&(t.overlapParent=!0),"horizontal"!==ut&&(t.parentHAlign=b?"start":Fe[pt]),"vertical"!==ut&&(t.parentVAlign=b?"start":Ve[dt]),ct||w||A&&"wrap_content"!==A.type&&("match_parent"!==A.type||!(null==ot?void 0:ot.parentVerticalWrapContent))||(t.parentVerticalWrapContent=!0),!_&&("wrap_content"===(null==C?void 0:C.type)||"match_parent"===(null==C?void 0:C.type)&&(null==ot?void 0:ot.parentHorizontalWrapContent))&&(t.parentHorizontalWrapContent=!0),"horizontal"===ut&&(t.parentContainerOrientation="horizontal"),"vertical"===ut&&(t.parentContainerOrientation="vertical"),b&&(t.parentContainerWrap=!0),ft=Tt(t,ft)}return x={orientation:ut,valign:dt,halign:pt,wrap:b,overflow:!1===E||0===E?"visible":void 0},k={gap:vt||gt?me(ut,vt,gt):void 0,"aspect-ratio":ct},M(),T(),N(),R(),J(),U(),L(),W(),H(),q(),G(),`${B(ee,"Outer").$$render(t,{cls:Ft("container",ge,x),style:k,json:rt,origJson:nt,templateContext:it,layoutParams:ot,additionalPaddings:$,heightByAspect:Boolean(ct),parentOf:n,replaceItems:function(t){rt=Object.assign(Object.assign({},rt),{items:t.filter(mt)})}},{},{default:()=>`${z(y,(e=>`${B(si,"Unknown").$$render(t,{layoutParams:ft,div:e.json,templateContext:e.templateContext,origJson:e.origJson},{},{})}`))} ${vt||gt?`${B(Ae,"ContainerSeparators").$$render(t,{separator:vt,lineSeparator:gt,orientation:ut,contentHAlign:pt,contentVAlign:dt},{},{})}`:""}`})}`})),Pe=je,Se={separator:"divkit-a30bb",separator_orientation_horizontal:"divkit-f529e",separator_orientation_vertical:"divkit-e9e27",separator__inner:"divkit-db7d8"};function Oe(t,e){return"vertical"===t||"horizontal"===t?t:e}const Ie=U(((t,e,r,i)=>{let n,a,s,c,u,d,p,v=o,{json:g={}}=e,{templateContext:h}=e,{origJson:m}=e,{layoutParams:y}=e;const b=f(at);let _="horizontal",w="rgba(0,0,0,0.08)";return void 0===e.json&&r.json&&void 0!==g&&r.json(g),void 0===e.templateContext&&r.templateContext&&void 0!==h&&r.templateContext(h),void 0===e.origJson&&r.origJson&&void 0!==m&&r.origJson(m),void 0===e.layoutParams&&r.layoutParams&&void 0!==y&&r.layoutParams(y),g&&(_="horizontal",w="rgba(0,0,0,0.08)"),n=b.getDerivedFromVars(g.delimiter_style),v(),v=l(n,(t=>p=t)),_=Oe(null==p?void 0:p.orientation,_),a=!((null==p?void 0:p.color)&&("transparent"===p.color||9===p.color.length&&0===p.color.indexOf("#00"))),w=gt(null==p?void 0:p.color,1,w),s="horizontal"===_?"100%":dt(1),c="horizontal"===_?dt(1):"100%",u={background:w,width:s,height:c},d={orientation:_},v(),`${B(ee,"Outer").$$render(t,{cls:Ft("separator",Se,d),json:g,origJson:m,templateContext:h,layoutParams:y},{},{default:()=>a?`<span${L("class",Se.separator__inner,0)}${L("style",ut(u),0)}></span>`:""})}`})),Me={image:"divkit-a448f","image_is-width-content":"divkit-fe14a","image_is-height-content":"divkit-f4d92",image__image:"divkit-ce046",image_error:"divkit-f10d9","image__aspect-wrapper":"divkit-dc808",image_aspect:"divkit-ae784",image_loaded:"divkit-cf4e0","divkit-image-appearance":"divkit-e555f","image_before-appearance":"divkit-ffe8a"};function Te(t){return t.startsWith("data:")?ht(t):`data:image/jpg;base64,${ht(t)}`}const ze="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Ne=U(((t,e,r,i)=>{let n,a,s,c,u,d,p,g,h,m,y,b,_,w,$,x,k,E,C,A,F,V,D,j,P,S,O,I,M,T,z,N,R,J=o,U=o,W=o,q=o,G=o,Z=o,Y=o,X=o,Q=o,K=o,tt=o,et=o,rt=o,it=o,{json:nt={}}=e,{templateContext:ot}=e,{origJson:lt}=e,{layoutParams:ct}=e;const dt=f(at);let pt,vt,ft,ht=0,mt=!1,yt="rgba(0,0,0,0.08)",bt=!1,_t="",xt="none",kt="50% 50%",Et="0",Ct="source_in",At="",Vt="",Dt=0,jt=0,Pt=0,St="",It="";v((()=>{dt.removeSvgFilter(ft,Ct)})),void 0===e.json&&r.json&&void 0!==nt&&r.json(nt),void 0===e.templateContext&&r.templateContext&&void 0!==ot&&r.templateContext(ot),void 0===e.origJson&&r.origJson&&void 0!==lt&&r.origJson(lt),void 0===e.layoutParams&&r.layoutParams&&void 0!==ct&&r.layoutParams(ct),nt&&(xt="none",kt="50% 50%",Ct="source_in"),n=dt.getDerivedFromVars(nt.image_url),rt(),rt=l(n,(t=>N=t)),a=dt.getDerivedFromVars(nt.gif_url),it(),it=l(a,(t=>R=t)),s=dt.getDerivedFromVars(nt.width),et(),et=l(s,(t=>z=t)),c=dt.getDerivedFromVars(nt.height),tt(),tt=l(c,(t=>T=t)),u=dt.getDerivedFromVars(nt.preview),K(),K=l(u,(t=>M=t)),d=dt.getDerivedFromVars(nt.placeholder_color),Q(),Q=l(d,(t=>I=t)),p=dt.getDerivedFromVars(nt.scale),X(),X=l(p,(t=>O=t)),g=dt.getDerivedFromVars({content_alignment_horizontal:nt.content_alignment_horizontal,content_alignment_vertical:nt.content_alignment_vertical}),Y(),Y=l(g,(t=>S=t)),h=dt.getDerivedFromVars(nt.accessibility),Z(),Z=l(h,(t=>P=t)),m=dt.getDerivedFromVars(nt.aspect),G(),G=l(m,(t=>j=t)),y=dt.getDerivedFromVars(nt.tint_color),q(),q=l(y,(t=>D=t)),b=dt.getDerivedFromVars(nt.tint_mode),W(),W=l(b,(t=>V=t)),_=dt.getDerivedFromVars(nt.appearance_animation),U(),U=l(_,(t=>F=t)),w=dt.getDerivedFromVars(nt.filters),J(),J=l(w,(t=>A=t));{let t="gif"===nt.type?R:N;mt="empty://"===t,mt&&(t=ze),vt=t}ht=0,vt?bt=!1:(bt=!0,dt.logError(st(new Error(`Missing "${"gif"===nt.type?"gif_url":"image_url"}" for "${nt.type}"`)))),$="wrap_content"===(null==z?void 0:z.type),x="wrap_content"===(null==T?void 0:T.type),_t=M?`url("${Te(M)}")`:"",yt=gt(I,1,yt),xt=wt(O)||xt,kt=function(t,e){const r=t.content_alignment_horizontal,i=t.content_alignment_vertical;return r&&"left"!==r&&"center"!==r&&"right"!==r||i&&"top"!==i&&"center"!==i&&"bottom"!==i?e:$t(t)}(S,kt),k=(null==P?void 0:P.description)||"";{const t=null==j?void 0:j.ratio;Et=t&&Gt(t)?(100/Number(t)).toFixed(2):"0"}{const t=D?gt(D):void 0,e=de(V,Ct);t===ft&&e===Ct||(dt.removeSvgFilter(ft,Ct),At=t?dt.addSvgFilter(t,e):"",ft=t,Ct=e)}if(F&&"fade"===F.type){const t=F;Vt=zt(t.interpolator,"ease_in_out").replace(/_/g,"-"),Pt=Ot(t.duration,300),jt=Ot(t.start_delay,0),Dt=Ot(t.alpha,0)}{let t="",e="";Array.isArray(A)&&A.length&&(t=Zt(A,dt.logError)),t&&(e="polygon(0% 0%, 0% 100%, 100% 100%, 100% 0%)"),St=t,It=e}return E={aspect:"0"!==Et,"is-width-content":$,"is-height-content":x,loaded:!1,"before-appearance":Boolean(Vt)&&!0},C={"background-image":_t,"background-color":_t?void 0:yt,"background-size":xt,"clip-path":It||void 0,"object-fit":xt,"object-position":kt,filter:["",St].filter(Boolean).join(" "),"--divkit-appearance-interpolator":Vt||void 0,"--divkit-appearance-fade-start":Vt?Dt:void 0,"--divkit-appearance-delay":Vt?`${jt}ms`:void 0,"--divkit-appearance-duration":Vt?`${Pt}ms`:void 0},J(),U(),W(),q(),G(),Z(),Y(),X(),Q(),K(),tt(),et(),rt(),it(),bt?"":`${B(ee,"Outer").$$render(t,{cls:Ft("image",Me,E),json:nt,origJson:lt,templateContext:ot,layoutParams:ct,customDescription:!0},{},{default:()=>E.aspect?`<span${L("class",Me["image__aspect-wrapper"],0)}${H({"padding-bottom":`${Et}%`})}><img${L("class",Me.image__image,0)}${L("src",vt,0)} loading="lazy" decoding="async"${L("style",ut(C),0)}${L("alt",k,0)}${L("aria-hidden",k?null:"true",0)}${L("this",pt,0)}></span>`:`<img${L("class",Me.image__image,0)}${L("src",vt,0)} loading="lazy" decoding="async"${L("style",ut(C),0)}${L("alt",k,0)}${L("aria-hidden",k?null:"true",0)}${L("this",pt,0)}>`})}`})),Be={grid:"divkit-d9080",grid_halign_left:"divkit-f63b3",grid_halign_center:"divkit-a14a6",grid_halign_right:"divkit-b0717",grid_valign_top:"divkit-fbca8",grid_valign_center:"divkit-d4310",grid_valign_bottom:"divkit-e4205"};function Re(t){return t>0&&t<1}function Je(t){return String(Math.ceil(1e3*t)/1e3)}function Ue(t,e,r){if(t.some(Re)){const e=Math.max(...t.filter(Re).map((t=>1/t)));t=t.map((t=>t*e))}let i=0,n=0;const o=[];if(t.every(Boolean)){n=t.reduce(((t,e)=>t+e),0);for(let o=0;o<r;++o){if(!e[o])continue;const r=e[o]/t[o]*n;r>i&&(i=r)}}for(let e=0;e<r;++e)i?o[e]=`minmax(${dt(i*t[e]/n)},${Je(t[e])}fr)`:t[e]?o[e]=`${Je(t[e])}fr`:o[e]="auto";return o.join(" ")}const Le=U(((t,e,r,i)=>{let n,a,s,c,u,d,p,v,g,h,m,y,b=o,_=o,w=o,$=o,{json:x={}}=e,{templateContext:k}=e,{origJson:E}=e,{layoutParams:C}=e;const A=f(at);let F,V,D=1,j=[],P=[],S=[],O=[],I=0,M=!1,T="top",N="left";void 0===e.json&&r.json&&void 0!==x&&r.json(x),void 0===e.templateContext&&r.templateContext&&void 0!==k&&r.templateContext(k),void 0===e.origJson&&r.origJson&&void 0!==E&&r.origJson(E),void 0===e.layoutParams&&r.layoutParams&&void 0!==C&&r.layoutParams(C),x&&(D=1,T="top",N="left"),n=Array.isArray(x.items)&&x.items||[],a=A.getDerivedFromVars(x.column_count),$(),$=l(a,(t=>y=t)),s=A.getDerivedFromVars(x.content_alignment_vertical),_(),_=l(s,(t=>h=t)),c=A.getDerivedFromVars(x.content_alignment_horizontal),b(),b=l(c,(t=>g=t)),D=ie(y,D),u=n.map((t=>{let e=t,r=k;return({templateContext:r,json:e}=A.processTemplate(e,r)),{json:e,templateContext:r,origJson:t}}));{let t=[];u.forEach((e=>{t.push(A.getDerivedFromVars({rowSpan:e.json.row_span,columnSpan:e.json.column_span,width:e.json.width,height:e.json.height}))})),F=K(t,(t=>[...t])),w(),w=l(F,(t=>m=t))}{const t={};let e=0,r=0;j=[],P=[],S=[],O=[],M=!1,V=u.map(((i,n)=>{var o,a,s,l;const c=m[n],u=Number(c.columnSpan)||1,d=Number(c.rowSpan)||1,p={x:e,y:r,colSpan:u,rowSpan:d},v="match_parent"===(null===(o=c.width)||void 0===o?void 0:o.type)?Number(c.width.weight||1)/u:0,g="match_parent"===(null===(a=c.height)||void 0===a?void 0:a.type)?Number(c.height.weight||1)/d:0,f=1===u&&"fixed"===(null===(s=c.width)||void 0===s?void 0:s.type)&&c.width.value?Number(c.width.value)/u:0,h=1===d&&"fixed"===(null===(l=c.height)||void 0===l?void 0:l.type)&&c.height.value?Number(c.height.value)/d:0;for(let i=e;i<e+u;++i)for(let e=r;e<r+d;++e)t[i+"_"+e]?M=!0:(t[i+"_"+e]=!0,(!j[i]||j[i]<v)&&(j[i]=v),(!P[e]||P[e]<g)&&(P[e]=g),(!S[i]||S[i]<f)&&(S[i]=f),(!O[e]||O[e]<h)&&(O[e]=h));do{++e,e>=D&&(e=0,++r)}while(t[e+"_"+r]);return Object.assign(Object.assign({},i),{layoutParams:{gridArea:p,fakeElement:(null==C?void 0:C.fakeElement)||!1}})})),0!==e&&(M=!0),M&&A.logError(st(new Error('Mismatching "grid" rows/columns'))),I=r}return T=ce(h,T),N=le(g,N),d={valign:T,halign:N},p={"grid-template-columns":Ue(j,S,D),"grid-template-rows":Ue(P,O,I)},v=M,b(),_(),w(),$(),v?"":`${B(ee,"Outer").$$render(t,{cls:Ft("grid",Be,d),json:x,origJson:E,templateContext:k,style:p,layoutParams:C,parentOf:x.items,replaceItems:function(t){x=Object.assign(Object.assign({},x),{items:t.filter(mt)})}},{},{default:()=>`${z(V,(e=>`${B(si,"Unknown").$$render(t,{layoutParams:e.layoutParams,div:e.json,templateContext:e.templateContext,origJson:e.origJson},{},{})}`))}`})}`})),We=Le,He={gallery__scroller:"divkit-a4e39",gallery_scrollbar_none:"divkit-f49e7",gallery_orientation_horizontal:"divkit-c9be7",gallery_orientation_vertical:"divkit-a72d5","gallery_scroll-snap":"divkit-f606e","gallery__items-grid":"divkit-eb4a5",gallery__items:"divkit-af276",gallery__arrow:"divkit-b72d7","gallery__arrow-icon-path":"divkit-b4173"},qe="divkit-bf36b",Ge="divkit-a67bf",Ze="divkit-e2a31",Ye="divkit-c684b";function Xe(t){const e=[];let r=t[0],i=1;for(let n=1;n<=t.length;n++)t[n]!==r?(e.push(i>1?`repeat(${i}, ${r})`:r),r=t[n],i=1):i++;return e.join(" ")}function Qe(t,e){let r;return function(...i){null!==r&&clearTimeout(r),r=setTimeout((()=>{t.apply(this,i),r=null}),e)}}const Ke=U(((t,e,r,i)=>{let n,a,s,c,u,d,p,g,h,m,y,b,_,w,$,x,k,E,C,A,F,V,D,j,P,S,O,M,T,N,R,J=o,U=o,W=o,H=o,q=o,G=o,Z=o,Y=o,X=o,Q=o,tt=o,{json:et={}}=e,{templateContext:rt}=e,{origJson:it}=e,{layoutParams:ot}=e;const st=f(at);let lt,ct,pt=[],vt=!1,gt=!1,ft=null,ht=!1;const yt=st.getCustomization("galleryLeftClass"),bt=st.getCustomization("galleryRightClass");let _t,wt,$t,xt,kt,Et=1,Ct="horizontal",At="start",Vt=8,Dt="",jt=[],Pt={},It=!1,Mt={},zt=0;N=l(st.isDesktop,(t=>T=t));const Nt=Qe((function(){if(!lt)return;const t=lt.scrollLeft,e=lt.scrollWidth,r=lt.offsetWidth;vt=t>2,gt=t+r<e-2}),50);function Bt(){let t=[],e=pt[0].children.length;for(let r=0;r<e;++r)for(let e=0;e<Et;++e){const i=pt[e].children[r];i&&t.push(i)}return t}function Rt(t,e,r="smooth"){const i="horizontal"===Ct,n=i?"offsetLeft":"offsetTop",o=i?"left":"top",a=t[e];a&<.scroll({[o]:Math.max(0,a[n]+.01-Vt/2),behavior:r})}function Jt(t){const e=Bt(),r=lt.getBoundingClientRect(),i=e.findIndex((t=>function(t,e){return"horizontal"===Ct?e.left>=t.left&&e.right<=t.right:e.top>=t.top&&e.bottom<=t.bottom}(r,t.getBoundingClientRect())));if(-1!==i)return i;const n=e.map((t=>function(t,e){return"horizontal"===Ct?e.right>t.left&&t.right>e.left:e.bottom>t.top&&t.bottom>e.top}(r,t.getBoundingClientRect()))),o=n.findIndex(Boolean);return-1!==o?"prev"===t&&2===n.filter(Boolean).length?o+1:o:"prev"===t?1:e.length-2}v((()=>{ht=!1,_t&&!(null==ot?void 0:ot.fakeElement)&&(st.unregisterInstance(_t),_t=void 0)})),void 0===e.json&&r.json&&void 0!==et&&r.json(et),void 0===e.templateContext&&r.templateContext&&void 0!==rt&&r.templateContext(rt),void 0===e.origJson&&r.origJson&&void 0!==it&&r.origJson(it),void 0===e.layoutParams&&r.layoutParams&&void 0!==ot&&r.layoutParams(ot),et&&(Et=1,Ct="horizontal",At="start",Vt=8,Dt=""),n=Array.isArray(et.items)&&et.items||[],a=st.getDerivedFromVars(et.column_count),Q(),Q=l(a,(t=>M=t)),s=st.getDerivedFromVars(et.orientation),X(),X=l(s,(t=>O=t)),c=st.getDerivedFromVars(et.cross_content_alignment),Y(),Y=l(c,(t=>S=t)),u=st.getDerivedFromVars(et.item_spacing),Z(),Z=l(u,(t=>P=t)),d=st.getDerivedFromVars(et.cross_spacing),G(),G=l(d,(t=>j=t)),p=st.getDerivedFromVars(et.paddings),q(),q=l(p,(t=>D=t)),g=st.getDerivedFromVars(et.scroll_mode),W(),W=l(g,(t=>F=t)),h=st.getDerivedFromVars(et.restrict_parent_scroll),tt(),tt=l(h,(t=>R=t)),m=st.getDerivedFromVars(et.scrollbar),U(),U=l(m,(t=>A=t)),y=st.getDerivedFromVars(et.default_item),J(),J=l(y,(t=>C=t)),b=n.map((t=>{let e=t,r=rt;return({templateContext:r,json:e}=st.processTemplate(e,r)),{json:e,templateContext:r,origJson:t}})),_=T&&ht,_?"undefined"!=typeof ResizeObserver&&(ft=new ResizeObserver((()=>{Nt()})),ft.observe(ct)):ft&&(ft.disconnect(),ft=null),Et=ie(M,Et),w=function(t,e){let r=0,i=[];for(let n=0;n<t.length;++n)i[r]||(i[r]=[]),i[r].push(t[n]),++r>=e&&(r=0);return i}(b,Et),Ct=Oe(O,Ct),At=function(t,e){return"start"===t||"center"===t||"end"===t?t:e}(S,At),Vt=Ot(P,Vt),wt=dt(Vt),xt=Ot(j,Vt),$t=dt(xt),Dt=St(D,Dt),$="horizontal"===Ct?"grid-template-columns":"grid-template-rows";{let t=[];b.forEach((e=>{const r="horizontal"===Ct?"width":"height";t.push(st.getDerivedFromVars(e.json[r]))})),kt=K(t,(t=>t)),H(),H=l(kt,(t=>V=t))}jt=[],Et>1?jt.push("auto"):V.forEach((t=>{!t&&"horizontal"===Ct||"match_parent"===(null==t?void 0:t.type)?jt.push("100%"):jt.push("max-content")}));{const t={};let e={};It=!1,(null==ot?void 0:ot.fakeElement)&&(e.fakeElement=!0),"horizontal"===Ct?e.parentVAlign=At:e.parentHAlign=At,"paging"===F&&(It=!0,e.scrollSnap="start",t["horizontal"===Ct?"scroll-padding-left":"scroll-padding-top"]=dt(Vt/2)),1===Et&&(e.parentLayoutOrientation=Ct),Pt=Tt(t,Pt),Mt=Tt(e,Mt)}return x={padding:Dt,"grid-gap":$t},k={"grid-gap":wt,[$]:Xe(jt)},E={orientation:Ct,"scroll-snap":It,scrollbar:"auto"===A?"auto":"none"},zt=Ot(C,zt),et&&Nt(),et&&(_t&&(st.unregisterInstance(_t),_t=void 0),et.id&&!(null==ot?void 0:ot.fakeElement)&&(_t=et.id,st.registerInstance(et.id,{setCurrentItem(t){const e=Bt();if(t<0||t>e.length-1)throw new Error('Item is out of range in "set-current-item" action');Rt(e,t)},setPreviousItem(t){const e=Jt("prev"),r=Bt();let i=e-1;i<0&&(i="ring"===t?r.length-1:e),Rt(r,i)},setNextItem(t){const e="horizontal"===Ct?lt.scrollLeft+lt.offsetWidth===lt.scrollWidth:lt.scrollTop+lt.offsetHeight===lt.scrollHeight,r=Bt();if(e&&"ring"===t)return void Rt(r,0);const i=Jt("next");let n=i+1;n>r.length-1&&(n="ring"===t?0:i),Rt(r,n)}}))),J(),U(),W(),H(),q(),G(),Z(),Y(),X(),Q(),N(),tt(),` ${B(ee,"Outer").$$render(t,{cls:Ft("gallery",He,E),json:et,origJson:it,templateContext:rt,layoutParams:ot,customPaddings:!0,customActions:"gallery",parentOf:n,replaceItems:function(t){et=Object.assign(Object.assign({},et),{items:t.filter(mt)})}},{},{default:()=>`<div class="${I(He.gallery__scroller,!0)+" "+I(R?nt:"",!0)}"${L("style",ut(Pt),0)}${L("this",lt,0)}><div${L("class",He["gallery__items-grid"],0)}${L("style",ut(x),0)}${L("this",ct,0)}>${z(w,((e,r)=>`<div${L("class",He.gallery__items,0)}${L("style",ut(k),0)}${L("this",pt[r],0)}>${z(e,(e=>`${B(si,"Unknown").$$render(t,{layoutParams:Mt,div:e.json,templateContext:e.templateContext,origJson:e.origJson},{},{})}`))} </div>`))}</div></div> ${"horizontal"===Ct?`${vt&&_?` <div${L("class",yt||`${He.gallery__arrow} ${qe} ${Ze}`,0)}>${yt?"":`<svg${L("class",Ge,0)} xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" fill="none"><path${L("class",He["gallery__arrow-icon-path"],0)} d="m10 16 8.3 8 1.03-1-4-6-.7-1 .7-1 4-6-1.03-1z"></path></svg>`}</div>`:""} ${gt&&_?` <div${L("class",bt||`${He.gallery__arrow} ${qe} ${Ye}`,0)}>${bt?"":`<svg${L("class",Ge,0)} xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" fill="none"><path${L("class",He["gallery__arrow-icon-path"],0)} d="M22 16l-8.3 8-1.03-1 4-6 .7-1-.7-1-4-6 1.03-1 8.3 8z"></path></svg>`}</div>`:""}`:""}`})}`})),tr=Ke,er={tabs:"divkit-e0df5",tabs__list:"divkit-ea19b",tabs__item:"divkit-c25c7",tabs__item_selected:"divkit-d560a",tabs__item_actionable:"divkit-dfda0",tabs__panels:"divkit-f5dc0",tabs__swiper:"divkit-eb42c",tabs__swiper_animated:"divkit-b9f18",tabs__swiper_inited:"divkit-fa574",tabs__panel:"divkit-cc9fb",tabs__panel_visible:"divkit-e7306",tabs__separator:"divkit-b85bf"},rr=U(((t,e,r,i)=>{let n,a,s,c,u,d,p,g,h,m,y,b,_,w,x,k,E,C,A,F,V,D,j,P,S,O,M,T=o,N=o,R=o,J=o,U=o,W=o,q=o,G=o,Z=o;var Y,X;let{json:K={}}=e,{templateContext:tt}=e,{origJson:et}=e,{layoutParams:rt}=e;const it=f(at),ot=it.genId("tabs");let lt,ct=!1,vt=Q([]);C=l(vt,(t=>E=t));let ft,ht,mt,yt,bt,_t,wt,$t={},xt=12,kt="",Et="",Ct="",At="",Vt="",jt="",It="",Mt="",zt="",Nt="",Bt=0,Lt="",Wt="",qt=null,Zt=!1,Yt=!1,Xt=[],Qt=[],Kt=null;async function te(t,e=!1){if(_t=_,_=t,Zt||(Zt=!0,ht.style.height=dt(ht.clientHeight),mt.style.transform=`translate3d(${100*-(null!=_t?_t:_)}%,0,0)`),Yt=!0,async function(t){await $(),mt.style.transform=`translate3d(${t}%,0,0)`}(100*-_),function(t=!1){const e=t?Math.max(0,_-1):Math.min(_,null!=_t?_t:_),r=t?Math.min(n.length-1,_+1):Math.max(_,null!=_t?_t:_);Xt=Xt.map(((t,i)=>t||i>=e&&i<=r)),Qt=Qt.map(((t,i)=>i>=e&&i<=r))}(),async function(){await $();const t=document.getElementById(`${ot}-panel-${_}`);t&&(ht.style.height=dt(t.offsetHeight))}(),Kt&&clearTimeout(Kt),Kt=window.setTimeout((()=>{Qt=n.map(((t,e)=>e===_))}),400),wt=-_*ht.clientWidth,e){await $();const t=ft.querySelector(`.${er.tabs__item_selected}`);t&&t.focus()}}if(v((()=>{lt&&(it.unregisterInstance(lt),lt=void 0)})),void 0===e.json&&r.json&&void 0!==K&&r.json(K),void 0===e.templateContext&&r.templateContext&&void 0!==tt&&r.templateContext(tt),void 0===e.origJson&&r.origJson&&void 0!==et&&r.origJson(et),void 0===e.layoutParams&&r.layoutParams&&void 0!==rt&&r.layoutParams(rt),K&&(xt=12,kt="",At="",yt=void 0,Vt="",bt=void 0,jt="",It="",Mt="",zt="",Nt="",Bt=0,Lt="",Wt="",qt=null),n=K.items||[],a=n.map((t=>t.div)),s=it.getDerivedFromVars(K.width),G(),G=l(s,(t=>O=t)),c=it.getDerivedFromVars(K.height),q(),q=l(c,(t=>S=t)),u=it.getJsonWithVars(K.selected_tab),d=it.getDerivedFromVars(K.tab_title_style),W(),W=l(d,(t=>P=t)),p=it.getDerivedFromVars(K.has_separator),U(),U=l(p,(t=>j=t)),g=it.getDerivedFromVars(K.separator_color),J(),J=l(g,(t=>D=t)),h=it.getDerivedFromVars(K.separator_paddings),R(),R=l(h,(t=>V=t)),m=it.getDerivedFromVars(K.switch_tabs_by_content_swipe_enabled),N(),N=l(m,(t=>F=t)),y=it.getDerivedFromVars(K.restrict_parent_scroll),Z(),Z=l(y,(t=>M=t)),b=it.getDerivedFromVars(K.title_paddings),T(),T=l(b,(t=>A=t)),_=u&&Number(u)||0,Array.isArray(n)&&n.length){let t=[];n.forEach(((e,r)=>{const i=it.getJsonWithVars({index:r,title:e.title,title_click_action:e.title_click_action});i.title&&"string"==typeof i.title?t.push(i):it.logError(st(new Error("Incorrect title for the tab"),{additional:{index:r}}))})),vt.set(t)}else vt.set([]);(null==E?void 0:E.length)?ct=!1:(ct=!0,it.logError(st(new Error('Incorrect or empty "items" prop for div "tabs"'))));{let t={};(null==rt?void 0:rt.fakeElement)&&(t.fakeElement=!0),"wrap_content"===(null==O?void 0:O.type)&&(t.parentHorizontalWrapContent=!0),S&&"wrap_content"!==S.type||(t.parentVerticalWrapContent=!0),$t=Tt(t,$t)}if(!ct&&(_<0||_>=n.length)&&(it.logError(st(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:K.selected_tab,length:n.length}})),_=_<0?0:n.length-1),ct||E.some((t=>_===t.index))||(it.logError(st(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:K.selected_tab}})),_=(null===(Y=E[0])||void 0===Y?void 0:Y.index)||0),w=P||{},xt=ie(w.font_size,xt),w.font_size||w.paddings){const t=w.paddings||{top:6,right:8,bottom:6,left:8},e={top:(Number(t.top)||0)/xt*10,right:(Number(t.right)||0)/xt*10,bottom:(Number(t.bottom)||0)/xt*10,left:(Number(t.left)||0)/xt*10};kt=St(e,kt)}{const t=w.line_height;void 0!==t&&Gt(t)&&(Et=dt(t/xt*10))}{const t=w.letter_spacing;void 0!==t&&Pt(t)&&(Ct=dt(t/xt*10))}if(w.corner_radius||w.corners_radius||w.font_size){const t=null!==(X=w.corner_radius)&&void 0!==X?X:1e3;w.corners_radius?At=function(t,e,r,i){const n=[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]];for(let t=0;t<n.length;++t)if(n[t]&&!Pt(n[t]))return i;return Jt(t,e,r)}(w.corners_radius,t,xt,At):Pt(t)&&(At=dt(t/xt*10))}return yt=oe(w.active_font_weight||w.font_weight,yt),Vt=w.font_family&&"string"==typeof w.font_family?it.typefaceProvider(w.font_family,{fontWeight:yt||400}):"",bt=oe(w.inactive_font_weight||w.font_weight,bt),jt=w.font_family&&"string"==typeof w.font_family?it.typefaceProvider(w.font_family,{fontWeight:bt||400}):"",It=gt(w.active_text_color,1,It),Mt=gt(w.inactive_text_color,1,Mt),zt=gt(w.active_background_color,1,zt),Nt=gt(w.inactive_background_color,1,Nt),Bt=Ot(w.item_spacing,Bt),j&&(D&&(Lt=gt(D,1,Lt)),V&&(Wt=St(V,Wt))),x={background:Lt,margin:Wt},k=void 0===F||Boolean(F),qt=Rt(A||void 0,qt),ct||(Xt=n.map(((t,e)=>e===_)),Qt=n.map(((t,e)=>e===_))),K&&(lt&&(it.unregisterInstance(lt),lt=void 0),!K.id||ct||(null==rt?void 0:rt.fakeElement)||(lt=K.id,it.registerInstance(K.id,{setCurrentItem(t){if(t<0||t>n.length-1)throw new Error('Item is out of range in "set-current-item" action');te(t)},setPreviousItem(t){let e=_-1;e<0&&(e="ring"===t?n.length-1:_),te(e)},setNextItem(t){let e=_+1;e>n.length-1&&(e="ring"===t?0:_),te(e)}}))),C(),T(),N(),R(),J(),U(),W(),q(),G(),Z(),ct?"":`${B(ee,"Outer").$$render(t,{cls:Ft("tabs",er,{}),json:K,origJson:et,templateContext:tt,layoutParams:rt,customActions:"tabs",parentOf:a,parentOfSimpleMode:!0,replaceItems:function(t){K.items&&(K=Object.assign(Object.assign({},K),{items:K.items.map(((e,r)=>Object.assign(Object.assign({},e),{div:t[r]})))}))}},{},{default:()=>` <div class="${I(er.tabs__list,!0)+" "+I(M?nt:"",!0)}" role="tablist"${H({"--divkit-tabs-title-padding":qt?Dt(qt):"","--divkit-tabs-font-size":dt(xt),"--divkit-tabs-paddings":kt,"--divkit-tabs-line-height":Et,"--divkit-tabs-letter-spacing":Ct,"--divkit-tabs-active-font-weight":yt||"","--divkit-tabs-inactive-font-weight":bt||"","--divkit-tabs-active-font-family":Vt||"","--divkit-tabs-inactive-font-family":jt||"","--divkit-tabs-active-text-color":It,"--divkit-tabs-inactive-text-color":Mt,"--divkit-tabs-active-background-color":zt,"--divkit-tabs-inactive-background-color":Nt,"--divkit-tabs-border-radius":At,"--divkit-tabs-items-spacing":Bt?pt(Bt):""})}${L("this",ft,0)}>${z(E,(e=>{let r=e.index,i=r===_;return` ${B(Ht,"Actionable").$$render(t,{cls:Ft("tabs__item",er,{selected:i,actionable:Boolean(e.title_click_action)}),actions:!e.title_click_action||null!=rt&&rt.fakeElement?[]:[e.title_click_action].filter(Ut),attrs:{id:`${ot}-tab-${r}`,"aria-controls":`${ot}-panel-${r}`,role:"tab",tabindex:!i||null!=rt&&rt.fakeElement?"-1":e.title_click_action?void 0:"0","aria-selected":i?"true":"false"},customAction:null!=rt&&rt.fakeElement?null:t=>function(t,e){return _===e||(te(e),!1)}(0,r)},{},{default:()=>`${I(e.title)} `})}`}))}</div> ${j?`<div${L("class",er.tabs__separator,0)}${L("style",ut(x),0)}></div>`:""} <div class="${I(er.tabs__panels,!0)+" "+I(M?nt:"",!0)}"${L("this",ht,0)}><div${L("class",Ft("tabs__swiper",er,{inited:Zt,animated:Yt}),0)}${L("this",mt,0)}>${z(E,(e=>{let r=e.index;return` <div${L("class",Ft("tabs__panel",er,{visible:Qt[r]}),0)} role="tabpanel" id="${I(ot,!0)+"-panel-"+I(r,!0)}" aria-labelledby="${I(ot,!0)+"-tab-"+I(r,!0)}" style="${"left: "+I(100*r,!0)+"%"}">${Xt[r]?`${B(si,"Unknown").$$render(t,{div:n[r].div,templateContext:tt,layoutParams:$t},{},{})}`:""} </div>`}))}</div></div>`})}`})),ir=rr,nr="divkit-eb860",or="divkit-e08c6";function ar(t){return e=>{if(e<=0)return 0;if(e>=1)return 1;const r=e*t.length,i=Math.floor(r),n=r-i;return t[i]*n+t[i+1]*(1-n)}}function sr(t){return Math.max(...t.map((t=>(Number(t.duration)||200)+(Number(t.start_delay)||0))))}function lr(t){const e=[];return"set"===t.type?(t.items||[]).forEach((t=>{e.push(...lr(t))})):e.push(t),e}ar([.0021,.0045,.0071,.01,.0131,.0165,.0202,.0242,.0284,.033,.0378,.0429,.0483,.054,.0601,.0664,.0731,.08,.0872,.0948,.1026,.1108,.1192,.1279,.1369,.1461,.1556,.1653,.1753,.1855,.1958,.2064,.2171,.2279,.2389,.25,.2612,.2725,.2839,.2952,.3067,.3181,.3295,.341,.3524,.3637,.375,.3863,.3974,.4085,.4195,.4304,.4412,.4519,.4624,.4729,.4832,.4934,.5034,.5133,.5231,.5327,.5422,.5516,.5608,.5699,.5788,.5876,.5963,.6048,.6132,.6214,.6295,.6375,.6453,.653,.6606,.668,.6754,.6825,.6896,.6965,.7034,.7101,.7166,.7231,.7295,.7357,.7418,.7479,.7538,.7596,.7653,.7709,.7764,.7818,.7871,.7923,.7974,.8024,.8073,.8122,.8169,.8216,.8261,.8306,.835,.8394,.8436,.8478,.8518,.8558,.8598,.8636,.8674,.8711,.8747,.8783,.8818,.8852,.8886,.8919,.8951,.8983,.9014,.9044,.9074,.9103,.9131,.9159,.9187,.9213,.924,.9265,.929,.9315,.9339,.9362,.9385,.9408,.943,.9451,.9472,.9492,.9512,.9532,.9551,.9569,.9587,.9605,.9622,.9638,.9655,.967,.9686,.9701,.9715,.9729,.9743,.9756,.9769,.9782,.9794,.9805,.9817,.9828,.9838,.9848,.9858,.9868,.9877,.9886,.9894,.9902,.991,.9917,.9924,.9931,.9937,.9943,.9949,.9954,.9959,.9964,.9969,.9973,.9977,.998,.9983,.9986,.9989,.9991,.9993,.9995,.9997,.9998,.9999,.9999,1,1]),ar([5e-4,.002,.0045,.0078,.0119,.0168,.0224,.0286,.0355,.0429,.0508,.0592,.0681,.0774,.087,.0969,.1072,.1177,.1285,.1395,.1507,.1621,.1736,.1853,.197,.2089,.2208,.2328,.2448,.2569,.2689,.281,.293,.305,.317,.3289,.3408,.3526,.3644,.376,.3876,.3991,.4105,.4218,.433,.444,.455,.4658,.4765,.4871,.4975,.5078,.518,.528,.5379,.5477,.5573,.5668,.5761,.5853,.5944,.6033,.612,.6206,.6291,.6374,.6456,.6537,.6616,.6693,.677,.6845,.6918,.699,.7061,.713,.7199,.7265,.7331,.7395,.7458,.752,.758,.764,.7698,.7755,.781,.7865,.7918,.7971,.8022,.8072,.8121,.8169,.8216,.8262,.8307,.8351,.8394,.8436,.8477,.8517,.8557,.8595,.8633,.8669,.8705,.874,.8775,.8808,.8841,.8873,.8904,.8934,.8964,.8993,.9022,.9049,.9076,.9103,.9129,.9154,.9178,.9202,.9226,.9249,.9271,.9293,.9314,.9335,.9355,.9375,.9394,.9413,.9431,.9449,.9466,.9483,.95,.9516,.9532,.9547,.9562,.9576,.9591,.9605,.9618,.9631,.9644,.9657,.9669,.9681,.9692,.9703,.9714,.9725,.9736,.9746,.9756,.9765,.9775,.9784,.9793,.9802,.981,.9818,.9826,.9834,.9842,.9849,.9856,.9863,.987,.9877,.9883,.989,.9896,.9902,.9908,.9913,.9919,.9924,.993,.9935,.994,.9944,.9949,.9954,.9958,.9963,.9967,.9971,.9975,.9979,.9983,.9986,.999,.9993,.9997,1]);const cr={tooltip:"divkit-f1907",tooltip_visible:"divkit-e5914"},ur=U(((t,e,r,i)=>{let n,a,s,c,u,d,p,g,h,m,y,b,_,w=o,$=o,x=o,k=o,E=o;var C,A,F,V;let{ownerNode:D}=e,{data:j}=e,{internalId:P}=e,{templateContext:S}=e;const O=f(at);y=l(O.isDesktop,(t=>m=t)),Date.now();return v((()=>{})),void 0===e.ownerNode&&r.ownerNode&&void 0!==D&&r.ownerNode(D),void 0===e.data&&r.data&&void 0!==j&&r.data(j),void 0===e.internalId&&r.internalId&&void 0!==P&&r.internalId(P),void 0===e.templateContext&&r.templateContext&&void 0!==S&&r.templateContext(S),n=O.getDerivedFromVars(j.position),x(),x=l(n,(t=>h=t)),a=O.getDerivedFromVars(null===(A=null===(C=j.offset)||void 0===C?void 0:C.x)||void 0===A?void 0:A.value),$(),$=l(a,(t=>g=t)),s=O.getDerivedFromVars(null===(V=null===(F=j.offset)||void 0===F?void 0:F.y)||void 0===V?void 0:V.value),w(),w=l(s,(t=>p=t)),c=O.getDerivedFromVars(j.animation_in),k(),k=l(c,(t=>b=t)),u=O.getDerivedFromVars(j.animation_out),E(),E=l(u,(t=>_=t)),d={visible:!1},w(),$(),x(),y(),k(),E(),` <div class="${I(Ft("tooltip",cr,d),!0)+" "+I(m?it:"",!0)}"${H({top:"",left:"",width:"",height:""})}${L("this",undefined,0)}>${B(si,"Unknown").$$render(t,{div:j.div,templateContext:S},{},{})}</div>`}));function dr(t){return"change_bounds"===t.type?t:"set"===t.type?dr(t.items[0]):null}const pr=U(((t,e,r,i)=>{let n,o,a,s,l,c,{json:u={}}=e,{templateContext:d}=e,{origJson:p}=e,{layoutParams:h}=e;const m=f(at),y=f(Vt);let b,_,w,x=!1,k=new Map,E=new Set,C=null,A=[],F=[],V=[],D=[],j=null,P=!1;function S(t,e,r){let{json:i,templateContext:n,transitions:o,node:a}=e;i=m.getJsonWithVars(i),o=m.getJsonWithVars(o);const s=lr(o),l=a.getBoundingClientRect();return{json:Object.assign(Object.assign({},i),{margins:void 0,alpha:(c=s,c.some((t=>"fade"===t.type))?void 0:i.alpha)}),templateContext:n,elementBbox:l,rootBbox:t,transitions:s,alpha:i.alpha,width:l.width,height:l.height,offsetTop:l.top-t.top,offsetLeft:l.left-t.left,direction:r,resolvePromise:e.resolvePromise,node:e.node};var c}async function O(t){if(w===t)return;m.setRunning("stateChange",!0);const e=new Set(E);A.forEach((t=>{t.resolvePromise&&t.resolvePromise()})),A=[];let r=[];if(b){const t=b.getBoundingClientRect();r=V.map((e=>S(t,e,"out")))}D.forEach((t=>{k.set(t.id,t.node.getBoundingClientRect())})),F=[],V=[],D=[];const i=l.find((e=>e.state_id===t))||null;if(i?(w=t,null==s||s.setValue(w),j=i):m.logError(st(new Error("Cannot find state with id"),{additional:{stateId:t}})),await $(),!b)return;const n=b.getBoundingClientRect();let o=F.filter((t=>{var r;return!(!t.json.id||e.has(t.json.id))||(null===(r=t.resolvePromise)||void 0===r||r.call(t),!1)})).map((t=>S(n,t,"in")));r=r.filter((t=>{var e;return!(!t.json.id||E.has(t.json.id))||(null===(e=t.resolvePromise)||void 0===e||e.call(t),!1)}));const a=r.concat(o),c=a.reduce(((t,e)=>Math.max(t,sr(e.transitions))),0),u=D.filter((t=>k.has(t.id))).map((t=>({json:Object.assign(Object.assign({},t.json),{margins:void 0,width:{type:"match_parent"},height:{type:"match_parent"}}),templateContext:t.templateContext,rootBbox:n,beforeBbox:k.get(t.id),afterBbox:t.node.getBoundingClientRect(),node:t.node,transition:m.getJsonWithVars(dr(t.transitions)),resolvePromise:t.resolvePromise})));A=[...a.map((t=>Object.assign(Object.assign({},t),{maxDuration:c}))),...u],k.clear(),m.setRunning("stateChange",!1)}return g(Vt,{registerInstance(t,e){C||(C=new Map),C.has(t)?m.logError(st(new Error("Duplicate state with id"),{additional:{id:t}})):C.set(t,e)},unregisterInstance(t){null==C||C.delete(t)},runVisibilityTransition(t,e,r,i,n){if(!b)return Promise.resolve();const o=S(b.getBoundingClientRect(),{json:t,templateContext:e,transitions:r,node:i},n),a=sr(o.transitions),s=Object.assign(Object.assign({},o),{maxDuration:a});return A=[...A.filter((t=>t.node!==o.node)),s],new Promise((t=>{s.resolvePromise=t}))},registerChildWithTransitionIn(t,e,r,i){const n={json:t,templateContext:e,transitions:r,node:i};return F.push(n),new Promise((t=>{n.resolvePromise=t}))},registerChildWithTransitionOut(t,e,r,i){const n={json:t,templateContext:e,transitions:r,node:i};return V.push(n),new Promise((t=>{n.resolvePromise=t}))},registerChildWithTransitionChange(t,e,r,i){const n=t.id;if(!n)return Promise.resolve();const o={id:n,json:t,templateContext:e,transitions:r,node:i};return D.push(o),new Promise((t=>{o.resolvePromise=t}))},hasTransitionChange:t=>!!t&&k.has(t),registerChild(t){E.add(t)},unregisterChild(t){E.delete(t)}}),v((()=>{_&&y.unregisterInstance(_)})),void 0===e.json&&r.json&&void 0!==u&&r.json(u),void 0===e.templateContext&&r.templateContext&&void 0!==d&&r.templateContext(d),void 0===e.origJson&&r.origJson&&void 0!==p&&r.origJson(p),void 0===e.layoutParams&&r.layoutParams&&void 0!==h&&r.layoutParams(h),n=u.div_id||u.id,o=m.getJsonWithVars(u.default_state_id),a=u.state_id_variable,s=a?m.getVariable(a,"string"):null,u&&(P=!1),n?x=!1:(x=!0,m.logError(st(new Error('Missing "id" prop for div "state"')))),u&&(E=new Set),l=u.states||[],c=l.map((t=>t.div)),(null==l?void 0:l.length)?x=!1:(x=!0,m.logError(st(new Error('Empty "states" prop for div "state"')))),u&&(_&&(y.unregisterInstance(_),_=void 0),n&&!(null==h?void 0:h.fakeElement)&&(_=n,y.registerInstance(n,{setState:O,getChild:function(t){if(C&&C.has(t))return C.get(t);m.logError(st(new Error("Missing state block with id"),{additional:{id:t}}))}}))),!P&&function(t){if(!P&&(P=!0,t.length)){const e=(null==s?void 0:s.getValue())||o;e?(w=e,j=t.find((t=>t.state_id===w))||null,j||m.logError(st(new Error("Cannot find state for default_state_id"),{additional:{selectedId:w}}))):(j=t[0],w=j.state_id),s&&(s.setValue(w),s.subscribe((t=>{O(t)})))}}(l),x?"":`${B(ee,"Outer").$$render(t,{cls:"divkit-b8efc",json:u,origJson:p,templateContext:d,layoutParams:h,parentOf:c,parentOfSimpleMode:!0,replaceItems:function(t){const e=u.states;if(!e)return;const r=e.map(((e,r)=>Object.assign(Object.assign({},e),{div:t[r]})));u=Object.assign(Object.assign({},u),{states:r}),w&&(j=r.find((t=>t.state_id===w))||null)}},{},{default:()=>{var e;return`${null!==(e=j)&&void 0!==e&&e.div?`${B(si,"Unknown").$$render(t,{div:j.div,templateContext:d},{},{})}`:""} <div${L("class","divkit-adaae",0)} aria-hidden="true"${L("this",b,0)}>${z(A,(e=>"direction"in e?`<div${L("class",nr,0)}${H({left:`${e.offsetLeft}px`,top:`${e.offsetTop}px`,width:`${e.width}px`,height:`${e.height}px`})}><div${L("class",or,0)}>${B(si,"Unknown").$$render(t,{div:e.json,templateContext:e.templateContext,layoutParams:{fakeElement:!0}},{},{})}</div> </div>`:`<div${L("class",nr,0)}><div${L("class",or,0)}>${B(si,"Unknown").$$render(t,{div:e.json,templateContext:e.templateContext,layoutParams:{fakeElement:!0}},{},{})}</div> </div>`))}</div>`}})} ${null!=h&&h.tooltips?`${z(null==h?void 0:h.tooltips,(e=>`${B(ur,"TooltipView").$$render(t,{ownerNode:e.ownerNode,data:e.desc,internalId:e.internalId,templateContext:d},{},{})}`))}`:""}`})),vr=pr,gr={pager:"divkit-c5feb",pager__items:"divkit-f6987",pager__item:"divkit-feca7",pager_orientation_horizontal:"divkit-b0a1c",pager_orientation_vertical:"divkit-f772f",pager__arrow:"divkit-d78c2","pager__arrow-icon-path":"divkit-a94d9"},fr=U(((t,e,r,i)=>{let n,a,s,u,d,p,g,h,m,y,b,_,w,$,x,k,E,C,A,F,V,D,j=o,P=o,S=o,O=o,M=o,T=o;var N,R,J,U,W,H;let{json:q={}}=e,{templateContext:G}=e,{origJson:Z}=e,{layoutParams:Y}=e;const X=f(at),Q=X.genId("pager"),K=X.getCustomization("pagerLeftClass"),tt=X.getCustomization("pagerRightClass");E=l(X.isDesktop,(t=>k=t)),Qe((function(){if(!it)return;const t=function(){const t=Array.from(rt.children),e=rt.getBoundingClientRect(),r=t.findIndex((t=>{return r=e,i=t.getBoundingClientRect(),"horizontal"===vt?i.left>=r.left&&i.right<=r.right:i.top>=r.top&&i.bottom<=r.bottom;var r,i}));return-1!==r?r:ot}();t!==ot&&(ot=t)}),50);let et,rt,it=!1,ot=0,lt=0,ct=!1,vt="horizontal",gt="",ft="",ht="";function yt(t,e="smooth"){const r="horizontal"===vt,i=rt.children[t],n=r?"offsetLeft":"offsetTop",o=r?"left":"top";rt.scroll({[o]:i[n],behavior:e}),ot=t}v((()=>{it=!1,et&&(X.unregisterInstance(et),et=void 0)})),void 0===e.json&&r.json&&void 0!==q&&r.json(q),void 0===e.templateContext&&r.templateContext&&void 0!==G&&r.templateContext(G),void 0===e.origJson&&r.origJson&&void 0!==Z&&r.origJson(Z),void 0===e.layoutParams&&r.layoutParams&&void 0!==Y&&r.layoutParams(Y),q&&(ft=""),n=X.getDerivedFromVars(q.layout_mode),P(),P=l(n,(t=>C=t)),a=X.getDerivedFromVars(q.orientation),M(),M=l(a,(t=>V=t)),s=X.getDerivedFromVars(q.item_spacing),O(),O=l(s,(t=>F=t)),u=X.getDerivedFromVars(q.paddings),S(),S=l(u,(t=>A=t)),d=X.getDerivedFromVars(q.restrict_parent_scroll),T(),T=l(d,(t=>D=t)),p=(Array.isArray(q.items)&&q.items||[]).map((t=>{let e=t,r=G;return({templateContext:r,json:e}=X.processTemplate(e,r)),{json:e,templateContext:r,origJson:t}})),C?"percentage"!==C.type&&"fixed"!==C.type?(ct=!0,X.logError(st(new Error('Incorrect value of "layout_mode.type" for div "pager"')))):ct=!1:(ct=!0,X.logError(st(new Error('Empty "layout_mode" prop for div "pager"')))),vt=Oe(V,vt);{const t=null==F?void 0:F.value;t&&Pt(t)&&(gt=dt(t||0))}if(ft=St(A,ft),g="horizontal"===vt?"grid-auto-columns":"grid-auto-rows","fixed"===(null==C?void 0:C.type)){const t=pt("horizontal"===vt?((null===(N=q.paddings)||void 0===N?void 0:N.left)||0)+((null===(R=q.paddings)||void 0===R?void 0:R.right)||0):((null===(J=q.paddings)||void 0===J?void 0:J.top)||0)+((null===(U=q.paddings)||void 0===U?void 0:U.bottom)||0)),e=null===(W=C.neighbour_page_width)||void 0===W?void 0:W.value;ht=e?`calc(100% + ${t} - 2 * ${pt(e)} - 2 * ${gt})`:"100%"}else if("percentage"===(null==C?void 0:C.type)){const t=null===(H=C.page_width)||void 0===H?void 0:H.value;ht=`${Number(t)}%`}return h={"grid-gap":gt,padding:ft,[g]:ht},m={orientation:vt},y=ct,b=k&&it&&!y,_=ot>0,w=ot+1<p.length,$=X.getStore("pagers"),j(),j=l($,(t=>x=t)),function(t,e){const r=q.id;if(r){const i=new Map(x);c($,x=i.set(r,{instId:Q,size:t,currentItem:e,scrollToPagerItem:yt}),x)}}(p.length,ot),function(t){var e;if(t===lt)return;lt=t;const r=X.getJsonWithVars(null===(e=p[t].json)||void 0===e?void 0:e.selected_actions);(null==r?void 0:r.length)&&X.execAnyActions(r)}(ot),q&&(et&&(X.unregisterInstance(et),et=void 0),q.id&&!(null==Y?void 0:Y.fakeElement)&&(et=q.id,X.registerInstance(q.id,{setCurrentItem(t){if(t<0||t>p.length-1)throw new Error('Item is out of range in "set-current-item" action');yt(t)},setPreviousItem:function(t){let e=ot-1;e<0&&(e="ring"===t?p.length-1:ot),yt(e)},setNextItem:function(t){let e=ot+1;e>p.length-1&&(e="ring"===t?0:ot),yt(e)}}))),j(),E(),P(),S(),O(),M(),T(),y?"":`${B(ee,"Outer").$$render(t,{cls:Ft("pager",gr,m),json:q,origJson:Z,templateContext:G,layoutParams:Y,customPaddings:!0,parentOf:q.items,replaceItems:function(t){q=Object.assign(Object.assign({},q),{items:t.filter(mt)})}},{},{default:()=>`<div class="${I(gr.pager__items,!0)+" "+I(D?nt:"",!0)}"${L("style",ut(h),0)}${L("this",rt,0)}>${z(p,(e=>`<div${L("class",gr.pager__item,0)}>${B(si,"Unknown").$$render(t,{div:e.json,templateContext:e.templateContext,origJson:e.origJson,layoutParams:null!=Y&&Y.fakeElement?{fakeElement:!0}:void 0},{},{})} </div>`))}</div> ${_&&b?` <div${L("class",K||`${gr.pager__arrow} ${qe} ${Ze}`,0)}>${K?"":`<svg${L("class",Ge,0)} xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" fill="none"><path${L("class",gr["pager__arrow-icon-path"],0)} d="m10 16 8.3 8 1.03-1-4-6-.7-1 .7-1 4-6-1.03-1z"></path></svg>`}</div>`:""} ${w&&b?` <div${L("class",tt||`${gr.pager__arrow} ${qe} ${Ye}`,0)}>${tt?"":`<svg${L("class",Ge,0)} xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" fill="none"><path${L("class",gr["pager__arrow-icon-path"],0)} d="M22 16l-8.3 8-1.03-1 4-6 .7-1-.7-1-4-6 1.03-1 8.3 8z"></path></svg>`}</div>`:""}`})}`})),hr=fr,mr={indicator:"divkit-d8e3f",indicator__scroller:"divkit-b5db0",indicator__items:"divkit-d5d94",indicator__item:"divkit-f6629",indicator_placement_default:"divkit-c1670",indicator__item_active:"divkit-b39cd",indicator_placement_stretch:"divkit-b6bd3"},yr=["rounded_rectangle","circle"],br=U(((t,e,r,i)=>{let n,a,s,c,u,d,p,v,g,h,m,y,b,_,w,x,k,E,C,A=o,F=o,V=o,D=o,j=o,P=o,S=o,O=o,M=o;var T,N;let{json:R={}}=e,{templateContext:J}=e,{origJson:U}=e,{layoutParams:W}=e;const q=f(at);let G,Z,Y,X={width:13,height:13,borderRadius:6.5,background:"#ffdc60"},Q={width:10,height:10,borderRadius:5,background:"#33919cb5"},K="default",et=15,rt=10,it=5;if(void 0===e.json&&r.json&&void 0!==R&&r.json(R),void 0===e.templateContext&&r.templateContext&&void 0!==J&&r.templateContext(J),void 0===e.origJson&&r.origJson&&void 0!==U&&r.origJson(U),void 0===e.layoutParams&&r.layoutParams&&void 0!==W&&r.layoutParams(W),R&&(K="default",et=15,rt=10,it=5,X={width:13,height:13,borderRadius:6.5,background:"#ffdc60"},Q={width:10,height:10,borderRadius:5,background:"#33919cb5"}),n=q.getDerivedFromVars(R.shape),P(),P=l(n,(t=>x=t)),a=q.getDerivedFromVars(R.active_item_color),D(),D=l(a,(t=>_=t)),s=q.getDerivedFromVars(R.inactive_item_color),j(),j=l(s,(t=>w=t)),c=q.getDerivedFromVars(R.active_item_size),S(),S=l(c,(t=>k=t)),u=q.getDerivedFromVars(R.active_shape),M(),M=l(u,(t=>C=t)),d=q.getDerivedFromVars(R.inactive_shape),O(),O=l(d,(t=>E=t)),p=q.getDerivedFromVars(R.space_between_centers),F(),F=l(p,(t=>y=t)),v=q.getDerivedFromVars(R.items_placement),V(),V=l(v,(t=>b=t)),C&&(X=_e({type:"shape_drawable",shape:C},yr,X)),E&&(Q=_e({type:"shape_drawable",shape:E},yr,Q)),!C&&!E&&x){const t=ie(k,1.3);Q=_e({type:"shape_drawable",shape:x,color:Q.background},yr,Q),Q.background=gt(w,1,Q.background),X=Object.assign(Object.assign({},Q),{width:Q.width*t,height:Q.height*t,borderRadius:Q.borderRadius*t,background:X.background}),X.background=gt(_,1,X.background)}if(!b||"default"!==b.type&&"stretch"!==b.type)K="default",y&&(et=Ot(y.value,et));else if(K=b.type,"default"===K)et=Ot(null===(T=b.space_between_centers)||void 0===T?void 0:T.value,et);else if("stretch"===K){const t=b;rt=ie(t.max_visible_items,rt),it=Ot(null===(N=t.item_spacing)||void 0===N?void 0:N.value,it)}return g=q.getStore("pagers"),A(),A=l(g,(t=>m=t)),async function(t){if(R.pager_id&&t.has(R.pager_id)&&(Y=t.get(R.pager_id),await $(),Z)){const t=Z.children[Y.currentItem];if(t){const e=t.offsetLeft;G.scroll({left:e-G.clientWidth/2,behavior:"smooth"})}}}(m),h={placement:K},A(),F(),V(),D(),j(),P(),S(),O(),M(),`${B(ee,"Outer").$$render(t,{cls:Ft("indicator",mr,h),json:R,origJson:U,templateContext:J,layoutParams:W},{},{default:()=>`<div${L("class",mr.indicator__scroller,0)}${L("this",G,0)}><div${L("class",mr.indicator__items,0)} role="tablist"${H({margin:"default"===K?`0 ${dt(Math.max(0,X.width-Q.width)/2)}`:"","--divkit-indicator-inactive-width":dt(Q.width),"--divkit-indicator-inactive-height":dt(Q.height),"--divkit-indicator-inactive-border-radius":dt(Q.borderRadius),"--divkit-indicator-inactive-background":Q.background||"","--divkit-indicator-inactive-box-shadow":Q.boxShadow||"","--divkit-indicator-active-width":dt(X.width),"--divkit-indicator-active-height":dt(X.height),"--divkit-indicator-active-border-radius":dt(X.borderRadius),"--divkit-indicator-active-background":X.background||"","--divkit-indicator-active-box-shadow":X.boxShadow||"","--divkit-indicator-active-scale":X.width/Q.width,"--divkit-indicator-default-margin":"default"===K?`0 ${dt((et-Q.width)/2)}`:"","--divkit-indicator-stretch-margin":"stretch"===K?dt(it):"","--divkit-indicator-stretch-max-count":"stretch"===K?rt:"","--divkit-indicator-stretch-max-spacer":"stretch"===K?dt((rt-1)*it):""})}${L("this",Z,0)}>${Y?`${z(Array(Y.size),((t,e)=>{let r=e===Y.currentItem;return` <div class="${I(Ft("indicator__item",mr,{active:r}),!0)+" "+I(tt,!0)}" role="tab" id="${I(Y.instId,!0)+"-tab-"+I(e,!0)}" aria-controls="${I(Y.instId,!0)+"-panel-"+I(e,!0)}"${L("aria-selected",r?"true":"false",0)}${L("tabindex",r?0:-1,0)}></div>`}))}`:""}</div></div>`})}`})),_r=br,wr={slider:"divkit-ef4f7",slider__input:"divkit-d1d65",slider__input_secondary:"divkit-c7980",slider__thumb:"divkit-f3453",slider__thumb_secondary:"divkit-e1984","slider__tracks-wrapper":"divkit-f7338","slider__tracks-inner":"divkit-ac903",slider__track:"divkit-e956c","slider__active-track":"divkit-ec5bf","slider__thumb-text":"divkit-c4af5","slider__thumb-text_secondary":"divkit-d8821",slider__tick:"divkit-bd9bf",slider__tick_active:"divkit-d8ce2",slider__tick_inactive:"divkit-e71e7"};function $r(t,e){if(!t||!t.font_size)return e;const r=t.offset,i=t.text_color&>(t.text_color)||"#000",n=ne(t.font_weight);if(Gt(t.font_size)&&"transparent"!==i){var o,a;const e={fontSize:dt(t.font_size),fontWeight:n,textColor:i};return"number"==typeof(null==r||null===(o=r.x)||void 0===o?void 0:o.value)&&"number"==typeof(null==r||null===(a=r.y)||void 0===a?void 0:a.value)&&(e.offset={x:r.x.value,y:r.y.value}),e}}function xr(t,e,r){return Math.max(e,Math.min(r,Number(t)))}const kr="function"==typeof BigInt;function Er(t){return kr?BigInt(t):Number(t)}const Cr=Er("9223372036854775807"),Ar=Er("-9223372036854775808");function Fr(t){const e=Er(t);if(e>Cr||e<Ar)throw new Error("Integer overflow.");return e}const Vr=Fr(0);function Dr(t){let e=t;return e<0&&(e=-e),e}function jr(t){let e=0;return t>0?e=1:t<0&&(e=-1),Fr(e)}class Pr{constructor(t,e){const r=this.convertValue(e);this.name=t,this.value=r}getName(){return this.name}subscribe(t){return this.store||(this.store=Q(this.value)),this.store.subscribe(t)}set(t){const e=this.fromString(t);this.setValue(e)}setValue(t){const e=this.convertValue(t);this.value=e,this.store&&this.store.set(e)}getValue(){return this.value}}const Sr={string:class extends Pr{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"string"}},number:class extends Pr{convertValue(t){if("number"!=typeof t||isNaN(t)||!isFinite(t))throw new Error("Incorrect variable value");return t}fromString(t){const e=Number(t);return this.convertValue(e)}getType(){return"number"}},integer:class extends Pr{convertValue(t){if("bigint"!=typeof t&&"number"!=typeof t||"number"==typeof t&&(isNaN(t)||t!==Math.round(t))||t>Cr||t<Ar)throw new Error("Incorrect variable value");return Fr(t)}fromString(t){const e=Fr(t);return this.convertValue(e)}getType(){return"integer"}},boolean:class extends Pr{convertValue(t){if(1!==t&&0!==t&&!0!==t&&!1!==t)throw new Error("Incorrect variable value");return Number(t)}fromString(t){if("1"===t||"true"===t)return 1;if("0"===t||"false"===t)return 0;throw new Error("Incorrect variable value")}getType(){return"boolean"}},color:class extends Pr{convertValue(t){if("string"!=typeof t||!ft(t))throw new Error("Incorrect variable value");return t}fromString(t){return this.convertValue(t)}getType(){return"color"}},url:class extends Pr{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"url"}},dict:class extends Pr{convertValue(t){if("object"!=typeof t||!t)throw new Error("Incorrect variable value");return t}fromString(t){throw new Error("Dict variable does not support setter from string")}getType(){return"dict"}},array:class extends Pr{convertValue(t){if(!Array.isArray(t))throw new Error("Incorrect variable value");return t}fromString(t){throw new Error("Array variable does not support setter from string")}getType(){return"array"}}};function Or(t,e,r){if(!(e in Sr))throw new Error("Unsupported variable type");return new Sr[e](t,r)}const Ir={width:10,height:10,borderRadius:5,background:"#000"},Mr=["rounded_rectangle","circle"],Tr=["rounded_rectangle"];function zr(t,e,r,i,n){let o=[];if(n)for(let n=t;n<e;++n)o.push((n-r)/(i-r));else{for(let e=r;e<t;++e)o.push((e-r)/(i-r));for(let t=e;t<i+1;++t)o.push((t-r)/(i-r))}return o}const Nr=U(((t,e,r,i)=>{let n,a,s,c,u,d,p,g,h,m,y,b,_,w,$,x,k,E,C,A,F,V,D,j,P,S,O,M,T,N,R,J,U,W,q,G,Z,Y,X=o,Q=o,K=o,tt=o,et=o,rt=o,it=o,nt=o,ot=o,lt=o,ct=o,ut=o,vt=o,gt=o;var ft,ht,mt,yt;let{json:bt={}}=e,{templateContext:_t}=e,{origJson:wt}=e,{layoutParams:$t}=e;const xt=f(at),kt=f(Wt);let Et,Ct,At,Vt,Dt,jt=0,St=100,Ot=Ir,It=Ot,Mt=Ir,Tt=Ir,zt=null,Bt=null,Rt=Dt,Jt="",Ut="",Lt=!1,Ht=xr(G||0,jt,St),qt=xr(q||0,jt,St),Gt=!1;function Zt(){if(!Ct)return;const t=St-jt,e=(null==zt?void 0:zt.width)||0,r=(null==Bt?void 0:Bt.width)||0;Math.max(e,r)*t>=(null==Ct?void 0:Ct.clientWidth)?Gt||(xt.logError(st(new Error("Slider ticks overlap each other"),{level:"warn"})),Gt=!0):Gt=!1}Qe(Zt,50),v((()=>{Et&&(xt.unregisterFocusable(Et),Et=void 0)})),void 0===e.json&&r.json&&void 0!==bt&&r.json(bt),void 0===e.templateContext&&r.templateContext&&void 0!==_t&&r.templateContext(_t),void 0===e.origJson&&r.origJson&&void 0!==wt&&r.origJson(wt),void 0===e.layoutParams&&r.layoutParams&&void 0!==$t&&r.layoutParams($t),bt&&(Ot=Ir,It=Ot,Mt=Ir,Tt=Ir,zt=null,Bt=null,Dt=void 0,Rt=void 0,Jt="",Ut=""),n=bt.thumb_value_variable,a=bt.thumb_secondary_value_variable,s=n&&xt.getVariable(n,"integer")||Or("temp","integer",0),ut(),ut=l(s,(t=>G=t)),c=a&&xt.getVariable(a,"integer")||Or("temp","integer",0),ct(),ct=l(c,(t=>q=t)),u=xt.getDerivedFromVars(bt.min_value),gt(),gt=l(u,(t=>Y=t)),d=xt.getDerivedFromVars(bt.max_value),vt(),vt=l(d,(t=>Z=t)),p=xt.getDerivedFromVars(bt.thumb_style),lt(),lt=l(p,(t=>W=t)),g=xt.getDerivedFromVars(bt.thumb_secondary_style),ot(),ot=l(g,(t=>U=t)),h=xt.getDerivedFromVars(bt.track_inactive_style),nt(),nt=l(h,(t=>J=t)),m=xt.getDerivedFromVars(bt.track_active_style),it(),it=l(m,(t=>R=t)),y=xt.getDerivedFromVars(bt.tick_mark_active_style),rt(),rt=l(y,(t=>N=t)),b=xt.getDerivedFromVars(bt.tick_mark_inactive_style),et(),et=l(b,(t=>T=t)),_=xt.getDerivedFromVars(bt.thumb_text_style),tt(),tt=l(_,(t=>M=t)),w=xt.getDerivedFromVars(bt.thumb_secondary_text_style),K(),K=l(w,(t=>O=t)),$=xt.getDerivedFromVars(bt.accessibility),Q(),Q=l($,(t=>S=t)),x=xt.getDerivedFromVars(bt.secondary_value_accessibility),X(),X=l(x,(t=>P=t)),jt=Nt(Y,jt),St=Nt(Z,St),Zt();{const t=xr(G||0,jt,St);t!==Ht&&(Ht=t)}{const t=xr(q||0,jt,St);t!==qt&&(qt=t)}Ot=_e(W,Mr,Ot),It=_e(U,Mr,Ot),Mt=_e(J,Tr,Mt),Tt=_e(R,Tr,Tt);{let t=_e(N,Mr,Ir);t!==Ir&&(zt=t)}zt?(At=a?zr(Math.min(Ht,qt),Math.max(Ht,qt)+1,jt,St,!0):zr(jt,Ht,jt,St,!0),Zt()):At=[];{let t=_e(T,Mr,Ir);t!==Ir&&(Bt=t)}Bt?(Vt=a?zr(Math.min(Ht,qt),Math.max(Ht,qt)+1,jt,St,!1):zr(Ht+1,St+1,jt,St,!0),Zt()):Vt=[],Dt=$r(M,Dt),Rt=$r(O,Dt),(null==S?void 0:S.description)?Jt=S.description:xt.logError(st(new Error('Missing accessibility "description" for slider'),{level:"warn"})),(null==P?void 0:P.description)?Ut=P.description:a&&xt.logError(st(new Error('Missing second accessibility "description" for slider'),{level:"warn"}));{let t=!1;kt.hasAction()?(xt.logError(st(new Error('Cannot show "slider" inside component with action'))),t=!0):Ot===Ir?(xt.logError(st(new Error('Missing "thumb_style" in slider'))),t=!0):Tt===Ir?(xt.logError(st(new Error('Missing "track_active_style" in slider'))),t=!0):Mt===Ir&&(xt.logError(st(new Error('Missing "track_inactive_style" in slider'))),t=!0),t!==Lt&&(Lt=t)}return k=dt(Math.max(...[Ot.width,It.width,0].filter(Pt))),E=dt(Math.max(...[Ot.height,It.height,0].filter(Pt))),C=(Ht-jt)/(St-jt),A=a?(qt-jt)/(St-jt):void 0,F=void 0!==A?Math.abs(A-C):C,V=void 0!==A?Math.min(A,C):0,D={"--divkit-slider-thumb-width":dt(Ot.width),"--divkit-slider-thumb-height":dt(Ot.height),"--divkit-slider-thumb-secondary-width":dt(It.width),"--divkit-slider-thumb-secondary-height":dt(It.height),"--divkit-slider-text-offset-x":(null===(ft=null==Dt?void 0:Dt.offset)||void 0===ft?void 0:ft.x)?pt(Dt.offset.x):void 0,"--divkit-slider-text-offset-y":(null===(ht=null==Dt?void 0:Dt.offset)||void 0===ht?void 0:ht.y)?pt(Dt.offset.y):void 0,"--divkit-slider-text-secondary-offset-x":(null===(mt=null==Rt?void 0:Rt.offset)||void 0===mt?void 0:mt.x)?pt(Rt.offset.x):void 0,"--divkit-slider-text-secondary-offset-y":(null===(yt=null==Rt?void 0:Rt.offset)||void 0===yt?void 0:yt.y)?pt(Rt.offset.y):void 0,"--divkit-slider-tick-active-width":zt?dt(zt.width):void 0,"--divkit-slider-tick-active-height":zt?dt(zt.height):void 0,"--divkit-slider-tick-active-border-radius":zt?dt(zt.borderRadius):void 0,"--divkit-slider-tick-active-background":(null==zt?void 0:zt.background)||void 0,"--divkit-slider-tick-active-box-shadow":(null==zt?void 0:zt.boxShadow)||void 0,"--divkit-slider-tick-inactive-width":Bt?dt(Bt.width):void 0,"--divkit-slider-tick-inactive-height":Bt?dt(Bt.height):void 0,"--divkit-slider-tick-inactive-border-radius":Bt?dt(Bt.borderRadius):void 0,"--divkit-slider-tick-inactive-background":(null==Bt?void 0:Bt.background)||void 0,"--divkit-slider-tick-inactive-box-shadow":(null==Bt?void 0:Bt.boxShadow)||void 0,"--divkit-slider-max-thumb-width":k,"--divkit-slider-max-thumb-height":E,"--divkit-slider-track-part":C,"--divkit-slider-track-secondary-part":A},j={},X(),Q(),K(),tt(),et(),rt(),it(),nt(),ot(),lt(),ct(),ut(),vt(),gt()," "+(Lt?"":`${B(ee,"Outer").$$render(t,{cls:Ft("slider",wr,j),style:D,customDescription:!0,customActions:"slider",hasInnerFocusable:!0,json:bt,origJson:wt,templateContext:_t,layoutParams:$t},{},{default:({focusHandler:t,blurHandler:e})=>{var r,i,n,o,s,l;return`<div${L("class",wr["slider__tracks-wrapper"],0)}><div${L("class",wr["slider__tracks-inner"],0)}${L("this",Ct,0)}><div${L("class",wr.slider__track,0)}${H({height:dt(Mt.height),"border-radius":dt(Mt.borderRadius),background:Mt.background,"box-shadow":Mt.boxShadow||""})}></div> <div${L("class",wr["slider__active-track"],0)}${H({left:(100*V).toFixed(2)+"%",width:(100*F).toFixed(2)+"%",height:dt(Tt.height),"border-radius":dt(Tt.borderRadius),background:Tt.background,"box-shadow":Tt.boxShadow||""})}></div> ${z(At,(t=>`<div class="${I(wr.slider__tick,!0)+" "+I(wr.slider__tick_active,!0)}"${H({"--divkit-slider-tick":t})}></div>`))} ${z(Vt,(t=>`<div class="${I(wr.slider__tick,!0)+" "+I(wr.slider__tick_inactive,!0)}"${H({"--divkit-slider-tick":t})}></div>`))} <div${L("class",wr.slider__thumb,0)}${H({"border-radius":dt(Ot.borderRadius),background:Ot.background,"box-shadow":Ot.boxShadow||""})}>${Dt?`<div${L("class",wr["slider__thumb-text"],0)}><div${L("class",wr["slider__thumb-text-inner"],0)}${H({"font-size":(null===(r=Dt)||void 0===r?void 0:r.fontSize)||"1em","font-weight":(null===(i=Dt)||void 0===i?void 0:i.fontWeight)||"",color:(null===(n=Dt)||void 0===n?void 0:n.textColor)||"#000"})}>${I(Ht)}</div></div>`:""}</div> ${a?`<div class="${I(wr.slider__thumb,!0)+" "+I(wr.slider__thumb_secondary,!0)}"${H({"border-radius":dt(It.borderRadius),background:It.background,"box-shadow":It.boxShadow||""})}>${Rt?`<div class="${I(wr["slider__thumb-text"],!0)+" "+I(wr["slider__thumb-text_secondary"],!0)}"><div${L("class",wr["slider__thumb-text-inner"],0)}${H({"font-size":(null===(o=Rt)||void 0===o?void 0:o.fontSize)||"1em","font-weight":(null===(s=Rt)||void 0===s?void 0:s.fontWeight)||"",color:(null===(l=Rt)||void 0===l?void 0:l.textColor)||"#000"})}>${I(qt)}</div></div>`:""}</div>`:""} <input type="range"${L("class",wr.slider__input,0)}${L("min",jt,0)}${L("max",St,0)} step="1"${L("value",Ht,0)}${L("aria-label",Jt,0)}${L("this",undefined,0)}> ${a?`<input type="range"${L("class",`${wr.slider__input} ${wr.slider__input_secondary}`,0)}${L("min",jt,0)}${L("max",St,0)} step="1"${L("value",qt,0)}${L("aria-label",Ut,0)}>`:""}</div></div>`}})}`)})),Br={input:"divkit-c3a4c","input_alignment-horizontal_center":"divkit-fc52a","input_alignment-horizontal_right":"divkit-e8038",input__input:"divkit-f11e0",input__placeholder:"divkit-b7593","input_alignment-vertical_top":"divkit-bdccd","input_alignment-vertical_bottom":"divkit-fc670","input_alignment-vertical_baseline":"divkit-dd6af","input_highlight-color":"divkit-cc00f",input__input_singleline:"divkit-ffd1e","input__scroll-wrapper":"divkit-ad8a3",input__input_multiline:"divkit-f61f0","input__input_has-custom-focus":"divkit-e6b50"};function Rr(t,e){if(t===e)return{start:t.length,added:0,removed:0};if(t.length>e.length){const r=Rr(e,t);return{start:r.start,added:r.removed,removed:r.added}}let r=0,i=e.length-1;const n=e.length-t.length;for(;r<i&&r<t.length&&t[r]===e[r];)++r;for(;i-n>=r&&t[i-n]===e[i];)--i;return++i,{start:r,added:i-r,removed:i-r-n}}function Jr(t,e,r){return e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Ur{constructor(t){this.char=t}}class Lr{constructor(t,e,r){this.char=t,this.filter=e,this.placeholder=r}}class Wr{constructor(t){Jr(this,"filters",new Map),Jr(this,"destructedValue",[]),Jr(this,"cursorPos",0),this.maskData=t,this.updateMaskData(t)}get cursorPosition(){return this.cursorPos}get rawValue(){return this.collectValueRange(0,this.destructedValue.length-1)}get value(){let t="";for(let e=0;e<this.destructedValue.length;++e){const r=this.destructedValue[e];if(r instanceof Ur)t+=r.char;else if(r instanceof Lr)if(r.char)t+=r.char;else{if(!this.maskData.alwaysVisible)break;t+=r.placeholder}}return t}firstEmptyHolderIndex(){const t=this.destructedValue.findIndex((t=>t instanceof Lr&&!t.char));return-1!==t?t:this.destructedValue.length}updateMaskData(t,e=!0){const r=this.maskData!==t&&e?this.rawValue:null;this.filters=new Map,this.maskData=t,this.maskData.decoding.forEach((t=>{if(t.filter)try{const e=new RegExp(t.filter);this.filters.set(t.key,e)}catch(e){this.onException(st(e,{level:"error",additional:{key:t.key}}))}})),this.destructedValue=this.maskData.pattern.split("").map((t=>{const e=this.maskData.decoding.find((e=>e.key===t));return e?new Lr(null,this.filters.get(e.key),e.placeholder):new Ur(t)})),null!==r&&this.overrideRawValue(r)}overrideRawValue(t){this.clearRange(0,this.destructedValue.length),this.replaceChars(t,0),this.cursorPos=Math.min(this.cursorPos,this.value.length)}applyChangeFrom(t,e){const r=Rr(this.value,t);void 0!==e&&(r.start=Math.max(0,e-r.added));const i=this.buildBodySubstring(r,t),n=this.buildTailSubstring(r);this.cleanup(r);const o=this.firstEmptyHolderIndex(),a=n?this.calculateMaxShift(n,o):void 0;this.replaceChars(i,o,a);const s=this.firstEmptyHolderIndex();this.replaceChars(n,s),this.calculateCursorPosition(r,s)}buildBodySubstring(t,e){return e.substring(t.start,t.start+t.added)}buildTailSubstring(t){return this.collectValueRange(t.start+t.removed,this.destructedValue.length-1)}calculateMaxShift(t,e){if(this.filters.size<=1){let r=0,i=e;for(;i<this.destructedValue.length;)this.destructedValue[i]instanceof Lr&&++r,++i;return Math.max(0,r-t.length)}const r=this.calculateInsertableSubstring(t,e);let i=0;for(;i<this.destructedValue.length&&r===this.calculateInsertableSubstring(t,e+i);)++i;return Math.max(0,i-1)}cleanup(t){if(0===t.added&&1===t.removed){let e=t.start;for(;e>=0;){const t=this.destructedValue[e];if(t instanceof Lr&&null!==t.char){t.char=null;break}--e}}this.clearRange(t.start,this.destructedValue.length)}clearRange(t,e){let r=t;for(;r<e&&r<this.destructedValue.length;){const t=this.destructedValue[r];t instanceof Lr&&(t.char=null),++r}}calculateCursorPosition(t,e){const r=this.firstEmptyHolderIndex();let i;i=t.start<r?Math.min(this.firstHolderAfter(e),this.value.length):r,this.cursorPos=i}calculateInsertableSubstring(t,e){let r="",i=e;const n=()=>{for(var t;i<this.destructedValue.length&&!(this.destructedValue[i]instanceof Lr);)++i;return null===(t=this.destructedValue[i])||void 0===t?void 0:t.filter};return t.split("").forEach((t=>{const e=n();null!=e&&e.test(t)&&(r+=t,++i)})),r}collectValueRange(t,e){let r="",i=t;for(;i<=e;){const t=this.destructedValue[i];t instanceof Lr&&null!==t.char&&(r+=t.char),++i}return r}replaceChars(t,e,r){let i=this.calculateInsertableSubstring(t,e);void 0!==r&&(i=i.substring(0,r));let n=e,o=0;for(;n<this.destructedValue.length&&o<i.length;){const t=this.destructedValue[n],e=i[o];t instanceof Lr&&(t.char=e,++o),++n}}firstHolderAfter(t){let e=t;for(;e<this.destructedValue.length&&!(this.destructedValue[e]instanceof Lr);)++e;return e}}class Hr extends Wr{constructor(t,e){super(t),this.logError=e}onException(t){this.logError(t)}}function qr(t,e,r){return e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Gr extends Wr{constructor(t=void 0,e){super({pattern:"",decoding:[],alwaysVisible:!1}),qr(this,"currencyFormatter",new Intl.NumberFormat),qr(this,"decimalSeparator","."),qr(this,"localeDigits",{}),qr(this,"trimZeroRegExp",new RegExp("")),this.logError=e,this.initFormatter(t)}updateCurrencyParams(t){const e=this.parseFormat(this.rawValue)||0;this.initFormatter(t);const r=e.toString().replace(".",this.decimalSeparator);this.applyChangeFrom(r)}initFormatter(t){try{this.currencyFormatter=new Intl.NumberFormat(t,{minimumFractionDigits:2,maximumFractionDigits:2}),this.decimalSeparator=this.currencyFormatter.format(0)[1],this.localeDigits=new Array(10).fill("").reduce(((t,e,r)=>(t[r]=this.currencyFormatter.format(r)[0],t)),{}),this.trimZeroRegExp=new RegExp(`^${this.localeDigits[0]}+`)}catch(e){this.onException(st(e,{level:"error",additional:{locale:t}}))}}invalidateMaskDataForFormatted(t){const e=this.currencyFormatter.format(t),r=this.formatPattern(e),i=[{key:"#",filter:`[${[...Object.values(this.localeDigits)].join("")}]`,placeholder:this.localeDigits[0]},{key:this.decimalSeparator,filter:`[${this.decimalSeparator}]`,placeholder:this.decimalSeparator}];this.updateMaskData({pattern:r,decoding:i,alwaysVisible:this.maskData.alwaysVisible},!1)}overrideRawValue(t){const e=this.parseFormat(t)||0;this.invalidateMaskDataForFormatted(e),super.overrideRawValue(t)}applyChangeFrom(t,e){const r=Rr(this.value,t),i=this.value.lastIndexOf(this.decimalSeparator),n=t.lastIndexOf(this.decimalSeparator),o=i!==n||-1===i&&-1===n,a=this.validFormat(t,r);this.cleanup(r);const s=this.parseFormat(a)||0;o&&this.invalidateMaskDataForFormatted(s),this.replaceChars(a,0),this.value.length>r.start&&!this.isDigit(this.value[r.start])?this.cursorPos=null!=e?e:this.cursorPosition:this.cursorPos=Math.abs(this.value.length-(t.length-(null!=e?e:this.cursorPosition)))}parseFormat(t){return parseFloat(t.replace(/./g,(t=>this.localeDigits[t]||(t===this.decimalSeparator?".":""))))}formatPattern(t){let e="";for(const r of t)e+=this.isDigit(r)?"#":r;return e}validFormat(t,e){if(!t)return"";let r=-1,i=0;for(;i<t.length;){if(t[i]===this.decimalSeparator&&!this.inDiff(e,i)){r=i;break}i++}let n=-1;1===e.added&&0===e.removed&&[",","."].includes(t[e.start])&&(n=e.start);const o=this.currencyFormatter.resolvedOptions().maximumFractionDigits;let a=o;if(-1!==r)for(i=r;i<t.length;)this.isDigit(t[i])&&!this.inDiff(e,i)&&a--,i++;else{let r=!1;for(let i=0;i<t.length;i++){const n=t[i];n===this.decimalSeparator?r=!0:!this.inDiff(e,i)&&r&&this.isDigit(n)&&a--}}const s=t.includes(this.decimalSeparator)||-1!==n,l=[];i=t.length-1;let c=!1;for(;i>=0;){const u=t[i],d=l.length<=o;this.isDigit(u)?this.inDiff(e,i)&&!c&&s?a>0&&(l.push(u),a--):l.push(u):d&&-1===r&&i===n?(l.push(this.decimalSeparator),c=!0):!d||u!==this.decimalSeparator||r!==i&&-1!==r||(l.push(this.decimalSeparator),c=!0,r=i),i--}return l.reverse().join("").replace(this.trimZeroRegExp,"")}inDiff(t,e){return t.start<=e&&e<t.start+t.added}isDigit(t){return Boolean(this.localeDigits[t])}onException(t){this.logError(t)}}function Zr(t){const e=t.textContent;let r=0;return"string"==typeof e&&(r+=e.length,t instanceof HTMLElement&&("DIV"===t.tagName||"BR"===t.tagName)&&++r),r}function Yr(t,e){if(3!==t.nodeType)if(t instanceof HTMLElement&&"BR"===t.tagName)try{const e=window.getSelection();if(e){e.removeAllRanges();const r=document.createRange(),i=t.parentNode,n=Array.from(i.childNodes).indexOf(t)+1;r.setStart(i,n),r.setEnd(i,n),e.addRange(r)}}catch(t){}else for(let r=0,i=t.childNodes.length;r<i;++r){const i=t.childNodes[r],n=Zr(i);if(e<=n)return void Yr(i,e);e-=n}else try{const r=window.getSelection();if(r){r.removeAllRanges();const i=document.createRange();i.setStart(t,e),i.setEnd(t,e),r.addRange(i)}}catch(t){}}const Xr="undefined"!=typeof document&&"inputMode"in document.createElement("input"),Qr={email:"email",number:"number",phone:"tel",single_line_text:"text",multi_line_text:"text",uri:"url"},Kr=U(((t,e,r,i)=>{let n,a,s,u,d,p,g,h,m,y,b,_,w,x,k,E,C,A,F,V,D,j,P,S,O,M,T,z,N,R,J,U,W,H,q,G,Z,Y,X,Q,K,tt,et,rt,it,nt,ot=o,lt=o,ct=o,vt=o,ft=o,ht=o,mt=o,yt=o,bt=o,_t=o,wt=o,$t=o,xt=o,kt=o,Et=o,Ct=o,At=o,Vt=o,Pt=o;var St;let{json:It={}}=e,{templateContext:Mt}=e,{origJson:Tt}=e,{layoutParams:zt}=e;const Nt=f(at);let Bt,Jt,Ut,Lt,Wt,Ht=null,qt="",Zt="",Yt=!1,Xt="",Qt=12,Kt="",te="",re="#000",ne="",ae="left",se="center",ue="multi_line_text",de="text",pe="",ve=null,ge="",fe="",he="";function me(t){Jt instanceof HTMLInputElement?Jt.selectionStart=Jt.selectionEnd=t:Yr(Jt,t)}async function ye(){if(!Jt||!Ht)return;Ht.overrideRawValue(N),u.set(Ht.rawValue),c(s,z=qt=Zt=Ht.value,z);const t=Ht.cursorPosition;await $(),document.activeElement===Jt&&me(t)}var be;v((()=>{Bt&&(Nt.unregisterFocusable(Bt),Bt=void 0)})),void 0===e.json&&r.json&&void 0!==It&&r.json(It),void 0===e.templateContext&&r.templateContext&&void 0!==Mt&&r.templateContext(Mt),void 0===e.origJson&&r.origJson&&void 0!==Tt&&r.origJson(Tt),void 0===e.layoutParams&&r.layoutParams&&void 0!==zt&&r.layoutParams(zt),It&&(Xt="",Qt=12,Ut=void 0,Kt="",Lt=void 0,re="#000",ne="",ae="left",se="center",ue="multi_line_text",de="text",Wt=void 0),n=It.text_variable,a=null===(St=It.mask)||void 0===St?void 0:St.raw_text_variable,s=n&&Nt.getVariable(n,"string")||Or("temp","string",""),ot(),ot=l(s,(t=>z=t)),u=a&&Nt.getVariable(a,"string")||Or("temp","string",""),lt(),lt=l(u,(t=>N=t)),d=Nt.getDerivedFromVars(It.hint_text),Vt(),Vt=l(d,(t=>it=t)),p=Nt.getDerivedFromVars(It.hint_color),At(),At=l(p,(t=>rt=t)),g=Nt.getDerivedFromVars(It.font_size),Ct(),Ct=l(g,(t=>et=t)),h=Nt.getDerivedFromVars(It.font_weight),Et(),Et=l(h,(t=>tt=t)),m=Nt.getDerivedFromVars(It.font_family),kt(),kt=l(m,(t=>K=t)),y=Nt.getDerivedFromVars(It.line_height),xt(),xt=l(y,(t=>Q=t)),b=Nt.getDerivedFromVars(It.letter_spacing),$t(),$t=l(b,(t=>X=t)),_=Nt.getDerivedFromVars(It.text_color),wt(),wt=l(_,(t=>Y=t)),w=Nt.getDerivedFromVars(It.highlight_color),_t(),_t=l(w,(t=>Z=t)),x=Nt.getDerivedFromVars(It.text_alignment_horizontal),bt(),bt=l(x,(t=>G=t)),k=Nt.getDerivedFromVars(It.text_alignment_vertical),yt(),yt=l(k,(t=>q=t)),E=Nt.getDerivedFromVars(It.keyboard_type),mt(),mt=l(E,(t=>H=t)),C=Nt.getDerivedFromVars(It.mask),ht(),ht=l(C,(t=>W=t)),A=Nt.getDerivedFromVars(It.max_visible_lines),ft(),ft=l(A,(t=>U=t)),F=Nt.getDerivedFromVars(It.paddings),vt(),vt=l(F,(t=>J=t)),V=Nt.getDerivedFromVars(It.accessibility),ct(),ct=l(V,(t=>R=t)),D=Nt.getDerivedFromVars(It.select_all_on_focus),Pt(),Pt=l(D,(t=>nt=t)),n?Yt=!1:(Yt=!0,Nt.logError(st(new Error('Missing "text_variable" in "input"')))),"fixed_length"===(null==(be=W)?void 0:be.type)?Ht=function(t,e,r){if("string"==typeof t.pattern&&Array.isArray(t.pattern_elements)&&t.pattern_elements.every((t=>t.key&&"string"==typeof t.key))){const i={pattern:t.pattern,alwaysVisible:Boolean(t.always_visible),decoding:t.pattern_elements.map((t=>({key:t.key,filter:t.regex&&"string"==typeof t.regex?t.regex:void 0,placeholder:t.placeholder&&"string"==typeof t.placeholder?t.placeholder:"_"})))};return r?(r.updateMaskData(i),r):new Hr(i,e)}return r||null}(be,Nt.logError,Ht):"currency"===(null==be?void 0:be.type)&&(Ht=function(t,e,r){return r?(r.updateCurrencyParams(t.locale),r):new Gr(t.locale,e)}(be,Nt.logError,Ht)),Ht&&ye(),Ht||qt===z||(qt=Zt=z),Ht&&Ht.rawValue!==N&&ye(),j=it,Xt=gt(rt,1,Xt),Qt=ie(et,Qt),Ut=oe(tt,Ut),Kt=K&&"string"==typeof K?Nt.typefaceProvider(K,{fontWeight:Ut||400}):"";{const t=Q;Gt(t)&&(Lt=t/Qt)}return jt(X)&&(te=dt(X)),re=gt(Y,1,re),ne=gt(Z,1,ne),ae=le(G,ae),se=ce(q,se),H&&H in Qr&&(de=Qr[H],ue=H),"currency"===(null==W?void 0:W.type)&&(de=Xr?"text":"tel",Wt="decimal"),P="multi_line_text"===ue,pe=Gt(U)?`calc(${U*(Lt||1.25)*(Qt/10)+"em"} + ${pt(Ot(null==J?void 0:J.top,0)+Ot(null==J?void 0:J.bottom,0))})`:"",ve=Rt(J||void 0,ve),ge=ve?Dt({top:(Number(ve.top)||0)/Qt*10,right:(Number(ve.right)||0)/Qt*10,bottom:(Number(ve.bottom)||0)/Qt*10,left:(Number(ve.left)||0)/Qt*10}):"",fe=ve?Dt({top:(Number(ve.top)||0)/Qt*10,bottom:(Number(ve.bottom)||0)/Qt*10}):"",(null==R?void 0:R.description)?he=R.description:Nt.logError(st(new Error('Missing accessibility "description" for input'),{level:"warn"})),S={"highlight-color":Boolean(ne),multiline:P,"alignment-horizontal":ae,"alignment-vertical":se},O={"--divkit-input-hint-color":Xt,"--divkit-input-highlight-color":ne,"--divkit-input-line-height":Lt,"font-weight":Ut,"font-family":Kt,"letter-spacing":te,color:re,"max-height":pe},M={"font-size":dt(Qt),padding:ge},T={"font-size":dt(Qt),padding:fe},Jt&&It&&(Bt&&(Nt.unregisterFocusable(Bt),Bt=void 0),It.id&&!(null==zt?void 0:zt.fakeElement)&&(Bt=It.id,Nt.registerFocusable(It.id,{focus(){Jt&&Jt.focus()}}))),ot(),lt(),ct(),vt(),ft(),ht(),mt(),yt(),bt(),_t(),wt(),$t(),xt(),kt(),Et(),Ct(),At(),Vt(),Pt(),Yt?"":`${B(ee,"Outer").$$render(t,{cls:Ft("input",Br,S),style:O,customDescription:!0,customActions:"input",customPaddings:!0,hasInnerFocusable:!0,json:It,origJson:Tt,templateContext:Mt,layoutParams:zt},{},{default:({focusHandler:t,blurHandler:e,hasCustomFocus:r})=>{return P?`<span${L("class",Br["input__scroll-wrapper"],0)}>${!Zt&&j?`<div${L("class",Br.input__placeholder,0)} aria-hidden="true"${L("style",ut(M),0)}>${I(j)}</div>`:""} <span aria-hidden="true"${L("style",ut(T),0)}></span> <span${L("class",Ft("input__input",Br,{"has-custom-focus":r,multiline:!0}),0)} autocapitalize="off" contenteditable="true"${L("aria-label",he,0)}${L("style",ut(M),0)}${L("this",Jt,0)}>${i=Zt,void 0===i?"":i}</span></span>`:`<input${L("type",de,0)}${L("inputmode",Wt,0)}${L("class",Ft("input__input",Br,{"has-custom-focus":r,singleline:!0}),0)} autocomplete="off" autocapitalize="off"${L("aria-label",he,0)}${L("style",ut(M),0)}${L("placeholder",j,0)}${L("value",qt,0)}${L("this",Jt,0)}>`;var i}})}`})),ti={select:"divkit-feef3","select__select-text":"divkit-cd862",select_hint:"divkit-a3cf6",select__select:"divkit-bdb72","select__select_has-custom-focused":"divkit-a46ad","has-custom-focused":"divkit-fc5dc",select__option:"divkit-e774b"},ei=U(((t,e,r,i)=>{let n,a,s,c,u,d,p,g,h,m,y,b,_,w,$,x,k,E,C,A,F,V,D,j,P,S,O,M,T,N=o,R=o,J=o,U=o,W=o,H=o,q=o,G=o,Z=o,Y=o,X=o,{json:Q={}}=e,{templateContext:K}=e,{origJson:tt}=e,{layoutParams:et}=e;const rt=f(at);let it,nt,ot,lt=!1,ct="",pt=null,vt="",ft="rgba(0,0,0,.45)",ht=12,mt="",yt="",bt="#000",_t="";v((()=>{it&&(rt.unregisterFocusable(it),it=void 0)})),void 0===e.json&&r.json&&void 0!==Q&&r.json(Q),void 0===e.templateContext&&r.templateContext&&void 0!==K&&r.templateContext(K),void 0===e.origJson&&r.origJson&&void 0!==tt&&r.origJson(tt),void 0===e.layoutParams&&r.layoutParams&&void 0!==et&&r.layoutParams(et),Q&&(pt=null,ft="rgba(0,0,0,.45)",ht=12,nt=void 0,mt="",ot=void 0,yt="",bt="#000",_t=""),n=Q.value_variable,a=Q.options,s=Array.isArray(a)&&a.filter((t=>"string"==typeof t.value))||[],c=n&&rt.getVariable(n,"string")||Or("temp","string",""),Y(),Y=l(c,(t=>M=t)),u=rt.getDerivedFromVars(Q.paddings),Z(),Z=l(u,(t=>O=t)),d=rt.getDerivedFromVars(Q.hint_text),X(),X=l(d,(t=>T=t)),p=rt.getDerivedFromVars(Q.hint_color),G(),G=l(p,(t=>S=t)),g=rt.getDerivedFromVars(Q.font_size),q(),q=l(g,(t=>P=t)),h=rt.getDerivedFromVars(Q.font_weight),H(),H=l(h,(t=>j=t)),m=rt.getDerivedFromVars(Q.font_family),W(),W=l(m,(t=>D=t)),y=rt.getDerivedFromVars(Q.line_height),U(),U=l(y,(t=>V=t)),b=rt.getDerivedFromVars(Q.letter_spacing),J(),J=l(b,(t=>F=t)),_=rt.getDerivedFromVars(Q.text_color),R(),R=l(_,(t=>A=t)),w=rt.getDerivedFromVars(Q.accessibility),N(),N=l(w,(t=>C=t)),Array.isArray(s)&&s.length||rt.logError(st(new Error('Empty selection "items" in "select"'))),n?lt=!1:(lt=!0,rt.logError(st(new Error('Missing "value_variable" in "select"'))));{const t=s.find((t=>t.value===M));t?ct="string"==typeof t.text?t.text:t.value:(ct="",M&&rt.logError(st(new Error('Value from the variable was not found in the selection items for "select"'))))}ht=ie(P,ht),pt=Rt(O||void 0,pt),vt=pt?Dt({top:(Number(pt.top)||0)/ht*10,right:(Number(pt.right)||0)/ht*10,bottom:(Number(pt.bottom)||0)/ht*10,left:(Number(pt.left)||0)/ht*10}):"",ft=gt(S,1,ft),nt=oe(j,nt),mt=D&&"string"==typeof D?rt.typefaceProvider(D,{fontWeight:nt||400}):"";{const t=V;Gt(t)&&(ot=t/ht)}return jt(F)&&(yt=dt(F/ht*10)),bt=gt(A,1,bt),(null==C?void 0:C.description)?_t=C.description:rt.logError(st(new Error('Missing accessibility "description" for select'),{level:"warn"})),$={hint:!ct},x={"--divkit-input-hint-color":ft,"font-weight":nt,"font-family":mt,color:bt},k={padding:vt,"font-size":dt(ht),"line-height":ot,"letter-spacing":yt},E={"font-size":dt(ht),"line-height":ot,"letter-spacing":yt},N(),R(),J(),U(),W(),H(),q(),G(),Z(),Y(),X(),lt?"":`${B(ee,"Outer").$$render(t,{cls:Ft("select",ti,$),style:x,customDescription:!0,customActions:"select",customPaddings:!0,hasInnerFocusable:!0,json:Q,origJson:tt,templateContext:K,layoutParams:et},{},{default:({hasCustomFocus:t,focusHandler:e,blurHandler:r})=>`<span${L("class",ti["select__select-text"],0)}${L("style",ut(k),0)} aria-hidden="true"> ${I(ct||T||"")}</span> <select${L("class",Ft("select__select",ti,{"has-custom-focus":t}),0)}${L("aria-label",_t,0)}${L("style",ut(E),0)}${L("this",undefined,0)}>${z(s,(t=>`<option${L("class",ti.select__option,0)}${L("value",t.value,0)}>${I(t.text||t.value)}</option>`))}</select>`})}`})),ri={video__video:"divkit-c11f9","video__aspect-wrapper":"divkit-cfe32",video_aspect:"divkit-a4f5c"},ii=U(((t,e,r,i)=>{let n,a,s,c,u,d,p,g,h,m,y,b,_,w,$,x,k,E,C=o,A=o,F=o,V=o,D=o,j=o,P=o,{json:S={}}=e,{templateContext:O}=e,{origJson:I}=e,{layoutParams:M}=e;const T=f(at);let N,R,J,U,W=!1,q=!1,G=[],Z=!1,Y=!1,X=!1,Q="fit",K="0";function tt(){const t=null==R?void 0:R.play();t&&t.catch((t=>{T.logError(st(new Error("Video playing error"),{level:"error",additional:{originalText:String(t)}}))}))}var et,rt;v((()=>{N&&(T.unregisterInstance(N),N=void 0),U&&(U(),U=void 0)})),void 0===e.json&&r.json&&void 0!==S&&r.json(S),void 0===e.templateContext&&r.templateContext&&void 0!==O&&r.templateContext(O),void 0===e.origJson&&r.origJson&&void 0!==I&&r.origJson(I),void 0===e.layoutParams&&r.layoutParams&&void 0!==M&&r.layoutParams(M),S&&(Z=!1,Y=!1,X=!1,J=void 0,Q="fit"),n=S.elapsed_time_variable,a=n&&T.getVariable(n,"integer")||Or("temp","integer",0),a&&(U&&U(),U=a.subscribe((function(t){q?q=!1:R&&(R.currentTime=Number(t)/1e3)}))),s=T.getDerivedFromVars(S.video_sources),P(),P=l(s,(t=>E=t)),c=T.getDerivedFromVars(S.repeatable),j(),j=l(c,(t=>k=t)),u=T.getDerivedFromVars(S.autostart),C(),C=l(u,(t=>b=t)),d=T.getDerivedFromVars(S.muted),D(),D=l(d,(t=>x=t)),p=T.getDerivedFromVars(S.preview),V(),V=l(p,(t=>$=t)),g=T.getDerivedFromVars(S.scale),F(),F=l(g,(t=>w=t)),h=T.getDerivedFromVars(S.aspect),A(),A=l(h,(t=>_=t)),et=E,rt=G,G=Array.isArray(et)&&et.length?et.filter((t=>"video_source"===(null==t?void 0:t.type)&&"string"==typeof t.url&&"string"==typeof t.mime_type)).map((t=>{const e={src:t.url};return t.mime_type&&(e.type=t.mime_type),e})):rt,G.length?W=!1:(W=!0,T.logError(st(new Error('Missing "video_sources" in "video"')))),Z=ue(k,Z),Y=ue(b,Y),X=ue(x,X),J="string"==typeof $?Te($):J,Q=function(t){return"fill"===t?"cover":"no_scale"===t?"none":"contain"}(w)||Q;{const t=null==_?void 0:_.ratio;K=t&&Gt(t)?(100/Number(t)).toFixed(2):"0"}return S&&(N&&(T.unregisterInstance(N),N=void 0),!S.id||W||(null==M?void 0:M.fakeElement)||(N=S.id,T.registerInstance(S.id,{pause:function(){null==R||R.pause()},start:tt}))),S&&b&&R&&tt(),m={aspect:"0"!==K},y={"object-fit":Q},C(),A(),F(),V(),D(),j(),P(),W?"":`${B(ee,"Outer").$$render(t,{cls:Ft("video",ri,m),customActions:"video",json:S,origJson:I,templateContext:O,layoutParams:M},{},{default:()=>m.aspect?`<div${L("class",ri["video__aspect-wrapper"],0)}${H({"padding-bottom":`${K}%`})}><video${L("class",ri.video__video,0)}${L("style",ut(y),0)} playsinline ${Z?"loop":""} ${Y?"autoplay":""} ${X?"muted":""}${L("poster",J,0)}${L("this",R,0)}>${z(G,(t=>`<source${L("src",t.src,0)}${L("type",t.type,0)}>`))}</video></div>`:`<video${L("class",ri.video__video,0)}${L("style",ut(y),0)} playsinline ${Z?"loop":""} ${Y?"autoplay":""} ${X?"muted":""}${L("poster",J,0)}${L("this",R,0)}>${z(G,(t=>`<source${L("src",t.src,0)}${L("type",t.type,0)}>`))}</video>`})}`})),ni=ii,oi=U(((t,e,r,i)=>{let n,o,a;var s;let{json:l={}}=e,{templateContext:c}=e,{origJson:u}=e,{layoutParams:d}=e;const p=f(at);let v=null,g="",h={},m=!1;if(void 0===e.json&&r.json&&void 0!==l&&r.json(l),void 0===e.templateContext&&r.templateContext&&void 0!==c&&r.templateContext(c),void 0===e.origJson&&r.origJson&&void 0!==u&&r.origJson(u),void 0===e.layoutParams&&r.layoutParams&&void 0!==d&&r.layoutParams(d),"string"==typeof l.custom_type&&l.custom_type&&(null===(s=p.customComponents)||void 0===s?void 0:s.has(l.custom_type))){if(v=p.customComponents.get(l.custom_type),"function"==typeof v.template){const t=p.getExtensionContext(),e=new Map;for(const[r,i]of t.variables)e.set(r,i.getValue());g=v.template({props:l.custom_props,variables:e})}else g=v.template&&"string"==typeof v.template?v.template:"";h={shadowrootmode:v.shadowRootMode||"open"}}else v=null,g=";",p.logError(st(new Error('Unknown or incorrect "custom_type" prop for div "custom"')));return n=l.items,void 0===n||Array.isArray(n)?m=!1:(m=!0,p.logError(st(new Error('Incorrect "items" prop for div "custom"')))),o=(!m&&n||[]).map((t=>{let e=t,r=c;return({templateContext:r,json:e}=p.processTemplate(e,r)),{json:e,templateContext:r,origJson:t}})),a={fakeElement:null==d?void 0:d.fakeElement},v?`${B(ee,"Outer").$$render(t,{json:l,origJson:u,templateContext:c,layoutParams:d},{},{default:()=>{return(e=v.element)?`<${v.element}${P([T(l.custom_props||{})],{})}${L("this",undefined,0)}>${D(e)?"":`${g?`<template${P([T(h)],{})}> ${g}</template>`:""} ${!m&&n?`${z(o,(e=>`${B(si,"Unknown").$$render(t,{layoutParams:a,div:e.json,templateContext:e.templateContext,origJson:e.origJson},{},{})}`))}`:""}`}${D(e)?"":`</${e}>`}`:"";var e}})}`:""})),ai={};ai.text=ve,ai.container=Pe,ai.separator=Ie,ai.image=Ne,ai.gif=Ne,ai.grid=We,ai.gallery=tr,ai.tabs=ir,ai.state=vr,ai.pager=hr,ai.indicator=_r,ai.slider=Nr,ai.input=Kr,ai.select=ei,ai.video=ni,ai.custom=oi;const si=U(((t,e,r,i)=>{let{div:n}=e,{templateContext:o}=e,{origJson:a}=e,{layoutParams:s}=e;const l=f(at);let c,u,d;if(void 0===e.div&&r.div&&void 0!==n&&r.div(n),void 0===e.templateContext&&r.templateContext&&void 0!==o&&r.templateContext(o),void 0===e.origJson&&r.origJson&&void 0!==a&&r.origJson(a),void 0===e.layoutParams&&r.layoutParams&&void 0!==s&&r.layoutParams(s),c=n,u=o,d=c&&ai[c.type]||void 0,!d&&(({templateContext:u,json:c}=l.processTemplate(c,u)),d=c&&ai[c.type]||void 0,!d)){let t;t=(null==c?void 0:c.type)&&l.hasTemplate(c.type)?"Recursive template":"Unknown component",l.logError(st(new Error(t),{additional:{component:(null==c?void 0:c.type)||"<missing>"}}))}return d?`${B(d||N,"svelte:component").$$render(t,{json:c,templateContext:u,layoutParams:s,origJson:a||n},{},{})}`:""})),li=U(((t,e,r,i)=>{let{svgFiltersMap:n}=e;return void 0===e.svgFiltersMap&&r.svgFiltersMap&&void 0!==n&&r.svgFiltersMap(n),Object.keys(n).length?`<svg${L("class","divkit-dc22b",0)} aria-hidden="true"><defs>${z([...Object.keys(n)],(t=>{let[e,r]=t.split(":");return` <filter${L("id",n[t],0)}><feFlood${L("flood-color",e,0)}></feFlood>${"source_in"===r||"source_atop"===r?`<feComposite in2="SourceGraphic"${L("operator",r.split("_")[1],0)}></feComposite>`:"multiply"===r?'<feComposite in2="SourceGraphic" operator="arithmetic" k1="1" k2="0" k3="0" k4="0"></feComposite>':`<feBlend in2="SourceGraphic"${L("mode",r,0)}></feBlend>`}</filter>`}))}</defs></svg>`:""}));function ci(t,e,r,i){const n=r[t.type];if(!n)return i(st(new Error("No such template"),{additional:{template:t.type}})),{json:t,templateContext:e};let o;const a={};for(o in e)e.hasOwnProperty(o)&&(a[o]=e[o]);for(o in t)"type"!==o&&"__proto__"!==o&&t.hasOwnProperty(o)&&(a[o]=t[o]);const s=function t(e,r){const i=Object.keys(r).filter((t=>"__proto__"!==t)),n=i.filter((t=>"$"!==t.charAt(0))),o=i.filter((t=>"$"===t.charAt(0)));return n.forEach((i=>{const n=r[i];"object"==typeof n&&null!==n?(e[i]=Array.isArray(n)?[]:{},t(e[i],n)):e[i]=n})),o.forEach((t=>{const i=r[t],n=a[i];if(void 0!==n){const r=t.substring(1);e[r]=n}})),e}({},n);for(o in t)"type"!==o&&"__proto__"!==o&&t.hasOwnProperty(o)&&(s[o]=t[o]);return{json:s,templateContext:a}}function ui(){}function di(t){return{subscribe:e=>(e(t),ui)}}function pi(t,e){return e.reduce(((t,e)=>({type:"BinaryExpression",operator:e[1],left:t,right:e[3]})),t)}function vi(t,e){return e.reduce(((t,e)=>({type:"LogicalExpression",operator:e[1],left:t,right:e[3]})),t)}function gi(t){if(t.every((t=>"string"==typeof t)))return{type:"StringLiteral",value:t.join("")};let e=t.reduce(((t,e)=>("string"==typeof e&&"string"==typeof t[t.length-1]?t[t.length-1]+=e:t.push(e),t)),[]).reduce(((t,e)=>("string"==typeof e?t.quasis.push({type:"StringLiteral",value:e}):(t.quasis.length===t.expressions.length&&t.quasis.push({type:"StringLiteral",value:""}),t.expressions.push(e)),t)),{type:"TemplateLiteral",quasis:[],expressions:[]});return e.quasis.length===e.expressions.length&&e.quasis.push({type:"StringLiteral",value:""}),e}function fi(t){try{return Fr(t)}catch(e){throw new Error(`Value ${t} can't be converted to Integer type.`)}}function hi(t){if("'"===t||"\\"===t)return t;throw new Error("Incorrect string escape")}function mi(t,e,r,i){var n=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(n,mi.prototype),n.expected=e,n.found=r,n.location=i,n.name="SyntaxError",n}function yi(t,e,r){return r=r||" ",t.length>e?t:(e-=t.length,t+(r+=r.repeat(e)).slice(0,e))}di(void 0),function(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}(mi,Error),mi.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var r,i=null;for(r=0;r<t.length;r++)if(t[r].source===this.location.source){i=t[r].text.split(/\r\n|\n|\r/g);break}var n=this.location.start,o=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(n):n,a=this.location.source+":"+o.line+":"+o.column;if(i){var s=this.location.end,l=yi("",o.line.toString().length," "),c=i[n.line-1],u=(n.line===s.line?s.column:c.length+1)-n.column||1;e+="\n --\x3e "+a+"\n"+l+" |\n"+o.line+" | "+c+"\n"+l+" | "+yi("",n.column-1," ")+yi("",u,"^")}else e+="\n at "+a}return e},mi.buildMessage=function(t,e){var r={literal:function(t){return'"'+n(t.text)+'"'},class:function(t){var e=t.parts.map((function(t){return Array.isArray(t)?o(t[0])+"-"+o(t[1]):o(t)}));return"["+(t.inverted?"^":"")+e.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(t){return t.description}};function i(t){return t.charCodeAt(0).toString(16).toUpperCase()}function n(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(t){return"\\x0"+i(t)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(t){return"\\x"+i(t)}))}function o(t){return t.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(t){return"\\x0"+i(t)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(t){return"\\x"+i(t)}))}function a(t){return r[t.type](t)}return"Expected "+function(t){var e,r,i=t.map(a);if(i.sort(),i.length>0){for(e=1,r=1;e<i.length;e++)i[e-1]!==i[e]&&(i[r]=i[e],r++);i.length=r}switch(i.length){case 1:return i[0];case 2:return i[0]+" or "+i[1];default:return i.slice(0,-1).join(", ")+", or "+i[i.length-1]}}(t)+" but "+function(t){return t?'"'+n(t)+'"':"end of input"}(e)+" found."};const bi=new Map,_i=new Map;function wi(t,e,r){const i={args:e,cb:r},n=bi.get(t)||[];bi.has(t)||bi.set(t,n),n.push(i);const o=t+":"+e.map((t=>"object"==typeof t?t.type:t)).join("#");_i.set(o,i)}function $i(t,e){let r=t.args.length,i=t.args.length;const n=t.args[t.args.length-1];if("object"==typeof n&&n.isVararg&&(--r,i=1/0),e.length<r)return{type:"few",expected:r,found:e.length};if(e.length>i)return{type:"many",expected:i,found:e.length};for(let r=0;r<e.length;++r){let i=r>=t.args.length?t.args[t.args.length-1]:t.args[r];if("object"!=typeof i&&(i={type:i}),i.type!==e[r].type)return{type:"mismatch",expected:i.type,found:e[r].type}}return{type:"match"}}function xi(t,e){var r;switch(null===(r=e[t.type])||void 0===r||r.call(e,t),t.type){case"TemplateLiteral":t.expressions.forEach((t=>{xi(t,e)}));break;case"BinaryExpression":case"LogicalExpression":xi(t.left,e),xi(t.right,e);break;case"UnaryExpression":xi(t.argument,e);break;case"ConditionalExpression":xi(t.test,e),xi(t.consequent,e),xi(t.alternate,e);break;case"TryExpression":xi(t.test,e),xi(t.alternate,e);break;case"CallExpression":t.arguments.forEach((t=>{xi(t,e)}))}}function ki(t){return"url"===t.type||"color"===t.type?{type:"string",value:t.value}:t}function Ei(t){return t.toISOString().replace("T"," ").replace(/\.\d{3}Z$/,"")}function Ci(t){if("string"===t.type)return t.value;if("integer"===t.type)return String(t.value);if("number"===t.type){let e=String(t.value);return e.includes(".")||(e.includes("e")?e=e.replace("e",".0e"):e+=".0"),e=e.replace(/e\+?/i,"E"),e}if("boolean"===t.type)return t.value?"true":"false";if("datetime"===t.type)return Ei(t.value);if("color"===t.type)return Oi(Si(t.value));if("url"===t.type)return t.value;if("dict"===t.type)return"<dict>";if("array"===t.type)return"<array>";throw new Error(`Unexpected type ${t.type}`)}function Ai(t){let e=Ci(t);return"string"===t.type&&(e="'"+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")+"'"),e}function Fi(t){return"datetime"===t?"DateTime":t.charAt(0).toUpperCase()+t.substring(1)}function Vi(t,e){if(kr)return Fr(e);if(e<0){const t=-Math.floor(-e);return 0===t?0:t}return Math.floor(e)}function Di(t,e){if(e<Ar||e>Cr)throw new Error("Integer overflow.");!kr&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)&&(t.safeIntegerOverflow=!0)}function ji(t){const e=[];return xi(t,{Variable(t){e.push(t.id.name)}}),e}function Pi(t,e){throw new Error(`Failed to evaluate [${t}]. ${e}`)}function Si(t){const e=ft(t);if(e)return e;throw new Error("Unable to convert value to Color, expected format #AARRGGBB.")}function Oi(t){return`#${[t.a,t.r,t.g,t.b].map((t=>{if(t<0||t>255)throw new Error("Value out of range 0..1.");return vt(Math.round(t).toString(16),2)})).join("").toUpperCase()}`}function Ii(t){return Oi(Si(t))}const Mi=Number.MAX_VALUE,Ti=Number.MIN_VALUE,zi="string",Ni="integer",Bi="number",Ri="boolean",Ji="color",Ui="url",Li="datetime",Wi="dict",Hi="array";function qi(t,e){return{type:zi,value:Ci(e)}}function Gi(t,e){const r=Number(e.value);if(isNaN(r)||!Number.isFinite(r))throw new Error("Unable to convert value to Number.");return{type:Bi,value:r}}function Zi(t,e,r,i){const n=t.variables.get(e.value);let o;return o=n&&n.getType()===i?n.getValue():r.value,"color"===i&&(o=Ii(o)),{type:i,value:o}}function Yi(t,e,r){return Zi(t,e,r,r.type)}function Xi(t,e,r){return Zi(t,e,r,"color")}function Qi(t,e,r){return Zi(t,e,r,"url")}const Ki=t=>(e,r)=>{let i=new Date(r.value.getTime())[t]();return"getUTCMonth"===t?++i:"getUTCDay"===t&&0===i&&(i=7),{type:Ni,value:Fr(i)}},tn=Ki("getUTCFullYear"),en=Ki("getUTCMonth"),rn=Ki("getUTCDate"),nn=Ki("getUTCDay"),on=Ki("getUTCHours"),an=Ki("getUTCMinutes"),sn=Ki("getUTCSeconds"),ln=Ki("getUTCMilliseconds");function cn(t,e,r,i){if(!i.value.length)return t.warnings.push(st(new Error("String for padding is empty."),{level:"warn"})),"";let n="";const o=e.type===zi?e.value:Ci(e);for(;n.length+o.length<r.value;)n+=i.value;return n.length>0&&n.length+o.length>r.value&&(n=n.substring(0,Number(r.value)-Number(o.length))),n}function un(t,e,r,i){const n=cn(t,e,r,i);return{type:zi,value:n+Ci(e)}}function dn(t,e,r,i){const n=cn(t,e,r,i);return{type:zi,value:Ci(e)+n}}function pn(t){return(e,r)=>{const i=Si(r.value);return{type:Bi,value:i[t]/255}}}function vn(t){return(e,r,i)=>{const n=Si(r.value);return n[t]=255*i.value,{type:Ji,value:Oi(n)}}}const gn=pn("a"),fn=pn("r"),hn=pn("g"),mn=pn("b"),yn=vn("a"),bn=vn("r"),_n=vn("g"),wn=vn("b");function $n(t,e,r,i){if(e.value<0)throw new Error("Expecting non-negative number of milliseconds.");let n=Fr(e.value)/Fr(r);return Di(t,n),"number"==typeof n&&(n=Math.floor(n)),i&&(n=Fr(n)%Fr(i)),{type:Ni,value:n}}const xn=36e5;function kn(t,e){return(r,i,...n)=>{let o=function(t,e){let r=t;for(let t=0;t<e.length;++t){if(!r)throw new Error(`Missing property "${e[t]}" in the dict.`);const i=r[e[t]];if(void 0===i)throw new Error(`Missing property "${e[t]}" in the dict.`);r=i}return r}(i.value,n.map((t=>t.value))),a=typeof o;if(a!==t)throw"object"===a&&(a=Array.isArray(o)?"array":null===o?"null":"dict"),new Error(`Incorrect value type: expected "${e}", got "${a}".`);if("number"===t&&"integer"===e){if(o!==Math.round(o))throw new Error("Cannot convert value to integer.");Di(r,o),o=Fr(o)}return"string"===t&&"color"===e&&(o=Ii(o)),{type:e,value:o}}}function En(t,e){return(r,i,n,...o)=>{try{return t(r,n,...o)}catch(t){let r=i.value;return"color"===e&&(r=Ii(r)),{type:e,value:r}}}}const Cn=kn("string","string"),An=kn("number","number"),Fn=kn("number","integer"),Vn=kn("boolean","boolean"),Dn=kn("string","color"),jn=kn("string","url"),Pn=En(Cn,"string"),Sn=En(An,"number"),On=En(Fn,"integer"),In=En(Vn,"boolean"),Mn=En(Dn,"color"),Tn=En(jn,"url");function zn(t,e){return(r,i,n)=>{if(n.value<0||n.value>=i.value.length)throw new Error(`Requested index (${n.value}) out of bounds array size (${i.value.length}).`);let o=i.value[Number(n.value)],a=typeof o;if("array"===t&&!Array.isArray(o)||"array"!==t&&a!==t||"object"===a&&null===o)throw"object"===a&&(a=Array.isArray(o)?"array":null===o?"null":"dict"),new Error(`Incorrect value type: expected "${e}", got "${a}".`);if("number"===t&&"integer"===e){if(o!==Math.round(o))throw new Error("Cannot convert value to integer.");Di(r,o),o=Fr(o)}return"string"===t&&"color"===e&&(o=Ii(o)),{type:e,value:o}}}function Nn(t,e){return(r,i,n,o)=>{try{return t(r,i,n)}catch(t){let r=o.value;return"color"===e&&(r=Ii(r)),{type:e,value:r}}}}const Bn=zn("string","string"),Rn=zn("number","number"),Jn=zn("number","integer"),Un=zn("boolean","boolean"),Ln=zn("string","color"),Wn=zn("string","url"),Hn=zn("array","array"),qn=zn("object","dict"),Gn=Nn(Bn,"string"),Zn=Nn(Rn,"number"),Yn=Nn(Jn,"integer"),Xn=Nn(Un,"boolean"),Qn=Nn(Ln,"color"),Kn=Nn(Wn,"url");function to(t){return t.map(Ai).join(", ")}wi("toString",[Ni],qi),wi("toString",[Bi],qi),wi("toString",[Ri],qi),wi("toString",[Ji],qi),wi("toString",[Ui],qi),wi("toNumber",[Ni],Gi),wi("toNumber",[zi],Gi),wi("toInteger",[Bi],(function(t,e){if(e.value>Cr||e.value<Ar)throw new Error("Unable to convert value to Integer.");const r=e.value-e.value%1;return{type:Ni,value:Fr(r)}})),wi("toInteger",[zi],(function(t,e){let r;try{r=Fr(e.value)}catch(t){throw new Error("Unable to convert value to Integer.")}if("number"==typeof r&&(isNaN(r)||r%1!=0)||r>Cr||r<Ar)throw new Error("Unable to convert value to Integer.");return{type:Ni,value:r}})),wi("toInteger",[Ri],(function(t,e){return{type:Ni,value:Fr(e.value?1:0)}})),wi("toBoolean",[Ni],(function(t,e){const r=Number(e.value);if(1!==r&&0!==r)throw new Error("Unable to convert value to Boolean.");return{type:Ri,value:r}})),wi("toBoolean",[zi],(function(t,e){if("true"!==e.value&&"false"!==e.value)throw new Error("Unable to convert value to Boolean.");return{type:Ri,value:"true"===e.value?1:0}})),wi("toColor",[zi],(function(t,e){return{type:Ji,value:Ii(e.value)}})),wi("toUrl",[zi],(function(t,e){return{type:Ui,value:e.value}})),wi("encodeUri",[zi],(function(t,e){try{return{type:zi,value:encodeURIComponent(e.value)}}catch(t){throw new Error("Unable to encodeUri string.")}})),wi("decodeUri",[zi],(function(t,e){try{return{type:zi,value:decodeURIComponent(e.value)}}catch(t){throw new Error("Unable to decodeUri string.")}})),wi("getIntegerValue",[zi,Ni],Yi),wi("getNumberValue",[zi,Bi],Yi),wi("getBooleanValue",[zi,Ri],Yi),wi("getStringValue",[zi,zi],Yi),wi("getColorValue",[zi,Ji],Xi),wi("getColorValue",[zi,zi],Xi),wi("getUrlValue",[zi,Ui],Qi),wi("getUrlValue",[zi,zi],Qi),wi("parseUnixTime",[Ni],(function(t,e){return{type:Li,value:new Date(1e3*Number(e.value))}})),wi("nowLocal",[],(function(){return{type:Li,value:new Date}})),wi("addMillis",[Li,Ni],(function(t,e,r){return{type:Li,value:new Date(e.value.getTime()+Number(r.value))}})),wi("setYear",[Li,Ni],(function(t,e,r){const i=new Date(e.value);return i.setUTCFullYear(Number(r.value)),{type:Li,value:i}})),wi("setMonth",[Li,Ni],(function(t,e,r){const i=Number(r.value);if(i<1||i>12)throw new Error(`Expecting month in [1..12], instead got ${i}.`);const n=new Date(e.value);return n.setUTCMonth(i-1),{type:Li,value:n}})),wi("setDay",[Li,Ni],(function(t,e,r){const i=new Date(e.value),n=Number(r.value);if(n<=0&&-1!==n||n>function(t){const e=new Date(t);return e.setUTCMonth(e.getUTCMonth()+1),e.setUTCDate(0),e.getUTCDate()}(i))throw new Error(`Unable to set day ${n} for date ${Ci(e)}.`);return i.setUTCDate(-1===n?0:n),{type:Li,value:i}})),wi("setHours",[Li,Ni],(function(t,e,r){const i=Number(r.value);if(i<0||i>23)throw new Error(`Expecting hours in [0..23], instead got ${i}.`);const n=new Date(e.value);return n.setUTCHours(i),{type:Li,value:n}})),wi("setMinutes",[Li,Ni],(function(t,e,r){const i=Number(r.value);if(i<0||i>59)throw new Error(`Expecting minutes in [0..59], instead got ${i}.`);const n=new Date(e.value);return n.setUTCMinutes(i),{type:Li,value:n}})),wi("setSeconds",[Li,Ni],(function(t,e,r){const i=Number(r.value);if(i<0||i>59)throw new Error(`Expecting seconds in [0..59], instead got ${i}.`);const n=new Date(e.value);return n.setUTCSeconds(i),{type:Li,value:n}})),wi("setMillis",[Li,Ni],(function(t,e,r){const i=Number(r.value);if(i<0||i>999)throw new Error(`Expecting millis in [0..999], instead got ${i}.`);const n=new Date(e.value);return n.setUTCMilliseconds(i),{type:Li,value:n}})),wi("getYear",[Li],tn),wi("getMonth",[Li],en),wi("getDay",[Li],rn),wi("getDayOfWeek",[Li],nn),wi("getHours",[Li],on),wi("getMinutes",[Li],an),wi("getSeconds",[Li],sn),wi("getMillis",[Li],ln),wi("getIntervalSeconds",[Ni],(function(t,e){return $n(t,e,1e3,60)})),wi("getIntervalTotalSeconds",[Ni],(function(t,e){return $n(t,e,1e3)})),wi("getIntervalMinutes",[Ni],(function(t,e){return $n(t,e,6e4,60)})),wi("getIntervalTotalMinutes",[Ni],(function(t,e){return $n(t,e,6e4)})),wi("getIntervalHours",[Ni],(function(t,e){return $n(t,e,xn,24)})),wi("getIntervalTotalHours",[Ni],(function(t,e){return $n(t,e,xn)})),wi("getIntervalTotalDays",[Ni],(function(t,e){return $n(t,e,864e5)})),wi("getIntervalTotalWeeks",[Ni],(function(t,e){return $n(t,e,6048e5)})),wi("len",[zi],(function(t,e){return{type:Ni,value:Fr(e.value.length)}})),wi("contains",[zi,zi],(function(t,e,r){return{type:Ri,value:e.value.includes(r.value)?1:0}})),wi("substring",[zi,Ni,Ni],(function(t,e,r,i){if(i.value<r.value)throw new Error("Indexes should be in ascending order.");if(r.value<0||r.value>e.value.length||i.value<0||i.value>e.value.length)throw new Error("Indexes are out of bounds.");return{type:zi,value:e.value.substring(Number(r.value),Number(i.value))}})),wi("replaceAll",[zi,zi,zi],(function(t,e,r,i){let n;return n=r.value?e.value.replace(new RegExp(function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}(r.value),"g"),i.value):e.value,{type:zi,value:n}})),wi("index",[zi,zi],(function(t,e,r){return{type:Ni,value:Fr(e.value.indexOf(r.value))}})),wi("lastIndex",[zi,zi],(function(t,e,r){return{type:Ni,value:Fr(e.value.lastIndexOf(r.value))}})),wi("trim",[zi],(function(t,e){return{type:zi,value:e.value.trim()}})),wi("trimLeft",[zi],(function(t,e){return{type:zi,value:e.value.replace(/^\s+/,"")}})),wi("trimRight",[zi],(function(t,e){return{type:zi,value:e.value.replace(/\s+$/,"")}})),wi("toUpperCase",[zi],(function(t,e){return{type:zi,value:e.value.toUpperCase()}})),wi("toLowerCase",[zi],(function(t,e){return{type:zi,value:e.value.toLowerCase()}})),wi("padStart",[zi,Ni,zi],un),wi("padStart",[Ni,Ni,zi],un),wi("padEnd",[zi,Ni,zi],dn),wi("padEnd",[Ni,Ni,zi],dn),wi("testRegex",[zi,zi],(function(t,e,r){let i;try{i=new RegExp(r.value)}catch(t){throw new Error("Invalid regular expression.")}return{type:Ri,value:i.test(e.value)?1:0}})),wi("div",[Ni,Ni],(function(t,e,r){if(r.value===Vr)throw new Error("Division by zero is not supported.");let i=e.value/r.value;return i=Vi(0,i),Di(t,i),{type:Ni,value:i}})),wi("div",[Bi,Bi],(function(t,e,r){if(0===r.value)throw new Error("Division by zero is not supported.");const i=e.value/r.value;return{type:Bi,value:i}})),wi("mod",[Ni,Ni],(function(t,e,r){if(r.value===Vr)throw new Error("Division by zero is not supported.");let i=e.value%r.value;return i=Vi(0,i),Di(t,i),{type:Ni,value:i}})),wi("mod",[Bi,Bi],(function(t,e,r){if(0===r.value)throw new Error("Division by zero is not supported.");const i=e.value%r.value;return{type:Bi,value:i}})),wi("mul",[{type:Ni,isVararg:!0}],(function(t,...e){let r=e.length?e[0].value:Vr;for(let i=1;i<e.length;++i)r*=e[i].value,r=Vi(0,r),Di(t,r);return{type:Ni,value:r}})),wi("mul",[{type:Bi,isVararg:!0}],(function(t,...e){let r=e.length?e[0].value:0;for(let t=1;t<e.length;++t)r*=e[t].value;return{type:Bi,value:r}})),wi("sub",[{type:Ni,isVararg:!0}],(function(t,...e){let r=e.length?e[0].value:Vr;for(let i=1;i<e.length;++i)r-=e[i].value,r=Vi(0,r),Di(t,r);return{type:Ni,value:r}})),wi("sub",[{type:Bi,isVararg:!0}],(function(t,...e){let r=e.length?e[0].value:0;for(let t=1;t<e.length;++t)r-=e[t].value;return{type:Bi,value:r}})),wi("sum",[{type:Ni,isVararg:!0}],(function(t,...e){let r=Vr;for(let i=0;i<e.length;++i)r+=e[i].value,r=Vi(0,r),Di(t,r);return{type:Ni,value:r}})),wi("sum",[{type:Bi,isVararg:!0}],(function(t,...e){let r=0;for(let t=0;t<e.length;++t)r+=e[t].value;return{type:Bi,value:r}})),wi("abs",[Ni],(function(t,e){const r=Dr(e.value);return Di(t,r),{type:e.type,value:r}})),wi("abs",[Bi],(function(t,e){const r=Math.abs(e.value);return{type:Bi,value:r}})),wi("max",[{type:Ni,isVararg:!0}],(function(t,...e){if(!e.length)throw new Error("Non empty argument list is required for function 'max'.");let r=e[0].value;for(let t=1;t<e.length;++t)e[t].value>r&&(r=e[t].value);return{type:Ni,value:r}})),wi("max",[{type:Bi,isVararg:!0}],(function(t,...e){if(!e.length)throw new Error("Non empty argument list is required for function 'max'.");return{type:Bi,value:Math.max(...e.map((t=>t.value)))}})),wi("min",[{type:Ni,isVararg:!0}],(function(t,...e){if(!e.length)throw new Error("Non empty argument list is required for function 'min'.");let r=e[0].value;for(let t=1;t<e.length;++t)e[t].value<r&&(r=e[t].value);return{type:Ni,value:r}})),wi("min",[{type:Bi,isVararg:!0}],(function(t,...e){if(!e.length)throw new Error("Non empty argument list is required for function 'min'.");return{type:Bi,value:Math.min(...e.map((t=>t.value)))}})),wi("maxNumber",[],(function(){return{type:Bi,value:Mi}})),wi("minNumber",[],(function(){return{type:Bi,value:Ti}})),wi("maxInteger",[],(function(t){return Di(t,Cr),{type:Ni,value:Cr}})),wi("minInteger",[],(function(t){return Di(t,Ar),{type:Ni,value:Ar}})),wi("round",[Bi],(function(t,e){const r=Math.sign(e.value);return{type:Bi,value:r*Math.round(Math.abs(e.value))}})),wi("floor",[Bi],(function(t,e){return{type:Bi,value:Math.floor(e.value)}})),wi("ceil",[Bi],(function(t,e){return{type:Bi,value:Math.ceil(e.value)}})),wi("signum",[Ni],(function(t,e){return{type:Ni,value:jr(e.value)}})),wi("signum",[Bi],(function(t,e){return{type:Bi,value:Math.sign(e.value)}})),wi("copySign",[Ni,Ni],(function(t,e,r){let i;if(r.value===Vr)i=e.value;else if(e.value===Vr)i=Fr(0);else{const t=jr(r.value);i=Dr(e.value)*t}return Di(t,i),{type:Ni,value:i}})),wi("copySign",[Bi,Bi],(function(t,e,r){let i=Math.sign(r.value);0===i&&(i=Object.is(i,0)?1:-1);const n=Math.abs(e.value)*i;return{type:Bi,value:n}})),wi("getColorAlpha",[zi],gn),wi("getColorAlpha",[Ji],gn),wi("getColorRed",[zi],fn),wi("getColorRed",[Ji],fn),wi("getColorGreen",[zi],hn),wi("getColorGreen",[Ji],hn),wi("getColorBlue",[zi],mn),wi("getColorBlue",[Ji],mn),wi("setColorAlpha",[zi,Bi],yn),wi("setColorAlpha",[Ji,Bi],yn),wi("setColorRed",[zi,Bi],bn),wi("setColorRed",[Ji,Bi],bn),wi("setColorGreen",[zi,Bi],_n),wi("setColorGreen",[Ji,Bi],_n),wi("setColorBlue",[zi,Bi],wn),wi("setColorBlue",[Ji,Bi],wn),wi("rgb",[Bi,Bi,Bi],(function(t,e,r,i){const n={a:255,r:255*e.value,g:255*r.value,b:255*i.value};return{type:Ji,value:Oi(n)}})),wi("argb",[Bi,Bi,Bi,Bi],(function(t,e,r,i,n){const o={a:255*e.value,r:255*r.value,g:255*i.value,b:255*n.value};return{type:Ji,value:Oi(o)}})),wi("getDictString",[Wi,{type:zi,isVararg:!0}],Cn),wi("getStringFromDict",[Wi,{type:zi,isVararg:!0}],Cn),wi("getDictNumber",[Wi,{type:zi,isVararg:!0}],An),wi("getNumberFromDict",[Wi,{type:zi,isVararg:!0}],An),wi("getDictInteger",[Wi,{type:zi,isVararg:!0}],Fn),wi("getIntegerFromDict",[Wi,{type:zi,isVararg:!0}],Fn),wi("getDictBoolean",[Wi,{type:zi,isVararg:!0}],Vn),wi("getBooleanFromDict",[Wi,{type:zi,isVararg:!0}],Vn),wi("getDictColor",[Wi,{type:zi,isVararg:!0}],Dn),wi("getColorFromDict",[Wi,{type:zi,isVararg:!0}],Dn),wi("getDictUrl",[Wi,{type:zi,isVararg:!0}],jn),wi("getUrlFromDict",[Wi,{type:zi,isVararg:!0}],jn),wi("getDictOptString",[zi,Wi,{type:zi,isVararg:!0}],Pn),wi("getOptStringFromDict",[zi,Wi,{type:zi,isVararg:!0}],Pn),wi("getDictOptNumber",[Bi,Wi,{type:zi,isVararg:!0}],Sn),wi("getOptNumberFromDict",[Bi,Wi,{type:zi,isVararg:!0}],Sn),wi("getDictOptInteger",[Ni,Wi,{type:zi,isVararg:!0}],On),wi("getOptIntegerFromDict",[Ni,Wi,{type:zi,isVararg:!0}],On),wi("getDictOptBoolean",[Ri,Wi,{type:zi,isVararg:!0}],In),wi("getOptBooleanFromDict",[Ri,Wi,{type:zi,isVararg:!0}],In),wi("getDictOptColor",[Ji,Wi,{type:zi,isVararg:!0}],Mn),wi("getOptColorFromDict",[Ji,Wi,{type:zi,isVararg:!0}],Mn),wi("getDictOptColor",[zi,Wi,{type:zi,isVararg:!0}],Mn),wi("getOptColorFromDict",[zi,Wi,{type:zi,isVararg:!0}],Mn),wi("getDictOptUrl",[zi,Wi,{type:zi,isVararg:!0}],Tn),wi("getOptUrlFromDict",[zi,Wi,{type:zi,isVararg:!0}],Tn),wi("getDictOptUrl",[Ui,Wi,{type:zi,isVararg:!0}],Tn),wi("getOptUrlFromDict",[Ui,Wi,{type:zi,isVararg:!0}],Tn),wi("getArrayString",[Hi,Ni],Bn),wi("getStringFromArray",[Hi,Ni],Bn),wi("getArrayNumber",[Hi,Ni],Rn),wi("getNumberFromArray",[Hi,Ni],Rn),wi("getArrayInteger",[Hi,Ni],Jn),wi("getIntegerFromArray",[Hi,Ni],Jn),wi("getArrayBoolean",[Hi,Ni],Un),wi("getBooleanFromArray",[Hi,Ni],Un),wi("getArrayColor",[Hi,Ni],Ln),wi("getColorFromArray",[Hi,Ni],Ln),wi("getArrayUrl",[Hi,Ni],Wn),wi("getUrlFromArray",[Hi,Ni],Wn),wi("getArrayFromArray",[Hi,Ni],Hn),wi("getDictFromArray",[Hi,Ni],qn),wi("getArrayOptString",[Hi,Ni,zi],Gn),wi("getOptStringFromArray",[Hi,Ni,zi],Gn),wi("getArrayOptNumber",[Hi,Ni,Bi],Zn),wi("getOptNumberFromArray",[Hi,Ni,Bi],Zn),wi("getArrayOptInteger",[Hi,Ni,Ni],Yn),wi("getOptIntegerFromArray",[Hi,Ni,Ni],Yn),wi("getArrayOptBoolean",[Hi,Ni,Ri],Xn),wi("getOptBooleanFromArray",[Hi,Ni,Ri],Xn),wi("getArrayOptColor",[Hi,Ni,Ji],Qn),wi("getOptColorFromArray",[Hi,Ni,Ji],Qn),wi("getArrayOptColor",[Hi,Ni,zi],Qn),wi("getOptColorFromArray",[Hi,Ni,zi],Qn),wi("getArrayOptUrl",[Hi,Ni,Ui],Kn),wi("getOptUrlFromArray",[Hi,Ni,Ui],Kn),wi("getArrayOptUrl",[Hi,Ni,zi],Kn),wi("getOptUrlFromArray",[Hi,Ni,zi],Kn),wi("getOptArrayFromArray",[Hi,Ni],(function(t,e,r){try{return Hn(t,e,r)}catch(t){return{type:Hi,value:[]}}})),wi("getOptDictFromArray",[Hi,Ni],(function(t,e,r){try{return qn(t,e,r)}catch(t){return{type:Wi,value:{}}}})),wi("len",[Hi],(function(t,e){return{type:Ni,value:Fr(e.value.length)}}));const eo={StringLiteral:function(t,e){return{type:zi,value:e.value}},NumberLiteral:function(t,e){return{type:Bi,value:e.value}},IntegerLiteral:function(t,e){return Di(t,e.value),{type:Ni,value:e.value}},BooleanLiteral:function(t,e){return{type:Ri,value:e.value?1:0}},UnaryExpression:function(t,e){const r=ki(ro(t,e.argument));switch(e.operator){case"!":if(r.type===Ri)return{type:Ri,value:r.value?0:1};Pi(`${e.operator}${Ai(r)}`,"A Boolean is expected after a unary not.");case"+":case"-":const i="+"===e.operator?1:-1;if(r.type===Ni){const e=r.value*Fr(i);return Di(t,e),{type:Ni,value:e}}if(r.type===Bi)return{type:Bi,value:r.value*i};Pi(`${e.operator}${Ai(r)}`,`A Number is expected after a unary ${"+"===e.operator?"plus":"minus"}.`)}},ConditionalExpression:function(t,e){const r=ki(ro(t,e.test));if(r.type===Ri)return r.value?ro(t,e.consequent):ro(t,e.alternate);Pi(`${Ai(r)} ? ${Ai(ro(t,e.consequent))} : ${Ai(ro(t,e.alternate))}`,"Ternary must be called with a Boolean value as a condition.")},TryExpression:function(t,e){try{return ro(t,e.test)}catch(r){return ro(t,e.alternate)}},TemplateLiteral:function(t,e){let r="";if(2===e.quasis.length&&""===e.quasis[0].value&&""===e.quasis[1].value)return ro(t,e.expressions[0]);for(let i=0;i<e.expressions.length;++i)r+=e.quasis[i].value,r+=Ci(ro(t,e.expressions[i]));return r+=e.quasis[e.quasis.length-1].value,{type:zi,value:r}},LogicalExpression:function(t,e){const r=ki(ro(t,e.left));if(r.type!==Ri&&Pi(`${Ai(r)} ${e.operator} ...`,`'${e.operator}' must be called with boolean operands.`),"||"===e.operator&&r.value)return r;if("&&"===e.operator&&!r.value)return{type:Ri,value:0};const i=ki(ro(t,e.right));return i.type!==Ri&&Pi(`${Ai(r)} ${e.operator} ${Ai(i)}`,`Operator '${e.operator}' cannot be applied to different types: Boolean and ${Fi(i.type)}.`),{type:Ri,value:i.value}},BinaryExpression:function(t,e){const r=e.operator,i=ro(t,e.left),n=ro(t,e.right);if(i.type!==n.type&&Pi(`${Ai(i)} ${e.operator} ${Ai(n)}`,`Operator '${r}' cannot be applied to different types: ${Fi(i.type)} and ${Fi(n.type)}.`),"=="===r||"!="===r)return function(t,e,r){let i;return i=e.type===Li&&r.type===Li?e.value.getTime()===r.value.getTime():e.value===r.value,"!="===t&&(i=!i),{type:Ri,value:i?1:0}}(r,i,n);if(">"===r||">="===r||"<"===r||"<="===r)return function(t,e,r){let i;e.type!==Bi&&e.type!==Ni&&e.type!==Li&&Pi(`${Ai(e)} ${t} ${Ai(r)}`,`Operator '${t}' cannot be applied to ${Fi(e.type)} type.`);const n=e.type===Li?e.value.getTime():e.value,o=r.type===Li?r.value.getTime():r.value;return i=">"===t?n>o:">="===t?n>=o:"<"===t?n<o:n<=o,{type:Ri,value:i?1:0}}(r,i,n);if("+"===r||"-"===r)return function(t,e,r,i){if(r.type!==zi&&r.type!==Bi&&r.type!==Ni&&Pi(`${Ai(r)} ${e} ${Ai(i)}`,`Operator '${e}' cannot be applied to ${Fi(r.type)} type.`),r.type===zi)return"-"===e&&Pi(`${Ai(r)} - ${Ai(i)}`,`Operator '${e}' cannot be applied to ${Fi(r.type)} type.`),{type:zi,value:r.value+i.value};let n="+"===e?r.value+i.value:r.value-i.value;if(r.type===Ni)try{n=Vi(0,n),Di(t,n)}catch(t){Pi(`${Ai(r)} ${e} ${Ai(i)}`,t.message)}return{type:r.type,value:n}}(t,r,i,n);if("/"===r||"*"===r||"%"===r)return function(t,e,r,i){let n;if(r.type!==Ni&&r.type!==Bi&&Pi(`${Ai(r)} ${e} ${Ai(i)}`,`Operator '${e}' cannot be applied to ${Fi(r.type)} type.`),"*"===e)n=r.value*i.value;else{if("/"!==e&&"%"!==e)throw new Error(`Unsupported operation ${e}`);0===Number(i.value)&&Pi(`${Ai(r)} ${e} ${Ai(i)}`,"Division by zero is not supported."),n="/"===e?r.value/i.value:r.value%i.value}if(r.type===Ni)try{n=Vi(0,n),Di(t,n)}catch(t){Pi(`${Ai(r)} ${e} ${Ai(i)}`,t.message)}return{type:r.type,value:n}}(t,r,i,n);throw new Error(`Unsupported operation ${r}`)},CallExpression:function(t,e){const r=e.callee.name;let i;const n=e.arguments.map((e=>ro(t,e))),o=r+":"+n.map((t=>t.type)).join("#");if(_i.has(o))i=_i.get(o);else{const t=function(t,e){const r=bi.get(t);if(!r)return{type:"missing"};let i=null;for(let t=0;t<r.length;++t){const n=$i(r[t],e);if("match"===n.type)return r[t];i||(i=n)}if(!i)throw new Error("Missing function");return i}(r,n);if("expected"in t||"type"in t&&"missing"===t.type){const e=n.map((t=>Fi(t.type))).join(", "),i=`${r}(${to(n)})`;"few"===t.type&&0===n.length?Pi(i,`Non empty argument list is required for function '${r}'.`):"many"===t.type||"few"===t.type||"mismatch"===t.type?Pi(i,`Function '${r}' has no matching override for given argument types: ${e}.`):Pi(i,`Unknown function name: ${r}.`)}i=t}if(!i)throw new Error("Function not found");try{return i.cb(t,...n)}catch(t){Pi(`${r}(${to(n)})`,t.message)}},Variable:function(t,e){const r=e.id.name,i=t.variables.get(r);if(i)return function(t){return{type:t.getType(),value:t.getValue()}}(i);throw new Error(`Variable '${r}' is missing.`)}};function ro(t,e){if(e.type in eo)return eo[e.type](t,e);throw new Error("Unsupported expression")}class io{constructor(t){this.ast=t}apply(t,e){try{const r=function(t,e){try{const r={variables:t,warnings:[],safeIntegerOverflow:!1},i=ro(r,e);return r.safeIntegerOverflow&&r.warnings.push(st(new Error("Safe integer overflow, values may lose accuracy."),{level:"warn"})),{result:i,warnings:r.warnings}}catch(t){return{result:{type:"error",value:t.message},warnings:[]}}}(t,this.ast);r.warnings.forEach(e);const i=r.result;if("error"===i.type)return void e(st(new Error("Expression execution error"),{additional:{message:i.value}}));const n=i.value;if(n instanceof Date)return Ei(n);if("boolean"===i.type)return Boolean(n);if("color"===i.type){const t=ft(String(n));if(t)return Oi(t);e(st(new Error("Expression execution error")))}if("integer"===i.type)return n>2147483647||n<-2147483648?void e(st(new Error("Expression result is out of 32-bit int range"))):Number(n);if("array"===i.type||"dict"===i.type)try{return JSON.stringify(n)}catch(t){return e(st(new Error(`Failed to stringify ${i.type}`))),`<${i.type}>`}return n}catch(t){return void e(st(new Error("Expression execution error")))}}}function no(t,e,r){if(t)if("string"==typeof t){if((i=t).indexOf("@{")>-1||i.indexOf("\\")>-1){e.hasExpression=!0;try{const r=function(t,e){var r,i={},n=(e=void 0!==e?e:{}).grammarSource,o={start:De,JsonStringContents:function(){var t,e,r;for(t=me,e=[],r=je();r!==i;)e.push(r),r=je();return ye=t,St(e)}},a=De,s="@{",l="}",c="@{}",u="\\",d="?",p=":",v="!:",g="||",f="&&",h="==",m="!=",y=">=",b=">",_="<=",w="<",$="+",x="-",k="/",E="*",C="%",A="!",F="(",V=")",D=",",j="'",P=".",S="e",O="E",I="true",M="false",T=/^[^}]/,z=/^[^'}]/,N=/^[0-9]/,B=/^[a-zA-Z_0-9.]/,R=/^[a-zA-Z_]/,J=/^[ \t\r\n]/,U=ke("@{",!1),L=ke("}",!1),W=ke("@{}",!1),H=ke("\\",!1),q={type:"any"},G=Ee(["}"],!0,!1),Z=ke("?",!1),Y=ke(":",!1),X=ke("!:",!1),Q=ke("||",!1),K=ke("&&",!1),tt=ke("==",!1),et=ke("!=",!1),rt=ke(">=",!1),it=ke(">",!1),nt=ke("<=",!1),ot=ke("<",!1),at=ke("+",!1),st=ke("-",!1),lt=ke("/",!1),ct=ke("*",!1),ut=ke("%",!1),dt=ke("!",!1),pt=ke("(",!1),vt=ke(")",!1),gt=ke(",",!1),ft=Ce("string"),ht=ke("'",!1),mt=Ee(["'","}"],!0,!1),yt=Ce("integer"),bt=Ee([["0","9"]],!1,!1),_t=Ce("number"),wt=ke(".",!1),$t=ke("e",!1),xt=ke("E",!1),kt=Ce("boolean"),Et=ke("true",!1),Ct=ke("false",!1),At=Ee([["a","z"],["A","Z"],"_",["0","9"],"."],!1,!1),Ft=Ce("identifier"),Vt=Ee([["a","z"],["A","Z"],"_"],!1,!1),Dt=Ce("whitespace"),jt=Ee([" ","\t","\r","\n"],!1,!1),Pt=function(t){return t},St=function(t){return gi(t)},Ot=function(t){return t},It=function(){return""},Mt=function(){return xe()},Tt=function(){throw new Error("Error tokenizing '"+t+"'.")},zt=function(){throw new Error("Error tokenizing '"+t+"'.")},Nt=function(t){return t},Bt=function(t){return hi(t)},Rt=function(){throw new Error("Error tokenizing '"+t+"'.")},Jt=function(t,e,r){return{type:"ConditionalExpression",test:t,consequent:e,alternate:r}},Ut=function(t,e){return{type:"TryExpression",test:t,alternate:e}},Lt=function(t,e){return vi(t,e)},Wt=function(t,e){return vi(t,e)},Ht=function(t,e){return pi(t,e)},qt=function(t,e){return pi(t,e)},Gt=function(t,e){return pi(t,e)},Zt=function(t,e){return pi(t,e)},Yt=function(t,e){return{type:"UnaryExpression",operator:t,argument:e}},Xt=function(t,e){return{type:"CallExpression",callee:t,arguments:e}},Qt=function(t){return{type:"Variable",id:t}},Kt=function(t,e){return[t,...e]},te=function(t){return t},ee=function(t){return t},re=function(t){return gi(t)},ie=function(t){return t},ne=function(){return""},oe=function(){return xe()},ae=function(){throw new Error("Error tokenizing '"+t+"'.")},se=function(){throw new Error("Error tokenizing '"+t+"'.")},le=function(t){return t},ce=function(t){return hi(t)},ue=function(){throw new Error("Error tokenizing '"+t+"'.")},de=function(){return{type:"IntegerLiteral",value:fi(xe())}},pe=function(){return{type:"NumberLiteral",value:parseFloat(xe())}},ve=function(){return{type:"NumberLiteral",value:parseFloat(xe())}},ge=function(){return{type:"BooleanLiteral",value:!0}},fe=function(){return{type:"BooleanLiteral",value:!1}},he=function(){return{type:"Identifier",name:xe()}},me=0,ye=0,be=[{line:1,column:1}],_e=0,we=[],$e=0;if("startRule"in e){if(!(e.startRule in o))throw new Error("Can't start parsing from rule \""+e.startRule+'".');a=o[e.startRule]}function xe(){return t.substring(ye,me)}function ke(t,e){return{type:"literal",text:t,ignoreCase:e}}function Ee(t,e,r){return{type:"class",parts:t,inverted:e,ignoreCase:r}}function Ce(t){return{type:"other",description:t}}function Ae(e){var r,i=be[e];if(i)return i;for(r=e-1;!be[r];)r--;for(i={line:(i=be[r]).line,column:i.column};r<e;)10===t.charCodeAt(r)?(i.line++,i.column=1):i.column++,r++;return be[e]=i,i}function Fe(t,e,r){var i=Ae(t),o=Ae(e),a={source:n,start:{offset:t,line:i.line,column:i.column},end:{offset:e,line:o.line,column:o.column}};return r&&n&&"function"==typeof n.offset&&(a.start=n.offset(a.start),a.end=n.offset(a.end)),a}function Ve(t){me<_e||(me>_e&&(_e=me,we=[]),we.push(t))}function De(){var t,e;return t=me,We(),(e=Pe())!==i?(We(),ye=t,t=Pt(e)):(me=t,t=i),t}function je(){var e,r,n,o,a;if(e=me,t.substr(me,2)===s?(r=s,me+=2):(r=i,0===$e&&Ve(U)),r!==i?(n=We(),(o=Pe())!==i?(We(),125===t.charCodeAt(me)?(a=l,me++):(a=i,0===$e&&Ve(L)),a!==i?(ye=e,e=Ot(o)):(me=e,e=i)):(me=e,e=i)):(me=e,e=i),e===i&&(e=me,t.substr(me,3)===c?(r=c,me+=3):(r=i,0===$e&&Ve(W)),r!==i&&(ye=e,r=It()),(e=r)===i&&(e=me,r=me,$e++,92===t.charCodeAt(me)?(n=u,me++):(n=i,0===$e&&Ve(H)),n===i&&(t.substr(me,2)===s?(n=s,me+=2):(n=i,0===$e&&Ve(U))),$e--,n===i?r=void 0:(me=r,r=i),r!==i?(t.length>me?(n=t.charAt(me),me++):(n=i,0===$e&&Ve(q)),n!==i?(ye=e,e=Mt()):(me=e,e=i)):(me=e,e=i),e===i))){if(e=me,t.substr(me,2)===s?(r=s,me+=2):(r=i,0===$e&&Ve(U)),r!==i){if(n=[],T.test(t.charAt(me))?(o=t.charAt(me),me++):(o=i,0===$e&&Ve(G)),o!==i)for(;o!==i;)n.push(o),T.test(t.charAt(me))?(o=t.charAt(me),me++):(o=i,0===$e&&Ve(G));else n=i;n!==i?(125===t.charCodeAt(me)?(o=l,me++):(o=i,0===$e&&Ve(L)),o!==i?(ye=e,e=Tt()):(me=e,e=i)):(me=e,e=i)}else me=e,e=i;e===i&&(e=me,t.substr(me,2)===s?(r=s,me+=2):(r=i,0===$e&&Ve(U)),r!==i&&(ye=e,r=zt()),(e=r)===i&&(e=me,92===t.charCodeAt(me)?(r=u,me++):(r=i,0===$e&&Ve(H)),r!==i?(t.substr(me,2)===s?(n=s,me+=2):(n=i,0===$e&&Ve(U)),n!==i?(ye=e,e=Nt(n)):(me=e,e=i)):(me=e,e=i),e===i&&(e=me,92===t.charCodeAt(me)?(r=u,me++):(r=i,0===$e&&Ve(H)),r!==i?(t.length>me?(n=t.charAt(me),me++):(n=i,0===$e&&Ve(q)),n!==i?(ye=e,e=Bt(n)):(me=e,e=i)):(me=e,e=i),e===i&&(e=me,92===t.charCodeAt(me)?(r=u,me++):(r=i,0===$e&&Ve(H)),r!==i&&(ye=e,r=Rt()),e=r))))}return e}function Pe(){var e,r,n,o,a,s;return e=me,(r=Se())!==i?(We(),63===t.charCodeAt(me)?(n=d,me++):(n=i,0===$e&&Ve(Z)),n!==i?(We(),(o=Pe())!==i?(We(),58===t.charCodeAt(me)?(a=p,me++):(a=i,0===$e&&Ve(Y)),a!==i?(We(),(s=Pe())!==i?(ye=e,e=Jt(r,o,s)):(me=e,e=i)):(me=e,e=i)):(me=e,e=i)):(me=e,e=i)):(me=e,e=i),e===i&&(e=Se()),e}function Se(){var e,r,n,o;return e=me,(r=Oe())!==i?(We(),t.substr(me,2)===v?(n=v,me+=2):(n=i,0===$e&&Ve(X)),n!==i?(We(),(o=Pe())!==i?(ye=e,e=Ut(r,o)):(me=e,e=i)):(me=e,e=i)):(me=e,e=i),e===i&&(e=Oe()),e}function Oe(){var e,r,n,o,a,s,l,c;if(e=me,(r=Ie())!==i){for(n=[],o=me,a=We(),t.substr(me,2)===g?(s=g,me+=2):(s=i,0===$e&&Ve(Q)),s!==i?(l=We(),(c=Ie())!==i?o=a=[a,s,l,c]:(me=o,o=i)):(me=o,o=i);o!==i;)n.push(o),o=me,a=We(),t.substr(me,2)===g?(s=g,me+=2):(s=i,0===$e&&Ve(Q)),s!==i?(l=We(),(c=Ie())!==i?o=a=[a,s,l,c]:(me=o,o=i)):(me=o,o=i);ye=e,e=Lt(r,n)}else me=e,e=i;return e}function Ie(){var e,r,n,o,a,s,l,c;if(e=me,(r=Me())!==i){for(n=[],o=me,a=We(),t.substr(me,2)===f?(s=f,me+=2):(s=i,0===$e&&Ve(K)),s!==i?(l=We(),(c=Me())!==i?o=a=[a,s,l,c]:(me=o,o=i)):(me=o,o=i);o!==i;)n.push(o),o=me,a=We(),t.substr(me,2)===f?(s=f,me+=2):(s=i,0===$e&&Ve(K)),s!==i?(l=We(),(c=Me())!==i?o=a=[a,s,l,c]:(me=o,o=i)):(me=o,o=i);ye=e,e=Wt(r,n)}else me=e,e=i;return e}function Me(){var e,r,n,o,a,s,l,c;if(e=me,(r=Te())!==i){for(n=[],o=me,a=We(),t.substr(me,2)===h?(s=h,me+=2):(s=i,0===$e&&Ve(tt)),s===i&&(t.substr(me,2)===m?(s=m,me+=2):(s=i,0===$e&&Ve(et))),s!==i?(l=We(),(c=Te())!==i?o=a=[a,s,l,c]:(me=o,o=i)):(me=o,o=i);o!==i;)n.push(o),o=me,a=We(),t.substr(me,2)===h?(s=h,me+=2):(s=i,0===$e&&Ve(tt)),s===i&&(t.substr(me,2)===m?(s=m,me+=2):(s=i,0===$e&&Ve(et))),s!==i?(l=We(),(c=Te())!==i?o=a=[a,s,l,c]:(me=o,o=i)):(me=o,o=i);ye=e,e=Ht(r,n)}else me=e,e=i;return e}function Te(){var e,r,n,o,a,s,l,c;if(e=me,(r=ze())!==i){for(n=[],o=me,a=We(),t.substr(me,2)===y?(s=y,me+=2):(s=i,0===$e&&Ve(rt)),s===i&&(62===t.charCodeAt(me)?(s=b,me++):(s=i,0===$e&&Ve(it)),s===i&&(t.substr(me,2)===_?(s=_,me+=2):(s=i,0===$e&&Ve(nt)),s===i&&(60===t.charCodeAt(me)?(s=w,me++):(s=i,0===$e&&Ve(ot))))),s!==i?(l=We(),(c=ze())!==i?o=a=[a,s,l,c]:(me=o,o=i)):(me=o,o=i);o!==i;)n.push(o),o=me,a=We(),t.substr(me,2)===y?(s=y,me+=2):(s=i,0===$e&&Ve(rt)),s===i&&(62===t.charCodeAt(me)?(s=b,me++):(s=i,0===$e&&Ve(it)),s===i&&(t.substr(me,2)===_?(s=_,me+=2):(s=i,0===$e&&Ve(nt)),s===i&&(60===t.charCodeAt(me)?(s=w,me++):(s=i,0===$e&&Ve(ot))))),s!==i?(l=We(),(c=ze())!==i?o=a=[a,s,l,c]:(me=o,o=i)):(me=o,o=i);ye=e,e=qt(r,n)}else me=e,e=i;return e}function ze(){var e,r,n,o,a,s,l,c;if(e=me,(r=Ne())!==i){for(n=[],o=me,a=We(),43===t.charCodeAt(me)?(s=$,me++):(s=i,0===$e&&Ve(at)),s===i&&(45===t.charCodeAt(me)?(s=x,me++):(s=i,0===$e&&Ve(st))),s!==i?(l=We(),(c=Ne())!==i?o=a=[a,s,l,c]:(me=o,o=i)):(me=o,o=i);o!==i;)n.push(o),o=me,a=We(),43===t.charCodeAt(me)?(s=$,me++):(s=i,0===$e&&Ve(at)),s===i&&(45===t.charCodeAt(me)?(s=x,me++):(s=i,0===$e&&Ve(st))),s!==i?(l=We(),(c=Ne())!==i?o=a=[a,s,l,c]:(me=o,o=i)):(me=o,o=i);ye=e,e=Gt(r,n)}else me=e,e=i;return e}function Ne(){var e,r,n,o,a,s,l,c;if(e=me,(r=Be())!==i){for(n=[],o=me,a=We(),47===t.charCodeAt(me)?(s=k,me++):(s=i,0===$e&&Ve(lt)),s===i&&(42===t.charCodeAt(me)?(s=E,me++):(s=i,0===$e&&Ve(ct)),s===i&&(37===t.charCodeAt(me)?(s=C,me++):(s=i,0===$e&&Ve(ut)))),s!==i?(l=We(),(c=Be())!==i?o=a=[a,s,l,c]:(me=o,o=i)):(me=o,o=i);o!==i;)n.push(o),o=me,a=We(),47===t.charCodeAt(me)?(s=k,me++):(s=i,0===$e&&Ve(lt)),s===i&&(42===t.charCodeAt(me)?(s=E,me++):(s=i,0===$e&&Ve(ct)),s===i&&(37===t.charCodeAt(me)?(s=C,me++):(s=i,0===$e&&Ve(ut)))),s!==i?(l=We(),(c=Be())!==i?o=a=[a,s,l,c]:(me=o,o=i)):(me=o,o=i);ye=e,e=Zt(r,n)}else me=e,e=i;return e}function Be(){var e,r,n;return(e=Ue())===i&&(e=Je())===i&&(e=me,33===t.charCodeAt(me)?(r=A,me++):(r=i,0===$e&&Ve(dt)),r===i&&(43===t.charCodeAt(me)?(r=$,me++):(r=i,0===$e&&Ve(at)),r===i&&(45===t.charCodeAt(me)?(r=x,me++):(r=i,0===$e&&Ve(st)))),r!==i?(We(),(n=Be())!==i?(ye=e,e=Yt(r,n)):(me=e,e=i)):(me=e,e=i),e===i&&(e=function(){var e,r,n,o,a;return e=me,(r=Le())!==i?(We(),40===t.charCodeAt(me)?(n=F,me++):(n=i,0===$e&&Ve(pt)),n!==i?(We(),o=function(){var e,r,n,o,a,s;if(e=me,(r=Pe())!==i){for(n=[],o=me,We(),44===t.charCodeAt(me)?(a=D,me++):(a=i,0===$e&&Ve(gt)),a!==i?(We(),(s=Pe())!==i?o=s:(me=o,o=i)):(me=o,o=i);o!==i;)n.push(o),o=me,We(),44===t.charCodeAt(me)?(a=D,me++):(a=i,0===$e&&Ve(gt)),a!==i?(We(),(s=Pe())!==i?o=s:(me=o,o=i)):(me=o,o=i);ye=e,e=Kt(r,n)}else me=e,e=i;return e===i&&(e=We()),e}(),o!==i?(We(),41===t.charCodeAt(me)?(a=V,me++):(a=i,0===$e&&Ve(vt)),a!==i?(ye=e,e=Xt(r,o)):(me=e,e=i)):(me=e,e=i)):(me=e,e=i)):(me=e,e=i),e===i&&(e=me,(r=Le())!==i&&(ye=e,r=Qt(r)),(e=r)===i&&(e=function(){var e,r,n,o;return e=function(){var e,r,n,o;return $e++,e=me,39===t.charCodeAt(me)?(r=j,me++):(r=i,0===$e&&Ve(ht)),r!==i?(n=function(){var t,e,r;for(t=me,e=[],r=Re();r!==i;)e.push(r),r=Re();return ye=t,re(e)}(),39===t.charCodeAt(me)?(o=j,me++):(o=i,0===$e&&Ve(ht)),o!==i?(ye=e,e=ee(n)):(me=e,e=i)):(me=e,e=i),$e--,e===i&&(r=i,0===$e&&Ve(ft)),e}(),e===i&&(e=Ue())===i&&(e=Je())===i&&(e=function(){var e,r;return $e++,e=me,t.substr(me,4)===I?(r=I,me+=4):(r=i,0===$e&&Ve(Et)),r!==i&&(ye=e,r=ge()),(e=r)===i&&(e=me,t.substr(me,5)===M?(r=M,me+=5):(r=i,0===$e&&Ve(Ct)),r!==i&&(ye=e,r=fe()),e=r),$e--,e===i&&(r=i,0===$e&&Ve(kt)),e}(),e===i&&(e=me,40===t.charCodeAt(me)?(r=F,me++):(r=i,0===$e&&Ve(pt)),r!==i?(We(),(n=Pe())!==i?(We(),41===t.charCodeAt(me)?(o=V,me++):(o=i,0===$e&&Ve(vt)),o!==i?(ye=e,e=te(n)):(me=e,e=i)):(me=e,e=i)):(me=e,e=i))),e}())),e}())),e}function Re(){var e,r,n,o,a;if(e=me,t.substr(me,2)===s?(r=s,me+=2):(r=i,0===$e&&Ve(U)),r!==i?(n=We(),(o=Pe())!==i?(We(),125===t.charCodeAt(me)?(a=l,me++):(a=i,0===$e&&Ve(L)),a!==i?(ye=e,e=ie(o)):(me=e,e=i)):(me=e,e=i)):(me=e,e=i),e===i&&(e=me,t.substr(me,3)===c?(r=c,me+=3):(r=i,0===$e&&Ve(W)),r!==i&&(ye=e,r=ne()),(e=r)===i&&(e=me,r=me,$e++,92===t.charCodeAt(me)?(n=u,me++):(n=i,0===$e&&Ve(H)),n===i&&(39===t.charCodeAt(me)?(n=j,me++):(n=i,0===$e&&Ve(ht)),n===i&&(t.substr(me,2)===s?(n=s,me+=2):(n=i,0===$e&&Ve(U)))),$e--,n===i?r=void 0:(me=r,r=i),r!==i?(t.length>me?(n=t.charAt(me),me++):(n=i,0===$e&&Ve(q)),n!==i?(ye=e,e=oe()):(me=e,e=i)):(me=e,e=i),e===i))){if(e=me,t.substr(me,2)===s?(r=s,me+=2):(r=i,0===$e&&Ve(U)),r!==i){if(n=[],z.test(t.charAt(me))?(o=t.charAt(me),me++):(o=i,0===$e&&Ve(mt)),o!==i)for(;o!==i;)n.push(o),z.test(t.charAt(me))?(o=t.charAt(me),me++):(o=i,0===$e&&Ve(mt));else n=i;n!==i?(125===t.charCodeAt(me)?(o=l,me++):(o=i,0===$e&&Ve(L)),o!==i?(ye=e,e=ae()):(me=e,e=i)):(me=e,e=i)}else me=e,e=i;e===i&&(e=me,t.substr(me,2)===s?(r=s,me+=2):(r=i,0===$e&&Ve(U)),r!==i&&(ye=e,r=se()),(e=r)===i&&(e=me,92===t.charCodeAt(me)?(r=u,me++):(r=i,0===$e&&Ve(H)),r!==i?(t.substr(me,2)===s?(n=s,me+=2):(n=i,0===$e&&Ve(U)),n!==i?(ye=e,e=le(n)):(me=e,e=i)):(me=e,e=i),e===i&&(e=me,92===t.charCodeAt(me)?(r=u,me++):(r=i,0===$e&&Ve(H)),r!==i?(t.length>me?(n=t.charAt(me),me++):(n=i,0===$e&&Ve(q)),n!==i?(ye=e,e=ce(n)):(me=e,e=i)):(me=e,e=i),e===i&&(e=me,92===t.charCodeAt(me)?(r=u,me++):(r=i,0===$e&&Ve(H)),r!==i&&(ye=e,r=ue()),e=r))))}return e}function Je(){var e,r,n,o;if($e++,e=me,45===t.charCodeAt(me)?(r=x,me++):(r=i,0===$e&&Ve(st)),r===i&&(r=null),n=[],N.test(t.charAt(me))?(o=t.charAt(me),me++):(o=i,0===$e&&Ve(bt)),o!==i)for(;o!==i;)n.push(o),N.test(t.charAt(me))?(o=t.charAt(me),me++):(o=i,0===$e&&Ve(bt));else n=i;return n!==i?(ye=e,e=de()):(me=e,e=i),$e--,e===i&&(r=i,0===$e&&Ve(yt)),e}function Ue(){var e,r,n,o,a,s,l,c,u,d;for($e++,e=me,45===t.charCodeAt(me)?(r=x,me++):(r=i,0===$e&&Ve(st)),r===i&&(r=null),n=[],N.test(t.charAt(me))?(o=t.charAt(me),me++):(o=i,0===$e&&Ve(bt));o!==i;)n.push(o),N.test(t.charAt(me))?(o=t.charAt(me),me++):(o=i,0===$e&&Ve(bt));if(46===t.charCodeAt(me)?(o=P,me++):(o=i,0===$e&&Ve(wt)),o!==i){if(a=[],N.test(t.charAt(me))?(s=t.charAt(me),me++):(s=i,0===$e&&Ve(bt)),s!==i)for(;s!==i;)a.push(s),N.test(t.charAt(me))?(s=t.charAt(me),me++):(s=i,0===$e&&Ve(bt));else a=i;if(a!==i){if(s=me,101===t.charCodeAt(me)?(l=S,me++):(l=i,0===$e&&Ve($t)),l===i&&(69===t.charCodeAt(me)?(l=O,me++):(l=i,0===$e&&Ve(xt))),l!==i){if(43===t.charCodeAt(me)?(c=$,me++):(c=i,0===$e&&Ve(at)),c===i&&(45===t.charCodeAt(me)?(c=x,me++):(c=i,0===$e&&Ve(st))),c===i&&(c=null),u=[],N.test(t.charAt(me))?(d=t.charAt(me),me++):(d=i,0===$e&&Ve(bt)),d!==i)for(;d!==i;)u.push(d),N.test(t.charAt(me))?(d=t.charAt(me),me++):(d=i,0===$e&&Ve(bt));else u=i;u!==i?s=l=[l,c,u]:(me=s,s=i)}else me=s,s=i;s===i&&(s=null),ye=e,e=pe()}else me=e,e=i}else me=e,e=i;if(e===i){if(e=me,45===t.charCodeAt(me)?(r=x,me++):(r=i,0===$e&&Ve(st)),r===i&&(r=null),n=[],N.test(t.charAt(me))?(o=t.charAt(me),me++):(o=i,0===$e&&Ve(bt)),o!==i)for(;o!==i;)n.push(o),N.test(t.charAt(me))?(o=t.charAt(me),me++):(o=i,0===$e&&Ve(bt));else n=i;if(n!==i)if(101===t.charCodeAt(me)?(o=S,me++):(o=i,0===$e&&Ve($t)),o===i&&(69===t.charCodeAt(me)?(o=O,me++):(o=i,0===$e&&Ve(xt))),o!==i){if(43===t.charCodeAt(me)?(a=$,me++):(a=i,0===$e&&Ve(at)),a===i&&(45===t.charCodeAt(me)?(a=x,me++):(a=i,0===$e&&Ve(st))),a===i&&(a=null),s=[],N.test(t.charAt(me))?(l=t.charAt(me),me++):(l=i,0===$e&&Ve(bt)),l!==i)for(;l!==i;)s.push(l),N.test(t.charAt(me))?(l=t.charAt(me),me++):(l=i,0===$e&&Ve(bt));else s=i;s!==i?(ye=e,e=ve()):(me=e,e=i)}else me=e,e=i;else me=e,e=i}return $e--,e===i&&(r=i,0===$e&&Ve(_t)),e}function Le(){var e,r,n,o,a;if($e++,e=me,r=me,$e++,n=function(){var e,r,n,o;return e=me,t.substr(me,4)===I?(r=I,me+=4):(r=i,0===$e&&Ve(Et)),r===i&&(t.substr(me,5)===M?(r=M,me+=5):(r=i,0===$e&&Ve(Ct))),r!==i?(n=me,$e++,B.test(t.charAt(me))?(o=t.charAt(me),me++):(o=i,0===$e&&Ve(At)),$e--,o===i?n=void 0:(me=n,n=i),n!==i?e=r=[r,n]:(me=e,e=i)):(me=e,e=i),e}(),$e--,n===i?r=void 0:(me=r,r=i),r!==i)if(R.test(t.charAt(me))?(n=t.charAt(me),me++):(n=i,0===$e&&Ve(Vt)),n!==i){for(o=[],B.test(t.charAt(me))?(a=t.charAt(me),me++):(a=i,0===$e&&Ve(At));a!==i;)o.push(a),B.test(t.charAt(me))?(a=t.charAt(me),me++):(a=i,0===$e&&Ve(At));ye=e,e=he()}else me=e,e=i;else me=e,e=i;return $e--,e===i&&(r=i,0===$e&&Ve(Ft)),e}function We(){var e,r;for($e++,e=[],J.test(t.charAt(me))?(r=t.charAt(me),me++):(r=i,0===$e&&Ve(jt));r!==i;)e.push(r),J.test(t.charAt(me))?(r=t.charAt(me),me++):(r=i,0===$e&&Ve(jt));return $e--,r=i,0===$e&&Ve(Dt),e}if((r=a())!==i&&me===t.length)return r;throw r!==i&&me<t.length&&Ve({type:"end"}),function(t,e,r){return new mi(mi.buildMessage(t,e),t,e,r)}(we,_e<t.length?t.charAt(_e):null,_e<t.length?Fe(_e,_e+1):Fe(_e,_e))}(t,{startRule:"JsonStringContents"}),i=ji(r);return e.vars.push(...i),new io(r)}catch(e){return void r(st(new Error("Unable to parse expression"),{additional:{expression:t}}))}}}else{if(Array.isArray(t))return t.map((t=>no(t,e,r)));if("object"==typeof t){const i={};for(const n in t)i[n]=no(t[n],e,r);return i}}var i;return t}function oo(t,e,r){if(t){if(t instanceof io)return t.apply(e,r);if(Array.isArray(t))return t.map((t=>oo(t,e,r)));if("object"==typeof t){const i={};for(const n in t)i[n]=oo(t[n],e,r);return i}}return t}function ao(t,e){const r={vars:[],hasExpression:!1},i=no(t,r,e);return{vars:[...new Set(r.vars)],hasExpression:r.hasExpression,applyVars:t=>oo(i,t,e)}}const so={pagers:function(){return Q(new Map)}},lo=new Map,co=new Map;function uo(t){const e=lo.get(t)||Q("");return lo.has(t)||lo.set(t,e),e}function po(t){const e=co.get(t)||new Map;return co.has(t)||co.set(t,e),e}class vo{setVariable(t){const e=t.getName(),r=po(this);if(r.has(e))throw new Error("Variable with the same name already exist");r.set(e,t),uo(this).set(e)}getVariable(t){return po(this).get(t)}list(){return po(this).values()}}function go(){return new vo}function fo(t,e,r){return e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const ho=new Set(["start","stop","pause","resume","cancel","reset"]);class mo{constructor(t){fo(this,"timers",new Map),fo(this,"awaitActions",[]),this.logError=t.logError,this.applyVars=t.applyVars,this.hasVariableWithType=t.hasVariableWithType,this.setVariableValue=t.setVariableValue,this.execAnyActions=t.execAnyActions,this.visibilityHandler=()=>{"visible"===document.visibilityState?(this.awaitActions.forEach((({id:t,action:e})=>{this.execTimerAction(t,e)})),this.awaitActions=[],this.unholdAll()):this.holdAll()},document.addEventListener("visibilitychange",this.visibilityHandler)}destroy(){document.removeEventListener("visibilitychange",this.visibilityHandler);for(const[t,e]of this.timers)this.stopTimerTimeouts(e)}createTimer(t){null!=t&&t.id?t.duration||t.tick_interval&&(t.value_variable||t.tick_actions)?this.timers.set(t.id,{state:"stopped",definition:t}):this.logError(st(new Error("Misconfigured timer"),{additional:{id:t.id}})):this.logError(st(new Error("Missing timer id")))}execTimerAction(t,e){if(!(t&&e&&this.timers.has(t)&&ho.has(e)))return void this.logError(st(new Error("Incorrect timer action"),{additional:{id:t,action:e}}));const r=e;if("visible"!==document.visibilityState)return void this.awaitActions.push({id:t,action:r});const i=this.timers.get(t);this[r](i)}stopTimerTimeouts(t){t.durationTimeout&&(clearTimeout(t.durationTimeout),t.durationTimeout=void 0),t.tickTimeout&&(clearTimeout(t.tickTimeout),t.tickTimeout=void 0)}tickOrUnholdAction(t){const e=performance.now(),r=(t.durationPassed||0)+e-(t.durationStarted||0);t.duration&&r>t.duration||(this.updateVariable(t,r),this.callActions(t,"tick"),void 0!==t.tickCount&&++t.tickCount)}startOrResume(t){t.state="running",t.hold=!1,t.durationStarted=performance.now();const e=t.duration;e&&(t.durationTimeout=window.setTimeout((()=>{this.updateVariable(t,e),t.tickCountPredict&&void 0!==t.tickCount&&t.tickCount<t.tickCountPredict&&this.callActions(t,"tick"),this.stop(t)}),Math.max(0,e-(t.durationPassed||0))));const r=t.tick;if(r){const e=()=>{const i=t.tickStarted=performance.now(),n=Math.max(0,r-(t.tickPassed||0));t.tickTimeout=window.setTimeout((()=>{this.tickOrUnholdAction(t),t.tickPassed=(performance.now()-i-n)%r,e()}),n)};e()}}start(t){if("running"===t.state)return void this.logError(st(new Error("The timer is already running")));if("paused"===t.state)return void this.logError(st(new Error("The timer is paused")));const e=t.definition.value_variable;!e||this.hasVariableWithType(e,"integer")?(e&&this.setVariableValue(e,0),t.definition.duration&&(t.duration=this.applyVars(t.definition.duration)),t.definition.tick_interval&&(t.tick=this.applyVars(t.definition.tick_interval)),void 0!==t.duration&&t.duration<0||void 0!==t.tick&&t.tick<=0?this.logError(st(new Error("Incorrect timer properties"),{additional:{id:t.definition.id}})):(void 0!==t.duration&&void 0!==t.tick&&(t.tickCount=0,t.tickCountPredict=Math.floor(t.duration/t.tick)),this.startOrResume(t))):this.logError(st(new Error("Cannot find variable"),{additional:{name:e}}))}stop(t){"stopped"!==t.state?(t.state="stopped",t.durationPassed=0,t.tickPassed=0,this.stopTimerTimeouts(t),this.callActions(t,"end")):this.logError(st(new Error("The timer has already been stopped")))}pause(t){if("stopped"===t.state)return void this.logError(st(new Error("The timer has already been stopped")));if("paused"===t.state)return void this.logError(st(new Error("The timer has already been paused")));t.state="paused",this.stopTimerTimeouts(t);const e=performance.now();t.durationStarted&&(t.durationPassed=(t.durationPassed||0)+e-t.durationStarted),t.tickStarted&&(t.tickPassed=(t.tickPassed||0)+e-t.tickStarted);const r=t.definition.value_variable;r&&t.durationPassed&&this.setVariableValue(r,Math.round(t.durationPassed))}resume(t){"stopped"!==t.state?"running"!==t.state?this.startOrResume(t):this.logError(st(new Error("The timer is already running"))):this.logError(st(new Error("The timer has already been stopped")))}cancel(t){"stopped"!==t.state&&(t.state="stopped",t.durationPassed=0,t.tickPassed=0,this.stopTimerTimeouts(t))}reset(t){this.cancel(t),this.start(t)}updateVariable(t,e){const r=t.definition.value_variable;r&&this.setVariableValue(r,Math.round(e))}callActions(t,e){const r=t.definition["end"===e?"end_actions":"tick_actions"];if(r){const t=this.applyVars(r);this.execAnyActions(t,!1)}}holdAll(){for(const[t,e]of this.timers)"running"===e.state&&(e.hold=!0,this.stopTimerTimeouts(e))}unholdAll(){for(const[t,e]of this.timers)if("running"===e.state&&e.hold){const t=performance.now();e.durationStarted&&(e.durationPassed=(e.durationPassed||0)+t-e.durationStarted),e.tickStarted&&(e.tickPassed=(e.tickPassed||0)+t-e.tickStarted),e.tick&&this.tickOrUnholdAction(e),this.startOrResume(e)}}}function yo(t,e,r,i){const{variable_name:n}=r;if(!n)return void e(st(new Error(`Incorrect ${r.type} action`),{additional:{name:n}}));const o=t.get(n);if(!o)return void e(st(new Error("Cannot find variable"),{additional:{name:n}}));const a=o.getType();"array"===a?i(o):e(st(new Error("Trying to insert value into the non-array"),{additional:{name:n,type:a}}))}let bo=Q(!0),_o=0;function wo(){bo.set(!1)}function $o(){bo.set(!0)}const xo=U(((t,e,r,i)=>{let n,o,a,s;var c,u,d,p;let{id:f}=e,{json:h={}}=e,{platform:m="auto"}=e,{theme:y="system"}=e,{globalVariablesController:b=new vo}=e,{mix:_=""}=e,{customization:w={}}=e,{builtinProtocols:x=["http","https","tel","mailto","intent"]}=e,{extensions:k=new Map}=e,{onError:E}=e,{onStat:C}=e,{onCustomAction:A}=e,{onComponent:F}=e,{typefaceProvider:V=(t=>"")}=e,{fetchInit:D={}}=e,{tooltipRoot:j}=e,{customComponents:P}=e,S=Q("desktop"===m);if(s=l(S,(t=>a=t)),"auto"===m&&"undefined"!=typeof matchMedia){const t=matchMedia("(any-pointer: coarse)");S.set(!t.matches),t.addListener((()=>{S.set(!t.matches)}))}let O="light",M=null;function T(t){y=t}function z(){return new Map}function N(){return new Map}function R(t){h=t}const J=new Set(x);let U=!1,L=!1;f||(L=!0,nt(st(new Error('"id" prop is required'))));const W={stateChange:!1},H=uo(b),q=po(b),G=new Map,Z=new Map,Y=new Map;let X=null,tt=0,et=[];function rt(t){const e=ao(t,nt);return e.hasExpression?e.applyVars(Z):t}function nt(t){E?E({error:t}):"warn"===(null==t?void 0:t.level)?console.warn(t):console.error(t)}function ot(t,e){C&&C({type:t,action:e})}let lt=0;function ct(t){return`${f}-${lt++}`}let ut={},dt={};function pt(t){vt(rt(t))}function vt(t){const e=t.url?String(t.url):"",r=t.typed;if(Ut(t))if(e)try{const r=e.replace(/div-action:\/\//,""),i=/([^?]+)\?(.+)/.exec(r);if(!i)return;const o=new URLSearchParams(i[2]);switch(i[1]){case"set_state":!function(t){if(!t)throw new Error("Missing state id");let e=Et,r=t.split("/");if(r=["root",...r],r.length<2||r.length%2!=0)throw new Error("Incorrect state id format");for(let t=0;t<r.length;t+=2){const i=r[t],n=r[t+1];let o=e.getChild(i);if(!o)return;o.setState(n),e=o}}(o.get("state_id"));break;case"set_current_item":!function(t,e){if(!t||!e)throw new Error('Missing data for "set-current-item" action');if(isNaN(Number(e)))throw new Error('Incorrect item for "set-current-item" action');const r=wt(t);r&&r.setCurrentItem(Number(e))}(o.get("id"),o.get("item"));break;case"set_previous_item":!function(t,e){if(!t)throw new Error('Missing id for "set-previous-item" action');if(e&&"clamp"!==e&&"ring"!==e)throw new Error('Incorrect overflow value for "set-previous-item" action');e=e||"clamp";const r=wt(t);r&&r.setPreviousItem(e)}(o.get("id"),o.get("overflow"));break;case"set_next_item":!function(t,e){if(!t)throw new Error('Missing id for "set-next-item" action');if(e&&"clamp"!==e&&"ring"!==e)throw new Error('Incorrect overflow value for "set-next-item" action');e=e||"clamp";const r=wt(t);r&&r.setNextItem(e)}(o.get("id"),o.get("overflow"));break;case"set_variable":const i=o.get("name"),a=o.get("value");if(i&&null!==a){const t=Z.get(i);if(t){const e=t.getType();"dict"===e||"array"===e?nt(st(new Error(`Setting ${e} variables is not supported`),{additional:{name:i}})):t.set(a)}else nt(st(new Error("Cannot find variable"),{additional:{name:i}}))}else nt(st(new Error("Incorrect set_variable_action"),{additional:{url:r}}));break;case"timer":const s=o.get("action"),l=o.get("id");X?X.execTimerAction(l,s):nt(st(new Error("Incorrect timer action"),{additional:{id:l,action:s}}));break;case"video":!function(t,e){if(t){const r=wt(t);r?"start"===e?r.start():"pause"===e?r.pause():nt(st(new Error("Unknown video action"),{additional:{id:t,action:e}})):nt(st(new Error("Video component is not found"),{additional:{id:t,action:e}}))}else nt(st(new Error("Missing id in video action"),{additional:{action:e}}))}(o.get("id"),o.get("action"));break;case"download":!function(t,e){if(t){let r;r="function"==typeof D?D(t):D,fetch(t,r).then((t=>{if(!t.ok)throw new Error("Response is not ok");return t.json()})).then((r=>{var i,o,a;if(r){if(r.templates)for(const t in r.templates)n.hasOwnProperty(t)||(n[t]=r.templates[t]);if(Array.isArray(null===(i=r.patch)||void 0===i?void 0:i.changes)){if("transactional"===r.patch.mode){const i=r.patch.changes.find((t=>{const e=yt.get(t.id);if(!e)return!0;const r=Array.isArray(t.items)?t.items.length:0;return!(!e.isSingleMode||1===r)}));if(i)return nt(st(new Error("Skipping transactional, child is not found or broken"),{additional:{url:t,id:i.id}})),void gt(null===(o=e.download_callbacks)||void 0===o?void 0:o.on_fail_actions)}r.patch.changes.forEach((t=>{const e=yt.get(t.id);e&&e.replaceWith(t.id,t.items)})),gt(null===(a=e.download_callbacks)||void 0===a?void 0:a.on_success_actions)}}else nt(st(new Error("Incorrect patch"),{additional:{url:t}}))})).catch((r=>{var i;nt(st(new Error("Failed to download the patch"),{additional:{url:t,originalError:r}})),gt(null===(i=e.download_callbacks)||void 0===i?void 0:i.on_fail_actions)}))}else nt(st(new Error("Missing url in download action"),{additional:{url:t}}))}(o.get("url"),t);break;case"show_tooltip":!function(t,e){var r;if(!t)return void nt(st(new Error("Missing id in show_tooltip action")));const i=_t.get(t);if(!i)return void nt(st(new Error("Tooltip with the provided id is not found"),{additional:{id:t}}));if("true"!==e&&et.some((e=>e.desc.id===t)))return;const n={internalId:++tt,ownerNode:i.onwerNode,desc:i.tooltip,timeoutId:0};et=[...et,n];const o=null!==(r=i.tooltip.duration)&&void 0!==r?r:5e3;o&&(n.timeoutId=window.setTimeout((()=>{n.timeoutId=0,et=et.filter((t=>t.internalId!==n.internalId))}),o))}(o.get("id"),o.get("multiple"));break;case"hide_tooltip":!function(t){t?et=et.filter((e=>{const r=e.desc.id!==t;return!r&&e.timeoutId&&(clearTimeout(e.timeoutId),e.timeoutId=null),r})):nt(st(new Error("Missing id in hide_tooltip action")))}(o.get("id"));break;default:nt(st(new Error("Unknown type of action"),{additional:{url:e}}))}}catch(t){nt(st(t,{additional:{url:e}}))}else if(r)switch(r.type){case"set_variable":{const{variable_name:t,value:e}=r;if(t&&e){const r=Z.get(t);r?r.getType()===e.type?r.setValue(e.value):nt(st(new Error("Trying to set value with invalid type"),{additional:{name:t,type:e.type}})):nt(st(new Error("Cannot find variable"),{additional:{name:t}}))}else nt(st(new Error("Incorrect set_variable action"),{additional:{name:t}}));break}case"array_insert_value":!function(t,e,r){const{variable_name:i,index:n,value:o}=r;!o||"number"!=typeof n&&void 0!==n?e(st(new Error("Incorrect array_insert_value action"),{additional:{name:i}})):yo(t,e,r,(t=>{const a=t.getValue();if("number"==typeof n&&(n<0||n>a.length))e(st(new Error(`Index out of bound for mutation ${r.type}`),{additional:{name:i,index:n,length:a.length}}));else{const e=a.slice();"number"==typeof n?e.splice(n,0,o.value):e.push(o.value),t.setValue(e)}}))}(Z,nt,r);break;case"array_remove_value":!function(t,e,r){const{variable_name:i,index:n}=r;"number"==typeof n?yo(t,e,r,(t=>{const o=t.getValue();if("number"==typeof n&&(n<0||n>=o.length))e(st(new Error(`Index out of bound for mutation ${r.type}`),{additional:{name:i,index:n,length:o.length}}));else{const e=o.slice();e.splice(n,1),t.setValue(e)}})):e(st(new Error("Incorrect array_remove_value action"),{additional:{name:i}}))}(Z,nt,r);break;case"copy_to_clipboard":!function(t,e){!e.content||"text"!==e.content.type&&"url"!==e.content.type||"string"!=typeof e.content.value?t(st(new Error("Incorrect action"),{additional:{action:e}})):"undefined"!=typeof navigator&&"clipboard"in navigator&&navigator.clipboard&&"writeText"in navigator.clipboard&&"function"==typeof navigator.clipboard.writeText?navigator.clipboard.writeText(e.content.value).catch((e=>{t(st(new Error("Failed to copy to the clipboard"),{additional:{originalError:String(e)}}))})):t(st(new Error("Clipboard is unavailable"),{additional:{action:e}}))}(nt,r);break;case"focus_element":{const t=r.element_id&&bt.get(r.element_id);t?t.focus():nt(st(new Error("Incorrect focus_element action"),{additional:{elementId:r.element_id}}));break}default:nt(st(new Error("Unknown type of action"),{additional:{type:r.type}}))}}async function gt(t,e){if(!t||!Array.isArray(t))return;const r=t.filter(Ut);for(let t=0;t<r.length;++t){let i=r[t];const n=i.url,o=i.typed;if(n){const t=xt(n);if(t)if(kt(t,J)){if(e)if("_blank"===i.target){const t=window.open("","_blank");t&&(t.opener=null,t.location=n)}else location.href=n}else"div-action"===t?(vt(i),await $()):i.log_id&&(ft(i),await $())}else o&&vt(i)}r.forEach((t=>{t.log_id&&ot("click",t)}))}function ft(t){null==A||A(t)}const ht=new Map,yt=new Map,bt=new Map,_t=new Map;function wt(t){if(ht.has(t))return ht.get(t);nt(st(new Error("Missing instance with id"),{additional:{id:t}}))}const $t=new Map;g(at,{logError:nt,logStat:ot,hasTemplate:function(t){return t in n},processTemplate:function(t,e){if(!t)return{json:t,templateContext:e};const r=new Set([t.type]);for(;t.type in n;){if(({json:t,templateContext:e}=ci(t,e,n,nt)),r.has(t.type))return{json:t,templateContext:e};r.add(t.type)}return{json:t,templateContext:e}},genId:ct,genClass:function(t){return`divkit-${ct()}`},execAction:vt,execAnyActions:gt,execCustomAction:ft,isRunning:function(t){return W[t]},setRunning:function(t,e){W[t]=e},registerInstance:function(t,e){ht.has(t)?nt(st(new Error("Duplicate instance id"),{additional:{id:t}})):ht.set(t,e)},unregisterInstance:function(t){ht.delete(t)},registerParentOf:function(t,e){yt.set(t,e)},unregisterParentOf:function(t){yt.delete(t)},registerTooltip:function(t,e){_t.has(e.id)&&nt(st(new Error("Duplicate tooltip id"),{additional:{id:e.id}})),_t.set(e.id,{onwerNode:t,tooltip:e})},unregisterTooltip:function(t){_t.delete(t.id),et.some((e=>e.desc.id===t.id))&&(et=et.filter((e=>e.desc.id!==t.id)))},onTooltipClose:function(t){et=et.filter((e=>e.internalId!==t))},tooltipRoot:j,registerFocusable:function(t,e){bt.set(t,e)},unregisterFocusable:function(t){bt.delete(t)},addSvgFilter:function(t,e){const r=`${t}:${e}`;if(dt[r]=dt[r]||0,++dt[r],ut[r])return ut[r];const i=`${ct()}-svg-filter`;return ut=Object.assign(Object.assign({},ut),{[r]:i}),i},removeSvgFilter:function(t,e){if(!t)return;const r=`${t}:${e}`;dt[r]&&0==--dt[r]&&(ut=Object.keys(ut).reduce(((t,e)=>(dt[e]&&(t[e]=ut[e]),t)),{}))},getDerivedFromVars:function(t){if(!t)return di(t);const e=ao(t,nt);return e.vars.length?K(e.vars.map((t=>Z.get(t)||function(t){const e=Y.get(t)||Q(void 0);return Y.has(t)||Y.set(t,e),e}(t))).filter(mt),(()=>e.applyVars(Z))):e.hasExpression?di(e.applyVars(Z)):di(t)},getJsonWithVars:rt,getStore:function(t){return $t.has(t)||function(t){$t.has(t)||$t.set(t,so[t]())}(t),$t.get(t)},getVariable:function(t,e){const r=Z.get(t);if(r){const i=r.getType();if(i!==e)return void nt(st(new Error(`Variable should have type "${e}"`),{additional:{name:t,foundType:i}}))}return r},getCustomization:function(t){return null==w?void 0:w[t]},getBuiltinProtocols:function(){return J},getExtension:function(t,e){const r=k.get(t);if(r)return new r(e||{})},getExtensionContext:function(){return{variables:Z,logError:nt}},typefaceProvider:V,isDesktop:S,isPointerFocus:bo,customComponents:P,componentDevtool:void 0}),g(Wt,{hasAction:()=>!1});const Et={setState(t){throw new Error("Not implemented")},getChild(t){if(Ct&&Ct.has(t))return Ct.get(t);nt(st(new Error("Missing state block with id"),{additional:{id:t}}))}};let Ct=null;function At(t){if(t.type in Sr){"integer"===t.type&&"number"==typeof t.value&&(t.value>Number.MAX_SAFE_INTEGER||t.value<Number.MIN_SAFE_INTEGER)&&nt(st(new Error("The value of the integer variable could lose accuracy"),{level:"warn",additional:{name:t.name,value:t.value}}));try{const e=Or(t.name,t.type,t.value);G.set(t.name,e),Z.set(t.name,e)}catch(e){nt(st(e,{additional:{name:t.name}}))}}}g(Vt,{registerInstance(t,e){Ct||(Ct=new Map),Ct.has(t)?nt(st(new Error("Duplicate state with id"),{additional:{id:t}})):Ct.set(t,e)},unregisterInstance(t){null==Ct||Ct.delete(t)},runVisibilityTransition:(t,e,r,i,n)=>Promise.resolve(),registerChildWithTransitionIn:(t,e,r,i)=>Promise.resolve(),registerChildWithTransitionOut:(t,e,r,i)=>Promise.resolve(),registerChildWithTransitionChange:(t,e,r,i)=>Promise.resolve(),hasTransitionChange:t=>!1,registerChild(t){},unregisterChild(t){}});const Ft=null===(c=null==h?void 0:h.card)||void 0===c?void 0:c.variables;Array.isArray(Ft)&&Ft.forEach((t=>{if(t&&t.name){if(G.has(t.name))return void nt(st(new Error("Duplicate variable"),{additional:{name:t.name}}));At(t)}}));const Dt=h.palette;Dt&&Dt[O].forEach((t=>{if(G.has(t.name))nt(st(new Error("Duplicate variable"),{additional:{name:t.name}}));else try{const e=Or(t.name,"color",t.color);G.set(t.name,e),Z.set(t.name,e)}catch(e){nt(st(e,{additional:{name:t.name}}))}}));for(const[t,e]of q)Z.has(t)||Z.set(t,e);H.subscribe((t=>{if(t&&!Z.has(t)){const e=q.get(t);Z.set(t,e);const r=Y.get(t);if(r){let t=0;e.subscribe((()=>{r.set(++t)}))}}}));const jt=null===(d=null==h?void 0:h.card)||void 0===d?void 0:d.timers;if(jt&&"undefined"!=typeof document){const t=X=new mo({logError:nt,applyVars:rt,hasVariableWithType:function(t,e){const r=Z.get(t);return(null==r?void 0:r.getType())===e},setVariableValue:function(t,e){const r=Z.get(t);r?r.setValue(e):nt(st(new Error("Cannot find variable"),{additional:{name:t}}))},execAnyActions:gt});jt.forEach((e=>t.createTimer(e)))}let Pt;v((()=>{_o--,_o||(window.removeEventListener("keydown",wo),window.removeEventListener("pointerdown",$o)),X&&X.destroy(),et.forEach((t=>{t.timeoutId&&(clearTimeout(t.timeoutId),t.timeoutId=null)}))})),void 0===e.id&&r.id&&void 0!==f&&r.id(f),void 0===e.json&&r.json&&void 0!==h&&r.json(h),void 0===e.platform&&r.platform&&void 0!==m&&r.platform(m),void 0===e.theme&&r.theme&&void 0!==y&&r.theme(y),void 0===e.globalVariablesController&&r.globalVariablesController&&void 0!==b&&r.globalVariablesController(b),void 0===e.mix&&r.mix&&void 0!==_&&r.mix(_),void 0===e.customization&&r.customization&&void 0!==w&&r.customization(w),void 0===e.builtinProtocols&&r.builtinProtocols&&void 0!==x&&r.builtinProtocols(x),void 0===e.extensions&&r.extensions&&void 0!==k&&r.extensions(k),void 0===e.onError&&r.onError&&void 0!==E&&r.onError(E),void 0===e.onStat&&r.onStat&&void 0!==C&&r.onStat(C),void 0===e.onCustomAction&&r.onCustomAction&&void 0!==A&&r.onCustomAction(A),void 0===e.onComponent&&r.onComponent&&void 0!==F&&r.onComponent(F),void 0===e.typefaceProvider&&r.typefaceProvider&&void 0!==V&&r.typefaceProvider(V),void 0===e.fetchInit&&r.fetchInit&&void 0!==D&&r.fetchInit(D),void 0===e.tooltipRoot&&r.tooltipRoot&&void 0!==j&&r.tooltipRoot(j),void 0===e.customComponents&&r.customComponents&&void 0!==P&&r.customComponents(P),void 0===e.setTheme&&r.setTheme&&void 0!==T&&r.setTheme(T),void 0===e.getDebugVariables&&r.getDebugVariables&&void 0!==z&&r.getDebugVariables(z),void 0===e.getDebugAllVariables&&r.getDebugAllVariables&&void 0!==N&&r.getDebugAllVariables(N),void 0===e.setData&&r.setData&&void 0!==R&&r.setData(R),void 0===e.execAction&&r.execAction&&void 0!==pt&&r.execAction(pt),"light"===y||"dark"===y?O=y:"system"===y?"undefined"!=typeof matchMedia?(M||(M=matchMedia("(prefers-color-scheme: dark)"),M.addListener((function(){"system"===y&&M&&(O=M.matches?"dark":"light")}))),O=M.matches?"dark":"light"):O="light":nt(st(new Error("Unsupported theme"))),O&&Dt&&Dt[O].forEach((t=>{const e=Z.get(t.name);e&&e.setValue(t.color)}));{U=!1;const t=function(t){if(!t)return st(new Error("Missing object"));const e=t.card,r=t.templates||{};if(!e)return st(new Error("Missing card"));if(!e.states||!e.states.length)return st(new Error("Missing states"));for(const t in r)if(r.hasOwnProperty(t)&&t in ai)return st(new Error("Template name collision"),{additional:{templateName:t}});for(let t=0;t<e.states.length;++t){if(!e.states[t].div)return st(new Error("Missing state div"),{additional:{stateId:e.states[t].state_id}});if("number"!=typeof e.states[t].state_id)return st(new Error("Missing state_id"),{additional:{index:t}})}return null}(h);t&&(U=!0,nt(t))}return n=h.templates||{},(null===(u=null==h?void 0:h.card)||void 0===u?void 0:u.variables)&&Array.isArray(h.card.variables)&&h.card.variables!==Ft&&h.card.variables.forEach((t=>{t&&t.name&&!G.has(t.name)&&At(t)})),o=null===(p=null==h?void 0:h.card)||void 0===p?void 0:p.states,!o||U||L||(Pt={type:"state",id:"root",width:{type:"match_parent"},height:{type:"match_parent"},states:o.map((t=>({state_id:t.state_id.toString(),div:t.div})))}),s(),U||L||!Pt?"":`<div class="${I("divkit-b023c",!0)+I(a?` ${it}`:"",!0)+I(_?` ${_}`:"",!0)}">${B(li,"RootSvgFilters").$$render(t,{svgFiltersMap:ut},{},{})} ${B(si,"Unknown").$$render(t,{div:Pt,templateContext:{},layoutParams:{tooltips:et}},{},{})}</div>`})),ko=xo;function Eo(t){return ko.render(t).html}var Co=e.M,Ao=e.Os,Fo=e.sY;export{Co as createGlobalVariablesController,Ao as createVariable,Fo as render};
|
|
1
|
+
var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};t.d(e,{M:()=>Vi,Os:()=>Wn,sY:()=>Ui}),new Set;const n="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function r(t,e,n){return e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class o{constructor(t){r(this,"_listeners","WeakMap"in n?new WeakMap:void 0),r(this,"_observer",void 0),r(this,"options",void 0),this.options=t}observe(t,e){return this._listeners.set(t,e),this._getObserver().observe(t,this.options),()=>{this._listeners.delete(t),this._observer.unobserve(t)}}_getObserver(){var t;return null!==(t=this._observer)&&void 0!==t?t:this._observer=new ResizeObserver((t=>{for(const n of t){var e;o.entries.set(n.target,n),null===(e=this._listeners.get(n.target))||void 0===e||e(n)}}))}}function i(){}function a(t){return t()}function s(t){t.forEach(a)}function l(t,...e){if(null==t){for(const t of e)t(void 0);return i}const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function c(t,e,n){return t.set(n),e}let u;function d(t){u=t}function p(){if(!u)throw new Error("Function called outside component initialization");return u}function v(t){p().$$.on_destroy.push(t)}function g(t,e){return p().$$.context.set(t,e),e}function f(t){return p().$$.context.get(t)}o.entries="WeakMap"in n?new WeakMap:void 0,new Map;const h=[],m=[];let y=[];const b=[],_=Promise.resolve();let w=!1;function $(){return w||(w=!0,_.then(C)),_}function x(t){y.push(t)}const k=new Set;let E=0;function C(){if(0!==E)return;const t=u;do{try{for(;E<h.length;){const t=h[E];E++,d(t),j(t.$$)}}catch(t){throw h.length=0,E=0,t}for(d(null),h.length=0,E=0;m.length;)m.pop()();for(let t=0;t<y.length;t+=1){const e=y[t];k.has(e)||(k.add(e),e())}y.length=0}while(h.length);for(;b.length;)b.pop()();w=!1,k.clear(),d(t)}function j(t){if(null!==t.fragment){t.update(),s(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(x)}}new Set;const A=new Set(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]),F=/^(?:area|base|br|col|command|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)$/;function V(t){return F.test(t)||"!doctype"===t.toLowerCase()}const D=/[\s'">/=\u{FDD0}-\u{FDEF}\u{FFFE}\u{FFFF}\u{1FFFE}\u{1FFFF}\u{2FFFE}\u{2FFFF}\u{3FFFE}\u{3FFFF}\u{4FFFE}\u{4FFFF}\u{5FFFE}\u{5FFFF}\u{6FFFE}\u{6FFFF}\u{7FFFE}\u{7FFFF}\u{8FFFE}\u{8FFFF}\u{9FFFE}\u{9FFFF}\u{AFFFE}\u{AFFFF}\u{BFFFE}\u{BFFFF}\u{CFFFE}\u{CFFFF}\u{DFFFE}\u{DFFFF}\u{EFFFE}\u{EFFFF}\u{FFFFE}\u{FFFFF}\u{10FFFE}\u{10FFFF}]/u;function S(t,e){const n=Object.assign({},...t);if(e){const t=e.classes,r=e.styles;t&&(null==n.class?n.class=t:n.class+=" "+t),r&&(null==n.style?n.style=H(r):n.style=H(function(t,e){const n={};for(const e of t.split(";")){const t=e.indexOf(":"),r=e.slice(0,t).trim(),o=e.slice(t+1).trim();r&&(n[r]=o)}for(const t in e){const r=e[t];r?n[t]=r:delete n[t]}return n}(n.style,r)))}let r="";return Object.keys(n).forEach((t=>{if(D.test(t))return;const e=n[t];!0===e?r+=" "+t:A.has(t.toLowerCase())?e&&(r+=" "+t):null!=e&&(r+=` ${t}="${e}"`)})),r}const O=/[&"]/g,P=/[&<]/g;function I(t,e=!1){const n=String(t),r=e?O:P;r.lastIndex=0;let o="",i=0;for(;r.test(n);){const t=r.lastIndex-1,e=n[t];o+=n.substring(i,t)+("&"===e?"&":'"'===e?""":"<"),i=t+1}return o+n.substring(i)}function M(t){return"string"==typeof t||t&&"object"==typeof t?I(t,!0):t}function T(t){const e={};for(const n in t)e[n]=M(t[n]);return e}function z(t,e){var n;t=void 0!==(null==(n=t)?void 0:n.length)?n:Array.from(n);let r="";for(let n=0;n<t.length;n+=1)r+=e(t[n],n);return r}const N={$$render:()=>""};function R(t,e){if(!t||!t.$$render)throw"svelte:component"===e&&(e+=" this={...}"),new Error(`<${e}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules. Otherwise you may need to fix a <${e}>.`);return t}let B,U;function L(t){function e(e,n,r,o,i){const a=u;d({$$:{on_destroy:B,context:new Map(i||(a?a.$$.context:[])),on_mount:[],before_update:[],after_update:[],callbacks:Object.create(null)}});const s=t(e,n,r,o);return d(a),s}return{render:(t={},{$$slots:n={},context:r=new Map}={})=>{B=[];const o={title:"",head:"",css:new Set},i=e(o,t,{},n,r);return s(B),{html:i,css:{code:Array.from(o.css).map((t=>t.code)).join("\n"),map:null},head:o.title+o.head}},$$render:e}}function W(t,e,n){return null==e||n&&!e?"":` ${t}${n&&!0===e?"":`="${I(e,!0)}"`}`}function H(t){return Object.keys(t).filter((e=>t[e])).map((e=>`${e}: ${M(t[e])};`)).join(" ")}function q(t){const e=H(t);return e?` style="${e}"`:""}function J(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function G(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?J(Object(n),!0).forEach((function(e){Z(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Z(t,e,n){return e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Y(t,e,n,r){var o;const i=null===(o=n[t])||void 0===o?void 0:o.type;if(e="Boolean"===i&&"boolean"!=typeof e?null!=e:e,!r||!n[t])return e;if("toAttribute"===r)switch(i){case"Object":case"Array":return null==e?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return null==e?null:e;default:return e}else switch(i){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":default:return e;case"Number":return null!=e?+e:e}}"function"==typeof HTMLElement&&(U=class extends HTMLElement{constructor(t,e,n){super(),Z(this,"$$ctor",void 0),Z(this,"$$s",void 0),Z(this,"$$c",void 0),Z(this,"$$cn",!1),Z(this,"$$d",{}),Z(this,"$$r",!1),Z(this,"$$p_d",{}),Z(this,"$$l",{}),Z(this,"$$l_u",new Map),this.$$ctor=t,this.$$s=e,n&&this.attachShadow({mode:"open"})}addEventListener(t,e,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const n=this.$$c.$on(t,e);this.$$l_u.set(e,n)}super.addEventListener(t,e,n)}removeEventListener(t,e,n){if(super.removeEventListener(t,e,n),this.$$c){const t=this.$$l_u.get(e);t&&(t(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){if(await Promise.resolve(),!this.$$cn)return;function t(t){return()=>{let e;return{c:function(){e=function(t){return document.createElement(t)}("slot"),"default"!==t&&function(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}(e,"name",t)},m:function(t,n){!function(t,e,n){t.insertBefore(e,n||null)}(t,e,n)},d:function(t){t&&function(t){t.parentNode&&t.parentNode.removeChild(t)}(e)}}}}const e={},n=function(t){const e={};return t.childNodes.forEach((t=>{e[t.slot||"default"]=!0})),e}(this);for(const o of this.$$s)o in n&&(e[o]=[t(o)]);for(const i of this.attributes){const a=this.$$g_p(i.name);a in this.$$d||(this.$$d[a]=Y(a,i.value,this.$$p_d,"toProp"))}this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:G(G({},this.$$d),{},{$$slots:e,$$scope:{ctx:[]}})});const r=()=>{this.$$r=!0;for(const t in this.$$p_d)if(this.$$d[t]=this.$$c.$$.ctx[this.$$c.$$.props[t]],this.$$p_d[t].reflect){const e=Y(t,this.$$d[t],this.$$p_d,"toAttribute");null==e?this.removeAttribute(t):this.setAttribute(this.$$p_d[t].attribute||t,e)}this.$$r=!1};this.$$c.$$.after_update.push(r),r();for(const s in this.$$l)for(const l of this.$$l[s]){const c=this.$$c.$on(s,l);this.$$l_u.set(l,c)}this.$$l={}}}attributeChangedCallback(t,e,n){var r;this.$$r||(t=this.$$g_p(t),this.$$d[t]=Y(t,n,this.$$p_d,"toProp"),null===(r=this.$$c)||void 0===r||r.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then((()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)}))}$$g_p(t){return Object.keys(this.$$p_d).find((e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t))||t}});const X=[];function Q(t,e=i){let n;const r=new Set;function o(e){if(i=e,((o=t)!=o?i==i:o!==i||o&&"object"==typeof o||"function"==typeof o)&&(t=e,n)){const e=!X.length;for(const e of r)e[1](),X.push(e,t);if(e){for(let t=0;t<X.length;t+=2)X[t][0](X[t+1]);X.length=0}}var o,i}function a(e){o(e(t))}return{set:o,update:a,subscribe:function(s,l=i){const c=[s,l];return r.add(c),1===r.size&&(n=e(o,a)||i),s(t),()=>{r.delete(c),0===r.size&&n&&(n(),n=null)}}}}function K(t,e,n){const r=!Array.isArray(t),o=r?[t]:t;if(!o.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const a=e.length<2;return c=(t,n)=>{let c=!1;const u=[];let d=0,p=i;const v=()=>{if(d)return;p();const o=e(r?u[0]:u,t,n);a?t(o):p="function"==typeof o?o:i},g=o.map(((t,e)=>l(t,(t=>{u[e]=t,d&=~(1<<e),c&&v()}),(()=>{d|=1<<e}))));return c=!0,v(),function(){s(g),p(),c=!1}},{subscribe:Q(n,c).subscribe};var c}const tt="divkit-bd259",et="divkit-d9099",nt="divkit-c016b",rt="divkit-ee112",ot="divkit-aa145",it="divkit-f0cba",at=Symbol("root");function st(t,e={}){const n=t;return n.level=e.level||"error",e.additional&&(n.additional=e.additional),n}const lt={"text-range":"divkit-faf07",text:"divkit-d9b0e",text_halign_left:"divkit-a4cb7",text_halign_center:"divkit-e1659",text_halign_right:"divkit-ea280",text_valign_top:"divkit-d8ce0",text_valign_center:"divkit-ef58e",text_valign_bottom:"divkit-fe8ed",text_valign_baseline:"divkit-e0c6c",text__inner:"divkit-b8528",text_singleline:"divkit-ef11c",text_multiline:"divkit-ee8e3",text_truncate_none:"divkit-c6ea1",text__inner_gradient:"divkit-cb8e0",text__image:"divkit-bf6e2",text__image_hidden:"divkit-f1002","text_has-focus-color":"divkit-cb341"},ct={outer:"divkit-d65a7","outer_hide-on-transition-in":"divkit-a6d12","outer_halign-self_start":"divkit-cc452","outer_halign-self_center":"divkit-b8331","outer_halign-self_end":"divkit-c573c","outer_halign-self_stretch":"divkit-dcc74","outer_valign-self_start":"divkit-e8077","outer_valign-self_center":"divkit-d40a7","outer_valign-self_end":"divkit-e9f84","outer_valign-self_stretch":"divkit-b7aa3","outer_parent-flex_vertical":"divkit-c143f","outer_parent-flex_horizontal":"divkit-ef302","outer_valign-self_baseline":"divkit-e72b5",outer_width_content:"divkit-b8f4d",outer_height_content:"divkit-faa66","outer_width-constrained":"divkit-d3211","outer_parent-grid":"divkit-ff439","outer_height-constrained":"divkit-a5256","outer_parent-overlap":"divkit-dab2d","outer_parent-overlap-absolute":"divkit-d43fb","outer_scroll-snap_center":"divkit-d9e38","outer_scroll-snap_start":"divkit-efd1e",outer__border:"divkit-d4056",outer_visibility_invisible:"divkit-f018b",outer_visibility_gone:"divkit-e784b","outer_has-action-animation":"divkit-f4980","outer_has-custom-focus":"divkit-c7f14"};function ut(t){if(!t)return;let e="";for(const n in t)if(t.hasOwnProperty(n)){if(!t[n]&&0!==t[n])continue;e&&(e+=";"),e+=n+":"+String(t[n])}return e||void 0}function dt(t){if("number"!=typeof t&&"string"!=typeof t||!t)return"0";const e=Number(t);return isNaN(e)?"0":Math.ceil(1e3*e)/1e4+"em"}function pt(t){let e=dt(t);return"0"===e&&(e+="em"),e}function vt(t,e){for(;t.length<e;)t="0"+t;return t}function gt(t,e=1,n="transparent"){if("#"!==(t=("string"==typeof t&&t||"").toLowerCase()).charAt(0))return n;const r=ft(t);return r?(r.a*=e,function(t){return 255===t.a?`#${[t.r,t.g,t.b].map((t=>vt(Math.round(t).toString(16),2))).join("")}`:`rgba(${t.r},${t.g},${t.b},${(t.a/255).toFixed(2)})`}(r)):n}function ft(t){const e=t.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)||t.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])$/i)||t.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)||t.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i);if(e){if(5===e.length){const[t,n,r,o,i]=e,a=2===r.length?r:r+r,s=2===o.length?o:o+o,l=2===i.length?i:i+i,c=2===n.length?n:n+n;return{a:parseInt(c,16),r:parseInt(a,16),g:parseInt(s,16),b:parseInt(l,16)}}const[t,n,r,o]=e,i=2===n.length?n:n+n,a=2===r.length?r:r+r,s=2===o.length?o:o+o;return{a:255,r:parseInt(i,16),g:parseInt(a,16),b:parseInt(s,16)}}return null}function ht(t){let e=String(t);return e.indexOf("&")>-1&&(e=e.replace(/&/g,"&")),e.indexOf("<")>-1&&(e=e.replace(/</g,"<")),e.indexOf(">")>-1&&(e=e.replace(/>/g,">")),e.indexOf('"')>-1&&(e=e.replace(/"/g,""")),e}const mt=Boolean;function yt(t){if(1===t.length&&"solid"===t[0].type)return{color:gt(t[0].color||"transparent"),size:"auto",position:"50% 50%"};const e=t.map((t=>"solid"===t.type?function(t){const e=gt(t.bg.color||"transparent");return{size:void 0,pos:void 0,image:`linear-gradient(to bottom,${e},${e})`}}({bg:t}):"gradient"===t.type?function(t){var e;if(!Array.isArray(null===(e=t.bg)||void 0===e?void 0:e.colors))return;const n=t.bg.colors.filter(mt);return n.length?{size:void 0,pos:void 0,image:"linear-gradient("+(90-Number(t.bg.angle||0))+"deg,"+n.map((t=>gt(t))).join(",")+")"}:void 0}({bg:t}):"image"===t.type?function(t){var e;const n=null===(e=t.bg)||void 0===e?void 0:e.image_url;if(n)return{size:wt(t.bg.scale),pos:$t(t.bg),image:'url("'+ht(n)+'")'}}({bg:t}):"radial_gradient"===t.type?function(t){var e;if(!Array.isArray(null===(e=t.bg)||void 0===e?void 0:e.colors))return;const n=t.bg.colors.filter(mt);if(!n.length)return;const r=t.bg.radius;let o;r&&"object"==typeof r&&"type"in r&&void 0!==r.value&&("fixed"===r.type?o=pt(r.value):"relative"===r.type&&(o=bt[r.value]));return{size:void 0,pos:void 0,image:`radial-gradient(circle ${o||"farthest-corner"} at ${_t(t.bg.center_x)} ${_t(t.bg.center_y)},`+n.map((t=>gt(t))).join(",")+")"}}({bg:t}):void 0)).filter(mt).reverse().reduce((function(t,e){return t.image.push(e.image),t.size.push(e.size||"auto"),t.position.push(e.pos||"50% 50%"),t}),{image:[],size:[],position:[]});return{image:e.image.join(","),size:e.size.join(","),position:e.position.join(",")}}const bt={nearest_corner:"closest-corner",farthest_corner:"farthest-corner",nearest_side:"closest-side",farthest_side:"farthest-side"};function _t(t){if(t&&"object"==typeof t&&"type"in t&&void 0!==t.value){if("fixed"===t.type)return pt(t.value);if("relative"===t.type)return 100*Number(t.value)+"%"}return"50%"}function wt(t){return"fit"===t?"contain":"stretch"===t?"fill":"no_scale"===t?"none":"cover"}function $t(t){let e,n;return e="left"===t.content_alignment_horizontal?"0%":"right"===t.content_alignment_horizontal?"100%":"50%",n="top"===t.content_alignment_vertical?"0%":"bottom"===t.content_alignment_vertical?"100%":"50%",e+" "+n}function xt(t){const e=/^([^/]+):\/\//.exec(t);return e&&e[1]||""}function kt(t,e){return e.has(t)}function Et(t,e,n){return"number"==typeof e&&(t&&e>0&&e<=100||!t&&e>=0&&e<100)?e:n}function Ct(t){return 0!==t.is_enabled&&!1!==t.is_enabled&&void 0!==t.index}function jt(t,e){e&&t.push(e)}function At(t,e,n){const r=[];jt(r,e[t]);for(const o in n)if(n.hasOwnProperty(o)){const i=n[o];i&&jt(r,e[`${t}_${o}`+("string"==typeof i?`_${i}`:"")])}return r.join(" ")}const Ft=Symbol("state");function Vt(t){const e=t.top||0,n=t.right||0,r=t.bottom||0,o=t.left||0;return 0===e&&0===n&&0===r&&0===o?"":dt(e)+" "+dt(n)+" "+dt(r)+" "+dt(o)}function Dt(t){if("number"!=typeof t&&"string"!=typeof t)return!1;const e=Number(t);return!isNaN(e)}function St(t){return Dt(t)&&t>=0}function Ot(t,e){if(!t)return e;const n=[t.top,t.right,t.bottom,t.left];for(let t=0;t<n.length;++t)if(n[t]&&!St(n[t]))return e;return Vt(t)}function Pt(t,e){const n=Number(t);return isNaN(n)||n<0?e:n}const It=Object.prototype.hasOwnProperty;function Mt(t,e){if(Object.is(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return Object.is(t,e);const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++){const o=n[r];if(!It.call(e,o)||!Mt(t[o],e[o]))return!1}return!0}function Tt(t,e){return Mt(t,e)?e:t}function zt(t,e){return"linear"===t||"ease"===t||"ease_in_out"===t||"ease_in"===t||"ease_out"===t?t:e}function Nt(t,e){const n=Number(t);return isNaN(n)?e:n}function Rt(t){const e=[];return"set"===t.name?(t.items||[]).forEach((t=>{e.push(...Rt(t))})):e.push(t),e}function Bt(t,e){if(!t||"object"!=typeof t)return e;const n=["top","right","bottom","left"];for(let r=0;r<n.length;++r)if(t[n[r]]&&!St(t[n[r]]))return e;return t}function Ut(t,e=0,n=10){return[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]].map((t=>dt((t||e)/n*10))).join(" ")}function Lt(t){return 0!==t.is_enabled&&!1!==t.is_enabled}let Wt;function Ht(){}const qt=Symbol("action"),Jt=L(((t,e,n,r)=>{let{componentContext:o}=e,{id:i=""}=e,{actions:a}=e,{doubleTapActions:s}=e,{longTapActions:l}=e,{cls:c=""}=e,{style:u=null}=e,{attrs:d}=e,{use:p=Ht}=e,{customAction:h=null}=e,{isNativeActionAnimation:m=!0}=e,{hasInnerFocusable:y=!1}=e;const b=f(at),_=f(qt);let w;g(qt,{hasAction:()=>Boolean(_.hasAction()||(null==a?void 0:a.length))});let $,x="",k=!1;if(v((()=>{i&&!y&&b.unregisterFocusable(i)})),void 0===e.componentContext&&n.componentContext&&void 0!==o&&n.componentContext(o),void 0===e.id&&n.id&&void 0!==i&&n.id(i),void 0===e.actions&&n.actions&&void 0!==a&&n.actions(a),void 0===e.doubleTapActions&&n.doubleTapActions&&void 0!==s&&n.doubleTapActions(s),void 0===e.longTapActions&&n.longTapActions&&void 0!==l&&n.longTapActions(l),void 0===e.cls&&n.cls&&void 0!==c&&n.cls(c),void 0===e.style&&n.style&&void 0!==u&&n.style(u),void 0===e.attrs&&n.attrs&&void 0!==d&&n.attrs(d),void 0===e.use&&n.use&&void 0!==p&&n.use(p),void 0===e.customAction&&n.customAction&&void 0!==h&&n.customAction(h),void 0===e.isNativeActionAnimation&&n.isNativeActionAnimation&&void 0!==m&&n.isNativeActionAnimation(m),void 0===e.hasInnerFocusable&&n.hasInnerFocusable&&void 0!==y&&n.hasInnerFocusable(y),Array.isArray(a)&&(null==a?void 0:a.length))for(let t=0;t<a.length;++t){const e=a[t].url;if(e){x=e,$=a[t].target||void 0;break}}return Array.isArray(a)&&(null==a?void 0:a.length)&&_.hasAction()&&(x="",o.logError(st(new Error("Actionable element is forbidden inside other actionable element"),{level:"warn",additional:{actions:a}}))),k=Boolean(h),x&&!kt(xt(x),b.getBuiltinProtocols())?(x="",k=!0):!x&&Array.isArray(a)&&(null==a?void 0:a.length)&&(k=!0,a.some((t=>t.url||t.typed))||o.logError(st(new Error("The component has a list of actions, but does not have a real action"),{level:"warn",additional:{actions:a}}))),x?`<a${S([{href:M(x)},{target:M($)},{style:M(u)},{class:I(c,!0)+" "+I(m?tt:et,!0)+" "+I(null!=l&&l.length?it:"",!0)},T(d)],{})}${W("this",w,0)}>${r.default?r.default({}):""}</a>`:` <span${S([{class:I(c,!0)+I(k?` ${m?tt:et} ${nt}`:"",!0)+" "+I(null!=l&&l.length?it:"",!0)},{style:M(u)},{role:M(k?"button":null)},{tabindex:M(k?0:null)},T(d)],{})}${W("this",w,0)}>${r.default?r.default({}):""}</span>`})),Gt="divkit-b921d";function Zt(t){return Dt(t)&&t>0}function Yt(t,e){return t.map((t=>{if("blur"===(null==t?void 0:t.type)){if(Zt(t.radius))return`blur(${pt(t.radius/2)})`}else e(st(new Error("Unknown filter"),{level:"warn",additional:{filter:null==t?void 0:t.type}}))})).filter(Boolean).join(" ")}const Xt=L(((t,e,n,r)=>{let o,{componentContext:i}=e,{background:a=[]}=e,{radius:s=""}=e;return f(at),void 0===e.componentContext&&n.componentContext&&void 0!==i&&n.componentContext(i),void 0===e.background&&n.background&&void 0!==a&&n.background(a),void 0===e.radius&&n.radius&&void 0!==s&&n.radius(s),o=a.map((t=>{const e={},n={style:e};if("nine_patch_image"===t.type&&t.insets)e["border-image"]=`url("${t.image_url}") ${t.insets.top||0} ${t.insets.right||0} ${t.insets.bottom||0} ${t.insets.left||0} fill`,e["border-image-width"]="auto";else{const r=yt([t]);"solid"===t.type&&(e["background-color"]=r.color),"gradient"===t.type&&(e["background-image"]=r.image),"image"===t.type&&(e.opacity=Number(t.alpha),n.image_url=t.image_url,e["object-fit"]=r.size,e["object-position"]=r.position,Array.isArray(t.filters)&&t.filters.length&&(e.filter=Yt(t.filters,i.logError)))}return n})),`<span${W("class","divkit-bf253"+(s?" divkit-dcad7":""),0)}${q({"border-radius":s})}>${z(o,(t=>t.image_url?`<img${W("src",t.image_url,0)} alt="" aria-hidden="true" loading="lazy" decoding="async"${W("class",Gt,0)}${W("style",ut(t.style),0)}>`:`<span${W("class",Gt,0)}${W("style",ut(t.style),0)}></span>`))}</span>`})),Qt=Xt,Kt={left:"start",center:"center",right:"end"},te={top:"start",center:"center",bottom:"end",baseline:"baseline"},ee=L(((t,e,n,r)=>{let o,a,s,c,u,d,p,g,h,m,y,b,_,w,x,k,E,C,j,A,F,V,D,S,O,P,I,M,T,z,N,B,U,L,H,q,J,G,Z,Y,X,Q,tt,et,nt,rt=i,ot=i,it=i,lt=i,vt=i,ft=i,ht=i,bt=i,_t=i,wt=i,$t=i,jt=i,Dt=i,It=i,Ht=i,qt=i,Gt=i,Zt=i,{componentContext:Yt}=e,{cls:Xt=""}=e,{style:ee}=e,{layoutParams:ne={}}=e,{customDescription:re=!1}=e,{customPaddings:oe=!1}=e,{customActions:ie=""}=e,{additionalPaddings:ae=null}=e,{heightByAspect:se=!1}=e,{parentOf:le}=e,{parentOfSimpleMode:ce}=e,{replaceItems:ue}=e,{hasInnerFocusable:de=!1}=e;const pe=f(at),ve=f(Ft);let ge,fe;I=l(pe.isPointerFocus,(t=>P=t));let he,me,ye,be,_e,we,$e,xe,ke,Ee,Ce,je,Ae,Fe,Ve,De,Se,Oe,Pe,Ie,Me=null,Te=[],ze={},Ne={},Re=!1,Be=1,Ue="transparent",Le=0,We={"top-left":0,"top-right":0,"bottom-right":0,"bottom-left":0},He="",qe=null,Je="",Ge={},Ze=0,Ye=0,Xe=0,Qe=!1,Ke=!1,tn={},en=0,nn=0,rn=0,on=!1,an=!1,sn=1,ln=[],cn=!1,un=!1,dn=[],pn=[],vn=[],gn=[],fn=[],hn=[],mn="",yn=!1,bn="visible",_n=0,wn=0,$n=!1,xn=null;function kn(t,e){if(!Array.isArray(le)||!ue)return;if(ce&&1!==(Array.isArray(e)&&e.length||0))return;const n=le.findIndex((e=>(null==e?void 0:e.id)===t)),r=le.slice();r.splice(n,1,...e||[]),le=r,ue(r)}function En(){if(Me&&ge){const t=pe.getExtensionContext();Me.forEach((e=>{var n;null===(n=e.unmountView)||void 0===n||n.call(e,ge,t)})),Me=null}}function Cn(){Yt.json.focus&&(P||($n=!0),Yt.execAnyActions(gn))}function jn(){Yt.json.focus&&($n=!1,Yt.execAnyActions(fn))}v((()=>{var t;Te.forEach((t=>{pe.unregisterParentOf(t)})),Te=[],null===(t=Yt.json.tooltips)||void 0===t||t.forEach((t=>{pe.unregisterTooltip(t)})),En()})),void 0===e.componentContext&&n.componentContext&&void 0!==Yt&&n.componentContext(Yt),void 0===e.cls&&n.cls&&void 0!==Xt&&n.cls(Xt),void 0===e.style&&n.style&&void 0!==ee&&n.style(ee),void 0===e.layoutParams&&n.layoutParams&&void 0!==ne&&n.layoutParams(ne),void 0===e.customDescription&&n.customDescription&&void 0!==re&&n.customDescription(re),void 0===e.customPaddings&&n.customPaddings&&void 0!==oe&&n.customPaddings(oe),void 0===e.customActions&&n.customActions&&void 0!==ie&&n.customActions(ie),void 0===e.additionalPaddings&&n.additionalPaddings&&void 0!==ae&&n.additionalPaddings(ae),void 0===e.heightByAspect&&n.heightByAspect&&void 0!==se&&n.heightByAspect(se),void 0===e.parentOf&&n.parentOf&&void 0!==le&&n.parentOf(le),void 0===e.parentOfSimpleMode&&n.parentOfSimpleMode&&void 0!==ce&&n.parentOfSimpleMode(ce),void 0===e.replaceItems&&n.replaceItems&&void 0!==ue&&n.replaceItems(ue),void 0===e.hasInnerFocusable&&n.hasInnerFocusable&&void 0!==de&&n.hasInnerFocusable(de),Yt.json&&ne&&(qe=null,Je="",sn=1,yn=!1,bn="visible",_n=0,wn=0,Oe=void 0,Pe=void 0,ln=Yt.fakeElement?[]:Yt.json.transition_triggers||["state_change","visibility_change"],cn=Boolean(-1!==ln.indexOf("state_change")&&Yt.json.id),un=Boolean(-1!==ln.indexOf("visibility_change")&&Yt.json.id)),o=Yt.getDerivedFromVars(Yt.json.focus),lt(),lt=l(o,(t=>N=t)),a=Yt.getDerivedFromVars(Yt.json.border),Zt(),Zt=l(a,(t=>nt=t)),s=Yt.getDerivedFromVars(Yt.json.paddings),Gt(),Gt=l(s,(t=>et=t)),c=Yt.getDerivedFromVars(Yt.json.margins),Ht(),Ht=l(c,(t=>Q=t)),u=Yt.getDerivedFromVars(Yt.json.width),Dt(),Dt=l(u,(t=>Y=t)),d=Yt.getDerivedFromVars(Yt.json.alignment_horizontal),qt(),qt=l(d,(t=>tt=t)),p=Yt.getDerivedFromVars(Yt.json.height),jt(),jt=l(p,(t=>Z=t)),g=Yt.getDerivedFromVars(Yt.json.alignment_vertical),It(),It=l(g,(t=>X=t)),h=Yt.getDerivedFromVars(Yt.json.alpha),$t(),$t=l(h,(t=>G=t)),m=Yt.getDerivedFromVars(Yt.json.accessibility),wt(),wt=l(m,(t=>J=t)),y=Yt.getDerivedFromVars(Yt.json.background),_t(),_t=l(y,(t=>q=t)),b=Yt.getDerivedFromVars(Yt.json.action),ht(),ht=l(b,(t=>L=t)),_=Yt.getDerivedFromVars(Yt.json.actions),bt(),bt=l(_,(t=>H=t)),w=Yt.getDerivedFromVars(Yt.json.doubletap_actions),ft(),ft=l(w,(t=>U=t)),x=Yt.getDerivedFromVars(Yt.json.longtap_actions),vt(),vt=l(x,(t=>B=t)),k=Yt.getDerivedFromVars(Yt.json.action_animation),it(),it=l(k,(t=>z=t)),E=Yt.getDerivedFromVars(Yt.json.visibility),ot(),ot=l(E,(t=>T=t)),C=Yt.getDerivedFromVars(Yt.json.transform),rt(),rt=l(C,(t=>M=t)),Te.forEach((t=>{pe.unregisterParentOf(t)})),Te=[],le&&le.forEach((t=>{(null==t?void 0:t.id)&&(Te.push(t.id),pe.registerParentOf(t.id,{replaceWith:kn,isSingleMode:Boolean(ce)}))}));{const t=$n&&(null==N?void 0:N.border)?N.border:nt;let e={},n={},r=!1,o="";if(t){if(t.has_shadow){const n=t.shadow;e["box-shadow"]=n?function(t){var e,n,r,o,i,a;return dt((null===(e=t.offset)||void 0===e||null===(n=e.x)||void 0===n?void 0:n.value)||0)+" "+dt((null===(r=t.offset)||void 0===r||null===(o=r.y)||void 0===o?void 0:o.value)||0)+" "+dt(null!==(i=t.blur)&&void 0!==i?i:2)+" "+gt(t.color||"#000000",null!==(a=t.alpha)&&void 0!==a?a:.19)}(n):"0 1px 2px 0 rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.07)"}if(t.stroke&&(r=!0,Be=Pt(t.stroke.width,Be),Ue=gt(t.stroke.color,1,Ue),n.border=`${dt(Be)} solid ${Ue}`),t.corners_radius?(We=function(t,e){const n=[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]];for(let t=0;t<n.length;++t)if(n[t]&&!St(n[t]))return e;return t}(t.corners_radius,We),n["border-radius"]=e["border-radius"]=Ut(We)):t.corner_radius&&(Le=Pt(t.corner_radius,Le),We={"top-left":Le,"top-right":Le,"bottom-right":Le,"bottom-left":Le},n["border-radius"]=e["border-radius"]=dt(Le)),r&&Be&&(t.corners_radius||t.corner_radius)){let t=Object.assign({},We);["top-left","top-right","bottom-right","bottom-left"].forEach((e=>{t[e]=(t[e]||0)+Be/2})),o=Ut(t)}}ze=Tt(e,ze),Ne=Tt(n,Ne),Re=r,He=o}qe=Bt(et&&!oe?et:void 0,qe),j=Vt(function(t,e){if(!t&&!e)return{};if(!e)return t;if(!t)return e;const n={};return["top","right","bottom","left"].forEach((r=>{const o=t[r];o&&(n[r]=o);const i=e[r];i&&(n[r]=(n[r]||0)+i)})),n}(qe,ae)),Je=Ot(Q,Je);{let t,e,n,r,o={},i=0,a=0,s=!1,l=!1;const c=null==Y?void 0:Y.type;if("fixed"===c)Ze=Pt(null==Y?void 0:Y.value,Ze),e=dt(Ze);else if("wrap_content"===c||("match_parent"===c||!c)&&ne.parentHorizontalWrapContent){if(t="content",("wrap_content"===c&&(null==Y?void 0:Y.constrained)||("match_parent"===c||!c)&&ne.parentHorizontalWrapContent)&&(o["width-constrained"]=!0,"horizontal"===ne.parentContainerOrientation&&(a=1)),"wrap_content"===c){const t=Y;t.min_size&&St(t.min_size.value)&&(n=dt(t.min_size.value)),t.max_size&&St(t.max_size.value)&&(r=dt(t.max_size.value))}"match_parent"!==c&&c||Yt.logError(st(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))}else t="parent","vertical"===ne.parentContainerOrientation&&ne.parentContainerWrap&&(l=!0,Yt.logError(st(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"vertical"===ne.parentLayoutOrientation?e=`calc(100% - ${pt(((null==Q?void 0:Q.left)||0)+((null==Q?void 0:Q.right)||0))})`:"horizontal"===ne.parentContainerOrientation&&(i=Y&&"weight"in Y&&Y.weight||1,ne.parentContainerWrap&&(s=!0));if("parent"===t)o["halign-self"]="stretch";else{const t=tt;o["halign-self"]="left"===t||"center"===t||"right"===t?Kt[t]:ne.parentHAlign||"start"}t&&(o.width=t),he=e,me=n,ye=r,Ye=i,Xe=a,Ge=Tt(o,Ge),Qe=s,Ke=l}{let t,e,n,r,o={},i=0,a=0,s=!1,l=!1;const c=null==Z?void 0:Z.type;if(se);else if("fixed"===c)en=Pt(null==Z?void 0:Z.value,en),e=dt(en);else if("match_parent"!==c||ne.parentVerticalWrapContent){if(t="content",("wrap_content"===c&&(null==Z?void 0:Z.constrained)||"match_parent"===c&&ne.parentVerticalWrapContent)&&(o["height-constrained"]=!0,"vertical"===ne.parentContainerOrientation&&(a=1)),"wrap_content"===c){const t=Z;(null==t?void 0:t.min_size)&&St(t.min_size.value)&&(n=dt(t.min_size.value)),(null==t?void 0:t.max_size)&&St(t.max_size.value)&&(r=dt(t.max_size.value))}"match_parent"===c&&Yt.logError(st(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))}else t="parent","horizontal"===ne.parentContainerOrientation&&ne.parentContainerWrap&&(l=!0,Yt.logError(st(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"horizontal"===ne.parentLayoutOrientation?e=`calc(100% - ${pt(((null==Q?void 0:Q.top)||0)+((null==Q?void 0:Q.bottom)||0))})`:"vertical"===ne.parentContainerOrientation&&(i=(null==Z?void 0:Z.weight)||1,ne.parentContainerWrap&&(s=!0));if("parent"===t)o["valign-self"]="stretch";else{const t=X;"top"===t||"center"===t||"bottom"===t||"baseline"===t&&"horizontal"===ne.parentContainerOrientation?o["valign-self"]=te[t]:o["valign-self"]=ne.parentVAlign||"start"}t&&(o.height=t),be=e,_e=n,we=r,nn=i,rn=a,tn=Tt(o,tn),on=s,an=l}var An,Fn,Vn;if(A=!!ne.overlapParent||void 0,F=ne.overlapParent&&(!Y||"match_parent"===Y.type)&&!ne.parentHorizontalWrapContent&&"match_parent"===(null==Z?void 0:Z.type)&&!ne.parentVerticalWrapContent,V=ne.gridArea?`${ne.gridArea.y+1}/${ne.gridArea.x+1}/span ${ne.gridArea.rowSpan}/span ${ne.gridArea.colSpan}`:void 0,Fn=sn,sn=!St(An=G)||void 0===An||An>1?Fn:Number(An),$e=1===sn?void 0:sn,fe=void 0,J&&!re&&J.description&&(fe={},fe["aria-label"]=J.description),xe=$n&&(null==N?void 0:N.background)?N.background:q,ke={},Ee=!1,Array.isArray(xe)&&(Ee=xe.some((t=>"image"===t.type||"nine_patch_image"===t.type))||Boolean(He),!Ee)){const t=yt(xe);ke["background-color"]=t.color,ke["background-image"]=t.image,ke["background-size"]=t.size,ke["background-position"]=t.position,ke["background-repeat"]="no-repeat"}Ce=void 0,cn&&Yt.json.transition_in&&pe.isRunning("stateChange")&&(Ce=!0),Ae=void 0,cn&&Yt.json.transition_change&&pe.isRunning("stateChange")&&ve.hasTransitionChange(Yt.json.id)&&(Ae=!0);{let t=H||L&&[L]||[],e=U||[],n=B||[],r=(null==N?void 0:N.on_focus)||[],o=(null==N?void 0:N.on_blur)||[];Yt.fakeElement?(t=[],e=[],n=[],r=[],o=[]):(Array.isArray(t)||(t=[],Yt.logError(st(new Error("Actions should be array")))),Array.isArray(e)||(e=[],Yt.logError(st(new Error("DoubleTapActions should be array")))),Array.isArray(n)||(n=[],Yt.logError(st(new Error("LongTapActions should be array")))),Array.isArray(r)||(r=[],Yt.logError(st(new Error("FocusActions should be array")))),Array.isArray(o)||(o=[],Yt.logError(st(new Error("BlurActions should be array"))))),(t.length||e.length||n.length)&&ie&&(t=[],e=[],n=[],Yt.logError(st(new Error(`Cannot use action on component "${ie}"`)))),dn=t.filter(Lt),pn=e.filter(Lt),vn=n.filter(Lt),gn=r.filter(Lt),fn=o.filter(Lt)}z&&(hn=Rt(z),mn=hn.map((function(t){const e=Nt(t.start_value,1),n=Nt(t.end_value,1),r=Pt(t.start_delay,0),o="undefined"!=typeof matchMedia&&(Wt||(Wt=window.matchMedia("(prefers-reduced-motion)")),Wt.matches)?0:Pt(t.duration,300),i=zt(t.interpolator,"ease_in_out").replace(/_/g,"-");switch(t.name){case"fade":return Fe=e,Ve=n,`opacity ${o}ms ${i} ${r}ms`;case"scale":return De=e,Se=n,`transform ${o}ms ${i} ${r}ms`;case"native":case"no_animation":return"";default:return Yt.logError(st(new Error("Unknown action_animation name"),{additional:{animation:t.name}})),""}})).filter(Boolean).join(", "));{const t=bn,e=function(t,e){return"visible"===t||"invisible"===t||"gone"===t?t:e}(T,bn);t!==e&&(!yn||"visible"!==bn&&"visible"!==e?bn=e:async function(t){bn=t;const e="visible"===t?"in":"out",n="in"===e?Yt.json.transition_in:Yt.json.transition_out;un&&n&&(await $(),"in"===e&&(je=!0),ve.runVisibilityTransition(Object.assign(Object.assign({},Yt.json),{visibility:"visible"}),Yt,n,ge,e).then((()=>{"in"===e&&(je=!1)})).catch((t=>{throw"in"===e&&(je=!1),t})))}(e)),yn||(yn=!0)}if(Yt.json&&ge&&!Mt(Yt.json.extensions,Ie)){let t=Ie=Yt.json.extensions;$().then((()=>{if(t===Ie&&ge&&(En(),Array.isArray(Yt.json.extensions))){const t=pe.getExtensionContext();Me=Yt.json.extensions.map((e=>{var n;const r=e.id;if(!r)return;const o=pe.getExtension(r,e.params);return o&&(null===(n=o.mountView)||void 0===n||n.call(o,ge,t)),o})).filter(mt)}}))}if(Yt&&xn&&xn.update(Yt),D=Object.assign(Object.assign(Object.assign({},Ge),tn),{"parent-overlap":A,"parent-overlap-absolute":F,"scroll-snap":ne.scrollSnap,"hide-on-transition-in":Ce||je||Ae,visibility:bn,"has-action-animation":Boolean(mn),"parent-flex":ne.parentContainerOrientation||void 0,"parent-grid":Boolean(ne.gridArea)||void 0,"has-custom-focus":Boolean($n&&Yt.json.focus)}),M&&void 0!==M.rotation){const t=M.pivot_x||{type:"pivot-percentage",value:50};_n=Nt(t.value,_n);const e="pivot-fixed"===t.type?dt(_n):`${_n}%`,n=M.pivot_y||{type:"pivot-percentage",value:50};wn=Nt(n.value,wn),Oe=`${e} ${"pivot-fixed"===n.type?dt(wn):`${wn}%`}`,Pe=`rotate(${M.rotation}deg)`}return S=Qe||on?"100%":Ye||nn?0:void 0,O=Object.assign(Object.assign(Object.assign(Object.assign({},ee),ke),ze),{width:he,"min-width":me,"max-width":ye,height:be,"min-height":_e,"max-height":we||(null==ee?void 0:ee["max-height"]),"grid-area":V,padding:j,margin:Je,opacity:$e,transition:mn,"transform-origin":Oe,transform:Pe,"flex-grow":Ye||nn||void 0,"flex-shrink":Xe||rn?1:void 0,"flex-basis":S,"--divkit-animation-opacity-start":Fe,"--divkit-animation-opacity-end":Ve,"--divkit-animation-scale-start":De,"--divkit-animation-scale-end":Se}),I(),rt(),ot(),it(),lt(),vt(),ft(),ht(),bt(),_t(),wt(),$t(),jt(),Dt(),It(),Ht(),qt(),Gt(),Zt(),Ke||an?"":`${R(Jt,"Actionable").$$render(t,{componentContext:Yt,id:Yt.json.id,use:function(t){var e;ge=t,cn&&Yt.json.transition_in&&ve.registerChildWithTransitionIn(Yt.json,Yt,Yt.json.transition_in,t).then((()=>{Ce=!1})).catch((t=>{throw Ce=!1,t})),cn&&Yt.json.transition_out&&ve.registerChildWithTransitionOut(Yt.json,Yt,Yt.json.transition_out,t),cn&&Yt.json.transition_change&&ve.registerChildWithTransitionChange(Yt.json,Yt,Yt.json.transition_change,t).then((()=>{Ae=!1})).catch((t=>{throw Ae=!1,t}));const n=Yt.fakeElement?[]:Yt.json.visibility_actions||Yt.json.visibility_action&&[Yt.json.visibility_action],r=Yt.fakeElement?[]:Yt.json.disappear_actions;let o;(Array.isArray(n)&&n.length||Array.isArray(r)&&r.length)&&(o=function(t,{visibilityActions:e,disappearActions:n,rootCtx:r,componentContext:o}){const i=[];e&&e.forEach((t=>{i.push({type:"visibility",index:i.length,action:t,visible:!1,count:0,finished:!1})})),n&&n.forEach((t=>{i.push({type:"disappear",index:i.length,action:t,visible:!1,count:0,finished:!1})}));const a=i.map(((t,e)=>{const n="visibility"===t.type;return o.getDerivedFromVars({index:e,visibility_percentage:t.action.visibility_percentage,visibility_duration:n?t.action.visibility_duration:t.action.disappear_duration,log_limit:t.action.log_limit,is_enabled:t.action.is_enabled})}));let s;const l=()=>{s&&s.disconnect(),i.forEach((t=>{t.timer&&clearTimeout(t.timer)}))},c=K(a,(t=>t)).subscribe((e=>{const n=e.filter(Ct),a={};n.forEach((t=>{a[t.index]=t})),l();const c=[...new Set(n.map((t=>{const e="visibility"===i[t.index].type;return Et(e,t.visibility_percentage,e?50:0)/100})))];c.length&&(s=new IntersectionObserver((t=>{t.forEach((t=>{n.forEach((e=>{const n=i[e.index],a="visibility"===n.type,s=Et(a,e.visibility_percentage,a?50:0);let l;l=0===s?t.intersectionRatio>=1e-12:t.intersectionRatio>=s/100;const c=a?!n.visible&&l:n.visible&&!l,u=a?!l:l;c?n.finished||(n.timer=setTimeout((()=>{++n.count;const t=0===e.log_limit?1/0:e.log_limit||1;++n.count>=t&&(n.finished=!0);const i=o.getJsonWithVars(n.action),s=i.url,l=i.typed;if(s){const t=xt(s);t&&!kt(t,r.getBuiltinProtocols())&&("div-action"===t?r.execAction(i):i.log_id&&r.execCustomAction(i))}else l&&r.execAction(i);r.logStat(a?"visible":"disappear",i)}),e.visibility_duration||800)):u&&n.timer&&clearTimeout(n.timer),n.visible=l}))}))}),{threshold:c}),s.observe(t))}));return{destroy(){l(),c()}}}(t,{visibilityActions:n,disappearActions:r,rootCtx:pe,componentContext:Yt}));const i=Yt.json.id;return i&&ve.registerChild(i),null===(e=Yt.json.tooltips)||void 0===e||e.forEach((e=>{pe.registerTooltip(t,e)})),{destroy(){i&&ve.unregisterChild(i),o&&o.destroy(),xn&&xn.destroy()}}},cls:Xt+" "+At("outer",ct,D),style:ut(O),actions:dn,doubleTapActions:pn,longTapActions:vn,attrs:fe,hasInnerFocusable:de,isNativeActionAnimation:!hn.length||(Vn=hn,Vn.some((t=>"native"===t.name)))},{},{default:()=>` ${Ee?`${R(Qt,"OuterBackground").$$render(t,{componentContext:Yt,background:xe,radius:He},{},{})}`:""}${r.default?r.default({focusHandler:Cn,blurHandler:jn,hasCustomFocus:$n}):""}${Re?`<span${W("class",ct.outer__border,0)}${W("style",ut(Ne),0)}></span>`:""}`})}`})),ne=ee,re={"text-range":"divkit-faf07","text-range_singleline":"divkit-ccb64","text-range__top-offset":"divkit-d9237","text-range_decoration_both":"divkit-d7e07","text-range_decoration_underline":"divkit-f3dde","text-range_decoration_strike":"divkit-d27b7","text-range_decoration_none":"divkit-c6b0f"};function oe(t,e){const n=Number(t);return isNaN(n)||n<=0?e:n}function ie(t){if("light"===t||"medium"===t||"bold"===t||"regular"===t)return"medium"===t?500:"bold"===t?700:"light"===t?300:400}function ae(t,e){return ie(t)||e}const se=L(((t,e,n,r)=>{let o,i,a,s,l,c;var u,d;let{componentContext:p}=e,{text:v}=e,{rootFontSize:g}=e,{textStyles:h={}}=e,{singleline:m=!1}=e,{actions:y}=e;const b=f(at);let _,w="none",$=12,x=1.25,k="",E="",C="",j=null;void 0===e.componentContext&&n.componentContext&&void 0!==p&&n.componentContext(p),void 0===e.text&&n.text&&void 0!==v&&n.text(v),void 0===e.rootFontSize&&n.rootFontSize&&void 0!==g&&n.rootFontSize(g),void 0===e.textStyles&&n.textStyles&&void 0!==h&&n.textStyles(h),void 0===e.singleline&&n.singleline&&void 0!==m&&n.singleline(m),void 0===e.actions&&n.actions&&void 0!==y&&n.actions(y),p.json&&(w="none",$=12,x=1.25,k="",_=void 0,E="",C="",j=null);{let t="none";(h.underline||h.strike)&&("single"===h.underline&&"single"===h.strike?t="both":"single"===h.underline?t="underline":"single"===h.strike&&(t="strike")),w=t}return $=oe(h.font_size,$),Zt(h.line_height)&&(x=Number(h.line_height)/$),St(h.letter_spacing)&&(k=dt(h.letter_spacing)),_=ae(h.font_weight,_),E="string"==typeof h.font_family&&h.font_family?b.typefaceProvider(h.font_family,{fontWeight:_||400}):"",C=gt(h.text_color,1,C),o=h.top_offset?dt(h.top_offset):"",i=h.background?yt([h.background]):null,j=(null===(u=h.border)||void 0===u?void 0:u.stroke)&&h.border.stroke.color&&"transparent"!==gt(h.border.stroke.color)&&Zt(h.border.stroke.width)?{color:h.border.stroke.color,width:h.border.stroke.width}:null,a=oe(null===(d=h.border)||void 0===d?void 0:d.corner_radius,0),s=h.text_shadow?function(t,e){var n,r,o,i,a,s;return"drop-shadow("+gt(t.color||"#000000",null!==(n=t.alpha)&&void 0!==n?n:.19)+" "+dt(10*((null===(r=t.offset)||void 0===r||null===(o=r.x)||void 0===o?void 0:o.value)||0)/e)+" "+dt(10*((null===(i=t.offset)||void 0===i||null===(a=i.y)||void 0===a?void 0:a.value)||0)/e)+" "+dt(10*(null!==(s=t.blur)&&void 0!==s?s:2)/e)+")"}(h.text_shadow,$):void 0,l={singleline:m,decoration:w},c={"font-size":dt(10*$/g),"line-height":x,"letter-spacing":k,"font-weight":_,"font-family":E,filter:s,color:C,background:(null==i?void 0:i.color)||void 0,"box-shadow":j?`inset 0 0 0 ${dt(j.width)} ${j.color}`:void 0,"border-radius":a?dt(a):void 0},`${o?`<span${W("class",re["text-range__top-offset"],0)}${q({"margin-top":o})}></span>`:""}${R(Jt,"Actionable").$$render(t,{componentContext:p,cls:At("text-range",re,l),actions:y,style:ut(c)},{},{default:()=>`${I(v)}`})}`})),le=se;function ce(t,e){return"left"===t||"center"===t||"right"===t?t:e}function ue(t,e){return"top"===t||"center"===t||"bottom"===t||"baseline"===t?t:e}function de(t,e){return 1===t||0===t||!1===t||!0===t?Boolean(t):e}function pe(t,e){return"source_in"===t||"source_atop"===t||"darken"===t||"lighten"===t||"multiply"===t||"screen"===t?t:e}const ve=L(((t,e,n,r)=>{let o,a,s,c,u,d,p,g,h,m,y,b,_,w,$,x,k,E,C,j,A,F,V,D,S,O,P,I,M,T,N,B,U,L,H,q,J,G=i,Z=i,Y=i,X=i,Q=i,K=i,tt=i,et=i,rt=i,ot=i,it=i,st=i,ct=i,pt=i,vt=i,{componentContext:ft}=e,{layoutParams:ht}=e;const mt=f(at);let bt="",_t=12,wt=1.25,$t=!1,xt="",kt="",Et=!1,Ct="left",jt="top",Ft="",Vt="",Dt="",St=!1,Ot=[],Pt=[];var It;v((()=>{Pt.forEach((([t,e])=>{mt.removeSvgFilter(t,e)}))})),void 0===e.componentContext&&n.componentContext&&void 0!==ft&&n.componentContext(ft),void 0===e.layoutParams&&n.layoutParams&&void 0!==ht&&n.layoutParams(ht),ft.json&&(_t=12,wt=1.25,$t=!1,xt="",kt="",Et=!1,Ct="left",jt="top",Ft="",Dt="",St=!1),o=ft.getDerivedFromVars(ft.json.text),vt(),vt=l(o,(t=>J=t)),a=ft.getDerivedFromVars(ft.json.ranges),Z(),Z=l(a,(t=>D=t)),s=ft.getDerivedFromVars(ft.json.images),G(),G=l(s,(t=>V=t)),c=ft.getDerivedFromVars({font_size:ft.json.font_size,letter_spacing:ft.json.letter_spacing,font_weight:ft.json.font_weight,font_family:ft.json.font_family,text_color:ft.json.text_color,underline:ft.json.underline,strike:ft.json.strike,line_height:ft.json.line_height,text_shadow:ft.json.text_shadow}),Y(),Y=l(c,(t=>S=t)),u=ft.getDerivedFromVars(ft.json.font_size),pt(),pt=l(u,(t=>q=t)),d=ft.getDerivedFromVars(ft.json.line_height),ct(),ct=l(d,(t=>H=t)),p=ft.getDerivedFromVars(ft.json.max_lines),rt(),rt=l(p,(t=>N=t)),g=ft.getDerivedFromVars(ft.json.text_alignment_horizontal),it(),it=l(g,(t=>U=t)),h=ft.getDerivedFromVars(ft.json.text_alignment_vertical),ot(),ot=l(h,(t=>B=t)),m=ft.getDerivedFromVars(ft.json.text_color),et(),et=l(m,(t=>T=t)),y=ft.getDerivedFromVars(ft.json.focused_text_color),tt(),tt=l(y,(t=>M=t)),b=ft.getDerivedFromVars(ft.json.truncate),K(),K=l(b,(t=>I=t)),_=ft.getDerivedFromVars(ft.json.text_gradient),Q(),Q=l(_,(t=>P=t)),w=ft.getDerivedFromVars(ft.json.selectable),X(),X=l(w,(t=>O=t)),$=ft.getDerivedFromVars(ft.json.auto_ellipsize),st(),st=l($,(t=>L=t)),It=J,bt=String(null!=It?It:""),_t=oe(q,_t);{const t=H;Zt(t)?(wt=Number(t)/_t,$t=!0):$t=!1}x=1===N;{let t="",e="",n=!1;if(N&&N>1){let r=Number(N);t=r*wt+"em",e=r,n=!0}else L&&1!==N&&(n=!0);xt=t,kt=e,Et=n}Ct=ce(U,Ct),jt=ue(B,jt),k=!D||bt&&1===D.length&&D[0]&&0===D[0].start&&"number"==typeof D[0].end&&D[0].end>=bt.length,E=Boolean(T)!==Boolean(D&&D[0]&&D[0].text_color);{let t="";N&&k&&E&&(t=gt(T||D&&D[0]&&D[0].text_color,1,Ft)),Ft=t}Vt=gt(M,1,Vt),C="none"===I?"none":"";{let t="";if(P){const e=yt([P]);e.image&&(t=e.image)}Dt=t}return St=de(O,St),function(t,e,n){let r=[];if(Pt.forEach((([t,e])=>{mt.removeSvgFilter(t,e)})),Pt=[],!(Array.isArray(e)&&e.length||Array.isArray(n)&&n.length&&t))return void(Ot=[]);const o=t;let i=e||[{start:0,end:o.length}],a=n||[],s=0,l=[],c=[];i.forEach((t=>{void 0!==t.start&&void 0!==t.end&&(c.push({index:t.start,range:t,type:"rangeStart",isStart:!0}),c.push({index:t.end,range:t,type:"rangeEnd"}))})),a.forEach(((t,e)=>{void 0!==t.start&&t.url&&t.start<=o.length&&c.push({index:t.start,image:t,type:"image",arrayIndex:e})})),c.sort(((t,e)=>t.index===e.index?t.type!==e.type?"image"===t.type?-1:"image"===e.type?1:t.type<e.type?-1:1:"image"===t.type&&"image"===e.type?e.arrayIndex-t.arrayIndex:"rangeStart"===t.type&&"rangeStart"===e.type?t.range.end-e.range.end:"rangeStart"===t.type?1:"rangeStart"===e.type?-1:"image"!==t.type&&"image"!==e.type?t.range.start-e.range.start:0:t.index-e.index)),c.forEach((t=>{var e,n;let i="image"===t.type?null:t.range,a=t.index;if(a>s){let i=Object.assign(Object.assign({},S),...l);r.push({text:o.substring(s,a),textStyles:i,actions:"rangeEnd"===t.type&&(null===(n=null===(e=t.range)||void 0===e?void 0:e.actions)||void 0===n?void 0:n.filter(Lt))||void 0})}if("rangeStart"===t.type&&i)l.push(i);else if("rangeEnd"===t.type)l=l.filter((e=>e!==t.range));else if("image"===t.type){let e=Object.assign(Object.assign({},S),...l),n=dt(10*(t.image.width&&t.image.width.value||20)/(e.font_size||12)),o=dt(10*(t.image.height&&t.image.height.value||20)/(e.font_size||12));const i={"font-size":dt(10*(Number(e.font_size)||12)/_t)};let a="";const s=t.image.tint_color,c=pe(t.image.tint_mode,"source_in");if(s){const e=gt(t.image.tint_color);a=mt.addSvgFilter(e,c),Pt.push([e,c])}r.push({image:{url:t.image.url,width:n,height:o,wrapperStyle:i,svgFilterId:a}})}s=a})),s<o.length&&r.push({text:o.substring(s),textStyles:Object.assign({},S)}),Ot=r}(bt,D,V),j={singleline:x,multiline:Et,halign:Ct,valign:jt,truncate:C,"has-focus-color":Boolean(Vt)},A={gradient:Boolean(Dt)},F={"font-size":dt(_t),"line-height":wt,"max-height":xt,"-webkit-line-clamp":kt,color:Ft,"background-image":Dt,"--divkit-text-focus-color":Vt},G(),Z(),Y(),X(),Q(),K(),tt(),et(),rt(),ot(),it(),st(),ct(),pt(),vt(),`${R(ne,"Outer").$$render(t,{cls:At("text",lt,j)+" "+(St?"":nt),componentContext:ft,layoutParams:ht},{},{default:()=>`<span${W("class",At("text__inner",lt,A),0)}${W("style",ut(F),0)}>${Ot.length?`${z(Ot,(e=>"text"in e?e.text?`${R(le,"TextRangeView").$$render(t,{componentContext:ft,text:e.text,rootFontSize:_t,textStyles:e.textStyles,singleline:x,actions:e.actions},{},{})}`:"":e.image?`<span${W("style",ut(e.image.wrapperStyle),0)}><img${W("class",lt.text__image,0)}${W("src",e.image.url,0)} loading="lazy" decoding="async" aria-hidden="true" alt=""${W("style",ut({width:e.image.width,height:e.image.height,"margin-top":$t?`-${e.image.height}`:void 0,"margin-bottom":$t?`-${e.image.height}`:void 0,filter:e.image.svgFilterId?`url(#${e.image.svgFilterId})`:void 0}),0)}></span>`:""))}`:`${R(le,"TextRangeView").$$render(t,{componentContext:ft,text:bt,rootFontSize:_t,textStyles:S,singleline:x},{},{})}`}</span>`})}`})),ge=ve,fe={container:"divkit-d37d6",container_wrap:"divkit-c8551",container_overflow_visible:"divkit-f315a",container_orientation_vertical:"divkit-ddc33",container_valign_top:"divkit-a331a",container_valign_center:"divkit-aae61",container_valign_bottom:"divkit-c2226","container_valign_space-between":"divkit-ce053","container_valign_space-around":"divkit-cf29b","container_valign_space-evenly":"divkit-b4b04",container_halign_left:"divkit-a3091",container_halign_center:"divkit-bac9d",container_halign_right:"divkit-f4230","container_halign_space-between":"divkit-e5c38","container_halign_space-around":"divkit-feff2","container_halign_space-evenly":"divkit-e5e05",container_orientation_horizontal:"divkit-fe458",container_orientation_overlap:"divkit-a644d"};function he(t){return{top:Number(null==t?void 0:t.top)||0,right:Number(null==t?void 0:t.right)||0,bottom:Number(null==t?void 0:t.bottom)||0,left:Number(null==t?void 0:t.left)||0}}function me(t,e,n){const r=((null==e?void 0:e.margins.left)||0)+((null==e?void 0:e.margins.right)||0),o=((null==e?void 0:e.margins.top)||0)+((null==e?void 0:e.margins.bottom)||0);null!=e&&e.show_at_start&&(n?t.top=e.style.height+o:t.left=e.style.width+r),null!=e&&e.show_at_end&&(n?t.bottom=e.style.height+o:t.right=e.style.width+r)}function ye(t,e,n){let r;const o=((null==e?void 0:e.margins.left)||0)+((null==e?void 0:e.margins.right)||0),i=((null==e?void 0:e.margins.top)||0)+((null==e?void 0:e.margins.bottom)||0),a=((null==n?void 0:n.margins.left)||0)+((null==n?void 0:n.margins.right)||0),s=((null==n?void 0:n.margins.top)||0)+((null==n?void 0:n.margins.bottom)||0);return r="horizontal"===t?[null!=n&&n.show_between?n.style.height+s:0,null!=e&&e.show_between?e.style.width+o:0]:[null!=e&&e.show_between?e.style.height+i:0,null!=n&&n.show_between?n.style.width+a:0],r.map(dt).join(" ")}function be(t){var e;const n=null===(e=t.width)||void 0===e?void 0:e.type;return"wrap_content"===n||"fixed"===n}function _e(t){var e;return"match_parent"!==(null===(e=t.height)||void 0===e?void 0:e.type)}function we(t,e,n){if(!(t&&t.shape&&t.shape.type&&e.includes(t.shape.type)&&"shape_drawable"===t.type))return n;let r;if("rounded_rectangle"===t.shape.type)r={width:Pt(null===(i=(o=t.shape).item_width)||void 0===i?void 0:i.value,10),height:Pt(null===(a=o.item_height)||void 0===a?void 0:a.value,10),radius:Pt(null===(s=o.corner_radius)||void 0===s?void 0:s.value,5)};else{if("circle"!==t.shape.type)return n;r=function(t){var e;const n=2*Pt(null===(e=t.radius)||void 0===e?void 0:e.value,10);return{width:n,height:n,radius:n}}(t.shape)}var o,i,a,s;return function(t,e,n){var r;const o={},i=e.stroke||(null==n?void 0:n.stroke),a=null!=i&&i.color?gt(i.color):"",s=null!=i&&i.width?Number(null!==(r=i.width)&&void 0!==r?r:1):"";o.width=t.width,o.height=t.height,o.borderRadius=t.radius;const l=e.background_color||(null==n?void 0:n.color);return o.background=gt(l),a&&s&&(o.boxShadow=`inset 0 0 0 ${dt(s)} ${a}`),o}(r,t.shape,{color:t.color,stroke:t.stroke})}let $e;function xe(){if("undefined"==typeof document&&($e=!0),void 0!==$e)return $e;const t=document.createElement("div");return t.style.position="absolute",t.style.display="flex",t.style.flexDirection="column",t.style.gap="1px",t.appendChild(document.createElement("div")),t.appendChild(document.createElement("div")),document.body.appendChild(t),$e=1===t.scrollHeight,document.body.removeChild(t),$e}const ke="divkit-a7719",Ee="divkit-f6e9a";function Ce(t,e,n,r,o,i){const a=e.margins.left,s=e.margins.right,l=e.margins.top,c=e.margins.bottom;i?t.push({top:n.bottom+l,left:o.left+a,width:Math.max(0,o.right-o.left-a-s),height:r.top-n.bottom-l-c,style:e.style}):t.push({top:o.top+l,left:n.right+a,width:r.left-n.right-a-s,height:Math.max(0,o.bottom-o.top-l-c),style:e.style})}function je(t,e,n,r,o,i){const a={top:Math.min(...n.map((t=>t.top))),right:Math.max(...n.map((t=>t.right))),bottom:Math.max(...n.map((t=>t.bottom))),left:Math.min(...n.map((t=>t.left)))};if(null==e?void 0:e.show_at_start){let s,l;"space-around"===o||"space-evenly"===o?(s=i.left-e.style.width,l=i.top-e.style.height):(s=n[0].left-e.style.width-e.margins.left-e.margins.right,l=n[0].top-e.style.height-e.margins.top-e.margins.bottom),Ce(t,e,{top:0,right:s,bottom:l,left:0},n[0],a,r)}if(null==e?void 0:e.show_between)for(let o=0;o<n.length-1;++o)Ce(t,e,n[o],n[o+1],a,r);if(null==e?void 0:e.show_at_end){const s=n[n.length-1];let l,c;"space-around"===o||"space-evenly"===o?(l=i.bottom+e.style.height,c=i.right+e.style.width):(l=s.bottom+e.style.height+e.margins.top+e.margins.bottom,c=s.right+e.style.width+e.margins.left+e.margins.right),Ce(t,e,s,{top:l,right:0,bottom:0,left:c},a,r)}}const Ae=L(((t,e,n,r)=>{let o,{orientation:i}=e,{separator:a}=e,{lineSeparator:s}=e,{contentHAlign:l}=e,{contentVAlign:c}=e;const u=function(t,e){let n,r=0,o=!1;return function(){const e=Date.now();return!r||Math.abs(e-r)>10?(r=e,n=t.apply(this,arguments)):(o||(o=!0,setTimeout((()=>{o=!1,n=t.apply(this,arguments)}),10)),n)}}((function(){if(!o)return;const t=o.getBoundingClientRect(),e=window.getComputedStyle(o),n={top:t.top+parseFloat(e.paddingTop),right:t.right-parseFloat(e.paddingRight),bottom:t.bottom-parseFloat(e.paddingBottom),left:t.left+parseFloat(e.paddingLeft)};p=[];let r=[...o.children].filter((t=>t!==d&&!t.classList.contains(ct.outer__border))),u=[];for(;r.length;){const t=[],e=r.shift();t.push(e);let n=e.getBoundingClientRect(),o=n.right,a=n.bottom;for(;r.length;){let e=r[0],n=e.getBoundingClientRect();if("vertical"===i){if(n.top<a)break}else if(n.left<o)break;o=Math.max(o,n.right),a=Math.max(a,n.bottom),t.push(e),r.shift()}u.push(t)}const v=[];u.forEach((t=>{const e=t.map((t=>function(t){const e=t.getBoundingClientRect(),n=getComputedStyle(t);return{top:e.top-parseFloat(n.marginTop),right:e.right+parseFloat(n.marginRight),bottom:e.bottom+parseFloat(n.marginBottom),left:e.left-parseFloat(n.marginLeft)}}(t)));a&&je(p,a,e,"vertical"===i,"vertical"===i?c:l,n);const r={top:Math.min(...e.map((t=>t.top))),right:Math.max(...e.map((t=>t.right))),bottom:Math.max(...e.map((t=>t.bottom))),left:Math.min(...e.map((t=>t.left)))};v.push(r)})),s&&je(p,s,v,"horizontal"===i,"vertical"===i?l:c,n),p.forEach((e=>{e.top-=t.top,e.left-=t.left}))}));let d,p=[],g=!1,f=null,h=null;return v((()=>{g=!1})),void 0===e.orientation&&n.orientation&&void 0!==i&&n.orientation(i),void 0===e.separator&&n.separator&&void 0!==a&&n.separator(a),void 0===e.lineSeparator&&n.lineSeparator&&void 0!==s&&n.lineSeparator(s),void 0===e.contentHAlign&&n.contentHAlign&&void 0!==l&&n.contentHAlign(l),void 0===e.contentVAlign&&n.contentVAlign&&void 0!==c&&n.contentVAlign(c),o=null,(g&&o||f||h)&&(f&&(f.disconnect(),f=null),h&&(h.disconnect(),h=null),g&&o&&("undefined"!=typeof MutationObserver&&(f=new MutationObserver((function(t){t.some((t=>{var e;const n=null===(e=t.target)||void 0===e?void 0:e.classList;return!(null==n?void 0:n.contains(Ee))&&!(null==n?void 0:n.contains(ke))}))&&u()})),f.observe(o,{childList:!0,attributes:!0,characterData:!0,subtree:!0})),"undefined"!=typeof ResizeObserver&&(h=new ResizeObserver(u),h.observe(o)))),g&&o&&u(),` <div${W("class",ke,0)}${W("this",d,0)}>${z(p,(t=>`<div${W("class","divkit-c770e",0)}${q({left:`${t.left}px`,top:`${t.top}px`,width:`${t.width}px`,height:`${t.height}px`})}><div${W("class",Ee,0)}${q({width:`${t.style.width}px`,height:`${t.style.height}px`,"border-radius":`${t.style.borderRadius}px`,background:t.style.background,"box-shadow":t.style.boxShadow})}></div> </div>`))}</div>`})),Fe={left:"start",center:"center",right:"end","space-between":"start","space-around":"start","space-evenly":"start"},Ve={top:"start",center:"center",bottom:"end",baseline:"baseline","space-between":"start","space-around":"start","space-evenly":"start"},De=["rounded_rectangle","circle"],Se=L(((t,e,n,r)=>{let o,a,s,c,u,d,p,v,g,h,m,y,b,_,w,$,x,k,E,C,j,A,F,V,D,S,O,P,I,M,T=i,N=i,B=i,U=i,L=i,W=i,H=i,q=i,J=i,G=i,Z=i,Y=i;var X,Q,tt,et,nt,rt,ot;let{componentContext:it}=e,{layoutParams:st}=e;const lt=f(at);let ct,ut,dt="vertical",pt="top",vt="left",gt=null,ft=null,ht={},yt=[];void 0===e.componentContext&&n.componentContext&&void 0!==it&&n.componentContext(it),void 0===e.layoutParams&&n.layoutParams&&void 0!==st&&n.layoutParams(st),it.json&&(dt="vertical",pt="top",vt="left",ut=void 0),o=it.json.items,a=it.getDerivedFromVars(null===(X=it.json.item_builder)||void 0===X?void 0:X.data,void 0,!0),Y(),Y=l(a,(t=>M=t)),s=it.getDerivedFromVars(it.json.orientation),Z(),Z=l(s,(t=>I=t)),c=it.getDerivedFromVars(it.json.layout_mode),G(),G=l(c,(t=>P=t)),u=it.getDerivedFromVars(it.json.content_alignment_vertical),q(),q=l(u,(t=>S=t)),d=it.getDerivedFromVars(it.json.content_alignment_horizontal),H(),H=l(d,(t=>D=t)),p=it.getDerivedFromVars(it.json.separator),W(),W=l(p,(t=>V=t)),v=it.getDerivedFromVars(it.json.line_separator),L(),L=l(v,(t=>F=t)),g=it.getDerivedFromVars(it.json.aspect),U(),U=l(g,(t=>A=t)),h=it.getDerivedFromVars(it.json.width),N(),N=l(h,(t=>C=t)),m=it.getDerivedFromVars(it.json.height),B(),B=l(m,(t=>j=t)),y=it.getDerivedFromVars(it.json.clip_to_bounds),T(),T=l(y,(t=>E=t));{let t=[];if(it.json.item_builder&&Array.isArray(M)&&Array.isArray(it.json.item_builder.prototypes)){const e=it.json.item_builder;t=[],M.forEach((n=>{if(null===n||"object"!=typeof n)return;const r=lt.preparePrototypeVariables(e.data_element_name||"it",n);let o;for(let t=0;t<e.prototypes.length;++t){const n=e.prototypes[t];if(n.div){if(void 0===n.selector){o=n.div;break}if(it.getJsonWithVars(n.selector,r)){o=n.div;break}}}o&&t.push({div:o,vars:r})}))}else t=(o||[]).map((t=>({div:t})));yt=t.map(((t,e)=>it.produceChildContext(t.div,{path:e,variables:t.vars})))}{let t=[];yt.forEach((e=>{t.push(it.getDerivedFromVars({width:e.json.width,height:e.json.height}))})),ct=K(t,(t=>[...t])),J(),J=l(ct,(t=>O=t))}if(dt=function(t,e){return"vertical"===t||"horizontal"===t||"overlap"===t?t:e}(I,dt),b="wrap"===P,_="horizontal"!==dt&&!b&&O.some(be),w="vertical"!==dt&&!b&&O.some(_e),pt=function(t,e){return"top"===t||"center"===t||"bottom"===t||"baseline"===t||"space-between"===t||"space-around"===t||"space-evenly"===t?t:e}(S,pt),vt=function(t,e){return"left"===t||"center"===t||"right"===t||"space-between"===t||"space-around"===t||"space-evenly"===t?t:e}(D,vt),(null==V?void 0:V.style)&&"overlap"!==dt&&xe()){const t=we(V.style,De,(null==gt?void 0:gt.style)||null);gt=t?{show_at_start:Boolean(null!==(Q=V.show_at_start)&&void 0!==Q&&Q),show_at_end:Boolean(null!==(tt=V.show_at_end)&&void 0!==tt&&tt),show_between:Boolean(null===(et=V.show_between)||void 0===et||et),style:t,margins:he(V.margins)}:null}else gt=null;if((null==F?void 0:F.style)&&"overlap"!==dt&&xe()){const t=we(F.style,De,(null==ft?void 0:ft.style)||null);ft=t?{show_at_start:Boolean(null!==(nt=F.show_at_start)&&void 0!==nt&&nt),show_at_end:Boolean(null!==(rt=F.show_at_end)&&void 0!==rt&&rt),show_between:Boolean(null===(ot=F.show_between)||void 0===ot||ot),style:t,margins:he(F.margins)}:null}else ft=null;$=gt||ft?function(t,e,n){const r={};return me(r,e,"vertical"===t),me(r,n,"horizontal"===t),r}(dt,gt,ft):null;{const t=null==A?void 0:A.ratio;ut=t&&Zt(t)?t:void 0}{let t={};"overlap"===dt&&(t.overlapParent=!0),"horizontal"!==dt&&(t.parentHAlign=b?"start":Fe[vt]),"vertical"!==dt&&(t.parentVAlign=b?"start":Ve[pt]),ut||w||j&&"wrap_content"!==j.type&&("match_parent"!==j.type||!(null==st?void 0:st.parentVerticalWrapContent))||(t.parentVerticalWrapContent=!0),!_&&("wrap_content"===(null==C?void 0:C.type)||"match_parent"===(null==C?void 0:C.type)&&(null==st?void 0:st.parentHorizontalWrapContent))&&(t.parentHorizontalWrapContent=!0),"horizontal"===dt&&(t.parentContainerOrientation="horizontal"),"vertical"===dt&&(t.parentContainerOrientation="vertical"),b&&(t.parentContainerWrap=!0),ht=Tt(t,ht)}return x={orientation:dt,valign:pt,halign:vt,wrap:b,overflow:!1===E||0===E?"visible":void 0},k={gap:gt||ft?ye(dt,gt,ft):void 0,"aspect-ratio":ut},T(),N(),B(),U(),L(),W(),H(),q(),J(),G(),Z(),Y(),`${R(ne,"Outer").$$render(t,{cls:At("container",fe,x),componentContext:it,layoutParams:st,style:k,additionalPaddings:$,heightByAspect:Boolean(ut),parentOf:yt.map((t=>t.json)),replaceItems:function(t){it=Object.assign(Object.assign({},it),{json:Object.assign(Object.assign({},it.json),{items:t.filter(mt)})})}},{},{default:()=>`${z(yt,(e=>`${R($r,"Unknown").$$render(t,{componentContext:e,layoutParams:ht},{},{})}`))} ${gt||ft?`${R(Ae,"ContainerSeparators").$$render(t,{separator:gt,lineSeparator:ft,orientation:dt,contentHAlign:vt,contentVAlign:pt},{},{})}`:""}`})}`})),Oe=Se,Pe={separator:"divkit-a30bb",separator_orientation_horizontal:"divkit-f529e",separator_orientation_vertical:"divkit-e9e27",separator__inner:"divkit-db7d8"};function Ie(t,e){return"vertical"===t||"horizontal"===t?t:e}const Me=L(((t,e,n,r)=>{let o,a,s,c,u,d,p,v=i,{componentContext:g}=e,{layoutParams:f}=e,h="horizontal",m="rgba(0,0,0,0.08)";return void 0===e.componentContext&&n.componentContext&&void 0!==g&&n.componentContext(g),void 0===e.layoutParams&&n.layoutParams&&void 0!==f&&n.layoutParams(f),g.json&&(h="horizontal",m="rgba(0,0,0,0.08)"),o=g.getDerivedFromVars(g.json.delimiter_style),v(),v=l(o,(t=>p=t)),h=Ie(null==p?void 0:p.orientation,h),a=!((null==p?void 0:p.color)&&("transparent"===p.color||9===p.color.length&&0===p.color.indexOf("#00"))),m=gt(null==p?void 0:p.color,1,m),s="horizontal"===h?"100%":dt(1),c="horizontal"===h?dt(1):"100%",u={background:m,width:s,height:c},d={orientation:h},v(),`${R(ne,"Outer").$$render(t,{cls:At("separator",Pe,d),componentContext:g,layoutParams:f},{},{default:()=>a?`<span${W("class",Pe.separator__inner,0)}${W("style",ut(u),0)}></span>`:""})}`})),Te={image:"divkit-a448f","image_is-width-content":"divkit-fe14a","image_is-height-content":"divkit-f4d92",image__image:"divkit-ce046",image_error:"divkit-f10d9","image__aspect-wrapper":"divkit-dc808",image_aspect:"divkit-ae784",image_loaded:"divkit-cf4e0","divkit-image-appearance":"divkit-e555f","image_before-appearance":"divkit-ffe8a"};function ze(t){return t.startsWith("data:")?ht(t):`data:image/jpg;base64,${ht(t)}`}const Ne="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Re=L(((t,e,n,r)=>{let o,a,s,c,u,d,p,g,h,m,y,b,_,w,$,x,k,E,C,j,A,F,V,D,S,O,P,I,M,T,z,N,B,U=i,L=i,H=i,J=i,G=i,Z=i,Y=i,X=i,Q=i,K=i,tt=i,et=i,nt=i,rt=i,{componentContext:ot}=e,{layoutParams:it}=e;const lt=f(at);let ct,dt,pt,vt=0,ft=!1,ht="rgba(0,0,0,0.08)",mt=!1,yt="",bt="none",_t="50% 50%",xt="0",kt="source_in",Et="",Ct="",jt=0,Ft=0,Vt=0,Dt="",St="";v((()=>{lt.removeSvgFilter(pt,kt)})),void 0===e.componentContext&&n.componentContext&&void 0!==ot&&n.componentContext(ot),void 0===e.layoutParams&&n.layoutParams&&void 0!==it&&n.layoutParams(it),ot.json&&(bt="none",_t="50% 50%",kt="source_in"),o=ot.getDerivedFromVars(ot.json.image_url),nt(),nt=l(o,(t=>N=t)),a=ot.getDerivedFromVars(ot.json.gif_url),rt(),rt=l(a,(t=>B=t)),s=ot.getDerivedFromVars(ot.json.width),et(),et=l(s,(t=>z=t)),c=ot.getDerivedFromVars(ot.json.height),tt(),tt=l(c,(t=>T=t)),u=ot.getDerivedFromVars(ot.json.preview),K(),K=l(u,(t=>M=t)),d=ot.getDerivedFromVars(ot.json.placeholder_color),Q(),Q=l(d,(t=>I=t)),p=ot.getDerivedFromVars(ot.json.scale),X(),X=l(p,(t=>P=t)),g=ot.getDerivedFromVars({content_alignment_horizontal:ot.json.content_alignment_horizontal,content_alignment_vertical:ot.json.content_alignment_vertical}),Y(),Y=l(g,(t=>O=t)),h=ot.getDerivedFromVars(ot.json.accessibility),Z(),Z=l(h,(t=>S=t)),m=ot.getDerivedFromVars(ot.json.aspect),G(),G=l(m,(t=>D=t)),y=ot.getDerivedFromVars(ot.json.tint_color),J(),J=l(y,(t=>V=t)),b=ot.getDerivedFromVars(ot.json.tint_mode),H(),H=l(b,(t=>F=t)),_=ot.getDerivedFromVars(ot.json.appearance_animation),L(),L=l(_,(t=>A=t)),w=ot.getDerivedFromVars(ot.json.filters),U(),U=l(w,(t=>j=t));{let t="gif"===ot.json.type?B:N;ft="empty://"===t,ft&&(t=Ne),dt=t}vt=0,dt?mt=!1:(mt=!0,ot.logError(st(new Error(`Missing "${"gif"===ot.json.type?"gif_url":"image_url"}" for "${ot.json.type}"`)))),$="wrap_content"===(null==z?void 0:z.type),x="wrap_content"===(null==T?void 0:T.type),yt=M?`url("${ze(M)}")`:"",ht=gt(I,1,ht),bt=wt(P)||bt,_t=function(t,e){const n=t.content_alignment_horizontal,r=t.content_alignment_vertical;return n&&"left"!==n&&"center"!==n&&"right"!==n||r&&"top"!==r&&"center"!==r&&"bottom"!==r?e:$t(t)}(O,_t),k=(null==S?void 0:S.description)||"";{const t=null==D?void 0:D.ratio;xt=t&&Zt(t)?(100/Number(t)).toFixed(2):"0"}{const t=V?gt(V):void 0,e=pe(F,kt);t===pt&&e===kt||(lt.removeSvgFilter(pt,kt),Et=t?lt.addSvgFilter(t,e):"",pt=t,kt=e)}if(A&&"fade"===A.type){const t=A;Ct=zt(t.interpolator,"ease_in_out").replace(/_/g,"-"),Vt=Pt(t.duration,300),Ft=Pt(t.start_delay,0),jt=Pt(t.alpha,0)}{let t="",e="";Array.isArray(j)&&j.length&&(t=Yt(j,ot.logError)),t&&(e="polygon(0% 0%, 0% 100%, 100% 100%, 100% 0%)"),Dt=t,St=e}return E={aspect:"0"!==xt,"is-width-content":$,"is-height-content":x,loaded:!1,"before-appearance":Boolean(Ct)&&!0},C={"background-image":yt,"background-color":yt?void 0:ht,"background-size":bt,"clip-path":St||void 0,"object-fit":bt,"object-position":_t,filter:["",Dt].filter(Boolean).join(" "),"--divkit-appearance-interpolator":Ct||void 0,"--divkit-appearance-fade-start":Ct?jt:void 0,"--divkit-appearance-delay":Ct?`${Ft}ms`:void 0,"--divkit-appearance-duration":Ct?`${Vt}ms`:void 0},U(),L(),H(),J(),G(),Z(),Y(),X(),Q(),K(),tt(),et(),nt(),rt(),mt?"":`${R(ne,"Outer").$$render(t,{cls:At("image",Te,E),componentContext:ot,layoutParams:it,customDescription:!0},{},{default:()=>E.aspect?`<span${W("class",Te["image__aspect-wrapper"],0)}${q({"padding-bottom":`${xt}%`})}><img${W("class",Te.image__image,0)}${W("src",dt,0)} loading="lazy" decoding="async"${W("style",ut(C),0)}${W("alt",k,0)}${W("aria-hidden",k?null:"true",0)}${W("this",ct,0)}></span>`:`<img${W("class",Te.image__image,0)}${W("src",dt,0)} loading="lazy" decoding="async"${W("style",ut(C),0)}${W("alt",k,0)}${W("aria-hidden",k?null:"true",0)}${W("this",ct,0)}>`})}`})),Be={grid:"divkit-d9080",grid_halign_left:"divkit-f63b3",grid_halign_center:"divkit-a14a6",grid_halign_right:"divkit-b0717",grid_valign_top:"divkit-fbca8",grid_valign_center:"divkit-d4310",grid_valign_bottom:"divkit-e4205"};function Ue(t){return t>0&&t<1}function Le(t){return String(Math.ceil(1e3*t)/1e3)}function We(t,e,n){if(t.some(Ue)){const e=Math.max(...t.filter(Ue).map((t=>1/t)));t=t.map((t=>t*e))}let r=0,o=0;const i=[];if(t.every(Boolean)){o=t.reduce(((t,e)=>t+e),0);for(let i=0;i<n;++i){if(!e[i])continue;const n=e[i]/t[i]*o;n>r&&(r=n)}}for(let e=0;e<n;++e)r?i[e]=`minmax(${dt(r*t[e]/o)},${Le(t[e])}fr)`:t[e]?i[e]=`${Le(t[e])}fr`:i[e]="auto";return i.join(" ")}const He=L(((t,e,n,r)=>{let o,a,s,c,u,d,p,v,g,f,h,m,y,b,_=i,w=i,$=i,x=i,{componentContext:k}=e,{layoutParams:E}=e,C=1,j=[],A=[],F=[],V=[],D=0,S=!1,O="top",P="left";void 0===e.componentContext&&n.componentContext&&void 0!==k&&n.componentContext(k),void 0===e.layoutParams&&n.layoutParams&&void 0!==E&&n.layoutParams(E),k.json&&(C=1,O="top",P="left"),o=Array.isArray(k.json.items)&&k.json.items||[],a=k.getDerivedFromVars(k.json.column_count),x(),x=l(a,(t=>m=t)),s=k.getDerivedFromVars(k.json.content_alignment_vertical),w(),w=l(s,(t=>f=t)),c=k.getDerivedFromVars(k.json.content_alignment_horizontal),_(),_=l(c,(t=>g=t)),C=oe(m,C),u=o.map(((t,e)=>k.produceChildContext(t,{path:e})));{let t=[];u.forEach((e=>{t.push(k.getDerivedFromVars({rowSpan:e.json.row_span,columnSpan:e.json.column_span,width:e.json.width,height:e.json.height}))})),y=K(t,(t=>[...t])),$(),$=l(y,(t=>h=t))}{const t={};let e=0,n=0;j=[],A=[],F=[],V=[],S=!1,b=u.map(((r,o)=>{var i,a,s,l;const c=h[o],u=Number(c.columnSpan)||1,d=Number(c.rowSpan)||1,p={x:e,y:n,colSpan:u,rowSpan:d},v="match_parent"===(null===(i=c.width)||void 0===i?void 0:i.type)?Number(c.width.weight||1)/u:0,g="match_parent"===(null===(a=c.height)||void 0===a?void 0:a.type)?Number(c.height.weight||1)/d:0,f=1===u&&"fixed"===(null===(s=c.width)||void 0===s?void 0:s.type)&&c.width.value?Number(c.width.value)/u:0,m=1===d&&"fixed"===(null===(l=c.height)||void 0===l?void 0:l.type)&&c.height.value?Number(c.height.value)/d:0;for(let r=e;r<e+u;++r)for(let e=n;e<n+d;++e)t[r+"_"+e]?S=!0:(t[r+"_"+e]=!0,(!j[r]||j[r]<v)&&(j[r]=v),(!A[e]||A[e]<g)&&(A[e]=g),(!F[r]||F[r]<f)&&(F[r]=f),(!V[e]||V[e]<m)&&(V[e]=m));do{++e,e>=C&&(e=0,++n)}while(t[e+"_"+n]);return{componentContext:r,layoutParams:{gridArea:p}}})),0!==e&&(S=!0),S&&k.logError(st(new Error('Mismatching "grid" rows/columns'))),D=n}return O=ue(f,O),P=ce(g,P),d={valign:O,halign:P},p={"grid-template-columns":We(j,F,C),"grid-template-rows":We(A,V,D)},v=S,_(),w(),$(),x(),v?"":`${R(ne,"Outer").$$render(t,{cls:At("grid",Be,d),componentContext:k,style:p,layoutParams:E,parentOf:u.map((t=>t.json)),replaceItems:function(t){k=Object.assign(Object.assign({},k),{json:Object.assign(Object.assign({},k.json),{items:t.filter(mt)})})}},{},{default:()=>`${z(b,(e=>`${R($r,"Unknown").$$render(t,{componentContext:e.componentContext,layoutParams:e.layoutParams},{},{})}`))}`})}`})),qe=He,Je={gallery__scroller:"divkit-a4e39",gallery_scrollbar_none:"divkit-f49e7",gallery_orientation_horizontal:"divkit-c9be7",gallery_orientation_vertical:"divkit-a72d5","gallery_scroll-snap":"divkit-f606e","gallery__items-grid":"divkit-eb4a5",gallery__items:"divkit-af276",gallery__arrow:"divkit-b72d7","gallery__arrow-icon-path":"divkit-b4173"},Ge="divkit-bf36b",Ze="divkit-a67bf",Ye="divkit-e2a31",Xe="divkit-c684b";function Qe(t){const e=[];let n=t[0],r=1;for(let o=1;o<=t.length;o++)t[o]!==n?(e.push(r>1?`repeat(${r}, ${n})`:n),n=t[o],r=1):r++;return e.join(" ")}function Ke(t,e){let n;return function(...r){null!==n&&clearTimeout(n),n=setTimeout((()=>{t.apply(this,r),n=null}),e)}}const tn=L(((t,e,n,r)=>{let o,a,s,c,u,d,p,g,h,m,y,b,_,w,$,x,k,E,C,j,A,F,V,D,S,O,P,M,T,N,B,U=i,L=i,H=i,q=i,J=i,G=i,Z=i,Y=i,X=i,Q=i,tt=i,{componentContext:et}=e,{layoutParams:nt}=e;const rt=f(at);let it,st,lt=[],ct=!1,pt=!1,vt=null,gt=!1;const ft=rt.getCustomization("galleryLeftClass"),ht=rt.getCustomization("galleryRightClass");let yt,bt,_t,wt,$t,xt=1,kt="horizontal",Et="start",Ct=8,jt="",Ft=[],Vt={},Dt=!1,St={},It=0;N=l(rt.isDesktop,(t=>T=t));const Mt=Ke((function(){if(!it)return;const t=it.scrollLeft,e=it.scrollWidth,n=it.offsetWidth;ct=t>2,pt=t+n<e-2}),50);function zt(){let t=[],e=lt[0].children.length;for(let n=0;n<e;++n)for(let e=0;e<xt;++e){const r=lt[e].children[n];r&&t.push(r)}return t}function Nt(t,e,n="smooth"){const r="horizontal"===kt,o=r?"offsetLeft":"offsetTop",i=r?"left":"top",a=t[e];a&&it.scroll({[i]:Math.max(0,a[o]+.01-Ct/2),behavior:n})}function Rt(t){const e=zt(),n=it.getBoundingClientRect(),r=e.findIndex((t=>function(t,e){return"horizontal"===kt?e.left>=t.left&&e.right<=t.right:e.top>=t.top&&e.bottom<=t.bottom}(n,t.getBoundingClientRect())));if(-1!==r)return r;const o=e.map((t=>function(t,e){return"horizontal"===kt?e.right>t.left&&t.right>e.left:e.bottom>t.top&&t.bottom>e.top}(n,t.getBoundingClientRect()))),i=o.findIndex(Boolean);return-1!==i?"prev"===t&&2===o.filter(Boolean).length?i+1:i:"prev"===t?1:e.length-2}v((()=>{gt=!1,yt&&!et.fakeElement&&(rt.unregisterInstance(yt),yt=void 0)})),void 0===e.componentContext&&n.componentContext&&void 0!==et&&n.componentContext(et),void 0===e.layoutParams&&n.layoutParams&&void 0!==nt&&n.layoutParams(nt),et.json&&(xt=1,kt="horizontal",Et="start",Ct=8,jt=""),o=Array.isArray(et.json.items)&&et.json.items||[],a=et.getDerivedFromVars(et.json.column_count),Q(),Q=l(a,(t=>M=t)),s=et.getDerivedFromVars(et.json.orientation),X(),X=l(s,(t=>P=t)),c=et.getDerivedFromVars(et.json.cross_content_alignment),Y(),Y=l(c,(t=>O=t)),u=et.getDerivedFromVars(et.json.item_spacing),Z(),Z=l(u,(t=>S=t)),d=et.getDerivedFromVars(et.json.cross_spacing),G(),G=l(d,(t=>D=t)),p=et.getDerivedFromVars(et.json.paddings),J(),J=l(p,(t=>V=t)),g=et.getDerivedFromVars(et.json.scroll_mode),H(),H=l(g,(t=>A=t)),h=et.getDerivedFromVars(et.json.restrict_parent_scroll),tt(),tt=l(h,(t=>B=t)),m=et.getDerivedFromVars(et.json.scrollbar),L(),L=l(m,(t=>j=t)),y=et.getDerivedFromVars(et.json.default_item),U(),U=l(y,(t=>C=t)),b=o.map(((t,e)=>et.produceChildContext(t,{path:e}))),_=T&>,_?"undefined"!=typeof ResizeObserver&&(vt=new ResizeObserver((()=>{Mt()})),vt.observe(st)):vt&&(vt.disconnect(),vt=null),xt=oe(M,xt),w=function(t,e){let n=0,r=[];for(let o=0;o<t.length;++o)r[n]||(r[n]=[]),r[n].push(t[o]),++n>=e&&(n=0);return r}(b,xt),kt=Ie(P,kt),Et=function(t,e){return"start"===t||"center"===t||"end"===t?t:e}(O,Et),Ct=Pt(S,Ct),bt=dt(Ct),wt=Pt(D,Ct),_t=dt(wt),jt=Ot(V,jt),$="horizontal"===kt?"grid-template-columns":"grid-template-rows";{let t=[];b.forEach((e=>{const n="horizontal"===kt?"width":"height";t.push(et.getDerivedFromVars(e.json[n]))})),$t=K(t,(t=>t)),q(),q=l($t,(t=>F=t))}Ft=[],xt>1?Ft.push("auto"):F.forEach((t=>{!t&&"horizontal"===kt||"match_parent"===(null==t?void 0:t.type)?Ft.push("100%"):Ft.push("max-content")}));{const t={};let e={};Dt=!1,"horizontal"===kt?e.parentVAlign=Et:e.parentHAlign=Et,"paging"===A&&(Dt=!0,e.scrollSnap="start",t["horizontal"===kt?"scroll-padding-left":"scroll-padding-top"]=dt(Ct/2)),1===xt&&(e.parentLayoutOrientation=kt),Vt=Tt(t,Vt),St=Tt(e,St)}return x={padding:jt,"grid-gap":_t},k={"grid-gap":bt,[$]:Qe(Ft)},E={orientation:kt,"scroll-snap":Dt,scrollbar:"auto"===j?"auto":"none"},It=Pt(C,It),et.json&&Mt(),et.json&&(yt&&(rt.unregisterInstance(yt),yt=void 0),et.json.id&&!et.fakeElement&&(yt=et.json.id,rt.registerInstance(yt,{setCurrentItem(t){const e=zt();if(t<0||t>e.length-1)throw new Error('Item is out of range in "set-current-item" action');Nt(e,t)},setPreviousItem(t){const e=Rt("prev"),n=zt();let r=e-1;r<0&&(r="ring"===t?n.length-1:e),Nt(n,r)},setNextItem(t){const e="horizontal"===kt?it.scrollLeft+it.offsetWidth===it.scrollWidth:it.scrollTop+it.offsetHeight===it.scrollHeight,n=zt();if(e&&"ring"===t)return void Nt(n,0);const r=Rt("next");let o=r+1;o>n.length-1&&(o="ring"===t?0:r),Nt(n,o)}}))),U(),L(),H(),q(),J(),G(),Z(),Y(),X(),Q(),N(),tt(),` ${R(ne,"Outer").$$render(t,{cls:At("gallery",Je,E),componentContext:et,layoutParams:nt,customPaddings:!0,customActions:"gallery",parentOf:o,replaceItems:function(t){et=Object.assign(Object.assign({},et),{json:Object.assign(Object.assign({},et.json),{items:t.filter(mt)})})}},{},{default:()=>`<div class="${I(Je.gallery__scroller,!0)+" "+I(B?ot:"",!0)}"${W("style",ut(Vt),0)}${W("this",it,0)}><div${W("class",Je["gallery__items-grid"],0)}${W("style",ut(x),0)}${W("this",st,0)}>${z(w,((e,n)=>`<div${W("class",Je.gallery__items,0)}${W("style",ut(k),0)}${W("this",lt[n],0)}>${z(e,(e=>`${R($r,"Unknown").$$render(t,{componentContext:e,layoutParams:St},{},{})}`))} </div>`))}</div></div> ${"horizontal"===kt?`${ct&&_?` <div${W("class",ft||`${Je.gallery__arrow} ${Ge} ${Ye}`,0)}>${ft?"":`<svg${W("class",Ze,0)} xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" fill="none"><path${W("class",Je["gallery__arrow-icon-path"],0)} d="m10 16 8.3 8 1.03-1-4-6-.7-1 .7-1 4-6-1.03-1z"></path></svg>`}</div>`:""} ${pt&&_?` <div${W("class",ht||`${Je.gallery__arrow} ${Ge} ${Xe}`,0)}>${ht?"":`<svg${W("class",Ze,0)} xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" fill="none"><path${W("class",Je["gallery__arrow-icon-path"],0)} d="M22 16l-8.3 8-1.03-1 4-6 .7-1-.7-1-4-6 1.03-1 8.3 8z"></path></svg>`}</div>`:""}`:""}`})}`})),en=tn,nn={tabs:"divkit-e0df5",tabs__list:"divkit-ea19b",tabs__item:"divkit-c25c7",tabs__item_selected:"divkit-d560a",tabs__item_actionable:"divkit-dfda0",tabs__panels:"divkit-f5dc0",tabs__swiper:"divkit-eb42c",tabs__swiper_animated:"divkit-b9f18",tabs__swiper_inited:"divkit-fa574",tabs__panel:"divkit-cc9fb",tabs__panel_visible:"divkit-e7306",tabs__separator:"divkit-b85bf"},rn=L(((t,e,n,r)=>{let o,a,s,c,u,d,p,g,h,m,y,b,_,w,x,k,E,C,j,A,F,V,D,S,O,P,M,T=i,N=i,B=i,U=i,L=i,H=i,J=i,G=i,Z=i;var Y,X;let{componentContext:K}=e,{layoutParams:tt}=e;const et=f(at),nt=et.genId("tabs");let rt,it=!1,lt=Q([]);C=l(lt,(t=>E=t));let ct,vt,ft,ht,mt,yt,bt,_t={},wt=12,$t="",xt="",kt="",Et="",Ct="",jt="",Ft="",Dt="",It="",Mt="",zt=0,Nt="",Rt="",Wt=null,Ht=!1,qt=!1,Gt=[],Yt=[],Xt=null;async function Qt(t,e=!1){if(yt=_,_=t,Ht||(Ht=!0,vt.style.height=dt(vt.clientHeight),ft.style.transform=`translate3d(${100*-(null!=yt?yt:_)}%,0,0)`),qt=!0,async function(t){await $(),ft.style.transform=`translate3d(${t}%,0,0)`}(100*-_),function(t=!1){const e=t?Math.max(0,_-1):Math.min(_,null!=yt?yt:_),n=t?Math.min(o.length-1,_+1):Math.max(_,null!=yt?yt:_);Gt=Gt.map(((t,r)=>{var i;return t||(r>=e&&r<=n&&(null===(i=o[r])||void 0===i?void 0:i.div)?K.produceChildContext(o[r].div,{path:r}):void 0)})),Yt=Yt.map(((t,r)=>r>=e&&r<=n))}(),async function(){await $();const t=document.getElementById(`${nt}-panel-${_}`);t&&(vt.style.height=dt(t.offsetHeight))}(),Xt&&clearTimeout(Xt),Xt=window.setTimeout((()=>{Yt=o.map(((t,e)=>e===_))}),400),bt=-_*vt.clientWidth,e){await $();const t=ct.querySelector(`.${nn.tabs__item_selected}`);t&&t.focus()}}if(v((()=>{rt&&(et.unregisterInstance(rt),rt=void 0)})),void 0===e.componentContext&&n.componentContext&&void 0!==K&&n.componentContext(K),void 0===e.layoutParams&&n.layoutParams&&void 0!==tt&&n.layoutParams(tt),K.json&&(wt=12,$t="",Et="",ht=void 0,Ct="",mt=void 0,jt="",Ft="",Dt="",It="",Mt="",zt=0,Nt="",Rt="",Wt=null),o=K.json.items||[],a=o.map((t=>t.div)),s=K.getDerivedFromVars(K.json.width),G(),G=l(s,(t=>P=t)),c=K.getDerivedFromVars(K.json.height),J(),J=l(c,(t=>O=t)),u=K.getJsonWithVars(K.json.selected_tab),d=K.getDerivedFromVars(K.json.tab_title_style),H(),H=l(d,(t=>S=t)),p=K.getDerivedFromVars(K.json.has_separator),L(),L=l(p,(t=>D=t)),g=K.getDerivedFromVars(K.json.separator_color),U(),U=l(g,(t=>V=t)),h=K.getDerivedFromVars(K.json.separator_paddings),B(),B=l(h,(t=>F=t)),m=K.getDerivedFromVars(K.json.switch_tabs_by_content_swipe_enabled),N(),N=l(m,(t=>A=t)),y=K.getDerivedFromVars(K.json.restrict_parent_scroll),Z(),Z=l(y,(t=>M=t)),b=K.getDerivedFromVars(K.json.title_paddings),T(),T=l(b,(t=>j=t)),_=u&&Number(u)||0,Array.isArray(o)&&o.length){let t=[];o.forEach(((e,n)=>{const r=K.getJsonWithVars({index:n,title:e.title,title_click_action:e.title_click_action});r.title&&"string"==typeof r.title?t.push(r):K.logError(st(new Error("Incorrect title for the tab"),{additional:{index:n}}))})),lt.set(t)}else lt.set([]);(null==E?void 0:E.length)?it=!1:(it=!0,K.logError(st(new Error('Incorrect or empty "items" prop for div "tabs"'))));{let t={};"wrap_content"===(null==P?void 0:P.type)&&(t.parentHorizontalWrapContent=!0),O&&"wrap_content"!==O.type||(t.parentVerticalWrapContent=!0),_t=Tt(t,_t)}if(!it&&(_<0||_>=o.length)&&(K.logError(st(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:K.json.selected_tab,length:o.length}})),_=_<0?0:o.length-1),it||E.some((t=>_===t.index))||(K.logError(st(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:K.json.selected_tab}})),_=(null===(Y=E[0])||void 0===Y?void 0:Y.index)||0),w=S||{},wt=oe(w.font_size,wt),w.font_size||w.paddings){const t=w.paddings||{top:6,right:8,bottom:6,left:8},e={top:(Number(t.top)||0)/wt*10,right:(Number(t.right)||0)/wt*10,bottom:(Number(t.bottom)||0)/wt*10,left:(Number(t.left)||0)/wt*10};$t=Ot(e,$t)}{const t=w.line_height;void 0!==t&&Zt(t)&&(xt=dt(t/wt*10))}{const t=w.letter_spacing;void 0!==t&&St(t)&&(kt=dt(t/wt*10))}if(w.corner_radius||w.corners_radius||w.font_size){const t=null!==(X=w.corner_radius)&&void 0!==X?X:1e3;w.corners_radius?Et=function(t,e,n,r){const o=[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]];for(let t=0;t<o.length;++t)if(o[t]&&!St(o[t]))return r;return Ut(t,e,n)}(w.corners_radius,t,wt,Et):St(t)&&(Et=dt(t/wt*10))}return ht=ae(w.active_font_weight||w.font_weight,ht),Ct=w.font_family&&"string"==typeof w.font_family?et.typefaceProvider(w.font_family,{fontWeight:ht||400}):"",mt=ae(w.inactive_font_weight||w.font_weight,mt),jt=w.font_family&&"string"==typeof w.font_family?et.typefaceProvider(w.font_family,{fontWeight:mt||400}):"",Ft=gt(w.active_text_color,1,Ft),Dt=gt(w.inactive_text_color,1,Dt),It=gt(w.active_background_color,1,It),Mt=gt(w.inactive_background_color,1,Mt),zt=Pt(w.item_spacing,zt),D&&(V&&(Nt=gt(V,1,Nt)),F&&(Rt=Ot(F,Rt))),x={background:Nt,margin:Rt},k=void 0===A||Boolean(A),Wt=Bt(j||void 0,Wt),function(t){it||(Gt=t.map(((t,e)=>{if(e===_&&(null==t?void 0:t.div))return K.produceChildContext(t.div,{path:e})})),Yt=t.map(((t,e)=>e===_)))}(o),K.json&&(rt&&(et.unregisterInstance(rt),rt=void 0),!K.json.id||it||K.fakeElement||(rt=K.json.id,et.registerInstance(rt,{setCurrentItem(t){if(t<0||t>o.length-1)throw new Error('Item is out of range in "set-current-item" action');Qt(t)},setPreviousItem(t){let e=_-1;e<0&&(e="ring"===t?o.length-1:_),Qt(e)},setNextItem(t){let e=_+1;e>o.length-1&&(e="ring"===t?0:_),Qt(e)}}))),C(),T(),N(),B(),U(),L(),H(),J(),G(),Z(),it?"":`${R(ne,"Outer").$$render(t,{cls:At("tabs",nn,{}),componentContext:K,layoutParams:tt,customActions:"tabs",parentOf:a,parentOfSimpleMode:!0,replaceItems:function(t){K.json.items&&(K=Object.assign(Object.assign({},K),{json:Object.assign(Object.assign({},K.json),{items:K.json.items.map(((e,n)=>Object.assign(Object.assign({},e),{div:t[n]})))})}))}},{},{default:()=>` <div class="${I(nn.tabs__list,!0)+" "+I(M?ot:"",!0)}" role="tablist"${q({"--divkit-tabs-title-padding":Wt?Vt(Wt):"","--divkit-tabs-font-size":dt(wt),"--divkit-tabs-paddings":$t,"--divkit-tabs-line-height":xt,"--divkit-tabs-letter-spacing":kt,"--divkit-tabs-active-font-weight":ht||"","--divkit-tabs-inactive-font-weight":mt||"","--divkit-tabs-active-font-family":Ct||"","--divkit-tabs-inactive-font-family":jt||"","--divkit-tabs-active-text-color":Ft,"--divkit-tabs-inactive-text-color":Dt,"--divkit-tabs-active-background-color":It,"--divkit-tabs-inactive-background-color":Mt,"--divkit-tabs-border-radius":Et,"--divkit-tabs-items-spacing":zt?pt(zt):""})}${W("this",ct,0)}>${z(E,(e=>{let n=e.index,r=n===_;return` ${R(Jt,"Actionable").$$render(t,{componentContext:K,cls:At("tabs__item",nn,{selected:r,actionable:Boolean(e.title_click_action)}),actions:e.title_click_action&&!K.fakeElement?[e.title_click_action].filter(Lt):[],attrs:{id:`${nt}-tab-${n}`,"aria-controls":`${nt}-panel-${n}`,role:"tab",tabindex:r&&!K.fakeElement?e.title_click_action?void 0:"0":"-1","aria-selected":r?"true":"false"},customAction:K.fakeElement?null:t=>function(t,e){return _===e||(Qt(e),!1)}(0,n)},{},{default:()=>`${I(e.title)} `})}`}))}</div> ${D?`<div${W("class",nn.tabs__separator,0)}${W("style",ut(x),0)}></div>`:""} <div class="${I(nn.tabs__panels,!0)+" "+I(M?ot:"",!0)}"${W("this",vt,0)}><div${W("class",At("tabs__swiper",nn,{inited:Ht,animated:qt}),0)}${W("this",ft,0)}>${z(E,(e=>{let n=e.index,r=Gt[n];return` <div${W("class",At("tabs__panel",nn,{visible:Yt[n]}),0)} role="tabpanel" id="${I(nt,!0)+"-panel-"+I(n,!0)}" aria-labelledby="${I(nt,!0)+"-tab-"+I(n,!0)}" style="${"left: "+I(100*n,!0)+"%"}">${r?`${R($r,"Unknown").$$render(t,{componentContext:r,layoutParams:_t},{},{})}`:""} </div>`}))}</div></div>`})}`})),on=rn,an="divkit-eb860",sn="divkit-e08c6";function ln(t){return e=>{if(e<=0)return 0;if(e>=1)return 1;const n=e*t.length,r=Math.floor(n),o=n-r;return t[r]*o+t[r+1]*(1-o)}}function cn(t){return Math.max(...t.map((t=>(Number(t.duration)||200)+(Number(t.start_delay)||0))))}function un(t){const e=[];return"set"===t.type?(t.items||[]).forEach((t=>{e.push(...un(t))})):e.push(t),e}ln([.0021,.0045,.0071,.01,.0131,.0165,.0202,.0242,.0284,.033,.0378,.0429,.0483,.054,.0601,.0664,.0731,.08,.0872,.0948,.1026,.1108,.1192,.1279,.1369,.1461,.1556,.1653,.1753,.1855,.1958,.2064,.2171,.2279,.2389,.25,.2612,.2725,.2839,.2952,.3067,.3181,.3295,.341,.3524,.3637,.375,.3863,.3974,.4085,.4195,.4304,.4412,.4519,.4624,.4729,.4832,.4934,.5034,.5133,.5231,.5327,.5422,.5516,.5608,.5699,.5788,.5876,.5963,.6048,.6132,.6214,.6295,.6375,.6453,.653,.6606,.668,.6754,.6825,.6896,.6965,.7034,.7101,.7166,.7231,.7295,.7357,.7418,.7479,.7538,.7596,.7653,.7709,.7764,.7818,.7871,.7923,.7974,.8024,.8073,.8122,.8169,.8216,.8261,.8306,.835,.8394,.8436,.8478,.8518,.8558,.8598,.8636,.8674,.8711,.8747,.8783,.8818,.8852,.8886,.8919,.8951,.8983,.9014,.9044,.9074,.9103,.9131,.9159,.9187,.9213,.924,.9265,.929,.9315,.9339,.9362,.9385,.9408,.943,.9451,.9472,.9492,.9512,.9532,.9551,.9569,.9587,.9605,.9622,.9638,.9655,.967,.9686,.9701,.9715,.9729,.9743,.9756,.9769,.9782,.9794,.9805,.9817,.9828,.9838,.9848,.9858,.9868,.9877,.9886,.9894,.9902,.991,.9917,.9924,.9931,.9937,.9943,.9949,.9954,.9959,.9964,.9969,.9973,.9977,.998,.9983,.9986,.9989,.9991,.9993,.9995,.9997,.9998,.9999,.9999,1,1]),ln([5e-4,.002,.0045,.0078,.0119,.0168,.0224,.0286,.0355,.0429,.0508,.0592,.0681,.0774,.087,.0969,.1072,.1177,.1285,.1395,.1507,.1621,.1736,.1853,.197,.2089,.2208,.2328,.2448,.2569,.2689,.281,.293,.305,.317,.3289,.3408,.3526,.3644,.376,.3876,.3991,.4105,.4218,.433,.444,.455,.4658,.4765,.4871,.4975,.5078,.518,.528,.5379,.5477,.5573,.5668,.5761,.5853,.5944,.6033,.612,.6206,.6291,.6374,.6456,.6537,.6616,.6693,.677,.6845,.6918,.699,.7061,.713,.7199,.7265,.7331,.7395,.7458,.752,.758,.764,.7698,.7755,.781,.7865,.7918,.7971,.8022,.8072,.8121,.8169,.8216,.8262,.8307,.8351,.8394,.8436,.8477,.8517,.8557,.8595,.8633,.8669,.8705,.874,.8775,.8808,.8841,.8873,.8904,.8934,.8964,.8993,.9022,.9049,.9076,.9103,.9129,.9154,.9178,.9202,.9226,.9249,.9271,.9293,.9314,.9335,.9355,.9375,.9394,.9413,.9431,.9449,.9466,.9483,.95,.9516,.9532,.9547,.9562,.9576,.9591,.9605,.9618,.9631,.9644,.9657,.9669,.9681,.9692,.9703,.9714,.9725,.9736,.9746,.9756,.9765,.9775,.9784,.9793,.9802,.981,.9818,.9826,.9834,.9842,.9849,.9856,.9863,.987,.9877,.9883,.989,.9896,.9902,.9908,.9913,.9919,.9924,.993,.9935,.994,.9944,.9949,.9954,.9958,.9963,.9967,.9971,.9975,.9979,.9983,.9986,.999,.9993,.9997,1]);const dn={tooltip:"divkit-f1907",tooltip_visible:"divkit-e5914"},pn=L(((t,e,n,r)=>{let o,a,s,c,u,d,p,g,h,m,y,b,_,w,$=i,x=i,k=i,E=i,C=i;var j,A,F,V;let{ownerNode:D}=e,{data:S}=e,{internalId:O}=e,{parentComponentContext:P}=e;b=l(f(at).isDesktop,(t=>y=t)),Date.now();return v((()=>{})),void 0===e.ownerNode&&n.ownerNode&&void 0!==D&&n.ownerNode(D),void 0===e.data&&n.data&&void 0!==S&&n.data(S),void 0===e.internalId&&n.internalId&&void 0!==O&&n.internalId(O),void 0===e.parentComponentContext&&n.parentComponentContext&&void 0!==P&&n.parentComponentContext(P),o=P.produceChildContext(S.div),a=P.getDerivedFromVars(S.position),k(),k=l(a,(t=>m=t)),s=P.getDerivedFromVars(null===(A=null===(j=S.offset)||void 0===j?void 0:j.x)||void 0===A?void 0:A.value),x(),x=l(s,(t=>h=t)),c=P.getDerivedFromVars(null===(V=null===(F=S.offset)||void 0===F?void 0:F.y)||void 0===V?void 0:V.value),$(),$=l(c,(t=>g=t)),u=P.getDerivedFromVars(S.animation_in),E(),E=l(u,(t=>_=t)),d=P.getDerivedFromVars(S.animation_out),C(),C=l(d,(t=>w=t)),p={visible:!1},$(),x(),k(),b(),E(),C(),` <div class="${I(At("tooltip",dn,p),!0)+" "+I(y?rt:"",!0)}"${q({top:"",left:"",width:"",height:""})}${W("this",undefined,0)}>${R($r,"Unknown").$$render(t,{componentContext:o},{},{})}</div>`}));function vn(t){return"change_bounds"===t.type?t:"set"===t.type?vn(t.items[0]):null}const gn=L(((t,e,n,r)=>{let o,i,a,s,l,c,{componentContext:u}=e,{layoutParams:d}=e;const p=f(at),h=f(Ft);let m,y,b,_,w=!1,x=new Map,k=new Set,E=null,C=[],j=[],A=[],F=[],V=!1;function D(t){_=(null==t?void 0:t.div)?u.produceChildContext(t.div,{path:t.state_id||"<unknown>"}):void 0}function S(t,e,n){let{json:r,parentComponentContext:o,transitions:i,node:a}=e;r=u.getJsonWithVars(r),i=u.getJsonWithVars(i);const s=un(i),l=a.getBoundingClientRect(),c=Object.assign(Object.assign({},r),{margins:void 0,alpha:(d=s,d.some((t=>"fade"===t.type))?void 0:r.alpha)});var d;return{json:c,componentContextCopy:o.produceChildContext(c,{fake:!0}),elementBbox:l,rootBbox:t,transitions:s,alpha:r.alpha,width:l.width,height:l.height,offsetTop:l.top-t.top,offsetLeft:l.left-t.left,direction:n,resolvePromise:e.resolvePromise,node:e.node}}async function O(t){if(b===t)return;p.setRunning("stateChange",!0);const e=new Set(k);C.forEach((t=>{t.resolvePromise&&t.resolvePromise()})),C=[];let n=[];if(m){const t=m.getBoundingClientRect();n=A.map((e=>S(t,e,"out")))}F.forEach((t=>{x.set(t.id,t.node.getBoundingClientRect())})),j=[],A=[],F=[];const r=l.find((e=>e.state_id===t))||null;if(r?(b=t,null==s||s.setValue(b),D(r)):u.logError(st(new Error("Cannot find state with id"),{additional:{stateId:t}})),await $(),!m)return;const o=m.getBoundingClientRect();let i=j.filter((t=>{var n;return!(!t.json.id||e.has(t.json.id))||(null===(n=t.resolvePromise)||void 0===n||n.call(t),!1)})).map((t=>S(o,t,"in")));n=n.filter((t=>{var e;return!(!t.json.id||k.has(t.json.id))||(null===(e=t.resolvePromise)||void 0===e||e.call(t),!1)}));const a=n.concat(i),c=a.reduce(((t,e)=>Math.max(t,cn(e.transitions))),0),d=F.filter((t=>x.has(t.id))).map((t=>{const e=Object.assign(Object.assign({},t.json),{margins:void 0,width:{type:"match_parent"},height:{type:"match_parent"}});return{json:e,componentContextCopy:t.parentComponentContext.produceChildContext(e,{fake:!0}),rootBbox:o,beforeBbox:x.get(t.id),afterBbox:t.node.getBoundingClientRect(),node:t.node,transition:u.getJsonWithVars(vn(t.transitions)),resolvePromise:t.resolvePromise}}));C=[...a.map((t=>Object.assign(Object.assign({},t),{maxDuration:c}))),...d],x.clear(),p.setRunning("stateChange",!1)}return g(Ft,{registerInstance(t,e){E||(E=new Map),E.has(t)?u.logError(st(new Error("Duplicate state with id"),{additional:{id:t}})):E.set(t,e)},unregisterInstance(t){null==E||E.delete(t)},runVisibilityTransition(t,e,n,r,o){if(!m)return Promise.resolve();const i=S(m.getBoundingClientRect(),{json:t,parentComponentContext:e,transitions:n,node:r},o),a=cn(i.transitions),s=Object.assign(Object.assign({},i),{maxDuration:a});return C=[...C.filter((t=>t.node!==i.node)),s],new Promise((t=>{s.resolvePromise=t}))},registerChildWithTransitionIn(t,e,n,r){const o={json:t,parentComponentContext:e,transitions:n,node:r};return j.push(o),new Promise((t=>{o.resolvePromise=t}))},registerChildWithTransitionOut(t,e,n,r){const o={json:t,parentComponentContext:e,transitions:n,node:r};return A.push(o),new Promise((t=>{o.resolvePromise=t}))},registerChildWithTransitionChange(t,e,n,r){const o=t.id;if(!o)return Promise.resolve();const i={id:o,json:t,parentComponentContext:e,transitions:n,node:r};return F.push(i),new Promise((t=>{i.resolvePromise=t}))},hasTransitionChange:t=>!!t&&x.has(t),registerChild(t){k.add(t)},unregisterChild(t){k.delete(t)}}),v((()=>{y&&h.unregisterInstance(y)})),void 0===e.componentContext&&n.componentContext&&void 0!==u&&n.componentContext(u),void 0===e.layoutParams&&n.layoutParams&&void 0!==d&&n.layoutParams(d),o=u.json.div_id||u.json.id,i=u.getJsonWithVars(u.json.default_state_id),a=u.json.state_id_variable,s=a?u.getVariable(a,"string"):null,u.json&&(V=!1),o?w=!1:(w=!0,u.logError(st(new Error('Missing "id" prop for div "state"')))),u.json&&(k=new Set),l=u.json.states||[],c=l.map((t=>t.div)),(null==l?void 0:l.length)?w=!1:(w=!0,u.logError(st(new Error('Empty "states" prop for div "state"')))),u.json&&(y&&(h.unregisterInstance(y),y=void 0),o&&!(null==u?void 0:u.fakeElement)&&(y=o,h.registerInstance(o,{setState:O,getChild:function(t){if(E&&E.has(t))return E.get(t);u.logError(st(new Error("Missing state block with id"),{additional:{id:t}}))}}))),!V&&function(t){if(!V&&(V=!0,t.length)){const e=(null==s?void 0:s.getValue())||i;if(e){b=e;const n=t.find((t=>t.state_id===b))||null;D(n),n||u.logError(st(new Error("Cannot find state for default_state_id"),{additional:{selectedId:b}}))}else{const e=t[0];b=e.state_id,D(e)}s&&(s.setValue(b),s.subscribe((t=>{O(t)})))}}(l),w?"":`${R(ne,"Outer").$$render(t,{cls:"divkit-b8efc",componentContext:u,layoutParams:d,parentOf:c,parentOfSimpleMode:!0,replaceItems:function(t){const e=u.json.states;if(!e)return;const n=e.map(((e,n)=>Object.assign(Object.assign({},e),{div:t[n]})));u.json=Object.assign(Object.assign({},u.json),{states:n}),b&&D(n.find((t=>t.state_id===b))||null)}},{},{default:()=>`${_?`${R($r,"Unknown").$$render(t,{componentContext:_},{},{})}`:""} <div${W("class","divkit-adaae",0)} aria-hidden="true"${W("this",m,0)}>${z(C,(e=>"direction"in e?`<div${W("class",an,0)}${q({left:`${e.offsetLeft}px`,top:`${e.offsetTop}px`,width:`${e.width}px`,height:`${e.height}px`})}><div${W("class",sn,0)}>${R($r,"Unknown").$$render(t,{componentContext:e.componentContextCopy},{},{})}</div> </div>`:`<div${W("class",an,0)}><div${W("class",sn,0)}>${R($r,"Unknown").$$render(t,{componentContext:e.componentContextCopy},{},{})}</div> </div>`))}</div>`})} ${null!=u&&u.tooltips?`${z(u.tooltips,(e=>`${R(pn,"TooltipView").$$render(t,{ownerNode:e.ownerNode,data:e.desc,internalId:e.internalId,parentComponentContext:u},{},{})}`))}`:""}`})),fn=gn,hn={pager:"divkit-c5feb",pager__items:"divkit-f6987",pager__item:"divkit-feca7",pager_orientation_horizontal:"divkit-b0a1c",pager_orientation_vertical:"divkit-f772f",pager__arrow:"divkit-d78c2","pager__arrow-icon-path":"divkit-a94d9"},mn=L(((t,e,n,r)=>{let o,a,s,u,d,p,g,h,m,y,b,_,w,$,x,k,E,C,j,A,F,V,D=i,S=i,O=i,P=i,M=i,T=i;var N,B,U,L,H,q;let{componentContext:J}=e,{layoutParams:G}=e;const Z=f(at),Y=Z.genId("pager"),X=Z.getCustomization("pagerLeftClass"),Q=Z.getCustomization("pagerRightClass");E=l(Z.isDesktop,(t=>k=t)),Ke((function(){if(!et)return;const t=function(){const t=Array.from(tt.children),e=tt.getBoundingClientRect(),n=t.findIndex((t=>{return n=e,r=t.getBoundingClientRect(),"horizontal"===lt?r.left>=n.left&&r.right<=n.right:r.top>=n.top&&r.bottom<=n.bottom;var n,r}));return-1!==n?n:nt}();t!==nt&&(nt=t)}),50);let K,tt,et=!1,nt=0,rt=0,it=!1,lt="horizontal",ct="",vt="",gt="";function ft(t,e="smooth"){const n="horizontal"===lt,r=tt.children[t],o=n?"offsetLeft":"offsetTop",i=n?"left":"top";tt.scroll({[i]:r[o],behavior:e}),nt=t}v((()=>{et=!1,K&&(Z.unregisterInstance(K),K=void 0)})),void 0===e.componentContext&&n.componentContext&&void 0!==J&&n.componentContext(J),void 0===e.layoutParams&&n.layoutParams&&void 0!==G&&n.layoutParams(G),J.json&&(vt=""),o=J.getDerivedFromVars(J.json.layout_mode),S(),S=l(o,(t=>C=t)),a=J.getDerivedFromVars(J.json.orientation),M(),M=l(a,(t=>F=t)),s=J.getDerivedFromVars(J.json.item_spacing),P(),P=l(s,(t=>A=t)),u=J.getDerivedFromVars(J.json.paddings),O(),O=l(u,(t=>j=t)),d=J.getDerivedFromVars(J.json.restrict_parent_scroll),T(),T=l(d,(t=>V=t)),p=(Array.isArray(J.json.items)&&J.json.items||[]).map(((t,e)=>J.produceChildContext(t,{path:e}))),C?"percentage"!==C.type&&"fixed"!==C.type?(it=!0,J.logError(st(new Error('Incorrect value of "layout_mode.type" for div "pager"')))):it=!1:(it=!0,J.logError(st(new Error('Empty "layout_mode" prop for div "pager"')))),lt=Ie(F,lt);{const t=null==A?void 0:A.value;t&&St(t)&&(ct=dt(t||0))}if(vt=Ot(j,vt),g="horizontal"===lt?"grid-auto-columns":"grid-auto-rows","fixed"===(null==C?void 0:C.type)){const t=pt("horizontal"===lt?((null===(N=J.json.paddings)||void 0===N?void 0:N.left)||0)+((null===(B=J.json.paddings)||void 0===B?void 0:B.right)||0):((null===(U=J.json.paddings)||void 0===U?void 0:U.top)||0)+((null===(L=J.json.paddings)||void 0===L?void 0:L.bottom)||0)),e=null===(H=C.neighbour_page_width)||void 0===H?void 0:H.value;gt=e?`calc(100% + ${t} - 2 * ${pt(e)} - 2 * ${ct})`:"100%"}else if("percentage"===(null==C?void 0:C.type)){const t=null===(q=C.page_width)||void 0===q?void 0:q.value;gt=`${Number(t)}%`}return h={"grid-gap":ct,padding:vt,[g]:gt},m={orientation:lt},y=it,b=k&&et&&!y,_=nt>0,w=nt+1<p.length,$=Z.getStore("pagers"),D(),D=l($,(t=>x=t)),function(t,e){const n=J.json.id;if(n){const r=new Map(x);c($,x=r.set(n,{instId:Y,size:t,currentItem:e,scrollToPagerItem:ft}),x)}}(p.length,nt),function(t){var e;if(t===rt)return;rt=t;const n=J.getJsonWithVars(null===(e=p[t].json)||void 0===e?void 0:e.selected_actions);(null==n?void 0:n.length)&&J.execAnyActions(n)}(nt),J.json&&(K&&(Z.unregisterInstance(K),K=void 0),J.json.id&&!J.fakeElement&&(K=J.json.id,Z.registerInstance(K,{setCurrentItem(t){if(t<0||t>p.length-1)throw new Error('Item is out of range in "set-current-item" action');ft(t)},setPreviousItem:function(t){let e=nt-1;e<0&&(e="ring"===t?p.length-1:nt),ft(e)},setNextItem:function(t){let e=nt+1;e>p.length-1&&(e="ring"===t?0:nt),ft(e)}}))),D(),E(),S(),O(),P(),M(),T(),y?"":`${R(ne,"Outer").$$render(t,{cls:At("pager",hn,m),componentContext:J,layoutParams:G,customPaddings:!0,parentOf:p.map((t=>t.json)),replaceItems:function(t){J=Object.assign(Object.assign({},J),{json:Object.assign(Object.assign({},J.json),{items:t.filter(mt)})})}},{},{default:()=>`<div class="${I(hn.pager__items,!0)+" "+I(V?ot:"",!0)}"${W("style",ut(h),0)}${W("this",tt,0)}>${z(p,(e=>`<div${W("class",hn.pager__item,0)}>${R($r,"Unknown").$$render(t,{componentContext:e},{},{})} </div>`))}</div> ${_&&b?` <div${W("class",X||`${hn.pager__arrow} ${Ge} ${Ye}`,0)}>${X?"":`<svg${W("class",Ze,0)} xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" fill="none"><path${W("class",hn["pager__arrow-icon-path"],0)} d="m10 16 8.3 8 1.03-1-4-6-.7-1 .7-1 4-6-1.03-1z"></path></svg>`}</div>`:""} ${w&&b?` <div${W("class",Q||`${hn.pager__arrow} ${Ge} ${Xe}`,0)}>${Q?"":`<svg${W("class",Ze,0)} xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" fill="none"><path${W("class",hn["pager__arrow-icon-path"],0)} d="M22 16l-8.3 8-1.03-1 4-6 .7-1-.7-1-4-6 1.03-1 8.3 8z"></path></svg>`}</div>`:""}`})}`})),yn=mn,bn={indicator:"divkit-d8e3f",indicator__scroller:"divkit-b5db0",indicator__items:"divkit-d5d94",indicator__item:"divkit-f6629",indicator_placement_default:"divkit-c1670",indicator__item_active:"divkit-b39cd",indicator_placement_stretch:"divkit-b6bd3"},_n=["rounded_rectangle","circle"],wn=L(((t,e,n,r)=>{let o,a,s,c,u,d,p,v,g,h,m,y,b,_,w,x,k,E,C,j=i,A=i,F=i,V=i,D=i,S=i,O=i,P=i,M=i;var T,N;let{componentContext:B}=e,{layoutParams:U}=e;const L=f(at);let H,J,G,Z={width:13,height:13,borderRadius:6.5,background:"#ffdc60"},Y={width:10,height:10,borderRadius:5,background:"#33919cb5"},X="default",Q=15,K=10,et=5;if(void 0===e.componentContext&&n.componentContext&&void 0!==B&&n.componentContext(B),void 0===e.layoutParams&&n.layoutParams&&void 0!==U&&n.layoutParams(U),B.json&&(X="default",Q=15,K=10,et=5,Z={width:13,height:13,borderRadius:6.5,background:"#ffdc60"},Y={width:10,height:10,borderRadius:5,background:"#33919cb5"}),o=B.getDerivedFromVars(B.json.shape),S(),S=l(o,(t=>x=t)),a=B.getDerivedFromVars(B.json.active_item_color),V(),V=l(a,(t=>_=t)),s=B.getDerivedFromVars(B.json.inactive_item_color),D(),D=l(s,(t=>w=t)),c=B.getDerivedFromVars(B.json.active_item_size),O(),O=l(c,(t=>k=t)),u=B.getDerivedFromVars(B.json.active_shape),M(),M=l(u,(t=>C=t)),d=B.getDerivedFromVars(B.json.inactive_shape),P(),P=l(d,(t=>E=t)),p=B.getDerivedFromVars(B.json.space_between_centers),A(),A=l(p,(t=>y=t)),v=B.getDerivedFromVars(B.json.items_placement),F(),F=l(v,(t=>b=t)),C&&(Z=we({type:"shape_drawable",shape:C},_n,Z)),E&&(Y=we({type:"shape_drawable",shape:E},_n,Y)),!C&&!E&&x){const t=oe(k,1.3);Y=we({type:"shape_drawable",shape:x,color:Y.background},_n,Y),Y.background=gt(w,1,Y.background),Z=Object.assign(Object.assign({},Y),{width:Y.width*t,height:Y.height*t,borderRadius:Y.borderRadius*t,background:Z.background}),Z.background=gt(_,1,Z.background)}if(!b||"default"!==b.type&&"stretch"!==b.type)X="default",y&&(Q=Pt(y.value,Q));else if(X=b.type,"default"===X)Q=Pt(null===(T=b.space_between_centers)||void 0===T?void 0:T.value,Q);else if("stretch"===X){const t=b;K=oe(t.max_visible_items,K),et=Pt(null===(N=t.item_spacing)||void 0===N?void 0:N.value,et)}return g=L.getStore("pagers"),j(),j=l(g,(t=>m=t)),async function(t){if(B.json.pager_id&&t.has(B.json.pager_id)&&(G=t.get(B.json.pager_id),await $(),J)){const t=J.children[G.currentItem];if(t){const e=t.offsetLeft;H.scroll({left:e-H.clientWidth/2,behavior:"smooth"})}}}(m),h={placement:X},j(),A(),F(),V(),D(),S(),O(),P(),M(),`${R(ne,"Outer").$$render(t,{cls:At("indicator",bn,h),componentContext:B,layoutParams:U},{},{default:()=>`<div${W("class",bn.indicator__scroller,0)}${W("this",H,0)}><div${W("class",bn.indicator__items,0)} role="tablist"${q({margin:"default"===X?`0 ${dt(Math.max(0,Z.width-Y.width)/2)}`:"","--divkit-indicator-inactive-width":dt(Y.width),"--divkit-indicator-inactive-height":dt(Y.height),"--divkit-indicator-inactive-border-radius":dt(Y.borderRadius),"--divkit-indicator-inactive-background":Y.background||"","--divkit-indicator-inactive-box-shadow":Y.boxShadow||"","--divkit-indicator-active-width":dt(Z.width),"--divkit-indicator-active-height":dt(Z.height),"--divkit-indicator-active-border-radius":dt(Z.borderRadius),"--divkit-indicator-active-background":Z.background||"","--divkit-indicator-active-box-shadow":Z.boxShadow||"","--divkit-indicator-active-scale":Z.width/Y.width,"--divkit-indicator-default-margin":"default"===X?`0 ${dt((Q-Y.width)/2)}`:"","--divkit-indicator-stretch-margin":"stretch"===X?dt(et):"","--divkit-indicator-stretch-max-count":"stretch"===X?K:"","--divkit-indicator-stretch-max-spacer":"stretch"===X?dt((K-1)*et):""})}${W("this",J,0)}>${G?`${z(Array(G.size),((t,e)=>{let n=e===G.currentItem;return` <div class="${I(At("indicator__item",bn,{active:n}),!0)+" "+I(tt,!0)}" role="tab" id="${I(G.instId,!0)+"-tab-"+I(e,!0)}" aria-controls="${I(G.instId,!0)+"-panel-"+I(e,!0)}"${W("aria-selected",n?"true":"false",0)}${W("tabindex",n?0:-1,0)}></div>`}))}`:""}</div></div>`})}`})),$n=wn,xn={slider:"divkit-ef4f7",slider__input:"divkit-d1d65",slider__input_secondary:"divkit-c7980",slider__thumb:"divkit-f3453",slider__thumb_secondary:"divkit-e1984","slider__tracks-wrapper":"divkit-f7338","slider__tracks-inner":"divkit-ac903",slider__track:"divkit-e956c","slider__active-track":"divkit-ec5bf","slider__thumb-text":"divkit-c4af5","slider__thumb-text_secondary":"divkit-d8821",slider__tick:"divkit-bd9bf",slider__tick_active:"divkit-d8ce2",slider__tick_inactive:"divkit-e71e7"};function kn(t,e){if(!t||!t.font_size)return e;const n=t.offset,r=t.text_color&>(t.text_color)||"#000",o=ie(t.font_weight);if(Zt(t.font_size)&&"transparent"!==r){var i,a;const e={fontSize:dt(t.font_size),fontWeight:o,textColor:r};return"number"==typeof(null==n||null===(i=n.x)||void 0===i?void 0:i.value)&&"number"==typeof(null==n||null===(a=n.y)||void 0===a?void 0:a.value)&&(e.offset={x:n.x.value,y:n.y.value}),e}}function En(t,e,n){return Math.max(e,Math.min(n,Number(t)))}const Cn="function"==typeof BigInt;function jn(t){return Cn?BigInt(t):Number(t)}const An=jn("9223372036854775807"),Fn=jn("-9223372036854775808");function Vn(t){const e=jn(t);if(e>An||e<Fn)throw new Error("Integer overflow.");return e}const Dn=Vn(0);function Sn(t){let e=t;return e<0&&(e=-e),e}function On(t){let e=0;return t>0?e=1:t<0&&(e=-1),Vn(e)}class Pn{constructor(t,e){const n=this.convertValue(e);this.name=t,this.value=n}getName(){return this.name}subscribe(t){return this.store||(this.store=Q(this.value)),this.store.subscribe(t)}set(t){const e=this.fromString(t);this.setValue(e)}setValue(t){const e=this.convertValue(t);this.value=e,this.store&&this.store.set(e)}getValue(){return this.value}}class In extends Pn{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"string"}}class Mn extends Pn{convertValue(t){if("bigint"!=typeof t&&"number"!=typeof t||"number"==typeof t&&(isNaN(t)||t!==Math.round(t))||t>An||t<Fn)throw new Error("Incorrect variable value");return Vn(t)}fromString(t){const e=Vn(t);return this.convertValue(e)}getType(){return"integer"}}class Tn extends Pn{convertValue(t){if("number"!=typeof t||isNaN(t)||!isFinite(t))throw new Error("Incorrect variable value");return t}fromString(t){const e=Number(t);return this.convertValue(e)}getType(){return"number"}}class zn extends Pn{convertValue(t){if(1!==t&&0!==t&&!0!==t&&!1!==t)throw new Error("Incorrect variable value");return Number(t)}fromString(t){if("1"===t||"true"===t)return 1;if("0"===t||"false"===t)return 0;throw new Error("Incorrect variable value")}getType(){return"boolean"}}class Nn extends Pn{convertValue(t){if("string"!=typeof t||!ft(t))throw new Error("Incorrect variable value");return t}fromString(t){return this.convertValue(t)}getType(){return"color"}}class Rn extends Pn{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"url"}}class Bn extends Pn{convertValue(t){if("object"!=typeof t||!t)throw new Error("Incorrect variable value");return t}fromString(t){throw new Error("Dict variable does not support setter from string")}getType(){return"dict"}}class Un extends Pn{convertValue(t){if(!Array.isArray(t))throw new Error("Incorrect variable value");return t}fromString(t){throw new Error("Array variable does not support setter from string")}getType(){return"array"}}const Ln={string:In,number:Tn,integer:Mn,boolean:zn,color:Nn,url:Rn,dict:Bn,array:Un};function Wn(t,e,n){if(!(e in Ln))throw new Error("Unsupported variable type");return new Ln[e](t,n)}function Hn(){}function qn(t){return t(this.value),Hn}function Jn(){throw new Error("Cannot change the value of this type of variable")}const Gn={string:class extends In{},number:class extends Tn{},integer:class extends Mn{},boolean:class extends zn{},color:class extends Nn{},url:class extends Rn{},dict:class extends Bn{},array:class extends Un{}};for(const t in Gn){const e=Gn[t];e.prototype.subscribe=qn,e.prototype.set=Jn,e.prototype.setValue=Jn}const Zn={width:10,height:10,borderRadius:5,background:"#000"},Yn=["rounded_rectangle","circle"],Xn=["rounded_rectangle"];function Qn(t,e,n,r,o){let i=[];if(o)for(let o=t;o<e;++o)i.push((o-n)/(r-n));else{for(let e=n;e<t;++e)i.push((e-n)/(r-n));for(let t=e;t<r+1;++t)i.push((t-n)/(r-n))}return i}const Kn=L(((t,e,n,r)=>{let o,a,s,c,u,d,p,g,h,m,y,b,_,w,$,x,k,E,C,j,A,F,V,D,S,O,P,M,T,N,B,U,L,H,J,G,Z,Y,X=i,Q=i,K=i,tt=i,et=i,nt=i,rt=i,ot=i,it=i,lt=i,ct=i,ut=i,vt=i,gt=i;var ft,ht,mt,yt;let{componentContext:bt}=e,{layoutParams:_t}=e;const wt=f(at),$t=f(qt);let xt,kt,Et,Ct,jt,Ft=0,Vt=100,Dt=Zn,Ot=Dt,Pt=Zn,It=Zn,Mt=null,Tt=null,zt=jt,Rt="",Bt="",Ut=!1,Lt=En(G||0,Ft,Vt),Wt=En(J||0,Ft,Vt),Ht=!1;function Jt(){if(!kt)return;const t=Vt-Ft,e=(null==Mt?void 0:Mt.width)||0,n=(null==Tt?void 0:Tt.width)||0;Math.max(e,n)*t>=(null==kt?void 0:kt.clientWidth)?Ht||(bt.logError(st(new Error("Slider ticks overlap each other"),{level:"warn"})),Ht=!0):Ht=!1}Ke(Jt,50),v((()=>{xt&&(wt.unregisterFocusable(xt),xt=void 0)})),void 0===e.componentContext&&n.componentContext&&void 0!==bt&&n.componentContext(bt),void 0===e.layoutParams&&n.layoutParams&&void 0!==_t&&n.layoutParams(_t),bt.json&&(Dt=Zn,Ot=Dt,Pt=Zn,It=Zn,Mt=null,Tt=null,jt=void 0,zt=void 0,Rt="",Bt=""),o=bt.json.thumb_value_variable,a=bt.json.thumb_secondary_value_variable,s=o&&bt.getVariable(o,"integer")||Wn("temp","integer",0),ut(),ut=l(s,(t=>G=t)),c=a&&bt.getVariable(a,"integer")||Wn("temp","integer",0),ct(),ct=l(c,(t=>J=t)),u=bt.getDerivedFromVars(bt.json.min_value),gt(),gt=l(u,(t=>Y=t)),d=bt.getDerivedFromVars(bt.json.max_value),vt(),vt=l(d,(t=>Z=t)),p=bt.getDerivedFromVars(bt.json.thumb_style),lt(),lt=l(p,(t=>H=t)),g=bt.getDerivedFromVars(bt.json.thumb_secondary_style),it(),it=l(g,(t=>L=t)),h=bt.getDerivedFromVars(bt.json.track_inactive_style),ot(),ot=l(h,(t=>U=t)),m=bt.getDerivedFromVars(bt.json.track_active_style),rt(),rt=l(m,(t=>B=t)),y=bt.getDerivedFromVars(bt.json.tick_mark_active_style),nt(),nt=l(y,(t=>N=t)),b=bt.getDerivedFromVars(bt.json.tick_mark_inactive_style),et(),et=l(b,(t=>T=t)),_=bt.getDerivedFromVars(bt.json.thumb_text_style),tt(),tt=l(_,(t=>M=t)),w=bt.getDerivedFromVars(bt.json.thumb_secondary_text_style),K(),K=l(w,(t=>P=t)),$=bt.getDerivedFromVars(bt.json.accessibility),Q(),Q=l($,(t=>O=t)),x=bt.getDerivedFromVars(bt.json.secondary_value_accessibility),X(),X=l(x,(t=>S=t)),Ft=Nt(Y,Ft),Vt=Nt(Z,Vt),Jt();{const t=En(G||0,Ft,Vt);t!==Lt&&(Lt=t)}{const t=En(J||0,Ft,Vt);t!==Wt&&(Wt=t)}Dt=we(H,Yn,Dt),Ot=we(L,Yn,Dt),Pt=we(U,Xn,Pt),It=we(B,Xn,It);{let t=we(N,Yn,Zn);t!==Zn&&(Mt=t)}Mt?(Et=a?Qn(Math.min(Lt,Wt),Math.max(Lt,Wt)+1,Ft,Vt,!0):Qn(Ft,Lt,Ft,Vt,!0),Jt()):Et=[];{let t=we(T,Yn,Zn);t!==Zn&&(Tt=t)}Tt?(Ct=a?Qn(Math.min(Lt,Wt),Math.max(Lt,Wt)+1,Ft,Vt,!1):Qn(Lt+1,Vt+1,Ft,Vt,!0),Jt()):Ct=[],jt=kn(M,jt),zt=kn(P,jt),(null==O?void 0:O.description)?Rt=O.description:bt.logError(st(new Error('Missing accessibility "description" for slider'),{level:"warn"})),(null==S?void 0:S.description)?Bt=S.description:a&&bt.logError(st(new Error('Missing second accessibility "description" for slider'),{level:"warn"}));{let t=!1;$t.hasAction()?(bt.logError(st(new Error('Cannot show "slider" inside component with action'))),t=!0):Dt===Zn?(bt.logError(st(new Error('Missing "thumb_style" in slider'))),t=!0):It===Zn?(bt.logError(st(new Error('Missing "track_active_style" in slider'))),t=!0):Pt===Zn&&(bt.logError(st(new Error('Missing "track_inactive_style" in slider'))),t=!0),t!==Ut&&(Ut=t)}return k=dt(Math.max(...[Dt.width,Ot.width,0].filter(St))),E=dt(Math.max(...[Dt.height,Ot.height,0].filter(St))),C=(Lt-Ft)/(Vt-Ft),j=a?(Wt-Ft)/(Vt-Ft):void 0,A=void 0!==j?Math.abs(j-C):C,F=void 0!==j?Math.min(j,C):0,V={"--divkit-slider-thumb-width":dt(Dt.width),"--divkit-slider-thumb-height":dt(Dt.height),"--divkit-slider-thumb-secondary-width":dt(Ot.width),"--divkit-slider-thumb-secondary-height":dt(Ot.height),"--divkit-slider-text-offset-x":(null===(ft=null==jt?void 0:jt.offset)||void 0===ft?void 0:ft.x)?pt(jt.offset.x):void 0,"--divkit-slider-text-offset-y":(null===(ht=null==jt?void 0:jt.offset)||void 0===ht?void 0:ht.y)?pt(jt.offset.y):void 0,"--divkit-slider-text-secondary-offset-x":(null===(mt=null==zt?void 0:zt.offset)||void 0===mt?void 0:mt.x)?pt(zt.offset.x):void 0,"--divkit-slider-text-secondary-offset-y":(null===(yt=null==zt?void 0:zt.offset)||void 0===yt?void 0:yt.y)?pt(zt.offset.y):void 0,"--divkit-slider-tick-active-width":Mt?dt(Mt.width):void 0,"--divkit-slider-tick-active-height":Mt?dt(Mt.height):void 0,"--divkit-slider-tick-active-border-radius":Mt?dt(Mt.borderRadius):void 0,"--divkit-slider-tick-active-background":(null==Mt?void 0:Mt.background)||void 0,"--divkit-slider-tick-active-box-shadow":(null==Mt?void 0:Mt.boxShadow)||void 0,"--divkit-slider-tick-inactive-width":Tt?dt(Tt.width):void 0,"--divkit-slider-tick-inactive-height":Tt?dt(Tt.height):void 0,"--divkit-slider-tick-inactive-border-radius":Tt?dt(Tt.borderRadius):void 0,"--divkit-slider-tick-inactive-background":(null==Tt?void 0:Tt.background)||void 0,"--divkit-slider-tick-inactive-box-shadow":(null==Tt?void 0:Tt.boxShadow)||void 0,"--divkit-slider-max-thumb-width":k,"--divkit-slider-max-thumb-height":E,"--divkit-slider-track-part":C,"--divkit-slider-track-secondary-part":j},D={},bt.json,X(),Q(),K(),tt(),et(),nt(),rt(),ot(),it(),lt(),ct(),ut(),vt(),gt()," "+(Ut?"":`${R(ne,"Outer").$$render(t,{cls:At("slider",xn,D),style:V,customDescription:!0,customActions:"slider",hasInnerFocusable:!0,componentContext:bt,layoutParams:_t},{},{default:({focusHandler:t,blurHandler:e})=>{var n,r,o,i,s,l;return`<div${W("class",xn["slider__tracks-wrapper"],0)}><div${W("class",xn["slider__tracks-inner"],0)}${W("this",kt,0)}><div${W("class",xn.slider__track,0)}${q({height:dt(Pt.height),"border-radius":dt(Pt.borderRadius),background:Pt.background,"box-shadow":Pt.boxShadow||""})}></div> <div${W("class",xn["slider__active-track"],0)}${q({left:(100*F).toFixed(2)+"%",width:(100*A).toFixed(2)+"%",height:dt(It.height),"border-radius":dt(It.borderRadius),background:It.background,"box-shadow":It.boxShadow||""})}></div> ${z(Et,(t=>`<div class="${I(xn.slider__tick,!0)+" "+I(xn.slider__tick_active,!0)}"${q({"--divkit-slider-tick":t})}></div>`))} ${z(Ct,(t=>`<div class="${I(xn.slider__tick,!0)+" "+I(xn.slider__tick_inactive,!0)}"${q({"--divkit-slider-tick":t})}></div>`))} <div${W("class",xn.slider__thumb,0)}${q({"border-radius":dt(Dt.borderRadius),background:Dt.background,"box-shadow":Dt.boxShadow||""})}>${jt?`<div${W("class",xn["slider__thumb-text"],0)}><div${W("class",xn["slider__thumb-text-inner"],0)}${q({"font-size":(null===(n=jt)||void 0===n?void 0:n.fontSize)||"1em","font-weight":(null===(r=jt)||void 0===r?void 0:r.fontWeight)||"",color:(null===(o=jt)||void 0===o?void 0:o.textColor)||"#000"})}>${I(Lt)}</div></div>`:""}</div> ${a?`<div class="${I(xn.slider__thumb,!0)+" "+I(xn.slider__thumb_secondary,!0)}"${q({"border-radius":dt(Ot.borderRadius),background:Ot.background,"box-shadow":Ot.boxShadow||""})}>${zt?`<div class="${I(xn["slider__thumb-text"],!0)+" "+I(xn["slider__thumb-text_secondary"],!0)}"><div${W("class",xn["slider__thumb-text-inner"],0)}${q({"font-size":(null===(i=zt)||void 0===i?void 0:i.fontSize)||"1em","font-weight":(null===(s=zt)||void 0===s?void 0:s.fontWeight)||"",color:(null===(l=zt)||void 0===l?void 0:l.textColor)||"#000"})}>${I(Wt)}</div></div>`:""}</div>`:""} <input type="range"${W("class",xn.slider__input,0)}${W("min",Ft,0)}${W("max",Vt,0)} step="1"${W("value",Lt,0)}${W("aria-label",Rt,0)}${W("this",undefined,0)}> ${a?`<input type="range"${W("class",`${xn.slider__input} ${xn.slider__input_secondary}`,0)}${W("min",Ft,0)}${W("max",Vt,0)} step="1"${W("value",Wt,0)}${W("aria-label",Bt,0)}>`:""}</div></div>`}})}`)})),tr={input:"divkit-c3a4c","input_alignment-horizontal_center":"divkit-fc52a","input_alignment-horizontal_right":"divkit-e8038",input__input:"divkit-f11e0",input__placeholder:"divkit-b7593","input_alignment-vertical_top":"divkit-bdccd","input_alignment-vertical_bottom":"divkit-fc670","input_alignment-vertical_baseline":"divkit-dd6af","input_highlight-color":"divkit-cc00f",input__input_singleline:"divkit-ffd1e","input__scroll-wrapper":"divkit-ad8a3",input__input_multiline:"divkit-f61f0","input__input_has-custom-focus":"divkit-e6b50"};function er(t,e){if(t===e)return{start:t.length,added:0,removed:0};if(t.length>e.length){const n=er(e,t);return{start:n.start,added:n.removed,removed:n.added}}let n=0,r=e.length-1;const o=e.length-t.length;for(;n<r&&n<t.length&&t[n]===e[n];)++n;for(;r-o>=n&&t[r-o]===e[r];)--r;return++r,{start:n,added:r-n,removed:r-n-o}}function nr(t,e,n){return e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class rr{constructor(t){this.char=t}}class or{constructor(t,e,n){this.char=t,this.filter=e,this.placeholder=n}}class ir{constructor(t){nr(this,"filters",new Map),nr(this,"destructedValue",[]),nr(this,"cursorPos",0),this.maskData=t,this.updateMaskData(t)}get cursorPosition(){return this.cursorPos}get rawValue(){return this.collectValueRange(0,this.destructedValue.length-1)}get value(){let t="";for(let e=0;e<this.destructedValue.length;++e){const n=this.destructedValue[e];if(n instanceof rr)t+=n.char;else if(n instanceof or)if(n.char)t+=n.char;else{if(!this.maskData.alwaysVisible)break;t+=n.placeholder}}return t}firstEmptyHolderIndex(){const t=this.destructedValue.findIndex((t=>t instanceof or&&!t.char));return-1!==t?t:this.destructedValue.length}updateMaskData(t,e=!0){const n=this.maskData!==t&&e?this.rawValue:null;this.filters=new Map,this.maskData=t,this.maskData.decoding.forEach((t=>{if(t.filter)try{const e=new RegExp(t.filter);this.filters.set(t.key,e)}catch(e){this.onException(st(e,{level:"error",additional:{key:t.key}}))}})),this.destructedValue=this.maskData.pattern.split("").map((t=>{const e=this.maskData.decoding.find((e=>e.key===t));return e?new or(null,this.filters.get(e.key),e.placeholder):new rr(t)})),null!==n&&this.overrideRawValue(n)}overrideRawValue(t){this.clearRange(0,this.destructedValue.length),this.replaceChars(t,0),this.cursorPos=Math.min(this.cursorPos,this.value.length)}applyChangeFrom(t,e){const n=er(this.value,t);void 0!==e&&(n.start=Math.max(0,e-n.added));const r=this.buildBodySubstring(n,t),o=this.buildTailSubstring(n);this.cleanup(n);const i=this.firstEmptyHolderIndex(),a=o?this.calculateMaxShift(o,i):void 0;this.replaceChars(r,i,a);const s=this.firstEmptyHolderIndex();this.replaceChars(o,s),this.calculateCursorPosition(n,s)}buildBodySubstring(t,e){return e.substring(t.start,t.start+t.added)}buildTailSubstring(t){return this.collectValueRange(t.start+t.removed,this.destructedValue.length-1)}calculateMaxShift(t,e){if(this.filters.size<=1){let n=0,r=e;for(;r<this.destructedValue.length;)this.destructedValue[r]instanceof or&&++n,++r;return Math.max(0,n-t.length)}const n=this.calculateInsertableSubstring(t,e);let r=0;for(;r<this.destructedValue.length&&n===this.calculateInsertableSubstring(t,e+r);)++r;return Math.max(0,r-1)}cleanup(t){if(0===t.added&&1===t.removed){let e=t.start;for(;e>=0;){const t=this.destructedValue[e];if(t instanceof or&&null!==t.char){t.char=null;break}--e}}this.clearRange(t.start,this.destructedValue.length)}clearRange(t,e){let n=t;for(;n<e&&n<this.destructedValue.length;){const t=this.destructedValue[n];t instanceof or&&(t.char=null),++n}}calculateCursorPosition(t,e){const n=this.firstEmptyHolderIndex();let r;r=t.start<n?Math.min(this.firstHolderAfter(e),this.value.length):n,this.cursorPos=r}calculateInsertableSubstring(t,e){let n="",r=e;const o=()=>{for(var t;r<this.destructedValue.length&&!(this.destructedValue[r]instanceof or);)++r;return null===(t=this.destructedValue[r])||void 0===t?void 0:t.filter};return t.split("").forEach((t=>{const e=o();null!=e&&e.test(t)&&(n+=t,++r)})),n}collectValueRange(t,e){let n="",r=t;for(;r<=e;){const t=this.destructedValue[r];t instanceof or&&null!==t.char&&(n+=t.char),++r}return n}replaceChars(t,e,n){let r=this.calculateInsertableSubstring(t,e);void 0!==n&&(r=r.substring(0,n));let o=e,i=0;for(;o<this.destructedValue.length&&i<r.length;){const t=this.destructedValue[o],e=r[i];t instanceof or&&(t.char=e,++i),++o}}firstHolderAfter(t){let e=t;for(;e<this.destructedValue.length&&!(this.destructedValue[e]instanceof or);)++e;return e}}class ar extends ir{constructor(t,e){super(t),this.logError=e}onException(t){this.logError(t)}}function sr(t,e,n){return e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class lr extends ir{constructor(t=void 0,e){super({pattern:"",decoding:[],alwaysVisible:!1}),sr(this,"currencyFormatter",new Intl.NumberFormat),sr(this,"decimalSeparator","."),sr(this,"localeDigits",{}),sr(this,"trimZeroRegExp",new RegExp("")),this.logError=e,this.initFormatter(t)}updateCurrencyParams(t){const e=this.parseFormat(this.rawValue)||0;this.initFormatter(t);const n=e.toString().replace(".",this.decimalSeparator);this.applyChangeFrom(n)}initFormatter(t){try{this.currencyFormatter=new Intl.NumberFormat(t,{minimumFractionDigits:2,maximumFractionDigits:2}),this.decimalSeparator=this.currencyFormatter.format(0)[1],this.localeDigits=new Array(10).fill("").reduce(((t,e,n)=>(t[n]=this.currencyFormatter.format(n)[0],t)),{}),this.trimZeroRegExp=new RegExp(`^${this.localeDigits[0]}+`)}catch(e){this.onException(st(e,{level:"error",additional:{locale:t}}))}}invalidateMaskDataForFormatted(t){const e=this.currencyFormatter.format(t),n=this.formatPattern(e),r=[{key:"#",filter:`[${[...Object.values(this.localeDigits)].join("")}]`,placeholder:this.localeDigits[0]},{key:this.decimalSeparator,filter:`[${this.decimalSeparator}]`,placeholder:this.decimalSeparator}];this.updateMaskData({pattern:n,decoding:r,alwaysVisible:this.maskData.alwaysVisible},!1)}overrideRawValue(t){const e=this.parseFormat(t)||0;this.invalidateMaskDataForFormatted(e),super.overrideRawValue(t)}applyChangeFrom(t,e){const n=er(this.value,t),r=this.value.lastIndexOf(this.decimalSeparator),o=t.lastIndexOf(this.decimalSeparator),i=r!==o||-1===r&&-1===o,a=this.validFormat(t,n);this.cleanup(n);const s=this.parseFormat(a)||0;i&&this.invalidateMaskDataForFormatted(s),this.replaceChars(a,0),this.value.length>n.start&&!this.isDigit(this.value[n.start])?this.cursorPos=null!=e?e:this.cursorPosition:this.cursorPos=Math.abs(this.value.length-(t.length-(null!=e?e:this.cursorPosition)))}parseFormat(t){return parseFloat(t.replace(/./g,(t=>this.localeDigits[t]||(t===this.decimalSeparator?".":""))))}formatPattern(t){let e="";for(const n of t)e+=this.isDigit(n)?"#":n;return e}validFormat(t,e){if(!t)return"";let n=-1,r=0;for(;r<t.length;){if(t[r]===this.decimalSeparator&&!this.inDiff(e,r)){n=r;break}r++}let o=-1;1===e.added&&0===e.removed&&[",","."].includes(t[e.start])&&(o=e.start);const i=this.currencyFormatter.resolvedOptions().maximumFractionDigits;let a=i;if(-1!==n)for(r=n;r<t.length;)this.isDigit(t[r])&&!this.inDiff(e,r)&&a--,r++;else{let n=!1;for(let r=0;r<t.length;r++){const o=t[r];o===this.decimalSeparator?n=!0:!this.inDiff(e,r)&&n&&this.isDigit(o)&&a--}}const s=t.includes(this.decimalSeparator)||-1!==o,l=[];r=t.length-1;let c=!1;for(;r>=0;){const u=t[r],d=l.length<=i;this.isDigit(u)?this.inDiff(e,r)&&!c&&s?a>0&&(l.push(u),a--):l.push(u):d&&-1===n&&r===o?(l.push(this.decimalSeparator),c=!0):!d||u!==this.decimalSeparator||n!==r&&-1!==n||(l.push(this.decimalSeparator),c=!0,n=r),r--}return l.reverse().join("").replace(this.trimZeroRegExp,"")}inDiff(t,e){return t.start<=e&&e<t.start+t.added}isDigit(t){return Boolean(this.localeDigits[t])}onException(t){this.logError(t)}}function cr(t){const e=t.textContent;let n=0;return"string"==typeof e&&(n+=e.length,t instanceof HTMLElement&&("DIV"===t.tagName||"BR"===t.tagName)&&++n),n}function ur(t,e){if(3!==t.nodeType)if(t instanceof HTMLElement&&"BR"===t.tagName)try{const e=window.getSelection();if(e){e.removeAllRanges();const n=document.createRange(),r=t.parentNode,o=Array.from(r.childNodes).indexOf(t)+1;n.setStart(r,o),n.setEnd(r,o),e.addRange(n)}}catch(t){}else for(let n=0,r=t.childNodes.length;n<r;++n){const r=t.childNodes[n],o=cr(r);if(e<=o)return void ur(r,e);e-=o}else try{const n=window.getSelection();if(n){n.removeAllRanges();const r=document.createRange();r.setStart(t,e),r.setEnd(t,e),n.addRange(r)}}catch(t){}}const dr="undefined"!=typeof document&&"inputMode"in document.createElement("input"),pr={email:"email",number:"number",phone:"tel",single_line_text:"text",multi_line_text:"text",uri:"url"},vr=L(((t,e,n,r)=>{let o,a,s,u,d,p,g,h,m,y,b,_,w,x,k,E,C,j,A,F,V,D,S,O,P,M,T,z,N,B,U,L,H,q,J,G,Z,Y,X,Q,K,tt,et,nt,rt,ot,it=i,lt=i,ct=i,vt=i,ft=i,ht=i,mt=i,yt=i,bt=i,_t=i,wt=i,$t=i,xt=i,kt=i,Et=i,Ct=i,jt=i,Ft=i,St=i;var Ot;let{componentContext:It}=e,{layoutParams:Mt}=e;const Tt=f(at);let zt,Nt,Rt,Ut,Lt,Wt=null,Ht="",qt="",Jt=!1,Gt="",Yt=12,Xt="",Qt="",Kt="#000",te="",ee="left",re="center",ie="multi_line_text",se="text",le="",de=null,pe="",ve="",ge="";function fe(t){Nt instanceof HTMLInputElement?Nt.selectionStart=Nt.selectionEnd=t:ur(Nt,t)}async function he(){if(!Nt||!Wt)return;Wt.overrideRawValue(N),u.set(Wt.rawValue),c(s,z=Ht=qt=Wt.value,z);const t=Wt.cursorPosition;await $(),document.activeElement===Nt&&fe(t)}var me;v((()=>{zt&&(Tt.unregisterFocusable(zt),zt=void 0)})),void 0===e.componentContext&&n.componentContext&&void 0!==It&&n.componentContext(It),void 0===e.layoutParams&&n.layoutParams&&void 0!==Mt&&n.layoutParams(Mt),It.json&&(Gt="",Yt=12,Rt=void 0,Xt="",Ut=void 0,Kt="#000",te="",ee="left",re="center",ie="multi_line_text",se="text",Lt=void 0),o=It.json.text_variable,a=null===(Ot=It.json.mask)||void 0===Ot?void 0:Ot.raw_text_variable,s=o&&It.getVariable(o,"string")||Wn("temp","string",""),it(),it=l(s,(t=>z=t)),u=a&&It.getVariable(a,"string")||Wn("temp","string",""),lt(),lt=l(u,(t=>N=t)),d=It.getDerivedFromVars(It.json.hint_text),Ft(),Ft=l(d,(t=>rt=t)),p=It.getDerivedFromVars(It.json.hint_color),jt(),jt=l(p,(t=>nt=t)),g=It.getDerivedFromVars(It.json.font_size),Ct(),Ct=l(g,(t=>et=t)),h=It.getDerivedFromVars(It.json.font_weight),Et(),Et=l(h,(t=>tt=t)),m=It.getDerivedFromVars(It.json.font_family),kt(),kt=l(m,(t=>K=t)),y=It.getDerivedFromVars(It.json.line_height),xt(),xt=l(y,(t=>Q=t)),b=It.getDerivedFromVars(It.json.letter_spacing),$t(),$t=l(b,(t=>X=t)),_=It.getDerivedFromVars(It.json.text_color),wt(),wt=l(_,(t=>Y=t)),w=It.getDerivedFromVars(It.json.highlight_color),_t(),_t=l(w,(t=>Z=t)),x=It.getDerivedFromVars(It.json.text_alignment_horizontal),bt(),bt=l(x,(t=>G=t)),k=It.getDerivedFromVars(It.json.text_alignment_vertical),yt(),yt=l(k,(t=>J=t)),E=It.getDerivedFromVars(It.json.keyboard_type),mt(),mt=l(E,(t=>q=t)),C=It.getDerivedFromVars(It.json.mask),ht(),ht=l(C,(t=>H=t)),j=It.getDerivedFromVars(It.json.max_visible_lines),ft(),ft=l(j,(t=>L=t)),A=It.getDerivedFromVars(It.json.paddings),vt(),vt=l(A,(t=>U=t)),F=It.getDerivedFromVars(It.json.accessibility),ct(),ct=l(F,(t=>B=t)),V=It.getDerivedFromVars(It.json.select_all_on_focus),St(),St=l(V,(t=>ot=t)),o?Jt=!1:(Jt=!0,It.logError(st(new Error('Missing "text_variable" in "input"')))),"fixed_length"===(null==(me=H)?void 0:me.type)?Wt=function(t,e,n){if("string"==typeof t.pattern&&Array.isArray(t.pattern_elements)&&t.pattern_elements.every((t=>t.key&&"string"==typeof t.key))){const r={pattern:t.pattern,alwaysVisible:Boolean(t.always_visible),decoding:t.pattern_elements.map((t=>({key:t.key,filter:t.regex&&"string"==typeof t.regex?t.regex:void 0,placeholder:t.placeholder&&"string"==typeof t.placeholder?t.placeholder:"_"})))};return n?(n.updateMaskData(r),n):new ar(r,e)}return n||null}(me,It.logError,Wt):"currency"===(null==me?void 0:me.type)&&(Wt=function(t,e,n){return n?(n.updateCurrencyParams(t.locale),n):new lr(t.locale,e)}(me,It.logError,Wt)),Wt&&he(),Wt||Ht===z||(Ht=qt=z),Wt&&Wt.rawValue!==N&&he(),D=rt,Gt=gt(nt,1,Gt),Yt=oe(et,Yt),Rt=ae(tt,Rt),Xt=K&&"string"==typeof K?Tt.typefaceProvider(K,{fontWeight:Rt||400}):"";{const t=Q;Zt(t)&&(Ut=t/Yt)}return Dt(X)&&(Qt=dt(X)),Kt=gt(Y,1,Kt),te=gt(Z,1,te),ee=ce(G,ee),re=ue(J,re),q&&q in pr&&(se=pr[q],ie=q),"currency"===(null==H?void 0:H.type)&&(se=dr?"text":"tel",Lt="decimal"),S="multi_line_text"===ie,le=Zt(L)?`calc(${L*(Ut||1.25)*(Yt/10)+"em"} + ${pt(Pt(null==U?void 0:U.top,0)+Pt(null==U?void 0:U.bottom,0))})`:"",de=Bt(U||void 0,de),pe=de?Vt({top:(Number(de.top)||0)/Yt*10,right:(Number(de.right)||0)/Yt*10,bottom:(Number(de.bottom)||0)/Yt*10,left:(Number(de.left)||0)/Yt*10}):"",ve=de?Vt({top:(Number(de.top)||0)/Yt*10,bottom:(Number(de.bottom)||0)/Yt*10}):"",(null==B?void 0:B.description)?ge=B.description:It.logError(st(new Error('Missing accessibility "description" for input'),{level:"warn"})),O={"highlight-color":Boolean(te),multiline:S,"alignment-horizontal":ee,"alignment-vertical":re},P={"--divkit-input-hint-color":Gt,"--divkit-input-highlight-color":te,"--divkit-input-line-height":Ut,"font-weight":Rt,"font-family":Xt,"letter-spacing":Qt,color:Kt,"max-height":le},M={"font-size":dt(Yt),padding:pe},T={"font-size":dt(Yt),padding:ve},Nt&&It.json&&(zt&&(Tt.unregisterFocusable(zt),zt=void 0),It.json.id&&!It.fakeElement&&(zt=It.json.id,Tt.registerFocusable(zt,{focus(){Nt&&Nt.focus()}}))),it(),lt(),ct(),vt(),ft(),ht(),mt(),yt(),bt(),_t(),wt(),$t(),xt(),kt(),Et(),Ct(),jt(),Ft(),St(),Jt?"":`${R(ne,"Outer").$$render(t,{cls:At("input",tr,O),style:P,customDescription:!0,customActions:"input",customPaddings:!0,hasInnerFocusable:!0,componentContext:It,layoutParams:Mt},{},{default:({focusHandler:t,blurHandler:e,hasCustomFocus:n})=>{return S?`<span${W("class",tr["input__scroll-wrapper"],0)}>${!qt&&D?`<div${W("class",tr.input__placeholder,0)} aria-hidden="true"${W("style",ut(M),0)}>${I(D)}</div>`:""} <span aria-hidden="true"${W("style",ut(T),0)}></span> <span${W("class",At("input__input",tr,{"has-custom-focus":n,multiline:!0}),0)} autocapitalize="off" contenteditable="true"${W("aria-label",ge,0)}${W("style",ut(M),0)}${W("this",Nt,0)}>${r=qt,void 0===r?"":r}</span></span>`:`<input${W("type",se,0)}${W("inputmode",Lt,0)}${W("class",At("input__input",tr,{"has-custom-focus":n,singleline:!0}),0)} autocomplete="off" autocapitalize="off"${W("aria-label",ge,0)}${W("style",ut(M),0)}${W("placeholder",D,0)}${W("value",Ht,0)}${W("this",Nt,0)}>`;var r}})}`})),gr={select:"divkit-feef3","select__select-text":"divkit-cd862",select_hint:"divkit-a3cf6",select__select:"divkit-bdb72","select__select_has-custom-focused":"divkit-a46ad","has-custom-focused":"divkit-fc5dc",select__option:"divkit-e774b"},fr=L(((t,e,n,r)=>{let o,a,s,c,u,d,p,g,h,m,y,b,_,w,$,x,k,E,C,j,A,F,V,D,S,O,P,M,T,N=i,B=i,U=i,L=i,H=i,q=i,J=i,G=i,Z=i,Y=i,X=i,{componentContext:Q}=e,{layoutParams:K}=e;const tt=f(at);let et,nt,rt,ot=!1,it="",lt=null,ct="",pt="rgba(0,0,0,.45)",vt=12,ft="",ht="",mt="#000",yt="";v((()=>{et&&(tt.unregisterFocusable(et),et=void 0)})),void 0===e.componentContext&&n.componentContext&&void 0!==Q&&n.componentContext(Q),void 0===e.layoutParams&&n.layoutParams&&void 0!==K&&n.layoutParams(K),Q.json&&(lt=null,pt="rgba(0,0,0,.45)",vt=12,nt=void 0,ft="",rt=void 0,ht="",mt="#000",yt=""),o=Q.json.value_variable,a=Q.json.options,s=Array.isArray(a)&&a.filter((t=>"string"==typeof t.value))||[],c=o&&Q.getVariable(o,"string")||Wn("temp","string",""),Y(),Y=l(c,(t=>M=t)),u=Q.getDerivedFromVars(Q.json.paddings),Z(),Z=l(u,(t=>P=t)),d=Q.getDerivedFromVars(Q.json.hint_text),X(),X=l(d,(t=>T=t)),p=Q.getDerivedFromVars(Q.json.hint_color),G(),G=l(p,(t=>O=t)),g=Q.getDerivedFromVars(Q.json.font_size),J(),J=l(g,(t=>S=t)),h=Q.getDerivedFromVars(Q.json.font_weight),q(),q=l(h,(t=>D=t)),m=Q.getDerivedFromVars(Q.json.font_family),H(),H=l(m,(t=>V=t)),y=Q.getDerivedFromVars(Q.json.line_height),L(),L=l(y,(t=>F=t)),b=Q.getDerivedFromVars(Q.json.letter_spacing),U(),U=l(b,(t=>A=t)),_=Q.getDerivedFromVars(Q.json.text_color),B(),B=l(_,(t=>j=t)),w=Q.getDerivedFromVars(Q.json.accessibility),N(),N=l(w,(t=>C=t)),Array.isArray(s)&&s.length||Q.logError(st(new Error('Empty selection "items" in "select"'))),o?ot=!1:(ot=!0,Q.logError(st(new Error('Missing "value_variable" in "select"'))));{const t=s.find((t=>t.value===M));t?it=("string"==typeof t.text?t.text:t.value)||"":(it="",M&&Q.logError(st(new Error('Value from the variable was not found in the selection items for "select"'))))}vt=oe(S,vt),lt=Bt(P||void 0,lt),ct=lt?Vt({top:(Number(lt.top)||0)/vt*10,right:(Number(lt.right)||0)/vt*10,bottom:(Number(lt.bottom)||0)/vt*10,left:(Number(lt.left)||0)/vt*10}):"",pt=gt(O,1,pt),nt=ae(D,nt),ft=V&&"string"==typeof V?tt.typefaceProvider(V,{fontWeight:nt||400}):"";{const t=F;Zt(t)&&(rt=t/vt)}return Dt(A)&&(ht=dt(A/vt*10)),mt=gt(j,1,mt),(null==C?void 0:C.description)?yt=C.description:Q.logError(st(new Error('Missing accessibility "description" for select'),{level:"warn"})),$={hint:!it},x={"--divkit-input-hint-color":pt,"font-weight":nt,"font-family":ft,color:mt},k={padding:ct,"font-size":dt(vt),"line-height":rt,"letter-spacing":ht},E={"font-size":dt(vt),"line-height":rt,"letter-spacing":ht},Q.json,N(),B(),U(),L(),H(),q(),J(),G(),Z(),Y(),X(),ot?"":`${R(ne,"Outer").$$render(t,{cls:At("select",gr,$),style:x,customDescription:!0,customActions:"select",customPaddings:!0,hasInnerFocusable:!0,componentContext:Q,layoutParams:K},{},{default:({hasCustomFocus:t,focusHandler:e,blurHandler:n})=>`<span${W("class",gr["select__select-text"],0)}${W("style",ut(k),0)} aria-hidden="true"> ${I(it||T||"")}</span> <select${W("class",At("select__select",gr,{"has-custom-focus":t}),0)}${W("aria-label",yt,0)}${W("style",ut(E),0)}${W("this",undefined,0)}>${z(s,(t=>`<option${W("class",gr.select__option,0)}${W("value",t.value,0)}>${I(t.text||t.value)}</option>`))}</select>`})}`})),hr={video__video:"divkit-c11f9","video__aspect-wrapper":"divkit-cfe32",video_aspect:"divkit-a4f5c"},mr=L(((t,e,n,r)=>{let o,a,s,c,u,d,p,g,h,m,y,b,_,w,$,x,k,E,C=i,j=i,A=i,F=i,V=i,D=i,S=i,{componentContext:O}=e,{layoutParams:P}=e;const I=f(at);let M,T,N,B,U=!1,L=!1,H=[],J=!1,G=!1,Z=!1,Y="fit",X="0";function Q(){const t=null==T?void 0:T.play();t&&t.catch((t=>{O.logError(st(new Error("Video playing error"),{level:"error",additional:{originalText:String(t)}}))}))}var K,tt;v((()=>{M&&(I.unregisterInstance(M),M=void 0),B&&(B(),B=void 0)})),void 0===e.componentContext&&n.componentContext&&void 0!==O&&n.componentContext(O),void 0===e.layoutParams&&n.layoutParams&&void 0!==P&&n.layoutParams(P),O.json&&(J=!1,G=!1,Z=!1,N=void 0,Y="fit"),o=O.json.elapsed_time_variable,a=o&&O.getVariable(o,"integer")||Wn("temp","integer",0),a&&(B&&B(),B=a.subscribe((function(t){L?L=!1:T&&(T.currentTime=Number(t)/1e3)}))),s=O.getDerivedFromVars(O.json.video_sources),S(),S=l(s,(t=>E=t)),c=O.getDerivedFromVars(O.json.repeatable),D(),D=l(c,(t=>k=t)),u=O.getDerivedFromVars(O.json.autostart),C(),C=l(u,(t=>b=t)),d=O.getDerivedFromVars(O.json.muted),V(),V=l(d,(t=>x=t)),p=O.getDerivedFromVars(O.json.preview),F(),F=l(p,(t=>$=t)),g=O.getDerivedFromVars(O.json.scale),A(),A=l(g,(t=>w=t)),h=O.getDerivedFromVars(O.json.aspect),j(),j=l(h,(t=>_=t)),K=E,tt=H,H=Array.isArray(K)&&K.length?K.filter((t=>"video_source"===(null==t?void 0:t.type)&&"string"==typeof t.url&&"string"==typeof t.mime_type)).map((t=>{const e={src:t.url};return t.mime_type&&(e.type=t.mime_type),e})):tt,H.length?U=!1:(U=!0,O.logError(st(new Error('Missing "video_sources" in "video"')))),J=de(k,J),G=de(b,G),Z=de(x,Z),N="string"==typeof $?ze($):N,Y=function(t){return"fill"===t?"cover":"no_scale"===t?"none":"contain"}(w)||Y;{const t=null==_?void 0:_.ratio;X=t&&Zt(t)?(100/Number(t)).toFixed(2):"0"}return O.json&&(M&&(I.unregisterInstance(M),M=void 0),!O.json.id||U||O.fakeElement||(M=O.json.id,I.registerInstance(M,{pause:function(){null==T||T.pause()},start:Q}))),O.json&&b&&T&&Q(),m={aspect:"0"!==X},y={"object-fit":Y},C(),j(),A(),F(),V(),D(),S(),U?"":`${R(ne,"Outer").$$render(t,{cls:At("video",hr,m),customActions:"video",componentContext:O,layoutParams:P},{},{default:()=>m.aspect?`<div${W("class",hr["video__aspect-wrapper"],0)}${q({"padding-bottom":`${X}%`})}><video${W("class",hr.video__video,0)}${W("style",ut(y),0)} playsinline ${J?"loop":""} ${G?"autoplay":""} ${Z?"muted":""}${W("poster",N,0)}${W("this",T,0)}>${z(H,(t=>`<source${W("src",t.src,0)}${W("type",t.type,0)}>`))}</video></div>`:`<video${W("class",hr.video__video,0)}${W("style",ut(y),0)} playsinline ${J?"loop":""} ${G?"autoplay":""} ${Z?"muted":""}${W("poster",N,0)}${W("this",T,0)}>${z(H,(t=>`<source${W("src",t.src,0)}${W("type",t.type,0)}>`))}</video>`})}`})),yr=mr,br=L(((t,e,n,r)=>{let o,i;var a;let{componentContext:s}=e,{layoutParams:l}=e;const c=f(at);let u=null,d="",p={},v=!1;if(void 0===e.componentContext&&n.componentContext&&void 0!==s&&n.componentContext(s),void 0===e.layoutParams&&n.layoutParams&&void 0!==l&&n.layoutParams(l),"string"==typeof s.json.custom_type&&s.json.custom_type&&(null===(a=c.customComponents)||void 0===a?void 0:a.has(s.json.custom_type))){if(u=c.customComponents.get(s.json.custom_type),"function"==typeof u.template){const t=c.getExtensionContext(),e=new Map;for(const[n,r]of t.variables)e.set(n,r.getValue());d=u.template({props:s.json.custom_props,variables:e})}else d=u.template&&"string"==typeof u.template?u.template:"";p={shadowrootmode:u.shadowRootMode||"open"}}else u=null,d=";",s.logError(st(new Error('Unknown or incorrect "custom_type" prop for div "custom"')));return o=s.json.items,void 0===o||Array.isArray(o)?v=!1:(v=!0,s.logError(st(new Error('Incorrect "items" prop for div "custom"')))),i=(!v&&o||[]).map(((t,e)=>s.produceChildContext(t,{path:e}))),u?`${R(ne,"Outer").$$render(t,{componentContext:s,layoutParams:l},{},{default:()=>{return(e=u.element)?`<${u.element}${S([T(s.json.custom_props||{})],{})}${W("this",undefined,0)}>${V(e)?"":`${d?`<template${S([T(p)],{})}> ${d}</template>`:""} ${!v&&o?`${z(i,(e=>`${R($r,"Unknown").$$render(t,{componentContext:e},{},{})}`))}`:""}`}${V(e)?"":`</${e}>`}`:"";var e}})}`:""})),_r=br,wr={};wr.text=ge,wr.container=Oe,wr.separator=Me,wr.image=Re,wr.gif=Re,wr.grid=qe,wr.gallery=en,wr.tabs=on,wr.state=fn,wr.pager=yn,wr.indicator=$n,wr.slider=Kn,wr.input=vr,wr.select=fr,wr.video=yr,wr.custom=_r;const $r=L(((t,e,n,r)=>{let{componentContext:o}=e,{layoutParams:i}=e;const a=f(at);let s;void 0===e.componentContext&&n.componentContext&&void 0!==o&&n.componentContext(o),void 0===e.layoutParams&&n.layoutParams&&void 0!==i&&n.layoutParams(i);{const t=o.json;if(s=(null==t?void 0:t.type)&&wr[t.type]||void 0,!s){let e;e=(null==t?void 0:t.type)&&a.hasTemplate(t.type)?"Recursive template":"Unknown component",o.logError(st(new Error(e),{additional:{component:(null==t?void 0:t.type)||"<missing>"}}))}}return s?`${R(s||N,"svelte:component").$$render(t,{componentContext:o,layoutParams:i},{},{})}`:""})),xr=L(((t,e,n,r)=>{let{svgFiltersMap:o}=e;return void 0===e.svgFiltersMap&&n.svgFiltersMap&&void 0!==o&&n.svgFiltersMap(o),Object.keys(o).length?`<svg${W("class","divkit-dc22b",0)} aria-hidden="true"><defs>${z([...Object.keys(o)],(t=>{let[e,n]=t.split(":");return` <filter${W("id",o[t],0)}><feFlood${W("flood-color",e,0)}></feFlood>${"source_in"===n||"source_atop"===n?`<feComposite in2="SourceGraphic"${W("operator",n.split("_")[1],0)}></feComposite>`:"multiply"===n?'<feComposite in2="SourceGraphic" operator="arithmetic" k1="1" k2="0" k3="0" k4="0"></feComposite>':`<feBlend in2="SourceGraphic"${W("mode",n,0)}></feBlend>`}</filter>`}))}</defs></svg>`:""}));function kr(t,e,n,r){const o=n[t.type];if(!o)return r(st(new Error("No such template"),{additional:{template:t.type}})),{json:t,templateContext:e};let i;const a={};for(i in e)e.hasOwnProperty(i)&&(a[i]=e[i]);for(i in t)"type"!==i&&"__proto__"!==i&&t.hasOwnProperty(i)&&(a[i]=t[i]);const s=function t(e,n){const r=Object.keys(n).filter((t=>"__proto__"!==t)),o=r.filter((t=>"$"!==t.charAt(0))),i=r.filter((t=>"$"===t.charAt(0)));return o.forEach((r=>{const o=n[r];"object"==typeof o&&null!==o?(e[r]=Array.isArray(o)?[]:{},t(e[r],o)):e[r]=o})),i.forEach((t=>{const r=n[t],o=a[r];if(void 0!==o){const n=t.substring(1);e[n]=o}})),e}({},o);for(i in t)"type"!==i&&"__proto__"!==i&&t.hasOwnProperty(i)&&(s[i]=t[i]);return{json:s,templateContext:a}}function Er(){}function Cr(t){return{subscribe:e=>(e(t),Er)}}function jr(t,e){return e.reduce(((t,e)=>({type:"BinaryExpression",operator:e[1],left:t,right:e[3]})),t)}function Ar(t,e){return e.reduce(((t,e)=>({type:"LogicalExpression",operator:e[1],left:t,right:e[3]})),t)}function Fr(t){if(t.every((t=>"string"==typeof t)))return{type:"StringLiteral",value:t.join("")};let e=t.reduce(((t,e)=>("string"==typeof e&&"string"==typeof t[t.length-1]?t[t.length-1]+=e:t.push(e),t)),[]).reduce(((t,e)=>("string"==typeof e?t.quasis.push({type:"StringLiteral",value:e}):(t.quasis.length===t.expressions.length&&t.quasis.push({type:"StringLiteral",value:""}),t.expressions.push(e)),t)),{type:"TemplateLiteral",quasis:[],expressions:[]});return e.quasis.length===e.expressions.length&&e.quasis.push({type:"StringLiteral",value:""}),e}function Vr(t){try{return Vn(t)}catch(e){throw new Error(`Value ${t} can't be converted to Integer type.`)}}function Dr(t){if("'"===t||"\\"===t)return t;throw new Error("Incorrect string escape")}function Sr(t,e,n,r){var o=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(o,Sr.prototype),o.expected=e,o.found=n,o.location=r,o.name="SyntaxError",o}function Or(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,t+(n+=n.repeat(e)).slice(0,e))}Cr(void 0),function(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}(Sr,Error),Sr.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var n,r=null;for(n=0;n<t.length;n++)if(t[n].source===this.location.source){r=t[n].text.split(/\r\n|\n|\r/g);break}var o=this.location.start,i=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(o):o,a=this.location.source+":"+i.line+":"+i.column;if(r){var s=this.location.end,l=Or("",i.line.toString().length," "),c=r[o.line-1],u=(o.line===s.line?s.column:c.length+1)-o.column||1;e+="\n --\x3e "+a+"\n"+l+" |\n"+i.line+" | "+c+"\n"+l+" | "+Or("",o.column-1," ")+Or("",u,"^")}else e+="\n at "+a}return e},Sr.buildMessage=function(t,e){var n={literal:function(t){return'"'+o(t.text)+'"'},class:function(t){var e=t.parts.map((function(t){return Array.isArray(t)?i(t[0])+"-"+i(t[1]):i(t)}));return"["+(t.inverted?"^":"")+e.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(t){return t.description}};function r(t){return t.charCodeAt(0).toString(16).toUpperCase()}function o(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(t){return"\\x0"+r(t)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(t){return"\\x"+r(t)}))}function i(t){return t.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(t){return"\\x0"+r(t)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(t){return"\\x"+r(t)}))}function a(t){return n[t.type](t)}return"Expected "+function(t){var e,n,r=t.map(a);if(r.sort(),r.length>0){for(e=1,n=1;e<r.length;e++)r[e-1]!==r[e]&&(r[n]=r[e],n++);r.length=n}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(t)+" but "+function(t){return t?'"'+o(t)+'"':"end of input"}(e)+" found."};const Pr=new Map,Ir=new Map;function Mr(t,e,n){const r={args:e,cb:n},o=Pr.get(t)||[];Pr.has(t)||Pr.set(t,o),o.push(r);const i=t+":"+e.map((t=>"object"==typeof t?t.type:t)).join("#");Ir.set(i,r)}function Tr(t,e){let n=t.args.length,r=t.args.length;const o=t.args[t.args.length-1];if("object"==typeof o&&o.isVararg&&(--n,r=1/0),e.length<n)return{type:"few",expected:n,found:e.length};if(e.length>r)return{type:"many",expected:r,found:e.length};for(let n=0;n<e.length;++n){let r=n>=t.args.length?t.args[t.args.length-1]:t.args[n];if("object"!=typeof r&&(r={type:r}),r.type!==e[n].type)return{type:"mismatch",expected:r.type,found:e[n].type}}return{type:"match"}}function zr(t,e){var n;switch(null===(n=e[t.type])||void 0===n||n.call(e,t),t.type){case"TemplateLiteral":t.expressions.forEach((t=>{zr(t,e)}));break;case"BinaryExpression":case"LogicalExpression":zr(t.left,e),zr(t.right,e);break;case"UnaryExpression":zr(t.argument,e);break;case"ConditionalExpression":zr(t.test,e),zr(t.consequent,e),zr(t.alternate,e);break;case"TryExpression":zr(t.test,e),zr(t.alternate,e);break;case"CallExpression":t.arguments.forEach((t=>{zr(t,e)}))}}function Nr(t){return"url"===t.type||"color"===t.type?{type:"string",value:t.value}:t}function Rr(t){return t.toISOString().replace("T"," ").replace(/\.\d{3}Z$/,"")}function Br(t){if("string"===t.type)return t.value;if("integer"===t.type)return String(t.value);if("number"===t.type){let e=String(t.value);return e.includes(".")||(e.includes("e")?e=e.replace("e",".0e"):e+=".0"),e=e.replace(/e\+?/i,"E"),e}if("boolean"===t.type)return t.value?"true":"false";if("datetime"===t.type)return Rr(t.value);if("color"===t.type)return Zr(Gr(t.value));if("url"===t.type)return t.value;if("dict"===t.type)return"<dict>";if("array"===t.type)return"<array>";throw new Error(`Unexpected type ${t.type}`)}function Ur(t){let e=Br(t);return"string"===t.type&&(e="'"+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")+"'"),e}function Lr(t){return"datetime"===t?"DateTime":t.charAt(0).toUpperCase()+t.substring(1)}function Wr(t,e){if(Cn)return Vn(e);if(e<0){const t=-Math.floor(-e);return 0===t?0:t}return Math.floor(e)}function Hr(t,e){if(e<Fn||e>An)throw new Error("Integer overflow.");!Cn&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)&&(t.safeIntegerOverflow=!0)}function qr(t){const e=[];return zr(t,{Variable(t){e.push(t.id.name)}}),e}function Jr(t,e){throw new Error(`Failed to evaluate [${t}]. ${e}`)}function Gr(t){const e=ft(t);if(e)return e;throw new Error("Unable to convert value to Color, expected format #AARRGGBB.")}function Zr(t){return`#${[t.a,t.r,t.g,t.b].map((t=>{if(t<0||t>255)throw new Error("Value out of range 0..1.");return vt(Math.round(t).toString(16),2)})).join("").toUpperCase()}`}function Yr(t){return Zr(Gr(t))}const Xr=Number.MAX_VALUE,Qr=Number.MIN_VALUE,Kr="string",to="integer",eo="number",no="boolean",ro="color",oo="url",io="datetime",ao="dict",so="array";function lo(t,e){return{type:Kr,value:Br(e)}}function co(t,e){const n=Number(e.value);if(isNaN(n)||!Number.isFinite(n))throw new Error("Unable to convert value to Number.");return{type:eo,value:n}}function uo(t,e,n,r){const o=t.variables.get(e.value);let i;return i=o&&o.getType()===r?o.getValue():n.value,"color"===r&&(i=Yr(i)),{type:r,value:i}}function po(t,e,n){return uo(t,e,n,n.type)}function vo(t,e,n){return uo(t,e,n,"color")}function go(t,e,n){return uo(t,e,n,"url")}const fo=t=>(e,n)=>{let r=new Date(n.value.getTime())[t]();return"getUTCMonth"===t?++r:"getUTCDay"===t&&0===r&&(r=7),{type:to,value:Vn(r)}},ho=fo("getUTCFullYear"),mo=fo("getUTCMonth"),yo=fo("getUTCDate"),bo=fo("getUTCDay"),_o=fo("getUTCHours"),wo=fo("getUTCMinutes"),$o=fo("getUTCSeconds"),xo=fo("getUTCMilliseconds");function ko(t,e,n,r){if(!r.value.length)return t.warnings.push(st(new Error("String for padding is empty."),{level:"warn"})),"";let o="";const i=e.type===Kr?e.value:Br(e);for(;o.length+i.length<n.value;)o+=r.value;return o.length>0&&o.length+i.length>n.value&&(o=o.substring(0,Number(n.value)-Number(i.length))),o}function Eo(t,e,n,r){const o=ko(t,e,n,r);return{type:Kr,value:o+Br(e)}}function Co(t,e,n,r){const o=ko(t,e,n,r);return{type:Kr,value:Br(e)+o}}function jo(t){return(e,n)=>{const r=Gr(n.value);return{type:eo,value:r[t]/255}}}function Ao(t){return(e,n,r)=>{const o=Gr(n.value);return o[t]=255*r.value,{type:ro,value:Zr(o)}}}const Fo=jo("a"),Vo=jo("r"),Do=jo("g"),So=jo("b"),Oo=Ao("a"),Po=Ao("r"),Io=Ao("g"),Mo=Ao("b");function To(t,e,n,r){if(e.value<0)throw new Error("Expecting non-negative number of milliseconds.");let o=Vn(e.value)/Vn(n);return Hr(t,o),"number"==typeof o&&(o=Math.floor(o)),r&&(o=Vn(o)%Vn(r)),{type:to,value:o}}const zo=36e5;function No(t,e){return(n,r,...o)=>{let i=function(t,e){let n=t;for(let t=0;t<e.length;++t){if(!n)throw new Error(`Missing property "${e[t]}" in the dict.`);const r=n[e[t]];if(void 0===r)throw new Error(`Missing property "${e[t]}" in the dict.`);n=r}return n}(r.value,o.map((t=>t.value))),a=typeof i;if("array"===t&&!Array.isArray(i)||"array"!==t&&a!==t||"object"===a&&null===i)throw"object"===a&&(a=Array.isArray(i)?"array":null===i?"null":"dict"),new Error(`Incorrect value type: expected "${e}", got "${a}".`);if("number"===t&&"integer"===e){if(i!==Math.round(i))throw new Error("Cannot convert value to integer.");Hr(n,i),i=Vn(i)}return"string"===t&&"color"===e&&(i=Yr(i)),{type:e,value:i}}}function Ro(t,e){return(n,r,o,...i)=>{try{return t(n,o,...i)}catch(t){let n=r.value;return"color"===e&&(n=Yr(n)),{type:e,value:n}}}}const Bo=No("string","string"),Uo=No("number","number"),Lo=No("number","integer"),Wo=No("boolean","boolean"),Ho=No("string","color"),qo=No("string","url"),Jo=No("array","array"),Go=No("object","dict"),Zo=Ro(Bo,"string"),Yo=Ro(Uo,"number"),Xo=Ro(Lo,"integer"),Qo=Ro(Wo,"boolean"),Ko=Ro(Ho,"color"),ti=Ro(qo,"url");function ei(t,e){return(n,r,o)=>{if(o.value<0||o.value>=r.value.length)throw new Error(`Requested index (${o.value}) out of bounds array size (${r.value.length}).`);let i=r.value[Number(o.value)],a=typeof i;if("array"===t&&!Array.isArray(i)||"array"!==t&&a!==t||"object"===a&&null===i)throw"object"===a&&(a=Array.isArray(i)?"array":null===i?"null":"dict"),new Error(`Incorrect value type: expected "${e}", got "${a}".`);if("number"===t&&"integer"===e){if(i!==Math.round(i))throw new Error("Cannot convert value to integer.");Hr(n,i),i=Vn(i)}return"string"===t&&"color"===e&&(i=Yr(i)),{type:e,value:i}}}function ni(t,e){return(n,r,o,i)=>{try{return t(n,r,o)}catch(t){let n=i.value;return"color"===e&&(n=Yr(n)),{type:e,value:n}}}}const ri=ei("string","string"),oi=ei("number","number"),ii=ei("number","integer"),ai=ei("boolean","boolean"),si=ei("string","color"),li=ei("string","url"),ci=ei("array","array"),ui=ei("object","dict"),di=ni(ri,"string"),pi=ni(oi,"number"),vi=ni(ii,"integer"),gi=ni(ai,"boolean"),fi=ni(si,"color"),hi=ni(li,"url");function mi(t){return t.map(Ur).join(", ")}Mr("toString",[to],lo),Mr("toString",[eo],lo),Mr("toString",[no],lo),Mr("toString",[ro],lo),Mr("toString",[oo],lo),Mr("toNumber",[to],co),Mr("toNumber",[Kr],co),Mr("toInteger",[eo],(function(t,e){if(e.value>An||e.value<Fn)throw new Error("Unable to convert value to Integer.");const n=e.value-e.value%1;return{type:to,value:Vn(n)}})),Mr("toInteger",[Kr],(function(t,e){let n;try{n=Vn(e.value)}catch(t){throw new Error("Unable to convert value to Integer.")}if("number"==typeof n&&(isNaN(n)||n%1!=0)||n>An||n<Fn)throw new Error("Unable to convert value to Integer.");return{type:to,value:n}})),Mr("toInteger",[no],(function(t,e){return{type:to,value:Vn(e.value?1:0)}})),Mr("toBoolean",[to],(function(t,e){const n=Number(e.value);if(1!==n&&0!==n)throw new Error("Unable to convert value to Boolean.");return{type:no,value:n}})),Mr("toBoolean",[Kr],(function(t,e){if("true"!==e.value&&"false"!==e.value)throw new Error("Unable to convert value to Boolean.");return{type:no,value:"true"===e.value?1:0}})),Mr("toColor",[Kr],(function(t,e){return{type:ro,value:Yr(e.value)}})),Mr("toUrl",[Kr],(function(t,e){return{type:oo,value:e.value}})),Mr("encodeUri",[Kr],(function(t,e){try{return{type:Kr,value:encodeURIComponent(e.value)}}catch(t){throw new Error("Unable to encodeUri string.")}})),Mr("decodeUri",[Kr],(function(t,e){try{return{type:Kr,value:decodeURIComponent(e.value)}}catch(t){throw new Error("Unable to decodeUri string.")}})),Mr("getIntegerValue",[Kr,to],po),Mr("getNumberValue",[Kr,eo],po),Mr("getBooleanValue",[Kr,no],po),Mr("getStringValue",[Kr,Kr],po),Mr("getColorValue",[Kr,ro],vo),Mr("getColorValue",[Kr,Kr],vo),Mr("getUrlValue",[Kr,oo],go),Mr("getUrlValue",[Kr,Kr],go),Mr("parseUnixTime",[to],(function(t,e){return{type:io,value:new Date(1e3*Number(e.value))}})),Mr("nowLocal",[],(function(){return{type:io,value:new Date}})),Mr("addMillis",[io,to],(function(t,e,n){return{type:io,value:new Date(e.value.getTime()+Number(n.value))}})),Mr("setYear",[io,to],(function(t,e,n){const r=new Date(e.value);return r.setUTCFullYear(Number(n.value)),{type:io,value:r}})),Mr("setMonth",[io,to],(function(t,e,n){const r=Number(n.value);if(r<1||r>12)throw new Error(`Expecting month in [1..12], instead got ${r}.`);const o=new Date(e.value);return o.setUTCMonth(r-1),{type:io,value:o}})),Mr("setDay",[io,to],(function(t,e,n){const r=new Date(e.value),o=Number(n.value);if(o<=0&&-1!==o||o>function(t){const e=new Date(t);return e.setUTCMonth(e.getUTCMonth()+1),e.setUTCDate(0),e.getUTCDate()}(r))throw new Error(`Unable to set day ${o} for date ${Br(e)}.`);return r.setUTCDate(-1===o?0:o),{type:io,value:r}})),Mr("setHours",[io,to],(function(t,e,n){const r=Number(n.value);if(r<0||r>23)throw new Error(`Expecting hours in [0..23], instead got ${r}.`);const o=new Date(e.value);return o.setUTCHours(r),{type:io,value:o}})),Mr("setMinutes",[io,to],(function(t,e,n){const r=Number(n.value);if(r<0||r>59)throw new Error(`Expecting minutes in [0..59], instead got ${r}.`);const o=new Date(e.value);return o.setUTCMinutes(r),{type:io,value:o}})),Mr("setSeconds",[io,to],(function(t,e,n){const r=Number(n.value);if(r<0||r>59)throw new Error(`Expecting seconds in [0..59], instead got ${r}.`);const o=new Date(e.value);return o.setUTCSeconds(r),{type:io,value:o}})),Mr("setMillis",[io,to],(function(t,e,n){const r=Number(n.value);if(r<0||r>999)throw new Error(`Expecting millis in [0..999], instead got ${r}.`);const o=new Date(e.value);return o.setUTCMilliseconds(r),{type:io,value:o}})),Mr("getYear",[io],ho),Mr("getMonth",[io],mo),Mr("getDay",[io],yo),Mr("getDayOfWeek",[io],bo),Mr("getHours",[io],_o),Mr("getMinutes",[io],wo),Mr("getSeconds",[io],$o),Mr("getMillis",[io],xo),Mr("getIntervalSeconds",[to],(function(t,e){return To(t,e,1e3,60)})),Mr("getIntervalTotalSeconds",[to],(function(t,e){return To(t,e,1e3)})),Mr("getIntervalMinutes",[to],(function(t,e){return To(t,e,6e4,60)})),Mr("getIntervalTotalMinutes",[to],(function(t,e){return To(t,e,6e4)})),Mr("getIntervalHours",[to],(function(t,e){return To(t,e,zo,24)})),Mr("getIntervalTotalHours",[to],(function(t,e){return To(t,e,zo)})),Mr("getIntervalTotalDays",[to],(function(t,e){return To(t,e,864e5)})),Mr("getIntervalTotalWeeks",[to],(function(t,e){return To(t,e,6048e5)})),Mr("len",[Kr],(function(t,e){return{type:to,value:Vn(e.value.length)}})),Mr("contains",[Kr,Kr],(function(t,e,n){return{type:no,value:e.value.includes(n.value)?1:0}})),Mr("substring",[Kr,to,to],(function(t,e,n,r){if(r.value<n.value)throw new Error("Indexes should be in ascending order.");if(n.value<0||n.value>e.value.length||r.value<0||r.value>e.value.length)throw new Error("Indexes are out of bounds.");return{type:Kr,value:e.value.substring(Number(n.value),Number(r.value))}})),Mr("replaceAll",[Kr,Kr,Kr],(function(t,e,n,r){let o;return o=n.value?e.value.replace(new RegExp(function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}(n.value),"g"),r.value):e.value,{type:Kr,value:o}})),Mr("index",[Kr,Kr],(function(t,e,n){return{type:to,value:Vn(e.value.indexOf(n.value))}})),Mr("lastIndex",[Kr,Kr],(function(t,e,n){return{type:to,value:Vn(e.value.lastIndexOf(n.value))}})),Mr("trim",[Kr],(function(t,e){return{type:Kr,value:e.value.trim()}})),Mr("trimLeft",[Kr],(function(t,e){return{type:Kr,value:e.value.replace(/^\s+/,"")}})),Mr("trimRight",[Kr],(function(t,e){return{type:Kr,value:e.value.replace(/\s+$/,"")}})),Mr("toUpperCase",[Kr],(function(t,e){return{type:Kr,value:e.value.toUpperCase()}})),Mr("toLowerCase",[Kr],(function(t,e){return{type:Kr,value:e.value.toLowerCase()}})),Mr("padStart",[Kr,to,Kr],Eo),Mr("padStart",[to,to,Kr],Eo),Mr("padEnd",[Kr,to,Kr],Co),Mr("padEnd",[to,to,Kr],Co),Mr("testRegex",[Kr,Kr],(function(t,e,n){let r;try{r=new RegExp(n.value)}catch(t){throw new Error("Invalid regular expression.")}return{type:no,value:r.test(e.value)?1:0}})),Mr("div",[to,to],(function(t,e,n){if(n.value===Dn)throw new Error("Division by zero is not supported.");let r=e.value/n.value;return r=Wr(0,r),Hr(t,r),{type:to,value:r}})),Mr("div",[eo,eo],(function(t,e,n){if(0===n.value)throw new Error("Division by zero is not supported.");const r=e.value/n.value;return{type:eo,value:r}})),Mr("mod",[to,to],(function(t,e,n){if(n.value===Dn)throw new Error("Division by zero is not supported.");let r=e.value%n.value;return r=Wr(0,r),Hr(t,r),{type:to,value:r}})),Mr("mod",[eo,eo],(function(t,e,n){if(0===n.value)throw new Error("Division by zero is not supported.");const r=e.value%n.value;return{type:eo,value:r}})),Mr("mul",[{type:to,isVararg:!0}],(function(t,...e){let n=e.length?e[0].value:Dn;for(let r=1;r<e.length;++r)n*=e[r].value,n=Wr(0,n),Hr(t,n);return{type:to,value:n}})),Mr("mul",[{type:eo,isVararg:!0}],(function(t,...e){let n=e.length?e[0].value:0;for(let t=1;t<e.length;++t)n*=e[t].value;return{type:eo,value:n}})),Mr("sub",[{type:to,isVararg:!0}],(function(t,...e){let n=e.length?e[0].value:Dn;for(let r=1;r<e.length;++r)n-=e[r].value,n=Wr(0,n),Hr(t,n);return{type:to,value:n}})),Mr("sub",[{type:eo,isVararg:!0}],(function(t,...e){let n=e.length?e[0].value:0;for(let t=1;t<e.length;++t)n-=e[t].value;return{type:eo,value:n}})),Mr("sum",[{type:to,isVararg:!0}],(function(t,...e){let n=Dn;for(let r=0;r<e.length;++r)n+=e[r].value,n=Wr(0,n),Hr(t,n);return{type:to,value:n}})),Mr("sum",[{type:eo,isVararg:!0}],(function(t,...e){let n=0;for(let t=0;t<e.length;++t)n+=e[t].value;return{type:eo,value:n}})),Mr("abs",[to],(function(t,e){const n=Sn(e.value);return Hr(t,n),{type:e.type,value:n}})),Mr("abs",[eo],(function(t,e){const n=Math.abs(e.value);return{type:eo,value:n}})),Mr("max",[{type:to,isVararg:!0}],(function(t,...e){if(!e.length)throw new Error("Non empty argument list is required for function 'max'.");let n=e[0].value;for(let t=1;t<e.length;++t)e[t].value>n&&(n=e[t].value);return{type:to,value:n}})),Mr("max",[{type:eo,isVararg:!0}],(function(t,...e){if(!e.length)throw new Error("Non empty argument list is required for function 'max'.");return{type:eo,value:Math.max(...e.map((t=>t.value)))}})),Mr("min",[{type:to,isVararg:!0}],(function(t,...e){if(!e.length)throw new Error("Non empty argument list is required for function 'min'.");let n=e[0].value;for(let t=1;t<e.length;++t)e[t].value<n&&(n=e[t].value);return{type:to,value:n}})),Mr("min",[{type:eo,isVararg:!0}],(function(t,...e){if(!e.length)throw new Error("Non empty argument list is required for function 'min'.");return{type:eo,value:Math.min(...e.map((t=>t.value)))}})),Mr("maxNumber",[],(function(){return{type:eo,value:Xr}})),Mr("minNumber",[],(function(){return{type:eo,value:Qr}})),Mr("maxInteger",[],(function(t){return Hr(t,An),{type:to,value:An}})),Mr("minInteger",[],(function(t){return Hr(t,Fn),{type:to,value:Fn}})),Mr("round",[eo],(function(t,e){const n=Math.sign(e.value);return{type:eo,value:n*Math.round(Math.abs(e.value))}})),Mr("floor",[eo],(function(t,e){return{type:eo,value:Math.floor(e.value)}})),Mr("ceil",[eo],(function(t,e){return{type:eo,value:Math.ceil(e.value)}})),Mr("signum",[to],(function(t,e){return{type:to,value:On(e.value)}})),Mr("signum",[eo],(function(t,e){return{type:eo,value:Math.sign(e.value)}})),Mr("copySign",[to,to],(function(t,e,n){let r;if(n.value===Dn)r=e.value;else if(e.value===Dn)r=Vn(0);else{const t=On(n.value);r=Sn(e.value)*t}return Hr(t,r),{type:to,value:r}})),Mr("copySign",[eo,eo],(function(t,e,n){let r=Math.sign(n.value);0===r&&(r=Object.is(r,0)?1:-1);const o=Math.abs(e.value)*r;return{type:eo,value:o}})),Mr("getColorAlpha",[Kr],Fo),Mr("getColorAlpha",[ro],Fo),Mr("getColorRed",[Kr],Vo),Mr("getColorRed",[ro],Vo),Mr("getColorGreen",[Kr],Do),Mr("getColorGreen",[ro],Do),Mr("getColorBlue",[Kr],So),Mr("getColorBlue",[ro],So),Mr("setColorAlpha",[Kr,eo],Oo),Mr("setColorAlpha",[ro,eo],Oo),Mr("setColorRed",[Kr,eo],Po),Mr("setColorRed",[ro,eo],Po),Mr("setColorGreen",[Kr,eo],Io),Mr("setColorGreen",[ro,eo],Io),Mr("setColorBlue",[Kr,eo],Mo),Mr("setColorBlue",[ro,eo],Mo),Mr("rgb",[eo,eo,eo],(function(t,e,n,r){const o={a:255,r:255*e.value,g:255*n.value,b:255*r.value};return{type:ro,value:Zr(o)}})),Mr("argb",[eo,eo,eo,eo],(function(t,e,n,r,o){const i={a:255*e.value,r:255*n.value,g:255*r.value,b:255*o.value};return{type:ro,value:Zr(i)}})),Mr("getDictString",[ao,{type:Kr,isVararg:!0}],Bo),Mr("getStringFromDict",[ao,{type:Kr,isVararg:!0}],Bo),Mr("getDictNumber",[ao,{type:Kr,isVararg:!0}],Uo),Mr("getNumberFromDict",[ao,{type:Kr,isVararg:!0}],Uo),Mr("getDictInteger",[ao,{type:Kr,isVararg:!0}],Lo),Mr("getIntegerFromDict",[ao,{type:Kr,isVararg:!0}],Lo),Mr("getDictBoolean",[ao,{type:Kr,isVararg:!0}],Wo),Mr("getBooleanFromDict",[ao,{type:Kr,isVararg:!0}],Wo),Mr("getDictColor",[ao,{type:Kr,isVararg:!0}],Ho),Mr("getColorFromDict",[ao,{type:Kr,isVararg:!0}],Ho),Mr("getDictUrl",[ao,{type:Kr,isVararg:!0}],qo),Mr("getUrlFromDict",[ao,{type:Kr,isVararg:!0}],qo),Mr("getDictOptString",[Kr,ao,{type:Kr,isVararg:!0}],Zo),Mr("getOptStringFromDict",[Kr,ao,{type:Kr,isVararg:!0}],Zo),Mr("getDictOptNumber",[eo,ao,{type:Kr,isVararg:!0}],Yo),Mr("getOptNumberFromDict",[eo,ao,{type:Kr,isVararg:!0}],Yo),Mr("getDictOptInteger",[to,ao,{type:Kr,isVararg:!0}],Xo),Mr("getOptIntegerFromDict",[to,ao,{type:Kr,isVararg:!0}],Xo),Mr("getDictOptBoolean",[no,ao,{type:Kr,isVararg:!0}],Qo),Mr("getOptBooleanFromDict",[no,ao,{type:Kr,isVararg:!0}],Qo),Mr("getDictOptColor",[ro,ao,{type:Kr,isVararg:!0}],Ko),Mr("getOptColorFromDict",[ro,ao,{type:Kr,isVararg:!0}],Ko),Mr("getDictOptColor",[Kr,ao,{type:Kr,isVararg:!0}],Ko),Mr("getOptColorFromDict",[Kr,ao,{type:Kr,isVararg:!0}],Ko),Mr("getDictOptUrl",[Kr,ao,{type:Kr,isVararg:!0}],ti),Mr("getOptUrlFromDict",[Kr,ao,{type:Kr,isVararg:!0}],ti),Mr("getDictOptUrl",[oo,ao,{type:Kr,isVararg:!0}],ti),Mr("getOptUrlFromDict",[oo,ao,{type:Kr,isVararg:!0}],ti),Mr("getDictFromDict",[ao,{type:Kr,isVararg:!0}],Go),Mr("getArrayFromDict",[ao,{type:Kr,isVararg:!0}],Jo),Mr("getArrayString",[so,to],ri),Mr("getStringFromArray",[so,to],ri),Mr("getArrayNumber",[so,to],oi),Mr("getNumberFromArray",[so,to],oi),Mr("getArrayInteger",[so,to],ii),Mr("getIntegerFromArray",[so,to],ii),Mr("getArrayBoolean",[so,to],ai),Mr("getBooleanFromArray",[so,to],ai),Mr("getArrayColor",[so,to],si),Mr("getColorFromArray",[so,to],si),Mr("getArrayUrl",[so,to],li),Mr("getUrlFromArray",[so,to],li),Mr("getArrayFromArray",[so,to],ci),Mr("getDictFromArray",[so,to],ui),Mr("getArrayOptString",[so,to,Kr],di),Mr("getOptStringFromArray",[so,to,Kr],di),Mr("getArrayOptNumber",[so,to,eo],pi),Mr("getOptNumberFromArray",[so,to,eo],pi),Mr("getArrayOptInteger",[so,to,to],vi),Mr("getOptIntegerFromArray",[so,to,to],vi),Mr("getArrayOptBoolean",[so,to,no],gi),Mr("getOptBooleanFromArray",[so,to,no],gi),Mr("getArrayOptColor",[so,to,ro],fi),Mr("getOptColorFromArray",[so,to,ro],fi),Mr("getArrayOptColor",[so,to,Kr],fi),Mr("getOptColorFromArray",[so,to,Kr],fi),Mr("getArrayOptUrl",[so,to,oo],hi),Mr("getOptUrlFromArray",[so,to,oo],hi),Mr("getArrayOptUrl",[so,to,Kr],hi),Mr("getOptUrlFromArray",[so,to,Kr],hi),Mr("getOptArrayFromArray",[so,to],(function(t,e,n){try{return ci(t,e,n)}catch(t){return{type:so,value:[]}}})),Mr("getOptDictFromArray",[so,to],(function(t,e,n){try{return ui(t,e,n)}catch(t){return{type:ao,value:{}}}})),Mr("len",[so],(function(t,e){return{type:to,value:Vn(e.value.length)}}));const yi={StringLiteral:function(t,e){return{type:Kr,value:e.value}},NumberLiteral:function(t,e){return{type:eo,value:e.value}},IntegerLiteral:function(t,e){return Hr(t,e.value),{type:to,value:e.value}},BooleanLiteral:function(t,e){return{type:no,value:e.value?1:0}},UnaryExpression:function(t,e){const n=Nr(bi(t,e.argument));switch(e.operator){case"!":if(n.type===no)return{type:no,value:n.value?0:1};Jr(`${e.operator}${Ur(n)}`,"A Boolean is expected after a unary not.");case"+":case"-":const r="+"===e.operator?1:-1;if(n.type===to){const e=n.value*Vn(r);return Hr(t,e),{type:to,value:e}}if(n.type===eo)return{type:eo,value:n.value*r};Jr(`${e.operator}${Ur(n)}`,`A Number is expected after a unary ${"+"===e.operator?"plus":"minus"}.`)}},ConditionalExpression:function(t,e){const n=Nr(bi(t,e.test));if(n.type===no)return n.value?bi(t,e.consequent):bi(t,e.alternate);Jr(`${Ur(n)} ? ${Ur(bi(t,e.consequent))} : ${Ur(bi(t,e.alternate))}`,"Ternary must be called with a Boolean value as a condition.")},TryExpression:function(t,e){try{return bi(t,e.test)}catch(n){return bi(t,e.alternate)}},TemplateLiteral:function(t,e){let n="";if(2===e.quasis.length&&""===e.quasis[0].value&&""===e.quasis[1].value)return bi(t,e.expressions[0]);for(let r=0;r<e.expressions.length;++r)n+=e.quasis[r].value,n+=Br(bi(t,e.expressions[r]));return n+=e.quasis[e.quasis.length-1].value,{type:Kr,value:n}},LogicalExpression:function(t,e){const n=Nr(bi(t,e.left));if(n.type!==no&&Jr(`${Ur(n)} ${e.operator} ...`,`'${e.operator}' must be called with boolean operands.`),"||"===e.operator&&n.value)return n;if("&&"===e.operator&&!n.value)return{type:no,value:0};const r=Nr(bi(t,e.right));return r.type!==no&&Jr(`${Ur(n)} ${e.operator} ${Ur(r)}`,`Operator '${e.operator}' cannot be applied to different types: Boolean and ${Lr(r.type)}.`),{type:no,value:r.value}},BinaryExpression:function(t,e){const n=e.operator,r=bi(t,e.left),o=bi(t,e.right);if(r.type!==o.type&&Jr(`${Ur(r)} ${e.operator} ${Ur(o)}`,`Operator '${n}' cannot be applied to different types: ${Lr(r.type)} and ${Lr(o.type)}.`),"=="===n||"!="===n)return function(t,e,n){let r;return r=e.type===io&&n.type===io?e.value.getTime()===n.value.getTime():e.value===n.value,"!="===t&&(r=!r),{type:no,value:r?1:0}}(n,r,o);if(">"===n||">="===n||"<"===n||"<="===n)return function(t,e,n){let r;e.type!==eo&&e.type!==to&&e.type!==io&&Jr(`${Ur(e)} ${t} ${Ur(n)}`,`Operator '${t}' cannot be applied to ${Lr(e.type)} type.`);const o=e.type===io?e.value.getTime():e.value,i=n.type===io?n.value.getTime():n.value;return r=">"===t?o>i:">="===t?o>=i:"<"===t?o<i:o<=i,{type:no,value:r?1:0}}(n,r,o);if("+"===n||"-"===n)return function(t,e,n,r){if(n.type!==Kr&&n.type!==eo&&n.type!==to&&Jr(`${Ur(n)} ${e} ${Ur(r)}`,`Operator '${e}' cannot be applied to ${Lr(n.type)} type.`),n.type===Kr)return"-"===e&&Jr(`${Ur(n)} - ${Ur(r)}`,`Operator '${e}' cannot be applied to ${Lr(n.type)} type.`),{type:Kr,value:n.value+r.value};let o="+"===e?n.value+r.value:n.value-r.value;if(n.type===to)try{o=Wr(0,o),Hr(t,o)}catch(t){Jr(`${Ur(n)} ${e} ${Ur(r)}`,t.message)}return{type:n.type,value:o}}(t,n,r,o);if("/"===n||"*"===n||"%"===n)return function(t,e,n,r){let o;if(n.type!==to&&n.type!==eo&&Jr(`${Ur(n)} ${e} ${Ur(r)}`,`Operator '${e}' cannot be applied to ${Lr(n.type)} type.`),"*"===e)o=n.value*r.value;else{if("/"!==e&&"%"!==e)throw new Error(`Unsupported operation ${e}`);0===Number(r.value)&&Jr(`${Ur(n)} ${e} ${Ur(r)}`,"Division by zero is not supported."),o="/"===e?n.value/r.value:n.value%r.value}if(n.type===to)try{o=Wr(0,o),Hr(t,o)}catch(t){Jr(`${Ur(n)} ${e} ${Ur(r)}`,t.message)}return{type:n.type,value:o}}(t,n,r,o);throw new Error(`Unsupported operation ${n}`)},CallExpression:function(t,e){const n=e.callee.name;let r;const o=e.arguments.map((e=>bi(t,e))),i=n+":"+o.map((t=>t.type)).join("#");if(Ir.has(i))r=Ir.get(i);else{const t=function(t,e){const n=Pr.get(t);if(!n)return{type:"missing"};let r=null;for(let t=0;t<n.length;++t){const o=Tr(n[t],e);if("match"===o.type)return n[t];r||(r=o)}if(!r)throw new Error("Missing function");return r}(n,o);if("expected"in t||"type"in t&&"missing"===t.type){const e=o.map((t=>Lr(t.type))).join(", "),r=`${n}(${mi(o)})`;"few"===t.type&&0===o.length?Jr(r,`Non empty argument list is required for function '${n}'.`):"many"===t.type||"few"===t.type||"mismatch"===t.type?Jr(r,`Function '${n}' has no matching override for given argument types: ${e}.`):Jr(r,`Unknown function name: ${n}.`)}r=t}if(!r)throw new Error("Function not found");try{return r.cb(t,...o)}catch(t){Jr(`${n}(${mi(o)})`,t.message)}},Variable:function(t,e){const n=e.id.name,r=t.variables.get(n);if(r)return function(t){return{type:t.getType(),value:t.getValue()}}(r);throw new Error(`Variable '${n}' is missing.`)}};function bi(t,e){if(e.type in yi)return yi[e.type](t,e);throw new Error("Unsupported expression")}class _i{constructor(t){this.ast=t}apply(t,e,n=!1){try{const r=function(t,e){try{const n={variables:t,warnings:[],safeIntegerOverflow:!1},r=bi(n,e);return n.safeIntegerOverflow&&n.warnings.push(st(new Error("Safe integer overflow, values may lose accuracy."),{level:"warn"})),{result:r,warnings:n.warnings}}catch(t){return{result:{type:"error",value:t.message},warnings:[]}}}(t,this.ast);r.warnings.forEach(e);const o=r.result;if("error"===o.type)return void e(st(new Error("Expression execution error"),{additional:{message:o.value}}));const i=o.value;if(i instanceof Date)return Rr(i);if("boolean"===o.type)return Boolean(i);if("color"===o.type){const t=ft(String(i));if(t)return Zr(t);e(st(new Error("Expression execution error")))}if("integer"===o.type)return i>2147483647||i<-2147483648?void e(st(new Error("Expression result is out of 32-bit int range"))):Number(i);if(!n&&("array"===o.type||"dict"===o.type))try{return JSON.stringify(i)}catch(t){return e(st(new Error(`Failed to stringify ${o.type}`))),`<${o.type}>`}return i}catch(t){return void e(st(new Error("Expression execution error")))}}}function wi(t,e,n){if(t)if("string"==typeof t){if((r=t).indexOf("@{")>-1||r.indexOf("\\")>-1){e.hasExpression=!0;try{const n=function(t,e){var n,r={},o=(e=void 0!==e?e:{}).grammarSource,i={start:Ve,JsonStringContents:function(){var t,e,n;for(t=me,e=[],n=De();n!==r;)e.push(n),n=De();return ye=t,Ot(e)}},a=Ve,s="@{",l="}",c="@{}",u="\\",d="?",p=":",v="!:",g="||",f="&&",h="==",m="!=",y=">=",b=">",_="<=",w="<",$="+",x="-",k="/",E="*",C="%",j="!",A="(",F=")",V=",",D="'",S=".",O="e",P="E",I="true",M="false",T=/^[^}]/,z=/^[^'}]/,N=/^[0-9]/,R=/^[a-zA-Z_0-9.]/,B=/^[a-zA-Z_]/,U=/^[ \t\r\n]/,L=ke("@{",!1),W=ke("}",!1),H=ke("@{}",!1),q=ke("\\",!1),J={type:"any"},G=Ee(["}"],!0,!1),Z=ke("?",!1),Y=ke(":",!1),X=ke("!:",!1),Q=ke("||",!1),K=ke("&&",!1),tt=ke("==",!1),et=ke("!=",!1),nt=ke(">=",!1),rt=ke(">",!1),ot=ke("<=",!1),it=ke("<",!1),at=ke("+",!1),st=ke("-",!1),lt=ke("/",!1),ct=ke("*",!1),ut=ke("%",!1),dt=ke("!",!1),pt=ke("(",!1),vt=ke(")",!1),gt=ke(",",!1),ft=Ce("string"),ht=ke("'",!1),mt=Ee(["'","}"],!0,!1),yt=Ce("integer"),bt=Ee([["0","9"]],!1,!1),_t=Ce("number"),wt=ke(".",!1),$t=ke("e",!1),xt=ke("E",!1),kt=Ce("boolean"),Et=ke("true",!1),Ct=ke("false",!1),jt=Ee([["a","z"],["A","Z"],"_",["0","9"],"."],!1,!1),At=Ce("identifier"),Ft=Ee([["a","z"],["A","Z"],"_"],!1,!1),Vt=Ce("whitespace"),Dt=Ee([" ","\t","\r","\n"],!1,!1),St=function(t){return t},Ot=function(t){return Fr(t)},Pt=function(t){return t},It=function(){return""},Mt=function(){return xe()},Tt=function(){throw new Error("Error tokenizing '"+t+"'.")},zt=function(){throw new Error("Error tokenizing '"+t+"'.")},Nt=function(t){return t},Rt=function(t){return Dr(t)},Bt=function(){throw new Error("Error tokenizing '"+t+"'.")},Ut=function(t,e,n){return{type:"ConditionalExpression",test:t,consequent:e,alternate:n}},Lt=function(t,e){return{type:"TryExpression",test:t,alternate:e}},Wt=function(t,e){return Ar(t,e)},Ht=function(t,e){return Ar(t,e)},qt=function(t,e){return jr(t,e)},Jt=function(t,e){return jr(t,e)},Gt=function(t,e){return jr(t,e)},Zt=function(t,e){return jr(t,e)},Yt=function(t,e){return{type:"UnaryExpression",operator:t,argument:e}},Xt=function(t,e){return{type:"CallExpression",callee:t,arguments:e}},Qt=function(t){return{type:"Variable",id:t}},Kt=function(t,e){return[t,...e]},te=function(t){return t},ee=function(t){return t},ne=function(t){return Fr(t)},re=function(t){return t},oe=function(){return""},ie=function(){return xe()},ae=function(){throw new Error("Error tokenizing '"+t+"'.")},se=function(){throw new Error("Error tokenizing '"+t+"'.")},le=function(t){return t},ce=function(t){return Dr(t)},ue=function(){throw new Error("Error tokenizing '"+t+"'.")},de=function(){return{type:"IntegerLiteral",value:Vr(xe())}},pe=function(){return{type:"NumberLiteral",value:parseFloat(xe())}},ve=function(){return{type:"NumberLiteral",value:parseFloat(xe())}},ge=function(){return{type:"BooleanLiteral",value:!0}},fe=function(){return{type:"BooleanLiteral",value:!1}},he=function(){return{type:"Identifier",name:xe()}},me=0,ye=0,be=[{line:1,column:1}],_e=0,we=[],$e=0;if("startRule"in e){if(!(e.startRule in i))throw new Error("Can't start parsing from rule \""+e.startRule+'".');a=i[e.startRule]}function xe(){return t.substring(ye,me)}function ke(t,e){return{type:"literal",text:t,ignoreCase:e}}function Ee(t,e,n){return{type:"class",parts:t,inverted:e,ignoreCase:n}}function Ce(t){return{type:"other",description:t}}function je(e){var n,r=be[e];if(r)return r;for(n=e-1;!be[n];)n--;for(r={line:(r=be[n]).line,column:r.column};n<e;)10===t.charCodeAt(n)?(r.line++,r.column=1):r.column++,n++;return be[e]=r,r}function Ae(t,e,n){var r=je(t),i=je(e),a={source:o,start:{offset:t,line:r.line,column:r.column},end:{offset:e,line:i.line,column:i.column}};return n&&o&&"function"==typeof o.offset&&(a.start=o.offset(a.start),a.end=o.offset(a.end)),a}function Fe(t){me<_e||(me>_e&&(_e=me,we=[]),we.push(t))}function Ve(){var t,e;return t=me,He(),(e=Se())!==r?(He(),ye=t,t=St(e)):(me=t,t=r),t}function De(){var e,n,o,i,a;if(e=me,t.substr(me,2)===s?(n=s,me+=2):(n=r,0===$e&&Fe(L)),n!==r?(o=He(),(i=Se())!==r?(He(),125===t.charCodeAt(me)?(a=l,me++):(a=r,0===$e&&Fe(W)),a!==r?(ye=e,e=Pt(i)):(me=e,e=r)):(me=e,e=r)):(me=e,e=r),e===r&&(e=me,t.substr(me,3)===c?(n=c,me+=3):(n=r,0===$e&&Fe(H)),n!==r&&(ye=e,n=It()),(e=n)===r&&(e=me,n=me,$e++,92===t.charCodeAt(me)?(o=u,me++):(o=r,0===$e&&Fe(q)),o===r&&(t.substr(me,2)===s?(o=s,me+=2):(o=r,0===$e&&Fe(L))),$e--,o===r?n=void 0:(me=n,n=r),n!==r?(t.length>me?(o=t.charAt(me),me++):(o=r,0===$e&&Fe(J)),o!==r?(ye=e,e=Mt()):(me=e,e=r)):(me=e,e=r),e===r))){if(e=me,t.substr(me,2)===s?(n=s,me+=2):(n=r,0===$e&&Fe(L)),n!==r){if(o=[],T.test(t.charAt(me))?(i=t.charAt(me),me++):(i=r,0===$e&&Fe(G)),i!==r)for(;i!==r;)o.push(i),T.test(t.charAt(me))?(i=t.charAt(me),me++):(i=r,0===$e&&Fe(G));else o=r;o!==r?(125===t.charCodeAt(me)?(i=l,me++):(i=r,0===$e&&Fe(W)),i!==r?(ye=e,e=Tt()):(me=e,e=r)):(me=e,e=r)}else me=e,e=r;e===r&&(e=me,t.substr(me,2)===s?(n=s,me+=2):(n=r,0===$e&&Fe(L)),n!==r&&(ye=e,n=zt()),(e=n)===r&&(e=me,92===t.charCodeAt(me)?(n=u,me++):(n=r,0===$e&&Fe(q)),n!==r?(t.substr(me,2)===s?(o=s,me+=2):(o=r,0===$e&&Fe(L)),o!==r?(ye=e,e=Nt(o)):(me=e,e=r)):(me=e,e=r),e===r&&(e=me,92===t.charCodeAt(me)?(n=u,me++):(n=r,0===$e&&Fe(q)),n!==r?(t.length>me?(o=t.charAt(me),me++):(o=r,0===$e&&Fe(J)),o!==r?(ye=e,e=Rt(o)):(me=e,e=r)):(me=e,e=r),e===r&&(e=me,92===t.charCodeAt(me)?(n=u,me++):(n=r,0===$e&&Fe(q)),n!==r&&(ye=e,n=Bt()),e=n))))}return e}function Se(){var e,n,o,i,a,s;return e=me,(n=Oe())!==r?(He(),63===t.charCodeAt(me)?(o=d,me++):(o=r,0===$e&&Fe(Z)),o!==r?(He(),(i=Se())!==r?(He(),58===t.charCodeAt(me)?(a=p,me++):(a=r,0===$e&&Fe(Y)),a!==r?(He(),(s=Se())!==r?(ye=e,e=Ut(n,i,s)):(me=e,e=r)):(me=e,e=r)):(me=e,e=r)):(me=e,e=r)):(me=e,e=r),e===r&&(e=Oe()),e}function Oe(){var e,n,o,i;return e=me,(n=Pe())!==r?(He(),t.substr(me,2)===v?(o=v,me+=2):(o=r,0===$e&&Fe(X)),o!==r?(He(),(i=Se())!==r?(ye=e,e=Lt(n,i)):(me=e,e=r)):(me=e,e=r)):(me=e,e=r),e===r&&(e=Pe()),e}function Pe(){var e,n,o,i,a,s,l,c;if(e=me,(n=Ie())!==r){for(o=[],i=me,a=He(),t.substr(me,2)===g?(s=g,me+=2):(s=r,0===$e&&Fe(Q)),s!==r?(l=He(),(c=Ie())!==r?i=a=[a,s,l,c]:(me=i,i=r)):(me=i,i=r);i!==r;)o.push(i),i=me,a=He(),t.substr(me,2)===g?(s=g,me+=2):(s=r,0===$e&&Fe(Q)),s!==r?(l=He(),(c=Ie())!==r?i=a=[a,s,l,c]:(me=i,i=r)):(me=i,i=r);ye=e,e=Wt(n,o)}else me=e,e=r;return e}function Ie(){var e,n,o,i,a,s,l,c;if(e=me,(n=Me())!==r){for(o=[],i=me,a=He(),t.substr(me,2)===f?(s=f,me+=2):(s=r,0===$e&&Fe(K)),s!==r?(l=He(),(c=Me())!==r?i=a=[a,s,l,c]:(me=i,i=r)):(me=i,i=r);i!==r;)o.push(i),i=me,a=He(),t.substr(me,2)===f?(s=f,me+=2):(s=r,0===$e&&Fe(K)),s!==r?(l=He(),(c=Me())!==r?i=a=[a,s,l,c]:(me=i,i=r)):(me=i,i=r);ye=e,e=Ht(n,o)}else me=e,e=r;return e}function Me(){var e,n,o,i,a,s,l,c;if(e=me,(n=Te())!==r){for(o=[],i=me,a=He(),t.substr(me,2)===h?(s=h,me+=2):(s=r,0===$e&&Fe(tt)),s===r&&(t.substr(me,2)===m?(s=m,me+=2):(s=r,0===$e&&Fe(et))),s!==r?(l=He(),(c=Te())!==r?i=a=[a,s,l,c]:(me=i,i=r)):(me=i,i=r);i!==r;)o.push(i),i=me,a=He(),t.substr(me,2)===h?(s=h,me+=2):(s=r,0===$e&&Fe(tt)),s===r&&(t.substr(me,2)===m?(s=m,me+=2):(s=r,0===$e&&Fe(et))),s!==r?(l=He(),(c=Te())!==r?i=a=[a,s,l,c]:(me=i,i=r)):(me=i,i=r);ye=e,e=qt(n,o)}else me=e,e=r;return e}function Te(){var e,n,o,i,a,s,l,c;if(e=me,(n=ze())!==r){for(o=[],i=me,a=He(),t.substr(me,2)===y?(s=y,me+=2):(s=r,0===$e&&Fe(nt)),s===r&&(62===t.charCodeAt(me)?(s=b,me++):(s=r,0===$e&&Fe(rt)),s===r&&(t.substr(me,2)===_?(s=_,me+=2):(s=r,0===$e&&Fe(ot)),s===r&&(60===t.charCodeAt(me)?(s=w,me++):(s=r,0===$e&&Fe(it))))),s!==r?(l=He(),(c=ze())!==r?i=a=[a,s,l,c]:(me=i,i=r)):(me=i,i=r);i!==r;)o.push(i),i=me,a=He(),t.substr(me,2)===y?(s=y,me+=2):(s=r,0===$e&&Fe(nt)),s===r&&(62===t.charCodeAt(me)?(s=b,me++):(s=r,0===$e&&Fe(rt)),s===r&&(t.substr(me,2)===_?(s=_,me+=2):(s=r,0===$e&&Fe(ot)),s===r&&(60===t.charCodeAt(me)?(s=w,me++):(s=r,0===$e&&Fe(it))))),s!==r?(l=He(),(c=ze())!==r?i=a=[a,s,l,c]:(me=i,i=r)):(me=i,i=r);ye=e,e=Jt(n,o)}else me=e,e=r;return e}function ze(){var e,n,o,i,a,s,l,c;if(e=me,(n=Ne())!==r){for(o=[],i=me,a=He(),43===t.charCodeAt(me)?(s=$,me++):(s=r,0===$e&&Fe(at)),s===r&&(45===t.charCodeAt(me)?(s=x,me++):(s=r,0===$e&&Fe(st))),s!==r?(l=He(),(c=Ne())!==r?i=a=[a,s,l,c]:(me=i,i=r)):(me=i,i=r);i!==r;)o.push(i),i=me,a=He(),43===t.charCodeAt(me)?(s=$,me++):(s=r,0===$e&&Fe(at)),s===r&&(45===t.charCodeAt(me)?(s=x,me++):(s=r,0===$e&&Fe(st))),s!==r?(l=He(),(c=Ne())!==r?i=a=[a,s,l,c]:(me=i,i=r)):(me=i,i=r);ye=e,e=Gt(n,o)}else me=e,e=r;return e}function Ne(){var e,n,o,i,a,s,l,c;if(e=me,(n=Re())!==r){for(o=[],i=me,a=He(),47===t.charCodeAt(me)?(s=k,me++):(s=r,0===$e&&Fe(lt)),s===r&&(42===t.charCodeAt(me)?(s=E,me++):(s=r,0===$e&&Fe(ct)),s===r&&(37===t.charCodeAt(me)?(s=C,me++):(s=r,0===$e&&Fe(ut)))),s!==r?(l=He(),(c=Re())!==r?i=a=[a,s,l,c]:(me=i,i=r)):(me=i,i=r);i!==r;)o.push(i),i=me,a=He(),47===t.charCodeAt(me)?(s=k,me++):(s=r,0===$e&&Fe(lt)),s===r&&(42===t.charCodeAt(me)?(s=E,me++):(s=r,0===$e&&Fe(ct)),s===r&&(37===t.charCodeAt(me)?(s=C,me++):(s=r,0===$e&&Fe(ut)))),s!==r?(l=He(),(c=Re())!==r?i=a=[a,s,l,c]:(me=i,i=r)):(me=i,i=r);ye=e,e=Zt(n,o)}else me=e,e=r;return e}function Re(){var e,n,o;return(e=Le())===r&&(e=Ue())===r&&(e=me,33===t.charCodeAt(me)?(n=j,me++):(n=r,0===$e&&Fe(dt)),n===r&&(43===t.charCodeAt(me)?(n=$,me++):(n=r,0===$e&&Fe(at)),n===r&&(45===t.charCodeAt(me)?(n=x,me++):(n=r,0===$e&&Fe(st)))),n!==r?(He(),(o=Re())!==r?(ye=e,e=Yt(n,o)):(me=e,e=r)):(me=e,e=r),e===r&&(e=function(){var e,n,o,i,a;return e=me,(n=We())!==r?(He(),40===t.charCodeAt(me)?(o=A,me++):(o=r,0===$e&&Fe(pt)),o!==r?(He(),i=function(){var e,n,o,i,a,s;if(e=me,(n=Se())!==r){for(o=[],i=me,He(),44===t.charCodeAt(me)?(a=V,me++):(a=r,0===$e&&Fe(gt)),a!==r?(He(),(s=Se())!==r?i=s:(me=i,i=r)):(me=i,i=r);i!==r;)o.push(i),i=me,He(),44===t.charCodeAt(me)?(a=V,me++):(a=r,0===$e&&Fe(gt)),a!==r?(He(),(s=Se())!==r?i=s:(me=i,i=r)):(me=i,i=r);ye=e,e=Kt(n,o)}else me=e,e=r;return e===r&&(e=He()),e}(),i!==r?(He(),41===t.charCodeAt(me)?(a=F,me++):(a=r,0===$e&&Fe(vt)),a!==r?(ye=e,e=Xt(n,i)):(me=e,e=r)):(me=e,e=r)):(me=e,e=r)):(me=e,e=r),e===r&&(e=me,(n=We())!==r&&(ye=e,n=Qt(n)),(e=n)===r&&(e=function(){var e,n,o,i;return e=function(){var e,n,o,i;return $e++,e=me,39===t.charCodeAt(me)?(n=D,me++):(n=r,0===$e&&Fe(ht)),n!==r?(o=function(){var t,e,n;for(t=me,e=[],n=Be();n!==r;)e.push(n),n=Be();return ye=t,ne(e)}(),39===t.charCodeAt(me)?(i=D,me++):(i=r,0===$e&&Fe(ht)),i!==r?(ye=e,e=ee(o)):(me=e,e=r)):(me=e,e=r),$e--,e===r&&(n=r,0===$e&&Fe(ft)),e}(),e===r&&(e=Le())===r&&(e=Ue())===r&&(e=function(){var e,n;return $e++,e=me,t.substr(me,4)===I?(n=I,me+=4):(n=r,0===$e&&Fe(Et)),n!==r&&(ye=e,n=ge()),(e=n)===r&&(e=me,t.substr(me,5)===M?(n=M,me+=5):(n=r,0===$e&&Fe(Ct)),n!==r&&(ye=e,n=fe()),e=n),$e--,e===r&&(n=r,0===$e&&Fe(kt)),e}(),e===r&&(e=me,40===t.charCodeAt(me)?(n=A,me++):(n=r,0===$e&&Fe(pt)),n!==r?(He(),(o=Se())!==r?(He(),41===t.charCodeAt(me)?(i=F,me++):(i=r,0===$e&&Fe(vt)),i!==r?(ye=e,e=te(o)):(me=e,e=r)):(me=e,e=r)):(me=e,e=r))),e}())),e}())),e}function Be(){var e,n,o,i,a;if(e=me,t.substr(me,2)===s?(n=s,me+=2):(n=r,0===$e&&Fe(L)),n!==r?(o=He(),(i=Se())!==r?(He(),125===t.charCodeAt(me)?(a=l,me++):(a=r,0===$e&&Fe(W)),a!==r?(ye=e,e=re(i)):(me=e,e=r)):(me=e,e=r)):(me=e,e=r),e===r&&(e=me,t.substr(me,3)===c?(n=c,me+=3):(n=r,0===$e&&Fe(H)),n!==r&&(ye=e,n=oe()),(e=n)===r&&(e=me,n=me,$e++,92===t.charCodeAt(me)?(o=u,me++):(o=r,0===$e&&Fe(q)),o===r&&(39===t.charCodeAt(me)?(o=D,me++):(o=r,0===$e&&Fe(ht)),o===r&&(t.substr(me,2)===s?(o=s,me+=2):(o=r,0===$e&&Fe(L)))),$e--,o===r?n=void 0:(me=n,n=r),n!==r?(t.length>me?(o=t.charAt(me),me++):(o=r,0===$e&&Fe(J)),o!==r?(ye=e,e=ie()):(me=e,e=r)):(me=e,e=r),e===r))){if(e=me,t.substr(me,2)===s?(n=s,me+=2):(n=r,0===$e&&Fe(L)),n!==r){if(o=[],z.test(t.charAt(me))?(i=t.charAt(me),me++):(i=r,0===$e&&Fe(mt)),i!==r)for(;i!==r;)o.push(i),z.test(t.charAt(me))?(i=t.charAt(me),me++):(i=r,0===$e&&Fe(mt));else o=r;o!==r?(125===t.charCodeAt(me)?(i=l,me++):(i=r,0===$e&&Fe(W)),i!==r?(ye=e,e=ae()):(me=e,e=r)):(me=e,e=r)}else me=e,e=r;e===r&&(e=me,t.substr(me,2)===s?(n=s,me+=2):(n=r,0===$e&&Fe(L)),n!==r&&(ye=e,n=se()),(e=n)===r&&(e=me,92===t.charCodeAt(me)?(n=u,me++):(n=r,0===$e&&Fe(q)),n!==r?(t.substr(me,2)===s?(o=s,me+=2):(o=r,0===$e&&Fe(L)),o!==r?(ye=e,e=le(o)):(me=e,e=r)):(me=e,e=r),e===r&&(e=me,92===t.charCodeAt(me)?(n=u,me++):(n=r,0===$e&&Fe(q)),n!==r?(t.length>me?(o=t.charAt(me),me++):(o=r,0===$e&&Fe(J)),o!==r?(ye=e,e=ce(o)):(me=e,e=r)):(me=e,e=r),e===r&&(e=me,92===t.charCodeAt(me)?(n=u,me++):(n=r,0===$e&&Fe(q)),n!==r&&(ye=e,n=ue()),e=n))))}return e}function Ue(){var e,n,o,i;if($e++,e=me,45===t.charCodeAt(me)?(n=x,me++):(n=r,0===$e&&Fe(st)),n===r&&(n=null),o=[],N.test(t.charAt(me))?(i=t.charAt(me),me++):(i=r,0===$e&&Fe(bt)),i!==r)for(;i!==r;)o.push(i),N.test(t.charAt(me))?(i=t.charAt(me),me++):(i=r,0===$e&&Fe(bt));else o=r;return o!==r?(ye=e,e=de()):(me=e,e=r),$e--,e===r&&(n=r,0===$e&&Fe(yt)),e}function Le(){var e,n,o,i,a,s,l,c,u,d;for($e++,e=me,45===t.charCodeAt(me)?(n=x,me++):(n=r,0===$e&&Fe(st)),n===r&&(n=null),o=[],N.test(t.charAt(me))?(i=t.charAt(me),me++):(i=r,0===$e&&Fe(bt));i!==r;)o.push(i),N.test(t.charAt(me))?(i=t.charAt(me),me++):(i=r,0===$e&&Fe(bt));if(46===t.charCodeAt(me)?(i=S,me++):(i=r,0===$e&&Fe(wt)),i!==r){if(a=[],N.test(t.charAt(me))?(s=t.charAt(me),me++):(s=r,0===$e&&Fe(bt)),s!==r)for(;s!==r;)a.push(s),N.test(t.charAt(me))?(s=t.charAt(me),me++):(s=r,0===$e&&Fe(bt));else a=r;if(a!==r){if(s=me,101===t.charCodeAt(me)?(l=O,me++):(l=r,0===$e&&Fe($t)),l===r&&(69===t.charCodeAt(me)?(l=P,me++):(l=r,0===$e&&Fe(xt))),l!==r){if(43===t.charCodeAt(me)?(c=$,me++):(c=r,0===$e&&Fe(at)),c===r&&(45===t.charCodeAt(me)?(c=x,me++):(c=r,0===$e&&Fe(st))),c===r&&(c=null),u=[],N.test(t.charAt(me))?(d=t.charAt(me),me++):(d=r,0===$e&&Fe(bt)),d!==r)for(;d!==r;)u.push(d),N.test(t.charAt(me))?(d=t.charAt(me),me++):(d=r,0===$e&&Fe(bt));else u=r;u!==r?s=l=[l,c,u]:(me=s,s=r)}else me=s,s=r;s===r&&(s=null),ye=e,e=pe()}else me=e,e=r}else me=e,e=r;if(e===r){if(e=me,45===t.charCodeAt(me)?(n=x,me++):(n=r,0===$e&&Fe(st)),n===r&&(n=null),o=[],N.test(t.charAt(me))?(i=t.charAt(me),me++):(i=r,0===$e&&Fe(bt)),i!==r)for(;i!==r;)o.push(i),N.test(t.charAt(me))?(i=t.charAt(me),me++):(i=r,0===$e&&Fe(bt));else o=r;if(o!==r)if(101===t.charCodeAt(me)?(i=O,me++):(i=r,0===$e&&Fe($t)),i===r&&(69===t.charCodeAt(me)?(i=P,me++):(i=r,0===$e&&Fe(xt))),i!==r){if(43===t.charCodeAt(me)?(a=$,me++):(a=r,0===$e&&Fe(at)),a===r&&(45===t.charCodeAt(me)?(a=x,me++):(a=r,0===$e&&Fe(st))),a===r&&(a=null),s=[],N.test(t.charAt(me))?(l=t.charAt(me),me++):(l=r,0===$e&&Fe(bt)),l!==r)for(;l!==r;)s.push(l),N.test(t.charAt(me))?(l=t.charAt(me),me++):(l=r,0===$e&&Fe(bt));else s=r;s!==r?(ye=e,e=ve()):(me=e,e=r)}else me=e,e=r;else me=e,e=r}return $e--,e===r&&(n=r,0===$e&&Fe(_t)),e}function We(){var e,n,o,i,a;if($e++,e=me,n=me,$e++,o=function(){var e,n,o,i;return e=me,t.substr(me,4)===I?(n=I,me+=4):(n=r,0===$e&&Fe(Et)),n===r&&(t.substr(me,5)===M?(n=M,me+=5):(n=r,0===$e&&Fe(Ct))),n!==r?(o=me,$e++,R.test(t.charAt(me))?(i=t.charAt(me),me++):(i=r,0===$e&&Fe(jt)),$e--,i===r?o=void 0:(me=o,o=r),o!==r?e=n=[n,o]:(me=e,e=r)):(me=e,e=r),e}(),$e--,o===r?n=void 0:(me=n,n=r),n!==r)if(B.test(t.charAt(me))?(o=t.charAt(me),me++):(o=r,0===$e&&Fe(Ft)),o!==r){for(i=[],R.test(t.charAt(me))?(a=t.charAt(me),me++):(a=r,0===$e&&Fe(jt));a!==r;)i.push(a),R.test(t.charAt(me))?(a=t.charAt(me),me++):(a=r,0===$e&&Fe(jt));ye=e,e=he()}else me=e,e=r;else me=e,e=r;return $e--,e===r&&(n=r,0===$e&&Fe(At)),e}function He(){var e,n;for($e++,e=[],U.test(t.charAt(me))?(n=t.charAt(me),me++):(n=r,0===$e&&Fe(Dt));n!==r;)e.push(n),U.test(t.charAt(me))?(n=t.charAt(me),me++):(n=r,0===$e&&Fe(Dt));return $e--,n=r,0===$e&&Fe(Vt),e}if((n=a())!==r&&me===t.length)return n;throw n!==r&&me<t.length&&Fe({type:"end"}),function(t,e,n){return new Sr(Sr.buildMessage(t,e),t,e,n)}(we,_e<t.length?t.charAt(_e):null,_e<t.length?Ae(_e,_e+1):Ae(_e,_e))}(t,{startRule:"JsonStringContents"}),r=qr(n);return e.vars.push(...r),new _i(n)}catch(e){return void n(st(new Error("Unable to parse expression"),{additional:{expression:t}}))}}}else{if(Array.isArray(t))return t.map((t=>wi(t,e,n)));if("object"==typeof t){const r={};for(const o in t)r[o]=wi(t[o],e,n);return r}}var r;return t}function $i(t,e,n,r=!1){if(t){if(t instanceof _i)return t.apply(e,n,r);if(Array.isArray(t))return t.map((t=>$i(t,e,n)));if("object"==typeof t){const r={};for(const o in t)r[o]=$i(t[o],e,n);return r}}return t}function xi(t,e){const n={vars:[],hasExpression:!1},r=wi(t,n,e);return{vars:[...new Set(n.vars)],hasExpression:n.hasExpression,applyVars:(t,n)=>$i(r,t,e,n)}}const ki={pagers:function(){return Q(new Map)}},Ei=new Map,Ci=new Map;function ji(t){const e=Ei.get(t)||Q("");return Ei.has(t)||Ei.set(t,e),e}function Ai(t){const e=Ci.get(t)||new Map;return Ci.has(t)||Ci.set(t,e),e}class Fi{setVariable(t){const e=t.getName(),n=Ai(this);if(n.has(e))throw new Error("Variable with the same name already exist");n.set(e,t),ji(this).set(e)}getVariable(t){return Ai(this).get(t)}list(){return Ai(this).values()}}function Vi(){return new Fi}function Di(t,e,n){return e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const Si=new Set(["start","stop","pause","resume","cancel","reset"]);class Oi{constructor(t){Di(this,"timers",new Map),Di(this,"awaitActions",[]),this.logError=t.logError,this.applyVars=t.applyVars,this.hasVariableWithType=t.hasVariableWithType,this.setVariableValue=t.setVariableValue,this.execAnyActions=t.execAnyActions,this.visibilityHandler=()=>{"visible"===document.visibilityState?(this.awaitActions.forEach((({id:t,action:e})=>{this.execTimerAction(t,e)})),this.awaitActions=[],this.unholdAll()):this.holdAll()},document.addEventListener("visibilitychange",this.visibilityHandler)}destroy(){document.removeEventListener("visibilitychange",this.visibilityHandler);for(const[t,e]of this.timers)this.stopTimerTimeouts(e)}createTimer(t){null!=t&&t.id?t.duration||t.tick_interval&&(t.value_variable||t.tick_actions)?this.timers.set(t.id,{state:"stopped",definition:t}):this.logError(st(new Error("Misconfigured timer"),{additional:{id:t.id}})):this.logError(st(new Error("Missing timer id")))}execTimerAction(t,e){if(!(t&&e&&this.timers.has(t)&&Si.has(e)))return void this.logError(st(new Error("Incorrect timer action"),{additional:{id:t,action:e}}));const n=e;if("visible"!==document.visibilityState)return void this.awaitActions.push({id:t,action:n});const r=this.timers.get(t);this[n](r)}stopTimerTimeouts(t){t.durationTimeout&&(clearTimeout(t.durationTimeout),t.durationTimeout=void 0),t.tickTimeout&&(clearTimeout(t.tickTimeout),t.tickTimeout=void 0)}tickOrUnholdAction(t){const e=performance.now(),n=(t.durationPassed||0)+e-(t.durationStarted||0);t.duration&&n>t.duration||(this.updateVariable(t,n),this.callActions(t,"tick"),void 0!==t.tickCount&&++t.tickCount)}startOrResume(t){t.state="running",t.hold=!1,t.durationStarted=performance.now();const e=t.duration;e&&(t.durationTimeout=window.setTimeout((()=>{this.updateVariable(t,e),t.tickCountPredict&&void 0!==t.tickCount&&t.tickCount<t.tickCountPredict&&this.callActions(t,"tick"),this.stop(t)}),Math.max(0,e-(t.durationPassed||0))));const n=t.tick;if(n){const e=()=>{const r=t.tickStarted=performance.now(),o=Math.max(0,n-(t.tickPassed||0));t.tickTimeout=window.setTimeout((()=>{this.tickOrUnholdAction(t),t.tickPassed=(performance.now()-r-o)%n,e()}),o)};e()}}start(t){if("running"===t.state)return void this.logError(st(new Error("The timer is already running")));if("paused"===t.state)return void this.logError(st(new Error("The timer is paused")));const e=t.definition.value_variable;!e||this.hasVariableWithType(e,"integer")?(e&&this.setVariableValue(e,0),t.definition.duration&&(t.duration=this.applyVars(t.definition.duration)),t.definition.tick_interval&&(t.tick=this.applyVars(t.definition.tick_interval)),void 0!==t.duration&&t.duration<0||void 0!==t.tick&&t.tick<=0?this.logError(st(new Error("Incorrect timer properties"),{additional:{id:t.definition.id}})):(void 0!==t.duration&&void 0!==t.tick&&(t.tickCount=0,t.tickCountPredict=Math.floor(t.duration/t.tick)),this.startOrResume(t))):this.logError(st(new Error("Cannot find variable"),{additional:{name:e}}))}stop(t){"stopped"!==t.state?(t.state="stopped",t.durationPassed=0,t.tickPassed=0,this.stopTimerTimeouts(t),this.callActions(t,"end")):this.logError(st(new Error("The timer has already been stopped")))}pause(t){if("stopped"===t.state)return void this.logError(st(new Error("The timer has already been stopped")));if("paused"===t.state)return void this.logError(st(new Error("The timer has already been paused")));t.state="paused",this.stopTimerTimeouts(t);const e=performance.now();t.durationStarted&&(t.durationPassed=(t.durationPassed||0)+e-t.durationStarted),t.tickStarted&&(t.tickPassed=(t.tickPassed||0)+e-t.tickStarted);const n=t.definition.value_variable;n&&t.durationPassed&&this.setVariableValue(n,Math.round(t.durationPassed))}resume(t){"stopped"!==t.state?"running"!==t.state?this.startOrResume(t):this.logError(st(new Error("The timer is already running"))):this.logError(st(new Error("The timer has already been stopped")))}cancel(t){"stopped"!==t.state&&(t.state="stopped",t.durationPassed=0,t.tickPassed=0,this.stopTimerTimeouts(t))}reset(t){this.cancel(t),this.start(t)}updateVariable(t,e){const n=t.definition.value_variable;n&&this.setVariableValue(n,Math.round(e))}callActions(t,e){const n=t.definition["end"===e?"end_actions":"tick_actions"];if(n){const t=this.applyVars(n);this.execAnyActions(t,{processUrls:!1})}}holdAll(){for(const[t,e]of this.timers)"running"===e.state&&(e.hold=!0,this.stopTimerTimeouts(e))}unholdAll(){for(const[t,e]of this.timers)if("running"===e.state&&e.hold){const t=performance.now();e.durationStarted&&(e.durationPassed=(e.durationPassed||0)+t-e.durationStarted),e.tickStarted&&(e.tickPassed=(e.tickPassed||0)+t-e.tickStarted),e.tick&&this.tickOrUnholdAction(e),this.startOrResume(e)}}}function Pi(t,e,n,r){const{variable_name:o}=n;if(!o)return void e(st(new Error(`Incorrect ${n.type} action`),{additional:{name:o}}));const i=t.get(o);if(!i)return void e(st(new Error("Cannot find variable"),{additional:{name:o}}));const a=i.getType();"array"===a?r(i):e(st(new Error("Trying to insert value into the non-array"),{additional:{name:o,type:a}}))}let Ii=Q(!0),Mi=0;function Ti(){Ii.set(!1)}function zi(){Ii.set(!0)}function Ni(t,e){return t&&e?new Map([...t,...e]):t||e||void 0}const Ri=L(((t,e,n,r)=>{let o,i,a,s;var c,u,d,p;let{id:f}=e,{json:h={}}=e,{platform:m="auto"}=e,{theme:y="system"}=e,{globalVariablesController:b=new Fi}=e,{mix:_=""}=e,{customization:w={}}=e,{builtinProtocols:x=["http","https","tel","mailto","intent"]}=e,{extensions:k=new Map}=e,{onError:E}=e,{onStat:C}=e,{onCustomAction:j}=e,{onComponent:A}=e,{typefaceProvider:F=(t=>"")}=e,{fetchInit:V={}}=e,{tooltipRoot:D}=e,{customComponents:S}=e,O=Q("desktop"===m);if(s=l(O,(t=>a=t)),"auto"===m&&"undefined"!=typeof matchMedia){const t=matchMedia("(any-pointer: coarse)");O.set(!t.matches),t.addListener((()=>{O.set(!t.matches)}))}let P="light",M=null;function T(t){y=t}function z(){return new Map}function N(){return new Map}function B(t){h=t}const U=new Set(x);let L=!1,W=!1;f||(W=!0,ot(st(new Error('"id" prop is required'))));const H={stateChange:!1},q=ji(b),J=Ai(b),G=new Map,Z=new Map,Y=new Map;let X=null,tt=0,et=[];function nt(t,e,n=!1){const r=xi(t,ot);if(!r.hasExpression)return t;const o=Ni(Z,e);return r.applyVars(o,n)}function ot(t){E?E({error:t}):"warn"===(null==t?void 0:t.level)?console.warn(t):console.error(t)}function it(t,e){C&&C({type:t,action:e})}function lt(t,e){if(!t)return{json:t,templateContext:e};const n=new Set([t.type]);for(;t.type&&t.type in o;){if(({json:t,templateContext:e}=kr(t,e,o,ot)),n.has(t.type))return{json:t,templateContext:e};n.add(t.type)}return{json:t,templateContext:e}}let ct=0;function ut(t){return`${f}-${ct++}`}let dt={},pt={};function vt(t){gt(nt(t))}function gt(t,e){const n=t.url?String(t.url):"",r=t.typed;if(!Lt(t))return;const i=(null==e?void 0:e.logError)||ot;if(n)try{const r=n.replace(/div-action:\/\//,""),a=/([^?]+)\?(.+)/.exec(r);if(!a)return;const s=new URLSearchParams(a[2]);switch(a[1]){case"set_state":!function(t){if(!t)throw new Error("Missing state id");let e=Ct,n=t.split("/");if(n=["root",...n],n.length<2||n.length%2!=0)throw new Error("Incorrect state id format");for(let t=0;t<n.length;t+=2){const r=n[t],o=n[t+1];let i=e.getChild(r);if(!i)return;i.setState(o),e=i}}(s.get("state_id"));break;case"set_current_item":!function(t,e){if(!t||!e)throw new Error('Missing data for "set-current-item" action');if(isNaN(Number(e)))throw new Error('Incorrect item for "set-current-item" action');const n=$t(t);n&&n.setCurrentItem(Number(e))}(s.get("id"),s.get("item"));break;case"set_previous_item":!function(t,e){if(!t)throw new Error('Missing id for "set-previous-item" action');if(e&&"clamp"!==e&&"ring"!==e)throw new Error('Incorrect overflow value for "set-previous-item" action');e=e||"clamp";const n=$t(t);n&&n.setPreviousItem(e)}(s.get("id"),s.get("overflow"));break;case"set_next_item":!function(t,e){if(!t)throw new Error('Missing id for "set-next-item" action');if(e&&"clamp"!==e&&"ring"!==e)throw new Error('Incorrect overflow value for "set-next-item" action');e=e||"clamp";const n=$t(t);n&&n.setNextItem(e)}(s.get("id"),s.get("overflow"));break;case"set_variable":const a=s.get("name"),l=s.get("value");if(a&&null!==l){const t=Z.get(a);if(t){const e=t.getType();"dict"===e||"array"===e?i(st(new Error(`Setting ${e} variables is not supported`),{additional:{name:a}})):t.set(l)}else i(st(new Error("Cannot find variable"),{additional:{name:a}}))}else i(st(new Error("Incorrect set_variable_action"),{additional:{url:r}}));break;case"timer":const c=s.get("action"),u=s.get("id");X?X.execTimerAction(u,c):i(st(new Error("Incorrect timer action"),{additional:{id:u,action:c}}));break;case"video":!function(t,e,n){const r=(null==n?void 0:n.logError)||ot;if(t){const n=$t(t);n?"start"===e?n.start():"pause"===e?n.pause():r(st(new Error("Unknown video action"),{additional:{id:t,action:e}})):r(st(new Error("Video component is not found"),{additional:{id:t,action:e}}))}else r(st(new Error("Missing id in video action"),{additional:{action:e}}))}(s.get("id"),s.get("action"),e);break;case"download":!function(t,e,n){const r=(null==n?void 0:n.logError)||ot;if(t){let n;n="function"==typeof V?V(t):V,fetch(t,n).then((t=>{if(!t.ok)throw new Error("Response is not ok");return t.json()})).then((n=>{var i,a,s;if(n){if(n.templates)for(const t in n.templates)o.hasOwnProperty(t)||(o[t]=n.templates[t]);if(Array.isArray(null===(i=n.patch)||void 0===i?void 0:i.changes)){if("transactional"===n.patch.mode){const o=n.patch.changes.find((t=>{const e=bt.get(t.id);if(!e)return!0;const n=Array.isArray(t.items)?t.items.length:0;return!(!e.isSingleMode||1===n)}));if(o)return r(st(new Error("Skipping transactional, child is not found or broken"),{additional:{url:t,id:o.id}})),void ft(null===(a=e.download_callbacks)||void 0===a?void 0:a.on_fail_actions)}n.patch.changes.forEach((t=>{const e=bt.get(t.id);e&&e.replaceWith(t.id,t.items)})),ft(null===(s=e.download_callbacks)||void 0===s?void 0:s.on_success_actions)}}else r(st(new Error("Incorrect patch"),{additional:{url:t}}))})).catch((n=>{var o;r(st(new Error("Failed to download the patch"),{additional:{url:t,originalError:n}})),ft(null===(o=e.download_callbacks)||void 0===o?void 0:o.on_fail_actions)}))}else r(st(new Error("Missing url in download action"),{additional:{url:t}}))}(s.get("url"),t,e);break;case"show_tooltip":!function(t,e,n){var r;const o=(null==n?void 0:n.logError)||ot;if(!t)return void o(st(new Error("Missing id in show_tooltip action")));const i=wt.get(t);if(!i)return void o(st(new Error("Tooltip with the provided id is not found"),{additional:{id:t}}));if("true"!==e&&et.some((e=>e.desc.id===t)))return;const a={internalId:++tt,ownerNode:i.onwerNode,desc:i.tooltip,timeoutId:0};et=[...et,a];const s=null!==(r=i.tooltip.duration)&&void 0!==r?r:5e3;s&&(a.timeoutId=window.setTimeout((()=>{a.timeoutId=0,et=et.filter((t=>t.internalId!==a.internalId))}),s))}(s.get("id"),s.get("multiple"),e);break;case"hide_tooltip":!function(t,e){const n=(null==e?void 0:e.logError)||ot;t?et=et.filter((e=>{const n=e.desc.id!==t;return!n&&e.timeoutId&&(clearTimeout(e.timeoutId),e.timeoutId=null),n})):n(st(new Error("Missing id in hide_tooltip action")))}(s.get("id"),e);break;default:i(st(new Error("Unknown type of action"),{additional:{url:n}}))}}catch(t){i(st(t,{additional:{url:n}}))}else if(r)switch(r.type){case"set_variable":{const{variable_name:t,value:e}=r;if(t&&e){const n=Z.get(t);n?n.getType()===e.type?n.setValue(e.value):i(st(new Error("Trying to set value with invalid type"),{additional:{name:t,type:e.type}})):i(st(new Error("Cannot find variable"),{additional:{name:t}}))}else i(st(new Error("Incorrect set_variable action"),{additional:{name:t}}));break}case"array_insert_value":!function(t,e,n){const{variable_name:r,index:o,value:i}=n;!i||"number"!=typeof o&&void 0!==o?e(st(new Error("Incorrect array_insert_value action"),{additional:{name:r}})):Pi(t,e,n,(t=>{const a=t.getValue();if("number"==typeof o&&(o<0||o>a.length))e(st(new Error(`Index out of bound for mutation ${n.type}`),{additional:{name:r,index:o,length:a.length}}));else{const e=a.slice();"number"==typeof o?e.splice(o,0,i.value):e.push(i.value),t.setValue(e)}}))}(Z,i,r);break;case"array_remove_value":!function(t,e,n){const{variable_name:r,index:o}=n;"number"==typeof o?Pi(t,e,n,(t=>{const i=t.getValue();if("number"==typeof o&&(o<0||o>=i.length))e(st(new Error(`Index out of bound for mutation ${n.type}`),{additional:{name:r,index:o,length:i.length}}));else{const e=i.slice();e.splice(o,1),t.setValue(e)}})):e(st(new Error("Incorrect array_remove_value action"),{additional:{name:r}}))}(Z,i,r);break;case"copy_to_clipboard":!function(t,e){!e.content||"text"!==e.content.type&&"url"!==e.content.type||"string"!=typeof e.content.value?t(st(new Error("Incorrect action"),{additional:{action:e}})):"undefined"!=typeof navigator&&"clipboard"in navigator&&navigator.clipboard&&"writeText"in navigator.clipboard&&"function"==typeof navigator.clipboard.writeText?navigator.clipboard.writeText(e.content.value).catch((e=>{t(st(new Error("Failed to copy to the clipboard"),{additional:{originalError:String(e)}}))})):t(st(new Error("Clipboard is unavailable"),{additional:{action:e}}))}(i,r);break;case"focus_element":{const t=r.element_id&&_t.get(r.element_id);t?t.focus():i(st(new Error("Incorrect focus_element action"),{additional:{elementId:r.element_id}}));break}default:i(st(new Error("Unknown type of action"),{additional:{type:r.type}}))}}async function ft(t,e={}){if(!t||!Array.isArray(t))return;const n=t.filter(Lt);for(let t=0;t<n.length;++t){let r=n[t];const o=r.url,i=r.typed;if(o){const t=xt(o);if(t)if(kt(t,U)){if(e.processUrls)if("_blank"===r.target){const t=window.open("","_blank");t&&(t.opener=null,t.location=o)}else location.href=o}else"div-action"===t?(gt(r,e.componentContext),await $()):r.log_id&&(ht(r),await $())}else i&>(r,e.componentContext)}n.forEach((t=>{t.log_id&&it("click",t)}))}function ht(t){null==j||j(t)}const yt=new Map,bt=new Map,_t=new Map,wt=new Map;function $t(t){if(yt.has(t))return yt.get(t);ot(st(new Error("Missing instance with id"),{additional:{id:t}}))}const Et=new Map;g(at,{logStat:it,hasTemplate:function(t){return t in o},processTemplate:lt,genId:ut,genClass:function(t){return`divkit-${ut()}`},execAction:gt,execCustomAction:ht,isRunning:function(t){return H[t]},setRunning:function(t,e){H[t]=e},registerInstance:function(t,e){yt.has(t)?ot(st(new Error("Duplicate instance id"),{additional:{id:t}})):yt.set(t,e)},unregisterInstance:function(t){yt.delete(t)},registerParentOf:function(t,e){bt.set(t,e)},unregisterParentOf:function(t){bt.delete(t)},registerTooltip:function(t,e){const n=e.id;n&&(wt.has(n)&&ot(st(new Error("Duplicate tooltip id"),{additional:{id:n}})),wt.set(n,{onwerNode:t,tooltip:e}))},unregisterTooltip:function(t){const e=t.id;e&&(wt.delete(e),et.some((t=>t.desc.id===e))&&(et=et.filter((t=>t.desc.id!==e))))},onTooltipClose:function(t){et=et.filter((e=>e.internalId!==t))},tooltipRoot:D,registerFocusable:function(t,e){_t.set(t,e)},unregisterFocusable:function(t){_t.delete(t)},addSvgFilter:function(t,e){const n=`${t}:${e}`;if(pt[n]=pt[n]||0,++pt[n],dt[n])return dt[n];const r=`${ut()}-svg-filter`;return dt=Object.assign(Object.assign({},dt),{[n]:r}),r},removeSvgFilter:function(t,e){if(!t)return;const n=`${t}:${e}`;pt[n]&&0==--pt[n]&&(dt=Object.keys(dt).reduce(((t,e)=>(pt[e]&&(t[e]=dt[e]),t)),{}))},preparePrototypeVariables:function(t,e){const n=new Map,r=function(t,e,n){if(!(e in Gn))throw new Error("Unsupported variable type");return new Gn[e](t,n)}(t,"dict",e);return n.set(t,r),n},getStore:function(t){return Et.has(t)||function(t){Et.has(t)||Et.set(t,ki[t]())}(t),Et.get(t)},getCustomization:function(t){return null==w?void 0:w[t]},getBuiltinProtocols:function(){return U},getExtension:function(t,e){const n=k.get(t);if(n)return new n(e||{})},getExtensionContext:function(){return{variables:Z,logError:ot}},typefaceProvider:F,isDesktop:O,isPointerFocus:Ii,customComponents:S,componentDevtool:void 0}),g(qt,{hasAction:()=>!1});const Ct={setState(t){throw new Error("Not implemented")},getChild(t){if(jt&&jt.has(t))return jt.get(t);ot(st(new Error("Missing state block with id"),{additional:{id:t}}))}};let jt=null;function At(t){if(t.type in Ln){"integer"===t.type&&"number"==typeof t.value&&(t.value>Number.MAX_SAFE_INTEGER||t.value<Number.MIN_SAFE_INTEGER)&&ot(st(new Error("The value of the integer variable could lose accuracy"),{level:"warn",additional:{name:t.name,value:t.value}}));try{const e=Wn(t.name,t.type,t.value);G.set(t.name,e),Z.set(t.name,e)}catch(e){ot(st(e,{additional:{name:t.name}}))}}}g(Ft,{registerInstance(t,e){jt||(jt=new Map),jt.has(t)?ot(st(new Error("Duplicate state with id"),{additional:{id:t}})):jt.set(t,e)},unregisterInstance(t){null==jt||jt.delete(t)},runVisibilityTransition:(t,e,n,r,o)=>Promise.resolve(),registerChildWithTransitionIn:(t,e,n,r)=>Promise.resolve(),registerChildWithTransitionOut:(t,e,n,r)=>Promise.resolve(),registerChildWithTransitionChange:(t,e,n,r)=>Promise.resolve(),hasTransitionChange:t=>!1,registerChild(t){},unregisterChild(t){}});const Vt=null===(c=null==h?void 0:h.card)||void 0===c?void 0:c.variables;Array.isArray(Vt)&&Vt.forEach((t=>{if(t&&t.name){if(G.has(t.name))return void ot(st(new Error("Duplicate variable"),{additional:{name:t.name}}));At(t)}}));const Dt=h.palette;Dt&&Dt[P].forEach((t=>{if(G.has(t.name))ot(st(new Error("Duplicate variable"),{additional:{name:t.name}}));else try{const e=Wn(t.name,"color",t.color);G.set(t.name,e),Z.set(t.name,e)}catch(e){ot(st(e,{additional:{name:t.name}}))}}));for(const[t,e]of J)Z.has(t)||Z.set(t,e);q.subscribe((t=>{if(t&&!Z.has(t)){const e=J.get(t);Z.set(t,e);const n=Y.get(t);if(n){let t=0;e.subscribe((()=>{n.set(++t)}))}}}));const St=null===(d=null==h?void 0:h.card)||void 0===d?void 0:d.timers;if(St&&"undefined"!=typeof document){const t=X=new Oi({logError:ot,applyVars:nt,hasVariableWithType:function(t,e){const n=Z.get(t);return(null==n?void 0:n.getType())===e},setVariableValue:function(t,e){const n=Z.get(t);n?n.setValue(e):ot(st(new Error("Cannot find variable"),{additional:{name:t}}))},execAnyActions:ft});St.forEach((e=>t.createTimer(e)))}const Ot=function t(e){const n={json:{},path:[],templateContext:{},logError(t){t.additional=t.additional||{},t.additional.path=n.path.join("/"),ot(t)},execAnyActions:(t,e={})=>ft(t,{componentContext:n,processUrls:e.processUrls}),getDerivedFromVars:(t,e,r=!1)=>function(t,e,n=!1){if(!t)return Cr(t);const r=Ni(Z,e),o=xi(t,ot);return o.vars.length?K(o.vars.map((t=>r.get(t)||function(t){const e=Y.get(t)||Q(void 0);return Y.has(t)||Y.set(t,e),e}(t))).filter(mt),(()=>o.applyVars(r,n))):o.hasExpression?Cr(o.applyVars(r)):Cr(t)}(t,Ni(n.variables,e),r),getJsonWithVars:(t,e,r=!1)=>nt(t,Ni(n.variables,e),r),produceChildContext(e,r={}){const o=t(n);let i=e,a=n.templateContext;const{templateContext:s,json:l}=lt(i,a);return o.json=l,o.templateContext=s,o.origJson=e,void 0!==r.path&&o.path.push(String(r.path)),e.type&&!r.isRootState&&o.path.push(e.type),o.variables=Ni(n.variables,r.variables),r.tooltips&&(o.tooltips=r.tooltips),r.fake&&(o.fakeElement=!0),r.isRootState&&(o.isRootState=!0),o},getVariable(t,e){const r=(n.variables||Z).get(t);if(r){const o=r.getType();if(o!==e)return void n.logError(st(new Error(`Variable should have type "${e}"`),{additional:{name:t,foundType:o}}))}return r}};return e?(n.path=e.path.slice(),e.fakeElement&&(n.fakeElement=!0)):(n.json={type:"root"},n.isRootState=!0),n}();let Pt;v((()=>{Mi--,Mi||(window.removeEventListener("keydown",Ti),window.removeEventListener("pointerdown",zi)),X&&X.destroy(),et.forEach((t=>{t.timeoutId&&(clearTimeout(t.timeoutId),t.timeoutId=null)}))})),void 0===e.id&&n.id&&void 0!==f&&n.id(f),void 0===e.json&&n.json&&void 0!==h&&n.json(h),void 0===e.platform&&n.platform&&void 0!==m&&n.platform(m),void 0===e.theme&&n.theme&&void 0!==y&&n.theme(y),void 0===e.globalVariablesController&&n.globalVariablesController&&void 0!==b&&n.globalVariablesController(b),void 0===e.mix&&n.mix&&void 0!==_&&n.mix(_),void 0===e.customization&&n.customization&&void 0!==w&&n.customization(w),void 0===e.builtinProtocols&&n.builtinProtocols&&void 0!==x&&n.builtinProtocols(x),void 0===e.extensions&&n.extensions&&void 0!==k&&n.extensions(k),void 0===e.onError&&n.onError&&void 0!==E&&n.onError(E),void 0===e.onStat&&n.onStat&&void 0!==C&&n.onStat(C),void 0===e.onCustomAction&&n.onCustomAction&&void 0!==j&&n.onCustomAction(j),void 0===e.onComponent&&n.onComponent&&void 0!==A&&n.onComponent(A),void 0===e.typefaceProvider&&n.typefaceProvider&&void 0!==F&&n.typefaceProvider(F),void 0===e.fetchInit&&n.fetchInit&&void 0!==V&&n.fetchInit(V),void 0===e.tooltipRoot&&n.tooltipRoot&&void 0!==D&&n.tooltipRoot(D),void 0===e.customComponents&&n.customComponents&&void 0!==S&&n.customComponents(S),void 0===e.setTheme&&n.setTheme&&void 0!==T&&n.setTheme(T),void 0===e.getDebugVariables&&n.getDebugVariables&&void 0!==z&&n.getDebugVariables(z),void 0===e.getDebugAllVariables&&n.getDebugAllVariables&&void 0!==N&&n.getDebugAllVariables(N),void 0===e.setData&&n.setData&&void 0!==B&&n.setData(B),void 0===e.execAction&&n.execAction&&void 0!==vt&&n.execAction(vt),"light"===y||"dark"===y?P=y:"system"===y?"undefined"!=typeof matchMedia?(M||(M=matchMedia("(prefers-color-scheme: dark)"),M.addListener((function(){"system"===y&&M&&(P=M.matches?"dark":"light")}))),P=M.matches?"dark":"light"):P="light":ot(st(new Error("Unsupported theme"))),P&&Dt&&Dt[P].forEach((t=>{const e=Z.get(t.name);e&&e.setValue(t.color)}));{L=!1;const t=function(t){if(!t)return st(new Error("Missing object"));const e=t.card,n=t.templates||{};if(!e)return st(new Error("Missing card"));if(!e.states||!e.states.length)return st(new Error("Missing states"));for(const t in n)if(n.hasOwnProperty(t)&&t in wr)return st(new Error("Template name collision"),{additional:{templateName:t}});for(let t=0;t<e.states.length;++t){if(!e.states[t].div)return st(new Error("Missing state div"),{additional:{stateId:e.states[t].state_id}});if("number"!=typeof e.states[t].state_id)return st(new Error("Missing state_id"),{additional:{index:t}})}return null}(h);t&&(L=!0,ot(t))}if(o=h.templates||{},(null===(u=null==h?void 0:h.card)||void 0===u?void 0:u.variables)&&Array.isArray(h.card.variables)&&h.card.variables!==Vt&&h.card.variables.forEach((t=>{t&&t.name&&!G.has(t.name)&&At(t)})),i=null===(p=null==h?void 0:h.card)||void 0===p?void 0:p.states,i&&!L&&!W){const t={type:"state",id:"root",width:{type:"match_parent"},height:{type:"match_parent"},states:i.map((t=>({state_id:t.state_id.toString(),div:t.div})))};Pt=Ot.produceChildContext(t,{tooltips:et,isRootState:!0})}return s(),L||W||!Pt?"":`<div class="${I("divkit-b023c",!0)+I(a?` ${rt}`:"",!0)+I(_?` ${_}`:"",!0)}">${R(xr,"RootSvgFilters").$$render(t,{svgFiltersMap:dt},{},{})} ${R($r,"Unknown").$$render(t,{componentContext:Pt},{},{})}</div>`})),Bi=Ri;function Ui(t){return Bi.render(t).html}var Li=e.M,Wi=e.Os,Hi=e.sY;export{Li as createGlobalVariablesController,Wi as createVariable,Hi as render};
|
|
2
2
|
//# sourceMappingURL=server.mjs.map
|