@divkitframework/divkit 28.9.0 → 28.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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.css +1 -1
- package/dist/client.css.map +1 -1
- package/dist/client.js +1 -1
- package/dist/client.js.map +1 -1
- package/dist/esm/client-devtool.mjs +1 -1
- package/dist/esm/client-devtool.mjs.map +1 -1
- package/dist/esm/client-hydratable.mjs +1 -1
- package/dist/esm/client-hydratable.mjs.map +1 -1
- package/dist/esm/client.mjs +1 -1
- package/dist/esm/client.mjs.map +1 -1
- package/dist/esm/server.mjs +1 -1
- package/dist/esm/server.mjs.map +1 -1
- package/dist/server.js +1 -1
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
- package/typings/common.d.ts +19 -1
package/dist/client.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{"use strict";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),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(){}t.r(e),t.d(e,{SizeProvider:()=>wc,createGlobalVariablesController:()=>lc,createVariable:()=>Io,lottieExtensionBuilder:()=>kc,render:()=>Cc});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 t===e||(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){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];if(null==t){for(const t of r)t(void 0);return n}const o=t.subscribe(...r);return o.unsubscribe?()=>o.unsubscribe():o}function f(t,e,n){t.$$.on_destroy.push(p(e,n))}function g(t,e,n,r){if(t){const i=h(t,e,n,r);return t[0](i)}}function h(t,e,n,r){return t[1]&&r?i(n.ctx.slice(),t[1](r(e))):n.ctx}function m(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 v(t,e,n,r,i,o){if(i){const a=h(e,n,r,o);t.p(a,i)}}function y(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 _="undefined"!=typeof window;let w=_?()=>window.performance.now():()=>Date.now(),x=_?t=>requestAnimationFrame(t):n;const k=new Set;function E(t){k.forEach((e=>{e.c(t)||(k.delete(e),e.f())})),0!==k.size&&x(E)}function C(t){let e;return 0===k.size&&x(E),{promise:new Promise((n=>{k.add(e={c:t,f:n})})),abort(){k.delete(e)}}}const A="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function V(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 j{constructor(t){V(this,"_listeners","WeakMap"in A?new WeakMap:void 0),V(this,"_observer",void 0),V(this,"options",void 0),this.options=t}observe(t,e){return this._listeners.set(t,e),this._getObserver().observe(t,this.options),()=>{this._listeners.delete(t),this._observer.unobserve(t)}}_getObserver(){var t;return null!==(t=this._observer)&&void 0!==t?t:this._observer=new ResizeObserver((t=>{for(const n of t){var e;j.entries.set(n.target,n),null===(e=this._listeners.get(n.target))||void 0===e||e(n)}}))}}j.entries="WeakMap"in A?new WeakMap:void 0;let P=!1;function D(t,e){t.appendChild(e)}function F(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function S(t){const e=M("style");return e.textContent="/* empty */",function(t,e){D(t.head||t,e),e.sheet}(F(t),e),e.sheet}function N(t,e,n){t.insertBefore(e,n||null)}function O(t){t.parentNode&&t.parentNode.removeChild(t)}function I(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function M(t){return document.createElement(t)}function T(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function z(t){return document.createTextNode(t)}function J(){return z(" ")}function R(){return z("")}function B(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function L(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}const U=["width","height"];function W(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&&-1===U.indexOf(r)?t[r]=e[r]:L(t,r,e[r])}function H(t,e){Object.keys(e).forEach((n=>{!function(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:L(t,e,n)}(t,n,e[n])}))}function q(t){return/-/.test(t)?H:W}function G(t,e){e=""+e,t.data!==e&&(t.data=e)}function K(t,e,n,r){null==n?t.style.removeProperty(e):t.style.setProperty(e,n,r?"important":"")}function X(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 Y(t,e){return new t(e)}const Z=new Map;let Q,tt=0;function et(t,e,n,r,i,o,a){let s=arguments.length>7&&void 0!==arguments[7]?arguments[7]: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+"%{".concat(a(r,1-r),"}\n")}const u=c+"100% {".concat(a(n,1-n),"}\n}"),d="__svelte_".concat(function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(u),"_").concat(s),p=F(t),{stylesheet:f,rules:g}=Z.get(p)||function(t,e){const n={stylesheet:S(e),rules:{}};return Z.set(t,n),n}(p,t);g[d]||(g[d]=!0,f.insertRule("@keyframes ".concat(d," ").concat(u),f.cssRules.length));const h=t.style.animation||"";return t.style.animation="".concat(h?"".concat(h,", "):"").concat(d," ").concat(r,"ms linear ").concat(i,"ms 1 both"),tt+=1,d}function nt(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(", "),tt-=i,tt||x((()=>{tt||(Z.forEach((t=>{const{ownerNode:e}=t.stylesheet;e&&O(e)})),Z.clear())})))}function rt(t){Q=t}function it(){if(!Q)throw new Error("Function called outside component initialization");return Q}function ot(t){it().$$.on_mount.push(t)}function at(t){it().$$.on_destroy.push(t)}function st(t,e){return it().$$.context.set(t,e),e}function lt(t){return it().$$.context.get(t)}function ct(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t.call(this,e)))}const ut=[],dt=[];let pt=[];const ft=[],gt=Promise.resolve();let ht=!1;function mt(){ht||(ht=!0,gt.then(wt))}function vt(){return mt(),gt}function yt(t){pt.push(t)}const $t=new Set;let bt,_t=0;function wt(){if(0!==_t)return;const t=Q;do{try{for(;_t<ut.length;){const t=ut[_t];_t++,rt(t),xt(t.$$)}}catch(t){throw ut.length=0,_t=0,t}for(rt(null),ut.length=0,_t=0;dt.length;)dt.pop()();for(let t=0;t<pt.length;t+=1){const e=pt[t];$t.has(e)||($t.add(e),e())}pt.length=0}while(ut.length);for(;ft.length;)ft.pop()();ht=!1,$t.clear(),rt(t)}function xt(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(yt)}}function kt(){return bt||(bt=Promise.resolve(),bt.then((()=>{bt=null}))),bt}function Et(t,e,n){t.dispatchEvent(function(t,e){let{bubbles:n=!1,cancelable:r=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new CustomEvent(t,{detail:e,bubbles:n,cancelable:r})}("".concat(e?"intro":"outro").concat(n)))}const Ct=new Set;let At;function Vt(){At={r:0,c:[],p:At}}function jt(){At.r||s(At.c),At=At.p}function Pt(t,e){t&&t.i&&(Ct.delete(t),t.i(e))}function Dt(t,e,n,r){if(t&&t.o){if(Ct.has(t))return;Ct.add(t),At.c.push((()=>{Ct.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}else r&&r()}const Ft={duration:0};function St(t,e,i){const o={direction:"in"};let a,s,c=e(t,i,o),u=!1,d=0;function p(){a&&nt(t,a)}function f(){const{delay:e=0,duration:i=300,easing:o=r,tick:l=n,css:f}=c||Ft;f&&(a=et(t,0,1,i,e,o,f,d++)),l(0,1);const g=w()+e,h=g+i;s&&s.abort(),u=!0,yt((()=>Et(t,!0,"start"))),s=C((e=>{if(u){if(e>=h)return l(1,0),Et(t,!0,"end"),p(),u=!1;if(e>=g){const t=o((e-g)/i);l(t,1-t)}}return u}))}let g=!1;return{start(){g||(g=!0,nt(t),l(c)?(c=c(o),kt().then(f)):f())},invalidate(){g=!1},end(){u&&(p(),u=!1)}}}function Nt(t){return void 0!==(null==t?void 0:t.length)?t:Array.from(t)}function Ot(t,e){Dt(t,1,1,(()=>{e.delete(t.key)}))}function It(t,e,n,r,i,o,a,l,c,u,d,p){let f=t.length,g=o.length,h=f;const m={};for(;h--;)m[t[h].key]=h;const v=[],y=new Map,$=new Map,b=[];for(h=g;h--;){const t=p(i,o,h),s=n(t);let l=a.get(s);l?r&&b.push((()=>l.p(t,e))):(l=u(s,t),l.c()),y.set(s,v[h]=l),s in m&&$.set(s,Math.abs(h-m[s]))}const _=new Set,w=new Set;function x(t){Pt(t,1),t.m(l,d),a.set(t.key,t),d=t.first,g--}for(;f&&g;){const e=v[g-1],n=t[f-1],r=e.key,i=n.key;e===n?(d=e.first,f--,g--):y.has(i)?!a.has(r)||_.has(r)?x(e):w.has(i)?f--:$.get(r)>$.get(i)?(w.add(r),x(e)):(_.add(i),f--):(c(n,a),f--)}for(;f--;){const e=t[f];y.has(e.key)||c(e,a)}for(;g;)x(v[g-1]);return s(b),v}function Mt(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 Tt;function zt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Jt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?zt(Object(n),!0).forEach((function(e){Rt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):zt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Rt(t,e,n){return e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Bt(t){t&&t.c()}function Lt(t,e,n){const{fragment:r,after_update:i}=t.$$;r&&r.m(e,n),yt((()=>{const e=t.$$.on_mount.map(o).filter(l);t.$$.on_destroy?t.$$.on_destroy.push(...e):s(e),t.$$.on_mount=[]})),i.forEach(yt)}function Ut(t,e){const n=t.$$;null!==n.fragment&&(function(t){const e=[],n=[];pt.forEach((r=>-1===t.indexOf(r)?e.push(r):n.push(r))),n.forEach((t=>t())),pt=e}(n.after_update),s(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Wt(t,e,r,i,o,l,c){let u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[-1];const d=Q;rt(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||{},(function(e,n){const r=!(arguments.length<=2)&&arguments.length-2?arguments.length<=2?void 0:arguments[2]:n;return p.ctx&&o(p.ctx[e],p.ctx[e]=r)&&(!p.skip_bound&&p.bound[e]&&p.bound[e](r),f&&function(t,e){-1===t.$$.dirty[0]&&(ut.push(t),mt(),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){P=!0;const t=(g=e.target,Array.from(g.childNodes));p.fragment&&p.fragment.l(t),t.forEach(O)}else p.fragment&&p.fragment.c();e.intro&&Pt(t.$$.fragment),Lt(t,e.target,e.anchor),P=!1,wt()}var g;rt(d)}function Ht(t,e,n,r){var i;const o=null===(i=n[t])||void 0===i?void 0:i.type;if(e="Boolean"===o&&"boolean"!=typeof e?null!=e:e,!r||!n[t])return e;if("toAttribute"===r)switch(o){case"Object":case"Array":return null==e?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return null==e?null:e;default:return e}else switch(o){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":default:return e;case"Number":return null!=e?+e:e}}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&&(Tt=class extends HTMLElement{constructor(t,e,n){super(),Rt(this,"$$ctor",void 0),Rt(this,"$$s",void 0),Rt(this,"$$c",void 0),Rt(this,"$$cn",!1),Rt(this,"$$d",{}),Rt(this,"$$r",!1),Rt(this,"$$p_d",{}),Rt(this,"$$l",{}),Rt(this,"$$l_u",new Map),this.$$ctor=t,this.$$s=e,n&&this.attachShadow({mode:"open"})}addEventListener(t,e,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const n=this.$$c.$on(t,e);this.$$l_u.set(e,n)}super.addEventListener(t,e,n)}removeEventListener(t,e,n){if(super.removeEventListener(t,e,n),this.$$c){const t=this.$$l_u.get(e);t&&(t(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){if(await Promise.resolve(),!this.$$cn)return;function t(t){return()=>{let e;return{c:function(){e=M("slot"),"default"!==t&&L(e,"name",t)},m:function(t,n){N(t,e,n)},d:function(t){t&&O(e)}}}}const e={},n=function(t){const e={};return t.childNodes.forEach((t=>{e[t.slot||"default"]=!0})),e}(this);for(const i of this.$$s)i in n&&(e[i]=[t(i)]);for(const o of this.attributes){const a=this.$$g_p(o.name);a in this.$$d||(this.$$d[a]=Ht(a,o.value,this.$$p_d,"toProp"))}this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:Jt(Jt({},this.$$d),{},{$$slots:e,$$scope:{ctx:[]}})});const r=()=>{this.$$r=!0;for(const t in this.$$p_d)if(this.$$d[t]=this.$$c.$$.ctx[this.$$c.$$.props[t]],this.$$p_d[t].reflect){const e=Ht(t,this.$$d[t],this.$$p_d,"toAttribute");null==e?this.removeAttribute(t):this.setAttribute(this.$$p_d[t].attribute||t,e)}this.$$r=!1};this.$$c.$$.after_update.push(r),r();for(const s in this.$$l)for(const l of this.$$l[s]){const c=this.$$c.$on(s,l);this.$$l_u.set(l,c)}this.$$l={}}}attributeChangedCallback(t,e,n){var r;this.$$r||(t=this.$$g_p(t),this.$$d[t]=Ht(t,n,this.$$p_d,"toProp"),null===(r=this.$$c)||void 0===r||r.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then((()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)}))}$$g_p(t){return Object.keys(this.$$p_d).find((e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t))||t}});class qt{constructor(){Rt(this,"$$",void 0),Rt(this,"$$set",void 0)}$destroy(){Ut(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){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Gt=[];function Kt(t){let e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;const i=new Set;function o(n){if(o=n,((r=t)!=r?o==o:r!==o||r&&"object"==typeof r||"function"==typeof r)&&(t=n,e)){const e=!Gt.length;for(const e of i)e[1](),Gt.push(e,t);if(e){for(let t=0;t<Gt.length;t+=2)Gt[t][0](Gt[t+1]);Gt.length=0}}var r,o}function a(e){o(e(t))}return{set:o,update:a,subscribe:function(s){const l=[s,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n];return i.add(l),1===i.size&&(e=r(o,a)||n),s(t),()=>{i.delete(l),0===i.size&&e&&(e(),e=null)}}}}function Xt(t,e,r){const i=!Array.isArray(t),o=i?[t]:t;if(!o.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const a=e.length<2;return c=(t,r)=>{let c=!1;const u=[];let d=0,f=n;const g=()=>{if(d)return;f();const o=e(i?u[0]:u,t,r);a?t(o):f=l(o)?o:n},h=o.map(((t,e)=>p(t,(t=>{u[e]=t,d&=~(1<<e),c&&g()}),(()=>{d|=1<<e}))));return c=!0,g(),function(){s(h),f(),c=!1}},{subscribe:Kt(r,c).subscribe};var c}const Yt={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"},Zt=Symbol("root");function Qt(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 te={"text-range":"divkit-faf07",text:"divkit-d9b0e",text_halign_left:"divkit-a4cb7",text_halign_center:"divkit-e1659",text_halign_right:"divkit-ea280",text_valign_top:"divkit-d8ce0",text_valign_center:"divkit-ef58e",text_valign_bottom:"divkit-fe8ed",text_valign_baseline:"divkit-e0c6c",text__inner:"divkit-b8528",text_singleline:"divkit-ef11c",text_multiline:"divkit-ee8e3",text_truncate_none:"divkit-c6ea1",text__inner_gradient:"divkit-cb8e0",text__image:"divkit-bf6e2",text__image_hidden:"divkit-f1002","text_has-focus-color":"divkit-cb341"},ee={outer:"divkit-d65a7","outer_hide-on-transition-in":"divkit-a6d12","outer_halign-self_start":"divkit-cc452","outer_halign-self_center":"divkit-b8331","outer_halign-self_end":"divkit-c573c","outer_halign-self_stretch":"divkit-dcc74","outer_valign-self_start":"divkit-e8077","outer_valign-self_center":"divkit-d40a7","outer_valign-self_end":"divkit-e9f84","outer_valign-self_stretch":"divkit-b7aa3","outer_parent-flex_vertical":"divkit-c143f","outer_parent-flex_horizontal":"divkit-ef302","outer_valign-self_baseline":"divkit-e72b5",outer_width_content:"divkit-b8f4d",outer_height_content:"divkit-faa66","outer_width-constrained":"divkit-d3211","outer_parent-grid":"divkit-ff439","outer_height-constrained":"divkit-a5256","outer_parent-overlap":"divkit-dab2d","outer_parent-overlap-absolute":"divkit-d43fb","outer_scroll-snap_center":"divkit-d9e38","outer_scroll-snap_start":"divkit-efd1e",outer__border:"divkit-d4056",outer_visibility_invisible:"divkit-f018b",outer_visibility_gone:"divkit-e784b","outer_has-action-animation":"divkit-f4980","outer_has-custom-focus":"divkit-c7f14"};function ne(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 re(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 ie(t){let e=re(t);return"0"===e&&(e+="em"),e}function oe(t,e){for(;t.length<e;)t="0"+t;return t}function ae(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=("string"==typeof t&&t||"").toLowerCase()).charAt(0))return n;const r=se(t);return r?(r.a*=e,function(t){return 255===t.a?"#".concat([t.r,t.g,t.b].map((t=>oe(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 se(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 le(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 ce=Boolean;function ue(t){if(1===t.length&&"solid"===t[0].type)return{color:ae(t[0].color||"transparent"),size:"auto",position:"50% 50%"};const e=t.map((t=>"solid"===t.type?function(t){const e=ae(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(ce);return n.length?{size:void 0,pos:void 0,image:"linear-gradient("+(90-Number(t.bg.angle||0))+"deg,"+n.map((t=>ae(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:fe(t.bg.scale),pos:ge(t.bg),image:'url("'+le(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(ce);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=ie(r.value):"relative"===r.type&&(i=de[r.value]));const o=pe(t.bg.center_x),a=pe(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=>ae(t))).join(",")+")"}}({bg:t}):void 0)).filter(ce).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 de={nearest_corner:"closest-corner",farthest_corner:"farthest-corner",nearest_side:"closest-side",farthest_side:"farthest-side"};function pe(t){if(t&&"object"==typeof t&&"type"in t&&void 0!==t.value){if("fixed"===t.type)return ie(t.value);if("relative"===t.type)return"".concat(100*Number(t.value),"%")}return"50%"}function fe(t){return"fit"===t?"contain":"stretch"===t?"fill":"no_scale"===t?"none":"cover"}function ge(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 he(t){const e=/^([^/]+):\/\//.exec(t);return e&&e[1]||""}function me(t,e){return e.has(t)}function ve(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ye(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ve(Object(n),!0).forEach((function(e){$e(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ve(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function $e(t,e,n){return e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function be(t,e,n){return"number"==typeof e&&(t&&e>0&&e<=100||!t&&e>=0&&e<100)?e:n}function _e(t,e){e&&t.push(e)}function we(t,e,n){const r=[];_e(r,e[t]);for(const i in n)if(n.hasOwnProperty(i)){const o=n[i];o&&_e(r,e["".concat(t,"_").concat(i)+("string"==typeof o?"_".concat(o):"")])}return r.join(" ")}const xe=Symbol("state");function ke(t){return re(t.top||0)+" "+re(t.right||0)+" "+re(t.bottom||0)+" "+re(t.left||0)}function Ee(t){if("number"!=typeof t&&"string"!=typeof t)return!1;const e=Number(t);return!isNaN(e)}function Ce(t){return Ee(t)&&t>=0}function Ae(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 ke(t)}function Ve(t,e){const n=Number(t);return isNaN(n)||n<0?e:n}const je=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(!je.call(e,i)||!Pe(t[i],e[i]))return!1}return!0}function De(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 Se(t,e){const n=Number(t);return isNaN(n)?e:n}function Ne(t){const e=[];return"set"===t.name?(t.items||[]).forEach((t=>{e.push(...Ne(t))})):e.push(t),e}function Oe(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 Ie(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=>re((t||e)/n*10))).join(" ")}function Me(){}const Te=Symbol("action");function ze(t){const e=t.touches[0];return{x:e.clientX||e.pageX,y:e.clientY||e.pageY}}function Je(t){var e;let n,r,o,a,l,c,u,d;const p=t[15].default,f=g(p,t,t[14],null);let h=[{class:r=t[1]+(t[8]?" ".concat(t[5]?Yt.root__clickable:Yt["root__clickable-no-transition"]," ").concat(Yt.root__unselectable):"")+" "+(null!==(e=t[0])&&void 0!==e&&e.length?Yt["root_disabled-context-menu"]:"")},{style:t[2]},{role:o=t[8]?"button":null},{tabindex:a=t[8]?0:null},t[3]],$={};for(let t=0;t<h.length;t+=1)$=i($,h[t]);return{c(){n=M("span"),f&&f.c(),W(n,$)},m(e,r){N(e,n,r),f&&f.m(n,null),t[23](n),c=!0,u||(d=[b(l=t[4].call(null,n)),B(n,"click",t[19]),B(n,"keydown",t[10]),B(n,"focus",t[20]),B(n,"blur",t[21])],u=!0)},p(t,e){var i;f&&f.p&&(!c||16384&e[0])&&v(f,p,t,t[14],c?m(p,t[14],e,null):y(t[14]),null),W(n,$=Mt(h,[(!c||291&e[0]&&r!==(r=t[1]+(t[8]?" ".concat(t[5]?Yt.root__clickable:Yt["root__clickable-no-transition"]," ").concat(Yt.root__unselectable):"")+" "+(null!==(i=t[0])&&void 0!==i&&i.length?Yt["root_disabled-context-menu"]:"")))&&{class:r},(!c||4&e[0])&&{style:t[2]},(!c||256&e[0]&&o!==(o=t[8]?"button":null))&&{role:o},(!c||256&e[0]&&a!==(a=t[8]?0:null))&&{tabindex:a},8&e[0]&&t[3]]))},i(t){c||(Pt(f,t),c=!0)},o(t){Dt(f,t),c=!1},d(e){e&&O(n),f&&f.d(e),t[23](null),u=!1,s(d)}}}function Re(t){var e;let n,r,o,a,l,c;const u=t[15].default,d=g(u,t,t[14],null);let p=[{href:t[7]},{target:t[9]},{style:t[2]},{class:r=t[1]+" "+(t[5]?Yt.root__clickable:Yt["root__clickable-no-transition"])+" "+(null!==(e=t[0])&&void 0!==e&&e.length?Yt["root_disabled-context-menu"]:"")},t[3]],f={};for(let t=0;t<p.length;t+=1)f=i(f,p[t]);return{c(){n=M("a"),d&&d.c(),W(n,f)},m(e,r){N(e,n,r),d&&d.m(n,null),t[22](n),a=!0,l||(c=[b(o=t[4].call(null,n)),B(n,"click",t[16]),B(n,"keydown",t[10]),B(n,"focus",t[17]),B(n,"blur",t[18])],l=!0)},p(t,e){var i;d&&d.p&&(!a||16384&e[0])&&v(d,u,t,t[14],a?m(u,t[14],e,null):y(t[14]),null),W(n,f=Mt(p,[(!a||128&e[0])&&{href:t[7]},(!a||512&e[0])&&{target:t[9]},(!a||4&e[0])&&{style:t[2]},(!a||35&e[0]&&r!==(r=t[1]+" "+(t[5]?Yt.root__clickable:Yt["root__clickable-no-transition"])+" "+(null!==(i=t[0])&&void 0!==i&&i.length?Yt["root_disabled-context-menu"]:"")))&&{class:r},8&e[0]&&t[3]]))},i(t){a||(Pt(d,t),a=!0)},o(t){Dt(d,t),a=!1},d(e){e&&O(n),d&&d.d(e),t[22](null),l=!1,s(c)}}}function Be(t){let e,n,r,i;const o=[Re,Je],a=[];function s(t,e){return t[7]?0:1}return e=s(t),n=a[e]=o[e](t),{c(){n.c(),r=R()},m(t,n){a[e].m(t,n),N(t,r,n),i=!0},p(t,i){let l=e;e=s(t),e===l?a[e].p(t,i):(Vt(),Dt(a[l],1,1,(()=>{a[l]=null})),jt(),n=a[e],n?n.p(t,i):(n=a[e]=o[e](t),n.c()),Pt(n,1),n.m(r.parentNode,r))},i(t){i||(Pt(n),i=!0)},o(t){Dt(n),i=!1},d(t){t&&O(r),a[e].d(t)}}}function Le(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=Me}=e,{customAction:p=null}=e,{isNativeActionAnimation:f=!0}=e;const g=lt(Zt),h=lt(Te);let m;st(Te,{hasAction:()=>Boolean(h.hasAction()||(null==o?void 0:o.length))});let v,y="",$=-1,b=null,_=!1,w=!1;async function x(t){h.hasAction()||void 0!==t.button&&0!==t.button||(!1===(null==p?void 0:p(t))?t.preventDefault():o&&(o.some((t=>{if(null==t?void 0:t.typed)return!0;const e=null==t?void 0:t.url;if(!e)return!1;const n=he(e);return n&&!me(n,g.getBuiltinProtocols())}))&&t.preventDefault(),g.execAnyActions(o)))}function k(t){h.hasAction()||void 0!==t.button&&0!==t.button||g.execAnyActions(a,!0)}function E(t){t.touches.length>1||(b=ze(t),_=!1,$=Date.now())}function C(t){if(!b)return;const e=ze(t);(Math.abs(b.x-e.x)>8||Math.abs(b.y-e.y)>8)&&(_=!0)}function A(){!b||$<0||(!_&&Date.now()-$>=400&&g.execAnyActions(s,!0),b=null,$=-1)}return t.$$set=t=>{"actions"in t&&n(11,o=t.actions),"doubleTapActions"in t&&n(12,a=t.doubleTapActions),"longTapActions"in t&&n(0,s=t.longTapActions),"cls"in t&&n(1,l=t.cls),"style"in t&&n(2,c=t.style),"attrs"in t&&n(3,u=t.attrs),"use"in t&&n(4,d=t.use),"customAction"in t&&n(13,p=t.customAction),"isNativeActionAnimation"in t&&n(5,f=t.isNativeActionAnimation),"$$scope"in t&&n(14,i=t.$$scope)},t.$$.update=()=>{if(10368&t.$$.dirty[0]){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,y=e),n(9,v=o[t].target||void 0);break}}Array.isArray(o)&&(null==o?void 0:o.length)&&h.hasAction()&&(n(7,y=""),g.logError(Qt(new Error("Actionable element is forbidden inside other actionable element"),{level:"warn",additional:{actions:o}}))),n(8,w=Boolean(p)),y&&!me(he(y),g.getBuiltinProtocols())?(n(7,y=""),n(8,w=!0)):!y&&Array.isArray(o)&&(null==o?void 0:o.length)&&(n(8,w=!0),o.some((t=>t.url||t.typed))||g.logError(Qt(new Error("The component has a list of actions, but does not have a real action"),{level:"warn",additional:{actions:o}})))}4545&t.$$.dirty[0]&&m&&(y||w?m.addEventListener("click",x):m.removeEventListener("click",x),(null==a?void 0:a.length)?m.addEventListener("dblclick",k):m.removeEventListener("dblclick",k),(null==s?void 0:s.length)?(m.addEventListener("touchstart",E,{passive:!0}),m.addEventListener("touchmove",C,{passive:!0}),m.addEventListener("touchend",A,{passive:!0}),m.addEventListener("touchcancel",A,{passive:!0})):(m.removeEventListener("touchstart",E),m.removeEventListener("touchmove",C),m.removeEventListener("touchend",A),m.removeEventListener("touchcancel",A)))},[s,l,c,u,d,f,m,y,w,v,function(t){const e=t.target;e instanceof HTMLElement&&("INPUT"===e.tagName||"true"===e.contentEditable)||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||"Enter"===t.key&&Array.isArray(o)&&o.length&&(g.execAnyActions(o),t.preventDefault())},o,a,p,i,r,function(e){ct.call(this,t,e)},function(e){ct.call(this,t,e)},function(e){ct.call(this,t,e)},function(e){ct.call(this,t,e)},function(e){ct.call(this,t,e)},function(e){ct.call(this,t,e)},function(t){dt[t?"unshift":"push"]((()=>{m=t,n(6,m)}))},function(t){dt[t?"unshift":"push"]((()=>{m=t,n(6,m)}))}]}const Ue=class extends qt{constructor(t){super(),Wt(this,t,Le,Be,d,{actions:11,doubleTapActions:12,longTapActions:0,cls:1,style:2,attrs:3,use:4,customAction:13,isNativeActionAnimation:5},null,[-1,-1])}},We={"outer-background":"divkit-bf253","outer-background_clip":"divkit-dcad7","outer-background__item":"divkit-b921d","outer-background__item_hidden":"divkit-cd613"};function He(t){return Ee(t)&&t>0}function qe(t,e){return t.map((t=>{if("blur"===(null==t?void 0:t.type)){if(He(t.radius))return"blur(".concat(ie(t.radius/2),")")}else e(Qt(new Error("Unknown filter"),{level:"warn",additional:{filter:null==t?void 0:t.type}}))})).filter(Boolean).join(" ")}function Ge(t,e,n){const r=t.slice();return r[5]=e[n],r}function Ke(t){let e,n,r;return{c(){e=M("span"),L(e,"class",n=We["outer-background__item"]),L(e,"style",r=ne(t[5].style))},m(t,n){N(t,e,n)},p(t,n){2&n&&r!==(r=ne(t[5].style))&&L(e,"style",r)},d(t){t&&O(e)}}}function Xe(t){let e,n,r,i,o,a;return{c(){e=M("img"),u(e.src,n=t[5].image_url)||L(e,"src",n),L(e,"alt",""),L(e,"aria-hidden","true"),L(e,"loading","lazy"),L(e,"decoding","async"),L(e,"class",r=We["outer-background__item"]),L(e,"style",i=ne(t[5].style))},m(n,r){N(n,e,r),o||(a=B(e,"error",t[2]),o=!0)},p(t,r){2&r&&!u(e.src,n=t[5].image_url)&&L(e,"src",n),2&r&&i!==(i=ne(t[5].style))&&L(e,"style",i)},d(t){t&&O(e),o=!1,a()}}}function Ye(t){let e;function n(t,e){return t[5].image_url?Xe:Ke}let r=n(t),i=r(t);return{c(){i.c(),e=R()},m(t,n){i.m(t,n),N(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){t&&O(e),i.d(t)}}}function Ze(t){let e,r,i=Nt(t[1]),o=[];for(let e=0;e<i.length;e+=1)o[e]=Ye(Ge(t,i,e));return{c(){e=M("span");for(let t=0;t<o.length;t+=1)o[t].c();L(e,"class",r=We["outer-background"]+(t[0]?" "+We["outer-background_clip"]:"")),K(e,"border-radius",t[0])},m(t,n){N(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=Nt(t[1]),n=0;n<i.length;n+=1){const r=Ge(t,i,n);o[n]?o[n].p(r,a):(o[n]=Ye(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=We["outer-background"]+(t[0]?" "+We["outer-background_clip"]:""))&&L(e,"class",r),1&a&&K(e,"border-radius",t[0])},i:n,o:n,d(t){t&&O(e),I(o,t)}}}function Qe(t,e,n){let r,{background:i=[]}=e,{radius:o=""}=e;const a=lt(Zt);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=ue([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=qe(t.filters,a.logError)))}return n})))},[o,r,function(t){t.target&&"classList"in t.target&&t.target.classList.add(We["outer-background__item_hidden"])},i]}const tn=class extends qt{constructor(t){super(),Wt(this,t,Qe,Ze,d,{background:3,radius:0})}},en=t=>({hasCustomFocus:64&t[0]}),nn=t=>({focusHandler:t[36],blurHandler:t[37],hasCustomFocus:t[6]});function rn(t){let e,n;return e=new Ue({props:{use:t[35],cls:t[0]+" "+we("outer",ee,t[17]),style:ne(t[15]),actions:t[11],doubleTapActions:t[12],longTapActions:t[13],attrs:t[7],isNativeActionAnimation:!t[5].length||cn(t[5]),$$slots:{default:[sn]},$$scope:{ctx:t}}}),e.$on("focus",t[36]),e.$on("blur",t[37]),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};131073&n[0]&&(r.cls=t[0]+" "+we("outer",ee,t[17])),32768&n[0]&&(r.style=ne(t[15])),2048&n[0]&&(r.actions=t[11]),4096&n[0]&&(r.doubleTapActions=t[12]),8192&n[0]&&(r.longTapActions=t[13]),128&n[0]&&(r.attrs=t[7]),32&n[0]&&(r.isNativeActionAnimation=!t[5].length||cn(t[5])),350&n[0]|4194304&n[3]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function on(t){let e,n;return e=new tn({props:{background:t[3],radius:t[2]}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};8&n[0]&&(r.background=t[3]),4&n[0]&&(r.radius=t[2]),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function an(t){let e,n,r;return{c(){e=M("span"),L(e,"class",n=ee.outer__border),L(e,"style",r=ne(t[1]))},m(t,n){N(t,e,n)},p(t,n){2&n[0]&&r!==(r=ne(t[1]))&&L(e,"style",r)},d(t){t&&O(e)}}}function sn(t){let e,n,r,i=t[4]&&on(t);const o=t[114].default,a=g(o,t,t[115],nn);let s=t[8]&&an(t);return{c(){i&&i.c(),e=R(),a&&a.c(),s&&s.c(),n=R()},m(t,o){i&&i.m(t,o),N(t,e,o),a&&a.m(t,o),s&&s.m(t,o),N(t,n,o),r=!0},p(t,l){t[4]?i?(i.p(t,l),16&l[0]&&Pt(i,1)):(i=on(t),i.c(),Pt(i,1),i.m(e.parentNode,e)):i&&(Vt(),Dt(i,1,1,(()=>{i=null})),jt()),a&&a.p&&(!r||64&l[0]|4194304&l[3])&&v(a,o,t,t[115],r?m(o,t[115],l,en):y(t[115]),nn),t[8]?s?s.p(t,l):(s=an(t),s.c(),s.m(n.parentNode,n)):s&&(s.d(1),s=null)},i(t){r||(Pt(i),Pt(a,t),r=!0)},o(t){Dt(i),Dt(a,t),r=!1},d(t){t&&(O(e),O(n)),i&&i.d(t),a&&a.d(t),s&&s.d(t)}}}function ln(t){let e,n,r=!t[9]&&!t[10]&&rn(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[9]||t[10]?r&&(Vt(),Dt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),1536&n[0]&&Pt(r,1)):(r=rn(t),r.c(),Pt(r,1),r.m(e.parentNode,e))},i(t){n||(Pt(r),n=!0)},o(t){Dt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function cn(t){return t.some((t=>"native"===t.name))}function un(t,e,r){let i,o,a,s,l,c,u,d,f,g,h,m,v,y,$,b,_,w,x,k,E,C,A,V,j,P,D,F,S,N,O,I,M,T,z,J,R,B,L,U,W,H,q,G,K,X=n,Y=n,Z=n,Q=n,tt=n,et=n,nt=n,rt=n,it=n,ot=n,st=n,ct=n,ut=n,dt=n,pt=n,ft=n,gt=n,ht=n,mt=n;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((()=>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((()=>st())),t.$$.on_destroy.push((()=>ct())),t.$$.on_destroy.push((()=>ut())),t.$$.on_destroy.push((()=>dt())),t.$$.on_destroy.push((()=>pt())),t.$$.on_destroy.push((()=>ft())),t.$$.on_destroy.push((()=>gt())),t.$$.on_destroy.push((()=>ht())),t.$$.on_destroy.push((()=>mt()));let{$$slots:yt={},$$scope:$t}=e,{json:bt={}}=e,{origJson:_t}=e,{templateContext:wt}=e,{cls:xt=""}=e,{style:kt}=e,{layoutParams:Et={}}=e,{customDescription:Ct=!1}=e,{customPaddings:At=!1}=e,{customActions:Vt=""}=e,{additionalPaddings:jt=null}=e,{heightByAspect:Pt=!1}=e,{parentOf:Dt}=e,{replaceItems:Ft}=e;const St={left:"start",center:"center",right:"end"},Nt={top:"start",center:"center",bottom:"end",baseline:"baseline"},Ot=lt(Zt),It=lt(xe);let Mt,Tt,zt=null,Jt=[];function Rt(t,e){if(!Array.isArray(Dt)||!Ft)return;const n=Dt.findIndex((e=>(null==e?void 0:e.id)===t)),i=Dt.slice();i.splice(n,1,...e||[]),r(38,Dt=i),Ft(i)}let Bt,Lt,Ut,Wt,Ht,qt,Gt,Kt,Xt,Yt,te={},ee={},ne=!1,oe=1,se="transparent",le=0,de={"top-left":0,"top-right":0,"bottom-right":0,"bottom-left":0},pe="",fe=null,ge="",ve={},$e=0,_e=0,we=0,Ee=!1,je=!1,Pe={},Me=0,Te=0,ze=0,Je=!1,Re=!1,Be=1;const Le=Et.fakeElement?[]:bt.transition_triggers||["state_change","visibility_change"],Ue=-1!==Le.indexOf("state_change")&&bt.id,We=-1!==Le.indexOf("visibility_change")&&bt.id;let He,qe,Ge,Ke,Xe,Ye,Ze,Qe=[],tn=[],en=[],nn=[],rn=[],on=[],an="";function sn(t){const e=Se(t.start_value,1),n=Se(t.end_value,1),i=Ve(t.start_delay,0),o=Ve(t.duration,300),a=Fe(t.interpolator,"ease_in_out").replace(/_/g,"-");switch(t.name){case"fade":return r(81,Ke=e),r(82,Xe=n),"opacity ".concat(o,"ms ").concat(a," ").concat(i,"ms");case"scale":return r(83,Ye=e),r(84,Ze=n),"transform ".concat(o,"ms ").concat(a," ").concat(i,"ms");case"native":case"no_animation":return"";default:return Ot.logError(Qt(new Error("Unknown action_animation name"),{additional:{animation:t.name}})),""}}let ln,cn,un,dn=!1,pn="visible",fn=0,gn=0;return at((()=>{var t;Jt.forEach((t=>{Ot.unregisterParentOf(t)})),r(50,Jt=[]),null===(t=bt.tooltips)||void 0===t||t.forEach((t=>{Ot.unregisterTooltip(t)}))})),t.$$set=t=>{"json"in t&&r(39,bt=t.json),"origJson"in t&&r(40,_t=t.origJson),"templateContext"in t&&r(41,wt=t.templateContext),"cls"in t&&r(0,xt=t.cls),"style"in t&&r(42,kt=t.style),"layoutParams"in t&&r(43,Et=t.layoutParams),"customDescription"in t&&r(44,Ct=t.customDescription),"customPaddings"in t&&r(45,At=t.customPaddings),"customActions"in t&&r(46,Vt=t.customActions),"additionalPaddings"in t&&r(47,jt=t.additionalPaddings),"heightByAspect"in t&&r(48,Pt=t.heightByAspect),"parentOf"in t&&r(38,Dt=t.parentOf),"replaceItems"in t&&r(49,Ft=t.replaceItems),"$$scope"in t&&r(115,$t=t.$$scope)},t.$$.update=()=>{if(524416&t.$$.dirty[1]&&(Jt.forEach((t=>{Ot.unregisterParentOf(t)})),r(50,Jt=[]),Dt&&Dt.forEach((t=>{t.id&&(Jt.push(t.id),Ot.registerParentOf(t.id,{replaceWith:Rt}))}))),256&t.$$.dirty[1]&&(r(34,i=Ot.getDerivedFromVars(bt.focus)),tt(),tt=p(i,(t=>r(99,O=t)))),256&t.$$.dirty[1]&&(r(33,o=Ot.getDerivedFromVars(bt.border)),mt(),mt=p(o,(t=>r(113,K=t)))),66&t.$$.dirty[0]|32505856&t.$$.dirty[1]|1048640&t.$$.dirty[3]){const t=un&&(null==O?void 0:O.border)?O.border:K;let e={},n={},i=!1,o="";if(t){if(t.has_shadow){const n=t.shadow;e["box-shadow"]=n?function(t){var e,n,r,i,o,a;return re((null===(e=t.offset)||void 0===e||null===(n=e.x)||void 0===n?void 0:n.value)||0)+" "+re((null===(r=t.offset)||void 0===r||null===(i=r.y)||void 0===i?void 0:i.value)||0)+" "+re(null!==(o=t.blur)&&void 0!==o?o:2)+" "+ae(t.color||"#000000",null!==(a=t.alpha)&&void 0!==a?a:.19)}(n):"0 1px 2px 0 rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.07)"}if(t.stroke&&(i=!0,r(52,oe=Ve(t.stroke.width,oe)),r(53,se=ae(t.stroke.color,1,se)),n.border="".concat(re(oe)," solid ").concat(se)),t.corners_radius?(r(55,de=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}(t.corners_radius,de)),n["border-radius"]=e["border-radius"]=Ie(de)):t.corner_radius&&(r(54,le=Ve(t.corner_radius,le)),r(55,de={"top-left":le,"top-right":le,"bottom-right":le,"bottom-left":le}),n["border-radius"]=e["border-radius"]=re(le)),i&&oe&&(t.corners_radius||t.corner_radius)){let t=Object.assign({},de);["top-left","top-right","bottom-right","bottom-left"].forEach((e=>{t[e]=(t[e]||0)+oe/2})),o=Ie(t)}}r(51,te=De(e,te)),r(1,ee=De(n,ee)),r(8,ne=i),r(2,pe=o)}if(256&t.$$.dirty[1]&&(r(32,a=Ot.getDerivedFromVars(bt.paddings)),ht(),ht=p(a,(t=>r(112,G=t)))),33570816&t.$$.dirty[1]|524288&t.$$.dirty[3]&&r(56,fe=Oe(G&&!At?G:void 0,fe)),33619968&t.$$.dirty[1]&&r(92,s=ke(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}(fe,jt))),256&t.$$.dirty[1]&&(r(31,l=Ot.getDerivedFromVars(bt.margins)),ft(),ft=p(l,(t=>r(110,H=t)))),67108864&t.$$.dirty[1]|131072&t.$$.dirty[3]&&r(57,ge=Ae(H,ge)),256&t.$$.dirty[1]&&(r(30,c=Ot.getDerivedFromVars(bt.width)),dt(),dt=p(c,(t=>r(108,U=t)))),256&t.$$.dirty[1]&&(r(29,u=Ot.getDerivedFromVars(bt.alignment_horizontal)),gt(),gt=p(u,(t=>r(111,q=t)))),134221824&t.$$.dirty[1]|1&t.$$.dirty[2]|425984&t.$$.dirty[3]){let t,e,n,i,o={},a=0,s=0,l=!1,c=!1;const u=null==U?void 0:U.type;if("fixed"===u)r(62,$e=Ve(null==U?void 0:U.value,$e)),e=re($e);else if("wrap_content"!==u&&(Et.overlapParent||"match_parent"!==u&&u||!Et.parentHorizontalWrapContent))t="parent","vertical"===Et.parentContainerOrientation&&Et.parentContainerWrap&&(c=!0,Ot.logError(Qt(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"vertical"===Et.parentLayoutOrientation?e="calc(100% - ".concat(ie(((null==H?void 0:H.left)||0)+((null==H?void 0:H.right)||0)),")"):"horizontal"===Et.parentContainerOrientation&&(a=U&&"weight"in U&&U.weight||1,Et.parentContainerWrap&&(l=!0));else{if(t="content",("wrap_content"===u&&(null==U?void 0:U.constrained)||("match_parent"===u||!u)&&Et.parentHorizontalWrapContent)&&(o["width-constrained"]=!0,"horizontal"===Et.parentContainerOrientation&&(s=1)),"wrap_content"===u){const t=U;t.min_size&&Ce(t.min_size.value)&&(n=re(t.min_size.value)),t.max_size&&Ce(t.max_size.value)&&(i=re(t.max_size.value))}"match_parent"!==u&&u||Ot.logError(Qt(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))}if("parent"===t)o["halign-self"]="stretch";else{const t=q;o["halign-self"]="left"===t||"center"===t||"right"===t?St[t]:Et.parentHAlign||"start"}t&&(o.width=t),r(59,Bt=e),r(60,Lt=n),r(61,Ut=i),r(63,_e=a),r(64,we=s),r(58,ve=De(o,ve)),r(65,Ee=l),r(9,je=c)}if(256&t.$$.dirty[1]&&(r(28,d=Ot.getDerivedFromVars(bt.height)),ut(),ut=p(d,(t=>r(107,L=t)))),256&t.$$.dirty[1]&&(r(27,f=Ot.getDerivedFromVars(bt.alignment_vertical)),pt(),pt=p(f,(t=>r(109,W=t)))),135168&t.$$.dirty[1]|272&t.$$.dirty[2]|212992&t.$$.dirty[3]){let t,e,n,i,o={},a=0,s=0,l=!1,c=!1;const u=null==L?void 0:L.type;if(Pt);else if("fixed"===u)r(70,Me=Ve(null==L?void 0:L.value,Me)),e=re(Me);else if("match_parent"!==u||!Et.overlapParent&&Et.parentVerticalWrapContent){if(t="content",("wrap_content"===u&&(null==L?void 0:L.constrained)||"match_parent"===u&&Et.parentVerticalWrapContent)&&(o["height-constrained"]=!0,"vertical"===Et.parentContainerOrientation&&(s=1)),"wrap_content"===u){const t=L;(null==t?void 0:t.min_size)&&Ce(t.min_size.value)&&(n=re(t.min_size.value)),(null==t?void 0:t.max_size)&&Ce(t.max_size.value)&&(i=re(t.max_size.value))}"match_parent"===u&&Ot.logError(Qt(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))}else t="parent","horizontal"===Et.parentContainerOrientation&&Et.parentContainerWrap&&(c=!0,Ot.logError(Qt(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"horizontal"===Et.parentLayoutOrientation?e="calc(100% - ".concat(ie(((null==H?void 0:H.top)||0)+((null==H?void 0:H.bottom)||0)),")"):"vertical"===Et.parentContainerOrientation&&(a=(null==L?void 0:L.weight)||1,Et.parentContainerWrap&&(l=!0));if("parent"===t)o["valign-self"]="stretch";else{const t=W;"top"===t||"center"===t||"bottom"===t||"baseline"===t&&"horizontal"===Et.parentContainerOrientation?o["valign-self"]=Nt[t]:o["valign-self"]=Et.parentVAlign||"start"}t&&(o.height=t),r(67,Wt=e),r(68,Ht=n),r(69,qt=i),r(71,Te=a),r(72,ze=s),r(66,Pe=De(o,Pe)),r(73,Je=l),r(10,Re=c)}var e,n;if(4096&t.$$.dirty[1]&&r(95,g=!!Et.overlapParent||void 0),4096&t.$$.dirty[1]|49152&t.$$.dirty[3]&&r(94,h=Et.overlapParent&&(!U||"match_parent"===U.type)&&"match_parent"===(null==L?void 0:L.type)),4096&t.$$.dirty[1]&&r(93,m=Et.gridArea?"".concat(Et.gridArea.y+1,"/").concat(Et.gridArea.x+1,"/span ").concat(Et.gridArea.rowSpan,"/span ").concat(Et.gridArea.colSpan):void 0),256&t.$$.dirty[1]&&(r(26,v=Ot.getDerivedFromVars(bt.alpha)),ct(),ct=p(v,(t=>r(106,B=t)))),4096&t.$$.dirty[2]|8192&t.$$.dirty[3]&&(r(74,(n=Be,Be=!Ce(e=B)||void 0===e||e>1?n:Number(e))),r(75,Gt=1===Be?void 0:Be)),256&t.$$.dirty[1]&&(r(25,y=Ot.getDerivedFromVars(bt.accessibility)),st(),st=p(y,(t=>r(105,R=t)))),8192&t.$$.dirty[1]|4096&t.$$.dirty[3]&&(r(7,Tt=void 0),R&&!Ct&&R.description&&(r(7,Tt={}),r(7,Tt["aria-label"]=R.description,Tt))),256&t.$$.dirty[1]&&(r(24,$=Ot.getDerivedFromVars(bt.background)),ot(),ot=p($,(t=>r(104,J=t)))),92&t.$$.dirty[0]|2112&t.$$.dirty[3]&&(r(3,Kt=un&&(null==O?void 0:O.background)?O.background:J),r(76,Xt={}),r(4,Yt=!1),Array.isArray(Kt)&&(r(4,Yt=Kt.some((t=>"image"===t.type||"nine_patch_image"===t.type))||Boolean(pe)),!Yt))){const t=ue(Kt);r(76,Xt["background-color"]=t.color,Xt),r(76,Xt["background-image"]=t.image,Xt),r(76,Xt["background-size"]=t.size,Xt),r(76,Xt["background-position"]=t.position,Xt),r(76,Xt["background-repeat"]="no-repeat",Xt)}if(256&t.$$.dirty[1]&&(r(77,He=void 0),Ue&&bt.transition_in&&Ot.isRunning("stateChange")&&r(77,He=!0)),256&t.$$.dirty[1]&&(r(79,Ge=void 0),Ue&&bt.transition_change&&Ot.isRunning("stateChange")&&It.hasTransitionChange(bt.id)&&r(79,Ge=!0)),256&t.$$.dirty[1]&&(r(23,b=Ot.getDerivedFromVars(bt.action)),rt(),rt=p(b,(t=>r(102,T=t)))),256&t.$$.dirty[1]&&(r(22,_=Ot.getDerivedFromVars(bt.actions)),it(),it=p(_,(t=>r(103,z=t)))),256&t.$$.dirty[1]&&(r(21,w=Ot.getDerivedFromVars(bt.doubletap_actions)),nt(),nt=p(w,(t=>r(101,M=t)))),256&t.$$.dirty[1]&&(r(20,x=Ot.getDerivedFromVars(bt.longtap_actions)),et(),et=p(x,(t=>r(100,I=t)))),36864&t.$$.dirty[1]|1984&t.$$.dirty[3]){let t=z||T&&[T]||[],e=M||[],n=I||[],i=(null==O?void 0:O.on_focus)||[],o=(null==O?void 0:O.on_blur)||[];Et.fakeElement?(t=[],e=[],n=[],i=[],o=[]):(Array.isArray(t)||(t=[],Ot.logError(Qt(new Error("Actions should be array")))),Array.isArray(e)||(e=[],Ot.logError(Qt(new Error("DoubleTapActions should be array")))),Array.isArray(n)||(n=[],Ot.logError(Qt(new Error("LongTapActions should be array")))),Array.isArray(i)||(i=[],Ot.logError(Qt(new Error("FocusActions should be array")))),Array.isArray(o)||(o=[],Ot.logError(Qt(new Error("BlurActions should be array"))))),(t.length||e.length||n.length)&&Vt&&(t=[],e=[],n=[],Ot.logError(Qt(new Error('Cannot use action on component "'.concat(Vt,'"'))))),r(11,Qe=t),r(12,tn=e),r(13,en=n),nn=i,rn=o}if(256&t.$$.dirty[1]&&(r(19,k=Ot.getDerivedFromVars(bt.action_animation)),Q(),Q=p(k,(t=>r(98,N=t)))),32&t.$$.dirty[0]|32&t.$$.dirty[3]&&N&&(r(5,on=Ne(N)),r(80,an=on.map(sn).filter(Boolean).join(", "))),256&t.$$.dirty[1]&&(r(18,E=Ot.getDerivedFromVars(bt.visibility)),Z(),Z=p(E,(t=>r(97,S=t)))),25165824&t.$$.dirty[2]|16&t.$$.dirty[3]){const t=pn,e=function(t,e){return"visible"===t||"invisible"===t||"gone"===t?t:e}(S,pn);t!==e&&(!dn||"visible"!==pn&&"visible"!==e?r(86,pn=e):async function(t){r(86,pn=t);const e="visible"===t?"in":"out",n="in"===e?bt.transition_in:bt.transition_out;We&&n&&(await vt(),"in"===e&&r(78,qe=!0),It.runVisibilityTransition(Object.assign(Object.assign({},bt),{visibility:"visible"}),wt,n,Mt,e).then((()=>{"in"===e&&r(78,qe=!1)})).catch((t=>{throw"in"===e&&r(78,qe=!1),t})))}(e)),dn||r(85,dn=!0)}if(64&t.$$.dirty[0]|134222080&t.$$.dirty[1]|17268752&t.$$.dirty[2]|6&t.$$.dirty[3]&&r(17,C=Object.assign(Object.assign(Object.assign({},ve),Pe),{"parent-overlap":g,"parent-overlap-absolute":h,"scroll-snap":Et.scrollSnap,"hide-on-transition-in":He||qe||Ge,visibility:pn,"has-action-animation":Boolean(an),"parent-flex":Et.parentContainerOrientation||void 0,"parent-grid":Boolean(Et.gridArea)||void 0,"has-custom-focus":Boolean(un&&bt.focus)})),256&t.$$.dirty[1]&&(r(16,A=Ot.getDerivedFromVars(bt.transform)),Y(),Y=p(A,(t=>r(96,F=t)))),100663296&t.$$.dirty[2]|8&t.$$.dirty[3]&&F&&void 0!==F.rotation){const t=F.pivot_x||{type:"pivot-percentage",value:50};r(87,fn=Se(t.value,fn));const e="pivot-fixed"===t.type?re(fn):"".concat(fn,"%"),n=F.pivot_y||{type:"pivot-percentage",value:50};r(88,gn=Se(n.value,gn));const i="pivot-fixed"===n.type?re(gn):"".concat(gn,"%");r(89,ln="".concat(e," ").concat(i)),r(90,cn="rotate(".concat(F.rotation,"deg)"))}2570&t.$$.dirty[2]&&r(91,V=Ee||Je?"100%":_e||Te?0:void 0),1947207680&t.$$.dirty[1]|2021418726&t.$$.dirty[2]|1&t.$$.dirty[3]&&r(15,j=Object.assign(Object.assign(Object.assign(Object.assign({},kt),Xt),te),{width:Bt,"min-width":Lt,"max-width":Ut,height:Wt,"min-height":Ht,"max-height":qt||(null==kt?void 0:kt["max-height"]),"grid-area":m,padding:s,margin:ge,opacity:Gt,transition:an,"transform-origin":ln,transform:cn,"flex-grow":_e||Te||void 0,"flex-shrink":we||ze?1:void 0,"flex-basis":V,"--divkit-animation-opacity-start":Ke,"--divkit-animation-opacity-end":Xe,"--divkit-animation-scale-start":Ye,"--divkit-animation-scale-end":Ze}))},r(14,P=Ot.isPointerFocus),X(),X=p(P,(t=>r(120,D=t))),[xt,ee,pe,Kt,Yt,on,un,Tt,ne,je,Re,Qe,tn,en,P,j,A,C,E,k,x,w,_,b,$,y,v,f,d,u,c,l,a,o,i,function(t){var e;Mt=t,Ue&&bt.transition_in&&It.registerChildWithTransitionIn(bt,wt,bt.transition_in,t).then((()=>{r(77,He=!1)})).catch((t=>{throw r(77,He=!1),t})),Ue&&bt.transition_out&&It.registerChildWithTransitionOut(bt,wt,bt.transition_out,t),Ue&&bt.transition_change&&It.registerChildWithTransitionChange(bt,wt,bt.transition_change,t).then((()=>{r(79,Ge=!1)})).catch((t=>{throw r(79,Ge=!1),t}));const n=Et.fakeElement?[]:bt.visibility_actions||bt.visibility_action&&[bt.visibility_action],i=Et.fakeElement?[]:bt.disappear_actions;(Array.isArray(n)&&n.length||Array.isArray(i)&&i.length)&&function(t,e){let{visibilityActions:n,disappearActions:r,rootCtx:i}=e;const o=[];n&&n.forEach((t=>{o.push({type:"visibility",index:o.length,action:t,visible:!1,count:0,finished:!1})})),r&&r.forEach((t=>{o.push({type:"disappear",index:o.length,action:t,visible:!1,count:0,finished:!1})}));const a=o.map((t=>{const e="visibility"===t.type,n=i.getJsonWithVars({visibility_percentage:t.action.visibility_percentage,visibility_duration:e?t.action.visibility_duration:t.action.disappear_duration,log_limit:t.action.log_limit});return ye(ye({},n),{},{visibility_percentage:be(e,n.visibility_percentage,e?50:0)})})),s=[...new Set(a.map((t=>t.visibility_percentage/100)))];new IntersectionObserver((t=>{t.forEach((t=>{o.forEach((e=>{const n=a[e.index],r="visibility"===e.type;let o;o=0===n.visibility_percentage?t.intersectionRatio>=1e-12:t.intersectionRatio>=n.visibility_percentage/100;const s=r?!e.visible&&o:e.visible&&!o,l=r?!o:o;s?e.finished||(e.timer=setTimeout((()=>{++e.count;const t=0===n.log_limit?1/0:n.log_limit||1;++e.count>=t&&(e.finished=!0);const o=i.getJsonWithVars(e.action),a=o.url,s=o.typed;if(a){const t=he(a);t&&!me(t,i.getBuiltinProtocols())&&("div-action"===t?i.execAction(o):o.log_id&&i.execCustomAction(o))}else s&&i.execAction(o);i.logStat(r?"visible":"disappear",o)}),a[e.index].visibility_duration||800)):l&&e.timer&&clearTimeout(e.timer),e.visible=o}))}))}),{threshold:s}).observe(t)}(t,{visibilityActions:n,disappearActions:i,rootCtx:Ot});const o=bt.id;o&&It.registerChild(o),null===(e=bt.tooltips)||void 0===e||e.forEach((e=>{Ot.registerTooltip(t,e)}));let a=null;if(Array.isArray(bt.extensions)){const e=Ot.getExtensionContext();zt=bt.extensions.map((n=>{var r;const i=Ot.getExtension(n.id,n.params);return i&&(null===(r=i.mountView)||void 0===r||r.call(i,t,e)),i})).filter(ce)}return{destroy(){if(o&&It.unregisterChild(o),zt){const e=Ot.getExtensionContext();zt.forEach((n=>{var r;null===(r=n.unmountView)||void 0===r||r.call(n,t,e)})),zt=null}a&&a.destroy()}}},function(){bt.focus&&(D||r(6,un=!0),Ot.execAnyActions(nn))},function(){bt.focus&&(r(6,un=!1),Ot.execAnyActions(rn))},Dt,bt,_t,wt,kt,Et,Ct,At,Vt,jt,Pt,Ft,Jt,te,oe,se,le,de,fe,ge,ve,Bt,Lt,Ut,$e,_e,we,Ee,Pe,Wt,Ht,qt,Me,Te,ze,Je,Be,Gt,Xt,He,qe,Ge,an,Ke,Xe,Ye,Ze,dn,pn,fn,gn,ln,cn,V,s,m,h,g,F,S,N,O,I,M,T,z,J,R,B,L,U,W,H,q,G,K,yt,$t]}const dn=class extends qt{constructor(t){super(),Wt(this,t,un,ln,d,{json:39,origJson:40,templateContext:41,cls:0,style:42,layoutParams:43,customDescription:44,customPaddings:45,customActions:46,additionalPaddings:47,heightByAspect:48,parentOf:38,replaceItems:49},null,[-1,-1,-1,-1,-1])}},pn={"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 fn(t,e){const n=Number(t);return isNaN(n)||n<=0?e:n}function gn(t){if("light"===t||"medium"===t||"bold"===t||"regular"===t)return"medium"===t?500:"bold"===t?700:"light"===t?300:400}function hn(t,e){return gn(t)||e}function mn(t){let e,n;return{c(){e=M("span"),L(e,"class",n=pn["text-range__top-offset"]),K(e,"margin-top",t[4])},m(t,n){N(t,e,n)},p(t,n){16&n&&K(e,"margin-top",t[4])},d(t){t&&O(e)}}}function vn(t){let e;return{c(){e=z(t[0])},m(t,n){N(t,e,n)},p(t,n){1&n&&G(e,t[0])},d(t){t&&O(e)}}}function yn(t){let e,n,r,i=t[4]&&mn(t);return n=new Ue({props:{cls:we("text-range",pn,t[3]),actions:t[1],style:ne(t[2]),$$slots:{default:[vn]},$$scope:{ctx:t}}}),{c(){i&&i.c(),e=R(),Bt(n.$$.fragment)},m(t,o){i&&i.m(t,o),N(t,e,o),Lt(n,t,o),r=!0},p(t,r){let[o]=r;t[4]?i?i.p(t,o):(i=mn(t),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null);const a={};8&o&&(a.cls=we("text-range",pn,t[3])),2&o&&(a.actions=t[1]),4&o&&(a.style=ne(t[2])),4194305&o&&(a.$$scope={dirty:o,ctx:t}),n.$set(a)},i(t){r||(Pt(n.$$.fragment,t),r=!0)},o(t){Dt(n.$$.fragment,t),r=!1},d(t){t&&O(e),i&&i.d(t),Ut(n,t)}}}function $n(t,e,n){let r,i,o,a,s,l;var c,u;let{text:d}=e,{rootFontSize:p}=e,{textStyles:f={}}=e,{singleline:g=!1}=e,{actions:h}=e;const m=lt(Zt);let v,y="none",$=12,b=1.25,_="",w="",x="",k=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,g=t.singleline),"actions"in t&&n(1,h=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,y=t)}2112&t.$$.dirty&&n(11,$=fn(f.font_size,$)),2112&t.$$.dirty&&He(f.line_height)&&n(12,b=Number(f.line_height)/$),64&t.$$.dirty&&Ce(f.letter_spacing)&&n(13,_=re(f.letter_spacing)),16448&t.$$.dirty&&(n(14,v=hn(f.font_weight,v)),"string"==typeof f.font_family&&f.font_family?n(15,w=m.typefaceProvider(f.font_family,{fontWeight:v||400})):n(15,w="")),65600&t.$$.dirty&&n(16,x=ae(f.text_color,1,x)),64&t.$$.dirty&&n(4,r=f.top_offset?re(f.top_offset):""),64&t.$$.dirty&&n(19,i=f.background?ue([f.background]):null),320&t.$$.dirty&&((null===n(8,c=f.border)||void 0===c?void 0:c.stroke)&&f.border.stroke.color&&"transparent"!==ae(f.border.stroke.color)&&He(f.border.stroke.width)?n(17,k={color:f.border.stroke.color,width:f.border.stroke.width}):n(17,k=null)),576&t.$$.dirty&&n(18,o=fn(null===n(9,u=f.border)||void 0===u?void 0:u.corner_radius,0)),2112&t.$$.dirty&&n(20,a=f.text_shadow?function(t,e){var n,r,i,o,a,s;return"drop-shadow("+ae(t.color||"#000000",null!==(n=t.alpha)&&void 0!==n?n:.19)+" "+re(10*((null===(r=t.offset)||void 0===r||null===(i=r.x)||void 0===i?void 0:i.value)||0)/e)+" "+re(10*((null===(o=t.offset)||void 0===o||null===(a=o.y)||void 0===a?void 0:a.value)||0)/e)+" "+re(10*(null!==(s=t.blur)&&void 0!==s?s:2)/e)+")"}(f.text_shadow,$):void 0),1152&t.$$.dirty&&n(3,s={singleline:g,decoration:y}),2095136&t.$$.dirty&&n(2,l={"font-size":re(10*$/p),"line-height":b,"letter-spacing":_,"font-weight":v,"font-family":w,filter:a,color:x,background:(null==i?void 0:i.color)||void 0,"box-shadow":k?"inset 0 0 0 ".concat(re(k.width)," ").concat(k.color):void 0,"border-radius":o?re(o):void 0})},[d,h,l,s,r,p,f,g,c,u,y,$,b,_,v,w,x,k,o,i,a]}const bn=class extends qt{constructor(t){super(),Wt(this,t,$n,yn,d,{text:0,rootFontSize:5,textStyles:6,singleline:7,actions:1})}};function _n(t,e){return"left"===t||"center"===t||"right"===t?t:e}function wn(t,e){return"top"===t||"center"===t||"bottom"===t||"baseline"===t?t:e}function xn(t,e){return 1===t||0===t||!1===t||!0===t?Boolean(t):e}function kn(t,e){return"source_in"===t||"source_atop"===t||"darken"===t||"lighten"===t||"multiply"===t||"screen"===t?t:e}const{Boolean:En}=A;function Cn(t,e,n){const r=t.slice();return r[58]=e[n],r[60]=n,r}function An(t){let e,n;return e=new dn({props:{cls:we("text",te,t[13])+" "+(t[6]?"":Yt.root__unselectable),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Nn]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};8256&n[0]&&(r.cls=we("text",te,t[13])+" "+(t[6]?"":Yt.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]),268443312&n[0]|1073741824&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function Vn(t){let e,n;return e=new bn({props:{text:t[4],rootFontSize:t[5],textStyles:t[28],singleline:t[7]}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};16&n[0]&&(r.text=t[4]),32&n[0]&&(r.rootFontSize=t[5]),268435456&n[0]&&(r.textStyles=t[28]),128&n[0]&&(r.singleline=t[7]),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function jn(t){let e,n,r=Nt(t[10]),i=[];for(let e=0;e<r.length;e+=1)i[e]=Sn(Cn(t,r,e));const o=t=>Dt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=R()},m(t,r){for(let e=0;e<i.length;e+=1)i[e]&&i[e].m(t,r);N(t,e,r),n=!0},p(t,n){if(536872608&n[0]){let a;for(r=Nt(t[10]),a=0;a<r.length;a+=1){const o=Cn(t,r,a);i[a]?(i[a].p(o,n),Pt(i[a],1)):(i[a]=Sn(o),i[a].c(),Pt(i[a],1),i[a].m(e.parentNode,e))}for(Vt(),a=r.length;a<i.length;a+=1)o(a);jt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)Pt(i[t]);n=!0}},o(t){i=i.filter(En);for(let t=0;t<i.length;t+=1)Dt(i[t]);n=!1},d(t){t&&O(e),I(i,t)}}}function Pn(t){let e,r,i,o,a,s,l,c;return{c(){e=M("span"),r=M("img"),L(r,"class",i=te.text__image),u(r.src,o=t[58].image.url)||L(r,"src",o),L(r,"loading","lazy"),L(r,"decoding","async"),L(r,"aria-hidden","true"),L(r,"alt",""),L(r,"style",a=ne({width:t[58].image.width,height:t[58].image.height,"margin-top":t[9]?"-".concat(t[58].image.height):void 0,"margin-bottom":t[9]?"-".concat(t[58].image.height):void 0,filter:t[58].image.svgFilterId?"url(#".concat(t[58].image.svgFilterId,")"):void 0})),L(e,"style",s=ne(t[58].image.wrapperStyle))},m(n,i){N(n,e,i),D(e,r),l||(c=B(r,"error",t[29]),l=!0)},p(t,n){1024&n[0]&&!u(r.src,o=t[58].image.url)&&L(r,"src",o),1536&n[0]&&a!==(a=ne({width:t[58].image.width,height:t[58].image.height,"margin-top":t[9]?"-".concat(t[58].image.height):void 0,"margin-bottom":t[9]?"-".concat(t[58].image.height):void 0,filter:t[58].image.svgFilterId?"url(#".concat(t[58].image.svgFilterId,")"):void 0}))&&L(r,"style",a),1024&n[0]&&s!==(s=ne(t[58].image.wrapperStyle))&&L(e,"style",s)},i:n,o:n,d(t){t&&O(e),l=!1,c()}}}function Dn(t){let e,n,r=t[58].text&&Fn(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[58].text?r?(r.p(t,n),1024&n[0]&&Pt(r,1)):(r=Fn(t),r.c(),Pt(r,1),r.m(e.parentNode,e)):r&&(Vt(),Dt(r,1,1,(()=>{r=null})),jt())},i(t){n||(Pt(r),n=!0)},o(t){Dt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function Fn(t){let e,n;return e=new bn({props:{text:t[58].text,rootFontSize:t[5],textStyles:t[58].textStyles,singleline:t[7],actions:t[58].actions}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.text=t[58].text),32&n[0]&&(r.rootFontSize=t[5]),1024&n[0]&&(r.textStyles=t[58].textStyles),128&n[0]&&(r.singleline=t[7]),1024&n[0]&&(r.actions=t[58].actions),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function Sn(t){let e,n,r,i;const o=[Dn,Pn],a=[];function s(t,e){return"text"in t[58]?0:t[58].image?1:-1}return~(e=s(t))&&(n=a[e]=o[e](t)),{c(){n&&n.c(),r=R()},m(t,n){~e&&a[e].m(t,n),N(t,r,n),i=!0},p(t,i){let l=e;e=s(t),e===l?~e&&a[e].p(t,i):(n&&(Vt(),Dt(a[l],1,1,(()=>{a[l]=null})),jt()),~e?(n=a[e],n?n.p(t,i):(n=a[e]=o[e](t),n.c()),Pt(n,1),n.m(r.parentNode,r)):n=null)},i(t){i||(Pt(n),i=!0)},o(t){Dt(n),i=!1},d(t){t&&O(r),~e&&a[e].d(t)}}}function Nn(t){let e,n,r,i,o,a;const s=[jn,Vn],l=[];function c(t,e){return t[10].length?0:1}return n=c(t),r=l[n]=s[n](t),{c(){e=M("span"),r.c(),L(e,"class",i=we("text__inner",te,t[12])),L(e,"style",o=ne(t[11]))},m(t,r){N(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):(Vt(),Dt(l[d],1,1,(()=>{l[d]=null})),jt(),r=l[n],r?r.p(t,u):(r=l[n]=s[n](t),r.c()),Pt(r,1),r.m(e,null)),(!a||4096&u[0]&&i!==(i=we("text__inner",te,t[12])))&&L(e,"class",i),(!a||2048&u[0]&&o!==(o=ne(t[11])))&&L(e,"style",o)},i(t){a||(Pt(r),a=!0)},o(t){Dt(r),a=!1},d(t){t&&O(e),l[n].d()}}}function On(t){let e,n,r=!t[8]&&An(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[8]?r&&(Vt(),Dt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),256&n[0]&&Pt(r,1)):(r=An(t),r.c(),Pt(r,1),r.m(e.parentNode,e))},i(t){n||(Pt(r),n=!0)},o(t){Dt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function In(t,e,r){let i,o,a,s,l,c,u,d,f,g,h,m,v,y,$,b,_,w,x,k,E,C,A,V,j,P,D,F,S,N,O,I,M,T,z,J=n,R=n,B=n,L=n,U=n,W=n,H=n,q=n,G=n,K=n,X=n,Y=n,Z=n,Q=n;t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>U())),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())),t.$$.on_destroy.push((()=>Q()));let{json:tt={}}=e,{templateContext:et}=e,{origJson:nt}=e,{layoutParams:rt}=e;const it=lt(Zt);let ot=!1,st="",ct=12,ut=1.25,dt=!1,pt="",ft="",gt=!1,ht="left",mt="top",vt="",yt="",$t="",bt=!1,_t=[],wt=[];return at((()=>{wt.forEach((t=>{let[e,n]=t;it.removeSvgFilter(e,n)}))})),t.$$set=t=>{"json"in t&&r(0,tt=t.json),"templateContext"in t&&r(1,et=t.templateContext),"origJson"in t&&r(2,nt=t.origJson),"layoutParams"in t&&r(3,rt=t.layoutParams)},t.$$.update=()=>{var e,n;if(1&t.$$.dirty[0]&&(r(27,i=it.getDerivedFromVars(tt.text)),Q(),Q=p(i,(t=>r(54,z=t)))),16&t.$$.dirty[0]|8388608&t.$$.dirty[1]&&(r(4,(e=z,n=st,st=String(null!=e?e:"")||n)),st?r(8,ot=!1):(r(8,ot=!0),it.logError(Qt(new Error('Missing "text" prop for div "text"'))))),1&t.$$.dirty[0]&&(r(26,o=it.getDerivedFromVars(tt.ranges)),R(),R=p(o,(t=>r(43,A=t)))),1&t.$$.dirty[0]&&(r(25,a=it.getDerivedFromVars(tt.images)),J(),J=p(a,(t=>r(42,C=t)))),1&t.$$.dirty[0]&&(r(24,s=it.getDerivedFromVars({font_size:tt.font_size,letter_spacing:tt.letter_spacing,font_weight:tt.font_weight,font_family:tt.font_family,text_color:tt.text_color,underline:tt.underline,strike:tt.strike,line_height:tt.line_height,text_shadow:tt.text_shadow})),B(),B=p(s,(t=>r(28,V=t)))),1&t.$$.dirty[0]&&(r(23,l=it.getDerivedFromVars(tt.font_size)),Z(),Z=p(l,(t=>r(53,T=t)))),32&t.$$.dirty[0]|4194304&t.$$.dirty[1]&&r(5,ct=fn(T,ct)),1&t.$$.dirty[0]&&(r(22,c=it.getDerivedFromVars(tt.line_height)),Y(),Y=p(c,(t=>r(52,M=t)))),32&t.$$.dirty[0]|2097152&t.$$.dirty[1]){const t=M;He(t)?(r(30,ut=Number(t)/ct),r(9,dt=!0)):r(9,dt=!1)}if(1&t.$$.dirty[0]&&(r(21,u=it.getDerivedFromVars(tt.max_lines)),G(),G=p(u,(t=>r(49,N=t)))),262144&t.$$.dirty[1]&&r(7,d=1===N),1073741824&t.$$.dirty[0]|262144&t.$$.dirty[1]){let t="",e="",n=!1;if(N&&N>1){let r=Number(N);t=r*ut+"em",e=r,n=!0}r(31,pt=t),r(32,ft=e),r(33,gt=n)}if(1&t.$$.dirty[0]&&(r(20,f=it.getDerivedFromVars(tt.text_alignment_horizontal)),X(),X=p(f,(t=>r(51,I=t)))),1048584&t.$$.dirty[1]&&r(34,ht=_n(I,ht)),1&t.$$.dirty[0]&&(r(19,g=it.getDerivedFromVars(tt.text_alignment_vertical)),K(),K=p(g,(t=>r(50,O=t)))),524304&t.$$.dirty[1]&&r(35,mt=wn(O,mt)),16&t.$$.dirty[0]|4096&t.$$.dirty[1]&&r(41,h=!A||st&&1===A.length&&A[0]&&0===A[0].start&&"number"==typeof A[0].end&&A[0].end>=st.length),1&t.$$.dirty[0]&&(r(18,m=it.getDerivedFromVars(tt.text_color)),q(),q=p(m,(t=>r(48,S=t)))),135168&t.$$.dirty[1]&&r(40,v=Boolean(S)!==Boolean(A&&A[0]&&A[0].text_color)),398880&t.$$.dirty[1]){let t="";N&&h&&v&&(t=ae(S||A&&A[0]&&A[0].text_color,1,vt)),r(36,vt=t)}if(1&t.$$.dirty[0]&&(r(17,y=it.getDerivedFromVars(tt.focused_text_color)),H(),H=p(y,(t=>r(47,F=t)))),65600&t.$$.dirty[1]&&r(37,yt=ae(F,1,yt)),1&t.$$.dirty[0]&&(r(16,$=it.getDerivedFromVars(tt.truncate)),W(),W=p($,(t=>r(46,D=t)))),32768&t.$$.dirty[1]&&r(39,b="none"===D?"none":""),1&t.$$.dirty[0]&&(r(15,_=it.getDerivedFromVars(tt.text_gradient)),U(),U=p(_,(t=>r(45,P=t)))),16384&t.$$.dirty[1]){let t="";if(P){const e=ue([P]);e.image&&(t=e.image)}r(38,$t=t)}1&t.$$.dirty[0]&&(r(14,w=it.getDerivedFromVars(tt.selectable)),L(),L=p(w,(t=>r(44,j=t)))),64&t.$$.dirty[0]|8192&t.$$.dirty[1]&&r(6,bt=xn(j,bt)),16&t.$$.dirty[0]|6144&t.$$.dirty[1]&&function(t,e,n){let i=[];if(wt.forEach((t=>{let[e,n]=t;it.removeSvgFilter(e,n)})),wt=[],!(Array.isArray(e)&&e.length||Array.isArray(n)&&n.length&&t))return void r(10,_t=[]);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({},V),...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({},V),...c),n=re(10*(t.image.width&&t.image.width.value||20)/(e.font_size||12)),r=re(10*(t.image.height&&t.image.height.value||20)/(e.font_size||12));const o={"font-size":re(10*(Number(e.font_size)||12)/ct)};let a="";const s=t.image.tint_color,l=kn(t.image.tint_mode,"source_in");if(s){const e=ae(t.image.tint_color);a=it.addSvgFilter(e,l),wt.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({},V)}),r(10,_t=i)}(st,A,C),128&t.$$.dirty[0]|348&t.$$.dirty[1]&&r(13,x={singleline:d,multiline:gt,halign:ht,valign:mt,truncate:b,"has-focus-color":Boolean(yt)}),128&t.$$.dirty[1]&&r(12,k={gradient:Boolean($t)}),1073741856&t.$$.dirty[0]|227&t.$$.dirty[1]&&r(11,E={"font-size":re(ct),"line-height":ut,"max-height":pt,"-webkit-line-clamp":ft,color:vt,"background-image":$t,"--divkit-text-focus-color":yt})},[tt,et,nt,rt,st,ct,bt,d,ot,dt,_t,E,k,x,w,_,$,y,m,g,f,u,c,l,s,a,o,i,V,function(t){t.target&&"classList"in t.target&&t.target.classList.add(te.text__image_hidden)},ut,pt,ft,gt,ht,mt,vt,yt,$t,b,v,h,C,A,j,P,D,F,S,N,O,I,M,T,z]}const Mn={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_valign_space-between":"divkit-ce053","container_valign_space-around":"divkit-cf29b","container_valign_space-evenly":"divkit-b4b04",container_halign_left:"divkit-a3091",container_halign_center:"divkit-bac9d",container_halign_right:"divkit-f4230","container_halign_space-between":"divkit-e5c38","container_halign_space-around":"divkit-feff2","container_halign_space-evenly":"divkit-e5e05",container_orientation_horizontal:"divkit-fe458",container_orientation_overlap:"divkit-a644d"};function Tn(t){return{top:Number(null==t?void 0:t.top)||0,right:Number(null==t?void 0:t.right)||0,bottom:Number(null==t?void 0:t.bottom)||0,left:Number(null==t?void 0:t.left)||0}}function zn(t,e,n){const r=((null==e?void 0:e.margins.left)||0)+((null==e?void 0:e.margins.right)||0),i=((null==e?void 0:e.margins.top)||0)+((null==e?void 0:e.margins.bottom)||0);null!=e&&e.show_at_start&&(n?t.top=e.style.height+i:t.left=e.style.width+r),null!=e&&e.show_at_end&&(n?t.bottom=e.style.height+i:t.right=e.style.width+r)}function Jn(t,e,n){let r;const i=((null==e?void 0:e.margins.left)||0)+((null==e?void 0:e.margins.right)||0),o=((null==e?void 0:e.margins.top)||0)+((null==e?void 0:e.margins.bottom)||0),a=((null==n?void 0:n.margins.left)||0)+((null==n?void 0:n.margins.right)||0),s=((null==n?void 0:n.margins.top)||0)+((null==n?void 0:n.margins.bottom)||0);return r="horizontal"===t?[null!=n&&n.show_between?n.style.height+s:0,null!=e&&e.show_between?e.style.width+i:0]:[null!=e&&e.show_between?e.style.height+o:0,null!=n&&n.show_between?n.style.width+a:0],r.map(re).join(" ")}function Rn(t,e,n){if(!(t&&t.shape&&t.shape.type&&e.includes(t.shape.type)&&"shape_drawable"===t.type))return n;let r;if("rounded_rectangle"===t.shape.type)r={width:Ve(null===(o=(i=t.shape).item_width)||void 0===o?void 0:o.value,10),height:Ve(null===(a=i.item_height)||void 0===a?void 0:a.value,10),radius:Ve(null===(s=i.corner_radius)||void 0===s?void 0:s.value,5)};else{if("circle"!==t.shape.type)return n;r=function(t){var e;const n=2*Ve(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;return function(t,e,n){var r;const i={},o=e.stroke||(null==n?void 0:n.stroke),a=null!=o&&o.color?ae(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=ae(l),a&&s&&(i.boxShadow="inset 0 0 0 ".concat(re(s)," ").concat(a)),i}(r,t.shape,{color:t.color,stroke:t.stroke})}let Bn;function Ln(){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 Un={"container-separator":"divkit-a7719","container-separator__item":"divkit-c770e","container-separator__shape":"divkit-f6e9a"},{window:Wn}=A;function Hn(t,e,n){const r=t.slice();return r[15]=e[n],r}function qn(t){let e,n,r,i,o,a="".concat(t[15].style.width,"px"),s="".concat(t[15].style.height,"px"),l="".concat(t[15].style.borderRadius,"px"),c="".concat(t[15].left,"px"),u="".concat(t[15].top,"px"),d="".concat(t[15].width,"px"),p="".concat(t[15].height,"px");return{c(){e=M("div"),n=M("div"),i=J(),L(n,"class",r=Un["container-separator__shape"]),K(n,"width",a),K(n,"height",s),K(n,"border-radius",l),K(n,"background",t[15].style.background),K(n,"box-shadow",t[15].style.boxShadow),L(e,"class",o=Un["container-separator__item"]),K(e,"left",c),K(e,"top",u),K(e,"width",d),K(e,"height",p)},m(t,r){N(t,e,r),D(e,n),D(e,i)},p(t,r){2&r&&a!==(a="".concat(t[15].style.width,"px"))&&K(n,"width",a),2&r&&s!==(s="".concat(t[15].style.height,"px"))&&K(n,"height",s),2&r&&l!==(l="".concat(t[15].style.borderRadius,"px"))&&K(n,"border-radius",l),2&r&&K(n,"background",t[15].style.background),2&r&&K(n,"box-shadow",t[15].style.boxShadow),2&r&&c!==(c="".concat(t[15].left,"px"))&&K(e,"left",c),2&r&&u!==(u="".concat(t[15].top,"px"))&&K(e,"top",u),2&r&&d!==(d="".concat(t[15].width,"px"))&&K(e,"width",d),2&r&&p!==(p="".concat(t[15].height,"px"))&&K(e,"height",p)},d(t){t&&O(e)}}}function Gn(t){let e,r,i,o,a=Nt(t[1]),s=[];for(let e=0;e<a.length;e+=1)s[e]=qn(Hn(t,a,e));return{c(){e=M("div");for(let t=0;t<s.length;t+=1)s[t].c();L(e,"class",r=Un["container-separator"])},m(n,r){N(n,e,r);for(let t=0;t<s.length;t+=1)s[t]&&s[t].m(e,null);t[12](e),i||(o=B(Wn,"resize",t[2]),i=!0)},p(t,n){let[r]=n;if(2&r){let n;for(a=Nt(t[1]),n=0;n<a.length;n+=1){const i=Hn(t,a,n);s[n]?s[n].p(i,r):(s[n]=qn(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&&O(e),I(s,n),t[12](null),i=!1,o()}}}function Kn(t,e,n,r,i,o){const a=e.margins.left,s=e.margins.right,l=e.margins.top,c=e.margins.bottom;o?t.push({top:n.bottom+l,left:i.left+a,width:Math.max(0,i.right-i.left-a-s),height:r.top-n.bottom-l-c,style:e.style}):t.push({top:i.top+l,left:n.right+a,width:r.left-n.right-a-s,height:Math.max(0,i.bottom-i.top-l-c),style:e.style})}function Xn(t,e,n,r,i,o){const a={top:Math.min(...n.map((t=>t.top))),right:Math.max(...n.map((t=>t.right))),bottom:Math.max(...n.map((t=>t.bottom))),left:Math.min(...n.map((t=>t.left)))};if(null==e?void 0:e.show_at_start){let s,l;"space-around"===i||"space-evenly"===i?(s=o.left-e.style.width,l=o.top-e.style.height):(s=n[0].left-e.style.width-e.margins.left-e.margins.right,l=n[0].top-e.style.height-e.margins.top-e.margins.bottom),Kn(t,e,{top:0,right:s,bottom:l,left:0},n[0],a,r)}if(null==e?void 0:e.show_between)for(let i=0;i<n.length-1;++i)Kn(t,e,n[i],n[i+1],a,r);if(null==e?void 0:e.show_at_end){const s=n[n.length-1];let l,c;"space-around"===i||"space-evenly"===i?(l=o.bottom+e.style.height,c=o.right+e.style.width):(l=s.bottom+e.style.height+e.margins.top+e.margins.bottom,c=s.right+e.style.width+e.margins.left+e.margins.right),Kn(t,e,s,{top:l,right:0,bottom:0,left:c},a,r)}}function Yn(t,e,n){let r,{orientation:i}=e,{separator:o}=e,{lineSeparator:a}=e,{contentHAlign:s}=e,{contentVAlign:l}=e;const c=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(),e=window.getComputedStyle(r),c={top:t.top+parseFloat(e.paddingTop),right:t.right-parseFloat(e.paddingRight),bottom:t.bottom-parseFloat(e.paddingBottom),left:t.left+parseFloat(e.paddingLeft)};n(1,d=[]);let p=[...r.children].filter((t=>t!==u&&!t.classList.contains(ee.outer__border))),f=[];for(;p.length;){const t=[],e=p.shift();t.push(e);let n=e.getBoundingClientRect(),r=n.right,o=n.bottom;for(;p.length;){let e=p[0],n=e.getBoundingClientRect();if("vertical"===i){if(n.top<o)break}else if(n.left<r)break;r=Math.max(r,n.right),o=Math.max(o,n.bottom),t.push(e),p.shift()}f.push(t)}const g=[];f.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&&Xn(d,o,e,"vertical"===i,"vertical"===i?l:s,c);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)))};g.push(n)})),a&&Xn(d,a,g,"horizontal"===i,"vertical"===i?s:l,c),d.forEach((e=>{e.top-=t.top,e.left-=t.left}))}));let u,d=[],p=!1,f=null,g=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(Un["container-separator__shape"]))&&!(null==n?void 0:n.contains(Un["container-separator"]))}))&&c()}return ot((()=>{n(8,p=!0)})),at((()=>{n(8,p=!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),"contentHAlign"in t&&n(6,s=t.contentHAlign),"contentVAlign"in t&&n(7,l=t.contentVAlign)},t.$$.update=()=>{1&t.$$.dirty&&n(11,r=(null==u?void 0:u.parentElement)||null),3840&t.$$.dirty&&(p&&r||f||g)&&(f&&(f.disconnect(),n(9,f=null)),g&&(g.disconnect(),n(10,g=null)),p&&r&&("undefined"!=typeof MutationObserver&&(n(9,f=new MutationObserver(h)),f.observe(r,{childList:!0,attributes:!0,characterData:!0,subtree:!0})),"undefined"!=typeof ResizeObserver&&(n(10,g=new ResizeObserver(c)),g.observe(r)))),2304&t.$$.dirty&&p&&r&&c()},[u,d,c,i,o,a,s,l,p,f,g,r,function(t){dt[t?"unshift":"push"]((()=>{u=t,n(0,u)}))}]}const Zn=class extends qt{constructor(t){super(),Wt(this,t,Yn,Gn,d,{orientation:3,separator:4,lineSeparator:5,contentHAlign:6,contentVAlign:7})}},{Boolean:Qn}=A;function tr(t,e,n){const r=t.slice();return r[47]=e[n],r}function er(t){let e,n;return e=new dn({props:{cls:we("container",Mn,t[14]),style:t[12],json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],additionalPaddings:t[18],heightByAspect:Boolean(t[10]),parentOf:t[13],replaceItems:t[26],$$slots:{default:[or]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};16384&n[0]&&(r.cls=we("container",Mn,t[14])),4096&n[0]&&(r.style=t[12]),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]),262144&n[0]&&(r.additionalPaddings=t[18]),1024&n[0]&&(r.heightByAspect=Boolean(t[10])),8192&n[0]&&(r.parentOf=t[13]),33565664&n[0]|524288&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function nr(t){let e,n;return e=new Ha({props:{layoutParams:t[11],div:t[47].json,templateContext:t[47].templateContext,origJson:t[47].origJson}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};2048&n[0]&&(r.layoutParams=t[11]),33554432&n[0]&&(r.div=t[47].json),33554432&n[0]&&(r.templateContext=t[47].templateContext),33554432&n[0]&&(r.origJson=t[47].origJson),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function rr(t){let e,n,r=Nt(t[25]),i=[];for(let e=0;e<r.length;e+=1)i[e]=nr(tr(t,r,e));const o=t=>Dt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=R()},m(t,r){for(let e=0;e<i.length;e+=1)i[e]&&i[e].m(t,r);N(t,e,r),n=!0},p(t,n){if(33556480&n[0]){let a;for(r=Nt(t[25]),a=0;a<r.length;a+=1){const o=tr(t,r,a);i[a]?(i[a].p(o,n),Pt(i[a],1)):(i[a]=nr(o),i[a].c(),Pt(i[a],1),i[a].m(e.parentNode,e))}for(Vt(),a=r.length;a<i.length;a+=1)o(a);jt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)Pt(i[t]);n=!0}},o(t){i=i.filter(Qn);for(let t=0;t<i.length;t+=1)Dt(i[t]);n=!1},d(t){t&&O(e),I(i,t)}}}function ir(t){let e,n;return e=new Zn({props:{separator:t[8],lineSeparator:t[9],orientation:t[5],contentHAlign:t[7],contentVAlign:t[6]}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.separator=t[8]),512&n[0]&&(r.lineSeparator=t[9]),32&n[0]&&(r.orientation=t[5]),128&n[0]&&(r.contentHAlign=t[7]),64&n[0]&&(r.contentVAlign=t[6]),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function or(t){let e,r,i,o=t[13],a=rr(t),s=(t[8]||t[9])&&ir(t);return{c(){a.c(),e=J(),s&&s.c(),r=R()},m(t,n){a.m(t,n),N(t,e,n),s&&s.m(t,n),N(t,r,n),i=!0},p(t,i){8192&i[0]&&d(o,o=t[13])?(Vt(),Dt(a,1,1,n),jt(),a=rr(t),a.c(),Pt(a,1),a.m(e.parentNode,e)):a.p(t,i),t[8]||t[9]?s?(s.p(t,i),768&i[0]&&Pt(s,1)):(s=ir(t),s.c(),Pt(s,1),s.m(r.parentNode,r)):s&&(Vt(),Dt(s,1,1,(()=>{s=null})),jt())},i(t){i||(Pt(a),Pt(s),i=!0)},o(t){Dt(a),Dt(s),i=!1},d(t){t&&(O(e),O(r)),a.d(t),s&&s.d(t)}}}function ar(t){let e,n,r=!t[4]&&er(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[4]?r&&(Vt(),Dt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),16&n[0]&&Pt(r,1)):(r=er(t),r.c(),Pt(r,1),r.m(e.parentNode,e))},i(t){n||(Pt(r),n=!0)},o(t){Dt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function sr(t,e,r){let i,o,a,s,l,c,u,d,f,g,h,m,v,y,$,b,_,w,x,k,E,C,A,V,j=n,P=n,D=n,F=n,S=n,N=n,O=n,I=n,M=n;var T,z,J,R,B,L;t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>F())),t.$$.on_destroy.push((()=>S())),t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>M()));let{json:U={}}=e,{templateContext:W}=e,{origJson:H}=e,{layoutParams:q}=e;const G={left:"start",center:"center",right:"end","space-between":"start","space-around":"start","space-evenly":"start"},K={top:"start",center:"center",bottom:"end",baseline:"baseline","space-between":"start","space-around":"start","space-evenly":"start"},X=["rounded_rectangle","circle"],Y=lt(Zt);let Z,Q=!1,tt="vertical",et="top",nt="left",rt=null,it=null,ot={};return t.$$set=t=>{"json"in t&&r(0,U=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(13,i=U.items),8192&t.$$.dirty[0]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(4,Q=!1):(r(4,Q=!0),Y.logError(Qt(new Error('Incorrect or empty "items" prop for div "container"'))))),8210&t.$$.dirty[0]&&r(25,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(24,a=Y.getDerivedFromVars(U.orientation)),M(),M=p(a,(t=>r(42,V=t)))),32&t.$$.dirty[0]|2048&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(23,s=Y.getDerivedFromVars(U.content_alignment_vertical)),I(),I=p(s,(t=>r(41,A=t)))),64&t.$$.dirty[0]|1024&t.$$.dirty[1]&&r(6,et=function(t,e){return"top"===t||"center"===t||"bottom"===t||"baseline"===t||"space-between"===t||"space-around"===t||"space-evenly"===t?t:e}(A,et)),1&t.$$.dirty[0]&&(r(22,l=Y.getDerivedFromVars(U.content_alignment_horizontal)),O(),O=p(l,(t=>r(40,C=t)))),128&t.$$.dirty[0]|512&t.$$.dirty[1]&&r(7,nt=function(t,e){return"left"===t||"center"===t||"right"===t||"space-between"===t||"space-around"===t||"space-evenly"===t?t:e}(C,nt)),1&t.$$.dirty[0]&&(r(21,c=Y.getDerivedFromVars(U.layout_mode)),N(),N=p(c,(t=>r(39,E=t)))),256&t.$$.dirty[1]&&r(33,u="wrap"===E),1&t.$$.dirty[0]&&(r(20,d=Y.getDerivedFromVars(U.separator)),S(),S=p(d,(t=>r(38,k=t)))),939524384&t.$$.dirty[0]|128&t.$$.dirty[1])if((null==k?void 0:k.style)&&"overlap"!==tt&&Ln()){const t=Rn(k.style,X,(null==rt?void 0:rt.style)||null);r(8,rt=t?{show_at_start:Boolean(null!==r(27,T=k.show_at_start)&&void 0!==T&&T),show_at_end:Boolean(null!==r(28,z=k.show_at_end)&&void 0!==z&&z),show_between:Boolean(null===r(29,J=k.show_between)||void 0===J||J),style:t,margins:Tn(k.margins)}:null)}else r(8,rt=null);if(1&t.$$.dirty[0]&&(r(19,f=Y.getDerivedFromVars(U.line_separator)),F(),F=p(f,(t=>r(37,x=t)))),1073742368&t.$$.dirty[0]|67&t.$$.dirty[1])if((null==x?void 0:x.style)&&"overlap"!==tt&&Ln()){const t=Rn(x.style,X,(null==it?void 0:it.style)||null);r(9,it=t?{show_at_start:Boolean(null!==r(30,R=x.show_at_start)&&void 0!==R&&R),show_at_end:Boolean(null!==r(31,B=x.show_at_end)&&void 0!==B&&B),show_between:Boolean(null===r(32,L=x.show_between)||void 0===L||L),style:t,margins:Tn(x.margins)}:null)}else r(9,it=null);if(800&t.$$.dirty[0]&&r(18,g=rt||it?function(t,e,n){const r={};return zn(r,e,"vertical"===t),zn(r,n,"horizontal"===t),r}(tt,rt,it):null),1&t.$$.dirty[0]&&(r(17,h=Y.getDerivedFromVars(U.aspect)),D(),D=p(h,(t=>r(36,w=t)))),32&t.$$.dirty[1]){const t=null==w?void 0:w.ratio;t&&He(t)?r(10,Z=t):r(10,Z=void 0)}if(1&t.$$.dirty[0]&&(r(16,m=Y.getDerivedFromVars(U.width)),j(),j=p(m,(t=>r(34,b=t)))),1&t.$$.dirty[0]&&(r(15,v=Y.getDerivedFromVars(U.height)),P(),P=p(v,(t=>r(35,_=t)))),3304&t.$$.dirty[0]|28&t.$$.dirty[1]){let t={};(null==q?void 0:q.fakeElement)&&(t.fakeElement=!0),"overlap"===tt&&(t.overlapParent=!0),"horizontal"!==tt&&(t.parentHAlign=u?"start":G[nt],Z||_&&"wrap_content"!==_.type&&("match_parent"!==_.type||!(null==q?void 0:q.parentVerticalWrapContent))||(t.parentVerticalWrapContent=!0)),"vertical"!==tt&&(t.parentVAlign=u?"start":K[et],("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"===tt&&(t.parentContainerOrientation="horizontal"),"vertical"===tt&&(t.parentContainerOrientation="vertical"),u&&(t.parentContainerWrap=!0),r(11,ot=De(t,ot))}224&t.$$.dirty[0]|4&t.$$.dirty[1]&&r(14,y={orientation:tt,valign:et,halign:nt,wrap:u}),1824&t.$$.dirty[0]&&r(12,$={gap:rt||it?Jn(tt,rt,it):void 0,"aspect-ratio":Z})},[U,W,H,q,Q,tt,et,nt,rt,it,Z,ot,$,i,y,v,m,h,g,f,d,c,l,s,a,o,function(t){r(0,U=Object.assign(Object.assign({},U),{items:t}))},T,z,J,R,B,L,u,b,_,w,x,k,E,C,A,V]}const lr={separator:"divkit-a30bb",separator_orientation_horizontal:"divkit-f529e",separator_orientation_vertical:"divkit-e9e27",separator__inner:"divkit-db7d8"};function cr(t,e){return"vertical"===t||"horizontal"===t?t:e}function ur(t){let e,n,r;return{c(){e=M("span"),L(e,"class",n=lr.separator__inner),L(e,"style",r=ne(t[5]))},m(t,n){N(t,e,n)},p(t,n){32&n&&r!==(r=ne(t[5]))&&L(e,"style",r)},d(t){t&&O(e)}}}function dr(t){let e,n=t[6]&&ur(t);return{c(){n&&n.c(),e=R()},m(t,r){n&&n.m(t,r),N(t,e,r)},p(t,r){t[6]?n?n.p(t,r):(n=ur(t),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(t){t&&O(e),n&&n.d(t)}}}function pr(t){let e,n;return e=new dn({props:{cls:we("separator",lr,t[4]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[dr]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){let[r]=n;const i={};16&r&&(i.cls=we("separator",lr,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||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function fr(t,e,r){let i,o,a,s,l,c,u,d=n;t.$$.on_destroy.push((()=>d()));let{json:f={}}=e,{templateContext:g}=e,{origJson:h}=e,{layoutParams:m}=e;const v=lt(Zt);let y="horizontal",$="rgba(0,0,0,0.08)";return t.$$set=t=>{"json"in t&&r(0,f=t.json),"templateContext"in t&&r(1,g=t.templateContext),"origJson"in t&&r(2,h=t.origJson),"layoutParams"in t&&r(3,m=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty&&(r(7,i=v.getDerivedFromVars(f.delimiter_style)),d(),d=p(i,(t=>r(12,u=t)))),4352&t.$$.dirty&&r(8,y=cr(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,$=ae(null==u?void 0:u.color,1,$)),256&t.$$.dirty&&r(11,a="horizontal"===y?"100%":re(1)),256&t.$$.dirty&&r(10,s="horizontal"===y?re(1):"100%"),3584&t.$$.dirty&&r(5,l={background:$,width:a,height:s}),256&t.$$.dirty&&r(4,c={orientation:y})},[f,g,h,m,c,l,o,i,y,$,s,a,u]}const gr={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 hr(t){return t.startsWith("data:")?le(t):"data:image/jpg;base64,".concat(le(t))}function mr(t){let e,n;return e=new dn({props:{cls:we("image",gr,t[10]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customDescription:!0,$$slots:{default:[br]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.cls=we("image",gr,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||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function vr(t){let e,n,r,i,o,a,l;return{c(){e=M("img"),L(e,"class",n=gr.image__image),u(e.src,r=t[4]===xr?wr:t[7])||L(e,"src",r),L(e,"loading","lazy"),L(e,"decoding","async"),L(e,"style",i=ne(t[9])),L(e,"alt",t[16]),L(e,"aria-hidden",o=t[16]?null:"true")},m(n,r){N(n,e,r),a||(l=[B(e,"load",t[26]),B(e,"error",t[27])],a=!0)},p(t,n){144&n[0]&&!u(e.src,r=t[4]===xr?wr:t[7])&&L(e,"src",r),512&n[0]&&i!==(i=ne(t[9]))&&L(e,"style",i),65536&n[0]&&L(e,"alt",t[16]),65536&n[0]&&o!==(o=t[16]?null:"true")&&L(e,"aria-hidden",o)},d(t){t&&O(e),a=!1,s(l)}}}function yr(t){let e,n,r,i,o,a,l,c,d,p="".concat(t[5],"%");return{c(){e=M("span"),n=M("img"),L(n,"class",r=gr.image__image),u(n.src,i=t[4]===xr?wr:t[7])||L(n,"src",i),L(n,"loading","lazy"),L(n,"decoding","async"),L(n,"style",o=ne(t[9])),L(n,"alt",t[16]),L(n,"aria-hidden",a=t[16]?null:"true"),L(e,"class",l=gr["image__aspect-wrapper"]),K(e,"padding-bottom",p)},m(r,i){N(r,e,i),D(e,n),c||(d=[B(n,"load",t[26]),B(n,"error",t[27])],c=!0)},p(t,r){144&r[0]&&!u(n.src,i=t[4]===xr?wr:t[7])&&L(n,"src",i),512&r[0]&&o!==(o=ne(t[9]))&&L(n,"style",o),65536&r[0]&&L(n,"alt",t[16]),65536&r[0]&&a!==(a=t[16]?null:"true")&&L(n,"aria-hidden",a),32&r[0]&&p!==(p="".concat(t[5],"%"))&&K(e,"padding-bottom",p)},d(t){t&&O(e),c=!1,s(d)}}}function $r(t){let e;function n(t,e){return t[10].aspect?yr:vr}let r=n(t),i=r(t);return{c(){i.c(),e=R()},m(t,n){i.m(t,n),N(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){t&&O(e),i.d(t)}}}function br(t){let e,n=t[6],r=$r(t);return{c(){r.c(),e=R()},m(t,n){r.m(t,n),N(t,e,n)},p(t,i){64&i[0]&&d(n,n=t[6])?(r.d(1),r=$r(t),r.c(),r.m(e.parentNode,e)):r.p(t,i)},d(t){t&&O(e),r.d(t)}}}function _r(t){let e,n,r=!t[8]&&mr(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[8]?r&&(Vt(),Dt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),256&n[0]&&Pt(r,1)):(r=mr(t),r.c(),Pt(r,1),r.m(e.parentNode,e))},i(t){n||(Pt(r),n=!0)},o(t){Dt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}const wr="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",xr=2;function kr(t,e,r){let i,o,a,s,l,c,u,d,f,g,h,m,v,y,$,b,_,w,x,k,E,C,A,V,j,P,D,F,S,N,O,I,M,T,z=n,J=n,R=n,B=n,L=n,U=n,W=n,H=n,q=n,G=n,K=n,X=n,Y=n,Z=n;t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>U())),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:Q={}}=e,{templateContext:tt}=e,{origJson:et}=e,{layoutParams:nt}=e;const rt=lt(Zt);let it=0,ot="rgba(0,0,0,0.08)",st=!1,ct="",ut="none",dt="50% 50%";let pt,ft="0",gt="source_in",ht="",mt="",vt=0,yt=0,$t=0,bt="",_t="";return at((()=>{rt.removeSvgFilter(pt,gt)})),t.$$set=t=>{"json"in t&&r(0,Q=t.json),"templateContext"in t&&r(1,tt=t.templateContext),"origJson"in t&&r(2,et=t.origJson),"layoutParams"in t&&r(3,nt=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(25,i=rt.getDerivedFromVars(Q.image_url)),Z(),Z=p(i,(t=>r(55,T=t)))),1&t.$$.dirty[0]&&(r(24,o=rt.getDerivedFromVars(Q.gif_url)),Y(),Y=p(o,(t=>r(54,M=t)))),25165824&t.$$.dirty[1]&&r(7,a=T||M),128&t.$$.dirty[0]&&r(4,it=0),128&t.$$.dirty[0]&&(a?r(8,st=!1):(r(8,st=!0),rt.logError(Qt(new Error('Missing "image_url" for "image"'))))),1&t.$$.dirty[0]&&(r(23,s=rt.getDerivedFromVars(Q.width)),X(),X=p(s,(t=>r(53,I=t)))),4194304&t.$$.dirty[1]&&r(41,l="wrap_content"===(null==I?void 0:I.type)),1&t.$$.dirty[0]&&(r(22,c=rt.getDerivedFromVars(Q.height)),K(),K=p(c,(t=>r(52,O=t)))),2097152&t.$$.dirty[1]&&r(40,u="wrap_content"===(null==O?void 0:O.type)),1&t.$$.dirty[0]&&(r(21,d=rt.getDerivedFromVars(Q.preview)),G(),G=p(d,(t=>r(51,N=t)))),16&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(29,ct=0!==it&&it!==xr||!N?"":'url("'.concat(hr(N),'")')),1&t.$$.dirty[0]&&(r(20,f=rt.getDerivedFromVars(Q.placeholder_color)),q(),q=p(f,(t=>r(50,S=t)))),16&t.$$.dirty[0]|524288&t.$$.dirty[1]&&function(t,e){r(28,ot=0===t||t===xr?ae(e,1,ot):"")}(it,S),1&t.$$.dirty[0]&&(r(19,g=rt.getDerivedFromVars(Q.scale)),H(),H=p(g,(t=>r(49,F=t)))),1073741824&t.$$.dirty[0]|262144&t.$$.dirty[1]&&r(30,ut=fe(F)||ut),1&t.$$.dirty[0]&&(r(18,h=rt.getDerivedFromVars({content_alignment_horizontal:Q.content_alignment_horizontal,content_alignment_vertical:Q.content_alignment_vertical})),W(),W=p(h,(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:ge(t)}(D,dt)),1&t.$$.dirty[0]&&(r(17,m=rt.getDerivedFromVars(Q.accessibility)),U(),U=p(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=rt.getDerivedFromVars(Q.aspect)),L(),L=p(y,(t=>r(46,j=t)))),32768&t.$$.dirty[1]){const t=null==j?void 0:j.ratio;t&&He(t)?r(5,ft=(100/Number(t)).toFixed(2)):r(5,ft="0")}if(1&t.$$.dirty[0]&&(r(14,$=rt.getDerivedFromVars(Q.tint_color)),B(),B=p($,(t=>r(45,V=t)))),1&t.$$.dirty[0]&&(r(13,b=rt.getDerivedFromVars(Q.tint_mode)),R(),R=p(b,(t=>r(44,A=t)))),24582&t.$$.dirty[1]){const t=V?ae(V):void 0,e=kn(A,gt);t===pt&&e===gt||(rt.removeSvgFilter(pt,gt),r(6,ht=t?rt.addSvgFilter(t,e):""),r(32,pt=t),r(33,gt=e))}if(1&t.$$.dirty[0]&&(r(12,_=rt.getDerivedFromVars(Q.appearance_animation)),J(),J=p(_,(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=Ve(t.duration,300)),r(36,yt=Ve(t.start_delay,0)),r(35,vt=Ve(t.alpha,0))}if(1&t.$$.dirty[0]&&(r(11,w=rt.getDerivedFromVars(Q.filters)),z(),z=p(w,(t=>r(42,E=t)))),2048&t.$$.dirty[1]){let t="",e="";Array.isArray(E)&&E.length&&(t=qe(E,rt.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"!==ft,"is-width-content":l,"is-height-content":u,loaded:1===it,"before-appearance":Boolean(mt)&&0===it}),1879048272&t.$$.dirty[0]|505&t.$$.dirty[1]&&r(9,k={"background-image":ct,"background-color":ct?void 0:ot,"background-size":ut,"clip-path":_t||void 0,"object-fit":ut,"object-position":dt,filter:[1===it&&ht?"url(#".concat(ht,")"):"",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})},[Q,tt,et,nt,it,ft,ht,a,st,k,x,w,_,b,$,y,v,m,h,g,f,d,c,s,o,i,function(){0===it&&r(4,it=1)},function(){0===it&&r(4,it=xr)},ot,ct,ut,dt,pt,gt,mt,vt,yt,$t,bt,_t,u,l,E,C,A,V,j,P,D,F,S,N,O,I,M,T]}const Er=class extends qt{constructor(t){super(),Wt(this,t,kr,_r,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Cr={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 Ar(t){return t>0&&t<1}function Vr(t){return String(Math.ceil(1e3*t)/1e3)}function jr(t,e,n){if(t.some(Ar)){const e=Math.max(...t.filter(Ar).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(re(r*t[e]/i),",").concat(Vr(t[e]),"fr)"):t[e]?o[e]="".concat(Vr(t[e]),"fr"):o[e]="auto";return o.join(" ")}function Pr(t,e,n){const r=t.slice();return r[30]=e[n],r}function Dr(t){let e,n;return e=new dn({props:{cls:we("grid",Cr,t[8]),json:t[0],origJson:t[2],templateContext:t[1],style:t[7],layoutParams:t[3],parentOf:t[0].items,replaceItems:t[12],$$slots:{default:[Nr]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=we("grid",Cr,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]),1&n[0]&&(r.parentOf=t[0].items),32&n[0]|4&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function Fr(t){let e,n;return e=new Ha({props:{layoutParams:t[30].layoutParams,div:t[30].json,templateContext:t[30].templateContext,origJson:t[30].origJson}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};32&n[0]&&(r.layoutParams=t[30].layoutParams),32&n[0]&&(r.div=t[30].json),32&n[0]&&(r.templateContext=t[30].templateContext),32&n[0]&&(r.origJson=t[30].origJson),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function Sr(t){let e,n,r=Nt(t[5]),i=[];for(let e=0;e<r.length;e+=1)i[e]=Fr(Pr(t,r,e));const o=t=>Dt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=R()},m(t,r){for(let e=0;e<i.length;e+=1)i[e]&&i[e].m(t,r);N(t,e,r),n=!0},p(t,n){if(32&n[0]){let a;for(r=Nt(t[5]),a=0;a<r.length;a+=1){const o=Pr(t,r,a);i[a]?(i[a].p(o,n),Pt(i[a],1)):(i[a]=Fr(o),i[a].c(),Pt(i[a],1),i[a].m(e.parentNode,e))}for(Vt(),a=r.length;a<i.length;a+=1)o(a);jt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)Pt(i[t]);n=!0}},o(t){i=i.filter(Boolean);for(let t=0;t<i.length;t+=1)Dt(i[t]);n=!1},d(t){t&&O(e),I(i,t)}}}function Nr(t){let e,r,i=t[5],o=Sr(t);return{c(){o.c(),e=R()},m(t,n){o.m(t,n),N(t,e,n),r=!0},p(t,r){32&r[0]&&d(i,i=t[5])?(Vt(),Dt(o,1,1,n),jt(),o=Sr(t),o.c(),Pt(o,1),o.m(e.parentNode,e)):o.p(t,r)},i(t){r||(Pt(o),r=!0)},o(t){Dt(o),r=!1},d(t){t&&O(e),o.d(t)}}}function Or(t){let e,n,r=!t[6]&&Dr(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[6]?r&&(Vt(),Dt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),64&n[0]&&Pt(r,1)):(r=Dr(t),r.c(),Pt(r,1),r.m(e.parentNode,e))},i(t){n||(Pt(r),n=!0)},o(t){Dt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function Ir(t,e,r){let i,o,a,s,l,c,u,d,f,g,h,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=lt(Zt);let C,A,V=!1,j=1,P=[],D=[],F=[],S=[],N=0,O=!1,I="top",M="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(24,i=_.items),16777216&t.$$.dirty[0]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(13,V=!1):(r(13,V=!0),E.logError(Qt(new Error('Incorrect or empty "items" prop for div "grid"'))))),1&t.$$.dirty[0]&&(r(11,o=E.getDerivedFromVars(_.column_count)),b(),b=p(o,(t=>r(28,m=t)))),268451840&t.$$.dirty[0]&&r(14,j=fn(m,j)),16785410&t.$$.dirty[0]&&r(23,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}}))),8388608&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=Xt(t,(t=>[...t]))),$(),$=p(C,(t=>r(27,h=t)))}if(144162824&t.$$.dirty[0]){const t={};let e=0,n=0;r(15,P=[]),r(16,D=[]),r(17,F=[]),r(18,S=[]),r(20,O=!1),r(5,A=a.map(((i,o)=>{var a,s,l,c;const u=h[o],d=Number(u.columnSpan)||1,p=Number(u.rowSpan)||1,f={x:e,y:n,colSpan:d,rowSpan:p},g="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(20,O=!0):(t[i+"_"+e]=!0,(!P[i]||P[i]<g)&&r(15,P[i]=g,P),(!D[e]||D[e]<m)&&r(16,D[e]=m,D),(!F[i]||F[i]<v)&&r(17,F[i]=v,F),(!S[e]||S[e]<y)&&r(18,S[e]=y,S));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(20,O=!0),O&&E.logError(Qt(new Error('Mismatching "grid" rows/columns'))),r(19,N=n)}1&t.$$.dirty[0]&&(r(10,s=E.getDerivedFromVars(_.content_alignment_vertical)),y(),y=p(s,(t=>r(26,g=t)))),69206016&t.$$.dirty[0]&&r(21,I=wn(g,I)),1&t.$$.dirty[0]&&(r(9,l=E.getDerivedFromVars(_.content_alignment_horizontal)),v(),v=p(l,(t=>r(25,f=t)))),37748736&t.$$.dirty[0]&&r(22,M=_n(f,M)),6291456&t.$$.dirty[0]&&r(8,c={valign:I,halign:M}),1032192&t.$$.dirty[0]&&r(7,u={"grid-template-columns":jr(P,F,j),"grid-template-rows":jr(D,S,N)}),1056768&t.$$.dirty[0]&&r(6,d=V||O)},[_,w,x,k,C,A,d,u,c,l,s,o,function(t){r(0,_=Object.assign(Object.assign({},_),{items:t}))},V,j,P,D,F,S,N,O,I,M,a,i,f,g,h,m]}const Mr={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 Tr(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 zr(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:Jr}=A;function Rr(t,e,n){const r=t.slice();return r[73]=e[n],r[74]=e,r[75]=n,r}function Br(t,e,n){const r=t.slice();return r[76]=e[n],r}function Lr(t){let e,n;return e=new dn({props:{cls:we("gallery",Mr,t[17]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,customActions:"gallery",parentOf:t[10],replaceItems:t[32],$$slots:{default:[Xr]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};131072&n[0]&&(r.cls=we("gallery",Mr,t[17])),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]),1024&n[0]&&(r.parentOf=t[10]),671906768&n[0]|131072&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function Ur(t){let e,n;return e=new Ha({props:{layoutParams:t[8],div:t[76].json,templateContext:t[76].templateContext,origJson:t[76].origJson}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.layoutParams=t[8]),134217728&n[0]&&(r.div=t[76].json),134217728&n[0]&&(r.templateContext=t[76].templateContext),134217728&n[0]&&(r.origJson=t[76].origJson),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function Wr(t){let e,n,r,i,o,a=t[75],s=Nt(t[73]),l=[];for(let e=0;e<s.length;e+=1)l[e]=Ur(Br(t,s,e));const c=t=>Dt(l[t],1,1,(()=>{l[t]=null})),u=()=>t[61](e,a),d=()=>t[61](null,a);return{c(){e=M("div");for(let t=0;t<l.length;t+=1)l[t].c();n=J(),L(e,"class",r=Mr.gallery__items),L(e,"style",i=ne(t[18]))},m(t,r){N(t,e,r);for(let t=0;t<l.length;t+=1)l[t]&&l[t].m(e,null);D(e,n),u(),o=!0},p(r,p){if(t=r,134217984&p[0]){let r;for(s=Nt(t[73]),r=0;r<s.length;r+=1){const i=Br(t,s,r);l[r]?(l[r].p(i,p),Pt(l[r],1)):(l[r]=Ur(i),l[r].c(),Pt(l[r],1),l[r].m(e,n))}for(Vt(),r=s.length;r<l.length;r+=1)c(r);jt()}(!o||262144&p[0]&&i!==(i=ne(t[18])))&&L(e,"style",i),a!==t[75]&&(d(),a=t[75],u())},i(t){if(!o){for(let t=0;t<s.length;t+=1)Pt(l[t]);o=!0}},o(t){l=l.filter(Jr);for(let t=0;t<l.length;t+=1)Dt(l[t]);o=!1},d(t){t&&O(e),I(l,t),d()}}}function Hr(t){let e,n,r=Nt(t[27]),i=[];for(let e=0;e<r.length;e+=1)i[e]=Wr(Rr(t,r,e));const o=t=>Dt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=R()},m(t,r){for(let e=0;e<i.length;e+=1)i[e]&&i[e].m(t,r);N(t,e,r),n=!0},p(t,n){if(134484224&n[0]){let a;for(r=Nt(t[27]),a=0;a<r.length;a+=1){const o=Rr(t,r,a);i[a]?(i[a].p(o,n),Pt(i[a],1)):(i[a]=Wr(o),i[a].c(),Pt(i[a],1),i[a].m(e.parentNode,e))}for(Vt(),a=r.length;a<i.length;a+=1)o(a);jt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)Pt(i[t]);n=!0}},o(t){i=i.filter(Jr);for(let t=0;t<i.length;t+=1)Dt(i[t]);n=!1},d(t){t&&O(e),I(i,t)}}}function qr(t){let e,n,r=t[13]&&t[9]&&Gr(t),i=t[14]&&t[9]&&Kr(t);return{c(){r&&r.c(),e=J(),i&&i.c(),n=R()},m(t,o){r&&r.m(t,o),N(t,e,o),i&&i.m(t,o),N(t,n,o)},p(t,o){t[13]&&t[9]?r?r.p(t,o):(r=Gr(t),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),t[14]&&t[9]?i?i.p(t,o):(i=Kr(t),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},d(t){t&&(O(e),O(n)),r&&r.d(t),i&&i.d(t)}}}function Gr(t){let e,r,i,o,a=!t[30]&&function(t){let e,n,r,i;return{c(){e=T("svg"),n=T("path"),L(n,"class",r=Mr["gallery__arrow-icon-path"]),L(n,"d","m10 16 8.3 8 1.03-1-4-6-.7-1 .7-1 4-6-1.03-1z"),L(e,"class",i=Mr["gallery__arrow-icon"]),L(e,"xmlns","http://www.w3.org/2000/svg"),L(e,"width","32"),L(e,"height","32"),L(e,"viewBox","0 0 32 32"),L(e,"fill","none")},m(t,r){N(t,e,r),D(e,n)},d(t){t&&O(e)}}}();return{c(){e=M("div"),a&&a.c(),L(e,"class",r=t[30]||"".concat(Mr.gallery__arrow," ").concat(Mr.gallery__arrow_left))},m(n,r){N(n,e,r),a&&a.m(e,null),i||(o=B(e,"click",t[64]),i=!0)},p:n,d(t){t&&O(e),a&&a.d(),i=!1,o()}}}function Kr(t){let e,r,i,o,a=!t[31]&&function(t){let e,n,r,i;return{c(){e=T("svg"),n=T("path"),L(n,"class",r=Mr["gallery__arrow-icon-path"]),L(n,"d","M22 16l-8.3 8-1.03-1 4-6 .7-1-.7-1-4-6 1.03-1 8.3 8z"),L(e,"class",i=Mr["gallery__arrow-icon"]),L(e,"xmlns","http://www.w3.org/2000/svg"),L(e,"width","32"),L(e,"height","32"),L(e,"viewBox","0 0 32 32"),L(e,"fill","none")},m(t,r){N(t,e,r),D(e,n)},d(t){t&&O(e)}}}();return{c(){e=M("div"),a&&a.c(),L(e,"class",r=t[31]||"".concat(Mr.gallery__arrow," ").concat(Mr.gallery__arrow_right))},m(n,r){N(n,e,r),a&&a.m(e,null),i||(o=B(e,"click",t[65]),i=!0)},p:n,d(t){t&&O(e),a&&a.d(),i=!1,o()}}}function Xr(t){let e,r,i,o,a,s,c,u,p,f,g,h=t[27],m=Hr(t),v="horizontal"===t[6]&&qr(t);return{c(){e=M("div"),r=M("div"),m.c(),c=J(),v&&v.c(),u=R(),L(r,"class",i=Mr["gallery__items-grid"]),L(r,"style",o=ne(t[19])),L(e,"class",a=Mr.gallery__scroller+" "+(t[29]?Yt["root_restrict-scroll"]:"")),L(e,"style",s=ne(t[7]))},m(n,i){N(n,e,i),D(e,r),m.m(r,null),t[62](r),t[63](e),N(n,c,i),v&&v.m(n,i),N(n,u,i),p=!0,f||(g=B(e,"scroll",(function(){l(t[9]?t[34]:null)&&(t[9]?t[34]:null).apply(this,arguments)})),f=!0)},p(i,l){t=i,134217728&l[0]&&d(h,h=t[27])?(Vt(),Dt(m,1,1,n),jt(),m=Hr(t),m.c(),Pt(m,1),m.m(r,null)):m.p(t,l),(!p||524288&l[0]&&o!==(o=ne(t[19])))&&L(r,"style",o),(!p||536870912&l[0]&&a!==(a=Mr.gallery__scroller+" "+(t[29]?Yt["root_restrict-scroll"]:"")))&&L(e,"class",a),(!p||128&l[0]&&s!==(s=ne(t[7])))&&L(e,"style",s),"horizontal"===t[6]?v?v.p(t,l):(v=qr(t),v.c(),v.m(u.parentNode,u)):v&&(v.d(1),v=null)},i(t){p||(Pt(m),p=!0)},o(t){Dt(m),p=!1},d(n){n&&(O(e),O(c),O(u)),m.d(n),t[62](null),t[63](null),v&&v.d(n),f=!1,g()}}}function Yr(t){let e,n,r,i,o=!t[5]&&Lr(t);return{c(){o&&o.c(),e=R()},m(a,s){o&&o.m(a,s),N(a,e,s),n=!0,r||(i=B(window,"resize",(function(){l(t[9]?t[35]:null)&&(t[9]?t[35]:null).apply(this,arguments)})),r=!0)},p(n,r){(t=n)[5]?o&&(Vt(),Dt(o,1,1,(()=>{o=null})),jt()):o?(o.p(t,r),32&r[0]&&Pt(o,1)):(o=Lr(t),o.c(),Pt(o,1),o.m(e.parentNode,e))},i(t){n||(Pt(o),n=!0)},o(t){Dt(o),n=!1},d(t){t&&O(e),o&&o.d(t),r=!1,i()}}}function Zr(t,e,r){let i,o,a,s,l,c,u,d,g,h,m,v,y,$,b,_,w,x,k,E,C,A,V,j,P,D,F,S,N=n,O=n,I=n,M=n,T=n,z=n,J=n,R=n,B=n,L=n;t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>M())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>L()));let{json:U={}}=e,{templateContext:W}=e,{origJson:H}=e,{layoutParams:q}=e;const G=lt(Zt);let K,X,Y=[],Z=!1,Q=!1,tt=null,et=!1;const nt=G.getCustomization("galleryLeftClass"),rt=G.getCustomization("galleryRightClass");let it=!1;const st=G.isDesktop;f(t,st,(t=>r(60,F=t)));let ct,ut,pt,ft,gt=1,ht="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(13,Z=t>2),r(14,Q=t+n<e-2)}const Et=zr(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<gt;++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"===ht,i=r?"offsetLeft":"offsetTop",o=r?"left":"top",a=t[e];a&&K.scroll({[o]:Math.max(0,a[i]+.01-vt/2),behavior:n})}function jt(t){const e=At(),n=K.getBoundingClientRect(),r=e.findIndex((t=>function(t,e){return"horizontal"===ht?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"===ht?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!U.id||it||(null==q?void 0:q.fakeElement)||G.registerInstance(U.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"===ht?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)}}),ot((()=>{r(38,et=!0),!it&&(kt(),xt)&&Vt(At(),xt,"auto")})),at((()=>{r(38,et=!1),U.id&&!(null==q?void 0:q.fakeElement)&&G.unregisterInstance(U.id)})),t.$$set=t=>{"json"in t&&r(0,U=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(10,i=U.items),1024&t.$$.dirty[0]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(5,it=!1):(r(5,it=!0),G.logError(Qt(new Error('Incorrect or empty "items" prop for div "gallery"'))))),1058&t.$$.dirty[0]&&r(50,o=(!it&&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]|536871040&t.$$.dirty[1]&&r(9,a=F&&et&&!it),528&t.$$.dirty[0]|64&t.$$.dirty[1]&&(a?"undefined"!=typeof ResizeObserver&&(r(37,tt=new ResizeObserver((()=>{Et()}))),tt.observe(X)):tt&&(tt.disconnect(),r(37,tt=null))),1&t.$$.dirty[0]&&(r(28,s=G.getDerivedFromVars(U.column_count)),B(),B=p(s,(t=>r(59,D=t)))),268435712&t.$$.dirty[1]&&r(39,gt=fn(D,gt)),524544&t.$$.dirty[1]&&r(27,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,gt)),1&t.$$.dirty[0]&&(r(26,c=G.getDerivedFromVars(U.orientation)),R(),R=p(c,(t=>r(58,P=t)))),64&t.$$.dirty[0]|134217728&t.$$.dirty[1]&&r(6,ht=cr(P,ht)),1&t.$$.dirty[0]&&(r(25,u=G.getDerivedFromVars(U.cross_content_alignment)),J(),J=p(u,(t=>r(57,j=t)))),67109376&t.$$.dirty[1]&&r(40,mt=function(t,e){return"start"===t||"center"===t||"end"===t?t:e}(j,mt)),1&t.$$.dirty[0]&&(r(24,d=G.getDerivedFromVars(U.item_spacing)),z(),z=p(d,(t=>r(56,V=t)))),33556480&t.$$.dirty[1]&&(r(42,vt=Ve(V,vt)),r(41,ct=re(vt))),1&t.$$.dirty[0]&&(r(23,g=G.getDerivedFromVars(U.cross_spacing)),T(),T=p(g,(t=>r(55,A=t)))),16787456&t.$$.dirty[1]&&(r(44,pt=Ve(A,vt)),r(43,ut=re(pt))),1&t.$$.dirty[0]&&(r(22,h=G.getDerivedFromVars(U.paddings)),M(),M=p(h,(t=>r(54,C=t)))),8404992&t.$$.dirty[1]&&r(45,yt=Ae(C,yt)),64&t.$$.dirty[0]&&r(49,m="horizontal"===ht?"grid-template-columns":"grid-template-rows"),64&t.$$.dirty[0]|524288&t.$$.dirty[1]){let t=[];o.forEach((e=>{const n="horizontal"===ht?"width":"height";t.push(G.getDerivedFromVars(e.json[n]))})),r(15,ft=Xt(t,(t=>t))),I(),I=p(ft,(t=>r(53,E=t)))}if(64&t.$$.dirty[0]|4227328&t.$$.dirty[1]&&(r(46,$t=[]),gt>1?$t.push("auto"):E.forEach((t=>{!t&&"horizontal"===ht||"match_parent"===(null==t?void 0:t.type)?$t.push("100%"):$t.push("max-content")}))),1&t.$$.dirty[0]&&(r(21,v=G.getDerivedFromVars(U.scroll_mode)),O(),O=p(v,(t=>r(52,k=t)))),456&t.$$.dirty[0]|2099968&t.$$.dirty[1]){const t={};let e={};r(47,_t=!1),(null==q?void 0:q.fakeElement)&&(e.fakeElement=!0),"horizontal"===ht?e.parentVAlign=mt:e.parentHAlign=mt,"paging"===k&&(r(47,_t=!0),e.scrollSnap="start",t["horizontal"===ht?"scroll-padding-left":"scroll-padding-top"]=re(vt/2)),1===gt&&(e.parentLayoutOrientation=ht),r(7,bt=De(t,bt)),r(8,wt=De(e,wt))}1&t.$$.dirty[0]&&(r(20,y=G.getDerivedFromVars(U.restrict_parent_scroll)),L(),L=p(y,(t=>r(29,S=t)))),20480&t.$$.dirty[1]&&r(19,$={padding:yt,"grid-gap":ut}),295936&t.$$.dirty[1]&&r(18,b={"grid-gap":ct,[m]:Tr($t)}),64&t.$$.dirty[0]|65536&t.$$.dirty[1]&&r(17,_={orientation:ht,"scroll-snap":_t}),1&t.$$.dirty[0]&&(r(16,w=G.getDerivedFromVars(U.default_item)),N(),N=p(w,(t=>r(51,x=t)))),1179648&t.$$.dirty[1]&&r(48,xt=Ve(x,xt))},[U,W,H,q,X,it,ht,bt,wt,a,i,K,Y,Z,Q,ft,w,_,b,$,y,v,h,g,d,u,c,l,s,S,nt,rt,function(t){r(0,U=Object.assign(Object.assign({},U),{items:t}))},st,kt,Et,Ct,tt,et,gt,mt,ct,vt,ut,pt,yt,$t,_t,xt,m,o,x,k,E,C,A,V,j,P,D,F,function(t,e){dt[t?"unshift":"push"]((()=>{Y[e]=t,r(12,Y)}))},function(t){dt[t?"unshift":"push"]((()=>{X=t,r(4,X)}))},function(t){dt[t?"unshift":"push"]((()=>{K=t,r(11,K)}))},()=>Ct("left"),()=>Ct("right")]}const Qr={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"},ti=37,ei=39,ni=36,ri=35,{Boolean:ii}=A;function oi(t,e,n){const r=t.slice();r[88]=e[n];const i=r[88].index;return r[89]=i,r}function ai(t,e,n){const r=t.slice();r[88]=e[n];const i=r[88].index;r[89]=i;const o=r[89]===r[6];return r[92]=o,r}function si(t){let e,n;return e=new dn({props:{cls:we("tabs",Qr,t[46]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customActions:"tabs",$$slots:{default:[fi]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(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]),2147483626&n[0]|4137&n[1]|4&n[3]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function li(t){let e,n,r=t[88].title+"";return{c(){e=z(r),n=J()},m(t,r){N(t,e,r),N(t,n,r)},p(t,n){524288&n[0]&&r!==(r=t[88].title+"")&&G(e,r)},d(t){t&&(O(e),O(n))}}}function ci(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[64](t[89],...n)}return i=new Ue({props:{cls:we("tabs__item",Qr,{selected:t[92],actionable:Boolean(t[88].title_click_action)}),actions:!t[88].title_click_action||null!==(e=t[3])&&void 0!==e&&e.fakeElement?[]:[t[88].title_click_action],attrs:{id:"".concat(t[44],"-tab-").concat(t[89]),"aria-controls":"".concat(t[44],"-panel-").concat(t[89]),role:"tab",tabindex:!t[92]||null!==(n=t[3])&&void 0!==n&&n.fakeElement?"-1":t[88].title_click_action?void 0:"0","aria-selected":t[92]?"true":"false"},customAction:null!==(r=t[3])&&void 0!==r&&r.fakeElement?null:a,$$slots:{default:[li]},$$scope:{ctx:t}}}),{c(){Bt(i.$$.fragment)},m(t,e){Lt(i,t,e),o=!0},p(e,n){var r,o,s;t=e;const l={};524352&n[0]&&(l.cls=we("tabs__item",Qr,{selected:t[92],actionable:Boolean(t[88].title_click_action)})),524296&n[0]&&(l.actions=!t[88].title_click_action||null!==(r=t[3])&&void 0!==r&&r.fakeElement?[]:[t[88].title_click_action]),524360&n[0]&&(l.attrs={id:"".concat(t[44],"-tab-").concat(t[89]),"aria-controls":"".concat(t[44],"-panel-").concat(t[89]),role:"tab",tabindex:!t[92]||null!==(o=t[3])&&void 0!==o&&o.fakeElement?"-1":t[88].title_click_action?void 0:"0","aria-selected":t[92]?"true":"false"}),524296&n[0]&&(l.customAction=null!==(s=t[3])&&void 0!==s&&s.fakeElement?null:a),524288&n[0]|4&n[3]&&(l.$$scope={dirty:n,ctx:t}),i.$set(l)},i(t){o||(Pt(i.$$.fragment,t),o=!0)},o(t){Dt(i.$$.fragment,t),o=!1},d(t){Ut(i,t)}}}function ui(t){let e,n,r;return{c(){e=M("div"),L(e,"class",n=Qr.tabs__separator),L(e,"style",r=ne(t[36]))},m(t,n){N(t,e,n)},p(t,n){32&n[1]&&r!==(r=ne(t[36]))&&L(e,"style",r)},d(t){t&&O(e)}}}function di(t){let e,n;return e=new Ha({props:{div:t[18][t[89]].div,templateContext:t[1],layoutParams:t[5]}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};786432&n[0]&&(r.div=t[18][t[89]].div),2&n[0]&&(r.templateContext=t[1]),32&n[0]&&(r.layoutParams=t[5]),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function pi(t){let e,n,r,i,o,a,s=t[30][t[89]]&&di(t);return{c(){e=M("div"),s&&s.c(),n=J(),L(e,"class",r=we("tabs__panel",Qr,{visible:t[31][t[89]]})),L(e,"role","tabpanel"),L(e,"id",i=t[44]+"-panel-"+t[89]),L(e,"aria-labelledby",o=t[44]+"-tab-"+t[89]),K(e,"left",100*t[89]+"%")},m(t,r){N(t,e,r),s&&s.m(e,null),D(e,n),a=!0},p(t,l){t[30][t[89]]?s?(s.p(t,l),1074266112&l[0]&&Pt(s,1)):(s=di(t),s.c(),Pt(s,1),s.m(e,n)):s&&(Vt(),Dt(s,1,1,(()=>{s=null})),jt()),(!a||524288&l[0]|1&l[1]&&r!==(r=we("tabs__panel",Qr,{visible:t[31][t[89]]})))&&L(e,"class",r),(!a||524288&l[0]&&i!==(i=t[44]+"-panel-"+t[89]))&&L(e,"id",i),(!a||524288&l[0]&&o!==(o=t[44]+"-tab-"+t[89]))&&L(e,"aria-labelledby",o),(!a||524288&l[0])&&K(e,"left",100*t[89]+"%")},i(t){a||(Pt(s),a=!0)},o(t){Dt(s),a=!1},d(t){t&&O(e),s&&s.d()}}}function fi(t){let e,n,r,i,o,a,c,u,d,p,f,g=Nt(t[19]),h=[];for(let e=0;e<g.length;e+=1)h[e]=ci(ai(t,g,e));const m=t=>Dt(h[t],1,1,(()=>{h[t]=null}));let v=t[20]&&ui(t),y=Nt(t[19]),$=[];for(let e=0;e<y.length;e+=1)$[e]=pi(oi(t,y,e));const b=t=>Dt($[t],1,1,(()=>{$[t]=null}));return{c(){e=M("div");for(let t=0;t<h.length;t+=1)h[t].c();r=J(),v&&v.c(),i=J(),o=M("div"),a=M("div");for(let t=0;t<$.length;t+=1)$[t].c();L(e,"class",n=Qr.tabs__list+" "+(t[43]?Yt["root_restrict-scroll"]:"")),L(e,"role","tablist"),K(e,"--divkit-tabs-title-padding",t[17]?ke(t[17]):""),K(e,"--divkit-tabs-font-size",re(t[7])),K(e,"--divkit-tabs-paddings",t[8]),K(e,"--divkit-tabs-line-height",t[24]),K(e,"--divkit-tabs-letter-spacing",t[25]),K(e,"--divkit-tabs-active-font-weight",t[10]||""),K(e,"--divkit-tabs-inactive-font-weight",t[11]||""),K(e,"--divkit-tabs-active-font-family",t[26]||""),K(e,"--divkit-tabs-inactive-font-family",t[27]||""),K(e,"--divkit-tabs-active-text-color",t[12]),K(e,"--divkit-tabs-inactive-text-color",t[13]),K(e,"--divkit-tabs-active-background-color",t[14]),K(e,"--divkit-tabs-inactive-background-color",t[15]),K(e,"--divkit-tabs-border-radius",t[9]),K(e,"--divkit-tabs-items-spacing",t[16]?ie(t[16]):""),L(a,"class",c=we("tabs__swiper",Qr,{inited:t[28],animated:t[29]})),L(o,"class",u=Qr.tabs__panels+" "+(t[43]?Yt["root_restrict-scroll"]:""))},m(n,s){N(n,e,s);for(let t=0;t<h.length;t+=1)h[t]&&h[t].m(e,null);t[65](e),N(n,r,s),v&&v.m(n,s),N(n,i,s),N(n,o,s),D(o,a);for(let t=0;t<$.length;t+=1)$[t]&&$[t].m(a,null);t[66](a),t[67](o),d=!0,p||(f=[B(e,"keydown",t[48]),B(a,"touchstart",(function(){l(t[34]?t[49]:void 0)&&(t[34]?t[49]:void 0).apply(this,arguments)})),B(a,"touchmove",(function(){l(t[34]?t[50]:void 0)&&(t[34]?t[50]:void 0).apply(this,arguments)})),B(a,"touchend",(function(){l(t[34]?t[51]:void 0)&&(t[34]?t[51]:void 0).apply(this,arguments)})),B(a,"touchcancel",(function(){l(t[34]?t[51]:void 0)&&(t[34]?t[51]:void 0).apply(this,arguments)}))],p=!0)},p(r,s){if(t=r,524360&s[0]|73728&s[1]){let n;for(g=Nt(t[19]),n=0;n<g.length;n+=1){const r=ai(t,g,n);h[n]?(h[n].p(r,s),Pt(h[n],1)):(h[n]=ci(r),h[n].c(),Pt(h[n],1),h[n].m(e,null))}for(Vt(),n=g.length;n<h.length;n+=1)m(n);jt()}if((!d||4096&s[1]&&n!==(n=Qr.tabs__list+" "+(t[43]?Yt["root_restrict-scroll"]:"")))&&L(e,"class",n),131072&s[0]&&K(e,"--divkit-tabs-title-padding",t[17]?ke(t[17]):""),128&s[0]&&K(e,"--divkit-tabs-font-size",re(t[7])),256&s[0]&&K(e,"--divkit-tabs-paddings",t[8]),16777216&s[0]&&K(e,"--divkit-tabs-line-height",t[24]),33554432&s[0]&&K(e,"--divkit-tabs-letter-spacing",t[25]),1024&s[0]&&K(e,"--divkit-tabs-active-font-weight",t[10]||""),2048&s[0]&&K(e,"--divkit-tabs-inactive-font-weight",t[11]||""),67108864&s[0]&&K(e,"--divkit-tabs-active-font-family",t[26]||""),134217728&s[0]&&K(e,"--divkit-tabs-inactive-font-family",t[27]||""),4096&s[0]&&K(e,"--divkit-tabs-active-text-color",t[12]),8192&s[0]&&K(e,"--divkit-tabs-inactive-text-color",t[13]),16384&s[0]&&K(e,"--divkit-tabs-active-background-color",t[14]),32768&s[0]&&K(e,"--divkit-tabs-inactive-background-color",t[15]),512&s[0]&&K(e,"--divkit-tabs-border-radius",t[9]),65536&s[0]&&K(e,"--divkit-tabs-items-spacing",t[16]?ie(t[16]):""),t[20]?v?v.p(t,s):(v=ui(t),v.c(),v.m(i.parentNode,i)):v&&(v.d(1),v=null),1074528290&s[0]|8193&s[1]){let e;for(y=Nt(t[19]),e=0;e<y.length;e+=1){const n=oi(t,y,e);$[e]?($[e].p(n,s),Pt($[e],1)):($[e]=pi(n),$[e].c(),Pt($[e],1),$[e].m(a,null))}for(Vt(),e=y.length;e<$.length;e+=1)b(e);jt()}(!d||805306368&s[0]&&c!==(c=we("tabs__swiper",Qr,{inited:t[28],animated:t[29]})))&&L(a,"class",c),(!d||4096&s[1]&&u!==(u=Qr.tabs__panels+" "+(t[43]?Yt["root_restrict-scroll"]:"")))&&L(o,"class",u)},i(t){if(!d){for(let t=0;t<g.length;t+=1)Pt(h[t]);for(let t=0;t<y.length;t+=1)Pt($[t]);d=!0}},o(t){h=h.filter(ii);for(let t=0;t<h.length;t+=1)Dt(h[t]);$=$.filter(ii);for(let t=0;t<$.length;t+=1)Dt($[t]);d=!1},d(n){n&&(O(e),O(r),O(i),O(o)),I(h,n),t[65](null),v&&v.d(n),I($,n),t[66](null),t[67](null),p=!1,s(f)}}}function gi(t){let e,n,r=!t[4]&&si(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[4]?r&&(Vt(),Dt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),16&n[0]&&Pt(r,1)):(r=si(t),r.c(),Pt(r,1),r.m(e.parentNode,e))},i(t){n||(Pt(r),n=!0)},o(t){Dt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function hi(t,e,r){let i,o,a,s,l,c,u,d,g,h,m,v,y,$,b,_,w,x,k,E,C,A,V,j=n,P=n,D=n,F=n,S=n,N=n,O=n,I=n,M=n;var T,z;t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>F())),t.$$.on_destroy.push((()=>S())),t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>M()));let{json:J={}}=e,{templateContext:R}=e,{origJson:B}=e,{layoutParams:L}=e;const U=lt(Zt),W=U.genId("tabs");let H=!1,q=Kt([]);f(t,q,(t=>r(19,$=t)));let G,K,X,Y={};const Z=U.getJsonWithVars(J.selected_tab);let Q,tt,et=Z&&Number(Z)||0,nt=12,rt="",it="",ot="",st="",ct="",ut="",pt="",ft="",gt="",ht="",mt=0,yt="",$t="",bt=null,_t=!1,wt=!1,xt=et,kt=[],Et=[];async function Ct(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(xt=et,r(6,et=t),St(),r(29,wt=!0),jt(100*-et),Pt(),async function(){await vt();const t=document.getElementById("".concat(W,"-panel-").concat(et));t&&r(22,K.style.height=re(t.offsetHeight),K)}(),Ft(),It=-et*K.clientWidth,e){await vt();const t=G.querySelector(".".concat(Qr.tabs__item_selected));t&&t.focus()}}function At(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=null==$?void 0:$.length;if(!n)return;const r=$.map((t=>t.index));let i=r.indexOf(et)+t;i>=n?i=0:i<0&&(i=n-1),Ct(r[i],e)}function Vt(t,e){return et===e||(Ct(e),!1)}async function jt(t){await vt(),r(23,X.style.transform="translate3d(".concat(t,"%,0,0)"),X)}function Pt(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=t?Math.max(0,et-1):Math.min(et,xt),n=t?Math.min(i.length-1,et+1):Math.max(et,xt);r(30,kt=kt.map(((t,r)=>t||r>=e&&r<=n))),r(31,Et=Et.map(((t,r)=>r>=e&&r<=n)))}let Dt=null;function Ft(){Dt&&clearTimeout(Dt),Dt=window.setTimeout((()=>{r(31,Et=i.map(((t,e)=>e===et)))}),400)}function St(){_t||(r(28,_t=!0),r(22,K.style.height=re(K.clientHeight),K),r(23,X.style.transform="translate3d(".concat(100*-xt,"%,0,0)"),X))}let Nt,Ot,It,Mt=null,Tt=null,zt=!1,Jt=!1;return!J.id||H||(null==L?void 0:L.fakeElement)||U.registerInstance(J.id,{setCurrentItem(t){if(t<0||t>i.length-1)throw new Error('Item is out of range in "set-current-item" action');Ct(t)},setPreviousItem(t){let e=et-1;e<0&&(e="ring"===t?i.length-1:et),Ct(e)},setNextItem(t){let e=et+1;e>i.length-1&&(e="ring"===t?0:et),Ct(e)}}),at((()=>{J.id&&!(null==L?void 0:L.fakeElement)&&U.unregisterInstance(J.id)})),t.$$set=t=>{"json"in t&&r(0,J=t.json),"templateContext"in t&&r(1,R=t.templateContext),"origJson"in t&&r(2,B=t.origJson),"layoutParams"in t&&r(3,L=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(18,i=J.items||[]),262144&t.$$.dirty[0])if(Array.isArray(i)&&i.length){let t=[];i.forEach(((e,n)=>{const r=U.getJsonWithVars({index:n,title:e.title,title_click_action:e.title_click_action});r.title&&"string"==typeof r.title?t.push(r):U.logError(Qt(new Error("Incorrect title for the tab"),{additional:{index:n}}))})),q.set(t)}else q.set([]);if(524288&t.$$.dirty[0]&&((null==$?void 0:$.length)?r(4,H=!1):(r(4,H=!0),U.logError(Qt(new Error('Incorrect or empty "items" prop for div "tabs"'))))),1&t.$$.dirty[0]&&(r(42,o=U.getDerivedFromVars(J.width)),I(),I=p(o,(t=>r(63,A=t)))),1&t.$$.dirty[0]&&(r(41,a=U.getDerivedFromVars(J.height)),O(),O=p(a,(t=>r(62,C=t)))),40&t.$$.dirty[0]|3&t.$$.dirty[2]){let t={};(null==L?void 0:L.fakeElement)&&(t.fakeElement=!0),"wrap_content"===(null==A?void 0:A.type)&&(t.parentHorizontalWrapContent=!0),C&&"wrap_content"!==C.type||(t.parentVerticalWrapContent=!0),r(5,Y=De(t,Y))}if(262225&t.$$.dirty[0]&&!H&&(et<0||et>=i.length)&&(U.logError(Qt(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:J.selected_tab,length:i.length}})),r(6,et=et<0?0:i.length-1)),524369&t.$$.dirty[0]|2097152&t.$$.dirty[1]&&(H||$.some((t=>et===t.index))||(U.logError(Qt(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:J.selected_tab}})),r(6,et=(null===r(52,T=$[0])||void 0===T?void 0:T.index)||0))),1&t.$$.dirty[0]&&(r(40,s=U.getDerivedFromVars(J.tab_title_style)),N(),N=p(s,(t=>r(61,E=t)))),1073741824&t.$$.dirty[1]&&r(56,l=E||{}),128&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(7,nt=fn(l.font_size,nt)),384&t.$$.dirty[0]|33554432&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)/nt*10,right:(Number(t.right)||0)/nt*10,bottom:(Number(t.bottom)||0)/nt*10,left:(Number(t.left)||0)/nt*10};r(8,rt=Ae(e,rt))}if(128&t.$$.dirty[0]|33554432&t.$$.dirty[1]){const t=l.line_height;void 0!==t&&He(t)&&r(24,it=re(t/nt*10))}if(128&t.$$.dirty[0]|33554432&t.$$.dirty[1]){const t=l.letter_spacing;void 0!==t&&Ce(t)&&r(25,ot=re(t/nt*10))}if(640&t.$$.dirty[0]|37748736&t.$$.dirty[1]&&(l.corner_radius||l.corners_radius||l.font_size)){const t=null!==r(53,z=l.corner_radius)&&void 0!==z?z:1e3;l.corners_radius?r(9,st=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 Ie(t,e,n)}(l.corners_radius,t,nt,st)):Ce(t)&&r(9,st=re(t/nt*10))}1024&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&(r(10,Q=hn(l.active_font_weight||l.font_weight,Q)),l.font_family&&"string"==typeof l.font_family?r(26,ct=U.typefaceProvider(l.font_family,{fontWeight:Q||400})):r(26,ct="")),2048&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&(r(11,tt=hn(l.inactive_font_weight||l.font_weight,tt)),l.font_family&&"string"==typeof l.font_family?r(27,ut=U.typefaceProvider(l.font_family,{fontWeight:tt||400})):r(27,ut="")),4096&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(12,pt=ae(l.active_text_color,1,pt)),8192&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(13,ft=ae(l.inactive_text_color,1,ft)),16384&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(14,gt=ae(l.active_background_color,1,gt)),32768&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(15,ht=ae(l.inactive_background_color,1,ht)),65536&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(16,mt=Ve(l.item_spacing,mt)),1&t.$$.dirty[0]&&(r(39,c=U.getDerivedFromVars(J.has_separator)),S(),S=p(c,(t=>r(20,k=t)))),1&t.$$.dirty[0]&&(r(38,u=U.getDerivedFromVars(J.separator_color)),F(),F=p(u,(t=>r(60,x=t)))),1&t.$$.dirty[0]&&(r(37,d=U.getDerivedFromVars(J.separator_paddings)),D(),D=p(d,(t=>r(59,w=t)))),1048576&t.$$.dirty[0]|830472192&t.$$.dirty[1]&&k&&(x&&r(54,yt=ae(x,1,yt)),w&&r(55,$t=Ae(w,$t))),25165824&t.$$.dirty[1]&&r(36,g={background:yt,margin:$t}),1&t.$$.dirty[0]&&(r(35,h=U.getDerivedFromVars(J.switch_tabs_by_content_swipe_enabled)),P(),P=p(h,(t=>r(58,_=t)))),134217728&t.$$.dirty[1]&&r(34,m=void 0===_||Boolean(_)),1&t.$$.dirty[0]&&(r(33,v=U.getDerivedFromVars(J.restrict_parent_scroll)),M(),M=p(v,(t=>r(43,V=t)))),1&t.$$.dirty[0]&&(r(32,y=U.getDerivedFromVars(J.title_paddings)),j(),j=p(y,(t=>r(57,b=t)))),131072&t.$$.dirty[0]|67108864&t.$$.dirty[1]&&r(17,bt=Oe(b||void 0,bt)),262144&t.$$.dirty[0]&&(H||(r(30,kt=i.map(((t,e)=>e===et))),r(31,Et=i.map(((t,e)=>e===et)))))},[J,R,B,L,H,Y,et,nt,rt,st,Q,tt,pt,ft,gt,ht,mt,bt,i,$,k,G,K,X,it,ot,ct,ut,_t,wt,kt,Et,y,v,m,h,g,d,u,c,s,a,o,V,W,q,{},Vt,function(t){if(!(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)&&i){if(t.which===ti)At(-1,!0);else if(t.which===ei)At(1,!0);else if(t.which===ni)Ct(0,!0);else{if(t.which!==ri)return;Ct(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(Yt["root_restrict-scroll"]));i.length<2||t.touches.length>1||o&&o!==K||(zt=!1,Jt=!1,Mt=ze(t),Tt=null,Nt=Date.now(),Ot=It||-et*K.clientWidth,r(29,wt=!1),Dt&&clearTimeout(Dt))},function(t){const e=ze(t);if(!Mt||Tt&&Tt.x===e.x&&Tt.y===e.y)return;Tt=e;const n=K.clientWidth;if(zt){It=e.x-Mt.x+Ot;const t=n*i.length;if(It>0)It=It*n/(It+3*n);else if(-It+n>t){let e=-It+n-t;e=e*n/(e+3*n),It=n-t-e}jt(100*It/n)}else Math.abs(e.y-Mt.y)>10?Jt=!0:!Jt&&Math.abs(e.x-Mt.x)>8&&(St(),zt=!0,Mt=e,jt(100*-et),Pt(!0));zt&&t.cancelable&&t.preventDefault()},function(){Jt=!1,Mt=null;let t=et;if(!zt)return;zt=!1;const e=Math.min(512,K.clientWidth);Math.abs(Ot-It)>e/4*Math.min(1,(Date.now()-Nt)/750)&&(t+=Ot>It?1:-1),t>=i.length?t=i.length-1:t<0&&(t=0),t===et?(It=-t*e,jt(100*-t),Ft()):Ct(t)},T,z,yt,$t,l,b,_,w,x,E,C,A,(t,e)=>Vt(0,t),function(t){dt[t?"unshift":"push"]((()=>{G=t,r(21,G)}))},function(t){dt[t?"unshift":"push"]((()=>{X=t,r(23,X)}))},function(t){dt[t?"unshift":"push"]((()=>{K=t,r(22,K)}))}]}const mi={state:"divkit-b8efc",state__animations:"divkit-adaae","state__animation-child":"divkit-eb860","state__animation-child-inner":"divkit-e08c6"};function vi(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function yi(t){return t*t*t}function $i(t){const e=t-1;return e*e*e+1}function bi(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 _i=bi([.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]),wi=bi([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]),xi={linear:r,ease:_i,ease_in:yi,ease_out:$i,ease_in_out:vi,spring:wi},ki=200,Ei=0,Ci=0,Ai=0;function Vi(t){return Math.max(...t.map((t=>(Number(t.duration)||ki)+(Number(t.start_delay)||Ei))))}function ji(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)||Ei,a=Number(t.duration)||ki,s=Math.max(0,Math.min(1,(e-n)/a)),c="in"===o?1-s:s,u=(xi[t.interpolator||"ease_in_out"]||vi)(c);if("fade"===t.type)return u>=1?{active:!1,opacity:0}:{active:u>0&&u<1,opacity:(1-u)*l+u*(t.alpha||Ci)};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||Ai),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 Pi(t,e,n){return t*(1-n)+e*n}const Di={linear:r,ease:_i,ease_in:yi,ease_out:$i,ease_in_out:vi,spring:wi},Fi=200,Si=0;function Ni(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:Fi,easing:s.interpolator&&s.interpolator in Di?Di[s.interpolator]:vi,css:t=>["top:".concat(Pi(o.top,a.top,t)-i.top,"px"),"left:".concat(Pi(o.left,a.left,t)-i.left,"px"),"width:".concat(Pi(o.width,a.width,t),"px"),"height:".concat(Pi(o.height,a.height,t),"px")].join(";")}}function Oi(t){const e=[];return"set"===t.type?(t.items||[]).forEach((t=>{e.push(...Oi(t))})):e.push(t),e}const Ii={tooltip:"divkit-f1907",tooltip_visible:"divkit-e5914"},Mi={linear:r,ease:_i,ease_in:yi,ease_out:$i,ease_in_out:vi,spring:wi},Ti=300,zi=0;function Ji(t,e){let{animations:n,direction:r}=e;if(!n)return{};const i=Ne(n),o=(a=i,Math.max(...a.map((t=>(Number(t.duration)||Ti)+(Number(t.start_delay)||zi)))));var a;return i.some((t=>"no_animation"===t.name))?{}:{duration:o,css:t=>{const e=t*o,n=i.map((t=>{const n=Number(t.start_delay)||zi,i=Number(t.duration)||Ti,o=Math.max(0,Math.min(1,(e-n)/i)),a=(Mi[t.interpolator||"ease_in_out"]||vi)(o);var s,l;if("fade"===t.name)return{active:a>0&&a<1,opacity:(1-a)*("in"===r&&null!==(s=t.start_value)&&void 0!==s?s:0)+a*("in"===r?1:null!==(l=t.end_value)&&void 0!==l?l:1)};if("translate"===t.name){var c,u;const e=-("in"===r&&null!==(c=t.start_value)&&void 0!==c?c:10),n=-("in"===r?0:null!==(u=t.end_value)&&void 0!==u?u:0);return{active:a>0&&a<1,translate:"translateY(".concat((1-a)*e+a*n).concat("in"===r&&void 0!==t.start_value||"out"===r&&void 0!==t.end_value?"%":"px",")")}}if("scale"===t.name){var d,p;const e="in"===r&&null!==(d=t.start_value)&&void 0!==d?d:0,n="in"===r?1:null!==(p=t.end_value)&&void 0!==p?p:1;return{active:a>0&&a<1,scale:"scale(".concat((1-a)*e+a*n,")")}}return{}})),a=n.map((t=>t.opacity)).filter((t=>void 0!==t)).reduce(((t,e)=>t*e),1),s=n.map((t=>t.translate)).filter((t=>void 0!==t)).join(" "),l=n.map((t=>t.scale)).filter((t=>void 0!==t)).join(" "),c=n.filter((t=>t.active)).map((t=>t.scale)).filter((t=>void 0!==t)),u=[s,c.length?c[c.length-1]:l].filter(Boolean).join(" ");return"transform:".concat(u||"none",";opacity:").concat(a)}}}const{window:Ri}=A;function Bi(t){let e,i,o,a,c,u,d,p;return i=new Ha({props:{div:t[0].div,templateContext:t[1]}}),{c(){e=M("div"),Bt(i.$$.fragment),L(e,"class",o=we("tooltip",Ii,t[7])+" "+(t[14]?Yt.root_platform_desktop:"")),K(e,"top",t[4]),K(e,"left",t[3]),K(e,"width",t[5]),K(e,"height",t[6])},m(n,r){N(n,e,r),Lt(i,e,null),t[27](e),u=!0,d||(p=[B(Ri,"click",t[18]),B(Ri,"resize",t[19])],d=!0)},p(n,r){t=n;const a={};1&r[0]&&(a.div=t[0].div),2&r[0]&&(a.templateContext=t[1]),i.$set(a),(!u||16512&r[0]&&o!==(o=we("tooltip",Ii,t[7])+" "+(t[14]?Yt.root_platform_desktop:"")))&&L(e,"class",o),16&r[0]&&K(e,"top",t[4]),8&r[0]&&K(e,"left",t[3]),32&r[0]&&K(e,"width",t[5]),64&r[0]&&K(e,"height",t[6])},i(n){u||(Pt(i.$$.fragment,n),n&&yt((()=>{u&&(c&&c.end(1),a=St(e,Ji,{animations:t[15]||t[17],direction:"in"}),a.start())})),u=!0)},o(o){Dt(i.$$.fragment,o),a&&a.invalidate(),o&&(c=function(t,e,i){const o={direction:"out"};let a,c=e(t,i,o),u=!0;const d=At;let p;function f(){const{delay:e=0,duration:i=300,easing:o=r,tick:l=n,css:f}=c||Ft;f&&(a=et(t,1,0,i,e,o,f));const g=w()+e,h=g+i;yt((()=>Et(t,!1,"start"))),"inert"in t&&(p=t.inert,t.inert=!0),C((e=>{if(u){if(e>=h)return l(0,1),Et(t,!1,"end"),--d.r||s(d.c),!1;if(e>=g){const t=o((e-g)/i);l(1-t,t)}}return u}))}return d.r+=1,l(c)?kt().then((()=>{c=c(o),f()})):f(),{end(e){e&&"inert"in t&&(t.inert=p),e&&c.tick&&c.tick(1,0),u&&(a&&nt(t,a),u=!1)}}}(e,Ji,{animations:t[16]||t[17],direction:"out"})),u=!1},d(n){n&&O(e),Ut(i),t[27](null),n&&c&&c.end(),d=!1,s(p)}}}function Li(t,e,r){let i,o,a,s,l,c,u,d,f,g,h,m,v,y=n,$=n,b=n,_=n,w=n,x=n;var k,E,C,A;t.$$.on_destroy.push((()=>y())),t.$$.on_destroy.push((()=>$())),t.$$.on_destroy.push((()=>b())),t.$$.on_destroy.push((()=>_())),t.$$.on_destroy.push((()=>w())),t.$$.on_destroy.push((()=>x()));let{ownerNode:V}=e,{data:j}=e,{internalId:P}=e,{templateContext:D}=e;const F=lt(Zt),S=Date.now();let N,O=!1,I="",M="",T="",z="",J=null;function R(){var t,e;if(!N||!V)return;const n=N.parentElement;if(!n)return;const i=N.style.cssText;r(2,N.style.cssText+=";transform: none !important",N);const o=V.getBoundingClientRect(),a=N.getBoundingClientRect(),s=n.getBoundingClientRect();r(2,N.style.cssText=i,N);let l=0,c=0,u=null,p=null,h=0,m=0;const v=F.getJsonWithVars(null===(t=j.div)||void 0===t?void 0:t.width),y=F.getJsonWithVars(null===(e=j.div)||void 0===e?void 0:e.width);if(h=v&&"match_parent"!==v.type?"fixed"===v.type&&v.value?u=v.value:a.width:u=o.width,m="match_parent"===(null==y?void 0:y.type)?p=o.height:"fixed"===(null==y?void 0:y.type)&&y.value?p=y.value:a.height,"left"===g||"bottom-left"===g||"top-left"===g)l=o.left-h;else if("top"===g||"bottom"===g||"center"===g)l=(o.left+o.right)/2-h/2;else{if("right"!==g&&"bottom-right"!==g&&"top-right"!==g)return;l=o.right}if("top"===g||"top-left"===g||"top-right"===g)c=o.top-m;else if("left"===g||"right"===g||"center"===g)c=(o.top+o.bottom)/2-m/2;else{if("bottom-left"!==g&&"bottom"!==g&&"bottom-right"!==g)return;c=o.bottom}l-=s.left,c-=s.top,l+=f||0,c+=d||0,r(3,I="".concat(l,"px")),r(4,M="".concat(c,"px")),r(5,T=null!==u?"".concat(u,"px"):""),r(6,z=null!==p?"".concat(p,"px"):""),r(26,O=!0),null===u||null===p?"undefined"==typeof ResizeObserver||J||(J=new ResizeObserver((()=>{requestAnimationFrame(R)})),J.observe(N)):null==J||J.disconnect()}var B;return ot((()=>{if(F.tooltipRoot){const t=window.getComputedStyle(N);r(2,N.style.fontSize=t.fontSize,N),r(2,N.style.fontFamily=t.fontFamily,N),r(2,N.style.lineHeight=t.lineHeight,N),F.tooltipRoot.appendChild(N)}})),B=()=>{O||R()},it().$$.after_update.push(B),at((()=>{null==J||J.disconnect()})),t.$$set=t=>{"ownerNode"in t&&r(20,V=t.ownerNode),"data"in t&&r(0,j=t.data),"internalId"in t&&r(21,P=t.internalId),"templateContext"in t&&r(1,D=t.templateContext)},t.$$.update=()=>{1&t.$$.dirty[0]&&(r(12,o=F.getDerivedFromVars(j.position)),b(),b=p(o,(t=>r(31,g=t)))),12582913&t.$$.dirty[0]&&(r(11,a=F.getDerivedFromVars(null===r(23,E=null===r(22,k=j.offset)||void 0===k?void 0:k.x)||void 0===E?void 0:E.value)),$(),$=p(a,(t=>r(30,f=t)))),50331649&t.$$.dirty[0]&&(r(10,s=F.getDerivedFromVars(null===r(25,A=null===r(24,C=j.offset)||void 0===C?void 0:C.y)||void 0===A?void 0:A.value)),y(),y=p(s,(t=>r(29,d=t)))),1&t.$$.dirty[0]&&(r(9,l=F.getDerivedFromVars(j.animation_in)),w(),w=p(l,(t=>r(15,m=t)))),1&t.$$.dirty[0]&&(r(8,c=F.getDerivedFromVars(j.animation_out)),x(),x=p(c,(t=>r(16,v=t)))),67108864&t.$$.dirty[0]&&r(7,u={visible:O})},r(13,i=F.isDesktop),_(),_=p(i,(t=>r(14,h=t))),[j,D,N,I,M,T,z,u,c,l,s,a,o,i,h,m,v,{name:"set",items:[{name:"translate"},{name:"fade"}]},function(t){Date.now()-S<100||t.composedPath().includes(N)||F.onTooltipClose(P)},function(){R()},V,P,k,E,C,A,O,function(t){dt[t?"unshift":"push"]((()=>{N=t,r(2,N)}))}]}const Ui=class extends qt{constructor(t){super(),Wt(this,t,Li,Bi,d,{ownerNode:20,data:0,internalId:21,templateContext:1},null,[-1,-1])}},{Map:Wi}=A;function Hi(t,e,n){const r=t.slice();return r[30]=e[n],r}function qi(t,e,n){const r=t.slice();return r[30]=e[n],r}function Gi(t){var e;let n,r,i,o;n=new dn({props:{cls:mi.state,json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[to]},$$scope:{ctx:t}}});let a=(null===(e=t[3])||void 0===e?void 0:e.tooltips)&&eo(t);return{c(){Bt(n.$$.fragment),r=J(),a&&a.c(),i=R()},m(t,e){Lt(n,t,e),N(t,r,e),a&&a.m(t,e),N(t,i,e),o=!0},p(t,e){var r;const o={};1&e[0]&&(o.json=t[0]),4&e[0]&&(o.origJson=t[2]),2&e[0]&&(o.templateContext=t[1]),8&e[0]&&(o.layoutParams=t[3]),210&e[0]|16&e[1]&&(o.$$scope={dirty:e,ctx:t}),n.$set(o),null!==(r=t[3])&&void 0!==r&&r.tooltips?a?(a.p(t,e),8&e[0]&&Pt(a,1)):(a=eo(t),a.c(),Pt(a,1),a.m(i.parentNode,i)):a&&(Vt(),Dt(a,1,1,(()=>{a=null})),jt())},i(t){o||(Pt(n.$$.fragment,t),Pt(a),o=!0)},o(t){Dt(n.$$.fragment,t),Dt(a),o=!1},d(t){t&&(O(r),O(i)),Ut(n,t),a&&a.d(t)}}}function Ki(t){let e,r,i=t[7],o=Xi(t);return{c(){o.c(),e=R()},m(t,n){o.m(t,n),N(t,e,n),r=!0},p(t,r){128&r[0]&&d(i,i=t[7])?(Vt(),Dt(o,1,1,n),jt(),o=Xi(t),o.c(),Pt(o,1),o.m(e.parentNode,e)):o.p(t,r)},i(t){r||(Pt(o),r=!0)},o(t){Dt(o),r=!1},d(t){t&&O(e),o.d(t)}}}function Xi(t){let e,n;return e=new Ha({props:{div:t[7].div,templateContext:t[1]}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};128&n[0]&&(r.div=t[7].div),2&n[0]&&(r.templateContext=t[1]),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function Yi(t){let e,n,r,i,o,a,s,l,c,u;function d(){return t[11](t[30])}return r=new Ha({props:{div:t[30].json,templateContext:t[30].templateContext,layoutParams:{fakeElement:!0}}}),{c(){e=M("div"),n=M("div"),Bt(r.$$.fragment),o=J(),L(n,"class",i=mi["state__animation-child-inner"]),L(e,"class",a=mi["state__animation-child"])},m(t,i){N(t,e,i),D(e,n),Lt(r,n,null),D(e,o),l=!0,c||(u=B(e,"introend",d),c=!0)},p(e,n){t=e;const i={};64&n[0]&&(i.div=t[30].json),64&n[0]&&(i.templateContext=t[30].templateContext),r.$set(i)},i(n){l||(Pt(r.$$.fragment,n),s||yt((()=>{s=St(e,Ni,t[30]),s.start()})),l=!0)},o(t){Dt(r.$$.fragment,t),l=!1},d(t){t&&O(e),Ut(r),c=!1,u()}}}function Zi(t){let e,n,r,i,o,a,s,l,c,u,d="".concat(t[30].offsetLeft,"px"),p="".concat(t[30].offsetTop,"px"),f="".concat(t[30].width,"px"),g="".concat(t[30].height,"px");function h(){return t[10](t[30])}return r=new Ha({props:{div:t[30].json,templateContext:t[30].templateContext,layoutParams:{fakeElement:!0}}}),{c(){e=M("div"),n=M("div"),Bt(r.$$.fragment),o=J(),L(n,"class",i=mi["state__animation-child-inner"]),L(e,"class",a=mi["state__animation-child"]),K(e,"left",d),K(e,"top",p),K(e,"width",f),K(e,"height",g)},m(t,i){N(t,e,i),D(e,n),Lt(r,n,null),D(e,o),l=!0,c||(u=B(e,"introend",h),c=!0)},p(n,i){t=n;const o={};64&i[0]&&(o.div=t[30].json),64&i[0]&&(o.templateContext=t[30].templateContext),r.$set(o),64&i[0]&&d!==(d="".concat(t[30].offsetLeft,"px"))&&K(e,"left",d),64&i[0]&&p!==(p="".concat(t[30].offsetTop,"px"))&&K(e,"top",p),64&i[0]&&f!==(f="".concat(t[30].width,"px"))&&K(e,"width",f),64&i[0]&&g!==(g="".concat(t[30].height,"px"))&&K(e,"height",g)},i(n){l||(Pt(r.$$.fragment,n),s||yt((()=>{s=St(e,ji,t[30]),s.start()})),l=!0)},o(t){Dt(r.$$.fragment,t),l=!1},d(t){t&&O(e),Ut(r),c=!1,u()}}}function Qi(t,e){let n,r,i,o,a;const s=[Zi,Yi],l=[];function c(t,e){return"direction"in t[30]?0:1}return r=c(e),i=l[r]=s[r](e),{key:t,first:null,c(){n=R(),i.c(),o=R(),this.first=n},m(t,e){N(t,n,e),l[r].m(t,e),N(t,o,e),a=!0},p(t,n){let a=r;r=c(e=t),r===a?l[r].p(e,n):(Vt(),Dt(l[a],1,1,(()=>{l[a]=null})),jt(),i=l[r],i?i.p(e,n):(i=l[r]=s[r](e),i.c()),Pt(i,1),i.m(o.parentNode,o))},i(t){a||(Pt(i),a=!0)},o(t){Dt(i),a=!1},d(t){t&&(O(n),O(o)),l[r].d(t)}}}function to(t){var e;let n,r,i,o,a=[],s=new Wi,l=(null===(e=t[7])||void 0===e?void 0:e.div)&&Ki(t),c=Nt(t[6]);const u=t=>t[30];for(let e=0;e<c.length;e+=1){let n=qi(t,c,e),r=u(n);s.set(r,a[e]=Qi(r,n))}return{c(){l&&l.c(),n=J(),r=M("div");for(let t=0;t<a.length;t+=1)a[t].c();L(r,"class",i=mi.state__animations),L(r,"aria-hidden","true")},m(e,i){l&&l.m(e,i),N(e,n,i),N(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?l?(l.p(t,e),128&e[0]&&Pt(l,1)):(l=Ki(t),l.c(),Pt(l,1),l.m(n.parentNode,n)):l&&(Vt(),Dt(l,1,1,(()=>{l=null})),jt()),320&e[0]&&(c=Nt(t[6]),Vt(),a=It(a,e,u,1,t,c,s,r,Ot,Qi,null,qi),jt())},i(t){if(!o){Pt(l);for(let t=0;t<c.length;t+=1)Pt(a[t]);o=!0}},o(t){Dt(l);for(let t=0;t<a.length;t+=1)Dt(a[t]);o=!1},d(e){e&&(O(n),O(r)),l&&l.d(e);for(let t=0;t<a.length;t+=1)a[t].d();t[12](null)}}}function eo(t){var e;let n,r,i=[],o=new Wi,a=Nt(null===(e=t[3])||void 0===e?void 0:e.tooltips);const s=t=>t[30].internalId;for(let e=0;e<a.length;e+=1){let n=Hi(t,a,e),r=s(n);o.set(r,i[e]=no(r,n))}return{c(){for(let t=0;t<i.length;t+=1)i[t].c();n=R()},m(t,e){for(let n=0;n<i.length;n+=1)i[n]&&i[n].m(t,e);N(t,n,e),r=!0},p(t,e){var r;10&e[0]&&(a=Nt(null===(r=t[3])||void 0===r?void 0:r.tooltips),Vt(),i=It(i,e,s,1,t,a,o,n.parentNode,Ot,no,n,Hi),jt())},i(t){if(!r){for(let t=0;t<a.length;t+=1)Pt(i[t]);r=!0}},o(t){for(let t=0;t<i.length;t+=1)Dt(i[t]);r=!1},d(t){t&&O(n);for(let e=0;e<i.length;e+=1)i[e].d(t)}}}function no(t,e){let n,r,i;return r=new Ui({props:{ownerNode:e[30].ownerNode,data:e[30].desc,internalId:e[30].internalId,templateContext:e[1]}}),{key:t,first:null,c(){n=R(),Bt(r.$$.fragment),this.first=n},m(t,e){N(t,n,e),Lt(r,t,e),i=!0},p(t,n){e=t;const i={};8&n[0]&&(i.ownerNode=e[30].ownerNode),8&n[0]&&(i.data=e[30].desc),8&n[0]&&(i.internalId=e[30].internalId),2&n[0]&&(i.templateContext=e[1]),r.$set(i)},i(t){i||(Pt(r.$$.fragment,t),i=!0)},o(t){Dt(r.$$.fragment,t),i=!1},d(t){t&&O(n),Ut(r,t)}}}function ro(t){let e,n,r=!t[5]&&Gi(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[5]?r&&(Vt(),Dt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),32&n[0]&&Pt(r,1)):(r=Gi(t),r.c(),Pt(r,1),r.m(e.parentNode,e))},i(t){n||(Pt(r),n=!0)},o(t){Dt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function io(t){return"change_bounds"===t.type?t:"set"===t.type?io(t.items[0]):null}function oo(t,e,n){let r,{json:i={}}=e,{templateContext:o}=e,{origJson:a}=e,{layoutParams:s}=e;const l=lt(Zt),c=lt(xe);let u,d=new Map,p=new Set,f=!1,g=null,h=[],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=Oi(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;async function _(t){if(w===t)return;l.setRunning("stateChange",!0);const e=new Set(p);h.forEach((t=>{t.resolvePromise&&t.resolvePromise()})),n(6,h=[]);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?(w=t,null==C||C.setValue(w),n(7,x=o)):l.logError(Qt(new Error("Cannot find state with id"),{additional:{stateId:t}})),await vt(),!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,Vi(e.transitions))),0),g=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:io(t.transitions),resolvePromise:t.resolvePromise})));n(6,h=[...c.map((t=>Object.assign(Object.assign({},t),{maxDuration:f}))),...g]),d.clear(),l.setRunning("stateChange",!1)}let w;b?(null==s?void 0:s.fakeElement)||(c.registerInstance(b,{setState:_,getChild(t){if(g&&g.has(t))return g.get(t);l.logError(Qt(new Error("Missing state block with id"),{additional:{id:t}}))}}),st(xe,{registerInstance(t,e){g||(g=new Map),g.has(t)?l.logError(Qt(new Error("Duplicate state with id"),{additional:{id:t}})):g.set(t,e)},unregisterInstance(t){null==g||g.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=Vi(a.transitions),l=Object.assign(Object.assign({},a),{maxDuration:s});return n(6,h=[...h.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(Qt(new Error('Missing "id" prop for div "state"'))));let x=null;const k=l.getJsonWithVars(i.default_state_id),E=i.state_id_variable,C=E?l.getVariable(E,"string"):null;let A=!1;function V(t){n(6,h=h.filter((e=>e!==t))),t.resolvePromise&&t.resolvePromise()}return at((()=>{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[0]&&i&&(p=new Set),1&t.$$.dirty[0]&&n(9,r=i.states||[]),512&t.$$.dirty[0]&&((null==r?void 0:r.length)?n(5,f=!1):(n(5,f=!0),l.logError(Qt(new Error('Empty "states" prop for div "state"'))))),512&t.$$.dirty[0]&&function(t){if(!A&&(A=!0,t.length)){const e=(null==C?void 0:C.getValue())||k;e?(w=e,n(7,x=t.find((t=>t.state_id===w))||null),x||l.logError(Qt(new Error("Cannot find state for default_state_id"),{additional:{selectedId:w}}))):(n(7,x=t[0]),w=x.state_id),C&&(C.setValue(w),C.subscribe((t=>{_(t)})))}}(r)},[i,o,a,s,u,f,h,x,V,r,t=>V(t),t=>V(t),function(t){dt[t?"unshift":"push"]((()=>{u=t,n(4,u)}))}]}const ao={pager:"divkit-c5feb",pager__items:"divkit-f6987",pager__item:"divkit-feca7",pager_orientation_horizontal:"divkit-b0a1c",pager_orientation_vertical:"divkit-f772f"},{Boolean:so}=A;function lo(t,e,n){const r=t.slice();return r[49]=e[n],r}function co(t){let e,n;return e=new dn({props:{cls:we("pager",ao,t[8]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,parentOf:t[0].items,replaceItems:t[16],$$slots:{default:[fo]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=we("pager",ao,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]),1&n[0]&&(r.parentOf=t[0].items),33336&n[0]|2097152&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function uo(t){var e;let n,r,i,o,a;return r=new Ha({props:{div:t[49].json,templateContext:t[49].templateContext,origJson:t[49].origJson,layoutParams:null!==(e=t[3])&&void 0!==e&&e.fakeElement?{fakeElement:!0}:void 0}}),{c(){n=M("div"),Bt(r.$$.fragment),i=J(),L(n,"class",o=ao.pager__item)},m(t,e){N(t,n,e),Lt(r,n,null),D(n,i),a=!0},p(t,e){var n;const i={};16&e[0]&&(i.div=t[49].json),16&e[0]&&(i.templateContext=t[49].templateContext),16&e[0]&&(i.origJson=t[49].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||(Pt(r.$$.fragment,t),a=!0)},o(t){Dt(r.$$.fragment,t),a=!1},d(t){t&&O(n),Ut(r)}}}function po(t){let e,n,r=Nt(t[4]),i=[];for(let e=0;e<r.length;e+=1)i[e]=uo(lo(t,r,e));const o=t=>Dt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=R()},m(t,r){for(let e=0;e<i.length;e+=1)i[e]&&i[e].m(t,r);N(t,e,r),n=!0},p(t,n){if(24&n[0]){let a;for(r=Nt(t[4]),a=0;a<r.length;a+=1){const o=lo(t,r,a);i[a]?(i[a].p(o,n),Pt(i[a],1)):(i[a]=uo(o),i[a].c(),Pt(i[a],1),i[a].m(e.parentNode,e))}for(Vt(),a=r.length;a<i.length;a+=1)o(a);jt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)Pt(i[t]);n=!0}},o(t){i=i.filter(so);for(let t=0;t<i.length;t+=1)Dt(i[t]);n=!1},d(t){t&&O(e),I(i,t)}}}function fo(t){let e,r,i,o,a,s,l=t[4],c=po(t);return{c(){e=M("div"),c.c(),L(e,"class",r=ao.pager__items+" "+(t[15]?Yt["root_restrict-scroll"]:"")),L(e,"style",i=ne(t[9]))},m(n,r){N(n,e,r),c.m(e,null),t[37](e),o=!0,a||(s=B(e,"scroll",t[17]),a=!0)},p(t,a){16&a[0]&&d(l,l=t[4])?(Vt(),Dt(c,1,1,n),jt(),c=po(t),c.c(),Pt(c,1),c.m(e,null)):c.p(t,a),(!o||32768&a[0]&&r!==(r=ao.pager__items+" "+(t[15]?Yt["root_restrict-scroll"]:"")))&&L(e,"class",r),(!o||512&a[0]&&i!==(i=ne(t[9])))&&L(e,"style",i)},i(t){o||(Pt(c),o=!0)},o(t){Dt(c),o=!1},d(n){n&&O(e),c.d(n),t[37](null),a=!1,s()}}}function go(t){let e,n,r=!t[7]&&co(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[7]?r&&(Vt(),Dt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),128&n[0]&&Pt(r,1)):(r=co(t),r.c(),Pt(r,1),r.m(e.parentNode,e))},i(t){n||(Pt(r),n=!0)},o(t){Dt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function ho(t,e,r){let i,o,a,s,l,c,u,d,f,g,h,m,v,y,b,_,w,x=n,k=n,E=n,C=n,A=n,V=n;var j,P,D,F,S,N,O;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:I={}}=e,{templateContext:M}=e,{origJson:T}=e,{layoutParams:z}=e;const J=lt(Zt),R=J.genId("pager");let B,L=!1,U=!1,W=0,H=0,q=!1,G="horizontal",K="",X="",Y="";const Z=zr((function(){if(!L)return;const t=function(){const t=Array.from(B.children),e=B.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(26,W=t)}),50);function Q(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"smooth";const n="horizontal"===G,i=B.children[t],o=n?"offsetLeft":"offsetTop",a=n?"left":"top";B.scroll({[a]:i[o],behavior:e}),r(26,W=t)}return I.id&&!(null==z?void 0:z.fakeElement)&&J.registerInstance(I.id,{setCurrentItem(t){if(t<0||t>i.length-1)throw new Error('Item is out of range in "set-current-item" action');Q(t)},setPreviousItem(t){let e=W-1;e<0&&(e="ring"===t?i.length-1:W),Q(e)},setNextItem(t){let e=W+1;e>i.length-1&&(e="ring"===t?0:W),Q(e)}}),ot((()=>{if(L=!0,Boolean(document.getElementById("".concat(R,"-tab-0")))){const t=[...B.children];for(const[e,n]of t.entries())n.setAttribute("role","tabpanel"),n.setAttribute("id","".concat(R,"-panel-").concat(e)),n.setAttribute("aria-labelledby","".concat(R,"-tab-").concat(e))}})),at((()=>{L=!1,I.id&&!(null==z?void 0:z.fakeElement)&&J.unregisterInstance(I.id)})),t.$$set=t=>{"json"in t&&r(0,I=t.json),"templateContext"in t&&r(1,M=t.templateContext),"origJson"in t&&r(2,T=t.origJson),"layoutParams"in t&&r(3,z=t.layoutParams)},t.$$.update=()=>{if(262145&t.$$.dirty[0]&&((null===r(18,j=I.items)||void 0===j?void 0:j.length)&&Array.isArray(I.items)?r(25,U=!1):(r(25,U=!0),J.logError(Qt(new Error('Incorrect or empty "items" prop for div "pager"'))))),33554435&t.$$.dirty[0]&&r(4,i=(!U&&I.items||[]).map((t=>{let e=t,n=M;return({templateContext:n,json:e}=J.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),1&t.$$.dirty[0]&&(r(14,o=J.getDerivedFromVars(I.layout_mode)),k(),k=p(o,(t=>r(33,v=t)))),4&t.$$.dirty[1]&&(v?"percentage"!==v.type&&"fixed"!==v.type?(r(27,q=!0),J.logError(Qt(new Error('Incorrect value of "layout_mode.type" for div "pager"')))):r(27,q=!1):(r(27,q=!0),J.logError(Qt(new Error('Empty "layout_mode" prop for div "pager"'))))),1&t.$$.dirty[0]&&(r(13,a=J.getDerivedFromVars(I.orientation)),A(),A=p(a,(t=>r(36,_=t)))),268435456&t.$$.dirty[0]|32&t.$$.dirty[1]&&r(28,G=cr(_,G)),1&t.$$.dirty[0]&&(r(12,s=J.getDerivedFromVars(I.item_spacing)),C(),C=p(s,(t=>r(35,b=t)))),16&t.$$.dirty[1]){const t=null==b?void 0:b.value;t&&Ce(t)&&r(29,K=re(t||0))}if(1&t.$$.dirty[0]&&(r(11,l=J.getDerivedFromVars(I.paddings)),E(),E=p(l,(t=>r(34,y=t)))),1073741824&t.$$.dirty[0]|8&t.$$.dirty[1]&&r(30,X=Ae(y,X)),1&t.$$.dirty[0]&&(r(10,c=J.getDerivedFromVars(I.restrict_parent_scroll)),V(),V=p(c,(t=>r(15,w=t)))),268435456&t.$$.dirty[0]&&r(32,u="horizontal"===G?"grid-auto-columns":"grid-auto-rows"),838336513&t.$$.dirty[0]|4&t.$$.dirty[1])if("fixed"===(null==v?void 0:v.type)){const t=ie("horizontal"===G?((null===r(19,P=I.paddings)||void 0===P?void 0:P.left)||0)+((null===r(20,D=I.paddings)||void 0===D?void 0:D.right)||0):((null===r(21,F=I.paddings)||void 0===F?void 0:F.top)||0)+((null===r(22,S=I.paddings)||void 0===S?void 0:S.bottom)||0)),e=null===r(23,N=v.neighbour_page_width)||void 0===N?void 0:N.value;r(31,Y=e?"calc(100% + ".concat(t," - 2 * ").concat(ie(e)," - 2 * ").concat(K,")"):"100%")}else if("percentage"===(null==v?void 0:v.type)){const t=null===r(24,O=v.page_width)||void 0===O?void 0:O.value;r(31,Y="".concat(Number(t),"%"))}1610612736&t.$$.dirty[0]|3&t.$$.dirty[1]&&r(9,d={"grid-gap":K,padding:X,[u]:Y}),268435456&t.$$.dirty[0]&&r(8,f={orientation:G}),167772160&t.$$.dirty[0]&&r(7,g=U||q),67108880&t.$$.dirty[0]&&function(t,e){const n=I.id;if(n){const r=new Map(m);$(h,m=r.set(n,{instId:R,size:t,currentItem:e,scrollToPagerItem:Q}),m)}}(i.length,W),67108864&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,h=J.getStore("pagers")),x(),x=p(h,(t=>r(40,m=t))),[I,M,T,z,i,B,h,g,f,d,c,l,s,a,o,w,function(t){r(0,I=Object.assign(Object.assign({},I),{items:t}))},Z,j,P,D,F,S,N,O,U,W,q,G,K,X,Y,u,v,y,b,_,function(t){dt[t?"unshift":"push"]((()=>{B=t,r(5,B)}))}]}const mo={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 vo(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 yo(t){let e,n=Nt(Array(t[12].size)),r=[];for(let e=0;e<n.length;e+=1)r[e]=$o(vo(t,n,e));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=R()},m(t,n){for(let e=0;e<r.length;e+=1)r[e]&&r[e].m(t,n);N(t,e,n)},p(t,i){if(25169920&i[0]){let o;for(n=Nt(Array(t[12].size)),o=0;o<n.length;o+=1){const a=vo(t,n,o);r[o]?r[o].p(a,i):(r[o]=$o(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){t&&O(e),I(r,t)}}}function $o(t){let e,n,r,i,o,a,l,c;function u(){return t[36](t[46])}return{c(){e=M("div"),L(e,"class",n=we("indicator__item",mo,{active:t[44]})+" "+Yt.root__clickable),L(e,"role","tab"),L(e,"id",r=t[12].instId+"-tab-"+t[46]),L(e,"aria-controls",i=t[12].instId+"-panel-"+t[46]),L(e,"aria-selected",o=t[44]?"true":"false"),L(e,"tabindex",a=t[44]?0:-1)},m(n,r){N(n,e,r),l||(c=[B(e,"click",u),B(e,"keydown",t[24])],l=!0)},p(s,l){t=s,4096&l[0]&&n!==(n=we("indicator__item",mo,{active:t[44]})+" "+Yt.root__clickable)&&L(e,"class",n),4096&l[0]&&r!==(r=t[12].instId+"-tab-"+t[46])&&L(e,"id",r),4096&l[0]&&i!==(i=t[12].instId+"-panel-"+t[46])&&L(e,"aria-controls",i),4096&l[0]&&o!==(o=t[44]?"true":"false")&&L(e,"aria-selected",o),4096&l[0]&&a!==(a=t[44]?0:-1)&&L(e,"tabindex",a)},d(t){t&&O(e),l=!1,s(c)}}}function bo(t){let e,n,r,i,o=t[12]&&yo(t);return{c(){e=M("div"),n=M("div"),o&&o.c(),L(n,"class",r=mo.indicator__items),L(n,"role","tablist"),K(n,"margin","default"===t[6]?"0 ".concat(re(Math.max(0,t[4].width-t[5].width)/2)):""),K(n,"--divkit-indicator-inactive-width",re(t[5].width)),K(n,"--divkit-indicator-inactive-height",re(t[5].height)),K(n,"--divkit-indicator-inactive-border-radius",re(t[5].borderRadius)),K(n,"--divkit-indicator-inactive-background",t[5].background||""),K(n,"--divkit-indicator-inactive-box-shadow",t[5].boxShadow||""),K(n,"--divkit-indicator-active-width",re(t[4].width)),K(n,"--divkit-indicator-active-height",re(t[4].height)),K(n,"--divkit-indicator-active-border-radius",re(t[4].borderRadius)),K(n,"--divkit-indicator-active-background",t[4].background||""),K(n,"--divkit-indicator-active-box-shadow",t[4].boxShadow||""),K(n,"--divkit-indicator-active-scale",t[4].width/t[5].width),K(n,"--divkit-indicator-default-margin","default"===t[6]?"0 ".concat(re((t[7]-t[5].width)/2)):""),K(n,"--divkit-indicator-stretch-margin","stretch"===t[6]?re(t[9]):""),K(n,"--divkit-indicator-stretch-max-count","stretch"===t[6]?t[8]:""),K(n,"--divkit-indicator-stretch-max-spacer","stretch"===t[6]?re((t[8]-1)*t[9]):""),L(e,"class",i=mo.indicator__scroller)},m(r,i){N(r,e,i),D(e,n),o&&o.m(n,null),t[37](n),t[38](e)},p(t,e){t[12]?o?o.p(t,e):(o=yo(t),o.c(),o.m(n,null)):o&&(o.d(1),o=null),112&e[0]&&K(n,"margin","default"===t[6]?"0 ".concat(re(Math.max(0,t[4].width-t[5].width)/2)):""),32&e[0]&&K(n,"--divkit-indicator-inactive-width",re(t[5].width)),32&e[0]&&K(n,"--divkit-indicator-inactive-height",re(t[5].height)),32&e[0]&&K(n,"--divkit-indicator-inactive-border-radius",re(t[5].borderRadius)),32&e[0]&&K(n,"--divkit-indicator-inactive-background",t[5].background||""),32&e[0]&&K(n,"--divkit-indicator-inactive-box-shadow",t[5].boxShadow||""),16&e[0]&&K(n,"--divkit-indicator-active-width",re(t[4].width)),16&e[0]&&K(n,"--divkit-indicator-active-height",re(t[4].height)),16&e[0]&&K(n,"--divkit-indicator-active-border-radius",re(t[4].borderRadius)),16&e[0]&&K(n,"--divkit-indicator-active-background",t[4].background||""),16&e[0]&&K(n,"--divkit-indicator-active-box-shadow",t[4].boxShadow||""),48&e[0]&&K(n,"--divkit-indicator-active-scale",t[4].width/t[5].width),224&e[0]&&K(n,"--divkit-indicator-default-margin","default"===t[6]?"0 ".concat(re((t[7]-t[5].width)/2)):""),576&e[0]&&K(n,"--divkit-indicator-stretch-margin","stretch"===t[6]?re(t[9]):""),320&e[0]&&K(n,"--divkit-indicator-stretch-max-count","stretch"===t[6]?t[8]:""),832&e[0]&&K(n,"--divkit-indicator-stretch-max-spacer","stretch"===t[6]?re((t[8]-1)*t[9]):"")},d(n){n&&O(e),o&&o.d(),t[37](null),t[38](null)}}}function _o(t){let e,n;return e=new dn({props:{cls:we("indicator",mo,t[13]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[bo]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};8192&n[0]&&(r.cls=we("indicator",mo,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||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function wo(t,e,r){let i,o,a,s,l,c,u,d,f,g,h,m,v,y,$,b,_,w,x,k=n,E=n,C=n,A=n,V=n,j=n,P=n,D=n,F=n;var S,N;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((()=>F()));let{json:O={}}=e,{templateContext:I}=e,{origJson:M}=e,{layoutParams:T}=e;const z=["rounded_rectangle","circle"],J=lt(Zt);let R,B,L,U={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!==L.currentItem&&L.scrollToPagerItem(t)}async function Y(t){L.scrollToPagerItem(t),await vt();const e=B.querySelector(".".concat(mo.indicator__item_active));e&&e.focus()}return t.$$set=t=>{"json"in t&&r(0,O=t.json),"templateContext"in t&&r(1,I=t.templateContext),"origJson"in t&&r(2,M=t.origJson),"layoutParams"in t&&r(3,T=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(22,i=J.getDerivedFromVars(O.shape)),j(),j=p(i,(t=>r(32,b=t)))),1&t.$$.dirty[0]&&(r(21,o=J.getDerivedFromVars(O.active_item_color)),A(),A=p(o,(t=>r(30,y=t)))),1&t.$$.dirty[0]&&(r(20,a=J.getDerivedFromVars(O.inactive_item_color)),V(),V=p(a,(t=>r(31,$=t)))),1&t.$$.dirty[0]&&(r(19,s=J.getDerivedFromVars(O.active_item_size)),P(),P=p(s,(t=>r(33,_=t)))),1&t.$$.dirty[0]&&(r(18,l=J.getDerivedFromVars(O.active_shape)),F(),F=p(l,(t=>r(35,x=t)))),1&t.$$.dirty[0]&&(r(17,c=J.getDerivedFromVars(O.inactive_shape)),D(),D=p(c,(t=>r(34,w=t)))),1073741872&t.$$.dirty[0]|31&t.$$.dirty[1]&&(x&&r(4,U=Rn({type:"shape_drawable",shape:x},z,U)),w&&r(5,W=Rn({type:"shape_drawable",shape:w},z,W)),!x&&!w&&b)){const t=fn(_,1.3);r(5,W=Rn({type:"shape_drawable",shape:b,color:W.background},z,W)),r(5,W.background=ae($,1,W.background),W),r(4,U=Object.assign(Object.assign({},W),{width:W.width*t,height:W.height*t,borderRadius:W.borderRadius*t,background:U.background})),r(4,U.background=ae(y,1,U.background),U)}if(1&t.$$.dirty[0]&&(r(16,u=J.getDerivedFromVars(O.space_between_centers)),E(),E=p(u,(t=>r(28,m=t)))),1&t.$$.dirty[0]&&(r(15,d=J.getDerivedFromVars(O.items_placement)),C(),C=p(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=Ve(m.value,q));else if(r(6,H=v.type),"default"===H)r(7,q=Ve(null===r(25,S=v.space_between_centers)||void 0===S?void 0:S.value,q));else if("stretch"===H){const t=v;r(8,G=fn(t.max_visible_items,G)),r(9,K=Ve(null===r(26,N=t.item_spacing)||void 0===N?void 0:N.value,K))}134217728&t.$$.dirty[0]&&async function(t){if(O.pager_id&&t.has(O.pager_id)&&(r(12,L=t.get(O.pager_id)),await vt(),B)){const t=B.children[L.currentItem].offsetLeft;R.scroll({left:t-R.clientWidth/2,behavior:"smooth"})}}(h),64&t.$$.dirty[0]&&r(13,g={placement:H})},r(14,f=J.getStore("pagers")),k(),k=p(f,(t=>r(27,h=t))),[O,I,M,T,U,W,H,q,G,K,R,B,L,g,f,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}=L;if(t.which===ti)Y(n-1<0?n:n-1);else if(t.which===ei)Y(n+1>=e?n:n+1);else if(t.which===ni)Y(0);else{if(t.which!==ri)return;Y(e-1)}t.preventDefault()},S,N,h,m,v,y,$,b,_,w,x,t=>X(t),function(t){dt[t?"unshift":"push"]((()=>{B=t,r(11,B)}))},function(t){dt[t?"unshift":"push"]((()=>{R=t,r(10,R)}))}]}const xo={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 ko(t,e){if(!t||!t.font_size)return e;const n=t.offset,r=t.text_color&&ae(t.text_color)||"#000",i=gn(t.font_weight);if(He(t.font_size)&&"transparent"!==r){var o,a;const e={fontSize:re(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 Eo(t,e,n){return Math.max(e,Math.min(n,Number(t)))}const Co="function"==typeof BigInt;function Ao(t){return Co?BigInt(t):Number(t)}const Vo=Ao("9223372036854775807"),jo=Ao("-9223372036854775808");function Po(t){const e=Ao(t);if(e>Vo||e<jo)throw new Error("Integer overflow.");return e}const Do=Po(0);function Fo(t){let e=t;return e<0&&(e=-e),e}function So(t){let e=0;return t>0?e=1:t<0&&(e=-1),Po(e)}class No{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=Kt(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 Oo={string:class extends No{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"string"}},number:class extends No{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 No{convertValue(t){if("bigint"!=typeof t&&"number"!=typeof t||"number"==typeof t&&(isNaN(t)||t!==Math.round(t))||t>Vo||t<jo)throw new Error("Incorrect variable value");return Po(t)}fromString(t){const e=Po(t);return this.convertValue(e)}getType(){return"integer"}},boolean:class extends No{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 No{convertValue(t){if("string"!=typeof t||!se(t))throw new Error("Incorrect variable value");return t}fromString(t){return this.convertValue(t)}getType(){return"color"}},url:class extends No{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"url"}},dict:class extends No{convertValue(t){if("object"!=typeof t||!t)throw new Error("Incorrect variable value");return t}fromString(t){throw new Error("Dict variable does not support setter from string")}getType(){return"dict"}},array:class extends No{convertValue(t){if(!Array.isArray(t))throw new Error("Incorrect variable value");return t}fromString(t){throw new Error("Array variable does not support setter from string")}getType(){return"array"}}};function Io(t,e,n){if(!(e in Oo))throw new Error("Unsupported variable type");return new Oo[e](t,n)}function Mo(t,e,n){const r=t.slice();return r[78]=e[n],r}function To(t,e,n){const r=t.slice();return r[78]=e[n],r}function zo(t){let e,n;return e=new dn({props:{cls:we("slider",xo,t[21]),style:t[22],customDescription:!0,customActions:"slider",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Uo]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};2097152&n[0]&&(r.cls=we("slider",xo,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||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function Jo(t){let e,n;return{c(){e=M("div"),L(e,"class",n=xo.slider__tick+" "+xo.slider__tick_active),K(e,"--divkit-slider-tick",t[78])},m(t,n){N(t,e,n)},p(t,n){131072&n[0]&&K(e,"--divkit-slider-tick",t[78])},d(t){t&&O(e)}}}function Ro(t){let e,n;return{c(){e=M("div"),L(e,"class",n=xo.slider__tick+" "+xo.slider__tick_inactive),K(e,"--divkit-slider-tick",t[78])},m(t,n){N(t,e,n)},p(t,n){262144&n[0]&&K(e,"--divkit-slider-tick",t[78])},d(t){t&&O(e)}}}function Bo(t){let e,n,r,i,o;return{c(){var a,s,l;e=M("div"),n=M("div"),r=z(t[6]),L(n,"class",i=xo["slider__thumb-text-inner"]),K(n,"font-size",(null===(a=t[12])||void 0===a?void 0:a.fontSize)||"1em"),K(n,"font-weight",(null===(s=t[12])||void 0===s?void 0:s.fontWeight)||""),K(n,"color",(null===(l=t[12])||void 0===l?void 0:l.textColor)||"#000"),L(e,"class",o=xo["slider__thumb-text"])},m(t,i){N(t,e,i),D(e,n),D(n,r)},p(t,e){var i,o,a;64&e[0]&&G(r,t[6]),4096&e[0]&&K(n,"font-size",(null===(i=t[12])||void 0===i?void 0:i.fontSize)||"1em"),4096&e[0]&&K(n,"font-weight",(null===(o=t[12])||void 0===o?void 0:o.fontWeight)||""),4096&e[0]&&K(n,"color",(null===(a=t[12])||void 0===a?void 0:a.textColor)||"#000")},d(t){t&&O(e)}}}function Lo(t){let e,n,r,i,o;return{c(){var a,s,l;e=M("div"),n=M("div"),r=z(t[7]),L(n,"class",i=xo["slider__thumb-text-inner"]),K(n,"font-size",(null===(a=t[13])||void 0===a?void 0:a.fontSize)||"1em"),K(n,"font-weight",(null===(s=t[13])||void 0===s?void 0:s.fontWeight)||""),K(n,"color",(null===(l=t[13])||void 0===l?void 0:l.textColor)||"#000"),L(e,"class",o=xo["slider__thumb-text"]+" "+xo["slider__thumb-text_secondary"])},m(t,i){N(t,e,i),D(e,n),D(n,r)},p(t,e){var i,o,a;128&e[0]&&G(r,t[7]),8192&e[0]&&K(n,"font-size",(null===(i=t[13])||void 0===i?void 0:i.fontSize)||"1em"),8192&e[0]&&K(n,"font-weight",(null===(o=t[13])||void 0===o?void 0:o.fontWeight)||""),8192&e[0]&&K(n,"color",(null===(a=t[13])||void 0===a?void 0:a.textColor)||"#000")},d(t){t&&O(e)}}}function Uo(t){let e,n,r,i,o,a,l,c,u,d,p,f,g,h,m,v,y,$,b,_,w,x,k=Nt(t[17]),E=[];for(let e=0;e<k.length;e+=1)E[e]=Jo(To(t,k,e));let C=Nt(t[18]),A=[];for(let e=0;e<C.length;e+=1)A[e]=Ro(Mo(t,C,e));let V=t[12]&&Bo(t),j=t[37]&&function(t){let e,n,r=t[13]&&Lo(t);return{c(){e=M("div"),r&&r.c(),L(e,"class",n=xo.slider__thumb+" "+xo.slider__thumb_secondary),K(e,"border-radius",re(t[9].borderRadius)),K(e,"background",t[9].background),K(e,"box-shadow",t[9].boxShadow||"")},m(t,n){N(t,e,n),r&&r.m(e,null)},p(t,n){t[13]?r?r.p(t,n):(r=Lo(t),r.c(),r.m(e,null)):r&&(r.d(1),r=null),512&n[0]&&K(e,"border-radius",re(t[9].borderRadius)),512&n[0]&&K(e,"background",t[9].background),512&n[0]&&K(e,"box-shadow",t[9].boxShadow||"")},d(t){t&&O(e),r&&r.d()}}}(t),P=t[37]&&function(t){let e,n,r,i,o;return{c(){e=M("input"),L(e,"type","range"),L(e,"class",n=t[16]?xo.slider__input:"".concat(xo.slider__input," ").concat(xo.slider__input_secondary)),L(e,"min",t[4]),L(e,"max",t[5]),L(e,"step","1"),e.value=r=t[16]?t[6]:t[7],L(e,"aria-label",t[20])},m(n,r){N(n,e,r),i||(o=[B(e,"input",t[68]),B(e,"mousedown",t[37]?t[40]:null),B(e,"touchstart",t[37]?t[40]:null)],i=!0)},p(t,i){65536&i[0]&&n!==(n=t[16]?xo.slider__input:"".concat(xo.slider__input," ").concat(xo.slider__input_secondary))&&L(e,"class",n),16&i[0]&&L(e,"min",t[4]),32&i[0]&&L(e,"max",t[5]),65728&i[0]&&r!==(r=t[16]?t[6]:t[7])&&(e.value=r),1048576&i[0]&&L(e,"aria-label",t[20])},d(t){t&&O(e),i=!1,s(o)}}}(t);return{c(){e=M("div"),n=M("div"),r=M("div"),o=J(),a=M("div"),c=J();for(let t=0;t<E.length;t+=1)E[t].c();u=J();for(let t=0;t<A.length;t+=1)A[t].c();d=J(),p=M("div"),V&&V.c(),g=J(),j&&j.c(),h=J(),m=M("input"),$=J(),P&&P.c(),L(r,"class",i=xo.slider__track),K(r,"height",re(t[10].height)),K(r,"border-radius",re(t[10].borderRadius)),K(r,"background",t[10].background),K(r,"box-shadow",t[10].boxShadow||""),L(a,"class",l=xo["slider__active-track"]),K(a,"left",(100*t[23]).toFixed(2)+"%"),K(a,"width",(100*t[24]).toFixed(2)+"%"),K(a,"height",re(t[11].height)),K(a,"border-radius",re(t[11].borderRadius)),K(a,"background",t[11].background),K(a,"box-shadow",t[11].boxShadow||""),L(p,"class",f=xo.slider__thumb),K(p,"border-radius",re(t[8].borderRadius)),K(p,"background",t[8].background),K(p,"box-shadow",t[8].boxShadow||""),L(m,"type","range"),L(m,"class",v=t[16]?"".concat(xo.slider__input," ").concat(xo.slider__input_secondary):xo.slider__input),L(m,"min",t[4]),L(m,"max",t[5]),L(m,"step","1"),m.value=y=t[16]?t[7]:t[6],L(m,"aria-label",t[19]),L(n,"class",b=xo["slider__tracks-inner"]),L(e,"class",_=xo["slider__tracks-wrapper"])},m(i,s){N(i,e,s),D(e,n),D(n,r),D(n,o),D(n,a),D(n,c);for(let t=0;t<E.length;t+=1)E[t]&&E[t].m(n,null);D(n,u);for(let t=0;t<A.length;t+=1)A[t]&&A[t].m(n,null);D(n,d),D(n,p),V&&V.m(p,null),D(n,g),j&&j.m(n,null),D(n,h),D(n,m),D(n,$),P&&P.m(n,null),t[69](n),w||(x=B(m,"input",t[67]),w=!0)},p(t,e){if(1024&e[0]&&K(r,"height",re(t[10].height)),1024&e[0]&&K(r,"border-radius",re(t[10].borderRadius)),1024&e[0]&&K(r,"background",t[10].background),1024&e[0]&&K(r,"box-shadow",t[10].boxShadow||""),8388608&e[0]&&K(a,"left",(100*t[23]).toFixed(2)+"%"),16777216&e[0]&&K(a,"width",(100*t[24]).toFixed(2)+"%"),2048&e[0]&&K(a,"height",re(t[11].height)),2048&e[0]&&K(a,"border-radius",re(t[11].borderRadius)),2048&e[0]&&K(a,"background",t[11].background),2048&e[0]&&K(a,"box-shadow",t[11].boxShadow||""),131072&e[0]){let r;for(k=Nt(t[17]),r=0;r<k.length;r+=1){const i=To(t,k,r);E[r]?E[r].p(i,e):(E[r]=Jo(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=Nt(t[18]),r=0;r<C.length;r+=1){const i=Mo(t,C,r);A[r]?A[r].p(i,e):(A[r]=Ro(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]?V?V.p(t,e):(V=Bo(t),V.c(),V.m(p,null)):V&&(V.d(1),V=null),256&e[0]&&K(p,"border-radius",re(t[8].borderRadius)),256&e[0]&&K(p,"background",t[8].background),256&e[0]&&K(p,"box-shadow",t[8].boxShadow||""),t[37]&&j.p(t,e),65536&e[0]&&v!==(v=t[16]?"".concat(xo.slider__input," ").concat(xo.slider__input_secondary):xo.slider__input)&&L(m,"class",v),16&e[0]&&L(m,"min",t[4]),32&e[0]&&L(m,"max",t[5]),65728&e[0]&&y!==(y=t[16]?t[7]:t[6])&&(m.value=y),524288&e[0]&&L(m,"aria-label",t[19]),t[37]&&P.p(t,e)},d(n){n&&O(e),I(E,n),I(A,n),V&&V.d(),j&&j.d(),P&&P.d(),t[69](null),w=!1,x()}}}function Wo(t){let e,n,r,i,o=!t[14]&&zo(t);return{c(){o&&o.c(),e=R()},m(a,s){o&&o.m(a,s),N(a,e,s),n=!0,r||(i=B(window,"resize",t[42]),r=!0)},p(t,n){t[14]?o&&(Vt(),Dt(o,1,1,(()=>{o=null})),jt()):o?(o.p(t,n),16384&n[0]&&Pt(o,1)):(o=zo(t),o.c(),Pt(o,1),o.m(e.parentNode,e))},i(t){n||(Pt(o),n=!0)},o(t){Dt(o),n=!1},d(t){t&&O(e),o&&o.d(t),r=!1,i()}}}function Ho(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 qo(t,e,r){let i,o,a,s,l,c,u,d,g,h,m,v,y,$,b,_,w,x,k,E,C,A,V,j,P,D,F,S,N,O,I,M,T,z,J=n,R=n,B=n,L=n,U=n,W=n,H=n,q=n,G=n,K=n,X=n,Y=n;var Z,Q,tt,et;t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>U())),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:nt={}}=e,{templateContext:rt}=e,{origJson:it}=e,{layoutParams:at}=e;const st={width:10,height:10,borderRadius:5,background:"#000"},ct=["rounded_rectangle","circle"],ut=["rounded_rectangle"],pt=lt(Zt),ft=lt(Te);let gt,ht=!1,mt=0,vt=100;const yt=nt.thumb_value_variable,$t=nt.thumb_secondary_value_variable;let bt=yt&&pt.getVariable(yt,"integer")||Io("temp","integer",0);f(t,bt,(t=>r(64,M=t)));let _t=$t&&pt.getVariable($t,"integer")||Io("temp","integer",0);f(t,_t,(t=>r(63,I=t)));let wt,xt,kt,Et=Eo(M||0,mt,vt),Ct=Eo(I||0,mt,vt),At=st,Vt=At,jt=st,Pt=st,Dt=null,Ft=null,St=kt,Nt="",Ot="",It=!1;function Mt(t,e){const n=Number(t.target.value);ht===("first"===e)?(r(7,Ct=n),_t.setValue(n)):(r(6,Et=n),bt.setValue(n))}let Tt=!1;function zt(){if(!gt)return;const t=vt-mt,e=(null==Dt?void 0:Dt.width)||0,n=(null==Ft?void 0:Ft.width)||0;Math.max(e,n)*t>=(null==gt?void 0:gt.clientWidth)?Tt||(pt.logError(Qt(new Error("Slider ticks overlap each other"),{level:"warn"})),Tt=!0):Tt=!1}const Jt=zr(zt,50);return ot((()=>{zt()})),t.$$set=t=>{"json"in t&&r(0,nt=t.json),"templateContext"in t&&r(1,rt=t.templateContext),"origJson"in t&&r(2,it=t.origJson),"layoutParams"in t&&r(3,at=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(36,i=pt.getDerivedFromVars(nt.min_value)),Y(),Y=p(i,(t=>r(66,z=t)))),1&t.$$.dirty[0]&&(r(35,o=pt.getDerivedFromVars(nt.max_value)),X(),X=p(o,(t=>r(65,T=t)))),48&t.$$.dirty[0]|24&t.$$.dirty[2]&&(r(4,mt=Se(z,mt)),r(5,vt=Se(T,vt)),zt()),112&t.$$.dirty[0]|4&t.$$.dirty[2]){const t=Eo(M||0,mt,vt);t!==Et&&r(6,Et=t)}if(176&t.$$.dirty[0]|2&t.$$.dirty[2]){const t=Eo(I||0,mt,vt);t!==Ct&&r(7,Ct=t)}if(1&t.$$.dirty[0]&&(r(34,a=pt.getDerivedFromVars(nt.thumb_style)),K(),K=p(a,(t=>r(62,O=t)))),256&t.$$.dirty[0]|1&t.$$.dirty[2]&&r(8,At=Rn(O,ct,At)),1&t.$$.dirty[0]&&(r(33,s=pt.getDerivedFromVars(nt.thumb_secondary_style)),G(),G=p(s,(t=>r(61,N=t)))),256&t.$$.dirty[0]|1073741824&t.$$.dirty[1]&&r(9,Vt=Rn(N,ct,At)),1&t.$$.dirty[0]&&(r(32,l=pt.getDerivedFromVars(nt.track_inactive_style)),q(),q=p(l,(t=>r(60,S=t)))),1024&t.$$.dirty[0]|536870912&t.$$.dirty[1]&&r(10,jt=Rn(S,ut,jt)),1&t.$$.dirty[0]&&(r(31,c=pt.getDerivedFromVars(nt.track_active_style)),H(),H=p(c,(t=>r(59,F=t)))),2048&t.$$.dirty[0]|268435456&t.$$.dirty[1]&&r(11,Pt=Rn(F,ut,Pt)),1&t.$$.dirty[0]&&(r(30,u=pt.getDerivedFromVars(nt.tick_mark_active_style)),W(),W=p(u,(t=>r(58,D=t)))),134217728&t.$$.dirty[1]){let t=Rn(D,ct,st);t!==st&&r(47,Dt=t)}if(240&t.$$.dirty[0]|65536&t.$$.dirty[1]&&(Dt?(r(17,wt=$t?Ho(Math.min(Et,Ct),Math.max(Et,Ct)+1,mt,vt,!0):Ho(mt,Et,mt,vt,!0)),zt()):r(17,wt=[])),1&t.$$.dirty[0]&&(r(29,d=pt.getDerivedFromVars(nt.tick_mark_inactive_style)),U(),U=p(d,(t=>r(57,P=t)))),67108864&t.$$.dirty[1]){let t=Rn(P,ct,st);t!==st&&r(48,Ft=t)}if(240&t.$$.dirty[0]|131072&t.$$.dirty[1]&&(Ft?(r(18,xt=$t?Ho(Math.min(Et,Ct),Math.max(Et,Ct)+1,mt,vt,!1):Ho(Et+1,vt+1,mt,vt,!0)),zt()):r(18,xt=[])),1&t.$$.dirty[0]&&(r(28,g=pt.getDerivedFromVars(nt.thumb_text_style)),L(),L=p(g,(t=>r(56,j=t)))),4096&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(12,kt=ko(j,kt)),1&t.$$.dirty[0]&&(r(27,h=pt.getDerivedFromVars(nt.thumb_secondary_text_style)),B(),B=p(h,(t=>r(55,V=t)))),4096&t.$$.dirty[0]|16777216&t.$$.dirty[1]&&r(13,St=ko(V,kt)),1&t.$$.dirty[0]&&(r(26,m=pt.getDerivedFromVars(nt.accessibility)),R(),R=p(m,(t=>r(54,A=t)))),8388608&t.$$.dirty[1]&&((null==A?void 0:A.description)?r(19,Nt=A.description):pt.logError(Qt(new Error('Missing accessibility "description" for slider'),{level:"warn"}))),1&t.$$.dirty[0]&&(r(25,v=pt.getDerivedFromVars(nt.secondary_value_accessibility)),J(),J=p(v,(t=>r(53,C=t)))),4194304&t.$$.dirty[1]&&((null==C?void 0:C.description)?r(20,Ot=C.description):$t&&pt.logError(Qt(new Error('Missing second accessibility "description" for slider'),{level:"warn"}))),19712&t.$$.dirty[0]){let t=!1;ft.hasAction()?(pt.logError(Qt(new Error('Cannot show "slider" inside component with action'))),t=!0):At===st?(pt.logError(Qt(new Error('Missing "thumb_style" in slider'))),t=!0):Pt===st?(pt.logError(Qt(new Error('Missing "track_active_style" in slider'))),t=!0):jt===st&&(pt.logError(Qt(new Error('Missing "track_inactive_style" in slider'))),t=!0),t!==It&&r(14,It=t)}768&t.$$.dirty[0]&&r(52,y=re(Math.max(...[At.width,Vt.width,0].filter(Ce)))),768&t.$$.dirty[0]&&r(51,$=re(Math.max(...[At.height,Vt.height,0].filter(Ce)))),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":re(At.width),"--divkit-slider-thumb-height":re(At.height),"--divkit-slider-thumb-secondary-width":re(Vt.width),"--divkit-slider-thumb-secondary-height":re(Vt.height),"--divkit-slider-text-offset-x":(null===r(43,Z=null==kt?void 0:kt.offset)||void 0===Z?void 0:Z.x)?ie(kt.offset.x):void 0,"--divkit-slider-text-offset-y":(null===r(44,Q=null==kt?void 0:kt.offset)||void 0===Q?void 0:Q.y)?ie(kt.offset.y):void 0,"--divkit-slider-text-secondary-offset-x":(null===r(45,tt=null==St?void 0:St.offset)||void 0===tt?void 0:tt.x)?ie(St.offset.x):void 0,"--divkit-slider-text-secondary-offset-y":(null===r(46,et=null==St?void 0:St.offset)||void 0===et?void 0:et.y)?ie(St.offset.y):void 0,"--divkit-slider-tick-active-width":Dt?re(Dt.width):void 0,"--divkit-slider-tick-active-height":Dt?re(Dt.height):void 0,"--divkit-slider-tick-active-border-radius":Dt?re(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":Ft?re(Ft.width):void 0,"--divkit-slider-tick-inactive-height":Ft?re(Ft.height):void 0,"--divkit-slider-tick-inactive-border-radius":Ft?re(Ft.borderRadius):void 0,"--divkit-slider-tick-inactive-background":(null==Ft?void 0:Ft.background)||void 0,"--divkit-slider-tick-inactive-box-shadow":(null==Ft?void 0:Ft.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={}),[nt,rt,it,at,mt,vt,Et,Ct,At,Vt,jt,Pt,kt,St,It,gt,ht,wt,xt,Nt,Ot,E,k,x,w,v,m,h,g,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=gt.getBoundingClientRect(),a=(i-o.left)/o.width,s=(vt-mt)*a,l=Math.round(Eo(s,mt,vt));r(16,ht=l<(Et+Ct)/2==Et<Ct)},Mt,Jt,Z,Q,tt,et,Dt,Ft,_,b,$,y,C,A,V,j,P,D,F,S,N,O,I,M,T,z,t=>Mt(t,"first"),t=>Mt(t,"second"),function(t){dt[t?"unshift":"push"]((()=>{gt=t,r(15,gt)}))}]}const Go={input:"divkit-c3a4c","input_alignment-horizontal_center":"divkit-fc52a","input_alignment-horizontal_right":"divkit-e8038",input__input:"divkit-f11e0",input__placeholder:"divkit-b7593","input_alignment-vertical_top":"divkit-bdccd","input_alignment-vertical_bottom":"divkit-fc670","input_alignment-vertical_baseline":"divkit-dd6af","input_highlight-color":"divkit-cc00f",input__input_singleline:"divkit-ffd1e","input__scroll-wrapper":"divkit-ad8a3",input__input_multiline:"divkit-f61f0","input__input_has-custom-focus":"divkit-e6b50"};function Ko(t,e){if(t===e)return{start:t.length,added:0,removed:0};if(t.length>e.length){const n=Ko(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 Xo(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 Yo{constructor(t){this.char=t}}class Zo{constructor(t,e,n){this.char=t,this.filter=e,this.placeholder=n}}class Qo{constructor(t){Xo(this,"filters",new Map),Xo(this,"destructedValue",[]),Xo(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 Yo)t+=n.char;else if(n instanceof Zo)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 Zo&&!t.char));return-1!==t?t:this.destructedValue.length}updateMaskData(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=this.maskData!==t&&e?this.rawValue:null;this.filters=new Map,this.maskData=t,this.maskData.decoding.forEach((t=>{if(t.filter)try{const e=new RegExp(t.filter);this.filters.set(t.key,e)}catch(e){this.onException(Qt(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 Zo(null,this.filters.get(e.key),e.placeholder):new Yo(t)})),null!==n&&this.overrideRawValue(n)}overrideRawValue(t){this.clearRange(0,this.destructedValue.length),this.replaceChars(t,0),this.cursorPos=Math.min(this.cursorPos,this.value.length)}applyChangeFrom(t,e){const n=Ko(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=i?this.calculateMaxShift(i,o):void 0;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 Zo&&++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 Zo&&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 Zo&&(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 Zo);)++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 Zo&&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 Zo&&(t.char=e,++o),++i}}firstHolderAfter(t){let e=t;for(;e<this.destructedValue.length&&!(this.destructedValue[e]instanceof Zo);)++e;return e}}class ta extends Qo{constructor(t,e){super(t),this.logError=e}onException(t){this.logError(t)}}function ea(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 na extends Qo{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=arguments.length>1?arguments[1]:void 0;super({pattern:"",decoding:[],alwaysVisible:!1}),ea(this,"currencyFormatter",new Intl.NumberFormat),ea(this,"decimalSeparator","."),ea(this,"localeDigits",{}),ea(this,"trimZeroRegExp",new RegExp("")),this.logError=e,this.initFormatter(t)}updateCurrencyParams(t){const e=this.parseFormat(this.rawValue)||0;this.initFormatter(t);const n=e.toString().replace(".",this.decimalSeparator);this.applyChangeFrom(n)}initFormatter(t){try{this.currencyFormatter=new Intl.NumberFormat(t,{minimumFractionDigits:2,maximumFractionDigits:2}),this.decimalSeparator=this.currencyFormatter.format(0)[1],this.localeDigits=new Array(10).fill("").reduce(((t,e,n)=>(t[n]=this.currencyFormatter.format(n)[0],t)),{}),this.trimZeroRegExp=new RegExp("^".concat(this.localeDigits[0],"+"))}catch(e){this.onException(Qt(e,{level:"error",additional:{locale:t}}))}}invalidateMaskDataForFormatted(t){const e=this.currencyFormatter.format(t),n=this.formatPattern(e),r=[{key:"#",filter:"[".concat([...Object.values(this.localeDigits)].join(""),"]"),placeholder:this.localeDigits[0]},{key:this.decimalSeparator,filter:"[".concat(this.decimalSeparator,"]"),placeholder:this.decimalSeparator}];this.updateMaskData({pattern:n,decoding:r,alwaysVisible:this.maskData.alwaysVisible},!1)}overrideRawValue(t){const e=this.parseFormat(t)||0;this.invalidateMaskDataForFormatted(e),super.overrideRawValue(t)}applyChangeFrom(t,e){const n=Ko(this.value,t),r=this.value.lastIndexOf(this.decimalSeparator),i=t.lastIndexOf(this.decimalSeparator),o=r!==i||-1===r&&-1===i,a=this.validFormat(t,n);this.cleanup(n);const s=this.parseFormat(a)||0;o&&this.invalidateMaskDataForFormatted(s),this.replaceChars(a,0),this.value.length>n.start&&!this.isDigit(this.value[n.start])?this.cursorPos=null!=e?e:this.cursorPosition:this.cursorPos=Math.abs(this.value.length-(t.length-(null!=e?e:this.cursorPosition)))}parseFormat(t){return parseFloat(t.replace(/./g,(t=>this.localeDigits[t]||(t===this.decimalSeparator?".":""))))}formatPattern(t){let e="";for(const n of t)e+=this.isDigit(n)?"#":n;return e}validFormat(t,e){if(!t)return"";let n=-1,r=0;for(;r<t.length;){if(t[r]===this.decimalSeparator&&!this.inDiff(e,r)){n=r;break}r++}let i=-1;1===e.added&&0===e.removed&&[",","."].includes(t[e.start])&&(i=e.start);const o=this.currencyFormatter.resolvedOptions().maximumFractionDigits;let a=o;if(-1!==n)for(r=n;r<t.length;)this.isDigit(t[r])&&!this.inDiff(e,r)&&a--,r++;else{let n=!1;for(let r=0;r<t.length;r++){const i=t[r];i===this.decimalSeparator?n=!0:!this.inDiff(e,r)&&n&&this.isDigit(i)&&a--}}const s=t.includes(this.decimalSeparator)||-1!==i,l=[];r=t.length-1;let c=!1;for(;r>=0;){const u=t[r],d=l.length<=o;this.isDigit(u)?this.inDiff(e,r)&&!c&&s?a>0&&(l.push(u),a--):l.push(u):d&&-1===n&&r===i?(l.push(this.decimalSeparator),c=!0):!d||u!==this.decimalSeparator||n!==r&&-1!==n||(l.push(this.decimalSeparator),c=!0,n=r),r--}return l.reverse().join("").replace(this.trimZeroRegExp,"")}inDiff(t,e){return t.start<=e&&e<t.start+t.added}isDigit(t){return Boolean(this.localeDigits[t])}onException(t){this.logError(t)}}const ra=3;function ia(t){const e=t.textContent;let n=0;return"string"==typeof e&&(n+=e.length,t instanceof HTMLElement&&("DIV"===t.tagName||"BR"===t.tagName)&&++n),n}function oa(t,e){if(t.nodeType!==ra)if(t instanceof HTMLElement&&"BR"===t.tagName)try{const e=window.getSelection();if(e){e.removeAllRanges();const n=document.createRange(),r=t.parentNode,i=Array.from(r.childNodes).indexOf(t)+1;n.setStart(r,i),n.setEnd(r,i),e.addRange(n)}}catch(t){}else for(let n=0,r=t.childNodes.length;n<r;++n){const r=t.childNodes[n],i=ia(r);if(e<=i)return void oa(r,e);e-=i}else try{const n=window.getSelection();if(n){n.removeAllRanges();const r=document.createRange();r.setStart(t,e),r.setEnd(t,e),n.addRange(r)}}catch(t){}}function aa(t){let e,n;return e=new dn({props:{cls:we("input",Go,t[15]),style:t[14],customDescription:!0,customActions:"input",customPaddings:!0,json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[ua,t=>{let{focusHandler:e,blurHandler:n,hasCustomFocus:r}=t;return{89:e,90:n,91:r}},t=>{let{focusHandler:e,blurHandler:n,hasCustomFocus:r}=t;return[0,0,(e?134217728:0)|(n?268435456:0)|(r?536870912:0)]}]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};32768&n[0]&&(r.cls=we("input",Go,t[15])),16384&n[0]&&(r.style=t[14]),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]),802672&n[0]|2013265920&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function sa(t){let e,n,r,i,o;return{c(){e=M("input"),L(e,"type",t[9]),L(e,"inputmode",t[10]),L(e,"class",n=we("input__input",Go,{"has-custom-focus":t[91],singleline:!0})),L(e,"autocomplete","off"),L(e,"autocapitalize","off"),L(e,"aria-label",t[11]),L(e,"style",r=ne(t[13])),L(e,"placeholder",t[18]),e.value=t[4]},m(n,r){N(n,e,r),t[76](e),i||(o=[B(e,"input",t[37]),B(e,"mousedown",(function(){l(t[19]?t[38]:void 0)&&(t[19]?t[38]:void 0).apply(this,arguments)})),B(e,"click",(function(){l(t[19]?t[39]:void 0)&&(t[19]?t[39]:void 0).apply(this,arguments)})),B(e,"focus",(function(){l(t[89])&&t[89].apply(this,arguments)})),B(e,"blur",(function(){l(t[90])&&t[90].apply(this,arguments)}))],i=!0)},p(i,o){t=i,512&o[0]&&L(e,"type",t[9]),1024&o[0]&&L(e,"inputmode",t[10]),536870912&o[2]&&n!==(n=we("input__input",Go,{"has-custom-focus":t[91],singleline:!0}))&&L(e,"class",n),2048&o[0]&&L(e,"aria-label",t[11]),8192&o[0]&&r!==(r=ne(t[13]))&&L(e,"style",r),262144&o[0]&&L(e,"placeholder",t[18]),16&o[0]&&e.value!==t[4]&&(e.value=t[4])},d(n){n&&O(e),t[76](null),i=!1,s(o)}}}function la(t){let e,n,r,i,o,a,c,u,d,p,f,g,h=!t[8]&&t[18]&&ca(t);return{c(){e=M("span"),h&&h.c(),n=J(),r=M("span"),i=z(""),a=J(),c=M("span"),L(r,"aria-hidden","true"),L(r,"style",o=ne(t[12])),L(c,"class",u=we("input__input",Go,{"has-custom-focus":t[91],multiline:!0})),L(c,"autocapitalize","off"),L(c,"contenteditable","true"),L(c,"aria-label",t[11]),L(c,"style",d=ne(t[13])),void 0===t[8]&&yt((()=>t[75].call(c))),L(e,"class",p=Go["input__scroll-wrapper"])},m(o,s){N(o,e,s),h&&h.m(e,null),D(e,n),D(e,r),D(r,i),D(e,a),D(e,c),t[74](c),void 0!==t[8]&&(c.innerText=t[8]),f||(g=[B(c,"input",t[75]),B(c,"input",t[37]),B(c,"paste",pa),B(c,"mousedown",(function(){l(t[19]?t[38]:void 0)&&(t[19]?t[38]:void 0).apply(this,arguments)})),B(c,"click",(function(){l(t[19]?t[39]:void 0)&&(t[19]?t[39]:void 0).apply(this,arguments)})),B(c,"focus",(function(){l(t[89])&&t[89].apply(this,arguments)})),B(c,"blur",(function(){l(t[90])&&t[90].apply(this,arguments)}))],f=!0)},p(i,a){!(t=i)[8]&&t[18]?h?h.p(t,a):(h=ca(t),h.c(),h.m(e,n)):h&&(h.d(1),h=null),4096&a[0]&&o!==(o=ne(t[12]))&&L(r,"style",o),536870912&a[2]&&u!==(u=we("input__input",Go,{"has-custom-focus":t[91],multiline:!0}))&&L(c,"class",u),2048&a[0]&&L(c,"aria-label",t[11]),8192&a[0]&&d!==(d=ne(t[13]))&&L(c,"style",d),256&a[0]&&t[8]!==c.innerText&&(c.innerText=t[8])},d(n){n&&O(e),h&&h.d(),t[74](null),f=!1,s(g)}}}function ca(t){let e,n,r,i;return{c(){e=M("div"),n=z(t[18]),L(e,"class",r=Go.input__placeholder),L(e,"aria-hidden","true"),L(e,"style",i=ne(t[13]))},m(t,r){N(t,e,r),D(e,n)},p(t,r){262144&r[0]&&G(n,t[18]),8192&r[0]&&i!==(i=ne(t[13]))&&L(e,"style",i)},d(t){t&&O(e)}}}function ua(t){let e;function n(t,e){return t[5]?la:sa}let r=n(t),i=r(t);return{c(){i.c(),e=R()},m(t,n){i.m(t,n),N(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){t&&O(e),i.d(t)}}}function da(t){let e,n,r=!t[7]&&aa(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[7]?r&&(Vt(),Dt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),128&n[0]&&Pt(r,1)):(r=aa(t),r.c(),Pt(r,1),r.m(e.parentNode,e))},i(t){n||(Pt(r),n=!0)},o(t){Dt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function pa(t){if(t.preventDefault(),t.clipboardData){let e=t.clipboardData.getData("text/plain");e=e.trim(),document.execCommand("inserttext",!1,e)}}function fa(t,e,r){let i,o,a,s,l,c,u,d,g,h,m,v,y,b,_,w,x,k,E,C,A,V,j,P,D,F,S,N=n,O=n;var I;t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>O()));let{json:M={}}=e,{templateContext:T}=e,{origJson:z}=e,{layoutParams:J}=e;const R=lt(Zt);let B,L=!1,U=null;const W=M.text_variable,H=null===(I=M.mask)||void 0===I?void 0:I.raw_text_variable;let q=!1;W||(q=!0,R.logError(Qt(new Error('Missing "text_variable" in "input"'))));let G=W&&R.getVariable(W,"string")||Io("temp","string","");f(t,G,(t=>r(56,g=t)));let K=H&&R.getVariable(H,"string")||Io("temp","string","");f(t,K,(t=>r(57,h=t)));let X="",Y="";const Z=R.getDerivedFromVars(M.mask);f(t,Z,(t=>r(61,b=t)));const Q=R.getDerivedFromVars(M.hint_text);f(t,Q,(t=>r(73,F=t)));const tt=R.getDerivedFromVars(M.hint_color);f(t,tt,(t=>r(72,D=t)));let et="";const nt=R.getDerivedFromVars(M.font_size);f(t,nt,(t=>r(71,P=t)));let rt=12;const it=R.getDerivedFromVars(M.font_weight);f(t,it,(t=>r(70,j=t)));const at=R.getDerivedFromVars(M.font_family);let st;f(t,at,(t=>r(69,V=t)));let ct="";const ut=R.getDerivedFromVars(M.line_height);let pt;f(t,ut,(t=>r(68,A=t)));const ft=R.getDerivedFromVars(M.letter_spacing);f(t,ft,(t=>r(67,C=t)));let gt="";const ht=R.getDerivedFromVars(M.text_color);f(t,ht,(t=>r(66,E=t)));let mt="#000";const yt=R.getDerivedFromVars(M.highlight_color);f(t,yt,(t=>r(65,k=t)));let $t="";const bt=R.getDerivedFromVars(M.text_alignment_horizontal);f(t,bt,(t=>r(64,x=t)));let _t="left";const wt=R.getDerivedFromVars(M.text_alignment_vertical);f(t,wt,(t=>r(63,w=t)));let xt="center";const kt=R.getDerivedFromVars(M.keyboard_type);f(t,kt,(t=>r(62,_=t)));const Et={email:"email",number:"number",phone:"tel",single_line_text:"text",multi_line_text:"text",uri:"url"};let Ct="multi_line_text",At="text";const Vt="undefined"!=typeof document&&"inputMode"in document.createElement("input");let jt;const Pt=R.getDerivedFromVars(M.max_visible_lines);f(t,Pt,(t=>r(60,y=t)));let Dt="",Ft=null,St="",Nt="",Ot="";const It=R.getDerivedFromVars(M.select_all_on_focus);function Mt(t){B instanceof HTMLInputElement?r(6,B.selectionStart=r(6,B.selectionEnd=t,B),B):oa(B,t)}async function Tt(){if(!B||!U)return;U.overrideRawValue(h),K.set(U.rawValue),$(G,g=r(4,X=r(8,Y=U.value)),g);const t=U.cursorPosition;await vt(),document.activeElement===B&&Mt(t)}return f(t,It,(t=>r(19,S=t))),ot((()=>{B&&U&&h&&(U.overrideRawValue(h),$(G,g=r(4,X=r(8,Y=U.value)),g))})),t.$$set=t=>{"json"in t&&r(0,M=t.json),"templateContext"in t&&r(1,T=t.templateContext),"origJson"in t&&r(2,z=t.origJson),"layoutParams"in t&&r(3,J=t.layoutParams)},t.$$.update=()=>{if(1073741824&t.$$.dirty[1]&&("fixed_length"===(null==(e=b)?void 0:e.type)?r(40,U=function(t,e,n){if("string"==typeof t.pattern&&Array.isArray(t.pattern_elements)&&t.pattern_elements.every((t=>t.key&&"string"==typeof t.key))){const r={pattern:t.pattern,alwaysVisible:Boolean(t.always_visible),decoding:t.pattern_elements.map((t=>({key:t.key,filter:t.regex&&"string"==typeof t.regex?t.regex:void 0,placeholder:t.placeholder&&"string"==typeof t.placeholder?t.placeholder:"_"})))};return n?(n.updateMaskData(r),n):new ta(r,e)}return n||null}(e,R.logError,U)):"currency"===(null==e?void 0:e.type)&&r(40,U=function(t,e,n){return n?(n.updateCurrencyParams(t.locale),n):new na(t.locale,e)}(e,R.logError,U)),U&&Tt()),16&t.$$.dirty[0]|33554944&t.$$.dirty[1]&&(U||X===g||r(4,X=r(8,Y=g))),67109376&t.$$.dirty[1]&&U&&U.rawValue!==h&&Tt(),2048&t.$$.dirty[2]&&r(18,i=F),1024&t.$$.dirty[1]|1024&t.$$.dirty[2]&&r(41,et=ae(D,1,et)),2048&t.$$.dirty[1]|512&t.$$.dirty[2]&&r(42,rt=fn(P,rt)),4096&t.$$.dirty[1]|384&t.$$.dirty[2]&&(r(43,st=hn(j,st)),r(44,ct=V&&"string"==typeof V?R.typefaceProvider(V,{fontWeight:st||400}):"")),2048&t.$$.dirty[1]|64&t.$$.dirty[2]){const t=A;He(t)&&r(45,pt=t/rt)}var e;32&t.$$.dirty[2]&&Ee(C)&&r(46,gt=re(C)),65536&t.$$.dirty[1]|16&t.$$.dirty[2]&&r(47,mt=ae(E,1,mt)),131072&t.$$.dirty[1]|8&t.$$.dirty[2]&&r(48,$t=ae(k,1,$t)),262144&t.$$.dirty[1]|4&t.$$.dirty[2]&&r(49,_t=_n(x,_t)),524288&t.$$.dirty[1]|2&t.$$.dirty[2]&&r(50,xt=wn(w,xt)),1073741824&t.$$.dirty[1]|1&t.$$.dirty[2]&&(_&&_ in Et&&(r(9,At=Et[_]),r(51,Ct=_)),"currency"===(null==b?void 0:b.type)&&(r(9,At=Vt?"text":"tel"),r(10,jt="decimal"))),1048576&t.$$.dirty[1]&&r(5,o="multi_line_text"===Ct),1&t.$$.dirty[0]&&(r(17,a=R.getDerivedFromVars(M.paddings)),O(),O=p(a,(t=>r(59,v=t)))),809519104&t.$$.dirty[1]&&(He(y)&&r(52,Dt="calc(".concat(y*(pt||1.25)*(rt/10)+"em"," + ").concat(ie(Ve(null==v?void 0:v.top,0)+Ve(null==v?void 0:v.bottom,0)),")")),r(53,Ft=Oe(v||void 0,Ft)),r(54,St=Ft?ke({top:(Number(Ft.top)||0)/rt*10,right:(Number(Ft.right)||0)/rt*10,bottom:(Number(Ft.bottom)||0)/rt*10,left:(Number(Ft.left)||0)/rt*10}):""),r(55,Nt=Ft?ke({top:(Number(Ft.top)||0)/rt*10,bottom:(Number(Ft.bottom)||0)/rt*10}):"")),1&t.$$.dirty[0]&&(r(16,s=R.getDerivedFromVars(M.accessibility)),N(),N=p(s,(t=>r(58,m=t)))),134217728&t.$$.dirty[1]&&((null==m?void 0:m.description)?r(11,Ot=m.description):R.logError(Qt(new Error('Missing accessibility "description" for input'),{level:"warn"}))),32&t.$$.dirty[0]|917504&t.$$.dirty[1]&&r(15,l={"highlight-color":Boolean($t),multiline:o,"alignment-horizontal":_t,"alignment-vertical":xt}),2356224&t.$$.dirty[1]&&r(14,c={"--divkit-input-hint-color":et,"--divkit-input-highlight-color":$t,"--divkit-input-line-height":pt,"font-weight":st,"font-family":ct,"letter-spacing":gt,color:mt,"max-height":Dt}),8390656&t.$$.dirty[1]&&r(13,u={"font-size":re(rt),padding:St}),16779264&t.$$.dirty[1]&&r(12,d={"font-size":re(rt),padding:Nt})},[M,T,z,J,X,o,B,q,Y,At,jt,Ot,d,u,c,l,s,a,i,S,G,K,Z,Q,tt,nt,it,at,ut,ft,ht,yt,bt,wt,kt,Pt,It,function(t){let e=(o?t.target.innerText:t.target.value)||"";"\n"===e&&(e=""),X!==e&&(r(4,X=r(8,Y=e)),G.setValue(e),U&&async function(){if(!B||!U)return;U.applyChangeFrom(X,B instanceof HTMLInputElement?null===B.selectionEnd?void 0:B.selectionEnd:function(t){try{let n=0;const r=window.getSelection();if(!r)return 0;const i=r.getRangeAt(0);let o;if(i){if(!i.collapsed)return 0;n+=i.endOffset,o=i.endContainer}if(o instanceof HTMLElement){let t=0;for(let e=0,r=Math.min(n,o.childNodes.length);e<r;++e)t+=ia(o.childNodes[e]);n=t}for(;o&&o!==t;){var e;const t=o.parentNode;if(!t)return 0;const r=Array.from(t.childNodes).indexOf(o);for(let e=0;e<r;++e)n+=ia(t.childNodes[e]);o instanceof HTMLElement&&("DIV"===o.tagName&&(null===(e=t.childNodes[r-1])||void 0===e?void 0:e.nodeType)===ra||"BR"===o.tagName)&&++n,o=t}return n}catch(t){return 0}}(B)),K.set(U.rawValue),$(G,g=r(4,X=r(8,Y=U.value)),g);const t=U.cursorPosition;await vt(),document.activeElement===B&&Mt(t)}())},function(){L=!1,setTimeout((()=>{L=!0}),250)},function(){if(!L)if(B instanceof HTMLInputElement)B.select();else{const t=window.getSelection(),e=document.createRange();e.selectNodeContents(B),t&&(t.removeAllRanges(),t.addRange(e))}},U,et,rt,st,ct,pt,gt,mt,$t,_t,xt,Ct,Dt,Ft,St,Nt,g,h,m,v,y,b,_,w,x,k,E,C,A,V,j,P,D,F,function(t){dt[t?"unshift":"push"]((()=>{B=t,r(6,B)}))},function(){Y=this.innerText,r(8,Y),r(40,U),r(4,X),r(56,g)},function(t){dt[t?"unshift":"push"]((()=>{B=t,r(6,B)}))}]}const ga={select:"divkit-feef3","select__select-text":"divkit-cd862",select_hint:"divkit-a3cf6",select__select:"divkit-bdb72","select__select_has-custom-focused":"divkit-a46ad","has-custom-focused":"divkit-fc5dc",select__option:"divkit-e774b"};function ha(t,e,n){const r=t.slice();return r[52]=e[n],r}function ma(t){let e,n;return e=new dn({props:{cls:we("select",ga,t[11]),style:t[10],customDescription:!0,customActions:"select",customPaddings:!0,json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[ya,t=>{let{hasCustomFocus:e,focusHandler:n,blurHandler:r}=t;return{49:e,50:n,51:r}},t=>{let{hasCustomFocus:e,focusHandler:n,blurHandler:r}=t;return[0,(e?262144:0)|(n?524288:0)|(r?1048576:0)]}]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};2048&n[0]&&(r.cls=we("select",ga,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]),9136&n[0]|18612224&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function va(t){let e,r,i,o,a=(t[52].text||t[52].value)+"";return{c(){var n,s;e=M("option"),r=z(a),L(e,"class",i=ga.select__option),e.__value=o=t[52].value,n=e,s=e.__value,n.value=null==s?"":s},m(t,n){N(t,e,n),D(e,r)},p:n,d(t){t&&O(e)}}}function ya(t){let e,n,r,i,o,a,c,u,d,p,f=(t[4]||t[13]||"")+"",g=Nt(t[16]),h=[];for(let e=0;e<g.length;e+=1)h[e]=va(ha(t,g,e));return{c(){e=M("span"),n=z(f),o=J(),a=M("select");for(let t=0;t<h.length;t+=1)h[t].c();L(e,"class",r=ga["select__select-text"]),L(e,"style",i=ne(t[9])),L(e,"aria-hidden","true"),L(a,"class",c=we("select__select",ga,{"has-custom-focus":t[49]})),L(a,"aria-label",t[7]),L(a,"style",u=ne(t[8])),void 0===t[5]&&yt((()=>t[44].call(a)))},m(r,i){N(r,e,i),D(e,n),N(r,o,i),N(r,a,i);for(let t=0;t<h.length;t+=1)h[t]&&h[t].m(a,null);X(a,t[5],!0),d||(p=[B(a,"change",t[44]),B(a,"focus",(function(){l(t[50])&&t[50].apply(this,arguments)})),B(a,"blur",(function(){l(t[51])&&t[51].apply(this,arguments)}))],d=!0)},p(r,o){if(t=r,8208&o[0]&&f!==(f=(t[4]||t[13]||"")+"")&&G(n,f),512&o[0]&&i!==(i=ne(t[9]))&&L(e,"style",i),65536&o[0]){let e;for(g=Nt(t[16]),e=0;e<g.length;e+=1){const n=ha(t,g,e);h[e]?h[e].p(n,o):(h[e]=va(n),h[e].c(),h[e].m(a,null))}for(;e<h.length;e+=1)h[e].d(1);h.length=g.length}262144&o[1]&&c!==(c=we("select__select",ga,{"has-custom-focus":t[49]}))&&L(a,"class",c),128&o[0]&&L(a,"aria-label",t[7]),256&o[0]&&u!==(u=ne(t[8]))&&L(a,"style",u),65568&o[0]&&X(a,t[5])},d(t){t&&(O(e),O(o),O(a)),I(h,t),d=!1,s(p)}}}function $a(t){let e,n,r=!t[6]&&ma(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[6]?r&&(Vt(),Dt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),64&n[0]&&Pt(r,1)):(r=ma(t),r.c(),Pt(r,1),r.m(e.parentNode,e))},i(t){n||(Pt(r),n=!0)},o(t){Dt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function ba(t,e,r){let i,o,a,s,l,c,u,d,g,h,m,v,y,$,b,_,w,x,k=n,E=n;t.$$.on_destroy.push((()=>k())),t.$$.on_destroy.push((()=>E()));let{json:C={}}=e,{templateContext:A}=e,{origJson:V}=e,{layoutParams:j}=e;const P=lt(Zt),D=C.value_variable;let F=!1;D||(F=!0,P.logError(Qt(new Error('Missing "value_variable" in "select"'))));let S=D&&P.getVariable(D,"string")||Io("temp","string","");f(t,S,(t=>r(5,x=t)));let N="";const O=C.options,I=Array.isArray(O)&&O.filter((t=>"string"==typeof t.value))||[];Array.isArray(I)&&I.length||P.logError(Qt(new Error('Empty selection "items" in "select"')));let M="",T=null,z="";const J=P.getDerivedFromVars(C.hint_text);f(t,J,(t=>r(42,_=t)));const R=P.getDerivedFromVars(C.hint_color);f(t,R,(t=>r(41,b=t)));let B="rgba(0,0,0,.45)";const L=P.getDerivedFromVars(C.font_size);f(t,L,(t=>r(40,$=t)));let U=12;const W=P.getDerivedFromVars(C.font_weight);f(t,W,(t=>r(39,y=t)));const H=P.getDerivedFromVars(C.font_family);let q;f(t,H,(t=>r(38,v=t)));let G="";const K=P.getDerivedFromVars(C.line_height);let X;f(t,K,(t=>r(37,m=t)));const Y=P.getDerivedFromVars(C.letter_spacing);f(t,Y,(t=>r(36,h=t)));let Z="";const Q=P.getDerivedFromVars(C.text_color);f(t,Q,(t=>r(35,g=t)));let tt="#000",et="";return t.$$set=t=>{"json"in t&&r(0,C=t.json),"templateContext"in t&&r(1,A=t.templateContext),"origJson"in t&&r(2,V=t.origJson),"layoutParams"in t&&r(3,j=t.layoutParams)},t.$$.update=()=>{if(32&t.$$.dirty[0]&&(N=x),32&t.$$.dirty[0]){const t=I.find((t=>t.value===x));t?r(4,M="string"==typeof t.text?t.text:t.value):(r(4,M=""),x&&P.logError(Qt(new Error('Value from the variable was not found in the selection items for "select"'))))}if(1&t.$$.dirty[0]&&(r(14,i=P.getDerivedFromVars(C.paddings)),E(),E=p(i,(t=>r(43,w=t)))),268435456&t.$$.dirty[0]|512&t.$$.dirty[1]&&r(28,U=fn($,U)),301989888&t.$$.dirty[0]|4096&t.$$.dirty[1]&&(r(25,T=Oe(w||void 0,T)),r(26,z=T?ke({top:(Number(T.top)||0)/U*10,right:(Number(T.right)||0)/U*10,bottom:(Number(T.bottom)||0)/U*10,left:(Number(T.left)||0)/U*10}):"")),2048&t.$$.dirty[1]&&r(13,o=_),134217728&t.$$.dirty[0]|1024&t.$$.dirty[1]&&r(27,B=ae(b,1,B)),536870912&t.$$.dirty[0]|384&t.$$.dirty[1]&&(r(29,q=hn(y,q)),r(30,G=v&&"string"==typeof v?P.typefaceProvider(v,{fontWeight:q||400}):"")),268435456&t.$$.dirty[0]|64&t.$$.dirty[1]){const t=m;He(t)&&r(31,X=t/U)}268435456&t.$$.dirty[0]|32&t.$$.dirty[1]&&Ee(h)&&r(32,Z=re(h/U*10)),20&t.$$.dirty[1]&&r(33,tt=ae(g,1,tt)),1&t.$$.dirty[0]&&(r(12,a=P.getDerivedFromVars(C.accessibility)),k(),k=p(a,(t=>r(34,d=t)))),8&t.$$.dirty[1]&&((null==d?void 0:d.description)?r(7,et=d.description):P.logError(Qt(new Error('Missing accessibility "description" for select'),{level:"warn"}))),16&t.$$.dirty[0]&&r(11,s={hint:!M}),1744830464&t.$$.dirty[0]|4&t.$$.dirty[1]&&r(10,l={"--divkit-input-hint-color":B,"font-weight":q,"font-family":G,color:tt}),335544320&t.$$.dirty[0]|3&t.$$.dirty[1]&&r(9,c={padding:z,"font-size":re(U),"line-height":X,"letter-spacing":Z}),268435456&t.$$.dirty[0]|3&t.$$.dirty[1]&&r(8,u={"font-size":re(U),"line-height":X,"letter-spacing":Z})},[C,A,V,j,M,x,F,et,u,c,l,s,a,o,i,S,I,J,R,L,W,H,K,Y,Q,T,z,B,U,q,G,X,Z,tt,d,g,h,m,v,y,$,b,_,w,function(){x=function(t){const e=t.querySelector(":checked");return e&&e.__value}(this),S.set(x),r(16,I)}]}const _a={video__video:"divkit-c11f9","video__aspect-wrapper":"divkit-cfe32",video_aspect:"divkit-a4f5c"};function wa(t,e,n){const r=t.slice();return r[41]=e[n],r}function xa(t,e,n){const r=t.slice();return r[41]=e[n],r}function ka(t){let e,n;return e=new dn({props:{cls:we("video",_a,t[13]),customActions:"video",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[ja]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};8192&n[0]&&(r.cls=we("video",_a,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]),15344&n[0]|32768&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function Ea(t){let e,n,r,i,o,a=Nt(t[4]),l=[];for(let e=0;e<a.length;e+=1)l[e]=Aa(wa(t,a,e));return{c(){e=M("video");for(let t=0;t<l.length;t+=1)l[t].c();L(e,"class",n=_a.video__video),L(e,"style",r=ne(t[12])),e.playsInline=!0,e.loop=t[5],e.autoplay=t[6],e.muted=t[7],L(e,"poster",t[8])},m(n,r){N(n,e,r);for(let t=0;t<l.length;t+=1)l[t]&&l[t].m(e,null);t[36](e),i||(o=[B(e,"timeupdate",t[21]),B(e,"ended",t[22]),B(e,"playing",t[23]),B(e,"pause",t[24]),B(e,"waiting",t[25]),B(e,"error",t[26])],i=!0)},p(t,n){if(67108880&n[0]){let r;for(a=Nt(t[4]),r=0;r<a.length;r+=1){const i=wa(t,a,r);l[r]?l[r].p(i,n):(l[r]=Aa(i),l[r].c(),l[r].m(e,null))}for(;r<l.length;r+=1)l[r].d(1);l.length=a.length}4096&n[0]&&r!==(r=ne(t[12]))&&L(e,"style",r),32&n[0]&&(e.loop=t[5]),64&n[0]&&(e.autoplay=t[6]),128&n[0]&&(e.muted=t[7]),256&n[0]&&L(e,"poster",t[8])},d(n){n&&O(e),I(l,n),t[36](null),i=!1,s(o)}}}function Ca(t){let e,n,r,i,o,a,l,c="".concat(t[9],"%"),u=Nt(t[4]),d=[];for(let e=0;e<u.length;e+=1)d[e]=Va(xa(t,u,e));return{c(){e=M("div"),n=M("video");for(let t=0;t<d.length;t+=1)d[t].c();L(n,"class",r=_a.video__video),L(n,"style",i=ne(t[12])),n.playsInline=!0,n.loop=t[5],n.autoplay=t[6],n.muted=t[7],L(n,"poster",t[8]),L(e,"class",o=_a["video__aspect-wrapper"]),K(e,"padding-bottom",c)},m(r,i){N(r,e,i),D(e,n);for(let t=0;t<d.length;t+=1)d[t]&&d[t].m(n,null);t[35](n),a||(l=[B(n,"timeupdate",t[21]),B(n,"ended",t[22]),B(n,"playing",t[23]),B(n,"pause",t[24]),B(n,"waiting",t[25]),B(n,"error",t[26])],a=!0)},p(t,r){if(67108880&r[0]){let e;for(u=Nt(t[4]),e=0;e<u.length;e+=1){const i=xa(t,u,e);d[e]?d[e].p(i,r):(d[e]=Va(i),d[e].c(),d[e].m(n,null))}for(;e<d.length;e+=1)d[e].d(1);d.length=u.length}4096&r[0]&&i!==(i=ne(t[12]))&&L(n,"style",i),32&r[0]&&(n.loop=t[5]),64&r[0]&&(n.autoplay=t[6]),128&r[0]&&(n.muted=t[7]),256&r[0]&&L(n,"poster",t[8]),512&r[0]&&c!==(c="".concat(t[9],"%"))&&K(e,"padding-bottom",c)},d(n){n&&O(e),I(d,n),t[35](null),a=!1,s(l)}}}function Aa(t){let e,n,r,i,o;return{c(){e=M("source"),u(e.src,n=t[41].src)||L(e,"src",n),L(e,"type",r=t[41].type)},m(n,r){N(n,e,r),i||(o=B(e,"error",t[26]),i=!0)},p(t,i){16&i[0]&&!u(e.src,n=t[41].src)&&L(e,"src",n),16&i[0]&&r!==(r=t[41].type)&&L(e,"type",r)},d(t){t&&O(e),i=!1,o()}}}function Va(t){let e,n,r,i,o;return{c(){e=M("source"),u(e.src,n=t[41].src)||L(e,"src",n),L(e,"type",r=t[41].type)},m(n,r){N(n,e,r),i||(o=B(e,"error",t[26]),i=!0)},p(t,i){16&i[0]&&!u(e.src,n=t[41].src)&&L(e,"src",n),16&i[0]&&r!==(r=t[41].type)&&L(e,"type",r)},d(t){t&&O(e),i=!1,o()}}}function ja(t){let e;function n(t,e){return t[13].aspect?Ca:Ea}let r=n(t),i=r(t);return{c(){i.c(),e=R()},m(t,n){i.m(t,n),N(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){t&&O(e),i.d(t)}}}function Pa(t){let e,n,r=!t[10]&&ka(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[10]?r&&(Vt(),Dt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),1024&n[0]&&Pt(r,1)):(r=ka(t),r.c(),Pt(r,1),r.m(e.parentNode,e))},i(t){n||(Pt(r),n=!0)},o(t){Dt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function Da(t,e,r){let i,o,a,s,l,c,u,d,g,h,m,v=n,y=n;t.$$.on_destroy.push((()=>v())),t.$$.on_destroy.push((()=>y()));let{json:$={}}=e,{templateContext:b}=e,{origJson:_}=e,{layoutParams:w}=e;const x=lt(Zt);let k,E=!1,C=!1;const A=x.getDerivedFromVars($.video_sources);f(t,A,(t=>r(34,m=t)));let V=[];const j=x.getDerivedFromVars($.repeatable);f(t,j,(t=>r(33,h=t)));let P=!1;const D=x.getDerivedFromVars($.autostart);f(t,D,(t=>r(32,g=t)));let F=!1;const S=x.getDerivedFromVars($.muted);f(t,S,(t=>r(31,d=t)));let N=!1;const O=x.getDerivedFromVars($.preview);let I;f(t,O,(t=>r(30,u=t)));let M="fit",T="0";const z=$.elapsed_time_variable;let J=z&&x.getVariable(z,"integer")||Io("temp","integer",0);return J.subscribe((t=>{C?C=!1:k&&r(11,k.currentTime=Number(t)/1e3,k)})),!$.id||E||(null==w?void 0:w.fakeElement)||x.registerInstance($.id,{pause(){null==k||k.pause()},start(){const t=null==k?void 0:k.play();t&&t.catch((t=>{x.logError(Qt(new Error("Video playing error"),{level:"error",additional:{originalText:String(t)}}))}))}}),at((()=>{!$.id||E||(null==w?void 0:w.fakeElement)||x.unregisterInstance($.id)})),t.$$set=t=>{"json"in t&&r(0,$=t.json),"templateContext"in t&&r(1,b=t.templateContext),"origJson"in t&&r(2,_=t.origJson),"layoutParams"in t&&r(3,w=t.layoutParams)},t.$$.update=()=>{var e,n;if(16&t.$$.dirty[0]|8&t.$$.dirty[1]&&(r(4,(e=m,n=V,V=Array.isArray(e)&&e.length?e.filter((t=>"video_source"===(null==t?void 0:t.type)&&"string"==typeof t.url&&"string"==typeof t.mime_type)).map((t=>{const e={src:t.url};return t.mime_type&&(e.type=t.mime_type),e})):n)),V.length?r(10,E=!1):(r(10,E=!0),x.logError(Qt(new Error('Missing "video_sources" in "video"'))))),32&t.$$.dirty[0]|4&t.$$.dirty[1]&&r(5,P=xn(h,P)),64&t.$$.dirty[0]|2&t.$$.dirty[1]&&r(6,F=xn(g,F)),128&t.$$.dirty[0]|1&t.$$.dirty[1]&&r(7,N=xn(d,N)),1073742080&t.$$.dirty[0]&&r(8,I="string"==typeof u?hr(u):I),1&t.$$.dirty[0]&&(r(15,i=x.getDerivedFromVars($.scale)),y(),y=p(i,(t=>r(29,c=t)))),671088640&t.$$.dirty[0]&&r(27,M=function(t){return"fill"===t?"cover":"no_scale"===t?"none":"contain"}(c)||M),1&t.$$.dirty[0]&&(r(14,o=x.getDerivedFromVars($.aspect)),v(),v=p(o,(t=>r(28,l=t)))),268435456&t.$$.dirty[0]){const t=null==l?void 0:l.ratio;t&&He(t)?r(9,T=(100/Number(t)).toFixed(2)):r(9,T="0")}512&t.$$.dirty[0]&&r(13,a={aspect:"0"!==T}),134217728&t.$$.dirty[0]&&r(12,s={"object-fit":M})},[$,b,_,w,V,P,F,N,I,T,E,k,s,a,o,i,A,j,D,S,O,function(){k&&(C=!0,J.setValue(Math.floor(1e3*k.currentTime)))},function(){const t=x.getJsonWithVars($.end_actions);x.execAnyActions(t)},function(){const t=x.getJsonWithVars($.resume_actions);x.execAnyActions(t)},function(){const t=x.getJsonWithVars($.pause_actions);x.execAnyActions(t)},function(){const t=x.getJsonWithVars($.buffering_actions);x.execAnyActions(t)},function(){const t=x.getJsonWithVars($.fatal_actions);x.execAnyActions(t)},M,l,c,u,d,g,h,m,function(t){dt[t?"unshift":"push"]((()=>{k=t,r(11,k)}))},function(t){dt[t?"unshift":"push"]((()=>{k=t,r(11,k)}))}]}function Fa(t,e,n){const r=t.slice();return r[15]=e[n],r}function Sa(t){let e,n;return e=new dn({props:{json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[za]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(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]),266225&n&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function Na(t){let e,n=[t[9]],r={};for(let t=0;t<n.length;t+=1)r=i(r,n[t]);return{c(){e=M("template"),W(e,r)},m(n,r){N(n,e,r),e.content.innerHTML=t[8]},p(t,i){256&i&&(e.content.innerHTML=t[8]),W(e,r=Mt(n,[512&i&&t[9]]))},d(t){t&&O(e)}}}function Oa(t){let e,r,i=t[6],o=Ma(t);return{c(){o.c(),e=R()},m(t,n){o.m(t,n),N(t,e,n),r=!0},p(t,r){64&r&&d(i,i=t[6])?(Vt(),Dt(o,1,1,n),jt(),o=Ma(t),o.c(),Pt(o,1),o.m(e.parentNode,e)):o.p(t,r)},i(t){r||(Pt(o),r=!0)},o(t){Dt(o),r=!1},d(t){t&&O(e),o.d(t)}}}function Ia(t){let e,n;return e=new Ha({props:{layoutParams:t[10],div:t[15].json,templateContext:t[15].templateContext,origJson:t[15].origJson}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};1024&n&&(r.layoutParams=t[10]),2048&n&&(r.div=t[15].json),2048&n&&(r.templateContext=t[15].templateContext),2048&n&&(r.origJson=t[15].origJson),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function Ma(t){let e,n,r=Nt(t[11]),i=[];for(let e=0;e<r.length;e+=1)i[e]=Ia(Fa(t,r,e));const o=t=>Dt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=R()},m(t,r){for(let e=0;e<i.length;e+=1)i[e]&&i[e].m(t,r);N(t,e,r),n=!0},p(t,n){if(3072&n){let a;for(r=Nt(t[11]),a=0;a<r.length;a+=1){const o=Fa(t,r,a);i[a]?(i[a].p(o,n),Pt(i[a],1)):(i[a]=Ia(o),i[a].c(),Pt(i[a],1),i[a].m(e.parentNode,e))}for(Vt(),a=r.length;a<i.length;a+=1)o(a);jt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)Pt(i[t]);n=!0}},o(t){i=i.filter(Boolean);for(let t=0;t<i.length;t+=1)Dt(i[t]);n=!1},d(t){t&&O(e),I(i,t)}}}function Ta(t){let e,n,r,o=t[8]&&Na(t),a=!t[5]&&t[6]&&Oa(t),s=[t[0].custom_props||{}],l={};for(let t=0;t<s.length;t+=1)l=i(l,s[t]);return{c(){e=M(t[4].element),o&&o.c(),n=J(),a&&a.c(),q(t[4].element)(e,l)},m(i,s){N(i,e,s),o&&o.m(e,null),D(e,n),a&&a.m(e,null),t[13](e),r=!0},p(t,r){t[8]?o?o.p(t,r):(o=Na(t),o.c(),o.m(e,n)):o&&(o.d(1),o=null),!t[5]&&t[6]?a?(a.p(t,r),96&r&&Pt(a,1)):(a=Oa(t),a.c(),Pt(a,1),a.m(e,null)):a&&(Vt(),Dt(a,1,1,(()=>{a=null})),jt()),q(t[4].element)(e,l=Mt(s,[1&r&&(t[0].custom_props||{})]))},i(t){r||(Pt(a),r=!0)},o(t){Dt(a),r=!1},d(n){n&&O(e),o&&o.d(),a&&a.d(),t[13](null)}}}function za(t){let e,r,i=t[4].element,o=t[4].element&&Ta(t);return{c(){o&&o.c(),e=R()},m(t,n){o&&o.m(t,n),N(t,e,n)},p(t,n){t[4].element?i?d(i,t[4].element)?(o.d(1),o=Ta(t),i=t[4].element,o.c(),o.m(e.parentNode,e)):o.p(t,n):(o=Ta(t),i=t[4].element,o.c(),o.m(e.parentNode,e)):i&&(o.d(1),o=null,i=t[4].element)},i:n,o(t){Dt(o,t),r=!1},d(t){t&&O(e),o&&o.d(t)}}}function Ja(t){let e,n,r=t[4]&&Sa(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){let[i]=n;t[4]?r?(r.p(t,i),16&i&&Pt(r,1)):(r=Sa(t),r.c(),Pt(r,1),r.m(e.parentNode,e)):r&&(Vt(),Dt(r,1,1,(()=>{r=null})),jt())},i(t){n||(Pt(r),n=!0)},o(t){Dt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function Ra(t,e,n){let r,i,o;var a;let{json:s={}}=e,{templateContext:l}=e,{origJson:c}=e,{layoutParams:u}=e;const d=lt(Zt);let p,f=null,g="",h={},m=!1;return ot((()=>{if(p&&"divKitApiCallback"in p&&"function"==typeof p.divKitApiCallback){const t=d.getExtensionContext();p.divKitApiCallback(t)}})),t.$$set=t=>{"json"in t&&n(0,s=t.json),"templateContext"in t&&n(1,l=t.templateContext),"origJson"in t&&n(2,c=t.origJson),"layoutParams"in t&&n(3,u=t.layoutParams)},t.$$.update=()=>{if(4113&t.$$.dirty)if("string"==typeof s.custom_type&&s.custom_type&&(null===n(12,a=d.customComponents)||void 0===a?void 0:a.has(s.custom_type))){if(n(4,f=d.customComponents.get(s.custom_type)),"function"==typeof f.template){const t=d.getExtensionContext(),e=new Map;for(const[n,r]of t.variables)e.set(n,r.getValue());n(8,g=f.template({props:s.custom_props,variables:e}))}else f.template&&"string"==typeof f.template?n(8,g=f.template):n(8,g="");n(9,h={shadowrootmode:f.shadowRootMode||"open"})}else n(4,f=null),n(8,g=";"),d.logError(Qt(new Error('Unknown or incorrect "custom_type" prop for div "custom"')));1&t.$$.dirty&&n(6,r=s.items),64&t.$$.dirty&&(void 0===r||Array.isArray(r)?n(5,m=!1):(n(5,m=!0),d.logError(Qt(new Error('Incorrect "items" prop for div "custom"'))))),98&t.$$.dirty&&n(11,i=(!m&&r||[]).map((t=>{let e=t,n=l;return({templateContext:n,json:e}=d.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),8&t.$$.dirty&&n(10,o={fakeElement:null==u?void 0:u.fakeElement})},[s,l,c,u,f,m,r,p,g,h,o,i,a,function(t){dt[t?"unshift":"push"]((()=>{p=t,n(7,p)}))}]}const Ba={};function La(t){let e,n,r;var i=t[5];function o(t,e){return{props:{json:t[3],templateContext:t[4],layoutParams:t[2],origJson:t[1]||t[0]}}}return i&&(e=Y(i,o(t))),{c(){e&&Bt(e.$$.fragment),n=R()},m(t,i){e&&Lt(e,t,i),N(t,n,i),r=!0},p(t,r){if(32&r&&i!==(i=t[5])){if(e){Vt();const t=e;Dt(t.$$.fragment,1,0,(()=>{Ut(t,1)})),jt()}i?(e=Y(i,o(t)),Bt(e.$$.fragment),Pt(e.$$.fragment,1),Lt(e,n.parentNode,n)):e=null}else if(i){const n={};8&r&&(n.json=t[3]),16&r&&(n.templateContext=t[4]),4&r&&(n.layoutParams=t[2]),3&r&&(n.origJson=t[1]||t[0]),e.$set(n)}},i(t){r||(e&&Pt(e.$$.fragment,t),r=!0)},o(t){e&&Dt(e.$$.fragment,t),r=!1},d(t){t&&O(n),e&&Ut(e,t)}}}function Ua(t){let e,n,r=t[5]&&La(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){let[i]=n;t[5]?r?(r.p(t,i),32&i&&Pt(r,1)):(r=La(t),r.c(),Pt(r,1),r.m(e.parentNode,e)):r&&(Vt(),Dt(r,1,1,(()=>{r=null})),jt())},i(t){n||(Pt(r),n=!0)},o(t){Dt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function Wa(t,e,n){let{div:r}=e,{templateContext:i}=e,{origJson:o}=e,{layoutParams:a}=e;const s=lt(Zt);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&&Ba[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&&Ba[l.type]||void 0),!u))){let t;t=(null==l?void 0:l.type)&&s.hasTemplate(l.type)?"Recursive template":"Unknown component",s.logError(Qt(new Error(t),{additional:{component:(null==l?void 0:l.type)||"<missing>"}}))}},[r,o,a,l,c,u,i]}Ba.text=class extends qt{constructor(t){super(),Wt(this,t,In,On,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Ba.container=class extends qt{constructor(t){super(),Wt(this,t,sr,ar,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Ba.separator=class extends qt{constructor(t){super(),Wt(this,t,fr,pr,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}},Ba.image=Er,Ba.gif=Er,Ba.grid=class extends qt{constructor(t){super(),Wt(this,t,Ir,Or,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Ba.gallery=class extends qt{constructor(t){super(),Wt(this,t,Zr,Yr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},Ba.tabs=class extends qt{constructor(t){super(),Wt(this,t,hi,gi,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1,-1])}},Ba.state=class extends qt{constructor(t){super(),Wt(this,t,oo,ro,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Ba.pager=class extends qt{constructor(t){super(),Wt(this,t,ho,go,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Ba.indicator=class extends qt{constructor(t){super(),Wt(this,t,wo,_o,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Ba.slider=class extends qt{constructor(t){super(),Wt(this,t,qo,Wo,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},Ba.input=class extends qt{constructor(t){super(),Wt(this,t,fa,da,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},Ba.select=class extends qt{constructor(t){super(),Wt(this,t,ba,$a,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Ba.video=class extends qt{constructor(t){super(),Wt(this,t,Da,Pa,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Ba.custom=class extends qt{constructor(t){super(),Wt(this,t,Ra,Ja,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}};const Ha=class extends qt{constructor(t){super(),Wt(this,t,Wa,Ua,d,{div:0,templateContext:6,origJson:1,layoutParams:2})}},qa={"root-svg-filters":"divkit-dc22b"};function Ga(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 Ka(t){let e,n,r,i=Nt([...Object.keys(t[0])]),o=[];for(let e=0;e<i.length;e+=1)o[e]=Qa(Ga(t,i,e));return{c(){e=T("svg"),n=T("defs");for(let t=0;t<o.length;t+=1)o[t].c();L(e,"class",r=qa["root-svg-filters"]),L(e,"aria-hidden","true")},m(t,r){N(t,e,r),D(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=Nt([...Object.keys(t[0])]),r=0;r<i.length;r+=1){const a=Ga(t,i,r);o[r]?o[r].p(a,e):(o[r]=Qa(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&&O(e),I(o,t)}}}function Xa(t){let e,n;return{c(){e=T("feBlend"),L(e,"in2","SourceGraphic"),L(e,"mode",n=t[3])},m(t,n){N(t,e,n)},p(t,r){1&r&&n!==(n=t[3])&&L(e,"mode",n)},d(t){t&&O(e)}}}function Ya(t){let e;return{c(){e=T("feComposite"),L(e,"in2","SourceGraphic"),L(e,"operator","arithmetic"),L(e,"k1","1"),L(e,"k2","0"),L(e,"k3","0"),L(e,"k4","0")},m(t,n){N(t,e,n)},p:n,d(t){t&&O(e)}}}function Za(t){let e,n;return{c(){e=T("feComposite"),L(e,"in2","SourceGraphic"),L(e,"operator",n=t[3].split("_")[1])},m(t,n){N(t,e,n)},p(t,r){1&r&&n!==(n=t[3].split("_")[1])&&L(e,"operator",n)},d(t){t&&O(e)}}}function Qa(t){let e,n,r,i;function o(t,e){return"source_in"===t[3]||"source_atop"===t[3]?Za:"multiply"===t[3]?Ya:Xa}let a=o(t),s=a(t);return{c(){e=T("filter"),n=T("feFlood"),s.c(),L(n,"flood-color",r=t[2]),L(e,"id",i=t[0][t[1]])},m(t,r){N(t,e,r),D(e,n),s.m(e,null)},p(t,l){1&l&&r!==(r=t[2])&&L(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]])&&L(e,"id",i)},d(t){t&&O(e),s.d()}}}function ts(t){let e,r=Object.keys(t[0]).length,i=r&&Ka(t);return{c(){i&&i.c(),e=R()},m(t,n){i&&i.m(t,n),N(t,e,n)},p(t,n){let[o]=n;1&o&&(r=Object.keys(t[0]).length),r?i?i.p(t,o):(i=Ka(t),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null)},i:n,o:n,d(t){t&&O(e),i&&i.d(t)}}}function es(t,e,n){let{svgFiltersMap:r}=e;return t.$$set=t=>{"svgFiltersMap"in t&&n(0,r=t.svgFiltersMap)},[r]}const ns=class extends qt{constructor(t){super(),Wt(this,t,es,ts,d,{svgFiltersMap:0})}};function rs(t,e,n,r){const i=n[t.type];if(!i)return r(Qt(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 is(){}function os(t){return{subscribe:e=>(e(t),is)}}function as(t,e){return e.reduce(((t,e)=>({type:"BinaryExpression",operator:e[1],left:t,right:e[3]})),t)}function ss(t,e){return e.reduce(((t,e)=>({type:"LogicalExpression",operator:e[1],left:t,right:e[3]})),t)}function ls(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 cs(t){try{return Po(t)}catch(e){throw new Error("Value ".concat(t," can't be converted to Integer type."))}}function us(t){if("'"===t||"\\"===t)return t;throw new Error("Incorrect string escape")}function ds(t,e,n,r){var i=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(i,ds.prototype),i.expected=e,i.found=n,i.location=r,i.name="SyntaxError",i}function ps(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,t+(n+=n.repeat(e)).slice(0,e))}function fs(t,e){var n,r={},i=(e=void 0!==e?e:{}).grammarSource,o={start:Ae,JsonStringContents:function(){var t,e,n;for(t=ge,e=[],n=Ve();n!==r;)e.push(n),n=Ve();return he=t,e=Dt(e)}},a=Ae,s="@{",l="}",c="@{}",u="\\",d="?",p=":",f="||",g="&&",h="==",m="!=",v=">=",y=">",$="<=",b="<",_="+",w="-",x="/",k="*",E="%",C="!",A="(",V=")",j=",",P="'",D=".",F="e",S="E",N="true",O="false",I=/^[^}]/,M=/^[^'}]/,T=/^[0-9]/,z=/^[a-zA-Z_0-9.]/,J=/^[a-zA-Z_]/,R=/^[ \t\r\n]/,B=_e("@{",!1),L=_e("}",!1),U=_e("@{}",!1),W=_e("\\",!1),H={type:"any"},q=we(["}"],!0,!1),G=_e("?",!1),K=_e(":",!1),X=_e("||",!1),Y=_e("&&",!1),Z=_e("==",!1),Q=_e("!=",!1),tt=_e(">=",!1),et=_e(">",!1),nt=_e("<=",!1),rt=_e("<",!1),it=_e("+",!1),ot=_e("-",!1),at=_e("/",!1),st=_e("*",!1),lt=_e("%",!1),ct=_e("!",!1),ut=_e("(",!1),dt=_e(")",!1),pt=_e(",",!1),ft=xe("string"),gt=_e("'",!1),ht=we(["'","}"],!0,!1),mt=xe("integer"),vt=we([["0","9"]],!1,!1),yt=xe("number"),$t=_e(".",!1),bt=_e("e",!1),_t=_e("E",!1),wt=xe("boolean"),xt=_e("true",!1),kt=_e("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},Dt=function(t){return ls(t)},Ft=function(t){return t},St=function(){return""},Nt=function(){return be()},Ot=function(){throw new Error("Error tokenizing '"+t+"'.")},It=function(){throw new Error("Error tokenizing '"+t+"'.")},Mt=function(t){return t},Tt=function(t){return us(t)},zt=function(){throw new Error("Error tokenizing '"+t+"'.")},Jt=function(t,e,n){return{type:"ConditionalExpression",test:t,consequent:e,alternate:n}},Rt=function(t,e){return ss(t,e)},Bt=function(t,e){return ss(t,e)},Lt=function(t,e){return as(t,e)},Ut=function(t,e){return as(t,e)},Wt=function(t,e){return as(t,e)},Ht=function(t,e){return as(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 ls(t)},te=function(t){return t},ee=function(){return""},ne=function(){return be()},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 us(t)},se=function(){throw new Error("Error tokenizing '"+t+"'.")},le=function(){return{type:"IntegerLiteral",value:cs(be())}},ce=function(){return{type:"NumberLiteral",value:parseFloat(be())}},ue=function(){return{type:"NumberLiteral",value:parseFloat(be())}},de=function(){return{type:"BooleanLiteral",value:!0}},pe=function(){return{type:"BooleanLiteral",value:!1}},fe=function(){return{type:"Identifier",name:be()}},ge=0,he=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 be(){return t.substring(he,ge)}function _e(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){ge<ve||(ge>ve&&(ve=ge,ye=[]),ye.push(t))}function Ae(){var t,e;return t=ge,Re(),(e=je())!==r?(Re(),he=t,t=Pt(e)):(ge=t,t=r),t}function Ve(){var e,n,i,o,a;if(e=ge,t.substr(ge,2)===s?(n=s,ge+=2):(n=r,0===$e&&Ce(B)),n!==r?(i=Re(),(o=je())!==r?(Re(),125===t.charCodeAt(ge)?(a=l,ge++):(a=r,0===$e&&Ce(L)),a!==r?(he=e,e=Ft(o)):(ge=e,e=r)):(ge=e,e=r)):(ge=e,e=r),e===r&&(e=ge,t.substr(ge,3)===c?(n=c,ge+=3):(n=r,0===$e&&Ce(U)),n!==r&&(he=e,n=St()),(e=n)===r&&(e=ge,n=ge,$e++,92===t.charCodeAt(ge)?(i=u,ge++):(i=r,0===$e&&Ce(W)),i===r&&(t.substr(ge,2)===s?(i=s,ge+=2):(i=r,0===$e&&Ce(B))),$e--,i===r?n=void 0:(ge=n,n=r),n!==r?(t.length>ge?(i=t.charAt(ge),ge++):(i=r,0===$e&&Ce(H)),i!==r?(he=e,e=Nt()):(ge=e,e=r)):(ge=e,e=r),e===r))){if(e=ge,t.substr(ge,2)===s?(n=s,ge+=2):(n=r,0===$e&&Ce(B)),n!==r){if(i=[],I.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(q)),o!==r)for(;o!==r;)i.push(o),I.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(q));else i=r;i!==r?(125===t.charCodeAt(ge)?(o=l,ge++):(o=r,0===$e&&Ce(L)),o!==r?(he=e,e=Ot()):(ge=e,e=r)):(ge=e,e=r)}else ge=e,e=r;e===r&&(e=ge,t.substr(ge,2)===s?(n=s,ge+=2):(n=r,0===$e&&Ce(B)),n!==r&&(he=e,n=It()),(e=n)===r&&(e=ge,92===t.charCodeAt(ge)?(n=u,ge++):(n=r,0===$e&&Ce(W)),n!==r?(t.substr(ge,2)===s?(i=s,ge+=2):(i=r,0===$e&&Ce(B)),i!==r?(he=e,e=Mt(i)):(ge=e,e=r)):(ge=e,e=r),e===r&&(e=ge,92===t.charCodeAt(ge)?(n=u,ge++):(n=r,0===$e&&Ce(W)),n!==r?(t.length>ge?(i=t.charAt(ge),ge++):(i=r,0===$e&&Ce(H)),i!==r?(he=e,e=Tt(i)):(ge=e,e=r)):(ge=e,e=r),e===r&&(e=ge,92===t.charCodeAt(ge)?(n=u,ge++):(n=r,0===$e&&Ce(W)),n!==r&&(he=e,n=zt()),e=n))))}return e}function je(){var e,n,i,o,a,s;return e=ge,(n=Pe())!==r?(Re(),63===t.charCodeAt(ge)?(i=d,ge++):(i=r,0===$e&&Ce(G)),i!==r?(Re(),(o=je())!==r?(Re(),58===t.charCodeAt(ge)?(a=p,ge++):(a=r,0===$e&&Ce(K)),a!==r?(Re(),(s=je())!==r?(he=e,e=Jt(n,o,s)):(ge=e,e=r)):(ge=e,e=r)):(ge=e,e=r)):(ge=e,e=r)):(ge=e,e=r),e===r&&(e=Pe()),e}function Pe(){var e,n,i,o,a,s,l,c;if(e=ge,(n=De())!==r){for(i=[],o=ge,a=Re(),t.substr(ge,2)===f?(s=f,ge+=2):(s=r,0===$e&&Ce(X)),s!==r?(l=Re(),(c=De())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);o!==r;)i.push(o),o=ge,a=Re(),t.substr(ge,2)===f?(s=f,ge+=2):(s=r,0===$e&&Ce(X)),s!==r?(l=Re(),(c=De())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);he=e,e=Rt(n,i)}else ge=e,e=r;return e}function De(){var e,n,i,o,a,s,l,c;if(e=ge,(n=Fe())!==r){for(i=[],o=ge,a=Re(),t.substr(ge,2)===g?(s=g,ge+=2):(s=r,0===$e&&Ce(Y)),s!==r?(l=Re(),(c=Fe())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);o!==r;)i.push(o),o=ge,a=Re(),t.substr(ge,2)===g?(s=g,ge+=2):(s=r,0===$e&&Ce(Y)),s!==r?(l=Re(),(c=Fe())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);he=e,e=Bt(n,i)}else ge=e,e=r;return e}function Fe(){var e,n,i,o,a,s,l,c;if(e=ge,(n=Se())!==r){for(i=[],o=ge,a=Re(),t.substr(ge,2)===h?(s=h,ge+=2):(s=r,0===$e&&Ce(Z)),s===r&&(t.substr(ge,2)===m?(s=m,ge+=2):(s=r,0===$e&&Ce(Q))),s!==r?(l=Re(),(c=Se())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);o!==r;)i.push(o),o=ge,a=Re(),t.substr(ge,2)===h?(s=h,ge+=2):(s=r,0===$e&&Ce(Z)),s===r&&(t.substr(ge,2)===m?(s=m,ge+=2):(s=r,0===$e&&Ce(Q))),s!==r?(l=Re(),(c=Se())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);he=e,e=Lt(n,i)}else ge=e,e=r;return e}function Se(){var e,n,i,o,a,s,l,c;if(e=ge,(n=Ne())!==r){for(i=[],o=ge,a=Re(),t.substr(ge,2)===v?(s=v,ge+=2):(s=r,0===$e&&Ce(tt)),s===r&&(62===t.charCodeAt(ge)?(s=y,ge++):(s=r,0===$e&&Ce(et)),s===r&&(t.substr(ge,2)===$?(s=$,ge+=2):(s=r,0===$e&&Ce(nt)),s===r&&(60===t.charCodeAt(ge)?(s=b,ge++):(s=r,0===$e&&Ce(rt))))),s!==r?(l=Re(),(c=Ne())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);o!==r;)i.push(o),o=ge,a=Re(),t.substr(ge,2)===v?(s=v,ge+=2):(s=r,0===$e&&Ce(tt)),s===r&&(62===t.charCodeAt(ge)?(s=y,ge++):(s=r,0===$e&&Ce(et)),s===r&&(t.substr(ge,2)===$?(s=$,ge+=2):(s=r,0===$e&&Ce(nt)),s===r&&(60===t.charCodeAt(ge)?(s=b,ge++):(s=r,0===$e&&Ce(rt))))),s!==r?(l=Re(),(c=Ne())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);he=e,e=Ut(n,i)}else ge=e,e=r;return e}function Ne(){var e,n,i,o,a,s,l,c;if(e=ge,(n=Oe())!==r){for(i=[],o=ge,a=Re(),43===t.charCodeAt(ge)?(s=_,ge++):(s=r,0===$e&&Ce(it)),s===r&&(45===t.charCodeAt(ge)?(s=w,ge++):(s=r,0===$e&&Ce(ot))),s!==r?(l=Re(),(c=Oe())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);o!==r;)i.push(o),o=ge,a=Re(),43===t.charCodeAt(ge)?(s=_,ge++):(s=r,0===$e&&Ce(it)),s===r&&(45===t.charCodeAt(ge)?(s=w,ge++):(s=r,0===$e&&Ce(ot))),s!==r?(l=Re(),(c=Oe())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);he=e,e=Wt(n,i)}else ge=e,e=r;return e}function Oe(){var e,n,i,o,a,s,l,c;if(e=ge,(n=Ie())!==r){for(i=[],o=ge,a=Re(),47===t.charCodeAt(ge)?(s=x,ge++):(s=r,0===$e&&Ce(at)),s===r&&(42===t.charCodeAt(ge)?(s=k,ge++):(s=r,0===$e&&Ce(st)),s===r&&(37===t.charCodeAt(ge)?(s=E,ge++):(s=r,0===$e&&Ce(lt)))),s!==r?(l=Re(),(c=Ie())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);o!==r;)i.push(o),o=ge,a=Re(),47===t.charCodeAt(ge)?(s=x,ge++):(s=r,0===$e&&Ce(at)),s===r&&(42===t.charCodeAt(ge)?(s=k,ge++):(s=r,0===$e&&Ce(st)),s===r&&(37===t.charCodeAt(ge)?(s=E,ge++):(s=r,0===$e&&Ce(lt)))),s!==r?(l=Re(),(c=Ie())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);he=e,e=Ht(n,i)}else ge=e,e=r;return e}function Ie(){var e,n,i;return(e=ze())===r&&(e=Te())===r&&(e=ge,33===t.charCodeAt(ge)?(n=C,ge++):(n=r,0===$e&&Ce(ct)),n===r&&(43===t.charCodeAt(ge)?(n=_,ge++):(n=r,0===$e&&Ce(it)),n===r&&(45===t.charCodeAt(ge)?(n=w,ge++):(n=r,0===$e&&Ce(ot)))),n!==r?(Re(),(i=Ie())!==r?(he=e,e=qt(n,i)):(ge=e,e=r)):(ge=e,e=r),e===r&&(e=function(){var e,n,i,o,a;return e=ge,(n=Je())!==r?(Re(),40===t.charCodeAt(ge)?(i=A,ge++):(i=r,0===$e&&Ce(ut)),i!==r?(Re(),o=function(){var e,n,i,o,a,s;if(e=ge,(n=je())!==r){for(i=[],o=ge,Re(),44===t.charCodeAt(ge)?(a=j,ge++):(a=r,0===$e&&Ce(pt)),a!==r?(Re(),(s=je())!==r?o=s:(ge=o,o=r)):(ge=o,o=r);o!==r;)i.push(o),o=ge,Re(),44===t.charCodeAt(ge)?(a=j,ge++):(a=r,0===$e&&Ce(pt)),a!==r?(Re(),(s=je())!==r?o=s:(ge=o,o=r)):(ge=o,o=r);he=e,e=Xt(n,i)}else ge=e,e=r;return e===r&&(e=Re()),e}(),o!==r?(Re(),41===t.charCodeAt(ge)?(a=V,ge++):(a=r,0===$e&&Ce(dt)),a!==r?(he=e,e=Gt(n,o)):(ge=e,e=r)):(ge=e,e=r)):(ge=e,e=r)):(ge=e,e=r),e===r&&(e=ge,(n=Je())!==r&&(he=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=ge,39===t.charCodeAt(ge)?(n=P,ge++):(n=r,0===$e&&Ce(gt)),n!==r?(i=function(){var t,e,n;for(t=ge,e=[],n=Me();n!==r;)e.push(n),n=Me();return he=t,t=e=Qt(e)}(),39===t.charCodeAt(ge)?(o=P,ge++):(o=r,0===$e&&Ce(gt)),o!==r?(he=e,e=Zt(i)):(ge=e,e=r)):(ge=e,e=r),$e--,e===r&&(n=r,0===$e&&Ce(ft)),e}(),e===r&&(e=ze())===r&&(e=Te())===r&&(e=function(){var e,n;return $e++,e=ge,t.substr(ge,4)===N?(n=N,ge+=4):(n=r,0===$e&&Ce(xt)),n!==r&&(he=e,n=de()),(e=n)===r&&(e=ge,t.substr(ge,5)===O?(n=O,ge+=5):(n=r,0===$e&&Ce(kt)),n!==r&&(he=e,n=pe()),e=n),$e--,e===r&&(n=r,0===$e&&Ce(wt)),e}(),e===r&&(e=ge,40===t.charCodeAt(ge)?(n=A,ge++):(n=r,0===$e&&Ce(ut)),n!==r&&(i=je())!==r?(41===t.charCodeAt(ge)?(o=V,ge++):(o=r,0===$e&&Ce(dt)),o!==r?(he=e,e=Yt(i)):(ge=e,e=r)):(ge=e,e=r))),e}())),e}())),e}function Me(){var e,n,i,o,a;if(e=ge,t.substr(ge,2)===s?(n=s,ge+=2):(n=r,0===$e&&Ce(B)),n!==r?(i=Re(),(o=je())!==r?(Re(),125===t.charCodeAt(ge)?(a=l,ge++):(a=r,0===$e&&Ce(L)),a!==r?(he=e,e=te(o)):(ge=e,e=r)):(ge=e,e=r)):(ge=e,e=r),e===r&&(e=ge,t.substr(ge,3)===c?(n=c,ge+=3):(n=r,0===$e&&Ce(U)),n!==r&&(he=e,n=ee()),(e=n)===r&&(e=ge,n=ge,$e++,92===t.charCodeAt(ge)?(i=u,ge++):(i=r,0===$e&&Ce(W)),i===r&&(39===t.charCodeAt(ge)?(i=P,ge++):(i=r,0===$e&&Ce(gt)),i===r&&(t.substr(ge,2)===s?(i=s,ge+=2):(i=r,0===$e&&Ce(B)))),$e--,i===r?n=void 0:(ge=n,n=r),n!==r?(t.length>ge?(i=t.charAt(ge),ge++):(i=r,0===$e&&Ce(H)),i!==r?(he=e,e=ne()):(ge=e,e=r)):(ge=e,e=r),e===r))){if(e=ge,t.substr(ge,2)===s?(n=s,ge+=2):(n=r,0===$e&&Ce(B)),n!==r){if(i=[],M.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(ht)),o!==r)for(;o!==r;)i.push(o),M.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(ht));else i=r;i!==r?(125===t.charCodeAt(ge)?(o=l,ge++):(o=r,0===$e&&Ce(L)),o!==r?(he=e,e=re()):(ge=e,e=r)):(ge=e,e=r)}else ge=e,e=r;e===r&&(e=ge,t.substr(ge,2)===s?(n=s,ge+=2):(n=r,0===$e&&Ce(B)),n!==r&&(he=e,n=ie()),(e=n)===r&&(e=ge,92===t.charCodeAt(ge)?(n=u,ge++):(n=r,0===$e&&Ce(W)),n!==r?(t.substr(ge,2)===s?(i=s,ge+=2):(i=r,0===$e&&Ce(B)),i!==r?(he=e,e=oe(i)):(ge=e,e=r)):(ge=e,e=r),e===r&&(e=ge,92===t.charCodeAt(ge)?(n=u,ge++):(n=r,0===$e&&Ce(W)),n!==r?(t.length>ge?(i=t.charAt(ge),ge++):(i=r,0===$e&&Ce(H)),i!==r?(he=e,e=ae(i)):(ge=e,e=r)):(ge=e,e=r),e===r&&(e=ge,92===t.charCodeAt(ge)?(n=u,ge++):(n=r,0===$e&&Ce(W)),n!==r&&(he=e,n=se()),e=n))))}return e}function Te(){var e,n,i,o;if($e++,e=ge,45===t.charCodeAt(ge)?(n=w,ge++):(n=r,0===$e&&Ce(ot)),n===r&&(n=null),i=[],T.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(vt)),o!==r)for(;o!==r;)i.push(o),T.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(vt));else i=r;return i!==r?(he=e,e=le()):(ge=e,e=r),$e--,e===r&&(n=r,0===$e&&Ce(mt)),e}function ze(){var e,n,i,o,a,s,l,c,u,d;for($e++,e=ge,45===t.charCodeAt(ge)?(n=w,ge++):(n=r,0===$e&&Ce(ot)),n===r&&(n=null),i=[],T.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(vt));o!==r;)i.push(o),T.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(vt));if(46===t.charCodeAt(ge)?(o=D,ge++):(o=r,0===$e&&Ce($t)),o!==r){if(a=[],T.test(t.charAt(ge))?(s=t.charAt(ge),ge++):(s=r,0===$e&&Ce(vt)),s!==r)for(;s!==r;)a.push(s),T.test(t.charAt(ge))?(s=t.charAt(ge),ge++):(s=r,0===$e&&Ce(vt));else a=r;if(a!==r){if(s=ge,101===t.charCodeAt(ge)?(l=F,ge++):(l=r,0===$e&&Ce(bt)),l===r&&(69===t.charCodeAt(ge)?(l=S,ge++):(l=r,0===$e&&Ce(_t))),l!==r){if(43===t.charCodeAt(ge)?(c=_,ge++):(c=r,0===$e&&Ce(it)),c===r&&(45===t.charCodeAt(ge)?(c=w,ge++):(c=r,0===$e&&Ce(ot))),c===r&&(c=null),u=[],T.test(t.charAt(ge))?(d=t.charAt(ge),ge++):(d=r,0===$e&&Ce(vt)),d!==r)for(;d!==r;)u.push(d),T.test(t.charAt(ge))?(d=t.charAt(ge),ge++):(d=r,0===$e&&Ce(vt));else u=r;u!==r?s=l=[l,c,u]:(ge=s,s=r)}else ge=s,s=r;s===r&&(s=null),he=e,e=ce()}else ge=e,e=r}else ge=e,e=r;if(e===r){if(e=ge,45===t.charCodeAt(ge)?(n=w,ge++):(n=r,0===$e&&Ce(ot)),n===r&&(n=null),i=[],T.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(vt)),o!==r)for(;o!==r;)i.push(o),T.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(vt));else i=r;if(i!==r)if(101===t.charCodeAt(ge)?(o=F,ge++):(o=r,0===$e&&Ce(bt)),o===r&&(69===t.charCodeAt(ge)?(o=S,ge++):(o=r,0===$e&&Ce(_t))),o!==r){if(43===t.charCodeAt(ge)?(a=_,ge++):(a=r,0===$e&&Ce(it)),a===r&&(45===t.charCodeAt(ge)?(a=w,ge++):(a=r,0===$e&&Ce(ot))),a===r&&(a=null),s=[],T.test(t.charAt(ge))?(l=t.charAt(ge),ge++):(l=r,0===$e&&Ce(vt)),l!==r)for(;l!==r;)s.push(l),T.test(t.charAt(ge))?(l=t.charAt(ge),ge++):(l=r,0===$e&&Ce(vt));else s=r;s!==r?(he=e,e=ue()):(ge=e,e=r)}else ge=e,e=r;else ge=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=ge,n=ge,$e++,i=function(){var e,n,i,o;return e=ge,t.substr(ge,4)===N?(n=N,ge+=4):(n=r,0===$e&&Ce(xt)),n===r&&(t.substr(ge,5)===O?(n=O,ge+=5):(n=r,0===$e&&Ce(kt))),n!==r?(i=ge,$e++,z.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(Et)),$e--,o===r?i=void 0:(ge=i,i=r),i!==r?e=n=[n,i]:(ge=e,e=r)):(ge=e,e=r),e}(),$e--,i===r?n=void 0:(ge=n,n=r),n!==r)if(J.test(t.charAt(ge))?(i=t.charAt(ge),ge++):(i=r,0===$e&&Ce(At)),i!==r){for(o=[],z.test(t.charAt(ge))?(a=t.charAt(ge),ge++):(a=r,0===$e&&Ce(Et));a!==r;)o.push(a),z.test(t.charAt(ge))?(a=t.charAt(ge),ge++):(a=r,0===$e&&Ce(Et));he=e,e=fe()}else ge=e,e=r;else ge=e,e=r;return $e--,e===r&&(n=r,0===$e&&Ce(Ct)),e}function Re(){var e,n;for($e++,e=[],R.test(t.charAt(ge))?(n=t.charAt(ge),ge++):(n=r,0===$e&&Ce(jt));n!==r;)e.push(n),R.test(t.charAt(ge))?(n=t.charAt(ge),ge++):(n=r,0===$e&&Ce(jt));return $e--,n=r,0===$e&&Ce(Vt),e}if((n=a())!==r&&ge===t.length)return n;throw n!==r&&ge<t.length&&Ce({type:"end"}),function(t,e,n){return new ds(ds.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}(ds,Error),ds.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=ps("",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+" | "+ps("",i.column-1," ")+ps("",u,"^")}else e+="\n at "+a}return e},ds.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 gs=new Map,hs=new Map;function ms(t,e,n){const r={args:e,cb:n},i=gs.get(t)||[];gs.has(t)||gs.set(t,i),i.push(r);const o=t+":"+e.map((t=>"object"==typeof t?t.type:t)).join("#");hs.set(o,r)}function vs(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 ys(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=>{ys(t,e)}));break;case"BinaryExpression":case"LogicalExpression":ys(t.left,e),ys(t.right,e);break;case"UnaryExpression":ys(t.argument,e);break;case"ConditionalExpression":ys(t.test,e),ys(t.consequent,e),ys(t.alternate,e);break;case"CallExpression":t.arguments.forEach((t=>{ys(t,e)}))}}function $s(t){return"url"===t.type||"color"===t.type?{type:"string",value:t.value}:t}function bs(t){return t.toISOString().replace("T"," ").replace(/\.\d{3}Z$/,"")}function _s(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 bs(t.value);if("color"===t.type)return js(Vs(t.value));if("url"===t.type)return t.value;if("dict"===t.type)return"<dict>";if("array"===t.type)return"<array>";throw new Error("Unexpected type ".concat(t.type))}function ws(t){let e=_s(t);return"string"===t.type&&(e="'"+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")+"'"),e}function xs(t){return"datetime"===t?"DateTime":t.charAt(0).toUpperCase()+t.substring(1)}function ks(t,e){if(Co)return Po(e);if(e<0){const t=-Math.floor(-e);return 0===t?0:t}return Math.floor(e)}function Es(t,e){if(e<jo||e>Vo)throw new Error("Integer overflow.");!Co&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)&&(t.safeIntegerOverflow=!0)}function Cs(t){const e=[];return ys(t,{Variable(t){e.push(t.id.name)}}),e}function As(t,e){throw new Error("Failed to evaluate [".concat(t,"]. ").concat(e))}function Vs(t){const e=se(t);if(e)return e;throw new Error("Unable to convert value to Color, expected format #AARRGGBB.")}function js(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 oe(Math.round(t).toString(16),2)})).join("").toUpperCase())}function Ps(t){return js(Vs(t))}const Ds=Number.MAX_VALUE,Fs=Number.MIN_VALUE,Ss="string",Ns="integer",Os="number",Is="boolean",Ms="color",Ts="url",zs="datetime",Js="dict",Rs="array";function Bs(t,e){return{type:Ss,value:_s(e)}}function Ls(t,e){const n=Number(e.value);if(isNaN(n)||!Number.isFinite(n))throw new Error("Unable to convert value to Number.");return{type:Os,value:n}}function Us(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=Ps(o)),{type:r,value:o}}function Ws(t,e,n){return Us(t,e,n,n.type)}function Hs(t,e,n){return Us(t,e,n,"color")}function qs(t,e,n){return Us(t,e,n,"url")}const Gs=t=>(e,n)=>{let r=new Date(n.value.getTime())[t]();return"getUTCMonth"===t?++r:"getUTCDay"===t&&0===r&&(r=7),{type:Ns,value:Po(r)}},Ks=Gs("getUTCFullYear"),Xs=Gs("getUTCMonth"),Ys=Gs("getUTCDate"),Zs=Gs("getUTCDay"),Qs=Gs("getUTCHours"),tl=Gs("getUTCMinutes"),el=Gs("getUTCSeconds"),nl=Gs("getUTCMilliseconds");function rl(t,e,n,r){if(!r.value.length)return t.warnings.push(Qt(new Error("String for padding is empty."),{level:"warn"})),"";let i="";const o=e.type===Ss?e.value:_s(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 il(t,e,n,r){const i=rl(t,e,n,r);return{type:Ss,value:i+_s(e)}}function ol(t,e,n,r){const i=rl(t,e,n,r);return{type:Ss,value:_s(e)+i}}function al(t){return(e,n)=>{const r=Vs(n.value);return{type:Os,value:r[t]/255}}}function sl(t){return(e,n,r)=>{const i=Vs(n.value);return i[t]=255*r.value,{type:Ms,value:js(i)}}}const ll=al("a"),cl=al("r"),ul=al("g"),dl=al("b"),pl=sl("a"),fl=sl("r"),gl=sl("g"),hl=sl("b");function ml(t,e,n,r){if(e.value<0)throw new Error("Expecting non-negative number of milliseconds.");let i=Po(e.value)/Po(n);return Es(t,i),"number"==typeof i&&(i=Math.floor(i)),r&&(i=Po(i)%Po(r)),{type:Ns,value:i}}const vl=36e5;function yl(t,e){return function(n,r){for(var i=arguments.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a];let s=function(t,e){let n=t;for(let t=0;t<e.length;++t){if(!n)throw new Error('Missing property "'.concat(e[t],'" in the dict.'));const r=n[e[t]];if(void 0===r)throw new Error('Missing property "'.concat(e[t],'" in the dict.'));n=r}return n}(r.value,o.map((t=>t.value))),l=typeof s;if(l!==t)throw"object"===l&&(l=Array.isArray(s)?"array":null===s?"null":"dict"),new Error('Incorrect value type: expected "'.concat(e,'", got "').concat(l,'".'));if("number"===t&&"integer"===e){if(s!==Math.round(s))throw new Error("Cannot convert value to integer.");Es(n,s)}return"string"===t&&"color"===e&&(s=Ps(s)),{type:e,value:s}}}function $l(t,e){return function(n,r,i){try{for(var o=arguments.length,a=new Array(o>3?o-3:0),s=3;s<o;s++)a[s-3]=arguments[s];return t(n,i,...a)}catch(t){let n=r.value;return"color"===e&&(n=Ps(n)),{type:e,value:n}}}}const bl=yl("string","string"),_l=yl("number","number"),wl=yl("number","integer"),xl=yl("boolean","boolean"),kl=yl("string","color"),El=yl("string","url"),Cl=$l(bl,"string"),Al=$l(_l,"number"),Vl=$l(wl,"integer"),jl=$l(xl,"boolean"),Pl=$l(kl,"color"),Dl=$l(El,"url");function Fl(t,e){return(n,r,i)=>{if(i.value<0||i.value>=r.value.length)throw new Error("Requested index (".concat(i.value,") out of bounds array size (").concat(r.value.length,")."));let o=r.value[Number(i.value)],a=typeof o;if("array"===t&&!Array.isArray(o)||"array"!==t&&a!==t||"obejct"===a&&null===o)throw"object"===a&&(a=Array.isArray(o)?"array":null===o?"null":"dict"),new Error('Incorrect value type: expected "'.concat(e,'", got "').concat(a,'".'));if("number"===t&&"integer"===e){if(o!==Math.round(o))throw new Error("Cannot convert value to integer.");Es(n,o)}return"string"===t&&"color"===e&&(o=Ps(o)),{type:e,value:o}}}function Sl(t,e){return(n,r,i,o)=>{try{return t(n,r,i)}catch(t){let n=o.value;return"color"===e&&(n=Ps(n)),{type:e,value:n}}}}const Nl=Fl("string","string"),Ol=Fl("number","number"),Il=Fl("number","integer"),Ml=Fl("boolean","boolean"),Tl=Fl("string","color"),zl=Fl("string","url"),Jl=Fl("array","array"),Rl=Fl("object","dict"),Bl=Sl(Nl,"string"),Ll=Sl(Ol,"number"),Ul=Sl(Il,"integer"),Wl=Sl(Ml,"boolean"),Hl=Sl(Tl,"color"),ql=Sl(zl,"url");function Gl(t){return t.map(ws).join(", ")}ms("toString",[Ns],Bs),ms("toString",[Os],Bs),ms("toString",[Is],Bs),ms("toString",[Ms],Bs),ms("toString",[Ts],Bs),ms("toNumber",[Ns],Ls),ms("toNumber",[Ss],Ls),ms("toInteger",[Os],(function(t,e){if(e.value>Vo||e.value<jo)throw new Error("Unable to convert value to Integer.");const n=e.value-e.value%1;return{type:Ns,value:Po(n)}})),ms("toInteger",[Ss],(function(t,e){let n;try{n=Po(e.value)}catch(t){throw new Error("Unable to convert value to Integer.")}if("number"==typeof n&&(isNaN(n)||n%1!=0)||n>Vo||n<jo)throw new Error("Unable to convert value to Integer.");return{type:Ns,value:n}})),ms("toInteger",[Is],(function(t,e){return{type:Ns,value:Po(e.value?1:0)}})),ms("toBoolean",[Ns],(function(t,e){const n=Number(e.value);if(1!==n&&0!==n)throw new Error("Unable to convert value to Boolean.");return{type:Is,value:n}})),ms("toBoolean",[Ss],(function(t,e){if("true"!==e.value&&"false"!==e.value)throw new Error("Unable to convert value to Boolean.");return{type:Is,value:"true"===e.value?1:0}})),ms("toColor",[Ss],(function(t,e){return{type:Ms,value:Ps(e.value)}})),ms("toUrl",[Ss],(function(t,e){return{type:Ts,value:e.value}})),ms("encodeUri",[Ss],(function(t,e){try{return{type:Ss,value:encodeURIComponent(e.value)}}catch(t){throw new Error("Unable to encodeUri string.")}})),ms("decodeUri",[Ss],(function(t,e){try{return{type:Ss,value:decodeURIComponent(e.value)}}catch(t){throw new Error("Unable to decodeUri string.")}})),ms("getIntegerValue",[Ss,Ns],Ws),ms("getNumberValue",[Ss,Os],Ws),ms("getBooleanValue",[Ss,Is],Ws),ms("getStringValue",[Ss,Ss],Ws),ms("getColorValue",[Ss,Ms],Hs),ms("getColorValue",[Ss,Ss],Hs),ms("getUrlValue",[Ss,Ts],qs),ms("getUrlValue",[Ss,Ss],qs),ms("parseUnixTime",[Ns],(function(t,e){return{type:zs,value:new Date(1e3*Number(e.value))}})),ms("nowLocal",[],(function(){return{type:zs,value:new Date}})),ms("addMillis",[zs,Ns],(function(t,e,n){return{type:zs,value:new Date(e.value.getTime()+Number(n.value))}})),ms("setYear",[zs,Ns],(function(t,e,n){const r=new Date(e.value);return r.setUTCFullYear(Number(n.value)),{type:zs,value:r}})),ms("setMonth",[zs,Ns],(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:zs,value:i}})),ms("setDay",[zs,Ns],(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(_s(e),"."));return r.setUTCDate(-1===i?0:i),{type:zs,value:r}})),ms("setHours",[zs,Ns],(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:zs,value:i}})),ms("setMinutes",[zs,Ns],(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:zs,value:i}})),ms("setSeconds",[zs,Ns],(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:zs,value:i}})),ms("setMillis",[zs,Ns],(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:zs,value:i}})),ms("getYear",[zs],Ks),ms("getMonth",[zs],Xs),ms("getDay",[zs],Ys),ms("getDayOfWeek",[zs],Zs),ms("getHours",[zs],Qs),ms("getMinutes",[zs],tl),ms("getSeconds",[zs],el),ms("getMillis",[zs],nl),ms("getIntervalSeconds",[Ns],(function(t,e){return ml(t,e,1e3,60)})),ms("getIntervalTotalSeconds",[Ns],(function(t,e){return ml(t,e,1e3)})),ms("getIntervalMinutes",[Ns],(function(t,e){return ml(t,e,6e4,60)})),ms("getIntervalTotalMinutes",[Ns],(function(t,e){return ml(t,e,6e4)})),ms("getIntervalHours",[Ns],(function(t,e){return ml(t,e,vl,24)})),ms("getIntervalTotalHours",[Ns],(function(t,e){return ml(t,e,vl)})),ms("getIntervalTotalDays",[Ns],(function(t,e){return ml(t,e,864e5)})),ms("getIntervalTotalWeeks",[Ns],(function(t,e){return ml(t,e,6048e5)})),ms("len",[Ss],(function(t,e){return{type:Ns,value:Po(e.value.length)}})),ms("contains",[Ss,Ss],(function(t,e,n){return{type:Is,value:e.value.includes(n.value)?1:0}})),ms("substring",[Ss,Ns,Ns],(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:Ss,value:e.value.substring(Number(n.value),Number(r.value))}})),ms("replaceAll",[Ss,Ss,Ss],(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:Ss,value:i}})),ms("index",[Ss,Ss],(function(t,e,n){return{type:Ns,value:Po(e.value.indexOf(n.value))}})),ms("lastIndex",[Ss,Ss],(function(t,e,n){return{type:Ns,value:Po(e.value.lastIndexOf(n.value))}})),ms("trim",[Ss],(function(t,e){return{type:Ss,value:e.value.trim()}})),ms("trimLeft",[Ss],(function(t,e){return{type:Ss,value:e.value.replace(/^\s+/,"")}})),ms("trimRight",[Ss],(function(t,e){return{type:Ss,value:e.value.replace(/\s+$/,"")}})),ms("toUpperCase",[Ss],(function(t,e){return{type:Ss,value:e.value.toUpperCase()}})),ms("toLowerCase",[Ss],(function(t,e){return{type:Ss,value:e.value.toLowerCase()}})),ms("padStart",[Ss,Ns,Ss],il),ms("padStart",[Ns,Ns,Ss],il),ms("padEnd",[Ss,Ns,Ss],ol),ms("padEnd",[Ns,Ns,Ss],ol),ms("testRegex",[Ss,Ss],(function(t,e,n){let r;try{r=new RegExp(n.value)}catch(t){throw new Error("Invalid regular expression.")}return{type:Is,value:r.test(e.value)?1:0}})),ms("div",[Ns,Ns],(function(t,e,n){if(n.value===Do)throw new Error("Division by zero is not supported.");let r=e.value/n.value;return r=ks(0,r),Es(t,r),{type:Ns,value:r}})),ms("div",[Os,Os],(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:Os,value:r}})),ms("mod",[Ns,Ns],(function(t,e,n){if(n.value===Do)throw new Error("Division by zero is not supported.");let r=e.value%n.value;return r=ks(0,r),Es(t,r),{type:Ns,value:r}})),ms("mod",[Os,Os],(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:Os,value:r}})),ms("mul",[{type:Ns,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:Do;for(let e=1;e<n.length;++e)i*=n[e].value,i=ks(0,i),Es(t,i);return{type:Ns,value:i}})),ms("mul",[{type:Os,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:Os,value:i}})),ms("sub",[{type:Ns,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:Do;for(let e=1;e<n.length;++e)i-=n[e].value,i=ks(0,i),Es(t,i);return{type:Ns,value:i}})),ms("sub",[{type:Os,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:Os,value:i}})),ms("sum",[{type:Ns,isVararg:!0}],(function(t){let e=Do;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=ks(0,e),Es(t,e);return{type:Ns,value:e}})),ms("sum",[{type:Os,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:Os,value:e}})),ms("abs",[Ns],(function(t,e){const n=Fo(e.value);return Es(t,n),{type:e.type,value:n}})),ms("abs",[Os],(function(t,e){const n=Math.abs(e.value);return{type:Os,value:n}})),ms("max",[{type:Ns,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:Ns,value:i}})),ms("max",[{type:Os,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:Os,value:Math.max(...n.map((t=>t.value)))}})),ms("min",[{type:Ns,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:Ns,value:i}})),ms("min",[{type:Os,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:Os,value:Math.min(...n.map((t=>t.value)))}})),ms("maxNumber",[],(function(){return{type:Os,value:Ds}})),ms("minNumber",[],(function(){return{type:Os,value:Fs}})),ms("maxInteger",[],(function(t){return Es(t,Vo),{type:Ns,value:Vo}})),ms("minInteger",[],(function(t){return Es(t,jo),{type:Ns,value:jo}})),ms("round",[Os],(function(t,e){const n=Math.sign(e.value);return{type:Os,value:n*Math.round(Math.abs(e.value))}})),ms("floor",[Os],(function(t,e){return{type:Os,value:Math.floor(e.value)}})),ms("ceil",[Os],(function(t,e){return{type:Os,value:Math.ceil(e.value)}})),ms("signum",[Ns],(function(t,e){return{type:Ns,value:So(e.value)}})),ms("signum",[Os],(function(t,e){return{type:Os,value:Math.sign(e.value)}})),ms("copySign",[Ns,Ns],(function(t,e,n){let r;if(n.value===Do)r=e.value;else if(e.value===Do)r=0;else{const t=So(n.value);r=Fo(e.value)*t}return Es(t,r),{type:Ns,value:r}})),ms("copySign",[Os,Os],(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:Os,value:i}})),ms("getColorAlpha",[Ss],ll),ms("getColorAlpha",[Ms],ll),ms("getColorRed",[Ss],cl),ms("getColorRed",[Ms],cl),ms("getColorGreen",[Ss],ul),ms("getColorGreen",[Ms],ul),ms("getColorBlue",[Ss],dl),ms("getColorBlue",[Ms],dl),ms("setColorAlpha",[Ss,Os],pl),ms("setColorAlpha",[Ms,Os],pl),ms("setColorRed",[Ss,Os],fl),ms("setColorRed",[Ms,Os],fl),ms("setColorGreen",[Ss,Os],gl),ms("setColorGreen",[Ms,Os],gl),ms("setColorBlue",[Ss,Os],hl),ms("setColorBlue",[Ms,Os],hl),ms("rgb",[Os,Os,Os],(function(t,e,n,r){const i={a:255,r:255*e.value,g:255*n.value,b:255*r.value};return{type:Ms,value:js(i)}})),ms("argb",[Os,Os,Os,Os],(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:Ms,value:js(o)}})),ms("getDictString",[Js,{type:Ss,isVararg:!0}],bl),ms("getStringFromDict",[Js,{type:Ss,isVararg:!0}],bl),ms("getDictNumber",[Js,{type:Ss,isVararg:!0}],_l),ms("getNumberFromDict",[Js,{type:Ss,isVararg:!0}],_l),ms("getDictInteger",[Js,{type:Ss,isVararg:!0}],wl),ms("getIntegerFromDict",[Js,{type:Ss,isVararg:!0}],wl),ms("getDictBoolean",[Js,{type:Ss,isVararg:!0}],xl),ms("getBooleanFromDict",[Js,{type:Ss,isVararg:!0}],xl),ms("getDictColor",[Js,{type:Ss,isVararg:!0}],kl),ms("getColorFromDict",[Js,{type:Ss,isVararg:!0}],kl),ms("getDictUrl",[Js,{type:Ss,isVararg:!0}],El),ms("getUrlFromDict",[Js,{type:Ss,isVararg:!0}],El),ms("getDictOptString",[Ss,Js,{type:Ss,isVararg:!0}],Cl),ms("getOptStringFromDict",[Ss,Js,{type:Ss,isVararg:!0}],Cl),ms("getDictOptNumber",[Os,Js,{type:Ss,isVararg:!0}],Al),ms("getOptNumberFromDict",[Os,Js,{type:Ss,isVararg:!0}],Al),ms("getDictOptInteger",[Ns,Js,{type:Ss,isVararg:!0}],Vl),ms("getOptIntegerFromDict",[Ns,Js,{type:Ss,isVararg:!0}],Vl),ms("getDictOptBoolean",[Is,Js,{type:Ss,isVararg:!0}],jl),ms("getOptBooleanFromDict",[Is,Js,{type:Ss,isVararg:!0}],jl),ms("getDictOptColor",[Ms,Js,{type:Ss,isVararg:!0}],Pl),ms("getOptColorFromDict",[Ms,Js,{type:Ss,isVararg:!0}],Pl),ms("getDictOptColor",[Ss,Js,{type:Ss,isVararg:!0}],Pl),ms("getOptColorFromDict",[Ss,Js,{type:Ss,isVararg:!0}],Pl),ms("getDictOptUrl",[Ss,Js,{type:Ss,isVararg:!0}],Dl),ms("getOptUrlFromDict",[Ss,Js,{type:Ss,isVararg:!0}],Dl),ms("getDictOptUrl",[Ts,Js,{type:Ss,isVararg:!0}],Dl),ms("getOptUrlFromDict",[Ts,Js,{type:Ss,isVararg:!0}],Dl),ms("getArrayString",[Rs,Ns],Nl),ms("getStringFromArray",[Rs,Ns],Nl),ms("getArrayNumber",[Rs,Ns],Ol),ms("getNumberFromArray",[Rs,Ns],Ol),ms("getArrayInteger",[Rs,Ns],Il),ms("getIntegerFromArray",[Rs,Ns],Il),ms("getArrayBoolean",[Rs,Ns],Ml),ms("getBooleanFromArray",[Rs,Ns],Ml),ms("getArrayColor",[Rs,Ns],Tl),ms("getColorFromArray",[Rs,Ns],Tl),ms("getArrayUrl",[Rs,Ns],zl),ms("getUrlFromArray",[Rs,Ns],zl),ms("getArrayFromArray",[Rs,Ns],Jl),ms("getDictFromArray",[Rs,Ns],Rl),ms("getArrayOptString",[Rs,Ns,Ss],Bl),ms("getOptStringFromArray",[Rs,Ns,Ss],Bl),ms("getArrayOptNumber",[Rs,Ns,Os],Ll),ms("getOptNumberFromArray",[Rs,Ns,Os],Ll),ms("getArrayOptInteger",[Rs,Ns,Ns],Ul),ms("getOptIntegerFromArray",[Rs,Ns,Ns],Ul),ms("getArrayOptBoolean",[Rs,Ns,Is],Wl),ms("getOptBooleanFromArray",[Rs,Ns,Is],Wl),ms("getArrayOptColor",[Rs,Ns,Ms],Hl),ms("getOptColorFromArray",[Rs,Ns,Ms],Hl),ms("getArrayOptColor",[Rs,Ns,Ss],Hl),ms("getOptColorFromArray",[Rs,Ns,Ss],Hl),ms("getArrayOptUrl",[Rs,Ns,Ts],ql),ms("getOptUrlFromArray",[Rs,Ns,Ts],ql),ms("getArrayOptUrl",[Rs,Ns,Ss],ql),ms("getOptUrlFromArray",[Rs,Ns,Ss],ql),ms("getOptArrayFromArray",[Rs,Ns],(function(t,e,n){try{return Jl(t,e,n)}catch(t){return{type:"array",value:[]}}})),ms("getOptDictFromArray",[Rs,Ns],(function(t,e,n){try{return Rl(t,e,n)}catch(t){return{type:"dict",value:{}}}}));const Kl={StringLiteral:function(t,e){return{type:Ss,value:e.value}},NumberLiteral:function(t,e){return{type:Os,value:e.value}},IntegerLiteral:function(t,e){return Es(t,e.value),{type:Ns,value:e.value}},BooleanLiteral:function(t,e){return{type:Is,value:e.value?1:0}},UnaryExpression:function(t,e){const n=$s(Xl(t,e.argument));switch(e.operator){case"!":if(n.type===Is)return{type:Is,value:n.value?0:1};As("".concat(e.operator).concat(ws(n)),"A Boolean is expected after a unary not.");case"+":case"-":const r="+"===e.operator?1:-1;if(n.type===Ns){const e=n.value*Po(r);return Es(t,e),{type:Ns,value:e}}if(n.type===Os)return{type:Os,value:n.value*r};As("".concat(e.operator).concat(ws(n)),"A Number is expected after a unary ".concat("+"===e.operator?"plus":"minus","."))}},ConditionalExpression:function(t,e){const n=$s(Xl(t,e.test));if(n.type===Is)return n.value?Xl(t,e.consequent):Xl(t,e.alternate);As("".concat(ws(n)," ? ").concat(ws(Xl(t,e.consequent))," : ").concat(ws(Xl(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 Xl(t,e.expressions[0]);for(let r=0;r<e.expressions.length;++r)n+=e.quasis[r].value,n+=_s(Xl(t,e.expressions[r]));return n+=e.quasis[e.quasis.length-1].value,{type:Ss,value:n}},LogicalExpression:function(t,e){const n=$s(Xl(t,e.left));if(n.type!==Is&&As("".concat(ws(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:Is,value:0};const r=$s(Xl(t,e.right));return r.type!==Is&&As("".concat(ws(n)," ").concat(e.operator," ").concat(ws(r)),"Operator '".concat(e.operator,"' cannot be applied to different types: Boolean and ").concat(xs(r.type),".")),{type:Is,value:r.value}},BinaryExpression:function(t,e){const n=e.operator,r=Xl(t,e.left),i=Xl(t,e.right);if(r.type!==i.type&&As("".concat(ws(r)," ").concat(e.operator," ").concat(ws(i)),"Operator '".concat(n,"' cannot be applied to different types: ").concat(xs(r.type)," and ").concat(xs(i.type),".")),"=="===n||"!="===n)return function(t,e,n){let r;return r=e.type===zs&&n.type===zs?e.value.getTime()===n.value.getTime():e.value===n.value,"!="===t&&(r=!r),{type:Is,value:r?1:0}}(n,r,i);if(">"===n||">="===n||"<"===n||"<="===n)return function(t,e,n){let r;e.type!==Os&&e.type!==Ns&&e.type!==zs&&As("".concat(ws(e)," ").concat(t," ").concat(ws(n)),"Operator '".concat(t,"' cannot be applied to ").concat(xs(e.type)," type."));const i=e.type===zs?e.value.getTime():e.value,o=n.type===zs?n.value.getTime():n.value;return r=">"===t?i>o:">="===t?i>=o:"<"===t?i<o:i<=o,{type:Is,value:r?1:0}}(n,r,i);if("+"===n||"-"===n)return function(t,e,n,r){if(n.type!==Ss&&n.type!==Os&&n.type!==Ns&&As("".concat(ws(n)," ").concat(e," ").concat(ws(r)),"Operator '".concat(e,"' cannot be applied to ").concat(xs(n.type)," type.")),n.type===Ss)return"-"===e&&As("".concat(ws(n)," - ").concat(ws(r)),"Operator '".concat(e,"' cannot be applied to ").concat(xs(n.type)," type.")),{type:Ss,value:n.value+r.value};let i="+"===e?n.value+r.value:n.value-r.value;if(n.type===Ns)try{i=ks(0,i),Es(t,i)}catch(t){As("".concat(ws(n)," ").concat(e," ").concat(ws(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!==Ns&&n.type!==Os&&As("".concat(ws(n)," ").concat(e," ").concat(ws(r)),"Operator '".concat(e,"' cannot be applied to ").concat(xs(n.type)," type.")),"*"===e)i=n.value*r.value;else{if("/"!==e&&"%"!==e)throw new Error("Unsupported operation ".concat(e));0===Number(r.value)&&As("".concat(ws(n)," ").concat(e," ").concat(ws(r)),"Division by zero is not supported."),i="/"===e?n.value/r.value:n.value%r.value}if(n.type===Ns)try{i=ks(0,i),Es(t,i)}catch(t){As("".concat(ws(n)," ").concat(e," ").concat(ws(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=>Xl(t,e))),o=n+":"+i.map((t=>t.type)).join("#");if(hs.has(o))r=hs.get(o);else{const t=function(t,e){const n=gs.get(t);if(!n)return{type:"missing"};let r=null;for(let t=0;t<n.length;++t){const i=vs(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=>xs(t.type))).join(", "),r="".concat(n,"(").concat(Gl(i),")");"few"===t.type&&0===i.length?As(r,"Non empty argument list is required for function '".concat(n,"'.")):"many"===t.type||"few"===t.type||"mismatch"===t.type?As(r,"Function '".concat(n,"' has no matching override for given argument types: ").concat(e,".")):As(r,"Unknown function name: ".concat(n,"."))}r=t}if(!r)throw new Error("Function not found");try{return r.cb(t,...i)}catch(t){As("".concat(n,"(").concat(Gl(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 Xl(t,e){if(e.type in Kl)return Kl[e.type](t,e);throw new Error("Unsupported expression")}function Yl(t,e){try{const n={variables:t,warnings:[],safeIntegerOverflow:!1};!function(t,e){let n="";if(ys(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=Xl(n,e);return n.safeIntegerOverflow&&n.warnings.push(Qt(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 Zl{constructor(t){this.ast=t}apply(t,e){if(!function(t,e){let n=!1;return ys(t,{Variable(t){e.has(t.id.name)||(n=!0)}}),n}(this.ast,t))try{const n=Yl(t,this.ast);n.warnings.forEach(e);const r=n.result;if("error"===r.type)return void e(Qt(new Error("Expression execution error"),{additional:{message:r.value}}));const i=r.value;if(i instanceof Date)return bs(i);if("boolean"===r.type)return Boolean(i);if("color"===r.type){const t=se(String(i));if(t)return js(t);e(Qt(new Error("Expression execution error")))}if("integer"===r.type)return i>2147483647||i<-2147483648?void e(Qt(new Error("Expression result is out of 32-bit int range"))):Number(i);if("array"===r.type||"dict"===r.type)try{return JSON.stringify(i)}catch(t){return e(Qt(new Error("Failed to stringify ".concat(r.type)))),"<".concat(r.type,">")}return i}catch(t){return void e(Qt(new Error("Expression execution error")))}}}function Ql(t,e,n){if(t)if("string"==typeof t){if((r=t).indexOf("@{")>-1||r.indexOf("\\")>-1){e.hasExpression=!0;try{const n=fs(t,{startRule:"JsonStringContents"}),r=Cs(n);return e.vars.push(...r),new Zl(n)}catch(e){return void n(Qt(new Error("Unable to parse expression"),{additional:{expression:t}}))}}}else{if(Array.isArray(t))return t.map((t=>Ql(t,e,n)));if("object"==typeof t){const r={};for(const i in t)r[i]=Ql(t[i],e,n);return r}}var r;return t}function tc(t,e,n){if(t){if(t instanceof Zl)return t.apply(e,n);if(Array.isArray(t))return t.map((t=>tc(t,e,n)));if("object"==typeof t){const r={};for(const i in t)r[i]=tc(t[i],e,n);return r}}return t}function ec(t,e){const n={vars:[],hasExpression:!1},r=Ql(t,n,e);return{vars:[...new Set(n.vars)],hasExpression:n.hasExpression,applyVars:t=>tc(r,t,e)}}const nc={pagers:function(){return Kt(new Map)}},rc=new Map,ic=new Map;function oc(t){const e=rc.get(t)||Kt("");return rc.has(t)||rc.set(t,e),e}function ac(t){const e=ic.get(t)||new Map;return ic.has(t)||ic.set(t,e),e}class sc{setVariable(t){const e=t.getName(),n=ac(this);if(n.has(e))throw new Error("Variable with the same name already exist");n.set(e,t),oc(this).set(e)}getVariable(t){return ac(this).get(t)}}function lc(){return new sc}function cc(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 uc=new Set(["start","stop","pause","resume","cancel","reset"]);class dc{constructor(t){cc(this,"timers",new Map),cc(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(Qt(new Error("Misconfigured timer"),{additional:{id:t.id}})):this.logError(Qt(new Error("Missing timer id")))}execTimerAction(t,e){if(!(t&&e&&this.timers.has(t)&&uc.has(e)))return void this.logError(Qt(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(Qt(new Error("The timer is already running")));if("paused"===t.state)return void this.logError(Qt(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(Qt(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(Qt(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(Qt(new Error("The timer has already been stopped")))}pause(t){if("stopped"===t.state)return void this.logError(Qt(new Error("The timer has already been stopped")));if("paused"===t.state)return void this.logError(Qt(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(Qt(new Error("The timer is already running"))):this.logError(Qt(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 pc(t,e,n,r){const{variable_name:i}=n;if(!i)return void e(Qt(new Error("Incorrect ".concat(n.type," action")),{additional:{name:i}}));const o=t.get(i);if(!o)return void e(Qt(new Error("Cannot find variable"),{additional:{name:i}}));const a=o.getType();"array"===a?r(o):e(Qt(new Error("Trying to insert value into the non-array"),{additional:{name:i,type:a}}))}function fc(t){let e,n,r,i,o,a,s,l;return n=new ns({props:{svgFiltersMap:t[3]}}),i=new Ha({props:{div:t[4],templateContext:t[7],layoutParams:{tooltips:t[2]}}}),{c(){e=M("div"),Bt(n.$$.fragment),r=J(),Bt(i.$$.fragment),L(e,"class",o=""+(Yt.root+(t[5]?" ".concat(Yt.root_platform_desktop):"")+(t[0]?" ".concat(t[0]):"")))},m(t,o){N(t,e,o),Lt(n,e,null),D(e,r),Lt(i,e,null),a=!0,s||(l=B(e,"touchstart",$c,{passive:!0}),s=!0)},p(t,r){const s={};8&r[0]&&(s.svgFiltersMap=t[3]),n.$set(s);const l={};16&r[0]&&(l.div=t[4]),4&r[0]&&(l.layoutParams={tooltips:t[2]}),i.$set(l),(!a||33&r[0]&&o!==(o=""+(Yt.root+(t[5]?" ".concat(Yt.root_platform_desktop):"")+(t[0]?" ".concat(t[0]):""))))&&L(e,"class",o)},i(t){a||(Pt(n.$$.fragment,t),Pt(i.$$.fragment,t),a=!0)},o(t){Dt(n.$$.fragment,t),Dt(i.$$.fragment,t),a=!1},d(t){t&&O(e),Ut(n),Ut(i),s=!1,l()}}}function gc(t){let e,n,r=!t[1]&&t[4]&&fc(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){!t[1]&&t[4]?r?(r.p(t,n),18&n[0]&&Pt(r,1)):(r=fc(t),r.c(),Pt(r,1),r.m(e.parentNode,e)):r&&(Vt(),Dt(r,1,1,(()=>{r=null})),jt())},i(t){n||(Pt(r),n=!0)},o(t){Dt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}let hc=Kt(!0),mc=0;function vc(){hc.set(!1)}function yc(){hc.set(!0)}function $c(){}function bc(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 sc}=e,{mix:g=""}=e,{customization:h={}}=e,{builtinProtocols:m=["http","https","tel","mailto","intent"]}=e,{extensions:v=new Map}=e,{onError:y}=e,{onStat:$}=e,{onCustomAction:b}=e,{onComponent:_}=e,{typefaceProvider:w=(t=>"")}=e,{fetchInit:x={}}=e,{tooltipRoot:k}=e,{customComponents:E}=e,C=Kt("desktop"===u);if(f(t,C,(t=>n(5,r=t))),"auto"===u&&"undefined"!=typeof matchMedia){const t=matchMedia("(any-pointer: coarse)");C.set(!t.matches),t.addListener((()=>{C.set(!t.matches)}))}let A="light",V=null;function j(){"system"===d&&V&&n(27,A=V.matches?"dark":"light")}const P=new Set(m);let D=!1;c||(D=!0,U(Qt(new Error('"json" prop is required')))),l||(D=!0,U(Qt(new Error('"id" prop is required'))));let F=function(t){if(!t)return Qt(new Error("Missing object"));const e=t.card,n=t.templates||{};if(!e)return Qt(new Error("Missing card"));if(!e.states||!e.states.length)return Qt(new Error("Missing states"));for(const t in n)if(n.hasOwnProperty(t)&&t in Ba)return Qt(new Error("Template name collision"),{additional:{templateName:t}});for(let t=0;t<e.states.length;++t){if(!e.states[t].div)return Qt(new Error("Missing state div"),{additional:{stateId:e.states[t].state_id}});if("number"!=typeof e.states[t].state_id)return Qt(new Error("Missing state_id"),{additional:{index:t}})}return null}(c);const S=c.templates||{};F&&(D=!0,U(F));const N={stateChange:!1},O=oc(p),I=ac(p),M=new Map,T=new Map,z=new Map;let J=null,R=0,B=[];function L(t){const e=ec(t,U);return e.hasExpression?e.applyVars(T):t}function U(t){y?y({error:t}):"warn"===(null==t?void 0:t.level)?console.warn(t):console.error(t)}function W(t,e){$&&$({type:t,action:e})}let H=0;function q(t){return"".concat(l,"-").concat(H++)}let G={},K={};function X(t){const e=t.url?String(t.url):"",r=t.typed;if(e)try{const r=e.replace(/div-action:\/\//,""),i=/([^?]+)\?(.+)/.exec(r);if(!i)return;const o=new URLSearchParams(i[2]);switch(i[1]){case"set_state":!function(t){if(!t)throw new Error("Missing state id");let e=lt,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}}(o.get("state_id"));break;case"set_current_item":!function(t,e){if(!t||!e)throw new Error('Missing data for "set-current-item" action');if(isNaN(Number(e)))throw new Error('Incorrect item for "set-current-item" action');const n=nt(t);n&&n.setCurrentItem(Number(e))}(o.get("id"),o.get("item"));break;case"set_previous_item":!function(t,e){if(!t)throw new Error('Missing id for "set-previous-item" action');if(e&&"clamp"!==e&&"ring"!==e)throw new Error('Incorrect overflow value for "set-previous-item" action');e=e||"clamp";const n=nt(t);n&&n.setPreviousItem(e)}(o.get("id"),o.get("overflow"));break;case"set_next_item":!function(t,e){if(!t)throw new Error('Missing id for "set-next-item" action');if(e&&"clamp"!==e&&"ring"!==e)throw new Error('Incorrect overflow value for "set-next-item" action');e=e||"clamp";const n=nt(t);n&&n.setNextItem(e)}(o.get("id"),o.get("overflow"));break;case"set_variable":const i=o.get("name"),a=o.get("value");if(i&&null!==a){const t=T.get(i);if(t){const e=t.getType();"dict"===e||"array"===e?U(Qt(new Error("Setting ".concat(e," variables is not supported")),{additional:{name:i}})):t.set(a)}else U(Qt(new Error("Cannot find variable"),{additional:{name:i}}))}else U(Qt(new Error("Incorrect set_variable_action"),{additional:{url:r}}));break;case"timer":const s=o.get("action"),l=o.get("id");J?J.execTimerAction(l,s):U(Qt(new Error("Incorrect timer action"),{additional:{id:l,action:s}}));break;case"video":!function(t,e){if(t){const n=nt(t);n?"start"===e?n.start():"pause"===e?n.pause():U(Qt(new Error("Unknown video action"),{additional:{id:t,action:e}})):U(Qt(new Error("Video component is not found"),{additional:{id:t,action:e}}))}else U(Qt(new Error("Missing id in video action"),{additional:{action:e}}))}(o.get("id"),o.get("action"));break;case"download":!function(t,e){if(t){let n;n="function"==typeof x?x(t):x,fetch(t,n).then((t=>{if(!t.ok)throw new Error("Response is not ok");return t.json()})).then((n=>{var r,i,o;if(n){if(n.templates)for(const t in n.templates)S.hasOwnProperty(t)||(S[t]=n.templates[t]);if(Array.isArray(null===(r=n.patch)||void 0===r?void 0:r.changes)){if("transactional"===n.patch.mode){const r=n.patch.changes.find((t=>!tt.has(t.id)));if(r)return U(Qt(new Error("Skipping transactional, child is not found"),{additional:{url:t,id:r.id}})),void Y(null===(i=e.download_callbacks)||void 0===i?void 0:i.on_fail_actions)}n.patch.changes.forEach((t=>{const e=tt.get(t.id);e&&e.replaceWith(t.id,t.items)})),Y(null===(o=e.download_callbacks)||void 0===o?void 0:o.on_success_actions)}}else U(Qt(new Error("Incorrect patch"),{additional:{url:t}}))})).catch((n=>{var r;U(Qt(new Error("Failed to download the patch"),{additional:{url:t,originalError:n}})),Y(null===(r=e.download_callbacks)||void 0===r?void 0:r.on_fail_actions)}))}else U(Qt(new Error("Missing url in download action"),{additional:{url:t}}))}(o.get("url"),t);break;case"show_tooltip":!function(t,e){var r;if(!t)return void U(Qt(new Error("Missing id in show_tooltip action")));const i=et.get(t);if(!i)return void U(Qt(new Error("Tooltip with the provided id is not found"),{additional:{id:t}}));if("true"!==e&&B.some((e=>e.desc.id===t)))return;const o={internalId:++R,ownerNode:i.onwerNode,desc:i.tooltip,timeoutId:0};n(2,B=[...B,o]);const a=null!==(r=i.tooltip.duration)&&void 0!==r?r:5e3;a&&(o.timeoutId=window.setTimeout((()=>{o.timeoutId=0,n(2,B=B.filter((t=>t.internalId!==o.internalId)))}),a))}(o.get("id"),o.get("multiple"));break;case"hide_tooltip":!function(t){t?n(2,B=B.filter((e=>{const n=e.desc.id!==t;return!n&&e.timeoutId&&(clearTimeout(e.timeoutId),e.timeoutId=null),n}))):U(Qt(new Error("Missing id in hide_tooltip action")))}(o.get("id"));break;default:U(Qt(new Error("Unknown type of action"),{additional:{url:e}}))}}catch(t){U(Qt(t,{additional:{url:e}}))}else if(r)switch(r.type){case"set_variable":{const{variable_name:t,value:e}=r;if(t&&e){const n=T.get(t);n?n.getType()===e.type?n.setValue(e.value):U(Qt(new Error("Trying to set value with invalid type"),{additional:{name:t,type:e.type}})):U(Qt(new Error("Cannot find variable"),{additional:{name:t}}))}else U(Qt(new Error("Incorrect set_variable action"),{additional:{name:t}}));break}case"array_insert_value":!function(t,e,n){const{variable_name:r,index:i,value:o}=n;!o||"number"!=typeof i&&void 0!==i?e(Qt(new Error("Incorrect array_insert_value action"),{additional:{name:r}})):pc(t,e,n,(t=>{const a=t.getValue();if("number"==typeof i&&(i<0||i>a.length))e(Qt(new Error("Index out of bound for mutation ".concat(n.type)),{additional:{name:r,index:i,length:a.length}}));else{const e=a.slice();"number"==typeof i?e.splice(i,0,o.value):e.push(o.value),t.setValue(e)}}))}(T,U,r);break;case"array_remove_value":!function(t,e,n){const{variable_name:r,index:i}=n;"number"==typeof i?pc(t,e,n,(t=>{const o=t.getValue();if("number"==typeof i&&(i<0||i>=o.length))e(Qt(new Error("Index out of bound for mutation ".concat(n.type)),{additional:{name:r,index:i,length:o.length}}));else{const e=o.slice();e.splice(i,1),t.setValue(e)}})):e(Qt(new Error("Incorrect array_remove_value action"),{additional:{name:r}}))}(T,U,r);break;default:U(Qt(new Error("Unknown type of action"),{additional:{type:r.type}}))}}async function Y(t,e){if(t&&Array.isArray(t)){for(let n=0;n<t.length;++n){let r=t[n];const i=r.url,o=r.typed;if(i){const t=he(i);if(t)if(me(t,P)){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?(X(r),await vt()):r.log_id&&(Z(r),await vt())}else o&&X(r)}t.forEach((t=>{t.log_id&&W("click",t)}))}}function Z(t){null==b||b(t)}const Q=new Map,tt=new Map,et=new Map;function nt(t){if(Q.has(t))return Q.get(t);U(Qt(new Error("Missing instance with id"),{additional:{id:t}}))}const rt=new Map;function it(t){for(const e of t)T.has(e)&&t.delete(e);return t}st(Zt,{logError:U,logStat:W,hasTemplate:function(t){return t in S},processTemplate:function(t,e){if(!t)return{json:t,templateContext:e};const n=new Set([t.type]);for(;t.type in S;){if(({json:t,templateContext:e}=rs(t,e,S,U)),n.has(t.type))return{json:t,templateContext:e};n.add(t.type)}return{json:t,templateContext:e}},genId:q,genClass:function(t){return"divkit-".concat(q())},execAction:X,execAnyActions:Y,execCustomAction:Z,isRunning:function(t){return N[t]},setRunning:function(t,e){N[t]=e},registerInstance:function(t,e){Q.has(t)?U(Qt(new Error("Duplicate instance id"),{additional:{id:t}})):Q.set(t,e)},unregisterInstance:function(t){Q.delete(t)},registerParentOf:function(t,e){tt.set(t,e)},unregisterParentOf:function(t){tt.delete(t)},registerTooltip:function(t,e){et.has(e.id)&&U(Qt(new Error("Duplicate tooltip id"),{additional:{id:e.id}})),et.set(e.id,{onwerNode:t,tooltip:e})},unregisterTooltip:function(t){et.delete(t.id),B.some((e=>e.desc.id===t.id))&&n(2,B=B.filter((e=>e.desc.id!==t.id)))},onTooltipClose:function(t){n(2,B=B.filter((e=>e.internalId!==t)))},tooltipRoot:k,addSvgFilter:function(t,e){const r="".concat(t,":").concat(e);if(K[r]=K[r]||0,++K[r],G[r])return G[r];const i="".concat(q(),"-svg-filter");return n(3,G=Object.assign(Object.assign({},G),{[r]:i})),i},removeSvgFilter:function(t,e){if(!t)return;const r="".concat(t,":").concat(e);K[r]&&0==--K[r]&&n(3,G=Object.keys(G).reduce(((t,e)=>(K[e]&&(t[e]=G[e]),t)),{}))},getDerivedFromVars:function(t){if(!t)return os(t);const e=ec(t,U);return e.vars.length?Xt(e.vars.map((t=>T.get(t)||function(t){const e=z.get(t)||Kt(void 0);return z.has(t)||z.set(t,e),e}(t))).filter(ce),(()=>e.applyVars(T))):e.hasExpression?os(e.applyVars(T)):os(t)},getJsonWithVars:L,getStore:function(t){return rt.has(t)||function(t){rt.has(t)||rt.set(t,nc[t]())}(t),rt.get(t)},getVariable:function(t,e){const n=T.get(t);if(n){const r=n.getType();if(r!==e)return void U(Qt(new Error('Variable should have type "'.concat(e,'"')),{additional:{name:t,foundType:r}}))}return n},getCustomization:function(t){return null==h?void 0:h[t]},getBuiltinProtocols:function(){return P},getExtension:function(t,e){const n=v.get(t);if(n)return new n(e||{})},getExtensionContext:function(){return{variables:T,logError:U}},typefaceProvider:w,isDesktop:C,isPointerFocus:hc,customComponents:E,registerComponent:void 0,unregisterComponent:void 0}),st(Te,{hasAction:()=>!1});const lt={setState(t){throw new Error("Not implemented")},getChild(t){if(ct&&ct.has(t))return ct.get(t);U(Qt(new Error("Missing state block with id"),{additional:{id:t}}))}};let ct=null;st(xe,{registerInstance(t,e){ct||(ct=new Map),ct.has(t)?U(Qt(new Error("Duplicate state with id"),{additional:{id:t}})):ct.set(t,e)},unregisterInstance(t){null==ct||ct.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 ut=null===(i=null==c?void 0:c.card)||void 0===i?void 0:i.variables;Array.isArray(ut)&&ut.forEach((t=>{if(t&&t.type in Oo&&t.name){if(M.has(t.name))return void U(Qt(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)&&U(Qt(new Error("The value of the integer variable could lose accuracy"),{level:"warn",additional:{name:t.name,value:t.value}}));try{const e=Io(t.name,t.type,t.value);M.set(t.name,e),T.set(t.name,e)}catch(e){U(Qt(e,{additional:{name:t.name}}))}}}));const dt=c.palette;dt&&dt[A].forEach((t=>{if(M.has(t.name))U(Qt(new Error("Duplicate variable"),{additional:{name:t.name}}));else try{const e=Io(t.name,"color",t.color);M.set(t.name,e),T.set(t.name,e)}catch(e){U(Qt(e,{additional:{name:t.name}}))}}));for(const[t,e]of I)T.has(t)||T.set(t,e);O.subscribe((t=>{if(t&&!T.has(t)){const e=I.get(t);T.set(t,e);const n=z.get(t);if(n){let t=0;e.subscribe((()=>{n.set(++t)}))}}}));const pt=null===(o=null==c?void 0:c.card)||void 0===o?void 0:o.variable_triggers;Array.isArray(pt)&&pt.forEach((t=>{let e=!1;if("string"!=typeof t.condition)return void U(Qt(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=fs(t.condition,{startRule:"JsonStringContents"}),i=Cs(r);if(!i.length)return void U(Qt(new Error("variable_trigger must have variables in the condition"),{additional:{condition:t.condition}}));(function(t){const e=new Set(t);return it(e),e.size?new Promise((t=>{const n=O.subscribe((()=>{it(e),e.size||(n(),t())}))})):Promise.resolve()})(i).then((()=>{Xt(i.map((t=>T.get(t))).filter(ce),(()=>{const t=Yl(T,r);return t.warnings.forEach(U),t.result})).subscribe((r=>{"error"!==r.type?(r.value&&("on_variable"===n||"on_condition"===n&&!1===e)&&t.actions.forEach((t=>{const e=L(t);e.log_id&&X(e)})),e=Boolean(r.value)):U(Qt(new Error("variable_trigger condition execution error"),{additional:{message:r.value}}))}))}))}catch(e){U(Qt(new Error("Unable to parse variable_trigger"),{additional:{condition:t.condition}}))}else U(Qt(new Error("variable_trigger has an unsupported mode"),{additional:{mode:n}}))}));const ft=null===(a=null==c?void 0:c.card)||void 0===a?void 0:a.timers;if(ft){const t=J=new dc({logError:U,applyVars:L,hasVariableWithType:function(t,e){const n=T.get(t);return(null==n?void 0:n.getType())===e},setVariableValue:function(t,e){const n=T.get(t);n?n.setValue(e):U(Qt(new Error("Cannot find variable"),{additional:{name:t}}))},execAnyActions:Y});ft.forEach((e=>t.createTimer(e)))}const gt=null===(s=null==c?void 0:c.card)||void 0===s?void 0:s.states;let ht;return gt&&!D&&(ht={type:"state",id:"root",width:{type:"match_parent"},height:{type:"match_parent"},states:gt.map((t=>({state_id:t.state_id.toString(),div:t.div})))}),ot((()=>{mc++,1===mc&&(window.addEventListener("keydown",vc),window.addEventListener("pointerdown",yc))})),at((()=>{mc--,mc||(window.removeEventListener("keydown",vc),window.removeEventListener("pointerdown",yc)),J&&J.destroy(),B.forEach((t=>{t.timeoutId&&(clearTimeout(t.timeoutId),t.timeoutId=null)}))})),t.$$set=t=>{"id"in t&&n(9,l=t.id),"json"in t&&n(10,c=t.json),"platform"in t&&n(11,u=t.platform),"theme"in t&&n(8,d=t.theme),"globalVariablesController"in t&&n(12,p=t.globalVariablesController),"mix"in t&&n(0,g=t.mix),"customization"in t&&n(13,h=t.customization),"builtinProtocols"in t&&n(14,m=t.builtinProtocols),"extensions"in t&&n(15,v=t.extensions),"onError"in t&&n(16,y=t.onError),"onStat"in t&&n(17,$=t.onStat),"onCustomAction"in t&&n(18,b=t.onCustomAction),"onComponent"in t&&n(19,_=t.onComponent),"typefaceProvider"in t&&n(20,w=t.typefaceProvider),"fetchInit"in t&&n(21,x=t.fetchInit),"tooltipRoot"in t&&n(22,k=t.tooltipRoot),"customComponents"in t&&n(23,E=t.customComponents)},t.$$.update=()=>{268435712&t.$$.dirty[0]&&("light"===d||"dark"===d?n(27,A=d):"system"===d?"undefined"!=typeof matchMedia?(V||(n(28,V=matchMedia("(prefers-color-scheme: dark)")),V.addListener(j)),n(27,A=V.matches?"dark":"light")):n(27,A="light"):U(Qt(new Error("Unsupported theme")))),134217728&t.$$.dirty[0]&&A&&dt&&dt[A].forEach((t=>{const e=T.get(t.name);e&&e.setValue(t.color)}))},[g,D,B,G,ht,r,C,{},d,l,c,u,p,h,m,v,y,$,b,_,w,x,k,E,function(t){n(8,d=t)},function(){},function(t){X(L(t))},A,V]}const _c=class extends qt{constructor(t){super(),Wt(this,t,bc,gc,d,{id:9,json:10,platform:11,theme:8,globalVariablesController:12,mix:0,customization:13,builtinProtocols:14,extensions:15,onError:16,onStat:17,onCustomAction:18,onComponent:19,typefaceProvider:20,fetchInit:21,tooltipRoot:22,customComponents:23,setTheme:24,getDebugVariables:25,execAction:26},null,[-1,-1,-1,-1])}get setTheme(){return this.$$.ctx[24]}get getDebugVariables(){return this.$$.ctx[25]}get execAction(){return this.$$.ctx[26]}};class wc{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 vt()}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 xc(t){return t instanceof HTMLElement}function kc(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(xc);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)}}}const Ec=["target","hydrate"];function Cc(t){const{target:e,hydrate:n}=t,r=function(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}(t,Ec);return new _c({target:e,props:r,hydrate:n})}var Ac=exports;for(var Vc in e)Ac[Vc]=e[Vc];e.__esModule&&Object.defineProperty(Ac,"__esModule",{value:!0})})();
|
|
1
|
+
(()=>{"use strict";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),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(){}t.r(e),t.d(e,{SizeProvider:()=>kc,createGlobalVariablesController:()=>uc,createVariable:()=>To,lottieExtensionBuilder:()=>Cc,render:()=>Vc});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 t===e||(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){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];if(null==t){for(const t of r)t(void 0);return n}const o=t.subscribe(...r);return o.unsubscribe?()=>o.unsubscribe():o}function f(t,e,n){t.$$.on_destroy.push(p(e,n))}function g(t,e,n,r){if(t){const i=h(t,e,n,r);return t[0](i)}}function h(t,e,n,r){return t[1]&&r?i(n.ctx.slice(),t[1](r(e))):n.ctx}function m(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 v(t,e,n,r,i,o){if(i){const a=h(e,n,r,o);t.p(a,i)}}function y(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 _="undefined"!=typeof window;let w=_?()=>window.performance.now():()=>Date.now(),x=_?t=>requestAnimationFrame(t):n;const k=new Set;function E(t){k.forEach((e=>{e.c(t)||(k.delete(e),e.f())})),0!==k.size&&x(E)}function C(t){let e;return 0===k.size&&x(E),{promise:new Promise((n=>{k.add(e={c:t,f:n})})),abort(){k.delete(e)}}}const A="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function V(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 j{constructor(t){V(this,"_listeners","WeakMap"in A?new WeakMap:void 0),V(this,"_observer",void 0),V(this,"options",void 0),this.options=t}observe(t,e){return this._listeners.set(t,e),this._getObserver().observe(t,this.options),()=>{this._listeners.delete(t),this._observer.unobserve(t)}}_getObserver(){var t;return null!==(t=this._observer)&&void 0!==t?t:this._observer=new ResizeObserver((t=>{for(const n of t){var e;j.entries.set(n.target,n),null===(e=this._listeners.get(n.target))||void 0===e||e(n)}}))}}j.entries="WeakMap"in A?new WeakMap:void 0;let P=!1;function D(t,e){t.appendChild(e)}function F(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function S(t){const e=M("style");return e.textContent="/* empty */",function(t,e){D(t.head||t,e),e.sheet}(F(t),e),e.sheet}function N(t,e,n){t.insertBefore(e,n||null)}function O(t){t.parentNode&&t.parentNode.removeChild(t)}function I(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function M(t){return document.createElement(t)}function T(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function z(t){return document.createTextNode(t)}function J(){return z(" ")}function R(){return z("")}function B(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function L(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}const U=["width","height"];function W(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&&-1===U.indexOf(r)?t[r]=e[r]:L(t,r,e[r])}function H(t,e){Object.keys(e).forEach((n=>{!function(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:L(t,e,n)}(t,n,e[n])}))}function q(t){return/-/.test(t)?H:W}function G(t,e){e=""+e,t.data!==e&&(t.data=e)}function K(t,e,n,r){null==n?t.style.removeProperty(e):t.style.setProperty(e,n,r?"important":"")}function X(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 Y(t,e){return new t(e)}const Z=new Map;let Q,tt=0;function et(t,e,n,r,i,o,a){let s=arguments.length>7&&void 0!==arguments[7]?arguments[7]: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+"%{".concat(a(r,1-r),"}\n")}const u=c+"100% {".concat(a(n,1-n),"}\n}"),d="__svelte_".concat(function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(u),"_").concat(s),p=F(t),{stylesheet:f,rules:g}=Z.get(p)||function(t,e){const n={stylesheet:S(e),rules:{}};return Z.set(t,n),n}(p,t);g[d]||(g[d]=!0,f.insertRule("@keyframes ".concat(d," ").concat(u),f.cssRules.length));const h=t.style.animation||"";return t.style.animation="".concat(h?"".concat(h,", "):"").concat(d," ").concat(r,"ms linear ").concat(i,"ms 1 both"),tt+=1,d}function nt(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(", "),tt-=i,tt||x((()=>{tt||(Z.forEach((t=>{const{ownerNode:e}=t.stylesheet;e&&O(e)})),Z.clear())})))}function rt(t){Q=t}function it(){if(!Q)throw new Error("Function called outside component initialization");return Q}function ot(t){it().$$.on_mount.push(t)}function at(t){it().$$.on_destroy.push(t)}function st(t,e){return it().$$.context.set(t,e),e}function lt(t){return it().$$.context.get(t)}function ct(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t.call(this,e)))}const ut=[],dt=[];let pt=[];const ft=[],gt=Promise.resolve();let ht=!1;function mt(){ht||(ht=!0,gt.then(wt))}function vt(){return mt(),gt}function yt(t){pt.push(t)}const $t=new Set;let bt,_t=0;function wt(){if(0!==_t)return;const t=Q;do{try{for(;_t<ut.length;){const t=ut[_t];_t++,rt(t),xt(t.$$)}}catch(t){throw ut.length=0,_t=0,t}for(rt(null),ut.length=0,_t=0;dt.length;)dt.pop()();for(let t=0;t<pt.length;t+=1){const e=pt[t];$t.has(e)||($t.add(e),e())}pt.length=0}while(ut.length);for(;ft.length;)ft.pop()();ht=!1,$t.clear(),rt(t)}function xt(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(yt)}}function kt(){return bt||(bt=Promise.resolve(),bt.then((()=>{bt=null}))),bt}function Et(t,e,n){t.dispatchEvent(function(t,e){let{bubbles:n=!1,cancelable:r=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new CustomEvent(t,{detail:e,bubbles:n,cancelable:r})}("".concat(e?"intro":"outro").concat(n)))}const Ct=new Set;let At;function Vt(){At={r:0,c:[],p:At}}function jt(){At.r||s(At.c),At=At.p}function Pt(t,e){t&&t.i&&(Ct.delete(t),t.i(e))}function Dt(t,e,n,r){if(t&&t.o){if(Ct.has(t))return;Ct.add(t),At.c.push((()=>{Ct.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}else r&&r()}const Ft={duration:0};function St(t,e,i){const o={direction:"in"};let a,s,c=e(t,i,o),u=!1,d=0;function p(){a&&nt(t,a)}function f(){const{delay:e=0,duration:i=300,easing:o=r,tick:l=n,css:f}=c||Ft;f&&(a=et(t,0,1,i,e,o,f,d++)),l(0,1);const g=w()+e,h=g+i;s&&s.abort(),u=!0,yt((()=>Et(t,!0,"start"))),s=C((e=>{if(u){if(e>=h)return l(1,0),Et(t,!0,"end"),p(),u=!1;if(e>=g){const t=o((e-g)/i);l(t,1-t)}}return u}))}let g=!1;return{start(){g||(g=!0,nt(t),l(c)?(c=c(o),kt().then(f)):f())},invalidate(){g=!1},end(){u&&(p(),u=!1)}}}function Nt(t){return void 0!==(null==t?void 0:t.length)?t:Array.from(t)}function Ot(t,e){Dt(t,1,1,(()=>{e.delete(t.key)}))}function It(t,e,n,r,i,o,a,l,c,u,d,p){let f=t.length,g=o.length,h=f;const m={};for(;h--;)m[t[h].key]=h;const v=[],y=new Map,$=new Map,b=[];for(h=g;h--;){const t=p(i,o,h),s=n(t);let l=a.get(s);l?r&&b.push((()=>l.p(t,e))):(l=u(s,t),l.c()),y.set(s,v[h]=l),s in m&&$.set(s,Math.abs(h-m[s]))}const _=new Set,w=new Set;function x(t){Pt(t,1),t.m(l,d),a.set(t.key,t),d=t.first,g--}for(;f&&g;){const e=v[g-1],n=t[f-1],r=e.key,i=n.key;e===n?(d=e.first,f--,g--):y.has(i)?!a.has(r)||_.has(r)?x(e):w.has(i)?f--:$.get(r)>$.get(i)?(w.add(r),x(e)):(_.add(i),f--):(c(n,a),f--)}for(;f--;){const e=t[f];y.has(e.key)||c(e,a)}for(;g;)x(v[g-1]);return s(b),v}function Mt(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 Tt;function zt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Jt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?zt(Object(n),!0).forEach((function(e){Rt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):zt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Rt(t,e,n){return e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Bt(t){t&&t.c()}function Lt(t,e,n){const{fragment:r,after_update:i}=t.$$;r&&r.m(e,n),yt((()=>{const e=t.$$.on_mount.map(o).filter(l);t.$$.on_destroy?t.$$.on_destroy.push(...e):s(e),t.$$.on_mount=[]})),i.forEach(yt)}function Ut(t,e){const n=t.$$;null!==n.fragment&&(function(t){const e=[],n=[];pt.forEach((r=>-1===t.indexOf(r)?e.push(r):n.push(r))),n.forEach((t=>t())),pt=e}(n.after_update),s(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Wt(t,e,r,i,o,l,c){let u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[-1];const d=Q;rt(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||{},(function(e,n){const r=!(arguments.length<=2)&&arguments.length-2?arguments.length<=2?void 0:arguments[2]:n;return p.ctx&&o(p.ctx[e],p.ctx[e]=r)&&(!p.skip_bound&&p.bound[e]&&p.bound[e](r),f&&function(t,e){-1===t.$$.dirty[0]&&(ut.push(t),mt(),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){P=!0;const t=(g=e.target,Array.from(g.childNodes));p.fragment&&p.fragment.l(t),t.forEach(O)}else p.fragment&&p.fragment.c();e.intro&&Pt(t.$$.fragment),Lt(t,e.target,e.anchor),P=!1,wt()}var g;rt(d)}function Ht(t,e,n,r){var i;const o=null===(i=n[t])||void 0===i?void 0:i.type;if(e="Boolean"===o&&"boolean"!=typeof e?null!=e:e,!r||!n[t])return e;if("toAttribute"===r)switch(o){case"Object":case"Array":return null==e?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return null==e?null:e;default:return e}else switch(o){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":default:return e;case"Number":return null!=e?+e:e}}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&&(Tt=class extends HTMLElement{constructor(t,e,n){super(),Rt(this,"$$ctor",void 0),Rt(this,"$$s",void 0),Rt(this,"$$c",void 0),Rt(this,"$$cn",!1),Rt(this,"$$d",{}),Rt(this,"$$r",!1),Rt(this,"$$p_d",{}),Rt(this,"$$l",{}),Rt(this,"$$l_u",new Map),this.$$ctor=t,this.$$s=e,n&&this.attachShadow({mode:"open"})}addEventListener(t,e,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const n=this.$$c.$on(t,e);this.$$l_u.set(e,n)}super.addEventListener(t,e,n)}removeEventListener(t,e,n){if(super.removeEventListener(t,e,n),this.$$c){const t=this.$$l_u.get(e);t&&(t(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){if(await Promise.resolve(),!this.$$cn)return;function t(t){return()=>{let e;return{c:function(){e=M("slot"),"default"!==t&&L(e,"name",t)},m:function(t,n){N(t,e,n)},d:function(t){t&&O(e)}}}}const e={},n=function(t){const e={};return t.childNodes.forEach((t=>{e[t.slot||"default"]=!0})),e}(this);for(const i of this.$$s)i in n&&(e[i]=[t(i)]);for(const o of this.attributes){const a=this.$$g_p(o.name);a in this.$$d||(this.$$d[a]=Ht(a,o.value,this.$$p_d,"toProp"))}this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:Jt(Jt({},this.$$d),{},{$$slots:e,$$scope:{ctx:[]}})});const r=()=>{this.$$r=!0;for(const t in this.$$p_d)if(this.$$d[t]=this.$$c.$$.ctx[this.$$c.$$.props[t]],this.$$p_d[t].reflect){const e=Ht(t,this.$$d[t],this.$$p_d,"toAttribute");null==e?this.removeAttribute(t):this.setAttribute(this.$$p_d[t].attribute||t,e)}this.$$r=!1};this.$$c.$$.after_update.push(r),r();for(const s in this.$$l)for(const l of this.$$l[s]){const c=this.$$c.$on(s,l);this.$$l_u.set(l,c)}this.$$l={}}}attributeChangedCallback(t,e,n){var r;this.$$r||(t=this.$$g_p(t),this.$$d[t]=Ht(t,n,this.$$p_d,"toProp"),null===(r=this.$$c)||void 0===r||r.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then((()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)}))}$$g_p(t){return Object.keys(this.$$p_d).find((e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t))||t}});class qt{constructor(){Rt(this,"$$",void 0),Rt(this,"$$set",void 0)}$destroy(){Ut(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){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Gt=[];function Kt(t){let e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;const i=new Set;function o(n){if(o=n,((r=t)!=r?o==o:r!==o||r&&"object"==typeof r||"function"==typeof r)&&(t=n,e)){const e=!Gt.length;for(const e of i)e[1](),Gt.push(e,t);if(e){for(let t=0;t<Gt.length;t+=2)Gt[t][0](Gt[t+1]);Gt.length=0}}var r,o}function a(e){o(e(t))}return{set:o,update:a,subscribe:function(s){const l=[s,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n];return i.add(l),1===i.size&&(e=r(o,a)||n),s(t),()=>{i.delete(l),0===i.size&&e&&(e(),e=null)}}}}function Xt(t,e,r){const i=!Array.isArray(t),o=i?[t]:t;if(!o.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const a=e.length<2;return c=(t,r)=>{let c=!1;const u=[];let d=0,f=n;const g=()=>{if(d)return;f();const o=e(i?u[0]:u,t,r);a?t(o):f=l(o)?o:n},h=o.map(((t,e)=>p(t,(t=>{u[e]=t,d&=~(1<<e),c&&g()}),(()=>{d|=1<<e}))));return c=!0,g(),function(){s(h),f(),c=!1}},{subscribe:Kt(r,c).subscribe};var c}const Yt={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"},Zt=Symbol("root");function Qt(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 te={"text-range":"divkit-faf07",text:"divkit-d9b0e",text_halign_left:"divkit-a4cb7",text_halign_center:"divkit-e1659",text_halign_right:"divkit-ea280",text_valign_top:"divkit-d8ce0",text_valign_center:"divkit-ef58e",text_valign_bottom:"divkit-fe8ed",text_valign_baseline:"divkit-e0c6c",text__inner:"divkit-b8528",text_singleline:"divkit-ef11c",text_multiline:"divkit-ee8e3",text_truncate_none:"divkit-c6ea1",text__inner_gradient:"divkit-cb8e0",text__image:"divkit-bf6e2",text__image_hidden:"divkit-f1002","text_has-focus-color":"divkit-cb341"},ee={outer:"divkit-d65a7","outer_hide-on-transition-in":"divkit-a6d12","outer_halign-self_start":"divkit-cc452","outer_halign-self_center":"divkit-b8331","outer_halign-self_end":"divkit-c573c","outer_halign-self_stretch":"divkit-dcc74","outer_valign-self_start":"divkit-e8077","outer_valign-self_center":"divkit-d40a7","outer_valign-self_end":"divkit-e9f84","outer_valign-self_stretch":"divkit-b7aa3","outer_parent-flex_vertical":"divkit-c143f","outer_parent-flex_horizontal":"divkit-ef302","outer_valign-self_baseline":"divkit-e72b5",outer_width_content:"divkit-b8f4d",outer_height_content:"divkit-faa66","outer_width-constrained":"divkit-d3211","outer_parent-grid":"divkit-ff439","outer_height-constrained":"divkit-a5256","outer_parent-overlap":"divkit-dab2d","outer_parent-overlap-absolute":"divkit-d43fb","outer_scroll-snap_center":"divkit-d9e38","outer_scroll-snap_start":"divkit-efd1e",outer__border:"divkit-d4056",outer_visibility_invisible:"divkit-f018b",outer_visibility_gone:"divkit-e784b","outer_has-action-animation":"divkit-f4980","outer_has-custom-focus":"divkit-c7f14"};function ne(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 re(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 ie(t){let e=re(t);return"0"===e&&(e+="em"),e}function oe(t,e){for(;t.length<e;)t="0"+t;return t}function ae(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=("string"==typeof t&&t||"").toLowerCase()).charAt(0))return n;const r=se(t);return r?(r.a*=e,function(t){return 255===t.a?"#".concat([t.r,t.g,t.b].map((t=>oe(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 se(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 le(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 ce=Boolean;function ue(t){if(1===t.length&&"solid"===t[0].type)return{color:ae(t[0].color||"transparent"),size:"auto",position:"50% 50%"};const e=t.map((t=>"solid"===t.type?function(t){const e=ae(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(ce);return n.length?{size:void 0,pos:void 0,image:"linear-gradient("+(90-Number(t.bg.angle||0))+"deg,"+n.map((t=>ae(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:fe(t.bg.scale),pos:ge(t.bg),image:'url("'+le(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(ce);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=ie(r.value):"relative"===r.type&&(i=de[r.value]));const o=pe(t.bg.center_x),a=pe(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=>ae(t))).join(",")+")"}}({bg:t}):void 0)).filter(ce).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 de={nearest_corner:"closest-corner",farthest_corner:"farthest-corner",nearest_side:"closest-side",farthest_side:"farthest-side"};function pe(t){if(t&&"object"==typeof t&&"type"in t&&void 0!==t.value){if("fixed"===t.type)return ie(t.value);if("relative"===t.type)return"".concat(100*Number(t.value),"%")}return"50%"}function fe(t){return"fit"===t?"contain":"stretch"===t?"fill":"no_scale"===t?"none":"cover"}function ge(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 he(t){const e=/^([^/]+):\/\//.exec(t);return e&&e[1]||""}function me(t,e){return e.has(t)}function ve(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ye(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ve(Object(n),!0).forEach((function(e){$e(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ve(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function $e(t,e,n){return e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function be(t,e,n){return"number"==typeof e&&(t&&e>0&&e<=100||!t&&e>=0&&e<100)?e:n}function _e(t,e){e&&t.push(e)}function we(t,e,n){const r=[];_e(r,e[t]);for(const i in n)if(n.hasOwnProperty(i)){const o=n[i];o&&_e(r,e["".concat(t,"_").concat(i)+("string"==typeof o?"_".concat(o):"")])}return r.join(" ")}const xe=Symbol("state");function ke(t){return re(t.top||0)+" "+re(t.right||0)+" "+re(t.bottom||0)+" "+re(t.left||0)}function Ee(t){if("number"!=typeof t&&"string"!=typeof t)return!1;const e=Number(t);return!isNaN(e)}function Ce(t){return Ee(t)&&t>=0}function Ae(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 ke(t)}function Ve(t,e){const n=Number(t);return isNaN(n)||n<0?e:n}const je=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(!je.call(e,i)||!Pe(t[i],e[i]))return!1}return!0}function De(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 Se(t,e){const n=Number(t);return isNaN(n)?e:n}function Ne(t){const e=[];return"set"===t.name?(t.items||[]).forEach((t=>{e.push(...Ne(t))})):e.push(t),e}function Oe(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 Ie(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=>re((t||e)/n*10))).join(" ")}function Me(){}const Te=Symbol("action");function ze(t){const e=t.touches[0];return{x:e.clientX||e.pageX,y:e.clientY||e.pageY}}function Je(t){var e;let n,r,o,a,l,c,u,d;const p=t[15].default,f=g(p,t,t[14],null);let h=[{class:r=t[1]+(t[8]?" ".concat(t[5]?Yt.root__clickable:Yt["root__clickable-no-transition"]," ").concat(Yt.root__unselectable):"")+" "+(null!==(e=t[0])&&void 0!==e&&e.length?Yt["root_disabled-context-menu"]:"")},{style:t[2]},{role:o=t[8]?"button":null},{tabindex:a=t[8]?0:null},t[3]],$={};for(let t=0;t<h.length;t+=1)$=i($,h[t]);return{c(){n=M("span"),f&&f.c(),W(n,$)},m(e,r){N(e,n,r),f&&f.m(n,null),t[23](n),c=!0,u||(d=[b(l=t[4].call(null,n)),B(n,"click",t[19]),B(n,"keydown",t[10]),B(n,"focus",t[20]),B(n,"blur",t[21])],u=!0)},p(t,e){var i;f&&f.p&&(!c||16384&e[0])&&v(f,p,t,t[14],c?m(p,t[14],e,null):y(t[14]),null),W(n,$=Mt(h,[(!c||291&e[0]&&r!==(r=t[1]+(t[8]?" ".concat(t[5]?Yt.root__clickable:Yt["root__clickable-no-transition"]," ").concat(Yt.root__unselectable):"")+" "+(null!==(i=t[0])&&void 0!==i&&i.length?Yt["root_disabled-context-menu"]:"")))&&{class:r},(!c||4&e[0])&&{style:t[2]},(!c||256&e[0]&&o!==(o=t[8]?"button":null))&&{role:o},(!c||256&e[0]&&a!==(a=t[8]?0:null))&&{tabindex:a},8&e[0]&&t[3]]))},i(t){c||(Pt(f,t),c=!0)},o(t){Dt(f,t),c=!1},d(e){e&&O(n),f&&f.d(e),t[23](null),u=!1,s(d)}}}function Re(t){var e;let n,r,o,a,l,c;const u=t[15].default,d=g(u,t,t[14],null);let p=[{href:t[7]},{target:t[9]},{style:t[2]},{class:r=t[1]+" "+(t[5]?Yt.root__clickable:Yt["root__clickable-no-transition"])+" "+(null!==(e=t[0])&&void 0!==e&&e.length?Yt["root_disabled-context-menu"]:"")},t[3]],f={};for(let t=0;t<p.length;t+=1)f=i(f,p[t]);return{c(){n=M("a"),d&&d.c(),W(n,f)},m(e,r){N(e,n,r),d&&d.m(n,null),t[22](n),a=!0,l||(c=[b(o=t[4].call(null,n)),B(n,"click",t[16]),B(n,"keydown",t[10]),B(n,"focus",t[17]),B(n,"blur",t[18])],l=!0)},p(t,e){var i;d&&d.p&&(!a||16384&e[0])&&v(d,u,t,t[14],a?m(u,t[14],e,null):y(t[14]),null),W(n,f=Mt(p,[(!a||128&e[0])&&{href:t[7]},(!a||512&e[0])&&{target:t[9]},(!a||4&e[0])&&{style:t[2]},(!a||35&e[0]&&r!==(r=t[1]+" "+(t[5]?Yt.root__clickable:Yt["root__clickable-no-transition"])+" "+(null!==(i=t[0])&&void 0!==i&&i.length?Yt["root_disabled-context-menu"]:"")))&&{class:r},8&e[0]&&t[3]]))},i(t){a||(Pt(d,t),a=!0)},o(t){Dt(d,t),a=!1},d(e){e&&O(n),d&&d.d(e),t[22](null),l=!1,s(c)}}}function Be(t){let e,n,r,i;const o=[Re,Je],a=[];function s(t,e){return t[7]?0:1}return e=s(t),n=a[e]=o[e](t),{c(){n.c(),r=R()},m(t,n){a[e].m(t,n),N(t,r,n),i=!0},p(t,i){let l=e;e=s(t),e===l?a[e].p(t,i):(Vt(),Dt(a[l],1,1,(()=>{a[l]=null})),jt(),n=a[e],n?n.p(t,i):(n=a[e]=o[e](t),n.c()),Pt(n,1),n.m(r.parentNode,r))},i(t){i||(Pt(n),i=!0)},o(t){Dt(n),i=!1},d(t){t&&O(r),a[e].d(t)}}}function Le(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=Me}=e,{customAction:p=null}=e,{isNativeActionAnimation:f=!0}=e;const g=lt(Zt),h=lt(Te);let m;st(Te,{hasAction:()=>Boolean(h.hasAction()||(null==o?void 0:o.length))});let v,y="",$=-1,b=null,_=!1,w=!1;async function x(t){h.hasAction()||void 0!==t.button&&0!==t.button||(!1===(null==p?void 0:p(t))?t.preventDefault():o&&(o.some((t=>{if(null==t?void 0:t.typed)return!0;const e=null==t?void 0:t.url;if(!e)return!1;const n=he(e);return n&&!me(n,g.getBuiltinProtocols())}))&&t.preventDefault(),g.execAnyActions(o)))}function k(t){h.hasAction()||void 0!==t.button&&0!==t.button||g.execAnyActions(a,!0)}function E(t){t.touches.length>1||(b=ze(t),_=!1,$=Date.now())}function C(t){if(!b)return;const e=ze(t);(Math.abs(b.x-e.x)>8||Math.abs(b.y-e.y)>8)&&(_=!0)}function A(){!b||$<0||(!_&&Date.now()-$>=400&&g.execAnyActions(s,!0),b=null,$=-1)}return t.$$set=t=>{"actions"in t&&n(11,o=t.actions),"doubleTapActions"in t&&n(12,a=t.doubleTapActions),"longTapActions"in t&&n(0,s=t.longTapActions),"cls"in t&&n(1,l=t.cls),"style"in t&&n(2,c=t.style),"attrs"in t&&n(3,u=t.attrs),"use"in t&&n(4,d=t.use),"customAction"in t&&n(13,p=t.customAction),"isNativeActionAnimation"in t&&n(5,f=t.isNativeActionAnimation),"$$scope"in t&&n(14,i=t.$$scope)},t.$$.update=()=>{if(10368&t.$$.dirty[0]){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,y=e),n(9,v=o[t].target||void 0);break}}Array.isArray(o)&&(null==o?void 0:o.length)&&h.hasAction()&&(n(7,y=""),g.logError(Qt(new Error("Actionable element is forbidden inside other actionable element"),{level:"warn",additional:{actions:o}}))),n(8,w=Boolean(p)),y&&!me(he(y),g.getBuiltinProtocols())?(n(7,y=""),n(8,w=!0)):!y&&Array.isArray(o)&&(null==o?void 0:o.length)&&(n(8,w=!0),o.some((t=>t.url||t.typed))||g.logError(Qt(new Error("The component has a list of actions, but does not have a real action"),{level:"warn",additional:{actions:o}})))}4545&t.$$.dirty[0]&&m&&(y||w?m.addEventListener("click",x):m.removeEventListener("click",x),(null==a?void 0:a.length)?m.addEventListener("dblclick",k):m.removeEventListener("dblclick",k),(null==s?void 0:s.length)?(m.addEventListener("touchstart",E,{passive:!0}),m.addEventListener("touchmove",C,{passive:!0}),m.addEventListener("touchend",A,{passive:!0}),m.addEventListener("touchcancel",A,{passive:!0})):(m.removeEventListener("touchstart",E),m.removeEventListener("touchmove",C),m.removeEventListener("touchend",A),m.removeEventListener("touchcancel",A)))},[s,l,c,u,d,f,m,y,w,v,function(t){const e=t.target;e instanceof HTMLElement&&("INPUT"===e.tagName||"true"===e.contentEditable)||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||"Enter"===t.key&&Array.isArray(o)&&o.length&&(g.execAnyActions(o),t.preventDefault())},o,a,p,i,r,function(e){ct.call(this,t,e)},function(e){ct.call(this,t,e)},function(e){ct.call(this,t,e)},function(e){ct.call(this,t,e)},function(e){ct.call(this,t,e)},function(e){ct.call(this,t,e)},function(t){dt[t?"unshift":"push"]((()=>{m=t,n(6,m)}))},function(t){dt[t?"unshift":"push"]((()=>{m=t,n(6,m)}))}]}const Ue=class extends qt{constructor(t){super(),Wt(this,t,Le,Be,d,{actions:11,doubleTapActions:12,longTapActions:0,cls:1,style:2,attrs:3,use:4,customAction:13,isNativeActionAnimation:5},null,[-1,-1])}},We={"outer-background":"divkit-bf253","outer-background_clip":"divkit-dcad7","outer-background__item":"divkit-b921d","outer-background__item_hidden":"divkit-cd613"};function He(t){return Ee(t)&&t>0}function qe(t,e){return t.map((t=>{if("blur"===(null==t?void 0:t.type)){if(He(t.radius))return"blur(".concat(ie(t.radius/2),")")}else e(Qt(new Error("Unknown filter"),{level:"warn",additional:{filter:null==t?void 0:t.type}}))})).filter(Boolean).join(" ")}function Ge(t,e,n){const r=t.slice();return r[5]=e[n],r}function Ke(t){let e,n,r;return{c(){e=M("span"),L(e,"class",n=We["outer-background__item"]),L(e,"style",r=ne(t[5].style))},m(t,n){N(t,e,n)},p(t,n){2&n&&r!==(r=ne(t[5].style))&&L(e,"style",r)},d(t){t&&O(e)}}}function Xe(t){let e,n,r,i,o,a;return{c(){e=M("img"),u(e.src,n=t[5].image_url)||L(e,"src",n),L(e,"alt",""),L(e,"aria-hidden","true"),L(e,"loading","lazy"),L(e,"decoding","async"),L(e,"class",r=We["outer-background__item"]),L(e,"style",i=ne(t[5].style))},m(n,r){N(n,e,r),o||(a=B(e,"error",t[2]),o=!0)},p(t,r){2&r&&!u(e.src,n=t[5].image_url)&&L(e,"src",n),2&r&&i!==(i=ne(t[5].style))&&L(e,"style",i)},d(t){t&&O(e),o=!1,a()}}}function Ye(t){let e;function n(t,e){return t[5].image_url?Xe:Ke}let r=n(t),i=r(t);return{c(){i.c(),e=R()},m(t,n){i.m(t,n),N(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){t&&O(e),i.d(t)}}}function Ze(t){let e,r,i=Nt(t[1]),o=[];for(let e=0;e<i.length;e+=1)o[e]=Ye(Ge(t,i,e));return{c(){e=M("span");for(let t=0;t<o.length;t+=1)o[t].c();L(e,"class",r=We["outer-background"]+(t[0]?" "+We["outer-background_clip"]:"")),K(e,"border-radius",t[0])},m(t,n){N(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=Nt(t[1]),n=0;n<i.length;n+=1){const r=Ge(t,i,n);o[n]?o[n].p(r,a):(o[n]=Ye(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=We["outer-background"]+(t[0]?" "+We["outer-background_clip"]:""))&&L(e,"class",r),1&a&&K(e,"border-radius",t[0])},i:n,o:n,d(t){t&&O(e),I(o,t)}}}function Qe(t,e,n){let r,{background:i=[]}=e,{radius:o=""}=e;const a=lt(Zt);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=ue([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=qe(t.filters,a.logError)))}return n})))},[o,r,function(t){t.target&&"classList"in t.target&&t.target.classList.add(We["outer-background__item_hidden"])},i]}const tn=class extends qt{constructor(t){super(),Wt(this,t,Qe,Ze,d,{background:3,radius:0})}},en=t=>({hasCustomFocus:64&t[0]}),nn=t=>({focusHandler:t[36],blurHandler:t[37],hasCustomFocus:t[6]});function rn(t){let e,n;return e=new Ue({props:{use:t[35],cls:t[0]+" "+we("outer",ee,t[17]),style:ne(t[15]),actions:t[11],doubleTapActions:t[12],longTapActions:t[13],attrs:t[7],isNativeActionAnimation:!t[5].length||cn(t[5]),$$slots:{default:[sn]},$$scope:{ctx:t}}}),e.$on("focus",t[36]),e.$on("blur",t[37]),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};131073&n[0]&&(r.cls=t[0]+" "+we("outer",ee,t[17])),32768&n[0]&&(r.style=ne(t[15])),2048&n[0]&&(r.actions=t[11]),4096&n[0]&&(r.doubleTapActions=t[12]),8192&n[0]&&(r.longTapActions=t[13]),128&n[0]&&(r.attrs=t[7]),32&n[0]&&(r.isNativeActionAnimation=!t[5].length||cn(t[5])),350&n[0]|4194304&n[3]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function on(t){let e,n;return e=new tn({props:{background:t[3],radius:t[2]}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};8&n[0]&&(r.background=t[3]),4&n[0]&&(r.radius=t[2]),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function an(t){let e,n,r;return{c(){e=M("span"),L(e,"class",n=ee.outer__border),L(e,"style",r=ne(t[1]))},m(t,n){N(t,e,n)},p(t,n){2&n[0]&&r!==(r=ne(t[1]))&&L(e,"style",r)},d(t){t&&O(e)}}}function sn(t){let e,n,r,i=t[4]&&on(t);const o=t[114].default,a=g(o,t,t[115],nn);let s=t[8]&&an(t);return{c(){i&&i.c(),e=R(),a&&a.c(),s&&s.c(),n=R()},m(t,o){i&&i.m(t,o),N(t,e,o),a&&a.m(t,o),s&&s.m(t,o),N(t,n,o),r=!0},p(t,l){t[4]?i?(i.p(t,l),16&l[0]&&Pt(i,1)):(i=on(t),i.c(),Pt(i,1),i.m(e.parentNode,e)):i&&(Vt(),Dt(i,1,1,(()=>{i=null})),jt()),a&&a.p&&(!r||64&l[0]|4194304&l[3])&&v(a,o,t,t[115],r?m(o,t[115],l,en):y(t[115]),nn),t[8]?s?s.p(t,l):(s=an(t),s.c(),s.m(n.parentNode,n)):s&&(s.d(1),s=null)},i(t){r||(Pt(i),Pt(a,t),r=!0)},o(t){Dt(i),Dt(a,t),r=!1},d(t){t&&(O(e),O(n)),i&&i.d(t),a&&a.d(t),s&&s.d(t)}}}function ln(t){let e,n,r=!t[9]&&!t[10]&&rn(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[9]||t[10]?r&&(Vt(),Dt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),1536&n[0]&&Pt(r,1)):(r=rn(t),r.c(),Pt(r,1),r.m(e.parentNode,e))},i(t){n||(Pt(r),n=!0)},o(t){Dt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function cn(t){return t.some((t=>"native"===t.name))}function un(t,e,r){let i,o,a,s,l,c,u,d,f,g,h,m,v,y,$,b,_,w,x,k,E,C,A,V,j,P,D,F,S,N,O,I,M,T,z,J,R,B,L,U,W,H,q,G,K,X=n,Y=n,Z=n,Q=n,tt=n,et=n,nt=n,rt=n,it=n,ot=n,st=n,ct=n,ut=n,dt=n,pt=n,ft=n,gt=n,ht=n,mt=n;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((()=>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((()=>st())),t.$$.on_destroy.push((()=>ct())),t.$$.on_destroy.push((()=>ut())),t.$$.on_destroy.push((()=>dt())),t.$$.on_destroy.push((()=>pt())),t.$$.on_destroy.push((()=>ft())),t.$$.on_destroy.push((()=>gt())),t.$$.on_destroy.push((()=>ht())),t.$$.on_destroy.push((()=>mt()));let{$$slots:yt={},$$scope:$t}=e,{json:bt={}}=e,{origJson:_t}=e,{templateContext:wt}=e,{cls:xt=""}=e,{style:kt}=e,{layoutParams:Et={}}=e,{customDescription:Ct=!1}=e,{customPaddings:At=!1}=e,{customActions:Vt=""}=e,{additionalPaddings:jt=null}=e,{heightByAspect:Pt=!1}=e,{parentOf:Dt}=e,{replaceItems:Ft}=e;const St={left:"start",center:"center",right:"end"},Nt={top:"start",center:"center",bottom:"end",baseline:"baseline"},Ot=lt(Zt),It=lt(xe);let Mt,Tt,zt=null,Jt=[];function Rt(t,e){if(!Array.isArray(Dt)||!Ft)return;const n=Dt.findIndex((e=>(null==e?void 0:e.id)===t)),i=Dt.slice();i.splice(n,1,...e||[]),r(38,Dt=i),Ft(i)}let Bt,Lt,Ut,Wt,Ht,qt,Gt,Kt,Xt,Yt,te={},ee={},ne=!1,oe=1,se="transparent",le=0,de={"top-left":0,"top-right":0,"bottom-right":0,"bottom-left":0},pe="",fe=null,ge="",ve={},$e=0,_e=0,we=0,Ee=!1,je=!1,Pe={},Me=0,Te=0,ze=0,Je=!1,Re=!1,Be=1;const Le=Et.fakeElement?[]:bt.transition_triggers||["state_change","visibility_change"],Ue=-1!==Le.indexOf("state_change")&&bt.id,We=-1!==Le.indexOf("visibility_change")&&bt.id;let He,qe,Ge,Ke,Xe,Ye,Ze,Qe=[],tn=[],en=[],nn=[],rn=[],on=[],an="";function sn(t){const e=Se(t.start_value,1),n=Se(t.end_value,1),i=Ve(t.start_delay,0),o=Ve(t.duration,300),a=Fe(t.interpolator,"ease_in_out").replace(/_/g,"-");switch(t.name){case"fade":return r(81,Ke=e),r(82,Xe=n),"opacity ".concat(o,"ms ").concat(a," ").concat(i,"ms");case"scale":return r(83,Ye=e),r(84,Ze=n),"transform ".concat(o,"ms ").concat(a," ").concat(i,"ms");case"native":case"no_animation":return"";default:return Ot.logError(Qt(new Error("Unknown action_animation name"),{additional:{animation:t.name}})),""}}let ln,cn,un,dn=!1,pn="visible",fn=0,gn=0;return at((()=>{var t;Jt.forEach((t=>{Ot.unregisterParentOf(t)})),r(50,Jt=[]),null===(t=bt.tooltips)||void 0===t||t.forEach((t=>{Ot.unregisterTooltip(t)}))})),t.$$set=t=>{"json"in t&&r(39,bt=t.json),"origJson"in t&&r(40,_t=t.origJson),"templateContext"in t&&r(41,wt=t.templateContext),"cls"in t&&r(0,xt=t.cls),"style"in t&&r(42,kt=t.style),"layoutParams"in t&&r(43,Et=t.layoutParams),"customDescription"in t&&r(44,Ct=t.customDescription),"customPaddings"in t&&r(45,At=t.customPaddings),"customActions"in t&&r(46,Vt=t.customActions),"additionalPaddings"in t&&r(47,jt=t.additionalPaddings),"heightByAspect"in t&&r(48,Pt=t.heightByAspect),"parentOf"in t&&r(38,Dt=t.parentOf),"replaceItems"in t&&r(49,Ft=t.replaceItems),"$$scope"in t&&r(115,$t=t.$$scope)},t.$$.update=()=>{if(524416&t.$$.dirty[1]&&(Jt.forEach((t=>{Ot.unregisterParentOf(t)})),r(50,Jt=[]),Dt&&Dt.forEach((t=>{t.id&&(Jt.push(t.id),Ot.registerParentOf(t.id,{replaceWith:Rt}))}))),256&t.$$.dirty[1]&&(r(34,i=Ot.getDerivedFromVars(bt.focus)),tt(),tt=p(i,(t=>r(99,O=t)))),256&t.$$.dirty[1]&&(r(33,o=Ot.getDerivedFromVars(bt.border)),mt(),mt=p(o,(t=>r(113,K=t)))),66&t.$$.dirty[0]|32505856&t.$$.dirty[1]|1048640&t.$$.dirty[3]){const t=un&&(null==O?void 0:O.border)?O.border:K;let e={},n={},i=!1,o="";if(t){if(t.has_shadow){const n=t.shadow;e["box-shadow"]=n?function(t){var e,n,r,i,o,a;return re((null===(e=t.offset)||void 0===e||null===(n=e.x)||void 0===n?void 0:n.value)||0)+" "+re((null===(r=t.offset)||void 0===r||null===(i=r.y)||void 0===i?void 0:i.value)||0)+" "+re(null!==(o=t.blur)&&void 0!==o?o:2)+" "+ae(t.color||"#000000",null!==(a=t.alpha)&&void 0!==a?a:.19)}(n):"0 1px 2px 0 rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.07)"}if(t.stroke&&(i=!0,r(52,oe=Ve(t.stroke.width,oe)),r(53,se=ae(t.stroke.color,1,se)),n.border="".concat(re(oe)," solid ").concat(se)),t.corners_radius?(r(55,de=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}(t.corners_radius,de)),n["border-radius"]=e["border-radius"]=Ie(de)):t.corner_radius&&(r(54,le=Ve(t.corner_radius,le)),r(55,de={"top-left":le,"top-right":le,"bottom-right":le,"bottom-left":le}),n["border-radius"]=e["border-radius"]=re(le)),i&&oe&&(t.corners_radius||t.corner_radius)){let t=Object.assign({},de);["top-left","top-right","bottom-right","bottom-left"].forEach((e=>{t[e]=(t[e]||0)+oe/2})),o=Ie(t)}}r(51,te=De(e,te)),r(1,ee=De(n,ee)),r(8,ne=i),r(2,pe=o)}if(256&t.$$.dirty[1]&&(r(32,a=Ot.getDerivedFromVars(bt.paddings)),ht(),ht=p(a,(t=>r(112,G=t)))),33570816&t.$$.dirty[1]|524288&t.$$.dirty[3]&&r(56,fe=Oe(G&&!At?G:void 0,fe)),33619968&t.$$.dirty[1]&&r(92,s=ke(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}(fe,jt))),256&t.$$.dirty[1]&&(r(31,l=Ot.getDerivedFromVars(bt.margins)),ft(),ft=p(l,(t=>r(110,H=t)))),67108864&t.$$.dirty[1]|131072&t.$$.dirty[3]&&r(57,ge=Ae(H,ge)),256&t.$$.dirty[1]&&(r(30,c=Ot.getDerivedFromVars(bt.width)),dt(),dt=p(c,(t=>r(108,U=t)))),256&t.$$.dirty[1]&&(r(29,u=Ot.getDerivedFromVars(bt.alignment_horizontal)),gt(),gt=p(u,(t=>r(111,q=t)))),134221824&t.$$.dirty[1]|1&t.$$.dirty[2]|425984&t.$$.dirty[3]){let t,e,n,i,o={},a=0,s=0,l=!1,c=!1;const u=null==U?void 0:U.type;if("fixed"===u)r(62,$e=Ve(null==U?void 0:U.value,$e)),e=re($e);else if("wrap_content"!==u&&(Et.overlapParent||"match_parent"!==u&&u||!Et.parentHorizontalWrapContent))t="parent","vertical"===Et.parentContainerOrientation&&Et.parentContainerWrap&&(c=!0,Ot.logError(Qt(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"vertical"===Et.parentLayoutOrientation?e="calc(100% - ".concat(ie(((null==H?void 0:H.left)||0)+((null==H?void 0:H.right)||0)),")"):"horizontal"===Et.parentContainerOrientation&&(a=U&&"weight"in U&&U.weight||1,Et.parentContainerWrap&&(l=!0));else{if(t="content",("wrap_content"===u&&(null==U?void 0:U.constrained)||("match_parent"===u||!u)&&Et.parentHorizontalWrapContent)&&(o["width-constrained"]=!0,"horizontal"===Et.parentContainerOrientation&&(s=1)),"wrap_content"===u){const t=U;t.min_size&&Ce(t.min_size.value)&&(n=re(t.min_size.value)),t.max_size&&Ce(t.max_size.value)&&(i=re(t.max_size.value))}"match_parent"!==u&&u||Ot.logError(Qt(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))}if("parent"===t)o["halign-self"]="stretch";else{const t=q;o["halign-self"]="left"===t||"center"===t||"right"===t?St[t]:Et.parentHAlign||"start"}t&&(o.width=t),r(59,Bt=e),r(60,Lt=n),r(61,Ut=i),r(63,_e=a),r(64,we=s),r(58,ve=De(o,ve)),r(65,Ee=l),r(9,je=c)}if(256&t.$$.dirty[1]&&(r(28,d=Ot.getDerivedFromVars(bt.height)),ut(),ut=p(d,(t=>r(107,L=t)))),256&t.$$.dirty[1]&&(r(27,f=Ot.getDerivedFromVars(bt.alignment_vertical)),pt(),pt=p(f,(t=>r(109,W=t)))),135168&t.$$.dirty[1]|272&t.$$.dirty[2]|212992&t.$$.dirty[3]){let t,e,n,i,o={},a=0,s=0,l=!1,c=!1;const u=null==L?void 0:L.type;if(Pt);else if("fixed"===u)r(70,Me=Ve(null==L?void 0:L.value,Me)),e=re(Me);else if("match_parent"!==u||!Et.overlapParent&&Et.parentVerticalWrapContent){if(t="content",("wrap_content"===u&&(null==L?void 0:L.constrained)||"match_parent"===u&&Et.parentVerticalWrapContent)&&(o["height-constrained"]=!0,"vertical"===Et.parentContainerOrientation&&(s=1)),"wrap_content"===u){const t=L;(null==t?void 0:t.min_size)&&Ce(t.min_size.value)&&(n=re(t.min_size.value)),(null==t?void 0:t.max_size)&&Ce(t.max_size.value)&&(i=re(t.max_size.value))}"match_parent"===u&&Ot.logError(Qt(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))}else t="parent","horizontal"===Et.parentContainerOrientation&&Et.parentContainerWrap&&(c=!0,Ot.logError(Qt(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"horizontal"===Et.parentLayoutOrientation?e="calc(100% - ".concat(ie(((null==H?void 0:H.top)||0)+((null==H?void 0:H.bottom)||0)),")"):"vertical"===Et.parentContainerOrientation&&(a=(null==L?void 0:L.weight)||1,Et.parentContainerWrap&&(l=!0));if("parent"===t)o["valign-self"]="stretch";else{const t=W;"top"===t||"center"===t||"bottom"===t||"baseline"===t&&"horizontal"===Et.parentContainerOrientation?o["valign-self"]=Nt[t]:o["valign-self"]=Et.parentVAlign||"start"}t&&(o.height=t),r(67,Wt=e),r(68,Ht=n),r(69,qt=i),r(71,Te=a),r(72,ze=s),r(66,Pe=De(o,Pe)),r(73,Je=l),r(10,Re=c)}var e,n;if(4096&t.$$.dirty[1]&&r(95,g=!!Et.overlapParent||void 0),4096&t.$$.dirty[1]|49152&t.$$.dirty[3]&&r(94,h=Et.overlapParent&&(!U||"match_parent"===U.type)&&"match_parent"===(null==L?void 0:L.type)),4096&t.$$.dirty[1]&&r(93,m=Et.gridArea?"".concat(Et.gridArea.y+1,"/").concat(Et.gridArea.x+1,"/span ").concat(Et.gridArea.rowSpan,"/span ").concat(Et.gridArea.colSpan):void 0),256&t.$$.dirty[1]&&(r(26,v=Ot.getDerivedFromVars(bt.alpha)),ct(),ct=p(v,(t=>r(106,B=t)))),4096&t.$$.dirty[2]|8192&t.$$.dirty[3]&&(r(74,(n=Be,Be=!Ce(e=B)||void 0===e||e>1?n:Number(e))),r(75,Gt=1===Be?void 0:Be)),256&t.$$.dirty[1]&&(r(25,y=Ot.getDerivedFromVars(bt.accessibility)),st(),st=p(y,(t=>r(105,R=t)))),8192&t.$$.dirty[1]|4096&t.$$.dirty[3]&&(r(7,Tt=void 0),R&&!Ct&&R.description&&(r(7,Tt={}),r(7,Tt["aria-label"]=R.description,Tt))),256&t.$$.dirty[1]&&(r(24,$=Ot.getDerivedFromVars(bt.background)),ot(),ot=p($,(t=>r(104,J=t)))),92&t.$$.dirty[0]|2112&t.$$.dirty[3]&&(r(3,Kt=un&&(null==O?void 0:O.background)?O.background:J),r(76,Xt={}),r(4,Yt=!1),Array.isArray(Kt)&&(r(4,Yt=Kt.some((t=>"image"===t.type||"nine_patch_image"===t.type))||Boolean(pe)),!Yt))){const t=ue(Kt);r(76,Xt["background-color"]=t.color,Xt),r(76,Xt["background-image"]=t.image,Xt),r(76,Xt["background-size"]=t.size,Xt),r(76,Xt["background-position"]=t.position,Xt),r(76,Xt["background-repeat"]="no-repeat",Xt)}if(256&t.$$.dirty[1]&&(r(77,He=void 0),Ue&&bt.transition_in&&Ot.isRunning("stateChange")&&r(77,He=!0)),256&t.$$.dirty[1]&&(r(79,Ge=void 0),Ue&&bt.transition_change&&Ot.isRunning("stateChange")&&It.hasTransitionChange(bt.id)&&r(79,Ge=!0)),256&t.$$.dirty[1]&&(r(23,b=Ot.getDerivedFromVars(bt.action)),rt(),rt=p(b,(t=>r(102,T=t)))),256&t.$$.dirty[1]&&(r(22,_=Ot.getDerivedFromVars(bt.actions)),it(),it=p(_,(t=>r(103,z=t)))),256&t.$$.dirty[1]&&(r(21,w=Ot.getDerivedFromVars(bt.doubletap_actions)),nt(),nt=p(w,(t=>r(101,M=t)))),256&t.$$.dirty[1]&&(r(20,x=Ot.getDerivedFromVars(bt.longtap_actions)),et(),et=p(x,(t=>r(100,I=t)))),36864&t.$$.dirty[1]|1984&t.$$.dirty[3]){let t=z||T&&[T]||[],e=M||[],n=I||[],i=(null==O?void 0:O.on_focus)||[],o=(null==O?void 0:O.on_blur)||[];Et.fakeElement?(t=[],e=[],n=[],i=[],o=[]):(Array.isArray(t)||(t=[],Ot.logError(Qt(new Error("Actions should be array")))),Array.isArray(e)||(e=[],Ot.logError(Qt(new Error("DoubleTapActions should be array")))),Array.isArray(n)||(n=[],Ot.logError(Qt(new Error("LongTapActions should be array")))),Array.isArray(i)||(i=[],Ot.logError(Qt(new Error("FocusActions should be array")))),Array.isArray(o)||(o=[],Ot.logError(Qt(new Error("BlurActions should be array"))))),(t.length||e.length||n.length)&&Vt&&(t=[],e=[],n=[],Ot.logError(Qt(new Error('Cannot use action on component "'.concat(Vt,'"'))))),r(11,Qe=t),r(12,tn=e),r(13,en=n),nn=i,rn=o}if(256&t.$$.dirty[1]&&(r(19,k=Ot.getDerivedFromVars(bt.action_animation)),Q(),Q=p(k,(t=>r(98,N=t)))),32&t.$$.dirty[0]|32&t.$$.dirty[3]&&N&&(r(5,on=Ne(N)),r(80,an=on.map(sn).filter(Boolean).join(", "))),256&t.$$.dirty[1]&&(r(18,E=Ot.getDerivedFromVars(bt.visibility)),Z(),Z=p(E,(t=>r(97,S=t)))),25165824&t.$$.dirty[2]|16&t.$$.dirty[3]){const t=pn,e=function(t,e){return"visible"===t||"invisible"===t||"gone"===t?t:e}(S,pn);t!==e&&(!dn||"visible"!==pn&&"visible"!==e?r(86,pn=e):async function(t){r(86,pn=t);const e="visible"===t?"in":"out",n="in"===e?bt.transition_in:bt.transition_out;We&&n&&(await vt(),"in"===e&&r(78,qe=!0),It.runVisibilityTransition(Object.assign(Object.assign({},bt),{visibility:"visible"}),wt,n,Mt,e).then((()=>{"in"===e&&r(78,qe=!1)})).catch((t=>{throw"in"===e&&r(78,qe=!1),t})))}(e)),dn||r(85,dn=!0)}if(64&t.$$.dirty[0]|134222080&t.$$.dirty[1]|17268752&t.$$.dirty[2]|6&t.$$.dirty[3]&&r(17,C=Object.assign(Object.assign(Object.assign({},ve),Pe),{"parent-overlap":g,"parent-overlap-absolute":h,"scroll-snap":Et.scrollSnap,"hide-on-transition-in":He||qe||Ge,visibility:pn,"has-action-animation":Boolean(an),"parent-flex":Et.parentContainerOrientation||void 0,"parent-grid":Boolean(Et.gridArea)||void 0,"has-custom-focus":Boolean(un&&bt.focus)})),256&t.$$.dirty[1]&&(r(16,A=Ot.getDerivedFromVars(bt.transform)),Y(),Y=p(A,(t=>r(96,F=t)))),100663296&t.$$.dirty[2]|8&t.$$.dirty[3]&&F&&void 0!==F.rotation){const t=F.pivot_x||{type:"pivot-percentage",value:50};r(87,fn=Se(t.value,fn));const e="pivot-fixed"===t.type?re(fn):"".concat(fn,"%"),n=F.pivot_y||{type:"pivot-percentage",value:50};r(88,gn=Se(n.value,gn));const i="pivot-fixed"===n.type?re(gn):"".concat(gn,"%");r(89,ln="".concat(e," ").concat(i)),r(90,cn="rotate(".concat(F.rotation,"deg)"))}2570&t.$$.dirty[2]&&r(91,V=Ee||Je?"100%":_e||Te?0:void 0),1947207680&t.$$.dirty[1]|2021418726&t.$$.dirty[2]|1&t.$$.dirty[3]&&r(15,j=Object.assign(Object.assign(Object.assign(Object.assign({},kt),Xt),te),{width:Bt,"min-width":Lt,"max-width":Ut,height:Wt,"min-height":Ht,"max-height":qt||(null==kt?void 0:kt["max-height"]),"grid-area":m,padding:s,margin:ge,opacity:Gt,transition:an,"transform-origin":ln,transform:cn,"flex-grow":_e||Te||void 0,"flex-shrink":we||ze?1:void 0,"flex-basis":V,"--divkit-animation-opacity-start":Ke,"--divkit-animation-opacity-end":Xe,"--divkit-animation-scale-start":Ye,"--divkit-animation-scale-end":Ze}))},r(14,P=Ot.isPointerFocus),X(),X=p(P,(t=>r(120,D=t))),[xt,ee,pe,Kt,Yt,on,un,Tt,ne,je,Re,Qe,tn,en,P,j,A,C,E,k,x,w,_,b,$,y,v,f,d,u,c,l,a,o,i,function(t){var e;Mt=t,Ue&&bt.transition_in&&It.registerChildWithTransitionIn(bt,wt,bt.transition_in,t).then((()=>{r(77,He=!1)})).catch((t=>{throw r(77,He=!1),t})),Ue&&bt.transition_out&&It.registerChildWithTransitionOut(bt,wt,bt.transition_out,t),Ue&&bt.transition_change&&It.registerChildWithTransitionChange(bt,wt,bt.transition_change,t).then((()=>{r(79,Ge=!1)})).catch((t=>{throw r(79,Ge=!1),t}));const n=Et.fakeElement?[]:bt.visibility_actions||bt.visibility_action&&[bt.visibility_action],i=Et.fakeElement?[]:bt.disappear_actions;(Array.isArray(n)&&n.length||Array.isArray(i)&&i.length)&&function(t,e){let{visibilityActions:n,disappearActions:r,rootCtx:i}=e;const o=[];n&&n.forEach((t=>{o.push({type:"visibility",index:o.length,action:t,visible:!1,count:0,finished:!1})})),r&&r.forEach((t=>{o.push({type:"disappear",index:o.length,action:t,visible:!1,count:0,finished:!1})}));const a=o.map((t=>{const e="visibility"===t.type,n=i.getJsonWithVars({visibility_percentage:t.action.visibility_percentage,visibility_duration:e?t.action.visibility_duration:t.action.disappear_duration,log_limit:t.action.log_limit});return ye(ye({},n),{},{visibility_percentage:be(e,n.visibility_percentage,e?50:0)})})),s=[...new Set(a.map((t=>t.visibility_percentage/100)))];new IntersectionObserver((t=>{t.forEach((t=>{o.forEach((e=>{const n=a[e.index],r="visibility"===e.type;let o;o=0===n.visibility_percentage?t.intersectionRatio>=1e-12:t.intersectionRatio>=n.visibility_percentage/100;const s=r?!e.visible&&o:e.visible&&!o,l=r?!o:o;s?e.finished||(e.timer=setTimeout((()=>{++e.count;const t=0===n.log_limit?1/0:n.log_limit||1;++e.count>=t&&(e.finished=!0);const o=i.getJsonWithVars(e.action),a=o.url,s=o.typed;if(a){const t=he(a);t&&!me(t,i.getBuiltinProtocols())&&("div-action"===t?i.execAction(o):o.log_id&&i.execCustomAction(o))}else s&&i.execAction(o);i.logStat(r?"visible":"disappear",o)}),a[e.index].visibility_duration||800)):l&&e.timer&&clearTimeout(e.timer),e.visible=o}))}))}),{threshold:s}).observe(t)}(t,{visibilityActions:n,disappearActions:i,rootCtx:Ot});const o=bt.id;o&&It.registerChild(o),null===(e=bt.tooltips)||void 0===e||e.forEach((e=>{Ot.registerTooltip(t,e)}));let a=null;if(Array.isArray(bt.extensions)){const e=Ot.getExtensionContext();zt=bt.extensions.map((n=>{var r;const i=Ot.getExtension(n.id,n.params);return i&&(null===(r=i.mountView)||void 0===r||r.call(i,t,e)),i})).filter(ce)}return{destroy(){if(o&&It.unregisterChild(o),zt){const e=Ot.getExtensionContext();zt.forEach((n=>{var r;null===(r=n.unmountView)||void 0===r||r.call(n,t,e)})),zt=null}a&&a.destroy()}}},function(){bt.focus&&(D||r(6,un=!0),Ot.execAnyActions(nn))},function(){bt.focus&&(r(6,un=!1),Ot.execAnyActions(rn))},Dt,bt,_t,wt,kt,Et,Ct,At,Vt,jt,Pt,Ft,Jt,te,oe,se,le,de,fe,ge,ve,Bt,Lt,Ut,$e,_e,we,Ee,Pe,Wt,Ht,qt,Me,Te,ze,Je,Be,Gt,Xt,He,qe,Ge,an,Ke,Xe,Ye,Ze,dn,pn,fn,gn,ln,cn,V,s,m,h,g,F,S,N,O,I,M,T,z,J,R,B,L,U,W,H,q,G,K,yt,$t]}const dn=class extends qt{constructor(t){super(),Wt(this,t,un,ln,d,{json:39,origJson:40,templateContext:41,cls:0,style:42,layoutParams:43,customDescription:44,customPaddings:45,customActions:46,additionalPaddings:47,heightByAspect:48,parentOf:38,replaceItems:49},null,[-1,-1,-1,-1,-1])}},pn={"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 fn(t,e){const n=Number(t);return isNaN(n)||n<=0?e:n}function gn(t){if("light"===t||"medium"===t||"bold"===t||"regular"===t)return"medium"===t?500:"bold"===t?700:"light"===t?300:400}function hn(t,e){return gn(t)||e}function mn(t){let e,n;return{c(){e=M("span"),L(e,"class",n=pn["text-range__top-offset"]),K(e,"margin-top",t[4])},m(t,n){N(t,e,n)},p(t,n){16&n&&K(e,"margin-top",t[4])},d(t){t&&O(e)}}}function vn(t){let e;return{c(){e=z(t[0])},m(t,n){N(t,e,n)},p(t,n){1&n&&G(e,t[0])},d(t){t&&O(e)}}}function yn(t){let e,n,r,i=t[4]&&mn(t);return n=new Ue({props:{cls:we("text-range",pn,t[3]),actions:t[1],style:ne(t[2]),$$slots:{default:[vn]},$$scope:{ctx:t}}}),{c(){i&&i.c(),e=R(),Bt(n.$$.fragment)},m(t,o){i&&i.m(t,o),N(t,e,o),Lt(n,t,o),r=!0},p(t,r){let[o]=r;t[4]?i?i.p(t,o):(i=mn(t),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null);const a={};8&o&&(a.cls=we("text-range",pn,t[3])),2&o&&(a.actions=t[1]),4&o&&(a.style=ne(t[2])),4194305&o&&(a.$$scope={dirty:o,ctx:t}),n.$set(a)},i(t){r||(Pt(n.$$.fragment,t),r=!0)},o(t){Dt(n.$$.fragment,t),r=!1},d(t){t&&O(e),i&&i.d(t),Ut(n,t)}}}function $n(t,e,n){let r,i,o,a,s,l;var c,u;let{text:d}=e,{rootFontSize:p}=e,{textStyles:f={}}=e,{singleline:g=!1}=e,{actions:h}=e;const m=lt(Zt);let v,y="none",$=12,b=1.25,_="",w="",x="",k=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,g=t.singleline),"actions"in t&&n(1,h=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,y=t)}2112&t.$$.dirty&&n(11,$=fn(f.font_size,$)),2112&t.$$.dirty&&He(f.line_height)&&n(12,b=Number(f.line_height)/$),64&t.$$.dirty&&Ce(f.letter_spacing)&&n(13,_=re(f.letter_spacing)),16448&t.$$.dirty&&(n(14,v=hn(f.font_weight,v)),"string"==typeof f.font_family&&f.font_family?n(15,w=m.typefaceProvider(f.font_family,{fontWeight:v||400})):n(15,w="")),65600&t.$$.dirty&&n(16,x=ae(f.text_color,1,x)),64&t.$$.dirty&&n(4,r=f.top_offset?re(f.top_offset):""),64&t.$$.dirty&&n(19,i=f.background?ue([f.background]):null),320&t.$$.dirty&&((null===n(8,c=f.border)||void 0===c?void 0:c.stroke)&&f.border.stroke.color&&"transparent"!==ae(f.border.stroke.color)&&He(f.border.stroke.width)?n(17,k={color:f.border.stroke.color,width:f.border.stroke.width}):n(17,k=null)),576&t.$$.dirty&&n(18,o=fn(null===n(9,u=f.border)||void 0===u?void 0:u.corner_radius,0)),2112&t.$$.dirty&&n(20,a=f.text_shadow?function(t,e){var n,r,i,o,a,s;return"drop-shadow("+ae(t.color||"#000000",null!==(n=t.alpha)&&void 0!==n?n:.19)+" "+re(10*((null===(r=t.offset)||void 0===r||null===(i=r.x)||void 0===i?void 0:i.value)||0)/e)+" "+re(10*((null===(o=t.offset)||void 0===o||null===(a=o.y)||void 0===a?void 0:a.value)||0)/e)+" "+re(10*(null!==(s=t.blur)&&void 0!==s?s:2)/e)+")"}(f.text_shadow,$):void 0),1152&t.$$.dirty&&n(3,s={singleline:g,decoration:y}),2095136&t.$$.dirty&&n(2,l={"font-size":re(10*$/p),"line-height":b,"letter-spacing":_,"font-weight":v,"font-family":w,filter:a,color:x,background:(null==i?void 0:i.color)||void 0,"box-shadow":k?"inset 0 0 0 ".concat(re(k.width)," ").concat(k.color):void 0,"border-radius":o?re(o):void 0})},[d,h,l,s,r,p,f,g,c,u,y,$,b,_,v,w,x,k,o,i,a]}const bn=class extends qt{constructor(t){super(),Wt(this,t,$n,yn,d,{text:0,rootFontSize:5,textStyles:6,singleline:7,actions:1})}};function _n(t,e){return"left"===t||"center"===t||"right"===t?t:e}function wn(t,e){return"top"===t||"center"===t||"bottom"===t||"baseline"===t?t:e}function xn(t,e){return 1===t||0===t||!1===t||!0===t?Boolean(t):e}function kn(t,e){return"source_in"===t||"source_atop"===t||"darken"===t||"lighten"===t||"multiply"===t||"screen"===t?t:e}const{Boolean:En}=A;function Cn(t,e,n){const r=t.slice();return r[58]=e[n],r[60]=n,r}function An(t){let e,n;return e=new dn({props:{cls:we("text",te,t[13])+" "+(t[6]?"":Yt.root__unselectable),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Nn]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};8256&n[0]&&(r.cls=we("text",te,t[13])+" "+(t[6]?"":Yt.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]),268443312&n[0]|1073741824&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function Vn(t){let e,n;return e=new bn({props:{text:t[4],rootFontSize:t[5],textStyles:t[28],singleline:t[7]}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};16&n[0]&&(r.text=t[4]),32&n[0]&&(r.rootFontSize=t[5]),268435456&n[0]&&(r.textStyles=t[28]),128&n[0]&&(r.singleline=t[7]),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function jn(t){let e,n,r=Nt(t[10]),i=[];for(let e=0;e<r.length;e+=1)i[e]=Sn(Cn(t,r,e));const o=t=>Dt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=R()},m(t,r){for(let e=0;e<i.length;e+=1)i[e]&&i[e].m(t,r);N(t,e,r),n=!0},p(t,n){if(536872608&n[0]){let a;for(r=Nt(t[10]),a=0;a<r.length;a+=1){const o=Cn(t,r,a);i[a]?(i[a].p(o,n),Pt(i[a],1)):(i[a]=Sn(o),i[a].c(),Pt(i[a],1),i[a].m(e.parentNode,e))}for(Vt(),a=r.length;a<i.length;a+=1)o(a);jt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)Pt(i[t]);n=!0}},o(t){i=i.filter(En);for(let t=0;t<i.length;t+=1)Dt(i[t]);n=!1},d(t){t&&O(e),I(i,t)}}}function Pn(t){let e,r,i,o,a,s,l,c;return{c(){e=M("span"),r=M("img"),L(r,"class",i=te.text__image),u(r.src,o=t[58].image.url)||L(r,"src",o),L(r,"loading","lazy"),L(r,"decoding","async"),L(r,"aria-hidden","true"),L(r,"alt",""),L(r,"style",a=ne({width:t[58].image.width,height:t[58].image.height,"margin-top":t[9]?"-".concat(t[58].image.height):void 0,"margin-bottom":t[9]?"-".concat(t[58].image.height):void 0,filter:t[58].image.svgFilterId?"url(#".concat(t[58].image.svgFilterId,")"):void 0})),L(e,"style",s=ne(t[58].image.wrapperStyle))},m(n,i){N(n,e,i),D(e,r),l||(c=B(r,"error",t[29]),l=!0)},p(t,n){1024&n[0]&&!u(r.src,o=t[58].image.url)&&L(r,"src",o),1536&n[0]&&a!==(a=ne({width:t[58].image.width,height:t[58].image.height,"margin-top":t[9]?"-".concat(t[58].image.height):void 0,"margin-bottom":t[9]?"-".concat(t[58].image.height):void 0,filter:t[58].image.svgFilterId?"url(#".concat(t[58].image.svgFilterId,")"):void 0}))&&L(r,"style",a),1024&n[0]&&s!==(s=ne(t[58].image.wrapperStyle))&&L(e,"style",s)},i:n,o:n,d(t){t&&O(e),l=!1,c()}}}function Dn(t){let e,n,r=t[58].text&&Fn(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[58].text?r?(r.p(t,n),1024&n[0]&&Pt(r,1)):(r=Fn(t),r.c(),Pt(r,1),r.m(e.parentNode,e)):r&&(Vt(),Dt(r,1,1,(()=>{r=null})),jt())},i(t){n||(Pt(r),n=!0)},o(t){Dt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function Fn(t){let e,n;return e=new bn({props:{text:t[58].text,rootFontSize:t[5],textStyles:t[58].textStyles,singleline:t[7],actions:t[58].actions}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.text=t[58].text),32&n[0]&&(r.rootFontSize=t[5]),1024&n[0]&&(r.textStyles=t[58].textStyles),128&n[0]&&(r.singleline=t[7]),1024&n[0]&&(r.actions=t[58].actions),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function Sn(t){let e,n,r,i;const o=[Dn,Pn],a=[];function s(t,e){return"text"in t[58]?0:t[58].image?1:-1}return~(e=s(t))&&(n=a[e]=o[e](t)),{c(){n&&n.c(),r=R()},m(t,n){~e&&a[e].m(t,n),N(t,r,n),i=!0},p(t,i){let l=e;e=s(t),e===l?~e&&a[e].p(t,i):(n&&(Vt(),Dt(a[l],1,1,(()=>{a[l]=null})),jt()),~e?(n=a[e],n?n.p(t,i):(n=a[e]=o[e](t),n.c()),Pt(n,1),n.m(r.parentNode,r)):n=null)},i(t){i||(Pt(n),i=!0)},o(t){Dt(n),i=!1},d(t){t&&O(r),~e&&a[e].d(t)}}}function Nn(t){let e,n,r,i,o,a;const s=[jn,Vn],l=[];function c(t,e){return t[10].length?0:1}return n=c(t),r=l[n]=s[n](t),{c(){e=M("span"),r.c(),L(e,"class",i=we("text__inner",te,t[12])),L(e,"style",o=ne(t[11]))},m(t,r){N(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):(Vt(),Dt(l[d],1,1,(()=>{l[d]=null})),jt(),r=l[n],r?r.p(t,u):(r=l[n]=s[n](t),r.c()),Pt(r,1),r.m(e,null)),(!a||4096&u[0]&&i!==(i=we("text__inner",te,t[12])))&&L(e,"class",i),(!a||2048&u[0]&&o!==(o=ne(t[11])))&&L(e,"style",o)},i(t){a||(Pt(r),a=!0)},o(t){Dt(r),a=!1},d(t){t&&O(e),l[n].d()}}}function On(t){let e,n,r=!t[8]&&An(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[8]?r&&(Vt(),Dt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),256&n[0]&&Pt(r,1)):(r=An(t),r.c(),Pt(r,1),r.m(e.parentNode,e))},i(t){n||(Pt(r),n=!0)},o(t){Dt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function In(t,e,r){let i,o,a,s,l,c,u,d,f,g,h,m,v,y,$,b,_,w,x,k,E,C,A,V,j,P,D,F,S,N,O,I,M,T,z,J=n,R=n,B=n,L=n,U=n,W=n,H=n,q=n,G=n,K=n,X=n,Y=n,Z=n,Q=n;t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>U())),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())),t.$$.on_destroy.push((()=>Q()));let{json:tt={}}=e,{templateContext:et}=e,{origJson:nt}=e,{layoutParams:rt}=e;const it=lt(Zt);let ot=!1,st="",ct=12,ut=1.25,dt=!1,pt="",ft="",gt=!1,ht="left",mt="top",vt="",yt="",$t="",bt=!1,_t=[],wt=[];return at((()=>{wt.forEach((t=>{let[e,n]=t;it.removeSvgFilter(e,n)}))})),t.$$set=t=>{"json"in t&&r(0,tt=t.json),"templateContext"in t&&r(1,et=t.templateContext),"origJson"in t&&r(2,nt=t.origJson),"layoutParams"in t&&r(3,rt=t.layoutParams)},t.$$.update=()=>{var e,n;if(1&t.$$.dirty[0]&&(r(27,i=it.getDerivedFromVars(tt.text)),Q(),Q=p(i,(t=>r(54,z=t)))),16&t.$$.dirty[0]|8388608&t.$$.dirty[1]&&(r(4,(e=z,n=st,st=String(null!=e?e:"")||n)),st?r(8,ot=!1):(r(8,ot=!0),it.logError(Qt(new Error('Missing "text" prop for div "text"'))))),1&t.$$.dirty[0]&&(r(26,o=it.getDerivedFromVars(tt.ranges)),R(),R=p(o,(t=>r(43,A=t)))),1&t.$$.dirty[0]&&(r(25,a=it.getDerivedFromVars(tt.images)),J(),J=p(a,(t=>r(42,C=t)))),1&t.$$.dirty[0]&&(r(24,s=it.getDerivedFromVars({font_size:tt.font_size,letter_spacing:tt.letter_spacing,font_weight:tt.font_weight,font_family:tt.font_family,text_color:tt.text_color,underline:tt.underline,strike:tt.strike,line_height:tt.line_height,text_shadow:tt.text_shadow})),B(),B=p(s,(t=>r(28,V=t)))),1&t.$$.dirty[0]&&(r(23,l=it.getDerivedFromVars(tt.font_size)),Z(),Z=p(l,(t=>r(53,T=t)))),32&t.$$.dirty[0]|4194304&t.$$.dirty[1]&&r(5,ct=fn(T,ct)),1&t.$$.dirty[0]&&(r(22,c=it.getDerivedFromVars(tt.line_height)),Y(),Y=p(c,(t=>r(52,M=t)))),32&t.$$.dirty[0]|2097152&t.$$.dirty[1]){const t=M;He(t)?(r(30,ut=Number(t)/ct),r(9,dt=!0)):r(9,dt=!1)}if(1&t.$$.dirty[0]&&(r(21,u=it.getDerivedFromVars(tt.max_lines)),G(),G=p(u,(t=>r(49,N=t)))),262144&t.$$.dirty[1]&&r(7,d=1===N),1073741824&t.$$.dirty[0]|262144&t.$$.dirty[1]){let t="",e="",n=!1;if(N&&N>1){let r=Number(N);t=r*ut+"em",e=r,n=!0}r(31,pt=t),r(32,ft=e),r(33,gt=n)}if(1&t.$$.dirty[0]&&(r(20,f=it.getDerivedFromVars(tt.text_alignment_horizontal)),X(),X=p(f,(t=>r(51,I=t)))),1048584&t.$$.dirty[1]&&r(34,ht=_n(I,ht)),1&t.$$.dirty[0]&&(r(19,g=it.getDerivedFromVars(tt.text_alignment_vertical)),K(),K=p(g,(t=>r(50,O=t)))),524304&t.$$.dirty[1]&&r(35,mt=wn(O,mt)),16&t.$$.dirty[0]|4096&t.$$.dirty[1]&&r(41,h=!A||st&&1===A.length&&A[0]&&0===A[0].start&&"number"==typeof A[0].end&&A[0].end>=st.length),1&t.$$.dirty[0]&&(r(18,m=it.getDerivedFromVars(tt.text_color)),q(),q=p(m,(t=>r(48,S=t)))),135168&t.$$.dirty[1]&&r(40,v=Boolean(S)!==Boolean(A&&A[0]&&A[0].text_color)),398880&t.$$.dirty[1]){let t="";N&&h&&v&&(t=ae(S||A&&A[0]&&A[0].text_color,1,vt)),r(36,vt=t)}if(1&t.$$.dirty[0]&&(r(17,y=it.getDerivedFromVars(tt.focused_text_color)),H(),H=p(y,(t=>r(47,F=t)))),65600&t.$$.dirty[1]&&r(37,yt=ae(F,1,yt)),1&t.$$.dirty[0]&&(r(16,$=it.getDerivedFromVars(tt.truncate)),W(),W=p($,(t=>r(46,D=t)))),32768&t.$$.dirty[1]&&r(39,b="none"===D?"none":""),1&t.$$.dirty[0]&&(r(15,_=it.getDerivedFromVars(tt.text_gradient)),U(),U=p(_,(t=>r(45,P=t)))),16384&t.$$.dirty[1]){let t="";if(P){const e=ue([P]);e.image&&(t=e.image)}r(38,$t=t)}1&t.$$.dirty[0]&&(r(14,w=it.getDerivedFromVars(tt.selectable)),L(),L=p(w,(t=>r(44,j=t)))),64&t.$$.dirty[0]|8192&t.$$.dirty[1]&&r(6,bt=xn(j,bt)),16&t.$$.dirty[0]|6144&t.$$.dirty[1]&&function(t,e,n){let i=[];if(wt.forEach((t=>{let[e,n]=t;it.removeSvgFilter(e,n)})),wt=[],!(Array.isArray(e)&&e.length||Array.isArray(n)&&n.length&&t))return void r(10,_t=[]);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({},V),...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({},V),...c),n=re(10*(t.image.width&&t.image.width.value||20)/(e.font_size||12)),r=re(10*(t.image.height&&t.image.height.value||20)/(e.font_size||12));const o={"font-size":re(10*(Number(e.font_size)||12)/ct)};let a="";const s=t.image.tint_color,l=kn(t.image.tint_mode,"source_in");if(s){const e=ae(t.image.tint_color);a=it.addSvgFilter(e,l),wt.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({},V)}),r(10,_t=i)}(st,A,C),128&t.$$.dirty[0]|348&t.$$.dirty[1]&&r(13,x={singleline:d,multiline:gt,halign:ht,valign:mt,truncate:b,"has-focus-color":Boolean(yt)}),128&t.$$.dirty[1]&&r(12,k={gradient:Boolean($t)}),1073741856&t.$$.dirty[0]|227&t.$$.dirty[1]&&r(11,E={"font-size":re(ct),"line-height":ut,"max-height":pt,"-webkit-line-clamp":ft,color:vt,"background-image":$t,"--divkit-text-focus-color":yt})},[tt,et,nt,rt,st,ct,bt,d,ot,dt,_t,E,k,x,w,_,$,y,m,g,f,u,c,l,s,a,o,i,V,function(t){t.target&&"classList"in t.target&&t.target.classList.add(te.text__image_hidden)},ut,pt,ft,gt,ht,mt,vt,yt,$t,b,v,h,C,A,j,P,D,F,S,N,O,I,M,T,z]}const Mn={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_valign_space-between":"divkit-ce053","container_valign_space-around":"divkit-cf29b","container_valign_space-evenly":"divkit-b4b04",container_halign_left:"divkit-a3091",container_halign_center:"divkit-bac9d",container_halign_right:"divkit-f4230","container_halign_space-between":"divkit-e5c38","container_halign_space-around":"divkit-feff2","container_halign_space-evenly":"divkit-e5e05",container_orientation_horizontal:"divkit-fe458",container_orientation_overlap:"divkit-a644d"};function Tn(t){return{top:Number(null==t?void 0:t.top)||0,right:Number(null==t?void 0:t.right)||0,bottom:Number(null==t?void 0:t.bottom)||0,left:Number(null==t?void 0:t.left)||0}}function zn(t,e,n){const r=((null==e?void 0:e.margins.left)||0)+((null==e?void 0:e.margins.right)||0),i=((null==e?void 0:e.margins.top)||0)+((null==e?void 0:e.margins.bottom)||0);null!=e&&e.show_at_start&&(n?t.top=e.style.height+i:t.left=e.style.width+r),null!=e&&e.show_at_end&&(n?t.bottom=e.style.height+i:t.right=e.style.width+r)}function Jn(t,e,n){let r;const i=((null==e?void 0:e.margins.left)||0)+((null==e?void 0:e.margins.right)||0),o=((null==e?void 0:e.margins.top)||0)+((null==e?void 0:e.margins.bottom)||0),a=((null==n?void 0:n.margins.left)||0)+((null==n?void 0:n.margins.right)||0),s=((null==n?void 0:n.margins.top)||0)+((null==n?void 0:n.margins.bottom)||0);return r="horizontal"===t?[null!=n&&n.show_between?n.style.height+s:0,null!=e&&e.show_between?e.style.width+i:0]:[null!=e&&e.show_between?e.style.height+o:0,null!=n&&n.show_between?n.style.width+a:0],r.map(re).join(" ")}function Rn(t){var e;const n=null===(e=t.width)||void 0===e?void 0:e.type;return"wrap_content"===n||"fixed"===n}function Bn(t){var e;return"match_parent"!==(null===(e=t.height)||void 0===e?void 0:e.type)}function Ln(t,e,n){if(!(t&&t.shape&&t.shape.type&&e.includes(t.shape.type)&&"shape_drawable"===t.type))return n;let r;if("rounded_rectangle"===t.shape.type)r={width:Ve(null===(o=(i=t.shape).item_width)||void 0===o?void 0:o.value,10),height:Ve(null===(a=i.item_height)||void 0===a?void 0:a.value,10),radius:Ve(null===(s=i.corner_radius)||void 0===s?void 0:s.value,5)};else{if("circle"!==t.shape.type)return n;r=function(t){var e;const n=2*Ve(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;return function(t,e,n){var r;const i={},o=e.stroke||(null==n?void 0:n.stroke),a=null!=o&&o.color?ae(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=ae(l),a&&s&&(i.boxShadow="inset 0 0 0 ".concat(re(s)," ").concat(a)),i}(r,t.shape,{color:t.color,stroke:t.stroke})}let Un;function Wn(){if(void 0!==Un)return Un;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),Un=1===t.scrollHeight,document.body.removeChild(t),Un}const Hn={"container-separator":"divkit-a7719","container-separator__item":"divkit-c770e","container-separator__shape":"divkit-f6e9a"},{window:qn}=A;function Gn(t,e,n){const r=t.slice();return r[15]=e[n],r}function Kn(t){let e,n,r,i,o,a="".concat(t[15].style.width,"px"),s="".concat(t[15].style.height,"px"),l="".concat(t[15].style.borderRadius,"px"),c="".concat(t[15].left,"px"),u="".concat(t[15].top,"px"),d="".concat(t[15].width,"px"),p="".concat(t[15].height,"px");return{c(){e=M("div"),n=M("div"),i=J(),L(n,"class",r=Hn["container-separator__shape"]),K(n,"width",a),K(n,"height",s),K(n,"border-radius",l),K(n,"background",t[15].style.background),K(n,"box-shadow",t[15].style.boxShadow),L(e,"class",o=Hn["container-separator__item"]),K(e,"left",c),K(e,"top",u),K(e,"width",d),K(e,"height",p)},m(t,r){N(t,e,r),D(e,n),D(e,i)},p(t,r){2&r&&a!==(a="".concat(t[15].style.width,"px"))&&K(n,"width",a),2&r&&s!==(s="".concat(t[15].style.height,"px"))&&K(n,"height",s),2&r&&l!==(l="".concat(t[15].style.borderRadius,"px"))&&K(n,"border-radius",l),2&r&&K(n,"background",t[15].style.background),2&r&&K(n,"box-shadow",t[15].style.boxShadow),2&r&&c!==(c="".concat(t[15].left,"px"))&&K(e,"left",c),2&r&&u!==(u="".concat(t[15].top,"px"))&&K(e,"top",u),2&r&&d!==(d="".concat(t[15].width,"px"))&&K(e,"width",d),2&r&&p!==(p="".concat(t[15].height,"px"))&&K(e,"height",p)},d(t){t&&O(e)}}}function Xn(t){let e,r,i,o,a=Nt(t[1]),s=[];for(let e=0;e<a.length;e+=1)s[e]=Kn(Gn(t,a,e));return{c(){e=M("div");for(let t=0;t<s.length;t+=1)s[t].c();L(e,"class",r=Hn["container-separator"])},m(n,r){N(n,e,r);for(let t=0;t<s.length;t+=1)s[t]&&s[t].m(e,null);t[12](e),i||(o=B(qn,"resize",t[2]),i=!0)},p(t,n){let[r]=n;if(2&r){let n;for(a=Nt(t[1]),n=0;n<a.length;n+=1){const i=Gn(t,a,n);s[n]?s[n].p(i,r):(s[n]=Kn(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&&O(e),I(s,n),t[12](null),i=!1,o()}}}function Yn(t,e,n,r,i,o){const a=e.margins.left,s=e.margins.right,l=e.margins.top,c=e.margins.bottom;o?t.push({top:n.bottom+l,left:i.left+a,width:Math.max(0,i.right-i.left-a-s),height:r.top-n.bottom-l-c,style:e.style}):t.push({top:i.top+l,left:n.right+a,width:r.left-n.right-a-s,height:Math.max(0,i.bottom-i.top-l-c),style:e.style})}function Zn(t,e,n,r,i,o){const a={top:Math.min(...n.map((t=>t.top))),right:Math.max(...n.map((t=>t.right))),bottom:Math.max(...n.map((t=>t.bottom))),left:Math.min(...n.map((t=>t.left)))};if(null==e?void 0:e.show_at_start){let s,l;"space-around"===i||"space-evenly"===i?(s=o.left-e.style.width,l=o.top-e.style.height):(s=n[0].left-e.style.width-e.margins.left-e.margins.right,l=n[0].top-e.style.height-e.margins.top-e.margins.bottom),Yn(t,e,{top:0,right:s,bottom:l,left:0},n[0],a,r)}if(null==e?void 0:e.show_between)for(let i=0;i<n.length-1;++i)Yn(t,e,n[i],n[i+1],a,r);if(null==e?void 0:e.show_at_end){const s=n[n.length-1];let l,c;"space-around"===i||"space-evenly"===i?(l=o.bottom+e.style.height,c=o.right+e.style.width):(l=s.bottom+e.style.height+e.margins.top+e.margins.bottom,c=s.right+e.style.width+e.margins.left+e.margins.right),Yn(t,e,s,{top:l,right:0,bottom:0,left:c},a,r)}}function Qn(t,e,n){let r,{orientation:i}=e,{separator:o}=e,{lineSeparator:a}=e,{contentHAlign:s}=e,{contentVAlign:l}=e;const c=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(),e=window.getComputedStyle(r),c={top:t.top+parseFloat(e.paddingTop),right:t.right-parseFloat(e.paddingRight),bottom:t.bottom-parseFloat(e.paddingBottom),left:t.left+parseFloat(e.paddingLeft)};n(1,d=[]);let p=[...r.children].filter((t=>t!==u&&!t.classList.contains(ee.outer__border))),f=[];for(;p.length;){const t=[],e=p.shift();t.push(e);let n=e.getBoundingClientRect(),r=n.right,o=n.bottom;for(;p.length;){let e=p[0],n=e.getBoundingClientRect();if("vertical"===i){if(n.top<o)break}else if(n.left<r)break;r=Math.max(r,n.right),o=Math.max(o,n.bottom),t.push(e),p.shift()}f.push(t)}const g=[];f.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&&Zn(d,o,e,"vertical"===i,"vertical"===i?l:s,c);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)))};g.push(n)})),a&&Zn(d,a,g,"horizontal"===i,"vertical"===i?s:l,c),d.forEach((e=>{e.top-=t.top,e.left-=t.left}))}));let u,d=[],p=!1,f=null,g=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(Hn["container-separator__shape"]))&&!(null==n?void 0:n.contains(Hn["container-separator"]))}))&&c()}return ot((()=>{n(8,p=!0)})),at((()=>{n(8,p=!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),"contentHAlign"in t&&n(6,s=t.contentHAlign),"contentVAlign"in t&&n(7,l=t.contentVAlign)},t.$$.update=()=>{1&t.$$.dirty&&n(11,r=(null==u?void 0:u.parentElement)||null),3840&t.$$.dirty&&(p&&r||f||g)&&(f&&(f.disconnect(),n(9,f=null)),g&&(g.disconnect(),n(10,g=null)),p&&r&&("undefined"!=typeof MutationObserver&&(n(9,f=new MutationObserver(h)),f.observe(r,{childList:!0,attributes:!0,characterData:!0,subtree:!0})),"undefined"!=typeof ResizeObserver&&(n(10,g=new ResizeObserver(c)),g.observe(r)))),2304&t.$$.dirty&&p&&r&&c()},[u,d,c,i,o,a,s,l,p,f,g,r,function(t){dt[t?"unshift":"push"]((()=>{u=t,n(0,u)}))}]}const tr=class extends qt{constructor(t){super(),Wt(this,t,Qn,Xn,d,{orientation:3,separator:4,lineSeparator:5,contentHAlign:6,contentVAlign:7})}},{Boolean:er}=A;function nr(t,e,n){const r=t.slice();return r[51]=e[n],r}function rr(t){let e,n;return e=new dn({props:{cls:we("container",Mn,t[16]),style:t[12],json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],additionalPaddings:t[20],heightByAspect:Boolean(t[10]),parentOf:t[14],replaceItems:t[27],$$slots:{default:[sr]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};65536&n[0]&&(r.cls=we("container",Mn,t[16])),4096&n[0]&&(r.style=t[12]),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]),1048576&n[0]&&(r.additionalPaddings=t[20]),1024&n[0]&&(r.heightByAspect=Boolean(t[10])),16384&n[0]&&(r.parentOf=t[14]),27616&n[0]|8388608&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function ir(t){let e,n;return e=new Ga({props:{layoutParams:t[11],div:t[51].json,templateContext:t[51].templateContext,origJson:t[51].origJson}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};2048&n[0]&&(r.layoutParams=t[11]),8192&n[0]&&(r.div=t[51].json),8192&n[0]&&(r.templateContext=t[51].templateContext),8192&n[0]&&(r.origJson=t[51].origJson),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function or(t){let e,n,r=Nt(t[13]),i=[];for(let e=0;e<r.length;e+=1)i[e]=ir(nr(t,r,e));const o=t=>Dt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=R()},m(t,r){for(let e=0;e<i.length;e+=1)i[e]&&i[e].m(t,r);N(t,e,r),n=!0},p(t,n){if(10240&n[0]){let a;for(r=Nt(t[13]),a=0;a<r.length;a+=1){const o=nr(t,r,a);i[a]?(i[a].p(o,n),Pt(i[a],1)):(i[a]=ir(o),i[a].c(),Pt(i[a],1),i[a].m(e.parentNode,e))}for(Vt(),a=r.length;a<i.length;a+=1)o(a);jt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)Pt(i[t]);n=!0}},o(t){i=i.filter(er);for(let t=0;t<i.length;t+=1)Dt(i[t]);n=!1},d(t){t&&O(e),I(i,t)}}}function ar(t){let e,n;return e=new tr({props:{separator:t[8],lineSeparator:t[9],orientation:t[5],contentHAlign:t[7],contentVAlign:t[6]}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.separator=t[8]),512&n[0]&&(r.lineSeparator=t[9]),32&n[0]&&(r.orientation=t[5]),128&n[0]&&(r.contentHAlign=t[7]),64&n[0]&&(r.contentVAlign=t[6]),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function sr(t){let e,r,i,o=t[14],a=or(t),s=(t[8]||t[9])&&ar(t);return{c(){a.c(),e=J(),s&&s.c(),r=R()},m(t,n){a.m(t,n),N(t,e,n),s&&s.m(t,n),N(t,r,n),i=!0},p(t,i){16384&i[0]&&d(o,o=t[14])?(Vt(),Dt(a,1,1,n),jt(),a=or(t),a.c(),Pt(a,1),a.m(e.parentNode,e)):a.p(t,i),t[8]||t[9]?s?(s.p(t,i),768&i[0]&&Pt(s,1)):(s=ar(t),s.c(),Pt(s,1),s.m(r.parentNode,r)):s&&(Vt(),Dt(s,1,1,(()=>{s=null})),jt())},i(t){i||(Pt(a),Pt(s),i=!0)},o(t){Dt(a),Dt(s),i=!1},d(t){t&&(O(e),O(r)),a.d(t),s&&s.d(t)}}}function lr(t){let e,n,r=!t[4]&&rr(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[4]?r&&(Vt(),Dt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),16&n[0]&&Pt(r,1)):(r=rr(t),r.c(),Pt(r,1),r.m(e.parentNode,e))},i(t){n||(Pt(r),n=!0)},o(t){Dt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function cr(t,e,r){let i,o,a,s,l,c,u,d,f,g,h,m,v,y,$,b,_,w,x,k,E,C,A,V,j,P,D,F=n,S=n,N=n,O=n,I=n,M=n,T=n,z=n,J=n,R=n;var B,L,U,W,H,q;t.$$.on_destroy.push((()=>F())),t.$$.on_destroy.push((()=>S())),t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>M())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>R()));let{json:G={}}=e,{templateContext:K}=e,{origJson:X}=e,{layoutParams:Y}=e;const Z={left:"start",center:"center",right:"end","space-between":"start","space-around":"start","space-evenly":"start"},Q={top:"start",center:"center",bottom:"end",baseline:"baseline","space-between":"start","space-around":"start","space-evenly":"start"},tt=["rounded_rectangle","circle"],et=lt(Zt);let nt,rt,it=!1,ot="vertical",at="top",st="left",ct=null,ut=null,dt={};return t.$$set=t=>{"json"in t&&r(0,G=t.json),"templateContext"in t&&r(1,K=t.templateContext),"origJson"in t&&r(2,X=t.origJson),"layoutParams"in t&&r(3,Y=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(14,i=G.items),16384&t.$$.dirty[0]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(4,it=!1):(r(4,it=!0),et.logError(Qt(new Error('Incorrect or empty "items" prop for div "container"'))))),16402&t.$$.dirty[0]&&r(13,o=(!it&&i||[]).map((t=>{let e=t,n=K;return({templateContext:n,json:e}=et.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),8192&t.$$.dirty[0]){let t=[];o.forEach((e=>{t.push(et.getDerivedFromVars({width:e.json.width,height:e.json.height}))})),r(15,nt=Xt(t,(t=>[...t]))),z(),z=p(nt,(t=>r(44,j=t)))}if(1&t.$$.dirty[0]&&(r(26,a=et.getDerivedFromVars(G.orientation)),R(),R=p(a,(t=>r(46,D=t)))),32&t.$$.dirty[0]|32768&t.$$.dirty[1]&&r(5,ot=function(t,e){return"vertical"===t||"horizontal"===t||"overlap"===t?t:e}(D,ot)),1&t.$$.dirty[0]&&(r(25,s=et.getDerivedFromVars(G.layout_mode)),J(),J=p(s,(t=>r(45,P=t)))),16384&t.$$.dirty[1]&&r(34,l="wrap"===P),32&t.$$.dirty[0]|8200&t.$$.dirty[1]&&r(35,c="horizontal"!==ot&&!l&&j.some(Rn)),32&t.$$.dirty[0]|8200&t.$$.dirty[1]&&r(36,u="vertical"!==ot&&!l&&j.some(Bn)),1&t.$$.dirty[0]&&(r(24,d=et.getDerivedFromVars(G.content_alignment_vertical)),T(),T=p(d,(t=>r(43,V=t)))),64&t.$$.dirty[0]|4096&t.$$.dirty[1]&&r(6,at=function(t,e){return"top"===t||"center"===t||"bottom"===t||"baseline"===t||"space-between"===t||"space-around"===t||"space-evenly"===t?t:e}(V,at)),1&t.$$.dirty[0]&&(r(23,f=et.getDerivedFromVars(G.content_alignment_horizontal)),M(),M=p(f,(t=>r(42,A=t)))),128&t.$$.dirty[0]|2048&t.$$.dirty[1]&&r(7,st=function(t,e){return"left"===t||"center"===t||"right"===t||"space-between"===t||"space-around"===t||"space-evenly"===t?t:e}(A,st)),1&t.$$.dirty[0]&&(r(22,g=et.getDerivedFromVars(G.separator)),I(),I=p(g,(t=>r(41,C=t)))),1879048480&t.$$.dirty[0]|1024&t.$$.dirty[1])if((null==C?void 0:C.style)&&"overlap"!==ot&&Wn()){const t=Ln(C.style,tt,(null==ct?void 0:ct.style)||null);r(8,ct=t?{show_at_start:Boolean(null!==r(28,B=C.show_at_start)&&void 0!==B&&B),show_at_end:Boolean(null!==r(29,L=C.show_at_end)&&void 0!==L&&L),show_between:Boolean(null===r(30,U=C.show_between)||void 0===U||U),style:t,margins:Tn(C.margins)}:null)}else r(8,ct=null);if(1&t.$$.dirty[0]&&(r(21,h=et.getDerivedFromVars(G.line_separator)),O(),O=p(h,(t=>r(40,E=t)))),544&t.$$.dirty[0]|519&t.$$.dirty[1])if((null==E?void 0:E.style)&&"overlap"!==ot&&Wn()){const t=Ln(E.style,tt,(null==ut?void 0:ut.style)||null);r(9,ut=t?{show_at_start:Boolean(null!==r(31,W=E.show_at_start)&&void 0!==W&&W),show_at_end:Boolean(null!==r(32,H=E.show_at_end)&&void 0!==H&&H),show_between:Boolean(null===r(33,q=E.show_between)||void 0===q||q),style:t,margins:Tn(E.margins)}:null)}else r(9,ut=null);if(800&t.$$.dirty[0]&&r(20,m=ct||ut?function(t,e,n){const r={};return zn(r,e,"vertical"===t),zn(r,n,"horizontal"===t),r}(ot,ct,ut):null),1&t.$$.dirty[0]&&(r(19,v=et.getDerivedFromVars(G.aspect)),N(),N=p(v,(t=>r(39,k=t)))),256&t.$$.dirty[1]){const t=null==k?void 0:k.ratio;t&&He(t)?r(10,rt=t):r(10,rt=void 0)}if(1&t.$$.dirty[0]&&(r(18,y=et.getDerivedFromVars(G.width)),F(),F=p(y,(t=>r(37,w=t)))),1&t.$$.dirty[0]&&(r(17,$=et.getDerivedFromVars(G.height)),S(),S=p($,(t=>r(38,x=t)))),3304&t.$$.dirty[0]|248&t.$$.dirty[1]){let t={};(null==Y?void 0:Y.fakeElement)&&(t.fakeElement=!0),"overlap"===ot&&(t.overlapParent=!0),"horizontal"!==ot&&(t.parentHAlign=l?"start":Z[st]),"vertical"!==ot&&(t.parentVAlign=l?"start":Q[at]),rt||u||x&&"wrap_content"!==x.type&&("match_parent"!==x.type||!(null==Y?void 0:Y.parentVerticalWrapContent))||(t.parentVerticalWrapContent=!0),!c&&("wrap_content"===(null==w?void 0:w.type)||"match_parent"===(null==w?void 0:w.type)&&(null==Y?void 0:Y.parentHorizontalWrapContent))&&(t.parentHorizontalWrapContent=!0),"horizontal"===ot&&(t.parentContainerOrientation="horizontal"),"vertical"===ot&&(t.parentContainerOrientation="vertical"),l&&(t.parentContainerWrap=!0),r(11,dt=De(t,dt))}224&t.$$.dirty[0]|8&t.$$.dirty[1]&&r(16,b={orientation:ot,valign:at,halign:st,wrap:l}),1824&t.$$.dirty[0]&&r(12,_={gap:ct||ut?Jn(ot,ct,ut):void 0,"aspect-ratio":rt})},[G,K,X,Y,it,ot,at,st,ct,ut,rt,dt,_,o,i,nt,b,$,y,v,m,h,g,f,d,s,a,function(t){r(0,G=Object.assign(Object.assign({},G),{items:t}))},B,L,U,W,H,q,l,c,u,w,x,k,E,C,A,V,j,P,D]}const ur={separator:"divkit-a30bb",separator_orientation_horizontal:"divkit-f529e",separator_orientation_vertical:"divkit-e9e27",separator__inner:"divkit-db7d8"};function dr(t,e){return"vertical"===t||"horizontal"===t?t:e}function pr(t){let e,n,r;return{c(){e=M("span"),L(e,"class",n=ur.separator__inner),L(e,"style",r=ne(t[5]))},m(t,n){N(t,e,n)},p(t,n){32&n&&r!==(r=ne(t[5]))&&L(e,"style",r)},d(t){t&&O(e)}}}function fr(t){let e,n=t[6]&&pr(t);return{c(){n&&n.c(),e=R()},m(t,r){n&&n.m(t,r),N(t,e,r)},p(t,r){t[6]?n?n.p(t,r):(n=pr(t),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(t){t&&O(e),n&&n.d(t)}}}function gr(t){let e,n;return e=new dn({props:{cls:we("separator",ur,t[4]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[fr]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){let[r]=n;const i={};16&r&&(i.cls=we("separator",ur,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||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function hr(t,e,r){let i,o,a,s,l,c,u,d=n;t.$$.on_destroy.push((()=>d()));let{json:f={}}=e,{templateContext:g}=e,{origJson:h}=e,{layoutParams:m}=e;const v=lt(Zt);let y="horizontal",$="rgba(0,0,0,0.08)";return t.$$set=t=>{"json"in t&&r(0,f=t.json),"templateContext"in t&&r(1,g=t.templateContext),"origJson"in t&&r(2,h=t.origJson),"layoutParams"in t&&r(3,m=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty&&(r(7,i=v.getDerivedFromVars(f.delimiter_style)),d(),d=p(i,(t=>r(12,u=t)))),4352&t.$$.dirty&&r(8,y=dr(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,$=ae(null==u?void 0:u.color,1,$)),256&t.$$.dirty&&r(11,a="horizontal"===y?"100%":re(1)),256&t.$$.dirty&&r(10,s="horizontal"===y?re(1):"100%"),3584&t.$$.dirty&&r(5,l={background:$,width:a,height:s}),256&t.$$.dirty&&r(4,c={orientation:y})},[f,g,h,m,c,l,o,i,y,$,s,a,u]}const mr={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 vr(t){return t.startsWith("data:")?le(t):"data:image/jpg;base64,".concat(le(t))}function yr(t){let e,n;return e=new dn({props:{cls:we("image",mr,t[10]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customDescription:!0,$$slots:{default:[wr]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.cls=we("image",mr,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||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function $r(t){let e,n,r,i,o,a,l;return{c(){e=M("img"),L(e,"class",n=mr.image__image),u(e.src,r=t[4]===Er?kr:t[7])||L(e,"src",r),L(e,"loading","lazy"),L(e,"decoding","async"),L(e,"style",i=ne(t[9])),L(e,"alt",t[16]),L(e,"aria-hidden",o=t[16]?null:"true")},m(n,r){N(n,e,r),a||(l=[B(e,"load",t[26]),B(e,"error",t[27])],a=!0)},p(t,n){144&n[0]&&!u(e.src,r=t[4]===Er?kr:t[7])&&L(e,"src",r),512&n[0]&&i!==(i=ne(t[9]))&&L(e,"style",i),65536&n[0]&&L(e,"alt",t[16]),65536&n[0]&&o!==(o=t[16]?null:"true")&&L(e,"aria-hidden",o)},d(t){t&&O(e),a=!1,s(l)}}}function br(t){let e,n,r,i,o,a,l,c,d,p="".concat(t[5],"%");return{c(){e=M("span"),n=M("img"),L(n,"class",r=mr.image__image),u(n.src,i=t[4]===Er?kr:t[7])||L(n,"src",i),L(n,"loading","lazy"),L(n,"decoding","async"),L(n,"style",o=ne(t[9])),L(n,"alt",t[16]),L(n,"aria-hidden",a=t[16]?null:"true"),L(e,"class",l=mr["image__aspect-wrapper"]),K(e,"padding-bottom",p)},m(r,i){N(r,e,i),D(e,n),c||(d=[B(n,"load",t[26]),B(n,"error",t[27])],c=!0)},p(t,r){144&r[0]&&!u(n.src,i=t[4]===Er?kr:t[7])&&L(n,"src",i),512&r[0]&&o!==(o=ne(t[9]))&&L(n,"style",o),65536&r[0]&&L(n,"alt",t[16]),65536&r[0]&&a!==(a=t[16]?null:"true")&&L(n,"aria-hidden",a),32&r[0]&&p!==(p="".concat(t[5],"%"))&&K(e,"padding-bottom",p)},d(t){t&&O(e),c=!1,s(d)}}}function _r(t){let e;function n(t,e){return t[10].aspect?br:$r}let r=n(t),i=r(t);return{c(){i.c(),e=R()},m(t,n){i.m(t,n),N(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){t&&O(e),i.d(t)}}}function wr(t){let e,n=t[6],r=_r(t);return{c(){r.c(),e=R()},m(t,n){r.m(t,n),N(t,e,n)},p(t,i){64&i[0]&&d(n,n=t[6])?(r.d(1),r=_r(t),r.c(),r.m(e.parentNode,e)):r.p(t,i)},d(t){t&&O(e),r.d(t)}}}function xr(t){let e,n,r=!t[8]&&yr(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[8]?r&&(Vt(),Dt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),256&n[0]&&Pt(r,1)):(r=yr(t),r.c(),Pt(r,1),r.m(e.parentNode,e))},i(t){n||(Pt(r),n=!0)},o(t){Dt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}const kr="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Er=2;function Cr(t,e,r){let i,o,a,s,l,c,u,d,f,g,h,m,v,y,$,b,_,w,x,k,E,C,A,V,j,P,D,F,S,N,O,I,M,T,z=n,J=n,R=n,B=n,L=n,U=n,W=n,H=n,q=n,G=n,K=n,X=n,Y=n,Z=n;t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>U())),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:Q={}}=e,{templateContext:tt}=e,{origJson:et}=e,{layoutParams:nt}=e;const rt=lt(Zt);let it=0,ot="rgba(0,0,0,0.08)",st=!1,ct="",ut="none",dt="50% 50%";let pt,ft="0",gt="source_in",ht="",mt="",vt=0,yt=0,$t=0,bt="",_t="";return at((()=>{rt.removeSvgFilter(pt,gt)})),t.$$set=t=>{"json"in t&&r(0,Q=t.json),"templateContext"in t&&r(1,tt=t.templateContext),"origJson"in t&&r(2,et=t.origJson),"layoutParams"in t&&r(3,nt=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(25,i=rt.getDerivedFromVars(Q.image_url)),Z(),Z=p(i,(t=>r(55,T=t)))),1&t.$$.dirty[0]&&(r(24,o=rt.getDerivedFromVars(Q.gif_url)),Y(),Y=p(o,(t=>r(54,M=t)))),25165824&t.$$.dirty[1]&&r(7,a=T||M),128&t.$$.dirty[0]&&r(4,it=0),128&t.$$.dirty[0]&&(a?r(8,st=!1):(r(8,st=!0),rt.logError(Qt(new Error('Missing "image_url" for "image"'))))),1&t.$$.dirty[0]&&(r(23,s=rt.getDerivedFromVars(Q.width)),X(),X=p(s,(t=>r(53,I=t)))),4194304&t.$$.dirty[1]&&r(41,l="wrap_content"===(null==I?void 0:I.type)),1&t.$$.dirty[0]&&(r(22,c=rt.getDerivedFromVars(Q.height)),K(),K=p(c,(t=>r(52,O=t)))),2097152&t.$$.dirty[1]&&r(40,u="wrap_content"===(null==O?void 0:O.type)),1&t.$$.dirty[0]&&(r(21,d=rt.getDerivedFromVars(Q.preview)),G(),G=p(d,(t=>r(51,N=t)))),16&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(29,ct=0!==it&&it!==Er||!N?"":'url("'.concat(vr(N),'")')),1&t.$$.dirty[0]&&(r(20,f=rt.getDerivedFromVars(Q.placeholder_color)),q(),q=p(f,(t=>r(50,S=t)))),16&t.$$.dirty[0]|524288&t.$$.dirty[1]&&function(t,e){r(28,ot=0===t||t===Er?ae(e,1,ot):"")}(it,S),1&t.$$.dirty[0]&&(r(19,g=rt.getDerivedFromVars(Q.scale)),H(),H=p(g,(t=>r(49,F=t)))),1073741824&t.$$.dirty[0]|262144&t.$$.dirty[1]&&r(30,ut=fe(F)||ut),1&t.$$.dirty[0]&&(r(18,h=rt.getDerivedFromVars({content_alignment_horizontal:Q.content_alignment_horizontal,content_alignment_vertical:Q.content_alignment_vertical})),W(),W=p(h,(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:ge(t)}(D,dt)),1&t.$$.dirty[0]&&(r(17,m=rt.getDerivedFromVars(Q.accessibility)),U(),U=p(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=rt.getDerivedFromVars(Q.aspect)),L(),L=p(y,(t=>r(46,j=t)))),32768&t.$$.dirty[1]){const t=null==j?void 0:j.ratio;t&&He(t)?r(5,ft=(100/Number(t)).toFixed(2)):r(5,ft="0")}if(1&t.$$.dirty[0]&&(r(14,$=rt.getDerivedFromVars(Q.tint_color)),B(),B=p($,(t=>r(45,V=t)))),1&t.$$.dirty[0]&&(r(13,b=rt.getDerivedFromVars(Q.tint_mode)),R(),R=p(b,(t=>r(44,A=t)))),24582&t.$$.dirty[1]){const t=V?ae(V):void 0,e=kn(A,gt);t===pt&&e===gt||(rt.removeSvgFilter(pt,gt),r(6,ht=t?rt.addSvgFilter(t,e):""),r(32,pt=t),r(33,gt=e))}if(1&t.$$.dirty[0]&&(r(12,_=rt.getDerivedFromVars(Q.appearance_animation)),J(),J=p(_,(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=Ve(t.duration,300)),r(36,yt=Ve(t.start_delay,0)),r(35,vt=Ve(t.alpha,0))}if(1&t.$$.dirty[0]&&(r(11,w=rt.getDerivedFromVars(Q.filters)),z(),z=p(w,(t=>r(42,E=t)))),2048&t.$$.dirty[1]){let t="",e="";Array.isArray(E)&&E.length&&(t=qe(E,rt.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"!==ft,"is-width-content":l,"is-height-content":u,loaded:1===it,"before-appearance":Boolean(mt)&&0===it}),1879048272&t.$$.dirty[0]|505&t.$$.dirty[1]&&r(9,k={"background-image":ct,"background-color":ct?void 0:ot,"background-size":ut,"clip-path":_t||void 0,"object-fit":ut,"object-position":dt,filter:[1===it&&ht?"url(#".concat(ht,")"):"",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})},[Q,tt,et,nt,it,ft,ht,a,st,k,x,w,_,b,$,y,v,m,h,g,f,d,c,s,o,i,function(){0===it&&r(4,it=1)},function(){0===it&&r(4,it=Er)},ot,ct,ut,dt,pt,gt,mt,vt,yt,$t,bt,_t,u,l,E,C,A,V,j,P,D,F,S,N,O,I,M,T]}const Ar=class extends qt{constructor(t){super(),Wt(this,t,Cr,xr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Vr={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 jr(t){return t>0&&t<1}function Pr(t){return String(Math.ceil(1e3*t)/1e3)}function Dr(t,e,n){if(t.some(jr)){const e=Math.max(...t.filter(jr).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(re(r*t[e]/i),",").concat(Pr(t[e]),"fr)"):t[e]?o[e]="".concat(Pr(t[e]),"fr"):o[e]="auto";return o.join(" ")}function Fr(t,e,n){const r=t.slice();return r[30]=e[n],r}function Sr(t){let e,n;return e=new dn({props:{cls:we("grid",Vr,t[8]),json:t[0],origJson:t[2],templateContext:t[1],style:t[7],layoutParams:t[3],parentOf:t[0].items,replaceItems:t[12],$$slots:{default:[Ir]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=we("grid",Vr,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]),1&n[0]&&(r.parentOf=t[0].items),32&n[0]|4&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function Nr(t){let e,n;return e=new Ga({props:{layoutParams:t[30].layoutParams,div:t[30].json,templateContext:t[30].templateContext,origJson:t[30].origJson}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};32&n[0]&&(r.layoutParams=t[30].layoutParams),32&n[0]&&(r.div=t[30].json),32&n[0]&&(r.templateContext=t[30].templateContext),32&n[0]&&(r.origJson=t[30].origJson),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function Or(t){let e,n,r=Nt(t[5]),i=[];for(let e=0;e<r.length;e+=1)i[e]=Nr(Fr(t,r,e));const o=t=>Dt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=R()},m(t,r){for(let e=0;e<i.length;e+=1)i[e]&&i[e].m(t,r);N(t,e,r),n=!0},p(t,n){if(32&n[0]){let a;for(r=Nt(t[5]),a=0;a<r.length;a+=1){const o=Fr(t,r,a);i[a]?(i[a].p(o,n),Pt(i[a],1)):(i[a]=Nr(o),i[a].c(),Pt(i[a],1),i[a].m(e.parentNode,e))}for(Vt(),a=r.length;a<i.length;a+=1)o(a);jt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)Pt(i[t]);n=!0}},o(t){i=i.filter(Boolean);for(let t=0;t<i.length;t+=1)Dt(i[t]);n=!1},d(t){t&&O(e),I(i,t)}}}function Ir(t){let e,r,i=t[5],o=Or(t);return{c(){o.c(),e=R()},m(t,n){o.m(t,n),N(t,e,n),r=!0},p(t,r){32&r[0]&&d(i,i=t[5])?(Vt(),Dt(o,1,1,n),jt(),o=Or(t),o.c(),Pt(o,1),o.m(e.parentNode,e)):o.p(t,r)},i(t){r||(Pt(o),r=!0)},o(t){Dt(o),r=!1},d(t){t&&O(e),o.d(t)}}}function Mr(t){let e,n,r=!t[6]&&Sr(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[6]?r&&(Vt(),Dt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),64&n[0]&&Pt(r,1)):(r=Sr(t),r.c(),Pt(r,1),r.m(e.parentNode,e))},i(t){n||(Pt(r),n=!0)},o(t){Dt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function Tr(t,e,r){let i,o,a,s,l,c,u,d,f,g,h,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=lt(Zt);let C,A,V=!1,j=1,P=[],D=[],F=[],S=[],N=0,O=!1,I="top",M="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(24,i=_.items),16777216&t.$$.dirty[0]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(13,V=!1):(r(13,V=!0),E.logError(Qt(new Error('Incorrect or empty "items" prop for div "grid"'))))),1&t.$$.dirty[0]&&(r(11,o=E.getDerivedFromVars(_.column_count)),b(),b=p(o,(t=>r(28,m=t)))),268451840&t.$$.dirty[0]&&r(14,j=fn(m,j)),16785410&t.$$.dirty[0]&&r(23,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}}))),8388608&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=Xt(t,(t=>[...t]))),$(),$=p(C,(t=>r(27,h=t)))}if(144162824&t.$$.dirty[0]){const t={};let e=0,n=0;r(15,P=[]),r(16,D=[]),r(17,F=[]),r(18,S=[]),r(20,O=!1),r(5,A=a.map(((i,o)=>{var a,s,l,c;const u=h[o],d=Number(u.columnSpan)||1,p=Number(u.rowSpan)||1,f={x:e,y:n,colSpan:d,rowSpan:p},g="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(20,O=!0):(t[i+"_"+e]=!0,(!P[i]||P[i]<g)&&r(15,P[i]=g,P),(!D[e]||D[e]<m)&&r(16,D[e]=m,D),(!F[i]||F[i]<v)&&r(17,F[i]=v,F),(!S[e]||S[e]<y)&&r(18,S[e]=y,S));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(20,O=!0),O&&E.logError(Qt(new Error('Mismatching "grid" rows/columns'))),r(19,N=n)}1&t.$$.dirty[0]&&(r(10,s=E.getDerivedFromVars(_.content_alignment_vertical)),y(),y=p(s,(t=>r(26,g=t)))),69206016&t.$$.dirty[0]&&r(21,I=wn(g,I)),1&t.$$.dirty[0]&&(r(9,l=E.getDerivedFromVars(_.content_alignment_horizontal)),v(),v=p(l,(t=>r(25,f=t)))),37748736&t.$$.dirty[0]&&r(22,M=_n(f,M)),6291456&t.$$.dirty[0]&&r(8,c={valign:I,halign:M}),1032192&t.$$.dirty[0]&&r(7,u={"grid-template-columns":Dr(P,F,j),"grid-template-rows":Dr(D,S,N)}),1056768&t.$$.dirty[0]&&r(6,d=V||O)},[_,w,x,k,C,A,d,u,c,l,s,o,function(t){r(0,_=Object.assign(Object.assign({},_),{items:t}))},V,j,P,D,F,S,N,O,I,M,a,i,f,g,h,m]}const zr={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 Jr(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 Rr(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:Br}=A;function Lr(t,e,n){const r=t.slice();return r[73]=e[n],r[74]=e,r[75]=n,r}function Ur(t,e,n){const r=t.slice();return r[76]=e[n],r}function Wr(t){let e,n;return e=new dn({props:{cls:we("gallery",zr,t[17]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,customActions:"gallery",parentOf:t[10],replaceItems:t[32],$$slots:{default:[Zr]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};131072&n[0]&&(r.cls=we("gallery",zr,t[17])),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]),1024&n[0]&&(r.parentOf=t[10]),671906768&n[0]|131072&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function Hr(t){let e,n;return e=new Ga({props:{layoutParams:t[8],div:t[76].json,templateContext:t[76].templateContext,origJson:t[76].origJson}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.layoutParams=t[8]),134217728&n[0]&&(r.div=t[76].json),134217728&n[0]&&(r.templateContext=t[76].templateContext),134217728&n[0]&&(r.origJson=t[76].origJson),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function qr(t){let e,n,r,i,o,a=t[75],s=Nt(t[73]),l=[];for(let e=0;e<s.length;e+=1)l[e]=Hr(Ur(t,s,e));const c=t=>Dt(l[t],1,1,(()=>{l[t]=null})),u=()=>t[61](e,a),d=()=>t[61](null,a);return{c(){e=M("div");for(let t=0;t<l.length;t+=1)l[t].c();n=J(),L(e,"class",r=zr.gallery__items),L(e,"style",i=ne(t[18]))},m(t,r){N(t,e,r);for(let t=0;t<l.length;t+=1)l[t]&&l[t].m(e,null);D(e,n),u(),o=!0},p(r,p){if(t=r,134217984&p[0]){let r;for(s=Nt(t[73]),r=0;r<s.length;r+=1){const i=Ur(t,s,r);l[r]?(l[r].p(i,p),Pt(l[r],1)):(l[r]=Hr(i),l[r].c(),Pt(l[r],1),l[r].m(e,n))}for(Vt(),r=s.length;r<l.length;r+=1)c(r);jt()}(!o||262144&p[0]&&i!==(i=ne(t[18])))&&L(e,"style",i),a!==t[75]&&(d(),a=t[75],u())},i(t){if(!o){for(let t=0;t<s.length;t+=1)Pt(l[t]);o=!0}},o(t){l=l.filter(Br);for(let t=0;t<l.length;t+=1)Dt(l[t]);o=!1},d(t){t&&O(e),I(l,t),d()}}}function Gr(t){let e,n,r=Nt(t[27]),i=[];for(let e=0;e<r.length;e+=1)i[e]=qr(Lr(t,r,e));const o=t=>Dt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=R()},m(t,r){for(let e=0;e<i.length;e+=1)i[e]&&i[e].m(t,r);N(t,e,r),n=!0},p(t,n){if(134484224&n[0]){let a;for(r=Nt(t[27]),a=0;a<r.length;a+=1){const o=Lr(t,r,a);i[a]?(i[a].p(o,n),Pt(i[a],1)):(i[a]=qr(o),i[a].c(),Pt(i[a],1),i[a].m(e.parentNode,e))}for(Vt(),a=r.length;a<i.length;a+=1)o(a);jt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)Pt(i[t]);n=!0}},o(t){i=i.filter(Br);for(let t=0;t<i.length;t+=1)Dt(i[t]);n=!1},d(t){t&&O(e),I(i,t)}}}function Kr(t){let e,n,r=t[13]&&t[9]&&Xr(t),i=t[14]&&t[9]&&Yr(t);return{c(){r&&r.c(),e=J(),i&&i.c(),n=R()},m(t,o){r&&r.m(t,o),N(t,e,o),i&&i.m(t,o),N(t,n,o)},p(t,o){t[13]&&t[9]?r?r.p(t,o):(r=Xr(t),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),t[14]&&t[9]?i?i.p(t,o):(i=Yr(t),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},d(t){t&&(O(e),O(n)),r&&r.d(t),i&&i.d(t)}}}function Xr(t){let e,r,i,o,a=!t[30]&&function(t){let e,n,r,i;return{c(){e=T("svg"),n=T("path"),L(n,"class",r=zr["gallery__arrow-icon-path"]),L(n,"d","m10 16 8.3 8 1.03-1-4-6-.7-1 .7-1 4-6-1.03-1z"),L(e,"class",i=zr["gallery__arrow-icon"]),L(e,"xmlns","http://www.w3.org/2000/svg"),L(e,"width","32"),L(e,"height","32"),L(e,"viewBox","0 0 32 32"),L(e,"fill","none")},m(t,r){N(t,e,r),D(e,n)},d(t){t&&O(e)}}}();return{c(){e=M("div"),a&&a.c(),L(e,"class",r=t[30]||"".concat(zr.gallery__arrow," ").concat(zr.gallery__arrow_left))},m(n,r){N(n,e,r),a&&a.m(e,null),i||(o=B(e,"click",t[64]),i=!0)},p:n,d(t){t&&O(e),a&&a.d(),i=!1,o()}}}function Yr(t){let e,r,i,o,a=!t[31]&&function(t){let e,n,r,i;return{c(){e=T("svg"),n=T("path"),L(n,"class",r=zr["gallery__arrow-icon-path"]),L(n,"d","M22 16l-8.3 8-1.03-1 4-6 .7-1-.7-1-4-6 1.03-1 8.3 8z"),L(e,"class",i=zr["gallery__arrow-icon"]),L(e,"xmlns","http://www.w3.org/2000/svg"),L(e,"width","32"),L(e,"height","32"),L(e,"viewBox","0 0 32 32"),L(e,"fill","none")},m(t,r){N(t,e,r),D(e,n)},d(t){t&&O(e)}}}();return{c(){e=M("div"),a&&a.c(),L(e,"class",r=t[31]||"".concat(zr.gallery__arrow," ").concat(zr.gallery__arrow_right))},m(n,r){N(n,e,r),a&&a.m(e,null),i||(o=B(e,"click",t[65]),i=!0)},p:n,d(t){t&&O(e),a&&a.d(),i=!1,o()}}}function Zr(t){let e,r,i,o,a,s,c,u,p,f,g,h=t[27],m=Gr(t),v="horizontal"===t[6]&&Kr(t);return{c(){e=M("div"),r=M("div"),m.c(),c=J(),v&&v.c(),u=R(),L(r,"class",i=zr["gallery__items-grid"]),L(r,"style",o=ne(t[19])),L(e,"class",a=zr.gallery__scroller+" "+(t[29]?Yt["root_restrict-scroll"]:"")),L(e,"style",s=ne(t[7]))},m(n,i){N(n,e,i),D(e,r),m.m(r,null),t[62](r),t[63](e),N(n,c,i),v&&v.m(n,i),N(n,u,i),p=!0,f||(g=B(e,"scroll",(function(){l(t[9]?t[34]:null)&&(t[9]?t[34]:null).apply(this,arguments)})),f=!0)},p(i,l){t=i,134217728&l[0]&&d(h,h=t[27])?(Vt(),Dt(m,1,1,n),jt(),m=Gr(t),m.c(),Pt(m,1),m.m(r,null)):m.p(t,l),(!p||524288&l[0]&&o!==(o=ne(t[19])))&&L(r,"style",o),(!p||536870912&l[0]&&a!==(a=zr.gallery__scroller+" "+(t[29]?Yt["root_restrict-scroll"]:"")))&&L(e,"class",a),(!p||128&l[0]&&s!==(s=ne(t[7])))&&L(e,"style",s),"horizontal"===t[6]?v?v.p(t,l):(v=Kr(t),v.c(),v.m(u.parentNode,u)):v&&(v.d(1),v=null)},i(t){p||(Pt(m),p=!0)},o(t){Dt(m),p=!1},d(n){n&&(O(e),O(c),O(u)),m.d(n),t[62](null),t[63](null),v&&v.d(n),f=!1,g()}}}function Qr(t){let e,n,r,i,o=!t[5]&&Wr(t);return{c(){o&&o.c(),e=R()},m(a,s){o&&o.m(a,s),N(a,e,s),n=!0,r||(i=B(window,"resize",(function(){l(t[9]?t[35]:null)&&(t[9]?t[35]:null).apply(this,arguments)})),r=!0)},p(n,r){(t=n)[5]?o&&(Vt(),Dt(o,1,1,(()=>{o=null})),jt()):o?(o.p(t,r),32&r[0]&&Pt(o,1)):(o=Wr(t),o.c(),Pt(o,1),o.m(e.parentNode,e))},i(t){n||(Pt(o),n=!0)},o(t){Dt(o),n=!1},d(t){t&&O(e),o&&o.d(t),r=!1,i()}}}function ti(t,e,r){let i,o,a,s,l,c,u,d,g,h,m,v,y,$,b,_,w,x,k,E,C,A,V,j,P,D,F,S,N=n,O=n,I=n,M=n,T=n,z=n,J=n,R=n,B=n,L=n;t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>M())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>L()));let{json:U={}}=e,{templateContext:W}=e,{origJson:H}=e,{layoutParams:q}=e;const G=lt(Zt);let K,X,Y=[],Z=!1,Q=!1,tt=null,et=!1;const nt=G.getCustomization("galleryLeftClass"),rt=G.getCustomization("galleryRightClass");let it=!1;const st=G.isDesktop;f(t,st,(t=>r(60,F=t)));let ct,ut,pt,ft,gt=1,ht="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(13,Z=t>2),r(14,Q=t+n<e-2)}const Et=Rr(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<gt;++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"===ht,i=r?"offsetLeft":"offsetTop",o=r?"left":"top",a=t[e];a&&K.scroll({[o]:Math.max(0,a[i]+.01-vt/2),behavior:n})}function jt(t){const e=At(),n=K.getBoundingClientRect(),r=e.findIndex((t=>function(t,e){return"horizontal"===ht?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"===ht?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!U.id||it||(null==q?void 0:q.fakeElement)||G.registerInstance(U.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"===ht?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)}}),ot((()=>{r(38,et=!0),!it&&(kt(),xt)&&Vt(At(),xt,"auto")})),at((()=>{r(38,et=!1),U.id&&!(null==q?void 0:q.fakeElement)&&G.unregisterInstance(U.id)})),t.$$set=t=>{"json"in t&&r(0,U=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(10,i=U.items),1024&t.$$.dirty[0]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(5,it=!1):(r(5,it=!0),G.logError(Qt(new Error('Incorrect or empty "items" prop for div "gallery"'))))),1058&t.$$.dirty[0]&&r(50,o=(!it&&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]|536871040&t.$$.dirty[1]&&r(9,a=F&&et&&!it),528&t.$$.dirty[0]|64&t.$$.dirty[1]&&(a?"undefined"!=typeof ResizeObserver&&(r(37,tt=new ResizeObserver((()=>{Et()}))),tt.observe(X)):tt&&(tt.disconnect(),r(37,tt=null))),1&t.$$.dirty[0]&&(r(28,s=G.getDerivedFromVars(U.column_count)),B(),B=p(s,(t=>r(59,D=t)))),268435712&t.$$.dirty[1]&&r(39,gt=fn(D,gt)),524544&t.$$.dirty[1]&&r(27,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,gt)),1&t.$$.dirty[0]&&(r(26,c=G.getDerivedFromVars(U.orientation)),R(),R=p(c,(t=>r(58,P=t)))),64&t.$$.dirty[0]|134217728&t.$$.dirty[1]&&r(6,ht=dr(P,ht)),1&t.$$.dirty[0]&&(r(25,u=G.getDerivedFromVars(U.cross_content_alignment)),J(),J=p(u,(t=>r(57,j=t)))),67109376&t.$$.dirty[1]&&r(40,mt=function(t,e){return"start"===t||"center"===t||"end"===t?t:e}(j,mt)),1&t.$$.dirty[0]&&(r(24,d=G.getDerivedFromVars(U.item_spacing)),z(),z=p(d,(t=>r(56,V=t)))),33556480&t.$$.dirty[1]&&(r(42,vt=Ve(V,vt)),r(41,ct=re(vt))),1&t.$$.dirty[0]&&(r(23,g=G.getDerivedFromVars(U.cross_spacing)),T(),T=p(g,(t=>r(55,A=t)))),16787456&t.$$.dirty[1]&&(r(44,pt=Ve(A,vt)),r(43,ut=re(pt))),1&t.$$.dirty[0]&&(r(22,h=G.getDerivedFromVars(U.paddings)),M(),M=p(h,(t=>r(54,C=t)))),8404992&t.$$.dirty[1]&&r(45,yt=Ae(C,yt)),64&t.$$.dirty[0]&&r(49,m="horizontal"===ht?"grid-template-columns":"grid-template-rows"),64&t.$$.dirty[0]|524288&t.$$.dirty[1]){let t=[];o.forEach((e=>{const n="horizontal"===ht?"width":"height";t.push(G.getDerivedFromVars(e.json[n]))})),r(15,ft=Xt(t,(t=>t))),I(),I=p(ft,(t=>r(53,E=t)))}if(64&t.$$.dirty[0]|4227328&t.$$.dirty[1]&&(r(46,$t=[]),gt>1?$t.push("auto"):E.forEach((t=>{!t&&"horizontal"===ht||"match_parent"===(null==t?void 0:t.type)?$t.push("100%"):$t.push("max-content")}))),1&t.$$.dirty[0]&&(r(21,v=G.getDerivedFromVars(U.scroll_mode)),O(),O=p(v,(t=>r(52,k=t)))),456&t.$$.dirty[0]|2099968&t.$$.dirty[1]){const t={};let e={};r(47,_t=!1),(null==q?void 0:q.fakeElement)&&(e.fakeElement=!0),"horizontal"===ht?e.parentVAlign=mt:e.parentHAlign=mt,"paging"===k&&(r(47,_t=!0),e.scrollSnap="start",t["horizontal"===ht?"scroll-padding-left":"scroll-padding-top"]=re(vt/2)),1===gt&&(e.parentLayoutOrientation=ht),r(7,bt=De(t,bt)),r(8,wt=De(e,wt))}1&t.$$.dirty[0]&&(r(20,y=G.getDerivedFromVars(U.restrict_parent_scroll)),L(),L=p(y,(t=>r(29,S=t)))),20480&t.$$.dirty[1]&&r(19,$={padding:yt,"grid-gap":ut}),295936&t.$$.dirty[1]&&r(18,b={"grid-gap":ct,[m]:Jr($t)}),64&t.$$.dirty[0]|65536&t.$$.dirty[1]&&r(17,_={orientation:ht,"scroll-snap":_t}),1&t.$$.dirty[0]&&(r(16,w=G.getDerivedFromVars(U.default_item)),N(),N=p(w,(t=>r(51,x=t)))),1179648&t.$$.dirty[1]&&r(48,xt=Ve(x,xt))},[U,W,H,q,X,it,ht,bt,wt,a,i,K,Y,Z,Q,ft,w,_,b,$,y,v,h,g,d,u,c,l,s,S,nt,rt,function(t){r(0,U=Object.assign(Object.assign({},U),{items:t}))},st,kt,Et,Ct,tt,et,gt,mt,ct,vt,ut,pt,yt,$t,_t,xt,m,o,x,k,E,C,A,V,j,P,D,F,function(t,e){dt[t?"unshift":"push"]((()=>{Y[e]=t,r(12,Y)}))},function(t){dt[t?"unshift":"push"]((()=>{X=t,r(4,X)}))},function(t){dt[t?"unshift":"push"]((()=>{K=t,r(11,K)}))},()=>Ct("left"),()=>Ct("right")]}const ei={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"},ni=37,ri=39,ii=36,oi=35,{Boolean:ai}=A;function si(t,e,n){const r=t.slice();r[88]=e[n];const i=r[88].index;return r[89]=i,r}function li(t,e,n){const r=t.slice();r[88]=e[n];const i=r[88].index;r[89]=i;const o=r[89]===r[6];return r[92]=o,r}function ci(t){let e,n;return e=new dn({props:{cls:we("tabs",ei,t[46]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customActions:"tabs",$$slots:{default:[hi]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(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]),2147483626&n[0]|4137&n[1]|4&n[3]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function ui(t){let e,n,r=t[88].title+"";return{c(){e=z(r),n=J()},m(t,r){N(t,e,r),N(t,n,r)},p(t,n){524288&n[0]&&r!==(r=t[88].title+"")&&G(e,r)},d(t){t&&(O(e),O(n))}}}function di(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[64](t[89],...n)}return i=new Ue({props:{cls:we("tabs__item",ei,{selected:t[92],actionable:Boolean(t[88].title_click_action)}),actions:!t[88].title_click_action||null!==(e=t[3])&&void 0!==e&&e.fakeElement?[]:[t[88].title_click_action],attrs:{id:"".concat(t[44],"-tab-").concat(t[89]),"aria-controls":"".concat(t[44],"-panel-").concat(t[89]),role:"tab",tabindex:!t[92]||null!==(n=t[3])&&void 0!==n&&n.fakeElement?"-1":t[88].title_click_action?void 0:"0","aria-selected":t[92]?"true":"false"},customAction:null!==(r=t[3])&&void 0!==r&&r.fakeElement?null:a,$$slots:{default:[ui]},$$scope:{ctx:t}}}),{c(){Bt(i.$$.fragment)},m(t,e){Lt(i,t,e),o=!0},p(e,n){var r,o,s;t=e;const l={};524352&n[0]&&(l.cls=we("tabs__item",ei,{selected:t[92],actionable:Boolean(t[88].title_click_action)})),524296&n[0]&&(l.actions=!t[88].title_click_action||null!==(r=t[3])&&void 0!==r&&r.fakeElement?[]:[t[88].title_click_action]),524360&n[0]&&(l.attrs={id:"".concat(t[44],"-tab-").concat(t[89]),"aria-controls":"".concat(t[44],"-panel-").concat(t[89]),role:"tab",tabindex:!t[92]||null!==(o=t[3])&&void 0!==o&&o.fakeElement?"-1":t[88].title_click_action?void 0:"0","aria-selected":t[92]?"true":"false"}),524296&n[0]&&(l.customAction=null!==(s=t[3])&&void 0!==s&&s.fakeElement?null:a),524288&n[0]|4&n[3]&&(l.$$scope={dirty:n,ctx:t}),i.$set(l)},i(t){o||(Pt(i.$$.fragment,t),o=!0)},o(t){Dt(i.$$.fragment,t),o=!1},d(t){Ut(i,t)}}}function pi(t){let e,n,r;return{c(){e=M("div"),L(e,"class",n=ei.tabs__separator),L(e,"style",r=ne(t[36]))},m(t,n){N(t,e,n)},p(t,n){32&n[1]&&r!==(r=ne(t[36]))&&L(e,"style",r)},d(t){t&&O(e)}}}function fi(t){let e,n;return e=new Ga({props:{div:t[18][t[89]].div,templateContext:t[1],layoutParams:t[5]}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};786432&n[0]&&(r.div=t[18][t[89]].div),2&n[0]&&(r.templateContext=t[1]),32&n[0]&&(r.layoutParams=t[5]),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function gi(t){let e,n,r,i,o,a,s=t[30][t[89]]&&fi(t);return{c(){e=M("div"),s&&s.c(),n=J(),L(e,"class",r=we("tabs__panel",ei,{visible:t[31][t[89]]})),L(e,"role","tabpanel"),L(e,"id",i=t[44]+"-panel-"+t[89]),L(e,"aria-labelledby",o=t[44]+"-tab-"+t[89]),K(e,"left",100*t[89]+"%")},m(t,r){N(t,e,r),s&&s.m(e,null),D(e,n),a=!0},p(t,l){t[30][t[89]]?s?(s.p(t,l),1074266112&l[0]&&Pt(s,1)):(s=fi(t),s.c(),Pt(s,1),s.m(e,n)):s&&(Vt(),Dt(s,1,1,(()=>{s=null})),jt()),(!a||524288&l[0]|1&l[1]&&r!==(r=we("tabs__panel",ei,{visible:t[31][t[89]]})))&&L(e,"class",r),(!a||524288&l[0]&&i!==(i=t[44]+"-panel-"+t[89]))&&L(e,"id",i),(!a||524288&l[0]&&o!==(o=t[44]+"-tab-"+t[89]))&&L(e,"aria-labelledby",o),(!a||524288&l[0])&&K(e,"left",100*t[89]+"%")},i(t){a||(Pt(s),a=!0)},o(t){Dt(s),a=!1},d(t){t&&O(e),s&&s.d()}}}function hi(t){let e,n,r,i,o,a,c,u,d,p,f,g=Nt(t[19]),h=[];for(let e=0;e<g.length;e+=1)h[e]=di(li(t,g,e));const m=t=>Dt(h[t],1,1,(()=>{h[t]=null}));let v=t[20]&&pi(t),y=Nt(t[19]),$=[];for(let e=0;e<y.length;e+=1)$[e]=gi(si(t,y,e));const b=t=>Dt($[t],1,1,(()=>{$[t]=null}));return{c(){e=M("div");for(let t=0;t<h.length;t+=1)h[t].c();r=J(),v&&v.c(),i=J(),o=M("div"),a=M("div");for(let t=0;t<$.length;t+=1)$[t].c();L(e,"class",n=ei.tabs__list+" "+(t[43]?Yt["root_restrict-scroll"]:"")),L(e,"role","tablist"),K(e,"--divkit-tabs-title-padding",t[17]?ke(t[17]):""),K(e,"--divkit-tabs-font-size",re(t[7])),K(e,"--divkit-tabs-paddings",t[8]),K(e,"--divkit-tabs-line-height",t[24]),K(e,"--divkit-tabs-letter-spacing",t[25]),K(e,"--divkit-tabs-active-font-weight",t[10]||""),K(e,"--divkit-tabs-inactive-font-weight",t[11]||""),K(e,"--divkit-tabs-active-font-family",t[26]||""),K(e,"--divkit-tabs-inactive-font-family",t[27]||""),K(e,"--divkit-tabs-active-text-color",t[12]),K(e,"--divkit-tabs-inactive-text-color",t[13]),K(e,"--divkit-tabs-active-background-color",t[14]),K(e,"--divkit-tabs-inactive-background-color",t[15]),K(e,"--divkit-tabs-border-radius",t[9]),K(e,"--divkit-tabs-items-spacing",t[16]?ie(t[16]):""),L(a,"class",c=we("tabs__swiper",ei,{inited:t[28],animated:t[29]})),L(o,"class",u=ei.tabs__panels+" "+(t[43]?Yt["root_restrict-scroll"]:""))},m(n,s){N(n,e,s);for(let t=0;t<h.length;t+=1)h[t]&&h[t].m(e,null);t[65](e),N(n,r,s),v&&v.m(n,s),N(n,i,s),N(n,o,s),D(o,a);for(let t=0;t<$.length;t+=1)$[t]&&$[t].m(a,null);t[66](a),t[67](o),d=!0,p||(f=[B(e,"keydown",t[48]),B(a,"touchstart",(function(){l(t[34]?t[49]:void 0)&&(t[34]?t[49]:void 0).apply(this,arguments)})),B(a,"touchmove",(function(){l(t[34]?t[50]:void 0)&&(t[34]?t[50]:void 0).apply(this,arguments)})),B(a,"touchend",(function(){l(t[34]?t[51]:void 0)&&(t[34]?t[51]:void 0).apply(this,arguments)})),B(a,"touchcancel",(function(){l(t[34]?t[51]:void 0)&&(t[34]?t[51]:void 0).apply(this,arguments)}))],p=!0)},p(r,s){if(t=r,524360&s[0]|73728&s[1]){let n;for(g=Nt(t[19]),n=0;n<g.length;n+=1){const r=li(t,g,n);h[n]?(h[n].p(r,s),Pt(h[n],1)):(h[n]=di(r),h[n].c(),Pt(h[n],1),h[n].m(e,null))}for(Vt(),n=g.length;n<h.length;n+=1)m(n);jt()}if((!d||4096&s[1]&&n!==(n=ei.tabs__list+" "+(t[43]?Yt["root_restrict-scroll"]:"")))&&L(e,"class",n),131072&s[0]&&K(e,"--divkit-tabs-title-padding",t[17]?ke(t[17]):""),128&s[0]&&K(e,"--divkit-tabs-font-size",re(t[7])),256&s[0]&&K(e,"--divkit-tabs-paddings",t[8]),16777216&s[0]&&K(e,"--divkit-tabs-line-height",t[24]),33554432&s[0]&&K(e,"--divkit-tabs-letter-spacing",t[25]),1024&s[0]&&K(e,"--divkit-tabs-active-font-weight",t[10]||""),2048&s[0]&&K(e,"--divkit-tabs-inactive-font-weight",t[11]||""),67108864&s[0]&&K(e,"--divkit-tabs-active-font-family",t[26]||""),134217728&s[0]&&K(e,"--divkit-tabs-inactive-font-family",t[27]||""),4096&s[0]&&K(e,"--divkit-tabs-active-text-color",t[12]),8192&s[0]&&K(e,"--divkit-tabs-inactive-text-color",t[13]),16384&s[0]&&K(e,"--divkit-tabs-active-background-color",t[14]),32768&s[0]&&K(e,"--divkit-tabs-inactive-background-color",t[15]),512&s[0]&&K(e,"--divkit-tabs-border-radius",t[9]),65536&s[0]&&K(e,"--divkit-tabs-items-spacing",t[16]?ie(t[16]):""),t[20]?v?v.p(t,s):(v=pi(t),v.c(),v.m(i.parentNode,i)):v&&(v.d(1),v=null),1074528290&s[0]|8193&s[1]){let e;for(y=Nt(t[19]),e=0;e<y.length;e+=1){const n=si(t,y,e);$[e]?($[e].p(n,s),Pt($[e],1)):($[e]=gi(n),$[e].c(),Pt($[e],1),$[e].m(a,null))}for(Vt(),e=y.length;e<$.length;e+=1)b(e);jt()}(!d||805306368&s[0]&&c!==(c=we("tabs__swiper",ei,{inited:t[28],animated:t[29]})))&&L(a,"class",c),(!d||4096&s[1]&&u!==(u=ei.tabs__panels+" "+(t[43]?Yt["root_restrict-scroll"]:"")))&&L(o,"class",u)},i(t){if(!d){for(let t=0;t<g.length;t+=1)Pt(h[t]);for(let t=0;t<y.length;t+=1)Pt($[t]);d=!0}},o(t){h=h.filter(ai);for(let t=0;t<h.length;t+=1)Dt(h[t]);$=$.filter(ai);for(let t=0;t<$.length;t+=1)Dt($[t]);d=!1},d(n){n&&(O(e),O(r),O(i),O(o)),I(h,n),t[65](null),v&&v.d(n),I($,n),t[66](null),t[67](null),p=!1,s(f)}}}function mi(t){let e,n,r=!t[4]&&ci(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[4]?r&&(Vt(),Dt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),16&n[0]&&Pt(r,1)):(r=ci(t),r.c(),Pt(r,1),r.m(e.parentNode,e))},i(t){n||(Pt(r),n=!0)},o(t){Dt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function vi(t,e,r){let i,o,a,s,l,c,u,d,g,h,m,v,y,$,b,_,w,x,k,E,C,A,V,j=n,P=n,D=n,F=n,S=n,N=n,O=n,I=n,M=n;var T,z;t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>F())),t.$$.on_destroy.push((()=>S())),t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>M()));let{json:J={}}=e,{templateContext:R}=e,{origJson:B}=e,{layoutParams:L}=e;const U=lt(Zt),W=U.genId("tabs");let H=!1,q=Kt([]);f(t,q,(t=>r(19,$=t)));let G,K,X,Y={};const Z=U.getJsonWithVars(J.selected_tab);let Q,tt,et=Z&&Number(Z)||0,nt=12,rt="",it="",ot="",st="",ct="",ut="",pt="",ft="",gt="",ht="",mt=0,yt="",$t="",bt=null,_t=!1,wt=!1,xt=et,kt=[],Et=[];async function Ct(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(xt=et,r(6,et=t),St(),r(29,wt=!0),jt(100*-et),Pt(),async function(){await vt();const t=document.getElementById("".concat(W,"-panel-").concat(et));t&&r(22,K.style.height=re(t.offsetHeight),K)}(),Ft(),It=-et*K.clientWidth,e){await vt();const t=G.querySelector(".".concat(ei.tabs__item_selected));t&&t.focus()}}function At(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=null==$?void 0:$.length;if(!n)return;const r=$.map((t=>t.index));let i=r.indexOf(et)+t;i>=n?i=0:i<0&&(i=n-1),Ct(r[i],e)}function Vt(t,e){return et===e||(Ct(e),!1)}async function jt(t){await vt(),r(23,X.style.transform="translate3d(".concat(t,"%,0,0)"),X)}function Pt(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=t?Math.max(0,et-1):Math.min(et,xt),n=t?Math.min(i.length-1,et+1):Math.max(et,xt);r(30,kt=kt.map(((t,r)=>t||r>=e&&r<=n))),r(31,Et=Et.map(((t,r)=>r>=e&&r<=n)))}let Dt=null;function Ft(){Dt&&clearTimeout(Dt),Dt=window.setTimeout((()=>{r(31,Et=i.map(((t,e)=>e===et)))}),400)}function St(){_t||(r(28,_t=!0),r(22,K.style.height=re(K.clientHeight),K),r(23,X.style.transform="translate3d(".concat(100*-xt,"%,0,0)"),X))}let Nt,Ot,It,Mt=null,Tt=null,zt=!1,Jt=!1;return!J.id||H||(null==L?void 0:L.fakeElement)||U.registerInstance(J.id,{setCurrentItem(t){if(t<0||t>i.length-1)throw new Error('Item is out of range in "set-current-item" action');Ct(t)},setPreviousItem(t){let e=et-1;e<0&&(e="ring"===t?i.length-1:et),Ct(e)},setNextItem(t){let e=et+1;e>i.length-1&&(e="ring"===t?0:et),Ct(e)}}),at((()=>{J.id&&!(null==L?void 0:L.fakeElement)&&U.unregisterInstance(J.id)})),t.$$set=t=>{"json"in t&&r(0,J=t.json),"templateContext"in t&&r(1,R=t.templateContext),"origJson"in t&&r(2,B=t.origJson),"layoutParams"in t&&r(3,L=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(18,i=J.items||[]),262144&t.$$.dirty[0])if(Array.isArray(i)&&i.length){let t=[];i.forEach(((e,n)=>{const r=U.getJsonWithVars({index:n,title:e.title,title_click_action:e.title_click_action});r.title&&"string"==typeof r.title?t.push(r):U.logError(Qt(new Error("Incorrect title for the tab"),{additional:{index:n}}))})),q.set(t)}else q.set([]);if(524288&t.$$.dirty[0]&&((null==$?void 0:$.length)?r(4,H=!1):(r(4,H=!0),U.logError(Qt(new Error('Incorrect or empty "items" prop for div "tabs"'))))),1&t.$$.dirty[0]&&(r(42,o=U.getDerivedFromVars(J.width)),I(),I=p(o,(t=>r(63,A=t)))),1&t.$$.dirty[0]&&(r(41,a=U.getDerivedFromVars(J.height)),O(),O=p(a,(t=>r(62,C=t)))),40&t.$$.dirty[0]|3&t.$$.dirty[2]){let t={};(null==L?void 0:L.fakeElement)&&(t.fakeElement=!0),"wrap_content"===(null==A?void 0:A.type)&&(t.parentHorizontalWrapContent=!0),C&&"wrap_content"!==C.type||(t.parentVerticalWrapContent=!0),r(5,Y=De(t,Y))}if(262225&t.$$.dirty[0]&&!H&&(et<0||et>=i.length)&&(U.logError(Qt(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:J.selected_tab,length:i.length}})),r(6,et=et<0?0:i.length-1)),524369&t.$$.dirty[0]|2097152&t.$$.dirty[1]&&(H||$.some((t=>et===t.index))||(U.logError(Qt(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:J.selected_tab}})),r(6,et=(null===r(52,T=$[0])||void 0===T?void 0:T.index)||0))),1&t.$$.dirty[0]&&(r(40,s=U.getDerivedFromVars(J.tab_title_style)),N(),N=p(s,(t=>r(61,E=t)))),1073741824&t.$$.dirty[1]&&r(56,l=E||{}),128&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(7,nt=fn(l.font_size,nt)),384&t.$$.dirty[0]|33554432&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)/nt*10,right:(Number(t.right)||0)/nt*10,bottom:(Number(t.bottom)||0)/nt*10,left:(Number(t.left)||0)/nt*10};r(8,rt=Ae(e,rt))}if(128&t.$$.dirty[0]|33554432&t.$$.dirty[1]){const t=l.line_height;void 0!==t&&He(t)&&r(24,it=re(t/nt*10))}if(128&t.$$.dirty[0]|33554432&t.$$.dirty[1]){const t=l.letter_spacing;void 0!==t&&Ce(t)&&r(25,ot=re(t/nt*10))}if(640&t.$$.dirty[0]|37748736&t.$$.dirty[1]&&(l.corner_radius||l.corners_radius||l.font_size)){const t=null!==r(53,z=l.corner_radius)&&void 0!==z?z:1e3;l.corners_radius?r(9,st=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 Ie(t,e,n)}(l.corners_radius,t,nt,st)):Ce(t)&&r(9,st=re(t/nt*10))}1024&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&(r(10,Q=hn(l.active_font_weight||l.font_weight,Q)),l.font_family&&"string"==typeof l.font_family?r(26,ct=U.typefaceProvider(l.font_family,{fontWeight:Q||400})):r(26,ct="")),2048&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&(r(11,tt=hn(l.inactive_font_weight||l.font_weight,tt)),l.font_family&&"string"==typeof l.font_family?r(27,ut=U.typefaceProvider(l.font_family,{fontWeight:tt||400})):r(27,ut="")),4096&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(12,pt=ae(l.active_text_color,1,pt)),8192&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(13,ft=ae(l.inactive_text_color,1,ft)),16384&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(14,gt=ae(l.active_background_color,1,gt)),32768&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(15,ht=ae(l.inactive_background_color,1,ht)),65536&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(16,mt=Ve(l.item_spacing,mt)),1&t.$$.dirty[0]&&(r(39,c=U.getDerivedFromVars(J.has_separator)),S(),S=p(c,(t=>r(20,k=t)))),1&t.$$.dirty[0]&&(r(38,u=U.getDerivedFromVars(J.separator_color)),F(),F=p(u,(t=>r(60,x=t)))),1&t.$$.dirty[0]&&(r(37,d=U.getDerivedFromVars(J.separator_paddings)),D(),D=p(d,(t=>r(59,w=t)))),1048576&t.$$.dirty[0]|830472192&t.$$.dirty[1]&&k&&(x&&r(54,yt=ae(x,1,yt)),w&&r(55,$t=Ae(w,$t))),25165824&t.$$.dirty[1]&&r(36,g={background:yt,margin:$t}),1&t.$$.dirty[0]&&(r(35,h=U.getDerivedFromVars(J.switch_tabs_by_content_swipe_enabled)),P(),P=p(h,(t=>r(58,_=t)))),134217728&t.$$.dirty[1]&&r(34,m=void 0===_||Boolean(_)),1&t.$$.dirty[0]&&(r(33,v=U.getDerivedFromVars(J.restrict_parent_scroll)),M(),M=p(v,(t=>r(43,V=t)))),1&t.$$.dirty[0]&&(r(32,y=U.getDerivedFromVars(J.title_paddings)),j(),j=p(y,(t=>r(57,b=t)))),131072&t.$$.dirty[0]|67108864&t.$$.dirty[1]&&r(17,bt=Oe(b||void 0,bt)),262144&t.$$.dirty[0]&&(H||(r(30,kt=i.map(((t,e)=>e===et))),r(31,Et=i.map(((t,e)=>e===et)))))},[J,R,B,L,H,Y,et,nt,rt,st,Q,tt,pt,ft,gt,ht,mt,bt,i,$,k,G,K,X,it,ot,ct,ut,_t,wt,kt,Et,y,v,m,h,g,d,u,c,s,a,o,V,W,q,{},Vt,function(t){if(!(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)&&i){if(t.which===ni)At(-1,!0);else if(t.which===ri)At(1,!0);else if(t.which===ii)Ct(0,!0);else{if(t.which!==oi)return;Ct(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(Yt["root_restrict-scroll"]));i.length<2||t.touches.length>1||o&&o!==K||(zt=!1,Jt=!1,Mt=ze(t),Tt=null,Nt=Date.now(),Ot=It||-et*K.clientWidth,r(29,wt=!1),Dt&&clearTimeout(Dt))},function(t){const e=ze(t);if(!Mt||Tt&&Tt.x===e.x&&Tt.y===e.y)return;Tt=e;const n=K.clientWidth;if(zt){It=e.x-Mt.x+Ot;const t=n*i.length;if(It>0)It=It*n/(It+3*n);else if(-It+n>t){let e=-It+n-t;e=e*n/(e+3*n),It=n-t-e}jt(100*It/n)}else Math.abs(e.y-Mt.y)>10?Jt=!0:!Jt&&Math.abs(e.x-Mt.x)>8&&(St(),zt=!0,Mt=e,jt(100*-et),Pt(!0));zt&&t.cancelable&&t.preventDefault()},function(){Jt=!1,Mt=null;let t=et;if(!zt)return;zt=!1;const e=Math.min(512,K.clientWidth);Math.abs(Ot-It)>e/4*Math.min(1,(Date.now()-Nt)/750)&&(t+=Ot>It?1:-1),t>=i.length?t=i.length-1:t<0&&(t=0),t===et?(It=-t*e,jt(100*-t),Ft()):Ct(t)},T,z,yt,$t,l,b,_,w,x,E,C,A,(t,e)=>Vt(0,t),function(t){dt[t?"unshift":"push"]((()=>{G=t,r(21,G)}))},function(t){dt[t?"unshift":"push"]((()=>{X=t,r(23,X)}))},function(t){dt[t?"unshift":"push"]((()=>{K=t,r(22,K)}))}]}const yi={state:"divkit-b8efc",state__animations:"divkit-adaae","state__animation-child":"divkit-eb860","state__animation-child-inner":"divkit-e08c6"};function $i(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function bi(t){return t*t*t}function _i(t){const e=t-1;return e*e*e+1}function wi(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 xi=wi([.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]),ki=wi([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]),Ei={linear:r,ease:xi,ease_in:bi,ease_out:_i,ease_in_out:$i,spring:ki},Ci=200,Ai=0,Vi=0,ji=0;function Pi(t){return Math.max(...t.map((t=>(Number(t.duration)||Ci)+(Number(t.start_delay)||Ai))))}function Di(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)||Ai,a=Number(t.duration)||Ci,s=Math.max(0,Math.min(1,(e-n)/a)),c="in"===o?1-s:s,u=(Ei[t.interpolator||"ease_in_out"]||$i)(c);if("fade"===t.type)return u>=1?{active:!1,opacity:0}:{active:u>0&&u<1,opacity:(1-u)*l+u*(t.alpha||Vi)};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||ji),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 Fi(t,e,n){return t*(1-n)+e*n}const Si={linear:r,ease:xi,ease_in:bi,ease_out:_i,ease_in_out:$i,spring:ki},Ni=200,Oi=0;function Ii(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:Oi,duration:null!==(r=s.duration)&&void 0!==r?r:Ni,easing:s.interpolator&&s.interpolator in Si?Si[s.interpolator]:$i,css:t=>["top:".concat(Fi(o.top,a.top,t)-i.top,"px"),"left:".concat(Fi(o.left,a.left,t)-i.left,"px"),"width:".concat(Fi(o.width,a.width,t),"px"),"height:".concat(Fi(o.height,a.height,t),"px")].join(";")}}function Mi(t){const e=[];return"set"===t.type?(t.items||[]).forEach((t=>{e.push(...Mi(t))})):e.push(t),e}const Ti={tooltip:"divkit-f1907",tooltip_visible:"divkit-e5914"},zi={linear:r,ease:xi,ease_in:bi,ease_out:_i,ease_in_out:$i,spring:ki},Ji=300,Ri=0;function Bi(t,e){let{animations:n,direction:r}=e;if(!n)return{};const i=Ne(n),o=(a=i,Math.max(...a.map((t=>(Number(t.duration)||Ji)+(Number(t.start_delay)||Ri)))));var a;return i.some((t=>"no_animation"===t.name))?{}:{duration:o,css:t=>{const e=t*o,n=i.map((t=>{const n=Number(t.start_delay)||Ri,i=Number(t.duration)||Ji,o=Math.max(0,Math.min(1,(e-n)/i)),a=(zi[t.interpolator||"ease_in_out"]||$i)(o);var s,l;if("fade"===t.name)return{active:a>0&&a<1,opacity:(1-a)*("in"===r&&null!==(s=t.start_value)&&void 0!==s?s:0)+a*("in"===r?1:null!==(l=t.end_value)&&void 0!==l?l:1)};if("translate"===t.name){var c,u;const e=-("in"===r&&null!==(c=t.start_value)&&void 0!==c?c:10),n=-("in"===r?0:null!==(u=t.end_value)&&void 0!==u?u:0);return{active:a>0&&a<1,translate:"translateY(".concat((1-a)*e+a*n).concat("in"===r&&void 0!==t.start_value||"out"===r&&void 0!==t.end_value?"%":"px",")")}}if("scale"===t.name){var d,p;const e="in"===r&&null!==(d=t.start_value)&&void 0!==d?d:0,n="in"===r?1:null!==(p=t.end_value)&&void 0!==p?p:1;return{active:a>0&&a<1,scale:"scale(".concat((1-a)*e+a*n,")")}}return{}})),a=n.map((t=>t.opacity)).filter((t=>void 0!==t)).reduce(((t,e)=>t*e),1),s=n.map((t=>t.translate)).filter((t=>void 0!==t)).join(" "),l=n.map((t=>t.scale)).filter((t=>void 0!==t)).join(" "),c=n.filter((t=>t.active)).map((t=>t.scale)).filter((t=>void 0!==t)),u=[s,c.length?c[c.length-1]:l].filter(Boolean).join(" ");return"transform:".concat(u||"none",";opacity:").concat(a)}}}const{window:Li}=A;function Ui(t){let e,i,o,a,c,u,d,p;return i=new Ga({props:{div:t[0].div,templateContext:t[1]}}),{c(){e=M("div"),Bt(i.$$.fragment),L(e,"class",o=we("tooltip",Ti,t[7])+" "+(t[14]?Yt.root_platform_desktop:"")),K(e,"top",t[4]),K(e,"left",t[3]),K(e,"width",t[5]),K(e,"height",t[6])},m(n,r){N(n,e,r),Lt(i,e,null),t[27](e),u=!0,d||(p=[B(Li,"click",t[18]),B(Li,"resize",t[19])],d=!0)},p(n,r){t=n;const a={};1&r[0]&&(a.div=t[0].div),2&r[0]&&(a.templateContext=t[1]),i.$set(a),(!u||16512&r[0]&&o!==(o=we("tooltip",Ti,t[7])+" "+(t[14]?Yt.root_platform_desktop:"")))&&L(e,"class",o),16&r[0]&&K(e,"top",t[4]),8&r[0]&&K(e,"left",t[3]),32&r[0]&&K(e,"width",t[5]),64&r[0]&&K(e,"height",t[6])},i(n){u||(Pt(i.$$.fragment,n),n&&yt((()=>{u&&(c&&c.end(1),a=St(e,Bi,{animations:t[15]||t[17],direction:"in"}),a.start())})),u=!0)},o(o){Dt(i.$$.fragment,o),a&&a.invalidate(),o&&(c=function(t,e,i){const o={direction:"out"};let a,c=e(t,i,o),u=!0;const d=At;let p;function f(){const{delay:e=0,duration:i=300,easing:o=r,tick:l=n,css:f}=c||Ft;f&&(a=et(t,1,0,i,e,o,f));const g=w()+e,h=g+i;yt((()=>Et(t,!1,"start"))),"inert"in t&&(p=t.inert,t.inert=!0),C((e=>{if(u){if(e>=h)return l(0,1),Et(t,!1,"end"),--d.r||s(d.c),!1;if(e>=g){const t=o((e-g)/i);l(1-t,t)}}return u}))}return d.r+=1,l(c)?kt().then((()=>{c=c(o),f()})):f(),{end(e){e&&"inert"in t&&(t.inert=p),e&&c.tick&&c.tick(1,0),u&&(a&&nt(t,a),u=!1)}}}(e,Bi,{animations:t[16]||t[17],direction:"out"})),u=!1},d(n){n&&O(e),Ut(i),t[27](null),n&&c&&c.end(),d=!1,s(p)}}}function Wi(t,e,r){let i,o,a,s,l,c,u,d,f,g,h,m,v,y=n,$=n,b=n,_=n,w=n,x=n;var k,E,C,A;t.$$.on_destroy.push((()=>y())),t.$$.on_destroy.push((()=>$())),t.$$.on_destroy.push((()=>b())),t.$$.on_destroy.push((()=>_())),t.$$.on_destroy.push((()=>w())),t.$$.on_destroy.push((()=>x()));let{ownerNode:V}=e,{data:j}=e,{internalId:P}=e,{templateContext:D}=e;const F=lt(Zt),S=Date.now();let N,O=!1,I="",M="",T="",z="",J=null;function R(){var t,e;if(!N||!V)return;const n=N.parentElement;if(!n)return;const i=N.style.cssText;r(2,N.style.cssText+=";transform: none !important",N);const o=V.getBoundingClientRect(),a=N.getBoundingClientRect(),s=n.getBoundingClientRect();r(2,N.style.cssText=i,N);let l=0,c=0,u=null,p=null,h=0,m=0;const v=F.getJsonWithVars(null===(t=j.div)||void 0===t?void 0:t.width),y=F.getJsonWithVars(null===(e=j.div)||void 0===e?void 0:e.width);if(h=v&&"match_parent"!==v.type?"fixed"===v.type&&v.value?u=v.value:a.width:u=o.width,m="match_parent"===(null==y?void 0:y.type)?p=o.height:"fixed"===(null==y?void 0:y.type)&&y.value?p=y.value:a.height,"left"===g||"bottom-left"===g||"top-left"===g)l=o.left-h;else if("top"===g||"bottom"===g||"center"===g)l=(o.left+o.right)/2-h/2;else{if("right"!==g&&"bottom-right"!==g&&"top-right"!==g)return;l=o.right}if("top"===g||"top-left"===g||"top-right"===g)c=o.top-m;else if("left"===g||"right"===g||"center"===g)c=(o.top+o.bottom)/2-m/2;else{if("bottom-left"!==g&&"bottom"!==g&&"bottom-right"!==g)return;c=o.bottom}l-=s.left,c-=s.top,l+=f||0,c+=d||0,r(3,I="".concat(l,"px")),r(4,M="".concat(c,"px")),r(5,T=null!==u?"".concat(u,"px"):""),r(6,z=null!==p?"".concat(p,"px"):""),r(26,O=!0),null===u||null===p?"undefined"==typeof ResizeObserver||J||(J=new ResizeObserver((()=>{requestAnimationFrame(R)})),J.observe(N)):null==J||J.disconnect()}var B;return ot((()=>{if(F.tooltipRoot){const t=window.getComputedStyle(N);r(2,N.style.fontSize=t.fontSize,N),r(2,N.style.fontFamily=t.fontFamily,N),r(2,N.style.lineHeight=t.lineHeight,N),F.tooltipRoot.appendChild(N)}})),B=()=>{O||R()},it().$$.after_update.push(B),at((()=>{null==J||J.disconnect()})),t.$$set=t=>{"ownerNode"in t&&r(20,V=t.ownerNode),"data"in t&&r(0,j=t.data),"internalId"in t&&r(21,P=t.internalId),"templateContext"in t&&r(1,D=t.templateContext)},t.$$.update=()=>{1&t.$$.dirty[0]&&(r(12,o=F.getDerivedFromVars(j.position)),b(),b=p(o,(t=>r(31,g=t)))),12582913&t.$$.dirty[0]&&(r(11,a=F.getDerivedFromVars(null===r(23,E=null===r(22,k=j.offset)||void 0===k?void 0:k.x)||void 0===E?void 0:E.value)),$(),$=p(a,(t=>r(30,f=t)))),50331649&t.$$.dirty[0]&&(r(10,s=F.getDerivedFromVars(null===r(25,A=null===r(24,C=j.offset)||void 0===C?void 0:C.y)||void 0===A?void 0:A.value)),y(),y=p(s,(t=>r(29,d=t)))),1&t.$$.dirty[0]&&(r(9,l=F.getDerivedFromVars(j.animation_in)),w(),w=p(l,(t=>r(15,m=t)))),1&t.$$.dirty[0]&&(r(8,c=F.getDerivedFromVars(j.animation_out)),x(),x=p(c,(t=>r(16,v=t)))),67108864&t.$$.dirty[0]&&r(7,u={visible:O})},r(13,i=F.isDesktop),_(),_=p(i,(t=>r(14,h=t))),[j,D,N,I,M,T,z,u,c,l,s,a,o,i,h,m,v,{name:"set",items:[{name:"translate"},{name:"fade"}]},function(t){Date.now()-S<100||t.composedPath().includes(N)||F.onTooltipClose(P)},function(){R()},V,P,k,E,C,A,O,function(t){dt[t?"unshift":"push"]((()=>{N=t,r(2,N)}))}]}const Hi=class extends qt{constructor(t){super(),Wt(this,t,Wi,Ui,d,{ownerNode:20,data:0,internalId:21,templateContext:1},null,[-1,-1])}},{Map:qi}=A;function Gi(t,e,n){const r=t.slice();return r[30]=e[n],r}function Ki(t,e,n){const r=t.slice();return r[30]=e[n],r}function Xi(t){var e;let n,r,i,o;n=new dn({props:{cls:yi.state,json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[no]},$$scope:{ctx:t}}});let a=(null===(e=t[3])||void 0===e?void 0:e.tooltips)&&ro(t);return{c(){Bt(n.$$.fragment),r=J(),a&&a.c(),i=R()},m(t,e){Lt(n,t,e),N(t,r,e),a&&a.m(t,e),N(t,i,e),o=!0},p(t,e){var r;const o={};1&e[0]&&(o.json=t[0]),4&e[0]&&(o.origJson=t[2]),2&e[0]&&(o.templateContext=t[1]),8&e[0]&&(o.layoutParams=t[3]),210&e[0]|16&e[1]&&(o.$$scope={dirty:e,ctx:t}),n.$set(o),null!==(r=t[3])&&void 0!==r&&r.tooltips?a?(a.p(t,e),8&e[0]&&Pt(a,1)):(a=ro(t),a.c(),Pt(a,1),a.m(i.parentNode,i)):a&&(Vt(),Dt(a,1,1,(()=>{a=null})),jt())},i(t){o||(Pt(n.$$.fragment,t),Pt(a),o=!0)},o(t){Dt(n.$$.fragment,t),Dt(a),o=!1},d(t){t&&(O(r),O(i)),Ut(n,t),a&&a.d(t)}}}function Yi(t){let e,r,i=t[7],o=Zi(t);return{c(){o.c(),e=R()},m(t,n){o.m(t,n),N(t,e,n),r=!0},p(t,r){128&r[0]&&d(i,i=t[7])?(Vt(),Dt(o,1,1,n),jt(),o=Zi(t),o.c(),Pt(o,1),o.m(e.parentNode,e)):o.p(t,r)},i(t){r||(Pt(o),r=!0)},o(t){Dt(o),r=!1},d(t){t&&O(e),o.d(t)}}}function Zi(t){let e,n;return e=new Ga({props:{div:t[7].div,templateContext:t[1]}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};128&n[0]&&(r.div=t[7].div),2&n[0]&&(r.templateContext=t[1]),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function Qi(t){let e,n,r,i,o,a,s,l,c,u;function d(){return t[11](t[30])}return r=new Ga({props:{div:t[30].json,templateContext:t[30].templateContext,layoutParams:{fakeElement:!0}}}),{c(){e=M("div"),n=M("div"),Bt(r.$$.fragment),o=J(),L(n,"class",i=yi["state__animation-child-inner"]),L(e,"class",a=yi["state__animation-child"])},m(t,i){N(t,e,i),D(e,n),Lt(r,n,null),D(e,o),l=!0,c||(u=B(e,"introend",d),c=!0)},p(e,n){t=e;const i={};64&n[0]&&(i.div=t[30].json),64&n[0]&&(i.templateContext=t[30].templateContext),r.$set(i)},i(n){l||(Pt(r.$$.fragment,n),s||yt((()=>{s=St(e,Ii,t[30]),s.start()})),l=!0)},o(t){Dt(r.$$.fragment,t),l=!1},d(t){t&&O(e),Ut(r),c=!1,u()}}}function to(t){let e,n,r,i,o,a,s,l,c,u,d="".concat(t[30].offsetLeft,"px"),p="".concat(t[30].offsetTop,"px"),f="".concat(t[30].width,"px"),g="".concat(t[30].height,"px");function h(){return t[10](t[30])}return r=new Ga({props:{div:t[30].json,templateContext:t[30].templateContext,layoutParams:{fakeElement:!0}}}),{c(){e=M("div"),n=M("div"),Bt(r.$$.fragment),o=J(),L(n,"class",i=yi["state__animation-child-inner"]),L(e,"class",a=yi["state__animation-child"]),K(e,"left",d),K(e,"top",p),K(e,"width",f),K(e,"height",g)},m(t,i){N(t,e,i),D(e,n),Lt(r,n,null),D(e,o),l=!0,c||(u=B(e,"introend",h),c=!0)},p(n,i){t=n;const o={};64&i[0]&&(o.div=t[30].json),64&i[0]&&(o.templateContext=t[30].templateContext),r.$set(o),64&i[0]&&d!==(d="".concat(t[30].offsetLeft,"px"))&&K(e,"left",d),64&i[0]&&p!==(p="".concat(t[30].offsetTop,"px"))&&K(e,"top",p),64&i[0]&&f!==(f="".concat(t[30].width,"px"))&&K(e,"width",f),64&i[0]&&g!==(g="".concat(t[30].height,"px"))&&K(e,"height",g)},i(n){l||(Pt(r.$$.fragment,n),s||yt((()=>{s=St(e,Di,t[30]),s.start()})),l=!0)},o(t){Dt(r.$$.fragment,t),l=!1},d(t){t&&O(e),Ut(r),c=!1,u()}}}function eo(t,e){let n,r,i,o,a;const s=[to,Qi],l=[];function c(t,e){return"direction"in t[30]?0:1}return r=c(e),i=l[r]=s[r](e),{key:t,first:null,c(){n=R(),i.c(),o=R(),this.first=n},m(t,e){N(t,n,e),l[r].m(t,e),N(t,o,e),a=!0},p(t,n){let a=r;r=c(e=t),r===a?l[r].p(e,n):(Vt(),Dt(l[a],1,1,(()=>{l[a]=null})),jt(),i=l[r],i?i.p(e,n):(i=l[r]=s[r](e),i.c()),Pt(i,1),i.m(o.parentNode,o))},i(t){a||(Pt(i),a=!0)},o(t){Dt(i),a=!1},d(t){t&&(O(n),O(o)),l[r].d(t)}}}function no(t){var e;let n,r,i,o,a=[],s=new qi,l=(null===(e=t[7])||void 0===e?void 0:e.div)&&Yi(t),c=Nt(t[6]);const u=t=>t[30];for(let e=0;e<c.length;e+=1){let n=Ki(t,c,e),r=u(n);s.set(r,a[e]=eo(r,n))}return{c(){l&&l.c(),n=J(),r=M("div");for(let t=0;t<a.length;t+=1)a[t].c();L(r,"class",i=yi.state__animations),L(r,"aria-hidden","true")},m(e,i){l&&l.m(e,i),N(e,n,i),N(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?l?(l.p(t,e),128&e[0]&&Pt(l,1)):(l=Yi(t),l.c(),Pt(l,1),l.m(n.parentNode,n)):l&&(Vt(),Dt(l,1,1,(()=>{l=null})),jt()),320&e[0]&&(c=Nt(t[6]),Vt(),a=It(a,e,u,1,t,c,s,r,Ot,eo,null,Ki),jt())},i(t){if(!o){Pt(l);for(let t=0;t<c.length;t+=1)Pt(a[t]);o=!0}},o(t){Dt(l);for(let t=0;t<a.length;t+=1)Dt(a[t]);o=!1},d(e){e&&(O(n),O(r)),l&&l.d(e);for(let t=0;t<a.length;t+=1)a[t].d();t[12](null)}}}function ro(t){var e;let n,r,i=[],o=new qi,a=Nt(null===(e=t[3])||void 0===e?void 0:e.tooltips);const s=t=>t[30].internalId;for(let e=0;e<a.length;e+=1){let n=Gi(t,a,e),r=s(n);o.set(r,i[e]=io(r,n))}return{c(){for(let t=0;t<i.length;t+=1)i[t].c();n=R()},m(t,e){for(let n=0;n<i.length;n+=1)i[n]&&i[n].m(t,e);N(t,n,e),r=!0},p(t,e){var r;10&e[0]&&(a=Nt(null===(r=t[3])||void 0===r?void 0:r.tooltips),Vt(),i=It(i,e,s,1,t,a,o,n.parentNode,Ot,io,n,Gi),jt())},i(t){if(!r){for(let t=0;t<a.length;t+=1)Pt(i[t]);r=!0}},o(t){for(let t=0;t<i.length;t+=1)Dt(i[t]);r=!1},d(t){t&&O(n);for(let e=0;e<i.length;e+=1)i[e].d(t)}}}function io(t,e){let n,r,i;return r=new Hi({props:{ownerNode:e[30].ownerNode,data:e[30].desc,internalId:e[30].internalId,templateContext:e[1]}}),{key:t,first:null,c(){n=R(),Bt(r.$$.fragment),this.first=n},m(t,e){N(t,n,e),Lt(r,t,e),i=!0},p(t,n){e=t;const i={};8&n[0]&&(i.ownerNode=e[30].ownerNode),8&n[0]&&(i.data=e[30].desc),8&n[0]&&(i.internalId=e[30].internalId),2&n[0]&&(i.templateContext=e[1]),r.$set(i)},i(t){i||(Pt(r.$$.fragment,t),i=!0)},o(t){Dt(r.$$.fragment,t),i=!1},d(t){t&&O(n),Ut(r,t)}}}function oo(t){let e,n,r=!t[5]&&Xi(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[5]?r&&(Vt(),Dt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),32&n[0]&&Pt(r,1)):(r=Xi(t),r.c(),Pt(r,1),r.m(e.parentNode,e))},i(t){n||(Pt(r),n=!0)},o(t){Dt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function ao(t){return"change_bounds"===t.type?t:"set"===t.type?ao(t.items[0]):null}function so(t,e,n){let r,{json:i={}}=e,{templateContext:o}=e,{origJson:a}=e,{layoutParams:s}=e;const l=lt(Zt),c=lt(xe);let u,d=new Map,p=new Set,f=!1,g=null,h=[],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=Mi(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;async function _(t){if(w===t)return;l.setRunning("stateChange",!0);const e=new Set(p);h.forEach((t=>{t.resolvePromise&&t.resolvePromise()})),n(6,h=[]);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?(w=t,null==C||C.setValue(w),n(7,x=o)):l.logError(Qt(new Error("Cannot find state with id"),{additional:{stateId:t}})),await vt(),!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,Pi(e.transitions))),0),g=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:ao(t.transitions),resolvePromise:t.resolvePromise})));n(6,h=[...c.map((t=>Object.assign(Object.assign({},t),{maxDuration:f}))),...g]),d.clear(),l.setRunning("stateChange",!1)}let w;b?(null==s?void 0:s.fakeElement)||(c.registerInstance(b,{setState:_,getChild(t){if(g&&g.has(t))return g.get(t);l.logError(Qt(new Error("Missing state block with id"),{additional:{id:t}}))}}),st(xe,{registerInstance(t,e){g||(g=new Map),g.has(t)?l.logError(Qt(new Error("Duplicate state with id"),{additional:{id:t}})):g.set(t,e)},unregisterInstance(t){null==g||g.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=Pi(a.transitions),l=Object.assign(Object.assign({},a),{maxDuration:s});return n(6,h=[...h.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(Qt(new Error('Missing "id" prop for div "state"'))));let x=null;const k=l.getJsonWithVars(i.default_state_id),E=i.state_id_variable,C=E?l.getVariable(E,"string"):null;let A=!1;function V(t){n(6,h=h.filter((e=>e!==t))),t.resolvePromise&&t.resolvePromise()}return at((()=>{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[0]&&i&&(p=new Set),1&t.$$.dirty[0]&&n(9,r=i.states||[]),512&t.$$.dirty[0]&&((null==r?void 0:r.length)?n(5,f=!1):(n(5,f=!0),l.logError(Qt(new Error('Empty "states" prop for div "state"'))))),512&t.$$.dirty[0]&&function(t){if(!A&&(A=!0,t.length)){const e=(null==C?void 0:C.getValue())||k;e?(w=e,n(7,x=t.find((t=>t.state_id===w))||null),x||l.logError(Qt(new Error("Cannot find state for default_state_id"),{additional:{selectedId:w}}))):(n(7,x=t[0]),w=x.state_id),C&&(C.setValue(w),C.subscribe((t=>{_(t)})))}}(r)},[i,o,a,s,u,f,h,x,V,r,t=>V(t),t=>V(t),function(t){dt[t?"unshift":"push"]((()=>{u=t,n(4,u)}))}]}const lo={pager:"divkit-c5feb",pager__items:"divkit-f6987",pager__item:"divkit-feca7",pager_orientation_horizontal:"divkit-b0a1c",pager_orientation_vertical:"divkit-f772f"},{Boolean:co}=A;function uo(t,e,n){const r=t.slice();return r[49]=e[n],r}function po(t){let e,n;return e=new dn({props:{cls:we("pager",lo,t[8]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,parentOf:t[0].items,replaceItems:t[16],$$slots:{default:[ho]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=we("pager",lo,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]),1&n[0]&&(r.parentOf=t[0].items),33336&n[0]|2097152&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function fo(t){var e;let n,r,i,o,a;return r=new Ga({props:{div:t[49].json,templateContext:t[49].templateContext,origJson:t[49].origJson,layoutParams:null!==(e=t[3])&&void 0!==e&&e.fakeElement?{fakeElement:!0}:void 0}}),{c(){n=M("div"),Bt(r.$$.fragment),i=J(),L(n,"class",o=lo.pager__item)},m(t,e){N(t,n,e),Lt(r,n,null),D(n,i),a=!0},p(t,e){var n;const i={};16&e[0]&&(i.div=t[49].json),16&e[0]&&(i.templateContext=t[49].templateContext),16&e[0]&&(i.origJson=t[49].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||(Pt(r.$$.fragment,t),a=!0)},o(t){Dt(r.$$.fragment,t),a=!1},d(t){t&&O(n),Ut(r)}}}function go(t){let e,n,r=Nt(t[4]),i=[];for(let e=0;e<r.length;e+=1)i[e]=fo(uo(t,r,e));const o=t=>Dt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=R()},m(t,r){for(let e=0;e<i.length;e+=1)i[e]&&i[e].m(t,r);N(t,e,r),n=!0},p(t,n){if(24&n[0]){let a;for(r=Nt(t[4]),a=0;a<r.length;a+=1){const o=uo(t,r,a);i[a]?(i[a].p(o,n),Pt(i[a],1)):(i[a]=fo(o),i[a].c(),Pt(i[a],1),i[a].m(e.parentNode,e))}for(Vt(),a=r.length;a<i.length;a+=1)o(a);jt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)Pt(i[t]);n=!0}},o(t){i=i.filter(co);for(let t=0;t<i.length;t+=1)Dt(i[t]);n=!1},d(t){t&&O(e),I(i,t)}}}function ho(t){let e,r,i,o,a,s,l=t[4],c=go(t);return{c(){e=M("div"),c.c(),L(e,"class",r=lo.pager__items+" "+(t[15]?Yt["root_restrict-scroll"]:"")),L(e,"style",i=ne(t[9]))},m(n,r){N(n,e,r),c.m(e,null),t[37](e),o=!0,a||(s=B(e,"scroll",t[17]),a=!0)},p(t,a){16&a[0]&&d(l,l=t[4])?(Vt(),Dt(c,1,1,n),jt(),c=go(t),c.c(),Pt(c,1),c.m(e,null)):c.p(t,a),(!o||32768&a[0]&&r!==(r=lo.pager__items+" "+(t[15]?Yt["root_restrict-scroll"]:"")))&&L(e,"class",r),(!o||512&a[0]&&i!==(i=ne(t[9])))&&L(e,"style",i)},i(t){o||(Pt(c),o=!0)},o(t){Dt(c),o=!1},d(n){n&&O(e),c.d(n),t[37](null),a=!1,s()}}}function mo(t){let e,n,r=!t[7]&&po(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[7]?r&&(Vt(),Dt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),128&n[0]&&Pt(r,1)):(r=po(t),r.c(),Pt(r,1),r.m(e.parentNode,e))},i(t){n||(Pt(r),n=!0)},o(t){Dt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function vo(t,e,r){let i,o,a,s,l,c,u,d,f,g,h,m,v,y,b,_,w,x=n,k=n,E=n,C=n,A=n,V=n;var j,P,D,F,S,N,O;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:I={}}=e,{templateContext:M}=e,{origJson:T}=e,{layoutParams:z}=e;const J=lt(Zt),R=J.genId("pager");let B,L=!1,U=!1,W=0,H=0,q=!1,G="horizontal",K="",X="",Y="";const Z=Rr((function(){if(!L)return;const t=function(){const t=Array.from(B.children),e=B.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(26,W=t)}),50);function Q(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"smooth";const n="horizontal"===G,i=B.children[t],o=n?"offsetLeft":"offsetTop",a=n?"left":"top";B.scroll({[a]:i[o],behavior:e}),r(26,W=t)}return I.id&&!(null==z?void 0:z.fakeElement)&&J.registerInstance(I.id,{setCurrentItem(t){if(t<0||t>i.length-1)throw new Error('Item is out of range in "set-current-item" action');Q(t)},setPreviousItem(t){let e=W-1;e<0&&(e="ring"===t?i.length-1:W),Q(e)},setNextItem(t){let e=W+1;e>i.length-1&&(e="ring"===t?0:W),Q(e)}}),ot((()=>{if(L=!0,Boolean(document.getElementById("".concat(R,"-tab-0")))){const t=[...B.children];for(const[e,n]of t.entries())n.setAttribute("role","tabpanel"),n.setAttribute("id","".concat(R,"-panel-").concat(e)),n.setAttribute("aria-labelledby","".concat(R,"-tab-").concat(e))}})),at((()=>{L=!1,I.id&&!(null==z?void 0:z.fakeElement)&&J.unregisterInstance(I.id)})),t.$$set=t=>{"json"in t&&r(0,I=t.json),"templateContext"in t&&r(1,M=t.templateContext),"origJson"in t&&r(2,T=t.origJson),"layoutParams"in t&&r(3,z=t.layoutParams)},t.$$.update=()=>{if(262145&t.$$.dirty[0]&&((null===r(18,j=I.items)||void 0===j?void 0:j.length)&&Array.isArray(I.items)?r(25,U=!1):(r(25,U=!0),J.logError(Qt(new Error('Incorrect or empty "items" prop for div "pager"'))))),33554435&t.$$.dirty[0]&&r(4,i=(!U&&I.items||[]).map((t=>{let e=t,n=M;return({templateContext:n,json:e}=J.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),1&t.$$.dirty[0]&&(r(14,o=J.getDerivedFromVars(I.layout_mode)),k(),k=p(o,(t=>r(33,v=t)))),4&t.$$.dirty[1]&&(v?"percentage"!==v.type&&"fixed"!==v.type?(r(27,q=!0),J.logError(Qt(new Error('Incorrect value of "layout_mode.type" for div "pager"')))):r(27,q=!1):(r(27,q=!0),J.logError(Qt(new Error('Empty "layout_mode" prop for div "pager"'))))),1&t.$$.dirty[0]&&(r(13,a=J.getDerivedFromVars(I.orientation)),A(),A=p(a,(t=>r(36,_=t)))),268435456&t.$$.dirty[0]|32&t.$$.dirty[1]&&r(28,G=dr(_,G)),1&t.$$.dirty[0]&&(r(12,s=J.getDerivedFromVars(I.item_spacing)),C(),C=p(s,(t=>r(35,b=t)))),16&t.$$.dirty[1]){const t=null==b?void 0:b.value;t&&Ce(t)&&r(29,K=re(t||0))}if(1&t.$$.dirty[0]&&(r(11,l=J.getDerivedFromVars(I.paddings)),E(),E=p(l,(t=>r(34,y=t)))),1073741824&t.$$.dirty[0]|8&t.$$.dirty[1]&&r(30,X=Ae(y,X)),1&t.$$.dirty[0]&&(r(10,c=J.getDerivedFromVars(I.restrict_parent_scroll)),V(),V=p(c,(t=>r(15,w=t)))),268435456&t.$$.dirty[0]&&r(32,u="horizontal"===G?"grid-auto-columns":"grid-auto-rows"),838336513&t.$$.dirty[0]|4&t.$$.dirty[1])if("fixed"===(null==v?void 0:v.type)){const t=ie("horizontal"===G?((null===r(19,P=I.paddings)||void 0===P?void 0:P.left)||0)+((null===r(20,D=I.paddings)||void 0===D?void 0:D.right)||0):((null===r(21,F=I.paddings)||void 0===F?void 0:F.top)||0)+((null===r(22,S=I.paddings)||void 0===S?void 0:S.bottom)||0)),e=null===r(23,N=v.neighbour_page_width)||void 0===N?void 0:N.value;r(31,Y=e?"calc(100% + ".concat(t," - 2 * ").concat(ie(e)," - 2 * ").concat(K,")"):"100%")}else if("percentage"===(null==v?void 0:v.type)){const t=null===r(24,O=v.page_width)||void 0===O?void 0:O.value;r(31,Y="".concat(Number(t),"%"))}1610612736&t.$$.dirty[0]|3&t.$$.dirty[1]&&r(9,d={"grid-gap":K,padding:X,[u]:Y}),268435456&t.$$.dirty[0]&&r(8,f={orientation:G}),167772160&t.$$.dirty[0]&&r(7,g=U||q),67108880&t.$$.dirty[0]&&function(t,e){const n=I.id;if(n){const r=new Map(m);$(h,m=r.set(n,{instId:R,size:t,currentItem:e,scrollToPagerItem:Q}),m)}}(i.length,W),67108864&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,h=J.getStore("pagers")),x(),x=p(h,(t=>r(40,m=t))),[I,M,T,z,i,B,h,g,f,d,c,l,s,a,o,w,function(t){r(0,I=Object.assign(Object.assign({},I),{items:t}))},Z,j,P,D,F,S,N,O,U,W,q,G,K,X,Y,u,v,y,b,_,function(t){dt[t?"unshift":"push"]((()=>{B=t,r(5,B)}))}]}const yo={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 $o(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 bo(t){let e,n=Nt(Array(t[12].size)),r=[];for(let e=0;e<n.length;e+=1)r[e]=_o($o(t,n,e));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=R()},m(t,n){for(let e=0;e<r.length;e+=1)r[e]&&r[e].m(t,n);N(t,e,n)},p(t,i){if(25169920&i[0]){let o;for(n=Nt(Array(t[12].size)),o=0;o<n.length;o+=1){const a=$o(t,n,o);r[o]?r[o].p(a,i):(r[o]=_o(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){t&&O(e),I(r,t)}}}function _o(t){let e,n,r,i,o,a,l,c;function u(){return t[36](t[46])}return{c(){e=M("div"),L(e,"class",n=we("indicator__item",yo,{active:t[44]})+" "+Yt.root__clickable),L(e,"role","tab"),L(e,"id",r=t[12].instId+"-tab-"+t[46]),L(e,"aria-controls",i=t[12].instId+"-panel-"+t[46]),L(e,"aria-selected",o=t[44]?"true":"false"),L(e,"tabindex",a=t[44]?0:-1)},m(n,r){N(n,e,r),l||(c=[B(e,"click",u),B(e,"keydown",t[24])],l=!0)},p(s,l){t=s,4096&l[0]&&n!==(n=we("indicator__item",yo,{active:t[44]})+" "+Yt.root__clickable)&&L(e,"class",n),4096&l[0]&&r!==(r=t[12].instId+"-tab-"+t[46])&&L(e,"id",r),4096&l[0]&&i!==(i=t[12].instId+"-panel-"+t[46])&&L(e,"aria-controls",i),4096&l[0]&&o!==(o=t[44]?"true":"false")&&L(e,"aria-selected",o),4096&l[0]&&a!==(a=t[44]?0:-1)&&L(e,"tabindex",a)},d(t){t&&O(e),l=!1,s(c)}}}function wo(t){let e,n,r,i,o=t[12]&&bo(t);return{c(){e=M("div"),n=M("div"),o&&o.c(),L(n,"class",r=yo.indicator__items),L(n,"role","tablist"),K(n,"margin","default"===t[6]?"0 ".concat(re(Math.max(0,t[4].width-t[5].width)/2)):""),K(n,"--divkit-indicator-inactive-width",re(t[5].width)),K(n,"--divkit-indicator-inactive-height",re(t[5].height)),K(n,"--divkit-indicator-inactive-border-radius",re(t[5].borderRadius)),K(n,"--divkit-indicator-inactive-background",t[5].background||""),K(n,"--divkit-indicator-inactive-box-shadow",t[5].boxShadow||""),K(n,"--divkit-indicator-active-width",re(t[4].width)),K(n,"--divkit-indicator-active-height",re(t[4].height)),K(n,"--divkit-indicator-active-border-radius",re(t[4].borderRadius)),K(n,"--divkit-indicator-active-background",t[4].background||""),K(n,"--divkit-indicator-active-box-shadow",t[4].boxShadow||""),K(n,"--divkit-indicator-active-scale",t[4].width/t[5].width),K(n,"--divkit-indicator-default-margin","default"===t[6]?"0 ".concat(re((t[7]-t[5].width)/2)):""),K(n,"--divkit-indicator-stretch-margin","stretch"===t[6]?re(t[9]):""),K(n,"--divkit-indicator-stretch-max-count","stretch"===t[6]?t[8]:""),K(n,"--divkit-indicator-stretch-max-spacer","stretch"===t[6]?re((t[8]-1)*t[9]):""),L(e,"class",i=yo.indicator__scroller)},m(r,i){N(r,e,i),D(e,n),o&&o.m(n,null),t[37](n),t[38](e)},p(t,e){t[12]?o?o.p(t,e):(o=bo(t),o.c(),o.m(n,null)):o&&(o.d(1),o=null),112&e[0]&&K(n,"margin","default"===t[6]?"0 ".concat(re(Math.max(0,t[4].width-t[5].width)/2)):""),32&e[0]&&K(n,"--divkit-indicator-inactive-width",re(t[5].width)),32&e[0]&&K(n,"--divkit-indicator-inactive-height",re(t[5].height)),32&e[0]&&K(n,"--divkit-indicator-inactive-border-radius",re(t[5].borderRadius)),32&e[0]&&K(n,"--divkit-indicator-inactive-background",t[5].background||""),32&e[0]&&K(n,"--divkit-indicator-inactive-box-shadow",t[5].boxShadow||""),16&e[0]&&K(n,"--divkit-indicator-active-width",re(t[4].width)),16&e[0]&&K(n,"--divkit-indicator-active-height",re(t[4].height)),16&e[0]&&K(n,"--divkit-indicator-active-border-radius",re(t[4].borderRadius)),16&e[0]&&K(n,"--divkit-indicator-active-background",t[4].background||""),16&e[0]&&K(n,"--divkit-indicator-active-box-shadow",t[4].boxShadow||""),48&e[0]&&K(n,"--divkit-indicator-active-scale",t[4].width/t[5].width),224&e[0]&&K(n,"--divkit-indicator-default-margin","default"===t[6]?"0 ".concat(re((t[7]-t[5].width)/2)):""),576&e[0]&&K(n,"--divkit-indicator-stretch-margin","stretch"===t[6]?re(t[9]):""),320&e[0]&&K(n,"--divkit-indicator-stretch-max-count","stretch"===t[6]?t[8]:""),832&e[0]&&K(n,"--divkit-indicator-stretch-max-spacer","stretch"===t[6]?re((t[8]-1)*t[9]):"")},d(n){n&&O(e),o&&o.d(),t[37](null),t[38](null)}}}function xo(t){let e,n;return e=new dn({props:{cls:we("indicator",yo,t[13]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[wo]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};8192&n[0]&&(r.cls=we("indicator",yo,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||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function ko(t,e,r){let i,o,a,s,l,c,u,d,f,g,h,m,v,y,$,b,_,w,x,k=n,E=n,C=n,A=n,V=n,j=n,P=n,D=n,F=n;var S,N;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((()=>F()));let{json:O={}}=e,{templateContext:I}=e,{origJson:M}=e,{layoutParams:T}=e;const z=["rounded_rectangle","circle"],J=lt(Zt);let R,B,L,U={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!==L.currentItem&&L.scrollToPagerItem(t)}async function Y(t){L.scrollToPagerItem(t),await vt();const e=B.querySelector(".".concat(yo.indicator__item_active));e&&e.focus()}return t.$$set=t=>{"json"in t&&r(0,O=t.json),"templateContext"in t&&r(1,I=t.templateContext),"origJson"in t&&r(2,M=t.origJson),"layoutParams"in t&&r(3,T=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(22,i=J.getDerivedFromVars(O.shape)),j(),j=p(i,(t=>r(32,b=t)))),1&t.$$.dirty[0]&&(r(21,o=J.getDerivedFromVars(O.active_item_color)),A(),A=p(o,(t=>r(30,y=t)))),1&t.$$.dirty[0]&&(r(20,a=J.getDerivedFromVars(O.inactive_item_color)),V(),V=p(a,(t=>r(31,$=t)))),1&t.$$.dirty[0]&&(r(19,s=J.getDerivedFromVars(O.active_item_size)),P(),P=p(s,(t=>r(33,_=t)))),1&t.$$.dirty[0]&&(r(18,l=J.getDerivedFromVars(O.active_shape)),F(),F=p(l,(t=>r(35,x=t)))),1&t.$$.dirty[0]&&(r(17,c=J.getDerivedFromVars(O.inactive_shape)),D(),D=p(c,(t=>r(34,w=t)))),1073741872&t.$$.dirty[0]|31&t.$$.dirty[1]&&(x&&r(4,U=Ln({type:"shape_drawable",shape:x},z,U)),w&&r(5,W=Ln({type:"shape_drawable",shape:w},z,W)),!x&&!w&&b)){const t=fn(_,1.3);r(5,W=Ln({type:"shape_drawable",shape:b,color:W.background},z,W)),r(5,W.background=ae($,1,W.background),W),r(4,U=Object.assign(Object.assign({},W),{width:W.width*t,height:W.height*t,borderRadius:W.borderRadius*t,background:U.background})),r(4,U.background=ae(y,1,U.background),U)}if(1&t.$$.dirty[0]&&(r(16,u=J.getDerivedFromVars(O.space_between_centers)),E(),E=p(u,(t=>r(28,m=t)))),1&t.$$.dirty[0]&&(r(15,d=J.getDerivedFromVars(O.items_placement)),C(),C=p(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=Ve(m.value,q));else if(r(6,H=v.type),"default"===H)r(7,q=Ve(null===r(25,S=v.space_between_centers)||void 0===S?void 0:S.value,q));else if("stretch"===H){const t=v;r(8,G=fn(t.max_visible_items,G)),r(9,K=Ve(null===r(26,N=t.item_spacing)||void 0===N?void 0:N.value,K))}134217728&t.$$.dirty[0]&&async function(t){if(O.pager_id&&t.has(O.pager_id)&&(r(12,L=t.get(O.pager_id)),await vt(),B)){const t=B.children[L.currentItem].offsetLeft;R.scroll({left:t-R.clientWidth/2,behavior:"smooth"})}}(h),64&t.$$.dirty[0]&&r(13,g={placement:H})},r(14,f=J.getStore("pagers")),k(),k=p(f,(t=>r(27,h=t))),[O,I,M,T,U,W,H,q,G,K,R,B,L,g,f,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}=L;if(t.which===ni)Y(n-1<0?n:n-1);else if(t.which===ri)Y(n+1>=e?n:n+1);else if(t.which===ii)Y(0);else{if(t.which!==oi)return;Y(e-1)}t.preventDefault()},S,N,h,m,v,y,$,b,_,w,x,t=>X(t),function(t){dt[t?"unshift":"push"]((()=>{B=t,r(11,B)}))},function(t){dt[t?"unshift":"push"]((()=>{R=t,r(10,R)}))}]}const Eo={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 Co(t,e){if(!t||!t.font_size)return e;const n=t.offset,r=t.text_color&&ae(t.text_color)||"#000",i=gn(t.font_weight);if(He(t.font_size)&&"transparent"!==r){var o,a;const e={fontSize:re(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 Ao(t,e,n){return Math.max(e,Math.min(n,Number(t)))}const Vo="function"==typeof BigInt;function jo(t){return Vo?BigInt(t):Number(t)}const Po=jo("9223372036854775807"),Do=jo("-9223372036854775808");function Fo(t){const e=jo(t);if(e>Po||e<Do)throw new Error("Integer overflow.");return e}const So=Fo(0);function No(t){let e=t;return e<0&&(e=-e),e}function Oo(t){let e=0;return t>0?e=1:t<0&&(e=-1),Fo(e)}class Io{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=Kt(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 Mo={string:class extends Io{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"string"}},number:class extends Io{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 Io{convertValue(t){if("bigint"!=typeof t&&"number"!=typeof t||"number"==typeof t&&(isNaN(t)||t!==Math.round(t))||t>Po||t<Do)throw new Error("Incorrect variable value");return Fo(t)}fromString(t){const e=Fo(t);return this.convertValue(e)}getType(){return"integer"}},boolean:class extends Io{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 Io{convertValue(t){if("string"!=typeof t||!se(t))throw new Error("Incorrect variable value");return t}fromString(t){return this.convertValue(t)}getType(){return"color"}},url:class extends Io{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"url"}},dict:class extends Io{convertValue(t){if("object"!=typeof t||!t)throw new Error("Incorrect variable value");return t}fromString(t){throw new Error("Dict variable does not support setter from string")}getType(){return"dict"}},array:class extends Io{convertValue(t){if(!Array.isArray(t))throw new Error("Incorrect variable value");return t}fromString(t){throw new Error("Array variable does not support setter from string")}getType(){return"array"}}};function To(t,e,n){if(!(e in Mo))throw new Error("Unsupported variable type");return new Mo[e](t,n)}function zo(t,e,n){const r=t.slice();return r[78]=e[n],r}function Jo(t,e,n){const r=t.slice();return r[78]=e[n],r}function Ro(t){let e,n;return e=new dn({props:{cls:we("slider",Eo,t[21]),style:t[22],customDescription:!0,customActions:"slider",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Ho]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};2097152&n[0]&&(r.cls=we("slider",Eo,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||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function Bo(t){let e,n;return{c(){e=M("div"),L(e,"class",n=Eo.slider__tick+" "+Eo.slider__tick_active),K(e,"--divkit-slider-tick",t[78])},m(t,n){N(t,e,n)},p(t,n){131072&n[0]&&K(e,"--divkit-slider-tick",t[78])},d(t){t&&O(e)}}}function Lo(t){let e,n;return{c(){e=M("div"),L(e,"class",n=Eo.slider__tick+" "+Eo.slider__tick_inactive),K(e,"--divkit-slider-tick",t[78])},m(t,n){N(t,e,n)},p(t,n){262144&n[0]&&K(e,"--divkit-slider-tick",t[78])},d(t){t&&O(e)}}}function Uo(t){let e,n,r,i,o;return{c(){var a,s,l;e=M("div"),n=M("div"),r=z(t[6]),L(n,"class",i=Eo["slider__thumb-text-inner"]),K(n,"font-size",(null===(a=t[12])||void 0===a?void 0:a.fontSize)||"1em"),K(n,"font-weight",(null===(s=t[12])||void 0===s?void 0:s.fontWeight)||""),K(n,"color",(null===(l=t[12])||void 0===l?void 0:l.textColor)||"#000"),L(e,"class",o=Eo["slider__thumb-text"])},m(t,i){N(t,e,i),D(e,n),D(n,r)},p(t,e){var i,o,a;64&e[0]&&G(r,t[6]),4096&e[0]&&K(n,"font-size",(null===(i=t[12])||void 0===i?void 0:i.fontSize)||"1em"),4096&e[0]&&K(n,"font-weight",(null===(o=t[12])||void 0===o?void 0:o.fontWeight)||""),4096&e[0]&&K(n,"color",(null===(a=t[12])||void 0===a?void 0:a.textColor)||"#000")},d(t){t&&O(e)}}}function Wo(t){let e,n,r,i,o;return{c(){var a,s,l;e=M("div"),n=M("div"),r=z(t[7]),L(n,"class",i=Eo["slider__thumb-text-inner"]),K(n,"font-size",(null===(a=t[13])||void 0===a?void 0:a.fontSize)||"1em"),K(n,"font-weight",(null===(s=t[13])||void 0===s?void 0:s.fontWeight)||""),K(n,"color",(null===(l=t[13])||void 0===l?void 0:l.textColor)||"#000"),L(e,"class",o=Eo["slider__thumb-text"]+" "+Eo["slider__thumb-text_secondary"])},m(t,i){N(t,e,i),D(e,n),D(n,r)},p(t,e){var i,o,a;128&e[0]&&G(r,t[7]),8192&e[0]&&K(n,"font-size",(null===(i=t[13])||void 0===i?void 0:i.fontSize)||"1em"),8192&e[0]&&K(n,"font-weight",(null===(o=t[13])||void 0===o?void 0:o.fontWeight)||""),8192&e[0]&&K(n,"color",(null===(a=t[13])||void 0===a?void 0:a.textColor)||"#000")},d(t){t&&O(e)}}}function Ho(t){let e,n,r,i,o,a,l,c,u,d,p,f,g,h,m,v,y,$,b,_,w,x,k=Nt(t[17]),E=[];for(let e=0;e<k.length;e+=1)E[e]=Bo(Jo(t,k,e));let C=Nt(t[18]),A=[];for(let e=0;e<C.length;e+=1)A[e]=Lo(zo(t,C,e));let V=t[12]&&Uo(t),j=t[37]&&function(t){let e,n,r=t[13]&&Wo(t);return{c(){e=M("div"),r&&r.c(),L(e,"class",n=Eo.slider__thumb+" "+Eo.slider__thumb_secondary),K(e,"border-radius",re(t[9].borderRadius)),K(e,"background",t[9].background),K(e,"box-shadow",t[9].boxShadow||"")},m(t,n){N(t,e,n),r&&r.m(e,null)},p(t,n){t[13]?r?r.p(t,n):(r=Wo(t),r.c(),r.m(e,null)):r&&(r.d(1),r=null),512&n[0]&&K(e,"border-radius",re(t[9].borderRadius)),512&n[0]&&K(e,"background",t[9].background),512&n[0]&&K(e,"box-shadow",t[9].boxShadow||"")},d(t){t&&O(e),r&&r.d()}}}(t),P=t[37]&&function(t){let e,n,r,i,o;return{c(){e=M("input"),L(e,"type","range"),L(e,"class",n=t[16]?Eo.slider__input:"".concat(Eo.slider__input," ").concat(Eo.slider__input_secondary)),L(e,"min",t[4]),L(e,"max",t[5]),L(e,"step","1"),e.value=r=t[16]?t[6]:t[7],L(e,"aria-label",t[20])},m(n,r){N(n,e,r),i||(o=[B(e,"input",t[68]),B(e,"mousedown",t[37]?t[40]:null),B(e,"touchstart",t[37]?t[40]:null)],i=!0)},p(t,i){65536&i[0]&&n!==(n=t[16]?Eo.slider__input:"".concat(Eo.slider__input," ").concat(Eo.slider__input_secondary))&&L(e,"class",n),16&i[0]&&L(e,"min",t[4]),32&i[0]&&L(e,"max",t[5]),65728&i[0]&&r!==(r=t[16]?t[6]:t[7])&&(e.value=r),1048576&i[0]&&L(e,"aria-label",t[20])},d(t){t&&O(e),i=!1,s(o)}}}(t);return{c(){e=M("div"),n=M("div"),r=M("div"),o=J(),a=M("div"),c=J();for(let t=0;t<E.length;t+=1)E[t].c();u=J();for(let t=0;t<A.length;t+=1)A[t].c();d=J(),p=M("div"),V&&V.c(),g=J(),j&&j.c(),h=J(),m=M("input"),$=J(),P&&P.c(),L(r,"class",i=Eo.slider__track),K(r,"height",re(t[10].height)),K(r,"border-radius",re(t[10].borderRadius)),K(r,"background",t[10].background),K(r,"box-shadow",t[10].boxShadow||""),L(a,"class",l=Eo["slider__active-track"]),K(a,"left",(100*t[23]).toFixed(2)+"%"),K(a,"width",(100*t[24]).toFixed(2)+"%"),K(a,"height",re(t[11].height)),K(a,"border-radius",re(t[11].borderRadius)),K(a,"background",t[11].background),K(a,"box-shadow",t[11].boxShadow||""),L(p,"class",f=Eo.slider__thumb),K(p,"border-radius",re(t[8].borderRadius)),K(p,"background",t[8].background),K(p,"box-shadow",t[8].boxShadow||""),L(m,"type","range"),L(m,"class",v=t[16]?"".concat(Eo.slider__input," ").concat(Eo.slider__input_secondary):Eo.slider__input),L(m,"min",t[4]),L(m,"max",t[5]),L(m,"step","1"),m.value=y=t[16]?t[7]:t[6],L(m,"aria-label",t[19]),L(n,"class",b=Eo["slider__tracks-inner"]),L(e,"class",_=Eo["slider__tracks-wrapper"])},m(i,s){N(i,e,s),D(e,n),D(n,r),D(n,o),D(n,a),D(n,c);for(let t=0;t<E.length;t+=1)E[t]&&E[t].m(n,null);D(n,u);for(let t=0;t<A.length;t+=1)A[t]&&A[t].m(n,null);D(n,d),D(n,p),V&&V.m(p,null),D(n,g),j&&j.m(n,null),D(n,h),D(n,m),D(n,$),P&&P.m(n,null),t[69](n),w||(x=B(m,"input",t[67]),w=!0)},p(t,e){if(1024&e[0]&&K(r,"height",re(t[10].height)),1024&e[0]&&K(r,"border-radius",re(t[10].borderRadius)),1024&e[0]&&K(r,"background",t[10].background),1024&e[0]&&K(r,"box-shadow",t[10].boxShadow||""),8388608&e[0]&&K(a,"left",(100*t[23]).toFixed(2)+"%"),16777216&e[0]&&K(a,"width",(100*t[24]).toFixed(2)+"%"),2048&e[0]&&K(a,"height",re(t[11].height)),2048&e[0]&&K(a,"border-radius",re(t[11].borderRadius)),2048&e[0]&&K(a,"background",t[11].background),2048&e[0]&&K(a,"box-shadow",t[11].boxShadow||""),131072&e[0]){let r;for(k=Nt(t[17]),r=0;r<k.length;r+=1){const i=Jo(t,k,r);E[r]?E[r].p(i,e):(E[r]=Bo(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=Nt(t[18]),r=0;r<C.length;r+=1){const i=zo(t,C,r);A[r]?A[r].p(i,e):(A[r]=Lo(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]?V?V.p(t,e):(V=Uo(t),V.c(),V.m(p,null)):V&&(V.d(1),V=null),256&e[0]&&K(p,"border-radius",re(t[8].borderRadius)),256&e[0]&&K(p,"background",t[8].background),256&e[0]&&K(p,"box-shadow",t[8].boxShadow||""),t[37]&&j.p(t,e),65536&e[0]&&v!==(v=t[16]?"".concat(Eo.slider__input," ").concat(Eo.slider__input_secondary):Eo.slider__input)&&L(m,"class",v),16&e[0]&&L(m,"min",t[4]),32&e[0]&&L(m,"max",t[5]),65728&e[0]&&y!==(y=t[16]?t[7]:t[6])&&(m.value=y),524288&e[0]&&L(m,"aria-label",t[19]),t[37]&&P.p(t,e)},d(n){n&&O(e),I(E,n),I(A,n),V&&V.d(),j&&j.d(),P&&P.d(),t[69](null),w=!1,x()}}}function qo(t){let e,n,r,i,o=!t[14]&&Ro(t);return{c(){o&&o.c(),e=R()},m(a,s){o&&o.m(a,s),N(a,e,s),n=!0,r||(i=B(window,"resize",t[42]),r=!0)},p(t,n){t[14]?o&&(Vt(),Dt(o,1,1,(()=>{o=null})),jt()):o?(o.p(t,n),16384&n[0]&&Pt(o,1)):(o=Ro(t),o.c(),Pt(o,1),o.m(e.parentNode,e))},i(t){n||(Pt(o),n=!0)},o(t){Dt(o),n=!1},d(t){t&&O(e),o&&o.d(t),r=!1,i()}}}function Go(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 Ko(t,e,r){let i,o,a,s,l,c,u,d,g,h,m,v,y,$,b,_,w,x,k,E,C,A,V,j,P,D,F,S,N,O,I,M,T,z,J=n,R=n,B=n,L=n,U=n,W=n,H=n,q=n,G=n,K=n,X=n,Y=n;var Z,Q,tt,et;t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>U())),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:nt={}}=e,{templateContext:rt}=e,{origJson:it}=e,{layoutParams:at}=e;const st={width:10,height:10,borderRadius:5,background:"#000"},ct=["rounded_rectangle","circle"],ut=["rounded_rectangle"],pt=lt(Zt),ft=lt(Te);let gt,ht=!1,mt=0,vt=100;const yt=nt.thumb_value_variable,$t=nt.thumb_secondary_value_variable;let bt=yt&&pt.getVariable(yt,"integer")||To("temp","integer",0);f(t,bt,(t=>r(64,M=t)));let _t=$t&&pt.getVariable($t,"integer")||To("temp","integer",0);f(t,_t,(t=>r(63,I=t)));let wt,xt,kt,Et=Ao(M||0,mt,vt),Ct=Ao(I||0,mt,vt),At=st,Vt=At,jt=st,Pt=st,Dt=null,Ft=null,St=kt,Nt="",Ot="",It=!1;function Mt(t,e){const n=Number(t.target.value);ht===("first"===e)?(r(7,Ct=n),_t.setValue(n)):(r(6,Et=n),bt.setValue(n))}let Tt=!1;function zt(){if(!gt)return;const t=vt-mt,e=(null==Dt?void 0:Dt.width)||0,n=(null==Ft?void 0:Ft.width)||0;Math.max(e,n)*t>=(null==gt?void 0:gt.clientWidth)?Tt||(pt.logError(Qt(new Error("Slider ticks overlap each other"),{level:"warn"})),Tt=!0):Tt=!1}const Jt=Rr(zt,50);return ot((()=>{zt()})),t.$$set=t=>{"json"in t&&r(0,nt=t.json),"templateContext"in t&&r(1,rt=t.templateContext),"origJson"in t&&r(2,it=t.origJson),"layoutParams"in t&&r(3,at=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(36,i=pt.getDerivedFromVars(nt.min_value)),Y(),Y=p(i,(t=>r(66,z=t)))),1&t.$$.dirty[0]&&(r(35,o=pt.getDerivedFromVars(nt.max_value)),X(),X=p(o,(t=>r(65,T=t)))),48&t.$$.dirty[0]|24&t.$$.dirty[2]&&(r(4,mt=Se(z,mt)),r(5,vt=Se(T,vt)),zt()),112&t.$$.dirty[0]|4&t.$$.dirty[2]){const t=Ao(M||0,mt,vt);t!==Et&&r(6,Et=t)}if(176&t.$$.dirty[0]|2&t.$$.dirty[2]){const t=Ao(I||0,mt,vt);t!==Ct&&r(7,Ct=t)}if(1&t.$$.dirty[0]&&(r(34,a=pt.getDerivedFromVars(nt.thumb_style)),K(),K=p(a,(t=>r(62,O=t)))),256&t.$$.dirty[0]|1&t.$$.dirty[2]&&r(8,At=Ln(O,ct,At)),1&t.$$.dirty[0]&&(r(33,s=pt.getDerivedFromVars(nt.thumb_secondary_style)),G(),G=p(s,(t=>r(61,N=t)))),256&t.$$.dirty[0]|1073741824&t.$$.dirty[1]&&r(9,Vt=Ln(N,ct,At)),1&t.$$.dirty[0]&&(r(32,l=pt.getDerivedFromVars(nt.track_inactive_style)),q(),q=p(l,(t=>r(60,S=t)))),1024&t.$$.dirty[0]|536870912&t.$$.dirty[1]&&r(10,jt=Ln(S,ut,jt)),1&t.$$.dirty[0]&&(r(31,c=pt.getDerivedFromVars(nt.track_active_style)),H(),H=p(c,(t=>r(59,F=t)))),2048&t.$$.dirty[0]|268435456&t.$$.dirty[1]&&r(11,Pt=Ln(F,ut,Pt)),1&t.$$.dirty[0]&&(r(30,u=pt.getDerivedFromVars(nt.tick_mark_active_style)),W(),W=p(u,(t=>r(58,D=t)))),134217728&t.$$.dirty[1]){let t=Ln(D,ct,st);t!==st&&r(47,Dt=t)}if(240&t.$$.dirty[0]|65536&t.$$.dirty[1]&&(Dt?(r(17,wt=$t?Go(Math.min(Et,Ct),Math.max(Et,Ct)+1,mt,vt,!0):Go(mt,Et,mt,vt,!0)),zt()):r(17,wt=[])),1&t.$$.dirty[0]&&(r(29,d=pt.getDerivedFromVars(nt.tick_mark_inactive_style)),U(),U=p(d,(t=>r(57,P=t)))),67108864&t.$$.dirty[1]){let t=Ln(P,ct,st);t!==st&&r(48,Ft=t)}if(240&t.$$.dirty[0]|131072&t.$$.dirty[1]&&(Ft?(r(18,xt=$t?Go(Math.min(Et,Ct),Math.max(Et,Ct)+1,mt,vt,!1):Go(Et+1,vt+1,mt,vt,!0)),zt()):r(18,xt=[])),1&t.$$.dirty[0]&&(r(28,g=pt.getDerivedFromVars(nt.thumb_text_style)),L(),L=p(g,(t=>r(56,j=t)))),4096&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(12,kt=Co(j,kt)),1&t.$$.dirty[0]&&(r(27,h=pt.getDerivedFromVars(nt.thumb_secondary_text_style)),B(),B=p(h,(t=>r(55,V=t)))),4096&t.$$.dirty[0]|16777216&t.$$.dirty[1]&&r(13,St=Co(V,kt)),1&t.$$.dirty[0]&&(r(26,m=pt.getDerivedFromVars(nt.accessibility)),R(),R=p(m,(t=>r(54,A=t)))),8388608&t.$$.dirty[1]&&((null==A?void 0:A.description)?r(19,Nt=A.description):pt.logError(Qt(new Error('Missing accessibility "description" for slider'),{level:"warn"}))),1&t.$$.dirty[0]&&(r(25,v=pt.getDerivedFromVars(nt.secondary_value_accessibility)),J(),J=p(v,(t=>r(53,C=t)))),4194304&t.$$.dirty[1]&&((null==C?void 0:C.description)?r(20,Ot=C.description):$t&&pt.logError(Qt(new Error('Missing second accessibility "description" for slider'),{level:"warn"}))),19712&t.$$.dirty[0]){let t=!1;ft.hasAction()?(pt.logError(Qt(new Error('Cannot show "slider" inside component with action'))),t=!0):At===st?(pt.logError(Qt(new Error('Missing "thumb_style" in slider'))),t=!0):Pt===st?(pt.logError(Qt(new Error('Missing "track_active_style" in slider'))),t=!0):jt===st&&(pt.logError(Qt(new Error('Missing "track_inactive_style" in slider'))),t=!0),t!==It&&r(14,It=t)}768&t.$$.dirty[0]&&r(52,y=re(Math.max(...[At.width,Vt.width,0].filter(Ce)))),768&t.$$.dirty[0]&&r(51,$=re(Math.max(...[At.height,Vt.height,0].filter(Ce)))),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":re(At.width),"--divkit-slider-thumb-height":re(At.height),"--divkit-slider-thumb-secondary-width":re(Vt.width),"--divkit-slider-thumb-secondary-height":re(Vt.height),"--divkit-slider-text-offset-x":(null===r(43,Z=null==kt?void 0:kt.offset)||void 0===Z?void 0:Z.x)?ie(kt.offset.x):void 0,"--divkit-slider-text-offset-y":(null===r(44,Q=null==kt?void 0:kt.offset)||void 0===Q?void 0:Q.y)?ie(kt.offset.y):void 0,"--divkit-slider-text-secondary-offset-x":(null===r(45,tt=null==St?void 0:St.offset)||void 0===tt?void 0:tt.x)?ie(St.offset.x):void 0,"--divkit-slider-text-secondary-offset-y":(null===r(46,et=null==St?void 0:St.offset)||void 0===et?void 0:et.y)?ie(St.offset.y):void 0,"--divkit-slider-tick-active-width":Dt?re(Dt.width):void 0,"--divkit-slider-tick-active-height":Dt?re(Dt.height):void 0,"--divkit-slider-tick-active-border-radius":Dt?re(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":Ft?re(Ft.width):void 0,"--divkit-slider-tick-inactive-height":Ft?re(Ft.height):void 0,"--divkit-slider-tick-inactive-border-radius":Ft?re(Ft.borderRadius):void 0,"--divkit-slider-tick-inactive-background":(null==Ft?void 0:Ft.background)||void 0,"--divkit-slider-tick-inactive-box-shadow":(null==Ft?void 0:Ft.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={}),[nt,rt,it,at,mt,vt,Et,Ct,At,Vt,jt,Pt,kt,St,It,gt,ht,wt,xt,Nt,Ot,E,k,x,w,v,m,h,g,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=gt.getBoundingClientRect(),a=(i-o.left)/o.width,s=(vt-mt)*a,l=Math.round(Ao(s,mt,vt));r(16,ht=l<(Et+Ct)/2==Et<Ct)},Mt,Jt,Z,Q,tt,et,Dt,Ft,_,b,$,y,C,A,V,j,P,D,F,S,N,O,I,M,T,z,t=>Mt(t,"first"),t=>Mt(t,"second"),function(t){dt[t?"unshift":"push"]((()=>{gt=t,r(15,gt)}))}]}const Xo={input:"divkit-c3a4c","input_alignment-horizontal_center":"divkit-fc52a","input_alignment-horizontal_right":"divkit-e8038",input__input:"divkit-f11e0",input__placeholder:"divkit-b7593","input_alignment-vertical_top":"divkit-bdccd","input_alignment-vertical_bottom":"divkit-fc670","input_alignment-vertical_baseline":"divkit-dd6af","input_highlight-color":"divkit-cc00f",input__input_singleline:"divkit-ffd1e","input__scroll-wrapper":"divkit-ad8a3",input__input_multiline:"divkit-f61f0","input__input_has-custom-focus":"divkit-e6b50"};function Yo(t,e){if(t===e)return{start:t.length,added:0,removed:0};if(t.length>e.length){const n=Yo(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 Zo(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 Qo{constructor(t){this.char=t}}class ta{constructor(t,e,n){this.char=t,this.filter=e,this.placeholder=n}}class ea{constructor(t){Zo(this,"filters",new Map),Zo(this,"destructedValue",[]),Zo(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 Qo)t+=n.char;else if(n instanceof ta)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 ta&&!t.char));return-1!==t?t:this.destructedValue.length}updateMaskData(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=this.maskData!==t&&e?this.rawValue:null;this.filters=new Map,this.maskData=t,this.maskData.decoding.forEach((t=>{if(t.filter)try{const e=new RegExp(t.filter);this.filters.set(t.key,e)}catch(e){this.onException(Qt(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 ta(null,this.filters.get(e.key),e.placeholder):new Qo(t)})),null!==n&&this.overrideRawValue(n)}overrideRawValue(t){this.clearRange(0,this.destructedValue.length),this.replaceChars(t,0),this.cursorPos=Math.min(this.cursorPos,this.value.length)}applyChangeFrom(t,e){const n=Yo(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=i?this.calculateMaxShift(i,o):void 0;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 ta&&++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 ta&&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 ta&&(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 ta);)++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 ta&&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 ta&&(t.char=e,++o),++i}}firstHolderAfter(t){let e=t;for(;e<this.destructedValue.length&&!(this.destructedValue[e]instanceof ta);)++e;return e}}class na extends ea{constructor(t,e){super(t),this.logError=e}onException(t){this.logError(t)}}function ra(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 ia extends ea{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=arguments.length>1?arguments[1]:void 0;super({pattern:"",decoding:[],alwaysVisible:!1}),ra(this,"currencyFormatter",new Intl.NumberFormat),ra(this,"decimalSeparator","."),ra(this,"localeDigits",{}),ra(this,"trimZeroRegExp",new RegExp("")),this.logError=e,this.initFormatter(t)}updateCurrencyParams(t){const e=this.parseFormat(this.rawValue)||0;this.initFormatter(t);const n=e.toString().replace(".",this.decimalSeparator);this.applyChangeFrom(n)}initFormatter(t){try{this.currencyFormatter=new Intl.NumberFormat(t,{minimumFractionDigits:2,maximumFractionDigits:2}),this.decimalSeparator=this.currencyFormatter.format(0)[1],this.localeDigits=new Array(10).fill("").reduce(((t,e,n)=>(t[n]=this.currencyFormatter.format(n)[0],t)),{}),this.trimZeroRegExp=new RegExp("^".concat(this.localeDigits[0],"+"))}catch(e){this.onException(Qt(e,{level:"error",additional:{locale:t}}))}}invalidateMaskDataForFormatted(t){const e=this.currencyFormatter.format(t),n=this.formatPattern(e),r=[{key:"#",filter:"[".concat([...Object.values(this.localeDigits)].join(""),"]"),placeholder:this.localeDigits[0]},{key:this.decimalSeparator,filter:"[".concat(this.decimalSeparator,"]"),placeholder:this.decimalSeparator}];this.updateMaskData({pattern:n,decoding:r,alwaysVisible:this.maskData.alwaysVisible},!1)}overrideRawValue(t){const e=this.parseFormat(t)||0;this.invalidateMaskDataForFormatted(e),super.overrideRawValue(t)}applyChangeFrom(t,e){const n=Yo(this.value,t),r=this.value.lastIndexOf(this.decimalSeparator),i=t.lastIndexOf(this.decimalSeparator),o=r!==i||-1===r&&-1===i,a=this.validFormat(t,n);this.cleanup(n);const s=this.parseFormat(a)||0;o&&this.invalidateMaskDataForFormatted(s),this.replaceChars(a,0),this.value.length>n.start&&!this.isDigit(this.value[n.start])?this.cursorPos=null!=e?e:this.cursorPosition:this.cursorPos=Math.abs(this.value.length-(t.length-(null!=e?e:this.cursorPosition)))}parseFormat(t){return parseFloat(t.replace(/./g,(t=>this.localeDigits[t]||(t===this.decimalSeparator?".":""))))}formatPattern(t){let e="";for(const n of t)e+=this.isDigit(n)?"#":n;return e}validFormat(t,e){if(!t)return"";let n=-1,r=0;for(;r<t.length;){if(t[r]===this.decimalSeparator&&!this.inDiff(e,r)){n=r;break}r++}let i=-1;1===e.added&&0===e.removed&&[",","."].includes(t[e.start])&&(i=e.start);const o=this.currencyFormatter.resolvedOptions().maximumFractionDigits;let a=o;if(-1!==n)for(r=n;r<t.length;)this.isDigit(t[r])&&!this.inDiff(e,r)&&a--,r++;else{let n=!1;for(let r=0;r<t.length;r++){const i=t[r];i===this.decimalSeparator?n=!0:!this.inDiff(e,r)&&n&&this.isDigit(i)&&a--}}const s=t.includes(this.decimalSeparator)||-1!==i,l=[];r=t.length-1;let c=!1;for(;r>=0;){const u=t[r],d=l.length<=o;this.isDigit(u)?this.inDiff(e,r)&&!c&&s?a>0&&(l.push(u),a--):l.push(u):d&&-1===n&&r===i?(l.push(this.decimalSeparator),c=!0):!d||u!==this.decimalSeparator||n!==r&&-1!==n||(l.push(this.decimalSeparator),c=!0,n=r),r--}return l.reverse().join("").replace(this.trimZeroRegExp,"")}inDiff(t,e){return t.start<=e&&e<t.start+t.added}isDigit(t){return Boolean(this.localeDigits[t])}onException(t){this.logError(t)}}const oa=3;function aa(t){const e=t.textContent;let n=0;return"string"==typeof e&&(n+=e.length,t instanceof HTMLElement&&("DIV"===t.tagName||"BR"===t.tagName)&&++n),n}function sa(t,e){if(t.nodeType!==oa)if(t instanceof HTMLElement&&"BR"===t.tagName)try{const e=window.getSelection();if(e){e.removeAllRanges();const n=document.createRange(),r=t.parentNode,i=Array.from(r.childNodes).indexOf(t)+1;n.setStart(r,i),n.setEnd(r,i),e.addRange(n)}}catch(t){}else for(let n=0,r=t.childNodes.length;n<r;++n){const r=t.childNodes[n],i=aa(r);if(e<=i)return void sa(r,e);e-=i}else try{const n=window.getSelection();if(n){n.removeAllRanges();const r=document.createRange();r.setStart(t,e),r.setEnd(t,e),n.addRange(r)}}catch(t){}}function la(t){let e,n;return e=new dn({props:{cls:we("input",Xo,t[15]),style:t[14],customDescription:!0,customActions:"input",customPaddings:!0,json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[pa,t=>{let{focusHandler:e,blurHandler:n,hasCustomFocus:r}=t;return{89:e,90:n,91:r}},t=>{let{focusHandler:e,blurHandler:n,hasCustomFocus:r}=t;return[0,0,(e?134217728:0)|(n?268435456:0)|(r?536870912:0)]}]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};32768&n[0]&&(r.cls=we("input",Xo,t[15])),16384&n[0]&&(r.style=t[14]),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]),802672&n[0]|2013265920&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function ca(t){let e,n,r,i,o;return{c(){e=M("input"),L(e,"type",t[9]),L(e,"inputmode",t[10]),L(e,"class",n=we("input__input",Xo,{"has-custom-focus":t[91],singleline:!0})),L(e,"autocomplete","off"),L(e,"autocapitalize","off"),L(e,"aria-label",t[11]),L(e,"style",r=ne(t[13])),L(e,"placeholder",t[18]),e.value=t[4]},m(n,r){N(n,e,r),t[76](e),i||(o=[B(e,"input",t[37]),B(e,"mousedown",(function(){l(t[19]?t[38]:void 0)&&(t[19]?t[38]:void 0).apply(this,arguments)})),B(e,"click",(function(){l(t[19]?t[39]:void 0)&&(t[19]?t[39]:void 0).apply(this,arguments)})),B(e,"focus",(function(){l(t[89])&&t[89].apply(this,arguments)})),B(e,"blur",(function(){l(t[90])&&t[90].apply(this,arguments)}))],i=!0)},p(i,o){t=i,512&o[0]&&L(e,"type",t[9]),1024&o[0]&&L(e,"inputmode",t[10]),536870912&o[2]&&n!==(n=we("input__input",Xo,{"has-custom-focus":t[91],singleline:!0}))&&L(e,"class",n),2048&o[0]&&L(e,"aria-label",t[11]),8192&o[0]&&r!==(r=ne(t[13]))&&L(e,"style",r),262144&o[0]&&L(e,"placeholder",t[18]),16&o[0]&&e.value!==t[4]&&(e.value=t[4])},d(n){n&&O(e),t[76](null),i=!1,s(o)}}}function ua(t){let e,n,r,i,o,a,c,u,d,p,f,g,h=!t[8]&&t[18]&&da(t);return{c(){e=M("span"),h&&h.c(),n=J(),r=M("span"),i=z(""),a=J(),c=M("span"),L(r,"aria-hidden","true"),L(r,"style",o=ne(t[12])),L(c,"class",u=we("input__input",Xo,{"has-custom-focus":t[91],multiline:!0})),L(c,"autocapitalize","off"),L(c,"contenteditable","true"),L(c,"aria-label",t[11]),L(c,"style",d=ne(t[13])),void 0===t[8]&&yt((()=>t[75].call(c))),L(e,"class",p=Xo["input__scroll-wrapper"])},m(o,s){N(o,e,s),h&&h.m(e,null),D(e,n),D(e,r),D(r,i),D(e,a),D(e,c),t[74](c),void 0!==t[8]&&(c.innerText=t[8]),f||(g=[B(c,"input",t[75]),B(c,"input",t[37]),B(c,"paste",ga),B(c,"mousedown",(function(){l(t[19]?t[38]:void 0)&&(t[19]?t[38]:void 0).apply(this,arguments)})),B(c,"click",(function(){l(t[19]?t[39]:void 0)&&(t[19]?t[39]:void 0).apply(this,arguments)})),B(c,"focus",(function(){l(t[89])&&t[89].apply(this,arguments)})),B(c,"blur",(function(){l(t[90])&&t[90].apply(this,arguments)}))],f=!0)},p(i,a){!(t=i)[8]&&t[18]?h?h.p(t,a):(h=da(t),h.c(),h.m(e,n)):h&&(h.d(1),h=null),4096&a[0]&&o!==(o=ne(t[12]))&&L(r,"style",o),536870912&a[2]&&u!==(u=we("input__input",Xo,{"has-custom-focus":t[91],multiline:!0}))&&L(c,"class",u),2048&a[0]&&L(c,"aria-label",t[11]),8192&a[0]&&d!==(d=ne(t[13]))&&L(c,"style",d),256&a[0]&&t[8]!==c.innerText&&(c.innerText=t[8])},d(n){n&&O(e),h&&h.d(),t[74](null),f=!1,s(g)}}}function da(t){let e,n,r,i;return{c(){e=M("div"),n=z(t[18]),L(e,"class",r=Xo.input__placeholder),L(e,"aria-hidden","true"),L(e,"style",i=ne(t[13]))},m(t,r){N(t,e,r),D(e,n)},p(t,r){262144&r[0]&&G(n,t[18]),8192&r[0]&&i!==(i=ne(t[13]))&&L(e,"style",i)},d(t){t&&O(e)}}}function pa(t){let e;function n(t,e){return t[5]?ua:ca}let r=n(t),i=r(t);return{c(){i.c(),e=R()},m(t,n){i.m(t,n),N(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){t&&O(e),i.d(t)}}}function fa(t){let e,n,r=!t[7]&&la(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[7]?r&&(Vt(),Dt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),128&n[0]&&Pt(r,1)):(r=la(t),r.c(),Pt(r,1),r.m(e.parentNode,e))},i(t){n||(Pt(r),n=!0)},o(t){Dt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function ga(t){if(t.preventDefault(),t.clipboardData){let e=t.clipboardData.getData("text/plain");e=e.trim(),document.execCommand("inserttext",!1,e)}}function ha(t,e,r){let i,o,a,s,l,c,u,d,g,h,m,v,y,b,_,w,x,k,E,C,A,V,j,P,D,F,S,N=n,O=n;var I;t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>O()));let{json:M={}}=e,{templateContext:T}=e,{origJson:z}=e,{layoutParams:J}=e;const R=lt(Zt);let B,L=!1,U=null;const W=M.text_variable,H=null===(I=M.mask)||void 0===I?void 0:I.raw_text_variable;let q=!1;W||(q=!0,R.logError(Qt(new Error('Missing "text_variable" in "input"'))));let G=W&&R.getVariable(W,"string")||To("temp","string","");f(t,G,(t=>r(56,g=t)));let K=H&&R.getVariable(H,"string")||To("temp","string","");f(t,K,(t=>r(57,h=t)));let X="",Y="";const Z=R.getDerivedFromVars(M.mask);f(t,Z,(t=>r(61,b=t)));const Q=R.getDerivedFromVars(M.hint_text);f(t,Q,(t=>r(73,F=t)));const tt=R.getDerivedFromVars(M.hint_color);f(t,tt,(t=>r(72,D=t)));let et="";const nt=R.getDerivedFromVars(M.font_size);f(t,nt,(t=>r(71,P=t)));let rt=12;const it=R.getDerivedFromVars(M.font_weight);f(t,it,(t=>r(70,j=t)));const at=R.getDerivedFromVars(M.font_family);let st;f(t,at,(t=>r(69,V=t)));let ct="";const ut=R.getDerivedFromVars(M.line_height);let pt;f(t,ut,(t=>r(68,A=t)));const ft=R.getDerivedFromVars(M.letter_spacing);f(t,ft,(t=>r(67,C=t)));let gt="";const ht=R.getDerivedFromVars(M.text_color);f(t,ht,(t=>r(66,E=t)));let mt="#000";const yt=R.getDerivedFromVars(M.highlight_color);f(t,yt,(t=>r(65,k=t)));let $t="";const bt=R.getDerivedFromVars(M.text_alignment_horizontal);f(t,bt,(t=>r(64,x=t)));let _t="left";const wt=R.getDerivedFromVars(M.text_alignment_vertical);f(t,wt,(t=>r(63,w=t)));let xt="center";const kt=R.getDerivedFromVars(M.keyboard_type);f(t,kt,(t=>r(62,_=t)));const Et={email:"email",number:"number",phone:"tel",single_line_text:"text",multi_line_text:"text",uri:"url"};let Ct="multi_line_text",At="text";const Vt="undefined"!=typeof document&&"inputMode"in document.createElement("input");let jt;const Pt=R.getDerivedFromVars(M.max_visible_lines);f(t,Pt,(t=>r(60,y=t)));let Dt="",Ft=null,St="",Nt="",Ot="";const It=R.getDerivedFromVars(M.select_all_on_focus);function Mt(t){B instanceof HTMLInputElement?r(6,B.selectionStart=r(6,B.selectionEnd=t,B),B):sa(B,t)}async function Tt(){if(!B||!U)return;U.overrideRawValue(h),K.set(U.rawValue),$(G,g=r(4,X=r(8,Y=U.value)),g);const t=U.cursorPosition;await vt(),document.activeElement===B&&Mt(t)}return f(t,It,(t=>r(19,S=t))),ot((()=>{B&&U&&h&&(U.overrideRawValue(h),$(G,g=r(4,X=r(8,Y=U.value)),g))})),t.$$set=t=>{"json"in t&&r(0,M=t.json),"templateContext"in t&&r(1,T=t.templateContext),"origJson"in t&&r(2,z=t.origJson),"layoutParams"in t&&r(3,J=t.layoutParams)},t.$$.update=()=>{if(1073741824&t.$$.dirty[1]&&("fixed_length"===(null==(e=b)?void 0:e.type)?r(40,U=function(t,e,n){if("string"==typeof t.pattern&&Array.isArray(t.pattern_elements)&&t.pattern_elements.every((t=>t.key&&"string"==typeof t.key))){const r={pattern:t.pattern,alwaysVisible:Boolean(t.always_visible),decoding:t.pattern_elements.map((t=>({key:t.key,filter:t.regex&&"string"==typeof t.regex?t.regex:void 0,placeholder:t.placeholder&&"string"==typeof t.placeholder?t.placeholder:"_"})))};return n?(n.updateMaskData(r),n):new na(r,e)}return n||null}(e,R.logError,U)):"currency"===(null==e?void 0:e.type)&&r(40,U=function(t,e,n){return n?(n.updateCurrencyParams(t.locale),n):new ia(t.locale,e)}(e,R.logError,U)),U&&Tt()),16&t.$$.dirty[0]|33554944&t.$$.dirty[1]&&(U||X===g||r(4,X=r(8,Y=g))),67109376&t.$$.dirty[1]&&U&&U.rawValue!==h&&Tt(),2048&t.$$.dirty[2]&&r(18,i=F),1024&t.$$.dirty[1]|1024&t.$$.dirty[2]&&r(41,et=ae(D,1,et)),2048&t.$$.dirty[1]|512&t.$$.dirty[2]&&r(42,rt=fn(P,rt)),4096&t.$$.dirty[1]|384&t.$$.dirty[2]&&(r(43,st=hn(j,st)),r(44,ct=V&&"string"==typeof V?R.typefaceProvider(V,{fontWeight:st||400}):"")),2048&t.$$.dirty[1]|64&t.$$.dirty[2]){const t=A;He(t)&&r(45,pt=t/rt)}var e;32&t.$$.dirty[2]&&Ee(C)&&r(46,gt=re(C)),65536&t.$$.dirty[1]|16&t.$$.dirty[2]&&r(47,mt=ae(E,1,mt)),131072&t.$$.dirty[1]|8&t.$$.dirty[2]&&r(48,$t=ae(k,1,$t)),262144&t.$$.dirty[1]|4&t.$$.dirty[2]&&r(49,_t=_n(x,_t)),524288&t.$$.dirty[1]|2&t.$$.dirty[2]&&r(50,xt=wn(w,xt)),1073741824&t.$$.dirty[1]|1&t.$$.dirty[2]&&(_&&_ in Et&&(r(9,At=Et[_]),r(51,Ct=_)),"currency"===(null==b?void 0:b.type)&&(r(9,At=Vt?"text":"tel"),r(10,jt="decimal"))),1048576&t.$$.dirty[1]&&r(5,o="multi_line_text"===Ct),1&t.$$.dirty[0]&&(r(17,a=R.getDerivedFromVars(M.paddings)),O(),O=p(a,(t=>r(59,v=t)))),809519104&t.$$.dirty[1]&&(He(y)&&r(52,Dt="calc(".concat(y*(pt||1.25)*(rt/10)+"em"," + ").concat(ie(Ve(null==v?void 0:v.top,0)+Ve(null==v?void 0:v.bottom,0)),")")),r(53,Ft=Oe(v||void 0,Ft)),r(54,St=Ft?ke({top:(Number(Ft.top)||0)/rt*10,right:(Number(Ft.right)||0)/rt*10,bottom:(Number(Ft.bottom)||0)/rt*10,left:(Number(Ft.left)||0)/rt*10}):""),r(55,Nt=Ft?ke({top:(Number(Ft.top)||0)/rt*10,bottom:(Number(Ft.bottom)||0)/rt*10}):"")),1&t.$$.dirty[0]&&(r(16,s=R.getDerivedFromVars(M.accessibility)),N(),N=p(s,(t=>r(58,m=t)))),134217728&t.$$.dirty[1]&&((null==m?void 0:m.description)?r(11,Ot=m.description):R.logError(Qt(new Error('Missing accessibility "description" for input'),{level:"warn"}))),32&t.$$.dirty[0]|917504&t.$$.dirty[1]&&r(15,l={"highlight-color":Boolean($t),multiline:o,"alignment-horizontal":_t,"alignment-vertical":xt}),2356224&t.$$.dirty[1]&&r(14,c={"--divkit-input-hint-color":et,"--divkit-input-highlight-color":$t,"--divkit-input-line-height":pt,"font-weight":st,"font-family":ct,"letter-spacing":gt,color:mt,"max-height":Dt}),8390656&t.$$.dirty[1]&&r(13,u={"font-size":re(rt),padding:St}),16779264&t.$$.dirty[1]&&r(12,d={"font-size":re(rt),padding:Nt})},[M,T,z,J,X,o,B,q,Y,At,jt,Ot,d,u,c,l,s,a,i,S,G,K,Z,Q,tt,nt,it,at,ut,ft,ht,yt,bt,wt,kt,Pt,It,function(t){let e=(o?t.target.innerText:t.target.value)||"";"\n"===e&&(e=""),X!==e&&(r(4,X=r(8,Y=e)),G.setValue(e),U&&async function(){if(!B||!U)return;U.applyChangeFrom(X,B instanceof HTMLInputElement?null===B.selectionEnd?void 0:B.selectionEnd:function(t){try{let n=0;const r=window.getSelection();if(!r)return 0;const i=r.getRangeAt(0);let o;if(i){if(!i.collapsed)return 0;n+=i.endOffset,o=i.endContainer}if(o instanceof HTMLElement){let t=0;for(let e=0,r=Math.min(n,o.childNodes.length);e<r;++e)t+=aa(o.childNodes[e]);n=t}for(;o&&o!==t;){var e;const t=o.parentNode;if(!t)return 0;const r=Array.from(t.childNodes).indexOf(o);for(let e=0;e<r;++e)n+=aa(t.childNodes[e]);o instanceof HTMLElement&&("DIV"===o.tagName&&(null===(e=t.childNodes[r-1])||void 0===e?void 0:e.nodeType)===oa||"BR"===o.tagName)&&++n,o=t}return n}catch(t){return 0}}(B)),K.set(U.rawValue),$(G,g=r(4,X=r(8,Y=U.value)),g);const t=U.cursorPosition;await vt(),document.activeElement===B&&Mt(t)}())},function(){L=!1,setTimeout((()=>{L=!0}),250)},function(){if(!L)if(B instanceof HTMLInputElement)B.select();else{const t=window.getSelection(),e=document.createRange();e.selectNodeContents(B),t&&(t.removeAllRanges(),t.addRange(e))}},U,et,rt,st,ct,pt,gt,mt,$t,_t,xt,Ct,Dt,Ft,St,Nt,g,h,m,v,y,b,_,w,x,k,E,C,A,V,j,P,D,F,function(t){dt[t?"unshift":"push"]((()=>{B=t,r(6,B)}))},function(){Y=this.innerText,r(8,Y),r(40,U),r(4,X),r(56,g)},function(t){dt[t?"unshift":"push"]((()=>{B=t,r(6,B)}))}]}const ma={select:"divkit-feef3","select__select-text":"divkit-cd862",select_hint:"divkit-a3cf6",select__select:"divkit-bdb72","select__select_has-custom-focused":"divkit-a46ad","has-custom-focused":"divkit-fc5dc",select__option:"divkit-e774b"};function va(t,e,n){const r=t.slice();return r[52]=e[n],r}function ya(t){let e,n;return e=new dn({props:{cls:we("select",ma,t[11]),style:t[10],customDescription:!0,customActions:"select",customPaddings:!0,json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[ba,t=>{let{hasCustomFocus:e,focusHandler:n,blurHandler:r}=t;return{49:e,50:n,51:r}},t=>{let{hasCustomFocus:e,focusHandler:n,blurHandler:r}=t;return[0,(e?262144:0)|(n?524288:0)|(r?1048576:0)]}]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};2048&n[0]&&(r.cls=we("select",ma,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]),9136&n[0]|18612224&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function $a(t){let e,r,i,o,a=(t[52].text||t[52].value)+"";return{c(){var n,s;e=M("option"),r=z(a),L(e,"class",i=ma.select__option),e.__value=o=t[52].value,n=e,s=e.__value,n.value=null==s?"":s},m(t,n){N(t,e,n),D(e,r)},p:n,d(t){t&&O(e)}}}function ba(t){let e,n,r,i,o,a,c,u,d,p,f=(t[4]||t[13]||"")+"",g=Nt(t[16]),h=[];for(let e=0;e<g.length;e+=1)h[e]=$a(va(t,g,e));return{c(){e=M("span"),n=z(f),o=J(),a=M("select");for(let t=0;t<h.length;t+=1)h[t].c();L(e,"class",r=ma["select__select-text"]),L(e,"style",i=ne(t[9])),L(e,"aria-hidden","true"),L(a,"class",c=we("select__select",ma,{"has-custom-focus":t[49]})),L(a,"aria-label",t[7]),L(a,"style",u=ne(t[8])),void 0===t[5]&&yt((()=>t[44].call(a)))},m(r,i){N(r,e,i),D(e,n),N(r,o,i),N(r,a,i);for(let t=0;t<h.length;t+=1)h[t]&&h[t].m(a,null);X(a,t[5],!0),d||(p=[B(a,"change",t[44]),B(a,"focus",(function(){l(t[50])&&t[50].apply(this,arguments)})),B(a,"blur",(function(){l(t[51])&&t[51].apply(this,arguments)}))],d=!0)},p(r,o){if(t=r,8208&o[0]&&f!==(f=(t[4]||t[13]||"")+"")&&G(n,f),512&o[0]&&i!==(i=ne(t[9]))&&L(e,"style",i),65536&o[0]){let e;for(g=Nt(t[16]),e=0;e<g.length;e+=1){const n=va(t,g,e);h[e]?h[e].p(n,o):(h[e]=$a(n),h[e].c(),h[e].m(a,null))}for(;e<h.length;e+=1)h[e].d(1);h.length=g.length}262144&o[1]&&c!==(c=we("select__select",ma,{"has-custom-focus":t[49]}))&&L(a,"class",c),128&o[0]&&L(a,"aria-label",t[7]),256&o[0]&&u!==(u=ne(t[8]))&&L(a,"style",u),65568&o[0]&&X(a,t[5])},d(t){t&&(O(e),O(o),O(a)),I(h,t),d=!1,s(p)}}}function _a(t){let e,n,r=!t[6]&&ya(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[6]?r&&(Vt(),Dt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),64&n[0]&&Pt(r,1)):(r=ya(t),r.c(),Pt(r,1),r.m(e.parentNode,e))},i(t){n||(Pt(r),n=!0)},o(t){Dt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function wa(t,e,r){let i,o,a,s,l,c,u,d,g,h,m,v,y,$,b,_,w,x,k=n,E=n;t.$$.on_destroy.push((()=>k())),t.$$.on_destroy.push((()=>E()));let{json:C={}}=e,{templateContext:A}=e,{origJson:V}=e,{layoutParams:j}=e;const P=lt(Zt),D=C.value_variable;let F=!1;D||(F=!0,P.logError(Qt(new Error('Missing "value_variable" in "select"'))));let S=D&&P.getVariable(D,"string")||To("temp","string","");f(t,S,(t=>r(5,x=t)));let N="";const O=C.options,I=Array.isArray(O)&&O.filter((t=>"string"==typeof t.value))||[];Array.isArray(I)&&I.length||P.logError(Qt(new Error('Empty selection "items" in "select"')));let M="",T=null,z="";const J=P.getDerivedFromVars(C.hint_text);f(t,J,(t=>r(42,_=t)));const R=P.getDerivedFromVars(C.hint_color);f(t,R,(t=>r(41,b=t)));let B="rgba(0,0,0,.45)";const L=P.getDerivedFromVars(C.font_size);f(t,L,(t=>r(40,$=t)));let U=12;const W=P.getDerivedFromVars(C.font_weight);f(t,W,(t=>r(39,y=t)));const H=P.getDerivedFromVars(C.font_family);let q;f(t,H,(t=>r(38,v=t)));let G="";const K=P.getDerivedFromVars(C.line_height);let X;f(t,K,(t=>r(37,m=t)));const Y=P.getDerivedFromVars(C.letter_spacing);f(t,Y,(t=>r(36,h=t)));let Z="";const Q=P.getDerivedFromVars(C.text_color);f(t,Q,(t=>r(35,g=t)));let tt="#000",et="";return t.$$set=t=>{"json"in t&&r(0,C=t.json),"templateContext"in t&&r(1,A=t.templateContext),"origJson"in t&&r(2,V=t.origJson),"layoutParams"in t&&r(3,j=t.layoutParams)},t.$$.update=()=>{if(32&t.$$.dirty[0]&&(N=x),32&t.$$.dirty[0]){const t=I.find((t=>t.value===x));t?r(4,M="string"==typeof t.text?t.text:t.value):(r(4,M=""),x&&P.logError(Qt(new Error('Value from the variable was not found in the selection items for "select"'))))}if(1&t.$$.dirty[0]&&(r(14,i=P.getDerivedFromVars(C.paddings)),E(),E=p(i,(t=>r(43,w=t)))),268435456&t.$$.dirty[0]|512&t.$$.dirty[1]&&r(28,U=fn($,U)),301989888&t.$$.dirty[0]|4096&t.$$.dirty[1]&&(r(25,T=Oe(w||void 0,T)),r(26,z=T?ke({top:(Number(T.top)||0)/U*10,right:(Number(T.right)||0)/U*10,bottom:(Number(T.bottom)||0)/U*10,left:(Number(T.left)||0)/U*10}):"")),2048&t.$$.dirty[1]&&r(13,o=_),134217728&t.$$.dirty[0]|1024&t.$$.dirty[1]&&r(27,B=ae(b,1,B)),536870912&t.$$.dirty[0]|384&t.$$.dirty[1]&&(r(29,q=hn(y,q)),r(30,G=v&&"string"==typeof v?P.typefaceProvider(v,{fontWeight:q||400}):"")),268435456&t.$$.dirty[0]|64&t.$$.dirty[1]){const t=m;He(t)&&r(31,X=t/U)}268435456&t.$$.dirty[0]|32&t.$$.dirty[1]&&Ee(h)&&r(32,Z=re(h/U*10)),20&t.$$.dirty[1]&&r(33,tt=ae(g,1,tt)),1&t.$$.dirty[0]&&(r(12,a=P.getDerivedFromVars(C.accessibility)),k(),k=p(a,(t=>r(34,d=t)))),8&t.$$.dirty[1]&&((null==d?void 0:d.description)?r(7,et=d.description):P.logError(Qt(new Error('Missing accessibility "description" for select'),{level:"warn"}))),16&t.$$.dirty[0]&&r(11,s={hint:!M}),1744830464&t.$$.dirty[0]|4&t.$$.dirty[1]&&r(10,l={"--divkit-input-hint-color":B,"font-weight":q,"font-family":G,color:tt}),335544320&t.$$.dirty[0]|3&t.$$.dirty[1]&&r(9,c={padding:z,"font-size":re(U),"line-height":X,"letter-spacing":Z}),268435456&t.$$.dirty[0]|3&t.$$.dirty[1]&&r(8,u={"font-size":re(U),"line-height":X,"letter-spacing":Z})},[C,A,V,j,M,x,F,et,u,c,l,s,a,o,i,S,I,J,R,L,W,H,K,Y,Q,T,z,B,U,q,G,X,Z,tt,d,g,h,m,v,y,$,b,_,w,function(){x=function(t){const e=t.querySelector(":checked");return e&&e.__value}(this),S.set(x),r(16,I)}]}const xa={video__video:"divkit-c11f9","video__aspect-wrapper":"divkit-cfe32",video_aspect:"divkit-a4f5c"};function ka(t,e,n){const r=t.slice();return r[41]=e[n],r}function Ea(t,e,n){const r=t.slice();return r[41]=e[n],r}function Ca(t){let e,n;return e=new dn({props:{cls:we("video",xa,t[13]),customActions:"video",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Da]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};8192&n[0]&&(r.cls=we("video",xa,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]),15344&n[0]|32768&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function Aa(t){let e,n,r,i,o,a=Nt(t[4]),l=[];for(let e=0;e<a.length;e+=1)l[e]=ja(ka(t,a,e));return{c(){e=M("video");for(let t=0;t<l.length;t+=1)l[t].c();L(e,"class",n=xa.video__video),L(e,"style",r=ne(t[12])),e.playsInline=!0,e.loop=t[5],e.autoplay=t[6],e.muted=t[7],L(e,"poster",t[8])},m(n,r){N(n,e,r);for(let t=0;t<l.length;t+=1)l[t]&&l[t].m(e,null);t[36](e),i||(o=[B(e,"timeupdate",t[21]),B(e,"ended",t[22]),B(e,"playing",t[23]),B(e,"pause",t[24]),B(e,"waiting",t[25]),B(e,"error",t[26])],i=!0)},p(t,n){if(67108880&n[0]){let r;for(a=Nt(t[4]),r=0;r<a.length;r+=1){const i=ka(t,a,r);l[r]?l[r].p(i,n):(l[r]=ja(i),l[r].c(),l[r].m(e,null))}for(;r<l.length;r+=1)l[r].d(1);l.length=a.length}4096&n[0]&&r!==(r=ne(t[12]))&&L(e,"style",r),32&n[0]&&(e.loop=t[5]),64&n[0]&&(e.autoplay=t[6]),128&n[0]&&(e.muted=t[7]),256&n[0]&&L(e,"poster",t[8])},d(n){n&&O(e),I(l,n),t[36](null),i=!1,s(o)}}}function Va(t){let e,n,r,i,o,a,l,c="".concat(t[9],"%"),u=Nt(t[4]),d=[];for(let e=0;e<u.length;e+=1)d[e]=Pa(Ea(t,u,e));return{c(){e=M("div"),n=M("video");for(let t=0;t<d.length;t+=1)d[t].c();L(n,"class",r=xa.video__video),L(n,"style",i=ne(t[12])),n.playsInline=!0,n.loop=t[5],n.autoplay=t[6],n.muted=t[7],L(n,"poster",t[8]),L(e,"class",o=xa["video__aspect-wrapper"]),K(e,"padding-bottom",c)},m(r,i){N(r,e,i),D(e,n);for(let t=0;t<d.length;t+=1)d[t]&&d[t].m(n,null);t[35](n),a||(l=[B(n,"timeupdate",t[21]),B(n,"ended",t[22]),B(n,"playing",t[23]),B(n,"pause",t[24]),B(n,"waiting",t[25]),B(n,"error",t[26])],a=!0)},p(t,r){if(67108880&r[0]){let e;for(u=Nt(t[4]),e=0;e<u.length;e+=1){const i=Ea(t,u,e);d[e]?d[e].p(i,r):(d[e]=Pa(i),d[e].c(),d[e].m(n,null))}for(;e<d.length;e+=1)d[e].d(1);d.length=u.length}4096&r[0]&&i!==(i=ne(t[12]))&&L(n,"style",i),32&r[0]&&(n.loop=t[5]),64&r[0]&&(n.autoplay=t[6]),128&r[0]&&(n.muted=t[7]),256&r[0]&&L(n,"poster",t[8]),512&r[0]&&c!==(c="".concat(t[9],"%"))&&K(e,"padding-bottom",c)},d(n){n&&O(e),I(d,n),t[35](null),a=!1,s(l)}}}function ja(t){let e,n,r,i,o;return{c(){e=M("source"),u(e.src,n=t[41].src)||L(e,"src",n),L(e,"type",r=t[41].type)},m(n,r){N(n,e,r),i||(o=B(e,"error",t[26]),i=!0)},p(t,i){16&i[0]&&!u(e.src,n=t[41].src)&&L(e,"src",n),16&i[0]&&r!==(r=t[41].type)&&L(e,"type",r)},d(t){t&&O(e),i=!1,o()}}}function Pa(t){let e,n,r,i,o;return{c(){e=M("source"),u(e.src,n=t[41].src)||L(e,"src",n),L(e,"type",r=t[41].type)},m(n,r){N(n,e,r),i||(o=B(e,"error",t[26]),i=!0)},p(t,i){16&i[0]&&!u(e.src,n=t[41].src)&&L(e,"src",n),16&i[0]&&r!==(r=t[41].type)&&L(e,"type",r)},d(t){t&&O(e),i=!1,o()}}}function Da(t){let e;function n(t,e){return t[13].aspect?Va:Aa}let r=n(t),i=r(t);return{c(){i.c(),e=R()},m(t,n){i.m(t,n),N(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){t&&O(e),i.d(t)}}}function Fa(t){let e,n,r=!t[10]&&Ca(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){t[10]?r&&(Vt(),Dt(r,1,1,(()=>{r=null})),jt()):r?(r.p(t,n),1024&n[0]&&Pt(r,1)):(r=Ca(t),r.c(),Pt(r,1),r.m(e.parentNode,e))},i(t){n||(Pt(r),n=!0)},o(t){Dt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function Sa(t,e,r){let i,o,a,s,l,c,u,d,g,h,m,v=n,y=n;t.$$.on_destroy.push((()=>v())),t.$$.on_destroy.push((()=>y()));let{json:$={}}=e,{templateContext:b}=e,{origJson:_}=e,{layoutParams:w}=e;const x=lt(Zt);let k,E=!1,C=!1;const A=x.getDerivedFromVars($.video_sources);f(t,A,(t=>r(34,m=t)));let V=[];const j=x.getDerivedFromVars($.repeatable);f(t,j,(t=>r(33,h=t)));let P=!1;const D=x.getDerivedFromVars($.autostart);f(t,D,(t=>r(32,g=t)));let F=!1;const S=x.getDerivedFromVars($.muted);f(t,S,(t=>r(31,d=t)));let N=!1;const O=x.getDerivedFromVars($.preview);let I;f(t,O,(t=>r(30,u=t)));let M="fit",T="0";const z=$.elapsed_time_variable;let J=z&&x.getVariable(z,"integer")||To("temp","integer",0);return J.subscribe((t=>{C?C=!1:k&&r(11,k.currentTime=Number(t)/1e3,k)})),!$.id||E||(null==w?void 0:w.fakeElement)||x.registerInstance($.id,{pause(){null==k||k.pause()},start(){const t=null==k?void 0:k.play();t&&t.catch((t=>{x.logError(Qt(new Error("Video playing error"),{level:"error",additional:{originalText:String(t)}}))}))}}),at((()=>{!$.id||E||(null==w?void 0:w.fakeElement)||x.unregisterInstance($.id)})),t.$$set=t=>{"json"in t&&r(0,$=t.json),"templateContext"in t&&r(1,b=t.templateContext),"origJson"in t&&r(2,_=t.origJson),"layoutParams"in t&&r(3,w=t.layoutParams)},t.$$.update=()=>{var e,n;if(16&t.$$.dirty[0]|8&t.$$.dirty[1]&&(r(4,(e=m,n=V,V=Array.isArray(e)&&e.length?e.filter((t=>"video_source"===(null==t?void 0:t.type)&&"string"==typeof t.url&&"string"==typeof t.mime_type)).map((t=>{const e={src:t.url};return t.mime_type&&(e.type=t.mime_type),e})):n)),V.length?r(10,E=!1):(r(10,E=!0),x.logError(Qt(new Error('Missing "video_sources" in "video"'))))),32&t.$$.dirty[0]|4&t.$$.dirty[1]&&r(5,P=xn(h,P)),64&t.$$.dirty[0]|2&t.$$.dirty[1]&&r(6,F=xn(g,F)),128&t.$$.dirty[0]|1&t.$$.dirty[1]&&r(7,N=xn(d,N)),1073742080&t.$$.dirty[0]&&r(8,I="string"==typeof u?vr(u):I),1&t.$$.dirty[0]&&(r(15,i=x.getDerivedFromVars($.scale)),y(),y=p(i,(t=>r(29,c=t)))),671088640&t.$$.dirty[0]&&r(27,M=function(t){return"fill"===t?"cover":"no_scale"===t?"none":"contain"}(c)||M),1&t.$$.dirty[0]&&(r(14,o=x.getDerivedFromVars($.aspect)),v(),v=p(o,(t=>r(28,l=t)))),268435456&t.$$.dirty[0]){const t=null==l?void 0:l.ratio;t&&He(t)?r(9,T=(100/Number(t)).toFixed(2)):r(9,T="0")}512&t.$$.dirty[0]&&r(13,a={aspect:"0"!==T}),134217728&t.$$.dirty[0]&&r(12,s={"object-fit":M})},[$,b,_,w,V,P,F,N,I,T,E,k,s,a,o,i,A,j,D,S,O,function(){k&&(C=!0,J.setValue(Math.floor(1e3*k.currentTime)))},function(){const t=x.getJsonWithVars($.end_actions);x.execAnyActions(t)},function(){const t=x.getJsonWithVars($.resume_actions);x.execAnyActions(t)},function(){const t=x.getJsonWithVars($.pause_actions);x.execAnyActions(t)},function(){const t=x.getJsonWithVars($.buffering_actions);x.execAnyActions(t)},function(){const t=x.getJsonWithVars($.fatal_actions);x.execAnyActions(t)},M,l,c,u,d,g,h,m,function(t){dt[t?"unshift":"push"]((()=>{k=t,r(11,k)}))},function(t){dt[t?"unshift":"push"]((()=>{k=t,r(11,k)}))}]}function Na(t,e,n){const r=t.slice();return r[15]=e[n],r}function Oa(t){let e,n;return e=new dn({props:{json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Ra]},$$scope:{ctx:t}}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(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]),266225&n&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function Ia(t){let e,n=[t[9]],r={};for(let t=0;t<n.length;t+=1)r=i(r,n[t]);return{c(){e=M("template"),W(e,r)},m(n,r){N(n,e,r),e.content.innerHTML=t[8]},p(t,i){256&i&&(e.content.innerHTML=t[8]),W(e,r=Mt(n,[512&i&&t[9]]))},d(t){t&&O(e)}}}function Ma(t){let e,r,i=t[6],o=za(t);return{c(){o.c(),e=R()},m(t,n){o.m(t,n),N(t,e,n),r=!0},p(t,r){64&r&&d(i,i=t[6])?(Vt(),Dt(o,1,1,n),jt(),o=za(t),o.c(),Pt(o,1),o.m(e.parentNode,e)):o.p(t,r)},i(t){r||(Pt(o),r=!0)},o(t){Dt(o),r=!1},d(t){t&&O(e),o.d(t)}}}function Ta(t){let e,n;return e=new Ga({props:{layoutParams:t[10],div:t[15].json,templateContext:t[15].templateContext,origJson:t[15].origJson}}),{c(){Bt(e.$$.fragment)},m(t,r){Lt(e,t,r),n=!0},p(t,n){const r={};1024&n&&(r.layoutParams=t[10]),2048&n&&(r.div=t[15].json),2048&n&&(r.templateContext=t[15].templateContext),2048&n&&(r.origJson=t[15].origJson),e.$set(r)},i(t){n||(Pt(e.$$.fragment,t),n=!0)},o(t){Dt(e.$$.fragment,t),n=!1},d(t){Ut(e,t)}}}function za(t){let e,n,r=Nt(t[11]),i=[];for(let e=0;e<r.length;e+=1)i[e]=Ta(Na(t,r,e));const o=t=>Dt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=R()},m(t,r){for(let e=0;e<i.length;e+=1)i[e]&&i[e].m(t,r);N(t,e,r),n=!0},p(t,n){if(3072&n){let a;for(r=Nt(t[11]),a=0;a<r.length;a+=1){const o=Na(t,r,a);i[a]?(i[a].p(o,n),Pt(i[a],1)):(i[a]=Ta(o),i[a].c(),Pt(i[a],1),i[a].m(e.parentNode,e))}for(Vt(),a=r.length;a<i.length;a+=1)o(a);jt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)Pt(i[t]);n=!0}},o(t){i=i.filter(Boolean);for(let t=0;t<i.length;t+=1)Dt(i[t]);n=!1},d(t){t&&O(e),I(i,t)}}}function Ja(t){let e,n,r,o=t[8]&&Ia(t),a=!t[5]&&t[6]&&Ma(t),s=[t[0].custom_props||{}],l={};for(let t=0;t<s.length;t+=1)l=i(l,s[t]);return{c(){e=M(t[4].element),o&&o.c(),n=J(),a&&a.c(),q(t[4].element)(e,l)},m(i,s){N(i,e,s),o&&o.m(e,null),D(e,n),a&&a.m(e,null),t[13](e),r=!0},p(t,r){t[8]?o?o.p(t,r):(o=Ia(t),o.c(),o.m(e,n)):o&&(o.d(1),o=null),!t[5]&&t[6]?a?(a.p(t,r),96&r&&Pt(a,1)):(a=Ma(t),a.c(),Pt(a,1),a.m(e,null)):a&&(Vt(),Dt(a,1,1,(()=>{a=null})),jt()),q(t[4].element)(e,l=Mt(s,[1&r&&(t[0].custom_props||{})]))},i(t){r||(Pt(a),r=!0)},o(t){Dt(a),r=!1},d(n){n&&O(e),o&&o.d(),a&&a.d(),t[13](null)}}}function Ra(t){let e,r,i=t[4].element,o=t[4].element&&Ja(t);return{c(){o&&o.c(),e=R()},m(t,n){o&&o.m(t,n),N(t,e,n)},p(t,n){t[4].element?i?d(i,t[4].element)?(o.d(1),o=Ja(t),i=t[4].element,o.c(),o.m(e.parentNode,e)):o.p(t,n):(o=Ja(t),i=t[4].element,o.c(),o.m(e.parentNode,e)):i&&(o.d(1),o=null,i=t[4].element)},i:n,o(t){Dt(o,t),r=!1},d(t){t&&O(e),o&&o.d(t)}}}function Ba(t){let e,n,r=t[4]&&Oa(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){let[i]=n;t[4]?r?(r.p(t,i),16&i&&Pt(r,1)):(r=Oa(t),r.c(),Pt(r,1),r.m(e.parentNode,e)):r&&(Vt(),Dt(r,1,1,(()=>{r=null})),jt())},i(t){n||(Pt(r),n=!0)},o(t){Dt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function La(t,e,n){let r,i,o;var a;let{json:s={}}=e,{templateContext:l}=e,{origJson:c}=e,{layoutParams:u}=e;const d=lt(Zt);let p,f=null,g="",h={},m=!1;return ot((()=>{if(p&&"divKitApiCallback"in p&&"function"==typeof p.divKitApiCallback){const t=d.getExtensionContext();p.divKitApiCallback(t)}})),t.$$set=t=>{"json"in t&&n(0,s=t.json),"templateContext"in t&&n(1,l=t.templateContext),"origJson"in t&&n(2,c=t.origJson),"layoutParams"in t&&n(3,u=t.layoutParams)},t.$$.update=()=>{if(4113&t.$$.dirty)if("string"==typeof s.custom_type&&s.custom_type&&(null===n(12,a=d.customComponents)||void 0===a?void 0:a.has(s.custom_type))){if(n(4,f=d.customComponents.get(s.custom_type)),"function"==typeof f.template){const t=d.getExtensionContext(),e=new Map;for(const[n,r]of t.variables)e.set(n,r.getValue());n(8,g=f.template({props:s.custom_props,variables:e}))}else f.template&&"string"==typeof f.template?n(8,g=f.template):n(8,g="");n(9,h={shadowrootmode:f.shadowRootMode||"open"})}else n(4,f=null),n(8,g=";"),d.logError(Qt(new Error('Unknown or incorrect "custom_type" prop for div "custom"')));1&t.$$.dirty&&n(6,r=s.items),64&t.$$.dirty&&(void 0===r||Array.isArray(r)?n(5,m=!1):(n(5,m=!0),d.logError(Qt(new Error('Incorrect "items" prop for div "custom"'))))),98&t.$$.dirty&&n(11,i=(!m&&r||[]).map((t=>{let e=t,n=l;return({templateContext:n,json:e}=d.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),8&t.$$.dirty&&n(10,o={fakeElement:null==u?void 0:u.fakeElement})},[s,l,c,u,f,m,r,p,g,h,o,i,a,function(t){dt[t?"unshift":"push"]((()=>{p=t,n(7,p)}))}]}const Ua={};function Wa(t){let e,n,r;var i=t[5];function o(t,e){return{props:{json:t[3],templateContext:t[4],layoutParams:t[2],origJson:t[1]||t[0]}}}return i&&(e=Y(i,o(t))),{c(){e&&Bt(e.$$.fragment),n=R()},m(t,i){e&&Lt(e,t,i),N(t,n,i),r=!0},p(t,r){if(32&r&&i!==(i=t[5])){if(e){Vt();const t=e;Dt(t.$$.fragment,1,0,(()=>{Ut(t,1)})),jt()}i?(e=Y(i,o(t)),Bt(e.$$.fragment),Pt(e.$$.fragment,1),Lt(e,n.parentNode,n)):e=null}else if(i){const n={};8&r&&(n.json=t[3]),16&r&&(n.templateContext=t[4]),4&r&&(n.layoutParams=t[2]),3&r&&(n.origJson=t[1]||t[0]),e.$set(n)}},i(t){r||(e&&Pt(e.$$.fragment,t),r=!0)},o(t){e&&Dt(e.$$.fragment,t),r=!1},d(t){t&&O(n),e&&Ut(e,t)}}}function Ha(t){let e,n,r=t[5]&&Wa(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){let[i]=n;t[5]?r?(r.p(t,i),32&i&&Pt(r,1)):(r=Wa(t),r.c(),Pt(r,1),r.m(e.parentNode,e)):r&&(Vt(),Dt(r,1,1,(()=>{r=null})),jt())},i(t){n||(Pt(r),n=!0)},o(t){Dt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}function qa(t,e,n){let{div:r}=e,{templateContext:i}=e,{origJson:o}=e,{layoutParams:a}=e;const s=lt(Zt);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&&Ua[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&&Ua[l.type]||void 0),!u))){let t;t=(null==l?void 0:l.type)&&s.hasTemplate(l.type)?"Recursive template":"Unknown component",s.logError(Qt(new Error(t),{additional:{component:(null==l?void 0:l.type)||"<missing>"}}))}},[r,o,a,l,c,u,i]}Ua.text=class extends qt{constructor(t){super(),Wt(this,t,In,On,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Ua.container=class extends qt{constructor(t){super(),Wt(this,t,cr,lr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Ua.separator=class extends qt{constructor(t){super(),Wt(this,t,hr,gr,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}},Ua.image=Ar,Ua.gif=Ar,Ua.grid=class extends qt{constructor(t){super(),Wt(this,t,Tr,Mr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Ua.gallery=class extends qt{constructor(t){super(),Wt(this,t,ti,Qr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},Ua.tabs=class extends qt{constructor(t){super(),Wt(this,t,vi,mi,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1,-1])}},Ua.state=class extends qt{constructor(t){super(),Wt(this,t,so,oo,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Ua.pager=class extends qt{constructor(t){super(),Wt(this,t,vo,mo,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Ua.indicator=class extends qt{constructor(t){super(),Wt(this,t,ko,xo,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Ua.slider=class extends qt{constructor(t){super(),Wt(this,t,Ko,qo,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},Ua.input=class extends qt{constructor(t){super(),Wt(this,t,ha,fa,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},Ua.select=class extends qt{constructor(t){super(),Wt(this,t,wa,_a,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Ua.video=class extends qt{constructor(t){super(),Wt(this,t,Sa,Fa,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Ua.custom=class extends qt{constructor(t){super(),Wt(this,t,La,Ba,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}};const Ga=class extends qt{constructor(t){super(),Wt(this,t,qa,Ha,d,{div:0,templateContext:6,origJson:1,layoutParams:2})}},Ka={"root-svg-filters":"divkit-dc22b"};function Xa(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 Ya(t){let e,n,r,i=Nt([...Object.keys(t[0])]),o=[];for(let e=0;e<i.length;e+=1)o[e]=es(Xa(t,i,e));return{c(){e=T("svg"),n=T("defs");for(let t=0;t<o.length;t+=1)o[t].c();L(e,"class",r=Ka["root-svg-filters"]),L(e,"aria-hidden","true")},m(t,r){N(t,e,r),D(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=Nt([...Object.keys(t[0])]),r=0;r<i.length;r+=1){const a=Xa(t,i,r);o[r]?o[r].p(a,e):(o[r]=es(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&&O(e),I(o,t)}}}function Za(t){let e,n;return{c(){e=T("feBlend"),L(e,"in2","SourceGraphic"),L(e,"mode",n=t[3])},m(t,n){N(t,e,n)},p(t,r){1&r&&n!==(n=t[3])&&L(e,"mode",n)},d(t){t&&O(e)}}}function Qa(t){let e;return{c(){e=T("feComposite"),L(e,"in2","SourceGraphic"),L(e,"operator","arithmetic"),L(e,"k1","1"),L(e,"k2","0"),L(e,"k3","0"),L(e,"k4","0")},m(t,n){N(t,e,n)},p:n,d(t){t&&O(e)}}}function ts(t){let e,n;return{c(){e=T("feComposite"),L(e,"in2","SourceGraphic"),L(e,"operator",n=t[3].split("_")[1])},m(t,n){N(t,e,n)},p(t,r){1&r&&n!==(n=t[3].split("_")[1])&&L(e,"operator",n)},d(t){t&&O(e)}}}function es(t){let e,n,r,i;function o(t,e){return"source_in"===t[3]||"source_atop"===t[3]?ts:"multiply"===t[3]?Qa:Za}let a=o(t),s=a(t);return{c(){e=T("filter"),n=T("feFlood"),s.c(),L(n,"flood-color",r=t[2]),L(e,"id",i=t[0][t[1]])},m(t,r){N(t,e,r),D(e,n),s.m(e,null)},p(t,l){1&l&&r!==(r=t[2])&&L(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]])&&L(e,"id",i)},d(t){t&&O(e),s.d()}}}function ns(t){let e,r=Object.keys(t[0]).length,i=r&&Ya(t);return{c(){i&&i.c(),e=R()},m(t,n){i&&i.m(t,n),N(t,e,n)},p(t,n){let[o]=n;1&o&&(r=Object.keys(t[0]).length),r?i?i.p(t,o):(i=Ya(t),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null)},i:n,o:n,d(t){t&&O(e),i&&i.d(t)}}}function rs(t,e,n){let{svgFiltersMap:r}=e;return t.$$set=t=>{"svgFiltersMap"in t&&n(0,r=t.svgFiltersMap)},[r]}const is=class extends qt{constructor(t){super(),Wt(this,t,rs,ns,d,{svgFiltersMap:0})}};function os(t,e,n,r){const i=n[t.type];if(!i)return r(Qt(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 as(){}function ss(t){return{subscribe:e=>(e(t),as)}}function ls(t,e){return e.reduce(((t,e)=>({type:"BinaryExpression",operator:e[1],left:t,right:e[3]})),t)}function cs(t,e){return e.reduce(((t,e)=>({type:"LogicalExpression",operator:e[1],left:t,right:e[3]})),t)}function us(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 ds(t){try{return Fo(t)}catch(e){throw new Error("Value ".concat(t," can't be converted to Integer type."))}}function ps(t){if("'"===t||"\\"===t)return t;throw new Error("Incorrect string escape")}function fs(t,e,n,r){var i=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(i,fs.prototype),i.expected=e,i.found=n,i.location=r,i.name="SyntaxError",i}function gs(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,t+(n+=n.repeat(e)).slice(0,e))}function hs(t,e){var n,r={},i=(e=void 0!==e?e:{}).grammarSource,o={start:Ae,JsonStringContents:function(){var t,e,n;for(t=ge,e=[],n=Ve();n!==r;)e.push(n),n=Ve();return he=t,e=Dt(e)}},a=Ae,s="@{",l="}",c="@{}",u="\\",d="?",p=":",f="||",g="&&",h="==",m="!=",v=">=",y=">",$="<=",b="<",_="+",w="-",x="/",k="*",E="%",C="!",A="(",V=")",j=",",P="'",D=".",F="e",S="E",N="true",O="false",I=/^[^}]/,M=/^[^'}]/,T=/^[0-9]/,z=/^[a-zA-Z_0-9.]/,J=/^[a-zA-Z_]/,R=/^[ \t\r\n]/,B=_e("@{",!1),L=_e("}",!1),U=_e("@{}",!1),W=_e("\\",!1),H={type:"any"},q=we(["}"],!0,!1),G=_e("?",!1),K=_e(":",!1),X=_e("||",!1),Y=_e("&&",!1),Z=_e("==",!1),Q=_e("!=",!1),tt=_e(">=",!1),et=_e(">",!1),nt=_e("<=",!1),rt=_e("<",!1),it=_e("+",!1),ot=_e("-",!1),at=_e("/",!1),st=_e("*",!1),lt=_e("%",!1),ct=_e("!",!1),ut=_e("(",!1),dt=_e(")",!1),pt=_e(",",!1),ft=xe("string"),gt=_e("'",!1),ht=we(["'","}"],!0,!1),mt=xe("integer"),vt=we([["0","9"]],!1,!1),yt=xe("number"),$t=_e(".",!1),bt=_e("e",!1),_t=_e("E",!1),wt=xe("boolean"),xt=_e("true",!1),kt=_e("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},Dt=function(t){return us(t)},Ft=function(t){return t},St=function(){return""},Nt=function(){return be()},Ot=function(){throw new Error("Error tokenizing '"+t+"'.")},It=function(){throw new Error("Error tokenizing '"+t+"'.")},Mt=function(t){return t},Tt=function(t){return ps(t)},zt=function(){throw new Error("Error tokenizing '"+t+"'.")},Jt=function(t,e,n){return{type:"ConditionalExpression",test:t,consequent:e,alternate:n}},Rt=function(t,e){return cs(t,e)},Bt=function(t,e){return cs(t,e)},Lt=function(t,e){return ls(t,e)},Ut=function(t,e){return ls(t,e)},Wt=function(t,e){return ls(t,e)},Ht=function(t,e){return ls(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 us(t)},te=function(t){return t},ee=function(){return""},ne=function(){return be()},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 ps(t)},se=function(){throw new Error("Error tokenizing '"+t+"'.")},le=function(){return{type:"IntegerLiteral",value:ds(be())}},ce=function(){return{type:"NumberLiteral",value:parseFloat(be())}},ue=function(){return{type:"NumberLiteral",value:parseFloat(be())}},de=function(){return{type:"BooleanLiteral",value:!0}},pe=function(){return{type:"BooleanLiteral",value:!1}},fe=function(){return{type:"Identifier",name:be()}},ge=0,he=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 be(){return t.substring(he,ge)}function _e(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){ge<ve||(ge>ve&&(ve=ge,ye=[]),ye.push(t))}function Ae(){var t,e;return t=ge,Re(),(e=je())!==r?(Re(),he=t,t=Pt(e)):(ge=t,t=r),t}function Ve(){var e,n,i,o,a;if(e=ge,t.substr(ge,2)===s?(n=s,ge+=2):(n=r,0===$e&&Ce(B)),n!==r?(i=Re(),(o=je())!==r?(Re(),125===t.charCodeAt(ge)?(a=l,ge++):(a=r,0===$e&&Ce(L)),a!==r?(he=e,e=Ft(o)):(ge=e,e=r)):(ge=e,e=r)):(ge=e,e=r),e===r&&(e=ge,t.substr(ge,3)===c?(n=c,ge+=3):(n=r,0===$e&&Ce(U)),n!==r&&(he=e,n=St()),(e=n)===r&&(e=ge,n=ge,$e++,92===t.charCodeAt(ge)?(i=u,ge++):(i=r,0===$e&&Ce(W)),i===r&&(t.substr(ge,2)===s?(i=s,ge+=2):(i=r,0===$e&&Ce(B))),$e--,i===r?n=void 0:(ge=n,n=r),n!==r?(t.length>ge?(i=t.charAt(ge),ge++):(i=r,0===$e&&Ce(H)),i!==r?(he=e,e=Nt()):(ge=e,e=r)):(ge=e,e=r),e===r))){if(e=ge,t.substr(ge,2)===s?(n=s,ge+=2):(n=r,0===$e&&Ce(B)),n!==r){if(i=[],I.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(q)),o!==r)for(;o!==r;)i.push(o),I.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(q));else i=r;i!==r?(125===t.charCodeAt(ge)?(o=l,ge++):(o=r,0===$e&&Ce(L)),o!==r?(he=e,e=Ot()):(ge=e,e=r)):(ge=e,e=r)}else ge=e,e=r;e===r&&(e=ge,t.substr(ge,2)===s?(n=s,ge+=2):(n=r,0===$e&&Ce(B)),n!==r&&(he=e,n=It()),(e=n)===r&&(e=ge,92===t.charCodeAt(ge)?(n=u,ge++):(n=r,0===$e&&Ce(W)),n!==r?(t.substr(ge,2)===s?(i=s,ge+=2):(i=r,0===$e&&Ce(B)),i!==r?(he=e,e=Mt(i)):(ge=e,e=r)):(ge=e,e=r),e===r&&(e=ge,92===t.charCodeAt(ge)?(n=u,ge++):(n=r,0===$e&&Ce(W)),n!==r?(t.length>ge?(i=t.charAt(ge),ge++):(i=r,0===$e&&Ce(H)),i!==r?(he=e,e=Tt(i)):(ge=e,e=r)):(ge=e,e=r),e===r&&(e=ge,92===t.charCodeAt(ge)?(n=u,ge++):(n=r,0===$e&&Ce(W)),n!==r&&(he=e,n=zt()),e=n))))}return e}function je(){var e,n,i,o,a,s;return e=ge,(n=Pe())!==r?(Re(),63===t.charCodeAt(ge)?(i=d,ge++):(i=r,0===$e&&Ce(G)),i!==r?(Re(),(o=je())!==r?(Re(),58===t.charCodeAt(ge)?(a=p,ge++):(a=r,0===$e&&Ce(K)),a!==r?(Re(),(s=je())!==r?(he=e,e=Jt(n,o,s)):(ge=e,e=r)):(ge=e,e=r)):(ge=e,e=r)):(ge=e,e=r)):(ge=e,e=r),e===r&&(e=Pe()),e}function Pe(){var e,n,i,o,a,s,l,c;if(e=ge,(n=De())!==r){for(i=[],o=ge,a=Re(),t.substr(ge,2)===f?(s=f,ge+=2):(s=r,0===$e&&Ce(X)),s!==r?(l=Re(),(c=De())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);o!==r;)i.push(o),o=ge,a=Re(),t.substr(ge,2)===f?(s=f,ge+=2):(s=r,0===$e&&Ce(X)),s!==r?(l=Re(),(c=De())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);he=e,e=Rt(n,i)}else ge=e,e=r;return e}function De(){var e,n,i,o,a,s,l,c;if(e=ge,(n=Fe())!==r){for(i=[],o=ge,a=Re(),t.substr(ge,2)===g?(s=g,ge+=2):(s=r,0===$e&&Ce(Y)),s!==r?(l=Re(),(c=Fe())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);o!==r;)i.push(o),o=ge,a=Re(),t.substr(ge,2)===g?(s=g,ge+=2):(s=r,0===$e&&Ce(Y)),s!==r?(l=Re(),(c=Fe())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);he=e,e=Bt(n,i)}else ge=e,e=r;return e}function Fe(){var e,n,i,o,a,s,l,c;if(e=ge,(n=Se())!==r){for(i=[],o=ge,a=Re(),t.substr(ge,2)===h?(s=h,ge+=2):(s=r,0===$e&&Ce(Z)),s===r&&(t.substr(ge,2)===m?(s=m,ge+=2):(s=r,0===$e&&Ce(Q))),s!==r?(l=Re(),(c=Se())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);o!==r;)i.push(o),o=ge,a=Re(),t.substr(ge,2)===h?(s=h,ge+=2):(s=r,0===$e&&Ce(Z)),s===r&&(t.substr(ge,2)===m?(s=m,ge+=2):(s=r,0===$e&&Ce(Q))),s!==r?(l=Re(),(c=Se())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);he=e,e=Lt(n,i)}else ge=e,e=r;return e}function Se(){var e,n,i,o,a,s,l,c;if(e=ge,(n=Ne())!==r){for(i=[],o=ge,a=Re(),t.substr(ge,2)===v?(s=v,ge+=2):(s=r,0===$e&&Ce(tt)),s===r&&(62===t.charCodeAt(ge)?(s=y,ge++):(s=r,0===$e&&Ce(et)),s===r&&(t.substr(ge,2)===$?(s=$,ge+=2):(s=r,0===$e&&Ce(nt)),s===r&&(60===t.charCodeAt(ge)?(s=b,ge++):(s=r,0===$e&&Ce(rt))))),s!==r?(l=Re(),(c=Ne())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);o!==r;)i.push(o),o=ge,a=Re(),t.substr(ge,2)===v?(s=v,ge+=2):(s=r,0===$e&&Ce(tt)),s===r&&(62===t.charCodeAt(ge)?(s=y,ge++):(s=r,0===$e&&Ce(et)),s===r&&(t.substr(ge,2)===$?(s=$,ge+=2):(s=r,0===$e&&Ce(nt)),s===r&&(60===t.charCodeAt(ge)?(s=b,ge++):(s=r,0===$e&&Ce(rt))))),s!==r?(l=Re(),(c=Ne())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);he=e,e=Ut(n,i)}else ge=e,e=r;return e}function Ne(){var e,n,i,o,a,s,l,c;if(e=ge,(n=Oe())!==r){for(i=[],o=ge,a=Re(),43===t.charCodeAt(ge)?(s=_,ge++):(s=r,0===$e&&Ce(it)),s===r&&(45===t.charCodeAt(ge)?(s=w,ge++):(s=r,0===$e&&Ce(ot))),s!==r?(l=Re(),(c=Oe())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);o!==r;)i.push(o),o=ge,a=Re(),43===t.charCodeAt(ge)?(s=_,ge++):(s=r,0===$e&&Ce(it)),s===r&&(45===t.charCodeAt(ge)?(s=w,ge++):(s=r,0===$e&&Ce(ot))),s!==r?(l=Re(),(c=Oe())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);he=e,e=Wt(n,i)}else ge=e,e=r;return e}function Oe(){var e,n,i,o,a,s,l,c;if(e=ge,(n=Ie())!==r){for(i=[],o=ge,a=Re(),47===t.charCodeAt(ge)?(s=x,ge++):(s=r,0===$e&&Ce(at)),s===r&&(42===t.charCodeAt(ge)?(s=k,ge++):(s=r,0===$e&&Ce(st)),s===r&&(37===t.charCodeAt(ge)?(s=E,ge++):(s=r,0===$e&&Ce(lt)))),s!==r?(l=Re(),(c=Ie())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);o!==r;)i.push(o),o=ge,a=Re(),47===t.charCodeAt(ge)?(s=x,ge++):(s=r,0===$e&&Ce(at)),s===r&&(42===t.charCodeAt(ge)?(s=k,ge++):(s=r,0===$e&&Ce(st)),s===r&&(37===t.charCodeAt(ge)?(s=E,ge++):(s=r,0===$e&&Ce(lt)))),s!==r?(l=Re(),(c=Ie())!==r?o=a=[a,s,l,c]:(ge=o,o=r)):(ge=o,o=r);he=e,e=Ht(n,i)}else ge=e,e=r;return e}function Ie(){var e,n,i;return(e=ze())===r&&(e=Te())===r&&(e=ge,33===t.charCodeAt(ge)?(n=C,ge++):(n=r,0===$e&&Ce(ct)),n===r&&(43===t.charCodeAt(ge)?(n=_,ge++):(n=r,0===$e&&Ce(it)),n===r&&(45===t.charCodeAt(ge)?(n=w,ge++):(n=r,0===$e&&Ce(ot)))),n!==r?(Re(),(i=Ie())!==r?(he=e,e=qt(n,i)):(ge=e,e=r)):(ge=e,e=r),e===r&&(e=function(){var e,n,i,o,a;return e=ge,(n=Je())!==r?(Re(),40===t.charCodeAt(ge)?(i=A,ge++):(i=r,0===$e&&Ce(ut)),i!==r?(Re(),o=function(){var e,n,i,o,a,s;if(e=ge,(n=je())!==r){for(i=[],o=ge,Re(),44===t.charCodeAt(ge)?(a=j,ge++):(a=r,0===$e&&Ce(pt)),a!==r?(Re(),(s=je())!==r?o=s:(ge=o,o=r)):(ge=o,o=r);o!==r;)i.push(o),o=ge,Re(),44===t.charCodeAt(ge)?(a=j,ge++):(a=r,0===$e&&Ce(pt)),a!==r?(Re(),(s=je())!==r?o=s:(ge=o,o=r)):(ge=o,o=r);he=e,e=Xt(n,i)}else ge=e,e=r;return e===r&&(e=Re()),e}(),o!==r?(Re(),41===t.charCodeAt(ge)?(a=V,ge++):(a=r,0===$e&&Ce(dt)),a!==r?(he=e,e=Gt(n,o)):(ge=e,e=r)):(ge=e,e=r)):(ge=e,e=r)):(ge=e,e=r),e===r&&(e=ge,(n=Je())!==r&&(he=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=ge,39===t.charCodeAt(ge)?(n=P,ge++):(n=r,0===$e&&Ce(gt)),n!==r?(i=function(){var t,e,n;for(t=ge,e=[],n=Me();n!==r;)e.push(n),n=Me();return he=t,t=e=Qt(e)}(),39===t.charCodeAt(ge)?(o=P,ge++):(o=r,0===$e&&Ce(gt)),o!==r?(he=e,e=Zt(i)):(ge=e,e=r)):(ge=e,e=r),$e--,e===r&&(n=r,0===$e&&Ce(ft)),e}(),e===r&&(e=ze())===r&&(e=Te())===r&&(e=function(){var e,n;return $e++,e=ge,t.substr(ge,4)===N?(n=N,ge+=4):(n=r,0===$e&&Ce(xt)),n!==r&&(he=e,n=de()),(e=n)===r&&(e=ge,t.substr(ge,5)===O?(n=O,ge+=5):(n=r,0===$e&&Ce(kt)),n!==r&&(he=e,n=pe()),e=n),$e--,e===r&&(n=r,0===$e&&Ce(wt)),e}(),e===r&&(e=ge,40===t.charCodeAt(ge)?(n=A,ge++):(n=r,0===$e&&Ce(ut)),n!==r&&(i=je())!==r?(41===t.charCodeAt(ge)?(o=V,ge++):(o=r,0===$e&&Ce(dt)),o!==r?(he=e,e=Yt(i)):(ge=e,e=r)):(ge=e,e=r))),e}())),e}())),e}function Me(){var e,n,i,o,a;if(e=ge,t.substr(ge,2)===s?(n=s,ge+=2):(n=r,0===$e&&Ce(B)),n!==r?(i=Re(),(o=je())!==r?(Re(),125===t.charCodeAt(ge)?(a=l,ge++):(a=r,0===$e&&Ce(L)),a!==r?(he=e,e=te(o)):(ge=e,e=r)):(ge=e,e=r)):(ge=e,e=r),e===r&&(e=ge,t.substr(ge,3)===c?(n=c,ge+=3):(n=r,0===$e&&Ce(U)),n!==r&&(he=e,n=ee()),(e=n)===r&&(e=ge,n=ge,$e++,92===t.charCodeAt(ge)?(i=u,ge++):(i=r,0===$e&&Ce(W)),i===r&&(39===t.charCodeAt(ge)?(i=P,ge++):(i=r,0===$e&&Ce(gt)),i===r&&(t.substr(ge,2)===s?(i=s,ge+=2):(i=r,0===$e&&Ce(B)))),$e--,i===r?n=void 0:(ge=n,n=r),n!==r?(t.length>ge?(i=t.charAt(ge),ge++):(i=r,0===$e&&Ce(H)),i!==r?(he=e,e=ne()):(ge=e,e=r)):(ge=e,e=r),e===r))){if(e=ge,t.substr(ge,2)===s?(n=s,ge+=2):(n=r,0===$e&&Ce(B)),n!==r){if(i=[],M.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(ht)),o!==r)for(;o!==r;)i.push(o),M.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(ht));else i=r;i!==r?(125===t.charCodeAt(ge)?(o=l,ge++):(o=r,0===$e&&Ce(L)),o!==r?(he=e,e=re()):(ge=e,e=r)):(ge=e,e=r)}else ge=e,e=r;e===r&&(e=ge,t.substr(ge,2)===s?(n=s,ge+=2):(n=r,0===$e&&Ce(B)),n!==r&&(he=e,n=ie()),(e=n)===r&&(e=ge,92===t.charCodeAt(ge)?(n=u,ge++):(n=r,0===$e&&Ce(W)),n!==r?(t.substr(ge,2)===s?(i=s,ge+=2):(i=r,0===$e&&Ce(B)),i!==r?(he=e,e=oe(i)):(ge=e,e=r)):(ge=e,e=r),e===r&&(e=ge,92===t.charCodeAt(ge)?(n=u,ge++):(n=r,0===$e&&Ce(W)),n!==r?(t.length>ge?(i=t.charAt(ge),ge++):(i=r,0===$e&&Ce(H)),i!==r?(he=e,e=ae(i)):(ge=e,e=r)):(ge=e,e=r),e===r&&(e=ge,92===t.charCodeAt(ge)?(n=u,ge++):(n=r,0===$e&&Ce(W)),n!==r&&(he=e,n=se()),e=n))))}return e}function Te(){var e,n,i,o;if($e++,e=ge,45===t.charCodeAt(ge)?(n=w,ge++):(n=r,0===$e&&Ce(ot)),n===r&&(n=null),i=[],T.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(vt)),o!==r)for(;o!==r;)i.push(o),T.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(vt));else i=r;return i!==r?(he=e,e=le()):(ge=e,e=r),$e--,e===r&&(n=r,0===$e&&Ce(mt)),e}function ze(){var e,n,i,o,a,s,l,c,u,d;for($e++,e=ge,45===t.charCodeAt(ge)?(n=w,ge++):(n=r,0===$e&&Ce(ot)),n===r&&(n=null),i=[],T.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(vt));o!==r;)i.push(o),T.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(vt));if(46===t.charCodeAt(ge)?(o=D,ge++):(o=r,0===$e&&Ce($t)),o!==r){if(a=[],T.test(t.charAt(ge))?(s=t.charAt(ge),ge++):(s=r,0===$e&&Ce(vt)),s!==r)for(;s!==r;)a.push(s),T.test(t.charAt(ge))?(s=t.charAt(ge),ge++):(s=r,0===$e&&Ce(vt));else a=r;if(a!==r){if(s=ge,101===t.charCodeAt(ge)?(l=F,ge++):(l=r,0===$e&&Ce(bt)),l===r&&(69===t.charCodeAt(ge)?(l=S,ge++):(l=r,0===$e&&Ce(_t))),l!==r){if(43===t.charCodeAt(ge)?(c=_,ge++):(c=r,0===$e&&Ce(it)),c===r&&(45===t.charCodeAt(ge)?(c=w,ge++):(c=r,0===$e&&Ce(ot))),c===r&&(c=null),u=[],T.test(t.charAt(ge))?(d=t.charAt(ge),ge++):(d=r,0===$e&&Ce(vt)),d!==r)for(;d!==r;)u.push(d),T.test(t.charAt(ge))?(d=t.charAt(ge),ge++):(d=r,0===$e&&Ce(vt));else u=r;u!==r?s=l=[l,c,u]:(ge=s,s=r)}else ge=s,s=r;s===r&&(s=null),he=e,e=ce()}else ge=e,e=r}else ge=e,e=r;if(e===r){if(e=ge,45===t.charCodeAt(ge)?(n=w,ge++):(n=r,0===$e&&Ce(ot)),n===r&&(n=null),i=[],T.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(vt)),o!==r)for(;o!==r;)i.push(o),T.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(vt));else i=r;if(i!==r)if(101===t.charCodeAt(ge)?(o=F,ge++):(o=r,0===$e&&Ce(bt)),o===r&&(69===t.charCodeAt(ge)?(o=S,ge++):(o=r,0===$e&&Ce(_t))),o!==r){if(43===t.charCodeAt(ge)?(a=_,ge++):(a=r,0===$e&&Ce(it)),a===r&&(45===t.charCodeAt(ge)?(a=w,ge++):(a=r,0===$e&&Ce(ot))),a===r&&(a=null),s=[],T.test(t.charAt(ge))?(l=t.charAt(ge),ge++):(l=r,0===$e&&Ce(vt)),l!==r)for(;l!==r;)s.push(l),T.test(t.charAt(ge))?(l=t.charAt(ge),ge++):(l=r,0===$e&&Ce(vt));else s=r;s!==r?(he=e,e=ue()):(ge=e,e=r)}else ge=e,e=r;else ge=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=ge,n=ge,$e++,i=function(){var e,n,i,o;return e=ge,t.substr(ge,4)===N?(n=N,ge+=4):(n=r,0===$e&&Ce(xt)),n===r&&(t.substr(ge,5)===O?(n=O,ge+=5):(n=r,0===$e&&Ce(kt))),n!==r?(i=ge,$e++,z.test(t.charAt(ge))?(o=t.charAt(ge),ge++):(o=r,0===$e&&Ce(Et)),$e--,o===r?i=void 0:(ge=i,i=r),i!==r?e=n=[n,i]:(ge=e,e=r)):(ge=e,e=r),e}(),$e--,i===r?n=void 0:(ge=n,n=r),n!==r)if(J.test(t.charAt(ge))?(i=t.charAt(ge),ge++):(i=r,0===$e&&Ce(At)),i!==r){for(o=[],z.test(t.charAt(ge))?(a=t.charAt(ge),ge++):(a=r,0===$e&&Ce(Et));a!==r;)o.push(a),z.test(t.charAt(ge))?(a=t.charAt(ge),ge++):(a=r,0===$e&&Ce(Et));he=e,e=fe()}else ge=e,e=r;else ge=e,e=r;return $e--,e===r&&(n=r,0===$e&&Ce(Ct)),e}function Re(){var e,n;for($e++,e=[],R.test(t.charAt(ge))?(n=t.charAt(ge),ge++):(n=r,0===$e&&Ce(jt));n!==r;)e.push(n),R.test(t.charAt(ge))?(n=t.charAt(ge),ge++):(n=r,0===$e&&Ce(jt));return $e--,n=r,0===$e&&Ce(Vt),e}if((n=a())!==r&&ge===t.length)return n;throw n!==r&&ge<t.length&&Ce({type:"end"}),function(t,e,n){return new fs(fs.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}(fs,Error),fs.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=gs("",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+" | "+gs("",i.column-1," ")+gs("",u,"^")}else e+="\n at "+a}return e},fs.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 ms=new Map,vs=new Map;function ys(t,e,n){const r={args:e,cb:n},i=ms.get(t)||[];ms.has(t)||ms.set(t,i),i.push(r);const o=t+":"+e.map((t=>"object"==typeof t?t.type:t)).join("#");vs.set(o,r)}function $s(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 bs(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=>{bs(t,e)}));break;case"BinaryExpression":case"LogicalExpression":bs(t.left,e),bs(t.right,e);break;case"UnaryExpression":bs(t.argument,e);break;case"ConditionalExpression":bs(t.test,e),bs(t.consequent,e),bs(t.alternate,e);break;case"CallExpression":t.arguments.forEach((t=>{bs(t,e)}))}}function _s(t){return"url"===t.type||"color"===t.type?{type:"string",value:t.value}:t}function ws(t){return t.toISOString().replace("T"," ").replace(/\.\d{3}Z$/,"")}function xs(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 ws(t.value);if("color"===t.type)return Ds(Ps(t.value));if("url"===t.type)return t.value;if("dict"===t.type)return"<dict>";if("array"===t.type)return"<array>";throw new Error("Unexpected type ".concat(t.type))}function ks(t){let e=xs(t);return"string"===t.type&&(e="'"+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")+"'"),e}function Es(t){return"datetime"===t?"DateTime":t.charAt(0).toUpperCase()+t.substring(1)}function Cs(t,e){if(Vo)return Fo(e);if(e<0){const t=-Math.floor(-e);return 0===t?0:t}return Math.floor(e)}function As(t,e){if(e<Do||e>Po)throw new Error("Integer overflow.");!Vo&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)&&(t.safeIntegerOverflow=!0)}function Vs(t){const e=[];return bs(t,{Variable(t){e.push(t.id.name)}}),e}function js(t,e){throw new Error("Failed to evaluate [".concat(t,"]. ").concat(e))}function Ps(t){const e=se(t);if(e)return e;throw new Error("Unable to convert value to Color, expected format #AARRGGBB.")}function Ds(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 oe(Math.round(t).toString(16),2)})).join("").toUpperCase())}function Fs(t){return Ds(Ps(t))}const Ss=Number.MAX_VALUE,Ns=Number.MIN_VALUE,Os="string",Is="integer",Ms="number",Ts="boolean",zs="color",Js="url",Rs="datetime",Bs="dict",Ls="array";function Us(t,e){return{type:Os,value:xs(e)}}function Ws(t,e){const n=Number(e.value);if(isNaN(n)||!Number.isFinite(n))throw new Error("Unable to convert value to Number.");return{type:Ms,value:n}}function Hs(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=Fs(o)),{type:r,value:o}}function qs(t,e,n){return Hs(t,e,n,n.type)}function Gs(t,e,n){return Hs(t,e,n,"color")}function Ks(t,e,n){return Hs(t,e,n,"url")}const Xs=t=>(e,n)=>{let r=new Date(n.value.getTime())[t]();return"getUTCMonth"===t?++r:"getUTCDay"===t&&0===r&&(r=7),{type:Is,value:Fo(r)}},Ys=Xs("getUTCFullYear"),Zs=Xs("getUTCMonth"),Qs=Xs("getUTCDate"),tl=Xs("getUTCDay"),el=Xs("getUTCHours"),nl=Xs("getUTCMinutes"),rl=Xs("getUTCSeconds"),il=Xs("getUTCMilliseconds");function ol(t,e,n,r){if(!r.value.length)return t.warnings.push(Qt(new Error("String for padding is empty."),{level:"warn"})),"";let i="";const o=e.type===Os?e.value:xs(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 al(t,e,n,r){const i=ol(t,e,n,r);return{type:Os,value:i+xs(e)}}function sl(t,e,n,r){const i=ol(t,e,n,r);return{type:Os,value:xs(e)+i}}function ll(t){return(e,n)=>{const r=Ps(n.value);return{type:Ms,value:r[t]/255}}}function cl(t){return(e,n,r)=>{const i=Ps(n.value);return i[t]=255*r.value,{type:zs,value:Ds(i)}}}const ul=ll("a"),dl=ll("r"),pl=ll("g"),fl=ll("b"),gl=cl("a"),hl=cl("r"),ml=cl("g"),vl=cl("b");function yl(t,e,n,r){if(e.value<0)throw new Error("Expecting non-negative number of milliseconds.");let i=Fo(e.value)/Fo(n);return As(t,i),"number"==typeof i&&(i=Math.floor(i)),r&&(i=Fo(i)%Fo(r)),{type:Is,value:i}}const $l=36e5;function bl(t,e){return function(n,r){for(var i=arguments.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a];let s=function(t,e){let n=t;for(let t=0;t<e.length;++t){if(!n)throw new Error('Missing property "'.concat(e[t],'" in the dict.'));const r=n[e[t]];if(void 0===r)throw new Error('Missing property "'.concat(e[t],'" in the dict.'));n=r}return n}(r.value,o.map((t=>t.value))),l=typeof s;if(l!==t)throw"object"===l&&(l=Array.isArray(s)?"array":null===s?"null":"dict"),new Error('Incorrect value type: expected "'.concat(e,'", got "').concat(l,'".'));if("number"===t&&"integer"===e){if(s!==Math.round(s))throw new Error("Cannot convert value to integer.");As(n,s)}return"string"===t&&"color"===e&&(s=Fs(s)),{type:e,value:s}}}function _l(t,e){return function(n,r,i){try{for(var o=arguments.length,a=new Array(o>3?o-3:0),s=3;s<o;s++)a[s-3]=arguments[s];return t(n,i,...a)}catch(t){let n=r.value;return"color"===e&&(n=Fs(n)),{type:e,value:n}}}}const wl=bl("string","string"),xl=bl("number","number"),kl=bl("number","integer"),El=bl("boolean","boolean"),Cl=bl("string","color"),Al=bl("string","url"),Vl=_l(wl,"string"),jl=_l(xl,"number"),Pl=_l(kl,"integer"),Dl=_l(El,"boolean"),Fl=_l(Cl,"color"),Sl=_l(Al,"url");function Nl(t,e){return(n,r,i)=>{if(i.value<0||i.value>=r.value.length)throw new Error("Requested index (".concat(i.value,") out of bounds array size (").concat(r.value.length,")."));let o=r.value[Number(i.value)],a=typeof o;if("array"===t&&!Array.isArray(o)||"array"!==t&&a!==t||"obejct"===a&&null===o)throw"object"===a&&(a=Array.isArray(o)?"array":null===o?"null":"dict"),new Error('Incorrect value type: expected "'.concat(e,'", got "').concat(a,'".'));if("number"===t&&"integer"===e){if(o!==Math.round(o))throw new Error("Cannot convert value to integer.");As(n,o)}return"string"===t&&"color"===e&&(o=Fs(o)),{type:e,value:o}}}function Ol(t,e){return(n,r,i,o)=>{try{return t(n,r,i)}catch(t){let n=o.value;return"color"===e&&(n=Fs(n)),{type:e,value:n}}}}const Il=Nl("string","string"),Ml=Nl("number","number"),Tl=Nl("number","integer"),zl=Nl("boolean","boolean"),Jl=Nl("string","color"),Rl=Nl("string","url"),Bl=Nl("array","array"),Ll=Nl("object","dict"),Ul=Ol(Il,"string"),Wl=Ol(Ml,"number"),Hl=Ol(Tl,"integer"),ql=Ol(zl,"boolean"),Gl=Ol(Jl,"color"),Kl=Ol(Rl,"url");function Xl(t){return t.map(ks).join(", ")}ys("toString",[Is],Us),ys("toString",[Ms],Us),ys("toString",[Ts],Us),ys("toString",[zs],Us),ys("toString",[Js],Us),ys("toNumber",[Is],Ws),ys("toNumber",[Os],Ws),ys("toInteger",[Ms],(function(t,e){if(e.value>Po||e.value<Do)throw new Error("Unable to convert value to Integer.");const n=e.value-e.value%1;return{type:Is,value:Fo(n)}})),ys("toInteger",[Os],(function(t,e){let n;try{n=Fo(e.value)}catch(t){throw new Error("Unable to convert value to Integer.")}if("number"==typeof n&&(isNaN(n)||n%1!=0)||n>Po||n<Do)throw new Error("Unable to convert value to Integer.");return{type:Is,value:n}})),ys("toInteger",[Ts],(function(t,e){return{type:Is,value:Fo(e.value?1:0)}})),ys("toBoolean",[Is],(function(t,e){const n=Number(e.value);if(1!==n&&0!==n)throw new Error("Unable to convert value to Boolean.");return{type:Ts,value:n}})),ys("toBoolean",[Os],(function(t,e){if("true"!==e.value&&"false"!==e.value)throw new Error("Unable to convert value to Boolean.");return{type:Ts,value:"true"===e.value?1:0}})),ys("toColor",[Os],(function(t,e){return{type:zs,value:Fs(e.value)}})),ys("toUrl",[Os],(function(t,e){return{type:Js,value:e.value}})),ys("encodeUri",[Os],(function(t,e){try{return{type:Os,value:encodeURIComponent(e.value)}}catch(t){throw new Error("Unable to encodeUri string.")}})),ys("decodeUri",[Os],(function(t,e){try{return{type:Os,value:decodeURIComponent(e.value)}}catch(t){throw new Error("Unable to decodeUri string.")}})),ys("getIntegerValue",[Os,Is],qs),ys("getNumberValue",[Os,Ms],qs),ys("getBooleanValue",[Os,Ts],qs),ys("getStringValue",[Os,Os],qs),ys("getColorValue",[Os,zs],Gs),ys("getColorValue",[Os,Os],Gs),ys("getUrlValue",[Os,Js],Ks),ys("getUrlValue",[Os,Os],Ks),ys("parseUnixTime",[Is],(function(t,e){return{type:Rs,value:new Date(1e3*Number(e.value))}})),ys("nowLocal",[],(function(){return{type:Rs,value:new Date}})),ys("addMillis",[Rs,Is],(function(t,e,n){return{type:Rs,value:new Date(e.value.getTime()+Number(n.value))}})),ys("setYear",[Rs,Is],(function(t,e,n){const r=new Date(e.value);return r.setUTCFullYear(Number(n.value)),{type:Rs,value:r}})),ys("setMonth",[Rs,Is],(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:Rs,value:i}})),ys("setDay",[Rs,Is],(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(xs(e),"."));return r.setUTCDate(-1===i?0:i),{type:Rs,value:r}})),ys("setHours",[Rs,Is],(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:Rs,value:i}})),ys("setMinutes",[Rs,Is],(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:Rs,value:i}})),ys("setSeconds",[Rs,Is],(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:Rs,value:i}})),ys("setMillis",[Rs,Is],(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:Rs,value:i}})),ys("getYear",[Rs],Ys),ys("getMonth",[Rs],Zs),ys("getDay",[Rs],Qs),ys("getDayOfWeek",[Rs],tl),ys("getHours",[Rs],el),ys("getMinutes",[Rs],nl),ys("getSeconds",[Rs],rl),ys("getMillis",[Rs],il),ys("getIntervalSeconds",[Is],(function(t,e){return yl(t,e,1e3,60)})),ys("getIntervalTotalSeconds",[Is],(function(t,e){return yl(t,e,1e3)})),ys("getIntervalMinutes",[Is],(function(t,e){return yl(t,e,6e4,60)})),ys("getIntervalTotalMinutes",[Is],(function(t,e){return yl(t,e,6e4)})),ys("getIntervalHours",[Is],(function(t,e){return yl(t,e,$l,24)})),ys("getIntervalTotalHours",[Is],(function(t,e){return yl(t,e,$l)})),ys("getIntervalTotalDays",[Is],(function(t,e){return yl(t,e,864e5)})),ys("getIntervalTotalWeeks",[Is],(function(t,e){return yl(t,e,6048e5)})),ys("len",[Os],(function(t,e){return{type:Is,value:Fo(e.value.length)}})),ys("contains",[Os,Os],(function(t,e,n){return{type:Ts,value:e.value.includes(n.value)?1:0}})),ys("substring",[Os,Is,Is],(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:Os,value:e.value.substring(Number(n.value),Number(r.value))}})),ys("replaceAll",[Os,Os,Os],(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:Os,value:i}})),ys("index",[Os,Os],(function(t,e,n){return{type:Is,value:Fo(e.value.indexOf(n.value))}})),ys("lastIndex",[Os,Os],(function(t,e,n){return{type:Is,value:Fo(e.value.lastIndexOf(n.value))}})),ys("trim",[Os],(function(t,e){return{type:Os,value:e.value.trim()}})),ys("trimLeft",[Os],(function(t,e){return{type:Os,value:e.value.replace(/^\s+/,"")}})),ys("trimRight",[Os],(function(t,e){return{type:Os,value:e.value.replace(/\s+$/,"")}})),ys("toUpperCase",[Os],(function(t,e){return{type:Os,value:e.value.toUpperCase()}})),ys("toLowerCase",[Os],(function(t,e){return{type:Os,value:e.value.toLowerCase()}})),ys("padStart",[Os,Is,Os],al),ys("padStart",[Is,Is,Os],al),ys("padEnd",[Os,Is,Os],sl),ys("padEnd",[Is,Is,Os],sl),ys("testRegex",[Os,Os],(function(t,e,n){let r;try{r=new RegExp(n.value)}catch(t){throw new Error("Invalid regular expression.")}return{type:Ts,value:r.test(e.value)?1:0}})),ys("div",[Is,Is],(function(t,e,n){if(n.value===So)throw new Error("Division by zero is not supported.");let r=e.value/n.value;return r=Cs(0,r),As(t,r),{type:Is,value:r}})),ys("div",[Ms,Ms],(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:Ms,value:r}})),ys("mod",[Is,Is],(function(t,e,n){if(n.value===So)throw new Error("Division by zero is not supported.");let r=e.value%n.value;return r=Cs(0,r),As(t,r),{type:Is,value:r}})),ys("mod",[Ms,Ms],(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:Ms,value:r}})),ys("mul",[{type:Is,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:So;for(let e=1;e<n.length;++e)i*=n[e].value,i=Cs(0,i),As(t,i);return{type:Is,value:i}})),ys("mul",[{type:Ms,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:Ms,value:i}})),ys("sub",[{type:Is,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:So;for(let e=1;e<n.length;++e)i-=n[e].value,i=Cs(0,i),As(t,i);return{type:Is,value:i}})),ys("sub",[{type:Ms,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:Ms,value:i}})),ys("sum",[{type:Is,isVararg:!0}],(function(t){let e=So;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=Cs(0,e),As(t,e);return{type:Is,value:e}})),ys("sum",[{type:Ms,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:Ms,value:e}})),ys("abs",[Is],(function(t,e){const n=No(e.value);return As(t,n),{type:e.type,value:n}})),ys("abs",[Ms],(function(t,e){const n=Math.abs(e.value);return{type:Ms,value:n}})),ys("max",[{type:Is,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:Is,value:i}})),ys("max",[{type:Ms,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:Ms,value:Math.max(...n.map((t=>t.value)))}})),ys("min",[{type:Is,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:Is,value:i}})),ys("min",[{type:Ms,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:Ms,value:Math.min(...n.map((t=>t.value)))}})),ys("maxNumber",[],(function(){return{type:Ms,value:Ss}})),ys("minNumber",[],(function(){return{type:Ms,value:Ns}})),ys("maxInteger",[],(function(t){return As(t,Po),{type:Is,value:Po}})),ys("minInteger",[],(function(t){return As(t,Do),{type:Is,value:Do}})),ys("round",[Ms],(function(t,e){const n=Math.sign(e.value);return{type:Ms,value:n*Math.round(Math.abs(e.value))}})),ys("floor",[Ms],(function(t,e){return{type:Ms,value:Math.floor(e.value)}})),ys("ceil",[Ms],(function(t,e){return{type:Ms,value:Math.ceil(e.value)}})),ys("signum",[Is],(function(t,e){return{type:Is,value:Oo(e.value)}})),ys("signum",[Ms],(function(t,e){return{type:Ms,value:Math.sign(e.value)}})),ys("copySign",[Is,Is],(function(t,e,n){let r;if(n.value===So)r=e.value;else if(e.value===So)r=0;else{const t=Oo(n.value);r=No(e.value)*t}return As(t,r),{type:Is,value:r}})),ys("copySign",[Ms,Ms],(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:Ms,value:i}})),ys("getColorAlpha",[Os],ul),ys("getColorAlpha",[zs],ul),ys("getColorRed",[Os],dl),ys("getColorRed",[zs],dl),ys("getColorGreen",[Os],pl),ys("getColorGreen",[zs],pl),ys("getColorBlue",[Os],fl),ys("getColorBlue",[zs],fl),ys("setColorAlpha",[Os,Ms],gl),ys("setColorAlpha",[zs,Ms],gl),ys("setColorRed",[Os,Ms],hl),ys("setColorRed",[zs,Ms],hl),ys("setColorGreen",[Os,Ms],ml),ys("setColorGreen",[zs,Ms],ml),ys("setColorBlue",[Os,Ms],vl),ys("setColorBlue",[zs,Ms],vl),ys("rgb",[Ms,Ms,Ms],(function(t,e,n,r){const i={a:255,r:255*e.value,g:255*n.value,b:255*r.value};return{type:zs,value:Ds(i)}})),ys("argb",[Ms,Ms,Ms,Ms],(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:zs,value:Ds(o)}})),ys("getDictString",[Bs,{type:Os,isVararg:!0}],wl),ys("getStringFromDict",[Bs,{type:Os,isVararg:!0}],wl),ys("getDictNumber",[Bs,{type:Os,isVararg:!0}],xl),ys("getNumberFromDict",[Bs,{type:Os,isVararg:!0}],xl),ys("getDictInteger",[Bs,{type:Os,isVararg:!0}],kl),ys("getIntegerFromDict",[Bs,{type:Os,isVararg:!0}],kl),ys("getDictBoolean",[Bs,{type:Os,isVararg:!0}],El),ys("getBooleanFromDict",[Bs,{type:Os,isVararg:!0}],El),ys("getDictColor",[Bs,{type:Os,isVararg:!0}],Cl),ys("getColorFromDict",[Bs,{type:Os,isVararg:!0}],Cl),ys("getDictUrl",[Bs,{type:Os,isVararg:!0}],Al),ys("getUrlFromDict",[Bs,{type:Os,isVararg:!0}],Al),ys("getDictOptString",[Os,Bs,{type:Os,isVararg:!0}],Vl),ys("getOptStringFromDict",[Os,Bs,{type:Os,isVararg:!0}],Vl),ys("getDictOptNumber",[Ms,Bs,{type:Os,isVararg:!0}],jl),ys("getOptNumberFromDict",[Ms,Bs,{type:Os,isVararg:!0}],jl),ys("getDictOptInteger",[Is,Bs,{type:Os,isVararg:!0}],Pl),ys("getOptIntegerFromDict",[Is,Bs,{type:Os,isVararg:!0}],Pl),ys("getDictOptBoolean",[Ts,Bs,{type:Os,isVararg:!0}],Dl),ys("getOptBooleanFromDict",[Ts,Bs,{type:Os,isVararg:!0}],Dl),ys("getDictOptColor",[zs,Bs,{type:Os,isVararg:!0}],Fl),ys("getOptColorFromDict",[zs,Bs,{type:Os,isVararg:!0}],Fl),ys("getDictOptColor",[Os,Bs,{type:Os,isVararg:!0}],Fl),ys("getOptColorFromDict",[Os,Bs,{type:Os,isVararg:!0}],Fl),ys("getDictOptUrl",[Os,Bs,{type:Os,isVararg:!0}],Sl),ys("getOptUrlFromDict",[Os,Bs,{type:Os,isVararg:!0}],Sl),ys("getDictOptUrl",[Js,Bs,{type:Os,isVararg:!0}],Sl),ys("getOptUrlFromDict",[Js,Bs,{type:Os,isVararg:!0}],Sl),ys("getArrayString",[Ls,Is],Il),ys("getStringFromArray",[Ls,Is],Il),ys("getArrayNumber",[Ls,Is],Ml),ys("getNumberFromArray",[Ls,Is],Ml),ys("getArrayInteger",[Ls,Is],Tl),ys("getIntegerFromArray",[Ls,Is],Tl),ys("getArrayBoolean",[Ls,Is],zl),ys("getBooleanFromArray",[Ls,Is],zl),ys("getArrayColor",[Ls,Is],Jl),ys("getColorFromArray",[Ls,Is],Jl),ys("getArrayUrl",[Ls,Is],Rl),ys("getUrlFromArray",[Ls,Is],Rl),ys("getArrayFromArray",[Ls,Is],Bl),ys("getDictFromArray",[Ls,Is],Ll),ys("getArrayOptString",[Ls,Is,Os],Ul),ys("getOptStringFromArray",[Ls,Is,Os],Ul),ys("getArrayOptNumber",[Ls,Is,Ms],Wl),ys("getOptNumberFromArray",[Ls,Is,Ms],Wl),ys("getArrayOptInteger",[Ls,Is,Is],Hl),ys("getOptIntegerFromArray",[Ls,Is,Is],Hl),ys("getArrayOptBoolean",[Ls,Is,Ts],ql),ys("getOptBooleanFromArray",[Ls,Is,Ts],ql),ys("getArrayOptColor",[Ls,Is,zs],Gl),ys("getOptColorFromArray",[Ls,Is,zs],Gl),ys("getArrayOptColor",[Ls,Is,Os],Gl),ys("getOptColorFromArray",[Ls,Is,Os],Gl),ys("getArrayOptUrl",[Ls,Is,Js],Kl),ys("getOptUrlFromArray",[Ls,Is,Js],Kl),ys("getArrayOptUrl",[Ls,Is,Os],Kl),ys("getOptUrlFromArray",[Ls,Is,Os],Kl),ys("getOptArrayFromArray",[Ls,Is],(function(t,e,n){try{return Bl(t,e,n)}catch(t){return{type:"array",value:[]}}})),ys("getOptDictFromArray",[Ls,Is],(function(t,e,n){try{return Ll(t,e,n)}catch(t){return{type:"dict",value:{}}}}));const Yl={StringLiteral:function(t,e){return{type:Os,value:e.value}},NumberLiteral:function(t,e){return{type:Ms,value:e.value}},IntegerLiteral:function(t,e){return As(t,e.value),{type:Is,value:e.value}},BooleanLiteral:function(t,e){return{type:Ts,value:e.value?1:0}},UnaryExpression:function(t,e){const n=_s(Zl(t,e.argument));switch(e.operator){case"!":if(n.type===Ts)return{type:Ts,value:n.value?0:1};js("".concat(e.operator).concat(ks(n)),"A Boolean is expected after a unary not.");case"+":case"-":const r="+"===e.operator?1:-1;if(n.type===Is){const e=n.value*Fo(r);return As(t,e),{type:Is,value:e}}if(n.type===Ms)return{type:Ms,value:n.value*r};js("".concat(e.operator).concat(ks(n)),"A Number is expected after a unary ".concat("+"===e.operator?"plus":"minus","."))}},ConditionalExpression:function(t,e){const n=_s(Zl(t,e.test));if(n.type===Ts)return n.value?Zl(t,e.consequent):Zl(t,e.alternate);js("".concat(ks(n)," ? ").concat(ks(Zl(t,e.consequent))," : ").concat(ks(Zl(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 Zl(t,e.expressions[0]);for(let r=0;r<e.expressions.length;++r)n+=e.quasis[r].value,n+=xs(Zl(t,e.expressions[r]));return n+=e.quasis[e.quasis.length-1].value,{type:Os,value:n}},LogicalExpression:function(t,e){const n=_s(Zl(t,e.left));if(n.type!==Ts&&js("".concat(ks(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:Ts,value:0};const r=_s(Zl(t,e.right));return r.type!==Ts&&js("".concat(ks(n)," ").concat(e.operator," ").concat(ks(r)),"Operator '".concat(e.operator,"' cannot be applied to different types: Boolean and ").concat(Es(r.type),".")),{type:Ts,value:r.value}},BinaryExpression:function(t,e){const n=e.operator,r=Zl(t,e.left),i=Zl(t,e.right);if(r.type!==i.type&&js("".concat(ks(r)," ").concat(e.operator," ").concat(ks(i)),"Operator '".concat(n,"' cannot be applied to different types: ").concat(Es(r.type)," and ").concat(Es(i.type),".")),"=="===n||"!="===n)return function(t,e,n){let r;return r=e.type===Rs&&n.type===Rs?e.value.getTime()===n.value.getTime():e.value===n.value,"!="===t&&(r=!r),{type:Ts,value:r?1:0}}(n,r,i);if(">"===n||">="===n||"<"===n||"<="===n)return function(t,e,n){let r;e.type!==Ms&&e.type!==Is&&e.type!==Rs&&js("".concat(ks(e)," ").concat(t," ").concat(ks(n)),"Operator '".concat(t,"' cannot be applied to ").concat(Es(e.type)," type."));const i=e.type===Rs?e.value.getTime():e.value,o=n.type===Rs?n.value.getTime():n.value;return r=">"===t?i>o:">="===t?i>=o:"<"===t?i<o:i<=o,{type:Ts,value:r?1:0}}(n,r,i);if("+"===n||"-"===n)return function(t,e,n,r){if(n.type!==Os&&n.type!==Ms&&n.type!==Is&&js("".concat(ks(n)," ").concat(e," ").concat(ks(r)),"Operator '".concat(e,"' cannot be applied to ").concat(Es(n.type)," type.")),n.type===Os)return"-"===e&&js("".concat(ks(n)," - ").concat(ks(r)),"Operator '".concat(e,"' cannot be applied to ").concat(Es(n.type)," type.")),{type:Os,value:n.value+r.value};let i="+"===e?n.value+r.value:n.value-r.value;if(n.type===Is)try{i=Cs(0,i),As(t,i)}catch(t){js("".concat(ks(n)," ").concat(e," ").concat(ks(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!==Is&&n.type!==Ms&&js("".concat(ks(n)," ").concat(e," ").concat(ks(r)),"Operator '".concat(e,"' cannot be applied to ").concat(Es(n.type)," type.")),"*"===e)i=n.value*r.value;else{if("/"!==e&&"%"!==e)throw new Error("Unsupported operation ".concat(e));0===Number(r.value)&&js("".concat(ks(n)," ").concat(e," ").concat(ks(r)),"Division by zero is not supported."),i="/"===e?n.value/r.value:n.value%r.value}if(n.type===Is)try{i=Cs(0,i),As(t,i)}catch(t){js("".concat(ks(n)," ").concat(e," ").concat(ks(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=>Zl(t,e))),o=n+":"+i.map((t=>t.type)).join("#");if(vs.has(o))r=vs.get(o);else{const t=function(t,e){const n=ms.get(t);if(!n)return{type:"missing"};let r=null;for(let t=0;t<n.length;++t){const i=$s(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=>Es(t.type))).join(", "),r="".concat(n,"(").concat(Xl(i),")");"few"===t.type&&0===i.length?js(r,"Non empty argument list is required for function '".concat(n,"'.")):"many"===t.type||"few"===t.type||"mismatch"===t.type?js(r,"Function '".concat(n,"' has no matching override for given argument types: ").concat(e,".")):js(r,"Unknown function name: ".concat(n,"."))}r=t}if(!r)throw new Error("Function not found");try{return r.cb(t,...i)}catch(t){js("".concat(n,"(").concat(Xl(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 Zl(t,e){if(e.type in Yl)return Yl[e.type](t,e);throw new Error("Unsupported expression")}function Ql(t,e){try{const n={variables:t,warnings:[],safeIntegerOverflow:!1};!function(t,e){let n="";if(bs(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=Zl(n,e);return n.safeIntegerOverflow&&n.warnings.push(Qt(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 tc{constructor(t){this.ast=t}apply(t,e){if(!function(t,e){let n=!1;return bs(t,{Variable(t){e.has(t.id.name)||(n=!0)}}),n}(this.ast,t))try{const n=Ql(t,this.ast);n.warnings.forEach(e);const r=n.result;if("error"===r.type)return void e(Qt(new Error("Expression execution error"),{additional:{message:r.value}}));const i=r.value;if(i instanceof Date)return ws(i);if("boolean"===r.type)return Boolean(i);if("color"===r.type){const t=se(String(i));if(t)return Ds(t);e(Qt(new Error("Expression execution error")))}if("integer"===r.type)return i>2147483647||i<-2147483648?void e(Qt(new Error("Expression result is out of 32-bit int range"))):Number(i);if("array"===r.type||"dict"===r.type)try{return JSON.stringify(i)}catch(t){return e(Qt(new Error("Failed to stringify ".concat(r.type)))),"<".concat(r.type,">")}return i}catch(t){return void e(Qt(new Error("Expression execution error")))}}}function ec(t,e,n){if(t)if("string"==typeof t){if((r=t).indexOf("@{")>-1||r.indexOf("\\")>-1){e.hasExpression=!0;try{const n=hs(t,{startRule:"JsonStringContents"}),r=Vs(n);return e.vars.push(...r),new tc(n)}catch(e){return void n(Qt(new Error("Unable to parse expression"),{additional:{expression:t}}))}}}else{if(Array.isArray(t))return t.map((t=>ec(t,e,n)));if("object"==typeof t){const r={};for(const i in t)r[i]=ec(t[i],e,n);return r}}var r;return t}function nc(t,e,n){if(t){if(t instanceof tc)return t.apply(e,n);if(Array.isArray(t))return t.map((t=>nc(t,e,n)));if("object"==typeof t){const r={};for(const i in t)r[i]=nc(t[i],e,n);return r}}return t}function rc(t,e){const n={vars:[],hasExpression:!1},r=ec(t,n,e);return{vars:[...new Set(n.vars)],hasExpression:n.hasExpression,applyVars:t=>nc(r,t,e)}}const ic={pagers:function(){return Kt(new Map)}},oc=new Map,ac=new Map;function sc(t){const e=oc.get(t)||Kt("");return oc.has(t)||oc.set(t,e),e}function lc(t){const e=ac.get(t)||new Map;return ac.has(t)||ac.set(t,e),e}class cc{setVariable(t){const e=t.getName(),n=lc(this);if(n.has(e))throw new Error("Variable with the same name already exist");n.set(e,t),sc(this).set(e)}getVariable(t){return lc(this).get(t)}}function uc(){return new cc}function dc(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 pc=new Set(["start","stop","pause","resume","cancel","reset"]);class fc{constructor(t){dc(this,"timers",new Map),dc(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(Qt(new Error("Misconfigured timer"),{additional:{id:t.id}})):this.logError(Qt(new Error("Missing timer id")))}execTimerAction(t,e){if(!(t&&e&&this.timers.has(t)&&pc.has(e)))return void this.logError(Qt(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(Qt(new Error("The timer is already running")));if("paused"===t.state)return void this.logError(Qt(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(Qt(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(Qt(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(Qt(new Error("The timer has already been stopped")))}pause(t){if("stopped"===t.state)return void this.logError(Qt(new Error("The timer has already been stopped")));if("paused"===t.state)return void this.logError(Qt(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(Qt(new Error("The timer is already running"))):this.logError(Qt(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 gc(t,e,n,r){const{variable_name:i}=n;if(!i)return void e(Qt(new Error("Incorrect ".concat(n.type," action")),{additional:{name:i}}));const o=t.get(i);if(!o)return void e(Qt(new Error("Cannot find variable"),{additional:{name:i}}));const a=o.getType();"array"===a?r(o):e(Qt(new Error("Trying to insert value into the non-array"),{additional:{name:i,type:a}}))}function hc(t){let e,n,r,i,o,a,s,l;return n=new is({props:{svgFiltersMap:t[3]}}),i=new Ga({props:{div:t[4],templateContext:t[7],layoutParams:{tooltips:t[2]}}}),{c(){e=M("div"),Bt(n.$$.fragment),r=J(),Bt(i.$$.fragment),L(e,"class",o=""+(Yt.root+(t[5]?" ".concat(Yt.root_platform_desktop):"")+(t[0]?" ".concat(t[0]):"")))},m(t,o){N(t,e,o),Lt(n,e,null),D(e,r),Lt(i,e,null),a=!0,s||(l=B(e,"touchstart",_c,{passive:!0}),s=!0)},p(t,r){const s={};8&r[0]&&(s.svgFiltersMap=t[3]),n.$set(s);const l={};16&r[0]&&(l.div=t[4]),4&r[0]&&(l.layoutParams={tooltips:t[2]}),i.$set(l),(!a||33&r[0]&&o!==(o=""+(Yt.root+(t[5]?" ".concat(Yt.root_platform_desktop):"")+(t[0]?" ".concat(t[0]):""))))&&L(e,"class",o)},i(t){a||(Pt(n.$$.fragment,t),Pt(i.$$.fragment,t),a=!0)},o(t){Dt(n.$$.fragment,t),Dt(i.$$.fragment,t),a=!1},d(t){t&&O(e),Ut(n),Ut(i),s=!1,l()}}}function mc(t){let e,n,r=!t[1]&&t[4]&&hc(t);return{c(){r&&r.c(),e=R()},m(t,i){r&&r.m(t,i),N(t,e,i),n=!0},p(t,n){!t[1]&&t[4]?r?(r.p(t,n),18&n[0]&&Pt(r,1)):(r=hc(t),r.c(),Pt(r,1),r.m(e.parentNode,e)):r&&(Vt(),Dt(r,1,1,(()=>{r=null})),jt())},i(t){n||(Pt(r),n=!0)},o(t){Dt(r),n=!1},d(t){t&&O(e),r&&r.d(t)}}}let vc=Kt(!0),yc=0;function $c(){vc.set(!1)}function bc(){vc.set(!0)}function _c(){}function wc(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 cc}=e,{mix:g=""}=e,{customization:h={}}=e,{builtinProtocols:m=["http","https","tel","mailto","intent"]}=e,{extensions:v=new Map}=e,{onError:y}=e,{onStat:$}=e,{onCustomAction:b}=e,{onComponent:_}=e,{typefaceProvider:w=(t=>"")}=e,{fetchInit:x={}}=e,{tooltipRoot:k}=e,{customComponents:E}=e,C=Kt("desktop"===u);if(f(t,C,(t=>n(5,r=t))),"auto"===u&&"undefined"!=typeof matchMedia){const t=matchMedia("(any-pointer: coarse)");C.set(!t.matches),t.addListener((()=>{C.set(!t.matches)}))}let A="light",V=null;function j(){"system"===d&&V&&n(27,A=V.matches?"dark":"light")}const P=new Set(m);let D=!1;c||(D=!0,U(Qt(new Error('"json" prop is required')))),l||(D=!0,U(Qt(new Error('"id" prop is required'))));let F=function(t){if(!t)return Qt(new Error("Missing object"));const e=t.card,n=t.templates||{};if(!e)return Qt(new Error("Missing card"));if(!e.states||!e.states.length)return Qt(new Error("Missing states"));for(const t in n)if(n.hasOwnProperty(t)&&t in Ua)return Qt(new Error("Template name collision"),{additional:{templateName:t}});for(let t=0;t<e.states.length;++t){if(!e.states[t].div)return Qt(new Error("Missing state div"),{additional:{stateId:e.states[t].state_id}});if("number"!=typeof e.states[t].state_id)return Qt(new Error("Missing state_id"),{additional:{index:t}})}return null}(c);const S=c.templates||{};F&&(D=!0,U(F));const N={stateChange:!1},O=sc(p),I=lc(p),M=new Map,T=new Map,z=new Map;let J=null,R=0,B=[];function L(t){const e=rc(t,U);return e.hasExpression?e.applyVars(T):t}function U(t){y?y({error:t}):"warn"===(null==t?void 0:t.level)?console.warn(t):console.error(t)}function W(t,e){$&&$({type:t,action:e})}let H=0;function q(t){return"".concat(l,"-").concat(H++)}let G={},K={};function X(t){const e=t.url?String(t.url):"",r=t.typed;if(e)try{const r=e.replace(/div-action:\/\//,""),i=/([^?]+)\?(.+)/.exec(r);if(!i)return;const o=new URLSearchParams(i[2]);switch(i[1]){case"set_state":!function(t){if(!t)throw new Error("Missing state id");let e=lt,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}}(o.get("state_id"));break;case"set_current_item":!function(t,e){if(!t||!e)throw new Error('Missing data for "set-current-item" action');if(isNaN(Number(e)))throw new Error('Incorrect item for "set-current-item" action');const n=nt(t);n&&n.setCurrentItem(Number(e))}(o.get("id"),o.get("item"));break;case"set_previous_item":!function(t,e){if(!t)throw new Error('Missing id for "set-previous-item" action');if(e&&"clamp"!==e&&"ring"!==e)throw new Error('Incorrect overflow value for "set-previous-item" action');e=e||"clamp";const n=nt(t);n&&n.setPreviousItem(e)}(o.get("id"),o.get("overflow"));break;case"set_next_item":!function(t,e){if(!t)throw new Error('Missing id for "set-next-item" action');if(e&&"clamp"!==e&&"ring"!==e)throw new Error('Incorrect overflow value for "set-next-item" action');e=e||"clamp";const n=nt(t);n&&n.setNextItem(e)}(o.get("id"),o.get("overflow"));break;case"set_variable":const i=o.get("name"),a=o.get("value");if(i&&null!==a){const t=T.get(i);if(t){const e=t.getType();"dict"===e||"array"===e?U(Qt(new Error("Setting ".concat(e," variables is not supported")),{additional:{name:i}})):t.set(a)}else U(Qt(new Error("Cannot find variable"),{additional:{name:i}}))}else U(Qt(new Error("Incorrect set_variable_action"),{additional:{url:r}}));break;case"timer":const s=o.get("action"),l=o.get("id");J?J.execTimerAction(l,s):U(Qt(new Error("Incorrect timer action"),{additional:{id:l,action:s}}));break;case"video":!function(t,e){if(t){const n=nt(t);n?"start"===e?n.start():"pause"===e?n.pause():U(Qt(new Error("Unknown video action"),{additional:{id:t,action:e}})):U(Qt(new Error("Video component is not found"),{additional:{id:t,action:e}}))}else U(Qt(new Error("Missing id in video action"),{additional:{action:e}}))}(o.get("id"),o.get("action"));break;case"download":!function(t,e){if(t){let n;n="function"==typeof x?x(t):x,fetch(t,n).then((t=>{if(!t.ok)throw new Error("Response is not ok");return t.json()})).then((n=>{var r,i,o;if(n){if(n.templates)for(const t in n.templates)S.hasOwnProperty(t)||(S[t]=n.templates[t]);if(Array.isArray(null===(r=n.patch)||void 0===r?void 0:r.changes)){if("transactional"===n.patch.mode){const r=n.patch.changes.find((t=>!tt.has(t.id)));if(r)return U(Qt(new Error("Skipping transactional, child is not found"),{additional:{url:t,id:r.id}})),void Y(null===(i=e.download_callbacks)||void 0===i?void 0:i.on_fail_actions)}n.patch.changes.forEach((t=>{const e=tt.get(t.id);e&&e.replaceWith(t.id,t.items)})),Y(null===(o=e.download_callbacks)||void 0===o?void 0:o.on_success_actions)}}else U(Qt(new Error("Incorrect patch"),{additional:{url:t}}))})).catch((n=>{var r;U(Qt(new Error("Failed to download the patch"),{additional:{url:t,originalError:n}})),Y(null===(r=e.download_callbacks)||void 0===r?void 0:r.on_fail_actions)}))}else U(Qt(new Error("Missing url in download action"),{additional:{url:t}}))}(o.get("url"),t);break;case"show_tooltip":!function(t,e){var r;if(!t)return void U(Qt(new Error("Missing id in show_tooltip action")));const i=et.get(t);if(!i)return void U(Qt(new Error("Tooltip with the provided id is not found"),{additional:{id:t}}));if("true"!==e&&B.some((e=>e.desc.id===t)))return;const o={internalId:++R,ownerNode:i.onwerNode,desc:i.tooltip,timeoutId:0};n(2,B=[...B,o]);const a=null!==(r=i.tooltip.duration)&&void 0!==r?r:5e3;a&&(o.timeoutId=window.setTimeout((()=>{o.timeoutId=0,n(2,B=B.filter((t=>t.internalId!==o.internalId)))}),a))}(o.get("id"),o.get("multiple"));break;case"hide_tooltip":!function(t){t?n(2,B=B.filter((e=>{const n=e.desc.id!==t;return!n&&e.timeoutId&&(clearTimeout(e.timeoutId),e.timeoutId=null),n}))):U(Qt(new Error("Missing id in hide_tooltip action")))}(o.get("id"));break;default:U(Qt(new Error("Unknown type of action"),{additional:{url:e}}))}}catch(t){U(Qt(t,{additional:{url:e}}))}else if(r)switch(r.type){case"set_variable":{const{variable_name:t,value:e}=r;if(t&&e){const n=T.get(t);n?n.getType()===e.type?n.setValue(e.value):U(Qt(new Error("Trying to set value with invalid type"),{additional:{name:t,type:e.type}})):U(Qt(new Error("Cannot find variable"),{additional:{name:t}}))}else U(Qt(new Error("Incorrect set_variable action"),{additional:{name:t}}));break}case"array_insert_value":!function(t,e,n){const{variable_name:r,index:i,value:o}=n;!o||"number"!=typeof i&&void 0!==i?e(Qt(new Error("Incorrect array_insert_value action"),{additional:{name:r}})):gc(t,e,n,(t=>{const a=t.getValue();if("number"==typeof i&&(i<0||i>a.length))e(Qt(new Error("Index out of bound for mutation ".concat(n.type)),{additional:{name:r,index:i,length:a.length}}));else{const e=a.slice();"number"==typeof i?e.splice(i,0,o.value):e.push(o.value),t.setValue(e)}}))}(T,U,r);break;case"array_remove_value":!function(t,e,n){const{variable_name:r,index:i}=n;"number"==typeof i?gc(t,e,n,(t=>{const o=t.getValue();if("number"==typeof i&&(i<0||i>=o.length))e(Qt(new Error("Index out of bound for mutation ".concat(n.type)),{additional:{name:r,index:i,length:o.length}}));else{const e=o.slice();e.splice(i,1),t.setValue(e)}})):e(Qt(new Error("Incorrect array_remove_value action"),{additional:{name:r}}))}(T,U,r);break;case"copy_to_clipboard":!function(t,e){!e.content||"text"!==e.content.type&&"url"!==e.content.type||"string"!=typeof e.content.value?t(Qt(new Error("Incorrect action"),{additional:{action:e}})):"undefined"!=typeof navigator&&"clipboard"in navigator&&navigator.clipboard&&"writeText"in navigator.clipboard&&"function"==typeof navigator.clipboard.writeText?navigator.clipboard.writeText(e.content.value).catch((e=>{t(Qt(new Error("Failed to copy to the clipboard"),{additional:{originalError:String(e)}}))})):t(Qt(new Error("Clipboard is unavailable"),{additional:{action:e}}))}(U,r);break;default:U(Qt(new Error("Unknown type of action"),{additional:{type:r.type}}))}}async function Y(t,e){if(t&&Array.isArray(t)){for(let n=0;n<t.length;++n){let r=t[n];const i=r.url,o=r.typed;if(i){const t=he(i);if(t)if(me(t,P)){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?(X(r),await vt()):r.log_id&&(Z(r),await vt())}else o&&X(r)}t.forEach((t=>{t.log_id&&W("click",t)}))}}function Z(t){null==b||b(t)}const Q=new Map,tt=new Map,et=new Map;function nt(t){if(Q.has(t))return Q.get(t);U(Qt(new Error("Missing instance with id"),{additional:{id:t}}))}const rt=new Map;function it(t){for(const e of t)T.has(e)&&t.delete(e);return t}st(Zt,{logError:U,logStat:W,hasTemplate:function(t){return t in S},processTemplate:function(t,e){if(!t)return{json:t,templateContext:e};const n=new Set([t.type]);for(;t.type in S;){if(({json:t,templateContext:e}=os(t,e,S,U)),n.has(t.type))return{json:t,templateContext:e};n.add(t.type)}return{json:t,templateContext:e}},genId:q,genClass:function(t){return"divkit-".concat(q())},execAction:X,execAnyActions:Y,execCustomAction:Z,isRunning:function(t){return N[t]},setRunning:function(t,e){N[t]=e},registerInstance:function(t,e){Q.has(t)?U(Qt(new Error("Duplicate instance id"),{additional:{id:t}})):Q.set(t,e)},unregisterInstance:function(t){Q.delete(t)},registerParentOf:function(t,e){tt.set(t,e)},unregisterParentOf:function(t){tt.delete(t)},registerTooltip:function(t,e){et.has(e.id)&&U(Qt(new Error("Duplicate tooltip id"),{additional:{id:e.id}})),et.set(e.id,{onwerNode:t,tooltip:e})},unregisterTooltip:function(t){et.delete(t.id),B.some((e=>e.desc.id===t.id))&&n(2,B=B.filter((e=>e.desc.id!==t.id)))},onTooltipClose:function(t){n(2,B=B.filter((e=>e.internalId!==t)))},tooltipRoot:k,addSvgFilter:function(t,e){const r="".concat(t,":").concat(e);if(K[r]=K[r]||0,++K[r],G[r])return G[r];const i="".concat(q(),"-svg-filter");return n(3,G=Object.assign(Object.assign({},G),{[r]:i})),i},removeSvgFilter:function(t,e){if(!t)return;const r="".concat(t,":").concat(e);K[r]&&0==--K[r]&&n(3,G=Object.keys(G).reduce(((t,e)=>(K[e]&&(t[e]=G[e]),t)),{}))},getDerivedFromVars:function(t){if(!t)return ss(t);const e=rc(t,U);return e.vars.length?Xt(e.vars.map((t=>T.get(t)||function(t){const e=z.get(t)||Kt(void 0);return z.has(t)||z.set(t,e),e}(t))).filter(ce),(()=>e.applyVars(T))):e.hasExpression?ss(e.applyVars(T)):ss(t)},getJsonWithVars:L,getStore:function(t){return rt.has(t)||function(t){rt.has(t)||rt.set(t,ic[t]())}(t),rt.get(t)},getVariable:function(t,e){const n=T.get(t);if(n){const r=n.getType();if(r!==e)return void U(Qt(new Error('Variable should have type "'.concat(e,'"')),{additional:{name:t,foundType:r}}))}return n},getCustomization:function(t){return null==h?void 0:h[t]},getBuiltinProtocols:function(){return P},getExtension:function(t,e){const n=v.get(t);if(n)return new n(e||{})},getExtensionContext:function(){return{variables:T,logError:U}},typefaceProvider:w,isDesktop:C,isPointerFocus:vc,customComponents:E,registerComponent:void 0,unregisterComponent:void 0}),st(Te,{hasAction:()=>!1});const lt={setState(t){throw new Error("Not implemented")},getChild(t){if(ct&&ct.has(t))return ct.get(t);U(Qt(new Error("Missing state block with id"),{additional:{id:t}}))}};let ct=null;st(xe,{registerInstance(t,e){ct||(ct=new Map),ct.has(t)?U(Qt(new Error("Duplicate state with id"),{additional:{id:t}})):ct.set(t,e)},unregisterInstance(t){null==ct||ct.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 ut=null===(i=null==c?void 0:c.card)||void 0===i?void 0:i.variables;Array.isArray(ut)&&ut.forEach((t=>{if(t&&t.type in Mo&&t.name){if(M.has(t.name))return void U(Qt(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)&&U(Qt(new Error("The value of the integer variable could lose accuracy"),{level:"warn",additional:{name:t.name,value:t.value}}));try{const e=To(t.name,t.type,t.value);M.set(t.name,e),T.set(t.name,e)}catch(e){U(Qt(e,{additional:{name:t.name}}))}}}));const dt=c.palette;dt&&dt[A].forEach((t=>{if(M.has(t.name))U(Qt(new Error("Duplicate variable"),{additional:{name:t.name}}));else try{const e=To(t.name,"color",t.color);M.set(t.name,e),T.set(t.name,e)}catch(e){U(Qt(e,{additional:{name:t.name}}))}}));for(const[t,e]of I)T.has(t)||T.set(t,e);O.subscribe((t=>{if(t&&!T.has(t)){const e=I.get(t);T.set(t,e);const n=z.get(t);if(n){let t=0;e.subscribe((()=>{n.set(++t)}))}}}));const pt=null===(o=null==c?void 0:c.card)||void 0===o?void 0:o.variable_triggers;Array.isArray(pt)&&pt.forEach((t=>{let e=!1;if("string"!=typeof t.condition)return void U(Qt(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=hs(t.condition,{startRule:"JsonStringContents"}),i=Vs(r);if(!i.length)return void U(Qt(new Error("variable_trigger must have variables in the condition"),{additional:{condition:t.condition}}));(function(t){const e=new Set(t);return it(e),e.size?new Promise((t=>{const n=O.subscribe((()=>{it(e),e.size||(n(),t())}))})):Promise.resolve()})(i).then((()=>{Xt(i.map((t=>T.get(t))).filter(ce),(()=>{const t=Ql(T,r);return t.warnings.forEach(U),t.result})).subscribe((r=>{"error"!==r.type?(r.value&&("on_variable"===n||"on_condition"===n&&!1===e)&&t.actions.forEach((t=>{const e=L(t);e.log_id&&X(e)})),e=Boolean(r.value)):U(Qt(new Error("variable_trigger condition execution error"),{additional:{message:r.value}}))}))}))}catch(e){U(Qt(new Error("Unable to parse variable_trigger"),{additional:{condition:t.condition}}))}else U(Qt(new Error("variable_trigger has an unsupported mode"),{additional:{mode:n}}))}));const ft=null===(a=null==c?void 0:c.card)||void 0===a?void 0:a.timers;if(ft){const t=J=new fc({logError:U,applyVars:L,hasVariableWithType:function(t,e){const n=T.get(t);return(null==n?void 0:n.getType())===e},setVariableValue:function(t,e){const n=T.get(t);n?n.setValue(e):U(Qt(new Error("Cannot find variable"),{additional:{name:t}}))},execAnyActions:Y});ft.forEach((e=>t.createTimer(e)))}const gt=null===(s=null==c?void 0:c.card)||void 0===s?void 0:s.states;let ht;return gt&&!D&&(ht={type:"state",id:"root",width:{type:"match_parent"},height:{type:"match_parent"},states:gt.map((t=>({state_id:t.state_id.toString(),div:t.div})))}),ot((()=>{yc++,1===yc&&(window.addEventListener("keydown",$c),window.addEventListener("pointerdown",bc))})),at((()=>{yc--,yc||(window.removeEventListener("keydown",$c),window.removeEventListener("pointerdown",bc)),J&&J.destroy(),B.forEach((t=>{t.timeoutId&&(clearTimeout(t.timeoutId),t.timeoutId=null)}))})),t.$$set=t=>{"id"in t&&n(9,l=t.id),"json"in t&&n(10,c=t.json),"platform"in t&&n(11,u=t.platform),"theme"in t&&n(8,d=t.theme),"globalVariablesController"in t&&n(12,p=t.globalVariablesController),"mix"in t&&n(0,g=t.mix),"customization"in t&&n(13,h=t.customization),"builtinProtocols"in t&&n(14,m=t.builtinProtocols),"extensions"in t&&n(15,v=t.extensions),"onError"in t&&n(16,y=t.onError),"onStat"in t&&n(17,$=t.onStat),"onCustomAction"in t&&n(18,b=t.onCustomAction),"onComponent"in t&&n(19,_=t.onComponent),"typefaceProvider"in t&&n(20,w=t.typefaceProvider),"fetchInit"in t&&n(21,x=t.fetchInit),"tooltipRoot"in t&&n(22,k=t.tooltipRoot),"customComponents"in t&&n(23,E=t.customComponents)},t.$$.update=()=>{268435712&t.$$.dirty[0]&&("light"===d||"dark"===d?n(27,A=d):"system"===d?"undefined"!=typeof matchMedia?(V||(n(28,V=matchMedia("(prefers-color-scheme: dark)")),V.addListener(j)),n(27,A=V.matches?"dark":"light")):n(27,A="light"):U(Qt(new Error("Unsupported theme")))),134217728&t.$$.dirty[0]&&A&&dt&&dt[A].forEach((t=>{const e=T.get(t.name);e&&e.setValue(t.color)}))},[g,D,B,G,ht,r,C,{},d,l,c,u,p,h,m,v,y,$,b,_,w,x,k,E,function(t){n(8,d=t)},function(){},function(t){X(L(t))},A,V]}const xc=class extends qt{constructor(t){super(),Wt(this,t,wc,mc,d,{id:9,json:10,platform:11,theme:8,globalVariablesController:12,mix:0,customization:13,builtinProtocols:14,extensions:15,onError:16,onStat:17,onCustomAction:18,onComponent:19,typefaceProvider:20,fetchInit:21,tooltipRoot:22,customComponents:23,setTheme:24,getDebugVariables:25,execAction:26},null,[-1,-1,-1,-1])}get setTheme(){return this.$$.ctx[24]}get getDebugVariables(){return this.$$.ctx[25]}get execAction(){return this.$$.ctx[26]}};class kc{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 vt()}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 Ec(t){return t instanceof HTMLElement}function Cc(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(Ec);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)}}}const Ac=["target","hydrate"];function Vc(t){const{target:e,hydrate:n}=t,r=function(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}(t,Ac);return new xc({target:e,props:r,hydrate:n})}var jc=exports;for(var Pc in e)jc[Pc]=e[Pc];e.__esModule&&Object.defineProperty(jc,"__esModule",{value:!0})})();
|
|
2
2
|
//# sourceMappingURL=client.js.map
|