@divkitframework/divkit
Version:
DivKit for the web
8 lines • 421 kB
JavaScript
"use strict";var Vd=Object.defineProperty;var Id=(e,r,t)=>r in e?Vd(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var mr=(e,r,t)=>Id(e,typeof r!="symbol"?r+"":r,t);/*!
DivKit v31.12.0
https://github.com/divkit/divkit
@licence Apache-2.0
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function V(){}const Ps=e=>e;function to(e,r){for(const t in r)e[t]=r[t];return e}function hf(e){return e()}function oa(){return Object.create(null)}function Qr(e){e.forEach(hf)}function Tr(e){return typeof e=="function"}function Dd(e,r){return e!=e?r==r:e!==r||e&&typeof e=="object"||typeof e=="function"}let Go;function Gn(e,r){return e===r?!0:(Go||(Go=document.createElement("a")),Go.href=r,e===Go.href)}function Vr(e,r){return e!=e?r==r:e!==r}function Td(e){return Object.keys(e).length===0}function N(e,...r){if(e==null){for(const n of r)n(void 0);return V}const t=e.subscribe(...r);return t.unsubscribe?()=>t.unsubscribe():t}function Fd(e){let r;return N(e,t=>r=t)(),r}function fn(e,r,t){e.$$.on_destroy.push(N(r,t))}function Ns(e,r,t,n){if(e){const i=gf(e,r,t,n);return e[0](i)}}function gf(e,r,t,n){return e[1]&&n?to(t.ctx.slice(),e[1](n(r))):t.ctx}function Os(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 zs(e,r,t,n,i,o){if(i){const s=gf(r,t,n,o);e.p(s,i)}}function Ls(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 $s(e,r,t){return e.set(t),r}function Rs(e){return e&&Tr(e.destroy)?e.destroy:V}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 pf=typeof window<"u";let Pl=pf?()=>window.performance.now():()=>Date.now(),Nl=pf?e=>requestAnimationFrame(e):V;const ho=new Set;function mf(e){ho.forEach(r=>{r.c(e)||(ho.delete(r),r.f())}),ho.size!==0&&Nl(mf)}function Ol(e){let r;return ho.size===0&&Nl(mf),{promise:new Promise(t=>{ho.add(r={c:e,f:t})}),abort(){ho.delete(r)}}}const Si=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function St(e,r){e.appendChild(r)}function bf(e){if(!e)return document;const r=e.getRootNode?e.getRootNode():e.ownerDocument;return r&&r.host?r:e.ownerDocument}function Md(e){const r=De("style");return r.textContent="/* empty */",Pd(bf(e),r),r.sheet}function Pd(e,r){return St(e.head||e,r),r.sheet}function $(e,r,t){e.insertBefore(r,t||null)}function x(e){e.parentNode&&e.parentNode.removeChild(e)}function un(e,r){for(let t=0;t<e.length;t+=1)e[t]&&e[t].d(r)}function De(e){return document.createElement(e)}function _n(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function Zn(e){return document.createTextNode(e)}function br(){return Zn(" ")}function ir(){return Zn("")}function He(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 Nd=["width","height"];function si(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&&Nd.indexOf(n)===-1?e[n]=r[n]:m(e,n,r[n])}function Od(e,r){Object.keys(r).forEach(t=>{zd(e,t,r[t])})}function zd(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 la(e){return/-/.test(e)?Od:si}function Ld(e){return Array.from(e.childNodes)}function Vi(e,r){r=""+r,e.data!==r&&(e.data=r)}function aa(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 ca(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 Rd(e){const r=e.querySelector(":checked");return r&&r.__value}function yf(e,r,{bubbles:t=!1,cancelable:n=!1}={}){return new CustomEvent(e,{detail:r,bubbles:t,cancelable:n})}function ua(e,r){return new e(r)}const ws=new Map;let ks=0;function Bd(e){let r=5381,t=e.length;for(;t--;)r=(r<<5)-r^e.charCodeAt(t);return r>>>0}function Hd(e,r){const t={stylesheet:Md(r),rules:{}};return ws.set(e,t),t}function As(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_${Bd(u)}_${a}`,h=bf(e),{stylesheet:b,rules:v}=ws.get(h)||Hd(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`,ks+=1,f}function js(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(", "),ks-=i,ks||Wd())}function Wd(){Nl(()=>{ks||(ws.forEach(e=>{const{ownerNode:r}=e.stylesheet;r&&x(r)}),ws.clear())})}let Po;function Mo(e){Po=e}function vo(){if(!Po)throw new Error("Function called outside component initialization");return Po}function Bn(e){vo().$$.on_mount.push(e)}function Bs(e){vo().$$.after_update.push(e)}function dn(e){vo().$$.on_destroy.push(e)}function Ud(){const e=vo();return(r,t,{cancelable:n=!1}={})=>{const i=e.$$.callbacks[r];if(i){const o=yf(r,t,{cancelable:n});return i.slice().forEach(s=>{s.call(e,o)}),!o.defaultPrevented}return!0}}function Gi(e,r){return vo().$$.context.set(e,r),r}function Ur(e){return vo().$$.context.get(e)}function ki(e,r){const t=e.$$.callbacks[r.type];t&&t.slice().forEach(n=>n.call(this,r))}const uo=[],Fr=[];let go=[];const fa=[],vf=Promise.resolve();let fl=!1;function wf(){fl||(fl=!0,vf.then(kf))}function wn(){return wf(),vf}function Ln(e){go.push(e)}const el=new Set;let lo=0;function kf(){if(lo!==0)return;const e=Po;do{try{for(;lo<uo.length;){const r=uo[lo];lo++,Mo(r),Gd(r.$$)}}catch(r){throw uo.length=0,lo=0,r}for(Mo(null),uo.length=0,lo=0;Fr.length;)Fr.pop()();for(let r=0;r<go.length;r+=1){const t=go[r];el.has(t)||(el.add(t),t())}go.length=0}while(uo.length);for(;fa.length;)fa.pop()();fl=!1,el.clear(),Mo(e)}function Gd(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(Ln)}}function qd(e){const r=[],t=[];go.forEach(n=>e.indexOf(n)===-1?r.push(n):t.push(n)),t.forEach(n=>n()),go=r}let Do;function zl(){return Do||(Do=Promise.resolve(),Do.then(()=>{Do=null})),Do}function Ji(e,r,t){e.dispatchEvent(yf(`${r?"intro":"outro"}${t}`))}const ts=new Set;let _i;function fr(){_i={r:0,c:[],p:_i}}function dr(){_i.r||Qr(_i.c),_i=_i.p}function q(e,r){e&&e.i&&(ts.delete(e),e.i(r))}function oe(e,r,t,n){if(e&&e.o){if(ts.has(e))return;ts.add(e),_i.c.push(()=>{ts.delete(e),n&&(t&&e.d(1),n())}),e.o(r)}else n&&n()}const Ll={duration:0};function Hs(e,r,t){const n={direction:"in"};let i=r(e,t,n),o=!1,s,a,l=0;function c(){s&&js(e,s)}function u(){const{delay:h=0,duration:b=300,easing:v=Ps,tick:_=V,css:j}=i||Ll;j&&(s=As(e,0,1,b,h,v,j,l++)),_(0,1);const k=Pl()+h,P=k+b;a&&a.abort(),o=!0,Ln(()=>Ji(e,!0,"start")),a=Ol(J=>{if(o){if(J>=P)return _(1,0),Ji(e,!0,"end"),c(),o=!1;if(J>=k){const Y=v((J-k)/b);_(Y,1-Y)}}return o})}let f=!1;return{start(){f||(f=!0,js(e),Tr(i)?(i=i(n),zl().then(u)):u())},invalidate(){f=!1},end(){o&&(c(),o=!1)}}}function Af(e,r,t){const n={direction:"out"};let i=r(e,t,n),o=!0,s;const a=_i;a.r+=1;let l;function c(){const{delay:u=0,duration:f=300,easing:h=Ps,tick:b=V,css:v}=i||Ll;v&&(s=As(e,1,0,f,u,h,v));const _=Pl()+u,j=_+f;Ln(()=>Ji(e,!1,"start")),"inert"in e&&(l=e.inert,e.inert=!0),Ol(k=>{if(o){if(k>=j)return b(0,1),Ji(e,!1,"end"),--a.r||Qr(a.c),!1;if(k>=_){const P=h((k-_)/f);b(1-P,P)}}return o})}return Tr(i)?zl().then(()=>{i=i(n),c()}):c(),{end(u){u&&"inert"in e&&(e.inert=l),u&&i.tick&&i.tick(1,0),o&&(s&&js(e,s),o=!1)}}}function da(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&&js(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=Ps,tick:P=V,css:J}=o||Ll,Y={start:Pl()+_,b:v};v||(Y.group=_i,_i.r+=1),"inert"in e&&(v?u!==void 0&&(e.inert=u):(u=e.inert,e.inert=!0)),a||l?l=Y:(J&&(f(),c=As(e,s,v,j,_,k,J)),v&&P(0,1),a=h(Y,j),Ln(()=>Ji(e,v,"start")),Ol(Z=>{if(l&&Z>l.start&&(a=h(l,j),l=null,Ji(e,a.b,"start"),J&&(f(),c=As(e,s,a.b,a.duration,0,k,o.css))),a){if(Z>=a.end)P(s=a.b,1-s),Ji(e,a.b,"end"),l||(a.b?f():--a.group.r||Qr(a.group.c)),a=null;else if(Z>=a.start){const se=Z-a.start;s=a.a+a.d*k(se/a.duration),P(s,1-s)}}return!!(a||l)}))}return{run(v){Tr(o)?zl().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 jf(e,r){oe(e,1,1,()=>{r.delete(e.key)})}function Ef(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,P=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 _&&P.set(L,Math.abs(v-_[L]))}const Y=new Set,Z=new Set;function se(W){q(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,S=L.key;W===L?(u=W.first,h--,b--):k.has(S)?!s.has(R)||Y.has(R)?se(W):Z.has(S)?h--:P.get(R)>P.get(S)?(Z.add(R),se(W)):(Y.add(S),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 wo(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 $t(e){e&&e.c()}function Kt(e,r,t){const{fragment:n,after_update:i}=e.$$;n&&n.m(r,t),Ln(()=>{const o=e.$$.on_mount.map(hf).filter(Tr);e.$$.on_destroy?e.$$.on_destroy.push(...o):Qr(o),e.$$.on_mount=[]}),i.forEach(Ln)}function Xt(e,r){const t=e.$$;t.fragment!==null&&(qd(t.after_update),Qr(t.on_destroy),t.fragment&&t.fragment.d(r),t.on_destroy=t.fragment=null,t.ctx=[])}function Yd(e,r){e.$$.dirty[0]===-1&&(uo.push(e),wf(),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=Po;Mo(e);const c=e.$$={fragment:null,ctx:[],props:o,update:V,not_equal:i,bound:oa(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(r.context||(l?l.$$.context:[])),callbacks:oa(),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&&Yd(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=Ld(r.target);c.fragment&&c.fragment.l(f),f.forEach(x)}else c.fragment&&c.fragment.c();r.intro&&q(e.$$.fragment),Kt(e,r.target,r.anchor),kf()}Mo(l)}class qr{constructor(){mr(this,"$$");mr(this,"$$set")}$destroy(){Xt(this,1),this.$destroy=V}$on(r,t){if(!Tr(t))return V;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&&!Td(r)&&(this.$$.skip_bound=!0,this.$$set(r),this.$$.skip_bound=!1)}}const Jd="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Jd);const ao=[];function Kd(e,r){return{subscribe:Ei(e,r).subscribe}}function Ei(e,r=V){let t;const n=new Set;function i(a){if(Dd(e,a)&&(e=a,t)){const l=!ao.length;for(const c of n)c[1](),ao.push(c,e);if(l){for(let c=0;c<ao.length;c+=2)ao[c][0](ao[c+1]);ao.length=0}}}function o(a){i(a(e))}function s(a,l=V){const c=[a,l];return n.add(c),n.size===1&&(t=r(i,o)||V),a(e),()=>{n.delete(c),n.size===0&&t&&(t(),t=null)}}return{set:i,update:o,subscribe:s}}function Xi(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 Kd(t,(s,a)=>{let l=!1;const c=[];let u=0,f=V;const h=()=>{if(u)return;f();const v=r(n?c[0]:c,s,a);o?s(v):f=Tr(v)?v:V},b=i.map((v,_)=>N(v,j=>{c[_]=j,u&=~(1<<_),l&&h()},()=>{u|=1<<_}));return l=!0,h(),function(){Qr(b),f(),l=!1}})}const Xd="divkit-6d515",Zd="divkit-27458",Qd="divkit-82db1",xd="divkit-be734",$d="divkit-9a652",ar={root_platform_desktop:Xd,root__clickable:Zd,"root__clickable-no-transition":"divkit-3bb57","root__any-actions":"divkit-ba614",root:Qd,root__selectable:xd,root__unselectable:$d,"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 e_="divkit-bf0ea",t_="divkit-27458",r_="divkit-05991",n_="divkit-80cac",i_="divkit-90c49",o_="divkit-b33bc",s_="divkit-f6ff9",Es={outer:e_,root__clickable:t_,"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:r_,outer_height_content:n_,"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:i_,outer_visibility_invisible:o_,outer_visibility_gone:s_,"outer_has-action-animation":"divkit-4d4f3","outer_has-custom-focus":"divkit-b630e"};function Nt(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 ln(e){let r=Ee(e);return r==="0"&&(r+="em"),r}function Cf(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=hi(e);return n?(n.a*=r,Rl(n)):t}function l_(e,r,t="transparent"){if(e=(typeof e=="string"&&e||"").toLowerCase(),e.charAt(0)!=="#")return t;const n=hi(e);return n?(n.a=r,Rl(n)):t}function Rl(e){return e.a===255?`#${[e.r,e.g,e.b].map(r=>Cf(Math.round(r).toString(16),2)).join("")}`:`rgba(${e.r},${e.g},${e.b},${(e.a/255).toFixed(2)})`}function hi(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 dl(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 bi=Boolean;function Ws(e){if(e.length===1&&e[0].type==="solid")return c_({bg:e[0]});const r=e.map(t=>{if(t.type==="solid")return a_({bg:t});if(t.type==="gradient")return u_({bg:t});if(t.type==="image")return __({bg:t});if(t.type==="radial_gradient")return d_({bg:t})}).filter(bi).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 a_(e){const r=Sr(e.bg.color||"transparent");return{size:void 0,pos:void 0,image:`linear-gradient(to bottom,${r},${r})`}}function c_(e){return{color:Sr(e.bg.color||"transparent"),size:"auto",position:"50% 50%"}}function Sf(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 u_(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(bi);if(!(r!=null&&r.length)&&!((s=e.bg)!=null&&s.color_map))return;let t;if(e.bg.color_map){const a=Sf(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 f_={nearest_corner:"closest-corner",farthest_corner:"farthest-corner",nearest_side:"closest-side",farthest_side:"farthest-side"};function _a(e){if(e&&typeof e=="object"&&"type"in e&&e.value!==void 0){if(e.type==="fixed")return ln(e.value);if(e.type==="relative")return`${Number(e.value)*100}%`}return"50%"}function d_(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(bi);if(!(r!=null&&r.length)&&!((u=e.bg)!=null&&u.color_map))return;let t;if(e.bg.color_map?t=Sf(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=ln(n.value):n.type==="relative"&&(i=f_[n.value]));const o=_a(e.bg.center_x),s=_a(e.bg.center_y);return{size:void 0,pos:void 0,image:`radial-gradient(circle ${i||"farthest-corner"} at ${o} ${s},`+t+")"}}function __(e){var t;const r=(t=e.bg)==null?void 0:t.image_url;if(r)return{size:Vf(e.bg.scale),pos:If(e.bg),image:'url("'+dl(r)+'")'}}function Vf(e){return e==="fit"?"contain":e==="stretch"?"fill":e==="no_scale"?"none":"cover"}function If(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 $r(e,r){const t=Number(e);return Number.isNaN(t)||t<0?r:t}function ha(e,r,t){return typeof r=="number"&&(e&&r>0&&r<=100||!e&&r>=0&&r<100)?r:t}function h_(e){return e.is_enabled!==0&&e.is_enabled!==!1&&e.index!==void 0}function g_(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=Xi(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(h_);const v={};u.forEach(k=>{v[k.index]=k}),l();const _=[...new Set(u.map(k=>{const P=o[k.index].type==="visibility";return ha(P,k.visibility_percentage,P?50:0)/100}))];if(!_.length)return;const j=k=>{k.forEach(P=>{u.forEach(J=>{const Y=o[J.index],Z=Y.type==="visibility",se=ha(Z,J.visibility_percentage,Z?50:0);let W;se===0?W=P.intersectionRatio>=1e-12:W=P.intersectionRatio>=se/100,(Z?!Y.visible&&W:Y.visible&&!W)?Y.finished||(Y.timer=setTimeout(()=>{++Y.count;const S=J.log_limit===0?1/0:J.log_limit||1;Y.count>=S&&(Y.finished=!0),f(Y)},$r(J.visibility_duration,800))):(Z?!W:W)&&Y.timer&&clearTimeout(Y.timer),Y.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 ga(e,r){r&&e.push(r)}function pt(e,r,t){const n=[];ga(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}`:"");ga(n,r[s])}}return n.join(" ")}const Bl=Symbol("state");function li(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 Us(e){if(typeof e!="number"&&typeof e!="string")return!1;const r=Number(e);return!Number.isNaN(r)}function Cn(e){return Us(e)&&e>=0}function Cs(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]&&!Cn(n[s]))return t;return li(e,r)}function p_(e,r){return!Cn(e)||e===void 0||e>1?r:Number(e)}const m_=Object.prototype.hasOwnProperty;function Hl(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(!m_.call(r,o)||!Hl(e[o],r[o]))return!1}return!0}function Ni(e,r){return Hl(e,r)?r:e}function b_(e,r){return e==="visible"||e==="invisible"||e==="gone"?e:r}function Df(e,r){return e==="linear"||e==="ease"||e==="ease_in_out"||e==="ease_in"||e==="ease_out"?e:r}function _o(e,r){const t=Number(e);return Number.isNaN(t)?r:t}function Wl(e){const r=[];return e.name==="set"?(e.items||[]).forEach(t=>{r.push(...Wl(t))}):r.push(e),r}function ko(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]]&&!Cn(e[t[n]]))return r;return e}function y_(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 v_(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]&&!Cn(t[n]))return r;return e}function rs(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 w_(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 k_(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 Mn(e){return e.is_enabled!==0&&e.is_enabled!==!1}let tl;function Gs(){return typeof matchMedia>"u"?!1:(tl||(tl=window.matchMedia("(prefers-reduced-motion)")),tl.matches)}const A_=8,j_=(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>A_){const c=new Error("Recursive layout in size_provider");c.level="warn",c.additional={widthVariableName:t,heightVariableName:n},r.logError(c);break}await wn()}}),i.observe(e)),i},Ul=Symbol("enabled");function En(e,r){return e===1||e===0||e===!1||e===!0?!!e:r}function mo(e){return[e.state_description,e.description,e.hint].filter(Boolean).join(", ")}const E_="divkit-ee5cc",pa={actionable__button:E_};function C_(){}const Zi=Symbol("action");function _l(e){if(e.startsWith("tel:"))return"tel";const r=/^([^/]+):\/\//.exec(e);return r&&r[1]||""}function hl(e,r){return r.has(e)}function S_(e){var f;let r,t,n,i,o,s;const a=e[28].default,l=Ns(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=to(u,c[h]);return{c(){r=De("span"),l&&l.c(),si(r,u)},m(h,b){$(h,r,b),l&&l.m(r,null),e[40](r),i=!0,o||(s=[Rs(e[4].call(null,r)),He(r,"click",e[35]),He(r,"keydown",e[14]),He(r,"focus",e[36]),He(r,"blur",e[37])],o=!0)},p(h,b){var v;l&&l.p&&(!i||b[0]&134217728)&&zs(l,a,h,h[27],i?Os(a,h[27],b,null):Ls(h[27]),null),si(r,u=wo(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||(q(l,h),i=!0)},o(h){oe(l,h),i=!1},d(h){h&&x(r),l&&l.d(h),e[40](null),o=!1,Qr(s)}}}function V_(e){var u;let r,t,n,i,o;const s=e[28].default,a=Ns(s,e,e[27],null);let l=[{class:t=e[1]+" "+pa.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=to(c,l[f]);return{c(){r=De("button"),a&&a.c(),si(r,c)},m(f,h){$(f,r,h),a&&a.m(r,null),r.autofocus&&r.focus(),e[39](r),n=!0,i||(o=[Rs(e[4].call(null,r)),He(r,"click",e[32]),He(r,"keydown",e[14]),He(r,"focus",e[33]),He(r,"blur",e[34])],i=!0)},p(f,h){var b;a&&a.p&&(!n||h[0]&134217728)&&zs(a,s,f,f[27],n?Os(s,f[27],h,null):Ls(f[27]),null),si(r,c=wo(l,[(!n||h[0]&35&&t!==(t=f[1]+" "+pa.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||(q(a,f),n=!0)},o(f){oe(a,f),n=!1},d(f){f&&x(r),a&&a.d(f),e[39](null),i=!1,Qr(o)}}}function I_(e){var u;let r,t,n,i,o;const s=e[28].default,a=Ns(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=to(c,l[f]);return{c(){r=De("a"),a&&a.c(),si(r,c)},m(f,h){$(f,r,h),a&&a.m(r,null),e[38](r),n=!0,i||(o=[Rs(e[4].call(null,r)),He(r,"click",e[29]),He(r,"keydown",e[14]),He(r,"focus",e[30]),He(r,"blur",e[31])],i=!0)},p(f,h){var b;a&&a.p&&(!n||h[0]&134217728)&&zs(a,s,f,f[27],n?Os(s,f[27],h,null):Ls(f[27]),null),si(r,c=wo(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||(q(a,f),n=!0)},o(f){oe(a,f),n=!1},d(f){f&&x(r),a&&a.d(f),e[38](null),i=!1,Qr(o)}}}function D_(e){let r,t,n,i;const o=[I_,V_,S_],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):(fr(),oe(s[u],1,1,()=>{s[u]=null}),dr(),t=s[r],t?t.p(l,c):(t=s[r]=o[r](l),t.c()),q(t,1),t.m(n.parentNode,n))},i(l){i||(q(t),i=!0)},o(l){oe(t),i=!1},d(l){l&&x(n),s[r].d(l)}}}const ma=8,ba=400,rl=400,T_=new Set(["button","image","checkbox","radio","header"]);function ya(e){e.preventDefault()}function F_(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=C_}=r,{customAction:P=null}=r,{isNativeActionAnimation:J=!0}=r,{hasInnerFocusable:Y=!1}=r,{customAccessibility:Z=void 0}=r,{captureFocusOnAction:se=!0}=r;const W=Ur(on),L=Ur(Zi);Gi(Zi,{hasAction(){return!!(L.hasAction()||a!=null&&a.length||(Z==null?void 0:Z.mode)==="exclude")}});let R,S="",I,D=-1,U=-1,Ie=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=_l(_e);return K&&!hl(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+ba){A.preventDefault();return}if(l!=null&&l.length&&U>0&&_e-U<rl){A.preventDefault(),o.execAnyActions(l,{processUrls:!0,node:R}),U=-1;return}if(U=_e,l!=null&&l.length&&D>0&&_e<D+rl){A.preventDefault(),clearTimeout(Ue),Ue=window.setTimeout(()=>{re(void 0,!0)},rl);return}(P==null?void 0:P(A))===!1?A.preventDefault():re(A,!1)}function pe(A){L.hasAction()||(Ie={x:A.clientX,y:A.clientY},Xe=!1,D=Date.now(),Me&&clearTimeout(Me),clearTimeout(Ue),o.execAnyActions(u,{node:R}))}function ve(A){Ie&&(Math.abs(Ie.x-A.clientX)>ma||Math.abs(Ie.y-A.clientY)>ma)&&(Xe=!0)}function Se(A){L.hasAction()||!Ie||D<0||(!Xe&&Date.now()-D>=ba&&(A.stopImmediatePropagation(),o.execAnyActions(c,{processUrls:!0,node:R})),Me&&clearTimeout(Me),Me=window.setTimeout(()=>{Ie=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())}Bn(()=>{s&&!Y&&W.registerFocusable(s,{focus(){R&&(S||ae)&&R.focus()}})}),dn(()=>{typeof window<"u"&&(window.removeEventListener("pointermove",ve),window.removeEventListener("pointerup",Se),window.removeEventListener("pointercancel",Se)),s&&!Y&&W.unregisterFocusable(s),Me&&clearTimeout(Me),Ue&&clearTimeout(Ue)});function me(A){ki.call(this,e,A)}function fe(A){ki.call(this,e,A)}function te(A){ki.call(this,e,A)}function tt(A){ki.call(this,e,A)}function ot(A){ki.call(this,e,A)}function Te(A){ki.call(this,e,A)}function $e(A){ki.call(this,e,A)}function Et(A){ki.call(this,e,A)}function Mt(A){ki.call(this,e,A)}function Ze(A){Fr[A?"unshift":"push"](()=>{R=A,t(6,R)})}function xe(A){Fr[A?"unshift":"push"](()=>{R=A,t(6,R)})}function ct(A){Fr[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,P=A.customAction),"isNativeActionAnimation"in A&&t(5,J=A.isNativeActionAnimation),"hasInnerFocusable"in A&&t(24,Y=A.hasInnerFocusable),"customAccessibility"in A&&t(25,Z=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=(Z==null?void 0:Z.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,S=_e),t(11,I=a[A].target||void 0);break}}t(8,ae=!!P),(S||Array.isArray(a)&&(a!=null&&a.length))&&(L.hasAction()||ye)?(t(7,S=""),o.logError(X(new Error("Actionable element is forbidden inside other actionable element or inside accessibility mode=exlucde"),{level:"warn",additional:{actions:a}}))):S&&!hl(_l(S),W.getBuiltinProtocols())?(t(7,S=""),t(8,ae=!0)):!S&&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&&(Z!=null&&Z.type&&T_.has(Z.type)?Z.type==="header"?t(9,Le="heading"):t(9,Le=Z.type):S?t(9,Le=void 0):ae&&t(9,Le="button"),(Le==="checkbox"||Le==="radio")&&typeof(Z==null?void 0:Z.is_checked)=="boolean"?t(13,jt=Z.is_checked):t(13,jt=void 0)),e.$$.dirty[0]&75235777&&R&&(S||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",ya):R.removeEventListener("mousedown",ya),t(12,Pe=!!(S||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,S,ae,Le,ye,I,Pe,jt,ne,o,s,a,l,u,f,h,b,P,Y,Z,se,i,n,me,fe,te,tt,ot,Te,$e,Et,Mt,Ze,xe,ct]}class qs extends qr{constructor(r){super(),Gr(this,r,F_,D_,Vr,{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 Pn(e){return Us(e)&&e>0}function Tf(e,r){return e.map(t=>{if(!t){r(X(new Error("Incorrect filter"),{level:"warn"}));return}if(t.type==="blur"){if(Pn(t.radius))return`blur(${ln(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 va(e,r,t){const n=e.slice();return n[6]=r[t],n}function M_(e){let r,t;return{c(){r=De("span"),m(r,"class",qi["outer-background__item"]),m(r,"style",t=Nt(e[6].style))},m(n,i){$(n,r,i)},p(n,i){i&2&&t!==(t=Nt(n[6].style))&&m(r,"style",t)},d(n){n&&x(r)}}}function P_(e){let r,t,n,i,o;return{c(){r=De("img"),Gn(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=Nt(e[6].style))},m(s,a){$(s,r,a),i||(o=He(r,"error",e[2]),i=!0)},p(s,a){a&2&&!Gn(r.src,t=s[6].image_url)&&m(r,"src",t),a&2&&n!==(n=Nt(s[6].style))&&m(r,"style",n)},d(s){s&&x(r),i=!1,o()}}}function wa(e){let r;function t(o,s){return o[6].image_url?P_:M_}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&&x(r),i.d(o)}}}function N_(e){let r,t,n=lr(e[1]),i=[];for(let o=0;o<n.length;o+=1)i[o]=wa(va(e,n,o));return{c(){r=De("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=va(o,n,a);i[a]?i[a].p(l,s):(i[a]=wa(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:V,o:V,d(o){o&&x(r),un(i,o)}}}function O_(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=Ws([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=Tf(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 z_ extends qr{constructor(r){super(),Gr(this,r,O_,N_,Vr,{direction:3,componentContext:4,background:5,radius:0})}}const L_=e=>({hasCustomFocus:e[0]&4096}),ka=e=>({focusHandler:e[51],blurHandler:e[52],hasCustomFocus:e[12]});function Aa(e){let r,t;return r=new qs({props:{componentContext:e[0],id:e[0].json.id,use:e[50],cls:e[1]+" "+pt("outer",Es,e[24]),style:Nt(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||Ca(e[11]),customAccessibility:e[13],captureFocusOnAction:e[22],$$slots:{default:[R_]},$$scope:{ctx:e}}}),r.$on("focus",e[51]),r.$on("blur",e[52]),{c(){$t(r.$$.fragment)},m(n,i){Kt(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]+" "+pt("outer",Es,n[24])),i[0]&8388608&&(o.style=Nt(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||Ca(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||(q(r.$$.fragment,n),t=!0)},o(n){oe(r.$$.fragment,n),t=!1},d(n){Xt(r,n)}}}function ja(e){let r,t;return r=new z_({props:{componentContext:e[0],direction:e[14],background:e[5],radius:e[4]}}),{c(){$t(r.$$.fragment)},m(n,i){Kt(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||(q(r.$$.fragment,n),t=!0)},o(n){oe(r.$$.fragment,n),t=!1},d(n){Xt(r,n)}}}function Ea(e){let r,t;return{c(){r=De("span"),m(r,"class",Es.outer__border),m(r,"style",t=Nt(e[3]))},m(n,i){$(n,r,i)},p(n,i){i[0]&8&&t!==(t=Nt(n[3]))&&m(r,"style",t)},d(n){n&&x(r)}}}function R_(e){let r,t,n,i=e[6]&&ja(e);const o=e[136].default,s=Ns(o,e,e[137],ka);let a=e[16]&&Ea(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&&q(i,1)):(i=ja(l),i.c(),q(i,1),i.m(r.parentNode,r)):i&&(fr(),oe(i,1,1,()=>{i=null}),dr()),s&&s.p&&(!n||c[0]&4096|c[4]&8192)&&zs(s,o,l,l[137],n?Os(o,l[137],c,L_):Ls(l[137]),ka),l[16]?a?a.p(l,c):(a=Ea(l),a.c(),a.m(t.parentNode,t)):a&&(a.d(1),a=null)},i(l){n||(q(i),q(s,l),n=!0)},o(l){oe(i),oe(s,l),n=!1},d(l){l&&(x(r),x(t)),i&&i.d(l),s&&s.d(l),a&&a.d(l)}}}function B_(e){let r,t,n=!e[17]&&!e[18]&&Aa(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&&q(n,1)):(n=Aa(i),n.c(),q(n,1),n.m(r.parentNode,r)):n&&(fr(),oe(n,1,1,()=>{n=null}),dr())},i(i){t||(q(n),t=!0)},o(i){oe(n),t=!1},d(i){i&&x(r),n&&n.d(i)}}}const H_={left:"start",center:"center",right:"end",start:"start",end:"end"},W_={left:"end",center:"center",right:"start",start:"start",end:"end"},U_={top:"start",center:"center",bottom:"end",baseline:"baseline"},nl=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 Ca(e){return e.some(r=>r.name==="native")}function G_(e,r,t){let n,i,o,s,a,l,c,u,f,h,b,v,_,j,k,P,J,Y,Z,se,W,L,R,S,I,D,U,Ie,Xe,ae,Pe,Me=V,Ue=()=>(Me(),Me=N(R,je=>t(113,Pe=je)),R),Le,jt=V,ye=()=>(jt(),jt=N(L,je=>t(114,Le=je)),L),Ce,re=V,Re=()=>(re(),re=N(S,je=>t(115,Ce=je)),S),pe,ve=V,Se=()=>(ve(),ve=N(W,je=>t(116,pe=je)),W),it,Tt=V,ne=()=>(Tt(),Tt=N(se,je=>t(117,it=je)),se),me,fe=V,te=()=>(fe(),fe=N(Z,je=>t(118,me=je)),Z),tt,ot=V,Te=()=>(ot(),ot=N(Y,je=>t(119,tt=je)),Y),$e,Et=V,Mt=()=>(Et(),Et=N(J,je=>t(120,$e=je)),J),Ze,xe=V,ct=()=>(xe(),xe=N(i,je=>t(121,Ze=je)),i),A,_e=V,K=()=>(_e(),_e=N(P,je=>t(122,A=je)),P),lt,Ve=V,Vt=()=>(Ve(),Ve=N(k,je=>t(123,lt=je)),k),et,At=V,Gt=()=>(At(),At=N(_,je=>t(124,et=je)),_),mt,Ft=V,Rt=()=>(Ft(),Ft=N(j,je=>t(125,mt=je)),j),Ht,vt=V,We=()=>(vt(),vt=N(v,je=>t(126,Ht=je)),v),rt,Ne=V,ut=()=>(Ne(),Ne=N(b,je=>t(13,rt=je)),b),rr,ze=V,hr=()=>(ze(),ze=N(h,je=>t(127,rr=je)),h),er,pr=V,Q=()=>(pr(),pr=N(f,je=>t(128,er=je)),f),Ye,qt=V,nt=()=>(qt(),qt=N(u,je=>t(129,Ye=je)),u),st,wt=V,kt=()=>(wt(),wt=N(a,je=>t(130,st=je)),a),Yt,de,Qe=V,Wt=()=>(Qe(),Qe=N(c,je=>t(131,de=je)),c),Zt,Pt=V,kr=()=>(Pt(),Pt=N(l,je=>t(132,Zt=je)),l),Ot,tr=V,nr=()=>(tr(),tr=N(s,je=>t(133,Ot=je)),s),ft,Ar=V,Je=()=>(Ar(),Ar=N(o,je=>t(134,ft=je)),o),Qt;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(()=>qt()),e.$$.on_destroy.push(()=>wt()),e.$$.on_destroy.push(()=>Qe()),e.$$.on_destroy.push(()=>Pt()),e.$$.on_destroy.push(()=>tr()),e.$$.on_destroy.push(()=>Ar());let{$$slots:yr={},$$scope:Nr}=r,{componentContext:G}=r,{cls:Fe=""}=r,{style:Ir=void 0}=r,{layoutParams:le={}}=r,{customDescription:zt=!1}=r,{customPaddings:cr=!1}=r,{customActions:ur=""}=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=Ur(on),d=Ur(Bl),{isEnabled:bt}=Ur(Ul);fn(e,bt,je=>t(135,Qt=je));const Jt=Lt.direction;fn(e,Jt,je=>t(14,Yt=je));let B,ht,w=null,Be=[],It={},gt={},xt=!1,_r=1,Mr="transparent",Er=0,Yr={"top-left":0,"top-right":0,"bottom-right":0,"bottom-left":0},y="",g=null,T="",O={},z,ue,Oe,Ct=0,we=0,qe=0,dt=!1,Dt=!1,gr={},Br,Or,hn,bn=0,qn=0,In=0,xn=!1,$n=!1,Dn=1,ci,Yn,gn,Di,ei=[],yt=!1,p=!1,E,M,C,ie=[],ee=[],_t=[],at=[],Hr=[],vr=[],Pr=[],ti=[],Hn=[],he=[],Ut="",Jr,ri,Ti,sn,yi=!1,Nn="visible",ni=0,oo=0,Ho,Wo,Bi,so=!1,Qs=!0,Uo,Tn,Co,Hi;function wd(){t(70,g=null),t(71,T=""),t(88,Dn=1),t(100,yi=!1),t(101,Nn="visible"),t(102,ni=0),t(103,oo=0),t(104,Ho=void 0),t(105,Wo=void 0),t(22,Qs=!0),ei=G.fakeElement?[]:G.json.transition_triggers||["state_change","visibility_change"],t(91,yt=ei.indexOf("state_change")!==-1),p=ei.indexOf("visibility_change")!==-1,B&&ia(B),Tn==null||Tn(),Qt&&t(107,Tn=Lt.processVariableTriggers(G,G.json.variable_triggers))}function kd(je,zr){if(!Array.isArray(be)||!ce||Ge&&(Array.isArray(zr)?zr.length:0)!==1)return;const pn=be.findIndex(Kr=>(Kr==null?void 0:Kr.id)===je),kn=be.slice();kn.splice(pn,1,...(zr||[]).map(Kr=>({json:Kr,id:Kr==null?void 0:Kr.id}))),t(53,be=kn),ce(kn.map(Kr=>Kr==null?void 0:Kr.json))}function Ad(je){const zr=_o(je.start_value,1),pn=_o(je.end_value,1),kn=$r(je.start_delay,0),Kr=Gs()?0:$r(je.duration,300),Fi=Df(je.interpolator,"ease_in_out").replace(/_/g,"-");switch(je.name){case"fade":return t(96,Jr=zr),t(97,ri=pn),`opacity ${Kr}ms ${Fi} ${kn}ms`;case"scale":return t(98,Ti=zr),t(99,sn=pn),`transform ${Kr}ms ${Fi} ${kn}ms`;case"native":case"no_animation":return"";default:return G.logError(X(new Error("Unknown action_animation name"),{additional:{animation:je.name}})),""}}async function jd(je){t(101,Nn=je);const zr=je==="visible"?"in":"out",pn=zr==="in"?G.json.transition_in:G.json.transition_out;if(p&&pn){let kn;je==="gone"&&(kn=B.getBoundingClientRect()),await wn(),zr==="in"&&t(93,M=!0),d.runVisibilityTransition({...G.json,visibility:"visible"},G,pn,B,zr,kn).then(()=>{zr==="in"&&t(93,M=!1)}).catch(Kr=>{throw zr==="in"&&t(93,M=!1),Kr})}}function na(){if(w&&B){const je=Lt.getExtensionContext(G);w.forEach(zr=>{var pn;(pn=zr.unmountView)==null||pn.call(zr,B,je)}),w=null}}function Ed(){if(w!=null&&w.length){const je=Lt.getExtensionContext(G);w.forEach(zr=>{var pn;(pn=zr.updateView)==null||pn.call(zr,B,je)})}}function ia(je){var Fi,So,Vo;Co==null||Co.destroy(),t(63,B=je),yt&&G.json.transition_in&&(G.id?d.registerChildWithTransitionIn(G.json,G,G.json.transition_in,je).then(()=>{t(92,E=!1)}).catch(Mi=>{throw t(92,E=!1),Mi}):G.logError(X(new Error(nl("transition_in")),{level:"warn"}))),yt&&G.json.transition_out&&(G.id?d.registerChildWithTransitionOut(G.json,G,G.json.transition_out,je):G.logError(X(new Error(nl("transition_out")),{level:"warn"}))),G.fakeElement||(G.json.transition_change&&!G.id&&G.logError(X(new Error(nl("transition_change")),{level:"warn"})),d.registerChildWithTransitionChange(G.json,G,G.json.transition_change,je).then(()=>{t(94,C=!1)}).catch(Mi=>{throw t(94,C=!1),Mi}));const zr=G.fakeElement?[]:G.json.visibility_actions||G.json.visibility_action&&[G.json.visibility_action],pn=G.fakeElement?[]:G.json.disappear_actions;let kn;(Array.isArray(zr)&&zr.length||Array.isArray(pn)&&pn.length)&&(kn=g_(je,{visibilityActions:zr,disappearActions:pn,rootCtx:Lt,componentContext:G}));const Kr=G.id;return Kr&&(Hi==null||Hi(),Hi=Lt.registerId(Kr,{context:()=>G,node:()=>B}),d.registerChild(Kr)),(Fi=G.json.tooltips)==null||Fi.forEach(Mi=>{Lt.registerTooltip(je,Mi)}),Bi&&(Bi.disconnect(),Bi=void 0),Bi=j_(B,G,(So=G.json.layout_provider)==null?void 0:So.width_variable_name,(Vo=G.json.layout_provider)==null?void 0:Vo.height_variable_name),Co={destroy(){Hi&&(Hi(),Hi=void 0),Kr&&d.unregisterChild(Kr),kn&&kn.destroy()}},Co}function Cd(){G.json.focus&&(Fd(Lt.isPointerFocus)||t(12,so=!0),G.execAnyActions(at))}function Sd(){G.json.focus&&(t(12,so=!1),G.execAnyActions(Hr))}return Bs(Ed),dn(()=>{var je;Be.forEach(zr=>{Lt.unregisterParentOf(zr)}),t(64,Be=[]),Bi&&(Bi.disconnect(),Bi=void 0),(je=G.json.tooltips)==null||je.forEach(zr=>{Lt.unregisterTooltip(zr)}),Tn==null||Tn(),na()}),e.$$set=je=>{"componentContext"in je&&t(0,G=je.componentContext),"cls"in je&&t(1,Fe=je.cls),"style"in je&&t(54,Ir=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,ur=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,kn,Kr,Fi,So,Vo,Mi;if(e.$$.dirty[0]&1&&t(112,n=G.origJson),e.$$.dirty[3]&524288&&n&&wd(),e.$$.dirty[0]&1|e.$$.dirty[3]&16384|e.$$.dirty[4]&2048&&(Qt?(Tn==null||Tn(),t(107,Tn=Lt.processVariableTriggers(G,G.json.variable_triggers))):Tn==null||Tn()),e.$$.dirty[0]&1&&ct(t(47,i=G.getDerivedFromVars(G.json.focus))),e.$$.dirty[0]&1&&Je(t(46,o=G.getDerivedFromVars(G.json.border))),e.$$.dirty[0]&1&&nr(t(45,s=G.getDerivedFromVars(G.json.paddings))),e.$$.dirty[0]&1&&kt(t(44,a=G.getDerivedFromVars(G.json.margins))),e.$$.dirty[0]&1&&kr(t(43,l=G.getDerivedFromVars(G.json.width))),e.$$.dirty[0]&1&&Wt(t(42,c=G.getDerivedFromVars(G.json.alignment_horizontal))),e.$$.dirty[0]&1&&nt(t(41,u=G.getDerivedFromVars(G.json.height))),e.$$.dirty[0]&1&&Q(t(40,f=G.getDerivedFromVars(G.json.alignment_vertical))),e.$$.dirty[0]&1&&hr(t(39,h=G.getDerivedFromVars(G.json.alpha))),e.$$.dirty[0]&1&&ut(t(38,b=G.getDerivedFromVars(G.json.accessibility))),e.$$.dirty[0]&1&&We(t(37,v=G.getDerivedFromVars(G.json.background))),e.$$.dirty[0]&1&&Gt(t(36,_=G.getDerivedFromVars(G.json.action,void 0