@redneckz/wildless-cms-uni-blocks 0.14.166 → 0.14.167
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bundle/bundle.umd.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("fs"),require("path"),require("util")):"function"==typeof define&&define.amd?define(["exports","fs","path","util"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={},e.fs,null,e.util)}(this,(function(e,t,l,n){"use strict";function a(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(l){if("default"!==l){var n=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(t,l,n.get?n:{enumerable:!0,get:function(){return e[l]}})}})),t.default=e,Object.freeze(t)}var i=a(t);let r;const s=e=>(...t)=>r[e](...t),o=s("useState"),c=s("useEffect"),d=s("useCallback"),m=s("useMemo"),h=s("useRef");const u=(...e)=>globalThis._uni._jsx(...e),p=(...e)=>globalThis._uni._jsxs(...e),x=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:g(e)),t._tmpl},g=e=>{function t(t,l){const{children:n,...a}=t||{},i=l?.slots?.default,r=n||i&&i();return e(Object.assign(a,r&&{children:r}),l)}return t.inheritAttrs=!1,t},f=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),b=x((({children:e})=>f?e:null));const y=new class{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const l=this.subjectsStateMap[e];return l&&t(l),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}};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 N=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),w={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","":""},k=x((({className:e,version:t="primary",isTheme:l=!0,defaultPadding:n="p-xl",padding:a,block:i,tag:r="section",role:s,children:d,style:m})=>{const h=r,p=v(),[x,g]=o(!1);c((()=>y.subscribe("tab",(e=>{e.groupName&&e.groupName!==i?.labelGroup||g(Boolean(e.label&&i?.labels?.length&&!i.labels.includes(e.label)))}))),[i,p]);const f=t&&l;return u(h,{className:N("@container font-sans",f?"group":"",w[t],x?"hidden":"",a||n,e),...f?{"data-ver":t}:{},...i?.anchor?{id:i.anchor}:{},role:s,style:m,children:d})})),C={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},S=x((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>u(l,{className:N("font-sans m-0",C[t],e),children:n||a}))),I=x((({children:e,...t})=>u("p",{className:N("font-sans",Object.values(t)),children:e}))),T={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"}},B=x((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:o=!1,...c})=>{const d=T[l],m={marginTop:d.descriptionStyle};return p(k,{className:N(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:o,...c,children:[n?u(S,{className:N("whitespace-pre-wrap",i),...d?.title,as:r||d?.title.as,title:n}):null,a?u(I,{size:d.descriptionSize,font:d.descriptionWeight,align:i,...m,children:a}):null]})})),P=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),M=[];function z(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=P,blocksRegistry:r={},ancestors:s=M}=t,{type:o}=e;o&&o in r||console.warn(`No block with "${o}" is registered`);const c=o&&r[o];return i({blockClassName:N(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:s,render:({block:l,blockClassName:i})=>{const{content:r}=l;return c?u(c,{className:i,block:e,options:t,...r,...n},a):null}},a)}const V=[],R=(e,{key:t,ancestors:l=V,slotName:n=null,extraProps:a,renderProps:i=z,...r})=>{const s=a?(e,t)=>z(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||V,[r.parent,n]]:l},a)))};function D({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?R(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const A=e=>e&&!e.endsWith("/")?`${e}/`:e,j=["CDN","BASE_PATH"],F=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const l=e._[t]||e[t];return j.includes(t)?A(l):l}}),$=e=>Boolean(e?.includes(":")),L=(e,t)=>Boolean(e&&!$(e)&&(!t||"_self"===t)),E=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),O=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var _=Object.freeze({__proto__:null,isURL:$,isLocalURL:L,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:E,joinPath:O});const U="/api/",H=`${U}v1/storage`,W=e=>(t,l=F.BASE_PATH)=>{if(!t||$(t)||[F.CDN,U].some((e=>K(t,e))))return t;if(/^[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(t))return`${H}/${t}/file`;const n=t.startsWith("/");return O(K(t,l)?"":l,n?"/":(e=>e?.split("/").slice(0,-1).join("/"))(e.pathname),t)},K=(e,t)=>t&&e&&e.startsWith(t),X={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},q=x((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",width:r,height:s})=>{const o=v(),c="normal"===i?`${l}.svg`:`sprites.svg#${l}`,d=W(o)(O(F.CDN,"/icons/",c));return"normal"===i?u("img",{className:e,src:d,alt:n,title:a,"aria-hidden":"true",width:r,height:s,style:G(e,s)}):u(Q,{className:e,children:p("svg",{className:N(Y(r),X[i],"white"===i?"invert":"",t),width:r,height:s,"aria-hidden":"true",children:[a?u("title",{children:a}):null,n?u("desc",{children:n}):null,u("use",{href:d,xlinkHref:d})]})})})),G=(e,t)=>{return e?.includes("h-")?{}:{height:(l=t,l&&!/\D/.test(l)?`${t}px`:t),width:"auto"};var l},Y=e=>e?"":"w-full h-full",Q=x((({className:e,children:t})=>e?u("div",{className:e,children:t}):t)),Z=(e,t)=>l=>l&&!$(l)?W(e)(O(t,l)):l,J=(e,t)=>e?.media&&t?.media?e.media-t.media:0,ee=x((({className:e="",image:t,imageClassName:l="",pathPrefix:n})=>{const a=v();return p("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(J).map((({src:e,format:l,media:i},r)=>u("source",{srcSet:Z(a,n)(e),type:le(l),media:i?`(max-width: ${i}px)`:"",width:t?.size?.width,height:t?.size?.height},`${r}_${e}`))):null,t?.src?te({...t,src:Z(a,n)(t.src)},l):null]})})),te=(e,t="")=>u("img",{src:e.src,className:N("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,ne=x((({className:e="",image:t,imageClassName:l="",pathPrefix:n,...a})=>t?.src||t?.icon?t.icon?u(q,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...a}):u(ee,{className:e,imageClassName:l,image:t,pathPrefix:n}):null)),ae={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",re={primary:ie,secondary:ie,white:ie,link:"",transparent:"",gray:ie,"":""},se="text-center font-sans select-none",oe={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","":""},ce=({className:e,rounded:t,version:l})=>[se,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?ae[l]:"",t?"rounded-full":"rounded-md",e].join(" "),de=()=>({open:(e,t={})=>y.fire("dialog",{type:"open",dialog:e,...t}),close:()=>y.fire("dialog",{type:"close"}),closeAll:()=>y.fire("dialog",{type:"close",all:!0})}),me=(e,t)=>me._impl(e,t);function he(e={}){const{isRemote:t,basePath:l}=e,n=v(),{closeAll:a}=de();return e=>({...e,href:t&&!l?e.href:W(n)(e.href,l),"aria-label":e.text,onClick:me(i(e),e)});function i({href:e,target:l,onClick:i}){return r=>{i&&i(r),e&&!t&&L(e,l)&&(a(),r?.preventDefault(),n.push(e))}}}me._impl=e=>e,me.setup=e=>{me._impl=e};const ue=x((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e,r=xe(e)?"hidden lg:block":"";return p("div",{className:N(pe(e),"flex gap-xs"),children:[n?u("div",{className:N(r,oe[i]),children:n}):null,xe(e)?p("div",{className:"whitespace-pre",children:[l?u("div",{className:"text-xs font-light text-left",children:l}):null,u("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?u("div",{className:N(r,oe[i]),children:a}):null]})})),pe=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const a=""+(l?"py-2.5 px-9":"py-4 px-9");return N("group/btn items-center justify-center",xe(e)?a:"h-12 w-12 m-auto",n?"rounded-full":"")},xe=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),ge=({className:e,rounded:t,version:l})=>["inline-block",se,l?re[l]:"",t?"rounded-full":"rounded-md",e].join(" "),fe=x((({disabled:e,children:t,method:l="LINK",href:n,...a})=>{const i=(({method:e,href:t})=>d((l=>{if("POST"!==e||!t)return;l.preventDefault();const{origin:n,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[n,a].join(""));for(const[e,t]of i.entries()){const l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name",e),l.setAttribute("value",t),r.appendChild(l)}document.body.appendChild(r),r.submit()}),[]))({method:l,href:n}),r=he()({onClick:i,href:n,...a}),s=t??u(ue,{...r});return u(e?ye:be,{...r,children:s})})),be=x((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,children:o})=>u("a",{className:ce({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,children:o}))),ye=x((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>u("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:ge({className:e,rounded:n,version:l}),children:a})));function ve(e,t){const l="primary"===e?"white":"black",n="Вернуться назад";return p("div",{className:"hidden sm:flex items-center gap-s",children:[u("div",{className:ce({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:e,rounded:!0}),onClick:t,children:u(ne,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:l}})}),u(fe,{version:"link",className:"group-data-secondary:text-white/80",text:n,ariaLabel:n,onClick:t})]})}const Ne={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},we=x((({className:e,version:t="primary",defaultPadding:l,padding:n="",title:a="",insetTitle:i="",buttons:r,leftImage:s,rightImage:o,imageAlign:c,isImageAlwaysOnRight:m=!1,isImageSecondary:h=!1,backwardButton:x,children:g,...f})=>{const b=v(),y=d((e=>{e?.preventDefault(),b.back()}),[]);return p("div",{className:ke(n,l,e),children:[x?ve(t,y):null,a?u("div",{className:"relative h-full",children:a}):null,p("div",{className:N("grow relative flex flex-col @xl:flex-row gap-3xl w-full",s?"self-start @xl:w-auto":""),children:[Be(s,{imageAlign:c,className:"mx-auto"}),p("div",{className:N("grid gap-3xl",o?"@xl:grid-cols-2":"",s?"":"grow","h-full","auto-rows-[max-content_1fr]"),children:[p("div",{className:"grow space-y-lg min-w-fit",children:[i,g]}),Te(D({...f,extraProps:{className:"@container-normal"}})),Be(o,{className:N("@xl:justify-self-end @xl:col-start-2",r?Ce(m):"",Se(m),Pe(h)),imageAlign:c}),Ie(r)]})]})]})})),ke=(e="",t="",l="")=>N("relative flex flex-col gap-3xl overflow-hidden",e||t,l),Ce=e=>e?"row-span-2":"@xl:row-span-2",Se=e=>e?"col-start-2 self-center":"",Ie=e=>e?u("div",{className:"self-end",children:e}):null,Te=e=>e&&e?.length?u("div",{className:"flex items-start justify-end",children:e}):null,Be=(e,{className:t,imageAlign:l})=>e?u("div",{className:N("shrink-1/2 justify-self-center",l&&Ne[l],t),children:e}):null,Pe=e=>e?"hidden @xl:block":"",Me=(e=[])=>e.reduce(((e,t)=>e+t),0),ze=(e=[])=>e?.length?Me(e)/e.length:0,Ve=(e,t="normal")=>e?u("div",{className:N("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:u(ne,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Re=x((e=>{const{__html:t="",richVersion:l=""}=e;return t.replace(/<\/?[^>]+\/?>/g,"").trim()?u("div",{"data-component":"rich-text-container",children:u("div",{className:N(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})}):null})),De=(e,t)=>e?u(I,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Ae=x((({children:e,...t})=>u("span",{className:N("font-sans",Object.values(t)),children:e}))),je=(e,t)=>e?u(Ae,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Fe=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?u(Re,{...e},`rte-${t}`):["label"in e?je(e.label,t):null,"description"in e?u("span",{className:e.descriptionClassName,children:De(e.description,t)},String(t)):null],$e=x((({className:e,benefitsVersion:t,...l})=>p("div",{className:N("flex gap-m min-w-56 items-center",e),children:["icon"in l?Ve(l.icon,t):null,u("div",{children:Fe(l)})]}))),Le=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),Ee=e=>{return((t=e.map(Le))?.length?Math.sqrt(Math.abs(ze(t.map((e=>e**2)))-ze(t)**2)):0)>16;var t},Oe=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),_e=e=>!e.some(Oe),Ue=x((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?u("div",{className:N("flex gap-x-m gap-y-s",Ee(l)||_e(l)?"flex-col":"flex-wrap",e),children:l.map(((e,l)=>u($e,{benefitsVersion:t,...e},String(l))))}):null)),He=x((({className:e,benefits:t})=>t?.length?u("div",{className:N("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),children:t.flatMap(Fe)}):null)),We=x((({isTabularBenefits:e,...t})=>u(e?He:Ue,{...t}))),Ke=e=>Boolean(e?.src||e?.icon),Xe=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?u("div",{className:N("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m",t),children:e.map(qe(l))}):null,qe=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},o=Ge(a,r),c=Ge(i,r);return n||a?.icon?u(fe,{className:N("basis-full @lg:basis-auto",e),appendLeft:Ye({...a,iconVersion:o}),appendRight:Ye({...i,iconVersion:c}),version:r,text:n,...s},l?String(l):""):null},Ge=(e,t="secondary")=>{const l="secondary"===t?"color":"white";return e?.iconVersion?e?.iconVersion:l},Ye=e=>Ke(e)?u(ne,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,Qe=x((({className:e,isDotted:t,dotClassName:l,children:n})=>p("div",{className:N("font-sans flex",e),role:"listitem",children:[t?u("div",{className:"shrink-0",children:u("div",{className:N("align-middle inline-block rounded-full group-data-secondary:bg-white",l)})}):null,u("span",{children:n})]}))),Ze={S:{textSize:"text-l font-light",indentStyle:"ml-xs",dotStyle:"w-1 h-1 mr-xs"},M:{textSize:"text-h6",indentStyle:"ml-s",dotStyle:"w-1.5 h-1.5 mr-s"},L:{textSize:"text-h5",indentStyle:"ml-m",dotStyle:"w-1.5 h-1.5 mr-m"}},Je=x((({className:e,isDotted:t=!0,items:l=[],listItemSize:n="M",dotClassName:a=""})=>{const i=Ze[n];return l?.length?u("section",{className:N("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",i.textSize,e),role:"list",children:l.map(((e,l)=>u(Qe,{isDotted:t,dotClassName:N(a||"bg-primary-text",i.dotStyle),children:e},String(l))))}):null})),et=(e=0,{fixed:t}={})=>(l=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(l)||0),tt=x((({priceList:e})=>e?.length?u("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",children:e.map(lt)}):null)),lt=({label:e,amount:t})=>p("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",children:[u(Ae,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?p("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[et(2)(t)," ₽"]}):null]}),nt=x((({className:e,tags:t})=>t?.length?u("div",{className:N("flex flex-wrap gap-xs",e),role:"list",children:t.map(at)}):null)),at=(e,t)=>u("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:u(Ae,{size:"text-m",font:"font-light",children:e})},String(t)),it={XXL:"L",XL:"L",L:"M",M:"M",S:"S",XS:"S"},rt=x((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:o,benefits:c,__html:d,isFullWidthTitle:m,items:h,isDotted:x=!0,priceList:g=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:C,children:S,...I})=>{const T=y?.src?u(ne,{image:y}):null,P=u(B,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0}),M=c?.filter((e=>"rte"===e?.type||"label"in e||"description"in e));return u(we,{className:e,padding:t,defaultPadding:l,...m?{title:P}:{insetTitle:P},...st(T,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:Xe(b),backwardButton:C,...I,children:p("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[M?.length?u(We,{benefitsVersion:s,isTabularBenefits:o,benefits:M}):null,d?u(Re,{__html:d}):null,h?.length?u(Je,{items:h,isDotted:x,listItemSize:it[i]}):null,S,g?.length?u(tt,{priceList:g}):null,ot(f)]})})})),st=(e,t)=>t?{rightImage:e}:{leftImage:e},ot=e=>e?.length?u(nt,{tags:e}):null,ct=e=>Boolean(e&&Array.isArray(e)),dt=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),mt=(e,t)=>{return l=e,Boolean(dt(l)&&"string"==typeof l.$ref)?t.ref(e):dt(e)?t.record(e):ct(e)?t.array(e):t.scalar?t.scalar(e):e;var l},ht=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(ut,e),ut=(e,t)=>e&&t?dt(e)?e[t]:ct(e)?e[parseInt(t,10)]:e:e,pt=(e,t)=>mt(e,{ref:({$ref:e,...l})=>pt(e?ht(t(e),e):l,t),record:e=>Object.entries(e).map((([e,l])=>({[e]:pt(l,t)}))).reduce(((e,t)=>Object.assign(e,t)),{}),array:e=>e.map((e=>pt(e,t)))}),xt=(e,t,l=[])=>{mt(e,{ref:e=>t(e.$ref,l),record:e=>{for(const n in e)xt(e[n],t,[...l,n])},array:e=>{for(let n=0;n<e.length;n++)xt(e[n],t,[...l,n])}})};async function gt(e,t){try{return e?await ft(e,t):null}catch(e){console.error(e)}return null}n.promisify(i.readFile);const ft=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),bt=e=>[...new Set(e)],yt={},vt=["/portal-resources"],Nt=(e,t)=>{const l=(e=>{const t=[];return xt(e,(e=>t.push(e))),t})(e),[n,a]=o({});return c((()=>{l.length&&(async e=>Object.fromEntries((await Promise.allSettled(bt(e).filter((e=>!vt.some((t=>e.startsWith(t))))).map((async e=>[e,yt[e]||=await ft(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(l).then(a)}),[l.join()]),l.length?pt(e,(e=>n[e]||t?.[e])):e};function wt(e,t={}){const l=x((t=>{const l=Nt((({block:e,options:t,className:l,defaultPadding:n,padding:a,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return u(e,{...t,...l})}));return Object.assign(l,t),l}const kt=wt((({className:e,padding:t,...l})=>u(k,{className:N("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:u(rt,{defaultPadding:"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),Ct=x((e=>{const{items:t}=e.options?.page?.adSourceBook??{},l=m((()=>St(0,t?.length)),[t]),n=t?.[l];return n?u(b,{children:u(kt,{...n,...e})}):null})),St=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),It=e=>e?.replace(/[^+\d]/g,"");const Tt=e=>e&&"+7 ("!==e?{secondaryPhoneNumber:It(e)}:{},Bt=e=>e,Pt=(e,{resetOnSubmit:t,onSubmit:l}={})=>{const[n,a]=o(e),[i,r]=o(!1),[s,c]=o({}),m=h({}),u=d(((e,t)=>{const{parse:l=Bt,format:r=Bt}=t||{};return m.current||(m.current={}),m.current[e]||=t=>{a((n=>({...n,[e]:l(t)}))),c((t=>({...t,[e]:!0})))},{value:r(n[e]),isDirty:i||s[e],onChange:m.current[e]}}),[n,i,s]),p=d((e=>{a(e),c(e)}),[]),x=d((()=>{a(e),r(!1),c({})}),[e]),g=d((e=>{e.preventDefault(),t?x():r(!0),l&&l(n)}),[l,n]);return[n,{isDirty:i||Object.values(s).some(Boolean),field:u,update:p,reset:x,onSubmit:g}]},Mt=x((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>p("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[u("div",{className:N("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:u("div",{className:N("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?u(Ae,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),zt=e=>t=>t&&Object.entries(e).flatMap((([e,l])=>l(t[e])))||[],Vt=e=>!e?.length,Rt=e=>t=>l=>e(l)?[]:[t],Dt=x((({text:e,link:t})=>p(I,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[u(Ae,{children:e||"Нажимая кнопку, вы подтверждаете согласие с "}),t?u(fe,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"text-primary-main",children:u(Ae,{children:t.text})}):null]}))),At="container space-y-lg",jt="w-full max-w-xl space-y-s m-auto",Ft=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},$t=x((({title:e,children:t})=>p("fieldset",{className:"grid @xl:flex @xl:justify-between gap-lg border-b border-b-main-divider @xl:border-none",children:[e?u("legend",{className:"w-full",children:u(S,{title:e,headingType:"h6",className:"@xl:text-center"})}):null,t]}))),Lt="@xl:w-1/2 space-y-s",Et=x((({key:e,className:t="",id:l,name:n,type:a="text",label:i,placeholder:r,value:s="",valid:o=!0,children:m,onChange:x,onFocus:g,onBlur:f,pattern:b,autoFocus:y=!1,isTextarea:v=!1})=>{const w=h(null),k=d((e=>{x&&x(e.target?.value||"")}),[x]);c((()=>{y&&w.current?.focus()}),[y,w]);const C="w-full border rounded-md text-primary-text outline-none p-m",S=m?"pr-3xl":"",I=_t(o);return p("div",{className:N("relative",t),children:[p("label",{children:[i?Ot(i):null,v?u("textarea",{className:N("block resize-y min-h-24",C,I),id:N("textarea",l),name:n||l,placeholder:r,value:s,onInput:k,onFocus:g,onBlur:f},e):u("input",{type:a,className:N("h-14",C,S,I),ref:w,id:l,name:n||l,placeholder:r,value:s,onInput:k,onFocus:g,onBlur:f,pattern:b},e)]}),m]})})),Ot=e=>u("div",{className:"mb-xs",children:u(Ae,{size:"text-m",font:"font-light",children:e})}),_t=e=>e?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error",Ut=e=>u("div",{className:"h-4",children:e?u(Ae,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Ht=x((({className:e,label:t,value:l="",placeholder:n,error:a,onChange:i,onBlur:r,isTextarea:s,...o})=>p("div",{className:N("shrink-0 w-full",e),children:[u(Et,{type:"text","aria-label":t,label:t&&o?.errors?`${t}*`:t,valid:Boolean(!a),value:l,onChange:i,onBlur:r,isTextarea:s,placeholder:o?.errors&&!t?`${n}*`:n}),Ut(a)]}))),Wt=e=>"_"===e,Kt=e=>/\d/.test(e),Xt=e=>Wt(e)||Kt(e),qt=[..."+7 (___) ___-__-__"],Gt=qt.findIndex(Wt),Yt=qt.map(((e,t)=>Xt(e)?qt.slice(0,t).filter(Xt).length:-1));const Qt=x((({children:e,onChange:t,...l})=>{const n=d((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=qt.map(((e,l)=>Kt(e)?e:t.charAt(Yt[l])||e)),n=Yt.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(Gt,n)):l).join("")}(e))),[t]);return u(Et,{onChange:n,onFocus:e=>n(e?.target?.value||""),...l,children:e})})),Zt=x((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i,...r})=>p("div",{className:N("shrink-0 w-full",e),children:[u(Qt,{"aria-label":t,label:r?.errors?`${t}*`:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),Ut(n)]}))),Jt="Некорректно заполненное поле",el=Rt((e=>null!=e&&""!==e))(Jt),tl=Rt((e=>"string"==typeof e&&e.length>1))(Jt),ll=Rt((e=>"string"==typeof e&&(10===e.length||12===e.length)))(Jt),nl=(al=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,Rt((e=>"string"==typeof e&&al.test(e))))(Jt);var al;const il=Rt((e=>"boolean"==typeof e&&e))(Jt),rl=(e,t)=>p($t,{title:t,children:[p("div",{className:Lt,children:[u(Ht,{label:"Наименование организации",...Ft(e("fullName"),el)}),u(Ht,{label:"Контактное лицо",...Ft(e("name"),tl)})]}),p("div",{className:Lt,children:[u(Ht,{label:"ИНН",...Ft(e("inn"),ll)}),u(Zt,{label:"Телефон",...Ft(e("phone"),nl)})]})]}),sl=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],ol=e=>null!=e,cl=new Map,dl=e=>Boolean(e?.every((e=>Array.isArray(e)?dl(e):!e||"string"==typeof e))),ml=e=>dl(e)?e.toString():"";function hl(e,t,{fallback:l,cache:n}={}){const a=m((()=>ul(e)),[e]),[i,r]=o(void 0),[s,d]=o(void 0);c((()=>{if(!a.some(ol))return;let e=!1;const l=(t,l)=>{e||(r(t),d(l))};return(async()=>{try{l(await((e,t=cl)=>l=>{const n=ml(l),a=t.get(n);if(n&&ol(a))return a;const i=e(...l);return n&&ol(i)&&t.set(n,Promise.resolve(i)),i})(t,n)(a))}catch(e){l(void 0,e)}})(),()=>{e=!0}}),[t,n,a]);const h=l&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(a)&&l[a[0]];return{data:!i&&h?h:i,error:s,mutate:()=>Promise.resolve(void 0)}}function ul(e){return Array.isArray(e)?e:e instanceof Function?ul(e()):[e]}function pl(){const{data:e}=hl("/api/v1/regions",ft);return e||[]}function xl(e=!1){const[t,l]=o(e),n=d((()=>l(!0)),[]),a=d((()=>l(!1)),[]),i=d((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:n,setFalse:a,toggle:i}]}const gl=e=>e?.text||e?.key||"";function fl(e,t,l,n){c((()=>{if(e&&l)return e.addEventListener(t,l,n),()=>{e.removeEventListener(t,l,n)}}),[e,t,l])}function bl(e){const t=h(null),l=d((l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()}),[e]);return fl(globalThis.document,"click",l),t}const yl=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,vl=x((({popupRef:e,options:t,value:l,query:n,onChange:a,iconVersion:i})=>t?.length?u("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md",role:"listbox",ref:e,children:yl(t,n).map((e=>p("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"option","aria-selected":e.key===l?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[u("span",{className:"min-h-6",children:gl(e)}),u(q,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:N("absolute right-4 pt-3xs",e.key===l?.key?"":"hidden")})]},e.key)))}):null));function Nl({isOpen:e,options:t,value:l,query:n,onChange:a,onClose:i,iconVersion:r}){const s={open:(e,t)=>y.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>y.fire("popup",{type:"update",popup:e,...t}),close:()=>y.fire("popup",{type:"close"})},o=d((()=>{s.close(),i&&i()}),[i]),m=d((e=>{o(),a&&a(e)}),[o,a]),p=h(null),x=bl(o);return c((()=>{if(!e||!p.current)return;const a=p.current,{top:i,left:o,width:c,height:d}=a.getBoundingClientRect();s.update(u(vl,{popupRef:x,options:t,value:l,query:n,onChange:m,iconVersion:r}),{top:i+window.scrollY+d,left:o,width:c})}),[e,t,l,n,m]),p}const wl=x((({className:e,label:t,options:l=[],value:n,valid:a=!0,isBorder:i=!0,placeholder:r="",isSearch:s=!1,iconVersion:c,onChange:m})=>{const[h,{setFalse:x,setTrue:g}]=xl(),[f,b]=o(""),y=d((()=>{b(""),x()}),[]),v=Nl({isOpen:h,options:l,value:n,query:f,onChange:m,onClose:y,iconVersion:c});return p("div",{className:e,children:[kl(t),p("div",{className:N("relative",h?"z-20":"z-10"),ref:v,children:[p("div",{className:N("h-14 text-l flex justify-between items-center text-primary-text cursor-pointer relative z-10",Sl(i,a)),onClick:h?y:g,children:[u("p",{className:"p-m pr-8 flex items-center overflow-hidden text-ellipsis",children:gl(n)||r}),Cl(h,c)]}),s&&h?u("div",{className:N("absolute top-0 w-full z-20"),children:u(Et,{type:"text",autoFocus:!0,value:f,onChange:b})}):null]})]})})),kl=e=>e?u("div",{className:"mb-xs",children:u(Ae,{size:"text-m",color:"text-primary-text",font:"font-light",children:e})}):null,Cl=(e,t)=>u(q,{className:N("absolute right-3",e?"":"rotate-180"),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),Sl=(e,t)=>N(e?"border rounded-md hover:border-primary-hover":"",t?" border-gray":"border-error"),Il=x((({className:e="",label:t,error:l,...n})=>p("div",{className:e,children:[u(wl,{...n,valid:!l,label:n?.errors?`${t}*`:t}),Ut(l)]}))),Tl=x((({field:e})=>{const t=pl();return u(Il,{className:"w-full",label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:t.map((({code:e="",name:t=""})=>({key:e,text:t}))),...Ft(e("region"),el)})})),Bl=({field:e,title:t})=>p($t,{title:t,children:[u("div",{className:Lt,children:u(Il,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:sl,...Ft(e("acquiringType"),el)})}),u("div",{className:Lt,children:u(Tl,{field:e})})]});function Pl({disabled:e,onClick:t}){return l=>{!e&&t&&t(l)}}const Ml={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"},zl={primary:N("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:N("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")},Vl=x((({children:e,...t})=>{const l=e=>({...e,onClick:me(Pl(e),e)}),{className:n,version:a="primary",active:i,disabled:r,type:s="button",rounded:o=!0,role:c,onClick:d}=l(t);return u("button",{className:N("font-sans px-9 py-4","flex justify-center items-center gap-xs",i?"text-white bg-primary-active":"",r?"bg-main-gray text-main-disabled cursor-not-allowed":"",i||r?"":N(Ml[a],zl[a]),o?"rounded-md":"",n),type:s,role:c,onClick:d,children:e})})),Rl=(e,t)=>u(Vl,{className:N("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),Dl={typeForm:{key:"acqr",text:"Предупреждение о мошенничестве"},acquiringType:{key:"trade",text:"Торговый эквайринг"},fullName:"",inn:"",name:"",phone:"",onlineCheckout:!1,posTerminal:!1},Al=zt({acquiringType:el,region:el,fullName:el,inn:ll,name:tl,phone:nl}),jl=x((e=>{const{button:t,link:l,onSubmit:n}=e,a=d((e=>{const{acquiringType:t,onlineCheckout:l,posTerminal:a,...i}=e,r=Fl(t?.key),s={partnerComments:`Вид эквайринга=${t?.text||""}${r?`/Онлайн касса=${l}/POS-терминал=${a}`:"/Онлайн касса=false/POS-терминал=false"}`,...i};Vt(Al(e))&&n(s,!1)}),[n]),[,{field:i,...r}]=Pt(Dl,{onSubmit:a}),s=Fl(i("acquiringType").value?.key);return p("form",{className:At,onSubmit:r.onSubmit,children:[Bl({field:i,title:"Вид эквайринга и регион"}),rl(i,"Данные организации"),s?p("div",{children:[u(Mt,{text:"Хочу купить онлайн-кассу",...i("onlineCheckout")}),u(Mt,{text:"Хочу купить POS-терминал",...i("posTerminal")})]}):null,Rl(t),u(Dt,{link:l})]})})),Fl=e=>"all"===e||"trade"===e,$l=x((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...r})=>u("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:a,children:i.map((({d:e,fill:t,...l},n)=>{const a={...r,...l};return u("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},n)}))}))),Ll=[{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"}],El=x((({className:e,value:t,text:l,disabled:n,isRadio:a,onChange:i})=>{const r=d((e=>{n||(e.preventDefault(),i&&i(!t))}),[i,n,t]),s=a?u("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):u($l,{paths:Ll,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return u("div",{className:e,children:p("label",{className:"flex items-center relative cursor-pointer group/box",onClick:r,children:[u("div",{className:N("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":Ol(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:"checkbox","aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?s:null,l?u("div",{className:"ml-s",children:u(Ae,{size:"text-l",font:"font-light",children:l})}):null]})})})),Ol=e=>N("rounded border",e?"bg-primary-main":""),_l=x((({className:e,text:t,value:l,key:n,disabled:a,error:i,onChange:r})=>p("div",{className:N("shrink-0 w-full",e),children:[u(El,{text:t,value:l,disabled:a,onChange:r},n),Ut(i)]}))),Ul=(e,t,l)=>p("div",{className:"flex gap-m flex-col lg:flex-row w-full justify-between items-baseline",children:[p("div",{children:[p("div",{className:"flex gap-3",children:[u(El,{...e}),u(Dt,{text:"Согласен с ",link:t})]}),Ut(Ft(e,il).error)]}),Rl(l)]}),Hl=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const l=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),a=t?String(e.getFullYear()):String(e.getFullYear()).slice(-2);return t?`${a}-${n}-${l}`:`${l}.${n}.${a}`}},Wl=()=>{},Kl=({today:e,firstDayOfWeek:t,totalDays:l,currentMonth:n,currentYear:a,min:i,max:r,onDateClick:s})=>{const o=[];let c=1;for(let d=0;d<6;d++){const m=[];for(let o=0;o<7;o++)if(0===d&&o<t)m.push(u("td",{},`empty-${o}`));else if(c>l)m.push(u("td",{},`empty-${o}`));else{const t=new Date(a,n,c),l=Xl(t,e),o=ql(t,i,r);m.push(u("td",{children:u("div",{className:Gl(l,o),onClick:()=>!o&&s(t),children:c})},`day-${c}`)),c++}o.push(u("tr",{children:m},`row-${d}`))}return o},Xl=(e,t)=>t&&e.toDateString()===t.toDateString(),ql=(e,t,l)=>t&&e.getTime()<t.getTime()||l&&e.getTime()>l.getTime(),Gl=(e,t)=>N("p-s text-center rounded-md border",e?"":"border-transparent hover:bg-gray",t?"text-gray hover:bg-transparent":"cursor-pointer"),Yl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Ql=x((({today:e,currentMonth:t,currentYear:l,min:n,max:a,onDateSelect:i=Wl})=>{const r=d((e=>i(e)),[]),{firstDayOfWeek:s,totalDays:o}=m((()=>({firstDayOfWeek:new Date(l,t,1).getDay()-1,totalDays:new Date(l,t+1,0).getDate()})),[l,t]);return p("table",{className:"mx-auto",children:[u("thead",{className:"text-gray font-light",children:u("tr",{children:Yl.map(((e,t)=>u("th",{className:"p-s",children:e},String(t))))})}),u("tbody",{children:Kl({firstDayOfWeek:s,today:e,totalDays:o,currentYear:l,currentMonth:t,min:n,max:a,onDateClick:r})})]})})),Zl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],Jl=Zl.map((e=>({key:e}))),en=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),tn={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},ln={className:"min-w-32",iconVersion:"black",isBorder:!1},nn=x((({className:e="",label:t="",value:l,valid:n=!0,minDate:a,maxDate:i,onChange:r})=>{const[s,{setValue:c}]=xl(!1),[m,h]=o(l?.getMonth()||(new Date).getMonth()),[x,g]=o(l?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:f,handleNextMonth:b,handleSelectMonth:y,handleSelectYear:v,monthsOptions:w,yearsOptions:k,handleChangeVisibleCalendar:C,ref:S}=(({onShowCalendar:e,showCalendar:t,selectedMonth:l,onMonthSelect:n,onYearSelect:a,selectedYear:i})=>{const r=bl(d((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:d((()=>e(!t)),[t]),handleNextMonth:d((()=>{l+1<=11?n(l+1):(n(0),a(i+1))}),[l]),handlePrevMonth:d((()=>{l-1>=0?n(l-1):(n(11),a(i-1))}),[l]),handleSelectMonth:d((({key:e})=>n(Zl.indexOf(e))),[]),handleSelectYear:d((({key:e})=>a(Number(e))),[]),monthsOptions:Jl,yearsOptions:en,ref:r}})({onYearSelect:g,onMonthSelect:h,onShowCalendar:c,selectedYear:x,selectedMonth:m,showCalendar:s});return p("div",{className:N(e,"relative"),ref:S,children:[u(Ae,{size:"text-m","font-weight":"font-light",children:t}),an(C,l,n),s?p("div",{className:"absolute bg-white z-20 select-none",children:[p("div",{className:"flex gap-s",children:[u("div",{className:"my-auto",onClick:f,children:u(q,{...tn,className:"-rotate-90 cursor-pointer"})}),u(wl,{onChange:y,value:{key:Zl[m]},options:w,...ln}),u(wl,{onChange:v,value:{key:String(x)},options:k,...ln}),u("div",{className:"my-auto",onClick:b,children:u(q,{...tn,className:"rotate-90 cursor-pointer"})})]}),u(Ql,{today:l,currentMonth:m,currentYear:x,onDateSelect:r,min:a,max:i})]}):null]})})),an=(e,t,l)=>p("div",{onClick:e,className:N("flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",l?"border-gray":"border-error"),children:[u(I,{children:t&&Hl(t)}),u(q,{...tn,name:"CalendarIcon"})]}),rn=x((({className:e,label:t,value:l,error:n,onChange:a,...i})=>p("div",{className:N("shrink-0 w-full",e),children:[t?u("div",{className:"mb-xs",children:u(Ae,{size:"text-m",font:"font-light",children:i?.errors?`${t}*`:t})}):null,u(nn,{value:l,onChange:a,valid:Boolean(!n)}),Ut(n)]}))),sn={surname:"",name:"",middleName:""},on=(e,t=!0)=>p("div",{className:"space-y-s",children:[u(Ht,{label:"Фамилия",...Ft(e("surname"),tl)}),u(Ht,{label:"Имя",...Ft(e("name"),tl)}),u(Ht,{label:"Отчество (Обязательно, при наличии)",...e("middleName")}),t?u(rn,{label:"Дата рождения",...Ft(e("birthday"),el)}):null]}),cn={...sn,typeForm:{key:"ANTIFRAUD",text:"Предупреждение о мошенничестве"},phone:"",birthday:void 0,isClient:!1,comment:"",consentDataProcessing:!1},dn=zt({typeForm:el,surname:el,name:tl,birthday:el,phone:nl,comment:el,consentDataProcessing:il}),mn=x((({button:e,link:t,onSubmit:l})=>{const n=d((e=>{Vt(dn(e))&&l(e,!0)}),[l]),[,{field:a,...i}]=Pt(cn,{onSubmit:n});return u("form",{className:At,onSubmit:i.onSubmit,children:u($t,{children:p("div",{className:jt,children:[on(a,!0),u(Zt,{label:"Телефон",...Ft(a("phone"),nl)}),u(_l,{...a("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}),u(Ht,{...Ft(a("comment"),el),placeholder:"Комментарий",isTextarea:!0}),Ul(a("consentDataProcessing"),t,e)]})})})})),hn={typeForm:{key:"bcrd",text:"Заявка на бизнес-карту"},name:"",phone:"",inn:"",email:""},un=zt({region:el,name:tl,phone:nl,inn:ll,email:el}),pn=x((e=>{const{button:t,link:l,onSubmit:n}=e,a=d((e=>{Vt(un(e))&&n(e)}),[n]),[,{field:i,...r}]=Pt(hn,{onSubmit:a});return p("form",{className:At,onSubmit:r.onSubmit,children:[u(Tl,{field:i}),p($t,{children:[p("div",{className:Lt,children:[u(Ht,{label:"Контактное лицо",...Ft(i("name"),tl)}),u(Ht,{label:"ИНН",...Ft(i("inn"),ll)})]}),p("div",{className:Lt,children:[u(Zt,{label:"Телефон",...Ft(i("phone"),nl)}),u(Ht,{label:"Электронная почта",...Ft(i("email"),el)})]})]}),Rl(t),u(Dt,{link:l})]})})),xn={typeForm:{key:"CORRUPTION",text:"Факты коррупции"},...sn,phone:"",email:"",comment:"",consentDataProcessing:!1},gn=zt({typeForm:el,surname:el,name:tl,region:el,phone:nl,email:el,comment:el,consentDataProcessing:il}),fn=x((({button:e,link:t,onSubmit:l})=>{const n=d((e=>{Vt(gn(e))&&l(e,!0)}),[l]),[,{field:a,...i}]=Pt(xn,{onSubmit:n});return u("form",{className:At,onSubmit:i.onSubmit,children:u($t,{children:p("div",{className:jt,children:[on(a,!1),u(Tl,{field:a}),u(Zt,{label:"Телефон",...Ft(a("phone"),nl)}),u(Ht,{label:"Электронная почта",...Ft(a("email"),el)}),u(Ht,{...Ft(a("comment"),el),placeholder:"Ваше сообщение",isTextarea:!0}),Ul(a("consentDataProcessing"),t,e)]})})})})),bn=[];const yn=async e=>await gt(e,{method:"GET"})||bn;function vn(){const{data:e}=hl("/api/v1/premiumBranchesByRegions",ft);return e||[]}const Nn=x((({field:e,regionKey:t,isPremium:l=!1})=>{const n=l?vn().find((e=>e?.region===t))?.branches:function(e){const{data:t}=hl(e?`/api/v1/branches?regionCode=${e}`:null,yn);return t||bn}(t).filter((e=>e?.address));return u(Il,{label:"Адрес",placeholder:"Выберите адрес",options:(n||[]).map((({address:e=""})=>({key:e,text:e}))),...Ft(e("addressBranch"),el)})})),wn=["От 1 000 ₽","До 1 000 000 000 ₽"],kn=["От 1 мес","До 15 лет"],Cn=(e,t)=>p($t,{title:t,children:[p("div",{className:Lt,children:[u(Ht,{label:"Наименование организации",...Ft(e("fullName"),el)}),u(Ht,{label:"ИНН",...Ft(e("inn"),ll)}),u(Zt,{label:"Телефон",...Ft(e("phone"),nl)})]}),p("div",{className:Lt,children:[u(Ht,{label:"Годовая выручка, ₽",...Ft(e("annualRevenue"),el)}),u(Ht,{label:"Контактное лицо",...Ft(e("name"),tl)}),u(Ht,{label:"Электронная почта",...Ft(e("email"),el)})]})]}),Sn=(e,{normalize:t,format:l})=>{const{value:n,onFocus:a,onBlur:i,onChange:r}=e,[s,c]=o(!1),m=d((e=>{c(!0),a&&a(e)}),[]),h=d((()=>{c(!1),r&&r(t(n)),i&&i()}),[r,n]);return{value:s||!l?n:l(n),onFocus:m,onBlur:h}},In=(e,t,l)=>Math.max(t,Math.min(e,l));function Tn(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function Bn({list:e=[],min:t,max:l,step:n,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,o={backgroundSize:`${(100*(s>t?s-t:0)/(l-t)).toFixed(2)}% 100%`};return p("div",{children:[e.length?u("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>u("div",{className:N("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,u("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:u("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:o,type:"range",min:t,max:l,step:n,value:s,disabled:i,onInput:t=>{const l=Tn(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const Pn=1,Mn=100,zn=x((e=>{const{className:t,title:l,items:n=[],list:a=[],min:i=(a.length?0:Pn),max:r=(a.length?a.length-1:Mn),step:s=1,value:o=a[0]||i,disabled:c=!1,onChange:m}=e,h=Sn(e,{normalize:(e=0)=>a.length?Vn(a)(e):In(e,i,r),format:et()}),x=d((e=>{m&&m(Tn(e.target?.value))}),[m]);return p("div",{className:t,children:[p("label",{className:"block relative",children:[l?u(Ae,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,u("input",{className:N("mt-xs font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","pl-m box-border","text-primary-text hover:border-primary-hover focus:border-primary-text","disabled:border-gray disabled:bg-main-divider"),disabled:c,onInput:x,...h}),Bn({list:a,min:i,max:r,step:s,disabled:c,value:o,onChange:m})]}),Rn(n)]})})),Vn=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),Rn=e=>u("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>u(Ae,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),Dn=(e,t)=>p($t,{title:t,children:[u("div",{className:Lt,children:u(zn,{title:"Сумма, ₽",items:wn,min:1e3,max:1e9,...e("amount")})}),u("div",{className:Lt,children:u(zn,{title:"Срок, месяцев",items:kn,min:1,max:180,...e("term")})})]}),An={typeForm:{key:"cred",text:"Кредит"},amount:1e3,term:12,fullName:"",inn:"",name:"",phone:"",email:"",annualRevenue:""},jn=zt({fullName:el,annualRevenue:el,inn:ll,name:tl,phone:nl,region:el}),Fn=x((({button:e,link:t,onSubmit:l})=>{const n=d((e=>{const{amount:t,term:n,addressBranch:a,annualRevenue:i,...r}=e;Vt(jn(e))&&l({...r,addressBranch:a?.text||"",partnerComments:`Сумма=${t}/Срок=${n}/Выручка=${i}`})}),[l]),[a,{field:i,...r}]=Pt(An,{onSubmit:n});return p("form",{className:At,onSubmit:r.onSubmit,children:[Dn(i,"Параметры"),Cn(i,"Данные организации"),p($t,{title:"Офис банка",children:[u("div",{className:Lt,children:u(Tl,{field:i})}),u("div",{className:Lt,children:u(Nn,{field:i,regionKey:a.region?.key})})]}),Rl(e),u(Dt,{link:t})]})})),$n={typeForm:{key:"dpst",text:"Заявка на депозит"},name:"",phone:""},Ln=zt({name:tl,phone:nl}),En=x((({button:e,link:t,onSubmit:l})=>{const n=d((e=>{Vt(Ln(e))&&l(e)}),[l]),[,{field:a,...i}]=Pt($n,{onSubmit:n,resetOnSubmit:!1});return u("form",{className:At,onSubmit:i.onSubmit,children:u($t,{title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",children:p("div",{className:jt,children:[u(Ht,{label:"Имя",...Ft(a("name"),tl)}),u(Zt,{label:"Телефон",...Ft(a("phone"),nl)}),Rl(e),u(Dt,{link:t})]})})})})),On=[{text:"Задать вопрос по продуктам и услугам",key:"FEEDBACK"},{text:"Качество обслуживания",key:"FEEDBACK_QS"}],_n=[{key:"phone",text:"Телефонный звонок"},{key:"mail",text:"Электронное сообщение"}],Un=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],Hn={typeForm:el,region:el,surname:el,name:tl,feedbackMethod:el,phone:nl,email:el,comment:el,consentDataProcessing:il},Wn={...sn,typeForm:{key:"FEEDBACK",text:"Задать вопрос по продуктам и услугам"},serviceDirection:{key:"Физическое лицо"},birthday:void 0,feedbackMethod:{key:"Телефонный звонок"},phone:"",email:"",comment:"",consentDataProcessing:!1},Kn=x((({button:e,link:t,onSubmit:l})=>{const n=d((e=>{Xn(e.typeForm.key,e.serviceDirection?.key)?((e,t)=>{const l=zt({...Hn,addressBranch:el,inn:ll});Vt(l(e))&&t(e,!1)})(e,l):"FEEDBACK"===e.typeForm.key?((e,t)=>{const l=zt({...Hn,birthday:el});Vt(l(e))&&t(e,!0)})(e,l):((e,t)=>{const l=zt({...Hn,addressBranch:el});Vt(l(e))&&t(e,!0)})(e,l)}),[l]),[a,{field:i,...r}]=Pt(Wn,{onSubmit:n}),s="FEEDBACK_QS"===i("typeForm").value?.key,o=Xn(i("typeForm").value?.key,i("serviceDirection").value?.key);return u("form",{className:At,onSubmit:r.onSubmit,children:u($t,{children:p("div",{className:jt,children:[u(Il,{label:"Тема",placeholder:"Выберите тему",options:On,...Ft(i("typeForm"),el)}),s?u(Il,{label:"Направление обслуживания",placeholder:"Выберите направление",options:Un,...Ft(i("serviceDirection"),el)}):null,u(Tl,{field:i}),s?u(Nn,{field:i,regionKey:a?.region?.key}):null,on(i,!0),o?p("div",{children:[u(Ht,{label:"ИНН",...Ft(i("inn"),ll)}),u(Ht,{label:"Наименование организации",...i("fullName")})]}):null,u(Il,{label:"Способ получения ответа",options:_n,...Ft(i("feedbackMethod"),el)}),u(Zt,{label:"Телефон",...Ft(i("phone"),nl)}),s?p("div",{children:[u(Zt,{label:"Дополнительный телефон",...i("secondaryPhone").value&&"+7 ("!==i("secondaryPhone").value?Ft(i("secondaryPhone"),nl):i("secondaryPhone")}),u(Ht,{label:"Электронная почта",...Ft(i("email"),el)}),u(Ht,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...i("bankEmpolee")}),u(Ht,{label:"Дата и время обращения в Банк",...i("applicationDate")})]}):u(Ht,{label:"Электронная почта",...Ft(i("email"),el)}),u(Ht,{...Ft(i("comment"),el),placeholder:"Ваше сообщение",isTextarea:!0}),Ul(i("consentDataProcessing"),t,e)]})})})})),Xn=(e="",t="")=>"FEEDBACK_QS"===e&&"Юридическое лицо / ИП"===t,qn={},Gn="/wcms-resources";const Yn=x((e=>{const{button:t,sourceBookDir:l}=e,{regions:n}=function(e,t={}){const{fallback:l=qn,pathDir:n=Gn}=t,{data:a}=hl(e?`${n}/${e}.json`:null,ft,{fallback:l});return a||qn}(l||"regions-grant-support"),[a,i]=o({key:""}),r=ce({className:"text-white",version:t?.version}),s=n?.find((e=>e.name===a.key))?.href;return p("div",{className:"container space-y-s",children:[n?u(Il,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:n.map((({name:e=""})=>({key:e,text:e}))),value:a,onChange:i}):null,s?u("div",{className:"text-center",children:u(fe,{href:s,target:"_blank",className:N("p-m w-full @xl:w-auto",r),children:t?.text?t.text:"Перейти"})}):null]})})),Qn={...sn,phone:"",email:"",birthday:void 0,consentDataProcessing:!1},Zn=zt({surname:tl,name:tl,phone:nl,email:el,birthday:el,consentDataProcessing:il}),Jn=x((e=>{const{button:t,link:l,product:n="",onSubmit:a}=e,i=d((e=>{Vt(Zn(e))&&a({...e,product:n},!0)}),[a]),[,{field:r,...s}]=Pt(Qn,{onSubmit:i});return p("form",{className:At,onSubmit:s.onSubmit,children:[p($t,{children:[p("div",{className:Lt,children:[u(Ht,{label:"Фамилия",...Ft(r("surname"),tl)}),u(Ht,{label:"Отчество (Обязательно, при наличии)",...r("middleName")}),u(Zt,{label:"Телефон",...Ft(r("phone"),nl)})]}),p("div",{className:Lt,children:[u(Ht,{label:"Имя",...Ft(r("name"),tl)}),u(rn,{label:"Дата рождения",...Ft(r("birthday"),el)}),u(Ht,{label:"Электронная почта",...Ft(r("email"),el)})]})]}),Ul(r("consentDataProcessing"),l,t)]})})),ea={typeForm:{key:"SELFCOLLECTION",text:"Самоинкассация"},fullName:"",phone:"",consentDataProcessing:!1},ta=zt({typeForm:el,region:el,fullName:el,phone:nl}),la=x((({button:e,link:t,onSubmit:l})=>{const n=d((e=>{Vt(ta(e))&&l(e,!1)}),[l]),[,{field:a,...i}]=Pt(ea,{onSubmit:n});return u("form",{className:At,onSubmit:i.onSubmit,children:u($t,{children:p("div",{className:jt,children:[u(Ht,{label:"ФИО",...Ft(a("fullName"),el)}),u(Tl,{field:a}),u(Zt,{label:"Телефон",...Ft(a("phone"),nl)}),Ul(a("consentDataProcessing"),t,e)]})})})})),na=x((({field:e})=>{const t=vn().map((({region:e})=>({key:e,text:e})));return u(Il,{label:"Регион",placeholder:"Выберите регион",options:t,...Ft(e("region"),el)})})),aa=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],ia={typeForm:aa[0],...sn,email:"",phone:"",comment:"",consentDataProcessing:!1},ra=zt({typeForm:el,surname:el,name:tl,phone:nl,email:el,addressBranch:el,consentDataProcessing:il}),sa=x((({button:e,link:t,onSubmit:l,defaultType:n="PREMIUMSERVICE"})=>{const a=d((e=>{Vt(ra(e))&&l(e,!0)}),[l]),[i,{field:r,...s}]=Pt({...ia,typeForm:oa(n)},{onSubmit:a}),o=i?.region?.key;return p("form",{className:At,onSubmit:s.onSubmit,children:[p($t,{title:"Ваши данные",children:[p("div",{className:Lt,children:[u(Ht,{label:"Фамилия",...Ft(r("surname"),tl)}),u(Ht,{label:"Отчество (Обязательно, при наличии)",...r("middleName")}),u(Ht,{label:"Электронная почта",...Ft(r("email"),el)})]}),p("div",{className:Lt,children:[u(Ht,{label:"Имя",...Ft(r("name"),tl)}),u(Zt,{label:"Телефон",...Ft(r("phone"),nl)}),u(Il,{label:"Тип обслуживания",options:aa,...Ft(r("typeForm"),el)})]})]}),p($t,{title:"Офис банка",children:[u("div",{className:Lt,children:u(na,{field:r})}),u("div",{className:Lt,children:u(Nn,{field:r,regionKey:o,isPremium:!0})})]}),u(Ht,{...r("comment"),placeholder:"Комментарий, удобное время и прочее",isTextarea:!0}),Ul(r("consentDataProcessing"),t,e)]})})),oa=e=>aa.find((t=>t.key===e)),ca=x((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>u("div",{className:i,children:p("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[u("input",{className:"appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-primary-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer",type:"radio",value:l,name:e,checked:n,onChange:e=>a(e.target.value)}),t?u(Ae,{color:"text-primary-text",children:t}):null]})}))),da=e=>{const{value:t,onChange:l}=e("vedTypes");return u($t,{children:p("div",{className:"gap-xl grid @xl:flex @xl:items-center",children:[u(ca,{name:"vedTypes",text:"Валютный контроль",value:"currencyControl",checked:"currencyControl"===t,onChange:e=>l&&l(e)}),u(ca,{name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:e=>l&&l(e)}),u(ca,{name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:e=>l&&l(e)}),u(ca,{name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:e=>l&&l(e)})]})})},ma=({field:e})=>{const t="currencyControl"===e("vedTypes").value;return p("div",{className:"space-y-s",children:[t?u(Tl,{field:e}):null,p("div",{className:"grid @xl:grid-cols-2 @xl:gap-x-lg gap-s",children:[t?u(Ht,{label:"ИНН",...Ft(e("inn"),ll)}):null,u(Ht,{label:"Наименование организации",...Ft(e("fullName"),el)}),u(Ht,{label:"ФИО",...Ft(e("name"),tl)}),u(Zt,{label:"Телефон",...Ft(e("phone"),nl)}),t?null:u(Ht,{label:"Электронная почта",...e("email")})]})]})},ha={typeForm:{key:"KVED",text:"Заявка на консультацию ВЭД"},vedTypes:"currencyControl",fullName:"",name:"",phone:"",inn:"",email:"",partnerComments:""},ua={fullName:el,name:tl,phone:nl},pa=zt({...ua}),xa=zt({...ua,inn:ll,region:el}),ga=e=>"currencyControl"===e,fa=e=>({currencyControl:"currencyControl"===e,documentOperations:"documentOperations"===e,conversionTransactions:"conversionTransactions"===e,otherIssues:"otherIssues"===e}),ba={ApplicationFormBusinessCard:pn,ApplicationFormWed:x((e=>{const{button:t,link:l,onSubmit:n}=e,a=d((e=>{const{typeForm:t,fullName:l,name:a,phone:i,email:r,inn:s,region:o,vedTypes:c,partnerComments:d}=e,m={typeForm:t,fullName:l,name:a,phone:i,vedTypes:fa(c),partnerComments:d,...ga(c)?{inn:s,region:o}:{email:r}};Vt((e=>ga(e)?xa:pa)(c)(e))&&n(m)}),[n]),[,{field:i,...r}]=Pt(ha,{onSubmit:a});return p("form",{className:"container space-y-lg",onSubmit:r.onSubmit,children:[da(i),u(S,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),ma({field:i}),u(Ht,{label:"Обращение",placeholder:"Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка",...i("partnerComments"),isTextarea:!0}),Rl(t),u(Dt,{link:l}),u(S,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),p("div",{className:"flex gap-xl",children:[p("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:[u(ne,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),u("span",{children:"8 (800) 200-78-70"})]}),p("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[u(ne,{image:{icon:"MailIcon"},width:"24",height:"24"}),u("span",{children:"ved@rshb.ru"})]})]})]})})),ApplicationFormDeposit:En,ApplicationFormCredit:Fn,ApplicationFormAcquiring:jl,ApplicationFormGrantSupport:Yn,ApplicationFormIndividuals:Jn,ApplicationFormFeedback:Kn,ApplicationFormAntiFraud:mn,ApplicationFormCorruption:fn,ApplicationFormSelfCollection:la,ApplicationFormUltraPremium:sa},ya=x((({responseType:e})=>{const t="OK"===e;return p("div",{className:`flex items-center p-lg rounded-md space-x-m ${t?"bg-ok":"bg-fail"}`,children:[u(ne,{image:{icon:(t?"ResponseOKIcon":"ResponseFailIcon")?"ResponseOKIcon":"ResponseFailIcon",iconVersion:"normal"},width:"42",height:"42"}),p("div",{children:[u(S,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),u(Ae,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),va={send:async function(e,t=!1){const l=t?"/api/v1/lead":"/api/v1/sendcorporatelead",{typeForm:n,region:a,phone:i="",email:r,birthday:s,inn:o,fullName:c,addressBranch:d,secondaryPhone:m="",bankEmpolee:h,applicationDate:u,...p}=e,x={typeForm:n,[t?"regionBranch":"region"]:a,[t?"phoneNumber":"phone"]:It(i),[t?"email":"mail"]:r,...t?{birthday:s}:{inn:o,fullName:c},..."FEEDBACK"===n?{}:{addressBranch:d,bankEmpolee:h,applicationDate:u,...Tt(m)},...p};try{const e=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(x)});return e?.ok?await e.json():null}catch(e){return null}}},Na=x((e=>{const{className:t,formBlock:l,...n}=e,[a,i]=o(""),r=d((async(e,t=!1)=>{const l=ka(e),n=await va.send(l,t)?"OK":"Fail";return i(n),n}),[]);return u(k,{className:t,defaultPadding:"p-6xl",...n,children:p("div",{className:"container max-w-[978px] space-y-lg",children:[l?.title?u(S,{headingType:"h3",title:l.title,className:"@xl:text-center"}):null,l?wa(l,r):null,a?u(ya,{responseType:a}):null]})})})),wa=(e,t)=>{const l=e?.formType;if(!l||!(l in ba))return null;return u(ba[l],{...e,onSubmit:t})},ka=e=>Object.fromEntries(Object.entries(e).map((([e,t])=>[e,(t?.region?t?.text:t?.key)||t]))),Ca="text-center",Sa={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Ia=x((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const r=String(n?.width||t);return a?u("div",{style:{width:`${r}px`,height:`${r}px`},className:N("rounded-icon object-fit flex justify-center items-center",Sa[l],e),children:u(q,{...i,width:"54%",height:"54%",name:a})}):null})),Ta=x((({className:e="",title:t,benefitList:l,...n})=>p(k,{className:e,defaultPadding:"p-6xl",...n,children:[t?u(S,{headingType:"h3",as:"h2",className:Ca,title:t}):null,l?.length?u("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:l.map(Ba)}):null]}))),Ba=({label:e,description:t,items:l,icon:n,iconBgVersion:a,isDotted:i=!1},r)=>p("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[n?.icon?u(Ia,{className:"shrink-0",defaultIconSize:44,iconBgVersion:a||"",...n}):null,n?.src?u(ne,{className:"shrink-0",image:n}):null,e?p("div",{className:"@sm:h-full space-y-xs",children:[u(S,{headingType:"h6",children:e}),u(Ae,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),u(Je,{dotClassName:"bg-secondary-text",listItemSize:"S",items:l,isDotted:i})]}):null]},String(r)),Pa=e=>({icon:t,title:l,description:n},a)=>p("div",{className:N("flex flex-col gap-1","items-center",n||l?"":"justify-center"),children:[l?u(Ae,{size:"text-h6",font:"font-normal",align:e,children:l}):null,t?u(ne,{image:t,height:"180",className:"w-auto mx-auto"}):null,n?u(Ae,{size:"text-h6",font:"font-normal",align:e,children:n}):null]},String(a)),Ma=(e,t,l)=>u("div",{className:`grid gap-2xs ${za(t)}`,children:e.map(Pa(l))}),za=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},Va=x((({bonusBenefits:e,cardTextAlign:t="text-center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>p(k,{className:N("space-y-3xl",l),defaultPadding:"p-6xl",...r,children:[u(B,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?Ma(e,n,t):null]}))),Ra={start:"justify-start",center:"justify-center",end:"justify-end"},Da=x((({buttons:e,className:t="",align:l,...n})=>{const a=l?N("flex",Ra[l]):"";return u(k,{className:N("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:Xe(e)})})),Aa=(e,t=0)=>{const{itemCount:l,visibleItemCount:n}=e,[a,i]=o(t),r=d((()=>i((e=>Math.min(e+1,l-1)))),[l]),s=d((()=>i((e=>Math.max(e-1,0)))),[l]),c=n?l>n&&a<l-n:a<l-1,m=a>0;return[a,{inc:r,dec:s,canInc:c,canDec:m,isScrollAvailable:m||c}]},ja=x((({className:e,disabled:t,...l})=>u(fe,{rounded:!0,className:N("group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black",t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main",e||""),disabled:t,...l,children:u(ne,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover/btn:text-primary-main",width:"16",height:"16"})}))),Fa=x((e=>u(ja,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),$a=x((e=>u(ja,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"})));function La({dec:e,inc:t,canDec:l,canInc:n,btnClass:a,className:i=""}){return l||n?p("div",{children:[l?u(ja,{className:N("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?u(ja,{className:N("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const Ea=x((({className:e,title:t,value:l,fractionDigits:n,fixed:a,prefix:i,postfix:r})=>p("div",{className:N("flex justify-between @xl:flex-col",e),children:[t?u(Ae,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}):null,u("div",l?{children:u(Ae,{size:"text-h3",children:[i,et(n,{fixed:a})(l),r].filter(Boolean).join(" ")})}:{children:u(Ae,{size:"text-h3",children:"-"})})]}))),Oa=1e4,_a=5e6,Ua=Math.round(29.5),Ha={minSum:Oa,maxSum:_a,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Wa={minSum:Oa,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Ka={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Xa={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},qa={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},Ga=e=>e?u(I,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null,Ya=x((({rate:e=0,title:t="Ставка",unit:l,fractionDigits:n=2,depositeName:a,isShowDepositeName:i})=>p("div",{children:[u(Ae,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}),p("div",{className:"relative",children:[p("div",{className:"flex justify-start gradient-color-text",children:[u("span",{className:"font-mohave text-title-huge pr-xl -mt-m tracking-[-15px]",children:et(n,{fixed:!0})(e)}),l?u("span",{className:"text-7xl",children:l}):null]}),a&&i?u("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),Qa=x((({title:e="Ставка",isUnavailableByTerm:t=!1})=>p("div",{className:"space-y-s",children:[u(Ae,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u(q,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),u("div",{className:"w-64",children:t?p(I,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",u("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):u(I,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),Za=({title:e="Ставка",rate:t=0,unit:l="%",fractionDigits:n=2,isUnknownRateShown:a=!0,...i})=>a&&0===t?u(Qa,{title:e,...i}):p("div",{children:[u("div",{className:"hidden @xl:block",children:u(Ya,{title:e,rate:t,unit:l,fractionDigits:n,...i})}),u("div",{className:"@xl:hidden",children:u(Ea,{title:e,value:t,postfix:l,fractionDigits:n,fixed:!0,...i})})]});function Ja({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${et(2)(l.min||0)} ₽`,`До ${et(2)(l.max||0)} ₽`];return u(zn,{items:e?n:[],step:t,...l})}function ei(e){const{data:t}=hl(`/wcms-resources/${e}.json`,ft);return t}const ti=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,a=ei(t||"bonus-calculator-data")||Ka,[i,r]=((e,t,l)=>{const{minSumTravel:n,minSumOther:a,maxBonus:i,prefMonthsNum:r,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===n&&l===a)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*l),i);return[m,m*r+Math.min(Math.round(c*t)+Math.round(d*l),i)*(12-r)]})(a,l,n);return{...a,...e,monthBonus:i,yearBonus:r}},li=x((({className:e="",sourceBookDir:t,buttons:l,footnote:n})=>{const[a,{field:i}]=Pt({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:r,maxSumTravel:s,minSumOther:o,maxSumOther:c,monthBonus:d,yearBonus:m}=ti(a,t);return p("section",{className:N("flex flex-col justify-between @5xl:flex-row gap-y-4xl",e),children:[p("div",{className:"flex flex-col @xl:max-w-md gap-2xl border-b border-b-main-divider @xl:border-none pb-3xl @xl:pb-0",children:[Ja({title:"Сумма покупок в категории путешествия, ₽",min:r,max:s,step:500,isShowItems:!1,...i("travelExpenseValue")}),Ja({title:"Сумма покупок в остальных категориях, ₽",min:o,max:c,step:500,isShowItems:!1,...i("restExpenseValue")})]}),d>=0?Za({title:"Баллов за месяц",rate:d,fractionDigits:0,isUnknownRateShown:!1,unit:""}):null,p("div",{className:"flex flex-col gap-y-xl @xl:w-96",children:[m>=0?u(Ea,{title:"Баллов за год",value:m}):null,Xe(l,{isVertical:!0}),Ga(n)]})]})})),ni=x((({className:e,inputChildren:t,rateChildren:l,resultChildren:n})=>p("section",{className:N("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[u("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:t}),u("div",{className:"border-b border-main-divider md:hidden"}),l,u("div",{className:"flex flex-col gap-2xl sm:w-96 max-w-full",children:n})]}))),ai=(e,t=0)=>e?.sum&&e.sum>=Oa&&e.sum<=_a?e.sum:t,ii=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,ri=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,si={horizontal:"gap-5xl",vertical:"flex-col gap-s"},oi=x((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>u("div",{className:N(`flex ${si[a]}`,l),children:e?.map((({id:e,text:l})=>u(El,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),ci=({items:e,title:t,mobileTitle:l=t,orientation:n="horizontal",value:a,radioGroupClassName:i,onChange:r})=>p("div",{className:"space-y-s",children:[t?u("div",{className:"hidden @5xl:block",children:u(Ae,{color:"text-secondary-text",font:"font-light",children:t})}):null,l?u("div",{className:"@5xl:hidden",children:u(Ae,{color:"text-secondary-text",font:"font-light",children:l})}):null,u(oi,{orientation:n,items:e,checkedItem:e[a?0:1].id,className:N("flex-col sm:flex-row",i),onChange:t=>r&&r(t===e[0].id)})]}),di=e=>ci({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),mi=e=>e,hi=(e=mi)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),ui=hi(),pi=(e=mi)=>hi((t=>-e(t))),xi=pi(),gi=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:fi([e,t],n),fi=([e,t],l=[])=>({[e]:l.length?xi(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?ui(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),bi=(e,[t,l],n)=>e>=n[t]&&e<=n[l],yi=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,vi=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,daysValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a/30)-n):Math.round(n*e*a/365/100)},Ni=x((({className:e="",rateParams:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:i,defaultParams:r})=>{const[s,{field:o}]=Pt({moneyValue:ai(r,1e5),daysValue:ii(r,90),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),c=((e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=ei(t||"business-calculator-data"),o=i||a,c=l<90||l>730;if(l<=30)return{...qa,...e,isDisabledOperatingDeposit:c,isUnavailableByTerm:!0};const d=s?.rateRows?.find((e=>r===e.isMonthlyInterestPayment&&yi(o,e)&&bi(n,["minSum","maxSum"],e)&&bi(l,["minDays","maxDays"],e)))||qa,{rate:m}=d,h=vi(m,e),u=n+h,p=s?.rateRows||[qa];return{...d,...fi(["minSum","maxSum"],p),...fi(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:c,income:h,finalSum:u}})(s,t?.rateType&&t.sourceBookDir),{income:d,finalSum:m,rate:h,isUnavailableByTerm:x,depositeName:g}=c;return u(ni,{className:e,inputChildren:p("div",{children:[Ja({title:"Сумма, ₽",min:c.minSum,max:c.maxSum,...o("moneyValue"),value:c.moneyValue}),(f={title:"Срок, дней",min:c.minDays,max:c.maxDays,...o("daysValue"),value:c.daysValue},u(zn,{items:[`От ${ri(f.min||0)}`,`До ${ri(f.max||0)}`],step:1,...f})),p("div",{className:"flex flex-col sm:flex-row gap-y-4 gap-x-14",children:[wi(c,o),di({title:"Выплата процентов",orientation:"vertical",...o("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]})]}),rateChildren:Za({rate:h,depositeName:g,isShowDepositeName:i,isUnavailableByTerm:x}),resultChildren:p("div",{children:[ki(m,d),Xe(l,{isVertical:!0}),Ga(n),Ga(a)]})});var f})),wi=(e,t)=>p("div",{className:"space-y-s",children:[u(Ae,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),p("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[u(El,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),u(El,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),ki=(e,t)=>p("div",{className:"flex flex-col gap-2xl sm:gap-0 mb-lg",children:[u(Ea,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),u(Ea,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),Ci=({min:e=0,max:t=0,availableMonths:l,...n})=>u(zn,{items:[`От ${Si(e)}`,`До ${Si(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),Si=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Ii=e=>ci({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),Ti=e=>Bi({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Bi({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&Bi({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&Bi({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Bi=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Pi=(e,t)=>{const{isAnnuity:l,moneyValue:n,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(l){const t=e/1200;return i?(n+i)*(t+t/(Math.pow(1+t,a)-1)):n*(t+t/(Math.pow(1+t,a)-1))}return Math.round(n/a)+n*(e/1200)},Mi=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=ei(t||"credit-calculator-data"),r=i?.rateRows||[Ha],s=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Ti({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:i?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:o,maxSum:c}=gi(["minSum","maxSum"],s,r),{minMonths:d,maxMonths:h}=gi(["minMonths","maxMonths"],s,r),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>Ti({row:e,userInputParams:t,paramsViewSettings:l})&&bi(n,["minSum","maxSum"],e)&&bi(a,["minMonths","maxMonths"],e)))||Ha)({rateRows:r,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:p}=u,x=Pi(p,e);return m((()=>({...u,...e,minSum:o,maxSum:c,minMonths:d,maxMonths:h,moneyValue:n,monthsValue:a,monthlyPayment:x})),[e,i])},zi=x((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a,defaultParams:i})=>{const[r,{field:s}]=Pt({moneyValue:ai(i,2e5),monthsValue:ii(i,Ua),isAnnuity:Boolean(i?.isAnnuity),isInsurance:Boolean(i?.isEnableInsurance),isSalaryClient:Boolean(i?.isEnableSalaryClient),isPensionClient:Boolean(i?.isEnablePensionClient),isStateEmployee:Boolean(i?.isEnableStateEmployee)}),o=Mi(r,t,a),c=Ii({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...s("isAnnuity")});return u(ni,{className:e,inputChildren:p("div",{children:[Ja({title:"Сумма кредита, ₽",step:500,min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),Ci({title:"Срок кредита, месяцев",min:o.minMonths,max:o.maxMonths,...s("monthsValue"),value:o.monthsValue}),Vi({...o,...a},s),u("div",{className:"sm:hidden",children:c})]}),rateChildren:Za({rate:o.rate}),resultChildren:p("div",{children:[u(Ea,{title:"Ежемесячный платёж",value:o.monthlyPayment,postfix:"₽"}),u("div",{className:"hidden sm:block mb-lg",children:c}),Xe(l,{isVertical:!0}),Ga(n)]})})})),Vi=(e,t)=>p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?u(El,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?u(El,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?u(El,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?u(El,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Ri=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let l=1;for(;l<t.length;){const[e,n]=t[l-1],[a,i]=t[l];n>=a?t.splice(l-1,2,[e,Math.max(n,i)]):l++}return t},Di=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=ei(t||"deposit-calculator-data"),r=i?.rateRows?.[0]?Fi(i.rateRows[0].minMonths,i.rateRows[0].maxMonths):0,s=!l?.isShowMonthlyInterestPayment,o=!l?.isShowRemoteRegistration,c=i?.rateRows?.find((t=>ji({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:s})&&ji({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:o})&&bi(n,["minSum","maxSum"],t)&&bi(a||r,["minMonths","maxMonths"],t)))||Xa,{rate:d}=c,m=Ai(d,e),h=n+m,u=i?.rateRows||[Xa];return{...c,...fi(["minSum","maxSum"],u),...fi(["minMonths","maxMonths"],u),availableMonths:Ri(u.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,l=1)=>Array.from({length:Math.abs(t-e)/l+1},((n,a)=>t>=e?e+a*l:e-a*l)))(e,t))),...e,defaultMonth:r,income:m,finalSum:h}},Ai=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,monthsValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a)-n):Math.round(n*e*30*a/365/100)},ji=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],Fi=(e,t)=>e+Math.round((t-e)/2),$i=x((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a,defaultParams:i})=>{const[r,{field:s}]=Pt({moneyValue:ai(i,2e4),monthsValue:ii(i),isMonthlyInterestPayment:Boolean(i?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(i?.isRemoteRegistration)}),o=Di(r,t,a),{defaultMonth:d,rate:m,income:h,finalSum:x}=o,{onChange:g}=s("monthsValue");return c((()=>{!r.monthsValue&&g&&g(d)}),[d]),u(ni,{className:e,inputChildren:p("div",{children:[Ja({title:"Сумма, ₽",min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),Ci({title:"Срок, месяцев",min:o.minMonths,max:o.maxMonths,availableMonths:o.availableMonths,...s("monthsValue"),value:o.monthsValue}),Li({...o,...a},s)]}),rateChildren:Za({rate:m}),resultChildren:p("div",{children:[u(Ea,{title:"Доход в конце срока",value:h,postfix:"₽",prefix:"+"}),u(Ea,{title:"Сумма в конце срока",value:x,postfix:"₽"}),Xe(l,{isVertical:!0}),Ga(n)]})})})),Li=(e,t)=>{return p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?di({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},ci({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},Ei=e=>Oi({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Oi({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Oi=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],_i=(e,t,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=ei(t||"refinancing-calculator-data"),o=s?.rateRows||[Wa],c=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Ei({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:s?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:d,maxSum:h}=gi(["minSum","maxSum"],c,o),{minMonths:u,maxMonths:p}=gi(["minMonths","maxMonths"],c,o),x=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>Ei({row:e,userInputParams:t,paramsViewSettings:l})&&bi(n+r,["minSum","maxSum"],e)&&bi(i,["minSumOld","maxSumOld"],e)&&bi(r,["minSumExtra","maxSumExtra"],e)&&bi(a,["minMonths","maxMonths"],e)))||Wa)({rateRows:o,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:g}=x,f=Pi(g,e),b=e.oldMonthlyPayment-f;return m((()=>({...x,...e,minSum:d,maxSum:h,minMonths:u,maxMonths:p,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:f,benefit:b})),[e,s])},Ui=x((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[i,{field:r}]=Pt({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),s=_i(i,t,a),o=Ii({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...r("isAnnuity")});return u(ni,{className:e,inputChildren:p("div",{children:[Ja({title:"Остаток долга в других банках, ₽ ",step:500,min:s.minSum,max:s.maxSum-s.maxSumExtra,...r("moneyValue"),value:s.moneyValue}),Ja({title:"Ежемесячный платёж в других банках, ₽",step:500,min:s.minSumOld,max:s.maxSumOld,...r("oldMonthlyPayment"),value:s.oldMonthlyPayment}),Ci({title:"Новый срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...r("monthsValue"),value:s.monthsValue}),Hi({...s,...a},r),s.isExtraMoney?Ja({title:"Дополнительная сумма, ₽ ",step:500,min:s.minSumExtra,max:s.maxSumExtra,...r("moneyExtra"),value:s.moneyExtra}):null,u("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:o})]}),rateChildren:Za({rate:s.rate,fractionDigits:1}),resultChildren:p("div",{children:[u(Ea,{title:"Ежемесячный платёж",value:s.monthlyPayment,postfix:"₽"}),s.benefit>0?u(Ea,{title:"Выгода в месяц",value:s.benefit,postfix:"₽"}):null,u("div",{className:"hidden sm:block mb-lg",children:o}),Xe(l,{isVertical:!0}),Ga(n)]})})})),Hi=(e,t)=>p("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?u(El,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?u(El,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,u(El,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),Wi={CreditCalculatorForm:zi,DepositCalculatorForm:$i,BusinessDepositCalculatorForm:Ni,BonusCalculatorForm:li,RefinancingCalculatorForm:Ui},Ki=(e,t)=>{const l=e?.calcType;if(!l||!(l in Wi))return null;const n=Wi[l];return u("section",{className:"box-border relative bg-white flex shrink-0 self-start basis-full",role:"listitem",children:p("div",{className:"box-border p-4xl w-full space-y-xl",children:[e?.title?u(S,{className:"text-center",title:e.title}):null,u(n,{...e})]})},String(t))},Xi=x((({className:e="",tabAlign:t,calculatorTabs:l=[],...n})=>{const a=l.map((e=>e.nav||{})),i=l.map((({calculatorBlock:e})=>e||{})),[r,s]=o(0),c=d((e=>s(e)),[]),[m,h]=Aa({itemCount:l?.length,visibleItemCount:3});return p(k,{className:N("box-border overflow-hidden relative",e),defaultPadding:"p-0",...n,children:[p("div",{className:"bg-white",children:[a.length>1?qi({activeIndex:m,tabsNav:a,tabAlign:t,slideIndexShift:r,onClick:c}):null,La({...h,btnClass:["left-3","right-3"],className:"top-10"})]}),u("div",{className:"flex",style:{transform:`translateX(-${r}00%)`},role:"list",children:i?.length?i.map(Ki):null})]})}));function qi({activeIndex:e,tabsNav:t,tabAlign:l,slideIndexShift:n,onClick:a}){return p("div",{children:[u("div",{style:{transform:`translateX(-${388*e}px)`},className:"flex flex-col justify-end items-center h-32 pt-4xl box-border duration-1000",children:u("div",{className:N("w-full flex flex-nowrap items-end gap-xs",l?Ra[l]:""),children:t.map(((e,t)=>function({tab:e,i:t,isActive:l,onClick:n}){const a=l?"w-96 p-m border-none bg-primary-main text-white":"w-96 p-s ease-in duration-300 bg-white text-primary-text",i=l?"text-xl mb-xs":"text-l mb-2xs",r=l?"text-l font-light text-white":"text-m font-light text-secondary-text",s=l?"":"text-primary-main",o=e?.icon?.iconVersion,c=l?"white":"normal";return p("button",{type:"button",onClick:n,"aria-label":e?.title,className:N("box-border relative border border-gray cursor-pointer text-left border-b-0 flex space-x-m min-h-20",a),children:[u(ne,{className:N("h-6 w-6 min-w-6 min-h-6",s),image:{...e?.icon,iconVersion:o??c},width:"24",height:"24"}),p("div",{className:"border-0",children:[u("div",{className:i,children:e?.title}),u("div",{className:r,children:e.description})]})]},String(t))}({tab:e,i:t,isActive:Boolean(t===n),onClick:()=>a(t)})))})}),u("div",{className:"w-full h-2 bg-primary-main"})]})}const Gi=x((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:i=0,...r}=e,s=Sn(e,{normalize:(e=a)=>l&&n?String(In(Number(Yi(e)),l,n)):Yi(e),format:et(i)}),o=d((e=>t&&t(Yi(e))),[t]);return u(Et,{onChange:o,...r,...s})})),Yi=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Qi=x((e=>u(Gi,{...e,fractionDigits:2,children:u("div",{className:"absolute right-4 bottom-4",children:u(Ae,{size:"text-xl",font:"font-light",children:"₽"})})}))),Zi={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Ji={amount:1500},er=x((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:n="1500",button:a,formType:i="private",...r})=>{const[{amount:s},{field:d}]=Pt(Ji),[m,h]=o(!1);return c((()=>{h(s<=0)}),[s]),p(k,{className:N("flex flex-col items-center",e),defaultPadding:"p-6xl",...r,children:[t?u(S,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,p("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:Zi[i],children:[u(Qi,{valid:!m,placeholder:n,label:l,...d("amount",{parse:Number,format:String})}),u("input",{type:"hidden",name:"amount",value:s}),a?.text?u(Vl,{className:"w-full mt-lg",type:"submit",disabled:m,children:a.text}):null]})]})})),tr=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function lr(e,{sensitivity:t,rootRef:l}={}){const n=h(null),a=m((()=>({threshold:nr(t),root:l?.current})),[t,l?.current]);return c((()=>{if(!n.current)return;const t=new IntersectionObserver(e,a);return t.observe(n.current),()=>{t.disconnect()}}),[e,a]),n}function nr(e=0){const t=Math.round(10*e);return Array.from({length:t}).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const ar=x((({className:e,style:t,idx:l,activeIndex:n,observerOptions:a,children:i,onIntersection:r})=>{const s=lr(d((e=>{e.length&&r&&r(l||0,e[e.length-1])}),[r,l]),a);return u("div",{className:N("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(l===n),ref:s,children:i})})),ir=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],rr=x((({className:e,itemClassName:t,containerRef:l,activeIndex:n,visibleItemCount:a=0,gap:i=0,padding:r=0,listType:s="horizontal-list",snapAlign:o="snap-center",minHeight:c,children:m,onVisibleItemsChange:p,onVisibleIndicesChange:x})=>{const g={sensitivity:1,rootRef:l},f=h([]),b=d(((e,t)=>{const l=[...f.current||[]];l[e]=t,f.current=l,p&&p(l),x&&x(or(l))}),[p,x]),y=a>0?i*Number(a)-1:0,v="vertical-list"===s,w="horizontal-list"===s,k={...w?sr(r,y):{},...v?tr(c):{},gap:`${i}px`};return u("div",{className:N("box-border overflow-auto no-scrollbar",s,e),style:k,ref:l,children:(C=(e,l)=>u(ar,{className:N(o,a?ir[a-1]:"",v?"h-full":"",t),style:w?sr(r/4):{},activeIndex:n,idx:l,observerOptions:g,onIntersection:b,children:e},String(l)),e=>null==e?e:Array.isArray(e)?e.map(C):C(e,0))(m)});var C})),sr=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),or=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),cr={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},dr={"horizontal-list":"w-6","vertical-list":"h-6"},mr=x((({className:e="",containerRef:t,activeIndex:l,dotCount:n=0,listType:a="horizontal-list",version:i})=>n?u("div",{className:N("flex gap-xs",cr[a],i?"group":"",e),"data-ver":i,children:Array.from({length:n}).fill(null).map(((e,n)=>u("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${n===l?dr[a]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(e=>{e!==l&&t?.current&&t.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(n)},String(n))))}):null)),hr=e=>t=>e.scrollWidth/t,ur=e=>(t,l)=>{e.scrollBy({left:l*hr(e)(t),behavior:"smooth"})},pr=({itemCount:e,onVisibleIndicesChange:t})=>{const l=h(null),[n,a]=o([]),i=d((e=>{a((t=>{return(l=t)===(n=e)||Boolean(l&&n&&l?.length===n?.length&&l.every(((e,t)=>e===n[t])))?t:e;var l,n})),t&&t(e)}),[e]),[r,s]=n.length?[pi()(n),hi()(n)]:[-1,-1],c=r>0,m=s<e-1,u=d((()=>{var t;l.current&&(c?ur(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,c]),p=d((()=>{l.current&&(m?ur(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,m]),x=d(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{l?.current&&l.current.children[e]?.scrollIntoView(t)}),[l]);return[l,{scrollLeft:u,scrollRight:p,scrollTo:x,canScrollLeft:c,canScrollRight:m,visibleIndicesRange:[r,s],handleVisibleIndicesChange:i}]},xr="absolute top-[calc(50%-24px)] z-40",gr="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",fr=x((({scroll:e,activeIndex:t,itemCount:l,arrowsPadded:n,hasEdgeBlocks:a,onScrollLeft:i,onScrollRight:r})=>{const{canScrollLeft:s,canScrollRight:o,scrollLeft:c,scrollRight:m}=e,h=a?t>0:s,x=a?t<l-1:o,g=d((()=>{a?(s&&t!==l-1&&c(),i()):c()}),[c,i,a,s,t,l]),f=d((()=>{a?(o&&0!==t&&m(),r()):m()}),[m,r,a,s,t,l]);return p("div",{className:"hidden @lg:block",children:[br(e),h?u(Fa,{className:N(xr,n?"left-1 @lg:left-8":"left-0"),onClick:g}):null,x?u($a,{className:N(xr,n?"right-1 @lg:right-8":"right-0"),onClick:f}):null]})})),br=e=>p("div",{children:[e.canScrollLeft?u("div",{className:N(gr,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?u("div",{className:N(gr,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),yr=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",vr=({className:e,text:t="ХИТ"}={})=>p("div",{className:N("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[u(q,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),u(I,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),Nr="relative h-full",wr={small:"sm:min-w-64",normal:"sm:min-w-96",big:"sm:min-w-[515px]"},kr=({noCardBorder:e,activeIndex:t,cardSize:l="normal",...n})=>{const{blocks:a}=n.block||{},i=a?.some(Ir);return D({...n,renderProps:(n,a,r)=>p("div",{className:Cr(n,{someCardsHighlighted:i}),children:[z(n,a,{className:Sr(n,{someCardsHighlighted:i,showBorder:!e,cardSize:l}),blockIndex:r,isActive:r===t}),Ir(n)?vr({className:"absolute top-0 -right-4 z-40"}):null]},String(r))})},Cr=(e,{someCardsHighlighted:t})=>N(Nr,t&&(Ir(e)?"pt-3xl":"pt-3xl sm:pt-16")),Sr=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>N(Nr,"min-w-80",wr[n],t&&(Ir(e)?"pt-3xl sm:pt-16":"pt-3xl"),yr(l),l&&"h-full"),Ir=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Tr=wt((({className:e,itemCount:t,visibleItemCount:l=1,noCardBorder:n,isAlignCenter:a,arrowsPadded:i=!0,isGap:r=!0,cardSize:s="normal",...o})=>{const{blocks:c=[]}=o.block||{},d=t||c?.length,[m,{inc:h,dec:x}]=Aa({itemCount:d,visibleItemCount:l},Math.floor(l/2)),[g,f]=pr({itemCount:d}),[b]=f.visibleIndicesRange,y=c&&"CarouselBankHistoryCard"===c[0]?.type;return p(k,{className:e,defaultPadding:"p-6xl",...o,children:[p("div",{className:N(a?"flex justify-center":"","relative max-w-full"),children:[u(rr,{containerRef:g,visibleItemCount:l,snapAlign:"snap-start",gap:r?16:void 0,onVisibleIndicesChange:f.handleVisibleIndicesChange,children:kr({noCardBorder:n,activeIndex:m,cardSize:s,...o})}),u(fr,{scroll:f,arrowsPadded:i,onScrollLeft:x,onScrollRight:h,hasEdgeBlocks:y,activeIndex:m,itemCount:d})]}),u(mr,{className:"@5xl:hidden",containerRef:g,activeIndex:b,dotCount:d,listType:"horizontal-list"})]})}),{childrenTypes:["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Br=x((({className:e,title:t,description:l,blockIndex:n=0,isActive:a,...i})=>u(k,{className:N("relative flex h-[485px]",a?"w-[440px] z-10":"w-[340px]",e),defaultPadding:"p-0",...i,children:u("div",{className:N("basis-full self-center",Pr(n)),children:a?u(B,{headlineVersion:"M",title:t,description:l,padding:"p-3xl",align:"text-left",className:"h-96 text-white shadow-dark-blue"}):u("div",{className:"h-[300px] flex justify-center items-center font-mohave text-title-large",children:u("span",{className:Mr(n),children:t})})})}))),Pr=e=>["bg-primary-main","bg-green-light","bg-yellow-light"][e%3],Mr=e=>["gradient-color-text-on-green","gradient-color-text-on-yellow","gradient-color-text-on-yellow"][e%3],zr="z-10 border border-solid w-full h-full",Vr=N(zr,"absolute hidden @xl:block border-transparent"),Rr=x((({className:e,title:t,description:l,button:n,...a})=>u(k,{className:N("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:p("div",{className:"relative h-full",children:[u("div",{className:N(Vr,"top-9 right-12 bg-green-dark")}),u("div",{className:N(Vr,"top-6 right-8 bg-green")}),u("div",{className:N(Vr,"top-3 right-4 bg-green-light")}),p("div",{className:N(zr,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[u(B,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Xe([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Dr={black:"bg-black",white:"bg-white"},Ar=x((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r=[],align:s="text-left",padding:o,...c})=>u(k,{className:N("flex flex-col justify-left",e),defaultPadding:"p-2xl",...c,children:p(we,{className:"h-full",padding:o,title:u(B,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:n?.src?u(ne,{className:"flex justify-center align-center mb-xl",image:n}):null,buttons:Xe([i],{buttonClassName:"w-full self-end"}),children:[r?.length?p("div",{className:"flex text-secondary-text mb-m",children:[u("div",{className:"mr-xs",children:u(Ae,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(jr)]}):null,a?p(Ae,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),jr=(e,t)=>u("div",{role:"figure",className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Dr[e]}`},String(t)),Fr="hidden xl:block absolute w-full h-full border border-white",$r=x((({className:e="",...t})=>{const l=he(),{text:n,href:a,target:i,onClick:r}=l(t);return n?u("div",{className:N("flex relative group/link pl-s pb-s min-w-64 xl:min-w-72",e),children:p("div",{className:"relative min-h-16 w-full",children:[p("a",{className:N("absolute border\n bg-white flex justify-between group-hover/link:text-primary-main","rounded-md lg:rounded-none w-full p-lg whitespace-nowrap z-10"),role:"link",href:a,target:i,onClick:r,children:[u(Ae,{size:"text-l",font:"font-light",color:"text-primary-text",children:n}),u(ne,{className:"group-hover/link:brightness-100 hidden xl:block ml-2xs",image:{icon:"ArrowRightIcon",iconVersion:"black"},imageClassName:"group-hover/link:text-primary-main hidden xl:block",width:"24",height:"24"})]}),u("div",{className:N(Fr,"-bottom-1.5 -left-1.5")}),u("div",{className:N(Fr,"-bottom-3 -left-3")})]})}):null})),Lr=x((({className:e,additionalDescription:t,description:l,links:n,title:a,...i})=>u(k,{className:N("overflow-hidden",e),...i,children:p("div",{className:"flex flex-col @6xl:flex-row gap-m",children:[p("div",{children:[u(B,{isEmbedded:!0,title:a,description:l,as:"h1",align:"text-left"}),u(B,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),n?.length?Er(n,"@6xl:min-w-[672px] p-0 justify-self-end"):null]})}))),Er=(e,t="")=>{const l=Math.ceil(e.length/10);return u(Tr,{className:t,version:"secondary",itemCount:l,arrowsPadded:!1,padding:"p-0",children:Array.from({length:l}).fill(null).map(((t,l)=>u("div",{className:N("flex flex-wrap gap-2xs self-start xl:justify-center @5xl:grid @5xl:grid-cols-2"),children:e.slice(10*l,10*(l+1)).map(((e,t)=>u($r,{...e},String(t))))},String(l))))})},Or=x((({className:e="",href:t,target:l,isRemote:n=!1,children:a})=>{const i=he({isRemote:n})({href:t,target:l});return u(t?"a":"div",{className:N("block",e),...t?i:{},children:a})})),_r=[{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:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}}],Ur=x((({className:e="",media:t,showButtonText:l,stretched:n,version:a="white",children:i})=>{const[r,s]=o(),c=t?.map((e=>{const{href:t,icon:n,text:i}=e,{iconMapped:o}=(e=>_r.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),c=Ke(n)?n:o,d=l?{text:i}:{text:""};return!r&&i&&s(!0),{...e,...d,icon:{...c,iconVersion:"color"},version:e?.version??a}})),d=N("border border-solid hover:border-transparent group-data-primary:border-main-divider border-main-divider group-data-gray:border-green group/media",l&&r?"":"basis-auto",n?"flex-1 justify-center":"");return p("div",{className:N("flex flex-col gap-xs",e),children:[u("div",{className:"flex gap-xs",children:Xe(c,{className:N(n||r?"basis-full":""),buttonClassName:d})}),i?u(Ae,{size:"text-s",font:"font-light",color:"text-secondary-text",children:i}):null]})})),Hr=x((({className:e,padding:t,description:l,additionalDescription:n,href:a,icon:i,items:r=[],isDotted:s,socialMedia:o=[],target:c,title:d,align:m="text-left",benefits:h,imageOptions:{directionRight:x=!0,isImageAlwaysOnRight:g=true,isImageSecondary:f=!1}={},...b})=>u(k,{className:N("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...b,children:u(Or,{href:a,target:c,className:"h-full",children:p(we,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:u(B,{title:d,description:l,headlineVersion:"XS",isEmbedded:!0,align:m}),...st(Ke(i)?u(ne,{image:i}):null,x),buttons:o.length?u(Ur,{media:o,showButtonText:!0,version:b?.version}):null,isImageAlwaysOnRight:g,isImageSecondary:f,imageAlign:"center",children:[u(We,{benefits:h}),u(Je,{items:r,isDotted:s,listItemSize:"S"}),Wr(n,m)]})})}))),Wr=(e,t)=>e?u(I,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,Kr=x((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:n,renderFoldButton:a})=>{const[i,r]=o(l),s=d((()=>{r((e=>!e))}),[]),c=n({isUnfolded:i,onToggle:s}),m=a?a({isUnfolded:i,onToggle:s}):null;return p("div",t?{className:e,children:[m,c]}:{className:e,children:[c,m]})}));const Xr=x((({className:e="",isUnfolded:t,children:l})=>{const n=h(null),a=function(e,t){const l=h(null);return c((()=>{const t=l?.current;if(!t)return;const n=new ResizeObserver((l=>{e(t,l[0])}));return n.observe(t),()=>{n.disconnect()}}),[e,...t]),l}((e=>{n.current&&(n.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return u("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} `,children:u("div",{className:e,ref:a,children:l})})})),qr=(e,t)=>{const{title:l,description:n,buttons:a}=e;return p("div",{className:"py-lg border-b border-main-divider",children:[l?u("div",{className:"opacity-80",children:u(Ae,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?u("div",{className:"mt-2xs",children:u(Ae,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?u("div",{className:"text-primary-main",children:Xe(a)}):null]},String(t))},Gr=x((({className:e="",title:t,align:l="text-center",icon:n,button:a,visibleCellsCount:i=1,cardCells:r=[],...s})=>{const o=r.map(qr),[c,d]=i>0?[o.slice(0,i),o.slice(i)]:[o,[]];return p(k,{className:N("flex flex-col",e),defaultPadding:"p-2xl",...s,children:[Ke(n)?u("div",{className:"self-center",children:u(ne,{image:n})}):null,t?u(S,{className:N("pt-xs",l),headingType:"h5",title:t}):null,a?.text?u(fe,{className:"w-full mt-m mb-lg",...a}):null,d.length?u(Kr,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[c,u(Xr,{isUnfolded:e,children:d})]}),renderFoldButton:r.length>1?Yr:null}):u("div",{children:c})]})})),Yr=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:t,children:[u("div",{children:e?"Скрыть":"Подробнее о тарифе"}),u(q,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),Qr="bg-gradient-to-r from-main-gradient-start to-main-gradient-end",Zr="border-gray border-solid border",Jr="border-main-divider border-b",es="w-52",ts=x((({icon:e,image:t,title:l,link:n})=>p("div",{className:N("w-80 box-border flex flex-col gap-m items-center rounded-t-md border-b-0 p-2xl",Zr,Qr),role:"columnheader",children:[e&&!t?.src&&u(ne,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}),t?.src&&u(ne,{image:t}),l?u(S,{headingType:"h4",as:"h3",className:"text-center text-white",title:l}):null,n?.text&&u("div",{className:"mt-auto w-full",children:u(fe,{href:n.href,target:n.target||"",className:"w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active",children:u("div",{className:"py-s",children:u(I,{size:"text-xs",font:"font-medium",children:n.text})})})})]}))),ls={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},ns=x((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>u("div",{className:"flex flex-1 overflow-hidden",children:u("div",{className:ls[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),as=x((({children:e})=>u("div",{className:"self-start flex flex-col",role:"row",children:u("div",{className:"flex gap-xl",children:e})}))),is=x((({colHeaders:e,activeIndex:t})=>p(as,{children:[u("div",{className:es,role:"columnheader"}),u(ns,{activeIndex:t,columnWidth:336,children:e.map(((e,t)=>u(ts,{...e},String(t))))})]}))),rs=x((({cell:e,isFirstRow:t,isLastRow:l,isFillGradient:n})=>{const a=N("w-80 box-border flex flex-col",Zr,l?"border-t-0 rounded-b-md":"border-y-0",n?Qr:""),i=N("mx-2xl h-full",Jr,n&&t?"border-t":"",l?"border-b-0":"border-solid");return u("div",{className:a,role:"cell",children:u("div",{className:i,children:e?e.map(((e,t)=>cs(e,t,n))):null})})})),ss=(e=!1)=>"text-xl m-0 "+(e?"text-white":""),os=(e=!1)=>"text-s opacity-80 "+(e?"text-white":"text-secondary-text"),cs=({label:e,description:t},l,n)=>p("div",{className:"first:pt-2xl pt-xl last:pb-2xl",children:[e?u("h4",{className:ss(n),children:e}):null,t?u("div",{className:os(n),children:t}):null]},String(l)),ds=(e=!1)=>N("py-2xl",Jr,es,e?"border-b-0":"border-solid"),ms=x((({row:{header:e,data:t},activeIndex:l,isColoredFirstColumn:n,isFirstRow:a,isLastRow:i})=>p(as,{children:[e?.title?u("div",{className:ds(i),children:u(I,{size:"text-s",children:e.title})}):null,t?.length?u(ns,{activeIndex:l,columnWidth:336,children:t.map(((e,t)=>u(rs,{cell:e,isFirstRow:a,isLastRow:i,isFillGradient:n&&0===t},String(t))))}):null]}))),hs=x((({rowData:e,isColoredFirstColumn:t,activeIndex:l,controls:n})=>{const{isScrollAvailable:a}=n;return p("div",{className:"relative",children:[e.map(((e,n,{length:a})=>u(ms,{row:e,isFirstRow:0===n,isLastRow:n+1===a,activeIndex:l,isColoredFirstColumn:t},String(n)))),a?La({...n,btnClass:["top-28","top-12"],className:"right-7",isDisabled:!0}):null]})})),us=x((({columns:e=[],rowHeaders:t,isShowAllRow:l,visibleRowLength:n,isColoredFirstColumn:a})=>{const i=e?.map((({header:e})=>e||{})),r=e?.map((({data:e})=>e))||[],s=t?.map(((e,t)=>({header:e,data:r.map((e=>e?.[t]||[{}]))}))).slice(0,l?t.length:n),[o,c]=Aa({itemCount:e.length,visibleItemCount:3}),{isScrollAvailable:d}=c;return p("div",{children:[p("div",{role:"table",children:[i?.length?u(is,{colHeaders:i,activeIndex:o}):null,s?.length?u(hs,{rowData:s,isColoredFirstColumn:a,activeIndex:o,controls:c}):null]}),d?u("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),ps=x((({className:e="",title:t,rowHeaders:l,columns:n,visibleRowLength:a=0,isColoredFirstColumn:i=!1,...r})=>{const[s,c]=o(!a),m=d((()=>c((e=>!e))),[]);return p(k,{className:N("overflow-hidden relative",e),defaultPadding:"p-6xl",...r,children:[u(S,{headingType:"h2",className:"text-center mb-4xl mx-auto",title:t}),u(us,{columns:n,rowHeaders:l,isShowAllRow:s,isColoredFirstColumn:i,visibleRowLength:a}),a?xs({isShowAllRow:s,onClick:m}):null]})})),xs=({isShowAllRow:e,onClick:t})=>u("div",{className:"pr-6xl",children:p("div",{className:"flex gap-m w-full",children:[u("div",{className:es}),u("button",{onClick:t,className:"py-xs flex-1 border-gray border-solid border text-primary-text bg-white hover:border-primary-main hover:text-primary-main",children:u(Ae,{size:"text-xs",font:"font-medium",children:e?"Скрыть":"Показать все параметры"})})]})}),gs=x((({className:e,contacts:t,info:l,version:n="secondary",...a})=>p(k,{className:N("flex",e),defaultPadding:"p-6xl",version:n,...a,children:[l?.length?fs(l):null,t?.length?fs(t):null]}))),fs=e=>u("div",{className:"flex gap-5xl grow basis-0",children:e.map(((e,t)=>bs({column:e,index:t})))}),bs=({column:e,index:t})=>e?u("div",{className:"flex flex-col gap-xl grow basis-0",children:e.map((({title:e="",description:t,additionalDescription:l,button:n},a)=>p("div",{children:[u(B,{title:e,description:t,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),l?u("div",{className:"mt-xs opacity-80",children:u(I,{size:"text-m",font:"font-light",children:l})}):null,n?.href?u(fe,{className:"mt-xl",...n}):null]},String(a))))},`col-${String(t)}`):null,ys=e=>e%2!=0,vs=x((({textNode:e,iconNode:t,tag:l,onClick:n,justifyContent:a="between",className:i,...r})=>p(l,{tag:l,className:N("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:n,...r,children:[e?u("div",{children:e}):null,t?u("div",{children:t}):null]}))),Ns=x((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>u(vs,{tag:"button",onClick:i,disabled:a,"data-theme":n,justifyContent:"center",className:N("py-4 border border-transparent outline-none focus:border-primary-text space-x-s",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:u(Ae,{size:"text-h4",children:t}),iconNode:l?u(ne,{image:{icon:l,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),ws=({isUnfolded:e,onToggle:t})=>u(Ns,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),ks=x((({title:e,description:t})=>p("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[u(ne,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),u(B,{title:e,description:t,headlineVersion:"S",isEmbedded:!0,align:Ca})]}))),Cs=["ArrowDownIcon","ArrowUpIcon"],Ss="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs border-box",Is=x((({label:e="",blocksToRender:t=[],topItemsCount:l=0,block:n,notFound:a,...i})=>{const[r,s]=l>0?[t.slice(0,l),t.slice(l)]:[t,[]];return p("div",{children:[u("div",{className:N(t.length?"hidden":"block"),children:a?u(ks,{...a}):null}),p("div",{className:N("space-y-2xs",t.length?"":"hidden"),children:[p("div",{className:N(Ss),children:[R(r,{...i.options,parent:n}),ys(r.length)?u(Ct,{className:"col-span-6"}):null]}),u(Kr,{renderFoldableSection:({isUnfolded:e})=>p(Xr,{className:N(Ss),isUnfolded:e,children:[R(s,{...i.options,parent:n}),ys(s.length)?u(Ct,{className:"col-span-6"}):null]}),renderFoldButton:({isUnfolded:t,onToggle:n})=>u(Ns,{className:N(l<1?"hidden":""),disabled:!s?.length,label:e,icon:Cs[Number(t)],dataTheme:i.options?.page?.colorPalette,onClick:n})})]})]})})),Ts=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,Bs=(e,t)=>Object.entries(e).map((([l,n])=>"number"==typeof n?Array.isArray(t[l])?((e,t)=>l=>Ts(t[e])||Ts(l[e])||l[e]?.includes(t[e]))(l,e):((e,t)=>l=>Ts(t[e])||Ts(l[e])||Ps(t[e])<=Ps(l[e]))(l,e):"object"==typeof n&&"min"in n&&"max"in n?((e,t)=>l=>Ts(t[e])||Ts(l[e])||Ps(t[e]?.min)>=Ps(l[e]?.min)&&Ps(t[e]?.min)<=Ps(l[e]?.max))(l,e):Array.isArray(n)?((e,t)=>l=>Ts(t[e])||Ts(l[e])||t[e]?.every((t=>l[e]?.includes(t))))(l,e):((e,t)=>l=>Ts(t[e])||Ts(l[e])||t[e]===l[e])(l,e))).every((e=>e(t))),Ps=e=>Number(e||0),Ms=(e,t)=>(l=Bt)=>e&&e.filter((e=>Bs(t,l(e.content||{})))),zs=x((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>u(Mt,{text:l?.title,value:[e].flatMap((e=>e)).includes(l.value),onChange:()=>(l=>{if(!t)return;const a=e?.includes(l);t(n?a?(e||[]).filter((e=>e!==l)):[...e||[],l]:a?[]:[l])})(l.value),type:n?"checkbox":"radio"},l.value))))),Vs=({field:e,reset:t,filtrationSchema:l,resetButton:n,children:a})=>p("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[p("div",{className:"flex flex-col @4xl:flex-row gap-5xl",children:[a,Object.entries(l).map(Rs(e))]}),n?u("div",{children:u(Vl,{className:"w-full @4xl:w-72 @4xl:ml-s",onClick:t,children:n?.text})}):null]}),Rs=e=>([t,l])=>{const n=l?.type;return"array"===n?Ds(t,e)(l):null},Ds=(e,t)=>l=>{const n=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return p("div",{children:[l?.title?u("div",{className:"mb-m",children:u(Ae,{size:"text-m",font:"font-light",color:"text-secondary-text",children:l.title})}):null,u(zs,{items:n,multiple:!l?.single,...t(e)})]},e)},As=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,js=(e,t)=>Array.from({length:t-e+1},((t,l)=>e+l)),Fs=(e,t)=>bt((e[t?.sourceBook]?.rateRows||[]).filter(As).flatMap((e=>js(e.minMonths,e.maxMonths)))),$s=(...e)=>{const t=e.map((e=>gt(e)));return Promise.all(t)};function Ls(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const Es=e=>Boolean(e&&e.content&&"string"==typeof e.content.sourceBook);function Os(e){const{dirs:t=[],source:l=[]}=m((()=>{const t=(e=>e?.filter(Es).map((({content:{sourceBook:e}})=>e)))(e);return{dirs:t?.map((e=>`/wcms-resources/${e}.json`)),source:t}}),[e]),{data:n=[]}=hl(t,$s);return{source:Object.fromEntries(Ls(l,n).filter((([,e])=>Boolean(e)))),months:bt(n.flatMap((e=>e?.rateRows||[])).filter(As).flatMap((e=>js(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[]}}const _s=1e9,Us={sum:{min:1e4,max:_s},period:3},Hs=wt((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...i})=>{const{source:r,months:s}=Os(i.block?.blocks),[o,{field:c,reset:d}]=Pt(Us),m=o===Us?i.block?.blocks:Ms(i.block?.blocks,o)((e=>({...e,period:Fs(r,e||{})||[]}))),h=p("div",{children:[u(Qi,{label:n?.title,min:500,max:_s,...c("sum",{parse:e=>({min:Number(e),max:_s}),format:({min:e})=>String(e)})}),u(zn,{title:a?.title,items:["От 3 мес","До 5 лет"],list:s,...c("period")})]});return p(k,{className:N("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[Vs({field:c,reset:d,filtrationSchema:t,resetButton:l,children:h}),u(Is,{blocksToRender:m,...i})]})}),{childrenTypes:["ProductTile"],childSchema:e=>({...e?.filtrationSchema||{},sourceBook:{type:"string",title:"Адрес справочника"}})}),Ws=[{key:"10"},{key:"50"},{key:"100"}],Ks=({itemCount:e,onItemCountChange:t})=>{const l=d((({key:e})=>t(Number(e))),[]);return p("div",{className:"flex items-center gap-s",children:[u("span",{children:"Показать по"}),u(wl,{className:"min-w-20",onChange:l,value:{key:String(e)},options:Ws,iconVersion:"black"})]})},Xs="py-m px-lg rounded-md cursor-pointer hover:bg-primary-hover hover:text-white",qs=(e,t)=>{const{currentPage:l,onPageChange:n,totalPages:a}=e,i=t+1;return i===l?u("div",{"aria-current":"true",className:"py-m px-lg bg-primary-main text-white rounded-md",children:i},String(t)):1!==i&&i!==a&&((e,t,l)=>e<t&&e>=t-2||e<=t+2&&e>t||((e,t,l)=>t<=3&&e<=t+3||t>=l-1&&e>=l-4)(e,t,l))(i,l,a)?u("div",{onClick:()=>n(i),className:Xs,"aria-label":`Страница ${i}`,children:i},String(t)):null},Gs={width:"24",height:"24"},Ys=({currentPage:e,onPageChange:t,totalPages:l})=>{const n=m((()=>Array.from({length:l}).fill({currentPage:e,onPageChange:t,totalPages:l})),[l,e]),a=d((()=>{e>1&&t(e-1)}),[e]),i=d((()=>{e<l-1&&t(e+1)}),[e,l]),r=d((()=>t(1)),[]),s=d((()=>t(l)),[l]);return p("div",{className:"flex gap-m items-center",children:[u("div",{onClick:a,children:u(q,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Qs(1===e),...Gs})}),p("div",{className:"flex gap-xs",children:[e>1?u("div",{onClick:r,className:Xs,"aria-label":"Страница 1",children:"1"}):null,e>4?u("div",{className:"py-m px-s",children:"..."}):null,n.map(qs),e<l-3?u("div",{className:"py-m px-s",children:"..."}):null,e<l?u("div",{onClick:s,className:Xs,"aria-label":`Страница ${l}`,children:l}):null]}),u("div",{onClick:i,children:u(q,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Qs(e===l),...Gs})})]})},Qs=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",Zs=({currentPage:e,onPageChange:t,totalPages:l,itemCount:n,onItemCountChange:a})=>p("div",{className:"mt-3xl flex justify-between items-center select-none",role:"navigation","aria-label":"Пагинация",children:[u(Ys,{currentPage:e,onPageChange:t,totalPages:l}),n&&a?u(Ks,{itemCount:n,onItemCountChange:a}):null]}),Js=x((({className:e,value:t,autoFocus:l,onChange:n,onFocus:a,placeholder:i="Поиск по сайту"})=>{const r=d((e=>{n&&n(e.target?.value||"")}),[n]);return p("div",{className:N("font-sans relative",e),role:"form",children:[u("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:u(ne,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),u("input",{className:N("h-14 w-full px-10 text-l text-black outline-none box-border border border-solid rounded-md","border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text"),value:t,type:"text",name:"search-bar-input",placeholder:i,autoFocus:l,onChange:r,onFocus:a})]})})),eo=x((({field:e,onClearFilter:t,filtrationState:l})=>p("div",{className:"grid grid-cols-12 mb-3xl space-x-xl",children:[u(Js,{className:"col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),u(nn,{className:"col-span-3",label:"Период от",maxDate:l.endDate,...e("startDate")}),u(nn,{className:"col-span-3",label:"Период до",minDate:l.startDate,...e("endDate")}),u("div",{className:"col-span-2 mt-auto",children:u(Vl,{className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),to=({title:e,timestamp:t,publicId:l})=>{const n=he({basePath:"/"}),{href:a}=n({href:`/api/v1/depository/${l}/file`});return p("div",{className:"grid grid-cols-12 py-lg border-gray border-opacity-50 border-b",children:[u("div",{className:"col-span-2",children:t?u(Ae,{size:"text-m","font-weight":"font-light",children:Hl(t)}):null}),u("div",{className:"col-span-10 text-h6 hover:text-primary-active",children:u("a",{href:a,download:!0,"aria-label":"Скачать",children:e})})]},l)},lo="/api/v1/depository",no={startDate:void 0,endDate:void 0,query:""},ao=wt((({className:e,...t})=>{const[l,n]=o(0),[a,i]=o(10),[r,{field:s,reset:c}]=Pt(no),{totalPages:m=0,items:h=[]}=(({size:e,page:t,query:l,startDate:n,endDate:a})=>{const i=n?Hl(n,!0):"",r=a?Hl(a,!0):"",s=new URLSearchParams(lo);s.set("page",String(t)),s.set("size",String(e)),s.set("query",l),s.set("timestampStart",i),s.set("timestampEnd",r);const o=`?${s.toString()}`,{data:c}=hl(lo+o,ft);return{items:c?.content,totalPages:c?.totalPages}})({size:a,page:l,...r}),x=d((e=>n(e-1)),[]),g=d((e=>{a!==e?(i(e),n(0)):i(e)}),[]);return p(k,{className:N(e,"container p-6xl"),...t,children:[u(eo,{filtrationState:r,field:s,onClearFilter:c}),p("div",{className:"flex flex-col",children:[p("div",{className:"grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b",children:[u("div",{className:"col-span-2",children:u(Ae,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),u("span",{className:"col-span-10",children:u(Ae,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),h.length?h.map((e=>u(to,{...e},String(e.publicId)))):u(ks,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),u(Zs,{currentPage:l+1,onPageChange:x,totalPages:m,itemCount:a,onItemCountChange:g})]})]})})),io=e=>"Image"===e?.contentType&&e?.image?u(ne,{image:e.image}):"Code"===e?.contentType&&e.code?u("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,ro=x((({className:e="",title:t,description:l,error:n,button:a,...i})=>p(k,{className:N("flex flex-col justify-center items-center",e),defaultPadding:N("p-6xl"),version:"transparent",...i,children:[u("div",{className:"flex justify-center",children:io(n)}),u(B,{title:t,description:l,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?u(fe,{version:a?.version,text:a?.text,...a}):null]}))),so="location";function oo(e="Москва"){const[t,l]=((e,t,l)=>{const[n,a]=o(l||null);return c((()=>e.subscribe(t,(e=>a(e)))),[e,t]),[n,d((l=>e.fire(t,l)),[e,t])]})(y,"location",mo()??{name:e}),n=d((e=>{ho(e),l(e)}),[]),{data:a}=hl(co()?null:"/api/v1/region",ft);return c((()=>{a&&!co()&&l(a)}),[a]),[t??{name:e},n]}const co=()=>Boolean(globalThis.localStorage?.getItem(so)),mo=()=>{try{const e=globalThis.localStorage?.getItem(so);return e&&JSON.parse(e)}catch(e){return null}},ho=e=>{try{globalThis.localStorage?.setItem(so,JSON.stringify(e))}catch(e){}};var uo;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(uo||(uo={}));const po=new Intl.NumberFormat("ru",{style:"currency",currency:uo.RUB}),xo=e=>e?po.format(e):"",go="text-left text-m font-light text-secondary-text",fo=`${go} pl-5xl`,bo={USD:"DollarIcon",EUR:"EuroIcon"},yo=x((({className:e,exchangeCurrencyItems:t})=>p("table",{className:`h-fit w-fit ${e}`,children:[u("thead",{children:p("tr",{children:[u("th",{className:go,children:u(Ae,{size:"text-m",children:"Валюта"})}),u("th",{className:fo,children:u(Ae,{size:"text-m",children:"Купить"})}),u("th",{className:fo,children:u(Ae,{size:"text-m",children:"Продать"})})]})}),u("tbody",{children:t.map(vo)})]}))),vo=e=>{const t=e?.currency?.currency;return p("tr",{className:"pb-2xs text-h6",children:[u("td",{className:"pt-m",children:p("div",{className:"flex items-center gap-xs",children:[t?u(ne,{image:{icon:bo[t]},width:"24",height:"24"}):null,u(Ae,{size:"text-h6",children:t})]})}),u("td",{className:"pt-m pl-5xl",children:u(Ae,{size:"text-h6",children:xo(e?.saleExchangeRate)})}),u("td",{className:"pt-m pl-5xl",children:u(Ae,{size:"text-h6",children:xo(e?.buyExchangeRate)})})]},t)},No={icon:"GpsIcon"},wo=x((({className:e="",address:t})=>p("div",{className:`flex gap-s ${e}`,children:[u(Ia,{...No,iconBgVersion:"primary"}),p("div",{className:"space-y-2xs",children:[t?u(I,{size:"text-l",color:"text-primary-main",children:t}):null,u(I,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),ko=(e,t,l)=>{const n=Number(Co(e))*Math.pow(t,l?-1:1);return Number.isInteger(n)?n:((e,t=2)=>{const l=10**t;return Math.round(parseFloat(String(e))*l)/l})(n)},Co=e=>e.replace(/[^\d.,]/g,"").replace(",","."),So=e=>{return(t=[[e=>e.value!==uo.RUB&&e.oppositeValue!==uo.RUB,()=>e.handleConvert(e.value,uo.RUB)],[e=>e.value===uo.RUB&&e.oppositeValue===uo.RUB,()=>e.handleConvert(e.value,uo.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function Io(e){const{placeholder:t,rates:l,selected:n,value:a,setValue:i,setSelected:r}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),o={key:n,text:n};return p("div",{className:"relative flex",children:[u(Et,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?u(wl,{isBorder:!1,onChange:e=>r(e.key),options:s,value:o}):null]})}const To=x((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:n})=>{const[a,i]=o({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||uo.RUB,selectBuy:l?.[0]?.currency?.currency||uo.USD}),r=d((e=>i((t=>({...t,...e})))),[]);return p("div",{className:`grid gap-m pt-2xl ${e}`,children:[Io({placeholder:"Хочу продать",rates:l,selected:a.selectSell,setSelected:Bo(a,r,l),value:a.inputSell,setValue:e=>Mo(r,l)(e,a.selectSell,a.selectBuy)}),Io({placeholder:"Получу",rates:t,selected:a.selectBuy,setSelected:Po(a,r,t),value:a.inputBuy,setValue:e=>zo(r,t)(e,a.selectBuy,a.selectSell)}),n?.text?u(fe,{text:n.text,version:n?.version,...n}):null]})})),Bo=(e,t,l)=>n=>{t({selectSell:n}),So({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{Mo(t,l)(e.inputSell,n,a)}})},Po=(e,t,l)=>n=>{t({selectBuy:n}),So({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>zo(t,l)(e.inputBuy,n,a)})},Mo=(e,t)=>(l,n,a)=>{e({inputSell:Co(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputBuy:String(ko(l,i,n===uo.RUB)||"")})},zo=(e,t)=>(l,n,a)=>{e({inputBuy:Co(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputSell:String(ko(l,i,n===uo.RUB)||"")})};const Vo=x((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const[a]=oo(),i=function(e){const t=e?.code||"000",{data:l}=hl(`/api/v1/exchangerates?regionCode=${t}`,ft);return l||{}}(a),r=Ro(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:uo.RUB}});const o=r.filter((e=>e.saleExchangeRate));return o.push({currency:{currency:uo.RUB}}),u(k,{className:N("box-border min-h-80",e),...n,children:u(we,{className:"h-full",title:u(S,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:p("div",{className:"flex gap-6xl flex-wrap",children:[p("div",{children:[r?u(yo,{className:"mb-xl",exchangeCurrencyItems:r}):null,u(wo,{address:i?.address})]}),r.length&&s.length&&o.length?u(To,{className:"grow",currencyRatesBuy:s,currencyRatesSell:o,button:l}):null]})})})})),Ro=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[],Do={width:"40",height:"45"},Ao={"bg-white":"color",transparent:"white"},jo={"bg-white":"text-primary-main",transparent:"text-white"},Fo=(e,t,l)=>u(ne,t?.src?{image:t,className:jo[e],width:l?.width,height:l?.height}:{image:{icon:t?.icon||"LogoIcon",iconVersion:Ao[e]},className:jo[e],width:l?.width,height:l?.height}),$o={"bg-white":"text-primary-text",transparent:"text-white"},Lo=x((({className:e,href:t="/",logo:l,children:n,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0})=>p("a",{className:N("inline-flex items-center font-sans no-underline",e),href:t,target:a?"_blank":"_self","aria-label":l?.title??"Россельхозбанк",children:[Fo(i,l?.image,Do),r?n??u("div",{className:"ml-s",children:u(Ae,{font:"font-medium",color:$o[i],size:"",children:l?.title??"Россельхозбанк"})}):null]}))),Eo=x((({className:e,onClose:t})=>u("button",{className:N("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",children:u(ne,{image:{icon:"CloseIcon"},width:"24",height:"24"})})));function Oo(e,t,l=300){c((()=>{const t=globalThis.setTimeout(e,l);return()=>{globalThis.clearTimeout(t)}}),t)}const _o=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:l,s1Matches:n,s2Matches:a}=function(e,t){const l=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),n=Array.from({length:e.length}),a=Array.from({length:t.length});let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-l),o=Math.min(r+l,t.length-1);for(let l=s;l<=o;l++)n[r]||a[l]||e[r]!==t[l]||(i++,n[r]=!0,a[l]=!0)}return{m:i,s1Matches:n,s2Matches:a}}(e,t);if(0===l)return 0;const i=function(e,t,{s1Matches:l,s2Matches:n}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!l[i])continue;let s=r;for(;s<t.length;s++)if(n[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:n,s2Matches:a}),r=(l/e.length+l/t.length+(l-i/2)/l)/3,s=r>.7?.1*function(e,t){let l=0;for(;e[l]===t[l]&&l<4;)l++;return l}(e,t):0;return r+s*(1-r)};const Uo=(e,t)=>(l,n)=>{for(const[a,i]of n)l.set(a,e(l.get(a)||t,i));return l},Ho=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),Wo=e=>t=>e.map((([e,l])=>[_o(t)(e),l])).filter((([e])=>e>=.8)).map((([e,t])=>Xo(t,e))).reduce(Uo(Math.max,0),new Map),Ko=e=>t=>{return Ls(t,t.map((({title:e})=>e)).map((e=>t=>{const l=Ho(t||"");return l.length?Me(e.map((e=>ui(l.map(_o(e)))))):0})(e))).sort((n=([,e])=>e,l=(e,t)=>n(e)-n(t),(e,t)=>-l(e,t))).map((([e])=>e));var l,n},Xo=(e,t)=>new Map(e.map((e=>[e,t]))),qo=({basePathList:e,initialQuery:t=""})=>{const[l,n]=o(t||"");c((()=>{null!=t&&n(t)}),[t]);const{data:a}=hl(e?.length?e:null,Go),[i,r]=o(null);return Oo((()=>{a&&r(a.map((e=>t=>{const{corpus:l,dictionary:n}=t||{};if(!(e&&l?.length&&n&&Object.keys(n).length))return[];const a=Ho(e);if(!a.length)return[];const i=Object.entries(n),r=[...a.map(Wo(i)).reduce(Uo(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>l[e]));return Ko(a)(r)})(l)))}),[a,l]),[i,{value:l,onChange:n}]},Go=async(...e)=>(await Promise.allSettled(e.map((e=>gt(O(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),Yo=x((({className:e,head:t,children:l,onClose:n})=>{const{close:a}=de(),i=d((()=>{a(),n&&n()}),[n]);return p("div",{className:N("relative min-h-full bg-white pt-0 p-5",e),children:[p("div",{className:"sticky py-xl top-0 bg-white z-10",children:[u(Eo,{className:"absolute top-0 right-0",onClose:i}),u("div",{className:"container",children:t})]}),u("div",{className:"container pb-6xl",children:l})]})})),Qo=x((({className:e,topItems:t})=>{const l=he({isRemote:!0});return u("div",{className:N("flex items-start justify-between",e),children:t?.map(l).map(Jo)})})),Zo=["all","footer"],Jo=(e,t)=>{const{text:l,items:n=[],href:a,target:i,onClick:r}=e,s=n.filter((e=>!e.displayArea||Zo.includes(e.displayArea.toLowerCase())));return p("div",{className:"flex flex-col gap-s w-1/4",children:[u("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:i||"_self",onClick:r,children:l||`Раздел ${t}`}),s.map(((e,t)=>u(ec,{...e,basePath:A(a),index:t},String(t))))]},String(t))},ec=x((({text:e,index:t,basePath:l,...n})=>{const a=he({isRemote:!(!F.BASE_PATH||!l)&&!F.BASE_PATH.startsWith(l),basePath:l}),{href:i,target:r,onClick:s}=a(n);return u("a",{className:N("text-l font-light text-secondary-text hover:text-primary-main no-underline","overflow-x-hidden overflow-ellipsis whitespace-nowrap"),href:i,target:r||"_self",onClick:s,children:e||`Раздел ${t}`})})),tc=x((({initialQuery:e,topItems:t})=>{const l=m((()=>t?.map((e=>e.href||"/"))),[t]),[n,a]=qo({basePathList:l,initialQuery:e}),i=m((()=>lc(t)(n)),[t,n]);return u(Yo,{head:u(Js,{autoFocus:!0,...a}),children:u(Qo,{topItems:i})})})),lc=e=>t=>e?.length&&t?.length?Ls(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:O("/",t)})))}))):[],nc=(e={})=>{const{open:t,close:l}=de();return{open:(l={},n={})=>t(u(tc,{...e,...l}),n),close:l}},ac=x((({className:e,...t})=>{const[l,n]=o(""),a=d((()=>n("")),[]),i=nc(t),r=d((e=>{n(e),ic(e)&&i.open({initialQuery:e},{onClose:a})}),[a,i]);return p("div",{className:N("relative",e),children:[u(Js,{value:l,onChange:r}),u(Eo,{className:"absolute top-0 right-0 sm:hidden",onClose:a})]})})),ic=e=>e&&e.length>=3,rc=x((({className:e="",items:t})=>p("div",{className:e,children:[t?.length?t.map(sc):null,u(fe,{version:"primary",className:"w-full",href:"https://beta.rshb.ru/natural/feedback/question",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),sc=(e,t)=>p("div",{className:"mb-m space-y-m",children:[u("div",{children:u(Ae,{size:"text-l",font:"font-medium",children:e?.title})}),u("div",{className:"space-y-m",children:e.items?.map(oc)})]},String(t)),oc=(e,t)=>p("div",{className:"space-y-2xs",children:[u("div",{children:cc(e.type,e.text)}),u(I,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),cc=(e,t="")=>{switch(e){case"tel":return u("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${dc(t)}`,children:u(Ae,{size:"text-h6",children:t})});case"email":return u("a",{className:"no-underline",href:`mailto:${t}`,children:u(I,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return u("span",{children:t})}},dc=e=>e.replaceAll(/\D/g,""),mc=["split_version","New","Old"],hc=x((({className:e="",index:t,text:l,...n})=>{const a=he(),{href:i,target:r,onClick:s}=a(n);return u("a",{className:N("text-secondary-text",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),uc=x((({className:e="",links:t})=>u("div",{className:e,children:t?.length?u("div",{className:"flex justify-between items-center gap-lg py-lg border-solid border-x-0 border-y border-y-main-divider",children:t.map(((e,t)=>u(hc,{index:t,className:"text-l font-light max-w-[292px]",...e},String(t))))}):null}))),pc=x((({className:e="",index:t,...l})=>{const n=he({isRemote:!0}),{href:a,target:i,text:r,onClick:s}=n(l);return u("a",{className:`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:i,onClick:s,children:r||`Документ ${t}`})})),xc=x((({className:e="",links:t})=>p("div",{className:N("@container",e),children:[u("div",{className:"pt-lg",children:u(Ae,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?u("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg",children:t.map(((e,t)=>u(pc,{index:t,...e},String(t))))}):null]}))),gc="w-52",fc=wt((({className:e,footer:t,...l})=>{const n=l.options?.page?.sitemap??{},{logo:a}=n,{documents:i,relatedEnterprises:r,contacts:s,socialMedia:o,mobileApps:c}=t??{},m=d((()=>{const[e,t,l]=mc;((e,t)=>{const l=globalThis.document?.cookie.split(";")??[],[,n]=l.map((e=>e.split("="))).find((([t])=>t.trim()===e))||[];t(n)&&(globalThis.document.cookie=`${e}=${t(n)}`)})(e,(e=>e?.replace(t,l)))}),[]);return p(k,{tag:"footer",className:e,...l,children:[p("div",{className:"flex items-stretch gap-3xl pb-3xl ",children:[u(Lo,{className:gc,logo:a}),u(ac,{className:"grow",...n})]}),p("div",{className:"flex items-stretch gap-6xl",children:[p("div",{className:N(gc,"flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[u(rc,{items:s}),u(Ur,{media:o,children:"Соцсети"}),u(Ur,{media:c,showButtonText:!1,children:"Мобильное приложение"}),u(fe,{version:"link",href:"https://old.rshb.ru",className:"!text-left text-s font-light",onClick:m,children:"Вернуться на прежнюю версию сайта"})]}),u(Qo,{className:"flex-grow",...n})]}),u(uc,{className:"mt-xl",links:r}),u(xc,{links:i})]})})),bc=x((({className:e="",title:t,description:l,calendar:n,...a})=>p(k,{className:N("space-y-m",e),defaultPadding:"p-6xl",...a,children:[u(B,{title:t,description:l,headlineVersion:"M",isEmbedded:!0}),n?yc(n):null]}))),yc=e=>{const t=100/(e.reduce(((e,t)=>t?.month?.length?e+t.month.length:e),0)||1),l=e.filter((e=>e?.month?.length)).map((e=>({...e,flexBasis:`${e?.month?.length?e.month.length*t:""}%`})));return p("div",{className:"w-full flex flex-col justify-center gap-s",children:[u("div",{className:"flex w-full text-h6 text-center",children:l.map((e=>vc(e,t)))}),u("div",{className:"flex gap-s w-full",children:l.map(((e,t)=>p("div",{className:"border-r border-main-divider last:border-r-0 space-y-s",style:{flexBasis:e.flexBasis},children:[u("div",{className:"flex gap-s",children:Nc(e)}),p("div",{className:"text-s",children:[u(Ae,{size:"text-s",font:"font-light",color:"text-primary-text",children:e.text})," ",u(Ae,{size:"text-s",font:"font-light",color:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},vc=(e,t)=>e.month?.map(((e,l)=>u("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${l}`))),Nc=e=>e.month?.map((e=>e.image?.src?u("div",{className:"h-52 border-r pr-s border-main-divider last:border-r-0",children:u(ne,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),wc=e=>({href:t})=>!!t&&E(kc(t,e)).startsWith(E(t)),kc=(e,t)=>$(e)?t.href:t.pathname;function Cc(e=[]){const t=v(),l=e.findIndex((e=>wc(F.BASE_PATH?{pathname:F.BASE_PATH}:e))(t));return[l,e[l]]}const Sc=x((({className:e="",active:t,flat:l,children:n,...a})=>{const i=he({isRemote:!0}),{href:r,target:s,text:o,onClick:c}=i(a);return u("a",{className:N(Ic(t,l),e),href:r,target:s,onClick:c,rel:"noopener noreferrer","aria-label":o,children:u("span",{className:Tc(t,l),children:o||n})})})),Ic=(e=!1,t=!1)=>N("inline-block border border-solid bg-transparent text-center no-underline",e?"rounded-md border-primary-main group-data-transparent:border-white":"border-transparent",t?"":"px-m py-xs"),Tc=(e=!1,t=!1)=>N("font-sans text-s font-light",e?"text-primary-main":N(t?"text-primary-text":"text-secondary-text","hover:text-primary-main"),"group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),Bc=e=>e?.length?p("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[u("div",{className:"mb-m",children:u(Ae,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),u("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>u(Pc,{...e},String(t))))})]}):null,Pc=x((({icon:e,...t})=>{const l=he(),{text:n,target:a,href:i,onClick:r}=l(t);return p("div",{className:"flex gap-s items-center",children:[e?u(ne,{pathPrefix:"/wcms-resources/",image:e}):null,n?u("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:u(Ae,{size:"text-l",font:"font-light",color:"text-primary-text",children:n})}):null]})})),Mc=e=>t=>u("div",{className:"mb-xs sm:mb-2xs",children:u("button",{className:"cursor-pointer hover:text-primary-hover",onClick:()=>{e&&e(t)},children:u(Ae,{size:"text-l",font:"font-light",children:t.name||""})})},t.id),zc=x((({className:e,searchTerm:t,onSearch:l})=>p("form",{className:`font-sans relative ${e}`,children:[u("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:u("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),u("input",{id:"search-bar-input",className:"h-12 pl-m w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text",value:t,onChange:e=>l(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),Vc=x((({foreignOffices:e,defaultLocation:t})=>{const[l,n]=oo(t),[a,i]=o(""),r=Dc(pl()).sort(((e,t)=>e.name.localeCompare(t.name))),s=((e,t)=>{const l=new Map;for(const n of e){const e=t(n),a=l.get(e)||[];l.set(e,[...a,n])}return l})(r,Rc),{close:c}=de(),m=d((e=>{n(e),c()}),[]);return p(Yo,{className:"pb-20",head:p("div",{children:[u(Ae,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),l?p("div",{className:"mb-s",children:[u(Ae,{size:"text-l",font:"font-light",children:"Сейчас выбран: "}),u("button",{onClick:()=>n(l),children:u(Ae,{color:"text-primary-main",children:l.name})})]}):null,u(zc,{onSearch:i,searchTerm:a})]}),children:[a&&a.length>=3?u("div",{children:r.filter((({name:e})=>e&&_o(e.toLowerCase())(a.toLowerCase())>=.8)).map(Mc(m))}):u("div",{className:"columns-1 sm:columns-5",children:Array.from(s.entries()).map((h=m,([e,t])=>p("div",{className:"break-inside-avoid mb-2xl w-56",children:[u("div",{className:"mb-s",children:u(Ae,{size:"text-h6",children:e})}),t.map(Mc(h))]},e)))}),Bc(e)]});var h})),Rc=e=>e.name?.charAt(0)||"",Dc=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),Ac={default:"w-6 h-6",large:"w-12 h-12"},jc=x((({className:e,isRounded:t,buttonSize:l="default",isGrayBg:n=!1,disabled:a,ariaLabel:i,image:r,onClick:s})=>u("button",{className:N("group/btn border-0 flex shrink-0 items-center",n?"p-s rounded-full":"p-0 bg-inherit",n&&!t?"bg-main-divider":"",t?"w-8 h-8 text-secondary-light hover:text-secondary-hove":`${Ac[l]} text-primary-text hover:text-primary-main`,"group-data-transparent:text-white",e),type:"button",disabled:a,"aria-label":i,onClick:s,children:u(ne,{image:r,className:N("h-full",t?"bg-main-divider/20 rounded-full":""),imageClassName:"group-hover/btn:text-primary-hover group-hover/btn:invert-0"})}))),Fc=x((({className:e,version:t,...l})=>{const n="transparent"===t?"white":"black",[a]=oo(l.defaultLocation),i=nc(l),r=(e=>{const{open:t,close:l}=de();return{open:(l={})=>t(u(Vc,{...e}),l),close:l}})(l);return p("div",{className:N("flex items-center gap-lg",e),children:[u(Sc,{flat:!0,href:"#",text:a?.name,onClick:()=>r.open()}),l.officesLink?u(Sc,{flat:!0,href:l.officesLink,text:"Офисы и банкоматы"}):null,u(jc,{image:{icon:"LoupeIcon",iconVersion:n},ariaLabel:"Поиск",onClick:()=>i.open()})]})})),$c=x((({className:e="",items:t,activeItem:l})=>{const n=he(),[a,i]=o(!1),r=d((()=>i((e=>!e))),[]),s=bl(d((()=>i(!1)),[]));return p("div",{className:N(a?"bg-white rounded-md shadow-blue-gray":"",e),ref:s,children:[u("button",{className:"group/btn flex justify-between items-center h-6","aria-label":""+(a?"Скрыть другие разделы":"Показать другие разделы"),onClick:r,children:Array(3).fill(null).map(((e,t)=>u("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))))}),u("div",{className:N("absolute flex flex-col rounded-md bg-white p-xl pb-xs w-56",a?"":"hidden"),"aria-hidden":!a,children:t?.map(((e,t)=>{const{text:a,...i}=e,{href:r,target:s,onClick:o}=n(i);return u("a",{className:N("text-l font-light pb-m hover:text-primary-main",e===l?"text-primary-main":""),href:r,target:s,onClick:o,children:a},r||String(t))}))})]})})),Lc=e=>globalThis[e];function Ec(e,t){const[l,n]=o(),a=d((()=>n(Lc(e))),[e]);return c((()=>{const l=document.getElementById(t);if(!l){const e=document.createElement("script");return e.src=t,e.async=!0,e.id=t,e.addEventListener("load",a),document.head.appendChild(e),()=>{document.head.removeChild(e),n(void 0)}}if(!Lc(e))return l.addEventListener("load",a),()=>{l.removeEventListener("load",a)};a()}),[e,t]),l}const Oc={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},_c=x((e=>{const[t,{setTrue:l}]=xl();return t?u(Uc,{...e}):Hc({...e,onClick:l})})),Uc=x((({chat:e="personal",...t})=>((e=>{c((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]),Ec("chatbot",Oc[e])})(e),Hc(t)))),Hc=({className:e,iconVersion:t,onClick:l})=>u(jc,{className:N("text-page__btn-chat",e),image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:"Чат",onClick:l,buttonSize:"large",isGrayBg:!0}),Wc=x((({className:e="",active:t,dataItemName:l,children:n,...a})=>{const i=he(),{href:r,target:s,text:o,onClick:c}=i(a);return p("a",{className:N("relative inline-block bg-transparent text-center no-underline",e),href:r,target:s,"data-item-name":l,onClick:c,children:[u("span",{className:Kc(t),children:o||n}),t?u("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent"}):null]})})),Kc=(e=!1)=>N("font-sans text-l 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"),Xc=x((({observerOptions:e,onVisibilityChange:t,children:l,className:n,...a})=>{const i=lr(d((e=>{if(!e.length||!t)return;const l=e[e.length-1];t(l.isIntersecting)}),[t]),e);return u("span",{ref:i,className:n,children:u(Wc,{...a,children:l})})})),qc={default:"px-lg bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},Gc=x((({version:e,internetBankUrl:t})=>t?u(fe,{href:t,ariaLabel:"Интернет-банк",target:"_blank",className:N("py-s ml-s text-l font-light whitespace-nowrap hover:text-primary-main",qc["transparent"===e?"transparent":"default"]),children:"Интернет-банк"}):null)),Yc=["all","header"],Qc=x((({subItems:e=[],version:t,internetBankUrl:l})=>{const n="transparent"===t?"white":"black",a=v(),i=m((()=>e.filter((e=>!e.displayArea||Yc.includes(e.displayArea.toLowerCase())))),[e]),r=(e=>(t=[])=>{const l=t?.filter(wc(e));return l?.length?hi((e=>e.href?.length||0))(l):void 0})(a)(e),[s,c]=o(i.length),d=i.slice(s),x=h(null),g={rootRef:x},f=m((()=>i.map(((e,t)=>e=>{c(e?Zc(t):Jc(t))}))),[i]);return p("nav",{className:"relative mt-s flex items-center justify-between",children:[u("div",{ref:x,className:"overflow-hidden whitespace-nowrap pb-s mt-xs space-x-3xl",children:i.map(((e,t)=>u(Xc,{className:s-1<t?"invisible":"",active:e===r,observerOptions:g,onVisibilityChange:f[t],...e},String(t))))}),d.length?u($c,{className:"relative w-auto z-40",items:d,activeItem:r}):null,p("div",{className:"flex",children:[F.CHAT_BOT?u(_c,{className:"ml-4xl",iconVersion:n,chat:F.CHAT_BOT}):null,u(Gc,{version:t,internetBankUrl:l})]})]})})),Zc=e=>t=>Math.max(t,e+1),Jc=e=>t=>Math.min(t,e),ed={"bg-white":"primary",transparent:"transparent"},td=wt((({className:e,bgColor:t="bg-white",logo:l,version:n=ed[t],portal:a,...i})=>{const r=i.options?.page?.sitemap??{},{topItems:s,logo:o}=r,[,c]=Cc(s),{internetBankUrl:d}=a||{};return u(k,{tag:"header",className:N("pt-3xl px-20",c?.items?.length?"pb-m":"pb-lg",e),defaultPadding:"",version:n,...i,children:p("div",{className:"container",children:[p("div",{className:"flex items-center",children:[u(Lo,{className:"mr-3xl",bgColor:t,logo:l??o}),s?.map(((e,t)=>u(Sc,{active:e===c,...e},String(t)))),u(Fc,{version:n,className:"ml-auto",...r})]}),u("div",{className:N("mt-xl h-px bg-main-divider","transparent"===n?"opacity-30":"")}),c?.items?.length?u(Qc,{subItems:c.items,version:n,internetBankUrl:d}):null]})})})),ld={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},nd=wt((({className:e="",padding:t="p-0",gap:l="XS",version:n="transparent",isTheme:a=!1,isCardBorder:i,...r})=>u(k,{className:N("relative","grid grid-cols-12",ld[l],e),padding:t,version:n,isTheme:a,...r,children:D({...r,extraProps:{className:yr(i)}})})),{childrenTypes:{exclude:["HorizontalLayout"]}}),ad=x((e=>{const{className:t,image:l,...n}=e;return u(k,{className:t,defaultPadding:"p-0",...n,children:u(ne,{image:l})})})),id=x((({className:e="",cards:t=[],button:l})=>{const[n,a]=o(0),i=d((e=>a(e)),[]),r=t.length,[s,c]=Aa({itemCount:r,visibleItemCount:2}),{canDec:m,canInc:h}=c,x=t[s]?.href;return p("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[p("div",{className:"relative overflow-hidden",children:[r?rd({activeIndex:s,cards:t,selectedCardIndex:n,onClick:i}):null,La({...c,btnClass:["left-12","right-12"],className:"top-16"}),m?u("div",{className:"absolute top-0 left-0 h-full w-32 bg-opacity-from-white"}):null,h?u("div",{className:"absolute top-0 right-0 h-full w-32 bg-opacity-to-white"}):null]}),u(fe,{className:"w-60 text-center",version:"primary",...l,href:x})]})}));function rd({activeIndex:e,cards:t,selectedCardIndex:l,onClick:n}){const a=460*e,i=t.length>2?"justify-start":"justify-center";return u("div",{style:{transform:`translateX(-${a}px)`},className:"duration-1000 px-6xl",children:u("div",{className:`w-full flex flex-nowrap gap-s pb-6xl ${i}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:l,onClick:n}){return p("button",{type:"button",onClick:n,className:"p-3xl min-w-fit flex items-center gap-2xl bg-white border-solid border relative "+(l?"shadow-dark-blue border-primary-main":"ease-in duration-300 border-gray"),children:[e?.icon?u(ne,{className:"p-lg rounded-full bg-secondary-light",image:e.icon,width:"108",height:"108"}):null,p("div",{className:"flex gap-s",children:[e?.sum?sd("страховая сумма",e.sum):null,e?.fee?sd("страховой взнос",e.fee):null]}),od(l)]},String(t))}({slide:e,i:t,isActive:Boolean(t===l),onClick:()=>n(t)})))})})}function sd(e,t){return p("div",{className:"flex flex-col text-left whitespace-pre",children:[p(Ae,{size:"text-h6",children:[et(2)(t)," ₽"]}),u("div",{className:"mt-2xs",children:u(Ae,{size:"text-l",color:"text-secondary-text",children:e})})]})}function od(e){return e?u(ne,{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 cd=x((({className:e="",title:t,insuranceTabs:l=[],button:n,...a})=>{const[i,r]=o(0),s=d((e=>r(e)),[]);return p(k,{className:N("box-border overflow-hidden relative px-0 space-y-2xl",e),defaultPadding:"p-6xl",...a,children:[t?u(S,{className:"text-center",title:t,headingType:"h3"}):null,l?.length>1?u("div",{className:"p-xs bg-secondary-light w-fit mx-auto rounded-md",children:l.map(((e,t)=>function({title:e,i:t,isActive:l,onClick:n}){return u("button",{type:"button",onClick:n,"aria-label":e,className:"box-border px-m py-s text-m font-light "+(l?"bg-primary-main text-white rounded-md":"text-secondary-text"),children:e},String(t))}({title:e?.title,i:t,isActive:Boolean(t===i),onClick:()=>s(t)})))}):null,u("div",{className:"flex",style:{transform:`translateX(-${i}00%)`},role:"list",children:dd({insuranceTabs:l,button:n})})]})})),dd=({insuranceTabs:e,button:t})=>{const l=e?.map((e=>e.cards));return l?.length?l.map(((e,l)=>u(id,{button:t,cards:e},String(l)))):null};const md=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),hd={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},ud={XS:"h-10",S:"h-16",M:"h-24",L:"h-32",XL:"h-52"},pd=x((e=>{const{className:t="",items:l,isDotted:n,investmentZeroColumn:a,investmentColumns:i,...r}=e,s=i?[...i]:[];return a&&s.unshift(a),u(k,{className:t,defaultPadding:"p-4xl",...r,children:p("div",{className:"container text-m font-light space-y-4xl",children:[s?.length?p("div",{children:[p("div",{className:"flex items-end relative pl-3xl pr-lg text-white",children:[md(u("div",{className:"w-px h-4 bg-gray"}))(s.map(xd)),u("div",{className:"absolute right-3xl w-px h-4 bg-gray"})]}),u("div",{className:"border-t border-gray -mt-xs mx-3xl"}),u("div",{className:"flex justify-between text-primary-text mt-s -mx-5xl",children:s.map(bd)})]}):null,l?.length?u(Je,{className:"max-w-[657px]",items:l,isDotted:n,listItemSize:"M"}):null]})})})),xd=(e,t,l)=>{const n=1===t,a=t===l.length-1;return u("div",{className:`${gd(n,a,e.cells)}`,children:e.cells?.length?u("div",{className:"w-full "+(a?"border-4 border-green-more-dark p-2xs min-w-72":""),children:e.cells.reverse().map(fd)}):null},`column_${t}`)},gd=(e,t,l=[])=>[l.length?"flex-1":"flex-0",!l.length||e||t?"":"pl-s",l.length&&!t?"pr-s pb-3xl":"pb-xl"].join(" "),fd=(e,t)=>{const l=e.cellSize||"XS",n=e.cellColor||"green";return e.text?u("div",{className:`flex-1 flex items-center justify-center relative py-xs ${ud[l]} ${hd[n]} ${"XS"===l?"px-s":"px-5xl"}`,children:u(Ae,{align:"text-center",children:e.text})},`cell_${t}`):null},bd=(e,t)=>e?.title?u("div",{className:"flex-1 max-w-[180px] text-center px-xs last:pr-3xl",children:e.title},`title_${t}`):null,yd=["байт","Кб","Мб","Гб","Тб","Пб"],vd=x((({icon:e,text:t,href:l,target:n,fileFormat:a,fileSize:i})=>{const r=i&&a?",":"",s=i??"",o=a?String(a):"";return p("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",role:"link",href:l,target:n,children:[e,t?p(Ae,{size:"text-l",font:"font-light",children:[t," ",Nd(s,o),u(Ae,{color:"text-secondary-text",children:l&&`${s+r+o}`})]}):null]})})),Nd=(e,t)=>e||t?u("span",{children:", "}):"",wd={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},kd=x((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const o=v();return p(k,{className:N("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[u(B,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?u("div",{className:N("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",wd[r]),role:"list",children:a.map(Cd(o,i))}):null]})})),Cd=(e,t)=>(l,n)=>{if(""===l?.docType)return null;const a="Attachment"===l?.docType?W(e)(l?.attachment?.src):l?.href,i="Attachment"===l?.docType?((e,t=2)=>{if(0===e)return"";const l=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,l)).toFixed(t))} ${yd[l]}`})(l?.attachment?.fileSize||0):l?.fileSize,r="Attachment"===l?.docType?Sd(a):l?.fileFormat;return u("div",{role:"listitem",children:u(vd,{text:l?.text,target:l?.target,href:a,fileFormat:r,fileSize:i,icon:t?u(ne,{className:"min-w-6 min-h-6",image:t,width:"24",height:"24"}):null})},String(n))},Sd=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},Id=x((({className:e,padding:t,align:l="text-left",buttons:n=[],description:a,image:i,items:r,qr:s,additionalDescription:o="",title:c="Мобильное приложение",version:d="primary",...m})=>{const h="secondary"===d?"p-m min-w-32":"min-w-24",x=i?.src?u(ne,{className:"hidden lg:block",image:i}):null;return u(k,{className:N("min-h-80",e),padding:"p-0",version:d,...m,children:p(we,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:u(S,{headingType:"h3",title:c,className:N("whitespace-pre-wrap",l)}),rightImage:x,buttons:Xe(n,{className:"flex-wrap"}),children:[a?u(Ae,{size:"text-xl","font-weight":"font-light",children:a}):null,p("div",{className:N("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[u(Je,{items:r,listItemSize:"M"}),u(Ae,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:o}),s?.src?u("div",{className:N("flex justify-center bg-white rounded-md @xl:-order-1",h),children:u(ne,{className:"w-fit",image:s})}):null,i?.src?u(ne,{className:"lg:hidden",image:i}):null]})]})})})),Td={primary:"bg-white/30",secondary:"bg-main-divider"},Bd={primary:"text-white",secondary:"text-secondary-text"},Pd=x((({count:e,version:t="secondary"})=>u("div",{className:N("w-6 h-6 rounded-full flex items-center justify-center",Td[t]),children:u(Ae,{size:"text-xs",color:Bd[t],children:e})}))),Md=(e=[],t={})=>e.filter((({content:e={}})=>Bs(t,e))).length,zd=(e,t)=>e===t;const Vd=(Rd=function(...e){return(t,l)=>e.some((e=>e(t,l)))}(zd,((e=zd)=>(t,l)=>t===l||Boolean(t&&l&&t.length===l.length&&t.every(((t,n)=>e(t,l[n])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,l])=>Rd(l,t[e])))));var Rd;const Dd=[],Ad={},jd={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},Fd={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},$d={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},Ld={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},Ed=x((({tag:e="div",item:t={},isActive:l,type:n="default",onClick:a})=>{const i=e,{text:r,appendRight:s,...o}=t;return u(i,{className:N("h-12","block flex-1","cursor-pointer",jd[n],l?Ld[n]:$d[n]),role:"tab","aria-selected":l,onClick:a,...o,children:p("div",{className:N("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?Fd[n]:"text-secondary-text hover:text-primary-main"),children:[u(Ae,{size:"text-m",children:r}),s?u("div",{className:"ml-xs",children:s}):null]})})})),Od=x((e=>u(e?.item?.href?_d:Ud,{...e}))),_d=x((e=>{const t=he(),l=d((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return u(Ed,{...e,tag:"a",item:a,onClick:n})})),Ud=x((({item:e={},onClick:t,...l})=>{const n=d((()=>{t&&t(e)}),[t,e]);return u(Ed,{item:e,onClick:n,...l})})),Hd=(e,t,l)=>(n,a)=>u(Od,{isActive:n===e,onClick:t,type:l,item:n},String(a)),Wd=x((({className:e,tabsType:t="default",items:l=[],value:n,onChange:a})=>u("div",{className:N("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tablist",children:l.map(Hd(n,a,t))}))),Kd={categories:[],extraOptions:[],propertyType:[],stage:[]},Xd=wt((({className:e,hotFilters:t,filtrationSchema:l={},resetButton:n,...a})=>{const[i,{field:r,reset:s,update:o}]=Pt(Kd),c=i===Kd?a.block?.blocks:Ms(a.block?.blocks,i)(),h=d(((e=Kd)=>o(e)),[]),x=(({hotFilters:e=Dd,filtrationState:t=Ad,blocks:l=Dd,onFiltrationStateChange:n})=>{const a=m((()=>Math.max(0,e.findIndex((e=>Vd(e.filter,t))))),[e,t]),i=m((()=>e.map((t=>({text:t.text,appendRight:u(Pd,{version:t===e[a]?"primary":"secondary",count:Md(l,t.filter)})})))),[e,l,a]),r=d((t=>{n(e[i.indexOf(t)].filter)}),[e,i]);return{value:i[a],items:i,onChange:r}})({hotFilters:t,filtrationState:i,blocks:a.block?.blocks,onFiltrationStateChange:h});return p(k,{className:N("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[u(Wd,{...x}),Vs({field:r,reset:s,filtrationSchema:l,resetButton:n}),u(Is,{blocksToRender:c,...a})]})}),{childrenTypes:["ProductTile"],childSchema:e=>e?.filtrationSchema||{}});function qd(e,t,l){t.geoObjects.removeAll();const n=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),a=new e.Clusterer({clusterIcons:[{href:"/icons/MapMarkerClusterIcon.svg",size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),i=l.map((t=>new e.Placemark(t,{},{iconLayout:"default#image",iconImageHref:"/icons/MapMarkerSingleIcon.svg",iconImageSize:[78,84],iconImageOffset:[-35,-50]})));a.add(i),t.geoObjects.add(a),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const Gd={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center",font:"text-center font-sans"},Yd=(e,t,l)=>u("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(Gd).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:u(q,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),Qd={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center",font:"text-center font-sans text-l"},Zd=x((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return u("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(Qd).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:u(q,{name:l,width:"20",height:"16"})})})),Jd={border:"border border-transparent rounded-md ",position:"absolute flex items-center justify-center",size:"w-12 h-12",focus:"focus:border-primary-text focus:border",font:"text-center font-sans",active:"active:bg-primary-active",hover:"hover:bg-primary-hover",other:"select-none cursor-pointer"},em=[55.753995,37.614069],tm=x((({points:e,className:t="",zoom:l=5})=>{const n=h(null),a=Ec("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${F.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),[i,r]=o();if(c((()=>{n?.current?a&&(qd(a,n.current,e),e?.length||n.current.setCenter(em)):a?.ready((()=>{n.current||(n.current=new a.Map("map",{center:e?lm(e):em,zoom:l,controls:[],suppressMapOpenBlock:!0}),qd(a,n.current,e))}))}),[a,n,e,l]),!a)return null;const s=i?"z-[100000]":"z-10";return p("div",{id:"map",className:N(!i&&"relative","w-full",t),children:[u("div",{className:N(Object.values(Jd),s,"right-2 top-4 bg-white"),onClick:()=>{const e=n.current.container;i?e.exitFullscreen():e.enterFullscreen(),r(e.isFullscreen())},children:u(q,{name:"FullScreenIcon",width:"16",height:"16"})}),p("div",{className:N("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",s),children:[u(Zd,{yandexMaps:n}),u(Zd,{yandexMaps:n,direction:"out"})]}),Yd(n.current,a,N("right-2 top-80",s))]})})),lm=e=>[am(nm(e,0)),am(nm(e,1))],nm=(e,t)=>e.map((e=>e[t])),am=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,im={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных"},rm=(e,{field:t,reset:l})=>p("div",{className:"pb-2xl",children:[e?.length?u("div",{className:"flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",children:e.map((e=>u(El,{text:im[e],...t(e)},e)))}):null,u(fe,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:l,text:"Очистить фильтр",appendRight:u(q,{name:"CloseIcon",width:"16",height:"16"})})]}),sm=()=>null,om=()=>[],cm=x((({className:e,data:t=[],renderCard:l=sm,filterItems:n=om,initFilterState:a={},descriptionData:i,title:r})=>{const[s,{field:o,reset:c}]=Pt(a),[d,h,x]=m((()=>{const e=n(t,s),l=e.map((e=>[e.gpsLatitude,e.gpsLongitude].filter(Boolean))).filter((e=>e&&2===e.length));return[e,l,e.length]}),[t,s]);return p("div",{className:N("space-y-1",e),children:[p("div",{className:"bg-white",children:[p("div",{className:"p-6xl pb-0",children:[p("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:[u(S,{headingType:"h2",children:r}),x?u(Ae,{size:"text-h2",color:"text-secondary-text",children:`(${x})`}):null]}),i?dm(i):null,rm(Object.keys(a),{field:o,reset:c})]}),u("div",{className:"h-[600px]",children:u(b,{children:u(tm,{points:h,className:"h-full"})})})]}),d.map(l)]})})),dm=({__html:e,list:t})=>e||t?.length?p("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?u("div",{className:"mb-2xl",children:u(Re,{__html:e})}):null,t?.length?u("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>p("div",{className:"flex gap-xs items-center",children:[e?.image?u(ne,{image:e.image}):null,e?.text?u(Ae,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,mm={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"}},hm=x((({className:e,children:t,color:l="gray"})=>p("div",{className:N("pt-2xl sm:p-s sm:border sm:border-gray rounded-md flex items-center",mm[l].border,e),children:[u("div",{className:"block pr-m sm:pr-0 sm:hidden",children:u(ne,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),u(Ae,{size:"text-m",color:mm[l].text,children:t})]}))),um=x((({value:e,subText:t,children:l,...n})=>{const a=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[a.length,l,t].every((e=>!e))?null:pm({textItems:a,subText:t,children:l,...n})})),pm=({label:e,labelSize:t="text-m",textItems:l,subColor:n,subText:a,className:i,children:r})=>p("div",{className:N("flex gap-2xl sm:gap-2xs flex-col h-full max-w-[300px]",i),children:[e?u(Ae,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||l.filter(Boolean).map(((e,t)=>u(Ae,{size:"text-l",children:e.trim()},String(t)))),a?u(Ae,{color:n,size:"text-m",children:a}):null]}),xm=x((({className:e,children:t})=>u("div",{className:N("sm:flex sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),gm=["ArrowDownIcon","ArrowUpIcon"],fm=["Подробнее","Скрыть"],bm=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,children:[u("div",{className:"pr-m",children:fm[Number(e)]}),u(q,{className:"text-primary-text",name:gm[Number(e)],width:"16",height:"16"})]}),ym=({location:e,address:t,billAcceptorType:l,terminalType:n,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},o)=>{const c=[{label:"Устройство",value:Nm(n)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===l?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return p("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[p("div",{className:"sm:flex sm:justify-between",children:[p("div",{children:[u(Ae,{size:"text-h4",children:Nm(e)}),t?p("div",{className:"flex pb-xl pt-xs gap-2xs",children:[u(q,{name:"GeolocationIcon",width:"24",height:"24"}),u(Ae,{size:"text-l",children:t})]}):null]}),u(hm,{color:"green",children:Nm(s)})]}),u("div",{className:"hidden sm:block",children:u(xm,{className:"flex-wrap",children:c?.map(vm)})}),u(Kr,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>u(Xr,{isUnfolded:e,children:u(xm,{className:"flex-wrap",children:c?.map(vm)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>bm({isUnfolded:e,onToggle:t})})]},String(o))},vm=(e,t)=>u(um,{...e},String(t)),Nm=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",wm=[];const km=async e=>await gt(e,{method:"GET"})||wm,Cm={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1},Sm={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable)},Im=x((({data:e,className:t})=>{const[l]=oo(),n=function(e){const{data:t=wm}=hl(`/api/v1/atms?regionCode=${e}`,km);return t}(l?.code??"000");return u(cm,{className:t,filterItems:Tm,data:n,initFilterState:Cm,renderCard:ym,title:`Банкоматы филиала ${l?.name}`,descriptionData:e})})),Tm=(e,t)=>{const l=Object.keys(t).filter((e=>t[e])),n=l.filter((e=>e.startsWith("terminalType"))),a=l.filter((e=>!n.includes(e)));return e.filter((e=>{const t=a.every((t=>Sm[t](e))),l=!n.length||n.some((t=>Sm[t](e)));return t&&l}))},Bm=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", "),a=[Pm({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:l?"":n}),Pm({workTime:l?.workTime,lunchHour:l?.lunchHour,daysOff:n},!0)].filter(Boolean);return u(um,{label:"Режим работы",value:a,className:"max-w-none"})},Pm=({workTime:e="",lunchHour:t="",daysOff:l=""},n=!1)=>e?[`${n?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",l?`не работает: ${l}`:""].filter(Boolean).join("; "):"",Mm=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],zm=e=>Mm.map((([t,l,n])=>({key:t,title:n,short:l,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??"")}}))),Vm=e=>{if(!e)return null;const t=Rm(e);return p(xm,{className:"border-none",children:[u(um,{label:"Для юридических лиц",labelSize:"text-l",children:u("div",{className:"flex gap-1",children:t.map(Dm)})}),u(um,{label:"Режим работы",className:"max-w-none",children:u(Ae,{children:e})})]})},Rm=e=>{const t=Mm.map((([,e])=>({short:e,status:!0}))),l=e.split("/")??[],n=l[l.length-1]?.toLowerCase();return n?.includes("выходной")?t.map((e=>({...e,status:!n?.includes(e.short.toLowerCase())}))):t},Dm=({short:e,status:t},l)=>u("div",{className:N("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:u(Ae,{size:"text-xs",children:e})},String(l)),Am=({currency:e,buyExchangeRate:t,saleExchangeRate:l},n)=>p("div",{className:"flex gap-lg h-full",children:[e?.currency?u(um,{label:"Валюта",value:e.currency}):null,t?u(um,{label:"Купить",value:String(t)}):null,l?u(um,{label:"Продать",value:String(l)}):null]},String(n)),jm=(new Date).getDay(),Fm=e=>{const[t]=e?.slice(jm-1)??[];if(!t)return null;const{lunchHour:l,status:n,workTime:a,hasLunch:i}=t;return n?p("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?u(hm,{color:"green",children:a}):null,l&&i?u(hm,{color:"yellow",children:`перерыв: ${l}`}):null]}):u(hm,{color:"red",children:"Выходной"})},$m=({lunchHour:e,hasLunch:t=!1,status:l=!1})=>l?e&&t?`Перерыв ${e}`:e:"Не работает",Lm=({title:e,status:t,workTime:l,lunchHour:n,hasLunch:a},i)=>u(um,{label:e,value:t&&l?l:"",subText:$m({lunchHour:n,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),Em=({name:e,address:t,phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:o,exchangeRate:c},d)=>{if(!o)return null;const m=zm(o);return p("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[p("div",{className:"sm:flex sm:justify-between",children:[p("div",{children:[u(Ae,{size:"text-h4",children:e}),t?p("div",{className:"flex pb-xl pt-xs gap-2xs",children:[u(q,{name:"GeolocationIcon",width:"24",height:"24"}),u(Ae,{size:"text-l",children:t})]}):null]}),Fm(m)]}),u("div",{className:"hidden sm:block",children:Om({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:o,exchangeRate:c})}),u(Kr,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>u(Xr,{isUnfolded:e,children:Om({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:o,exchangeRate:c})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>bm({isUnfolded:e,onToggle:t})})]},String(d))},Om=({phone:e,fax:t,phoneBusiness:l,phoneNatural:n,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const o=zm(r),c=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return p("div",{children:[p(xm,{className:"flex-wrap",children:[u(um,{label:"Факс",value:t}),u(um,{label:"Телефон филиала",value:e}),u(um,{label:"Для обращений юридических лиц",value:l}),u(um,{label:"Обслуживание физических лиц",value:n}),u(um,{label:"Для консультаций по валютному контролю",value:i}),u(um,{label:"Контакт-центр",value:a})]}),r?.isMatchesPattern?u(xm,{children:u(um,{label:c,labelSize:"text-l",className:"w-full max-w-none",children:u("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:o?.map(Lm)})})}):p(xm,{children:[u(um,{label:c,labelSize:"text-l",children:u("div",{className:"flex gap-1",children:o?.map(Dm)})}),Bm(o)]}),r?.businessScheduleVisibleTag?Vm(r?.businessScheduleDescription):null,s?.currencies?.length?u(xm,{className:"flex-wrap",children:s?.currencies?.map(Am)}):null]})},_m=[];const Um=async e=>await gt(e,{method:"GET"})||_m,Hm={workingSaturday:!1},Wm={workingSaturday:e=>Boolean(e.workSchedule?.workingSaturday)},Km=x((({className:e})=>{const[t]=oo(),l=function(e){const{data:t=_m}=hl(`/api/v1/branches?regionCode=${e}`,Um);return t}(t?.code??"000");return u(cm,{className:e,filterItems:Xm,data:l,initFilterState:Hm,renderCard:Em,title:`Офисы филиала ${t?.name}`})})),Xm=(e,t)=>{const l=Object.keys(t).filter((e=>t[e]));return e.filter((e=>l.every((t=>Wm[t](e)))))},qm=x((({data:e,className:t,...l})=>{const n=e?.dataType??"offices";return u(k,{version:"transparent",className:N(t),defaultPadding:"p-0",...l,children:"offices"===n?u(Km,{}):u(Im,{data:e})})})),Gm=x((({className:e,size:t})=>u("figure",{className:N("m-0 mt-xl min-w-[80%]",e),children:Ym(t)}))),Ym=(e=3)=>Zm(100,e).map((e=>Math.floor(e))).map(Qm),Qm=(e,t)=>u("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-light"},String(t)),Zm=(e,t)=>[e].concat(t>0?Zm(e/1.618,t-1):[]),Jm=x((({className:e,title:t,description:l="Блок в разработке...",...n})=>p(k,{className:N("box-border",e),...n,children:[u(B,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),u(Gm,{})]}))),eh=x((({className:e="",padding:t,slides:l=[],...n})=>{const[a,i]=o(0);return p(k,{className:N("box-border overflow-hidden",e),defaultPadding:"py-6xl",padding:t,...n,children:[u("div",{className:"flex duration-1000",style:{transform:`translateX(-${100*a}%)`},role:"list",children:l.map((({productBlock:e},t)=>u("div",{className:"box-border grow-0 shrink-0 basis-full",role:"listitem",children:u(rt,{className:"pl-6xl h-full",headlineVersion:"M",isFullWidthTitle:!1,...e,...n})},String(t))))}),u("div",{className:"h-28 px-xs mt-m -mb-m flex gap-xs box-border",children:l.map(th({activeSlideIndex:a,onClick:i}))})]})})),th=({activeSlideIndex:e,onClick:t})=>({nav:l},n)=>{const a=n===e,i=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:py-xl backdrop-blur",r=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 p("button",{type:"button",onClick:()=>t(n),"aria-label":l?.title,className:N("relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50",i),children:[u("div",{className:r,children:l?.title}),u("div",{className:s,children:l?.description})]},String(n))},lh=x((({address:e,email:t,telephone:l,button:n,className:a="",__html:i,icon:r,title:s,version:o="primary",...c})=>p(k,{className:N("box-border text-left space-y-s",a),version:o,...c,children:[p("div",{className:"w-full flex justify-between flex-row-reverse",children:[Ke(r)?u("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:u(ne,{image:r})}):null,s?u(S,{headingType:"h3",as:"h3",title:s}):null]}),p("div",{className:"w-full space-y-m",children:[i?nh(i):null,ah({label:"Адрес",data:e,iconName:"GeolocationIcon"}),ah({label:"Телефон(факс)",data:l,iconName:"PhoneIcon"}),ah({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),n?.text?Xe([n]):null]})]}))),nh=e=>u("div",{className:"border-b border-main-divider pb-lg",children:u(Re,{__html:e})}),ah=({label:e,data:t,iconName:l,dataColor:n=""})=>t?p("div",{className:"flex gap-s",children:[u(q,{iconVersion:"black",name:l,width:"24",height:"24"}),p("div",{className:"flex flex-col gap-2xs",children:[u(Ae,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),u(Ae,{size:"text-xl",color:n,children:t})]})]}):null,ih=x((e=>{const{__html:t,richVersion:l,...n}=e;return u(k,{defaultPadding:"p-0",...n,children:u(Re,{__html:t,richVersion:l})})})),rh=x((({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>u(vs,{tag:"button",className:N("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:n,textNode:p("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[null,e?u(Ae,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:l?u(q,{name:l,iconVersion:"color",width:"24",height:"24"}):null}))),sh=wt((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,...o})=>u(k,{className:N("w-full","border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",...o,children:u(Kr,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>u(Xr,{className:N("gap-lg","grid grid-cols-12 [&>*]:pb-m"),isUnfolded:e,children:D({...o,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>oh({foldButtonVersion:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})),{childrenTypes:{exclude:["RollupItem"]}}),oh=({foldButtonVersion:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть"),s=((e=!1)=>e?"MinusIcon":"PlusIcon")(a);return"accordion"===e?u(rh,{label:r,labelIcon:l,labelIconBgVersion:n,icon:s,onToggle:i}):u(Ns,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},ch=x((({className:e=""})=>{const[t,l]=o("option2"),n=d((e=>l(e)),[]);return p("div",{className:N("order-4",e),children:[u(ca,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:n}),u(ca,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:n})]})})),dh=x((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===n));return u(wl,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:o})})),mh=x((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>p("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(dh,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),u("div",{className:"flex-1 min-w-0",children:u(dh,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),hh=["От 1 дня","До 365 дней"],uh=x((({days:e,setDays:t})=>p("div",{className:"order-1",children:[u(Ae,{size:"text-m",font:"font-light",children:"Срок аренды"}),u(zn,{min:1,max:365,value:e,items:hh,onChange:t})]}))),ph=x((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>p("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(dh,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),u("div",{className:"flex-1 min-w-0",children:u(dh,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),xh=x((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>p("div",{className:"contents @xl:block flex-1 space-y-xl",children:[u(mh,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:gh(c)}),u(uh,{days:a,setDays:e=>c({days:e})}),u(ph,{caseVolumes:o,selectedCaseVolume:i,onSelectedCaseVolume:fh(c),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),u("div",{className:"order-4",children:u(Ae,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),p("div",{className:"contents @md:flex justify-between items-center gap-m",children:[u(ch,{}),u(fe,{text:"Офисы на карте",version:"primary",onClick:d,className:"order-6"})]})]}))),gh=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},fh=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},bh=x((({days:e,tariffs:t=[]})=>{const l=vh(e,t),n="На рисунке изображена пачка листов\nформата А4";return p("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[p("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:[yh("Аренда за",e),yh("Цена",l+" ₽")]}),u("div",{className:"@xl:hidden order-3 mb-xs",children:u(I,{size:"text-s",font:"font-light",color:"text-secondary-text",children:n})}),p("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:[u(ne,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),u("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:u(I,{size:"text-s",font:"font-light",color:"text-white",children:n})})]})]})})),yh=(e,t)=>p("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[u(Ae,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),vh=(e,t)=>{const l=Nh(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},Nh=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},wh=(e,t)=>e.find((e=>e.branchCode===t)),kh=x((e=>{const{regions:t,data:l,branches:n,onChange:a,onClick:i}=e;c((()=>{a({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,a]);const r=wh(n,l.selectedBranch),s=Ch(r?.safeBoxCaseVolumes),o=Sh(r?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=Ih(o,l.selectedBoxSize);return p("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[u(xh,{...l,regions:t,onClick:i,branches:n,caseVolumes:s,safeBoxCases:o,onChange:a}),u(bh,{days:l.days,tariffs:d})]})})),Ch=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Sh=(e,t)=>e?.find((e=>e.volume===t)),Ih=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Th=[];const Bh=async e=>await gt(e,{method:"GET"})||Th,Ph=x((({title:e,footnote:t,className:l="",...n})=>{const[a,i]=o(!1),r=d((()=>i((e=>!e))),[]),[s,c]=o({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),m=pl(),h=Mh(s.selectedRegion,m),x=function(e){const{data:t}=hl(e?`/api/v1/safeboxes?regionCode=${e}`:null,Bh);return t||Th}(h),g=d((e=>c((t=>({...t,...e})))),[c]),f=(b=wh(x,s.selectedBranch)||x,Array.isArray(b)?b.map((e=>e.gpsLatitude&&e.gpsLongitude?[e.gpsLatitude,e.gpsLongitude]:[])):b?.gpsLatitude&&b?.gpsLongitude?[[b.gpsLatitude,b.gpsLongitude]]:[]);var b;return p(k,{className:l,defaultPadding:"",...n,children:[p("div",{className:"p-4xl space-y-xl",children:[e?u(S,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,u(kh,{regions:m,branches:x,data:{...s,selectedRegion:h},onClick:r,onChange:g}),t?u(I,{size:"text-s",font:"font-light",children:t}):null]}),f.length&&a?u(tm,{points:f,className:"h-[640px]"}):null]})})),Mh=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,zh=({styleMap:e,isMainButton:t,version:l})=>(n,a,i)=>{const{label:r,description:s,button:o,items:c,isDotted:d}=n;return p("div",{className:N("relative flex flex-col items-center text-center justify-between whitespace-pre-line overflow-hidden space-y-3xl",Vh(i.length)),children:[p("div",{className:"space-y-xs",children:[r?u(Ae,{size:"text-h6",align:"text-center",children:r}):null,p("div",{className:"flex flex-col items-center gap-3xs",children:[s?u("div",{className:e.description,children:s}):null,u(Je,{className:e.description,items:c,listItemSize:"M",isDotted:d})]})]}),o?.text&&!t?u(fe,{className:"box-border py-s w-full max-w-60 mt-auto",version:l,...o,children:o?.text}):null]},String(a))},Vh=e=>e<5?"w-72":"w-52",Rh={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"},Dh=x((({buttons:e,className:t="",description:l,showLines:n=!0,size:a="normal",steps:i=[],stepVersion:r="gray",title:s,version:o="primary",...c})=>{const d=i.length>3,m=Rh,h=(e=>e?"":"opacity-0")(n),x=(e=>e<5?"px-24":"px-16")(i.length),g=Boolean(e?.every((e=>e?.text)));return p(k,{className:N("box-border flex flex-col items-center overflow-hidden gap-y-3xl",t),defaultPadding:"p-6xl",version:o,...c,children:[u(B,{headlineVersion:"S",title:s,description:l,isEmbedded:!0,className:"w-full",align:Ca}),i?.length?p("div",{className:"box-border space-y-lg flex flex-col justify-center",children:[u("div",{className:N("flex items-center",x),children:md(u("div",{className:N("h-0.5 w-full bg-secondary-light flex-1",h)}))(i.map(Ah(m,a,r)))}),u("div",{className:N("flex justify-between",d?"gap-x-s":"gap-x-20"),children:i.map((f={styleMap:m,isMainButton:g,version:o},(e,t,l)=>{const{type:n}=e;if("default"!==n&&"rte"!==n)return null;switch(n){case"default":return zh(f)(e,t,l);case"rte":return u("div",{className:N("text-center",Vh(l.length)),children:u(Re,{__html:e.__html})},String(t));default:return null}}))})]}):null,Xe(e)]});var f})),Ah=(e,t,l)=>({icon:n},a)=>{const i="secondary"===l?"white":"color";return u(k,{defaultPadding:"",className:`${jh(t)} flex justify-center items-center text-center rounded-full box-border z-10`,version:l,children:Ke(n)?u(ne,{image:{...n,iconVersion:n?.iconVersion||i},width:"48",height:"48"}):u("span",{className:N("text-h4","transparent"===l?e.iconText:(r=l,"secondary"===r?"group-data-primary:text-white":"text-secondary-text")),children:a+1})},String(a));var r},jh=e=>"normal"===e?"h-24 w-24":"h-16 w-16",Fh=x((()=>u("div",{className:"hidden",role:"none"}))),$h=x((({className:e,version:t,gap:l=14,padding:n=16,showDots:a=false,minHeight:i,children:r,onVisibleIndicesChange:s,listType:o="horizontal-list"})=>{const c=Array.isArray(r)?r.length:0,[d,m]=pr({itemCount:c,onVisibleIndicesChange:s}),[h]=m.visibleIndicesRange;return p("div",{className:N(e,"vertical-list"===o?"relative h-full":""),children:[u(rr,{containerRef:d,activeIndex:h,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:m.handleVisibleIndicesChange,listType:o,minHeight:i,children:r}),a?u(mr,{containerRef:d,activeIndex:h,dotCount:c,listType:o,version:t}):null]})})),Lh=wt((({listType:e,showDots:t,options:l,version:n,...a})=>u(k,{version:n,defaultPadding:"p-0",...a,children:u($h,{listType:e,showDots:t,version:n,children:D({...a,options:l})})})),{childrenTypes:{exclude:["SwipeListControlBlock"]}}),Eh="hidden sm:flex absolute z-40 top-0",Oh=x((({className:e,items:t=[],value:l,onChange:n,tabsType:a})=>{const[i,r]=pr({itemCount:t?.length||0});return p("div",{className:N("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[u(rr,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,children:t.map(Hd(l,n,a))}),r.canScrollLeft?u(Fa,{className:N("left-6",Eh),onClick:r.scrollLeft}):null,r.canScrollRight?u($a,{className:N("right-6",Eh),onClick:r.scrollRight}):null]})})),_h=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return u(Wd,{...t});case"centered":return u("div",{className:"flex",children:u(Wd,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return u("div",{className:"flex",children:u(Oh,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},Uh="tab",Hh=x((({className:e="",isSticky:t,tabs:l=[],tabsMode:n,...a})=>{const i=v(),{isReady:r}=i,s=m((()=>l.map(Kh)),[l]),[h,p]=o(0);c((()=>{if(!l||!l[0])return;const e=i.query.tab&&l.findIndex((e=>"group"===e.type&&e.ref===i.query.tab))||0,t=l[e]||l[0];p(e),Wh(t)}),[r]),c((()=>{const e=l[h];"group"===e?.type&&y.subject("tab",{type:e.type,label:e.ref,groupName:e.name})}),[l,h]);const x=d((e=>{const t=s.indexOf(e),n=l[t];p(t),Wh(n),"group"===n.type&&(e=>{const t=new URLSearchParams(i.query);e.name?t.set(Uh,e.name):t.delete(Uh),i.replace(`${i.pathname}?${t}`,"",{scroll:!1})})(e)}),[l,s]);return u(k,{className:N(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...a,children:_h({items:s,value:s[h],tabsMode:n,onChange:x})})})),Wh=e=>{"group"===e.type&&y.fire("tab",{type:e.type,label:e.ref,groupName:e.name}),"link"===e.type&&y.fire("tab",{type:e.type,label:e.href})},Kh=e=>"group"===e?.type?{text:e.title,name:e.ref}:e,Xh={start:"text-start",center:"text-center",end:"text-end"},qh=x((({tab:e,className:t,onClick:l,isActive:n})=>{const a=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white text-primary-text"),title:e?"mb-xs text-xl":"mb-2xs text-l",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal"}))(n);return p("button",{type:"button",onClick:l,"aria-label":e?.title,className:N("border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs",a.btn,t),children:[e?.icon?u(ne,{className:N("h-6 w-6 min-w-6 min-h-6",a.icon),image:{...e?.icon,iconVersion:e?.icon?.iconVersion??a.iconVersion},width:"24",height:"24"}):null,p("div",{className:"border-0",children:[e?.title?u("div",{className:a.title,children:e.title}):null,e?.description?u("div",{className:a.desc,children:e.description}):null]})]})})),Gh=x((({tab:e})=>{const t=he(),{onClick:l}=t({...e,onClick:()=>{e.href&&!L(e.href)&&(globalThis.location.href=e.href)}});return Oo(l,[],800),u(Gm,{className:"col-span-12 p-xl",size:5})})),Yh=wt((({className:e="",tabs:t=[],block:l,tabAlign:n,...a})=>{const[i,r]=o(Zh(t)),s=Qh(t[i],i),d=t.length,[m,{inc:h,dec:x}]=Aa({itemCount:d},i),[g,f]=pr({itemCount:d});return((e,t)=>{const[l,{setTrue:n}]=xl(!1);c((()=>{t.scrollTo(e,{behavior:l?"smooth":"auto",block:"nearest",inline:"center"}),!l&&n()}),[e,l])})(i,f),p(k,{className:N(e),defaultPadding:"p-0",...a,children:[p("div",{className:"relative border-b-8 border-primary-main",children:[u(rr,{itemClassName:"flex",containerRef:g,snapAlign:"snap-end",gap:8,onVisibleIndicesChange:f.handleVisibleIndicesChange,children:t.map(Jh(i,r,n))}),u(fr,{scroll:f,arrowsPadded:!0,onScrollLeft:x,onScrollRight:h,activeIndex:m,itemCount:d})]}),u("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:t[i]?.href?u(Gh,{tab:t[i]}):R(l?.slots?.[s],{...a?.options,slotName:s,parent:l})})]})}),{slots:({tabs:e})=>e?.filter((e=>!e.href)).map(Qh)||[],childrenTypes:{exclude:["TabsLayout"]}}),Qh=(e,t)=>e?.title||`Слот №${t}`,Zh=e=>e.reduce(((e,t,l)=>t.selected?l:e),0),Jh=(e,t,l="start")=>(n,a)=>u(qh,{className:Xh[l],tab:n,isActive:e===a,onClick:()=>t(a)},String(a)),eu=x((({className:e="",isOpen:t,onClick:l})=>u(fe,{className:e,appendRight:u(ne,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"20",height:"20"}),text:t?"Скрыть":"Показать",version:"gray",onClick:l}))),tu={Buttons:({buttons:e})=>Xe(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?u(ne,{image:e}):null,List:({isDotted:e,...t})=>u(Je,{className:"flex flex-col justify-between items-start text-h6",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>p("div",{className:"space-y-2xs",children:[e?u("div",{children:u(Ae,{size:"text-h6",children:e})}):null,t?u("div",{children:u(Ae,{size:"text-l",color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:a})=>e?u(eu,{isOpen:a,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null},lu=x((({cell:e,fieldIdx:t,rowIdx:l,cellIdx:n,setTableInner:a,tableInner:i,openTableInnerIdx:r,setOpenTableInnerIdx:s})=>{const[d,m]=o(!0);c((()=>{n===r&&i||m(!0)}),[i,r]);return nu({cell:e,cellProps:{rowIdx:l,cellIdx:n,fieldIdx:t,displayTable:e=>{m(!1),s(n),a(e)},isVisible:d}})})),nu=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in tu))return null;return u(tu[l],{...t,...n})},au=x((({cells:e,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>u("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>u(lu,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),iu=(e,t)=>140*Me(e.slice(0,t).map((e=>e?.cols?.length??1))),ru=(e,t)=>e?.length>0?u("div",{className:N("flex",0===t?"text-secondary-text":""),children:e.map(((e,t)=>u("div",{className:"w-20 mx-lg",children:u(Ae,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,su=x((({rows:e})=>{const t=e?.[0]?.length??0,[l,n]=Aa({itemCount:t,visibleItemCount:5});return p("div",{children:[e?.map((a=l,(e,t)=>{if(!e?.length)return null;const[l,...n]=e,i=N("flex duration-1000 text-center",0!==t?"font-normal":"font-light");return p("div",{className:"flex border-main-divider border-b border-solid h-full",children:[l?.data?u("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:u(Ae,{size:"text-xl",font:"font-light",children:l.data})}):null,u("div",{className:"flex flex-grow overflow-hidden",children:u("div",{className:i,style:{transform:`translateX(-${iu(n,a)}px)`},children:n?.map(((e,t)=>p("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?u(Ae,{size:"text-xl",children:e.data}):null,e?.cols?ru(e.cols,a):null]},`row${t}`)))})})]},String(t))})),La({...n,btnClass:["left-3 top-20","right-3 top-20"],className:""})]});var a})),ou=x((({activeTabIndex:e,items:t})=>u("div",{children:t.map(((t,l)=>{const n=`activeTabIdx:${e}-tableIdx:${l}`;return p("div",{className:"w-full @container",children:[u("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:u(Ae,{size:"text-xl",align:"text-left",children:t.title})}),u("div",{className:"w-full sm:pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:u("div",{className:"relative",children:u(su,{rows:t.rowsData})})})]},n)}))}))),cu=(e=!1)=>""+(e?"text-white":"text-secondary-text"),du=x((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:n})=>p("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?u("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>u("div",{className:N("rounded-md px-4 py-3 cursor-pointer",t===l?"bg-primary-main":""),onClick:()=>n(t),children:u(Ae,{size:"text-xl",font:"font-light",color:cu(t===l),children:e||t+1})},e)))}):null,t?u(fe,{className:"text-primary-main",href:t,version:"secondary",target:"_blank",appendLeft:u(q,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]})));async function mu(e){const t=await fetch(e);return await t.json()}const hu=x((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:n}=function(e){const{data:t}=hl(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),mu);return t||{}}(e),[a,i]=o(0),r=d((e=>i(e)),[]),s=n?.[a]?.items??[],c=n?.map((e=>e.currency??""));return p("div",n?{className:"bg-white z-10",children:[u(du,{currencies:c,activeTabIndex:a,setActiveTabIndex:r,linkToPDF:t}),u(ou,{activeTabIndex:a,items:s}),u(eu,{className:"mt-xl",onClick:l,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[u(Ae,{size:"text-h6",children:"Данных нет"}),u(eu,{onClick:l,isOpen:!0})]})})),uu=x((({children:e,tableInner:t,onHideContentClick:l})=>p("div",{className:"self-start flex flex-col",role:"row",children:[u("div",{className:N("@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?u("div",{className:"origin-top animate-expansion",children:u(hu,{...t,onClick:l})}):null]}))),pu=x((({row:{header:e,data:t},activeIndex:l,rowIdx:n,...a})=>{const[i,r]=o(void 0),s=d((e=>r(e)),[]),[c,m]=o(void 0),h=d((e=>m(e)),[]);return p(uu,{onHideContentClick:()=>r(void 0),tableInner:i,...a,children:[u("div",{className:N("text-s","w-80 flex-shrink-0"),children:p("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?u(ne,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?u(Ae,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?u(ns,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>u(au,{cells:e,rowIdx:n,cellIdx:t,setTableInner:s,tableInner:i,openTableInnerIdx:c,setOpenTableInnerIdx:h,...a},String(t))))}):null]})})),xu=x((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return p("div",{role:"table",children:[p("div",{className:"relative space-y-xs",children:[e,La({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),l?u("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),gu=x((({className:e="",title:t,description:l,rowHeaders:n,tariffsColumns:a,hiddenRowsNum:i=0,...r})=>{const s=a?.map((({data:e})=>e))||[],o=n?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),c=s.length,[d,m]=Aa({itemCount:c,visibleItemCount:2}),h=(o||[]).map(((e,t)=>u(pu,{row:e,activeIndex:d,rowIdx:t,...r},String(t)))),[x,g]=i>0?[h.slice(0,-i),h.slice(-i)]:[h,[]];return p(k,{className:N("overflow-hidden relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[u(B,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),u("div",{className:"space-y-m",children:i>0?u(Kr,{renderFoldableSection:({isUnfolded:e})=>p(xu,{controls:m,children:[x,u(Xr,{isUnfolded:e,children:g})]}),renderFoldButton:ws}):u(xu,{controls:m,children:h})})]})})),fu=x((({className:e="",title:t,description:l,iconVersion:n,__html:a,...i})=>p(k,{className:N("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...i,children:["small"===n?bu():null,p("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?u(Ae,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?yu(l):null,a?u(Re,{__html:a}):null]})]}))),bu=()=>u("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"}),yu=e=>u(I,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),vu=x((({prefix:e,unit:t,suffix:l})=>p("div",{className:"w-full flex items-end",children:[e?u("div",{className:"gradient-color-text",children:u(Ae,{size:"text-h2",children:e})}):null,t?u("div",{className:"-mb-6 @xl:-mb-4",children:u("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,l?u("div",{className:"gradient-color-text",children:u(Ae,{size:"text-h2",children:l})}):null]}))),Nu=x((e=>{const{prefix:t,unit:l,suffix:n,...a}=e;return u(k,{defaultPadding:"p-0",...a,children:u(vu,{prefix:t,unit:l,suffix:n})})})),wu=wt((({className:e="",padding:t="p-0",gap:l="",isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...o})=>{const c=v();return u(k,{className:N("relative flex flex-col",ld[l],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${Z(c)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...o,children:D({...o,extraProps:{className:N("w-full",yr(r)),padding:n?"":"p-0"}})})}),{childrenTypes:[]}),ku=e=>(e=>{const t="col-span-",l=e?.split(/\s+/).find((e=>e.startsWith(t)));return l?parseInt(l.substring(t.length),10):12})(e)<10?"py-xl px-6xl":"py-6xl px-32",Cu=x((({className:e,title:t,url:l,previewImg:n,...a})=>{const i=v();return p(k,{className:e,defaultPadding:ku(e),...a,children:[u(B,{title:t,headlineVersion:"M"}),l?u("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:W(i)(n?.src),style:{maxHeight:524},controls:!0,children:u("source",{src:W(i)(l)})}):null]})})),Su={AdTile:Ct,ApplicationForm:Na,BenefitsBlock:Ta,BonusBenefitsBlock:Va,ButtonsBlock:Da,Calculator:Xi,CardTransfer:er,Carousel:Tr,CarouselBankHistoryCard:Br,CarouselCard:Rr,CarouselCatalogCard:Ar,CarouselLinks:Lr,CarouselRecommendationCard:Hr,CarouselTariffsCard:Gr,ComparisonTable:ps,ContactsBlock:gs,DepositFiltration:Hs,Depository:ao,ErrorBlock:ro,ExchangeRateTile:Vo,Footer:fc,GracePeriod:bc,Header:td,Headline:B,HorizontalLayout:nd,ImgBlock:ad,InsuranceAmountBlock:cd,InvestmentInfo:pd,LinkDocs:kd,MobileAppTile:Id,MortgageFiltration:Xd,OfficesAtmsMap:qm,Placeholder:Jm,ProductBlock:kt,ProductGallery:eh,RepresentativeOfficeInfo:lh,RichTextBlock:ih,RollupItem:sh,SafeDepositRental:Ph,StepsBlock:Dh,StickyBottomMenu:Fh,SwipeListControlBlock:Lh,Tabs:Hh,TabsLayout:Yh,TariffsTable:gu,TextBlock:fu,UnitBlock:Nu,VerticalLayout:wu,Video:Cu},Iu="cookie",Tu=x((({termLink:e,personalDataPolicyLink:t})=>{const[l,{setTrue:n,setFalse:a}]=xl();Oo((()=>{globalThis.localStorage?.getItem(Iu)||n()}),[],3e3);const i=d((()=>{globalThis.localStorage?.setItem(Iu,"true"),a()}),[]);return l?u("div",{className:"container fixed left-0 right-0 bottom-0 z-50",children:p("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[u("div",{className:"sm:flex-1",children:p(I,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",u(Or,{isRemote:!0,className:Bu(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",u(Or,{isRemote:!0,className:Bu(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),u("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:u(Eo,{className:"bg-main-gray rounded-md",onClose:i})})]})}):null})),Bu=e=>N("inline mx-2xs",e?"text-green-dark":"");function Pu(e){throw new Error(e)}const Mu=({onCloseAll:e,onClose:t}={})=>{const[l,{push:n,pop:a,clear:i}]=function(e=[]){const[t,l]=o(e),n=d((e=>l((t=>[...t,e]))),[]),a=d((()=>l((e=>e.slice(0,-1)))),[]),i=d((e=>l((t=>t.filter((t=>t!==e))))),[]),r=d((()=>l([])),[]);return[t,{setList:l,push:n,pop:a,remove:i,clear:r}]}(),r=d((()=>{e&&e(l),i()}),[l,e]),s=d((()=>{t&&t(l[l.length-1]),a()}),[l,t]);return c((()=>y.subscribe("dialog",(e=>{switch(e.type){case"open":n(e);break;case"close":e.all?r():s();break;default:Pu(e)}}))),[r,s]),l},zu=x((()=>{const e=d((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=d((e=>{e?.onClose&&e.onClose()}),[]),l=Mu({onCloseAll:e,onClose:t}),{close:n}=de(),a=d((({key:e})=>{"Escape"===e&&n()}),[]);return fl(globalThis.document,"keydown",a),c((()=>{l.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[l]),l.length?u("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>u("div",{className:N("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),Vu=x((()=>{const[e,t]=o(null),l=d((()=>{t(null)}),[]);c((()=>y.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":l();break;default:Pu(e)}}))),[]);const n=d((({key:e})=>{"Escape"===e&&l()}),[l]);return fl(globalThis.document,"keydown",n),e?u("div",{className:"absolute z-50",style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),Ru="header",Du="footer",Au="sticky-footer",ju={},Fu=x((({className:e,data:t=ju,blocksRegistry:l,blockDecorator:n})=>{const{slots:a,blocks:i,...r}=t,s={key:"",page:{slots:a,blocks:i,...Nt(r)},blocksRegistry:l,blockDecorator:n,parent:t};return p("div",{"data-theme":t.colorPalette||"pc",children:[p("section",{className:N("@container relative",t.style,e),children:[a?.header?.length?u("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:R(a?.header,{...s,slotName:Ru})}):null,p("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[D({block:t,options:s,extraProps:{className:"scroll-mt-12"}}),R(a?.footer,{...s,slotName:Du})]})]}),a?.["sticky-footer"]?.length?u("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:R(a?.["sticky-footer"],{...s,slotName:Au})}):null,u(zu,{}),u(Vu,{}),u(Tu,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));Object.assign(Fu,{childrenTypes:[],slots:()=>[Ru,Du,Au]});e.Blocks=Su,e.ContentPage=Fu,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),l=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await l.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.handlerDecorator=me,e.joinList=md,e.packageVersion="0.14.165",e.projectSettings=F,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{r=e},e.url=_,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 l=e=>(...l)=>t[e](...l),n=l("useState"),a=l("useEffect"),i=l("useCallback"),r=l("useMemo"),s=l("useRef");const 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,l){const{children:n,...a}=t||{},i=l?.slots?.default,r=n||i&&i();return e(Object.assign(a,r&&{children:r}),l)}return t.inheritAttrs=!1,t},h=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),u=d((({children:e})=>h?e:null));const p=new class{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const l=this.subjectsStateMap[e];return l&&t(l),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}};function x(){return x._impl()}x._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),x.setup=e=>{x._impl=e};const g=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),f={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","":""},b=d((({className:e,version:t="primary",isTheme:l=!0,defaultPadding:i="p-xl",padding:r,block:s,tag:c="section",role:d,children:m,style:h})=>{const u=c,b=x(),[y,v]=n(!1);a((()=>p.subscribe("tab",(e=>{e.groupName&&e.groupName!==s?.labelGroup||v(Boolean(e.label&&s?.labels?.length&&!s.labels.includes(e.label)))}))),[s,b]);const N=t&&l;return o(u,{className:g("@container font-sans",N?"group":"",f[t],y?"hidden":"",r||i,e),...N?{"data-ver":t}:{},...s?.anchor?{id:s.anchor}:{},role:d,style:h,children:m})})),y={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},v=d((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>o(l,{className:g("font-sans m-0",y[t],e),children:n||a}))),N=d((({children:e,...t})=>o("p",{className:g("font-sans",Object.values(t)),children:e}))),w={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"}},k=d((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const h=w[l],u={marginTop:h.descriptionStyle};return c(b,{className:g(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[n?o(v,{className:g("whitespace-pre-wrap",i),...h?.title,as:r||h?.title.as,title:n}):null,a?o(N,{size:h.descriptionSize,font:h.descriptionWeight,align:i,...u,children:a}):null]})})),C=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),S=[];function I(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=C,blocksRegistry:r={},ancestors:s=S}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return i({blockClassName:g(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:s,render:({block:l,blockClassName:i})=>{const{content:r}=l;return d?o(d,{className:i,block:e,options:t,...r,...n},a):null}},a)}const T=[],B=(e,{key:t,ancestors:l=T,slotName:n=null,extraProps:a,renderProps:i=I,...r})=>{const s=a?(e,t)=>I(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||T,[r.parent,n]]:l},a)))};function P({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?B(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const M=e=>e&&!e.endsWith("/")?`${e}/`:e,V=["CDN","BASE_PATH"],z=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const l=e._[t]||e[t];return V.includes(t)?M(l):l}}),R=e=>Boolean(e?.includes(":")),D=(e,t)=>Boolean(e&&!R(e)&&(!t||"_self"===t)),A=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),j=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var F=Object.freeze({__proto__:null,isURL:R,isLocalURL:D,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:A,joinPath:j});const $="/api/",L=`${$}v1/storage`,E=e=>(t,l=z.BASE_PATH)=>{if(!t||R(t)||[z.CDN,$].some((e=>O(t,e))))return t;if(/^[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(t))return`${L}/${t}/file`;const n=t.startsWith("/");return j(O(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},O=(e,t)=>t&&e&&e.startsWith(t),_={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},U=d((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",width:r,height:s})=>{const d=x(),m="normal"===i?`${l}.svg`:`sprites.svg#${l}`,h=E(d)(j(z.CDN,"/icons/",m));return"normal"===i?o("img",{className:e,src:h,alt:n,title:a,"aria-hidden":"true",width:r,height:s,style:H(e,s)}):o(K,{className:e,children:c("svg",{className:g(W(r),_[i],"white"===i?"invert":"",t),width:r,height:s,"aria-hidden":"true",children:[a?o("title",{children:a}):null,n?o("desc",{children:n}):null,o("use",{href:h,xlinkHref:h})]})})})),H=(e,t)=>{return e?.includes("h-")?{}:{height:(l=t,l&&!/\D/.test(l)?`${t}px`:t),width:"auto"};var l},W=e=>e?"":"w-full h-full",K=d((({className:e,children:t})=>e?o("div",{className:e,children:t}):t)),X=(e,t)=>l=>l&&!R(l)?E(e)(j(t,l)):l,q=(e,t)=>e?.media&&t?.media?e.media-t.media:0,G=d((({className:e="",image:t,imageClassName:l="",pathPrefix:n})=>{const a=x();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(q).map((({src:e,format:l,media:i},r)=>o("source",{srcSet:X(a,n)(e),type:Q(l),media:i?`(max-width: ${i}px)`:"",width:t?.size?.width,height:t?.size?.height},`${r}_${e}`))):null,t?.src?Y({...t,src:X(a,n)(t.src)},l):null]})})),Y=(e,t="")=>o("img",{src:e.src,className:g("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}),Q=e=>e?`image/${String(e)}`:void 0,Z=d((({className:e="",image:t,imageClassName:l="",pathPrefix:n,...a})=>t?.src||t?.icon?t.icon?o(U,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...a}):o(G,{className:e,imageClassName:l,image:t,pathPrefix:n}):null)),J={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","":""},ee="bg-main-divider text-main-disabled",te={primary:ee,secondary:ee,white:ee,link:"",transparent:"",gray:ee,"":""},le="text-center font-sans select-none",ne={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","":""},ae=({className:e,rounded:t,version:l})=>[le,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?J[l]:"",t?"rounded-full":"rounded-md",e].join(" "),ie=()=>({open:(e,t={})=>p.fire("dialog",{type:"open",dialog:e,...t}),close:()=>p.fire("dialog",{type:"close"}),closeAll:()=>p.fire("dialog",{type:"close",all:!0})}),re=(e,t)=>re._impl(e,t);function se(e={}){const{isRemote:t,basePath:l}=e,n=x(),{closeAll:a}=ie();return e=>({...e,href:t&&!l?e.href:E(n)(e.href,l),"aria-label":e.text,onClick:re(i(e),e)});function i({href:e,target:l,onClick:i}){return r=>{i&&i(r),e&&!t&&D(e,l)&&(a(),r?.preventDefault(),n.push(e))}}}re._impl=e=>e,re.setup=e=>{re._impl=e};const oe=d((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e,r=de(e)?"hidden lg:block":"";return c("div",{className:g(ce(e),"flex gap-xs"),children:[n?o("div",{className:g(r,ne[i]),children:n}):null,de(e)?c("div",{className:"whitespace-pre",children:[l?o("div",{className:"text-xs font-light text-left",children:l}):null,o("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?o("div",{className:g(r,ne[i]),children:a}):null]})})),ce=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const a=""+(l?"py-2.5 px-9":"py-4 px-9");return g("group/btn items-center justify-center",de(e)?a:"h-12 w-12 m-auto",n?"rounded-full":"")},de=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),me=({className:e,rounded:t,version:l})=>["inline-block",le,l?te[l]:"",t?"rounded-full":"rounded-md",e].join(" "),he=d((({disabled:e,children:t,method:l="LINK",href:n,...a})=>{const r=(({method:e,href:t})=>i((l=>{if("POST"!==e||!t)return;l.preventDefault();const{origin:n,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[n,a].join(""));for(const[e,t]of i.entries()){const l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name",e),l.setAttribute("value",t),r.appendChild(l)}document.body.appendChild(r),r.submit()}),[]))({method:l,href:n}),s=se()({onClick:r,href:n,...a}),c=t??o(oe,{...s});return o(e?pe:ue,{...s,children:c})})),ue=d((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,children:c})=>o("a",{className:ae({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,children:c}))),pe=d((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>o("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:me({className:e,rounded:n,version:l}),children:a})));function xe(e,t){const l="primary"===e?"white":"black",n="Вернуться назад";return c("div",{className:"hidden sm:flex items-center gap-s",children:[o("div",{className:ae({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:e,rounded:!0}),onClick:t,children:o(Z,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:l}})}),o(he,{version:"link",className:"group-data-secondary:text-white/80",text:n,ariaLabel:n,onClick:t})]})}const ge={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},fe=d((({className:e,version:t="primary",defaultPadding:l,padding:n="",title:a="",insetTitle:r="",buttons:s,leftImage:d,rightImage:m,imageAlign:h,isImageAlwaysOnRight:u=!1,isImageSecondary:p=!1,backwardButton:f,children:b,...y})=>{const v=x(),N=i((e=>{e?.preventDefault(),v.back()}),[]);return c("div",{className:be(n,l,e),children:[f?xe(t,N):null,a?o("div",{className:"relative h-full",children:a}):null,c("div",{className:g("grow relative flex flex-col @xl:flex-row gap-3xl w-full",d?"self-start @xl:w-auto":""),children:[ke(d,{imageAlign:h,className:"mx-auto"}),c("div",{className:g("grid gap-3xl",m?"@xl:grid-cols-2":"",d?"":"grow","h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[r,b]}),we(P({...y,extraProps:{className:"@container-normal"}})),ke(m,{className:g("@xl:justify-self-end @xl:col-start-2",s?ye(u):"",ve(u),Ce(p)),imageAlign:h}),Ne(s)]})]})]})})),be=(e="",t="",l="")=>g("relative flex flex-col gap-3xl overflow-hidden",e||t,l),ye=e=>e?"row-span-2":"@xl:row-span-2",ve=e=>e?"col-start-2 self-center":"",Ne=e=>e?o("div",{className:"self-end",children:e}):null,we=e=>e&&e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,ke=(e,{className:t,imageAlign:l})=>e?o("div",{className:g("shrink-1/2 justify-self-center",l&&ge[l],t),children:e}):null,Ce=e=>e?"hidden @xl:block":"",Se=(e=[])=>e.reduce(((e,t)=>e+t),0),Ie=(e=[])=>e?.length?Se(e)/e.length:0,Te=(e,t="normal")=>e?o("div",{className:g("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(Z,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Be=d((e=>{const{__html:t="",richVersion:l=""}=e;return t.replace(/<\/?[^>]+\/?>/g,"").trim()?o("div",{"data-component":"rich-text-container",children:o("div",{className:g(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})}):null})),Pe=(e,t)=>e?o(N,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Me=d((({children:e,...t})=>o("span",{className:g("font-sans",Object.values(t)),children:e}))),Ve=(e,t)=>e?o(Me,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,ze=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?o(Be,{...e},`rte-${t}`):["label"in e?Ve(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:Pe(e.description,t)},String(t)):null],Re=d((({className:e,benefitsVersion:t,...l})=>c("div",{className:g("flex gap-m min-w-56 items-center",e),children:["icon"in l?Te(l.icon,t):null,o("div",{children:ze(l)})]}))),De=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),Ae=e=>{return((t=e.map(De))?.length?Math.sqrt(Math.abs(Ie(t.map((e=>e**2)))-Ie(t)**2)):0)>16;var t},je=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),Fe=e=>!e.some(je),$e=d((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?o("div",{className:g("flex gap-x-m gap-y-s",Ae(l)||Fe(l)?"flex-col":"flex-wrap",e),children:l.map(((e,l)=>o(Re,{benefitsVersion:t,...e},String(l))))}):null)),Le=d((({className:e,benefits:t})=>t?.length?o("div",{className:g("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),children:t.flatMap(ze)}):null)),Ee=d((({isTabularBenefits:e,...t})=>o(e?Le:$e,{...t}))),Oe=e=>Boolean(e?.src||e?.icon),_e=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:g("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m",t),children:e.map(Ue(l))}):null,Ue=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},c=He(a,r),d=He(i,r);return n||a?.icon?o(he,{className:g("basis-full @lg:basis-auto",e),appendLeft:We({...a,iconVersion:c}),appendRight:We({...i,iconVersion:d}),version:r,text:n,...s},l?String(l):""):null},He=(e,t="secondary")=>{const l="secondary"===t?"color":"white";return e?.iconVersion?e?.iconVersion:l},We=e=>Oe(e)?o(Z,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,Ke=d((({className:e,isDotted:t,dotClassName:l,children:n})=>c("div",{className:g("font-sans flex",e),role:"listitem",children:[t?o("div",{className:"shrink-0",children:o("div",{className:g("align-middle inline-block rounded-full group-data-secondary:bg-white",l)})}):null,o("span",{children:n})]}))),Xe={S:{textSize:"text-l font-light",indentStyle:"ml-xs",dotStyle:"w-1 h-1 mr-xs"},M:{textSize:"text-h6",indentStyle:"ml-s",dotStyle:"w-1.5 h-1.5 mr-s"},L:{textSize:"text-h5",indentStyle:"ml-m",dotStyle:"w-1.5 h-1.5 mr-m"}},qe=d((({className:e,isDotted:t=!0,items:l=[],listItemSize:n="M",dotClassName:a=""})=>{const i=Xe[n];return l?.length?o("section",{className:g("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",i.textSize,e),role:"list",children:l.map(((e,l)=>o(Ke,{isDotted:t,dotClassName:g(a||"bg-primary-text",i.dotStyle),children:e},String(l))))}):null})),Ge=(e=0,{fixed:t}={})=>(l=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(l)||0),Ye=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",children:e.map(Qe)}):null)),Qe=({label:e,amount:t})=>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",children:[o(Me,{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:[Ge(2)(t)," ₽"]}):null]}),Ze=d((({className:e,tags:t})=>t?.length?o("div",{className:g("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(Me,{size:"text-m",font:"font-light",children:e})},String(t)),et={XXL:"L",XL:"L",L:"M",M:"M",S:"S",XS:"S"},tt=d((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,benefits:m,__html:h,isFullWidthTitle:u,items:p,isDotted:x=!0,priceList:g=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:C=!1}={},backwardButton:S,children:I,...T})=>{const B=y?.src?o(Z,{image:y}):null,P=o(k,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0}),M=m?.filter((e=>"rte"===e?.type||"label"in e||"description"in e));return o(fe,{className:e,padding:t,defaultPadding:l,...u?{title:P}:{insetTitle:P},...lt(B,N),isImageSecondary:C,imageAlign:v,isImageAlwaysOnRight:w,buttons:_e(b),backwardButton:S,...T,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[M?.length?o(Ee,{benefitsVersion:s,isTabularBenefits:d,benefits:M}):null,h?o(Be,{__html:h}):null,p?.length?o(qe,{items:p,isDotted:x,listItemSize:et[i]}):null,I,g?.length?o(Ye,{priceList:g}):null,nt(f)]})})})),lt=(e,t)=>t?{rightImage:e}:{leftImage:e},nt=e=>e?.length?o(Ze,{tags:e}):null,at=e=>Boolean(e&&Array.isArray(e)),it=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),rt=(e,t)=>{return l=e,Boolean(it(l)&&"string"==typeof l.$ref)?t.ref(e):it(e)?t.record(e):at(e)?t.array(e):t.scalar?t.scalar(e):e;var l},st=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(ot,e),ot=(e,t)=>e&&t?it(e)?e[t]:at(e)?e[parseInt(t,10)]:e:e,ct=(e,t)=>rt(e,{ref:({$ref:e,...l})=>ct(e?st(t(e),e):l,t),record:e=>Object.entries(e).map((([e,l])=>({[e]:ct(l,t)}))).reduce(((e,t)=>Object.assign(e,t)),{}),array:e=>e.map((e=>ct(e,t)))}),dt=(e,t,l=[])=>{rt(e,{ref:e=>t(e.$ref,l),record:e=>{for(const n in e)dt(e[n],t,[...l,n])},array:e=>{for(let n=0;n<e.length;n++)dt(e[n],t,[...l,n])}})};async function mt(e,t){try{return e?await ht(e,t):null}catch(e){console.error(e)}return null}const ht=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),ut=e=>[...new Set(e)],pt={},xt=["/portal-resources"],gt=(e,t)=>{const l=(e=>{const t=[];return dt(e,(e=>t.push(e))),t})(e),[i,r]=n({});return a((()=>{l.length&&(async e=>Object.fromEntries((await Promise.allSettled(ut(e).filter((e=>!xt.some((t=>e.startsWith(t))))).map((async e=>[e,pt[e]||=await ht(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(l).then(r)}),[l.join()]),l.length?ct(e,(e=>i[e]||t?.[e])):e};function ft(e,t={}){const l=d((t=>{const l=gt((({block:e,options:t,className:l,defaultPadding:n,padding:a,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...l})}));return Object.assign(l,t),l}const bt=ft((({className:e,padding:t,...l})=>o(b,{className:g("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:o(tt,{defaultPadding:"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),yt=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},l=r((()=>vt(0,t?.length)),[t]),n=t?.[l];return n?o(u,{children:o(bt,{...n,...e})}):null})),vt=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),Nt=e=>e?.replace(/[^+\d]/g,"");const wt=e=>e&&"+7 ("!==e?{secondaryPhoneNumber:Nt(e)}:{},kt=e=>e,Ct=(e,{resetOnSubmit:t,onSubmit:l}={})=>{const[a,r]=n(e),[o,c]=n(!1),[d,m]=n({}),h=s({}),u=i(((e,t)=>{const{parse:l=kt,format:n=kt}=t||{};return h.current||(h.current={}),h.current[e]||=t=>{r((n=>({...n,[e]:l(t)}))),m((t=>({...t,[e]:!0})))},{value:n(a[e]),isDirty:o||d[e],onChange:h.current[e]}}),[a,o,d]),p=i((e=>{r(e),m(e)}),[]),x=i((()=>{r(e),c(!1),m({})}),[e]),g=i((e=>{e.preventDefault(),t?x():c(!0),l&&l(a)}),[l,a]);return[a,{isDirty:o||Object.values(d).some(Boolean),field:u,update:p,reset:x,onSubmit:g}]},St=d((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>c("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[o("div",{className:g("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:g("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(Me,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),It=e=>t=>t&&Object.entries(e).flatMap((([e,l])=>l(t[e])))||[],Tt=e=>!e?.length,Bt=e=>t=>l=>e(l)?[]:[t],Pt=d((({text:e,link:t})=>c(N,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[o(Me,{children:e||"Нажимая кнопку, вы подтверждаете согласие с "}),t?o(he,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"text-primary-main",children:o(Me,{children:t.text})}):null]}))),Mt="container space-y-lg",Vt="w-full max-w-xl space-y-s m-auto",zt=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},Rt=d((({title:e,children:t})=>c("fieldset",{className:"grid @xl:flex @xl:justify-between gap-lg border-b border-b-main-divider @xl:border-none",children:[e?o("legend",{className:"w-full",children:o(v,{title:e,headingType:"h6",className:"@xl:text-center"})}):null,t]}))),Dt="@xl:w-1/2 space-y-s",At=d((({key:e,className:t="",id:l,name:n,type:r="text",label:d,placeholder:m,value:h="",valid:u=!0,children:p,onChange:x,onFocus:f,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:N=!1})=>{const w=s(null),k=i((e=>{x&&x(e.target?.value||"")}),[x]);a((()=>{v&&w.current?.focus()}),[v,w]);const C="w-full border rounded-md text-primary-text outline-none p-m",S=p?"pr-3xl":"",I=Ft(u);return c("div",{className:g("relative",t),children:[c("label",{children:[d?jt(d):null,N?o("textarea",{className:g("block resize-y min-h-24",C,I),id:g("textarea",l),name:n||l,placeholder:m,value:h,onInput:k,onFocus:f,onBlur:b},e):o("input",{type:r,className:g("h-14",C,S,I),ref:w,id:l,name:n||l,placeholder:m,value:h,onInput:k,onFocus:f,onBlur:b,pattern:y},e)]}),p]})})),jt=e=>o("div",{className:"mb-xs",children:o(Me,{size:"text-m",font:"font-light",children:e})}),Ft=e=>e?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error",$t=e=>o("div",{className:"h-4",children:e?o(Me,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Lt=d((({className:e,label:t,value:l="",placeholder:n,error:a,onChange:i,onBlur:r,isTextarea:s,...d})=>c("div",{className:g("shrink-0 w-full",e),children:[o(At,{type:"text","aria-label":t,label:t&&d?.errors?`${t}*`:t,valid:Boolean(!a),value:l,onChange:i,onBlur:r,isTextarea:s,placeholder:d?.errors&&!t?`${n}*`:n}),$t(a)]}))),Et=e=>"_"===e,Ot=e=>/\d/.test(e),_t=e=>Et(e)||Ot(e),Ut=[..."+7 (___) ___-__-__"],Ht=Ut.findIndex(Et),Wt=Ut.map(((e,t)=>_t(e)?Ut.slice(0,t).filter(_t).length:-1));const Kt=d((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=Ut.map(((e,l)=>Ot(e)?e:t.charAt(Wt[l])||e)),n=Wt.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(Ht,n)):l).join("")}(e))),[t]);return o(At,{onChange:n,onFocus:e=>n(e?.target?.value||""),...l,children:e})})),Xt=d((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i,...r})=>c("div",{className:g("shrink-0 w-full",e),children:[o(Kt,{"aria-label":t,label:r?.errors?`${t}*`:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),$t(n)]}))),qt="Некорректно заполненное поле",Gt=Bt((e=>null!=e&&""!==e))(qt),Yt=Bt((e=>"string"==typeof e&&e.length>1))(qt),Qt=Bt((e=>"string"==typeof e&&(10===e.length||12===e.length)))(qt),Zt=(Jt=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,Bt((e=>"string"==typeof e&&Jt.test(e))))(qt);var Jt;const el=Bt((e=>"boolean"==typeof e&&e))(qt),tl=(e,t)=>c(Rt,{title:t,children:[c("div",{className:Dt,children:[o(Lt,{label:"Наименование организации",...zt(e("fullName"),Gt)}),o(Lt,{label:"Контактное лицо",...zt(e("name"),Yt)})]}),c("div",{className:Dt,children:[o(Lt,{label:"ИНН",...zt(e("inn"),Qt)}),o(Xt,{label:"Телефон",...zt(e("phone"),Zt)})]})]}),ll=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],nl=e=>null!=e,al=new Map,il=e=>Boolean(e?.every((e=>Array.isArray(e)?il(e):!e||"string"==typeof e))),rl=e=>il(e)?e.toString():"";function sl(e,t,{fallback:l,cache:i}={}){const s=r((()=>ol(e)),[e]),[o,c]=n(void 0),[d,m]=n(void 0);a((()=>{if(!s.some(nl))return;let e=!1;const l=(t,l)=>{e||(c(t),m(l))};return(async()=>{try{l(await((e,t=al)=>l=>{const n=rl(l),a=t.get(n);if(n&&nl(a))return a;const i=e(...l);return n&&nl(i)&&t.set(n,Promise.resolve(i)),i})(t,i)(s))}catch(e){l(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const h=l&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)&&l[s[0]];return{data:!o&&h?h:o,error:d,mutate:()=>Promise.resolve(void 0)}}function ol(e){return Array.isArray(e)?e:e instanceof Function?ol(e()):[e]}function cl(){const{data:e}=sl("/api/v1/regions",ht);return e||[]}function dl(e=!1){const[t,l]=n(e),a=i((()=>l(!0)),[]),r=i((()=>l(!1)),[]),s=i((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:a,setFalse:r,toggle:s}]}const ml=e=>e?.text||e?.key||"";function hl(e,t,l,n){a((()=>{if(e&&l)return e.addEventListener(t,l,n),()=>{e.removeEventListener(t,l,n)}}),[e,t,l])}function ul(e){const t=s(null),l=i((l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()}),[e]);return hl(globalThis.document,"click",l),t}const pl=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,xl=d((({popupRef:e,options:t,value:l,query:n,onChange:a,iconVersion:i})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md",role:"listbox",ref:e,children:pl(t,n).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"option","aria-selected":e.key===l?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:ml(e)}),o(U,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:g("absolute right-4 pt-3xs",e.key===l?.key?"":"hidden")})]},e.key)))}):null));function gl({isOpen:e,options:t,value:l,query:n,onChange:r,onClose:c,iconVersion:d}){const m={open:(e,t)=>p.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>p.fire("popup",{type:"update",popup:e,...t}),close:()=>p.fire("popup",{type:"close"})},h=i((()=>{m.close(),c&&c()}),[c]),u=i((e=>{h(),r&&r(e)}),[h,r]),x=s(null),g=ul(h);return a((()=>{if(!e||!x.current)return;const a=x.current,{top:i,left:r,width:s,height:c}=a.getBoundingClientRect();m.update(o(xl,{popupRef:g,options:t,value:l,query:n,onChange:u,iconVersion:d}),{top:i+window.scrollY+c,left:r,width:s})}),[e,t,l,n,u]),x}const fl=d((({className:e,label:t,options:l=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:d="",isSearch:m=!1,iconVersion:h,onChange:u})=>{const[p,{setFalse:x,setTrue:f}]=dl(),[b,y]=n(""),v=i((()=>{y(""),x()}),[]),N=gl({isOpen:p,options:l,value:a,query:b,onChange:u,onClose:v,iconVersion:h});return c("div",{className:e,children:[bl(t),c("div",{className:g("relative",p?"z-20":"z-10"),ref:N,children:[c("div",{className:g("h-14 text-l flex justify-between items-center text-primary-text cursor-pointer relative z-10",vl(s,r)),onClick:p?v:f,children:[o("p",{className:"p-m pr-8 flex items-center overflow-hidden text-ellipsis",children:ml(a)||d}),yl(p,h)]}),m&&p?o("div",{className:g("absolute top-0 w-full z-20"),children:o(At,{type:"text",autoFocus:!0,value:b,onChange:y})}):null]})]})})),bl=e=>e?o("div",{className:"mb-xs",children:o(Me,{size:"text-m",color:"text-primary-text",font:"font-light",children:e})}):null,yl=(e,t)=>o(U,{className:g("absolute right-3",e?"":"rotate-180"),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),vl=(e,t)=>g(e?"border rounded-md hover:border-primary-hover":"",t?" border-gray":"border-error"),Nl=d((({className:e="",label:t,error:l,...n})=>c("div",{className:e,children:[o(fl,{...n,valid:!l,label:n?.errors?`${t}*`:t}),$t(l)]}))),wl=d((({field:e})=>{const t=cl();return o(Nl,{className:"w-full",label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:t.map((({code:e="",name:t=""})=>({key:e,text:t}))),...zt(e("region"),Gt)})})),kl=({field:e,title:t})=>c(Rt,{title:t,children:[o("div",{className:Dt,children:o(Nl,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:ll,...zt(e("acquiringType"),Gt)})}),o("div",{className:Dt,children:o(wl,{field:e})})]});function Cl({disabled:e,onClick:t}){return l=>{!e&&t&&t(l)}}const Sl={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"},Il={primary:g("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:g("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")},Tl=d((({children:e,...t})=>{const l=e=>({...e,onClick:re(Cl(e),e)}),{className:n,version:a="primary",active:i,disabled:r,type:s="button",rounded:c=!0,role:d,onClick:m}=l(t);return o("button",{className:g("font-sans px-9 py-4","flex justify-center items-center gap-xs",i?"text-white bg-primary-active":"",r?"bg-main-gray text-main-disabled cursor-not-allowed":"",i||r?"":g(Sl[a],Il[a]),c?"rounded-md":"",n),type:s,role:d,onClick:m,children:e})})),Bl=(e,t)=>o(Tl,{className:g("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),Pl={typeForm:{key:"acqr",text:"Предупреждение о мошенничестве"},acquiringType:{key:"trade",text:"Торговый эквайринг"},fullName:"",inn:"",name:"",phone:"",onlineCheckout:!1,posTerminal:!1},Ml=It({acquiringType:Gt,region:Gt,fullName:Gt,inn:Qt,name:Yt,phone:Zt}),Vl=d((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{acquiringType:t,onlineCheckout:l,posTerminal:a,...i}=e,r=zl(t?.key),s={partnerComments:`Вид эквайринга=${t?.text||""}${r?`/Онлайн касса=${l}/POS-терминал=${a}`:"/Онлайн касса=false/POS-терминал=false"}`,...i};Tt(Ml(e))&&n(s,!1)}),[n]),[,{field:r,...s}]=Ct(Pl,{onSubmit:a}),d=zl(r("acquiringType").value?.key);return c("form",{className:Mt,onSubmit:s.onSubmit,children:[kl({field:r,title:"Вид эквайринга и регион"}),tl(r,"Данные организации"),d?c("div",{children:[o(St,{text:"Хочу купить онлайн-кассу",...r("onlineCheckout")}),o(St,{text:"Хочу купить POS-терминал",...r("posTerminal")})]}):null,Bl(t),o(Pt,{link:l})]})})),zl=e=>"all"===e||"trade"===e,Rl=d((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:a,children:i.map((({d:e,fill:t,...l},n)=>{const a={...r,...l};return o("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},n)}))}))),Dl=[{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"}],Al=d((({className:e,value:t,text:l,disabled:n,isRadio:a,onChange:r})=>{const s=i((e=>{n||(e.preventDefault(),r&&r(!t))}),[r,n,t]),d=a?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(Rl,{paths:Dl,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:"flex items-center relative cursor-pointer group/box",onClick:s,children:[o("div",{className:g("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":jl(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:"checkbox","aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?d:null,l?o("div",{className:"ml-s",children:o(Me,{size:"text-l",font:"font-light",children:l})}):null]})})})),jl=e=>g("rounded border",e?"bg-primary-main":""),Fl=d((({className:e,text:t,value:l,key:n,disabled:a,error:i,onChange:r})=>c("div",{className:g("shrink-0 w-full",e),children:[o(Al,{text:t,value:l,disabled:a,onChange:r},n),$t(i)]}))),$l=(e,t,l)=>c("div",{className:"flex gap-m flex-col lg:flex-row w-full justify-between items-baseline",children:[c("div",{children:[c("div",{className:"flex gap-3",children:[o(Al,{...e}),o(Pt,{text:"Согласен с ",link:t})]}),$t(zt(e,el).error)]}),Bl(l)]}),Ll=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const l=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),a=t?String(e.getFullYear()):String(e.getFullYear()).slice(-2);return t?`${a}-${n}-${l}`:`${l}.${n}.${a}`}},El=()=>{},Ol=({today:e,firstDayOfWeek:t,totalDays:l,currentMonth:n,currentYear:a,min:i,max:r,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>l)h.push(o("td",{},`empty-${c}`));else{const t=new Date(a,n,d),l=_l(t,e),c=Ul(t,i,r);h.push(o("td",{children:o("div",{className:Hl(l,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:h},`row-${m}`))}return c},_l=(e,t)=>t&&e.toDateString()===t.toDateString(),Ul=(e,t,l)=>t&&e.getTime()<t.getTime()||l&&e.getTime()>l.getTime(),Hl=(e,t)=>g("p-s text-center rounded-md border",e?"":"border-transparent hover:bg-gray",t?"text-gray hover:bg-transparent":"cursor-pointer"),Wl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Kl=d((({today:e,currentMonth:t,currentYear:l,min:n,max:a,onDateSelect:s=El})=>{const d=i((e=>s(e)),[]),{firstDayOfWeek:m,totalDays:h}=r((()=>({firstDayOfWeek:new Date(l,t,1).getDay()-1,totalDays:new Date(l,t+1,0).getDate()})),[l,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:Wl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:Ol({firstDayOfWeek:m,today:e,totalDays:h,currentYear:l,currentMonth:t,min:n,max:a,onDateClick:d})})]})})),Xl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],ql=Xl.map((e=>({key:e}))),Gl=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),Yl={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Ql={className:"min-w-32",iconVersion:"black",isBorder:!1},Zl=d((({className:e="",label:t="",value:l,valid:a=!0,minDate:r,maxDate:s,onChange:d})=>{const[m,{setValue:h}]=dl(!1),[u,p]=n(l?.getMonth()||(new Date).getMonth()),[x,f]=n(l?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:b,handleNextMonth:y,handleSelectMonth:v,handleSelectYear:N,monthsOptions:w,yearsOptions:k,handleChangeVisibleCalendar:C,ref:S}=(({onShowCalendar:e,showCalendar:t,selectedMonth:l,onMonthSelect:n,onYearSelect:a,selectedYear:r})=>{const s=ul(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{l+1<=11?n(l+1):(n(0),a(r+1))}),[l]),handlePrevMonth:i((()=>{l-1>=0?n(l-1):(n(11),a(r-1))}),[l]),handleSelectMonth:i((({key:e})=>n(Xl.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:ql,yearsOptions:Gl,ref:s}})({onYearSelect:f,onMonthSelect:p,onShowCalendar:h,selectedYear:x,selectedMonth:u,showCalendar:m});return c("div",{className:g(e,"relative"),ref:S,children:[o(Me,{size:"text-m","font-weight":"font-light",children:t}),Jl(C,l,a),m?c("div",{className:"absolute bg-white z-20 select-none",children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:b,children:o(U,{...Yl,className:"-rotate-90 cursor-pointer"})}),o(fl,{onChange:v,value:{key:Xl[u]},options:w,...Ql}),o(fl,{onChange:N,value:{key:String(x)},options:k,...Ql}),o("div",{className:"my-auto",onClick:y,children:o(U,{...Yl,className:"rotate-90 cursor-pointer"})})]}),o(Kl,{today:l,currentMonth:u,currentYear:x,onDateSelect:d,min:r,max:s})]}):null]})})),Jl=(e,t,l)=>c("div",{onClick:e,className:g("flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",l?"border-gray":"border-error"),children:[o(N,{children:t&&Ll(t)}),o(U,{...Yl,name:"CalendarIcon"})]}),en=d((({className:e,label:t,value:l,error:n,onChange:a,...i})=>c("div",{className:g("shrink-0 w-full",e),children:[t?o("div",{className:"mb-xs",children:o(Me,{size:"text-m",font:"font-light",children:i?.errors?`${t}*`:t})}):null,o(Zl,{value:l,onChange:a,valid:Boolean(!n)}),$t(n)]}))),tn={surname:"",name:"",middleName:""},ln=(e,t=!0)=>c("div",{className:"space-y-s",children:[o(Lt,{label:"Фамилия",...zt(e("surname"),Yt)}),o(Lt,{label:"Имя",...zt(e("name"),Yt)}),o(Lt,{label:"Отчество (Обязательно, при наличии)",...e("middleName")}),t?o(en,{label:"Дата рождения",...zt(e("birthday"),Gt)}):null]}),nn={...tn,typeForm:{key:"ANTIFRAUD",text:"Предупреждение о мошенничестве"},phone:"",birthday:void 0,isClient:!1,comment:"",consentDataProcessing:!1},an=It({typeForm:Gt,surname:Gt,name:Yt,birthday:Gt,phone:Zt,comment:Gt,consentDataProcessing:el}),rn=d((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{Tt(an(e))&&l(e,!0)}),[l]),[,{field:a,...r}]=Ct(nn,{onSubmit:n});return o("form",{className:Mt,onSubmit:r.onSubmit,children:o(Rt,{children:c("div",{className:Vt,children:[ln(a,!0),o(Xt,{label:"Телефон",...zt(a("phone"),Zt)}),o(Fl,{...a("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}),o(Lt,{...zt(a("comment"),Gt),placeholder:"Комментарий",isTextarea:!0}),$l(a("consentDataProcessing"),t,e)]})})})})),sn={typeForm:{key:"bcrd",text:"Заявка на бизнес-карту"},name:"",phone:"",inn:"",email:""},on=It({region:Gt,name:Yt,phone:Zt,inn:Qt,email:Gt}),cn=d((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{Tt(on(e))&&n(e)}),[n]),[,{field:r,...s}]=Ct(sn,{onSubmit:a});return c("form",{className:Mt,onSubmit:s.onSubmit,children:[o(wl,{field:r}),c(Rt,{children:[c("div",{className:Dt,children:[o(Lt,{label:"Контактное лицо",...zt(r("name"),Yt)}),o(Lt,{label:"ИНН",...zt(r("inn"),Qt)})]}),c("div",{className:Dt,children:[o(Xt,{label:"Телефон",...zt(r("phone"),Zt)}),o(Lt,{label:"Электронная почта",...zt(r("email"),Gt)})]})]}),Bl(t),o(Pt,{link:l})]})})),dn={typeForm:{key:"CORRUPTION",text:"Факты коррупции"},...tn,phone:"",email:"",comment:"",consentDataProcessing:!1},mn=It({typeForm:Gt,surname:Gt,name:Yt,region:Gt,phone:Zt,email:Gt,comment:Gt,consentDataProcessing:el}),hn=d((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{Tt(mn(e))&&l(e,!0)}),[l]),[,{field:a,...r}]=Ct(dn,{onSubmit:n});return o("form",{className:Mt,onSubmit:r.onSubmit,children:o(Rt,{children:c("div",{className:Vt,children:[ln(a,!1),o(wl,{field:a}),o(Xt,{label:"Телефон",...zt(a("phone"),Zt)}),o(Lt,{label:"Электронная почта",...zt(a("email"),Gt)}),o(Lt,{...zt(a("comment"),Gt),placeholder:"Ваше сообщение",isTextarea:!0}),$l(a("consentDataProcessing"),t,e)]})})})})),un=[];const pn=async e=>await mt(e,{method:"GET"})||un;function xn(){const{data:e}=sl("/api/v1/premiumBranchesByRegions",ht);return e||[]}const gn=d((({field:e,regionKey:t,isPremium:l=!1})=>{const n=l?xn().find((e=>e?.region===t))?.branches:function(e){const{data:t}=sl(e?`/api/v1/branches?regionCode=${e}`:null,pn);return t||un}(t).filter((e=>e?.address));return o(Nl,{label:"Адрес",placeholder:"Выберите адрес",options:(n||[]).map((({address:e=""})=>({key:e,text:e}))),...zt(e("addressBranch"),Gt)})})),fn=["От 1 000 ₽","До 1 000 000 000 ₽"],bn=["От 1 мес","До 15 лет"],yn=(e,t)=>c(Rt,{title:t,children:[c("div",{className:Dt,children:[o(Lt,{label:"Наименование организации",...zt(e("fullName"),Gt)}),o(Lt,{label:"ИНН",...zt(e("inn"),Qt)}),o(Xt,{label:"Телефон",...zt(e("phone"),Zt)})]}),c("div",{className:Dt,children:[o(Lt,{label:"Годовая выручка, ₽",...zt(e("annualRevenue"),Gt)}),o(Lt,{label:"Контактное лицо",...zt(e("name"),Yt)}),o(Lt,{label:"Электронная почта",...zt(e("email"),Gt)})]})]}),vn=(e,{normalize:t,format:l})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=n(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!l?a:l(a),onFocus:m,onBlur:h}},Nn=(e,t,l)=>Math.max(t,Math.min(e,l));function wn(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function kn({list:e=[],min:t,max:l,step:n,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,d={backgroundSize:`${(100*(s>t?s-t:0)/(l-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:g("w-2 h-2 rounded-full",s<=t||i?"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:l,step:n,value:s,disabled:i,onInput:t=>{const l=wn(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const Cn=1,Sn=100,In=d((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:Cn),max:s=(a.length?a.length-1:Sn),step:d=1,value:m=a[0]||r,disabled:h=!1,onChange:u}=e,p=vn(e,{normalize:(e=0)=>a.length?Tn(a)(e):Nn(e,r,s),format:Ge()}),x=i((e=>{u&&u(wn(e.target?.value))}),[u]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[l?o(Me,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,o("input",{className:g("mt-xs font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","pl-m box-border","text-primary-text hover:border-primary-hover focus:border-primary-text","disabled:border-gray disabled:bg-main-divider"),disabled:h,onInput:x,...p}),kn({list:a,min:r,max:s,step:d,disabled:h,value:m,onChange:u})]}),Bn(n)]})})),Tn=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),Bn=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(Me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),Pn=(e,t)=>c(Rt,{title:t,children:[o("div",{className:Dt,children:o(In,{title:"Сумма, ₽",items:fn,min:1e3,max:1e9,...e("amount")})}),o("div",{className:Dt,children:o(In,{title:"Срок, месяцев",items:bn,min:1,max:180,...e("term")})})]}),Mn={typeForm:{key:"cred",text:"Кредит"},amount:1e3,term:12,fullName:"",inn:"",name:"",phone:"",email:"",annualRevenue:""},Vn=It({fullName:Gt,annualRevenue:Gt,inn:Qt,name:Yt,phone:Zt,region:Gt}),zn=d((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{amount:t,term:n,addressBranch:a,annualRevenue:i,...r}=e;Tt(Vn(e))&&l({...r,addressBranch:a?.text||"",partnerComments:`Сумма=${t}/Срок=${n}/Выручка=${i}`})}),[l]),[a,{field:r,...s}]=Ct(Mn,{onSubmit:n});return c("form",{className:Mt,onSubmit:s.onSubmit,children:[Pn(r,"Параметры"),yn(r,"Данные организации"),c(Rt,{title:"Офис банка",children:[o("div",{className:Dt,children:o(wl,{field:r})}),o("div",{className:Dt,children:o(gn,{field:r,regionKey:a.region?.key})})]}),Bl(e),o(Pt,{link:t})]})})),Rn={typeForm:{key:"dpst",text:"Заявка на депозит"},name:"",phone:""},Dn=It({name:Yt,phone:Zt}),An=d((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{Tt(Dn(e))&&l(e)}),[l]),[,{field:a,...r}]=Ct(Rn,{onSubmit:n,resetOnSubmit:!1});return o("form",{className:Mt,onSubmit:r.onSubmit,children:o(Rt,{title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",children:c("div",{className:Vt,children:[o(Lt,{label:"Имя",...zt(a("name"),Yt)}),o(Xt,{label:"Телефон",...zt(a("phone"),Zt)}),Bl(e),o(Pt,{link:t})]})})})})),jn=[{text:"Задать вопрос по продуктам и услугам",key:"FEEDBACK"},{text:"Качество обслуживания",key:"FEEDBACK_QS"}],Fn=[{key:"phone",text:"Телефонный звонок"},{key:"mail",text:"Электронное сообщение"}],$n=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],Ln={typeForm:Gt,region:Gt,surname:Gt,name:Yt,feedbackMethod:Gt,phone:Zt,email:Gt,comment:Gt,consentDataProcessing:el},En={...tn,typeForm:{key:"FEEDBACK",text:"Задать вопрос по продуктам и услугам"},serviceDirection:{key:"Физическое лицо"},birthday:void 0,feedbackMethod:{key:"Телефонный звонок"},phone:"",email:"",comment:"",consentDataProcessing:!1},On=d((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{_n(e.typeForm.key,e.serviceDirection?.key)?((e,t)=>{const l=It({...Ln,addressBranch:Gt,inn:Qt});Tt(l(e))&&t(e,!1)})(e,l):"FEEDBACK"===e.typeForm.key?((e,t)=>{const l=It({...Ln,birthday:Gt});Tt(l(e))&&t(e,!0)})(e,l):((e,t)=>{const l=It({...Ln,addressBranch:Gt});Tt(l(e))&&t(e,!0)})(e,l)}),[l]),[a,{field:r,...s}]=Ct(En,{onSubmit:n}),d="FEEDBACK_QS"===r("typeForm").value?.key,m=_n(r("typeForm").value?.key,r("serviceDirection").value?.key);return o("form",{className:Mt,onSubmit:s.onSubmit,children:o(Rt,{children:c("div",{className:Vt,children:[o(Nl,{label:"Тема",placeholder:"Выберите тему",options:jn,...zt(r("typeForm"),Gt)}),d?o(Nl,{label:"Направление обслуживания",placeholder:"Выберите направление",options:$n,...zt(r("serviceDirection"),Gt)}):null,o(wl,{field:r}),d?o(gn,{field:r,regionKey:a?.region?.key}):null,ln(r,!0),m?c("div",{children:[o(Lt,{label:"ИНН",...zt(r("inn"),Qt)}),o(Lt,{label:"Наименование организации",...r("fullName")})]}):null,o(Nl,{label:"Способ получения ответа",options:Fn,...zt(r("feedbackMethod"),Gt)}),o(Xt,{label:"Телефон",...zt(r("phone"),Zt)}),d?c("div",{children:[o(Xt,{label:"Дополнительный телефон",...r("secondaryPhone").value&&"+7 ("!==r("secondaryPhone").value?zt(r("secondaryPhone"),Zt):r("secondaryPhone")}),o(Lt,{label:"Электронная почта",...zt(r("email"),Gt)}),o(Lt,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...r("bankEmpolee")}),o(Lt,{label:"Дата и время обращения в Банк",...r("applicationDate")})]}):o(Lt,{label:"Электронная почта",...zt(r("email"),Gt)}),o(Lt,{...zt(r("comment"),Gt),placeholder:"Ваше сообщение",isTextarea:!0}),$l(r("consentDataProcessing"),t,e)]})})})})),_n=(e="",t="")=>"FEEDBACK_QS"===e&&"Юридическое лицо / ИП"===t,Un={},Hn="/wcms-resources";const Wn=d((e=>{const{button:t,sourceBookDir:l}=e,{regions:a}=function(e,t={}){const{fallback:l=Un,pathDir:n=Hn}=t,{data:a}=sl(e?`${n}/${e}.json`:null,ht,{fallback:l});return a||Un}(l||"regions-grant-support"),[i,r]=n({key:""}),s=ae({className:"text-white",version:t?.version}),d=a?.find((e=>e.name===i.key))?.href;return c("div",{className:"container space-y-s",children:[a?o(Nl,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:a.map((({name:e=""})=>({key:e,text:e}))),value:i,onChange:r}):null,d?o("div",{className:"text-center",children:o(he,{href:d,target:"_blank",className:g("p-m w-full @xl:w-auto",s),children:t?.text?t.text:"Перейти"})}):null]})})),Kn={...tn,phone:"",email:"",birthday:void 0,consentDataProcessing:!1},Xn=It({surname:Yt,name:Yt,phone:Zt,email:Gt,birthday:Gt,consentDataProcessing:el}),qn=d((e=>{const{button:t,link:l,product:n="",onSubmit:a}=e,r=i((e=>{Tt(Xn(e))&&a({...e,product:n},!0)}),[a]),[,{field:s,...d}]=Ct(Kn,{onSubmit:r});return c("form",{className:Mt,onSubmit:d.onSubmit,children:[c(Rt,{children:[c("div",{className:Dt,children:[o(Lt,{label:"Фамилия",...zt(s("surname"),Yt)}),o(Lt,{label:"Отчество (Обязательно, при наличии)",...s("middleName")}),o(Xt,{label:"Телефон",...zt(s("phone"),Zt)})]}),c("div",{className:Dt,children:[o(Lt,{label:"Имя",...zt(s("name"),Yt)}),o(en,{label:"Дата рождения",...zt(s("birthday"),Gt)}),o(Lt,{label:"Электронная почта",...zt(s("email"),Gt)})]})]}),$l(s("consentDataProcessing"),l,t)]})})),Gn={typeForm:{key:"SELFCOLLECTION",text:"Самоинкассация"},fullName:"",phone:"",consentDataProcessing:!1},Yn=It({typeForm:Gt,region:Gt,fullName:Gt,phone:Zt}),Qn=d((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{Tt(Yn(e))&&l(e,!1)}),[l]),[,{field:a,...r}]=Ct(Gn,{onSubmit:n});return o("form",{className:Mt,onSubmit:r.onSubmit,children:o(Rt,{children:c("div",{className:Vt,children:[o(Lt,{label:"ФИО",...zt(a("fullName"),Gt)}),o(wl,{field:a}),o(Xt,{label:"Телефон",...zt(a("phone"),Zt)}),$l(a("consentDataProcessing"),t,e)]})})})})),Zn=d((({field:e})=>{const t=xn().map((({region:e})=>({key:e,text:e})));return o(Nl,{label:"Регион",placeholder:"Выберите регион",options:t,...zt(e("region"),Gt)})})),Jn=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],ea={typeForm:Jn[0],...tn,email:"",phone:"",comment:"",consentDataProcessing:!1},ta=It({typeForm:Gt,surname:Gt,name:Yt,phone:Zt,email:Gt,addressBranch:Gt,consentDataProcessing:el}),la=d((({button:e,link:t,onSubmit:l,defaultType:n="PREMIUMSERVICE"})=>{const a=i((e=>{Tt(ta(e))&&l(e,!0)}),[l]),[r,{field:s,...d}]=Ct({...ea,typeForm:na(n)},{onSubmit:a}),m=r?.region?.key;return c("form",{className:Mt,onSubmit:d.onSubmit,children:[c(Rt,{title:"Ваши данные",children:[c("div",{className:Dt,children:[o(Lt,{label:"Фамилия",...zt(s("surname"),Yt)}),o(Lt,{label:"Отчество (Обязательно, при наличии)",...s("middleName")}),o(Lt,{label:"Электронная почта",...zt(s("email"),Gt)})]}),c("div",{className:Dt,children:[o(Lt,{label:"Имя",...zt(s("name"),Yt)}),o(Xt,{label:"Телефон",...zt(s("phone"),Zt)}),o(Nl,{label:"Тип обслуживания",options:Jn,...zt(s("typeForm"),Gt)})]})]}),c(Rt,{title:"Офис банка",children:[o("div",{className:Dt,children:o(Zn,{field:s})}),o("div",{className:Dt,children:o(gn,{field:s,regionKey:m,isPremium:!0})})]}),o(Lt,{...s("comment"),placeholder:"Комментарий, удобное время и прочее",isTextarea:!0}),$l(s("consentDataProcessing"),t,e)]})})),na=e=>Jn.find((t=>t.key===e)),aa=d((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>o("div",{className:i,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:"appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-primary-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer",type:"radio",value:l,name:e,checked:n,onChange:e=>a(e.target.value)}),t?o(Me,{color:"text-primary-text",children:t}):null]})}))),ia=e=>{const{value:t,onChange:l}=e("vedTypes");return o(Rt,{children:c("div",{className:"gap-xl grid @xl:flex @xl:items-center",children:[o(aa,{name:"vedTypes",text:"Валютный контроль",value:"currencyControl",checked:"currencyControl"===t,onChange:e=>l&&l(e)}),o(aa,{name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:e=>l&&l(e)}),o(aa,{name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:e=>l&&l(e)}),o(aa,{name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:e=>l&&l(e)})]})})},ra=({field:e})=>{const t="currencyControl"===e("vedTypes").value;return c("div",{className:"space-y-s",children:[t?o(wl,{field:e}):null,c("div",{className:"grid @xl:grid-cols-2 @xl:gap-x-lg gap-s",children:[t?o(Lt,{label:"ИНН",...zt(e("inn"),Qt)}):null,o(Lt,{label:"Наименование организации",...zt(e("fullName"),Gt)}),o(Lt,{label:"ФИО",...zt(e("name"),Yt)}),o(Xt,{label:"Телефон",...zt(e("phone"),Zt)}),t?null:o(Lt,{label:"Электронная почта",...e("email")})]})]})},sa={typeForm:{key:"KVED",text:"Заявка на консультацию ВЭД"},vedTypes:"currencyControl",fullName:"",name:"",phone:"",inn:"",email:"",partnerComments:""},oa={fullName:Gt,name:Yt,phone:Zt},ca=It({...oa}),da=It({...oa,inn:Qt,region:Gt}),ma=e=>"currencyControl"===e,ha=e=>({currencyControl:"currencyControl"===e,documentOperations:"documentOperations"===e,conversionTransactions:"conversionTransactions"===e,otherIssues:"otherIssues"===e}),ua={ApplicationFormBusinessCard:cn,ApplicationFormWed:d((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{typeForm:t,fullName:l,name:a,phone:i,email:r,inn:s,region:o,vedTypes:c,partnerComments:d}=e,m={typeForm:t,fullName:l,name:a,phone:i,vedTypes:ha(c),partnerComments:d,...ma(c)?{inn:s,region:o}:{email:r}};Tt((e=>ma(e)?da:ca)(c)(e))&&n(m)}),[n]),[,{field:r,...s}]=Ct(sa,{onSubmit:a});return c("form",{className:"container space-y-lg",onSubmit:s.onSubmit,children:[ia(r),o(v,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),ra({field:r}),o(Lt,{label:"Обращение",placeholder:"Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка",...r("partnerComments"),isTextarea:!0}),Bl(t),o(Pt,{link:l}),o(v,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex 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(Z,{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(Z,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]})})),ApplicationFormDeposit:An,ApplicationFormCredit:zn,ApplicationFormAcquiring:Vl,ApplicationFormGrantSupport:Wn,ApplicationFormIndividuals:qn,ApplicationFormFeedback:On,ApplicationFormAntiFraud:rn,ApplicationFormCorruption:hn,ApplicationFormSelfCollection:Qn,ApplicationFormUltraPremium:la},pa=d((({responseType:e})=>{const t="OK"===e;return c("div",{className:`flex items-center p-lg rounded-md space-x-m ${t?"bg-ok":"bg-fail"}`,children:[o(Z,{image:{icon:(t?"ResponseOKIcon":"ResponseFailIcon")?"ResponseOKIcon":"ResponseFailIcon",iconVersion:"normal"},width:"42",height:"42"}),c("div",{children:[o(v,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),o(Me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),xa={send:async function(e,t=!1){const l=t?"/api/v1/lead":"/api/v1/sendcorporatelead",{typeForm:n,region:a,phone:i="",email:r,birthday:s,inn:o,fullName:c,addressBranch:d,secondaryPhone:m="",bankEmpolee:h,applicationDate:u,...p}=e,x={typeForm:n,[t?"regionBranch":"region"]:a,[t?"phoneNumber":"phone"]:Nt(i),[t?"email":"mail"]:r,...t?{birthday:s}:{inn:o,fullName:c},..."FEEDBACK"===n?{}:{addressBranch:d,bankEmpolee:h,applicationDate:u,...wt(m)},...p};try{const e=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(x)});return e?.ok?await e.json():null}catch(e){return null}}},ga=d((e=>{const{className:t,formBlock:l,...a}=e,[r,s]=n(""),d=i((async(e,t=!1)=>{const l=ba(e),n=await xa.send(l,t)?"OK":"Fail";return s(n),n}),[]);return o(b,{className:t,defaultPadding:"p-6xl",...a,children:c("div",{className:"container max-w-[978px] space-y-lg",children:[l?.title?o(v,{headingType:"h3",title:l.title,className:"@xl:text-center"}):null,l?fa(l,d):null,r?o(pa,{responseType:r}):null]})})})),fa=(e,t)=>{const l=e?.formType;if(!l||!(l in ua))return null;return o(ua[l],{...e,onSubmit:t})},ba=e=>Object.fromEntries(Object.entries(e).map((([e,t])=>[e,(t?.region?t?.text:t?.key)||t]))),ya="text-center",va={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Na=d((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const r=String(n?.width||t);return a?o("div",{style:{width:`${r}px`,height:`${r}px`},className:g("rounded-icon object-fit flex justify-center items-center",va[l],e),children:o(U,{...i,width:"54%",height:"54%",name:a})}):null})),wa=d((({className:e="",title:t,benefitList:l,...n})=>c(b,{className:e,defaultPadding:"p-6xl",...n,children:[t?o(v,{headingType:"h3",as:"h2",className:ya,title:t}):null,l?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:l.map(ka)}):null]}))),ka=({label:e,description:t,items:l,icon:n,iconBgVersion:a,isDotted:i=!1},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[n?.icon?o(Na,{className:"shrink-0",defaultIconSize:44,iconBgVersion:a||"",...n}):null,n?.src?o(Z,{className:"shrink-0",image:n}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(v,{headingType:"h6",children:e}),o(Me,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),o(qe,{dotClassName:"bg-secondary-text",listItemSize:"S",items:l,isDotted:i})]}):null]},String(r)),Ca=e=>({icon:t,title:l,description:n},a)=>c("div",{className:g("flex flex-col gap-1","items-center",n||l?"":"justify-center"),children:[l?o(Me,{size:"text-h6",font:"font-normal",align:e,children:l}):null,t?o(Z,{image:t,height:"180",className:"w-auto mx-auto"}):null,n?o(Me,{size:"text-h6",font:"font-normal",align:e,children:n}):null]},String(a)),Sa=(e,t,l)=>o("div",{className:`grid gap-2xs ${Ia(t)}`,children:e.map(Ca(l))}),Ia=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},Ta=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>c(b,{className:g("space-y-3xl",l),defaultPadding:"p-6xl",...r,children:[o(k,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?Sa(e,n,t):null]}))),Ba={start:"justify-start",center:"justify-center",end:"justify-end"},Pa=d((({buttons:e,className:t="",align:l,...n})=>{const a=l?g("flex",Ba[l]):"";return o(b,{className:g("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:_e(e)})})),Ma=(e,t=0)=>{const{itemCount:l,visibleItemCount:a}=e,[r,s]=n(t),o=i((()=>s((e=>Math.min(e+1,l-1)))),[l]),c=i((()=>s((e=>Math.max(e-1,0)))),[l]),d=a?l>a&&r<l-a:r<l-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]},Va=d((({className:e,disabled:t,...l})=>o(he,{rounded:!0,className:g("group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black",t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main",e||""),disabled:t,...l,children:o(Z,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover/btn:text-primary-main",width:"16",height:"16"})}))),za=d((e=>o(Va,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Ra=d((e=>o(Va,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"})));function Da({dec:e,inc:t,canDec:l,canInc:n,btnClass:a,className:i=""}){return l||n?c("div",{children:[l?o(Va,{className:g("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?o(Va,{className:g("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const Aa=d((({className:e,title:t,value:l,fractionDigits:n,fixed:a,prefix:i,postfix:r})=>c("div",{className:g("flex justify-between @xl:flex-col",e),children:[t?o(Me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}):null,o("div",l?{children:o(Me,{size:"text-h3",children:[i,Ge(n,{fixed:a})(l),r].filter(Boolean).join(" ")})}:{children:o(Me,{size:"text-h3",children:"-"})})]}))),ja=1e4,Fa=5e6,$a=Math.round(29.5),La={minSum:ja,maxSum:Fa,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Ea={minSum:ja,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Oa={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},_a={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},Ua={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},Ha=e=>e?o(N,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null,Wa=d((({rate:e=0,title:t="Ставка",unit:l,fractionDigits:n=2,depositeName:a,isShowDepositeName:i})=>c("div",{children:[o(Me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}),c("div",{className:"relative",children:[c("div",{className:"flex justify-start gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge pr-xl -mt-m tracking-[-15px]",children:Ge(n,{fixed:!0})(e)}),l?o("span",{className:"text-7xl",children:l}):null]}),a&&i?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),Ka=d((({title:e="Ставка",isUnavailableByTerm:t=!1})=>c("div",{className:"space-y-s",children:[o(Me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(U,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:t?c(N,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",o("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):o(N,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),Xa=({title:e="Ставка",rate:t=0,unit:l="%",fractionDigits:n=2,isUnknownRateShown:a=!0,...i})=>a&&0===t?o(Ka,{title:e,...i}):c("div",{children:[o("div",{className:"hidden @xl:block",children:o(Wa,{title:e,rate:t,unit:l,fractionDigits:n,...i})}),o("div",{className:"@xl:hidden",children:o(Aa,{title:e,value:t,postfix:l,fractionDigits:n,fixed:!0,...i})})]});function qa({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${Ge(2)(l.min||0)} ₽`,`До ${Ge(2)(l.max||0)} ₽`];return o(In,{items:e?n:[],step:t,...l})}function Ga(e){const{data:t}=sl(`/wcms-resources/${e}.json`,ht);return t}const Ya=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,a=Ga(t||"bonus-calculator-data")||Oa,[i,r]=((e,t,l)=>{const{minSumTravel:n,minSumOther:a,maxBonus:i,prefMonthsNum:r,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===n&&l===a)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*l),i);return[m,m*r+Math.min(Math.round(c*t)+Math.round(d*l),i)*(12-r)]})(a,l,n);return{...a,...e,monthBonus:i,yearBonus:r}},Qa=d((({className:e="",sourceBookDir:t,buttons:l,footnote:n})=>{const[a,{field:i}]=Ct({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:r,maxSumTravel:s,minSumOther:d,maxSumOther:m,monthBonus:h,yearBonus:u}=Ya(a,t);return c("section",{className:g("flex flex-col justify-between @5xl:flex-row gap-y-4xl",e),children:[c("div",{className:"flex flex-col @xl:max-w-md gap-2xl border-b border-b-main-divider @xl:border-none pb-3xl @xl:pb-0",children:[qa({title:"Сумма покупок в категории путешествия, ₽",min:r,max:s,step:500,isShowItems:!1,...i("travelExpenseValue")}),qa({title:"Сумма покупок в остальных категориях, ₽",min:d,max:m,step:500,isShowItems:!1,...i("restExpenseValue")})]}),h>=0?Xa({title:"Баллов за месяц",rate:h,fractionDigits:0,isUnknownRateShown:!1,unit:""}):null,c("div",{className:"flex flex-col gap-y-xl @xl:w-96",children:[u>=0?o(Aa,{title:"Баллов за год",value:u}):null,_e(l,{isVertical:!0}),Ha(n)]})]})})),Za=d((({className:e,inputChildren:t,rateChildren:l,resultChildren:n})=>c("section",{className:g("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[o("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:t}),o("div",{className:"border-b border-main-divider md:hidden"}),l,o("div",{className:"flex flex-col gap-2xl sm:w-96 max-w-full",children:n})]}))),Ja=(e,t=0)=>e?.sum&&e.sum>=ja&&e.sum<=Fa?e.sum:t,ei=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,ti=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,li={horizontal:"gap-5xl",vertical:"flex-col gap-s"},ni=d((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>o("div",{className:g(`flex ${li[a]}`,l),children:e?.map((({id:e,text:l})=>o(Al,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),ai=({items:e,title:t,mobileTitle:l=t,orientation:n="horizontal",value:a,radioGroupClassName:i,onChange:r})=>c("div",{className:"space-y-s",children:[t?o("div",{className:"hidden @5xl:block",children:o(Me,{color:"text-secondary-text",font:"font-light",children:t})}):null,l?o("div",{className:"@5xl:hidden",children:o(Me,{color:"text-secondary-text",font:"font-light",children:l})}):null,o(ni,{orientation:n,items:e,checkedItem:e[a?0:1].id,className:g("flex-col sm:flex-row",i),onChange:t=>r&&r(t===e[0].id)})]}),ii=e=>ai({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),ri=e=>e,si=(e=ri)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),oi=si(),ci=(e=ri)=>si((t=>-e(t))),di=ci(),mi=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:hi([e,t],n),hi=([e,t],l=[])=>({[e]:l.length?di(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?oi(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),ui=(e,[t,l],n)=>e>=n[t]&&e<=n[l],pi=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,xi=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,daysValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a/30)-n):Math.round(n*e*a/365/100)},gi=d((({className:e="",rateParams:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:i,defaultParams:r})=>{const[s,{field:d}]=Ct({moneyValue:Ja(r,1e5),daysValue:ei(r,90),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),m=((e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=Ga(t||"business-calculator-data"),o=i||a,c=l<90||l>730;if(l<=30)return{...Ua,...e,isDisabledOperatingDeposit:c,isUnavailableByTerm:!0};const d=s?.rateRows?.find((e=>r===e.isMonthlyInterestPayment&&pi(o,e)&&ui(n,["minSum","maxSum"],e)&&ui(l,["minDays","maxDays"],e)))||Ua,{rate:m}=d,h=xi(m,e),u=n+h,p=s?.rateRows||[Ua];return{...d,...hi(["minSum","maxSum"],p),...hi(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:c,income:h,finalSum:u}})(s,t?.rateType&&t.sourceBookDir),{income:h,finalSum:u,rate:p,isUnavailableByTerm:x,depositeName:g}=m;return o(Za,{className:e,inputChildren:c("div",{children:[qa({title:"Сумма, ₽",min:m.minSum,max:m.maxSum,...d("moneyValue"),value:m.moneyValue}),(f={title:"Срок, дней",min:m.minDays,max:m.maxDays,...d("daysValue"),value:m.daysValue},o(In,{items:[`От ${ti(f.min||0)}`,`До ${ti(f.max||0)}`],step:1,...f})),c("div",{className:"flex flex-col sm:flex-row gap-y-4 gap-x-14",children:[fi(m,d),ii({title:"Выплата процентов",orientation:"vertical",...d("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]})]}),rateChildren:Xa({rate:p,depositeName:g,isShowDepositeName:i,isUnavailableByTerm:x}),resultChildren:c("div",{children:[bi(u,h),_e(l,{isVertical:!0}),Ha(n),Ha(a)]})});var f})),fi=(e,t)=>c("div",{className:"space-y-s",children:[o(Me,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[o(Al,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Al,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),bi=(e,t)=>c("div",{className:"flex flex-col gap-2xl sm:gap-0 mb-lg",children:[o(Aa,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),o(Aa,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),yi=({min:e=0,max:t=0,availableMonths:l,...n})=>o(In,{items:[`От ${vi(e)}`,`До ${vi(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),vi=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Ni=e=>ai({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),wi=e=>ki({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&ki({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&ki({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&ki({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),ki=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Ci=(e,t)=>{const{isAnnuity:l,moneyValue:n,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(l){const t=e/1200;return i?(n+i)*(t+t/(Math.pow(1+t,a)-1)):n*(t+t/(Math.pow(1+t,a)-1))}return Math.round(n/a)+n*(e/1200)},Si=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=Ga(t||"credit-calculator-data"),s=i?.rateRows||[La],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>wi({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:i?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=mi(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=mi(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>wi({row:e,userInputParams:t,paramsViewSettings:l})&&ui(n,["minSum","maxSum"],e)&&ui(a,["minMonths","maxMonths"],e)))||La)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:p}=u,x=Ci(p,e);return r((()=>({...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,monthlyPayment:x})),[e,i])},Ii=d((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a,defaultParams:i})=>{const[r,{field:s}]=Ct({moneyValue:Ja(i,2e5),monthsValue:ei(i,$a),isAnnuity:Boolean(i?.isAnnuity),isInsurance:Boolean(i?.isEnableInsurance),isSalaryClient:Boolean(i?.isEnableSalaryClient),isPensionClient:Boolean(i?.isEnablePensionClient),isStateEmployee:Boolean(i?.isEnableStateEmployee)}),d=Si(r,t,a),m=Ni({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...s("isAnnuity")});return o(Za,{className:e,inputChildren:c("div",{children:[qa({title:"Сумма кредита, ₽",step:500,min:d.minSum,max:d.maxSum,...s("moneyValue"),value:d.moneyValue}),yi({title:"Срок кредита, месяцев",min:d.minMonths,max:d.maxMonths,...s("monthsValue"),value:d.monthsValue}),Ti({...d,...a},s),o("div",{className:"sm:hidden",children:m})]}),rateChildren:Xa({rate:d.rate}),resultChildren:c("div",{children:[o(Aa,{title:"Ежемесячный платёж",value:d.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:m}),_e(l,{isVertical:!0}),Ha(n)]})})})),Ti=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(Al,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(Al,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(Al,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(Al,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Bi=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let l=1;for(;l<t.length;){const[e,n]=t[l-1],[a,i]=t[l];n>=a?t.splice(l-1,2,[e,Math.max(n,i)]):l++}return t},Pi=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=Ga(t||"deposit-calculator-data"),r=i?.rateRows?.[0]?zi(i.rateRows[0].minMonths,i.rateRows[0].maxMonths):0,s=!l?.isShowMonthlyInterestPayment,o=!l?.isShowRemoteRegistration,c=i?.rateRows?.find((t=>Vi({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:s})&&Vi({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:o})&&ui(n,["minSum","maxSum"],t)&&ui(a||r,["minMonths","maxMonths"],t)))||_a,{rate:d}=c,m=Mi(d,e),h=n+m,u=i?.rateRows||[_a];return{...c,...hi(["minSum","maxSum"],u),...hi(["minMonths","maxMonths"],u),availableMonths:Bi(u.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,l=1)=>Array.from({length:Math.abs(t-e)/l+1},((n,a)=>t>=e?e+a*l:e-a*l)))(e,t))),...e,defaultMonth:r,income:m,finalSum:h}},Mi=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,monthsValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a)-n):Math.round(n*e*30*a/365/100)},Vi=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],zi=(e,t)=>e+Math.round((t-e)/2),Ri=d((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:i,defaultParams:r})=>{const[s,{field:d}]=Ct({moneyValue:Ja(r,2e4),monthsValue:ei(r),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(r?.isRemoteRegistration)}),m=Pi(s,t,i),{defaultMonth:h,rate:u,income:p,finalSum:x}=m,{onChange:g}=d("monthsValue");return a((()=>{!s.monthsValue&&g&&g(h)}),[h]),o(Za,{className:e,inputChildren:c("div",{children:[qa({title:"Сумма, ₽",min:m.minSum,max:m.maxSum,...d("moneyValue"),value:m.moneyValue}),yi({title:"Срок, месяцев",min:m.minMonths,max:m.maxMonths,availableMonths:m.availableMonths,...d("monthsValue"),value:m.monthsValue}),Di({...m,...i},d)]}),rateChildren:Xa({rate:u}),resultChildren:c("div",{children:[o(Aa,{title:"Доход в конце срока",value:p,postfix:"₽",prefix:"+"}),o(Aa,{title:"Сумма в конце срока",value:x,postfix:"₽"}),_e(l,{isVertical:!0}),Ha(n)]})})})),Di=(e,t)=>{return c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?ii({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},ai({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},Ai=e=>ji({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&ji({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),ji=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Fi=(e,t,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}=e,o=Ga(t||"refinancing-calculator-data"),c=o?.rateRows||[Ea],d=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Ai({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:o?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:m,maxSum:h}=mi(["minSum","maxSum"],d,c),{minMonths:u,maxMonths:p}=mi(["minMonths","maxMonths"],d,c),x=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>Ai({row:e,userInputParams:t,paramsViewSettings:l})&&ui(n+r,["minSum","maxSum"],e)&&ui(i,["minSumOld","maxSumOld"],e)&&ui(r,["minSumExtra","maxSumExtra"],e)&&ui(a,["minMonths","maxMonths"],e)))||Ea)({rateRows:c,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}),{rate:g}=x,f=Ci(g,e),b=e.oldMonthlyPayment-f;return r((()=>({...x,...e,minSum:m,maxSum:h,minMonths:u,maxMonths:p,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s,monthlyPayment:f,benefit:b})),[e,o])},$i=d((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[i,{field:r}]=Ct({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),s=Fi(i,t,a),d=Ni({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...r("isAnnuity")});return o(Za,{className:e,inputChildren:c("div",{children:[qa({title:"Остаток долга в других банках, ₽ ",step:500,min:s.minSum,max:s.maxSum-s.maxSumExtra,...r("moneyValue"),value:s.moneyValue}),qa({title:"Ежемесячный платёж в других банках, ₽",step:500,min:s.minSumOld,max:s.maxSumOld,...r("oldMonthlyPayment"),value:s.oldMonthlyPayment}),yi({title:"Новый срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...r("monthsValue"),value:s.monthsValue}),Li({...s,...a},r),s.isExtraMoney?qa({title:"Дополнительная сумма, ₽ ",step:500,min:s.minSumExtra,max:s.maxSumExtra,...r("moneyExtra"),value:s.moneyExtra}):null,o("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:d})]}),rateChildren:Xa({rate:s.rate,fractionDigits:1}),resultChildren:c("div",{children:[o(Aa,{title:"Ежемесячный платёж",value:s.monthlyPayment,postfix:"₽"}),s.benefit>0?o(Aa,{title:"Выгода в месяц",value:s.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:d}),_e(l,{isVertical:!0}),Ha(n)]})})})),Li=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(Al,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(Al,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(Al,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),Ei={CreditCalculatorForm:Ii,DepositCalculatorForm:Ri,BusinessDepositCalculatorForm:gi,BonusCalculatorForm:Qa,RefinancingCalculatorForm:$i},Oi=(e,t)=>{const l=e?.calcType;if(!l||!(l in Ei))return null;const n=Ei[l];return o("section",{className:"box-border relative bg-white flex shrink-0 self-start basis-full",role:"listitem",children:c("div",{className:"box-border p-4xl w-full space-y-xl",children:[e?.title?o(v,{className:"text-center",title:e.title}):null,o(n,{...e})]})},String(t))},_i=d((({className:e="",tabAlign:t,calculatorTabs:l=[],...a})=>{const r=l.map((e=>e.nav||{})),s=l.map((({calculatorBlock:e})=>e||{})),[d,m]=n(0),h=i((e=>m(e)),[]),[u,p]=Ma({itemCount:l?.length,visibleItemCount:3});return c(b,{className:g("box-border overflow-hidden relative",e),defaultPadding:"p-0",...a,children:[c("div",{className:"bg-white",children:[r.length>1?Ui({activeIndex:u,tabsNav:r,tabAlign:t,slideIndexShift:d,onClick:h}):null,Da({...p,btnClass:["left-3","right-3"],className:"top-10"})]}),o("div",{className:"flex",style:{transform:`translateX(-${d}00%)`},role:"list",children:s?.length?s.map(Oi):null})]})}));function Ui({activeIndex:e,tabsNav:t,tabAlign:l,slideIndexShift:n,onClick:a}){return c("div",{children:[o("div",{style:{transform:`translateX(-${388*e}px)`},className:"flex flex-col justify-end items-center h-32 pt-4xl box-border duration-1000",children:o("div",{className:g("w-full flex flex-nowrap items-end gap-xs",l?Ba[l]:""),children:t.map(((e,t)=>function({tab:e,i:t,isActive:l,onClick:n}){const a=l?"w-96 p-m border-none bg-primary-main text-white":"w-96 p-s ease-in duration-300 bg-white text-primary-text",i=l?"text-xl mb-xs":"text-l mb-2xs",r=l?"text-l font-light text-white":"text-m font-light text-secondary-text",s=l?"":"text-primary-main",d=e?.icon?.iconVersion,m=l?"white":"normal";return c("button",{type:"button",onClick:n,"aria-label":e?.title,className:g("box-border relative border border-gray cursor-pointer text-left border-b-0 flex space-x-m min-h-20",a),children:[o(Z,{className:g("h-6 w-6 min-w-6 min-h-6",s),image:{...e?.icon,iconVersion:d??m},width:"24",height:"24"}),c("div",{className:"border-0",children:[o("div",{className:i,children:e?.title}),o("div",{className:r,children:e.description})]})]},String(t))}({tab:e,i:t,isActive:Boolean(t===n),onClick:()=>a(t)})))})}),o("div",{className:"w-full h-2 bg-primary-main"})]})}const Hi=d((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=vn(e,{normalize:(e=a)=>l&&n?String(Nn(Number(Wi(e)),l,n)):Wi(e),format:Ge(r)}),d=i((e=>t&&t(Wi(e))),[t]);return o(At,{onChange:d,...s,...c})})),Wi=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Ki=d((e=>o(Hi,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Me,{size:"text-xl",font:"font-light",children:"₽"})})}))),Xi={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},qi={amount:1500},Gi=d((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:i="1500",button:r,formType:s="private",...d})=>{const[{amount:m},{field:h}]=Ct(qi),[u,p]=n(!1);return a((()=>{p(m<=0)}),[m]),c(b,{className:g("flex flex-col items-center",e),defaultPadding:"p-6xl",...d,children:[t?o(v,{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",action:Xi[s],children:[o(Ki,{valid:!u,placeholder:i,label:l,...h("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:m}),r?.text?o(Tl,{className:"w-full mt-lg",type:"submit",disabled:u,children:r.text}):null]})]})})),Yi=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function Qi(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=r((()=>({threshold:Zi(t),root:l?.current})),[t,l?.current]);return a((()=>{if(!n.current)return;const t=new IntersectionObserver(e,i);return t.observe(n.current),()=>{t.disconnect()}}),[e,i]),n}function Zi(e=0){const t=Math.round(10*e);return Array.from({length:t}).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const Ji=d((({className:e,style:t,idx:l,activeIndex:n,observerOptions:a,children:r,onIntersection:s})=>{const c=Qi(i((e=>{e.length&&s&&s(l||0,e[e.length-1])}),[s,l]),a);return o("div",{className:g("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(l===n),ref:c,children:r})})),er=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],tr=d((({className:e,itemClassName:t,containerRef:l,activeIndex:n,visibleItemCount:a=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:h,children:u,onVisibleItemsChange:p,onVisibleIndicesChange:x})=>{const f={sensitivity:1,rootRef:l},b=s([]),y=i(((e,t)=>{const l=[...b.current||[]];l[e]=t,b.current=l,p&&p(l),x&&x(nr(l))}),[p,x]),v=a>0?r*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?lr(c,v):{},...N?Yi(h):{},gap:`${r}px`};return o("div",{className:g("box-border overflow-auto no-scrollbar",d,e),style:k,ref:l,children:(C=(e,l)=>o(Ji,{className:g(m,a?er[a-1]:"",N?"h-full":"",t),style:w?lr(c/4):{},activeIndex:n,idx:l,observerOptions:f,onIntersection:y,children:e},String(l)),e=>null==e?e:Array.isArray(e)?e.map(C):C(e,0))(u)});var C})),lr=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),nr=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),ar={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},ir={"horizontal-list":"w-6","vertical-list":"h-6"},rr=d((({className:e="",containerRef:t,activeIndex:l,dotCount:n=0,listType:a="horizontal-list",version:i})=>n?o("div",{className:g("flex gap-xs",ar[a],i?"group":"",e),"data-ver":i,children:Array.from({length:n}).fill(null).map(((e,n)=>o("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${n===l?ir[a]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(e=>{e!==l&&t?.current&&t.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(n)},String(n))))}):null)),sr=e=>t=>e.scrollWidth/t,or=e=>(t,l)=>{e.scrollBy({left:l*sr(e)(t),behavior:"smooth"})},cr=({itemCount:e,onVisibleIndicesChange:t})=>{const l=s(null),[a,r]=n([]),o=i((e=>{r((t=>{return(l=t)===(n=e)||Boolean(l&&n&&l?.length===n?.length&&l.every(((e,t)=>e===n[t])))?t:e;var l,n})),t&&t(e)}),[e]),[c,d]=a.length?[ci()(a),si()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?or(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?or(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),x=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{l?.current&&l.current.children[e]?.scrollIntoView(t)}),[l]);return[l,{scrollLeft:u,scrollRight:p,scrollTo:x,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},dr="absolute top-[calc(50%-24px)] z-40",mr="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",hr=d((({scroll:e,activeIndex:t,itemCount:l,arrowsPadded:n,hasEdgeBlocks:a,onScrollLeft:r,onScrollRight:s})=>{const{canScrollLeft:d,canScrollRight:m,scrollLeft:h,scrollRight:u}=e,p=a?t>0:d,x=a?t<l-1:m,f=i((()=>{a?(d&&t!==l-1&&h(),r()):h()}),[h,r,a,d,t,l]),b=i((()=>{a?(m&&0!==t&&u(),s()):u()}),[u,s,a,d,t,l]);return c("div",{className:"hidden @lg:block",children:[ur(e),p?o(za,{className:g(dr,n?"left-1 @lg:left-8":"left-0"),onClick:f}):null,x?o(Ra,{className:g(dr,n?"right-1 @lg:right-8":"right-0"),onClick:b}):null]})})),ur=e=>c("div",{children:[e.canScrollLeft?o("div",{className:g(mr,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:g(mr,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),pr=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",xr=({className:e,text:t="ХИТ"}={})=>c("div",{className:g("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(U,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(N,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),gr="relative h-full",fr={small:"sm:min-w-64",normal:"sm:min-w-96",big:"sm:min-w-[515px]"},br=({noCardBorder:e,activeIndex:t,cardSize:l="normal",...n})=>{const{blocks:a}=n.block||{},i=a?.some(Nr);return P({...n,renderProps:(n,a,r)=>c("div",{className:yr(n,{someCardsHighlighted:i}),children:[I(n,a,{className:vr(n,{someCardsHighlighted:i,showBorder:!e,cardSize:l}),blockIndex:r,isActive:r===t}),Nr(n)?xr({className:"absolute top-0 -right-4 z-40"}):null]},String(r))})},yr=(e,{someCardsHighlighted:t})=>g(gr,t&&(Nr(e)?"pt-3xl":"pt-3xl sm:pt-16")),vr=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>g(gr,"min-w-80",fr[n],t&&(Nr(e)?"pt-3xl sm:pt-16":"pt-3xl"),pr(l),l&&"h-full"),Nr=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,wr=ft((({className:e,itemCount:t,visibleItemCount:l=1,noCardBorder:n,isAlignCenter:a,arrowsPadded:i=!0,isGap:r=!0,cardSize:s="normal",...d})=>{const{blocks:m=[]}=d.block||{},h=t||m?.length,[u,{inc:p,dec:x}]=Ma({itemCount:h,visibleItemCount:l},Math.floor(l/2)),[f,y]=cr({itemCount:h}),[v]=y.visibleIndicesRange,N=m&&"CarouselBankHistoryCard"===m[0]?.type;return c(b,{className:e,defaultPadding:"p-6xl",...d,children:[c("div",{className:g(a?"flex justify-center":"","relative max-w-full"),children:[o(tr,{containerRef:f,visibleItemCount:l,snapAlign:"snap-start",gap:r?16:void 0,onVisibleIndicesChange:y.handleVisibleIndicesChange,children:br({noCardBorder:n,activeIndex:u,cardSize:s,...d})}),o(hr,{scroll:y,arrowsPadded:i,onScrollLeft:x,onScrollRight:p,hasEdgeBlocks:N,activeIndex:u,itemCount:h})]}),o(rr,{className:"@5xl:hidden",containerRef:f,activeIndex:v,dotCount:h,listType:"horizontal-list"})]})}),{childrenTypes:["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),kr=d((({className:e,title:t,description:l,blockIndex:n=0,isActive:a,...i})=>o(b,{className:g("relative flex h-[485px]",a?"w-[440px] z-10":"w-[340px]",e),defaultPadding:"p-0",...i,children:o("div",{className:g("basis-full self-center",Cr(n)),children:a?o(k,{headlineVersion:"M",title:t,description:l,padding:"p-3xl",align:"text-left",className:"h-96 text-white shadow-dark-blue"}):o("div",{className:"h-[300px] flex justify-center items-center font-mohave text-title-large",children:o("span",{className:Sr(n),children:t})})})}))),Cr=e=>["bg-primary-main","bg-green-light","bg-yellow-light"][e%3],Sr=e=>["gradient-color-text-on-green","gradient-color-text-on-yellow","gradient-color-text-on-yellow"][e%3],Ir="z-10 border border-solid w-full h-full",Tr=g(Ir,"absolute hidden @xl:block border-transparent"),Br=d((({className:e,title:t,description:l,button:n,...a})=>o(b,{className:g("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:g(Tr,"top-9 right-12 bg-green-dark")}),o("div",{className:g(Tr,"top-6 right-8 bg-green")}),o("div",{className:g(Tr,"top-3 right-4 bg-green-light")}),c("div",{className:g(Ir,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(k,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),_e([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Pr={black:"bg-black",white:"bg-white"},Mr=d((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r=[],align:s="text-left",padding:d,...m})=>o(b,{className:g("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(fe,{className:"h-full",padding:d,title:o(k,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:n?.src?o(Z,{className:"flex justify-center align-center mb-xl",image:n}):null,buttons:_e([i],{buttonClassName:"w-full self-end"}),children:[r?.length?c("div",{className:"flex text-secondary-text mb-m",children:[o("div",{className:"mr-xs",children:o(Me,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Vr)]}):null,a?c(Me,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),Vr=(e,t)=>o("div",{role:"figure",className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Pr[e]}`},String(t)),zr="hidden xl:block absolute w-full h-full border border-white",Rr=d((({className:e="",...t})=>{const l=se(),{text:n,href:a,target:i,onClick:r}=l(t);return n?o("div",{className:g("flex relative group/link pl-s pb-s min-w-64 xl:min-w-72",e),children:c("div",{className:"relative min-h-16 w-full",children:[c("a",{className:g("absolute border\n bg-white flex justify-between group-hover/link:text-primary-main","rounded-md lg:rounded-none w-full p-lg whitespace-nowrap z-10"),role:"link",href:a,target:i,onClick:r,children:[o(Me,{size:"text-l",font:"font-light",color:"text-primary-text",children:n}),o(Z,{className:"group-hover/link:brightness-100 hidden xl:block ml-2xs",image:{icon:"ArrowRightIcon",iconVersion:"black"},imageClassName:"group-hover/link:text-primary-main hidden xl:block",width:"24",height:"24"})]}),o("div",{className:g(zr,"-bottom-1.5 -left-1.5")}),o("div",{className:g(zr,"-bottom-3 -left-3")})]})}):null})),Dr=d((({className:e,additionalDescription:t,description:l,links:n,title:a,...i})=>o(b,{className:g("overflow-hidden",e),...i,children:c("div",{className:"flex flex-col @6xl:flex-row gap-m",children:[c("div",{children:[o(k,{isEmbedded:!0,title:a,description:l,as:"h1",align:"text-left"}),o(k,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),n?.length?Ar(n,"@6xl:min-w-[672px] p-0 justify-self-end"):null]})}))),Ar=(e,t="")=>{const l=Math.ceil(e.length/10);return o(wr,{className:t,version:"secondary",itemCount:l,arrowsPadded:!1,padding:"p-0",children:Array.from({length:l}).fill(null).map(((t,l)=>o("div",{className:g("flex flex-wrap gap-2xs self-start xl:justify-center @5xl:grid @5xl:grid-cols-2"),children:e.slice(10*l,10*(l+1)).map(((e,t)=>o(Rr,{...e},String(t))))},String(l))))})},jr=d((({className:e="",href:t,target:l,isRemote:n=!1,children:a})=>{const i=se({isRemote:n})({href:t,target:l});return o(t?"a":"div",{className:g("block",e),...t?i:{},children:a})})),Fr=[{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:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}}],$r=d((({className:e="",media:t,showButtonText:l,stretched:a,version:i="white",children:r})=>{const[s,d]=n(),m=t?.map((e=>{const{href:t,icon:n,text:a}=e,{iconMapped:r}=(e=>Fr.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=Oe(n)?n:r,c=l?{text:a}:{text:""};return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:"color"},version:e?.version??i}})),h=g("border border-solid hover:border-transparent group-data-primary:border-main-divider border-main-divider group-data-gray:border-green group/media",l&&s?"":"basis-auto",a?"flex-1 justify-center":"");return c("div",{className:g("flex flex-col gap-xs",e),children:[o("div",{className:"flex gap-xs",children:_e(m,{className:g(a||s?"basis-full":""),buttonClassName:h})}),r?o(Me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),Lr=d((({className:e,padding:t,description:l,additionalDescription:n,href:a,icon:i,items:r=[],isDotted:s,socialMedia:d=[],target:m,title:h,align:u="text-left",benefits:p,imageOptions:{directionRight:x=!0,isImageAlwaysOnRight:f=true,isImageSecondary:y=!1}={},...v})=>o(b,{className:g("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...v,children:o(jr,{href:a,target:m,className:"h-full",children:c(fe,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(k,{title:h,description:l,headlineVersion:"XS",isEmbedded:!0,align:u}),...lt(Oe(i)?o(Z,{image:i}):null,x),buttons:d.length?o($r,{media:d,showButtonText:!0,version:v?.version}):null,isImageAlwaysOnRight:f,isImageSecondary:y,imageAlign:"center",children:[o(Ee,{benefits:p}),o(qe,{items:r,isDotted:s,listItemSize:"S"}),Er(n,u)]})})}))),Er=(e,t)=>e?o(N,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,Or=d((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=n(l),d=i((()=>{o((e=>!e))}),[]),m=a({isUnfolded:s,onToggle:d}),h=r?r({isUnfolded:s,onToggle:d}):null;return c("div",t?{className:e,children:[h,m]}:{className:e,children:[m,h]})}));const _r=d((({className:e="",isUnfolded:t,children:l})=>{const n=s(null),i=function(e,t){const l=s(null);return a((()=>{const t=l?.current;if(!t)return;const n=new ResizeObserver((l=>{e(t,l[0])}));return n.observe(t),()=>{n.disconnect()}}),[e,...t]),l}((e=>{n.current&&(n.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} `,children:o("div",{className:e,ref:i,children:l})})})),Ur=(e,t)=>{const{title:l,description:n,buttons:a}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[l?o("div",{className:"opacity-80",children:o(Me,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?o("div",{className:"mt-2xs",children:o(Me,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?o("div",{className:"text-primary-main",children:_e(a)}):null]},String(t))},Hr=d((({className:e="",title:t,align:l="text-center",icon:n,button:a,visibleCellsCount:i=1,cardCells:r=[],...s})=>{const d=r.map(Ur),[m,h]=i>0?[d.slice(0,i),d.slice(i)]:[d,[]];return c(b,{className:g("flex flex-col",e),defaultPadding:"p-2xl",...s,children:[Oe(n)?o("div",{className:"self-center",children:o(Z,{image:n})}):null,t?o(v,{className:g("pt-xs",l),headingType:"h5",title:t}):null,a?.text?o(he,{className:"w-full mt-m mb-lg",...a}):null,h.length?o(Or,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[m,o(_r,{isUnfolded:e,children:h})]}),renderFoldButton:r.length>1?Wr:null}):o("div",{children:m})]})})),Wr=({isUnfolded:e,onToggle:t})=>c("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:t,children:[o("div",{children:e?"Скрыть":"Подробнее о тарифе"}),o(U,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),Kr="bg-gradient-to-r from-main-gradient-start to-main-gradient-end",Xr="border-gray border-solid border",qr="border-main-divider border-b",Gr="w-52",Yr=d((({icon:e,image:t,title:l,link:n})=>c("div",{className:g("w-80 box-border flex flex-col gap-m items-center rounded-t-md border-b-0 p-2xl",Xr,Kr),role:"columnheader",children:[e&&!t?.src&&o(Z,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}),t?.src&&o(Z,{image:t}),l?o(v,{headingType:"h4",as:"h3",className:"text-center text-white",title:l}):null,n?.text&&o("div",{className:"mt-auto w-full",children:o(he,{href:n.href,target:n.target||"",className:"w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active",children:o("div",{className:"py-s",children:o(N,{size:"text-xs",font:"font-medium",children:n.text})})})})]}))),Qr={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},Zr=d((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:Qr[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),Jr=d((({children:e})=>o("div",{className:"self-start flex flex-col",role:"row",children:o("div",{className:"flex gap-xl",children:e})}))),es=d((({colHeaders:e,activeIndex:t})=>c(Jr,{children:[o("div",{className:Gr,role:"columnheader"}),o(Zr,{activeIndex:t,columnWidth:336,children:e.map(((e,t)=>o(Yr,{...e},String(t))))})]}))),ts=d((({cell:e,isFirstRow:t,isLastRow:l,isFillGradient:n})=>{const a=g("w-80 box-border flex flex-col",Xr,l?"border-t-0 rounded-b-md":"border-y-0",n?Kr:""),i=g("mx-2xl h-full",qr,n&&t?"border-t":"",l?"border-b-0":"border-solid");return o("div",{className:a,role:"cell",children:o("div",{className:i,children:e?e.map(((e,t)=>as(e,t,n))):null})})})),ls=(e=!1)=>"text-xl m-0 "+(e?"text-white":""),ns=(e=!1)=>"text-s opacity-80 "+(e?"text-white":"text-secondary-text"),as=({label:e,description:t},l,n)=>c("div",{className:"first:pt-2xl pt-xl last:pb-2xl",children:[e?o("h4",{className:ls(n),children:e}):null,t?o("div",{className:ns(n),children:t}):null]},String(l)),is=(e=!1)=>g("py-2xl",qr,Gr,e?"border-b-0":"border-solid"),rs=d((({row:{header:e,data:t},activeIndex:l,isColoredFirstColumn:n,isFirstRow:a,isLastRow:i})=>c(Jr,{children:[e?.title?o("div",{className:is(i),children:o(N,{size:"text-s",children:e.title})}):null,t?.length?o(Zr,{activeIndex:l,columnWidth:336,children:t.map(((e,t)=>o(ts,{cell:e,isFirstRow:a,isLastRow:i,isFillGradient:n&&0===t},String(t))))}):null]}))),ss=d((({rowData:e,isColoredFirstColumn:t,activeIndex:l,controls:n})=>{const{isScrollAvailable:a}=n;return c("div",{className:"relative",children:[e.map(((e,n,{length:a})=>o(rs,{row:e,isFirstRow:0===n,isLastRow:n+1===a,activeIndex:l,isColoredFirstColumn:t},String(n)))),a?Da({...n,btnClass:["top-28","top-12"],className:"right-7",isDisabled:!0}):null]})})),os=d((({columns:e=[],rowHeaders:t,isShowAllRow:l,visibleRowLength:n,isColoredFirstColumn:a})=>{const i=e?.map((({header:e})=>e||{})),r=e?.map((({data:e})=>e))||[],s=t?.map(((e,t)=>({header:e,data:r.map((e=>e?.[t]||[{}]))}))).slice(0,l?t.length:n),[d,m]=Ma({itemCount:e.length,visibleItemCount:3}),{isScrollAvailable:h}=m;return c("div",{children:[c("div",{role:"table",children:[i?.length?o(es,{colHeaders:i,activeIndex:d}):null,s?.length?o(ss,{rowData:s,isColoredFirstColumn:a,activeIndex:d,controls:m}):null]}),h?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),cs=d((({className:e="",title:t,rowHeaders:l,columns:a,visibleRowLength:r=0,isColoredFirstColumn:s=!1,...d})=>{const[m,h]=n(!r),u=i((()=>h((e=>!e))),[]);return c(b,{className:g("overflow-hidden relative",e),defaultPadding:"p-6xl",...d,children:[o(v,{headingType:"h2",className:"text-center mb-4xl mx-auto",title:t}),o(os,{columns:a,rowHeaders:l,isShowAllRow:m,isColoredFirstColumn:s,visibleRowLength:r}),r?ds({isShowAllRow:m,onClick:u}):null]})})),ds=({isShowAllRow:e,onClick:t})=>o("div",{className:"pr-6xl",children:c("div",{className:"flex gap-m w-full",children:[o("div",{className:Gr}),o("button",{onClick:t,className:"py-xs flex-1 border-gray border-solid border text-primary-text bg-white hover:border-primary-main hover:text-primary-main",children:o(Me,{size:"text-xs",font:"font-medium",children:e?"Скрыть":"Показать все параметры"})})]})}),ms=d((({className:e,contacts:t,info:l,version:n="secondary",...a})=>c(b,{className:g("flex",e),defaultPadding:"p-6xl",version:n,...a,children:[l?.length?hs(l):null,t?.length?hs(t):null]}))),hs=e=>o("div",{className:"flex gap-5xl grow basis-0",children:e.map(((e,t)=>us({column:e,index:t})))}),us=({column:e,index:t})=>e?o("div",{className:"flex flex-col gap-xl grow basis-0",children:e.map((({title:e="",description:t,additionalDescription:l,button:n},a)=>c("div",{children:[o(k,{title:e,description:t,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),l?o("div",{className:"mt-xs opacity-80",children:o(N,{size:"text-m",font:"font-light",children:l})}):null,n?.href?o(he,{className:"mt-xl",...n}):null]},String(a))))},`col-${String(t)}`):null,ps=e=>e%2!=0,xs=d((({textNode:e,iconNode:t,tag:l,onClick:n,justifyContent:a="between",className:i,...r})=>c(l,{tag:l,className:g("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:n,...r,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),gs=d((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>o(xs,{tag:"button",onClick:i,disabled:a,"data-theme":n,justifyContent:"center",className:g("py-4 border border-transparent outline-none focus:border-primary-text space-x-s",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:o(Me,{size:"text-h4",children:t}),iconNode:l?o(Z,{image:{icon:l,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),fs=({isUnfolded:e,onToggle:t})=>o(gs,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),bs=d((({title:e,description:t})=>c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(Z,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(k,{title:e,description:t,headlineVersion:"S",isEmbedded:!0,align:ya})]}))),ys=["ArrowDownIcon","ArrowUpIcon"],vs="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs border-box",Ns=d((({label:e="",blocksToRender:t=[],topItemsCount:l=0,block:n,notFound:a,...i})=>{const[r,s]=l>0?[t.slice(0,l),t.slice(l)]:[t,[]];return c("div",{children:[o("div",{className:g(t.length?"hidden":"block"),children:a?o(bs,{...a}):null}),c("div",{className:g("space-y-2xs",t.length?"":"hidden"),children:[c("div",{className:g(vs),children:[B(r,{...i.options,parent:n}),ps(r.length)?o(yt,{className:"col-span-6"}):null]}),o(Or,{renderFoldableSection:({isUnfolded:e})=>c(_r,{className:g(vs),isUnfolded:e,children:[B(s,{...i.options,parent:n}),ps(s.length)?o(yt,{className:"col-span-6"}):null]}),renderFoldButton:({isUnfolded:t,onToggle:n})=>o(gs,{className:g(l<1?"hidden":""),disabled:!s?.length,label:e,icon:ys[Number(t)],dataTheme:i.options?.page?.colorPalette,onClick:n})})]})]})})),ws=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,ks=(e,t)=>Object.entries(e).map((([l,n])=>"number"==typeof n?Array.isArray(t[l])?((e,t)=>l=>ws(t[e])||ws(l[e])||l[e]?.includes(t[e]))(l,e):((e,t)=>l=>ws(t[e])||ws(l[e])||Cs(t[e])<=Cs(l[e]))(l,e):"object"==typeof n&&"min"in n&&"max"in n?((e,t)=>l=>ws(t[e])||ws(l[e])||Cs(t[e]?.min)>=Cs(l[e]?.min)&&Cs(t[e]?.min)<=Cs(l[e]?.max))(l,e):Array.isArray(n)?((e,t)=>l=>ws(t[e])||ws(l[e])||t[e]?.every((t=>l[e]?.includes(t))))(l,e):((e,t)=>l=>ws(t[e])||ws(l[e])||t[e]===l[e])(l,e))).every((e=>e(t))),Cs=e=>Number(e||0),Ss=(e,t)=>(l=kt)=>e&&e.filter((e=>ks(t,l(e.content||{})))),Is=d((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>o(St,{text:l?.title,value:[e].flatMap((e=>e)).includes(l.value),onChange:()=>(l=>{if(!t)return;const a=e?.includes(l);t(n?a?(e||[]).filter((e=>e!==l)):[...e||[],l]:a?[]:[l])})(l.value),type:n?"checkbox":"radio"},l.value))))),Ts=({field:e,reset:t,filtrationSchema:l,resetButton:n,children: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-5xl",children:[a,Object.entries(l).map(Bs(e))]}),n?o("div",{children:o(Tl,{className:"w-full @4xl:w-72 @4xl:ml-s",onClick:t,children:n?.text})}):null]}),Bs=e=>([t,l])=>{const n=l?.type;return"array"===n?Ps(t,e)(l):null},Ps=(e,t)=>l=>{const n=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return c("div",{children:[l?.title?o("div",{className:"mb-m",children:o(Me,{size:"text-m",font:"font-light",color:"text-secondary-text",children:l.title})}):null,o(Is,{items:n,multiple:!l?.single,...t(e)})]},e)},Ms=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,Vs=(e,t)=>Array.from({length:t-e+1},((t,l)=>e+l)),zs=(e,t)=>ut((e[t?.sourceBook]?.rateRows||[]).filter(Ms).flatMap((e=>Vs(e.minMonths,e.maxMonths)))),Rs=(...e)=>{const t=e.map((e=>mt(e)));return Promise.all(t)};function Ds(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const As=e=>Boolean(e&&e.content&&"string"==typeof e.content.sourceBook);function js(e){const{dirs:t=[],source:l=[]}=r((()=>{const t=(e=>e?.filter(As).map((({content:{sourceBook:e}})=>e)))(e);return{dirs:t?.map((e=>`/wcms-resources/${e}.json`)),source:t}}),[e]),{data:n=[]}=sl(t,Rs);return{source:Object.fromEntries(Ds(l,n).filter((([,e])=>Boolean(e)))),months:ut(n.flatMap((e=>e?.rateRows||[])).filter(Ms).flatMap((e=>Vs(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[]}}const Fs=1e9,$s={sum:{min:1e4,max:Fs},period:3},Ls=ft((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...i})=>{const{source:r,months:s}=js(i.block?.blocks),[d,{field:m,reset:h}]=Ct($s),u=d===$s?i.block?.blocks:Ss(i.block?.blocks,d)((e=>({...e,period:zs(r,e||{})||[]}))),p=c("div",{children:[o(Ki,{label:n?.title,min:500,max:Fs,...m("sum",{parse:e=>({min:Number(e),max:Fs}),format:({min:e})=>String(e)})}),o(In,{title:a?.title,items:["От 3 мес","До 5 лет"],list:s,...m("period")})]});return c(b,{className:g("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[Ts({field:m,reset:h,filtrationSchema:t,resetButton:l,children:p}),o(Ns,{blocksToRender:u,...i})]})}),{childrenTypes:["ProductTile"],childSchema:e=>({...e?.filtrationSchema||{},sourceBook:{type:"string",title:"Адрес справочника"}})}),Es=[{key:"10"},{key:"50"},{key:"100"}],Os=({itemCount:e,onItemCountChange:t})=>{const l=i((({key:e})=>t(Number(e))),[]);return c("div",{className:"flex items-center gap-s",children:[o("span",{children:"Показать по"}),o(fl,{className:"min-w-20",onChange:l,value:{key:String(e)},options:Es,iconVersion:"black"})]})},_s="py-m px-lg rounded-md cursor-pointer hover:bg-primary-hover hover:text-white",Us=(e,t)=>{const{currentPage:l,onPageChange:n,totalPages:a}=e,i=t+1;return i===l?o("div",{"aria-current":"true",className:"py-m px-lg bg-primary-main text-white rounded-md",children:i},String(t)):1!==i&&i!==a&&((e,t,l)=>e<t&&e>=t-2||e<=t+2&&e>t||((e,t,l)=>t<=3&&e<=t+3||t>=l-1&&e>=l-4)(e,t,l))(i,l,a)?o("div",{onClick:()=>n(i),className:_s,"aria-label":`Страница ${i}`,children:i},String(t)):null},Hs={width:"24",height:"24"},Ws=({currentPage:e,onPageChange:t,totalPages:l})=>{const n=r((()=>Array.from({length:l}).fill({currentPage:e,onPageChange:t,totalPages:l})),[l,e]),a=i((()=>{e>1&&t(e-1)}),[e]),s=i((()=>{e<l-1&&t(e+1)}),[e,l]),d=i((()=>t(1)),[]),m=i((()=>t(l)),[l]);return c("div",{className:"flex gap-m items-center",children:[o("div",{onClick:a,children:o(U,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Ks(1===e),...Hs})}),c("div",{className:"flex gap-xs",children:[e>1?o("div",{onClick:d,className:_s,"aria-label":"Страница 1",children:"1"}):null,e>4?o("div",{className:"py-m px-s",children:"..."}):null,n.map(Us),e<l-3?o("div",{className:"py-m px-s",children:"..."}):null,e<l?o("div",{onClick:m,className:_s,"aria-label":`Страница ${l}`,children:l}):null]}),o("div",{onClick:s,children:o(U,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Ks(e===l),...Hs})})]})},Ks=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",Xs=({currentPage:e,onPageChange:t,totalPages:l,itemCount:n,onItemCountChange:a})=>c("div",{className:"mt-3xl flex justify-between items-center select-none",role:"navigation","aria-label":"Пагинация",children:[o(Ws,{currentPage:e,onPageChange:t,totalPages:l}),n&&a?o(Os,{itemCount:n,onItemCountChange:a}):null]}),qs=d((({className:e,value:t,autoFocus:l,onChange:n,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{n&&n(e.target?.value||"")}),[n]);return c("div",{className:g("font-sans relative",e),role:"form",children:[o("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:o(Z,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),o("input",{className:g("h-14 w-full px-10 text-l text-black outline-none box-border border border-solid rounded-md","border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text"),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:l,onChange:s,onFocus:a})]})})),Gs=d((({field:e,onClearFilter:t,filtrationState:l})=>c("div",{className:"grid grid-cols-12 mb-3xl space-x-xl",children:[o(qs,{className:"col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(Zl,{className:"col-span-3",label:"Период от",maxDate:l.endDate,...e("startDate")}),o(Zl,{className:"col-span-3",label:"Период до",minDate:l.startDate,...e("endDate")}),o("div",{className:"col-span-2 mt-auto",children:o(Tl,{className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),Ys=({title:e,timestamp:t,publicId:l})=>{const n=se({basePath:"/"}),{href:a}=n({href:`/api/v1/depository/${l}/file`});return c("div",{className:"grid grid-cols-12 py-lg border-gray border-opacity-50 border-b",children:[o("div",{className:"col-span-2",children:t?o(Me,{size:"text-m","font-weight":"font-light",children:Ll(t)}):null}),o("div",{className:"col-span-10 text-h6 hover:text-primary-active",children:o("a",{href:a,download:!0,"aria-label":"Скачать",children:e})})]},l)},Qs="/api/v1/depository",Zs={startDate:void 0,endDate:void 0,query:""},Js=ft((({className:e,...t})=>{const[l,a]=n(0),[r,s]=n(10),[d,{field:m,reset:h}]=Ct(Zs),{totalPages:u=0,items:p=[]}=(({size:e,page:t,query:l,startDate:n,endDate:a})=>{const i=n?Ll(n,!0):"",r=a?Ll(a,!0):"",s=new URLSearchParams(Qs);s.set("page",String(t)),s.set("size",String(e)),s.set("query",l),s.set("timestampStart",i),s.set("timestampEnd",r);const o=`?${s.toString()}`,{data:c}=sl(Qs+o,ht);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:l,...d}),x=i((e=>a(e-1)),[]),f=i((e=>{r!==e?(s(e),a(0)):s(e)}),[]);return c(b,{className:g(e,"container p-6xl"),...t,children:[o(Gs,{filtrationState:d,field:m,onClearFilter:h}),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-2",children:o(Me,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-10",children:o(Me,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),p.length?p.map((e=>o(Ys,{...e},String(e.publicId)))):o(bs,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(Xs,{currentPage:l+1,onPageChange:x,totalPages:u,itemCount:r,onItemCountChange:f})]})]})})),eo=e=>"Image"===e?.contentType&&e?.image?o(Z,{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,to=d((({className:e="",title:t,description:l,error:n,button:a,...i})=>c(b,{className:g("flex flex-col justify-center items-center",e),defaultPadding:g("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:eo(n)}),o(k,{title:t,description:l,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(he,{version:a?.version,text:a?.text,...a}):null]}))),lo="location";function no(e="Москва"){const[t,l]=((e,t,l)=>{const[r,s]=n(l||null);return a((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[r,i((l=>e.fire(t,l)),[e,t])]})(p,"location",io()??{name:e}),r=i((e=>{ro(e),l(e)}),[]),{data:s}=sl(ao()?null:"/api/v1/region",ht);return a((()=>{s&&!ao()&&l(s)}),[s]),[t??{name:e},r]}const ao=()=>Boolean(globalThis.localStorage?.getItem(lo)),io=()=>{try{const e=globalThis.localStorage?.getItem(lo);return e&&JSON.parse(e)}catch(e){return null}},ro=e=>{try{globalThis.localStorage?.setItem(lo,JSON.stringify(e))}catch(e){}};var so;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(so||(so={}));const oo=new Intl.NumberFormat("ru",{style:"currency",currency:so.RUB}),co=e=>e?oo.format(e):"",mo="text-left text-m font-light text-secondary-text",ho=`${mo} pl-5xl`,uo={USD:"DollarIcon",EUR:"EuroIcon"},po=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:`h-fit w-fit ${e}`,children:[o("thead",{children:c("tr",{children:[o("th",{className:mo,children:o(Me,{size:"text-m",children:"Валюта"})}),o("th",{className:ho,children:o(Me,{size:"text-m",children:"Купить"})}),o("th",{className:ho,children:o(Me,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(xo)})]}))),xo=e=>{const t=e?.currency?.currency;return c("tr",{className:"pb-2xs text-h6",children:[o("td",{className:"pt-m",children:c("div",{className:"flex items-center gap-xs",children:[t?o(Z,{image:{icon:uo[t]},width:"24",height:"24"}):null,o(Me,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl",children:o(Me,{size:"text-h6",children:co(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl",children:o(Me,{size:"text-h6",children:co(e?.buyExchangeRate)})})]},t)},go={icon:"GpsIcon"},fo=d((({className:e="",address:t})=>c("div",{className:`flex gap-s ${e}`,children:[o(Na,{...go,iconBgVersion:"primary"}),c("div",{className:"space-y-2xs",children:[t?o(N,{size:"text-l",color:"text-primary-main",children:t}):null,o(N,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),bo=(e,t,l)=>{const n=Number(yo(e))*Math.pow(t,l?-1:1);return Number.isInteger(n)?n:((e,t=2)=>{const l=10**t;return Math.round(parseFloat(String(e))*l)/l})(n)},yo=e=>e.replace(/[^\d.,]/g,"").replace(",","."),vo=e=>{return(t=[[e=>e.value!==so.RUB&&e.oppositeValue!==so.RUB,()=>e.handleConvert(e.value,so.RUB)],[e=>e.value===so.RUB&&e.oppositeValue===so.RUB,()=>e.handleConvert(e.value,so.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function No(e){const{placeholder:t,rates:l,selected:n,value:a,setValue:i,setSelected:r}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:n,text:n};return c("div",{className:"relative flex",children:[o(At,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?o(fl,{isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const wo=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||so.RUB,selectBuy:l?.[0]?.currency?.currency||so.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`grid gap-m pt-2xl ${e}`,children:[No({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:ko(r,d,l),value:r.inputSell,setValue:e=>So(d,l)(e,r.selectSell,r.selectBuy)}),No({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Co(r,d,t),value:r.inputBuy,setValue:e=>Io(d,t)(e,r.selectBuy,r.selectSell)}),a?.text?o(he,{text:a.text,version:a?.version,...a}):null]})})),ko=(e,t,l)=>n=>{t({selectSell:n}),vo({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{So(t,l)(e.inputSell,n,a)}})},Co=(e,t,l)=>n=>{t({selectBuy:n}),vo({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>Io(t,l)(e.inputBuy,n,a)})},So=(e,t)=>(l,n,a)=>{e({inputSell:yo(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputBuy:String(bo(l,i,n===so.RUB)||"")})},Io=(e,t)=>(l,n,a)=>{e({inputBuy:yo(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputSell:String(bo(l,i,n===so.RUB)||"")})};const To=d((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const[a]=no(),i=function(e){const t=e?.code||"000",{data:l}=sl(`/api/v1/exchangerates?regionCode=${t}`,ht);return l||{}}(a),r=Bo(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:so.RUB}});const d=r.filter((e=>e.saleExchangeRate));return d.push({currency:{currency:so.RUB}}),o(b,{className:g("box-border min-h-80",e),...n,children:o(fe,{className:"h-full",title:o(v,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex gap-6xl flex-wrap",children:[c("div",{children:[r?o(po,{className:"mb-xl",exchangeCurrencyItems:r}):null,o(fo,{address:i?.address})]}),r.length&&s.length&&d.length?o(wo,{className:"grow",currencyRatesBuy:s,currencyRatesSell:d,button:l}):null]})})})})),Bo=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[],Po={width:"40",height:"45"},Mo={"bg-white":"color",transparent:"white"},Vo={"bg-white":"text-primary-main",transparent:"text-white"},zo=(e,t,l)=>o(Z,t?.src?{image:t,className:Vo[e],width:l?.width,height:l?.height}:{image:{icon:t?.icon||"LogoIcon",iconVersion:Mo[e]},className:Vo[e],width:l?.width,height:l?.height}),Ro={"bg-white":"text-primary-text",transparent:"text-white"},Do=d((({className:e,href:t="/",logo:l,children:n,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0})=>c("a",{className:g("inline-flex items-center font-sans no-underline",e),href:t,target:a?"_blank":"_self","aria-label":l?.title??"Россельхозбанк",children:[zo(i,l?.image,Po),r?n??o("div",{className:"ml-s",children:o(Me,{font:"font-medium",color:Ro[i],size:"",children:l?.title??"Россельхозбанк"})}):null]}))),Ao=d((({className:e,onClose:t})=>o("button",{className:g("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",children:o(Z,{image:{icon:"CloseIcon"},width:"24",height:"24"})})));function jo(e,t,l=300){a((()=>{const t=globalThis.setTimeout(e,l);return()=>{globalThis.clearTimeout(t)}}),t)}const Fo=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:l,s1Matches:n,s2Matches:a}=function(e,t){const l=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),n=Array.from({length:e.length}),a=Array.from({length:t.length});let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-l),o=Math.min(r+l,t.length-1);for(let l=s;l<=o;l++)n[r]||a[l]||e[r]!==t[l]||(i++,n[r]=!0,a[l]=!0)}return{m:i,s1Matches:n,s2Matches:a}}(e,t);if(0===l)return 0;const i=function(e,t,{s1Matches:l,s2Matches:n}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!l[i])continue;let s=r;for(;s<t.length;s++)if(n[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:n,s2Matches:a}),r=(l/e.length+l/t.length+(l-i/2)/l)/3,s=r>.7?.1*function(e,t){let l=0;for(;e[l]===t[l]&&l<4;)l++;return l}(e,t):0;return r+s*(1-r)};const $o=(e,t)=>(l,n)=>{for(const[a,i]of n)l.set(a,e(l.get(a)||t,i));return l},Lo=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),Eo=e=>t=>e.map((([e,l])=>[Fo(t)(e),l])).filter((([e])=>e>=.8)).map((([e,t])=>_o(t,e))).reduce($o(Math.max,0),new Map),Oo=e=>t=>{return Ds(t,t.map((({title:e})=>e)).map((e=>t=>{const l=Lo(t||"");return l.length?Se(e.map((e=>oi(l.map(Fo(e)))))):0})(e))).sort((n=([,e])=>e,l=(e,t)=>n(e)-n(t),(e,t)=>-l(e,t))).map((([e])=>e));var l,n},_o=(e,t)=>new Map(e.map((e=>[e,t]))),Uo=({basePathList:e,initialQuery:t=""})=>{const[l,i]=n(t||"");a((()=>{null!=t&&i(t)}),[t]);const{data:r}=sl(e?.length?e:null,Ho),[s,o]=n(null);return jo((()=>{r&&o(r.map((e=>t=>{const{corpus:l,dictionary:n}=t||{};if(!(e&&l?.length&&n&&Object.keys(n).length))return[];const a=Lo(e);if(!a.length)return[];const i=Object.entries(n),r=[...a.map(Eo(i)).reduce($o(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>l[e]));return Oo(a)(r)})(l)))}),[r,l]),[s,{value:l,onChange:i}]},Ho=async(...e)=>(await Promise.allSettled(e.map((e=>mt(j(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),Wo=d((({className:e,head:t,children:l,onClose:n})=>{const{close:a}=ie(),r=i((()=>{a(),n&&n()}),[n]);return c("div",{className:g("relative min-h-full bg-white pt-0 p-5",e),children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(Ao,{className:"absolute top-0 right-0",onClose:r}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:l})]})})),Ko=d((({className:e,topItems:t})=>{const l=se({isRemote:!0});return o("div",{className:g("flex items-start justify-between",e),children:t?.map(l).map(qo)})})),Xo=["all","footer"],qo=(e,t)=>{const{text:l,items:n=[],href:a,target:i,onClick:r}=e,s=n.filter((e=>!e.displayArea||Xo.includes(e.displayArea.toLowerCase())));return c("div",{className:"flex flex-col gap-s w-1/4",children:[o("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:i||"_self",onClick:r,children:l||`Раздел ${t}`}),s.map(((e,t)=>o(Go,{...e,basePath:M(a),index:t},String(t))))]},String(t))},Go=d((({text:e,index:t,basePath:l,...n})=>{const a=se({isRemote:!(!z.BASE_PATH||!l)&&!z.BASE_PATH.startsWith(l),basePath:l}),{href:i,target:r,onClick:s}=a(n);return o("a",{className:g("text-l font-light text-secondary-text hover:text-primary-main no-underline","overflow-x-hidden overflow-ellipsis whitespace-nowrap"),href:i,target:r||"_self",onClick:s,children:e||`Раздел ${t}`})})),Yo=d((({initialQuery:e,topItems:t})=>{const l=r((()=>t?.map((e=>e.href||"/"))),[t]),[n,a]=Uo({basePathList:l,initialQuery:e}),i=r((()=>Qo(t)(n)),[t,n]);return o(Wo,{head:o(qs,{autoFocus:!0,...a}),children:o(Ko,{topItems:i})})})),Qo=e=>t=>e?.length&&t?.length?Ds(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:j("/",t)})))}))):[],Zo=(e={})=>{const{open:t,close:l}=ie();return{open:(l={},n={})=>t(o(Yo,{...e,...l}),n),close:l}},Jo=d((({className:e,...t})=>{const[l,a]=n(""),r=i((()=>a("")),[]),s=Zo(t),d=i((e=>{a(e),ec(e)&&s.open({initialQuery:e},{onClose:r})}),[r,s]);return c("div",{className:g("relative",e),children:[o(qs,{value:l,onChange:d}),o(Ao,{className:"absolute top-0 right-0 sm:hidden",onClose:r})]})})),ec=e=>e&&e.length>=3,tc=d((({className:e="",items:t})=>c("div",{className:e,children:[t?.length?t.map(lc):null,o(he,{version:"primary",className:"w-full",href:"https://beta.rshb.ru/natural/feedback/question",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),lc=(e,t)=>c("div",{className:"mb-m space-y-m",children:[o("div",{children:o(Me,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(nc)})]},String(t)),nc=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:ac(e.type,e.text)}),o(N,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),ac=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${ic(t)}`,children:o(Me,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(N,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},ic=e=>e.replaceAll(/\D/g,""),rc=["split_version","New","Old"],sc=d((({className:e="",index:t,text:l,...n})=>{const a=se(),{href:i,target:r,onClick:s}=a(n);return o("a",{className:g("text-secondary-text",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),oc=d((({className:e="",links:t})=>o("div",{className:e,children:t?.length?o("div",{className:"flex justify-between items-center gap-lg py-lg border-solid border-x-0 border-y border-y-main-divider",children:t.map(((e,t)=>o(sc,{index:t,className:"text-l font-light max-w-[292px]",...e},String(t))))}):null}))),cc=d((({className:e="",index:t,...l})=>{const n=se({isRemote:!0}),{href:a,target:i,text:r,onClick:s}=n(l);return o("a",{className:`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:i,onClick:s,children:r||`Документ ${t}`})})),dc=d((({className:e="",links:t})=>c("div",{className:g("@container",e),children:[o("div",{className:"pt-lg",children:o(Me,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?o("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg",children:t.map(((e,t)=>o(cc,{index:t,...e},String(t))))}):null]}))),mc="w-52",hc=ft((({className:e,footer:t,...l})=>{const n=l.options?.page?.sitemap??{},{logo:a}=n,{documents:r,relatedEnterprises:s,contacts:d,socialMedia:m,mobileApps:h}=t??{},u=i((()=>{const[e,t,l]=rc;((e,t)=>{const l=globalThis.document?.cookie.split(";")??[],[,n]=l.map((e=>e.split("="))).find((([t])=>t.trim()===e))||[];t(n)&&(globalThis.document.cookie=`${e}=${t(n)}`)})(e,(e=>e?.replace(t,l)))}),[]);return c(b,{tag:"footer",className:e,...l,children:[c("div",{className:"flex items-stretch gap-3xl pb-3xl ",children:[o(Do,{className:mc,logo:a}),o(Jo,{className:"grow",...n})]}),c("div",{className:"flex items-stretch gap-6xl",children:[c("div",{className:g(mc,"flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(tc,{items:d}),o($r,{media:m,children:"Соцсети"}),o($r,{media:h,showButtonText:!1,children:"Мобильное приложение"}),o(he,{version:"link",href:"https://old.rshb.ru",className:"!text-left text-s font-light",onClick:u,children:"Вернуться на прежнюю версию сайта"})]}),o(Ko,{className:"flex-grow",...n})]}),o(oc,{className:"mt-xl",links:s}),o(dc,{links:r})]})})),uc=d((({className:e="",title:t,description:l,calendar:n,...a})=>c(b,{className:g("space-y-m",e),defaultPadding:"p-6xl",...a,children:[o(k,{title:t,description:l,headlineVersion:"M",isEmbedded:!0}),n?pc(n):null]}))),pc=e=>{const t=100/(e.reduce(((e,t)=>t?.month?.length?e+t.month.length:e),0)||1),l=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:l.map((e=>xc(e,t)))}),o("div",{className:"flex gap-s w-full",children:l.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:gc(e)}),c("div",{className:"text-s",children:[o(Me,{size:"text-s",font:"font-light",color:"text-primary-text",children:e.text})," ",o(Me,{size:"text-s",font:"font-light",color:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},xc=(e,t)=>e.month?.map(((e,l)=>o("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${l}`))),gc=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(Z,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),fc=e=>({href:t})=>!!t&&A(bc(t,e)).startsWith(A(t)),bc=(e,t)=>R(e)?t.href:t.pathname;function yc(e=[]){const t=x(),l=e.findIndex((e=>fc(z.BASE_PATH?{pathname:z.BASE_PATH}:e))(t));return[l,e[l]]}const vc=d((({className:e="",active:t,flat:l,children:n,...a})=>{const i=se({isRemote:!0}),{href:r,target:s,text:c,onClick:d}=i(a);return o("a",{className:g(Nc(t,l),e),href:r,target:s,onClick:d,rel:"noopener noreferrer","aria-label":c,children:o("span",{className:wc(t,l),children:c||n})})})),Nc=(e=!1,t=!1)=>g("inline-block border border-solid bg-transparent text-center no-underline",e?"rounded-md border-primary-main group-data-transparent:border-white":"border-transparent",t?"":"px-m py-xs"),wc=(e=!1,t=!1)=>g("font-sans text-s font-light",e?"text-primary-main":g(t?"text-primary-text":"text-secondary-text","hover:text-primary-main"),"group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),kc=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(Me,{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(Cc,{...e},String(t))))})]}):null,Cc=d((({icon:e,...t})=>{const l=se(),{text:n,target:a,href:i,onClick:r}=l(t);return c("div",{className:"flex gap-s items-center",children:[e?o(Z,{pathPrefix:"/wcms-resources/",image:e}):null,n?o("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:o(Me,{size:"text-l",font:"font-light",color:"text-primary-text",children:n})}):null]})})),Sc=e=>t=>o("div",{className:"mb-xs sm:mb-2xs",children:o("button",{className:"cursor-pointer hover:text-primary-hover",onClick:()=>{e&&e(t)},children:o(Me,{size:"text-l",font:"font-light",children:t.name||""})})},t.id),Ic=d((({className:e,searchTerm:t,onSearch:l})=>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-12 pl-m w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text",value:t,onChange:e=>l(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),Tc=d((({foreignOffices:e,defaultLocation:t})=>{const[l,a]=no(t),[r,s]=n(""),d=Pc(cl()).sort(((e,t)=>e.name.localeCompare(t.name))),m=((e,t)=>{const l=new Map;for(const n of e){const e=t(n),a=l.get(e)||[];l.set(e,[...a,n])}return l})(d,Bc),{close:h}=ie(),u=i((e=>{a(e),h()}),[]);return c(Wo,{className:"pb-20",head:c("div",{children:[o(Me,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),l?c("div",{className:"mb-s",children:[o(Me,{size:"text-l",font:"font-light",children:"Сейчас выбран: "}),o("button",{onClick:()=>a(l),children:o(Me,{color:"text-primary-main",children:l.name})})]}):null,o(Ic,{onSearch:s,searchTerm:r})]}),children:[r&&r.length>=3?o("div",{children:d.filter((({name:e})=>e&&Fo(e.toLowerCase())(r.toLowerCase())>=.8)).map(Sc(u))}):o("div",{className:"columns-1 sm:columns-5",children:Array.from(m.entries()).map((p=u,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(Me,{size:"text-h6",children:e})}),t.map(Sc(p))]},e)))}),kc(e)]});var p})),Bc=e=>e.name?.charAt(0)||"",Pc=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),Mc={default:"w-6 h-6",large:"w-12 h-12"},Vc=d((({className:e,isRounded:t,buttonSize:l="default",isGrayBg:n=!1,disabled:a,ariaLabel:i,image:r,onClick:s})=>o("button",{className:g("group/btn border-0 flex shrink-0 items-center",n?"p-s rounded-full":"p-0 bg-inherit",n&&!t?"bg-main-divider":"",t?"w-8 h-8 text-secondary-light hover:text-secondary-hove":`${Mc[l]} text-primary-text hover:text-primary-main`,"group-data-transparent:text-white",e),type:"button",disabled:a,"aria-label":i,onClick:s,children:o(Z,{image:r,className:g("h-full",t?"bg-main-divider/20 rounded-full":""),imageClassName:"group-hover/btn:text-primary-hover group-hover/btn:invert-0"})}))),zc=d((({className:e,version:t,...l})=>{const n="transparent"===t?"white":"black",[a]=no(l.defaultLocation),i=Zo(l),r=(e=>{const{open:t,close:l}=ie();return{open:(l={})=>t(o(Tc,{...e}),l),close:l}})(l);return c("div",{className:g("flex items-center gap-lg",e),children:[o(vc,{flat:!0,href:"#",text:a?.name,onClick:()=>r.open()}),l.officesLink?o(vc,{flat:!0,href:l.officesLink,text:"Офисы и банкоматы"}):null,o(Vc,{image:{icon:"LoupeIcon",iconVersion:n},ariaLabel:"Поиск",onClick:()=>i.open()})]})})),Rc=d((({className:e="",items:t,activeItem:l})=>{const a=se(),[r,s]=n(!1),d=i((()=>s((e=>!e))),[]),m=ul(i((()=>s(!1)),[]));return c("div",{className:g(r?"bg-white rounded-md shadow-blue-gray":"",e),ref:m,children:[o("button",{className:"group/btn flex justify-between items-center h-6","aria-label":""+(r?"Скрыть другие разделы":"Показать другие разделы"),onClick:d,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",{className:g("absolute flex flex-col rounded-md bg-white p-xl pb-xs w-56",r?"":"hidden"),"aria-hidden":!r,children:t?.map(((e,t)=>{const{text:n,...i}=e,{href:r,target:s,onClick:c}=a(i);return o("a",{className:g("text-l font-light pb-m hover:text-primary-main",e===l?"text-primary-main":""),href:r,target:s,onClick:c,children:n},r||String(t))}))})]})})),Dc=e=>globalThis[e];function Ac(e,t){const[l,r]=n(),s=i((()=>r(Dc(e))),[e]);return a((()=>{const l=document.getElementById(t);if(!l){const e=document.createElement("script");return e.src=t,e.async=!0,e.id=t,e.addEventListener("load",s),document.head.appendChild(e),()=>{document.head.removeChild(e),r(void 0)}}if(!Dc(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}const jc={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},Fc=d((e=>{const[t,{setTrue:l}]=dl();return t?o($c,{...e}):Lc({...e,onClick:l})})),$c=d((({chat:e="personal",...t})=>((e=>{a((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]),Ac("chatbot",jc[e])})(e),Lc(t)))),Lc=({className:e,iconVersion:t,onClick:l})=>o(Vc,{className:g("text-page__btn-chat",e),image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:"Чат",onClick:l,buttonSize:"large",isGrayBg:!0}),Ec=d((({className:e="",active:t,dataItemName:l,children:n,...a})=>{const i=se(),{href:r,target:s,text:d,onClick:m}=i(a);return c("a",{className:g("relative inline-block bg-transparent text-center no-underline",e),href:r,target:s,"data-item-name":l,onClick:m,children:[o("span",{className:Oc(t),children:d||n}),t?o("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent"}):null]})})),Oc=(e=!1)=>g("font-sans text-l 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"),_c=d((({observerOptions:e,onVisibilityChange:t,children:l,className:n,...a})=>{const r=Qi(i((e=>{if(!e.length||!t)return;const l=e[e.length-1];t(l.isIntersecting)}),[t]),e);return o("span",{ref:r,className:n,children:o(Ec,{...a,children:l})})})),Uc={default:"px-lg bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},Hc=d((({version:e,internetBankUrl:t})=>t?o(he,{href:t,ariaLabel:"Интернет-банк",target:"_blank",className:g("py-s ml-s text-l font-light whitespace-nowrap hover:text-primary-main",Uc["transparent"===e?"transparent":"default"]),children:"Интернет-банк"}):null)),Wc=["all","header"],Kc=d((({subItems:e=[],version:t,internetBankUrl:l})=>{const a="transparent"===t?"white":"black",i=x(),d=r((()=>e.filter((e=>!e.displayArea||Wc.includes(e.displayArea.toLowerCase())))),[e]),m=(e=>(t=[])=>{const l=t?.filter(fc(e));return l?.length?si((e=>e.href?.length||0))(l):void 0})(i)(e),[h,u]=n(d.length),p=d.slice(h),g=s(null),f={rootRef:g},b=r((()=>d.map(((e,t)=>e=>{u(e?Xc(t):qc(t))}))),[d]);return c("nav",{className:"relative mt-s flex items-center justify-between",children:[o("div",{ref:g,className:"overflow-hidden whitespace-nowrap pb-s mt-xs space-x-3xl",children:d.map(((e,t)=>o(_c,{className:h-1<t?"invisible":"",active:e===m,observerOptions:f,onVisibilityChange:b[t],...e},String(t))))}),p.length?o(Rc,{className:"relative w-auto z-40",items:p,activeItem:m}):null,c("div",{className:"flex",children:[z.CHAT_BOT?o(Fc,{className:"ml-4xl",iconVersion:a,chat:z.CHAT_BOT}):null,o(Hc,{version:t,internetBankUrl:l})]})]})})),Xc=e=>t=>Math.max(t,e+1),qc=e=>t=>Math.min(t,e),Gc={"bg-white":"primary",transparent:"transparent"},Yc=ft((({className:e,bgColor:t="bg-white",logo:l,version:n=Gc[t],portal:a,...i})=>{const r=i.options?.page?.sitemap??{},{topItems:s,logo:d}=r,[,m]=yc(s),{internetBankUrl:h}=a||{};return o(b,{tag:"header",className:g("pt-3xl px-20",m?.items?.length?"pb-m":"pb-lg",e),defaultPadding:"",version:n,...i,children:c("div",{className:"container",children:[c("div",{className:"flex items-center",children:[o(Do,{className:"mr-3xl",bgColor:t,logo:l??d}),s?.map(((e,t)=>o(vc,{active:e===m,...e},String(t)))),o(zc,{version:n,className:"ml-auto",...r})]}),o("div",{className:g("mt-xl h-px bg-main-divider","transparent"===n?"opacity-30":"")}),m?.items?.length?o(Kc,{subItems:m.items,version:n,internetBankUrl:h}):null]})})})),Qc={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Zc=ft((({className:e="",padding:t="p-0",gap:l="XS",version:n="transparent",isTheme:a=!1,isCardBorder:i,...r})=>o(b,{className:g("relative","grid grid-cols-12",Qc[l],e),padding:t,version:n,isTheme:a,...r,children:P({...r,extraProps:{className:pr(i)}})})),{childrenTypes:{exclude:["HorizontalLayout"]}}),Jc=d((e=>{const{className:t,image:l,...n}=e;return o(b,{className:t,defaultPadding:"p-0",...n,children:o(Z,{image:l})})})),ed=d((({className:e="",cards:t=[],button:l})=>{const[a,r]=n(0),s=i((e=>r(e)),[]),d=t.length,[m,h]=Ma({itemCount:d,visibleItemCount:2}),{canDec:u,canInc:p}=h,x=t[m]?.href;return c("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[c("div",{className:"relative overflow-hidden",children:[d?td({activeIndex:m,cards:t,selectedCardIndex:a,onClick:s}):null,Da({...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(he,{className:"w-60 text-center",version:"primary",...l,href:x})]})}));function td({activeIndex:e,cards:t,selectedCardIndex:l,onClick:n}){const a=460*e,i=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 ${i}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:l,onClick:n}){return c("button",{type:"button",onClick:n,className:"p-3xl min-w-fit flex items-center gap-2xl bg-white border-solid border relative "+(l?"shadow-dark-blue border-primary-main":"ease-in duration-300 border-gray"),children:[e?.icon?o(Z,{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?ld("страховая сумма",e.sum):null,e?.fee?ld("страховой взнос",e.fee):null]}),nd(l)]},String(t))}({slide:e,i:t,isActive:Boolean(t===l),onClick:()=>n(t)})))})})}function ld(e,t){return c("div",{className:"flex flex-col text-left whitespace-pre",children:[c(Me,{size:"text-h6",children:[Ge(2)(t)," ₽"]}),o("div",{className:"mt-2xs",children:o(Me,{size:"text-l",color:"text-secondary-text",children:e})})]})}function nd(e){return e?o(Z,{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 ad=d((({className:e="",title:t,insuranceTabs:l=[],button:a,...r})=>{const[s,d]=n(0),m=i((e=>d(e)),[]);return c(b,{className:g("box-border overflow-hidden relative px-0 space-y-2xl",e),defaultPadding:"p-6xl",...r,children:[t?o(v,{className:"text-center",title:t,headingType:"h3"}):null,l?.length>1?o("div",{className:"p-xs bg-secondary-light w-fit mx-auto rounded-md",children:l.map(((e,t)=>function({title:e,i:t,isActive:l,onClick:n}){return o("button",{type:"button",onClick:n,"aria-label":e,className:"box-border px-m py-s text-m font-light "+(l?"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:id({insuranceTabs:l,button:a})})]})})),id=({insuranceTabs:e,button:t})=>{const l=e?.map((e=>e.cards));return l?.length?l.map(((e,l)=>o(ed,{button:t,cards:e},String(l)))):null};const rd=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),sd={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},od={XS:"h-10",S:"h-16",M:"h-24",L:"h-32",XL:"h-52"},cd=d((e=>{const{className:t="",items:l,isDotted:n,investmentZeroColumn:a,investmentColumns:i,...r}=e,s=i?[...i]:[];return a&&s.unshift(a),o(b,{className:t,defaultPadding:"p-4xl",...r,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:[rd(o("div",{className:"w-px h-4 bg-gray"}))(s.map(dd)),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(ud)})]}):null,l?.length?o(qe,{className:"max-w-[657px]",items:l,isDotted:n,listItemSize:"M"}):null]})})})),dd=(e,t,l)=>{const n=1===t,a=t===l.length-1;return o("div",{className:`${md(n,a,e.cells)}`,children:e.cells?.length?o("div",{className:"w-full "+(a?"border-4 border-green-more-dark p-2xs min-w-72":""),children:e.cells.reverse().map(hd)}):null},`column_${t}`)},md=(e,t,l=[])=>[l.length?"flex-1":"flex-0",!l.length||e||t?"":"pl-s",l.length&&!t?"pr-s pb-3xl":"pb-xl"].join(" "),hd=(e,t)=>{const l=e.cellSize||"XS",n=e.cellColor||"green";return e.text?o("div",{className:`flex-1 flex items-center justify-center relative py-xs ${od[l]} ${sd[n]} ${"XS"===l?"px-s":"px-5xl"}`,children:o(Me,{align:"text-center",children:e.text})},`cell_${t}`):null},ud=(e,t)=>e?.title?o("div",{className:"flex-1 max-w-[180px] text-center px-xs last:pr-3xl",children:e.title},`title_${t}`):null,pd=["байт","Кб","Мб","Гб","Тб","Пб"],xd=d((({icon:e,text:t,href:l,target:n,fileFormat:a,fileSize:i})=>{const r=i&&a?",":"",s=i??"",d=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",role:"link",href:l,target:n,children:[e,t?c(Me,{size:"text-l",font:"font-light",children:[t," ",gd(s,d),o(Me,{color:"text-secondary-text",children:l&&`${s+r+d}`})]}):null]})})),gd=(e,t)=>e||t?o("span",{children:", "}):"",fd={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},bd=d((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=x();return c(b,{className:g("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(k,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:g("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",fd[r]),role:"list",children:a.map(yd(d,i))}):null]})})),yd=(e,t)=>(l,n)=>{if(""===l?.docType)return null;const a="Attachment"===l?.docType?E(e)(l?.attachment?.src):l?.href,i="Attachment"===l?.docType?((e,t=2)=>{if(0===e)return"";const l=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,l)).toFixed(t))} ${pd[l]}`})(l?.attachment?.fileSize||0):l?.fileSize,r="Attachment"===l?.docType?vd(a):l?.fileFormat;return o("div",{role:"listitem",children:o(xd,{text:l?.text,target:l?.target,href:a,fileFormat:r,fileSize:i,icon:t?o(Z,{className:"min-w-6 min-h-6",image:t,width:"24",height:"24"}):null})},String(n))},vd=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},Nd=d((({className:e,padding:t,align:l="text-left",buttons:n=[],description:a,image:i,items:r,qr:s,additionalDescription:d="",title:m="Мобильное приложение",version:h="primary",...u})=>{const p="secondary"===h?"p-m min-w-32":"min-w-24",x=i?.src?o(Z,{className:"hidden lg:block",image:i}):null;return o(b,{className:g("min-h-80",e),padding:"p-0",version:h,...u,children:c(fe,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(v,{headingType:"h3",title:m,className:g("whitespace-pre-wrap",l)}),rightImage:x,buttons:_e(n,{className:"flex-wrap"}),children:[a?o(Me,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:g("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[o(qe,{items:r,listItemSize:"M"}),o(Me,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:d}),s?.src?o("div",{className:g("flex justify-center bg-white rounded-md @xl:-order-1",p),children:o(Z,{className:"w-fit",image:s})}):null,i?.src?o(Z,{className:"lg:hidden",image:i}):null]})]})})})),wd={primary:"bg-white/30",secondary:"bg-main-divider"},kd={primary:"text-white",secondary:"text-secondary-text"},Cd=d((({count:e,version:t="secondary"})=>o("div",{className:g("w-6 h-6 rounded-full flex items-center justify-center",wd[t]),children:o(Me,{size:"text-xs",color:kd[t],children:e})}))),Sd=(e=[],t={})=>e.filter((({content:e={}})=>ks(t,e))).length,Id=(e,t)=>e===t;const Td=(Bd=function(...e){return(t,l)=>e.some((e=>e(t,l)))}(Id,((e=Id)=>(t,l)=>t===l||Boolean(t&&l&&t.length===l.length&&t.every(((t,n)=>e(t,l[n])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,l])=>Bd(l,t[e])))));var Bd;const Pd=[],Md={},Vd={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},zd={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},Rd={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},Dd={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},Ad=d((({tag:e="div",item:t={},isActive:l,type:n="default",onClick:a})=>{const i=e,{text:r,appendRight:s,...d}=t;return o(i,{className:g("h-12","block flex-1","cursor-pointer",Vd[n],l?Dd[n]:Rd[n]),role:"tab","aria-selected":l,onClick:a,...d,children:c("div",{className:g("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?zd[n]:"text-secondary-text hover:text-primary-main"),children:[o(Me,{size:"text-m",children:r}),s?o("div",{className:"ml-xs",children:s}):null]})})})),jd=d((e=>o(e?.item?.href?Fd:$d,{...e}))),Fd=d((e=>{const t=se(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return o(Ad,{...e,tag:"a",item:a,onClick:n})})),$d=d((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return o(Ad,{item:e,onClick:n,...l})})),Ld=(e,t,l)=>(n,a)=>o(jd,{isActive:n===e,onClick:t,type:l,item:n},String(a)),Ed=d((({className:e,tabsType:t="default",items:l=[],value:n,onChange:a})=>o("div",{className:g("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tablist",children:l.map(Ld(n,a,t))}))),Od={categories:[],extraOptions:[],propertyType:[],stage:[]},_d=ft((({className:e,hotFilters:t,filtrationSchema:l={},resetButton:n,...a})=>{const[s,{field:d,reset:m,update:h}]=Ct(Od),u=s===Od?a.block?.blocks:Ss(a.block?.blocks,s)(),p=i(((e=Od)=>h(e)),[]),x=(({hotFilters:e=Pd,filtrationState:t=Md,blocks:l=Pd,onFiltrationStateChange:n})=>{const a=r((()=>Math.max(0,e.findIndex((e=>Td(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,appendRight:o(Cd,{version:t===e[a]?"primary":"secondary",count:Sd(l,t.filter)})})))),[e,l,a]),c=i((t=>{n(e[s.indexOf(t)].filter)}),[e,s]);return{value:s[a],items:s,onChange:c}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:p});return c(b,{className:g("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(Ed,{...x}),Ts({field:d,reset:m,filtrationSchema:l,resetButton:n}),o(Ns,{blocksToRender:u,...a})]})}),{childrenTypes:["ProductTile"],childSchema:e=>e?.filtrationSchema||{}});function Ud(e,t,l){t.geoObjects.removeAll();const n=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),a=new e.Clusterer({clusterIcons:[{href:"/icons/MapMarkerClusterIcon.svg",size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),i=l.map((t=>new e.Placemark(t,{},{iconLayout:"default#image",iconImageHref:"/icons/MapMarkerSingleIcon.svg",iconImageSize:[78,84],iconImageOffset:[-35,-50]})));a.add(i),t.geoObjects.add(a),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const Hd={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center",font:"text-center font-sans"},Wd=(e,t,l)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(Hd).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:o(U,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),Kd={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center",font:"text-center font-sans text-l"},Xd=d((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(Kd).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(U,{name:l,width:"20",height:"16"})})})),qd={border:"border border-transparent rounded-md ",position:"absolute flex items-center justify-center",size:"w-12 h-12",focus:"focus:border-primary-text focus:border",font:"text-center font-sans",active:"active:bg-primary-active",hover:"hover:bg-primary-hover",other:"select-none cursor-pointer"},Gd=[55.753995,37.614069],Yd=d((({points:e,className:t="",zoom:l=5})=>{const i=s(null),r=Ac("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${z.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),[d,m]=n();if(a((()=>{i?.current?r&&(Ud(r,i.current,e),e?.length||i.current.setCenter(Gd)):r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:e?Qd(e):Gd,zoom:l,controls:[],suppressMapOpenBlock:!0}),Ud(r,i.current,e))}))}),[r,i,e,l]),!r)return null;const h=d?"z-[100000]":"z-10";return c("div",{id:"map",className:g(!d&&"relative","w-full",t),children:[o("div",{className:g(Object.values(qd),h,"right-2 top-4 bg-white"),onClick:()=>{const e=i.current.container;d?e.exitFullscreen():e.enterFullscreen(),m(e.isFullscreen())},children:o(U,{name:"FullScreenIcon",width:"16",height:"16"})}),c("div",{className:g("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",h),children:[o(Xd,{yandexMaps:i}),o(Xd,{yandexMaps:i,direction:"out"})]}),Wd(i.current,r,g("right-2 top-80",h))]})})),Qd=e=>[Jd(Zd(e,0)),Jd(Zd(e,1))],Zd=(e,t)=>e.map((e=>e[t])),Jd=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,em={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных"},tm=(e,{field:t,reset:l})=>c("div",{className:"pb-2xl",children:[e?.length?o("div",{className:"flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",children:e.map((e=>o(Al,{text:em[e],...t(e)},e)))}):null,o(he,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:l,text:"Очистить фильтр",appendRight:o(U,{name:"CloseIcon",width:"16",height:"16"})})]}),lm=()=>null,nm=()=>[],am=d((({className:e,data:t=[],renderCard:l=lm,filterItems:n=nm,initFilterState:a={},descriptionData:i,title:s})=>{const[d,{field:m,reset:h}]=Ct(a),[p,x,f]=r((()=>{const e=n(t,d),l=e.map((e=>[e.gpsLatitude,e.gpsLongitude].filter(Boolean))).filter((e=>e&&2===e.length));return[e,l,e.length]}),[t,d]);return c("div",{className:g("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-6xl pb-0",children:[c("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:[o(v,{headingType:"h2",children:s}),f?o(Me,{size:"text-h2",color:"text-secondary-text",children:`(${f})`}):null]}),i?im(i):null,tm(Object.keys(a),{field:m,reset:h})]}),o("div",{className:"h-[600px]",children:o(u,{children:o(Yd,{points:x,className:"h-full"})})})]}),p.map(l)]})})),im=({__html:e,list:t})=>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(Be,{__html:e})}):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(Z,{image:e.image}):null,e?.text?o(Me,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,rm={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"}},sm=d((({className:e,children:t,color:l="gray"})=>c("div",{className:g("pt-2xl sm:p-s sm:border sm:border-gray rounded-md flex items-center",rm[l].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(Z,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o(Me,{size:"text-m",color:rm[l].text,children:t})]}))),om=d((({value:e,subText:t,children:l,...n})=>{const a=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[a.length,l,t].every((e=>!e))?null:cm({textItems:a,subText:t,children:l,...n})})),cm=({label:e,labelSize:t="text-m",textItems:l,subColor:n,subText:a,className:i,children:r})=>c("div",{className:g("flex gap-2xl sm:gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(Me,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||l.filter(Boolean).map(((e,t)=>o(Me,{size:"text-l",children:e.trim()},String(t)))),a?o(Me,{color:n,size:"text-m",children:a}):null]}),dm=d((({className:e,children:t})=>o("div",{className:g("sm:flex sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),mm=["ArrowDownIcon","ArrowUpIcon"],hm=["Подробнее","Скрыть"],um=({isUnfolded:e,onToggle:t})=>c("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,children:[o("div",{className:"pr-m",children:hm[Number(e)]}),o(U,{className:"text-primary-text",name:mm[Number(e)],width:"16",height:"16"})]}),pm=({location:e,address:t,billAcceptorType:l,terminalType:n,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:gm(n)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===l?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];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(Me,{size:"text-h4",children:gm(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(U,{name:"GeolocationIcon",width:"24",height:"24"}),o(Me,{size:"text-l",children:t})]}):null]}),o(sm,{color:"green",children:gm(s)})]}),o("div",{className:"hidden sm:block",children:o(dm,{className:"flex-wrap",children:m?.map(xm)})}),o(Or,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(_r,{isUnfolded:e,children:o(dm,{className:"flex-wrap",children:m?.map(xm)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>um({isUnfolded:e,onToggle:t})})]},String(d))},xm=(e,t)=>o(om,{...e},String(t)),gm=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",fm=[];const bm=async e=>await mt(e,{method:"GET"})||fm,ym={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1},vm={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable)},Nm=d((({data:e,className:t})=>{const[l]=no(),n=function(e){const{data:t=fm}=sl(`/api/v1/atms?regionCode=${e}`,bm);return t}(l?.code??"000");return o(am,{className:t,filterItems:wm,data:n,initFilterState:ym,renderCard:pm,title:`Банкоматы филиала ${l?.name}`,descriptionData:e})})),wm=(e,t)=>{const l=Object.keys(t).filter((e=>t[e])),n=l.filter((e=>e.startsWith("terminalType"))),a=l.filter((e=>!n.includes(e)));return e.filter((e=>{const t=a.every((t=>vm[t](e))),l=!n.length||n.some((t=>vm[t](e)));return t&&l}))},km=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", "),a=[Cm({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:l?"":n}),Cm({workTime:l?.workTime,lunchHour:l?.lunchHour,daysOff:n},!0)].filter(Boolean);return o(om,{label:"Режим работы",value:a,className:"max-w-none"})},Cm=({workTime:e="",lunchHour:t="",daysOff:l=""},n=!1)=>e?[`${n?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",l?`не работает: ${l}`:""].filter(Boolean).join("; "):"",Sm=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Im=e=>Sm.map((([t,l,n])=>({key:t,title:n,short:l,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??"")}}))),Tm=e=>{if(!e)return null;const t=Bm(e);return c(dm,{className:"border-none",children:[o(om,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(Pm)})}),o(om,{label:"Режим работы",className:"max-w-none",children:o(Me,{children:e})})]})},Bm=e=>{const t=Sm.map((([,e])=>({short:e,status:!0}))),l=e.split("/")??[],n=l[l.length-1]?.toLowerCase();return n?.includes("выходной")?t.map((e=>({...e,status:!n?.includes(e.short.toLowerCase())}))):t},Pm=({short:e,status:t},l)=>o("div",{className:g("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(Me,{size:"text-xs",children:e})},String(l)),Mm=({currency:e,buyExchangeRate:t,saleExchangeRate:l},n)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(om,{label:"Валюта",value:e.currency}):null,t?o(om,{label:"Купить",value:String(t)}):null,l?o(om,{label:"Продать",value:String(l)}):null]},String(n)),Vm=(new Date).getDay(),zm=e=>{const[t]=e?.slice(Vm-1)??[];if(!t)return null;const{lunchHour:l,status:n,workTime:a,hasLunch:i}=t;return n?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?o(sm,{color:"green",children:a}):null,l&&i?o(sm,{color:"yellow",children:`перерыв: ${l}`}):null]}):o(sm,{color:"red",children:"Выходной"})},Rm=({lunchHour:e,hasLunch:t=!1,status:l=!1})=>l?e&&t?`Перерыв ${e}`:e:"Не работает",Dm=({title:e,status:t,workTime:l,lunchHour:n,hasLunch:a},i)=>o(om,{label:e,value:t&&l?l:"",subText:Rm({lunchHour:n,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),Am=({name:e,address:t,phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},h)=>{if(!d)return null;const u=Im(d);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(Me,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(U,{name:"GeolocationIcon",width:"24",height:"24"}),o(Me,{size:"text-l",children:t})]}):null]}),zm(u)]}),o("div",{className:"hidden sm:block",children:jm({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(Or,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(_r,{isUnfolded:e,children:jm({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>um({isUnfolded:e,onToggle:t})})]},String(h))},jm=({phone:e,fax:t,phoneBusiness:l,phoneNatural:n,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=Im(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(dm,{className:"flex-wrap",children:[o(om,{label:"Факс",value:t}),o(om,{label:"Телефон филиала",value:e}),o(om,{label:"Для обращений юридических лиц",value:l}),o(om,{label:"Обслуживание физических лиц",value:n}),o(om,{label:"Для консультаций по валютному контролю",value:i}),o(om,{label:"Контакт-центр",value:a})]}),r?.isMatchesPattern?o(dm,{children:o(om,{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(Dm)})})}):c(dm,{children:[o(om,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(Pm)})}),km(d)]}),r?.businessScheduleVisibleTag?Tm(r?.businessScheduleDescription):null,s?.currencies?.length?o(dm,{className:"flex-wrap",children:s?.currencies?.map(Mm)}):null]})},Fm=[];const $m=async e=>await mt(e,{method:"GET"})||Fm,Lm={workingSaturday:!1},Em={workingSaturday:e=>Boolean(e.workSchedule?.workingSaturday)},Om=d((({className:e})=>{const[t]=no(),l=function(e){const{data:t=Fm}=sl(`/api/v1/branches?regionCode=${e}`,$m);return t}(t?.code??"000");return o(am,{className:e,filterItems:_m,data:l,initFilterState:Lm,renderCard:Am,title:`Офисы филиала ${t?.name}`})})),_m=(e,t)=>{const l=Object.keys(t).filter((e=>t[e]));return e.filter((e=>l.every((t=>Em[t](e)))))},Um=d((({data:e,className:t,...l})=>{const n=e?.dataType??"offices";return o(b,{version:"transparent",className:g(t),defaultPadding:"p-0",...l,children:"offices"===n?o(Om,{}):o(Nm,{data:e})})})),Hm=d((({className:e,size:t})=>o("figure",{className:g("m-0 mt-xl min-w-[80%]",e),children:Wm(t)}))),Wm=(e=3)=>Xm(100,e).map((e=>Math.floor(e))).map(Km),Km=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-light"},String(t)),Xm=(e,t)=>[e].concat(t>0?Xm(e/1.618,t-1):[]),qm=d((({className:e,title:t,description:l="Блок в разработке...",...n})=>c(b,{className:g("box-border",e),...n,children:[o(k,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(Hm,{})]}))),Gm=d((({className:e="",padding:t,slides:l=[],...a})=>{const[i,r]=n(0);return c(b,{className:g("box-border overflow-hidden",e),defaultPadding:"py-6xl",padding:t,...a,children:[o("div",{className:"flex duration-1000",style:{transform:`translateX(-${100*i}%)`},role:"list",children:l.map((({productBlock:e},t)=>o("div",{className:"box-border grow-0 shrink-0 basis-full",role:"listitem",children:o(tt,{className:"pl-6xl h-full",headlineVersion:"M",isFullWidthTitle:!1,...e,...a})},String(t))))}),o("div",{className:"h-28 px-xs mt-m -mb-m flex gap-xs box-border",children:l.map(Ym({activeSlideIndex:i,onClick:r}))})]})})),Ym=({activeSlideIndex:e,onClick:t})=>({nav:l},n)=>{const a=n===e,i=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:py-xl backdrop-blur",r=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(n),"aria-label":l?.title,className:g("relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50",i),children:[o("div",{className:r,children:l?.title}),o("div",{className:s,children:l?.description})]},String(n))},Qm=d((({address:e,email:t,telephone:l,button:n,className:a="",__html:i,icon:r,title:s,version:d="primary",...m})=>c(b,{className:g("box-border text-left space-y-s",a),version:d,...m,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[Oe(r)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(Z,{image:r})}):null,s?o(v,{headingType:"h3",as:"h3",title:s}):null]}),c("div",{className:"w-full space-y-m",children:[i?Zm(i):null,Jm({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Jm({label:"Телефон(факс)",data:l,iconName:"PhoneIcon"}),Jm({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),n?.text?_e([n]):null]})]}))),Zm=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(Be,{__html:e})}),Jm=({label:e,data:t,iconName:l,dataColor:n=""})=>t?c("div",{className:"flex gap-s",children:[o(U,{iconVersion:"black",name:l,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(Me,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Me,{size:"text-xl",color:n,children:t})]})]}):null,eh=d((e=>{const{__html:t,richVersion:l,...n}=e;return o(b,{defaultPadding:"p-0",...n,children:o(Be,{__html:t,richVersion:l})})})),th=d((({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>o(xs,{tag:"button",className:g("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:n,textNode:c("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[null,e?o(Me,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:l?o(U,{name:l,iconVersion:"color",width:"24",height:"24"}):null}))),lh=ft((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,...c})=>o(b,{className:g("w-full","border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",...c,children:o(Or,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(_r,{className:g("gap-lg","grid grid-cols-12 [&>*]:pb-m"),isUnfolded:e,children:P({...c,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>nh({foldButtonVersion:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})),{childrenTypes:{exclude:["RollupItem"]}}),nh=({foldButtonVersion:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть"),s=((e=!1)=>e?"MinusIcon":"PlusIcon")(a);return"accordion"===e?o(th,{label:r,labelIcon:l,labelIconBgVersion:n,icon:s,onToggle:i}):o(gs,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},ah=d((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return c("div",{className:g("order-4",e),children:[o(aa,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(aa,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),ih=d((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),c=s.find((e=>e.key===n));return o(fl,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:c})})),rh=d((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(ih,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(ih,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),sh=["От 1 дня","До 365 дней"],oh=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Me,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(In,{min:1,max:365,value:e,items:sh,onChange:t})]}))),ch=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(ih,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(ih,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),dh=d((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:h})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(rh,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:mh(m)}),o(oh,{days:a,setDays:e=>m({days:e})}),o(ch,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:hh(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Me,{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(ah,{}),o(he,{text:"Офисы на карте",version:"primary",onClick:h,className:"order-6"})]})]}))),mh=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},hh=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},uh=d((({days:e,tariffs:t=[]})=>{const l=xh(e,t),n="На рисунке изображена пачка листов\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:[ph("Аренда за",e),ph("Цена",l+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(N,{size:"text-s",font:"font-light",color:"text-secondary-text",children:n})}),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(Z,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(N,{size:"text-s",font:"font-light",color:"text-white",children:n})})]})]})})),ph=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Me,{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})]}),xh=(e,t)=>{const l=gh(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},gh=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},fh=(e,t)=>e.find((e=>e.branchCode===t)),bh=d((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=fh(n,l.selectedBranch),d=yh(s?.safeBoxCaseVolumes),m=vh(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,h=Nh(m,l.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(dh,{...l,regions:t,onClick:r,branches:n,caseVolumes:d,safeBoxCases:m,onChange:i}),o(uh,{days:l.days,tariffs:h})]})})),yh=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],vh=(e,t)=>e?.find((e=>e.volume===t)),Nh=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,wh=[];const kh=async e=>await mt(e,{method:"GET"})||wh,Ch=d((({title:e,footnote:t,className:l="",...a})=>{const[r,s]=n(!1),d=i((()=>s((e=>!e))),[]),[m,h]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),u=cl(),p=Sh(m.selectedRegion,u),x=function(e){const{data:t}=sl(e?`/api/v1/safeboxes?regionCode=${e}`:null,kh);return t||wh}(p),g=i((e=>h((t=>({...t,...e})))),[h]),f=(y=fh(x,m.selectedBranch)||x,Array.isArray(y)?y.map((e=>e.gpsLatitude&&e.gpsLongitude?[e.gpsLatitude,e.gpsLongitude]:[])):y?.gpsLatitude&&y?.gpsLongitude?[[y.gpsLatitude,y.gpsLongitude]]:[]);var y;return c(b,{className:l,defaultPadding:"",...a,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(v,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(bh,{regions:u,branches:x,data:{...m,selectedRegion:p},onClick:d,onChange:g}),t?o(N,{size:"text-s",font:"font-light",children:t}):null]}),f.length&&r?o(Yd,{points:f,className:"h-[640px]"}):null]})})),Sh=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Ih=({styleMap:e,isMainButton:t,version:l})=>(n,a,i)=>{const{label:r,description:s,button:d,items:m,isDotted:h}=n;return c("div",{className:g("relative flex flex-col items-center text-center justify-between whitespace-pre-line overflow-hidden space-y-3xl",Th(i.length)),children:[c("div",{className:"space-y-xs",children:[r?o(Me,{size:"text-h6",align:"text-center",children:r}):null,c("div",{className:"flex flex-col items-center gap-3xs",children:[s?o("div",{className:e.description,children:s}):null,o(qe,{className:e.description,items:m,listItemSize:"M",isDotted:h})]})]}),d?.text&&!t?o(he,{className:"box-border py-s w-full max-w-60 mt-auto",version:l,...d,children:d?.text}):null]},String(a))},Th=e=>e<5?"w-72":"w-52",Bh={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"},Ph=d((({buttons:e,className:t="",description:l,showLines:n=!0,size:a="normal",steps:i=[],stepVersion:r="gray",title:s,version:d="primary",...m})=>{const h=i.length>3,u=Bh,p=(e=>e?"":"opacity-0")(n),x=(e=>e<5?"px-24":"px-16")(i.length),f=Boolean(e?.every((e=>e?.text)));return c(b,{className:g("box-border flex flex-col items-center overflow-hidden gap-y-3xl",t),defaultPadding:"p-6xl",version:d,...m,children:[o(k,{headlineVersion:"S",title:s,description:l,isEmbedded:!0,className:"w-full",align:ya}),i?.length?c("div",{className:"box-border space-y-lg flex flex-col justify-center",children:[o("div",{className:g("flex items-center",x),children:rd(o("div",{className:g("h-0.5 w-full bg-secondary-light flex-1",p)}))(i.map(Mh(u,a,r)))}),o("div",{className:g("flex justify-between",h?"gap-x-s":"gap-x-20"),children:i.map((y={styleMap:u,isMainButton:f,version:d},(e,t,l)=>{const{type:n}=e;if("default"!==n&&"rte"!==n)return null;switch(n){case"default":return Ih(y)(e,t,l);case"rte":return o("div",{className:g("text-center",Th(l.length)),children:o(Be,{__html:e.__html})},String(t));default:return null}}))})]}):null,_e(e)]});var y})),Mh=(e,t,l)=>({icon:n},a)=>{const i="secondary"===l?"white":"color";return o(b,{defaultPadding:"",className:`${Vh(t)} flex justify-center items-center text-center rounded-full box-border z-10`,version:l,children:Oe(n)?o(Z,{image:{...n,iconVersion:n?.iconVersion||i},width:"48",height:"48"}):o("span",{className:g("text-h4","transparent"===l?e.iconText:(r=l,"secondary"===r?"group-data-primary:text-white":"text-secondary-text")),children:a+1})},String(a));var r},Vh=e=>"normal"===e?"h-24 w-24":"h-16 w-16",zh=d((()=>o("div",{className:"hidden",role:"none"}))),Rh=d((({className:e,version:t,gap:l=14,padding:n=16,showDots:a=false,minHeight:i,children:r,onVisibleIndicesChange:s,listType:d="horizontal-list"})=>{const m=Array.isArray(r)?r.length:0,[h,u]=cr({itemCount:m,onVisibleIndicesChange:s}),[p]=u.visibleIndicesRange;return c("div",{className:g(e,"vertical-list"===d?"relative h-full":""),children:[o(tr,{containerRef:h,activeIndex:p,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:u.handleVisibleIndicesChange,listType:d,minHeight:i,children:r}),a?o(rr,{containerRef:h,activeIndex:p,dotCount:m,listType:d,version:t}):null]})})),Dh=ft((({listType:e,showDots:t,options:l,version:n,...a})=>o(b,{version:n,defaultPadding:"p-0",...a,children:o(Rh,{listType:e,showDots:t,version:n,children:P({...a,options:l})})})),{childrenTypes:{exclude:["SwipeListControlBlock"]}}),Ah="hidden sm:flex absolute z-40 top-0",jh=d((({className:e,items:t=[],value:l,onChange:n,tabsType:a})=>{const[i,r]=cr({itemCount:t?.length||0});return c("div",{className:g("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[o(tr,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,children:t.map(Ld(l,n,a))}),r.canScrollLeft?o(za,{className:g("left-6",Ah),onClick:r.scrollLeft}):null,r.canScrollRight?o(Ra,{className:g("right-6",Ah),onClick:r.scrollRight}):null]})})),Fh=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return o(Ed,{...t});case"centered":return o("div",{className:"flex",children:o(Ed,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return o("div",{className:"flex",children:o(jh,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},$h="tab",Lh=d((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...c})=>{const d=x(),{isReady:m}=d,h=r((()=>l.map(Oh)),[l]),[u,f]=n(0);a((()=>{if(!l||!l[0])return;const e=d.query.tab&&l.findIndex((e=>"group"===e.type&&e.ref===d.query.tab))||0,t=l[e]||l[0];f(e),Eh(t)}),[m]),a((()=>{const e=l[u];"group"===e?.type&&p.subject("tab",{type:e.type,label:e.ref,groupName:e.name})}),[l,u]);const y=i((e=>{const t=h.indexOf(e),n=l[t];f(t),Eh(n),"group"===n.type&&(e=>{const t=new URLSearchParams(d.query);e.name?t.set($h,e.name):t.delete($h),d.replace(`${d.pathname}?${t}`,"",{scroll:!1})})(e)}),[l,h]);return o(b,{className:g(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...c,children:Fh({items:h,value:h[u],tabsMode:s,onChange:y})})})),Eh=e=>{"group"===e.type&&p.fire("tab",{type:e.type,label:e.ref,groupName:e.name}),"link"===e.type&&p.fire("tab",{type:e.type,label:e.href})},Oh=e=>"group"===e?.type?{text:e.title,name:e.ref}:e,_h={start:"text-start",center:"text-center",end:"text-end"},Uh=d((({tab:e,className:t,onClick:l,isActive:n})=>{const a=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white text-primary-text"),title:e?"mb-xs text-xl":"mb-2xs text-l",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal"}))(n);return c("button",{type:"button",onClick:l,"aria-label":e?.title,className:g("border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs",a.btn,t),children:[e?.icon?o(Z,{className:g("h-6 w-6 min-w-6 min-h-6",a.icon),image:{...e?.icon,iconVersion:e?.icon?.iconVersion??a.iconVersion},width:"24",height:"24"}):null,c("div",{className:"border-0",children:[e?.title?o("div",{className:a.title,children:e.title}):null,e?.description?o("div",{className:a.desc,children:e.description}):null]})]})})),Hh=d((({tab:e})=>{const t=se(),{onClick:l}=t({...e,onClick:()=>{e.href&&!D(e.href)&&(globalThis.location.href=e.href)}});return jo(l,[],800),o(Hm,{className:"col-span-12 p-xl",size:5})})),Wh=ft((({className:e="",tabs:t=[],block:l,tabAlign:i,...r})=>{const[s,d]=n(Xh(t)),m=Kh(t[s],s),h=t.length,[u,{inc:p,dec:x}]=Ma({itemCount:h},s),[f,y]=cr({itemCount:h});return((e,t)=>{const[l,{setTrue:n}]=dl(!1);a((()=>{t.scrollTo(e,{behavior:l?"smooth":"auto",block:"nearest",inline:"center"}),!l&&n()}),[e,l])})(s,y),c(b,{className:g(e),defaultPadding:"p-0",...r,children:[c("div",{className:"relative border-b-8 border-primary-main",children:[o(tr,{itemClassName:"flex",containerRef:f,snapAlign:"snap-end",gap:8,onVisibleIndicesChange:y.handleVisibleIndicesChange,children:t.map(qh(s,d,i))}),o(hr,{scroll:y,arrowsPadded:!0,onScrollLeft:x,onScrollRight:p,activeIndex:u,itemCount:h})]}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:t[s]?.href?o(Hh,{tab:t[s]}):B(l?.slots?.[m],{...r?.options,slotName:m,parent:l})})]})}),{slots:({tabs:e})=>e?.filter((e=>!e.href)).map(Kh)||[],childrenTypes:{exclude:["TabsLayout"]}}),Kh=(e,t)=>e?.title||`Слот №${t}`,Xh=e=>e.reduce(((e,t,l)=>t.selected?l:e),0),qh=(e,t,l="start")=>(n,a)=>o(Uh,{className:_h[l],tab:n,isActive:e===a,onClick:()=>t(a)},String(a)),Gh=d((({className:e="",isOpen:t,onClick:l})=>o(he,{className:e,appendRight:o(Z,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"20",height:"20"}),text:t?"Скрыть":"Показать",version:"gray",onClick:l}))),Yh={Buttons:({buttons:e})=>_e(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(Z,{image:e}):null,List:({isDotted:e,...t})=>o(qe,{className:"flex flex-col justify-between items-start text-h6",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(Me,{size:"text-h6",children:e})}):null,t?o("div",{children:o(Me,{size:"text-l",color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:a})=>e?o(Gh,{isOpen:a,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null},Qh=d((({cell:e,fieldIdx:t,rowIdx:l,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=n(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return Zh({cell:e,cellProps:{rowIdx:l,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),Zh=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in Yh))return null;return o(Yh[l],{...t,...n})},Jh=d((({cells:e,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>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(Qh,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),eu=(e,t)=>140*Se(e.slice(0,t).map((e=>e?.cols?.length??1))),tu=(e,t)=>e?.length>0?o("div",{className:g("flex",0===t?"text-secondary-text":""),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(Me,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,lu=d((({rows:e})=>{const t=e?.[0]?.length??0,[l,n]=Ma({itemCount:t,visibleItemCount:5});return c("div",{children:[e?.map((a=l,(e,t)=>{if(!e?.length)return null;const[l,...n]=e,i=g("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:[l?.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(Me,{size:"text-xl",font:"font-light",children:l.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:i,style:{transform:`translateX(-${eu(n,a)}px)`},children:n?.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(Me,{size:"text-xl",children:e.data}):null,e?.cols?tu(e.cols,a):null]},`row${t}`)))})})]},String(t))})),Da({...n,btnClass:["left-3 top-20","right-3 top-20"],className:""})]});var a})),nu=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,l)=>{const n=`activeTabIdx:${e}-tableIdx:${l}`;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(Me,{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(lu,{rows:t.rowsData})})})]},n)}))}))),au=(e=!1)=>""+(e?"text-white":"text-secondary-text"),iu=d((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:n})=>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:g("rounded-md px-4 py-3 cursor-pointer",t===l?"bg-primary-main":""),onClick:()=>n(t),children:o(Me,{size:"text-xl",font:"font-light",color:au(t===l),children:e||t+1})},e)))}):null,t?o(he,{className:"text-primary-main",href:t,version:"secondary",target:"_blank",appendLeft:o(U,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]})));async function ru(e){const t=await fetch(e);return await t.json()}const su=d((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:a}=function(e){const{data:t}=sl(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),ru);return t||{}}(e),[r,s]=n(0),d=i((e=>s(e)),[]),m=a?.[r]?.items??[],h=a?.map((e=>e.currency??""));return c("div",a?{className:"bg-white z-10",children:[o(iu,{currencies:h,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(nu,{activeTabIndex:r,items:m}),o(Gh,{className:"mt-xl",onClick:l,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Me,{size:"text-h6",children:"Данных нет"}),o(Gh,{onClick:l,isOpen:!0})]})})),ou=d((({children:e,tableInner:t,onHideContentClick:l})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:g("@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(su,{...t,onClick:l})}):null]}))),cu=d((({row:{header:e,data:t},activeIndex:l,rowIdx:a,...r})=>{const[s,d]=n(void 0),m=i((e=>d(e)),[]),[h,u]=n(void 0),p=i((e=>u(e)),[]);return c(ou,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:g("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(Z,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o(Me,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(Zr,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(Jh,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:p,...r},String(t))))}):null]})})),du=d((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return c("div",{role:"table",children:[c("div",{className:"relative space-y-xs",children:[e,Da({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),l?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),mu=d((({className:e="",title:t,description:l,rowHeaders:n,tariffsColumns:a,hiddenRowsNum:i=0,...r})=>{const s=a?.map((({data:e})=>e))||[],d=n?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),m=s.length,[h,u]=Ma({itemCount:m,visibleItemCount:2}),p=(d||[]).map(((e,t)=>o(cu,{row:e,activeIndex:h,rowIdx:t,...r},String(t)))),[x,f]=i>0?[p.slice(0,-i),p.slice(-i)]:[p,[]];return c(b,{className:g("overflow-hidden relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[o(k,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m",children:i>0?o(Or,{renderFoldableSection:({isUnfolded:e})=>c(du,{controls:u,children:[x,o(_r,{isUnfolded:e,children:f})]}),renderFoldButton:fs}):o(du,{controls:u,children:p})})]})})),hu=d((({className:e="",title:t,description:l,iconVersion:n,__html:a,...i})=>c(b,{className:g("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...i,children:["small"===n?uu():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Me,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?pu(l):null,a?o(Be,{__html:a}):null]})]}))),uu=()=>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"}),pu=e=>o(N,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),xu=d((({prefix:e,unit:t,suffix:l})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o(Me,{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,l?o("div",{className:"gradient-color-text",children:o(Me,{size:"text-h2",children:l})}):null]}))),gu=d((e=>{const{prefix:t,unit:l,suffix:n,...a}=e;return o(b,{defaultPadding:"p-0",...a,children:o(xu,{prefix:t,unit:l,suffix:n})})})),fu=ft((({className:e="",padding:t="p-0",gap:l="",isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...c})=>{const d=x();return o(b,{className:g("relative flex flex-col",Qc[l],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${X(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:P({...c,extraProps:{className:g("w-full",pr(r)),padding:n?"":"p-0"}})})}),{childrenTypes:[]}),bu=e=>(e=>{const t="col-span-",l=e?.split(/\s+/).find((e=>e.startsWith(t)));return l?parseInt(l.substring(t.length),10):12})(e)<10?"py-xl px-6xl":"py-6xl px-32",yu=d((({className:e,title:t,url:l,previewImg:n,...a})=>{const i=x();return c(b,{className:e,defaultPadding:bu(e),...a,children:[o(k,{title:t,headlineVersion:"M"}),l?o("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:E(i)(n?.src),style:{maxHeight:524},controls:!0,children:o("source",{src:E(i)(l)})}):null]})})),vu={AdTile:yt,ApplicationForm:ga,BenefitsBlock:wa,BonusBenefitsBlock:Ta,ButtonsBlock:Pa,Calculator:_i,CardTransfer:Gi,Carousel:wr,CarouselBankHistoryCard:kr,CarouselCard:Br,CarouselCatalogCard:Mr,CarouselLinks:Dr,CarouselRecommendationCard:Lr,CarouselTariffsCard:Hr,ComparisonTable:cs,ContactsBlock:ms,DepositFiltration:Ls,Depository:Js,ErrorBlock:to,ExchangeRateTile:To,Footer:hc,GracePeriod:uc,Header:Yc,Headline:k,HorizontalLayout:Zc,ImgBlock:Jc,InsuranceAmountBlock:ad,InvestmentInfo:cd,LinkDocs:bd,MobileAppTile:Nd,MortgageFiltration:_d,OfficesAtmsMap:Um,Placeholder:qm,ProductBlock:bt,ProductGallery:Gm,RepresentativeOfficeInfo:Qm,RichTextBlock:eh,RollupItem:lh,SafeDepositRental:Ch,StepsBlock:Ph,StickyBottomMenu:zh,SwipeListControlBlock:Dh,Tabs:Lh,TabsLayout:Wh,TariffsTable:mu,TextBlock:hu,UnitBlock:gu,VerticalLayout:fu,Video:yu},Nu="cookie",wu=d((({termLink:e,personalDataPolicyLink:t})=>{const[l,{setTrue:n,setFalse:a}]=dl();jo((()=>{globalThis.localStorage?.getItem(Nu)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(Nu,"true"),a()}),[]);return l?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",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:c(N,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",o(jr,{isRemote:!0,className:ku(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",o(jr,{isRemote:!0,className:ku(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),o("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:o(Ao,{className:"bg-main-gray rounded-md",onClose:r})})]})}):null})),ku=e=>g("inline mx-2xs",e?"text-green-dark":"");function Cu(e){throw new Error(e)}const Su=({onCloseAll:e,onClose:t}={})=>{const[l,{push:r,pop:s,clear:o}]=function(e=[]){const[t,l]=n(e),a=i((e=>l((t=>[...t,e]))),[]),r=i((()=>l((e=>e.slice(0,-1)))),[]),s=i((e=>l((t=>t.filter((t=>t!==e))))),[]),o=i((()=>l([])),[]);return[t,{setList:l,push:a,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(l),o()}),[l,e]),d=i((()=>{t&&t(l[l.length-1]),s()}),[l,t]);return a((()=>p.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:Cu(e)}}))),[c,d]),l},Iu=d((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=Su({onCloseAll:e,onClose:t}),{close:n}=ie(),r=i((({key:e})=>{"Escape"===e&&n()}),[]);return hl(globalThis.document,"keydown",r),a((()=>{l.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[l]),l.length?o("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>o("div",{className:g("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),Tu=d((()=>{const[e,t]=n(null),l=i((()=>{t(null)}),[]);a((()=>p.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":l();break;default:Cu(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&l()}),[l]);return hl(globalThis.document,"keydown",r),e?o("div",{className:"absolute z-50",style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),Bu="header",Pu="footer",Mu="sticky-footer",Vu={},zu=d((({className:e,data:t=Vu,blocksRegistry:l,blockDecorator:n})=>{const{slots:a,blocks:i,...r}=t,s={key:"",page:{slots:a,blocks:i,...gt(r)},blocksRegistry:l,blockDecorator:n,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:g("@container relative",t.style,e),children:[a?.header?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:B(a?.header,{...s,slotName:Bu})}):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:s,extraProps:{className:"scroll-mt-12"}}),B(a?.footer,{...s,slotName:Pu})]})]}),a?.["sticky-footer"]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:B(a?.["sticky-footer"],{...s,slotName:Mu})}):null,o(Iu,{}),o(Tu,{}),o(wu,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));Object.assign(zu,{childrenTypes:[],slots:()=>[Bu,Pu,Mu]});e.Blocks=vu,e.ContentPage=zu,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),l=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await l.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.handlerDecorator=re,e.joinList=rd,e.packageVersion="0.14.166",e.projectSettings=z,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=F,e.useRouter=x,Object.defineProperty(e,"__esModule",{value:!0})}));
|