@redneckz/wildless-cms-uni-blocks 0.14.771 → 0.14.772

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),l=n("useState"),a=n("useEffect"),r=n("useCallback"),i=n("useMemo"),s=n("useRef"),o=(...e)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=e=>{function t(t,n){const{children:l,...a}=t||{},r=n?.slots?.default,i=l||r&&r();return e(Object.assign(a,i&&{children:i}),n)}return t.inheritAttrs=!1,t},h=(...e)=>e.map((e=>u(e)?Object.entries(e).filter((([,e])=>e)).map((([e])=>e)):e)).flatMap((e=>e)).filter(Boolean).join(" "),u=e=>Boolean(e&&"object"==typeof e&&!Array.isArray(e)),p={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},g=d((({className:e,version:t="primary",isTheme:n=!0,defaultPadding:l="p-xl",padding:a,block:r,tag:i="section",role:s,children:c,style:d})=>{const m=t&&n;return o(i,{className:h("@container font-sans",{group:m},p[t],a||l,e),...m?{"data-ver":t}:{},...r?.anchor?{id:r.anchor}:{},role:s,style:d,children:c})})),x=d((({className:e,size:t})=>o("figure",{className:h("m-0 mt-xl min-w-[80%]",e),children:f(t)}))),f=(e=3)=>y(100,e).map((e=>Math.floor(e))).map(b),b=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),y=(e,t)=>[e].concat(t>0?y(e/1.618,t-1):[]),v={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},N=d((({className:e="",headingType:t="h3",as:n="h3",title:l,children:a})=>o(n,{role:"heading",className:h("font-sans m-0",v[t],e),children:l||a}))),w=d((({children:e,...t})=>o("p",{className:h("font-sans",Object.values(t)),children:e}))),k={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},S=d((({className:e,version:t="",headlineVersion:n="XL",title:l,description:a,align:r="text-center",as:i,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const u=k[n],p={marginTop:u.descriptionStyle};return c(g,{className:h({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[l?o(N,{className:h("whitespace-pre-wrap",r),...u?.title,as:i||u?.title.as,title:l}):null,a?o(w,{size:u.descriptionSize,font:u.descriptionWeight,align:r,...p,children:a}):null]})})),C=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),I=[];function T(e,t,{className:n,...l}={}){const{key:a,blockDecorator:r=C,blocksRegistry:i={},ancestors:s=I}=t,{type:c}=e;c&&c in i||console.warn(`No block with "${c}" is registered`);const d=c&&i[c];return r({blockClassName:h(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:r})=>{const{content:i}=n;return d?o(d,{className:r,block:e,options:t,...i,...l},a):null}},a)}const B=[],M=(e,{key:t,ancestors:n=B,slotName:l=null,extraProps:a,renderProps:r=T,...i})=>{const s=a?(e,t)=>T(e,t,a):r;return(e||[]).map(((e,a)=>s(e,{...i,key:`${t||e.type}-${a}`,ancestors:i.parent?[...n||B,[i.parent,l]]:n},a)))};function P({block:e,options:t,children:n,extraProps:l,renderProps:a}){return n||(e&&t?M(e.blocks,{...t,parent:e,extraProps:l,renderProps:a}):null)}function V(){return V._impl()}V._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),V.setup=e=>{V._impl=e};const R=["CDN","BASE_PATH"],z=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return R.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),D=e=>Boolean(e?.includes(":")),_=(e,t)=>Boolean(e&&!D(e)&&(!t||"_self"===t)),$=e=>Boolean(e?.startsWith("#")),j=e=>(e??"").replace(/\?.*/,"").replace(/\/$/,""),L=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),A=e=>t=>Boolean(e&&t&&e.startsWith(t)&&("/"===t||e===t||"/"===e[t.length]));var O=Object.freeze({__proto__:null,isURL:D,isLocalURL:_,isHash:$,withoutQuery:j,joinPath:L,hasPrefix:A});const E="/api/",F=`${E}v1/storage`,U=[z.CDN,E],W=e=>(t,n)=>{if(H(t))return t;if(((e="")=>/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(e))(t))return`${F}/${t}/attachment`;const l=t?.startsWith("/");return L(A(t)(n)?"":n,l?"/":(a=e.pathname,a?.split("/").slice(0,-1).join("/")),t);var a},H=e=>!e||D(e)||$(e)||U.some(A(e)),Y={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},X={small:"16",medium:"24",large:"48",xl:"78"},K=d((({className:e="",imageClassName:t="",name:n="",alt:l=`Иконка ${n}`,title:a=l,iconVersion:r="color",size:i,width:s=i&&X[i],height:d=s})=>{const m=V(),u="normal"===r?`${n}.svg`:`sprites.svg#${n}`,p=W(m)(L(z.CDN,"/icons/",u));return"normal"===r?o("img",{className:e,style:q(e,d),src:p,alt:l,title:a,"aria-hidden":"true",width:s,height:d}):o(G,{className:e,children:c("svg",{className:h(Y[r],{"w-full h-full":!s,invert:"white"===r},t),width:s,height:d,"aria-hidden":"true",children:[a?o("title",{children:a}):null,l?o("desc",{children:l}):null,o("use",{href:p,xlinkHref:p})]})})})),q=(e,t)=>{return e?.includes("h-")?{}:{height:(n=t,n&&!/\D/.test(n)?`${t}px`:t),width:"auto"};var n},G=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),Z=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function J(e=""){try{return new URL(e).pathname}catch(e){return""}}const Q=e=>t=>{const n=t?.startsWith("/wcms-resources")?"":J(Z.SITE_URL);return t&&!D(t)?W(e)(t,n):t},ee=(e,t)=>e?.media&&t?.media?e.media-t.media:0,te=d((({className:e="",image:t,imageClassName:n=""})=>{const l=V();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(ee).map((({src:e,format:n,media:a},r)=>o("source",{srcSet:Q(l)(e),type:le(n),media:a?`(max-width: ${a}px)`:"",width:t?.size?.width,height:t?.size?.height},`${r}_${e}`))):null,t?.src?ne({...t,src:Q(l)(t.src)},n):null]})})),ne=(e,t="")=>o("img",{src:e.src,className:h("object-contain",t),alt:e?.alt||e?.title||"",title:e?.title||"",style:{width:e?.size?.width?`${e.size?.width}px`:"100%",height:e?.size?.height?`${e.size?.height}px`:"auto"},width:e?.size?.width,height:e?.size?.height}),le=e=>e?`image/${String(e)}`:void 0,ae=d((({className:e="",image:t,imageClassName:n="",...l})=>t?.src||t?.icon?t.icon?o(K,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...l}):o(te,{className:e,imageClassName:n,image:t}):null)),re={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},ie="bg-main-divider text-main-disabled",se={primary:ie,secondary:ie,white:ie,link:"",transparent:"",gray:ie,"":""},oe="text-center font-sans select-none",ce={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"text-primary-main",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},de=({className:e,rounded:t,version:n})=>[oe,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",n?re[n]:"",t?"rounded-full":"rounded-md",e].join(" "),me=e=>me._impl(e);function he(e,t){const n=s({});return i((()=>new Proxy({},{get:(l,a)=>(n.current||={},n.current[a]||=n=>e.fire(t,{...n??{},type:a}),n.current[a])})),[e,t])}me._impl=e=>e,me.setup=e=>{me._impl=e};class ue{watchers=new Set;subscribersMap={};subjectsStateMap={};emitter=this;observable=this;watch(e){return this.watchers.add(e),()=>{this.watchers.delete(e)}}subscribe(e,t){this.subscribersMap[e]||=new Set,this.subscribersMap[e]?.add(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.subscribersMap[e]?.delete(t)}}fire(e,t){e in this.subjectsStateMap?this.subject(e,t):this.fireSubscribers(e,t)}subject(e,t){return this.subjectsStateMap[e]!==t&&(this.subjectsStateMap[e]=t??void 0,this.fireSubscribers(e,t)),()=>{delete this.subjectsStateMap[e]}}fireSubscribers(e,t){for(const n of this.subscribersMap[e]??[])n(t??null);for(const n of this.watchers)n({type:e,event:t??null})}}const pe=new ue,ge=()=>he(pe.emitter,"dialog");function xe(){const e=V(),{closeAll:t}=ge();return n=>{const l=W(e)(n.href);return{...n,href:l,"aria-label":n.text,onClick:me((a=>{n.onClick?.(a);const r=J(Z.SITE_URL);fe(l,n.target,r)&&(t(),a?.preventDefault(),e.push(((e,t="")=>e?.replace(t,"")||"/")(l,r)))}))}}}const fe=(e,t,n)=>_(e,t)&&!Z.SUB_PORTALS?.split(",")?.some(A(e))&&A(e)(n||"/"),be=e=>{try{return Array.isArray(e)&&e.length?{"data-aspects":JSON.stringify(e)}:{}}catch(e){return{}}},ye=d((e=>{const{text:t,aboveText:n,appendLeft:l,appendRight:a,version:r="primary"}=e,i=Ne(e)&&"hidden lg:block";return c("div",{className:h(ve(e),"flex gap-xs"),children:[l?o("div",{className:h(i,ce[r]),children:l}):null,Ne(e)?c("div",{className:"whitespace-pre",children:[n?o("div",{className:"text-xs font-light text-left",children:n}):null,o("div",{className:"text-left "+(n?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?o("div",{className:h(i,ce[r]),children:a}):null]})})),ve=e=>{const{version:t,aboveText:n,rounded:l}=e;if("link"===t)return"";const a=""+(n?"py-2.5 px-9":"py-4 px-9");return h("group/btn items-center justify-center",Ne(e)?a:"h-12 w-12 m-auto",{"rounded-full":l})},Ne=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),we=({className:e,rounded:t,version:n})=>["inline-block",oe,n?se[n]:"",t?"rounded-full":"rounded-md",e].join(" "),ke=d((({disabled:e,children:t,method:n="LINK",href:l,...a})=>{const i=(({method:e,href:t})=>r((n=>{if("POST"!==e||!t)return;n.preventDefault(),n.stopPropagation();const{origin:l,pathname:a,searchParams:r}=new URL(t||""),i=document.createElement("form");i.setAttribute("method","POST"),i.setAttribute("action",[l,a].join(""));for(const[e,t]of r.entries()){const n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",e),n.setAttribute("value",t),i.appendChild(n)}document.body.appendChild(i),i.submit()}),[e,t]))({method:n,href:l}),s=xe()({onClick:i,href:l,...a}),c=t??o(ye,{...s});return o(e?Ce:Se,{...s,children:c})})),Se=d((({className:e="",href:t,rel:n,target:l,ariaLabel:a,version:r,rounded:i,onClick:s,type:c,data:d,children:m,text:h})=>o("a",{className:de({className:e,version:r,rounded:i}),href:t,rel:n,target:l,"aria-label":a||`Ссылка на ${h}`,role:t?"link":"button",onClick:s,type:c,...be(d),children:m}))),Ce=d((({className:e,ariaLabel:t,version:n,rounded:l,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:we({className:e,rounded:l,version:n}),children:a})));function Ie({version:e,handleClick:t,text:n="Вернуться назад",alwaysVisible:l=!1}){if(!n)return null;const a="primary"===e?"white":"black",r="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:h(l?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:h(de({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",rounded:!0}),r),onClick:t,children:o(ae,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:a}})}),o(ke,{version:"link",className:"group-data-secondary:text-white",text:n,ariaLabel:n,onClick:t,type:"button"})]})}const Te=()=>{const[e,t]=l(false);return a((()=>{const e=globalThis.matchMedia?.("(max-width: 1024px)"),n=()=>{t(Boolean(e?.matches))};return e?.addEventListener("change",n),e?.matches&&t(!0),()=>{e?.removeEventListener("change",n)}}),[]),e},Be={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Me=(e,{className:t,imageAlign:n})=>e?o("div",{className:h("shrink-1/2 justify-self-center",n&&Be[n],t),children:e}):null,Pe=d((({className:e,version:t="primary",defaultPadding:n,padding:l="",title:a,buttons:i,leftImage:s,rightImage:d,imageAlign:m,insetTitle:u,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:x,children:f,...b})=>{const y=Te(),v=V(),N=r((()=>v.back()),[]),w=b.options?.page?.common?.backwardButton,k=x&&!y;return c("div",{className:h("relative flex flex-col gap-3xl overflow-hidden",l||n,e),children:[k&&Ie({version:t,handleClick:N,text:w}),a?o("div",{className:"relative h-full",children:a}):null,c("div",{className:h("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Me(s,{imageAlign:m,className:"mx-auto"}),c("div",{className:h("grid gap-3xl items-center md:items-stretch",{"@xl:grid-cols-2 auto-cols-fr":d,grow:!s},"h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[u,f]}),Re(P({...b,extraProps:{className:"@container-normal"}})),Me(d,{className:h("@xl:justify-self-end @xl:col-start-2",{[Ve(p)]:i,"col-start-2 self-center":p,"hidden @xl:block":g}),imageAlign:m}),i?o("div",{className:"self-end",children:i}):null]})]})]})})),Ve=e=>h(e?"row-span-2":"@xl:row-span-2"),Re=e=>e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,ze=(e,t="normal")=>e?.icon||e?.src?o("div",{className:h("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:o(ae,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,De=d((({__html:e="",richVersion:t="",itemSize:n="list-m",isDotted:l=!0,children:a})=>e||a?o("div",{"data-component":"rich-text-container",children:o("div",{className:h(t,n,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",l?"":"without-dots"),dangerouslySetInnerHTML:e?{__html:e}:void 0,children:a})}):null)),_e=(e,t)=>e?o(w,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,$e=d((({children:e,...t})=>o("span",{className:h("font-sans",Object.values(t)),children:e}))),je=(e,t)=>e?o($e,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Le=(e,t)=>["label"in e?je(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:_e(e.description,t)},String(t)):null,"__html"in e?o(De,{...e},`rte-${t}`):null],Ae=d((({className:e,benefitsVersion:t,...n})=>c("div",{className:h("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in n?ze(n.icon,t):null,o("div",{children:Le(n)})]}))),Oe=d((({className:e,benefitsVersion:t="normal",benefits:n})=>n?.length?o("div",{className:h("flex gap-x-m gap-y-s flex-col",e),role:"list",children:n.map(((e,n)=>o(Ae,{benefitsVersion:t,...e},String(n))))}):null)),Ee=d((({className:e,benefits:t})=>t?.length?o("div",{className:h("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(Le)}):null)),Fe=d((({isTabularBenefits:e,...t})=>o(e?Ee:Oe,{...t}))),Ue=e=>Boolean(e?.src||e?.icon),We=(e,{className:t,buttonClassName:n,isVertical:l}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:h("flex",l?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m w-full @lg:w-auto",t),role:"group",children:e.map(He(n))}):null,He=(e="")=>(t,n)=>{const{text:l,icon:a,iconRight:r,version:i,...s}=t||{},c=Ye(a,i),d=Ye(r,i);return l||a?.icon?o(ke,{className:h("basis-full @lg:basis-auto",e),appendLeft:Xe({...a,iconVersion:c}),appendRight:Xe({...r,iconVersion:d}),version:i,text:l,...s},n?String(n):""):null},Ye=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},Xe=e=>Ue(e)&&o(ae,{image:e,width:String(e?.size?.width||24),height:String(24)}),Ke=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),qe=d((({priceList:e})=>e?.length?o("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",role:"list",children:e.map(Ge)}):null)),Ge=({label:e,amount:t,unit:n},l)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o($e,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?c("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[Ke(2)(t)," ",n||"₽"]}):null]},String(l)),Ze=d((({className:e,tags:t})=>t?.length?o("div",{className:h("flex flex-wrap gap-xs",e),role:"list",children:t.map(Je)}):null)),Je=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o($e,{size:"text-m",font:"font-light",children:e})},String(t)),Qe={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},et=d((({className:e,padding:t,defaultPadding:n,title:l,description:a,headlineVersion:r="L",align:i="text-left",benefitsVersion:s,isTabularBenefits:d,isDotted:m=!0,benefits:h,__html:u,richVersion:p,isFullWidthTitle:g,priceList:x=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:C,children:I,...T})=>{const B=y?.src?o(ae,{image:y}):null,M=o(S,{title:l,description:a,headlineVersion:r,align:i,isEmbedded:!0}),P=h?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(Pe,{className:e,padding:t,defaultPadding:n,...g?{title:M}:{insetTitle:M},...tt(B,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:We(b),backwardButton:C,...T,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[P?.length?o(Fe,{benefitsVersion:s,isTabularBenefits:d,benefits:P}):null,u?o(De,{richVersion:p,__html:u,isDotted:m,itemSize:Qe[r]}):null,I,x?.length?o(qe,{priceList:x}):null,nt(f)]})})})),tt=(e,t)=>t?{rightImage:e}:{leftImage:e},nt=e=>e?.length?o(Ze,{tags:e}):null;class lt{_;constructor(e){this._=e}of(e){return new this.constructor(e instanceof lt?e._:e)}filter(e){return this.from(this.entries().filter(e))}map(e){return this.from(this.entries().map(e))}flatMap(e){return this.from(this.entries().flatMap(e))}reduce(e,t){return this.entries().reduce(e.bind(this),t)}}const at=()=>!0,rt=(e,t)=>(...n)=>e(...n)&&t(...n),it=(...e)=>(...t)=>{const[,n]=function(e){if(!e)throw new Error("Value should be fulfilled");return e}(e.find((([e])=>e(...t))));return n(...t)};const st=e=>Boolean(e&&Array.isArray(e)),ot=e=>Boolean(e&&"object"==typeof e&&!st(e)),ct=e=>e;function dt(e){return e instanceof lt?e._:e}class mt extends lt{from(e){return this.of(e.map(((e=ct)=>([,t])=>e(t))(dt)))}entries(){return(this._??[]).map(((e,t)=>[t,this.of(e)]))}size(){return this._?.length??0}get(e){return this.of("number"==typeof e?this._?.[e]:void 0)}set(e,t){return this.of(st(this._)?Array.from({length:Math.max(this._.length,Number(e)+1)},((n,l)=>l===e?t:this._[l])):Array.from({length:Number(e)+1},((n,l)=>l===e?t:void 0)))}}class ht extends lt{from(){return this}entries(){return[]}size(){return 0}get(e){return this.of(void 0!==e?void 0:this._)}set(e,t){return this.of(t)}}class ut extends lt{from(e){return this.of(Object.fromEntries(e.map((([e,t])=>[e,dt(t)]))))}entries(){return Object.entries(this._??{}).map((([e,t])=>[e,this.of(t)]))}size(){return Object.keys(this._??{}).length}get(e){return this.of("string"==typeof e?this._?.[e]:void 0)}set(e,t){return this.of({...this._,[e]:t})}}class pt extends lt{proto=it([e=>st(this._)||"number"==typeof e,()=>mt.prototype],[e=>ot(this._)||"string"==typeof e,()=>ut.prototype],[at,()=>ht.prototype]);from(e){return this.proto(void 0).from.call(this,e)}entries(){return this.proto(void 0).entries.call(this)}size(){return this.proto(void 0).size.call(this)}get(e){return this.proto(e).get.call(this,e)}set(e,t){return this.proto(e).set.call(this,e,t)}}const gt=e=>e instanceof lt?e:new pt(e),xt=e=>{const t=(t,...n)=>dt(e(gt(t),...n));return t.fn=e,t},ft=[],bt=e=>e instanceof Function?e:t=>e===t,yt=e=>(t,n,l=ft)=>gt(t).entries().reduce(((t,[n,a])=>yt(e)(a,t,l.concat(n))),e(n,[l,gt(t)])),vt=xt(((e,[t,n])=>{const[l,...a]=t;return e.set(l,a.length?vt(e.get(l),[a,n]):n)})),Nt=xt(((e,t)=>t.reduce(vt.fn,e))),wt=e=>yt(((e,[t,n])=>kt(n)?[...e,[t,dt(n)]]:e))(e,[]),kt=e=>0===e.size();xt(((e,t=ft)=>t.reduce(((e,t)=>e.get(t)),e)));const St=xt(((e,[t,...n])=>n.length?e.set(t,St(e.get(t),n)):e.filter((([e])=>e!==t)))),Ct=(It=["$ref"]).map(((e,t)=>n=>bt(e)(n[t+n.length-It.length]))).reduceRight(rt,at);var It;const Tt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(Bt,e),Bt=it([st,(e,t)=>e[parseInt(t,10)]],[ot,(e,t)=>e[t]],[at,ct]),Mt=(e,t)=>((e,t={})=>n=>Nt(t,wt(n).map((t=>e(t)))))((([e,n])=>{return Ct(e)?[(l=e,l.slice(0,-1)),Tt(t(n),n)]:[e,n];var l}))(e),Pt=e=>wt(e).filter(((e=ct)=>([t])=>e(t))(Ct)),Vt=e=>{return t=Pt(e).map((([,e])=>e)),[...new Set(t)];var t};async function Rt(e,t){try{return e?await zt(e,t):null}catch(e){console.error(e)}return null}const zt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),Dt=e=>[...new Set(e)],_t={},$t=["/portal-resources"],jt=(e,t)=>Mt(e,(e=>t?.[e])),Lt=(e,t)=>{const n=Vt(e),[r,i]=l({});return a((()=>{At(n).then(i)}),[n.join()]),n.length?jt(e,{...t,...r}):e},At=async(e,t={})=>{if(e.length){const n=await(async e=>Object.fromEntries((await Promise.allSettled(Dt(e).filter((e=>!$t.some((t=>e.startsWith(t))))).map((async e=>[e,_t[e]||=await zt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(e),l={...t,...n},a=Object.entries(n).flatMap((([,e])=>Vt(e)));return a.length?At(a,l):l}return t};function Ot(e,t={}){const n=d((t=>{const n=Lt((({block:e,options:t,className:n,defaultPadding:l,padding:a,isTheme:r,version:i,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...n})}));return Object.assign(n,t),n}const Et=Ot((({className:e,padding:t,defaultPadding:n,...l})=>o(g,{className:h("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:o(et,{defaultPadding:n||"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),Ft=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},n=i((()=>Ut(0,t?.length)),[t]),l=t?.[n];return l?o(Et,{suppressHydrationWarning:!0,...l,...e}):o(g,{...e,children:o(x,{})})})),Ut=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),Wt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const n=String(e.getDate()).padStart(2,"0"),l=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getFullYear());return t?`${a}-${l}-${n}`:`${n}.${l}.${a}`}},Ht=e=>e?.replace(/[^+\d]/g,""),Yt="/api/v1";const Xt=e=>e?{phone:Ht(e)}:{},Kt=(e,t="birthday")=>e?{[t]:Wt(e)}:{},qt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),Gt=(e,t=!0)=>({[t?"email":"mail"]:e}),Zt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:Ht(e)}:{},Jt=({aspectsAttributes:e,aspects:t,ev:n})=>{for(const{aspectName:l,params:a}of e??[])t[l??""]?.(n,a)};function Qt(){return Qt._impl()}Qt._impl=()=>({assign:(e,t)=>{globalThis.open(e,t||"_self")},get origin(){return globalThis.location.origin},get href(){return globalThis.location.href}}),Qt.setup=e=>{Qt._impl=e};const en="rshb-query-params";function tn(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(en)||"";return e&&globalThis.sessionStorage?.setItem(en,e),e}const nn=e=>{const t=e.target?.closest("a"),n=Qt();if(D(t?.href)&&!t?.href?.startsWith(n.origin)){e.preventDefault(),e.stopPropagation();const l=(e=>{const t=tn();if(!D(e)||!t)return e;const n=new URL(e);for(const[e,l]of new URLSearchParams(t))n.searchParams.set(e,l);return n.toString()})(t?.href)||t?.href;l&&n.assign(l,t?.target)}};function ln(){return ln._impl()}function an(e=!1){const[t,n]=l(e),a=r((()=>n(!0)),[]),i=r((()=>n(!1)),[]),s=r((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:a,setFalse:i,toggle:s}]}ln._impl=()=>({forwardQuery:nn}),ln.setup=e=>{ln._impl=e};const rn=e=>t=>t&&Object.entries(e??{}).flatMap((([e,n])=>n?n(t[e]):[]))||[],sn=e=>!e?.length,on=e=>t=>n=>e(n)?[]:[t],cn={},dn=[];const mn=(e,t)=>e&&t&&(e===t||Object.keys({...e,...t}).every((n=>e[n]===t[n])));function hn(e,{resetOnSubmit:t,formValidator:n,normalizer:o,onChange:c,onSubmit:d}={}){const[m,h]=function(e,t,n){const[i,s]=l(e),o=r((e=>s((l=>{const a=e instanceof Function?e(l):e,r=t?t(a):a,i=mn(a,r)?a:r;return!mn(l,i)&&n?.(i),i}))),[t,n]);return a((()=>{t&&s(t)}),[t]),[i,o]}(e,o,c),[u,{setTrue:p,setFalse:g}]=an(!1),x=s({}),[f,{isValid:b,errors:y}]=function(e,t){const n=i((()=>t?.(e)??cn),[t,e]),l=i((()=>rn(n)(e)??dn),[n,e]),a=sn(l);return[n,{isValid:a,errors:l}]}(m,n),v=r(((e,t={})=>{const{parse:n,format:l,onChange:a}=t,r=m[e],i=u||x.current?.[String(e)],s=t?.validator??f[e],o=i&&s?s(r):[];return{value:l?l(r):r,isDirty:i,errors:s&&o,error:o[0],onChange:t=>{x.current||={},x.current[String(e)]=!0;const l=n?n(t):t;a?.(l),h((t=>({...t,[e]:l})))}}}),[m,u,f,h]),N=r((e=>{x.current=e,h(e)}),[h]),w=r((()=>{x.current={},g(),h(e)}),[e,h]),k=r((e=>{e.preventDefault(),b?(t&&w(),d?.(m,e)):p()}),[t,m,b,w,d]);return[m,{errors:y,field:v,update:N,reset:w,onSubmit:k}]}const un=d((e=>{const{className:t,title:n,children:l,...a}=e;return o(g,{className:t,defaultPadding:"p-6xl",...a,children:c("div",{className:"container space-y-lg",children:[n?o(N,{headingType:"h3",title:n,className:"@xl:text-center"}):null,l]})})}));function pn(e,t={}){const{open:n,close:l,...a}=ge();return{open:r(((a,r={})=>n({dialog:o(e,{...t,...a,onClose:()=>{l(),a.onClose?.()}}),...r})),[e,n,l]),close:l,...a}}function gn(e,t,n,l){a((()=>{if(e&&n)return e.addEventListener(t,n,l),()=>{e.removeEventListener(t,n,l)}}),[e,t,n])}function xn(e){const t=s(null),n=r((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return gn(globalThis.document,"click",n),t}const fn=({label:e,errors:t})=>e&&t?`${e}*`:e,bn=()=>{},yn="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",vn=e=>e?o($e,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,Nn=d((({key:e,className:t,id:n,name:l,type:i="text",label:d,placeholder:m,value:u="",valid:p=!0,pattern:g,autoFocus:x=!1,isTextarea:f=!1,disabled:b=!1,children:y,onChange:v,onFocus:N,onBlur:w})=>{const k=s(null),S=r((e=>{const t=(e.target?.value??"").trimStart();v&&v(t)}),[v]);a((()=>{x&&k.current?.focus()}),[x,k]);const C=y?"pr-3xl":"",I=(e=>e?yn:"border-error")(p),T=d??l??n;return c("div",{className:h("relative",t),children:[c("label",{className:"space-y-xs",children:[vn(d),f?o("textarea",{className:h("block resize-y min-h-24",wn,I),id:h("textarea",n),value:u,name:l||n,placeholder:m,disabled:b,"aria-label":T,onChange:S,onFocus:N,onBlur:w},e):o("input",{ref:k,className:h("h-14",wn,C,I),id:n,type:i,value:u,name:l||n,placeholder:m,pattern:g,disabled:b,"aria-label":T,onChange:S,onFocus:N,onBlur:w},e)]}),y]})})),wn="w-full border rounded-md text-primary-text outline-none p-m",kn=e=>o("div",{className:"h-6",children:e?o($e,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Sn=d((({className:e,label:t,value:n="",placeholder:l,error:i,errors:s,onChange:d=bn,onBlur:m,isTextarea:u,type:p,isInteger:g=!1,maxLength:x,disabled:f=!1})=>{const[b,{setFalse:y,setTrue:v}]=an(),N=xn(y),w=r((e=>{!b&&v(),x?e.length<=x&&d(e):d(e)}),[b,d]);return a((()=>{g&&n&&d(Cn(n))}),[n]),c("div",{className:h("shrink-0 w-full",e),ref:N,onBlur:y,onFocus:v,children:[o("div",{children:o(Nn,{disabled:f,type:p||"text","aria-label":t,label:fn({label:t,errors:s}),valid:Boolean(!i),value:n,onChange:w,onBlur:m,isTextarea:u,placeholder:In(l,s,t)})}),kn(i)]})})),Cn=(e="")=>e.replace(/[^\d]+/g,""),In=(e,t,n)=>t&&!n?`${e}*`:e,Tn=e=>e?.text||e?.key||"",Bn=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,Mn=d((({popupRef:e,options:t,value:n,query:l,onChange:a,iconVersion:r})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",ref:e,children:Bn(t,l).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===n?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:Tn(e)}),o(K,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:r,className:h("absolute right-4 pt-3xs",{hidden:e.key!==n?.key})})]},e.key)))}):null));function Pn({isOpen:e,options:t,value:n,query:l,onChange:i,onClose:c,iconVersion:d}){const m=he(pe.emitter,"popup"),h=r((()=>{m.close(),c&&c()}),[c]),u=r((e=>{h(),i&&i(e)}),[h,i]),p=s(null),g=xn(h);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:r,left:i,width:s,height:c}=a.getBoundingClientRect();m.open({popup:o(Mn,{popupRef:g,options:t,value:n,query:l,onChange:u,iconVersion:d}),top:r+window.scrollY+c,left:i,width:s})}),[e,t,n,l,u]),p}const Vn=d((({className:e,label:t,options:n=[],value:a,valid:i=!0,isBorder:s=!0,placeholder:d="",isSearch:m=!1,disabled:u=!1,iconVersion:p="black",onChange:g})=>{const[x,{setFalse:f,setTrue:b}]=an(),[y,v]=l(""),N=Dn(u,n.length),w=x&&!N,k=r((()=>{N||b()}),[N]),S=r((()=>{v(""),f()}),[]),C=Pn({isOpen:x,options:n,value:a,query:y,onChange:g,onClose:S,iconVersion:p});return c("div",{className:h("space-y-xs",e),children:[vn(t),c("div",{className:h("relative",w?"z-20":"z-10"),ref:C,children:[c("div",{className:h("h-14 [&>*]:p-m pr-6 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",zn(s,i,N)),onClick:w?S:k,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:Tn(a)||d}),Rn(w,p)]}),m&&w?o("div",{className:h("absolute top-0 w-full z-20"),children:o(Nn,{type:"text",value:y,autoFocus:!0,disabled:N,onChange:v})}):null]})]})})),Rn=(e,t)=>o(K,{className:h("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),zn=(e,t,n)=>h(e?"border rounded-md ":"",e&&!n?"hover:border-primary-hover":"",n?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),Dn=(e,t)=>e||0===t,_n=d((({className:e="",label:t,error:n,errors:l,...a})=>c("div",{className:e,children:[o(Vn,{...a,valid:!n,label:fn({label:t,errors:l})}),kn(n)]}))),$n=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],jn=d((({field:e,input:t})=>o(_n,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:$n,...e(t?.name??"")}))),Ln=(e="")=>Boolean("trade"===e||"all"===e),An=e=>null!=e,On=new Map,En=(e,t=On)=>n=>{const l=Un(n),a=t.get(l);if(l&&An(a))return a;const r=e(...n);return l&&An(r)&&t.set(l,Promise.resolve(r)),r},Fn=e=>Boolean(e?.every((e=>Array.isArray(e)?Fn(e):!e||"string"==typeof e))),Un=e=>Fn(e)?e.toString():"",Wn=e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]);function Hn(e,t,{fallback:n,cache:r}={}){const s=i((()=>Yn(e)),[e]),[o,c]=l(void 0),[d,m]=l(void 0);a((()=>{if(!s.some(An))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await En(t,r)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,r,s]);const h=n&&Wn(s)&&n[s[0]];return{data:!o&&h?h:o,error:d,mutate:()=>Promise.resolve(void 0)}}function Yn(e){return Array.isArray(e)?e:e instanceof Function?Yn(e()):[e]}const Xn=`${Yt}/branches`,Kn=[];const qn=async e=>await Rt(e,{method:"GET"})||Kn;function Gn(e=!1){const{data:t}=Hn(`${Yt}${e?"/premiumBranchesByRegions":"/branchesByRegions"}`,zt);return Array.isArray(t)?t:[]}const Zn=(e="")=>"ULTRASERVICE"===e,Jn=d((({field:e,input:t,params:n})=>{const l=Zn(n?.typeForm),r=e("region"),i=r?.value?.key,s=r?.value?.text,c=l?Gn(l)?.find((e=>e?.region===s))?.branches:function(e){const{data:t}=Hn(e?`${Xn}?regionCode=${e}`:null,qn);return t||Kn}(i)?.filter((e=>e?.address));return a((()=>{""!==r?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[r?.value]),o(_n,{label:"Отделение",placeholder:"Выберите отделение",options:(c||[]).map((({address:e=""})=>({key:e,text:e}))),...e(t?.name??""),isSearch:!0})})),Qn=(e,{normalize:t,format:n})=>{const{value:a,onFocus:i,onBlur:s,onChange:o}=e,[c,d]=l(!1),m=r((e=>{d(!0),i&&i(e)}),[]),h=r((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!n?a:n(a),onFocus:m,onBlur:h}},el=(e,t,n)=>Math.max(t,Math.min(e,n));function tl(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function nl({list:e=[],min:t,max:n,step:l,value:a=e[0]||t,disabled:r,onChange:i}){const s=e.length?e.indexOf(a):a,d={backgroundSize:`${(100*(s>t?s-t:0)/(n-t)).toFixed(2)}% 100%`};return c("div",{children:[e.length?o("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>o("div",{className:h("w-2 h-2 rounded-full",s<=t||r?"bg-gray":"bg-primary-main")},String(t))))}):null,o("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:o("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:d,type:"range",min:t,max:n,step:l,value:s,disabled:r,onChange:t=>{const n=tl(t.target?.value),l=e.length?e[n]:n;i&&i(l||0)}})})]})}const ll=1,al=100,rl=d((e=>{const{className:t,title:n,items:l=[],list:a=[],min:i=(a.length?0:ll),max:s=(a.length?a.length-1:al),step:d=1,value:m=a[0]||i,disabled:u=!1,onChange:p}=e,g=Qn(e,{normalize:(e=0)=>a.length?il(a)(e):el(e,i,s),format:Ke()}),x=r((e=>{p&&p(tl(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o($e,{size:"text-m",font:"font-light",color:"text-primary-text",children:n}):null,o("input",{className:h("text-h3 w-full h-14","pl-m mt-xs box-border","text-primary-text",yn,"disabled:border-gray disabled:bg-main-divider"),disabled:u,onChange:x,...g}),nl({list:a,min:i,max:s,step:d,disabled:u,value:m,onChange:p})]}),sl(l)]})})),il=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),sl=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o($e,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),ol=["От 1 000 ₽","До 1 000 000 000 ₽"],cl=d((({field:e,input:t})=>o(rl,{title:"Сумма, ₽",items:ol,min:1e3,max:1e9,...e(t?.name??"")}))),dl=d((({field:e,input:t})=>o(Sn,{label:"Годовая выручка, ₽",...e(t?.name??"")}))),ml="client",hl=[{key:ml,text:"Клиент"},{key:"representative",text:"Представитель клиента"}],ul=d((({field:e,input:t})=>o(_n,{label:"Тип обратившегося",...t,options:hl,...e("applierType")}))),pl=d((({field:e,input:t})=>o(Sn,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e(t?.name??"")}))),gl=({today:e,firstDayOfWeek:t,totalDays:n,currentMonth:l,currentYear:a,min:r,max:i,onDateClick:s})=>{const c=[];let d=1;for(let m=0;m<6;m++){const h=[];for(let c=0;c<7;c++)if(0===m&&c<t)h.push(o("td",{},`empty-${c}`));else if(d>n)h.push(o("td",{},`empty-${c}`));else{const t=new Date(a,l,d),n=xl(t,e),c=fl(t,r,i);h.push(o("td",{children:o("div",{className:bl(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:h},`row-${m}`))}return c},xl=(e,t)=>t&&e.toDateString()===t.toDateString(),fl=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),bl=(e=!1,t=!1)=>h("p-s text-center rounded-md border",{"border-transparent hover:bg-gray":!e},t?"text-gray hover:bg-transparent":"cursor-pointer"),yl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],vl=d((({today:e,currentMonth:t,currentYear:n,min:l,max:a,onDateSelect:r=bn})=>{const{firstDayOfWeek:s,totalDays:d}=i((()=>({firstDayOfWeek:new Date(n,t,1).getDay()-1,totalDays:new Date(n,t+1,0).getDate()})),[n,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:yl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:gl({firstDayOfWeek:s,today:e,totalDays:d,currentYear:n,currentMonth:t,min:l,max:a,onDateClick:r})})]})})),Nl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"];const wl=e=>"_"===e,kl=e=>/\d/.test(e),Sl=e=>wl(e)||kl(e),Cl=1940,Il={name:"CalendarIcon",iconVersion:"black",width:"24",height:"24"},Tl=d((({setSelectedMonth:e,setSelectedYear:t,className:n,value:r,disabled:i,onChange:d,onClick:m})=>{const u=s(null),[p,g]=l(r||"");return a((()=>{g(r||"")}),[r]),a((()=>{Ml({inputValue:p,setSelectedMonth:e,setSelectedYear:t,onChange:d})}),[p]),c("div",{onClick:()=>{null!==u.current&&u.current.focus(),m?.()},className:h("relative",n),children:[o("input",{ref:u,className:"h-full w-full px-m text-l text-black focus-visible:outline-none",value:p,type:"text",onChange:e=>{const t=e.target?.value;"string"==typeof t&&t?.length<11&&g(function(e,t){const n=e.replace(/\D/g,"");if(""===n||n.length===t.length)return e;const l=[...t],a=l.findIndex(wl),r=l.map(((e,t)=>Sl(e)?l.slice(0,t).filter(Sl).length:-1)),i=l.map(((e,t)=>kl(e)?e:n.charAt(r[t])||e)),s=r.indexOf(n.length-1)+1;return i.slice(0,Math.max(a,s)).join("")}(t,"__.__.____"))},onBlur:()=>{Bl(p)?Ml({inputValue:p,setSelectedMonth:e,setSelectedYear:t,onChange:d}):g(r||"")},disabled:i}),i?null:o(K,{className:"mr-s",...Il})]})})),Bl=e=>{const[t,n,l]=e.split(".");if((e=>Number(e)>=Cl&&Number(e)<=(new Date).getFullYear())(l)&&(e=>Number(e)>0&&Number(e)<13)(n)){const e=new Date(Number(l),Number(n)-1,1);let a=0;for(;e.getMonth()===Number(n)-1;)e.setDate(e.getDate()+1),a++;return Number(t)>0&&Number(t)<=a}return!1},Ml=({inputValue:e,setSelectedMonth:t,setSelectedYear:n,onChange:l})=>{if(Bl(e)){const{day:a,month:r,year:i}=(e=>{const[t,n,l]=e.split(".");return{day:Number(t),month:Number(n)-1,year:Number(l)}})(e);t(r),n(i),l?.(new Date(i,r,a))}},Pl=({handleChangeVisibleCalendar:e,value:t,valid:n,onChange:l,setSelectedMonth:a,setSelectedYear:r,disabled:i=!1})=>o(Tl,{onChange:l,disabled:i,onClick:e,value:t&&Wt(t),setSelectedMonth:a,setSelectedYear:r,className:h("flex justify-between items-center h-14 border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",n?"border-gray":"border-error")}),Vl=Nl.map((e=>({key:e}))),Rl=Array.from({length:(new Date).getFullYear()-Cl+1},((e,t)=>Cl+t)).reverse().map((e=>({key:String(e)}))),zl=(e,t)=>{const n=new Date(e,t,1);let l=0;for(;n.getMonth()===t;)l++,n.setDate(n.getDate()+1);return l},Dl=({maxDateOfMonth:e,selectedYear:t,selectedMonth:n,value:l,onChange:a})=>{l&&a?.(new Date(t,n,Math.min(e,l.getDate())))},_l={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},$l={className:"min-w-32",iconVersion:"black",isBorder:!1},jl=d((({className:e="",label:t="",value:n,valid:i=!0,minDate:s,maxDate:d,disabled:m,onChange:u})=>{const[p,{setValue:g,setFalse:x}]=an(!1),[f,b]=l(n?.getMonth()||(new Date).getMonth()),[y,v]=l(n?.getFullYear()??(new Date).getFullYear()),N=r((e=>{u?.(e),x()}),[u]),{handlePrevMonth:w,handleNextMonth:k,handleSelectMonth:S,handleSelectYear:C,monthsOptions:I,yearsOptions:T,handleChangeVisibleCalendar:B,ref:M}=(({onShowCalendar:e,showCalendar:t,selectedMonth:n,onMonthSelect:l,onYearSelect:a,selectedYear:i,onChange:s,value:o})=>{const c=xn(r((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:r((()=>e(!t)),[t]),handleNextMonth:r((()=>{n+1<=11?l(n+1):(l(0),a(i+1))}),[n]),handlePrevMonth:r((()=>{n-1>=0?l(n-1):(l(11),a(i-1))}),[n]),handleSelectMonth:r((({key:e})=>{l(Nl.indexOf(e));const t=zl(i,Nl.indexOf(e));Dl({maxDateOfMonth:t,selectedYear:i,selectedMonth:Nl.indexOf(e),value:o,onChange:s})}),[o]),handleSelectYear:r((({key:e})=>{a(Number(e)),o&&s?.(new Date(Number(e),n,o?.getDate()))}),[o]),monthsOptions:Vl,yearsOptions:Rl,ref:c}})({onYearSelect:v,onMonthSelect:b,onShowCalendar:g,selectedYear:y,selectedMonth:f,showCalendar:p,onChange:u,value:n}),P=((e,t)=>{const[n,r]=l(!1);return a((()=>{const n=()=>{if(e?.current){const{top:n}=e.current.getBoundingClientRect();r(n>t)}};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}),[e]),n})(M,370);return c("div",{className:h("space-y-xs",e),ref:M,children:[vn(t),c("div",{className:"relative",children:[Pl({handleChangeVisibleCalendar:B,value:n,valid:i,onChange:u,disabled:m,setSelectedMonth:b,setSelectedYear:v}),p&&!m?c("div",{className:h("absolute bg-white z-20 select-none",{"bottom-full":P}),children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:w,children:o(K,{..._l,className:"-rotate-90 cursor-pointer"})}),o(Vn,{onChange:S,value:{key:Nl[f]},options:I,...$l}),o(Vn,{onChange:C,value:{key:String(y)},options:T,...$l}),o("div",{className:"my-auto",onClick:k,children:o(K,{..._l,className:"rotate-90 cursor-pointer"})})]}),o(vl,{today:n,currentMonth:f,currentYear:y,min:s,max:d,onDateSelect:N})]}):null]})]})})),Ll=d((({className:e,label:t,error:n,errors:l,...a})=>c("div",{className:h("shrink-0 w-full",e),children:[o(jl,{label:fn({label:t,errors:l}),valid:Boolean(!n),...a}),kn(n)]}))),Al=d((({field:e,input:t})=>o(Ll,{label:t?.label||"Дата рождения",...e(t?.name??"")}))),Ol=d((({field:e,input:t})=>o(Sn,{label:"Количество объектов инкассации",isInteger:!0,...e(t?.name??"")}))),El=d((({field:e,input:t})=>o(Sn,{className:"col-span-2",...e(t?.name??""),placeholder:"Ваше сообщение",isTextarea:!0}))),Fl=d((({field:e,input:t})=>o(Ll,{label:"Желаемая дата встречи",...e(t?.name??"")}))),Ul=d((({field:e,input:t})=>o(Sn,{label:"Электронная почта",...e(t?.name??""),...t}))),Wl=[{key:"ULTRASERVICE",text:"Ультра"}],Hl=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],Yl=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],Xl=d((({field:e,input:t})=>o(_n,{label:"Способ получения ответа",options:Yl,...e(t?.name??"")}))),Kl=d((({field:e,input:t})=>o(Sn,{label:"ФИО",...e(t?.name??""),...t}))),ql=d((({field:e,input:t})=>o(Sn,{label:"ИНН",isInteger:!0,maxLength:12,...t,...e(t?.name??"")}))),Gl=d((({className:e,viewBox:t,fill:n="none",width:l,height:a,paths:r,...i})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:l,height:a,children:r.map((({d:e,fill:t,...n},l)=>{const a={...i,...n};return o("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},l)}))}))),Zl="appearance-none w-5 h-5 border-solid flex-none",Jl=[{d:"M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z",fillRule:"evenodd",clipRule:"evenodd",fill:"white"}],Ql=d((({className:e,value:t,text:n,disabled:l,isRadio:a,onChange:i})=>{const s=r((e=>{l||(e.preventDefault(),i&&i(!t))}),[i,l,t]),d=a?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(Gl,{paths:Jl,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return o("div",{className:e,children:c("label",{className:h("flex items-center relative group/box",ta(l)),onClick:s,children:[o("div",{className:h(Zl,"m-0",a?"rounded-full border-2":la(t),!l&&t?"border-primary-main":"border-gray",l?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:na(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(l),"aria-label":n}),t?d:null,ea(n)]})})})),ea=e=>e?o("div",{className:"ml-s",children:o($e,{size:"text-l",font:"font-light",children:e})}):null,ta=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",na=(e=!1)=>e?"radio":"checkbox",la=(e=!1)=>h("rounded border",{"bg-primary-main":e}),aa=d((({className:e,text:t,value:n,key:l,disabled:a,error:r,onChange:i})=>c("div",{className:h("shrink-0",e),children:[o(Ql,{text:t,value:n,disabled:a,onChange:i},l),kn(r)]}))),ra=d((({field:e,input:t})=>o(aa,{...e(t?.name??""),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),ia=`${Yt}/outservice`,sa=[];async function oa(){const e=await Rt(`${ia}/outserviceregions`);return e&&Array.isArray(e)?e:sa}const ca=d((({field:e,input:t})=>{const n=e("region"),l=n?.value?.key,{data:r}=Hn("outServiceRegions",oa),s=i((()=>r?.find((e=>e.code===l))?.localities?.map((e=>({key:e,text:e})))),[r,l]);return a((()=>{""!==l&&e?.(t?.name??"")?.onChange?.("")}),[l,t?.name??""]),o(_n,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:s,...e(t?.name??""),isSearch:!0})})),da=d((({field:e,input:t})=>o(Sn,{label:"Отчество (Обязательно, при наличии)",maxLength:60,...e(t?.name??""),...t}))),ma=d((({field:e,input:t})=>o(Sn,{label:"Имя",maxLength:60,...e(t?.name??""),...t}))),ha=d((({value:e=!1,text:t,type:n="checkbox",onChange:l})=>c("div",{role:n,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>l&&l(!e),children:[o("div",{className:h("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:o("div",{className:h("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o($e,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),ua=d((({field:e,input:t})=>Ln(e("acquiringType")?.value?.key)?o(ha,{type:"radio",text:"Хочу онлайн-кассу",...e(t?.name??"")}):null)),pa=d((({field:e,input:t})=>o(Sn,{...e(t?.name??""),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...t}))),ga=e=>"_"===e,xa=e=>/\d/.test(e),fa=e=>ga(e)||xa(e),ba=[..."+7 (___) ___-__-__"],ya=ba.findIndex(ga),va=ba.map(((e,t)=>fa(e)?ba.slice(0,t).filter(fa).length:-1));const Na=d((({children:e,onChange:t,...n})=>{const l=r((e=>t&&t(function(e){const t=e.replace(/\D/g,""),n=ba.map(((e,n)=>xa(e)?e:t.charAt(va[n])||e)),l=va.indexOf(t.length-1)+1;return(l?n.slice(0,Math.max(ya,l)):n).join("")}(e))),[t]),a=r((e=>{"+7 ("===e&&t&&t("")}),[]);return o(Nn,{...n,onChange:l,onFocus:e=>l(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),wa=d((({className:e,label:t,error:n,...l})=>c("div",{className:h("shrink-0 w-full",e),children:[o(Na,{"aria-label":t,label:fn({label:t,errors:l?.errors}),valid:Boolean(!n),placeholder:"+7 (___) ___-__-__",...l}),kn(n)]}))),ka=d((({field:e,input:t})=>o(wa,{label:"Телефон",...e(t?.name||"phone"),...t}))),Sa=d((({field:e})=>Ln(e("acquiringType")?.value?.key)?o(ha,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),Ca=Ot((({field:e,input:t,source:n})=>o(_n,{placeholder:"Выберите продукт",label:"Продукт",options:Ia(n?.productList),...e(t?.name??"")}))),Ia=e=>(e??[]).map((e=>({key:e,value:e}))),Ta=`${Yt}/regions`,Ba=[];function Ma(e=Ta){const{data:t}=Hn(e,zt);return Array.isArray(t)?t:Ba}const Pa=`${Yt}/outservice/outserviceregions`,Va=d((({field:e,input:t,params:n})=>{var l;const a=Ma((l=n?.typeForm,"OUTSERVICE"===l?Pa:void 0));return o(_n,{label:t?.label||"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:i((()=>a?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[a]),...e(t?.name??"")})})),Ra=d((({field:e,input:t})=>{const n=Gn(!0),l=i((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(_n,{label:"Регион",placeholder:"Выберите регион",options:l,...e(t?.name??"")})})),za=d((({field:e,input:t})=>o(Sn,{label:"ФИО представителя",...t,...e("representativeName")}))),Da=(e,t)=>{const{value:n,isDirty:l}=e,a=l?t(n):[];return{...e,errors:a,error:a[0]}},_a=/^[\u0400-\u04FF\d\s]+$/u,$a=on((e=>null!=e&&""!==e)),ja="Некорректно заполненное поле",La=e=>$a(e??ja),Aa=e=>on((e=>e?.key&&""!==e?.key))(e??ja),Oa=e=>on((e=>"string"==typeof e&&e.length>1&&((e="")=>_a.test(e))(e)))(e??ja),Ea=e=>/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/.test(e),Fa=e=>on(Ea)(e),Ua=on((e=>"boolean"==typeof e&&e))("Согласие обязательно"),Wa={fullName:La(),addressBranch:Aa(),desiredMeetingDate:La(),product:La(),localities:La(),partnerComments:La(),collectionCount:La(),acquiringType:Aa(),serviceType:Aa(),annualRevenue:La(),feedbackMethod:Aa(),serviceDirection:Aa(),secondaryPhone:Fa("Укажите номер телефона"),region:Aa(),situationDescription:La(),sufferedFrom:La(),applierType:La(),surname:Oa("Укажите свою фамилию на кириллице"),name:Oa("Укажите своё имя на кириллице"),middleName:Oa("Укажите своё отчество на кириллице"),birthday:La("Укажите дату рождения"),phone:Fa("Укажите номер телефона"),email:(Ha="Укажите электронную почту",on((e=>/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,4}$/.test(e)))(Ha)),inn:(e=>on((e=>"string"==typeof e&&(10===e.length||12===e.length)))(e))("Укажите ИНН"),comment:La(),typeForm:La(),consentToReceiveMaterials:Ua,consentDataProcessing:Ua};var Ha;const Ya=(e={})=>({name:t})=>Boolean(e[t??""]),Xa=e=>t=>!t?.condition||t.condition.values.find((n=>{const l=e?.[t?.condition?.name??""];return n===(l?.key??l)})),Ka=d((({field:e})=>{const t=e("secondaryPhone");return o(wa,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?Da(t,Wa.secondaryPhone):t})})),qa=d((({field:e,input:t})=>o(_n,{label:"Направление обслуживания",placeholder:"Выберите направление",options:Hl,...e(t?.name??"")}))),Ga=d((({field:e,input:t})=>o(Sn,{label:"Описание ситуации",...t,...e("situationDescription")}))),Za=[{key:"blg",text:"Белгородской области"},{key:"brnsk",text:"Брянской области"},{key:"krsk",text:"Курской области"},{key:"chs",text:"От стихийного бедствия ЧС"}],Ja=d((({field:e,input:t})=>o(_n,{label:"Пострадал в",...t,options:Za,...e("sufferedFrom")}))),Qa=d((({field:e,input:t})=>o(Sn,{label:"Фамилия",maxLength:60,...e(t?.name??""),...t}))),er=["От 1 мес","До 15 лет"],tr=d((({field:e})=>o(rl,{title:"Срок, месяцев",items:er,min:1,max:180,...e("term")}))),nr=d((({field:e,input:t})=>o(_n,{label:"Тип обслуживания",options:Wl,...e(t?.name??"")}))),lr={horizontal:"@lg:flex-row",vertical:""},ar=d((({label:e,items:t,value:n,className:l,disabled:a=!1,orientation:r="horizontal",onChange:i})=>c("div",{className:"grid gap-xs whitespace-nowrap",children:[e?o("div",{role:"radiogroup","aria-label":e,children:o($e,{color:"text-secondary-text",font:"font-light",children:e})}):null,o("div",{className:h("flex flex-col gap-s",lr[r],l),role:"radiogroup","aria-label":"Группа кнопок",children:t?.map((({id:e,text:t})=>o(Ql,{isRadio:!0,text:t,value:n===e,onChange:()=>i?.(e),disabled:a},String(e))))})]}))),rr=[{id:"currencyControl",text:"Валютный контроль"},{id:"documentOperations",text:"Документарные операции"},{id:"conversionTransactions",text:"Конверсионные операции"},{id:"otherIssues",text:"Иные вопросы ВЭД"}],ir=d((({field:e,input:t})=>{const n=r((t=>{"currencyControl"!==t&&(e("inn").onChange?.(""),e("region").onChange?.(""))}),[]);return o("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:o(ar,{className:"whitespace-normal",orientation:"horizontal",items:rr,...e(t?.name??"",{onChange:n})})})})),sr=d((({field:e,input:t})=>o(Ql,{text:"Согласен на получение информационных и аналитических материалов по электронной почте",...e(t?.name??"")})));const or={$ref:"/wcms-resources/outservice-productlist.json"},cr={fullName:Kl,addressBranch:Jn,desiredMeetingDate:Fl,product:e=>o(Ca,{...e,source:or}),localities:ca,isClient:ra,partnerComments:pa,collectionCount:Ol,acquiringType:jn,onlineCheckout:ua,posTerminal:Sa,serviceType:nr,term:tr,amount:cl,annualRevenue:dl,vedTypes:ir,feedbackMethod:Xl,serviceDirection:qa,bankEmpolee:pl,secondaryPhone:Ka,applicationDate:e=>o(Sn,{label:"Дата и время обращения в Банк",...e}),region:e=>Zn(e?.params?.typeForm)?o(Ra,{...e}):o(Va,{...e}),consentToReceiveMaterials:sr,sufferedFrom:Ja,situationDescription:Ga,representativeName:za,applierType:ul,surname:Qa,name:ma,middleName:da,birthday:Al,phone:ka,email:Ul,inn:ql,comment:El},dr=(e,t,n={})=>(l,a)=>{const r={...cr,...n}[String(l.name)];return function({input:e,field:t}){const{condition:n}=e,{value:l}=t(n?.name||"");return!n||n?.values?.find((e=>e===(l?.key??l)))}({input:l,field:e})&&r?o("div",{children:o(r,{field:e,input:l,params:t})},a):null},mr=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o($e,{size:"text-h6",children:e})}):null,hr={primary:h("text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active","group-data-secondary:text-primary-main group-data-secondary:bg-white","group-data-secondary:hover:text-white group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active"),secondary:h("text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","group-data-secondary:text-white group-data-secondary:bg-white/20","group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active")},ur=h("group/btn-embedded","bg-transparent border border-transparent outline-none"),pr=h("bg-main-gray text-main-disabled cursor-not-allowed"),gr=d((({className:e,type:t="button",version:n="primary",shape:l="default",embedded:a,disabled:s,role:c,ariaLabel:d,data:m,dataTheme:u,children:p,onClick:g=bn})=>{const x=r("tab"!==c?me(g):g,[c,g]),f=i((()=>be(m)),[m]),b="round"===l;return o("button",{className:h("font-sans flex items-center gap-xs",{[hr[n]]:!s&&!a,[ur]:a,[pr]:s},a?"justify-between":"justify-center",a||b?"p-0":"px-9 py-4",{"rounded-md":"default"===l,"rounded-full":b},e),type:t,role:c,"aria-label":d,disabled:s,"aria-disabled":s?"true":void 0,"data-theme":u,...f,onClick:x,children:p})})),xr=d((({className:e,onClose:t})=>o("button",{className:h("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(K,{name:"CloseIcon",width:"20",height:"20",iconVersion:"gray"})}))),fr=d((({className:e,head:t,children:n,onClose:l,onClick:a})=>c("div",{className:h("relative bg-white pt-0 p-lg",e),role:"dialog",title:"Диалог",onClick:a,children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(xr,{className:"absolute top-0 right-0",onClose:l}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]}))),br=d((({ok:e,typeForm:t,onClose:n})=>{const l="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(fr,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto",onClose:n,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ae,{image:{icon:e?"ResponseOKIcon":"ResponseFailIcon",iconVersion:"normal"},width:"136",height:"136"}),o(S,{className:"w-full",title:e?"Ваша заявка отправлена":"Не удалось отправить заявку",description:e?l:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(gr,{type:"button",onClick:n,children:"Хорошо"})]})})})),yr=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:l,amount:a,term:r,annualRevenue:i,serviceType:s,vedTypes:o,region:c,inn:d,sufferedFrom:m,situationDescription:h,applierType:u,...p}=e,g=t||i?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:l=!1,term:a,amount:r,annualRevenue:i}=e;return t?`Вид эквайринга=${t?.text||""}${Ln(t?.key)?`/Онлайн касса=${n}/POS-терминал=${l}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${r}/Срок=${a}/Выручка=${i}`})(e):null,x={...p,...kr(o),...wr(c),...d&&{inn:d},...g?{partnerComments:g}:{},...s?{typeForm:s}:{},...Nr(m?.text,h),...vr(u)};return Object.fromEntries(Object.entries(x)?.map((([e,t])=>[e,t?.key||t])))},vr=e=>e?.key?{isClient:e?.key===ml}:{},Nr=(e,t)=>e||t?{comment:`${e||""};${t||""}`}:{},wr=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},kr=e=>e?{vedTypes:Object.fromEntries(rr.map((({id:t})=>[t,t===e])))}:{},Sr={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:$n[0],serviceType:Wl[0],feedbackMethod:Yl[0],serviceDirection:Hl[0],vedTypes:rr[0].id,birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,addressRetail:{key:"",text:""}},Cr=(e,t="")=>({...Object.fromEntries(e.map((e=>[e.name,"vedTypes"===e?.name&&e?.defaultValue||Sr[e.name||""]]))),typeForm:{key:t,text:""}}),Ir=d((({color:e="text-primary-main",position:t="absolute",blur:n=!0,size:l="big"})=>o("div",{className:h("flex justify-center items-center h-full w-full z-50",t,{"backdrop-blur":n}),children:o("div",{className:h("inline-block","animate-spin rounded-full","border-solid border-current","border-r-transparent","small"===l?"border-4 h-8 w-8":"border-8 h-28 w-28",e),role:"status"})}))),Tr=d((({isLoading:e,disabled:t,children:n,className:l,...a})=>c(gr,{type:"submit",className:h("relative",l),disabled:e||t,...a,children:[e?o(Ir,{blur:!0,size:"small"}):null,n]}))),Br={primary:hr.primary,secondary:hr.secondary,white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",gray:hr.secondary,transparent:"","":""},Mr=d((e=>{const t=xe(),{className:n,href:l,target:a,text:r,aboveText:i,version:s="link",rel:c,ariaLabel:d,data:m,children:u,onClick:p}=t(e),g="link"!==s;return o("a",{className:h("group/btn inline-flex items-center h-fit","font-sans no-underline select-none","border border-transparent focus:border-primary-text focus:border","cursor-pointer",{[Br[s]]:Boolean(s),[i?"px-9 py-2.5":"px-9 py-4"]:g,"rounded-md":g},n),href:l,target:a,rel:c,"aria-label":d??`Ссылка на ${r}`,role:l?"link":"button",onClick:p,...be(m),children:u??Pr(r,i)})})),Pr=(e,t)=>e||t?c("div",{className:"whitespace-pre",children:[t?o("div",{className:"font-light text-left text-xs",children:t}):null,o("div",{className:h("text-left",{"text-s -mt-3xs":Boolean(t)}),children:e})]}):null,Vr=d((({text:e,link:t})=>c(w,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o($e,{children:e}):null,t?o(Mr,{...t,ariaLabel:"условия передачи данных",children:t.text}):null]}))),Rr=(e,t,n)=>c("div",{className:"flex col-span-2 gap-xs flex-col w-full items-baseline",children:[e?c("div",{children:[c("div",{className:"flex gap-3 items-center",children:[o(Ql,{...e}),o(Vr,{link:t})]}),kn(Da(e,Ua).error)]}):o(Vr,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),o(Tr,{className:"w-full @xl:w-auto",children:n?.text?n.text:"Отправить заявку"})]}),zr={send:async function(e,t=!1){const{typeForm:n,region:l,phone:a="",email:r,birthday:i,desiredMeetingDate:s,inn:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:h,serviceDirection:u,...p}=e,g=t&&"Юридическое лицо / ИП"!==u,x=`${Yt}${g?"/lead":"/sendcorporatelead"}`,f={typeForm:n,...qt(l,g),...Gt(r,g),...Xt(a),...Kt(s,"desiredMeetingDate"),...g?Kt(i):{inn:o},..."FEEDBACK"===n?{}:{addressBranch:c,bankEmpolee:m,applicationDate:h,...Zt(d)},...p};try{const e=await fetch(x,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(f)});return e?.ok?await e.json():null}catch(e){return null}}},Dr=d((({className:e,title:t,typeForm:n="",sections:l=[],button:a,link:s,endpoint:d,additionalParams:m,isContacts:u,data:p,...g})=>{const x=i((()=>l?.flatMap((e=>e?.inputs))||[]),[l]),f=i((()=>Cr(x,n)),[x,n]),b=i((()=>((e,t={})=>{const n=e.filter((e=>Boolean(e?.required&&e?.name))),l={...Wa,...t},a=n.some((e=>e.condition?.values)),r=Object.fromEntries(n.filter(Ya(l)).map((({name:e})=>[e,l[e??""]])));return e=>a?Object.fromEntries(n.filter(Ya(l)).filter(Xa(e)).map((({name:e})=>[e,l[e??""]]))):r})(x)),[x]),y=pn(br),v=ln(),w=r((async(e,t)=>{const l=yr({...e,...m}),a=Boolean(await zr.send(l,"lead"===d));y.open({ok:a,typeForm:n}),a&&Jt({aspectsAttributes:p,aspects:v,ev:t})}),[n]),[,{field:k,onSubmit:S}]=hn(f,{resetOnSubmit:!0,formValidator:b,onSubmit:w}),C=(e=>e?.find((e=>"consentDataProcessing"===e?.name)))(x)?.name;return c(un,{className:h("container space-y-m",e),title:t,...g,children:[c("form",{onSubmit:S,children:[l.map(((e,t)=>{return c("div",{className:h((l=e.columns,2===l?"@xl:grid-cols-2":""),"grid gap-x-m"),children:[mr(e.title),(e?.inputs||[])?.map(dr(k,{typeForm:n}))]},`section-${t}`);var l})),Rr(C?k("consentDataProcessing"):void 0,s,a)]}),u?c("div",{className:"space-y-m",children:[o(N,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center gap-xl",children:[c("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"телефон 8 (800) 200-78-70",children:[o(ae,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"почта ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ae,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),_r=d((({title:e,description:t})=>{const n=Te();return c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(ae,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(S,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),$r=e=>e%2!=0,jr=d((({className:e,children:t})=>o("span",{className:h("inline-flex items-center text-start gap-s group-[]/btn-embedded:text-primary-main",e),children:t}))),Lr=d((({isUnfolded:e,...t})=>o(K,{name:e?"ArrowUpIcon":"ArrowDownIcon",size:"small",iconVersion:"",...t}))),Ar=d((({className:e,isUnfolded:t,short:n,label:l=(t?"Скрыть":"Развернуть"),embedded:a,...r})=>c(gr,{className:h({"w-full":!n},e),embedded:a,shape:n?"default":"square",role:"tab","aria-label":"Кнопка сворачивающейся секции",...r,children:[o(jr,{children:l}),o(Lr,{isUnfolded:t,iconVersion:a?"color":""})]}))),Or=d((({className:e,role:t="tablist",children:n})=>o("div",{className:h(e),role:t,children:n})));const Er=d((({className:e,isUnfolded:t,children:n})=>{const l=s(null),r=function(e,t){const n=s(null);return a((()=>{const t=n?.current;if(!t)return;const l=new ResizeObserver((n=>{e(t,n[0])}));return l.observe(t),()=>{l.disconnect()}}),[e,...t]),n}((e=>{l.current&&(l.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:l,className:h("transition-max-h duration-300 overflow-hidden",{"max-h-0":Boolean(l.current||!t)}),role:"tabpanel","aria-label":"Сворачивающаяся секция",children:o("div",{className:e,ref:r,children:n})})})),Fr="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",Ur=d((({topItemsCount:e=0,label:t,block:n,blocksToRender:l=[],...a})=>{const[r,i]=e>0?[l.slice(0,e),l.slice(e)]:[l,[]],[s,{toggle:d}]=an(!1);return c("div",{className:h("space-y-2xs",{hidden:!l.length}),children:[c("div",{className:h(Fr),children:[M(r,{...a.options,parent:n}),$r(r.length)?o(Ft,{className:"col-span-6",...a}):null]}),c(Or,{children:[c(Er,{className:h(Fr),isUnfolded:s,children:[M(i,{...a.options,parent:n}),$r(i.length)?o(Ft,{className:"col-span-6",...a}):null]}),o(Ar,{className:h("text-h4",{hidden:e<1}),label:t,isUnfolded:s,disabled:!i?.length,dataTheme:a.options?.page?.colorPalette,onClick:d})]})]})})),Wr=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Hr=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),Yr=10;function Xr(e,{sensitivity:t,rootRef:n}={}){const l=s(null),r=i((()=>({threshold:Kr(t),root:n?.current})),[t,n?.current]);return a((()=>{if(!l.current)return;const t=new IntersectionObserver(e,r);return t.observe(l.current),()=>{t.disconnect()}}),[e,r]),l}function Kr(e=0){const t=Math.round(e*Yr);return Array.from({length:t}).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const qr=d((({className:e,style:t,idx:n,activeIndex:l,observerOptions:a,children:i,onIntersection:s})=>{const c=Xr(r((e=>{e.length&&s&&s(n||0,e[e.length-1])}),[s,n]),a);return o("div",{className:h("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===l),ref:c,role:"listitem",children:i})})),Gr=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],Zr=d((({className:e,itemClassName:t,containerRef:n,activeIndex:l,visibleItemCount:a=0,gap:i=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:u,children:p,onVisibleItemsChange:g,onVisibleIndicesChange:x})=>{const f={sensitivity:1,rootRef:n},b=s([]),y=r(((e,t)=>{const n=[...b.current||[]];n[e]=t,b.current=n,g&&g(n),x&&x(Qr(n))}),[g,x]),v=a>0?i*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?Jr(c,v):{},...N?Hr(u):{},gap:`${i}px`};return o("div",{className:h("box-border overflow-auto no-scrollbar",d,e),style:k,ref:n,role:"list",children:(S=(e,n)=>o(qr,{className:h(m,a?Gr[a-1]:"",{"h-full":N},t),style:w?Jr(c/4):{},activeIndex:l,idx:n,observerOptions:f,onIntersection:y,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(p)});var S})),Jr=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Qr=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),ei={"horizontal-list":"w-6","vertical-list":"h-6"},ti=({activeIndex:e,onClick:t,listType:n="horizontal-list"})=>(l,a)=>o("div",{className:h("cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white",a===e?ei[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(a)},String(a)),ni=({activeIndex:e,onClick:t})=>(n,l)=>{const a=l===e,r=a?"min-w-[350px] bg-white shadow-dark-blue border-none p-6":"min-w-72 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",i=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-l":"text-m group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(l),"aria-label":n?.title,className:h("max-h-28 mt-xs ml-xs relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50 whitespace-nowrap",r),children:[o("div",{className:i,children:n?.title}),o("div",{className:h("text-secondary-text font-light",s),children:n?.description})]},String(l))},li=e=>e,ai=(e=li)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),ri=ai(),ii=(e=li)=>ai((t=>-e(t))),si=ii(),oi=e=>t=>e.scrollWidth/t,ci=e=>(t,n)=>{e.scrollBy({left:n*oi(e)(t),behavior:"smooth"})},di=({itemCount:e,onVisibleIndicesChange:t})=>{const n=s(null),[a,i]=l([]),o=r((e=>{i((t=>{return(n=t)===(l=e)||Boolean(n&&l&&n?.length===l?.length&&n.every(((e,t)=>e===l[t])))?t:e;var n,l})),t&&t(e)}),[t]),[c,d]=a.length?[ii()(a),ai()(a)]:[-1,-1],m=c>0,h=d<e-1,u=r((()=>{var t;n.current&&(m?ci(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=r((()=>{n.current&&(h?ci(n.current)(e,1):n.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),g=r(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{n?.current&&n.current.children[e]?.scrollIntoView(t)}),[n]);return[n,{scrollLeft:u,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},mi={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},hi=d((({className:e="",activeIndex:t=0,dotCount:n=0,listType:l="horizontal-list",version:i,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=Te(),[u,p]=di({itemCount:s.length}),g=ui(Boolean(s?.length));a((()=>{s?.length&&t>=0&&u?.current&&p.scrollTo(t,g)}),[t]);const x=r((e=>{e!==t&&c?.current&&d?.scrollTo(e,g)}),[c?.current]);return s?.length&&!m?o(Zr,{containerRef:u,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(ni({activeIndex:t,onClick:x}))}):n?o("div",{className:h("flex gap-xs",mi[l],i?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":i,children:Array.from({length:n}).fill(null).map(ti({activeIndex:t,onClick:x,listType:l}))}):null})),ui=(e=!1)=>({behavior:e?"auto":"smooth"}),pi=d((({className:e,name:t,...n})=>o(gr,{className:h("w-12 h-12 min-w-12 min-h-12",e),shape:"round",...n,children:o(K,{name:t,iconVersion:"",size:"small"})}))),gi=d((e=>o(pi,{name:"ArrowLeftIcon",version:"secondary",ariaLabel:"Пролистать влево",...e}))),xi=d((e=>o(pi,{name:"ArrowRightIcon",version:"secondary",ariaLabel:"Пролистать вправо",...e}))),fi="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",bi=d((({className:e,scroll:t,hasBlur:n,arrowsPadded:l,isBottom:a})=>{const{canScrollLeft:r,canScrollRight:i,scrollLeft:s,scrollRight:d}=t,m=l&&!a;return c("div",{className:e,children:[n?yi(t):null,r?o(gi,{className:h(vi(a),m?"left-1":"left-0"),onClick:s}):null,i?o(xi,{className:h(vi(a),m?"right-1":"right-0"),onClick:d}):null]})})),yi=e=>c("div",{children:[e.canScrollLeft?o("div",{className:h(fi,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:h(fi,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),vi=(e=!1)=>h("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),Ni=d((({className:e,version:t,gap:n=14,padding:l=16,visibleItemCount:a=1,listType:r="horizontal-list",snapAlign:i,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:u,showDots:p,children:g,onVisibleIndicesChange:x,navButtons:f})=>{const b=Array.isArray(g)?g.length:0,[y,v]=di({itemCount:b,onVisibleIndicesChange:x}),[N]=v.visibleIndicesRange;return c("div",{className:h(e,"vertical-list"===r?"relative h-full":""),children:[o(Zr,{containerRef:y,activeIndex:N,visibleItemCount:a,gap:n,padding:l,listType:r,snapAlign:i,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(bi,{className:h(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:u,isBottom:Boolean(f?.length)}),o(hi,{className:h(!p&&"lg:hidden"),activeIndex:N,dotCount:b,listType:r,version:t,navButtons:f,containerRef:y,containerScroll:v})]})})),wi=({blocksToRender:e,...t})=>o(Ni,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:M(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:h("relative min-w-80",Wr(!0)),children:T(e,t)},String(n))})}),ki=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...l})=>{switch(e?.view){case"grid":return c("div",{children:[Si(n,t),o(Ur,{...e,...l,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[Si(n,t),wi({...l,blocksToRender:t})]});default:return null}})),Si=(e,t)=>e&&!t.length?o(_r,{...e}):null,Ci=e=>t=>t.reduce(((t,n,l)=>t.length?t.concat({...e,key:`sep-${l}`},n):[n]),[]),Ii=d((({value:e,onChange:t,items:n=[],multiple:l})=>n.map((n=>o(ha,{text:n?.title,value:[e].flatMap((e=>e)).includes(n.value),onChange:()=>(n=>{if(!t)return;const a=e?.includes(n);t(l?a?(e||[]).filter((e=>e!==n)):[...e||[],n]:a?[]:[n])})(n.value),type:l?"checkbox":"radio"},n.value))))),Ti=d((({children:e,filtrationSchema:t,resetButton:n,field:l,reset:a})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-xl",children:[e,Ci(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(Bi(l)).filter(Boolean))]}),n?o("div",{children:o(gr,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:n?.text})}):null]}))),Bi=e=>([t,n])=>{const l=n?.type;return"array"===l?Mi(t,e)(n):null},Mi=(e,t)=>n=>{const l=n?.items?.enum?.map(((e,t)=>({value:e,title:n?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[n?.title?o("div",{className:"mb-m",children:o($e,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(Ii,{items:l,multiple:!n?.single,...t(e)})]},e)},Pi=e=>e;function Vi(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const Ri=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,zi=(e,t)=>Object.entries(e).map((([n,l])=>"number"==typeof l?Array.isArray(t[n])?((e,t)=>n=>Ri(t[e])||Ri(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>Ri(t[e])||Ri(n[e])||Di(t[e])<=Di(n[e]))(n,e):"object"==typeof l&&"min"in l&&"max"in l?((e,t)=>n=>Ri(t[e])||Ri(n[e])||Di(t[e]?.min)>=Di(n[e]?.min)&&Di(t[e]?.min)<=Di(n[e]?.max))(n,e):Array.isArray(l)?((e,t)=>n=>Ri(t[e])||Ri(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>Ri(t[e])||Ri(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),Di=e=>Number(e||0),_i=(e,{block:t,page:n,normalize:l=Pi})=>{const a=t?.blocks||[],[r,s]=hn(e),o=i((()=>Vi(a,a.map((e=>jt(e.content,n?.fallback))))),[a,n?.fallback]),c=r===e?a:((e,t)=>(n=Pi)=>e?.filter((([,e])=>zi(t,n(e)||{}))).map((([e])=>e)))(o,r)(l);return[r,{blocksToRender:c,blocksWithProps:o},s]},$i={},ji={},Li=Ot((({className:e,filtrationSchema:t=$i,consumerField:n={},resetButton:l,...a})=>{const[,{blocksToRender:r},{field:i,reset:s}]=_i(ji,{block:a.block,page:a.options?.page}),d=o(Vn,{className:"w-64",label:n?.title,options:Ai(n),...i("consumer",{parse:({key:e})=>[e],format:([e]=[])=>Ai(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:h(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(Ti,{filtrationSchema:t,field:i,reset:s,children:c("div",{children:[d,o("div",{children:o(gr,{type:"reset",className:"mt-lg w-64",onClick:s,version:l?.version,children:l?.text})})]})}),o(ki,{blocksToRender:r,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),Ai=e=>Vi(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),Oi=(e=!1)=>e?"text-left":"text-center",Ei={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Fi=d((({className:e,iconBgVersion:t="primary",size:n,icon:l,...a})=>{const r=`${n?.width??44}px`;return l?o("div",{className:h("rounded-icon object-fit flex justify-center items-center",Ei[t],e),style:{width:r,height:r},role:"figure",children:o(K,{name:l,width:"54%",...a})}):null})),Ui=d((({className:e="",title:t,benefitList:n,...l})=>{const a=Te();return c(g,{className:e,defaultPadding:"p-6xl",...l,children:[t?o(N,{headingType:"h3",as:"h2",className:Oi(a),title:t}):null,n?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:n.map(Wi)}):null]})})),Wi=({label:e,description:t,__html:n,icon:l,isDotted:a=!1,iconBgVersion:r},i)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[l?.icon?o(Fi,{className:"shrink-0",iconBgVersion:r,...l}):null,l?.src?o(ae,{className:"shrink-0",image:l}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(N,{headingType:"h6",children:e}),o($e,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(De,{__html:n,isDotted:a,itemSize:"list-s"}):null]}):null]},String(i)),Hi=e=>({icon:t,title:n,description:l},a)=>c("div",{className:h("flex flex-col gap-1","items-center",{"justify-center":!l&&!n}),children:[n?o($e,{size:"text-h6",font:"font-normal",align:e,children:n}):null,t?o(ae,{image:t,height:"180",className:"w-auto mx-auto"}):null,l?o($e,{size:"text-h6",font:"font-normal",align:e,children:l}):null]},String(a)),Yi=(e,t,n)=>o("div",{className:`grid gap-2xs ${Xi(t)}`,children:e.map(Hi(n))}),Xi=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},Ki=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:n="",columnsCount:l="4",subtitle:a,title:r,...i})=>c(g,{className:h("space-y-3xl",n),defaultPadding:"p-6xl",...i,children:[o(S,{defaultPadding:"",title:r,description:a,headlineVersion:"M"}),e?.length?Yi(e,l,t):null]}))),qi={start:"justify-start",center:"justify-center",end:"justify-end"},Gi=d((({buttons:e,className:t="",align:n,...l})=>{const a=n&&h("flex",qi[n]);return o(g,{className:h("!bg-transparent",a,t),defaultPadding:"p-0",...l,children:We(e)})})),Zi=d((({className:e,title:t,children:n,...l})=>c(g,{className:h("space-y-xl",e),defaultPadding:"p-4xl",...l,children:[t?o(N,{className:"text-center",title:t}):null,n]}))),Ji="flex flex-col justify-between lg:flex-row gap-x-4xl gap-y-7 lg:gap-y-4xl",Qi="flex flex-col lg:w-1/2 gap-2xl",es="flex flex-col gap-y-xl min-w-52",ts=d((({value:e,fractionDigits:t,fixed:n,prefix:l,postfix:a})=>o($e,{size:"text-h3",children:"number"==typeof e?[l,Ke(t,{fixed:n})(e),a].filter(Boolean).join(" "):e}))),ns=d((({className:e,title:t,value:n,color:l="text-secondary-text",...a})=>c("div",{className:h("flex justify-between @xl:flex-col",e),children:[t?o($e,{size:"text-l",font:"font-light",color:l,children:t}):null,n?o(ts,{value:n,...a}):o($e,{size:"text-h3",children:"-"})]}))),ls=(e,t)=>e?o(w,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,as=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:l=2,depositeName:a,isShowDepositeName:r,color:i="text-secondary-text"})=>c("div",{children:[o($e,{size:"text-l",font:"font-light",color:i,children:t}),c("div",{className:"relative",children:[c("div",{className:"flex @xl:justify-center gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge -mt-m tracking-[-15px]",children:Ke(l,{fixed:!0})(e)}),n?o("span",{className:"text-7xl mt-5",children:n}):null]}),a&&r?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),rs=d((({title:e="Ставка"})=>c("div",{className:"space-y-s min-w-96",children:[o($e,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(K,{className:"w-10 h-auto lg:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Процентная ставка не найдена, выберите другие параметры"})})]}))),is=({title:e="Ставка",rate:t=0,unit:n="%",fractionDigits:l=2,color:a="text-secondary-text",children:r,...i})=>t?c("div",{className:"flex flex-col",children:[o("div",{className:"hidden lg:block min-w-96",children:o(as,{title:e,rate:t,unit:n,fractionDigits:l,color:a,...i})}),o(ns,{className:"lg:hidden",title:e,value:t,postfix:n,fractionDigits:l,fixed:!0,color:a,...i}),r]}):o(rs,{title:e,...i}),ss=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...l})=>o(rl,{items:e?[`От ${Ke(1)(l.min||0)} ${n}`,`До ${Ke(1)(l.max||0)} ${n}`]:[],step:t,...l}),os={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},cs={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},ds=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:l}=e,[a,r]=((e,t,n)=>{const{maxBonus:l=5e3,prefMonthsNum:a=os.prefMonthsNum,prefTravelBonusRate:r=os.prefTravelBonusRate,prefRestBonusRate:i=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(r*t)+Math.round(i*n),l);return[c,c*a+Math.min(Math.round(s*t)+Math.round(o*n),l)*(12-a)]})(t||cs,n,l);return{...t,...e,monthBonus:a,yearBonus:r}},ms=Ot((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,...r})=>{const[i,{field:s}]=hn({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:u,maxSumOther:p,monthBonus:g,yearBonus:x}=ds(i,n);return o(Zi,{className:e,title:t,...r,children:c("section",{className:h(Ji,e),children:[c("div",{className:Qi,children:[ss({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),ss({title:"Сумма покупок в остальных категориях, ₽",min:u,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?is({title:"Баллов за месяц",rate:g,fractionDigits:0,unit:"",color:"text-primary-text"}):null}),c("div",{className:es,children:[x>=0?o(ns,{title:"Баллов за год",value:x,color:"text-primary-text"}):null,We(l,{isVertical:!0}),ls(a)]})]})})})),hs=Math.round(29.5),us=(e,t=0)=>e?.sum?e.sum:t,ps=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,gs=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,xs=({items:e,title:t,mobileTitle:n=t,orientation:l="horizontal",value:a,onChange:r,...i})=>c("div",{className:"grid gap-s whitespace-nowrap",children:[t?o("div",{className:"hidden @5xl:block",role:"radiogroup","aria-label":t,children:o($e,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o($e,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(ar,{orientation:l,items:e,value:e[a?0:1].id,onChange:t=>r&&r(t===e[0].id),...i})]}),fs=e=>xs({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),bs=" (c капитализацией)",ys=({income:e,finalSum:t,postfix:n="₽",buttons:l=[],footnotes:a=[],isCapitalization:r=!1})=>c("div",{className:es,children:[o(ns,{title:`Доход в конце срока${r?bs:""}`,value:e,postfix:n,prefix:"+"}),o(ns,{title:`Сумма в конце срока${r?bs:""}`,value:t,postfix:n}),We(l,{isVertical:!0}),a?.map(ls)]}),vs=([e,t],n,l=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:Ns([e,t],l),Ns=([e,t],n=[])=>({[e]:n.length?si(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?ri(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),ws=(e,[t,n],l)=>e>=l[t]&&e<=l[n],ks={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const Ss={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},Cs=(e,t)=>{const{daysValue:n,moneyValue:l,isPartialWithdrawal:a,isReplenished:r,isMonthlyInterestPayment:i}=e,s=r||a,o=n<90||n>730,c=function(e){const t=e?.rateType?ks[e?.rateType]:"",{data:n}=Hn(t?`${Yt}/depositrates/${t}`:null,zt);return Array.isArray(n)?n:[]}(t),d=c?.find((e=>i===e.isMonthlyInterestPayment&&Is(s,e)&&ws(l,["minSum","maxSum"],e)&&ws(n,["minDays","maxDays"],e)))||Ss,{rate:m}=d,h=Ts(m,e),u=l+h,p=c||[Ss];return{...d,...Ns(["minSum","maxSum"],p),...Ns(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:h,finalSum:u}},Is=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,Ts=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,daysValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a/30)-l):Math.round(l*e*a/365/100)},Bs=Ot((({className:e="",title:t,buttons:n,footnote:l,bottomFootnote:a,isShowDepositeName:r,defaultParams:i,rateParams:s,...d})=>{const[m,{field:u}]=hn({moneyValue:us(i,1e5),daysValue:ps(i,60),isReplenished:Boolean(i?.isReplenished),isPartialWithdrawal:Boolean(i?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(i?.isMonthlyInterestPayment)}),p=Cs(m,s),{income:g,finalSum:x,rate:f,depositeName:b}=p;return o(Zi,{className:e,title:t,...d,children:c("section",{className:h(Ji,e),children:[c("div",{className:Qi,children:[ss({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...u("moneyValue"),value:p.moneyValue}),(y={title:"Срок, дней",min:p.minDays,max:p.maxDays,...u("daysValue"),value:p.daysValue},o(rl,{items:[`От ${gs(y.min||0)}`,`До ${gs(y.max||0)}`],step:1,...y})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[Ms(p,u),fs({title:"Выплата процентов",orientation:"vertical",...u("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),is({rate:f,depositeName:b,isShowDepositeName:r}),ys({income:g,finalSum:x,buttons:n,footnotes:[l,a]})]})});var y})),Ms=(e,t)=>c("div",{className:"space-y-s",children:[o($e,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(Ql,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Ql,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),Ps=(e=[],t=!1)=>Vs([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),Vs=(e,t)=>{if(!t?.length)return;const n=t?.reduce(((t,n)=>e[0](n.rate,t[0].rate)?[n]:n.rate===t[0].rate?[...t,n]:t),[t[0]]);return n.length>1?n.reduce(((t,n)=>e[1](n,t)?n:t),n[0]):n[0]},Rs=({min:e=0,max:t=0,availableMonths:n,...l})=>o(rl,{items:[`От ${zs(e)}`,`До ${zs(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...l}),zs=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Ds=e=>xs({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),_s=({field:e,defParams:t,calcParams:n,map:l,monthsValue:a="maxMonths"})=>{Object.entries(l).forEach((([n,l])=>{e?.(n)?.onChange?.(t?.[l])})),e?.("monthsValue")?.onChange?.(el(t?.[a],n.minMonths,n.maxMonths))},$s=(e,t)=>{const{isAnnuity:n,moneyValue:l,monthsValue:a,moneyExtra:r}=t;if(0===e)return 0;if(n){const t=e/1200;return r?(l+r)*(t+t/(Math.pow(1+t,a)-1)):l*(t+t/(Math.pow(1+t,a)-1))}return Math.round(l/a)+l*(e/1200)},js={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Ls=e=>As({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&As({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&As({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&As({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),As=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],Os=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,r=t?.rateRows||[js],i=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>Ls({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=vs(["minSum","maxSum"],i,r),{minMonths:c,maxMonths:d}=vs(["minMonths","maxMonths"],i,r),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a})=>e?.find((e=>Ls({row:e,userInputParams:t,paramsViewSettings:n})&&ws(l,["minSum","maxSum"],e)&&ws(a,["minMonths","maxMonths"],e)))||js)({rateRows:r,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a}),{rate:h}=m,u=$s(h,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:l,monthsValue:a,monthlyPayment:u}},Es=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),Fs={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},Us=Ot((({className:e,title:t,calcSource:n,buttons:l,footnote:r,paramsViewSettings:i,defaultParams:s,onChange:d,...m})=>{const u=(p=n?.rateRows,Vs([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],p));var p;const[g,{field:x}]=hn({moneyValue:us(s,2e5),monthsValue:ps(s,hs),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)},{onChange:d}),f=Os(g,n,i),b=Ds({title:"Тип платежа",orientation:"vertical",...x("isAnnuity")}),{onChange:y}=x("moneyValue"),{onChange:v}=x("monthsValue");return a((()=>{y&&y(el(g.moneyValue,f.minSum,f.maxSum))}),[f.minSum,f.maxSum]),a((()=>{v&&v(el(g.monthsValue,f.minMonths,f.maxMonths))}),[f.minMonths,f.maxMonths]),a((()=>{!Es(s)&&u&&_s({field:x,defParams:u,calcParams:f,map:Fs,monthsValue:"minMonths"})}),[n,s]),o(Zi,{className:e,title:t,...m,children:c("section",{className:h(Ji,e),children:[c("div",{className:Qi,children:[ss({title:"Сумма кредита, ₽",step:500,min:f.minSum,max:f.maxSum,...x("moneyValue"),value:f.moneyValue}),Rs({title:"Срок кредита, месяцев",min:f.minMonths,max:f.maxMonths,...x("monthsValue"),value:f.monthsValue}),Ws({...f,...i},x),o("div",{className:"sm:hidden",children:b})]}),c("div",{className:h(es,"@4xl:w-1/2"),children:[o(ns,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(ns,{title:"Ставка",value:f?.rate,fractionDigits:2,postfix:"%"}),o(ns,{title:"Ежемесячный платёж",value:f.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:b}),We(l,{isVertical:!0}),ls(r)]})]})})})),Ws=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(Ql,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(Ql,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(Ql,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(Ql,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Hs=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let n=1;for(;n<t.length;){const[e,l]=t[n-1],[a,r]=t[n];l>=a?t.splice(n-1,2,[e,Math.max(l,r)]):n++}return t},Ys={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},Xs=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,r=t?.[0]?Gs(t[0].minMonths,t[0].maxMonths):0,i=!n?.isShowMonthlyInterestPayment,s=!n?.isShowRemoteRegistration,o=!n?.isShowReplenish,c=!n?.isShowWithdrawn,d=!n?.isShowNewClient,m=t?.find((t=>[qs({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),qs({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),qs({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:i}),qs({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,ws(l,["minSum","maxSum"],t),ws(a||r,["minMonths","maxMonths"],t)].every(Boolean)))||Ys,{rate:h}=m,u=Ks(h,e),p=l+u,g=t||[Ys];return{...m,...Ns(["minSum","maxSum"],g),...Ns(["minMonths","maxMonths"],g),availableMonths:Hs(g.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,n=1)=>Array.from({length:Math.abs(t-e)/n+1},((l,a)=>t>=e?e+a*n:e-a*n)))(e,t))),...e,defaultMonth:r,income:u,finalSum:p}},Ks=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,monthsValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a)-l):Math.round(l*e*30*a/365/100)},qs=({row:e,userInputParams:t,paramKey:n,isExclude:l})=>l||t[n]===e[n],Gs=(e,t)=>e+Math.round((t-e)/2),Zs=(e="rub")=>"rub"===e,Js=(e,t)=>{const{minMonths:n,maxMonths:l}=Ns(["minMonths","maxMonths"],no(t,e?.currency)),a=e.monthsValue||Math.round((n+l)/2);return{monthsValue:el(a,n,l)}},Qs=(e,t)=>{const{minSum:n,maxSum:l}=Ns(["minSum","maxSum"],no(t,e?.currency)),a=e.moneyValue||n;return{moneyValue:el(a,n,l)}},eo=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),to=e=>{const t=Zs(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},no=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},lo=(e,t)=>{const n="rub"!==e?.currency?.key;return c("div",{className:"grid gap-lg",children:[c("div",{className:"flex gap-lg",children:[e.isShowReplenish?xs({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?xs({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),ao(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?fs({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},xs({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),ao(e.isShowNewClient),e.isShowNewClient?o(Ql,{text:"Новый вкладчик",...t("isNewClient")}):null]});var l},ao=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,ro={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},io={text:"₽",key:"rub"},so=Ot((({className:e,title:t,calcSource:n,buttons:l=[],footnote:i="",paramsViewSettings:s,defaultParams:d,...m})=>{const{rows:u}=n??{},p=u?.map((e=>e.currency))??[io],g=r((e=>t=>e?{...t,...to(t),...Qs(t,e),...Js(t,e),...eo(t,e)}:t)(u),[u]),[x,{field:f}]=hn({moneyValue:us(d,2e4),monthsValue:ps(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:io},{normalizer:g}),b=f?.("currency")?.value??io,y=f?.("isNewClient")?.value,v=no(u,b),N=Xs(x,v,s),{rate:w,income:k,finalSum:S,type:C=""}=N,I=r((()=>{_s({field:f,defParams:Ps(v,y),calcParams:N,monthsValue:"minMonths",map:ro})}),[f,u]);a((()=>{!Es(d)&&v&&I()}),[d,u]);const T=w===Ps(v,y)?.rate;return o(Zi,{className:e,title:t,...m,children:c("section",{className:h(Ji,e),children:[c("div",{className:Qi,children:[c("div",{className:"flex gap-m",children:[ss({className:"w-full",title:`Сумма, ${b?.text}`,min:N.minSum,max:N.maxSum,...f("moneyValue"),value:N.moneyValue,postfix:b?.text,step:oo(b?.key)}),u&&u?.length>1?o(_n,{label:"Валюта",options:p,...f("currency")}):null]}),Rs({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...f("monthsValue"),value:N.monthsValue}),lo({...N,...s},f)]}),is({rate:w,children:mo(I,T)}),ys({income:k,finalSum:S,buttons:[...l,co(n?.buttons,C)],footnotes:[i],postfix:b?.text,isCapitalization:f("isMonthlyInterestPayment").value})]})})})),oo=(e="")=>Zs(e)?1e3:100,co=(e=[],t="")=>{const{type:n,...l}=e.find((e=>e.type===t))??{};return l},mo=(e,t=!1)=>t?null:o(gr,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),ho=e=>uo({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&uo({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),uo=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],po={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},go=(e,t,n)=>{const{moneyValue:l,monthsValue:a,oldMonthlyPayment:r,moneyExtra:i}=e,s=t?.rateRows||[po],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>ho({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=vs(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=vs(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:r,moneyExtra:i})=>e?.find((e=>ho({row:e,userInputParams:t,paramsViewSettings:n})&&ws(l+i,["minSum","maxSum"],e)&&ws(r,["minSumOld","maxSumOld"],e)&&ws(i,["minSumExtra","maxSumExtra"],e)&&ws(a,["minMonths","maxMonths"],e)))||po)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:r,moneyExtra:i}),{rate:p}=u,g=$s(p,e),x=e.oldMonthlyPayment-g;return{...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:l,monthsValue:a,oldMonthlyPayment:r,moneyExtra:i,monthlyPayment:g,benefit:x}},xo=Ot((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,paramsViewSettings:r,...i})=>{const[s,{field:d}]=hn({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=go(s,n,r),u=Ds({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(Zi,{className:e,title:t,...i,children:c("section",{className:h(Ji,e),children:[c("div",{className:Qi,children:[ss({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),ss({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),Rs({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),fo({...m,...r},d),m.isExtraMoney?ss({title:"Дополнительная сумма, ₽ ",step:500,min:m.minSumExtra,max:m.maxSumExtra,...d("moneyExtra"),value:m.moneyExtra}):null,o("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:u})]}),c("div",{className:h(es,"@4xl:w-1/2"),children:[o(ns,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(ns,{title:"Ставка",value:m?.rate,fractionDigits:2,postfix:"%"}),o(ns,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(ns,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:u}),We(l,{isVertical:!0}),ls(a)]})]})})})),fo=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(Ql,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(Ql,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(Ql,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),bo=d((e=>{const{onChange:t,min:n,max:l,defaultValue:a="0",fractionDigits:i=0,...s}=e,c=Qn(e,{normalize:(e=a)=>n&&l?String(el(Number(yo(e)),n,l)):yo(e),format:Ke(i)}),d=r((e=>t&&t(yo(e))),[t]);return o(Nn,{onChange:d,...s,...c})})),yo=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),vo=d((e=>o(bo,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o($e,{size:"text-xl",font:"font-light",children:"₽"})})})));function No(e,t){for(const[n,l]of e.entries())null!=l?t.setItem(n,l):t.removeItem(n)}function wo(e,t){return No(e,t),No(t,e),e.bus.watch((({type:e,event:n})=>{null!=n?t.setItem(e,n):t.removeItem(e)}))}class ko{storage;bus;get size(){return this.storage?.length??0}constructor(e,t=new ue){this.storage=e,this.bus=t}hasItem(e){return Boolean(this.storage?.getItem(String(e)))}getItem(e){const t=this.storage?.getItem(String(e))??null;try{return JSON.parse(String(t))}catch(e){return null}}entries(){return Array.from({length:this.size},((e,t)=>{const n=String(this.storage?.key(t));return[n,this.getItem(n)]}))}setItem(e,t){null!==t?this.storage?.setItem(String(e),JSON.stringify(t)):this.storage?.removeItem(String(e)),this.bus?.subject(e,t)}removeItem(e){this.storage?.removeItem(String(e)),this.bus?.subject(e,null)}}class So{bus;store=new Map;get size(){return this.store.size}constructor(e=new ue){this.bus=e}hasItem(e){return this.store.has(e)}getItem(e){return this.store.get(e)}entries(){return this.store.entries()}setItem(e,t){this.store.set(e,t),this.bus.subject(e,t)}removeItem(e){this.store.delete(e),this.bus.subject(e,null)}}const Co={};function Io(e,t=Co){const n=s(null),o=function(){const[,e]=l(0);return r((()=>e((e=>(e+1)%65536))),[])}();return a((()=>e.bus.watch((e=>{n.current?.has(String(e.type))&&o()}))),[e,o]),i((()=>new Proxy(t,{get:(t,l)=>(n.current||=new Set,n.current.add(l),e.getItem(l)),has:(t,l)=>(n.current||=new Set,n.current.add(l),e.hasItem(l)),set:(t,n,l)=>(e.setItem(n,l),!0),deleteProperty:(t,n)=>(e.removeItem(n),!0)})),[e])}const To=new So;function Bo(){return Io(To)}wo(To,new ko(globalThis?.sessionStorage));const Mo={private:"p2p/registerP2P",business:"b2c/registerB2C"},Po=({onClose:e,errorCode:t,errorMessage:n})=>{const l=t?`Код ошибки - ${t}`:"Пожалуйста, повторите позднее";return o(fr,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto",onClose:e,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ae,{image:{icon:"ResponseFailIcon",iconVersion:"normal"},width:"136",height:"136"}),o(S,{className:"w-full",title:"Ошибка перевода",description:l,headlineVersion:"XS",isEmbedded:!0}),n?c("div",{className:"bg-secondary-dark rounded-xl px-4 pt-4 pb-8 grid gap-4 grid-cols-12",children:[c("div",{className:"col-span-8",children:[" ",n]}),o("div",{className:"col-span-4",children:o(ae,{image:{icon:"ResponseFailIcon",iconVersion:"normal"}})})]}):null]})})},Vo=e=>{const t=pn(Po),n=Bo(),l=Qt(),a="private"===e?"p2p":"b2c";return r((async({amount:r})=>{const i=await(async(e,t)=>{const n=Qt(),l={amount:String(t),currency:"643",returnUrl:`${n.origin}/p2p/success`,failUrl:`${n.origin}/p2p/failed`,language:"ru"},a=`${Yt}/payment/${Mo[e]}`;try{const e=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(l)});return e.ok?await e.json():null}catch(e){return null}})(e,r);(e=>Boolean(e?.formUrl)&&Boolean(e?.orderId))(i)&&(n.transaction={orderId:i.orderId,type:a,url:l.href},l.assign(`${a}/?formUrl=${encodeURIComponent(i.formUrl)}`)),(e=>Boolean(e?.errorMessage)&&0!==e?.errorCode)(i)&&t.open({errorCode:i.errorCode,errorMessage:i.errorMessage})}),[e])},Ro={amount:1500},zo=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:l,formType:r="private",...i})=>{const[s,{setValue:d}]=an(!1),m=Vo(r),[{amount:u},{field:p,onSubmit:x}]=hn(Ro,{onSubmit:m});return a((()=>{d(u<=0)}),[u]),c(g,{className:h("flex flex-col items-center",e),defaultPadding:"p-6xl",...i,children:[t?o(N,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",onSubmit:x,children:[o(vo,{valid:!s,label:n,max:3e5,min:1,...p("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:u}),l?.text?o(Tr,{className:"w-full mt-lg",disabled:s,children:l.text}):null]})]})})),Do=({className:e,text:t="ХИТ"}={})=>c("div",{className:h("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(K,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(w,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),_o="relative h-full",$o={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},jo=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...l})=>{const{blocks:a}=l.block||{},r=a?.some(Oo),i=n?{defaultPadding:"p-6xl pb-m"}:{};return P({...l,renderProps:(n,l,a)=>c("div",{className:Lo(n,{someCardsHighlighted:r}),children:[T(n,l,{className:Ao(n,{someCardsHighlighted:r,showBorder:!e,cardSize:t}),...i,blockIndex:a}),Oo(n)?Do({className:"absolute top-0 -right-4 z-40"}):null]},String(a))})},Lo=(e,{someCardsHighlighted:t})=>h(_o,t&&(Oo(e)?"pt-3xl":"pt-3xl sm:pt-16")),Ao=(e,{someCardsHighlighted:t,showBorder:n,cardSize:l="normal"})=>h(_o,"min-w-80",$o[l],t&&(Oo(e)?"pt-3xl sm:pt-16":"pt-3xl"),Wr(n),n&&"h-full"),Oo=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Eo=Ot((({className:e,visibleItemCount:t=1,noCardBorder:n,arrowsPadded:l=!0,isGap:a=!0,cardSize:r="normal",isNavButtons:i=!1,...s})=>o(g,{className:h(e),defaultPadding:"p-6xl",...s,children:o(Ni,{className:h("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:a?16:0,padding:0,arrowsPadded:l,navButtons:i?Fo(s?.block?.blocks):[],hasBlur:!0,children:jo({noCardBorder:n,cardSize:r,isNavButtons:i,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Fo=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],Uo="z-10 border border-solid w-full h-full",Wo=h(Uo,"absolute hidden @xl:block border-transparent"),Ho=d((({className:e,title:t,description:n,button:l,...a})=>o(g,{className:h("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:h(Wo,"top-9 right-12 bg-green-dark")}),o("div",{className:h(Wo,"top-6 right-8 bg-green")}),o("div",{className:h(Wo,"top-3 right-4 bg-green-light")}),c("div",{className:h(Uo,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(S,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),We([l],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Yo={black:"bg-black",white:"bg-white"},Xo=d((({className:e="",title:t,description:n,image:l,price:a,button:r,colors:i=[],align:s="text-left",padding:d,...m})=>o(g,{className:h("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(Pe,{className:"h-full",padding:d,title:o(S,{title:t,description:n,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:l?.src?o(ae,{className:"flex justify-center align-center mb-xl",image:l}):null,buttons:We([r],{buttonClassName:"w-full self-end"}),children:[i?.length?c("div",{className:"flex text-secondary-text mb-m",children:[o("div",{className:"mr-xs",children:o($e,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),i.map(Ko)]}):null,a?c($e,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),Ko=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Yo[e]}`},String(t)),qo=d((({icon:e,...t})=>{const n=xe(),{text:l,href:a,target:r,onClick:i}=n(t);return l?o("div",{className:h("p-3 rounded-lg bg-white text-secondary-text flex justify-center"),children:o("a",{role:"link",href:a,target:r,onClick:i,children:c("div",{className:"flex flex-col items-center gap-3 break-words max-w-[150px]",children:[e?o(ae,{className:"w-7 h-7 md:w-12 md:h-12",image:{...e,iconVersion:e?.iconVersion},alt:l}):null,o("div",{className:"font-light md:font-normal text-primary-text text-center text-xs md:text-sm whitespace-wrap",children:l})]})})}):null})),Go=d((({className:e,additionalDescription:t,description:n,links:l,title:a,...r})=>o(g,{defaultPadding:"p-5xl",className:h("overflow-hidden",e),...r,children:c("div",{className:"flex flex-col lg:flex-row gap-5 justify-between",children:[c("div",{className:"flex-1",children:[o(S,{isEmbedded:!0,title:a,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(S,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),l?.length?Zo(l):null]})}))),Zo=e=>o("div",{className:h("lg:grid-cols-9 lg:[&>*]:col-span-2 lg:[&>*:nth-child(14n+2)]:col-span-3 lg:[&>*:nth-child(7n+5)]:col-span-3","lg:[&>*:nth-child(7n+6)]:col-span-3 lg:[&>*:nth-child(7n+7)]:col-span-3 lg:[&>*:nth-child(14n+10)]:col-span-3 lg:w-3/6","grid-cols-3 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+3)]:col-span-2 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+4)]:col-span-2","grid gap-3 lg:gap-5"),children:e.map(((e,t)=>o(qo,{...e},String(t))))}),Jo=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),Qo=d((({className:e="",href:t,target:n,onClick:l,data:a,children:r})=>{const i=xe()({href:t,target:n,onClick:l});return o(t?"a":"div",{className:h("block",e),...t?i:{},role:t?"link":"none",...be(a),children:r})})),ec=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["appgallery.huawei.com"],iconMapped:{icon:"HuaweiIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}},{origins:["rustore.ru"],iconMapped:{icon:"RustoreIcon"}}],tc=d((({className:e="",media:t,showButtonText:n,stretched:a,version:r="white",children:i})=>{if(!t?.length)return null;const[s,d]=l(),m=t?.map((e=>{const{href:t,icon:l,text:a}=e,{iconMapped:i}=(e=>ec.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=Ue(l)?l:i,c=n?{text:a}:{text:""},m=e?.icon?.iconVersion||"color";return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:m},version:e?.version??r}})),u=h("border border-solid hover:border-transparent border-main-divider","group-data-primary:border-main-divider group-data-gray:border-green group/media",{"basis-auto":!n&&!s},nc(a));return c("div",{className:h("flex flex-col gap-m xl:gap-xs",e),"aria-label":"Социальные сети",children:[o("div",{className:"flex gap-xs",children:We(m,{className:lc(s??!1,a??!1,n),buttonClassName:u})}),i?o($e,{size:"text-s",font:"font-light",color:"text-secondary-text",children:i}):null]})})),nc=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",lc=(e,t,n=!1)=>h(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),ac=d((({className:e,padding:t,description:n,additionalDescription:l,href:a,icon:r,isDotted:i,__html:s,socialMedia:d=[],target:m,title:u,align:p="text-left",benefits:x,imageOptions:{directionRight:f=!0,isImageAlwaysOnRight:b=true,isImageSecondary:y=!1}={},data:v,...N})=>o(g,{className:h("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...N,children:o(Qo,{href:a,target:m,className:"h-full",data:Jo(v),children:c(Pe,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(S,{title:u,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...tt(Ue(r)?o(ae,{image:r}):null,f),buttons:d.length?o(tc,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(Fe,{benefits:x}),s?o(De,{__html:s,isDotted:i,itemSize:"list-s"}):null,rc(l,p)]})})}))),rc=(e,t)=>e?o(w,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,ic=new ue,sc=(e,t)=>{const{title:n,description:l,buttons:a}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[n?o("div",{className:"opacity-80",children:o($e,{size:"text-m",color:"text-secondary-text",children:n})}):null,l?o("div",{className:"mt-2xs",children:o($e,{size:"text-xl",color:"text-primary-text",children:l})}):null,a?.length?o("div",{className:"text-primary-main",children:We(a)}):null]},String(t))},oc=d((({className:e="",title:t,align:n="text-center",icon:s,button:d,visibleCellsCount:m=1,cardCells:u=[],options:p,data:x,...f})=>{const b=i((()=>u.map(sc)),[u]),[y,v]=i((()=>m>0?[b.slice(0,m),b.slice(m)]:[b,[]]),[m,b]),[w,k]=l(!1);a((()=>ic.subscribe("fold",(e=>{e&&p?.parent&&e.parent===p?.parent&&k(e.isUnfolded)}))),[p?.parent]);const S=r((()=>{ic.fire("fold",{type:"fold",isUnfolded:!w,parent:p?.parent})}),[w,p?.parent]);return c(g,{className:h("flex flex-col",e),defaultPadding:"p-2xl",...f,children:[o(ae,{className:"self-center",image:s}),t?o(N,{className:h("pt-xs",n),headingType:"h5",title:t}):null,d?.text?o(ke,{className:"w-full mt-m mb-lg",...d}):null,v.length?c(Or,{children:[c("div",{children:[y,o(Er,{isUnfolded:w,children:v})]}),u.length>=m?o(Ar,{className:"mt-m",label:w?"Скрыть":"Подробнее о тарифе",isUnfolded:w,embedded:!0,data:x,onClick:S}):null]}):o("div",{children:y})]})})),cc=d((({className:e,contacts:t,info:n,version:l="secondary",...a})=>c(g,{className:h("flex",e),defaultPadding:"p-6xl",version:l,...a,children:[n?.length?dc(n):null,t?.length?dc(t):null]}))),dc=e=>o("div",{className:"flex gap-5xl grow basis-0",children:e.map(((e,t)=>mc({column:e,i:t})))}),mc=({column:e,i:t})=>e?o("div",{className:"flex flex-col gap-xl grow basis-0",children:e.map((({title:e="",description:t,additionalDescription:n,button:l},a)=>c("div",{children:[o(S,{title:e,description:t,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),n?o("div",{className:"mt-xs opacity-80",children:o(w,{size:"text-m",font:"font-light",children:n})}):null,o("div",{className:h({"mt-xl":Boolean(l?.text)}),children:We([l])})]},String(a))))},`col-${String(t)}`):null,hc=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,uc=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),pc=1e9,gc={sum:{min:1e4,max:pc},period:3},xc=Ot((({className:e,filtrationSchema:t={},resetButton:n,sumInput:l,periodInput:a,...r})=>{const[,{blocksToRender:i,blocksWithProps:s},{field:d,reset:m}]=_i(gc,{block:r.block,page:r.options?.page,normalize:e=>({...e,period:fc(e)})}),u=s.map((([,e])=>e?.paramsSource?.rows?.[0]?.rates)),p=bc(u);return c(g,{className:h("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...r,children:[o(Ti,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(vo,{label:l?.title,min:500,max:pc,...d("sum",{parse:e=>({min:Number(e),max:pc}),format:({min:e})=>String(e)})}),o(rl,{title:a?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(ki,{blocksToRender:i,...r})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),fc=e=>Dt((e?.paramsSource?.rateRows||[]).filter(hc).flatMap((e=>uc(e.minMonths,e.maxMonths)))),bc=e=>Dt(e.flatMap((e=>e||[])).filter(hc).flatMap((e=>uc(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],yc=[{key:"10"},{key:"50"},{key:"100"}],vc=({itemCount:e,onItemCountChange:t})=>{const n=r((({key:e})=>t(Number(e))),[]);return c("div",{className:"mt-2 @lg:mt-0 items-center gap-s hidden @lg:flex",children:[o("span",{children:"Показать по"}),o(Vn,{className:"min-w-20",onChange:n,value:{key:String(e)},options:yc,iconVersion:"black"})]})},Nc="py-m @lg:px-lg px-m rounded-md cursor-pointer text-center min-w-10 @lg:min-w-0 hover:bg-primary-hover hover:text-white",wc=(e,t)=>{const{currentPage:n,onPageChange:l,totalPages:a}=e,r=t+1;return r===n?o("div",{"aria-current":"true",className:"py-m @lg:px-lg px-m bg-primary-main text-center min-w-10 @lg:min-w-0 text-white rounded-md",children:r},String(t)):1!==r&&r!==a&&((e,t,n)=>e<t&&e>=t-1||e<=t+1&&e>t||((e,t,n)=>t<=2&&e<=t+2||t>=n-1&&e>=n-3)(e,t,n))(r,n,a)?o("div",{onClick:()=>l(r),className:Nc,"aria-label":`Страница ${r}`,children:r},String(t)):null},kc={width:"24",height:"24"},Sc=({currentPage:e,onPageChange:t,totalPages:n})=>{const l=i((()=>Array.from({length:n}).fill({currentPage:e,onPageChange:t,totalPages:n})),[n,e]),a=r((()=>{e>1&&t(e-1)}),[e]),s=r((()=>{e<n&&t(e+1)}),[e,n]),d=r((()=>t(1)),[]),m=r((()=>t(n)),[n]);return c("div",{className:"flex gap-m items-center",children:[o("div",{onClick:a,children:o(K,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Cc(1===e),...kc})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:Nc,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,l.map(wc),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:Nc,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(K,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Cc(e===n),...kc})})]})},Cc=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",Ic=({currentPage:e,onPageChange:t,totalPages:n,itemCount:l,onItemCountChange:a})=>c("div",{className:"mt-3xl flex justify-between flex-col @lg:flex-row items-center select-none",role:"navigation","aria-label":"Пагинация",children:[o(Sc,{currentPage:e,onPageChange:t,totalPages:n}),l&&a?o(vc,{itemCount:l,onItemCountChange:a}):null]}),Tc=d((({className:e,value:t,autoFocus:n,onChange:l,onFocus:a,placeholder:i="Поиск по сайту"})=>{const s=r((e=>{l&&l(e.target?.value||"")}),[l]);return c("div",{className:h("relative",e),role:"form",children:[o("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:o(ae,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),o("input",{className:h("h-14 w-full px-10 text-l text-black box-border rounded-md",yn),value:t,type:"text",name:"search-bar-input",placeholder:i,autoFocus:n,onChange:s,onFocus:a})]})})),Bc=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(Tc,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(jl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(jl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период до",minDate:n.startDate,...e("endDate")}),o("div",{className:"col-span-12 @lg:col-span-2 mt-8 @lg:mt-auto",children:o(gr,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),Mc=d((({title:e,timestamp:t,publicId:n})=>{const l=xe(),{href:a}=l({href:`${Yt}/depository/${n}/file`});return c("div",{className:"flex gap-3 items-center py-lg border-gray border-opacity-50 border-b",children:[o(Fi,{className:"shrink-0",icon:"DocDownloadIcon",iconVersion:"black"}),c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o($e,{size:"text-m","font-weight":"font-light",children:Wt(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:a,download:!0,"aria-label":"Скачать",children:e})]})]},n)})),Pc=`${Yt}/depository`,Vc={startDate:void 0,endDate:void 0,query:""},Rc=Ot((({className:e,...t})=>{const[n,a]=l(0),[i,s]=l(10),[d,{field:m,reset:u}]=hn(Vc),{totalPages:p=0,items:x=[]}=(({size:e,page:t,query:n,startDate:l,endDate:a})=>{const r=l?Wt(l,!0):"",i=a?Wt(a,!0):"",s=new URLSearchParams(Pc);s.set("page",String(t)),s.set("size",String(e)),s.set("query",n),s.set("timestampStart",r),s.set("timestampEnd",i);const o=`?${s.toString()}`,{data:c}=Hn(Pc+o,zt);return{items:c?.content,totalPages:c?.totalPages}})({size:i,page:n,...d}),f=r((e=>a(e-1)),[]),b=r((e=>{i!==e?(s(e),a(0)):s(e)}),[]);return c(g,{className:h(e,"container p-6xl"),...t,children:[o(Bc,{filtrationState:d,field:m,onClearFilter:u}),c("div",{className:"flex flex-col",children:[c("div",{className:"grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b",children:[o("div",{className:"col-span-4 @lg:col-span-2 hidden @lg:block",children:o($e,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o($e,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),x.length?x.map((e=>o(Mc,{...e},String(e.publicId)))):o(_r,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(Ic,{currentPage:n+1,onPageChange:f,totalPages:p,itemCount:i,onItemCountChange:b})]})]})})),zc=e=>"Image"===e?.contentType&&e?.image?o(ae,{image:e.image}):"Code"===e?.contentType&&e.code?o("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,Dc=d((({className:e="",title:t,description:n,error:l,button:a,...r})=>c(g,{className:h("flex flex-col justify-center items-center",e),defaultPadding:h("p-6xl"),version:"transparent",...r,children:[o("div",{className:"flex justify-center",children:zc(l)}),o(S,{title:t,description:n,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(ke,{version:a?.version,text:a?.text,...a}):null]}))),_c=new So;function $c(e){return Io(_c,e)}wo(_c,new ko(globalThis?.localStorage));const jc=`${Yt}/region`;function Lc(e="Москва"){return $c().location??{name:e}}function Ac(e="Москва"){const t=$c(),n=r((async()=>{if(!t.location){const n=await Rt(jc);t.location=n??{name:e}}}),[t,e]);return Hn(jc,n),t}var Oc;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(Oc||(Oc={}));const Ec=new Intl.NumberFormat("ru",{style:"currency",currency:Oc.RUB}),Fc=e=>e?Ec.format(e):"",Uc="text-m font-light text-secondary-text ",Wc=`${Uc} text-left`,Hc=`${Uc} pl-5xl text-center`,Yc=`${Uc} pl-5xl text-right`,Xc={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},Kc=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:h("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:Wc,children:o($e,{size:"text-m",children:"Валюта"})}),o("th",{className:Hc,children:o($e,{size:"text-m",children:"Купить"})}),o("th",{className:Yc,children:o($e,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(qc)})]}))),qc=e=>{const t=e?.currency?.currency;return c("tr",{className:"pb-2xs text-h6",children:[o("td",{className:"pt-m m-auto flex text-left",children:c("div",{className:"flex items-center gap-xs",children:[t?o(ae,{image:{icon:Xc[t]},width:"24",height:"24"}):null,o($e,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o($e,{size:"text-h6",children:Fc(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o($e,{size:"text-h6",children:Fc(e?.buyExchangeRate)})})]},t)},Gc={icon:"GpsIcon"},Zc=d((({className:e="",address:t})=>c("div",{className:h("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(Fi,{...Gc,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(w,{size:"text-l",color:"text-primary-main",children:t}):null,o(w,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Jc=(e,t,n)=>{const l=Number(Qc(e))*Math.pow(t,n?-1:1);return Number.isInteger(l)?l:((e,t=2)=>{const n=10**t;return Math.round(parseFloat(String(e))*n)/n})(l)},Qc=e=>e.replace(/[^\d.,]/g,"").replace(",",".");function ed(e){if(!e)throw new Error("Value should be fulfilled");return e}const td=e=>t=>{const[,n]=ed(e.find((([e])=>e(t))));return n(t)},nd=e=>td(e.map((([e,t])=>[e,()=>t])));nd.if=e=>new ld(void 0,e);class ld{parent;predicate;unit;get entry(){return[ed(this.predicate),ed(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new ld(this,e)}then(e){return new ld(this.parent,this.predicate,e)}else(e){return td([...ad(this),[()=>!0,e]])}}const ad=e=>[...e?.parent?ad(e.parent):[],e.entry],rd=e=>nd([[e=>e.value!==Oc.RUB&&e.oppositeValue!==Oc.RUB,()=>e.handleConvert(e.value,Oc.RUB)],[e=>e.value===Oc.RUB&&e.oppositeValue===Oc.RUB,()=>e.handleConvert(e.value,Oc.USD)],[e=>e.value===Oc.RUB&&e.oppositeValue===Oc.RUB,()=>e.handleConvert(e.value,Oc.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function id(e){const{placeholder:t,rates:n,selected:l,value:a,setValue:r,setSelected:i}=e,s=n.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:l,text:l};return c("div",{className:"relative flex",children:[o(Nn,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:r}),s.length?o(Vn,{className:"absolute right-0",isBorder:!1,onChange:e=>i(e.key),options:s,value:d}):null]})}const sd=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:a})=>{const[i,s]=l({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Oc.RUB,selectBuy:n?.[0]?.currency?.currency||Oc.USD}),d=r((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[t&&n?c("div",{className:"grid gap-m",children:[id({placeholder:"Хочу продать",rates:n,selected:i.selectSell,setSelected:od(i,d,n),value:i.inputSell,setValue:e=>dd(d,n)(e,i.selectSell,i.selectBuy)}),id({placeholder:"Получу",rates:t,selected:i.selectBuy,setSelected:cd(i,d,t),value:i.inputBuy,setValue:e=>md(d,t)(e,i.selectBuy,i.selectSell)})]}):null,a?.text?o(ke,{text:a.text,version:a?.version,...a}):null]})})),od=(e,t,n)=>l=>{t({selectSell:l}),rd({value:l,oppositeValue:e.selectBuy,handleConvert:(l=e.selectSell,a=e.selectBuy)=>{dd(t,n)(e.inputSell,l,a)}})},cd=(e,t,n)=>l=>{t({selectBuy:l}),rd({value:l,oppositeValue:e.selectSell,handleConvert:(l=e.selectBuy,a=e.selectSell)=>md(t,n)(e.inputBuy,l,a)})},dd=(e,t)=>(n,l,a)=>{e({inputSell:Qc(n),selectBuy:a});const r=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===l))?.buyExchangeRate;r&&e({inputBuy:String(Jc(n,r,l===Oc.RUB)||"")})},md=(e,t)=>(n,l,a)=>{e({inputBuy:Qc(n),selectSell:a});const r=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===l))?.saleExchangeRate;r&&e({inputSell:String(Jc(n,r,l===Oc.RUB)||"")})},hd=`${Yt}/exchangerates`;const ud=d((({className:e="",title:t="Курсы обмена валют",button:n,...l})=>{const a=function(e){const t=e?.code||"000",{data:n}=Hn(hd+`?regionCode=${t}`,zt);return n||{}}(Lc()),r=pd(a?.exchangeRate?.currencies),i=r.filter((e=>e.buyExchangeRate));i.unshift({currency:{currency:Oc.RUB}});const s=r.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:Oc.RUB}}),o(g,{className:h("box-border min-h-80",e),...l,children:o(Pe,{className:"h-full",title:o(N,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[r?o(Kc,{className:"mb-xl",exchangeCurrencyItems:r}):null,o(Zc,{address:a?.address})]}),o(sd,{className:"grow w-1/2",currencyRatesBuy:i,currencyRatesSell:s,button:n})]})})})})),pd=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],gd=d((({className:e="",items:t})=>{const n=xe();return o("ul",{className:h("flex flex-col gap-s w-full",e),children:t?.map(xd(n))})})),xd=e=>({dataFooter:t,...n},l)=>{const{text:a,href:r,target:i,onClick:s}=e(n);return a?o("li",{className:"list-none",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:r,target:i||"_self",onClick:s,...be(t),children:a||null})},String(l)):null},fd=e=>t=>!t.displayArea||e.includes(t.displayArea.toLowerCase()),bd=["all","footer"],yd=d((({className:e,navigationItems:t})=>{const n=xe();return o("div",{role:"menu",className:h("w-full flex items-start justify-between flex-col md:flex-row gap-y-m lg:order-2",e),children:t?.filter(fd(bd)).map(n).map(vd)})})),vd=(e,t)=>{const{text:n,items:l=[],href:a,target:r="_self",onClick:i,dataFooter:s}=e,d=l.filter(fd(bd));return c("div",{role:"menuitem",className:"flex flex-col gap-s w-full @md:w-1/4",children:[o("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:r,onClick:i,...be(s),children:n}),d?o(gd,{items:d}):null]},String(t))},Nd=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:h("space-y-m",e),children:t.map(wd)}):null)),wd=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o($e,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(kd)})]},String(t)),kd=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:Sd(e.type,e.text)}),o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),Sd=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${Cd(t)}`,children:o($e,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},Cd=e=>e.replaceAll(/\D/g,""),Id=d((({className:e="",index:t,text:n,...l})=>{const a=xe(),{href:r,target:i,onClick:s}=a(l);return o("a",{className:h("text-secondary-text",e),href:r,target:i,onClick:s,children:n||`Документ ${t}`})})),Td=d((({className:e="",title:t,links:n})=>o("div",{className:e,children:n?.length?c("div",{className:"flex justify-between lg:items-center flex-col lg:flex-row gap-lg py-lg border-y border-y-main-divider",children:[o("div",{className:"lg:hidden",children:o($e,{size:"text-l",font:"font-normal",children:t})}),n.map(((e,t)=>o(Id,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),Bd="w-full lg:w-52",Md={width:"118",height:"24"},Pd={"bg-white":"color",transparent:"white"},Vd={"bg-white":"text-primary-main",transparent:"text-white"},Rd=(e,t,n)=>o(ae,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:Pd[e]},className:Vd[e],width:n?.width,height:n?.height}),zd={"bg-white":"text-primary-text",transparent:"text-white"},Dd=d((({className:e,href:t="/",logo:n,children:l,targetBlank:a,bgColor:r="bg-white",showTitle:i=!0,data:s})=>c("a",{className:h("inline-flex items-center font-sans no-underline",e),href:n?.href??t,target:a?"_blank":"_self","aria-label":n?.title??"Россельхозбанк",...be(s),children:[Rd(r,n?.image,Md),i?l??o("div",{className:"ml-s",children:o($e,{font:"font-medium",color:zd[r],size:"",children:n?.title??"Россельхозбанк"})}):null]})));function _d(e,t,n=300){a((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}const $d=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:n,s1Matches:l,s2Matches:a}=function(e,t){const n=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),l=Array.from({length:e.length}),a=Array.from({length:t.length});let r=0;for(let i=0;i<e.length;i++){const s=Math.max(0,i-n),o=Math.min(i+n,t.length-1);for(let n=s;n<=o;n++)l[i]||a[n]||e[i]!==t[n]||(r++,l[i]=!0,a[n]=!0)}return{m:r,s1Matches:l,s2Matches:a}}(e,t);if(0===n)return 0;const r=function(e,t,{s1Matches:n,s2Matches:l}){let a=0;for(let r=0,i=0;r<e.length;r++){if(!n[r])continue;let s=i;for(;s<t.length;s++)if(l[s]){i=s+1;break}e[r]!==t[s]&&a++}return a}(e,t,{s1Matches:l,s2Matches:a}),i=(n/e.length+n/t.length+(n-r/2)/n)/3,s=i>.7?.1*function(e,t){let n=0;for(;e[n]===t[n]&&n<4;)n++;return n}(e,t):0;return i+s*(1-i)};const jd=(e,t)=>(n,l)=>{for(const[a,r]of l)n.set(a,e(n.get(a)||t,r));return n},Ld=(e=[])=>e.reduce(((e,t)=>e+t),0),Ad=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),Od=e=>t=>e.map((([e,n])=>[$d(t)(e),n])).filter((([e])=>e>=.8)).map((([e,t])=>Fd(t,e))).reduce(jd(Math.max,0),new Map),Ed=e=>t=>{return Vi(t,t.map((({title:e})=>e)).map((e=>t=>{const n=Ad(t||"");return n.length?Ld(e.map((e=>ri(n.map($d(e)))))):0})(e))).sort((e=>(t,n)=>-e(t,n))((n=([,e])=>e,(e,t)=>n(e)-n(t)))).map((([e])=>e));var n},Fd=(e,t)=>new Map(e.map((e=>[e,t]))),Ud=({basePathList:e,initialQuery:t=""})=>{const[n,r]=l(t||"");a((()=>{null!=t&&r(t)}),[t]);const{data:i}=Hn(e?.length?e:null,Wd),[s,o]=l(null);return _d((()=>{i&&o(i.map((e=>t=>{const{corpus:n,dictionary:l}=t||{};if(!(e&&n?.length&&l&&Object.keys(l).length))return[];const a=Ad(e);if(!a.length)return[];const r=Object.entries(l),i=[...a.map(Od(r)).reduce(jd(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>n[e]));return Ed(a)(i)})(n)))}),[i,n]),[s,{value:n,onChange:r}]},Wd=async(...e)=>(await Promise.allSettled(e.map((e=>Rt(L(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),Hd=d((({initialQuery:e,navigationItems:t,onClose:n})=>{const l=i((()=>t?.map((e=>e.href||"/"))),[t]),[a,r]=Ud({basePathList:l,initialQuery:e}),s=i((()=>Yd(t)(a)),[t,a]);return o(fr,{head:o(Tc,{autoFocus:!0,...r}),onClose:n,children:o(yd,{navigationItems:s})})})),Yd=e=>t=>e?.length&&t?.length?Vi(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:L("/",t)})))}))):[],Xd=d((({className:e,search:t,...n})=>{const[a,i]=l(""),s=r((()=>i("")),[]),d=pn(Hd,n),m=r((e=>{i(e),Kd(e)&&d.open({initialQuery:e,onClose:s})}),[s,d]);return c("div",{className:h("relative",e),role:"search",children:[o(Tc,{value:a,placeholder:t?.placeholder,onChange:m}),o(xr,{className:"absolute top-0 right-0 sm:hidden",onClose:s})]})})),Kd=e=>e&&e.length>=3,qd=(e,t)=>{const{logo:n}=e??{},{dataHeader:l,dataFooter:a,...r}=n??{};return c("div",{className:"flex items-stretch gap-3xl",children:[o(Dd,{className:Bd,logo:r,data:a,showTitle:!1}),o(Xd,{className:"grow",navigationItems:t,...e})]})},Gd=d((({className:e="",index:t,...n})=>{const l=xe(),{href:a,target:r,text:i,onClick:s}=l(n);return o("a",{className:h("text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px]",e),href:a,target:r,onClick:s,children:i||`Документ ${t}`})})),Zd=d((({className:e="",links:t,license:n})=>c("div",{className:h("@container space-y-lg",e),children:[n?o("div",{children:o($e,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} ${n}`})}):null,t?.length?o("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs",children:t.map(((e,t)=>o(Gd,{index:t,...e},String(t))))}):null]}))),Jd=Ot((({className:e,footer:t,...n})=>{const{navigationItems:l}=n.options?.page?.navigation??{},a=n.options?.page?.common??{},{documents:r,relatedEnterprises:i,contacts:s,mediaLinks:d=[],horizontalNavigationTitle:m,feedbackButton:u,license:p,otherLinks:x=[]}=t??{};return c(g,{tag:"footer",className:h("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[qd(a,l),c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(yd,{navigationItems:l}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:h(Bd,"flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(Nd,{items:s}),u?o(ke,{className:"w-full",version:"primary",...u}):null,d.map(((e,t)=>o(tc,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),x.map(((e,t)=>o(Mr,{className:"text-s font-light",...e},`${e.href}_${t}`)))]})]}),o(Td,{title:m,links:i}),o(Zd,{links:r,license:p})]})})),Qd=d((({className:e="",title:t,description:n,calendar:l,...a})=>c(g,{className:h("space-y-m",e),defaultPadding:"p-6xl",...a,children:[o(S,{title:t,description:n,headlineVersion:"M",isEmbedded:!0}),l?em(l):null]}))),em=e=>{const t=100/(e.reduce(((e,t)=>t?.month?.length?e+t.month.length:e),0)||1),n=e.filter((e=>e?.month?.length)).map((e=>({...e,flexBasis:`${e?.month?.length?e.month.length*t:""}%`})));return c("div",{className:"w-full flex flex-col justify-center gap-s",children:[o("div",{className:"flex w-full text-h6 text-center",children:n.map((e=>tm(e,t)))}),o("div",{className:"flex gap-s w-full",children:n.map(((e,t)=>c("div",{className:"border-r border-main-divider last:border-r-0 space-y-s",style:{flexBasis:e.flexBasis},children:[o("div",{className:"flex gap-s",children:nm(e)}),c("div",{className:"text-s",children:[o($e,{size:"text-s",font:"font-light",color:"text-primary-text",children:e.text})," ",o($e,{size:"text-s",font:"font-light",color:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},tm=(e,t)=>e.month?.map(((e,n)=>o("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${n}`))),nm=e=>e.month?.map((e=>e.image?.src?o("div",{className:"h-52 border-r pr-s border-main-divider last:border-r-0",children:o(ae,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),lm=Ot((({className:e,title:t,button:n,regionSource:a,data:r,...i})=>{const[s,d]=l({key:""}),m=a?.regions??[],u=m?.find((e=>e.name===s.key))?.href;return o(g,{className:e,defaultPadding:"p-6xl",...i,children:c("div",{className:"container space-y-m",children:[t?o(N,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(_n,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:m.map((({name:e=""})=>({key:e,text:e}))),value:s,onChange:d}):null,u?o("div",{className:"text-center",children:o(Mr,{className:h("w-full @xl:w-auto"),href:u,target:"_blank",version:n?.version??"primary",data:Jo(r,s?.key),children:n?.text?n.text:"Перейти"})}):null]})})}));function am(e=[]){const t=V(),n=Array.from(e.entries()).filter((([,e])=>rm(t)(e)));return n.find((([,e])=>rm(t,!0)(e)))??n[n.length-1]??[]}const rm=(e,t=!1)=>({href:n})=>{if(!n)return!1;const l=j(im(e)(n));return t?l===j(n):l.startsWith(j(n))},im=e=>t=>{const n=J(Z.SITE_URL);return D(t)?e.href:L(n,e.pathname)},sm=d((({className:e="",items:t,activeItem:n,ariaLabel:l="Меню"})=>{const[i,{setFalse:d,toggle:m}]=an(!1),u=xn(d),p=s(null),g=r((({isOpened:e,buttonRef:t,menuRef:n})=>{if(e&&t.current&&n.current){const e=n.current.getBoundingClientRect(),l=t.current.getBoundingClientRect(),a=globalThis.innerWidth-e.width;e.right>=globalThis.innerWidth?n.current.style.left=`${a}px`:l.left>e.left&&(a>l.left?n.current.style.left="":n.current.style.left=`${a}px`)}}),[i]);return gn(globalThis,"resize",(()=>g({isOpened:i,buttonRef:u,menuRef:p}))),a((()=>{g({isOpened:i,buttonRef:u,menuRef:p})}),[i]),c("div",{className:h(i?"rounded-md shadow-blue-gray":"",e),ref:u,role:"navigation",children:[o("button",{type:"button",className:"group/btn flex justify-between items-center h-6","aria-label":l,onClick:m,role:"button","aria-labelledby":"labeldiv",children:Array(3).fill(null).map(((e,t)=>o("div",{className:"w-[3px] h-[3px] rounded mr-2xs bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white"},String(t))))}),o("div",{ref:p,className:h("absolute flex flex-col rounded-md bg-white p-xl pb-xs w-56 z-40",{hidden:!i}),"aria-hidden":!i,children:cm(t,n)})]})})),om=d((({isActive:e,...t})=>{const n=xe(),{text:l,href:a,target:r,onClick:i}=n(t);return o("a",{className:h("text-l font-light pb-m hover:text-primary-main",{"text-primary-main":e}),href:a,target:r,onClick:i,role:"link",...be(t?.data),children:l})})),cm=(e,t)=>e?.map(((e,n)=>o(om,{isActive:e===t,...e},e?.text??String(n)))),dm={default:"w-6 h-6",large:"w-12 h-12"},mm=d((({className:e,isRounded:t,buttonSize:n="default",isGrayBg:l=!1,disabled:a,ariaLabel:r="Меню второго уровня",image:i,data:s,onClick:c,version:d})=>o("button",{className:h("group/btn border-0 flex shrink-0 items-center",l?"p-s rounded-full":"p-0 bg-inherit","transparent"===d?"backdrop-opacity-30 bg-white/30":l&&!t?"bg-main-divider":"",t?"w-8 h-8 text-secondary-light hover:text-secondary-hove":`${dm[n]} text-primary-text hover:text-primary-main`,"group-data-transparent:text-white",e),type:"button",disabled:a,"aria-label":r,onClick:c,...be(s),children:o(ae,{image:i,className:h("h-full",{"bg-main-divider/20 rounded-full":t}),imageClassName:"group-hover/btn:text-primary-hover group-hover/btn:invert-0"})}))),hm=e=>globalThis[e],um=(e,t)=>{const n=document.getElementById(t);if(n){const t=hm(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(hm(e))}))}))}return new Promise(((n,l)=>{const a=document.createElement("script");a.src=t,a.async=!0,a.id=t,a.addEventListener("load",(()=>{n(hm(e))})),a.addEventListener("error",(e=>{l(e)})),document.head.appendChild(a)}))};const pm="chatbot",gm="text-page__btn-chat",xm={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},fm=d((({chat:e="personal",iconVersion:t,className:n,ariaLabel:l="Чат",version:r})=>{const i=(e=>{a((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]);const t=xm[e??""];return n=>{if(t)if("personal"!==e)um(pm,t);else{const e=n.target;e?.classList.contains(gm)||e?.classList.add(gm),document.getElementById("webchat-js-container:webchat_rshb")||um(pm,t)}}})(e);return o(mm,{className:n,image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:l,onClick:i,buttonSize:"large",isGrayBg:!0,version:r})})),bm=d((({className:e="",active:t,dataItemName:n,children:l,data:a,...r})=>{const i=xe(),{href:s,target:d,text:m,onClick:u}=i(r);return c("a",{className:h("relative inline-block bg-transparent text-center no-underline",e),href:s,target:d,"data-item-name":n,onClick:u,...be(a),children:[o("span",{className:ym(t),children:m||l}),t?o("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-white"}):null]})})),ym=(e=!1)=>h("font-sans text-l lg:font-light",e?"text-primary-main":"text-primary-text hover:text-primary-main","group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),vm=d((({observerOptions:e,onVisibilityChange:t,children:n,className:l,...a})=>{const i=Xr(r((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:i,className:l,role:"menuitem",children:o(bm,{...a,children:n})})})),Nm={default:"bg-main-divider text-primary-main rounded hover:text-primary-main",transparent:"backdrop-opacity-30 bg-white/30 hover:text-primary-hover text-white"},wm=d((({version:e,text:t,mobileText:n,...l})=>{const a=Te()?n:t;return a?o(ke,{className:h("py-s px-lg font-light whitespace-nowrap",Nm["transparent"===e?"transparent":"default"]),...l,children:a}):null})),km=d((({subItems:e=[],version:t,internetBankButton:n,dropdownMenuAriaLabel:a,chatBotAriaLabel:r})=>{const d="transparent"===t?"white":"black",[,m]=am(e),[h,u]=l(e.length),p=e.slice(h),g=s(null),x={rootRef:g},f=i((()=>e.map(((e,t)=>e=>{u(e?Sm(t):Cm(t))}))),[e]);return c("nav",{className:"mt-s flex gap-s items-center justify-between",children:[o("div",{ref:g,className:"overflow-hidden whitespace-nowrap pb-s mt-xs space-x-lg",role:"menu",children:e.map(((e,t)=>o(vm,{className:h-1<t?"invisible":"",active:e===m,observerOptions:x,onVisibilityChange:f[t],data:e.dataHeader,...e},String(t))))}),p.length?o(sm,{items:p,activeItem:m,ariaLabel:a}):null,z.CHAT_BOT?o(fm,{version:t,iconVersion:d,chat:z.CHAT_BOT,ariaLabel:r}):null,o(wm,{version:t,...n})]})})),Sm=e=>t=>Math.max(t,e+1),Cm=e=>t=>Math.min(t,e),Im=e=>e?.length?c("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[o("div",{className:"mb-m",children:o($e,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),o("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>o(Tm,{...e},String(t))))})]}):null,Tm=d((({icon:e,...t})=>{const n=xe(),{text:l,target:a,href:r,onClick:i}=n(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ae,{image:e}):null,l?o("a",{className:"hover:text-primary-hover",href:r,target:a,onClick:i,children:o($e,{size:"text-l",font:"font-light",color:"text-primary-text",children:l})}):null]})})),Bm=(e,t)=>n=>n.name?o(Qo,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:Jo(e,n.name),children:o($e,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,Mm=d((({className:e,searchTerm:t,onSearch:n})=>c("form",{className:`font-sans relative ${e}`,children:[o("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:o("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),o("input",{id:"search-bar-input",className:h(yn,"h-12 pl-m w-full peer text-l text-black rounded-md box-border"),value:t,onChange:e=>n(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),Pm=d((({defaultLocation:e})=>{const t=Lc(e),n=xe(),{href:l}=n({href:`/branches/${t.slug}`});return t?o("div",{className:"mb-s",children:c(w,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(Qo,{href:l,className:"inline mx-2xs text-primary-main",children:t.name})]})}):null})),Vm=d((({foreignOffices:e,branches:t,onClose:n})=>{const a=Ac(t?.default),[s,d]=l(""),m=Ma(),h=i((()=>zm(m).sort(((e,t)=>e.name.localeCompare(t.name)))),[m]),u=i((()=>((e,t)=>{const n=new Map;for(const l of e){const e=t(l),a=n.get(e)||[];n.set(e,[...a,l])}return n})(h,Rm)),[h]),p=r((e=>{a.location=e,n?.()}),[a,n]);return c(fr,{className:"pb-20",head:c("div",{children:[o($e,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),o(Pm,{defaultLocation:t?.default}),o(Mm,{onSearch:d,searchTerm:s})]}),onClose:n,children:[s&&s.length>=3?o("div",{children:h.filter((({name:e})=>e&&$d(e.toLowerCase())(s.toLowerCase())>=.8)).map(Bm(t?.dataSelect,p))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(u.entries()).map((g=p,x=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o($e,{size:"text-h6",children:e})}),t.map(Bm(x,g))]},e)))}),Im(e)]});var g,x})),Rm=e=>e.name?.charAt(0)??"",zm=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()??""}))),Dm=d((({className:e="",active:t,flat:n,children:l,data:a,...r})=>{const i=xe(),{href:s,target:c,text:d,onClick:m}=i(r);return o("a",{className:h(_m(t,n),e),href:s,target:c,onClick:m,rel:"noopener noreferrer","aria-label":`Ссылка на ${d}`,...be(a),children:o("span",{suppressHydrationWarning:!0,className:$m(t,n),children:d||l})})})),_m=(e=!1,t=!1)=>h("inline-block border border-solid bg-transparent text-center no-underline",e?"rounded-md border-primary-main group-data-transparent:border-white":"border-transparent",{"px-m py-xs":!t}),$m=(e=!1,t=!1)=>h("font-sans text-s font-light",e?"text-primary-main":h(t?"text-primary-text":"text-secondary-text","hover:text-primary-main"),"group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),jm=d((({className:e,version:t,...n})=>{const l="transparent"===t?"white":"black",a=Lc(n?.branches?.default),i=pn(Hd,n),s=pn(Vm,n),d=r((()=>i.open({})),[i]),m=r((()=>s.open({})),[s]);return c("div",{className:h("flex items-center ml-5 md:max-w-[300px] xl:max-w-full gap-lg",e),role:"navigation",children:[n?.branches?.visible?o(Dm,{className:"whitespace-nowrap text-ellipsis overflow-hidden",flat:!0,href:"#",text:a?.name,data:Jo(n?.branches?.dataClick,a?.name??""),onClick:m}):null,n?.officesAtms?.href?o(Dm,{className:"whitespace-nowrap",flat:!0,...n.officesAtms}):null,o(mm,{image:{icon:"LoupeIcon",iconVersion:l},ariaLabel:n?.search?.ariaLabel??"Поиск",onClick:d,data:n?.search?.data})]})})),Lm=d((({observerOptions:e,onVisibilityChange:t,children:n,className:l,...a})=>{const i=Xr(r((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:i,className:l,role:"menuitem",children:o(Dm,{...a,children:n})})})),Am=d((({navigationItems:e=[],activeTopItem:t,dropdownMenuAriaLabel:n,version:a,headerData:r,search:d,bgColor:m,logo:h})=>{const[u,p]=l(e.length),g=e.slice(u),x=s(null),f={rootRef:x},b=i((()=>e.map(((e,t)=>e=>{p(e?Om(t):Em(t))}))),[e]),{dataFooter:y,dataHeader:v,...N}=h??{};return c("div",{className:"flex items-center justify-between",children:[o(Dd,{className:"mr-3xl",bgColor:m,logo:N,data:v,showTitle:!1}),o("div",{ref:x,className:"overflow-hidden min-w-[160px] pb-xs mt-xs",role:"menu",children:e.map(((e,n)=>o(Lm,{className:u-1<n?"invisible":"",active:e===t,observerOptions:f,onVisibilityChange:b[n],data:e.dataHeader,...e},String(n))))}),g.length?o(sm,{className:"mx-xs",items:g,activeItem:t,ariaLabel:n}):null,o(jm,{version:a,className:"ml-auto",search:d,navigationItems:e,...r})]})})),Om=e=>t=>Math.max(t,e+1),Em=e=>t=>Math.min(t,e),Fm={"bg-white":"primary",transparent:"transparent"},Um=["all","header"],Wm=Ot((({className:e,bgColor:t="bg-white",logo:n={},version:l=Fm[t],portal:a,header:r={},...i})=>{const{common:s,navigation:d}=Ym(i?.options?.page),{navigationItems:m}=d,{logo:u={}}=s,[,p]=am(m),{internetBankButton:x}=a||{},f=n.image?.icon||n.image?.src||n?.title?n:u;return o(g,{tag:"header",className:h("pt-m px-20",p?.items?.length?"pb-m":"pb-lg",e),defaultPadding:"",version:l,...i,children:c("div",{className:"container",children:[o("div",{className:"whitespace-nowrap",children:o(Am,{activeTopItem:p,navigationItems:m?.filter(fd(Um)),version:l,headerData:{...r,...d},search:s.search,bgColor:t,logo:f})}),o("div",{className:h("mt-s h-px bg-main-divider",Hm(l))}),p?.items?.length&&o(km,{subItems:p?.items?.filter(fd(Um)),version:l,internetBankButton:x})]})})})),Hm=e=>"transparent"===e?"opacity-30":"",Ym=e=>({navigation:e?.navigation??{},common:e?.common??{}}),Xm=(e=!1)=>e?{}:{padding:"p-0"},Km={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},qm=Ot((({className:e="",padding:t="p-0",gap:n="XS",isInnerPadding:l=!0,version:a="transparent",isTheme:r=!1,isCardBorder:i,...s})=>o(g,{className:h("relative","grid grid-cols-12",Km[n],e),padding:t,version:a,isTheme:r,...s,children:P({...s,extraProps:{...Xm(l),className:Wr(i)}})})),{childrenTypes:{exclude:["HorizontalLayout"]}}),Gm=d((e=>{const{className:t,align:n,image:l,...a}=e,r=n?h("flex",qi[n]):"";return o(g,{className:h(r,t),defaultPadding:"p-0",...a,children:o(ae,{image:l})})})),Zm=(e,t=0)=>{const{itemCount:n,visibleItemCount:a}=e,[i,s]=l(t),o=r((()=>s((e=>Math.min(e+1,n-1)))),[n]),c=r((()=>s((e=>Math.max(e-1,0)))),[n]),d=a?n>a&&i<n-a:i<n-1,m=i>0;return[i,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]},Jm=({className:e,btnClass:t,canDec:n,canInc:l,dec:a,inc:r})=>n||l?c("div",{children:[n?o(gi,{className:h("absolute z-40",t[0],e),onClick:a}):null,l?o(xi,{className:h("absolute z-40",t[1],e),onClick:r}):null]}):null,Qm=d((({className:e="",cards:t=[],button:n})=>{const[a,i]=l(0),s=r((e=>i(e)),[]),d=t.length,[m,h]=Zm({itemCount:d,visibleItemCount:2}),{canDec:u,canInc:p}=h,g=t[m]?.href;return c("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[c("div",{className:"relative overflow-hidden","aria-label":"Страховые программы",children:[d?eh({activeIndex:m,cards:t,selectedCardIndex:a,onClick:s}):null,Jm({...h,btnClass:["left-12","right-12"],className:"top-16"}),u?o("div",{className:"absolute top-0 left-0 h-full w-32 bg-opacity-from-white"}):null,p?o("div",{className:"absolute top-0 right-0 h-full w-32 bg-opacity-to-white"}):null]}),o(ke,{className:"w-60 text-center",version:"primary",...n,href:g})]})}));function eh({activeIndex:e,cards:t,selectedCardIndex:n,onClick:l}){const a=460*e,r=t.length>2?"justify-start":"justify-center";return o("div",{style:{transform:`translateX(-${a}px)`},className:"duration-1000 px-6xl",children:o("div",{className:`w-full flex flex-nowrap gap-s pb-6xl ${r}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:n,onClick:l}){return c("button",{type:"button",onClick:l,className:"p-3xl min-w-fit flex items-center gap-2xl bg-white border-solid border relative "+(n?"shadow-dark-blue border-primary-main":"ease-in duration-300 border-gray"),children:[e?.icon?o(ae,{className:"p-lg rounded-full bg-secondary-light",image:e.icon,width:"108",height:"108"}):null,c("div",{className:"flex gap-s",children:[e?.sum?th("страховая сумма",e.sum):null,e?.fee?th("страховой взнос",e.fee):null]}),nh(n)]},String(t))}({slide:e,i:t,isActive:Boolean(t===n),onClick:()=>l(t)})))})})}function th(e,t){return c("div",{className:"flex flex-col text-left whitespace-pre",children:[c($e,{size:"text-h6",children:[Ke(2)(t)," ₽"]}),o("div",{className:"mt-2xs",children:o($e,{size:"text-l",color:"text-secondary-text",children:e})})]})}function nh(e){return e?o(ae,{className:"h-6 w-6 min-w-6 min-h-6 absolute right-4 top-4",image:{icon:"DoneIcon"},width:"24",height:"24"}):null}const lh=d((({className:e="",title:t,insuranceTabs:n=[],button:a,...i})=>{const[s,d]=l(0),m=r((e=>d(e)),[]);return c(g,{className:h("box-border overflow-hidden relative px-0 space-y-2xl",e),defaultPadding:"p-6xl",...i,children:[t?o(N,{className:"text-center",title:t,headingType:"h3"}):null,n?.length>1?o("div",{className:"p-xs bg-secondary-light w-fit mx-auto rounded-md",children:n.map(((e,t)=>function({title:e,i:t,isActive:n,onClick:l}){return o("button",{type:"button",onClick:l,"aria-label":`Кнопка ${e}`,className:"box-border px-m py-s text-m font-light "+(n?"bg-primary-main text-white rounded-md":"text-secondary-text"),children:e},String(t))}({title:e?.title,i:t,isActive:Boolean(t===s),onClick:()=>m(t)})))}):null,o("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:ah({insuranceTabs:n,button:a})})]})})),ah=({insuranceTabs:e,button:t})=>{const n=e?.map((e=>e.cards));return n?.length?n.map(((e,n)=>o(Qm,{button:t,cards:e},String(n)))):null};const rh={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},ih={XS:"h-10",S:"h-16",M:"h-24",L:"h-32",XL:"h-52"},sh=d((e=>{const{className:t="",__html:n,isDotted:l,investmentZeroColumn:a,investmentColumns:r,...i}=e,s=r?[...r]:[];return a&&s.unshift(a),o(g,{className:t,defaultPadding:"p-4xl",...i,children:c("div",{className:"container text-m font-light space-y-4xl",children:[s?.length?c("div",{children:[c("div",{className:"flex items-end relative pl-3xl pr-lg text-white",children:[Ci(o("div",{className:"w-px h-4 bg-gray"}))(s.map(oh)),o("div",{className:"absolute right-3xl w-px h-4 bg-gray"})]}),o("div",{className:"border-t border-gray -mt-xs mx-3xl"}),o("div",{className:"flex justify-between text-primary-text mt-s -mx-5xl",children:s.map(mh)})]}):null,n?o("div",{className:"max-w-2xl font-light text-base",children:o(De,{__html:n,isDotted:l,itemSize:"list-s"})}):null]})})})),oh=(e,t,n)=>{const l=1===t,a=t===n.length-1,r=e.cells?.reverse()||[];return o("div",{className:`${ch(l,a,e.cells)}`,children:r.length?o("div",{className:"w-full "+(a?"border-4 border-green-more-dark p-1.5 min-w-72":""),children:r.map(dh)}):null},`column_${t}`)},ch=(e,t,n=[])=>[n.length?"flex-1":"flex-0",!n.length||e||t?"":"pl-s",n.length&&!t?"pr-s pb-3xl":"pb-xl"].join(" "),dh=(e,t)=>{const n=e.cellSize||"XS",l=e.cellColor||"green";return e.text?o("div",{className:`flex-1 flex items-center justify-center relative py-xs ${ih[n]} ${rh[l]} ${"XS"===n?"px-s":"px-5xl"}`,children:o($e,{align:"text-center",children:e.text})},`cell_${t}`):null},mh=(e,t)=>e?.title?o("div",{className:"flex-1 max-w-44 text-center px-xs last:pr-4xl last:max-w-52",children:e.title},`title_${t}`):null,hh=["байт","Кб","Мб","Гб","Тб","Пб"],uh=d((({icon:e,text:t,href:n,target:l,fileFormat:a,data:r,fileSize:i})=>{const s=i&&a?",":"",d=i??"",m=a?String(a):"";return c("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",href:n,target:l,...be(r),children:[e,t?c($e,{size:"text-l",font:"font-light",children:[t," ",ph(d,m),o($e,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),ph=(e,t)=>e||t?o("span",{children:", "}):"",gh=(e,t)=>(n,l)=>{const a=W(e)("Attachment"===n?.docType?n?.attachment?.src:n?.href),r="Attachment"===n?.docType?((e,t=2)=>{if(0===e)return"";const n=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,n)).toFixed(t))} ${hh[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,i="Attachment"===n?.docType?fh(a):n?.fileFormat;return c("div",{role:"listitem",children:[o(uh,{text:n?.text,target:n?.target,href:a,fileFormat:i,fileSize:r,icon:xh(t),data:n?.data}),o(De,{__html:n?.__html})]},String(l))},xh=e=>e?o(ae,{className:"min-w-6 min-h-6",image:e,width:"24",height:"24"}):null,fh=e=>{if(!e)return"";const t=e.lastIndexOf("."),n=new RegExp(/\/(.*)/),l=-1!==t?e.substring(t+1):"";return l.includes("/")?l.replace(n,""):l},bh=d((({href:e,__html:t,target:n,onClose:l})=>c(fr,{className:"my-6xl min-h-fit w-fit mx-auto",onClose:l,children:[t?o(De,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(Mr,{href:e,target:n,version:"primary",ariaLabel:"Ссылка на согласие",onClick:l,children:"Я согласен"}),o(gr,{type:"button",version:"secondary",onClick:l,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]}))),yh=d((({text:e,href:t,target:n,__html:l,icon:a})=>{const{open:i}=pn(bh),s=r((()=>i({__html:l,href:t,target:n})),[l,t,n]);return e?c("button",{className:"flex gap-s text-primary-text no-underline hover:text-primary-main",onClick:s,children:[xh(a),o($e,{font:"font-light",children:e})]}):null})),vh={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Nh=Ot((({className:e="",title:t,description:n,align:l="text-center",documents:a,icon:r={icon:"DocIcon"},columnsMode:i="double",...s})=>{const d=V();return c(g,{className:h("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(S,{title:t,description:n,align:l,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:h("grid gap-xl","double"===i?"@md:grid-cols-2":"grid-cols-1",vh[i]),role:"list",children:a.map(wh(d,r))}):null]})})),wh=(e,t)=>(n,l)=>{const a=n?.docType;return""===a?null:"reportSource"in n&&n?.reportSource?.__html?kh(t)(n,l):gh(e,t)(n,l)},kh=e=>(t,n)=>{const l={text:t.text,target:t.target,__html:t.reportSource?.__html};return t.reportSource?.__html&&t.text?c("div",{role:"listitem",children:[o(yh,{...l,icon:e,href:Sh(t)?t?.href:t?.attachment?.src}),o(De,{__html:t?.__html})]},String(n)):null},Sh=e=>"href"in e,Ch=Ot((({className:e,padding:t,align:n="text-left",buttons:l=[],description:a,image:r,__html:i,headingType:s,qr:d,additionalDescription:m="",title:u="Мобильное приложение",version:p="primary",...x})=>{const f="secondary"===p?"p-m min-w-32":"min-w-24",b=r?.src?o(ae,{className:"hidden lg:block",image:r}):null;return o(g,{className:h("min-h-80",e),padding:"p-0",version:p,...x,children:c(Pe,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(N,{headingType:s,title:u,className:h("whitespace-pre-wrap",n)}),rightImage:b,buttons:We(l,{className:"flex-wrap"}),children:[a?o($e,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:h("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[i?o(De,{__html:i,itemSize:"list-m"}):null,o($e,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:h("flex justify-center bg-white rounded-md @xl:-order-1",f),children:o(ae,{className:"w-fit",image:d})}):null,r?.src?o(ae,{className:"lg:hidden",image:r}):null]})]})})})),Ih=(e,t)=>e&&"underlined"!==t?"primary":"secondary",Th=(e=[],t={})=>e.filter((({content:e={}})=>zi(t,e))).length,Bh=(e,t)=>e===t;const Mh=(e=>(t,n)=>t===n||Boolean(t&&n&&Object.keys(t).length===Object.keys(n).length&&Object.entries(t).every((([t,l])=>e(l,n[t])))))(function(...e){return(t,n)=>e.some((e=>e(t,n)))}(Bh,((e=Bh)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,l)=>e(t,n[l])))))())),Ph=[],Vh={},Rh={primary:"bg-white/30",secondary:"bg-main-divider"},zh={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},Dh=d((({count:e,version:t="secondary"})=>{const n=Te(),l=n?"bg-main-divider":Rh[t],a=zh[t][n?"mobile":"desktop"];return o("div",{className:h("w-6 h-6 rounded-full flex items-center justify-center",l),role:"status","aria-label":`Количество ${e} доступных программ и сервисов`,children:o($e,{size:"text-xs",color:a,children:e})})})),_h=({text:e,description:t,icon:n,isActive:l,type:a})=>{const r=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white"),text:e?"mb-xs text-xl":"mb-2xs text-l text-primary-text",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal",oldText:"text-m text-center",oldDesc:"text-m-light"}))(l);return c("div",{className:h("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,"aria-labelledby":`${e}-label`,children:[n?o(ae,{className:h("h-6 w-6 min-w-6 min-h-6",r.icon),image:{...n,iconVersion:n?.iconVersion??r.iconVersion},width:"24",height:"24",alt:e}):null,c("div",{className:"border-0",children:[o("div",{className:"animated"===a?r.text:r.oldText,children:e}),o("div",{className:"animated"===a?r.desc:r.oldDesc,children:t})]})]})},$h={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},jh={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},Lh={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},Ah={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},Oh=d((({tag:e="div",item:t={},isActive:n=!1,type:l="default",onClick:a})=>{const r=e,{text:i,description:s,icon:d,count:m,tabName:u,...p}=t;return o(r,{className:h("h-12","block flex-1","cursor-pointer",$h[l],n?Ah[l]:Lh[l]),"aria-label":"Список табов",onClick:a,...p,children:c("div",{className:h("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?jh[l]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${i}`,children:[_h({text:i,description:s,icon:d,isActive:n,type:l}),Number.isInteger(m)?o("div",{className:"ml-xs",role:"status","aria-label":`Количество программ и сервисов ${m}`,children:o(Dh,{count:m,version:Ih(n,l)})}):null]})})})),Eh=d((e=>o(e?.item?.href?Fh:Uh,{...e}))),Fh=d((e=>{const t=xe(),n=r((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:l,...a}=t({...e.item,onClick:n});return o(Oh,{...e,tag:"a",item:a,onClick:l})})),Uh=d((({item:e={},onClick:t,...n})=>{const l=r((()=>{t&&t(e)}),[t,e]);return o(Oh,{item:e,onClick:l,...n})})),Wh=(e,t,n)=>(l,a)=>o(Eh,{isActive:l===e,onClick:t,type:n,item:l},String(a)),Hh=d((({className:e,tabsType:t="default",items:n=[],activeItem:l,onChange:a})=>o("div",{className:h("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel","aria-label":"Панель управления табами",children:n.map(Wh(l,a,t))}))),Yh={categories:[],extraOptions:[],propertyType:[],stage:[]},Xh=Ot((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:l,...a})=>{const[s,{blocksToRender:d},{field:m,reset:u,update:p}]=_i(Yh,{block:a.block,page:a.options?.page}),x=r(((e=Yh)=>p(e)),[]),f=(({hotFilters:e=Ph,filtrationState:t=Vh,blocks:n=Ph,onFiltrationStateChange:l})=>{const a=i((()=>Math.max(0,e.findIndex((e=>Mh(e.filter,t))))),[e,t]),s=i((()=>e.map((t=>({text:t.text,count:Th(n,t.filter),version:Ih(t===e[a])})))),[e,n,a]),o=r((t=>{l(e[s.indexOf(t)].filter)}),[e,s]);return{activeItem:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:x});return c(g,{className:h("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(Hh,{...f}),o(Ti,{filtrationSchema:n,resetButton:l,field:m,reset:u}),o(ki,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),Kh=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),qh=d((({children:e})=>Kh?e:null)),Gh="/icons/MapMarkerClusterIcon.svg",Zh="/icons/MapMarkerClusterYellowIcon.svg";function Jh({yandexMaps:e,map:t,points:n,isLoad:l}){if(l||!n)return;if(t.geoObjects.removeAll(),!n.length)return;const a=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),r=Qh("offices",e,a);if(n.length&&n.every((e=>"type"in e))){const l=Qh("workplaces",e,a),i=eu(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=eu(n.filter((e=>"offices"===e.type)),"offices",e);r.add(s),l.add(i),t.geoObjects.add(l),t.geoObjects.add(r)}else{const l=eu(n,"offices",e);r.add(l),t.geoObjects.add(r)}t.setBounds(e.util.bounds.fromPoints(n.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const Qh=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?Gh:Zh,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),eu=(e,t,n)=>e.map((({coords:e,content:l})=>new n.Placemark(e,{balloonContentHeader:l?.header,balloonContentBody:l?.body,balloonContentFooter:l?.footer,hintContent:l?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?Gh:Zh,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),tu={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},nu={...tu,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},lu=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(nu).join(" ")} ${n}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.current.geoObjects.add(t.geoObjects)}))},children:o(K,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),au=()=>function(e,t,n=!0){const[r,i]=l(void 0);return a((()=>{let l=!0;return um(e,t).then((e=>{l&&i(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(l=!1,n){const e=document.getElementById(t);e&&document.head.removeChild(e),i(void 0)}}}),[e,t,n]),r}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${z.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1),ru={...tu,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},iu=d((({yandexMaps:e,direction:t="in"})=>{const n="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const n=e.current.getZoom(),l="in"===t?n+1:n-1;e.current.setZoom(l,{checkZoomRange:!0})},className:`${Object.values(ru).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(K,{name:n,width:"20",height:"16"})})})),su=[55.753995,37.614069],ou=d((({points:e,className:t="",zoom:n=5,isLoad:l,selectedAddress:r})=>{const i=s(null),d=s(null),m=au();if(a((()=>{i.current?Jh({yandexMaps:m,map:i.current,points:e,isLoad:l}):m?.ready((()=>{i.current||(i.current=new m.Map(d.current,{center:cu(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),Jh({yandexMaps:m,map:i.current,points:e,isLoad:l})})),i.current&&r&&m?.geocode(r).then((e=>{const t=e.geoObjects.get(0).geometry.getCoordinates();i.current.setCenter(t),i.current.setZoom(18)}))}),[m,e,n,l,r]),!m)return null;const u="z-10";return c("div",{ref:d,className:h("relative","w-full",t),children:[l?o(Ir,{}):null,c("div",{className:h("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",u),children:[o(iu,{yandexMaps:i}),o(iu,{yandexMaps:i,direction:"out"})]}),lu(i,m,h("right-2 top-80",u))]})})),cu=e=>{const t=[mu(du(e,0)),mu(du(e,1))];return t.every((e=>e))?t:su},du=(e,t)=>e.map((e=>e.coords?.[t])),mu=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,hu={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},uu={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},pu={workingSaturday:e=>Boolean("workSchedule"in e&&e.workSchedule?.workingSaturday),premiumService:e=>Boolean("premiumService"in e&&e.premiumService),privateBanking:e=>Boolean("privateBanking"in e&&e.privateBanking),remoteWorkplace:e=>Boolean("workScheduleDescription"in e),serviceDisabledPeople:e=>Boolean("serviceDisabledPeople"in e&&e.serviceDisabledPeople),sellingCoins:e=>Boolean("sellingCoins"in e&&e.sellingCoins),buyingCoins:e=>Boolean("buyingCoins"in e&&e.buyingCoins),bullionOperations:e=>Boolean("bullionOperations"in e&&e.bullionOperations),preciousMetalsOperations:e=>Boolean("preciousMetalsOperations"in e&&e.preciousMetalsOperations),transferringDataToBiometricSystem:e=>Boolean("transferringDataToBiometricSystem"in e&&e.transferringDataToBiometricSystem)},gu="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",xu=d((({filters:e,field:{field:t,reset:n},onlyOffice:l,labels:a})=>{const r=l?5:6,i=(e||[]).map((e=>o(Ql,{text:a[e],...t(e)},e))),[s,d]=r>0?[i.slice(0,r),i.slice(r)]:[i,[]],[m,{toggle:h}]=an(!1);return o("div",{children:e?.length?o("div",{children:c(Or,{children:[c("div",{children:[o("div",{className:gu,children:s}),o(Er,{className:gu,isUnfolded:m,children:d})]}),c("div",{className:"flex space-x-lg",children:[l?o(Ar,{label:m?"Меньше фильтров":"Больше фильтров",isUnfolded:m,embedded:!0,short:!0,onClick:h}):null,c(gr,{embedded:!0,onClick:n,children:[o(jr,{children:"Очистить фильтр"}),o(K,{name:"CloseIcon",size:"small"})]})]})]})}):null})})),fu=(e,t,n)=>{const l=Ih("all"===t),a=Ih("business"===t),r=(e,t,l)=>{const a=e.currentTarget===e.target&&"business"===t?i(l):l;return n(t),a},i=e=>e.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription));return c("div",{className:"flex gap-lg flex-col sm:flex-row pb-lg",children:[o(gr,{"data-id":"all",onClick:t=>r(t,"all",e),version:l,children:"Для физических лиц"}),o(gr,{"data-id":"business",onClick:t=>r(t,"business",e),version:a,children:"Для юридических лиц"})]})},bu=({__html:e,list:t,richVersion:n})=>e||t?.length?c("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?o("div",{className:"mb-2xl",children:o(De,{__html:e,richVersion:n})}):null,t?.length?o("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>c("div",{className:"flex gap-xs items-center",children:[e?.image?o(ae,{image:e.image}):null,e?.text?o($e,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,yu=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(N,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o($e,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),vu=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>pu[t](e)))))},Nu=()=>{},wu=()=>{},ku=e=>"all"===e?"block":"hidden",Su=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:a=[],renderCard:r=wu,renderRemoteWorkplaceCard:s=wu,getBalloon:d=wu,getBalloonRemoteWorkplaces:m=wu,descriptionData:u,title:p})=>{const g=p?.includes("Офис"),[x,{field:f,reset:b}]=hn(hu),{filteredItems:y,points:v,filteredRemoteWorkplaces:N,lengthItems:w}=(({data:e,remoteWorkplaces:t=[],filtrationState:n={},getBalloon:l=Nu,getBalloonRemoteWorkplaces:a=Nu})=>{const[r,s,o,c]=i((()=>{const r=vu(e,n),i=vu(t,n),s=[...r.map((e=>({type:"offices",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:l(e)}))),...i.map((e=>({type:"workplaces",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:a({address:e.address,workScheduleDescription:e.workScheduleDescription})})))].filter((e=>e.coords&&2===e.coords.length));return[r,s,i,r.length+i?.length]}),[e,t,n,l,a]);return{filteredItems:r,points:s,filteredRemoteWorkplaces:o,lengthItems:c}})({data:t,remoteWorkplaces:a,filtrationState:x,getBalloon:d,getBalloonRemoteWorkplaces:m}),[k,S]=l("all");return c("div",{className:h("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[yu(p,w),u?bu(u):null,g&&fu(t,k,S),o("div",{className:h("pb-3xl",ku(k)),children:o(xu,{filters:Cu([...t,...a]),field:{field:f,reset:b},onlyOffice:g,labels:uu})})]}),o("div",{className:"h-[600px]",children:o(qh,{children:o(ou,{points:v,isLoad:n,className:"h-full"})})})]}),c(qh,{children:[y.map(r),N.map(s)]})]})})),Cu=e=>Object.keys(hu).filter((t=>e.filter((e=>pu[t](e))).length)),Iu=e=>e?`${e.charAt(0).toUpperCase()}${e.slice(1)}`:"",Tu={yellow:{border:"border-yellow-light",text:"text-yellow"},green:{border:"border-green-more-light",text:"text-green-dark"},gray:{border:"border-gray",text:"text-secondary-text"},red:{border:"border-error/30",text:"text-error"}},Bu=d((({className:e,children:t,color:n="gray"})=>c("div",{className:h("sm:p-s sm:border sm:border-green rounded-md flex items-center h-fit",Tu[n].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(ae,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o($e,{size:"text-m",color:Tu[n].text,children:t})]}))),Mu=d((({value:e,subText:t,children:n,isPhone:l,...a})=>{const r=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[r.length,n,t].every((e=>!e))?null:Pu({textItems:r,subText:t,children:n,isPhone:l,...a})})),Pu=({label:e,labelSize:t="text-m",textItems:n,subColor:l,subText:a,className:r,children:i,isPhone:s=!1})=>c("div",{className:h("flex gap-2xs flex-col h-full max-w-[300px]",r),children:[e?o($e,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,i||Vu(n,s),a?o($e,{color:l,size:"text-m",children:a}):null]}),Vu=(e,t)=>e.filter(Boolean).map(((e,n)=>o($e,{size:"text-l",children:t?o("a",{href:`tel:${Ru(e)}`,children:e.trim()}):e.trim()},String(n)))),Ru=e=>e.replace(/\D/g,""),zu=d((({className:e,children:t})=>o("div",{className:h("flex flex-col sm:flex-row sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),Du=d((({children:e})=>{const[t,{toggle:n}]=an(!1);return c("div",{children:[o("div",{className:"hidden sm:block",children:e}),c(Or,{className:"block sm:hidden",children:[o(Er,{isUnfolded:t,children:e}),o(Ar,{className:"my-m mr-m border-b border-solid border-main-divider",label:t?"Скрыть":"Подробнее",isUnfolded:t,embedded:!0,onClick:n})]})]})})),_u=({location:e,address:t,billAcceptorType:n,terminalType:l,billAcceptorEnable:a,atmCode:r="",atmAccess:i="",workTime:s},d)=>{const m=[{label:"Устройство",value:Iu(l)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===n?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(i)?"Общедоступный":""},{label:"Регистрационный номер",value:r}];return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o($e,{size:"text-h4",children:Iu(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(K,{name:"GeolocationIcon",width:"24",height:"24"}),o($e,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(Bu,{color:"green",children:Iu(s)})})]}),o(Du,{children:o(zu,{className:"flex-wrap",children:m?.map(((e,t)=>o(Mu,{...e},String(t))))})})]},String(d))},$u=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${Iu(t)} №${n}`,body:e.toUpperCase()}),ju=[];const Lu=async e=>{const t=await Rt(e,{method:"GET"});return Array.isArray(t)?t:ju},Au={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},Ou={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable),locationDisabledPeople:e=>Boolean(e.locationDisabledPeople),designDisabledPeople:e=>Boolean(e.designDisabledPeople)},Eu=d((({descriptionData:e,className:t})=>{const n=Lc(),l=n?.code??"000",{data:a,isLoad:r}=function(e){const{data:t,error:n}=Hn(`${Yt}/atms?regionCode=${e}`,Lu);return{data:t||ju,isLoad:!t&&!n}}(l);return o(Su,{className:t,filterItems:Fu,data:a,isLoad:r,initFilterState:Au,renderCard:_u,getBalloon:$u,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),Fu=(e,t)=>{const n=Object.keys(t).filter((e=>t[e])),l=n.filter((e=>e.startsWith("terminalType"))),a=n.filter((e=>!l.includes(e)));return e.filter((e=>{const t=a.every((t=>Ou[t](e))),n=!l.length||l.some((t=>Ou[t](e)));return t&&n}))},Uu=e=>{const t=Hu(e);return o(Mu,{label:"Режим работы",value:t,className:"max-w-none"})},Wu=({workTime:e="",lunchHour:t="",daysOff:n=""},l=!1)=>e?[`${l?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",Hu=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[Wu({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":l}),Wu({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:l},!0)].filter(Boolean)},Yu=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Xu=e=>Yu.map((([t,n,l])=>({key:t,title:l,short:n,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),Ku=e=>{if(!e)return null;const t=qu(e);return c(zu,{className:"border-none",children:[o(Mu,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(Gu)})}),o(Mu,{label:"Режим работы",className:"max-w-none",children:o($e,{children:e})})]})},qu=e=>{const t=Yu.map((([,e])=>({short:e,status:!0}))),n=e.split("/")??[],l=n[n.length-1]?.toLowerCase();return l?.includes("выходной")?t.map((e=>({...e,status:!l?.includes(e.short.toLowerCase())}))):t},Gu=({short:e,status:t},n)=>o("div",{className:h("w-9 h-9 rounded-md flex items-center justify-center",t?"bg-green-more-light text-green-dark":"bg-error/30 text-error"),children:o($e,{size:"text-xs",children:e})},String(n)),Zu=({currency:e,buyExchangeRate:t,saleExchangeRate:n},l)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Mu,{label:"Валюта",value:e.currency}):null,t?o(Mu,{label:"Купить",value:String(t)}):null,n?o(Mu,{label:"Продать",value:String(n)}):null]},String(l)),Ju=(new Date).getDay(),Qu=e=>{const[t]=e?.slice(Ju-1)??[];if(!t)return null;const{lunchHour:n,status:l,workTime:a,hasLunch:r}=t;return l?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?o(Bu,{color:"green",children:a}):null,n&&r?o(Bu,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(Bu,{color:"red",children:"Выходной"})},ep=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",tp=({title:e,status:t,workTime:n,lunchHour:l,hasLunch:a},r)=>o(Mu,{label:e,value:t&&n?n:"",subText:ep({lunchHour:l,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(r)),np=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,lp=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,ap=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,rp=(e,t)=>{if(!e.workSchedule)return null;const n=Xu(e.workSchedule);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o($e,{size:"text-h4",children:e.name}),e.address?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(K,{name:"GeolocationIcon",width:"24",height:"24"}),o($e,{size:"text-l",children:e.address})]}):null]}),Qu(n)]}),o(Du,{children:ip(e)})]},String(t))},ip=({phone:e,fax:t,phoneBusiness:n,phoneNatural:l,phoneCallCentre:a,phoneCurrencyControl:r,workSchedule:i,exchangeRate:s})=>{const d=Xu(i),m=i?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(zu,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(Mu,{label:"Факс",value:t,isPhone:!0}),o(Mu,{label:"Телефон филиала",value:e,isPhone:!0}),o(Mu,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(Mu,{label:"Обслуживание физических лиц",value:l,isPhone:!0}),o(Mu,{label:"Для консультаций по валютному контролю",value:r,isPhone:!0}),o(Mu,{label:"Контакт-центр",value:a,isPhone:!0})]}),i?.isMatchesPattern?o(zu,{children:o(Mu,{label:m,labelSize:"text-l",className:"w-full max-w-none",children:o("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:d?.map(tp)})})}):c(zu,{children:[o(Mu,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(Gu)})}),Uu(d)]}),i?.businessScheduleVisibleTag?Ku(i?.businessScheduleDescription):null,s?.currencies?.length?o(zu,{className:"flex-wrap",children:s?.currencies?.map(Zu)}):null]})},sp=({name:e="",address:t="",workSchedule:n})=>{const l=(a=e)?`${a?.charAt(0)?.toUpperCase()}${a?.slice(1)}`:"";var a;const r=`${t} ${(e=>{const t=Xu(e),n=e?Hu(t):"",l=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?np(n):ap(n,l):lp(n):""})(n)}`;return{header:l,body:r}},op=({address:e,workScheduleDescription:t},n)=>t?c("div",{className:"bg-white col-span-12 p-3xl sm:border-yellow sm:border",children:[o("div",{className:"sm:flex sm:justify-between",children:c("div",{children:[o($e,{size:"text-h4",children:"Удаленное рабочее место"}),e?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(K,{name:"GeolocationIcon",width:"24",height:"24"}),o($e,{size:"text-l",children:e})]}):null]})}),o(Du,{children:cp(t)})]},String(n)):null,cp=e=>c("div",{children:[c(zu,{className:"flex",children:[o(Mu,{label:"Операции для физических лиц",children:o($e,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(Mu,{label:"Операции для физических лиц",children:o($e,{children:"Оформление и обслуживание банковских карт"})}),o(Mu,{label:"Операции для физических лиц",children:o($e,{children:"Инвестиционное и накопительное страхование"})}),o(Mu,{label:"Операции для физических лиц",children:o($e,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(Mu,{label:"Режим работы",className:"max-w-none",children:o($e,{children:e})})]}),dp=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),mp={branches:[],remoteWorkplaces:[]};const hp=async e=>await Rt(e,{method:"GET"})||mp,up=d((({className:e})=>{const t=Lc(),n=t?.code??"000",{data:l,isLoad:a}=function(e="000"){const{data:t,error:n}=Hn(`${Yt}/branchesAndRemoteWorkplaces?regionCode=${encodeURIComponent(e)}`,hp);return{data:t||mp,isLoad:!t&&!n}}(n);return o(Su,{className:e,data:l?.branches,isLoad:a,remoteWorkplaces:l?.remoteWorkplaces,renderCard:rp,renderRemoteWorkplaceCard:op,getBalloon:sp,getBalloonRemoteWorkplaces:dp,title:`Офисы филиала ${t?.name}`})})),pp=d((({data:e,className:t,...n})=>{const l=e?.dataType??"offices";return o(g,{version:"transparent",className:h(t),defaultPadding:"p-0",...n,children:"offices"===l?o(up,{}):o(Eu,{descriptionData:e})})})),gp=d((({className:e,title:t,description:n="Блок в разработке...",...l})=>c(g,{className:h("box-border",e),...l,children:[o(S,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(x,{})]}))),xp="hidden sm:flex absolute z-40 top-10",fp=Ot((({className:e="",padding:t,slides:n=[],...a})=>{const[r,i]=l(0),[s,d]=di({itemCount:n?.length||0});return c(g,{className:h("box-border overflow-hidden",e),defaultPadding:"pt-6xl",padding:t,...a,children:[o("div",{className:"flex duration-1000",style:{transform:`translateX(-${100*r}%)`},role:"list",children:n.map((({productBlock:e},t)=>o("div",{className:"box-border grow-0 shrink-0 basis-full",role:"listitem",children:o(et,{className:"pl-6xl h-full",headlineVersion:"M",isFullWidthTitle:!1,...e,...a})},String(t))))}),c("div",{className:"relative pr-xs mt-m -mb-m flex gap-xs box-border",children:[o(Zr,{containerRef:s,snapAlign:"snap-start",onVisibleIndicesChange:d.handleVisibleIndicesChange,itemClassName:"h-40 flex items-stretch w-screen",gap:8,children:n.map(bp({activeSlideIndex:r,onClick:i}))}),d.canScrollLeft?o(gi,{className:h("left-6",xp),onClick:d.scrollLeft}):null,d.canScrollRight?o(xi,{className:h("right-6",xp),onClick:d.scrollRight}):null]})]})})),bp=({activeSlideIndex:e,onClick:t})=>({nav:n},l)=>{const a=l===e,r=a?"min-w-[370px] mt-s h-28 bg-white shadow-dark-blue border-none p-6":"min-w-72 mt-lg h-24 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",i=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-secondary-text text-l font-light":"text-secondary-text text-m font-light group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(l),"aria-label":n?.title,className:h("relative overflow-hidden grow","ml-xs px-xl","box-border basis-0 border","border-gray group-data-secondary:border-white/50","text-left whitespace-nowrap",r),children:[o("div",{className:i,children:n?.title}),o("div",{className:s,children:n?.description})]},String(l))},yp=d((({address:e,email:t,telephone:n,button:l,className:a="",__html:r,richVersion:i,icon:s,title:d,version:m="primary",...u})=>c(g,{className:h("box-border text-left space-y-s",a),version:m,...u,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[Ue(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ae,{image:s})}):null,d?o(N,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[r?vp({__html:r,richVersion:i}):null,Np({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Np({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),Np({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),l?.text?We([l]):null]})]}))),vp=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(De,{...e,itemSize:"list-s"})}),Np=({label:e,data:t,iconName:n,dataColor:l=""})=>t?c("div",{className:"flex gap-s",children:[o(K,{iconVersion:"black",name:n,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o($e,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o($e,{size:"text-xl",color:l,children:t})]})]}):null,wp=d((e=>{const{__html:t,richVersion:n="",...l}=e;return o(g,{defaultPadding:"p-0",...l,children:o(De,{__html:t,richVersion:n})})})),kp=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",Sp=Ot((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,foldButtonVersion:l="default",label:a,version:r,role:i,...s})=>{const d=Te(),[m,{toggle:u}]=an(t),p=o(Er,{className:h("gap-lg",kp(d)),isUnfolded:m,children:P({...s,extraProps:{className:"w-full",padding:"p-0"}})}),x="accordion"===l,f=o(Ar,{className:h(x?"text-h6 my-lg":"text-h4"),label:a,isUnfolded:m,embedded:x,onClick:u});return o(g,{className:h("w-full border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:i,...s,children:c(Or,{children:[n?f:p,n?p:f]})})}),{childrenTypes:{exclude:["RollupItem"]}}),Cp=d((({name:e,text:t,value:n,checked:l,onChange:a,className:r})=>o("div",{className:r,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:h(yn.split(" ").filter((e=>"rounded"!==e)),Zl,"flex justify-center items-center after:block after:w-2.5 after:h-2.5 after:rounded-full rounded-full","checked:border-2 checked:!border-primary-main focus:checked:border-primary-main checked:after:bg-primary-main"),type:"radio",value:n,name:e,checked:l,onChange:e=>a?.(e.target.value),role:"radio"}),t?o($e,{color:"text-primary-text",children:t}):null]})}))),Ip=d((({className:e=""})=>{const[t,n]=l("option2"),a=r((e=>n(e)),[]);return c("div",{className:h("order-4",e),role:"radiogroup",children:[o(Cp,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(Cp,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),Tp=d((({data:e,fieldLabel:t,fieldValue:n,selected:l,placeholder:a="",setSelected:r,label:i})=>{const s=e.filter(Boolean).map((e=>({key:e?.[n||t],text:e?.[t]}))),c=s.find((e=>e.key===l));return o(Vn,{options:s,label:i,placeholder:a||l,onChange:e=>r(e.key),value:c})})),Bp=d((({regions:e=[],selectedRegion:t,onSelectedRegion:n,branches:l=[],selectedBranch:a,onSelectedBranch:r})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Tp,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(Tp,{data:l,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:r,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Mp=["От 1 дня","До 365 дней"],Pp=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o($e,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(rl,{min:1,max:365,value:e,items:Mp,onChange:t})]}))),Vp=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:n,safeBoxCases:l=[],selectedBoxSize:a,onSelectedBoxSize:r})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Tp,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(Tp,{data:l,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:r,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Rp=d((({regions:e,selectedRegion:t,branches:n,selectedBranch:l,days:a,selectedCaseVolume:r,selectedBoxSize:i,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:h})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(Bp,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:l,onSelectedBranch:zp(m)}),o(Pp,{days:a,setDays:e=>m({days:e})}),o(Vp,{caseVolumes:d,selectedCaseVolume:r,onSelectedCaseVolume:Dp(m),safeBoxCases:s,selectedBoxSize:i,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o($e,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),c("div",{className:"contents @md:flex justify-between items-center gap-m",children:[o(Ip,{}),o(gr,{className:"order-6",version:"primary",onClick:h,children:"Офисы на карте"})]})]}))),zp=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Dp=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},_p=d((({days:e,tariffs:t=[]})=>{const n=jp(e,t),l="На рисунке изображена пачка листов\nформата А4";return c("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[c("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[$p("Аренда за",e),$p("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:l})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(K,{className:"@xl:h-60",name:"PackA4Icon"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(w,{size:"text-s",font:"font-light",color:"text-white",children:l})})]})]})})),$p=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o($e,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),jp=(e,t)=>{const n=Lp(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},Lp=e=>{let t=1;switch(!0){case e>30&&e<=90:t=2;break;case e>90&&e<=180:t=3;break;case e>180&&e<=365:t=4}return t},Ap=(e,t)=>e.find((e=>e.branchCode===t)),Op=d((e=>{const{regions:t,data:n,branches:l,onChange:r,onClick:i}=e;a((()=>{r({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,r]);const s=Ap(l,n.selectedBranch),d=Ep(s?.safeBoxCaseVolumes),m=Fp(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,h=Up(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(Rp,{...n,regions:t,onClick:i,branches:l,caseVolumes:d,safeBoxCases:m,onChange:r}),o(_p,{days:n.days,tariffs:h})]})})),Ep=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Fp=(e,t)=>e?.find((e=>e.volume===t)),Up=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Wp=`${Yt}/safeboxes`,Hp=[];const Yp=async e=>await Rt(e,{method:"GET"})||Hp,Xp=d((({title:e,footnote:t,className:n="",...a})=>{const[i,s]=l(!1),d=r((()=>s((e=>!e))),[]),[m,h]=l({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),u=Ma(),p=Kp(m.selectedRegion,u),x=function(e){const{data:t}=Hn(e?`${Wp}?regionCode=${e}`:null,Yp);return t||Hp}(p),f=r((e=>h((t=>({...t,...e})))),[h]),b=(y=Ap(x,m.selectedBranch)||x,Array.isArray(y)?y.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):y?.gpsLatitude&&y?.gpsLongitude?[{coords:[y.gpsLatitude,y.gpsLongitude]}]:[]);var y;return c(g,{className:n,defaultPadding:"",...a,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(N,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(Op,{regions:u,branches:x,data:{...m,selectedRegion:p},onClick:d,onChange:f}),t?o(w,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&i?o(ou,{points:b,className:"h-[640px]"}):null]})})),Kp=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,qp=e=>e<4?"w-72":"w-52",Gp={description:"text-white/80 text-l font-light group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconText:"text-white group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconBackground:"bg-white/30 group-data-primary:bg-main-divider",iconConnector:"bg-white group-data-primary:bg-secondary-light",dot:"bg-white/80 group-data-primary:bg-secondary-text"},Zp=d((({buttons:e,className:t="",description:n,showLines:l=!0,steps:a=[],stepVersion:r="gray",title:i,version:s="primary",...d})=>{const m=a.length>3,u=Gp,p=(e=>e?"":"opacity-0")(l),x=Te();return c(g,{className:h("box-border flex flex-col items-center overflow-hidden gap-y-3xl",t),defaultPadding:"p-6xl",version:s,...d,children:[o(S,{headlineVersion:"S",title:i,description:n,isEmbedded:!0,className:"w-full",align:Oi(x)}),a?.length?c("div",{className:"box-border space-y-lg flex flex-col justify-center",children:[o("div",{className:h("flex items-center",m?"px-16":"px-24"),children:Ci(o("div",{className:h("h-0.5 w-full bg-secondary-light flex-1",p)}))(a.map(Jp(u,m,r)))}),o("div",{className:h("flex justify-between",m?"gap-x-s":"gap-x-20"),children:a.map((f={styleMap:u,version:s},(e,t,n)=>{const{styleMap:l,version:a}=f,{label:r,description:i,button:s,isDotted:d}=e;return c("div",{className:h("relative flex flex-col items-center text-center justify-between whitespace-pre-line overflow-hidden space-y-3xl",qp(n.length)),children:[c("div",{className:"space-y-xs",children:[r?o($e,{size:"text-h6",align:"text-center",children:r}):null,c("div",{className:"flex flex-col items-center gap-3xs",children:[i?o("div",{className:l.description,children:i}):null,o(De,{__html:e.__html,itemSize:"list-s",isDotted:d})]})]}),s?.text?o(ke,{className:"box-border py-s w-full mt-auto",version:a,...s,children:s?.text}):null]},String(t))}))})]}):null,We(e)]});var f})),Jp=(e,t,n)=>({icon:l},a)=>{const r="secondary"===n?"white":"color";return o(g,{defaultPadding:"",className:`${Qp(t)} flex justify-center items-center text-center rounded-full box-border z-10`,version:n,children:Ue(l)?o(ae,{image:{...l,iconVersion:l?.iconVersion||r},width:"48",height:"48"}):o("span",{className:h("text-h4","transparent"===n?e.iconText:(i=n,"secondary"===i?"group-data-primary:text-white":"text-secondary-text")),children:a+1})},String(a));var i},Qp=e=>e?"h-16 w-16":"h-24 w-24",eg=d((()=>o("div",{className:"hidden",role:"none"}))),tg="hidden sm:flex absolute z-40",ng={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},lg=d((({className:e,items:t=[],activeItem:n,onChange:l,tabsType:r="default"})=>{const[i,s]=di({itemCount:t?.length||0});return a((()=>ag(i.current,t,n)),[]),c("div",{className:h("relative overflow-x-auto no-scrollbar",e),children:[o(Zr,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:ng[r].item,gap:ng[r].gap,children:t.map(Wh(n,l,r))}),s.canScrollLeft?o(gi,{className:h("left-6",tg,ng[r].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(xi,{className:h("right-6",tg,ng[r].buttonTop),onClick:s.scrollRight}):null]})})),ag=(e,t,n)=>{const l=t.findIndex((e=>e===n));e&&l>0&&e.scrollTo({left:e?.children[l]?.offsetLeft,behavior:"smooth"})},rg={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},ig=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:h(rg[t].wrapper,e),children:o(lg,{className:rg[t].component,tabsType:t,...n})}):null,sg=Ot((({className:e="",tabs:t=[],block:n,tabsType:i,showCounter:s=!1,isSticky:d=!1,...m})=>{const u=og(n??{}),p=V(),x=t.every((e=>"link"===e?.type)),f=s?t.map((e=>({...e,count:"group"===e?.type?n?.slots?.[e?.tabName??""]?.length??0:0}))):t,{isReady:b}=p,[y,v]=l(mg(f,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(u))),N=f[y],w=f.findIndex((e=>Boolean(e.selected)));a((()=>{const e=p.query[u]?f.findIndex(((e,t)=>"group"===e.type&&(e?.tabName??String(t))===p.query[u])):w;v(-1===e?0:e)}),[b,w,u]);const k=dg(f[y],y),S=r((e=>{const t=f.indexOf(e),n=f[t];v(t),"group"===n.type&&((e,t)=>{const n=new URLSearchParams(p.query);e.text?n.set(u,e?.tabName??String(t)):n.delete(u),p.replace(`${p.pathname}?${n}`,"",{scroll:!1})})(e,t)}),[f]);return c(g,{className:h({"sticky top-1 z-20":d&&x},e),defaultPadding:"p-0",block:n,...m,children:[ig({className:h({"pb-1":n?.slots&&"default"===i,"sticky top-1 z-20":d&&!x}),items:cg(t,f),activeItem:N,tabsType:i,onChange:S}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:Object.entries(n?.slots??{}).map((([e,t])=>M(t,{...m?.options,slotName:k,parent:n,extraProps:{className:e===k?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(dg)?.filter(Boolean)||[]}),og=({__id:e,anchor:t})=>t??e??"tabs",cg=(e,t)=>t?.length?t:e,dg=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",mg=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),hg={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},ug=d((({children:e,activeIndex:t,columnWidth:n,version:l="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:hg[l],style:{transform:`translateX(-${t*n}px)`},children:e})}))),pg=d((({className:e="",isOpen:t,onClick:n})=>o(Ar,{className:e,label:t?"Скрыть":"Показать",isUnfolded:t,version:"secondary",short:!0,onClick:n}))),gg={Buttons:({buttons:e})=>We(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ae,{image:e}):null,RichText:({__html:e,isDotted:t=!0})=>o("div",{className:"flex flex-col justify-between items-start text-h6",children:o(De,{__html:e,isDotted:t,itemSize:"list-m"})}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o($e,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o($e,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:n,pdfUrl:l,isOpen:a})=>e?o(pg,{className:"w-fit",isOpen:a,onClick:()=>{t({tableSource:n,pdfUrl:l})}}):null},xg=d((({cell:e,fieldIdx:t,rowIdx:n,cellIdx:r,setTableInner:i,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=l(!0);a((()=>{r===o&&s||m(!0)}),[s,o]);return fg({cell:e,cellProps:{rowIdx:n,cellIdx:r,fieldIdx:t,displayTable:e=>{m(!1),c(r),i(e)},isVisible:d}})})),fg=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...l}=e;if(!n||!(n in gg))return null;return o(gg[n],{...t,...l})},bg=d((({cells:e,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:r,setOpenTableInnerIdx:i})=>o("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>o(xg,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:r,setOpenTableInnerIdx:i},String(s)))):null}))),yg=(e,t)=>140*Ld(e.slice(0,t).map((e=>e?.cols?.length??1))),vg=(e,t)=>e?.length>0?o("div",{className:h("flex",{"text-secondary-text":0===t}),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o($e,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,Ng=d((({rows:e})=>{const t=e?.[0]?.length??0,[n,l]=Zm({itemCount:t,visibleItemCount:5});return c("div",{children:[e?.map((a=n,(e,t)=>{if(!e?.length)return null;const[n,...l]=e,r=h("flex duration-1000 text-center",0!==t?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[n?.data?o("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:o($e,{size:"text-xl",font:"font-light",children:n.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:r,style:{transform:`translateX(-${yg(l,a)}px)`},children:l?.map(((e,t)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o($e,{size:"text-xl",children:e.data}):null,e?.cols?vg(e.cols,a):null]},`row${t}`)))})})]},String(t))})),Jm({...l,btnClass:["left-3 top-20","right-3 top-20"],className:""})]});var a})),wg=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,n)=>{const l=`activeTabIdx:${e}-tableIdx:${n}`;return c("div",{className:"w-full @container",children:[o("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:o($e,{size:"text-xl",align:"text-left",children:t.title})}),o("div",{className:"w-full sm:pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:o("div",{className:"relative",children:o(Ng,{rows:t.rowsData})})})]},l)}))}))),kg=(e=!1)=>""+(e?"text-white":"text-secondary-text"),Sg=d((({currencies:e,linkToPDF:t,activeTabIndex:n,setActiveTabIndex:l})=>c("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?o("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>o("div",{className:h("rounded-md px-4 py-3 cursor-pointer",{"bg-primary-main":t===n}),onClick:()=>l(t),children:o($e,{size:"text-xl",font:"font-light",color:kg(t===n),children:e||t+1})},e)))}):null,t?o(ke,{className:"text-primary-main",href:t,version:"secondary",target:"_blank",appendLeft:o(K,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),Cg=Ot((({tableSource:e,pdfUrl:t,onClick:n})=>{const a=e?.tableData,[i,s]=l(0),d=r((e=>s(e)),[]),m=a?.[i]?.items??[],h=a?.map((e=>e.currency??""));return c("div",a?{className:"bg-white z-10",children:[o(Sg,{currencies:h,activeTabIndex:i,setActiveTabIndex:d,linkToPDF:t}),o(wg,{activeTabIndex:i,items:m}),o(pg,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o($e,{size:"text-h6",children:"Данных нет"}),o(pg,{onClick:n,isOpen:!0})]})})),Ig=d((({children:e,tableInner:t,onHideContentClick:n})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:h("@4xl:border-main-divider @4xl:border-b","flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg"),children:e}),t?o("div",{className:"origin-top animate-expansion",children:o(Cg,{...t,onClick:n})}):null]}))),Tg=d((({row:{header:e,data:t},activeIndex:n,rowIdx:a,...i})=>{const[s,d]=l(void 0),m=r((e=>d(e)),[]),[u,p]=l(void 0),g=r((e=>p(e)),[]);return c(Ig,{onHideContentClick:()=>d(void 0),tableInner:s,...i,children:[o("div",{className:h("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(ae,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o($e,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(ug,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(bg,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:u,setOpenTableInnerIdx:g,...i},String(t))))}):null]})})),Bg=d((({children:e,controls:t})=>{const{isScrollAvailable:n}=t;return c("div",{role:"table",className:"overflow-x-auto w-auto grid md:block",children:[c("div",{className:"relative space-y-xs",children:[e,Jm({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),n?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),Mg=d((({className:e="",title:t,description:n,rowHeaders:l,tariffsColumns:a,hiddenRowsNum:r=0,...i})=>{const s=a?.map((({data:e})=>e))||[],d=l?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),m=s.length,[u,p]=Zm({itemCount:m,visibleItemCount:2}),x=(d||[]).map(((e,t)=>o(Tg,{row:e,activeIndex:u,rowIdx:t,...i},String(t)))),[f,b]=r>0?[x.slice(0,-r),x.slice(-r)]:[x,[]],[y,{toggle:v}]=an(!1);return c(g,{className:h("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...i,children:[o(S,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:r>0?c(Or,{children:[c(Bg,{controls:p,children:[f,o(Er,{isUnfolded:y,children:b})]}),o(Ar,{className:"text-h4",isUnfolded:y,onClick:v})]}):o(Bg,{controls:p,children:x})})]})})),Pg=d((({className:e="",title:t,description:n,iconVersion:l,__html:a,richVersion:r,...i})=>c(g,{className:h("flex gap-s sm:gap-m group-data-secondary:bg-primary-main/10",e),...i,children:["small"===l?Vg():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o($e,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?Rg(n):null,a?o(De,{richVersion:r,__html:a}):null]})]}))),Vg=()=>o("div",{className:"rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),Rg=e=>o(w,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),zg=d((({prefix:e,unit:t,suffix:n})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o($e,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,n?o("div",{className:"gradient-color-text",children:o($e,{size:"text-h2",children:n})}):null]}))),Dg=d((e=>{const{prefix:t,unit:n,suffix:l,...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(zg,{prefix:t,unit:n,suffix:l})})})),_g=Ot((({className:e="",padding:t="p-0",gap:n="",isInnerPadding:l=!0,version:a="transparent",isTheme:r=!1,isCardBorder:i=!1,image:s,...c})=>{const d=V();return o(g,{className:h("relative flex flex-col",Km[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${Q(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:r,...c,children:P({...c,extraProps:{className:h("w-full",Wr(i)),...Xm(l)}})})}),{childrenTypes:[]}),$g=e=>(e=>{const t="col-span-",n=e?.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(9),10):12})(e)<10?"py-xl px-6xl":"py-6xl px-32",jg=d((({className:e,title:t,url:n,previewImg:l,...a})=>{const r=V();return c(g,{className:e,defaultPadding:$g(e),...a,children:[o(S,{title:t,headlineVersion:"M"}),n?o("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:W(r)(l?.src),style:{maxHeight:524},controls:!0,children:o("source",{src:W(r)(n)})}):null]})})),Lg={AdTile:Ft,ApplicationForm:Dr,BankAccountFiltration:Li,BenefitsBlock:Ui,BonusBenefitsBlock:Ki,ButtonsBlock:Gi,CalculatorBonus:ms,CalculatorBusinessDeposit:Bs,CalculatorCredit:Us,CalculatorDeposit:so,CalculatorRefinancing:xo,CardTransfer:zo,Carousel:Eo,CarouselCard:Ho,CarouselCatalogCard:Xo,CarouselLinks:Go,CarouselRecommendationCard:ac,CarouselTariffsCard:oc,ContactsBlock:cc,DepositFiltration:xc,Depository:Rc,ErrorBlock:Dc,ExchangeRateTile:ud,Footer:Jd,GracePeriod:Qd,GrantSupport:lm,Header:Wm,Headline:S,HorizontalLayout:qm,ImgBlock:Gm,InsuranceAmountBlock:lh,InvestmentInfo:sh,LinkDocs:Nh,MobileAppTile:Ch,MortgageFiltration:Xh,OfficesAtmsMap:pp,Placeholder:gp,ProductBlock:Et,ProductGallery:fp,RepresentativeOfficeInfo:yp,RichTextBlock:wp,RollupItem:Sp,SafeDepositRental:Xp,StepsBlock:Zp,StickyBottomMenu:eg,TabsLayout:sg,TariffsTable:Mg,TextBlock:Pg,UnitBlock:Dg,VerticalLayout:_g,Video:jg},Ag=me((()=>{a((()=>{tn()}),[]);const e=ln();gn(globalThis,"click",(e=>t=>{const n=t.target?.closest("[data-aspects]");try{const l=JSON.parse(n?.dataset?.aspects??"[]");Jt({aspectsAttributes:l,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))})),Og="cookie",Eg=d((({__html:e})=>{const[t,{setTrue:n,setFalse:l}]=an();_d((()=>{globalThis.localStorage?.getItem(Og)||n()}),[],3e3);const a=r((()=>{globalThis.localStorage?.setItem(Og,"true"),l()}),[]);return t&&e?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",role:"dialog",children:c("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[o("div",{className:"sm:flex-1",children:o(De,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o(xr,{className:"bg-main-gray rounded-md w-11 h-11",onClose:a})})]})}):null}));function Fg(e){const t=r((({key:t})=>{"Escape"===t&&e()}),[e]);gn(globalThis.document,"keydown",t)}function Ug(e,t,n){a((()=>e.subscribe(t,(e=>{const t=e?.type;if(t&&"string"==typeof t){const l=n[t];l&&l(e)}}))),[e,t,...Object.values(n)])}const Wg=()=>{const[e,{push:t,pop:n,clear:a}]=function(e=[]){const[t,n]=l(e),a=r((e=>n((t=>[...t,e]))),[]),i=r((()=>n((e=>e.slice(0,-1)))),[]),s=r((e=>n((t=>t.filter((t=>t!==e))))),[]),o=r((()=>n([])),[]);return[t,{setList:n,push:a,pop:i,remove:s,clear:o}]}();return Ug(pe.observable,"dialog",{open:t,close:n,closeAll:a}),[e,{close:n,closeAll:a}]},Hg=d((()=>{const[e,{close:t}]=Wg(),n=Boolean(e.length);return Fg(t),a((()=>{n?globalThis.document?.body.classList.add("no-scrollbar","overflow-hidden"):globalThis.document?.body.classList.remove("no-scrollbar","overflow-hidden")}),[n]),n?o("div",{className:"fixed inset-0 z-50",children:e.map((({dialog:t,id:n},l)=>o("div",{className:h("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50",{hidden:l!==e.length-1}),children:t},String(n||l))))}):null})),Yg=d((()=>{const[e,t]=l(null),n=r((()=>{t(null)}),[]);return Ug(pe.observable,"popup",{open:t,close:n}),Fg(n),e?o("div",{className:h("z-50",e.fixed?"fixed":"absolute"),style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",title:"Всплывающее окно",children:e.popup}):null})),Xg="header",Kg="footer",qg="sticky-footer",Gg={},Zg=d((({className:e,data:t=Gg,blocksRegistry:n,blockDecorator:l})=>{const{slots:a,blocks:r,fallback:i,...s}=t,d=Lt(s,i);Ag(),Ac();const m={key:"",page:{slots:a,blocks:r,fallback:i,...d},blocksRegistry:n,blockDecorator:l,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:h("@container relative",t.style,e),children:[a?.[Xg]?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:M(a?.[Xg],{...m,slotName:Xg})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[P({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),M(a?.[Kg],{...m,slotName:Kg})]})]}),a?.[qg]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:M(a?.[qg],{...m,slotName:qg})}):null,o(Hg,{}),o(Yg,{}),o(Eg,{__html:d?.cookieContent?.__html})]})}));Object.assign(Zg,{childrenTypes:[],slots:()=>[Xg,Kg,qg]});e.Blocks=Lg,e.ContentPage=Zg,e.handlerDecorator=me,e.joinList=Ci,e.locationNavigator=Qt,e.packageVersion="0.14.770",e.projectSettings=z,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=O,e.useRouter=V,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),l=n("useState"),a=n("useEffect"),r=n("useCallback"),i=n("useMemo"),s=n("useRef"),o=(...e)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=e=>{function t(t,n){const{children:l,...a}=t||{},r=n?.slots?.default,i=l||r&&r();return e(Object.assign(a,i&&{children:i}),n)}return t.inheritAttrs=!1,t},h=(...e)=>e.map((e=>u(e)?Object.entries(e).filter((([,e])=>e)).map((([e])=>e)):e)).flatMap((e=>e)).filter(Boolean).join(" "),u=e=>Boolean(e&&"object"==typeof e&&!Array.isArray(e)),p={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},g=d((({className:e,version:t="primary",isTheme:n=!0,defaultPadding:l="p-xl",padding:a,block:r,tag:i="section",role:s,children:c,style:d})=>{const m=t&&n;return o(i,{className:h("@container font-sans",{group:m},p[t],a||l,e),...m?{"data-ver":t}:{},...r?.anchor?{id:r.anchor}:{},role:s,style:d,children:c})})),x=d((({className:e,size:t})=>o("figure",{className:h("m-0 mt-xl min-w-[80%]",e),children:f(t)}))),f=(e=3)=>y(100,e).map((e=>Math.floor(e))).map(b),b=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),y=(e,t)=>[e].concat(t>0?y(e/1.618,t-1):[]),v={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},N=d((({className:e="",headingType:t="h3",as:n="h3",title:l,children:a})=>o(n,{role:"heading",className:h("font-sans m-0",v[t],e),children:l||a}))),w=d((({children:e,...t})=>o("p",{className:h("font-sans",Object.values(t)),children:e}))),k={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},S=d((({className:e,version:t="",headlineVersion:n="XL",title:l,description:a,align:r="text-center",as:i,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const u=k[n],p={marginTop:u.descriptionStyle};return c(g,{className:h({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[l?o(N,{className:h("whitespace-pre-wrap",r),...u?.title,as:i||u?.title.as,title:l}):null,a?o(w,{size:u.descriptionSize,font:u.descriptionWeight,align:r,...p,children:a}):null]})})),C=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),I=[];function T(e,t,{className:n,...l}={}){const{key:a,blockDecorator:r=C,blocksRegistry:i={},ancestors:s=I}=t,{type:c}=e;c&&c in i||console.warn(`No block with "${c}" is registered`);const d=c&&i[c];return r({blockClassName:h(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:r})=>{const{content:i}=n;return d?o(d,{className:r,block:e,options:t,...i,...l},a):null}},a)}const B=[],M=(e,{key:t,ancestors:n=B,slotName:l=null,extraProps:a,renderProps:r=T,...i})=>{const s=a?(e,t)=>T(e,t,a):r;return(e||[]).map(((e,a)=>s(e,{...i,key:`${t||e.type}-${a}`,ancestors:i.parent?[...n||B,[i.parent,l]]:n},a)))};function P({block:e,options:t,children:n,extraProps:l,renderProps:a}){return n||(e&&t?M(e.blocks,{...t,parent:e,extraProps:l,renderProps:a}):null)}function V(){return V._impl()}V._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),V.setup=e=>{V._impl=e};const R=["CDN","BASE_PATH"],z=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return R.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),D=e=>Boolean(e?.includes(":")),_=(e,t)=>Boolean(e&&!D(e)&&(!t||"_self"===t)),$=e=>Boolean(e?.startsWith("#")),j=e=>(e??"").replace(/\?.*/,"").replace(/\/$/,""),L=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),A=e=>t=>Boolean(e&&t&&e.startsWith(t)&&("/"===t||e===t||"/"===e[t.length]));var O=Object.freeze({__proto__:null,isURL:D,isLocalURL:_,isHash:$,withoutQuery:j,joinPath:L,hasPrefix:A});const E="/api/",F=`${E}v1/storage`,U=[z.CDN,E],W=e=>(t,n)=>{if(H(t))return t;if(((e="")=>/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(e))(t))return`${F}/${t}/attachment`;const l=t?.startsWith("/");return L(A(t)(n)?"":n,l?"/":(a=e.pathname,a?.split("/").slice(0,-1).join("/")),t);var a},H=e=>!e||D(e)||$(e)||U.some(A(e)),Y={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},X={small:"16",medium:"24",large:"48",xl:"78"},K=d((({className:e="",imageClassName:t="",name:n="",alt:l=`Иконка ${n}`,title:a=l,iconVersion:r="color",size:i,width:s=i&&X[i],height:d=s})=>{const m=V(),u="normal"===r?`${n}.svg`:`sprites.svg#${n}`,p=W(m)(L(z.CDN,"/icons/",u));return"normal"===r?o("img",{className:e,style:q(e,d),src:p,alt:l,title:a,"aria-hidden":"true",width:s,height:d}):o(G,{className:e,children:c("svg",{className:h(Y[r],{"w-full h-full":!s,invert:"white"===r},t),width:s,height:d,"aria-hidden":"true",children:[a?o("title",{children:a}):null,l?o("desc",{children:l}):null,o("use",{href:p,xlinkHref:p})]})})})),q=(e,t)=>{return e?.includes("h-")?{}:{height:(n=t,n&&!/\D/.test(n)?`${t}px`:t),width:"auto"};var n},G=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),Z=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function J(e=""){try{return new URL(e).pathname}catch(e){return""}}const Q=e=>t=>{const n=t?.startsWith("/wcms-resources")?"":J(Z.SITE_URL);return t&&!D(t)?W(e)(t,n):t},ee=(e,t)=>e?.media&&t?.media?e.media-t.media:0,te=d((({className:e="",image:t,imageClassName:n=""})=>{const l=V();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(ee).map((({src:e,format:n,media:a},r)=>o("source",{srcSet:Q(l)(e),type:le(n),media:a?`(max-width: ${a}px)`:"",width:t?.size?.width,height:t?.size?.height},`${r}_${e}`))):null,t?.src?ne({...t,src:Q(l)(t.src)},n):null]})})),ne=(e,t="")=>o("img",{src:e.src,className:h("object-contain",t),alt:e?.alt||e?.title||"",title:e?.title||"",style:{width:e?.size?.width?`${e.size?.width}px`:"100%",height:e?.size?.height?`${e.size?.height}px`:"auto"},width:e?.size?.width,height:e?.size?.height}),le=e=>e?`image/${String(e)}`:void 0,ae=d((({className:e="",image:t,imageClassName:n="",...l})=>t?.src||t?.icon?t.icon?o(K,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...l}):o(te,{className:e,imageClassName:n,image:t}):null)),re={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},ie="bg-main-divider text-main-disabled",se={primary:ie,secondary:ie,white:ie,link:"",transparent:"",gray:ie,"":""},oe="text-center font-sans select-none",ce={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"text-primary-main",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},de=({className:e,rounded:t,version:n})=>[oe,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",n?re[n]:"",t?"rounded-full":"rounded-md",e].join(" "),me=e=>me._impl(e);function he(e,t){const n=s({});return i((()=>new Proxy({},{get:(l,a)=>(n.current||={},n.current[a]||=n=>e.fire(t,{...n??{},type:a}),n.current[a])})),[e,t])}me._impl=e=>e,me.setup=e=>{me._impl=e};class ue{watchers=new Set;subscribersMap={};subjectsStateMap={};emitter=this;observable=this;watch(e){return this.watchers.add(e),()=>{this.watchers.delete(e)}}subscribe(e,t){this.subscribersMap[e]||=new Set,this.subscribersMap[e]?.add(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.subscribersMap[e]?.delete(t)}}fire(e,t){e in this.subjectsStateMap?this.subject(e,t):this.fireSubscribers(e,t)}subject(e,t){return this.subjectsStateMap[e]!==t&&(this.subjectsStateMap[e]=t??void 0,this.fireSubscribers(e,t)),()=>{delete this.subjectsStateMap[e]}}fireSubscribers(e,t){for(const n of this.subscribersMap[e]??[])n(t??null);for(const n of this.watchers)n({type:e,event:t??null})}}const pe=new ue,ge=()=>he(pe.emitter,"dialog");function xe(){const e=V(),{closeAll:t}=ge();return n=>{const l=W(e)(n.href);return{...n,href:l,"aria-label":n.text,onClick:me((a=>{n.onClick?.(a);const r=J(Z.SITE_URL);fe(l,n.target,r)&&(t(),a?.preventDefault(),e.push(((e,t="")=>e?.replace(t,"")||"/")(l,r)))}))}}}const fe=(e,t,n)=>_(e,t)&&!Z.SUB_PORTALS?.split(",")?.some(A(e))&&A(e)(n||"/"),be=e=>{try{return Array.isArray(e)&&e.length?{"data-aspects":JSON.stringify(e)}:{}}catch(e){return{}}},ye=d((e=>{const{text:t,aboveText:n,appendLeft:l,appendRight:a,version:r="primary"}=e,i=Ne(e)&&"hidden lg:block";return c("div",{className:h(ve(e),"flex gap-xs"),children:[l?o("div",{className:h(i,ce[r]),children:l}):null,Ne(e)?c("div",{className:"whitespace-pre",children:[n?o("div",{className:"text-xs font-light text-left",children:n}):null,o("div",{className:"text-left "+(n?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?o("div",{className:h(i,ce[r]),children:a}):null]})})),ve=e=>{const{version:t,aboveText:n,rounded:l}=e;if("link"===t)return"";const a=""+(n?"py-2.5 px-9":"py-4 px-9");return h("group/btn items-center justify-center",Ne(e)?a:"h-12 w-12 m-auto",{"rounded-full":l})},Ne=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),we=({className:e,rounded:t,version:n})=>["inline-block",oe,n?se[n]:"",t?"rounded-full":"rounded-md",e].join(" "),ke=d((({disabled:e,children:t,method:n="LINK",href:l,...a})=>{const i=(({method:e,href:t})=>r((n=>{if("POST"!==e||!t)return;n.preventDefault(),n.stopPropagation();const{origin:l,pathname:a,searchParams:r}=new URL(t||""),i=document.createElement("form");i.setAttribute("method","POST"),i.setAttribute("action",[l,a].join(""));for(const[e,t]of r.entries()){const n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",e),n.setAttribute("value",t),i.appendChild(n)}document.body.appendChild(i),i.submit()}),[e,t]))({method:n,href:l}),s=xe()({onClick:i,href:l,...a}),c=t??o(ye,{...s});return o(e?Ce:Se,{...s,children:c})})),Se=d((({className:e="",href:t,rel:n,target:l,ariaLabel:a,version:r,rounded:i,onClick:s,type:c,data:d,children:m,text:h})=>o("a",{className:de({className:e,version:r,rounded:i}),href:t,rel:n,target:l,"aria-label":a||`Ссылка на ${h}`,role:t?"link":"button",onClick:s,type:c,...be(d),children:m}))),Ce=d((({className:e,ariaLabel:t,version:n,rounded:l,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:we({className:e,rounded:l,version:n}),children:a})));function Ie({version:e,handleClick:t,text:n="Вернуться назад",alwaysVisible:l=!1}){if(!n)return null;const a="primary"===e?"white":"black",r="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:h(l?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:h(de({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",rounded:!0}),r),onClick:t,children:o(ae,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:a}})}),o(ke,{version:"link",className:"group-data-secondary:text-white",text:n,ariaLabel:n,onClick:t,type:"button"})]})}const Te=()=>{const[e,t]=l(false);return a((()=>{const e=globalThis.matchMedia?.("(max-width: 1024px)"),n=()=>{t(Boolean(e?.matches))};return e?.addEventListener("change",n),e?.matches&&t(!0),()=>{e?.removeEventListener("change",n)}}),[]),e},Be={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Me=(e,{className:t,imageAlign:n})=>e?o("div",{className:h("shrink-1/2 justify-self-center",n&&Be[n],t),children:e}):null,Pe=d((({className:e,version:t="primary",defaultPadding:n,padding:l="",title:a,buttons:i,leftImage:s,rightImage:d,imageAlign:m,insetTitle:u,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:x,children:f,...b})=>{const y=Te(),v=V(),N=r((()=>v.back()),[]),w=b.options?.page?.common?.backwardButton,k=x&&!y;return c("div",{className:h("relative flex flex-col gap-3xl overflow-hidden",l||n,e),children:[k&&Ie({version:t,handleClick:N,text:w}),a?o("div",{className:"relative h-full",children:a}):null,c("div",{className:h("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Me(s,{imageAlign:m,className:"mx-auto"}),c("div",{className:h("grid gap-3xl items-center md:items-stretch",{"@xl:grid-cols-2 auto-cols-fr":d,grow:!s},"h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[u,f]}),Re(P({...b,extraProps:{className:"@container-normal"}})),Me(d,{className:h("@xl:justify-self-end @xl:col-start-2",{[Ve(p)]:i,"col-start-2 self-center":p,"hidden @xl:block":g}),imageAlign:m}),i?o("div",{className:"self-end",children:i}):null]})]})]})})),Ve=e=>h(e?"row-span-2":"@xl:row-span-2"),Re=e=>e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,ze=(e,t="normal")=>e?.icon||e?.src?o("div",{className:h("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:o(ae,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,De=d((({__html:e="",richVersion:t="",itemSize:n="list-m",isDotted:l=!0,children:a})=>e||a?o("div",{"data-component":"rich-text-container",children:o("div",{className:h(t,n,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",l?"":"without-dots"),dangerouslySetInnerHTML:e?{__html:e}:void 0,children:a})}):null)),_e=(e,t)=>e?o(w,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,$e=d((({children:e,...t})=>o("span",{className:h("font-sans",Object.values(t)),children:e}))),je=(e,t)=>e?o($e,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Le=(e,t)=>["label"in e?je(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:_e(e.description,t)},String(t)):null,"__html"in e?o(De,{...e},`rte-${t}`):null],Ae=d((({className:e,benefitsVersion:t,...n})=>c("div",{className:h("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in n?ze(n.icon,t):null,o("div",{children:Le(n)})]}))),Oe=d((({className:e,benefitsVersion:t="normal",benefits:n})=>n?.length?o("div",{className:h("flex gap-x-m gap-y-s flex-col",e),role:"list",children:n.map(((e,n)=>o(Ae,{benefitsVersion:t,...e},String(n))))}):null)),Ee=d((({className:e,benefits:t})=>t?.length?o("div",{className:h("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(Le)}):null)),Fe=d((({isTabularBenefits:e,...t})=>o(e?Ee:Oe,{...t}))),Ue=e=>Boolean(e?.src||e?.icon),We=(e,{className:t,buttonClassName:n,isVertical:l}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:h("flex",l?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m w-full @lg:w-auto",t),role:"group",children:e.map(He(n))}):null,He=(e="")=>(t,n)=>{const{text:l,icon:a,iconRight:r,version:i,...s}=t||{},c=Ye(a,i),d=Ye(r,i);return l||a?.icon?o(ke,{className:h("basis-full @lg:basis-auto",e),appendLeft:Xe({...a,iconVersion:c}),appendRight:Xe({...r,iconVersion:d}),version:i,text:l,...s},n?String(n):""):null},Ye=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},Xe=e=>Ue(e)&&o(ae,{image:e,width:String(e?.size?.width||24),height:String(24)}),Ke=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),qe=d((({priceList:e})=>e?.length?o("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",role:"list",children:e.map(Ge)}):null)),Ge=({label:e,amount:t,unit:n},l)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o($e,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?c("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[Ke(2)(t)," ",n||"₽"]}):null]},String(l)),Ze=d((({className:e,tags:t})=>t?.length?o("div",{className:h("flex flex-wrap gap-xs",e),role:"list",children:t.map(Je)}):null)),Je=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o($e,{size:"text-m",font:"font-light",children:e})},String(t)),Qe={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},et=d((({className:e,padding:t,defaultPadding:n,title:l,description:a,headlineVersion:r="L",align:i="text-left",benefitsVersion:s,isTabularBenefits:d,isDotted:m=!0,benefits:h,__html:u,richVersion:p,isFullWidthTitle:g,priceList:x=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:C,children:I,...T})=>{const B=y?.src?o(ae,{image:y}):null,M=o(S,{title:l,description:a,headlineVersion:r,align:i,isEmbedded:!0}),P=h?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(Pe,{className:e,padding:t,defaultPadding:n,...g?{title:M}:{insetTitle:M},...tt(B,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:We(b),backwardButton:C,...T,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[P?.length?o(Fe,{benefitsVersion:s,isTabularBenefits:d,benefits:P}):null,u?o(De,{richVersion:p,__html:u,isDotted:m,itemSize:Qe[r]}):null,I,x?.length?o(qe,{priceList:x}):null,nt(f)]})})})),tt=(e,t)=>t?{rightImage:e}:{leftImage:e},nt=e=>e?.length?o(Ze,{tags:e}):null;class lt{_;constructor(e){this._=e}of(e){return new this.constructor(e instanceof lt?e._:e)}filter(e){return this.from(this.entries().filter(e))}map(e){return this.from(this.entries().map(e))}flatMap(e){return this.from(this.entries().flatMap(e))}reduce(e,t){return this.entries().reduce(e.bind(this),t)}}const at=()=>!0,rt=(e,t)=>(...n)=>e(...n)&&t(...n),it=(...e)=>(...t)=>{const[,n]=function(e){if(!e)throw new Error("Value should be fulfilled");return e}(e.find((([e])=>e(...t))));return n(...t)};const st=e=>Boolean(e&&Array.isArray(e)),ot=e=>Boolean(e&&"object"==typeof e&&!st(e)),ct=e=>e;function dt(e){return e instanceof lt?e._:e}class mt extends lt{from(e){return this.of(e.map(((e=ct)=>([,t])=>e(t))(dt)))}entries(){return(this._??[]).map(((e,t)=>[t,this.of(e)]))}size(){return this._?.length??0}get(e){return this.of("number"==typeof e?this._?.[e]:void 0)}set(e,t){return this.of(st(this._)?Array.from({length:Math.max(this._.length,Number(e)+1)},((n,l)=>l===e?t:this._[l])):Array.from({length:Number(e)+1},((n,l)=>l===e?t:void 0)))}}class ht extends lt{from(){return this}entries(){return[]}size(){return 0}get(e){return this.of(void 0!==e?void 0:this._)}set(e,t){return this.of(t)}}class ut extends lt{from(e){return this.of(Object.fromEntries(e.map((([e,t])=>[e,dt(t)]))))}entries(){return Object.entries(this._??{}).map((([e,t])=>[e,this.of(t)]))}size(){return Object.keys(this._??{}).length}get(e){return this.of("string"==typeof e?this._?.[e]:void 0)}set(e,t){return this.of({...this._,[e]:t})}}class pt extends lt{proto=it([e=>st(this._)||"number"==typeof e,()=>mt.prototype],[e=>ot(this._)||"string"==typeof e,()=>ut.prototype],[at,()=>ht.prototype]);from(e){return this.proto(void 0).from.call(this,e)}entries(){return this.proto(void 0).entries.call(this)}size(){return this.proto(void 0).size.call(this)}get(e){return this.proto(e).get.call(this,e)}set(e,t){return this.proto(e).set.call(this,e,t)}}const gt=e=>e instanceof lt?e:new pt(e),xt=e=>{const t=(t,...n)=>dt(e(gt(t),...n));return t.fn=e,t},ft=[],bt=e=>e instanceof Function?e:t=>e===t,yt=e=>(t,n,l=ft)=>gt(t).entries().reduce(((t,[n,a])=>yt(e)(a,t,l.concat(n))),e(n,[l,gt(t)])),vt=xt(((e,[t,n])=>{const[l,...a]=t;return e.set(l,a.length?vt(e.get(l),[a,n]):n)})),Nt=xt(((e,t)=>t.reduce(vt.fn,e))),wt=e=>yt(((e,[t,n])=>kt(n)?[...e,[t,dt(n)]]:e))(e,[]),kt=e=>0===e.size();xt(((e,t=ft)=>t.reduce(((e,t)=>e.get(t)),e)));const St=xt(((e,[t,...n])=>n.length?e.set(t,St(e.get(t),n)):e.filter((([e])=>e!==t)))),Ct=(It=["$ref"]).map(((e,t)=>n=>bt(e)(n[t+n.length-It.length]))).reduceRight(rt,at);var It;const Tt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(Bt,e),Bt=it([st,(e,t)=>e[parseInt(t,10)]],[ot,(e,t)=>e[t]],[at,ct]),Mt=(e,t)=>((e,t={})=>n=>Nt(t,wt(n).map((t=>e(t)))))((([e,n])=>{return Ct(e)?[(l=e,l.slice(0,-1)),Tt(t(n),n)]:[e,n];var l}))(e),Pt=e=>wt(e).filter(((e=ct)=>([t])=>e(t))(Ct)),Vt=e=>{return t=Pt(e).map((([,e])=>e)),[...new Set(t)];var t};async function Rt(e,t){try{return e?await zt(e,t):null}catch(e){console.error(e)}return null}const zt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),Dt=e=>[...new Set(e)],_t={},$t=["/portal-resources"],jt=(e,t)=>Mt(e,(e=>t?.[e])),Lt=(e,t)=>{const n=Vt(e),[r,i]=l({});return a((()=>{At(n).then(i)}),[n.join()]),n.length?jt(e,{...t,...r}):e},At=async(e,t={})=>{if(e.length){const n=await(async e=>Object.fromEntries((await Promise.allSettled(Dt(e).filter((e=>!$t.some((t=>e.startsWith(t))))).map((async e=>[e,_t[e]||=await zt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(e),l={...t,...n},a=Object.entries(n).flatMap((([,e])=>Vt(e)));return a.length?At(a,l):l}return t};function Ot(e,t={}){const n=d((t=>{const n=Lt((({block:e,options:t,className:n,defaultPadding:l,padding:a,isTheme:r,version:i,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...n})}));return Object.assign(n,t),n}const Et=Ot((({className:e,padding:t,defaultPadding:n,...l})=>o(g,{className:h("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:o(et,{defaultPadding:n||"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),Ft=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},n=i((()=>Ut(0,t?.length)),[t]),l=t?.[n];return l?o(Et,{suppressHydrationWarning:!0,...l,...e}):o(g,{...e,children:o(x,{})})})),Ut=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),Wt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const n=String(e.getDate()).padStart(2,"0"),l=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getFullYear());return t?`${a}-${l}-${n}`:`${n}.${l}.${a}`}},Ht=e=>e?.replace(/[^+\d]/g,""),Yt="/api/v1";const Xt=e=>e?{phone:Ht(e)}:{},Kt=(e,t="birthday")=>e?{[t]:Wt(e)}:{},qt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),Gt=(e,t=!0)=>({[t?"email":"mail"]:e}),Zt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:Ht(e)}:{},Jt=({aspectsAttributes:e,aspects:t,ev:n})=>{for(const{aspectName:l,params:a}of e??[])t[l??""]?.(n,a)};function Qt(){return Qt._impl()}Qt._impl=()=>({assign:(e,t)=>{globalThis.open(e,t||"_self")},get origin(){return globalThis.location.origin},get href(){return globalThis.location.href}}),Qt.setup=e=>{Qt._impl=e};const en="rshb-query-params";function tn(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(en)||"";return e&&globalThis.sessionStorage?.setItem(en,e),e}const nn=e=>{const t=e.target?.closest("a"),n=Qt();if(D(t?.href)&&!t?.href?.startsWith(n.origin)){e.preventDefault(),e.stopPropagation();const l=(e=>{const t=tn();if(!D(e)||!t)return e;const n=new URL(e);for(const[e,l]of new URLSearchParams(t))n.searchParams.set(e,l);return n.toString()})(t?.href)||t?.href;l&&n.assign(l,t?.target)}};function ln(){return ln._impl()}function an(e=!1){const[t,n]=l(e),a=r((()=>n(!0)),[]),i=r((()=>n(!1)),[]),s=r((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:a,setFalse:i,toggle:s}]}ln._impl=()=>({forwardQuery:nn}),ln.setup=e=>{ln._impl=e};const rn=e=>t=>t&&Object.entries(e??{}).flatMap((([e,n])=>n?n(t[e]):[]))||[],sn=e=>!e?.length,on=e=>t=>n=>e(n)?[]:[t],cn={},dn=[];const mn=(e,t)=>e&&t&&(e===t||Object.keys({...e,...t}).every((n=>e[n]===t[n])));function hn(e,{resetOnSubmit:t,formValidator:n,normalizer:o,onChange:c,onSubmit:d}={}){const[m,h]=function(e,t,n){const[i,s]=l(e),o=r((e=>s((l=>{const a=e instanceof Function?e(l):e,r=t?t(a):a,i=mn(a,r)?a:r;return!mn(l,i)&&n?.(i),i}))),[t,n]);return a((()=>{t&&s(t)}),[t]),[i,o]}(e,o,c),[u,{setTrue:p,setFalse:g}]=an(!1),x=s({}),[f,{isValid:b,errors:y}]=function(e,t){const n=i((()=>t?.(e)??cn),[t,e]),l=i((()=>rn(n)(e)??dn),[n,e]),a=sn(l);return[n,{isValid:a,errors:l}]}(m,n),v=r(((e,t={})=>{const{parse:n,format:l,onChange:a}=t,r=m[e],i=u||x.current?.[String(e)],s=t?.validator??f[e],o=i&&s?s(r):[];return{value:l?l(r):r,isDirty:i,errors:s&&o,error:o[0],onChange:t=>{x.current||={},x.current[String(e)]=!0;const l=n?n(t):t;a?.(l),h((t=>({...t,[e]:l})))}}}),[m,u,f,h]),N=r((e=>{x.current=e,h(e)}),[h]),w=r((()=>{x.current={},g(),h(e)}),[e,h]),k=r((e=>{e.preventDefault(),b?(t&&w(),d?.(m,e)):p()}),[t,m,b,w,d]);return[m,{errors:y,field:v,update:N,reset:w,onSubmit:k}]}const un=d((e=>{const{className:t,title:n,children:l,...a}=e;return o(g,{className:t,defaultPadding:"p-6xl",...a,children:c("div",{className:"container space-y-lg",children:[n?o(N,{headingType:"h3",title:n,className:"@xl:text-center"}):null,l]})})}));function pn(e,t={}){const{open:n,close:l,...a}=ge();return{open:r(((a,r={})=>n({dialog:o(e,{...t,...a,onClose:()=>{l(),a.onClose?.()}}),...r})),[e,n,l]),close:l,...a}}function gn(e,t,n,l){a((()=>{if(e&&n)return e.addEventListener(t,n,l),()=>{e.removeEventListener(t,n,l)}}),[e,t,n])}function xn(e){const t=s(null),n=r((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return gn(globalThis.document,"click",n),t}const fn=({label:e,errors:t})=>e&&t?`${e}*`:e,bn=()=>{},yn="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",vn=e=>e?o($e,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,Nn=d((({key:e,className:t,id:n,name:l,type:i="text",label:d,placeholder:m,value:u="",valid:p=!0,pattern:g,autoFocus:x=!1,isTextarea:f=!1,disabled:b=!1,children:y,onChange:v,onFocus:N,onBlur:w})=>{const k=s(null),S=r((e=>{const t=(e.target?.value??"").trimStart();v&&v(t)}),[v]);a((()=>{x&&k.current?.focus()}),[x,k]);const C=y?"pr-3xl":"",I=(e=>e?yn:"border-error")(p),T=d??l??n;return c("div",{className:h("relative",t),children:[c("label",{className:"space-y-xs",children:[vn(d),f?o("textarea",{className:h("block resize-y min-h-24",wn,I),id:h("textarea",n),value:u,name:l||n,placeholder:m,disabled:b,"aria-label":T,onChange:S,onFocus:N,onBlur:w},e):o("input",{ref:k,className:h("h-14",wn,C,I),id:n,type:i,value:u,name:l||n,placeholder:m,pattern:g,disabled:b,"aria-label":T,onChange:S,onFocus:N,onBlur:w},e)]}),y]})})),wn="w-full border rounded-md text-primary-text outline-none p-m",kn=e=>o("div",{className:"h-6",children:e?o($e,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Sn=d((({className:e,label:t,value:n="",placeholder:l,error:i,errors:s,onChange:d=bn,onBlur:m,isTextarea:u,type:p,isInteger:g=!1,maxLength:x,disabled:f=!1})=>{const[b,{setFalse:y,setTrue:v}]=an(),N=xn(y),w=r((e=>{!b&&v(),x?e.length<=x&&d(e):d(e)}),[b,d]);return a((()=>{g&&n&&d(Cn(n))}),[n]),c("div",{className:h("shrink-0 w-full",e),ref:N,onBlur:y,onFocus:v,children:[o("div",{children:o(Nn,{disabled:f,type:p||"text","aria-label":t,label:fn({label:t,errors:s}),valid:Boolean(!i),value:n,onChange:w,onBlur:m,isTextarea:u,placeholder:In(l,s,t)})}),kn(i)]})})),Cn=(e="")=>e.replace(/[^\d]+/g,""),In=(e,t,n)=>t&&!n?`${e}*`:e,Tn=e=>e?.text||e?.key||"",Bn=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,Mn=d((({popupRef:e,options:t,value:n,query:l,onChange:a,iconVersion:r})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",ref:e,children:Bn(t,l).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===n?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:Tn(e)}),o(K,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:r,className:h("absolute right-4 pt-3xs",{hidden:e.key!==n?.key})})]},e.key)))}):null));function Pn({isOpen:e,options:t,value:n,query:l,onChange:i,onClose:c,iconVersion:d}){const m=he(pe.emitter,"popup"),h=r((()=>{m.close(),c&&c()}),[c]),u=r((e=>{h(),i&&i(e)}),[h,i]),p=s(null),g=xn(h);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:r,left:i,width:s,height:c}=a.getBoundingClientRect();m.open({popup:o(Mn,{popupRef:g,options:t,value:n,query:l,onChange:u,iconVersion:d}),top:r+window.scrollY+c,left:i,width:s})}),[e,t,n,l,u]),p}const Vn=d((({className:e,label:t,options:n=[],value:a,valid:i=!0,isBorder:s=!0,placeholder:d="",isSearch:m=!1,disabled:u=!1,iconVersion:p="black",onChange:g})=>{const[x,{setFalse:f,setTrue:b}]=an(),[y,v]=l(""),N=Dn(u,n.length),w=x&&!N,k=r((()=>{N||b()}),[N]),S=r((()=>{v(""),f()}),[]),C=Pn({isOpen:x,options:n,value:a,query:y,onChange:g,onClose:S,iconVersion:p});return c("div",{className:h("space-y-xs",e),children:[vn(t),c("div",{className:h("relative",w?"z-20":"z-10"),ref:C,children:[c("div",{className:h("h-14 [&>*]:p-m pr-6 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",zn(s,i,N)),onClick:w?S:k,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:Tn(a)||d}),Rn(w,p)]}),m&&w?o("div",{className:h("absolute top-0 w-full z-20"),children:o(Nn,{type:"text",value:y,autoFocus:!0,disabled:N,onChange:v})}):null]})]})})),Rn=(e,t)=>o(K,{className:h("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),zn=(e,t,n)=>h(e?"border rounded-md ":"",e&&!n?"hover:border-primary-hover":"",n?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),Dn=(e,t)=>e||0===t,_n=d((({className:e="",label:t,error:n,errors:l,...a})=>c("div",{className:e,children:[o(Vn,{...a,valid:!n,label:fn({label:t,errors:l})}),kn(n)]}))),$n=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],jn=d((({field:e,input:t})=>o(_n,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:$n,...e(t?.name??"")}))),Ln=(e="")=>Boolean("trade"===e||"all"===e),An=e=>null!=e,On=new Map,En=(e,t=On)=>n=>{const l=Un(n),a=t.get(l);if(l&&An(a))return a;const r=e(...n);return l&&An(r)&&t.set(l,Promise.resolve(r)),r},Fn=e=>Boolean(e?.every((e=>Array.isArray(e)?Fn(e):!e||"string"==typeof e))),Un=e=>Fn(e)?e.toString():"",Wn=e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]);function Hn(e,t,{fallback:n,cache:r}={}){const s=i((()=>Yn(e)),[e]),[o,c]=l(void 0),[d,m]=l(void 0);a((()=>{if(!s.some(An))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await En(t,r)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,r,s]);const h=n&&Wn(s)&&n[s[0]];return{data:!o&&h?h:o,error:d,mutate:()=>Promise.resolve(void 0)}}function Yn(e){return Array.isArray(e)?e:e instanceof Function?Yn(e()):[e]}const Xn=`${Yt}/branches`,Kn=[];const qn=async e=>await Rt(e,{method:"GET"})||Kn;function Gn(e=!1){const{data:t}=Hn(`${Yt}${e?"/premiumBranchesByRegions":"/branchesByRegions"}`,zt);return Array.isArray(t)?t:[]}const Zn=(e="")=>"ULTRASERVICE"===e,Jn=d((({field:e,input:t,params:n})=>{const l=Zn(n?.typeForm),r=e("region"),i=r?.value?.key,s=r?.value?.text,c=l?Gn(l)?.find((e=>e?.region===s))?.branches:function(e){const{data:t}=Hn(e?`${Xn}?regionCode=${e}`:null,qn);return t||Kn}(i)?.filter((e=>e?.address));return a((()=>{""!==r?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[r?.value]),o(_n,{label:"Отделение",placeholder:"Выберите отделение",options:(c||[]).map((({address:e=""})=>({key:e,text:e}))),...e(t?.name??""),isSearch:!0})})),Qn=(e,{normalize:t,format:n})=>{const{value:a,onFocus:i,onBlur:s,onChange:o}=e,[c,d]=l(!1),m=r((e=>{d(!0),i&&i(e)}),[]),h=r((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!n?a:n(a),onFocus:m,onBlur:h}},el=(e,t,n)=>Math.max(t,Math.min(e,n));function tl(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function nl({list:e=[],min:t,max:n,step:l,value:a=e[0]||t,disabled:r,onChange:i}){const s=e.length?e.indexOf(a):a,d={backgroundSize:`${(100*(s>t?s-t:0)/(n-t)).toFixed(2)}% 100%`};return c("div",{children:[e.length?o("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>o("div",{className:h("w-2 h-2 rounded-full",s<=t||r?"bg-gray":"bg-primary-main")},String(t))))}):null,o("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:o("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:d,type:"range",min:t,max:n,step:l,value:s,disabled:r,onChange:t=>{const n=tl(t.target?.value),l=e.length?e[n]:n;i&&i(l||0)}})})]})}const ll=1,al=100,rl=d((e=>{const{className:t,title:n,items:l=[],list:a=[],min:i=(a.length?0:ll),max:s=(a.length?a.length-1:al),step:d=1,value:m=a[0]||i,disabled:u=!1,onChange:p}=e,g=Qn(e,{normalize:(e=0)=>a.length?il(a)(e):el(e,i,s),format:Ke()}),x=r((e=>{p&&p(tl(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o($e,{size:"text-m",font:"font-light",color:"text-primary-text",children:n}):null,o("input",{className:h("text-h3 w-full h-14","pl-m mt-xs box-border","text-primary-text",yn,"disabled:border-gray disabled:bg-main-divider"),disabled:u,onChange:x,...g}),nl({list:a,min:i,max:s,step:d,disabled:u,value:m,onChange:p})]}),sl(l)]})})),il=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),sl=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o($e,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),ol=["От 1 000 ₽","До 1 000 000 000 ₽"],cl=d((({field:e,input:t})=>o(rl,{title:"Сумма, ₽",items:ol,min:1e3,max:1e9,...e(t?.name??"")}))),dl=d((({field:e,input:t})=>o(Sn,{label:"Годовая выручка, ₽",...e(t?.name??"")}))),ml="client",hl=[{key:ml,text:"Клиент"},{key:"representative",text:"Представитель клиента"}],ul=d((({field:e,input:t})=>o(_n,{label:"Тип обратившегося",...t,options:hl,...e("applierType")}))),pl=d((({field:e,input:t})=>o(Sn,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e(t?.name??"")}))),gl=({today:e,firstDayOfWeek:t,totalDays:n,currentMonth:l,currentYear:a,min:r,max:i,onDateClick:s})=>{const c=[];let d=1;for(let m=0;m<6;m++){const h=[];for(let c=0;c<7;c++)if(0===m&&c<t)h.push(o("td",{},`empty-${c}`));else if(d>n)h.push(o("td",{},`empty-${c}`));else{const t=new Date(a,l,d),n=xl(t,e),c=fl(t,r,i);h.push(o("td",{children:o("div",{className:bl(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:h},`row-${m}`))}return c},xl=(e,t)=>t&&e.toDateString()===t.toDateString(),fl=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),bl=(e=!1,t=!1)=>h("p-s text-center rounded-md border",{"border-transparent hover:bg-gray":!e},t?"text-gray hover:bg-transparent":"cursor-pointer"),yl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],vl=d((({today:e,currentMonth:t,currentYear:n,min:l,max:a,onDateSelect:r=bn})=>{const{firstDayOfWeek:s,totalDays:d}=i((()=>({firstDayOfWeek:new Date(n,t,1).getDay()-1,totalDays:new Date(n,t+1,0).getDate()})),[n,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:yl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:gl({firstDayOfWeek:s,today:e,totalDays:d,currentYear:n,currentMonth:t,min:l,max:a,onDateClick:r})})]})})),Nl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"];const wl=e=>"_"===e,kl=e=>/\d/.test(e),Sl=e=>wl(e)||kl(e),Cl=1940,Il={name:"CalendarIcon",iconVersion:"black",width:"24",height:"24"},Tl=d((({setSelectedMonth:e,setSelectedYear:t,className:n,value:r,disabled:i,onChange:d,onClick:m})=>{const u=s(null),[p,g]=l(r||"");return a((()=>{g(r||"")}),[r]),a((()=>{Ml({inputValue:p,setSelectedMonth:e,setSelectedYear:t,onChange:d})}),[p]),c("div",{onClick:()=>{null!==u.current&&u.current.focus(),m?.()},className:h("relative",n),children:[o("input",{ref:u,className:"h-full w-full px-m text-l text-black focus-visible:outline-none",value:p,type:"text",onChange:e=>{const t=e.target?.value;"string"==typeof t&&t?.length<11&&g(function(e,t){const n=e.replace(/\D/g,"");if(""===n||n.length===t.length)return e;const l=[...t],a=l.findIndex(wl),r=l.map(((e,t)=>Sl(e)?l.slice(0,t).filter(Sl).length:-1)),i=l.map(((e,t)=>kl(e)?e:n.charAt(r[t])||e)),s=r.indexOf(n.length-1)+1;return i.slice(0,Math.max(a,s)).join("")}(t,"__.__.____"))},onBlur:()=>{Bl(p)?Ml({inputValue:p,setSelectedMonth:e,setSelectedYear:t,onChange:d}):g(r||"")},disabled:i}),i?null:o(K,{className:"mr-s",...Il})]})})),Bl=e=>{const[t,n,l]=e.split(".");if((e=>Number(e)>=Cl&&Number(e)<=(new Date).getFullYear())(l)&&(e=>Number(e)>0&&Number(e)<13)(n)){const e=new Date(Number(l),Number(n)-1,1);let a=0;for(;e.getMonth()===Number(n)-1;)e.setDate(e.getDate()+1),a++;return Number(t)>0&&Number(t)<=a}return!1},Ml=({inputValue:e,setSelectedMonth:t,setSelectedYear:n,onChange:l})=>{if(Bl(e)){const{day:a,month:r,year:i}=(e=>{const[t,n,l]=e.split(".");return{day:Number(t),month:Number(n)-1,year:Number(l)}})(e);t(r),n(i),l?.(new Date(i,r,a))}},Pl=({handleChangeVisibleCalendar:e,value:t,valid:n,onChange:l,setSelectedMonth:a,setSelectedYear:r,disabled:i=!1})=>o(Tl,{onChange:l,disabled:i,onClick:e,value:t&&Wt(t),setSelectedMonth:a,setSelectedYear:r,className:h("flex justify-between items-center h-14 border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",n?"border-gray":"border-error")}),Vl=Nl.map((e=>({key:e}))),Rl=Array.from({length:(new Date).getFullYear()-Cl+1},((e,t)=>Cl+t)).reverse().map((e=>({key:String(e)}))),zl=(e,t)=>{const n=new Date(e,t,1);let l=0;for(;n.getMonth()===t;)l++,n.setDate(n.getDate()+1);return l},Dl=({maxDateOfMonth:e,selectedYear:t,selectedMonth:n,value:l,onChange:a})=>{l&&a?.(new Date(t,n,Math.min(e,l.getDate())))},_l={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},$l={className:"min-w-32",iconVersion:"black",isBorder:!1},jl=d((({className:e="",label:t="",value:n,valid:i=!0,minDate:s,maxDate:d,disabled:m,onChange:u})=>{const[p,{setValue:g,setFalse:x}]=an(!1),[f,b]=l(n?.getMonth()||(new Date).getMonth()),[y,v]=l(n?.getFullYear()??(new Date).getFullYear()),N=r((e=>{u?.(e),x()}),[u]),{handlePrevMonth:w,handleNextMonth:k,handleSelectMonth:S,handleSelectYear:C,monthsOptions:I,yearsOptions:T,handleChangeVisibleCalendar:B,ref:M}=(({onShowCalendar:e,showCalendar:t,selectedMonth:n,onMonthSelect:l,onYearSelect:a,selectedYear:i,onChange:s,value:o})=>{const c=xn(r((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:r((()=>e(!t)),[t]),handleNextMonth:r((()=>{n+1<=11?l(n+1):(l(0),a(i+1))}),[n]),handlePrevMonth:r((()=>{n-1>=0?l(n-1):(l(11),a(i-1))}),[n]),handleSelectMonth:r((({key:e})=>{l(Nl.indexOf(e));const t=zl(i,Nl.indexOf(e));Dl({maxDateOfMonth:t,selectedYear:i,selectedMonth:Nl.indexOf(e),value:o,onChange:s})}),[o]),handleSelectYear:r((({key:e})=>{a(Number(e)),o&&s?.(new Date(Number(e),n,o?.getDate()))}),[o]),monthsOptions:Vl,yearsOptions:Rl,ref:c}})({onYearSelect:v,onMonthSelect:b,onShowCalendar:g,selectedYear:y,selectedMonth:f,showCalendar:p,onChange:u,value:n}),P=((e,t)=>{const[n,r]=l(!1);return a((()=>{const n=()=>{if(e?.current){const{top:n}=e.current.getBoundingClientRect();r(n>t)}};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}),[e]),n})(M,370);return c("div",{className:h("space-y-xs",e),ref:M,children:[vn(t),c("div",{className:"relative",children:[Pl({handleChangeVisibleCalendar:B,value:n,valid:i,onChange:u,disabled:m,setSelectedMonth:b,setSelectedYear:v}),p&&!m?c("div",{className:h("absolute bg-white z-20 select-none",{"bottom-full":P}),children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:w,children:o(K,{..._l,className:"-rotate-90 cursor-pointer"})}),o(Vn,{onChange:S,value:{key:Nl[f]},options:I,...$l}),o(Vn,{onChange:C,value:{key:String(y)},options:T,...$l}),o("div",{className:"my-auto",onClick:k,children:o(K,{..._l,className:"rotate-90 cursor-pointer"})})]}),o(vl,{today:n,currentMonth:f,currentYear:y,min:s,max:d,onDateSelect:N})]}):null]})]})})),Ll=d((({className:e,label:t,error:n,errors:l,...a})=>c("div",{className:h("shrink-0 w-full",e),children:[o(jl,{label:fn({label:t,errors:l}),valid:Boolean(!n),...a}),kn(n)]}))),Al=d((({field:e,input:t})=>o(Ll,{label:t?.label||"Дата рождения",...e(t?.name??"")}))),Ol=d((({field:e,input:t})=>o(Sn,{label:"Количество объектов инкассации",isInteger:!0,...e(t?.name??"")}))),El=d((({field:e,input:t})=>o(Sn,{className:"col-span-2",...e(t?.name??""),placeholder:"Ваше сообщение",isTextarea:!0}))),Fl=d((({field:e,input:t})=>o(Ll,{label:"Желаемая дата встречи",...e(t?.name??"")}))),Ul=d((({field:e,input:t})=>o(Sn,{label:"Электронная почта",...e(t?.name??""),...t}))),Wl=[{key:"ULTRASERVICE",text:"Ультра"}],Hl=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],Yl=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],Xl=d((({field:e,input:t})=>o(_n,{label:"Способ получения ответа",options:Yl,...e(t?.name??"")}))),Kl=d((({field:e,input:t})=>o(Sn,{label:"ФИО",...e(t?.name??""),...t}))),ql=d((({field:e,input:t})=>o(Sn,{label:"ИНН",isInteger:!0,maxLength:12,...t,...e(t?.name??"")}))),Gl=d((({className:e,viewBox:t,fill:n="none",width:l,height:a,paths:r,...i})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:l,height:a,children:r.map((({d:e,fill:t,...n},l)=>{const a={...i,...n};return o("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},l)}))}))),Zl="appearance-none w-5 h-5 border-solid flex-none",Jl=[{d:"M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z",fillRule:"evenodd",clipRule:"evenodd",fill:"white"}],Ql=d((({className:e,value:t,text:n,disabled:l,isRadio:a,onChange:i})=>{const s=r((e=>{l||(e.preventDefault(),i&&i(!t))}),[i,l,t]),d=a?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(Gl,{paths:Jl,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return o("div",{className:e,children:c("label",{className:h("flex items-center relative group/box",ta(l)),onClick:s,children:[o("div",{className:h(Zl,"m-0",a?"rounded-full border-2":la(t),!l&&t?"border-primary-main":"border-gray",l?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:na(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(l),"aria-label":n}),t?d:null,ea(n)]})})})),ea=e=>e?o("div",{className:"ml-s",children:o($e,{size:"text-l",font:"font-light",children:e})}):null,ta=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",na=(e=!1)=>e?"radio":"checkbox",la=(e=!1)=>h("rounded border",{"bg-primary-main":e}),aa=d((({className:e,text:t,value:n,key:l,disabled:a,error:r,onChange:i})=>c("div",{className:h("shrink-0",e),children:[o(Ql,{text:t,value:n,disabled:a,onChange:i},l),kn(r)]}))),ra=d((({field:e,input:t})=>o(aa,{...e(t?.name??""),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),ia=`${Yt}/outservice`,sa=[];async function oa(){const e=await Rt(`${ia}/outserviceregions`);return e&&Array.isArray(e)?e:sa}const ca=d((({field:e,input:t})=>{const n=e("region"),l=n?.value?.key,{data:r}=Hn("outServiceRegions",oa),s=i((()=>r?.find((e=>e.code===l))?.localities?.map((e=>({key:e,text:e})))),[r,l]);return a((()=>{""!==l&&e?.(t?.name??"")?.onChange?.("")}),[l,t?.name??""]),o(_n,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:s,...e(t?.name??""),isSearch:!0})})),da=d((({field:e,input:t})=>o(Sn,{label:"Отчество (Обязательно, при наличии)",maxLength:60,...e(t?.name??""),...t}))),ma=d((({field:e,input:t})=>o(Sn,{label:"Имя",maxLength:60,...e(t?.name??""),...t}))),ha=d((({value:e=!1,text:t,type:n="checkbox",onChange:l})=>c("div",{role:n,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>l&&l(!e),children:[o("div",{className:h("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:o("div",{className:h("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o($e,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),ua=d((({field:e,input:t})=>Ln(e("acquiringType")?.value?.key)?o(ha,{type:"radio",text:"Хочу онлайн-кассу",...e(t?.name??"")}):null)),pa=d((({field:e,input:t})=>o(Sn,{...e(t?.name??""),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...t}))),ga=e=>"_"===e,xa=e=>/\d/.test(e),fa=e=>ga(e)||xa(e),ba=[..."+7 (___) ___-__-__"],ya=ba.findIndex(ga),va=ba.map(((e,t)=>fa(e)?ba.slice(0,t).filter(fa).length:-1));const Na=d((({children:e,onChange:t,...n})=>{const l=r((e=>t&&t(function(e){const t=e.replace(/\D/g,""),n=ba.map(((e,n)=>xa(e)?e:t.charAt(va[n])||e)),l=va.indexOf(t.length-1)+1;return(l?n.slice(0,Math.max(ya,l)):n).join("")}(e))),[t]),a=r((e=>{"+7 ("===e&&t&&t("")}),[]);return o(Nn,{...n,onChange:l,onFocus:e=>l(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),wa=d((({className:e,label:t,error:n,...l})=>c("div",{className:h("shrink-0 w-full",e),children:[o(Na,{"aria-label":t,label:fn({label:t,errors:l?.errors}),valid:Boolean(!n),placeholder:"+7 (___) ___-__-__",...l}),kn(n)]}))),ka=d((({field:e,input:t})=>o(wa,{label:"Телефон",...e(t?.name||"phone"),...t}))),Sa=d((({field:e})=>Ln(e("acquiringType")?.value?.key)?o(ha,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),Ca=Ot((({field:e,input:t,source:n})=>o(_n,{placeholder:"Выберите продукт",label:"Продукт",options:Ia(n?.productList),...e(t?.name??"")}))),Ia=e=>(e??[]).map((e=>({key:e,value:e}))),Ta=`${Yt}/regions`,Ba=[];function Ma(e=Ta){const{data:t}=Hn(e,zt);return Array.isArray(t)?t:Ba}const Pa=`${Yt}/outservice/outserviceregions`,Va=d((({field:e,input:t,params:n})=>{var l;const a=Ma((l=n?.typeForm,"OUTSERVICE"===l?Pa:void 0));return o(_n,{label:t?.label||"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:i((()=>a?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[a]),...e(t?.name??"")})})),Ra=d((({field:e,input:t})=>{const n=Gn(!0),l=i((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(_n,{label:"Регион",placeholder:"Выберите регион",options:l,...e(t?.name??"")})})),za=d((({field:e,input:t})=>o(Sn,{label:"ФИО представителя",...t,...e("representativeName")}))),Da=(e,t)=>{const{value:n,isDirty:l}=e,a=l?t(n):[];return{...e,errors:a,error:a[0]}},_a=/^[\u0400-\u04FF\d\s]+$/u,$a=on((e=>null!=e&&""!==e)),ja="Некорректно заполненное поле",La=e=>$a(e??ja),Aa=e=>on((e=>e?.key&&""!==e?.key))(e??ja),Oa=e=>on((e=>"string"==typeof e&&e.length>1&&((e="")=>_a.test(e))(e)))(e??ja),Ea=e=>/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/.test(e),Fa=e=>on(Ea)(e),Ua=on((e=>"boolean"==typeof e&&e))("Согласие обязательно"),Wa={fullName:La(),addressBranch:Aa(),desiredMeetingDate:La(),product:La(),localities:La(),partnerComments:La(),collectionCount:La(),acquiringType:Aa(),serviceType:Aa(),annualRevenue:La(),feedbackMethod:Aa(),serviceDirection:Aa(),secondaryPhone:Fa("Укажите номер телефона"),region:Aa(),situationDescription:La(),sufferedFrom:La(),applierType:La(),surname:Oa("Укажите свою фамилию на кириллице"),name:Oa("Укажите своё имя на кириллице"),middleName:Oa("Укажите своё отчество на кириллице"),birthday:La("Укажите дату рождения"),phone:Fa("Укажите номер телефона"),email:(Ha="Укажите электронную почту",on((e=>/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,4}$/.test(e)))(Ha)),inn:(e=>on((e=>"string"==typeof e&&(10===e.length||12===e.length)))(e))("Укажите ИНН"),comment:La(),typeForm:La(),consentToReceiveMaterials:Ua,consentDataProcessing:Ua};var Ha;const Ya=(e={})=>({name:t})=>Boolean(e[t??""]),Xa=e=>t=>!t?.condition||t.condition.values.find((n=>{const l=e?.[t?.condition?.name??""];return n===(l?.key??l)})),Ka=d((({field:e})=>{const t=e("secondaryPhone");return o(wa,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?Da(t,Wa.secondaryPhone):t})})),qa=d((({field:e,input:t})=>o(_n,{label:"Направление обслуживания",placeholder:"Выберите направление",options:Hl,...e(t?.name??"")}))),Ga=d((({field:e,input:t})=>o(Sn,{label:"Описание ситуации",...t,...e("situationDescription")}))),Za=[{key:"blg",text:"Белгородской области"},{key:"brnsk",text:"Брянской области"},{key:"krsk",text:"Курской области"},{key:"chs",text:"От стихийного бедствия ЧС"}],Ja=d((({field:e,input:t})=>o(_n,{label:"Пострадал в",...t,options:Za,...e("sufferedFrom")}))),Qa=d((({field:e,input:t})=>o(Sn,{label:"Фамилия",maxLength:60,...e(t?.name??""),...t}))),er=["От 1 мес","До 15 лет"],tr=d((({field:e})=>o(rl,{title:"Срок, месяцев",items:er,min:1,max:180,...e("term")}))),nr=d((({field:e,input:t})=>o(_n,{label:"Тип обслуживания",options:Wl,...e(t?.name??"")}))),lr={horizontal:"@lg:flex-row",vertical:""},ar=d((({label:e,items:t,value:n,className:l,disabled:a=!1,orientation:r="horizontal",onChange:i})=>c("div",{className:"grid gap-xs whitespace-nowrap",children:[e?o("div",{role:"radiogroup","aria-label":e,children:o($e,{color:"text-secondary-text",font:"font-light",children:e})}):null,o("div",{className:h("flex flex-col gap-s",lr[r],l),role:"radiogroup","aria-label":"Группа кнопок",children:t?.map((({id:e,text:t})=>o(Ql,{isRadio:!0,text:t,value:n===e,onChange:()=>i?.(e),disabled:a},String(e))))})]}))),rr=[{id:"currencyControl",text:"Валютный контроль"},{id:"documentOperations",text:"Документарные операции"},{id:"conversionTransactions",text:"Конверсионные операции"},{id:"otherIssues",text:"Иные вопросы ВЭД"}],ir=d((({field:e,input:t})=>{const n=r((t=>{"currencyControl"!==t&&(e("inn").onChange?.(""),e("region").onChange?.(""))}),[]);return o("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:o(ar,{className:"whitespace-normal",orientation:"horizontal",items:rr,...e(t?.name??"",{onChange:n})})})})),sr=d((({field:e,input:t})=>o(Ql,{text:"Согласен на получение информационных и аналитических материалов по электронной почте",...e(t?.name??"")})));const or={$ref:"/wcms-resources/outservice-productlist.json"},cr={fullName:Kl,addressBranch:Jn,desiredMeetingDate:Fl,product:e=>o(Ca,{...e,source:or}),localities:ca,isClient:ra,partnerComments:pa,collectionCount:Ol,acquiringType:jn,onlineCheckout:ua,posTerminal:Sa,serviceType:nr,term:tr,amount:cl,annualRevenue:dl,vedTypes:ir,feedbackMethod:Xl,serviceDirection:qa,bankEmpolee:pl,secondaryPhone:Ka,applicationDate:e=>o(Sn,{label:"Дата и время обращения в Банк",...e}),region:e=>Zn(e?.params?.typeForm)?o(Ra,{...e}):o(Va,{...e}),consentToReceiveMaterials:sr,sufferedFrom:Ja,situationDescription:Ga,representativeName:za,applierType:ul,surname:Qa,name:ma,middleName:da,birthday:Al,phone:ka,email:Ul,inn:ql,comment:El},dr=(e,t,n={})=>(l,a)=>{const r={...cr,...n}[String(l.name)];return function({input:e,field:t}){const{condition:n}=e,{value:l}=t(n?.name||"");return!n||n?.values?.find((e=>e===(l?.key??l)))}({input:l,field:e})&&r?o("div",{children:o(r,{field:e,input:l,params:t})},a):null},mr=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o($e,{size:"text-h6",children:e})}):null,hr={primary:h("text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active","group-data-secondary:text-primary-main group-data-secondary:bg-white","group-data-secondary:hover:text-white group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active"),secondary:h("text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","group-data-secondary:text-white group-data-secondary:bg-white/20","group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active")},ur=h("group/btn-embedded","bg-transparent border border-transparent outline-none"),pr=h("bg-main-gray text-main-disabled cursor-not-allowed"),gr=d((({className:e,type:t="button",version:n="primary",shape:l="default",embedded:a,disabled:s,role:c,ariaLabel:d,data:m,dataTheme:u,children:p,onClick:g=bn})=>{const x=r("tab"!==c?me(g):g,[c,g]),f=i((()=>be(m)),[m]),b="round"===l;return o("button",{className:h("font-sans flex items-center gap-xs",{[hr[n]]:!s&&!a,[ur]:a,[pr]:s},a?"justify-between":"justify-center",a||b?"p-0":"px-9 py-4",{"rounded-md":"default"===l,"rounded-full":b},e),type:t,role:c,"aria-label":d,disabled:s,"aria-disabled":s?"true":void 0,"data-theme":u,...f,onClick:x,children:p})})),xr=d((({className:e,onClose:t})=>o("button",{className:h("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(K,{name:"CloseIcon",width:"20",height:"20",iconVersion:"gray"})}))),fr=d((({className:e,head:t,children:n,onClose:l,onClick:a})=>c("div",{className:h("relative bg-white pt-0 p-lg",e),role:"dialog",title:"Диалог",onClick:a,children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(xr,{className:"absolute top-0 right-0",onClose:l}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]}))),br=d((({ok:e,typeForm:t,onClose:n})=>{const l="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(fr,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto",onClose:n,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ae,{image:{icon:e?"ResponseOKIcon":"ResponseFailIcon",iconVersion:"normal"},width:"136",height:"136"}),o(S,{className:"w-full",title:e?"Ваша заявка отправлена":"Не удалось отправить заявку",description:e?l:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(gr,{type:"button",onClick:n,children:"Хорошо"})]})})})),yr=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:l,amount:a,term:r,annualRevenue:i,serviceType:s,vedTypes:o,region:c,inn:d,sufferedFrom:m,situationDescription:h,applierType:u,...p}=e,g=t||i?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:l=!1,term:a,amount:r,annualRevenue:i}=e;return t?`Вид эквайринга=${t?.text||""}${Ln(t?.key)?`/Онлайн касса=${n}/POS-терминал=${l}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${r}/Срок=${a}/Выручка=${i}`})(e):null,x={...p,...kr(o),...wr(c),...d&&{inn:d},...g?{partnerComments:g}:{},...s?{typeForm:s}:{},...Nr(m?.text,h),...vr(u)};return Object.fromEntries(Object.entries(x)?.map((([e,t])=>[e,t?.key||t])))},vr=e=>e?.key?{isClient:e?.key===ml}:{},Nr=(e,t)=>e||t?{comment:`${e||""};${t||""}`}:{},wr=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},kr=e=>e?{vedTypes:Object.fromEntries(rr.map((({id:t})=>[t,t===e])))}:{},Sr={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:$n[0],serviceType:Wl[0],feedbackMethod:Yl[0],serviceDirection:Hl[0],vedTypes:rr[0].id,birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,addressRetail:{key:"",text:""}},Cr=(e,t="")=>({...Object.fromEntries(e.map((e=>[e.name,"vedTypes"===e?.name&&e?.defaultValue||Sr[e.name||""]]))),typeForm:{key:t,text:""}}),Ir=d((({color:e="text-primary-main",position:t="absolute",blur:n=!0,size:l="big"})=>o("div",{className:h("flex justify-center items-center h-full w-full z-50",t,{"backdrop-blur":n}),children:o("div",{className:h("inline-block","animate-spin rounded-full","border-solid border-current","border-r-transparent","small"===l?"border-4 h-8 w-8":"border-8 h-28 w-28",e),role:"status"})}))),Tr=d((({isLoading:e,disabled:t,children:n,className:l,...a})=>c(gr,{type:"submit",className:h("relative",l),disabled:e||t,...a,children:[e?o(Ir,{blur:!0,size:"small"}):null,n]}))),Br={primary:hr.primary,secondary:hr.secondary,white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",gray:hr.secondary,transparent:"","":""},Mr=d((e=>{const t=xe(),{className:n,href:l,target:a,text:r,aboveText:i,version:s="link",rel:c,ariaLabel:d,data:m,children:u,onClick:p}=t(e),g="link"!==s;return o("a",{className:h("group/btn inline-flex items-center h-fit","font-sans no-underline select-none","border border-transparent focus:border-primary-text focus:border","cursor-pointer",{[Br[s]]:Boolean(s),[i?"px-9 py-2.5":"px-9 py-4"]:g,"rounded-md":g},n),href:l,target:a,rel:c,"aria-label":d??`Ссылка на ${r}`,role:l?"link":"button",onClick:p,...be(m),children:u??Pr(r,i)})})),Pr=(e,t)=>e||t?c("div",{className:"whitespace-pre",children:[t?o("div",{className:"font-light text-left text-xs",children:t}):null,o("div",{className:h("text-left",{"text-s -mt-3xs":Boolean(t)}),children:e})]}):null,Vr=d((({text:e,link:t})=>c(w,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o($e,{children:e}):null,t?o(Mr,{...t,ariaLabel:"условия передачи данных",children:t.text}):null]}))),Rr=(e,t,n)=>c("div",{className:"flex col-span-2 gap-xs flex-col w-full items-baseline",children:[e?c("div",{children:[c("div",{className:"flex gap-3 items-center",children:[o(Ql,{...e}),o(Vr,{link:t})]}),kn(Da(e,Ua).error)]}):o(Vr,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),o(Tr,{className:"w-full @xl:w-auto",children:n?.text?n.text:"Отправить заявку"})]}),zr={send:async function(e,t=!1){const{typeForm:n,region:l,phone:a="",email:r,birthday:i,desiredMeetingDate:s,inn:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:h,serviceDirection:u,...p}=e,g=t&&"Юридическое лицо / ИП"!==u,x=`${Yt}${g?"/lead":"/sendcorporatelead"}`,f={typeForm:n,...qt(l,g),...Gt(r,g),...Xt(a),...Kt(s,"desiredMeetingDate"),...g?Kt(i):{inn:o},..."FEEDBACK"===n?{}:{addressBranch:c,bankEmpolee:m,applicationDate:h,...Zt(d)},...p};try{const e=await fetch(x,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(f)});return e?.ok?await e.json():null}catch(e){return null}}},Dr=d((({className:e,title:t,typeForm:n="",sections:l=[],button:a,link:s,endpoint:d,additionalParams:m,isContacts:u,data:p,...g})=>{const x=i((()=>l?.flatMap((e=>e?.inputs))||[]),[l]),f=i((()=>Cr(x,n)),[x,n]),b=i((()=>((e,t={})=>{const n=e.filter((e=>Boolean(e?.required&&e?.name))),l={...Wa,...t},a=n.some((e=>e.condition?.values)),r=Object.fromEntries(n.filter(Ya(l)).map((({name:e})=>[e,l[e??""]])));return e=>a?Object.fromEntries(n.filter(Ya(l)).filter(Xa(e)).map((({name:e})=>[e,l[e??""]]))):r})(x)),[x]),y=pn(br),v=ln(),w=r((async(e,t)=>{const l=yr({...e,...m}),a=Boolean(await zr.send(l,"lead"===d));y.open({ok:a,typeForm:n}),a&&Jt({aspectsAttributes:p,aspects:v,ev:t})}),[n]),[,{field:k,onSubmit:S}]=hn(f,{resetOnSubmit:!0,formValidator:b,onSubmit:w}),C=(e=>e?.find((e=>"consentDataProcessing"===e?.name)))(x)?.name;return c(un,{className:h("container space-y-m",e),title:t,...g,children:[c("form",{onSubmit:S,children:[l.map(((e,t)=>{return c("div",{className:h((l=e.columns,2===l?"@xl:grid-cols-2":""),"grid gap-x-m"),children:[mr(e.title),(e?.inputs||[])?.map(dr(k,{typeForm:n}))]},`section-${t}`);var l})),Rr(C?k("consentDataProcessing"):void 0,s,a)]}),u?c("div",{className:"space-y-m",children:[o(N,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center gap-xl",children:[c("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"телефон 8 (800) 200-78-70",children:[o(ae,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"почта ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ae,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),_r=d((({title:e,description:t})=>{const n=Te();return c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(ae,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(S,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),$r=e=>e%2!=0,jr=d((({className:e,children:t})=>o("span",{className:h("inline-flex items-center text-start gap-s group-[]/btn-embedded:text-primary-main",e),children:t}))),Lr=d((({isUnfolded:e,...t})=>o(K,{name:e?"ArrowUpIcon":"ArrowDownIcon",size:"small",iconVersion:"",...t}))),Ar=d((({className:e,isUnfolded:t,short:n,label:l=(t?"Скрыть":"Развернуть"),embedded:a,...r})=>c(gr,{className:h({"w-full":!n},e),embedded:a,shape:n?"default":"square",role:"tab","aria-label":"Кнопка сворачивающейся секции",...r,children:[o(jr,{children:l}),o(Lr,{isUnfolded:t,iconVersion:a?"color":""})]}))),Or=d((({className:e,role:t="tablist",children:n})=>o("div",{className:h(e),role:t,children:n})));const Er=d((({className:e,isUnfolded:t,children:n})=>{const l=s(null),r=function(e,t){const n=s(null);return a((()=>{const t=n?.current;if(!t)return;const l=new ResizeObserver((n=>{e(t,n[0])}));return l.observe(t),()=>{l.disconnect()}}),[e,...t]),n}((e=>{l.current&&(l.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:l,className:h("transition-max-h duration-300 overflow-hidden",{"max-h-0":Boolean(l.current||!t)}),role:"tabpanel","aria-label":"Сворачивающаяся секция",children:o("div",{className:e,ref:r,children:n})})})),Fr="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",Ur=d((({topItemsCount:e=0,label:t,block:n,blocksToRender:l=[],...a})=>{const[r,i]=e>0?[l.slice(0,e),l.slice(e)]:[l,[]],[s,{toggle:d}]=an(!1);return c("div",{className:h("space-y-2xs",{hidden:!l.length}),children:[c("div",{className:h(Fr),children:[M(r,{...a.options,parent:n}),$r(r.length)?o(Ft,{className:"col-span-6",...a}):null]}),c(Or,{children:[c(Er,{className:h(Fr),isUnfolded:s,children:[M(i,{...a.options,parent:n}),$r(i.length)?o(Ft,{className:"col-span-6",...a}):null]}),o(Ar,{className:h("text-h4",{hidden:e<1}),label:t,isUnfolded:s,disabled:!i?.length,dataTheme:a.options?.page?.colorPalette,onClick:d})]})]})})),Wr=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Hr=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),Yr=10;function Xr(e,{sensitivity:t,rootRef:n}={}){const l=s(null),r=i((()=>({threshold:Kr(t),root:n?.current})),[t,n?.current]);return a((()=>{if(!l.current)return;const t=new IntersectionObserver(e,r);return t.observe(l.current),()=>{t.disconnect()}}),[e,r]),l}function Kr(e=0){const t=Math.round(e*Yr);return Array.from({length:t}).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const qr=d((({className:e,style:t,idx:n,activeIndex:l,observerOptions:a,children:i,onIntersection:s})=>{const c=Xr(r((e=>{e.length&&s&&s(n||0,e[e.length-1])}),[s,n]),a);return o("div",{className:h("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===l),ref:c,role:"listitem",children:i})})),Gr=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],Zr=d((({className:e,itemClassName:t,containerRef:n,activeIndex:l,visibleItemCount:a=0,gap:i=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:u,children:p,onVisibleItemsChange:g,onVisibleIndicesChange:x})=>{const f={sensitivity:1,rootRef:n},b=s([]),y=r(((e,t)=>{const n=[...b.current||[]];n[e]=t,b.current=n,g&&g(n),x&&x(Qr(n))}),[g,x]),v=a>0?i*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?Jr(c,v):{},...N?Hr(u):{},gap:`${i}px`};return o("div",{className:h("box-border overflow-auto no-scrollbar",d,e),style:k,ref:n,role:"list",children:(S=(e,n)=>o(qr,{className:h(m,a?Gr[a-1]:"",{"h-full":N},t),style:w?Jr(c/4):{},activeIndex:l,idx:n,observerOptions:f,onIntersection:y,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(p)});var S})),Jr=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Qr=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),ei={"horizontal-list":"w-6","vertical-list":"h-6"},ti=({activeIndex:e,onClick:t,listType:n="horizontal-list"})=>(l,a)=>o("div",{className:h("cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white",a===e?ei[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(a)},String(a)),ni=({activeIndex:e,onClick:t})=>(n,l)=>{const a=l===e,r=a?"min-w-[350px] bg-white shadow-dark-blue border-none p-6":"min-w-72 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",i=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-l":"text-m group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(l),"aria-label":n?.title,className:h("max-h-28 mt-xs ml-xs relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50 whitespace-nowrap",r),children:[o("div",{className:i,children:n?.title}),o("div",{className:h("text-secondary-text font-light",s),children:n?.description})]},String(l))},li=e=>e,ai=(e=li)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),ri=ai(),ii=(e=li)=>ai((t=>-e(t))),si=ii(),oi=e=>t=>e.scrollWidth/t,ci=e=>(t,n)=>{e.scrollBy({left:n*oi(e)(t),behavior:"smooth"})},di=({itemCount:e,onVisibleIndicesChange:t})=>{const n=s(null),[a,i]=l([]),o=r((e=>{i((t=>{return(n=t)===(l=e)||Boolean(n&&l&&n?.length===l?.length&&n.every(((e,t)=>e===l[t])))?t:e;var n,l})),t&&t(e)}),[t]),[c,d]=a.length?[ii()(a),ai()(a)]:[-1,-1],m=c>0,h=d<e-1,u=r((()=>{var t;n.current&&(m?ci(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=r((()=>{n.current&&(h?ci(n.current)(e,1):n.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),g=r(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{n?.current&&n.current.children[e]?.scrollIntoView(t)}),[n]);return[n,{scrollLeft:u,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},mi={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},hi=d((({className:e="",activeIndex:t=0,dotCount:n=0,listType:l="horizontal-list",version:i,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=Te(),[u,p]=di({itemCount:s.length}),g=ui(Boolean(s?.length));a((()=>{s?.length&&t>=0&&u?.current&&p.scrollTo(t,g)}),[t]);const x=r((e=>{e!==t&&c?.current&&d?.scrollTo(e,g)}),[c?.current]);return s?.length&&!m?o(Zr,{containerRef:u,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(ni({activeIndex:t,onClick:x}))}):n?o("div",{className:h("flex gap-xs",mi[l],i?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":i,children:Array.from({length:n}).fill(null).map(ti({activeIndex:t,onClick:x,listType:l}))}):null})),ui=(e=!1)=>({behavior:e?"auto":"smooth"}),pi=d((({className:e,name:t,...n})=>o(gr,{className:h("w-12 h-12 min-w-12 min-h-12",e),shape:"round",...n,children:o(K,{name:t,iconVersion:"",size:"small"})}))),gi=d((e=>o(pi,{name:"ArrowLeftIcon",version:"secondary",ariaLabel:"Пролистать влево",...e}))),xi=d((e=>o(pi,{name:"ArrowRightIcon",version:"secondary",ariaLabel:"Пролистать вправо",...e}))),fi="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",bi=d((({className:e,scroll:t,hasBlur:n,arrowsPadded:l,isBottom:a})=>{const{canScrollLeft:r,canScrollRight:i,scrollLeft:s,scrollRight:d}=t,m=l&&!a;return c("div",{className:e,children:[n?yi(t):null,r?o(gi,{className:h(vi(a),m?"left-1":"left-0"),onClick:s}):null,i?o(xi,{className:h(vi(a),m?"right-1":"right-0"),onClick:d}):null]})})),yi=e=>c("div",{children:[e.canScrollLeft?o("div",{className:h(fi,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:h(fi,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),vi=(e=!1)=>h("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),Ni=d((({className:e,version:t,gap:n=14,padding:l=16,visibleItemCount:a=1,listType:r="horizontal-list",snapAlign:i,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:u,showDots:p,children:g,onVisibleIndicesChange:x,navButtons:f})=>{const b=Array.isArray(g)?g.length:0,[y,v]=di({itemCount:b,onVisibleIndicesChange:x}),[N]=v.visibleIndicesRange;return c("div",{className:h(e,"vertical-list"===r?"relative h-full":""),children:[o(Zr,{containerRef:y,activeIndex:N,visibleItemCount:a,gap:n,padding:l,listType:r,snapAlign:i,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(bi,{className:h(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:u,isBottom:Boolean(f?.length)}),o(hi,{className:h(!p&&"lg:hidden"),activeIndex:N,dotCount:b,listType:r,version:t,navButtons:f,containerRef:y,containerScroll:v})]})})),wi=({blocksToRender:e,...t})=>o(Ni,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:M(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:h("relative min-w-80",Wr(!0)),children:T(e,t)},String(n))})}),ki=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...l})=>{switch(e?.view){case"grid":return c("div",{children:[Si(n,t),o(Ur,{...e,...l,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[Si(n,t),wi({...l,blocksToRender:t})]});default:return null}})),Si=(e,t)=>e&&!t.length?o(_r,{...e}):null,Ci=e=>t=>t.reduce(((t,n,l)=>t.length?t.concat({...e,key:`sep-${l}`},n):[n]),[]),Ii=d((({value:e,onChange:t,items:n=[],multiple:l})=>n.map((n=>o(ha,{text:n?.title,value:[e].flatMap((e=>e)).includes(n.value),onChange:()=>(n=>{if(!t)return;const a=e?.includes(n);t(l?a?(e||[]).filter((e=>e!==n)):[...e||[],n]:a?[]:[n])})(n.value),type:l?"checkbox":"radio"},n.value))))),Ti=d((({children:e,filtrationSchema:t,resetButton:n,field:l,reset:a})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-xl",children:[e,Ci(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(Bi(l)).filter(Boolean))]}),n?o("div",{children:o(gr,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:n?.text})}):null]}))),Bi=e=>([t,n])=>{const l=n?.type;return"array"===l?Mi(t,e)(n):null},Mi=(e,t)=>n=>{const l=n?.items?.enum?.map(((e,t)=>({value:e,title:n?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[n?.title?o("div",{className:"mb-m",children:o($e,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(Ii,{items:l,multiple:!n?.single,...t(e)})]},e)},Pi=e=>e;function Vi(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const Ri=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,zi=(e,t)=>Object.entries(e).map((([n,l])=>"number"==typeof l?Array.isArray(t[n])?((e,t)=>n=>Ri(t[e])||Ri(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>Ri(t[e])||Ri(n[e])||Di(t[e])<=Di(n[e]))(n,e):"object"==typeof l&&"min"in l&&"max"in l?((e,t)=>n=>Ri(t[e])||Ri(n[e])||Di(t[e]?.min)>=Di(n[e]?.min)&&Di(t[e]?.min)<=Di(n[e]?.max))(n,e):Array.isArray(l)?((e,t)=>n=>Ri(t[e])||Ri(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>Ri(t[e])||Ri(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),Di=e=>Number(e||0),_i=(e,{block:t,page:n,normalize:l=Pi})=>{const a=t?.blocks||[],[r,s]=hn(e),o=i((()=>Vi(a,a.map((e=>jt(e.content,n?.fallback))))),[a,n?.fallback]),c=r===e?a:((e,t)=>(n=Pi)=>e?.filter((([,e])=>zi(t,n(e)||{}))).map((([e])=>e)))(o,r)(l);return[r,{blocksToRender:c,blocksWithProps:o},s]},$i={},ji={},Li=Ot((({className:e,filtrationSchema:t=$i,consumerField:n={},resetButton:l,...a})=>{const[,{blocksToRender:r},{field:i,reset:s}]=_i(ji,{block:a.block,page:a.options?.page}),d=o(Vn,{className:"w-64",label:n?.title,options:Ai(n),...i("consumer",{parse:({key:e})=>[e],format:([e]=[])=>Ai(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:h(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(Ti,{filtrationSchema:t,field:i,reset:s,children:c("div",{children:[d,o("div",{children:o(gr,{type:"reset",className:"mt-lg w-64",onClick:s,version:l?.version,children:l?.text})})]})}),o(ki,{blocksToRender:r,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),Ai=e=>Vi(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),Oi=(e=!1)=>e?"text-left":"text-center",Ei={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Fi=d((({className:e,iconBgVersion:t="primary",size:n,icon:l,...a})=>{const r=`${n?.width??44}px`;return l?o("div",{className:h("rounded-icon object-fit flex justify-center items-center",Ei[t],e),style:{width:r,height:r},role:"figure",children:o(K,{name:l,width:"54%",...a})}):null})),Ui=d((({className:e="",title:t,benefitList:n,...l})=>{const a=Te();return c(g,{className:e,defaultPadding:"p-6xl",...l,children:[t?o(N,{headingType:"h3",as:"h2",className:Oi(a),title:t}):null,n?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:n.map(Wi)}):null]})})),Wi=({label:e,description:t,__html:n,icon:l,isDotted:a=!1,iconBgVersion:r},i)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[l?.icon?o(Fi,{className:"shrink-0",iconBgVersion:r,...l}):null,l?.src?o(ae,{className:"shrink-0",image:l}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(N,{headingType:"h6",children:e}),o($e,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(De,{__html:n,isDotted:a,itemSize:"list-s"}):null]}):null]},String(i)),Hi=e=>({icon:t,title:n,description:l},a)=>c("div",{className:h("flex flex-col gap-1","items-center",{"justify-center":!l&&!n}),children:[n?o($e,{size:"text-h6",font:"font-normal",align:e,children:n}):null,t?o(ae,{image:t,height:"180",className:"w-auto mx-auto"}):null,l?o($e,{size:"text-h6",font:"font-normal",align:e,children:l}):null]},String(a)),Yi=(e,t,n)=>o("div",{className:`grid gap-2xs ${Xi(t)}`,children:e.map(Hi(n))}),Xi=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},Ki=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:n="",columnsCount:l="4",subtitle:a,title:r,...i})=>c(g,{className:h("space-y-3xl",n),defaultPadding:"p-6xl",...i,children:[o(S,{defaultPadding:"",title:r,description:a,headlineVersion:"M"}),e?.length?Yi(e,l,t):null]}))),qi={start:"justify-start",center:"justify-center",end:"justify-end"},Gi=d((({buttons:e,className:t="",align:n,...l})=>{const a=n&&h("flex",qi[n]);return o(g,{className:h("!bg-transparent",a,t),defaultPadding:"p-0",...l,children:We(e)})})),Zi=d((({className:e,title:t,children:n,...l})=>c(g,{className:h("space-y-xl",e),defaultPadding:"p-4xl",...l,children:[t?o(N,{className:"text-center",title:t}):null,n]}))),Ji="flex flex-col justify-between lg:flex-row gap-x-4xl gap-y-7 lg:gap-y-4xl",Qi="flex flex-col lg:w-1/2 gap-2xl",es="flex flex-col gap-y-xl min-w-52",ts=d((({value:e,fractionDigits:t,fixed:n,prefix:l,postfix:a})=>o($e,{size:"text-h3",children:"number"==typeof e?[l,Ke(t,{fixed:n})(e),a].filter(Boolean).join(" "):e}))),ns=d((({className:e,title:t,value:n,color:l="text-secondary-text",...a})=>c("div",{className:h("flex justify-between @xl:flex-col",e),children:[t?o($e,{size:"text-l",font:"font-light",color:l,children:t}):null,n?o(ts,{value:n,...a}):o($e,{size:"text-h3",children:"-"})]}))),ls=(e,t)=>e?o(w,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,as=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:l=2,depositeName:a,isShowDepositeName:r,color:i="text-secondary-text"})=>c("div",{children:[o($e,{size:"text-l",font:"font-light",color:i,children:t}),c("div",{className:"relative",children:[c("div",{className:"flex @xl:justify-center gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge -mt-m tracking-[-15px]",children:Ke(l,{fixed:!0})(e)}),n?o("span",{className:"text-7xl mt-5",children:n}):null]}),a&&r?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),rs=d((({title:e="Ставка"})=>c("div",{className:"space-y-s min-w-96",children:[o($e,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(K,{className:"w-10 h-auto lg:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Процентная ставка не найдена, выберите другие параметры"})})]}))),is=({title:e="Ставка",rate:t=0,unit:n="%",fractionDigits:l=2,color:a="text-secondary-text",children:r,...i})=>t?c("div",{className:"flex flex-col",children:[o("div",{className:"hidden lg:block min-w-96",children:o(as,{title:e,rate:t,unit:n,fractionDigits:l,color:a,...i})}),o(ns,{className:"lg:hidden",title:e,value:t,postfix:n,fractionDigits:l,fixed:!0,color:a,...i}),r]}):o(rs,{title:e,...i}),ss=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...l})=>o(rl,{items:e?[`От ${Ke(1)(l.min||0)} ${n}`,`До ${Ke(1)(l.max||0)} ${n}`]:[],step:t,...l}),os={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},cs={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},ds=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:l}=e,[a,r]=((e,t,n)=>{const{maxBonus:l=5e3,prefMonthsNum:a=os.prefMonthsNum,prefTravelBonusRate:r=os.prefTravelBonusRate,prefRestBonusRate:i=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(r*t)+Math.round(i*n),l);return[c,c*a+Math.min(Math.round(s*t)+Math.round(o*n),l)*(12-a)]})(t||cs,n,l);return{...t,...e,monthBonus:a,yearBonus:r}},ms=Ot((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,...r})=>{const[i,{field:s}]=hn({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:u,maxSumOther:p,monthBonus:g,yearBonus:x}=ds(i,n);return o(Zi,{className:e,title:t,...r,children:c("section",{className:h(Ji,e),children:[c("div",{className:Qi,children:[ss({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),ss({title:"Сумма покупок в остальных категориях, ₽",min:u,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?is({title:"Баллов за месяц",rate:g,fractionDigits:0,unit:"",color:"text-primary-text"}):null}),c("div",{className:es,children:[x>=0?o(ns,{title:"Баллов за год",value:x,color:"text-primary-text"}):null,We(l,{isVertical:!0}),ls(a)]})]})})})),hs=Math.round(29.5),us=(e,t=0)=>e?.sum?e.sum:t,ps=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,gs=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,xs=({items:e,title:t,mobileTitle:n=t,orientation:l="horizontal",value:a,onChange:r,...i})=>c("div",{className:"grid gap-s whitespace-nowrap",children:[t?o("div",{className:"hidden @5xl:block",role:"radiogroup","aria-label":t,children:o($e,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o($e,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(ar,{orientation:l,items:e,value:e[a?0:1].id,onChange:t=>r&&r(t===e[0].id),...i})]}),fs=e=>xs({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),bs=" (c капитализацией)",ys=({income:e,finalSum:t,postfix:n="₽",buttons:l=[],footnotes:a=[],isCapitalization:r=!1})=>c("div",{className:es,children:[o(ns,{title:`Доход в конце срока${r?bs:""}`,value:e,postfix:n,prefix:"+"}),o(ns,{title:`Сумма в конце срока${r?bs:""}`,value:t,postfix:n}),We(l,{isVertical:!0}),a?.map(ls)]}),vs=([e,t],n,l=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:Ns([e,t],l),Ns=([e,t],n=[])=>({[e]:n.length?si(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?ri(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),ws=(e,[t,n],l)=>e>=l[t]&&e<=l[n],ks={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const Ss={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},Cs=(e,t)=>{const{daysValue:n,moneyValue:l,isPartialWithdrawal:a,isReplenished:r,isMonthlyInterestPayment:i}=e,s=r||a,o=n<90||n>730,c=function(e){const t=e?.rateType?ks[e?.rateType]:"",{data:n}=Hn(t?`${Yt}/depositrates/${t}`:null,zt);return Array.isArray(n)?n:[]}(t),d=c?.find((e=>i===e.isMonthlyInterestPayment&&Is(s,e)&&ws(l,["minSum","maxSum"],e)&&ws(n,["minDays","maxDays"],e)))||Ss,{rate:m}=d,h=Ts(m,e),u=l+h,p=c||[Ss];return{...d,...Ns(["minSum","maxSum"],p),...Ns(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:h,finalSum:u}},Is=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,Ts=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,daysValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a/30)-l):Math.round(l*e*a/365/100)},Bs=Ot((({className:e="",title:t,buttons:n,footnote:l,bottomFootnote:a,isShowDepositeName:r,defaultParams:i,rateParams:s,...d})=>{const[m,{field:u}]=hn({moneyValue:us(i,1e5),daysValue:ps(i,60),isReplenished:Boolean(i?.isReplenished),isPartialWithdrawal:Boolean(i?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(i?.isMonthlyInterestPayment)}),p=Cs(m,s),{income:g,finalSum:x,rate:f,depositeName:b}=p;return o(Zi,{className:e,title:t,...d,children:c("section",{className:h(Ji,e),children:[c("div",{className:Qi,children:[ss({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...u("moneyValue"),value:p.moneyValue}),(y={title:"Срок, дней",min:p.minDays,max:p.maxDays,...u("daysValue"),value:p.daysValue},o(rl,{items:[`От ${gs(y.min||0)}`,`До ${gs(y.max||0)}`],step:1,...y})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[Ms(p,u),fs({title:"Выплата процентов",orientation:"vertical",...u("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),is({rate:f,depositeName:b,isShowDepositeName:r}),ys({income:g,finalSum:x,buttons:n,footnotes:[l,a]})]})});var y})),Ms=(e,t)=>c("div",{className:"space-y-s",children:[o($e,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(Ql,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Ql,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),Ps=(e=[],t=!1)=>Vs([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),Vs=(e,t)=>{if(!t?.length)return;const n=t?.reduce(((t,n)=>e[0](n.rate,t[0].rate)?[n]:n.rate===t[0].rate?[...t,n]:t),[t[0]]);return n.length>1?n.reduce(((t,n)=>e[1](n,t)?n:t),n[0]):n[0]},Rs=({min:e=0,max:t=0,availableMonths:n,...l})=>o(rl,{items:[`От ${zs(e)}`,`До ${zs(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...l}),zs=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Ds=e=>xs({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),_s=({field:e,defParams:t,calcParams:n,map:l,monthsValue:a="maxMonths"})=>{Object.entries(l).forEach((([n,l])=>{e?.(n)?.onChange?.(t?.[l])})),e?.("monthsValue")?.onChange?.(el(t?.[a],n.minMonths,n.maxMonths))},$s=(e,t)=>{const{isAnnuity:n,moneyValue:l,monthsValue:a,moneyExtra:r}=t;if(0===e)return 0;if(n){const t=e/1200;return r?(l+r)*(t+t/(Math.pow(1+t,a)-1)):l*(t+t/(Math.pow(1+t,a)-1))}return Math.round(l/a)+l*(e/1200)},js={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Ls=e=>As({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&As({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&As({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&As({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),As=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],Os=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,r=t?.rateRows||[js],i=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>Ls({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=vs(["minSum","maxSum"],i,r),{minMonths:c,maxMonths:d}=vs(["minMonths","maxMonths"],i,r),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a})=>e?.find((e=>Ls({row:e,userInputParams:t,paramsViewSettings:n})&&ws(l,["minSum","maxSum"],e)&&ws(a,["minMonths","maxMonths"],e)))||js)({rateRows:r,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a}),{rate:h}=m,u=$s(h,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:l,monthsValue:a,monthlyPayment:u}},Es=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),Fs={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},Us=Ot((({className:e,title:t,calcSource:n,buttons:l,footnote:r,paramsViewSettings:i,defaultParams:s,onChange:d,...m})=>{const u=(p=n?.rateRows,Vs([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],p));var p;const[g,{field:x}]=hn({moneyValue:us(s,2e5),monthsValue:ps(s,hs),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)},{onChange:d}),f=Os(g,n,i),b=Ds({title:"Тип платежа",orientation:"vertical",...x("isAnnuity")}),{onChange:y}=x("moneyValue"),{onChange:v}=x("monthsValue");return a((()=>{y&&y(el(g.moneyValue,f.minSum,f.maxSum))}),[f.minSum,f.maxSum]),a((()=>{v&&v(el(g.monthsValue,f.minMonths,f.maxMonths))}),[f.minMonths,f.maxMonths]),a((()=>{!Es(s)&&u&&_s({field:x,defParams:u,calcParams:f,map:Fs,monthsValue:"minMonths"})}),[n,s]),o(Zi,{className:e,title:t,...m,children:c("section",{className:h(Ji,e),children:[c("div",{className:Qi,children:[ss({title:"Сумма кредита, ₽",step:500,min:f.minSum,max:f.maxSum,...x("moneyValue"),value:f.moneyValue}),Rs({title:"Срок кредита, месяцев",min:f.minMonths,max:f.maxMonths,...x("monthsValue"),value:f.monthsValue}),Ws({...f,...i},x),o("div",{className:"sm:hidden",children:b})]}),c("div",{className:h(es,"@4xl:w-1/2"),children:[o(ns,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(ns,{title:"Ставка",value:f?.rate,fractionDigits:2,postfix:"%"}),o(ns,{title:"Ежемесячный платёж",value:f.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:b}),We(l,{isVertical:!0}),ls(r)]})]})})})),Ws=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(Ql,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(Ql,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(Ql,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(Ql,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Hs=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let n=1;for(;n<t.length;){const[e,l]=t[n-1],[a,r]=t[n];l>=a?t.splice(n-1,2,[e,Math.max(l,r)]):n++}return t},Ys={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},Xs=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,r=t?.[0]?Gs(t[0].minMonths,t[0].maxMonths):0,i=!n?.isShowMonthlyInterestPayment,s=!n?.isShowRemoteRegistration,o=!n?.isShowReplenish,c=!n?.isShowWithdrawn,d=!n?.isShowNewClient,m=t?.find((t=>[qs({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),qs({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),qs({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:i}),qs({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,ws(l,["minSum","maxSum"],t),ws(a||r,["minMonths","maxMonths"],t)].every(Boolean)))||Ys,{rate:h}=m,u=Ks(h,e),p=l+u,g=t||[Ys];return{...m,...Ns(["minSum","maxSum"],g),...Ns(["minMonths","maxMonths"],g),availableMonths:Hs(g.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,n=1)=>Array.from({length:Math.abs(t-e)/n+1},((l,a)=>t>=e?e+a*n:e-a*n)))(e,t))),...e,defaultMonth:r,income:u,finalSum:p}},Ks=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,monthsValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a)-l):Math.round(l*e*30*a/365/100)},qs=({row:e,userInputParams:t,paramKey:n,isExclude:l})=>l||t[n]===e[n],Gs=(e,t)=>e+Math.round((t-e)/2),Zs=(e="rub")=>"rub"===e,Js=(e,t)=>{const{minMonths:n,maxMonths:l}=Ns(["minMonths","maxMonths"],no(t,e?.currency)),a=e.monthsValue||Math.round((n+l)/2);return{monthsValue:el(a,n,l)}},Qs=(e,t)=>{const{minSum:n,maxSum:l}=Ns(["minSum","maxSum"],no(t,e?.currency)),a=e.moneyValue||n;return{moneyValue:el(a,n,l)}},eo=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),to=e=>{const t=Zs(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},no=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},lo=(e,t)=>{const n="rub"!==e?.currency?.key;return c("div",{className:"grid gap-lg",children:[c("div",{className:"flex gap-lg",children:[e.isShowReplenish?xs({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?xs({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),ao(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?fs({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},xs({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),ao(e.isShowNewClient),e.isShowNewClient?o(Ql,{text:"Новый вкладчик",...t("isNewClient")}):null]});var l},ao=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,ro={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},io={text:"₽",key:"rub"},so=Ot((({className:e,title:t,calcSource:n,buttons:l=[],footnote:i="",paramsViewSettings:s,defaultParams:d,...m})=>{const{rows:u}=n??{},p=u?.map((e=>e.currency))??[io],g=r((e=>t=>e?{...t,...to(t),...Qs(t,e),...Js(t,e),...eo(t,e)}:t)(u),[u]),[x,{field:f}]=hn({moneyValue:us(d,2e4),monthsValue:ps(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:io},{normalizer:g}),b=f?.("currency")?.value??io,y=f?.("isNewClient")?.value,v=no(u,b),N=Xs(x,v,s),{rate:w,income:k,finalSum:S,type:C=""}=N,I=r((()=>{_s({field:f,defParams:Ps(v,y),calcParams:N,monthsValue:"minMonths",map:ro})}),[f,u]);a((()=>{!Es(d)&&v&&I()}),[d,u]);const T=w===Ps(v,y)?.rate;return o(Zi,{className:e,title:t,...m,children:c("section",{className:h(Ji,e),children:[c("div",{className:Qi,children:[c("div",{className:"flex gap-m",children:[ss({className:"w-full",title:`Сумма, ${b?.text}`,min:N.minSum,max:N.maxSum,...f("moneyValue"),value:N.moneyValue,postfix:b?.text,step:oo(b?.key)}),u&&u?.length>1?o(_n,{label:"Валюта",options:p,...f("currency")}):null]}),Rs({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...f("monthsValue"),value:N.monthsValue}),lo({...N,...s},f)]}),is({rate:w,children:mo(I,T)}),ys({income:k,finalSum:S,buttons:[...l,co(n?.buttons,C)],footnotes:[i],postfix:b?.text,isCapitalization:f("isMonthlyInterestPayment").value})]})})})),oo=(e="")=>Zs(e)?1e3:100,co=(e=[],t="")=>{const{type:n,...l}=e.find((e=>e.type===t))??{};return l},mo=(e,t=!1)=>t?null:o(gr,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),ho=e=>uo({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&uo({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),uo=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],po={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},go=(e,t,n)=>{const{moneyValue:l,monthsValue:a,oldMonthlyPayment:r,moneyExtra:i}=e,s=t?.rateRows||[po],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>ho({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=vs(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=vs(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:r,moneyExtra:i})=>e?.find((e=>ho({row:e,userInputParams:t,paramsViewSettings:n})&&ws(l+i,["minSum","maxSum"],e)&&ws(r,["minSumOld","maxSumOld"],e)&&ws(i,["minSumExtra","maxSumExtra"],e)&&ws(a,["minMonths","maxMonths"],e)))||po)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:r,moneyExtra:i}),{rate:p}=u,g=$s(p,e),x=e.oldMonthlyPayment-g;return{...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:l,monthsValue:a,oldMonthlyPayment:r,moneyExtra:i,monthlyPayment:g,benefit:x}},xo=Ot((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,paramsViewSettings:r,...i})=>{const[s,{field:d}]=hn({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=go(s,n,r),u=Ds({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(Zi,{className:e,title:t,...i,children:c("section",{className:h(Ji,e),children:[c("div",{className:Qi,children:[ss({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),ss({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),Rs({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),fo({...m,...r},d),m.isExtraMoney?ss({title:"Дополнительная сумма, ₽ ",step:500,min:m.minSumExtra,max:m.maxSumExtra,...d("moneyExtra"),value:m.moneyExtra}):null,o("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:u})]}),c("div",{className:h(es,"@4xl:w-1/2"),children:[o(ns,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(ns,{title:"Ставка",value:m?.rate,fractionDigits:2,postfix:"%"}),o(ns,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(ns,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:u}),We(l,{isVertical:!0}),ls(a)]})]})})})),fo=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(Ql,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(Ql,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(Ql,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),bo=d((e=>{const{onChange:t,min:n,max:l,defaultValue:a="0",fractionDigits:i=0,...s}=e,c=Qn(e,{normalize:(e=a)=>n&&l?String(el(Number(yo(e)),n,l)):yo(e),format:Ke(i)}),d=r((e=>t&&t(yo(e))),[t]);return o(Nn,{onChange:d,...s,...c})})),yo=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),vo=d((e=>o(bo,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o($e,{size:"text-xl",font:"font-light",children:"₽"})})})));function No(e,t){for(const[n,l]of e.entries())null!=l?t.setItem(n,l):t.removeItem(n)}function wo(e,t){return No(e,t),No(t,e),e.bus.watch((({type:e,event:n})=>{null!=n?t.setItem(e,n):t.removeItem(e)}))}class ko{storage;bus;get size(){return this.storage?.length??0}constructor(e,t=new ue){this.storage=e,this.bus=t}hasItem(e){return Boolean(this.storage?.getItem(String(e)))}getItem(e){const t=this.storage?.getItem(String(e))??null;try{return JSON.parse(String(t))}catch(e){return null}}entries(){return Array.from({length:this.size},((e,t)=>{const n=String(this.storage?.key(t));return[n,this.getItem(n)]}))}setItem(e,t){null!==t?this.storage?.setItem(String(e),JSON.stringify(t)):this.storage?.removeItem(String(e)),this.bus?.subject(e,t)}removeItem(e){this.storage?.removeItem(String(e)),this.bus?.subject(e,null)}}class So{bus;store=new Map;get size(){return this.store.size}constructor(e=new ue){this.bus=e}hasItem(e){return this.store.has(e)}getItem(e){return this.store.get(e)}entries(){return this.store.entries()}setItem(e,t){this.store.set(e,t),this.bus.subject(e,t)}removeItem(e){this.store.delete(e),this.bus.subject(e,null)}}const Co={};function Io(e,t=Co){const n=s(null),o=function(){const[,e]=l(0);return r((()=>e((e=>(e+1)%65536))),[])}();return a((()=>e.bus.watch((e=>{n.current?.has(String(e.type))&&o()}))),[e,o]),i((()=>new Proxy(t,{get:(t,l)=>(n.current||=new Set,n.current.add(l),e.getItem(l)),has:(t,l)=>(n.current||=new Set,n.current.add(l),e.hasItem(l)),set:(t,n,l)=>(e.setItem(n,l),!0),deleteProperty:(t,n)=>(e.removeItem(n),!0)})),[e])}const To=new So;function Bo(){return Io(To)}wo(To,new ko(globalThis?.sessionStorage));const Mo={private:"p2p/registerP2P",business:"b2c/registerB2C"},Po=({onClose:e,errorCode:t,errorMessage:n})=>{const l=t?`Код ошибки - ${t}`:"Пожалуйста, повторите позднее";return o(fr,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto",onClose:e,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ae,{image:{icon:"ResponseFailIcon",iconVersion:"normal"},width:"136",height:"136"}),o(S,{className:"w-full",title:"Ошибка перевода",description:l,headlineVersion:"XS",isEmbedded:!0}),n?c("div",{className:"bg-secondary-dark rounded-xl px-4 pt-4 pb-8 grid gap-4 grid-cols-12",children:[c("div",{className:"col-span-8",children:[" ",n]}),o("div",{className:"col-span-4",children:o(ae,{image:{icon:"ResponseFailIcon",iconVersion:"normal"}})})]}):null]})})},Vo=e=>{const t=pn(Po),n=Bo(),l=Qt(),a="private"===e?"p2p":"b2c";return r((async({amount:r})=>{const i=await(async(e,t)=>{const n=Qt(),l={amount:String(t),currency:"643",returnUrl:`${n.origin}/p2p/success`,failUrl:`${n.origin}/p2p/failed`,language:"ru"},a=`${Yt}/payment/${Mo[e]}`;try{const e=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(l)});return e.ok?await e.json():null}catch(e){return null}})(e,r);(e=>Boolean(e?.formUrl)&&Boolean(e?.orderId))(i)&&(n.transaction={orderId:i.orderId,type:a,url:l.href},l.assign(`${a}/?formUrl=${encodeURIComponent(i.formUrl)}`)),(e=>Boolean(e?.errorMessage)&&0!==e?.errorCode)(i)&&t.open({errorCode:i.errorCode,errorMessage:i.errorMessage})}),[e])},Ro={amount:1500},zo=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:l,formType:r="private",...i})=>{const[s,{setValue:d}]=an(!1),m=Vo(r),[{amount:u},{field:p,onSubmit:x}]=hn(Ro,{onSubmit:m});return a((()=>{d(u<=0)}),[u]),c(g,{className:h("flex flex-col items-center",e),defaultPadding:"p-6xl",...i,children:[t?o(N,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",onSubmit:x,children:[o(vo,{valid:!s,label:n,max:3e5,min:1,...p("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:u}),l?.text?o(Tr,{className:"w-full mt-lg",disabled:s,children:l.text}):null]})]})})),Do=({className:e,text:t="ХИТ"}={})=>c("div",{className:h("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(K,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(w,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),_o="relative h-full",$o={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},jo=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...l})=>{const{blocks:a}=l.block||{},r=a?.some(Oo),i=n?{defaultPadding:"p-6xl pb-m"}:{};return P({...l,renderProps:(n,l,a)=>c("div",{className:Lo(n,{someCardsHighlighted:r}),children:[T(n,l,{className:Ao(n,{someCardsHighlighted:r,showBorder:!e,cardSize:t}),...i,blockIndex:a}),Oo(n)?Do({className:"absolute top-0 -right-4 z-40"}):null]},String(a))})},Lo=(e,{someCardsHighlighted:t})=>h(_o,t&&(Oo(e)?"pt-3xl":"pt-3xl sm:pt-16")),Ao=(e,{someCardsHighlighted:t,showBorder:n,cardSize:l="normal"})=>h(_o,"min-w-80",$o[l],t&&(Oo(e)?"pt-3xl sm:pt-16":"pt-3xl"),Wr(n),n&&"h-full"),Oo=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Eo=Ot((({className:e,visibleItemCount:t=1,noCardBorder:n,arrowsPadded:l=!0,isGap:a=!0,cardSize:r="normal",isNavButtons:i=!1,...s})=>o(g,{className:h(e),defaultPadding:"p-6xl",...s,children:o(Ni,{className:h("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:a?16:0,padding:0,arrowsPadded:l,navButtons:i?Fo(s?.block?.blocks):[],hasBlur:!0,children:jo({noCardBorder:n,cardSize:r,isNavButtons:i,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Fo=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],Uo="z-10 border border-solid w-full h-full",Wo=h(Uo,"absolute hidden @xl:block border-transparent"),Ho=d((({className:e,title:t,description:n,button:l,...a})=>o(g,{className:h("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:h(Wo,"top-9 right-12 bg-green-dark")}),o("div",{className:h(Wo,"top-6 right-8 bg-green")}),o("div",{className:h(Wo,"top-3 right-4 bg-green-light")}),c("div",{className:h(Uo,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(S,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),We([l],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Yo={black:"bg-black",white:"bg-white"},Xo=d((({className:e="",title:t,description:n,image:l,price:a,button:r,colors:i=[],align:s="text-left",padding:d,...m})=>o(g,{className:h("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(Pe,{className:"h-full",padding:d,title:o(S,{title:t,description:n,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:l?.src?o(ae,{className:"flex justify-center align-center mb-xl",image:l}):null,buttons:We([r],{buttonClassName:"w-full self-end"}),children:[i?.length?c("div",{className:"flex text-secondary-text mb-m",children:[o("div",{className:"mr-xs",children:o($e,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),i.map(Ko)]}):null,a?c($e,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),Ko=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Yo[e]}`},String(t)),qo=d((({icon:e,...t})=>{const n=xe(),{text:l,href:a,target:r,onClick:i}=n(t);return l?o("div",{className:h("p-3 rounded-lg bg-white text-secondary-text flex justify-center"),children:o("a",{role:"link",href:a,target:r,onClick:i,children:c("div",{className:"flex flex-col items-center gap-3 break-words max-w-[150px]",children:[e?o(ae,{className:"w-7 h-7 md:w-12 md:h-12",image:{...e,iconVersion:e?.iconVersion},alt:l}):null,o("div",{className:"font-light md:font-normal text-primary-text text-center text-xs md:text-sm whitespace-wrap",children:l})]})})}):null})),Go=d((({className:e,additionalDescription:t,description:n,links:l,title:a,...r})=>o(g,{defaultPadding:"p-5xl",className:h("overflow-hidden",e),...r,children:c("div",{className:"flex flex-col lg:flex-row gap-5 justify-between",children:[c("div",{className:"flex-1",children:[o(S,{isEmbedded:!0,title:a,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(S,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),l?.length?Zo(l):null]})}))),Zo=e=>o("div",{className:h("lg:grid-cols-9 lg:[&>*]:col-span-2 lg:[&>*:nth-child(14n+2)]:col-span-3 lg:[&>*:nth-child(7n+5)]:col-span-3","lg:[&>*:nth-child(7n+6)]:col-span-3 lg:[&>*:nth-child(7n+7)]:col-span-3 lg:[&>*:nth-child(14n+10)]:col-span-3 lg:w-3/6","grid-cols-3 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+3)]:col-span-2 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+4)]:col-span-2","grid gap-3 lg:gap-5"),children:e.map(((e,t)=>o(qo,{...e},String(t))))}),Jo=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),Qo=d((({className:e="",href:t,target:n,onClick:l,data:a,children:r})=>{const i=xe()({href:t,target:n,onClick:l});return o(t?"a":"div",{className:h("block",e),...t?i:{},role:t?"link":"none",...be(a),children:r})})),ec=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["appgallery.huawei.com"],iconMapped:{icon:"HuaweiIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}},{origins:["rustore.ru"],iconMapped:{icon:"RustoreIcon"}}],tc=d((({className:e="",media:t,showButtonText:n,stretched:a,version:r="white",children:i})=>{if(!t?.length)return null;const[s,d]=l(),m=t?.map((e=>{const{href:t,icon:l,text:a}=e,{iconMapped:i}=(e=>ec.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=Ue(l)?l:i,c=n?{text:a}:{text:""},m=e?.icon?.iconVersion||"color";return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:m},version:e?.version??r}})),u=h("border border-solid hover:border-transparent border-main-divider","group-data-primary:border-main-divider group-data-gray:border-green group/media",{"basis-auto":!n&&!s},nc(a));return c("div",{className:h("flex flex-col gap-m xl:gap-xs",e),"aria-label":"Социальные сети",children:[o("div",{className:"flex gap-xs",children:We(m,{className:lc(s??!1,a??!1,n),buttonClassName:u})}),i?o($e,{size:"text-s",font:"font-light",color:"text-secondary-text",children:i}):null]})})),nc=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",lc=(e,t,n=!1)=>h(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),ac=d((({className:e,padding:t,description:n,additionalDescription:l,href:a,icon:r,isDotted:i,__html:s,socialMedia:d=[],target:m,title:u,align:p="text-left",benefits:x,imageOptions:{directionRight:f=!0,isImageAlwaysOnRight:b=true,isImageSecondary:y=!1}={},data:v,...N})=>o(g,{className:h("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...N,children:o(Qo,{href:a,target:m,className:"h-full",data:Jo(v),children:c(Pe,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(S,{title:u,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...tt(Ue(r)?o(ae,{image:r}):null,f),buttons:d.length?o(tc,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(Fe,{benefits:x}),s?o(De,{__html:s,isDotted:i,itemSize:"list-s"}):null,rc(l,p)]})})}))),rc=(e,t)=>e?o(w,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,ic=new ue,sc=(e,t)=>{const{title:n,description:l,buttons:a}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[n?o("div",{className:"opacity-80",children:o($e,{size:"text-m",color:"text-secondary-text",children:n})}):null,l?o("div",{className:"mt-2xs",children:o($e,{size:"text-xl",color:"text-primary-text",children:l})}):null,a?.length?o("div",{className:"text-primary-main",children:We(a)}):null]},String(t))},oc=d((({className:e="",title:t,align:n="text-center",icon:s,button:d,visibleCellsCount:m=1,cardCells:u=[],options:p,data:x,...f})=>{const b=i((()=>u.map(sc)),[u]),[y,v]=i((()=>m>0?[b.slice(0,m),b.slice(m)]:[b,[]]),[m,b]),[w,k]=l(!1);a((()=>ic.subscribe("fold",(e=>{e&&p?.parent&&e.parent===p?.parent&&k(e.isUnfolded)}))),[p?.parent]);const S=r((()=>{ic.fire("fold",{type:"fold",isUnfolded:!w,parent:p?.parent})}),[w,p?.parent]);return c(g,{className:h("flex flex-col",e),defaultPadding:"p-2xl",...f,children:[o(ae,{className:"self-center",image:s}),t?o(N,{className:h("pt-xs",n),headingType:"h5",title:t}):null,d?.text?o(ke,{className:"w-full mt-m mb-lg",...d}):null,v.length?c(Or,{children:[c("div",{children:[y,o(Er,{isUnfolded:w,children:v})]}),u.length>=m?o(Ar,{className:"mt-m",label:w?"Скрыть":"Подробнее о тарифе",isUnfolded:w,embedded:!0,data:x,onClick:S}):null]}):o("div",{children:y})]})})),cc=d((({className:e,contacts:t,info:n,version:l="secondary",...a})=>c(g,{className:h("flex",e),defaultPadding:"p-6xl",version:l,...a,children:[n?.length?dc(n):null,t?.length?dc(t):null]}))),dc=e=>o("div",{className:"flex gap-5xl grow basis-0",children:e.map(((e,t)=>mc({column:e,i:t})))}),mc=({column:e,i:t})=>e?o("div",{className:"flex flex-col gap-xl grow basis-0",children:e.map((({title:e="",description:t,additionalDescription:n,button:l},a)=>c("div",{children:[o(S,{title:e,description:t,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),n?o("div",{className:"mt-xs opacity-80",children:o(w,{size:"text-m",font:"font-light",children:n})}):null,o("div",{className:h({"mt-xl":Boolean(l?.text)}),children:We([l])})]},String(a))))},`col-${String(t)}`):null,hc=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,uc=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),pc=1e9,gc={sum:{min:1e4,max:pc},period:3},xc=Ot((({className:e,filtrationSchema:t={},resetButton:n,sumInput:l,periodInput:a,...r})=>{const[,{blocksToRender:i,blocksWithProps:s},{field:d,reset:m}]=_i(gc,{block:r.block,page:r.options?.page,normalize:e=>({...e,period:fc(e)})}),u=s.map((([,e])=>e?.paramsSource?.rows?.[0]?.rates)),p=bc(u);return c(g,{className:h("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...r,children:[o(Ti,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(vo,{label:l?.title,min:500,max:pc,...d("sum",{parse:e=>({min:Number(e),max:pc}),format:({min:e})=>String(e)})}),o(rl,{title:a?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(ki,{blocksToRender:i,...r})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),fc=e=>Dt((e?.paramsSource?.rateRows||[]).filter(hc).flatMap((e=>uc(e.minMonths,e.maxMonths)))),bc=e=>Dt(e.flatMap((e=>e||[])).filter(hc).flatMap((e=>uc(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],yc=[{key:"10"},{key:"50"},{key:"100"}],vc=({itemCount:e,onItemCountChange:t})=>{const n=r((({key:e})=>t(Number(e))),[]);return c("div",{className:"mt-2 @lg:mt-0 items-center gap-s hidden @lg:flex",children:[o("span",{children:"Показать по"}),o(Vn,{className:"min-w-20",onChange:n,value:{key:String(e)},options:yc,iconVersion:"black"})]})},Nc="py-m @lg:px-lg px-m rounded-md cursor-pointer text-center min-w-10 @lg:min-w-0 hover:bg-primary-hover hover:text-white",wc=(e,t)=>{const{currentPage:n,onPageChange:l,totalPages:a}=e,r=t+1;return r===n?o("div",{"aria-current":"true",className:"py-m @lg:px-lg px-m bg-primary-main text-center min-w-10 @lg:min-w-0 text-white rounded-md",children:r},String(t)):1!==r&&r!==a&&((e,t,n)=>e<t&&e>=t-1||e<=t+1&&e>t||((e,t,n)=>t<=2&&e<=t+2||t>=n-1&&e>=n-3)(e,t,n))(r,n,a)?o("div",{onClick:()=>l(r),className:Nc,"aria-label":`Страница ${r}`,children:r},String(t)):null},kc={width:"24",height:"24"},Sc=({currentPage:e,onPageChange:t,totalPages:n})=>{const l=i((()=>Array.from({length:n}).fill({currentPage:e,onPageChange:t,totalPages:n})),[n,e]),a=r((()=>{e>1&&t(e-1)}),[e]),s=r((()=>{e<n&&t(e+1)}),[e,n]),d=r((()=>t(1)),[]),m=r((()=>t(n)),[n]);return c("div",{className:"flex gap-m items-center",children:[o("div",{onClick:a,children:o(K,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Cc(1===e),...kc})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:Nc,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,l.map(wc),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:Nc,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(K,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Cc(e===n),...kc})})]})},Cc=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",Ic=({currentPage:e,onPageChange:t,totalPages:n,itemCount:l,onItemCountChange:a})=>c("div",{className:"mt-3xl flex justify-between flex-col @lg:flex-row items-center select-none",role:"navigation","aria-label":"Пагинация",children:[o(Sc,{currentPage:e,onPageChange:t,totalPages:n}),l&&a?o(vc,{itemCount:l,onItemCountChange:a}):null]}),Tc=d((({className:e,value:t,autoFocus:n,onChange:l,onFocus:a,placeholder:i="Поиск по сайту"})=>{const s=r((e=>{l&&l(e.target?.value||"")}),[l]);return c("div",{className:h("relative",e),role:"form",children:[o("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:o(ae,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),o("input",{className:h("h-14 w-full px-10 text-l text-black box-border rounded-md",yn),value:t,type:"text",name:"search-bar-input",placeholder:i,autoFocus:n,onChange:s,onFocus:a})]})})),Bc=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(Tc,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(jl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(jl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период до",minDate:n.startDate,...e("endDate")}),o("div",{className:"col-span-12 @lg:col-span-2 mt-8 @lg:mt-auto",children:o(gr,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),Mc=d((({title:e,timestamp:t,publicId:n})=>{const l=xe(),{href:a}=l({href:`${Yt}/depository/${n}/file`});return c("div",{className:"flex gap-3 items-center py-lg border-gray border-opacity-50 border-b",children:[o(Fi,{className:"shrink-0",icon:"DocDownloadIcon",iconVersion:"black"}),c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o($e,{size:"text-m","font-weight":"font-light",children:Wt(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:a,download:!0,"aria-label":"Скачать",children:e})]})]},n)})),Pc=`${Yt}/depository`,Vc={startDate:void 0,endDate:void 0,query:""},Rc=Ot((({className:e,...t})=>{const[n,a]=l(0),[i,s]=l(10),[d,{field:m,reset:u}]=hn(Vc),{totalPages:p=0,items:x=[]}=(({size:e,page:t,query:n,startDate:l,endDate:a})=>{const r=l?Wt(l,!0):"",i=a?Wt(a,!0):"",s=new URLSearchParams(Pc);s.set("page",String(t)),s.set("size",String(e)),s.set("query",n),s.set("timestampStart",r),s.set("timestampEnd",i);const o=`?${s.toString()}`,{data:c}=Hn(Pc+o,zt);return{items:c?.content,totalPages:c?.totalPages}})({size:i,page:n,...d}),f=r((e=>a(e-1)),[]),b=r((e=>{i!==e?(s(e),a(0)):s(e)}),[]);return c(g,{className:h(e,"container p-6xl"),...t,children:[o(Bc,{filtrationState:d,field:m,onClearFilter:u}),c("div",{className:"flex flex-col",children:[c("div",{className:"grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b",children:[o("div",{className:"col-span-4 @lg:col-span-2 hidden @lg:block",children:o($e,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o($e,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),x.length?x.map((e=>o(Mc,{...e},String(e.publicId)))):o(_r,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(Ic,{currentPage:n+1,onPageChange:f,totalPages:p,itemCount:i,onItemCountChange:b})]})]})})),zc=e=>"Image"===e?.contentType&&e?.image?o(ae,{image:e.image}):"Code"===e?.contentType&&e.code?o("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,Dc=d((({className:e="",title:t,description:n,error:l,button:a,...r})=>c(g,{className:h("flex flex-col justify-center items-center",e),defaultPadding:h("p-6xl"),version:"transparent",...r,children:[o("div",{className:"flex justify-center",children:zc(l)}),o(S,{title:t,description:n,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(ke,{version:a?.version,text:a?.text,...a}):null]}))),_c=new So;function $c(e){return Io(_c,e)}wo(_c,new ko(globalThis?.localStorage));const jc=`${Yt}/region`;function Lc(e="Москва"){return $c().location??{name:e}}function Ac(e="Москва"){const t=$c(),n=r((async()=>{if(!t.location){const n=await Rt(jc);t.location=n??{name:e}}}),[t,e]);return Hn(jc,n),t}var Oc;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(Oc||(Oc={}));const Ec=new Intl.NumberFormat("ru",{style:"currency",currency:Oc.RUB}),Fc=e=>e?Ec.format(e):"",Uc="text-m font-light text-secondary-text ",Wc=`${Uc} text-left`,Hc=`${Uc} pl-5xl text-center`,Yc=`${Uc} pl-5xl text-right`,Xc={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},Kc=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:h("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:Wc,children:o($e,{size:"text-m",children:"Валюта"})}),o("th",{className:Hc,children:o($e,{size:"text-m",children:"Купить"})}),o("th",{className:Yc,children:o($e,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(qc)})]}))),qc=e=>{const t=e?.currency?.currency;return c("tr",{className:"pb-2xs text-h6",children:[o("td",{className:"pt-m m-auto flex text-left",children:c("div",{className:"flex items-center gap-xs",children:[t?o(ae,{image:{icon:Xc[t]},width:"24",height:"24"}):null,o($e,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o($e,{size:"text-h6",children:Fc(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o($e,{size:"text-h6",children:Fc(e?.buyExchangeRate)})})]},t)},Gc={icon:"GpsIcon"},Zc=d((({className:e="",address:t})=>c("div",{className:h("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(Fi,{...Gc,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(w,{size:"text-l",color:"text-primary-main",children:t}):null,o(w,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Jc=(e,t,n)=>{const l=Number(Qc(e))*Math.pow(t,n?-1:1);return Number.isInteger(l)?l:((e,t=2)=>{const n=10**t;return Math.round(parseFloat(String(e))*n)/n})(l)},Qc=e=>e.replace(/[^\d.,]/g,"").replace(",",".");function ed(e){if(!e)throw new Error("Value should be fulfilled");return e}const td=e=>t=>{const[,n]=ed(e.find((([e])=>e(t))));return n(t)},nd=e=>td(e.map((([e,t])=>[e,()=>t])));nd.if=e=>new ld(void 0,e);class ld{parent;predicate;unit;get entry(){return[ed(this.predicate),ed(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new ld(this,e)}then(e){return new ld(this.parent,this.predicate,e)}else(e){return td([...ad(this),[()=>!0,e]])}}const ad=e=>[...e?.parent?ad(e.parent):[],e.entry],rd=e=>nd([[e=>e.value!==Oc.RUB&&e.oppositeValue!==Oc.RUB,()=>e.handleConvert(e.value,Oc.RUB)],[e=>e.value===Oc.RUB&&e.oppositeValue===Oc.RUB,()=>e.handleConvert(e.value,Oc.USD)],[e=>e.value===Oc.RUB&&e.oppositeValue===Oc.RUB,()=>e.handleConvert(e.value,Oc.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function id(e){const{placeholder:t,rates:n,selected:l,value:a,setValue:r,setSelected:i}=e,s=n.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:l,text:l};return c("div",{className:"relative flex",children:[o(Nn,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:r}),s.length?o(Vn,{className:"absolute right-0",isBorder:!1,onChange:e=>i(e.key),options:s,value:d}):null]})}const sd=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:a})=>{const[i,s]=l({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Oc.RUB,selectBuy:n?.[0]?.currency?.currency||Oc.USD}),d=r((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[t&&n?c("div",{className:"grid gap-m",children:[id({placeholder:"Хочу продать",rates:n,selected:i.selectSell,setSelected:od(i,d,n),value:i.inputSell,setValue:e=>dd(d,n)(e,i.selectSell,i.selectBuy)}),id({placeholder:"Получу",rates:t,selected:i.selectBuy,setSelected:cd(i,d,t),value:i.inputBuy,setValue:e=>md(d,t)(e,i.selectBuy,i.selectSell)})]}):null,a?.text?o(ke,{text:a.text,version:a?.version,...a}):null]})})),od=(e,t,n)=>l=>{t({selectSell:l}),rd({value:l,oppositeValue:e.selectBuy,handleConvert:(l=e.selectSell,a=e.selectBuy)=>{dd(t,n)(e.inputSell,l,a)}})},cd=(e,t,n)=>l=>{t({selectBuy:l}),rd({value:l,oppositeValue:e.selectSell,handleConvert:(l=e.selectBuy,a=e.selectSell)=>md(t,n)(e.inputBuy,l,a)})},dd=(e,t)=>(n,l,a)=>{e({inputSell:Qc(n),selectBuy:a});const r=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===l))?.buyExchangeRate;r&&e({inputBuy:String(Jc(n,r,l===Oc.RUB)||"")})},md=(e,t)=>(n,l,a)=>{e({inputBuy:Qc(n),selectSell:a});const r=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===l))?.saleExchangeRate;r&&e({inputSell:String(Jc(n,r,l===Oc.RUB)||"")})},hd=`${Yt}/exchangerates`;const ud=d((({className:e="",title:t="Курсы обмена валют",button:n,...l})=>{const a=function(e){const t=e?.code||"000",{data:n}=Hn(hd+`?regionCode=${t}`,zt);return n||{}}(Lc()),r=pd(a?.exchangeRate?.currencies),i=r.filter((e=>e.buyExchangeRate));i.unshift({currency:{currency:Oc.RUB}});const s=r.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:Oc.RUB}}),o(g,{className:h("box-border min-h-80",e),...l,children:o(Pe,{className:"h-full",title:o(N,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[r?o(Kc,{className:"mb-xl",exchangeCurrencyItems:r}):null,o(Zc,{address:a?.address})]}),o(sd,{className:"grow w-1/2",currencyRatesBuy:i,currencyRatesSell:s,button:n})]})})})})),pd=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],gd=d((({className:e="",items:t})=>{const n=xe();return o("ul",{className:h("flex flex-col gap-s w-full",e),children:t?.map(xd(n))})})),xd=e=>({dataFooter:t,...n},l)=>{const{text:a,href:r,target:i,onClick:s}=e(n);return a?o("li",{className:"list-none",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:r,target:i||"_self",onClick:s,...be(t),children:a||null})},String(l)):null},fd=e=>t=>!t.displayArea||e.includes(t.displayArea.toLowerCase()),bd=["all","footer"],yd=d((({className:e,navigationItems:t})=>{const n=xe();return o("div",{role:"menu",className:h("w-full flex items-start justify-between flex-col md:flex-row gap-y-m lg:order-2",e),children:t?.filter(fd(bd)).map(n).map(vd)})})),vd=(e,t)=>{const{text:n,items:l=[],href:a,target:r="_self",onClick:i,dataFooter:s}=e,d=l.filter(fd(bd));return c("div",{role:"menuitem",className:"flex flex-col gap-s w-full @md:w-1/4",children:[o("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:r,onClick:i,...be(s),children:n}),d?o(gd,{items:d}):null]},String(t))},Nd=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:h("space-y-m",e),children:t.map(wd)}):null)),wd=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o($e,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(kd)})]},String(t)),kd=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:Sd(e.type,e.text)}),o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),Sd=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${Cd(t)}`,children:o($e,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},Cd=e=>e.replaceAll(/\D/g,""),Id=d((({className:e="",index:t,text:n,...l})=>{const a=xe(),{href:r,target:i,onClick:s}=a(l);return o("a",{className:h("text-secondary-text",e),href:r,target:i,onClick:s,children:n||`Документ ${t}`})})),Td=d((({className:e="",title:t,links:n})=>o("div",{className:e,children:n?.length?c("div",{className:"flex justify-between lg:items-center flex-col lg:flex-row gap-lg py-lg border-y border-y-main-divider",children:[o("div",{className:"lg:hidden",children:o($e,{size:"text-l",font:"font-normal",children:t})}),n.map(((e,t)=>o(Id,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),Bd="w-full lg:w-52",Md={width:"118",height:"24"},Pd={"bg-white":"color",transparent:"white"},Vd={"bg-white":"text-primary-main",transparent:"text-white"},Rd=(e,t,n)=>o(ae,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:Pd[e]},className:Vd[e],width:n?.width,height:n?.height}),zd={"bg-white":"text-primary-text",transparent:"text-white"},Dd=d((({className:e,href:t="/",logo:n,children:l,targetBlank:a,bgColor:r="bg-white",showTitle:i=!0,data:s})=>c("a",{className:h("inline-flex items-center font-sans no-underline",e),href:n?.href??t,target:a?"_blank":"_self","aria-label":n?.title??"Россельхозбанк",...be(s),children:[Rd(r,n?.image,Md),i?l??o("div",{className:"ml-s",children:o($e,{font:"font-medium",color:zd[r],size:"",children:n?.title??"Россельхозбанк"})}):null]})));function _d(e,t,n=300){a((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}const $d=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:n,s1Matches:l,s2Matches:a}=function(e,t){const n=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),l=Array.from({length:e.length}),a=Array.from({length:t.length});let r=0;for(let i=0;i<e.length;i++){const s=Math.max(0,i-n),o=Math.min(i+n,t.length-1);for(let n=s;n<=o;n++)l[i]||a[n]||e[i]!==t[n]||(r++,l[i]=!0,a[n]=!0)}return{m:r,s1Matches:l,s2Matches:a}}(e,t);if(0===n)return 0;const r=function(e,t,{s1Matches:n,s2Matches:l}){let a=0;for(let r=0,i=0;r<e.length;r++){if(!n[r])continue;let s=i;for(;s<t.length;s++)if(l[s]){i=s+1;break}e[r]!==t[s]&&a++}return a}(e,t,{s1Matches:l,s2Matches:a}),i=(n/e.length+n/t.length+(n-r/2)/n)/3,s=i>.7?.1*function(e,t){let n=0;for(;e[n]===t[n]&&n<4;)n++;return n}(e,t):0;return i+s*(1-i)};const jd=(e,t)=>(n,l)=>{for(const[a,r]of l)n.set(a,e(n.get(a)||t,r));return n},Ld=(e=[])=>e.reduce(((e,t)=>e+t),0),Ad=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),Od=e=>t=>e.map((([e,n])=>[$d(t)(e),n])).filter((([e])=>e>=.8)).map((([e,t])=>Fd(t,e))).reduce(jd(Math.max,0),new Map),Ed=e=>t=>{return Vi(t,t.map((({title:e})=>e)).map((e=>t=>{const n=Ad(t||"");return n.length?Ld(e.map((e=>ri(n.map($d(e)))))):0})(e))).sort((e=>(t,n)=>-e(t,n))((n=([,e])=>e,(e,t)=>n(e)-n(t)))).map((([e])=>e));var n},Fd=(e,t)=>new Map(e.map((e=>[e,t]))),Ud=({basePathList:e,initialQuery:t=""})=>{const[n,r]=l(t||"");a((()=>{null!=t&&r(t)}),[t]);const{data:i}=Hn(e?.length?e:null,Wd),[s,o]=l(null);return _d((()=>{i&&o(i.map((e=>t=>{const{corpus:n,dictionary:l}=t||{};if(!(e&&n?.length&&l&&Object.keys(l).length))return[];const a=Ad(e);if(!a.length)return[];const r=Object.entries(l),i=[...a.map(Od(r)).reduce(jd(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>n[e]));return Ed(a)(i)})(n)))}),[i,n]),[s,{value:n,onChange:r}]},Wd=async(...e)=>(await Promise.allSettled(e.map((e=>Rt(L(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),Hd=d((({initialQuery:e,navigationItems:t,onClose:n})=>{const l=i((()=>t?.map((e=>e.href||"/"))),[t]),[a,r]=Ud({basePathList:l,initialQuery:e}),s=i((()=>Yd(t)(a)),[t,a]);return o(fr,{head:o(Tc,{autoFocus:!0,...r}),onClose:n,children:o(yd,{navigationItems:s})})})),Yd=e=>t=>e?.length&&t?.length?Vi(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:L("/",t)})))}))):[],Xd=d((({className:e,search:t,...n})=>{const[a,i]=l(""),s=r((()=>i("")),[]),d=pn(Hd,n),m=r((e=>{i(e),Kd(e)&&d.open({initialQuery:e,onClose:s})}),[s,d]);return c("div",{className:h("relative",e),role:"search",children:[o(Tc,{value:a,placeholder:t?.placeholder,onChange:m}),o(xr,{className:"absolute top-0 right-0 sm:hidden",onClose:s})]})})),Kd=e=>e&&e.length>=3,qd=(e,t)=>{const{logo:n}=e??{},{dataHeader:l,dataFooter:a,...r}=n??{};return c("div",{className:"flex items-stretch gap-3xl",children:[o(Dd,{className:Bd,logo:r,data:a,showTitle:!1}),o(Xd,{className:"grow",navigationItems:t,...e})]})},Gd=d((({className:e="",index:t,...n})=>{const l=xe(),{href:a,target:r,text:i,onClick:s}=l(n);return o("a",{className:h("text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px]",e),href:a,target:r,onClick:s,children:i||`Документ ${t}`})})),Zd=d((({className:e="",links:t,license:n})=>c("div",{className:h("@container space-y-lg",e),children:[n?o("div",{children:o($e,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} ${n}`})}):null,t?.length?o("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs",children:t.map(((e,t)=>o(Gd,{index:t,...e},String(t))))}):null]}))),Jd=Ot((({className:e,footer:t,...n})=>{const{navigationItems:l}=n.options?.page?.navigation??{},a=n.options?.page?.common??{},{documents:r,relatedEnterprises:i,contacts:s,mediaLinks:d=[],horizontalNavigationTitle:m,feedbackButton:u,license:p,otherLinks:x=[]}=t??{};return c(g,{tag:"footer",className:h("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[qd(a,l),c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(yd,{navigationItems:l}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:h(Bd,"flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(Nd,{items:s}),u?o(ke,{className:"w-full",version:"primary",...u}):null,d.map(((e,t)=>o(tc,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),x.map(((e,t)=>o(Mr,{className:"text-s font-light",...e},`${e.href}_${t}`)))]})]}),o(Td,{title:m,links:i}),o(Zd,{links:r,license:p})]})})),Qd=d((({className:e="",title:t,description:n,calendar:l,...a})=>c(g,{className:h("space-y-m",e),defaultPadding:"p-6xl",...a,children:[o(S,{title:t,description:n,headlineVersion:"M",isEmbedded:!0}),l?em(l):null]}))),em=e=>{const t=100/(e.reduce(((e,t)=>t?.month?.length?e+t.month.length:e),0)||1),n=e.filter((e=>e?.month?.length)).map((e=>({...e,flexBasis:`${e?.month?.length?e.month.length*t:""}%`})));return c("div",{className:"w-full flex flex-col justify-center gap-s",children:[o("div",{className:"flex w-full text-h6 text-center",children:n.map((e=>tm(e,t)))}),o("div",{className:"flex gap-s w-full",children:n.map(((e,t)=>c("div",{className:"border-r border-main-divider last:border-r-0 space-y-s",style:{flexBasis:e.flexBasis},children:[o("div",{className:"flex gap-s",children:nm(e)}),c("div",{className:"text-s",children:[o($e,{size:"text-s",font:"font-light",color:"text-primary-text",children:e.text})," ",o($e,{size:"text-s",font:"font-light",color:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},tm=(e,t)=>e.month?.map(((e,n)=>o("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${n}`))),nm=e=>e.month?.map((e=>e.image?.src?o("div",{className:"h-52 border-r pr-s border-main-divider last:border-r-0",children:o(ae,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),lm=Ot((({className:e,title:t,button:n,regionSource:a,data:r,...i})=>{const[s,d]=l({key:""}),m=a?.regions??[],u=m?.find((e=>e.name===s.key))?.href;return o(g,{className:e,defaultPadding:"p-6xl",...i,children:c("div",{className:"container space-y-m",children:[t?o(N,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(_n,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:m.map((({name:e=""})=>({key:e,text:e}))),value:s,onChange:d}):null,u?o("div",{className:"text-center",children:o(Mr,{className:h("w-full @xl:w-auto"),href:u,target:"_blank",version:n?.version??"primary",data:Jo(r,s?.key),children:n?.text?n.text:"Перейти"})}):null]})})}));function am(e=[]){const t=V(),n=Array.from(e.entries()).filter((([,e])=>rm(t)(e)));return n.find((([,e])=>rm(t,!0)(e)))??n[n.length-1]??[]}const rm=(e,t=!1)=>({href:n})=>{if(!n)return!1;const l=j(im(e)(n));return t?l===j(n):l.startsWith(j(n))},im=e=>t=>{const n=J(Z.SITE_URL);return D(t)?e.href:L(n,e.pathname)},sm=d((({className:e="",items:t,activeItem:n,ariaLabel:l="Меню"})=>{const[i,{setFalse:d,toggle:m}]=an(!1),u=xn(d),p=s(null),g=r((({isOpened:e,buttonRef:t,menuRef:n})=>{if(e&&t.current&&n.current){const e=n.current.getBoundingClientRect(),l=t.current.getBoundingClientRect(),a=globalThis.innerWidth-e.width;e.right>=globalThis.innerWidth?n.current.style.left=`${a}px`:l.left>e.left&&(a>l.left?n.current.style.left="":n.current.style.left=`${a}px`)}}),[i]);return gn(globalThis,"resize",(()=>g({isOpened:i,buttonRef:u,menuRef:p}))),a((()=>{g({isOpened:i,buttonRef:u,menuRef:p})}),[i]),c("div",{className:h(i?"rounded-md shadow-blue-gray":"",e),ref:u,role:"navigation",children:[o("button",{type:"button",className:"group/btn flex justify-between items-center h-6","aria-label":l,onClick:m,role:"button","aria-labelledby":"labeldiv",children:Array(3).fill(null).map(((e,t)=>o("div",{className:"w-[3px] h-[3px] rounded mr-2xs bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white"},String(t))))}),o("div",{ref:p,className:h("absolute flex flex-col rounded-md bg-white p-xl pb-xs w-56 z-40",{hidden:!i}),"aria-hidden":!i,children:cm(t,n)})]})})),om=d((({isActive:e,...t})=>{const n=xe(),{text:l,href:a,target:r,onClick:i}=n(t);return o("a",{className:h("text-l font-light pb-m hover:text-primary-main",{"text-primary-main":e}),href:a,target:r,onClick:i,role:"link",...be(t?.data),children:l})})),cm=(e,t)=>e?.map(((e,n)=>o(om,{isActive:e===t,...e},e?.text??String(n)))),dm={default:"w-6 h-6",large:"w-12 h-12"},mm=d((({className:e,isRounded:t,buttonSize:n="default",isGrayBg:l=!1,disabled:a,ariaLabel:r="Меню второго уровня",image:i,data:s,onClick:c,version:d})=>o("button",{className:h("group/btn border-0 flex shrink-0 items-center",l?"p-s rounded-full":"p-0 bg-inherit","transparent"===d?"backdrop-opacity-30 bg-white/30":l&&!t?"bg-main-divider":"",t?"w-8 h-8 text-secondary-light hover:text-secondary-hove":`${dm[n]} text-primary-text hover:text-primary-main`,"group-data-transparent:text-white",e),type:"button",disabled:a,"aria-label":r,onClick:c,...be(s),children:o(ae,{image:i,className:h("h-full",{"bg-main-divider/20 rounded-full":t}),imageClassName:"group-hover/btn:text-primary-hover group-hover/btn:invert-0"})}))),hm=e=>globalThis[e],um=(e,t)=>{const n=document.getElementById(t);if(n){const t=hm(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(hm(e))}))}))}return new Promise(((n,l)=>{const a=document.createElement("script");a.src=t,a.async=!0,a.id=t,a.addEventListener("load",(()=>{n(hm(e))})),a.addEventListener("error",(e=>{l(e)})),document.head.appendChild(a)}))};const pm="chatbot",gm="text-page__btn-chat",xm="webchat-js-container:webchat_rshb",fm={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:"/webchat"},bm=d((({chat:e="personal",iconVersion:t,className:n,ariaLabel:l="Чат",version:r})=>{const i=(e=>{a((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]);const t=fm[e??""];return async n=>{if(t)if("personal"!==e){um(`${pm}_business_css`,`${t}/bundle.css`);const e=await um(pm,`${t}/bundle.js`);e?.render&&e.render(xm,!0)}else{const e=n.target;e?.classList.contains(gm)||e?.classList.add(gm),document.getElementById(xm)||um(pm,t)}}})(e);return o(mm,{className:n,image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:l,onClick:i,buttonSize:"large",isGrayBg:!0,version:r})})),ym=d((({className:e="",active:t,dataItemName:n,children:l,data:a,...r})=>{const i=xe(),{href:s,target:d,text:m,onClick:u}=i(r);return c("a",{className:h("relative inline-block bg-transparent text-center no-underline",e),href:s,target:d,"data-item-name":n,onClick:u,...be(a),children:[o("span",{className:vm(t),children:m||l}),t?o("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-white"}):null]})})),vm=(e=!1)=>h("font-sans text-l lg:font-light",e?"text-primary-main":"text-primary-text hover:text-primary-main","group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),Nm=d((({observerOptions:e,onVisibilityChange:t,children:n,className:l,...a})=>{const i=Xr(r((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:i,className:l,role:"menuitem",children:o(ym,{...a,children:n})})})),wm={default:"bg-main-divider text-primary-main rounded hover:text-primary-main",transparent:"backdrop-opacity-30 bg-white/30 hover:text-primary-hover text-white"},km=d((({version:e,text:t,mobileText:n,...l})=>{const a=Te()?n:t;return a?o(ke,{className:h("py-s px-lg font-light whitespace-nowrap",wm["transparent"===e?"transparent":"default"]),...l,children:a}):null})),Sm=d((({subItems:e=[],version:t,internetBankButton:n,dropdownMenuAriaLabel:a,chatBotAriaLabel:r})=>{const d="transparent"===t?"white":"black",[,m]=am(e),[h,u]=l(e.length),p=e.slice(h),g=s(null),x={rootRef:g},f=i((()=>e.map(((e,t)=>e=>{u(e?Cm(t):Im(t))}))),[e]);return c("nav",{className:"mt-s flex gap-s items-center justify-between",children:[o("div",{ref:g,className:"overflow-hidden whitespace-nowrap pb-s mt-xs space-x-lg",role:"menu",children:e.map(((e,t)=>o(Nm,{className:h-1<t?"invisible":"",active:e===m,observerOptions:x,onVisibilityChange:f[t],data:e.dataHeader,...e},String(t))))}),p.length?o(sm,{items:p,activeItem:m,ariaLabel:a}):null,z.CHAT_BOT?o(bm,{version:t,iconVersion:d,chat:z.CHAT_BOT,ariaLabel:r}):null,o(km,{version:t,...n})]})})),Cm=e=>t=>Math.max(t,e+1),Im=e=>t=>Math.min(t,e),Tm=e=>e?.length?c("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[o("div",{className:"mb-m",children:o($e,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),o("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>o(Bm,{...e},String(t))))})]}):null,Bm=d((({icon:e,...t})=>{const n=xe(),{text:l,target:a,href:r,onClick:i}=n(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ae,{image:e}):null,l?o("a",{className:"hover:text-primary-hover",href:r,target:a,onClick:i,children:o($e,{size:"text-l",font:"font-light",color:"text-primary-text",children:l})}):null]})})),Mm=(e,t)=>n=>n.name?o(Qo,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:Jo(e,n.name),children:o($e,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,Pm=d((({className:e,searchTerm:t,onSearch:n})=>c("form",{className:`font-sans relative ${e}`,children:[o("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:o("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),o("input",{id:"search-bar-input",className:h(yn,"h-12 pl-m w-full peer text-l text-black rounded-md box-border"),value:t,onChange:e=>n(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),Vm=d((({defaultLocation:e})=>{const t=Lc(e),n=xe(),{href:l}=n({href:`/branches/${t.slug}`});return t?o("div",{className:"mb-s",children:c(w,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(Qo,{href:l,className:"inline mx-2xs text-primary-main",children:t.name})]})}):null})),Rm=d((({foreignOffices:e,branches:t,onClose:n})=>{const a=Ac(t?.default),[s,d]=l(""),m=Ma(),h=i((()=>Dm(m).sort(((e,t)=>e.name.localeCompare(t.name)))),[m]),u=i((()=>((e,t)=>{const n=new Map;for(const l of e){const e=t(l),a=n.get(e)||[];n.set(e,[...a,l])}return n})(h,zm)),[h]),p=r((e=>{a.location=e,n?.()}),[a,n]);return c(fr,{className:"pb-20",head:c("div",{children:[o($e,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),o(Vm,{defaultLocation:t?.default}),o(Pm,{onSearch:d,searchTerm:s})]}),onClose:n,children:[s&&s.length>=3?o("div",{children:h.filter((({name:e})=>e&&$d(e.toLowerCase())(s.toLowerCase())>=.8)).map(Mm(t?.dataSelect,p))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(u.entries()).map((g=p,x=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o($e,{size:"text-h6",children:e})}),t.map(Mm(x,g))]},e)))}),Tm(e)]});var g,x})),zm=e=>e.name?.charAt(0)??"",Dm=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()??""}))),_m=d((({className:e="",active:t,flat:n,children:l,data:a,...r})=>{const i=xe(),{href:s,target:c,text:d,onClick:m}=i(r);return o("a",{className:h($m(t,n),e),href:s,target:c,onClick:m,rel:"noopener noreferrer","aria-label":`Ссылка на ${d}`,...be(a),children:o("span",{suppressHydrationWarning:!0,className:jm(t,n),children:d||l})})})),$m=(e=!1,t=!1)=>h("inline-block border border-solid bg-transparent text-center no-underline",e?"rounded-md border-primary-main group-data-transparent:border-white":"border-transparent",{"px-m py-xs":!t}),jm=(e=!1,t=!1)=>h("font-sans text-s font-light",e?"text-primary-main":h(t?"text-primary-text":"text-secondary-text","hover:text-primary-main"),"group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),Lm=d((({className:e,version:t,...n})=>{const l="transparent"===t?"white":"black",a=Lc(n?.branches?.default),i=pn(Hd,n),s=pn(Rm,n),d=r((()=>i.open({})),[i]),m=r((()=>s.open({})),[s]);return c("div",{className:h("flex items-center ml-5 md:max-w-[300px] xl:max-w-full gap-lg",e),role:"navigation",children:[n?.branches?.visible?o(_m,{className:"whitespace-nowrap text-ellipsis overflow-hidden",flat:!0,href:"#",text:a?.name,data:Jo(n?.branches?.dataClick,a?.name??""),onClick:m}):null,n?.officesAtms?.href?o(_m,{className:"whitespace-nowrap",flat:!0,...n.officesAtms}):null,o(mm,{image:{icon:"LoupeIcon",iconVersion:l},ariaLabel:n?.search?.ariaLabel??"Поиск",onClick:d,data:n?.search?.data})]})})),Am=d((({observerOptions:e,onVisibilityChange:t,children:n,className:l,...a})=>{const i=Xr(r((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:i,className:l,role:"menuitem",children:o(_m,{...a,children:n})})})),Om=d((({navigationItems:e=[],activeTopItem:t,dropdownMenuAriaLabel:n,version:a,headerData:r,search:d,bgColor:m,logo:h})=>{const[u,p]=l(e.length),g=e.slice(u),x=s(null),f={rootRef:x},b=i((()=>e.map(((e,t)=>e=>{p(e?Em(t):Fm(t))}))),[e]),{dataFooter:y,dataHeader:v,...N}=h??{};return c("div",{className:"flex items-center justify-between",children:[o(Dd,{className:"mr-3xl",bgColor:m,logo:N,data:v,showTitle:!1}),o("div",{ref:x,className:"overflow-hidden min-w-[160px] pb-xs mt-xs",role:"menu",children:e.map(((e,n)=>o(Am,{className:u-1<n?"invisible":"",active:e===t,observerOptions:f,onVisibilityChange:b[n],data:e.dataHeader,...e},String(n))))}),g.length?o(sm,{className:"mx-xs",items:g,activeItem:t,ariaLabel:n}):null,o(Lm,{version:a,className:"ml-auto",search:d,navigationItems:e,...r})]})})),Em=e=>t=>Math.max(t,e+1),Fm=e=>t=>Math.min(t,e),Um={"bg-white":"primary",transparent:"transparent"},Wm=["all","header"],Hm=Ot((({className:e,bgColor:t="bg-white",logo:n={},version:l=Um[t],portal:a,header:r={},...i})=>{const{common:s,navigation:d}=Xm(i?.options?.page),{navigationItems:m}=d,{logo:u={}}=s,[,p]=am(m),{internetBankButton:x}=a||{},f=n.image?.icon||n.image?.src||n?.title?n:u;return o(g,{tag:"header",className:h("pt-m px-20",p?.items?.length?"pb-m":"pb-lg",e),defaultPadding:"",version:l,...i,children:c("div",{className:"container",children:[o("div",{className:"whitespace-nowrap",children:o(Om,{activeTopItem:p,navigationItems:m?.filter(fd(Wm)),version:l,headerData:{...r,...d},search:s.search,bgColor:t,logo:f})}),o("div",{className:h("mt-s h-px bg-main-divider",Ym(l))}),p?.items?.length&&o(Sm,{subItems:p?.items?.filter(fd(Wm)),version:l,internetBankButton:x})]})})})),Ym=e=>"transparent"===e?"opacity-30":"",Xm=e=>({navigation:e?.navigation??{},common:e?.common??{}}),Km=(e=!1)=>e?{}:{padding:"p-0"},qm={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Gm=Ot((({className:e="",padding:t="p-0",gap:n="XS",isInnerPadding:l=!0,version:a="transparent",isTheme:r=!1,isCardBorder:i,...s})=>o(g,{className:h("relative","grid grid-cols-12",qm[n],e),padding:t,version:a,isTheme:r,...s,children:P({...s,extraProps:{...Km(l),className:Wr(i)}})})),{childrenTypes:{exclude:["HorizontalLayout"]}}),Zm=d((e=>{const{className:t,align:n,image:l,...a}=e,r=n?h("flex",qi[n]):"";return o(g,{className:h(r,t),defaultPadding:"p-0",...a,children:o(ae,{image:l})})})),Jm=(e,t=0)=>{const{itemCount:n,visibleItemCount:a}=e,[i,s]=l(t),o=r((()=>s((e=>Math.min(e+1,n-1)))),[n]),c=r((()=>s((e=>Math.max(e-1,0)))),[n]),d=a?n>a&&i<n-a:i<n-1,m=i>0;return[i,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]},Qm=({className:e,btnClass:t,canDec:n,canInc:l,dec:a,inc:r})=>n||l?c("div",{children:[n?o(gi,{className:h("absolute z-40",t[0],e),onClick:a}):null,l?o(xi,{className:h("absolute z-40",t[1],e),onClick:r}):null]}):null,eh=d((({className:e="",cards:t=[],button:n})=>{const[a,i]=l(0),s=r((e=>i(e)),[]),d=t.length,[m,h]=Jm({itemCount:d,visibleItemCount:2}),{canDec:u,canInc:p}=h,g=t[m]?.href;return c("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[c("div",{className:"relative overflow-hidden","aria-label":"Страховые программы",children:[d?th({activeIndex:m,cards:t,selectedCardIndex:a,onClick:s}):null,Qm({...h,btnClass:["left-12","right-12"],className:"top-16"}),u?o("div",{className:"absolute top-0 left-0 h-full w-32 bg-opacity-from-white"}):null,p?o("div",{className:"absolute top-0 right-0 h-full w-32 bg-opacity-to-white"}):null]}),o(ke,{className:"w-60 text-center",version:"primary",...n,href:g})]})}));function th({activeIndex:e,cards:t,selectedCardIndex:n,onClick:l}){const a=460*e,r=t.length>2?"justify-start":"justify-center";return o("div",{style:{transform:`translateX(-${a}px)`},className:"duration-1000 px-6xl",children:o("div",{className:`w-full flex flex-nowrap gap-s pb-6xl ${r}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:n,onClick:l}){return c("button",{type:"button",onClick:l,className:"p-3xl min-w-fit flex items-center gap-2xl bg-white border-solid border relative "+(n?"shadow-dark-blue border-primary-main":"ease-in duration-300 border-gray"),children:[e?.icon?o(ae,{className:"p-lg rounded-full bg-secondary-light",image:e.icon,width:"108",height:"108"}):null,c("div",{className:"flex gap-s",children:[e?.sum?nh("страховая сумма",e.sum):null,e?.fee?nh("страховой взнос",e.fee):null]}),lh(n)]},String(t))}({slide:e,i:t,isActive:Boolean(t===n),onClick:()=>l(t)})))})})}function nh(e,t){return c("div",{className:"flex flex-col text-left whitespace-pre",children:[c($e,{size:"text-h6",children:[Ke(2)(t)," ₽"]}),o("div",{className:"mt-2xs",children:o($e,{size:"text-l",color:"text-secondary-text",children:e})})]})}function lh(e){return e?o(ae,{className:"h-6 w-6 min-w-6 min-h-6 absolute right-4 top-4",image:{icon:"DoneIcon"},width:"24",height:"24"}):null}const ah=d((({className:e="",title:t,insuranceTabs:n=[],button:a,...i})=>{const[s,d]=l(0),m=r((e=>d(e)),[]);return c(g,{className:h("box-border overflow-hidden relative px-0 space-y-2xl",e),defaultPadding:"p-6xl",...i,children:[t?o(N,{className:"text-center",title:t,headingType:"h3"}):null,n?.length>1?o("div",{className:"p-xs bg-secondary-light w-fit mx-auto rounded-md",children:n.map(((e,t)=>function({title:e,i:t,isActive:n,onClick:l}){return o("button",{type:"button",onClick:l,"aria-label":`Кнопка ${e}`,className:"box-border px-m py-s text-m font-light "+(n?"bg-primary-main text-white rounded-md":"text-secondary-text"),children:e},String(t))}({title:e?.title,i:t,isActive:Boolean(t===s),onClick:()=>m(t)})))}):null,o("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:rh({insuranceTabs:n,button:a})})]})})),rh=({insuranceTabs:e,button:t})=>{const n=e?.map((e=>e.cards));return n?.length?n.map(((e,n)=>o(eh,{button:t,cards:e},String(n)))):null};const ih={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},sh={XS:"h-10",S:"h-16",M:"h-24",L:"h-32",XL:"h-52"},oh=d((e=>{const{className:t="",__html:n,isDotted:l,investmentZeroColumn:a,investmentColumns:r,...i}=e,s=r?[...r]:[];return a&&s.unshift(a),o(g,{className:t,defaultPadding:"p-4xl",...i,children:c("div",{className:"container text-m font-light space-y-4xl",children:[s?.length?c("div",{children:[c("div",{className:"flex items-end relative pl-3xl pr-lg text-white",children:[Ci(o("div",{className:"w-px h-4 bg-gray"}))(s.map(ch)),o("div",{className:"absolute right-3xl w-px h-4 bg-gray"})]}),o("div",{className:"border-t border-gray -mt-xs mx-3xl"}),o("div",{className:"flex justify-between text-primary-text mt-s -mx-5xl",children:s.map(hh)})]}):null,n?o("div",{className:"max-w-2xl font-light text-base",children:o(De,{__html:n,isDotted:l,itemSize:"list-s"})}):null]})})})),ch=(e,t,n)=>{const l=1===t,a=t===n.length-1,r=e.cells?.reverse()||[];return o("div",{className:`${dh(l,a,e.cells)}`,children:r.length?o("div",{className:"w-full "+(a?"border-4 border-green-more-dark p-1.5 min-w-72":""),children:r.map(mh)}):null},`column_${t}`)},dh=(e,t,n=[])=>[n.length?"flex-1":"flex-0",!n.length||e||t?"":"pl-s",n.length&&!t?"pr-s pb-3xl":"pb-xl"].join(" "),mh=(e,t)=>{const n=e.cellSize||"XS",l=e.cellColor||"green";return e.text?o("div",{className:`flex-1 flex items-center justify-center relative py-xs ${sh[n]} ${ih[l]} ${"XS"===n?"px-s":"px-5xl"}`,children:o($e,{align:"text-center",children:e.text})},`cell_${t}`):null},hh=(e,t)=>e?.title?o("div",{className:"flex-1 max-w-44 text-center px-xs last:pr-4xl last:max-w-52",children:e.title},`title_${t}`):null,uh=["байт","Кб","Мб","Гб","Тб","Пб"],ph=d((({icon:e,text:t,href:n,target:l,fileFormat:a,data:r,fileSize:i})=>{const s=i&&a?",":"",d=i??"",m=a?String(a):"";return c("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",href:n,target:l,...be(r),children:[e,t?c($e,{size:"text-l",font:"font-light",children:[t," ",gh(d,m),o($e,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),gh=(e,t)=>e||t?o("span",{children:", "}):"",xh=(e,t)=>(n,l)=>{const a=W(e)("Attachment"===n?.docType?n?.attachment?.src:n?.href),r="Attachment"===n?.docType?((e,t=2)=>{if(0===e)return"";const n=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,n)).toFixed(t))} ${uh[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,i="Attachment"===n?.docType?bh(a):n?.fileFormat;return c("div",{role:"listitem",children:[o(ph,{text:n?.text,target:n?.target,href:a,fileFormat:i,fileSize:r,icon:fh(t),data:n?.data}),o(De,{__html:n?.__html})]},String(l))},fh=e=>e?o(ae,{className:"min-w-6 min-h-6",image:e,width:"24",height:"24"}):null,bh=e=>{if(!e)return"";const t=e.lastIndexOf("."),n=new RegExp(/\/(.*)/),l=-1!==t?e.substring(t+1):"";return l.includes("/")?l.replace(n,""):l},yh=d((({href:e,__html:t,target:n,onClose:l})=>c(fr,{className:"my-6xl min-h-fit w-fit mx-auto",onClose:l,children:[t?o(De,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(Mr,{href:e,target:n,version:"primary",ariaLabel:"Ссылка на согласие",onClick:l,children:"Я согласен"}),o(gr,{type:"button",version:"secondary",onClick:l,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]}))),vh=d((({text:e,href:t,target:n,__html:l,icon:a})=>{const{open:i}=pn(yh),s=r((()=>i({__html:l,href:t,target:n})),[l,t,n]);return e?c("button",{className:"flex gap-s text-primary-text no-underline hover:text-primary-main",onClick:s,children:[fh(a),o($e,{font:"font-light",children:e})]}):null})),Nh={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},wh=Ot((({className:e="",title:t,description:n,align:l="text-center",documents:a,icon:r={icon:"DocIcon"},columnsMode:i="double",...s})=>{const d=V();return c(g,{className:h("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(S,{title:t,description:n,align:l,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:h("grid gap-xl","double"===i?"@md:grid-cols-2":"grid-cols-1",Nh[i]),role:"list",children:a.map(kh(d,r))}):null]})})),kh=(e,t)=>(n,l)=>{const a=n?.docType;return""===a?null:"reportSource"in n&&n?.reportSource?.__html?Sh(t)(n,l):xh(e,t)(n,l)},Sh=e=>(t,n)=>{const l={text:t.text,target:t.target,__html:t.reportSource?.__html};return t.reportSource?.__html&&t.text?c("div",{role:"listitem",children:[o(vh,{...l,icon:e,href:Ch(t)?t?.href:t?.attachment?.src}),o(De,{__html:t?.__html})]},String(n)):null},Ch=e=>"href"in e,Ih=Ot((({className:e,padding:t,align:n="text-left",buttons:l=[],description:a,image:r,__html:i,headingType:s,qr:d,additionalDescription:m="",title:u="Мобильное приложение",version:p="primary",...x})=>{const f="secondary"===p?"p-m min-w-32":"min-w-24",b=r?.src?o(ae,{className:"hidden lg:block",image:r}):null;return o(g,{className:h("min-h-80",e),padding:"p-0",version:p,...x,children:c(Pe,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(N,{headingType:s,title:u,className:h("whitespace-pre-wrap",n)}),rightImage:b,buttons:We(l,{className:"flex-wrap"}),children:[a?o($e,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:h("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[i?o(De,{__html:i,itemSize:"list-m"}):null,o($e,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:h("flex justify-center bg-white rounded-md @xl:-order-1",f),children:o(ae,{className:"w-fit",image:d})}):null,r?.src?o(ae,{className:"lg:hidden",image:r}):null]})]})})})),Th=(e,t)=>e&&"underlined"!==t?"primary":"secondary",Bh=(e=[],t={})=>e.filter((({content:e={}})=>zi(t,e))).length,Mh=(e,t)=>e===t;const Ph=(e=>(t,n)=>t===n||Boolean(t&&n&&Object.keys(t).length===Object.keys(n).length&&Object.entries(t).every((([t,l])=>e(l,n[t])))))(function(...e){return(t,n)=>e.some((e=>e(t,n)))}(Mh,((e=Mh)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,l)=>e(t,n[l])))))())),Vh=[],Rh={},zh={primary:"bg-white/30",secondary:"bg-main-divider"},Dh={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},_h=d((({count:e,version:t="secondary"})=>{const n=Te(),l=n?"bg-main-divider":zh[t],a=Dh[t][n?"mobile":"desktop"];return o("div",{className:h("w-6 h-6 rounded-full flex items-center justify-center",l),role:"status","aria-label":`Количество ${e} доступных программ и сервисов`,children:o($e,{size:"text-xs",color:a,children:e})})})),$h=({text:e,description:t,icon:n,isActive:l,type:a})=>{const r=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white"),text:e?"mb-xs text-xl":"mb-2xs text-l text-primary-text",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal",oldText:"text-m text-center",oldDesc:"text-m-light"}))(l);return c("div",{className:h("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,"aria-labelledby":`${e}-label`,children:[n?o(ae,{className:h("h-6 w-6 min-w-6 min-h-6",r.icon),image:{...n,iconVersion:n?.iconVersion??r.iconVersion},width:"24",height:"24",alt:e}):null,c("div",{className:"border-0",children:[o("div",{className:"animated"===a?r.text:r.oldText,children:e}),o("div",{className:"animated"===a?r.desc:r.oldDesc,children:t})]})]})},jh={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},Lh={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},Ah={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},Oh={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},Eh=d((({tag:e="div",item:t={},isActive:n=!1,type:l="default",onClick:a})=>{const r=e,{text:i,description:s,icon:d,count:m,tabName:u,...p}=t;return o(r,{className:h("h-12","block flex-1","cursor-pointer",jh[l],n?Oh[l]:Ah[l]),"aria-label":"Список табов",onClick:a,...p,children:c("div",{className:h("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?Lh[l]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${i}`,children:[$h({text:i,description:s,icon:d,isActive:n,type:l}),Number.isInteger(m)?o("div",{className:"ml-xs",role:"status","aria-label":`Количество программ и сервисов ${m}`,children:o(_h,{count:m,version:Th(n,l)})}):null]})})})),Fh=d((e=>o(e?.item?.href?Uh:Wh,{...e}))),Uh=d((e=>{const t=xe(),n=r((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:l,...a}=t({...e.item,onClick:n});return o(Eh,{...e,tag:"a",item:a,onClick:l})})),Wh=d((({item:e={},onClick:t,...n})=>{const l=r((()=>{t&&t(e)}),[t,e]);return o(Eh,{item:e,onClick:l,...n})})),Hh=(e,t,n)=>(l,a)=>o(Fh,{isActive:l===e,onClick:t,type:n,item:l},String(a)),Yh=d((({className:e,tabsType:t="default",items:n=[],activeItem:l,onChange:a})=>o("div",{className:h("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel","aria-label":"Панель управления табами",children:n.map(Hh(l,a,t))}))),Xh={categories:[],extraOptions:[],propertyType:[],stage:[]},Kh=Ot((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:l,...a})=>{const[s,{blocksToRender:d},{field:m,reset:u,update:p}]=_i(Xh,{block:a.block,page:a.options?.page}),x=r(((e=Xh)=>p(e)),[]),f=(({hotFilters:e=Vh,filtrationState:t=Rh,blocks:n=Vh,onFiltrationStateChange:l})=>{const a=i((()=>Math.max(0,e.findIndex((e=>Ph(e.filter,t))))),[e,t]),s=i((()=>e.map((t=>({text:t.text,count:Bh(n,t.filter),version:Th(t===e[a])})))),[e,n,a]),o=r((t=>{l(e[s.indexOf(t)].filter)}),[e,s]);return{activeItem:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:x});return c(g,{className:h("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(Yh,{...f}),o(Ti,{filtrationSchema:n,resetButton:l,field:m,reset:u}),o(ki,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),qh=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),Gh=d((({children:e})=>qh?e:null)),Zh="/icons/MapMarkerClusterIcon.svg",Jh="/icons/MapMarkerClusterYellowIcon.svg";function Qh({yandexMaps:e,map:t,points:n,isLoad:l}){if(l||!n)return;if(t.geoObjects.removeAll(),!n.length)return;const a=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),r=eu("offices",e,a);if(n.length&&n.every((e=>"type"in e))){const l=eu("workplaces",e,a),i=tu(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=tu(n.filter((e=>"offices"===e.type)),"offices",e);r.add(s),l.add(i),t.geoObjects.add(l),t.geoObjects.add(r)}else{const l=tu(n,"offices",e);r.add(l),t.geoObjects.add(r)}t.setBounds(e.util.bounds.fromPoints(n.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const eu=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?Zh:Jh,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),tu=(e,t,n)=>e.map((({coords:e,content:l})=>new n.Placemark(e,{balloonContentHeader:l?.header,balloonContentBody:l?.body,balloonContentFooter:l?.footer,hintContent:l?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?Zh:Jh,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),nu={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},lu={...nu,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},au=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(lu).join(" ")} ${n}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.current.geoObjects.add(t.geoObjects)}))},children:o(K,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),ru=()=>function(e,t,n=!0){const[r,i]=l(void 0);return a((()=>{let l=!0;return um(e,t).then((e=>{l&&i(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(l=!1,n){const e=document.getElementById(t);e&&document.head.removeChild(e),i(void 0)}}}),[e,t,n]),r}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${z.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1),iu={...nu,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},su=d((({yandexMaps:e,direction:t="in"})=>{const n="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const n=e.current.getZoom(),l="in"===t?n+1:n-1;e.current.setZoom(l,{checkZoomRange:!0})},className:`${Object.values(iu).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(K,{name:n,width:"20",height:"16"})})})),ou=[55.753995,37.614069],cu=d((({points:e,className:t="",zoom:n=5,isLoad:l,selectedAddress:r})=>{const i=s(null),d=s(null),m=ru();if(a((()=>{i.current?Qh({yandexMaps:m,map:i.current,points:e,isLoad:l}):m?.ready((()=>{i.current||(i.current=new m.Map(d.current,{center:du(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),Qh({yandexMaps:m,map:i.current,points:e,isLoad:l})})),i.current&&r&&m?.geocode(r).then((e=>{const t=e.geoObjects.get(0).geometry.getCoordinates();i.current.setCenter(t),i.current.setZoom(18)}))}),[m,e,n,l,r]),!m)return null;const u="z-10";return c("div",{ref:d,className:h("relative","w-full",t),children:[l?o(Ir,{}):null,c("div",{className:h("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",u),children:[o(su,{yandexMaps:i}),o(su,{yandexMaps:i,direction:"out"})]}),au(i,m,h("right-2 top-80",u))]})})),du=e=>{const t=[hu(mu(e,0)),hu(mu(e,1))];return t.every((e=>e))?t:ou},mu=(e,t)=>e.map((e=>e.coords?.[t])),hu=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,uu={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},pu={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},gu={workingSaturday:e=>Boolean("workSchedule"in e&&e.workSchedule?.workingSaturday),premiumService:e=>Boolean("premiumService"in e&&e.premiumService),privateBanking:e=>Boolean("privateBanking"in e&&e.privateBanking),remoteWorkplace:e=>Boolean("workScheduleDescription"in e),serviceDisabledPeople:e=>Boolean("serviceDisabledPeople"in e&&e.serviceDisabledPeople),sellingCoins:e=>Boolean("sellingCoins"in e&&e.sellingCoins),buyingCoins:e=>Boolean("buyingCoins"in e&&e.buyingCoins),bullionOperations:e=>Boolean("bullionOperations"in e&&e.bullionOperations),preciousMetalsOperations:e=>Boolean("preciousMetalsOperations"in e&&e.preciousMetalsOperations),transferringDataToBiometricSystem:e=>Boolean("transferringDataToBiometricSystem"in e&&e.transferringDataToBiometricSystem)},xu="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",fu=d((({filters:e,field:{field:t,reset:n},onlyOffice:l,labels:a})=>{const r=l?5:6,i=(e||[]).map((e=>o(Ql,{text:a[e],...t(e)},e))),[s,d]=r>0?[i.slice(0,r),i.slice(r)]:[i,[]],[m,{toggle:h}]=an(!1);return o("div",{children:e?.length?o("div",{children:c(Or,{children:[c("div",{children:[o("div",{className:xu,children:s}),o(Er,{className:xu,isUnfolded:m,children:d})]}),c("div",{className:"flex space-x-lg",children:[l?o(Ar,{label:m?"Меньше фильтров":"Больше фильтров",isUnfolded:m,embedded:!0,short:!0,onClick:h}):null,c(gr,{embedded:!0,onClick:n,children:[o(jr,{children:"Очистить фильтр"}),o(K,{name:"CloseIcon",size:"small"})]})]})]})}):null})})),bu=(e,t,n)=>{const l=Th("all"===t),a=Th("business"===t),r=(e,t,l)=>{const a=e.currentTarget===e.target&&"business"===t?i(l):l;return n(t),a},i=e=>e.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription));return c("div",{className:"flex gap-lg flex-col sm:flex-row pb-lg",children:[o(gr,{"data-id":"all",onClick:t=>r(t,"all",e),version:l,children:"Для физических лиц"}),o(gr,{"data-id":"business",onClick:t=>r(t,"business",e),version:a,children:"Для юридических лиц"})]})},yu=({__html:e,list:t,richVersion:n})=>e||t?.length?c("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?o("div",{className:"mb-2xl",children:o(De,{__html:e,richVersion:n})}):null,t?.length?o("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>c("div",{className:"flex gap-xs items-center",children:[e?.image?o(ae,{image:e.image}):null,e?.text?o($e,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,vu=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(N,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o($e,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),Nu=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>gu[t](e)))))},wu=()=>{},ku=()=>{},Su=e=>"all"===e?"block":"hidden",Cu=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:a=[],renderCard:r=ku,renderRemoteWorkplaceCard:s=ku,getBalloon:d=ku,getBalloonRemoteWorkplaces:m=ku,descriptionData:u,title:p})=>{const g=p?.includes("Офис"),[x,{field:f,reset:b}]=hn(uu),{filteredItems:y,points:v,filteredRemoteWorkplaces:N,lengthItems:w}=(({data:e,remoteWorkplaces:t=[],filtrationState:n={},getBalloon:l=wu,getBalloonRemoteWorkplaces:a=wu})=>{const[r,s,o,c]=i((()=>{const r=Nu(e,n),i=Nu(t,n),s=[...r.map((e=>({type:"offices",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:l(e)}))),...i.map((e=>({type:"workplaces",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:a({address:e.address,workScheduleDescription:e.workScheduleDescription})})))].filter((e=>e.coords&&2===e.coords.length));return[r,s,i,r.length+i?.length]}),[e,t,n,l,a]);return{filteredItems:r,points:s,filteredRemoteWorkplaces:o,lengthItems:c}})({data:t,remoteWorkplaces:a,filtrationState:x,getBalloon:d,getBalloonRemoteWorkplaces:m}),[k,S]=l("all");return c("div",{className:h("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[vu(p,w),u?yu(u):null,g&&bu(t,k,S),o("div",{className:h("pb-3xl",Su(k)),children:o(fu,{filters:Iu([...t,...a]),field:{field:f,reset:b},onlyOffice:g,labels:pu})})]}),o("div",{className:"h-[600px]",children:o(Gh,{children:o(cu,{points:v,isLoad:n,className:"h-full"})})})]}),c(Gh,{children:[y.map(r),N.map(s)]})]})})),Iu=e=>Object.keys(uu).filter((t=>e.filter((e=>gu[t](e))).length)),Tu=e=>e?`${e.charAt(0).toUpperCase()}${e.slice(1)}`:"",Bu={yellow:{border:"border-yellow-light",text:"text-yellow"},green:{border:"border-green-more-light",text:"text-green-dark"},gray:{border:"border-gray",text:"text-secondary-text"},red:{border:"border-error/30",text:"text-error"}},Mu=d((({className:e,children:t,color:n="gray"})=>c("div",{className:h("sm:p-s sm:border sm:border-green rounded-md flex items-center h-fit",Bu[n].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(ae,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o($e,{size:"text-m",color:Bu[n].text,children:t})]}))),Pu=d((({value:e,subText:t,children:n,isPhone:l,...a})=>{const r=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[r.length,n,t].every((e=>!e))?null:Vu({textItems:r,subText:t,children:n,isPhone:l,...a})})),Vu=({label:e,labelSize:t="text-m",textItems:n,subColor:l,subText:a,className:r,children:i,isPhone:s=!1})=>c("div",{className:h("flex gap-2xs flex-col h-full max-w-[300px]",r),children:[e?o($e,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,i||Ru(n,s),a?o($e,{color:l,size:"text-m",children:a}):null]}),Ru=(e,t)=>e.filter(Boolean).map(((e,n)=>o($e,{size:"text-l",children:t?o("a",{href:`tel:${zu(e)}`,children:e.trim()}):e.trim()},String(n)))),zu=e=>e.replace(/\D/g,""),Du=d((({className:e,children:t})=>o("div",{className:h("flex flex-col sm:flex-row sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),_u=d((({children:e})=>{const[t,{toggle:n}]=an(!1);return c("div",{children:[o("div",{className:"hidden sm:block",children:e}),c(Or,{className:"block sm:hidden",children:[o(Er,{isUnfolded:t,children:e}),o(Ar,{className:"my-m mr-m border-b border-solid border-main-divider",label:t?"Скрыть":"Подробнее",isUnfolded:t,embedded:!0,onClick:n})]})]})})),$u=({location:e,address:t,billAcceptorType:n,terminalType:l,billAcceptorEnable:a,atmCode:r="",atmAccess:i="",workTime:s},d)=>{const m=[{label:"Устройство",value:Tu(l)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===n?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(i)?"Общедоступный":""},{label:"Регистрационный номер",value:r}];return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o($e,{size:"text-h4",children:Tu(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(K,{name:"GeolocationIcon",width:"24",height:"24"}),o($e,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(Mu,{color:"green",children:Tu(s)})})]}),o(_u,{children:o(Du,{className:"flex-wrap",children:m?.map(((e,t)=>o(Pu,{...e},String(t))))})})]},String(d))},ju=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${Tu(t)} №${n}`,body:e.toUpperCase()}),Lu=[];const Au=async e=>{const t=await Rt(e,{method:"GET"});return Array.isArray(t)?t:Lu},Ou={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},Eu={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable),locationDisabledPeople:e=>Boolean(e.locationDisabledPeople),designDisabledPeople:e=>Boolean(e.designDisabledPeople)},Fu=d((({descriptionData:e,className:t})=>{const n=Lc(),l=n?.code??"000",{data:a,isLoad:r}=function(e){const{data:t,error:n}=Hn(`${Yt}/atms?regionCode=${e}`,Au);return{data:t||Lu,isLoad:!t&&!n}}(l);return o(Cu,{className:t,filterItems:Uu,data:a,isLoad:r,initFilterState:Ou,renderCard:$u,getBalloon:ju,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),Uu=(e,t)=>{const n=Object.keys(t).filter((e=>t[e])),l=n.filter((e=>e.startsWith("terminalType"))),a=n.filter((e=>!l.includes(e)));return e.filter((e=>{const t=a.every((t=>Eu[t](e))),n=!l.length||l.some((t=>Eu[t](e)));return t&&n}))},Wu=e=>{const t=Yu(e);return o(Pu,{label:"Режим работы",value:t,className:"max-w-none"})},Hu=({workTime:e="",lunchHour:t="",daysOff:n=""},l=!1)=>e?[`${l?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",Yu=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[Hu({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":l}),Hu({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:l},!0)].filter(Boolean)},Xu=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Ku=e=>Xu.map((([t,n,l])=>({key:t,title:l,short:n,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),qu=e=>{if(!e)return null;const t=Gu(e);return c(Du,{className:"border-none",children:[o(Pu,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(Zu)})}),o(Pu,{label:"Режим работы",className:"max-w-none",children:o($e,{children:e})})]})},Gu=e=>{const t=Xu.map((([,e])=>({short:e,status:!0}))),n=e.split("/")??[],l=n[n.length-1]?.toLowerCase();return l?.includes("выходной")?t.map((e=>({...e,status:!l?.includes(e.short.toLowerCase())}))):t},Zu=({short:e,status:t},n)=>o("div",{className:h("w-9 h-9 rounded-md flex items-center justify-center",t?"bg-green-more-light text-green-dark":"bg-error/30 text-error"),children:o($e,{size:"text-xs",children:e})},String(n)),Ju=({currency:e,buyExchangeRate:t,saleExchangeRate:n},l)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Pu,{label:"Валюта",value:e.currency}):null,t?o(Pu,{label:"Купить",value:String(t)}):null,n?o(Pu,{label:"Продать",value:String(n)}):null]},String(l)),Qu=(new Date).getDay(),ep=e=>{const[t]=e?.slice(Qu-1)??[];if(!t)return null;const{lunchHour:n,status:l,workTime:a,hasLunch:r}=t;return l?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?o(Mu,{color:"green",children:a}):null,n&&r?o(Mu,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(Mu,{color:"red",children:"Выходной"})},tp=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",np=({title:e,status:t,workTime:n,lunchHour:l,hasLunch:a},r)=>o(Pu,{label:e,value:t&&n?n:"",subText:tp({lunchHour:l,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(r)),lp=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,ap=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,rp=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,ip=(e,t)=>{if(!e.workSchedule)return null;const n=Ku(e.workSchedule);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o($e,{size:"text-h4",children:e.name}),e.address?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(K,{name:"GeolocationIcon",width:"24",height:"24"}),o($e,{size:"text-l",children:e.address})]}):null]}),ep(n)]}),o(_u,{children:sp(e)})]},String(t))},sp=({phone:e,fax:t,phoneBusiness:n,phoneNatural:l,phoneCallCentre:a,phoneCurrencyControl:r,workSchedule:i,exchangeRate:s})=>{const d=Ku(i),m=i?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(Du,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(Pu,{label:"Факс",value:t,isPhone:!0}),o(Pu,{label:"Телефон филиала",value:e,isPhone:!0}),o(Pu,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(Pu,{label:"Обслуживание физических лиц",value:l,isPhone:!0}),o(Pu,{label:"Для консультаций по валютному контролю",value:r,isPhone:!0}),o(Pu,{label:"Контакт-центр",value:a,isPhone:!0})]}),i?.isMatchesPattern?o(Du,{children:o(Pu,{label:m,labelSize:"text-l",className:"w-full max-w-none",children:o("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:d?.map(np)})})}):c(Du,{children:[o(Pu,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(Zu)})}),Wu(d)]}),i?.businessScheduleVisibleTag?qu(i?.businessScheduleDescription):null,s?.currencies?.length?o(Du,{className:"flex-wrap",children:s?.currencies?.map(Ju)}):null]})},op=({name:e="",address:t="",workSchedule:n})=>{const l=(a=e)?`${a?.charAt(0)?.toUpperCase()}${a?.slice(1)}`:"";var a;const r=`${t} ${(e=>{const t=Ku(e),n=e?Yu(t):"",l=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?lp(n):rp(n,l):ap(n):""})(n)}`;return{header:l,body:r}},cp=({address:e,workScheduleDescription:t},n)=>t?c("div",{className:"bg-white col-span-12 p-3xl sm:border-yellow sm:border",children:[o("div",{className:"sm:flex sm:justify-between",children:c("div",{children:[o($e,{size:"text-h4",children:"Удаленное рабочее место"}),e?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(K,{name:"GeolocationIcon",width:"24",height:"24"}),o($e,{size:"text-l",children:e})]}):null]})}),o(_u,{children:dp(t)})]},String(n)):null,dp=e=>c("div",{children:[c(Du,{className:"flex",children:[o(Pu,{label:"Операции для физических лиц",children:o($e,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(Pu,{label:"Операции для физических лиц",children:o($e,{children:"Оформление и обслуживание банковских карт"})}),o(Pu,{label:"Операции для физических лиц",children:o($e,{children:"Инвестиционное и накопительное страхование"})}),o(Pu,{label:"Операции для физических лиц",children:o($e,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(Pu,{label:"Режим работы",className:"max-w-none",children:o($e,{children:e})})]}),mp=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),hp={branches:[],remoteWorkplaces:[]};const up=async e=>await Rt(e,{method:"GET"})||hp,pp=d((({className:e})=>{const t=Lc(),n=t?.code??"000",{data:l,isLoad:a}=function(e="000"){const{data:t,error:n}=Hn(`${Yt}/branchesAndRemoteWorkplaces?regionCode=${encodeURIComponent(e)}`,up);return{data:t||hp,isLoad:!t&&!n}}(n);return o(Cu,{className:e,data:l?.branches,isLoad:a,remoteWorkplaces:l?.remoteWorkplaces,renderCard:ip,renderRemoteWorkplaceCard:cp,getBalloon:op,getBalloonRemoteWorkplaces:mp,title:`Офисы филиала ${t?.name}`})})),gp=d((({data:e,className:t,...n})=>{const l=e?.dataType??"offices";return o(g,{version:"transparent",className:h(t),defaultPadding:"p-0",...n,children:"offices"===l?o(pp,{}):o(Fu,{descriptionData:e})})})),xp=d((({className:e,title:t,description:n="Блок в разработке...",...l})=>c(g,{className:h("box-border",e),...l,children:[o(S,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(x,{})]}))),fp="hidden sm:flex absolute z-40 top-10",bp=Ot((({className:e="",padding:t,slides:n=[],...a})=>{const[r,i]=l(0),[s,d]=di({itemCount:n?.length||0});return c(g,{className:h("box-border overflow-hidden",e),defaultPadding:"pt-6xl",padding:t,...a,children:[o("div",{className:"flex duration-1000",style:{transform:`translateX(-${100*r}%)`},role:"list",children:n.map((({productBlock:e},t)=>o("div",{className:"box-border grow-0 shrink-0 basis-full",role:"listitem",children:o(et,{className:"pl-6xl h-full",headlineVersion:"M",isFullWidthTitle:!1,...e,...a})},String(t))))}),c("div",{className:"relative pr-xs mt-m -mb-m flex gap-xs box-border",children:[o(Zr,{containerRef:s,snapAlign:"snap-start",onVisibleIndicesChange:d.handleVisibleIndicesChange,itemClassName:"h-40 flex items-stretch w-screen",gap:8,children:n.map(yp({activeSlideIndex:r,onClick:i}))}),d.canScrollLeft?o(gi,{className:h("left-6",fp),onClick:d.scrollLeft}):null,d.canScrollRight?o(xi,{className:h("right-6",fp),onClick:d.scrollRight}):null]})]})})),yp=({activeSlideIndex:e,onClick:t})=>({nav:n},l)=>{const a=l===e,r=a?"min-w-[370px] mt-s h-28 bg-white shadow-dark-blue border-none p-6":"min-w-72 mt-lg h-24 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",i=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-secondary-text text-l font-light":"text-secondary-text text-m font-light group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(l),"aria-label":n?.title,className:h("relative overflow-hidden grow","ml-xs px-xl","box-border basis-0 border","border-gray group-data-secondary:border-white/50","text-left whitespace-nowrap",r),children:[o("div",{className:i,children:n?.title}),o("div",{className:s,children:n?.description})]},String(l))},vp=d((({address:e,email:t,telephone:n,button:l,className:a="",__html:r,richVersion:i,icon:s,title:d,version:m="primary",...u})=>c(g,{className:h("box-border text-left space-y-s",a),version:m,...u,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[Ue(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ae,{image:s})}):null,d?o(N,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[r?Np({__html:r,richVersion:i}):null,wp({label:"Адрес",data:e,iconName:"GeolocationIcon"}),wp({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),wp({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),l?.text?We([l]):null]})]}))),Np=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(De,{...e,itemSize:"list-s"})}),wp=({label:e,data:t,iconName:n,dataColor:l=""})=>t?c("div",{className:"flex gap-s",children:[o(K,{iconVersion:"black",name:n,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o($e,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o($e,{size:"text-xl",color:l,children:t})]})]}):null,kp=d((e=>{const{__html:t,richVersion:n="",...l}=e;return o(g,{defaultPadding:"p-0",...l,children:o(De,{__html:t,richVersion:n})})})),Sp=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",Cp=Ot((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,foldButtonVersion:l="default",label:a,version:r,role:i,...s})=>{const d=Te(),[m,{toggle:u}]=an(t),p=o(Er,{className:h("gap-lg",Sp(d)),isUnfolded:m,children:P({...s,extraProps:{className:"w-full",padding:"p-0"}})}),x="accordion"===l,f=o(Ar,{className:h(x?"text-h6 my-lg":"text-h4"),label:a,isUnfolded:m,embedded:x,onClick:u});return o(g,{className:h("w-full border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:i,...s,children:c(Or,{children:[n?f:p,n?p:f]})})}),{childrenTypes:{exclude:["RollupItem"]}}),Ip=d((({name:e,text:t,value:n,checked:l,onChange:a,className:r})=>o("div",{className:r,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:h(yn.split(" ").filter((e=>"rounded"!==e)),Zl,"flex justify-center items-center after:block after:w-2.5 after:h-2.5 after:rounded-full rounded-full","checked:border-2 checked:!border-primary-main focus:checked:border-primary-main checked:after:bg-primary-main"),type:"radio",value:n,name:e,checked:l,onChange:e=>a?.(e.target.value),role:"radio"}),t?o($e,{color:"text-primary-text",children:t}):null]})}))),Tp=d((({className:e=""})=>{const[t,n]=l("option2"),a=r((e=>n(e)),[]);return c("div",{className:h("order-4",e),role:"radiogroup",children:[o(Ip,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(Ip,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),Bp=d((({data:e,fieldLabel:t,fieldValue:n,selected:l,placeholder:a="",setSelected:r,label:i})=>{const s=e.filter(Boolean).map((e=>({key:e?.[n||t],text:e?.[t]}))),c=s.find((e=>e.key===l));return o(Vn,{options:s,label:i,placeholder:a||l,onChange:e=>r(e.key),value:c})})),Mp=d((({regions:e=[],selectedRegion:t,onSelectedRegion:n,branches:l=[],selectedBranch:a,onSelectedBranch:r})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Bp,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(Bp,{data:l,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:r,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Pp=["От 1 дня","До 365 дней"],Vp=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o($e,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(rl,{min:1,max:365,value:e,items:Pp,onChange:t})]}))),Rp=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:n,safeBoxCases:l=[],selectedBoxSize:a,onSelectedBoxSize:r})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Bp,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(Bp,{data:l,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:r,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),zp=d((({regions:e,selectedRegion:t,branches:n,selectedBranch:l,days:a,selectedCaseVolume:r,selectedBoxSize:i,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:h})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(Mp,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:l,onSelectedBranch:Dp(m)}),o(Vp,{days:a,setDays:e=>m({days:e})}),o(Rp,{caseVolumes:d,selectedCaseVolume:r,onSelectedCaseVolume:_p(m),safeBoxCases:s,selectedBoxSize:i,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o($e,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),c("div",{className:"contents @md:flex justify-between items-center gap-m",children:[o(Tp,{}),o(gr,{className:"order-6",version:"primary",onClick:h,children:"Офисы на карте"})]})]}))),Dp=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},_p=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},$p=d((({days:e,tariffs:t=[]})=>{const n=Lp(e,t),l="На рисунке изображена пачка листов\nформата А4";return c("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[c("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[jp("Аренда за",e),jp("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:l})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(K,{className:"@xl:h-60",name:"PackA4Icon"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(w,{size:"text-s",font:"font-light",color:"text-white",children:l})})]})]})})),jp=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o($e,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),Lp=(e,t)=>{const n=Ap(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},Ap=e=>{let t=1;switch(!0){case e>30&&e<=90:t=2;break;case e>90&&e<=180:t=3;break;case e>180&&e<=365:t=4}return t},Op=(e,t)=>e.find((e=>e.branchCode===t)),Ep=d((e=>{const{regions:t,data:n,branches:l,onChange:r,onClick:i}=e;a((()=>{r({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,r]);const s=Op(l,n.selectedBranch),d=Fp(s?.safeBoxCaseVolumes),m=Up(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,h=Wp(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(zp,{...n,regions:t,onClick:i,branches:l,caseVolumes:d,safeBoxCases:m,onChange:r}),o($p,{days:n.days,tariffs:h})]})})),Fp=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Up=(e,t)=>e?.find((e=>e.volume===t)),Wp=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Hp=`${Yt}/safeboxes`,Yp=[];const Xp=async e=>await Rt(e,{method:"GET"})||Yp,Kp=d((({title:e,footnote:t,className:n="",...a})=>{const[i,s]=l(!1),d=r((()=>s((e=>!e))),[]),[m,h]=l({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),u=Ma(),p=qp(m.selectedRegion,u),x=function(e){const{data:t}=Hn(e?`${Hp}?regionCode=${e}`:null,Xp);return t||Yp}(p),f=r((e=>h((t=>({...t,...e})))),[h]),b=(y=Op(x,m.selectedBranch)||x,Array.isArray(y)?y.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):y?.gpsLatitude&&y?.gpsLongitude?[{coords:[y.gpsLatitude,y.gpsLongitude]}]:[]);var y;return c(g,{className:n,defaultPadding:"",...a,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(N,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(Ep,{regions:u,branches:x,data:{...m,selectedRegion:p},onClick:d,onChange:f}),t?o(w,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&i?o(cu,{points:b,className:"h-[640px]"}):null]})})),qp=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Gp=e=>e<4?"w-72":"w-52",Zp={description:"text-white/80 text-l font-light group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconText:"text-white group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconBackground:"bg-white/30 group-data-primary:bg-main-divider",iconConnector:"bg-white group-data-primary:bg-secondary-light",dot:"bg-white/80 group-data-primary:bg-secondary-text"},Jp=d((({buttons:e,className:t="",description:n,showLines:l=!0,steps:a=[],stepVersion:r="gray",title:i,version:s="primary",...d})=>{const m=a.length>3,u=Zp,p=(e=>e?"":"opacity-0")(l),x=Te();return c(g,{className:h("box-border flex flex-col items-center overflow-hidden gap-y-3xl",t),defaultPadding:"p-6xl",version:s,...d,children:[o(S,{headlineVersion:"S",title:i,description:n,isEmbedded:!0,className:"w-full",align:Oi(x)}),a?.length?c("div",{className:"box-border space-y-lg flex flex-col justify-center",children:[o("div",{className:h("flex items-center",m?"px-16":"px-24"),children:Ci(o("div",{className:h("h-0.5 w-full bg-secondary-light flex-1",p)}))(a.map(Qp(u,m,r)))}),o("div",{className:h("flex justify-between",m?"gap-x-s":"gap-x-20"),children:a.map((f={styleMap:u,version:s},(e,t,n)=>{const{styleMap:l,version:a}=f,{label:r,description:i,button:s,isDotted:d}=e;return c("div",{className:h("relative flex flex-col items-center text-center justify-between whitespace-pre-line overflow-hidden space-y-3xl",Gp(n.length)),children:[c("div",{className:"space-y-xs",children:[r?o($e,{size:"text-h6",align:"text-center",children:r}):null,c("div",{className:"flex flex-col items-center gap-3xs",children:[i?o("div",{className:l.description,children:i}):null,o(De,{__html:e.__html,itemSize:"list-s",isDotted:d})]})]}),s?.text?o(ke,{className:"box-border py-s w-full mt-auto",version:a,...s,children:s?.text}):null]},String(t))}))})]}):null,We(e)]});var f})),Qp=(e,t,n)=>({icon:l},a)=>{const r="secondary"===n?"white":"color";return o(g,{defaultPadding:"",className:`${eg(t)} flex justify-center items-center text-center rounded-full box-border z-10`,version:n,children:Ue(l)?o(ae,{image:{...l,iconVersion:l?.iconVersion||r},width:"48",height:"48"}):o("span",{className:h("text-h4","transparent"===n?e.iconText:(i=n,"secondary"===i?"group-data-primary:text-white":"text-secondary-text")),children:a+1})},String(a));var i},eg=e=>e?"h-16 w-16":"h-24 w-24",tg=d((()=>o("div",{className:"hidden",role:"none"}))),ng="hidden sm:flex absolute z-40",lg={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},ag=d((({className:e,items:t=[],activeItem:n,onChange:l,tabsType:r="default"})=>{const[i,s]=di({itemCount:t?.length||0});return a((()=>rg(i.current,t,n)),[]),c("div",{className:h("relative overflow-x-auto no-scrollbar",e),children:[o(Zr,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:lg[r].item,gap:lg[r].gap,children:t.map(Hh(n,l,r))}),s.canScrollLeft?o(gi,{className:h("left-6",ng,lg[r].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(xi,{className:h("right-6",ng,lg[r].buttonTop),onClick:s.scrollRight}):null]})})),rg=(e,t,n)=>{const l=t.findIndex((e=>e===n));e&&l>0&&e.scrollTo({left:e?.children[l]?.offsetLeft,behavior:"smooth"})},ig={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},sg=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:h(ig[t].wrapper,e),children:o(ag,{className:ig[t].component,tabsType:t,...n})}):null,og=Ot((({className:e="",tabs:t=[],block:n,tabsType:i,showCounter:s=!1,isSticky:d=!1,...m})=>{const u=cg(n??{}),p=V(),x=t.every((e=>"link"===e?.type)),f=s?t.map((e=>({...e,count:"group"===e?.type?n?.slots?.[e?.tabName??""]?.length??0:0}))):t,{isReady:b}=p,[y,v]=l(hg(f,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(u))),N=f[y],w=f.findIndex((e=>Boolean(e.selected)));a((()=>{const e=p.query[u]?f.findIndex(((e,t)=>"group"===e.type&&(e?.tabName??String(t))===p.query[u])):w;v(-1===e?0:e)}),[b,w,u]);const k=mg(f[y],y),S=r((e=>{const t=f.indexOf(e),n=f[t];v(t),"group"===n.type&&((e,t)=>{const n=new URLSearchParams(p.query);e.text?n.set(u,e?.tabName??String(t)):n.delete(u),p.replace(`${p.pathname}?${n}`,"",{scroll:!1})})(e,t)}),[f]);return c(g,{className:h({"sticky top-1 z-20":d&&x},e),defaultPadding:"p-0",block:n,...m,children:[sg({className:h({"pb-1":n?.slots&&"default"===i,"sticky top-1 z-20":d&&!x}),items:dg(t,f),activeItem:N,tabsType:i,onChange:S}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:Object.entries(n?.slots??{}).map((([e,t])=>M(t,{...m?.options,slotName:k,parent:n,extraProps:{className:e===k?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(mg)?.filter(Boolean)||[]}),cg=({__id:e,anchor:t})=>t??e??"tabs",dg=(e,t)=>t?.length?t:e,mg=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",hg=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),ug={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},pg=d((({children:e,activeIndex:t,columnWidth:n,version:l="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:ug[l],style:{transform:`translateX(-${t*n}px)`},children:e})}))),gg=d((({className:e="",isOpen:t,onClick:n})=>o(Ar,{className:e,label:t?"Скрыть":"Показать",isUnfolded:t,version:"secondary",short:!0,onClick:n}))),xg={Buttons:({buttons:e})=>We(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ae,{image:e}):null,RichText:({__html:e,isDotted:t=!0})=>o("div",{className:"flex flex-col justify-between items-start text-h6",children:o(De,{__html:e,isDotted:t,itemSize:"list-m"})}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o($e,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o($e,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:n,pdfUrl:l,isOpen:a})=>e?o(gg,{className:"w-fit",isOpen:a,onClick:()=>{t({tableSource:n,pdfUrl:l})}}):null},fg=d((({cell:e,fieldIdx:t,rowIdx:n,cellIdx:r,setTableInner:i,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=l(!0);a((()=>{r===o&&s||m(!0)}),[s,o]);return bg({cell:e,cellProps:{rowIdx:n,cellIdx:r,fieldIdx:t,displayTable:e=>{m(!1),c(r),i(e)},isVisible:d}})})),bg=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...l}=e;if(!n||!(n in xg))return null;return o(xg[n],{...t,...l})},yg=d((({cells:e,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:r,setOpenTableInnerIdx:i})=>o("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>o(fg,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:r,setOpenTableInnerIdx:i},String(s)))):null}))),vg=(e,t)=>140*Ld(e.slice(0,t).map((e=>e?.cols?.length??1))),Ng=(e,t)=>e?.length>0?o("div",{className:h("flex",{"text-secondary-text":0===t}),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o($e,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,wg=d((({rows:e})=>{const t=e?.[0]?.length??0,[n,l]=Jm({itemCount:t,visibleItemCount:5});return c("div",{children:[e?.map((a=n,(e,t)=>{if(!e?.length)return null;const[n,...l]=e,r=h("flex duration-1000 text-center",0!==t?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[n?.data?o("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:o($e,{size:"text-xl",font:"font-light",children:n.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:r,style:{transform:`translateX(-${vg(l,a)}px)`},children:l?.map(((e,t)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o($e,{size:"text-xl",children:e.data}):null,e?.cols?Ng(e.cols,a):null]},`row${t}`)))})})]},String(t))})),Qm({...l,btnClass:["left-3 top-20","right-3 top-20"],className:""})]});var a})),kg=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,n)=>{const l=`activeTabIdx:${e}-tableIdx:${n}`;return c("div",{className:"w-full @container",children:[o("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:o($e,{size:"text-xl",align:"text-left",children:t.title})}),o("div",{className:"w-full sm:pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:o("div",{className:"relative",children:o(wg,{rows:t.rowsData})})})]},l)}))}))),Sg=(e=!1)=>""+(e?"text-white":"text-secondary-text"),Cg=d((({currencies:e,linkToPDF:t,activeTabIndex:n,setActiveTabIndex:l})=>c("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?o("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>o("div",{className:h("rounded-md px-4 py-3 cursor-pointer",{"bg-primary-main":t===n}),onClick:()=>l(t),children:o($e,{size:"text-xl",font:"font-light",color:Sg(t===n),children:e||t+1})},e)))}):null,t?o(ke,{className:"text-primary-main",href:t,version:"secondary",target:"_blank",appendLeft:o(K,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),Ig=Ot((({tableSource:e,pdfUrl:t,onClick:n})=>{const a=e?.tableData,[i,s]=l(0),d=r((e=>s(e)),[]),m=a?.[i]?.items??[],h=a?.map((e=>e.currency??""));return c("div",a?{className:"bg-white z-10",children:[o(Cg,{currencies:h,activeTabIndex:i,setActiveTabIndex:d,linkToPDF:t}),o(kg,{activeTabIndex:i,items:m}),o(gg,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o($e,{size:"text-h6",children:"Данных нет"}),o(gg,{onClick:n,isOpen:!0})]})})),Tg=d((({children:e,tableInner:t,onHideContentClick:n})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:h("@4xl:border-main-divider @4xl:border-b","flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg"),children:e}),t?o("div",{className:"origin-top animate-expansion",children:o(Ig,{...t,onClick:n})}):null]}))),Bg=d((({row:{header:e,data:t},activeIndex:n,rowIdx:a,...i})=>{const[s,d]=l(void 0),m=r((e=>d(e)),[]),[u,p]=l(void 0),g=r((e=>p(e)),[]);return c(Tg,{onHideContentClick:()=>d(void 0),tableInner:s,...i,children:[o("div",{className:h("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(ae,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o($e,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(pg,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(yg,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:u,setOpenTableInnerIdx:g,...i},String(t))))}):null]})})),Mg=d((({children:e,controls:t})=>{const{isScrollAvailable:n}=t;return c("div",{role:"table",className:"overflow-x-auto w-auto grid md:block",children:[c("div",{className:"relative space-y-xs",children:[e,Qm({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),n?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),Pg=d((({className:e="",title:t,description:n,rowHeaders:l,tariffsColumns:a,hiddenRowsNum:r=0,...i})=>{const s=a?.map((({data:e})=>e))||[],d=l?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),m=s.length,[u,p]=Jm({itemCount:m,visibleItemCount:2}),x=(d||[]).map(((e,t)=>o(Bg,{row:e,activeIndex:u,rowIdx:t,...i},String(t)))),[f,b]=r>0?[x.slice(0,-r),x.slice(-r)]:[x,[]],[y,{toggle:v}]=an(!1);return c(g,{className:h("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...i,children:[o(S,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:r>0?c(Or,{children:[c(Mg,{controls:p,children:[f,o(Er,{isUnfolded:y,children:b})]}),o(Ar,{className:"text-h4",isUnfolded:y,onClick:v})]}):o(Mg,{controls:p,children:x})})]})})),Vg=d((({className:e="",title:t,description:n,iconVersion:l,__html:a,richVersion:r,...i})=>c(g,{className:h("flex gap-s sm:gap-m group-data-secondary:bg-primary-main/10",e),...i,children:["small"===l?Rg():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o($e,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?zg(n):null,a?o(De,{richVersion:r,__html:a}):null]})]}))),Rg=()=>o("div",{className:"rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),zg=e=>o(w,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),Dg=d((({prefix:e,unit:t,suffix:n})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o($e,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,n?o("div",{className:"gradient-color-text",children:o($e,{size:"text-h2",children:n})}):null]}))),_g=d((e=>{const{prefix:t,unit:n,suffix:l,...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(Dg,{prefix:t,unit:n,suffix:l})})})),$g=Ot((({className:e="",padding:t="p-0",gap:n="",isInnerPadding:l=!0,version:a="transparent",isTheme:r=!1,isCardBorder:i=!1,image:s,...c})=>{const d=V();return o(g,{className:h("relative flex flex-col",qm[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${Q(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:r,...c,children:P({...c,extraProps:{className:h("w-full",Wr(i)),...Km(l)}})})}),{childrenTypes:[]}),jg=e=>(e=>{const t="col-span-",n=e?.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(9),10):12})(e)<10?"py-xl px-6xl":"py-6xl px-32",Lg=d((({className:e,title:t,url:n,previewImg:l,...a})=>{const r=V();return c(g,{className:e,defaultPadding:jg(e),...a,children:[o(S,{title:t,headlineVersion:"M"}),n?o("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:W(r)(l?.src),style:{maxHeight:524},controls:!0,children:o("source",{src:W(r)(n)})}):null]})})),Ag={AdTile:Ft,ApplicationForm:Dr,BankAccountFiltration:Li,BenefitsBlock:Ui,BonusBenefitsBlock:Ki,ButtonsBlock:Gi,CalculatorBonus:ms,CalculatorBusinessDeposit:Bs,CalculatorCredit:Us,CalculatorDeposit:so,CalculatorRefinancing:xo,CardTransfer:zo,Carousel:Eo,CarouselCard:Ho,CarouselCatalogCard:Xo,CarouselLinks:Go,CarouselRecommendationCard:ac,CarouselTariffsCard:oc,ContactsBlock:cc,DepositFiltration:xc,Depository:Rc,ErrorBlock:Dc,ExchangeRateTile:ud,Footer:Jd,GracePeriod:Qd,GrantSupport:lm,Header:Hm,Headline:S,HorizontalLayout:Gm,ImgBlock:Zm,InsuranceAmountBlock:ah,InvestmentInfo:oh,LinkDocs:wh,MobileAppTile:Ih,MortgageFiltration:Kh,OfficesAtmsMap:gp,Placeholder:xp,ProductBlock:Et,ProductGallery:bp,RepresentativeOfficeInfo:vp,RichTextBlock:kp,RollupItem:Cp,SafeDepositRental:Kp,StepsBlock:Jp,StickyBottomMenu:tg,TabsLayout:og,TariffsTable:Pg,TextBlock:Vg,UnitBlock:_g,VerticalLayout:$g,Video:Lg},Og=me((()=>{a((()=>{tn()}),[]);const e=ln();gn(globalThis,"click",(e=>t=>{const n=t.target?.closest("[data-aspects]");try{const l=JSON.parse(n?.dataset?.aspects??"[]");Jt({aspectsAttributes:l,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))})),Eg="cookie",Fg=d((({__html:e})=>{const[t,{setTrue:n,setFalse:l}]=an();_d((()=>{globalThis.localStorage?.getItem(Eg)||n()}),[],3e3);const a=r((()=>{globalThis.localStorage?.setItem(Eg,"true"),l()}),[]);return t&&e?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",role:"dialog",children:c("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[o("div",{className:"sm:flex-1",children:o(De,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o(xr,{className:"bg-main-gray rounded-md w-11 h-11",onClose:a})})]})}):null}));function Ug(e){const t=r((({key:t})=>{"Escape"===t&&e()}),[e]);gn(globalThis.document,"keydown",t)}function Wg(e,t,n){a((()=>e.subscribe(t,(e=>{const t=e?.type;if(t&&"string"==typeof t){const l=n[t];l&&l(e)}}))),[e,t,...Object.values(n)])}const Hg=()=>{const[e,{push:t,pop:n,clear:a}]=function(e=[]){const[t,n]=l(e),a=r((e=>n((t=>[...t,e]))),[]),i=r((()=>n((e=>e.slice(0,-1)))),[]),s=r((e=>n((t=>t.filter((t=>t!==e))))),[]),o=r((()=>n([])),[]);return[t,{setList:n,push:a,pop:i,remove:s,clear:o}]}();return Wg(pe.observable,"dialog",{open:t,close:n,closeAll:a}),[e,{close:n,closeAll:a}]},Yg=d((()=>{const[e,{close:t}]=Hg(),n=Boolean(e.length);return Ug(t),a((()=>{n?globalThis.document?.body.classList.add("no-scrollbar","overflow-hidden"):globalThis.document?.body.classList.remove("no-scrollbar","overflow-hidden")}),[n]),n?o("div",{className:"fixed inset-0 z-50",children:e.map((({dialog:t,id:n},l)=>o("div",{className:h("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50",{hidden:l!==e.length-1}),children:t},String(n||l))))}):null})),Xg=d((()=>{const[e,t]=l(null),n=r((()=>{t(null)}),[]);return Wg(pe.observable,"popup",{open:t,close:n}),Ug(n),e?o("div",{className:h("z-50",e.fixed?"fixed":"absolute"),style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",title:"Всплывающее окно",children:e.popup}):null})),Kg="header",qg="footer",Gg="sticky-footer",Zg={},Jg=d((({className:e,data:t=Zg,blocksRegistry:n,blockDecorator:l})=>{const{slots:a,blocks:r,fallback:i,...s}=t,d=Lt(s,i);Og(),Ac();const m={key:"",page:{slots:a,blocks:r,fallback:i,...d},blocksRegistry:n,blockDecorator:l,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:h("@container relative",t.style,e),children:[a?.[Kg]?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:M(a?.[Kg],{...m,slotName:Kg})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[P({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),M(a?.[qg],{...m,slotName:qg})]})]}),a?.[Gg]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:M(a?.[Gg],{...m,slotName:Gg})}):null,o(Yg,{}),o(Xg,{}),o(Fg,{__html:d?.cookieContent?.__html})]})}));Object.assign(Jg,{childrenTypes:[],slots:()=>[Kg,qg,Gg]});e.Blocks=Ag,e.ContentPage=Jg,e.handlerDecorator=me,e.joinList=Ci,e.locationNavigator=Qt,e.packageVersion="0.14.771",e.projectSettings=z,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=O,e.useRouter=V,Object.defineProperty(e,"__esModule",{value:!0})}));