@divkitframework/divkit
Version:
DivKit for the web
8 lines • 420 kB
JavaScript
/*!
DivKit v31.12.0
https://github.com/divkit/divkit
@licence Apache-2.0
*/(function(){"use strict";var xb=Object.defineProperty;var $b=(S,Yn,qn)=>Yn in S?xb(S,Yn,{enumerable:!0,configurable:!0,writable:!0,value:qn}):S[Yn]=qn;var mr=(S,Yn,qn)=>$b(S,typeof Yn!="symbol"?Yn+"":Yn,qn);function S(){}const Yn=e=>e;function qn(e,r){for(const t in r)e[t]=r[t];return e}function na(e){return e()}function ia(){return Object.create(null)}function qr(e){e.forEach(na)}function Ir(e){return typeof e=="function"}function wd(e,r){return e!=e?r==r:e!==r||e&&typeof e=="object"||typeof e=="function"}let Wo;function Hn(e,r){return e===r?!0:(Wo||(Wo=document.createElement("a")),Wo.href=r,e===Wo.href)}function Cr(e,r){return e!=e?r==r:e!==r}function kd(e){return Object.keys(e).length===0}function P(e,...r){if(e==null){for(const n of r)n(void 0);return S}const t=e.subscribe(...r);return t.unsubscribe?()=>t.unsubscribe():t}function Ad(e){let r;return P(e,t=>r=t)(),r}function sn(e,r,t){e.$$.on_destroy.push(P(r,t))}function Uo(e,r,t,n){if(e){const i=oa(e,r,t,n);return e[0](i)}}function oa(e,r,t,n){return e[1]&&n?qn(t.ctx.slice(),e[1](n(r))):t.ctx}function Go(e,r,t,n){if(e[2]&&n){const i=e[2](n(t));if(r.dirty===void 0)return i;if(typeof i=="object"){const o=[],s=Math.max(r.dirty.length,i.length);for(let a=0;a<s;a+=1)o[a]=r.dirty[a]|i[a];return o}return r.dirty|i}return r.dirty}function Yo(e,r,t,n,i,o){if(i){const s=oa(r,t,n,o);e.p(s,i)}}function qo(e){if(e.ctx.length>32){const r=[],t=e.ctx.length/32;for(let n=0;n<t;n++)r[n]=-1;return r}return-1}function Qs(e,r,t){return e.set(t),r}function Jo(e){return e&&Ir(e.destroy)?e.destroy:S}function sa(e){const r=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return r?[parseFloat(r[1]),r[2]||"px"]:[e,"px"]}const la=typeof window<"u";let xs=la?()=>window.performance.now():()=>Date.now(),$s=la?e=>requestAnimationFrame(e):S;const so=new Set;function aa(e){so.forEach(r=>{r.c(e)||(so.delete(r),r.f())}),so.size!==0&&$s(aa)}function el(e){let r;return so.size===0&&$s(aa),{promise:new Promise(t=>{so.add(r={c:e,f:t})}),abort(){so.delete(r)}}}const wi=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function Ct(e,r){e.appendChild(r)}function ca(e){if(!e)return document;const r=e.getRootNode?e.getRootNode():e.ownerDocument;return r&&r.host?r:e.ownerDocument}function jd(e){const r=Ie("style");return r.textContent="/* empty */",Ed(ca(e),r),r.sheet}function Ed(e,r){return Ct(e.head||e,r),r.sheet}function $(e,r,t){e.insertBefore(r,t||null)}function Z(e){e.parentNode&&e.parentNode.removeChild(e)}function ln(e,r){for(let t=0;t<e.length;t+=1)e[t]&&e[t].d(r)}function Ie(e){return document.createElement(e)}function _n(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function Jn(e){return document.createTextNode(e)}function br(){return Jn(" ")}function ir(){return Jn("")}function Be(e,r,t,n){return e.addEventListener(r,t,n),()=>e.removeEventListener(r,t,n)}function m(e,r,t){t==null?e.removeAttribute(r):e.getAttribute(r)!==t&&e.setAttribute(r,t)}const Cd=["width","height"];function ei(e,r){const t=Object.getOwnPropertyDescriptors(e.__proto__);for(const n in r)r[n]==null?e.removeAttribute(n):n==="style"?e.style.cssText=r[n]:n==="__value"?e.value=e[n]=r[n]:t[n]&&t[n].set&&Cd.indexOf(n)===-1?e[n]=r[n]:m(e,n,r[n])}function Sd(e,r){Object.keys(r).forEach(t=>{Vd(e,t,r[t])})}function Vd(e,r,t){const n=r.toLowerCase();n in e?e[n]=typeof e[n]=="boolean"&&t===""?!0:t:r in e?e[r]=typeof e[r]=="boolean"&&t===""?!0:t:m(e,r,t)}function ua(e){return/-/.test(e)?Sd:ei}function Id(e){return Array.from(e.childNodes)}function ki(e,r){r=""+r,e.data!==r&&(e.data=r)}function fa(e,r){e.value=r==null?"":r}function H(e,r,t,n){t==null?e.style.removeProperty(r):e.style.setProperty(r,t,"")}function da(e,r,t){for(let n=0;n<e.options.length;n+=1){const i=e.options[n];if(i.__value===r){i.selected=!0;return}}(!t||r!==void 0)&&(e.selectedIndex=-1)}function Dd(e){const r=e.querySelector(":checked");return r&&r.__value}function _a(e,r,{bubbles:t=!1,cancelable:n=!1}={}){return new CustomEvent(e,{detail:r,bubbles:t,cancelable:n})}function ha(e,r){return new e(r)}const Ko=new Map;let Xo=0;function Td(e){let r=5381,t=e.length;for(;t--;)r=(r<<5)-r^e.charCodeAt(t);return r>>>0}function Fd(e,r){const t={stylesheet:jd(r),rules:{}};return Ko.set(e,t),t}function Zo(e,r,t,n,i,o,s,a=0){const l=16.666/n;let c=`{
`;for(let j=0;j<=1;j+=l){const k=r+(t-r)*o(j);c+=j*100+`%{${s(k,1-k)}}
`}const u=c+`100% {${s(t,1-t)}}
}`,f=`__svelte_${Td(u)}_${a}`,h=ca(e),{stylesheet:b,rules:v}=Ko.get(h)||Fd(h,e);v[f]||(v[f]=!0,b.insertRule(`@keyframes ${f} ${u}`,b.cssRules.length));const _=e.style.animation||"";return e.style.animation=`${_?`${_}, `:""}${f} ${n}ms linear ${i}ms 1 both`,Xo+=1,f}function Qo(e,r){const t=(e.style.animation||"").split(", "),n=t.filter(r?o=>o.indexOf(r)<0:o=>o.indexOf("__svelte")===-1),i=t.length-n.length;i&&(e.style.animation=n.join(", "),Xo-=i,Xo||Md())}function Md(){$s(()=>{Xo||(Ko.forEach(e=>{const{ownerNode:r}=e.stylesheet;r&&Z(r)}),Ko.clear())})}let So;function Vo(e){So=e}function lo(){if(!So)throw new Error("Function called outside component initialization");return So}function Nn(e){lo().$$.on_mount.push(e)}function xo(e){lo().$$.after_update.push(e)}function an(e){lo().$$.on_destroy.push(e)}function Pd(){const e=lo();return(r,t,{cancelable:n=!1}={})=>{const i=e.$$.callbacks[r];if(i){const o=_a(r,t,{cancelable:n});return i.slice().forEach(s=>{s.call(e,o)}),!o.defaultPrevented}return!0}}function Wi(e,r){return lo().$$.context.set(e,r),r}function Br(e){return lo().$$.context.get(e)}function Ai(e,r){const t=e.$$.callbacks[r.type];t&&t.slice().forEach(n=>n.call(this,r))}const ao=[],Dr=[];let co=[];const ga=[],pa=Promise.resolve();let tl=!1;function ma(){tl||(tl=!0,pa.then(ba))}function yn(){return ma(),pa}function On(e){co.push(e)}const rl=new Set;let uo=0;function ba(){if(uo!==0)return;const e=So;do{try{for(;uo<ao.length;){const r=ao[uo];uo++,Vo(r),Nd(r.$$)}}catch(r){throw ao.length=0,uo=0,r}for(Vo(null),ao.length=0,uo=0;Dr.length;)Dr.pop()();for(let r=0;r<co.length;r+=1){const t=co[r];rl.has(t)||(rl.add(t),t())}co.length=0}while(ao.length);for(;ga.length;)ga.pop()();tl=!1,rl.clear(),Vo(e)}function Nd(e){if(e.fragment!==null){e.update(),qr(e.before_update);const r=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,r),e.after_update.forEach(On)}}function Od(e){const r=[],t=[];co.forEach(n=>e.indexOf(n)===-1?r.push(n):t.push(n)),t.forEach(n=>n()),co=r}let Io;function nl(){return Io||(Io=Promise.resolve(),Io.then(()=>{Io=null})),Io}function Ui(e,r,t){e.dispatchEvent(_a(`${r?"intro":"outro"}${t}`))}const $o=new Set;let fi;function ur(){fi={r:0,c:[],p:fi}}function fr(){fi.r||qr(fi.c),fi=fi.p}function G(e,r){e&&e.i&&($o.delete(e),e.i(r))}function oe(e,r,t,n){if(e&&e.o){if($o.has(e))return;$o.add(e),fi.c.push(()=>{$o.delete(e),n&&(t&&e.d(1),n())}),e.o(r)}else n&&n()}const il={duration:0};function es(e,r,t){const n={direction:"in"};let i=r(e,t,n),o=!1,s,a,l=0;function c(){s&&Qo(e,s)}function u(){const{delay:h=0,duration:b=300,easing:v=Yn,tick:_=S,css:j}=i||il;j&&(s=Zo(e,0,1,b,h,v,j,l++)),_(0,1);const k=xs()+h,N=k+b;a&&a.abort(),o=!0,On(()=>Ui(e,!0,"start")),a=el(J=>{if(o){if(J>=N)return _(1,0),Ui(e,!0,"end"),c(),o=!1;if(J>=k){const q=v((J-k)/b);_(q,1-q)}}return o})}let f=!1;return{start(){f||(f=!0,Qo(e),Ir(i)?(i=i(n),nl().then(u)):u())},invalidate(){f=!1},end(){o&&(c(),o=!1)}}}function ya(e,r,t){const n={direction:"out"};let i=r(e,t,n),o=!0,s;const a=fi;a.r+=1;let l;function c(){const{delay:u=0,duration:f=300,easing:h=Yn,tick:b=S,css:v}=i||il;v&&(s=Zo(e,1,0,f,u,h,v));const _=xs()+u,j=_+f;On(()=>Ui(e,!1,"start")),"inert"in e&&(l=e.inert,e.inert=!0),el(k=>{if(o){if(k>=j)return b(0,1),Ui(e,!1,"end"),--a.r||qr(a.c),!1;if(k>=_){const N=h((k-_)/f);b(1-N,N)}}return o})}return Ir(i)?nl().then(()=>{i=i(n),c()}):c(),{end(u){u&&"inert"in e&&(e.inert=l),u&&i.tick&&i.tick(1,0),o&&(s&&Qo(e,s),o=!1)}}}function va(e,r,t,n){let o=r(e,t,{direction:"both"}),s=n?0:1,a=null,l=null,c=null,u;function f(){c&&Qo(e,c)}function h(v,_){const j=v.b-s;return _*=Math.abs(j),{a:s,b:v.b,d:j,duration:_,start:v.start,end:v.start+_,group:v.group}}function b(v){const{delay:_=0,duration:j=300,easing:k=Yn,tick:N=S,css:J}=o||il,q={start:xs()+_,b:v};v||(q.group=fi,fi.r+=1),"inert"in e&&(v?u!==void 0&&(e.inert=u):(u=e.inert,e.inert=!0)),a||l?l=q:(J&&(f(),c=Zo(e,s,v,j,_,k,J)),v&&N(0,1),a=h(q,j),On(()=>Ui(e,v,"start")),el(Q=>{if(l&&Q>l.start&&(a=h(l,j),l=null,Ui(e,a.b,"start"),J&&(f(),c=Zo(e,s,a.b,a.duration,0,k,o.css))),a){if(Q>=a.end)N(s=a.b,1-s),Ui(e,a.b,"end"),l||(a.b?f():--a.group.r||qr(a.group.c)),a=null;else if(Q>=a.start){const se=Q-a.start;s=a.a+a.d*k(se/a.duration),N(s,1-s)}}return!!(a||l)}))}return{run(v){Ir(o)?nl().then(()=>{o=o({direction:v?"in":"out"}),b(v)}):b(v)},end(){f(),a=l=null}}}function lr(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function wa(e,r){oe(e,1,1,()=>{r.delete(e.key)})}function ka(e,r,t,n,i,o,s,a,l,c,u,f){let h=e.length,b=o.length,v=h;const _={};for(;v--;)_[e[v].key]=v;const j=[],k=new Map,N=new Map,J=[];for(v=b;v--;){const W=f(i,o,v),L=t(W);let R=s.get(L);R?J.push(()=>R.p(W,r)):(R=c(L,W),R.c()),k.set(L,j[v]=R),L in _&&N.set(L,Math.abs(v-_[L]))}const q=new Set,Q=new Set;function se(W){G(W,1),W.m(a,u),s.set(W.key,W),u=W.first,b--}for(;h&&b;){const W=j[b-1],L=e[h-1],R=W.key,V=L.key;W===L?(u=W.first,h--,b--):k.has(V)?!s.has(R)||q.has(R)?se(W):Q.has(V)?h--:N.get(R)>N.get(V)?(Q.add(R),se(W)):(q.add(V),h--):(l(L,s),h--)}for(;h--;){const W=e[h];k.has(W.key)||l(W,s)}for(;b;)se(j[b-1]);return qr(J),j}function fo(e,r){const t={},n={},i={$$scope:1};let o=e.length;for(;o--;){const s=e[o],a=r[o];if(a){for(const l in s)l in a||(n[l]=1);for(const l in a)i[l]||(t[l]=a[l],i[l]=1);e[o]=a}else for(const l in s)i[l]=1}for(const s in n)s in t||(t[s]=void 0);return t}function Zt(e){e&&e.c()}function Gt(e,r,t){const{fragment:n,after_update:i}=e.$$;n&&n.m(r,t),On(()=>{const o=e.$$.on_mount.map(na).filter(Ir);e.$$.on_destroy?e.$$.on_destroy.push(...o):qr(o),e.$$.on_mount=[]}),i.forEach(On)}function Yt(e,r){const t=e.$$;t.fragment!==null&&(Od(t.after_update),qr(t.on_destroy),t.fragment&&t.fragment.d(r),t.on_destroy=t.fragment=null,t.ctx=[])}function zd(e,r){e.$$.dirty[0]===-1&&(ao.push(e),ma(),e.$$.dirty.fill(0)),e.$$.dirty[r/31|0]|=1<<r%31}function Gr(e,r,t,n,i,o,s=null,a=[-1]){const l=So;Vo(e);const c=e.$$={fragment:null,ctx:[],props:o,update:S,not_equal:i,bound:ia(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(r.context||(l?l.$$.context:[])),callbacks:ia(),dirty:a,skip_bound:!1,root:r.target||l.$$.root};s&&s(c.root);let u=!1;if(c.ctx=t?t(e,r.props||{},(f,h,...b)=>{const v=b.length?b[0]:h;return c.ctx&&i(c.ctx[f],c.ctx[f]=v)&&(!c.skip_bound&&c.bound[f]&&c.bound[f](v),u&&zd(e,f)),h}):[],c.update(),u=!0,qr(c.before_update),c.fragment=n?n(c.ctx):!1,r.target){if(r.hydrate){const f=Id(r.target);c.fragment&&c.fragment.l(f),f.forEach(Z)}else c.fragment&&c.fragment.c();r.intro&&G(e.$$.fragment),Gt(e,r.target,r.anchor),ba()}Vo(l)}class Yr{constructor(){mr(this,"$$");mr(this,"$$set")}$destroy(){Yt(this,1),this.$destroy=S}$on(r,t){if(!Ir(t))return S;const n=this.$$.callbacks[r]||(this.$$.callbacks[r]=[]);return n.push(t),()=>{const i=n.indexOf(t);i!==-1&&n.splice(i,1)}}$set(r){this.$$set&&!kd(r)&&(this.$$.skip_bound=!0,this.$$set(r),this.$$.skip_bound=!1)}}const Ld="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Ld);const _o=[];function Rd(e,r){return{subscribe:ji(e,r).subscribe}}function ji(e,r=S){let t;const n=new Set;function i(a){if(wd(e,a)&&(e=a,t)){const l=!_o.length;for(const c of n)c[1](),_o.push(c,e);if(l){for(let c=0;c<_o.length;c+=2)_o[c][0](_o[c+1]);_o.length=0}}}function o(a){i(a(e))}function s(a,l=S){const c=[a,l];return n.add(c),n.size===1&&(t=r(i,o)||S),a(e),()=>{n.delete(c),n.size===0&&t&&(t(),t=null)}}return{set:i,update:o,subscribe:s}}function Gi(e,r,t){const n=!Array.isArray(e),i=n?[e]:e;if(!i.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const o=r.length<2;return Rd(t,(s,a)=>{let l=!1;const c=[];let u=0,f=S;const h=()=>{if(u)return;f();const v=r(n?c[0]:c,s,a);o?s(v):f=Ir(v)?v:S},b=i.map((v,_)=>P(v,j=>{c[_]=j,u&=~(1<<_),l&&h()},()=>{u|=1<<_}));return l=!0,h(),function(){qr(b),f(),l=!1}})}const ar={root_platform_desktop:"divkit-6d515",root__clickable:"divkit-27458","root__clickable-no-transition":"divkit-3bb57","root__any-actions":"divkit-ba614",root:"divkit-82db1",root__selectable:"divkit-be734",root__unselectable:"divkit-9a652","root__only-desktop":"divkit-316e7","root_restrict-scroll":"divkit-0a135","root_disabled-context-menu":"divkit-f5cb3"},on=Symbol("root");function X(e,r={}){const t=e;return t.level=r.level||"error",r.additional&&(t.additional=r.additional),t}const ts={outer:"divkit-bf0ea",root__clickable:"divkit-27458","root__clickable-no-transition":"divkit-3bb57","outer_hide-on-transition-in":"divkit-c5f24","outer_halign-self_start":"divkit-002ec","outer_halign-self_center":"divkit-204f8","outer_halign-self_end":"divkit-bd7ba","outer_halign-self_stretch":"divkit-02d12","outer_valign-self_start":"divkit-fd8aa","outer_valign-self_center":"divkit-62df2","outer_valign-self_end":"divkit-819a0","outer_valign-self_stretch":"divkit-8a331","outer_parent-flex_vertical":"divkit-46b27","outer_parent-flex_horizontal":"divkit-be075","outer_valign-self_baseline":"divkit-2b876",outer_width_content:"divkit-05991",outer_height_content:"divkit-80cac","outer_width-constrained":"divkit-5bdb7","outer_parent-grid":"divkit-47ef2","outer_height-constrained":"divkit-351c8","outer_parent-overlap":"divkit-747b0","outer_scroll-snap_start":"divkit-91fd4","outer_scroll-snap_center":"divkit-c525d","outer_scroll-snap_end":"divkit-67470",outer__border:"divkit-90c49",outer_visibility_invisible:"divkit-b33bc",outer_visibility_gone:"divkit-f6ff9","outer_has-action-animation":"divkit-4d4f3","outer_has-custom-focus":"divkit-b630e"};function Mt(e){if(!e)return;let r="";for(const t in e)if(e.hasOwnProperty(t)){if(!e[t]&&e[t]!==0)continue;r&&(r+=";"),r+=t+":"+String(e[t])}return r||void 0}function Ee(e){if(typeof e!="number"&&typeof e!="string"||!e)return"0";const r=Number(e);return Number.isNaN(r)?"0":Math.ceil(r*1e3)/1e4+"em"}function cn(e){let r=Ee(e);return r==="0"&&(r+="em"),r}function Aa(e,r){for(;e.length<r;)e="0"+e;return e}function Sr(e,r=1,t="transparent"){if(e=(typeof e=="string"&&e||"").toLowerCase(),e.charAt(0)!=="#")return t;const n=di(e);return n?(n.a*=r,ol(n)):t}function Bd(e,r,t="transparent"){if(e=(typeof e=="string"&&e||"").toLowerCase(),e.charAt(0)!=="#")return t;const n=di(e);return n?(n.a=r,ol(n)):t}function ol(e){return e.a===255?`#${[e.r,e.g,e.b].map(r=>Aa(Math.round(r).toString(16),2)).join("")}`:`rgba(${e.r},${e.g},${e.b},${(e.a/255).toFixed(2)})`}function di(e){const r=e.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)||e.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])$/i)||e.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)||e.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i);if(r){if(r.length===5){const[c,u,f,h,b]=r,v=f.length===2?f:f+f,_=h.length===2?h:h+h,j=b.length===2?b:b+b,k=u.length===2?u:u+u;return{a:parseInt(k,16),r:parseInt(v,16),g:parseInt(_,16),b:parseInt(j,16)}}const[t,n,i,o]=r,s=n.length===2?n:n+n,a=i.length===2?i:i+i,l=o.length===2?o:o+o;return{a:255,r:parseInt(s,16),g:parseInt(a,16),b:parseInt(l,16)}}return null}function sl(e){let r=String(e);return r.indexOf("&")>-1&&(r=r.replace(/&/g,"&")),r.indexOf("<")>-1&&(r=r.replace(/</g,"<")),r.indexOf(">")>-1&&(r=r.replace(/>/g,">")),r.indexOf('"')>-1&&(r=r.replace(/"/g,""")),r}const _i=Boolean;function rs(e){if(e.length===1&&e[0].type==="solid")return Wd({bg:e[0]});const r=e.map(t=>{if(t.type==="solid")return Hd({bg:t});if(t.type==="gradient")return Ud({bg:t});if(t.type==="image")return qd({bg:t});if(t.type==="radial_gradient")return Yd({bg:t})}).filter(_i).reverse().reduce(function(t,n){return t.image.push(n.image),t.size.push(n.size||"auto"),t.position.push(n.pos||"50% 50%"),t},{image:[],size:[],position:[]});return{image:r.image.join(","),size:r.size.join(","),position:r.position.join(",")}}function Hd(e){const r=Sr(e.bg.color||"transparent");return{size:void 0,pos:void 0,image:`linear-gradient(to bottom,${r},${r})`}}function Wd(e){return{color:Sr(e.bg.color||"transparent"),size:"auto",position:"50% 50%"}}function ja(e){return e.every(n=>n.color&&typeof n.position=="number"&&n.position>=0&&n.position<=1)?e.sort((n,i)=>Math.abs(n.position-i.position)<1e-6?0:n.position-i.position).map(n=>`${Sr(n.color)} ${(n.position*100).toFixed(2)}%`).join(","):void 0}function Ud(e){var n,i,o,s;if(!Array.isArray((n=e.bg)==null?void 0:n.colors)&&!Array.isArray((i=e.bg)==null?void 0:i.color_map))return;const r=(o=e.bg.colors)==null?void 0:o.filter(_i);if(!(r!=null&&r.length)&&!((s=e.bg)!=null&&s.color_map))return;let t;if(e.bg.color_map){const a=ja(e.bg.color_map);if(!a)return;t="linear-gradient("+(90-Number(e.bg.angle||0)+"deg")+","+a+")"}else{if(!r)return;t="linear-gradient("+(90-Number(e.bg.angle||0)+"deg")+","+r.map(a=>Sr(a)).join(",")+")"}return{size:void 0,pos:void 0,image:t}}const Gd={nearest_corner:"closest-corner",farthest_corner:"farthest-corner",nearest_side:"closest-side",farthest_side:"farthest-side"};function Ea(e){if(e&&typeof e=="object"&&"type"in e&&e.value!==void 0){if(e.type==="fixed")return cn(e.value);if(e.type==="relative")return`${Number(e.value)*100}%`}return"50%"}function Yd(e){var a,l,c,u;if(!Array.isArray((a=e.bg)==null?void 0:a.colors)&&!Array.isArray((l=e.bg)==null?void 0:l.color_map))return;const r=(c=e.bg.colors)==null?void 0:c.filter(_i);if(!(r!=null&&r.length)&&!((u=e.bg)!=null&&u.color_map))return;let t;if(e.bg.color_map?t=ja(e.bg.color_map):r&&(t=r.map(f=>Sr(f)).join(",")),!t)return;const n=e.bg.radius;let i;n&&typeof n=="object"&&"type"in n&&n.value!==void 0&&(n.type==="fixed"?i=cn(n.value):n.type==="relative"&&(i=Gd[n.value]));const o=Ea(e.bg.center_x),s=Ea(e.bg.center_y);return{size:void 0,pos:void 0,image:`radial-gradient(circle ${i||"farthest-corner"} at ${o} ${s},`+t+")"}}function qd(e){var t;const r=(t=e.bg)==null?void 0:t.image_url;if(r)return{size:Ca(e.bg.scale),pos:Sa(e.bg),image:'url("'+sl(r)+'")'}}function Ca(e){return e==="fit"?"contain":e==="stretch"?"fill":e==="no_scale"?"none":"cover"}function Sa(e){let r,t;return e.content_alignment_horizontal==="left"?r="0%":e.content_alignment_horizontal==="right"?r="100%":r="50%",e.content_alignment_vertical==="top"?t="0%":e.content_alignment_vertical==="bottom"?t="100%":t="50%",r+" "+t}function xr(e,r){const t=Number(e);return Number.isNaN(t)||t<0?r:t}function Va(e,r,t){return typeof r=="number"&&(e&&r>0&&r<=100||!e&&r>=0&&r<100)?r:t}function Jd(e){return e.is_enabled!==0&&e.is_enabled!==!1&&e.index!==void 0}function Kd(e,{visibilityActions:r,disappearActions:t,rootCtx:n,componentContext:i}){const o=[];r&&r.forEach(b=>{o.push({type:"visibility",index:o.length,action:b,visible:!1,count:0,finished:!1})}),t&&t.forEach(b=>{o.push({type:"disappear",index:o.length,action:b,visible:!1,count:0,finished:!1})});const s=o.map((b,v)=>{const _=b.type==="visibility";return i.getDerivedFromVars({index:v,visibility_percentage:b.action.visibility_percentage,visibility_duration:_?b.action.visibility_duration:b.action.disappear_duration,log_limit:b.action.log_limit,is_enabled:b.action.is_enabled},void 0,!0)});let a;const l=()=>{a&&a.disconnect(),o.forEach(b=>{b.timer&&clearTimeout(b.timer)})},c=Gi(s,b=>b);let u;const f=b=>{const v=b.type==="visibility",_=i.getJsonWithVars(b.action);i.execAnyActions([_],{logType:v?"visible":"disappear",node:e,processUrls:!1})},h=c.subscribe(b=>{u=b.filter(Jd);const v={};u.forEach(k=>{v[k.index]=k}),l();const _=[...new Set(u.map(k=>{const N=o[k.index].type==="visibility";return Va(N,k.visibility_percentage,N?50:0)/100}))];if(!_.length)return;const j=k=>{k.forEach(N=>{u.forEach(J=>{const q=o[J.index],Q=q.type==="visibility",se=Va(Q,J.visibility_percentage,Q?50:0);let W;se===0?W=N.intersectionRatio>=1e-12:W=N.intersectionRatio>=se/100,(Q?!q.visible&&W:q.visible&&!W)?q.finished||(q.timer=setTimeout(()=>{++q.count;const V=J.log_limit===0?1/0:J.log_limit||1;q.count>=V&&(q.finished=!0),f(q)},xr(J.visibility_duration,800))):(Q?!W:W)&&q.timer&&clearTimeout(q.timer),q.visible=W})})};a=new IntersectionObserver(j,{threshold:_}),a.observe(e)});return{destroy(){u==null||u.forEach(b=>{const v=o[b.index];!v||v.type!=="disappear"||!v.visible||v.finished||n.registerTimeout(window.setTimeout(()=>{f(v)},b.visibility_duration))}),l(),h()}}}function Ia(e,r){r&&e.push(r)}function ht(e,r,t){const n=[];Ia(n,r[e]);for(const i in t)if(t.hasOwnProperty(i)){const o=t[i];if(o){const s=`${e}_${i}`+(typeof o=="string"?`_${o}`:"");Ia(n,r[s])}}return n.join(" ")}const ll=Symbol("state");function ti(e,r){var s,a;const t=e.top||0,n=((s=r==="ltr"?e.end:e.start)!=null?s:e.right)||0,i=e.bottom||0,o=((a=r==="ltr"?e.start:e.end)!=null?a:e.left)||0;return t===0&&n===0&&i===0&&o===0?"":Ee(t)+" "+Ee(n)+" "+Ee(i)+" "+Ee(o)}function ns(e){if(typeof e!="number"&&typeof e!="string")return!1;const r=Number(e);return!Number.isNaN(r)}function kn(e){return ns(e)&&e>=0}function is(e,r,t){var i,o;if(!e)return t;const n=[e.top,(i=r==="ltr"?e.end:e.start)!=null?i:e.right,e.bottom,(o=r==="ltr"?e.start:e.end)!=null?o:e.left];for(let s=0;s<n.length;++s)if(n[s]&&!kn(n[s]))return t;return ti(e,r)}function Xd(e,r){return!kn(e)||e===void 0||e>1?r:Number(e)}const Zd=Object.prototype.hasOwnProperty;function al(e,r){if(Object.is(e,r))return!0;if(typeof e!="object"||e===null||typeof r!="object"||r===null)return Object.is(e,r);const t=Object.keys(e),n=Object.keys(r);if(t.length!==n.length)return!1;for(let i=0;i<t.length;i++){const o=t[i];if(!Zd.call(r,o)||!al(e[o],r[o]))return!1}return!0}function Fi(e,r){return al(e,r)?r:e}function Qd(e,r){return e==="visible"||e==="invisible"||e==="gone"?e:r}function Da(e,r){return e==="linear"||e==="ease"||e==="ease_in_out"||e==="ease_in"||e==="ease_out"?e:r}function ho(e,r){const t=Number(e);return Number.isNaN(t)?r:t}function cl(e){const r=[];return e.name==="set"?(e.items||[]).forEach(t=>{r.push(...cl(t))}):r.push(e),r}function go(e,r){if(!e||typeof e!="object")return r;const t=["top","right","bottom","left"];for(let n=0;n<t.length;++n)if(e[t[n]]&&!kn(e[t[n]]))return r;return e}function xd(e,r){if(!e&&!r)return{};if(!r)return e;if(!e)return r;const t={};return["top","right","bottom","left","start","end"].forEach(n=>{const i=e[n];i&&(t[n]=i);const o=r[n];o&&(t[n]=(t[n]||0)+o)}),t}function $d(e,r){const t=[e["top-left"],e["top-right"],e["bottom-right"],e["bottom-left"]];for(let n=0;n<t.length;++n)if(t[n]&&!kn(t[n]))return r;return e}function os(e,r=0,t=10){return[e["top-left"],e["top-right"],e["bottom-right"],e["bottom-left"]].map(n=>Ee((n||r)/t*10)).join(" ")}function e_(e){var r,t,n,i,o,s;return Ee(((t=(r=e.offset)==null?void 0:r.x)==null?void 0:t.value)||0)+" "+Ee(((i=(n=e.offset)==null?void 0:n.y)==null?void 0:i.value)||0)+" "+Ee((o=e.blur)!=null?o:2)+" "+Sr(e.color||"#000000",(s=e.alpha)!=null?s:.19)}function t_(e,r){var t,n,i,o,s,a;return"drop-shadow("+Sr(e.color||"#000000",(t=e.alpha)!=null?t:.19)+" "+Ee((((i=(n=e.offset)==null?void 0:n.x)==null?void 0:i.value)||0)*10/r)+" "+Ee((((s=(o=e.offset)==null?void 0:o.y)==null?void 0:s.value)||0)*10/r)+" "+Ee(((a=e.blur)!=null?a:2)*10/r)+")"}function In(e){return e.is_enabled!==0&&e.is_enabled!==!1}let ul;function ss(){return typeof matchMedia>"u"?!1:(ul||(ul=window.matchMedia("(prefers-reduced-motion)")),ul.matches)}const r_=8,n_=(e,r,t,n)=>{let i;return(t||n)&&typeof ResizeObserver<"u"&&(i=new ResizeObserver(async()=>{let o=0;const s={},a=(c,u)=>{if(c){const f=r.getVariable(c,"integer");if(f){if(u=Math.round(u),s[c]||(s[c]=new Set),!s[c].has(u))return f.setValue(u),s[c].add(u),!0}else{const h=new Error("Missing variable");h.level="error",h.additional={variableName:c},r.logError(h)}}return!1},l=()=>{if(!e)return!1;const c=e.getBoundingClientRect(),u=a(t,c.width),f=a(n,c.height);return u||f};for(;l();){if(++o>r_){const c=new Error("Recursive layout in size_provider");c.level="warn",c.additional={widthVariableName:t,heightVariableName:n},r.logError(c);break}await yn()}}),i.observe(e)),i},fl=Symbol("enabled");function An(e,r){return e===1||e===0||e===!1||e===!0?!!e:r}function po(e){return[e.state_description,e.description,e.hint].filter(Boolean).join(", ")}const Ta={actionable__button:"divkit-ee5cc"};function i_(){}const Yi=Symbol("action");function dl(e){if(e.startsWith("tel:"))return"tel";const r=/^([^/]+):\/\//.exec(e);return r&&r[1]||""}function _l(e,r){return r.has(e)}function o_(e){var f;let r,t,n,i,o,s;const a=e[28].default,l=Uo(a,e,e[27],null);let c=[{class:t=e[1]+" "+((f=e[0])!=null&&f.length?ar["root_disabled-context-menu"]:"")+" "+(e[12]?ar["root__any-actions"]:"")},{style:e[2]},{role:e[9]},{"aria-checked":e[13]},{"aria-hidden":n=e[10]||void 0},e[3]],u={};for(let h=0;h<c.length;h+=1)u=qn(u,c[h]);return{c(){r=Ie("span"),l&&l.c(),ei(r,u)},m(h,b){$(h,r,b),l&&l.m(r,null),e[40](r),i=!0,o||(s=[Jo(e[4].call(null,r)),Be(r,"click",e[35]),Be(r,"keydown",e[14]),Be(r,"focus",e[36]),Be(r,"blur",e[37])],o=!0)},p(h,b){var v;l&&l.p&&(!i||b[0]&134217728)&&Yo(l,a,h,h[27],i?Go(a,h[27],b,null):qo(h[27]),null),ei(r,u=fo(c,[(!i||b[0]&4099&&t!==(t=h[1]+" "+((v=h[0])!=null&&v.length?ar["root_disabled-context-menu"]:"")+" "+(h[12]?ar["root__any-actions"]:"")))&&{class:t},(!i||b[0]&4)&&{style:h[2]},(!i||b[0]&512)&&{role:h[9]},(!i||b[0]&8192)&&{"aria-checked":h[13]},(!i||b[0]&1024&&n!==(n=h[10]||void 0))&&{"aria-hidden":n},b[0]&8&&h[3]]))},i(h){i||(G(l,h),i=!0)},o(h){oe(l,h),i=!1},d(h){h&&Z(r),l&&l.d(h),e[40](null),o=!1,qr(s)}}}function s_(e){var u;let r,t,n,i,o;const s=e[28].default,a=Uo(s,e,e[27],null);let l=[{class:t=e[1]+" "+Ta.actionable__button+" "+ar["root__any-actions"]+` ${e[5]?ar.root__clickable:ar["root__clickable-no-transition"]} ${ar.root__unselectable} `+((u=e[0])!=null&&u.length?ar["root_disabled-context-menu"]:"")},{style:e[2]},{role:e[9]},{"aria-checked":e[13]},{type:"button"},e[3]],c={};for(let f=0;f<l.length;f+=1)c=qn(c,l[f]);return{c(){r=Ie("button"),a&&a.c(),ei(r,c)},m(f,h){$(f,r,h),a&&a.m(r,null),r.autofocus&&r.focus(),e[39](r),n=!0,i||(o=[Jo(e[4].call(null,r)),Be(r,"click",e[32]),Be(r,"keydown",e[14]),Be(r,"focus",e[33]),Be(r,"blur",e[34])],i=!0)},p(f,h){var b;a&&a.p&&(!n||h[0]&134217728)&&Yo(a,s,f,f[27],n?Go(s,f[27],h,null):qo(f[27]),null),ei(r,c=fo(l,[(!n||h[0]&35&&t!==(t=f[1]+" "+Ta.actionable__button+" "+ar["root__any-actions"]+` ${f[5]?ar.root__clickable:ar["root__clickable-no-transition"]} ${ar.root__unselectable} `+((b=f[0])!=null&&b.length?ar["root_disabled-context-menu"]:"")))&&{class:t},(!n||h[0]&4)&&{style:f[2]},(!n||h[0]&512)&&{role:f[9]},(!n||h[0]&8192)&&{"aria-checked":f[13]},{type:"button"},h[0]&8&&f[3]]))},i(f){n||(G(a,f),n=!0)},o(f){oe(a,f),n=!1},d(f){f&&Z(r),a&&a.d(f),e[39](null),i=!1,qr(o)}}}function l_(e){var u;let r,t,n,i,o;const s=e[28].default,a=Uo(s,e,e[27],null);let l=[{href:e[7]},{target:e[11]},{style:e[2]},{role:e[9]},{"aria-checked":e[13]},{class:t=e[1]+" "+ar["root__any-actions"]+" "+(e[5]?ar.root__clickable:ar["root__clickable-no-transition"])+" "+((u=e[0])!=null&&u.length?ar["root_disabled-context-menu"]:"")},e[3]],c={};for(let f=0;f<l.length;f+=1)c=qn(c,l[f]);return{c(){r=Ie("a"),a&&a.c(),ei(r,c)},m(f,h){$(f,r,h),a&&a.m(r,null),e[38](r),n=!0,i||(o=[Jo(e[4].call(null,r)),Be(r,"click",e[29]),Be(r,"keydown",e[14]),Be(r,"focus",e[30]),Be(r,"blur",e[31])],i=!0)},p(f,h){var b;a&&a.p&&(!n||h[0]&134217728)&&Yo(a,s,f,f[27],n?Go(s,f[27],h,null):qo(f[27]),null),ei(r,c=fo(l,[(!n||h[0]&128)&&{href:f[7]},(!n||h[0]&2048)&&{target:f[11]},(!n||h[0]&4)&&{style:f[2]},(!n||h[0]&512)&&{role:f[9]},(!n||h[0]&8192)&&{"aria-checked":f[13]},(!n||h[0]&35&&t!==(t=f[1]+" "+ar["root__any-actions"]+" "+(f[5]?ar.root__clickable:ar["root__clickable-no-transition"])+" "+((b=f[0])!=null&&b.length?ar["root_disabled-context-menu"]:"")))&&{class:t},h[0]&8&&f[3]]))},i(f){n||(G(a,f),n=!0)},o(f){oe(a,f),n=!1},d(f){f&&Z(r),a&&a.d(f),e[38](null),i=!1,qr(o)}}}function a_(e){let r,t,n,i;const o=[l_,s_,o_],s=[];function a(l,c){return l[7]?0:l[8]?1:2}return r=a(e),t=s[r]=o[r](e),{c(){t.c(),n=ir()},m(l,c){s[r].m(l,c),$(l,n,c),i=!0},p(l,c){let u=r;r=a(l),r===u?s[r].p(l,c):(ur(),oe(s[u],1,1,()=>{s[u]=null}),fr(),t=s[r],t?t.p(l,c):(t=s[r]=o[r](l),t.c()),G(t,1),t.m(n.parentNode,n))},i(l){i||(G(t),i=!0)},o(l){oe(t),i=!1},d(l){l&&Z(n),s[r].d(l)}}}const Fa=8,Ma=400,hl=400,c_=new Set(["button","image","checkbox","radio","header"]);function Pa(e){e.preventDefault()}function u_(e,r,t){let{$$slots:n={},$$scope:i}=r,{componentContext:o}=r,{id:s=""}=r,{actions:a=void 0}=r,{doubleTapActions:l=void 0}=r,{longTapActions:c=void 0}=r,{pressStartActions:u=void 0}=r,{pressEndActions:f=void 0}=r,{hoverStartActions:h=void 0}=r,{hoverEndActions:b=void 0}=r,{cls:v=""}=r,{style:_=null}=r,{attrs:j=void 0}=r,{use:k=i_}=r,{customAction:N=null}=r,{isNativeActionAnimation:J=!0}=r,{hasInnerFocusable:q=!1}=r,{customAccessibility:Q=void 0}=r,{captureFocusOnAction:se=!0}=r;const W=Br(on),L=Br(Yi);Wi(Yi,{hasAction(){return!!(L.hasAction()||a!=null&&a.length||(Q==null?void 0:Q.mode)==="exclude")}});let R,V="",I,D=-1,U=-1,De=null,Xe=!1,ae=!1,Pe=!1,Me,Ue,Le,jt,ye=!1;function Ce(){return(a==null?void 0:a.some(A=>{if(A!=null&&A.typed)return!0;const _e=A==null?void 0:A.url;if(!_e)return!1;const K=dl(_e);return K&&!_l(K,W.getBuiltinProtocols())}))||!1}async function re(A,_e){a&&(A&&Ce()&&A.preventDefault(),o.execAnyActions(a,{node:R,processUrls:_e}))}async function Re(A){if(L.hasAction()||A.button!==void 0&&A.button!==0)return;const _e=Date.now();if(D>0&&_e>D+Ma){A.preventDefault();return}if(l!=null&&l.length&&U>0&&_e-U<hl){A.preventDefault(),o.execAnyActions(l,{processUrls:!0,node:R}),U=-1;return}if(U=_e,l!=null&&l.length&&D>0&&_e<D+hl){A.preventDefault(),clearTimeout(Ue),Ue=window.setTimeout(()=>{re(void 0,!0)},hl);return}(N==null?void 0:N(A))===!1?A.preventDefault():re(A,!1)}function pe(A){L.hasAction()||(De={x:A.clientX,y:A.clientY},Xe=!1,D=Date.now(),Me&&clearTimeout(Me),clearTimeout(Ue),o.execAnyActions(u,{node:R}))}function ve(A){De&&(Math.abs(De.x-A.clientX)>Fa||Math.abs(De.y-A.clientY)>Fa)&&(Xe=!0)}function Se(A){L.hasAction()||!De||D<0||(!Xe&&Date.now()-D>=Ma&&(A.stopImmediatePropagation(),o.execAnyActions(c,{processUrls:!0,node:R})),Me&&clearTimeout(Me),Me=window.setTimeout(()=>{De=null,D=-1},100),o.execAnyActions(f,{node:R}))}function it(){L.hasAction()||o.execAnyActions(h,{node:R})}function Tt(){L.hasAction()||o.execAnyActions(b,{node:R})}function ne(A){const _e=A.target;_e instanceof HTMLElement&&(_e.tagName==="INPUT"||_e.contentEditable==="true")||A.ctrlKey||A.metaKey||A.altKey||A.shiftKey||A.key==="Enter"&&Array.isArray(a)&&a.length&&(o.execAnyActions(a),A.preventDefault())}Nn(()=>{s&&!q&&W.registerFocusable(s,{focus(){R&&(V||ae)&&R.focus()}})}),an(()=>{typeof window<"u"&&(window.removeEventListener("pointermove",ve),window.removeEventListener("pointerup",Se),window.removeEventListener("pointercancel",Se)),s&&!q&&W.unregisterFocusable(s),Me&&clearTimeout(Me),Ue&&clearTimeout(Ue)});function me(A){Ai.call(this,e,A)}function fe(A){Ai.call(this,e,A)}function te(A){Ai.call(this,e,A)}function tt(A){Ai.call(this,e,A)}function ot(A){Ai.call(this,e,A)}function Te(A){Ai.call(this,e,A)}function $e(A){Ai.call(this,e,A)}function Et(A){Ai.call(this,e,A)}function Pt(A){Ai.call(this,e,A)}function Ze(A){Dr[A?"unshift":"push"](()=>{R=A,t(6,R)})}function xe(A){Dr[A?"unshift":"push"](()=>{R=A,t(6,R)})}function ct(A){Dr[A?"unshift":"push"](()=>{R=A,t(6,R)})}return e.$$set=A=>{"componentContext"in A&&t(15,o=A.componentContext),"id"in A&&t(16,s=A.id),"actions"in A&&t(17,a=A.actions),"doubleTapActions"in A&&t(18,l=A.doubleTapActions),"longTapActions"in A&&t(0,c=A.longTapActions),"pressStartActions"in A&&t(19,u=A.pressStartActions),"pressEndActions"in A&&t(20,f=A.pressEndActions),"hoverStartActions"in A&&t(21,h=A.hoverStartActions),"hoverEndActions"in A&&t(22,b=A.hoverEndActions),"cls"in A&&t(1,v=A.cls),"style"in A&&t(2,_=A.style),"attrs"in A&&t(3,j=A.attrs),"use"in A&&t(4,k=A.use),"customAction"in A&&t(23,N=A.customAction),"isNativeActionAnimation"in A&&t(5,J=A.isNativeActionAnimation),"hasInnerFocusable"in A&&t(24,q=A.hasInnerFocusable),"customAccessibility"in A&&t(25,Q=A.customAccessibility),"captureFocusOnAction"in A&&t(26,se=A.captureFocusOnAction),"$$scope"in A&&t(27,i=A.$$scope)},e.$$.update=()=>{if(e.$$.dirty[0]&33554432&&t(10,ye=(Q==null?void 0:Q.mode)==="exclude"),e.$$.dirty[0]&8553600){if(Array.isArray(a)&&(a!=null&&a.length))for(let A=0;A<a.length;++A){const _e=a[A].url;if(_e){t(7,V=_e),t(11,I=a[A].target||void 0);break}}t(8,ae=!!N),(V||Array.isArray(a)&&(a!=null&&a.length))&&(L.hasAction()||ye)?(t(7,V=""),o.logError(X(new Error("Actionable element is forbidden inside other actionable element or inside accessibility mode=exlucde"),{level:"warn",additional:{actions:a}}))):V&&!_l(dl(V),W.getBuiltinProtocols())?(t(7,V=""),t(8,ae=!0)):!V&&Array.isArray(a)&&(a!=null&&a.length)&&(t(8,ae=!0),a.some(A=>A.url||A.typed||A.menu_items)||o.logError(X(new Error("The component has a list of actions, but does not have a real action"),{level:"warn",additional:{actions:a}})))}e.$$.dirty[0]&33555328&&(Q!=null&&Q.type&&c_.has(Q.type)?Q.type==="header"?t(9,Le="heading"):t(9,Le=Q.type):V?t(9,Le=void 0):ae&&t(9,Le="button"),(Le==="checkbox"||Le==="radio")&&typeof(Q==null?void 0:Q.is_checked)=="boolean"?t(13,jt=Q.is_checked):t(13,jt=void 0)),e.$$.dirty[0]&75235777&&R&&(V||ae||l!=null&&l.length?R.addEventListener("click",Re):R.removeEventListener("click",Re),l!=null&&l.length||c!=null&&c.length||u!=null&&u.length||f!=null&&f.length?(R.addEventListener("pointerdown",pe,{passive:!0}),window.addEventListener("pointermove",ve,{passive:!0}),window.addEventListener("pointerup",Se,{passive:!0}),window.addEventListener("pointercancel",Se,{passive:!0})):(R.removeEventListener("pointerdown",pe),window.removeEventListener("pointerup",Se),window.removeEventListener("pointermove",ve),window.removeEventListener("pointercancel",Se)),h!=null&&h.length?R.addEventListener("pointerenter",it):R.removeEventListener("pointerenter",it),b!=null&&b.length?R.addEventListener("pointerleave",Tt):R.removeEventListener("pointerleave",Tt),se===!1?R.addEventListener("mousedown",Pa):R.removeEventListener("mousedown",Pa),t(12,Pe=!!(V||ae||l!=null&&l.length||c!=null&&c.length||u!=null&&u.length||f!=null&&f.length||h!=null&&h.length||b!=null&&b.length)))},[c,v,_,j,k,J,R,V,ae,Le,ye,I,Pe,jt,ne,o,s,a,l,u,f,h,b,N,q,Q,se,i,n,me,fe,te,tt,ot,Te,$e,Et,Pt,Ze,xe,ct]}class ls extends Yr{constructor(r){super(),Gr(this,r,u_,a_,Cr,{componentContext:15,id:16,actions:17,doubleTapActions:18,longTapActions:0,pressStartActions:19,pressEndActions:20,hoverStartActions:21,hoverEndActions:22,cls:1,style:2,attrs:3,use:4,customAction:23,isNativeActionAnimation:5,hasInnerFocusable:24,customAccessibility:25,captureFocusOnAction:26},null,[-1,-1])}}const qi={"outer-background":"divkit-7b038","outer-background_clip":"divkit-8fdbd","outer-background__item":"divkit-f9881","outer-background__item_hidden":"divkit-ea047"};function Dn(e){return ns(e)&&e>0}function Na(e,r){return e.map(t=>{if(!t){r(X(new Error("Incorrect filter"),{level:"warn"}));return}if(t.type==="blur"){if(Dn(t.radius))return`blur(${cn(t.radius/2)})`}else{if(t.type==="rtl_mirror")return;r(X(new Error("Unknown filter"),{level:"warn",additional:{filter:t.type}}))}}).filter(Boolean).join(" ")}function Oa(e,r,t){const n=e.slice();return n[6]=r[t],n}function f_(e){let r,t;return{c(){r=Ie("span"),m(r,"class",qi["outer-background__item"]),m(r,"style",t=Mt(e[6].style))},m(n,i){$(n,r,i)},p(n,i){i&2&&t!==(t=Mt(n[6].style))&&m(r,"style",t)},d(n){n&&Z(r)}}}function d_(e){let r,t,n,i,o;return{c(){r=Ie("img"),Hn(r.src,t=e[6].image_url)||m(r,"src",t),m(r,"alt",""),m(r,"aria-hidden","true"),m(r,"loading","lazy"),m(r,"decoding","async"),m(r,"class",qi["outer-background__item"]),m(r,"style",n=Mt(e[6].style))},m(s,a){$(s,r,a),i||(o=Be(r,"error",e[2]),i=!0)},p(s,a){a&2&&!Hn(r.src,t=s[6].image_url)&&m(r,"src",t),a&2&&n!==(n=Mt(s[6].style))&&m(r,"style",n)},d(s){s&&Z(r),i=!1,o()}}}function za(e){let r;function t(o,s){return o[6].image_url?d_:f_}let n=t(e),i=n(e);return{c(){i.c(),r=ir()},m(o,s){i.m(o,s),$(o,r,s)},p(o,s){n===(n=t(o))&&i?i.p(o,s):(i.d(1),i=n(o),i&&(i.c(),i.m(r.parentNode,r)))},d(o){o&&Z(r),i.d(o)}}}function __(e){let r,t,n=lr(e[1]),i=[];for(let o=0;o<n.length;o+=1)i[o]=za(Oa(e,n,o));return{c(){r=Ie("span");for(let o=0;o<i.length;o+=1)i[o].c();m(r,"class",t=qi["outer-background"]+(e[0]?" "+qi["outer-background_clip"]:"")),H(r,"border-radius",e[0])},m(o,s){$(o,r,s);for(let a=0;a<i.length;a+=1)i[a]&&i[a].m(r,null)},p(o,[s]){if(s&6){n=lr(o[1]);let a;for(a=0;a<n.length;a+=1){const l=Oa(o,n,a);i[a]?i[a].p(l,s):(i[a]=za(l),i[a].c(),i[a].m(r,null))}for(;a<i.length;a+=1)i[a].d(1);i.length=n.length}s&1&&t!==(t=qi["outer-background"]+(o[0]?" "+qi["outer-background_clip"]:""))&&m(r,"class",t),s&1&&H(r,"border-radius",o[0])},i:S,o:S,d(o){o&&Z(r),ln(i,o)}}}function h_(e,r,t){let n,{direction:i}=r,{componentContext:o}=r,{background:s=[]}=r,{radius:a=""}=r;function l(c){c.target&&"classList"in c.target&&c.target.classList.add(qi["outer-background__item_hidden"])}return e.$$set=c=>{"direction"in c&&t(3,i=c.direction),"componentContext"in c&&t(4,o=c.componentContext),"background"in c&&t(5,s=c.background),"radius"in c&&t(0,a=c.radius)},e.$$.update=()=>{e.$$.dirty&56&&t(1,n=s.map(c=>{const u={},f={style:u};if(c.type==="nine_patch_image"&&c.insets)u["border-image"]=`url("${c.image_url}") ${c.insets.top||0} ${c.insets.right||0} ${c.insets.bottom||0} ${c.insets.left||0} fill`,u["border-image-width"]="auto";else{const h=rs([c]);c.type==="solid"&&(u["background-color"]=h.color),c.type==="gradient"&&(u["background-image"]=h.image),c.type==="image"&&(u.opacity=Number(c.alpha),f.image_url=c.image_url,u["object-fit"]=h.size,u["object-position"]=h.position,Array.isArray(c.filters)&&c.filters.length&&(u.filter=Na(c.filters,o.logError),i==="rtl"&&c.filters.some(b=>b.type==="rtl_mirror")&&(u.transform="scale(-1,1)")))}return f}))},[a,n,l,i,o,s]}class g_ extends Yr{constructor(r){super(),Gr(this,r,h_,__,Cr,{direction:3,componentContext:4,background:5,radius:0})}}const p_=e=>({hasCustomFocus:e[0]&4096}),La=e=>({focusHandler:e[51],blurHandler:e[52],hasCustomFocus:e[12]});function Ra(e){let r,t;return r=new ls({props:{componentContext:e[0],id:e[0].json.id,use:e[50],cls:e[1]+" "+ht("outer",ts,e[24]),style:Mt(e[23]),actions:e[19],doubleTapActions:e[20],longTapActions:e[21],pressStartActions:e[7],pressEndActions:e[8],hoverStartActions:e[9],hoverEndActions:e[10],attrs:e[15],hasInnerFocusable:e[2],isNativeActionAnimation:!e[11].length||Wa(e[11]),customAccessibility:e[13],captureFocusOnAction:e[22],$$slots:{default:[m_]},$$scope:{ctx:e}}}),r.$on("focus",e[51]),r.$on("blur",e[52]),{c(){Zt(r.$$.fragment)},m(n,i){Gt(r,n,i),t=!0},p(n,i){const o={};i[0]&1&&(o.componentContext=n[0]),i[0]&1&&(o.id=n[0].json.id),i[0]&16777218&&(o.cls=n[1]+" "+ht("outer",ts,n[24])),i[0]&8388608&&(o.style=Mt(n[23])),i[0]&524288&&(o.actions=n[19]),i[0]&1048576&&(o.doubleTapActions=n[20]),i[0]&2097152&&(o.longTapActions=n[21]),i[0]&128&&(o.pressStartActions=n[7]),i[0]&256&&(o.pressEndActions=n[8]),i[0]&512&&(o.hoverStartActions=n[9]),i[0]&1024&&(o.hoverEndActions=n[10]),i[0]&32768&&(o.attrs=n[15]),i[0]&4&&(o.hasInnerFocusable=n[2]),i[0]&2048&&(o.isNativeActionAnimation=!n[11].length||Wa(n[11])),i[0]&8192&&(o.customAccessibility=n[13]),i[0]&4194304&&(o.captureFocusOnAction=n[22]),i[0]&86137|i[4]&8192&&(o.$$scope={dirty:i,ctx:n}),r.$set(o)},i(n){t||(G(r.$$.fragment,n),t=!0)},o(n){oe(r.$$.fragment,n),t=!1},d(n){Yt(r,n)}}}function Ba(e){let r,t;return r=new g_({props:{componentContext:e[0],direction:e[14],background:e[5],radius:e[4]}}),{c(){Zt(r.$$.fragment)},m(n,i){Gt(r,n,i),t=!0},p(n,i){const o={};i[0]&1&&(o.componentContext=n[0]),i[0]&16384&&(o.direction=n[14]),i[0]&32&&(o.background=n[5]),i[0]&16&&(o.radius=n[4]),r.$set(o)},i(n){t||(G(r.$$.fragment,n),t=!0)},o(n){oe(r.$$.fragment,n),t=!1},d(n){Yt(r,n)}}}function Ha(e){let r,t;return{c(){r=Ie("span"),m(r,"class",ts.outer__border),m(r,"style",t=Mt(e[3]))},m(n,i){$(n,r,i)},p(n,i){i[0]&8&&t!==(t=Mt(n[3]))&&m(r,"style",t)},d(n){n&&Z(r)}}}function m_(e){let r,t,n,i=e[6]&&Ba(e);const o=e[136].default,s=Uo(o,e,e[137],La);let a=e[16]&&Ha(e);return{c(){i&&i.c(),r=ir(),s&&s.c(),a&&a.c(),t=ir()},m(l,c){i&&i.m(l,c),$(l,r,c),s&&s.m(l,c),a&&a.m(l,c),$(l,t,c),n=!0},p(l,c){l[6]?i?(i.p(l,c),c[0]&64&&G(i,1)):(i=Ba(l),i.c(),G(i,1),i.m(r.parentNode,r)):i&&(ur(),oe(i,1,1,()=>{i=null}),fr()),s&&s.p&&(!n||c[0]&4096|c[4]&8192)&&Yo(s,o,l,l[137],n?Go(o,l[137],c,p_):qo(l[137]),La),l[16]?a?a.p(l,c):(a=Ha(l),a.c(),a.m(t.parentNode,t)):a&&(a.d(1),a=null)},i(l){n||(G(i),G(s,l),n=!0)},o(l){oe(i),oe(s,l),n=!1},d(l){l&&(Z(r),Z(t)),i&&i.d(l),s&&s.d(l),a&&a.d(l)}}}function b_(e){let r,t,n=!e[17]&&!e[18]&&Ra(e);return{c(){n&&n.c(),r=ir()},m(i,o){n&&n.m(i,o),$(i,r,o),t=!0},p(i,o){!i[17]&&!i[18]?n?(n.p(i,o),o[0]&393216&&G(n,1)):(n=Ra(i),n.c(),G(n,1),n.m(r.parentNode,r)):n&&(ur(),oe(n,1,1,()=>{n=null}),fr())},i(i){t||(G(n),t=!0)},o(i){oe(n),t=!1},d(i){i&&Z(r),n&&n.d(i)}}}const y_={left:"start",center:"center",right:"end",start:"start",end:"end"},v_={left:"end",center:"center",right:"start",start:"start",end:"end"},w_={top:"start",center:"center",bottom:"end",baseline:"baseline"},gl=e=>`The component id with the "${e}" property for state change is missing. Either specify the id, or specify the "transition_trigger" property without "state_change" value.`;function Wa(e){return e.some(r=>r.name==="native")}function k_(e,r,t){let n,i,o,s,a,l,c,u,f,h,b,v,_,j,k,N,J,q,Q,se,W,L,R,V,I,D,U,De,Xe,ae,Pe,Me=S,Ue=()=>(Me(),Me=P(R,je=>t(113,Pe=je)),R),Le,jt=S,ye=()=>(jt(),jt=P(L,je=>t(114,Le=je)),L),Ce,re=S,Re=()=>(re(),re=P(V,je=>t(115,Ce=je)),V),pe,ve=S,Se=()=>(ve(),ve=P(W,je=>t(116,pe=je)),W),it,Tt=S,ne=()=>(Tt(),Tt=P(se,je=>t(117,it=je)),se),me,fe=S,te=()=>(fe(),fe=P(Q,je=>t(118,me=je)),Q),tt,ot=S,Te=()=>(ot(),ot=P(q,je=>t(119,tt=je)),q),$e,Et=S,Pt=()=>(Et(),Et=P(J,je=>t(120,$e=je)),J),Ze,xe=S,ct=()=>(xe(),xe=P(i,je=>t(121,Ze=je)),i),A,_e=S,K=()=>(_e(),_e=P(N,je=>t(122,A=je)),N),lt,Ve=S,Vt=()=>(Ve(),Ve=P(k,je=>t(123,lt=je)),k),et,At=S,qt=()=>(At(),At=P(_,je=>t(124,et=je)),_),mt,Ft=S,Rt=()=>(Ft(),Ft=P(j,je=>t(125,mt=je)),j),Ht,vt=S,We=()=>(vt(),vt=P(v,je=>t(126,Ht=je)),v),rt,Ne=S,ut=()=>(Ne(),Ne=P(b,je=>t(13,rt=je)),b),rr,ze=S,hr=()=>(ze(),ze=P(h,je=>t(127,rr=je)),h),er,pr=S,x=()=>(pr(),pr=P(f,je=>t(128,er=je)),f),Je,Jt=S,nt=()=>(Jt(),Jt=P(u,je=>t(129,Je=je)),u),st,wt=S,kt=()=>(wt(),wt=P(a,je=>t(130,st=je)),a),Kt,de,Qe=S,Wt=()=>(Qe(),Qe=P(c,je=>t(131,de=je)),c),Qt,Nt=S,kr=()=>(Nt(),Nt=P(l,je=>t(132,Qt=je)),l),Ot,tr=S,nr=()=>(tr(),tr=P(s,je=>t(133,Ot=je)),s),ft,Ar=S,Ke=()=>(Ar(),Ar=P(o,je=>t(134,ft=je)),o),xt;e.$$.on_destroy.push(()=>Me()),e.$$.on_destroy.push(()=>jt()),e.$$.on_destroy.push(()=>re()),e.$$.on_destroy.push(()=>ve()),e.$$.on_destroy.push(()=>Tt()),e.$$.on_destroy.push(()=>fe()),e.$$.on_destroy.push(()=>ot()),e.$$.on_destroy.push(()=>Et()),e.$$.on_destroy.push(()=>xe()),e.$$.on_destroy.push(()=>_e()),e.$$.on_destroy.push(()=>Ve()),e.$$.on_destroy.push(()=>At()),e.$$.on_destroy.push(()=>Ft()),e.$$.on_destroy.push(()=>vt()),e.$$.on_destroy.push(()=>Ne()),e.$$.on_destroy.push(()=>ze()),e.$$.on_destroy.push(()=>pr()),e.$$.on_destroy.push(()=>Jt()),e.$$.on_destroy.push(()=>wt()),e.$$.on_destroy.push(()=>Qe()),e.$$.on_destroy.push(()=>Nt()),e.$$.on_destroy.push(()=>tr()),e.$$.on_destroy.push(()=>Ar());let{$$slots:yr={},$$scope:Nr}=r,{componentContext:Y}=r,{cls:Fe=""}=r,{style:Fr=void 0}=r,{layoutParams:le={}}=r,{customDescription:zt=!1}=r,{customPaddings:cr=!1}=r,{customActions:dr=""}=r,{additionalPaddings:jr=null}=r,{heightByAspect:Rr=!1}=r,{parentOf:be=void 0}=r,{parentOfSimpleMode:Ge=void 0}=r,{replaceItems:ce=void 0}=r,{hasInnerFocusable:ke=!1}=r;const Lt=Br(on),d=Br(ll),{isEnabled:bt}=Br(fl);sn(e,bt,je=>t(135,xt=je));const Xt=Lt.direction;sn(e,Xt,je=>t(14,Kt=je));let B,gt,w=null,He=[],It={},pt={},$t=!1,_r=1,Mr="transparent",Er=0,Kr={"top-left":0,"top-right":0,"bottom-right":0,"bottom-left":0},y="",g=null,T="",O={},z,ue,Oe,St=0,we=0,Ye=0,dt=!1,Dt=!1,gr={},Wr,Or,hn,bn=0,xn=0,Tn=0,oi=!1,si=!1,Fn=1,vi,$n,gn,Li,li=[],yt=!1,p=!1,E,M,C,ie=[],ee=[],_t=[],at=[],Ur=[],wr=[],Pr=[],ai=[],Gn=[],he=[],Ut="",Xr,ci,Ri,dn,Ii=!1,Bn="visible",ui=0,Eo=0,Ks,Xs,io,Co=!1,ta=!0,Zs,Mn,Lo,oo;function Yb(){t(70,g=null),t(71,T=""),t(88,Fn=1),t(100,Ii=!1),t(101,Bn="visible"),t(102,ui=0),t(103,Eo=0),t(104,Ks=void 0),t(105,Xs=void 0),t(22,ta=!0),li=Y.fakeElement?[]:Y.json.transition_triggers||["state_change","visibility_change"],t(91,yt=li.indexOf("state_change")!==-1),p=li.indexOf("visibility_change")!==-1,B&&vd(B),Mn==null||Mn(),xt&&t(107,Mn=Lt.processVariableTriggers(Y,Y.json.variable_triggers))}function qb(je,zr){if(!Array.isArray(be)||!ce||Ge&&(Array.isArray(zr)?zr.length:0)!==1)return;const pn=be.findIndex(Zr=>(Zr==null?void 0:Zr.id)===je),Vn=be.slice();Vn.splice(pn,1,...(zr||[]).map(Zr=>({json:Zr,id:Zr==null?void 0:Zr.id}))),t(53,be=Vn),ce(Vn.map(Zr=>Zr==null?void 0:Zr.json))}function Jb(je){const zr=ho(je.start_value,1),pn=ho(je.end_value,1),Vn=xr(je.start_delay,0),Zr=ss()?0:xr(je.duration,300),Bi=Da(je.interpolator,"ease_in_out").replace(/_/g,"-");switch(je.name){case"fade":return t(96,Xr=zr),t(97,ci=pn),`opacity ${Zr}ms ${Bi} ${Vn}ms`;case"scale":return t(98,Ri=zr),t(99,dn=pn),`transform ${Zr}ms ${Bi} ${Vn}ms`;case"native":case"no_animation":return"";default:return Y.logError(X(new Error("Unknown action_animation name"),{additional:{animation:je.name}})),""}}async function Kb(je){t(101,Bn=je);const zr=je==="visible"?"in":"out",pn=zr==="in"?Y.json.transition_in:Y.json.transition_out;if(p&&pn){let Vn;je==="gone"&&(Vn=B.getBoundingClientRect()),await yn(),zr==="in"&&t(93,M=!0),d.runVisibilityTransition({...Y.json,visibility:"visible"},Y,pn,B,zr,Vn).then(()=>{zr==="in"&&t(93,M=!1)}).catch(Zr=>{throw zr==="in"&&t(93,M=!1),Zr})}}function yd(){if(w&&B){const je=Lt.getExtensionContext(Y);w.forEach(zr=>{var pn;(pn=zr.unmountView)==null||pn.call(zr,B,je)}),w=null}}function Xb(){if(w!=null&&w.length){const je=Lt.getExtensionContext(Y);w.forEach(zr=>{var pn;(pn=zr.updateView)==null||pn.call(zr,B,je)})}}function vd(je){var Bi,Ro,Bo;Lo==null||Lo.destroy(),t(63,B=je),yt&&Y.json.transition_in&&(Y.id?d.registerChildWithTransitionIn(Y.json,Y,Y.json.transition_in,je).then(()=>{t(92,E=!1)}).catch(Hi=>{throw t(92,E=!1),Hi}):Y.logError(X(new Error(gl("transition_in")),{level:"warn"}))),yt&&Y.json.transition_out&&(Y.id?d.registerChildWithTransitionOut(Y.json,Y,Y.json.transition_out,je):Y.logError(X(new Error(gl("transition_out")),{level:"warn"}))),Y.fakeElement||(Y.json.transition_change&&!Y.id&&Y.logError(X(new Error(gl("transition_change")),{level:"warn"})),d.registerChildWithTransitionChange(Y.json,Y,Y.json.transition_change,je).then(()=>{t(94,C=!1)}).catch(Hi=>{throw t(94,C=!1),Hi}));const zr=Y.fakeElement?[]:Y.json.visibility_actions||Y.json.visibility_action&&[Y.json.visibility_action],pn=Y.fakeElement?[]:Y.json.disappear_actions;let Vn;(Array.isArray(zr)&&zr.length||Array.isArray(pn)&&pn.length)&&(Vn=Kd(je,{visibilityActions:zr,disappearActions:pn,rootCtx:Lt,componentContext:Y}));const Zr=Y.id;return Zr&&(oo==null||oo(),oo=Lt.registerId(Zr,{context:()=>Y,node:()=>B}),d.registerChild(Zr)),(Bi=Y.json.tooltips)==null||Bi.forEach(Hi=>{Lt.registerTooltip(je,Hi)}),io&&(io.disconnect(),io=void 0),io=n_(B,Y,(Ro=Y.json.layout_provider)==null?void 0:Ro.width_variable_name,(Bo=Y.json.layout_provider)==null?void 0:Bo.height_variable_name),Lo={destroy(){oo&&(oo(),oo=void 0),Zr&&d.unregisterChild(Zr),Vn&&Vn.destroy()}},Lo}function Zb(){Y.json.focus&&(Ad(Lt.isPointerFocus)||t(12,Co=!0),Y.execAnyActions(at))}function Qb(){Y.json.focus&&(t(12,Co=!1),Y.execAnyActions(Ur))}return xo(Xb),an(()=>{var je;He.forEach(zr=>{Lt.unregisterParentOf(zr)}),t(64,He=[]),io&&(io.disconnect(),io=void 0),(je=Y.json.tooltips)==null||je.forEach(zr=>{Lt.unregisterTooltip(zr)}),Mn==null||Mn(),yd()}),e.$$set=je=>{"componentContext"in je&&t(0,Y=je.componentContext),"cls"in je&&t(1,Fe=je.cls),"style"in je&&t(54,Fr=je.style),"layoutParams"in je&&t(55,le=je.layoutParams),"customDescription"in je&&t(56,zt=je.customDescription),"customPaddings"in je&&t(57,cr=je.customPaddings),"customActions"in je&&t(58,dr=je.customActions),"additionalPaddings"in je&&t(59,jr=je.additionalPaddings),"heightByAspect"in je&&t(60,Rr=je.heightByAspect),"parentOf"in je&&t(53,be=je.parentOf),"parentOfSimpleMode"in je&&t(61,Ge=je.parentOfSimpleMode),"replaceItems"in je&&t(62,ce=je.replaceItems),"hasInnerFocusable"in je&&t(2,ke=je.hasInnerFocusable),"$$scope"in je&&t(137,Nr=je.$$scope)},e.$$.update=()=>{var je,zr,pn,Vn,Zr,Bi,Ro,Bo,Hi;if(e.$$.dirty[0]&1&&t(112,n=Y.origJson),e.$$.dirty[3]&524288&&n&&Yb(),e.$$.dirty[0]&1|e.$$.dirty[3]&16384|e.$$.dirty[4]&2048&&(xt?(Mn==null||Mn(),t(107,Mn=Lt.processVariableTriggers(Y,Y.json.variable_triggers))):Mn==null||Mn()),e.$$.dirty[0]&1&&ct(t(47,i=Y.getDerivedFromVars(Y.json.focus))),e.$$.dirty[0]&1&&Ke(t(46,o=Y.getDerivedFromVars(Y.json.border))),e.$$.dirty[0]&1&&nr(t(45,s=Y.getDerivedFromVars(Y.json.paddings))),e.$$.dirty[0]&1&&kt(t(44,a=Y.getDerivedFromVars(Y.json.margins))),e.$$.dirty[0]&1&&kr(t(43,l=Y.getDerivedFromVars(Y.json.width))),e.$$.dirty[0]&1&&Wt(t(42,c=Y.getDerivedFromVars(Y.json.alignment_horizontal))),e.$$.dirty[0]&1&&nt(t(41,u=Y.getDerivedFromVars(Y.json.height))),e.$$.dirty[0]&1&&x(t(40,f=Y.getDerivedFromVars(Y.json.alignment_vertical))),e.$$.dirty[0]&1&&hr(t(39,h=Y.getDerivedFromVars(Y.json.alpha))),e.$$.dirty[0]&1&&ut(t(38,b=Y.getDerivedFromVars(Y.json.accessibility))),e.$$.dirty[0]&1&&We(t(37,v=Y.getDerivedFromVars(Y.json.background))),e.$$.dirty[0]&1&&qt(t(36,_=Y.getDerivedFromVars(Y.json.action,void 0,!0))),e.$$.dirty[0]&1&&Rt(t(35,j=Y.getDerivedFromVars(Y.json.actions,void 0,!0))),e.$$.dirty[0]&1&&Vt(t(34,k=Y.getDeriv