@divkitframework/divkit 24.3.0 → 24.4.0-patched-6cf96a434f902166380b2bb2c1e4eb41acabf148
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/README.md +13 -0
- 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 +29 -29
package/dist/esm/client.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
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={};function n(){}t.d(e,{Hy:()=>us,M:()=>es,Os:()=>Mi,_0:()=>ps,sY:()=>hs});const r=t=>t;function i(t,e){for(const n in e)t[n]=e[n];return t}function o(t){return t()}function a(){return Object.create(null)}function s(t){t.forEach(o)}function l(t){return"function"==typeof t}let c;function u(t,e){return c||(c=document.createElement("a")),c.href=e,t===c.href}function d(t,e){return t!=t?e==e:t!==e}function p(t){return 0===Object.keys(t).length}function h(t,...e){if(null==t)return n;const r=t.subscribe(...e);return r.unsubscribe?()=>r.unsubscribe():r}function f(t,e,n){t.$$.on_destroy.push(h(e,n))}function g(t,e,n,r){if(t){const i=m(t,e,n,r);return t[0](i)}}function m(t,e,n,r){return t[1]&&r?i(n.ctx.slice(),t[1](r(e))):n.ctx}function v(t,e,n,r){if(t[2]&&r){const i=t[2](r(n));if(void 0===e.dirty)return i;if("object"==typeof i){const t=[],n=Math.max(e.dirty.length,i.length);for(let r=0;r<n;r+=1)t[r]=e.dirty[r]|i[r];return t}return e.dirty|i}return e.dirty}function y(t,e,n,r,i,o){if(i){const a=m(e,n,r,o);t.p(a,i)}}function $(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let t=0;t<n;t++)e[t]=-1;return e}return-1}function b(t,e,n){return t.set(n),e}function _(t){return t&&l(t.destroy)?t.destroy:n}const w="undefined"!=typeof window;let x=w?()=>window.performance.now():()=>Date.now(),k=w?t=>requestAnimationFrame(t):n;const E=new Set;function C(t){E.forEach((e=>{e.c(t)||(E.delete(e),e.f())})),0!==E.size&&k(C)}let A=!1;function V(t,e){t.appendChild(e)}function j(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function P(t){const e=z("style");return function(t,e){V(t.head||t,e)}(j(t),e),e.sheet}function D(t,e,n){t.insertBefore(e,n||null)}function S(t){t.parentNode.removeChild(t)}function F(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function z(t){return document.createElement(t)}function N(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function M(t){return document.createTextNode(t)}function T(){return M(" ")}function I(){return M("")}function O(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function J(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function B(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const r in e)null==e[r]?t.removeAttribute(r):"style"===r?t.style.cssText=e[r]:"__value"===r?t.value=t[r]=e[r]:n[r]&&n[r].set?t[r]=e[r]:J(t,r,e[r])}function R(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function U(t,e,n,r){null===n?t.style.removeProperty(e):t.style.setProperty(e,n,r?"important":"")}function L(t,e){for(let n=0;n<t.options.length;n+=1){const r=t.options[n];if(r.__value===e)return void(r.selected=!0)}t.selectedIndex=-1}const W=new Map;let H,q=0;function G(t,e){const n=(t.style.animation||"").split(", "),r=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),i=n.length-r.length;i&&(t.style.animation=r.join(", "),q-=i,q||k((()=>{q||(W.forEach((t=>{const{stylesheet:e}=t;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.rules={}})),W.clear())})))}function K(t){H=t}function X(){if(!H)throw new Error("Function called outside component initialization");return H}function Y(t){X().$$.on_mount.push(t)}function Z(t){X().$$.on_destroy.push(t)}function Q(t,e){return X().$$.context.set(t,e),e}function tt(t){return X().$$.context.get(t)}function et(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t.call(this,e)))}const nt=[],rt=[],it=[],ot=[],at=Promise.resolve();let st=!1;function lt(){st||(st=!0,at.then(ft))}function ct(){return lt(),at}function ut(t){it.push(t)}const dt=new Set;let pt,ht=0;function ft(){const t=H;do{for(;ht<nt.length;){const t=nt[ht];ht++,K(t),gt(t.$$)}for(K(null),nt.length=0,ht=0;rt.length;)rt.pop()();for(let t=0;t<it.length;t+=1){const e=it[t];dt.has(e)||(dt.add(e),e())}it.length=0}while(nt.length);for(;ot.length;)ot.pop()();st=!1,dt.clear(),K(t)}function gt(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(ut)}}function mt(t,e,n){t.dispatchEvent(function(t,e,{bubbles:n=!1,cancelable:r=!1}={}){const i=document.createEvent("CustomEvent");return i.initCustomEvent(t,n,r,e),i}(`${e?"intro":"outro"}${n}`))}const vt=new Set;let yt;function $t(){yt={r:0,c:[],p:yt}}function bt(){yt.r||s(yt.c),yt=yt.p}function _t(t,e){t&&t.i&&(vt.delete(t),t.i(e))}function wt(t,e,n,r){if(t&&t.o){if(vt.has(t))return;vt.add(t),yt.c.push((()=>{vt.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}else r&&r()}const xt={duration:0};function kt(t,e,i){let o,a,s=e(t,i),c=!1,u=0;function d(){o&&G(t,o)}function p(){const{delay:e=0,duration:i=300,easing:l=r,tick:p=n,css:h}=s||xt;h&&(o=function(t,e,n,r,i,o,a,s=0){const l=16.666/r;let c="{\n";for(let t=0;t<=1;t+=l){const r=e+(n-e)*o(t);c+=100*t+`%{${a(r,1-r)}}\n`}const u=c+`100% {${a(n,1-n)}}\n}`,d=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(u)}_${s}`,p=j(t),{stylesheet:h,rules:f}=W.get(p)||function(t,e){const n={stylesheet:P(e),rules:{}};return W.set(t,n),n}(p,t);f[d]||(f[d]=!0,h.insertRule(`@keyframes ${d} ${u}`,h.cssRules.length));const g=t.style.animation||"";return t.style.animation=`${g?`${g}, `:""}${d} ${r}ms linear ${i}ms 1 both`,q+=1,d}(t,0,1,i,e,l,h,u++)),p(0,1);const f=x()+e,g=f+i;a&&a.abort(),c=!0,ut((()=>mt(t,!0,"start"))),a=function(t){let e;return 0===E.size&&k(C),{promise:new Promise((n=>{E.add(e={c:t,f:n})})),abort(){E.delete(e)}}}((e=>{if(c){if(e>=g)return p(1,0),mt(t,!0,"end"),d(),c=!1;if(e>=f){const t=l((e-f)/i);p(t,1-t)}}return c}))}let h=!1;return{start(){h||(h=!0,G(t),l(s)?(s=s(),(pt||(pt=Promise.resolve(),pt.then((()=>{pt=null}))),pt).then(p)):p())},invalidate(){h=!1},end(){c&&(d(),c=!1)}}}const Et="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function Ct(t,e){wt(t,1,1,(()=>{e.delete(t.key)}))}function At(t,e){const n={},r={},i={$$scope:1};let o=t.length;for(;o--;){const a=t[o],s=e[o];if(s){for(const t in a)t in s||(r[t]=1);for(const t in s)i[t]||(n[t]=s[t],i[t]=1);t[o]=s}else for(const t in a)i[t]=1}for(const t in r)t in n||(n[t]=void 0);return n}let Vt;function jt(t){t&&t.c()}function Pt(t,e,n,r){const{fragment:i,on_mount:a,on_destroy:c,after_update:u}=t.$$;i&&i.m(e,n),r||ut((()=>{const e=a.map(o).filter(l);c?c.push(...e):s(e),t.$$.on_mount=[]})),u.forEach(ut)}function Dt(t,e){const n=t.$$;null!==n.fragment&&(s(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function St(t,e,r,i,o,l,c,u=[-1]){const d=H;K(t);const p=t.$$={fragment:null,ctx:null,props:l,update:n,not_equal:o,bound:a(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(d?d.$$.context:[])),callbacks:a(),dirty:u,skip_bound:!1,root:e.target||d.$$.root};c&&c(p.root);let h=!1;if(p.ctx=r?r(t,e.props||{},((e,n,...r)=>{const i=r.length?r[0]:n;return p.ctx&&o(p.ctx[e],p.ctx[e]=i)&&(!p.skip_bound&&p.bound[e]&&p.bound[e](i),h&&function(t,e){-1===t.$$.dirty[0]&&(nt.push(t),lt(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),n})):[],p.update(),h=!0,s(p.before_update),p.fragment=!!i&&i(p.ctx),e.target){if(e.hydrate){A=!0;const t=(f=e.target,Array.from(f.childNodes));p.fragment&&p.fragment.l(t),t.forEach(S)}else p.fragment&&p.fragment.c();e.intro&&_t(t.$$.fragment),Pt(t,e.target,e.anchor,e.customElement),A=!1,ft()}var f;K(d)}new Set(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]),"function"==typeof HTMLElement&&(Vt=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(o).filter(l);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){s(this.$$.on_disconnect)}$destroy(){Dt(this,1),this.$destroy=n}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&!p(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});class Ft{$destroy(){Dt(this,1),this.$destroy=n}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&!p(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const zt=[];function Nt(t,e=n){let r;const i=new Set;function o(e){if(o=e,((n=t)!=n?o==o:n!==o||n&&"object"==typeof n||"function"==typeof n)&&(t=e,r)){const e=!zt.length;for(const e of i)e[1](),zt.push(e,t);if(e){for(let t=0;t<zt.length;t+=2)zt[t][0](zt[t+1]);zt.length=0}}var n,o}return{set:o,update:function(e){o(e(t))},subscribe:function(a,s=n){const l=[a,s];return i.add(l),1===i.size&&(r=e(o)||n),a(t),()=>{i.delete(l),0===i.size&&(r(),r=null)}}}}function Mt(t,e,r){const i=!Array.isArray(t),o=i?[t]:t,a=e.length<2;return{subscribe:Nt(r,(t=>{let r=!1;const c=[];let u=0,d=n;const p=()=>{if(u)return;d();const r=e(i?c[0]:c,t);a?t(r):d=l(r)?r:n},f=o.map(((t,e)=>h(t,(t=>{c[e]=t,u&=~(1<<e),r&&p()}),(()=>{u|=1<<e}))));return r=!0,p(),function(){s(f),d()}})).subscribe}}const Tt=Symbol("root");function It(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=t;return n.level=e.level||"error",e.additional&&(n.additional=e.additional),n}const Ot={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_truncate_none:"divkit-c6ea1",text_multiline:"divkit-ee8e3",text__inner_gradient:"divkit-cb8e0",text__image:"divkit-bf6e2",text__image_hidden:"divkit-f1002"},Jt={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"};function Bt(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 Rt(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 Ut(t){let e=Rt(t);return"0"===e&&(e+="em"),e}function Lt(t,e){for(;t.length<e;)t="0"+t;return t}function Wt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"transparent";if("#"!==(t=(t||"").toLowerCase()).charAt(0))return n;const r=qt(t);return r?(r.a*=e,Ht(r)):n}function Ht(t){return 255===t.a?"#".concat([t.r,t.g,t.b].map((t=>Lt(Math.round(t).toString(16),2))).join("")):"rgba(".concat(t.r,",").concat(t.g,",").concat(t.b,",").concat((t.a/255).toFixed(2),")")}function qt(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,i,o]=e,a=2===r.length?r:r+r,s=2===i.length?i:i+i,l=2===o.length?o:o+o,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,i]=e,o=2===n.length?n:n+n,a=2===r.length?r:r+r,s=2===i.length?i:i+i;return{a:255,r:parseInt(o,16),g:parseInt(a,16),b:parseInt(s,16)}}return null}function Gt(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 Kt=Boolean;function Xt(t){if(1===t.length&&"solid"===t[0].type)return{color:Wt(t[0].color||"transparent"),size:"auto",position:"50% 50%"};const e=t.map((t=>"solid"===t.type?function(t){const e=Wt(t.bg.color||"transparent");return{size:void 0,pos:void 0,image:"linear-gradient(to bottom,".concat(e,",").concat(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(Kt);return n.length?{size:void 0,pos:void 0,image:"linear-gradient("+(90-Number(t.bg.angle||0))+"deg,"+n.map((t=>Wt(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:Qt(t.bg.scale),pos:te(t.bg),image:'url("'+Gt(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(Kt);if(!n.length)return;const r=t.bg.radius;let i;r&&"object"==typeof r&&"type"in r&&void 0!==r.value&&("fixed"===r.type?i=Ut(r.value):"relative"===r.type&&(i=Yt[r.value]));const o=Zt(t.bg.center_x),a=Zt(t.bg.center_y);return{size:void 0,pos:void 0,image:"radial-gradient("+"circle ".concat(i||"farthest-corner"," at ").concat(o," ").concat(a)+","+n.map((t=>Wt(t))).join(",")+")"}}({bg:t}):void 0)).filter(Kt).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 Yt={nearest_corner:"closest-corner",farthest_corner:"farthest-corner",nearest_side:"closest-side",farthest_side:"farthest-side"};function Zt(t){if(t&&"object"==typeof t&&"type"in t&&void 0!==t.value){if("fixed"===t.type)return Ut(t.value);if("relative"===t.type)return"".concat(100*Number(t.value),"%")}return"50%"}function Qt(t){return"fit"===t?"contain":"stretch"===t?"fill":"no_scale"===t?"none":"cover"}function te(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 ee(t){const e=/^([^/]+):\/\//.exec(t);return e&&e[1]||""}function ne(t,e){return e.has(t)}function re(t,e){e&&t.push(e)}function ie(t,e,n){const r=[];re(r,e[t]);for(const i in n)if(n.hasOwnProperty(i)){const o=n[i];o&&re(r,e["".concat(t,"_").concat(i)+("string"==typeof o?"_".concat(o):"")])}return r.join(" ")}const oe=Symbol("state");function ae(t){return Rt(t.top||0)+" "+Rt(t.right||0)+" "+Rt(t.bottom||0)+" "+Rt(t.left||0)}function se(t){if("number"!=typeof t&&"string"!=typeof t)return!1;const e=Number(t);return!isNaN(e)}function le(t){return se(t)&&t>=0}function ce(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]&&!le(n[t]))return e;return ae(t)}function ue(t,e){const n=Number(t);return isNaN(n)||n<0?e:n}const de=Object.prototype.hasOwnProperty;function pe(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 i=n[r];if(!de.call(e,i)||!pe(t[i],e[i]))return!1}return!0}function he(t,e){return pe(t,e)?e:t}function fe(t,e){return"linear"===t||"ease"===t||"ease_in_out"===t||"ease_in"===t||"ease_out"===t?t:e}function ge(t,e){const n=Number(t);return isNaN(n)?e:n}function me(t){const e=[];return"set"===t.name?(t.items||[]).forEach((t=>{e.push(...me(t))})):e.push(t),e}function ve(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]]&&!le(t[n[r]]))return e;return t}function ye(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]].map((t=>Rt((t||e)/n*10))).join(" ")}function $e(){}const be=Symbol("action");function _e(t){const e=t.touches[0];return{x:e.clientX||e.pageX,y:e.clientY||e.pageY}}function we(t){var e;let n,r,o,a,c,u,d,p;const h=t[19].default,f=g(h,t,t[18],null);let m=[{class:r=t[2]+(t[9]?" ".concat(t[6]?"divkit-bd259":"divkit-d9099"," ").concat("divkit-c016b"):"")+" "+(null!==(e=t[1])&&void 0!==e&&e.length?"divkit-f0cba":"")},{style:t[3]},{role:o=t[9]?"button":null},{tabindex:a=t[9]?0:null},t[4]],b={};for(let t=0;t<m.length;t+=1)b=i(b,m[t]);return{c(){n=z("span"),f&&f.c(),B(n,b)},m(e,r){D(e,n,r),f&&f.m(n,null),u=!0,d||(p=[_(c=t[5].call(null,n)),O(n,"click",(function(){l(t[9]?t[10]:null)&&(t[9]?t[10]:null).apply(this,arguments)})),O(n,"click",t[21]),O(n,"dblclick",(function(){var e,n;l(null!==(e=t[0])&&void 0!==e&&e.length?t[11]:null)&&(null!==(n=t[0])&&void 0!==n&&n.length?t[11]:null).apply(this,arguments)})),O(n,"touchstart",(function(){var e,n;l(null!==(e=t[1])&&void 0!==e&&e.length?t[12]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[12]:null).apply(this,arguments)})),O(n,"touchmove",(function(){var e,n;l(null!==(e=t[1])&&void 0!==e&&e.length?t[13]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[13]:null).apply(this,arguments)})),O(n,"touchend",(function(){var e,n;l(null!==(e=t[1])&&void 0!==e&&e.length?t[14]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[14]:null).apply(this,arguments)})),O(n,"touchcancel",(function(){var e,n;l(null!==(e=t[1])&&void 0!==e&&e.length?t[14]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[14]:null).apply(this,arguments)})),O(n,"keydown",t[15])],d=!0)},p(e,i){var s;t=e,f&&f.p&&(!u||262144&i)&&y(f,h,t,t[18],u?v(h,t[18],i,null):$(t[18]),null),B(n,b=At(m,[(!u||582&i&&r!==(r=t[2]+(t[9]?" ".concat(t[6]?"divkit-bd259":"divkit-d9099"," ").concat("divkit-c016b"):"")+" "+(null!==(s=t[1])&&void 0!==s&&s.length?"divkit-f0cba":"")))&&{class:r},(!u||8&i)&&{style:t[3]},(!u||512&i&&o!==(o=t[9]?"button":null))&&{role:o},(!u||512&i&&a!==(a=t[9]?0:null))&&{tabindex:a},16&i&&t[4]]))},i(t){u||(_t(f,t),u=!0)},o(t){wt(f,t),u=!1},d(t){t&&S(n),f&&f.d(t),d=!1,s(p)}}}function xe(t){var e;let n,r,o,a,c,u;const d=t[19].default,p=g(d,t,t[18],null);let h=[{href:t[7]},{target:t[8]},{style:t[3]},{class:r=t[2]+" "+(t[6]?"divkit-bd259":"divkit-d9099")+" "+(null!==(e=t[1])&&void 0!==e&&e.length?"divkit-f0cba":"")},t[4]],f={};for(let t=0;t<h.length;t+=1)f=i(f,h[t]);return{c(){n=z("a"),p&&p.c(),B(n,f)},m(e,r){D(e,n,r),p&&p.m(n,null),a=!0,c||(u=[_(o=t[5].call(null,n)),O(n,"click",t[10]),O(n,"click",t[20]),O(n,"dblclick",(function(){var e,n;l(null!==(e=t[0])&&void 0!==e&&e.length?t[11]:null)&&(null!==(n=t[0])&&void 0!==n&&n.length?t[11]:null).apply(this,arguments)})),O(n,"touchstart",(function(){var e,n;l(null!==(e=t[1])&&void 0!==e&&e.length?t[12]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[12]:null).apply(this,arguments)})),O(n,"touchmove",(function(){var e,n;l(null!==(e=t[1])&&void 0!==e&&e.length?t[13]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[13]:null).apply(this,arguments)})),O(n,"touchend",(function(){var e,n;l(null!==(e=t[1])&&void 0!==e&&e.length?t[14]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[14]:null).apply(this,arguments)})),O(n,"touchcancel",(function(){var e,n;l(null!==(e=t[1])&&void 0!==e&&e.length?t[14]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[14]:null).apply(this,arguments)})),O(n,"keydown",t[15])],c=!0)},p(e,i){var o;t=e,p&&p.p&&(!a||262144&i)&&y(p,d,t,t[18],a?v(d,t[18],i,null):$(t[18]),null),B(n,f=At(h,[(!a||128&i)&&{href:t[7]},(!a||256&i)&&{target:t[8]},(!a||8&i)&&{style:t[3]},(!a||70&i&&r!==(r=t[2]+" "+(t[6]?"divkit-bd259":"divkit-d9099")+" "+(null!==(o=t[1])&&void 0!==o&&o.length?"divkit-f0cba":"")))&&{class:r},16&i&&t[4]]))},i(t){a||(_t(p,t),a=!0)},o(t){wt(p,t),a=!1},d(t){t&&S(n),p&&p.d(t),c=!1,s(u)}}}function ke(t){let e,n,r,i;const o=[xe,we],a=[];function s(t,e){return t[7]?0:1}return e=s(t),n=a[e]=o[e](t),{c(){n.c(),r=I()},m(t,n){a[e].m(t,n),D(t,r,n),i=!0},p(t,i){let[l]=i,c=e;e=s(t),e===c?a[e].p(t,l):($t(),wt(a[c],1,1,(()=>{a[c]=null})),bt(),n=a[e],n?n.p(t,l):(n=a[e]=o[e](t),n.c()),_t(n,1),n.m(r.parentNode,r))},i(t){i||(_t(n),i=!0)},o(t){wt(n),i=!1},d(t){a[e].d(t),t&&S(r)}}}function Ee(t,e,n){let{$$slots:r={},$$scope:i}=e,{actions:o}=e,{doubleTapActions:a}=e,{longTapActions:s}=e,{cls:l=""}=e,{style:c=null}=e,{attrs:u}=e,{use:d=$e}=e,{customAction:p=null}=e,{isNativeActionAnimation:h=!0}=e;const f=tt(Tt),g=tt(be);Q(be,{hasAction:()=>Boolean(g.hasAction()||(null==o?void 0:o.length))});let m,v="",y=-1,$=null,b=!1,_=!1;return t.$$set=t=>{"actions"in t&&n(16,o=t.actions),"doubleTapActions"in t&&n(0,a=t.doubleTapActions),"longTapActions"in t&&n(1,s=t.longTapActions),"cls"in t&&n(2,l=t.cls),"style"in t&&n(3,c=t.style),"attrs"in t&&n(4,u=t.attrs),"use"in t&&n(5,d=t.use),"customAction"in t&&n(17,p=t.customAction),"isNativeActionAnimation"in t&&n(6,h=t.isNativeActionAnimation),"$$scope"in t&&n(18,i=t.$$scope)},t.$$.update=()=>{if(196736&t.$$.dirty){if(Array.isArray(o)&&(null==o?void 0:o.length))for(let t=0;t<o.length;++t){const e=o[t].url;if(e){n(7,v=e),n(8,m=o[t].target||void 0);break}}Array.isArray(o)&&(null==o?void 0:o.length)&&g.hasAction()&&(n(7,v=""),f.logError(It(new Error("Actionable element is forbidden inside other actionable element"),{level:"warn",additional:{actions:o}}))),n(9,_=Boolean(p)),v&&!ne(ee(v),f.getBuiltinProtocols())&&(n(7,v=""),n(9,_=!0))}},[a,s,l,c,u,d,h,v,m,_,async function(t){g.hasAction()||void 0!==t.button&&0!==t.button||(!1===(null==p?void 0:p(t))?t.preventDefault():o&&(o.some((t=>{const e=null==t?void 0:t.url;if(!e)return!1;const n=ee(e);return n&&!ne(n,f.getBuiltinProtocols())}))&&t.preventDefault(),f.execAnyActions(o)))},function(t){g.hasAction()||void 0!==t.button&&0!==t.button||f.execAnyActions(a,!0)},function(t){t.touches.length>1||($=_e(t),b=!1,y=Date.now())},function(t){if(!$)return;const e=_e(t);(Math.abs($.x-e.x)>8||Math.abs($.y-e.y)>8)&&(b=!0)},function(){!$||y<0||(!b&&Date.now()-y>=400&&f.execAnyActions(s,!0),$=null,y=-1)},function(t){t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||"Enter"===t.key&&Array.isArray(o)&&o.length&&(f.execAnyActions(o),t.preventDefault())},o,p,i,r,function(e){et.call(this,t,e)},function(e){et.call(this,t,e)}]}const Ce=class extends Ft{constructor(t){super(),St(this,t,Ee,ke,d,{actions:16,doubleTapActions:0,longTapActions:1,cls:2,style:3,attrs:4,use:5,customAction:17,isNativeActionAnimation:6})}};function Ae(t){return se(t)&&t>0}function Ve(t,e){return t.map((t=>{if("blur"===(null==t?void 0:t.type)){if(Ae(t.radius))return"blur(".concat(Ut(t.radius/2),")")}else e(It(new Error("Unknown filter"),{level:"warn",additional:{filter:null==t?void 0:t.type}}))})).filter(Boolean).join(" ")}function je(t,e,n){const r=t.slice();return r[5]=e[n],r}function Pe(t){let e,n,r;return{c(){e=z("span"),J(e,"class",n="divkit-b921d"),J(e,"style",r=Bt(t[5].style))},m(t,n){D(t,e,n)},p(t,n){2&n&&r!==(r=Bt(t[5].style))&&J(e,"style",r)},d(t){t&&S(e)}}}function De(t){let e,n,r,i,o,a;return{c(){e=z("img"),u(e.src,n=t[5].image_url)||J(e,"src",n),J(e,"alt",""),J(e,"aria-hidden","true"),J(e,"loading","lazy"),J(e,"decoding","async"),J(e,"class",r="divkit-b921d"),J(e,"style",i=Bt(t[5].style))},m(n,r){D(n,e,r),o||(a=O(e,"error",t[2]),o=!0)},p(t,r){2&r&&!u(e.src,n=t[5].image_url)&&J(e,"src",n),2&r&&i!==(i=Bt(t[5].style))&&J(e,"style",i)},d(t){t&&S(e),o=!1,a()}}}function Se(t){let e;function n(t,e){return t[5].image_url?De:Pe}let r=n(t),i=r(t);return{c(){i.c(),e=I()},m(t,n){i.m(t,n),D(t,e,n)},p(t,o){r===(r=n(t))&&i?i.p(t,o):(i.d(1),i=r(t),i&&(i.c(),i.m(e.parentNode,e)))},d(t){i.d(t),t&&S(e)}}}function Fe(t){let e,r,i=t[1],o=[];for(let e=0;e<i.length;e+=1)o[e]=Se(je(t,i,e));return{c(){e=z("span");for(let t=0;t<o.length;t+=1)o[t].c();J(e,"class",r="divkit-bf253"+(t[0]?" divkit-dcad7":"")),U(e,"border-radius",t[0],!1)},m(t,n){D(t,e,n);for(let t=0;t<o.length;t+=1)o[t].m(e,null)},p(t,n){let[a]=n;if(6&a){let n;for(i=t[1],n=0;n<i.length;n+=1){const r=je(t,i,n);o[n]?o[n].p(r,a):(o[n]=Se(r),o[n].c(),o[n].m(e,null))}for(;n<o.length;n+=1)o[n].d(1);o.length=i.length}1&a&&r!==(r="divkit-bf253"+(t[0]?" divkit-dcad7":""))&&J(e,"class",r),1&a&&U(e,"border-radius",t[0],!1)},i:n,o:n,d(t){t&&S(e),F(o,t)}}}function ze(t,e,n){let r,{background:i=[]}=e,{radius:o=""}=e;const a=tt(Tt);return t.$$set=t=>{"background"in t&&n(3,i=t.background),"radius"in t&&n(0,o=t.radius)},t.$$.update=()=>{8&t.$$.dirty&&n(1,r=i.map((t=>{const e={},n={style:e};if("nine_patch_image"===t.type&&t.insets)e["border-image"]='url("'.concat(t.image_url,'") ').concat(t.insets.top||0," ").concat(t.insets.right||0," ").concat(t.insets.bottom||0," ").concat(t.insets.left||0," fill"),e["border-image-width"]="auto";else{const r=Xt([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=Ve(t.filters,a.logError)))}return n})))},[o,r,function(t){t.target&&"classList"in t.target&&t.target.classList.add("divkit-cd613")},i]}const Ne=class extends Ft{constructor(t){super(),St(this,t,ze,Fe,d,{background:3,radius:0})}};function Me(t){let e,n;return e=new Ce({props:{use:t[32],cls:t[0]+" "+ie("outer",Jt,t[15]),style:Bt(t[13]),actions:t[10],doubleTapActions:t[11],longTapActions:t[12],attrs:t[6],isNativeActionAnimation:!t[4].length||Be(t[4]),$$slots:{default:[Oe]},$$scope:{ctx:t}}}),{c(){jt(e.$$.fragment)},m(t,r){Pt(e,t,r),n=!0},p(t,n){const r={};32769&n[0]&&(r.cls=t[0]+" "+ie("outer",Jt,t[15])),8192&n[0]&&(r.style=Bt(t[13])),1024&n[0]&&(r.actions=t[10]),2048&n[0]&&(r.doubleTapActions=t[11]),4096&n[0]&&(r.longTapActions=t[12]),64&n[0]&&(r.attrs=t[6]),16&n[0]&&(r.isNativeActionAnimation=!t[4].length||Be(t[4])),174&n[0]|262144&n[3]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(_t(e.$$.fragment,t),n=!0)},o(t){wt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function Te(t){let e,n;return e=new Ne({props:{background:t[5],radius:t[2]}}),{c(){jt(e.$$.fragment)},m(t,r){Pt(e,t,r),n=!0},p(t,n){const r={};32&n[0]&&(r.background=t[5]),4&n[0]&&(r.radius=t[2]),e.$set(r)},i(t){n||(_t(e.$$.fragment,t),n=!0)},o(t){wt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function Ie(t){let e,n,r;return{c(){e=z("span"),J(e,"class",n=Jt.outer__border),J(e,"style",r=Bt(t[1]))},m(t,n){D(t,e,n)},p(t,n){2&n[0]&&r!==(r=Bt(t[1]))&&J(e,"style",r)},d(t){t&&S(e)}}}function Oe(t){let e,n,r,i=t[3]&&Te(t);const o=t[110].default,a=g(o,t,t[111],null);let s=t[7]&&Ie(t);return{c(){i&&i.c(),e=I(),a&&a.c(),s&&s.c(),n=I()},m(t,o){i&&i.m(t,o),D(t,e,o),a&&a.m(t,o),s&&s.m(t,o),D(t,n,o),r=!0},p(t,l){t[3]?i?(i.p(t,l),8&l[0]&&_t(i,1)):(i=Te(t),i.c(),_t(i,1),i.m(e.parentNode,e)):i&&($t(),wt(i,1,1,(()=>{i=null})),bt()),a&&a.p&&(!r||262144&l[3])&&y(a,o,t,t[111],r?v(o,t[111],l,null):$(t[111]),null),t[7]?s?s.p(t,l):(s=Ie(t),s.c(),s.m(n.parentNode,n)):s&&(s.d(1),s=null)},i(t){r||(_t(i),_t(a,t),r=!0)},o(t){wt(i),wt(a,t),r=!1},d(t){i&&i.d(t),t&&S(e),a&&a.d(t),s&&s.d(t),t&&S(n)}}}function Je(t){let e,n,r=!t[8]&&!t[9]&&Me(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){t[8]||t[9]?r&&($t(),wt(r,1,1,(()=>{r=null})),bt()):r?(r.p(t,n),768&n[0]&&_t(r,1)):(r=Me(t),r.c(),_t(r,1),r.m(e.parentNode,e))},i(t){n||(_t(r),n=!0)},o(t){wt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Be(t){return t.some((t=>"native"===t.name))}function Re(t,e,r){let i,o,a,s,l,c,u,d,p,f,g,m,v,y,$,b,_,w,x,k,E,C,A,V,j,P,D,S,F,z,N,M,T,I,O,J,B,R,U,L,W,H=n,q=n,G=n,K=n,X=n,Y=n,Z=n,Q=n,et=n,nt=n,rt=n,it=n,ot=n,at=n,st=n,lt=n,ut=n;t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>X())),t.$$.on_destroy.push((()=>Y())),t.$$.on_destroy.push((()=>Z())),t.$$.on_destroy.push((()=>Q())),t.$$.on_destroy.push((()=>et())),t.$$.on_destroy.push((()=>nt())),t.$$.on_destroy.push((()=>rt())),t.$$.on_destroy.push((()=>it())),t.$$.on_destroy.push((()=>ot())),t.$$.on_destroy.push((()=>at())),t.$$.on_destroy.push((()=>st())),t.$$.on_destroy.push((()=>lt())),t.$$.on_destroy.push((()=>ut()));let{$$slots:dt={},$$scope:pt}=e;var ht,ft,gt,mt,vt,yt;let{json:$t={}}=e,{origJson:bt}=e,{templateContext:_t}=e,{cls:wt=""}=e,{style:xt}=e,{layoutParams:kt={}}=e,{customDescription:Et=!1}=e,{customPaddings:Ct=!1}=e,{customActions:At=""}=e,{additionalPaddings:Vt=null}=e,{heightByAspect:jt=!1}=e;const Pt={left:"start",center:"center",right:"end"},Dt={top:"start",center:"center",bottom:"end",baseline:"baseline"},St=tt(Tt),Ft=tt(oe);let zt,Nt,Mt,Ot,Jt,Bt,Lt,Ht,qt,Gt,Yt,Zt=null,Qt={},te={},re=!1,ie=1,se="transparent",de=0,pe={"top-left":0,"top-right":0,"bottom-right":0,"bottom-left":0},$e="",be=null,_e="",we={},xe=0,ke=0,Ee=0,Ce=!1,Ae=!1,Ve={},je=0,Pe=0,De=0,Se=!1,Fe=!1,ze=1;const Ne=kt.fakeElement?[]:$t.transition_triggers||["state_change","visibility_change"],Me=-1!==Ne.indexOf("state_change")&&$t.id,Te=-1!==Ne.indexOf("visibility_change")&&$t.id;let Ie,Oe,Je,Be,Re,Ue,Le,We=[],He=[],qe=[],Ge=[],Ke="";function Xe(t){const e=ge(t.start_value,1),n=ge(t.end_value,1),i=ue(t.start_delay,0),o=ue(t.duration,300),a=fe(t.interpolator,"ease_in_out").replace(/_/g,"-");switch(t.name){case"fade":return r(79,Be=e),r(80,Re=n),"opacity ".concat(o,"ms ").concat(a," ").concat(i,"ms");case"scale":return r(81,Ue=e),r(82,Le=n),"transform ".concat(o,"ms ").concat(a," ").concat(i,"ms");case"native":case"no_animation":return"";default:return St.logError(It(new Error("Unknown action_animation name"),{additional:{animation:t.name}})),""}}let Ye,Ze,Qe=!1,tn="visible",en=0,nn=0;return t.$$set=t=>{"json"in t&&r(33,$t=t.json),"origJson"in t&&r(34,bt=t.origJson),"templateContext"in t&&r(35,_t=t.templateContext),"cls"in t&&r(0,wt=t.cls),"style"in t&&r(36,xt=t.style),"layoutParams"in t&&r(37,kt=t.layoutParams),"customDescription"in t&&r(38,Et=t.customDescription),"customPaddings"in t&&r(39,Ct=t.customPaddings),"customActions"in t&&r(40,At=t.customActions),"additionalPaddings"in t&&r(41,Vt=t.additionalPaddings),"heightByAspect"in t&&r(42,jt=t.heightByAspect),"$$scope"in t&&r(111,pt=t.$$scope)},t.$$.update=()=>{if(4&t.$$.dirty[1]&&(r(31,i=St.getDerivedFromVars($t.border)),ut(),ut=h(i,(t=>r(109,W=t)))),2&t.$$.dirty[0]|8384512&t.$$.dirty[1]|65536&t.$$.dirty[3]){let t={},e={},n=!1,i="";if(W){if(W.has_shadow){const e=W.shadow;t["box-shadow"]=e?Rt((null===r(44,ft=null===r(43,ht=e.offset)||void 0===ht?void 0:ht.x)||void 0===ft?void 0:ft.value)||0)+" "+Rt((null===r(46,mt=null===r(45,gt=e.offset)||void 0===gt?void 0:gt.y)||void 0===mt?void 0:mt.value)||0)+" "+Rt(null!==r(47,vt=e.blur)&&void 0!==vt?vt:2)+" "+Wt(e.color||"#000000",null!==r(48,yt=e.alpha)&&void 0!==yt?yt:.19):"0 1px 2px 0 rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.07)"}if(W.stroke&&(n=!0,r(50,ie=ue(W.stroke.width,ie)),r(51,se=Wt(W.stroke.color,1,se)),e.border="".concat(Rt(ie)," solid ").concat(se)),W.corners_radius?(r(53,pe=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]&&!le(n[t]))return e;return t}(W.corners_radius,pe)),e["border-radius"]=t["border-radius"]=ye(pe)):W.corner_radius&&(r(52,de=ue(W.corner_radius,de)),r(53,pe={"top-left":de,"top-right":de,"bottom-right":de,"bottom-left":de}),e["border-radius"]=t["border-radius"]=Rt(de)),n&&ie&&(W.corners_radius||W.corner_radius)){let t=Object.assign({},pe);["top-left","top-right","bottom-right","bottom-left"].forEach((e=>{t[e]=(t[e]||0)+ie/2})),i=ye(t)}}r(49,Qt=he(t,Qt)),r(1,te=he(e,te)),r(7,re=n),r(2,$e=i)}if(4&t.$$.dirty[1]&&(r(30,o=St.getDerivedFromVars($t.paddings)),lt(),lt=h(o,(t=>r(108,L=t)))),8388864&t.$$.dirty[1]|32768&t.$$.dirty[3]&&r(54,be=ve(L&&!Ct?L:void 0,be)),8389632&t.$$.dirty[1]&&r(90,a=ae(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 i=t[r];i&&(n[r]=i);const o=e[r];o&&(n[r]=(n[r]||0)+o)})),n}(be,Vt))),4&t.$$.dirty[1]&&(r(29,s=St.getDerivedFromVars($t.margins)),at(),at=h(s,(t=>r(106,R=t)))),16777216&t.$$.dirty[1]|8192&t.$$.dirty[3]&&r(55,_e=ce(R,_e)),4&t.$$.dirty[1]&&(r(28,l=St.getDerivedFromVars($t.width)),it(),it=h(l,(t=>r(104,J=t)))),4&t.$$.dirty[1]&&(r(27,c=St.getDerivedFromVars($t.alignment_horizontal)),st(),st=h(c,(t=>r(107,U=t)))),570425408&t.$$.dirty[1]|26624&t.$$.dirty[3]){let t,e,n,i,o={},a=0,s=0,l=!1,c=!1;const u=null==J?void 0:J.type;if("fixed"===u)r(60,xe=ue(null==J?void 0:J.value,xe)),e=Rt(xe);else if("wrap_content"!==u&&(kt.overlapParent||"match_parent"!==u&&u||!kt.parentHorizontalWrapContent))t="parent","vertical"===kt.parentContainerOrientation&&kt.parentContainerWrap&&(c=!0,St.logError(It(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"vertical"===kt.parentLayoutOrientation?e="calc(100% - ".concat(Ut(((null==R?void 0:R.left)||0)+((null==R?void 0:R.right)||0)),")"):"horizontal"===kt.parentContainerOrientation&&(a=J&&"weight"in J&&J.weight||1,kt.parentContainerWrap&&(l=!0));else{if(t="content",("wrap_content"===u&&(null==J?void 0:J.constrained)||("match_parent"===u||!u)&&kt.parentHorizontalWrapContent)&&(o["width-constrained"]=!0,"horizontal"===kt.parentContainerOrientation&&(s=1)),"wrap_content"===u){const t=J;t.min_size&&le(t.min_size.value)&&(n=Rt(t.min_size.value)),t.max_size&&le(t.max_size.value)&&(i=Rt(t.max_size.value))}"match_parent"!==u&&u||St.logError(It(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))}if("parent"===t)o["halign-self"]="stretch";else{const t=U;o["halign-self"]="left"===t||"center"===t||"right"===t?Pt[t]:kt.parentHAlign||"start"}t&&(o.width=t),r(57,Mt=e),r(58,Ot=n),r(59,Jt=i),r(61,ke=a),r(62,Ee=s),r(56,we=he(o,we)),r(63,Ce=l),r(8,Ae=c)}if(4&t.$$.dirty[1]&&(r(26,u=St.getDerivedFromVars($t.height)),rt(),rt=h(u,(t=>r(103,O=t)))),4&t.$$.dirty[1]&&(r(25,d=St.getDerivedFromVars($t.alignment_vertical)),ot(),ot=h(d,(t=>r(105,B=t)))),2112&t.$$.dirty[1]|68&t.$$.dirty[2]|13312&t.$$.dirty[3]){let t,e,n,i,o={},a=0,s=0,l=!1,c=!1;const u=null==O?void 0:O.type;if(jt);else if("fixed"===u)r(68,je=ue(null==O?void 0:O.value,je)),e=Rt(je);else if("match_parent"!==u||!kt.overlapParent&&kt.parentVerticalWrapContent){if(t="content",("wrap_content"===u&&(null==O?void 0:O.constrained)||"match_parent"===u&&kt.parentVerticalWrapContent)&&(o["height-constrained"]=!0,"vertical"===kt.parentContainerOrientation&&(s=1)),"wrap_content"===u){const t=O;(null==t?void 0:t.min_size)&&le(t.min_size.value)&&(n=Rt(t.min_size.value)),(null==t?void 0:t.max_size)&&le(t.max_size.value)&&(i=Rt(t.max_size.value))}"match_parent"===u&&St.logError(It(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))}else t="parent","horizontal"===kt.parentContainerOrientation&&kt.parentContainerWrap&&(c=!0,St.logError(It(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"horizontal"===kt.parentLayoutOrientation?e="calc(100% - ".concat(Ut(((null==R?void 0:R.top)||0)+((null==R?void 0:R.bottom)||0)),")"):"vertical"===kt.parentContainerOrientation&&(a=(null==O?void 0:O.weight)||1,kt.parentContainerWrap&&(l=!0));if("parent"===t)o["valign-self"]="stretch";else{const t=B;"top"===t||"center"===t||"bottom"===t||"baseline"===t&&"horizontal"===kt.parentContainerOrientation?o["valign-self"]=Dt[t]:o["valign-self"]=kt.parentVAlign||"start"}t&&(o.height=t),r(65,Bt=e),r(66,Lt=n),r(67,Ht=i),r(69,Pe=a),r(70,De=s),r(64,Ve=he(o,Ve)),r(71,Se=l),r(9,Fe=c)}var e,n;if(64&t.$$.dirty[1]&&r(93,p=!!kt.overlapParent||void 0),64&t.$$.dirty[1]|3072&t.$$.dirty[3]&&r(92,f=kt.overlapParent&&(!J||"match_parent"===J.type)&&"match_parent"===(null==O?void 0:O.type)),64&t.$$.dirty[1]&&r(91,g=kt.gridArea?"".concat(kt.gridArea.y+1,"/").concat(kt.gridArea.x+1,"/span ").concat(kt.gridArea.rowSpan,"/span ").concat(kt.gridArea.colSpan):void 0),4&t.$$.dirty[1]&&(r(24,m=St.getDerivedFromVars($t.alpha)),nt(),nt=h(m,(t=>r(102,I=t)))),1024&t.$$.dirty[2]|512&t.$$.dirty[3]&&(r(72,(n=ze,ze=!le(e=I)||void 0===e||e>1?n:Number(e))),r(73,qt=1===ze?void 0:ze)),4&t.$$.dirty[1]&&(r(23,v=St.getDerivedFromVars($t.accessibility)),et(),et=h(v,(t=>r(101,T=t)))),128&t.$$.dirty[1]|256&t.$$.dirty[3]&&(r(6,Nt=void 0),T&&!Et&&T.description&&(r(6,Nt={}),r(6,Nt["aria-label"]=T.description,Nt))),4&t.$$.dirty[1]&&(r(22,y=St.getDerivedFromVars($t.background)),Q(),Q=h(y,(t=>r(5,M=t)))),44&t.$$.dirty[0]&&(r(74,Gt={}),r(3,Yt=!1),M&&(r(3,Yt=M.some((t=>"image"===t.type||"nine_patch_image"===t.type))||Boolean($e)),!Yt))){const t=Xt(M);r(74,Gt["background-color"]=t.color,Gt),r(74,Gt["background-image"]=t.image,Gt),r(74,Gt["background-size"]=t.size,Gt),r(74,Gt["background-position"]=t.position,Gt),r(74,Gt["background-repeat"]="no-repeat",Gt)}if(4&t.$$.dirty[1]&&(r(75,Ie=void 0),Me&&$t.transition_in&&St.isRunning("stateChange")&&r(75,Ie=!0)),4&t.$$.dirty[1]&&(r(77,Je=void 0),Me&&$t.transition_change&&St.isRunning("stateChange")&&Ft.hasTransitionChange($t.id)&&r(77,Je=!0)),4&t.$$.dirty[1]&&(r(21,$=St.getDerivedFromVars($t.action)),Y(),Y=h($,(t=>r(99,z=t)))),4&t.$$.dirty[1]&&(r(20,b=St.getDerivedFromVars($t.actions)),Z(),Z=h(b,(t=>r(100,N=t)))),4&t.$$.dirty[1]&&(r(19,_=St.getDerivedFromVars($t.doubletap_actions)),X(),X=h(_,(t=>r(98,F=t)))),4&t.$$.dirty[1]&&(r(18,w=St.getDerivedFromVars($t.longtap_actions)),K(),K=h(w,(t=>r(97,S=t)))),576&t.$$.dirty[1]|240&t.$$.dirty[3]){let t=N||z&&[z]||[],e=F||[],n=S||[];kt.fakeElement?(t=[],e=[],n=[]):(Array.isArray(t)||(t=[],St.logError(It(new Error("Actions should be array")))),Array.isArray(e)||(e=[],St.logError(It(new Error("DoubleTapActions should be array")))),Array.isArray(n)||(n=[],St.logError(It(new Error("LongTapActions should be array"))))),(t.length||e.length||n.length)&&At&&(t=[],e=[],n=[],St.logError(It(new Error('Cannot use action on component "'.concat(At,'"'))))),r(10,We=t),r(11,He=e),r(12,qe=n)}if(4&t.$$.dirty[1]&&(r(17,x=St.getDerivedFromVars($t.action_animation)),G(),G=h(x,(t=>r(96,D=t)))),16&t.$$.dirty[0]|8&t.$$.dirty[3]&&D&&(r(4,Ge=me(D)),r(78,Ke=Ge.map(Xe).filter(Boolean).join(", "))),4&t.$$.dirty[1]&&(r(16,k=St.getDerivedFromVars($t.visibility)),q(),q=h(k,(t=>r(95,P=t)))),6291456&t.$$.dirty[2]|4&t.$$.dirty[3]){const t=tn,e=function(t,e){return"visible"===t||"invisible"===t||"gone"===t?t:e}(P,tn);t!==e&&(!Qe||"visible"!==tn&&"visible"!==e?r(84,tn=e):async function(t){r(84,tn=t);const e="visible"===t?"in":"out",n="in"===e?$t.transition_in:$t.transition_out;Te&&n&&(await ct(),"in"===e&&r(76,Oe=!0),Ft.runVisibilityTransition(Object.assign(Object.assign({},$t),{visibility:"visible"}),_t,n,zt,e).then((()=>{"in"===e&&r(76,Oe=!1)})).catch((t=>{throw"in"===e&&r(76,Oe=!1),t})))}(e)),Qe||r(83,Qe=!0)}if(33554496&t.$$.dirty[1]|1078059012&t.$$.dirty[2]|1&t.$$.dirty[3]&&r(15,E=Object.assign(Object.assign(Object.assign({},we),Ve),{"parent-overlap":p,"parent-overlap-absolute":f,"scroll-snap":kt.scrollSnap,"hide-on-transition-in":Ie||Oe||Je,visibility:tn,"has-action-animation":Boolean(Ke),"parent-flex":kt.parentContainerOrientation||void 0,"parent-grid":Boolean(kt.gridArea)||void 0})),4&t.$$.dirty[1]&&(r(14,C=St.getDerivedFromVars($t.transform)),H(),H=h(C,(t=>r(94,j=t)))),25165824&t.$$.dirty[2]|2&t.$$.dirty[3]&&j&&void 0!==j.rotation){const t=j.pivot_x||{type:"pivot-percentage",value:50};r(85,en=ge(t.value,en));const e="pivot-fixed"===t.type?Rt(en):"".concat(en,"%"),n=j.pivot_y||{type:"pivot-percentage",value:50};r(86,nn=ge(n.value,nn));const i="pivot-fixed"===n.type?Rt(nn):"".concat(nn,"%");r(87,Ye="".concat(e," ").concat(i)),r(88,Ze="rotate(".concat(j.rotation,"deg)"))}1073741824&t.$$.dirty[1]|642&t.$$.dirty[2]&&r(89,A=Ce||Se?"100%":ke||Pe?0:void 0),1560543264&t.$$.dirty[1]|1042225593&t.$$.dirty[2]&&r(13,V=Object.assign(Object.assign(Object.assign(Object.assign({},xt),Gt),Qt),{width:Mt,"min-width":Ot,"max-width":Jt,height:Bt,"min-height":Lt,"max-height":Ht||(null==xt?void 0:xt["max-height"]),"grid-area":g,padding:a,margin:_e,opacity:qt,transition:Ke,"transform-origin":Ye,transform:Ze,"flex-grow":ke||Pe||void 0,"flex-shrink":Ee||De?1:void 0,"flex-basis":A,"--divkit-animation-opacity-start":Be,"--divkit-animation-opacity-end":Re,"--divkit-animation-scale-start":Ue,"--divkit-animation-scale-end":Le}))},[wt,te,$e,Yt,Ge,M,Nt,re,Ae,Fe,We,He,qe,V,C,E,k,x,w,_,b,$,y,v,m,d,u,c,l,s,o,i,function(t){zt=t,Me&&$t.transition_in&&Ft.registerChildWithTransitionIn($t,_t,$t.transition_in,t).then((()=>{r(75,Ie=!1)})).catch((t=>{throw r(75,Ie=!1),t})),Me&&$t.transition_out&&Ft.registerChildWithTransitionOut($t,_t,$t.transition_out,t),Me&&$t.transition_change&&Ft.registerChildWithTransitionChange($t,_t,$t.transition_change,t).then((()=>{r(77,Je=!1)})).catch((t=>{throw r(77,Je=!1),t}));const e=kt.fakeElement?[]:$t.visibility_actions||$t.visibility_action&&[$t.visibility_action];Array.isArray(e)&&e.length&&function(t,e){let{visibilityActions:n,rootCtx:r}=e;const i=n.map(((t,e)=>({index:e,action:t,visible:!1,count:0,finished:!1}))),o=n.map((t=>r.getJsonWithVars({visibility_percentage:t.visibility_percentage,visibility_duration:t.visibility_duration,log_limit:t.log_limit}))),a=[...new Set([...n.map(((t,e)=>(o[e].visibility_percentage||50)/100))])];new IntersectionObserver((t=>{t.forEach((t=>{i.forEach((e=>{const n=t.intersectionRatio>=(e.action.visibility_percentage||50)/100;!e.visible&&n?e.finished||(e.timer=setTimeout((()=>{++e.count;const t=o[e.index],n=0===t.log_limit?1/0:t.log_limit||1;++e.count>=n&&(e.finished=!0);const i=r.getJsonWithVars(e.action),a=i.url;if(a){const t=ee(a);t&&!ne(t,r.getBuiltinProtocols())&&("div-action"===t?r.execAction(i):i.log_id&&r.execCustomAction(i))}r.logStat("visible",i)}),o[e.index].visibility_duration||800)):n||e.timer&&clearTimeout(e.timer),e.visible=n}))}))}),{threshold:a}).observe(t)}(t,{visibilityActions:e,rootCtx:St});const n=$t.id;n&&Ft.registerChild(n);let i=null;if(Array.isArray($t.extensions)){const e=St.getExtensionContext();Zt=$t.extensions.map((n=>{var r;const i=St.getExtension(n.id,n.params);return i&&(null===(r=i.mountView)||void 0===r||r.call(i,t,e)),i})).filter(Kt)}return{destroy(){if(n&&Ft.unregisterChild(n),Zt){const e=St.getExtensionContext();Zt.forEach((n=>{var r;null===(r=n.unmountView)||void 0===r||r.call(n,t,e)})),Zt=null}i&&i.destroy()}}},$t,bt,_t,xt,kt,Et,Ct,At,Vt,jt,ht,ft,gt,mt,vt,yt,Qt,ie,se,de,pe,be,_e,we,Mt,Ot,Jt,xe,ke,Ee,Ce,Ve,Bt,Lt,Ht,je,Pe,De,Se,ze,qt,Gt,Ie,Oe,Je,Ke,Be,Re,Ue,Le,Qe,tn,en,nn,Ye,Ze,A,a,g,f,p,j,P,D,S,F,z,N,T,I,O,J,B,R,U,L,W,dt,pt]}const Ue=class extends Ft{constructor(t){super(),St(this,t,Re,Je,d,{json:33,origJson:34,templateContext:35,cls:0,style:36,layoutParams:37,customDescription:38,customPaddings:39,customActions:40,additionalPaddings:41,heightByAspect:42},null,[-1,-1,-1,-1])}},Le={"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 We(t,e){const n=Number(t);return isNaN(n)||n<=0?e:n}function He(t){if("light"===t||"medium"===t||"bold"===t||"regular"===t)return"medium"===t?500:"bold"===t?700:"light"===t?300:400}function qe(t,e){return He(t)||e}function Ge(t){let e,n;return{c(){e=z("span"),J(e,"class",n=Le["text-range__top-offset"]),U(e,"margin-top",t[4],!1)},m(t,n){D(t,e,n)},p(t,n){16&n&&U(e,"margin-top",t[4],!1)},d(t){t&&S(e)}}}function Ke(t){let e;return{c(){e=M(t[0])},m(t,n){D(t,e,n)},p(t,n){1&n&&R(e,t[0])},d(t){t&&S(e)}}}function Xe(t){let e,n,r,i=t[4]&&Ge(t);return n=new Ce({props:{cls:ie("text-range",Le,t[3]),actions:t[1],style:Bt(t[2]),$$slots:{default:[Ke]},$$scope:{ctx:t}}}),{c(){i&&i.c(),e=I(),jt(n.$$.fragment)},m(t,o){i&&i.m(t,o),D(t,e,o),Pt(n,t,o),r=!0},p(t,r){let[o]=r;t[4]?i?i.p(t,o):(i=Ge(t),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null);const a={};8&o&&(a.cls=ie("text-range",Le,t[3])),2&o&&(a.actions=t[1]),4&o&&(a.style=Bt(t[2])),524289&o&&(a.$$scope={dirty:o,ctx:t}),n.$set(a)},i(t){r||(_t(n.$$.fragment,t),r=!0)},o(t){wt(n.$$.fragment,t),r=!1},d(t){i&&i.d(t),t&&S(e),Dt(n,t)}}}function Ye(t,e,n){let r,i,o,a,s;var l,c;let u,{text:d}=e,{rootFontSize:p}=e,{textStyles:h={}}=e,{singleline:f=!1}=e,{actions:g}=e,m="none",v=12,y=1.25,$="",b="",_=null;return t.$$set=t=>{"text"in t&&n(0,d=t.text),"rootFontSize"in t&&n(5,p=t.rootFontSize),"textStyles"in t&&n(6,h=t.textStyles),"singleline"in t&&n(7,f=t.singleline),"actions"in t&&n(1,g=t.actions)},t.$$.update=()=>{if(64&t.$$.dirty){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")),n(10,m=t)}2112&t.$$.dirty&&n(11,v=We(h.font_size,v)),2112&t.$$.dirty&&Ae(h.line_height)&&n(12,y=Number(h.line_height)/v),64&t.$$.dirty&&le(h.letter_spacing)&&n(13,$=Rt(h.letter_spacing)),16448&t.$$.dirty&&n(14,u=qe(h.font_weight,u)),32832&t.$$.dirty&&n(15,b=Wt(h.text_color,1,b)),64&t.$$.dirty&&n(4,r=h.top_offset?Rt(h.top_offset):""),64&t.$$.dirty&&n(18,i=h.background?Xt([h.background]):null),320&t.$$.dirty&&((null===n(8,l=h.border)||void 0===l?void 0:l.stroke)&&"transparent"!==Wt(h.border.stroke.color)&&Ae(h.border.stroke.width)?n(16,_={color:h.border.stroke.color,width:h.border.stroke.width}):n(16,_=null)),576&t.$$.dirty&&n(17,o=We(null===n(9,c=h.border)||void 0===c?void 0:c.corner_radius,0)),1152&t.$$.dirty&&n(3,a={singleline:f,decoration:m}),522272&t.$$.dirty&&n(2,s={"font-size":Rt(10*v/p),"line-height":y,"letter-spacing":$,"font-weight":u,color:b,background:(null==i?void 0:i.color)||void 0,"box-shadow":_?"inset 0 0 0 ".concat(Rt(_.width)," ").concat(_.color):void 0,"border-radius":o?Rt(o):void 0})},[d,g,s,a,r,p,h,f,l,c,m,v,y,$,u,b,_,o,i]}const Ze=class extends Ft{constructor(t){super(),St(this,t,Ye,Xe,d,{text:0,rootFontSize:5,textStyles:6,singleline:7,actions:1})}};function Qe(t,e){return"left"===t||"center"===t||"right"===t?t:e}function tn(t,e){return"top"===t||"center"===t||"bottom"===t||"baseline"===t?t:e}function en(t,e){return"source_in"===t||"source_atop"===t||"darken"===t||"lighten"===t||"multiply"===t||"screen"===t?t:e}const{Boolean:nn}=Et;function rn(t,e,n){const r=t.slice();return r[55]=e[n],r[57]=n,r}function on(t){let e,n;return e=new Ue({props:{cls:ie("text",Ot,t[13])+" "+(t[6]?"":"divkit-c016b"),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[pn]},$$scope:{ctx:t}}}),{c(){jt(e.$$.fragment)},m(t,r){Pt(e,t,r),n=!0},p(t,n){const r={};8256&n[0]&&(r.cls=ie("text",Ot,t[13])+" "+(t[6]?"":"divkit-c016b")),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),134225584&n[0]|134217728&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(_t(e.$$.fragment,t),n=!0)},o(t){wt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function an(t){let e,n;return e=new Ze({props:{text:t[4],rootFontSize:t[5],textStyles:t[27],singleline:t[7]}}),{c(){jt(e.$$.fragment)},m(t,r){Pt(e,t,r),n=!0},p(t,n){const r={};16&n[0]&&(r.text=t[4]),32&n[0]&&(r.rootFontSize=t[5]),134217728&n[0]&&(r.textStyles=t[27]),128&n[0]&&(r.singleline=t[7]),e.$set(r)},i(t){n||(_t(e.$$.fragment,t),n=!0)},o(t){wt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function sn(t){let e,n,r=t[10],i=[];for(let e=0;e<r.length;e+=1)i[e]=dn(rn(t,r,e));const o=t=>wt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=I()},m(t,r){for(let e=0;e<i.length;e+=1)i[e].m(t,r);D(t,e,r),n=!0},p(t,n){if(268437152&n[0]){let a;for(r=t[10],a=0;a<r.length;a+=1){const o=rn(t,r,a);i[a]?(i[a].p(o,n),_t(i[a],1)):(i[a]=dn(o),i[a].c(),_t(i[a],1),i[a].m(e.parentNode,e))}for($t(),a=r.length;a<i.length;a+=1)o(a);bt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)_t(i[t]);n=!0}},o(t){i=i.filter(nn);for(let t=0;t<i.length;t+=1)wt(i[t]);n=!1},d(t){F(i,t),t&&S(e)}}}function ln(t){let e,r,i,o,a,s,l,c;return{c(){e=z("span"),r=z("img"),J(r,"class",i=Ot.text__image),u(r.src,o=t[55].image.url)||J(r,"src",o),J(r,"loading","lazy"),J(r,"decoding","async"),J(r,"aria-hidden","true"),J(r,"alt",""),J(r,"style",a=Bt({width:t[55].image.width,height:t[55].image.height,"margin-top":t[9]?"-".concat(t[55].image.height):void 0,"margin-bottom":t[9]?"-".concat(t[55].image.height):void 0,filter:t[55].image.svgFilterId?"url(#".concat(t[55].image.svgFilterId,")"):void 0})),J(e,"style",s=Bt(t[55].image.wrapperStyle))},m(n,i){D(n,e,i),V(e,r),l||(c=O(r,"error",t[28]),l=!0)},p(t,n){1024&n[0]&&!u(r.src,o=t[55].image.url)&&J(r,"src",o),1536&n[0]&&a!==(a=Bt({width:t[55].image.width,height:t[55].image.height,"margin-top":t[9]?"-".concat(t[55].image.height):void 0,"margin-bottom":t[9]?"-".concat(t[55].image.height):void 0,filter:t[55].image.svgFilterId?"url(#".concat(t[55].image.svgFilterId,")"):void 0}))&&J(r,"style",a),1024&n[0]&&s!==(s=Bt(t[55].image.wrapperStyle))&&J(e,"style",s)},i:n,o:n,d(t){t&&S(e),l=!1,c()}}}function cn(t){let e,n,r=t[55].text&&un(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){t[55].text?r?(r.p(t,n),1024&n[0]&&_t(r,1)):(r=un(t),r.c(),_t(r,1),r.m(e.parentNode,e)):r&&($t(),wt(r,1,1,(()=>{r=null})),bt())},i(t){n||(_t(r),n=!0)},o(t){wt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function un(t){let e,n;return e=new Ze({props:{text:t[55].text,rootFontSize:t[5],textStyles:t[55].textStyles,singleline:t[7],actions:t[55].actions}}),{c(){jt(e.$$.fragment)},m(t,r){Pt(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.text=t[55].text),32&n[0]&&(r.rootFontSize=t[5]),1024&n[0]&&(r.textStyles=t[55].textStyles),128&n[0]&&(r.singleline=t[7]),1024&n[0]&&(r.actions=t[55].actions),e.$set(r)},i(t){n||(_t(e.$$.fragment,t),n=!0)},o(t){wt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function dn(t){let e,n,r,i;const o=[cn,ln],a=[];function s(t,e){return"text"in t[55]?0:t[55].image?1:-1}return~(e=s(t))&&(n=a[e]=o[e](t)),{c(){n&&n.c(),r=I()},m(t,n){~e&&a[e].m(t,n),D(t,r,n),i=!0},p(t,i){let l=e;e=s(t),e===l?~e&&a[e].p(t,i):(n&&($t(),wt(a[l],1,1,(()=>{a[l]=null})),bt()),~e?(n=a[e],n?n.p(t,i):(n=a[e]=o[e](t),n.c()),_t(n,1),n.m(r.parentNode,r)):n=null)},i(t){i||(_t(n),i=!0)},o(t){wt(n),i=!1},d(t){~e&&a[e].d(t),t&&S(r)}}}function pn(t){let e,n,r,i,o,a;const s=[sn,an],l=[];function c(t,e){return t[10].length?0:1}return n=c(t),r=l[n]=s[n](t),{c(){e=z("span"),r.c(),J(e,"class",i=ie("text__inner",Ot,t[12])),J(e,"style",o=Bt(t[11]))},m(t,r){D(t,e,r),l[n].m(e,null),a=!0},p(t,u){let d=n;n=c(t),n===d?l[n].p(t,u):($t(),wt(l[d],1,1,(()=>{l[d]=null})),bt(),r=l[n],r?r.p(t,u):(r=l[n]=s[n](t),r.c()),_t(r,1),r.m(e,null)),(!a||4096&u[0]&&i!==(i=ie("text__inner",Ot,t[12])))&&J(e,"class",i),(!a||2048&u[0]&&o!==(o=Bt(t[11])))&&J(e,"style",o)},i(t){a||(_t(r),a=!0)},o(t){wt(r),a=!1},d(t){t&&S(e),l[n].d()}}}function hn(t){let e,n,r=!t[8]&&on(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){t[8]?r&&($t(),wt(r,1,1,(()=>{r=null})),bt()):r?(r.p(t,n),256&n[0]&&_t(r,1)):(r=on(t),r.c(),_t(r,1),r.m(e.parentNode,e))},i(t){n||(_t(r),n=!0)},o(t){wt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function fn(t,e,r){let i,o,a,s,l,c,u,d,p,f,g,m,v,y,$,b,_,w,x,k,E,C,A,V,j,P,D,S,F,z,N,M,T,I=n,O=n,J=n,B=n,R=n,U=n,L=n,W=n,H=n,q=n,G=n,K=n,X=n;t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>X()));let{json:Y={}}=e,{templateContext:Q}=e,{origJson:et}=e,{layoutParams:nt}=e;const rt=tt(Tt);let it=!1,ot="",at=12,st=1.25,lt=!1,ct="",ut="",dt=!1,pt="left",ht="top",ft="",gt="",mt=!1,vt=[],yt=[];return Z((()=>{yt.forEach((t=>{let[e,n]=t;rt.removeSvgFilter(e,n)}))})),t.$$set=t=>{"json"in t&&r(0,Y=t.json),"templateContext"in t&&r(1,Q=t.templateContext),"origJson"in t&&r(2,et=t.origJson),"layoutParams"in t&&r(3,nt=t.layoutParams)},t.$$.update=()=>{var e,n;if(1&t.$$.dirty[0]&&(r(26,i=rt.getDerivedFromVars(Y.text)),X(),X=h(i,(t=>r(51,T=t)))),16&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&(r(4,(e=T,n=ot,ot=String(null!=e?e:"")||n)),ot?r(8,it=!1):(r(8,it=!0),rt.logError(It(new Error('Missing "text" prop for div "text"'))))),1&t.$$.dirty[0]&&(r(25,o=rt.getDerivedFromVars(Y.ranges)),O(),O=h(o,(t=>r(41,C=t)))),1&t.$$.dirty[0]&&(r(24,a=rt.getDerivedFromVars(Y.images)),I(),I=h(a,(t=>r(40,E=t)))),1&t.$$.dirty[0]&&(r(23,s=rt.getDerivedFromVars({font_size:Y.font_size,letter_spacing:Y.letter_spacing,font_weight:Y.font_weight,text_color:Y.text_color,underline:Y.underline,strike:Y.strike,line_height:Y.line_height})),J(),J=h(s,(t=>r(27,A=t)))),1&t.$$.dirty[0]&&(r(22,l=rt.getDerivedFromVars(Y.font_size)),K(),K=h(l,(t=>r(50,M=t)))),32&t.$$.dirty[0]|524288&t.$$.dirty[1]&&r(5,at=We(M,at)),1&t.$$.dirty[0]&&(r(21,c=rt.getDerivedFromVars(Y.line_height)),G(),G=h(c,(t=>r(49,N=t)))),32&t.$$.dirty[0]|262144&t.$$.dirty[1]){const t=N;Ae(t)?(r(29,st=Number(t)/at),r(9,lt=!0)):r(9,lt=!1)}if(1&t.$$.dirty[0]&&(r(20,u=rt.getDerivedFromVars(Y.max_lines)),W(),W=h(u,(t=>r(46,S=t)))),32768&t.$$.dirty[1]&&r(7,d=1===S),536870912&t.$$.dirty[0]|34304&t.$$.dirty[1]){let t="",e="",n=!1;if(S&&S>1){let r=Number(S);t=r*st+"em",C||E||(e=r,n=!0)}r(30,ct=t),r(31,ut=e),r(32,dt=n)}if(1&t.$$.dirty[0]&&(r(19,p=rt.getDerivedFromVars(Y.text_alignment_horizontal)),q(),q=h(p,(t=>r(48,z=t)))),131076&t.$$.dirty[1]&&r(33,pt=Qe(z,pt)),1&t.$$.dirty[0]&&(r(18,f=rt.getDerivedFromVars(Y.text_alignment_vertical)),H(),H=h(f,(t=>r(47,F=t)))),65544&t.$$.dirty[1]&&r(34,ht=tn(F,ht)),16&t.$$.dirty[0]|1024&t.$$.dirty[1]&&r(39,g=!C||ot&&1===C.length&&C[0]&&0===C[0].start&&"number"==typeof C[0].end&&C[0].end>=ot.length),1&t.$$.dirty[0]&&(r(17,m=rt.getDerivedFromVars(Y.text_color)),L(),L=h(m,(t=>r(45,D=t)))),17408&t.$$.dirty[1]&&r(38,v=Boolean(D)!==Boolean(C&&C[0]&&C[0].text_color)),50576&t.$$.dirty[1]){let t="";S&&g&&v&&(t=Wt(D||C&&C[0]&&C[0].text_color,1,ft)),r(35,ft=t)}if(1&t.$$.dirty[0]&&(r(16,y=rt.getDerivedFromVars(Y.truncate)),U(),U=h(y,(t=>r(44,P=t)))),8192&t.$$.dirty[1]&&r(37,$="none"===P?"none":""),1&t.$$.dirty[0]&&(r(15,b=rt.getDerivedFromVars(Y.text_gradient)),R(),R=h(b,(t=>r(43,j=t)))),4096&t.$$.dirty[1]){let t="";if(j){const e=Xt([j]);e.image&&(t=e.image)}r(36,gt=t)}1&t.$$.dirty[0]&&(r(14,_=rt.getDerivedFromVars(Y.selectable)),B(),B=h(_,(t=>r(42,V=t)))),64&t.$$.dirty[0]|2048&t.$$.dirty[1]&&r(6,mt=function(t,e){return 1===t||0===t||!1===t||!0===t?Boolean(t):e}(V,mt)),16&t.$$.dirty[0]|1536&t.$$.dirty[1]&&function(t,e,n){let i=[];if(yt.forEach((t=>{let[e,n]=t;rt.removeSvgFilter(e,n)})),yt=[],!(Array.isArray(e)&&e.length||Array.isArray(n)&&n.length&&t))return void r(10,vt=[]);const o=t;let a=e||[{start:0,end:o.length}],s=n||[],l=0,c=[],u=[];a.forEach((t=>{void 0!==t.start&&void 0!==t.end&&(u.push({index:t.start,range:t,type:"rangeStart",isStart:!0}),u.push({index:t.end,range:t,type:"rangeEnd"}))})),s.forEach(((t,e)=>{void 0!==t.start&&t.url&&t.start<=o.length&&u.push({index:t.start,image:t,type:"image",arrayIndex:e})})),u.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)),u.forEach((t=>{var e;let n="image"===t.type?null:t.range,r=t.index;if(r>l){let n=Object.assign(Object.assign({},A),...c);i.push({text:o.substring(l,r),textStyles:n,actions:"rangeEnd"===t.type&&(null===(e=t.range)||void 0===e?void 0:e.actions)||void 0})}if("rangeStart"===t.type&&n)c.push(n);else if("rangeEnd"===t.type)c=c.filter((e=>e!==t.range));else if("image"===t.type){let e=Object.assign(Object.assign({},A),...c),n=Rt(10*(t.image.width&&t.image.width.value||20)/(e.font_size||12)),r=Rt(10*(t.image.height&&t.image.height.value||20)/(e.font_size||12));const o={"font-size":Rt(10*(Number(e.font_size)||12)/at)};let a="";const s=t.image.tint_color,l=en(t.image.tint_mode,"source_in");if(s){const e=Wt(t.image.tint_color);a=rt.addSvgFilter(e,l),yt.push([e,l])}i.push({image:{url:t.image.url,width:n,height:r,wrapperStyle:o,svgFilterId:a}})}l=r})),l<o.length&&i.push({text:o.substring(l),textStyles:Object.assign({},A)}),r(10,vt=i)}(ot,C,E),128&t.$$.dirty[0]|78&t.$$.dirty[1]&&r(13,w={singleline:d,multiline:dt,halign:pt,valign:ht,truncate:$}),32&t.$$.dirty[1]&&r(12,x={gradient:Boolean(gt)}),1610612768&t.$$.dirty[0]|49&t.$$.dirty[1]&&r(11,k={"font-size":Rt(at),"line-height":st,"max-height":ct,"-webkit-line-clamp":ut,color:ft,"background-image":gt})},[Y,Q,et,nt,ot,at,mt,d,it,lt,vt,k,x,w,_,b,y,m,f,p,u,c,l,s,a,o,i,A,function(t){t.target&&"classList"in t.target&&t.target.classList.add(Ot.text__image_hidden)},st,ct,ut,dt,pt,ht,ft,gt,$,v,g,E,C,V,j,P,D,S,F,z,N,M,T]}const gn={container:"divkit-d37d6",container_wrap:"divkit-c8551",container_orientation_vertical:"divkit-ddc33",container_valign_top:"divkit-a331a",container_valign_center:"divkit-aae61",container_valign_bottom:"divkit-c2226",container_orientation_horizontal:"divkit-fe458",container_halign_left:"divkit-a3091",container_halign_center:"divkit-bac9d",container_halign_right:"divkit-f4230",container_orientation_overlap:"divkit-a644d"};function mn(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)i=t.shape,r={width:Number((null===(o=i.item_width)||void 0===o?void 0:o.value)||10),height:Number((null===(a=i.item_height)||void 0===a?void 0:a.value)||10),radius:Number(null!==(s=null===(l=i.corner_radius)||void 0===l?void 0:l.value)&&void 0!==s?s:5)};else{if("circle"!==t.shape.type)return n;r=function(t){var e;const n=2*Number((null===(e=t.radius)||void 0===e?void 0:e.value)||10);return{width:n,height:n,radius:n}}(t.shape)}var i,o,a,s,l;return function(t,e,n){var r;const i={},o=e.stroke||(null==n?void 0:n.stroke),a=null!=o&&o.color?Wt(o.color):"",s=null!=o&&o.width?Number(null!==(r=o.width)&&void 0!==r?r:1):"";i.width=t.width,i.height=t.height,i.borderRadius=t.radius;const l=e.background_color||(null==n?void 0:n.color);return i.background=Wt(l),a&&s&&(i.boxShadow="inset 0 0 0 ".concat(Rt(s)," ").concat(a)),i}(r,t.shape,{color:t.color,stroke:t.stroke})}function vn(t,e,n){null!=e&&e.show_at_start&&(n?t.top=e.style.height:t.left=e.style.width),null!=e&&e.show_at_end&&(n?t.bottom=e.style.height:t.right=e.style.width)}function yn(t,e,n){let r;return r="horizontal"===t?[null!=n&&n.show_between?n.style.height:0,null!=e&&e.show_between?e.style.width:0]:[null!=e&&e.show_between?e.style.height:0,null!=n&&n.show_between?n.style.width:0],r.map(Rt).join(" ")}let $n;function bn(){if(void 0!==$n)return $n;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),$n=1===t.scrollHeight,document.body.removeChild(t),$n}function _n(t,e,n){const r=t.slice();return r[13]=e[n],r}function wn(t){let e,n,r,i,o,a="".concat(t[13].style.width,"px"),s="".concat(t[13].style.height,"px"),l="".concat(t[13].style.borderRadius,"px"),c="".concat(t[13].left,"px"),u="".concat(t[13].top,"px"),d="".concat(t[13].width,"px"),p="".concat(t[13].height,"px");return{c(){e=z("div"),n=z("div"),i=T(),J(n,"class",r="divkit-f6e9a"),U(n,"width",a,!1),U(n,"height",s,!1),U(n,"border-radius",l,!1),U(n,"background",t[13].style.background,!1),U(n,"box-shadow",t[13].style.boxShadow,!1),J(e,"class",o="divkit-c770e"),U(e,"left",c,!1),U(e,"top",u,!1),U(e,"width",d,!1),U(e,"height",p,!1)},m(t,r){D(t,e,r),V(e,n),V(e,i)},p(t,r){2&r&&a!==(a="".concat(t[13].style.width,"px"))&&U(n,"width",a,!1),2&r&&s!==(s="".concat(t[13].style.height,"px"))&&U(n,"height",s,!1),2&r&&l!==(l="".concat(t[13].style.borderRadius,"px"))&&U(n,"border-radius",l,!1),2&r&&U(n,"background",t[13].style.background,!1),2&r&&U(n,"box-shadow",t[13].style.boxShadow,!1),2&r&&c!==(c="".concat(t[13].left,"px"))&&U(e,"left",c,!1),2&r&&u!==(u="".concat(t[13].top,"px"))&&U(e,"top",u,!1),2&r&&d!==(d="".concat(t[13].width,"px"))&&U(e,"width",d,!1),2&r&&p!==(p="".concat(t[13].height,"px"))&&U(e,"height",p,!1)},d(t){t&&S(e)}}}function xn(t){let e,r,i,o,a=t[1],s=[];for(let e=0;e<a.length;e+=1)s[e]=wn(_n(t,a,e));return{c(){e=z("div");for(let t=0;t<s.length;t+=1)s[t].c();J(e,"class",r="divkit-a7719")},m(n,r){D(n,e,r);for(let t=0;t<s.length;t+=1)s[t].m(e,null);t[10](e),i||(o=O(window,"resize",t[2]),i=!0)},p(t,n){let[r]=n;if(2&r){let n;for(a=t[1],n=0;n<a.length;n+=1){const i=_n(t,a,n);s[n]?s[n].p(i,r):(s[n]=wn(i),s[n].c(),s[n].m(e,null))}for(;n<s.length;n+=1)s[n].d(1);s.length=a.length}},i:n,o:n,d(n){n&&S(e),F(s,n),t[10](null),i=!1,o()}}}function kn(t,e,n,r,i,o){o?t.push({top:n.bottom,left:i.left,width:i.right-i.left,height:r.top-n.bottom,style:e}):t.push({top:i.top,left:n.right,width:r.left-n.right,height:i.bottom-i.top,style:e})}function En(t,e,n,r){const i={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)&&kn(t,e.style,{top:0,right:n[0].left-e.style.width,bottom:n[0].top-e.style.height,left:0},n[0],i,r),null==e?void 0:e.show_between)for(let o=0;o<n.length-1;++o)kn(t,e.style,n[o],n[o+1],i,r);if(null==e?void 0:e.show_at_end){const o=n[n.length-1];kn(t,e.style,o,{top:o.bottom+e.style.height,right:0,bottom:0,left:o.right+e.style.width},i,r)}}function Cn(t,e,n){let r,{orientation:i}=e,{separator:o}=e,{lineSeparator:a}=e;const s=function(t,e){let n,r=0,i=!1;return function(){const e=Date.now();return!r||Math.abs(e-r)>10?(r=e,n=t.apply(this,arguments)):(i||(i=!0,setTimeout((()=>{i=!1,n=t.apply(this,arguments)}),10)),n)}}((function(){if(!r)return;const t=r.getBoundingClientRect();n(1,c=[]);let e=[...r.children].filter((t=>t!==l&&!t.classList.contains(Jt.outer__border))),s=[];for(;e.length;){const t=[],n=e.shift();t.push(n);let r=n.getBoundingClientRect(),o=r.right,a=r.bottom;for(;e.length;){let n=e[0],r=n.getBoundingClientRect();if("vertical"===i){if(r.top<a)break}else if(r.left<o)break;o=Math.max(o,r.right),a=Math.max(a,r.bottom),t.push(n),e.shift()}s.push(t)}const u=[];s.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)));o&&En(c,o,e,"vertical"===i);const n={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)))};u.push(n)})),a&&En(c,a,u,"horizontal"===i),c.forEach((e=>{e.top-=t.top,e.left-=t.left}))}));let l,c=[],u=!1,d=null,p=null;function h(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("divkit-f6e9a"))&&!(null==n?void 0:n.contains("divkit-a7719"))}))&&s()}return Y((()=>{n(6,u=!0)})),Z((()=>{n(6,u=!1)})),t.$$set=t=>{"orientation"in t&&n(3,i=t.orientation),"separator"in t&&n(4,o=t.separator),"lineSeparator"in t&&n(5,a=t.lineSeparator)},t.$$.update=()=>{1&t.$$.dirty&&n(9,r=(null==l?void 0:l.parentElement)||null),960&t.$$.dirty&&(u&&r||d||p)&&(d&&(d.disconnect(),n(7,d=null)),p&&(p.disconnect(),n(8,p=null)),u&&r&&("undefined"!=typeof MutationObserver&&(n(7,d=new MutationObserver(h)),d.observe(r,{childList:!0,attributes:!0,characterData:!0,subtree:!0})),"undefined"!=typeof ResizeObserver&&(n(8,p=new ResizeObserver(s)),p.observe(r)))),576&t.$$.dirty&&u&&r&&s()},[l,c,s,i,o,a,u,d,p,r,function(t){rt[t?"unshift":"push"]((()=>{l=t,n(0,l)}))}]}const An=class extends Ft{constructor(t){super(),St(this,t,Cn,xn,d,{orientation:3,separator:4,lineSeparator:5})}},{Boolean:Vn}=Et;function jn(t,e,n){const r=t.slice();return r[46]=e[n],r}function Pn(t){let e,n;return e=new Ue({props:{cls:ie("container",gn,t[11]),style:t[10],json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],additionalPaddings:t[15],heightByAspect:Boolean(t[8]),$$slots:{default:[Fn]},$$scope:{ctx:t}}}),{c(){jt(e.$$.fragment)},m(t,r){Pt(e,t,r),n=!0},p(t,n){const r={};2048&n[0]&&(r.cls=ie("container",gn,t[11])),1024&n[0]&&(r.style=t[10]),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),32768&n[0]&&(r.additionalPaddings=t[15]),256&n[0]&&(r.heightByAspect=Boolean(t[8])),4195040&n[0]|262144&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(_t(e.$$.fragment,t),n=!0)},o(t){wt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function Dn(t){let e,n;return e=new bo({props:{layoutParams:t[9],div:t[46].json,templateContext:t[46].templateContext,origJson:t[46].origJson}}),{c(){jt(e.$$.fragment)},m(t,r){Pt(e,t,r),n=!0},p(t,n){const r={};512&n[0]&&(r.layoutParams=t[9]),4194304&n[0]&&(r.div=t[46].json),4194304&n[0]&&(r.templateContext=t[46].templateContext),4194304&n[0]&&(r.origJson=t[46].origJson),e.$set(r)},i(t){n||(_t(e.$$.fragment,t),n=!0)},o(t){wt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function Sn(t){let e,n;return e=new An({props:{separator:t[6],lineSeparator:t[7],orientation:t[5]}}),{c(){jt(e.$$.fragment)},m(t,r){Pt(e,t,r),n=!0},p(t,n){const r={};64&n[0]&&(r.separator=t[6]),128&n[0]&&(r.lineSeparator=t[7]),32&n[0]&&(r.orientation=t[5]),e.$set(r)},i(t){n||(_t(e.$$.fragment,t),n=!0)},o(t){wt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function Fn(t){let e,n,r,i=t[22],o=[];for(let e=0;e<i.length;e+=1)o[e]=Dn(jn(t,i,e));const a=t=>wt(o[t],1,1,(()=>{o[t]=null}));let s=(t[6]||t[7])&&Sn(t);return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=T(),s&&s.c(),n=I()},m(t,i){for(let e=0;e<o.length;e+=1)o[e].m(t,i);D(t,e,i),s&&s.m(t,i),D(t,n,i),r=!0},p(t,r){if(4194816&r[0]){let n;for(i=t[22],n=0;n<i.length;n+=1){const a=jn(t,i,n);o[n]?(o[n].p(a,r),_t(o[n],1)):(o[n]=Dn(a),o[n].c(),_t(o[n],1),o[n].m(e.parentNode,e))}for($t(),n=i.length;n<o.length;n+=1)a(n);bt()}t[6]||t[7]?s?(s.p(t,r),192&r[0]&&_t(s,1)):(s=Sn(t),s.c(),_t(s,1),s.m(n.parentNode,n)):s&&($t(),wt(s,1,1,(()=>{s=null})),bt())},i(t){if(!r){for(let t=0;t<i.length;t+=1)_t(o[t]);_t(s),r=!0}},o(t){o=o.filter(Vn);for(let t=0;t<o.length;t+=1)wt(o[t]);wt(s),r=!1},d(t){F(o,t),t&&S(e),s&&s.d(t),t&&S(n)}}}function zn(t){let e,n,r=!t[4]&&Pn(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){t[4]?r&&($t(),wt(r,1,1,(()=>{r=null})),bt()):r?(r.p(t,n),16&n[0]&&_t(r,1)):(r=Pn(t),r.c(),_t(r,1),r.m(e.parentNode,e))},i(t){n||(_t(r),n=!0)},o(t){wt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Nn(t,e,r){let i,o,a,s,l,c,u,d,p,f,g,m,v,y,$,b,_,w,x,k,E,C,A,V,j=n,P=n,D=n,S=n,F=n,z=n,N=n,M=n,T=n;var I,O,J,B,R,U;t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>S())),t.$$.on_destroy.push((()=>F())),t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>M())),t.$$.on_destroy.push((()=>T()));let{json:L={}}=e,{templateContext:W}=e,{origJson:H}=e,{layoutParams:q}=e;const G={left:"start",center:"center",right:"end"},K={top:"start",center:"center",bottom:"end",baseline:"baseline"},X=["rounded_rectangle","circle"],Y=tt(Tt);let Z,Q=!1,et="vertical",nt="top",rt="left",it=null,ot=null,at={};return t.$$set=t=>{"json"in t&&r(0,L=t.json),"templateContext"in t&&r(1,W=t.templateContext),"origJson"in t&&r(2,H=t.origJson),"layoutParams"in t&&r(3,q=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(32,i=L.items),2&t.$$.dirty[1]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(4,Q=!1):(r(4,Q=!0),Y.logError(It(new Error('Incorrect or empty "items" prop for div "container"'))))),18&t.$$.dirty[0]|2&t.$$.dirty[1]&&r(22,o=(!Q&&i||[]).map((t=>{let e=t,n=W;return({templateContext:n,json:e}=Y.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),1&t.$$.dirty[0]&&(r(21,a=Y.getDerivedFromVars(L.orientation)),T(),T=h(a,(t=>r(41,V=t)))),32&t.$$.dirty[0]|1024&t.$$.dirty[1]&&r(5,et=function(t,e){return"vertical"===t||"horizontal"===t||"overlap"===t?t:e}(V,et)),1&t.$$.dirty[0]&&(r(20,s=Y.getDerivedFromVars(L.content_alignment_vertical)),M(),M=h(s,(t=>r(40,A=t)))),536870912&t.$$.dirty[0]|512&t.$$.dirty[1]&&r(29,nt=tn(A,nt)),1&t.$$.dirty[0]&&(r(19,l=Y.getDerivedFromVars(L.content_alignment_horizontal)),N(),N=h(l,(t=>r(39,C=t)))),1073741824&t.$$.dirty[0]|256&t.$$.dirty[1]&&r(30,rt=Qe(C,rt)),1&t.$$.dirty[0]&&(r(18,c=Y.getDerivedFromVars(L.layout_mode)),z(),z=h(c,(t=>r(38,E=t)))),128&t.$$.dirty[1]&&r(31,u="wrap"===E),1&t.$$.dirty[0]&&(r(17,d=Y.getDerivedFromVars(L.separator)),F(),F=h(d,(t=>r(37,k=t)))),58720352&t.$$.dirty[0]|64&t.$$.dirty[1])if((null==k?void 0:k.style)&&"overlap"!==et&&bn()){const t=mn(k.style,X,(null==it?void 0:it.style)||null);r(6,it=t?{show_at_start:Boolean(null!==r(23,I=k.show_at_start)&&void 0!==I&&I),show_at_end:Boolean(null!==r(24,O=k.show_at_end)&&void 0!==O&&O),show_between:Boolean(null===r(25,J=k.show_between)||void 0===J||J),style:t}:null)}else r(6,it=null);if(1&t.$$.dirty[0]&&(r(16,p=Y.getDerivedFromVars(L.line_separator)),S(),S=h(p,(t=>r(36,x=t)))),469762208&t.$$.dirty[0]|32&t.$$.dirty[1])if((null==x?void 0:x.style)&&"overlap"!==et&&bn()){const t=mn(x.style,X,(null==ot?void 0:ot.style)||null);r(7,ot=t?{show_at_start:Boolean(null!==r(26,B=x.show_at_start)&&void 0!==B&&B),show_at_end:Boolean(null!==r(27,R=x.show_at_end)&&void 0!==R&&R),show_between:Boolean(null===r(28,U=x.show_between)||void 0===U||U),style:t}:null)}else r(7,ot=null);if(224&t.$$.dirty[0]&&r(15,f=it||ot?function(t,e,n){const r={};return vn(r,e,"vertical"===t),vn(r,n,"horizontal"===t),r}(et,it,ot):null),1&t.$$.dirty[0]&&(r(14,g=Y.getDerivedFromVars(L.aspect)),D(),D=h(g,(t=>r(35,w=t)))),16&t.$$.dirty[1]){const t=null==w?void 0:w.ratio;t&&Ae(t)?r(8,Z=t):r(8,Z=void 0)}if(1&t.$$.dirty[0]&&(r(13,m=Y.getDerivedFromVars(L.width)),j(),j=h(m,(t=>r(33,b=t)))),1&t.$$.dirty[0]&&(r(12,v=Y.getDerivedFromVars(L.height)),P(),P=h(v,(t=>r(34,_=t)))),1610613544&t.$$.dirty[0]|13&t.$$.dirty[1]){let t={};(null==q?void 0:q.fakeElement)&&(t.fakeElement=!0),"overlap"===et&&(t.overlapParent=!0),"horizontal"!==et&&(t.parentHAlign=G[rt],Z||_&&"wrap_content"!==_.type&&("match_parent"!==_.type||!(null==q?void 0:q.parentVerticalWrapContent))||(t.parentVerticalWrapContent=!0)),"vertical"!==et&&(t.parentVAlign=K[nt],("wrap_content"===(null==b?void 0:b.type)||"match_parent"===(null==b?void 0:b.type)&&(null==q?void 0:q.parentHorizontalWrapContent))&&(t.parentHorizontalWrapContent=!0)),"horizontal"===et&&(t.parentContainerOrientation="horizontal"),"vertical"===et&&(t.parentContainerOrientation="vertical"),u&&(t.parentContainerWrap=!0),r(9,at=he(t,at))}1610612768&t.$$.dirty[0]|1&t.$$.dirty[1]&&r(11,y={orientation:et,valign:nt,halign:rt,wrap:u}),480&t.$$.dirty[0]&&r(10,$={gap:it||ot?yn(et,it,ot):void 0,"aspect-ratio":Z})},[L,W,H,q,Q,et,it,ot,Z,at,$,y,v,m,g,f,p,d,c,l,s,a,o,I,O,J,B,R,U,nt,rt,u,i,b,_,w,x,k,E,C,A,V]}const Mn={separator:"divkit-a30bb",separator_orientation_horizontal:"divkit-f529e",separator_orientation_vertical:"divkit-e9e27",separator__inner:"divkit-db7d8"};function Tn(t,e){return"vertical"===t||"horizontal"===t?t:e}function In(t){let e,n,r;return{c(){e=z("span"),J(e,"class",n=Mn.separator__inner),J(e,"style",r=Bt(t[5]))},m(t,n){D(t,e,n)},p(t,n){32&n&&r!==(r=Bt(t[5]))&&J(e,"style",r)},d(t){t&&S(e)}}}function On(t){let e,n=t[6]&&In(t);return{c(){n&&n.c(),e=I()},m(t,r){n&&n.m(t,r),D(t,e,r)},p(t,r){t[6]?n?n.p(t,r):(n=In(t),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(t){n&&n.d(t),t&&S(e)}}}function Jn(t){let e,n;return e=new Ue({props:{cls:ie("separator",Mn,t[4]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[On]},$$scope:{ctx:t}}}),{c(){jt(e.$$.fragment)},m(t,r){Pt(e,t,r),n=!0},p(t,n){let[r]=n;const i={};16&r&&(i.cls=ie("separator",Mn,t[4])),1&r&&(i.json=t[0]),4&r&&(i.origJson=t[2]),2&r&&(i.templateContext=t[1]),8&r&&(i.layoutParams=t[3]),16480&r&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(_t(e.$$.fragment,t),n=!0)},o(t){wt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function Bn(t,e,r){let i,o,a,s,l,c,u,d=n;t.$$.on_destroy.push((()=>d()));let{json:p={}}=e,{templateContext:f}=e,{origJson:g}=e,{layoutParams:m}=e;const v=tt(Tt);let y="horizontal",$="rgba(0,0,0,0.08)";return t.$$set=t=>{"json"in t&&r(0,p=t.json),"templateContext"in t&&r(1,f=t.templateContext),"origJson"in t&&r(2,g=t.origJson),"layoutParams"in t&&r(3,m=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty&&(r(7,i=v.getDerivedFromVars(p.delimiter_style)),d(),d=h(i,(t=>r(12,u=t)))),4352&t.$$.dirty&&r(8,y=Tn(null==u?void 0:u.orientation,y)),4096&t.$$.dirty&&r(6,o=!((null==u?void 0:u.color)&&("transparent"===u.color||9===u.color.length&&0===u.color.indexOf("#00")))),4608&t.$$.dirty&&r(9,$=Wt(null==u?void 0:u.color,1,$)),256&t.$$.dirty&&r(11,a="horizontal"===y?"100%":Rt(1)),256&t.$$.dirty&&r(10,s="horizontal"===y?Rt(1):"100%"),3584&t.$$.dirty&&r(5,l={background:$,width:a,height:s}),256&t.$$.dirty&&r(4,c={orientation:y})},[p,f,g,m,c,l,o,i,y,$,s,a,u]}const Rn={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 Un(t){let e,n;return e=new Ue({props:{cls:ie("image",Rn,t[10]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customDescription:!0,$$slots:{default:[qn]},$$scope:{ctx:t}}}),{c(){jt(e.$$.fragment)},m(t,r){Pt(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.cls=ie("image",Rn,t[10])),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),67312&n[0]|536870912&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(_t(e.$$.fragment,t),n=!0)},o(t){wt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function Ln(t){let e,n,r,i,o,a,l;return{c(){e=z("img"),J(e,"class",n=Rn.image__image),u(e.src,r=t[4]===Xn?Kn:t[7])||J(e,"src",r),J(e,"loading","lazy"),J(e,"decoding","async"),J(e,"style",i=Bt(t[9])),J(e,"alt",t[16]),J(e,"aria-hidden",o=t[16]?null:"true")},m(n,r){D(n,e,r),a||(l=[O(e,"load",t[26]),O(e,"error",t[27])],a=!0)},p(t,n){144&n[0]&&!u(e.src,r=t[4]===Xn?Kn:t[7])&&J(e,"src",r),512&n[0]&&i!==(i=Bt(t[9]))&&J(e,"style",i),65536&n[0]&&J(e,"alt",t[16]),65536&n[0]&&o!==(o=t[16]?null:"true")&&J(e,"aria-hidden",o)},d(t){t&&S(e),a=!1,s(l)}}}function Wn(t){let e,n,r,i,o,a,l,c,d,p="".concat(t[5],"%");return{c(){e=z("span"),n=z("img"),J(n,"class",r=Rn.image__image),u(n.src,i=t[4]===Xn?Kn:t[7])||J(n,"src",i),J(n,"loading","lazy"),J(n,"decoding","async"),J(n,"style",o=Bt(t[9])),J(n,"alt",t[16]),J(n,"aria-hidden",a=t[16]?null:"true"),J(e,"class",l=Rn["image__aspect-wrapper"]),U(e,"padding-bottom",p,!1)},m(r,i){D(r,e,i),V(e,n),c||(d=[O(n,"load",t[26]),O(n,"error",t[27])],c=!0)},p(t,r){144&r[0]&&!u(n.src,i=t[4]===Xn?Kn:t[7])&&J(n,"src",i),512&r[0]&&o!==(o=Bt(t[9]))&&J(n,"style",o),65536&r[0]&&J(n,"alt",t[16]),65536&r[0]&&a!==(a=t[16]?null:"true")&&J(n,"aria-hidden",a),32&r[0]&&p!==(p="".concat(t[5],"%"))&&U(e,"padding-bottom",p,!1)},d(t){t&&S(e),c=!1,s(d)}}}function Hn(t){let e;function n(t,e){return t[10].aspect?Wn:Ln}let r=n(t),i=r(t);return{c(){i.c(),e=I()},m(t,n){i.m(t,n),D(t,e,n)},p(t,o){r===(r=n(t))&&i?i.p(t,o):(i.d(1),i=r(t),i&&(i.c(),i.m(e.parentNode,e)))},d(t){i.d(t),t&&S(e)}}}function qn(t){let e,n=t[6],r=Hn(t);return{c(){r.c(),e=I()},m(t,n){r.m(t,n),D(t,e,n)},p(t,i){64&i[0]&&d(n,n=t[6])?(r.d(1),r=Hn(t),r.c(),r.m(e.parentNode,e)):r.p(t,i)},d(t){t&&S(e),r.d(t)}}}function Gn(t){let e,n,r=!t[8]&&Un(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){t[8]?r&&($t(),wt(r,1,1,(()=>{r=null})),bt()):r?(r.p(t,n),256&n[0]&&_t(r,1)):(r=Un(t),r.c(),_t(r,1),r.m(e.parentNode,e))},i(t){n||(_t(r),n=!0)},o(t){wt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}const Kn="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Xn=2;function Yn(t,e,r){let i,o,a,s,l,c,u,d,p,f,g,m,v,y,$,b,_,w,x,k,E,C,A,V,j,P,D,S,F,z,N,M,T,I,O=n,J=n,B=n,R=n,U=n,L=n,W=n,H=n,q=n,G=n,K=n,X=n,Y=n,Q=n;t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>X())),t.$$.on_destroy.push((()=>Y())),t.$$.on_destroy.push((()=>Q()));let{json:et={}}=e,{templateContext:nt}=e,{origJson:rt}=e,{layoutParams:it}=e;const ot=tt(Tt);let at=0,st="rgba(0,0,0,0.08)",lt=!1,ct="",ut="none",dt="50% 50%";let pt,ht="0",ft="source_in",gt="",mt="",vt=0,yt=0,$t=0,bt="",_t="";return Z((()=>{ot.removeSvgFilter(pt,ft)})),t.$$set=t=>{"json"in t&&r(0,et=t.json),"templateContext"in t&&r(1,nt=t.templateContext),"origJson"in t&&r(2,rt=t.origJson),"layoutParams"in t&&r(3,it=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(25,i=ot.getDerivedFromVars(et.image_url)),Q(),Q=h(i,(t=>r(55,I=t)))),1&t.$$.dirty[0]&&(r(24,o=ot.getDerivedFromVars(et.gif_url)),Y(),Y=h(o,(t=>r(54,T=t)))),25165824&t.$$.dirty[1]&&r(7,a=I||T),128&t.$$.dirty[0]&&r(4,at=0),128&t.$$.dirty[0]&&(a?r(8,lt=!1):(r(8,lt=!0),ot.logError(It(new Error('Missing "image_url" for "image"'))))),1&t.$$.dirty[0]&&(r(23,s=ot.getDerivedFromVars(et.width)),X(),X=h(s,(t=>r(53,M=t)))),4194304&t.$$.dirty[1]&&r(41,l="wrap_content"===(null==M?void 0:M.type)),1&t.$$.dirty[0]&&(r(22,c=ot.getDerivedFromVars(et.height)),K(),K=h(c,(t=>r(52,N=t)))),2097152&t.$$.dirty[1]&&r(40,u="wrap_content"===(null==N?void 0:N.type)),1&t.$$.dirty[0]&&(r(21,d=ot.getDerivedFromVars(et.preview)),G(),G=h(d,(t=>r(51,z=t)))),16&t.$$.dirty[0]|1048576&t.$$.dirty[1]){const t=z;0!==at&&at!==Xn||!t?r(29,ct=""):t.startsWith("data:")?r(29,ct='url("'.concat(Gt(t),'")')):r(29,ct='url("data:image/jpg;base64,'.concat(Gt(t),'")'))}if(1&t.$$.dirty[0]&&(r(20,p=ot.getDerivedFromVars(et.placeholder_color)),q(),q=h(p,(t=>r(50,F=t)))),16&t.$$.dirty[0]|524288&t.$$.dirty[1]&&function(t,e){r(28,st=0===t||t===Xn?Wt(e,1,st):"")}(at,F),1&t.$$.dirty[0]&&(r(19,f=ot.getDerivedFromVars(et.scale)),H(),H=h(f,(t=>r(49,S=t)))),1073741824&t.$$.dirty[0]|262144&t.$$.dirty[1]&&r(30,ut=Qt(S)||ut),1&t.$$.dirty[0]&&(r(18,g=ot.getDerivedFromVars({content_alignment_horizontal:et.content_alignment_horizontal,content_alignment_vertical:et.content_alignment_vertical})),W(),W=h(g,(t=>r(48,D=t)))),131072&t.$$.dirty[1]&&r(31,dt=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:te(t)}(D,dt)),1&t.$$.dirty[0]&&(r(17,m=ot.getDerivedFromVars(et.accessibility)),L(),L=h(m,(t=>r(47,P=t)))),65536&t.$$.dirty[1]&&r(16,v=(null==P?void 0:P.description)||""),1&t.$$.dirty[0]&&(r(15,y=ot.getDerivedFromVars(et.aspect)),U(),U=h(y,(t=>r(46,j=t)))),32768&t.$$.dirty[1]){const t=null==j?void 0:j.ratio;t&&Ae(t)?r(5,ht=(100/Number(t)).toFixed(2)):r(5,ht="0")}if(1&t.$$.dirty[0]&&(r(14,$=ot.getDerivedFromVars(et.tint_color)),R(),R=h($,(t=>r(45,V=t)))),1&t.$$.dirty[0]&&(r(13,b=ot.getDerivedFromVars(et.tint_mode)),B(),B=h(b,(t=>r(44,A=t)))),24582&t.$$.dirty[1]){const t=V,e=t?Wt(t):void 0,n=en(A,ft);e===pt&&n===ft||(ot.removeSvgFilter(pt,ft),r(6,gt=e?ot.addSvgFilter(e,n):""),r(32,pt=e),r(33,ft=n))}if(1&t.$$.dirty[0]&&(r(12,_=ot.getDerivedFromVars(et.appearance_animation)),J(),J=h(_,(t=>r(43,C=t)))),4096&t.$$.dirty[1]&&C&&"fade"===C.type){const t=C;r(34,mt=fe(t.interpolator,"ease_in_out").replace(/_/g,"-")),r(37,$t=ue(t.duration,300)),r(36,yt=ue(t.start_delay,0)),r(35,vt=ue(t.alpha,0))}if(1&t.$$.dirty[0]&&(r(11,w=ot.getDerivedFromVars(et.filters)),O(),O=h(w,(t=>r(42,E=t)))),2048&t.$$.dirty[1]){let t="",e="";Array.isArray(E)&&E.length&&(t=Ve(E,ot.logError)),t&&(e="polygon(0% 0%, 0% 100%, 100% 100%, 100% 0%)"),r(38,bt=t),r(39,_t=e)}48&t.$$.dirty[0]|1544&t.$$.dirty[1]&&r(10,x={aspect:"0"!==ht,"is-width-content":l,"is-height-content":u,loaded:1===at,"before-appearance":Boolean(mt)&&0===at}),1879048272&t.$$.dirty[0]|505&t.$$.dirty[1]&&r(9,k={"background-image":ct,"background-color":ct?void 0:st,"background-size":ut,"clip-path":_t||void 0,"object-fit":ut,"object-position":dt,filter:[1===at&>?"url(#".concat(gt,")"):"",bt].filter(Boolean).join(" "),"--divkit-appearance-interpolator":mt||void 0,"--divkit-appearance-fade-start":mt?vt:void 0,"--divkit-appearance-delay":mt?"".concat(yt,"ms"):void 0,"--divkit-appearance-duration":mt?"".concat($t,"ms"):void 0})},[et,nt,rt,it,at,ht,gt,a,lt,k,x,w,_,b,$,y,v,m,g,f,p,d,c,s,o,i,function(){0===at&&r(4,at=1)},function(){0===at&&r(4,at=Xn)},st,ct,ut,dt,pt,ft,mt,vt,yt,$t,bt,_t,u,l,E,C,A,V,j,P,D,S,F,z,N,M,T,I]}const Zn=class extends Ft{constructor(t){super(),St(this,t,Yn,Gn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Qn={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 tr(t){return t>0&&t<1}function er(t){return String(Math.ceil(1e3*t)/1e3)}function nr(t,e,n){if(t.some(tr)){const e=Math.max(...t.filter(tr).map((t=>1/t)));t=t.map((t=>t*e))}let r=0,i=0;const o=[];if(t.every(Boolean)){i=t.reduce(((t,e)=>t+e),0);for(let o=0;o<n;++o){if(!e[o])continue;const n=e[o]/t[o]*i;n>r&&(r=n)}}for(let e=0;e<n;++e)r?o[e]="minmax(".concat(Rt(r*t[e]/i),",").concat(er(t[e]),"fr)"):t[e]?o[e]="".concat(er(t[e]),"fr"):o[e]="auto";return o.join(" ")}function rr(t,e,n){const r=t.slice();return r[29]=e[n],r}function ir(t){let e,n;return e=new Ue({props:{cls:ie("grid",Qn,t[8]),json:t[0],origJson:t[2],templateContext:t[1],style:t[7],layoutParams:t[3],$$slots:{default:[ar]},$$scope:{ctx:t}}}),{c(){jt(e.$$.fragment)},m(t,r){Pt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=ie("grid",Qn,t[8])),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),128&n[0]&&(r.style=t[7]),8&n[0]&&(r.layoutParams=t[3]),32&n[0]|2&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(_t(e.$$.fragment,t),n=!0)},o(t){wt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function or(t){let e,n;return e=new bo({props:{layoutParams:t[29].layoutParams,div:t[29].json,templateContext:t[29].templateContext,origJson:t[29].origJson}}),{c(){jt(e.$$.fragment)},m(t,r){Pt(e,t,r),n=!0},p(t,n){const r={};32&n[0]&&(r.layoutParams=t[29].layoutParams),32&n[0]&&(r.div=t[29].json),32&n[0]&&(r.templateContext=t[29].templateContext),32&n[0]&&(r.origJson=t[29].origJson),e.$set(r)},i(t){n||(_t(e.$$.fragment,t),n=!0)},o(t){wt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function ar(t){let e,n,r=t[5],i=[];for(let e=0;e<r.length;e+=1)i[e]=or(rr(t,r,e));const o=t=>wt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=I()},m(t,r){for(let e=0;e<i.length;e+=1)i[e].m(t,r);D(t,e,r),n=!0},p(t,n){if(32&n[0]){let a;for(r=t[5],a=0;a<r.length;a+=1){const o=rr(t,r,a);i[a]?(i[a].p(o,n),_t(i[a],1)):(i[a]=or(o),i[a].c(),_t(i[a],1),i[a].m(e.parentNode,e))}for($t(),a=r.length;a<i.length;a+=1)o(a);bt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)_t(i[t]);n=!0}},o(t){i=i.filter(Boolean);for(let t=0;t<i.length;t+=1)wt(i[t]);n=!1},d(t){F(i,t),t&&S(e)}}}function sr(t){let e,n,r=!t[6]&&ir(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){t[6]?r&&($t(),wt(r,1,1,(()=>{r=null})),bt()):r?(r.p(t,n),64&n[0]&&_t(r,1)):(r=ir(t),r.c(),_t(r,1),r.m(e.parentNode,e))},i(t){n||(_t(r),n=!0)},o(t){wt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function lr(t,e,r){let i,o,a,s,l,c,u,d,p,f,g,m,v=n,y=n,$=n,b=n;t.$$.on_destroy.push((()=>v())),t.$$.on_destroy.push((()=>y())),t.$$.on_destroy.push((()=>$())),t.$$.on_destroy.push((()=>b()));let{json:_={}}=e,{templateContext:w}=e,{origJson:x}=e,{layoutParams:k}=e;const E=tt(Tt);let C,A,V=!1,j=1,P=[],D=[],S=[],F=[],z=0,N=!1,M="top",T="left";return t.$$set=t=>{"json"in t&&r(0,_=t.json),"templateContext"in t&&r(1,w=t.templateContext),"origJson"in t&&r(2,x=t.origJson),"layoutParams"in t&&r(3,k=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(23,i=_.items),8388608&t.$$.dirty[0]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(12,V=!1):(r(12,V=!0),E.logError(It(new Error('Incorrect or empty "items" prop for div "grid"'))))),1&t.$$.dirty[0]&&(r(11,o=E.getDerivedFromVars(_.column_count)),b(),b=h(o,(t=>r(27,m=t)))),134225920&t.$$.dirty[0]&&r(13,j=We(m,j)),8392706&t.$$.dirty[0]&&r(22,a=(!V&&i||[]).map((t=>{let e=t,n=w;return({templateContext:n,json:e}=E.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),4194304&t.$$.dirty[0]){let t=[];a.forEach((e=>{t.push(E.getDerivedFromVars({rowSpan:e.json.row_span,columnSpan:e.json.column_span,width:e.json.width,height:e.json.height}))})),r(4,C=Mt(t,(t=>[...t]))),$(),$=h(C,(t=>r(26,g=t)))}if(72081416&t.$$.dirty[0]){const t={};let e=0,n=0;r(14,P=[]),r(15,D=[]),r(16,S=[]),r(17,F=[]),r(19,N=!1),r(5,A=a.map(((i,o)=>{var a,s,l,c;const u=g[o],d=Number(u.columnSpan)||1,p=Number(u.rowSpan)||1,h={x:e,y:n,colSpan:d,rowSpan:p},f="match_parent"===(null===(a=u.width)||void 0===a?void 0:a.type)?Number(u.width.weight||1)/d:0,m="match_parent"===(null===(s=u.height)||void 0===s?void 0:s.type)?Number(u.height.weight||1)/p:0,v=1===d&&"fixed"===(null===(l=u.width)||void 0===l?void 0:l.type)&&u.width.value?Number(u.width.value)/d:0,y=1===p&&"fixed"===(null===(c=u.height)||void 0===c?void 0:c.type)&&u.height.value?Number(u.height.value)/p:0;for(let i=e;i<e+d;++i)for(let e=n;e<n+p;++e)t[i+"_"+e]?r(19,N=!0):(t[i+"_"+e]=!0,(!P[i]||P[i]<f)&&r(14,P[i]=f,P),(!D[e]||D[e]<m)&&r(15,D[e]=m,D),(!S[i]||S[i]<v)&&r(16,S[i]=v,S),(!F[e]||F[e]<y)&&r(17,F[e]=y,F));do{++e,e>=j&&(e=0,++n)}while(t[e+"_"+n]);return Object.assign(Object.assign({},i),{layoutParams:{gridArea:h,fakeElement:(null==k?void 0:k.fakeElement)||!1}})}))),0!==e&&r(19,N=!0),N&&E.logError(It(new Error('Mismatching "grid" rows/columns'))),r(18,z=n)}1&t.$$.dirty[0]&&(r(10,s=E.getDerivedFromVars(_.content_alignment_vertical)),y(),y=h(s,(t=>r(25,f=t)))),34603008&t.$$.dirty[0]&&r(20,M=tn(f,M)),1&t.$$.dirty[0]&&(r(9,l=E.getDerivedFromVars(_.content_alignment_horizontal)),v(),v=h(l,(t=>r(24,p=t)))),18874368&t.$$.dirty[0]&&r(21,T=Qe(p,T)),3145728&t.$$.dirty[0]&&r(8,c={valign:M,halign:T}),516096&t.$$.dirty[0]&&r(7,u={"grid-template-columns":nr(P,S,j),"grid-template-rows":nr(D,F,z)}),528384&t.$$.dirty[0]&&r(6,d=V||N)},[_,w,x,k,C,A,d,u,c,l,s,o,V,j,P,D,S,F,z,N,M,T,a,i,p,f,g,m]}const cr={gallery:"divkit-cbb0f",gallery_orientation_horizontal:"divkit-c9be7",gallery_orientation_vertical:"divkit-a72d5",gallery__scroller:"divkit-a4e39","gallery_scroll-snap":"divkit-f606e","gallery__items-grid":"divkit-eb4a5",gallery__items:"divkit-af276",gallery__arrow:"divkit-b72d7","gallery__arrow-icon":"divkit-d100d",gallery__arrow_left:"divkit-a0a5d",gallery__arrow_right:"divkit-f0f59","gallery__arrow-icon-path":"divkit-b4173"};function ur(t){const e=[];let n=t[0],r=1;for(let i=1;i<=t.length;i++)t[i]!==n?(e.push(r>1?"repeat(".concat(r,", ").concat(n,")"):n),n=t[i],r=1):r++;return e.join(" ")}function dr(t,e){let n;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];null!==n&&clearTimeout(n),n=setTimeout((()=>{t.apply(this,i),n=null}),e)}}const{Boolean:pr}=Et;function hr(t,e,n){const r=t.slice();return r[72]=e[n],r[73]=e,r[74]=n,r}function fr(t,e,n){const r=t.slice();return r[75]=e[n],r}function gr(t){let e,n;return e=new Ue({props:{cls:ie("gallery",cr,t[16]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,customActions:"gallery",$$slots:{default:[_r]},$$scope:{ctx:t}}}),{c(){jt(e.$$.fragment)},m(t,r){Pt(e,t,r),n=!0},p(t,n){const r={};65536&n[0]&&(r.cls=ie("gallery",cr,t[16])),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),335953872&n[0]|65536&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(_t(e.$$.fragment,t),n=!0)},o(t){wt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function mr(t){let e,n;return e=new bo({props:{layoutParams:t[8],div:t[75].json,templateContext:t[75].templateContext,origJson:t[75].origJson}}),{c(){jt(e.$$.fragment)},m(t,r){Pt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.layoutParams=t[8]),67108864&n[0]&&(r.div=t[75].json),67108864&n[0]&&(r.templateContext=t[75].templateContext),67108864&n[0]&&(r.origJson=t[75].origJson),e.$set(r)},i(t){n||(_t(e.$$.fragment,t),n=!0)},o(t){wt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function vr(t){let e,n,r,i,o,a=t[74],s=t[72],l=[];for(let e=0;e<s.length;e+=1)l[e]=mr(fr(t,s,e));const c=t=>wt(l[t],1,1,(()=>{l[t]=null})),u=()=>t[60](e,a),d=()=>t[60](null,a);return{c(){e=z("div");for(let t=0;t<l.length;t+=1)l[t].c();n=T(),J(e,"class",r=cr.gallery__items),J(e,"style",i=Bt(t[17]))},m(t,r){D(t,e,r);for(let t=0;t<l.length;t+=1)l[t].m(e,null);V(e,n),u(),o=!0},p(r,p){if(t=r,67109120&p[0]){let r;for(s=t[72],r=0;r<s.length;r+=1){const i=fr(t,s,r);l[r]?(l[r].p(i,p),_t(l[r],1)):(l[r]=mr(i),l[r].c(),_t(l[r],1),l[r].m(e,n))}for($t(),r=s.length;r<l.length;r+=1)c(r);bt()}(!o||131072&p[0]&&i!==(i=Bt(t[17])))&&J(e,"style",i),a!==t[74]&&(d(),a=t[74],u())},i(t){if(!o){for(let t=0;t<s.length;t+=1)_t(l[t]);o=!0}},o(t){l=l.filter(pr);for(let t=0;t<l.length;t+=1)wt(l[t]);o=!1},d(t){t&&S(e),F(l,t),d()}}}function yr(t){let e,n,r=t[12]&&t[9]&&$r(t),i=t[13]&&t[9]&&br(t);return{c(){r&&r.c(),e=T(),i&&i.c(),n=I()},m(t,o){r&&r.m(t,o),D(t,e,o),i&&i.m(t,o),D(t,n,o)},p(t,o){t[12]&&t[9]?r?r.p(t,o):(r=$r(t),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),t[13]&&t[9]?i?i.p(t,o):(i=br(t),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},d(t){r&&r.d(t),t&&S(e),i&&i.d(t),t&&S(n)}}}function $r(t){let e,r,i,o,a=!t[29]&&function(t){let e,r,i,o;return{c(){e=N("svg"),r=N("path"),J(r,"class",i=cr["gallery__arrow-icon-path"]),J(r,"d","m10 16 8.3 8 1.03-1-4-6-.7-1 .7-1 4-6-1.03-1z"),J(e,"class",o=cr["gallery__arrow-icon"]),J(e,"xmlns","http://www.w3.org/2000/svg"),J(e,"width","32"),J(e,"height","32"),J(e,"viewBox","0 0 32 32"),J(e,"fill","none")},m(t,n){D(t,e,n),V(e,r)},p:n,d(t){t&&S(e)}}}();return{c(){e=z("div"),a&&a.c(),J(e,"class",r=t[29]||"".concat(cr.gallery__arrow," ").concat(cr.gallery__arrow_left))},m(n,r){D(n,e,r),a&&a.m(e,null),i||(o=O(e,"click",t[63]),i=!0)},p(t,e){t[29]||a.p(t,e)},d(t){t&&S(e),a&&a.d(),i=!1,o()}}}function br(t){let e,r,i,o,a=!t[30]&&function(t){let e,r,i,o;return{c(){e=N("svg"),r=N("path"),J(r,"class",i=cr["gallery__arrow-icon-path"]),J(r,"d","M22 16l-8.3 8-1.03-1 4-6 .7-1-.7-1-4-6 1.03-1 8.3 8z"),J(e,"class",o=cr["gallery__arrow-icon"]),J(e,"xmlns","http://www.w3.org/2000/svg"),J(e,"width","32"),J(e,"height","32"),J(e,"viewBox","0 0 32 32"),J(e,"fill","none")},m(t,n){D(t,e,n),V(e,r)},p:n,d(t){t&&S(e)}}}();return{c(){e=z("div"),a&&a.c(),J(e,"class",r=t[30]||"".concat(cr.gallery__arrow," ").concat(cr.gallery__arrow_right))},m(n,r){D(n,e,r),a&&a.m(e,null),i||(o=O(e,"click",t[64]),i=!0)},p(t,e){t[30]||a.p(t,e)},d(t){t&&S(e),a&&a.d(),i=!1,o()}}}function _r(t){let e,n,r,i,o,a,s,c,u,d,p,h=t[26],f=[];for(let e=0;e<h.length;e+=1)f[e]=vr(hr(t,h,e));const g=t=>wt(f[t],1,1,(()=>{f[t]=null}));let m="horizontal"===t[6]&&yr(t);return{c(){e=z("div"),n=z("div");for(let t=0;t<f.length;t+=1)f[t].c();s=T(),m&&m.c(),c=I(),J(n,"class",r=cr["gallery__items-grid"]),J(n,"style",i=Bt(t[18])),J(e,"class",o=cr.gallery__scroller+" "+(t[28]?"divkit-aa145":"")),J(e,"style",a=Bt(t[7]))},m(r,i){D(r,e,i),V(e,n);for(let t=0;t<f.length;t+=1)f[t].m(n,null);t[61](n),t[62](e),D(r,s,i),m&&m.m(r,i),D(r,c,i),u=!0,d||(p=O(e,"scroll",(function(){l(t[9]?t[32]:null)&&(t[9]?t[32]:null).apply(this,arguments)})),d=!0)},p(r,s){if(t=r,67242240&s[0]){let e;for(h=t[26],e=0;e<h.length;e+=1){const r=hr(t,h,e);f[e]?(f[e].p(r,s),_t(f[e],1)):(f[e]=vr(r),f[e].c(),_t(f[e],1),f[e].m(n,null))}for($t(),e=h.length;e<f.length;e+=1)g(e);bt()}(!u||262144&s[0]&&i!==(i=Bt(t[18])))&&J(n,"style",i),(!u||268435456&s[0]&&o!==(o=cr.gallery__scroller+" "+(t[28]?"divkit-aa145":"")))&&J(e,"class",o),(!u||128&s[0]&&a!==(a=Bt(t[7])))&&J(e,"style",a),"horizontal"===t[6]?m?m.p(t,s):(m=yr(t),m.c(),m.m(c.parentNode,c)):m&&(m.d(1),m=null)},i(t){if(!u){for(let t=0;t<h.length;t+=1)_t(f[t]);u=!0}},o(t){f=f.filter(pr);for(let t=0;t<f.length;t+=1)wt(f[t]);u=!1},d(n){n&&S(e),F(f,n),t[61](null),t[62](null),n&&S(s),m&&m.d(n),n&&S(c),d=!1,p()}}}function wr(t){let e,n,r,i,o=!t[5]&&gr(t);return{c(){o&&o.c(),e=I()},m(a,s){o&&o.m(a,s),D(a,e,s),n=!0,r||(i=O(window,"resize",(function(){l(t[9]?t[33]:null)&&(t[9]?t[33]:null).apply(this,arguments)})),r=!0)},p(n,r){(t=n)[5]?o&&($t(),wt(o,1,1,(()=>{o=null})),bt()):o?(o.p(t,r),32&r[0]&&_t(o,1)):(o=gr(t),o.c(),_t(o,1),o.m(e.parentNode,e))},i(t){n||(_t(o),n=!0)},o(t){wt(o),n=!1},d(t){o&&o.d(t),t&&S(e),r=!1,i()}}}function xr(t,e,r){let i,o,a,s,l,c,u,d,p,g,m,v,y,$,b,_,w,x,k,E,C,A,V,j,P,D,S,F,z=n,N=n,M=n,T=n,I=n,O=n,J=n,B=n,R=n,U=n;t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>M())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>U()));let{json:L={}}=e,{templateContext:W}=e,{origJson:H}=e,{layoutParams:q}=e;const G=tt(Tt);let K,X,Q=[],et=!1,nt=!1,it=null,ot=!1;const at=G.getCustomization("galleryLeftClass"),st=G.getCustomization("galleryRightClass");let lt=!1;const ct=G.isDesktop;f(t,ct,(t=>r(59,S=t)));let ut,dt,pt,ht,ft=1,gt="horizontal",mt="start",vt=8,yt="",$t=[],bt={},_t=!1,wt={},xt=0;function kt(){if(!K)return;const t=K.scrollLeft,e=K.scrollWidth,n=K.offsetWidth;r(12,et=t>2),r(13,nt=t+n<e-2)}const Et=dr(kt,50);function Ct(t){K.scroll({left:K.scrollLeft+.75*K.offsetWidth*("right"===t?1:-1),behavior:"smooth"})}function At(){let t=[],e=Q[0].children.length;for(let n=0;n<e;++n)for(let e=0;e<ft;++e){const r=Q[e].children[n];r&&t.push(r)}return t}function Vt(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"smooth";const r="horizontal"===gt,i=r?"offsetLeft":"offsetTop",o=r?"left":"top";K.scroll({[o]:Math.max(0,t[e][i]-vt/2),behavior:n})}function jt(t){const e=At(),n=K.getBoundingClientRect(),r=e.findIndex((t=>function(t,e){return"horizontal"===gt?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 i=e.map((t=>function(t,e){return"horizontal"===gt?e.right>t.left&&t.right>e.left:e.bottom>t.top&&t.bottom>e.top}(n,t.getBoundingClientRect()))),o=i.findIndex(Boolean);return-1!==o?"prev"===t&&2===i.filter(Boolean).length?o+1:o:"prev"===t?1:e.length-2}return!L.id||lt||(null==q?void 0:q.fakeElement)||G.registerInstance(L.id,{setCurrentItem(t){const e=At();if(t<0||t>e.length-1)throw new Error('Item is out of range in "set-current-item" action');Vt(e,t)},setPreviousItem(t){const e=jt("prev"),n=At();let r=e-1;r<0&&(r="ring"===t?n.length-1:e),Vt(n,r)},setNextItem(t){const e="horizontal"===gt?K.scrollLeft+K.offsetWidth===K.scrollWidth:K.scrollTop+K.offsetHeight===K.scrollHeight,n=At();if(e&&"ring"===t)return void Vt(n,0);const r=jt("next");let i=r+1;i>n.length-1&&(i="ring"===t?0:r),Vt(n,i)}}),Y((()=>{r(36,ot=!0),!lt&&(kt(),xt)&&Vt(At(),xt,"auto")})),Z((()=>{r(36,ot=!1),L.id&&!(null==q?void 0:q.fakeElement)&&G.unregisterInstance(L.id)})),t.$$set=t=>{"json"in t&&r(0,L=t.json),"templateContext"in t&&r(1,W=t.templateContext),"origJson"in t&&r(2,H=t.origJson),"layoutParams"in t&&r(3,q=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(49,i=L.items),262144&t.$$.dirty[1]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(5,lt=!1):(r(5,lt=!0),G.logError(It(new Error('Incorrect or empty "items" prop for div "gallery"'))))),34&t.$$.dirty[0]|262144&t.$$.dirty[1]&&r(48,o=(!lt&&i||[]).map((t=>{let e=t,n=W;return({templateContext:n,json:e}=G.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),32&t.$$.dirty[0]|268435488&t.$$.dirty[1]&&r(9,a=S&&ot&&!lt),528&t.$$.dirty[0]|16&t.$$.dirty[1]&&(a?"undefined"!=typeof ResizeObserver&&(r(35,it=new ResizeObserver((()=>{Et()}))),it.observe(X)):it&&(it.disconnect(),r(35,it=null))),1&t.$$.dirty[0]&&(r(27,s=G.getDerivedFromVars(L.column_count)),R(),R=h(s,(t=>r(58,D=t)))),134217792&t.$$.dirty[1]&&r(37,ft=We(D,ft)),131136&t.$$.dirty[1]&&r(26,l=function(t,e){let n=0,r=[];for(let i=0;i<t.length;++i)r[n]||(r[n]=[]),r[n].push(t[i]),++n>=e&&(n=0);return r}(o,ft)),1&t.$$.dirty[0]&&(r(25,c=G.getDerivedFromVars(L.orientation)),B(),B=h(c,(t=>r(57,P=t)))),64&t.$$.dirty[0]|67108864&t.$$.dirty[1]&&r(6,gt=Tn(P,gt)),1&t.$$.dirty[0]&&(r(24,u=G.getDerivedFromVars(L.cross_content_alignment)),J(),J=h(u,(t=>r(56,j=t)))),33554560&t.$$.dirty[1]&&r(38,mt=function(t,e){return"start"===t||"center"===t||"end"===t?t:e}(j,mt)),1&t.$$.dirty[0]&&(r(23,d=G.getDerivedFromVars(L.item_spacing)),O(),O=h(d,(t=>r(55,V=t)))),16777728&t.$$.dirty[1]&&(r(40,vt=ue(V,vt)),r(39,ut=Rt(vt))),1&t.$$.dirty[0]&&(r(22,p=G.getDerivedFromVars(L.cross_spacing)),I(),I=h(p,(t=>r(54,A=t)))),8391168&t.$$.dirty[1]&&(r(42,pt=ue(A,vt)),r(41,dt=Rt(pt))),1&t.$$.dirty[0]&&(r(21,g=G.getDerivedFromVars(L.paddings)),T(),T=h(g,(t=>r(53,C=t)))),4198400&t.$$.dirty[1]&&r(43,yt=ce(C,yt)),64&t.$$.dirty[0]&&r(47,m="horizontal"===gt?"grid-template-columns":"grid-template-rows"),64&t.$$.dirty[0]|131072&t.$$.dirty[1]){let t=[];o.forEach((e=>{const n="horizontal"===gt?"width":"height";t.push(G.getDerivedFromVars(e.json[n]))})),r(14,ht=Mt(t,(t=>t))),M(),M=h(ht,(t=>r(52,E=t)))}if(64&t.$$.dirty[0]|2105408&t.$$.dirty[1]&&(r(44,$t=[]),ft>1?$t.push("auto"):E.forEach((t=>{!t&&"horizontal"===gt||"match_parent"===(null==t?void 0:t.type)?$t.push("100%"):$t.push("max-content")}))),1&t.$$.dirty[0]&&(r(20,v=G.getDerivedFromVars(L.scroll_mode)),N(),N=h(v,(t=>r(51,k=t)))),456&t.$$.dirty[0]|1049280&t.$$.dirty[1]){const t={};let e={};r(45,_t=!1),(null==q?void 0:q.fakeElement)&&(e.fakeElement=!0),"horizontal"===gt?e.parentVAlign=mt:e.parentHAlign=mt,"paging"===k&&(r(45,_t=!0),e.scrollSnap="start",t["horizontal"===gt?"scroll-padding-left":"scroll-padding-top"]=Rt(vt/2)),1===ft&&(e.parentLayoutOrientation=gt),r(7,bt=he(t,bt)),r(8,wt=he(e,wt))}1&t.$$.dirty[0]&&(r(19,y=G.getDerivedFromVars(L.restrict_parent_scroll)),U(),U=h(y,(t=>r(28,F=t)))),5120&t.$$.dirty[1]&&r(18,$={padding:yt,"grid-gap":dt}),73984&t.$$.dirty[1]&&r(17,b={"grid-gap":ut,[m]:ur($t)}),64&t.$$.dirty[0]|16384&t.$$.dirty[1]&&r(16,_={orientation:gt,"scroll-snap":_t}),1&t.$$.dirty[0]&&(r(15,w=G.getDerivedFromVars(L.default_item)),z(),z=h(w,(t=>r(50,x=t)))),557056&t.$$.dirty[1]&&r(46,xt=ue(x,xt))},[L,W,H,q,X,lt,gt,bt,wt,a,K,Q,et,nt,ht,w,_,b,$,y,v,g,p,d,u,c,l,s,F,at,st,ct,kt,Et,Ct,it,ot,ft,mt,ut,vt,dt,pt,yt,$t,_t,xt,m,o,i,x,k,E,C,A,V,j,P,D,S,function(t,e){rt[t?"unshift":"push"]((()=>{Q[e]=t,r(11,Q)}))},function(t){rt[t?"unshift":"push"]((()=>{X=t,r(4,X)}))},function(t){rt[t?"unshift":"push"]((()=>{K=t,r(10,K)}))},()=>Ct("left"),()=>Ct("right")]}const kr={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"},{Boolean:Er}=Et;function Cr(t,e,n){const r=t.slice();return r[83]=e[n],r[85]=n,r}function Ar(t,e,n){const r=t.slice();r[83]=e[n],r[85]=n;const i=r[85]===r[6];return r[86]=i,r}function Vr(t){let e,n;return e=new Ue({props:{cls:ie("tabs",kr,t[42]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customActions:"tabs",$$slots:{default:[zr]},$$scope:{ctx:t}}}),{c(){jt(e.$$.fragment)},m(t,r){Pt(e,t,r),n=!0},p(t,n){const r={};1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),536870890&n[0]|517&n[1]|67108864&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(_t(e.$$.fragment,t),n=!0)},o(t){wt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function jr(t){let e,n,r=t[83].title+"";return{c(){e=M(r),n=T()},m(t,r){D(t,e,r),D(t,n,r)},p(t,n){262144&n[0]&&r!==(r=t[83].title+"")&&R(e,r)},d(t){t&&S(e),t&&S(n)}}}function Pr(t){var e,n,r;let i,o;function a(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t[59](t[85],...n)}return i=new Ce({props:{cls:ie("tabs__item",kr,{selected:t[86],actionable:Boolean(t[83].title_click_action)}),actions:!t[83].title_click_action||null!==(e=t[3])&&void 0!==e&&e.fakeElement?[]:[t[83].title_click_action],attrs:{id:"".concat(t[41],"-tab-").concat(t[85]),"aria-controls":"".concat(t[41],"-panel-").concat(t[85]),role:"tab",tabindex:!t[86]||null!==(n=t[3])&&void 0!==n&&n.fakeElement?"-1":t[83].title_click_action?void 0:"0","aria-selected":t[86]?"true":"false"},customAction:null!==(r=t[3])&&void 0!==r&&r.fakeElement?null:a,$$slots:{default:[jr]},$$scope:{ctx:t}}}),{c(){jt(i.$$.fragment)},m(t,e){Pt(i,t,e),o=!0},p(e,n){var r,o,s;t=e;const l={};262208&n[0]&&(l.cls=ie("tabs__item",kr,{selected:t[86],actionable:Boolean(t[83].title_click_action)})),262152&n[0]&&(l.actions=!t[83].title_click_action||null!==(r=t[3])&&void 0!==r&&r.fakeElement?[]:[t[83].title_click_action]),262216&n[0]&&(l.attrs={id:"".concat(t[41],"-tab-").concat(t[85]),"aria-controls":"".concat(t[41],"-panel-").concat(t[85]),role:"tab",tabindex:!t[86]||null!==(o=t[3])&&void 0!==o&&o.fakeElement?"-1":t[83].title_click_action?void 0:"0","aria-selected":t[86]?"true":"false"}),8&n[0]&&(l.customAction=null!==(s=t[3])&&void 0!==s&&s.fakeElement?null:a),262144&n[0]|67108864&n[2]&&(l.$$scope={dirty:n,ctx:t}),i.$set(l)},i(t){o||(_t(i.$$.fragment,t),o=!0)},o(t){wt(i.$$.fragment,t),o=!1},d(t){Dt(i,t)}}}function Dr(t){let e,n,r;return{c(){e=z("div"),J(e,"class",n=kr.tabs__separator),J(e,"style",r=Bt(t[33]))},m(t,n){D(t,e,n)},p(t,n){4&n[1]&&r!==(r=Bt(t[33]))&&J(e,"style",r)},d(t){t&&S(e)}}}function Sr(t){let e,n;return e=new bo({props:{div:t[83].div,templateContext:t[1],layoutParams:t[5]}}),{c(){jt(e.$$.fragment)},m(t,r){Pt(e,t,r),n=!0},p(t,n){const r={};262144&n[0]&&(r.div=t[83].div),2&n[0]&&(r.templateContext=t[1]),32&n[0]&&(r.layoutParams=t[5]),e.$set(r)},i(t){n||(_t(e.$$.fragment,t),n=!0)},o(t){wt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function Fr(t){let e,n,r,i,o,a,s=t[27][t[85]]&&Sr(t);return{c(){e=z("div"),s&&s.c(),n=T(),J(e,"class",r=ie("tabs__panel",kr,{visible:t[28][t[85]]})),J(e,"role","tabpanel"),J(e,"id",i=t[41]+"-panel-"+t[85]),J(e,"aria-labelledby",o=t[41]+"-tab-"+t[85]),U(e,"left",100*t[85]+"%")},m(t,r){D(t,e,r),s&&s.m(e,null),V(e,n),a=!0},p(t,i){t[27][t[85]]?s?(s.p(t,i),134217728&i[0]&&_t(s,1)):(s=Sr(t),s.c(),_t(s,1),s.m(e,n)):s&&($t(),wt(s,1,1,(()=>{s=null})),bt()),(!a||268435456&i[0]&&r!==(r=ie("tabs__panel",kr,{visible:t[28][t[85]]})))&&J(e,"class",r)},i(t){a||(_t(s),a=!0)},o(t){wt(s),a=!1},d(t){t&&S(e),s&&s.d()}}}function zr(t){let e,n,r,i,o,a,c,u,d,p,h,f=t[18],g=[];for(let e=0;e<f.length;e+=1)g[e]=Pr(Ar(t,f,e));const m=t=>wt(g[t],1,1,(()=>{g[t]=null}));let v=t[19]&&Dr(t),y=t[18],$=[];for(let e=0;e<y.length;e+=1)$[e]=Fr(Cr(t,y,e));const b=t=>wt($[t],1,1,(()=>{$[t]=null}));return{c(){e=z("div");for(let t=0;t<g.length;t+=1)g[t].c();r=T(),v&&v.c(),i=T(),o=z("div"),a=z("div");for(let t=0;t<$.length;t+=1)$[t].c();J(e,"class",n=kr.tabs__list+" "+(t[40]?"divkit-aa145":"")),J(e,"role","tablist"),U(e,"--divkit-tabs-title-padding",t[17]?ae(t[17]):"",!1),U(e,"--divkit-tabs-font-size",Rt(t[7]),!1),U(e,"--divkit-tabs-paddings",t[8],!1),U(e,"--divkit-tabs-line-height",t[23],!1),U(e,"--divkit-tabs-letter-spacing",t[24],!1),U(e,"--divkit-tabs-active-font-weight",t[10]||"",!1),U(e,"--divkit-tabs-inactive-font-weight",t[11]||"",!1),U(e,"--divkit-tabs-active-text-color",t[12],!1),U(e,"--divkit-tabs-inactive-text-color",t[13],!1),U(e,"--divkit-tabs-active-background-color",t[14],!1),U(e,"--divkit-tabs-inactive-background-color",t[15],!1),U(e,"--divkit-tabs-border-radius",t[9],!1),U(e,"--divkit-tabs-items-spacing",t[16]?Ut(t[16]):"",!1),J(a,"class",c=ie("tabs__swiper",kr,{inited:t[25],animated:t[26]})),J(o,"class",u=kr.tabs__panels+" "+(t[40]?"divkit-aa145":""))},m(n,s){D(n,e,s);for(let t=0;t<g.length;t+=1)g[t].m(e,null);t[60](e),D(n,r,s),v&&v.m(n,s),D(n,i,s),D(n,o,s),V(o,a);for(let t=0;t<$.length;t+=1)$[t].m(a,null);t[61](a),t[62](o),d=!0,p||(h=[O(e,"keydown",t[44]),O(a,"touchstart",(function(){l(t[31]?t[45]:void 0)&&(t[31]?t[45]:void 0).apply(this,arguments)})),O(a,"touchmove",(function(){l(t[31]?t[46]:void 0)&&(t[31]?t[46]:void 0).apply(this,arguments)})),O(a,"touchend",(function(){l(t[31]?t[47]:void 0)&&(t[31]?t[47]:void 0).apply(this,arguments)})),O(a,"touchcancel",(function(){l(t[31]?t[47]:void 0)&&(t[31]?t[47]:void 0).apply(this,arguments)}))],p=!0)},p(r,s){if(t=r,262216&s[0]|5120&s[1]){let n;for(f=t[18],n=0;n<f.length;n+=1){const r=Ar(t,f,n);g[n]?(g[n].p(r,s),_t(g[n],1)):(g[n]=Pr(r),g[n].c(),_t(g[n],1),g[n].m(e,null))}for($t(),n=f.length;n<g.length;n+=1)m(n);bt()}if((!d||512&s[1]&&n!==(n=kr.tabs__list+" "+(t[40]?"divkit-aa145":"")))&&J(e,"class",n),131072&s[0]&&U(e,"--divkit-tabs-title-padding",t[17]?ae(t[17]):"",!1),128&s[0]&&U(e,"--divkit-tabs-font-size",Rt(t[7]),!1),256&s[0]&&U(e,"--divkit-tabs-paddings",t[8],!1),8388608&s[0]&&U(e,"--divkit-tabs-line-height",t[23],!1),16777216&s[0]&&U(e,"--divkit-tabs-letter-spacing",t[24],!1),1024&s[0]&&U(e,"--divkit-tabs-active-font-weight",t[10]||"",!1),2048&s[0]&&U(e,"--divkit-tabs-inactive-font-weight",t[11]||"",!1),4096&s[0]&&U(e,"--divkit-tabs-active-text-color",t[12],!1),8192&s[0]&&U(e,"--divkit-tabs-inactive-text-color",t[13],!1),16384&s[0]&&U(e,"--divkit-tabs-active-background-color",t[14],!1),32768&s[0]&&U(e,"--divkit-tabs-inactive-background-color",t[15],!1),512&s[0]&&U(e,"--divkit-tabs-border-radius",t[9],!1),65536&s[0]&&U(e,"--divkit-tabs-items-spacing",t[16]?Ut(t[16]):"",!1),t[19]?v?v.p(t,s):(v=Dr(t),v.c(),v.m(i.parentNode,i)):v&&(v.d(1),v=null),402915362&s[0]|1024&s[1]){let e;for(y=t[18],e=0;e<y.length;e+=1){const n=Cr(t,y,e);$[e]?($[e].p(n,s),_t($[e],1)):($[e]=Fr(n),$[e].c(),_t($[e],1),$[e].m(a,null))}for($t(),e=y.length;e<$.length;e+=1)b(e);bt()}(!d||100663296&s[0]&&c!==(c=ie("tabs__swiper",kr,{inited:t[25],animated:t[26]})))&&J(a,"class",c),(!d||512&s[1]&&u!==(u=kr.tabs__panels+" "+(t[40]?"divkit-aa145":"")))&&J(o,"class",u)},i(t){if(!d){for(let t=0;t<f.length;t+=1)_t(g[t]);for(let t=0;t<y.length;t+=1)_t($[t]);d=!0}},o(t){g=g.filter(Er);for(let t=0;t<g.length;t+=1)wt(g[t]);$=$.filter(Er);for(let t=0;t<$.length;t+=1)wt($[t]);d=!1},d(n){n&&S(e),F(g,n),t[60](null),n&&S(r),v&&v.d(n),n&&S(i),n&&S(o),F($,n),t[61](null),t[62](null),p=!1,s(h)}}}function Nr(t){let e,n,r=!t[4]&&Vr(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){t[4]?r&&($t(),wt(r,1,1,(()=>{r=null})),bt()):r?(r.p(t,n),16&n[0]&&_t(r,1)):(r=Vr(t),r.c(),_t(r,1),r.m(e.parentNode,e))},i(t){n||(_t(r),n=!0)},o(t){wt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Mr(t,e,r){let i,o,a,s,l,c,u,d,p,f,g,m,v,y,$,b,_,w,x,k,E,C,A=n,V=n,j=n,P=n,D=n,S=n,F=n,z=n,N=n;var M;t.$$.on_destroy.push((()=>A())),t.$$.on_destroy.push((()=>V())),t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>S())),t.$$.on_destroy.push((()=>F())),t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>N()));let{json:T={}}=e,{templateContext:I}=e,{origJson:O}=e,{layoutParams:J}=e;const B=tt(Tt),R=B.genId("tabs");let U,L,W,H=!1,q={};const G=B.getJsonWithVars(T.selected_tab);let K,X,Y=G&&Number(G)||0,Q=12,et="",nt="",it="",ot="",at="",st="",lt="",ut="",dt=0,pt="",ht="",ft=null,gt=!1,mt=!1,vt=Y,yt=[],$t=[];async function bt(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(vt=Y,r(6,Y=t),Vt(),xt(),e){await ct();const t=U.querySelector(".".concat(kr.tabs__item_selected));t&&t.focus()}}function _t(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=null==i?void 0:i.length;if(!n)return;let r=Y+t;r>=n?r=0:r<0&&(r=n-1),bt(r,e)}function wt(t,e){return Y===e||(bt(e),!1)}function xt(){r(26,mt=!0),kt(100*-Y),Et(),async function(){await ct();const t=document.getElementById("".concat(R,"-panel-").concat(Y));t&&r(21,L.style.height=Rt(t.offsetHeight),L)}(),At(),Dt=-Y*L.clientWidth}async function kt(t){await ct(),r(22,W.style.transform="translate3d(".concat(t,"%,0,0)"),W)}function Et(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=t?Math.max(0,Y-1):Math.min(Y,vt),n=t?Math.min(i.length-1,Y+1):Math.max(Y,vt);r(27,yt=yt.map(((t,r)=>t||r>=e&&r<=n))),r(28,$t=$t.map(((t,r)=>r>=e&&r<=n)))}let Ct=null;function At(){Ct&&clearTimeout(Ct),Ct=window.setTimeout((()=>{r(28,$t=i.map(((t,e)=>e===Y)))}),400)}function Vt(){gt||(r(25,gt=!0),r(21,L.style.height=Rt(L.clientHeight),L),r(22,W.style.transform="translate3d(".concat(100*-vt,"%,0,0)"),W))}let jt,Pt,Dt,St=null,Ft=null,zt=!1,Nt=!1;return!T.id||H||(null==J?void 0:J.fakeElement)||B.registerInstance(T.id,{setCurrentItem(t){if(t<0||t>i.length-1)throw new Error('Item is out of range in "set-current-item" action');bt(t)},setPreviousItem(t){let e=Y-1;e<0&&(e="ring"===t?i.length-1:Y),bt(e)},setNextItem(t){let e=Y+1;e>i.length-1&&(e="ring"===t?0:Y),bt(e)}}),Z((()=>{T.id&&!(null==J?void 0:J.fakeElement)&&B.unregisterInstance(T.id)})),t.$$set=t=>{"json"in t&&r(0,T=t.json),"templateContext"in t&&r(1,I=t.templateContext),"origJson"in t&&r(2,O=t.origJson),"layoutParams"in t&&r(3,J=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(18,i=T.items||[]),262144&t.$$.dirty[0]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(4,H=!1):(r(4,H=!0),B.logError(It(new Error('Incorrect or empty "items" prop for div "tabs"'))))),1&t.$$.dirty[0]&&(r(39,o=B.getDerivedFromVars(T.width)),z(),z=h(o,(t=>r(58,E=t)))),1&t.$$.dirty[0]&&(r(38,a=B.getDerivedFromVars(T.height)),F(),F=h(a,(t=>r(57,k=t)))),40&t.$$.dirty[0]|201326592&t.$$.dirty[1]){let t={};(null==J?void 0:J.fakeElement)&&(t.fakeElement=!0),"wrap_content"===(null==E?void 0:E.type)&&(t.parentHorizontalWrapContent=!0),k&&"wrap_content"!==k.type||(t.parentVerticalWrapContent=!0),r(5,q=he(t,q))}if(262225&t.$$.dirty[0]&&!H&&(Y<0||Y>=i.length)&&(B.logError(It(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:T.selected_tab,length:i.length}})),r(6,Y=Y<0?0:i.length-1)),1&t.$$.dirty[0]&&(r(37,s=B.getDerivedFromVars(T.tab_title_style)),S(),S=h(s,(t=>r(56,x=t)))),33554432&t.$$.dirty[1]&&r(51,l=x||{}),128&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(7,Q=We(l.font_size,Q)),384&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&(l.font_size||l.paddings)){const t=l.paddings||{top:6,right:8,bottom:6,left:8},e={top:(Number(t.top)||0)/Q*10,right:(Number(t.right)||0)/Q*10,bottom:(Number(t.bottom)||0)/Q*10,left:(Number(t.left)||0)/Q*10};r(8,et=ce(e,et))}if(128&t.$$.dirty[0]|1048576&t.$$.dirty[1]){const t=l.line_height;void 0!==t&&Ae(t)&&r(23,nt=Rt(t/Q*10))}if(128&t.$$.dirty[0]|1048576&t.$$.dirty[1]){const t=l.letter_spacing;void 0!==t&&le(t)&&r(24,it=Rt(t/Q*10))}if(640&t.$$.dirty[0]|1179648&t.$$.dirty[1]&&(l.corner_radius||l.corners_radius||l.font_size)){const t=null!==r(48,M=l.corner_radius)&&void 0!==M?M:1e3;l.corners_radius?r(9,ot=function(t,e,n,r){const i=[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]];for(let t=0;t<i.length;++t)if(i[t]&&!le(i[t]))return r;return ye(t,e,n)}(l.corners_radius,t,Q,ot)):le(t)&&r(9,ot=Rt(t/Q*10))}1024&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(10,K=qe(l.active_font_weight||l.font_weight,K)),2048&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(11,X=qe(l.inactive_font_weight||l.font_weight,X)),4096&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(12,at=Wt(l.active_text_color,1,at)),8192&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(13,st=Wt(l.inactive_text_color,1,st)),16384&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(14,lt=Wt(l.active_background_color,1,lt)),32768&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(15,ut=Wt(l.inactive_background_color,1,ut)),65536&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(16,dt=ue(l.item_spacing,dt)),1&t.$$.dirty[0]&&(r(36,c=B.getDerivedFromVars(T.has_separator)),D(),D=h(c,(t=>r(19,w=t)))),1&t.$$.dirty[0]&&(r(35,u=B.getDerivedFromVars(T.separator_color)),P(),P=h(u,(t=>r(55,_=t)))),1&t.$$.dirty[0]&&(r(34,d=B.getDerivedFromVars(T.separator_paddings)),j(),j=h(d,(t=>r(54,b=t)))),524288&t.$$.dirty[0]|25952256&t.$$.dirty[1]&&w&&(_&&r(49,pt=Wt(_,1,pt)),b&&r(50,ht=ce(b,ht))),786432&t.$$.dirty[1]&&r(33,p={background:pt,margin:ht}),1&t.$$.dirty[0]&&(r(32,f=B.getDerivedFromVars(T.switch_tabs_by_content_swipe_enabled)),V(),V=h(f,(t=>r(53,$=t)))),4194304&t.$$.dirty[1]&&r(31,g=void 0===$||Boolean($)),1&t.$$.dirty[0]&&(r(30,m=B.getDerivedFromVars(T.restrict_parent_scroll)),N(),N=h(m,(t=>r(40,C=t)))),1&t.$$.dirty[0]&&(r(29,v=B.getDerivedFromVars(T.title_paddings)),A(),A=h(v,(t=>r(52,y=t)))),131072&t.$$.dirty[0]|2097152&t.$$.dirty[1]&&r(17,ft=ve(y||void 0,ft)),262144&t.$$.dirty[0]&&(H||(r(27,yt=i.map(((t,e)=>e===Y))),r(28,$t=i.map(((t,e)=>e===Y)))))},[T,I,O,J,H,q,Y,Q,et,ot,K,X,at,st,lt,ut,dt,ft,i,w,U,L,W,nt,it,gt,mt,yt,$t,v,m,g,f,p,d,u,c,s,a,o,C,R,{},wt,function(t){if(!(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)&&i){if(37===t.which)_t(-1,!0);else if(39===t.which)_t(1,!0);else if(36===t.which)bt(0,!0);else{if(35!==t.which)return;bt(i.length-1,!0)}t.preventDefault()}},function(t){var e;const n=t.target,o=null===(e=null==n?void 0:n.closest)||void 0===e?void 0:e.call(n,".".concat("divkit-aa145"));i.length<2||t.touches.length>1||o&&o!==L||(zt=!1,Nt=!1,St=_e(t),Ft=null,jt=Date.now(),Pt=Dt||-Y*L.clientWidth,r(26,mt=!1),Ct&&clearTimeout(Ct))},function(t){const e=_e(t);if(!St||Ft&&Ft.x===e.x&&Ft.y===e.y)return;Ft=e;const n=L.clientWidth;if(zt){Dt=e.x-St.x+Pt;const t=n*i.length;if(Dt>0)Dt=Dt*n/(Dt+3*n);else if(-Dt+n>t){let e=-Dt+n-t;e=e*n/(e+3*n),Dt=n-t-e}kt(100*Dt/n)}else Math.abs(e.y-St.y)>10?Nt=!0:!Nt&&Math.abs(e.x-St.x)>8&&(Vt(),zt=!0,St=e,kt(100*-Y),Et(!0));zt&&t.cancelable&&t.preventDefault()},function(){Nt=!1,St=null;let t=Y;if(!zt)return;zt=!1;const e=Math.min(512,L.clientWidth);Math.abs(Pt-Dt)>e/4*Math.min(1,(Date.now()-jt)/750)&&(t+=Pt>Dt?1:-1),t>=i.length?t=i.length-1:t<0&&(t=0),t===Y?(Dt=-t*e,kt(100*-t),At()):bt(t)},M,pt,ht,l,y,$,b,_,x,k,E,(t,e)=>wt(0,t),function(t){rt[t?"unshift":"push"]((()=>{U=t,r(20,U)}))},function(t){rt[t?"unshift":"push"]((()=>{W=t,r(22,W)}))},function(t){rt[t?"unshift":"push"]((()=>{L=t,r(21,L)}))}]}function Tr(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function Ir(t){return t*t*t}function Or(t){const e=t-1;return e*e*e+1}function Jr(t){return e=>{if(e<=0)return 0;if(e>=1)return 1;const n=e*t.length,r=Math.floor(n),i=n-r;return t[r]*i+t[r+1]*(1-i)}}const Br=Jr([.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]),Rr=Jr([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]),Ur={linear:r,ease:Br,ease_in:Ir,ease_out:Or,ease_in_out:Tr,spring:Rr};function Lr(t){return Math.max(...t.map((t=>(Number(t.duration)||200)+(Number(t.start_delay)||0))))}function Wr(t,e){let{transitions:n,elementBbox:r,rootBbox:i,direction:o,maxDuration:a,alpha:s}=e;const l=null!=s?s:1;return{duration:a,css:t=>{const e=t*a,s=n.map((t=>{const n=Number(t.start_delay)||0,a=Number(t.duration)||200,s=Math.max(0,Math.min(1,(e-n)/a)),c="in"===o?1-s:s,u=(Ur[t.interpolator||"ease_in_out"]||Tr)(c);if("fade"===t.type)return u>=1?{active:!1,opacity:0}:{active:u>0&&u<1,opacity:(1-u)*l+u*(t.alpha||0)};if("slide"===t.type){var d;const e="top"===t.edge||"left"===t.edge?-1:1,n="top"!==t.edge&&"bottom"!==t.edge&&t.edge?"translateX":"translateY";let o=null===(d=t.distance)||void 0===d?void 0:d.value;void 0===o&&(o="top"!==t.edge&&"bottom"!==t.edge&&t.edge?Math.abs(i["left"===t.edge?"left":"right"]-r["left"===t.edge?"right":"left"]):Math.abs(i["bottom"===t.edge?"bottom":"top"]-r["bottom"===t.edge?"top":"bottom"]));const a=o*u;return{active:u>0&&u<1,translate:"".concat(n,"(").concat(a*e,"px)")}}if("scale"===t.type){var p,h;const e=1-u+u*(t.scale||0),n=null!==(p=t.pivot_x)&&void 0!==p?p:.5,i=null!==(h=t.pivot_y)&&void 0!==h?h:.5,o=(1-e)*r.width*n,a=(1-e)*r.height*i;return{active:u>0&&u<1,scale:"translate(".concat(o,"px, ").concat(a,"px) scale(").concat(e,")")}}return{}})),c=s.map((t=>t.opacity)).filter((t=>void 0!==t)).reduce(((t,e)=>t*e),1),u=s.map((t=>t.translate)).filter((t=>void 0!==t)).join(" "),d=s.map((t=>t.scale)).filter((t=>void 0!==t)).join(" "),p=s.filter((t=>t.active)).map((t=>t.scale)).filter((t=>void 0!==t)),h=[u,p.length?p[p.length-1]:d].filter(Boolean).join(" ");return"transform:".concat(h||"none",";opacity:").concat(c)}}}function Hr(t,e,n){return t*(1-n)+e*n}const qr={linear:r,ease:Br,ease_in:Ir,ease_out:Or,ease_in_out:Tr,spring:Rr};function Gr(t,e){var n,r;let{rootBbox:i,beforeBbox:o,afterBbox:a,transition:s}=e;return{delay:null!==(n=s.start_delay)&&void 0!==n?n:0,duration:null!==(r=s.duration)&&void 0!==r?r:200,easing:s.interpolator&&s.interpolator in qr?qr[s.interpolator]:Tr,css:t=>["top:".concat(Hr(o.top,a.top,t)-i.top,"px"),"left:".concat(Hr(o.left,a.left,t)-i.left,"px"),"width:".concat(Hr(o.width,a.width,t),"px"),"height:".concat(Hr(o.height,a.height,t),"px")].join(";")}}function Kr(t){const e=[];return"set"===t.type?(t.items||[]).forEach((t=>{e.push(...Kr(t))})):e.push(t),e}const{Map:Xr}=Et;function Yr(t,e,n){const r=t.slice();return r[27]=e[n],r}function Zr(t){let e,n;return e=new Ue({props:{cls:"divkit-b8efc",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[ii]},$$scope:{ctx:t}}}),{c(){jt(e.$$.fragment)},m(t,r){Pt(e,t,r),n=!0},p(t,n){const r={};1&n&&(r.json=t[0]),4&n&&(r.origJson=t[2]),2&n&&(r.templateContext=t[1]),8&n&&(r.layoutParams=t[3]),1073742034&n&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(_t(e.$$.fragment,t),n=!0)},o(t){wt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function Qr(t){let e,r,i=t[7],o=ti(t);return{c(){o.c(),e=I()},m(t,n){o.m(t,n),D(t,e,n),r=!0},p(t,r){128&r&&d(i,i=t[7])?($t(),wt(o,1,1,n),bt(),o=ti(t),o.c(),_t(o,1),o.m(e.parentNode,e)):o.p(t,r)},i(t){r||(_t(o),r=!0)},o(t){wt(o),r=!1},d(t){t&&S(e),o.d(t)}}}function ti(t){let e,n;return e=new bo({props:{div:t[7].div,templateContext:t[1]}}),{c(){jt(e.$$.fragment)},m(t,r){Pt(e,t,r),n=!0},p(t,n){const r={};128&n&&(r.div=t[7].div),2&n&&(r.templateContext=t[1]),e.$set(r)},i(t){n||(_t(e.$$.fragment,t),n=!0)},o(t){wt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function ei(t){let e,n,r,i,o,a,s,l,c,u;function d(){return t[11](t[27])}return r=new bo({props:{div:t[27].json,templateContext:t[27].templateContext,layoutParams:{fakeElement:!0}}}),{c(){e=z("div"),n=z("div"),jt(r.$$.fragment),o=T(),J(n,"class",i="divkit-e08c6"),J(e,"class",a="divkit-eb860")},m(t,i){D(t,e,i),V(e,n),Pt(r,n,null),V(e,o),l=!0,c||(u=O(e,"introend",d),c=!0)},p(e,n){t=e;const i={};64&n&&(i.div=t[27].json),64&n&&(i.templateContext=t[27].templateContext),r.$set(i)},i(n){l||(_t(r.$$.fragment,n),s||ut((()=>{s=kt(e,Gr,t[27]),s.start()})),l=!0)},o(t){wt(r.$$.fragment,t),l=!1},d(t){t&&S(e),Dt(r),c=!1,u()}}}function ni(t){let e,n,r,i,o,a,s,l,c,u;function d(){return t[10](t[27])}return r=new bo({props:{div:t[27].json,templateContext:t[27].templateContext,layoutParams:{fakeElement:!0}}}),{c(){e=z("div"),n=z("div"),jt(r.$$.fragment),o=T(),J(n,"class",i="divkit-e08c6"),J(e,"class",a="divkit-eb860"),U(e,"left",t[27].offsetLeft+"px"),U(e,"top",t[27].offsetTop+"px"),U(e,"width",t[27].width+"px"),U(e,"height",t[27].height+"px")},m(t,i){D(t,e,i),V(e,n),Pt(r,n,null),V(e,o),l=!0,c||(u=O(e,"introend",d),c=!0)},p(n,i){t=n;const o={};64&i&&(o.div=t[27].json),64&i&&(o.templateContext=t[27].templateContext),r.$set(o),(!l||64&i)&&U(e,"left",t[27].offsetLeft+"px"),(!l||64&i)&&U(e,"top",t[27].offsetTop+"px"),(!l||64&i)&&U(e,"width",t[27].width+"px"),(!l||64&i)&&U(e,"height",t[27].height+"px")},i(n){l||(_t(r.$$.fragment,n),s||ut((()=>{s=kt(e,Wr,t[27]),s.start()})),l=!0)},o(t){wt(r.$$.fragment,t),l=!1},d(t){t&&S(e),Dt(r),c=!1,u()}}}function ri(t,e){let n,r,i,o,a;const s=[ni,ei],l=[];function c(t,e){return"direction"in t[27]?0:1}return r=c(e),i=l[r]=s[r](e),{key:t,first:null,c(){n=I(),i.c(),o=I(),this.first=n},m(t,e){D(t,n,e),l[r].m(t,e),D(t,o,e),a=!0},p(t,n){let a=r;r=c(e=t),r===a?l[r].p(e,n):($t(),wt(l[a],1,1,(()=>{l[a]=null})),bt(),i=l[r],i?i.p(e,n):(i=l[r]=s[r](e),i.c()),_t(i,1),i.m(o.parentNode,o))},i(t){a||(_t(i),a=!0)},o(t){wt(i),a=!1},d(t){t&&S(n),l[r].d(t),t&&S(o)}}}function ii(t){var e;let n,r,i,o,a=[],s=new Xr,l=(null===(e=t[7])||void 0===e?void 0:e.div)&&Qr(t),c=t[6];const u=t=>t[27];for(let e=0;e<c.length;e+=1){let n=Yr(t,c,e),r=u(n);s.set(r,a[e]=ri(r,n))}return{c(){l&&l.c(),n=T(),r=z("div");for(let t=0;t<a.length;t+=1)a[t].c();J(r,"class",i="divkit-adaae"),J(r,"aria-hidden","true")},m(e,i){l&&l.m(e,i),D(e,n,i),D(e,r,i);for(let t=0;t<a.length;t+=1)a[t].m(r,null);t[12](r),o=!0},p(t,e){var i;null!==(i=t[7])&&void 0!==i&&i.div?l?(l.p(t,e),128&e&&_t(l,1)):(l=Qr(t),l.c(),_t(l,1),l.m(n.parentNode,n)):l&&($t(),wt(l,1,1,(()=>{l=null})),bt()),320&e&&(c=t[6],$t(),a=function(t,e,n,r,i,o,a,s,l,c,u,d){let p=t.length,h=o.length,f=p;const g={};for(;f--;)g[t[f].key]=f;const m=[],v=new Map,y=new Map;for(f=h;f--;){const t=d(i,o,f),r=n(t);let s=a.get(r);s?s.p(t,e):(s=c(r,t),s.c()),v.set(r,m[f]=s),r in g&&y.set(r,Math.abs(f-g[r]))}const $=new Set,b=new Set;function _(t){_t(t,1),t.m(s,u),a.set(t.key,t),u=t.first,h--}for(;p&&h;){const e=m[h-1],n=t[p-1],r=e.key,i=n.key;e===n?(u=e.first,p--,h--):v.has(i)?!a.has(r)||$.has(r)?_(e):b.has(i)?p--:y.get(r)>y.get(i)?(b.add(r),_(e)):($.add(i),p--):(l(n,a),p--)}for(;p--;){const e=t[p];v.has(e.key)||l(e,a)}for(;h;)_(m[h-1]);return m}(a,e,u,0,t,c,s,r,Ct,ri,null,Yr),bt())},i(t){if(!o){_t(l);for(let t=0;t<c.length;t+=1)_t(a[t]);o=!0}},o(t){wt(l);for(let t=0;t<a.length;t+=1)wt(a[t]);o=!1},d(e){l&&l.d(e),e&&S(n),e&&S(r);for(let t=0;t<a.length;t+=1)a[t].d();t[12](null)}}}function oi(t){let e,n,r=!t[5]&&Zr(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){let[i]=n;t[5]?r&&($t(),wt(r,1,1,(()=>{r=null})),bt()):r?(r.p(t,i),32&i&&_t(r,1)):(r=Zr(t),r.c(),_t(r,1),r.m(e.parentNode,e))},i(t){n||(_t(r),n=!0)},o(t){wt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function ai(t){return"change_bounds"===t.type?t:"set"===t.type?ai(t.items[0]):null}function si(t,e,n){let r,{json:i={}}=e,{templateContext:o}=e,{origJson:a}=e,{layoutParams:s}=e;const l=tt(Tt),c=tt(oe);let u,d=new Map,p=new Set,h=!1,f=null,g=[],m=[],v=[],y=[];function $(t,e,n){let{json:r,templateContext:i,transitions:o,node:a}=e;r=l.getJsonWithVars(r),o=l.getJsonWithVars(o);const s=Kr(o),c=a.getBoundingClientRect();return{json:Object.assign(Object.assign({},r),{margins:void 0,alpha:(u=s,u.some((t=>"fade"===t.type))?void 0:r.alpha)}),templateContext:i,elementBbox:c,rootBbox:t,transitions:s,alpha:r.alpha,width:c.width,height:c.height,offsetTop:c.top-t.top,offsetLeft:c.left-t.left,direction:n,resolvePromise:e.resolvePromise,node:e.node};var u}const b=i.div_id||i.id;let _;b?(null==s?void 0:s.fakeElement)||(c.registerInstance(b,{async setState(t){if(_===t)return;l.setRunning("stateChange",!0);const e=new Set(p);g.forEach((t=>{t.resolvePromise&&t.resolvePromise()})),n(6,g=[]);let i=[];if(u){const t=u.getBoundingClientRect();i=v.map((e=>$(t,e,"out")))}y.forEach((t=>{d.set(t.id,t.node.getBoundingClientRect())})),m=[],v=[],y=[];const o=r.find((e=>e.state_id===t))||null;if(o?(_=t,n(7,w=o)):l.logError(It(new Error("Cannot find state with id"),{additional:{stateId:t}})),await ct(),!u)return;const a=u.getBoundingClientRect();let s=m.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=>$(a,t,"in")));i=i.filter((t=>{var e;return!(!t.json.id||p.has(t.json.id))||(null===(e=t.resolvePromise)||void 0===e||e.call(t),!1)}));const c=i.concat(s),h=c.reduce(((t,e)=>Math.max(t,Lr(e.transitions))),0),f=y.filter((t=>d.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:a,beforeBbox:d.get(t.id),afterBbox:t.node.getBoundingClientRect(),node:t.node,transition:ai(t.transitions),resolvePromise:t.resolvePromise})));n(6,g=[...c.map((t=>Object.assign(Object.assign({},t),{maxDuration:h}))),...f]),d.clear(),l.setRunning("stateChange",!1)},getChild(t){if(f&&f.has(t))return f.get(t);l.logError(It(new Error("Missing state block with id"),{additional:{id:t}}))}}),Q(oe,{registerInstance(t,e){f||(f=new Map),f.has(t)?l.logError(It(new Error("Duplicate state with id"),{additional:{id:t}})):f.set(t,e)},unregisterInstance(t){null==f||f.delete(t)},runVisibilityTransition(t,e,r,i,o){if(!u)return Promise.resolve();const a=$(u.getBoundingClientRect(),{json:t,templateContext:e,transitions:r,node:i},o),s=Lr(a.transitions),l=Object.assign(Object.assign({},a),{maxDuration:s});return n(6,g=[...g.filter((t=>t.node!==a.node)),l]),new Promise((t=>{l.resolvePromise=t}))},registerChildWithTransitionIn(t,e,n,r){const i={json:t,templateContext:e,transitions:n,node:r};return m.push(i),new Promise((t=>{i.resolvePromise=t}))},registerChildWithTransitionOut(t,e,n,r){const i={json:t,templateContext:e,transitions:n,node:r};return v.push(i),new Promise((t=>{i.resolvePromise=t}))},registerChildWithTransitionChange(t,e,n,r){const i=t.id;if(!i)return Promise.resolve();const o={id:i,json:t,templateContext:e,transitions:n,node:r};return y.push(o),new Promise((t=>{o.resolvePromise=t}))},hasTransitionChange:t=>!!t&&d.has(t),registerChild(t){p.add(t)},unregisterChild(t){p.delete(t)}})):(h=!0,l.logError(It(new Error('Missing "id" prop for div "state"'))));let w=null;const x=l.getJsonWithVars(i.default_state_id);let k=!1;function E(t){n(6,g=g.filter((e=>e!==t))),t.resolvePromise&&t.resolvePromise()}return Z((()=>{b&&!(null==s?void 0:s.fakeElement)&&c.unregisterInstance(b)})),t.$$set=t=>{"json"in t&&n(0,i=t.json),"templateContext"in t&&n(1,o=t.templateContext),"origJson"in t&&n(2,a=t.origJson),"layoutParams"in t&&n(3,s=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty&&i&&(p=new Set),1&t.$$.dirty&&n(9,r=i.states||[]),512&t.$$.dirty&&((null==r?void 0:r.length)?n(5,h=!1):(n(5,h=!0),l.logError(It(new Error('Empty "states" prop for div "state"'))))),512&t.$$.dirty&&function(t){k||(k=!0,t.length&&(x?(_=x,n(7,w=t.find((t=>t.state_id===_))||null),w||l.logError(It(new Error("Cannot find state for default_state_id"),{additional:{selectedId:_}}))):(n(7,w=t[0]),_=w.state_id)))}(r)},[i,o,a,s,u,h,g,w,E,r,t=>E(t),t=>E(t),function(t){rt[t?"unshift":"push"]((()=>{u=t,n(4,u)}))}]}const li={pager:"divkit-c5feb",pager__items:"divkit-f6987",pager__item:"divkit-feca7",pager_orientation_horizontal:"divkit-b0a1c",pager_orientation_vertical:"divkit-f772f"},{Boolean:ci}=Et;function ui(t,e,n){const r=t.slice();return r[48]=e[n],r}function di(t){let e,n;return e=new Ue({props:{cls:ie("pager",li,t[8]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,$$slots:{default:[hi]},$$scope:{ctx:t}}}),{c(){jt(e.$$.fragment)},m(t,r){Pt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=ie("pager",li,t[8])),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),33336&n[0]|1048576&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(_t(e.$$.fragment,t),n=!0)},o(t){wt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function pi(t){var e;let n,r,i,o,a;return r=new bo({props:{div:t[48].json,templateContext:t[48].templateContext,origJson:t[48].origJson,layoutParams:null!==(e=t[3])&&void 0!==e&&e.fakeElement?{fakeElement:!0}:void 0}}),{c(){n=z("div"),jt(r.$$.fragment),i=T(),J(n,"class",o=li.pager__item)},m(t,e){D(t,n,e),Pt(r,n,null),V(n,i),a=!0},p(t,e){var n;const i={};16&e[0]&&(i.div=t[48].json),16&e[0]&&(i.templateContext=t[48].templateContext),16&e[0]&&(i.origJson=t[48].origJson),8&e[0]&&(i.layoutParams=null!==(n=t[3])&&void 0!==n&&n.fakeElement?{fakeElement:!0}:void 0),r.$set(i)},i(t){a||(_t(r.$$.fragment,t),a=!0)},o(t){wt(r.$$.fragment,t),a=!1},d(t){t&&S(n),Dt(r)}}}function hi(t){let e,n,r,i,o,a,s=t[4],l=[];for(let e=0;e<s.length;e+=1)l[e]=pi(ui(t,s,e));const c=t=>wt(l[t],1,1,(()=>{l[t]=null}));return{c(){e=z("div");for(let t=0;t<l.length;t+=1)l[t].c();J(e,"class",n=li.pager__items+" "+(t[15]?"divkit-aa145":"")),J(e,"style",r=Bt(t[9]))},m(n,r){D(n,e,r);for(let t=0;t<l.length;t+=1)l[t].m(e,null);t[36](e),i=!0,o||(a=O(e,"scroll",t[16]),o=!0)},p(t,o){if(24&o[0]){let n;for(s=t[4],n=0;n<s.length;n+=1){const r=ui(t,s,n);l[n]?(l[n].p(r,o),_t(l[n],1)):(l[n]=pi(r),l[n].c(),_t(l[n],1),l[n].m(e,null))}for($t(),n=s.length;n<l.length;n+=1)c(n);bt()}(!i||32768&o[0]&&n!==(n=li.pager__items+" "+(t[15]?"divkit-aa145":"")))&&J(e,"class",n),(!i||512&o[0]&&r!==(r=Bt(t[9])))&&J(e,"style",r)},i(t){if(!i){for(let t=0;t<s.length;t+=1)_t(l[t]);i=!0}},o(t){l=l.filter(ci);for(let t=0;t<l.length;t+=1)wt(l[t]);i=!1},d(n){n&&S(e),F(l,n),t[36](null),o=!1,a()}}}function fi(t){let e,n,r=!t[7]&&di(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){t[7]?r&&($t(),wt(r,1,1,(()=>{r=null})),bt()):r?(r.p(t,n),128&n[0]&&_t(r,1)):(r=di(t),r.c(),_t(r,1),r.m(e.parentNode,e))},i(t){n||(_t(r),n=!0)},o(t){wt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function gi(t,e,r){let i,o,a,s,l,c,u,d,p,f,g,m,v,y,$,_,w,x=n,k=n,E=n,C=n,A=n,V=n;var j,P,D,S,F,z,N;t.$$.on_destroy.push((()=>x())),t.$$.on_destroy.push((()=>k())),t.$$.on_destroy.push((()=>E())),t.$$.on_destroy.push((()=>C())),t.$$.on_destroy.push((()=>A())),t.$$.on_destroy.push((()=>V()));let{json:M={}}=e,{templateContext:T}=e,{origJson:I}=e,{layoutParams:O}=e;const J=tt(Tt),B=J.genId("pager");let R,U=!1,L=!1,W=0,H=0,q=!1,G="horizontal",K="",X="",Q="";const et=dr((function(){if(!U)return;const t=function(){const t=Array.from(R.children),e=R.getBoundingClientRect(),n=t.findIndex((t=>{return n=e,r=t.getBoundingClientRect(),"horizontal"===G?r.left>=n.left&&r.right<=n.right:r.top>=n.top&&r.bottom<=n.bottom;var n,r}));return-1!==n?n:W}();t!==W&&r(25,W=t)}),50);function nt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"smooth";const n="horizontal"===G,i=R.children[t],o=n?"offsetLeft":"offsetTop",a=n?"left":"top";R.scroll({[a]:i[o],behavior:e}),r(25,W=t)}return M.id&&!(null==O?void 0:O.fakeElement)&&J.registerInstance(M.id,{setCurrentItem(t){if(t<0||t>i.length-1)throw new Error('Item is out of range in "set-current-item" action');nt(t)},setPreviousItem(t){let e=W-1;e<0&&(e="ring"===t?i.length-1:W),nt(e)},setNextItem(t){let e=W+1;e>i.length-1&&(e="ring"===t?0:W),nt(e)}}),Y((()=>{if(U=!0,Boolean(document.getElementById("".concat(B,"-tab-0")))){const t=[...R.children];for(const[e,n]of t.entries())n.setAttribute("role","tabpanel"),n.setAttribute("id","".concat(B,"-panel-").concat(e)),n.setAttribute("aria-labelledby","".concat(B,"-tab-").concat(e))}})),Z((()=>{U=!1,M.id&&!(null==O?void 0:O.fakeElement)&&J.unregisterInstance(M.id)})),t.$$set=t=>{"json"in t&&r(0,M=t.json),"templateContext"in t&&r(1,T=t.templateContext),"origJson"in t&&r(2,I=t.origJson),"layoutParams"in t&&r(3,O=t.layoutParams)},t.$$.update=()=>{if(131073&t.$$.dirty[0]&&((null===r(17,j=M.items)||void 0===j?void 0:j.length)&&Array.isArray(M.items)?r(24,L=!1):(r(24,L=!0),J.logError(It(new Error('Incorrect or empty "items" prop for div "pager"'))))),16777219&t.$$.dirty[0]&&r(4,i=(!L&&M.items||[]).map((t=>{let e=t,n=T;return({templateContext:n,json:e}=J.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),1&t.$$.dirty[0]&&(r(14,o=J.getDerivedFromVars(M.layout_mode)),k(),k=h(o,(t=>r(32,v=t)))),2&t.$$.dirty[1]&&(v?"percentage"!==v.type&&"fixed"!==v.type?(r(26,q=!0),J.logError(It(new Error('Incorrect value of "layout_mode.type" for div "pager"')))):r(26,q=!1):(r(26,q=!0),J.logError(It(new Error('Empty "layout_mode" prop for div "pager"'))))),1&t.$$.dirty[0]&&(r(13,a=J.getDerivedFromVars(M.orientation)),A(),A=h(a,(t=>r(35,_=t)))),134217728&t.$$.dirty[0]|16&t.$$.dirty[1]&&r(27,G=Tn(_,G)),1&t.$$.dirty[0]&&(r(12,s=J.getDerivedFromVars(M.item_spacing)),C(),C=h(s,(t=>r(34,$=t)))),8&t.$$.dirty[1]){const t=null==$?void 0:$.value;t&&le(t)&&r(28,K=Rt(t||0))}if(1&t.$$.dirty[0]&&(r(11,l=J.getDerivedFromVars(M.paddings)),E(),E=h(l,(t=>r(33,y=t)))),536870912&t.$$.dirty[0]|4&t.$$.dirty[1]&&r(29,X=ce(y,X)),1&t.$$.dirty[0]&&(r(10,c=J.getDerivedFromVars(M.restrict_parent_scroll)),V(),V=h(c,(t=>r(15,w=t)))),134217728&t.$$.dirty[0]&&r(31,u="horizontal"===G?"grid-auto-columns":"grid-auto-rows"),419168257&t.$$.dirty[0]|2&t.$$.dirty[1])if("fixed"===(null==v?void 0:v.type)){const t=Ut("horizontal"===G?((null===r(18,P=M.paddings)||void 0===P?void 0:P.left)||0)+((null===r(19,D=M.paddings)||void 0===D?void 0:D.right)||0):((null===r(20,S=M.paddings)||void 0===S?void 0:S.top)||0)+((null===r(21,F=M.paddings)||void 0===F?void 0:F.bottom)||0)),e=null===r(22,z=v.neighbour_page_width)||void 0===z?void 0:z.value;r(30,Q=e?"calc(100% + ".concat(t," - 2 * ").concat(Ut(e)," - 2 * ").concat(K,")"):"100%")}else if("percentage"===(null==v?void 0:v.type)){const t=null===r(23,N=v.page_width)||void 0===N?void 0:N.value;r(30,Q="".concat(Number(t),"%"))}1879048192&t.$$.dirty[0]|1&t.$$.dirty[1]&&r(9,d={"grid-gap":K,padding:X,[u]:Q}),134217728&t.$$.dirty[0]&&r(8,p={orientation:G}),83886080&t.$$.dirty[0]&&r(7,f=L||q),33554448&t.$$.dirty[0]&&function(t,e){const n=M.id;if(n){const r=new Map(m);b(g,m=r.set(n,{instId:B,size:t,currentItem:e,scrollToPagerItem:nt}),m)}}(i.length,W),33554432&t.$$.dirty[0]&&function(t){var e;if(t===H)return;H=t;const n=J.getJsonWithVars(null===(e=i[t].json)||void 0===e?void 0:e.selected_actions);(null==n?void 0:n.length)&&J.execAnyActions(n)}(W)},r(6,g=J.getStore("pagers")),x(),x=h(g,(t=>r(39,m=t))),[M,T,I,O,i,R,g,f,p,d,c,l,s,a,o,w,et,j,P,D,S,F,z,N,L,W,q,G,K,X,Q,u,v,y,$,_,function(t){rt[t?"unshift":"push"]((()=>{R=t,r(5,R)}))}]}const mi={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"};function vi(t,e,n){const r=t.slice();r[43]=e[n],r[46]=n;const i=r[46]===r[12].currentItem;return r[44]=i,r}function yi(t){let e,n=Array(t[12].size),r=[];for(let e=0;e<n.length;e+=1)r[e]=$i(vi(t,n,e));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=I()},m(t,n){for(let e=0;e<r.length;e+=1)r[e].m(t,n);D(t,e,n)},p(t,i){if(25169920&i[0]){let o;for(n=Array(t[12].size),o=0;o<n.length;o+=1){const a=vi(t,n,o);r[o]?r[o].p(a,i):(r[o]=$i(a),r[o].c(),r[o].m(e.parentNode,e))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},d(t){F(r,t),t&&S(e)}}}function $i(t){let e,n,r,i,o,a,l,c;function u(){return t[36](t[46])}return{c(){e=z("div"),J(e,"class",n=ie("indicator__item",mi,{active:t[44]})+" divkit-bd259"),J(e,"role","tab"),J(e,"id",r=t[12].instId+"-tab-"+t[46]),J(e,"aria-controls",i=t[12].instId+"-panel-"+t[46]),J(e,"aria-selected",o=t[44]?"true":"false"),J(e,"tabindex",a=t[44]?0:-1)},m(n,r){D(n,e,r),l||(c=[O(e,"click",u),O(e,"keydown",t[24])],l=!0)},p(s,l){t=s,4096&l[0]&&n!==(n=ie("indicator__item",mi,{active:t[44]})+" divkit-bd259")&&J(e,"class",n),4096&l[0]&&r!==(r=t[12].instId+"-tab-"+t[46])&&J(e,"id",r),4096&l[0]&&i!==(i=t[12].instId+"-panel-"+t[46])&&J(e,"aria-controls",i),4096&l[0]&&o!==(o=t[44]?"true":"false")&&J(e,"aria-selected",o),4096&l[0]&&a!==(a=t[44]?0:-1)&&J(e,"tabindex",a)},d(t){t&&S(e),l=!1,s(c)}}}function bi(t){let e,n,r,i,o=t[12]&&yi(t);return{c(){e=z("div"),n=z("div"),o&&o.c(),J(n,"class",r=mi.indicator__items),J(n,"role","tablist"),U(n,"margin","default"===t[6]?"0 ".concat(Rt(Math.max(0,t[4].width-t[5].width)/2)):"",!1),U(n,"--divkit-indicator-inactive-width",Rt(t[5].width),!1),U(n,"--divkit-indicator-inactive-height",Rt(t[5].height),!1),U(n,"--divkit-indicator-inactive-border-radius",Rt(t[5].borderRadius),!1),U(n,"--divkit-indicator-inactive-background",t[5].background||"",!1),U(n,"--divkit-indicator-inactive-box-shadow",t[5].boxShadow||"",!1),U(n,"--divkit-indicator-active-width",Rt(t[4].width),!1),U(n,"--divkit-indicator-active-height",Rt(t[4].height),!1),U(n,"--divkit-indicator-active-border-radius",Rt(t[4].borderRadius),!1),U(n,"--divkit-indicator-active-background",t[4].background||"",!1),U(n,"--divkit-indicator-active-box-shadow",t[4].boxShadow||"",!1),U(n,"--divkit-indicator-active-scale",t[4].width/t[5].width,!1),U(n,"--divkit-indicator-default-margin","default"===t[6]?"0 ".concat(Rt((t[7]-t[5].width)/2)):"",!1),U(n,"--divkit-indicator-stretch-margin","stretch"===t[6]?Rt(t[9]):"",!1),U(n,"--divkit-indicator-stretch-max-count","stretch"===t[6]?t[8]:"",!1),U(n,"--divkit-indicator-stretch-max-spacer","stretch"===t[6]?Rt((t[8]-1)*t[9]):"",!1),J(e,"class",i=mi.indicator__scroller)},m(r,i){D(r,e,i),V(e,n),o&&o.m(n,null),t[37](n),t[38](e)},p(t,e){t[12]?o?o.p(t,e):(o=yi(t),o.c(),o.m(n,null)):o&&(o.d(1),o=null),112&e[0]&&U(n,"margin","default"===t[6]?"0 ".concat(Rt(Math.max(0,t[4].width-t[5].width)/2)):"",!1),32&e[0]&&U(n,"--divkit-indicator-inactive-width",Rt(t[5].width),!1),32&e[0]&&U(n,"--divkit-indicator-inactive-height",Rt(t[5].height),!1),32&e[0]&&U(n,"--divkit-indicator-inactive-border-radius",Rt(t[5].borderRadius),!1),32&e[0]&&U(n,"--divkit-indicator-inactive-background",t[5].background||"",!1),32&e[0]&&U(n,"--divkit-indicator-inactive-box-shadow",t[5].boxShadow||"",!1),16&e[0]&&U(n,"--divkit-indicator-active-width",Rt(t[4].width),!1),16&e[0]&&U(n,"--divkit-indicator-active-height",Rt(t[4].height),!1),16&e[0]&&U(n,"--divkit-indicator-active-border-radius",Rt(t[4].borderRadius),!1),16&e[0]&&U(n,"--divkit-indicator-active-background",t[4].background||"",!1),16&e[0]&&U(n,"--divkit-indicator-active-box-shadow",t[4].boxShadow||"",!1),48&e[0]&&U(n,"--divkit-indicator-active-scale",t[4].width/t[5].width,!1),224&e[0]&&U(n,"--divkit-indicator-default-margin","default"===t[6]?"0 ".concat(Rt((t[7]-t[5].width)/2)):"",!1),576&e[0]&&U(n,"--divkit-indicator-stretch-margin","stretch"===t[6]?Rt(t[9]):"",!1),320&e[0]&&U(n,"--divkit-indicator-stretch-max-count","stretch"===t[6]?t[8]:"",!1),832&e[0]&&U(n,"--divkit-indicator-stretch-max-spacer","stretch"===t[6]?Rt((t[8]-1)*t[9]):"",!1)},d(n){n&&S(e),o&&o.d(),t[37](null),t[38](null)}}}function _i(t){let e,n;return e=new Ue({props:{cls:ie("indicator",mi,t[13]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[bi]},$$scope:{ctx:t}}}),{c(){jt(e.$$.fragment)},m(t,r){Pt(e,t,r),n=!0},p(t,n){const r={};8192&n[0]&&(r.cls=ie("indicator",mi,t[13])),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),8176&n[0]|65536&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(_t(e.$$.fragment,t),n=!0)},o(t){wt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function wi(t,e,r){let i,o,a,s,l,c,u,d,p,f,g,m,v,y,$,b,_,w,x,k=n,E=n,C=n,A=n,V=n,j=n,P=n,D=n,S=n;var F,z;t.$$.on_destroy.push((()=>k())),t.$$.on_destroy.push((()=>E())),t.$$.on_destroy.push((()=>C())),t.$$.on_destroy.push((()=>A())),t.$$.on_destroy.push((()=>V())),t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>S()));let{json:N={}}=e,{templateContext:M}=e,{origJson:T}=e,{layoutParams:I}=e;const O=["rounded_rectangle","circle"],J=tt(Tt);let B,R,U,L={width:13,height:13,borderRadius:6.5,background:"#ffdc60"},W={width:10,height:10,borderRadius:5,background:"#33919cb5"},H="default",q=15,G=10,K=5;function X(t){t!==U.currentItem&&U.scrollToPagerItem(t)}async function Y(t){U.scrollToPagerItem(t),await ct();const e=R.querySelector(".".concat(mi.indicator__item_active));e&&e.focus()}return t.$$set=t=>{"json"in t&&r(0,N=t.json),"templateContext"in t&&r(1,M=t.templateContext),"origJson"in t&&r(2,T=t.origJson),"layoutParams"in t&&r(3,I=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(22,i=J.getDerivedFromVars(N.shape)),j(),j=h(i,(t=>r(32,b=t)))),1&t.$$.dirty[0]&&(r(21,o=J.getDerivedFromVars(N.active_item_color)),A(),A=h(o,(t=>r(30,y=t)))),1&t.$$.dirty[0]&&(r(20,a=J.getDerivedFromVars(N.inactive_item_color)),V(),V=h(a,(t=>r(31,$=t)))),1&t.$$.dirty[0]&&(r(19,s=J.getDerivedFromVars(N.active_item_size)),P(),P=h(s,(t=>r(33,_=t)))),1&t.$$.dirty[0]&&(r(18,l=J.getDerivedFromVars(N.active_shape)),S(),S=h(l,(t=>r(35,x=t)))),1&t.$$.dirty[0]&&(r(17,c=J.getDerivedFromVars(N.inactive_shape)),D(),D=h(c,(t=>r(34,w=t)))),1073741872&t.$$.dirty[0]|31&t.$$.dirty[1]&&(x&&r(4,L=mn({type:"shape_drawable",shape:x},O,L)),w&&r(5,W=mn({type:"shape_drawable",shape:w},O,W)),!x&&!w&&b)){const t=We(_,1.3);r(5,W=mn({type:"shape_drawable",shape:b,color:W.background},O,W)),r(5,W.background=Wt($,1,W.background),W),r(4,L=Object.assign(Object.assign({},W),{width:W.width*t,height:W.height*t,borderRadius:W.borderRadius*t,background:L.background})),r(4,L.background=Wt(y,1,L.background),L)}if(1&t.$$.dirty[0]&&(r(16,u=J.getDerivedFromVars(N.space_between_centers)),E(),E=h(u,(t=>r(28,m=t)))),1&t.$$.dirty[0]&&(r(15,d=J.getDerivedFromVars(N.items_placement)),C(),C=h(d,(t=>r(29,v=t)))),905970624&t.$$.dirty[0])if(!v||"default"!==v.type&&"stretch"!==v.type)r(6,H="default"),m&&r(7,q=ue(m.value,q));else if(r(6,H=v.type),"default"===H)r(7,q=ue(null===r(25,F=v.space_between_centers)||void 0===F?void 0:F.value,q));else if("stretch"===H){const t=v;r(8,G=We(t.max_visible_items,G)),r(9,K=ue(null===r(26,z=t.item_spacing)||void 0===z?void 0:z.value,K))}134217728&t.$$.dirty[0]&&async function(t){if(N.pager_id&&t.has(N.pager_id)&&(r(12,U=t.get(N.pager_id)),await ct(),R)){const t=R.children[U.currentItem].offsetLeft;B.scroll({left:t-B.clientWidth/2,behavior:"smooth"})}}(g),64&t.$$.dirty[0]&&r(13,f={placement:H})},r(14,p=J.getStore("pagers")),k(),k=h(p,(t=>r(27,g=t))),[N,M,T,I,L,W,H,q,G,K,B,R,U,f,p,d,u,c,l,s,a,o,i,X,function(t){if(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)return;const{size:e,currentItem:n}=U;if(37===t.which)Y(n-1<0?n:n-1);else if(39===t.which)Y(n+1>=e?n:n+1);else if(36===t.which)Y(0);else{if(35!==t.which)return;Y(e-1)}t.preventDefault()},F,z,g,m,v,y,$,b,_,w,x,t=>X(t),function(t){rt[t?"unshift":"push"]((()=>{R=t,r(11,R)}))},function(t){rt[t?"unshift":"push"]((()=>{B=t,r(10,B)}))}]}const xi={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 ki(t,e){if(!t||!t.font_size)return e;const n=t.offset,r=t.text_color&&Wt(t.text_color)||"#000",i=He(t.font_weight);if(Ae(t.font_size)&&"transparent"!==r){var o,a;const e={fontSize:Rt(t.font_size),fontWeight:i,textColor:r};return"number"==typeof(null==n||null===(o=n.x)||void 0===o?void 0:o.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 Ei(t,e,n){return Math.max(e,Math.min(n,Number(t)))}const Ci="function"==typeof BigInt;function Ai(t){return Ci?BigInt(t):Number(t)}const Vi=Ai("9223372036854775807"),ji=Ai("-9223372036854775808");function Pi(t){const e=Ai(t);if(e>Vi||e<ji)throw new Error("Integer overflow.");return e}const Di=Pi(0);function Si(t){let e=t;return e<0&&(e=-e),e}function Fi(t){let e=0;return t>0?e=1:t<0&&(e=-1),Pi(e)}class zi{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=Nt(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 Ni={string:class extends zi{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"string"}},number:class extends zi{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 zi{convertValue(t){if("bigint"!=typeof t&&"number"!=typeof t||"number"==typeof t&&(isNaN(t)||t!==Math.round(t))||t>Vi||t<ji)throw new Error("Incorrect variable value");return Pi(t)}fromString(t){const e=Pi(t);return this.convertValue(e)}getType(){return"integer"}},boolean:class extends zi{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 zi{convertValue(t){if("string"!=typeof t||!qt(t))throw new Error("Incorrect variable value");return t}fromString(t){return this.convertValue(t)}getType(){return"color"}},url:class extends zi{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"url"}}};function Mi(t,e,n){if(!(e in Ni))throw new Error("Unsupported variable type");return new Ni[e](t,n)}function Ti(t,e,n){const r=t.slice();return r[78]=e[n],r}function Ii(t,e,n){const r=t.slice();return r[78]=e[n],r}function Oi(t){let e,n;return e=new Ue({props:{cls:ie("slider",xi,t[21]),style:t[22],customDescription:!0,customActions:"slider",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Li]},$$scope:{ctx:t}}}),{c(){jt(e.$$.fragment)},m(t,r){Pt(e,t,r),n=!0},p(t,n){const r={};2097152&n[0]&&(r.cls=ie("slider",xi,t[21])),4194304&n[0]&&(r.style=t[22]),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),27246576&n[0]|2097152&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(_t(e.$$.fragment,t),n=!0)},o(t){wt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function Ji(t){let e,n;return{c(){e=z("div"),J(e,"class",n=xi.slider__tick+" "+xi.slider__tick_active),U(e,"--divkit-slider-tick",t[78],!1)},m(t,n){D(t,e,n)},p(t,n){131072&n[0]&&U(e,"--divkit-slider-tick",t[78],!1)},d(t){t&&S(e)}}}function Bi(t){let e,n;return{c(){e=z("div"),J(e,"class",n=xi.slider__tick+" "+xi.slider__tick_inactive),U(e,"--divkit-slider-tick",t[78],!1)},m(t,n){D(t,e,n)},p(t,n){262144&n[0]&&U(e,"--divkit-slider-tick",t[78],!1)},d(t){t&&S(e)}}}function Ri(t){let e,n,r,i,o;return{c(){var a,s,l;e=z("div"),n=z("div"),r=M(t[6]),J(n,"class",i=xi["slider__thumb-text-inner"]),U(n,"font-size",(null===(a=t[12])||void 0===a?void 0:a.fontSize)||"1em",!1),U(n,"font-weight",(null===(s=t[12])||void 0===s?void 0:s.fontWeight)||"",!1),U(n,"color",(null===(l=t[12])||void 0===l?void 0:l.textColor)||"#000",!1),J(e,"class",o=xi["slider__thumb-text"])},m(t,i){D(t,e,i),V(e,n),V(n,r)},p(t,e){var i,o,a;64&e[0]&&R(r,t[6]),4096&e[0]&&U(n,"font-size",(null===(i=t[12])||void 0===i?void 0:i.fontSize)||"1em",!1),4096&e[0]&&U(n,"font-weight",(null===(o=t[12])||void 0===o?void 0:o.fontWeight)||"",!1),4096&e[0]&&U(n,"color",(null===(a=t[12])||void 0===a?void 0:a.textColor)||"#000",!1)},d(t){t&&S(e)}}}function Ui(t){let e,n,r,i,o;return{c(){var a,s,l;e=z("div"),n=z("div"),r=M(t[7]),J(n,"class",i=xi["slider__thumb-text-inner"]),U(n,"font-size",(null===(a=t[13])||void 0===a?void 0:a.fontSize)||"1em",!1),U(n,"font-weight",(null===(s=t[13])||void 0===s?void 0:s.fontWeight)||"",!1),U(n,"color",(null===(l=t[13])||void 0===l?void 0:l.textColor)||"#000",!1),J(e,"class",o=xi["slider__thumb-text"]+" "+xi["slider__thumb-text_secondary"])},m(t,i){D(t,e,i),V(e,n),V(n,r)},p(t,e){var i,o,a;128&e[0]&&R(r,t[7]),8192&e[0]&&U(n,"font-size",(null===(i=t[13])||void 0===i?void 0:i.fontSize)||"1em",!1),8192&e[0]&&U(n,"font-weight",(null===(o=t[13])||void 0===o?void 0:o.fontWeight)||"",!1),8192&e[0]&&U(n,"color",(null===(a=t[13])||void 0===a?void 0:a.textColor)||"#000",!1)},d(t){t&&S(e)}}}function Li(t){let e,n,r,i,o,a,l,c,u,d,p,h,f,g,m,v,y,$,b,_,w,x,k=t[17],E=[];for(let e=0;e<k.length;e+=1)E[e]=Ji(Ii(t,k,e));let C=t[18],A=[];for(let e=0;e<C.length;e+=1)A[e]=Bi(Ti(t,C,e));let j=t[12]&&Ri(t),P=t[37]&&function(t){let e,n,r=t[13]&&Ui(t);return{c(){e=z("div"),r&&r.c(),J(e,"class",n=xi.slider__thumb+" "+xi.slider__thumb_secondary),U(e,"border-radius",Rt(t[9].borderRadius),!1),U(e,"background",t[9].background,!1),U(e,"box-shadow",t[9].boxShadow||"",!1)},m(t,n){D(t,e,n),r&&r.m(e,null)},p(t,n){t[13]?r?r.p(t,n):(r=Ui(t),r.c(),r.m(e,null)):r&&(r.d(1),r=null),512&n[0]&&U(e,"border-radius",Rt(t[9].borderRadius),!1),512&n[0]&&U(e,"background",t[9].background,!1),512&n[0]&&U(e,"box-shadow",t[9].boxShadow||"",!1)},d(t){t&&S(e),r&&r.d()}}}(t),N=t[37]&&function(t){let e,n,r,i,o;return{c(){e=z("input"),J(e,"type","range"),J(e,"class",n=t[16]?xi.slider__input:"".concat(xi.slider__input," ").concat(xi.slider__input_secondary)),J(e,"min",t[4]),J(e,"max",t[5]),J(e,"step","1"),e.value=r=t[16]?t[6]:t[7],J(e,"aria-label",t[20])},m(n,r){D(n,e,r),i||(o=[O(e,"input",t[68]),O(e,"mousedown",t[37]?t[40]:null),O(e,"touchstart",t[37]?t[40]:null)],i=!0)},p(t,i){65536&i[0]&&n!==(n=t[16]?xi.slider__input:"".concat(xi.slider__input," ").concat(xi.slider__input_secondary))&&J(e,"class",n),16&i[0]&&J(e,"min",t[4]),32&i[0]&&J(e,"max",t[5]),65728&i[0]&&r!==(r=t[16]?t[6]:t[7])&&(e.value=r),1048576&i[0]&&J(e,"aria-label",t[20])},d(t){t&&S(e),i=!1,s(o)}}}(t);return{c(){e=z("div"),n=z("div"),r=z("div"),o=T(),a=z("div"),c=T();for(let t=0;t<E.length;t+=1)E[t].c();u=T();for(let t=0;t<A.length;t+=1)A[t].c();d=T(),p=z("div"),j&&j.c(),f=T(),P&&P.c(),g=T(),m=z("input"),$=T(),N&&N.c(),J(r,"class",i=xi.slider__track),U(r,"height",Rt(t[10].height),!1),U(r,"border-radius",Rt(t[10].borderRadius),!1),U(r,"background",t[10].background,!1),U(r,"box-shadow",t[10].boxShadow||"",!1),J(a,"class",l=xi["slider__active-track"]),U(a,"left",(100*t[23]).toFixed(2)+"%",!1),U(a,"width",(100*t[24]).toFixed(2)+"%",!1),U(a,"height",Rt(t[11].height),!1),U(a,"border-radius",Rt(t[11].borderRadius),!1),U(a,"background",t[11].background,!1),U(a,"box-shadow",t[11].boxShadow||"",!1),J(p,"class",h=xi.slider__thumb),U(p,"border-radius",Rt(t[8].borderRadius),!1),U(p,"background",t[8].background,!1),U(p,"box-shadow",t[8].boxShadow||"",!1),J(m,"type","range"),J(m,"class",v=t[16]?"".concat(xi.slider__input," ").concat(xi.slider__input_secondary):xi.slider__input),J(m,"min",t[4]),J(m,"max",t[5]),J(m,"step","1"),m.value=y=t[16]?t[7]:t[6],J(m,"aria-label",t[19]),J(n,"class",b=xi["slider__tracks-inner"]),J(e,"class",_=xi["slider__tracks-wrapper"])},m(i,s){D(i,e,s),V(e,n),V(n,r),V(n,o),V(n,a),V(n,c);for(let t=0;t<E.length;t+=1)E[t].m(n,null);V(n,u);for(let t=0;t<A.length;t+=1)A[t].m(n,null);V(n,d),V(n,p),j&&j.m(p,null),V(n,f),P&&P.m(n,null),V(n,g),V(n,m),V(n,$),N&&N.m(n,null),t[69](n),w||(x=O(m,"input",t[67]),w=!0)},p(t,e){if(1024&e[0]&&U(r,"height",Rt(t[10].height),!1),1024&e[0]&&U(r,"border-radius",Rt(t[10].borderRadius),!1),1024&e[0]&&U(r,"background",t[10].background,!1),1024&e[0]&&U(r,"box-shadow",t[10].boxShadow||"",!1),8388608&e[0]&&U(a,"left",(100*t[23]).toFixed(2)+"%",!1),16777216&e[0]&&U(a,"width",(100*t[24]).toFixed(2)+"%",!1),2048&e[0]&&U(a,"height",Rt(t[11].height),!1),2048&e[0]&&U(a,"border-radius",Rt(t[11].borderRadius),!1),2048&e[0]&&U(a,"background",t[11].background,!1),2048&e[0]&&U(a,"box-shadow",t[11].boxShadow||"",!1),131072&e[0]){let r;for(k=t[17],r=0;r<k.length;r+=1){const i=Ii(t,k,r);E[r]?E[r].p(i,e):(E[r]=Ji(i),E[r].c(),E[r].m(n,u))}for(;r<E.length;r+=1)E[r].d(1);E.length=k.length}if(262144&e[0]){let r;for(C=t[18],r=0;r<C.length;r+=1){const i=Ti(t,C,r);A[r]?A[r].p(i,e):(A[r]=Bi(i),A[r].c(),A[r].m(n,d))}for(;r<A.length;r+=1)A[r].d(1);A.length=C.length}t[12]?j?j.p(t,e):(j=Ri(t),j.c(),j.m(p,null)):j&&(j.d(1),j=null),256&e[0]&&U(p,"border-radius",Rt(t[8].borderRadius),!1),256&e[0]&&U(p,"background",t[8].background,!1),256&e[0]&&U(p,"box-shadow",t[8].boxShadow||"",!1),t[37]&&P.p(t,e),65536&e[0]&&v!==(v=t[16]?"".concat(xi.slider__input," ").concat(xi.slider__input_secondary):xi.slider__input)&&J(m,"class",v),16&e[0]&&J(m,"min",t[4]),32&e[0]&&J(m,"max",t[5]),65728&e[0]&&y!==(y=t[16]?t[7]:t[6])&&(m.value=y),524288&e[0]&&J(m,"aria-label",t[19]),t[37]&&N.p(t,e)},d(n){n&&S(e),F(E,n),F(A,n),j&&j.d(),P&&P.d(),N&&N.d(),t[69](null),w=!1,x()}}}function Wi(t){let e,n,r,i,o=!t[14]&&Oi(t);return{c(){o&&o.c(),e=I()},m(a,s){o&&o.m(a,s),D(a,e,s),n=!0,r||(i=O(window,"resize",t[42]),r=!0)},p(t,n){t[14]?o&&($t(),wt(o,1,1,(()=>{o=null})),bt()):o?(o.p(t,n),16384&n[0]&&_t(o,1)):(o=Oi(t),o.c(),_t(o,1),o.m(e.parentNode,e))},i(t){n||(_t(o),n=!0)},o(t){wt(o),n=!1},d(t){o&&o.d(t),t&&S(e),r=!1,i()}}}function Hi(t,e,n,r,i){let o=[];if(i)for(let i=t;i<e;++i)o.push((i-n)/(r-n));else{for(let e=n;e<t;++e)o.push((e-n)/(r-n));for(let t=e;t<r+1;++t)o.push((t-n)/(r-n))}return o}function qi(t,e,r){let i,o,a,s,l,c,u,d,p,g,m,v,y,$,b,_,w,x,k,E,C,A,V,j,P,D,S,F,z,N,M,T,I,O,J=n,B=n,R=n,U=n,L=n,W=n,H=n,q=n,G=n,K=n,X=n,Z=n;var Q,et,nt,it;t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>X())),t.$$.on_destroy.push((()=>Z()));let{json:ot={}}=e,{templateContext:at}=e,{origJson:st}=e,{layoutParams:lt}=e;const ct={width:10,height:10,borderRadius:5,background:"#000"},ut=["rounded_rectangle","circle"],dt=["rounded_rectangle"],pt=tt(Tt),ht=tt(be);let ft,gt=!1,mt=0,vt=100;const yt=pt.getJsonWithVars(ot.thumb_value_variable),$t=pt.getJsonWithVars(ot.thumb_secondary_value_variable);let bt=yt&&pt.getVariable(yt,"integer")||Mi("temp","integer",0);f(t,bt,(t=>r(64,T=t)));let _t=$t&&pt.getVariable($t,"integer")||Mi("temp","integer",0);f(t,_t,(t=>r(63,M=t)));let wt,xt,kt,Et=Ei(T||0,mt,vt),Ct=Ei(M||0,mt,vt),At=ct,Vt=At,jt=ct,Pt=ct,Dt=null,St=null,Ft=kt,zt="",Nt="",Mt=!1;function Ot(t,e){const n=Number(t.target.value);gt===("first"===e)?(r(7,Ct=n),_t.setValue(n)):(r(6,Et=n),bt.setValue(n))}let Jt=!1;function Bt(){if(!ft)return;const t=vt-mt,e=(null==Dt?void 0:Dt.width)||0,n=(null==St?void 0:St.width)||0;Math.max(e,n)*t>=(null==ft?void 0:ft.clientWidth)?Jt||(pt.logError(It(new Error("Slider ticks overlap each other"),{level:"warn"})),Jt=!0):Jt=!1}const Lt=dr(Bt,50);return Y((()=>{Bt()})),t.$$set=t=>{"json"in t&&r(0,ot=t.json),"templateContext"in t&&r(1,at=t.templateContext),"origJson"in t&&r(2,st=t.origJson),"layoutParams"in t&&r(3,lt=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(36,i=pt.getDerivedFromVars(ot.min_value)),Z(),Z=h(i,(t=>r(66,O=t)))),1&t.$$.dirty[0]&&(r(35,o=pt.getDerivedFromVars(ot.max_value)),X(),X=h(o,(t=>r(65,I=t)))),48&t.$$.dirty[0]|24&t.$$.dirty[2]&&(r(4,mt=ge(O,mt)),r(5,vt=ge(I,vt)),Bt()),112&t.$$.dirty[0]|4&t.$$.dirty[2]){const t=Ei(T||0,mt,vt);t!==Et&&r(6,Et=t)}if(176&t.$$.dirty[0]|2&t.$$.dirty[2]){const t=Ei(M||0,mt,vt);t!==Ct&&r(7,Ct=t)}if(1&t.$$.dirty[0]&&(r(34,a=pt.getDerivedFromVars(ot.thumb_style)),K(),K=h(a,(t=>r(62,N=t)))),256&t.$$.dirty[0]|1&t.$$.dirty[2]&&r(8,At=mn(N,ut,At)),1&t.$$.dirty[0]&&(r(33,s=pt.getDerivedFromVars(ot.thumb_secondary_style)),G(),G=h(s,(t=>r(61,z=t)))),256&t.$$.dirty[0]|1073741824&t.$$.dirty[1]&&r(9,Vt=mn(z,ut,At)),1&t.$$.dirty[0]&&(r(32,l=pt.getDerivedFromVars(ot.track_inactive_style)),q(),q=h(l,(t=>r(60,F=t)))),1024&t.$$.dirty[0]|536870912&t.$$.dirty[1]&&r(10,jt=mn(F,dt,jt)),1&t.$$.dirty[0]&&(r(31,c=pt.getDerivedFromVars(ot.track_active_style)),H(),H=h(c,(t=>r(59,S=t)))),2048&t.$$.dirty[0]|268435456&t.$$.dirty[1]&&r(11,Pt=mn(S,dt,Pt)),1&t.$$.dirty[0]&&(r(30,u=pt.getDerivedFromVars(ot.tick_mark_active_style)),W(),W=h(u,(t=>r(58,D=t)))),134217728&t.$$.dirty[1]){let t=mn(D,ut,ct);t!==ct&&r(47,Dt=t)}if(240&t.$$.dirty[0]|65536&t.$$.dirty[1]&&(Dt?(r(17,wt=$t?Hi(Math.min(Et,Ct),Math.max(Et,Ct)+1,mt,vt,!0):Hi(mt,Et,mt,vt,!0)),Bt()):r(17,wt=[])),1&t.$$.dirty[0]&&(r(29,d=pt.getDerivedFromVars(ot.tick_mark_inactive_style)),L(),L=h(d,(t=>r(57,P=t)))),67108864&t.$$.dirty[1]){let t=mn(P,ut,ct);t!==ct&&r(48,St=t)}if(240&t.$$.dirty[0]|131072&t.$$.dirty[1]&&(St?(r(18,xt=$t?Hi(Math.min(Et,Ct),Math.max(Et,Ct)+1,mt,vt,!1):Hi(Et+1,vt+1,mt,vt,!0)),Bt()):r(18,xt=[])),1&t.$$.dirty[0]&&(r(28,p=pt.getDerivedFromVars(ot.thumb_text_style)),U(),U=h(p,(t=>r(56,j=t)))),4096&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(12,kt=ki(j,kt)),1&t.$$.dirty[0]&&(r(27,g=pt.getDerivedFromVars(ot.thumb_secondary_text_style)),R(),R=h(g,(t=>r(55,V=t)))),4096&t.$$.dirty[0]|16777216&t.$$.dirty[1]&&r(13,Ft=ki(V,kt)),1&t.$$.dirty[0]&&(r(26,m=pt.getDerivedFromVars(ot.accessibility)),B(),B=h(m,(t=>r(54,A=t)))),8388608&t.$$.dirty[1]&&((null==A?void 0:A.description)?r(19,zt=A.description):pt.logError(It(new Error('Missing accessibility "description" for slider'),{level:"warn"}))),1&t.$$.dirty[0]&&(r(25,v=pt.getDerivedFromVars(ot.secondary_value_accessibility)),J(),J=h(v,(t=>r(53,C=t)))),4194304&t.$$.dirty[1]&&((null==C?void 0:C.description)?r(20,Nt=C.description):$t&&pt.logError(It(new Error('Missing second accessibility "description" for slider'),{level:"warn"}))),19712&t.$$.dirty[0]){let t=!1;ht.hasAction()?(pt.logError(It(new Error('Cannot show "slider" inside component with action'))),t=!0):At===ct?(pt.logError(It(new Error('Missing "thumb_style" in slider'))),t=!0):Pt===ct?(pt.logError(It(new Error('Missing "track_active_style" in slider'))),t=!0):jt===ct&&(pt.logError(It(new Error('Missing "track_inactive_style" in slider'))),t=!0),t!==Mt&&r(14,Mt=t)}768&t.$$.dirty[0]&&r(52,y=Rt(Math.max(...[At.width,Vt.width,0].filter(le)))),768&t.$$.dirty[0]&&r(51,$=Rt(Math.max(...[At.height,Vt.height,0].filter(le)))),112&t.$$.dirty[0]&&r(50,b=(Et-mt)/(vt-mt)),176&t.$$.dirty[0]&&r(49,_=$t?(Ct-mt)/(vt-mt):void 0),786432&t.$$.dirty[1]&&r(24,w=void 0!==_?Math.abs(_-b):b),786432&t.$$.dirty[1]&&r(23,x=void 0!==_?Math.min(_,b):0),13056&t.$$.dirty[0]|4190208&t.$$.dirty[1]&&r(22,k={"--divkit-slider-thumb-width":Rt(At.width),"--divkit-slider-thumb-height":Rt(At.height),"--divkit-slider-thumb-secondary-width":Rt(Vt.width),"--divkit-slider-thumb-secondary-height":Rt(Vt.height),"--divkit-slider-text-offset-x":(null===r(43,Q=null==kt?void 0:kt.offset)||void 0===Q?void 0:Q.x)?Ut(kt.offset.x):void 0,"--divkit-slider-text-offset-y":(null===r(44,et=null==kt?void 0:kt.offset)||void 0===et?void 0:et.y)?Ut(kt.offset.y):void 0,"--divkit-slider-text-secondary-offset-x":(null===r(45,nt=null==Ft?void 0:Ft.offset)||void 0===nt?void 0:nt.x)?Ut(Ft.offset.x):void 0,"--divkit-slider-text-secondary-offset-y":(null===r(46,it=null==Ft?void 0:Ft.offset)||void 0===it?void 0:it.y)?Ut(Ft.offset.y):void 0,"--divkit-slider-tick-active-width":Dt?Rt(Dt.width):void 0,"--divkit-slider-tick-active-height":Dt?Rt(Dt.height):void 0,"--divkit-slider-tick-active-border-radius":Dt?Rt(Dt.borderRadius):void 0,"--divkit-slider-tick-active-background":(null==Dt?void 0:Dt.background)||void 0,"--divkit-slider-tick-active-box-shadow":(null==Dt?void 0:Dt.boxShadow)||void 0,"--divkit-slider-tick-inactive-width":St?Rt(St.width):void 0,"--divkit-slider-tick-inactive-height":St?Rt(St.height):void 0,"--divkit-slider-tick-inactive-border-radius":St?Rt(St.borderRadius):void 0,"--divkit-slider-tick-inactive-background":(null==St?void 0:St.background)||void 0,"--divkit-slider-tick-inactive-box-shadow":(null==St?void 0:St.boxShadow)||void 0,"--divkit-slider-max-thumb-width":y,"--divkit-slider-max-thumb-height":$,"--divkit-slider-track-part":b,"--divkit-slider-track-secondary-part":_})},r(21,E={}),[ot,at,st,lt,mt,vt,Et,Ct,At,Vt,jt,Pt,kt,Ft,Mt,ft,gt,wt,xt,zt,Nt,E,k,x,w,v,m,g,p,d,u,c,l,s,a,o,i,$t,bt,_t,function(t){var e,n;const i="pageX"in t?t.pageX:null===(n=null===(e=t.changedTouches)||void 0===e?void 0:e[0])||void 0===n?void 0:n.pageX;if(void 0===i)return;const o=ft.getBoundingClientRect(),a=(i-o.left)/o.width,s=(vt-mt)*a,l=Math.round(Ei(s,mt,vt));r(16,gt=l<(Et+Ct)/2==Et<Ct)},Ot,Lt,Q,et,nt,it,Dt,St,_,b,$,y,C,A,V,j,P,D,S,F,z,N,M,T,I,O,t=>Ot(t,"first"),t=>Ot(t,"second"),function(t){rt[t?"unshift":"push"]((()=>{ft=t,r(15,ft)}))}]}const Gi={input:"divkit-c3a4c",input__wrapper:"divkit-ef7eb",input__holder:"divkit-bb3da",input_multiline:"divkit-e48a3",input__input:"divkit-f11e0","input_highlight-color":"divkit-cc00f","input_vertical-overflow":"divkit-b7075"};function Ki(t,e){if(t===e)return{start:t.length,added:0,removed:0};if(t.length>e.length){const n=Ki(e,t);return{start:n.start,added:n.removed,removed:n.added}}let n=0,r=e.length-1;const i=e.length-t.length;for(;n<r&&n<t.length&&t[n]===e[n];)++n;for(;r-i>=n&&t[r-i]===e[r];)--r;return++r,{start:n,added:r-n,removed:r-n-i}}function Xi(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Yi{constructor(t){this.char=t}}class Zi{constructor(t,e,n){this.char=t,this.filter=e,this.placeholder=n}}class Qi{constructor(t){Xi(this,"filters",new Map),Xi(this,"destructedValue",[]),Xi(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 Yi)t+=n.char;else if(n instanceof Zi)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 Zi&&!t.char));return-1!==t?t:this.destructedValue.length}updateMaskData(t){const e=this.rawValue;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(It(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 Zi(null,this.filters.get(e.key),e.placeholder):new Yi(t)})),this.overrideRawValue(e)}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=Ki(this.value,t);void 0!==e&&(n.start=Math.max(0,e-n.added));const r=this.buildBodySubstring(n,t),i=this.buildTailSubstring(n);this.cleanup(n);const o=this.firstEmptyHolderIndex(),a=this.calculateMaxShift(i,o);this.replaceChars(r,o,a);const s=this.firstEmptyHolderIndex();this.replaceChars(i,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 Zi&&++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 Zi&&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 Zi&&(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 i=()=>{for(var t;r<this.destructedValue.length&&!(this.destructedValue[r]instanceof Zi);)++r;return null===(t=this.destructedValue[r])||void 0===t?void 0:t.filter};return t.split("").forEach((t=>{const e=i();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 Zi&&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 i=e,o=0;for(;i<this.destructedValue.length&&o<r.length;){const t=this.destructedValue[i],e=r[o];t instanceof Zi&&(t.char=e,++o),++i}}firstHolderAfter(t){let e=t;for(;e<this.destructedValue.length&&!(this.destructedValue[e]instanceof Zi);)++e;return e}}class to extends Qi{constructor(t,e){super(t),this.logError=e}onException(t){this.logError(t)}}function eo(t){let e,n;return e=new Ue({props:{cls:ie("input",Gi,t[14]),style:t[13],customDescription:!0,customActions:"input",customPaddings:!0,json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[oo]},$$scope:{ctx:t}}}),{c(){jt(e.$$.fragment)},m(t,r){Pt(e,t,r),n=!0},p(t,n){const r={};16384&n[0]&&(r.cls=ie("input",Gi,t[14])),8192&n[0]&&(r.style=t[13]),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),400880&n[0]|16384&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(_t(e.$$.fragment,t),n=!0)},o(t){wt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function no(t){let e;return{c(){e=M("")},m(t,n){D(t,e,n)},d(t){t&&S(e)}}}function ro(t){let e,n,r,i,o;return{c(){e=z("input"),J(e,"type",t[10]),J(e,"class",n=Gi.input__input),J(e,"autocomplete","off"),J(e,"autocapitalize","off"),J(e,"aria-label",t[11]),J(e,"style",r=Bt({padding:t[5]})),J(e,"placeholder",t[17]),e.value=t[4]},m(n,r){D(n,e,r),t[65](e),i||(o=[O(e,"input",t[33]),O(e,"mousedown",(function(){l(t[18]?t[34]:void 0)&&(t[18]?t[34]:void 0).apply(this,arguments)})),O(e,"click",(function(){l(t[18]?t[35]:void 0)&&(t[18]?t[35]:void 0).apply(this,arguments)}))],i=!0)},p(n,i){t=n,1024&i[0]&&J(e,"type",t[10]),2048&i[0]&&J(e,"aria-label",t[11]),32&i[0]&&r!==(r=Bt({padding:t[5]}))&&J(e,"style",r),131072&i[0]&&J(e,"placeholder",t[17]),16&i[0]&&e.value!==t[4]&&(e.value=t[4])},d(n){n&&S(e),t[65](null),i=!1,s(o)}}}function io(t){let e,n,r,i,o;return{c(){e=z("textarea"),J(e,"class",n=Gi.input__input),J(e,"autocomplete","off"),J(e,"autocapitalize","off"),J(e,"aria-label",t[11]),J(e,"style",r=Bt({padding:t[5]})),J(e,"placeholder",t[17]),e.value=t[4]},m(n,r){D(n,e,r),t[64](e),i||(o=[O(e,"input",t[33]),O(e,"mousedown",(function(){l(t[18]?t[34]:void 0)&&(t[18]?t[34]:void 0).apply(this,arguments)})),O(e,"click",(function(){l(t[18]?t[35]:void 0)&&(t[18]?t[35]:void 0).apply(this,arguments)}))],i=!0)},p(n,i){t=n,2048&i[0]&&J(e,"aria-label",t[11]),32&i[0]&&r!==(r=Bt({padding:t[5]}))&&J(e,"style",r),131072&i[0]&&J(e,"placeholder",t[17]),16&i[0]&&(e.value=t[4])},d(n){n&&S(e),t[64](null),i=!1,s(o)}}}function oo(t){let e,n,r,i,o,a,s,l=t[4].endsWith("\n")||!t[4],c=l&&no();function u(t,e){return t[6]?io:ro}let d=u(t),p=d(t);return{c(){e=z("span"),n=z("span"),r=M(t[4]),c&&c.c(),o=T(),p.c(),J(n,"class",i=Gi.input__holder),J(n,"aria-hidden","true"),J(e,"class",a=Gi.input__wrapper),J(e,"style",s=Bt(t[12]))},m(i,a){D(i,e,a),V(e,n),V(n,r),c&&c.m(n,null),t[63](n),V(e,o),p.m(e,null)},p(t,i){16&i[0]&&R(r,t[4]),16&i[0]&&(l=t[4].endsWith("\n")||!t[4]),l?c||(c=no(),c.c(),c.m(n,null)):c&&(c.d(1),c=null),d===(d=u(t))&&p?p.p(t,i):(p.d(1),p=d(t),p&&(p.c(),p.m(e,null))),4096&i[0]&&s!==(s=Bt(t[12]))&&J(e,"style",s)},d(n){n&&S(e),c&&c.d(),t[63](null),p.d()}}}function ao(t){let e,n,r=!t[9]&&eo(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){t[9]?r&&($t(),wt(r,1,1,(()=>{r=null})),bt()):r?(r.p(t,n),512&n[0]&&_t(r,1)):(r=eo(t),r.c(),_t(r,1),r.m(e.parentNode,e))},i(t){n||(_t(r),n=!0)},o(t){wt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function so(t,e,r){let i,o,a,s,l,c,u,d,p,g,m,v,y,$,_,w,x,k,E,C,A,V,j,P=n,D=n;var S;t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>D()));let{json:F={}}=e,{templateContext:z}=e,{origJson:N}=e,{layoutParams:M}=e;const T=tt(Tt);let I,O,J=!1,B=!1,R=null;const U=F.text_variable,L=null===(S=F.mask)||void 0===S?void 0:S.raw_text_variable;let W=!1;U||(W=!0,T.logError(It(new Error('Missing "text_variable" in "input"'))));let H=U&&T.getVariable(U,"string")||Mi("temp","string","");f(t,H,(t=>r(48,d=t)));let q=L&&T.getVariable(L,"string")||Mi("temp","string","");f(t,q,(t=>r(49,p=t)));let G="";const K=T.getDerivedFromVars(F.mask);f(t,K,(t=>r(62,V=t)));const X=T.getDerivedFromVars(F.hint_text);f(t,X,(t=>r(61,A=t)));const Z=T.getDerivedFromVars(F.hint_color);f(t,Z,(t=>r(60,C=t)));let Q="";const et=T.getDerivedFromVars(F.font_size);f(t,et,(t=>r(59,E=t)));let nt=12;const it=T.getDerivedFromVars(F.font_weight);let ot;f(t,it,(t=>r(58,k=t)));const at=T.getDerivedFromVars(F.line_height);let st;f(t,at,(t=>r(57,x=t)));const lt=T.getDerivedFromVars(F.letter_spacing);f(t,lt,(t=>r(56,w=t)));let ut="";const dt=T.getDerivedFromVars(F.text_color);f(t,dt,(t=>r(55,_=t)));let pt="#000";const ht=T.getDerivedFromVars(F.highlight_color);f(t,ht,(t=>r(54,$=t)));let ft="";const gt=T.getDerivedFromVars(F.keyboard_type);f(t,gt,(t=>r(53,y=t)));const mt={email:"email",number:"number",phone:"tel",single_line_text:"text",multi_line_text:"text",uri:"url"};let vt="multi_line_text",yt="text";const $t=T.getDerivedFromVars(F.max_visible_lines);f(t,$t,(t=>r(52,v=t)));let bt="",_t=null,wt="",xt="";const kt=T.getDerivedFromVars(F.select_all_on_focus);function Et(){r(36,B=O.scrollHeight>O.offsetHeight)}async function Ct(){if(!I||!R)return;R.overrideRawValue(p),q.set(R.rawValue),b(H,d=r(4,G=R.value),d);const t=R.cursorPosition;await ct(),r(7,I.selectionStart=r(7,I.selectionEnd=t,I),I)}return f(t,kt,(t=>r(18,j=t))),Y((()=>{Et(),I&&R&&p&&(R.overrideRawValue(p),b(H,d=r(4,G=R.value),d))})),t.$$set=t=>{"json"in t&&r(0,F=t.json),"templateContext"in t&&r(1,z=t.templateContext),"origJson"in t&&r(2,N=t.origJson),"layoutParams"in t&&r(3,M=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[2]&&(r(37,R=function(t,e,n){if("fixed_length"===(null==t?void 0:t.type)&&"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 to(r,e)}return n||null}(V,T.logError,R)),R&&Ct()),16&t.$$.dirty[0]|131136&t.$$.dirty[1]&&(R||G===d||r(4,G=d)),262208&t.$$.dirty[1]&&R&&R.rawValue!==p&&Ct(),1073741824&t.$$.dirty[1]&&r(17,i=A),536871040&t.$$.dirty[1]&&r(38,Q=Wt(C,1,Q)),268435712&t.$$.dirty[1]&&r(39,nt=We(E,nt)),134218240&t.$$.dirty[1]&&r(40,ot=qe(k,ot)),67109120&t.$$.dirty[1]){const t=x;Ae(t)&&r(41,st=t/nt)}33554432&t.$$.dirty[1]&&se(w)&&r(42,ut=Rt(w)),16781312&t.$$.dirty[1]&&r(43,pt=Wt(_,1,pt)),8396800&t.$$.dirty[1]&&r(44,ft=Wt($,1,ft)),4194304&t.$$.dirty[1]&&y&&y in mt&&(r(10,yt=mt[y]),r(45,vt=y)),16384&t.$$.dirty[1]&&r(6,o="multi_line_text"===vt),1&t.$$.dirty[0]&&(r(16,a=T.getDerivedFromVars(F.paddings)),D(),D=h(a,(t=>r(51,m=t)))),3212544&t.$$.dirty[1]&&(Ae(v)&&r(46,bt="calc(".concat(v*(st||1.25)*(nt/10)+"em"," + ").concat(Ut(ue(null==m?void 0:m.top,0)+ue(null==m?void 0:m.bottom,0)),")")),r(47,_t=ve(m||void 0,_t)),r(5,wt=_t?ae({top:(Number(_t.top)||0)/nt*10,right:(Number(_t.right)||0)/nt*10,bottom:(Number(_t.bottom)||0)/nt*10,left:(Number(_t.left)||0)/nt*10}):"")),1&t.$$.dirty[0]&&(r(15,s=T.getDerivedFromVars(F.accessibility)),P(),P=h(s,(t=>r(50,g=t)))),524288&t.$$.dirty[1]&&((null==g?void 0:g.description)?r(11,xt=g.description):T.logError(It(new Error('Missing accessibility "description" for input'),{level:"warn"}))),64&t.$$.dirty[0]|8224&t.$$.dirty[1]&&r(14,l={"highlight-color":Boolean(ft),"vertical-overflow":B,multiline:o}),48768&t.$$.dirty[1]&&r(13,c={"--divkit-input-hint-color":Q,"--divkit-input-highlight-color":ft,"font-weight":ot,"line-height":st,"letter-spacing":ut,color:pt,"max-height":bt}),32&t.$$.dirty[0]|256&t.$$.dirty[1]&&r(12,u={"font-size":Rt(nt),padding:wt})},[F,z,N,M,G,wt,o,I,O,W,yt,xt,u,c,l,s,a,i,j,H,q,K,X,Z,et,it,at,lt,dt,ht,gt,$t,kt,function(t){const e=t.target.value||"";G!==e&&(r(4,G=e),H.setValue(e),R&&async function(){if(!I||!R)return;R.applyChangeFrom(G,null!==I.selectionEnd?I.selectionEnd:void 0),q.set(R.rawValue),b(H,d=r(4,G=R.value),d);const t=R.cursorPosition;await ct(),r(7,I.selectionStart=r(7,I.selectionEnd=t,I),I)}()),Et()},function(){J=!1,setTimeout((()=>{J=!0}),250)},function(){J||I.select()},B,R,Q,nt,ot,st,ut,pt,ft,vt,bt,_t,d,p,g,m,v,y,$,_,w,x,k,E,C,A,V,function(t){rt[t?"unshift":"push"]((()=>{O=t,r(8,O)}))},function(t){rt[t?"unshift":"push"]((()=>{I=t,r(7,I)}))},function(t){rt[t?"unshift":"push"]((()=>{I=t,r(7,I)}))}]}const lo={select:"divkit-feef3","select__select-text":"divkit-cd862",select_hint:"divkit-a3cf6",select__select:"divkit-bdb72",select__option:"divkit-e774b"};function co(t,e,n){const r=t.slice();return r[44]=e[n],r}function uo(t){let e,n;return e=new Ue({props:{cls:ie("select",lo,t[10]),style:t[9],customDescription:!0,customActions:"select",customPaddings:!0,json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[ho]},$$scope:{ctx:t}}}),{c(){jt(e.$$.fragment)},m(t,r){Pt(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.cls=ie("select",lo,t[10])),512&n[0]&&(r.style=t[9]),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),4560&n[0]|65536&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(_t(e.$$.fragment,t),n=!0)},o(t){wt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function po(t){let e,r,i,o,a=(t[44].text||t[44].value)+"";return{c(){e=z("option"),r=M(a),J(e,"class",i=lo.select__option),e.__value=o=t[44].value,e.value=e.__value},m(t,n){D(t,e,n),V(e,r)},p:n,d(t){t&&S(e)}}}function ho(t){let e,n,r,i,o,a,s,l,c,u=((t[4]?t[6]:t[12])||"")+"",d=t[15],p=[];for(let e=0;e<d.length;e+=1)p[e]=po(co(t,d,e));return{c(){e=z("span"),n=M(u),o=T(),a=z("select");for(let t=0;t<p.length;t+=1)p[t].c();J(e,"class",r=lo["select__select-text"]),J(e,"style",i=Bt({padding:t[7]})),J(e,"aria-hidden","true"),J(a,"class",s=lo.select__select),J(a,"aria-label",t[8]),void 0===t[4]&&ut((()=>t[39].call(a)))},m(r,i){D(r,e,i),V(e,n),D(r,o,i),D(r,a,i);for(let t=0;t<p.length;t+=1)p[t].m(a,null);L(a,t[4]),l||(c=O(a,"change",t[39]),l=!0)},p(t,r){if(4176&r[0]&&u!==(u=((t[4]?t[6]:t[12])||"")+"")&&R(n,u),128&r[0]&&i!==(i=Bt({padding:t[7]}))&&J(e,"style",i),32768&r[0]){let e;for(d=t[15],e=0;e<d.length;e+=1){const n=co(t,d,e);p[e]?p[e].p(n,r):(p[e]=po(n),p[e].c(),p[e].m(a,null))}for(;e<p.length;e+=1)p[e].d(1);p.length=d.length}256&r[0]&&J(a,"aria-label",t[8]),32784&r[0]&&L(a,t[4])},d(t){t&&S(e),t&&S(o),t&&S(a),F(p,t),l=!1,c()}}}function fo(t){let e,n,r=!t[5]&&uo(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){t[5]?r&&($t(),wt(r,1,1,(()=>{r=null})),bt()):r?(r.p(t,n),32&n[0]&&_t(r,1)):(r=uo(t),r.c(),_t(r,1),r.m(e.parentNode,e))},i(t){n||(_t(r),n=!0)},o(t){wt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function go(t,e,r){let i,o,a,s,l,c,u,d,p,g,m,v,y,$,b,_=n,w=n;t.$$.on_destroy.push((()=>_())),t.$$.on_destroy.push((()=>w()));let{json:x={}}=e,{templateContext:k}=e,{origJson:E}=e,{layoutParams:C}=e;const A=tt(Tt),V=A.getJsonWithVars(x.value_variable);let j=!1;V||(j=!0,A.logError(It(new Error('Missing "value_variable" in "select"'))));let P=V&&A.getVariable(V,"string")||Mi("temp","string","");f(t,P,(t=>r(4,c=t)));let D="";const S=x.options,F=Array.isArray(S)&&S.filter((t=>"string"==typeof t.value))||[];Array.isArray(F)&&F.length||A.logError(It(new Error('Empty selection "items" in "select"')));let z="",N=null,M="";const T=A.getDerivedFromVars(x.hint_text);f(t,T,(t=>r(37,$=t)));const I=A.getDerivedFromVars(x.hint_color);f(t,I,(t=>r(36,y=t)));let O="rgba(0,0,0,.45)";const J=A.getDerivedFromVars(x.font_size);f(t,J,(t=>r(35,v=t)));let B=12;const R=A.getDerivedFromVars(x.font_weight);let U;f(t,R,(t=>r(34,m=t)));const L=A.getDerivedFromVars(x.line_height);let W;f(t,L,(t=>r(33,g=t)));const H=A.getDerivedFromVars(x.letter_spacing);f(t,H,(t=>r(32,p=t)));let q="";const G=A.getDerivedFromVars(x.text_color);f(t,G,(t=>r(31,d=t)));let K="#000",X="";return t.$$set=t=>{"json"in t&&r(0,x=t.json),"templateContext"in t&&r(1,k=t.templateContext),"origJson"in t&&r(2,E=t.origJson),"layoutParams"in t&&r(3,C=t.layoutParams)},t.$$.update=()=>{if(16&t.$$.dirty[0]&&(D=c),16&t.$$.dirty[0]){const t=F.find((t=>t.value===c));t?r(6,z=t.text||t.value):(r(6,z=""),c&&A.logError(It(new Error('Value from the variable was not found in the selection items for "select"'))))}if(1&t.$$.dirty[0]&&(r(13,i=A.getDerivedFromVars(x.paddings)),w(),w=h(i,(t=>r(38,b=t)))),8388608&t.$$.dirty[0]|128&t.$$.dirty[1]&&(r(23,N=ve(b||void 0,N)),r(7,M=N?ae(N):"")),64&t.$$.dirty[1]&&r(12,o=$),16777216&t.$$.dirty[0]|32&t.$$.dirty[1]&&r(24,O=Wt(y,1,O)),33554432&t.$$.dirty[0]|16&t.$$.dirty[1]&&r(25,B=We(v,B)),67108864&t.$$.dirty[0]|8&t.$$.dirty[1]&&r(26,U=qe(m,U)),33554432&t.$$.dirty[0]|4&t.$$.dirty[1]){const t=g;Ae(t)&&r(27,W=t/B)}33554432&t.$$.dirty[0]|2&t.$$.dirty[1]&&se(p)&&r(28,q=Rt(p/B*10)),536870912&t.$$.dirty[0]|1&t.$$.dirty[1]&&r(29,K=Wt(d,1,K)),1&t.$$.dirty[0]&&(r(11,a=A.getDerivedFromVars(x.accessibility)),_(),_=h(a,(t=>r(30,u=t)))),1073741824&t.$$.dirty[0]&&((null==u?void 0:u.description)?r(8,X=u.description):A.logError(It(new Error('Missing accessibility "description" for select'),{level:"warn"}))),16&t.$$.dirty[0]&&r(10,s={hint:!c}),1056964608&t.$$.dirty[0]&&r(9,l={"--divkit-input-hint-color":O,"font-size":Rt(B),"font-weight":U,"line-height":W,"letter-spacing":q,color:K})},[x,k,E,C,c,j,z,M,X,l,s,a,o,i,P,F,T,I,J,R,L,H,G,N,O,B,U,W,q,K,u,d,p,g,m,v,y,$,b,function(){c=function(t){const e=t.querySelector(":checked")||t.options[0];return e&&e.__value}(this),P.set(c),r(15,F)}]}const mo={};function vo(t){let e,n,r;var i=t[5];function o(t){return{props:{json:t[3],templateContext:t[4],layoutParams:t[2],origJson:t[1]||t[0]}}}return i&&(e=new i(o(t))),{c(){e&&jt(e.$$.fragment),n=I()},m(t,i){e&&Pt(e,t,i),D(t,n,i),r=!0},p(t,r){const a={};if(8&r&&(a.json=t[3]),16&r&&(a.templateContext=t[4]),4&r&&(a.layoutParams=t[2]),3&r&&(a.origJson=t[1]||t[0]),i!==(i=t[5])){if(e){$t();const t=e;wt(t.$$.fragment,1,0,(()=>{Dt(t,1)})),bt()}i?(e=new i(o(t)),jt(e.$$.fragment),_t(e.$$.fragment,1),Pt(e,n.parentNode,n)):e=null}else i&&e.$set(a)},i(t){r||(e&&_t(e.$$.fragment,t),r=!0)},o(t){e&&wt(e.$$.fragment,t),r=!1},d(t){t&&S(n),e&&Dt(e,t)}}}function yo(t){let e,n,r=t[5]&&vo(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){let[i]=n;t[5]?r?(r.p(t,i),32&i&&_t(r,1)):(r=vo(t),r.c(),_t(r,1),r.m(e.parentNode,e)):r&&($t(),wt(r,1,1,(()=>{r=null})),bt())},i(t){n||(_t(r),n=!0)},o(t){wt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function $o(t,e,n){let{div:r}=e,{templateContext:i}=e,{origJson:o}=e,{layoutParams:a}=e;const s=tt(Tt);let l,c,u;return t.$$set=t=>{"div"in t&&n(0,r=t.div),"templateContext"in t&&n(6,i=t.templateContext),"origJson"in t&&n(1,o=t.origJson),"layoutParams"in t&&n(2,a=t.layoutParams)},t.$$.update=()=>{if(121&t.$$.dirty&&(n(3,l=r),n(4,c=i),n(5,u=l&&mo[l.type]||void 0),!u&&(n(4,({templateContext:c,json:l}=s.processTemplate(l,c)),c,(n(3,l),n(0,r),n(6,i),n(5,u),n(4,c))),n(5,u=l&&mo[l.type]||void 0),!u))){let t;t=(null==l?void 0:l.type)&&s.hasTemplate(l.type)?"Recursive template":"Unknown component",s.logError(It(new Error(t),{additional:{component:(null==l?void 0:l.type)||"<missing>"}}))}},[r,o,a,l,c,u,i]}mo.text=class extends Ft{constructor(t){super(),St(this,t,fn,hn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},mo.container=class extends Ft{constructor(t){super(),St(this,t,Nn,zn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},mo.separator=class extends Ft{constructor(t){super(),St(this,t,Bn,Jn,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}},mo.image=Zn,mo.gif=Zn,mo.grid=class extends Ft{constructor(t){super(),St(this,t,lr,sr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},mo.gallery=class extends Ft{constructor(t){super(),St(this,t,xr,wr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},mo.tabs=class extends Ft{constructor(t){super(),St(this,t,Mr,Nr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},mo.state=class extends Ft{constructor(t){super(),St(this,t,si,oi,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}},mo.pager=class extends Ft{constructor(t){super(),St(this,t,gi,fi,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},mo.indicator=class extends Ft{constructor(t){super(),St(this,t,wi,_i,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},mo.slider=class extends Ft{constructor(t){super(),St(this,t,qi,Wi,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},mo.input=class extends Ft{constructor(t){super(),St(this,t,so,ao,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},mo.select=class extends Ft{constructor(t){super(),St(this,t,go,fo,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}};const bo=class extends Ft{constructor(t){super(),St(this,t,$o,yo,d,{div:0,templateContext:6,origJson:1,layoutParams:2})}};function _o(t,e,n){const r=t.slice();r[1]=e[n];const i=r[1].split(":");return r[2]=i[0],r[3]=i[1],r}function wo(t){let e,n,r,i=[...Object.keys(t[0])],o=[];for(let e=0;e<i.length;e+=1)o[e]=Co(_o(t,i,e));return{c(){e=N("svg"),n=N("defs");for(let t=0;t<o.length;t+=1)o[t].c();J(e,"class",r="divkit-dc22b"),J(e,"aria-hidden","true")},m(t,r){D(t,e,r),V(e,n);for(let t=0;t<o.length;t+=1)o[t].m(n,null)},p(t,e){if(1&e){let r;for(i=[...Object.keys(t[0])],r=0;r<i.length;r+=1){const a=_o(t,i,r);o[r]?o[r].p(a,e):(o[r]=Co(a),o[r].c(),o[r].m(n,null))}for(;r<o.length;r+=1)o[r].d(1);o.length=i.length}},d(t){t&&S(e),F(o,t)}}}function xo(t){let e,n;return{c(){e=N("feBlend"),J(e,"in2","SourceGraphic"),J(e,"mode",n=t[3])},m(t,n){D(t,e,n)},p(t,r){1&r&&n!==(n=t[3])&&J(e,"mode",n)},d(t){t&&S(e)}}}function ko(t){let e;return{c(){e=N("feComposite"),J(e,"in2","SourceGraphic"),J(e,"operator","arithmetic"),J(e,"k1","1"),J(e,"k2","0"),J(e,"k3","0"),J(e,"k4","0")},m(t,n){D(t,e,n)},p:n,d(t){t&&S(e)}}}function Eo(t){let e,n;return{c(){e=N("feComposite"),J(e,"in2","SourceGraphic"),J(e,"operator",n=t[3].split("_")[1])},m(t,n){D(t,e,n)},p(t,r){1&r&&n!==(n=t[3].split("_")[1])&&J(e,"operator",n)},d(t){t&&S(e)}}}function Co(t){let e,n,r,i;function o(t,e){return"source_in"===t[3]||"source_atop"===t[3]?Eo:"multiply"===t[3]?ko:xo}let a=o(t),s=a(t);return{c(){e=N("filter"),n=N("feFlood"),s.c(),J(n,"flood-color",r=t[2]),J(e,"id",i=t[0][t[1]])},m(t,r){D(t,e,r),V(e,n),s.m(e,null)},p(t,l){1&l&&r!==(r=t[2])&&J(n,"flood-color",r),a===(a=o(t))&&s?s.p(t,l):(s.d(1),s=a(t),s&&(s.c(),s.m(e,null))),1&l&&i!==(i=t[0][t[1]])&&J(e,"id",i)},d(t){t&&S(e),s.d()}}}function Ao(t){let e,r=Object.keys(t[0]).length,i=r&&wo(t);return{c(){i&&i.c(),e=I()},m(t,n){i&&i.m(t,n),D(t,e,n)},p(t,n){let[o]=n;1&o&&(r=Object.keys(t[0]).length),r?i?i.p(t,o):(i=wo(t),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null)},i:n,o:n,d(t){i&&i.d(t),t&&S(e)}}}function Vo(t,e,n){let{svgFiltersMap:r}=e;return t.$$set=t=>{"svgFiltersMap"in t&&n(0,r=t.svgFiltersMap)},[r]}const jo=class extends Ft{constructor(t){super(),St(this,t,Vo,Ao,d,{svgFiltersMap:0})}};function Po(t,e,n,r){const i=n[t.type];if(!i)return r(It(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,n){const r=Object.keys(n).filter((t=>"__proto__"!==t)),i=r.filter((t=>"$"!==t.charAt(0))),o=r.filter((t=>"$"===t.charAt(0)));return i.forEach((r=>{const i=n[r];"object"==typeof i&&null!==i?(e[r]=Array.isArray(i)?[]:{},t(e[r],i)):e[r]=i})),o.forEach((t=>{const r=n[t],i=a[r];if(void 0!==i){const n=t.substring(1);e[n]=i}})),e}({},i);for(o in t)"type"!==o&&"__proto__"!==o&&t.hasOwnProperty(o)&&(s[o]=t[o]);return{json:s,templateContext:a}}function Do(){}function So(t){return{subscribe:e=>(e(t),Do)}}function Fo(t,e){return e.reduce(((t,e)=>({type:"BinaryExpression",operator:e[1],left:t,right:e[3]})),t)}function zo(t,e){return e.reduce(((t,e)=>({type:"LogicalExpression",operator:e[1],left:t,right:e[3]})),t)}function No(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 Mo(t){try{return Pi(t)}catch(e){throw new Error("Value ".concat(t," can't be converted to Integer type."))}}function To(t){if("'"===t||"\\"===t)return t;throw new Error("Incorrect string escape")}function Io(t,e,n,r){var i=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(i,Io.prototype),i.expected=e,i.found=n,i.location=r,i.name="SyntaxError",i}function Oo(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,t+(n+=n.repeat(e)).slice(0,e))}function Jo(t,e){var n,r={},i=(e=void 0!==e?e:{}).grammarSource,o={start:jt,JsonStringContents:function(){var t,e,n;for(t=mt,e=[],n=Pt();n!==r;)e.push(n),n=Pt();return vt=t,e=gt(e)}},a=jt,s="@{",l="}",c="@{}",u="\\",d="||",p="&&",h="==",f="!=",g=">=",m="<=",v="+",y="-",$="true",b="false",_=/^[^}]/,w=/^[^'}]/,x=/^[0-9]/,k=/^[a-zA-Z_0-9.]/,E=/^[a-zA-Z_]/,C=/^[ \t\r\n]/,A=xt("@{",!1),V=xt("}",!1),j=xt("@{}",!1),P=xt("\\",!1),D={type:"any"},S=kt(["}"],!0,!1),F=xt("?",!1),z=xt(":",!1),N=xt("||",!1),M=xt("&&",!1),T=xt("==",!1),I=xt("!=",!1),O=xt(">=",!1),J=xt(">",!1),B=xt("<=",!1),R=xt("<",!1),U=xt("+",!1),L=xt("-",!1),W=xt("/",!1),H=xt("*",!1),q=xt("%",!1),G=xt("!",!1),K=xt("(",!1),X=xt(")",!1),Y=xt(",",!1),Z=Et("string"),Q=xt("'",!1),tt=kt(["'","}"],!0,!1),et=Et("integer"),nt=kt([["0","9"]],!1,!1),rt=Et("number"),it=xt(".",!1),ot=xt("e",!1),at=xt("E",!1),st=Et("boolean"),lt=xt("true",!1),ct=xt("false",!1),ut=kt([["a","z"],["A","Z"],"_",["0","9"],"."],!1,!1),dt=Et("identifier"),pt=kt([["a","z"],["A","Z"],"_"],!1,!1),ht=Et("whitespace"),ft=kt([" ","\t","\r","\n"],!1,!1),gt=function(t){return No(t)},mt=0,vt=0,yt=[{line:1,column:1}],$t=0,bt=[],_t=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 wt(){return t.substring(vt,mt)}function xt(t,e){return{type:"literal",text:t,ignoreCase:e}}function kt(t,e,n){return{type:"class",parts:t,inverted:e,ignoreCase:n}}function Et(t){return{type:"other",description:t}}function Ct(e){var n,r=yt[e];if(r)return r;for(n=e-1;!yt[n];)n--;for(r={line:(r=yt[n]).line,column:r.column};n<e;)10===t.charCodeAt(n)?(r.line++,r.column=1):r.column++,n++;return yt[e]=r,r}function At(t,e){var n=Ct(t),r=Ct(e);return{source:i,start:{offset:t,line:n.line,column:n.column},end:{offset:e,line:r.line,column:r.column}}}function Vt(t){mt<$t||(mt>$t&&($t=mt,bt=[]),bt.push(t))}function jt(){var t,e;return t=mt,Ut(),(e=Dt())!==r?(Ut(),vt=t,t=e):(mt=t,t=r),t}function Pt(){var e,n,i,o,a;if(e=mt,t.substr(mt,2)===s?(n=s,mt+=2):(n=r,0===_t&&Vt(A)),n!==r?(i=Ut(),(o=Dt())!==r?(Ut(),125===t.charCodeAt(mt)?(a=l,mt++):(a=r,0===_t&&Vt(V)),a!==r?(vt=e,e=o):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,t.substr(mt,3)===c?(n=c,mt+=3):(n=r,0===_t&&Vt(j)),n!==r&&(vt=e,n=""),(e=n)===r&&(e=mt,n=mt,_t++,92===t.charCodeAt(mt)?(i=u,mt++):(i=r,0===_t&&Vt(P)),i===r&&(t.substr(mt,2)===s?(i=s,mt+=2):(i=r,0===_t&&Vt(A))),_t--,i===r?n=void 0:(mt=n,n=r),n!==r?(t.length>mt?(i=t.charAt(mt),mt++):(i=r,0===_t&&Vt(D)),i!==r?(vt=e,e=wt()):(mt=e,e=r)):(mt=e,e=r),e===r))){if(e=mt,t.substr(mt,2)===s?(n=s,mt+=2):(n=r,0===_t&&Vt(A)),n!==r){if(i=[],_.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===_t&&Vt(S)),o!==r)for(;o!==r;)i.push(o),_.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===_t&&Vt(S));else i=r;i!==r?(125===t.charCodeAt(mt)?(o=l,mt++):(o=r,0===_t&&Vt(V)),o!==r?(vt=e,e=function(){throw new Error("Error tokenizing '"+t+"'.")}()):(mt=e,e=r)):(mt=e,e=r)}else mt=e,e=r;e===r&&(e=mt,t.substr(mt,2)===s?(n=s,mt+=2):(n=r,0===_t&&Vt(A)),n!==r&&(vt=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),(e=n)===r&&(e=mt,92===t.charCodeAt(mt)?(n=u,mt++):(n=r,0===_t&&Vt(P)),n!==r?(t.substr(mt,2)===s?(i=s,mt+=2):(i=r,0===_t&&Vt(A)),i!==r?(vt=e,e=i):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,92===t.charCodeAt(mt)?(n=u,mt++):(n=r,0===_t&&Vt(P)),n!==r?(t.length>mt?(i=t.charAt(mt),mt++):(i=r,0===_t&&Vt(D)),i!==r?(vt=e,e=To(i)):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,92===t.charCodeAt(mt)?(n=u,mt++):(n=r,0===_t&&Vt(P)),n!==r&&(vt=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),e=n))))}return e}function Dt(){var e,n,i,o,a,s;return e=mt,(n=St())!==r?(Ut(),63===t.charCodeAt(mt)?(i="?",mt++):(i=r,0===_t&&Vt(F)),i!==r?(Ut(),(o=Dt())!==r?(Ut(),58===t.charCodeAt(mt)?(a=":",mt++):(a=r,0===_t&&Vt(z)),a!==r?(Ut(),(s=Dt())!==r?(vt=e,e={type:"ConditionalExpression",test:n,consequent:o,alternate:s}):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=St()),e}function St(){var e,n,i,o,a,s,l,c;if(e=mt,(n=Ft())!==r){for(i=[],o=mt,a=Ut(),t.substr(mt,2)===d?(s=d,mt+=2):(s=r,0===_t&&Vt(N)),s!==r?(l=Ut(),(c=Ft())!==r?o=a=[a,s,l,c]:(mt=o,o=r)):(mt=o,o=r);o!==r;)i.push(o),o=mt,a=Ut(),t.substr(mt,2)===d?(s=d,mt+=2):(s=r,0===_t&&Vt(N)),s!==r?(l=Ut(),(c=Ft())!==r?o=a=[a,s,l,c]:(mt=o,o=r)):(mt=o,o=r);vt=e,e=zo(n,i)}else mt=e,e=r;return e}function Ft(){var e,n,i,o,a,s,l,c;if(e=mt,(n=zt())!==r){for(i=[],o=mt,a=Ut(),t.substr(mt,2)===p?(s=p,mt+=2):(s=r,0===_t&&Vt(M)),s!==r?(l=Ut(),(c=zt())!==r?o=a=[a,s,l,c]:(mt=o,o=r)):(mt=o,o=r);o!==r;)i.push(o),o=mt,a=Ut(),t.substr(mt,2)===p?(s=p,mt+=2):(s=r,0===_t&&Vt(M)),s!==r?(l=Ut(),(c=zt())!==r?o=a=[a,s,l,c]:(mt=o,o=r)):(mt=o,o=r);vt=e,e=zo(n,i)}else mt=e,e=r;return e}function zt(){var e,n,i,o,a,s,l,c;if(e=mt,(n=Nt())!==r){for(i=[],o=mt,a=Ut(),t.substr(mt,2)===h?(s=h,mt+=2):(s=r,0===_t&&Vt(T)),s===r&&(t.substr(mt,2)===f?(s=f,mt+=2):(s=r,0===_t&&Vt(I))),s!==r?(l=Ut(),(c=Nt())!==r?o=a=[a,s,l,c]:(mt=o,o=r)):(mt=o,o=r);o!==r;)i.push(o),o=mt,a=Ut(),t.substr(mt,2)===h?(s=h,mt+=2):(s=r,0===_t&&Vt(T)),s===r&&(t.substr(mt,2)===f?(s=f,mt+=2):(s=r,0===_t&&Vt(I))),s!==r?(l=Ut(),(c=Nt())!==r?o=a=[a,s,l,c]:(mt=o,o=r)):(mt=o,o=r);vt=e,e=Fo(n,i)}else mt=e,e=r;return e}function Nt(){var e,n,i,o,a,s,l,c;if(e=mt,(n=Mt())!==r){for(i=[],o=mt,a=Ut(),t.substr(mt,2)===g?(s=g,mt+=2):(s=r,0===_t&&Vt(O)),s===r&&(62===t.charCodeAt(mt)?(s=">",mt++):(s=r,0===_t&&Vt(J)),s===r&&(t.substr(mt,2)===m?(s=m,mt+=2):(s=r,0===_t&&Vt(B)),s===r&&(60===t.charCodeAt(mt)?(s="<",mt++):(s=r,0===_t&&Vt(R))))),s!==r?(l=Ut(),(c=Mt())!==r?o=a=[a,s,l,c]:(mt=o,o=r)):(mt=o,o=r);o!==r;)i.push(o),o=mt,a=Ut(),t.substr(mt,2)===g?(s=g,mt+=2):(s=r,0===_t&&Vt(O)),s===r&&(62===t.charCodeAt(mt)?(s=">",mt++):(s=r,0===_t&&Vt(J)),s===r&&(t.substr(mt,2)===m?(s=m,mt+=2):(s=r,0===_t&&Vt(B)),s===r&&(60===t.charCodeAt(mt)?(s="<",mt++):(s=r,0===_t&&Vt(R))))),s!==r?(l=Ut(),(c=Mt())!==r?o=a=[a,s,l,c]:(mt=o,o=r)):(mt=o,o=r);vt=e,e=Fo(n,i)}else mt=e,e=r;return e}function Mt(){var e,n,i,o,a,s,l,c;if(e=mt,(n=Tt())!==r){for(i=[],o=mt,a=Ut(),43===t.charCodeAt(mt)?(s=v,mt++):(s=r,0===_t&&Vt(U)),s===r&&(45===t.charCodeAt(mt)?(s=y,mt++):(s=r,0===_t&&Vt(L))),s!==r?(l=Ut(),(c=Tt())!==r?o=a=[a,s,l,c]:(mt=o,o=r)):(mt=o,o=r);o!==r;)i.push(o),o=mt,a=Ut(),43===t.charCodeAt(mt)?(s=v,mt++):(s=r,0===_t&&Vt(U)),s===r&&(45===t.charCodeAt(mt)?(s=y,mt++):(s=r,0===_t&&Vt(L))),s!==r?(l=Ut(),(c=Tt())!==r?o=a=[a,s,l,c]:(mt=o,o=r)):(mt=o,o=r);vt=e,e=Fo(n,i)}else mt=e,e=r;return e}function Tt(){var e,n,i,o,a,s,l,c;if(e=mt,(n=It())!==r){for(i=[],o=mt,a=Ut(),47===t.charCodeAt(mt)?(s="/",mt++):(s=r,0===_t&&Vt(W)),s===r&&(42===t.charCodeAt(mt)?(s="*",mt++):(s=r,0===_t&&Vt(H)),s===r&&(37===t.charCodeAt(mt)?(s="%",mt++):(s=r,0===_t&&Vt(q)))),s!==r?(l=Ut(),(c=It())!==r?o=a=[a,s,l,c]:(mt=o,o=r)):(mt=o,o=r);o!==r;)i.push(o),o=mt,a=Ut(),47===t.charCodeAt(mt)?(s="/",mt++):(s=r,0===_t&&Vt(W)),s===r&&(42===t.charCodeAt(mt)?(s="*",mt++):(s=r,0===_t&&Vt(H)),s===r&&(37===t.charCodeAt(mt)?(s="%",mt++):(s=r,0===_t&&Vt(q)))),s!==r?(l=Ut(),(c=It())!==r?o=a=[a,s,l,c]:(mt=o,o=r)):(mt=o,o=r);vt=e,e=Fo(n,i)}else mt=e,e=r;return e}function It(){var e,n,i;return(e=Bt())===r&&(e=Jt())===r&&(e=mt,33===t.charCodeAt(mt)?(n="!",mt++):(n=r,0===_t&&Vt(G)),n===r&&(43===t.charCodeAt(mt)?(n=v,mt++):(n=r,0===_t&&Vt(U)),n===r&&(45===t.charCodeAt(mt)?(n=y,mt++):(n=r,0===_t&&Vt(L)))),n!==r?(Ut(),(i=It())!==r?(vt=e,e={type:"UnaryExpression",operator:n,argument:i}):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=function(){var e,n,i,o,a;return e=mt,(n=Rt())!==r?(Ut(),40===t.charCodeAt(mt)?(i="(",mt++):(i=r,0===_t&&Vt(K)),i!==r?(Ut(),o=function(){var e,n,i,o,a,s,l;if(e=mt,(n=Dt())!==r){for(i=[],o=mt,Ut(),44===t.charCodeAt(mt)?(a=",",mt++):(a=r,0===_t&&Vt(Y)),a!==r?(Ut(),(s=Dt())!==r?o=s:(mt=o,o=r)):(mt=o,o=r);o!==r;)i.push(o),o=mt,Ut(),44===t.charCodeAt(mt)?(a=",",mt++):(a=r,0===_t&&Vt(Y)),a!==r?(Ut(),(s=Dt())!==r?o=s:(mt=o,o=r)):(mt=o,o=r);vt=e,l=i,e=[n,...l]}else mt=e,e=r;return e===r&&(e=Ut()),e}(),o!==r?(Ut(),41===t.charCodeAt(mt)?(a=")",mt++):(a=r,0===_t&&Vt(X)),a!==r?(vt=e,e={type:"CallExpression",callee:n,arguments:o}):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,(n=Rt())!==r&&(vt=e,n={type:"Variable",id:n}),(e=n)===r&&(e=function(){var e,n,i,o;return e=function(){var e,n,i,o;return _t++,e=mt,39===t.charCodeAt(mt)?(n="'",mt++):(n=r,0===_t&&Vt(Q)),n!==r?(i=function(){var t,e,n;for(t=mt,e=[],n=Ot();n!==r;)e.push(n),n=Ot();return vt=t,e=No(e)}(),39===t.charCodeAt(mt)?(o="'",mt++):(o=r,0===_t&&Vt(Q)),o!==r?(vt=e,e=i):(mt=e,e=r)):(mt=e,e=r),_t--,e===r&&(n=r,0===_t&&Vt(Z)),e}(),e===r&&(e=Bt())===r&&(e=Jt())===r&&(e=function(){var e,n;return _t++,e=mt,t.substr(mt,4)===$?(n=$,mt+=4):(n=r,0===_t&&Vt(lt)),n!==r&&(vt=e,n={type:"BooleanLiteral",value:!0}),(e=n)===r&&(e=mt,t.substr(mt,5)===b?(n=b,mt+=5):(n=r,0===_t&&Vt(ct)),n!==r&&(vt=e,n={type:"BooleanLiteral",value:!1}),e=n),_t--,e===r&&(n=r,0===_t&&Vt(st)),e}(),e===r&&(e=mt,40===t.charCodeAt(mt)?(n="(",mt++):(n=r,0===_t&&Vt(K)),n!==r&&(i=Dt())!==r?(41===t.charCodeAt(mt)?(o=")",mt++):(o=r,0===_t&&Vt(X)),o!==r?(vt=e,e=i):(mt=e,e=r)):(mt=e,e=r))),e}())),e}())),e}function Ot(){var e,n,i,o,a;if(e=mt,t.substr(mt,2)===s?(n=s,mt+=2):(n=r,0===_t&&Vt(A)),n!==r?(i=Ut(),(o=Dt())!==r?(Ut(),125===t.charCodeAt(mt)?(a=l,mt++):(a=r,0===_t&&Vt(V)),a!==r?(vt=e,e=o):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,t.substr(mt,3)===c?(n=c,mt+=3):(n=r,0===_t&&Vt(j)),n!==r&&(vt=e,n=""),(e=n)===r&&(e=mt,n=mt,_t++,92===t.charCodeAt(mt)?(i=u,mt++):(i=r,0===_t&&Vt(P)),i===r&&(39===t.charCodeAt(mt)?(i="'",mt++):(i=r,0===_t&&Vt(Q)),i===r&&(t.substr(mt,2)===s?(i=s,mt+=2):(i=r,0===_t&&Vt(A)))),_t--,i===r?n=void 0:(mt=n,n=r),n!==r?(t.length>mt?(i=t.charAt(mt),mt++):(i=r,0===_t&&Vt(D)),i!==r?(vt=e,e=wt()):(mt=e,e=r)):(mt=e,e=r),e===r))){if(e=mt,t.substr(mt,2)===s?(n=s,mt+=2):(n=r,0===_t&&Vt(A)),n!==r){if(i=[],w.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===_t&&Vt(tt)),o!==r)for(;o!==r;)i.push(o),w.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===_t&&Vt(tt));else i=r;i!==r?(125===t.charCodeAt(mt)?(o=l,mt++):(o=r,0===_t&&Vt(V)),o!==r?(vt=e,e=function(){throw new Error("Error tokenizing '"+t+"'.")}()):(mt=e,e=r)):(mt=e,e=r)}else mt=e,e=r;e===r&&(e=mt,t.substr(mt,2)===s?(n=s,mt+=2):(n=r,0===_t&&Vt(A)),n!==r&&(vt=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),(e=n)===r&&(e=mt,92===t.charCodeAt(mt)?(n=u,mt++):(n=r,0===_t&&Vt(P)),n!==r?(t.substr(mt,2)===s?(i=s,mt+=2):(i=r,0===_t&&Vt(A)),i!==r?(vt=e,e=i):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,92===t.charCodeAt(mt)?(n=u,mt++):(n=r,0===_t&&Vt(P)),n!==r?(t.length>mt?(i=t.charAt(mt),mt++):(i=r,0===_t&&Vt(D)),i!==r?(vt=e,e=To(i)):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,92===t.charCodeAt(mt)?(n=u,mt++):(n=r,0===_t&&Vt(P)),n!==r&&(vt=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),e=n))))}return e}function Jt(){var e,n,i,o;if(_t++,e=mt,45===t.charCodeAt(mt)?(n=y,mt++):(n=r,0===_t&&Vt(L)),n===r&&(n=null),i=[],x.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===_t&&Vt(nt)),o!==r)for(;o!==r;)i.push(o),x.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===_t&&Vt(nt));else i=r;return i!==r?(vt=e,e={type:"IntegerLiteral",value:Mo(wt())}):(mt=e,e=r),_t--,e===r&&(n=r,0===_t&&Vt(et)),e}function Bt(){var e,n,i,o,a,s,l,c,u,d;for(_t++,e=mt,45===t.charCodeAt(mt)?(n=y,mt++):(n=r,0===_t&&Vt(L)),n===r&&(n=null),i=[],x.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===_t&&Vt(nt));o!==r;)i.push(o),x.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===_t&&Vt(nt));if(46===t.charCodeAt(mt)?(o=".",mt++):(o=r,0===_t&&Vt(it)),o!==r){if(a=[],x.test(t.charAt(mt))?(s=t.charAt(mt),mt++):(s=r,0===_t&&Vt(nt)),s!==r)for(;s!==r;)a.push(s),x.test(t.charAt(mt))?(s=t.charAt(mt),mt++):(s=r,0===_t&&Vt(nt));else a=r;if(a!==r){if(s=mt,101===t.charCodeAt(mt)?(l="e",mt++):(l=r,0===_t&&Vt(ot)),l===r&&(69===t.charCodeAt(mt)?(l="E",mt++):(l=r,0===_t&&Vt(at))),l!==r){if(43===t.charCodeAt(mt)?(c=v,mt++):(c=r,0===_t&&Vt(U)),c===r&&(45===t.charCodeAt(mt)?(c=y,mt++):(c=r,0===_t&&Vt(L))),c===r&&(c=null),u=[],x.test(t.charAt(mt))?(d=t.charAt(mt),mt++):(d=r,0===_t&&Vt(nt)),d!==r)for(;d!==r;)u.push(d),x.test(t.charAt(mt))?(d=t.charAt(mt),mt++):(d=r,0===_t&&Vt(nt));else u=r;u!==r?s=l=[l,c,u]:(mt=s,s=r)}else mt=s,s=r;s===r&&(s=null),vt=e,e={type:"NumberLiteral",value:parseFloat(wt())}}else mt=e,e=r}else mt=e,e=r;if(e===r){if(e=mt,45===t.charCodeAt(mt)?(n=y,mt++):(n=r,0===_t&&Vt(L)),n===r&&(n=null),i=[],x.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===_t&&Vt(nt)),o!==r)for(;o!==r;)i.push(o),x.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===_t&&Vt(nt));else i=r;if(i!==r)if(101===t.charCodeAt(mt)?(o="e",mt++):(o=r,0===_t&&Vt(ot)),o===r&&(69===t.charCodeAt(mt)?(o="E",mt++):(o=r,0===_t&&Vt(at))),o!==r){if(43===t.charCodeAt(mt)?(a=v,mt++):(a=r,0===_t&&Vt(U)),a===r&&(45===t.charCodeAt(mt)?(a=y,mt++):(a=r,0===_t&&Vt(L))),a===r&&(a=null),s=[],x.test(t.charAt(mt))?(l=t.charAt(mt),mt++):(l=r,0===_t&&Vt(nt)),l!==r)for(;l!==r;)s.push(l),x.test(t.charAt(mt))?(l=t.charAt(mt),mt++):(l=r,0===_t&&Vt(nt));else s=r;s!==r?(vt=e,e={type:"NumberLiteral",value:parseFloat(wt())}):(mt=e,e=r)}else mt=e,e=r;else mt=e,e=r}return _t--,e===r&&(n=r,0===_t&&Vt(rt)),e}function Rt(){var e,n,i,o,a;if(_t++,e=mt,n=mt,_t++,i=function(){var e,n,i,o;return e=mt,t.substr(mt,4)===$?(n=$,mt+=4):(n=r,0===_t&&Vt(lt)),n===r&&(t.substr(mt,5)===b?(n=b,mt+=5):(n=r,0===_t&&Vt(ct))),n!==r?(i=mt,_t++,k.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===_t&&Vt(ut)),_t--,o===r?i=void 0:(mt=i,i=r),i!==r?e=n=[n,i]:(mt=e,e=r)):(mt=e,e=r),e}(),_t--,i===r?n=void 0:(mt=n,n=r),n!==r)if(E.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===_t&&Vt(pt)),i!==r){for(o=[],k.test(t.charAt(mt))?(a=t.charAt(mt),mt++):(a=r,0===_t&&Vt(ut));a!==r;)o.push(a),k.test(t.charAt(mt))?(a=t.charAt(mt),mt++):(a=r,0===_t&&Vt(ut));vt=e,e={type:"Identifier",name:wt()}}else mt=e,e=r;else mt=e,e=r;return _t--,e===r&&(n=r,0===_t&&Vt(dt)),e}function Ut(){var e,n;for(_t++,e=[],C.test(t.charAt(mt))?(n=t.charAt(mt),mt++):(n=r,0===_t&&Vt(ft));n!==r;)e.push(n),C.test(t.charAt(mt))?(n=t.charAt(mt),mt++):(n=r,0===_t&&Vt(ft));return _t--,n=r,0===_t&&Vt(ht),e}if((n=a())!==r&&mt===t.length)return n;throw n!==r&&mt<t.length&&Vt({type:"end"}),function(t,e,n){return new Io(Io.buildMessage(t,e),t,e,n)}(bt,$t<t.length?t.charAt($t):null,$t<t.length?At($t,$t+1):At($t,$t))}!function(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}(Io,Error),Io.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 i=this.location.start,o=this.location.source+":"+i.line+":"+i.column;if(r){var a=this.location.end,s=Oo("",i.line.toString().length," "),l=r[i.line-1],c=(i.line===a.line?a.column:l.length+1)-i.column||1;e+="\n --\x3e "+o+"\n"+s+" |\n"+i.line+" | "+l+"\n"+s+" | "+Oo("",i.column-1," ")+Oo("",c,"^")}else e+="\n at "+o}return e},Io.buildMessage=function(t,e){var n={literal:function(t){return'"'+i(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 r(t){return t.charCodeAt(0).toString(16).toUpperCase()}function i(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 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"+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?'"'+i(t)+'"':"end of input"}(e)+" found."};const Bo=new Map,Ro=new Map;function Uo(t,e,n){const r={args:e,cb:n},i=Bo.get(t)||[];Bo.has(t)||Bo.set(t,i),i.push(r);const o=t+":"+e.map((t=>"object"==typeof t?t.type:t)).join("#");Ro.set(o,r)}function Lo(t,e){let n=t.args.length,r=t.args.length;const i=t.args[t.args.length-1];if("object"==typeof i&&i.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 Wo(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=>{Wo(t,e)}));break;case"BinaryExpression":case"LogicalExpression":Wo(t.left,e),Wo(t.right,e);break;case"UnaryExpression":Wo(t.argument,e);break;case"ConditionalExpression":Wo(t.test,e),Wo(t.consequent,e),Wo(t.alternate,e);break;case"CallExpression":t.arguments.forEach((t=>{Wo(t,e)}))}}function Ho(t){return"url"===t.type||"color"===t.type?{type:"string",value:t.value}:t}function qo(t){return t.toISOString().replace("T"," ").replace(/\.\d{3}Z$/,"")}function Go(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 qo(t.value);if("color"===t.type)return na(ea(t.value));if("url"===t.type)return t.value;throw new Error("Unexpected type ".concat(t.type))}function Ko(t){let e=Go(t);return"string"===t.type&&(e="'"+e.replace(/\\/g,"\\'").replace(/'/g,"\\'")+"'"),e}function Xo(t){return"datetime"===t?"DateTime":t.charAt(0).toUpperCase()+t.substring(1)}function Yo(t,e){if(Ci)return Pi(e);if(e<0){const t=-Math.floor(-e);return 0===t?0:t}return Math.floor(e)}function Zo(t,e){if(e<ji||e>Vi)throw new Error("Integer overflow.");!Ci&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)&&(t.safeIntegerOverflow=!0)}function Qo(t){const e=[];return Wo(t,{Variable(t){e.push(t.id.name)}}),e}function ta(t,e){throw new Error("Failed to evaluate [".concat(t,"]. ").concat(e))}function ea(t){const e=qt(t);if(e)return e;throw new Error("Unable to convert value to Color, expected format #AARRGGBB.")}function na(t){return"#".concat([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 Lt(Math.round(t).toString(16),2)})).join("").toUpperCase())}function ra(t){return na(ea(t))}const ia=Number.MAX_VALUE,oa=Number.MIN_VALUE,aa="string",sa="integer",la="number",ca="boolean",ua="color",da="datetime";function pa(t,e){return{type:aa,value:Go(e)}}function ha(t,e){const n=Number(e.value);if(isNaN(n)||!Number.isFinite(n))throw new Error("Unable to convert value to Number.");return{type:la,value:n}}function fa(t,e,n,r){const i=t.variables.get(e.value);let o;return o=i&&i.getType()===r?i.getValue():n.value,"color"===r&&(o=ra(o)),{type:r,value:o}}function ga(t,e,n){return fa(t,e,n,n.type)}function ma(t,e,n){return fa(t,e,n,"color")}function va(t,e,n){return fa(t,e,n,"url")}const ya=t=>(e,n)=>{let r=new Date(n.value.getTime())[t]();return"getUTCMonth"===t?++r:"getUTCDay"===t&&0===r&&(r=7),{type:sa,value:r}},$a=ya("getUTCFullYear"),ba=ya("getUTCMonth"),_a=ya("getUTCDate"),wa=ya("getUTCDay"),xa=ya("getUTCHours"),ka=ya("getUTCMinutes"),Ea=ya("getUTCSeconds"),Ca=ya("getUTCMilliseconds");function Aa(t,e,n,r){if(!r.value.length)return t.warnings.push(It(new Error("String for padding is empty."),{level:"warn"})),"";let i="";const o=e.type===aa?e.value:Go(e);for(;i.length+o.length<n.value;)i+=r.value;return i.length>0&&i.length+o.length>n.value&&(i=i.substring(0,Number(n.value)-Number(o.length))),i}function Va(t,e,n,r){const i=Aa(t,e,n,r);return{type:aa,value:i+Go(e)}}function ja(t,e,n,r){const i=Aa(t,e,n,r);return{type:aa,value:Go(e)+i}}function Pa(t){return(e,n)=>{const r=ea(n.value);return{type:la,value:r[t]/255}}}function Da(t){return(e,n,r)=>{const i=ea(n.value);return i[t]=255*r.value,{type:ua,value:na(i)}}}const Sa=Pa("a"),Fa=Pa("r"),za=Pa("g"),Na=Pa("b"),Ma=Da("a"),Ta=Da("r"),Ia=Da("g"),Oa=Da("b");function Ja(t,e,n,r){if(e.value<0)throw new Error("Expecting non-negative number of milliseconds.");let i=Pi(e.value)/Pi(n);return Zo(t,i),"number"==typeof i&&(i=Math.floor(i)),r&&(i=Pi(i)%Pi(r)),{type:sa,value:i}}function Ba(t){return t.map(Ko).join(", ")}Uo("toString",[sa],pa),Uo("toString",[la],pa),Uo("toString",[ca],pa),Uo("toString",[ua],pa),Uo("toString",["url"],pa),Uo("toNumber",[sa],ha),Uo("toNumber",[aa],ha),Uo("toInteger",[la],(function(t,e){if(e.value>Vi||e.value<ji)throw new Error("Unable to convert value to Integer.");const n=e.value-e.value%1;return{type:sa,value:Pi(n)}})),Uo("toInteger",[aa],(function(t,e){let n;try{n=Pi(e.value)}catch(t){throw new Error("Unable to convert value to Integer.")}if("number"==typeof n&&(isNaN(n)||n%1!=0)||n>Vi||n<ji)throw new Error("Unable to convert value to Integer.");return{type:sa,value:n}})),Uo("toInteger",[ca],(function(t,e){return{type:sa,value:Pi(e.value?1:0)}})),Uo("toBoolean",[sa],(function(t,e){const n=Number(e.value);if(1!==n&&0!==n)throw new Error("Unable to convert value to Boolean.");return{type:ca,value:n}})),Uo("toBoolean",[aa],(function(t,e){if("true"!==e.value&&"false"!==e.value)throw new Error("Unable to convert value to Boolean.");return{type:ca,value:"true"===e.value?1:0}})),Uo("toColor",[aa],(function(t,e){return{type:ua,value:ra(e.value)}})),Uo("toUrl",[aa],(function(t,e){return{type:"url",value:e.value}})),Uo("encodeUri",[aa],(function(t,e){try{return{type:aa,value:encodeURIComponent(e.value)}}catch(t){throw new Error("Unable to encodeUri string.")}})),Uo("decodeUri",[aa],(function(t,e){try{return{type:aa,value:decodeURIComponent(e.value)}}catch(t){throw new Error("Unable to decodeUri string.")}})),Uo("getIntegerValue",[aa,sa],ga),Uo("getNumberValue",[aa,la],ga),Uo("getBooleanValue",[aa,ca],ga),Uo("getStringValue",[aa,aa],ga),Uo("getColorValue",[aa,ua],ma),Uo("getColorValue",[aa,aa],ma),Uo("getUrlValue",[aa,"url"],va),Uo("getUrlValue",[aa,aa],va),Uo("parseUnixTime",[sa],(function(t,e){return{type:da,value:new Date(1e3*Number(e.value))}})),Uo("nowLocal",[],(function(){return{type:da,value:new Date}})),Uo("addMillis",[da,sa],(function(t,e,n){return{type:da,value:new Date(e.value.getTime()+Number(n.value))}})),Uo("setYear",[da,sa],(function(t,e,n){const r=new Date(e.value);return r.setUTCFullYear(Number(n.value)),{type:da,value:r}})),Uo("setMonth",[da,sa],(function(t,e,n){const r=Number(n.value);if(r<1||r>12)throw new Error("Expecting month in [1..12], instead got ".concat(r,"."));const i=new Date(e.value);return i.setUTCMonth(r-1),{type:da,value:i}})),Uo("setDay",[da,sa],(function(t,e,n){const r=new Date(e.value),i=Number(n.value);if(i<=0&&-1!==i||i>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 ".concat(i," for date ").concat(Go(e),"."));return r.setUTCDate(-1===i?0:i),{type:da,value:r}})),Uo("setHours",[da,sa],(function(t,e,n){const r=Number(n.value);if(r<0||r>23)throw new Error("Expecting hours in [0..23], instead got ".concat(r,"."));const i=new Date(e.value);return i.setUTCHours(r),{type:da,value:i}})),Uo("setMinutes",[da,sa],(function(t,e,n){const r=Number(n.value);if(r<0||r>59)throw new Error("Expecting minutes in [0..59], instead got ".concat(r,"."));const i=new Date(e.value);return i.setUTCMinutes(r),{type:da,value:i}})),Uo("setSeconds",[da,sa],(function(t,e,n){const r=Number(n.value);if(r<0||r>59)throw new Error("Expecting seconds in [0..59], instead got ".concat(r,"."));const i=new Date(e.value);return i.setUTCSeconds(r),{type:da,value:i}})),Uo("setMillis",[da,sa],(function(t,e,n){const r=Number(n.value);if(r<0||r>999)throw new Error("Expecting millis in [0..999], instead got ".concat(r,"."));const i=new Date(e.value);return i.setUTCMilliseconds(r),{type:da,value:i}})),Uo("getYear",[da],$a),Uo("getMonth",[da],ba),Uo("getDay",[da],_a),Uo("getDayOfWeek",[da],wa),Uo("getHours",[da],xa),Uo("getMinutes",[da],ka),Uo("getSeconds",[da],Ea),Uo("getMillis",[da],Ca),Uo("getIntervalSeconds",[sa],(function(t,e){return Ja(t,e,1e3,60)})),Uo("getIntervalTotalSeconds",[sa],(function(t,e){return Ja(t,e,1e3)})),Uo("getIntervalMinutes",[sa],(function(t,e){return Ja(t,e,6e4,60)})),Uo("getIntervalTotalMinutes",[sa],(function(t,e){return Ja(t,e,6e4)})),Uo("getIntervalHours",[sa],(function(t,e){return Ja(t,e,36e5,24)})),Uo("getIntervalTotalHours",[sa],(function(t,e){return Ja(t,e,36e5)})),Uo("getIntervalTotalDays",[sa],(function(t,e){return Ja(t,e,864e5)})),Uo("getIntervalTotalWeeks",[sa],(function(t,e){return Ja(t,e,6048e5)})),Uo("len",[aa],(function(t,e){return{type:sa,value:e.value.length}})),Uo("contains",[aa,aa],(function(t,e,n){return{type:ca,value:e.value.includes(n.value)?1:0}})),Uo("substring",[aa,sa,sa],(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:aa,value:e.value.substring(Number(n.value),Number(r.value))}})),Uo("replaceAll",[aa,aa,aa],(function(t,e,n,r){let i;return i=n.value?e.value.replace(new RegExp(function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}(n.value),"g"),r.value):e.value,{type:aa,value:i}})),Uo("index",[aa,aa],(function(t,e,n){return{type:sa,value:e.value.indexOf(n.value)}})),Uo("lastIndex",[aa,aa],(function(t,e,n){return{type:sa,value:e.value.lastIndexOf(n.value)}})),Uo("trim",[aa],(function(t,e){return{type:aa,value:e.value.trim()}})),Uo("trimLeft",[aa],(function(t,e){return{type:aa,value:e.value.replace(/^\s+/,"")}})),Uo("trimRight",[aa],(function(t,e){return{type:aa,value:e.value.replace(/\s+$/,"")}})),Uo("toUpperCase",[aa],(function(t,e){return{type:aa,value:e.value.toUpperCase()}})),Uo("toLowerCase",[aa],(function(t,e){return{type:aa,value:e.value.toLowerCase()}})),Uo("padStart",[aa,sa,aa],Va),Uo("padStart",[sa,sa,aa],Va),Uo("padEnd",[aa,sa,aa],ja),Uo("padEnd",[sa,sa,aa],ja),Uo("div",[sa,sa],(function(t,e,n){if(n.value===Di)throw new Error("Division by zero is not supported.");let r=e.value/n.value;return r=Yo(0,r),Zo(t,r),{type:sa,value:r}})),Uo("div",[la,la],(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:la,value:r}})),Uo("mod",[sa,sa],(function(t,e,n){if(n.value===Di)throw new Error("Division by zero is not supported.");let r=e.value%n.value;return r=Yo(0,r),Zo(t,r),{type:sa,value:r}})),Uo("mod",[la,la],(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:la,value:r}})),Uo("mul",[{type:sa,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];let i=n.length?n[0].value:Di;for(let e=1;e<n.length;++e)i*=n[e].value,i=Yo(0,i),Zo(t,i);return{type:sa,value:i}})),Uo("mul",[{type:la,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];let i=n.length?n[0].value:0;for(let t=1;t<n.length;++t)i*=n[t].value;return{type:la,value:i}})),Uo("sub",[{type:sa,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];let i=n.length?n[0].value:Di;for(let e=1;e<n.length;++e)i-=n[e].value,i=Yo(0,i),Zo(t,i);return{type:sa,value:i}})),Uo("sub",[{type:la,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];let i=n.length?n[0].value:0;for(let t=1;t<n.length;++t)i-=n[t].value;return{type:la,value:i}})),Uo("sum",[{type:sa,isVararg:!0}],(function(t){let e=Di;for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(let n=0;n<r.length;++n)e+=r[n].value,e=Yo(0,e),Zo(t,e);return{type:sa,value:e}})),Uo("sum",[{type:la,isVararg:!0}],(function(t){let e=0;for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(let t=0;t<r.length;++t)e+=r[t].value;return{type:la,value:e}})),Uo("abs",[sa],(function(t,e){const n=Si(e.value);return Zo(t,n),{type:e.type,value:n}})),Uo("abs",[la],(function(t,e){const n=Math.abs(e.value);return{type:la,value:n}})),Uo("max",[{type:sa,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(!n.length)throw new Error("Non empty argument list is required for function 'max'.");let i=n[0].value;for(let t=1;t<n.length;++t)n[t].value>i&&(i=n[t].value);return{type:sa,value:i}})),Uo("max",[{type:la,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(!n.length)throw new Error("Non empty argument list is required for function 'max'.");return{type:la,value:Math.max(...n.map((t=>t.value)))}})),Uo("min",[{type:sa,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(!n.length)throw new Error("Non empty argument list is required for function 'min'.");let i=n[0].value;for(let t=1;t<n.length;++t)n[t].value<i&&(i=n[t].value);return{type:sa,value:i}})),Uo("min",[{type:la,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(!n.length)throw new Error("Non empty argument list is required for function 'min'.");return{type:la,value:Math.min(...n.map((t=>t.value)))}})),Uo("maxNumber",[],(function(){return{type:la,value:ia}})),Uo("minNumber",[],(function(){return{type:la,value:oa}})),Uo("maxInteger",[],(function(t){return Zo(t,Vi),{type:sa,value:Vi}})),Uo("minInteger",[],(function(t){return Zo(t,ji),{type:sa,value:ji}})),Uo("round",[la],(function(t,e){const n=Math.sign(e.value);return{type:la,value:n*Math.round(Math.abs(e.value))}})),Uo("floor",[la],(function(t,e){return{type:la,value:Math.floor(e.value)}})),Uo("ceil",[la],(function(t,e){return{type:la,value:Math.ceil(e.value)}})),Uo("signum",[sa],(function(t,e){return{type:sa,value:Fi(e.value)}})),Uo("signum",[la],(function(t,e){return{type:la,value:Math.sign(e.value)}})),Uo("copySign",[sa,sa],(function(t,e,n){let r;if(n.value===Di)r=e.value;else if(e.value===Di)r=0;else{const t=Fi(n.value);r=Si(e.value)*t}return Zo(t,r),{type:sa,value:r}})),Uo("copySign",[la,la],(function(t,e,n){let r=Math.sign(n.value);0===r&&(r=Object.is(r,0)?1:-1);const i=Math.abs(e.value)*r;return{type:la,value:i}})),Uo("getColorAlpha",[aa],Sa),Uo("getColorAlpha",[ua],Sa),Uo("getColorRed",[aa],Fa),Uo("getColorRed",[ua],Fa),Uo("getColorGreen",[aa],za),Uo("getColorGreen",[ua],za),Uo("getColorBlue",[aa],Na),Uo("getColorBlue",[ua],Na),Uo("setColorAlpha",[aa,la],Ma),Uo("setColorAlpha",[ua,la],Ma),Uo("setColorRed",[aa,la],Ta),Uo("setColorRed",[ua,la],Ta),Uo("setColorGreen",[aa,la],Ia),Uo("setColorGreen",[ua,la],Ia),Uo("setColorBlue",[aa,la],Oa),Uo("setColorBlue",[ua,la],Oa),Uo("rgb",[la,la,la],(function(t,e,n,r){const i={a:255,r:255*e.value,g:255*n.value,b:255*r.value};return{type:ua,value:na(i)}})),Uo("argb",[la,la,la,la],(function(t,e,n,r,i){const o={a:255*e.value,r:255*n.value,g:255*r.value,b:255*i.value};return{type:ua,value:na(o)}}));const Ra={StringLiteral:function(t,e){return{type:aa,value:e.value}},NumberLiteral:function(t,e){return{type:la,value:e.value}},IntegerLiteral:function(t,e){return Zo(t,e.value),{type:sa,value:e.value}},BooleanLiteral:function(t,e){return{type:ca,value:e.value?1:0}},UnaryExpression:function(t,e){const n=Ho(Ua(t,e.argument));switch(e.operator){case"!":if(n.type===ca)return{type:ca,value:n.value?0:1};ta("".concat(e.operator).concat(Ko(n)),"A Boolean is expected after a unary not.");case"+":case"-":const r="+"===e.operator?1:-1;if(n.type===sa){const e=n.value*Pi(r);return Zo(t,e),{type:sa,value:e}}if(n.type===la)return{type:la,value:n.value*r};ta("".concat(e.operator).concat(Ko(n)),"A Number is expected after a unary ".concat("+"===e.operator?"plus":"minus","."))}},ConditionalExpression:function(t,e){const n=Ho(Ua(t,e.test));if(n.type===ca)return n.value?Ua(t,e.consequent):Ua(t,e.alternate);ta("".concat(Ko(n)," ? ").concat(Ko(Ua(t,e.consequent))," : ").concat(Ko(Ua(t,e.alternate))),"Ternary must be called with a Boolean value as a condition.")},TemplateLiteral:function(t,e){let n="";if(2===e.quasis.length&&""===e.quasis[0].value&&""===e.quasis[1].value)return Ua(t,e.expressions[0]);for(let r=0;r<e.expressions.length;++r)n+=e.quasis[r].value,n+=Go(Ua(t,e.expressions[r]));return n+=e.quasis[e.quasis.length-1].value,{type:aa,value:n}},LogicalExpression:function(t,e){const n=Ho(Ua(t,e.left));if(n.type!==ca&&ta("".concat(Ko(n)," ").concat(e.operator," ..."),"'".concat(e.operator,"' must be called with boolean operands.")),"||"===e.operator&&n.value)return n;if("&&"===e.operator&&!n.value)return{type:ca,value:0};const r=Ho(Ua(t,e.right));return r.type!==ca&&ta("".concat(Ko(n)," ").concat(e.operator," ").concat(Ko(r)),"Operator '".concat(e.operator,"' cannot be applied to different types: Boolean and ").concat(Xo(r.type),".")),{type:ca,value:r.value}},BinaryExpression:function(t,e){const n=e.operator,r=Ua(t,e.left),i=Ua(t,e.right);if(r.type!==i.type&&ta("".concat(Ko(r)," ").concat(e.operator," ").concat(Ko(i)),"Operator '".concat(n,"' cannot be applied to different types: ").concat(Xo(r.type)," and ").concat(Xo(i.type),".")),"=="===n||"!="===n)return function(t,e,n){let r;return r=e.type===da&&n.type===da?e.value.getTime()===n.value.getTime():e.value===n.value,"!="===t&&(r=!r),{type:ca,value:r?1:0}}(n,r,i);if(">"===n||">="===n||"<"===n||"<="===n)return function(t,e,n){let r;e.type!==la&&e.type!==sa&&e.type!==da&&ta("".concat(Ko(e)," ").concat(t," ").concat(Ko(n)),"Operator '".concat(t,"' cannot be applied to ").concat(Xo(e.type)," type."));const i=e.type===da?e.value.getTime():e.value,o=n.type===da?n.value.getTime():n.value;return r=">"===t?i>o:">="===t?i>=o:"<"===t?i<o:i<=o,{type:ca,value:r?1:0}}(n,r,i);if("+"===n||"-"===n)return function(t,e,n,r){if(n.type!==aa&&n.type!==la&&n.type!==sa&&ta("".concat(Ko(n)," ").concat(e," ").concat(Ko(r)),"Operator '".concat(e,"' cannot be applied to ").concat(Xo(n.type)," type.")),n.type===aa)return"-"===e&&ta("".concat(Ko(n)," - ").concat(Ko(r)),"Operator '".concat(e,"' cannot be applied to ").concat(Xo(n.type)," type.")),{type:aa,value:n.value+r.value};let i="+"===e?n.value+r.value:n.value-r.value;if(n.type===sa)try{i=Yo(0,i),Zo(t,i)}catch(t){ta("".concat(Ko(n)," ").concat(e," ").concat(Ko(r)),t.message)}return{type:n.type,value:i}}(t,n,r,i);if("/"===n||"*"===n||"%"===n)return function(t,e,n,r){let i;if(n.type!==sa&&n.type!==la&&ta("".concat(Ko(n)," ").concat(e," ").concat(Ko(r)),"Operator '".concat(e,"' cannot be applied to ").concat(Xo(n.type)," type.")),"*"===e)i=n.value*r.value;else{if("/"!==e&&"%"!==e)throw new Error("Unsupported operation ".concat(e));0===Number(r.value)&&ta("".concat(Ko(n)," ").concat(e," ").concat(Ko(r)),"Division by zero is not supported."),i="/"===e?n.value/r.value:n.value%r.value}if(n.type===sa)try{i=Yo(0,i),Zo(t,i)}catch(t){ta("".concat(Ko(n)," ").concat(e," ").concat(Ko(r)),t.message)}return{type:n.type,value:i}}(t,n,r,i);throw new Error("Unsupported operation ".concat(n))},CallExpression:function(t,e){const n=e.callee.name;let r;const i=e.arguments.map((e=>Ua(t,e))),o=n+":"+i.map((t=>t.type)).join("#");if(Ro.has(o))r=Ro.get(o);else{const t=function(t,e){const n=Bo.get(t);if(!n)return{type:"missing"};let r=null;for(let t=0;t<n.length;++t){const i=Lo(n[t],e);if("match"===i.type)return n[t];r||(r=i)}if(!r)throw new Error("Missing function");return r}(n,i);if("expected"in t||"type"in t&&"missing"===t.type){const e=i.map((t=>Xo(t.type))).join(", "),r="".concat(n,"(").concat(Ba(i),")");"few"===t.type&&0===i.length?ta(r,"Non empty argument list is required for function '".concat(n,"'.")):"many"===t.type||"few"===t.type||"mismatch"===t.type?ta(r,"Function '".concat(n,"' has no matching override for given argument types: ").concat(e,".")):ta(r,"Unknown function name: ".concat(n,"."))}r=t}if(!r)throw new Error("Function not found");try{return r.cb(t,...i)}catch(t){ta("".concat(n,"(").concat(Ba(i),")"),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 '".concat(n,"' is missing."))}};function Ua(t,e){if(e.type in Ra)return Ra[e.type](t,e);throw new Error("Unsupported expression")}function La(t,e){try{const n={variables:t,warnings:[],safeIntegerOverflow:!1};!function(t,e){let n="";if(Wo(e,{Variable(e){n||t.variables.has(e.id.name)||(n=e.id.name)}}),n)throw new Error("Variable '".concat(n,"' is missing."))}(n,e);const r=Ua(n,e);return n.safeIntegerOverflow&&n.warnings.push(It(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:[]}}}class Wa{constructor(t){this.ast=t}apply(t,e){if(!function(t,e){let n=!1;return Wo(t,{Variable(t){e.has(t.id.name)||(n=!0)}}),n}(this.ast,t))try{const n=La(t,this.ast);n.warnings.forEach(e);const r=n.result;if("error"===r.type)return void e(It(new Error("Expression execution error"),{additional:{message:r.value}}));const i=r.value;if(i instanceof Date)return qo(i);if("boolean"===r.type)return Boolean(i);if("color"===r.type){const t=qt(String(i));if(t)return na(t);e(It(new Error("Expression execution error")))}return"integer"===r.type?i>2147483647||i<-2147483648?void e(It(new Error("Expression result is out of 32-bit int range"))):Number(i):i}catch(t){return void e(It(new Error("Expression execution error")))}}}function Ha(t,e,n){if(t)if("string"==typeof t){if((r=t).indexOf("@{")>-1||r.indexOf("\\")>-1){e.hasExpression=!0;try{const n=Jo(t,{startRule:"JsonStringContents"}),r=Qo(n);return e.vars.push(...r),new Wa(n)}catch(e){return void n(It(new Error("Unable to parse expression"),{additional:{expression:t}}))}}}else{if(Array.isArray(t))return t.map((t=>Ha(t,e,n)));if("object"==typeof t){const r={};for(const i in t)r[i]=Ha(t[i],e,n);return r}}var r;return t}function qa(t,e,n){if(t){if(t instanceof Wa)return t.apply(e,n);if(Array.isArray(t))return t.map((t=>qa(t,e,n)));if("object"==typeof t){const r={};for(const i in t)r[i]=qa(t[i],e,n);return r}}return t}function Ga(t,e){const n={vars:[],hasExpression:!1},r=Ha(t,n,e);return{vars:[...new Set(n.vars)],hasExpression:n.hasExpression,applyVars:t=>qa(r,t,e)}}const Ka={pagers:function(){return Nt(new Map)}},Xa=new Map,Ya=new Map;function Za(t){const e=Xa.get(t)||Nt("");return Xa.has(t)||Xa.set(t,e),e}function Qa(t){const e=Ya.get(t)||new Map;return Ya.has(t)||Ya.set(t,e),e}class ts{setVariable(t){const e=t.getName(),n=Qa(this);if(n.has(e))throw new Error("Variable with the same name already exist");n.set(e,t),Za(this).set(e)}getVariable(t){return Qa(this).get(t)}}function es(){return new ts}function ns(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const rs=new Set(["start","stop","pause","resume","cancel","reset"]);class is{constructor(t){ns(this,"timers",new Map),ns(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((t=>{let{id:e,action:n}=t;this.execTimerAction(e,n)})),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(It(new Error("Misconfigured timer"),{additional:{id:t.id}})):this.logError(It(new Error("Missing timer id")))}execTimerAction(t,e){if(!(t&&e&&this.timers.has(t)&&rs.has(e)))return void this.logError(It(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(),i=Math.max(0,n-(t.tickPassed||0));t.tickTimeout=window.setTimeout((()=>{this.tickOrUnholdAction(t),t.tickPassed=(performance.now()-r-i)%n,e()}),i)};e()}}start(t){if("running"===t.state)return void this.logError(It(new Error("The timer is already running")));if("paused"===t.state)return void this.logError(It(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(It(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(It(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(It(new Error("The timer has already been stopped")))}pause(t){if("stopped"===t.state)return void this.logError(It(new Error("The timer has already been stopped")));if("paused"===t.state)return void this.logError(It(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(It(new Error("The timer is already running"))):this.logError(It(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,!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 os(t){let e,n,r,i,o,a,s,l;return n=new jo({props:{svgFiltersMap:t[2]}}),i=new bo({props:{div:t[3],templateContext:t[6]}}),{c(){e=z("div"),jt(n.$$.fragment),r=T(),jt(i.$$.fragment),J(e,"class",o="divkit-b023c"+(t[4]?" ".concat("divkit-ee112"):"")+(t[0]?" ".concat(t[0]):""))},m(t,o){D(t,e,o),Pt(n,e,null),V(e,r),Pt(i,e,null),a=!0,s||(l=O(e,"touchstart",ss,{passive:!0}),s=!0)},p(t,r){const s={};4&r[0]&&(s.svgFiltersMap=t[2]),n.$set(s);const l={};8&r[0]&&(l.div=t[3]),i.$set(l),(!a||17&r[0]&&o!==(o="divkit-b023c"+(t[4]?" ".concat("divkit-ee112"):"")+(t[0]?" ".concat(t[0]):"")))&&J(e,"class",o)},i(t){a||(_t(n.$$.fragment,t),_t(i.$$.fragment,t),a=!0)},o(t){wt(n.$$.fragment,t),wt(i.$$.fragment,t),a=!1},d(t){t&&S(e),Dt(n),Dt(i),s=!1,l()}}}function as(t){let e,n,r=!t[1]&&t[3]&&os(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),D(t,e,i),n=!0},p(t,n){!t[1]&&t[3]?r?(r.p(t,n),10&n[0]&&_t(r,1)):(r=os(t),r.c(),_t(r,1),r.m(e.parentNode,e)):r&&($t(),wt(r,1,1,(()=>{r=null})),bt())},i(t){n||(_t(r),n=!0)},o(t){wt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function ss(){}function ls(t,e,n){let r;var i,o,a,s;let{id:l}=e,{json:c={}}=e,{platform:u="auto"}=e,{theme:d="system"}=e,{globalVariablesController:p=new ts}=e,{mix:h=""}=e,{customization:g={}}=e,{builtinProtocols:m=["http","https","tel","mailto","intent"]}=e,{extensions:v=new Map}=e,{onError:y}=e,{onStat:$}=e,{onCustomAction:b}=e,{onComponent:_}=e,w=Nt("desktop"===u);if(f(t,w,(t=>n(4,r=t))),"auto"===u&&"undefined"!=typeof matchMedia){const t=matchMedia("(any-pointer: coarse)");w.set(!t.matches),t.addListener((()=>{w.set(!t.matches)}))}let x="light",k=null;function E(){"system"===d&&k&&n(22,x=k.matches?"dark":"light")}const C=new Set(m);let A=!1;c||(A=!0,I(It(new Error('"json" prop is required')))),l||(A=!0,I(It(new Error('"id" prop is required'))));let V=function(t){if(!t)return It(new Error("Missing object"));const e=t.card,n=t.templates||{};if(!e)return It(new Error("Missing card"));if(!e.states||!e.states.length)return It(new Error("Missing states"));for(const t in n)if(n.hasOwnProperty(t)&&t in mo)return It(new Error("Template name collision"),{additional:{templateName:t}});for(let t=0;t<e.states.length;++t){if(!e.states[t].div)return It(new Error("Missing state div"),{additional:{stateId:e.states[t].state_id}});if("number"!=typeof e.states[t].state_id)return It(new Error("Missing state_id"),{additional:{index:t}})}return null}(c);const j=c.templates||{};V&&(A=!0,I(V));const P={stateChange:!1},D=Za(p),S=Qa(p),F=new Map,z=new Map,N=new Map;let M=null;function T(t){const e=Ga(t,I);return e.vars.length?e.applyVars(z):t}function I(t){y?y({error:t}):"warn"===(null==t?void 0:t.level)?console.warn(t):console.error(t)}function O(t,e){$&&$({type:t,action:e})}let J=0;function B(t){return"".concat(l,"-").concat(J++)}let R={},U={};function L(t){const e=t.url?String(t.url):"";if(e)try{const t=e.replace(/div-action:\/\//,""),n=/([^?]+)\?(.+)/.exec(t);if(!n)return;const r=new URLSearchParams(n[2]);switch(n[1]){case"set_state":!function(t){if(!t)throw new Error("Missing state id");let e=Y,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],i=n[t+1];let o=e.getChild(r);if(!o)return;o.setState(i),e=o}}(r.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=G(t);n&&n.setCurrentItem(Number(e))}(r.get("id"),r.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=G(t);n&&n.setPreviousItem(e)}(r.get("id"),r.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=G(t);n&&n.setNextItem(e)}(r.get("id"),r.get("overflow"));break;case"set_variable":const n=r.get("name"),i=r.get("value");if(n&&null!==i){const t=z.get(n);t?t.set(i):I(It(new Error("Cannot find variable"),{additional:{name:n}}))}else I(It(new Error("Incorrect set_variable_action"),{additional:{url:t}}));break;case"timer":const o=r.get("action"),a=r.get("id");M?M.execTimerAction(a,o):I(It(new Error("Incorrect timer action"),{additional:{id:a,action:o}}));break;default:I(It(new Error("Unknown type of action"),{additional:{url:e}}))}}catch(t){I(It(t,{additional:{url:e}}))}}async function W(t,e){if(t){for(let n=0;n<t.length;++n){let r=t[n];const i=r.url;if(i){const t=ee(i);if(t)if(ne(t,C)){if(e)if("_blank"===r.target){const t=window.open("","_blank");t&&(t.opener=null,t.location=i)}else location.href=i}else"div-action"===t?(L(r),await ct()):r.log_id&&(H(r),await ct())}}t.forEach((t=>{t.log_id&&O("click",t)}))}}function H(t){null==b||b(t)}const q=new Map;function G(t){if(q.has(t))return q.get(t);I(It(new Error("Missing instance with id"),{additional:{id:t}}))}const K=new Map;function X(t){for(const e of t)z.has(e)&&t.delete(e);return t}Q(Tt,{logError:I,logStat:O,hasTemplate:function(t){return t in j},processTemplate:function(t,e){if(!t)return{json:t,templateContext:e};const n=new Set([t.type]);for(;t.type in j;){if(({json:t,templateContext:e}=Po(t,e,j,I)),n.has(t.type))return{json:t,templateContext:e};n.add(t.type)}return{json:t,templateContext:e}},genId:B,genClass:function(t){return"divkit-".concat(B())},execAction:L,execAnyActions:W,execCustomAction:H,isRunning:function(t){return P[t]},setRunning:function(t,e){P[t]=e},registerInstance:function(t,e){q.has(t)?I(It(new Error("Duplicate instance id"),{additional:{id:t}})):q.set(t,e)},unregisterInstance:function(t){q.delete(t)},addSvgFilter:function(t,e){const r="".concat(t,":").concat(e);if(U[r]=U[r]||0,++U[r],R[r])return R[r];const i="".concat(B(),"-svg-filter");return n(2,R=Object.assign(Object.assign({},R),{[r]:i})),i},removeSvgFilter:function(t,e){if(!t)return;const r="".concat(t,":").concat(e);U[r]&&0==--U[r]&&n(2,R=Object.keys(R).reduce(((t,e)=>(U[e]&&(t[e]=R[e]),t)),{}))},getDerivedFromVars:function(t){if(!t)return So(t);const e=Ga(t,I);return e.vars.length?Mt(e.vars.map((t=>z.get(t)||function(t){const e=N.get(t)||Nt(void 0);return N.has(t)||N.set(t,e),e}(t))).filter(Kt),(()=>e.applyVars(z))):e.hasExpression?So(e.applyVars(z)):So(t)},getJsonWithVars:T,getStore:function(t){return K.has(t)||function(t){K.has(t)||K.set(t,Ka[t]())}(t),K.get(t)},getVariable:function(t,e){const n=z.get(t);if(n){const r=n.getType();if(r!==e)return void I(It(new Error('Variable should have type "'.concat(e,'"')),{additional:{name:t,foundType:r}}))}return n},getCustomization:function(t){return null==g?void 0:g[t]},getBuiltinProtocols:function(){return C},getExtension:function(t,e){const n=v.get(t);if(n)return new n(e||{})},getExtensionContext:function(){return{variables:z,logError:I}},isDesktop:w,registerComponent:void 0,unregisterComponent:void 0}),Q(be,{hasAction:()=>!1});const Y={setState(t){throw new Error("Not implemented")},getChild(t){if(tt&&tt.has(t))return tt.get(t);I(It(new Error("Missing state block with id"),{additional:{id:t}}))}};let tt=null;Q(oe,{registerInstance(t,e){tt||(tt=new Map),tt.has(t)?I(It(new Error("Duplicate state with id"),{additional:{id:t}})):tt.set(t,e)},unregisterInstance(t){null==tt||tt.delete(t)},runVisibilityTransition:(t,e,n,r,i)=>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 et=null===(i=null==c?void 0:c.card)||void 0===i?void 0:i.variables;Array.isArray(et)&&et.forEach((t=>{if(t&&t.type in Ni&&t.name){if(F.has(t.name))return void I(It(new Error("Duplicate variable"),{additional:{name:t.name}}));"integer"===t.type&&"number"==typeof t.value&&(t.value>Number.MAX_SAFE_INTEGER||t.value<Number.MIN_SAFE_INTEGER)&&I(It(new Error("The value of the integer variable could lose accuracy"),{level:"warn",additional:{name:t.name,value:t.value}}));try{const e=Mi(t.name,t.type,t.value);F.set(t.name,e),z.set(t.name,e)}catch(e){I(It(e,{additional:{name:t.name}}))}}}));const nt=c.palette;nt&&nt[x].forEach((t=>{if(F.has(t.name))I(It(new Error("Duplicate variable"),{additional:{name:t.name}}));else try{const e=Mi(t.name,"color",t.color);F.set(t.name,e),z.set(t.name,e)}catch(e){I(It(e,{additional:{name:t.name}}))}}));for(const[t,e]of S)z.has(t)||z.set(t,e);D.subscribe((t=>{if(t&&!z.has(t)){const e=S.get(t);z.set(t,e);const n=N.get(t);if(n){let t=0;e.subscribe((()=>{n.set(++t)}))}}}));const rt=null===(o=null==c?void 0:c.card)||void 0===o?void 0:o.variable_triggers;Array.isArray(rt)&&rt.forEach((t=>{let e=!1;if("string"!=typeof t.condition)return void I(It(new Error("variable_trigger has a condition that is not a string"),{additional:{condition:t.condition}}));const n=t.mode||"on_condition";if("on_variable"===n||"on_condition"===n)try{const r=Jo(t.condition,{startRule:"JsonStringContents"}),i=Qo(r);if(!i.length)return void I(It(new Error("variable_trigger must have variables in the condition"),{additional:{condition:t.condition}}));(function(t){const e=new Set(t);return X(e),e.size?new Promise((t=>{const n=D.subscribe((()=>{X(e),e.size||(n(),t())}))})):Promise.resolve()})(i).then((()=>{Mt(i.map((t=>z.get(t))).filter(Kt),(()=>{const t=La(z,r);return t.warnings.forEach(I),t.result})).subscribe((r=>{"error"!==r.type?(r.value&&("on_variable"===n||"on_condition"===n&&!1===e)&&t.actions.forEach((t=>{const e=T(t);e.log_id&&L(e)})),e=Boolean(r.value)):I(It(new Error("variable_trigger condition execution error"),{additional:{message:r.value}}))}))}))}catch(e){I(It(new Error("Unable to parse variable_trigger"),{additional:{condition:t.condition}}))}else I(It(new Error("variable_trigger has an unsupported mode"),{additional:{mode:n}}))}));const it=null===(a=null==c?void 0:c.card)||void 0===a?void 0:a.timers;if(it){const t=M=new is({logError:I,applyVars:T,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):I(It(new Error("Cannot find variable"),{additional:{name:t}}))},execAnyActions:W});it.forEach((e=>t.createTimer(e)))}const ot=null===(s=null==c?void 0:c.card)||void 0===s?void 0:s.states;let at;return ot&&!A&&(at={type:"state",id:"root",width:{type:"match_parent"},height:{type:"match_parent"},states:ot.map((t=>({state_id:t.state_id.toString(),div:t.div})))}),Z((()=>{M&&M.destroy()})),t.$$set=t=>{"id"in t&&n(8,l=t.id),"json"in t&&n(9,c=t.json),"platform"in t&&n(10,u=t.platform),"theme"in t&&n(7,d=t.theme),"globalVariablesController"in t&&n(11,p=t.globalVariablesController),"mix"in t&&n(0,h=t.mix),"customization"in t&&n(12,g=t.customization),"builtinProtocols"in t&&n(13,m=t.builtinProtocols),"extensions"in t&&n(14,v=t.extensions),"onError"in t&&n(15,y=t.onError),"onStat"in t&&n(16,$=t.onStat),"onCustomAction"in t&&n(17,b=t.onCustomAction),"onComponent"in t&&n(18,_=t.onComponent)},t.$$.update=()=>{8388736&t.$$.dirty[0]&&("light"===d||"dark"===d?n(22,x=d):"system"===d?"undefined"!=typeof matchMedia?(k||(n(23,k=matchMedia("(prefers-color-scheme: dark)")),k.addListener(E)),n(22,x=k.matches?"dark":"light")):n(22,x="light"):I(It(new Error("Unsupported theme")))),4194304&t.$$.dirty[0]&&x&&nt&&nt[x].forEach((t=>{const e=z.get(t.name);e&&e.setValue(t.color)}))},[h,A,R,at,r,w,{},d,l,c,u,p,g,m,v,y,$,b,_,function(t){n(7,d=t)},function(){},L,x,k]}const cs=class extends Ft{constructor(t){super(),St(this,t,ls,as,d,{id:8,json:9,platform:10,theme:7,globalVariablesController:11,mix:0,customization:12,builtinProtocols:13,extensions:14,onError:15,onStat:16,onCustomAction:17,onComponent:18,setTheme:19,getDebugVariables:20,execAction:21},null,[-1,-1,-1])}get setTheme(){return this.$$.ctx[19]}get getDebugVariables(){return this.$$.ctx[20]}get execAction(){return this.$$.ctx[21]}};class us{constructor(t){var e,n;n={},(e="sizeHistory")in this?Object.defineProperty(this,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):this[e]=n,this.widthVariableName=t.width_variable_name,this.heightVariableName=t.height_variable_name}setVariable(t,e){if(!this.context)return!1;if(t){const n=this.context.variables.get(t);if(n&&"integer"===n.getType()){if(e=Math.round(e),this.sizeHistory[t]||(this.sizeHistory[t]=new Set),!this.sizeHistory[t].has(e))return n.setValue(e),this.sizeHistory[t].add(e),!0}else{const e=new Error("Missing variable");e.level="error",e.additional={variableName:t},this.context.logError(e)}}return!1}recalcProps(){if(!this.node||!this.context)return!1;const t=this.node.getBoundingClientRect(),e=this.setVariable(this.widthVariableName,t.width),n=this.setVariable(this.heightVariableName,t.height);return e||n}mountView(t,e){var n;this.node=t,this.context=e,this.resizeObserver||"undefined"==typeof ResizeObserver||(this.resizeObserver=new ResizeObserver((async()=>{let t=0;for(;this.recalcProps();){if(++t>8){const t=new Error("Recursive layout in size_provider");t.level="warn",t.additional={widthVariableName:this.widthVariableName,heightVariableName:this.heightVariableName},e.logError(t);break}await ct()}this.sizeHistory={}}))),null===(n=this.resizeObserver)||void 0===n||n.observe(t),this.recalcProps()}unmountView(t,e){var n;null===(n=this.resizeObserver)||void 0===n||n.disconnect(),this.resizeObserver=void 0}}function ds(t){return t instanceof HTMLElement}function ps(t){return class{constructor(t){this.params=t}mountView(e,n){if(!this.params.lottie_url&&!this.params.lottie_json)return;const r=Array.from(e.children).filter(ds);r.forEach((t=>{t.style.display="none"})),this.wrapper=document.createElement("div"),this.wrapper.style.width="100%",this.wrapper.style.height="100%",e.appendChild(this.wrapper);const i=Number(this.params.repeat_count||-1),o=this.animItem=t({container:this.wrapper,path:this.params.lottie_url,animationData:this.params.lottie_json,renderer:"svg",loop:!0});if(this.animItem.addEventListener("data_failed",(()=>{var t;null===(t=this.animItem)||void 0===t||t.destroy(),r.forEach((t=>{t.style.display=""}));const e=new Error("Failed to load lottie animation");e.level="error",e.additional={url:this.params.lottie_url},n.logError(e)})),"reverse"===this.params.repeat_mode||-1!==i){let t=1,e=0;o.addEventListener("loopComplete",(()=>{++e,-1!==i&&e===i?(o.stop(),o.goToAndStop(o.totalFrames,!0)):("reverse"===this.params.repeat_mode&&(t*=-1,o.setDirection(t)),o.goToAndPlay(1===t?0:o.totalFrames,!0))}))}}unmountView(t,e){var n,r;null===(n=this.animItem)||void 0===n||n.destroy(),this.wrapper&&(null===(r=this.wrapper.parentNode)||void 0===r||r.removeChild(this.wrapper),this.wrapper=void 0)}}}function hs(t){return new cs({target:t.target,props:{id:t.id,json:t.json,globalVariablesController:t.globalVariablesController,mix:t.mix,customization:t.customization,builtinProtocols:t.builtinProtocols,extensions:t.extensions,onStat:t.onStat,onCustomAction:t.onCustomAction,onError:t.onError,onComponent:t.onComponent,platform:t.platform,theme:t.theme},hydrate:t.hydrate})}var fs=e.Hy,gs=e.M,ms=e.Os,vs=e._0,ys=e.sY;export{fs as SizeProvider,gs as createGlobalVariablesController,ms as createVariable,vs as lottieExtensionBuilder,ys 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={};function n(){}t.d(e,{Hy:()=>As,M:()=>ys,Os:()=>Xi,_0:()=>js,sY:()=>Ps});const r=t=>t;function i(t,e){for(const n in e)t[n]=e[n];return t}function o(t){return t()}function a(){return Object.create(null)}function s(t){t.forEach(o)}function l(t){return"function"==typeof t}let c;function u(t,e){return c||(c=document.createElement("a")),c.href=e,t===c.href}function d(t,e){return t!=t?e==e:t!==e}function p(t){return 0===Object.keys(t).length}function f(t,...e){if(null==t)return n;const r=t.subscribe(...e);return r.unsubscribe?()=>r.unsubscribe():r}function h(t,e,n){t.$$.on_destroy.push(f(e,n))}function g(t,e,n,r){if(t){const i=m(t,e,n,r);return t[0](i)}}function m(t,e,n,r){return t[1]&&r?i(n.ctx.slice(),t[1](r(e))):n.ctx}function v(t,e,n,r){if(t[2]&&r){const i=t[2](r(n));if(void 0===e.dirty)return i;if("object"==typeof i){const t=[],n=Math.max(e.dirty.length,i.length);for(let r=0;r<n;r+=1)t[r]=e.dirty[r]|i[r];return t}return e.dirty|i}return e.dirty}function y(t,e,n,r,i,o){if(i){const a=m(e,n,r,o);t.p(a,i)}}function $(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let t=0;t<n;t++)e[t]=-1;return e}return-1}function _(t,e,n){return t.set(n),e}function b(t){return t&&l(t.destroy)?t.destroy:n}const w="undefined"!=typeof window;let x=w?()=>window.performance.now():()=>Date.now(),k=w?t=>requestAnimationFrame(t):n;const E=new Set;function C(t){E.forEach((e=>{e.c(t)||(E.delete(e),e.f())})),0!==E.size&&k(C)}let A=!1;function V(t,e){t.appendChild(e)}function j(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function P(t){const e=z("style");return function(t,e){V(t.head||t,e),e.sheet}(j(t),e),e.sheet}function S(t,e,n){t.insertBefore(e,n||null)}function D(t){t.parentNode&&t.parentNode.removeChild(t)}function F(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function z(t){return document.createElement(t)}function N(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function M(t){return document.createTextNode(t)}function T(){return M(" ")}function I(){return M("")}function O(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function J(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function B(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const r in e)null==e[r]?t.removeAttribute(r):"style"===r?t.style.cssText=e[r]:"__value"===r?t.value=t[r]=e[r]:n[r]&&n[r].set?t[r]=e[r]:J(t,r,e[r])}function R(t,e){e=""+e,t.data!==e&&(t.data=e)}function U(t,e,n,r){null===n?t.style.removeProperty(e):t.style.setProperty(e,n,r?"important":"")}function L(t,e,n){for(let n=0;n<t.options.length;n+=1){const r=t.options[n];if(r.__value===e)return void(r.selected=!0)}n&&void 0===e||(t.selectedIndex=-1)}function W(t,e){return new t(e)}const H=new Map;let q,G=0;function K(t,e){const n=(t.style.animation||"").split(", "),r=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),i=n.length-r.length;i&&(t.style.animation=r.join(", "),G-=i,G||k((()=>{G||(H.forEach((t=>{const{ownerNode:e}=t.stylesheet;e&&D(e)})),H.clear())})))}function X(t){q=t}function Y(){if(!q)throw new Error("Function called outside component initialization");return q}function Z(t){Y().$$.on_mount.push(t)}function Q(t){Y().$$.on_destroy.push(t)}function tt(t,e){return Y().$$.context.set(t,e),e}function et(t){return Y().$$.context.get(t)}function nt(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t.call(this,e)))}const rt=[],it=[];let ot=[];const at=[],st=Promise.resolve();let lt=!1;function ct(){lt||(lt=!0,st.then(gt))}function ut(){return ct(),st}function dt(t){ot.push(t)}const pt=new Set;let ft,ht=0;function gt(){if(0!==ht)return;const t=q;do{try{for(;ht<rt.length;){const t=rt[ht];ht++,X(t),mt(t.$$)}}catch(t){throw rt.length=0,ht=0,t}for(X(null),rt.length=0,ht=0;it.length;)it.pop()();for(let t=0;t<ot.length;t+=1){const e=ot[t];pt.has(e)||(pt.add(e),e())}ot.length=0}while(rt.length);for(;at.length;)at.pop()();lt=!1,pt.clear(),X(t)}function mt(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(dt)}}function vt(t,e,n){t.dispatchEvent(function(t,e,{bubbles:n=!1,cancelable:r=!1}={}){const i=document.createEvent("CustomEvent");return i.initCustomEvent(t,n,r,e),i}(`${e?"intro":"outro"}${n}`))}const yt=new Set;let $t;function _t(){$t={r:0,c:[],p:$t}}function bt(){$t.r||s($t.c),$t=$t.p}function wt(t,e){t&&t.i&&(yt.delete(t),t.i(e))}function xt(t,e,n,r){if(t&&t.o){if(yt.has(t))return;yt.add(t),$t.c.push((()=>{yt.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}else r&&r()}const kt={duration:0};function Et(t,e,i){const o={direction:"in"};let a,s,c=e(t,i,o),u=!1,d=0;function p(){a&&K(t,a)}function f(){const{delay:e=0,duration:i=300,easing:o=r,tick:l=n,css:f}=c||kt;f&&(a=function(t,e,n,r,i,o,a,s=0){const l=16.666/r;let c="{\n";for(let t=0;t<=1;t+=l){const r=e+(n-e)*o(t);c+=100*t+`%{${a(r,1-r)}}\n`}const u=c+`100% {${a(n,1-n)}}\n}`,d=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(u)}_${s}`,p=j(t),{stylesheet:f,rules:h}=H.get(p)||function(t,e){const n={stylesheet:P(e),rules:{}};return H.set(t,n),n}(p,t);h[d]||(h[d]=!0,f.insertRule(`@keyframes ${d} ${u}`,f.cssRules.length));const g=t.style.animation||"";return t.style.animation=`${g?`${g}, `:""}${d} ${r}ms linear ${i}ms 1 both`,G+=1,d}(t,0,1,i,e,o,f,d++)),l(0,1);const h=x()+e,g=h+i;s&&s.abort(),u=!0,dt((()=>vt(t,!0,"start"))),s=function(t){let e;return 0===E.size&&k(C),{promise:new Promise((n=>{E.add(e={c:t,f:n})})),abort(){E.delete(e)}}}((e=>{if(u){if(e>=g)return l(1,0),vt(t,!0,"end"),p(),u=!1;if(e>=h){const t=o((e-h)/i);l(t,1-t)}}return u}))}let h=!1;return{start(){h||(h=!0,K(t),l(c)?(c=c(o),(ft||(ft=Promise.resolve(),ft.then((()=>{ft=null}))),ft).then(f)):f())},invalidate(){h=!1},end(){u&&(p(),u=!1)}}}const Ct="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function At(t,e){xt(t,1,1,(()=>{e.delete(t.key)}))}function Vt(t,e){const n={},r={},i={$$scope:1};let o=t.length;for(;o--;){const a=t[o],s=e[o];if(s){for(const t in a)t in s||(r[t]=1);for(const t in s)i[t]||(n[t]=s[t],i[t]=1);t[o]=s}else for(const t in a)i[t]=1}for(const t in r)t in n||(n[t]=void 0);return n}let jt;function Pt(t){t&&t.c()}function St(t,e,n,r){const{fragment:i,after_update:a}=t.$$;i&&i.m(e,n),r||dt((()=>{const e=t.$$.on_mount.map(o).filter(l);t.$$.on_destroy?t.$$.on_destroy.push(...e):s(e),t.$$.on_mount=[]})),a.forEach(dt)}function Dt(t,e){const n=t.$$;null!==n.fragment&&(function(t){const e=[],n=[];ot.forEach((r=>-1===t.indexOf(r)?e.push(r):n.push(r))),n.forEach((t=>t())),ot=e}(n.after_update),s(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Ft(t,e,r,i,o,l,c,u=[-1]){const d=q;X(t);const p=t.$$={fragment:null,ctx:[],props:l,update:n,not_equal:o,bound:a(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(d?d.$$.context:[])),callbacks:a(),dirty:u,skip_bound:!1,root:e.target||d.$$.root};c&&c(p.root);let f=!1;if(p.ctx=r?r(t,e.props||{},((e,n,...r)=>{const i=r.length?r[0]:n;return p.ctx&&o(p.ctx[e],p.ctx[e]=i)&&(!p.skip_bound&&p.bound[e]&&p.bound[e](i),f&&function(t,e){-1===t.$$.dirty[0]&&(rt.push(t),ct(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),n})):[],p.update(),f=!0,s(p.before_update),p.fragment=!!i&&i(p.ctx),e.target){if(e.hydrate){A=!0;const t=(h=e.target,Array.from(h.childNodes));p.fragment&&p.fragment.l(t),t.forEach(D)}else p.fragment&&p.fragment.c();e.intro&&wt(t.$$.fragment),St(t,e.target,e.anchor,e.customElement),A=!1,gt()}var h;X(d)}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"]),"function"==typeof HTMLElement&&(jt=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(o).filter(l);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){s(this.$$.on_disconnect)}$destroy(){Dt(this,1),this.$destroy=n}$on(t,e){if(!l(e))return n;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(e),()=>{const t=r.indexOf(e);-1!==t&&r.splice(t,1)}}$set(t){this.$$set&&!p(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});class zt{$destroy(){Dt(this,1),this.$destroy=n}$on(t,e){if(!l(e))return n;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(e),()=>{const t=r.indexOf(e);-1!==t&&r.splice(t,1)}}$set(t){this.$$set&&!p(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Nt=[];function Mt(t,e=n){let r;const i=new Set;function o(e){if(o=e,((n=t)!=n?o==o:n!==o||n&&"object"==typeof n||"function"==typeof n)&&(t=e,r)){const e=!Nt.length;for(const e of i)e[1](),Nt.push(e,t);if(e){for(let t=0;t<Nt.length;t+=2)Nt[t][0](Nt[t+1]);Nt.length=0}}var n,o}return{set:o,update:function(e){o(e(t))},subscribe:function(a,s=n){const l=[a,s];return i.add(l),1===i.size&&(r=e(o)||n),a(t),()=>{i.delete(l),0===i.size&&r&&(r(),r=null)}}}}function Tt(t,e,r){const i=!Array.isArray(t),o=i?[t]:t,a=e.length<2;return{subscribe:Mt(r,(t=>{let r=!1;const c=[];let u=0,d=n;const p=()=>{if(u)return;d();const r=e(i?c[0]:c,t);a?t(r):d=l(r)?r:n},h=o.map(((t,e)=>f(t,(t=>{c[e]=t,u&=~(1<<e),r&&p()}),(()=>{u|=1<<e}))));return r=!0,p(),function(){s(h),d(),r=!1}})).subscribe}}const It={root:"divkit-b023c",root__clickable:"divkit-bd259","root__clickable-no-transition":"divkit-d9099",root__unselectable:"divkit-c016b",root_platform_desktop:"divkit-ee112","root__only-desktop":"divkit-fef1e","root_restrict-scroll":"divkit-aa145","root_disabled-context-menu":"divkit-f0cba"},Ot=Symbol("root");function Jt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=t;return n.level=e.level||"error",e.additional&&(n.additional=e.additional),n}const Bt={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_truncate_none:"divkit-c6ea1",text_multiline:"divkit-ee8e3",text__inner_gradient:"divkit-cb8e0",text__image:"divkit-bf6e2",text__image_hidden:"divkit-f1002"},Rt={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"};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 Lt(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 Wt(t){let e=Lt(t);return"0"===e&&(e+="em"),e}function Ht(t,e){for(;t.length<e;)t="0"+t;return t}function qt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"transparent";if("#"!==(t=(t||"").toLowerCase()).charAt(0))return n;const r=Gt(t);return r?(r.a*=e,function(t){return 255===t.a?"#".concat([t.r,t.g,t.b].map((t=>Ht(Math.round(t).toString(16),2))).join("")):"rgba(".concat(t.r,",").concat(t.g,",").concat(t.b,",").concat((t.a/255).toFixed(2),")")}(r)):n}function Gt(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,i,o]=e,a=2===r.length?r:r+r,s=2===i.length?i:i+i,l=2===o.length?o:o+o,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,i]=e,o=2===n.length?n:n+n,a=2===r.length?r:r+r,s=2===i.length?i:i+i;return{a:255,r:parseInt(o,16),g:parseInt(a,16),b:parseInt(s,16)}}return null}function Kt(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 Xt=Boolean;function Yt(t){if(1===t.length&&"solid"===t[0].type)return{color:qt(t[0].color||"transparent"),size:"auto",position:"50% 50%"};const e=t.map((t=>"solid"===t.type?function(t){const e=qt(t.bg.color||"transparent");return{size:void 0,pos:void 0,image:"linear-gradient(to bottom,".concat(e,",").concat(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(Xt);return n.length?{size:void 0,pos:void 0,image:"linear-gradient("+(90-Number(t.bg.angle||0))+"deg,"+n.map((t=>qt(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:te(t.bg.scale),pos:ee(t.bg),image:'url("'+Kt(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(Xt);if(!n.length)return;const r=t.bg.radius;let i;r&&"object"==typeof r&&"type"in r&&void 0!==r.value&&("fixed"===r.type?i=Wt(r.value):"relative"===r.type&&(i=Zt[r.value]));const o=Qt(t.bg.center_x),a=Qt(t.bg.center_y);return{size:void 0,pos:void 0,image:"radial-gradient("+"circle ".concat(i||"farthest-corner"," at ").concat(o," ").concat(a)+","+n.map((t=>qt(t))).join(",")+")"}}({bg:t}):void 0)).filter(Xt).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 Zt={nearest_corner:"closest-corner",farthest_corner:"farthest-corner",nearest_side:"closest-side",farthest_side:"farthest-side"};function Qt(t){if(t&&"object"==typeof t&&"type"in t&&void 0!==t.value){if("fixed"===t.type)return Wt(t.value);if("relative"===t.type)return"".concat(100*Number(t.value),"%")}return"50%"}function te(t){return"fit"===t?"contain":"stretch"===t?"fill":"no_scale"===t?"none":"cover"}function ee(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 ne(t){const e=/^([^/]+):\/\//.exec(t);return e&&e[1]||""}function re(t,e){return e.has(t)}function ie(t,e){e&&t.push(e)}function oe(t,e,n){const r=[];ie(r,e[t]);for(const i in n)if(n.hasOwnProperty(i)){const o=n[i];o&&ie(r,e["".concat(t,"_").concat(i)+("string"==typeof o?"_".concat(o):"")])}return r.join(" ")}const ae=Symbol("state");function se(t){return Lt(t.top||0)+" "+Lt(t.right||0)+" "+Lt(t.bottom||0)+" "+Lt(t.left||0)}function le(t){if("number"!=typeof t&&"string"!=typeof t)return!1;const e=Number(t);return!isNaN(e)}function ce(t){return le(t)&&t>=0}function ue(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]&&!ce(n[t]))return e;return se(t)}function de(t,e){const n=Number(t);return isNaN(n)||n<0?e:n}const pe=Object.prototype.hasOwnProperty;function fe(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 i=n[r];if(!pe.call(e,i)||!fe(t[i],e[i]))return!1}return!0}function he(t,e){return fe(t,e)?e:t}function ge(t,e){return"linear"===t||"ease"===t||"ease_in_out"===t||"ease_in"===t||"ease_out"===t?t:e}function me(t,e){const n=Number(t);return isNaN(n)?e:n}function ve(t){const e=[];return"set"===t.name?(t.items||[]).forEach((t=>{e.push(...ve(t))})):e.push(t),e}function ye(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]]&&!ce(t[n[r]]))return e;return t}function $e(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]].map((t=>Lt((t||e)/n*10))).join(" ")}function _e(){}const be=Symbol("action");function we(t){const e=t.touches[0];return{x:e.clientX||e.pageX,y:e.clientY||e.pageY}}function xe(t){var e;let n,r,o,a,c,u,d,p;const f=t[19].default,h=g(f,t,t[18],null);let m=[{class:r=t[2]+(t[9]?" ".concat(t[6]?It.root__clickable:It["root__clickable-no-transition"]," ").concat(It.root__unselectable):"")+" "+(null!==(e=t[1])&&void 0!==e&&e.length?It["root_disabled-context-menu"]:"")},{style:t[3]},{role:o=t[9]?"button":null},{tabindex:a=t[9]?0:null},t[4]],_={};for(let t=0;t<m.length;t+=1)_=i(_,m[t]);return{c(){n=z("span"),h&&h.c(),B(n,_)},m(e,r){S(e,n,r),h&&h.m(n,null),u=!0,d||(p=[b(c=t[5].call(null,n)),O(n,"click",(function(){l(t[9]?t[10]:null)&&(t[9]?t[10]:null).apply(this,arguments)})),O(n,"click",t[21]),O(n,"dblclick",(function(){var e,n;l(null!==(e=t[0])&&void 0!==e&&e.length?t[11]:null)&&(null!==(n=t[0])&&void 0!==n&&n.length?t[11]:null).apply(this,arguments)})),O(n,"touchstart",(function(){var e,n;l(null!==(e=t[1])&&void 0!==e&&e.length?t[12]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[12]:null).apply(this,arguments)})),O(n,"touchmove",(function(){var e,n;l(null!==(e=t[1])&&void 0!==e&&e.length?t[13]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[13]:null).apply(this,arguments)})),O(n,"touchend",(function(){var e,n;l(null!==(e=t[1])&&void 0!==e&&e.length?t[14]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[14]:null).apply(this,arguments)})),O(n,"touchcancel",(function(){var e,n;l(null!==(e=t[1])&&void 0!==e&&e.length?t[14]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[14]:null).apply(this,arguments)})),O(n,"keydown",t[15])],d=!0)},p(e,i){var s;t=e,h&&h.p&&(!u||262144&i)&&y(h,f,t,t[18],u?v(f,t[18],i,null):$(t[18]),null),B(n,_=Vt(m,[(!u||582&i&&r!==(r=t[2]+(t[9]?" ".concat(t[6]?It.root__clickable:It["root__clickable-no-transition"]," ").concat(It.root__unselectable):"")+" "+(null!==(s=t[1])&&void 0!==s&&s.length?It["root_disabled-context-menu"]:"")))&&{class:r},(!u||8&i)&&{style:t[3]},(!u||512&i&&o!==(o=t[9]?"button":null))&&{role:o},(!u||512&i&&a!==(a=t[9]?0:null))&&{tabindex:a},16&i&&t[4]]))},i(t){u||(wt(h,t),u=!0)},o(t){xt(h,t),u=!1},d(t){t&&D(n),h&&h.d(t),d=!1,s(p)}}}function ke(t){var e;let n,r,o,a,c,u;const d=t[19].default,p=g(d,t,t[18],null);let f=[{href:t[7]},{target:t[8]},{style:t[3]},{class:r=t[2]+" "+(t[6]?It.root__clickable:It["root__clickable-no-transition"])+" "+(null!==(e=t[1])&&void 0!==e&&e.length?It["root_disabled-context-menu"]:"")},t[4]],h={};for(let t=0;t<f.length;t+=1)h=i(h,f[t]);return{c(){n=z("a"),p&&p.c(),B(n,h)},m(e,r){S(e,n,r),p&&p.m(n,null),a=!0,c||(u=[b(o=t[5].call(null,n)),O(n,"click",t[10]),O(n,"click",t[20]),O(n,"dblclick",(function(){var e,n;l(null!==(e=t[0])&&void 0!==e&&e.length?t[11]:null)&&(null!==(n=t[0])&&void 0!==n&&n.length?t[11]:null).apply(this,arguments)})),O(n,"touchstart",(function(){var e,n;l(null!==(e=t[1])&&void 0!==e&&e.length?t[12]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[12]:null).apply(this,arguments)})),O(n,"touchmove",(function(){var e,n;l(null!==(e=t[1])&&void 0!==e&&e.length?t[13]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[13]:null).apply(this,arguments)})),O(n,"touchend",(function(){var e,n;l(null!==(e=t[1])&&void 0!==e&&e.length?t[14]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[14]:null).apply(this,arguments)})),O(n,"touchcancel",(function(){var e,n;l(null!==(e=t[1])&&void 0!==e&&e.length?t[14]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[14]:null).apply(this,arguments)})),O(n,"keydown",t[15])],c=!0)},p(e,i){var o;t=e,p&&p.p&&(!a||262144&i)&&y(p,d,t,t[18],a?v(d,t[18],i,null):$(t[18]),null),B(n,h=Vt(f,[(!a||128&i)&&{href:t[7]},(!a||256&i)&&{target:t[8]},(!a||8&i)&&{style:t[3]},(!a||70&i&&r!==(r=t[2]+" "+(t[6]?It.root__clickable:It["root__clickable-no-transition"])+" "+(null!==(o=t[1])&&void 0!==o&&o.length?It["root_disabled-context-menu"]:"")))&&{class:r},16&i&&t[4]]))},i(t){a||(wt(p,t),a=!0)},o(t){xt(p,t),a=!1},d(t){t&&D(n),p&&p.d(t),c=!1,s(u)}}}function Ee(t){let e,n,r,i;const o=[ke,xe],a=[];function s(t,e){return t[7]?0:1}return e=s(t),n=a[e]=o[e](t),{c(){n.c(),r=I()},m(t,n){a[e].m(t,n),S(t,r,n),i=!0},p(t,i){let[l]=i,c=e;e=s(t),e===c?a[e].p(t,l):(_t(),xt(a[c],1,1,(()=>{a[c]=null})),bt(),n=a[e],n?n.p(t,l):(n=a[e]=o[e](t),n.c()),wt(n,1),n.m(r.parentNode,r))},i(t){i||(wt(n),i=!0)},o(t){xt(n),i=!1},d(t){a[e].d(t),t&&D(r)}}}function Ce(t,e,n){let{$$slots:r={},$$scope:i}=e,{actions:o}=e,{doubleTapActions:a}=e,{longTapActions:s}=e,{cls:l=""}=e,{style:c=null}=e,{attrs:u}=e,{use:d=_e}=e,{customAction:p=null}=e,{isNativeActionAnimation:f=!0}=e;const h=et(Ot),g=et(be);tt(be,{hasAction:()=>Boolean(g.hasAction()||(null==o?void 0:o.length))});let m,v="",y=-1,$=null,_=!1,b=!1;return t.$$set=t=>{"actions"in t&&n(16,o=t.actions),"doubleTapActions"in t&&n(0,a=t.doubleTapActions),"longTapActions"in t&&n(1,s=t.longTapActions),"cls"in t&&n(2,l=t.cls),"style"in t&&n(3,c=t.style),"attrs"in t&&n(4,u=t.attrs),"use"in t&&n(5,d=t.use),"customAction"in t&&n(17,p=t.customAction),"isNativeActionAnimation"in t&&n(6,f=t.isNativeActionAnimation),"$$scope"in t&&n(18,i=t.$$scope)},t.$$.update=()=>{if(196736&t.$$.dirty){if(Array.isArray(o)&&(null==o?void 0:o.length))for(let t=0;t<o.length;++t){const e=o[t].url;if(e){n(7,v=e),n(8,m=o[t].target||void 0);break}}Array.isArray(o)&&(null==o?void 0:o.length)&&g.hasAction()&&(n(7,v=""),h.logError(Jt(new Error("Actionable element is forbidden inside other actionable element"),{level:"warn",additional:{actions:o}}))),n(9,b=Boolean(p)),v&&!re(ne(v),h.getBuiltinProtocols())&&(n(7,v=""),n(9,b=!0))}},[a,s,l,c,u,d,f,v,m,b,async function(t){g.hasAction()||void 0!==t.button&&0!==t.button||(!1===(null==p?void 0:p(t))?t.preventDefault():o&&(o.some((t=>{const e=null==t?void 0:t.url;if(!e)return!1;const n=ne(e);return n&&!re(n,h.getBuiltinProtocols())}))&&t.preventDefault(),h.execAnyActions(o)))},function(t){g.hasAction()||void 0!==t.button&&0!==t.button||h.execAnyActions(a,!0)},function(t){t.touches.length>1||($=we(t),_=!1,y=Date.now())},function(t){if(!$)return;const e=we(t);(Math.abs($.x-e.x)>8||Math.abs($.y-e.y)>8)&&(_=!0)},function(){!$||y<0||(!_&&Date.now()-y>=400&&h.execAnyActions(s,!0),$=null,y=-1)},function(t){t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||"Enter"===t.key&&Array.isArray(o)&&o.length&&(h.execAnyActions(o),t.preventDefault())},o,p,i,r,function(e){nt.call(this,t,e)},function(e){nt.call(this,t,e)}]}const Ae=class extends zt{constructor(t){super(),Ft(this,t,Ce,Ee,d,{actions:16,doubleTapActions:0,longTapActions:1,cls:2,style:3,attrs:4,use:5,customAction:17,isNativeActionAnimation:6})}},Ve={"outer-background":"divkit-bf253","outer-background_clip":"divkit-dcad7","outer-background__item":"divkit-b921d","outer-background__item_hidden":"divkit-cd613"};function je(t){return le(t)&&t>0}function Pe(t,e){return t.map((t=>{if("blur"===(null==t?void 0:t.type)){if(je(t.radius))return"blur(".concat(Wt(t.radius/2),")")}else e(Jt(new Error("Unknown filter"),{level:"warn",additional:{filter:null==t?void 0:t.type}}))})).filter(Boolean).join(" ")}function Se(t,e,n){const r=t.slice();return r[5]=e[n],r}function De(t){let e,n,r;return{c(){e=z("span"),J(e,"class",n=Ve["outer-background__item"]),J(e,"style",r=Ut(t[5].style))},m(t,n){S(t,e,n)},p(t,n){2&n&&r!==(r=Ut(t[5].style))&&J(e,"style",r)},d(t){t&&D(e)}}}function Fe(t){let e,n,r,i,o,a;return{c(){e=z("img"),u(e.src,n=t[5].image_url)||J(e,"src",n),J(e,"alt",""),J(e,"aria-hidden","true"),J(e,"loading","lazy"),J(e,"decoding","async"),J(e,"class",r=Ve["outer-background__item"]),J(e,"style",i=Ut(t[5].style))},m(n,r){S(n,e,r),o||(a=O(e,"error",t[2]),o=!0)},p(t,r){2&r&&!u(e.src,n=t[5].image_url)&&J(e,"src",n),2&r&&i!==(i=Ut(t[5].style))&&J(e,"style",i)},d(t){t&&D(e),o=!1,a()}}}function ze(t){let e;function n(t,e){return t[5].image_url?Fe:De}let r=n(t),i=r(t);return{c(){i.c(),e=I()},m(t,n){i.m(t,n),S(t,e,n)},p(t,o){r===(r=n(t))&&i?i.p(t,o):(i.d(1),i=r(t),i&&(i.c(),i.m(e.parentNode,e)))},d(t){i.d(t),t&&D(e)}}}function Ne(t){let e,r,i=t[1],o=[];for(let e=0;e<i.length;e+=1)o[e]=ze(Se(t,i,e));return{c(){e=z("span");for(let t=0;t<o.length;t+=1)o[t].c();J(e,"class",r=Ve["outer-background"]+(t[0]?" "+Ve["outer-background_clip"]:"")),U(e,"border-radius",t[0])},m(t,n){S(t,e,n);for(let t=0;t<o.length;t+=1)o[t]&&o[t].m(e,null)},p(t,n){let[a]=n;if(6&a){let n;for(i=t[1],n=0;n<i.length;n+=1){const r=Se(t,i,n);o[n]?o[n].p(r,a):(o[n]=ze(r),o[n].c(),o[n].m(e,null))}for(;n<o.length;n+=1)o[n].d(1);o.length=i.length}1&a&&r!==(r=Ve["outer-background"]+(t[0]?" "+Ve["outer-background_clip"]:""))&&J(e,"class",r),1&a&&U(e,"border-radius",t[0])},i:n,o:n,d(t){t&&D(e),F(o,t)}}}function Me(t,e,n){let r,{background:i=[]}=e,{radius:o=""}=e;const a=et(Ot);return t.$$set=t=>{"background"in t&&n(3,i=t.background),"radius"in t&&n(0,o=t.radius)},t.$$.update=()=>{8&t.$$.dirty&&n(1,r=i.map((t=>{const e={},n={style:e};if("nine_patch_image"===t.type&&t.insets)e["border-image"]='url("'.concat(t.image_url,'") ').concat(t.insets.top||0," ").concat(t.insets.right||0," ").concat(t.insets.bottom||0," ").concat(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=Pe(t.filters,a.logError)))}return n})))},[o,r,function(t){t.target&&"classList"in t.target&&t.target.classList.add(Ve["outer-background__item_hidden"])},i]}const Te=class extends zt{constructor(t){super(),Ft(this,t,Me,Ne,d,{background:3,radius:0})}};function Ie(t){let e,n;return e=new Ae({props:{use:t[32],cls:t[0]+" "+oe("outer",Rt,t[15]),style:Ut(t[13]),actions:t[10],doubleTapActions:t[11],longTapActions:t[12],attrs:t[6],isNativeActionAnimation:!t[4].length||Ue(t[4]),$$slots:{default:[Be]},$$scope:{ctx:t}}}),{c(){Pt(e.$$.fragment)},m(t,r){St(e,t,r),n=!0},p(t,n){const r={};32769&n[0]&&(r.cls=t[0]+" "+oe("outer",Rt,t[15])),8192&n[0]&&(r.style=Ut(t[13])),1024&n[0]&&(r.actions=t[10]),2048&n[0]&&(r.doubleTapActions=t[11]),4096&n[0]&&(r.longTapActions=t[12]),64&n[0]&&(r.attrs=t[6]),16&n[0]&&(r.isNativeActionAnimation=!t[4].length||Ue(t[4])),174&n[0]|262144&n[3]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function Oe(t){let e,n;return e=new Te({props:{background:t[5],radius:t[2]}}),{c(){Pt(e.$$.fragment)},m(t,r){St(e,t,r),n=!0},p(t,n){const r={};32&n[0]&&(r.background=t[5]),4&n[0]&&(r.radius=t[2]),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function Je(t){let e,n,r;return{c(){e=z("span"),J(e,"class",n=Rt.outer__border),J(e,"style",r=Ut(t[1]))},m(t,n){S(t,e,n)},p(t,n){2&n[0]&&r!==(r=Ut(t[1]))&&J(e,"style",r)},d(t){t&&D(e)}}}function Be(t){let e,n,r,i=t[3]&&Oe(t);const o=t[110].default,a=g(o,t,t[111],null);let s=t[7]&&Je(t);return{c(){i&&i.c(),e=I(),a&&a.c(),s&&s.c(),n=I()},m(t,o){i&&i.m(t,o),S(t,e,o),a&&a.m(t,o),s&&s.m(t,o),S(t,n,o),r=!0},p(t,l){t[3]?i?(i.p(t,l),8&l[0]&&wt(i,1)):(i=Oe(t),i.c(),wt(i,1),i.m(e.parentNode,e)):i&&(_t(),xt(i,1,1,(()=>{i=null})),bt()),a&&a.p&&(!r||262144&l[3])&&y(a,o,t,t[111],r?v(o,t[111],l,null):$(t[111]),null),t[7]?s?s.p(t,l):(s=Je(t),s.c(),s.m(n.parentNode,n)):s&&(s.d(1),s=null)},i(t){r||(wt(i),wt(a,t),r=!0)},o(t){xt(i),xt(a,t),r=!1},d(t){i&&i.d(t),t&&D(e),a&&a.d(t),s&&s.d(t),t&&D(n)}}}function Re(t){let e,n,r=!t[8]&&!t[9]&&Ie(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),S(t,e,i),n=!0},p(t,n){t[8]||t[9]?r&&(_t(),xt(r,1,1,(()=>{r=null})),bt()):r?(r.p(t,n),768&n[0]&&wt(r,1)):(r=Ie(t),r.c(),wt(r,1),r.m(e.parentNode,e))},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function Ue(t){return t.some((t=>"native"===t.name))}function Le(t,e,r){let i,o,a,s,l,c,u,d,p,h,g,m,v,y,$,_,b,w,x,k,E,C,A,V,j,P,S,D,F,z,N,M,T,I,O,J,B,R,U,L,W,H=n,q=n,G=n,K=n,X=n,Y=n,Z=n,Q=n,tt=n,nt=n,rt=n,it=n,ot=n,at=n,st=n,lt=n,ct=n;t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>X())),t.$$.on_destroy.push((()=>Y())),t.$$.on_destroy.push((()=>Z())),t.$$.on_destroy.push((()=>Q())),t.$$.on_destroy.push((()=>tt())),t.$$.on_destroy.push((()=>nt())),t.$$.on_destroy.push((()=>rt())),t.$$.on_destroy.push((()=>it())),t.$$.on_destroy.push((()=>ot())),t.$$.on_destroy.push((()=>at())),t.$$.on_destroy.push((()=>st())),t.$$.on_destroy.push((()=>lt())),t.$$.on_destroy.push((()=>ct()));let{$$slots:dt={},$$scope:pt}=e;var ft,ht,gt,mt,vt,yt;let{json:$t={}}=e,{origJson:_t}=e,{templateContext:bt}=e,{cls:wt=""}=e,{style:xt}=e,{layoutParams:kt={}}=e,{customDescription:Et=!1}=e,{customPaddings:Ct=!1}=e,{customActions:At=""}=e,{additionalPaddings:Vt=null}=e,{heightByAspect:jt=!1}=e;const Pt={left:"start",center:"center",right:"end"},St={top:"start",center:"center",bottom:"end",baseline:"baseline"},Dt=et(Ot),Ft=et(ae);let zt,Nt,Mt,Tt,It,Bt,Rt,Ut,Ht,Gt,Kt,Zt=null,Qt={},te={},ee=!1,ie=1,oe="transparent",le=0,pe={"top-left":0,"top-right":0,"bottom-right":0,"bottom-left":0},fe="",_e=null,be="",we={},xe=0,ke=0,Ee=0,Ce=!1,Ae=!1,Ve={},je=0,Pe=0,Se=0,De=!1,Fe=!1,ze=1;const Ne=kt.fakeElement?[]:$t.transition_triggers||["state_change","visibility_change"],Me=-1!==Ne.indexOf("state_change")&&$t.id,Te=-1!==Ne.indexOf("visibility_change")&&$t.id;let Ie,Oe,Je,Be,Re,Ue,Le,We=[],He=[],qe=[],Ge=[],Ke="";function Xe(t){const e=me(t.start_value,1),n=me(t.end_value,1),i=de(t.start_delay,0),o=de(t.duration,300),a=ge(t.interpolator,"ease_in_out").replace(/_/g,"-");switch(t.name){case"fade":return r(79,Be=e),r(80,Re=n),"opacity ".concat(o,"ms ").concat(a," ").concat(i,"ms");case"scale":return r(81,Ue=e),r(82,Le=n),"transform ".concat(o,"ms ").concat(a," ").concat(i,"ms");case"native":case"no_animation":return"";default:return Dt.logError(Jt(new Error("Unknown action_animation name"),{additional:{animation:t.name}})),""}}let Ye,Ze,Qe=!1,tn="visible",en=0,nn=0;return t.$$set=t=>{"json"in t&&r(33,$t=t.json),"origJson"in t&&r(34,_t=t.origJson),"templateContext"in t&&r(35,bt=t.templateContext),"cls"in t&&r(0,wt=t.cls),"style"in t&&r(36,xt=t.style),"layoutParams"in t&&r(37,kt=t.layoutParams),"customDescription"in t&&r(38,Et=t.customDescription),"customPaddings"in t&&r(39,Ct=t.customPaddings),"customActions"in t&&r(40,At=t.customActions),"additionalPaddings"in t&&r(41,Vt=t.additionalPaddings),"heightByAspect"in t&&r(42,jt=t.heightByAspect),"$$scope"in t&&r(111,pt=t.$$scope)},t.$$.update=()=>{if(4&t.$$.dirty[1]&&(r(31,i=Dt.getDerivedFromVars($t.border)),ct(),ct=f(i,(t=>r(109,W=t)))),2&t.$$.dirty[0]|8384512&t.$$.dirty[1]|65536&t.$$.dirty[3]){let t={},e={},n=!1,i="";if(W){if(W.has_shadow){const e=W.shadow;t["box-shadow"]=e?Lt((null===r(44,ht=null===r(43,ft=e.offset)||void 0===ft?void 0:ft.x)||void 0===ht?void 0:ht.value)||0)+" "+Lt((null===r(46,mt=null===r(45,gt=e.offset)||void 0===gt?void 0:gt.y)||void 0===mt?void 0:mt.value)||0)+" "+Lt(null!==r(47,vt=e.blur)&&void 0!==vt?vt:2)+" "+qt(e.color||"#000000",null!==r(48,yt=e.alpha)&&void 0!==yt?yt:.19):"0 1px 2px 0 rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.07)"}if(W.stroke&&(n=!0,r(50,ie=de(W.stroke.width,ie)),r(51,oe=qt(W.stroke.color,1,oe)),e.border="".concat(Lt(ie)," solid ").concat(oe)),W.corners_radius?(r(53,pe=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]&&!ce(n[t]))return e;return t}(W.corners_radius,pe)),e["border-radius"]=t["border-radius"]=$e(pe)):W.corner_radius&&(r(52,le=de(W.corner_radius,le)),r(53,pe={"top-left":le,"top-right":le,"bottom-right":le,"bottom-left":le}),e["border-radius"]=t["border-radius"]=Lt(le)),n&&ie&&(W.corners_radius||W.corner_radius)){let t=Object.assign({},pe);["top-left","top-right","bottom-right","bottom-left"].forEach((e=>{t[e]=(t[e]||0)+ie/2})),i=$e(t)}}r(49,Qt=he(t,Qt)),r(1,te=he(e,te)),r(7,ee=n),r(2,fe=i)}if(4&t.$$.dirty[1]&&(r(30,o=Dt.getDerivedFromVars($t.paddings)),lt(),lt=f(o,(t=>r(108,L=t)))),8388864&t.$$.dirty[1]|32768&t.$$.dirty[3]&&r(54,_e=ye(L&&!Ct?L:void 0,_e)),8389632&t.$$.dirty[1]&&r(90,a=se(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 i=t[r];i&&(n[r]=i);const o=e[r];o&&(n[r]=(n[r]||0)+o)})),n}(_e,Vt))),4&t.$$.dirty[1]&&(r(29,s=Dt.getDerivedFromVars($t.margins)),at(),at=f(s,(t=>r(106,R=t)))),16777216&t.$$.dirty[1]|8192&t.$$.dirty[3]&&r(55,be=ue(R,be)),4&t.$$.dirty[1]&&(r(28,l=Dt.getDerivedFromVars($t.width)),it(),it=f(l,(t=>r(104,J=t)))),4&t.$$.dirty[1]&&(r(27,c=Dt.getDerivedFromVars($t.alignment_horizontal)),st(),st=f(c,(t=>r(107,U=t)))),570425408&t.$$.dirty[1]|26624&t.$$.dirty[3]){let t,e,n,i,o={},a=0,s=0,l=!1,c=!1;const u=null==J?void 0:J.type;if("fixed"===u)r(60,xe=de(null==J?void 0:J.value,xe)),e=Lt(xe);else if("wrap_content"!==u&&(kt.overlapParent||"match_parent"!==u&&u||!kt.parentHorizontalWrapContent))t="parent","vertical"===kt.parentContainerOrientation&&kt.parentContainerWrap&&(c=!0,Dt.logError(Jt(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"vertical"===kt.parentLayoutOrientation?e="calc(100% - ".concat(Wt(((null==R?void 0:R.left)||0)+((null==R?void 0:R.right)||0)),")"):"horizontal"===kt.parentContainerOrientation&&(a=J&&"weight"in J&&J.weight||1,kt.parentContainerWrap&&(l=!0));else{if(t="content",("wrap_content"===u&&(null==J?void 0:J.constrained)||("match_parent"===u||!u)&&kt.parentHorizontalWrapContent)&&(o["width-constrained"]=!0,"horizontal"===kt.parentContainerOrientation&&(s=1)),"wrap_content"===u){const t=J;t.min_size&&ce(t.min_size.value)&&(n=Lt(t.min_size.value)),t.max_size&&ce(t.max_size.value)&&(i=Lt(t.max_size.value))}"match_parent"!==u&&u||Dt.logError(Jt(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))}if("parent"===t)o["halign-self"]="stretch";else{const t=U;o["halign-self"]="left"===t||"center"===t||"right"===t?Pt[t]:kt.parentHAlign||"start"}t&&(o.width=t),r(57,Mt=e),r(58,Tt=n),r(59,It=i),r(61,ke=a),r(62,Ee=s),r(56,we=he(o,we)),r(63,Ce=l),r(8,Ae=c)}if(4&t.$$.dirty[1]&&(r(26,u=Dt.getDerivedFromVars($t.height)),rt(),rt=f(u,(t=>r(103,O=t)))),4&t.$$.dirty[1]&&(r(25,d=Dt.getDerivedFromVars($t.alignment_vertical)),ot(),ot=f(d,(t=>r(105,B=t)))),2112&t.$$.dirty[1]|68&t.$$.dirty[2]|13312&t.$$.dirty[3]){let t,e,n,i,o={},a=0,s=0,l=!1,c=!1;const u=null==O?void 0:O.type;if(jt);else if("fixed"===u)r(68,je=de(null==O?void 0:O.value,je)),e=Lt(je);else if("match_parent"!==u||!kt.overlapParent&&kt.parentVerticalWrapContent){if(t="content",("wrap_content"===u&&(null==O?void 0:O.constrained)||"match_parent"===u&&kt.parentVerticalWrapContent)&&(o["height-constrained"]=!0,"vertical"===kt.parentContainerOrientation&&(s=1)),"wrap_content"===u){const t=O;(null==t?void 0:t.min_size)&&ce(t.min_size.value)&&(n=Lt(t.min_size.value)),(null==t?void 0:t.max_size)&&ce(t.max_size.value)&&(i=Lt(t.max_size.value))}"match_parent"===u&&Dt.logError(Jt(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))}else t="parent","horizontal"===kt.parentContainerOrientation&&kt.parentContainerWrap&&(c=!0,Dt.logError(Jt(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"horizontal"===kt.parentLayoutOrientation?e="calc(100% - ".concat(Wt(((null==R?void 0:R.top)||0)+((null==R?void 0:R.bottom)||0)),")"):"vertical"===kt.parentContainerOrientation&&(a=(null==O?void 0:O.weight)||1,kt.parentContainerWrap&&(l=!0));if("parent"===t)o["valign-self"]="stretch";else{const t=B;"top"===t||"center"===t||"bottom"===t||"baseline"===t&&"horizontal"===kt.parentContainerOrientation?o["valign-self"]=St[t]:o["valign-self"]=kt.parentVAlign||"start"}t&&(o.height=t),r(65,Bt=e),r(66,Rt=n),r(67,Ut=i),r(69,Pe=a),r(70,Se=s),r(64,Ve=he(o,Ve)),r(71,De=l),r(9,Fe=c)}var e,n;if(64&t.$$.dirty[1]&&r(93,p=!!kt.overlapParent||void 0),64&t.$$.dirty[1]|3072&t.$$.dirty[3]&&r(92,h=kt.overlapParent&&(!J||"match_parent"===J.type)&&"match_parent"===(null==O?void 0:O.type)),64&t.$$.dirty[1]&&r(91,g=kt.gridArea?"".concat(kt.gridArea.y+1,"/").concat(kt.gridArea.x+1,"/span ").concat(kt.gridArea.rowSpan,"/span ").concat(kt.gridArea.colSpan):void 0),4&t.$$.dirty[1]&&(r(24,m=Dt.getDerivedFromVars($t.alpha)),nt(),nt=f(m,(t=>r(102,I=t)))),1024&t.$$.dirty[2]|512&t.$$.dirty[3]&&(r(72,(n=ze,ze=!ce(e=I)||void 0===e||e>1?n:Number(e))),r(73,Ht=1===ze?void 0:ze)),4&t.$$.dirty[1]&&(r(23,v=Dt.getDerivedFromVars($t.accessibility)),tt(),tt=f(v,(t=>r(101,T=t)))),128&t.$$.dirty[1]|256&t.$$.dirty[3]&&(r(6,Nt=void 0),T&&!Et&&T.description&&(r(6,Nt={}),r(6,Nt["aria-label"]=T.description,Nt))),4&t.$$.dirty[1]&&(r(22,y=Dt.getDerivedFromVars($t.background)),Q(),Q=f(y,(t=>r(5,M=t)))),44&t.$$.dirty[0]&&(r(74,Gt={}),r(3,Kt=!1),M&&(r(3,Kt=M.some((t=>"image"===t.type||"nine_patch_image"===t.type))||Boolean(fe)),!Kt))){const t=Yt(M);r(74,Gt["background-color"]=t.color,Gt),r(74,Gt["background-image"]=t.image,Gt),r(74,Gt["background-size"]=t.size,Gt),r(74,Gt["background-position"]=t.position,Gt),r(74,Gt["background-repeat"]="no-repeat",Gt)}if(4&t.$$.dirty[1]&&(r(75,Ie=void 0),Me&&$t.transition_in&&Dt.isRunning("stateChange")&&r(75,Ie=!0)),4&t.$$.dirty[1]&&(r(77,Je=void 0),Me&&$t.transition_change&&Dt.isRunning("stateChange")&&Ft.hasTransitionChange($t.id)&&r(77,Je=!0)),4&t.$$.dirty[1]&&(r(21,$=Dt.getDerivedFromVars($t.action)),Y(),Y=f($,(t=>r(99,z=t)))),4&t.$$.dirty[1]&&(r(20,_=Dt.getDerivedFromVars($t.actions)),Z(),Z=f(_,(t=>r(100,N=t)))),4&t.$$.dirty[1]&&(r(19,b=Dt.getDerivedFromVars($t.doubletap_actions)),X(),X=f(b,(t=>r(98,F=t)))),4&t.$$.dirty[1]&&(r(18,w=Dt.getDerivedFromVars($t.longtap_actions)),K(),K=f(w,(t=>r(97,D=t)))),576&t.$$.dirty[1]|240&t.$$.dirty[3]){let t=N||z&&[z]||[],e=F||[],n=D||[];kt.fakeElement?(t=[],e=[],n=[]):(Array.isArray(t)||(t=[],Dt.logError(Jt(new Error("Actions should be array")))),Array.isArray(e)||(e=[],Dt.logError(Jt(new Error("DoubleTapActions should be array")))),Array.isArray(n)||(n=[],Dt.logError(Jt(new Error("LongTapActions should be array"))))),(t.length||e.length||n.length)&&At&&(t=[],e=[],n=[],Dt.logError(Jt(new Error('Cannot use action on component "'.concat(At,'"'))))),r(10,We=t),r(11,He=e),r(12,qe=n)}if(4&t.$$.dirty[1]&&(r(17,x=Dt.getDerivedFromVars($t.action_animation)),G(),G=f(x,(t=>r(96,S=t)))),16&t.$$.dirty[0]|8&t.$$.dirty[3]&&S&&(r(4,Ge=ve(S)),r(78,Ke=Ge.map(Xe).filter(Boolean).join(", "))),4&t.$$.dirty[1]&&(r(16,k=Dt.getDerivedFromVars($t.visibility)),q(),q=f(k,(t=>r(95,P=t)))),6291456&t.$$.dirty[2]|4&t.$$.dirty[3]){const t=tn,e=function(t,e){return"visible"===t||"invisible"===t||"gone"===t?t:e}(P,tn);t!==e&&(!Qe||"visible"!==tn&&"visible"!==e?r(84,tn=e):async function(t){r(84,tn=t);const e="visible"===t?"in":"out",n="in"===e?$t.transition_in:$t.transition_out;Te&&n&&(await ut(),"in"===e&&r(76,Oe=!0),Ft.runVisibilityTransition(Object.assign(Object.assign({},$t),{visibility:"visible"}),bt,n,zt,e).then((()=>{"in"===e&&r(76,Oe=!1)})).catch((t=>{throw"in"===e&&r(76,Oe=!1),t})))}(e)),Qe||r(83,Qe=!0)}if(33554496&t.$$.dirty[1]|1078059012&t.$$.dirty[2]|1&t.$$.dirty[3]&&r(15,E=Object.assign(Object.assign(Object.assign({},we),Ve),{"parent-overlap":p,"parent-overlap-absolute":h,"scroll-snap":kt.scrollSnap,"hide-on-transition-in":Ie||Oe||Je,visibility:tn,"has-action-animation":Boolean(Ke),"parent-flex":kt.parentContainerOrientation||void 0,"parent-grid":Boolean(kt.gridArea)||void 0})),4&t.$$.dirty[1]&&(r(14,C=Dt.getDerivedFromVars($t.transform)),H(),H=f(C,(t=>r(94,j=t)))),25165824&t.$$.dirty[2]|2&t.$$.dirty[3]&&j&&void 0!==j.rotation){const t=j.pivot_x||{type:"pivot-percentage",value:50};r(85,en=me(t.value,en));const e="pivot-fixed"===t.type?Lt(en):"".concat(en,"%"),n=j.pivot_y||{type:"pivot-percentage",value:50};r(86,nn=me(n.value,nn));const i="pivot-fixed"===n.type?Lt(nn):"".concat(nn,"%");r(87,Ye="".concat(e," ").concat(i)),r(88,Ze="rotate(".concat(j.rotation,"deg)"))}1073741824&t.$$.dirty[1]|642&t.$$.dirty[2]&&r(89,A=Ce||De?"100%":ke||Pe?0:void 0),1560543264&t.$$.dirty[1]|1042225593&t.$$.dirty[2]&&r(13,V=Object.assign(Object.assign(Object.assign(Object.assign({},xt),Gt),Qt),{width:Mt,"min-width":Tt,"max-width":It,height:Bt,"min-height":Rt,"max-height":Ut||(null==xt?void 0:xt["max-height"]),"grid-area":g,padding:a,margin:be,opacity:Ht,transition:Ke,"transform-origin":Ye,transform:Ze,"flex-grow":ke||Pe||void 0,"flex-shrink":Ee||Se?1:void 0,"flex-basis":A,"--divkit-animation-opacity-start":Be,"--divkit-animation-opacity-end":Re,"--divkit-animation-scale-start":Ue,"--divkit-animation-scale-end":Le}))},[wt,te,fe,Kt,Ge,M,Nt,ee,Ae,Fe,We,He,qe,V,C,E,k,x,w,b,_,$,y,v,m,d,u,c,l,s,o,i,function(t){zt=t,Me&&$t.transition_in&&Ft.registerChildWithTransitionIn($t,bt,$t.transition_in,t).then((()=>{r(75,Ie=!1)})).catch((t=>{throw r(75,Ie=!1),t})),Me&&$t.transition_out&&Ft.registerChildWithTransitionOut($t,bt,$t.transition_out,t),Me&&$t.transition_change&&Ft.registerChildWithTransitionChange($t,bt,$t.transition_change,t).then((()=>{r(77,Je=!1)})).catch((t=>{throw r(77,Je=!1),t}));const e=kt.fakeElement?[]:$t.visibility_actions||$t.visibility_action&&[$t.visibility_action];Array.isArray(e)&&e.length&&function(t,e){let{visibilityActions:n,rootCtx:r}=e;const i=n.map(((t,e)=>({index:e,action:t,visible:!1,count:0,finished:!1}))),o=n.map((t=>r.getJsonWithVars({visibility_percentage:t.visibility_percentage,visibility_duration:t.visibility_duration,log_limit:t.log_limit}))),a=[...new Set([...n.map(((t,e)=>(o[e].visibility_percentage||50)/100))])];new IntersectionObserver((t=>{t.forEach((t=>{i.forEach((e=>{const n=t.intersectionRatio>=(e.action.visibility_percentage||50)/100;!e.visible&&n?e.finished||(e.timer=setTimeout((()=>{++e.count;const t=o[e.index],n=0===t.log_limit?1/0:t.log_limit||1;++e.count>=n&&(e.finished=!0);const i=r.getJsonWithVars(e.action),a=i.url;if(a){const t=ne(a);t&&!re(t,r.getBuiltinProtocols())&&("div-action"===t?r.execAction(i):i.log_id&&r.execCustomAction(i))}r.logStat("visible",i)}),o[e.index].visibility_duration||800)):n||e.timer&&clearTimeout(e.timer),e.visible=n}))}))}),{threshold:a}).observe(t)}(t,{visibilityActions:e,rootCtx:Dt});const n=$t.id;n&&Ft.registerChild(n);let i=null;if(Array.isArray($t.extensions)){const e=Dt.getExtensionContext();Zt=$t.extensions.map((n=>{var r;const i=Dt.getExtension(n.id,n.params);return i&&(null===(r=i.mountView)||void 0===r||r.call(i,t,e)),i})).filter(Xt)}return{destroy(){if(n&&Ft.unregisterChild(n),Zt){const e=Dt.getExtensionContext();Zt.forEach((n=>{var r;null===(r=n.unmountView)||void 0===r||r.call(n,t,e)})),Zt=null}i&&i.destroy()}}},$t,_t,bt,xt,kt,Et,Ct,At,Vt,jt,ft,ht,gt,mt,vt,yt,Qt,ie,oe,le,pe,_e,be,we,Mt,Tt,It,xe,ke,Ee,Ce,Ve,Bt,Rt,Ut,je,Pe,Se,De,ze,Ht,Gt,Ie,Oe,Je,Ke,Be,Re,Ue,Le,Qe,tn,en,nn,Ye,Ze,A,a,g,h,p,j,P,S,D,F,z,N,T,I,O,J,B,R,U,L,W,dt,pt]}const We=class extends zt{constructor(t){super(),Ft(this,t,Le,Re,d,{json:33,origJson:34,templateContext:35,cls:0,style:36,layoutParams:37,customDescription:38,customPaddings:39,customActions:40,additionalPaddings:41,heightByAspect:42},null,[-1,-1,-1,-1])}},He={"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 qe(t,e){const n=Number(t);return isNaN(n)||n<=0?e:n}function Ge(t){if("light"===t||"medium"===t||"bold"===t||"regular"===t)return"medium"===t?500:"bold"===t?700:"light"===t?300:400}function Ke(t,e){return Ge(t)||e}function Xe(t){let e,n;return{c(){e=z("span"),J(e,"class",n=He["text-range__top-offset"]),U(e,"margin-top",t[4])},m(t,n){S(t,e,n)},p(t,n){16&n&&U(e,"margin-top",t[4])},d(t){t&&D(e)}}}function Ye(t){let e;return{c(){e=M(t[0])},m(t,n){S(t,e,n)},p(t,n){1&n&&R(e,t[0])},d(t){t&&D(e)}}}function Ze(t){let e,n,r,i=t[4]&&Xe(t);return n=new Ae({props:{cls:oe("text-range",He,t[3]),actions:t[1],style:Ut(t[2]),$$slots:{default:[Ye]},$$scope:{ctx:t}}}),{c(){i&&i.c(),e=I(),Pt(n.$$.fragment)},m(t,o){i&&i.m(t,o),S(t,e,o),St(n,t,o),r=!0},p(t,r){let[o]=r;t[4]?i?i.p(t,o):(i=Xe(t),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null);const a={};8&o&&(a.cls=oe("text-range",He,t[3])),2&o&&(a.actions=t[1]),4&o&&(a.style=Ut(t[2])),524289&o&&(a.$$scope={dirty:o,ctx:t}),n.$set(a)},i(t){r||(wt(n.$$.fragment,t),r=!0)},o(t){xt(n.$$.fragment,t),r=!1},d(t){i&&i.d(t),t&&D(e),Dt(n,t)}}}function Qe(t,e,n){let r,i,o,a,s;var l,c;let u,{text:d}=e,{rootFontSize:p}=e,{textStyles:f={}}=e,{singleline:h=!1}=e,{actions:g}=e,m="none",v=12,y=1.25,$="",_="",b=null;return t.$$set=t=>{"text"in t&&n(0,d=t.text),"rootFontSize"in t&&n(5,p=t.rootFontSize),"textStyles"in t&&n(6,f=t.textStyles),"singleline"in t&&n(7,h=t.singleline),"actions"in t&&n(1,g=t.actions)},t.$$.update=()=>{if(64&t.$$.dirty){let t="none";(f.underline||f.strike)&&("single"===f.underline&&"single"===f.strike?t="both":"single"===f.underline?t="underline":"single"===f.strike&&(t="strike")),n(10,m=t)}2112&t.$$.dirty&&n(11,v=qe(f.font_size,v)),2112&t.$$.dirty&&je(f.line_height)&&n(12,y=Number(f.line_height)/v),64&t.$$.dirty&&ce(f.letter_spacing)&&n(13,$=Lt(f.letter_spacing)),16448&t.$$.dirty&&n(14,u=Ke(f.font_weight,u)),32832&t.$$.dirty&&n(15,_=qt(f.text_color,1,_)),64&t.$$.dirty&&n(4,r=f.top_offset?Lt(f.top_offset):""),64&t.$$.dirty&&n(18,i=f.background?Yt([f.background]):null),320&t.$$.dirty&&((null===n(8,l=f.border)||void 0===l?void 0:l.stroke)&&"transparent"!==qt(f.border.stroke.color)&&je(f.border.stroke.width)?n(16,b={color:f.border.stroke.color,width:f.border.stroke.width}):n(16,b=null)),576&t.$$.dirty&&n(17,o=qe(null===n(9,c=f.border)||void 0===c?void 0:c.corner_radius,0)),1152&t.$$.dirty&&n(3,a={singleline:h,decoration:m}),522272&t.$$.dirty&&n(2,s={"font-size":Lt(10*v/p),"line-height":y,"letter-spacing":$,"font-weight":u,color:_,background:(null==i?void 0:i.color)||void 0,"box-shadow":b?"inset 0 0 0 ".concat(Lt(b.width)," ").concat(b.color):void 0,"border-radius":o?Lt(o):void 0})},[d,g,s,a,r,p,f,h,l,c,m,v,y,$,u,_,b,o,i]}const tn=class extends zt{constructor(t){super(),Ft(this,t,Qe,Ze,d,{text:0,rootFontSize:5,textStyles:6,singleline:7,actions:1})}};function en(t,e){return"left"===t||"center"===t||"right"===t?t:e}function nn(t,e){return"top"===t||"center"===t||"bottom"===t||"baseline"===t?t:e}function rn(t,e){return"source_in"===t||"source_atop"===t||"darken"===t||"lighten"===t||"multiply"===t||"screen"===t?t:e}const{Boolean:on}=Ct;function an(t,e,n){const r=t.slice();return r[55]=e[n],r[57]=n,r}function sn(t){let e,n;return e=new We({props:{cls:oe("text",Bt,t[13])+" "+(t[6]?"":It.root__unselectable),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[hn]},$$scope:{ctx:t}}}),{c(){Pt(e.$$.fragment)},m(t,r){St(e,t,r),n=!0},p(t,n){const r={};8256&n[0]&&(r.cls=oe("text",Bt,t[13])+" "+(t[6]?"":It.root__unselectable)),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),134225584&n[0]|134217728&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function ln(t){let e,n;return e=new tn({props:{text:t[4],rootFontSize:t[5],textStyles:t[27],singleline:t[7]}}),{c(){Pt(e.$$.fragment)},m(t,r){St(e,t,r),n=!0},p(t,n){const r={};16&n[0]&&(r.text=t[4]),32&n[0]&&(r.rootFontSize=t[5]),134217728&n[0]&&(r.textStyles=t[27]),128&n[0]&&(r.singleline=t[7]),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function cn(t){let e,n,r=t[10],i=[];for(let e=0;e<r.length;e+=1)i[e]=fn(an(t,r,e));const o=t=>xt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=I()},m(t,r){for(let e=0;e<i.length;e+=1)i[e]&&i[e].m(t,r);S(t,e,r),n=!0},p(t,n){if(268437152&n[0]){let a;for(r=t[10],a=0;a<r.length;a+=1){const o=an(t,r,a);i[a]?(i[a].p(o,n),wt(i[a],1)):(i[a]=fn(o),i[a].c(),wt(i[a],1),i[a].m(e.parentNode,e))}for(_t(),a=r.length;a<i.length;a+=1)o(a);bt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)wt(i[t]);n=!0}},o(t){i=i.filter(on);for(let t=0;t<i.length;t+=1)xt(i[t]);n=!1},d(t){F(i,t),t&&D(e)}}}function un(t){let e,r,i,o,a,s,l,c;return{c(){e=z("span"),r=z("img"),J(r,"class",i=Bt.text__image),u(r.src,o=t[55].image.url)||J(r,"src",o),J(r,"loading","lazy"),J(r,"decoding","async"),J(r,"aria-hidden","true"),J(r,"alt",""),J(r,"style",a=Ut({width:t[55].image.width,height:t[55].image.height,"margin-top":t[9]?"-".concat(t[55].image.height):void 0,"margin-bottom":t[9]?"-".concat(t[55].image.height):void 0,filter:t[55].image.svgFilterId?"url(#".concat(t[55].image.svgFilterId,")"):void 0})),J(e,"style",s=Ut(t[55].image.wrapperStyle))},m(n,i){S(n,e,i),V(e,r),l||(c=O(r,"error",t[28]),l=!0)},p(t,n){1024&n[0]&&!u(r.src,o=t[55].image.url)&&J(r,"src",o),1536&n[0]&&a!==(a=Ut({width:t[55].image.width,height:t[55].image.height,"margin-top":t[9]?"-".concat(t[55].image.height):void 0,"margin-bottom":t[9]?"-".concat(t[55].image.height):void 0,filter:t[55].image.svgFilterId?"url(#".concat(t[55].image.svgFilterId,")"):void 0}))&&J(r,"style",a),1024&n[0]&&s!==(s=Ut(t[55].image.wrapperStyle))&&J(e,"style",s)},i:n,o:n,d(t){t&&D(e),l=!1,c()}}}function dn(t){let e,n,r=t[55].text&&pn(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),S(t,e,i),n=!0},p(t,n){t[55].text?r?(r.p(t,n),1024&n[0]&&wt(r,1)):(r=pn(t),r.c(),wt(r,1),r.m(e.parentNode,e)):r&&(_t(),xt(r,1,1,(()=>{r=null})),bt())},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function pn(t){let e,n;return e=new tn({props:{text:t[55].text,rootFontSize:t[5],textStyles:t[55].textStyles,singleline:t[7],actions:t[55].actions}}),{c(){Pt(e.$$.fragment)},m(t,r){St(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.text=t[55].text),32&n[0]&&(r.rootFontSize=t[5]),1024&n[0]&&(r.textStyles=t[55].textStyles),128&n[0]&&(r.singleline=t[7]),1024&n[0]&&(r.actions=t[55].actions),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function fn(t){let e,n,r,i;const o=[dn,un],a=[];function s(t,e){return"text"in t[55]?0:t[55].image?1:-1}return~(e=s(t))&&(n=a[e]=o[e](t)),{c(){n&&n.c(),r=I()},m(t,n){~e&&a[e].m(t,n),S(t,r,n),i=!0},p(t,i){let l=e;e=s(t),e===l?~e&&a[e].p(t,i):(n&&(_t(),xt(a[l],1,1,(()=>{a[l]=null})),bt()),~e?(n=a[e],n?n.p(t,i):(n=a[e]=o[e](t),n.c()),wt(n,1),n.m(r.parentNode,r)):n=null)},i(t){i||(wt(n),i=!0)},o(t){xt(n),i=!1},d(t){~e&&a[e].d(t),t&&D(r)}}}function hn(t){let e,n,r,i,o,a;const s=[cn,ln],l=[];function c(t,e){return t[10].length?0:1}return n=c(t),r=l[n]=s[n](t),{c(){e=z("span"),r.c(),J(e,"class",i=oe("text__inner",Bt,t[12])),J(e,"style",o=Ut(t[11]))},m(t,r){S(t,e,r),l[n].m(e,null),a=!0},p(t,u){let d=n;n=c(t),n===d?l[n].p(t,u):(_t(),xt(l[d],1,1,(()=>{l[d]=null})),bt(),r=l[n],r?r.p(t,u):(r=l[n]=s[n](t),r.c()),wt(r,1),r.m(e,null)),(!a||4096&u[0]&&i!==(i=oe("text__inner",Bt,t[12])))&&J(e,"class",i),(!a||2048&u[0]&&o!==(o=Ut(t[11])))&&J(e,"style",o)},i(t){a||(wt(r),a=!0)},o(t){xt(r),a=!1},d(t){t&&D(e),l[n].d()}}}function gn(t){let e,n,r=!t[8]&&sn(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),S(t,e,i),n=!0},p(t,n){t[8]?r&&(_t(),xt(r,1,1,(()=>{r=null})),bt()):r?(r.p(t,n),256&n[0]&&wt(r,1)):(r=sn(t),r.c(),wt(r,1),r.m(e.parentNode,e))},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function mn(t,e,r){let i,o,a,s,l,c,u,d,p,h,g,m,v,y,$,_,b,w,x,k,E,C,A,V,j,P,S,D,F,z,N,M,T,I=n,O=n,J=n,B=n,R=n,U=n,L=n,W=n,H=n,q=n,G=n,K=n,X=n;t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>X()));let{json:Y={}}=e,{templateContext:Z}=e,{origJson:tt}=e,{layoutParams:nt}=e;const rt=et(Ot);let it=!1,ot="",at=12,st=1.25,lt=!1,ct="",ut="",dt=!1,pt="left",ft="top",ht="",gt="",mt=!1,vt=[],yt=[];return Q((()=>{yt.forEach((t=>{let[e,n]=t;rt.removeSvgFilter(e,n)}))})),t.$$set=t=>{"json"in t&&r(0,Y=t.json),"templateContext"in t&&r(1,Z=t.templateContext),"origJson"in t&&r(2,tt=t.origJson),"layoutParams"in t&&r(3,nt=t.layoutParams)},t.$$.update=()=>{var e,n;if(1&t.$$.dirty[0]&&(r(26,i=rt.getDerivedFromVars(Y.text)),X(),X=f(i,(t=>r(51,T=t)))),16&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&(r(4,(e=T,n=ot,ot=String(null!=e?e:"")||n)),ot?r(8,it=!1):(r(8,it=!0),rt.logError(Jt(new Error('Missing "text" prop for div "text"'))))),1&t.$$.dirty[0]&&(r(25,o=rt.getDerivedFromVars(Y.ranges)),O(),O=f(o,(t=>r(41,C=t)))),1&t.$$.dirty[0]&&(r(24,a=rt.getDerivedFromVars(Y.images)),I(),I=f(a,(t=>r(40,E=t)))),1&t.$$.dirty[0]&&(r(23,s=rt.getDerivedFromVars({font_size:Y.font_size,letter_spacing:Y.letter_spacing,font_weight:Y.font_weight,text_color:Y.text_color,underline:Y.underline,strike:Y.strike,line_height:Y.line_height})),J(),J=f(s,(t=>r(27,A=t)))),1&t.$$.dirty[0]&&(r(22,l=rt.getDerivedFromVars(Y.font_size)),K(),K=f(l,(t=>r(50,M=t)))),32&t.$$.dirty[0]|524288&t.$$.dirty[1]&&r(5,at=qe(M,at)),1&t.$$.dirty[0]&&(r(21,c=rt.getDerivedFromVars(Y.line_height)),G(),G=f(c,(t=>r(49,N=t)))),32&t.$$.dirty[0]|262144&t.$$.dirty[1]){const t=N;je(t)?(r(29,st=Number(t)/at),r(9,lt=!0)):r(9,lt=!1)}if(1&t.$$.dirty[0]&&(r(20,u=rt.getDerivedFromVars(Y.max_lines)),W(),W=f(u,(t=>r(46,D=t)))),32768&t.$$.dirty[1]&&r(7,d=1===D),536870912&t.$$.dirty[0]|34304&t.$$.dirty[1]){let t="",e="",n=!1;if(D&&D>1){let r=Number(D);t=r*st+"em",C||E||(e=r,n=!0)}r(30,ct=t),r(31,ut=e),r(32,dt=n)}if(1&t.$$.dirty[0]&&(r(19,p=rt.getDerivedFromVars(Y.text_alignment_horizontal)),q(),q=f(p,(t=>r(48,z=t)))),131076&t.$$.dirty[1]&&r(33,pt=en(z,pt)),1&t.$$.dirty[0]&&(r(18,h=rt.getDerivedFromVars(Y.text_alignment_vertical)),H(),H=f(h,(t=>r(47,F=t)))),65544&t.$$.dirty[1]&&r(34,ft=nn(F,ft)),16&t.$$.dirty[0]|1024&t.$$.dirty[1]&&r(39,g=!C||ot&&1===C.length&&C[0]&&0===C[0].start&&"number"==typeof C[0].end&&C[0].end>=ot.length),1&t.$$.dirty[0]&&(r(17,m=rt.getDerivedFromVars(Y.text_color)),L(),L=f(m,(t=>r(45,S=t)))),17408&t.$$.dirty[1]&&r(38,v=Boolean(S)!==Boolean(C&&C[0]&&C[0].text_color)),50576&t.$$.dirty[1]){let t="";D&&g&&v&&(t=qt(S||C&&C[0]&&C[0].text_color,1,ht)),r(35,ht=t)}if(1&t.$$.dirty[0]&&(r(16,y=rt.getDerivedFromVars(Y.truncate)),U(),U=f(y,(t=>r(44,P=t)))),8192&t.$$.dirty[1]&&r(37,$="none"===P?"none":""),1&t.$$.dirty[0]&&(r(15,_=rt.getDerivedFromVars(Y.text_gradient)),R(),R=f(_,(t=>r(43,j=t)))),4096&t.$$.dirty[1]){let t="";if(j){const e=Yt([j]);e.image&&(t=e.image)}r(36,gt=t)}1&t.$$.dirty[0]&&(r(14,b=rt.getDerivedFromVars(Y.selectable)),B(),B=f(b,(t=>r(42,V=t)))),64&t.$$.dirty[0]|2048&t.$$.dirty[1]&&r(6,mt=function(t,e){return 1===t||0===t||!1===t||!0===t?Boolean(t):e}(V,mt)),16&t.$$.dirty[0]|1536&t.$$.dirty[1]&&function(t,e,n){let i=[];if(yt.forEach((t=>{let[e,n]=t;rt.removeSvgFilter(e,n)})),yt=[],!(Array.isArray(e)&&e.length||Array.isArray(n)&&n.length&&t))return void r(10,vt=[]);const o=t;let a=e||[{start:0,end:o.length}],s=n||[],l=0,c=[],u=[];a.forEach((t=>{void 0!==t.start&&void 0!==t.end&&(u.push({index:t.start,range:t,type:"rangeStart",isStart:!0}),u.push({index:t.end,range:t,type:"rangeEnd"}))})),s.forEach(((t,e)=>{void 0!==t.start&&t.url&&t.start<=o.length&&u.push({index:t.start,image:t,type:"image",arrayIndex:e})})),u.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)),u.forEach((t=>{var e;let n="image"===t.type?null:t.range,r=t.index;if(r>l){let n=Object.assign(Object.assign({},A),...c);i.push({text:o.substring(l,r),textStyles:n,actions:"rangeEnd"===t.type&&(null===(e=t.range)||void 0===e?void 0:e.actions)||void 0})}if("rangeStart"===t.type&&n)c.push(n);else if("rangeEnd"===t.type)c=c.filter((e=>e!==t.range));else if("image"===t.type){let e=Object.assign(Object.assign({},A),...c),n=Lt(10*(t.image.width&&t.image.width.value||20)/(e.font_size||12)),r=Lt(10*(t.image.height&&t.image.height.value||20)/(e.font_size||12));const o={"font-size":Lt(10*(Number(e.font_size)||12)/at)};let a="";const s=t.image.tint_color,l=rn(t.image.tint_mode,"source_in");if(s){const e=qt(t.image.tint_color);a=rt.addSvgFilter(e,l),yt.push([e,l])}i.push({image:{url:t.image.url,width:n,height:r,wrapperStyle:o,svgFilterId:a}})}l=r})),l<o.length&&i.push({text:o.substring(l),textStyles:Object.assign({},A)}),r(10,vt=i)}(ot,C,E),128&t.$$.dirty[0]|78&t.$$.dirty[1]&&r(13,w={singleline:d,multiline:dt,halign:pt,valign:ft,truncate:$}),32&t.$$.dirty[1]&&r(12,x={gradient:Boolean(gt)}),1610612768&t.$$.dirty[0]|49&t.$$.dirty[1]&&r(11,k={"font-size":Lt(at),"line-height":st,"max-height":ct,"-webkit-line-clamp":ut,color:ht,"background-image":gt})},[Y,Z,tt,nt,ot,at,mt,d,it,lt,vt,k,x,w,b,_,y,m,h,p,u,c,l,s,a,o,i,A,function(t){t.target&&"classList"in t.target&&t.target.classList.add(Bt.text__image_hidden)},st,ct,ut,dt,pt,ft,ht,gt,$,v,g,E,C,V,j,P,S,D,F,z,N,M,T]}const vn={container:"divkit-d37d6",container_wrap:"divkit-c8551",container_orientation_vertical:"divkit-ddc33",container_valign_top:"divkit-a331a",container_valign_center:"divkit-aae61",container_valign_bottom:"divkit-c2226",container_orientation_horizontal:"divkit-fe458",container_halign_left:"divkit-a3091",container_halign_center:"divkit-bac9d",container_halign_right:"divkit-f4230",container_orientation_overlap:"divkit-a644d"};function yn(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)i=t.shape,r={width:Number((null===(o=i.item_width)||void 0===o?void 0:o.value)||10),height:Number((null===(a=i.item_height)||void 0===a?void 0:a.value)||10),radius:Number(null!==(s=null===(l=i.corner_radius)||void 0===l?void 0:l.value)&&void 0!==s?s:5)};else{if("circle"!==t.shape.type)return n;r=function(t){var e;const n=2*Number((null===(e=t.radius)||void 0===e?void 0:e.value)||10);return{width:n,height:n,radius:n}}(t.shape)}var i,o,a,s,l;return function(t,e,n){var r;const i={},o=e.stroke||(null==n?void 0:n.stroke),a=null!=o&&o.color?qt(o.color):"",s=null!=o&&o.width?Number(null!==(r=o.width)&&void 0!==r?r:1):"";i.width=t.width,i.height=t.height,i.borderRadius=t.radius;const l=e.background_color||(null==n?void 0:n.color);return i.background=qt(l),a&&s&&(i.boxShadow="inset 0 0 0 ".concat(Lt(s)," ").concat(a)),i}(r,t.shape,{color:t.color,stroke:t.stroke})}function $n(t,e,n){null!=e&&e.show_at_start&&(n?t.top=e.style.height:t.left=e.style.width),null!=e&&e.show_at_end&&(n?t.bottom=e.style.height:t.right=e.style.width)}function _n(t,e,n){let r;return r="horizontal"===t?[null!=n&&n.show_between?n.style.height:0,null!=e&&e.show_between?e.style.width:0]:[null!=e&&e.show_between?e.style.height:0,null!=n&&n.show_between?n.style.width:0],r.map(Lt).join(" ")}let bn;function wn(){if(void 0!==bn)return bn;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),bn=1===t.scrollHeight,document.body.removeChild(t),bn}const xn={"container-separator":"divkit-a7719","container-separator__item":"divkit-c770e","container-separator__shape":"divkit-f6e9a"};function kn(t,e,n){const r=t.slice();return r[13]=e[n],r}function En(t){let e,n,r,i,o,a="".concat(t[13].style.width,"px"),s="".concat(t[13].style.height,"px"),l="".concat(t[13].style.borderRadius,"px"),c="".concat(t[13].left,"px"),u="".concat(t[13].top,"px"),d="".concat(t[13].width,"px"),p="".concat(t[13].height,"px");return{c(){e=z("div"),n=z("div"),i=T(),J(n,"class",r=xn["container-separator__shape"]),U(n,"width",a),U(n,"height",s),U(n,"border-radius",l),U(n,"background",t[13].style.background),U(n,"box-shadow",t[13].style.boxShadow),J(e,"class",o=xn["container-separator__item"]),U(e,"left",c),U(e,"top",u),U(e,"width",d),U(e,"height",p)},m(t,r){S(t,e,r),V(e,n),V(e,i)},p(t,r){2&r&&a!==(a="".concat(t[13].style.width,"px"))&&U(n,"width",a),2&r&&s!==(s="".concat(t[13].style.height,"px"))&&U(n,"height",s),2&r&&l!==(l="".concat(t[13].style.borderRadius,"px"))&&U(n,"border-radius",l),2&r&&U(n,"background",t[13].style.background),2&r&&U(n,"box-shadow",t[13].style.boxShadow),2&r&&c!==(c="".concat(t[13].left,"px"))&&U(e,"left",c),2&r&&u!==(u="".concat(t[13].top,"px"))&&U(e,"top",u),2&r&&d!==(d="".concat(t[13].width,"px"))&&U(e,"width",d),2&r&&p!==(p="".concat(t[13].height,"px"))&&U(e,"height",p)},d(t){t&&D(e)}}}function Cn(t){let e,r,i,o,a=t[1],s=[];for(let e=0;e<a.length;e+=1)s[e]=En(kn(t,a,e));return{c(){e=z("div");for(let t=0;t<s.length;t+=1)s[t].c();J(e,"class",r=xn["container-separator"])},m(n,r){S(n,e,r);for(let t=0;t<s.length;t+=1)s[t]&&s[t].m(e,null);t[10](e),i||(o=O(window,"resize",t[2]),i=!0)},p(t,n){let[r]=n;if(2&r){let n;for(a=t[1],n=0;n<a.length;n+=1){const i=kn(t,a,n);s[n]?s[n].p(i,r):(s[n]=En(i),s[n].c(),s[n].m(e,null))}for(;n<s.length;n+=1)s[n].d(1);s.length=a.length}},i:n,o:n,d(n){n&&D(e),F(s,n),t[10](null),i=!1,o()}}}function An(t,e,n,r,i,o){o?t.push({top:n.bottom,left:i.left,width:i.right-i.left,height:r.top-n.bottom,style:e}):t.push({top:i.top,left:n.right,width:r.left-n.right,height:i.bottom-i.top,style:e})}function Vn(t,e,n,r){const i={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)&&An(t,e.style,{top:0,right:n[0].left-e.style.width,bottom:n[0].top-e.style.height,left:0},n[0],i,r),null==e?void 0:e.show_between)for(let o=0;o<n.length-1;++o)An(t,e.style,n[o],n[o+1],i,r);if(null==e?void 0:e.show_at_end){const o=n[n.length-1];An(t,e.style,o,{top:o.bottom+e.style.height,right:0,bottom:0,left:o.right+e.style.width},i,r)}}function jn(t,e,n){let r,{orientation:i}=e,{separator:o}=e,{lineSeparator:a}=e;const s=function(t,e){let n,r=0,i=!1;return function(){const e=Date.now();return!r||Math.abs(e-r)>10?(r=e,n=t.apply(this,arguments)):(i||(i=!0,setTimeout((()=>{i=!1,n=t.apply(this,arguments)}),10)),n)}}((function(){if(!r)return;const t=r.getBoundingClientRect();n(1,c=[]);let e=[...r.children].filter((t=>t!==l&&!t.classList.contains(Rt.outer__border))),s=[];for(;e.length;){const t=[],n=e.shift();t.push(n);let r=n.getBoundingClientRect(),o=r.right,a=r.bottom;for(;e.length;){let n=e[0],r=n.getBoundingClientRect();if("vertical"===i){if(r.top<a)break}else if(r.left<o)break;o=Math.max(o,r.right),a=Math.max(a,r.bottom),t.push(n),e.shift()}s.push(t)}const u=[];s.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)));o&&Vn(c,o,e,"vertical"===i);const n={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)))};u.push(n)})),a&&Vn(c,a,u,"horizontal"===i),c.forEach((e=>{e.top-=t.top,e.left-=t.left}))}));let l,c=[],u=!1,d=null,p=null;function f(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(xn["container-separator__shape"]))&&!(null==n?void 0:n.contains(xn["container-separator"]))}))&&s()}return Z((()=>{n(6,u=!0)})),Q((()=>{n(6,u=!1)})),t.$$set=t=>{"orientation"in t&&n(3,i=t.orientation),"separator"in t&&n(4,o=t.separator),"lineSeparator"in t&&n(5,a=t.lineSeparator)},t.$$.update=()=>{1&t.$$.dirty&&n(9,r=(null==l?void 0:l.parentElement)||null),960&t.$$.dirty&&(u&&r||d||p)&&(d&&(d.disconnect(),n(7,d=null)),p&&(p.disconnect(),n(8,p=null)),u&&r&&("undefined"!=typeof MutationObserver&&(n(7,d=new MutationObserver(f)),d.observe(r,{childList:!0,attributes:!0,characterData:!0,subtree:!0})),"undefined"!=typeof ResizeObserver&&(n(8,p=new ResizeObserver(s)),p.observe(r)))),576&t.$$.dirty&&u&&r&&s()},[l,c,s,i,o,a,u,d,p,r,function(t){it[t?"unshift":"push"]((()=>{l=t,n(0,l)}))}]}const Pn=class extends zt{constructor(t){super(),Ft(this,t,jn,Cn,d,{orientation:3,separator:4,lineSeparator:5})}},{Boolean:Sn}=Ct;function Dn(t,e,n){const r=t.slice();return r[46]=e[n],r}function Fn(t){let e,n;return e=new We({props:{cls:oe("container",vn,t[11]),style:t[10],json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],additionalPaddings:t[15],heightByAspect:Boolean(t[8]),$$slots:{default:[Mn]},$$scope:{ctx:t}}}),{c(){Pt(e.$$.fragment)},m(t,r){St(e,t,r),n=!0},p(t,n){const r={};2048&n[0]&&(r.cls=oe("container",vn,t[11])),1024&n[0]&&(r.style=t[10]),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),32768&n[0]&&(r.additionalPaddings=t[15]),256&n[0]&&(r.heightByAspect=Boolean(t[8])),4195040&n[0]|262144&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function zn(t){let e,n;return e=new zo({props:{layoutParams:t[9],div:t[46].json,templateContext:t[46].templateContext,origJson:t[46].origJson}}),{c(){Pt(e.$$.fragment)},m(t,r){St(e,t,r),n=!0},p(t,n){const r={};512&n[0]&&(r.layoutParams=t[9]),4194304&n[0]&&(r.div=t[46].json),4194304&n[0]&&(r.templateContext=t[46].templateContext),4194304&n[0]&&(r.origJson=t[46].origJson),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function Nn(t){let e,n;return e=new Pn({props:{separator:t[6],lineSeparator:t[7],orientation:t[5]}}),{c(){Pt(e.$$.fragment)},m(t,r){St(e,t,r),n=!0},p(t,n){const r={};64&n[0]&&(r.separator=t[6]),128&n[0]&&(r.lineSeparator=t[7]),32&n[0]&&(r.orientation=t[5]),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function Mn(t){let e,n,r,i=t[22],o=[];for(let e=0;e<i.length;e+=1)o[e]=zn(Dn(t,i,e));const a=t=>xt(o[t],1,1,(()=>{o[t]=null}));let s=(t[6]||t[7])&&Nn(t);return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=T(),s&&s.c(),n=I()},m(t,i){for(let e=0;e<o.length;e+=1)o[e]&&o[e].m(t,i);S(t,e,i),s&&s.m(t,i),S(t,n,i),r=!0},p(t,r){if(4194816&r[0]){let n;for(i=t[22],n=0;n<i.length;n+=1){const a=Dn(t,i,n);o[n]?(o[n].p(a,r),wt(o[n],1)):(o[n]=zn(a),o[n].c(),wt(o[n],1),o[n].m(e.parentNode,e))}for(_t(),n=i.length;n<o.length;n+=1)a(n);bt()}t[6]||t[7]?s?(s.p(t,r),192&r[0]&&wt(s,1)):(s=Nn(t),s.c(),wt(s,1),s.m(n.parentNode,n)):s&&(_t(),xt(s,1,1,(()=>{s=null})),bt())},i(t){if(!r){for(let t=0;t<i.length;t+=1)wt(o[t]);wt(s),r=!0}},o(t){o=o.filter(Sn);for(let t=0;t<o.length;t+=1)xt(o[t]);xt(s),r=!1},d(t){F(o,t),t&&D(e),s&&s.d(t),t&&D(n)}}}function Tn(t){let e,n,r=!t[4]&&Fn(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),S(t,e,i),n=!0},p(t,n){t[4]?r&&(_t(),xt(r,1,1,(()=>{r=null})),bt()):r?(r.p(t,n),16&n[0]&&wt(r,1)):(r=Fn(t),r.c(),wt(r,1),r.m(e.parentNode,e))},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function In(t,e,r){let i,o,a,s,l,c,u,d,p,h,g,m,v,y,$,_,b,w,x,k,E,C,A,V,j=n,P=n,S=n,D=n,F=n,z=n,N=n,M=n,T=n;var I,O,J,B,R,U;t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>S())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>F())),t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>M())),t.$$.on_destroy.push((()=>T()));let{json:L={}}=e,{templateContext:W}=e,{origJson:H}=e,{layoutParams:q}=e;const G={left:"start",center:"center",right:"end"},K={top:"start",center:"center",bottom:"end",baseline:"baseline"},X=["rounded_rectangle","circle"],Y=et(Ot);let Z,Q=!1,tt="vertical",nt="top",rt="left",it=null,ot=null,at={};return t.$$set=t=>{"json"in t&&r(0,L=t.json),"templateContext"in t&&r(1,W=t.templateContext),"origJson"in t&&r(2,H=t.origJson),"layoutParams"in t&&r(3,q=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(32,i=L.items),2&t.$$.dirty[1]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(4,Q=!1):(r(4,Q=!0),Y.logError(Jt(new Error('Incorrect or empty "items" prop for div "container"'))))),18&t.$$.dirty[0]|2&t.$$.dirty[1]&&r(22,o=(!Q&&i||[]).map((t=>{let e=t,n=W;return({templateContext:n,json:e}=Y.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),1&t.$$.dirty[0]&&(r(21,a=Y.getDerivedFromVars(L.orientation)),T(),T=f(a,(t=>r(41,V=t)))),32&t.$$.dirty[0]|1024&t.$$.dirty[1]&&r(5,tt=function(t,e){return"vertical"===t||"horizontal"===t||"overlap"===t?t:e}(V,tt)),1&t.$$.dirty[0]&&(r(20,s=Y.getDerivedFromVars(L.content_alignment_vertical)),M(),M=f(s,(t=>r(40,A=t)))),536870912&t.$$.dirty[0]|512&t.$$.dirty[1]&&r(29,nt=nn(A,nt)),1&t.$$.dirty[0]&&(r(19,l=Y.getDerivedFromVars(L.content_alignment_horizontal)),N(),N=f(l,(t=>r(39,C=t)))),1073741824&t.$$.dirty[0]|256&t.$$.dirty[1]&&r(30,rt=en(C,rt)),1&t.$$.dirty[0]&&(r(18,c=Y.getDerivedFromVars(L.layout_mode)),z(),z=f(c,(t=>r(38,E=t)))),128&t.$$.dirty[1]&&r(31,u="wrap"===E),1&t.$$.dirty[0]&&(r(17,d=Y.getDerivedFromVars(L.separator)),F(),F=f(d,(t=>r(37,k=t)))),58720352&t.$$.dirty[0]|64&t.$$.dirty[1])if((null==k?void 0:k.style)&&"overlap"!==tt&&wn()){const t=yn(k.style,X,(null==it?void 0:it.style)||null);r(6,it=t?{show_at_start:Boolean(null!==r(23,I=k.show_at_start)&&void 0!==I&&I),show_at_end:Boolean(null!==r(24,O=k.show_at_end)&&void 0!==O&&O),show_between:Boolean(null===r(25,J=k.show_between)||void 0===J||J),style:t}:null)}else r(6,it=null);if(1&t.$$.dirty[0]&&(r(16,p=Y.getDerivedFromVars(L.line_separator)),D(),D=f(p,(t=>r(36,x=t)))),469762208&t.$$.dirty[0]|32&t.$$.dirty[1])if((null==x?void 0:x.style)&&"overlap"!==tt&&wn()){const t=yn(x.style,X,(null==ot?void 0:ot.style)||null);r(7,ot=t?{show_at_start:Boolean(null!==r(26,B=x.show_at_start)&&void 0!==B&&B),show_at_end:Boolean(null!==r(27,R=x.show_at_end)&&void 0!==R&&R),show_between:Boolean(null===r(28,U=x.show_between)||void 0===U||U),style:t}:null)}else r(7,ot=null);if(224&t.$$.dirty[0]&&r(15,h=it||ot?function(t,e,n){const r={};return $n(r,e,"vertical"===t),$n(r,n,"horizontal"===t),r}(tt,it,ot):null),1&t.$$.dirty[0]&&(r(14,g=Y.getDerivedFromVars(L.aspect)),S(),S=f(g,(t=>r(35,w=t)))),16&t.$$.dirty[1]){const t=null==w?void 0:w.ratio;t&&je(t)?r(8,Z=t):r(8,Z=void 0)}if(1&t.$$.dirty[0]&&(r(13,m=Y.getDerivedFromVars(L.width)),j(),j=f(m,(t=>r(33,_=t)))),1&t.$$.dirty[0]&&(r(12,v=Y.getDerivedFromVars(L.height)),P(),P=f(v,(t=>r(34,b=t)))),1610613544&t.$$.dirty[0]|13&t.$$.dirty[1]){let t={};(null==q?void 0:q.fakeElement)&&(t.fakeElement=!0),"overlap"===tt&&(t.overlapParent=!0),"horizontal"!==tt&&(t.parentHAlign=G[rt],Z||b&&"wrap_content"!==b.type&&("match_parent"!==b.type||!(null==q?void 0:q.parentVerticalWrapContent))||(t.parentVerticalWrapContent=!0)),"vertical"!==tt&&(t.parentVAlign=K[nt],("wrap_content"===(null==_?void 0:_.type)||"match_parent"===(null==_?void 0:_.type)&&(null==q?void 0:q.parentHorizontalWrapContent))&&(t.parentHorizontalWrapContent=!0)),"horizontal"===tt&&(t.parentContainerOrientation="horizontal"),"vertical"===tt&&(t.parentContainerOrientation="vertical"),u&&(t.parentContainerWrap=!0),r(9,at=he(t,at))}1610612768&t.$$.dirty[0]|1&t.$$.dirty[1]&&r(11,y={orientation:tt,valign:nt,halign:rt,wrap:u}),480&t.$$.dirty[0]&&r(10,$={gap:it||ot?_n(tt,it,ot):void 0,"aspect-ratio":Z})},[L,W,H,q,Q,tt,it,ot,Z,at,$,y,v,m,g,h,p,d,c,l,s,a,o,I,O,J,B,R,U,nt,rt,u,i,_,b,w,x,k,E,C,A,V]}const On={separator:"divkit-a30bb",separator_orientation_horizontal:"divkit-f529e",separator_orientation_vertical:"divkit-e9e27",separator__inner:"divkit-db7d8"};function Jn(t,e){return"vertical"===t||"horizontal"===t?t:e}function Bn(t){let e,n,r;return{c(){e=z("span"),J(e,"class",n=On.separator__inner),J(e,"style",r=Ut(t[5]))},m(t,n){S(t,e,n)},p(t,n){32&n&&r!==(r=Ut(t[5]))&&J(e,"style",r)},d(t){t&&D(e)}}}function Rn(t){let e,n=t[6]&&Bn(t);return{c(){n&&n.c(),e=I()},m(t,r){n&&n.m(t,r),S(t,e,r)},p(t,r){t[6]?n?n.p(t,r):(n=Bn(t),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(t){n&&n.d(t),t&&D(e)}}}function Un(t){let e,n;return e=new We({props:{cls:oe("separator",On,t[4]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Rn]},$$scope:{ctx:t}}}),{c(){Pt(e.$$.fragment)},m(t,r){St(e,t,r),n=!0},p(t,n){let[r]=n;const i={};16&r&&(i.cls=oe("separator",On,t[4])),1&r&&(i.json=t[0]),4&r&&(i.origJson=t[2]),2&r&&(i.templateContext=t[1]),8&r&&(i.layoutParams=t[3]),16480&r&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function Ln(t,e,r){let i,o,a,s,l,c,u,d=n;t.$$.on_destroy.push((()=>d()));let{json:p={}}=e,{templateContext:h}=e,{origJson:g}=e,{layoutParams:m}=e;const v=et(Ot);let y="horizontal",$="rgba(0,0,0,0.08)";return t.$$set=t=>{"json"in t&&r(0,p=t.json),"templateContext"in t&&r(1,h=t.templateContext),"origJson"in t&&r(2,g=t.origJson),"layoutParams"in t&&r(3,m=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty&&(r(7,i=v.getDerivedFromVars(p.delimiter_style)),d(),d=f(i,(t=>r(12,u=t)))),4352&t.$$.dirty&&r(8,y=Jn(null==u?void 0:u.orientation,y)),4096&t.$$.dirty&&r(6,o=!((null==u?void 0:u.color)&&("transparent"===u.color||9===u.color.length&&0===u.color.indexOf("#00")))),4608&t.$$.dirty&&r(9,$=qt(null==u?void 0:u.color,1,$)),256&t.$$.dirty&&r(11,a="horizontal"===y?"100%":Lt(1)),256&t.$$.dirty&&r(10,s="horizontal"===y?Lt(1):"100%"),3584&t.$$.dirty&&r(5,l={background:$,width:a,height:s}),256&t.$$.dirty&&r(4,c={orientation:y})},[p,h,g,m,c,l,o,i,y,$,s,a,u]}const Wn={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 Hn(t){let e,n;return e=new We({props:{cls:oe("image",Wn,t[10]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customDescription:!0,$$slots:{default:[Xn]},$$scope:{ctx:t}}}),{c(){Pt(e.$$.fragment)},m(t,r){St(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.cls=oe("image",Wn,t[10])),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),67312&n[0]|536870912&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function qn(t){let e,n,r,i,o,a,l;return{c(){e=z("img"),J(e,"class",n=Wn.image__image),u(e.src,r=t[4]===Qn?Zn:t[7])||J(e,"src",r),J(e,"loading","lazy"),J(e,"decoding","async"),J(e,"style",i=Ut(t[9])),J(e,"alt",t[16]),J(e,"aria-hidden",o=t[16]?null:"true")},m(n,r){S(n,e,r),a||(l=[O(e,"load",t[26]),O(e,"error",t[27])],a=!0)},p(t,n){144&n[0]&&!u(e.src,r=t[4]===Qn?Zn:t[7])&&J(e,"src",r),512&n[0]&&i!==(i=Ut(t[9]))&&J(e,"style",i),65536&n[0]&&J(e,"alt",t[16]),65536&n[0]&&o!==(o=t[16]?null:"true")&&J(e,"aria-hidden",o)},d(t){t&&D(e),a=!1,s(l)}}}function Gn(t){let e,n,r,i,o,a,l,c,d,p="".concat(t[5],"%");return{c(){e=z("span"),n=z("img"),J(n,"class",r=Wn.image__image),u(n.src,i=t[4]===Qn?Zn:t[7])||J(n,"src",i),J(n,"loading","lazy"),J(n,"decoding","async"),J(n,"style",o=Ut(t[9])),J(n,"alt",t[16]),J(n,"aria-hidden",a=t[16]?null:"true"),J(e,"class",l=Wn["image__aspect-wrapper"]),U(e,"padding-bottom",p)},m(r,i){S(r,e,i),V(e,n),c||(d=[O(n,"load",t[26]),O(n,"error",t[27])],c=!0)},p(t,r){144&r[0]&&!u(n.src,i=t[4]===Qn?Zn:t[7])&&J(n,"src",i),512&r[0]&&o!==(o=Ut(t[9]))&&J(n,"style",o),65536&r[0]&&J(n,"alt",t[16]),65536&r[0]&&a!==(a=t[16]?null:"true")&&J(n,"aria-hidden",a),32&r[0]&&p!==(p="".concat(t[5],"%"))&&U(e,"padding-bottom",p)},d(t){t&&D(e),c=!1,s(d)}}}function Kn(t){let e;function n(t,e){return t[10].aspect?Gn:qn}let r=n(t),i=r(t);return{c(){i.c(),e=I()},m(t,n){i.m(t,n),S(t,e,n)},p(t,o){r===(r=n(t))&&i?i.p(t,o):(i.d(1),i=r(t),i&&(i.c(),i.m(e.parentNode,e)))},d(t){i.d(t),t&&D(e)}}}function Xn(t){let e,n=t[6],r=Kn(t);return{c(){r.c(),e=I()},m(t,n){r.m(t,n),S(t,e,n)},p(t,i){64&i[0]&&d(n,n=t[6])?(r.d(1),r=Kn(t),r.c(),r.m(e.parentNode,e)):r.p(t,i)},d(t){t&&D(e),r.d(t)}}}function Yn(t){let e,n,r=!t[8]&&Hn(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),S(t,e,i),n=!0},p(t,n){t[8]?r&&(_t(),xt(r,1,1,(()=>{r=null})),bt()):r?(r.p(t,n),256&n[0]&&wt(r,1)):(r=Hn(t),r.c(),wt(r,1),r.m(e.parentNode,e))},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}const Zn="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Qn=2;function tr(t,e,r){let i,o,a,s,l,c,u,d,p,h,g,m,v,y,$,_,b,w,x,k,E,C,A,V,j,P,S,D,F,z,N,M,T,I,O=n,J=n,B=n,R=n,U=n,L=n,W=n,H=n,q=n,G=n,K=n,X=n,Y=n,Z=n;t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>X())),t.$$.on_destroy.push((()=>Y())),t.$$.on_destroy.push((()=>Z()));let{json:tt={}}=e,{templateContext:nt}=e,{origJson:rt}=e,{layoutParams:it}=e;const ot=et(Ot);let at=0,st="rgba(0,0,0,0.08)",lt=!1,ct="",ut="none",dt="50% 50%";let pt,ft="0",ht="source_in",gt="",mt="",vt=0,yt=0,$t=0,_t="",bt="";return Q((()=>{ot.removeSvgFilter(pt,ht)})),t.$$set=t=>{"json"in t&&r(0,tt=t.json),"templateContext"in t&&r(1,nt=t.templateContext),"origJson"in t&&r(2,rt=t.origJson),"layoutParams"in t&&r(3,it=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(25,i=ot.getDerivedFromVars(tt.image_url)),Z(),Z=f(i,(t=>r(55,I=t)))),1&t.$$.dirty[0]&&(r(24,o=ot.getDerivedFromVars(tt.gif_url)),Y(),Y=f(o,(t=>r(54,T=t)))),25165824&t.$$.dirty[1]&&r(7,a=I||T),128&t.$$.dirty[0]&&r(4,at=0),128&t.$$.dirty[0]&&(a?r(8,lt=!1):(r(8,lt=!0),ot.logError(Jt(new Error('Missing "image_url" for "image"'))))),1&t.$$.dirty[0]&&(r(23,s=ot.getDerivedFromVars(tt.width)),X(),X=f(s,(t=>r(53,M=t)))),4194304&t.$$.dirty[1]&&r(41,l="wrap_content"===(null==M?void 0:M.type)),1&t.$$.dirty[0]&&(r(22,c=ot.getDerivedFromVars(tt.height)),K(),K=f(c,(t=>r(52,N=t)))),2097152&t.$$.dirty[1]&&r(40,u="wrap_content"===(null==N?void 0:N.type)),1&t.$$.dirty[0]&&(r(21,d=ot.getDerivedFromVars(tt.preview)),G(),G=f(d,(t=>r(51,z=t)))),16&t.$$.dirty[0]|1048576&t.$$.dirty[1]){const t=z;0!==at&&at!==Qn||!t?r(29,ct=""):t.startsWith("data:")?r(29,ct='url("'.concat(Kt(t),'")')):r(29,ct='url("data:image/jpg;base64,'.concat(Kt(t),'")'))}if(1&t.$$.dirty[0]&&(r(20,p=ot.getDerivedFromVars(tt.placeholder_color)),q(),q=f(p,(t=>r(50,F=t)))),16&t.$$.dirty[0]|524288&t.$$.dirty[1]&&function(t,e){r(28,st=0===t||t===Qn?qt(e,1,st):"")}(at,F),1&t.$$.dirty[0]&&(r(19,h=ot.getDerivedFromVars(tt.scale)),H(),H=f(h,(t=>r(49,D=t)))),1073741824&t.$$.dirty[0]|262144&t.$$.dirty[1]&&r(30,ut=te(D)||ut),1&t.$$.dirty[0]&&(r(18,g=ot.getDerivedFromVars({content_alignment_horizontal:tt.content_alignment_horizontal,content_alignment_vertical:tt.content_alignment_vertical})),W(),W=f(g,(t=>r(48,S=t)))),131072&t.$$.dirty[1]&&r(31,dt=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:ee(t)}(S,dt)),1&t.$$.dirty[0]&&(r(17,m=ot.getDerivedFromVars(tt.accessibility)),L(),L=f(m,(t=>r(47,P=t)))),65536&t.$$.dirty[1]&&r(16,v=(null==P?void 0:P.description)||""),1&t.$$.dirty[0]&&(r(15,y=ot.getDerivedFromVars(tt.aspect)),U(),U=f(y,(t=>r(46,j=t)))),32768&t.$$.dirty[1]){const t=null==j?void 0:j.ratio;t&&je(t)?r(5,ft=(100/Number(t)).toFixed(2)):r(5,ft="0")}if(1&t.$$.dirty[0]&&(r(14,$=ot.getDerivedFromVars(tt.tint_color)),R(),R=f($,(t=>r(45,V=t)))),1&t.$$.dirty[0]&&(r(13,_=ot.getDerivedFromVars(tt.tint_mode)),B(),B=f(_,(t=>r(44,A=t)))),24582&t.$$.dirty[1]){const t=V?qt(V):void 0,e=rn(A,ht);t===pt&&e===ht||(ot.removeSvgFilter(pt,ht),r(6,gt=t?ot.addSvgFilter(t,e):""),r(32,pt=t),r(33,ht=e))}if(1&t.$$.dirty[0]&&(r(12,b=ot.getDerivedFromVars(tt.appearance_animation)),J(),J=f(b,(t=>r(43,C=t)))),4096&t.$$.dirty[1]&&C&&"fade"===C.type){const t=C;r(34,mt=ge(t.interpolator,"ease_in_out").replace(/_/g,"-")),r(37,$t=de(t.duration,300)),r(36,yt=de(t.start_delay,0)),r(35,vt=de(t.alpha,0))}if(1&t.$$.dirty[0]&&(r(11,w=ot.getDerivedFromVars(tt.filters)),O(),O=f(w,(t=>r(42,E=t)))),2048&t.$$.dirty[1]){let t="",e="";Array.isArray(E)&&E.length&&(t=Pe(E,ot.logError)),t&&(e="polygon(0% 0%, 0% 100%, 100% 100%, 100% 0%)"),r(38,_t=t),r(39,bt=e)}48&t.$$.dirty[0]|1544&t.$$.dirty[1]&&r(10,x={aspect:"0"!==ft,"is-width-content":l,"is-height-content":u,loaded:1===at,"before-appearance":Boolean(mt)&&0===at}),1879048272&t.$$.dirty[0]|505&t.$$.dirty[1]&&r(9,k={"background-image":ct,"background-color":ct?void 0:st,"background-size":ut,"clip-path":bt||void 0,"object-fit":ut,"object-position":dt,filter:[1===at&>?"url(#".concat(gt,")"):"",_t].filter(Boolean).join(" "),"--divkit-appearance-interpolator":mt||void 0,"--divkit-appearance-fade-start":mt?vt:void 0,"--divkit-appearance-delay":mt?"".concat(yt,"ms"):void 0,"--divkit-appearance-duration":mt?"".concat($t,"ms"):void 0})},[tt,nt,rt,it,at,ft,gt,a,lt,k,x,w,b,_,$,y,v,m,g,h,p,d,c,s,o,i,function(){0===at&&r(4,at=1)},function(){0===at&&r(4,at=Qn)},st,ct,ut,dt,pt,ht,mt,vt,yt,$t,_t,bt,u,l,E,C,A,V,j,P,S,D,F,z,N,M,T,I]}const er=class extends zt{constructor(t){super(),Ft(this,t,tr,Yn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},nr={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 rr(t){return t>0&&t<1}function ir(t){return String(Math.ceil(1e3*t)/1e3)}function or(t,e,n){if(t.some(rr)){const e=Math.max(...t.filter(rr).map((t=>1/t)));t=t.map((t=>t*e))}let r=0,i=0;const o=[];if(t.every(Boolean)){i=t.reduce(((t,e)=>t+e),0);for(let o=0;o<n;++o){if(!e[o])continue;const n=e[o]/t[o]*i;n>r&&(r=n)}}for(let e=0;e<n;++e)r?o[e]="minmax(".concat(Lt(r*t[e]/i),",").concat(ir(t[e]),"fr)"):t[e]?o[e]="".concat(ir(t[e]),"fr"):o[e]="auto";return o.join(" ")}function ar(t,e,n){const r=t.slice();return r[29]=e[n],r}function sr(t){let e,n;return e=new We({props:{cls:oe("grid",nr,t[8]),json:t[0],origJson:t[2],templateContext:t[1],style:t[7],layoutParams:t[3],$$slots:{default:[cr]},$$scope:{ctx:t}}}),{c(){Pt(e.$$.fragment)},m(t,r){St(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=oe("grid",nr,t[8])),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),128&n[0]&&(r.style=t[7]),8&n[0]&&(r.layoutParams=t[3]),32&n[0]|2&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function lr(t){let e,n;return e=new zo({props:{layoutParams:t[29].layoutParams,div:t[29].json,templateContext:t[29].templateContext,origJson:t[29].origJson}}),{c(){Pt(e.$$.fragment)},m(t,r){St(e,t,r),n=!0},p(t,n){const r={};32&n[0]&&(r.layoutParams=t[29].layoutParams),32&n[0]&&(r.div=t[29].json),32&n[0]&&(r.templateContext=t[29].templateContext),32&n[0]&&(r.origJson=t[29].origJson),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function cr(t){let e,n,r=t[5],i=[];for(let e=0;e<r.length;e+=1)i[e]=lr(ar(t,r,e));const o=t=>xt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=I()},m(t,r){for(let e=0;e<i.length;e+=1)i[e]&&i[e].m(t,r);S(t,e,r),n=!0},p(t,n){if(32&n[0]){let a;for(r=t[5],a=0;a<r.length;a+=1){const o=ar(t,r,a);i[a]?(i[a].p(o,n),wt(i[a],1)):(i[a]=lr(o),i[a].c(),wt(i[a],1),i[a].m(e.parentNode,e))}for(_t(),a=r.length;a<i.length;a+=1)o(a);bt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)wt(i[t]);n=!0}},o(t){i=i.filter(Boolean);for(let t=0;t<i.length;t+=1)xt(i[t]);n=!1},d(t){F(i,t),t&&D(e)}}}function ur(t){let e,n,r=!t[6]&&sr(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),S(t,e,i),n=!0},p(t,n){t[6]?r&&(_t(),xt(r,1,1,(()=>{r=null})),bt()):r?(r.p(t,n),64&n[0]&&wt(r,1)):(r=sr(t),r.c(),wt(r,1),r.m(e.parentNode,e))},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function dr(t,e,r){let i,o,a,s,l,c,u,d,p,h,g,m,v=n,y=n,$=n,_=n;t.$$.on_destroy.push((()=>v())),t.$$.on_destroy.push((()=>y())),t.$$.on_destroy.push((()=>$())),t.$$.on_destroy.push((()=>_()));let{json:b={}}=e,{templateContext:w}=e,{origJson:x}=e,{layoutParams:k}=e;const E=et(Ot);let C,A,V=!1,j=1,P=[],S=[],D=[],F=[],z=0,N=!1,M="top",T="left";return t.$$set=t=>{"json"in t&&r(0,b=t.json),"templateContext"in t&&r(1,w=t.templateContext),"origJson"in t&&r(2,x=t.origJson),"layoutParams"in t&&r(3,k=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(23,i=b.items),8388608&t.$$.dirty[0]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(12,V=!1):(r(12,V=!0),E.logError(Jt(new Error('Incorrect or empty "items" prop for div "grid"'))))),1&t.$$.dirty[0]&&(r(11,o=E.getDerivedFromVars(b.column_count)),_(),_=f(o,(t=>r(27,m=t)))),134225920&t.$$.dirty[0]&&r(13,j=qe(m,j)),8392706&t.$$.dirty[0]&&r(22,a=(!V&&i||[]).map((t=>{let e=t,n=w;return({templateContext:n,json:e}=E.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),4194304&t.$$.dirty[0]){let t=[];a.forEach((e=>{t.push(E.getDerivedFromVars({rowSpan:e.json.row_span,columnSpan:e.json.column_span,width:e.json.width,height:e.json.height}))})),r(4,C=Tt(t,(t=>[...t]))),$(),$=f(C,(t=>r(26,g=t)))}if(72081416&t.$$.dirty[0]){const t={};let e=0,n=0;r(14,P=[]),r(15,S=[]),r(16,D=[]),r(17,F=[]),r(19,N=!1),r(5,A=a.map(((i,o)=>{var a,s,l,c;const u=g[o],d=Number(u.columnSpan)||1,p=Number(u.rowSpan)||1,f={x:e,y:n,colSpan:d,rowSpan:p},h="match_parent"===(null===(a=u.width)||void 0===a?void 0:a.type)?Number(u.width.weight||1)/d:0,m="match_parent"===(null===(s=u.height)||void 0===s?void 0:s.type)?Number(u.height.weight||1)/p:0,v=1===d&&"fixed"===(null===(l=u.width)||void 0===l?void 0:l.type)&&u.width.value?Number(u.width.value)/d:0,y=1===p&&"fixed"===(null===(c=u.height)||void 0===c?void 0:c.type)&&u.height.value?Number(u.height.value)/p:0;for(let i=e;i<e+d;++i)for(let e=n;e<n+p;++e)t[i+"_"+e]?r(19,N=!0):(t[i+"_"+e]=!0,(!P[i]||P[i]<h)&&r(14,P[i]=h,P),(!S[e]||S[e]<m)&&r(15,S[e]=m,S),(!D[i]||D[i]<v)&&r(16,D[i]=v,D),(!F[e]||F[e]<y)&&r(17,F[e]=y,F));do{++e,e>=j&&(e=0,++n)}while(t[e+"_"+n]);return Object.assign(Object.assign({},i),{layoutParams:{gridArea:f,fakeElement:(null==k?void 0:k.fakeElement)||!1}})}))),0!==e&&r(19,N=!0),N&&E.logError(Jt(new Error('Mismatching "grid" rows/columns'))),r(18,z=n)}1&t.$$.dirty[0]&&(r(10,s=E.getDerivedFromVars(b.content_alignment_vertical)),y(),y=f(s,(t=>r(25,h=t)))),34603008&t.$$.dirty[0]&&r(20,M=nn(h,M)),1&t.$$.dirty[0]&&(r(9,l=E.getDerivedFromVars(b.content_alignment_horizontal)),v(),v=f(l,(t=>r(24,p=t)))),18874368&t.$$.dirty[0]&&r(21,T=en(p,T)),3145728&t.$$.dirty[0]&&r(8,c={valign:M,halign:T}),516096&t.$$.dirty[0]&&r(7,u={"grid-template-columns":or(P,D,j),"grid-template-rows":or(S,F,z)}),528384&t.$$.dirty[0]&&r(6,d=V||N)},[b,w,x,k,C,A,d,u,c,l,s,o,V,j,P,S,D,F,z,N,M,T,a,i,p,h,g,m]}const pr={gallery:"divkit-cbb0f",gallery_orientation_horizontal:"divkit-c9be7",gallery_orientation_vertical:"divkit-a72d5",gallery__scroller:"divkit-a4e39","gallery_scroll-snap":"divkit-f606e","gallery__items-grid":"divkit-eb4a5",gallery__items:"divkit-af276",gallery__arrow:"divkit-b72d7","gallery__arrow-icon":"divkit-d100d",gallery__arrow_left:"divkit-a0a5d",gallery__arrow_right:"divkit-f0f59","gallery__arrow-icon-path":"divkit-b4173"};function fr(t){const e=[];let n=t[0],r=1;for(let i=1;i<=t.length;i++)t[i]!==n?(e.push(r>1?"repeat(".concat(r,", ").concat(n,")"):n),n=t[i],r=1):r++;return e.join(" ")}function hr(t,e){let n;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];null!==n&&clearTimeout(n),n=setTimeout((()=>{t.apply(this,i),n=null}),e)}}const{Boolean:gr}=Ct;function mr(t,e,n){const r=t.slice();return r[72]=e[n],r[73]=e,r[74]=n,r}function vr(t,e,n){const r=t.slice();return r[75]=e[n],r}function yr(t){let e,n;return e=new We({props:{cls:oe("gallery",pr,t[16]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,customActions:"gallery",$$slots:{default:[kr]},$$scope:{ctx:t}}}),{c(){Pt(e.$$.fragment)},m(t,r){St(e,t,r),n=!0},p(t,n){const r={};65536&n[0]&&(r.cls=oe("gallery",pr,t[16])),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),335953872&n[0]|65536&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function $r(t){let e,n;return e=new zo({props:{layoutParams:t[8],div:t[75].json,templateContext:t[75].templateContext,origJson:t[75].origJson}}),{c(){Pt(e.$$.fragment)},m(t,r){St(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.layoutParams=t[8]),67108864&n[0]&&(r.div=t[75].json),67108864&n[0]&&(r.templateContext=t[75].templateContext),67108864&n[0]&&(r.origJson=t[75].origJson),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function _r(t){let e,n,r,i,o,a=t[74],s=t[72],l=[];for(let e=0;e<s.length;e+=1)l[e]=$r(vr(t,s,e));const c=t=>xt(l[t],1,1,(()=>{l[t]=null})),u=()=>t[60](e,a),d=()=>t[60](null,a);return{c(){e=z("div");for(let t=0;t<l.length;t+=1)l[t].c();n=T(),J(e,"class",r=pr.gallery__items),J(e,"style",i=Ut(t[17]))},m(t,r){S(t,e,r);for(let t=0;t<l.length;t+=1)l[t]&&l[t].m(e,null);V(e,n),u(),o=!0},p(r,p){if(t=r,67109120&p[0]){let r;for(s=t[72],r=0;r<s.length;r+=1){const i=vr(t,s,r);l[r]?(l[r].p(i,p),wt(l[r],1)):(l[r]=$r(i),l[r].c(),wt(l[r],1),l[r].m(e,n))}for(_t(),r=s.length;r<l.length;r+=1)c(r);bt()}(!o||131072&p[0]&&i!==(i=Ut(t[17])))&&J(e,"style",i),a!==t[74]&&(d(),a=t[74],u())},i(t){if(!o){for(let t=0;t<s.length;t+=1)wt(l[t]);o=!0}},o(t){l=l.filter(gr);for(let t=0;t<l.length;t+=1)xt(l[t]);o=!1},d(t){t&&D(e),F(l,t),d()}}}function br(t){let e,n,r=t[12]&&t[9]&&wr(t),i=t[13]&&t[9]&&xr(t);return{c(){r&&r.c(),e=T(),i&&i.c(),n=I()},m(t,o){r&&r.m(t,o),S(t,e,o),i&&i.m(t,o),S(t,n,o)},p(t,o){t[12]&&t[9]?r?r.p(t,o):(r=wr(t),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),t[13]&&t[9]?i?i.p(t,o):(i=xr(t),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},d(t){r&&r.d(t),t&&D(e),i&&i.d(t),t&&D(n)}}}function wr(t){let e,r,i,o,a=!t[29]&&function(t){let e,r,i,o;return{c(){e=N("svg"),r=N("path"),J(r,"class",i=pr["gallery__arrow-icon-path"]),J(r,"d","m10 16 8.3 8 1.03-1-4-6-.7-1 .7-1 4-6-1.03-1z"),J(e,"class",o=pr["gallery__arrow-icon"]),J(e,"xmlns","http://www.w3.org/2000/svg"),J(e,"width","32"),J(e,"height","32"),J(e,"viewBox","0 0 32 32"),J(e,"fill","none")},m(t,n){S(t,e,n),V(e,r)},p:n,d(t){t&&D(e)}}}();return{c(){e=z("div"),a&&a.c(),J(e,"class",r=t[29]||"".concat(pr.gallery__arrow," ").concat(pr.gallery__arrow_left))},m(n,r){S(n,e,r),a&&a.m(e,null),i||(o=O(e,"click",t[63]),i=!0)},p(t,e){t[29]||a.p(t,e)},d(t){t&&D(e),a&&a.d(),i=!1,o()}}}function xr(t){let e,r,i,o,a=!t[30]&&function(t){let e,r,i,o;return{c(){e=N("svg"),r=N("path"),J(r,"class",i=pr["gallery__arrow-icon-path"]),J(r,"d","M22 16l-8.3 8-1.03-1 4-6 .7-1-.7-1-4-6 1.03-1 8.3 8z"),J(e,"class",o=pr["gallery__arrow-icon"]),J(e,"xmlns","http://www.w3.org/2000/svg"),J(e,"width","32"),J(e,"height","32"),J(e,"viewBox","0 0 32 32"),J(e,"fill","none")},m(t,n){S(t,e,n),V(e,r)},p:n,d(t){t&&D(e)}}}();return{c(){e=z("div"),a&&a.c(),J(e,"class",r=t[30]||"".concat(pr.gallery__arrow," ").concat(pr.gallery__arrow_right))},m(n,r){S(n,e,r),a&&a.m(e,null),i||(o=O(e,"click",t[64]),i=!0)},p(t,e){t[30]||a.p(t,e)},d(t){t&&D(e),a&&a.d(),i=!1,o()}}}function kr(t){let e,n,r,i,o,a,s,c,u,d,p,f=t[26],h=[];for(let e=0;e<f.length;e+=1)h[e]=_r(mr(t,f,e));const g=t=>xt(h[t],1,1,(()=>{h[t]=null}));let m="horizontal"===t[6]&&br(t);return{c(){e=z("div"),n=z("div");for(let t=0;t<h.length;t+=1)h[t].c();s=T(),m&&m.c(),c=I(),J(n,"class",r=pr["gallery__items-grid"]),J(n,"style",i=Ut(t[18])),J(e,"class",o=pr.gallery__scroller+" "+(t[28]?It["root_restrict-scroll"]:"")),J(e,"style",a=Ut(t[7]))},m(r,i){S(r,e,i),V(e,n);for(let t=0;t<h.length;t+=1)h[t]&&h[t].m(n,null);t[61](n),t[62](e),S(r,s,i),m&&m.m(r,i),S(r,c,i),u=!0,d||(p=O(e,"scroll",(function(){l(t[9]?t[32]:null)&&(t[9]?t[32]:null).apply(this,arguments)})),d=!0)},p(r,s){if(t=r,67242240&s[0]){let e;for(f=t[26],e=0;e<f.length;e+=1){const r=mr(t,f,e);h[e]?(h[e].p(r,s),wt(h[e],1)):(h[e]=_r(r),h[e].c(),wt(h[e],1),h[e].m(n,null))}for(_t(),e=f.length;e<h.length;e+=1)g(e);bt()}(!u||262144&s[0]&&i!==(i=Ut(t[18])))&&J(n,"style",i),(!u||268435456&s[0]&&o!==(o=pr.gallery__scroller+" "+(t[28]?It["root_restrict-scroll"]:"")))&&J(e,"class",o),(!u||128&s[0]&&a!==(a=Ut(t[7])))&&J(e,"style",a),"horizontal"===t[6]?m?m.p(t,s):(m=br(t),m.c(),m.m(c.parentNode,c)):m&&(m.d(1),m=null)},i(t){if(!u){for(let t=0;t<f.length;t+=1)wt(h[t]);u=!0}},o(t){h=h.filter(gr);for(let t=0;t<h.length;t+=1)xt(h[t]);u=!1},d(n){n&&D(e),F(h,n),t[61](null),t[62](null),n&&D(s),m&&m.d(n),n&&D(c),d=!1,p()}}}function Er(t){let e,n,r,i,o=!t[5]&&yr(t);return{c(){o&&o.c(),e=I()},m(a,s){o&&o.m(a,s),S(a,e,s),n=!0,r||(i=O(window,"resize",(function(){l(t[9]?t[33]:null)&&(t[9]?t[33]:null).apply(this,arguments)})),r=!0)},p(n,r){(t=n)[5]?o&&(_t(),xt(o,1,1,(()=>{o=null})),bt()):o?(o.p(t,r),32&r[0]&&wt(o,1)):(o=yr(t),o.c(),wt(o,1),o.m(e.parentNode,e))},i(t){n||(wt(o),n=!0)},o(t){xt(o),n=!1},d(t){o&&o.d(t),t&&D(e),r=!1,i()}}}function Cr(t,e,r){let i,o,a,s,l,c,u,d,p,g,m,v,y,$,_,b,w,x,k,E,C,A,V,j,P,S,D,F,z=n,N=n,M=n,T=n,I=n,O=n,J=n,B=n,R=n,U=n;t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>M())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>U()));let{json:L={}}=e,{templateContext:W}=e,{origJson:H}=e,{layoutParams:q}=e;const G=et(Ot);let K,X,Y=[],tt=!1,nt=!1,rt=null,ot=!1;const at=G.getCustomization("galleryLeftClass"),st=G.getCustomization("galleryRightClass");let lt=!1;const ct=G.isDesktop;h(t,ct,(t=>r(59,D=t)));let ut,dt,pt,ft,ht=1,gt="horizontal",mt="start",vt=8,yt="",$t=[],_t={},bt=!1,wt={},xt=0;function kt(){if(!K)return;const t=K.scrollLeft,e=K.scrollWidth,n=K.offsetWidth;r(12,tt=t>2),r(13,nt=t+n<e-2)}const Et=hr(kt,50);function Ct(t){K.scroll({left:K.scrollLeft+.75*K.offsetWidth*("right"===t?1:-1),behavior:"smooth"})}function At(){let t=[],e=Y[0].children.length;for(let n=0;n<e;++n)for(let e=0;e<ht;++e){const r=Y[e].children[n];r&&t.push(r)}return t}function Vt(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"smooth";const r="horizontal"===gt,i=r?"offsetLeft":"offsetTop",o=r?"left":"top";K.scroll({[o]:Math.max(0,t[e][i]-vt/2),behavior:n})}function jt(t){const e=At(),n=K.getBoundingClientRect(),r=e.findIndex((t=>function(t,e){return"horizontal"===gt?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 i=e.map((t=>function(t,e){return"horizontal"===gt?e.right>t.left&&t.right>e.left:e.bottom>t.top&&t.bottom>e.top}(n,t.getBoundingClientRect()))),o=i.findIndex(Boolean);return-1!==o?"prev"===t&&2===i.filter(Boolean).length?o+1:o:"prev"===t?1:e.length-2}return!L.id||lt||(null==q?void 0:q.fakeElement)||G.registerInstance(L.id,{setCurrentItem(t){const e=At();if(t<0||t>e.length-1)throw new Error('Item is out of range in "set-current-item" action');Vt(e,t)},setPreviousItem(t){const e=jt("prev"),n=At();let r=e-1;r<0&&(r="ring"===t?n.length-1:e),Vt(n,r)},setNextItem(t){const e="horizontal"===gt?K.scrollLeft+K.offsetWidth===K.scrollWidth:K.scrollTop+K.offsetHeight===K.scrollHeight,n=At();if(e&&"ring"===t)return void Vt(n,0);const r=jt("next");let i=r+1;i>n.length-1&&(i="ring"===t?0:r),Vt(n,i)}}),Z((()=>{r(36,ot=!0),!lt&&(kt(),xt)&&Vt(At(),xt,"auto")})),Q((()=>{r(36,ot=!1),L.id&&!(null==q?void 0:q.fakeElement)&&G.unregisterInstance(L.id)})),t.$$set=t=>{"json"in t&&r(0,L=t.json),"templateContext"in t&&r(1,W=t.templateContext),"origJson"in t&&r(2,H=t.origJson),"layoutParams"in t&&r(3,q=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(49,i=L.items),262144&t.$$.dirty[1]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(5,lt=!1):(r(5,lt=!0),G.logError(Jt(new Error('Incorrect or empty "items" prop for div "gallery"'))))),34&t.$$.dirty[0]|262144&t.$$.dirty[1]&&r(48,o=(!lt&&i||[]).map((t=>{let e=t,n=W;return({templateContext:n,json:e}=G.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),32&t.$$.dirty[0]|268435488&t.$$.dirty[1]&&r(9,a=D&&ot&&!lt),528&t.$$.dirty[0]|16&t.$$.dirty[1]&&(a?"undefined"!=typeof ResizeObserver&&(r(35,rt=new ResizeObserver((()=>{Et()}))),rt.observe(X)):rt&&(rt.disconnect(),r(35,rt=null))),1&t.$$.dirty[0]&&(r(27,s=G.getDerivedFromVars(L.column_count)),R(),R=f(s,(t=>r(58,S=t)))),134217792&t.$$.dirty[1]&&r(37,ht=qe(S,ht)),131136&t.$$.dirty[1]&&r(26,l=function(t,e){let n=0,r=[];for(let i=0;i<t.length;++i)r[n]||(r[n]=[]),r[n].push(t[i]),++n>=e&&(n=0);return r}(o,ht)),1&t.$$.dirty[0]&&(r(25,c=G.getDerivedFromVars(L.orientation)),B(),B=f(c,(t=>r(57,P=t)))),64&t.$$.dirty[0]|67108864&t.$$.dirty[1]&&r(6,gt=Jn(P,gt)),1&t.$$.dirty[0]&&(r(24,u=G.getDerivedFromVars(L.cross_content_alignment)),J(),J=f(u,(t=>r(56,j=t)))),33554560&t.$$.dirty[1]&&r(38,mt=function(t,e){return"start"===t||"center"===t||"end"===t?t:e}(j,mt)),1&t.$$.dirty[0]&&(r(23,d=G.getDerivedFromVars(L.item_spacing)),O(),O=f(d,(t=>r(55,V=t)))),16777728&t.$$.dirty[1]&&(r(40,vt=de(V,vt)),r(39,ut=Lt(vt))),1&t.$$.dirty[0]&&(r(22,p=G.getDerivedFromVars(L.cross_spacing)),I(),I=f(p,(t=>r(54,A=t)))),8391168&t.$$.dirty[1]&&(r(42,pt=de(A,vt)),r(41,dt=Lt(pt))),1&t.$$.dirty[0]&&(r(21,g=G.getDerivedFromVars(L.paddings)),T(),T=f(g,(t=>r(53,C=t)))),4198400&t.$$.dirty[1]&&r(43,yt=ue(C,yt)),64&t.$$.dirty[0]&&r(47,m="horizontal"===gt?"grid-template-columns":"grid-template-rows"),64&t.$$.dirty[0]|131072&t.$$.dirty[1]){let t=[];o.forEach((e=>{const n="horizontal"===gt?"width":"height";t.push(G.getDerivedFromVars(e.json[n]))})),r(14,ft=Tt(t,(t=>t))),M(),M=f(ft,(t=>r(52,E=t)))}if(64&t.$$.dirty[0]|2105408&t.$$.dirty[1]&&(r(44,$t=[]),ht>1?$t.push("auto"):E.forEach((t=>{!t&&"horizontal"===gt||"match_parent"===(null==t?void 0:t.type)?$t.push("100%"):$t.push("max-content")}))),1&t.$$.dirty[0]&&(r(20,v=G.getDerivedFromVars(L.scroll_mode)),N(),N=f(v,(t=>r(51,k=t)))),456&t.$$.dirty[0]|1049280&t.$$.dirty[1]){const t={};let e={};r(45,bt=!1),(null==q?void 0:q.fakeElement)&&(e.fakeElement=!0),"horizontal"===gt?e.parentVAlign=mt:e.parentHAlign=mt,"paging"===k&&(r(45,bt=!0),e.scrollSnap="start",t["horizontal"===gt?"scroll-padding-left":"scroll-padding-top"]=Lt(vt/2)),1===ht&&(e.parentLayoutOrientation=gt),r(7,_t=he(t,_t)),r(8,wt=he(e,wt))}1&t.$$.dirty[0]&&(r(19,y=G.getDerivedFromVars(L.restrict_parent_scroll)),U(),U=f(y,(t=>r(28,F=t)))),5120&t.$$.dirty[1]&&r(18,$={padding:yt,"grid-gap":dt}),73984&t.$$.dirty[1]&&r(17,_={"grid-gap":ut,[m]:fr($t)}),64&t.$$.dirty[0]|16384&t.$$.dirty[1]&&r(16,b={orientation:gt,"scroll-snap":bt}),1&t.$$.dirty[0]&&(r(15,w=G.getDerivedFromVars(L.default_item)),z(),z=f(w,(t=>r(50,x=t)))),557056&t.$$.dirty[1]&&r(46,xt=de(x,xt))},[L,W,H,q,X,lt,gt,_t,wt,a,K,Y,tt,nt,ft,w,b,_,$,y,v,g,p,d,u,c,l,s,F,at,st,ct,kt,Et,Ct,rt,ot,ht,mt,ut,vt,dt,pt,yt,$t,bt,xt,m,o,i,x,k,E,C,A,V,j,P,S,D,function(t,e){it[t?"unshift":"push"]((()=>{Y[e]=t,r(11,Y)}))},function(t){it[t?"unshift":"push"]((()=>{X=t,r(4,X)}))},function(t){it[t?"unshift":"push"]((()=>{K=t,r(10,K)}))},()=>Ct("left"),()=>Ct("right")]}const Ar={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"},Vr=37,jr=39,Pr=36,Sr=35,{Boolean:Dr}=Ct;function Fr(t,e,n){const r=t.slice();return r[83]=e[n],r[85]=n,r}function zr(t,e,n){const r=t.slice();r[83]=e[n],r[85]=n;const i=r[85]===r[6];return r[86]=i,r}function Nr(t){let e,n;return e=new We({props:{cls:oe("tabs",Ar,t[42]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customActions:"tabs",$$slots:{default:[Br]},$$scope:{ctx:t}}}),{c(){Pt(e.$$.fragment)},m(t,r){St(e,t,r),n=!0},p(t,n){const r={};1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),536870890&n[0]|517&n[1]|67108864&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function Mr(t){let e,n,r=t[83].title+"";return{c(){e=M(r),n=T()},m(t,r){S(t,e,r),S(t,n,r)},p(t,n){262144&n[0]&&r!==(r=t[83].title+"")&&R(e,r)},d(t){t&&D(e),t&&D(n)}}}function Tr(t){var e,n,r;let i,o;function a(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t[59](t[85],...n)}return i=new Ae({props:{cls:oe("tabs__item",Ar,{selected:t[86],actionable:Boolean(t[83].title_click_action)}),actions:!t[83].title_click_action||null!==(e=t[3])&&void 0!==e&&e.fakeElement?[]:[t[83].title_click_action],attrs:{id:"".concat(t[41],"-tab-").concat(t[85]),"aria-controls":"".concat(t[41],"-panel-").concat(t[85]),role:"tab",tabindex:!t[86]||null!==(n=t[3])&&void 0!==n&&n.fakeElement?"-1":t[83].title_click_action?void 0:"0","aria-selected":t[86]?"true":"false"},customAction:null!==(r=t[3])&&void 0!==r&&r.fakeElement?null:a,$$slots:{default:[Mr]},$$scope:{ctx:t}}}),{c(){Pt(i.$$.fragment)},m(t,e){St(i,t,e),o=!0},p(e,n){var r,o,s;t=e;const l={};262208&n[0]&&(l.cls=oe("tabs__item",Ar,{selected:t[86],actionable:Boolean(t[83].title_click_action)})),262152&n[0]&&(l.actions=!t[83].title_click_action||null!==(r=t[3])&&void 0!==r&&r.fakeElement?[]:[t[83].title_click_action]),262216&n[0]&&(l.attrs={id:"".concat(t[41],"-tab-").concat(t[85]),"aria-controls":"".concat(t[41],"-panel-").concat(t[85]),role:"tab",tabindex:!t[86]||null!==(o=t[3])&&void 0!==o&&o.fakeElement?"-1":t[83].title_click_action?void 0:"0","aria-selected":t[86]?"true":"false"}),8&n[0]&&(l.customAction=null!==(s=t[3])&&void 0!==s&&s.fakeElement?null:a),262144&n[0]|67108864&n[2]&&(l.$$scope={dirty:n,ctx:t}),i.$set(l)},i(t){o||(wt(i.$$.fragment,t),o=!0)},o(t){xt(i.$$.fragment,t),o=!1},d(t){Dt(i,t)}}}function Ir(t){let e,n,r;return{c(){e=z("div"),J(e,"class",n=Ar.tabs__separator),J(e,"style",r=Ut(t[33]))},m(t,n){S(t,e,n)},p(t,n){4&n[1]&&r!==(r=Ut(t[33]))&&J(e,"style",r)},d(t){t&&D(e)}}}function Or(t){let e,n;return e=new zo({props:{div:t[83].div,templateContext:t[1],layoutParams:t[5]}}),{c(){Pt(e.$$.fragment)},m(t,r){St(e,t,r),n=!0},p(t,n){const r={};262144&n[0]&&(r.div=t[83].div),2&n[0]&&(r.templateContext=t[1]),32&n[0]&&(r.layoutParams=t[5]),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function Jr(t){let e,n,r,i,o,a,s=t[27][t[85]]&&Or(t);return{c(){e=z("div"),s&&s.c(),n=T(),J(e,"class",r=oe("tabs__panel",Ar,{visible:t[28][t[85]]})),J(e,"role","tabpanel"),J(e,"id",i=t[41]+"-panel-"+t[85]),J(e,"aria-labelledby",o=t[41]+"-tab-"+t[85]),U(e,"left",100*t[85]+"%")},m(t,r){S(t,e,r),s&&s.m(e,null),V(e,n),a=!0},p(t,i){t[27][t[85]]?s?(s.p(t,i),134217728&i[0]&&wt(s,1)):(s=Or(t),s.c(),wt(s,1),s.m(e,n)):s&&(_t(),xt(s,1,1,(()=>{s=null})),bt()),(!a||268435456&i[0]&&r!==(r=oe("tabs__panel",Ar,{visible:t[28][t[85]]})))&&J(e,"class",r)},i(t){a||(wt(s),a=!0)},o(t){xt(s),a=!1},d(t){t&&D(e),s&&s.d()}}}function Br(t){let e,n,r,i,o,a,c,u,d,p,f,h=t[18],g=[];for(let e=0;e<h.length;e+=1)g[e]=Tr(zr(t,h,e));const m=t=>xt(g[t],1,1,(()=>{g[t]=null}));let v=t[19]&&Ir(t),y=t[18],$=[];for(let e=0;e<y.length;e+=1)$[e]=Jr(Fr(t,y,e));const _=t=>xt($[t],1,1,(()=>{$[t]=null}));return{c(){e=z("div");for(let t=0;t<g.length;t+=1)g[t].c();r=T(),v&&v.c(),i=T(),o=z("div"),a=z("div");for(let t=0;t<$.length;t+=1)$[t].c();J(e,"class",n=Ar.tabs__list+" "+(t[40]?It["root_restrict-scroll"]:"")),J(e,"role","tablist"),U(e,"--divkit-tabs-title-padding",t[17]?se(t[17]):""),U(e,"--divkit-tabs-font-size",Lt(t[7])),U(e,"--divkit-tabs-paddings",t[8]),U(e,"--divkit-tabs-line-height",t[23]),U(e,"--divkit-tabs-letter-spacing",t[24]),U(e,"--divkit-tabs-active-font-weight",t[10]||""),U(e,"--divkit-tabs-inactive-font-weight",t[11]||""),U(e,"--divkit-tabs-active-text-color",t[12]),U(e,"--divkit-tabs-inactive-text-color",t[13]),U(e,"--divkit-tabs-active-background-color",t[14]),U(e,"--divkit-tabs-inactive-background-color",t[15]),U(e,"--divkit-tabs-border-radius",t[9]),U(e,"--divkit-tabs-items-spacing",t[16]?Wt(t[16]):""),J(a,"class",c=oe("tabs__swiper",Ar,{inited:t[25],animated:t[26]})),J(o,"class",u=Ar.tabs__panels+" "+(t[40]?It["root_restrict-scroll"]:""))},m(n,s){S(n,e,s);for(let t=0;t<g.length;t+=1)g[t]&&g[t].m(e,null);t[60](e),S(n,r,s),v&&v.m(n,s),S(n,i,s),S(n,o,s),V(o,a);for(let t=0;t<$.length;t+=1)$[t]&&$[t].m(a,null);t[61](a),t[62](o),d=!0,p||(f=[O(e,"keydown",t[44]),O(a,"touchstart",(function(){l(t[31]?t[45]:void 0)&&(t[31]?t[45]:void 0).apply(this,arguments)})),O(a,"touchmove",(function(){l(t[31]?t[46]:void 0)&&(t[31]?t[46]:void 0).apply(this,arguments)})),O(a,"touchend",(function(){l(t[31]?t[47]:void 0)&&(t[31]?t[47]:void 0).apply(this,arguments)})),O(a,"touchcancel",(function(){l(t[31]?t[47]:void 0)&&(t[31]?t[47]:void 0).apply(this,arguments)}))],p=!0)},p(r,s){if(t=r,262216&s[0]|5120&s[1]){let n;for(h=t[18],n=0;n<h.length;n+=1){const r=zr(t,h,n);g[n]?(g[n].p(r,s),wt(g[n],1)):(g[n]=Tr(r),g[n].c(),wt(g[n],1),g[n].m(e,null))}for(_t(),n=h.length;n<g.length;n+=1)m(n);bt()}if((!d||512&s[1]&&n!==(n=Ar.tabs__list+" "+(t[40]?It["root_restrict-scroll"]:"")))&&J(e,"class",n),131072&s[0]&&U(e,"--divkit-tabs-title-padding",t[17]?se(t[17]):""),128&s[0]&&U(e,"--divkit-tabs-font-size",Lt(t[7])),256&s[0]&&U(e,"--divkit-tabs-paddings",t[8]),8388608&s[0]&&U(e,"--divkit-tabs-line-height",t[23]),16777216&s[0]&&U(e,"--divkit-tabs-letter-spacing",t[24]),1024&s[0]&&U(e,"--divkit-tabs-active-font-weight",t[10]||""),2048&s[0]&&U(e,"--divkit-tabs-inactive-font-weight",t[11]||""),4096&s[0]&&U(e,"--divkit-tabs-active-text-color",t[12]),8192&s[0]&&U(e,"--divkit-tabs-inactive-text-color",t[13]),16384&s[0]&&U(e,"--divkit-tabs-active-background-color",t[14]),32768&s[0]&&U(e,"--divkit-tabs-inactive-background-color",t[15]),512&s[0]&&U(e,"--divkit-tabs-border-radius",t[9]),65536&s[0]&&U(e,"--divkit-tabs-items-spacing",t[16]?Wt(t[16]):""),t[19]?v?v.p(t,s):(v=Ir(t),v.c(),v.m(i.parentNode,i)):v&&(v.d(1),v=null),402915362&s[0]|1024&s[1]){let e;for(y=t[18],e=0;e<y.length;e+=1){const n=Fr(t,y,e);$[e]?($[e].p(n,s),wt($[e],1)):($[e]=Jr(n),$[e].c(),wt($[e],1),$[e].m(a,null))}for(_t(),e=y.length;e<$.length;e+=1)_(e);bt()}(!d||100663296&s[0]&&c!==(c=oe("tabs__swiper",Ar,{inited:t[25],animated:t[26]})))&&J(a,"class",c),(!d||512&s[1]&&u!==(u=Ar.tabs__panels+" "+(t[40]?It["root_restrict-scroll"]:"")))&&J(o,"class",u)},i(t){if(!d){for(let t=0;t<h.length;t+=1)wt(g[t]);for(let t=0;t<y.length;t+=1)wt($[t]);d=!0}},o(t){g=g.filter(Dr);for(let t=0;t<g.length;t+=1)xt(g[t]);$=$.filter(Dr);for(let t=0;t<$.length;t+=1)xt($[t]);d=!1},d(n){n&&D(e),F(g,n),t[60](null),n&&D(r),v&&v.d(n),n&&D(i),n&&D(o),F($,n),t[61](null),t[62](null),p=!1,s(f)}}}function Rr(t){let e,n,r=!t[4]&&Nr(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),S(t,e,i),n=!0},p(t,n){t[4]?r&&(_t(),xt(r,1,1,(()=>{r=null})),bt()):r?(r.p(t,n),16&n[0]&&wt(r,1)):(r=Nr(t),r.c(),wt(r,1),r.m(e.parentNode,e))},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function Ur(t,e,r){let i,o,a,s,l,c,u,d,p,h,g,m,v,y,$,_,b,w,x,k,E,C,A=n,V=n,j=n,P=n,S=n,D=n,F=n,z=n,N=n;var M;t.$$.on_destroy.push((()=>A())),t.$$.on_destroy.push((()=>V())),t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>S())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>F())),t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>N()));let{json:T={}}=e,{templateContext:I}=e,{origJson:O}=e,{layoutParams:J}=e;const B=et(Ot),R=B.genId("tabs");let U,L,W,H=!1,q={};const G=B.getJsonWithVars(T.selected_tab);let K,X,Y=G&&Number(G)||0,Z=12,tt="",nt="",rt="",ot="",at="",st="",lt="",ct="",dt=0,pt="",ft="",ht=null,gt=!1,mt=!1,vt=Y,yt=[],$t=[];async function _t(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(vt=Y,r(6,Y=t),At(),r(26,mt=!0),xt(100*-Y),kt(),async function(){await ut();const t=document.getElementById("".concat(R,"-panel-").concat(Y));t&&r(21,L.style.height=Lt(t.offsetHeight),L)}(),Ct(),Pt=-Y*L.clientWidth,e){await ut();const t=U.querySelector(".".concat(Ar.tabs__item_selected));t&&t.focus()}}function bt(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=null==i?void 0:i.length;if(!n)return;let r=Y+t;r>=n?r=0:r<0&&(r=n-1),_t(r,e)}function wt(t,e){return Y===e||(_t(e),!1)}async function xt(t){await ut(),r(22,W.style.transform="translate3d(".concat(t,"%,0,0)"),W)}function kt(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=t?Math.max(0,Y-1):Math.min(Y,vt),n=t?Math.min(i.length-1,Y+1):Math.max(Y,vt);r(27,yt=yt.map(((t,r)=>t||r>=e&&r<=n))),r(28,$t=$t.map(((t,r)=>r>=e&&r<=n)))}let Et=null;function Ct(){Et&&clearTimeout(Et),Et=window.setTimeout((()=>{r(28,$t=i.map(((t,e)=>e===Y)))}),400)}function At(){gt||(r(25,gt=!0),r(21,L.style.height=Lt(L.clientHeight),L),r(22,W.style.transform="translate3d(".concat(100*-vt,"%,0,0)"),W))}let Vt,jt,Pt,St=null,Dt=null,Ft=!1,zt=!1;return!T.id||H||(null==J?void 0:J.fakeElement)||B.registerInstance(T.id,{setCurrentItem(t){if(t<0||t>i.length-1)throw new Error('Item is out of range in "set-current-item" action');_t(t)},setPreviousItem(t){let e=Y-1;e<0&&(e="ring"===t?i.length-1:Y),_t(e)},setNextItem(t){let e=Y+1;e>i.length-1&&(e="ring"===t?0:Y),_t(e)}}),Q((()=>{T.id&&!(null==J?void 0:J.fakeElement)&&B.unregisterInstance(T.id)})),t.$$set=t=>{"json"in t&&r(0,T=t.json),"templateContext"in t&&r(1,I=t.templateContext),"origJson"in t&&r(2,O=t.origJson),"layoutParams"in t&&r(3,J=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(18,i=T.items||[]),262144&t.$$.dirty[0]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(4,H=!1):(r(4,H=!0),B.logError(Jt(new Error('Incorrect or empty "items" prop for div "tabs"'))))),1&t.$$.dirty[0]&&(r(39,o=B.getDerivedFromVars(T.width)),z(),z=f(o,(t=>r(58,E=t)))),1&t.$$.dirty[0]&&(r(38,a=B.getDerivedFromVars(T.height)),F(),F=f(a,(t=>r(57,k=t)))),40&t.$$.dirty[0]|201326592&t.$$.dirty[1]){let t={};(null==J?void 0:J.fakeElement)&&(t.fakeElement=!0),"wrap_content"===(null==E?void 0:E.type)&&(t.parentHorizontalWrapContent=!0),k&&"wrap_content"!==k.type||(t.parentVerticalWrapContent=!0),r(5,q=he(t,q))}if(262225&t.$$.dirty[0]&&!H&&(Y<0||Y>=i.length)&&(B.logError(Jt(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:T.selected_tab,length:i.length}})),r(6,Y=Y<0?0:i.length-1)),1&t.$$.dirty[0]&&(r(37,s=B.getDerivedFromVars(T.tab_title_style)),D(),D=f(s,(t=>r(56,x=t)))),33554432&t.$$.dirty[1]&&r(51,l=x||{}),128&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(7,Z=qe(l.font_size,Z)),384&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&(l.font_size||l.paddings)){const t=l.paddings||{top:6,right:8,bottom:6,left:8},e={top:(Number(t.top)||0)/Z*10,right:(Number(t.right)||0)/Z*10,bottom:(Number(t.bottom)||0)/Z*10,left:(Number(t.left)||0)/Z*10};r(8,tt=ue(e,tt))}if(128&t.$$.dirty[0]|1048576&t.$$.dirty[1]){const t=l.line_height;void 0!==t&&je(t)&&r(23,nt=Lt(t/Z*10))}if(128&t.$$.dirty[0]|1048576&t.$$.dirty[1]){const t=l.letter_spacing;void 0!==t&&ce(t)&&r(24,rt=Lt(t/Z*10))}if(640&t.$$.dirty[0]|1179648&t.$$.dirty[1]&&(l.corner_radius||l.corners_radius||l.font_size)){const t=null!==r(48,M=l.corner_radius)&&void 0!==M?M:1e3;l.corners_radius?r(9,ot=function(t,e,n,r){const i=[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]];for(let t=0;t<i.length;++t)if(i[t]&&!ce(i[t]))return r;return $e(t,e,n)}(l.corners_radius,t,Z,ot)):ce(t)&&r(9,ot=Lt(t/Z*10))}1024&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(10,K=Ke(l.active_font_weight||l.font_weight,K)),2048&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(11,X=Ke(l.inactive_font_weight||l.font_weight,X)),4096&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(12,at=qt(l.active_text_color,1,at)),8192&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(13,st=qt(l.inactive_text_color,1,st)),16384&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(14,lt=qt(l.active_background_color,1,lt)),32768&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(15,ct=qt(l.inactive_background_color,1,ct)),65536&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(16,dt=de(l.item_spacing,dt)),1&t.$$.dirty[0]&&(r(36,c=B.getDerivedFromVars(T.has_separator)),S(),S=f(c,(t=>r(19,w=t)))),1&t.$$.dirty[0]&&(r(35,u=B.getDerivedFromVars(T.separator_color)),P(),P=f(u,(t=>r(55,b=t)))),1&t.$$.dirty[0]&&(r(34,d=B.getDerivedFromVars(T.separator_paddings)),j(),j=f(d,(t=>r(54,_=t)))),524288&t.$$.dirty[0]|25952256&t.$$.dirty[1]&&w&&(b&&r(49,pt=qt(b,1,pt)),_&&r(50,ft=ue(_,ft))),786432&t.$$.dirty[1]&&r(33,p={background:pt,margin:ft}),1&t.$$.dirty[0]&&(r(32,h=B.getDerivedFromVars(T.switch_tabs_by_content_swipe_enabled)),V(),V=f(h,(t=>r(53,$=t)))),4194304&t.$$.dirty[1]&&r(31,g=void 0===$||Boolean($)),1&t.$$.dirty[0]&&(r(30,m=B.getDerivedFromVars(T.restrict_parent_scroll)),N(),N=f(m,(t=>r(40,C=t)))),1&t.$$.dirty[0]&&(r(29,v=B.getDerivedFromVars(T.title_paddings)),A(),A=f(v,(t=>r(52,y=t)))),131072&t.$$.dirty[0]|2097152&t.$$.dirty[1]&&r(17,ht=ye(y||void 0,ht)),262144&t.$$.dirty[0]&&(H||(r(27,yt=i.map(((t,e)=>e===Y))),r(28,$t=i.map(((t,e)=>e===Y)))))},[T,I,O,J,H,q,Y,Z,tt,ot,K,X,at,st,lt,ct,dt,ht,i,w,U,L,W,nt,rt,gt,mt,yt,$t,v,m,g,h,p,d,u,c,s,a,o,C,R,{},wt,function(t){if(!(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)&&i){if(t.which===Vr)bt(-1,!0);else if(t.which===jr)bt(1,!0);else if(t.which===Pr)_t(0,!0);else{if(t.which!==Sr)return;_t(i.length-1,!0)}t.preventDefault()}},function(t){var e;const n=t.target,o=null===(e=null==n?void 0:n.closest)||void 0===e?void 0:e.call(n,".".concat(It["root_restrict-scroll"]));i.length<2||t.touches.length>1||o&&o!==L||(Ft=!1,zt=!1,St=we(t),Dt=null,Vt=Date.now(),jt=Pt||-Y*L.clientWidth,r(26,mt=!1),Et&&clearTimeout(Et))},function(t){const e=we(t);if(!St||Dt&&Dt.x===e.x&&Dt.y===e.y)return;Dt=e;const n=L.clientWidth;if(Ft){Pt=e.x-St.x+jt;const t=n*i.length;if(Pt>0)Pt=Pt*n/(Pt+3*n);else if(-Pt+n>t){let e=-Pt+n-t;e=e*n/(e+3*n),Pt=n-t-e}xt(100*Pt/n)}else Math.abs(e.y-St.y)>10?zt=!0:!zt&&Math.abs(e.x-St.x)>8&&(At(),Ft=!0,St=e,xt(100*-Y),kt(!0));Ft&&t.cancelable&&t.preventDefault()},function(){zt=!1,St=null;let t=Y;if(!Ft)return;Ft=!1;const e=Math.min(512,L.clientWidth);Math.abs(jt-Pt)>e/4*Math.min(1,(Date.now()-Vt)/750)&&(t+=jt>Pt?1:-1),t>=i.length?t=i.length-1:t<0&&(t=0),t===Y?(Pt=-t*e,xt(100*-t),Ct()):_t(t)},M,pt,ft,l,y,$,_,b,x,k,E,(t,e)=>wt(0,t),function(t){it[t?"unshift":"push"]((()=>{U=t,r(20,U)}))},function(t){it[t?"unshift":"push"]((()=>{W=t,r(22,W)}))},function(t){it[t?"unshift":"push"]((()=>{L=t,r(21,L)}))}]}const Lr={state:"divkit-b8efc",state__animations:"divkit-adaae","state__animation-child":"divkit-eb860","state__animation-child-inner":"divkit-e08c6"};function Wr(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function Hr(t){return t*t*t}function qr(t){const e=t-1;return e*e*e+1}function Gr(t){return e=>{if(e<=0)return 0;if(e>=1)return 1;const n=e*t.length,r=Math.floor(n),i=n-r;return t[r]*i+t[r+1]*(1-i)}}const Kr=Gr([.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]),Xr=Gr([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]),Yr={linear:r,ease:Kr,ease_in:Hr,ease_out:qr,ease_in_out:Wr,spring:Xr},Zr=200,Qr=0,ti=0,ei=0;function ni(t){return Math.max(...t.map((t=>(Number(t.duration)||Zr)+(Number(t.start_delay)||Qr))))}function ri(t,e){let{transitions:n,elementBbox:r,rootBbox:i,direction:o,maxDuration:a,alpha:s}=e;const l=null!=s?s:1;return{duration:a,css:t=>{const e=t*a,s=n.map((t=>{const n=Number(t.start_delay)||Qr,a=Number(t.duration)||Zr,s=Math.max(0,Math.min(1,(e-n)/a)),c="in"===o?1-s:s,u=(Yr[t.interpolator||"ease_in_out"]||Wr)(c);if("fade"===t.type)return u>=1?{active:!1,opacity:0}:{active:u>0&&u<1,opacity:(1-u)*l+u*(t.alpha||ti)};if("slide"===t.type){var d;const e="top"===t.edge||"left"===t.edge?-1:1,n="top"!==t.edge&&"bottom"!==t.edge&&t.edge?"translateX":"translateY";let o=null===(d=t.distance)||void 0===d?void 0:d.value;void 0===o&&(o="top"!==t.edge&&"bottom"!==t.edge&&t.edge?Math.abs(i["left"===t.edge?"left":"right"]-r["left"===t.edge?"right":"left"]):Math.abs(i["bottom"===t.edge?"bottom":"top"]-r["bottom"===t.edge?"top":"bottom"]));const a=o*u;return{active:u>0&&u<1,translate:"".concat(n,"(").concat(a*e,"px)")}}if("scale"===t.type){var p,f;const e=1-u+u*(t.scale||ei),n=null!==(p=t.pivot_x)&&void 0!==p?p:.5,i=null!==(f=t.pivot_y)&&void 0!==f?f:.5,o=(1-e)*r.width*n,a=(1-e)*r.height*i;return{active:u>0&&u<1,scale:"translate(".concat(o,"px, ").concat(a,"px) scale(").concat(e,")")}}return{}})),c=s.map((t=>t.opacity)).filter((t=>void 0!==t)).reduce(((t,e)=>t*e),1),u=s.map((t=>t.translate)).filter((t=>void 0!==t)).join(" "),d=s.map((t=>t.scale)).filter((t=>void 0!==t)).join(" "),p=s.filter((t=>t.active)).map((t=>t.scale)).filter((t=>void 0!==t)),f=[u,p.length?p[p.length-1]:d].filter(Boolean).join(" ");return"transform:".concat(f||"none",";opacity:").concat(c)}}}function ii(t,e,n){return t*(1-n)+e*n}const oi={linear:r,ease:Kr,ease_in:Hr,ease_out:qr,ease_in_out:Wr,spring:Xr},ai=200,si=0;function li(t,e){var n,r;let{rootBbox:i,beforeBbox:o,afterBbox:a,transition:s}=e;return{delay:null!==(n=s.start_delay)&&void 0!==n?n:si,duration:null!==(r=s.duration)&&void 0!==r?r:ai,easing:s.interpolator&&s.interpolator in oi?oi[s.interpolator]:Wr,css:t=>["top:".concat(ii(o.top,a.top,t)-i.top,"px"),"left:".concat(ii(o.left,a.left,t)-i.left,"px"),"width:".concat(ii(o.width,a.width,t),"px"),"height:".concat(ii(o.height,a.height,t),"px")].join(";")}}function ci(t){const e=[];return"set"===t.type?(t.items||[]).forEach((t=>{e.push(...ci(t))})):e.push(t),e}const{Map:ui}=Ct;function di(t,e,n){const r=t.slice();return r[27]=e[n],r}function pi(t){let e,n;return e=new We({props:{cls:Lr.state,json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[yi]},$$scope:{ctx:t}}}),{c(){Pt(e.$$.fragment)},m(t,r){St(e,t,r),n=!0},p(t,n){const r={};1&n&&(r.json=t[0]),4&n&&(r.origJson=t[2]),2&n&&(r.templateContext=t[1]),8&n&&(r.layoutParams=t[3]),1073742034&n&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function fi(t){let e,r,i=t[7],o=hi(t);return{c(){o.c(),e=I()},m(t,n){o.m(t,n),S(t,e,n),r=!0},p(t,r){128&r&&d(i,i=t[7])?(_t(),xt(o,1,1,n),bt(),o=hi(t),o.c(),wt(o,1),o.m(e.parentNode,e)):o.p(t,r)},i(t){r||(wt(o),r=!0)},o(t){xt(o),r=!1},d(t){t&&D(e),o.d(t)}}}function hi(t){let e,n;return e=new zo({props:{div:t[7].div,templateContext:t[1]}}),{c(){Pt(e.$$.fragment)},m(t,r){St(e,t,r),n=!0},p(t,n){const r={};128&n&&(r.div=t[7].div),2&n&&(r.templateContext=t[1]),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function gi(t){let e,n,r,i,o,a,s,l,c,u;function d(){return t[11](t[27])}return r=new zo({props:{div:t[27].json,templateContext:t[27].templateContext,layoutParams:{fakeElement:!0}}}),{c(){e=z("div"),n=z("div"),Pt(r.$$.fragment),o=T(),J(n,"class",i=Lr["state__animation-child-inner"]),J(e,"class",a=Lr["state__animation-child"])},m(t,i){S(t,e,i),V(e,n),St(r,n,null),V(e,o),l=!0,c||(u=O(e,"introend",d),c=!0)},p(e,n){t=e;const i={};64&n&&(i.div=t[27].json),64&n&&(i.templateContext=t[27].templateContext),r.$set(i)},i(n){l||(wt(r.$$.fragment,n),s||dt((()=>{s=Et(e,li,t[27]),s.start()})),l=!0)},o(t){xt(r.$$.fragment,t),l=!1},d(t){t&&D(e),Dt(r),c=!1,u()}}}function mi(t){let e,n,r,i,o,a,s,l,c,u;function d(){return t[10](t[27])}return r=new zo({props:{div:t[27].json,templateContext:t[27].templateContext,layoutParams:{fakeElement:!0}}}),{c(){e=z("div"),n=z("div"),Pt(r.$$.fragment),o=T(),J(n,"class",i=Lr["state__animation-child-inner"]),J(e,"class",a=Lr["state__animation-child"]),U(e,"left",t[27].offsetLeft+"px"),U(e,"top",t[27].offsetTop+"px"),U(e,"width",t[27].width+"px"),U(e,"height",t[27].height+"px")},m(t,i){S(t,e,i),V(e,n),St(r,n,null),V(e,o),l=!0,c||(u=O(e,"introend",d),c=!0)},p(n,i){t=n;const o={};64&i&&(o.div=t[27].json),64&i&&(o.templateContext=t[27].templateContext),r.$set(o),(!l||64&i)&&U(e,"left",t[27].offsetLeft+"px"),(!l||64&i)&&U(e,"top",t[27].offsetTop+"px"),(!l||64&i)&&U(e,"width",t[27].width+"px"),(!l||64&i)&&U(e,"height",t[27].height+"px")},i(n){l||(wt(r.$$.fragment,n),s||dt((()=>{s=Et(e,ri,t[27]),s.start()})),l=!0)},o(t){xt(r.$$.fragment,t),l=!1},d(t){t&&D(e),Dt(r),c=!1,u()}}}function vi(t,e){let n,r,i,o,a;const s=[mi,gi],l=[];function c(t,e){return"direction"in t[27]?0:1}return r=c(e),i=l[r]=s[r](e),{key:t,first:null,c(){n=I(),i.c(),o=I(),this.first=n},m(t,e){S(t,n,e),l[r].m(t,e),S(t,o,e),a=!0},p(t,n){let a=r;r=c(e=t),r===a?l[r].p(e,n):(_t(),xt(l[a],1,1,(()=>{l[a]=null})),bt(),i=l[r],i?i.p(e,n):(i=l[r]=s[r](e),i.c()),wt(i,1),i.m(o.parentNode,o))},i(t){a||(wt(i),a=!0)},o(t){xt(i),a=!1},d(t){t&&D(n),l[r].d(t),t&&D(o)}}}function yi(t){var e;let n,r,i,o,a=[],l=new ui,c=(null===(e=t[7])||void 0===e?void 0:e.div)&&fi(t),u=t[6];const d=t=>t[27];for(let e=0;e<u.length;e+=1){let n=di(t,u,e),r=d(n);l.set(r,a[e]=vi(r,n))}return{c(){c&&c.c(),n=T(),r=z("div");for(let t=0;t<a.length;t+=1)a[t].c();J(r,"class",i=Lr.state__animations),J(r,"aria-hidden","true")},m(e,i){c&&c.m(e,i),S(e,n,i),S(e,r,i);for(let t=0;t<a.length;t+=1)a[t]&&a[t].m(r,null);t[12](r),o=!0},p(t,e){var i;null!==(i=t[7])&&void 0!==i&&i.div?c?(c.p(t,e),128&e&&wt(c,1)):(c=fi(t),c.c(),wt(c,1),c.m(n.parentNode,n)):c&&(_t(),xt(c,1,1,(()=>{c=null})),bt()),320&e&&(u=t[6],_t(),a=function(t,e,n,r,i,o,a,l,c,u,d,p){let f=t.length,h=o.length,g=f;const m={};for(;g--;)m[t[g].key]=g;const v=[],y=new Map,$=new Map,_=[];for(g=h;g--;){const t=p(i,o,g),r=n(t);let s=a.get(r);s?_.push((()=>s.p(t,e))):(s=u(r,t),s.c()),y.set(r,v[g]=s),r in m&&$.set(r,Math.abs(g-m[r]))}const b=new Set,w=new Set;function x(t){wt(t,1),t.m(l,d),a.set(t.key,t),d=t.first,h--}for(;f&&h;){const e=v[h-1],n=t[f-1],r=e.key,i=n.key;e===n?(d=e.first,f--,h--):y.has(i)?!a.has(r)||b.has(r)?x(e):w.has(i)?f--:$.get(r)>$.get(i)?(w.add(r),x(e)):(b.add(i),f--):(c(n,a),f--)}for(;f--;){const e=t[f];y.has(e.key)||c(e,a)}for(;h;)x(v[h-1]);return s(_),v}(a,e,d,0,t,u,l,r,At,vi,null,di),bt())},i(t){if(!o){wt(c);for(let t=0;t<u.length;t+=1)wt(a[t]);o=!0}},o(t){xt(c);for(let t=0;t<a.length;t+=1)xt(a[t]);o=!1},d(e){c&&c.d(e),e&&D(n),e&&D(r);for(let t=0;t<a.length;t+=1)a[t].d();t[12](null)}}}function $i(t){let e,n,r=!t[5]&&pi(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),S(t,e,i),n=!0},p(t,n){let[i]=n;t[5]?r&&(_t(),xt(r,1,1,(()=>{r=null})),bt()):r?(r.p(t,i),32&i&&wt(r,1)):(r=pi(t),r.c(),wt(r,1),r.m(e.parentNode,e))},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function _i(t){return"change_bounds"===t.type?t:"set"===t.type?_i(t.items[0]):null}function bi(t,e,n){let r,{json:i={}}=e,{templateContext:o}=e,{origJson:a}=e,{layoutParams:s}=e;const l=et(Ot),c=et(ae);let u,d=new Map,p=new Set,f=!1,h=null,g=[],m=[],v=[],y=[];function $(t,e,n){let{json:r,templateContext:i,transitions:o,node:a}=e;r=l.getJsonWithVars(r),o=l.getJsonWithVars(o);const s=ci(o),c=a.getBoundingClientRect();return{json:Object.assign(Object.assign({},r),{margins:void 0,alpha:(u=s,u.some((t=>"fade"===t.type))?void 0:r.alpha)}),templateContext:i,elementBbox:c,rootBbox:t,transitions:s,alpha:r.alpha,width:c.width,height:c.height,offsetTop:c.top-t.top,offsetLeft:c.left-t.left,direction:n,resolvePromise:e.resolvePromise,node:e.node};var u}const _=i.div_id||i.id;let b;_?(null==s?void 0:s.fakeElement)||(c.registerInstance(_,{async setState(t){if(b===t)return;l.setRunning("stateChange",!0);const e=new Set(p);g.forEach((t=>{t.resolvePromise&&t.resolvePromise()})),n(6,g=[]);let i=[];if(u){const t=u.getBoundingClientRect();i=v.map((e=>$(t,e,"out")))}y.forEach((t=>{d.set(t.id,t.node.getBoundingClientRect())})),m=[],v=[],y=[];const o=r.find((e=>e.state_id===t))||null;if(o?(b=t,n(7,w=o)):l.logError(Jt(new Error("Cannot find state with id"),{additional:{stateId:t}})),await ut(),!u)return;const a=u.getBoundingClientRect();let s=m.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=>$(a,t,"in")));i=i.filter((t=>{var e;return!(!t.json.id||p.has(t.json.id))||(null===(e=t.resolvePromise)||void 0===e||e.call(t),!1)}));const c=i.concat(s),f=c.reduce(((t,e)=>Math.max(t,ni(e.transitions))),0),h=y.filter((t=>d.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:a,beforeBbox:d.get(t.id),afterBbox:t.node.getBoundingClientRect(),node:t.node,transition:_i(t.transitions),resolvePromise:t.resolvePromise})));n(6,g=[...c.map((t=>Object.assign(Object.assign({},t),{maxDuration:f}))),...h]),d.clear(),l.setRunning("stateChange",!1)},getChild(t){if(h&&h.has(t))return h.get(t);l.logError(Jt(new Error("Missing state block with id"),{additional:{id:t}}))}}),tt(ae,{registerInstance(t,e){h||(h=new Map),h.has(t)?l.logError(Jt(new Error("Duplicate state with id"),{additional:{id:t}})):h.set(t,e)},unregisterInstance(t){null==h||h.delete(t)},runVisibilityTransition(t,e,r,i,o){if(!u)return Promise.resolve();const a=$(u.getBoundingClientRect(),{json:t,templateContext:e,transitions:r,node:i},o),s=ni(a.transitions),l=Object.assign(Object.assign({},a),{maxDuration:s});return n(6,g=[...g.filter((t=>t.node!==a.node)),l]),new Promise((t=>{l.resolvePromise=t}))},registerChildWithTransitionIn(t,e,n,r){const i={json:t,templateContext:e,transitions:n,node:r};return m.push(i),new Promise((t=>{i.resolvePromise=t}))},registerChildWithTransitionOut(t,e,n,r){const i={json:t,templateContext:e,transitions:n,node:r};return v.push(i),new Promise((t=>{i.resolvePromise=t}))},registerChildWithTransitionChange(t,e,n,r){const i=t.id;if(!i)return Promise.resolve();const o={id:i,json:t,templateContext:e,transitions:n,node:r};return y.push(o),new Promise((t=>{o.resolvePromise=t}))},hasTransitionChange:t=>!!t&&d.has(t),registerChild(t){p.add(t)},unregisterChild(t){p.delete(t)}})):(f=!0,l.logError(Jt(new Error('Missing "id" prop for div "state"'))));let w=null;const x=l.getJsonWithVars(i.default_state_id);let k=!1;function E(t){n(6,g=g.filter((e=>e!==t))),t.resolvePromise&&t.resolvePromise()}return Q((()=>{_&&!(null==s?void 0:s.fakeElement)&&c.unregisterInstance(_)})),t.$$set=t=>{"json"in t&&n(0,i=t.json),"templateContext"in t&&n(1,o=t.templateContext),"origJson"in t&&n(2,a=t.origJson),"layoutParams"in t&&n(3,s=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty&&i&&(p=new Set),1&t.$$.dirty&&n(9,r=i.states||[]),512&t.$$.dirty&&((null==r?void 0:r.length)?n(5,f=!1):(n(5,f=!0),l.logError(Jt(new Error('Empty "states" prop for div "state"'))))),512&t.$$.dirty&&function(t){k||(k=!0,t.length&&(x?(b=x,n(7,w=t.find((t=>t.state_id===b))||null),w||l.logError(Jt(new Error("Cannot find state for default_state_id"),{additional:{selectedId:b}}))):(n(7,w=t[0]),b=w.state_id)))}(r)},[i,o,a,s,u,f,g,w,E,r,t=>E(t),t=>E(t),function(t){it[t?"unshift":"push"]((()=>{u=t,n(4,u)}))}]}const wi={pager:"divkit-c5feb",pager__items:"divkit-f6987",pager__item:"divkit-feca7",pager_orientation_horizontal:"divkit-b0a1c",pager_orientation_vertical:"divkit-f772f"},{Boolean:xi}=Ct;function ki(t,e,n){const r=t.slice();return r[48]=e[n],r}function Ei(t){let e,n;return e=new We({props:{cls:oe("pager",wi,t[8]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,$$slots:{default:[Ai]},$$scope:{ctx:t}}}),{c(){Pt(e.$$.fragment)},m(t,r){St(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=oe("pager",wi,t[8])),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),33336&n[0]|1048576&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function Ci(t){var e;let n,r,i,o,a;return r=new zo({props:{div:t[48].json,templateContext:t[48].templateContext,origJson:t[48].origJson,layoutParams:null!==(e=t[3])&&void 0!==e&&e.fakeElement?{fakeElement:!0}:void 0}}),{c(){n=z("div"),Pt(r.$$.fragment),i=T(),J(n,"class",o=wi.pager__item)},m(t,e){S(t,n,e),St(r,n,null),V(n,i),a=!0},p(t,e){var n;const i={};16&e[0]&&(i.div=t[48].json),16&e[0]&&(i.templateContext=t[48].templateContext),16&e[0]&&(i.origJson=t[48].origJson),8&e[0]&&(i.layoutParams=null!==(n=t[3])&&void 0!==n&&n.fakeElement?{fakeElement:!0}:void 0),r.$set(i)},i(t){a||(wt(r.$$.fragment,t),a=!0)},o(t){xt(r.$$.fragment,t),a=!1},d(t){t&&D(n),Dt(r)}}}function Ai(t){let e,n,r,i,o,a,s=t[4],l=[];for(let e=0;e<s.length;e+=1)l[e]=Ci(ki(t,s,e));const c=t=>xt(l[t],1,1,(()=>{l[t]=null}));return{c(){e=z("div");for(let t=0;t<l.length;t+=1)l[t].c();J(e,"class",n=wi.pager__items+" "+(t[15]?It["root_restrict-scroll"]:"")),J(e,"style",r=Ut(t[9]))},m(n,r){S(n,e,r);for(let t=0;t<l.length;t+=1)l[t]&&l[t].m(e,null);t[36](e),i=!0,o||(a=O(e,"scroll",t[16]),o=!0)},p(t,o){if(24&o[0]){let n;for(s=t[4],n=0;n<s.length;n+=1){const r=ki(t,s,n);l[n]?(l[n].p(r,o),wt(l[n],1)):(l[n]=Ci(r),l[n].c(),wt(l[n],1),l[n].m(e,null))}for(_t(),n=s.length;n<l.length;n+=1)c(n);bt()}(!i||32768&o[0]&&n!==(n=wi.pager__items+" "+(t[15]?It["root_restrict-scroll"]:"")))&&J(e,"class",n),(!i||512&o[0]&&r!==(r=Ut(t[9])))&&J(e,"style",r)},i(t){if(!i){for(let t=0;t<s.length;t+=1)wt(l[t]);i=!0}},o(t){l=l.filter(xi);for(let t=0;t<l.length;t+=1)xt(l[t]);i=!1},d(n){n&&D(e),F(l,n),t[36](null),o=!1,a()}}}function Vi(t){let e,n,r=!t[7]&&Ei(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),S(t,e,i),n=!0},p(t,n){t[7]?r&&(_t(),xt(r,1,1,(()=>{r=null})),bt()):r?(r.p(t,n),128&n[0]&&wt(r,1)):(r=Ei(t),r.c(),wt(r,1),r.m(e.parentNode,e))},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function ji(t,e,r){let i,o,a,s,l,c,u,d,p,h,g,m,v,y,$,b,w,x=n,k=n,E=n,C=n,A=n,V=n;var j,P,S,D,F,z,N;t.$$.on_destroy.push((()=>x())),t.$$.on_destroy.push((()=>k())),t.$$.on_destroy.push((()=>E())),t.$$.on_destroy.push((()=>C())),t.$$.on_destroy.push((()=>A())),t.$$.on_destroy.push((()=>V()));let{json:M={}}=e,{templateContext:T}=e,{origJson:I}=e,{layoutParams:O}=e;const J=et(Ot),B=J.genId("pager");let R,U=!1,L=!1,W=0,H=0,q=!1,G="horizontal",K="",X="",Y="";const tt=hr((function(){if(!U)return;const t=function(){const t=Array.from(R.children),e=R.getBoundingClientRect(),n=t.findIndex((t=>{return n=e,r=t.getBoundingClientRect(),"horizontal"===G?r.left>=n.left&&r.right<=n.right:r.top>=n.top&&r.bottom<=n.bottom;var n,r}));return-1!==n?n:W}();t!==W&&r(25,W=t)}),50);function nt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"smooth";const n="horizontal"===G,i=R.children[t],o=n?"offsetLeft":"offsetTop",a=n?"left":"top";R.scroll({[a]:i[o],behavior:e}),r(25,W=t)}return M.id&&!(null==O?void 0:O.fakeElement)&&J.registerInstance(M.id,{setCurrentItem(t){if(t<0||t>i.length-1)throw new Error('Item is out of range in "set-current-item" action');nt(t)},setPreviousItem(t){let e=W-1;e<0&&(e="ring"===t?i.length-1:W),nt(e)},setNextItem(t){let e=W+1;e>i.length-1&&(e="ring"===t?0:W),nt(e)}}),Z((()=>{if(U=!0,Boolean(document.getElementById("".concat(B,"-tab-0")))){const t=[...R.children];for(const[e,n]of t.entries())n.setAttribute("role","tabpanel"),n.setAttribute("id","".concat(B,"-panel-").concat(e)),n.setAttribute("aria-labelledby","".concat(B,"-tab-").concat(e))}})),Q((()=>{U=!1,M.id&&!(null==O?void 0:O.fakeElement)&&J.unregisterInstance(M.id)})),t.$$set=t=>{"json"in t&&r(0,M=t.json),"templateContext"in t&&r(1,T=t.templateContext),"origJson"in t&&r(2,I=t.origJson),"layoutParams"in t&&r(3,O=t.layoutParams)},t.$$.update=()=>{if(131073&t.$$.dirty[0]&&((null===r(17,j=M.items)||void 0===j?void 0:j.length)&&Array.isArray(M.items)?r(24,L=!1):(r(24,L=!0),J.logError(Jt(new Error('Incorrect or empty "items" prop for div "pager"'))))),16777219&t.$$.dirty[0]&&r(4,i=(!L&&M.items||[]).map((t=>{let e=t,n=T;return({templateContext:n,json:e}=J.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),1&t.$$.dirty[0]&&(r(14,o=J.getDerivedFromVars(M.layout_mode)),k(),k=f(o,(t=>r(32,v=t)))),2&t.$$.dirty[1]&&(v?"percentage"!==v.type&&"fixed"!==v.type?(r(26,q=!0),J.logError(Jt(new Error('Incorrect value of "layout_mode.type" for div "pager"')))):r(26,q=!1):(r(26,q=!0),J.logError(Jt(new Error('Empty "layout_mode" prop for div "pager"'))))),1&t.$$.dirty[0]&&(r(13,a=J.getDerivedFromVars(M.orientation)),A(),A=f(a,(t=>r(35,b=t)))),134217728&t.$$.dirty[0]|16&t.$$.dirty[1]&&r(27,G=Jn(b,G)),1&t.$$.dirty[0]&&(r(12,s=J.getDerivedFromVars(M.item_spacing)),C(),C=f(s,(t=>r(34,$=t)))),8&t.$$.dirty[1]){const t=null==$?void 0:$.value;t&&ce(t)&&r(28,K=Lt(t||0))}if(1&t.$$.dirty[0]&&(r(11,l=J.getDerivedFromVars(M.paddings)),E(),E=f(l,(t=>r(33,y=t)))),536870912&t.$$.dirty[0]|4&t.$$.dirty[1]&&r(29,X=ue(y,X)),1&t.$$.dirty[0]&&(r(10,c=J.getDerivedFromVars(M.restrict_parent_scroll)),V(),V=f(c,(t=>r(15,w=t)))),134217728&t.$$.dirty[0]&&r(31,u="horizontal"===G?"grid-auto-columns":"grid-auto-rows"),419168257&t.$$.dirty[0]|2&t.$$.dirty[1])if("fixed"===(null==v?void 0:v.type)){const t=Wt("horizontal"===G?((null===r(18,P=M.paddings)||void 0===P?void 0:P.left)||0)+((null===r(19,S=M.paddings)||void 0===S?void 0:S.right)||0):((null===r(20,D=M.paddings)||void 0===D?void 0:D.top)||0)+((null===r(21,F=M.paddings)||void 0===F?void 0:F.bottom)||0)),e=null===r(22,z=v.neighbour_page_width)||void 0===z?void 0:z.value;r(30,Y=e?"calc(100% + ".concat(t," - 2 * ").concat(Wt(e)," - 2 * ").concat(K,")"):"100%")}else if("percentage"===(null==v?void 0:v.type)){const t=null===r(23,N=v.page_width)||void 0===N?void 0:N.value;r(30,Y="".concat(Number(t),"%"))}1879048192&t.$$.dirty[0]|1&t.$$.dirty[1]&&r(9,d={"grid-gap":K,padding:X,[u]:Y}),134217728&t.$$.dirty[0]&&r(8,p={orientation:G}),83886080&t.$$.dirty[0]&&r(7,h=L||q),33554448&t.$$.dirty[0]&&function(t,e){const n=M.id;if(n){const r=new Map(m);_(g,m=r.set(n,{instId:B,size:t,currentItem:e,scrollToPagerItem:nt}),m)}}(i.length,W),33554432&t.$$.dirty[0]&&function(t){var e;if(t===H)return;H=t;const n=J.getJsonWithVars(null===(e=i[t].json)||void 0===e?void 0:e.selected_actions);(null==n?void 0:n.length)&&J.execAnyActions(n)}(W)},r(6,g=J.getStore("pagers")),x(),x=f(g,(t=>r(39,m=t))),[M,T,I,O,i,R,g,h,p,d,c,l,s,a,o,w,tt,j,P,S,D,F,z,N,L,W,q,G,K,X,Y,u,v,y,$,b,function(t){it[t?"unshift":"push"]((()=>{R=t,r(5,R)}))}]}const Pi={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"};function Si(t,e,n){const r=t.slice();r[43]=e[n],r[46]=n;const i=r[46]===r[12].currentItem;return r[44]=i,r}function Di(t){let e,n=Array(t[12].size),r=[];for(let e=0;e<n.length;e+=1)r[e]=Fi(Si(t,n,e));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=I()},m(t,n){for(let e=0;e<r.length;e+=1)r[e]&&r[e].m(t,n);S(t,e,n)},p(t,i){if(25169920&i[0]){let o;for(n=Array(t[12].size),o=0;o<n.length;o+=1){const a=Si(t,n,o);r[o]?r[o].p(a,i):(r[o]=Fi(a),r[o].c(),r[o].m(e.parentNode,e))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},d(t){F(r,t),t&&D(e)}}}function Fi(t){let e,n,r,i,o,a,l,c;function u(){return t[36](t[46])}return{c(){e=z("div"),J(e,"class",n=oe("indicator__item",Pi,{active:t[44]})+" "+It.root__clickable),J(e,"role","tab"),J(e,"id",r=t[12].instId+"-tab-"+t[46]),J(e,"aria-controls",i=t[12].instId+"-panel-"+t[46]),J(e,"aria-selected",o=t[44]?"true":"false"),J(e,"tabindex",a=t[44]?0:-1)},m(n,r){S(n,e,r),l||(c=[O(e,"click",u),O(e,"keydown",t[24])],l=!0)},p(s,l){t=s,4096&l[0]&&n!==(n=oe("indicator__item",Pi,{active:t[44]})+" "+It.root__clickable)&&J(e,"class",n),4096&l[0]&&r!==(r=t[12].instId+"-tab-"+t[46])&&J(e,"id",r),4096&l[0]&&i!==(i=t[12].instId+"-panel-"+t[46])&&J(e,"aria-controls",i),4096&l[0]&&o!==(o=t[44]?"true":"false")&&J(e,"aria-selected",o),4096&l[0]&&a!==(a=t[44]?0:-1)&&J(e,"tabindex",a)},d(t){t&&D(e),l=!1,s(c)}}}function zi(t){let e,n,r,i,o=t[12]&&Di(t);return{c(){e=z("div"),n=z("div"),o&&o.c(),J(n,"class",r=Pi.indicator__items),J(n,"role","tablist"),U(n,"margin","default"===t[6]?"0 ".concat(Lt(Math.max(0,t[4].width-t[5].width)/2)):""),U(n,"--divkit-indicator-inactive-width",Lt(t[5].width)),U(n,"--divkit-indicator-inactive-height",Lt(t[5].height)),U(n,"--divkit-indicator-inactive-border-radius",Lt(t[5].borderRadius)),U(n,"--divkit-indicator-inactive-background",t[5].background||""),U(n,"--divkit-indicator-inactive-box-shadow",t[5].boxShadow||""),U(n,"--divkit-indicator-active-width",Lt(t[4].width)),U(n,"--divkit-indicator-active-height",Lt(t[4].height)),U(n,"--divkit-indicator-active-border-radius",Lt(t[4].borderRadius)),U(n,"--divkit-indicator-active-background",t[4].background||""),U(n,"--divkit-indicator-active-box-shadow",t[4].boxShadow||""),U(n,"--divkit-indicator-active-scale",t[4].width/t[5].width),U(n,"--divkit-indicator-default-margin","default"===t[6]?"0 ".concat(Lt((t[7]-t[5].width)/2)):""),U(n,"--divkit-indicator-stretch-margin","stretch"===t[6]?Lt(t[9]):""),U(n,"--divkit-indicator-stretch-max-count","stretch"===t[6]?t[8]:""),U(n,"--divkit-indicator-stretch-max-spacer","stretch"===t[6]?Lt((t[8]-1)*t[9]):""),J(e,"class",i=Pi.indicator__scroller)},m(r,i){S(r,e,i),V(e,n),o&&o.m(n,null),t[37](n),t[38](e)},p(t,e){t[12]?o?o.p(t,e):(o=Di(t),o.c(),o.m(n,null)):o&&(o.d(1),o=null),112&e[0]&&U(n,"margin","default"===t[6]?"0 ".concat(Lt(Math.max(0,t[4].width-t[5].width)/2)):""),32&e[0]&&U(n,"--divkit-indicator-inactive-width",Lt(t[5].width)),32&e[0]&&U(n,"--divkit-indicator-inactive-height",Lt(t[5].height)),32&e[0]&&U(n,"--divkit-indicator-inactive-border-radius",Lt(t[5].borderRadius)),32&e[0]&&U(n,"--divkit-indicator-inactive-background",t[5].background||""),32&e[0]&&U(n,"--divkit-indicator-inactive-box-shadow",t[5].boxShadow||""),16&e[0]&&U(n,"--divkit-indicator-active-width",Lt(t[4].width)),16&e[0]&&U(n,"--divkit-indicator-active-height",Lt(t[4].height)),16&e[0]&&U(n,"--divkit-indicator-active-border-radius",Lt(t[4].borderRadius)),16&e[0]&&U(n,"--divkit-indicator-active-background",t[4].background||""),16&e[0]&&U(n,"--divkit-indicator-active-box-shadow",t[4].boxShadow||""),48&e[0]&&U(n,"--divkit-indicator-active-scale",t[4].width/t[5].width),224&e[0]&&U(n,"--divkit-indicator-default-margin","default"===t[6]?"0 ".concat(Lt((t[7]-t[5].width)/2)):""),576&e[0]&&U(n,"--divkit-indicator-stretch-margin","stretch"===t[6]?Lt(t[9]):""),320&e[0]&&U(n,"--divkit-indicator-stretch-max-count","stretch"===t[6]?t[8]:""),832&e[0]&&U(n,"--divkit-indicator-stretch-max-spacer","stretch"===t[6]?Lt((t[8]-1)*t[9]):"")},d(n){n&&D(e),o&&o.d(),t[37](null),t[38](null)}}}function Ni(t){let e,n;return e=new We({props:{cls:oe("indicator",Pi,t[13]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[zi]},$$scope:{ctx:t}}}),{c(){Pt(e.$$.fragment)},m(t,r){St(e,t,r),n=!0},p(t,n){const r={};8192&n[0]&&(r.cls=oe("indicator",Pi,t[13])),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),8176&n[0]|65536&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function Mi(t,e,r){let i,o,a,s,l,c,u,d,p,h,g,m,v,y,$,_,b,w,x,k=n,E=n,C=n,A=n,V=n,j=n,P=n,S=n,D=n;var F,z;t.$$.on_destroy.push((()=>k())),t.$$.on_destroy.push((()=>E())),t.$$.on_destroy.push((()=>C())),t.$$.on_destroy.push((()=>A())),t.$$.on_destroy.push((()=>V())),t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>S())),t.$$.on_destroy.push((()=>D()));let{json:N={}}=e,{templateContext:M}=e,{origJson:T}=e,{layoutParams:I}=e;const O=["rounded_rectangle","circle"],J=et(Ot);let B,R,U,L={width:13,height:13,borderRadius:6.5,background:"#ffdc60"},W={width:10,height:10,borderRadius:5,background:"#33919cb5"},H="default",q=15,G=10,K=5;function X(t){t!==U.currentItem&&U.scrollToPagerItem(t)}async function Y(t){U.scrollToPagerItem(t),await ut();const e=R.querySelector(".".concat(Pi.indicator__item_active));e&&e.focus()}return t.$$set=t=>{"json"in t&&r(0,N=t.json),"templateContext"in t&&r(1,M=t.templateContext),"origJson"in t&&r(2,T=t.origJson),"layoutParams"in t&&r(3,I=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(22,i=J.getDerivedFromVars(N.shape)),j(),j=f(i,(t=>r(32,_=t)))),1&t.$$.dirty[0]&&(r(21,o=J.getDerivedFromVars(N.active_item_color)),A(),A=f(o,(t=>r(30,y=t)))),1&t.$$.dirty[0]&&(r(20,a=J.getDerivedFromVars(N.inactive_item_color)),V(),V=f(a,(t=>r(31,$=t)))),1&t.$$.dirty[0]&&(r(19,s=J.getDerivedFromVars(N.active_item_size)),P(),P=f(s,(t=>r(33,b=t)))),1&t.$$.dirty[0]&&(r(18,l=J.getDerivedFromVars(N.active_shape)),D(),D=f(l,(t=>r(35,x=t)))),1&t.$$.dirty[0]&&(r(17,c=J.getDerivedFromVars(N.inactive_shape)),S(),S=f(c,(t=>r(34,w=t)))),1073741872&t.$$.dirty[0]|31&t.$$.dirty[1]&&(x&&r(4,L=yn({type:"shape_drawable",shape:x},O,L)),w&&r(5,W=yn({type:"shape_drawable",shape:w},O,W)),!x&&!w&&_)){const t=qe(b,1.3);r(5,W=yn({type:"shape_drawable",shape:_,color:W.background},O,W)),r(5,W.background=qt($,1,W.background),W),r(4,L=Object.assign(Object.assign({},W),{width:W.width*t,height:W.height*t,borderRadius:W.borderRadius*t,background:L.background})),r(4,L.background=qt(y,1,L.background),L)}if(1&t.$$.dirty[0]&&(r(16,u=J.getDerivedFromVars(N.space_between_centers)),E(),E=f(u,(t=>r(28,m=t)))),1&t.$$.dirty[0]&&(r(15,d=J.getDerivedFromVars(N.items_placement)),C(),C=f(d,(t=>r(29,v=t)))),905970624&t.$$.dirty[0])if(!v||"default"!==v.type&&"stretch"!==v.type)r(6,H="default"),m&&r(7,q=de(m.value,q));else if(r(6,H=v.type),"default"===H)r(7,q=de(null===r(25,F=v.space_between_centers)||void 0===F?void 0:F.value,q));else if("stretch"===H){const t=v;r(8,G=qe(t.max_visible_items,G)),r(9,K=de(null===r(26,z=t.item_spacing)||void 0===z?void 0:z.value,K))}134217728&t.$$.dirty[0]&&async function(t){if(N.pager_id&&t.has(N.pager_id)&&(r(12,U=t.get(N.pager_id)),await ut(),R)){const t=R.children[U.currentItem].offsetLeft;B.scroll({left:t-B.clientWidth/2,behavior:"smooth"})}}(g),64&t.$$.dirty[0]&&r(13,h={placement:H})},r(14,p=J.getStore("pagers")),k(),k=f(p,(t=>r(27,g=t))),[N,M,T,I,L,W,H,q,G,K,B,R,U,h,p,d,u,c,l,s,a,o,i,X,function(t){if(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)return;const{size:e,currentItem:n}=U;if(t.which===Vr)Y(n-1<0?n:n-1);else if(t.which===jr)Y(n+1>=e?n:n+1);else if(t.which===Pr)Y(0);else{if(t.which!==Sr)return;Y(e-1)}t.preventDefault()},F,z,g,m,v,y,$,_,b,w,x,t=>X(t),function(t){it[t?"unshift":"push"]((()=>{R=t,r(11,R)}))},function(t){it[t?"unshift":"push"]((()=>{B=t,r(10,B)}))}]}const Ti={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 Ii(t,e){if(!t||!t.font_size)return e;const n=t.offset,r=t.text_color&&qt(t.text_color)||"#000",i=Ge(t.font_weight);if(je(t.font_size)&&"transparent"!==r){var o,a;const e={fontSize:Lt(t.font_size),fontWeight:i,textColor:r};return"number"==typeof(null==n||null===(o=n.x)||void 0===o?void 0:o.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 Oi(t,e,n){return Math.max(e,Math.min(n,Number(t)))}const Ji="function"==typeof BigInt;function Bi(t){return Ji?BigInt(t):Number(t)}const Ri=Bi("9223372036854775807"),Ui=Bi("-9223372036854775808");function Li(t){const e=Bi(t);if(e>Ri||e<Ui)throw new Error("Integer overflow.");return e}const Wi=Li(0);function Hi(t){let e=t;return e<0&&(e=-e),e}function qi(t){let e=0;return t>0?e=1:t<0&&(e=-1),Li(e)}class Gi{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=Mt(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 Ki={string:class extends Gi{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"string"}},number:class extends Gi{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 Gi{convertValue(t){if("bigint"!=typeof t&&"number"!=typeof t||"number"==typeof t&&(isNaN(t)||t!==Math.round(t))||t>Ri||t<Ui)throw new Error("Incorrect variable value");return Li(t)}fromString(t){const e=Li(t);return this.convertValue(e)}getType(){return"integer"}},boolean:class extends Gi{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 Gi{convertValue(t){if("string"!=typeof t||!Gt(t))throw new Error("Incorrect variable value");return t}fromString(t){return this.convertValue(t)}getType(){return"color"}},url:class extends Gi{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"url"}}};function Xi(t,e,n){if(!(e in Ki))throw new Error("Unsupported variable type");return new Ki[e](t,n)}function Yi(t,e,n){const r=t.slice();return r[78]=e[n],r}function Zi(t,e,n){const r=t.slice();return r[78]=e[n],r}function Qi(t){let e,n;return e=new We({props:{cls:oe("slider",Ti,t[21]),style:t[22],customDescription:!0,customActions:"slider",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[io]},$$scope:{ctx:t}}}),{c(){Pt(e.$$.fragment)},m(t,r){St(e,t,r),n=!0},p(t,n){const r={};2097152&n[0]&&(r.cls=oe("slider",Ti,t[21])),4194304&n[0]&&(r.style=t[22]),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),27246576&n[0]|2097152&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function to(t){let e,n;return{c(){e=z("div"),J(e,"class",n=Ti.slider__tick+" "+Ti.slider__tick_active),U(e,"--divkit-slider-tick",t[78])},m(t,n){S(t,e,n)},p(t,n){131072&n[0]&&U(e,"--divkit-slider-tick",t[78])},d(t){t&&D(e)}}}function eo(t){let e,n;return{c(){e=z("div"),J(e,"class",n=Ti.slider__tick+" "+Ti.slider__tick_inactive),U(e,"--divkit-slider-tick",t[78])},m(t,n){S(t,e,n)},p(t,n){262144&n[0]&&U(e,"--divkit-slider-tick",t[78])},d(t){t&&D(e)}}}function no(t){let e,n,r,i,o;return{c(){var a,s,l;e=z("div"),n=z("div"),r=M(t[6]),J(n,"class",i=Ti["slider__thumb-text-inner"]),U(n,"font-size",(null===(a=t[12])||void 0===a?void 0:a.fontSize)||"1em"),U(n,"font-weight",(null===(s=t[12])||void 0===s?void 0:s.fontWeight)||""),U(n,"color",(null===(l=t[12])||void 0===l?void 0:l.textColor)||"#000"),J(e,"class",o=Ti["slider__thumb-text"])},m(t,i){S(t,e,i),V(e,n),V(n,r)},p(t,e){var i,o,a;64&e[0]&&R(r,t[6]),4096&e[0]&&U(n,"font-size",(null===(i=t[12])||void 0===i?void 0:i.fontSize)||"1em"),4096&e[0]&&U(n,"font-weight",(null===(o=t[12])||void 0===o?void 0:o.fontWeight)||""),4096&e[0]&&U(n,"color",(null===(a=t[12])||void 0===a?void 0:a.textColor)||"#000")},d(t){t&&D(e)}}}function ro(t){let e,n,r,i,o;return{c(){var a,s,l;e=z("div"),n=z("div"),r=M(t[7]),J(n,"class",i=Ti["slider__thumb-text-inner"]),U(n,"font-size",(null===(a=t[13])||void 0===a?void 0:a.fontSize)||"1em"),U(n,"font-weight",(null===(s=t[13])||void 0===s?void 0:s.fontWeight)||""),U(n,"color",(null===(l=t[13])||void 0===l?void 0:l.textColor)||"#000"),J(e,"class",o=Ti["slider__thumb-text"]+" "+Ti["slider__thumb-text_secondary"])},m(t,i){S(t,e,i),V(e,n),V(n,r)},p(t,e){var i,o,a;128&e[0]&&R(r,t[7]),8192&e[0]&&U(n,"font-size",(null===(i=t[13])||void 0===i?void 0:i.fontSize)||"1em"),8192&e[0]&&U(n,"font-weight",(null===(o=t[13])||void 0===o?void 0:o.fontWeight)||""),8192&e[0]&&U(n,"color",(null===(a=t[13])||void 0===a?void 0:a.textColor)||"#000")},d(t){t&&D(e)}}}function io(t){let e,n,r,i,o,a,l,c,u,d,p,f,h,g,m,v,y,$,_,b,w,x,k=t[17],E=[];for(let e=0;e<k.length;e+=1)E[e]=to(Zi(t,k,e));let C=t[18],A=[];for(let e=0;e<C.length;e+=1)A[e]=eo(Yi(t,C,e));let j=t[12]&&no(t),P=t[37]&&function(t){let e,n,r=t[13]&&ro(t);return{c(){e=z("div"),r&&r.c(),J(e,"class",n=Ti.slider__thumb+" "+Ti.slider__thumb_secondary),U(e,"border-radius",Lt(t[9].borderRadius)),U(e,"background",t[9].background),U(e,"box-shadow",t[9].boxShadow||"")},m(t,n){S(t,e,n),r&&r.m(e,null)},p(t,n){t[13]?r?r.p(t,n):(r=ro(t),r.c(),r.m(e,null)):r&&(r.d(1),r=null),512&n[0]&&U(e,"border-radius",Lt(t[9].borderRadius)),512&n[0]&&U(e,"background",t[9].background),512&n[0]&&U(e,"box-shadow",t[9].boxShadow||"")},d(t){t&&D(e),r&&r.d()}}}(t),N=t[37]&&function(t){let e,n,r,i,o;return{c(){e=z("input"),J(e,"type","range"),J(e,"class",n=t[16]?Ti.slider__input:"".concat(Ti.slider__input," ").concat(Ti.slider__input_secondary)),J(e,"min",t[4]),J(e,"max",t[5]),J(e,"step","1"),e.value=r=t[16]?t[6]:t[7],J(e,"aria-label",t[20])},m(n,r){S(n,e,r),i||(o=[O(e,"input",t[68]),O(e,"mousedown",t[37]?t[40]:null),O(e,"touchstart",t[37]?t[40]:null)],i=!0)},p(t,i){65536&i[0]&&n!==(n=t[16]?Ti.slider__input:"".concat(Ti.slider__input," ").concat(Ti.slider__input_secondary))&&J(e,"class",n),16&i[0]&&J(e,"min",t[4]),32&i[0]&&J(e,"max",t[5]),65728&i[0]&&r!==(r=t[16]?t[6]:t[7])&&(e.value=r),1048576&i[0]&&J(e,"aria-label",t[20])},d(t){t&&D(e),i=!1,s(o)}}}(t);return{c(){e=z("div"),n=z("div"),r=z("div"),o=T(),a=z("div"),c=T();for(let t=0;t<E.length;t+=1)E[t].c();u=T();for(let t=0;t<A.length;t+=1)A[t].c();d=T(),p=z("div"),j&&j.c(),h=T(),P&&P.c(),g=T(),m=z("input"),$=T(),N&&N.c(),J(r,"class",i=Ti.slider__track),U(r,"height",Lt(t[10].height)),U(r,"border-radius",Lt(t[10].borderRadius)),U(r,"background",t[10].background),U(r,"box-shadow",t[10].boxShadow||""),J(a,"class",l=Ti["slider__active-track"]),U(a,"left",(100*t[23]).toFixed(2)+"%"),U(a,"width",(100*t[24]).toFixed(2)+"%"),U(a,"height",Lt(t[11].height)),U(a,"border-radius",Lt(t[11].borderRadius)),U(a,"background",t[11].background),U(a,"box-shadow",t[11].boxShadow||""),J(p,"class",f=Ti.slider__thumb),U(p,"border-radius",Lt(t[8].borderRadius)),U(p,"background",t[8].background),U(p,"box-shadow",t[8].boxShadow||""),J(m,"type","range"),J(m,"class",v=t[16]?"".concat(Ti.slider__input," ").concat(Ti.slider__input_secondary):Ti.slider__input),J(m,"min",t[4]),J(m,"max",t[5]),J(m,"step","1"),m.value=y=t[16]?t[7]:t[6],J(m,"aria-label",t[19]),J(n,"class",_=Ti["slider__tracks-inner"]),J(e,"class",b=Ti["slider__tracks-wrapper"])},m(i,s){S(i,e,s),V(e,n),V(n,r),V(n,o),V(n,a),V(n,c);for(let t=0;t<E.length;t+=1)E[t]&&E[t].m(n,null);V(n,u);for(let t=0;t<A.length;t+=1)A[t]&&A[t].m(n,null);V(n,d),V(n,p),j&&j.m(p,null),V(n,h),P&&P.m(n,null),V(n,g),V(n,m),V(n,$),N&&N.m(n,null),t[69](n),w||(x=O(m,"input",t[67]),w=!0)},p(t,e){if(1024&e[0]&&U(r,"height",Lt(t[10].height)),1024&e[0]&&U(r,"border-radius",Lt(t[10].borderRadius)),1024&e[0]&&U(r,"background",t[10].background),1024&e[0]&&U(r,"box-shadow",t[10].boxShadow||""),8388608&e[0]&&U(a,"left",(100*t[23]).toFixed(2)+"%"),16777216&e[0]&&U(a,"width",(100*t[24]).toFixed(2)+"%"),2048&e[0]&&U(a,"height",Lt(t[11].height)),2048&e[0]&&U(a,"border-radius",Lt(t[11].borderRadius)),2048&e[0]&&U(a,"background",t[11].background),2048&e[0]&&U(a,"box-shadow",t[11].boxShadow||""),131072&e[0]){let r;for(k=t[17],r=0;r<k.length;r+=1){const i=Zi(t,k,r);E[r]?E[r].p(i,e):(E[r]=to(i),E[r].c(),E[r].m(n,u))}for(;r<E.length;r+=1)E[r].d(1);E.length=k.length}if(262144&e[0]){let r;for(C=t[18],r=0;r<C.length;r+=1){const i=Yi(t,C,r);A[r]?A[r].p(i,e):(A[r]=eo(i),A[r].c(),A[r].m(n,d))}for(;r<A.length;r+=1)A[r].d(1);A.length=C.length}t[12]?j?j.p(t,e):(j=no(t),j.c(),j.m(p,null)):j&&(j.d(1),j=null),256&e[0]&&U(p,"border-radius",Lt(t[8].borderRadius)),256&e[0]&&U(p,"background",t[8].background),256&e[0]&&U(p,"box-shadow",t[8].boxShadow||""),t[37]&&P.p(t,e),65536&e[0]&&v!==(v=t[16]?"".concat(Ti.slider__input," ").concat(Ti.slider__input_secondary):Ti.slider__input)&&J(m,"class",v),16&e[0]&&J(m,"min",t[4]),32&e[0]&&J(m,"max",t[5]),65728&e[0]&&y!==(y=t[16]?t[7]:t[6])&&(m.value=y),524288&e[0]&&J(m,"aria-label",t[19]),t[37]&&N.p(t,e)},d(n){n&&D(e),F(E,n),F(A,n),j&&j.d(),P&&P.d(),N&&N.d(),t[69](null),w=!1,x()}}}function oo(t){let e,n,r,i,o=!t[14]&&Qi(t);return{c(){o&&o.c(),e=I()},m(a,s){o&&o.m(a,s),S(a,e,s),n=!0,r||(i=O(window,"resize",t[42]),r=!0)},p(t,n){t[14]?o&&(_t(),xt(o,1,1,(()=>{o=null})),bt()):o?(o.p(t,n),16384&n[0]&&wt(o,1)):(o=Qi(t),o.c(),wt(o,1),o.m(e.parentNode,e))},i(t){n||(wt(o),n=!0)},o(t){xt(o),n=!1},d(t){o&&o.d(t),t&&D(e),r=!1,i()}}}function ao(t,e,n,r,i){let o=[];if(i)for(let i=t;i<e;++i)o.push((i-n)/(r-n));else{for(let e=n;e<t;++e)o.push((e-n)/(r-n));for(let t=e;t<r+1;++t)o.push((t-n)/(r-n))}return o}function so(t,e,r){let i,o,a,s,l,c,u,d,p,g,m,v,y,$,_,b,w,x,k,E,C,A,V,j,P,S,D,F,z,N,M,T,I,O,J=n,B=n,R=n,U=n,L=n,W=n,H=n,q=n,G=n,K=n,X=n,Y=n;var Q,tt,nt,rt;t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>X())),t.$$.on_destroy.push((()=>Y()));let{json:ot={}}=e,{templateContext:at}=e,{origJson:st}=e,{layoutParams:lt}=e;const ct={width:10,height:10,borderRadius:5,background:"#000"},ut=["rounded_rectangle","circle"],dt=["rounded_rectangle"],pt=et(Ot),ft=et(be);let ht,gt=!1,mt=0,vt=100;const yt=pt.getJsonWithVars(ot.thumb_value_variable),$t=pt.getJsonWithVars(ot.thumb_secondary_value_variable);let _t=yt&&pt.getVariable(yt,"integer")||Xi("temp","integer",0);h(t,_t,(t=>r(64,T=t)));let bt=$t&&pt.getVariable($t,"integer")||Xi("temp","integer",0);h(t,bt,(t=>r(63,M=t)));let wt,xt,kt,Et=Oi(T||0,mt,vt),Ct=Oi(M||0,mt,vt),At=ct,Vt=At,jt=ct,Pt=ct,St=null,Dt=null,Ft=kt,zt="",Nt="",Mt=!1;function Tt(t,e){const n=Number(t.target.value);gt===("first"===e)?(r(7,Ct=n),bt.setValue(n)):(r(6,Et=n),_t.setValue(n))}let It=!1;function Bt(){if(!ht)return;const t=vt-mt,e=(null==St?void 0:St.width)||0,n=(null==Dt?void 0:Dt.width)||0;Math.max(e,n)*t>=(null==ht?void 0:ht.clientWidth)?It||(pt.logError(Jt(new Error("Slider ticks overlap each other"),{level:"warn"})),It=!0):It=!1}const Rt=hr(Bt,50);return Z((()=>{Bt()})),t.$$set=t=>{"json"in t&&r(0,ot=t.json),"templateContext"in t&&r(1,at=t.templateContext),"origJson"in t&&r(2,st=t.origJson),"layoutParams"in t&&r(3,lt=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(36,i=pt.getDerivedFromVars(ot.min_value)),Y(),Y=f(i,(t=>r(66,O=t)))),1&t.$$.dirty[0]&&(r(35,o=pt.getDerivedFromVars(ot.max_value)),X(),X=f(o,(t=>r(65,I=t)))),48&t.$$.dirty[0]|24&t.$$.dirty[2]&&(r(4,mt=me(O,mt)),r(5,vt=me(I,vt)),Bt()),112&t.$$.dirty[0]|4&t.$$.dirty[2]){const t=Oi(T||0,mt,vt);t!==Et&&r(6,Et=t)}if(176&t.$$.dirty[0]|2&t.$$.dirty[2]){const t=Oi(M||0,mt,vt);t!==Ct&&r(7,Ct=t)}if(1&t.$$.dirty[0]&&(r(34,a=pt.getDerivedFromVars(ot.thumb_style)),K(),K=f(a,(t=>r(62,N=t)))),256&t.$$.dirty[0]|1&t.$$.dirty[2]&&r(8,At=yn(N,ut,At)),1&t.$$.dirty[0]&&(r(33,s=pt.getDerivedFromVars(ot.thumb_secondary_style)),G(),G=f(s,(t=>r(61,z=t)))),256&t.$$.dirty[0]|1073741824&t.$$.dirty[1]&&r(9,Vt=yn(z,ut,At)),1&t.$$.dirty[0]&&(r(32,l=pt.getDerivedFromVars(ot.track_inactive_style)),q(),q=f(l,(t=>r(60,F=t)))),1024&t.$$.dirty[0]|536870912&t.$$.dirty[1]&&r(10,jt=yn(F,dt,jt)),1&t.$$.dirty[0]&&(r(31,c=pt.getDerivedFromVars(ot.track_active_style)),H(),H=f(c,(t=>r(59,D=t)))),2048&t.$$.dirty[0]|268435456&t.$$.dirty[1]&&r(11,Pt=yn(D,dt,Pt)),1&t.$$.dirty[0]&&(r(30,u=pt.getDerivedFromVars(ot.tick_mark_active_style)),W(),W=f(u,(t=>r(58,S=t)))),134217728&t.$$.dirty[1]){let t=yn(S,ut,ct);t!==ct&&r(47,St=t)}if(240&t.$$.dirty[0]|65536&t.$$.dirty[1]&&(St?(r(17,wt=$t?ao(Math.min(Et,Ct),Math.max(Et,Ct)+1,mt,vt,!0):ao(mt,Et,mt,vt,!0)),Bt()):r(17,wt=[])),1&t.$$.dirty[0]&&(r(29,d=pt.getDerivedFromVars(ot.tick_mark_inactive_style)),L(),L=f(d,(t=>r(57,P=t)))),67108864&t.$$.dirty[1]){let t=yn(P,ut,ct);t!==ct&&r(48,Dt=t)}if(240&t.$$.dirty[0]|131072&t.$$.dirty[1]&&(Dt?(r(18,xt=$t?ao(Math.min(Et,Ct),Math.max(Et,Ct)+1,mt,vt,!1):ao(Et+1,vt+1,mt,vt,!0)),Bt()):r(18,xt=[])),1&t.$$.dirty[0]&&(r(28,p=pt.getDerivedFromVars(ot.thumb_text_style)),U(),U=f(p,(t=>r(56,j=t)))),4096&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(12,kt=Ii(j,kt)),1&t.$$.dirty[0]&&(r(27,g=pt.getDerivedFromVars(ot.thumb_secondary_text_style)),R(),R=f(g,(t=>r(55,V=t)))),4096&t.$$.dirty[0]|16777216&t.$$.dirty[1]&&r(13,Ft=Ii(V,kt)),1&t.$$.dirty[0]&&(r(26,m=pt.getDerivedFromVars(ot.accessibility)),B(),B=f(m,(t=>r(54,A=t)))),8388608&t.$$.dirty[1]&&((null==A?void 0:A.description)?r(19,zt=A.description):pt.logError(Jt(new Error('Missing accessibility "description" for slider'),{level:"warn"}))),1&t.$$.dirty[0]&&(r(25,v=pt.getDerivedFromVars(ot.secondary_value_accessibility)),J(),J=f(v,(t=>r(53,C=t)))),4194304&t.$$.dirty[1]&&((null==C?void 0:C.description)?r(20,Nt=C.description):$t&&pt.logError(Jt(new Error('Missing second accessibility "description" for slider'),{level:"warn"}))),19712&t.$$.dirty[0]){let t=!1;ft.hasAction()?(pt.logError(Jt(new Error('Cannot show "slider" inside component with action'))),t=!0):At===ct?(pt.logError(Jt(new Error('Missing "thumb_style" in slider'))),t=!0):Pt===ct?(pt.logError(Jt(new Error('Missing "track_active_style" in slider'))),t=!0):jt===ct&&(pt.logError(Jt(new Error('Missing "track_inactive_style" in slider'))),t=!0),t!==Mt&&r(14,Mt=t)}768&t.$$.dirty[0]&&r(52,y=Lt(Math.max(...[At.width,Vt.width,0].filter(ce)))),768&t.$$.dirty[0]&&r(51,$=Lt(Math.max(...[At.height,Vt.height,0].filter(ce)))),112&t.$$.dirty[0]&&r(50,_=(Et-mt)/(vt-mt)),176&t.$$.dirty[0]&&r(49,b=$t?(Ct-mt)/(vt-mt):void 0),786432&t.$$.dirty[1]&&r(24,w=void 0!==b?Math.abs(b-_):_),786432&t.$$.dirty[1]&&r(23,x=void 0!==b?Math.min(b,_):0),13056&t.$$.dirty[0]|4190208&t.$$.dirty[1]&&r(22,k={"--divkit-slider-thumb-width":Lt(At.width),"--divkit-slider-thumb-height":Lt(At.height),"--divkit-slider-thumb-secondary-width":Lt(Vt.width),"--divkit-slider-thumb-secondary-height":Lt(Vt.height),"--divkit-slider-text-offset-x":(null===r(43,Q=null==kt?void 0:kt.offset)||void 0===Q?void 0:Q.x)?Wt(kt.offset.x):void 0,"--divkit-slider-text-offset-y":(null===r(44,tt=null==kt?void 0:kt.offset)||void 0===tt?void 0:tt.y)?Wt(kt.offset.y):void 0,"--divkit-slider-text-secondary-offset-x":(null===r(45,nt=null==Ft?void 0:Ft.offset)||void 0===nt?void 0:nt.x)?Wt(Ft.offset.x):void 0,"--divkit-slider-text-secondary-offset-y":(null===r(46,rt=null==Ft?void 0:Ft.offset)||void 0===rt?void 0:rt.y)?Wt(Ft.offset.y):void 0,"--divkit-slider-tick-active-width":St?Lt(St.width):void 0,"--divkit-slider-tick-active-height":St?Lt(St.height):void 0,"--divkit-slider-tick-active-border-radius":St?Lt(St.borderRadius):void 0,"--divkit-slider-tick-active-background":(null==St?void 0:St.background)||void 0,"--divkit-slider-tick-active-box-shadow":(null==St?void 0:St.boxShadow)||void 0,"--divkit-slider-tick-inactive-width":Dt?Lt(Dt.width):void 0,"--divkit-slider-tick-inactive-height":Dt?Lt(Dt.height):void 0,"--divkit-slider-tick-inactive-border-radius":Dt?Lt(Dt.borderRadius):void 0,"--divkit-slider-tick-inactive-background":(null==Dt?void 0:Dt.background)||void 0,"--divkit-slider-tick-inactive-box-shadow":(null==Dt?void 0:Dt.boxShadow)||void 0,"--divkit-slider-max-thumb-width":y,"--divkit-slider-max-thumb-height":$,"--divkit-slider-track-part":_,"--divkit-slider-track-secondary-part":b})},r(21,E={}),[ot,at,st,lt,mt,vt,Et,Ct,At,Vt,jt,Pt,kt,Ft,Mt,ht,gt,wt,xt,zt,Nt,E,k,x,w,v,m,g,p,d,u,c,l,s,a,o,i,$t,_t,bt,function(t){var e,n;const i="pageX"in t?t.pageX:null===(n=null===(e=t.changedTouches)||void 0===e?void 0:e[0])||void 0===n?void 0:n.pageX;if(void 0===i)return;const o=ht.getBoundingClientRect(),a=(i-o.left)/o.width,s=(vt-mt)*a,l=Math.round(Oi(s,mt,vt));r(16,gt=l<(Et+Ct)/2==Et<Ct)},Tt,Rt,Q,tt,nt,rt,St,Dt,b,_,$,y,C,A,V,j,P,S,D,F,z,N,M,T,I,O,t=>Tt(t,"first"),t=>Tt(t,"second"),function(t){it[t?"unshift":"push"]((()=>{ht=t,r(15,ht)}))}]}const lo={input:"divkit-c3a4c",input__wrapper:"divkit-ef7eb",input__holder:"divkit-bb3da",input_multiline:"divkit-e48a3",input__input:"divkit-f11e0","input_highlight-color":"divkit-cc00f","input_vertical-overflow":"divkit-b7075"};function co(t,e){if(t===e)return{start:t.length,added:0,removed:0};if(t.length>e.length){const n=co(e,t);return{start:n.start,added:n.removed,removed:n.added}}let n=0,r=e.length-1;const i=e.length-t.length;for(;n<r&&n<t.length&&t[n]===e[n];)++n;for(;r-i>=n&&t[r-i]===e[r];)--r;return++r,{start:n,added:r-n,removed:r-n-i}}function uo(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 po{constructor(t){this.char=t}}class fo{constructor(t,e,n){this.char=t,this.filter=e,this.placeholder=n}}class ho{constructor(t){uo(this,"filters",new Map),uo(this,"destructedValue",[]),uo(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 po)t+=n.char;else if(n instanceof fo)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 fo&&!t.char));return-1!==t?t:this.destructedValue.length}updateMaskData(t){const e=this.rawValue;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(Jt(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 fo(null,this.filters.get(e.key),e.placeholder):new po(t)})),this.overrideRawValue(e)}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=co(this.value,t);void 0!==e&&(n.start=Math.max(0,e-n.added));const r=this.buildBodySubstring(n,t),i=this.buildTailSubstring(n);this.cleanup(n);const o=this.firstEmptyHolderIndex(),a=this.calculateMaxShift(i,o);this.replaceChars(r,o,a);const s=this.firstEmptyHolderIndex();this.replaceChars(i,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 fo&&++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 fo&&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 fo&&(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 i=()=>{for(var t;r<this.destructedValue.length&&!(this.destructedValue[r]instanceof fo);)++r;return null===(t=this.destructedValue[r])||void 0===t?void 0:t.filter};return t.split("").forEach((t=>{const e=i();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 fo&&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 i=e,o=0;for(;i<this.destructedValue.length&&o<r.length;){const t=this.destructedValue[i],e=r[o];t instanceof fo&&(t.char=e,++o),++i}}firstHolderAfter(t){let e=t;for(;e<this.destructedValue.length&&!(this.destructedValue[e]instanceof fo);)++e;return e}}class go extends ho{constructor(t,e){super(t),this.logError=e}onException(t){this.logError(t)}}function mo(t){let e,n;return e=new We({props:{cls:oe("input",lo,t[14]),style:t[13],customDescription:!0,customActions:"input",customPaddings:!0,json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[_o]},$$scope:{ctx:t}}}),{c(){Pt(e.$$.fragment)},m(t,r){St(e,t,r),n=!0},p(t,n){const r={};16384&n[0]&&(r.cls=oe("input",lo,t[14])),8192&n[0]&&(r.style=t[13]),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),400880&n[0]|16384&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function vo(t){let e;return{c(){e=M("")},m(t,n){S(t,e,n)},d(t){t&&D(e)}}}function yo(t){let e,n,r,i,o;return{c(){e=z("input"),J(e,"type",t[10]),J(e,"class",n=lo.input__input),J(e,"autocomplete","off"),J(e,"autocapitalize","off"),J(e,"aria-label",t[11]),J(e,"style",r=Ut({padding:t[5]})),J(e,"placeholder",t[17]),e.value=t[4]},m(n,r){S(n,e,r),t[65](e),i||(o=[O(e,"input",t[33]),O(e,"mousedown",(function(){l(t[18]?t[34]:void 0)&&(t[18]?t[34]:void 0).apply(this,arguments)})),O(e,"click",(function(){l(t[18]?t[35]:void 0)&&(t[18]?t[35]:void 0).apply(this,arguments)}))],i=!0)},p(n,i){t=n,1024&i[0]&&J(e,"type",t[10]),2048&i[0]&&J(e,"aria-label",t[11]),32&i[0]&&r!==(r=Ut({padding:t[5]}))&&J(e,"style",r),131072&i[0]&&J(e,"placeholder",t[17]),16&i[0]&&e.value!==t[4]&&(e.value=t[4])},d(n){n&&D(e),t[65](null),i=!1,s(o)}}}function $o(t){let e,n,r,i,o;return{c(){e=z("textarea"),J(e,"class",n=lo.input__input),J(e,"autocomplete","off"),J(e,"autocapitalize","off"),J(e,"aria-label",t[11]),J(e,"style",r=Ut({padding:t[5]})),J(e,"placeholder",t[17]),e.value=t[4]},m(n,r){S(n,e,r),t[64](e),i||(o=[O(e,"input",t[33]),O(e,"mousedown",(function(){l(t[18]?t[34]:void 0)&&(t[18]?t[34]:void 0).apply(this,arguments)})),O(e,"click",(function(){l(t[18]?t[35]:void 0)&&(t[18]?t[35]:void 0).apply(this,arguments)}))],i=!0)},p(n,i){t=n,2048&i[0]&&J(e,"aria-label",t[11]),32&i[0]&&r!==(r=Ut({padding:t[5]}))&&J(e,"style",r),131072&i[0]&&J(e,"placeholder",t[17]),16&i[0]&&(e.value=t[4])},d(n){n&&D(e),t[64](null),i=!1,s(o)}}}function _o(t){let e,n,r,i,o,a,s,l=t[4].endsWith("\n")||!t[4],c=l&&vo();function u(t,e){return t[6]?$o:yo}let d=u(t),p=d(t);return{c(){e=z("span"),n=z("span"),r=M(t[4]),c&&c.c(),o=T(),p.c(),J(n,"class",i=lo.input__holder),J(n,"aria-hidden","true"),J(e,"class",a=lo.input__wrapper),J(e,"style",s=Ut(t[12]))},m(i,a){S(i,e,a),V(e,n),V(n,r),c&&c.m(n,null),t[63](n),V(e,o),p.m(e,null)},p(t,i){16&i[0]&&R(r,t[4]),16&i[0]&&(l=t[4].endsWith("\n")||!t[4]),l?c||(c=vo(),c.c(),c.m(n,null)):c&&(c.d(1),c=null),d===(d=u(t))&&p?p.p(t,i):(p.d(1),p=d(t),p&&(p.c(),p.m(e,null))),4096&i[0]&&s!==(s=Ut(t[12]))&&J(e,"style",s)},d(n){n&&D(e),c&&c.d(),t[63](null),p.d()}}}function bo(t){let e,n,r=!t[9]&&mo(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),S(t,e,i),n=!0},p(t,n){t[9]?r&&(_t(),xt(r,1,1,(()=>{r=null})),bt()):r?(r.p(t,n),512&n[0]&&wt(r,1)):(r=mo(t),r.c(),wt(r,1),r.m(e.parentNode,e))},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function wo(t,e,r){let i,o,a,s,l,c,u,d,p,g,m,v,y,$,b,w,x,k,E,C,A,V,j,P=n,S=n;var D;t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>S()));let{json:F={}}=e,{templateContext:z}=e,{origJson:N}=e,{layoutParams:M}=e;const T=et(Ot);let I,O,J=!1,B=!1,R=null;const U=F.text_variable,L=null===(D=F.mask)||void 0===D?void 0:D.raw_text_variable;let W=!1;U||(W=!0,T.logError(Jt(new Error('Missing "text_variable" in "input"'))));let H=U&&T.getVariable(U,"string")||Xi("temp","string","");h(t,H,(t=>r(48,d=t)));let q=L&&T.getVariable(L,"string")||Xi("temp","string","");h(t,q,(t=>r(49,p=t)));let G="";const K=T.getDerivedFromVars(F.mask);h(t,K,(t=>r(62,V=t)));const X=T.getDerivedFromVars(F.hint_text);h(t,X,(t=>r(61,A=t)));const Y=T.getDerivedFromVars(F.hint_color);h(t,Y,(t=>r(60,C=t)));let Q="";const tt=T.getDerivedFromVars(F.font_size);h(t,tt,(t=>r(59,E=t)));let nt=12;const rt=T.getDerivedFromVars(F.font_weight);let ot;h(t,rt,(t=>r(58,k=t)));const at=T.getDerivedFromVars(F.line_height);let st;h(t,at,(t=>r(57,x=t)));const lt=T.getDerivedFromVars(F.letter_spacing);h(t,lt,(t=>r(56,w=t)));let ct="";const dt=T.getDerivedFromVars(F.text_color);h(t,dt,(t=>r(55,b=t)));let pt="#000";const ft=T.getDerivedFromVars(F.highlight_color);h(t,ft,(t=>r(54,$=t)));let ht="";const gt=T.getDerivedFromVars(F.keyboard_type);h(t,gt,(t=>r(53,y=t)));const mt={email:"email",number:"number",phone:"tel",single_line_text:"text",multi_line_text:"text",uri:"url"};let vt="multi_line_text",yt="text";const $t=T.getDerivedFromVars(F.max_visible_lines);h(t,$t,(t=>r(52,v=t)));let _t="",bt=null,wt="",xt="";const kt=T.getDerivedFromVars(F.select_all_on_focus);function Et(){r(36,B=O.scrollHeight>O.offsetHeight)}async function Ct(){if(!I||!R)return;R.overrideRawValue(p),q.set(R.rawValue),_(H,d=r(4,G=R.value),d);const t=R.cursorPosition;await ut(),document.activeElement===I&&r(7,I.selectionStart=r(7,I.selectionEnd=t,I),I)}return h(t,kt,(t=>r(18,j=t))),Z((()=>{Et(),I&&R&&p&&(R.overrideRawValue(p),_(H,d=r(4,G=R.value),d))})),t.$$set=t=>{"json"in t&&r(0,F=t.json),"templateContext"in t&&r(1,z=t.templateContext),"origJson"in t&&r(2,N=t.origJson),"layoutParams"in t&&r(3,M=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[2]&&(r(37,R=function(t,e,n){if("fixed_length"===(null==t?void 0:t.type)&&"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 go(r,e)}return n||null}(V,T.logError,R)),R&&Ct()),16&t.$$.dirty[0]|131136&t.$$.dirty[1]&&(R||G===d||r(4,G=d)),262208&t.$$.dirty[1]&&R&&R.rawValue!==p&&Ct(),1073741824&t.$$.dirty[1]&&r(17,i=A),536871040&t.$$.dirty[1]&&r(38,Q=qt(C,1,Q)),268435712&t.$$.dirty[1]&&r(39,nt=qe(E,nt)),134218240&t.$$.dirty[1]&&r(40,ot=Ke(k,ot)),67109120&t.$$.dirty[1]){const t=x;je(t)&&r(41,st=t/nt)}33554432&t.$$.dirty[1]&&le(w)&&r(42,ct=Lt(w)),16781312&t.$$.dirty[1]&&r(43,pt=qt(b,1,pt)),8396800&t.$$.dirty[1]&&r(44,ht=qt($,1,ht)),4194304&t.$$.dirty[1]&&y&&y in mt&&(r(10,yt=mt[y]),r(45,vt=y)),16384&t.$$.dirty[1]&&r(6,o="multi_line_text"===vt),1&t.$$.dirty[0]&&(r(16,a=T.getDerivedFromVars(F.paddings)),S(),S=f(a,(t=>r(51,m=t)))),3212544&t.$$.dirty[1]&&(je(v)&&r(46,_t="calc(".concat(v*(st||1.25)*(nt/10)+"em"," + ").concat(Wt(de(null==m?void 0:m.top,0)+de(null==m?void 0:m.bottom,0)),")")),r(47,bt=ye(m||void 0,bt)),r(5,wt=bt?se({top:(Number(bt.top)||0)/nt*10,right:(Number(bt.right)||0)/nt*10,bottom:(Number(bt.bottom)||0)/nt*10,left:(Number(bt.left)||0)/nt*10}):"")),1&t.$$.dirty[0]&&(r(15,s=T.getDerivedFromVars(F.accessibility)),P(),P=f(s,(t=>r(50,g=t)))),524288&t.$$.dirty[1]&&((null==g?void 0:g.description)?r(11,xt=g.description):T.logError(Jt(new Error('Missing accessibility "description" for input'),{level:"warn"}))),64&t.$$.dirty[0]|8224&t.$$.dirty[1]&&r(14,l={"highlight-color":Boolean(ht),"vertical-overflow":B,multiline:o}),48768&t.$$.dirty[1]&&r(13,c={"--divkit-input-hint-color":Q,"--divkit-input-highlight-color":ht,"font-weight":ot,"line-height":st,"letter-spacing":ct,color:pt,"max-height":_t}),32&t.$$.dirty[0]|256&t.$$.dirty[1]&&r(12,u={"font-size":Lt(nt),padding:wt})},[F,z,N,M,G,wt,o,I,O,W,yt,xt,u,c,l,s,a,i,j,H,q,K,X,Y,tt,rt,at,lt,dt,ft,gt,$t,kt,function(t){const e=t.target.value||"";G!==e&&(r(4,G=e),H.setValue(e),R&&async function(){if(!I||!R)return;R.applyChangeFrom(G,null!==I.selectionEnd?I.selectionEnd:void 0),q.set(R.rawValue),_(H,d=r(4,G=R.value),d);const t=R.cursorPosition;await ut(),document.activeElement===I&&r(7,I.selectionStart=r(7,I.selectionEnd=t,I),I)}()),Et()},function(){J=!1,setTimeout((()=>{J=!0}),250)},function(){J||I.select()},B,R,Q,nt,ot,st,ct,pt,ht,vt,_t,bt,d,p,g,m,v,y,$,b,w,x,k,E,C,A,V,function(t){it[t?"unshift":"push"]((()=>{O=t,r(8,O)}))},function(t){it[t?"unshift":"push"]((()=>{I=t,r(7,I)}))},function(t){it[t?"unshift":"push"]((()=>{I=t,r(7,I)}))}]}const xo={select:"divkit-feef3","select__select-text":"divkit-cd862",select_hint:"divkit-a3cf6",select__select:"divkit-bdb72",select__option:"divkit-e774b"};function ko(t,e,n){const r=t.slice();return r[44]=e[n],r}function Eo(t){let e,n;return e=new We({props:{cls:oe("select",xo,t[10]),style:t[9],customDescription:!0,customActions:"select",customPaddings:!0,json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Ao]},$$scope:{ctx:t}}}),{c(){Pt(e.$$.fragment)},m(t,r){St(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.cls=oe("select",xo,t[10])),512&n[0]&&(r.style=t[9]),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),4560&n[0]|65536&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(wt(e.$$.fragment,t),n=!0)},o(t){xt(e.$$.fragment,t),n=!1},d(t){Dt(e,t)}}}function Co(t){let e,r,i,o,a=(t[44].text||t[44].value)+"";return{c(){e=z("option"),r=M(a),J(e,"class",i=xo.select__option),e.__value=o=t[44].value,e.value=e.__value},m(t,n){S(t,e,n),V(e,r)},p:n,d(t){t&&D(e)}}}function Ao(t){let e,n,r,i,o,a,s,l,c,u=((t[4]?t[6]:t[12])||"")+"",d=t[15],p=[];for(let e=0;e<d.length;e+=1)p[e]=Co(ko(t,d,e));return{c(){e=z("span"),n=M(u),o=T(),a=z("select");for(let t=0;t<p.length;t+=1)p[t].c();J(e,"class",r=xo["select__select-text"]),J(e,"style",i=Ut({padding:t[7]})),J(e,"aria-hidden","true"),J(a,"class",s=xo.select__select),J(a,"aria-label",t[8]),void 0===t[4]&&dt((()=>t[39].call(a)))},m(r,i){S(r,e,i),V(e,n),S(r,o,i),S(r,a,i);for(let t=0;t<p.length;t+=1)p[t]&&p[t].m(a,null);L(a,t[4],!0),l||(c=O(a,"change",t[39]),l=!0)},p(t,r){if(4176&r[0]&&u!==(u=((t[4]?t[6]:t[12])||"")+"")&&R(n,u),128&r[0]&&i!==(i=Ut({padding:t[7]}))&&J(e,"style",i),32768&r[0]){let e;for(d=t[15],e=0;e<d.length;e+=1){const n=ko(t,d,e);p[e]?p[e].p(n,r):(p[e]=Co(n),p[e].c(),p[e].m(a,null))}for(;e<p.length;e+=1)p[e].d(1);p.length=d.length}256&r[0]&&J(a,"aria-label",t[8]),32784&r[0]&&L(a,t[4])},d(t){t&&D(e),t&&D(o),t&&D(a),F(p,t),l=!1,c()}}}function Vo(t){let e,n,r=!t[5]&&Eo(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),S(t,e,i),n=!0},p(t,n){t[5]?r&&(_t(),xt(r,1,1,(()=>{r=null})),bt()):r?(r.p(t,n),32&n[0]&&wt(r,1)):(r=Eo(t),r.c(),wt(r,1),r.m(e.parentNode,e))},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function jo(t,e,r){let i,o,a,s,l,c,u,d,p,g,m,v,y,$,_,b=n,w=n;t.$$.on_destroy.push((()=>b())),t.$$.on_destroy.push((()=>w()));let{json:x={}}=e,{templateContext:k}=e,{origJson:E}=e,{layoutParams:C}=e;const A=et(Ot),V=A.getJsonWithVars(x.value_variable);let j=!1;V||(j=!0,A.logError(Jt(new Error('Missing "value_variable" in "select"'))));let P=V&&A.getVariable(V,"string")||Xi("temp","string","");h(t,P,(t=>r(4,c=t)));let S="";const D=x.options,F=Array.isArray(D)&&D.filter((t=>"string"==typeof t.value))||[];Array.isArray(F)&&F.length||A.logError(Jt(new Error('Empty selection "items" in "select"')));let z="",N=null,M="";const T=A.getDerivedFromVars(x.hint_text);h(t,T,(t=>r(37,$=t)));const I=A.getDerivedFromVars(x.hint_color);h(t,I,(t=>r(36,y=t)));let O="rgba(0,0,0,.45)";const J=A.getDerivedFromVars(x.font_size);h(t,J,(t=>r(35,v=t)));let B=12;const R=A.getDerivedFromVars(x.font_weight);let U;h(t,R,(t=>r(34,m=t)));const L=A.getDerivedFromVars(x.line_height);let W;h(t,L,(t=>r(33,g=t)));const H=A.getDerivedFromVars(x.letter_spacing);h(t,H,(t=>r(32,p=t)));let q="";const G=A.getDerivedFromVars(x.text_color);h(t,G,(t=>r(31,d=t)));let K="#000",X="";return t.$$set=t=>{"json"in t&&r(0,x=t.json),"templateContext"in t&&r(1,k=t.templateContext),"origJson"in t&&r(2,E=t.origJson),"layoutParams"in t&&r(3,C=t.layoutParams)},t.$$.update=()=>{if(16&t.$$.dirty[0]&&(S=c),16&t.$$.dirty[0]){const t=F.find((t=>t.value===c));t?r(6,z=t.text||t.value):(r(6,z=""),c&&A.logError(Jt(new Error('Value from the variable was not found in the selection items for "select"'))))}if(1&t.$$.dirty[0]&&(r(13,i=A.getDerivedFromVars(x.paddings)),w(),w=f(i,(t=>r(38,_=t)))),8388608&t.$$.dirty[0]|128&t.$$.dirty[1]&&(r(23,N=ye(_||void 0,N)),r(7,M=N?se(N):"")),64&t.$$.dirty[1]&&r(12,o=$),16777216&t.$$.dirty[0]|32&t.$$.dirty[1]&&r(24,O=qt(y,1,O)),33554432&t.$$.dirty[0]|16&t.$$.dirty[1]&&r(25,B=qe(v,B)),67108864&t.$$.dirty[0]|8&t.$$.dirty[1]&&r(26,U=Ke(m,U)),33554432&t.$$.dirty[0]|4&t.$$.dirty[1]){const t=g;je(t)&&r(27,W=t/B)}33554432&t.$$.dirty[0]|2&t.$$.dirty[1]&&le(p)&&r(28,q=Lt(p/B*10)),536870912&t.$$.dirty[0]|1&t.$$.dirty[1]&&r(29,K=qt(d,1,K)),1&t.$$.dirty[0]&&(r(11,a=A.getDerivedFromVars(x.accessibility)),b(),b=f(a,(t=>r(30,u=t)))),1073741824&t.$$.dirty[0]&&((null==u?void 0:u.description)?r(8,X=u.description):A.logError(Jt(new Error('Missing accessibility "description" for select'),{level:"warn"}))),16&t.$$.dirty[0]&&r(10,s={hint:!c}),1056964608&t.$$.dirty[0]&&r(9,l={"--divkit-input-hint-color":O,"font-size":Lt(B),"font-weight":U,"line-height":W,"letter-spacing":q,color:K})},[x,k,E,C,c,j,z,M,X,l,s,a,o,i,P,F,T,I,J,R,L,H,G,N,O,B,U,W,q,K,u,d,p,g,m,v,y,$,_,function(){c=function(t){const e=t.querySelector(":checked");return e&&e.__value}(this),P.set(c),r(15,F)}]}const Po={};function So(t){let e,n,r;var i=t[5];function o(t){return{props:{json:t[3],templateContext:t[4],layoutParams:t[2],origJson:t[1]||t[0]}}}return i&&(e=W(i,o(t))),{c(){e&&Pt(e.$$.fragment),n=I()},m(t,i){e&&St(e,t,i),S(t,n,i),r=!0},p(t,r){const a={};if(8&r&&(a.json=t[3]),16&r&&(a.templateContext=t[4]),4&r&&(a.layoutParams=t[2]),3&r&&(a.origJson=t[1]||t[0]),32&r&&i!==(i=t[5])){if(e){_t();const t=e;xt(t.$$.fragment,1,0,(()=>{Dt(t,1)})),bt()}i?(e=W(i,o(t)),Pt(e.$$.fragment),wt(e.$$.fragment,1),St(e,n.parentNode,n)):e=null}else i&&e.$set(a)},i(t){r||(e&&wt(e.$$.fragment,t),r=!0)},o(t){e&&xt(e.$$.fragment,t),r=!1},d(t){t&&D(n),e&&Dt(e,t)}}}function Do(t){let e,n,r=t[5]&&So(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),S(t,e,i),n=!0},p(t,n){let[i]=n;t[5]?r?(r.p(t,i),32&i&&wt(r,1)):(r=So(t),r.c(),wt(r,1),r.m(e.parentNode,e)):r&&(_t(),xt(r,1,1,(()=>{r=null})),bt())},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function Fo(t,e,n){let{div:r}=e,{templateContext:i}=e,{origJson:o}=e,{layoutParams:a}=e;const s=et(Ot);let l,c,u;return t.$$set=t=>{"div"in t&&n(0,r=t.div),"templateContext"in t&&n(6,i=t.templateContext),"origJson"in t&&n(1,o=t.origJson),"layoutParams"in t&&n(2,a=t.layoutParams)},t.$$.update=()=>{if(121&t.$$.dirty&&(n(3,l=r),n(4,c=i),n(5,u=l&&Po[l.type]||void 0),!u&&(n(4,({templateContext:c,json:l}=s.processTemplate(l,c)),c,(n(3,l),n(0,r),n(6,i),n(5,u),n(4,c))),n(5,u=l&&Po[l.type]||void 0),!u))){let t;t=(null==l?void 0:l.type)&&s.hasTemplate(l.type)?"Recursive template":"Unknown component",s.logError(Jt(new Error(t),{additional:{component:(null==l?void 0:l.type)||"<missing>"}}))}},[r,o,a,l,c,u,i]}Po.text=class extends zt{constructor(t){super(),Ft(this,t,mn,gn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Po.container=class extends zt{constructor(t){super(),Ft(this,t,In,Tn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Po.separator=class extends zt{constructor(t){super(),Ft(this,t,Ln,Un,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}},Po.image=er,Po.gif=er,Po.grid=class extends zt{constructor(t){super(),Ft(this,t,dr,ur,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Po.gallery=class extends zt{constructor(t){super(),Ft(this,t,Cr,Er,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},Po.tabs=class extends zt{constructor(t){super(),Ft(this,t,Ur,Rr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},Po.state=class extends zt{constructor(t){super(),Ft(this,t,bi,$i,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}},Po.pager=class extends zt{constructor(t){super(),Ft(this,t,ji,Vi,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Po.indicator=class extends zt{constructor(t){super(),Ft(this,t,Mi,Ni,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Po.slider=class extends zt{constructor(t){super(),Ft(this,t,so,oo,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},Po.input=class extends zt{constructor(t){super(),Ft(this,t,wo,bo,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},Po.select=class extends zt{constructor(t){super(),Ft(this,t,jo,Vo,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}};const zo=class extends zt{constructor(t){super(),Ft(this,t,Fo,Do,d,{div:0,templateContext:6,origJson:1,layoutParams:2})}},No={"root-svg-filters":"divkit-dc22b"};function Mo(t,e,n){const r=t.slice();r[1]=e[n];const i=r[1].split(":");return r[2]=i[0],r[3]=i[1],r}function To(t){let e,n,r,i=[...Object.keys(t[0])],o=[];for(let e=0;e<i.length;e+=1)o[e]=Bo(Mo(t,i,e));return{c(){e=N("svg"),n=N("defs");for(let t=0;t<o.length;t+=1)o[t].c();J(e,"class",r=No["root-svg-filters"]),J(e,"aria-hidden","true")},m(t,r){S(t,e,r),V(e,n);for(let t=0;t<o.length;t+=1)o[t]&&o[t].m(n,null)},p(t,e){if(1&e){let r;for(i=[...Object.keys(t[0])],r=0;r<i.length;r+=1){const a=Mo(t,i,r);o[r]?o[r].p(a,e):(o[r]=Bo(a),o[r].c(),o[r].m(n,null))}for(;r<o.length;r+=1)o[r].d(1);o.length=i.length}},d(t){t&&D(e),F(o,t)}}}function Io(t){let e,n;return{c(){e=N("feBlend"),J(e,"in2","SourceGraphic"),J(e,"mode",n=t[3])},m(t,n){S(t,e,n)},p(t,r){1&r&&n!==(n=t[3])&&J(e,"mode",n)},d(t){t&&D(e)}}}function Oo(t){let e;return{c(){e=N("feComposite"),J(e,"in2","SourceGraphic"),J(e,"operator","arithmetic"),J(e,"k1","1"),J(e,"k2","0"),J(e,"k3","0"),J(e,"k4","0")},m(t,n){S(t,e,n)},p:n,d(t){t&&D(e)}}}function Jo(t){let e,n;return{c(){e=N("feComposite"),J(e,"in2","SourceGraphic"),J(e,"operator",n=t[3].split("_")[1])},m(t,n){S(t,e,n)},p(t,r){1&r&&n!==(n=t[3].split("_")[1])&&J(e,"operator",n)},d(t){t&&D(e)}}}function Bo(t){let e,n,r,i;function o(t,e){return"source_in"===t[3]||"source_atop"===t[3]?Jo:"multiply"===t[3]?Oo:Io}let a=o(t),s=a(t);return{c(){e=N("filter"),n=N("feFlood"),s.c(),J(n,"flood-color",r=t[2]),J(e,"id",i=t[0][t[1]])},m(t,r){S(t,e,r),V(e,n),s.m(e,null)},p(t,l){1&l&&r!==(r=t[2])&&J(n,"flood-color",r),a===(a=o(t))&&s?s.p(t,l):(s.d(1),s=a(t),s&&(s.c(),s.m(e,null))),1&l&&i!==(i=t[0][t[1]])&&J(e,"id",i)},d(t){t&&D(e),s.d()}}}function Ro(t){let e,r=Object.keys(t[0]).length,i=r&&To(t);return{c(){i&&i.c(),e=I()},m(t,n){i&&i.m(t,n),S(t,e,n)},p(t,n){let[o]=n;1&o&&(r=Object.keys(t[0]).length),r?i?i.p(t,o):(i=To(t),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null)},i:n,o:n,d(t){i&&i.d(t),t&&D(e)}}}function Uo(t,e,n){let{svgFiltersMap:r}=e;return t.$$set=t=>{"svgFiltersMap"in t&&n(0,r=t.svgFiltersMap)},[r]}const Lo=class extends zt{constructor(t){super(),Ft(this,t,Uo,Ro,d,{svgFiltersMap:0})}};function Wo(t,e,n,r){const i=n[t.type];if(!i)return r(Jt(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,n){const r=Object.keys(n).filter((t=>"__proto__"!==t)),i=r.filter((t=>"$"!==t.charAt(0))),o=r.filter((t=>"$"===t.charAt(0)));return i.forEach((r=>{const i=n[r];"object"==typeof i&&null!==i?(e[r]=Array.isArray(i)?[]:{},t(e[r],i)):e[r]=i})),o.forEach((t=>{const r=n[t],i=a[r];if(void 0!==i){const n=t.substring(1);e[n]=i}})),e}({},i);for(o in t)"type"!==o&&"__proto__"!==o&&t.hasOwnProperty(o)&&(s[o]=t[o]);return{json:s,templateContext:a}}function Ho(){}function qo(t){return{subscribe:e=>(e(t),Ho)}}function Go(t,e){return e.reduce(((t,e)=>({type:"BinaryExpression",operator:e[1],left:t,right:e[3]})),t)}function Ko(t,e){return e.reduce(((t,e)=>({type:"LogicalExpression",operator:e[1],left:t,right:e[3]})),t)}function Xo(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 Yo(t){try{return Li(t)}catch(e){throw new Error("Value ".concat(t," can't be converted to Integer type."))}}function Zo(t){if("'"===t||"\\"===t)return t;throw new Error("Incorrect string escape")}function Qo(t,e,n,r){var i=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(i,Qo.prototype),i.expected=e,i.found=n,i.location=r,i.name="SyntaxError",i}function ta(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,t+(n+=n.repeat(e)).slice(0,e))}function ea(t,e){var n,r={},i=(e=void 0!==e?e:{}).grammarSource,o={start:Ae,JsonStringContents:function(){var t,e,n;for(t=he,e=[],n=Ve();n!==r;)e.push(n),n=Ve();return ge=t,e=St(e)}},a=Ae,s="@{",l="}",c="@{}",u="\\",d="?",p=":",f="||",h="&&",g="==",m="!=",v=">=",y=">",$="<=",_="<",b="+",w="-",x="/",k="*",E="%",C="!",A="(",V=")",j=",",P="'",S=".",D="e",F="E",z="true",N="false",M=/^[^}]/,T=/^[^'}]/,I=/^[0-9]/,O=/^[a-zA-Z_0-9.]/,J=/^[a-zA-Z_]/,B=/^[ \t\r\n]/,R=be("@{",!1),U=be("}",!1),L=be("@{}",!1),W=be("\\",!1),H={type:"any"},q=we(["}"],!0,!1),G=be("?",!1),K=be(":",!1),X=be("||",!1),Y=be("&&",!1),Z=be("==",!1),Q=be("!=",!1),tt=be(">=",!1),et=be(">",!1),nt=be("<=",!1),rt=be("<",!1),it=be("+",!1),ot=be("-",!1),at=be("/",!1),st=be("*",!1),lt=be("%",!1),ct=be("!",!1),ut=be("(",!1),dt=be(")",!1),pt=be(",",!1),ft=xe("string"),ht=be("'",!1),gt=we(["'","}"],!0,!1),mt=xe("integer"),vt=we([["0","9"]],!1,!1),yt=xe("number"),$t=be(".",!1),_t=be("e",!1),bt=be("E",!1),wt=xe("boolean"),xt=be("true",!1),kt=be("false",!1),Et=we([["a","z"],["A","Z"],"_",["0","9"],"."],!1,!1),Ct=xe("identifier"),At=we([["a","z"],["A","Z"],"_"],!1,!1),Vt=xe("whitespace"),jt=we([" ","\t","\r","\n"],!1,!1),Pt=function(t){return t},St=function(t){return Xo(t)},Dt=function(t){return t},Ft=function(){return""},zt=function(){return _e()},Nt=function(){throw new Error("Error tokenizing '"+t+"'.")},Mt=function(){throw new Error("Error tokenizing '"+t+"'.")},Tt=function(t){return t},It=function(t){return Zo(t)},Ot=function(){throw new Error("Error tokenizing '"+t+"'.")},Jt=function(t,e,n){return{type:"ConditionalExpression",test:t,consequent:e,alternate:n}},Bt=function(t,e){return Ko(t,e)},Rt=function(t,e){return Ko(t,e)},Ut=function(t,e){return Go(t,e)},Lt=function(t,e){return Go(t,e)},Wt=function(t,e){return Go(t,e)},Ht=function(t,e){return Go(t,e)},qt=function(t,e){return{type:"UnaryExpression",operator:t,argument:e}},Gt=function(t,e){return{type:"CallExpression",callee:t,arguments:e}},Kt=function(t){return{type:"Variable",id:t}},Xt=function(t,e){return[t,...e]},Yt=function(t){return t},Zt=function(t){return t},Qt=function(t){return Xo(t)},te=function(t){return t},ee=function(){return""},ne=function(){return _e()},re=function(){throw new Error("Error tokenizing '"+t+"'.")},ie=function(){throw new Error("Error tokenizing '"+t+"'.")},oe=function(t){return t},ae=function(t){return Zo(t)},se=function(){throw new Error("Error tokenizing '"+t+"'.")},le=function(){return{type:"IntegerLiteral",value:Yo(_e())}},ce=function(){return{type:"NumberLiteral",value:parseFloat(_e())}},ue=function(){return{type:"NumberLiteral",value:parseFloat(_e())}},de=function(){return{type:"BooleanLiteral",value:!0}},pe=function(){return{type:"BooleanLiteral",value:!1}},fe=function(){return{type:"Identifier",name:_e()}},he=0,ge=0,me=[{line:1,column:1}],ve=0,ye=[],$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 _e(){return t.substring(ge,he)}function be(t,e){return{type:"literal",text:t,ignoreCase:e}}function we(t,e,n){return{type:"class",parts:t,inverted:e,ignoreCase:n}}function xe(t){return{type:"other",description:t}}function ke(e){var n,r=me[e];if(r)return r;for(n=e-1;!me[n];)n--;for(r={line:(r=me[n]).line,column:r.column};n<e;)10===t.charCodeAt(n)?(r.line++,r.column=1):r.column++,n++;return me[e]=r,r}function Ee(t,e,n){var r=ke(t),o=ke(e),a={source:i,start:{offset:t,line:r.line,column:r.column},end:{offset:e,line:o.line,column:o.column}};return n&&i&&"function"==typeof i.offset&&(a.start=i.offset(a.start),a.end=i.offset(a.end)),a}function Ce(t){he<ve||(he>ve&&(ve=he,ye=[]),ye.push(t))}function Ae(){var t,e;return t=he,Be(),(e=je())!==r?(Be(),ge=t,t=Pt(e)):(he=t,t=r),t}function Ve(){var e,n,i,o,a;if(e=he,t.substr(he,2)===s?(n=s,he+=2):(n=r,0===$e&&Ce(R)),n!==r?(i=Be(),(o=je())!==r?(Be(),125===t.charCodeAt(he)?(a=l,he++):(a=r,0===$e&&Ce(U)),a!==r?(ge=e,e=Dt(o)):(he=e,e=r)):(he=e,e=r)):(he=e,e=r),e===r&&(e=he,t.substr(he,3)===c?(n=c,he+=3):(n=r,0===$e&&Ce(L)),n!==r&&(ge=e,n=Ft()),(e=n)===r&&(e=he,n=he,$e++,92===t.charCodeAt(he)?(i=u,he++):(i=r,0===$e&&Ce(W)),i===r&&(t.substr(he,2)===s?(i=s,he+=2):(i=r,0===$e&&Ce(R))),$e--,i===r?n=void 0:(he=n,n=r),n!==r?(t.length>he?(i=t.charAt(he),he++):(i=r,0===$e&&Ce(H)),i!==r?(ge=e,e=zt()):(he=e,e=r)):(he=e,e=r),e===r))){if(e=he,t.substr(he,2)===s?(n=s,he+=2):(n=r,0===$e&&Ce(R)),n!==r){if(i=[],M.test(t.charAt(he))?(o=t.charAt(he),he++):(o=r,0===$e&&Ce(q)),o!==r)for(;o!==r;)i.push(o),M.test(t.charAt(he))?(o=t.charAt(he),he++):(o=r,0===$e&&Ce(q));else i=r;i!==r?(125===t.charCodeAt(he)?(o=l,he++):(o=r,0===$e&&Ce(U)),o!==r?(ge=e,e=Nt()):(he=e,e=r)):(he=e,e=r)}else he=e,e=r;e===r&&(e=he,t.substr(he,2)===s?(n=s,he+=2):(n=r,0===$e&&Ce(R)),n!==r&&(ge=e,n=Mt()),(e=n)===r&&(e=he,92===t.charCodeAt(he)?(n=u,he++):(n=r,0===$e&&Ce(W)),n!==r?(t.substr(he,2)===s?(i=s,he+=2):(i=r,0===$e&&Ce(R)),i!==r?(ge=e,e=Tt(i)):(he=e,e=r)):(he=e,e=r),e===r&&(e=he,92===t.charCodeAt(he)?(n=u,he++):(n=r,0===$e&&Ce(W)),n!==r?(t.length>he?(i=t.charAt(he),he++):(i=r,0===$e&&Ce(H)),i!==r?(ge=e,e=It(i)):(he=e,e=r)):(he=e,e=r),e===r&&(e=he,92===t.charCodeAt(he)?(n=u,he++):(n=r,0===$e&&Ce(W)),n!==r&&(ge=e,n=Ot()),e=n))))}return e}function je(){var e,n,i,o,a,s;return e=he,(n=Pe())!==r?(Be(),63===t.charCodeAt(he)?(i=d,he++):(i=r,0===$e&&Ce(G)),i!==r?(Be(),(o=je())!==r?(Be(),58===t.charCodeAt(he)?(a=p,he++):(a=r,0===$e&&Ce(K)),a!==r?(Be(),(s=je())!==r?(ge=e,e=Jt(n,o,s)):(he=e,e=r)):(he=e,e=r)):(he=e,e=r)):(he=e,e=r)):(he=e,e=r),e===r&&(e=Pe()),e}function Pe(){var e,n,i,o,a,s,l,c;if(e=he,(n=Se())!==r){for(i=[],o=he,a=Be(),t.substr(he,2)===f?(s=f,he+=2):(s=r,0===$e&&Ce(X)),s!==r?(l=Be(),(c=Se())!==r?o=a=[a,s,l,c]:(he=o,o=r)):(he=o,o=r);o!==r;)i.push(o),o=he,a=Be(),t.substr(he,2)===f?(s=f,he+=2):(s=r,0===$e&&Ce(X)),s!==r?(l=Be(),(c=Se())!==r?o=a=[a,s,l,c]:(he=o,o=r)):(he=o,o=r);ge=e,e=Bt(n,i)}else he=e,e=r;return e}function Se(){var e,n,i,o,a,s,l,c;if(e=he,(n=De())!==r){for(i=[],o=he,a=Be(),t.substr(he,2)===h?(s=h,he+=2):(s=r,0===$e&&Ce(Y)),s!==r?(l=Be(),(c=De())!==r?o=a=[a,s,l,c]:(he=o,o=r)):(he=o,o=r);o!==r;)i.push(o),o=he,a=Be(),t.substr(he,2)===h?(s=h,he+=2):(s=r,0===$e&&Ce(Y)),s!==r?(l=Be(),(c=De())!==r?o=a=[a,s,l,c]:(he=o,o=r)):(he=o,o=r);ge=e,e=Rt(n,i)}else he=e,e=r;return e}function De(){var e,n,i,o,a,s,l,c;if(e=he,(n=Fe())!==r){for(i=[],o=he,a=Be(),t.substr(he,2)===g?(s=g,he+=2):(s=r,0===$e&&Ce(Z)),s===r&&(t.substr(he,2)===m?(s=m,he+=2):(s=r,0===$e&&Ce(Q))),s!==r?(l=Be(),(c=Fe())!==r?o=a=[a,s,l,c]:(he=o,o=r)):(he=o,o=r);o!==r;)i.push(o),o=he,a=Be(),t.substr(he,2)===g?(s=g,he+=2):(s=r,0===$e&&Ce(Z)),s===r&&(t.substr(he,2)===m?(s=m,he+=2):(s=r,0===$e&&Ce(Q))),s!==r?(l=Be(),(c=Fe())!==r?o=a=[a,s,l,c]:(he=o,o=r)):(he=o,o=r);ge=e,e=Ut(n,i)}else he=e,e=r;return e}function Fe(){var e,n,i,o,a,s,l,c;if(e=he,(n=ze())!==r){for(i=[],o=he,a=Be(),t.substr(he,2)===v?(s=v,he+=2):(s=r,0===$e&&Ce(tt)),s===r&&(62===t.charCodeAt(he)?(s=y,he++):(s=r,0===$e&&Ce(et)),s===r&&(t.substr(he,2)===$?(s=$,he+=2):(s=r,0===$e&&Ce(nt)),s===r&&(60===t.charCodeAt(he)?(s=_,he++):(s=r,0===$e&&Ce(rt))))),s!==r?(l=Be(),(c=ze())!==r?o=a=[a,s,l,c]:(he=o,o=r)):(he=o,o=r);o!==r;)i.push(o),o=he,a=Be(),t.substr(he,2)===v?(s=v,he+=2):(s=r,0===$e&&Ce(tt)),s===r&&(62===t.charCodeAt(he)?(s=y,he++):(s=r,0===$e&&Ce(et)),s===r&&(t.substr(he,2)===$?(s=$,he+=2):(s=r,0===$e&&Ce(nt)),s===r&&(60===t.charCodeAt(he)?(s=_,he++):(s=r,0===$e&&Ce(rt))))),s!==r?(l=Be(),(c=ze())!==r?o=a=[a,s,l,c]:(he=o,o=r)):(he=o,o=r);ge=e,e=Lt(n,i)}else he=e,e=r;return e}function ze(){var e,n,i,o,a,s,l,c;if(e=he,(n=Ne())!==r){for(i=[],o=he,a=Be(),43===t.charCodeAt(he)?(s=b,he++):(s=r,0===$e&&Ce(it)),s===r&&(45===t.charCodeAt(he)?(s=w,he++):(s=r,0===$e&&Ce(ot))),s!==r?(l=Be(),(c=Ne())!==r?o=a=[a,s,l,c]:(he=o,o=r)):(he=o,o=r);o!==r;)i.push(o),o=he,a=Be(),43===t.charCodeAt(he)?(s=b,he++):(s=r,0===$e&&Ce(it)),s===r&&(45===t.charCodeAt(he)?(s=w,he++):(s=r,0===$e&&Ce(ot))),s!==r?(l=Be(),(c=Ne())!==r?o=a=[a,s,l,c]:(he=o,o=r)):(he=o,o=r);ge=e,e=Wt(n,i)}else he=e,e=r;return e}function Ne(){var e,n,i,o,a,s,l,c;if(e=he,(n=Me())!==r){for(i=[],o=he,a=Be(),47===t.charCodeAt(he)?(s=x,he++):(s=r,0===$e&&Ce(at)),s===r&&(42===t.charCodeAt(he)?(s=k,he++):(s=r,0===$e&&Ce(st)),s===r&&(37===t.charCodeAt(he)?(s=E,he++):(s=r,0===$e&&Ce(lt)))),s!==r?(l=Be(),(c=Me())!==r?o=a=[a,s,l,c]:(he=o,o=r)):(he=o,o=r);o!==r;)i.push(o),o=he,a=Be(),47===t.charCodeAt(he)?(s=x,he++):(s=r,0===$e&&Ce(at)),s===r&&(42===t.charCodeAt(he)?(s=k,he++):(s=r,0===$e&&Ce(st)),s===r&&(37===t.charCodeAt(he)?(s=E,he++):(s=r,0===$e&&Ce(lt)))),s!==r?(l=Be(),(c=Me())!==r?o=a=[a,s,l,c]:(he=o,o=r)):(he=o,o=r);ge=e,e=Ht(n,i)}else he=e,e=r;return e}function Me(){var e,n,i;return(e=Oe())===r&&(e=Ie())===r&&(e=he,33===t.charCodeAt(he)?(n=C,he++):(n=r,0===$e&&Ce(ct)),n===r&&(43===t.charCodeAt(he)?(n=b,he++):(n=r,0===$e&&Ce(it)),n===r&&(45===t.charCodeAt(he)?(n=w,he++):(n=r,0===$e&&Ce(ot)))),n!==r?(Be(),(i=Me())!==r?(ge=e,e=qt(n,i)):(he=e,e=r)):(he=e,e=r),e===r&&(e=function(){var e,n,i,o,a;return e=he,(n=Je())!==r?(Be(),40===t.charCodeAt(he)?(i=A,he++):(i=r,0===$e&&Ce(ut)),i!==r?(Be(),o=function(){var e,n,i,o,a,s;if(e=he,(n=je())!==r){for(i=[],o=he,Be(),44===t.charCodeAt(he)?(a=j,he++):(a=r,0===$e&&Ce(pt)),a!==r?(Be(),(s=je())!==r?o=s:(he=o,o=r)):(he=o,o=r);o!==r;)i.push(o),o=he,Be(),44===t.charCodeAt(he)?(a=j,he++):(a=r,0===$e&&Ce(pt)),a!==r?(Be(),(s=je())!==r?o=s:(he=o,o=r)):(he=o,o=r);ge=e,e=Xt(n,i)}else he=e,e=r;return e===r&&(e=Be()),e}(),o!==r?(Be(),41===t.charCodeAt(he)?(a=V,he++):(a=r,0===$e&&Ce(dt)),a!==r?(ge=e,e=Gt(n,o)):(he=e,e=r)):(he=e,e=r)):(he=e,e=r)):(he=e,e=r),e===r&&(e=he,(n=Je())!==r&&(ge=e,n=Kt(n)),(e=n)===r&&(e=function(){var e,n,i,o;return e=function(){var e,n,i,o;return $e++,e=he,39===t.charCodeAt(he)?(n=P,he++):(n=r,0===$e&&Ce(ht)),n!==r?(i=function(){var t,e,n;for(t=he,e=[],n=Te();n!==r;)e.push(n),n=Te();return ge=t,t=e=Qt(e)}(),39===t.charCodeAt(he)?(o=P,he++):(o=r,0===$e&&Ce(ht)),o!==r?(ge=e,e=Zt(i)):(he=e,e=r)):(he=e,e=r),$e--,e===r&&(n=r,0===$e&&Ce(ft)),e}(),e===r&&(e=Oe())===r&&(e=Ie())===r&&(e=function(){var e,n;return $e++,e=he,t.substr(he,4)===z?(n=z,he+=4):(n=r,0===$e&&Ce(xt)),n!==r&&(ge=e,n=de()),(e=n)===r&&(e=he,t.substr(he,5)===N?(n=N,he+=5):(n=r,0===$e&&Ce(kt)),n!==r&&(ge=e,n=pe()),e=n),$e--,e===r&&(n=r,0===$e&&Ce(wt)),e}(),e===r&&(e=he,40===t.charCodeAt(he)?(n=A,he++):(n=r,0===$e&&Ce(ut)),n!==r&&(i=je())!==r?(41===t.charCodeAt(he)?(o=V,he++):(o=r,0===$e&&Ce(dt)),o!==r?(ge=e,e=Yt(i)):(he=e,e=r)):(he=e,e=r))),e}())),e}())),e}function Te(){var e,n,i,o,a;if(e=he,t.substr(he,2)===s?(n=s,he+=2):(n=r,0===$e&&Ce(R)),n!==r?(i=Be(),(o=je())!==r?(Be(),125===t.charCodeAt(he)?(a=l,he++):(a=r,0===$e&&Ce(U)),a!==r?(ge=e,e=te(o)):(he=e,e=r)):(he=e,e=r)):(he=e,e=r),e===r&&(e=he,t.substr(he,3)===c?(n=c,he+=3):(n=r,0===$e&&Ce(L)),n!==r&&(ge=e,n=ee()),(e=n)===r&&(e=he,n=he,$e++,92===t.charCodeAt(he)?(i=u,he++):(i=r,0===$e&&Ce(W)),i===r&&(39===t.charCodeAt(he)?(i=P,he++):(i=r,0===$e&&Ce(ht)),i===r&&(t.substr(he,2)===s?(i=s,he+=2):(i=r,0===$e&&Ce(R)))),$e--,i===r?n=void 0:(he=n,n=r),n!==r?(t.length>he?(i=t.charAt(he),he++):(i=r,0===$e&&Ce(H)),i!==r?(ge=e,e=ne()):(he=e,e=r)):(he=e,e=r),e===r))){if(e=he,t.substr(he,2)===s?(n=s,he+=2):(n=r,0===$e&&Ce(R)),n!==r){if(i=[],T.test(t.charAt(he))?(o=t.charAt(he),he++):(o=r,0===$e&&Ce(gt)),o!==r)for(;o!==r;)i.push(o),T.test(t.charAt(he))?(o=t.charAt(he),he++):(o=r,0===$e&&Ce(gt));else i=r;i!==r?(125===t.charCodeAt(he)?(o=l,he++):(o=r,0===$e&&Ce(U)),o!==r?(ge=e,e=re()):(he=e,e=r)):(he=e,e=r)}else he=e,e=r;e===r&&(e=he,t.substr(he,2)===s?(n=s,he+=2):(n=r,0===$e&&Ce(R)),n!==r&&(ge=e,n=ie()),(e=n)===r&&(e=he,92===t.charCodeAt(he)?(n=u,he++):(n=r,0===$e&&Ce(W)),n!==r?(t.substr(he,2)===s?(i=s,he+=2):(i=r,0===$e&&Ce(R)),i!==r?(ge=e,e=oe(i)):(he=e,e=r)):(he=e,e=r),e===r&&(e=he,92===t.charCodeAt(he)?(n=u,he++):(n=r,0===$e&&Ce(W)),n!==r?(t.length>he?(i=t.charAt(he),he++):(i=r,0===$e&&Ce(H)),i!==r?(ge=e,e=ae(i)):(he=e,e=r)):(he=e,e=r),e===r&&(e=he,92===t.charCodeAt(he)?(n=u,he++):(n=r,0===$e&&Ce(W)),n!==r&&(ge=e,n=se()),e=n))))}return e}function Ie(){var e,n,i,o;if($e++,e=he,45===t.charCodeAt(he)?(n=w,he++):(n=r,0===$e&&Ce(ot)),n===r&&(n=null),i=[],I.test(t.charAt(he))?(o=t.charAt(he),he++):(o=r,0===$e&&Ce(vt)),o!==r)for(;o!==r;)i.push(o),I.test(t.charAt(he))?(o=t.charAt(he),he++):(o=r,0===$e&&Ce(vt));else i=r;return i!==r?(ge=e,e=le()):(he=e,e=r),$e--,e===r&&(n=r,0===$e&&Ce(mt)),e}function Oe(){var e,n,i,o,a,s,l,c,u,d;for($e++,e=he,45===t.charCodeAt(he)?(n=w,he++):(n=r,0===$e&&Ce(ot)),n===r&&(n=null),i=[],I.test(t.charAt(he))?(o=t.charAt(he),he++):(o=r,0===$e&&Ce(vt));o!==r;)i.push(o),I.test(t.charAt(he))?(o=t.charAt(he),he++):(o=r,0===$e&&Ce(vt));if(46===t.charCodeAt(he)?(o=S,he++):(o=r,0===$e&&Ce($t)),o!==r){if(a=[],I.test(t.charAt(he))?(s=t.charAt(he),he++):(s=r,0===$e&&Ce(vt)),s!==r)for(;s!==r;)a.push(s),I.test(t.charAt(he))?(s=t.charAt(he),he++):(s=r,0===$e&&Ce(vt));else a=r;if(a!==r){if(s=he,101===t.charCodeAt(he)?(l=D,he++):(l=r,0===$e&&Ce(_t)),l===r&&(69===t.charCodeAt(he)?(l=F,he++):(l=r,0===$e&&Ce(bt))),l!==r){if(43===t.charCodeAt(he)?(c=b,he++):(c=r,0===$e&&Ce(it)),c===r&&(45===t.charCodeAt(he)?(c=w,he++):(c=r,0===$e&&Ce(ot))),c===r&&(c=null),u=[],I.test(t.charAt(he))?(d=t.charAt(he),he++):(d=r,0===$e&&Ce(vt)),d!==r)for(;d!==r;)u.push(d),I.test(t.charAt(he))?(d=t.charAt(he),he++):(d=r,0===$e&&Ce(vt));else u=r;u!==r?s=l=[l,c,u]:(he=s,s=r)}else he=s,s=r;s===r&&(s=null),ge=e,e=ce()}else he=e,e=r}else he=e,e=r;if(e===r){if(e=he,45===t.charCodeAt(he)?(n=w,he++):(n=r,0===$e&&Ce(ot)),n===r&&(n=null),i=[],I.test(t.charAt(he))?(o=t.charAt(he),he++):(o=r,0===$e&&Ce(vt)),o!==r)for(;o!==r;)i.push(o),I.test(t.charAt(he))?(o=t.charAt(he),he++):(o=r,0===$e&&Ce(vt));else i=r;if(i!==r)if(101===t.charCodeAt(he)?(o=D,he++):(o=r,0===$e&&Ce(_t)),o===r&&(69===t.charCodeAt(he)?(o=F,he++):(o=r,0===$e&&Ce(bt))),o!==r){if(43===t.charCodeAt(he)?(a=b,he++):(a=r,0===$e&&Ce(it)),a===r&&(45===t.charCodeAt(he)?(a=w,he++):(a=r,0===$e&&Ce(ot))),a===r&&(a=null),s=[],I.test(t.charAt(he))?(l=t.charAt(he),he++):(l=r,0===$e&&Ce(vt)),l!==r)for(;l!==r;)s.push(l),I.test(t.charAt(he))?(l=t.charAt(he),he++):(l=r,0===$e&&Ce(vt));else s=r;s!==r?(ge=e,e=ue()):(he=e,e=r)}else he=e,e=r;else he=e,e=r}return $e--,e===r&&(n=r,0===$e&&Ce(yt)),e}function Je(){var e,n,i,o,a;if($e++,e=he,n=he,$e++,i=function(){var e,n,i,o;return e=he,t.substr(he,4)===z?(n=z,he+=4):(n=r,0===$e&&Ce(xt)),n===r&&(t.substr(he,5)===N?(n=N,he+=5):(n=r,0===$e&&Ce(kt))),n!==r?(i=he,$e++,O.test(t.charAt(he))?(o=t.charAt(he),he++):(o=r,0===$e&&Ce(Et)),$e--,o===r?i=void 0:(he=i,i=r),i!==r?e=n=[n,i]:(he=e,e=r)):(he=e,e=r),e}(),$e--,i===r?n=void 0:(he=n,n=r),n!==r)if(J.test(t.charAt(he))?(i=t.charAt(he),he++):(i=r,0===$e&&Ce(At)),i!==r){for(o=[],O.test(t.charAt(he))?(a=t.charAt(he),he++):(a=r,0===$e&&Ce(Et));a!==r;)o.push(a),O.test(t.charAt(he))?(a=t.charAt(he),he++):(a=r,0===$e&&Ce(Et));ge=e,e=fe()}else he=e,e=r;else he=e,e=r;return $e--,e===r&&(n=r,0===$e&&Ce(Ct)),e}function Be(){var e,n;for($e++,e=[],B.test(t.charAt(he))?(n=t.charAt(he),he++):(n=r,0===$e&&Ce(jt));n!==r;)e.push(n),B.test(t.charAt(he))?(n=t.charAt(he),he++):(n=r,0===$e&&Ce(jt));return $e--,n=r,0===$e&&Ce(Vt),e}if((n=a())!==r&&he===t.length)return n;throw n!==r&&he<t.length&&Ce({type:"end"}),function(t,e,n){return new Qo(Qo.buildMessage(t,e),t,e,n)}(ye,ve<t.length?t.charAt(ve):null,ve<t.length?Ee(ve,ve+1):Ee(ve,ve))}!function(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}(Qo,Error),Qo.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 i=this.location.start,o=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(i):i,a=this.location.source+":"+o.line+":"+o.column;if(r){var s=this.location.end,l=ta("",o.line.toString().length," "),c=r[i.line-1],u=(i.line===s.line?s.column:c.length+1)-i.column||1;e+="\n --\x3e "+a+"\n"+l+" |\n"+o.line+" | "+c+"\n"+l+" | "+ta("",i.column-1," ")+ta("",u,"^")}else e+="\n at "+a}return e},Qo.buildMessage=function(t,e){var n={literal:function(t){return'"'+i(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 r(t){return t.charCodeAt(0).toString(16).toUpperCase()}function i(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 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"+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?'"'+i(t)+'"':"end of input"}(e)+" found."};const na=new Map,ra=new Map;function ia(t,e,n){const r={args:e,cb:n},i=na.get(t)||[];na.has(t)||na.set(t,i),i.push(r);const o=t+":"+e.map((t=>"object"==typeof t?t.type:t)).join("#");ra.set(o,r)}function oa(t,e){let n=t.args.length,r=t.args.length;const i=t.args[t.args.length-1];if("object"==typeof i&&i.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 aa(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=>{aa(t,e)}));break;case"BinaryExpression":case"LogicalExpression":aa(t.left,e),aa(t.right,e);break;case"UnaryExpression":aa(t.argument,e);break;case"ConditionalExpression":aa(t.test,e),aa(t.consequent,e),aa(t.alternate,e);break;case"CallExpression":t.arguments.forEach((t=>{aa(t,e)}))}}function sa(t){return"url"===t.type||"color"===t.type?{type:"string",value:t.value}:t}function la(t){return t.toISOString().replace("T"," ").replace(/\.\d{3}Z$/,"")}function ca(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 la(t.value);if("color"===t.type)return va(ma(t.value));if("url"===t.type)return t.value;throw new Error("Unexpected type ".concat(t.type))}function ua(t){let e=ca(t);return"string"===t.type&&(e="'"+e.replace(/\\/g,"\\'").replace(/'/g,"\\'")+"'"),e}function da(t){return"datetime"===t?"DateTime":t.charAt(0).toUpperCase()+t.substring(1)}function pa(t,e){if(Ji)return Li(e);if(e<0){const t=-Math.floor(-e);return 0===t?0:t}return Math.floor(e)}function fa(t,e){if(e<Ui||e>Ri)throw new Error("Integer overflow.");!Ji&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)&&(t.safeIntegerOverflow=!0)}function ha(t){const e=[];return aa(t,{Variable(t){e.push(t.id.name)}}),e}function ga(t,e){throw new Error("Failed to evaluate [".concat(t,"]. ").concat(e))}function ma(t){const e=Gt(t);if(e)return e;throw new Error("Unable to convert value to Color, expected format #AARRGGBB.")}function va(t){return"#".concat([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 Ht(Math.round(t).toString(16),2)})).join("").toUpperCase())}function ya(t){return va(ma(t))}const $a=Number.MAX_VALUE,_a=Number.MIN_VALUE,ba="string",wa="integer",xa="number",ka="boolean",Ea="color",Ca="url",Aa="datetime";function Va(t,e){return{type:ba,value:ca(e)}}function ja(t,e){const n=Number(e.value);if(isNaN(n)||!Number.isFinite(n))throw new Error("Unable to convert value to Number.");return{type:xa,value:n}}function Pa(t,e,n,r){const i=t.variables.get(e.value);let o;return o=i&&i.getType()===r?i.getValue():n.value,"color"===r&&(o=ya(o)),{type:r,value:o}}function Sa(t,e,n){return Pa(t,e,n,n.type)}function Da(t,e,n){return Pa(t,e,n,"color")}function Fa(t,e,n){return Pa(t,e,n,"url")}const za=t=>(e,n)=>{let r=new Date(n.value.getTime())[t]();return"getUTCMonth"===t?++r:"getUTCDay"===t&&0===r&&(r=7),{type:wa,value:r}},Na=za("getUTCFullYear"),Ma=za("getUTCMonth"),Ta=za("getUTCDate"),Ia=za("getUTCDay"),Oa=za("getUTCHours"),Ja=za("getUTCMinutes"),Ba=za("getUTCSeconds"),Ra=za("getUTCMilliseconds");function Ua(t,e,n,r){if(!r.value.length)return t.warnings.push(Jt(new Error("String for padding is empty."),{level:"warn"})),"";let i="";const o=e.type===ba?e.value:ca(e);for(;i.length+o.length<n.value;)i+=r.value;return i.length>0&&i.length+o.length>n.value&&(i=i.substring(0,Number(n.value)-Number(o.length))),i}function La(t,e,n,r){const i=Ua(t,e,n,r);return{type:ba,value:i+ca(e)}}function Wa(t,e,n,r){const i=Ua(t,e,n,r);return{type:ba,value:ca(e)+i}}function Ha(t){return(e,n)=>{const r=ma(n.value);return{type:xa,value:r[t]/255}}}function qa(t){return(e,n,r)=>{const i=ma(n.value);return i[t]=255*r.value,{type:Ea,value:va(i)}}}const Ga=Ha("a"),Ka=Ha("r"),Xa=Ha("g"),Ya=Ha("b"),Za=qa("a"),Qa=qa("r"),ts=qa("g"),es=qa("b");function ns(t,e,n,r){if(e.value<0)throw new Error("Expecting non-negative number of milliseconds.");let i=Li(e.value)/Li(n);return fa(t,i),"number"==typeof i&&(i=Math.floor(i)),r&&(i=Li(i)%Li(r)),{type:wa,value:i}}const rs=36e5;function is(t){return t.map(ua).join(", ")}ia("toString",[wa],Va),ia("toString",[xa],Va),ia("toString",[ka],Va),ia("toString",[Ea],Va),ia("toString",[Ca],Va),ia("toNumber",[wa],ja),ia("toNumber",[ba],ja),ia("toInteger",[xa],(function(t,e){if(e.value>Ri||e.value<Ui)throw new Error("Unable to convert value to Integer.");const n=e.value-e.value%1;return{type:wa,value:Li(n)}})),ia("toInteger",[ba],(function(t,e){let n;try{n=Li(e.value)}catch(t){throw new Error("Unable to convert value to Integer.")}if("number"==typeof n&&(isNaN(n)||n%1!=0)||n>Ri||n<Ui)throw new Error("Unable to convert value to Integer.");return{type:wa,value:n}})),ia("toInteger",[ka],(function(t,e){return{type:wa,value:Li(e.value?1:0)}})),ia("toBoolean",[wa],(function(t,e){const n=Number(e.value);if(1!==n&&0!==n)throw new Error("Unable to convert value to Boolean.");return{type:ka,value:n}})),ia("toBoolean",[ba],(function(t,e){if("true"!==e.value&&"false"!==e.value)throw new Error("Unable to convert value to Boolean.");return{type:ka,value:"true"===e.value?1:0}})),ia("toColor",[ba],(function(t,e){return{type:Ea,value:ya(e.value)}})),ia("toUrl",[ba],(function(t,e){return{type:Ca,value:e.value}})),ia("encodeUri",[ba],(function(t,e){try{return{type:ba,value:encodeURIComponent(e.value)}}catch(t){throw new Error("Unable to encodeUri string.")}})),ia("decodeUri",[ba],(function(t,e){try{return{type:ba,value:decodeURIComponent(e.value)}}catch(t){throw new Error("Unable to decodeUri string.")}})),ia("getIntegerValue",[ba,wa],Sa),ia("getNumberValue",[ba,xa],Sa),ia("getBooleanValue",[ba,ka],Sa),ia("getStringValue",[ba,ba],Sa),ia("getColorValue",[ba,Ea],Da),ia("getColorValue",[ba,ba],Da),ia("getUrlValue",[ba,Ca],Fa),ia("getUrlValue",[ba,ba],Fa),ia("parseUnixTime",[wa],(function(t,e){return{type:Aa,value:new Date(1e3*Number(e.value))}})),ia("nowLocal",[],(function(){return{type:Aa,value:new Date}})),ia("addMillis",[Aa,wa],(function(t,e,n){return{type:Aa,value:new Date(e.value.getTime()+Number(n.value))}})),ia("setYear",[Aa,wa],(function(t,e,n){const r=new Date(e.value);return r.setUTCFullYear(Number(n.value)),{type:Aa,value:r}})),ia("setMonth",[Aa,wa],(function(t,e,n){const r=Number(n.value);if(r<1||r>12)throw new Error("Expecting month in [1..12], instead got ".concat(r,"."));const i=new Date(e.value);return i.setUTCMonth(r-1),{type:Aa,value:i}})),ia("setDay",[Aa,wa],(function(t,e,n){const r=new Date(e.value),i=Number(n.value);if(i<=0&&-1!==i||i>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 ".concat(i," for date ").concat(ca(e),"."));return r.setUTCDate(-1===i?0:i),{type:Aa,value:r}})),ia("setHours",[Aa,wa],(function(t,e,n){const r=Number(n.value);if(r<0||r>23)throw new Error("Expecting hours in [0..23], instead got ".concat(r,"."));const i=new Date(e.value);return i.setUTCHours(r),{type:Aa,value:i}})),ia("setMinutes",[Aa,wa],(function(t,e,n){const r=Number(n.value);if(r<0||r>59)throw new Error("Expecting minutes in [0..59], instead got ".concat(r,"."));const i=new Date(e.value);return i.setUTCMinutes(r),{type:Aa,value:i}})),ia("setSeconds",[Aa,wa],(function(t,e,n){const r=Number(n.value);if(r<0||r>59)throw new Error("Expecting seconds in [0..59], instead got ".concat(r,"."));const i=new Date(e.value);return i.setUTCSeconds(r),{type:Aa,value:i}})),ia("setMillis",[Aa,wa],(function(t,e,n){const r=Number(n.value);if(r<0||r>999)throw new Error("Expecting millis in [0..999], instead got ".concat(r,"."));const i=new Date(e.value);return i.setUTCMilliseconds(r),{type:Aa,value:i}})),ia("getYear",[Aa],Na),ia("getMonth",[Aa],Ma),ia("getDay",[Aa],Ta),ia("getDayOfWeek",[Aa],Ia),ia("getHours",[Aa],Oa),ia("getMinutes",[Aa],Ja),ia("getSeconds",[Aa],Ba),ia("getMillis",[Aa],Ra),ia("getIntervalSeconds",[wa],(function(t,e){return ns(t,e,1e3,60)})),ia("getIntervalTotalSeconds",[wa],(function(t,e){return ns(t,e,1e3)})),ia("getIntervalMinutes",[wa],(function(t,e){return ns(t,e,6e4,60)})),ia("getIntervalTotalMinutes",[wa],(function(t,e){return ns(t,e,6e4)})),ia("getIntervalHours",[wa],(function(t,e){return ns(t,e,rs,24)})),ia("getIntervalTotalHours",[wa],(function(t,e){return ns(t,e,rs)})),ia("getIntervalTotalDays",[wa],(function(t,e){return ns(t,e,864e5)})),ia("getIntervalTotalWeeks",[wa],(function(t,e){return ns(t,e,6048e5)})),ia("len",[ba],(function(t,e){return{type:wa,value:e.value.length}})),ia("contains",[ba,ba],(function(t,e,n){return{type:ka,value:e.value.includes(n.value)?1:0}})),ia("substring",[ba,wa,wa],(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:ba,value:e.value.substring(Number(n.value),Number(r.value))}})),ia("replaceAll",[ba,ba,ba],(function(t,e,n,r){let i;return i=n.value?e.value.replace(new RegExp(function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}(n.value),"g"),r.value):e.value,{type:ba,value:i}})),ia("index",[ba,ba],(function(t,e,n){return{type:wa,value:e.value.indexOf(n.value)}})),ia("lastIndex",[ba,ba],(function(t,e,n){return{type:wa,value:e.value.lastIndexOf(n.value)}})),ia("trim",[ba],(function(t,e){return{type:ba,value:e.value.trim()}})),ia("trimLeft",[ba],(function(t,e){return{type:ba,value:e.value.replace(/^\s+/,"")}})),ia("trimRight",[ba],(function(t,e){return{type:ba,value:e.value.replace(/\s+$/,"")}})),ia("toUpperCase",[ba],(function(t,e){return{type:ba,value:e.value.toUpperCase()}})),ia("toLowerCase",[ba],(function(t,e){return{type:ba,value:e.value.toLowerCase()}})),ia("padStart",[ba,wa,ba],La),ia("padStart",[wa,wa,ba],La),ia("padEnd",[ba,wa,ba],Wa),ia("padEnd",[wa,wa,ba],Wa),ia("div",[wa,wa],(function(t,e,n){if(n.value===Wi)throw new Error("Division by zero is not supported.");let r=e.value/n.value;return r=pa(0,r),fa(t,r),{type:wa,value:r}})),ia("div",[xa,xa],(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:xa,value:r}})),ia("mod",[wa,wa],(function(t,e,n){if(n.value===Wi)throw new Error("Division by zero is not supported.");let r=e.value%n.value;return r=pa(0,r),fa(t,r),{type:wa,value:r}})),ia("mod",[xa,xa],(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:xa,value:r}})),ia("mul",[{type:wa,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];let i=n.length?n[0].value:Wi;for(let e=1;e<n.length;++e)i*=n[e].value,i=pa(0,i),fa(t,i);return{type:wa,value:i}})),ia("mul",[{type:xa,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];let i=n.length?n[0].value:0;for(let t=1;t<n.length;++t)i*=n[t].value;return{type:xa,value:i}})),ia("sub",[{type:wa,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];let i=n.length?n[0].value:Wi;for(let e=1;e<n.length;++e)i-=n[e].value,i=pa(0,i),fa(t,i);return{type:wa,value:i}})),ia("sub",[{type:xa,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];let i=n.length?n[0].value:0;for(let t=1;t<n.length;++t)i-=n[t].value;return{type:xa,value:i}})),ia("sum",[{type:wa,isVararg:!0}],(function(t){let e=Wi;for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(let n=0;n<r.length;++n)e+=r[n].value,e=pa(0,e),fa(t,e);return{type:wa,value:e}})),ia("sum",[{type:xa,isVararg:!0}],(function(t){let e=0;for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(let t=0;t<r.length;++t)e+=r[t].value;return{type:xa,value:e}})),ia("abs",[wa],(function(t,e){const n=Hi(e.value);return fa(t,n),{type:e.type,value:n}})),ia("abs",[xa],(function(t,e){const n=Math.abs(e.value);return{type:xa,value:n}})),ia("max",[{type:wa,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(!n.length)throw new Error("Non empty argument list is required for function 'max'.");let i=n[0].value;for(let t=1;t<n.length;++t)n[t].value>i&&(i=n[t].value);return{type:wa,value:i}})),ia("max",[{type:xa,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(!n.length)throw new Error("Non empty argument list is required for function 'max'.");return{type:xa,value:Math.max(...n.map((t=>t.value)))}})),ia("min",[{type:wa,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(!n.length)throw new Error("Non empty argument list is required for function 'min'.");let i=n[0].value;for(let t=1;t<n.length;++t)n[t].value<i&&(i=n[t].value);return{type:wa,value:i}})),ia("min",[{type:xa,isVararg:!0}],(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(!n.length)throw new Error("Non empty argument list is required for function 'min'.");return{type:xa,value:Math.min(...n.map((t=>t.value)))}})),ia("maxNumber",[],(function(){return{type:xa,value:$a}})),ia("minNumber",[],(function(){return{type:xa,value:_a}})),ia("maxInteger",[],(function(t){return fa(t,Ri),{type:wa,value:Ri}})),ia("minInteger",[],(function(t){return fa(t,Ui),{type:wa,value:Ui}})),ia("round",[xa],(function(t,e){const n=Math.sign(e.value);return{type:xa,value:n*Math.round(Math.abs(e.value))}})),ia("floor",[xa],(function(t,e){return{type:xa,value:Math.floor(e.value)}})),ia("ceil",[xa],(function(t,e){return{type:xa,value:Math.ceil(e.value)}})),ia("signum",[wa],(function(t,e){return{type:wa,value:qi(e.value)}})),ia("signum",[xa],(function(t,e){return{type:xa,value:Math.sign(e.value)}})),ia("copySign",[wa,wa],(function(t,e,n){let r;if(n.value===Wi)r=e.value;else if(e.value===Wi)r=0;else{const t=qi(n.value);r=Hi(e.value)*t}return fa(t,r),{type:wa,value:r}})),ia("copySign",[xa,xa],(function(t,e,n){let r=Math.sign(n.value);0===r&&(r=Object.is(r,0)?1:-1);const i=Math.abs(e.value)*r;return{type:xa,value:i}})),ia("getColorAlpha",[ba],Ga),ia("getColorAlpha",[Ea],Ga),ia("getColorRed",[ba],Ka),ia("getColorRed",[Ea],Ka),ia("getColorGreen",[ba],Xa),ia("getColorGreen",[Ea],Xa),ia("getColorBlue",[ba],Ya),ia("getColorBlue",[Ea],Ya),ia("setColorAlpha",[ba,xa],Za),ia("setColorAlpha",[Ea,xa],Za),ia("setColorRed",[ba,xa],Qa),ia("setColorRed",[Ea,xa],Qa),ia("setColorGreen",[ba,xa],ts),ia("setColorGreen",[Ea,xa],ts),ia("setColorBlue",[ba,xa],es),ia("setColorBlue",[Ea,xa],es),ia("rgb",[xa,xa,xa],(function(t,e,n,r){const i={a:255,r:255*e.value,g:255*n.value,b:255*r.value};return{type:Ea,value:va(i)}})),ia("argb",[xa,xa,xa,xa],(function(t,e,n,r,i){const o={a:255*e.value,r:255*n.value,g:255*r.value,b:255*i.value};return{type:Ea,value:va(o)}}));const os={StringLiteral:function(t,e){return{type:ba,value:e.value}},NumberLiteral:function(t,e){return{type:xa,value:e.value}},IntegerLiteral:function(t,e){return fa(t,e.value),{type:wa,value:e.value}},BooleanLiteral:function(t,e){return{type:ka,value:e.value?1:0}},UnaryExpression:function(t,e){const n=sa(as(t,e.argument));switch(e.operator){case"!":if(n.type===ka)return{type:ka,value:n.value?0:1};ga("".concat(e.operator).concat(ua(n)),"A Boolean is expected after a unary not.");case"+":case"-":const r="+"===e.operator?1:-1;if(n.type===wa){const e=n.value*Li(r);return fa(t,e),{type:wa,value:e}}if(n.type===xa)return{type:xa,value:n.value*r};ga("".concat(e.operator).concat(ua(n)),"A Number is expected after a unary ".concat("+"===e.operator?"plus":"minus","."))}},ConditionalExpression:function(t,e){const n=sa(as(t,e.test));if(n.type===ka)return n.value?as(t,e.consequent):as(t,e.alternate);ga("".concat(ua(n)," ? ").concat(ua(as(t,e.consequent))," : ").concat(ua(as(t,e.alternate))),"Ternary must be called with a Boolean value as a condition.")},TemplateLiteral:function(t,e){let n="";if(2===e.quasis.length&&""===e.quasis[0].value&&""===e.quasis[1].value)return as(t,e.expressions[0]);for(let r=0;r<e.expressions.length;++r)n+=e.quasis[r].value,n+=ca(as(t,e.expressions[r]));return n+=e.quasis[e.quasis.length-1].value,{type:ba,value:n}},LogicalExpression:function(t,e){const n=sa(as(t,e.left));if(n.type!==ka&&ga("".concat(ua(n)," ").concat(e.operator," ..."),"'".concat(e.operator,"' must be called with boolean operands.")),"||"===e.operator&&n.value)return n;if("&&"===e.operator&&!n.value)return{type:ka,value:0};const r=sa(as(t,e.right));return r.type!==ka&&ga("".concat(ua(n)," ").concat(e.operator," ").concat(ua(r)),"Operator '".concat(e.operator,"' cannot be applied to different types: Boolean and ").concat(da(r.type),".")),{type:ka,value:r.value}},BinaryExpression:function(t,e){const n=e.operator,r=as(t,e.left),i=as(t,e.right);if(r.type!==i.type&&ga("".concat(ua(r)," ").concat(e.operator," ").concat(ua(i)),"Operator '".concat(n,"' cannot be applied to different types: ").concat(da(r.type)," and ").concat(da(i.type),".")),"=="===n||"!="===n)return function(t,e,n){let r;return r=e.type===Aa&&n.type===Aa?e.value.getTime()===n.value.getTime():e.value===n.value,"!="===t&&(r=!r),{type:ka,value:r?1:0}}(n,r,i);if(">"===n||">="===n||"<"===n||"<="===n)return function(t,e,n){let r;e.type!==xa&&e.type!==wa&&e.type!==Aa&&ga("".concat(ua(e)," ").concat(t," ").concat(ua(n)),"Operator '".concat(t,"' cannot be applied to ").concat(da(e.type)," type."));const i=e.type===Aa?e.value.getTime():e.value,o=n.type===Aa?n.value.getTime():n.value;return r=">"===t?i>o:">="===t?i>=o:"<"===t?i<o:i<=o,{type:ka,value:r?1:0}}(n,r,i);if("+"===n||"-"===n)return function(t,e,n,r){if(n.type!==ba&&n.type!==xa&&n.type!==wa&&ga("".concat(ua(n)," ").concat(e," ").concat(ua(r)),"Operator '".concat(e,"' cannot be applied to ").concat(da(n.type)," type.")),n.type===ba)return"-"===e&&ga("".concat(ua(n)," - ").concat(ua(r)),"Operator '".concat(e,"' cannot be applied to ").concat(da(n.type)," type.")),{type:ba,value:n.value+r.value};let i="+"===e?n.value+r.value:n.value-r.value;if(n.type===wa)try{i=pa(0,i),fa(t,i)}catch(t){ga("".concat(ua(n)," ").concat(e," ").concat(ua(r)),t.message)}return{type:n.type,value:i}}(t,n,r,i);if("/"===n||"*"===n||"%"===n)return function(t,e,n,r){let i;if(n.type!==wa&&n.type!==xa&&ga("".concat(ua(n)," ").concat(e," ").concat(ua(r)),"Operator '".concat(e,"' cannot be applied to ").concat(da(n.type)," type.")),"*"===e)i=n.value*r.value;else{if("/"!==e&&"%"!==e)throw new Error("Unsupported operation ".concat(e));0===Number(r.value)&&ga("".concat(ua(n)," ").concat(e," ").concat(ua(r)),"Division by zero is not supported."),i="/"===e?n.value/r.value:n.value%r.value}if(n.type===wa)try{i=pa(0,i),fa(t,i)}catch(t){ga("".concat(ua(n)," ").concat(e," ").concat(ua(r)),t.message)}return{type:n.type,value:i}}(t,n,r,i);throw new Error("Unsupported operation ".concat(n))},CallExpression:function(t,e){const n=e.callee.name;let r;const i=e.arguments.map((e=>as(t,e))),o=n+":"+i.map((t=>t.type)).join("#");if(ra.has(o))r=ra.get(o);else{const t=function(t,e){const n=na.get(t);if(!n)return{type:"missing"};let r=null;for(let t=0;t<n.length;++t){const i=oa(n[t],e);if("match"===i.type)return n[t];r||(r=i)}if(!r)throw new Error("Missing function");return r}(n,i);if("expected"in t||"type"in t&&"missing"===t.type){const e=i.map((t=>da(t.type))).join(", "),r="".concat(n,"(").concat(is(i),")");"few"===t.type&&0===i.length?ga(r,"Non empty argument list is required for function '".concat(n,"'.")):"many"===t.type||"few"===t.type||"mismatch"===t.type?ga(r,"Function '".concat(n,"' has no matching override for given argument types: ").concat(e,".")):ga(r,"Unknown function name: ".concat(n,"."))}r=t}if(!r)throw new Error("Function not found");try{return r.cb(t,...i)}catch(t){ga("".concat(n,"(").concat(is(i),")"),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 '".concat(n,"' is missing."))}};function as(t,e){if(e.type in os)return os[e.type](t,e);throw new Error("Unsupported expression")}function ss(t,e){try{const n={variables:t,warnings:[],safeIntegerOverflow:!1};!function(t,e){let n="";if(aa(e,{Variable(e){n||t.variables.has(e.id.name)||(n=e.id.name)}}),n)throw new Error("Variable '".concat(n,"' is missing."))}(n,e);const r=as(n,e);return n.safeIntegerOverflow&&n.warnings.push(Jt(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:[]}}}class ls{constructor(t){this.ast=t}apply(t,e){if(!function(t,e){let n=!1;return aa(t,{Variable(t){e.has(t.id.name)||(n=!0)}}),n}(this.ast,t))try{const n=ss(t,this.ast);n.warnings.forEach(e);const r=n.result;if("error"===r.type)return void e(Jt(new Error("Expression execution error"),{additional:{message:r.value}}));const i=r.value;if(i instanceof Date)return la(i);if("boolean"===r.type)return Boolean(i);if("color"===r.type){const t=Gt(String(i));if(t)return va(t);e(Jt(new Error("Expression execution error")))}return"integer"===r.type?i>2147483647||i<-2147483648?void e(Jt(new Error("Expression result is out of 32-bit int range"))):Number(i):i}catch(t){return void e(Jt(new Error("Expression execution error")))}}}function cs(t,e,n){if(t)if("string"==typeof t){if((r=t).indexOf("@{")>-1||r.indexOf("\\")>-1){e.hasExpression=!0;try{const n=ea(t,{startRule:"JsonStringContents"}),r=ha(n);return e.vars.push(...r),new ls(n)}catch(e){return void n(Jt(new Error("Unable to parse expression"),{additional:{expression:t}}))}}}else{if(Array.isArray(t))return t.map((t=>cs(t,e,n)));if("object"==typeof t){const r={};for(const i in t)r[i]=cs(t[i],e,n);return r}}var r;return t}function us(t,e,n){if(t){if(t instanceof ls)return t.apply(e,n);if(Array.isArray(t))return t.map((t=>us(t,e,n)));if("object"==typeof t){const r={};for(const i in t)r[i]=us(t[i],e,n);return r}}return t}function ds(t,e){const n={vars:[],hasExpression:!1},r=cs(t,n,e);return{vars:[...new Set(n.vars)],hasExpression:n.hasExpression,applyVars:t=>us(r,t,e)}}const ps={pagers:function(){return Mt(new Map)}},fs=new Map,hs=new Map;function gs(t){const e=fs.get(t)||Mt("");return fs.has(t)||fs.set(t,e),e}function ms(t){const e=hs.get(t)||new Map;return hs.has(t)||hs.set(t,e),e}class vs{setVariable(t){const e=t.getName(),n=ms(this);if(n.has(e))throw new Error("Variable with the same name already exist");n.set(e,t),gs(this).set(e)}getVariable(t){return ms(this).get(t)}}function ys(){return new vs}function $s(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 _s=new Set(["start","stop","pause","resume","cancel","reset"]);class bs{constructor(t){$s(this,"timers",new Map),$s(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((t=>{let{id:e,action:n}=t;this.execTimerAction(e,n)})),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(Jt(new Error("Misconfigured timer"),{additional:{id:t.id}})):this.logError(Jt(new Error("Missing timer id")))}execTimerAction(t,e){if(!(t&&e&&this.timers.has(t)&&_s.has(e)))return void this.logError(Jt(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(),i=Math.max(0,n-(t.tickPassed||0));t.tickTimeout=window.setTimeout((()=>{this.tickOrUnholdAction(t),t.tickPassed=(performance.now()-r-i)%n,e()}),i)};e()}}start(t){if("running"===t.state)return void this.logError(Jt(new Error("The timer is already running")));if("paused"===t.state)return void this.logError(Jt(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(Jt(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(Jt(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(Jt(new Error("The timer has already been stopped")))}pause(t){if("stopped"===t.state)return void this.logError(Jt(new Error("The timer has already been stopped")));if("paused"===t.state)return void this.logError(Jt(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(Jt(new Error("The timer is already running"))):this.logError(Jt(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,!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 ws(t){let e,n,r,i,o,a,s,l;return n=new Lo({props:{svgFiltersMap:t[2]}}),i=new zo({props:{div:t[3],templateContext:t[6]}}),{c(){e=z("div"),Pt(n.$$.fragment),r=T(),Pt(i.$$.fragment),J(e,"class",o=""+(It.root+(t[4]?" ".concat(It.root_platform_desktop):"")+(t[0]?" ".concat(t[0]):"")))},m(t,o){S(t,e,o),St(n,e,null),V(e,r),St(i,e,null),a=!0,s||(l=O(e,"touchstart",ks,{passive:!0}),s=!0)},p(t,r){const s={};4&r[0]&&(s.svgFiltersMap=t[2]),n.$set(s);const l={};8&r[0]&&(l.div=t[3]),i.$set(l),(!a||17&r[0]&&o!==(o=""+(It.root+(t[4]?" ".concat(It.root_platform_desktop):"")+(t[0]?" ".concat(t[0]):""))))&&J(e,"class",o)},i(t){a||(wt(n.$$.fragment,t),wt(i.$$.fragment,t),a=!0)},o(t){xt(n.$$.fragment,t),xt(i.$$.fragment,t),a=!1},d(t){t&&D(e),Dt(n),Dt(i),s=!1,l()}}}function xs(t){let e,n,r=!t[1]&&t[3]&&ws(t);return{c(){r&&r.c(),e=I()},m(t,i){r&&r.m(t,i),S(t,e,i),n=!0},p(t,n){!t[1]&&t[3]?r?(r.p(t,n),10&n[0]&&wt(r,1)):(r=ws(t),r.c(),wt(r,1),r.m(e.parentNode,e)):r&&(_t(),xt(r,1,1,(()=>{r=null})),bt())},i(t){n||(wt(r),n=!0)},o(t){xt(r),n=!1},d(t){r&&r.d(t),t&&D(e)}}}function ks(){}function Es(t,e,n){let r;var i,o,a,s;let{id:l}=e,{json:c={}}=e,{platform:u="auto"}=e,{theme:d="system"}=e,{globalVariablesController:p=new vs}=e,{mix:f=""}=e,{customization:g={}}=e,{builtinProtocols:m=["http","https","tel","mailto","intent"]}=e,{extensions:v=new Map}=e,{onError:y}=e,{onStat:$}=e,{onCustomAction:_}=e,{onComponent:b}=e,w=Mt("desktop"===u);if(h(t,w,(t=>n(4,r=t))),"auto"===u&&"undefined"!=typeof matchMedia){const t=matchMedia("(any-pointer: coarse)");w.set(!t.matches),t.addListener((()=>{w.set(!t.matches)}))}let x="light",k=null;function E(){"system"===d&&k&&n(22,x=k.matches?"dark":"light")}const C=new Set(m);let A=!1;c||(A=!0,I(Jt(new Error('"json" prop is required')))),l||(A=!0,I(Jt(new Error('"id" prop is required'))));let V=function(t){if(!t)return Jt(new Error("Missing object"));const e=t.card,n=t.templates||{};if(!e)return Jt(new Error("Missing card"));if(!e.states||!e.states.length)return Jt(new Error("Missing states"));for(const t in n)if(n.hasOwnProperty(t)&&t in Po)return Jt(new Error("Template name collision"),{additional:{templateName:t}});for(let t=0;t<e.states.length;++t){if(!e.states[t].div)return Jt(new Error("Missing state div"),{additional:{stateId:e.states[t].state_id}});if("number"!=typeof e.states[t].state_id)return Jt(new Error("Missing state_id"),{additional:{index:t}})}return null}(c);const j=c.templates||{};V&&(A=!0,I(V));const P={stateChange:!1},S=gs(p),D=ms(p),F=new Map,z=new Map,N=new Map;let M=null;function T(t){const e=ds(t,I);return e.vars.length?e.applyVars(z):t}function I(t){y?y({error:t}):"warn"===(null==t?void 0:t.level)?console.warn(t):console.error(t)}function O(t,e){$&&$({type:t,action:e})}let J=0;function B(t){return"".concat(l,"-").concat(J++)}let R={},U={};function L(t){const e=t.url?String(t.url):"";if(e)try{const t=e.replace(/div-action:\/\//,""),n=/([^?]+)\?(.+)/.exec(t);if(!n)return;const r=new URLSearchParams(n[2]);switch(n[1]){case"set_state":!function(t){if(!t)throw new Error("Missing state id");let e=Y,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],i=n[t+1];let o=e.getChild(r);if(!o)return;o.setState(i),e=o}}(r.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=G(t);n&&n.setCurrentItem(Number(e))}(r.get("id"),r.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=G(t);n&&n.setPreviousItem(e)}(r.get("id"),r.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=G(t);n&&n.setNextItem(e)}(r.get("id"),r.get("overflow"));break;case"set_variable":const n=r.get("name"),i=r.get("value");if(n&&null!==i){const t=z.get(n);t?t.set(i):I(Jt(new Error("Cannot find variable"),{additional:{name:n}}))}else I(Jt(new Error("Incorrect set_variable_action"),{additional:{url:t}}));break;case"timer":const o=r.get("action"),a=r.get("id");M?M.execTimerAction(a,o):I(Jt(new Error("Incorrect timer action"),{additional:{id:a,action:o}}));break;default:I(Jt(new Error("Unknown type of action"),{additional:{url:e}}))}}catch(t){I(Jt(t,{additional:{url:e}}))}}async function W(t,e){if(t){for(let n=0;n<t.length;++n){let r=t[n];const i=r.url;if(i){const t=ne(i);if(t)if(re(t,C)){if(e)if("_blank"===r.target){const t=window.open("","_blank");t&&(t.opener=null,t.location=i)}else location.href=i}else"div-action"===t?(L(r),await ut()):r.log_id&&(H(r),await ut())}}t.forEach((t=>{t.log_id&&O("click",t)}))}}function H(t){null==_||_(t)}const q=new Map;function G(t){if(q.has(t))return q.get(t);I(Jt(new Error("Missing instance with id"),{additional:{id:t}}))}const K=new Map;function X(t){for(const e of t)z.has(e)&&t.delete(e);return t}tt(Ot,{logError:I,logStat:O,hasTemplate:function(t){return t in j},processTemplate:function(t,e){if(!t)return{json:t,templateContext:e};const n=new Set([t.type]);for(;t.type in j;){if(({json:t,templateContext:e}=Wo(t,e,j,I)),n.has(t.type))return{json:t,templateContext:e};n.add(t.type)}return{json:t,templateContext:e}},genId:B,genClass:function(t){return"divkit-".concat(B())},execAction:L,execAnyActions:W,execCustomAction:H,isRunning:function(t){return P[t]},setRunning:function(t,e){P[t]=e},registerInstance:function(t,e){q.has(t)?I(Jt(new Error("Duplicate instance id"),{additional:{id:t}})):q.set(t,e)},unregisterInstance:function(t){q.delete(t)},addSvgFilter:function(t,e){const r="".concat(t,":").concat(e);if(U[r]=U[r]||0,++U[r],R[r])return R[r];const i="".concat(B(),"-svg-filter");return n(2,R=Object.assign(Object.assign({},R),{[r]:i})),i},removeSvgFilter:function(t,e){if(!t)return;const r="".concat(t,":").concat(e);U[r]&&0==--U[r]&&n(2,R=Object.keys(R).reduce(((t,e)=>(U[e]&&(t[e]=R[e]),t)),{}))},getDerivedFromVars:function(t){if(!t)return qo(t);const e=ds(t,I);return e.vars.length?Tt(e.vars.map((t=>z.get(t)||function(t){const e=N.get(t)||Mt(void 0);return N.has(t)||N.set(t,e),e}(t))).filter(Xt),(()=>e.applyVars(z))):e.hasExpression?qo(e.applyVars(z)):qo(t)},getJsonWithVars:T,getStore:function(t){return K.has(t)||function(t){K.has(t)||K.set(t,ps[t]())}(t),K.get(t)},getVariable:function(t,e){const n=z.get(t);if(n){const r=n.getType();if(r!==e)return void I(Jt(new Error('Variable should have type "'.concat(e,'"')),{additional:{name:t,foundType:r}}))}return n},getCustomization:function(t){return null==g?void 0:g[t]},getBuiltinProtocols:function(){return C},getExtension:function(t,e){const n=v.get(t);if(n)return new n(e||{})},getExtensionContext:function(){return{variables:z,logError:I}},isDesktop:w,registerComponent:void 0,unregisterComponent:void 0}),tt(be,{hasAction:()=>!1});const Y={setState(t){throw new Error("Not implemented")},getChild(t){if(Z&&Z.has(t))return Z.get(t);I(Jt(new Error("Missing state block with id"),{additional:{id:t}}))}};let Z=null;tt(ae,{registerInstance(t,e){Z||(Z=new Map),Z.has(t)?I(Jt(new Error("Duplicate state with id"),{additional:{id:t}})):Z.set(t,e)},unregisterInstance(t){null==Z||Z.delete(t)},runVisibilityTransition:(t,e,n,r,i)=>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 et=null===(i=null==c?void 0:c.card)||void 0===i?void 0:i.variables;Array.isArray(et)&&et.forEach((t=>{if(t&&t.type in Ki&&t.name){if(F.has(t.name))return void I(Jt(new Error("Duplicate variable"),{additional:{name:t.name}}));"integer"===t.type&&"number"==typeof t.value&&(t.value>Number.MAX_SAFE_INTEGER||t.value<Number.MIN_SAFE_INTEGER)&&I(Jt(new Error("The value of the integer variable could lose accuracy"),{level:"warn",additional:{name:t.name,value:t.value}}));try{const e=Xi(t.name,t.type,t.value);F.set(t.name,e),z.set(t.name,e)}catch(e){I(Jt(e,{additional:{name:t.name}}))}}}));const nt=c.palette;nt&&nt[x].forEach((t=>{if(F.has(t.name))I(Jt(new Error("Duplicate variable"),{additional:{name:t.name}}));else try{const e=Xi(t.name,"color",t.color);F.set(t.name,e),z.set(t.name,e)}catch(e){I(Jt(e,{additional:{name:t.name}}))}}));for(const[t,e]of D)z.has(t)||z.set(t,e);S.subscribe((t=>{if(t&&!z.has(t)){const e=D.get(t);z.set(t,e);const n=N.get(t);if(n){let t=0;e.subscribe((()=>{n.set(++t)}))}}}));const rt=null===(o=null==c?void 0:c.card)||void 0===o?void 0:o.variable_triggers;Array.isArray(rt)&&rt.forEach((t=>{let e=!1;if("string"!=typeof t.condition)return void I(Jt(new Error("variable_trigger has a condition that is not a string"),{additional:{condition:t.condition}}));const n=t.mode||"on_condition";if("on_variable"===n||"on_condition"===n)try{const r=ea(t.condition,{startRule:"JsonStringContents"}),i=ha(r);if(!i.length)return void I(Jt(new Error("variable_trigger must have variables in the condition"),{additional:{condition:t.condition}}));(function(t){const e=new Set(t);return X(e),e.size?new Promise((t=>{const n=S.subscribe((()=>{X(e),e.size||(n(),t())}))})):Promise.resolve()})(i).then((()=>{Tt(i.map((t=>z.get(t))).filter(Xt),(()=>{const t=ss(z,r);return t.warnings.forEach(I),t.result})).subscribe((r=>{"error"!==r.type?(r.value&&("on_variable"===n||"on_condition"===n&&!1===e)&&t.actions.forEach((t=>{const e=T(t);e.log_id&&L(e)})),e=Boolean(r.value)):I(Jt(new Error("variable_trigger condition execution error"),{additional:{message:r.value}}))}))}))}catch(e){I(Jt(new Error("Unable to parse variable_trigger"),{additional:{condition:t.condition}}))}else I(Jt(new Error("variable_trigger has an unsupported mode"),{additional:{mode:n}}))}));const it=null===(a=null==c?void 0:c.card)||void 0===a?void 0:a.timers;if(it){const t=M=new bs({logError:I,applyVars:T,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):I(Jt(new Error("Cannot find variable"),{additional:{name:t}}))},execAnyActions:W});it.forEach((e=>t.createTimer(e)))}const ot=null===(s=null==c?void 0:c.card)||void 0===s?void 0:s.states;let at;return ot&&!A&&(at={type:"state",id:"root",width:{type:"match_parent"},height:{type:"match_parent"},states:ot.map((t=>({state_id:t.state_id.toString(),div:t.div})))}),Q((()=>{M&&M.destroy()})),t.$$set=t=>{"id"in t&&n(8,l=t.id),"json"in t&&n(9,c=t.json),"platform"in t&&n(10,u=t.platform),"theme"in t&&n(7,d=t.theme),"globalVariablesController"in t&&n(11,p=t.globalVariablesController),"mix"in t&&n(0,f=t.mix),"customization"in t&&n(12,g=t.customization),"builtinProtocols"in t&&n(13,m=t.builtinProtocols),"extensions"in t&&n(14,v=t.extensions),"onError"in t&&n(15,y=t.onError),"onStat"in t&&n(16,$=t.onStat),"onCustomAction"in t&&n(17,_=t.onCustomAction),"onComponent"in t&&n(18,b=t.onComponent)},t.$$.update=()=>{8388736&t.$$.dirty[0]&&("light"===d||"dark"===d?n(22,x=d):"system"===d?"undefined"!=typeof matchMedia?(k||(n(23,k=matchMedia("(prefers-color-scheme: dark)")),k.addListener(E)),n(22,x=k.matches?"dark":"light")):n(22,x="light"):I(Jt(new Error("Unsupported theme")))),4194304&t.$$.dirty[0]&&x&&nt&&nt[x].forEach((t=>{const e=z.get(t.name);e&&e.setValue(t.color)}))},[f,A,R,at,r,w,{},d,l,c,u,p,g,m,v,y,$,_,b,function(t){n(7,d=t)},function(){},L,x,k]}const Cs=class extends zt{constructor(t){super(),Ft(this,t,Es,xs,d,{id:8,json:9,platform:10,theme:7,globalVariablesController:11,mix:0,customization:12,builtinProtocols:13,extensions:14,onError:15,onStat:16,onCustomAction:17,onComponent:18,setTheme:19,getDebugVariables:20,execAction:21},null,[-1,-1,-1])}get setTheme(){return this.$$.ctx[19]}get getDebugVariables(){return this.$$.ctx[20]}get execAction(){return this.$$.ctx[21]}};class As{constructor(t){var e,n,r;e=this,r={},n=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)}(n="sizeHistory"),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,this.widthVariableName=t.width_variable_name,this.heightVariableName=t.height_variable_name}setVariable(t,e){if(!this.context)return!1;if(t){const n=this.context.variables.get(t);if(n&&"integer"===n.getType()){if(e=Math.round(e),this.sizeHistory[t]||(this.sizeHistory[t]=new Set),!this.sizeHistory[t].has(e))return n.setValue(e),this.sizeHistory[t].add(e),!0}else{const e=new Error("Missing variable");e.level="error",e.additional={variableName:t},this.context.logError(e)}}return!1}recalcProps(){if(!this.node||!this.context)return!1;const t=this.node.getBoundingClientRect(),e=this.setVariable(this.widthVariableName,t.width),n=this.setVariable(this.heightVariableName,t.height);return e||n}mountView(t,e){var n;this.node=t,this.context=e,this.resizeObserver||"undefined"==typeof ResizeObserver||(this.resizeObserver=new ResizeObserver((async()=>{let t=0;for(;this.recalcProps();){if(++t>8){const t=new Error("Recursive layout in size_provider");t.level="warn",t.additional={widthVariableName:this.widthVariableName,heightVariableName:this.heightVariableName},e.logError(t);break}await ut()}this.sizeHistory={}}))),null===(n=this.resizeObserver)||void 0===n||n.observe(t),this.recalcProps()}unmountView(t,e){var n;null===(n=this.resizeObserver)||void 0===n||n.disconnect(),this.resizeObserver=void 0}}function Vs(t){return t instanceof HTMLElement}function js(t){return class{constructor(t){this.params=t}mountView(e,n){if(!this.params.lottie_url&&!this.params.lottie_json)return;const r=Array.from(e.children).filter(Vs);r.forEach((t=>{t.style.display="none"})),this.wrapper=document.createElement("div"),this.wrapper.style.width="100%",this.wrapper.style.height="100%",e.appendChild(this.wrapper);const i=Number(this.params.repeat_count||-1),o=this.animItem=t({container:this.wrapper,path:this.params.lottie_url,animationData:this.params.lottie_json,renderer:"svg",loop:!0});if(this.animItem.addEventListener("data_failed",(()=>{var t;null===(t=this.animItem)||void 0===t||t.destroy(),r.forEach((t=>{t.style.display=""}));const e=new Error("Failed to load lottie animation");e.level="error",e.additional={url:this.params.lottie_url},n.logError(e)})),"reverse"===this.params.repeat_mode||-1!==i){let t=1,e=0;o.addEventListener("loopComplete",(()=>{++e,-1!==i&&e===i?(o.stop(),o.goToAndStop(o.totalFrames,!0)):("reverse"===this.params.repeat_mode&&(t*=-1,o.setDirection(t)),o.goToAndPlay(1===t?0:o.totalFrames,!0))}))}}unmountView(t,e){var n,r;null===(n=this.animItem)||void 0===n||n.destroy(),this.wrapper&&(null===(r=this.wrapper.parentNode)||void 0===r||r.removeChild(this.wrapper),this.wrapper=void 0)}}}function Ps(t){return new Cs({target:t.target,props:{id:t.id,json:t.json,globalVariablesController:t.globalVariablesController,mix:t.mix,customization:t.customization,builtinProtocols:t.builtinProtocols,extensions:t.extensions,onStat:t.onStat,onCustomAction:t.onCustomAction,onError:t.onError,onComponent:t.onComponent,platform:t.platform,theme:t.theme},hydrate:t.hydrate})}var Ss=e.Hy,Ds=e.M,Fs=e.Os,zs=e._0,Ns=e.sY;export{Ss as SizeProvider,Ds as createGlobalVariablesController,Fs as createVariable,zs as lottieExtensionBuilder,Ns as render};
|
|
2
2
|
//# sourceMappingURL=client.mjs.map
|